summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-www/nspluginwrapper/nspluginwrapper-1.1.0-r1.ebuild')
-rw-r--r--net-www/nspluginwrapper/nspluginwrapper-1.1.0-r1.ebuild78
1 files changed, 78 insertions, 0 deletions
diff --git a/net-www/nspluginwrapper/nspluginwrapper-1.1.0-r1.ebuild b/net-www/nspluginwrapper/nspluginwrapper-1.1.0-r1.ebuild
new file mode 100644
index 000000000000..158d6c84c80a
--- /dev/null
+++ b/net-www/nspluginwrapper/nspluginwrapper-1.1.0-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/nspluginwrapper/nspluginwrapper-1.1.0-r1.ebuild,v 1.1 2008/10/02 03:16:56 chutzpah Exp $
+
+inherit eutils nsplugins multilib
+
+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
+ 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"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # should fix some crashing
+ epatch "${FILESDIR}/${P}-windowless-crash.patch"
+
+ # bug #238403
+ epatch "${FILESDIR}/${P}-quiet-64bit-plugin-warnings.patch"
+}
+
+src_compile() {
+ econf --with-biarch \
+ --with-lib32=$(ABI=x86 get_libdir) \
+ --with-lib64=$(get_libdir) \
+ --pkglibdir=/usr/$(get_libdir)/${PN}
+
+ emake || 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() {
+ einfo "Auto installing 32bit plugins..."
+ ${PN} -a -i
+ 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() {
+ if [[ -x /usr/bin/${PN} ]]; then
+ einfo "Auto installing 32bit plugins..."
+ ${PN} --auto --install
+ fi
+}