mirror of
https://github.com/gryf/webbrowser-overlay.git
synced 2025-12-19 04:20:25 +01:00
Added ebuilds for version 29.2.0 and 29.3.0.
This commit is contained in:
7
README.rst
Normal file
7
README.rst
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
====================================
|
||||||
|
Unofficial Webbrowser Gentoo Overlay
|
||||||
|
====================================
|
||||||
|
|
||||||
|
`Webbrowser`_ is a fork of Pale Moon, which is a fork of a Firefox.
|
||||||
|
|
||||||
|
.. _Webbrowser: https://git.nuegia.net/webbrowser.git
|
||||||
153
eclass/webbrowser-1.eclass
Normal file
153
eclass/webbrowser-1.eclass
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
inherit check-reqs gnome2-utils toolchain-funcs xdg-utils
|
||||||
|
|
||||||
|
EXPORT_FUNCTIONS pkg_pretend pkg_preinst pkg_postinst pkg_postrm pkg_setup
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
# Package
|
||||||
|
###
|
||||||
|
|
||||||
|
webbrowser-1_pkg_pretend() {
|
||||||
|
# Ensure that we have enough disk space to compile:
|
||||||
|
CHECKREQS_DISK_BUILD=${REQUIRED_BUILDSPACE}
|
||||||
|
check-reqs_pkg_setup
|
||||||
|
}
|
||||||
|
|
||||||
|
webbrowser-1_pkg_preinst() {
|
||||||
|
gnome2_icon_savelist
|
||||||
|
}
|
||||||
|
|
||||||
|
webbrowser-1_pkg_postinst() {
|
||||||
|
# Update mimedb for the new .desktop file:
|
||||||
|
xdg_desktop_database_update
|
||||||
|
gnome2_icon_cache_update
|
||||||
|
}
|
||||||
|
|
||||||
|
webbrowser-1_pkg_postrm() {
|
||||||
|
gnome2_icon_cache_update
|
||||||
|
}
|
||||||
|
|
||||||
|
webbrowser-1_pkg_setup() {
|
||||||
|
# Nested configure scripts in mozilla products generate unrecognized
|
||||||
|
# options false positives when toplevel configure passes downwards:
|
||||||
|
export QA_CONFIGURE_OPTIONS=".*"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
# Messages
|
||||||
|
###
|
||||||
|
|
||||||
|
official-branding_warning() {
|
||||||
|
elog "You are enabling the official branding. You may not redistribute this build"
|
||||||
|
elog "to any users on your network or the internet. Doing so puts yourself into"
|
||||||
|
elog "a legal problem with Moonchild Productions."
|
||||||
|
elog "You can disable the official branding by emerging ${PN} _without_"
|
||||||
|
elog "the official-branding USE flag."
|
||||||
|
}
|
||||||
|
|
||||||
|
unsupported_compiler_warning() {
|
||||||
|
ewarn "Building Pale Moon with a compiler other than a supported gcc version"
|
||||||
|
ewarn "may result in an unstable build."
|
||||||
|
ewarn "Be aware that building Pale Moon with an unsupported compiler"
|
||||||
|
ewarn "means that the official support channels may refuse to offer any"
|
||||||
|
ewarn "kind of help in case the build fails or the browser behaves incorrectly."
|
||||||
|
ewarn "Supported GCC versions: ${GCC_SUPPORTED_VERSIONS// /, }"
|
||||||
|
if [[ "$1" == "gcc" ]]; then
|
||||||
|
ewarn "Selected GCC version: $(gcc-version)"
|
||||||
|
else
|
||||||
|
ewarn "Unsupported compiler selected: $1"
|
||||||
|
fi
|
||||||
|
ewarn "To disable this warning unset the PALEMOON_ENABLE_UNSUPPORTED_COMPILERS"
|
||||||
|
ewarn "environment variable."
|
||||||
|
}
|
||||||
|
|
||||||
|
unsupported_compiler_error() {
|
||||||
|
eerror "Building Pale Moon with a compiler other than a supported gcc version"
|
||||||
|
eerror "may result in an unstable build."
|
||||||
|
eerror "You can use gcc-config to change your compiler profile, just remember"
|
||||||
|
eerror "to change it back afterwards."
|
||||||
|
eerror "You need to have the appropriate versions of gcc installed for them"
|
||||||
|
eerror "to be shown in gcc-config."
|
||||||
|
eerror "Alternatively, you can set the PALEMOON_ENABLE_UNSUPPORTED_COMPILERS"
|
||||||
|
eerror "environment variable to 1 either by exporting it from the current shell"
|
||||||
|
eerror "or by adding it to your make.conf file."
|
||||||
|
eerror "Be aware though that building Pale Moon with an unsupported compiler"
|
||||||
|
eerror "means that the official support channels may refuse to offer any"
|
||||||
|
eerror "kind of help in case the build fails or the browser behaves incorrectly."
|
||||||
|
eerror "Supported GCC versions: ${GCC_SUPPORTED_VERSIONS// /, }"
|
||||||
|
if [[ "$1" == "gcc" ]]; then
|
||||||
|
eerror "Selected GCC version: $(gcc-version)"
|
||||||
|
else
|
||||||
|
eerror "Unsupported compiler selected: $1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
# Configuration
|
||||||
|
###
|
||||||
|
|
||||||
|
mozconfig_init() {
|
||||||
|
echo "ac_add_options --enable-application=webbrowser" > "${S}/.mozconfig"
|
||||||
|
}
|
||||||
|
|
||||||
|
mozconfig_enable() {
|
||||||
|
for option in "$@"; do
|
||||||
|
echo "ac_add_options --enable-${option}" >> "${S}/.mozconfig"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
mozconfig_disable() {
|
||||||
|
for option in "$@"; do
|
||||||
|
echo "ac_add_options --disable-${option}" >> "${S}/.mozconfig"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
mozconfig_with() {
|
||||||
|
for option in "$@"; do
|
||||||
|
echo "ac_add_options --with-${option}" >> "${S}/.mozconfig"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
mozconfig_opt() {
|
||||||
|
echo "mk_add_options $1=$2" >> "${S}/.mozconfig"
|
||||||
|
}
|
||||||
|
|
||||||
|
mozconfig_var() {
|
||||||
|
echo "$1=$2" >> "${S}/.mozconfig"
|
||||||
|
}
|
||||||
|
|
||||||
|
mozconfig_ac() {
|
||||||
|
echo "ac_add_options $1=$2" >> "${S}/.mozconfig"
|
||||||
|
}
|
||||||
|
|
||||||
|
set_pref() {
|
||||||
|
echo "pref(\"$1\", $2);" >> "${S}/${obj_dir}/dist/bin/browser/defaults/preferences/palemoon.js"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
# Branding
|
||||||
|
###
|
||||||
|
|
||||||
|
install_branding_files() {
|
||||||
|
cp -rL "${S}/${obj_dir}/dist/branding" "${extracted_dir}/"
|
||||||
|
local size sizes icon_path icon name
|
||||||
|
sizes="16 32 48"
|
||||||
|
icon_path="${extracted_dir}/branding"
|
||||||
|
icon="${PN}"
|
||||||
|
name="WebBrowser"
|
||||||
|
for size in ${sizes}; do
|
||||||
|
insinto "/usr/share/icons/hicolor/${size}x${size}/apps"
|
||||||
|
newins "${icon_path}/default${size}.png" "${icon}.png"
|
||||||
|
done
|
||||||
|
# The 128x128 icon has a different name:
|
||||||
|
insinto "/usr/share/icons/hicolor/128x128/apps"
|
||||||
|
newins "${icon_path}/mozicon128.png" "${icon}.png"
|
||||||
|
# Install a 48x48 icon into /usr/share/pixmaps for legacy DEs:
|
||||||
|
newicon "${icon_path}/default48.png" "${icon}.png"
|
||||||
|
newmenu "${FILESDIR}/icon/${PN}.desktop" "${PN}.desktop"
|
||||||
|
sed -i -e "s:@NAME@:${name}:" -e "s:@ICON@:${icon}:" \
|
||||||
|
"${ED}/usr/share/applications/${PN}.desktop" || die
|
||||||
|
}
|
||||||
1
metadata/layout.conf
Normal file
1
metadata/layout.conf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
masters = gentoo
|
||||||
1
profiles/repo_name
Normal file
1
profiles/repo_name
Normal file
@@ -0,0 +1 @@
|
|||||||
|
webbrowser-overlay
|
||||||
4
www-client/webbrowser/Manifest
Normal file
4
www-client/webbrowser/Manifest
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
AUX icon/webbrowser.desktop 405 BLAKE2B 1e5222a0bf1cbd14fa2f1a9752a4c7203ee133cf4e5365528e046832efe71a63c8501c1830ff8617fc17374b67a0fbf4ceba3ff7e04508642d5fe0d6d52956b7 SHA512 9663f243084cffe1f44a2635d90176727258c8fa2ea62f8d9406c7d9b8ef4f89bb2e17f209c2c3b324e9e79f12e1054e968cda24d00655cb7207da56b68ccaca
|
||||||
|
EBUILD webbrowser-29.2.0.ebuild 5873 BLAKE2B 169afd3aef50b6fb26a5c10e8821f485433728a21c3539de0a650b8506175911d47fb4350bd84493dbae4debe510069b9d182409d5691745b955eb095cb369ab SHA512 7b7dbcf7c94d0684da1783f3a080ae5c4d3184885184dc5f570eb21b755a00ec931aa8c6301deb8404d3bae49ed63bd70f383ebe5143123415ef944052cede7f
|
||||||
|
EBUILD webbrowser-29.3.0.ebuild 5873 BLAKE2B 169afd3aef50b6fb26a5c10e8821f485433728a21c3539de0a650b8506175911d47fb4350bd84493dbae4debe510069b9d182409d5691745b955eb095cb369ab SHA512 7b7dbcf7c94d0684da1783f3a080ae5c4d3184885184dc5f570eb21b755a00ec931aa8c6301deb8404d3bae49ed63bd70f383ebe5143123415ef944052cede7f
|
||||||
|
MISC metadata.xml 712 BLAKE2B abe743081a4b259fb0c5de8db0d69d22cce37f13d6dd5db2b87155ee51993925b9533b6c5af66a16571bf0b293a05deae1a0c2a0170d1f12d888ea985b91a4b5 SHA512 d44726d6209ee32c0e80ea55b9bd091bd3e37248cdfea60fb1274bfe0a1ee530793b34d5f821a3b58408b9623bbef8c3bfbc64302785e31b6f0296a6a1702932
|
||||||
9
www-client/webbrowser/files/icon/webbrowser.desktop
Normal file
9
www-client/webbrowser/files/icon/webbrowser.desktop
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=@NAME@
|
||||||
|
Comment=Web Browser
|
||||||
|
Exec=webbrowser %u
|
||||||
|
Icon=@ICON@
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
|
||||||
|
Categories=Network;WebBrowser;
|
||||||
16
www-client/webbrowser/metadata.xml
Normal file
16
www-client/webbrowser/metadata.xml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<use>
|
||||||
|
<flag name="devtools">Enable Mozilla Developer Tools</flag>
|
||||||
|
<flag name="shared-js">Create a shared JavaScript library</flag>
|
||||||
|
<flag name="gtk2">Use <pkg>x11-libs/gtk+</pkg>:2</flag>
|
||||||
|
<flag name="gtk3">Use <pkg>x11-libs/gtk+</pkg>:3</flag>
|
||||||
|
<flag name="jemalloc">Replace memory allocator with jemalloc</flag>
|
||||||
|
<flag name="necko-wifi">Enable the necko wifi scanner</flag>
|
||||||
|
<flag name="official-branding">Enable official branding</flag>
|
||||||
|
<flag name="optimize">Enable compiler optimization</flag>
|
||||||
|
<flag name="valgrind">Enable Valgrind integration hooks</flag>
|
||||||
|
</use>
|
||||||
|
</pkgmetadata>
|
||||||
|
|
||||||
246
www-client/webbrowser/webbrowser-29.2.0.ebuild
Normal file
246
www-client/webbrowser/webbrowser-29.2.0.ebuild
Normal file
@@ -0,0 +1,246 @@
|
|||||||
|
EAPI=7
|
||||||
|
|
||||||
|
REQUIRED_BUILDSPACE='16G'
|
||||||
|
|
||||||
|
inherit webbrowser-1 git-r3 flag-o-matic pax-utils desktop
|
||||||
|
|
||||||
|
KEYWORDS="~x86 ~amd64"
|
||||||
|
DESCRIPTION="Webbrowser - fork of Pale Moon"
|
||||||
|
HOMEPAGE="https://git.nuegia.net/webbrowser.git"
|
||||||
|
|
||||||
|
SLOT="0"
|
||||||
|
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
|
||||||
|
IUSE="
|
||||||
|
+devtools
|
||||||
|
+gtk2
|
||||||
|
-gtk3
|
||||||
|
jack
|
||||||
|
+jemalloc
|
||||||
|
+optimize
|
||||||
|
-pulseaudio
|
||||||
|
+system-bz2
|
||||||
|
+system-jpeg
|
||||||
|
+system-libevent
|
||||||
|
+system-libvpx
|
||||||
|
+system-zlib
|
||||||
|
+threads
|
||||||
|
-valgrind
|
||||||
|
-webrtc
|
||||||
|
"
|
||||||
|
|
||||||
|
EGIT_REPO_URI="https://git.nuegia.net/webbrowser.git"
|
||||||
|
EGIT_COMMIT="v${PV}"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
>=sys-devel/autoconf-2.13:2.1
|
||||||
|
dev-lang/python:2.7
|
||||||
|
>=dev-lang/perl-5.6
|
||||||
|
dev-lang/yasm
|
||||||
|
"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
x11-libs/libXt
|
||||||
|
app-arch/zip
|
||||||
|
media-libs/freetype
|
||||||
|
media-libs/fontconfig
|
||||||
|
|
||||||
|
optimize? ( sys-libs/glibc )
|
||||||
|
|
||||||
|
valgrind? ( dev-util/valgrind )
|
||||||
|
|
||||||
|
gtk2? ( >=x11-libs/gtk+-2.18.0:2 )
|
||||||
|
gtk3? ( >=x11-libs/gtk+-3.4.0:3 )
|
||||||
|
|
||||||
|
media-libs/alsa-lib
|
||||||
|
pulseaudio? ( media-sound/pulseaudio )
|
||||||
|
|
||||||
|
media-video/ffmpeg[x264]
|
||||||
|
|
||||||
|
system-libvpx? ( media-libs/libvpx )
|
||||||
|
system-libevent? ( dev-libs/libevent )
|
||||||
|
system-jpeg? ( virtual/jpeg )
|
||||||
|
system-zlib? ( sys-libs/zlib )
|
||||||
|
system-bz2? ( app-arch/bzip2 )
|
||||||
|
|
||||||
|
jack? ( virtual/jack )
|
||||||
|
"
|
||||||
|
|
||||||
|
REQUIRED_USE="
|
||||||
|
jemalloc? ( !valgrind )
|
||||||
|
^^ ( gtk2 gtk3 )
|
||||||
|
"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Ensure that our plugins dir is enabled by default:
|
||||||
|
sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
|
||||||
|
"${S}/platform/xpcom/io/nsAppFileLocationProvider.cpp" \
|
||||||
|
|| die "sed failed to replace plugin path for 32bit!"
|
||||||
|
sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
|
||||||
|
"${S}/platform/xpcom/io/nsAppFileLocationProvider.cpp" \
|
||||||
|
|| die "sed failed to replace plugin path for 64bit!"
|
||||||
|
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
# Basic configuration:
|
||||||
|
mozconfig_init
|
||||||
|
|
||||||
|
mozconfig_disable tests eme parental-controls accessibility gamepad
|
||||||
|
mozconfig_disable necko-wifi updater sync mozril-geoloc gconf
|
||||||
|
mozconfig_enable alsa
|
||||||
|
|
||||||
|
if use optimize; then
|
||||||
|
O='-O2 -pipe -ftree-parallelize-loops=4 -lgomp -fopenmp -msse2 -mfpmath=sse'
|
||||||
|
mozconfig_enable "optimize=\"${O}\""
|
||||||
|
filter-flags '-O*' '-msse2' '-mfpmath=sse'
|
||||||
|
else
|
||||||
|
mozconfig_disable optimize
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use threads; then
|
||||||
|
mozconfig_with pthreads
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use jack; then
|
||||||
|
mozconfig_enable jack
|
||||||
|
else
|
||||||
|
mozconfig_disable jack
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use jemalloc; then
|
||||||
|
mozconfig_enable jemalloc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use valgrind; then
|
||||||
|
mozconfig_enable valgrind
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use gtk2; then
|
||||||
|
mozconfig_enable default-toolkit=\"cairo-gtk2\"
|
||||||
|
mozconfig_var __GTK_VERSION 2
|
||||||
|
export MOZ_PKG_SPECIAL=2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use gtk3; then
|
||||||
|
mozconfig_enable default-toolkit=\"cairo-gtk3\"
|
||||||
|
mozconfig_var __GTK_VERSION 3
|
||||||
|
export MOZ_PKG_SPECIAL=3
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use system-libvpx; then
|
||||||
|
mozconfig_enable system-libvpx
|
||||||
|
else
|
||||||
|
mozconfig_disable system-libvpx
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use system-libevent; then
|
||||||
|
mozconfig_enable system-libevent
|
||||||
|
else
|
||||||
|
mozconfig_disable system-libevent
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use system-jpeg; then
|
||||||
|
mozconfig_enable system-jpeg
|
||||||
|
else
|
||||||
|
mozconfig_disable system-jpeg
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use system-zlib; then
|
||||||
|
mozconfig_enable system-zlib
|
||||||
|
else
|
||||||
|
mozconfig_disable system-zlib
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use system-bz2; then
|
||||||
|
mozconfig_enable system-bz2
|
||||||
|
else
|
||||||
|
mozconfig_disable system-bz2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use pulseaudio; then
|
||||||
|
mozconfig_enable pulseaudio
|
||||||
|
else
|
||||||
|
mozconfig_disable pulseaudio
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use devtools; then
|
||||||
|
mozconfig_enable devtools
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use webrtc; then
|
||||||
|
mozconfig_enable webrtc
|
||||||
|
else
|
||||||
|
mozconfig_disable webrtc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Enabling this causes xpcshell to hang during the packaging process,
|
||||||
|
# so disabling it until the cause can be tracked down. It most likely
|
||||||
|
# has something to do with the sandbox since the issue goes away when
|
||||||
|
# building with FEATURES="-sandbox -usersandbox".
|
||||||
|
mozconfig_disable precompiled-startupcache
|
||||||
|
|
||||||
|
# Mainly to prevent system's NSS/NSPR from taking precedence over
|
||||||
|
# the built-in ones:
|
||||||
|
append-ldflags -Wl,-rpath="${EPREFIX}/usr/$(get_libdir)/webbrowser"
|
||||||
|
|
||||||
|
export MOZBUILD_STATE_PATH="${WORKDIR}/mach_state"
|
||||||
|
mozconfig_opt PYTHON $(which python2)
|
||||||
|
mozconfig_opt AUTOCONF $(which autoconf-2.13)
|
||||||
|
mozconfig_opt MOZ_MAKE_FLAGS "\"${MAKEOPTS}\""
|
||||||
|
# TODO: hardcoded ones
|
||||||
|
mozconfig_ac --x-libraries /usr/lib64
|
||||||
|
mozconfig_var _BUILD_64 1
|
||||||
|
mozconfig_opt AUTOCLOBBER 1
|
||||||
|
|
||||||
|
# Shorten obj dir to limit some errors linked to the path size hitting
|
||||||
|
# a kernel limit (127 chars):
|
||||||
|
mozconfig_opt MOZ_OBJDIR "@TOPSRCDIR@/o"
|
||||||
|
|
||||||
|
# Disable mach notifications, which also cause sandbox access violations:
|
||||||
|
export MOZ_NOSPAM=1
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
# Prevents portage from setting its own XARGS which messes with the
|
||||||
|
# build system checks:
|
||||||
|
# See: https://gitweb.gentoo.org/proj/portage.git/tree/bin/isolated-functions.sh
|
||||||
|
export XARGS="$(which xargs)"
|
||||||
|
|
||||||
|
python2 "${S}/platform/mach" build || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
# obj_dir changes depending on arch, compiler, etc:
|
||||||
|
local obj_dir="$(echo */config.log)"
|
||||||
|
obj_dir="${obj_dir%/*}"
|
||||||
|
|
||||||
|
# Disable MPROTECT for startup cache creation:
|
||||||
|
pax-mark m "${obj_dir}"/dist/bin/xpcshell
|
||||||
|
|
||||||
|
# Set the backspace behaviour to be consistent with the other platforms:
|
||||||
|
set_pref "browser.backspace_action" 0
|
||||||
|
|
||||||
|
# Gotta create the package, unpack it and manually install the files
|
||||||
|
# from there not to miss anything (e.g. the statusbar extension):
|
||||||
|
einfo "Creating the package..."
|
||||||
|
python2 "${S}/platform/mach" mozpackage || die
|
||||||
|
local extracted_dir="${T}/package"
|
||||||
|
mkdir -p "${extracted_dir}"
|
||||||
|
cd "${extracted_dir}"
|
||||||
|
einfo "Extracting the package..."
|
||||||
|
tar xjpf "${S}/${obj_dir}/dist/${P}.linux-${CTARGET_default%%-*}.tar.bz2"
|
||||||
|
einfo "Installing the package..."
|
||||||
|
local dest_libdir="/usr/$(get_libdir)"
|
||||||
|
mkdir -p "${D}/${dest_libdir}"
|
||||||
|
cp -rL "${PN}" "${D}/${dest_libdir}"
|
||||||
|
dosym "${dest_libdir}/${PN}/${PN}" "/usr/bin/${PN}"
|
||||||
|
einfo "Done installing the package."
|
||||||
|
|
||||||
|
# Until JIT-less builds are supported,
|
||||||
|
# also disable MPROTECT on the main executable:
|
||||||
|
pax-mark m "${D}/${dest_libdir}/${PN}/"{webbrowser,webbrowser-bin,plugin-container}
|
||||||
|
|
||||||
|
# Install icons and .desktop for menu entry:
|
||||||
|
install_branding_files
|
||||||
|
}
|
||||||
246
www-client/webbrowser/webbrowser-29.3.0.ebuild
Normal file
246
www-client/webbrowser/webbrowser-29.3.0.ebuild
Normal file
@@ -0,0 +1,246 @@
|
|||||||
|
EAPI=7
|
||||||
|
|
||||||
|
REQUIRED_BUILDSPACE='16G'
|
||||||
|
|
||||||
|
inherit webbrowser-1 git-r3 flag-o-matic pax-utils desktop
|
||||||
|
|
||||||
|
KEYWORDS="~x86 ~amd64"
|
||||||
|
DESCRIPTION="Webbrowser - fork of Pale Moon"
|
||||||
|
HOMEPAGE="https://git.nuegia.net/webbrowser.git"
|
||||||
|
|
||||||
|
SLOT="0"
|
||||||
|
LICENSE="MPL-2.0 GPL-2 LGPL-2.1"
|
||||||
|
IUSE="
|
||||||
|
+devtools
|
||||||
|
+gtk2
|
||||||
|
-gtk3
|
||||||
|
jack
|
||||||
|
+jemalloc
|
||||||
|
+optimize
|
||||||
|
-pulseaudio
|
||||||
|
+system-bz2
|
||||||
|
+system-jpeg
|
||||||
|
+system-libevent
|
||||||
|
+system-libvpx
|
||||||
|
+system-zlib
|
||||||
|
+threads
|
||||||
|
-valgrind
|
||||||
|
-webrtc
|
||||||
|
"
|
||||||
|
|
||||||
|
EGIT_REPO_URI="https://git.nuegia.net/webbrowser.git"
|
||||||
|
EGIT_COMMIT="v${PV}"
|
||||||
|
|
||||||
|
DEPEND="
|
||||||
|
>=sys-devel/autoconf-2.13:2.1
|
||||||
|
dev-lang/python:2.7
|
||||||
|
>=dev-lang/perl-5.6
|
||||||
|
dev-lang/yasm
|
||||||
|
"
|
||||||
|
|
||||||
|
RDEPEND="
|
||||||
|
x11-libs/libXt
|
||||||
|
app-arch/zip
|
||||||
|
media-libs/freetype
|
||||||
|
media-libs/fontconfig
|
||||||
|
|
||||||
|
optimize? ( sys-libs/glibc )
|
||||||
|
|
||||||
|
valgrind? ( dev-util/valgrind )
|
||||||
|
|
||||||
|
gtk2? ( >=x11-libs/gtk+-2.18.0:2 )
|
||||||
|
gtk3? ( >=x11-libs/gtk+-3.4.0:3 )
|
||||||
|
|
||||||
|
media-libs/alsa-lib
|
||||||
|
pulseaudio? ( media-sound/pulseaudio )
|
||||||
|
|
||||||
|
media-video/ffmpeg[x264]
|
||||||
|
|
||||||
|
system-libvpx? ( media-libs/libvpx )
|
||||||
|
system-libevent? ( dev-libs/libevent )
|
||||||
|
system-jpeg? ( virtual/jpeg )
|
||||||
|
system-zlib? ( sys-libs/zlib )
|
||||||
|
system-bz2? ( app-arch/bzip2 )
|
||||||
|
|
||||||
|
jack? ( virtual/jack )
|
||||||
|
"
|
||||||
|
|
||||||
|
REQUIRED_USE="
|
||||||
|
jemalloc? ( !valgrind )
|
||||||
|
^^ ( gtk2 gtk3 )
|
||||||
|
"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Ensure that our plugins dir is enabled by default:
|
||||||
|
sed -i -e "s:/usr/lib/mozilla/plugins:/usr/lib/nsbrowser/plugins:" \
|
||||||
|
"${S}/platform/xpcom/io/nsAppFileLocationProvider.cpp" \
|
||||||
|
|| die "sed failed to replace plugin path for 32bit!"
|
||||||
|
sed -i -e "s:/usr/lib64/mozilla/plugins:/usr/lib64/nsbrowser/plugins:" \
|
||||||
|
"${S}/platform/xpcom/io/nsAppFileLocationProvider.cpp" \
|
||||||
|
|| die "sed failed to replace plugin path for 64bit!"
|
||||||
|
|
||||||
|
default
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
# Basic configuration:
|
||||||
|
mozconfig_init
|
||||||
|
|
||||||
|
mozconfig_disable tests eme parental-controls accessibility gamepad
|
||||||
|
mozconfig_disable necko-wifi updater sync mozril-geoloc gconf
|
||||||
|
mozconfig_enable alsa
|
||||||
|
|
||||||
|
if use optimize; then
|
||||||
|
O='-O2 -pipe -ftree-parallelize-loops=4 -lgomp -fopenmp -msse2 -mfpmath=sse'
|
||||||
|
mozconfig_enable "optimize=\"${O}\""
|
||||||
|
filter-flags '-O*' '-msse2' '-mfpmath=sse'
|
||||||
|
else
|
||||||
|
mozconfig_disable optimize
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use threads; then
|
||||||
|
mozconfig_with pthreads
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use jack; then
|
||||||
|
mozconfig_enable jack
|
||||||
|
else
|
||||||
|
mozconfig_disable jack
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use jemalloc; then
|
||||||
|
mozconfig_enable jemalloc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use valgrind; then
|
||||||
|
mozconfig_enable valgrind
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use gtk2; then
|
||||||
|
mozconfig_enable default-toolkit=\"cairo-gtk2\"
|
||||||
|
mozconfig_var __GTK_VERSION 2
|
||||||
|
export MOZ_PKG_SPECIAL=2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use gtk3; then
|
||||||
|
mozconfig_enable default-toolkit=\"cairo-gtk3\"
|
||||||
|
mozconfig_var __GTK_VERSION 3
|
||||||
|
export MOZ_PKG_SPECIAL=3
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use system-libvpx; then
|
||||||
|
mozconfig_enable system-libvpx
|
||||||
|
else
|
||||||
|
mozconfig_disable system-libvpx
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use system-libevent; then
|
||||||
|
mozconfig_enable system-libevent
|
||||||
|
else
|
||||||
|
mozconfig_disable system-libevent
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use system-jpeg; then
|
||||||
|
mozconfig_enable system-jpeg
|
||||||
|
else
|
||||||
|
mozconfig_disable system-jpeg
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use system-zlib; then
|
||||||
|
mozconfig_enable system-zlib
|
||||||
|
else
|
||||||
|
mozconfig_disable system-zlib
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use system-bz2; then
|
||||||
|
mozconfig_enable system-bz2
|
||||||
|
else
|
||||||
|
mozconfig_disable system-bz2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use pulseaudio; then
|
||||||
|
mozconfig_enable pulseaudio
|
||||||
|
else
|
||||||
|
mozconfig_disable pulseaudio
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use devtools; then
|
||||||
|
mozconfig_enable devtools
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use webrtc; then
|
||||||
|
mozconfig_enable webrtc
|
||||||
|
else
|
||||||
|
mozconfig_disable webrtc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Enabling this causes xpcshell to hang during the packaging process,
|
||||||
|
# so disabling it until the cause can be tracked down. It most likely
|
||||||
|
# has something to do with the sandbox since the issue goes away when
|
||||||
|
# building with FEATURES="-sandbox -usersandbox".
|
||||||
|
mozconfig_disable precompiled-startupcache
|
||||||
|
|
||||||
|
# Mainly to prevent system's NSS/NSPR from taking precedence over
|
||||||
|
# the built-in ones:
|
||||||
|
append-ldflags -Wl,-rpath="${EPREFIX}/usr/$(get_libdir)/webbrowser"
|
||||||
|
|
||||||
|
export MOZBUILD_STATE_PATH="${WORKDIR}/mach_state"
|
||||||
|
mozconfig_opt PYTHON $(which python2)
|
||||||
|
mozconfig_opt AUTOCONF $(which autoconf-2.13)
|
||||||
|
mozconfig_opt MOZ_MAKE_FLAGS "\"${MAKEOPTS}\""
|
||||||
|
# TODO: hardcoded ones
|
||||||
|
mozconfig_ac --x-libraries /usr/lib64
|
||||||
|
mozconfig_var _BUILD_64 1
|
||||||
|
mozconfig_opt AUTOCLOBBER 1
|
||||||
|
|
||||||
|
# Shorten obj dir to limit some errors linked to the path size hitting
|
||||||
|
# a kernel limit (127 chars):
|
||||||
|
mozconfig_opt MOZ_OBJDIR "@TOPSRCDIR@/o"
|
||||||
|
|
||||||
|
# Disable mach notifications, which also cause sandbox access violations:
|
||||||
|
export MOZ_NOSPAM=1
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
# Prevents portage from setting its own XARGS which messes with the
|
||||||
|
# build system checks:
|
||||||
|
# See: https://gitweb.gentoo.org/proj/portage.git/tree/bin/isolated-functions.sh
|
||||||
|
export XARGS="$(which xargs)"
|
||||||
|
|
||||||
|
python2 "${S}/platform/mach" build || die
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
# obj_dir changes depending on arch, compiler, etc:
|
||||||
|
local obj_dir="$(echo */config.log)"
|
||||||
|
obj_dir="${obj_dir%/*}"
|
||||||
|
|
||||||
|
# Disable MPROTECT for startup cache creation:
|
||||||
|
pax-mark m "${obj_dir}"/dist/bin/xpcshell
|
||||||
|
|
||||||
|
# Set the backspace behaviour to be consistent with the other platforms:
|
||||||
|
set_pref "browser.backspace_action" 0
|
||||||
|
|
||||||
|
# Gotta create the package, unpack it and manually install the files
|
||||||
|
# from there not to miss anything (e.g. the statusbar extension):
|
||||||
|
einfo "Creating the package..."
|
||||||
|
python2 "${S}/platform/mach" mozpackage || die
|
||||||
|
local extracted_dir="${T}/package"
|
||||||
|
mkdir -p "${extracted_dir}"
|
||||||
|
cd "${extracted_dir}"
|
||||||
|
einfo "Extracting the package..."
|
||||||
|
tar xjpf "${S}/${obj_dir}/dist/${P}.linux-${CTARGET_default%%-*}.tar.bz2"
|
||||||
|
einfo "Installing the package..."
|
||||||
|
local dest_libdir="/usr/$(get_libdir)"
|
||||||
|
mkdir -p "${D}/${dest_libdir}"
|
||||||
|
cp -rL "${PN}" "${D}/${dest_libdir}"
|
||||||
|
dosym "${dest_libdir}/${PN}/${PN}" "/usr/bin/${PN}"
|
||||||
|
einfo "Done installing the package."
|
||||||
|
|
||||||
|
# Until JIT-less builds are supported,
|
||||||
|
# also disable MPROTECT on the main executable:
|
||||||
|
pax-mark m "${D}/${dest_libdir}/${PN}/"{webbrowser,webbrowser-bin,plugin-container}
|
||||||
|
|
||||||
|
# Install icons and .desktop for menu entry:
|
||||||
|
install_branding_files
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user