# 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=91.8.0 pkgrel=2 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 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) 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 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 RUSTFLAGS="-Cdebuginfo=0" } 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_USE_SYSTEM_PYTHON=1 ./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=('147c7ad68b0a32cc0fd4405935836af1fa77bbce6a1e367b51ef9871e7fc2a8fe908a1d200be34326f4f339d272e62f619b75680201fe82d301ddd02e23824d5' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' '328422adac0cfe6af4ecdcd864004b7ada8f8171aa954fecc23a7e883e90a9bb0848372faa1100440dc754922f965e1e7b98c185aa88df190bff1051d2146c85' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '95bc1cc1b5c57fe0480380dbdb492ef46fc6cb16c7f80c457cb121e5dcac0b573f5d936f57436153402ddc3f7afc70de25c3f36f19ef517497573e150b61f85b' '209e45c161567e53b258dc715f16d8d4e3580ceba1be9d5e99cf5d05190e849884942bf0db91c4bcd1f4e883fcea03a4eb3da3022dd09c88282dd6fc422174a0' '85f67ad13bdfde1a8c1420c877c1ae5626c11f84e3050c3541d516c4c98c74d02dbd318a1f99e6754175565528080c0b8638a87f14e453f952095c97be1a1ae6' '28cc190fb20754aeb15080fb30f942753c96e7d6db3d3202a56dc5be56bcfd144855c8e2a51aa76039b59454ed46608c166a7372267dae818f4c426fd5e9cc6b' '26eea7ad31d509f329696e851e98750deaa6b181d8690af4b496213018af761db52dbeaad107094ba24e876555e93b9b056b97b2594cbfd1b0670cc3c1c5a559' '3de805556b0a6adeece0a985b333d131f51c6030bdc00dde7857fabdb28ae8796c3248c5f1ec5460b2a4f6240db2496cf716b6595235db894d855ca6aaa9cd00' 'fa0cb42e7d9e4638e023de6a48a9e95c94304e6c124ca48503c8c2d5720ca4e3d6e8eb3bc3ad209bf4e3bc720a9fb50ae9c35ffca3de4c02d2578bd593a3bd07' 'b7faf048bcaa8230ade82cbb6b92097b727963ed5236b7d9c820639b09c616f214ec7f4eddc0ed58b1b30f1002af073a621f3c30b928324dac2817b30a506ca2' '43b65f4d4e97c852bb52818df11e58843502a2ec6d5486c9392993ca3f93632b9638dfefc7af0ed701551156e1a569a3869c1e5de33a37c89544a090098cda87' '83851c82f6688d41abb048e8bb2b478cde284207883983695a5b5f82a87e7c0b871ec1273e8f8f8724954ed14004a521f0b6530684a3cefa94839a609017e6d0' '726f44000fa27c02dc030bc460f6d54db32ba51c2cb3734d08821db02de53c6a1b3636a42af1e2fdf5da5185aae12f4e403581cbeba1996349d7059adf51f1da' '49250b25927b681caf751335ad83187fb6b951a8bdb2506cc62efed5508b61a9edc0fc0a3f68a1c53c5088f96b3dc161e74877a900221653e1e94e1dfefadc5d' '0980f9c3e3da3441c9e9cf3f752ae2bcf04f17646d62f97a925c956689dc09c1d8d232d00a4624392daa52f4ccaf7c39414c3d04a02fd3908c7d2f33053c0d1f' 'd8dd82504ebf59eb78a0806caee1f41f892e48bb11d809b69a2db4cc11fc2b1aa20e999162ac837296f047ba573d7c534067c79f2d75ad0b26065b7f9745aaae' 'b58f571a15ad8241e4d2636f72ac069f5977ce3ea566b8f6db03921e1a550691a0583094b9420ad1738831665c4ff832d9f521dbc8fd72bf311c233cfb0440b3' '9a745c39a8344534918a71e105c0ee93258af6c38f184eca77ac5ac146d627dad35d32a7ad765d445c549b73e9211238a73784e9d405cf88b812c636a6db2854' '15490f30abdf75740b4b571e42a37d83c0ea176ae44752b9a130d7cd4c56eba74d7daa0cb887fd94be6b07fac812fd41e33b56b9ad9b2f430d272d28a360abf9' 'b0797cd8b1ed968ecc0f56545500bc69acd495b970fa91422b8e2ed1b759d8a92b9ae8de93ae04bb3c457e46beaecd5446ba02554336243ae84dfd45fe0038e0' '82ab5f85fe4858b31da052f38b0e5450581e016314da9d144ffa82a50508d549deba7ed18d044ced903190290531dc68bbc892cef02aefa6015ebce7efa6c8db' 'e601e51e285f13e042769bd1783ef0ea4bbf4bc98701a5965d1781e9b86e979cc0df3f49930f1239a97004681c39743ee1498a30fc53ce28dd9154bf333bc7fb' 'af14937b85a34d597ae11b2626280650f75cba26b94dda23e143d94c4e0fa52bc452fa156d6f04963f37ca4459bf6011b5a3b8aa72a1c0dcc204cacc3484fc85' '057a3bd49bb50eeb86ac14839857029065fcd100ab087b9a247ef8033b895e4193c6a465fd0f8ebac42e5618f083367803e698c10998464a3a2e61059f263257' 'fa3464d240184bff5937c52b230b4af6b9343a281a9a8d43927bbb31c935416ca7b996ad34615987eb89d8c9bfd1342b1cc8623242b73c40c64d3ef8a4c2e4c8' '5cf99613fc798b12046c6c1326ed4d67ef1e11ffacdb27f80bee8da7e7ddac034ed6a7c02e387b8fbe7cc5f0755b5081818d50bd69f34fc9adab923bed499066' '298b4441e8d262531763391d857d7de2f6f327b4ac06775783d53019d7512dd16f35655f7f4e565e405fe0e4edd91a9ed60c4126f72b2097584a8ff78504cd5d' '2a19b357c916c805a41fe5846551bde08a463a8aafc5669d2f41abbbe9d5c4d3332a0a3b08f7aa1f204217935da1cf24eacca1486531b73c03a838bd14571e3b' 'd4bfd6b0939ef8e2220cc45983d43b7afa14551a644a6de7f87b4a53b7f20060aff6476949ad4e47842e036eea30ad3118582b66c432752d74edb3ba1badec9c' 'd516404feeda698def0a70db061e4340622ff2bd5285cdb9ca3bc264e238619b31af50b8767fde8a86fbe74f223b7bd99a50a154094864784f0e57b25d2fbaf4' 'f47dd956d599cff3cca9095b405dd9b8876560b93a90c883fe35dcd840e07f0bfb76ecf28f0451abf694bc06e787e807393357159e912c750cad59178075db8c' '460cbe5bb1617f7d2be22aa10cb7f592691700bec47756461c82f22d3789b3a1ef42a24d5ea391bf9242d6489ca25d1c6515b91f629b758a50e9166c8d4bd54b' '8e25324d7fa9244cd5b860cc94291f9b0b57e21b3a41f2b15cdaeabb35e2fba9e1ce4896ccc8cf31e512b893a6dc8e9733a67fac0fb07091a2d3d29d6117e2fb' 'dc69edd053e4d0d8aed61ad6d92c6ab83b3001be5f43ef4a85e9974f3297587ee5c252372c3b08cfd26b70987391037789457906f8715705cc45662ea5f48b1f' 'c6dfd8ea989212de68c90f27b14e886d9f098f37a552dab2f03a4a5386e2963c545c83c570bfb027fba824f8fc427ca0add063120b05b6e05c45f899ff2af216' '37d0ee737637fc270b7729eda98324a25b92c3849e61ed33f7ada88ac91b9228942b7b91c7db882193798c1a54b716f9b8da82bc2600be3f755ca677a52f7022' '86ed9b15f311b747c0673fa5776486c10ac789da5bdf1a970dd2edc70452b8da5f693b361e87825b77b012fe5286bf2de84fe531f33e6448da9a8db7e455af42' '84d6a450267952fe8d17a26365d5539cdc5d7c29a1d7d92fbeb3b063c404fcf15ee529a0514304307c828d29f174a3464013641a4a3d86c6743099215367b7d5' '33f8c9bc1b32aa2091d522bf7d16f9cb78265716e94b2de696380f07318be381ef74ead362f77dc029e1e48369f68eef8596b29e5a72771a8acc13205338c1f8' '7dd5086a4e665423176b94bd246c2d52ab17b5c744d878e629f847ec5e7c13342ceb8ad3328bb4c83d4f1c8ac50c161915b05298b6c9a2057d7c240f2d6ed2ae' 'cc94d9b5d655ea7139b5c6650e4661b5d3423e4e657bbc0858a0e005b232d48b76662faee5898c71dd00152eb7292caaa677f552176010e83cad9f0099fb7e92' 'd6d843a87b7883ae9d2f9edd10770bba2ecc326c3418925c364654e605a3e22ffe7e3410b6b130cb734b4547ad57a965956e70261c10348aed57bbccfa14852c' 'af148af6d77dccc7111cf84093c4d3c876d3ff597cf1e91eaf35ecfb21fd33e7eb7cf2a30b50655a636b15e651ea6d18e6d0eac6e90df15ba4ebb398c807c76d' 'ed1155fd22a92ad1c1f06f13cfe6f853bd18b7b6a1897f100f32d96f91d9463e331cd7dc74af7e2aa57a8139740ecc2c122dae7f221e44a5dd4341d30e5e9364' 'b6db1edb5b518985705ecbeeeb6b5720c11780bd9b7ce2b2da4078fc339afe818715f20b1dfa246b29fdb8b129115d1af100feca0ceeb7815b841b042752dfff' 'a2dac86c96469c3a4d675d8017c67364bdc8fa88d94910a90a663eb425a7476db5b89c307400d64d0092dd9fde0ba9900b3948c036ce4be01d9ca90f4bf8aa43' 'c57d1de37b7df131a7ca47798f9a152d90bc3a0e940f3d522d4522ec901000ec4016960819d1d77d059ded8057110d9721349cdac30665b99a5a06c5aeca4095' 'e485cad56e326c8dd8121366f7cda59e7904ae4c269318ec86973a31e0e111331ab082f42afb8298bf6825215bb7b6fe1a6374601859599a992f3913172ccc94' '669f1be2d608e899ed0bfd1c8e5764847baeb8c061523de4d2a648d3ae03e8c528bb69ecdb0fa59c527ae64eda266040d5c30637296c234c3378ceb1aaf39662' '1f3a3dabbe9937b19ff46e14553829d3605f05d9466156a7e6f26f0813609e534a2b5b80de7529e3bca66a22941d18d5cf6837e95350891f1276727219d07e1d' 'd93db38a8f4a435e609f46743c99b8eff760714e1daff365620be059b8a61fca53479b5e2155690bff7a343d86d2adbe308e1c6e818670b18e00a2f97a79257e' '0b7df068486121555a5f9fd08c229322fdb889390d61138b1050b9d1c4c916683684d82187f8c7b0e5c5d63bcc82cba0b9597b81dd1406d1f19e31aa8876bf7e' 'a5f4fd48aae5719a38ae3a715b93146c184a50d7f5dd6a4f44db410c5b0b1464dd2819d5550c3e642950de32f4536b48fd3a2a76a4dfed8c9880be44ce6e2d15' '077c67f7ab72e8dc01038b14a96361ccf6dae8027f80079b63c9c7b2e146f31873754381106d89fd1b1034aa2a779cafd7e5fea752d603269fc6e14548b4b18f' '9afd2a905473e78738814f19e12f3bb565ea8bfc0a4b3ec054b11c6cebf9e0fba996345381e0b0f66ea2a96f1f31dfdf8a5fc2dc6add82bbb03809c0f2e977f2' '7dd70b85c4e1c05aaede45b4c9d9e665d9715bd8d48936ca687e4b4b6adb4549fd656e48f0a70a2c0697342c4c235d5488772aa271f032a5e6da75147cde881c' '96cfc5721c427861e1bacd80b0a3408fe88fe21fe8a3f9411b28e908b4df170faaad52c22fe0588e38c31acf685068a921d569318b2b1d5257dba2c753698e73' '3e5fe7bc5215e5432b9e62c130ff59f87c3ea79a6bcf337448d11bc1b41530d8046badd34e296f8f8531a9676fe642ef521820d1bd88ace0a693bd5e395c956f' '02401e05f9a4a63d80f2667325beeb46e6d91fd027665908160baadea5ef1bd057436035d759636e6a420874e8b9a986f1d325ec546d87c92e51cd890c5bc7ad' '216954b928d041ea1641e596138a2801fbe17ec26cef08b41f54a89915943d722cb24c626aa4ae1dc5a7cb4bac887394c03790a9cc4aa6989a876538a55330bb' 'f20be53c19b00984d44bb3ae0636706b7f0f00567230a81f51904a8d5bff134a9b4fe92c2a100e93d9e9d36d639a3cba9d168778bb3394db2925844c18ce6950' 'de4107b5f69634b33bc807aba3a9a477580e7b1a19b159fb128b27152d030af342f895e3f88d7e7301e45af51b72bc11933805bce2cb47324f75a45b98447787' 'eee86653547672465b561f9f1ce9c6bde733e9db05cebb5230471a0a016a7c5c389adf67f66c6312def5abac0c0551820756f0f49448bee0853aeb21c5dc5f27' '02642d349dd7abd54c6462c32db381777f863077de102e35d7b9a96f33b2447e83237592bff7ab7ddd8486714477fc144532887f0e25bde8a2d81bec5f4b2948' '3c0bbef2af7330e7ee760c22cb2d90f8adb1ba522309ab946745f5ecd734bf094633b943367c5d5235021d6bc000e5569df8e41380f582f7df8500b9eec40fa5') # vim:set sw=2 et: