summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-01-23 18:54:05 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-01-23 18:54:05 +0100
commit47827480b2fe99417cd83cf4f3210f756fdccc2c (patch)
tree357362ac3ec88b70b82b7d9d7dff49407ada9fa2 /package
parentd47fe14025c27b78e8819e8f0c409b9cce1483b3 (diff)
update patch to the Makefile changes send to upstream
Diffstat (limited to 'package')
-rw-r--r--package/cpufrequtils/patches/patch-Makefile139
-rw-r--r--package/cpufrequtils/patches/patch-bench_Makefile8
-rw-r--r--package/cpufrequtils/patches/patch-utils_info_c20
-rw-r--r--package/cpufrequtils/patches/patch-utils_set_c6
4 files changed, 88 insertions, 85 deletions
diff --git a/package/cpufrequtils/patches/patch-Makefile b/package/cpufrequtils/patches/patch-Makefile
index 3a1e0dba9..c85aba1ab 100644
--- a/package/cpufrequtils/patches/patch-Makefile
+++ b/package/cpufrequtils/patches/patch-Makefile
@@ -1,7 +1,5 @@
- - allow passing libtool options via environment variables
- - drop hard-coded -rpath flag when linking with libtool (distracts tagged configs)
---- cpufrequtils-007.orig/Makefile Sat Jan 16 14:47:44 2010
-+++ cpufrequtils-007/Makefile Thu Jan 21 19:05:16 2010
+--- cpufrequtils-007.orig/Makefile 2010-01-16 14:47:44.000000000 +0100
++++ cpufrequtils-007/Makefile 2010-01-23 18:52:15.905985935 +0100
@@ -27,11 +27,11 @@
DEBUG ?= false
@@ -16,25 +14,18 @@
# 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 ?=
+@@ -55,7 +55,9 @@ DESTDIR ?=
# and _should_ modify the PACKAGE_BUGREPORT definition
VERSION = 007
-LIB_VERSION = 0:0:0
-+LIB_VERSION = 0.0.0
++LIB_MAJ= 0.0.0
++LIB_MIN= 0
++
PACKAGE = cpufrequtils
PACKAGE_BUGREPORT = cpufreq@vger.kernel.org
LANGUAGES = de fr it cs pt
-@@ -80,7 +80,6 @@ INSTALL = /usr/bin/install -c
+@@ -80,7 +82,6 @@ INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
@@ -42,119 +33,123 @@
# 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)\" \
+@@ -116,20 +117,22 @@ WARNINGS += -Wshadow
+ CPPFLAGS += -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
++UTIL_SRC = utils/info.c utils/set.c
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
++LIB_SRC = lib/cpufreq.c
++LIB_OBJS = lib/cpufreq.o
+
+ CFLAGS += -pipe
--CFLAGS += -pipe
--
ifeq ($(strip $(PROC)),true)
- LIB_PARTS += lib/proc.lo
++ LIB_OBJS += lib/proc.o
++ LIB_SRC += lib/proc.c
CPPFLAGS += -DINTERFACE_PROC
endif
ifeq ($(strip $(SYSFS)),true)
- LIB_PARTS += lib/sysfs.lo
++ LIB_OBJS += lib/sysfs.o
++ LIB_SRC += lib/sysfs.c
CPPFLAGS += -DINTERFACE_SYSFS
endif
-@@ -147,11 +141,11 @@ CFLAGS += $(WARNINGS)
+@@ -147,11 +150,9 @@ CFLAGS += $(WARNINGS)
ifeq ($(strip $(V)),false)
QUIET=@$(PWD)/build/ccdv
- LIBTOOL_OPT=--silent
-+ LIBTOOL_OPT+=--silent
HOST_PROGS=build/ccdv
else
QUIET=
- LIBTOOL_OPT=
-+ LIBTOOL_OPT+=
HOST_PROGS=
endif
-@@ -175,27 +169,36 @@ all: ccdv libcpufreq utils $(COMPILE_NLS) $(COMPILE_BE
+@@ -175,24 +176,26 @@ all: ccdv libcpufreq utils $(COMPILE_NLS
ccdv: build/ccdv
build/ccdv: build/ccdv.c
@echo "Building ccdv"
- @$(HOSTCC) -O1 -O1 $< -o $@
-+ $(HOSTCC) -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
++lib/%.o: $(LIB_SRC) $(LIB_HEADERS) build/ccdv
++ $(QUIET) $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ -c lib/$*.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)
++libcpufreq.so.$(LIB_MAJ): $(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)
-+ $(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
++ $(QUIET) $(CC) -shared $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
++ -Wl,-soname,libcpufreq.so.$(LIB_MIN) $(LIB_OBJS)
++ @ln -sf $@ libcpufreq.so
++ @ln -sf $@ libcpufreq.so.$(LIB_MIN)
-libcpufreq: libcpufreq.la
-+libcpufreq: libcpufreq.so
++libcpufreq: libcpufreq.so.$(LIB_MAJ)
-cpufreq-%: libcpufreq.la $(UTIL_OBJS)
-- $(QUIET) $(CC) $(CPPFLAGS) $(CFLAGS) -I. -I./lib/ -c -o utils/$@.o utils/$*.c
++cpufreq-%: libcpufreq.so.$(LIB_MAJ) $(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
++ $(QUIET) $(CC) $(CFLAGS) $(LDFLAGS) -L. -o $@ utils/$@.o -lcpufreq
+ $(QUIET) $(STRIPCMD) $@
+
+ utils: cpufreq-info cpufreq-set cpufreq-aperf
+@@ -217,22 +220,21 @@ update-gmo: po/$(PACKAGE).pot
+ done;
+
+ compile-bench: libcpufreq
+- @V=$(V) confdir=$(confdir) make -C bench
++ @V=$(V) confdir=$(confdir) $(MAKE) -C bench
+
+ clean:
+- -find . \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' -o -name '*.l[oas]' \) -type f -print \
++ -find . \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print \
+ | xargs rm -f
+- -rm -rf lib/.libs
+- -rm -rf .libs
+ -rm -f cpufreq-info cpufreq-set cpufreq-aperf
++ -rm -f libcpufreq.so*
+ -rm -f build/ccdv
+ -rm -rf po/*.gmo po/*.pot
+- make -C bench clean
++ $(MAKE) -C bench clean
--utils: cpufreq-info cpufreq-set cpufreq-aperf
-+utils: cpufreq-info cpufreq-set
-
- 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
-+ $(INSTALL) libcpufreq.so $(DESTDIR)${libdir}/libcpufreq.so
++ $(INSTALL) libcpufreq.so* $(DESTDIR)${libdir}/
$(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
+@@ -255,7 +257,7 @@ install-gmo:
- install-man:
- $(INSTALL_DATA) -D man/cpufreq-set.1 $(DESTDIR)${mandir}/man1/cpufreq-set.1
-@@ -257,7 +259,7 @@ install-bench:
+ install-bench:
@#DESTDIR must be set from outside to survive
- @sbindir=$(sbindir) bindir=$(bindir) docdir=$(docdir) confdir=$(confdir) make -C bench install
+- @sbindir=$(sbindir) bindir=$(bindir) docdir=$(docdir) confdir=$(confdir) make -C bench install
++ @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)
+ install: install-lib install-tools install-man $(INSTALL_NLS) $(INSTALL_BENCH)
+
+@@ -271,5 +273,5 @@ uninstall:
+ rm -f $(DESTDIR)${localedir}/$$HLANG/LC_MESSAGES/cpufrequtils.mo; \
+ done;
- uninstall:
- - rm -f $(DESTDIR)${libdir}/libcpufreq.*
+-.PHONY: all utils libcpufreq update-po update-gmo install-lib install-tools install-man install-gmo install uninstall \
++.PHONY: all utils libcpufreq ccdv update-po update-gmo install-lib install-tools install-man install-gmo install uninstall \
+ clean
diff --git a/package/cpufrequtils/patches/patch-bench_Makefile b/package/cpufrequtils/patches/patch-bench_Makefile
new file mode 100644
index 000000000..08b0049ca
--- /dev/null
+++ b/package/cpufrequtils/patches/patch-bench_Makefile
@@ -0,0 +1,8 @@
+--- cpufrequtils-007.orig/bench/Makefile 2010-01-16 14:47:44.000000000 +0100
++++ cpufrequtils-007/bench/Makefile 2010-01-23 18:51:28.329986048 +0100
+@@ -1,4 +1,4 @@
+-LIBS = -L../.libs/ -lm -lcpufreq
++LIBS = -L../ -lm -lcpufreq
+
+ OBJS = main.o parse.o system.o benchmark.o
+ CFLAGS += -D_GNU_SOURCE -I../lib -DDEFAULT_CONFIG_FILE=\"$(confdir)/cpufreq-bench.conf\"
diff --git a/package/cpufrequtils/patches/patch-utils_info_c b/package/cpufrequtils/patches/patch-utils_info_c
index 28c92af1e..d8047f798 100644
--- a/package/cpufrequtils/patches/patch-utils_info_c
+++ b/package/cpufrequtils/patches/patch-utils_info_c
@@ -1,5 +1,5 @@
---- 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
+--- cpufrequtils-007.orig/utils/info.c 2010-01-16 14:47:44.000000000 +0100
++++ cpufrequtils-007/utils/info.c 2010-01-23 18:51:50.165866845 +0100
@@ -10,9 +10,6 @@
#include <errno.h>
#include <stdlib.h>
@@ -28,7 +28,7 @@
nr_cpus = count_cpus();
for (cpu=0; cpu < nr_cpus; cpu++) {
-@@ -153,26 +150,26 @@ static void debug_output_one(unsigned int cpu)
+@@ -153,26 +150,26 @@ static void debug_output_one(unsigned in
struct cpufreq_stats *stats;
if (cpufreq_cpu_exists(cpu)) {
@@ -60,7 +60,7 @@
while (cpus->next) {
printf("%d ", cpus->cpu);
cpus = cpus->next;
-@@ -183,7 +180,7 @@ static void debug_output_one(unsigned int cpu)
+@@ -183,7 +180,7 @@ static void debug_output_one(unsigned in
cpus = cpufreq_get_affected_cpus(cpu);
if (cpus) {
@@ -69,7 +69,7 @@
while (cpus->next) {
printf("%d ", cpus->cpu);
cpus = cpus->next;
-@@ -194,13 +191,13 @@ static void debug_output_one(unsigned int cpu)
+@@ -194,13 +191,13 @@ static void debug_output_one(unsigned in
latency = cpufreq_get_transition_latency(cpu);
if (latency) {
@@ -85,7 +85,7 @@
print_speed(min);
printf(" - ");
print_speed(max);
-@@ -209,7 +206,7 @@ static void debug_output_one(unsigned int cpu)
+@@ -209,7 +206,7 @@ static void debug_output_one(unsigned in
freqs = cpufreq_get_available_frequencies(cpu);
if (freqs) {
@@ -94,7 +94,7 @@
while (freqs->next) {
print_speed(freqs->frequency);
printf(", ");
-@@ -222,7 +219,7 @@ static void debug_output_one(unsigned int cpu)
+@@ -222,7 +219,7 @@ static void debug_output_one(unsigned in
governors = cpufreq_get_available_governors(cpu);
if (governors) {
@@ -103,7 +103,7 @@
while (governors->next) {
printf("%s, ", governors->governor);
governors = governors->next;
-@@ -233,23 +230,23 @@ static void debug_output_one(unsigned int cpu)
+@@ -233,23 +230,23 @@ static void debug_output_one(unsigned in
policy = cpufreq_get_policy(cpu);
if (policy) {
@@ -133,7 +133,7 @@
}
else
print_speed(freq_kernel);
-@@ -257,7 +254,7 @@ static void debug_output_one(unsigned int cpu)
+@@ -257,7 +254,7 @@ static void debug_output_one(unsigned in
}
stats = cpufreq_get_stats(cpu, &total_time);
if (stats) {
@@ -142,7 +142,7 @@
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
+@@ -437,37 +434,37 @@ static int get_latency(unsigned int cpu,
static void print_header(void) {
printf(PACKAGE " " VERSION ": cpufreq-info (C) Dominik Brodowski 2004-2009\n");
diff --git a/package/cpufrequtils/patches/patch-utils_set_c b/package/cpufrequtils/patches/patch-utils_set_c
index 18561004c..b1dee1b3f 100644
--- a/package/cpufrequtils/patches/patch-utils_set_c
+++ b/package/cpufrequtils/patches/patch-utils_set_c
@@ -1,5 +1,5 @@
---- 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
+--- cpufrequtils-007.orig/utils/set.c 2010-01-16 14:47:44.000000000 +0100
++++ cpufrequtils-007/utils/set.c 2010-01-23 18:51:50.185869113 +0100
@@ -12,9 +12,6 @@
#include <limits.h>
#include <string.h>
@@ -78,7 +78,7 @@
print_help();
}
-@@ -180,7 +177,7 @@ static int do_new_policy(unsigned int cpu, struct cpuf
+@@ -180,7 +177,7 @@ static int do_new_policy(unsigned int cp
int ret;
if (!cur_pol) {