From 998a996a46c591203193bc7826fc39515f4f94b7 Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Sat, 18 May 2019 00:12:41 -0700 Subject: Initial commit --- PKGBUILD | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ mozconfig.in | 51 ++++++++++++++++++++++++++++++++++++++ system-libs.patch | 34 +++++++++++++++++++++++++ 3 files changed, 159 insertions(+) create mode 100644 PKGBUILD create mode 100644 mozconfig.in create mode 100644 system-libs.patch diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..8dde6e2 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,74 @@ +# Maintainer: jc_gargma +# Maintainer (AUR): WorMzy Tykashi +# Contributor (AUR): artiom +# Contributor (AUR): ilikenwf +# Contributor (AUR): American_Jesus + +# # I maintain this because: +# AUR version uses git +# AUR version does not use system libs + +pkgname=palemoon +pkgver=28.5.0 +pkgrel=1 +pkgdesc="Open source web browser based on Firefox focusing on efficiency." +arch=(x86_64 i686) +license=(MPL GPL LGPL) +url="https://www.palemoon.org/" +depends=(gtk2 desktop-file-utils libxt startup-notification mime-types dbus-glib + libpulse alsa-lib + libffi bzip2 cairo icu libjpeg-turbo libevent libvpx nspr nss pixman libpng sqlite zlib) +makedepends=(unzip zip python2 yasm gconf + jack + autoconf2.13) +optdepends=('ffmpeg: various video and audio support' + 'alsa-utils: ALSA support' + 'jack: Jack support' + 'pulseaudio: PulseAudio support' + 'hunspell-en_CA: Spell checking, Canadian English') +source=(palemoon-$pkgver.tar.gz::https://github.com/MoonchildProductions/UXP/archive/PM${pkgver}_Release.tar.gz + mozconfig.in + system-libs.patch) +sha256sums=('bf7bc91dce0b992d3ce8ed8d6b332bbb9b3d1191847133d3401c0612827f1930' + '12036d3ee0d2586c39f26fd42e3ec692a318789844b4a8fc0648df5725b1324b' + 'ddd6e39161b789c3dab7e963d5f837b5a72155c59f88abc66dce5fe9d5d0a2e9') + +prepare() { + sed 's#%SRCDIR%#'"$srcdir"'#g' mozconfig.in > mozconfig + sed -i 's#xlocale#locale#' UXP-PM${pkgver}_Release/intl/icu/source/i18n/digitlst.cpp +} + +build() { + cd UXP-PM${pkgver}_Release + + # I'll use system libs if I darn well choose, thank you very much. + patch -Np1 -i ../system-libs.patch + rm build/directive4.py + + export MOZBUILD_STATE_PATH="$srcdir/mozbuild" + export MOZCONFIG="$srcdir/mozconfig" + export CPPFLAGS="$CPPFLAGS -O2" + python2 mach build +} + +package() { + cd pmbuild + make package + cd dist + install -d "$pkgdir"/usr/{bin,lib} + cp -r palemoon/ "$pkgdir/usr/lib/$pkgname" + ln -s "../lib/$pkgname/palemoon" "$pkgdir/usr/bin/palemoon" + + # icons + install -Dm644 palemoon/browser/chrome/icons/default/default16.png \ + "$pkgdir/usr/share/icons/hicolor/16x16/apps/$pkgname.png" + install -Dm644 palemoon/browser/chrome/icons/default/default32.png \ + "$pkgdir/usr/share/icons/hicolor/32x32/apps/$pkgname.png" + install -Dm644 palemoon/browser/chrome/icons/default/default48.png \ + "$pkgdir/usr/share/icons/hicolor/48x48/apps/$pkgname.png" + install -Dm644 palemoon/browser/icons/mozicon128.png \ + "$pkgdir/usr/share/icons/hicolor/128x128/apps/$pkgname.png" + + # install desktop file + install -Dm644 "$srcdir/UXP-PM${pkgver}_Release/application/palemoon/branding/official/palemoon.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop" +} diff --git a/mozconfig.in b/mozconfig.in new file mode 100644 index 0000000..7273005 --- /dev/null +++ b/mozconfig.in @@ -0,0 +1,51 @@ +mk_add_options AUTOCLOBBER=1 +mk_add_options MOZ_OBJDIR=%SRCDIR%/pmbuild +ac_add_options --enable-application=palemoon + +ac_add_options --enable-optimize="-O2" + +ac_add_options --enable-official-branding +export MOZILLA_OFFICIAL=1 + +ac_add_options --enable-default-toolkit=cairo-gtk2 +ac_add_options --enable-jemalloc +ac_add_options --enable-strip +ac_add_options --with-pthreads + +ac_add_options --enable-system-ffi +ac_add_options --with-system-bz2 +ac_add_options --with-system-cairo +ac_add_options --with-system-jpeg +ac_add_options --with-system-icu +ac_add_options --with-system-libevent +ac_add_options --with-system-libvpx +ac_add_options --with-system-nspr +ac_add_options --with-system-nss +ac_add_options --with-system-pixman +ac_add_options --with-system-png +ac_add_options --with-system-sqlite +ac_add_options --with-system-zlib + +ac_add_options --disable-crashreporter +ac_add_options --disable-debug +ac_add_options --disable-debug-symbols +ac_add_options --disable-webspeech +ac_add_options --disable-webspeechtestbackend + +ac_add_options --disable-tests +ac_add_options --disable-eme +ac_add_options --disable-parental-controls +ac_add_options --disable-accessibility +ac_add_options --disable-webrtc +ac_add_options --disable-gamepad +ac_add_options --disable-necko-wifi +ac_add_options --disable-updater + +ac_add_options --x-libraries=/usr/lib + +# Use python2 +mk_add_options PYTHON=/usr/bin/python2 + +# uncomment the following to limit the number of parallel build jobs +# remember to run updpkgsums after, or you'll get a checksum failure +mk_add_options MOZ_MAKE_FLAGS="-j4" diff --git a/system-libs.patch b/system-libs.patch new file mode 100644 index 0000000..4c7ed24 --- /dev/null +++ b/system-libs.patch @@ -0,0 +1,34 @@ +--- a/old-configure.in ++++ b/old-configure.in +@@ -5503,31 +5503,0 @@ +-dnl ======================================================== +-dnl Directive 4 +-dnl ======================================================== +- +-DIRECTIVE4_LIST=" +-MOZ_OFFICIAL_BRANDING=$MOZ_OFFICIAL_BRANDING +-MOZ_BRANDING_DIRECTORY=$MOZ_BRANDING_DIRECTORY +-MC_BASILISK=$MC_BASILISK +-MC_PALEMOON=$MC_PALEMOON +-MOZ_EME=$MOZ_EME +-MOZ_WEBRTC=$MOZ_WEBRTC +-MOZ_SYSTEM_LIBEVENT=$MOZ_SYSTEM_LIBEVENT +-MOZ_SYSTEM_NSS=$MOZ_SYSTEM_NSS +-MOZ_SYSTEM_NSPR=$MOZ_SYSTEM_NSPR +-MOZ_SYSTEM_JPEG=$MOZ_SYSTEM_JPEG +-MOZ_SYSTEM_ZLIB=$MOZ_SYSTEM_ZLIB +-MOZ_SYSTEM_BZ2=$MOZ_SYSTEM_BZ2 +-MOZ_SYSTEM_PNG=$MOZ_SYSTEM_PNG +-MOZ_SYSTEM_LIBVPX=$MOZ_SYSTEM_LIBVPX +-MOZ_SYSTEM_SQLITE=$MOZ_SYSTEM_SQLITE +-MOZ_SYSTEM_JEMALLOC=$MOZ_SYSTEM_JEMALLOC" +- +-DIRECTIVE4=`$PYTHON $_topsrcdir/build/directive4.py $DIRECTIVE4_LIST` +- +-if test -n "$DIRECTIVE4"; then +- if test -n "$MC_PRIVATE_BUILD"; then +- AC_MSG_WARN([Private Build - The configuration you have chosen to use with official branding deviates from official build configuration. Your build is thus for personal and private use only and must not be (re)distributed - Please see: http://www.palemoon.org/redist.shtml]) +- else +- AC_MSG_ERROR([Branding Violation - Please see: http://www.palemoon.org/redist.shtml]) +- fi +-fi -- cgit v1.2.1