# 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=102.13.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 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 icu libicui18n.so libicuuc.so freetype2 libfreetype.so fontconfig libfontconfig.so glib2 libglib-2.0.so pixman libpixman-1.so gnupg json-c libcanberra ) 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 rustc_version-0.4.0.patch gcc-13.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 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 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=( '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=('1ed48220f91cc2c38f59067664c02f1f2098c843810b8f81cb8dee4fe98911d87aac352ab8639c68d0eed74297240cd9e0ce0e64a40360511be85315f2bfcfc6' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '36d9662fc94cbf7dcf371adc13a9cda679bc75df961d86de019d3c8ebb0be3062d5ef762d175fab58696db74758100a65de45d7832e0e2bd4e15c901f72d8349' '3fbbcdb2cdce00156ec54d517d4709203b5324cc73b02df32be3891eed24c37d8ea4ac8acee3b462da340ef7e2addd602575f350b10d830cf3eefb707e849794' 'fb6891e6cff7ec6a85d4ec50b4341990bdbde7da8b32527d9849984a09bf3260b5cdff0900ed396295d5e3d1a120046e61f545b1fb1a024a3b459da18983210d' '7d51c10e2b5965f25081b08e58283d379ecf4ff9bae01ccf2b0f80d6b0457ee80e1f9588cce2d0524d776e44766d3f7f449a0d883f3871dd2c9bbce8cfcdb994' 'd1b2e675380c8511c587229a3b8bce1cc19e24b5fcbbd8d778e537d8e5c5614dc3b8b810e781cd5ef03314bc275c3ee76b6ea83df907283781c79c4e85a58a9e' '2fe8ba257afe65b253a7e2b994ac3094cd8feb258985b0e35ed78d7d323fb907b7c9c42ba58cb1f4fac41e7a3086f64bfdd27df19bff1e564678b52c390881df' '62b8d62d92d3371f33c7182f5d0a7ebef4fa492469156ca0a5a11dc050b0f3f75c7d836f251c1a34a33067e11a2baab5b7fcb386dc0cde7690a7f9aca851329f' '87d3243fc693d1fc70c67a47b5f33bd3ce0526a1ced3adb907947dc8fb12c2e2880f3e240880f7d0c8a894c91e302d652b74f8920c26725415c64555b83768b6' 'cc235e482d03de1ec06f70aaff816afd7211776e3c0e84c284648ecccae25c20530f7dc98198d5ead6f12c8ecf85b895c4b8b23c463822b977ab3bc1619e6286' 'a4e012834f6d616f60cf5c15ff5667a5c5a7ada0a8dd45bce048a5c7ae52ecfd4491cf24bd3bda723f144b67ad55abffb6c7eb0fdd75abaa977ba32704a85891' '5410e5ea859ba542804d8946603f69e5eb5814373d5bdbfe598a4c2067be9a6b21c4065d78b987e6bf41c26466b0a7ab0dec4114916c8ab7b80a268d4b9bb75b' '0b7e832dc82ea5c29d2845035eb0ce3fd3a96e6e9340ffd9460972c6da30325437e932ef19065d15d51e269283f5d486a6e87a44f52ad14a7e83d075687a8646' '37dcdf4dba2691c4fb15108e7bb96c94188754ab0b3ffedaaf1544885097cca51e94e9da27f878c15d48819ea756bba743a64844769f63a8aa51138c8e5169f1' '51359e6e5fd0bb2e96b32a0b14a4e1ea2debbbc9001b147e49bbc6bc9ca7b4caa4605f981b382b53658187252c263865590fabf7cd94274f77bc46abd00544ee' 'b69e50e3bc0031778f2c866bd628998eb2f2303c5cd0a1450e694bab72a253473b5e48377de62ba8fb3d4b2cbd5948b1746e5b0863ff922381a7beb0da3bbbf3' '499eb38edcc37a0c5eb5da0b0bdb157cc70e9e900d880d0206d4836e8b07f0ab2cd917604d5e45338df0143c612b23a1263c51fdde3310fe99b785f1ae62940c' '7f5f94fffcf8fdb69cab63d28c7dbdac72b08434f441289abb508f9502cddc81f76140ee52ddf0e4be4d6c3bbf432ae2a5380172bf0b7b669810b0026aaf7a65' 'e87b2d140a64441513d5ddfdef2d2cef8064db339ed40b0c16f41800ff55e01f168be982626c3c611c5979d4ed56238e0d7e132b520e9c26d9fd3e51125683bd' 'c032a8e514c66d6139a7b9b6704aced41b6a5f4062fcaf82a0f341db34bde7bdb8225adb7947ae892cf168dbaf93204f3cb61d697f537bc47592f942910a6c03' '7c1ead6ce92b0b36375dae3d214aed7c32376b9ad3c7a2f73b708ff3ca717cc240c1ff53eaf40c5220c834bb56689bf27619e8776f5464d28047ea54c180d481' '26981cd751a02e9a27061d385960e50bd373c059227197c6a23641e71a2a0a9a3d05cda931fc2754b2c8bb265d816ff82bd8ee43546dced921a352b35ee5cef6' '375ffe098455743d79a9d5d2d74f6bdfdb189715ddf35d53be876770ecda4fd06563cdb6341aafd5b735a8eeb06a7cbf1cbdf9034a355f740d433c336c928e91' '42d057032d683da16ae0745d4817e55e78ab119b758778b2ab3711560eb1831899448b9f22af0cbdda3636f60e0a5340855c9abf4eb513d5f36fd339471d2c94' 'fa189bf073a12ba543fdb9159a389724b0301e117e5035163c2c2f577958048760e9e1b665dd17a56c06ca2dddc62704d9708bb579bb32de1ca32b98dbfa6990' '3e1277b754364c024ccf66e70871cb3b7a73e93346bd0b2180e38b513c273893c22f1f56f4778907defed25331c7a75aeb976153278cdbc962fe775b7a5e5159' '219a6667ea1c6a98852fce6d663a831e1ee7b7e0ee5f4c4ccfe8e45e6214188715291da1eddc5709c34cb4e52843bfae5889a32555c67ce2066ab1d728cab249' '4459a226538fc54e02eb0fa57234533f219f3c5148961e77e054e93ebf2bfda6c41c0d4e874de3ca73a7f3f6c253acb94cb89a95b193f42daf40b9f8e3117ca2' '17187d0eb3414ecd98909f9f7fd49de9efbfeeedbf1980d9426d29e19379afde66e2eb9b21a79b45ec6748e43d552c63bebd111192407eb9474d9efd5cc4e5c9' '8a4dff3c908586d0c3ab13a73ecd085c68bd678fcfd4264ea097c9d6173ade6d4a1514efa2045b9d75263b0dd5b1b313bd85a41b42f45f577c272d5760273af0' '951dc3982dc2f0007dc66ea6f8f53a83c3dd380f84124f28522deab88ad7f558c26b4e54169ee67e0e6a91fd8e3b8f14ed4dcacbda24a811b265a9e5fdc282dc' '43db7766b309ec6a17ac49c6f964464a00058aa3009bc9dac3bd3843bb93e992cc77fc86e1a8372f981d4143ebef6b295709618e27afe89fd054c4f08d68c56c' '04bbed6e46777f5e6518c77f092193b0a5be65eda0ebc7cf7dfedf284d3769c24786b187255a3d0c8f9a7b8ddebf6d996af5cc888031b377008d14dc4933ffa9' 'bcdceaa6d5da6648fd5944d6a7a6cccd98ca4deb90b18b29aa04cd770d7de0c6b74a0e6e30b51d45a568d63fc6532b63f8a9949a89f1b199846f9f7bbbb86ef3' '7ca1ac0dc6e31cb87ac55bfe9af3e1a43316d78cae02bc0d4db16ce7459f5f9f10e2cc406881ae70438d886b717aecfb4a9c2c992beb1507fc3e4cd0ba7ee4f5' '008f18b029f68030665c80573e93ed7bf9a3c802c4aff3ad917f488927788e19f15066c2a7c65b5d4e2f172c65380b0d38860ec1c4ba7e2e8ce16cde2fa7a260' 'd923bac519e54633671d18998ba1345a1d281a8d89ac70b7c0381082f5b9d46a14cff13a443d4546ebce65fd05dfa15c7e2032eb8abff564941213ac0d9817e4' 'b4d8cb9e435c0a91c13751961b06a1165971ba781208b044c9b1a41e6387ad4618cc17d6f64ccc14cc7f584aacf7813e54c5570404cca1938e03a2d17975e679' '98a9c89ce34e896565c5a6a1cb10247b941f60ebe58f0f64c3ec32f7307cd2eff0ced578f0004a0780a16b243192cec18fda6c9b7811bab42db88b0c68ec1ac2' '9b2409c8b0b843fd1e2d9246f8a42b51b1e022ca9ab1901af4d8dfe30537145fa1e2a301fe1dfb381e4cec6ff52336b4a7e7bee07f25064898d37fec30d92329' '404e7ebea18d51b1295e17770eb2540f4c073b807e3112cc61dbbd562be911aa9356655fe71265861c12d7da7b05bbbeea7479eeae4fbaf3a1970daefe44109e' 'af7d9843b01e890527391d2f3273457b39423a51af3644656d859b44d52488f1d17bc89a9aea1e7b585a5fa41708ef6c7ee9746cd2db914afe9bd3f0d2cfcd11' '3f2dc3bddfe66e29585528c78690f378c84e042d2a4602b763e3c0af99f2a164764ebc1c3839c7bfacfcd835d54cfbba11beb76975b509696bb7d5c052cdd135' '1d0a3f0a9bf64d1fbf257a4f67c6a3980cc967dbc00fc7acf263ce6f04f4706a6a9343e6502c33d9de0d6907759820647d7f0787f50784e3004296c1fe83647c' '33b8683a6f6979f6593c6bb1c96a52da3bd4a7d0f15e6c8ddd323d5ca2b63702aaf7fad95ca098a9599d7ab3a24c94c5d087ea4afe89fc21ecbaa6448d76da13' '2f2841db49ce6a1a6abccfa94511deac0192870dd833284d69c09b43a1370d03a87ab065123e4dba5b2f386b92cd1e408cc579839de7406204354468d63ca069' '296591157e4b09788a5db6ccc26610e44e5112463b2e7671d704e927eaa5f8be514ce82367000f6f2cf5f53d4d8e4b55a4a944c386fdf50f505b645b687a6609' '7a4aaf3f1986f02c3f772fc3886ab960f4009dda3e0549f27e215e7a8d2ab7cc73229781a0f38727092a5cb62c0ba05d9fa4edd8a88c05134ba258f6368085f9' 'fdfb78d0c5798ecefa408d226bc18c94b1c62dbe85e80c763ab99da84449708b1c3d1db3ebb9c4f74a39e24a0659b70172226db4172f9cb33a33c68bd29d0963' '0d817b74868a46c1405eabef5df3faec1bb9d37ae3c0e09f01a67b23bc1121f8adc8e901ed18e03d2e67bb159881a7a14e5da2650201327276d7063b60f765fb' 'a95881f6c9cc903818c241aa59a0d4463d0c5df85f19020a466a49ee3496eb59c139fb4b48deac72c77305cccead4289d0752bedf0e8180bf5309b9c556c80fa' '8ea83e013a8197c11bab38fc7cc1521b695c39e0a409d180e4db46986e9f5b526b7dd5d66ece8ae13130516ca41c5bc784ff046c636f4c9458a94d9f63a8fc1c' '7bb5c403c7381dc9cc5084d08129e678543caebcd5c650c06a827c1e032f7f3c7e088a5ce7c24cf121397949d6896aa3740ee7459bd55f860197c8cc9b341fe7' '875898dd3f9a379c51c2353df200a62f99deb42fe0c54940e27d4259e979a026483a799230af10c27c9af4695c3bcabdabeb076408059c42dda2e63a700a599a' 'b666461ee94182101f986159f1a11fa53bdb59d504e594c2486d07659e921d17c71492fd83f468b6fbae7421a0dcb90a977eefe8ed6438371e21cd51a98144fa' '694631fdf0018ee45b601d3788f5a61b258925cdb93700a159b355a8fabf088a196d7d30bb10174ae57f82e57e5f198f8aeae9634f9e844e74aad6455eadeda2' '737107ae7b84825e9979eddccb85b13ec263c38724890e74fc5b95a18f9edb66d65b9be70e0c6c44504c84e18f1d1d2101f4ad7f40cb8bc987552e5da3c52284' 'edad7259529251a99514b86b25993209a7dcebde4c0436be5a1f6a4f330f4c61e7b0e719ff1325d217880d495f5d54a8be2b960ad4d337d76dbe82dee2b61deb' '3154155d6e3a3f2dbe98f27c557452368b13a33a31a41a7e38e55b8ce5e827c3066290cfedc391f7037a715901147c5ce6d699cfbff8a28af0480cc5a94a2587' 'd0824cfe6993a503071a68768670f3514c0de7151d43c0d5e6c3d66842bc817186030fd7816739534718ae4b569e86dca3da6606132805fcee1f536719775627' '4610215cbf9a1e650e76d6edfc2e14e698201c3c0ef51fb48e59bac74fbf6ec8f660bf65ff14d046489819c2b95bd60088bf7d0746ab2195829719fadecf6944' '8f0a47e4d6fbe6cbc9e33610ca2db97df4b750b769de40e6f02536894a97e463cd4f5ec49b0c563bc57fa9ddff75b2835c47950dd1bf85ee3e893b1839899071' '3ccce30ce66af4db0e61f598208983aed718a0f2bfed326bd5c13e4b640d8e27b2cccb90a38ca349fa625ae4c6d1abdf1982408ff1d21e4e48c874820127c3c6' '767b32fc8604f667d2ddf1f0205f636f3dba2fa9482199febb6330b5dd07be0e57b092b67ce5031d21930168d946a45ab1f98f954279448c1a9f92d69541b893' '4bf08f0c26474da4592a21438fad776562763a6207fbd8c4a13ce8c8353f85f5fdcab7878210665547972d27ad27b396678425ec19d623351af6b7b3e0f53a20' 'd682ccb94b7a8cc39668e3f7c09cf62c6e2fd8ed54609f2d8ba96aa79972f250c04012e7ccdce65e6df8375f89bdc8434892513ac1fe4cc2390f632e03dedecf') # vim:set sw=2 et: