diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2012-04-19 01:22:37 +0000 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2012-04-19 01:22:37 +0000 |
commit | 95fa3258ae2bac5d0230f8337895fa6f112ef388 (patch) | |
tree | 6cc7d42637b9fb8d1bf1746b2915f612d3318a49 /www-plugins | |
parent | Revert incorrect libnl change (powertop works with libnl ver 1, 2, or 3), and... (diff) | |
download | gentoo-2-95fa3258ae2bac5d0230f8337895fa6f112ef388.tar.gz gentoo-2-95fa3258ae2bac5d0230f8337895fa6f112ef388.tar.bz2 gentoo-2-95fa3258ae2bac5d0230f8337895fa6f112ef388.zip |
Pull patch from upstream to link against gthread (bug #412337). Use upstream patch for removing gthread.h. Link against libdl when building the player (upstream patch).
(Portage version: 2.1.10.56/cvs/Linux x86_64)
Diffstat (limited to 'www-plugins')
5 files changed, 154 insertions, 4 deletions
diff --git a/www-plugins/nspluginwrapper/ChangeLog b/www-plugins/nspluginwrapper/ChangeLog index 426b32185b35..37b38b36a272 100644 --- a/www-plugins/nspluginwrapper/ChangeLog +++ b/www-plugins/nspluginwrapper/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for www-plugins/nspluginwrapper # 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 $ +# $Header: /var/cvsroot/gentoo-x86/www-plugins/nspluginwrapper/ChangeLog,v 1.26 2012/04/19 01:22:37 chutzpah Exp $ + +*nspluginwrapper-1.4.4-r3 (19 Apr 2012) + + 19 Apr 2012; Patrick McLean <chutzpah@gentoo.org> + +nspluginwrapper-1.4.4-r3.ebuild, + files/nspluginwrapper-1.4.4-dont-include-gthread.patch, + +files/nspluginwrapper-1.4.4-link-to-libdl.patch, + +files/nspluginwrapper-1.4.4-link-to-libgthread.patch: + Pull patch from upstream to link against gthread (bug #412337). Use upstream + patch for removing gthread.h. Link against libdl when building the player + (upstream patch). *nspluginwrapper-1.4.4-r2 (16 Apr 2012) 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 index b42e28873b1a..c1d404ab75d2 100644 --- 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 @@ -1,6 +1,7 @@ -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 +diff --git a/src/npw-player.c b/src/npw-player.c +index a99b8f7..217b5ba 100644 +--- a/src/npw-player.c ++++ b/src/npw-player.c @@ -25,7 +25,6 @@ #include <unistd.h> #include <glib.h> diff --git a/www-plugins/nspluginwrapper/files/nspluginwrapper-1.4.4-link-to-libdl.patch b/www-plugins/nspluginwrapper/files/nspluginwrapper-1.4.4-link-to-libdl.patch new file mode 100644 index 000000000000..28e8f65cf745 --- /dev/null +++ b/www-plugins/nspluginwrapper/files/nspluginwrapper-1.4.4-link-to-libdl.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index e36a991..2a40671 100644 +--- a/Makefile ++++ b/Makefile +@@ -142,7 +142,7 @@ npplayer_CFLAGS += $(GTK_CFLAGS) $(GLIB_CFLAGS) $(MOZILLA_CFLAGS) $(CURL_CFLAGS + npplayer_LDFLAGS = $(LDFLAGS) + npplayer_LDFLAGS += $(libpthread_LDFLAGS) + npplayer_LIBS = $(GTK_LIBS) $(GLIB_LIBS) $(CURL_LIBS) $(X_LIBS) +-npplayer_LIBS += $(libpthread_LIBS) $(libsocket_LIBS) ++npplayer_LIBS += $(libdl_LIBS) $(libpthread_LIBS) $(libsocket_LIBS) + + libnoxshm_LIBRARY = libnoxshm.so + libnoxshm_RAWSRCS = libnoxshm.c diff --git a/www-plugins/nspluginwrapper/files/nspluginwrapper-1.4.4-link-to-libgthread.patch b/www-plugins/nspluginwrapper/files/nspluginwrapper-1.4.4-link-to-libgthread.patch new file mode 100644 index 000000000000..56030c473c42 --- /dev/null +++ b/www-plugins/nspluginwrapper/files/nspluginwrapper-1.4.4-link-to-libgthread.patch @@ -0,0 +1,15 @@ +diff --git a/configure b/configure +index 5f3dd86..09c400a 100755 +--- a/configure ++++ b/configure +@@ -499,8 +499,8 @@ fi + + # check for Glib 2.0 compile CFLAGS + if $pkgconfig --exists glib-2.0; then +- GLIB_CFLAGS=`$pkgconfig --cflags glib-2.0` +- GLIB_LIBS=`$pkgconfig --libs glib-2.0` ++ GLIB_CFLAGS=`$pkgconfig --cflags glib-2.0 gthread-2.0` ++ GLIB_LIBS=`$pkgconfig --libs glib-2.0 gthread-2.0` + GLIB_VERSION=`$pkgconfig --modversion glib-2.0` + else + echo "GLIB 2.0 environment not found" diff --git a/www-plugins/nspluginwrapper/nspluginwrapper-1.4.4-r3.ebuild b/www-plugins/nspluginwrapper/nspluginwrapper-1.4.4-r3.ebuild new file mode 100644 index 000000000000..2346e9c5b043 --- /dev/null +++ b/www-plugins/nspluginwrapper/nspluginwrapper-1.4.4-r3.ebuild @@ -0,0 +1,110 @@ +# 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-r3.ebuild,v 1.1 2012/04/19 01:22:37 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" + epatch "${FILESDIR}/${P}-link-to-libdl.patch" + epatch "${FILESDIR}/${P}-link-to-libgthread.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 +} |