# 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.10.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=('335d47e93d5fce4ff6e1ec0305cdaa86031f28289cc06f30ab3782bae484ad10ac4b9aa70911787627744277715edffd8ec8c3a2008f00b8b90ea02b0d79fcc8' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' '328422adac0cfe6af4ecdcd864004b7ada8f8171aa954fecc23a7e883e90a9bb0848372faa1100440dc754922f965e1e7b98c185aa88df190bff1051d2146c85' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '3526402ccae1f0428f2e45bae8d0b2cb909ac2698bc3508b692b827839ccb21203ce414206039776f6ce946fc53e636290b7870e9886284d5e9d1e8ad050aac9' '465c30a199e6d9f85f3c2b2306d91cc07822dc57752e750c527aefbc5e8da13c91e1df03dbe37d72c377fa99c6472c682a9b7b94550b3b8088d7b49e9e82585c' 'f039df005d4bf66ba38491ac9986d6543cc6c8c5d7d1d2eb30f286b8652e0948406b7a1fa85422ed1dc059e3ba99dcf7dca0f8d54a92a0e7b6fe00d2964b8414' 'e92b2ea2ed9e4617cb1915f7baf32abc930fd571b8039c657f01b3cb4139bdb147f2e7718eadb8a7601cc1968c2daff4471624476b0b95ebca403ca75c846a39' '70d5029d8c0f6cd9b12db02f8000320c17c3d70c331d329e254e4007b004c8791941fdfd2825b4b2e3a36a3e0715e22bd883ebf332f6aa23efc62d0306ee94bb' '1b7074e9e79182162e889c6fb9585328f9667d89764463bd95e821c38d62a02440702115d389cefde71bcdeff1016dd066b59b1f217950873d81ae5cfb42bb53' '119b0b62e9e26cd3f7483150052771b4227f202bf5ed6ebb28bd66c95755521b0cfb3330a2cba679ee1af48f28974875394ff40d24ad60f102f7d3ccb7ccd8d0' 'd1494f59dadc03da9300e4731f4eb3631a3bda1b6bd3783a2393d6cf376482c759e4d6ec89f5cffaed00481887157c2a5be353eb753dbb351d1bb3d69600a157' '436ab9176e424fd44d8bbb9f55330b1f63e32820e263e7c11c8aa97682675c3b28c8c1ed72a374ec981b50ebf94739ac47815eacbf1691aadf4c6b8f5d4e1d8b' '0c167b073f86201ac090befacd518e3d01a578056b6ed5799b0d94d8c211ee016d7c7c782372b0cc752eced6363fdbe21acac4f7b31c72332968e14d5750b94f' '3490393b5567f73d92e07b1cdac67ac87140b55626988970805297445d00288bd87f5d8e6af4ce1b0706dbeb94ac00af42af30c80db8bd76f724149661163714' '582dcdc386a186b38d1e17bba3ee6c440aea552484a4414c9b8d01acc6d79f74bd5597482860e188de004556382516b3b08d41f22cff6fa338333416e17285ed' '5d4052ed64e8f2c76c040cff29f7a49fa9bebde758ad842463f5b83b7d8bf16ea5c6aa0da4872408f8ef36e9532118f801055450077a45f914302129fc669b20' 'f59c58904a68def999e044bd7e2f87baa25eae785d6ec41f225af09cada49e38930f4c0e59ac11a0462088ba7162825f638f93fe4bd1c29c018046495bf0be23' '19a663f63fff7cd4b8e02df4187050b953b2d430ab1e84834ff176dc224c4d727ca0d853da59091de54663ceb960ecc78e4c2352d1d4337b996dadd77a78d5b4' '76a681875978abe62e9f7a9fb622dbd7777893320936c83d9b9954ccaa5fc83e40cc168cc6477ed7e134deceaff7abd454c0cc02e0bec1292659b4a019b867d3' '83de7d42264899f418702054c12b16c3cbd4b9baedbd8090cc452c4a46c5016867b169f2e4adaaf8c061126e7548cfcf2d0ce4c08efb57ba90e31205206c0f25' '839387e2ff2292811670f2fbfa7b9ad2cf3a99be2f79783110d42edc1cae4923394b2bc48240083e3b35996e75842c9f8cc101fa70faaf3de79008968a1d2da0' 'ca72d6a347c5348bd62ab9731b09bf9b5f887df866419c7ac61106272ffa42746fc4c447c2a699e31b06b54e3df6d2786140b6750884782d971936b4a2ce888a' '1ddff301c1bcbc83e34616d47fcb6b3b07e2b2471d9f816cdfc7a016f9d2479f9c6d806d8996929963ba7ae7ce45d42b9652e47263ace539087c020b9dbb23ef' 'b599dfcd7768e398b0c7a40557336c34c55c890a41cdac0030bd1719fd5f48b57a45012be5fb7d2510298ba99dc7c5ab8f7944b6107934a1950b80c2d8562dc3' 'ab029aba6acc6de4f12ede9cb4e2af7a3ebaf536bba2e8f3ada5dd63cb3d0e078f1e84338bfb8fde98d2b02fa1d8802d217356607844de56fe38169c4f53f362' '1b7f292afcafaa13a906c7d475460905a202a87048b75c47f248f930920ec5fda3d8cd24b6fad4c3bd5b2b4989bd6df6a63279cce6a8509aaceeb40d11447dc9' '1d4249ef295ff1b075a617e2cdd61cfac1cdb29f4933f200e7ae469f8f1d093003c60035a58e0f73cc624460b572ae4c47bf6d59d2bc32b43da8ef2be5ab30a8' '62c769a4358f3587c1f22ac2904a8d5e03829211fddfe502c805ceaad1e5f74ae4b4d9cb7e6c26263f58bc5baeb1109d5a63f2559b02ebdb6b3bd47d5eaed837' '1c552be998e15de68cf2f7ccfd409411d36f1372de41a7a94fbd43620bddee37c68f46bd5df24aea10d5613ad1b5748768ed06f584e5ca156debb34e77070834' '4282ca57d2067bacf63a8de759c319e5604004391f9a677b2d81caebaf46d0b2ed2c32076f3b0d810f88f30c966fee3f53d9373e0504f1cbdbaa562927c05bde' 'd1fa6ce68623f3df4aeafe693799777dd8a2017b8b44c15c2d6c329b9790ceaf345b6d5ccf7149146d594b14c5196d0ef25180c165f03fc31089f0d6a168104c' '9fa4d256b8c9c1a0a03a340d0f36ffd6395ef3852c862d92b9cd340e990ee601dd79637e8a417d76877dde20262652e54a1afb1404484bcd79f4be8850b71d53' '1d97df0642cb0869400886564be83df6b6aedc3f873d6b37c25d56c6612da07b5edaebb585deb1343f7f73fc3c680c93f10582ed6164a46553bba3c929973917' '005a658cfc0ec507bc8f1eaf227450aa7597f2f1cc2f55f8430a2bda8ca691f074cbea8ae28810bda5358eee8433081aa2f6c590418b600ff04257d0829c062b' 'ca9689437069997083c54e15b6f007aa45eda1f6f7e28832d4315dc91b46adf7aaad0fcbf9ceea2c8cb1bbf8dd1402a608bb351044a5122ebee087bf838074f6' 'ca209636dcb898cfa327778a2753b771e96f7a0734a517ccf5311a69f9e5d88ab9409af18ebc3b078dff48b5a7c9f5d5fed7490a8126e6975a3f014c1f6d68be' '828e05386c851076bb2b5a983c668e5860087c42a601d415d808de2f9149189aec109bdbd69b89f13badd9b277eb21aa1dc41569ff93cc86a0038c91faf18138' '6ae1a746d7700a614a98d34fb85445358791f32a31352dfd365d3189d31ccfa0804494ec17b9134db72d33d1b6554ef84c53f8866e1fcc1b1ce376c6114f337f' '0253e9562171401c80d8b4b95910716bdd8a4b8daa5c538bc208a650b7aaeb44145ce6d9669f7ffde5e3fff3a63fba882dc1b724821a8edb92655b93b68e2fe6' '3acc4df07cb48ab0d4d662f9b50e00fb858c232ed5d154ba53478232c7d39867bea02e20123789bba63ef9edb2f3ef7566edfb053996d2887dd110de7acf5802' 'b5cd3ea29f877a82c8e89929d04c35eae462b9ca27302a7688c598133c73c97a2898d6087180fc53b9f395fef29da9b2e0f8d0b7f20346976ae4e5718d3b3117' '180399f26ccb7ec7b6880753bb856c07c428013124e7f83b60061ca26e8c3ac40a8348635e922745fcc0d1df2cc1c6e867c01bac8b719242b16c6aae6bc2338e' '656ae353da862335214d8fdc6b9a7c394a182cabee8ab74b9ee259cdeafa3978ef12d91602d23c5746ca780436137cb51cd23e6e2cbdc699c88916ecdb14c6c3' '069ac965f5c93321aa3052bb8b5679d273d6e96529d2fef1d384fe232c8fd82e62d7bbbfa65ae1f91e22bad5299de5b20d835a71a39be96dc520da23421a0c66' '17988c2b396ff3d38b087cab8134fd6c84320acbe77136428c3af9d4fc6cbe103303ae517994616bb0ee64c2db474ded04b154693e9f6b651e6cd973c929e078' '52482ea904b5ce1fe26cf9080604711b5a4b8549d6eedbe0c7ba0a422d3d2be617e0bc8c451c251a1f7bd6e6c400b699cbc44c27526dfaebccf1539875a444c4' '39c6b71e4af3addf63de33318abc59e7126b410cefb9484790a6f513dd8b22fc77dbae97bbf7b2c1f665c1737d56c6116dc854b24069600b85e2705047baf4e7' '44c54b1109234d7c6900bb260e98c736eb81d72a9c70f5871fb9063b9848dfecbc92d03d820498fdd94520bc5a386d8d2cd35f8fc1b308cbdb56394ff49d83ae' 'e93b16f15b1f4b8455e896633aca14dd93743dd6b81b9ebfc79edc6d36169b658219d97cf8b2945b7b5fe487e40896d40881a175ae2823ffdbc2079536ffc55c' '3fe2639ee2d318f38c48aed73194a127264edafc3039e12014aba424016f7cb1aa65b3951f057d19b2f304c99ef94a8a861cb600842d1493bb0cdbc6b58a16b1' '81d12c87cc1536fd0527fd5972d6342ae35888c046f2dcd69563f502f7029454769ac0d5d3ad1d97ad4fac741a1eee6ebafdf066403720bd22e113a6c20f028e' '767bfac664aaa6fe1df648d7521b247d01fa5b573843038fa328dd160e3678bbb49be296aa8d4cef1a0743746dd0fe915c9c1c7b8d6b91b915385da0d261d0e7' '0536f6c47bf6d51c93ff055a83a8c48ab400010cf95893ef754686cd4742c0b168b9ffc8cfe78b51f7b3fc6a6305961463b8244b33f89ede66124e76a0efda72' '73fe6d78a0e4cd4c18b31a9576deca4d996c743f199015054fe09b8bedce72b665dd7eb6f7eb60cf0d71aac7ea0f3639c1f34b06412ce376615ad7a05d7788de' '0e9ea75e343a1584f76a19614b8501c3e73ad903ae26f6d9194b25e611b55252312eda9739ef80cfae5ef66ee4a9161d92fa58a598c25524a41540b24a71a118' '84b840e71b4dcb4b45eb7b4f0cfb07dc5a176048a4a393d75b51f891eb8c911f3b9d917d75bcb313b7c37aaff34cf3db353b6d903b50c34f18af9632079750ce' '9198f4eae1c184f161e2af2870cd913561cba89a92758268c34a6b84511a8d5fedb6072ef5b21b6cc873792a58202d9e023389dbd6034e3e0e1cf7124bdf1aa6' 'eb4c04444e3a3a86e21e889f1e7cc5bcf9d814394a17e1db48965a017e632b13cfdef6d3187a8569200a682db21002be37b3a7dcc705d4d256e449089f693ea2' '7fb1bcd61cbe25679c10d3fb982372b3d2b7b0648cebaa444c79b603fe52a2e7df9454d7b869cbc0e2579c3ba230087261ab71ac8fbc5b04e76d81cd95a75456' 'd06baffe34d9b0bdd39520a97a54bccf663fa9b422681bfb83c1e5e9d2d9514cb9af235b624b594fcb3cbfb12b6028c9636f6b7d9278cceeb48632636ee3a60a' '2b3857b007bf8bfa151779f13e92d37ca1cdf457b0a8e3c26597e1a25113a1167bd92ce067f830866c9fa9bb87dd5ed4eadb088ca41549c5595d35b1bfaa7636' '36ef7c7b6a4b03c0d2aa105bb8ff8a43f789a469cc99e3fca5c7b116d087001889c31fbdc4d953e907577ac5caa0e66eddb5ae4a1504917971a2b82864591395' 'd4f111a0c73dbf9d008417aa322f22f6d151051821b156003e6319d258f676cef32dc3fe2cb369982f3c97cec2a2e174556971730dadb5ad3ec5c1e1d58ec16e' '30f38ceb5bbfbda850f51c2ea5878e7019eb0457afbbc3e15d7912621906bb75c35cc280fe900d8a1176222904ec0dceff08361e79aff3e46f7aaf59db640d8b' '325add54c8b6f73d02efe86360982e391da3d057f4e7ff7bbd7aeaa3ad633652d8acc9c6b7c23e351339f697be5e2dd8803f2b41e0b4ae3db894c71161646d6d' '9aeea9dd0d6954b665a2149ccc7f2d92d64b3ae62c04e845ae87a015d03e7395827a62d83bebd087865051e1a9cfe56d209adcb86852636fb437bf87a4213d6d' '2b55044ca105c79b6c5644445aa48a4cf00bd1ce7f4982033ed93edca098253736d2009277f732b404e30d59a6183202f65abb4286d402685ea3d6fd1eff6eb4') # vim:set sw=2 et: