# 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=102.2.0 pkgrel=1 pkgdesc='Standalone mail and news reader from mozilla.org' url='https://www.mozilla.org/thunderbird/' 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 botan 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 icu libicui18n.so libicuuc.so freetype2 libfreetype.so fontconfig libfontconfig.so glib2 libglib-2.0.so pixman libpixman-1.so gnupg ) makedepends=( unzip zip diffutils python python-setuptools yasm nasm mesa imake libpulse xorg-server-xvfb autoconf2.13 rust clang llvm cbindgen nodejs lld gawk perl findutils libotr ) options=(!emptydirs !makeflags !lto) source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz{,.asc} thunderbird.desktop vendor-prefs.js distribution.ini mozconfig.cfg metainfo.patch cbindgen-0.24.patch rustc_version-0.4.0.patch packed_simd_2-0.3.8.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 printf "%s" "$_google_api_key" >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=system export MOZBUILD_STATE_PATH="${srcdir}/mozbuild" ./mach configure ./mach build ./mach buildsymbols } package_thunderbird() { optdepends=( '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 ../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/$pkgname.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://ftp.mozilla.org/pub/mozilla.org/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=('a9ca311e3c55c8703aaecfe30f8a8040a16acc445530f7462baeaaf941f7221e60b66b0894ea0b3c0eb83ccc882706674cfa319ae93557405946ffffb1f6b5dc' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'c9e4966e135907f7ac3c669da9102de3e1cb90eb84e9d89a572037a2999f552ef9ceacfb031e386b27190449f820784ede8421915ac5dde4ccda3b178a9adff6' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '3526402ccae1f0428f2e45bae8d0b2cb909ac2698bc3508b692b827839ccb21203ce414206039776f6ce946fc53e636290b7870e9886284d5e9d1e8ad050aac9' '0b04788024e02bb70b0ffb7b1e0112ddfb191821e740f64abf44a1f1de6b663345c59120a13597ea5231d0adf0286739752e5a52b529f191fae4f52474f27af5' '317737e450a413839a7570de474c8be6089b5119a15c96c235079c4fe2bd73134eef7718a6e757b3e6a40d23e40c29c5e31890f2cab4799a02d9d6bbd8e71df3' '9b91fdd7f27106185f9b84debce5fcddd2c68829491f5e772b30d5e978a5fbe0b37f8fdd5e151a9b2db0a655893fe012f096dfae55d50c6bdef37ff9d298027a' '0e454a561323d68b22bc7fe48f4c03bce225549f6e208bd2977e4adc2f8ed783654e9cc340fdd20cb3fd4bc8fa9f9ae2a409e5f893b72cdefb71961e2b8eab9b' 'e87f4776dcb67afb2b06e5e6c72ec5454250608bf5a3194bbfb5f98a0a1af7e90a7fda8e15b61c7b6f918f4015429529acef14e16852f2bb55719086033657fd' '42a853381981ea17653e09fe59a97e6644e51eae53d44b623705a0c63e828f2a1a3d157d0ee45eac75a2e1e0d2eeb60879ad78d618b504a0c58e837cac328f55' '15b0b5225fcc97569694b43a549867409abcccba2432759c9350a8fe0b2886dc3abee1ba2e4e6d237f57967f00c36863ab043b7c98a0c1bcfcd98ab5e0deee42' '904826116a903d8a6e7787a4eb43adcd627630218eb72c22203a65ed39c769f47ae4c59de566624a2f2618e0184913135fa5a149d57991b7cf7051f360755395' '5369b59eb81824ebb12c90cec799318f5c5af9973dcbdc845423bbded06f3954bdbaa20d1032338fa64a088b7461efcf7c43861c095e1f39ba781c7064353b92' 'e134b723945fb841795e3efef8094b61e335e3562e2b00bad4f753e0a4ca30b36afaf2861dc7775eb651d2757b2bb1c919e3a2e2900dd0b4b92f5a58c868ed02' '44336cfd4f4c27379dd72fdf4e4cbbec32118a5ad30830fbdb51fd172ee0ce78528440ea2f0273de9053792e187d0c62e288ae0ce3810ac32e2aca14ffd4e9e3' '56e89bdb1628f6c08d1261db2d031281c0e3a789acdcfc104a053cebce030b68586955aeb7b49d4a37d0a1f2ab88b9345f6c424314792c3d3f5f26c6efd44e82' '3170488ad32c0559e321fd9f07f41f2b274ddabb0794c08eaabfd849656810471fbcface2ab11c8ca39b12f8bcb908d2eb6c92a9df17474d8c33ba1305fec714' 'ec9e5255071750eeaf53a913f4f3cf3d0c8b4a7e3fd4aa2d2c1e7472cb472e9131d7b8b0710185973ff823fa3ffc30ed64f9f9db8a22d758630668a447639d2d' '18fab34ceaab60c5d7d0737793f5d7443c5ee2f240ef99d7616f1ff0ab4f51c902af647b4cc4e4c479b0d49627a6fd8e362f0037cc18db470e53aec31bb8c17b' '720d80ec02891f1847f78a371378a1beb8530cc33e16a31db0f32bd81630ac839203927c1f09145d0f2991959ca42f58ecef75eb0bb8c5ac8a65b0700cac2952' 'a3c7bd48eacf2d87ddc8bf65323269426156b43f2c0ccb4a00e66db57c1e1f2f32887e3bc562448452ee1a022cf34416109b0d4ee491015c63f4ffb7d61cb10a' '26d0d454a56b923a06cd71fecf38d55f45c4316876f9da3380b3c014462ff143339458f6951e7b4acc84e673f4f236600e88c2a2681faf716bf7078b72010d99' '6aa701604b4e4d42f1bce1e87dd32a6dfbfd3f7f3189c616c74d0a732f06ea2521bfbaea9595533d382f43093ab8b2f9e0a40ca376d804934d1b65f0bd483a0b' 'c0a9a87bc69ee5dbf09b9767bc4e012b5873006ce6a0c70b3b966cb066ebc218a13fee5ae9ecce2426cea4044b3a7eed57090bf2de0b40a805c7ecfccbeea09e' 'd839952672b596aecda03db25206a47b9850fb4bdaa4256048a468d2a68b5d357c534cfa3faac4a11218827d1da349d8df69ae0515dfa7f746f81206aa410eb2' 'f7fc5c3312483a522946b25b497263220171395dbb87e957c685dac9ce4ba5baed24cde3543f223e48f6ed25fd787e8425152fc16fa7cc3ee649f5b6619776b5' '3a1e260df0ad3427e948f887f0f89a049f2421a5097eb98dce941e917b3c9814319eadad702fc171003183d5e215d753ea719d04f793c4832353b7e1dc29b9a5' '040e012b8885070af57c0f5f054319fb50bda4e229449ee55737951a4699875681c465b45aac1958f42c07abb9ce45ec3058f02f087e5fe41d9454b734c550aa' '7667a799aa4d99890014e568041872b32c7878ea20ba1424f0243e7a807ce7fbb603789d6833305272d39d638ee36feb3265e3fc13b5ec7709523803c208d9cb' 'c1d18b026f9bcbb77769db50eedf3ae263846ab3441283723c2cf7c574be2e9869d2f710887a12b90659822f1c51bf9aa3855e7e0e5fdb14bbf9df511dd0d586' '850607ea7b9f2fa33681d014629a9531c9f631ba14445afef075e67a8591062f03b9cb73bb848d328ab187fd6cce024ab6c39e2ed9a48de321749b268526d8b5' '2b35db1e0b8a274f882a4a99d7fc60bfa50f89570bf1c51fe43c9eaf0c0479c60508e305711c9a5acc1e353d226e93e1697dbbfa46ad8e6b7c491fe09d3875cd' '359a129d31d4376a423af28d4a958b4108e0b60edd6dafb9a61981d92dfbc7e1d9dba8423976f78d674b63745b8fedd249ddf606e5f24342925f9785a1cff9fc' 'dc940c934c24aa217f959590abe0b0b332239194d8cea874149d80757c014315138ecfac2e715086f33dc1d9ec265b4a89205375b0efb54c266b1fac3c5407dd' '532ccad8b2d5d3f0c507be38515e5b226cc8516608884b2d553477aec8608d6531e06c1a14d1586abc082d150dcdda09178d4cf4177b4a84a8d793cdf51e2e7d' '6a761fadf63ac5291f1b5101372a21faaef40c89d787173c03854b6b9fa615df61dd2974c63fede9a049856fad07803bd08166f9e0f7272ab9f7c0b3815a6bf1' '3c462703de21dad8f9d1702494ab5a7f9584e2962f5c6536600e14ac3403edb8fc81d077bec9289dd86cc78c8a7a5d5bca78d8bad92d45d01dbd642cbf540493' '841aba25c87e6f544770954359c7e7149c1d25e828ac3f556a22f38428fbd8b2f51bd3e0e82d046326d5232a2f9a0f346c58f6d859d3a5926efee91d0206e7fb' '4e6a02ee28d2e3937639f00ad630c200ebe96e94d6511bb58ac0b64463ba633377328f00a16c0e2702283906c2a993476aa3cfb86729a47be3fc4bb4af8c1c9e' 'c2147bfc1456482f67865ae5f2e8b2297c2ecec776586e4fc8e503a614ddc35e9d2fa76d5d929a1cd7acff43a3071097b58030d052e2f03f5eed4f52b92e74c9' '95d738775ac062f970d879ed93874ac2ad3491a9b396294364a6beedb7d14bd845898f67b714a7056dbaf1e5fd7f7d740dcf564f0e70f7bfcdbab7b57963ac68' 'a7164a9c9ed8c4fcbbbaf755ee9661c153144b01116b75fb54886814bf2197077dcdeb3ec47081455c9c7ffc0bb04134214bc730986f7f991cf0e6761fcc958f' '429fbdf1c32b0cbb2d4d52610e0b0d10b2632176be2f2674dcf84bbac0cbd3019ed96792e3c9e058577a05e7e4e61befd6ad6d4de92ce1088001f7b97d3369fa' '97f3ef86224c55a12ca7070860d681fbd3028c2e8a76091f2ce6f36f6bd460b31f1be02ba2b1f53955cb533c466523939670c345971ab68e02b500f7fcfc855c' '7a831c276490a0df438c1415c45f16218e20fb4e8036beb1e08c0ddd37bceeb6fbfb8645e0eaa8b7c923de38d9d915d3c3bde8d007c8fc84099d159d95751c4e' 'a736a88593b832b6b87090192f5e0e9ae059ab9956ac6da7340dbf2c65efd65549cde0fb21b486fc05c2d7ed9ebf39f66430d6baae19349edc28c66a3946edc6' '022343cb8dab35fc76675f5de72cc79ad400d705c29e50474502965f4b8819d9e387463fe914a8eaa147c34e57bac82c9576dcbbbe1469ff80fcebd4876030f5' '0432d23222b3dc8fb39a1b236e607662394908db82e2bb04a9258b4f16ed2faa832d2a04748084a4dfe9b9c2a3006b1a3b7dd185abc655562159591d621998b9' 'e1fb338ab25d229462948d7bc58cfb691bdfb5a24afed8bdaa6ce778d6466cf93ce75ebf589f9b2b8aafec5547bc7d08fcc793695cbe95ae89b66013475f2469' 'afe98a022a7313a2b0bb66ffd958d892e6176254256f08490483acb8099bc5eb4a07fd82d58786b4c08e9778f46285f4aa57c3481435ba5a940dfccf2730c7ee' 'cce27bbabb68d4f748412b6c9d4ab1601d6b23cf15770e82cb137f19877bbcba0dd280262ca675a8b07a6e480fc2ee00ccfc17ac07441cba74ec0dc7ca4663f0' 'd549b57fd06e1681f6cb0fd62f0fff368656b7fc01650d39a1c23beebfbf6ec938d042f74d0bd4454687834da027f757d49dd4dc27a27ae7b79f8433b4747e2d' '2dbf0f2fc9d96ad10a887cac0603e628c0ca1e5aacc8ac2beb14c711d065d4d601ca29a93fb560be34a4c58e49aed80cf113e243a4dd04cdf80541ecc673756d' '1d519470ae72ebaf9395a32db58837132cceef65c7c4e40d2fea9a7bef4779046a704c75e0efdabc7b1f6588cfb2d06c1db46234f6d827cd7d9fef2dc3c9c488' 'ef236e2787676a6f0f418604a3f00ea01a95bd066492bd33793425d660e6e49f77f4810ef13c1dc1bb9357fc6b1414af51d228c04ce4a94e477c136b26686312' 'ee5ca88e49b0a8d8f3e0c2baa99a59d89595237546b6f2d0d76cdf1a5ffba3316c8c55ca1e76b3f339b13d247b9ec37652aeba56b4a0f25e78082280fdeef14a' '7bc492493ce56d31c5e111d89456908a29446c3961a864434c0a58cad0583f06798ead68430194bda76d0aade2380e20a33ea119f7c6d04abb97ac4adb8d0a33' '54813217bbcc80f60a454918855a8567b78a0108a15e66ac64fe2b3f9b159a5ccda5165e2939e5ca196b3fe68b148b7240ec8820e2d2281bf6ba62431fa9831e' '03488c85aca9e8a81015862513d92f747612b8bbce27e7c9993f3c69d7b32ecf0c43684aa28f9772f089ae4f00fa273c6d7489f2dec41be131c390748e3b84b8' 'faa0d2c60811eb6025bdbeb868a10b46f01c570f1040ad56ff85170bd15104a5af280f00557813a325b51c3aac7e2dd5905aada8d3bf26d0d7feb11a6e7ab621' 'fe4e4fe3af381efea820a8fbe49cdbb9eee261a3a47344af6cdb26d541ed822d6039458a70675d753200abf08cfdfd05708bd4804ac661fdc7a280fb1432e227' 'dd92c12411469f572e6a993c7a7ab0bfb9923faf25e3f12084374dcd81194811b69646b5b402c96a95471fde064051b563ef2edea44ba18765d1e9d37477d789' 'dbba401f0c686c30f0f9f0bc4c969d628bb1e74772abdf94d72287d1bf3384f13199c131c11f124e143612ac0b075437fa081d8d3707130696d9ad671b6c45c8' '844846ad577e43b15be25115e03c623342121cd6f32f3c23ca0505dc1902ad9643af6a78386399c38febacb848add8f700f890b6ed4374d3dbab0a19e12c4ce5' 'eaab3069a1edaa42160db419c81c5756537adb2cc1d05e80e1a2049b037feee83b9e8e585b07ed8a6742f8a1c39cee21d5c026409e5158fb604d455d3459f1d5' 'c175a82d809fc058e82dc237efe8e08bcdb739be4ce6cf2c19035833ff3664cda7cacc24d173e76ffcfdf4406433cf474a2e212c73a36a0767180686c365f938' 'a5a8ea3cb6dc61b309e394345c23e256542e370e16f2acfb724b66c06ecbb7f7038c710f3257c9335abf9325feed08612b01dc1052c0ec42a432884bc399df0a' '3d12e086151cf7680dcf9fdb417431eff36dc9b8de7ecb876d9d726c8ed8829831d7b62021ba67e55c2952acab8a161e62a22cfadbe026b1cfbfea715c4efe58' '98243637a26161cc857ccfbabc39a58d31962b8cf695f000fda58328b106a5850ccab55b9f5b59794f5c23bd529c987ad65e3d9850095d50120a374fbfdf6b44') # vim:set sw=2 et: