From e569e14e17a9561471315ad2fea8b4ed75aca4c0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Diego=20Elio=20Petten=C3=B2?= Date: Wed, 15 Mar 2006 01:26:35 +0000 Subject: [PATCH] New version, this time respecting CFLAGS, LDFLAGS, CC, handling PIC correctly (it can build on amd64), multilib safe, and setting a soname on the shared library. Also fixed missing pkgconfig dependency. Package-Manager: portage-2.1_pre6-r2 --- media-sound/ptabtools/ChangeLog | 13 ++++- media-sound/ptabtools/Manifest | 36 +++++++++++--- .../ptabtools/files/digest-ptabtools-0.3.1-r1 | 1 - .../ptabtools/files/digest-ptabtools-0.3.1-r2 | 3 ++ .../files/ptabtools-0.3.1-fPIC.patch | 22 +++++++-- .../files/ptabtools-0.3.1-respectflags.patch | 49 +++++++++++++++++++ .../files/ptabtools-0.3.1-soname.patch | 13 +++++ ....1-r1.ebuild => ptabtools-0.3.1-r2.ebuild} | 30 ++++++------ 8 files changed, 139 insertions(+), 28 deletions(-) delete mode 100644 media-sound/ptabtools/files/digest-ptabtools-0.3.1-r1 create mode 100644 media-sound/ptabtools/files/digest-ptabtools-0.3.1-r2 create mode 100644 media-sound/ptabtools/files/ptabtools-0.3.1-respectflags.patch create mode 100644 media-sound/ptabtools/files/ptabtools-0.3.1-soname.patch rename media-sound/ptabtools/{ptabtools-0.3.1-r1.ebuild => ptabtools-0.3.1-r2.ebuild} (53%) diff --git a/media-sound/ptabtools/ChangeLog b/media-sound/ptabtools/ChangeLog index 3b575e5c786b..9039892ad019 100644 --- a/media-sound/ptabtools/ChangeLog +++ b/media-sound/ptabtools/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for media-sound/ptabtools # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/ptabtools/ChangeLog,v 1.6 2006/01/08 12:34:51 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/ptabtools/ChangeLog,v 1.7 2006/03/15 01:26:35 flameeyes Exp $ + +*ptabtools-0.3.1-r2 (15 Mar 2006) + + 15 Mar 2006; Diego Pettenò + files/ptabtools-0.3.1-fPIC.patch, + +files/ptabtools-0.3.1-respectflags.patch, + +files/ptabtools-0.3.1-soname.patch, -ptabtools-0.3.1-r1.ebuild, + +ptabtools-0.3.1-r2.ebuild: + New version, this time respecting CFLAGS, LDFLAGS, CC, handling PIC + correctly (it can build on amd64), multilib safe, and setting a soname on + the shared library. Also fixed missing pkgconfig dependency. 08 Jan 2006; Diego Pettenò metadata.xml: Remove retiring dev from metadata. diff --git a/media-sound/ptabtools/Manifest b/media-sound/ptabtools/Manifest index ec2255ba43fe..ff1cd191b4a2 100644 --- a/media-sound/ptabtools/Manifest +++ b/media-sound/ptabtools/Manifest @@ -1,17 +1,37 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -MD5 791cfe915ff801210b3cefb28dca75ad ChangeLog 1054 +MD5 d64a4e452bb1cd6432fd6bb18d841760 ChangeLog 1530 +RMD160 f800ef7e0bf923caee3cb74a91c4c28b3a35f6de ChangeLog 1530 +SHA256 30caaec79f1206526f0ea5554ffc96d84145cc46bef62cd46249b963d65e26aa ChangeLog 1530 MD5 24b33a79baff0ec4ed867727fb49fc36 files/digest-ptabtools-0.3.1 66 -MD5 24b33a79baff0ec4ed867727fb49fc36 files/digest-ptabtools-0.3.1-r1 66 -MD5 c2c473c8b1b1caabcadd86a480b1e098 files/ptabtools-0.3.1-fPIC.patch 586 +RMD160 b5230c72fa3dde4ea285276f916d672676e69135 files/digest-ptabtools-0.3.1 66 +SHA256 6df1f253e2dd576883b007506f616c89d7220108a818a569a15fe38e1f445d7c files/digest-ptabtools-0.3.1 66 +MD5 d2e1e4e9935232bf67d5744dff875614 files/digest-ptabtools-0.3.1-r2 244 +RMD160 354af9cc3858b6f5205d14db8ade49631e8db414 files/digest-ptabtools-0.3.1-r2 244 +SHA256 3ffe75e2ecb57c73ffd8f809ec4fe15d6f81ceae29976946fb37bf96925cdf24 files/digest-ptabtools-0.3.1-r2 244 +MD5 2a40dcb47ea03f65d7b1cb0e8bbf5d14 files/ptabtools-0.3.1-fPIC.patch 879 +RMD160 cbb5c8d0ad60097419c66520ccc5bb1c287afd06 files/ptabtools-0.3.1-fPIC.patch 879 +SHA256 63f5dad6f702fbd9ac5f0d110adb6b4ffda8c0c2cedd650f0b162c8dfac890a6 files/ptabtools-0.3.1-fPIC.patch 879 +MD5 6216243fcaa6a163089b7847e5bd1e20 files/ptabtools-0.3.1-respectflags.patch 2063 +RMD160 d682fef03c4f38aa0ec42923b9e45c6367f19834 files/ptabtools-0.3.1-respectflags.patch 2063 +SHA256 3aca951478e2c96de533a993eb40ec7c289e9a6b6b6d0f5ac28ca1e0c7399220 files/ptabtools-0.3.1-respectflags.patch 2063 +MD5 6a588361d48d36bd14d3b8802757d13f files/ptabtools-0.3.1-soname.patch 646 +RMD160 3ed331aa3a6d29fde75ca29057d564a3d6a15f5c files/ptabtools-0.3.1-soname.patch 646 +SHA256 0dd368c101cf7cb1e293aa71281d41290af56eebc142c785ff58b602a552ee9e files/ptabtools-0.3.1-soname.patch 646 MD5 a1eaeb2ae801daeb712c90c060e922dc metadata.xml 158 -MD5 778a7bacb2b422b592fa142d214ad181 ptabtools-0.3.1-r1.ebuild 1036 +RMD160 6842e2189a50bd8a98e84802c38180ac1421c00e metadata.xml 158 +SHA256 dfb5b47e6836db39fb187301dfcff1c2605e91d13d21db160806a563d8c75f9b metadata.xml 158 +MD5 fe1afe5f0da69ded9d9cc0e4fcc134a0 ptabtools-0.3.1-r2.ebuild 1149 +RMD160 795e52aadcc7bd6833d51e7a4f9f300b2f412bea ptabtools-0.3.1-r2.ebuild 1149 +SHA256 5f908524f85db963b847de1556c2e2d5dd2b38661b50f07f5af98dcbecdc2cdf ptabtools-0.3.1-r2.ebuild 1149 MD5 e771ed0f3861a459b8284228765bf9ce ptabtools-0.3.1.ebuild 755 +RMD160 6d69490b31ac1fa4153e5d1337a5f73dd781e608 ptabtools-0.3.1.ebuild 755 +SHA256 faf5bd3e4cb566057b33007079b0c6e4ba80a3077634067de6ff3d871cdd6303 ptabtools-0.3.1.ebuild 755 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2 (GNU/Linux) +Version: GnuPG v1.4.2.2 (GNU/Linux) -iD8DBQFDwQb3AiZjviIA2XgRAg32AJ45LgPzXgHv8ihWVJfIzNR5gNuJNACgq9tE -Sw37lm1Ou9xbmY19J+VnUYo= -=wcs7 +iD8DBQFEF21YAiZjviIA2XgRAh24AJ0aQo+m8lX2UzIgNtp1SP2YKjeXTQCfWuVG +OXbLnwVD7MP0gq1foFdexnA= +=4IHF -----END PGP SIGNATURE----- diff --git a/media-sound/ptabtools/files/digest-ptabtools-0.3.1-r1 b/media-sound/ptabtools/files/digest-ptabtools-0.3.1-r1 deleted file mode 100644 index 73541fcb20b5..000000000000 --- a/media-sound/ptabtools/files/digest-ptabtools-0.3.1-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 2eb803142b04f6a4b4b4e8e96f96b865 ptabtools_0.3-1.tar.gz 66984 diff --git a/media-sound/ptabtools/files/digest-ptabtools-0.3.1-r2 b/media-sound/ptabtools/files/digest-ptabtools-0.3.1-r2 new file mode 100644 index 000000000000..a0771246829e --- /dev/null +++ b/media-sound/ptabtools/files/digest-ptabtools-0.3.1-r2 @@ -0,0 +1,3 @@ +MD5 2eb803142b04f6a4b4b4e8e96f96b865 ptabtools_0.3-1.tar.gz 66984 +RMD160 16751ab858b872d39112d7c6f9515a343039cc6c ptabtools_0.3-1.tar.gz 66984 +SHA256 64ec61ce12d56dd7412bf17f31bf8ec2da517eddf42dca5813b387efa0c2c6d3 ptabtools_0.3-1.tar.gz 66984 diff --git a/media-sound/ptabtools/files/ptabtools-0.3.1-fPIC.patch b/media-sound/ptabtools/files/ptabtools-0.3.1-fPIC.patch index 7165f19cf0d8..f4651c601cba 100644 --- a/media-sound/ptabtools/files/ptabtools-0.3.1-fPIC.patch +++ b/media-sound/ptabtools/files/ptabtools-0.3.1-fPIC.patch @@ -1,9 +1,23 @@ -diff -ur ptabtools-0.3.orig/Makefile ptabtools-0.3/Makefile ---- ptabtools-0.3.orig/Makefile 2005-02-19 20:07:47.000000000 -0500 -+++ ptabtools-0.3/Makefile 2005-02-19 20:10:27.951481769 -0500 -@@ -26,7 +26,7 @@ +Index: ptabtools-0.3/Makefile +=================================================================== +--- ptabtools-0.3.orig/Makefile ++++ ptabtools-0.3/Makefile +@@ -15,7 +15,7 @@ PTB2LY_OBJS = ptb2ly.o ptb.o + PTBINFO_OBJS = ptbinfo.o ptb.o + PTB2ASCII_OBJS = ptb2ascii.o ptb.o + PTB2XML_OBJS = ptb2xml.o ptb.o +-PTBSO_OBJS = ptb.o ++PTBSO_OBJS = ptb.lo + + all: $(PROGS) $(LIBS) + +@@ -25,8 +25,11 @@ ptb2xml.o: ptb2xml.c + %.o: %.c $(CC) $(CFLAGS) -c $< `pkg-config --cflags glib-2.0` ++%.lo: %.c ++ $(CC) $(CFLAGS) -fPIC -o $@ -c $< `pkg-config --cflags glib-2.0` ++ libptb-$(PTB_VERSION).so: $(PTBSO_OBJS) - $(CC) -shared $(CFLAGS) -o $@ $(PTBSO_OBJS) `pkg-config --libs glib-2.0` + $(CC) -shared -fPIC $(CFLAGS) -o $@ $(PTBSO_OBJS) `pkg-config --libs glib-2.0` diff --git a/media-sound/ptabtools/files/ptabtools-0.3.1-respectflags.patch b/media-sound/ptabtools/files/ptabtools-0.3.1-respectflags.patch new file mode 100644 index 000000000000..20100dd8af5d --- /dev/null +++ b/media-sound/ptabtools/files/ptabtools-0.3.1-respectflags.patch @@ -0,0 +1,49 @@ +Index: ptabtools-0.3/Makefile +=================================================================== +--- ptabtools-0.3.orig/Makefile ++++ ptabtools-0.3/Makefile +@@ -9,7 +9,6 @@ PROGS = ptb2ly ptb2ascii ptbinfo $(shell + LIBS = libptb-$(PTB_VERSION).so + PROGS_MANPAGES = $(patsubst %,%.1,$(PROGS)) + INSTALL = install +-CFLAGS = -g -Wall -DPTB_VERSION=\"$(PTB_VERSION)\" + + PTB2LY_OBJS = ptb2ly.o ptb.o + PTBINFO_OBJS = ptbinfo.o ptb.o +@@ -20,28 +19,28 @@ PTBSO_OBJS = ptb.lo + all: $(PROGS) $(LIBS) + + ptb2xml.o: ptb2xml.c +- $(CC) $(CFLAGS) -c $< `pkg-config --cflags glib-2.0 libxml-2.0 libxslt` ++ $(CC) -DPTB_VERSION=\"$(PTB_VERSION)\" $(CFLAGS) -c $< `pkg-config --cflags glib-2.0 libxml-2.0 libxslt` + + %.o: %.c +- $(CC) $(CFLAGS) -c $< `pkg-config --cflags glib-2.0` ++ $(CC) -DPTB_VERSION=\"$(PTB_VERSION)\" $(CFLAGS) -c $< `pkg-config --cflags glib-2.0` + + %.lo: %.c +- $(CC) $(CFLAGS) -fPIC -o $@ -c $< `pkg-config --cflags glib-2.0` ++ $(CC) -DPTB_VERSION=\"$(PTB_VERSION)\" $(CFLAGS) -fPIC -o $@ -c $< `pkg-config --cflags glib-2.0` + + libptb-$(PTB_VERSION).so: $(PTBSO_OBJS) +- $(CC) -shared -fPIC $(CFLAGS) -o $@ $(PTBSO_OBJS) `pkg-config --libs glib-2.0` ++ $(CC) -shared -fPIC $(LDFLAGS) -o $@ $(PTBSO_OBJS) `pkg-config --libs glib-2.0` + + ptb2xml: $(PTB2XML_OBJS) +- $(CC) $(CFLAGS) -o $@ $(PTB2XML_OBJS) `pkg-config --libs glib-2.0 libxml-2.0 libxslt` -lpopt ++ $(CC) $(LDFLAGS) -o $@ $(PTB2XML_OBJS) `pkg-config --libs glib-2.0 libxml-2.0 libxslt` -lpopt + + ptb2ascii: $(PTB2ASCII_OBJS) +- $(CC) $(CFLAGS) -o $@ $(PTB2ASCII_OBJS) `pkg-config --libs glib-2.0` -lpopt ++ $(CC) $(LDFLAGS) -o $@ $(PTB2ASCII_OBJS) `pkg-config --libs glib-2.0` -lpopt + + ptb2ly: $(PTB2LY_OBJS) +- $(CC) $(CFLAGS) -o $@ $(PTB2LY_OBJS) `pkg-config --libs glib-2.0` -lpopt ++ $(CC) $(LDFLAGS) -o $@ $(PTB2LY_OBJS) `pkg-config --libs glib-2.0` -lpopt + + ptbinfo: $(PTBINFO_OBJS) +- $(CC) $(CFLAGS) -o $@ $(PTBINFO_OBJS) `pkg-config --libs glib-2.0` -lpopt ++ $(CC) $(LDFLAGS) -o $@ $(PTBINFO_OBJS) `pkg-config --libs glib-2.0` -lpopt + + install: all + $(INSTALL) $(PROGS) $(DESTDIR)$(bindir) diff --git a/media-sound/ptabtools/files/ptabtools-0.3.1-soname.patch b/media-sound/ptabtools/files/ptabtools-0.3.1-soname.patch new file mode 100644 index 000000000000..abd51dc6a88f --- /dev/null +++ b/media-sound/ptabtools/files/ptabtools-0.3.1-soname.patch @@ -0,0 +1,13 @@ +Index: ptabtools-0.3/Makefile +=================================================================== +--- ptabtools-0.3.orig/Makefile ++++ ptabtools-0.3/Makefile +@@ -28,7 +28,7 @@ ptb2xml.o: ptb2xml.c + $(CC) -DPTB_VERSION=\"$(PTB_VERSION)\" $(CFLAGS) -fPIC -o $@ -c $< `pkg-config --cflags glib-2.0` + + libptb-$(PTB_VERSION).so: $(PTBSO_OBJS) +- $(CC) -shared -fPIC $(LDFLAGS) -o $@ $(PTBSO_OBJS) `pkg-config --libs glib-2.0` ++ $(CC) -shared -fPIC $(LDFLAGS) -Wl,-soname -Wl,$@ -o $@ $(PTBSO_OBJS) `pkg-config --libs glib-2.0` + + ptb2xml: $(PTB2XML_OBJS) + $(CC) $(LDFLAGS) -o $@ $(PTB2XML_OBJS) `pkg-config --libs glib-2.0 libxml-2.0 libxslt` -lpopt diff --git a/media-sound/ptabtools/ptabtools-0.3.1-r1.ebuild b/media-sound/ptabtools/ptabtools-0.3.1-r2.ebuild similarity index 53% rename from media-sound/ptabtools/ptabtools-0.3.1-r1.ebuild rename to media-sound/ptabtools/ptabtools-0.3.1-r2.ebuild index f57219ab9313..0a907c919b71 100644 --- a/media-sound/ptabtools/ptabtools-0.3.1-r1.ebuild +++ b/media-sound/ptabtools/ptabtools-0.3.1-r2.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/ptabtools/ptabtools-0.3.1-r1.ebuild,v 1.1 2005/02/20 19:19:11 pkdawson Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/ptabtools/ptabtools-0.3.1-r2.ebuild,v 1.1 2006/03/15 01:26:35 flameeyes Exp $ -inherit eutils +inherit eutils toolchain-funcs multilib MY_PV=${PV%.*}-${PV##*.} @@ -13,33 +13,35 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~ppc ~sparc ~x86" -IUSE="xml2" +IUSE="" -DEPEND="dev-libs/popt +RDEPEND="dev-libs/popt dev-libs/libxml2 - xml2? ( dev-libs/libxml2 - dev-libs/libxslt )" + dev-libs/libxslt" + +DEPEND="${RDEPEND} + dev-util/pkgconfig" S=${WORKDIR}/${PN}-${PV%.*} src_unpack() { unpack ${A} - epatch ${FILESDIR}/${P}-fPIC.patch + epatch "${FILESDIR}/${P}-fPIC.patch" + epatch "${FILESDIR}/${P}-respectflags.patch" + epatch "${FILESDIR}/${P}-soname.patch" } src_compile() { - sed -i "s:CFLAGS =:CFLAGS = ${CFLAGS}:" Makefile - emake || die + emake CC="$(tc-getCC)" || die } src_install() { dodir /usr/bin dodir /usr/share/man/man1 - dodir /usr/lib/pkgconfig + dodir /usr/$(get_libdir)/pkgconfig dodir /usr/include dodoc AUTHORS ChangeLog README TODO - sed -i "s:/usr/local:/usr:" ptabtools.pc - sed -i "s:-lptb:-lptb-0.2:" ptabtools.pc - einstall || die + sed -i -e "s:/usr/local:/usr:; s:-lptb:-lptb-0.2:" ptabtools.pc + einstall libdir="${D}/usr/$(get_libdir)" || die } -- 2.26.2