summaryrefslogtreecommitdiff
path: root/nonprism/icedove/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'nonprism/icedove/PKGBUILD')
-rw-r--r--nonprism/icedove/PKGBUILD240
1 files changed, 98 insertions, 142 deletions
diff --git a/nonprism/icedove/PKGBUILD b/nonprism/icedove/PKGBUILD
index 589618fb5..03bdcef85 100644
--- a/nonprism/icedove/PKGBUILD
+++ b/nonprism/icedove/PKGBUILD
@@ -11,109 +11,98 @@
# Contributor: Isaac David <isacdaavid@isacdaavid.info>
# Contributor: bill-auger <bill-auger@programmer.net>
+
# parabola changes and rationale:
# - rebranded to icedove
-# - added makedepends: quilt mozilla-searchplugins python2-blessings
-# - added replaces, conflicts: thunderbird
+# - added makedepends for branding: quilt mozilla-searchplugins imagemagick
# - disabled tests, they break in an environment without network access.
# - disabled geo-location
# - removed nonfree search engines
# - removed support for insecure chat protocols
+
_pkgname=thunderbird
pkgname=icedove
-replaces=("$_pkgname")
epoch=1
-pkgver=68.9.0
+pkgver=78.9.1
pkgrel=1
pkgrel+=.parabola1.nonprism1
-_brandingver=68.6
+_brandingver=78.9
_brandingrel=1
pkgdesc='Standalone mail and news reader based on Mozilla Thunderbird'
pkgdesc+=', without support for unsafe and dangerous for privacy protocols'
-url="https://wiki.parabola.nu/$pkgname"
+url=https://wiki.parabola.nu/${pkgname}
arch=(x86_64)
arch+=(i686 armv7h)
license=(MPL GPL LGPL)
-depends=(gtk3 libxt startup-notification mime-types dbus-glib alsa-lib
- nss hunspell sqlite ttf-font) # libvpx
-# TODO: depends+=(libicui18n.so libicuuc.so)
-depends_armv7h=(icu=65)
-depends_i686+=(libicui18n.so libicuuc.so)
-depends_x86_64+=(libicui18n.so libicuuc.so)
-makedepends=(unzip zip diffutils python python2 yasm nasm mesa imake libpulse inetutils xorg-server-xvfb
- autoconf2.13 rust clang llvm gtk2 cbindgen nodejs)
-makedepends+=(quilt mozilla-searchplugins imagemagick)
-optdepends=('libcanberra: sound support')
+depends=(
+ glibc gtk3 libgdk-3.so mime-types dbus libdbus-1.so dbus-glib alsa-lib nss
+ hunspell sqlite ttf-font libvpx libvpx.so zlib bzip2 botan libwebp libevent
+ libjpeg-turbo libffi nspr gcc-libs libx11 libxrender libxfixes libxext
+ libxcomposite libxdamage pango libpango-1.0.so cairo gdk-pixbuf2 icu
+ libicui18n.so libicuuc.so freetype2 libfreetype.so fontconfig
+ libfontconfig.so glib2 libglib-2.0.so pixman libpixman-1.so gnupg
+)
+optdepends=(
+ 'libotr: OTR support for active one-to-one chats'
+)
+makedepends=(
+ unzip zip diffutils python python-setuptools yasm nasm mesa imake libpulse
+ inetutils xorg-server-xvfb autoconf2.13 rust clang llvm gtk2 cbindgen nodejs
+ gawk perl findutils libotr
+)
+#makedepends[15]='llvm10' # FIXME: DEBUG: | rustup: error while loading shared libraries: libLLVM-10.so: cannot open shared object file: No such file or directory
+# # ERROR: Command `rustup which rustc` failed with exit status 127.
+makedepends+=(quilt imagemagick)
+replaces=(${_pkgname})
options=(!emptydirs !makeflags)
source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz{,.asc}
- $pkgname.desktop)
-source+=(https://repo.parabola.nu/other/icedove/${pkgname}_$_brandingver-$_brandingrel.branding.tar.xz{,.sig}
- libre-searchengines.patch
- mozilla-1338795-regression.patch)
+ $pkgname.desktop
+ vendor-prefs.js
+ distribution.ini
+ mozconfig.cfg
+ configure-fix-passing-system-bzip2-ldflags.patch
+ thunderbird-78.5-rust-1.48.patch)
+source+=(https://repo.parabola.nu/other/icedove/${pkgname}_$_brandingver-$_brandingrel.branding.tar.xz{,.sig})
source_armv7h=(arm-wasm-vfp.patch)
-sha512sums=('891472c95ba6ff46061131504e89010da512a84b0e1dea0482e603fd4c87f11e099280a245c7dd9fc9320c48229c26602565c089d86f1a1f4271b29b6fc606f0'
+sha512sums=('fa27a327ce10a0c16877ac02338aace257f60f69af40d12ae5bb2055f6536db9ba45995765ac0eaa1aea2fa2b353ac9dc6eb06fcdf6cb4ae6fafcd65fe5970c6'
'SKIP'
'a3c9815491d9bed0440c60f35867a5b8a2a1343521f288035fcc46e651a11b926c75a9eca2d262b43d510a7a7119709b53637f1b00ddbbee8e5b0a4b33d7b8fd'
- '5784493253f9b2b231a7f18d7c3c4a4bb9aec7ac4fa801772ac223342676e388ae0c094b95d89d92c1bd38c2f19feb6f51e074d0ea20228a256b6240ecf34832'
- 'SKIP'
- '3f3160441aa17a50b8bf9f95a0fed8e3428864901d7368409903289f069f51fa94e24b6140bf17981b91b55df77c7c29adb870dda9f1596a77ce1a54a62cac00'
- 'f4e892fc7af85877ef6cedd82313f6c0f335cb676cfb30badaa127c51aed00773212b99f1598f5709d6f481f12264463d6334bcde8e8da38ec1ea666622d28a1')
+ 'e21d30a8b79724eda3488ac2bf9dfeb0c7f6bf39e59c37f17574b529d33043765eb54408a55fcbf6f3afa7a58ca99124992d443cdff23ac5c9bdbff33c75f60f'
+ '31d46f91d9612d30d8553a19d0d309d743467e58b568a4aeea3caf6bd805ba00656561c84a1511c59bce1cf24ba323bfad2cd26a19985f1bf7dfb6d282642972'
+ '1eba1593ff0a9642d89e6d3e03388b1aef00437b2f6c1f0d81d250d9845b80e057c246eaeb31d8d22001abd65556a9603d1db597baf864481a5bfb7000886b29'
+ 'e3ed2708b8354015cb3d2c81048d1ce4932d1effbe2b40efa7cf9b45c1b923b9fd708645e2f8aa0136a485a3f7ce6b396b85721aaf535a4a764fd5005fb7e222'
+ 'bbb8b0e7b9c67372eb22e1d6b6b5758fe504ded84c40a076d4a064374a1bf34ac12d5b514b328ac9ca984d976b9e0fbde81e68a66bec915c997d6be0c0917584')
sha512sums_armv7h=('c25883c4860e511a99d9fbfba5b824145c0862729101721605725f609ca2a41848b741dd100eff390f57031dc5f14af3ea30133de30f75cb20197c420ae20972')
+sha512sums+=('78fee952c9bc826a0a7ec262d442150177bf887349641279dafae803b9832a0dd9b8d0722cc084459077a5310eb4f6de6a8d7ffaff6741afe1359f292a373f34'
+ 'SKIP')
validpgpkeys=(14F26682D0916CDD81E37B6D61B7B526D98F0353) # Mozilla Software Releases <release@mozilla.com>
-validpgpkeys+=(BFA8008A8265677063B11BF47171986E4B745536) # Andreas Grapentin
+validpgpkeys+=(BFA8008A8265677063B11BF47171986E4B745536 # Andreas Grapentin
+ 3954A7AB837D0EA9CFA9798925DB7D9B5A8D4B40) # bill-auger
+
prepare() {
cd $_pkgname-$pkgver
- # see: https://labs.parabola.nu/issues/2267
- # upstream BR: https://bugzilla.mozilla.org/show_bug.cgi?id=1628296
- patch -Np1 -i "$srcdir"/mozilla-1338795-regression.patch
-
- cat >.mozconfig <<END
-ac_add_options --enable-application=comm/mail
-ac_add_options --enable-calendar
-
-ac_add_options --prefix=/usr
-ac_add_options --enable-release
-ac_add_options --enable-linker=gold
-ac_add_options --enable-hardening
-ac_add_options --enable-optimize
-# https://bugzilla.mozilla.org/show_bug.cgi?id=1521249
-#ac_add_options --enable-rust-simd
-# https://bugzilla.mozilla.org/show_bug.cgi?id=1423822
-ac_add_options --disable-elf-hack
+ echo "${noextract[@]}"
-# Branding
-ac_add_options --disable-official-branding
-ac_add_options --with-branding=comm/mail/branding/icedove
-ac_add_options --enable-update-channel=release
-ac_add_options --with-distribution-id=nu.parabola
-
-# System libraries
-ac_add_options --with-system-zlib
-ac_add_options --with-system-bz2
-ac_add_options --with-system-icu
-ac_add_options --with-system-jpeg
-# ac_add_options --with-system-libvpx
-ac_add_options --with-system-nspr
-ac_add_options --with-system-nss
-ac_add_options --enable-system-sqlite
-ac_add_options --enable-system-ffi
-
-# Features
-ac_add_options --enable-alsa
-ac_add_options --disable-jack
-ac_add_options --enable-startup-notification
-ac_add_options --disable-crashreporter
-ac_add_options --disable-updater
-ac_add_options --disable-gconf
-# tests require network access.
-ac_add_options --disable-tests
-END
+ local src
+ for src in "${source[@]}"; do
+ src="${src%%::*}"
+ src="${src##*/}"
+ [[ $src = *.patch ]] || continue
+ [[ $src = arm-wasm-vfp.patch ]] && continue # defer parabola patches
+
+ echo "Applying patch $src..."
+ patch -Np1 < "../$src"
+ done
- if [[ $CARCH = arm* ]]; then
- patch -Np1 -i "$srcdir"/arm-wasm-vfp.patch
+ cp ../mozconfig.cfg .mozconfig
+ sed "s|@PWD@|${PWD@Q}|g" -i .mozconfig
+
+ case "${CARCH}" in
+ armv*)
+ patch -Np1 -i "${srcdir}"/arm-wasm-vfp.patch
sed -i '/--enable-linker=gold/d' .mozconfig
sed -i '/--enable-hardening/d' .mozconfig
@@ -130,42 +119,55 @@ ac_add_options --disable-webrtc
ac_add_options --disable-elf-hack
ac_add_options --enable-optimize="-g0 -O2"
END
- fi
-
- if [[ $CARCH = i686 ]]; then
+ ;;
+ i686)
sed -i 's/--enable-linker=gold/--enable-linker=bfd/' .mozconfig
LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads"
export LDFLAGS
- fi
+ ;;
+ esac
- # perform rebranding
- local brandingdir="$srcdir/$pkgname-$_brandingver"
- rm -rf -- comm/mail/branding/$pkgname
- cp -aT -- $brandingdir/$pkgname-branding/ comm/mail/branding/$pkgname
+ # perform re-branding
+ local branding_indir="${srcdir}"/${pkgname}-${_brandingver}
+ local branding_outdir=comm/mail/branding/${pkgname}
+ rm -rf -- ${branding_outdir}
+ cp -aT -- "${branding_indir}"/${pkgname}-branding ${branding_outdir}
- export QUILT_PATCHES=$brandingdir/patches
+ export QUILT_PATCHES="${branding_indir}"/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
quilt push -av
- # produce icons
+ # generate icons
for i in 16 22 24 32; do
- rsvg-convert -w $i -h $i "$brandingdir/app-icons/${pkgname}_small.svg" \
- -o "comm/mail/branding/$pkgname/default$i.png"
+ rsvg-convert -w ${i} -h ${i} "${branding_indir}"/app-icons/${pkgname}_small.svg \
+ -o "${branding_outdir}/default${i}.png"
done
for i in 48 64 128 256; do
- rsvg-convert -w $i -h $i "$brandingdir/app-icons/${pkgname}_big.svg" \
- -o "comm/mail/branding/$pkgname/default$i.png"
+ rsvg-convert -w ${i} -h ${i} "${branding_indir}"/app-icons/${pkgname}_big.svg \
+ -o "${branding_outdir}/default${i}.png"
done
- cp "$brandingdir/logo/icedove_icon.svg" "comm/mail/branding/$pkgname/"
+ cp "${branding_indir}"/logo/icedove_icon.svg ${branding_outdir}/
+ cp -av "${branding_indir}"/preview.png comm/mail/themes/linux/mail/preview.png
+
+ # Patch search-engines config
+ local search_engines_sed_cmd='s|https://duckduckgo.com/|https://html.duckduckgo.com/html/|'
+ local engines_cfg_dir=comm/mail/components/search/extensions
+ sed -i "${search_engines_sed_cmd}" ${engines_cfg_dir}/ddg/manifest.json
+
+ # Delete unused search engine configs
+ find ${engines_cfg_dir} -mindepth 1 -maxdepth 1 \
+ -not -name ddg \
+ -not -name wikipedia \
+ -exec rm -rf {} \;
# Patch and remove anything that's left
- patch -Np1 -i "$srcdir/libre-searchengines.patch"
sed -i '\|Phishing Protection|d
\|UrlClassifier|d
\|URLClassifier|d
\|url-classifier|d
' comm/mail/installer/package-manifest.in
+ # TODO: this could be moved into the branding package - it already processes all-thunderbird.js
sed -i '\|extensions[.]getAddons[.]get[.]url| s|https://services[.]addons[.]mozilla[.]org.\+["][)][;]|https://directory.fsf.org/wiki/Icedove");|g;
\|extensions[.]getAddons[.]search[.]browseURL| s|https://addons[.]mozilla[.]org.\+["][)][;]|https://directory.fsf.org/wiki/Icedove");|g;
\|extensions[.]getAddons[.]search[.]url| s|https://services[.]addons[.]mozilla[.]org.\+["][)][;]|https://directory.fsf.org/wiki/Icedove");|g;
@@ -193,17 +195,13 @@ END
\|yahoo[.]manifest|d
' comm/mail/installer/package-manifest.in
rm -rv comm/chat/protocols/{facebook,gtalk,odnoklassniki,skype,twitter,yahoo}
-
- cp -av $srcdir/$pkgname-$_brandingver/preview.png \
- comm/mail/themes/linux/mail/preview.png
-
- # Load our searchplugins
- rm -rv comm/suite/locales/en-US/searchplugins
- cp -av /usr/lib/mozilla/searchplugins comm/suite/locales/en-US/
}
build() {
cd $_pkgname-$pkgver
+ if [[ -n "${SOURCE_DATE_EPOCH}" ]]; then
+ export MOZ_BUILD_DATE=$(date --date "@${SOURCE_DATE_EPOCH}" "+%Y%m%d%H%M%S")
+ fi
# clang-{9,10,11} -> error: unknown argument: '-fvar-tracking-assignments'
CFLAGS="${CFLAGS/-fvar-tracking-assignments/}"
@@ -229,52 +227,14 @@ build() {
}
package() {
+ optdepends=('libcanberra: sound support')
+
cd $_pkgname-$pkgver
DESTDIR="$pkgdir" ./mach install
- _vendorjs="$pkgdir/usr/lib/$pkgname/defaults/preferences/vendor.js"
- install -Dm644 /dev/stdin "$_vendorjs" <<END
-// Use LANG environment variable to choose locale
-pref("intl.locale.requested", "");
-
-// Use system-provided dictionaries
-pref("spellchecker.dictionary_path", "/usr/share/hunspell");
-
-// Disable default mailer checking.
-pref("mail.shell.checkDefaultMail", false);
-
-// Don't disable our bundled extensions in the application directory
-pref("extensions.autoDisableScopes", 11);
-pref("extensions.shownSelectionUI", true);
-
-// Disable Social API for content
-pref("social.remote-install.enabled", false);
-pref("social.toast-notifications.enabled", false);
-
-// Make sure that whitelisted and directory installs are empty
-pref("social.whitelist", "");
-pref("social.directories", "");
-
-// Disable the GeoLocation API for content
-pref("geo.enabled", false);
-
-// TODO: this "whats new" page should be in the branding package or abslibre
-// Pointing the "Help -> What's new" menu entry to mozilla.debian.net
-//pref("mailnews.start_page.override_url", "http://wiki.debian.org/Icedove/WhatsNew45");
-END
-
- _distini="$pkgdir/usr/lib/$pkgname/distribution/distribution.ini"
- install -Dm644 /dev/stdin "$_distini" <<END
-[Global]
-id=parabola
-version=1.0
-about=Icedove for Parabola GNU/Linux-libre
-
-[Preferences]
-app.distributor=parabola
-app.distributor.channel=$pkgname
-app.partner.parabola=parabola
-END
+ install -Dm 644 ../vendor-prefs.js -t "$pkgdir/usr/lib/$pkgname/defaults/pref"
+ install -Dm 644 ../distribution.ini -t "$pkgdir/usr/lib/$pkgname/distribution"
+ install -Dm 644 ../$pkgname.desktop -t "$pkgdir/usr/share/applications"
for i in 16 22 24 32 48 64 128 256; do
install -Dm644 comm/mail/branding/$pkgname/default${i}.png \
@@ -283,9 +243,6 @@ END
install -Dm644 comm/mail/branding/$pkgname/${pkgname}_icon.svg \
"$pkgdir/usr/share/icons/hicolor/symbolic/apps/$pkgname-symbolic.svg"
- install -Dm644 ../$pkgname.desktop \
- "$pkgdir/usr/share/applications/$pkgname.desktop"
-
# Use system-provided dictionaries
ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/$pkgname/dictionaries"
ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/$pkgname/hyphenation"
@@ -301,4 +258,3 @@ END
ln -srf "$pkgdir/usr/bin/$pkgname" \
"$pkgdir/usr/lib/$pkgname/$pkgname-bin"
}
-