# Maintainer: Levente Polyak # Contributor: Jan Alexander Steffens (heftig) # Contributor: Ionut Biru # Contributor: Alexander Baldeck # Contributor: Dale Blount # Contributor: Anders Bostrom # ALARM: Kevin Mihelich # - mozconfig changes for ARM # - disable rust lto for v7 highmem=1 pkgbase=thunderbird pkgname=(thunderbird) pkgver=115.12.1 pkgrel=1 pkgdesc='Standalone mail and news reader from mozilla.org' url='https://www.thunderbird.net/' arch=(x86_64) license=('MPL-2.0' 'GPL-2.0-only' 'LGPL-2.1-only') depends=( glibc gtk3 libgdk-3.so libgtk-3.so mime-types dbus libdbus-1.so dbus-glib alsa-lib nss hunspell sqlite ttf-font libvpx libvpx.so zlib bzip2 libbz2.so botan2 libwebp libwebp.so libwebpdemux.so libevent libjpeg-turbo libffi libffi.so nspr gcc-libs libx11 libxrender libxfixes libxext libxcomposite libxdamage pango libpango-1.0.so cairo gdk-pixbuf2 freetype2 libfreetype.so fontconfig libfontconfig.so glib2 libglib-2.0.so pixman libpixman-1.so gnupg json-c libcanberra ffmpeg icu libicui18n.so libicuuc.so ) makedepends=( unzip zip diffutils python nasm mesa libpulse libice libsm rust clang llvm cbindgen nodejs lld gawk perl findutils libotr ) options=(!emptydirs !makeflags !lto) source=(https://archive.mozilla.org/pub/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz{,.asc} vendor-prefs.js distribution.ini mozconfig.cfg metainfo.patch org.mozilla.Thunderbird.desktop thunderbird-system-icu-74.patch) # https://bugzilla.mozilla.org/show_bug.cgi?id=1862601 validpgpkeys=( 14F26682D0916CDD81E37B6D61B7B526D98F0353 # Mozilla Software Releases 4360FE2109C49763186F8E21EBE41E90F6F12F6D # Mozilla Software Releases ) # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) # Note: These are for Arch Linux use ONLY. For your own distribution, please # get your own set of keys. Feel free to contact foutrelis@archlinux.org for # more information. _google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM # Mozilla API keys (see https://location.services.mozilla.com/api) # Note: These are for Arch Linux use ONLY. For your own distribution, please # get your own set of keys. Feel free to contact heftig@archlinux.org for # more information. _mozilla_api_key=16674381-f021-49de-8622-3021c5942aff prepare() { # packed_simd no longer builds with 1.78.0 #rustup toolchain update --profile minimal 1.77.2 #rustup default 1.77.2 cd $pkgname-$pkgver echo "${noextract[@]}" local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue echo "Applying patch $src..." patch -Np1 < "../$src" done sed -e 's|73114a5c28472e77082ad259113ffafb418ed602c1741f26da3e10278b0bf93e|a88d6cc10ec1322b53a8f4c782b5133135ace0fdfcf03d1624b768788e17be0f|' \ -i third_party/rust/mp4parse/.cargo-checksum.json # Make icon transparent sed -i '/^google-api-key printf "%s" "$_mozilla_api_key" >mozilla-api-key cp ../mozconfig.cfg .mozconfig sed "s|@PWD@|${PWD@Q}|g" -i .mozconfig if [[ $CARCH == "armv7h" ]]; then echo "ac_add_options --disable-elf-hack" >> .mozconfig MAKEFLAGS="-j4" # disable hard-coded LTO sed -i '/cargo_rustc_flags += -Clto/d' config/makefiles/rust.mk sed -i '/RUSTFLAGS += -Cembed-bitcode=yes/d' config/makefiles/rust.mk # increase codegen-units due to RAM constraints sed -i 's/codegen-units=1/codegen-units=16/' config/makefiles/rust.mk fi echo 'ac_add_options --enable-optimize="-g0 -O2"' >> .mozconfig echo "mk_add_options MOZ_MAKE_FLAGS=\"${MAKEFLAGS}\"" >> .mozconfig export MOZ_DEBUG_FLAGS=" " export CFLAGS+=" -g0" export CXXFLAGS+=" -g0" #export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" export LDFLAGS+=" -Wl,--no-keep-memory" export RUSTFLAGS="-Cdebuginfo=0" CFLAGS=${CFLAGS/-fstack-clash-protection} CXXFLAGS=${CXXFLAGS/-fstack-clash-protection} } 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 export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=none export MOZBUILD_STATE_PATH="${srcdir}/mozbuild" # malloc_usable_size is used in various parts of the codebase CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" ./mach configure ./mach build ./mach buildsymbols } package_thunderbird() { optdepends=( 'hunspell-en_us: Spell checking, American English' 'libotr: OTR support for active one-to-one chats' 'libnotify: Notification integration' ) cd $pkgname-$pkgver DESTDIR="$pkgdir" ./mach install 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 ../org.mozilla.Thunderbird.desktop -t "$pkgdir/usr/share/applications" install -Dm 644 comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml \ "$pkgdir/usr/share/metainfo/net.thunderbird.Thunderbird.appdata.xml" for i in 16 22 24 32 48 64 128 256; do install -Dm644 comm/mail/branding/thunderbird/default${i}.png \ "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/org.mozilla.Thunderbird.png" done install -Dm644 comm/mail/branding/thunderbird/TB-symbolic.svg \ "$pkgdir/usr/share/icons/hicolor/symbolic/apps/thunderbird-symbolic.svg" # Use system-provided dictionaries ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/$pkgname/dictionaries" ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/$pkgname/hyphenation" # Install a wrapper to avoid confusion about binary path install -Dm755 /dev/stdin "$pkgdir/usr/bin/$pkgname" <=$pkgver") install -Dm644 thunderbird-i18n-$pkgver-$1.xpi \ "$pkgdir/usr/lib/thunderbird/extensions/langpack-$1@thunderbird.mozilla.org.xpi" } _languages=( 'af "Afrikaans"' 'ar "Arabic"' 'ast "Asturian"' 'be "Belarusian"' 'bg "Bulgarian"' 'br "Breton"' 'ca "Catalan"' 'cak "Kaqchikel"' 'cs "Czech"' 'cy "Welsh"' 'da "Danish"' 'de "German"' 'dsb "Lower Sorbian"' 'el "Greek"' 'en-GB "English (British)"' 'en-US "English (US)"' 'es-AR "Spanish (Argentina)"' 'es-ES "Spanish (Spain)"' 'et "Estonian"' 'eu "Basque"' 'fi "Finnish"' 'fr "French"' 'fy-NL "Frisian"' 'ga-IE "Irish"' 'gd "Gaelic (Scotland)"' 'gl "Galician"' 'he "Hebrew"' 'hr "Croatian"' 'hsb "Upper Sorbian"' 'hu "Hungarian"' 'hy-AM "Armenian"' 'id "Indonesian"' 'is "Icelandic"' 'it "Italian"' 'ja "Japanese"' 'ka "Georgian"' 'kab "Kabyle"' 'kk "Kazakh"' 'ko "Korean"' 'lt "Lithuanian"' 'ms "Malay"' 'nb-NO "Norwegian (Bokmål)"' 'nl "Dutch"' 'nn-NO "Norwegian (Nynorsk)"' 'pa-IN "Punjabi (India)"' 'pl "Polish"' 'pt-BR "Portuguese (Brazilian)"' 'pt-PT "Portuguese (Portugal)"' 'rm "Romansh"' 'ro "Romanian"' 'ru "Russian"' 'sk "Slovak"' 'sl "Slovenian"' 'sq "Albanian"' 'sr "Serbian"' 'sv-SE "Swedish"' 'th "Thai"' 'tr "Turkish"' 'uk "Ukrainian"' 'uz "Uzbek"' 'vi "Vietnamese"' 'zh-CN "Chinese (Simplified)"' 'zh-TW "Chinese (Traditional)"' ) _url=https://archive.mozilla.org/pub/thunderbird/releases/$pkgver/linux-x86_64/xpi for _lang in "${_languages[@]}"; do _locale=${_lang%% *} _pkgname=thunderbird-i18n-${_locale,,} pkgname+=($_pkgname) source+=("thunderbird-i18n-$pkgver-$_locale.xpi::$_url/$_locale.xpi") eval "package_$_pkgname() { _package_i18n $_lang }" done # Don't extract languages noextract=() for _src in "${source[@]%%::*}"; do case "$_src" in *.xpi) noextract+=("$_src") ;; esac done sha512sums=('1640d860f9cd5107d8c26f0ca8cc6254cb7e4445fb968d2bfab7011fd4b1919e867fc0c639c097469dcffe3846ef2fab09c74d211fc56aec21981669f4e3c0cf' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' '6f2084f4b61d39eef49a499da144308accd2dddf1c191adda616a5289c7afc8e4cf8700b45e0b9957bdbb8b882a998234d2971d51eb970957d4a2d99ce3cc877' '549b8b491785f20e0459754087c89bdbb9fe21cd124bd025b6854040da98724884c78556382be6cd9de5652569a19c8a540c67123d3c7e9c31ae8ff445db3c94' '47e605d6846cbcbdd07f6388453fad1ef5fcd99013e288a6ff5a70920b2946567dd6317416f2dfcbc19b2def5980005e245b14c6f273f4ff2dda6ef31cb96253' 'cc5066fa64dbf58d4af7d273e6a3159b38aac39c6b1af7021c3772ea654b55283a4475e9d1186b8d907750d2c66538251f5b45cf7951bbbe9ec3519fc9d03b49' 'edacf38b501eafadc9b73ce03854601abaec9f7bc5dd34c382a34548e32978e6e148116913aa2f2f4b69447ef2703520649b690ce35ed193cfcb7db1b0070dcd' '9f35e5382ec6a95e48151fc6b11be353dcb82ea5477ae4b32becca4e83e7784423ad9f96922aa3881461c9adf8dbb8e569cbc051ab62cc32304da4342c4f7623' '81d08a7253dc7d7e9af257f8b28ecf5bdb52b1606c5e7b673646ee6b72d6bb9b7b5ec6fc53e4ad74fa7a55110a3a42ea61db0b17a04472937af733fc4e508f31' '67e31d1a1d0997804563739a1e825f3de8d37207f550ceff05a1360d84c4d22832d025861825cb67ca41d3d8adbb64c7fe9a8222f0c5d0f1b5e88d903250f57f' '8d322bec969ebebb1a5932ff57a1f48a3fe0c243719dd56b1645cd91a5dda463d052b40a198c5681dc6696b79322e805dffca9e77939352d5165d60733a834be' '998ec9f54615939a2a661bfb30de01c34f99d247a20c8bf24b9ccf78dc5555e43a6a6f1e543a0ca4bb2fba9c9a6e2069f92d27b915ad08f4fecbe08284961c5b' 'a6a443e41da1a54ba5f089d051a282671fd72e7e0e3d3ecc710f21a0aec8f681991fc8ff0f1275fbb06003d55591bfc60732f8fccad7aba341bf23618c5dd9dc' '6a64c4fcd7f07d725f75aeea5499dff34875a870a91250de611bf19896624b56579f9f0f29aaa1612480c621613d3705cc2f8504a298782a45904a09d6105531' '2b44e64196ca98f25d01283c91d89f07cf25ad4fec5ed32a3c8c1d1bba45e2d04fe23b63cc5ee1f8dbf691e6e25a6fbfe8a92b29cfc8d91d9a37479a673a54f7' 'afd3505dfe52f62ce1d63699f37ddf637cdbce2261ee3f6411246bb3b88e6a679d527ea1b47d7d44ac4ac50d1ad7e5b3459a0981c409834f5fd4b596c5c0840f' 'cf6fcc6da7eb8a2181880d5a352a0d02df5f67936e295052d5c4dd791e78e095adeabc7bb4203dd2afec3fe1fa1057b9e210ae69483495f721ab7c0b5926802b' '5b2788ae4b2bd1710a54a46a761ce567781aeb7c07082b42c1256d9427433c2d1b7ee46b2d503e3483384158740c933941aecae0ac56d02510e0092d8ef6db3c' '7f252604d90f555ad6eb57af605b9a0b4eacf24042bb58a539b2360241e116cc799326843db16d6e9bab7eb98cec42e90e293efcfd4949a60d83b4f8774f0a58' '98d182124132601f006169d963ab3b176234042cd23487d5424e78c5bb8c2e1c2733cb53bbd491cd0914835f8917f1c65c7e43b8573cce5830412aef891044f9' 'd0962e59698dd5df9f58bc703a0dbc9879905bb24c1dfe7b8ad2ebcb0a5894200ba7cf69fd4d65ea083109e8dcc53ce1c7972dbd06e3d55b757705494dbdba45' 'd47d9fd61e49ce0e2de1c3ab0f82bd346b4b5655b08ae1b1253241f36bdb71b9c21bde408de3d3620a7e8b4cd9c3094e2a3628b9552471ba065e8f35f5b8b0f0' '45af869267cffecafa63bb38c68e19c03fb5d9130639facbdfef050e7592695d84c772f6c81119bc1fdc9c18fea19a6484a4d11b554a6e85234be50112ec8817' 'a56ef86a0bc0ac1f973fb393a20fe0447cede474d561b1c8fb59f93c5611fd305c909f376177279640036cab0ec49e53d0f26444ecadc96b96c9d8dc458bcd01' 'e127985ca3d93bc9bf140b5e7c1233288f288fb1a0b46c0df7246f9e1027e4474468dfe88dce3986d21a0ccc1f14db2d6f9bfd8b88e9a3ad5d9ce1bfae4fad2d' '218ff4e8089895d2192d407c95f42153bf2246b1df993fa7084cee04fcd2428912cbdde62d8bf45c23f672a2378d78219b39d97a75c4615f9c7587a51c38e7ee' 'f639bb2ae8d7c1a001b63ef04fac26869cf1d2e3d35f85bbf7392b76d66a8d5eaf96c26cd35126a7153f1e1d4fbe5442a209843039787babfd63a484d20be9e4' 'af01a0afd5ada78493f55272e8990a59e9cefb565cc388f213b8ddb2104ec79048b4be9285249a2ad5a74c809cfda7a35269ae2f4a43bed63591b912cd63b427' 'b3d396ee8bc9013a53717de1c6e0a5ad704da415ecfc2790a4a3e4a452abb2ebd9b8845f7c3707b0a194791f9f7e5a71be6dc67d64b8086dedff88676b33bc60' '62573d37a62bf929d82fff07cb49a4cea62e1f5bbc09a1708c86b74a2aa4b04dcd8d43717c2fb585cc1529ff632b41e1b644139308b46a87e41d5cdd11970b1f' 'fe4522b0193537736d3ea1c88815a97cc8ddc0d05bcf5d1b6076a33e1a0cc6c646dcfb09a7b7abd991a9424cc67e151d844753a619548b68c179cbf280618fea' 'deffc15b07061b1a161ff3cc201a62e5bed36fa5000d3f47a726bda3a90f3e3e4ec3c4b722bfbcb2610717cc89f7f12a157f4b0b0901d0ff2006f3b2d7eb60bc' '9d0209e044c7384c3f105395c87e7b5b205b9e9127cd6023aa0296669e8206f8bd33e1a8686cca77484020701974637236699e3291c9a07412e03b1dd0413a0f' 'da59bca0261f7d9ff6f77e81abe2da15c0ee9fd82e6b6d0da5b8c75acced23cba42a967fae62cf43c07f13e0d049c1fa42484f346990aeaab1cd181a6cd3a9cd' 'c609d487a0ade339b0a0299d88f45abab40618891336c236d627af384b4508f79cd0a61e2b22d1bdd000c319a076d420cff5e9bf9f1a008e43f68cd11c44f855' '03bc410caeea17fa75d7cf4ddb83e81f52dd918298dca6f727c16c682d352351bbe9056402365d2ecf64fdf511febf57ebc700c27374c8e06c948492b058e825' '1c604763509686acd19fe1d0f492049b0355cebef2179361f49e8324b81766500f504935b96cc3f1a88ad87e7e39fef255a77340c94230f4879d8ec46be8b931' '793ed043bea3c7fe26c7b857f490b66be7b25984c8cf13c2457271151f964dd67882c60f9fbdcd0031c75798cfae599eccd51f20c31cf55cc9ced044db7ded38' '91597a44fc4ac5260bb43d9d70c4e0c3bebc1c5d8a633444016206eb6a2b4f4c5fa6fbce5aee2106e785fa4c3387d053c3413741c26b7b2262ee05e1c7c3fda6' 'f838fde95baa1176b798c1822a359e976ce518337104dbb6b39be6ae40f8d067f68960dfd5d4408c23fd0886618ae7b82c50a3849c17ea78132a4dda1412f53d' '099d7b24666aeffd66dc5fc8723cf4d5b353c55eecbce7862eb75e0a84b1986dd2d6d4ae1a4ee19276d3177aa2b5c23526607505d42ea213db1bdb3a603600e2' 'd62690b67ea1497a0279f8ef434f4d4b994217deaca701134a38d2f7440a0a398aa5e4eacdffacb0c33c77beaf357c820d172b071ed4af06806b4013f1499d39' '32ccfb52cc2d7e19da3164d24888b0f8c78794e62f0a4bae364bb6ef859806a1dc5fe7df70d6e604b76791a7e85005f5e1894f5884ac74359bd18810b6f185b5' 'b9e80d4fc1789b0541cc5ac1a64cd57ffb27c7368151c10df9cc18596ee69de0996611ab6750be551264599848a61d8f96ceed620fe2d1119918a617d62671be' 'b08fc93ff1456c5a65d4735d70fd3df501c4e85820402285c27536cfb7332e3ac64f37f6eff4f229c221f8a68b644ba5d2b79269063a051ee86c5fe0fb23a168' '9ef9929a88cb361aab34629d499266a8ed383fca964704e53f4a6e371145652fa5f19c5797f5e3179c6776f635aa536d54389e2f9c1de3368311166e969380c2' 'd316e8a364cba0335be79553ac947d8ee8c338384c6dd836527dbb8f97822e834d0fc9b403a992c6573d3fc2204b6288409b43dd7b6dd3076d505815b5ea7f63' 'a8bb04b02511a16af58c3ed31441ce330459ad90d8ced0a21611601df84fc27b8afc8fe12aa6798f0341353b18119861ee6e68d038c0b93a87d430f7b04f4565' 'e9bf1f72bb174a6d9ccdccba664f1393a835eee2305e6f57703ca2545b87c1074b04dfdecb7ee88ca7a9afe81b6950dbb325b3262a059482222b6ef17daad7e6' 'ac6370656730cf71988bb8577a97ee9987661891b06817691b651f5e250b4f71fe54ff84afc1c89e8bef517df8827c6367f9576d4d57fc710208499304fb69cb' '5640bc32fa9016c5a6a784ba3f9c3843f48bc0e0374bafc9e0bf760cb27122bbe1a363bff43fa29df11dadb45bfe1302318617e41946aa9732b6620eca2d4429' '9e1f0cb28901702fbab8e4f4020feeec3514f4435f7349a7db223c60a7c8c2fc1a048ef4b1fde290178da6c66a0ca46862a67222ad0012052743fec0dd2e0cbc' '551f219de6e2f431836bfce4c0bbfd4d72a9aa197b3cbcefdc13ef9a7df8184ec0942f4d6ff9e45e961b908ec495391be004f2dbbed2b271037160ad3801d753' 'c56cc72032525c928e96ca2a28f64656f4a1293d8613d8a2138abda4980aab9eb995553aa76ce2a281a4b4ae42e0939fb83afbbf51d2c84330baaf1584a65d8c' 'fe5e83fcd34a984c9843235e1c8d0eea8ab83ed40247a81fee8cb2ff77dcb190a0ea7e8a522599472c30e6e5a554449f45f900454f54245ff896b541ad0e98ae' '1a668ef60e757b2cf44aa8354d79141e14d721bc6e45adc8a1095b64b595ab4cd75f11352896de682acb34b6276288a0d8203aefdb302641fed1114dac7567fc' 'c12af3b11c0726ca7fabfb0aa1fd8bf81af27e200a6da9a2d165b0476322767309b1ccc4b0f6f8fb1d0a5a2ffc6163d99d837e2265f4bf3a20305da315c7e84c' 'ec0151c44bb938c246a6ef6db20dd766c49498658cf3cdc3f32bddab8b644166ec2cc31642b71ca6955d1272bd7fbd4de9b781614ca7861c8b3cf058b9ef27b7' 'a7a549aaba5e368dce0810f0c212529f5c477669b4ad0526112bc1622c147316ea4e4fbd96e86395247534ec56f885ea15605b6c533e170a165bc2ddccf0a363' 'a458aefa8638c7a894558d848dc101defa11b682f18de882850c8ef1fdf44c9be75cf16d3f2afcbcfd48b4719183ec300833bb60b6430f7a0c9d59c627527649' '6ea9d1b7ce831feba53cf305f6f6a4471d7d4de95148843e22d1ea087179ab1601fd5f87fd7542b1a9a5dd1ade7d0bb6aa3c43428b607979823ff416f3d48a6f' '1a4f9c4f2c2830ef9fa00b0fd2153dd866800c6fe30088df70da29757a755fccd76c80ce981c2a3293b954f6ee5a932cc764746f2dcd8dc43e3d28ebbfe91774' 'b9ebcb3e736a92de097575e6651a98fd2dda2a00d797f225f9b9f031921e8a91d8f807a4aac034c295bd94e7a8071451f57609725c8dae3cecabc622a4a67759' '67f2c96a0347790acd48df1afc3adeacfb7bd5624069af70ef72ee4d31a5fc1d0120b6d0cbf1bfddea6e4dc9c5b663d940c996ba49f3a9341527b8485cae8910' 'a0adf8fc4329a39a6d1c05c4dcf9e0eccff4be29d2f3ef1814a78bb8c7579ed42cfd1f121355d3e5b99ff4123685a7a65d7281a2e65b502986bbc1efc611baef') # vim:set sw=2 et: