# 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=1 pkgbase=thunderbird pkgname=(thunderbird) pkgver=78.6.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 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 ) 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 ) 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=('36194e8bf58117d8accbd6d8dc52a6241d8c572c023db1b271db3b73098652a608da28134865099792fbeb0a2f0d3705d98093447b64fa19eab7efb3e3bdd421' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' '6048bce2bae535007422854affa3cc2cc588e6029ea3083aa4817795beb25dc6e2726df082ed0fe9664f328d68b2f60e2619b87c359c99e73c9ace3dce0f3176' 'e3ed2708b8354015cb3d2c81048d1ce4932d1effbe2b40efa7cf9b45c1b923b9fd708645e2f8aa0136a485a3f7ce6b396b85721aaf535a4a764fd5005fb7e222' 'bbb8b0e7b9c67372eb22e1d6b6b5758fe504ded84c40a076d4a064374a1bf34ac12d5b514b328ac9ca984d976b9e0fbde81e68a66bec915c997d6be0c0917584' 'c25883c4860e511a99d9fbfba5b824145c0862729101721605725f609ca2a41848b741dd100eff390f57031dc5f14af3ea30133de30f75cb20197c420ae20972' '8ca4f72f1fc0a7fc128f05112d8f77be5350826010069ee3b787989131f02b82d014a4781e97ebe5694852c4bb5e87bb5313e562cfb7cb2afb6f904124027e13' 'b73e36dd0a086cdcda34757a0e30dd6aa82791862d60d7c0f87bd8687d52d71da81dc1684130182be07001a777512897dcf4f95e23db344f97991ff937aae5df' 'a7ce5cfaf4c96bdc63dc99aa1e5a31eb5e4f90a45350b3bcae2fedf2925a2372fe0058754f490e5e0a114ee5d6341fe8b632f4e3c01924da3f79738a55201117' '4ca4be8284f64132c99c11e4428fa7e4638b8a970eb31f61b5368a18425b7736622ff21b38907450361b943b680d50b2f0b293f6dc943cc8b665ff8af8cdbe8b' 'aa18a8bf86ffdd83f292942f338e4ae6085ee50e0b573f95bf0c9fa99e257719e934e48d6347c99b39c7aa128a34cd6986154cfd8cea8e5c50a023a8b669a861' '85c9c83e535c87faeb98e2adb7b7ce41752d913e23cb7a92bcc3f5b7af412c184a3995bc0956872c9474dc45b00f6db00058f485a7ff202d478179b8b34af656' '9d6debedb42e0d314dd4a8f14eba786ee32afb582791e2568a3a528cedef414c01a3df40bee44514ce8cb3e498a49998430b52b1cb3db3bda78989f1775b7a01' '317573845d2d470a5466dd0863e2c462ad2357b3f6ce422ad74f9db53ceb6876095452bed13cf83cb46ec78c47145d2168b51c600fc17ec1bf0c8e458e15eb0a' '836171f65ce69d61c0f2043c18db13f2fdf8e38b28982b89bb547de07930c1dd807f710efeb50b61c203c5f91648499dd58488dd6e41b050aaf78f5f1560deec' 'e5d19b04b314dc29ba822ea6ccaa77ec54ee526838ca4b565ab74b63a8b521e7060af8d416a285b56db91631284b34941bce7e664643042440528e8165a01c65' '0ef3ba13a9feeb3496d295553f6908a0329f426b8b0fb1646a2f0c7638c4557765da5a39b58e4269dfe593a43909aa712024e16e0450df7c4db5a938172b855a' 'a831c73ead0e13ab05ae95b972055a3b329092b622c19cba1bf4fd917e85514b55d4fe1c31b1af51173f855f36b4a9bcc631bcf1081fda74d2bdde7a9584526e' '63264d5332a089e838f4a968f2c804d3e8411a68639caea65b7d6a13cb0569f5e44b2ade846032bb79f13499e9565ce231ccb55ba48ca3a2502c92e0f40adedb' '12761b4b100bd845f2f55c2b724b2bd350a0290ff821df84c4f732d5947e2cb974368ca0063f98e3e8ab264da4e2acda7499255dd82e96bf30b7e7e32b4fb1c3' 'c5f9739e0995d1c9e2020970964d560fd86254bd91230181e34bd83f1de43be5bd4ee5e08b9846e71802f893b47629795d5002185e3a18d3f4809975fe252cfa' '0417c7c47a22c9e548120202d35b52fd4bf7bd6b08e4c9771cc027348bec1fa8db3cd551f41726cc61a830397738274d0483d1cbd507b90c501b53495f22f6e7' '7c6cce31958b93afbbe4fcf99a62c4a73f2e37eaf51a54945d0ce2190df635eb53498d3d455e7b53fff035f9dd76b92b4478cf44594d67d293a5ca549ca43e36' '5381bb92715ad132cd8c68d9781c4c975a59df64000a6ea71a0113cfda54ddcacebfca8b90bd030128110c915293df26a2c34a10f9ebc2ffdf0a5b24eb39d18e' '3f38183f140aa30e7b947f47a9da01454722ceb69c75819c0a8831938faba084b3b2398ae5136dd3c72b8a504df78bae6948b6491b8ff8ff9f3a675b934d2a60' '9b69c8a1ae2e04aa9282066cdde5831960d34bfee69188aa8fe0be69db799b79c3ea11f55d1c084b4d3376974c667d8dec57592937c4988617d1cf1dc81690ac' 'bfbf57fe957bad0043b51950354cf1619a497c224ee3c84893f888d6ad72e695fc6a20a9c44c8cfe48d64f89f80304a8d814a600371708415c2671f28b9b7d50' 'c4e4999c76af1c94cbf5009f23d500f2e5351fc38ce18c45c06dc85d6e548be411632b3c3cdd84f37a476cc391bf9000de7c0f4331bfad445b8e13aa153b2951' 'd16ee32e21c3cfa354e34b74864f732b2edeb63177ab0ad19731f12ec724f4c59a684e013f0ca083edec9335039419e53b7c86cdcf01cf5bdb02896f7ac7acbe' 'a775f12c9a85c4be2ff7777e3cef7f921e6d70be3e1439c363007d383773b56657600eb816299035d959d97708e786319f927410dd83758c5b605c17447418c1' 'ea9003203e13a5beeac91b691e1fad55eadd83113a586943330e58bcfa00451acea801d374064d98e6649650545392b6bb5ff69d2cdcdf08c223dfad25058a32' '586869e7648df55872fc824d13bf279cfb0ea2f133fabb235ba6230619a2ca7f0dd505cfe71b8788a2e965f3657aa98fbe5b79acd1995576d2507e56e0398c45' '950c929465b15e13f06b065f967d58ab51b741cf788b58f3e54c15f7917b6dfa372213e4e685310c08e76274237f113b8edb457c29a1beb93e7643cbfd724558' 'e2d20a2c3eae77227587b3f90621bd84a3b4c5fe289b97a03b3951c0a050a85faff3f2d4cd51f0e644ec073706e2249e304a5ccd00072ff70d37fcff902c14d0' 'df8a66b3907adda26bfc55eebcd463fcb2c93fd907c6c72a133a66a2848a9fca7cc1d78e25b745d750bbd5c8a47354a225891095d9d036ffd8f529eac4078b0b' '9c7a3b685d60f1ef899a0e61752740f1f15c8ff6d1f156d6b1dd1b90ea69f3c319a0fc5fbfdabad954f20b87c712bcf4a7d1010de7b8fe06618c24a4ae0dec51' 'ea81176725de1a79cd6bebda2e41f01a852db5b8d3b2466919e77afe31335255a3fabd9d88bde684c5bd4fac447f106a183e217e72a15f436a92bc7f064d0acb' 'bb9a1144afe77eba866d03bc0eaa507e7e12fe785af4a7d0d61be2257511d48c83569fadaa7b71c71b3d74796296f34424c10ad6c6735d401542be23d97e27b9' 'de3c634a4763a0efa48dfa921986f12dbdb5d8890628996a8b26f10e35dbff833851381a2b3846328e52d702d33eebaa0aa6859ed3c61dc19ffcededb99b1cc9' '70d5b3aa1efe0c6ad54c7b15599f6c63b0deaecd0f46cc20ccb16201d24a081f45f62f73907defc6d5b73d2bd3e3e8f959ddb5744d0f94b880403595802ba856' 'f7db483586c0d2f562316b63324a996355572177d83cc664db34048e4e613f2302f007cddb356381f93cf3526a33ee5a5b516fb9469775a99b634f5712651979' 'f31729b94c20292a88deacf4e44a19fb9e3843334f87a062d1e0f482f1b7b2c81cb61c96ffc2a9e71f90823c0571c51ea5c3b6e1df83b7194cee00e93a200560' '5790635192abd36c6649af9024498a1830a6dcbfa4f830b54ab9940e908ad0184c696acfca3f07856f507b22793f7c401f914ad179c9d02ddfb278a4ce9e558c' '40cdb1860ff159c6929523278e2e08c0701333e76b15fd27689e424450363c4ee0f85088f3963fef3cc1dde891a886b31b48316eebe8c4f4c6cbeec4c35d603f' 'cc37e910819df0245d9b69364eec7c95bd5753fc4513188e8793c5e6e44ce7732261fe22fed4683e535dc68bfd047c4aec9d106a3e0912911bc9a522bb83335d' 'e0a35f5a5fc44e3ad0150eb93e6e542c4676b02e16b797c04ddeed551bba191750f58dd743431350af3fe44d318483a6b823767a3a9ebc5a75483d0706a407dd' '5223246ab5c33ecf43d6b81f1c26eebdb25d667726bb7ba5eadf7c4d8c774207543f098c049893b42965b8495f2162f00cf2abccf85ea6e7f141a9a0169eedb2' '5a81abf08b6115480573e729bfb5c00bb1c8449b35b6b8ab8523e9c84c9d00e53973e4072a99a736c9d6a44afcfc4d5587df9e1b5036966d18cb5393d3523eb3' '5b56d907789c926e92344ddbeae276e6879ac7d9171d52f235ef1a319422ba6f6b2c0d905d1e43eb28a65153ca8869fb69a3592a16a308a6fc0e3a7df981f79c' '4912ba964500b233b4caf08c004d69623d2fb864bdaf4ae46f0fc65c2552fb75d7da5c20815e471971457ef5a98661e3424218f78f88fa63077f542ae8bff312' 'd3f60e3b8efc6dc4fc1fc390dc3afa29f74e71df0efc553e2011f2bef341cce0522c861ac3f131ed4adf9f172d8390597de0aa094670e0a1e34e36afddcc0ad9' '4c5769c720616276f900f21afbd580ad2bc97f86522eff3b75a09f69f2146f9510742c2d83f4080e7a23b97caafd0d30a40e6a6bebd819d1d67a1412831f6e4a' '2b3c748650b642e7790b854f897cae928197914feb95cab8003c0b33a3dbea050bc60fbdffc32327c458e052a8db8f7e670c4caed8fe5895b2033851215d9484' '73a5584dd6b27905c64ad3f4a20f089ced5f7987865b316145d8d7160e863381eafeed10918ca18bb58dbce4d9d302c72b511996aea9ec789d90e1e0e5137683' 'd90f97a383602752adecdbff4c76e50cb5c5ce31589d2d1165bea6c5fe30d80382fc9294f7c7d1df6c33327f99ec87e7ab797645e5ea4ebd89acfeb2bc0a8e7a' '7a3201573cba6949ccba92a5d6801e61775e8dc2e1dd1f5e5f64806559081c84364f974e93de032845fba12e469add4ed731975bc0490dbed03d928b65ae8783' '9509af73ae1efd8f7aeea319c736d962d81c0ab4708b4be5c5637d73c7fa804cd3a30b507f3d18c365f8ca1cee78ebe9a1797cbe4db7c91bd220fd82ef4a5be6' 'a98868cf4efd6fcbd0d52278b7d5a35ea0db4b0d8fcb4b0bc449fa73771f1f80d5b542521450f755c09cd509b0a806716b527ff5b36ff6c87ca1aa8dde654951' '9ab13e61805c43afa9a0c8ef4d3da0232214239cfcd7126784ed28269461d64e734b322e2aea4883c067cc1f1d49551e410f77eb235a8db54dba6b505dbfc732' 'a73b25e4fcb1d110ae79fc14e000bc4f2fcf0870d521f4d2c98bb8774c889ba308aedc5a200f4b344aa12bca954d829abc4bfb4fabf1d14d15af2fb9e0a77eec' '4655c5b71b75a483779b1ee974961f2f11f70d4f3ff60e0d7422681a6fc14ef7b44c7e1ac409c319081b88bdf4a76fa6dc3ca51fe19a0ec87b0df8716674439d' '26ae0da18bd99aa0bbb32fcc5a8e5cb2e22cf60bdef93be2805174c85a1372f59b3099fed24ee5d88c754ada0293fcac8d3ad2d029a622240d583ddfaca87da2') # vim:set sw=2 et: