/[gentoo-x86]/www-plugins/nspluginwrapper/nspluginwrapper-1.4.4-r3.ebuild
Gentoo

Contents of /www-plugins/nspluginwrapper/nspluginwrapper-1.4.4-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Sat Aug 4 09:44:23 2012 UTC (9 months, 2 weeks ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
Stable for amd64, wrt bug #425826

(Portage version: 2.1.10.65/cvs/Linux x86_64)

1 chutzpah 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 ago 1.3 # $Header: /var/cvsroot/gentoo-x86/www-plugins/nspluginwrapper/nspluginwrapper-1.4.4-r3.ebuild,v 1.2 2012/05/03 06:08:02 jdhore Exp $
4 chutzpah 1.1
5     EAPI=2
6    
7     inherit eutils multilib nsplugins flag-o-matic toolchain-funcs
8    
9     DESCRIPTION="Netscape Plugin Wrapper - Load 32bit plugins on 64bit browser"
10     HOMEPAGE="http://nspluginwrapper.org/"
11     SRC_URI="http://web.mit.edu/davidben/Public/nspluginwrapper/${P}.tar.gz"
12    
13     LICENSE="GPL-2"
14     SLOT="0"
15 ago 1.3 KEYWORDS="amd64"
16 chutzpah 1.1 IUSE=""
17    
18     RDEPEND=">=x11-libs/gtk+-2:2
19     net-misc/curl
20     app-emulation/emul-linux-x86-xlibs
21     app-emulation/emul-linux-x86-gtklibs
22     >=sys-apps/util-linux-2.13"
23     DEPEND="${RDEPEND}
24 jdhore 1.2 virtual/pkgconfig"
25 chutzpah 1.1
26     autoinstall() {
27     if [[ -x /usr/bin/${PN} ]]; then
28     einfo "Auto installing 32bit plugins..."
29     ${PN} -a -i
30     ls /usr/$(get_libdir)/nsbrowser/plugins
31    
32     # Remove wrappers if equivalent 64-bit plugins exist
33     # TODO: May be better to patch nspluginwrapper so it doesn't create
34     # duplicate wrappers in the first place...
35     local DIR64="${ROOT}/usr/$(get_libdir)/nsbrowser/plugins/"
36     for f in "${DIR64}"/npwrapper.*.so; do
37     local PLUGIN=${f##*/npwrapper.}
38     if [[ -f ${DIR64}/${PLUGIN} ]]; then
39     einfo " Removing duplicate wrapper for native 64-bit ${PLUGIN}"
40     ${PN} -r "${f}"
41     fi
42     done
43     fi
44     }
45    
46     src_prepare() {
47     epatch "${FILESDIR}/${PN}-1.3.0-gdk-native-windows.patch"
48    
49     epatch "${FILESDIR}/${P}-parallel-make.patch"
50     epatch "${FILESDIR}/${P}-compile-on-hardened.patch"
51     epatch "${FILESDIR}/${P}-dont-unload-libraries.patch"
52     epatch "${FILESDIR}/${P}-dont-include-gthread.patch"
53     epatch "${FILESDIR}/${P}-link-to-libdl.patch"
54     epatch "${FILESDIR}/${P}-link-to-libgthread.patch"
55    
56     sed -i -r "s:^libnoxshm_LDFLAGS = :libnoxshm_LDFLAGS = -L/usr/$(ABI=x86 get_libdir)/ :" \
57     Makefile || die "sed failed"
58     }
59    
60     src_configure() {
61     replace-flags -O3 -O2
62    
63     ./configure \
64     --with-cc="$(tc-getCC)" \
65     --with-cxx="$(tc-getCXX)" \
66     --enable-biarch \
67     --target-cpu=i386 \
68     --with-lib32=$(ABI=x86 get_libdir) \
69     --with-lib64=$(get_libdir) \
70     --pkglibdir=/usr/$(get_libdir)/${PN} \
71     || die "configure failed"
72     }
73    
74     src_compile() {
75     emake LDFLAGS_32="-m32 ${LDFLAGS}" || die "emake failed"
76     }
77    
78     src_install() {
79     emake DESTDIR="${D}" install || die "emake install failed"
80    
81     dosym "/usr/$(get_libdir)/${PN}/x86_64/linux/npconfig" "/usr/bin/${PN}" \
82     || die "dosym failed"
83    
84     keepdir "/usr/$(get_libdir)/${PLUGINS_DIR}" || die "keepdir failed"
85    
86     dodoc NEWS README TODO
87     }
88    
89     pkg_postinst() {
90     autoinstall
91     elog "Any 32bit plugins you currently have installed have now been"
92     elog "configured to work in a 64bit browser. Any plugins you install in"
93     elog "the future will first need to be setup with:"
94     elog " \"nspluginwrapper -i <path-to-32bit-plugin>\""
95     elog "before they will function in a 64bit browser"
96     elog
97     }
98    
99     # this is terribly ugly, but without a way to query portage as to whether
100     # we are upgrading/reinstalling a package versus unmerging, I can't think of
101     # a better way
102    
103     pkg_prerm() {
104     einfo "Removing wrapper plugins..."
105     ${PN} --auto --remove
106     }
107    
108     pkg_postrm() {
109     autoinstall
110     }

  ViewVC Help
Powered by ViewVC 1.1.17