# 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.8.0 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() { 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=('a0bdd34bebda4973f714422293f10a5a96c2b12f097c68d76fa37c48943fdbfb32dd2e504faa0b88fd699118b1903e18c3bb54cb32cd5e2ff60c09966b23e79c' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' '31399a14da85308c7fbbfa9d3af26612fde0a9e186250d1d78b27717c1b6637cc4d61aa5f24df3a6cb54bbd643350413cced0079c54bfd2030c0dbb1e4d445a1' '84a5d5e25ebfa14d1db6a5425ae7023f85b4dbd7a95fd7d3b85435dba827efa257aea81b747cdea365ce1c29f9d3d1c574d738f76527d6a3e93db96a4de22801' 'bfba963b373e284625730fb334daa48c7159a8a79c471f4122d5db0538777272d1cbfbf511482403d2462ed9248cb7ecf0c4fd7ed7946be5daa463fd05298e98' 'd97a150ee5940ecf1d391fe5fc5237c5931a64ae1ad541ab13a2a52c0db4c8bdfe5b64373324b731fe03e55569a07cc30f04f703aea4cf5ab656625e87f43f8f' '228a18bb3da8228609d284db0bac62da762bb9db26430377235da6802450954c144d634fa6c96d9cd0da3296597528806ed6320c50c2a336cd7c4033e79f6264' 'f3994b11ec547fab11ce0c2eb68128e82e9a1e3a34897ad46cd34129aba535cf8c58358962a4d8ba1c7a2785976335af3e7f0ccda0066a1f428253f73e512fd4' '165590c8c41443df513870cfde93e8486a3b90e3254a8703c82a07b18c8b4f6bd328d58d06e6e1fd4f1d8797cf4e023f7ba3ee4be73be9596c23efc996a3a7a2' '8429ab492dfeabe8b021dbb74619a664168a7afe55b290ef1420a0e0e9be9fadd8a6acdda03e3f20721d82e5e9b052d4e28dfaf8721087a9edbf56a321b24299' '79c7c22216cf30695f1504c85157eece54a6c142832ad77e84b1ebaf589a8932d61d351d294374fbdd3d965182a53cd4a3b1140220ddd3e6bbb008be2ecafd0d' 'fb888c779c8675f4ba17feeee98b29f2ce4d27a6475a0529be1bcec5621539d755d47ba3b37c369d049735895419574244b7ae10bf651922f7930de853b80561' 'a25899f22c88cf3c176e3c88ff380202010690aa83409d1f82bde94ea0cc91b0993f7aa4847b10d7765631a5ce233e1ca07fca90c08af54b0406d0129648138b' '057009e7df508cb64c035a5c7f40a2ba6885d2ade51763adfbaa6811413aae91787d3b80faff63b6fbda7c75a68213954fe2eba4f0505c88ca1ffee981b90f11' 'd7ac8f28b16755c260999a1894a8bb0d319432f7fad3fe9c8a079cada7d91648a2eada8281c4f0fff0012dd423bd4c3ffe9efc7725ecae9376a31cc7abfd648a' '30b98b717d05dfcce3bc680d92e6a7dcfc26c869da7eb6ef3ec49e595f84d7df7a6c47dd44df3eaf152e68a7f6a09667588038eecace5f59d5f74a392bf78d6e' 'cc2606d8e8269159f4d74a44b63787f2d9771ce7b9eb25026a075338c548fdcb6fa4ce1a5b6077d509266dfba19a7ded2c5f3ff0d73ea8dae6d7227db8fb7af6' 'fe92608b9d165a5e98418c3124978acd2ab818cb7d61dbdf8bcc136703582f870f5906592df841493d9eb1862417dec91c0d81513eec08cb5741a807b75c3e0b' '8f434608927f81434cf12360aad27fa108f04987c0c59e384bd6d324562ce227b7854a6e00457db97e8f77158969f48734157ffbc76c6fe76835fb6ea7e9ec0c' '855db59ade8c1d796bacc84a58a0761189b2e642f7b10f7813054280c5c8607bada5d3e3f2a22e3ef8a0d3ba1efaeef898f311e97129e1e15dac62249d0ddd3f' '4e20877676e5d4401489a8bf9172056fefdb6ee4243666dc99413cb94f7edec73d2c19218013d660b4470fc9b83b4e611a3c347870ad6817949bd5c720808500' 'e9f2301a08f068d725236e20bc8e3c516bb8c31d427c61da504b1adce3b7f121c795c02e0b440c0d7aae7ec37f2d266fb82d848d2a87189869f8b20321cefbe2' '7e4318a4eaba1cb89353dcf8b1e064e373709a743151ee7104e712bf0f463eabc727be65bec56befc89e66a543637c7b7433f44b816e8489e174835124627235' '91b69267060018cdf08394506c686b74952e192d04898253525a1c43b1e4a30d0fc4f637812dd4376810d086098d09c980baec21eab9dbd60e6acf77a7dab32e' '53c17184a7bffa10c01af6c07ac7b8f610fb2dfbeba5206017da99a691be09c6e501962c0adea8f7439c87d26c3f6b442f2c166997172e124bf93de2a9205d96' '9418237c47dcccea496ce75d7b52d794678affb96870b0bcba7c770c24fafc4026c55b6a2dc179dc52db51a8b935d88e8614f743ca05da386bda550b72c73114' '45cd7c362551cca06b1d6aff940406d55ba17953d1c62b9417e3682626d33e1ede84430dcb42472b7ecd7c68ba10563673b3af2c1e72bb15f4fc53f704fe7dd8' 'eb9042849142c928490dd0aa16339f6771f8ecc852e64593f8ed13c8f7188c627d3aa6781fbf81db9206f0993cd7c7f6312244730a89a89b1f5d264f93241872' '44ad4374e058b8e0841272e6e7d407be22cb46c606a293f36e5f4fdd1f3261ccfeb76b8f1dec75e1a6ace23f6727cab5722d3c0d79756c69062f45cb864041dd' '3733cc42127cc7612423fa8b3cd4af137115d0cb8b7df46293ce9565788e1a090ef9477710b1fdde66c339e3820d7d5d666d2c1f1fc1c08690053754b5d684ff' 'f230b4824d32a944afcf817c4b2c6de6d021d6c44dfe62be80c096de6e20c66d87bb95cf7b4fec7520c835e98085c531ec0160164b70b3972bb0d6163f50db1a' 'bcc26e2ceb539c9547fdcd7b2f874a73b3e60a4f0b75c23dc20829150ca5b998001821de2087fd7ae88e9ebcb355a9b05c8bdc6ac882ee77b8057449bf0b06e5' 'c1cab0ae5d40fd08dee019ffd5f5653411d35c2856db6323dd24496de65e78753a8c44031476cba6f58b3a63d7a919d5af610b95b59a58119e1021433d9fcac2' '38a8e5479d0cfeac98ca64d2627940c44a861354e643fd9e611a66e2cfec6ba6eceefa07dd4e0ade34966c828fe78f2f16c4eacba629a6d288e7f93a84454df0' 'ae1869b780c42b9c811877cb15367761bdf4d474098a0a2e47f30b0db3bade02e4415744975d10604b0a1ac897b7604c800665ca8ce19264e66f604c6c271a3b' '0436ec36a016f990b1c1df4e5b48ba5629e656548cb07c774bfab90d3c1c86929265ee3521ffe68b4b7c3c6f470702d2ae9d1087cc4651c65cb89683f4960048' 'e0d16d6cf997a511cea95b2cebb4228eab3c7d345522335420bc3522e735fdd831b3904a0fc15db1f88329a61f53620c21fb61aa7f86cce685f11ccff2689048' '7ba1883f259892449114fc5929be2d0b8bc491a00b765975e90b6bbcec6c0f0863b4009cd799798dfa2e531a10ecfba7de95727dc13a78b2db26d113576314cb' '28b1ac62e33d645487ae55c1b6d7a34b46f6a4504fe5a51605a1decb047e3a4268c7a514c500a7185a7b74f8c27dbd600ed946fac10b9f2e282dc89229c40e42' 'f8c2c14a5ac5e05020eced2e01d001588edbcd6f5286156cb441a677813297e6fab072f78b5c14fbf7d0351566f4133cff2a75d43fc3af5fb291cca9d2ae138b' 'bcb0a09a889baf65c08e4bc90cb27063c6ee840e0387c013eb6da3445591e4ddcb773e403ced5ba74dbcc378a213ff113bb7a1dc9e6059f7899ea11ecbbb9ca2' '13100e9b69b0b93afba34e89e77a152eb96519eed033b1ef4c26dc68fff9452ea391fc4089d2e53edeb5e9df256857ed9f0a3dfcc7f386dc3aefb753ecf88f76' '36f9be69bba62161ae18015b0dfa5fb9c1bc877d9177da01796349d4599caf808d87eadb8d4859901b4eb267e18ea79c254a2ce6a5746841b8138439cb26f4d5' '5f2f816879b5395c04044e4f2c9ba093815077a1c1931de785c7e7c7b3a7a6bba6360aabd175ec8c1318712f9c96f106b7cb11da90f85f694c8047f27e5ffcdb' '1f0f285ac63526aa7f986bee041dd8fafef0f8467f3b3b102566e39451242c6a0681a1204fa00bcd3fb6be827fdba3b623e414ec8c247ec9790575ff44df3227' 'fe7b75b7c684d5bb3fa5cb6a605d6bb97077d5e42ee9c4bd8cf1c7a558e1c8e91258f62e460e9b773e01a7854f6d42f0527f6ceda8db0cea881520728ee2e1cd' '3fdd63cee079e83874a9f4e240f7280058bf804460d8b52ecabb08682ae913e55bfc7d65af79504577ded6e1b4ea884582156214a9454dcbe03acc044d634bec' '9ba5ecc7de93b8d27a88e11459518ee3e56483de60225ca0a78d4729e8c9c61ac77a30f4c75553bf124ce93949fe2cfea9ea79f088a1275268c903508326b776' '67a7a6f5d2cd3337bc5be0b63e656b35504c83b1300d5c208ee47bfd8b6bf4699deedfcb83239aa64abd35ceb9a3ca4d85c954bd0205058100ffa4c262fb5631' '1d8893c35a8ccd487ab9bc6464cc44c02da2588a3696e30c84f1bc6093fc16b64042528dc32714805373a8e3317929f65798d91a105a23aa5b2716125e8421d2' '54d188148f1ad1ca4d99905889c5ac2ba75b98403ff230fba9b178e3619f2ea4635dd4947bb86d106de00762bce35bb625e42bab451ba06aa6626fdb6ec4d6f6' '859dda57e240fbed49420dfb9da022fdd69b49d7936ccf6912f0c0c8945ab033ff3e9cadb3d6d022a4aef2e2f1349efe0c1e66ac25d7d7a676aad668c9eb9f4c' '29db50060784e8cf7b418862de8711da32f6536bb16c20487d08fe17e6fdb7092a11ad9455839b6bdb61f571d80698f8d099a7fc1924159215cb2b4dc9cfcf5e' '3761551e0601ba967388567898b03a0910ae22772c5c3f2128ea5117149f4b01277d5d0f96cf5d911f425cf960f1d64647785dbf4124c52912967c111cb45639' '9d4498b445f39163df400b758361c63146f5a73ad99681c9b1b3935fa1c36a9a0756fc502270d690d9fcfa89670eb8734725b9ccf5715c5a90d2dd46d7d62e8a' '816ccd6f8ace8d49e5f257b77c3469bd0c6702226caef2743ed9bfdf0fe6596971bfdfce8d5ea0eb17b5e9daee7dbf1e0ad8fd01babb7a76e9de3ce09bec5686' 'a653646f038f469e93e129a3afbda0e51e98412ef765fd05a049bcd4ac19f1817222431b504196d3186b8220e39b5c60e6525c8ab410801e06336540547d358f' 'bb8c4f370ab48cb2205bbc9c18997f718511e40c4b4e49848bb57f7ad8693838210da0fa520bdb66907b95e783ce046241dcff232991b45185e19faf2a245bb4' '25e48256520d0f3b2558458d4e4a832c6f2bcb42a4552308847fc04410bf2a3375bfd3caa409ca18d1bdb31a939188323b459ab2d4bafea28f52a4751a3dffb3' 'ba9428833e9fbb4e6de6881ccafd0c55a33abd8b7d8ecf2ea06b1c58904a6ce6095f7ae7a4017c2038163653e3166ef42744f2a448cc670dcd53ac4dee60fb26' 'aec1641f5185111d7b5c814334548e587429a40d463c7d800f7d66f80c5202a846c469049620bd3519b4d0467dd29de8a15c651ab4c5556a22df4afb3ecacc7b' '844c777f798a86517f295eda6f92b377adbbeffc9541779571ab2502284718eb40fc666192d8c895512e25643e4b9649070d5d300d49420b10683cef9467883a' '244f9e5a04027337ddef0bcc583eca6c6d40d412a9b96163d2f30339f1bcde7d27ef0fea210d3d9dc91e2481b399a536938e3808fa3f9d5b5c3128473e8b8d70' 'bf6c7d9f917edffbed95d1087f97b5d65f6fd108b56ab9c0343c8fe97d10bfcd0fa8d783cffaab2be695714bc62a4417451857aa732c80d6549e6df917e9204f' '150ce952c2330d18f9c3e596432d11e1ed792f82700aef3ef299fe9dc9479c6b458ea74ff4aa74f0a5117facfde113c958712cb8afa77e52082cf06398796d7e') # vim:set sw=2 et: