From b1270c4da0a76b59e1dfa1809487fb4f5cfdaf8b Mon Sep 17 00:00:00 2001 From: Samuli Suominen Date: Mon, 19 Jul 2010 19:33:25 +0000 Subject: old (Portage version: 2.2_rc67/cvs/Linux x86_64) --- sys-power/cpufreqd/Manifest | 20 --- sys-power/cpufreqd/cpufreqd-2.1.1.ebuild | 66 --------- sys-power/cpufreqd/cpufreqd-2.3.4-r1.ebuild | 84 ----------- sys-power/cpufreqd/cpufreqd-2.3.4-r2.ebuild | 84 ----------- sys-power/cpufreqd/files/2.2.1-cpu_all.patch | 35 ----- .../files/cpufreqd-2.3.4-lm_sensors-3-r2.patch | 155 -------------------- .../files/cpufreqd-2.3.4-lm_sensors-3.patch | 156 --------------------- sys-power/cpufreqd/files/nvclock0.8b-fd.patch | 12 -- sys-power/cpufreqd/files/nvclock0.8b2-fpic.patch | 20 --- 9 files changed, 632 deletions(-) delete mode 100644 sys-power/cpufreqd/cpufreqd-2.1.1.ebuild delete mode 100644 sys-power/cpufreqd/cpufreqd-2.3.4-r1.ebuild delete mode 100644 sys-power/cpufreqd/cpufreqd-2.3.4-r2.ebuild delete mode 100644 sys-power/cpufreqd/files/2.2.1-cpu_all.patch delete mode 100644 sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3-r2.patch delete mode 100644 sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3.patch delete mode 100644 sys-power/cpufreqd/files/nvclock0.8b-fd.patch delete mode 100644 sys-power/cpufreqd/files/nvclock0.8b2-fpic.patch (limited to 'sys-power') diff --git a/sys-power/cpufreqd/Manifest b/sys-power/cpufreqd/Manifest index f25db3ac9190..d696297bc99f 100644 --- a/sys-power/cpufreqd/Manifest +++ b/sys-power/cpufreqd/Manifest @@ -1,28 +1,8 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -AUX 2.2.1-cpu_all.patch 1345 RMD160 46b6df317e04b932eb0c3bdc5d402e013090d764 SHA1 f04e1f2a791c9730f27017de7764f901532a6ae7 SHA256 ab3be707dd18b32687d27e56a409c9b0e0d2f10921f6b75cdf8605c941cf24cd -AUX cpufreqd-2.3.4-lm_sensors-3-r2.patch 5451 RMD160 f9260c99f71b35651e5e15e8b4572f6f11dbae22 SHA1 648e27625a473f57254b8eb7e759e6185469a906 SHA256 90e56d8dedfe940a7926fc0b0e4617fc44ad97cdbf0cf43a7dd53192e6dfa92d -AUX cpufreqd-2.3.4-lm_sensors-3.patch 5462 RMD160 0a459e3fb8e5c5f1a16ad4444fe0a9b1ffe733fd SHA1 70dad8a81b7e98ff92a2f91ecb6c25d3a890b441 SHA256 bc47ae6e2aa5b9bdfe41509f41ee0e19fefc3ba2a093a1df6b4f7f7653aa8e1c AUX cpufreqd-conf.d.patch 269 RMD160 7d597a9fefff26dc0270a94ee6c360e1322390b7 SHA1 9ce182311b269da517f4f126aa485af1dded5423 SHA256 2e4c34e87daffb5929717ba6e91a36c0e85db1e042ff10a1483617f5f4d424e1 AUX cpufreqd-init.d 1156 RMD160 b64937c969717b5d7234a447b6e548b4c4269638 SHA1 9159187780cd31f657c8f771e534d7d55e2d68c3 SHA256 3fe98f8535e2e7e67f834865d0c3c18d2594d0aa1066e42b06b160955e1c8cf9 -AUX nvclock0.8b-fd.patch 580 RMD160 a5db5cb4f0c0f3270e3f042b1033defd6c406376 SHA1 afd021a0144b6adb4dbb936f1a8181db609592fc SHA256 5dad49a3ce2a52b37c4711c497a46c373282bdf27b9b28834a0b5bd977066bf2 AUX nvclock0.8b-fpic.patch 641 RMD160 08f803b690e1ebf69859b48604bc746a1ee3c0fd SHA1 57581e5b9201c57d811f5ebee61e7dc28bf2efad SHA256 c6dfdc3ecf84b7bd8f0eb7729aff4b3f9fde0bcce2ade0aa1765483bd486e159 -AUX nvclock0.8b2-fpic.patch 706 RMD160 a18e4fbea3e8c30f45dd7e7988005709916370c2 SHA1 b4672d272b33d21cb6c4285eec75e10527659d06 SHA256 281aaec86579d9e9a2b940e52600b08bccf40284a14b57991619d29308f1de1c -DIST cpufreqd-2.1.1.tar.bz2 285824 RMD160 06de622db37d67842133f6e1200f6fda24ec98d5 SHA1 d214dda81a7c1ef21b010fe79bbdf0289925495c SHA256 8693c78dd7c7a0b7c02b0d2c0d1ae6f5ce3f18b23c1b7b5c59e78715a307f814 -DIST cpufreqd-2.3.4.tar.bz2 299759 RMD160 1b12b9e6321d0f6d764fb9da8d472e13b26217d6 SHA1 a41b50115c3e91a70368f15727702b5f69fb7ac8 SHA256 05c9fe7273831eaa5b9c131dad885e14234a588e7cd54757db5535944c94e436 DIST cpufreqd-2.4.2.tar.bz2 299946 RMD160 a6c762dd34f5a74387b37b64843dbf968bc3c28d SHA1 88ff75f3f3d457c49178f1e557ba5435651e1427 SHA256 3b7810a3d244d9b10c8c151fd6037e7d14c9889cdf5cdff1867bd978b9f7482a DIST nvclock0.8b.tar.gz 353127 RMD160 66cac5993dc141d00efaa95d8f5ec38ed53854f6 SHA1 ff0a9fe81a8f3227338ffccae143310df1b18551 SHA256 a1fbdb82837c33869c0ebfcb95b6e11fc53b86919e8d1d17265d1af71eb04393 -EBUILD cpufreqd-2.1.1.ebuild 1556 RMD160 0e40d2f9cd5a9d30cb672ce385c093190705d91f SHA1 be1bdfe1bba41078a8b96525fa7599a6c8fc99e8 SHA256 00f5720a87ad4783998eadbd23ce3ceefad8e6c115e3ef893a8c693662c2f45a -EBUILD cpufreqd-2.3.4-r1.ebuild 2097 RMD160 9acd9f37814ec4b4b1d20edd8ea3996a8d300ed0 SHA1 9f6dd7832bae3e66fb824a374a67f3fe1cd5c45e SHA256 5566f00ea55c4644a10177b25d2d64f0e93cfc820ed16a2900a5a591d7f863ca -EBUILD cpufreqd-2.3.4-r2.ebuild 2100 RMD160 ff098c96df21e7b3e8135fdbaee7707102ccd378 SHA1 be1187535271e24e564fc3a1d406c2abd53652c9 SHA256 21600ff804db62aa6fff591d3b58b756a12adbf460602bffece5386068e70fe8 EBUILD cpufreqd-2.4.2.ebuild 2004 RMD160 ee2f5dfe809b5fee1cb2a1301c1413c3ec7a125e SHA1 d0addd727880525a90ed4158713e9e4fe5ee7037 SHA256 f10aa2b7ee325e3b1318180e28ba19b8119d8d2a3ad1dfade5b207ba4fd4dcb9 MISC ChangeLog 13247 RMD160 d6755074d5bbd276b361f39ec67c88ed626775e9 SHA1 3578007c8229cccd2a6d8c08bb67c23df69d510e SHA256 21c155b67a60ef60418284775cc855c5d0a89293906cf5dc6dd2f1cd61add887 MISC metadata.xml 423 RMD160 d843208101d0e0aef245a5d5219e23ba0c7a38a6 SHA1 a88afdeb4b95664870a648ee552b15c329b6a8a9 SHA256 acc4e407d32dcef3e0806c8fec555d9b5bc59cfc5d38f5e989dd5fea62723c93 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.15 (GNU/Linux) - -iEYEARECAAYFAkxEpQoACgkQcsIHjyDViGT1jQCdFoPwo3IWI+QYpsOpaN4h+vdq -JyIAoMmzvB4P2AR9PQrgGmsWEfrL7WrA -=Shgz ------END PGP SIGNATURE----- diff --git a/sys-power/cpufreqd/cpufreqd-2.1.1.ebuild b/sys-power/cpufreqd/cpufreqd-2.1.1.ebuild deleted file mode 100644 index 13b808d48864..000000000000 --- a/sys-power/cpufreqd/cpufreqd-2.1.1.ebuild +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/cpufreqd-2.1.1.ebuild,v 1.10 2010/06/27 18:02:36 ssuominen Exp $ - -inherit eutils - -NVCLOCK_VERSION="0.8b" - -DESCRIPTION="CPU Frequency Daemon" -HOMEPAGE="http://cpufreqd.sourceforge.net" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2 - nvidia? ( http://www.linuxhardware.org/nvclock/nvclock${NVCLOCK_VERSION}.tar.gz )" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="ppc" - -IUSE="acpi apm nforce2 nvidia pmu" -RDEPEND=">=sys-power/cpufrequtils-002" -DEPEND="sys-apps/sed - ${RDEPEND}" - -src_unpack() { - unpack ${A} - - sed -i -e "s:acpi_event:acpi:" "${S}"/cpufreqd.conf - - if use nvidia; then - cd "${WORKDIR}"/nvclock${NVCLOCK_VERSION} - epatch "${FILESDIR}"/nvclock${NVCLOCK_VERSION}-fd.patch - epatch "${FILESDIR}"/nvclock${NVCLOCK_VERSION}-fpic.patch - fi -} - -src_compile() { - local config - - if use nvidia; then - cd "${WORKDIR}"/nvclock${NVCLOCK_VERSION} - econf \ - --disable-gtk \ - --disable-qt \ - --disable-nvcontrol \ - || die "econf nvclock failed" - emake -j1 || die "emake nvclock failed" - config="--enable-nvclock=${WORKDIR}/nvclock${NVCLOCK_VERSION}" - fi - - cd "${S}" - econf \ - $(use_enable acpi) \ - $(use_enable apm) \ - --disable-sensors \ - $(use_enable nforce2) \ - $(use_enable pmu) \ - ${config} \ - || die "econf failed" -} - -src_install() { - make DESTDIR="${D}" install || die "make install failed" - - dodoc AUTHORS ChangeLog NEWS README TODO - - newinitd "${FILESDIR}"/${PN}-init.d ${PN} -} diff --git a/sys-power/cpufreqd/cpufreqd-2.3.4-r1.ebuild b/sys-power/cpufreqd/cpufreqd-2.3.4-r1.ebuild deleted file mode 100644 index 54e7e45df626..000000000000 --- a/sys-power/cpufreqd/cpufreqd-2.3.4-r1.ebuild +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/cpufreqd-2.3.4-r1.ebuild,v 1.1 2009/10/27 09:07:18 bangert Exp $ - -EAPI="2" - -inherit eutils - -NVCLOCK_VERSION="0.8b" - -DESCRIPTION="CPU Frequency Daemon" -HOMEPAGE="http://www.linux.it/~malattia/wiki/index.php/Cpufreqd" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2 - nvidia? ( http://www.linuxhardware.org/nvclock/nvclock${NVCLOCK_VERSION}.tar.gz )" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" - -IUSE="acpi apm lm_sensors nforce2 nvidia pmu" -RDEPEND=">=sys-power/cpufrequtils-002 - lm_sensors? ( >sys-apps/lm_sensors-3 )" -DEPEND="sys-apps/sed - ${RDEPEND}" - -src_prepare() { - epatch "${FILESDIR}"/${PN}-conf.d.patch - epatch "${FILESDIR}"/2.2.1-cpu_all.patch - use lm_sensors && epatch "${FILESDIR}"/${P}-lm_sensors-3.patch - - if use nvidia; then - cd "${WORKDIR}"/nvclock${NVCLOCK_VERSION} - epatch "${FILESDIR}"/nvclock${NVCLOCK_VERSION}-fpic.patch - fi -} - -src_configure() { - local config - - if use nvidia; then - cd "${WORKDIR}"/nvclock${NVCLOCK_VERSION} - econf \ - --disable-gtk \ - --disable-qt \ - --disable-nvcontrol \ - || die "econf nvclock failed" - emake -j1 || die "emake nvclock failed" - config="--enable-nvclock=${WORKDIR}/nvclock${NVCLOCK_VERSION}" - fi - - cd "${S}" - econf \ - $(use_enable acpi) \ - $(use_enable apm) \ - $(use_enable lm_sensors sensors) \ - $(use_enable nforce2) \ - $(use_enable pmu) \ - ${config} \ - || die "econf failed" -} - -src_compile() { - if use nvidia; then - cd "${WORKDIR}"/nvclock${NVCLOCK_VERSION} - fi - - cd "${S}" - emake || die "make failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "make install failed" - rm -rf "${D}"/usr/$(get_libdir)/*.la - dodoc AUTHORS ChangeLog NEWS README TODO - newinitd "${FILESDIR}"/${PN}-init.d ${PN} -} - -pkg_postinst() { - if [ -f "${ROOT}"/etc/conf.d/cpufreqd ] ; then - ewarn "An old \"/etc/conf.d/cpufreqd\" file was found. It breaks" - ewarn "the new init script! Please remove it." - ewarn "# rm /etc/conf.d/cpufreqd" - fi -} diff --git a/sys-power/cpufreqd/cpufreqd-2.3.4-r2.ebuild b/sys-power/cpufreqd/cpufreqd-2.3.4-r2.ebuild deleted file mode 100644 index 38bb0b7252d8..000000000000 --- a/sys-power/cpufreqd/cpufreqd-2.3.4-r2.ebuild +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufreqd/cpufreqd-2.3.4-r2.ebuild,v 1.1 2010/01/10 23:34:33 bangert Exp $ - -EAPI="2" - -inherit eutils - -NVCLOCK_VERSION="0.8b" - -DESCRIPTION="CPU Frequency Daemon" -HOMEPAGE="http://www.linux.it/~malattia/wiki/index.php/Cpufreqd" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2 - nvidia? ( http://www.linuxhardware.org/nvclock/nvclock${NVCLOCK_VERSION}.tar.gz )" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" - -IUSE="acpi apm lm_sensors nforce2 nvidia pmu" -RDEPEND=">=sys-power/cpufrequtils-002 - lm_sensors? ( >sys-apps/lm_sensors-3 )" -DEPEND="sys-apps/sed - ${RDEPEND}" - -src_prepare() { - epatch "${FILESDIR}"/${PN}-conf.d.patch - epatch "${FILESDIR}"/2.2.1-cpu_all.patch - use lm_sensors && epatch "${FILESDIR}"/${P}-lm_sensors-3-r2.patch - - if use nvidia; then - cd "${WORKDIR}"/nvclock${NVCLOCK_VERSION} - epatch "${FILESDIR}"/nvclock${NVCLOCK_VERSION}-fpic.patch - fi -} - -src_configure() { - local config - - if use nvidia; then - cd "${WORKDIR}"/nvclock${NVCLOCK_VERSION} - econf \ - --disable-gtk \ - --disable-qt \ - --disable-nvcontrol \ - || die "econf nvclock failed" - emake -j1 || die "emake nvclock failed" - config="--enable-nvclock=${WORKDIR}/nvclock${NVCLOCK_VERSION}" - fi - - cd "${S}" - econf \ - $(use_enable acpi) \ - $(use_enable apm) \ - $(use_enable lm_sensors sensors) \ - $(use_enable nforce2) \ - $(use_enable pmu) \ - ${config} \ - || die "econf failed" -} - -src_compile() { - if use nvidia; then - cd "${WORKDIR}"/nvclock${NVCLOCK_VERSION} - fi - - cd "${S}" - emake || die "make failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "make install failed" - rm -rf "${D}"/usr/$(get_libdir)/*.la - dodoc AUTHORS ChangeLog NEWS README TODO - newinitd "${FILESDIR}"/${PN}-init.d ${PN} -} - -pkg_postinst() { - if [ -f "${ROOT}"/etc/conf.d/cpufreqd ] ; then - ewarn "An old \"/etc/conf.d/cpufreqd\" file was found. It breaks" - ewarn "the new init script! Please remove it." - ewarn "# rm /etc/conf.d/cpufreqd" - fi -} diff --git a/sys-power/cpufreqd/files/2.2.1-cpu_all.patch b/sys-power/cpufreqd/files/2.2.1-cpu_all.patch deleted file mode 100644 index 5613345d48e9..000000000000 --- a/sys-power/cpufreqd/files/2.2.1-cpu_all.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- cpufreqd-2.2.1.orig/src/cpufreqd_cpu.c 2007-08-03 13:55:54.000000000 +0200 -+++ cpufreqd-2.2.1/src/cpufreqd_cpu.c 2007-08-03 14:17:36.000000000 +0200 -@@ -222,7 +222,7 @@ - /* special handling for CPU_ALL and CPU_ANY */ - if (c->cpu == CPU_ANY || c->cpu == CPU_ALL) { - for (i = 0; i < cinfo->cpus; i++) { -- clog(LOG_DEBUG, "CPU%d user=%d nice=%d sys=%d\n", c->cpu, -+ clog(LOG_DEBUG, "CPU%d user=%d nice=%d sys=%d\n", i, - cusage[i].c_user, cusage[i].c_nice, cusage[i].c_sys); - cpu_percent = calculate_cpu_usage(&cusage[i], &cusage_old[i], c->nice_scale); - clog(LOG_DEBUG, "CPU%d %d%% - min=%d max=%d scale=%.2f (%s)\n", i, cpu_percent, -@@ -234,14 +234,16 @@ - if (c->cpu == CPU_ALL && !(cpu_percent >= c->min && cpu_percent <= c->max)) - break; - } -- /* if this code is reached then either CPU_ANY and none matches -- * or CPU_ALL and all match -+ /* if this code is reached then -+ * either CPU_ANY and none matches -+ * or CPU_ALL and all match, where i == cinfo->cpus -+ * or CPU_ALL and break was called - */ -- if (c->cpu == CPU_ANY) { -- c = c->next; -- continue; -- } -- return MATCH; /*if (c->cpu == ALL)*/ -+ if (c->cpu == CPU_ALL && i == cinfo->cpus) -+ return MATCH; -+ -+ c = c->next; -+ continue; - } - - /* cacluate weighted activity for the requested CPU */ diff --git a/sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3-r2.patch b/sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3-r2.patch deleted file mode 100644 index b3efd6ad2cfa..000000000000 --- a/sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3-r2.patch +++ /dev/null @@ -1,155 +0,0 @@ ---- src/cpufreqd_sensors.c.orig 2009-03-21 07:17:15.000000000 -0400 -+++ src/cpufreqd_sensors.c 2010-01-10 00:28:50.000000000 -0500 -@@ -23,10 +23,22 @@ - #include - #include "cpufreqd_plugin.h" - -+#if !defined __GNUC__ || __GNUC__ < 3 -+#define __attribute__(x) -+#endif -+ -+#if SENSORS_API_VERSION < 0x400 -+typedef sensors_feature_data sensors_feature; -+#endif -+ - /* to hold monitored feature list and avoid reading all sensors */ - struct sensors_monitor { - const sensors_chip_name *chip; -- const sensors_feature_data *feat; -+ char chip_string[MAX_STRING_LEN]; -+ const sensors_feature *feat; -+#if SENSORS_API_VERSION >= 0x400 -+ const sensors_subfeature *sub_feat; -+#endif - double value; - struct sensors_monitor *next; - }; -@@ -133,27 +145,73 @@ - struct sensors_monitor *list = monitor_list; - - while (list) { -- sensors_get_feature(*(list->chip), list->feat->number, &list->value); -- clog(LOG_INFO, "%s: %.3f\n", list->feat->name, list->value); -+#if SENSORS_API_VERSION >= 0x400 -+ if(sensors_get_value(list->chip, list->sub_feat->number, &list->value) < 0) { -+#else -+ if(sensors_get_feature(*(list->chip), list->feat->number, &list->value) < 0) { -+#endif -+ clog(LOG_ERR,"could not read value for %s\n",list->feat->name); -+ return -1; -+ } -+ clog(LOG_INFO, "%s:%s: %.3f\n", list->chip_string, list->feat->name, list->value); - list = list->next; - } - - return 0; - } - -+ -+#if SENSORS_API_VERSION < 0x400 -+/* Adapted from lm-sensors 2.10.8 prog/sensors/main.c */ -+static int sensors_snprintf_chip_name(char *str, size_t size, -+ const sensors_chip_name *chip) -+{ -+ switch(chip->bus) { -+ case SENSORS_CHIP_NAME_BUS_ISA: -+ return snprintf(str,size,"%s-isa-%04x",chip->prefix,chip->addr); -+ case SENSORS_CHIP_NAME_BUS_PCI: -+ return snprintf(str,size,"%s-pci-%04x",chip->prefix,chip->addr); -+ case SENSORS_CHIP_NAME_BUS_DUMMY: -+ return snprintf(str,size,"%s-%s-%04x",chip->prefix,chip->busname,chip->addr); -+ default: -+ return snprintf(str,size,"%s-i2c-%d-%02x",chip->prefix,chip->bus,chip->addr); -+ } -+} -+#endif -+ -+__attribute__((unused)) static const char* sensors_get_chip_name(const sensors_chip_name *chip); -+static const char* sensors_get_chip_name(const sensors_chip_name *chip) { -+ static char name[MAX_STRING_LEN]; -+ sensors_snprintf_chip_name(name, MAX_STRING_LEN, chip); -+ return name; -+} -+ - /* this function can be pretty expensive (CPU time)?? */ - static struct sensors_monitor * validate_feature_name(const char *name) { - - /* get all sensors from first chip */ - const sensors_chip_name *chip; -- const sensors_feature_data *feat; -- int nr = 0, nr1 = 0, nr2 = 0; -+ const sensors_feature *feat; -+ int nr1 = 0, nr2; -+#if SENSORS_API_VERSION >= 0x400 -+ const sensors_subfeature *sub_feat; -+#endif - struct sensors_monitor *list = monitor_list; - struct sensors_monitor *ret = NULL; - - /* scan the full thing */ -+#if SENSORS_API_VERSION >= 0x400 -+ while ( (chip = sensors_get_detected_chips(NULL, &nr1)) != NULL) { -+ nr2 = 0; -+ while ((feat = sensors_get_features(chip, &nr2)) != NULL) { -+ /* sensor input? */ -+ if((sub_feat = sensors_get_subfeature(chip, feat, feat->type << 8)) == NULL) { -+ clog(LOG_DEBUG, "Input subfeature not found for %s, skipping\n", feat->name); -+ continue; -+ } -+#else - while ( (chip = sensors_get_detected_chips(&nr)) != NULL) { -- nr1 = nr2 = 0; -+ nr1 = nr2 = 0; - char *label = NULL; - clog(LOG_DEBUG, "Examining chip %s(%d)\n", chip->prefix, nr); - while ((feat = sensors_get_all_features(*chip, &nr1, &nr2)) != NULL) { -@@ -164,22 +222,33 @@ - if (sensors_get_label(*chip, feat->number, &label) != 0) - clog(LOG_DEBUG, "Couldn't get label for %s (%s)\n", - feat->name, strerror(errno)); -+ } -+#endif - - /* is it the one we are looking for? */ -- if (strncmp(feat->name, name, MAX_STRING_LEN) != 0 && -- (label && strncmp(label, name, MAX_STRING_LEN) != 0)) { -- free(label); -+ if (strncmp(feat->name, name, MAX_STRING_LEN) != 0) { -+ continue; -+ -+/* libsensors4 does this in sensors_get_features() */ -+#if SENSORS_API_VERSION < 0x400 -+ /* not ignored? */ -+ } else if(sensors_get_ignored(*chip, feat->number) == 0) { -+ clog(LOG_INFO, "feature %s on chip %s set to ignore in %s, skipping\n", -+ feat->name, sensors_get_chip_name(chip), sensors_conffile); - continue; -+#endif - - /* cache it */ - } else if ((ret = calloc(1, sizeof(struct sensors_monitor))) != NULL) { -- clog(LOG_DEBUG, "Creating new sensors_monitor for %s (%s)\n", -- label, feat->name); -+ sensors_snprintf_chip_name(ret->chip_string, MAX_STRING_LEN, chip); -+ clog(LOG_DEBUG, "Creating new sensors_monitor for %s on chip %s\n", -+ name, ret->chip_string); - ret->chip = chip; - ret->feat = feat; -+#if SENSORS_API_VERSION >= 0x400 -+ ret->sub_feat = sub_feat; -+#endif - ret->next = NULL; -- /* free the label here, we are not using it anymore */ -- free(label); - /* append monitor to the cache list */ - list = monitor_list; - if (list != NULL) { -@@ -214,7 +283,7 @@ - clog(LOG_DEBUG, "called with %s\n", ev); - - /* try to parse the %[a-zA-Z0-9]:%d-%d format first */ -- if (sscanf(ev, "%32[^:]:%lf-%lf", ret->name, &ret->min, &ret->max) == 3) { -+ if (sscanf(ev, "%32[a-zA-Z0-9]:%lf-%lf", ret->name, &ret->min, &ret->max) == 3) { - /* validate feature name */ - if ((ret->monitor = validate_feature_name(ret->name)) != NULL) { - clog(LOG_INFO, "parsed %s %.3f-%.3f\n", ret->name, ret->min, ret->max); diff --git a/sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3.patch b/sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3.patch deleted file mode 100644 index e15b0bbee37a..000000000000 --- a/sys-power/cpufreqd/files/cpufreqd-2.3.4-lm_sensors-3.patch +++ /dev/null @@ -1,156 +0,0 @@ ---- src/cpufreqd_sensors.c.orig 2009-03-21 12:17:15.000000000 +0100 -+++ src/cpufreqd_sensors.c 2009-08-14 14:39:52.894513594 +0200 -@@ -23,10 +23,22 @@ - #include - #include "cpufreqd_plugin.h" - -+#if !defined __GNUC__ || __GNUC__ < 3 -+#define __attribute__(x) -+#endif -+ -+#if SENSORS_API_VERSION < 0x400 -+typedef sensors_feature_data sensors_feature; -+#endif -+ - /* to hold monitored feature list and avoid reading all sensors */ - struct sensors_monitor { - const sensors_chip_name *chip; -- const sensors_feature_data *feat; -+ char chip_string[MAX_STRING_LEN]; -+ const sensors_feature *feat; -+#if SENSORS_API_VERSION >= 0x400 -+ const sensors_subfeature *sub_feat; -+#endif - double value; - struct sensors_monitor *next; - }; -@@ -133,27 +145,74 @@ - struct sensors_monitor *list = monitor_list; - - while (list) { -- sensors_get_feature(*(list->chip), list->feat->number, &list->value); -- clog(LOG_INFO, "%s: %.3f\n", list->feat->name, list->value); -+#if SENSORS_API_VERSION >= 0x400 -+ if(sensors_get_value(list->chip, list->sub_feat->number, &list->value) < 0) { -+#else -+ if(sensors_get_feature(*(list->chip), list->feat->number, &list->value) < 0) { -+#endif -+ clog(LOG_ERR,"could not read value for %s\n",list->feat->name); -+ return -1; -+ } -+ clog(LOG_INFO, "%s:%s: %.3f\n", list->chip_string, list->feat->name, list->value); - list = list->next; - } - - return 0; - } - -+ -+#if SENSORS_API_VERSION < 0x400 -+/* Adapted from lm-sensors 2.10.8 prog/sensors/main.c */ -+static int sensors_snprintf_chip_name(char *str, size_t size, -+ const sensors_chip_name *chip) -+{ -+ switch(chip->bus) { -+ case SENSORS_CHIP_NAME_BUS_ISA: -+ return snprintf(str,size,"%s-isa-%04x",chip->prefix,chip->addr); -+ case SENSORS_CHIP_NAME_BUS_PCI: -+ return snprintf(str,size,"%s-pci-%04x",chip->prefix,chip->addr); -+ case SENSORS_CHIP_NAME_BUS_DUMMY: -+ return snprintf(str,size,"%s-%s-%04x",chip->prefix,chip->busname,chip->addr); -+ default: -+ return snprintf(str,size,"%s-i2c-%d-%02x",chip->prefix,chip->bus,chip->addr); -+ } -+} -+#endif -+ -+__attribute__((unused)) static const char* sensors_get_chip_name(const sensors_chip_name *chip); -+static const char* sensors_get_chip_name(const sensors_chip_name *chip) { -+ static char name[MAX_STRING_LEN]; -+ sensors_snprintf_chip_name(name, MAX_STRING_LEN, chip); -+ return name; -+} -+ - /* this function can be pretty expensive (CPU time)?? */ - static struct sensors_monitor * validate_feature_name(const char *name) { - - /* get all sensors from first chip */ - const sensors_chip_name *chip; -- const sensors_feature_data *feat; -- int nr = 0, nr1 = 0, nr2 = 0; -+ const sensors_feature *feat; -+ int nr = 0; -+#if SENSORS_API_VERSION >= 0x400 -+ const sensors_subfeature *sub_feat; -+#else -+ int nr1 = 0, nr2 = 0; -+#endif - struct sensors_monitor *list = monitor_list; - struct sensors_monitor *ret = NULL; - - /* scan the full thing */ -+#if SENSORS_API_VERSION >= 0x400 -+ while ( (chip = sensors_get_detected_chips(NULL, &nr)) != NULL) { -+ while ((feat = sensors_get_features(chip, &nr)) != NULL) { -+ /* sensor input? */ -+ if((sub_feat = sensors_get_subfeature(chip, feat, feat->type << 8)) == NULL) { -+ clog(LOG_DEBUG, "Input subfeature not found for %s, skipping\n", feat->name); -+ continue; -+ } -+#else - while ( (chip = sensors_get_detected_chips(&nr)) != NULL) { -- nr1 = nr2 = 0; -+ nr1 = nr2 = 0; - char *label = NULL; - clog(LOG_DEBUG, "Examining chip %s(%d)\n", chip->prefix, nr); - while ((feat = sensors_get_all_features(*chip, &nr1, &nr2)) != NULL) { -@@ -164,22 +223,33 @@ - if (sensors_get_label(*chip, feat->number, &label) != 0) - clog(LOG_DEBUG, "Couldn't get label for %s (%s)\n", - feat->name, strerror(errno)); -+ } -+#endif - - /* is it the one we are looking for? */ -- if (strncmp(feat->name, name, MAX_STRING_LEN) != 0 && -- (label && strncmp(label, name, MAX_STRING_LEN) != 0)) { -- free(label); -+ if (strncmp(feat->name, name, MAX_STRING_LEN) != 0) { -+ continue; -+ -+/* libsensors4 does this in sensors_get_features() */ -+#if SENSORS_API_VERSION < 0x400 -+ /* not ignored? */ -+ } else if(sensors_get_ignored(*chip, feat->number) == 0) { -+ clog(LOG_INFO, "feature %s on chip %s set to ignore in %s, skipping\n", -+ feat->name, sensors_get_chip_name(chip), sensors_conffile); - continue; -+#endif - - /* cache it */ - } else if ((ret = calloc(1, sizeof(struct sensors_monitor))) != NULL) { -- clog(LOG_DEBUG, "Creating new sensors_monitor for %s (%s)\n", -- label, feat->name); -+ sensors_snprintf_chip_name(ret->chip_string, MAX_STRING_LEN, chip); -+ clog(LOG_DEBUG, "Creating new sensors_monitor for %s on chip %s\n", -+ name, ret->chip_string); - ret->chip = chip; - ret->feat = feat; -+#if SENSORS_API_VERSION >= 0x400 -+ ret->sub_feat = sub_feat; -+#endif - ret->next = NULL; -- /* free the label here, we are not using it anymore */ -- free(label); - /* append monitor to the cache list */ - list = monitor_list; - if (list != NULL) { -@@ -214,7 +284,7 @@ - clog(LOG_DEBUG, "called with %s\n", ev); - - /* try to parse the %[a-zA-Z0-9]:%d-%d format first */ -- if (sscanf(ev, "%32[^:]:%lf-%lf", ret->name, &ret->min, &ret->max) == 3) { -+ if (sscanf(ev, "%32[a-zA-Z0-9]:%lf-%lf", ret->name, &ret->min, &ret->max) == 3) { - /* validate feature name */ - if ((ret->monitor = validate_feature_name(ret->name)) != NULL) { - clog(LOG_INFO, "parsed %s %.3f-%.3f\n", ret->name, ret->min, ret->max); diff --git a/sys-power/cpufreqd/files/nvclock0.8b-fd.patch b/sys-power/cpufreqd/files/nvclock0.8b-fd.patch deleted file mode 100644 index 8925816e7e89..000000000000 --- a/sys-power/cpufreqd/files/nvclock0.8b-fd.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urp nvclock0.8b/src/backend/back_linux.c nvclock0.8b-fd/src/backend/back_linux.c ---- nvclock0.8b/src/backend/back_linux.c 2005-08-29 13:44:56.000000000 +0200 -+++ nvclock0.8b-fd/src/backend/back_linux.c 2005-10-17 01:03:09.000000000 +0200 -@@ -260,6 +260,8 @@ int map_mem(const char *dev_name) - nv_card.PCIO = map_dev_mem(fd, nv_card.reg_address + 0x601000, 0x2000); - nv_card.PRAMDAC = map_dev_mem(fd, nv_card.reg_address + 0x680000, 0x2000); - nv_card.PROM = map_dev_mem(fd, nv_card.reg_address + 0x300000, 0xffff); -+ -+ close(fd); - - return 1; - } diff --git a/sys-power/cpufreqd/files/nvclock0.8b2-fpic.patch b/sys-power/cpufreqd/files/nvclock0.8b2-fpic.patch deleted file mode 100644 index ab926f6c8dc4..000000000000 --- a/sys-power/cpufreqd/files/nvclock0.8b2-fpic.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: nvclock0.8b2/src/backend/Makefile.in -=================================================================== ---- nvclock0.8b2.orig/src/backend/Makefile.in -+++ nvclock0.8b2/src/backend/Makefile.in -@@ -5,7 +5,7 @@ RANLIB=@RANLIB@ - system=@system@ - HAVE_NVCONTROL=@HAVE_NVCONTROL@ - OBJECTS=backend.o bios.o config.o error.o nv30.o nv31.o nv40.o info.o overclock.o i2c.o xf86i2c.o adt7473.o f75375.o lm99.o w83781d.o w83l785r.o libc_wrapper.o --CFLAGS=@X11_CFLAGS@ -I../.. -I../nvcontrol -+CFLAGS=@X11_CFLAGS@ -I../.. -I../nvcontrol -fPIC - - ifeq ($(system), FreeBSD) - OBJECTS+=back_bsd.o -@@ -36,4 +36,4 @@ distclean: clean - rm -f Makefile - - install: --uninstall: -\ No newline at end of file -+uninstall: -- cgit v1.2.3-65-gdbad