summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <chutzpah@gentoo.org>2009-08-21 15:56:46 +0000
committerPatrick McLean <chutzpah@gentoo.org>2009-08-21 15:56:46 +0000
commit2f24cae0207c7535860af9b888d1a7fac94c6810 (patch)
treec7286cb6201dbefde82ccc39742c6268ef8a17e6 /www-plugins
parentold (diff)
downloadgentoo-2-2f24cae0207c7535860af9b888d1a7fac94c6810.tar.gz
gentoo-2-2f24cae0207c7535860af9b888d1a7fac94c6810.tar.bz2
gentoo-2-2f24cae0207c7535860af9b888d1a7fac94c6810.zip
Add patch and modify ebuild to properly respect LDFLAGS (bug #278607).
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'www-plugins')
-rw-r--r--www-plugins/nspluginwrapper/ChangeLog9
-rw-r--r--www-plugins/nspluginwrapper/files/nspluginwrapper-1.2.2-respect-ldflags.patch19
-rw-r--r--www-plugins/nspluginwrapper/nspluginwrapper-1.2.2-r2.ebuild96
3 files changed, 123 insertions, 1 deletions
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 <chutzpah@gentoo.org>
+ +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/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 <path-to-32bit-plugin>\""
+ 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
+}