summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2009-07-08 18:50:40 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2009-07-08 18:50:40 +0000
commit3a3bdd215056f217c7e0101d75419af7996f0525 (patch)
treedc30cf118d0c2c8556664a2af3e4289a9e27a9c3
parentFixing configure options for libusb-1, see bug #275485. (diff)
downloadgentoo-2-3a3bdd215056f217c7e0101d75419af7996f0525.tar.gz
gentoo-2-3a3bdd215056f217c7e0101d75419af7996f0525.tar.bz2
gentoo-2-3a3bdd215056f217c7e0101d75419af7996f0525.zip
Use CC and LDFLAGS and fix building with -Wl,--as-needed wrt #277031
(Portage version: 2.2_rc33/cvs/Linux x86_64)
-rw-r--r--app-misc/mplinuxman/ChangeLog8
-rw-r--r--app-misc/mplinuxman/files/mplinuxman-1.5-makefile.patch103
-rw-r--r--app-misc/mplinuxman/mplinuxman-1.5.ebuild29
3 files changed, 121 insertions, 19 deletions
diff --git a/app-misc/mplinuxman/ChangeLog b/app-misc/mplinuxman/ChangeLog
index cd9b99eb8a91..e323617b3509 100644
--- a/app-misc/mplinuxman/ChangeLog
+++ b/app-misc/mplinuxman/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-misc/mplinuxman
-# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/mplinuxman/ChangeLog,v 1.15 2008/11/15 13:25:52 flameeyes Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/mplinuxman/ChangeLog,v 1.16 2009/07/08 18:50:40 ssuominen Exp $
+
+ 08 Jul 2009; Samuli Suominen <ssuominen@gentoo.org> mplinuxman-1.5.ebuild,
+ +files/mplinuxman-1.5-makefile.patch:
+ Use CC and LDFLAGS and fix building with -Wl,--as-needed wrt #277031
15 Nov 2008; Diego E. Pettenò <flameeyes@gentoo.org>
mplinuxman-1.5.ebuild:
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
diff --git a/app-misc/mplinuxman/mplinuxman-1.5.ebuild b/app-misc/mplinuxman/mplinuxman-1.5.ebuild
index 6927a0b11cb4..0af61928ec2d 100644
--- a/app-misc/mplinuxman/mplinuxman-1.5.ebuild
+++ b/app-misc/mplinuxman/mplinuxman-1.5.ebuild
@@ -1,7 +1,8 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/mplinuxman/mplinuxman-1.5.ebuild,v 1.6 2008/11/15 13:25:52 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/mplinuxman/mplinuxman-1.5.ebuild,v 1.7 2009/07/08 18:50:40 ssuominen Exp $
+EAPI=2
inherit eutils toolchain-funcs
DESCRIPTION="Manager for MPMan F60/55/50 MP3 players."
@@ -13,7 +14,7 @@ SLOT="0"
KEYWORDS="amd64 ~ppc x86"
IUSE=""
-RDEPEND=">=x11-libs/gtk+-2
+RDEPEND="x11-libs/gtk+:2
virtual/mpg123"
DEPEND="${RDEPEND}
dev-util/pkgconfig
@@ -21,22 +22,16 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/${PN}
-# This is ugly and someone should write upstream a patch,
-# but it's not me. - drac
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}"/${P}-stringh.patch
-
- sed -e "s:CFLAGS = :CFLAGS = ${CFLAGS} :" \
- -e 's:/usr/local/share/locale:$(DESTDIR)/usr/share/locale:' \
- -i makefile
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-stringh.patch \
+ "${FILESDIR}"/${P}-makefile.patch
}
src_compile() {
- emake CC="$(tc-getCC)" || die "emake failed."
+ tc-export CC
+ emake || die "emake failed"
cd extra/mp_util
- emake CC="$(tc-getCC)" || die "emake failed."
+ emake || die "emake failed"
}
src_install() {
@@ -44,10 +39,10 @@ src_install() {
dodir /usr/share/locale/{de,es,fr,ja,nl}/LC_MESSAGES
- DESTDIR="${D}" emake install-po || die "emake insall-po failed"
+ DESTDIR="${D}" emake install-po || die "emake install-po failed"
newicon logo.xpm ${PN}.xpm
- make_desktop_entry ${PN} ${PN} ${PN} "AudioVideo;Audio;GTK;"
+ make_desktop_entry ${PN} ${PN} ${PN} "AudioVideo;Audio;GTK"
dodoc CHANGES README extra/mp_util/USAGE.txt
}