# 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=128.4.3 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-lts-iron lld gawk perl findutils libotr ) options=(!emptydirs !makeflags !lto) source=(https://archive.mozilla.org/pub/thunderbird/releases/${pkgver}esr/source/thunderbird-${pkgver}esr.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 echo "Applying patch $src..." patch -Np1 < "../$src" done sed -e 's|73114a5c28472e77082ad259113ffafb418ed602c1741f26da3e10278b0bf93e|a88d6cc10ec1322b53a8f4c782b5133135ace0fdfcf03d1624b768788e17be0f|' \ -i third_party/rust/mp4parse/.cargo-checksum.json sed -e 's|880c982df0843cbdff38b9f9c3829a2d863a224e4de2260c41c3ac69e9148ad4|239b3e4d20498f69ed5f94481ed932340bd58cb485b26c35b09517f249d20d11|' \ -i third_party/rust/bindgen/.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}" CFLAGS="${CFLAGS/-fexceptions/}" CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" CXXFLAGS="${CXXFLAGS/-fexceptions/}" ./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}esr/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=('18691722f6376f3dc0658c01164fcdbf6008fc31eff8c1bd403d34f188db0e7850883315a96fc07289d207c9977d732628d3945736aa191fefd0a01735e3037d' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' '8c8a38f5e22c7d8506541f4db5e693b667981b36a408b34c269d72e7cec4fe470cafc079f8fbae12149df1dcda88fe749677b503c6f867369702c7aaa4717b12' '7bfac09de2c2ab3820b75de4bb0b7182845bfa7dd99e2a517329e0fcf3fd32a8ad7963c290d62a4109cb035e05df9fcc1976b905942bd9d85f01925e85c5ebf0' '9d24fe7d53fbedc5303940298e4d6bed4d81d3ef83c015a0dc9b8c575160e7baa2b74d59e94b5131457b63ea580aab551702c6a5bd0fe3d5e471af4a88575592' 'a365bc8a76c04bac0ed02a2de2c844ba88122a1da7d1c1c90590dbac89d063e74e7046da7ab34b76f3e8bb7139ca7f6398daa438fdf6499e8a72d07eeb27b5d8' '2133c02fa2d4fa912862227fecb94762dd98aef7ff532167510522cae85afa51df8ddb19e80830270845774423a0ef0253036f242d946ccfb862d366ebbfd887' '9647a6d20ddeed2ba495a1d3f153fd55f00066e03e86dfa95125fce9b164056735a2aaa3af28085d25ae99af72b82f18050508f499749f589306bfe30639c26a' '653d5dc1a30916d4ff9c0377c947b8a4d1b1375ebfc59af41a9662512389dc7978cd3523e8a21ee4d84a699ea16da1aadd405e44b748371a6eca6753ee0b1fcd' '9ddf09b28187ac6d7dc1267e98a5fde988dfbe4c79ddf07e9b6b93aee54f20f427e004a0c99fa29432940b242010af0bc2dadfc43434185ca5fe2c2bbb92136e' '7d6a0d5bc7f589ba65952d43f35d41b837bbe999b5191e80db3d7dbff97a46c17f154ba45b6c88f394af96ae9d6f8e6a45ad046f4c34ebcfac34dd9aca80b927' 'c153922bbb0828711366ec5948de83089d40af39f72c5b5cf70905c691b222015c626a3c936b6260d6faacf4c707d4c3f2bdda77b50ecb3b1788fcd04ad67fb1' '1e6838419c4252665ac9086b1cc671065862877cdf3638ba81ccc87fcabffd4b53b1164f0c54e2ae288fcda76251fd309a1b378eb64d8ede08a2f0278e80c742' '09236e71b6a0b6875076c12f8398b7bc18cb83bae7ffc6ac631329e174195daa44d8990953f4bc992288bcf523eea3f49284403c547505fa5387ac10d2bf615d' 'e6b00909b4e23169145fb81e174393010269e707f9d65442759fa4331a1bff01ba907896b152af756a97d94bb9a0011a1a47b94333e67eee11002605a67fe3c2' '69f7633b471c0afc1550ab8fc31c5efc73587d3c99c070aa70514998bc9be8e617a25e68b340ed33dbffbcbe24dd7a0ca1b0a00c6ddaf1ed25add065faa11ed7' 'bcaa69251088e707bf2d953f66b0a24c1ae3a77aa73da14118c6d496e284684cea6162cfa9334432311f88e39b82f67e247b1f7d0b5be47b55c2785d97a8efe0' '42b3a0c1ffa470ae5310d9558d0fb127341d0ea4fe2a6780c3c8e127cbffc5d1a84d807da7030b4fd554ad095e5cc249926727a447a168f07d65938abf74dac3' '00b8e1e1414fdfc09d690539ec9a6cc2ed00db6e0882a3c5333c025e4a14596152e10d703c7c700b0dc2c093e67d93b6170f4324894590048a0fe9e4fe3f6995' 'ec9eac683685a7be5189fd2424a3ebadf65bf0dddbd4e894f7bd3662c50893da352702528ea612fa47e54790e8aae0eee141c2264670e711b7c6fb20b788a7ec' '746321796321a08eeb9d95d70a40729e876a2671dd59095df100112ba94a6124b60db6361283a783bd35ca85f0fffe805f268b11ea7ba5e59415c4bec03d4a0b' '7a963fa543d3fc5ccc9b2215ef12b78a22b1598a36008bc34a7ac78d10dc5e622d1562c3532840130777547825362e1b635d706e90f31a505a452146a8e111de' 'c733b669daec6a512d83ae136567878b7bac1ad8cfa8cc28b3f3b7e047aaa9c46514a687a4894b98bf371106f92af59f7b914523defd47ad5aae7aa08cfdf637' '7e93c8fd917477173e2aca4a4c30253abb14277e5308ba5806d785d586825891b59b79bf085a3c2f2963414476ab91829299aa745354a7b5b5ba9f35275cc976' 'cee7b9a8a7024128e11c87d66505d2f6f7e8570b0f0717630e58fcadf4e857832c67f81178d6a66e7883577c0b2f7c3725e0df0692ca6e3256b8f7887196277d' 'e4ea3ccc07fd915d68d8f145b810dc3c207fa8db2d615d65b8d4804462be97d7f9c2593d080be10bf41cfc444b8d8fe368e9f2040f504f897053e08405858f25' 'd021e634556c4f11ec21f9a49d0a5a8659b4f073e5fb8ec2eac88bb527302a121897de6e1b75ff8a64ad4765ad53bc0cbc4dee5bf127e7136bce930b1d2fc717' '88699489af3666cc1b83daba8c0be6acaa1a18d38daec5fa7f33a8d23e53456733353a111c7b849455d248cc2ad32df23d594a50ea389dca03294724b263c37b' '3efa827a9c16ccab057bf0f730d4176b003b4f5ae3fbfcbe2f3ef402bd43d7fa6e97bce95462021772eb3601e53b408e01a3bd705a745ccf39bab8126e42b271' '67de5ea7887411b1cc926bd3f12cd296e7185112d23bad9aac4155b85fbda8b5d412070d03c5ef69f874243eab2ea60864bb66cf5bd266877cba128ed749862b' '314721ef6243ac20dd35134774d780c85f44c28b02bba82141b22c52094518358a2dd4cd14cd7a74ef678edb53e465d8715c5f773d22dcf17bd168de89e42298' '423705883f1d445aaae9d1295293863d378e9aa97b4ab0a448f7c8865f8990c30306d63c5e6988c858ac8ad4f3c0c41c0371f97fa9932579be067f178e6e67e9' '6d7c2f3f827314e3b0422a59594d4465462c1db71c3e83b6a1ca6389b2e7b5e9b356c776abd38fe201ac36d0a4d757754899553a9c84ce9d148578af01c21c4f' '60df7c67e2d0d4e5f79067e44027556fa65a81a2439d6269435e161f45f086b04aea3bd8a57ea0f32e09cb45d04becbbb15733943169f4035e0ff5ecd0e72479' 'b8e6e58338040516b1198e939f78689b320536a356cfcf6344f471ce9e45090308502d9dc5aebfe882457e0c10c15a5b277f913dbd03e43276caa7d755fa183e' '5a1b54cca918bb4baf1911a600a91439ec328f10b942739226259ecb75d9e15c141563438b1c9d2e06a983d0e452becd610f17a9a85f737b4af4ff45aa0f3b12' '63464b482c79d1407c92a38e9b206970d5439a0c511c66e741a221be17df96ffe0defa77b084c0bb735d0cc98c4e2d4d40e135031f6d98feaa5b0ef0a640ec6c' '79f3e170d72feacf20b1de5de4363720826a7dd61262f4fd817c9c19d648e886b57b2d04244ef0b5a9fa60df28e9437a033e26cc8efe0f479e49c2839c82549f' '56f066a7f0e24a0e6344cbd7d3f36e9032a0eb72117702789201e5191048787ff2bce9b3d2bfdc049686f1a6ff6157f07b5b4c3bdbc41d7920315201c482db1a' '956e0d596ed241e63e65a99bba20b3ee766ade14ebb8e42610ac9844aeb976774ca34f08edd271abe5ecbbbd9d9ff02bdbfb5fd50e36907cc988004580144540' '415e273335d3e36d86651ea5d38e79758b11f4398adf94bca14d16abf28f895e2c6e1734ed52a0bf249ec79a5bf005ed06c0928880377e53a64e4735c65eb7f7' '5690b70aa6ef7ececeae055e83ff9c66892dd6f4d59db0f26141d9b6db8ca1eb4b04a192e740dd6bd781b809e3af823538e45151164ba980404f7123293e0955' '3eb61fa34281290d39399a4e272bc891f1ab1f66be6bdd7435f22cc6a643d8531b48f1463aecd5545f92b4344df22ae7281325556061810d07a26ba73ad8145e' 'e31cff0cdd441703d56a970e2785587585a40ae755388c60b789b4096ddbc41edc0c68172de5358e9c0a8d2d683da40fb819e17b2068ff16f07e9ee0cbef860d' 'cf1184c7d8e8b5ee7e11804210372c6c1fdb0cf9c8185688c6158422842c7615c106a179e8898969f39677015177f88117c68ea177e7d0c3b3f1b8d6cf202a94' '31bde45018976d5c9a211917bfa08bd4e843faaa011e947f61a67948ba53debaf929c4722c60b48797e691dc9060bde34619812e539dc179eaf851a10f6694dd' '02092e953b2c50521a60e1d087bc8d89ae8992c493975f5368ea98683c2367d8e438eadf31382d9ad66ce6dc0fddec503d1b142bef9c5dab0a3ed551ac8ee0ed' 'da3f4ccb99f2d69580f7f7d1c565779e764be10536588f41722466753fb4b0dafa71d59d439c00800aec4a95e3accef981e7a96fb71761fdeb66e53fcd88f96c' '23b949b96026336ab0d55d78ce3a3e8fec3fc8fabdf7559238ecbed4dcb68a44afa03de943679f4ed6d65db4baa8e6daaae0d486a66d93b72b48fbcbb0b1d955' '3afd4a409086ab698f53784587df9be932912f99766ca1488d7d45fbc0f20e72e408e3fd0686307e378731628ea398c5472be57bccb6579ec5530711d881be1c' '48d322fb0eb34577c8e8aad13d7a71aceae08bea1189c54b51155b76b4f25264f302b3d7c1f0defb58e37e66d351778b9b9b8472f974767b7dffcbcb9f95cdf9' '88d620a9f22ddf24127f37f2c27b90e95d696cc6cef95d079b2e1e749c384cef0242a9dc5d58e05fb954d93f678a46752835035a56ede183803cc016a8d29078' 'b0ce86a9abc7dfc9e8785a99b5d9a6c18c1f32509aa6d9f1b8488bc8e9f914c53f1c47ef054d29b31737b74b051889f06172f9e5d7d447a7b3875418a1fc0c2f' 'f65bec4211bcb958f26db54620f12943d18b8115e6cc0f65b013d64425e8014cdc3d828503eecac6290c86fbca5c41d13ec1c195314860039322d3c88ab97c95' 'dae1fa813f9a46c51bcc559235563d6ec0adbebf84132942a8fb520e8d741f421e4756f39b419afc6a55f3ddb1f03eb685f353cc747241fc4277c614809c04b0' '8542e0e3f952f9dc76bca8f6ad68c1aa252da031d743c2bfeb9a2aa94f90aa161e96de3ce772b11c2cef5806320d175495da9bc182579141cab32c0bb62cc9a6' 'f43d8b761fc4fdd248bfb177d6cae7bca6869edd410f7f4bea3dd88f65428632ead10e08ee3b4bac576dd4b471a82d77c070ba81d7617c0ab651a5bdd6f0e121' '1b33c02a92f2f84b6b8acd9ffdd038c51c3edb6d9468530f547be8fef9fbb06d20e565061d1615a3f7a38d391941878a0e6753686ca1cf08d58abaedadf1871b' '0e4d397e58f983bec33e46edf927e960c705cce914fe3fc7d6ed981587779e21dcc627f34b6e2672203033324356a16dc81f2940c3da189295960ac2129a10c9' '9413957c44d73c827bf9b1f7a5e9ffe1ba1793b4b6fa499d15ccb7d2b5b59fdbedd1b4b1b544511c7d194bee7ef5c24aa32a3682045b0bc5a4601c144eaf57c1' '724e514374a17bf257a35d5544ca51507a0abca1cac7532071b62e24ba0428f217f78fc5815d86eebb207a103ad3ca9388e5a12dea83e5d27b762247f9f64232' '33c96fd5b0cfeacc1ae670d9c76cc82002dc02bd5ea8fb10e63d5110739aec9eceda33a267acc3e468152d77997b7a920926d4019727953e9331dee803f5fc87' 'c67408c32dde91e0aa71a454d271f1bbc06b65dbdf5f0456a2618cac8fa546a917f05b785757550313a8e0ef69a3f907caccc5877fd864a5d72769f9c5be3dd2' '4965e4fc8cbf8ec42e940d178c7eedf25ace3104cc33b90b7b1e1cb9b3818334fb3ddf5be058ee18b805e65122ec5c22b4f6045c841485e6940bbf3e6397d47d' 'aa789247b4e853e95687072f5f5e93cf835b799b5d037558ad49230ee64b9494fde0328c1a792aac52f36ec050b0efda193f0ad7495f5f7c30c0f3ea9555ae75') # vim:set sw=2 et: