# 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 # - revert change for clang that breaks gcc build on ARM buildarch=12 highmem=3 pkgbase=thunderbird pkgname=(thunderbird) pkgver=78.9.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 mime-types dbus libdbus-1.so dbus-glib alsa-lib nss hunspell sqlite ttf-font libvpx libvpx.so zlib bzip2 botan libwebp libevent libjpeg-turbo libffi 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 ) optdepends=( 'libotr: OTR support for active one-to-one chats' ) makedepends=( unzip zip diffutils python python-setuptools yasm nasm mesa imake libpulse inetutils xorg-server-xvfb autoconf2.13 rust clang llvm gtk2 cbindgen nodejs gawk perl findutils libotr ) options=(!emptydirs !makeflags) 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 configure-fix-passing-system-bzip2-ldflags.patch thunderbird-78.5-rust-1.48.patch arm.patch Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch) validpgpkeys=(14F26682D0916CDD81E37B6D61B7B526D98F0353) # 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="-j2" CFLAGS=`echo $CFLAGS | sed -e 's/vfpv3-d16/neon/'` CXXFLAGS="$CFLAGS" 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 ./mach configure ./mach build ./mach buildsymbols } package_thunderbird() { optdepends=('libcanberra: sound support') 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" 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=( 'ar "Arabic"' 'ast "Asturian"' 'be "Belarusian"' 'bg "Bulgarian"' 'br "Breton"' 'ca "Catalan"' '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"' 'ko "Korean"' 'lt "Lithuanian"' 'nb-NO "Norwegian (Bokmål)"' 'nl "Dutch"' 'nn-NO "Norwegian (Nynorsk)"' 'pl "Polish"' 'pt-BR "Portuguese (Brazilian)"' 'pt-PT "Portuguese (Portugal)"' 'rm "Romansh"' 'ro "Romanian"' 'ru "Russian"' 'si "Sinhala"' 'sk "Slovak"' 'sl "Slovenian"' 'sq "Albanian"' 'sr "Serbian"' 'sv-SE "Swedish"' 'tr "Turkish"' 'uk "Ukrainian"' '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=('fa27a327ce10a0c16877ac02338aace257f60f69af40d12ae5bb2055f6536db9ba45995765ac0eaa1aea2fa2b353ac9dc6eb06fcdf6cb4ae6fafcd65fe5970c6' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' '6048bce2bae535007422854affa3cc2cc588e6029ea3083aa4817795beb25dc6e2726df082ed0fe9664f328d68b2f60e2619b87c359c99e73c9ace3dce0f3176' 'e3ed2708b8354015cb3d2c81048d1ce4932d1effbe2b40efa7cf9b45c1b923b9fd708645e2f8aa0136a485a3f7ce6b396b85721aaf535a4a764fd5005fb7e222' 'bbb8b0e7b9c67372eb22e1d6b6b5758fe504ded84c40a076d4a064374a1bf34ac12d5b514b328ac9ca984d976b9e0fbde81e68a66bec915c997d6be0c0917584' 'a9d10d6c8bbdd3df4c688e907f08a33cf376d955da0e5531b3cef0638e17b7d9058eae8e61f51fc35292c582f238cec02ebc8698416e34730f545d667875f16f' '8dc474a1e9c3cf54bc878723844d798b5aaf8f2d768986a8761d9767e6c67b95b33731b2e84931d144d6300ac2cdc239754ce2b12c340521318c0d4671c6ef85' '9e1349f2544ffd66d05729aa20b5ce1fbf7b7808eb2969668c9544988ff101d94701b186d14e72d1fd28d96394eb5ddcc0ae81ebe26a10d146a05c50bfc77199' '58c58b940a9fbfea082b2d68f225719a34f14060529d4483decf87ea49ef3b566dc451563317e47ec0f714267c0d72223fba450da26384adae6afb0beeac6714' 'd4d9aa0e5bdc16a629aea43f759c07e70ceea3bf65b9eceffbbe902f47eead80ac61f4b1a020b65084e2faf147185f66d50fc648310fd42c6f95bacb8bea3418' 'd1ba3473b6955c03b0bc49fe9906eea25cf72858486c05287aa5644efe07a5817d0588da73e78d69de70009f9e1506462ea3d67d1baee668ca22ac1dce2e01c7' 'e67a4fedd015d6d425465045058c0ee2b7caa9b3c2c3cfd606121905e4bfd55e794eae8729ddb38bf6c7a61f0ee496b84da56296c08df64743f4a69299c76fc6' '38279017129f79d1bdb99aca34ff68c37ea5ef2c43add0d590ea51001c98edb9ca59399b5f005ee6528db7dd9e99d78642b921743e5aa5751981978beeaa0724' '6fe4d4ff9db54c3c90263ca40074b89b106b7cd4966db436dd61c6ab8a3b06c30f396fb800a705ccd8d15e7368cb3dc4a54877cdea059e1896012f61f8537b6b' '90b2640fb22062cb2311ea7125ae4033056a21b6c1cbd7ba42df0125d2a07ff6dee897afa62434c67e568ee30b248d848a9226c9e4ba9bb89bb92488ccb2c7b4' '485f95d4726f5326533fafad685f68590d2de8ae1de0b4f5464f41d827bca7860cf3397b60523b9d90011526e2622bfc1b1b29d995f111b0071f96524e658bf2' '0edcbe0f2669eb52a1d72978c37203caf6496e096f97cdf96227be7ef130fb238fcbb83736f7454beedf671682d61f389cb576a3e4a46128eb608a4c0161bb40' '29eabbc71da539d15286a523f3aef38f7e83b6f63d5bd2094447bf996a355fcf24f67107237526815797fd9343bd5379fc645f970838fbb79fc5fdae53d872e0' '4ed98b6bcd477bf34697eefedf8fec773f54fbafe66498ee59aa798a3395cf41419c24f6e85f2564b84e702442dd32fbde0f7c2bbdd595ffeaf32de1c785abdc' '8d4867e073e6e7f169bc1b752e788c1bde63bf518807a3df24705e2b41a7a27a7162b7c45e1998cca90b54066d148efb63802e8073bf57530eaf77e1b85cc885' '76b917c8177dd456532e3ec4004d364bdaf93f4dc715f4067d8f80df5b6ed4458f6870c7aea79324596b3a71820d1a0e02287d18b64a0f9540d8356783db1084' '58e9bdb8d362732c7f2a8bd3a19ba47faf61f4629522dfa1b11e711a0247aa699421d522ab39ab6787a87cbfc7e201a94daf1c7d62832c3547ae7ad8a0118a54' '1c0919e050075709c9a1d8f8235377438af8f5b89cc3bb67be6dfd88505c19ebca1162460199514b5d89ae5839e8b06f7714a7efef45a2eb638ab51f7f748362' '10fa8aa47677ae500c8509f94c6c13e242bd9e1eb95babc06e74ced4162cde46235b2f5dc3233e310e8f6c64e4ef9d90afd6ef274f85a9dfbeb9ed4b84e27ef5' '26c7f5e5681b2e775b94278a1a927d2b297da6c797f971c9f87e5c20c481df71f4a796157a80f04d37ad6ce0d36824df92be66a2148b2fcd4767c20273398a09' 'b30238989a5ee923fc30cbc6c06d87f255898d2df62747f16a2a5c557b0304d4e96a2989ce358b41dd39fc031ebb4618e3b99cb09c41f042b533438334dc91c4' '4f31fb070368e9c9a2ac878a8e18e3ae817439a871a1b43c29d6a538a21207cbd1317e9307eed678a841b863bc7d5442c1837aea04364a24686b55d796ba396a' 'c13ccaecc7b0e8bca79eb7aeefaac8ffbb570d8ebe9566b11f8c4ceb1e777543c96d13f203ae120342d3a7a8ffce6ff5737a0eba2dfabceb10fae15e804760c0' '34ae9e788813e53e83b49f6d3fce85a83ebc59159ec40a9889ac6971b5b1a67ed89386ccdeca9524c059166784fb41736084c572b5ca988c423a763d494f9a43' '5a87a55efb71b73152eb8add0be5e63290cdce709810d2921f9a9bda726e13c2afc9c9456d8abff295f1e70bd593829b68e8473a515232599b36353a53215ee3' 'aa27403e8638eff02b351f3d19c8d5003fd7f83c0a01ea051fbd639c6213740c0bd3612145a4743a789ae9b8ff437b55568c60c86e08855187ed3faa9e1082e6' '3a7cf3b3a370698969fdfa92621ac204bc74ca86caa59ebbb346111ecf0dcaf9bdb6c8c92e3f1fbf08ca6cee88dc03f22af2ec60b5f59ebf98692ffc67f6e0a2' '010ff9c072a934aea5e2406c210c0e383c28f4ef27ec57ecb6e76bc12246d4ce88bd866ed3e0107a85c317a26728470ff13f3c9f519b8553e8bb6214592f21c8' 'c0daa2a0e27de1d540377f7105bb520d937a9cfd1da26099f951f49edd3803693ab911efb4bd5441eeccfc5f1c35aac1b4d4872b29c0fc972efa284a27799a9e' '48a90a71a7e9c4908850b1725716b13111fcdc1eb8dec900f3a7876c96cca44409cb8f0af79d30495b053fe5ef9d6fb3cf469a9e61511f579dfa6907270b86da' 'ff6ead205bbae40ac4c122f21f68b0c2332b17cc7d4ff7309618539e8b864772d3dfce05786494e361af6c60ff13e0607ad8ea6da4bd5ab46c28f9642100ecc8' '2697454b1170e3b82a7b06e8e54c9fc9afd4214b4b93ebeb7620aa16d9dc1a952827db128e56a8666ef8222e9b439af02fa8c9f90c80771260eb4186c03548dd' '4745ed507efab255f4dde3895caa539dd13b6a91af4b15f5d3d7b4580b494abfbc1d93317c95b350d0cb692b3aa057a1b59f760f904d18a2e8fc4d55494ce517' '614538cb131e814840c934d09ce5b84b42df5d2e479d893f8e1bb37fb775f98da1eb639780e47697757d8e03672d06fc3ec69286018b19d7d715d948d328fc18' 'eb731621c27e253bb2c356b55b2dabb00432a049655d20c9e2c737f4c1ff348ef602aab368b80f5ca1cc43239327d09a35dfdc3b41a7c9f884d7dc8937dcd725' 'c9199fd4adc7f7c414a58701828f9de458bb9976240a63b11af5763263e1ac87c73d5ccb21e79a359ed8d820c15f5652331bc2370aeb97dc9698cfe4480f08bc' 'fe1f2bf1ef4ff724c3fb3f2118aaa37385ec3a0605e8f266e118f7d807600054d71cac70d2fc9fc8aab98fb4c68c1b40eb3b4d150b4a42a4cef10dcdc6bc4fe9' '25c280441f01bfcf1c77c9ac24534d32baa606086348ca706a35cf5d106d94151be3fe94724364599f594f688826d0492e9efb66b18d35df00a1adffcc2c1746' 'd3e81b3dfe0206528c1260e72ff1f0eec44eda74a14507487136478b44f13017bfc9eacdbb741bb5a1f828787ecbd0fe6958aab038d776c2f151f7c017287462' 'a1fa246d89d49433de92cebc489ca00e0a08a62f29acce7770c25587a8ff24704b3dd6c7efcf6d7acc40354fb6509924196f8f9d7f8542daa91abde896bd883a' '7a964e3c14bd3756a3328439d9057a8ad8c2e2c94039b4139fef6ac711488eb646f8be4fbf12d5c92dbfc92fd3bb0325fcd3371c2342731e21a2736cd43f9f99' '9edf9a877ee15d9cc681dbb78cdf0c3cb1f49aad39576bca6c7964a812856fc9614e5cf7078985c881db4097bdbcd61356056b3fa94421c9ab3a202bfbe16dfc' 'ffcb8f3290ddef905ef84a18453173bad28a48e4e93fe11de1e153621e0bef6eadc8f7a8707d6ccfd5d2ccee2b510102f48de37bf61dcf2072d3fac02d9f89b8' '28694d4347628f507d540b87e1c44c38ccb83fe4555d7d200973478afdaea1070316655a44d7b49c56b62fb8a4d9a04a0ab75cb67dc0b1c35c09b2475645dfa0' 'f1455341add1302f7405caa9c3c0b1a98a6bcfc403b1f50e6663ad543a8b5e1311ba549bf2a86479c8446320a3e1fb99a432c3c69ed192ff3f7a1a862f0210c9' '48d01f784fa0c081019c3e9e29db8dc54eb1c020a10b3cc9bf21463e833617ff60ff2a2db03faea8fabf072a0a277d0ba7ca555cfa9e438ded9d372e27c886ee' '55c4e6ead25e87753bb83bd8c51215b9b84f76b482348521bd2b5b3db5c10619b4077cd3934e3d82fe7db0fd41e7f1f93efed32f43ca125a8602aeca9aa8048f' 'd0bd54bcefaf97e8b2d0131c7b9a8afb5d4507f6f0d5a8bca41892181e1c5da7af7728825c42e6a019f30ba6a3f58d255bfc26af0472ed825bc2bc7052a82a80' 'e7d8b8d24e32561d370690f08a9733747f07e9da419c06339a4ca88d22057e1049cabe67eea27f006d1cde089e24ebaa6b497559846f17c60a22e9ecbaa805f3' 'bb38c6edbbdc7a7e06ddd35b94ea6b6bd8eb006be04d22f1b0601488d7c9bf9105616f2c818ebb00b687d7d141427cd65c0d3650857369cf4d3a8a3a2609e960' 'd4ee98c8b1b07a007fd81848472906dfffda265471c661801ab0805a75bcf82b0ac6049f9c906085157c785e2aececd3551dfe87a47ab912aaa30c989606cd48' '331a2e69d5de255dcffa952e3186937f93d9ff1b15b4380e2ea722d0d3de70f0678fd5d34363552a25d0bef04c26f6942280a010c86586a6a35cea7495964122' '2cd2dc83e3432f3633177cf7cc9f2eef7e08c09f20cd0935a28dbe676e65ca003c835887e8c916b45cf7b877a5fb234f5f479d1401db0674e45ad2cd6124e2dd' '91da51fc59f1d30668a5d78ac59516acdb13818202f968253e8f5b3f0d7c965e46ff0550cc6e1515413d05afcf149e2349a3793b4714bb391e37a7c7de085ef0' '4f14d40fa52805740414da1b1d93ef254182808f82f732ba507b4769e7197033b036629e4fa79fd1f4e7cd206747cfa656842f330778142d9a086f27ec2e61e0') # vim:set sw=2 et: