# 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.3.1 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=('e3b643cfee07d3fdd7bcc686db6dd3e81b09ecabfa9df4d34dd32acf3799b4b0b4a88e169f957d420e06aabba55c4452f3a9761db37828b025048ad5d8ef2db9' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'd44bc133e333f1c85e2928196b65de3491ab9fa23a44a783ec2192a49c778cfdec71cad0c1c08e5339528a53da4f60f585cdc6c8fa920d1957dbd98d1aa681d4' 'f9790ff5ae7a27b9d0a83ca9d2f1c1d204670a724c35fcdfb8df480a753794831278956822b4604f72358f66dbb8cecb71e0bc7fcb36021994f2ea6a477fffad' '663c4cba6f27649c91b42e0fae44e98be4d515a218194f8e8edcb794386457f64002af1266b687213842139ab5c54d1d6fc2a7e2a6fb98eba9d4cef646e622ab' 'cbf09dfcd51e6f5ee1713903e39c16e98a10ed7891a4b3197dae31a6ed7eddd3c8b672e0fb59a80e8a9ffb132f8cfd7071a34d944d8896881974d552ffbf9d74' '4631d8343df7844b9f6bd29253e16dbff031fad5a05d1c983c1231c0e1875cbe739ffa65005e81861d3ffddc22df64f34c0fb1f4d72d8ecc4f5b0dbcd1dff171' '9365c76b160cebe60135f5dd7b830aed4b081ba51bc925b89440a5faa570b08a1b241ec7e2329cb372b7a7decffdfeef34ba7b9d9cf9609dcf094a64f99d01ec' 'dc92fd361aeb6897e1023bc0deb7e1e8d493f6463a760a22d0a391505019d9396974b886c976322eca7df8a80769fddc048459292f721f3ee1cd0587441a16a9' 'f0405e88f9ee14ab251b7daa7d510865ba18bf5d10e47d102ea9bfbcfcb75577781474a791390229c5f1430aa5c000d41a2a925b29ead3649dc752212fabd794' '15a8283a3cf77b0207a080b2a6d01c9e421896cbe1e213e86d4134e4b84d6bcc822fa25a8bc0b30d7c4d08063709602f5b7e17251fdb9a60e4448507645ce3ea' '2a5141db90780b967fc89041af3d0c6c5dafcd022fd6b07d0dddeb9b4689edf8047a1f86acce743008ea842d65a4749f5a5f946fa2557d884655134e4a8c9305' '815e81e8aab1ef9ca62a240fe08435f1dd66105a572e8ec81f538c25d4877586c08959d8400305bd43a85ae3bbbcdaf37f15b06886f629a3474449290e16dc6c' 'eb1f2b8952749afbafe278272f48bc4c33789028802e9c30b4d9da5ba39c199599158a0091bae744a437eef02b25b641b170189de26177848c5ec0d1afaa15a6' 'f7e37818437b5f711040d0317b4af96f1a7f16095ab1a6d062065e22696bf3a35499ffea49997cc24e7f3b7c7aaeba232197b62c8764b8b47779278cbdf8f454' 'a91cdc035ea6e5a57eb1440a850279dcebb4eb19e72bb86d359a48cd8ee6077fc38ac71f82415d19959efeae89679d240478113efdb8de8d9f5c5d96302247b3' 'f38e08e630d61d11ec07bd4bcb27b662a5766f244ba2d29dea252e25458a8de5d0187d25656e78025fe67e1ef37d1925d8e16da1d249ad451b10b9ccedfe35c1' '749cd8546bdfebf0c500a69a29b0edfd3f81170789040b5b91d6a9b262c021cda8f4d339a422cd4574dac003f004c778413190e5516406f8abd70057242f742a' 'dc4af1f8606a2d48648d9b0c8830f8c7c5667cf3e0f4fb13fe9a51a94f43e9299fa42e097136c77355a6a6e810e2ff78ae504673802aa8ab9cb70604e5e2bf47' '2046a5d991e264f7cc6b237092a70ba721e7524fca34ea63a35218d5e26c430bfaf6bd1d98b5b7624254252f924096d5289943dae589f1f0f21dfb28eafaa507' '8d991b4a4fac06080ba02b3b09c3d25af1d33cd328af98ae60ebe33df847d3a178c0db5939252b423be682fdf63db155643a066b403ec9902705e08a9c322789' '4da2247b6ae0d7a361d7b6edc21ce2d5f84a03ce502ae49e37980378d29276b14e2d82064804412c4286e4326717ed42c877561c02974cc6045451cb42b4cb58' '30c241e872118c68f894d1c206fde0ee6277b76625bfeb37a583549e4443723d639f68c736cf6809ed6210ca325324c3a520d8d02c5d11e83cbd8cc216deeda3' 'f95302bc1f5820e44181686116c9a34edfd74ef812f6fc15e5dc7e1c6ba7cf69744329196db3775b0640dfb49ab733817be802e17184bf50211e2b72a301a819' '2165dd00b9b28d78e80f88023fd34c3a4998ef347e318796f0ade38658dfcb655d0416463e751720971eae6a75b3f9cc3e30c842b38a7e422f435bdd414a1a62' '567ac6ee49191bb2365b473ce0bc27d79f84880f95abe4d56dcf7dfa3ca3d481653a1b6b78f3a0dd4cdc8c65d604582ba86d4136cfbbc78df863fad810ba003e' 'a35ebfc7aba9eea3ddc1bf81a0a518d5d932f051e9b6464e9471785f411ccb7f229745f853ccff756199342a90cc48cbd73588b979504a4b3b55ddf71fbfa83a' 'ef05b62c881b200a6fc5a8348662b0e9c483520f986cc16a5fa5fc5f459157884af88b40f0bf589cbd5b07fd48271025fe09cf66e1864a7c48e95da72c240a3c' 'f4fcf553edcea0f6526e879b88c4ba5720ce1d1fb077f53424c112fa1ef02cf5c787afb9ce26818e8d8bb914f863ebd248cf66cc3aec47e38855b10eca77a72a' '927d28ce5b5acfd93fa054a0951c2c3f2c7a4e69d4389c6a5b2ea167ca646456a0d7406b73fa302a0a43d738cc6e41f3fc6886870fd8b94234d0a848f72c0c50' '31d01ada6a699cf8bc1d3dd1e730c358edb68bb54779b5936482e61ce477baf7b365dc905b6d5d8113c1bc5aa36f9c103e1647bd6d5314b0793b1cbd77e33449' '6f3504fba2391b7289eee3485206de389ca7279f9c4a7e988b629c3551b4bb8f5e8e983a255747ae8112d2071fc465beeab198e1762a0f06b8b6dbb37292fb3d' 'a738a11eee819346a252d9f44b32ff7543ff94a4bfd462047ff544da3417b28f81e237c088541bd28ca52e806d171d347bca5b99eecb7ed90a954c3627c29775' '5fb05dda624f391d2f09d683725630da1d0bbeacae87a10e12b85365c3e7ddd4f0b39a0cac34564c5479bdbd608778d84db65ebe7b6ac6ed333ea048291a1234' 'c0a1501fd9f6e63e85e90c6e4ea0176496d43f8df4ea65d523a433f1f8140fc1c9956d3bb5b8b64ca19834ea8c14a2bad1bf5deca94d2aaffabddb7669485515' '759257c58255934165a2f78391ff7f84896cfc4db14cde3c3314cbbcbddcd29e2b3a8faf00bc08f74ddd1e3fb025c48d42edb18009122d711afe99f5097fd3a1' 'b04aeb6ae7d63bbbc45bfa08601338066ba0c0d9a4188a774f46b200a134846d74275f69fd84311970902081136352f661825ac6cbb7aa3c0dd014463da165c7' '46cd2a6448f242dc8be8deb2407955ca63dc7834ecab362775d58fc05815e556564246ce60c9b19ad10842a9dfd58ddff69ec2d9943be257cd32c1f9eb076cad' '0673c1b71ab8dac116b5e7185bf80d46e4e531b10bb894b1c2d86212e0735b778c98f65195515e900c2715c7516b329f744a76426c25fefc2e1eb7fb6c1ffdbd' '78fb106e3e730ef3e656bdc7ec308f196579d78dd872db060dcdf45372db0dc3fb223589828f5ab3a7a1a9db7217d0174b95d1985ed5b8598e4e7e10b7c6e6fd' 'ae6b9b717bbf87abbbe0abe3f37c6269a910908411b4841d49b1fe9f6fb7cfe20193c712cfbec0eea7078400d9505cf33d0ece4c7f3d2389eb9912d04bf09177' 'd26dc39626b97e03d4f24388ab310a9c6f0195eb59e19c27e481668ac9c0e1a309b41429caf28e54623b1d8f23dca5fb7a2edab8b739280786b6c5c2d19c52ea' 'f74df7cdc3d55b80bf48e6f0e2fbc7d545b7cfb533a45571af2666eaf2d3ae38ebcc51fb3e3c3cfbe0ee61bfbe8860793e2616564b05543a975f0312ab0eab1f' '0cecf303b9b2ea3ce36afcd8d0e8d3b2f3e3474cfdce1e0d254a65616e075703b5f2754a5254da27f2e95f77f204eb63c78c74b489ba7afe848a96a0d2475c5c' 'd26d528a670544574f404d074617ad7b6791a15c943878200df1c3d5dafdedf4a9a3208636784f5c92416266471560df665deb53914db9fb74925d33a3f3725f' '77cdb9fa36b9cd20b1bee1a9ca21efd93dc5b2f036186c2bbb011980316c6f563f9cbf59d762138d7da4456bcba36eaa1e8d18a0ee53805e1ecbd7a890411e0c' '885707c026d7a7c5a20411545481816b8d9209e6ccccf1776d6b9148591278528d38c3bd33dc7dc04c790e87ce7510f2a5092362e6d9b1065434e928034c97d3' '84054704802b6b0f010ed2c32e5fe2712b3fc7a328d48aa49ead1f2ce1bdb38c11194cf2e72312bc263e0f9afb16476f6ed795debcd39c34924cf61878ba7601' '31e95229a0349a3938d4fc3057935c5306fe91e26021a379926953da80adcaeb13bac954d3d40f746a80011e5bda65d625d1ca276a55b9bf43a6ff67cca400aa' '8f7fc65f7749147a8787a4f282e36540339c0b65d08940d99b3c2afbde8484acb9f3b0e80900566266fa2d6d5748027e90d727a908f3a21b25d0749bf4418e66' 'd9be860f3cb4b3a152ed3c08a3d212bc907cb74a99dc102c3ba564dfcb9ec46625698c04f88859d82aa11b65d135dd921fd97d4f31e00d2ec655f1c036731a33' 'b361d8e4a952a8d6526169116346ea9735da24ea3fd793da51a3ae9fbd507ec718101e6f6dcace3099155e4ab5069783b6c6d587f3119dca1826be17235421a0' 'da7777429fd77b432ab2378faa16f9fb8df5595dfce3c153c5c418ad2bc578b6f359d7519547ecc4b8758a3ca2ecaea1e2095e2406c1aa74f9d1c98873511d15' 'fc7094830832190f822b8a51244c2c7ce941d7e7d0284f27abc28b68bc53e21bc6aeba15e67b5e52cf911f263ace62e6b3d40b3464ebded6e70288bdd4128a83' '754d842cbd040eeab4dd678a5af825b7fb8e57c2ea03586af6a41f38b3f5edfa13b55db73c334a54bf0f926047f1d18b6a0bee8b0b4c86248ec9f2cd10f9ef44' 'ef9dc35d40851e8401cead8d0f176a76a732c563074d6c9884abbb0b1c1dc61aaacf264cc48880f98e3a32beb8cb7a4acb19f00a8b8e49177c35a83e43ac445a' 'af49df2f11873f277cb73a7dd921531a0cfd4ac69cfde30fb8a523e26b9da1a555b88d0c49fee83132dd2963c6d2de16685bf8976c3f68915558e33ab5a3524f' '23575f82a0d48fb83fd18c01c903c3d60ae46afcab1a79d97b7eee424354a4cdf780bdd8ef8c4c3ceb9b27f1709cba4d7fff9f982605037e9ea4fd2695138cc0' 'cf126b885daf718dd2e8110b0b3ac06bcacc2d98fa9dc864593429640b3ba964312f8b5d02e91c350b6af5f6e841b784efe6c3adb44e548ea488da79abdf5daf' '14de6ccb33e795a01f6a37752df61431bfbf91d4545fb8ea82cb1b743dd1bdbc4889965607a920a28924b035050affeff38da44953899e40601878b0a2c07317' '71372b52f2933a94752cf88ccc8a5c9f57b1d6ae0eeb95beba531e18265780bb2ab05c2c6ce823cb565be61d67e70d83fa16955a9968a72277997742393b6c30' 'b3719b79a10ec3749ef2d80aa4438a52d5e19aa2628f9e6e1b748c98948223f1eb497504c1dd2a0c97fe28bfef4a333e5b5c739d03d61ec3361419490a106c7a' '32f04bd22d8b6c3279c16e590d05818c70d2b83473c6807b6ddb2266579c433ae78289196e447de85a4908dbc9523c74d6c8cfe3b8d8fcaa72af98539f67bc75' 'e97c69c2efd501c437fbca65159e6bf3d2602f57ac83a0949bc78b99aa2bc97220965383efbb61262a85e4fce6508af6c9ce8108644bd2e36a62de26242ea1cb' '51b204f793d25f946be11cb23bcec6d85224885dc628674c2282b1ec7cefb23f9088bbaae78b5642d1f32b329c5203271a5129ce491881e0efa748a5e68aa431') # vim:set sw=2 et: