# 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.9.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) 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=('474b5aca9c5e54fdc72eebff938f0d217bc039c3ac8d1caf965fb61bd1cf349f389a1df751a525de567a1eeabd7bb1bf2246014e84c7aab89edce059fe2e72d1' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' '328422adac0cfe6af4ecdcd864004b7ada8f8171aa954fecc23a7e883e90a9bb0848372faa1100440dc754922f965e1e7b98c185aa88df190bff1051d2146c85' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '88ff48ab1881908070abe982cf3de1b6d2e956a7a8b12f2504369e27e1a6f7b00af3cdfccc6f6e6eaba916f05811b88b8ef36218373c1fd709ab5814ad94e67c' 'ea28bb9b5b13c0d93429239e27f4166a1c408b21973c850482ddf717addfb900e418930dbbfdc86ba6f41a4b561584ca6d3ae4d9118a461ebd856b9b9fe6b488' '673575fc93a75631b443ed09df2c3c211f980059202494bd8320d9c4e7d2bdfe7611b83eda7d2c08695cfd7dc7adbbd7edf99e9419d36726434ec5bbd2f61a8e' '578dacbda7a6d1fa9759b6bfc2c9118a2918777e19d9f07d32b35b30f8d2e285c69a8bd446d970f135797a41b233fa21a7e73e593bb5d264584e256ebe9e4ccf' 'e6b73c1d372821c0789c195042461ba5339893ca877c63ee3a49f34f8a362e2d1af0eb259168eb0d81565f01f5550e00ee33ac8570d25c3edd4b5ffc10db8444' '54c160a072b51749c4362ea2dadfdf2a1a01183910e8986b33a93f2882218a8f74e250a7bc9fd1c4c9c8cb13c8a5569b0c4a44a91f89f52128ba63a5d86e50bf' 'af31836f18d45886d8da2fadf9052f6df60f1d4727dde10e21a14e26590a579b4d712cf9a6349bf49a47378723b003f0abbe648e1ec6898924c2256709b4910f' 'de05481fefc407713d6d62132099526aa065a4b29c320f4132f622f81d205149f18a7bc7bb60897b2739dabfb72017a2f68cd2427178490b6bd3220101282db8' 'a2199359fd70a7fe19c21028c81e51267d66b908a39434cb9c4166ccab552a5f755e10677a7a2701e1c0514bf6c2d48495c15805403339f01eadbc1b98ee71b0' '354f373faed70932a19aa62a6159c56dd85b7e06576497e8ab954d1293c7393aab20bc8ae03527860d24e69c949963af06606098a87c904eba837af41401a937' '085e2b7af5b01636721dd0162925677e983fd016eba2247a5b5ebf856014e7228cf70b9fc70390cd42575488cb7f3becc63b75777953adcfe6fe93cbaa7622e1' 'b639499d8aded54909098515ded0b522d8d219b4d0ab8a665a4e273f9b103090775bdb15592f369a146e0f72b7d553f54f7f8855896750b6e7590ac22144f182' '53971dbd9aaf39a08b5b90b961a63e4ff82a994efede605df6aa88984ab16732e18885ec1abe8aa4e974ebe5a475079de0dea3275498c50080ff5e9ef5be86f5' 'd58983a1473915922c913d42e2c6ce2346cf6221d27c0ac0ec303c99552586752bb381e473d8a669214828a3d446b8303b6a24c63704ceeb658cc4b1f2604ce6' '71b4e64388c03c736910b5684375c7c97ac26247304d21d34952e7427613f72997ddf7b972b73c48fc5b60dcbfbbc71476fb71fc278275dc3b958ab105896911' '3dc3425ba5852bb89cbbce80b6218d37d6363367824801780e8539c69541d86588ec79e50aaa1e443210bb4b14b245ad69e410c38263b5997a4b9664bd495c96' '281362a6155144a20a4671127530a5abde1fb3a8d8f6fa7555cdb11f335787eca20c1a65513ac0124d7cc33b0b1afce5454fcebc4323270821da52e77862b199' 'dfac9afd8fb756c072382cdb5ff47974a0b846b8fe5ffca81581fd07167d4f24416e4d3cf1ecea163f5c278c9130a00c061139ee79edf2e18cd58e30f9d4cb06' 'fa6b590ace0ce60e36241479466fa67179d9514bea80d61ce1343fd418aa37b8f46e693d6ec6004bd91fd96b5725cd940d329a65de6773f44c16066179730a33' 'b7bbc9321e122e32bd615390d326c12fab1090cbb5bdae04acacdc377d76126f1c5e90b588215ff6eb2c5e9c1c6b147f5777af2eac2f03d63962f1c2ab0ddf44' 'ee2e6d538ead1921ed7936a691bcef876283c559a78c19fc66c4e17d3c0d7f673152a0c929ba260877fca579978c2891edcbaad6c59c73236e63e642f8df8afb' '7cb80474ebc3ede31377ffa41816c131cf199917ef144a9c5c888953c64463e36477837d9e9636f72f732ae3299dd4feead55e866bef0beb85bc8f1cffb6de3f' 'a84a8eeb69ab9b3f0394e05318455c4c7c13169a835719805a1643f6a13c10ffe4466440e134dcd3d88f62ece4e6941e279b78dd8674f6c86796ea160e79728e' '1ab01b0933073d1e21d89018f75918d12adea1dc8fc9fefa7a439570c675f8602f1bcfd785e661169c62f01b748965dcf7ea622b92b198bcd5f8b84a7b6de28b' 'f6a84137ba5250c328b37a3536713b9ec720da023e5f0d36c559f08af63b063529263a8f5ece62f7d14200334f579ca538bebeb0f426b09d9fb45a6be85a041b' '97ad8be20e96bc44b26836df8422cf52131c12632369404bbc19aeb2a286d7724da3d4eed0ad26380ab056743d3e699a7ff8bb3f6f7ad4cfd99de3ff706210a0' '0ad821aa399d3d8e5c6c9c4f50b7f2965b3aa0acdac03f033ae82096e1f0d28eafbf127bd67aaf0dab02fe09102de78dafd3e0666ac818ca448ee304ad4df689' '88cb14042028e2d71719d58c64a8a5e7c2cb61a041d24af7632424ec11dd4db2ea63e74b96e46e389f76ecd0f30c3827af3eeb60130dad89b8a24e92269341ab' 'a9ecaa1f1cffeb7ccfa4535980162e382a7de352429692a55aee9b9bdcda16ed8e0170dde55f88a8cbe2ff2809d36f2458b8f7173cfe75b09d4270a86fc717d4' '5a5b4ab9861d8e112011357e78d9b0ca9c381bd573fc1964c6f611f6c0a7f7b3959861ec18a7c18649170f42f3a46129e6eea8fc97310013100bdd267a8d3414' 'ba6f3b019d50b13746673ac14cc8ce4bca5fe4d01f4ab1a99e16abb3a68ae72d3c172ee89cc60cac4d3698f2b3c9d4e3bd2e0770e09059cc13dc3c26bb9ef2c7' '9274dec833ee126465303506996e4910829c99b815c036ed489a1b483f4bae0cb24558055861d9318a95f3021a5226e2f2c732223754c1239f4907a5787e0368' '138791eebd4362903a6288a9ca4cffd0d2d09ffd95413a21ca4df7c9c0f6977aa5c1f077154b5a0a735d97e40f83cb9b121debfa08a0b4ea9fcc9c3af25d058f' '52a6f549f2771c57025074e39845ef0ffc8d002e21118766bbe7f8e304000c45dfab23e602bc7327807d3d8301d5619d35c5b460fee0288a0348903ed4f03f57' '2f715c015a02efe66da4b19aaa27fb8c4f49c14687e7ab22c40615ea6b5051f13f9e5c4dd008177b66cd42a470a366613bf660b698d9fe3c0c801ba54625e419' '651a5eb8a641db3bc82357d24bf9a545e591b189c3973ee2aebc6a4403d579911f9d2caf27a1239822b478ec07724b6da2c613e3dc73b996ab457f6a714866c6' '1d5552138ddc896efd0855af3bc4587c57fdc8a323f35b1b6f574b4bf243745295002a62f6c1b2f2d448542e6f68bbbd7472e152d9e39283bf814eda08c0af7f' '4751002ff331e59c4da910c068e2415394bd77663b7b87d5a82dd4533cab9f7504a4ed433824fc313554f5c49f6d0acc73979bf94a48e620c2f268e440c1f921' 'ab45b4eeadf6cd465b0bf90873f146b8094323af795e201f7b033863139559ca35afd546e4333b01cf1ebb9eef9864f5c49ab9ba023ce677e5762a1cc1892313' '8529ad40230fe51c1e2cc8eade56cd8a4d9458408e737996614bb7cf5bca4b3fcb83e995ef722d16a364d6e14ed04bf103592c5a97289a5d261e6d8f0783e669' '1f5451d97ddcc0cf88be6f788b564d1675217dd27b57c418884b421c76cee429499b0678a0caf7f4538b69f168cc562b84e18b8fd1663aabdaf034366ada81a6' '755dea2d0608afd85782554d6d5fdd8a952f1b78e34d27e6eff3460bc21fa1acf4795f969803892bea39ab7f07a22847a1f2dfef1e11c056df3a1aa642368911' '9c451d80f4c0494cea1786e26933c1563d767d32eeb957a24c138c353aee6c972f977130242ffd4648141238983cd9c945037f56a43297db4366efc5806adaae' '0fa3bb155c9d30b7f5d47c2b7b26fc9130b3479144920a4214ad39c5f811806b085b756a62ced7840174835c621d5b0c5ebdb286d742fb320562233d91a92a8a' 'a180f8388d958af5ce54b7ae55b73c0d36950f94c73499c784c6c3314297713b314c95774dd53375db4a8b47d40ba315ae2574027127469b48bcc8c2010df1c0' '3dd4254fc63f44bf9e8171a4f2a0c4774496857db4d5334ef587ab6b2d4bccca5748ee4228e11373945b81f6339e7095a65faa3976a7cb2034f59fd5b4fb54cd' '75e4f329e69a5362915ee15a3a9e83030f0013b1a8bae0bfe32976ae8d2915d7bad4e1a372df90fde78e7392d53aade50450350b9adee573931eb7af7a20e364' 'a41c5975f80e2a7b6199a4eb89fd14578b3eb003faf50f2cf8e8960c6283005f0170cddae897b446f31326e6efe811fda76fdf590985ed383089372dc0e90632' '249367a350a23c4f65c87b10598e08b708cdb645152f0405f98c14c407309f39862a4112865fbf22d2c3c388f4a9c1b0233322f88928e98f592d53c02ceb4533' 'b260a659a55d3722add2eba16ad3bb871e9b4ad206139d280fc304289cc38927e3f9052a5791cfdde82995844ec0e857fa7f0909fa02e88ca7eb3ce231b0dbbc' '68f636e51bfcadd3bcfaf474d646786573f103d21d2a74b0b10efb7ea7c224e9712a78a46411850909c9cb51a3b2cd9c9986001df8c4871875516ba86b1ec77c' 'a7b557163897aebec1c9f541320a08e0d6135ee4450e628697371cc07891870db3cb2e4c0c1ca3792a099042b757681a2ee2a984f20367f44fe3f51007527032' '87b9143619d9d6b87b30246e22c387279c25a0739897d3d695e89ac0eb30eb292979793df37cc804c98546b99bd8d4310b287445c3925c81f807a747dbe09c68' 'b0e94ac7eece597d8b3539ae16a5b64f0023e5a597ee94a9d595f597022ba3f707b796425bf484d0b8105ce8307f1cb9fe0bb46d642db12462272a666a6bff3f' '553c34a62ebd2f15c993bef76c649760a532e22be2236509dc6c529a37549dcadaba8dcf929fcc8704712ca3740ae647a5d1fa7edeb279210cd624d0b788cdbf' '83874b839edb45be55ea428a4c57a2e75a59ce389bcc9a56a36b7257177d61599cfc11875529062f5ba4cdf40f4ed9374af6e846a3d02b1de2322b32ea2110ca' 'e12bdb07eca97361f1f7b0edcce5d127996a13829d882324f88f358f615eacb40ce15f3597181a529d747e986a49aa09cf40190623be1916320d4c373f8cdeb8' 'bfa109ab0cc8309100a653d8d3b39f14aa4178ed6aa490a825274d9ced25141f896a63bc93b4556d104ee3d930057e989ac9452f262f1f7e99a5a9b5f1d0ed5f' 'f78b1ae06c75c518de7a0229d64f26b2eec6a60aed637d8f3c91d2a74c6d3082caf11d84b41ac2d1688c38804e48ea5c8a1da15f7da7e7b88c528396669e7999' 'd94cfa93c26f1f654da9d26419ed63102a88b94732806c6c6c1363afe3adfb10535b68aa2d2f0117854f9a5b9478fc45e165bf5cc714795e3080e2fe9f53d259' '1e0bcef6b3d5885d95b792ce86545eb52d57805ef0bf7315224e624ee849c3219c4cd97cf74d9496844887108e6f583d58b2258dedd9d0d60284d7655beca8f6' '7e08d73b0a720800440ec7eb2d5ffd0e7ab393c6e6ecca515f5005bf1e4369a2b048fe5f4805536fc067712aab3b321c9bd546a342762114eac51f59871dff57' '6030ad6d3c3b467ceabffbfff4d808ab5c63ffac4ece12b6c81116cf1a9b7cc5ce447f050115b60226ba0d3f9720636cb634bc7beda877eeab55765f1eb799f2') # vim:set sw=2 et: