# 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.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=('ccf48a5376027b1e0182d4040a0571e5f34c2378349c0d11cb4e14c75f10247e2522e8d8d2a0a45022ff1a463a49f59b1cf611c70951cf5e1b383051c0573164' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'd13a7ccf00ed0ee1f0867742d447b44aef949077017801a70b60dd995b5a480ecf9d4242e2c67e268755f8cfbc3cd3cb4f6d429ba2619b342866a0f65bb00154' '825cafae787a60e0e50dff510711b09d7774d7f5bba793ac6a1b47636c94dca6339fde287ba965ddae8c811a2746b3d80fc9ccea7721bc5e63b31c9d2b491dc1' 'aceb215aa999a9a0d6e679f2bd81654f7fc556c5277865d3fb3d9e91de3a22dd28f73abfa4ed4914c7e766b5c9b21e1160557dccdaaec371f189f941a24d5e93' 'd6a60e107f498a698c58be5513d739597bb11a6bcdf5bd25e764e00682890fd7fdf5ae54a8a84fee1ee43c1dd017204faf45806ccf65a19875ba899892f96440' '32cbc26d3891498dee650e68e93da0053978c8c279ec4f686204648455fe40c0a91f065671b3f541cd2ba85fe2a9abac48b2ecafb4f4ad314d1ac6c411979f27' '6da74619d08cb495d60501447572275b8702ce9ed3989a7c50eb657f58c8bbed3055b712bc81967e1fa284286ba637544de45a4322ea41acc7ff68320083bff6' 'afcfd982a17f68ecf5c93e419e39fc4c6226cc166f69eeeb5f99b4c6b2ecbe7f61611148a5bf486d61d922661cb9021cd31ca16c216f5ac33575d13d605c776e' '9cf134af055d737fbd7458655188b5c3e0e98d2d422bb406549ef8ebc72dcb414b6412f2e318014b5034d5ba2c33d784ae1a1e9f484ef55abbb2b625c2853aed' 'bbc91fbd9839b2e4e24dcef40224fc953502bae2fcb2287efb099514c00ced1d6038dbd1ab4c68e589999ba7a4ebec0425f484da6bc320b11e938a14260f3f14' 'c83ccfa131e050c3186d782a772902365ad219710da1a2800c5950900a3348d8cbe0944d33cdc4cdfd092b7de430ac4e965eb6df1d8df4448051aaeeff040154' '6f07836e4b5013437a835ce58a94bdd143c70506b767f0d7d206a15c834c35bfc29afe06631dda325b9427a83ed6e3a4e853bdfa7556b730a2a864808275b061' '8c8bd75031e56106eb2443888b958264a7a4a5d386cb34357d3a06df87e04211d112b8a299a2162cbb438e301be78043c5ac48cf27a6722ca41edc80df4ac08c' 'e9ccfb53203d8df39b3e87f9ba98bc26363ef2f07b206bb58642056d3adeacc70d732864b302563334341372b87013d0e6d6d5cbbe59ee0f6aa0fcff7c5b41d7' 'ab38d6a65d6e6ab5e33eb958b0cf50bdb4342c0d1821b4b56573fd58943db90fa435a53728ea7e237c941ffc31bd52d56d7ec5c439bbca259553439a6c5a1681' '07acac674d355f1f1fccf5dd561118cdc22c2d35b94a91d293cc66581e8acf3af4d06a662b0399351bde44d166593d1dfffaecf67e50d0f450acf039195800c7' 'e79008efa470d6381b5b4358ed37257f61c4cf553c043d8681cd7bea8a1658db90780402eb105b9433232fe3b52cf8b718c934dd6c1619ec6379c64d999f78ac' 'a750b9cdff7947bda1d12355f34ebe65c6e7be00742ea7036e8133519d4088ee96b3b31417f17aa8143b8dbd26a03b058722e69d50742e47e3ee4c4196d5a5e6' '2ef232214dc49a3d4310dbcc6ba527d3a67dda5c3b255ee83ea80385ac2552c4bbe4e82865cb7ea5d8d5f8da9b2e41487479d8974f0bc937b65e0984e1624f3e' '053704b0d7812df2155e91c9bfc73e09bd3555ad0e8c8b9e293a9d0f090b6f88964076d228f1b544540118c8f61c4e4dce44a6fd717d5aa03132720576f68649' '59f8622634d35ed92e16731e156a46edc02faefd570236d229c167bcbbfff748069fec163236ac473695597a9238b2eab31dbf6dbe8f81da1c9d3af7f73e923d' 'fb8b4e7591ee5cb1bb80d67c8fe075fae231fdc6cfcdebef47e38837da430f0df0164ed8e071b1b0ce1b0db561ba7c064cafb042a0a417cacc0e857fcd48715b' 'dacfdd4964b1a148bfced96da14a690f79fd7d39bfa12e3ec569c16ad2184bda0d2dd0c5fcb2e71db18f3a12d8bc23e584a5ac788c5fc7d9b39b19c26373b9f8' 'd663f7e7b39795b38703068233ce3edc75837545a7bfc43ea9ebdd74b508627793e512fe33381485b944ba19576553cc156706e91daa2605468b83182f4ec0ea' '3caefce2fc99d6fb0e8f48c8a49c23177f1ec54745aa97387dc1daafd3c5b3a182d53afe46382253d5a8765b667b0a483dfe491e8ff5c88edcddbebc4888b319' '66ec4567cb08105c6272591bb93c4b62f12621e545c5a8dc435e6aa76d3d58ac5281fa3bb031700df8ff4e8fbfc675c02da4a16c5f07e45f2c1770a1d4581595' '5cceb4aad559e20882f4b155fb57b8bd03403c916de978e37506c41e9fc442b487a41edfb48f41d62b2d1535f1d2f309975d090d54fe1db2453f89c790542e77' '5463ed61d85e0a4bc9a939741d421a6485fbda4b6d32da65e167a00d28f8c918d61e744645a21347589b871982f9e038dfed8f86c07b3b1e4ef0463f37bf9aa4' '65a93574c900e3587d40e613fe9166dd14d4334e380f4a8b39c469e661718657a5afbb7260acee2d91224b6ac6d0d3cdf0d243a7b2bed890342d2ca32a3a896c' 'b44f6990b4aa7f108bf87e5ff46f9dfdc4367a2cf68ff9cc7bbc453c7cf50ae0924f105725c7ed9caaa7b3df331810c528fdb7201692b63e8bf0c32b185d752f' '7bfe80d12370099c9d99c436dc4c6c9997d392a3ed4261d7b38e5f4018bace6228af8c59cc9b45f19190224ea7cecd7d1879a1e179ce4710d2a2be5758ffc2e8' '388c86397188845a36da44c5bdac5ab079164f408e6a2923b29b2f18af92673b70edc49234ae457aee06e1157c3a764becae32c667c066ae261f7d9217141cec' '7d449226fe04444c55367488bcba0c87c1a9f3841f4628c7a3e2685511b2113ccb1ba37f9ca86c5b1fe2920e6022913c6f562084bed4f23f34031d88ccf172fd' '93be672061855bb5d661dfa7add4ab038afed6433ec788038d2aa9ec44a21bf1ef26d1bc8e6aaf1aaed04ca0c177ff436d3aa99a6e493502895050154d1a7468' 'b1b0e25e40ead03288a9acff3401066c0f3702b68db36b38349440929bf9e3823d053a5bf477f808d241f8fbd287cda02e97e3bb7453d40b11f7c1b114a30260' 'e200f0ca03263ed4d2f74ab50e19c6ce05c158d41a57b32518d7c8fb8dd3bed36b3f517d5cb387bac26fec0fa7442fcaab7ed7c87964bbefbe70362eca99b2a0' 'fcdeb47a762388519e7b93619e0f36cdc238ed3c98bd7c7962b791afa7d9b41644cb985d9bc444dcde285a2fd74f5891138eb6f8ade3d64e3c5a41f9a21eff9b' '708d5ab479c3421cc957bee81f4a286aadbbb6e20f7e5cdb8e6e08d642b3321624048e04c94299ead7511d1b36e4d4be95309fed75a138efaa773f978a5100e2' '9b0d43d6b9116a25ffd9bdd53ef1e4f89713104bebd24d4e14d18601f904d5b170fdc0efb8f993a8f39365bfbf37bc9cdd1677c3b3366af6ee6c3ef3d95de904' 'f01da6100cd2d841759b317311f06569434aab48e7151a91b9455afba36dcdb040d85d2fe8a0a8e2ffd1b8b75802edb3656b5dcd9dcbdebf9e66846bbd832e61' 'afb6c1a06bdf190a7328a61d0e1a835259ed771c1bbe7533f0d5faa5595f8e9b4f6a7017001f8b69e29351d24a7a5c811525a27095edd29003c1c295e923b3e7' '98715c1216a3a8e56560ae567b4ff22b2e86836d437223391ced0e4c670900c3671f34b0c46502c02679d6313a622bd85bbbe3ae303c8c2f93f5863ad6f8a565' 'ba06bc21a60185fb3a9165da606d984f0c98d9e2457c8b4a41ec8748d11ce4a99c997c94d5936dadc92ff3599a3038fceeb437fe5b773061b6d60c6aa0b29d22' '368e0fd3ba15e5c5fb11b3fb4a5057ffbbf7c790b6fa829ca3398ad11d22ffc49cf01e652148371e0d936f009e70fdd093029447b27cde748147531d4ba86e1f' 'ec171275620ea2b7f8cb08d788f953453b1defd763fd9ced56e361fd63344f7bf132464aadd472c9537cf032424115608b51274bcc75d690957a528c2c3bc497' '8e73a9baed3828fbb179e3453e600bab02301857b3174a69fb4924693d11b6ad5580950506e1705c14cfcba8934eb72f22df70463638adab9ea8b85e461b9702' '67293077e9610458d4df8a38835327ded2070f5f728bc6d6c770541b218c38e083e958a4dc9b804e044cdeb6657a7db8c66c15fd9059a39ac98b17634a953fc6' 'ef75f07dcb8a97e5ad0a0100ff5a4d8ca9ca9c8e1a025c80d88e2b844b05086f02f1d34c4cf62795109c7f2af2e18b6a957a8a2032f1dd60f9cdca6d2e90af45' 'c093069544fcd84da1e4c1b86ecf04f4794b391a1a825656ea48c8f77900168dc2150deefc679d76eb51ce491429f5245f3ae96de36233e8906629ce6a374628' '8a4284dbc7a4a55a358dfa7a37e58d07ad9e308afc3e9c91b1c7758605fbb940acc196fbe88d72bd50c90c233245c3a74533f0ab3e4bfa45b5ec394a125cdb9a' '6078a117b001289f4d0cc3e2ea34b4eb28428b4c6a9bf6601f54a6522177f477fadb67ad79c59b6980c108f470935923eb466da913a6a133df9b5928f120409a' '5e911eaa2b658e0a9901650c2d14feaa286681f504ff8028fc873a72e740810fe82ac32ffaf25c2183c510bf53dbe3a97f329f82b23e7d036ac1b7a40a459a0c' 'a7f97ec876975f5a14c0119d0c443d79a48533bb5a360dd787caf02c03538ad8f7ab5f173ac0311d47ee9053bb52475764d723e4922d1bbd8baa8c94d3547f9d' '0613fea360d19fb69c39ea98e5480fd7ee9ace6e19f8d185f69db566eb1dfe7cfe905e985ed54b07aab8f2ac5fb9914d33b3c3f8c8e07834fd893c21f1d193d5' '40f788c3dec882f71b1481be028b1f4a3467ff2e5a103399dae13b33ca3aa7c6bc381b59dffe52da86cb1736f41d406a040c5d2c67fd84888bb00220a82313e0' '361f1b6f965091c6891e3962a7043f3c3b9b24dbef2e273c2535a8fe86fe73d7bed5d2b76dc5dd213a3ed4a6eca58b3157aa7846f5ece3dee33a245f8b368640' '294179480ae13be12b4191bdb77fc31d32955060bad02f5232d14e526c8eedc5bce6bb080be9f0d69233b5ecbb1d43f99fc0cec4a62f6ad4a4a8780e2fcb555a' '455a9040df700efd05f5c71a257b583c3008b1cfd718ce1f5f4bcd5ba1c56daaa880e91067e5d9084d98eb7cece938e9ea68421314fb33e6d6942f99018f2457' 'ee9e5c2aa9e04e23d42c817bc2cd69823883f328991d964056eba1ef7059ff2f8346206243f178c97f8760b1609be46d981ec45ee1467bd617162ca00c3f140c' '5b9e16f6bdc31d4cf7e0855f9b7d3e92c419f898464533b4cd7b3c6f7216dd945e2520a8703ac6808bf791a0eba4590bbd935ce0b01e1cec6124566558426a6a' '58634fc21dc06164c43d6693225bb93a665d125cc47f01c24c59960417f2c3e7c743c0a3a67184c1955c8509b946d03238e5e2528075bb5d8912c6b3ecbe3768' 'dd423457612aa07c20ca3cad518f765990ef8d5e0d3933412d41575774aa58c53cd8656b6dddb5fc59679c85257f11b21c03a56e06c09257879fd1250495af39' '82ddb41a722524db6226c7d943ec3284399645336f94a7579aba6d9b30585b31e8618313da40ea211ce092522d61c716f24f939f5f08e0f037738bfeca1e76c8' '094f404ab4b191ef019c91b36eec3c1ed82a98d93dcfd51d75feac8792f3fd2cfa41b46f190c95e89e55b95cfeb4b99cc3302e1891eea70f57269c95bd4e33f5') # vim:set sw=2 et: