# 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=91.11.0 pkgrel=1 pkgdesc='Standalone mail and news reader from mozilla.org' url='https://www.mozilla.org/thunderbird/' arch=(x86_64) license=(MPL GPL LGPL) 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 botan 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 icu libicui18n.so libicuuc.so freetype2 libfreetype.so fontconfig libfontconfig.so glib2 libglib-2.0.so pixman libpixman-1.so gnupg ) makedepends=( unzip zip diffutils python python-setuptools yasm nasm mesa imake libpulse xorg-server-xvfb autoconf2.13 rust clang llvm cbindgen nodejs gawk perl findutils libotr ) options=(!emptydirs !makeflags !lto) source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz{,.asc} thunderbird.desktop vendor-prefs.js distribution.ini mozconfig.cfg metainfo.patch cbindgen-0.24.patch) 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 printf "%s" "$_google_api_key" >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 RUSTFLAGS="-Cdebuginfo=0" } 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_USE_SYSTEM_PYTHON=1 ./mach configure ./mach build ./mach buildsymbols } package_thunderbird() { optdepends=( '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 ../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/$pkgname.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://ftp.mozilla.org/pub/mozilla.org/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=('26b9242259b71eb14ddadffb34a59d07d515bbbc0cb806eed965a73b001ee81b3b1128d06cfdf3e50d5da4ef97be21d11193be34a582d3c9f27f27d2f97d90d2' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' '328422adac0cfe6af4ecdcd864004b7ada8f8171aa954fecc23a7e883e90a9bb0848372faa1100440dc754922f965e1e7b98c185aa88df190bff1051d2146c85' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '3526402ccae1f0428f2e45bae8d0b2cb909ac2698bc3508b692b827839ccb21203ce414206039776f6ce946fc53e636290b7870e9886284d5e9d1e8ad050aac9' 'af33a27ef12b50e179e929e05bd277484663e30daf156a73414ec811489b68052f671bfd57b79f7d9013706648408a223b2bb0791979caa76773db2ed2b0c670' '1f6f1fa13ccd6f38dd33a311a5340bf9b02f8a443ab809e314e4801d5402b63c17f0248bb2dbd653ea30286f92ae71c37de5d9fddf5c1a563aca0c1b442b96c2' 'a83833dc921104ef6524f4d3dd5a50eda34795a4653ca58a1073ee24fab967417a42aa976f740b2ece4247ace636ad6f18bbe704712085bd6c925ff6f71f45b8' 'a823e7d332fbd8261484656f07529e64f9b12d36bccc619c0f0a781770c5cb5b1bee9a5d21a74cb89b8b0fb3639df9c710ead3704d5cb22c3909c91b562ab7a0' 'e2fb15784c7301edc44cca4717d96b27e6f005bef67989c4d505b51e947787d136c807590606bdc5e7e6e365ab4ac17046584cbe2b49e3b5868177871d6bbedc' '0c58251fd11fc5e0f17d8ec8ade4af26744df8488e8768dc98e001b1f882b0e0a20a30f686d5b20f21c255b41898da477533a4a7fd50de3ad90adfa8828a0273' '7b414bdac6e0b2ed4631e298f5a16183d73107acca69b866e510939a0b5cfa040780e4a98ad915c7ed9c5ca594e1741a60ba8dad65c0d50e55f7de0356dc5f7d' '51cb056a4989f8b9d64b8ce3e12a2d2d9ee20302ee78c43b6105840c8fe0e354eca6d9d37e21d526d72e6ebb07d123afda6c860db6891113943e5f53a7584d24' '1d4313e571b652a658889c6d2ff3e62c28a6fe28bced5e174722fa014cabd10a5058422818b8d3bdec91cee4ed92b2edc5fa7bd8650ccad93610cef3c4d405f8' '8506191fcc089b76a34cdd2b9a24d6fd7e86e1952d112a2676ba2cfae1645ae70069ea3586621163351f171e8450b7a63379ac8afa37b586fc1d6f76ffc74a61' '9cf6a8886eb89af6301651884e5ac772c844a29a2f05b45f216d6311a3ba278a46dbe692463ea939fcdae366be589820adfb90556370fd32c1755b1f4e749c4e' '554c3987157144e9dd7b8adb1c95d58358cf922f4eed43bef9455fe72f50ae0b0ad24877eef85c5824cca28bb79377a5f07bbaa9f44852f07039c93875bf3887' '39c3c9a4fffb1e2df037b4af9bc8a6b90df513d15bb213894db56dcad5bc30f16413e68d8df3ab6cbd082bde3b3adbb7c4dc8720e2e67510ce7a48c22ecaa49c' 'b73cf9b79e94b674abfd482e0a812ccdb825326d10288a3beb0b60e6792b002b72b1dd972f990a92b5053bb262b7e1a3463f905370f06b698204aa3e88f224c0' '2d28cff3635ca025fe4f1b0cd0f50637999758ff2c01450b548139dc2444ea778e6d88a37fd95e574d8dd4152355efdc48ba56c1df4216d6accfd1cd41ffb31a' '2a4451b04f84ca86073791b83897b6b1597de6f04c182c0b77ce1c59d49e4690844bca62b5540f66f381db6bb14775d4a0ac88417df8c09bde17990e9d072e46' '3e998c1266002a06213c0e1f62a7f1bcc1e1e854066ae4e5ec9503f54d9e37bba8484557ce6bce0a244c0325b6b74dade5746c1d19e8b78c132b941d1935445e' '432d4a2f09df685be31d0376e84d22b4e1cd818d3e35bbc3570aaaf03000c9b964efff9f4497b1579bbd5cee147cb0c8174dc604372d884eec4120698b219748' 'e65475fef665e9975eb4bf8422577286acd7173b07649a4b8348109e538184263a91988d431f34d1a703f44c1e8988662539926a4219c99834a5f4f5f052e225' 'e46dad4424788d1629281c9b16e26789980904f13d0a9b4ff06e5801ef3ba4b6c290f9b9ac687f85a082a1f81be8f8133e1e4aa6b5336e821a3aa30ad352528a' '8913529a417a6cf6d44c1d2f864c3c2c50294ba6fa73b9c942530839951ba3117237e193ae559e3eeb5d19925dbcf0ff1f60df84eca9487c9d5c99a6ba33ef9a' '95d38919ebebcf42c9149b26dfb05c047055b2232ded5e3d055ba4048041127c931aeaf6a90d0d40c8d6026477a375bafbc84de283df5eb1d2a268dba03c760f' '437c259465471a5dda778bab3416d0620ef98314a94de994d67d944c58a1959852e88b3db01cc55e9e92fa1b4c4e66f912f46191df266f0e66a59e84b8998bec' '3344eaea97c004a5cab95bc8896580de7ae06a99239e1211c5a1bd4d712a9655323088d812990d4f6eb08d26fad2257bd7ca57ec526fef8a964ff4ef9148699c' 'bd89df065d526c2b15246c19582bcad98ff194f219551dbc0f4bf7d6014964fa264b23097c69885f7ecaefa765ddbebafa58ece920e9c4d42e43544e71856d0e' '5449b1fe8217615c66d5e4f189ccaa3ef3163a46f51ffab464e38f6f998e2aed2b82b8aa425df455acb0c768688aef7cc0c41254aef275db45a98c208058faba' '158b95d8312b11da954e6f2cd34bd5a1aa1de68477b5b3842efa8b225cb4e0a497353e543c967b3d53fb2e8d8cd5ff082dbcaeb423658e7fabf316b3cee4123b' 'c0e91643726e9d92566a4459dfaa78158be898d1378fb755892aabf4db87635a61c6686bf2917924388a00e5b67605e8fab3a63c895e6ff6babf729374701f29' 'd07e2c98cbd9e1c9e4213c877852bc96e46da966e2facb9c6e5680b226466a835aab39279a0faa441b1166945bdcff8a19d79d40310b94ea587b37377b12e3e2' 'ff4f013787285c0b6aa4880c4de576cdd94e9271fefd86bcba0a3e540ff3dbf2ca30727129df711c31afbbfcc05bfc7f765d50989fc7225772614a29ac11d032' '99ef199fa409d783d705057711272eadcc7abedf81b06324254b8057115a6ec71c48a861a71b047303cdb6b2d23c892f3b16a0c86b37c536a85d05ee4b1171b3' '153a07745f034a36316a6353ab09587e826838340330d553bdec833865aa9004f9181f617ebfb946c10eb7588b6e1567f363c9fab2778b2203b084b7b91ea897' '2b8058f4af3951c5f142eb164409852fc9d942d2aa35b5fabc096cc87df5680c7fdc1d6a18e017d36448a57e5f709ef9bfdd5d610799e786f77b08c85c9266da' 'f5576d0538b6dd1ede37d3f620e2ab55f6075227a70e3fd0f4a58358146b0c50a045ba7d1c4ba74bae21bcec570ac565e06c2dde6742643d3194ea471f437ae1' '263f6bbda4fda346f965ae7381c06ba103ac440bd9c92aef811b61cefda32698225495b7519814d8a18a8d0eff5fecd4a03ad05ef29c9269eb8a3fc76817a93e' '6d894c4532abed2ee2a432464e98f3fc137a2a79f2183262af63a7a530f2dd2f9127d66c90b458b6e62ef81a586c826d748a02a97a022b01b389cf3b066ae1fb' '20797684be4c80cebe0c6087a060ece8f888f74bc48589433316b29c606f4167c1a90af72ea49e8b1397785d84d718dfabbdf9388bed4a77318c1c08dbc1bb4b' 'f415c344f72336a57518ada976c6fcd2aa00f9dd3748a9d57384deb4fe471c38fede14299b9d9e96be3444b797c52b196636cd1d8639ceb753dac62081a0a7f4' '62b092d0eee68b5cc74eaa3d9684cdc18f3f1338112bd05f7f2b2a3c00c00766f558c21ed962b84a526c411886ef633489940c2e6ec08ef57bf86d8e4ec8e9fb' 'df249078972a86b7643ad69804ce0e98b1a3cfb9ec72d972b0095377f86ad00779c04c800fd6d08132e6a56f26d6ac470bb97d5ff572d60b65cf63e58482a52d' 'e4dc3c5906d66f739dab58511000a7a3284dd2e15951d05ce226c37b4abb23dc1a17f41531651a7c95ad3ebc89e84b8f7868d06d846a254cbd0a4999783ae396' '5b201cf730725577b3494fb8370896489360503bb812b7f8e6894491566cb586f0980ca2d2c4b2bdf2ad0b66b3086845b318b6c69038fb7f7c76d719a6af2044' '6b21195e6dd826a2ff17926ecf6f21d238a44d9ff420e3f0b4047fbffcba2af757fdd3fe7d3b1d85a3666b8f2f96647664418d62d74513a435782b7655083df9' '7770be3cb0e2c36ee1609673d844346450ccea19e6966239541d942c3aec5113cfd22663b4a1df4072ca1be3abbb4b0258f6bb2e4edd700525e051926c6607a5' '5054423562e84617f472d263cd0ea172896fc3a6e82f48d78ed763a4baf17d65d5cd2ab01559e4bd1369c764d7d8ba1a2d9b87a633e0f06a783e9627a0074361' '1d7e79193b420fc6440a17e712ca6d2dc75c1f4b39f462f8ef200e8c92767134b14e576716b55cb51dbbeb9a658a47de993151b1db8694c01a7c1efe1d4da478' '09c63285cf7b1d65fb0eeb349c13c337d207d34b27cae4f5b01157350f8db95e939cd05452af6b69b9b0ca261b409787e4ad01075b664f0d2d046cc07ab055f7' 'f1cf204ae376ae61a0b63cbb52d79edb2a82f23db8269ff7f96492926c65f483611227368f0071c74911f83478f917912c8e305e3992cbf3de1969ca4309974b' '9ab0b5d758a0c07ab574079c6e14aa084149d445c650a9097466793c32bf89e1612b2fa2c1caf90c3152c769c3d92c6a68d784e0104daf36cefc18bd1988b726' '032c0f66ed57b90535f009393f571e80a77f24f0d1ecc7767ef52a7326faf773c6bc61f48f91414589728cee2f665b350a95c20b8ac2f14d2e3d27968c4845dd' 'ca3cf959d3cdd24551688328566a7702dad16cff49a39f60c7d5cec9391385b935af4dfbf979c11ad3eee492be05c3ad781b0090f47b700c6df7c1b1697a4137' '4a20a49ee0a3a9d6b4b8a859879cef517668233e43091d1504e7c719a569ee58bf17b44d377a5a42b1176db71ce6e815fa62675e50e4e371e9b407e060bafb3f' 'b383131a40f4062de1730dc81705f070a4bdc468288c331dee0fbb9972b7e66205e8b4cbf73266344ccaf011cc72115045f847491d7552a7140a79e93a5b91ca' '2d50c238d8ca30ed87006b82d65a0f837257efafda864b16d98db0ee3e807144f8d350f08e40ec167a4c1082f497ecf94eca532bdffaf7e7b0f4b70bde345ad5' 'dc684266a676a09be1ef5f2880b9bdd344d936203dc79fe240e6165812076d8f5016783c908204b0db057cecc5cc4ef4a1af263ebe8814db524138bfecb7e0cd' 'a99728ba878ab244cd4d8501dff33c276774233c2effbeba50b0152754eb3aa1d00139fe1e17610a87eb6672ab767687a23e3911a45b719b430f4fa18f3f21fd' '9561ef36a6dc129cc979f91474f200acdd408fde72a64a3bb9276d9076770554154105acf1bb5ff5c9f9f7fcb5d958f451977feee88ab5b09b9fc535d9faeb24' '84a1424df46ba4fb50d5e831a3bfc6fc28c99b288c1d107eb8ec64736f709303e81a66ea6de2da51d074f4f4c63f0d6c654bc9166a6e2613e229f950efb477d7' '199e41b818462551535fa901229f35968c1b4948e6b8688367dba372524b326a69d1e2212d47bd11384641923fcefcbc5d9f409f5f3e72c623b2c6fa7042549e' '86899670cba0b9928fb56b7dc07101787a6de7c752e1def5f0cf0a8e474b3690fc648150088224557ed8141b09d98eb641a4162491061c1173a442ba03eb6322' 'f91a977753d141b350f25c82226d09e86682b28a338ce405c2c68d6e4f489a9d56a5d8c015bfbadd87c7921f779b152ebca98fed7154b604635efb25d9c0f8ce' '41de80bc7367bf9e07b1eaf66bae1267b0085d5e1994f116f8536dfe826b9708f4d5b8b0ad54d5bbc00aac72f22461129223e8281a9e6f7c020f8582fcd9d27e' '6450e341d72472846fd23aa65eb0a931c797f9c28fb5524b8fe4c1c3f4ab12921a57c750fe4877c98e893c2ed729d2ed32691ffab5dea4624acf6fab91f3d01e') # vim:set sw=2 et: