diff options
Diffstat (limited to 'media-tv/w_scan/files/w_scan-20081106-build-and-path-fixes.patch')
-rw-r--r-- | media-tv/w_scan/files/w_scan-20081106-build-and-path-fixes.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/media-tv/w_scan/files/w_scan-20081106-build-and-path-fixes.patch b/media-tv/w_scan/files/w_scan-20081106-build-and-path-fixes.patch new file mode 100644 index 000000000000..c23d12fa5fa8 --- /dev/null +++ b/media-tv/w_scan/files/w_scan-20081106-build-and-path-fixes.patch @@ -0,0 +1,68 @@ +* Honour CC, CFLAGS, LDFLAGS and DESTDIR. +* Use absolute paths so it doesn't assume w_scan is ran from the build dir. +--- w_scan-20081106.orig/Makefile 2008-11-06 08:49:01.000000000 -0600 ++++ w_scan-20081106/Makefile 2008-11-07 18:24:20.812221779 -0600 +@@ -1,7 +1,7 @@ + +-CC = gcc +-CFLAGS = -MD -g -Wall -O2 +-LFLAGS = -g -Wall ++CC ?= gcc ++CFLAGS := -MD -g -Wall -O2 $(CFLAGS) ++LFLAGS := -g -Wall $(LDFLAGS) + + OBJS = dump-vdr.o dump-xine.o dump-dvbscan.o dump-kaffeine.o scan.o section.o atsc_psip_section.o + SRCS = $(OBJS:.o=.c) +@@ -10,6 +10,10 @@ + VERSION = $(shell sed -n '/uint version/p' scan.c | sed -e 's/uint version = //' | sed -e 's/;//') + TMPDIR = w_scan-$(VERSION) + ++BINDIR = /usr/bin ++SHAREDIR = /usr/share/w_scan ++DOCDIR = /usr/share/doc/w_scan ++ + $(TARGET): $(OBJS) + $(CC) $(LFLAGS) -o $(TARGET) $(OBJS) + $(RM) *.o *.d +@@ -17,13 +21,13 @@ + $(CC) $(CFLAGS) --static -c $< -o $@ + + install: +- install -m 755 $(TARGET) /usr/bin +- install -m 755 w_scan_start.sh /usr/bin +- mkdir -p /usr/share/w_scan +- install pci.ids /usr/share/w_scan +- install pci.classes /usr/share/w_scan +- install usb.ids /usr/share/w_scan +- install usb.classes /usr/share/w_scan ++ @mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(SHAREDIR) $(DESTDIR)$(DOCDIR) ++ install -m 755 $(TARGET) $(DESTDIR)$(BINDIR) ++ install -m 755 w_scan_start.sh $(DESTDIR)$(BINDIR) ++ install pci.ids $(DESTDIR)$(SHAREDIR) ++ install pci.classes $(DESTDIR)$(SHAREDIR) ++ install usb.ids $(DESTDIR)$(SHAREDIR) ++ install usb.classes $(DESTDIR)$(SHAREDIR) + + dist: + @-rm -rf $(TMPDIR) +diff -ur w_scan-20081106.orig/w_scan_start.sh w_scan-20081106/w_scan_start.sh +--- w_scan-20081106.orig/w_scan_start.sh 2008-11-06 09:01:07.000000000 -0600 ++++ w_scan-20081106/w_scan_start.sh 2008-11-07 18:24:55.965058963 -0600 +@@ -34,7 +34,7 @@ + ####################################################### + + umask 022 +-export PATH="$(pwd):/bin:/usr/bin:/sbin:/usr/sbin" ++export PATH="/usr/share/w_scan:/bin:/usr/bin:/sbin:/usr/sbin" + DATE="$(date +%Y)$(date +%m)$(date +%d)" # $DATE == "YYYYMMDD", i.e. 20060710 + W_SCAN=$(which w_scan 2>/dev/null) + UDEVSTART=$(which udevstart) +@@ -712,7 +712,7 @@ + echo "Copying channels.conf skipped - okay." + echo "The channels.conf generated can be found at" + echo -n -e "\\033[1;34m" +- echo "$(pwd)/channels.conf-$DATE" ++ echo "/usr/share/w_scan/channels.conf-$DATE" + echo "" + echo -e -n $NORMAL + else |