144 lines
6.7 KiB
Bash
144 lines
6.7 KiB
Bash
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=5
|
||
|
|
||
|
inherit eutils multilib
|
||
|
|
||
|
DESCRIPTION="A browser plugin which allows one to use windows-only plugins inside Linux browsers."
|
||
|
HOMEPAGE="http://fds-team.de/cms/index.html https://launchpad.net/pipelight"
|
||
|
SRC_URI="https://bitbucket.org/mmueller2012/pipelight/get/v${PV}.tar.gz -> ${P}.tar.gz
|
||
|
binary-pluginloader? ( http://repos.fds-team.de/pluginloader/v${PV}/pluginloader.tar.gz -> pluginloader-prebuilt-v${PV}.tar.gz )"
|
||
|
LICENSE="GPL-2 LGPL-2.1 MPL-1.1"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~x86"
|
||
|
IUSE="adobereader +binary-pluginloader flash foxitpdf grandstream installation-dialogs npactivex roblox shockwave +silverlight static unity3d"
|
||
|
|
||
|
DEPEND="app-arch/cabextract
|
||
|
>=app-emulation/wine-1.7.16[compholio]
|
||
|
x11-apps/mesa-progs"
|
||
|
|
||
|
RDEPEND="${DEPEND}"
|
||
|
|
||
|
S="${WORKDIR}/mmueller2012-pipelight-487f8db5a03d"
|
||
|
|
||
|
src_prepare() {
|
||
|
if use binary-pluginloader; then
|
||
|
mv ${WORKDIR}/src/windows/pluginloader.exe ${S}/src/windows/pluginloader.exe
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
|
||
|
local myargs
|
||
|
if use binary-pluginloader; then
|
||
|
myargs+="--win32-prebuilt"
|
||
|
elif use !binary-pluginloader; then
|
||
|
if use static; then
|
||
|
myargs+=" --win32-static"
|
||
|
else
|
||
|
myargs+=" --win32-cxx=$(/usr/bin/which wineg++)"
|
||
|
fi
|
||
|
fi
|
||
|
if use installation-dialogs; then
|
||
|
myargs+=" --show-installation-dialogs"
|
||
|
fi
|
||
|
|
||
|
# We're not using econf because this is not an autotools configure script
|
||
|
./configure \
|
||
|
--prefix=/usr \
|
||
|
--wine-path=/usr/bin/wine \
|
||
|
--moz-plugin-path=/usr/$(get_libdir)/nsbrowser/plugins \
|
||
|
${myargs}
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
default
|
||
|
#LICENSE is taken from src/linux/basicplugin.c in the pipelight source code.
|
||
|
sed -n -e '/BEGIN LICENSE/,/END LICENSE/p' ${S}/src/linux/basicplugin.c >> ${S}/LICENSE
|
||
|
dodoc ${S}/LICENSE debian/changelog
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
einfo "Creating copies of libpipelight.so..."
|
||
|
pipelight-plugin --create-mozilla-plugins
|
||
|
|
||
|
#The following plugins are not created by "pipelight-plugin --create-mozilla-plugins" and must be "unlocked"
|
||
|
use adobereader && pipelight-plugin --unlock-plugin adobereader
|
||
|
use foxitpdf && pipelight-plugin --unlock-plugin foxitpdf
|
||
|
use grandstream && pipelight-plugin --unlock-plugin grandstream
|
||
|
use npactivex && pipelight-plugin --unlock-plugin npactivex
|
||
|
use roblox && pipelight-plugin --unlock-plugin roblox
|
||
|
use shockwave && pipelight-plugin --unlock-plugin shockwave
|
||
|
|
||
|
einfo "Enabling plugins..."
|
||
|
# Setup symlinks to enable plugins based on USE flags
|
||
|
use adobereader && ln -sf /usr/$(get_libdir)/pipelight/libpipelight-adobereader.so /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-adobereader.so
|
||
|
use flash && ln -sf /usr/$(get_libdir)/pipelight/libpipelight-flash.so /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-flash.so
|
||
|
use foxitpdf && ln -sf /usr/$(get_libdir)/pipelight/libpipelight-foxitpdf.so /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-foxitpdf.so
|
||
|
use grandstream && ln -sf /usr/$(get_libdir)/pipelight/libpipelight-grandstream.so /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-grandstream.so
|
||
|
use npactivex && ln -sf /usr/$(get_libdir)/pipelight/libpipelight-npactivex.so /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-npactivex.so
|
||
|
use roblox && ln -sf /usr/$(get_libdir)/pipelight/libpipelight-roblox.so /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-roblox.so
|
||
|
use shockwave && ln -sf /usr/$(get_libdir)/pipelight/libpipelight-shockwave.so /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-shockwave.so
|
||
|
use silverlight && ln -sf /usr/$(get_libdir)/pipelight/libpipelight-silverlight5.1.so /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-silverlight5.1.so
|
||
|
use unity3d && ln -sf /usr/$(get_libdir)/pipelight/libpipelight-unity3d.so /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-unity3d.so
|
||
|
|
||
|
echo
|
||
|
elog "When you first start your browser after installing Pipelight, Pipelight will "
|
||
|
elog "download and install any enabled plugins. This may take a few minutes to "
|
||
|
elog "complete. "
|
||
|
elog
|
||
|
elog "Some web sites will check what operating system you are using and will not "
|
||
|
elog "function properly if they detect Linux. For these sites, you will need to "
|
||
|
elog "install and enable a user agent string editor. The user agent string "
|
||
|
elog "recommended by upstream for many Silverlight apps is "
|
||
|
elog "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120427 Firefox/15.0a1 "
|
||
|
elog "and for many Unity 3D apps is "
|
||
|
elog "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like"
|
||
|
elog " Gecko) Version/5.1.3 Safari/534.53.10 "
|
||
|
elog "See https://answers.launchpad.net/pipelight/+faq/2351 for more information. "
|
||
|
elog
|
||
|
elog "GPU acceleration is not enabled by default for all graphics cards. See "
|
||
|
elog "https://answers.launchpad.net/pipelight/+faq/2364 for more information. "
|
||
|
echo
|
||
|
}
|
||
|
|
||
|
pkg_prerm() {
|
||
|
einfo "Removing copies of libpipelight.so..."
|
||
|
pipelight-plugin --remove-mozilla-plugins
|
||
|
|
||
|
einfo "Disabling plugins..."
|
||
|
if [ -h /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-adobereader.so ] ; then
|
||
|
rm /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-adobereader.so
|
||
|
fi
|
||
|
if [ -h /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-flash.so ] ; then
|
||
|
rm /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-flash.so
|
||
|
fi
|
||
|
if [ -h /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-foxitpdf.so ] ; then
|
||
|
rm /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-foxitpdf.so
|
||
|
fi
|
||
|
if [ -h /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-grandstream.so ] ; then
|
||
|
rm /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-grandstream.so
|
||
|
fi
|
||
|
if [ -h /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-npactivex.so ] ; then
|
||
|
rm /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-npactivex.so
|
||
|
fi
|
||
|
if [ -h /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-roblox.so ] ; then
|
||
|
rm /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-roblox.so
|
||
|
fi
|
||
|
if [ -h /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-shockwave.so ] ; then
|
||
|
rm /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-shockwave.so
|
||
|
fi
|
||
|
if [ -h /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-silverlight4.so ] ; then
|
||
|
rm /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-silverlight4.so
|
||
|
fi
|
||
|
if [ -h /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-silverlight5.0.so ] ; then
|
||
|
rm /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-silverlight5.0.so
|
||
|
fi
|
||
|
if [ -h /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-silverlight5.1.so ] ; then
|
||
|
rm /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-silverlight5.1.so
|
||
|
fi
|
||
|
if [ -h /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-unity3d.so ] ; then
|
||
|
rm /usr/$(get_libdir)/nsbrowser/plugins/libpipelight-unity3d.so
|
||
|
fi
|
||
|
}
|