From ea6bbd807a87a2d39a639732a6b6be496f293265 Mon Sep 17 00:00:00 2001 From: Patrick McLean Date: Fri, 21 Aug 2009 15:56:46 +0000 Subject: Add patch and modify ebuild to properly respect LDFLAGS (bug #278607). Package-Manager: portage-2.1.6.13/cvs/Linux x86_64 --- www-plugins/nspluginwrapper/ChangeLog | 9 +- www-plugins/nspluginwrapper/Manifest | 10 ++- .../nspluginwrapper-1.2.2-respect-ldflags.patch | 19 +++++ .../nspluginwrapper-1.2.2-r2.ebuild | 96 ++++++++++++++++++++++ 4 files changed, 129 insertions(+), 5 deletions(-) create mode 100644 www-plugins/nspluginwrapper/files/nspluginwrapper-1.2.2-respect-ldflags.patch create mode 100644 www-plugins/nspluginwrapper/nspluginwrapper-1.2.2-r2.ebuild (limited to 'www-plugins/nspluginwrapper') diff --git a/www-plugins/nspluginwrapper/ChangeLog b/www-plugins/nspluginwrapper/ChangeLog index 13bf957a8382..329e4832c5a8 100644 --- a/www-plugins/nspluginwrapper/ChangeLog +++ b/www-plugins/nspluginwrapper/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for www-plugins/nspluginwrapper # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-plugins/nspluginwrapper/ChangeLog,v 1.2 2009/07/20 20:26:05 chutzpah Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-plugins/nspluginwrapper/ChangeLog,v 1.3 2009/08/21 15:56:46 chutzpah Exp $ + +*nspluginwrapper-1.2.2-r2 (21 Aug 2009) + + 21 Aug 2009; Patrick McLean + +nspluginwrapper-1.2.2-r2.ebuild, + +files/nspluginwrapper-1.2.2-respect-ldflags.patch: + Add patch and modify ebuild to properly respect LDFLAGS (bug #278607). *nspluginwrapper-1.2.2-r1 (20 Jul 2009) diff --git a/www-plugins/nspluginwrapper/Manifest b/www-plugins/nspluginwrapper/Manifest index 5378e4d54e58..bfce060888bf 100644 --- a/www-plugins/nspluginwrapper/Manifest +++ b/www-plugins/nspluginwrapper/Manifest @@ -3,17 +3,19 @@ Hash: SHA1 AUX nspluginwrapper-1.2.2-gcc44.patch 3085 RMD160 f6e8508449e66c80f5aad5d40233b0d941bf20d7 SHA1 14a2cea1f14f30bd6d9ce78f3dec21a704fd2998 SHA256 678b7f359fdca751e7a2a12de2cc06a1b4c650f57f204b580a400d54b061752e AUX nspluginwrapper-1.2.2-npidentifiers.patch 5839 RMD160 75cc5acd80b31b014c15149308b61aeb9193fc5d SHA1 c4efb846c429d958619b76abdd82e45d3e3dfa3f SHA256 8bb55b845017b60912c62c4abadc50a3f0397ddf470599b8453b97d9e69f8cd5 +AUX nspluginwrapper-1.2.2-respect-ldflags.patch 823 RMD160 15717dab32c80cd66702c5a88431b9218d0f11b5 SHA1 e7902088653b1fe9e3836676e178f8122b5ba8d4 SHA256 4efb0473338ff86c0f6f02729b92c8d74a53f97ad69717e449c2224572468416 DIST nspluginwrapper-1.0.0.tar.bz2 271028 RMD160 d3b5a5d1dd314e5331ffc877fb9621d6566087c6 SHA1 ef551fb508835b3358355477be794a34e9f64135 SHA256 e5c4661eb91d05fc3da2f4ccf6e0769e8cd097ac232ffc6afe16e645729a02d5 DIST nspluginwrapper-1.2.2.tar.bz2 327947 RMD160 d5aa265966f87c51bb9ea4f2a079a87b74fdcbf3 SHA1 be581c39dcc1a8d9a5b3f81e4650f553a30cf249 SHA256 4e6cbb7aeda1c9f0d6e5a17e729160b5d3f3e7048f90353238806289752175c3 EBUILD nspluginwrapper-1.0.0.ebuild 2400 RMD160 c5eb90d99f1ffa6082a196af90a24a7e85b7f14f SHA1 dbee596e2c67ce76ba027ba3487b659fabd04d38 SHA256 1147c4670b7cdf28026fae04a33bcdb0e8d5cb4bee7b2dcf71b9727143eced2a EBUILD nspluginwrapper-1.2.2-r1.ebuild 2567 RMD160 018c45e22a8bc3697edd1f5b73cb565bc51ad5d4 SHA1 4a4cba781bfb454afccb5637908c74ce848608df SHA256 6269fc0621885b0344a56cf7ac5679a30f288e116f11855fee7002bc13e64e71 +EBUILD nspluginwrapper-1.2.2-r2.ebuild 2682 RMD160 2c4362c9f90d103477318b7434b6d9a811ff2876 SHA1 243ac152234baabd352d98616635237a71c8e6f0 SHA256 32c5315c6414395a35345d5bcca2fa8bd928b947362936125d018a6d601c6d37 EBUILD nspluginwrapper-1.2.2.ebuild 2391 RMD160 b8db5ff9cb5a6c2583877a7b8b3775ad26ec6504 SHA1 d84a56652505af9578ad68bd955b0d6c23161ad8 SHA256 0656a04823aef66245e4f82cd810bdb6b5d86b82b4ce66abf0efd3a10af5d0bd -MISC ChangeLog 6617 RMD160 9358be45e5f342b97cdcd18a7f47ffc367cbf051 SHA1 bf72fe360141a8e5a462cbb6c0172547b2081c22 SHA256 3f222611c1d24f4aa48cccfb847472573ee591347827f3538efd3c2bcb05ee6e +MISC ChangeLog 6874 RMD160 b2b62adf3caf0b560e70e6ffe2e652a19183c75d SHA1 febdfa3c5011483aca45f6b24fac1e754565ce06 SHA256 060a976bf96bd9c630bd14e5e752d3fd150dcdfd7b3a12d802b529d57d8dff77 MISC metadata.xml 253 RMD160 37a89adccd0388cf014f6768a21b1ec09252d21c SHA1 fa43576fb2327afb837b5b2ea57dc6ab8525494b SHA256 0b0d878d1f93316b2966ec90c1f80c46fe67fb3f5647b28f7c30d9647dbb1854 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) -iEYEARECAAYFAkpk0wAACgkQWt/XSf2CZdmtPACeMo+L1pcuuhkAY3b+7DELrdM0 -ETEAn1aOxzmVK73wAM+P0ioQbcg0Jgqj -=DZ7U +iEYEARECAAYFAkqOw8cACgkQWt/XSf2CZdlkhACfQEx1F/iMT7bzCFRc+We6O30J +FycAnAhEcy4O7MjS6BpkN7Uacjlv2tzO +=vMWJ -----END PGP SIGNATURE----- diff --git a/www-plugins/nspluginwrapper/files/nspluginwrapper-1.2.2-respect-ldflags.patch b/www-plugins/nspluginwrapper/files/nspluginwrapper-1.2.2-respect-ldflags.patch new file mode 100644 index 000000000000..5b9e5a810e3b --- /dev/null +++ b/www-plugins/nspluginwrapper/files/nspluginwrapper-1.2.2-respect-ldflags.patch @@ -0,0 +1,19 @@ +diff -ur nspluginwrapper-1.2.2.orig/Makefile nspluginwrapper-1.2.2/Makefile +--- nspluginwrapper-1.2.2.orig/Makefile 2009-01-02 03:54:10.000000000 -0500 ++++ nspluginwrapper-1.2.2/Makefile 2009-08-21 11:35:57.000000000 -0400 +@@ -109,6 +109,7 @@ + npwrapper_CFLAGS = $(CFLAGS) $(X_CFLAGS) $(MOZILLA_CFLAGS) $(GLIB_CFLAGS) + npwrapper_LDFLAGS = $(X_LDFLAGS) $(libpthread_LDFLAGS) $(libsocket_LDFLAGS) + npwrapper_LDFLAGS += $(GLIB_LDFLAGS) ++npwrapper_LDFLAGS += $(LDFLAGS) + + npviewer_PROGRAM = npviewer.bin + npviewer_RAWSRCS = npw-viewer.c npw-common.c npw-malloc.c npw-rpc.c rpc.c debug.c utils.c npruntime.c +@@ -181,6 +182,7 @@ + # XXX use the ELF decoder for native plugins too? + npconfig_LDFLAGS += $(libpthread_LDFLAGS) + endif ++npconfig_LDFLAGS += $(LDFLAGS) + + nploader_PROGRAM = npviewer + nploader_RAWSRCS = npw-viewer.sh diff --git a/www-plugins/nspluginwrapper/nspluginwrapper-1.2.2-r2.ebuild b/www-plugins/nspluginwrapper/nspluginwrapper-1.2.2-r2.ebuild new file mode 100644 index 000000000000..65328c0a44d4 --- /dev/null +++ b/www-plugins/nspluginwrapper/nspluginwrapper-1.2.2-r2.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-plugins/nspluginwrapper/nspluginwrapper-1.2.2-r2.ebuild,v 1.1 2009/08/21 15:56:46 chutzpah Exp $ + +EAPI=2 + +inherit eutils nsplugins multilib flag-o-matic + +DESCRIPTION="Netscape Plugin Wrapper - Load 32bit plugins on 64bit browser" +HOMEPAGE="http://www.gibix.net/projects/nspluginwrapper/" +SRC_URI="http://www.gibix.net/projects/${PN}/files/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND=">=x11-libs/gtk+-2 + net-misc/curl + app-emulation/emul-linux-x86-xlibs + app-emulation/emul-linux-x86-gtklibs + || ( >=sys-apps/util-linux-2.13 sys-apps/setarch )" +DEPEND="${RDEPEND} + dev-util/pkgconfig" + +autoinstall() { + if [[ -x /usr/bin/${PN} ]]; then + einfo "Auto installing 32bit plugins..." + ${PN} -a -i + ls /usr/$(get_libdir)/nsbrowser/plugins + + # Remove wrappers if equivalent 64-bit plugins exist + # TODO: May be better to patch nspluginwrapper so it doesn't create + # duplicate wrappers in the first place... + local DIR64="${ROOT}/usr/$(get_libdir)/nsbrowser/plugins/" + for f in "${DIR64}"/npwrapper.*.so; do + local PLUGIN=${f##*/npwrapper.} + if [[ -f ${DIR64}/${PLUGIN} ]]; then + einfo " Removing duplicate wrapper for native 64-bit ${PLUGIN}" + ${PN} -r "${f}" + fi + done + fi +} + +src_prepare() { + epatch "${FILESDIR}/${P}-gcc44.patch" + epatch "${FILESDIR}/${P}-npidentifiers.patch" + epatch "${FILESDIR}/${P}-respect-ldflags.patch" +} + +src_configure() { + replace-flags -O3 -O2 + + econf --enable-biarch \ + --target-cpu=i386 \ + --with-lib32=$(ABI=x86 get_libdir) \ + --with-lib64=$(get_libdir) \ + --pkglibdir=/usr/$(get_libdir)/${PN} +} + +src_compile() { + emake LDFLAGS_32="-m32 ${LDFLAGS}" || die "emake failed" +} + +src_install() { + emake -j1 DESTDIR="${D}" install || die "emake install failed" + + inst_plugin "/usr/$(get_libdir)/${PN}/x86_64/linux/npwrapper.so" + dosym "/usr/$(get_libdir)/${PN}/x86_64/linux/npconfig" "/usr/bin/${PN}" + + dodoc NEWS README TODO ChangeLog +} + +pkg_postinst() { + autoinstall + elog "Any 32bit plugins you currently have installed have now been" + elog "configured to work in a 64bit browser. Any plugins you install in" + elog "the future will first need to be setup with:" + elog " \"nspluginwrapper -i \"" + elog "before they will function in a 64bit browser" + elog +} + +# this is terribly ugly, but without a way to query portage as to whether +# we are upgrading/reinstalling a package versus unmerging, I can't think of +# a better way + +pkg_prerm() { + einfo "Removing wrapper plugins..." + ${PN} --auto --remove +} + +pkg_postrm() { + autoinstall +} -- cgit v1.2.3-65-gdbad