# 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.5.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 ) 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" 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=('3fb50ee1b5ec4bedaca0c68a86286f5141d3e350025b9d928348c55e57e07013124ef8b0315ee6cb16c08777ba8b0fb715ddc4b5fef2481e32f2b676090a2d80' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' '6048bce2bae535007422854affa3cc2cc588e6029ea3083aa4817795beb25dc6e2726df082ed0fe9664f328d68b2f60e2619b87c359c99e73c9ace3dce0f3176' 'e3ed2708b8354015cb3d2c81048d1ce4932d1effbe2b40efa7cf9b45c1b923b9fd708645e2f8aa0136a485a3f7ce6b396b85721aaf535a4a764fd5005fb7e222' 'bbb8b0e7b9c67372eb22e1d6b6b5758fe504ded84c40a076d4a064374a1bf34ac12d5b514b328ac9ca984d976b9e0fbde81e68a66bec915c997d6be0c0917584' 'c25883c4860e511a99d9fbfba5b824145c0862729101721605725f609ca2a41848b741dd100eff390f57031dc5f14af3ea30133de30f75cb20197c420ae20972' '8ca4f72f1fc0a7fc128f05112d8f77be5350826010069ee3b787989131f02b82d014a4781e97ebe5694852c4bb5e87bb5313e562cfb7cb2afb6f904124027e13' '95d8e1f46c9cc92a1097cd55f3bdcf6f685cb8294ecdc8c89520548789107579997364faed9be42e796e5845b86af2db72e5c6564d6635c061641a6c1275b1fb' 'fff1034b0d9859797c4a77b296a3f47cc3602d43a000bed91184b50b065321c96af0078a85617de1abe4a73aace498af3a8b9ee6941884ac306d2eadeda6d99e' '431c4fc83d9784428f8120cb64cee8860f5f750178ffbd3f894a9c2bb3c8f58248ce0098fdaf8f6b18476ee54226749c0d224e9a32cd9bb8e42f427ecceb51e0' '2f8f47ed87d297957f7a8393fe37d879e1bbb265aea4731ea090511d01584be32f5edab71fe9241d6f3383e21a8cd04ac44577389e81ede7134dfe14e3d5bff4' '2aca811de1943c192fc8997ede4678225ccec0a3b4e382f7ddbb88b37e80c363451a47a437be0f29f554a05564827bb12b17868db18dfb3fc4ab34e4959a2318' 'aa6c9c77429344cc5a8a284b55083d7732c6890248ef74101a3b44f4d6ea9cbd39b955b8e92fe53e8ad9db071864ca10d4a536d9181cfac3579e7c7117be5cd0' 'ecf60ff8676a8688a796a90598a6a6a4c0b8796289bbed7e2a237ff7412ccd31546d894d0fff526bb2ce418f3046c0753faa22c488863a558c6764fe90751200' '69951b3986e34090a67434fdaa27cf7c71236bb3d152bf3cecde24e7e1222781e12936870af701e10736656554951dc856646468d0aaa30855a1dfec8e3a5eea' 'f9c0f29c8af5a81df0ac5aad76b134757aceda4fc2bf6c849ba4f9952e6ff275ae1b7ea4e8f978b21ce2be1cc91fa97a005fbebc0f956ab8ad259b1cfa863615' '94626848abb600432922c860a7b272d1f1b19c60af8794ed657276dc35674e823e04c359fc159d7d370c97d6bf4e764b7a666ad891488345d78b8368138dfd62' '5b0fe19a94ee353743b6356b197fbba47218288670cf2077beb15d25dcfa85bbc1d9912eb2952f54b1cf4137fe2ad50388151757bd1645905711d5573bbbf9fd' '521b748687b439b1a5d870b27c11fba764ddd15abd049b59201c8cdb7827a9bfcd39148eba39d971c1f560430482bd73d3e813d82e87ba2484532acceea24b06' 'a3d94b14d7bdf12423178b9ee31a6c0339ae48add3505303ffc78a6e477afe66ee38acf787c928e77fd0aedc5616917117a6b5e121c36065d1da2e2cf0979ce8' '46404a9186cf74f081d5836b49ffe9c58cd9fc2b4c7024fc17eba4ddf3f7f3d6f2609b7de1f27a84beab108285943fd9c93e6a6811ff67ef0e2a8fbd63051843' '019840c0bab36712b61ec2b499916c844f804ce2bddd41b8247edc538a75df82e3394a735936093b9b8ca5c4bf91db9282b4ae4f54e2790306a7e9163578a630' '7168318d7d1bf63d5bfc70c21b79962b19a7e0938a1636965130eb75caa33f7e861567e8654e1c0d71f206938a0971430379fefd290cd2d1d02fbd7427abb959' '6ba39ed5b5704d0ca4dcddfd39f4ae2f181e1d3cc7fa329076a05308932337e17ead3174cdfc7bf7b1fc98ee321fdf6c7cc540aee66a41bbaf4e06f2de90a32f' 'ec6bef4a5a3c5a444c4d1b0f0844a630cb48dde0b3d3abbc8535c0f0fba5c24ae2de96cc81e679d88458d2d807d52ea12fce894d202ab46008fa87d9fd938ccf' 'b666187d4544efabfbac80003cf858c105f03a75594c32ca96509dd6f16144d476855133323c7aaad1675d7eca237bb472a36b5f8687bae4255f54bceef233c9' 'c6631632d4588a5f9a5d750437835bcf1bb6b6506cb0f9c2eae431c1ba9003a190bf13258593085658e26c99129b3b75726e14365dc193c128231d2f1846ad57' '44547c1cfa39509bce6689f2757241da29d4a0f394890c05c62b9ca0e1674401c253a5038e36aaeed4209b4393c02051355cf7a6450fc458e6e4a73b2f26e66a' 'ff05174aa49f01370238209d8261e3b0d8e38b0c6175c6727b7def9a4d042aecd51207530bec92a7489959f3f3405c812686896d150faaee76991ab058dbdc20' '490a8901dd72f6eda9c368cccbad243436b13cacac3b79cfbc6c934d2f949739821ff7c64bb8ec76788c5f080a0b1dfb7eeeabdfd7e1438631eb1ff88e65f934' '724330f721f139147e92148fe8bc6f77d48fd0a3488bfeab1d708b858de121bbc19efbba405378bfd5b435dd50b17a6c9578f2085be6d283f91872f68325b0b1' 'e66530728e25e06e32988abe513655bc1f3dd1dcb40a04b8788db28d9e8cb12a7eee07bef970cdc4f0a2f4d10518da17e704dae0fa528fa211a03153633a9699' 'a51d8e229eb9125ab10d55abbb6a9e26698468f62aa093ec07fe998737c68de94922ac820ce74ff7221210e2c1e28711e5f11182fc986df4467a9bc3fddece5a' '90bcc4f42ca6e9c0dfae09d46d410c1165c601920f1e1e772e6b80b1e17b18ef52461d037ebd51c40fd9b266ffbd2c8652ab3f851fe39139782c15d2043c1b0a' '94df7445b5d86b0b6aa890d4d22f44074b59ae49ac10dd836fdd4e8d6d64f410ca6426af2a359686bee09bc8499a5c8b602e96a4c34e6ebb0ae759c42fab4588' '5837992f34196d2fad2d248fc36a951404815d6a69896cd9dc5c2bac9fe3fe31ab59cb07fecc6a5a3ae4fd01648b3e7b8e6708a7e1fee03a18d435e1a33b510d' '7fe96ea30a5f5ac5a73b257d27931cdbe3e2f2667e393191dc47b526b995f8873d33cab4dd942fc04010d439b372f0f9a852ac71946b03c65871d883adcf9d66' 'fb64e17be001dc1a62e4a9718fc30088c9e7902db078959b3a2eca471decfc43bb5033324a5dcc887d24b5b6515ef7f403d0df4a6eb2b61596f498e192aaf203' '2b779384ac1ea2632b374ac40a9c124a336cab3fe8790fcee2ddfef38870abcb1e10a507680f17491fefed1a5463f5c2415a8cb085834ecc360183500076978e' '9b241ddd26f63fed0d372499dbc98932b971463f32d16770b9027973e235d3ed70293ea92980ec7a66606365a6d51829577a24059dfc703f6542666dcadb86d9' '18f013b59502cb78df9f4e28d97cb15d609da71d5947c3ed7e6fd38bf9741d7e276356352419537efb0b88eac6ba3f9b9cdfd7622aabdca3860629eea1a2fd88' '4d8f80894781e85ed7baa74f084fb1c5188c9813d91a597bfc635dd8d1c6e330ba2ea2c543d51dd626e4c93011811987669aa71076452e82680a14f2f2f838c4' 'ee3781417f8ebe2edbecce6960f37e01a9d1f57ea325255058221259edfec98da96783e6ba1c9342a11fe9fa5c50125d9c72d2c3555cf36c96a2011246671e6d' 'df9145131d1365f4eaf4d0461e67134846b4076a9afb5a1b517364f52103ed97f216ab5ba62ffeafb56376bed4962476e95984714b0e0a6d06caf797b058a231' 'dbf3264dfd82b1f32f2b88c5fd35377e8943a1b7177b9a4933d99b1936a881d5e97f1007354c7571dd9abc082f92116db85abaf802d1fdda649a8495bfb2a22f' '3746970c2d1325cbd178875497b397f778578b4088231e5077c4d2424faeed81e3342023241f2ecc92f4f512dba64f9e73f4643ed14b295929daf4f6377f006f' '1b8d9a94af244aaeb59af89f5b5cfcf72abcaadba040d026c128478615ad07aa67e05cfe153a97ba11883622da86402e0fe2d1b700260299771be5ad764982df' 'db621cfa2b4e1090950f13d237a1abfce0cdeb7db1dfc0fff530e6cfedc7570b718f45388df19da8b8b54724d7e5c4bdbf532c308ef9d61a85f006937023e507' '6c9be6bd9e9a7bdc3dfde57825cb39b602b36fa79e52a8b3d9d023cfa03337b84b02eed9cc871859f747950be6d2e738b9f38161354c90dcd0fc3991b86ea350' '3d73cf97e6c7ebfe771f69bd5b65181b48b98e431b6d9d9c094becd8619f42fba71e4a8c7310af592c50baa805d8202956f3da569678702cfdab85c64a1503d7' 'd9060cef57d7b875387c26b2cbe5e1573e441e453feea6182bccef7a05cb2593c1fb373f8d218dfc2d2123073b750ec30e0097a76af64ddcef0c6c4b5400aab6' 'f6c4697d699a3006e40a2351c49dc64c743f83b625faa3b7bee850b60702e8ebb8cc61d170e76e339a7d219128c90f0cc71f1169547e3335da3221f359156cd8' 'f6efe47ca5fb297d01138f7b3430b63804460809fb558ea7d2365739878b0f0a7fac78c4fcccfb5e3e5151583c814534abf953a807138d4813dffa76c20fb7ea' '20f231f49628e758b6754c4dd0b08a5f2632ec2cc0434845f55e3667106c422299543a1b510c726c37637ee4a7c22484f29f8838ea3e5b1c2f91dae341940aa4' 'e187a54689436f38a44a875ae60142b1294f23038b7b3506f2cd596255f95d697d53010d69bc9156684c7f8190e222d1a65902c36e227a0effdea9be1d567f41' 'ecdc2e22af60c9d8ef48ea19f200b600ece88360285422f85582a2c1f3921c1f4d6c4707f308953ac5b9b723161893b0f45fdd10fb528889b2003a345f351ac1' 'a156f0818d10d343099865f79eff559580469836a1f705033335768a6b9e214376f501a50248a80ea214ee06539d90584a1cb93fc6f4e74e8c26f34624f3c889' 'bd06af705b0b8a76c6895293fd008b47ce0d6cbbefcc41d600c9cd53cc741fa57aad42707cf190183323cb0a274ab2bef250c38b8c1cd814164f1e813848272d' 'eaefc4179135be35835579ff6cdcb1a33ce54a8d1d6baae2323689c6895a2f31f08733a72ef788eb8c2acb2b6da7d92ac4191dd4c642b50783e71b29e3c05d52' 'f8245adddc5130c0559a345415d64a206a282f2bfac0777d97ccb96fee7f091982621a02df605e2fb9dbb1b1da6adeca7195384084b65e1ff9134c8e99e455fe' '917ddc49e8603eed925678e57d9a00da85da42676ae7b0a9e567e84f8cb8daf8014b897cc9a651ce60a683d17cd9510400647e5621261ae483fd6634cbeaea36' '1bf9343592d4df3f5f091ae6fe63b58c2c43bec0581124db88e7c714877e364f0a97d252736dec6cf3522134a7eceb7ca00ffa00274e5690f39e6a4de1f05a8c') # vim:set sw=2 et: