diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-10-21 21:20:59 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-10-21 21:20:59 +0000 |
commit | 0277ea238575c335db1742772d5af767b753e9b1 (patch) | |
tree | 2b4497abbe0fc52ec67b8a79467729b345bc2bf7 | |
parent | fixing HOMEPAGE (upstream apparently moved to trac) (hopefully not stepping o... (diff) | |
download | gentoo-2-0277ea238575c335db1742772d5af767b753e9b1.tar.gz gentoo-2-0277ea238575c335db1742772d5af767b753e9b1.tar.bz2 gentoo-2-0277ea238575c335db1742772d5af767b753e9b1.zip |
Fix building against uClibc #205576 by Jos van der Ende. Fix init.d scripts to work properly #243008 by konsti / Rene Meier. Make sure we respect LDFLAGS.
(Portage version: 2.2_rc12/cvs/Linux 2.6.26.2 x86_64)
-rw-r--r-- | sys-power/cpufrequtils/ChangeLog | 11 | ||||
-rw-r--r-- | sys-power/cpufrequtils/cpufrequtils-005-r1.ebuild | 48 | ||||
-rw-r--r-- | sys-power/cpufrequtils/files/cpufrequtils-005-build.patch | 24 | ||||
-rw-r--r-- | sys-power/cpufrequtils/files/cpufrequtils-005-nls.patch | 73 | ||||
-rw-r--r-- | sys-power/cpufrequtils/files/cpufrequtils-init.d-005 | 24 |
5 files changed, 170 insertions, 10 deletions
diff --git a/sys-power/cpufrequtils/ChangeLog b/sys-power/cpufrequtils/ChangeLog index 16c35a0965ce..127491469b1c 100644 --- a/sys-power/cpufrequtils/ChangeLog +++ b/sys-power/cpufrequtils/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sys-power/cpufrequtils # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/ChangeLog,v 1.40 2008/10/20 16:05:14 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/ChangeLog,v 1.41 2008/10/21 21:20:59 vapier Exp $ + +*cpufrequtils-005-r1 (21 Oct 2008) + + 21 Oct 2008; Mike Frysinger <vapier@gentoo.org> + files/cpufrequtils-init.d-005, +files/cpufrequtils-005-build.patch, + +files/cpufrequtils-005-nls.patch, +cpufrequtils-005-r1.ebuild: + Fix building against uClibc #205576 by Jos van der Ende. Fix init.d + scripts to work properly #243008 by konsti / Rene Meier. Make sure we + respect LDFLAGS. *cpufrequtils-005 (20 Oct 2008) diff --git a/sys-power/cpufrequtils/cpufrequtils-005-r1.ebuild b/sys-power/cpufrequtils/cpufrequtils-005-r1.ebuild new file mode 100644 index 000000000000..f4bb3d573d8f --- /dev/null +++ b/sys-power/cpufrequtils/cpufrequtils-005-r1.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/cpufrequtils-005-r1.ebuild,v 1.1 2008/10/21 21:20:59 vapier Exp $ + +inherit eutils toolchain-funcs multilib + +DESCRIPTION="Userspace utilities for the Linux kernel cpufreq subsystem" +HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html" +SRC_URI="mirror://kernel/linux/utils/kernel/cpufreq/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" +IUSE="debug nls" + +DEPEND="sys-fs/sysfsutils" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-build.patch + epatch "${FILESDIR}"/${P}-nls.patch #205576 +} + +ft() { use $1 && echo true || echo false ; } + +src_compile() { + emake \ + OPTIMIZATION= V=true \ + DEBUG=$(ft debug) \ + NLS=$(ft nls) \ + CC=$(tc-getCC) LD=$(tc-getCC) AR=$(tc-getAR) STRIP=echo RANLIB=$(tc-getRANLIB) \ + || die "emake failed" +} + +src_install() { + emake \ + DESTDIR="${D}" \ + NLS=$(ft nls) \ + mandir=/usr/share/man \ + libdir=/usr/$(get_libdir) \ + install || die "make install failed" + + newconfd "${FILESDIR}"/${PN}-conf.d-005 ${PN} + newinitd "${FILESDIR}"/${PN}-init.d-005 ${PN} + + dodoc AUTHORS README +} diff --git a/sys-power/cpufrequtils/files/cpufrequtils-005-build.patch b/sys-power/cpufrequtils/files/cpufrequtils-005-build.patch new file mode 100644 index 000000000000..e6b8ce8f2530 --- /dev/null +++ b/sys-power/cpufrequtils/files/cpufrequtils-005-build.patch @@ -0,0 +1,24 @@ +--- Makefile ++++ Makefile +@@ -158,10 +158,10 @@ endif + + # if DEBUG is enabled, then we do not strip or optimize + ifeq ($(strip $(DEBUG)),true) +- CFLAGDEF += -O1 -g -DDEBUG ++ CFLAGDEF += -DDEBUG + STRIPCMD = /bin/true -Since_we_are_debugging + else +- CFLAGDEF += $(OPTIMIZATION) -fomit-frame-pointer ++ CFLAGDEF += $(OPTIMIZATION) + STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment + endif + +@@ -191,7 +191,7 @@ libcpufreq: libcpufreq.la + + cpufreq-%: libcpufreq.la $(UTIL_OBJS) + $(QUIET) $(CC) $(CFLAGDEF) $(CFLAGS) -g -I. -I./lib/ -c -o utils/$@.o utils/$*.c +- $(QUIET) $(CC) $(CFLAGDEF) $(CFLAGS) -g -I./lib/ -L. -L./.libs/ -lcpufreq -o $@ utils/$@.o ++ $(QUIET) $(CC) $(CFLAGDEF) $(CFLAGS) -g $(LDFLAGS) -I./lib/ -L. -L./.libs/ -o $@ utils/$@.o -lcpufreq + $(QUIET) $(STRIPCMD) $@ + + utils: cpufreq-info cpufreq-set diff --git a/sys-power/cpufrequtils/files/cpufrequtils-005-nls.patch b/sys-power/cpufrequtils/files/cpufrequtils-005-nls.patch new file mode 100644 index 000000000000..7a0336fff4cf --- /dev/null +++ b/sys-power/cpufrequtils/files/cpufrequtils-005-nls.patch @@ -0,0 +1,73 @@ +make nls/gettext support optional + +patch by Jos van der Ende <seraph@xs4all.nl> + +http://bugs.gentoo.org/205576 + +--- cpufrequtils-005/Makefile ++++ cpufrequtils-005/Makefile +@@ -141,6 +141,7 @@ + ifeq ($(strip $(NLS)),true) + INSTALL_NLS += install-gmo + COMPILE_NLS += update-gmo ++ CFLAGDEF += -DNLS + endif + + +--- cpufrequtils-005/utils/info.c ++++ cpufrequtils-005/utils/info.c +@@ -10,7 +10,6 @@ + #include <errno.h> + #include <stdlib.h> + #include <string.h> +-#include <libintl.h> + #include <locale.h> + + #include <getopt.h> +@@ -18,9 +17,18 @@ + #include "cpufreq.h" + + ++#ifdef NLS ++#include <libintl.h> + #define _(String) gettext (String) + #define gettext_noop(String) String + #define N_(String) gettext_noop (String) ++#else ++#define gettext_noop(String) String ++#define _(String) gettext_noop (String) ++#define gettext(String) gettext_noop (String) ++#define N_(String) gettext_noop (String) ++#define textdomain(String) ++#endif + + #define LINE_LEN 10 + +--- cpufrequtils-005/utils/set.c ++++ cpufrequtils-005/utils/set.c +@@ -12,16 +12,24 @@ + #include <limits.h> + #include <string.h> + #include <ctype.h> +-#include <libintl.h> + #include <locale.h> + + #include <getopt.h> + + #include "cpufreq.h" + ++#ifdef NLS ++#include <libintl.h> + #define _(String) gettext (String) + #define gettext_noop(String) String + #define N_(String) gettext_noop (String) ++#else ++#define gettext_noop(String) String ++#define _(String) gettext_noop (String) ++#define gettext(String) gettext_noop (String) ++#define N_(String) gettext_noop (String) ++#define textdomain(String) ++#endif + + #define NORM_FREQ_LEN 32 + diff --git a/sys-power/cpufrequtils/files/cpufrequtils-init.d-005 b/sys-power/cpufrequtils/files/cpufrequtils-init.d-005 index 0e910b3f3401..9aadd94c10b9 100644 --- a/sys-power/cpufrequtils/files/cpufrequtils-init.d-005 +++ b/sys-power/cpufrequtils/files/cpufrequtils-init.d-005 @@ -1,16 +1,22 @@ #!/sbin/runscript -# Copyright 1999-2006 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/files/cpufrequtils-init.d-005,v 1.1 2008/10/20 16:05:14 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/cpufrequtils/files/cpufrequtils-init.d-005,v 1.2 2008/10/21 21:20:59 vapier Exp $ -start() { - ebegin "Running cpufreq-set ${START_OPTS}" - cpufreq-set ${START_OPTS} - eend $? +affect_change() { + local c ret=0 + ebegin "Running cpufreq-set $*" + for c in $(cpufreq-info -o | awk '$1 == "CPU" { print $2 }') ; do + cpufreq-set -c ${c} $* + : $((ret+=$?)) + done + eend ${ret} } start() { - ebegin "Running cpufreq-set ${START_OPTS}" - cpufreq-set ${STOP_OPTS} - eend $? + affect_change ${START_OPTS} +} + +stop() { + affect_change ${STOP_OPTS} } |