# 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.2.1 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=('8a04c57f7c4c8f19ca3aa5f62a65fe05944a8425e074ff49ff087c542bb64091666078ed0b887528d2662d92e65f7a00a5fad98e7897d2f1e1def963923523f0' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' 'b4df011d615580de03296452a21012ca656b45889522bf80884a98bc3fac51f6913f34b525fc42953ee3e7ff2750c2bf6db4c0ae87c1af93f7fde709fc64b58c' '6d419a49791e9fee211fb3856390009326e86f99b45af0622f93a8f345abe15aba24b9c4504b905e11c96ceb267ffcbfe3e8eea9b010b55397a7ceff1156661d' 'a57f06c1053fc94d4ad860312411008aae42fe71599aeb75f7f619e8049d8f3c872b741524c86dfcfa8c7984450086c5778aa73f62a7ef76967bbc3467aba51a' 'e68ef72706ace40ec52e0f0961f96c7878bb5021e710bb820538beff2afd8582fa5b251c937346488a5d53f25a54e843993d45d1ccbb1de204b4abc7aec76831' 'd5f963301783d61f79a3a89d87f4e36f2d5e44de05937c895a1495a7d045565839efa884a75ba0de1e59e3a5b2006248ac0b02fedbbc6d8f0f9dc820da496006' '789e9e2960548e30e11b48578d6f3fd9333e8cb6a8447519cfe40e931bc79d4d5edd25f2a1084b62276cfe1997d4089a71a03480a7ed0d770811f0c406843596' 'e78857f22081990ec3fb23cd99734d00d6df2242723fa6e5002a27bcb4540adea4c7a164587a3b5622f8fe6ac3e27d4ddf8bc1f3c519ba256be08a3a0169e1a7' 'd141352ec32e5a22bae9054e0a1609f87454f6199f45bda581ec85d7b3208071e2edb009a96db63f4504773a0bca2948d592731d4362cc4964b23bb97aaa7dec' '07a416b0c33b1dcfc95b0e7086c8a44aa1424b7fbff5e9bb08c0bc23ccbc13ba4a8cb6c7d7566a12a26c78bbb670c5d2539717a5bcb6c83d9376e1f936b4038a' '2da1b3a314d1072c029ac00b6ef4f8bd4f23d34e69ed94255b01ba0b7932e8ec19c169efa65b730d822e4804d9419eb0aacd4ec4645f14b59b3f98a796892780' 'bea309acb790dd4e605d9fd83018d3436a76942f3a04adb546fc004a1ac30704670d69f8397cc32666a59b4180dc1320f49f945f96e17718a0f1a967a326747e' '8209b99caeb1807f6769efe8ac52780f25832179d6db98945c9b0cc5761ff5d7ec2c511afa359ba3bcb27ccc5f176bf761f639a8e68df8082a8615511a5cebc5' '665d1803cab339390b6713e9628a31008c62aec62dab9a14e77d380a507a427d51fed7969d17982ac77d2bf10621aa4dda72c1709d96415dd8d9f0793fb0e0d9' '9c890d99c9e56ad592860a5cc8254fc8e685f93e5e77950842aa9fceb475ad61508884ad9ee9fad83b502b5de5723f7d3d4581b93b7910b7e34af7b9c0a073f4' '8df247357f8275d36455f5566856c1687bb45ad36b7211111b2bb9df639cbdc7d3ad32ef32fdbe5178ec7ffdebfcc6fb73854bd26892119adea09221f977b5e0' 'a55550b91442b9e2f76e424d0f79ea67c401d1e41279cd891f437b5f38b2cb58893c176eccb19c921e74bc664579f52656ba381b4a94aec598ee218ee7c154eb' '1d8c48570c62db60961308c401baced3f7a4b533c3cfd482760c33a736b647144bd674ec56ff0ab68eccf0144924218fcdb4b1169b0bbf68f46e059a748d242d' 'f81ba9665788c67cdf607b1d381fd5e55306e8796e4879c9a8ac86a1fc252ae8f574706cc59b86547d30db38a7e3c3c73fb1d2165170dea11507ce052815cf8f' '766771bd0036b80c201d8a4bf2328f14eb3f78f5e9cc128d82d48463803dd1e1bc91d74a92a98b0f9b37bdabee921d412b4844e75974c187f6ee8dd3ff78b4a7' '5b6f0770ac7d190aeff30bc177379aa5a7bdab682d9ce3944aec5215eec3b67bb807f0fb3d534c531619b7e81a494d16632be7b01e50dfbad862c82164da3364' '15cacb9af1a626a7fdeefbe78c68fd9296a8743651f2a4a9c9b7e3fd9daab72166cf6f596835a9372dd5240789badce0ea46e4d4f657598660f25576c6f15ae4' 'bf338e98d6a1ca32f835e45d4557f4d9eb4d9de7ac7e5d73d241d5b24dd385427df4a37d0df518e4406f2d1badf93ccfbf0590b35ce1a9990d06deaa34ef70d2' '0a29b05cdc6e282ab945007370cd56bd96f8f5e78c24b327ddf41e4abbf981ba595b06b1da81c63cb3b34478138f7a9abb83352e5bd1f098fb505a93bed2ec8f' 'fe2336002759657610d0afacf53eb4b071da742a0db53c511ad45721eb2616377012ba1376994980752209aa984d466db6322cb143d28223b2f076308dd4a910' '5e95eb3ae53a81e9577bf0018e37e3c48208683bde3731b823207b5ccc9bb28445d2cac05104a14c8c99105918d70baa9470e59bdd3cb13aa13f04f5e481dbc7' '4f5d2abaf85d9beb3688f6765ccf46de53de76b26cf538ab598070a6614976cb3e2ddc98ee12972cbc84fa20bd71e7906938bb92717a8b4221ec4331b7390a26' '609064139d4c03fa59eb3a5879f40fabfcf49cfcac3a5f0d6445116b625e255b8e000a008803dbb859d2613525f20a30383233979c1fa50d4a1d6fd6831c9c07' '2ccdda7f559a9ae2b36fd8b6b307ec058f8e657ba8261034f0c1c94f24641b7abd5184a088b858ee2ace635ac71f319b24bec237965209fbee0fc969b0b27b6d' 'b9d9e057eec2c2d7987e5bf23ee73c1091f15373ffd405b1fef3bf0b403a0018f8496bccf599283b67fb9f7e896b120746c574a2033e544e54b97716ff6794d6' '1934e9090abaf8e2ab0c6d0f9dc328e04a6643908f8c15422115d9408f7915e30bb300813ae49abfa800fd765b126fca44b9e082a5e5fe39c0019d15dfda3a2e' '914cb10a12a9b486d46955cac8c4dbbd1ad5a3c4afe6a3ebf4d3f593b90c5a7e8541ba4f98d079f5680a62b01c5ee50f7b4e84f30f9e214e1381d1cc45bd1531' '8ca188e30c781b0bacf564ebc76d60360102152ad9c53128136fe09f8d4feef395a4c05ab5a8851ef011a9650c3aaa80e2e97f99341e72c3bf016299f7475dfb' 'bc59bc564522d4a1d6603114d66744762369c011c735a71959f80c5c568491ee5c6e81f30a655defe59b3f4ff21efad1dc6dda7b92487615c51a41078fe9126e' '6345b513959a45f9963eddcc716ebc22b02545d565a283bf6e48ae19a98f67ea6403abd1e9154e319145761b3e88f97a5bb682fc01bbc11e1f527e013b65dc6e' '8f96304191f9f3f0780a184950bf4ee031fc7e768beadccd114a4e4a24fdee9353e7c3e134e139acf129c59d317abf544dee325f087cf0c5462b9ec5cc418e6b' '5be26bdd75362aae33a9f77bd772caf34f67fbc98a90dcf3a17d215d6f40d382ac04fb0a5af99aff16d7d207e45e5b4fe9e53f368ce578e696adeaeb7564a44a' '1d79709a7a8c7171129a64093bde5263e2c35c17a4c99d0efa8e7e0f4f8d65d525d45e17ed51e7633ece13b46a0283c3b81a14d6ec72af046cfd311be6ea8614' '582527b1aa96a9bffb00fc8b5b09de677268405b074a9f43aa47c29513c0110c22fc6b5f528e739d447b2556065c5e338635cb71bcb6c504be29d86adc8a3bc5' '2d95d891f8b99ba68eba67e3b54c2bdc440de4c8c5aa27d745cfdf96c1ab843b1cb24db736e85aef3c82d6b18ae1c339a0e0aa7617031314f3f934f25f5ff07b' 'fdc8943bcfc112676fb4211853eb2a33ff8a33488e55b01473214b75e33c18ffea7e3340cc291653260101eb2c3cfa1dcb45487b5f8406595d7d948b8852632d' 'c6eaddc26b9ce6a8f71959878c43c59816cc8141c188859d1286a5656aed0c0f13fd73aa6e33996fe9e5f63d998cd04b40af6145c88f8f2d9ccff31e43cabce7' 'c72fdfb6b96929f978f4bf21f025a69e84ac9b1ca88b6aff8e1a5bc8d78a8dd3e680686133ba017f63b527e3b3e184a6612ec977ed94f65e478c04b30a1dfc44' 'a47fb34784617bb904a58dd521c6c994489ddc2f1352f56f40f8a4d787ecc3e3e085e5d85fb74b49a3d769f21b20d9cf82e24cbb48dc84c7e74c4fa10a8bd2fe' '6a78180385a8589a732f154d59114db64e50abdcf3a30c227861d1352f6a70cf3b899ea38d3a2f1a777ee551a17a41db9852055dd9debe79649ba6843f58a679' 'ff3b7f2c167f4712020f4ee36dbbd25c26549ca2a0a7889bbf5f8815028233183ef87bf6080ed89010fcf6ca3944b5d964dcde74de85045dac85c9152b1e537f' '92aa91dc7c2dcd8f340992e0abfa8089495dd6e4108be22b5bb2972e3a9a0f034f39502048f0b5c5568b6db01fa0360dde8a844ac315e7e66ac08754fa14aa4b' 'b1b5812baa54eae0362676d4c5b3c25197c85d3822461fc40b46646d706a194fa73e5730f993f1978e9de7258e684bee09201530b70341b9a1be89dd02cd5d54' '9165ba22ec09aa949a442a3d6b8275dbebe67674b1c930267d9cc12c2270f345488bdbae7f32a9098182650112bab32a9cf4ae7c22accb6b358f8b9e2f06aab6' 'b72e65bc157dcefba8577998dc916f334226d98e8d7bb1897d48fccc571c807797d6f675742459c586d18575290e68ac924c765f49b45bbb59cdd6a17782373e' '993952740d99f2f1f896d856c738a926d8320d05b33f514f25e5bbf879c24317c0f51dc979f06078ec8fb68624fc125835792f1a6246f78045de7bda08d1448b' 'a132dd16295f4880009db20d56d1cd785a8c018969969b207dc1771bbc111ce1b8abfdb23dc7e3f6319690bda5b1f9707d07885a4d6bda3353ce574de02c562a' '0240b86e82d5ad761a006131b033ab40c836ffa0cb95b30f8301972c8a4a48ada0bf495571151f74a93f2d433b86c63c69ed436c826d994d9d599c45d4521931' '7236c4ccc161ff6551b14bf83efa218936ff9a59053db317f48477f509537bdb78777d5dac4a72a84670cb3015795327116acbe9a8ead2689c852762a5054b32' '5401ff6040bd50e1f53fc02621471aec876c5a54798c96a1088e416057a0112e23420dd0997e74e21c7961471b82ed0c6153090632724160aa3745e56ec8bf47' '87eaa384d0aab2de44157ec239bf87a5b5f2ae1a5d9036311dc887e97b63803621420a66a6be9a569084511593f570eb1019db83743357628fa2fb0726b83a22' '3412d1bee9bfc153be5c8c6c0c015d6fa3fa6d4d4c901ca914b0aee75aacb3648a1eb7dc77916d521d038f9220c80924859997f3bf9226e0726d330c7f91f5a5' '6f4ca7656ecf67a137f618e8bb6ab2a817968b1844a41d109d98bc665125ec68e5e007fbe7b76a28db8082b9c13659d82b3e31b82bbe27b0e6596fb799f95000' '98b5514915baba99cd2e060d3d91ac423147925aa6469a619b11f6a044e9ebeec8f57d7cdb220e034730cc496cda74664e0c5f07d9f326747c04a52f3eb82590' 'c33087e527575533563fd154808c364701c7b0dfbe512597206b6cbf086b6fc62b0757f7c0efe191edd7178609444c39a5626f39851d118205570eaf8bb9ef94' 'c5df80c44f719964e00143b5fb6347c447907b936b0d4e8900d01127ed13d86be4367aa63b688666028a9908706677b7e89fb239f61110195382f3623477791c' '1caf0e8bd087531c373225bb54f30a49b3274a30a3e220e81bb2746b6fbf71ad18c50a36f644c90c02045eeaa14c54213429fb69c87b6bc2ec7fd91353e43b31' '641c7296e86a859061116e7b5c9f0077d6dc02e1c81212c21ce0247e9e92a88f3d7fa2be307f717e6f95077c29c236487dc8fd93d7f9795aba569e36f9f5f1dc' '6e8c435ed7f07b1dd1b201730049aeb924a7b1b44ae2fa9ed1a209e7862abd0316845c929fea24f73e43262f147b7e092bfe26ed7f3d2914c09bc60f160ccd98') # vim:set sw=2 et: