summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-01-21 19:52:27 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-01-21 19:52:27 +0100
commit7a9b6f15bf7d8cac6aa467f8a3ff3f6fa4220308 (patch)
treee7401ca9ca2caccf58394b82363f5f4d1f160937
parenta71b627950f6c8cb34f39883df76fa91e9a49758 (diff)
rewrite Makefile, remove NLS support
Rewrite Makefile to not use libtool. Normally upstream should deliver a libtool. Newer versions of libtool does not allow to simply use libtool to build libraries without using automake and autoconf. My Makefile rewrite is hackish, but at least I get a library and binaries.
-rw-r--r--package/cpufrequtils/Makefile21
-rw-r--r--package/cpufrequtils/patches/patch-Makefile140
-rw-r--r--package/cpufrequtils/patches/patch-utils_info_c244
-rw-r--r--package/cpufrequtils/patches/patch-utils_set_c118
4 files changed, 501 insertions, 22 deletions
diff --git a/package/cpufrequtils/Makefile b/package/cpufrequtils/Makefile
index 63aeb0be6..0e4d22450 100644
--- a/package/cpufrequtils/Makefile
+++ b/package/cpufrequtils/Makefile
@@ -9,30 +9,25 @@ PKG_RELEASE:= 1
PKG_MD5SUM:= 40271a1e1eadce31457e9891cdb071f1
PKG_DESCR:= Userspace utilities for the Linux kernel cpufreq subsystem
PKG_SECTION:= utils
-PKG_DEPENDS:= @add dependendant package names@
PKG_URL:= http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html
PKG_SITES:= http://www.kernel.org/pub/linux/utils/kernel/cpufreq/
-# if downloaded package is not ending with .tar.gz use following
-#DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
-
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,CPUFREQUTILS,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-# use following to add ./configure options
-#CONFIGURE_ARGS+= --disable-foo
-# overwrite any configure variables
-#CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes
BUILD_STYLE:= auto
INSTALL_STYLE:= auto
-MAKE_FLAGS+= V=true CROSS=${TARGET_CROSS} LIBTOOL_OPT="--tag CC"
-
-#FIXME: libtool does crap when installing stuff (appends i to the .la file and wonders afterwards why it doesn't exist)
+MAKE_FLAGS+= CROSS=${TARGET_CROSS}
-# please install all files and directories to the package dir
post-install:
+ $(INSTALL_DIR) $(IDIR_CPUFREQUTILS)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/libcpufreq.so* \
+ $(IDIR_CPUFREQUTILS)/usr/lib
$(INSTALL_DIR) $(IDIR_CPUFREQUTILS)/usr/bin
- $(INSTALL_BIN) $(WRKINST)/usr/bin/cpufrequtils $(IDIR_CPUFREQUTILS)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/cpufreq-set \
+ $(IDIR_CPUFREQUTILS)/usr/bin
+ $(INSTALL_BIN) $(WRKINST)/usr/bin/cpufreq-info \
+ $(IDIR_CPUFREQUTILS)/usr/bin
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/cpufrequtils/patches/patch-Makefile b/package/cpufrequtils/patches/patch-Makefile
index aa8bba6d3..3a1e0dba9 100644
--- a/package/cpufrequtils/patches/patch-Makefile
+++ b/package/cpufrequtils/patches/patch-Makefile
@@ -1,8 +1,75 @@
- allow passing libtool options via environment variables
- drop hard-coded -rpath flag when linking with libtool (distracts tagged configs)
---- cpufrequtils-007.orig/Makefile 2010-01-16 14:47:44.000000000 +0100
-+++ cpufrequtils-007/Makefile 2010-01-20 14:09:02.171177883 +0100
-@@ -147,11 +147,11 @@ CFLAGS += $(WARNINGS)
+--- cpufrequtils-007.orig/Makefile Sat Jan 16 14:47:44 2010
++++ cpufrequtils-007/Makefile Thu Jan 21 19:05:16 2010
+@@ -27,11 +27,11 @@
+ DEBUG ?= false
+
+ # make the build silent. Set this to something else to make it noisy again.
+-V ?= false
++V ?= true
+
+ # Internationalization support (output in different languages).
+ # Requires gettext.
+-NLS ?= true
++NLS ?= false
+
+ # Set the following to 'true' to build/install the
+ # cpufreq-bench benchmarking tool
+@@ -42,7 +42,7 @@ CPUFRQ_BENCH ?= false
+ SYSFS ?= true
+
+ # Use the proc-based interface which is used in the 2.4 patch for cpufreq
+-PROC ?= true
++PROC ?= false
+
+ # Prefix to the directories we're installing to
+ DESTDIR ?=
+@@ -55,7 +55,7 @@ DESTDIR ?=
+ # and _should_ modify the PACKAGE_BUGREPORT definition
+
+ VERSION = 007
+-LIB_VERSION = 0:0:0
++LIB_VERSION = 0.0.0
+ PACKAGE = cpufrequtils
+ PACKAGE_BUGREPORT = cpufreq@vger.kernel.org
+ LANGUAGES = de fr it cs pt
+@@ -80,7 +80,6 @@ INSTALL = /usr/bin/install -c
+ INSTALL_PROGRAM = ${INSTALL}
+ INSTALL_DATA = ${INSTALL} -m 644
+ INSTALL_SCRIPT = ${INSTALL_PROGRAM}
+-LIBTOOL = /usr/bin/libtool
+
+ # If you are running a cross compiler, you may want to set this
+ # to something more interesting, like "arm-linux-". If you want
+@@ -113,23 +112,18 @@ WARNINGS += $(call cc-supports,-Wno-pointer-sign)
+ WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
+ WARNINGS += -Wshadow
+
+-CPPFLAGS += -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
++CPPFLAGS += -I./lib -DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PACKAGE)\" \
+ -DPACKAGE_BUGREPORT=\"$(PACKAGE_BUGREPORT)\" -D_GNU_SOURCE
+
+-UTIL_OBJS = utils/info.c utils/set.c
++UTIL_OBJS = utils/info.o utils/set.o
+ LIB_HEADERS = lib/cpufreq.h lib/interfaces.h
+-LIB_OBJS = lib/cpufreq.c lib/proc.c lib/sysfs.c
+-LIB_PARTS = lib/cpufreq.lo
++LIB_OBJS = lib/cpufreq.o lib/sysfs.o
+
+-CFLAGS += -pipe
+-
+ ifeq ($(strip $(PROC)),true)
+- LIB_PARTS += lib/proc.lo
+ CPPFLAGS += -DINTERFACE_PROC
+ endif
+
+ ifeq ($(strip $(SYSFS)),true)
+- LIB_PARTS += lib/sysfs.lo
+ CPPFLAGS += -DINTERFACE_SYSFS
+ endif
+
+@@ -147,11 +141,11 @@ CFLAGS += $(WARNINGS)
ifeq ($(strip $(V)),false)
QUIET=@$(PWD)/build/ccdv
@@ -16,23 +83,78 @@
HOST_PROGS=
endif
-@@ -185,8 +185,8 @@ libcpufreq.la: $(LIB_OBJS) $(LIB_HEADERS
+@@ -175,27 +169,36 @@ all: ccdv libcpufreq utils $(COMPILE_NLS) $(COMPILE_BE
+ ccdv: build/ccdv
+ build/ccdv: build/ccdv.c
+ @echo "Building ccdv"
+- @$(HOSTCC) -O1 -O1 $< -o $@
++ $(HOSTCC) -O1 $< -o $@
+
+-%.lo: $(LIB_OBJS) $(LIB_HEADERS) ccdv
+- $(QUIET) $(LIBTOOL) $(LIBTOOL_OPT) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $*.c
++lib/cpufreq.o: $(LIB_HEADERS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c lib/cpufreq.c
+
+-libcpufreq.la: $(LIB_OBJS) $(LIB_HEADERS) $(LIB_PARTS) Makefile
++lib/sysfs.o: $(LIB_HEADERS)
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c lib/sysfs.c
++
++utils/info.o:
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o utils/cpufreq-info.o -c utils/info.c
++
++utils/set.o:
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o utils/cpufreq-set.o -c utils/set.c
++
++libcpufreq.so: $(LIB_OBJS)
+ @if [ $(strip $(SYSFS)) != true -a $(strip $(PROC)) != true ]; then \
echo '*** At least one of /sys support or /proc support MUST be enabled ***'; \
exit -1; \
fi;
- $(QUIET) $(LIBTOOL) $(LIBTOOL_OPT) --mode=link $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o libcpufreq.la -rpath \
- ${libdir} -version-info $(LIB_VERSION) $(LIB_PARTS)
-+ $(QUIET) $(LIBTOOL) $(LIBTOOL_OPT) --mode=link $(CC) $(CPPFLAGS) $(CFLAGS) -rpath ${libdir} $(LDFLAGS) -o libcpufreq.la \
-+ -version-info $(LIB_VERSION) $(LIB_PARTS)
++ $(CC) -shared $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o libcpufreq.so.${LIB_VERSION} \
++ -Wl,-soname,libcpufreq.so $(LIB_OBJS)
++ ln -s libcpufreq.so.${LIB_VERSION} $@
++ ln -s libcpufreq.so.${LIB_VERSION} $@.0
+
+-libcpufreq: libcpufreq.la
++libcpufreq: libcpufreq.so
+
+-cpufreq-%: libcpufreq.la $(UTIL_OBJS)
+- $(QUIET) $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I./lib/ -c -o utils/$@.o utils/$*.c
+- $(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) -L. -L./.libs/ -o $@ utils/$@.o -lcpufreq
+- $(QUIET) $(STRIPCMD) $@
++cpufreq-%: libcpufreq.so $(UTIL_OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -L. -L./ -o $@ utils/$@.o -lcpufreq
- libcpufreq: libcpufreq.la
+-utils: cpufreq-info cpufreq-set cpufreq-aperf
++utils: cpufreq-info cpufreq-set
-@@ -232,7 +232,7 @@ clean:
+ po/$(PACKAGE).pot: $(UTIL_OBJS)
+ @xgettext --default-domain=$(PACKAGE) --add-comments \
+@@ -232,7 +235,7 @@ clean:
install-lib:
$(INSTALL) -d $(DESTDIR)${libdir}
- $(LIBTOOL) --mode=install $(INSTALL) libcpufreq.la $(DESTDIR)${libdir}/libcpufreq.la
-+ sh -x $(LIBTOOL) --mode=install $(INSTALL) libcpufreq.la $(DESTDIR)${libdir}/libcpufreq.la
++ $(INSTALL) libcpufreq.so $(DESTDIR)${libdir}/libcpufreq.so
$(INSTALL) -d $(DESTDIR)${includedir}
$(INSTALL_DATA) lib/cpufreq.h $(DESTDIR)${includedir}/cpufreq.h
+@@ -240,7 +243,6 @@ install-tools:
+ $(INSTALL) -d $(DESTDIR)${bindir}
+ $(INSTALL_PROGRAM) cpufreq-set $(DESTDIR)${bindir}/cpufreq-set
+ $(INSTALL_PROGRAM) cpufreq-info $(DESTDIR)${bindir}/cpufreq-info
+- $(INSTALL_PROGRAM) cpufreq-aperf $(DESTDIR)${bindir}/cpufreq-aperf
+
+ install-man:
+ $(INSTALL_DATA) -D man/cpufreq-set.1 $(DESTDIR)${mandir}/man1/cpufreq-set.1
+@@ -257,7 +259,7 @@ install-bench:
+ @#DESTDIR must be set from outside to survive
+ @sbindir=$(sbindir) bindir=$(bindir) docdir=$(docdir) confdir=$(confdir) make -C bench install
+
+-install: install-lib install-tools install-man $(INSTALL_NLS) $(INSTALL_BENCH)
++install: install-lib install-tools $(INSTALL_NLS) $(INSTALL_BENCH)
+
+ uninstall:
+ - rm -f $(DESTDIR)${libdir}/libcpufreq.*
diff --git a/package/cpufrequtils/patches/patch-utils_info_c b/package/cpufrequtils/patches/patch-utils_info_c
new file mode 100644
index 000000000..28c92af1e
--- /dev/null
+++ b/package/cpufrequtils/patches/patch-utils_info_c
@@ -0,0 +1,244 @@
+--- cpufrequtils-007.orig/utils/info.c Sat Jan 16 14:47:44 2010
++++ cpufrequtils-007/utils/info.c Thu Jan 21 18:59:12 2010
+@@ -10,9 +10,6 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <libintl.h>
+-#include <locale.h>
+-
+ #include <getopt.h>
+
+ #include "cpufreq.h"
+@@ -33,7 +30,7 @@ static unsigned int count_cpus(void)
+
+ fp = fopen("/proc/stat", "r");
+ if(!fp) {
+- printf(gettext("Couldn't count the number of CPUs (%s: %s), assuming 1\n"), "/proc/stat", strerror(errno));
++ printf("Couldn't count the number of CPUs (%s: %s), assuming 1\n", "/proc/stat", strerror(errno));
+ return 1;
+ }
+
+@@ -65,7 +62,7 @@ static void proc_cpufreq_output(void)
+ unsigned int max_pctg = 0;
+ unsigned long min, max;
+
+- printf(gettext(" minimum CPU frequency - maximum CPU frequency - governor\n"));
++ printf(" minimum CPU frequency - maximum CPU frequency - governor\n");
+
+ nr_cpus = count_cpus();
+ for (cpu=0; cpu < nr_cpus; cpu++) {
+@@ -153,26 +150,26 @@ static void debug_output_one(unsigned int cpu)
+ struct cpufreq_stats *stats;
+
+ if (cpufreq_cpu_exists(cpu)) {
+- printf(gettext ("couldn't analyze CPU %d as it doesn't seem to be present\n"), cpu);
++ printf("couldn't analyze CPU %d as it doesn't seem to be present\n", cpu);
+ return;
+ }
+
+- printf(gettext ("analyzing CPU %d:\n"), cpu);
++ printf("analyzing CPU %d:\n", cpu);
+
+ freq_kernel = cpufreq_get_freq_kernel(cpu);
+ freq_hardware = cpufreq_get_freq_hardware(cpu);
+
+ driver = cpufreq_get_driver(cpu);
+ if (!driver) {
+- printf(gettext (" no or unknown cpufreq driver is active on this CPU\n"));
++ printf(" no or unknown cpufreq driver is active on this CPU\n");
+ } else {
+- printf(gettext (" driver: %s\n"), driver);
++ printf(" driver: %s\n", driver);
+ cpufreq_put_driver(driver);
+ }
+
+ cpus = cpufreq_get_related_cpus(cpu);
+ if (cpus) {
+- printf(gettext (" CPUs which run at the same hardware frequency: "));
++ printf(" CPUs which run at the same hardware frequency: ");
+ while (cpus->next) {
+ printf("%d ", cpus->cpu);
+ cpus = cpus->next;
+@@ -183,7 +180,7 @@ static void debug_output_one(unsigned int cpu)
+
+ cpus = cpufreq_get_affected_cpus(cpu);
+ if (cpus) {
+- printf(gettext (" CPUs which need to have their frequency coordinated by software: "));
++ printf(" CPUs which need to have their frequency coordinated by software: ");
+ while (cpus->next) {
+ printf("%d ", cpus->cpu);
+ cpus = cpus->next;
+@@ -194,13 +191,13 @@ static void debug_output_one(unsigned int cpu)
+
+ latency = cpufreq_get_transition_latency(cpu);
+ if (latency) {
+- printf(gettext (" maximum transition latency: "));
++ printf(" maximum transition latency: ");
+ print_duration(latency);
+ printf(".\n");
+ }
+
+ if (!(cpufreq_get_hardware_limits(cpu, &min, &max))) {
+- printf(gettext (" hardware limits: "));
++ printf(" hardware limits: ");
+ print_speed(min);
+ printf(" - ");
+ print_speed(max);
+@@ -209,7 +206,7 @@ static void debug_output_one(unsigned int cpu)
+
+ freqs = cpufreq_get_available_frequencies(cpu);
+ if (freqs) {
+- printf(gettext (" available frequency steps: "));
++ printf(" available frequency steps: ");
+ while (freqs->next) {
+ print_speed(freqs->frequency);
+ printf(", ");
+@@ -222,7 +219,7 @@ static void debug_output_one(unsigned int cpu)
+
+ governors = cpufreq_get_available_governors(cpu);
+ if (governors) {
+- printf(gettext (" available cpufreq governors: "));
++ printf(" available cpufreq governors: ");
+ while (governors->next) {
+ printf("%s, ", governors->governor);
+ governors = governors->next;
+@@ -233,23 +230,23 @@ static void debug_output_one(unsigned int cpu)
+
+ policy = cpufreq_get_policy(cpu);
+ if (policy) {
+- printf(gettext (" current policy: frequency should be within "));
++ printf(" current policy: frequency should be within ");
+ print_speed(policy->min);
+- printf(gettext (" and "));
++ printf(" and ");
+ print_speed(policy->max);
+
+ printf(".\n ");
+- printf(gettext ("The governor \"%s\" may"
+- " decide which speed to use\n within this range.\n"),
++ printf("The governor \"%s\" may"
++ " decide which speed to use\n within this range.\n",
+ policy->governor);
+ cpufreq_put_policy(policy);
+ }
+
+ if (freq_kernel || freq_hardware) {
+- printf(gettext (" current CPU frequency is "));
++ printf(" current CPU frequency is ");
+ if (freq_hardware) {
+ print_speed(freq_hardware);
+- printf(gettext (" (asserted by call to hardware)"));
++ printf(" (asserted by call to hardware)");
+ }
+ else
+ print_speed(freq_kernel);
+@@ -257,7 +254,7 @@ static void debug_output_one(unsigned int cpu)
+ }
+ stats = cpufreq_get_stats(cpu, &total_time);
+ if (stats) {
+- printf(gettext (" cpufreq stats: "));
++ printf(" cpufreq stats: ");
+ while (stats) {
+ print_speed(stats->frequency);
+ printf(":%.2f%%", (100.0 * stats->time_in_state) / total_time);
+@@ -437,37 +434,37 @@ static int get_latency(unsigned int cpu, unsigned int
+
+ static void print_header(void) {
+ printf(PACKAGE " " VERSION ": cpufreq-info (C) Dominik Brodowski 2004-2009\n");
+- printf(gettext ("Report errors and bugs to %s, please.\n"), PACKAGE_BUGREPORT);
++ printf("Report errors and bugs to %s, please.\n", PACKAGE_BUGREPORT);
+ }
+
+ static void print_help(void) {
+- printf(gettext ("Usage: cpufreq-info [options]\n"));
+- printf(gettext ("Options:\n"));
+- printf(gettext (" -c CPU, --cpu CPU CPU number which information shall be determined about\n"));
+- printf(gettext (" -e, --debug Prints out debug information\n"));
+- printf(gettext (" -f, --freq Get frequency the CPU currently runs at, according\n"
+- " to the cpufreq core *\n"));
+- printf(gettext (" -w, --hwfreq Get frequency the CPU currently runs at, by reading\n"
+- " it from hardware (only available to root) *\n"));
+- printf(gettext (" -l, --hwlimits Determine the minimum and maximum CPU frequency allowed *\n"));
+- printf(gettext (" -d, --driver Determines the used cpufreq kernel driver *\n"));
+- printf(gettext (" -p, --policy Gets the currently used cpufreq policy *\n"));
+- printf(gettext (" -g, --governors Determines available cpufreq governors *\n"));
+- printf(gettext (" -r, --related-cpus Determines which CPUs run at the same hardware frequency *\n"));
+- printf(gettext (" -a, --affected-cpus Determines which CPUs need to have their frequency\n"
+- " coordinated by software *\n"));
+- printf(gettext (" -s, --stats Shows cpufreq statistics if available\n"));
+- printf(gettext (" -y, --latency Determines the maximum latency on CPU frequency changes *\n"));
+- printf(gettext (" -o, --proc Prints out information like provided by the /proc/cpufreq\n"
+- " interface in 2.4. and early 2.6. kernels\n"));
+- printf(gettext (" -m, --human human-readable output for the -f, -w, -s and -y parameters\n"));
+- printf(gettext (" -h, --help Prints out this screen\n"));
++ printf("Usage: cpufreq-info [options]\n");
++ printf("Options:\n");
++ printf(" -c CPU, --cpu CPU CPU number which information shall be determined about\n");
++ printf(" -e, --debug Prints out debug information\n");
++ printf(" -f, --freq Get frequency the CPU currently runs at, according\n"
++ " to the cpufreq core *\n");
++ printf(" -w, --hwfreq Get frequency the CPU currently runs at, by reading\n"
++ " it from hardware (only available to root) *\n");
++ printf(" -l, --hwlimits Determine the minimum and maximum CPU frequency allowed *\n");
++ printf(" -d, --driver Determines the used cpufreq kernel driver *\n");
++ printf(" -p, --policy Gets the currently used cpufreq policy *\n");
++ printf(" -g, --governors Determines available cpufreq governors *\n");
++ printf(" -r, --related-cpus Determines which CPUs run at the same hardware frequency *\n");
++ printf(" -a, --affected-cpus Determines which CPUs need to have their frequency\n"
++ " coordinated by software *\n");
++ printf(" -s, --stats Shows cpufreq statistics if available\n");
++ printf(" -y, --latency Determines the maximum latency on CPU frequency changes *\n");
++ printf(" -o, --proc Prints out information like provided by the /proc/cpufreq\n"
++ " interface in 2.4. and early 2.6. kernels\n");
++ printf(" -m, --human human-readable output for the -f, -w, -s and -y parameters\n");
++ printf(" -h, --help Prints out this screen\n");
+
+ printf("\n");
+- printf(gettext ("If no argument or only the -c, --cpu parameter is given, debug output about\n"
+- "cpufreq is printed which is useful e.g. for reporting bugs.\n"));
+- printf(gettext ("For the arguments marked with *, omitting the -c or --cpu argument is\n"
+- "equivalent to setting it to zero\n"));
++ printf("If no argument or only the -c, --cpu parameter is given, debug output about\n"
++ "cpufreq is printed which is useful e.g. for reporting bugs.\n");
++ printf("For the arguments marked with *, omitting the -c or --cpu argument is\n"
++ "equivalent to setting it to zero\n");
+ }
+
+ static struct option info_opts[] = {
+@@ -497,9 +494,6 @@ int main(int argc, char **argv) {
+ unsigned int human = 0;
+ int output_param = 0;
+
+- setlocale(LC_ALL, "");
+- textdomain (PACKAGE);
+-
+ do {
+ ret = getopt_long(argc, argv, "c:hoefwldpgrasmy", info_opts, NULL);
+ switch (ret) {
+@@ -560,7 +554,7 @@ int main(int argc, char **argv) {
+ case 'o':
+ if (cpu_defined) {
+ print_header();
+- printf(gettext ("The argument passed to this tool can't be combined with passing a --cpu argument\n"));
++ printf("The argument passed to this tool can't be combined with passing a --cpu argument\n");
+ return -EINVAL;
+ }
+ break;
+@@ -573,13 +567,13 @@ int main(int argc, char **argv) {
+ switch (output_param) {
+ case -1:
+ print_header();
+- printf(gettext ("You can't specify more than one --cpu parameter and/or\n"
+- "more than one output-specific argument\n"));
++ printf("You can't specify more than one --cpu parameter and/or\n"
++ "more than one output-specific argument\n");
+ return -EINVAL;
+ break;
+ case '?':
+ print_header();
+- printf(gettext ("invalid or unknown argument\n"));
++ printf("invalid or unknown argument\n");
+ print_help();
+ ret = -EINVAL;
+ break;
diff --git a/package/cpufrequtils/patches/patch-utils_set_c b/package/cpufrequtils/patches/patch-utils_set_c
new file mode 100644
index 000000000..18561004c
--- /dev/null
+++ b/package/cpufrequtils/patches/patch-utils_set_c
@@ -0,0 +1,118 @@
+--- cpufrequtils-007.orig/utils/set.c Sat Jan 16 14:47:44 2010
++++ cpufrequtils-007/utils/set.c Thu Jan 21 19:01:22 2010
+@@ -12,9 +12,6 @@
+ #include <limits.h>
+ #include <string.h>
+ #include <ctype.h>
+-#include <libintl.h>
+-#include <locale.h>
+-
+ #include <getopt.h>
+
+ #include "cpufreq.h"
+@@ -28,29 +25,29 @@
+ static void print_header(void)
+ {
+ printf(PACKAGE " " VERSION ": cpufreq-set (C) Dominik Brodowski 2004-2009\n");
+- printf(gettext("Report errors and bugs to %s, please.\n"), PACKAGE_BUGREPORT);
++ printf("Report errors and bugs to %s, please.\n", PACKAGE_BUGREPORT);
+ }
+
+ static void print_help(void)
+ {
+- printf(gettext("Usage: cpufreq-set [options]\n"));
+- printf(gettext("Options:\n"));
+- printf(gettext(" -c CPU, --cpu CPU number of CPU where cpufreq settings shall be modified\n"));
+- printf(gettext(" -d FREQ, --min FREQ new minimum CPU frequency the governor may select\n"));
+- printf(gettext(" -u FREQ, --max FREQ new maximum CPU frequency the governor may select\n"));
+- printf(gettext(" -g GOV, --governor GOV new cpufreq governor\n"));
+- printf(gettext(" -f FREQ, --freq FREQ specific frequency to be set. Requires userspace\n"
+- " governor to be available and loaded\n"));
+- printf(gettext(" -r, --related Switches all hardware-related CPUs\n"));
+- printf(gettext(" -h, --help Prints out this screen\n"));
++ printf("Usage: cpufreq-set [options]\n");
++ printf("Options:\n");
++ printf(" -c CPU, --cpu CPU number of CPU where cpufreq settings shall be modified\n");
++ printf(" -d FREQ, --min FREQ new minimum CPU frequency the governor may select\n");
++ printf(" -u FREQ, --max FREQ new maximum CPU frequency the governor may select\n");
++ printf(" -g GOV, --governor GOV new cpufreq governor\n");
++ printf(" -f FREQ, --freq FREQ specific frequency to be set. Requires userspace\n"
++ " governor to be available and loaded\n");
++ printf(" -r, --related Switches all hardware-related CPUs\n");
++ printf(" -h, --help Prints out this screen\n");
+ printf("\n");
+- printf(gettext("Notes:\n"
++ printf("Notes:\n"
+ "1. Omitting the -c or --cpu argument is equivalent to setting it to zero\n"
+ "2. The -f FREQ, --freq FREQ parameter cannot be combined with any other parameter\n"
+ " except the -c CPU, --cpu CPU parameter\n"
+ "3. FREQuencies can be passed in Hz, kHz (default), MHz, GHz, or THz\n"
+ " by postfixing the value with the wanted unit name, without any space\n"
+- " (FREQuency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000).\n"));
++ " (FREQuency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000).\n");
+
+ }
+
+@@ -66,13 +63,13 @@ static struct option set_opts[] = {
+
+ static void print_error(void)
+ {
+- printf(gettext("Error setting new values. Common errors:\n"
++ printf("Error setting new values. Common errors:\n"
+ "- Do you have proper administration rights? (super-user?)\n"
+ "- Is the governor you requested available and modprobed?\n"
+ "- Trying to set an invalid policy?\n"
+ "- Trying to set a specific frequency, but userspace governor is not available,\n"
+ " for example because of hardware which cannot be set to a specific frequency\n"
+- " or because the userspace governor isn't loaded?\n"));
++ " or because the userspace governor isn't loaded?\n");
+ };
+
+ struct freq_units {
+@@ -92,7 +89,7 @@ const struct freq_units def_units[] = {
+ static void print_unknown_arg(void)
+ {
+ print_header();
+- printf(gettext("invalid or unknown argument\n"));
++ printf("invalid or unknown argument\n");
+ print_help();
+ }
+
+@@ -180,7 +177,7 @@ static int do_new_policy(unsigned int cpu, struct cpuf
+ int ret;
+
+ if (!cur_pol) {
+- printf(gettext("wrong, unknown or unhandled CPU?\n"));
++ printf("wrong, unknown or unhandled CPU?\n");
+ return -EINVAL;
+ }
+
+@@ -248,9 +245,6 @@ int main(int argc, char **argv)
+ };
+ struct cpufreq_affected_cpus *cpus = NULL;
+
+- setlocale(LC_ALL, "");
+- textdomain (PACKAGE);
+-
+ /* parameter parsing */
+ do {
+ ret = getopt_long(argc, argv, "c:d:u:g:f:hr", set_opts, NULL);
+@@ -333,14 +327,14 @@ int main(int argc, char **argv)
+ }
+
+ if (freq && policychange) {
+- printf(gettext("the -f/--freq parameter cannot be combined with -d/--min, -u/--max or\n"
+- "-g/--governor parameters\n"));
++ printf("the -f/--freq parameter cannot be combined with -d/--min, -u/--max or\n"
++ "-g/--governor parameters\n");
+ return -EINVAL;
+ }
+
+ if (!freq && !policychange) {
+- printf(gettext("At least one parameter out of -f/--freq, -d/--min, -u/--max, and\n"
+- "-g/--governor must be passed\n"));
++ printf("At least one parameter out of -f/--freq, -d/--min, -u/--max, and\n"
++ "-g/--governor must be passed\n");
+ return -EINVAL;
+ }
+