# 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.4.3 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} 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 # .desktop file generated from jinja2 when build flatpak # https://bugs.archlinux.org/task/79590 & https://bugzilla.mozilla.org/show_bug.cgi?id=1852091 sed -i '/StartupNotify=true/a StartupWMClass=thunderbird' comm/taskcluster/docker/tb-flatpak/org.mozilla.Thunderbird.desktop 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 comm/taskcluster/docker/tb-flatpak/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=('be72f3739a2c3b947031143e1e150cf42131170e7886d29688d4f1e4adc82443f1565f8ea1e95a02448773366c1df6cb198d0f890dfdd7fd7161981b45fbc509' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '3c4ee8d994651f9be40aea8865165963dab6452f2b256842b9b7f0269d5e6ce7fb288d0084605ec25c4da857fa70d053d4b7e628145f72c5a59e885cf0de0859' '0f5ee9812ed28488c6bd7691845def142b694f7f9ced7825bc695d6776ccf6ff6b5b17f3a61a1788c08ba0349b2aa7127102cd821f35c1793005fac53554a106' '360a85ad2a398cf6ed2bba2e0d0e94d2cdc9833f8712ecbcecb347749cf729dad464d3192886ca3d693150c51e19575b688cfb24e040a0551e6f39dec58b78cd' 'a0e542466476250f94f42117dce7cfc1a4480a4228c96edc78d3e76456c37333a5028749b2cbe0104316759d320339efdda2f236688587989723af4b3716aab4' 'b66f5161364f008710881413ea09abe8648035f310ce698b1919bc51be7dc17074a1a83471f97de3ac5e5c775ecb626a9984d5d080054d3f726b63c87a889301' '75ca943b11ed952e48da3cf1b40629aa1f974eb62fc57c54f4eafa114d7d33cd8fe1a37517c3d7cb4cf2d0ece1c829dca4c01ad980078ab169bbd84b1d5436be' '5d0e6c9e2a0534e9de20d829c79f85cd0f40d043e887a5035a75046bbb05c564440a458a0b06166bf844e3a9d3f77cb41344312c4066930b74e094f5311f4a2b' 'eef947c3090e4c1b735ddbce6d3756cfe47f4837d2fadaf9944894e97d414dfbf09b4933c927d95f4e1c036a2ae16ca0d75fb04bc3e6f3cf9ba5c8f4c7261b18' 'e930a5db030f8a442bde7cca4d56e006305d4ef256109d677a94f19fdf1a7a4489a082a68f70eb52a9dc1ca4ab19e6e090d17eb864881cbcf1c9422fb3806c24' '210c95a7aa1ae64baa4b65988f8e76448956934c51e5c1e4822021d636408c717e069fe588e1d4d255cf342aff02e58169069f2ec3ade557faf169a6bbd593e2' 'de1c975ed08a52f3996a2d592695f9484225ea8aef1401c13439f4812f8bdcd361d36751489ad054a3db545ec634718858e9d4c792444d2d4c94ee185dfec541' 'b8bc54665c8d6c14c5710491201f92e8f58dc66ca55056ff71c2a3d473147da49e86557e4d6eeaaeda03443056a27af0ef9e235de4108cff37b83bff66bf0644' 'af5b344434881c743cd2112174472964b3c8d7bb6edd8fd7dd17ca9b283489f59efd585a71eae8f21346dbf7967fdb28b491fe0e71a297be4f550cebe9c09241' '07e13c92d61748912c0650d9c75af289bb6a25c8c6eb454b5015cc7d1459230ee151ba9a4a1762eee2dcdcebc3d51b7c1278d683e642431b09bcff68ac6fcdf5' '62720359273ef221e7fc5997aac0538913419ace478bcb241960e4fc53fcf308407ea70c077f08ce46457a00a72ffe8d9acd868efc2c6346771b52c9b92c14e4' '89914584888e2d737bd1174f2fbeafa4f1302b2244dbe145d663708b5edce88379db7810988ef62130653bbf0b8607b7725d3c50b734922afe428f868a9c87f0' 'ccb8b47483552fe99c4e1fe2448229b42ccf48def717ac41eb87437df73061060eff62f0ec594edc597574524ac79417bb52c59ec53f49bb8b2b490fe1281bf2' '617744b5eba33c0890a4f06ae7f242674282bdcc4bb7a860e9fd055c152fd580783e8b10152cd6739c37826eb4124155975e2bc8584cc7b684db3760720f89e0' 'f59e7f2133e389be7beaa6376051f915110b8a68647b59b4bbf6a31d40a65b9df9ced3a132f08b986835af132a6adfccb1295ecb58910b67b5b777ebf2125272' '2701c868e632d179bc21f865025b1961e702a6b7bbf811d82dd277d6ba486cb82b12f7893043e1aeebf3d8b552b6d3e842663a73f43e3262fdd4149e8c234961' '315abec8928a9fc9960f381f295c345cd1123d2067be91aee06f4ab9d4642e05f6bb733fbcc602cd46aa44034c4409c30e9a0ef0c9a0fcaa0c279230ec81eca6' '01cdf848729ae40ce5c901d19bfed2287b959c22eaa83caf812afc979fd03712eaba8b81d849b5fae299af019612877e015e72e7ea7747992cac2fdd3ebe508e' '69966c8ee1bb11cf1145e5848aeb992d0da0acbe66f39fd59aa57fe11bc0b3ba11b166bfd51a2caa48e1cbddffc1098f0373d4b46102d42e29f83fc20fe8c591' '168355e999ccdc827eca6d366968345d995127b30c6d87ad1328d45a9b0c803a225f30b16e8c15ee5381480fed2730358b8e1a22a837cafc495c28feb0ef3389' '75ffec16dc1ba0e21fc8759bda30bd62aa0c63150d47d11c000c0b1449e1156127ba77cadfa61c7c03ec94c24992b83575ae7851727f64315d88e71cb178a972' 'f582226d8285ac3ca764f12e5d5e43dfddcda0db8891d2465e1d950b7e3493cb807dc178abad1d903a18cf2059b73d1f6aa5b96558394088f765cb64758cb7b5' 'c07741428c440b00ff3c15a64ed7334476f6ddda9da1b47de05b12336d4c75f971309e0e9e5e2d5bbbce6dd0498fe1c91a6eaf1b88cb43c178b86baf392a054f' '8f738feffeb04d28e2290e6693b204fb8e538b28a610da4f0905ec0860d6ab811b5dc6c335da2776b8d55236bea0b94e6bfd0cbb3c79229030443d4fa961968e' '14e1689d80904497e5c1e6fdd9fe493950d23687dc5906e38a0f6f6e6f2523c3e7175940d9b31c427945b56fb945979e9a51a5812fcc1b52cdb36a5b0ce86c6c' 'b90122f3d6da1e6aeb39724240c0723dfe8f2c79fb472dcf455615fb20e9ff24d592750d8be3ddf95e99017473bff1f3ab6ff7a8776a70ee0752251990e60e28' '34253fe0f49ea3bde8c919c358a82f715b6711df4ee21d58a3f264d9afa255f720907933f4a733c7605237fdb191bd2a11aaabbe0d3c9cc9e65fb2dd88955a95' '72993c730b8163795c730e3c5c2d0aff1617e8b58ef0896accb93ac23cea8acea6d324ec6e749157f770c937ebf62d98d8fda69709a56442a7125a9b414190ff' 'cd80396662290608232ad195936b6ffe8927e015fdbfcd7079d7dbbf9e1f950c85b1404aad931f3a81d76d57345f8a7008736a935f60d8b079f988870a8e39b4' '5871e76b8384f1262fef76da667702f3f0b0992b92ef2794bc19ef58db394feecceabb80b74b0bd5a7f7192dc2c572dfacac83dda40af261d1ed8933cfa25fa5' '4236940b8334e8b611865f796c16533d0ff3a7e65aee243b50410957ea4452e50e7749b2193484adce3d871b81f85b3bf21f5434eee62ad4fe24f1ce58539677' '4ffbe154ba9d389b3242e4aec9328a2bdcc5ac29199bd9d398ac64dab50675e9269ad3e412ad2d03e1a1d0d4c50b7366c5239f5944cfdc52fc0f25c6596c3281' 'f3ddbc35cd0abdc36444ebd29ae7606c884d6690df4367eb0fa49047a040ed44b97d6a0e9c9abd1201322e8e361de4a49f5b2e82ea06b2e73b00871a290331a7' 'c295f5481053ed1ae1cabd4dd067d1193ac7e5cde22b89955fff3ca2147ea9a1dc29259aec1902df8b7407a08ccd820c540e7aeb7a4c8c753498f53bb03809b3' '70446a7274165cbd59e8d253056a45494692795d6ffcfb88cb2be913450aa8997cce01f03ff17aaf67bc0ea5708331f318bb38fedb89ebc8c6a6cabefcaad516' 'c122db86853a5c4af1f2522dd29e009d08ee7479f9825bfde91fec6932559850f43118894c9a5fb275640ab19acd21c74d2e309d6e1b01a8fc80ab0475635a23' '14878637ed2437ae53e39228f93225da0275de748c05cf70d22e76d7fa9971cf2e6765b8c2dc61247f5b9c90718db61984027e8b4c08cb64e0ac4098f87dc763' 'ccfd52b17520a1a39b46a29d7025c52312925670dbc95c2d8229337e2923146f6662772dcfd34afce0c964b3edbd85a21e37e5c91ed45205d2b2cba1dc1d1595' '4a7fbd40863036deb174a86a6e5be1acb65e52abf71cc15f84dcba14bf4cf7c63426d7ee444a740ac85c934d6adb4ee948dca28b445eed9f2cda470bb886c687' '3fe08fad6592c5816fda3af705088172d92ab75dedda92aa7e69438c21d11279b271c5152a18cfd4f87c92c3e9f2be186abc13bbe9def183e17e147f4107546f' 'a1c7b6d07e7b9f2d7e526c900148161847a6ca77ebd9810e0b11126c8ee7f47b1e50ca178008975b781488b5d8fe53133212279ec2f767cccd707f0a2d2e5747' '31155d1a11977a92e063cf638f1b8a24e93734ce083253ff774fc20ba0f24f2d1a0b22c99c63c3c268c323e4cbdbfe4ed7aa04a036f70a2987a4588490836adc' 'd0814d66717127a61103a815bb143ef256a8b4a2893aba25625675e9ae1ea989f0a3c4c9f2d8453c5057da9d03d7988b935b3696e6aef7e7d74d0171606136de' 'c8d0afd9d885f78f139052c9c25e1375de5d5823a5e9491c0914c6dab61a4399b4086f5160cc1baeb05fc67072dcdc29bf4b6a48b86e9ee47212aa705ae1caf9' '568488fad26d3d4ea2488c155336ae78375a0b370a2783f3c08e406cce09d6384e5a274ac4205480af0f520087796fe60e1ccb028d3c7daa02e578510fcccdd6' '1a2205911f7b601d1ee9668ded140ea7867aa2b462e55875186a6d94aed11388bf1bd5b337c3c703ebc683988ac750624198a7317e7271ff60f80d34a557c051' '4dc3f628027bebae9d14b76a84e896469c761d34f2a160de02b9c82768757d2e0e989fa060721196972ae010206a0ebd9a668ce6bb31d9a85c688e49dce1fed4' '52db63972b2ee03f4311caa51e09cbd2f1b0ca2bc72e164bf4ad1a8f04028837af7e38a2ab43dc55eabe1a927f9ac84073f8749ed1372e34dc62bd6ca9d2549b' 'f2ec1eecf83086136da8c325ef956d5f9d77a7a4781c858f292e275bc69fbabfa2988bb5758d839dd0a51f3140dacad358288a71f870179ea1567556d14ed872' '707ea122b023cf9be2d8eca567189c074bd593996ba9cb965d31093689d59446ede43cdc5002fe1f832cb2f836d6c999626097491f26791e954d5ad0bc223667' 'ff2c1a96fcdd7a3d302bd6c6117bcc89f1e2ec9c28698d7041f774de70db43debf2c9a2c1d36a54a22ed6c82cf14cd7646731df2cc50af2726e3654fbc309f31' '207722300bf9f9a6ed3437ebb5062e209905f96aca96bece10d008482a157ee6840ada0cd400b082e476f732e30b640b12f0acc4295e6f4bd6c2b90f6596807c' 'fb95ccc8ba3e9f3224061ffc121a10bd90a4aa2637a795e2b51fe40be5f98d656c6cb291a86ec655b7e94a26c5a0111464c7b2e03772c6376a2ad2ed96c476e4' 'eb23d5fcbca0263e4bdbfb13cbc537a0169714d1a1c21aa29ca8cb17c624972ed3eaa05a0b849b3da84ec68daa45555209a4669f5c91d045c4113196c010f254' '8a4eb77717f6465cea9c614c670b4c01dfa87d992939c3b9fff6419792f11e704d57b1009ea634916f3663ee62055521ba86b3abf8b392c5c5da383d36cfdfcf' 'f6c93eb16a0f0614f948d017f80c58d9cec80ae2e50331a764d54e881a08e2f4e744265da2efffe659cf159d2afa41f61151359648f3c6bf4788da1644b9cbb0' '1c285bd1e4affb7fd8d84047df5d6a03cf0fb4664b7d3ad8b74be7c9b9f07f14837faeab2fbc5b941eda11af26d5aeb5fba52419783d85afaf68af750c1151b3' '244426aaa18953b92e1d4d40c4db0334deca4a45048f14db7fc71be3093890de4acf64d105a82967947910ca8240d036f852e66df69e10eac4ef21d3c4658141' 'f6813ac6267bfe93b7bac36610d2c1de0ef6e37056386461ba129b847949d5d8f26282db10f247eb88079a7d0c63fe04d5073f0a91e6847ac03d3d4a05cfea68') # vim:set sw=2 et: