From 28219b121a5e00b6d8fe6d4853caa9fedc8c8212 Mon Sep 17 00:00:00 2001 From: David Spencer Date: Thu, 31 Dec 2015 15:37:29 +0000 Subject: system/i8kutils: Patched to fix build with gcc-5.3.0. Signed-off-by: David Spencer Signed-off-by: Robby Workman --- system/i8kutils/fix_Makefile.patch | 29 +++++++++++++++++++++++++++++ system/i8kutils/fix_i8kmon_toggle_fan.patch | 11 +++++++++++ system/i8kutils/i8kutils.SlackBuild | 7 +++++-- 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 system/i8kutils/fix_Makefile.patch create mode 100644 system/i8kutils/fix_i8kmon_toggle_fan.patch (limited to 'system/i8kutils') diff --git a/system/i8kutils/fix_Makefile.patch b/system/i8kutils/fix_Makefile.patch new file mode 100644 index 0000000000..38fc8d9e29 --- /dev/null +++ b/system/i8kutils/fix_Makefile.patch @@ -0,0 +1,29 @@ +diff -Naur i8kutils/Makefile i8kutils_new/Makefile +--- i8kutils/Makefile 2014-12-09 16:40:11.000000000 +0100 ++++ i8kutils_new/Makefile 2015-01-31 13:15:21.031912744 +0100 +@@ -14,16 +14,19 @@ + # General Public License for more details. + + ccflags-y = -Wall ++CC = gcc + + all: i8kctl probe_i8k_calls_time + +-i8kctl: i8kctl.c i8kctl.o +- gcc -Wall i8kctl.c -o i8kctl ++i8kctl: i8kctl.c ++ $(CC) $(CFLAGS) $(LDFLAGS) -Wall i8kctl.c -o i8kctl + +-probe_i8k_calls_time: probe_i8k_calls_time.c +- gcc -Wall -c -g -DLIB i8kctl.c +- gcc -Wall -c -g -DLIB probe_i8k_calls_time.c +- gcc -o probe_i8k_calls_time i8kctl.o probe_i8k_calls_time.o ++i8kctl_DLIB.o: i8kctl.c ++ $(CC) $(CFLAGS) -Wall -c -g -DLIB i8kctl.c -o i8kctl_DLIB.o ++ ++probe_i8k_calls_time: i8kctl_DLIB.o probe_i8k_calls_time.c ++ $(CC) $(CFLAGS) -Wall -c -g -DLIB probe_i8k_calls_time.c ++ $(CC) $(CFLAGS) $(LDFLAGS) -Wall -o probe_i8k_calls_time i8kctl_DLIB.o probe_i8k_calls_time.o + + i8k: + make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules diff --git a/system/i8kutils/fix_i8kmon_toggle_fan.patch b/system/i8kutils/fix_i8kmon_toggle_fan.patch new file mode 100644 index 0000000000..146bf7e4f2 --- /dev/null +++ b/system/i8kutils/fix_i8kmon_toggle_fan.patch @@ -0,0 +1,11 @@ +diff -Naur i8kutils/i8kmon new/i8kmon +--- i8kutils/i8kmon 2015-05-21 11:33:21.596018503 +0200 ++++ new/i8kmon 2015-05-21 11:35:11.958867344 +0200 +@@ -430,6 +430,7 @@ + + proc toggle_fan {fan {speed {}}} { + global status ++ global config + + if {$speed != {}} { + set status($fan) $speed diff --git a/system/i8kutils/i8kutils.SlackBuild b/system/i8kutils/i8kutils.SlackBuild index 09d3003740..d3c83313ba 100644 --- a/system/i8kutils/i8kutils.SlackBuild +++ b/system/i8kutils/i8kutils.SlackBuild @@ -72,8 +72,11 @@ find -L . \ # Take care of creating required directory tree into $PKG, since Makefile doesn't mkdir -p $PKG/{etc,usr/{bin,man/man1}} -# Override Makefile CFLAGS with ours -make CFLAGS="$SLKCFLAGS" +# Two fixes from Arch Linux (the first one is needed to make CFLAGS work) +patch -p1 < $CWD/fix_Makefile.patch +patch -p1 < $CWD/fix_i8kmon_toggle_fan.patch + +make CFLAGS="$SLKCFLAGS -std=gnu89" cp -a \ i8kctl i8kfan i8kmon probe_i8k_calls_time \ -- cgit v1.2.3