# 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.7.0 pkgrel=2 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 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() { 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" # 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=('de9edb81cf5da494101bf927a5b963ccdec0cc9bff87ebd72d896c6e25102c1113b326f67302a81abd237048aa1e6150c4a97fe4b1892bc80030cbab9099e2d8' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' '74176f279b90e65115244334f20f7a387d8087706d9dd20c550cdf2be9b87485c53a2baab7383a7623c2a46c951270fea5ad7bec0d0725985ead3c70a7eb47dc' 'a944a0e4b9eb14a2eb1b85987e801fb553707c33d4dcfd97a2c9306563c78a003070bfb9f00c09f4e972a7682a4dfbefd8f6b3fc580b8c0aee06bbf337e6e806' 'ddd37a559414c29c14919491aca2483a5fdf5f2e0ed6ab7e7392ce2d3d23c9367bdff75b822727fe791e7db5b6d9b4facb457bf7d9407990f1641b92c09decfa' 'c2f86f1b8d0a71912f21491eb6b335c6bf37d79893fc6625ea1cdd3362be5279fdf1049e9068f306b0ef3eebc1b07c6ef2a0c378f1b61c2cb7d0f7c33884b65b' 'e65c5a0201c1e7b3e4d62a4a7631886899340d97c8572a21f72fb6b3f5d1b62ac77c3e06bb2c142f9ba7d63211ebfac37a6104d45185fedc8b2526d4a66758db' '9948d6f6b47ef3a517095a60f3372f0fb50f4d755570e3b21000c6932e17d8328fb34bbfe9b6ecf3f49cba37b62c73f53bba18171c964d3a7b8e338baca2f784' '4cfae9a87d84e6db73d9edbe11410d4826d94241cf05d00f13f4737b22eab66802ab60f2cef447c2f3b2221fe97ec83407e0dcdd58b7557b041d43fb808e91f9' '3a7bf16df1707c5a9e22fc2740d88224de390fdae231b72baba64fd7a37d8c86626a05c2be4e1b0659963642e8ea4a29b7407ad747bfd1bc7e7d3e7ae9371dd6' '67a24047c06fee73d94c6ae51a0ca11b2163fcc74992796559d9a22db751221ab65200363cf26aa50ea2eba8dc441da11fa3ba2598123de1966721a6d7e641b3' 'd1d276dd492acb5221f509e500f493e744d2e478860bede1e3e51abec622f622716c1d6116b536ecb49326ebb3a59b0a0a357cd7e526907d4414347a3415deb9' '1319df86b0b4074f32642f3cc6c451ea71ec48077337908bfbf88d5bcea8ecca19fc09e8a7f3a5caa87f0dba52073674f03a49aa7a82722553cd0f2ae6694ff3' 'b2221599f84211b6064f2f2d180f3a731adf86aab4ed61f9d76c29386b987da20e908192720236e6a2e5eea0f71c312b9625ab5df9a0fedc4e24b7fd9fb5c044' '158b7d93f61d338ea862bd0c38cb0716d8c94312c733fdf409da2940de1b4f3daa5004ca9f588cceb894917d3c8c58e428898a32f6c80acf289f1cb876649729' '54fb2eb1453847d215dba8b9b7729aa631f7c725c9fe30c481eeadffb5f1ef1151b1d892bffd2d024a1d666675fa2d4980115bebec3df6d6e36de38fdafc5d10' '68d3ae9f1ea773b492054fd4ff2cd13976e48650277b4a58ee201c7713f6023ea21c6a53e5fbe71c4eafb73e8a9ed6ade55d79ba5e83b942c332c7b4af2ace27' '31a722abcf6373d924bee8ad73a8f37430c54f3f5995453d7586cef6a5357abea43e59985ce0ebf082a167881599a27099074f2e413e18039cf812ed31baba5e' '93fa2aa16ab20712158dd0fbf5cafc529c4c69c7e4c3f0d32af88c858c7c77434d88881aebc31d8c89986986b68744d3d6887e270bd3faee9b8a6bf182b5fa22' '82307d03803dc48135cb24abfefe6cc55423893a885553c0923782710ff0abf7dc5e73e06b075d69c2ae64fc110ec39c8115c106856f45de92dcc03043335927' '4d7419406e4e01bab2401c0ffdb1fb358c954a5363d11b9ba8e6e4e440d0200d43c4a626e5d1c0ea5e66ab0417df5f32e47af86882839e0594e7b81cadc85dc1' 'bf66b29a4dcf835122b04b48f2c68d2d8c70a7520116d1309665678f159520b6890b628033a0f0d8c128afd6bdd24c326e99a8e124669a14f5f02d2658160b4e' '784336da59fdaa6d5da6210e38a13783d5280f98e71f11e7fc7d73bc4efa38fe1c128e585fba61300b46f1b290c35ef648109234cb6a9069adb2eea95439e835' 'a806bb956c159c4dff7859c520b4507cb9ab59ff8cc48d159c659293e0ae0f1af756bdba37c511a12ebc70bdc0534e80bb829b9420487abfaa25a17291370d72' '2c33acad24472bb874e1cf71d8c8bea12c6fa3ec5a408b1ddd65bbec5791e45245fa44b4d067ff94e39879b8aab4b173b8a22c888ace510677bec631842b3f0f' 'cbce5796c58033031cfea2f21bf34c4e160f49688013c8e408d621fafabd8b91d6562b8d092754a71bd01cccfd87ebec586e5dfde63667e7ec5a0ffd064c7f6f' 'f91513dddca3d3638c4a6f35ac257634d797b00a27fd7268e17428613d5060f9a968fecab7bfc374eca450f6c53aecef66e5d14b464adbbdeaf483ecac26e12d' '80d6d3851feb7b5b6d2b597cab26120950aa555ec0cb4adcafab19801b0b7b302d5345bb428255882af3568d8add97de4fceff28be897d0aba40a720e46fdf9f' '0f9f539bcf7da91fd134c2fb2afe96c85c43a53df0a319d5a93b3faff9529b789386ee0845734c799305e94ec0e65d6393badd31fdcc85f451a368a4fa8e7a00' '2aaafb44b855de612dd836f12cb96c65a920edf77b8eb083c53c06d79133459fec982f600dbd09e25199a8af2ff18f7c3ba71ef6057c8aad10b615e40dbee465' 'b65bda62fcac21b9056ce852816e649f10bc51129319b73fcf86fbeb3f72684d256e6099f9d7b29f1aa2025df3669fc39e931a168d8e7bcf946442b111b5d176' '2b17df2183243f8fa2501232253a202752271727eafb45b164238ac2afaf6612717a2b9ea888cf10dcd225a88d6e7b784ff6a1d5f256c39cc0e6c89c74f7c3df' 'c9ac3af5c71aad8cfea279572ab9ce4dd3465f34e9691c80e48c1e64400e76034a3d946fb428f08cb7a93ed118a25f345a6cf767701dcf78a41c2eaf3a9fe8cf' '9e7c1877f2eac0efc17cc33706e26ee6ff3799f6f7110c8d96a5c78ca17dc8be2c31087dc3b2d8bd6e08b863c75e46c2b8b72f86afed54263933308fb7893a9b' '072d2ef1527a1cc19e5cdb237f00c284cb814742a56f02e4d49a6f6cc0d04072ccd17d9be44505ac6f274eb5fe309e5a67fb67653f2c5d8e540581c6dbc5062d' '1f37cbd03bca3eb757887d41cdf24417d13a2dfcff792e597bfc2f5e8e41376acd219623f168af61423497d2789ed5c3cc4023fd6047f1bb9593aa88bc92ad90' 'b36dde03b9316c227f2f9be1cb5e4380e97dee2db1c4f571dac99d43ebe1f57d9c8d9cf4837ac8df56c3fa5a3ccd6eeebb73e4b50e2d312ae217eaaa598a70d4' '9f542dfcfea580bc7a626b40c8d2cfd32fbe38602ae4ccc447c3ef422a3955bd61892b8fbfcd0ad6be321cb8a61b582f1722d630611603223254f82c24260c4d' '81f9ce780c8b3b5cef7845190d89d7077fd1a9ae100e1ca2ea99148fa8f13da7ff84b9e065dca77265a706c7b6d38ed079bb30e7f5f842ef622b574662445165' 'a9898421df010ca2a2b56feea11054fc62a150a2560509410869892679b74a05ccfe6657b7a28c4f766529b9f8823bf13d73e20e2ade55a832e2f1ed67f28834' 'eaeddaf1e6ec41625a7c71e89849ed2febf9b42b8dcd7d66b766876394e08a4fe8dd65e9d8a1d8cc685a6723e5ab7deb5cc48fd927c8edf8e12dd38baeed2f0c' '18e349910233ca49750014ec6c8b0e4ba98297035922288a9bcf8489f10c113d3e8fa1f38991c9d3f52dfff5963818f57664081c6e50f6a1d006c1a69d7ddde2' 'ca15741fcaa2a66ed8029d7f912ed1eff94438da376ab1a42883632c841094e3575e9324291d06f32e512be66ec9b0c2b5b677e80c5e0c5583b72e41ed49b07c' 'ebc0c8013a11b663141360bbd495113c610dc79e6c9125fafb142591f1ca034734024d3fcad01ce0c55010985ef0e6b710f26db646d3245e92e42d4efe35957b' 'c602ddb199e5769eb7416680d15997e1e328151f7de2c67228a8bfa2cc8e72a97a08dfaff0829206c9d67a127343d2fcb253256ed240befeb83962bd7661baab' 'c3f48e08766c9a7db93f4ef43a21de621a3359b04b544f10e8fb2162bfc356e5fcd8a0c1b94562f39152ae6b8aca5f0fce62f74a827aa9e1cceb0e8ac1662e44' '8bede3c3d05f883cf071a1d17a981a45375d421b6c124782e0a0be69ce8d1bee5eb083402e8c039595b82677c5bd9efc5e596a74bcf7f449c17acf6e8291663f' '0a6f246cd3574c77a9ab8ae9e4ced3e6c2addab3c3cbd454d593dee7a16fe1baadbc47e4189633f7d2852ad45a8c8141ff0dbf1385cdaeb9afe8d28a2e4dab1c' '3625835b0058375e74ffbc3e38614d3d13c444c63b1dde616ff91e55a6c296ca753fbca29df36afe3aff277d897af5ef06840964dcc4d5fcef5808153a2d6dd3' 'd2491af643b1ecb44c8e9506292a2705559661ddc4d8b294bff2bca9bd1eaab57cf8cddc30cac2cf634ac988b9c0a6497afaf1a0bddabdb085482b643a73f02c' 'a490a94f60b9058a487a9761027936fb0054254992f4e493ec91ab9c26447774a22f31b348d9ca72064f1b02464685776529412a70ba66e201deb704a4b93584' '19ea26e6102ba4715b9593e58689e009e6c97623c89b30b70d84e2ada9bcf6dbca7e157a2ba6e9374a1d31767d6ec031efb1b9e14e20c68dad8df0d333d25f21' 'a20077e7c4ee32f19e9c802a63add4ca66fac30650956c6f73c83d31d6bb82de4ceafec94abed92ed6c5af41526aa36bf5fbbfb18b628454e6a74390d674f51c' 'fe353fd769873eb7a6aeec5e274efb156afb1fb259104dd0fa56bc75ceb808519db462895b9f92f5f4a9ca3560577bce687c73d857fac3d43413dd0b31abe955' '2972888a92acbcc492c52f19cf40bac6646b967cab4282fbd89530172f92433fc7ece56ce0c95aea8add93deb1a833b0a69226109a327ecec87adde338db5046' '42fd94b2ab1d979eed2695ff6b58b7635148b5e324e973c0f8d3d286033726e04ead8390d1a43e2324849d276b6fa7c32e145efe562ad3c7b84a774006a030be' '8e79b9c7042467df63e2ea0933ea71f2f840fcb67a188254923dd71709ec0ee8a8d2087fc18329f35bf53becb1d20f9c9080779f983158781576984f669719d0' 'b76a6e5b5a8c06f9211582a727298d3acaa743f2cfa78d4cf60f616408a6ef76789309fcd715e83d32e685ff140ab9adb69363428a8d2495cfdf08e983585ea9' '9defc0a09b2e46f3ce449c3219f0937d17acdcb69bff0685bb11a4dbdd73e1e2cf0dfc8e6b80e701851c70a6255a4ce488d39b005c7e009282f7903e04bd4a83' '8f16c74569dc75b5c3714ca6eb42009d11d93bc970f89d63213767ae26370fb41b32c86b0c076088816ac8ee43327f57c7544d9c47399747a9882e006f1c3138' 'e0280671276a0b2c012574b3f17dd0e2fcd716e02b69d60a1f586dda7c088f201d4d50a41ecc684a8fa2bd24001635da5f8ddbb3efdfddfd38dea5f797acf20c' 'e4274df3935a763a76ecb8829592a9646a8626ec046f01d83301734bc69b643b4e5035e061e9a4c0b1f1af86de4d6e5681cad8122f1440ae6c114037074d7585' '2933d27c07fa07134fce34785f160f9732eecf842f941a7e3d512f5a03751c70eac1be6ca3bc9c50ac5e7b056c787f16c10c572448f23680dec3cd0651191564' 'f4288c6b5429b71e8bf6e6aae3c096911302c9ab3554314eaaac776fc8779cc032d3e3523c60bf2f845c48f1b87468a8700ab92ee2c3bf663b23adf427a81d67' '0000b9141ee84900a2a299e7adbbb7df576fd20981f488d8595ca7e8a042132ae15221db66beac710159da07a9feb82c304529a4b9ec40a1f3bc2d0fd4130192') # vim:set sw=2 et: