summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/mplinuxman/files/mplinuxman-1.5-makefile.patch')
-rw-r--r--app-misc/mplinuxman/files/mplinuxman-1.5-makefile.patch103
1 files changed, 103 insertions, 0 deletions
diff --git a/app-misc/mplinuxman/files/mplinuxman-1.5-makefile.patch b/app-misc/mplinuxman/files/mplinuxman-1.5-makefile.patch
new file mode 100644
index 000000000000..9af10e7521f4
--- /dev/null
+++ b/app-misc/mplinuxman/files/mplinuxman-1.5-makefile.patch
@@ -0,0 +1,103 @@
+- Fix translation installation with GNU DESTDIR.
+- Fix building with LDFLAGS="-Wl,--as-needed".
+- Use CC, CFLAGS, LDFLAGS and CPPFLAGS from environment.
+
+diff -ur mplinuxman.orig/extra/mp_util/makefile mplinuxman/extra/mp_util/makefile
+--- mplinuxman.orig/extra/mp_util/makefile 2003-05-22 00:34:41.000000000 +0300
++++ mplinuxman/extra/mp_util/makefile 2009-07-08 21:44:50.000000000 +0300
+@@ -1,5 +1,7 @@
++CC ?= gcc
++
+ mputil: mputil.c ../../f60lib/f60lib.c ../../mp3util.c
+- gcc -I../../ -I../../f60lib -I../../libusb mputil.c ../../f60lib/f60lib.c ../../mp3util.c ../../libusb/linux.c ../../libusb/descriptors.c ../../libusb/usb.c ../../libusb/error.c -o mputil
++ $(CC) $(LDFLAGS) $(CFLAGS) -I../../ -I../../f60lib -I../../libusb mputil.c ../../f60lib/f60lib.c ../../mp3util.c ../../libusb/linux.c ../../libusb/descriptors.c ../../libusb/usb.c ../../libusb/error.c -o mputil
+ ln -s mputil mputil_smart
+
+ clean:
+diff -ur mplinuxman.orig/makefile mplinuxman/makefile
+--- mplinuxman.orig/makefile 2006-12-21 17:13:30.000000000 +0200
++++ mplinuxman/makefile 2009-07-08 21:51:46.000000000 +0300
+@@ -1,40 +1,40 @@
+ INCLUDE = `pkg-config --cflags gthread-2.0` `pkg-config --cflags gtk+-2.0` -Ilibusb
+ LIBS = `pkg-config --libs gthread-2.0` `pkg-config --libs gtk+-2.0`
+ export LOCALE_PACKAGE=mplinuxman
+-export LOCALE_DIR=/usr/local/share/locale
++export LOCALE_DIR=$(DESTDIR)/usr/share/locale
+ # remove -D NLS=1 if you want to disable international language support (gettext)
+-COMPILERFLAGS = -O -D MP_VERSION='"1.5"' -D PACKAGE='"$(LOCALE_PACKAGE)"' -D LOCALE_DIR='"$(LOCALE_DIR)"' -D NLS="1"
+-CC = gcc
+-CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
++CPPFLAGS += -D MP_VERSION='"1.5"' -D PACKAGE='"$(LOCALE_PACKAGE)"' -D LOCALE_DIR='"$(LOCALE_DIR)"' -D NLS="1"
++CC ?= gcc
++CFLAGS += $(INCLUDE)
+
+ HEADERFILES = dirdialog.h mplinux.h useful.h mputil3.h
+ OBJECTFILES = dirdialog.o main.o mainwindow.o useful.o mp3util.o playlist.o waitdialog.o mplist.o miscwindow.o
+
+ mplinuxman : $(OBJECTFILES) f60lib.o ini.o usb.o error.o descriptors.o linux.o
+- $(CC) -o mplinuxman $(CFLAGS) $(LIBS) $(OBJECTFILES) f60lib.o ini.o usb.o error.o descriptors.o linux.o ; echo -e "\nDone\nTo install mplinuxman use (this requires root privileges): make install\n"
++ $(CC) $(LDFLAGS) $(CFLAGS) -o mplinuxman $(OBJECTFILES) f60lib.o ini.o usb.o error.o descriptors.o linux.o $(LIBS) ; echo -e "\nDone\nTo install mplinuxman use (this requires root privileges): make install\n"
+
+
+ f60lib.o : f60lib/f60lib.c
+- $(CC) -c $(CFLAGS) f60lib/f60lib.c
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) f60lib/f60lib.c
+
+ ini.o : ini/ini.c
+- $(CC) -c $(CFLAGS) ini/ini.c
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) ini/ini.c
+
+ linux.o : libusb/linux.c
+- $(CC) -c $(CFLAGS) libusb/linux.c
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) libusb/linux.c
+
+ descriptors.o : libusb/descriptors.c
+- $(CC) -c $(CFLAGS) libusb/descriptors.c
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) libusb/descriptors.c
+
+ error.o : libusb/error.c
+- $(CC) -c $(CFLAGS) libusb/error.c
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) libusb/error.c
+
+ usb.o : libusb/usb.c
+- $(CC) -c $(CFLAGS) libusb/usb.c
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) libusb/usb.c
+
+
+ $(OBJECTFILES) : %.o: %.c
+- $(CC) -c $(CFLAGS) $<
++ $(CC) -c $(CFLAGS) $(CPPFLAGS) $<
+
+ clean:
+ rm mplinuxman *.o *~ ; exit 0
+@@ -64,11 +64,11 @@
+ cp logo.xpm /usr/local/share/pixmaps/mplinuxman.xpm
+ mkdir -p /usr/local/share/applications/
+ cp mplinuxman.desktop /usr/local/share/applications
+- mkdir -p /usr/local/share/locale/de/LC_MESSAGES/
+- mkdir -p /usr/local/share/locale/es/LC_MESSAGES/
+- mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/
+- mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/
+- mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/
++ mkdir -p $(DESTDIR)/usr/share/locale/de/LC_MESSAGES/
++ mkdir -p $(DESTDIR)/usr/share/locale/es/LC_MESSAGES/
++ mkdir -p $(DESTDIR)/usr/share/locale/fr/LC_MESSAGES/
++ mkdir -p $(DESTDIR)/usr/share/locale/ja/LC_MESSAGES/
++ mkdir -p $(DESTDIR)/usr/share/locale/nl/LC_MESSAGES/
+ sh po/install.sh
+
+ uninstall:
+@@ -76,8 +76,8 @@
+ rm /usr/local/bin/mputil
+ rm /usr/local/share/pixmaps/mplinuxman.xpm
+ rm /usr/local/share/applications/mplinuxman.desktop
+- rm /usr/local/share/locale/de/LC_MESSAGES/mplinuxman.mo
+- rm /usr/local/share/locale/es/LC_MESSAGES/mplinuxman.mo
+- rm /usr/local/share/locale/fr/LC_MESSAGES/mplinuxman.mo
+- rm /usr/local/share/locale/ja/LC_MESSAGES/mplinuxman.mo
+- rm /usr/local/share/locale/nl/LC_MESSAGES/mplinuxman.mo
++ rm $(DESTDIR)/usr/share/locale/de/LC_MESSAGES/mplinuxman.mo
++ rm $(DESTDIR)/usr/share/locale/es/LC_MESSAGES/mplinuxman.mo
++ rm $(DESTDIR)/usr/share/locale/fr/LC_MESSAGES/mplinuxman.mo
++ rm $(DESTDIR)/usr/share/locale/ja/LC_MESSAGES/mplinuxman.mo
++ rm $(DESTDIR)/usr/share/locale/nl/LC_MESSAGES/mplinuxman.mo