diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2012-04-16 04:08:38 +0000 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2012-04-16 04:08:38 +0000 |
commit | 119f16d4eb48ba98b65895c372d88a944efdab02 (patch) | |
tree | 0d7731fceb7ecb4e6e11ed3507da5a0f0f779a24 /www-plugins/nspluginwrapper | |
parent | Stable for HPPA (bug #412113). (diff) | |
download | gentoo-2-119f16d4eb48ba98b65895c372d88a944efdab02.tar.gz gentoo-2-119f16d4eb48ba98b65895c372d88a944efdab02.tar.bz2 gentoo-2-119f16d4eb48ba98b65895c372d88a944efdab02.zip |
Revision bump, add patches for bugs 412053 and 381873. Also don't use gcc directly (bug #380747), and add die functions.
(Portage version: 2.1.10.56/cvs/Linux x86_64)
Diffstat (limited to 'www-plugins/nspluginwrapper')
4 files changed, 144 insertions, 2 deletions
diff --git a/www-plugins/nspluginwrapper/ChangeLog b/www-plugins/nspluginwrapper/ChangeLog index c0c9c4d72961..426b32185b35 100644 --- a/www-plugins/nspluginwrapper/ChangeLog +++ b/www-plugins/nspluginwrapper/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for www-plugins/nspluginwrapper -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-plugins/nspluginwrapper/ChangeLog,v 1.24 2011/08/31 08:26:44 chainsaw Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/www-plugins/nspluginwrapper/ChangeLog,v 1.25 2012/04/16 04:08:38 chutzpah Exp $ + +*nspluginwrapper-1.4.4-r2 (16 Apr 2012) + + 16 Apr 2012; Patrick McLean <chutzpah@gentoo.org> + +nspluginwrapper-1.4.4-r2.ebuild, + +files/nspluginwrapper-1.4.4-dont-include-gthread.patch, + +files/nspluginwrapper-1.4.4-dont-unload-libraries.patch: + Revision bump, add patches for bugs 412053 and 381873. Also don't use gcc + directly (bug #380747), and add die functions. 31 Aug 2011; Tony Vroon <chainsaw@gentoo.org> nspluginwrapper-1.4.4-r1.ebuild: diff --git a/www-plugins/nspluginwrapper/files/nspluginwrapper-1.4.4-dont-include-gthread.patch b/www-plugins/nspluginwrapper/files/nspluginwrapper-1.4.4-dont-include-gthread.patch new file mode 100644 index 000000000000..b42e28873b1a --- /dev/null +++ b/www-plugins/nspluginwrapper/files/nspluginwrapper-1.4.4-dont-include-gthread.patch @@ -0,0 +1,11 @@ +diff -ur nspluginwrapper-1.4.4.orig/src/npw-player.c nspluginwrapper-1.4.4/src/npw-player.c +--- nspluginwrapper-1.4.4.orig/src/npw-player.c 2011-06-30 20:18:57.000000000 -0700 ++++ nspluginwrapper-1.4.4/src/npw-player.c 2012-04-15 21:03:05.351084354 -0700 +@@ -25,7 +25,6 @@ + #include <unistd.h> + #include <glib.h> + #include <glib/gstdio.h> +-#include <glib/gthread.h> + #include <gtk/gtk.h> + #include <gdk/gdkx.h> + #include <gdk/gdkkeysyms.h> diff --git a/www-plugins/nspluginwrapper/files/nspluginwrapper-1.4.4-dont-unload-libraries.patch b/www-plugins/nspluginwrapper/files/nspluginwrapper-1.4.4-dont-unload-libraries.patch new file mode 100644 index 000000000000..70793f9e7626 --- /dev/null +++ b/www-plugins/nspluginwrapper/files/nspluginwrapper-1.4.4-dont-unload-libraries.patch @@ -0,0 +1,14 @@ +diff --git a/src/npw-config.c b/src/npw-config.c +index e9e8007..4ad4bc1 100644 +--- a/src/npw-config.c ++++ b/src/npw-config.c +@@ -534,7 +534,8 @@ static bool is_wrapper_plugin(const char *plugin_path, NPW_PluginInfo *out_plugi + return false; + + bool ret = is_wrapper_plugin_handle(handle, out_plugin_info); +- dlclose(handle); ++ /* Intentionally leak the handle; many libraries crash when unloaded. */ ++ /* dlclose(handle); */ + return ret; + } + diff --git a/www-plugins/nspluginwrapper/nspluginwrapper-1.4.4-r2.ebuild b/www-plugins/nspluginwrapper/nspluginwrapper-1.4.4-r2.ebuild new file mode 100644 index 000000000000..e8755dad255d --- /dev/null +++ b/www-plugins/nspluginwrapper/nspluginwrapper-1.4.4-r2.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-plugins/nspluginwrapper/nspluginwrapper-1.4.4-r2.ebuild,v 1.1 2012/04/16 04:08:38 chutzpah Exp $ + +EAPI=2 + +inherit eutils multilib nsplugins flag-o-matic toolchain-funcs + +DESCRIPTION="Netscape Plugin Wrapper - Load 32bit plugins on 64bit browser" +HOMEPAGE="http://nspluginwrapper.org/" +SRC_URI="http://web.mit.edu/davidben/Public/nspluginwrapper/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND=">=x11-libs/gtk+-2:2 + net-misc/curl + app-emulation/emul-linux-x86-xlibs + app-emulation/emul-linux-x86-gtklibs + >=sys-apps/util-linux-2.13" +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}/${PN}-1.3.0-gdk-native-windows.patch" + + epatch "${FILESDIR}/${P}-parallel-make.patch" + epatch "${FILESDIR}/${P}-compile-on-hardened.patch" + epatch "${FILESDIR}/${P}-dont-unload-libraries.patch" + epatch "${FILESDIR}/${P}-dont-include-gthread.patch" + + sed -i -r "s:^libnoxshm_LDFLAGS = :libnoxshm_LDFLAGS = -L/usr/$(ABI=x86 get_libdir)/ :" \ + Makefile || die "sed failed" +} + +src_configure() { + replace-flags -O3 -O2 + + ./configure \ + --with-cc="$(tc-getCC)" \ + --with-cxx="$(tc-getCXX)" \ + --enable-biarch \ + --target-cpu=i386 \ + --with-lib32=$(ABI=x86 get_libdir) \ + --with-lib64=$(get_libdir) \ + --pkglibdir=/usr/$(get_libdir)/${PN} \ + || die "configure failed" +} + +src_compile() { + emake LDFLAGS_32="-m32 ${LDFLAGS}" || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + dosym "/usr/$(get_libdir)/${PN}/x86_64/linux/npconfig" "/usr/bin/${PN}" \ + || die "dosym failed" + + keepdir "/usr/$(get_libdir)/${PLUGINS_DIR}" || die "keepdir failed" + + dodoc NEWS README TODO +} + +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 +} |