diff options
Diffstat (limited to 'user/arcticfox/APKBUILD')
-rw-r--r-- | user/arcticfox/APKBUILD | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/user/arcticfox/APKBUILD b/user/arcticfox/APKBUILD new file mode 100644 index 000000000..da5bce014 --- /dev/null +++ b/user/arcticfox/APKBUILD @@ -0,0 +1,131 @@ +# Maintainer: A. Wilcox <awilfox@adelielinux.org> +pkgname=arcticfox +pkgver=45.1 +pkgrel=0 +pkgdesc="Arctic Fox web browser (fork of Firefox with PPC support)" +url="https://github.com/rmottola/Arctic-Fox/wiki" +arch="pmmx ppc ppc64 x86" +options="!check" # Disable tests. +license="MPL-2.0" +depends="" +makedepends="alsa-lib-dev bzip2-dev dbus-glib-dev gconf-dev gtk+2.0-dev + gtk+3.0-dev hunspell-dev icu-dev libevent-dev libidl-dev + libjpeg-turbo-dev libnotify-dev libogg-dev libtheora-dev libvorbis-dev + libxt-dev libxcomposite-dev mesa-dev nspr-dev automake libtool + pulseaudio-dev sqlite-dev startup-notification-dev autoconf2.13 + bsd-compat-headers cmd:which openssl-dev sed yasm zip" +subpackages="$pkgname-dev" +source="arcticfox-$pkgver.tar.gz::https://github.com/rmottola/Arctic-Fox/archive/refs/tags/v$pkgver.tar.gz + mozconfig + https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz + arcticfox.desktop + + hunspell.patch + override-cxx-version.patch + stackwalk-x86-ppc.patch + " +builddir="$srcdir/Arctic-Fox-$pkgver" +_mozappdir="/usr/lib/$pkgname-$pkgver" +ldpath="$_mozappdir" + +unpack() { + default_unpack + + [ -z $SKIP_PYTHON ] || return 0 + msg "Killing all remaining hope for humanity and building Python 2..." + cd "$srcdir" + [ -d python ] && rm -r python + mkdir python + # 19:39 <+solar> just make the firefox build process build its own py2 copy + # 20:03 <calvin> TheWilfox: there's always violence + cd Python-2.7.15 + ./configure --prefix="$srcdir/python" + make -j $JOBS + # 6 tests failed: + # test__locale test_os test_posix test_re test_strptime test_time + # make test + make -j $JOBS install +} + +prepare() { + default_prepare + + cp "$srcdir"/mozconfig "$builddir"/mozconfig + echo "ac_add_options --host=\"$CHOST\"" >> "$builddir"/mozconfig + echo "ac_add_options --target=\"$CTARGET\"" >> "$builddir"/mozconfig + echo "mk_add_options MOZ_MAKE_FLAGS=\"-j$JOBS\"" >> "$builddir"/mozconfig + # Needed, see upstream https://github.com/rmottola/Arctic-Fox/issues/125 + # on ppc, fails in NSFrameState::operator& without these flags + export CFLAGS="$CFLAGS -O1 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" + export LDFLAGS="$LDFLAGS -Wl,-rpath,$_mozappdir" + + # arch-specific configuration + case "$CARCH" in + pmmx|x86*|arm*) + echo "ac_add_options --disable-elf-hack" >> "$builddir"/mozconfig + ;; + ppc) + export LDFLAGS="$LDFLAGS -latomic" + ;; + ppc64) + echo "ac_add_options --enable-altivec" >> "$builddir"/mozconfig + ;; + s390x) + echo "ac_add_options --disable-startupcache" >> "$builddir"/mozconfig + ;; + esac + + echo "ac_add_options --enable-optimize=\"$CFLAGS\"" >> "$builddir"/mozconfig +} + +build() { + export CFLAGS="$CFLAGS -Wno-dangling-pointer -Wno-array-bounds -Wno-comment -Wno-maybe-uninitialized -Wno-misleading-indentation -Wno-multistatement-macros -Wno-stringop-overflow -Wno-unused-function -Wno-unused-value -Wno-ignored-qualifiers -Wno-deprecated-declarations -Wno-implicit-fallthrough -Wno-unused-but-set-variable -Wno-int-in-bool-context -Wno-stringop-overread -Wno-address -Wno-use-after-free" + export CXXFLAGS="$CFLAGS -Wno-class-memaccess -Wno-changes-meaning -Wno-subobject-linkage -Wno-return-local-addr -Wno-unused-local-typedefs" + export SHELL=/bin/sh + export BUILD_OFFICIAL=1 + export MOZILLA_OFFICIAL=1 + export USE_SHORT_LIBNAME=1 + export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system + export PATH="$PATH:$srcdir/python/bin" + export CXX="/usr/bin/g++ -std=gnu++17" + + # set rpath so linker finds the libs + export UNIXCONFDIR="$srcdir" + + ./mach configure + # parallel make bug hit on gwyn (64 threads) + ./mach build -j1 export + ./mach build +} + +package() { + export PATH="$PATH:$srcdir/python/bin" + DESTDIR="$pkgdir" ./mach install + + for pngsize in 16 32 48; do + install -D -m644 \ + "browser/branding/$pkgname/default$pngsize.png" \ + "$pkgdir"/usr/share/icons/hicolor/${pngsize}x${pngsize}/apps/$pkgname.png + done + + install -D -m644 "browser/branding/$pkgname/mozicon128.png" \ + "$pkgdir"/usr/share/pixmaps/$pkgname.png + install -D -m644 $srcdir/$pkgname.desktop \ + "$pkgdir"/usr/share/applications/$pkgname.desktop +} + +dev() { + mkdir -p "$subpkgdir"/usr/lib "$subpkgdir"/usr/share + mv "$pkgdir"/usr/lib/$pkgname-devel-$pkgver \ + "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/share/idl "$subpkgdir"/usr/share/ + default_dev +} + +sha512sums="0b24bc8cf201a78517c7934c119b1e21d511068e8ea06c8b7f5ce65e5867e9f091cc0c8c65b0f8c78e8637d27dd3d505126d355c8ca5693f1b0417020b838800 arcticfox-45.1.tar.gz +ce5312b4fcf07d0dd0496366f6e3be406ef19a389f67a3eb8e3df62232d9eb08ed1a5e212dee1725d907bb025bc3da19b6d0b0d97210893846eb8206890fe8de mozconfig +27ea43eb45fc68f3d2469d5f07636e10801dee11635a430ec8ec922ed790bb426b072da94df885e4dfa1ea8b7a24f2f56dd92f9b0f51e162330f161216bd6de6 Python-2.7.15.tar.xz +d4f9a2a64cb8c1e679a13429e62cfd2e8a44cf54896c2999258571ab990711fbc3d078ce655efd90437e60ef113af1e5277f416f5cf78dfea21f82c481f6929b arcticfox.desktop +50cc077df6d17358f5dcffcabb1a75087b58ac46f60d9d5fc8f2d407e93a26d89778e4c09a5203f2a55bc9f9ddb247f4482483d30f495bc9e3393fad37a322d7 hunspell.patch +bf63b06c030b388711554a4eff36fc50f2af802b59a9f1d7c5b42f11fcc1dd806d53980bdd89bf9518fc51ba25a812c892dfaf47e9d50b33a82ebad9462da92a override-cxx-version.patch +a0f97b8b3e5b0d93b155f1678a3d5984b52ede440202656d35237a6e7025b4a1315c114a1a87c3974d0d43b0f637e186b2be6422c44ba5f111ede53893e39c54 stackwalk-x86-ppc.patch" |