# 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.3.1 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) 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=none 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=('8a127958b35c1c14b8acaa3ac256f8a3a7e9bde89fc810299ae4036c80c41d0c0d45c85ed47099d6ec37e2774a6bdeefe0de6b0b4b8bceca8206c7e54c3f93c1' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'c9e4966e135907f7ac3c669da9102de3e1cb90eb84e9d89a572037a2999f552ef9ceacfb031e386b27190449f820784ede8421915ac5dde4ccda3b178a9adff6' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '3526402ccae1f0428f2e45bae8d0b2cb909ac2698bc3508b692b827839ccb21203ce414206039776f6ce946fc53e636290b7870e9886284d5e9d1e8ad050aac9' '36d9662fc94cbf7dcf371adc13a9cda679bc75df961d86de019d3c8ebb0be3062d5ef762d175fab58696db74758100a65de45d7832e0e2bd4e15c901f72d8349' '5226a93bc94ec69de028138cb8550db20838eec5ccaee94f14297346195b45c0a6534dca75474d0719380ac5462d480d9e5a6997ce017ff7430eeb8ab4dcc83f' '13ded198c187540ea8255e69bae5467108deec866b6681caa2cab8c11fbe5c8cd01d6d3e0e8599291ccd160756d2bb646e8a76874736239cd161f4764aaf82ab' '1856fe6d8aec0f949bff83595d7144cbfd23f12287c2d77a947ff895421432a1399206279938d72e47708628a88b24d737bd387593a65c24f012949c1cd3b274' '0daa8d2d9168558f477751059a9cae3392122837d2e444329e2c68167a6fced1e2d51a2a208ec122dcdb0b1cb6c29fdae74b66c86099e04e60cb783a115a5e06' '81a3f8b08944df7b514f082c3d3250a167c3a97f2081953a8a97a250c27fdbf2249c49820cd308108b339d54fca85be06104245dc22a8afe162210adbcf1528a' 'f8019a3ab8b65e989f8ec10b114c61213e111136fb6e34f1ea0f15a87a5b943744323ee63fe4dc599cd0ee07d99033556b9c476fb25af7cd5ae9d9a239195ce7' '2bb9ca1368d59bc6885f5b8e791160fdad6b1c669744d1affd470c31c16868acc9ae005e897a18e9afdddfca6ee7fd18ebc3569cfb7cf6422b988c972de08418' 'c70a9d0492ff5b2d9ea4b0a9391d36ec7f7d26eb0f289c8562e58e13a6451103fcc5ad77139343a3ddd0b82a8d2eb970cbf79fbdf84d41dd2f4def07fb48a0d8' '3fb74623dc7dcd123a4adf016d63a3870a37d2806506b50a091deb86ea5863d3d971e5e522b84a820fafc937e1e9583100c9c376b9096a1a0a310ce80d63a043' 'a8d0bc53e705f1f142b28685054dd59176466f4575a42cbabe31809158c7de0fd374f9b5fb608731bda47836c0d991edd2ec2729655ec338357a983f6b95f9d1' '9d42fbafc61eea61cd24c43d81f4fde92ea1fba99f7afc02ed3e79bdf44f50d4d8bf039a5f015ab06eac29bcb9c78bd2162606dd503359b9160e3fdf80ce561c' 'fdfb2d84543256e88b69d80b954224294f14a447be787509c793b593b56f7b9d2b794274dfb7c2a0e407033d846e1b905bbbb9ee9aa3bbadebfbadef23b66881' '53cf5ff500bfe65376d42d158febed685d079f0344224dd61b802fdac98a31604ddb6ae59d826211ca70626a0494e75c0974a89e37e9587162578ccc9521dc7d' 'ba28ef46493ac13c19ffed7810fc2e41f7d3ba557610ab727547798689bf3f368532bebb9c35e0b6e53392adddfd3603ebc1405f07e99d2ed7a843f14166febb' 'd4fa6218f660057c6bb3f0519c17f2d6a9e5eb5ce3193e34fff67842d79dd685a259377e95e4502c18f42656ffb46d665a13db4d80fcfbc67d4947d3062344ab' 'a3cdbabd84fbad192261ebef52fdf9b29d7f2ab2a918e9ed66a96d3bac74970411800c82aad0a7b02ae28246890372215da21c4717ebff468f8d6049ba613e56' '968eb1188b27d1619bd8669539b0d8894ab2d28be931b65baa279bab08c49c8212e0c7d0d29f54ee3f8110fbee9ccaa89b5dd68ef27469c2b557e6720561cd6b' '06e5adf92cce38a17c070219c648db91b339ee6e3cd280c2577f4c57c9f1f0b2779accaecd4978ffe1034425054a0114921ec4f25a1f4d31dc358044e54b0958' '24c2faafc254ca262f644648f8410860a6fd66d20ce1a87410dd96190a3e6e1a31d0949f65072a44b215b5f0a1078fa635fae8c8c34303a1504feb9625ce2679' '0c9a8f2d340b0a6d5627e3c615520d9f5896f2a7e867948f58a8266297e17b4b528d796077f672ff1f1bab90d780b71ddf63c02979cb88c1fc17caeece5174fc' '7a08f5a3c02929fe19b7a295deaec2cdf7e1577aa1865462eb630eb32903630a43e1b74f36414b8fd17fd20c367abd2be1a57618ae74a8e0981b4a8908d9eb8b' '050d1db6d2462fdc25115fda2242b253ee3e0cd68eadb31c849b414b895984c7aa251ae8dc34a5e5454a3e612f928d78dd24fac97aa7dc0169a622e0f6183745' '6608ae414b51a40bccfe94d2bd42fba443f238eabc1da7377fb61e478d49abda288bbf45d8b51d39e30629ae9cd859c3ca89d5177f9bee30218d07fc08bea158' '5a2f6eff60a68c1a737cc19719eb9e04df119e77bd4d2e4403916eaf9ab8de82d745fc95add84e393568e37de4698c8b06aeba96b01a2916db0f5c2822eede27' '48094d897c953bd91bc5057e6aaec1bd8dd95a14fc8848893ca1eece2cd882def107e882a4a0992de0dedb896f8e801dcfb9609f61984bab8b1d192a97e56e81' 'a026582c949f88477db3becb5eb8d482e9b13c0ec4c2c395dd38809c183b9cab8dfda43876871ab0ccba98357193bba7bc549f8c51b838017bbbdf0425018a32' '718e6ae5207781f3f89d7dd8333b550146c896d7abc2c9a46087fb73a5b0c8a8f245e7ec6a11b0cfa4b31923467a581babe33dd464a88bf0fc094de2406c5a2b' 'ea1801476940bcd8943ad05cdf598af15faa5e2dd09972bc657c631ec8890c20849a7bf4b0f554ae792104903782ee496ecc9340130598767ea5c3bfd0e904e5' '053079901e58b6f27f3e66b06917aeadabe07207be153ece862cee146bf001d9e4bc3d7f0cefe5abf8b461119282c35b4aa9c8ffa9fe49393c59a3ea190eed7c' 'ba1254c7c699480466da145497b88bf927978477cb75f380e1efee3530239c1d156645187828ab03284dbcc05bc7e67f465aead93470604c3784c131e0692252' '73e170005cb995bc6b7d0708a7aa3d308efb2916bbeb8e7f19bb713a1da06786e87e36624b5c45a8d5e7a867f61c8fb3869b74390a43215a53334be566eb3b7a' 'f91ac9c58bb1c7ff235de8a61d61194b2ef748a36309aa84fd94856bfb8f4ff5beff6bd11c5f35c32f65dc07095c59d3eb9581e25174e761ee8b5ff3e0ca0d9f' '0cbc8c96f0b67a12dbea25d42be67a69bcc95b8efacb1d3b3e23d1d7547265a8fc991ae5feda8cc0c05092d8a0cadf3b09c2b326b5eb32b032517665c2226bc3' '57afe68c003301c56de7263bb124c6fd56fc2086fed24a39ad433b25617f46972b857045b9004965d02550f570d1314b839d251b2a3a36cafedcbdbb160683b9' '6160f957a51083e0732fdc1c72f8f25bbdd8a2d656ac0ed9138cd9f4563ff6cea0e06701ab00a3fec21e29b8d9fa6c9cabc2f9e45f67c5d1cb8707b478b2012e' '6201efcf1586da86efa77aa9a23d541d6c0d1b130f53aad7ef7a2daa0f7e11ae37bde797670bc26354ca42134ec8a305016d58759c9afe7a14952c76a6dff5d3' 'ef2fe4cf00ed31746c0cb33a4f1fea077f2acc78666a66c4204791a5495d2c0c3ddc9670172da19cff7c8744c8fe7573202b322c07251eca9f6df2bfd1ca6af6' '073f86abb3251a16ce6b0a36659159059f426873223a1f088f629e584421207a5fb9dddbc93e18e16d7ebb87cab3668e60e61b3d6085de9f88562932af4efd7f' '20ae6f87eca436520b34514c244d468f7e176f93b8033f48e9e5c10a5fd651ad7fafb27532ca14fa94eaf94e5d6d7ba7f2fb67cf88a9eda045929ffd0aa3650e' '65cf96922ca51c814df53ee48620c8b3b1b55606f23d5fd81331b624eefde802dcdced795deebae0fe04f897c5d352ac557de4cf32778e7acdbf736a128952bc' 'de840b274fd52a10b9b2d62942b111ab67f7fb248437bc8d9802aca3533cf2d2aa6b8b9aee90f8c7520f4819bc90b8ea832b720ca34e58944d493623a75bd1f0' '724d8e3dca7dd9aed715bdadfe7933d0d2fe68b2bad2ae06280021e366d258a4b1082a02c4063c3d9bd3f2934e14d36d2fe53f87aeda8362a7d63820b24e0b5e' '6b32ff0265a927f7201ac46d41ccca0b043ed3e8c1b39541ff7908541ef02fb19f887a666be120dd3ec87f3c849640ea321e6d60667dc8f401356c1f24033044' '5f67e0f6a8221b48ec3c44ca920a351d28a0e359852948063cfbea531746e581eac7a558fc5a520737938083c1cbb4556d8a86770213dd02f578af2365af7e56' 'a1b0539c57f745ab127b13c0d7dd736864273a72f4a492054a7794cb10dae7b0c102b7f09d6ce98dce4a1adaee2759dc5a1c6cdffce8535fda2152f4877e713d' 'd0ecc324769051beec22efbf39146aa5d5b8e3ed55318d365216986a8146da28ce24ec0100eb598361ec4a541d7b52882f422bfcac0fcee585886c12d5513dca' '2d53b2d41bd27238a200f698fca808ed87ba066ee9a5b0494a3a98dfd3224a9f2b150dd38249027f4f67c9ea14c4b0f35df4cc1424675a5ac604328ea61657cc' '2b6c78217043d6c8d5aff55e87ac5666eaff0e11e6c9eabb5abbd1f4c1d85dac532d5e3b946008d2c170b56e790bb05818da632e39f479d577f77fa15bfb6878' 'e629d349fe34403ee3b4350e736a308aff7ed342b6334facc95e0bd7279ab9b49e44cc91fa4fcfaa0f6a1f3ded7dfe5ee3a1a96a811de9d33e26679c5798eb8e' '266754ace42627091e1f21cd2c062680ed7f1bcc98d8256acd34610637c4bf6e9c4f05cbbb967879653f6631193b709ccd1a8404c71531b33740f25f545d6d7f' '617595a0cbae1fc33ff2303b00727192b50f47e3215feba634c6c349294f5b33f57d23b946307b12ef9ec2ba5f4be02184c69a74512d7654805efdc33fe44eeb' '06dc363abf1189b4273f8213da5357c8ec134475eb170e943467966bef11efca4e6423ee0d744f8f7b08fd1905705f9847ecde3e141267b56cc8c26907821fec' '6b892e167e62de496cb40954897295d5f5171e0717423f9c0947ac09450bdca73733daf43dfe1f6e2d320ba7fa705f7ae96d2607f5c0f25621790b46e6833233' '4495da421836c9699a013ff6ce258e09257385eb01d2c8afeceb347c87d2309b9a4e43beceec015162b1b46dbf669cad29fd47eb030112d02c99f874d54393ea' '6b1a49972ce4b35f2429863ec95ec5ea331706b20598c9f6929aad3024be3aeb18941c3b4c2295256a2a6ff78829b78125dbddf34ea51ea0e8f026eb58e253f9' '08fd8583e721b99e04bdce5bb34ceb1537e8d1441a8e8ad6725099861bd6f09a1e38af089df08c8d4bbc2e99a096fb411404ed176163be651c6545c6b45ff806' 'dfca5be2cbfc4077ff7a547e16b1a3c3f09784cda64a78e69decee05c09cc25d88685d7c87369ddeb273f1e8b407c0a586851d495133d4ade87b4ce86a1a3e82' 'f05efe8a7f774779523310cdd98f7511a83560396510eabc63cc9de486551a1b2db4d14178e2031cc9dcf0f39545ec1cc2cabb24959d82d64ff64d492d260451' '3a6bb561d52bb4335aa19233b727f89189a75652d886e99c84b971955f5b8e07d76d7347cb5cb18a6121465c47c2ec36654ad8ab1ea5e0001051ff155c8ef75d' 'd4f739d81f9393aae98cc4f9ca0b419ce191a6e405772c63d5d7c201d0b70370b4c380457a877feef7c672814a70a0a5ca924cff3d250d3ebf4393bdf5255ce4' '482f55dea6a4642c9a664bea35f084a3a705c13f14bfdaa775e98c458cd82d49464bfd43eb9faf9657e947dc6b2650f0e194732e0530d1db24decc07feba680c' '98b77d42a496171c055068e4cbbf803aaab1df3d83f04f6cb0948eb52b45f72d284df99d370d1d96f876022b7dc57ff8ebb8efdc3755f968bf42c27ee9af346f' '058e0303d255b114fac7db6ba7aa8ddba4b3525bee72018b438c9d8ca33d2b48562e4050b538a521f430ba5056ba00a4a437aa7397fa7ef28ee35db3da6f9810') # vim:set sw=2 et: