# 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.12.2 pkgrel=1 pkgdesc='Standalone mail and news reader from mozilla.org' url='https://www.thunderbird.net/' arch=(x86_64) license=('MPL-2.0' 'GPL-2.0-only' 'LGPL-2.1-only') 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} vendor-prefs.js distribution.ini mozconfig.cfg metainfo.patch org.mozilla.Thunderbird.desktop thunderbird-system-icu-74.patch) # https://bugzilla.mozilla.org/show_bug.cgi?id=1862601 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() { # packed_simd no longer builds with 1.78.0 #rustup toolchain update --profile minimal 1.77.2 #rustup default 1.77.2 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 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" # malloc_usable_size is used in various parts of the codebase CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" ./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 ../org.mozilla.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/org.mozilla.Thunderbird.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=('182f35e8e5ece98d18dfefe106c73bc97fbc619f59772d9b3455b7c8af412021ecc5eae97a12515224e91deb814abb7a6ef7f538c450e9e77fdfd84078678038' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' '9aa4fc2089fa6fa7e7caea4205057fd23636748e97c151b0946a94275f7d425ce333cad20f6c27fa95ac9f2e752496b7483afbcacce0429dad3ed782ad18d6c1' 'b10a5f8c0b8281a3ebefa57b9c0b8a39eb7bf5cf74bdf7751a4e2c223a19f06b901b4a7b3045b224450c9347884d3b74d68a0bbbf828ce5ac6b16acf6a10a3f1' '2043835a58e5b2831907c35fd6f119c7b13bc3a21b15d28aaa57cfca8b14a7631a5f8fedb1d8f69081070b37729f6f58b70b1dc15191b45ef58e5b8e2434bce9' '85f6d9302eb9d209edf7b2b1f0a0526e353f05f186807839f2511588e162f4cd2b7cb7726ab5067cb1c935ed6c278ca7d8b0f98a5c9ae8be7ef361500dbe0e1f' '4f96c192164689c867b1c5c1baded825ddf1d562b6dbdb45d148243691df46b3c94a466cb6f843405abc996e08ccfa46401fce996e70bbe8cb3e761f2ca51366' 'be1665d3974cdcbb7e9f0651e75e1ffe99126fe1c6514815e14e3bc2f46d8dabf27def941ea135a34c32bf6afc554177a354f2592ae0ab3754f5425f7786a280' 'ad22cdea7283c7748489739c4e6e73a41e603dc01f31c1e20a8c912ef24361ea2cf94e7d9fecd03662150d368bccb0ee03eaf22d8c79fefa31fe9c413ec2e1f0' '9d5fe0fce332693fea684428ce7810cd6ae7b37bb5699fa5630644043d086017b2085245f8d86c0ff86eb7f7cbe4baacf6a9b3e9b7c0e3ab42402840b5d46397' '6d8598bf6a2ba094a028e2dc811b851609f2701a134643cf2ba50435d30a88ac344ce877c2ed8a61497a6b7ff9b2befcc4ed8eb47773f4e1fd2facffd2af9958' 'e5b426723d10e349e76bb00c4b6e361107fe0d6304f5e2dfc472212143ebbca8f75f3f66a99425709e7a505f2e740e8e2f129b53fd74ef2d2f5ab1855c96d2e3' '165a6787695f4253e9c4b43d7a7d8c9653cc60597c4f4cc2c5baaec7768a786effbd6efe5d584fb37c2bab89649b8437fa92990cd446f16dcd8ee9d09505c8a3' 'b7985d9b466313a475d190af333a478aa710e68c33bdbb77bf2cd95b514012b3126cc91734a197df2125071b8479849f888f1d0d1d37411fcbd69caf4126ebd8' 'cdffab52b4b0e87906945b5b3e8b290e979bd3fe0bf8490a7d7e57ec01fce024c682d96ee0a47ba9f5e71700e3e2ad7e07dda27d1c65aa0f00fb0c0bc437203e' 'e709410072578fb4c2ab196f8150e942efac867cc4e272c8701cd5ebd07d26f70794d20ef37e3a4a1e0891dada07e1a5483a2361ea631a8a862598c691656a73' '60fe747a05bc77391f42aafac1f6779d08c74ccb77019ac086b53fd60a98f7232e9c04abc792c367f08d4cf3eeff0e56e91fb5f4289c67971f361bc7a95b6e67' 'fd4c2731d7737c3e42b3c71e4b9efa7af8f147c2f5650d1a36cd5f7730e45f728de9d8c18cd624bada7c0cf18fe6653eefe1fe6472b7919ac8c731b0a27f72d2' 'f83b92a377c2236b0416e5dfa127525e341be2307358e29354572cd82149e926ee26eb3e6a9e88810b9915ecb84945b4eb841794282a59c9b68fec184efc3926' '55bb48c80695395a64029909c8a2ee99122d539dcd0ad988be622e10c76d1cd556506368423d78e428114949ecb2172db448b7cefdc7649d62459e79073a77c6' 'feef15d79d9ff72ffcb22a567b9d9ed42b0953ccaecb435caf006b2ebece7b5804248ce2e9af3667eaf6645201f9f074da38ca1a2032aa68b4c7864eccab4ee2' '24c57d84b574488b899a06d8005311d1aba8369356b120fb2eea8158e1603857691f1cf49d2ab72c3d403bd1f2c10f108e89fed9872c65c0797dbe1d59b5bc95' 'eef04d8d3743f34d37d420da646a9c90fce606627b597f076c68f442ca8424762b2bf2212f797c37e7cca5f18476f59ccecf51c85c464cc8f2c1327d510de1d1' '2893e7d9515fee8eb4e46a42245dd3abecfe8ebdb9d7d3489d1b001da96fbd984c507da95d02a3fe9dce53cf34d5b50826408ddf107ba0ceae4e3bb851aa933b' '9ea35c621c53426649da2a86719599adfce16f87e31ab2b16f311ea3fe43a5592799cac9a50018b7de5026a597ffd7fe2caa1baa601561e39d88f1f2a391046a' 'cd560f831586d2db6fe01c8705629ee332a4ebc5cf5142317be82ae45986dbf7c76828d3edca744ff862a99b3c7544c766a9146940644e0e922c6130d98a23da' '5d984349b33b47712cb89a94b49559f595569f6c714eebb397de7da55986adc541b1d16d081d6745edd24ad7dc17f0e727c376ef1802317495853d47447dc5e8' '08c65f5b8376ef2bdfdd06068dc13070b7fed843602701ceaaab0f274308f4bc53248ae602fc2cdbe4203c574f03982c75202ffaa8fc2197a4beb0928ecc3769' '3a49228754cfe16654b860cc38538ed724c85b1d54c3bafab649bad6db2d84785f69e5a50217b9967d660b2536833c249aeaa9a3e483ee5fb302b41b655c654d' 'fb1d60e97fbf7de0a7d2e72b53cde8f0e23fcc35b42f450d293bf56a4cb42fffa592c38ebc729977aa824c61fa0a73307bcfae8fa86c484f760173b2de578cba' '0cc47e330a92b0896ba51dbe8e6f482e47559caff3330a669539af876dafc2ef0f94ce366b0e95a82297a8e30b3bdb2eafd588dcef07c4a987e162b6b8af6835' '265e2dc3388fd5b1f2cabb58bd28debbca813be75ccca68220fa2cdcff20c27b0a5a5a34bd839a90d67abdc25118f4c97876f043cc4dac58e91ed40821a69810' '200032bffb1ec8987470999dbb443062142897df8c82b996f4443a537681503753637c7f9e05d836aba2a823e03e9c668199388bcd89d110068cf10d58bf19a1' '174cbce1ded34d3b4a386f6ff525c91a6936ce63fe7adbeb614cbc444fcb0de53094acc443122e292df271ad7d46f4342a65e9ebc4546a85ee8ce70afffd7d5a' 'f11186de66b680052139771e0cf95d0d1cdd451ef53bd5f65e85a3cdfb9ea910c97eeaa62b57bfb1fe1d3e3f98e77716b7aa0895575341eeb20ad033220fc35a' '72f702e6b5cd994ea2e826f7ddc316ba957194bea745d2fbd024d180d9abb1b649b64d2af56c04a48178f9db601454f8a8c46850f42b2132643520bc4e7aac54' '7466766babc9b53d2ab76badc095039a3f56b7117f7506faea873f76f9850dfc15bea305a2df20bcafeba3460d9438b864a4980c5ed247830cf2cfd0917214e7' 'cad037a7e410055bca07bd1e61e855e646d87ed65caf8b326b777a5ec3b51ac8df517637230928684be098f34aa8b96ca5a2660198c1b46aa71c979a1843223c' '84111c576b73fc6021397a8248ef53d4af5f00d6a824b2430c78313a5751bc02e0e294f5a2b492626bbad7753bb0411107b6ce4a89ea17684cac8af399cd6f68' '4ee2c81f956199f9e8e05f7d6d02f042ffca1743d1d855fe06fef50d64d66e5ac2129d0b2d5e557d0d5cca52cceeff9fe166a1a3c248333b5bdf9aa1e0cda37e' '4faf03d415f74a1a748c08f55f064609b2ca686ca06d22c195c7caff9cc46511ef6fa5667b6d12ac45d48bd22d586576ef093b3de5ff263e3e443b129a992d35' 'bd1bdf2feb110275da03aff0abbc2097e69866f501d4193c6dea138505df04975a129b2d3d3bd59823ac98a978220b3a5e02451e0e8e3d36b85339dd4b64228a' 'efc276639f252840f50818be90cad8e0f7ff8e6a24f9632bb23368180db7d95773b65083515000b2a8783c5b9b4e7fb93e00f647f3c5cbfa74b271a0f403a281' '1227d0a6cea83bc1bfd70377d0cca7d62186e5d72638ee823cad939a07b7cdbf3d4019846cf12c305420b1e069bbe4d57393553e03c132f0f6a70979867f7bfa' 'b23d34e8285f7dda2d9a045f56734bf0a8cdec8913be2308d78c545068f373e280a7654032713d999241d244e7ab634ea4ce41a6d53b47f1f751fd6a6b8904db' '86b1cf18b2b0b4363782aca012046657046f8c685871e237f469e47722d7e712caba2de397b3f09ea6d107efde0bb7af9b6781b092ba840e73eb569b2d5f6198' '7637c0ec69cfd25f6c925e41fced6269afddf80174b7b4b762540616cf02f1e6fdc2735ad463b48f64cd3cbae86c25575c52a302c9fec210c151c03f84ffb2b8' 'df8c7aa8a8385056858db94792ad89306816b8de18dcfe20e37facb3274a00dccd5171be6953eac400216eadc23fe347b9eb112fa2cd1f861bcebfc73aa727d6' '26f550574e1990d8bccdf383a4a42fb591e02b8cbc327e9cc002264cbab9ec9ec919a6a05820b686d85a5a49d2167516facd0277fdab6830306dab18c147cfc3' '0d9530955656abd55bacbb02f0e56ed88ae699f08f38c170aa6f615796584bed2701371d486bc1fe66fe85a8d9b1c9d3576337cf367b7f8175bd054fa2109ea3' '1e9c12e284fbf3666c834b7049c57910787b289ed92d4e6d2ec4246bc53c79ccc2c5e8d6fb723e8b6085dbe8fa813ebbe134eb9a2b24e43758d4785cc3f16cbc' 'b850d5f373a218bff7a9829d70a19961cd36bdc629a43933898297912cfbaf0987fe75dd0e13d869bfe88e08761e530b758f56f9d675371227233478b3199140' '825c988ddb1818a1b3f0683d14533691aab4993954471320d10097bccc337000c9b7336f8a59bd0a97ac340d88fae63919fe6e9723c337cd90c0c0f4549c9d25' '73fce4c10cfb99a819fe3bae51adbd069a6a8ac9949965a175ebc198500d9cac179f47e10112ada3866a68f56c461ba0d922ec0c9fe950e52b9f66ec4a20e5e8' '036f901c8d04357795e374a76ebcc38900a42857505adee3566ce613307cccc40ef217ec2e0ea1a63a778fd87f3c0c5182d489997c8284e3b1adf701ce48f5ea' 'c98e7b05aaed323213ebbdf7401e0c8fd48bdd299265d41cdb8eec05ecfc39675ba0b8b7ca28ea88c2b2b0b289accf63e98e2fb91f24906b1abe059df50dde6d' '4bd9514ccaf7e174f0ec50d3b8c31bef0f9c01ab488f8edd886d26776f5a0764f205a77a128d3eeac5260d76c573a3dd7f945396749e5f2fa0339dd5ff76fe65' '1765e754bc807727292e191a03f37e20413c165d4a5a45957960bc97ea7b3cf91976aabdd840aa6f07c638f27f919d512d5db99b5a83798e994925b7aad656d3' 'dc0fd4683c4f1eaf5f19dca295fd675c15f776a8ad0a669c932d52b6d978e3ec45e8187c2f7ae66fa6905fe6d35f4a492fd1ff093cf6080d473b216d3218201c' '89e182502e8627bcc5ab63ecf0157237dbddc888d257a1df67d2de2b350ac7ac475cbea8e57b004685febfbadcad1463645c34be0576c1255dfc25445ede7c54' '7b7837f3afcf82a7beffd1603c000166d99d7d7a081af7a0aaf9c9d5b3a77345ba0f0f91b2c829f1d2a6a00c4eb92d02ac875c59661ce90a9d2afab39b101a3d' '206aef3969363b51bb924a18f9c0ff965c9be29a748837e2f57a3e2657a146e6b4311afb0066439b52c485623a422d4df7a86e32887a5b3018f460f37ec65ada' '9727f8dfe69a4eea306b928ac45edd778521550a53ae2844645390cff58eaeb79582321c5fca0dc0943276a85f0a4f74d1cde9edca4eda68cd223d844f0e0183' '2134ef278fab4904b121496022d3f930aee083b41f2d57ae0bdcaad640bc8573bbc6204e2c010e061eb054b82d3991711a53dfa1a694282d520586eb5af50c86' '9b8a947ddd6038c1d13d2d909de8e0c5b0a4c9f8fe48fe2f20f04c714811cc124e90b0cd77e9d9deb5e67f864063fca2c671a463b012385c03c9708ac4a79b0c') # vim:set sw=2 et: