# 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.1.0 pkgrel=1 pkgdesc='Standalone mail and news reader from mozilla.org' url='https://www.thunderbird.net/' 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 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} 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 msg2 "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" ./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 ../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://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=('da03935d9f7f9a531877b91e93815481aaa49afdd6d2a68308c59235202a2743afdcbad5604d5d889580936b08382a0773123477778049a47ac6202b2b84b80d' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '2a6c2b928abfac42788b71982c52822f96112a6b850b9fc7fffe299a0a40f750fa51c6bd31c962ca3e2d7a2079eb112e41b04565224b6128e61b89ac7b5f1aac' 'c163199033a0cea3d91d5f6c4ddd4ab75cff5addb0e29b30ba8726d49d3a2d7b199c6c5853196d502d4296dac959fda79035ad52a99ddaf6c90b05d1ddf75d01' 'a867b6af4926140ec1e83cee458f4cdff3ba2fa11daa8ef63af435a928597cb029576a5051240e913b7a5cdce3640fa5f5bc652ef296f4c5cf4eadb9d1791352' 'b77b0fb42f60e067845bfe0f7a5e81553d335db2c4970d1c4367dd8d9cea49a50c97944f7efbcd2c784b96840f7904c8d268d76ce932f0dbe21d028032b56ba9' 'db86ba00e83290d3b3b8917dfb5d058ad7b6b296a77779f2a127fcbf73874e141ccae802766abc4deebb36e1e90b42da53c0f41fc56461df15b37b27c63c4e7a' 'd53e8ac98c948b372fabf076f09057027f77c8f28b7c6b59a9963d77ddd78fc3ebb366de64a53ffb336f137053d595de98e3ff6bc3984d222721f8b9a3b84034' '2ab224b594b05517d791e431483d8b012f066fe9de6a33374e4575ee68468c4f1cc2fd14828526810eb661f4be06f7b02ac71926d72b3cabec86e0f8bfba8308' '731679432225edb7e7b1deaadd1ecb470137d112bd667ddd9d5dc571f9ac492c9c9a570d9d77c90f9fd2d140b59c836e6b6f86670a6d803e375f8885b1412ad6' 'f02f8ea4844e5c5679ddc490b1a92bcf35e3560430a64a97a109fff80575a56a6fa56c72ed00bb51259918cf0764ddb6e0093dfe6d735163b9f382cde67268f6' 'cedffdef1d4b74a91206ac1cf1012c4c86fa595d149520e2b2f647a20fb960a961de28ebaa8a5b94592f0addef5d04653570f50451cd7547a682aa6a75cdf62c' '946f93a589e606d80b03ffd0341095d80753cc90f416639604017e8d13fd6b89464e9d714fe1220f11ac9a9f96c43e10841ddc9e645ce99a9d6107e957468fa1' 'f016eb5d9812c8422cfc607342dbd39188be4465a84025cf7274f1ab92c9aad0d3cbe85c443d28124fca1e1bb0f9494815829e2f94b0055f68ec5801bda7e014' '7797ec8baf7589c7a58b61f804d43d27ede3ed7c334317e432bb4bc8c8b0229356e1ab01c7961b74dad17f10c2560d5c1d4c9967b2453814b08a008fa3869cf9' 'a3e7f873f2044ccbad6d2a9534040b7f2914b81be13b636d32ce1d34a938ec54b19ffcf571dbcfd7453f0bb8be1fa2d7fcc851b7a016a34c9e734c8835a34bbd' '1fd27d0ce2f3426b783ee6bb509f44c8c74acba161aa473a7d6bb338d4619da9ae0e75ecaee1cb444cda30c9de7396313184adf5fd836d51893673e887d7bc2e' 'f75a3bd59b0d1f93accd57e742b1e6488050882a184fd63614d94a514c75e951545b4b030b377bca60e428ffd718be0ed6b1af74679bec1d5b1732528f8b54c0' 'c56483daacfb5090c23e1a6eeccb31caac27c69ac2f43a899dc328d534dbf2f0f6169f8b2fab17167154c0053b7ccd01ab8ab93491536c19bee230c58c593a2a' '52ae185de821a1c36382ab7baf8d49870e1170433bd8a429b83abe85d0e02d25d0f241c8497ef9260aebc082fe837ffb38e03b2cc79b6619c74946300fc66c07' 'd10a779bbcba23646a1cda28a4310cd14996dae8ec1cc7e407674ddefe1e10274640d4f434cf49acf38d19f4ed7b7b23009dde36fbab0f26d209e65c784e6585' '3333aabac9eb115a9f9a06c4c2694a19625c73a56dd41d584cbdac89a08b99665f44a6ea5de2959def40e79f1889502a0b4df05ad441f0882b03332439563f4e' 'c9721d7fc19e08bc8c8ee95cf10f977ba968633267bb243b00d3611379473d4d2259f11bcfed4624ae39c03c936166fdb345b726609d439aa702ef9a63100d43' '2c837c008d1f195f6993dc6ef048c7c59f41fc02a0d2c4ae906681b23593fbc9526ad629281e25566ed2959e502752c2c01127bacb479cb0a1551b306375d38d' '6a16d477290cc3534ee5e80fe4cf8c16404ed03a16fed1b490ee4e5c87f1148a1be4821d7d383898b9a99764ebf96bbb3639df5bed85eb6ad4627939d23700c0' 'e3f2041e8f17916b535ce9c50ca471f2673f3d486ec058f84abe84c83c2e235f136a756073b944381c241c0627976b18cff77977a05f23d33a52f48fdc5f5732' 'be949220fe337873a8af788c5107d2afdaedfaaebc57e6a10d1d6114608f32d726f0962f80053d076594d7f7ea4a96cd22a158479526d7948efd546c19a15dd3' '81d54df92a32ae9bcd1e2b3e7fea67723858faa944e160a853f67bf8d0023db4e92f78c2c2093d091f5b036d9a57ab0f2f67521bb8c48187ff4ba861a484567e' '4d7651ea299987bb2f024496ee07c5b52dd5405c583f672edb3f4d5c50f36332fc4a464d24a461e948e9d6c2b3693877bcfdc37449c7be76d2d586dcb6afca61' '58b4a720c43ed978fd941ad26d85742cda7a1af119833912f354c85b5f281b83e9a29d2876f21f7bc51839ff8b8b9362f7900509c2c548cf7011829e39c6cd62' '2f00d3630f3990eaa16b71eec7372bfbfd59bae4fd31dbcde28fecb81c097f6704fa4b34b8ffacd0f3210dfec62c37e9c2ce85198ac84a822fe33321bea42f96' 'b8dff2dbb6b9e38bad282480d4c347eba035ce616e47e6de4a472ec6881d9845ae9ad3a5d0a6cdf5060e3d7de81b631b05e994dbfbe3b973229d9fc84338c245' '715c609a12c5d061b529da18d00cd3e590e1907c8b0e3375ade7506e332289f8950f9c5c24b5982b9c6db83172f234113d7cacd31e8a75e63e34f9d644e3c116' '68bf40a00971ae48a8607786d1c9a71dbadf98abf62eff0c896bc8dcb1c84a316111e1d2c763ab6eabf8796c03b35d661efc1ed7b2bd7936af46a9066c0c1a0d' '5cb58b0a59cb8409a579d6e7c53d8ceea3d88b46d7210c767b7a7a4aeeb50423510d80faa66a532c2c345c1b9494e2905b2f267e807b0a09770dc1b736c55555' '4b1c189928a0057a46f77ea7e0947a991b47dbe0fc1397ad44ffc1001345374ca432869725045f24be1e2e90e27adcc629dc4864c6230efdf7573079e269a73c' '62031caaa8014f2a8028a32cac56c0968b0dcc07a2db92eccf07efc5902099e1d6c6fb29b6cc4a8c5033b6a507db14c987cc65b0d5c399a68f8eb4332fe1889c' '2b5186d687934bc4a47a90e0a42e35afbaf1650817c6fc770b65693c62ae8cb4ddb721ea6147c4f1e720dd4e8657cde078df5405c99cac148408c68ba904186c' 'e18a79d7dbf7cd65f7ffaaec49f355795a5b4e6ae27cb3d9bc99539980d250a26561cdf8f1c502752c30805b1c577450e945bb6a10458573f6cecf028e03d54b' 'a9afc0b1e7e98afdf541a40585491b8f0f8f69e19fc6d5a468a489bd6c4517725b94f7e55a97f3d7f6948dc1a4228af52979455e18317903f96cd8afec439e8c' 'ddfe05abe6d3529f125fb1f54502aaecce2e322c2682f587d713520e09edbb10c17b6c08919d1472298eff43f09e73bdf691b4e46b07b689f5a164fee5238c57' '659b90a4c2773e3108cd9ce6547d31adb53e5b324ac9e627cc0880735e949e6db7a9b6bddbc2b8116140bf96c766534c39fc8883e768859bdd492e238d55b0e2' '0e38c0d782dd5fae8d52bcc020c17be91e0f01786319a252d9c851421440c7e75b2d458a6336e8d8a38368d2d0751b9004703f68da285eb53f297179d3827d6f' 'c8c6a908a043cbe4b0914c8803e89a07b4458c42c64c9284ba0d37d1bf619665458140435c40bafc141a763879537e0a7726beab966a97360395035250f4138c' '7ae4c771a1a9c5ba1db689a08ae88f485e9a856e680817d6a930f9b3893c41b2d568b048baeff02fce1850a46f3e0dc94c1756829c2ca2a798cec1d6f16a9a7e' '87dc8d20b7882bb9c40b2f50112b13104b407a26ed24ab15b230b5d99e354dc880be3fd9e180ab5e3ec5c91c19e3f6bc5e982ef16ec1d10382df7a621316abde' '17b49ac92a26092e658a1b1e42e202b3942c1def84a9ce5426a89047b902df08c2627df9c62c147b91b27f3d752bca46f9e8caf11aea0c1b8592df84185b30a0' 'b8f75f310b860dba55502d37ea3debfbce36841ff31e98bfc28bf7aa957080c163ffde1f4c58be69078e5ef80d77370ad435c87087beb2b87e87112691aa6f22' '30f2462c67056383c93f2dc6c588e9fe93a868ac67a4269da8526ac04cc23fe28df62ceb16b8aea7305ebae3b649d3b02e1e6b10d405224395f9f61c5d2aac9c' 'b985957e2cd58b013df18fba62c4eecfdeca1d317d424fdb9260ba227c6842a4a8dbdffb58009a933d127466b649f9cd9a65b242f750ddd3683ba134461dfc38' '2ab49a92d6eb260fb2e076ed7624b86c64f683298e919ee4c5cc91f3cb54b3919e199b115a40616fa8bfdfcb606700eddb2e74925b406be6712d02399cb0f394' '23e7f607a85b6f7678eeb01f3bad8aaa196f4aca32fb7b12a43385ac8009ceb5288687fe5c141af149639d98cf5df7e42700a7bc9ab04d0a7c9c87b4fd720dda' 'acc1bb107d5944c5c291a6cc14572498140e74e2a3abe0e38cb2f9d82a4e8898ff5aab0d5f986c106ad180d3d0a8388aab8abbb23ae439a81133b86fa080d01d' '9233d480a4bd763db3c5896469626fed52c270dedc3c30a191b1a9fabfee62a84cb96d778fedf5700d6b21d89ee67823ae8ecbdb794927822efd35315158341b' '173d19883d9660ca84ee7910a41354cc9a9021b2613e7c2103f639e508fa3c61c22e7f6b8ec49ec61263240873d954295ca05aac132f70bc782958e599f45f7a' 'f074da8f3466348d3a6d33211f849c20c53cb9fdbf5958c49a658d4f04e00e5ba9b231a8269fe919b7d6fc6e2adbef904d68948d973943dcde72c500e6e28ad9' '518b68dc70ea3b62ee87a94f01758c9f28812aca433b34a2d4ad5654c41313cbd7ab5d01a7e7619aaa774c3896ed20d24522fbd1ebe79f3576ea630a214e0e10' '4c3d36ba2427e058df76129b541cbc71347c315c1dc0b9bcceda3534df89866a7dc9c28cebda707b0f345fb38f0493741611ba1775c52e8f86f94da5e90c2c4e' 'f87ca968a88a524ab4cbce68aea9e36b77a26693185da9d764d1d6e9e829eafd60750edb0acdf956e8b78e607eea16a1c687389ca848b440c11ec232bfe57d00' '4a8865293a1e85b99fc6a414b0c978a397f891338f1ffce4e492f612978232f4d3bcaff303e18270f250b627e7d8c90ebb3d5d8219354d636d08fb492970dee7' 'be1d4b17ed8c0e374df2abc588603b341be0bbb3416c2856bb58da2e047de5b531fa8afb76b62b424f6d9cb962072477c3ae7a7f0842f0e9d048792853b9dce8' '4fbdf0f19b568d9a3dc2ebe8628b9435faf6e66558d248f11f18ac8bbbfba7813a67addbc941cdd217682a568874878f919f47a4d491e59f7f1b8e27db63b069' 'ba2bef97a9fd49e1f16b6c56c509dbba56c4041cb1d99fe1e15d5c3e3f80a3359219a6bf25f454a345eeb5a602168d5afbc8ca0cdc9b4e867b54db17a6b473ca' '86fb5511ef1a84c5604c7f8c846619359b2c41af4739cb7aedc10156d5602d5c6f576c5ef53e98c6859294b96b4f80b44c695eae80ecbd7c212b2c141a8e73db' 'b07b78a826930b26e457148f0ca073a8ad92c9f4ca7f4ee735150d72b1042399b129c67ddbfe5700a944d56492cb5b6fdd9193cd6809c71ac774fe0a72db4421') # vim:set sw=2 et: