# Maintainer: Jesus E. # Based on icedove package if [ "${CARCH}" = "i686" ]; then _pgo=false else _pgo=true fi _pkgname=UXP pkgname=icedove-uxp _pkgver=2021.06.02 _appver=2.5 pkgver=52.9.${_pkgver//./} pkgrel=6 pkgdesc="A new generation of Icedove, an XUL-based standalone mail and news reader on the Unified XUL Platform (UXP)." arch=(i686 x86_64) license=(MPL-2.0) depends=(gtk2 hunspell libxt sndio) makedepends=(autoconf-legacy diffutils xorg-imake mesa pkg-config tauthon unzip xenocara-server-xvfb yasm zip) options=(!emptydirs !makeflags) if $_pgo; then makedepends+=(xenocara-server-xvfb) options+=(!ccache) fi url="https://wiki.hyperbola.info/$pkgname" replaces=('icedove' 'thunderbird') conflicts=('icedove' 'thunderbird') provides=('icedove' 'thunderbird') install=$pkgname.install source=("https://repo.hyperbola.info:50000/other/$_pkgname/$_pkgname-$_pkgver.tar.gz" "https://repo.hyperbola.info:50000/other/$pkgname/$pkgname-$_appver.tar.gz" mozconfig $pkgname.desktop vendor.js LICENSE # Application patches 0001-Restore-risky-system-libraries.patch 0002-Add-icedove-uxp-application-specfic-override.patch 0003-Hardcode-AppName-in-nsAppRunner.patch 0004-Disable-SSLKEYLOGFILE-in-NSS.patch 0005-Fix-PGO-Build.patch # build bustage work-around 0006-init-configure-patch.patch # libcubeb patch 0007-Update-libcubeb-to-a1200c34.patch 0008-Don-t-use-toolkit-search-provider.patch 0009-$pkgname-install-dir.patch 0010-remove-malfunctional-searchplugins.patch) sha512sums=('4513e30b38229654f1d02a6f4ba7914408d2169a95884560a9b1024a33fab5292dce41e113be2959fd2efbd8abd0763926352ee4362606a03700cb3ac53aeffa' '1ab5e7e5d62d5d932cda503e3ac711f055b8f531bcee15beeded33f6e9ced7fac16053791dc94714f4b5bc65e2f8985941a9f43d8e5339e06965a5fbb85239c4' '6553e501778cb9efc9ec054edb9b1e6503b8ad2ddeb6938114ab892f8ececb445ac65691e0bf6f794ec836d511940c8a8635a67061bd49344965b14558042e02' 'f0ae28e1a2e5a67a3bd17b3d440960ff488046c11e309655b6dcbe7497f3d840da97bae9833f737013f860b2bb8f3df4099c1ec5c5ed90f786ba3a5a2ad245b6' 'b8c38ba8f40b792fd0dde22d9f0f95c42848f43afcd627abd2bf660b68cb7670a037307f06ed01dc25776620bcb850fb7e89e21cc6f0b17987ee690f52ce4ef1' '5b49d98ce0740ced95de8b8b39a886ee8bc5071302c4c20dbe0421b27dd1ff1aed13115819fc5fd8309745f91a94cf4c8038cf993c6237a536010185727cd7c9' '45bb48b4d8436ef0d9535d3891848bafc3c80ff187597591533eab70a0b160eb2825c4856698e813e5858f8baaf9f054abbcd5ce6d2763a374ef3d1917952f27' '21b137b200a3c2cd91ae6b80a704d1c82c03c590d7f6215135c7bf32a8d4c6ebf7526fe7ec52321e9a2513b11d18418d2aaddea4171a31a3c726a2e02b761118' 'ff74dd292fa0f138d37174a4aa9f4fa8267cd5b020caf401faad7085e0c7d987a06b89fab9faf58cc7723ab819adc678d75d347814ef38abd05df4440c06e227' '4d87565a2ce99a135130fa4340f2f6ab29330d7b7e8eb40607c69951b6e807733e4dc2885bd0082c658605809103ac445d67849183ce1d5ed5aaf21dd412b1ef' '787e271adba2f802737e381aa370331570b2d5254e05d524dc0dd1c941839f9e38a725964104c1e51ba41bb0d585b295eb864477bb66768b19646fb0815ffb9d' '090773648376a996f03094309dd66c3b868a8923d544a02abc44eb8c374603e0126ae72182d9f6c9030fbddefc5d8cdd4d7ca7c817ac02bceb9fba6f3bb27f33' '76f4bac91536785eadfc4bc5a220b586f34acbe36e22b16d65163c0bebf767740d1c65e0f86fe8db550749aa53736d1c735b78b879742834202d7ca9e01f98da' '437f1521aa8eea9b3b6d9f7b030f9879b86daa46a6b70a81cc1cdbc5c1955e82318cb6f293bf08e1dd86ee1588663414669817202f7254d8c56c374515b3eb51' 'a735f553b86843069524cb4df5aa5032aa9d50b3ee200366cfb86452a2b8e8370f25ba192fb4dce09a8d881c7ffdf0573b76bcc4a163d3ab6f73e979e52acf64' '89a23bf0338f47136d25224103cb6c7979606840e23b4de3041360f94dd990b776841331c31497126aaf1b6099d813466887bd9de29c2c1a9fd9c9da71caa824') prepare() { # Move the Unified XUL Platform into our application cd "$srcdir/$pkgname-$_appver" mv "$srcdir/$_pkgname-$_pkgver" mozilla pushd mozilla # Allow us to build with system libs (this is not recommended/untested per UXP devs) patch -p1 -i "$srcdir/0001-Restore-risky-system-libraries.patch" # Apply Icedove-UXP application specific overrides to UXP patch -p1 -i "$srcdir/0002-Add-icedove-uxp-application-specfic-override.patch" # Hardcode AppName in nsAppRunner patch -p1 -i "$srcdir/0003-Hardcode-AppName-in-nsAppRunner.patch" # Disable SSLKEYLOGFILE in NSS patch -p1 -i "$srcdir/0004-Disable-SSLKEYLOGFILE-in-NSS.patch" # Fix PGO build patch -p1 -i "$srcdir/0005-Fix-PGO-Build.patch" # Apply configure fix (Next release) patch -p1 -i "$srcdir/0006-init-configure-patch.patch" # Apply and update libcubeb for sndio support patch -p1 -i "$srcdir/0007-Update-libcubeb-to-a1200c34.patch" # Apply toolkit search bypass patch patch -p1 -i "$srcdir/0008-Don-t-use-toolkit-search-provider.patch" # Remove bad credit records for some CA issuers such as CNNIC, StartCom, Symantec and WoSign sed -e '/^# Certificate .*\(CNNIC\|China\|GDCA\|StartCom\|Symantec\|UCA\|WoSign\)/,/^CKA_TRUST_STEP_UP_APPROVED/d' \ -i security/nss/lib/ckfw/builtins/certdata.txt # Remove further bad credit records for some CA issuers such as GDCA, UCA, vTrus and TrustCor sed -e '/^# Certificate .*\(GDCA\|UCA\|vTrus\|TrustCor\)/,/^CKA_TRUST_STEP_UP_APPROVED/d' \ -i security/nss/lib/ckfw/builtins/certdata.txt popd # Install to /usr/lib/icedove-uxp patch -p1 -i "$srcdir/0009-$pkgname-install-dir.patch" # Adapt Icedove-UXP version to $pkgver sed -i "s|MOZ_APP_VERSION[=]52[.]9[.].*|MOZ_APP_VERSION=52.9.${_pkgver//./}| s|MOZ_APP_VERSION_DISPLAY[=]52[.]9[.].*|MOZ_APP_VERSION_DISPLAY=52.9.${_pkgver//./}| " mail/confvars.sh # Remove malfunctional searchplugins rm mail/locales/en-US/searchplugins/{searx,searx-tor}.xml patch -Np1 -i "$srcdir/0010-remove-malfunctional-searchplugins.patch" # Load our build config cp "$srcdir/mozconfig" .mozconfig mkdir "$srcdir/path" ln -s /usr/bin/tauthon "$srcdir/path/python" } build() { cd "$srcdir/$pkgname-$_appver" # _FORTIFY_SOURCE causes configure failures CPPFLAGS+=" -O2" # Hardening LDFLAGS+=" -Wl,-z,now" export PATH="$srcdir/path:$PATH" if $_pgo; then # Do PGO xvfb-run -a -n 95 -s "-extension GLX -screen 0 1280x1024x24" \ make -f client.mk build MOZ_PGO=1 else make -f client.mk build fi } package() { cd "$srcdir/$pkgname-$_appver" make -f client.mk DESTDIR="$pkgdir" INSTALL_SDK= install install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm644 ../vendor.js "$pkgdir/usr/lib/$pkgname/defaults/preferences/vendor.js" # Install Icedove-UXP menu icon install -Dm644 mail/branding/${pkgname%-*}/${pkgname%-*}.xpm "$pkgdir/usr/share/pixmaps/$pkgname.xpm" # Install Icedove-UXP icons brandingdir=mail/branding/${pkgname%-*}/app-icons icondir="$pkgdir/usr/share/icons/hicolor" for i in 16 22 24 32 48 64 128 256; do install -Dm644 "$brandingdir/${pkgname%-*}$i.png" \ "$icondir/${i}x${i}/apps/$pkgname.png" done install -Dm644 "$brandingdir/${pkgname%-*}big.svg" \ "$icondir/scalable/apps/$pkgname.svg" # Install Icedove-UXP desktop install -d "$pkgdir/usr/share/applications" install -m644 "$srcdir/$pkgname.desktop" \ "$pkgdir/usr/share/applications" # Use system-provided dictionaries rm -rf "$pkgdir/usr/lib/$pkgname/"{dictionaries,hyphenation} ln -s /usr/share/hunspell "$pkgdir/usr/lib/$pkgname/dictionaries" ln -s /usr/share/hyphen "$pkgdir/usr/lib/$pkgname/hyphenation" # Replace duplicate binary with symlink # https://bugzilla.mozilla.org/show_bug.cgi?id=658850 ln -sf $pkgname "$pkgdir/usr/lib/$pkgname/$pkgname-bin" }