# 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.6.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 json-c ) makedepends=( unzip zip diffutils python nasm mesa libpulse rust clang llvm cbindgen nodejs lld gawk perl findutils libotr ) options=(!emptydirs !makeflags !lto) source=(https://archive.mozilla.org/pub/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz{,.asc} thunderbird.desktop vendor-prefs.js distribution.ini mozconfig.cfg metainfo.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://archive.mozilla.org/pub/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=('06ea2fce76c08609d638435869fddc1c4d7f4b748951ebfb2476b4dba9f1f76d3de2c11e5f62540f297a5d30bb0fc637852d8e57f4fadc2c905f299757949d83' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '36d9662fc94cbf7dcf371adc13a9cda679bc75df961d86de019d3c8ebb0be3062d5ef762d175fab58696db74758100a65de45d7832e0e2bd4e15c901f72d8349' '730306d74c3ef95f5e3a2b90e868d6c963687b436ef7310b01f48d23b3a0c9f0370e21506d946d8b3e2930d563c2a9bfc3ab115be5d28f0d2f61237b276824e5' '6c045f1cb0f4a1d67598f3149500b32d9a36a6549eb116e4901c640091b604b8cc106a1e5ca38e4786ef894b7c7ee3230e94ff44b29e013bc07ca7c1e8cf8f38' '9739b6850b543f674805189bac97eb2b1c5ff7d756f6f7cb5b748aaeb72f80a1b2bddcfc98f55bb14a55d716302d039fccaf4d85879c3a7d28fc1c97c699432c' 'a9935043d409ef14164c3f9e34f2238c9864e9d8ef35df0b6056b5468ebd97b0a7e1e38a6c5c0c8333ff656ef5b6954cea423ae6d73c602b3e2109d31f161536' '02f692bce4481576b1ced41cdf6626a930cd4be89a8318ee8a622b2b0173fa87f023545054894aeeeb1c222e47c09908d10ce057b5d55a40adb6953555af4b1a' '986aa0f4eaa5ea0ec913c5dff5c4061fb54e2e546988df688fde1d7e76cc3d34d8940b56da3bb0f12015db1a1cbb20d85e47fe534300cf8000defb7c087bd917' '0c4055fdf4da509283712436ca3dd428d5d6aab60c4f76252a2b595738556757d880285461fc5b57d043529033af6a6065022e4b8f58091688a65cc7de7b7ca4' 'fed9562fb24da6bf090f99431b22f6640597e80a7b1bcfa7d2072e5e1ffc5a397362ea61a3ae33ba711cab9a76a96957feb152f3c8332e06a47294ed5f290e7c' '18157d00ec99076788e542b7566fbc9a33b6182654060a33e7a126b24b403cffee8ce43b2950a1260ca13ab9707bd589476b83059ac29b35c8442349a8418f3a' '7209892f706468e5ff5b04dae3b0f4f0fab1989b93d8d0858da9c7223dde6e9f12439c84802daec6700bab4bdd1384904b50deff219cf766be9f8b47a6249ded' '37571b6593c2acd9f6cfdf7a078ba8d0329c6d56ead45497ac5701cf5e926eda1bd0e2535e3fdb28585f26b9a01b9f1a8c6d4a8e340b4ed34d2d06bbb0226f99' 'f53498019560400b6b94a1650d90b7b3a93aa509dcb05a2503c03bac1d8dd3edf687e3154a57b8d5471889378762e25051c838f8da5c978bfa095eb6fa33b0ad' 'a1a697e4543cc74f7c58460b7728fbd10a16e6e9b25ca944897379c831585560c10bdc97a67ccc0f05f0159bf3020eb6e0d48958495f9c9f659c9e08ba89b77a' '4915ef3a080e74ad73c5bdd5fb438762942238cb5a1140bb757fea4d0fe9167211911295888fb0506b1bce000077d9dd6fdfabe437b7f73dc595dbc81bee8fa5' '4af6b75f002226d5c3bf13af84e9e51a229395079e517228b73520d3958233b549b9ffa2e1d1f18c7f8879a3f8e588acc7b1632de53eec9d58af65e1ebc9a6da' '6b4c36d66015a5a05e2daca901f70dce588c9927162d7d8e3802e45178c9b03bbcfc698a905ef79bf317189de36eadd5f19a99b590f3cda4d664c1d3b7c70274' '208871538718377d1ad8fb0046c93764c6e6f98c80c9bc57b4c27eb1d7276bee4d599175666bf08fad53d16bc7ffedf86c3006b98aea9aea31e9a4668e868d3a' 'f05785d3d7842c0991b686d058d33dfbd07131b6bfed8b2c0a39cdaba747b8bfa5eed119c107f56a40cf651196ff2fe4f68145f3452404d8f4eb5e5992fb5fd2' 'abff1e5eb2e4b2963fa8e2d9f10e4b94e566812870e21c2efdc9707064cc84394109eae4bec5ed4016b468c2c1d0ff9edff770335228d01766ab4a0291cb5296' 'bc7d9f25dee278182896120d3924d7a64c56e52a2df8e535fbd457c49d62b3722614ace99e4bb9286d8846ba00688fd53e8b57b31a95e4360764271f5a65ac4c' '0b60a2825251f8849bb78252979ead237e06799f594dd6aed7ec3c9861596de2b0ecc38b38741be7ab373f1bd5edb6ce53eb202d1856da95969675bf2a95bbc0' '07c214a858937689ae7fc0f8cfd6b7a23ec694050bacf54ab03e4271447d1f7f9c46f74c54bb3fa704bc44849af8143e53ba0eb80b26c712815e8c0658851cd6' '09d2ead611ba64aeab7805a5f3df9b10f8155e565edef849fb5fef04aabbb2cc325480c692c72902eb9dd1c0a855f7738091bd8d8ffa23548160ce1ffb2b2bcd' 'ac964d81a1beab88ab28225f1f5ddc515853b1b4e458c7c6a44ca282a2c85bb9f6c02dac011fe01eef2cd6cd74d898bf8c93fa490bc76e454f57efac8387bbc6' '0e894a06c0e185e209ffe10bcc02a0547fa42fd371d8116509d3d0fd97324bfc8ed1fb0ce581f47fe71942c4882f21f82745a5a5d4322b6353ae91f1427bd8f4' '9c9a5ee1a603ba81d397ffe65548497c4d8a2a34e37a848ab4f3d71d05debfd6b4c3bf40edbb8811bb4c18d42780c50062f0c760f86090920b40ef88d88a70a8' '7f1cfff69771060ee19d7feae0ac96716431d47cdf25db74f2e4cf650c196e6784e94b88bcf6224497ca2cf428cee9e02951ace118736f60bd0581c2f6caaaed' '5ed29db619f6ec6f2dd4223914b6abc53ca848a700b6f477fa15f36ba8ed05ad3ac88b7ec8eae94a70bb06d7beab636dfa6b92931fe6acd9d1dfda3bcae0dde0' 'd7b736e05b171a62f667cd2d5a4b215198e215ec3674f46aa2a586f94f7b2cc815930fbae7af600b9a566a53b6592e3e23c8df0f4c2ab9e90f02f06a4ceec068' '55c0f06ae86cf01a1936703ff1e73a0b49d1e5e22d707a184d4a98f533917d1f1b573ef702bd989ed838137464653a56177861c04a362ef4ff32f28c8c284f9c' '67a769caa8155f80b12d9b4456ca3498efc3720fbe112d825993bc71da1476265ece7dce8d6e79533eeac5cadefa81914f1a69f38e77b0fbad5427ac63d21338' 'b4bf087901104cd4bef755b0eb6b42d8067a3befe1b7bbef40ec72b1de4897eed1717256f59149a323455a6be8372eb1fd277d8da99311eafa3f46256009b7fa' '4ea933814c0c3d41c8ce99ba733b7e3fbb4d7e9b0280c2310ee9dea49326d3a56fd7950d223314c8157e6382bb938f2b53755a819e789ae5f04244cb4fa8e5d4' '178d1d19f8f90b9b7471c13af63d1970107f9021ae3be5585304df053760592481df9321b4cbb8bd39d3e986fa72e082e6c5f6b43b064f775d4d2cca686692cf' '7ee8d97e70a5cea037bef7e94e32568fbe5dc1e67dd0b591e2b33158c314a9bc36bb3ec4838081c88cbd85b21c6243871079ee0216f152315286922e45d1a3c3' '5953ff9020458184a0f0f864935b0e34ba143cfc62312b90ddbf35625d047819405ed81475e64ea2f6a6a51d0e31495adb0b1a3b47d34ba91b6af852a3249a07' 'bf8d85f62bdaba10812cd8aba69165164e5361ceef3cea0f214bf864c8027743c793738a54a8a092327ec7f8f7cd0cc7530e6ed27c2c0ffb95d807e98f86197e' 'a0da1e68cdac2a7516a9ff6d46416672b445ebd2090f422670458271dc386367cf0c282557c3be99c6de593505ab6e725b0240ca84e05abe3fc14ea214b5ea9e' '667db1b55ccc05e722e16730ec745daa6ec2bdf1325066e5e79eccacefa50e0e19405501f736044cc0e44f19c646efc479c12612f1482e9fb99f24a7cd60f854' '6a94c16494a374e012fef994e7a0c809899956279e63b231486dd771e3f3fc93baf12ce2aa1494a4fed866d6ad3ff7fc1939a40ba5f805a802f4334a5081e5b9' '6afc59a6d3700bf628b735f5ec7430033984d17ca3b81697edad0b862bad5e7a07e9b00beeca1976f7b477e5d2ead1ba610a205fd8a4eb455afc8320aa7352b3' '255df01113342a8336bdb855f01ac1d5712cd9636500b83d3cc7d8d31466400126791c61222bed85d795416b49d028eeedd64d62cd218b2c26ff8ac1c89e8ed1' 'd0d6bea1487c4affd731cc3a67c72709ba8539bfacc424afe97ede07039ecfe71f0fb4e7c54ffa4abdcd0ba4eac0fc6352b3b1a48a3becfcae930dfce0f9b788' '0d2ff9620d0321ad0a9b19b7d7131357cff863a96a8547f176c07dbe881ceaa87b33a2922db20ce1b1096a2630769e351e0c459e0ebc5276ec424ebf5466dca5' 'cf2366a849b029c3ef7dbc578e691ba43dfbc2c1c7d8ad87fc49d5d0daae87f0766fe45c5f68340c9b7a0c13fd9041a43d64fd4dc6668ce4ad2d378807b356dc' '3bb768f22772a8eb021c76883d74f0595d35b68c06ecbac79ee23b9cf4a041bc90e31ac89581b5578638c33bada0f50661ac36cdab7389bf85efbbe916373b07' '3c45037b654dc3f4d2921044c8dddb58a555f86212048d969ddc1e08568568b2c85d6323962a17ba33bd1b6d74f53c34f3e7a718cd3c850874393dfe4d58e7d4' 'd60661d54dc353b251b7f6c432ac60f8a77c012e4681b79bbae21c8a2c592bbb29f16ac7a9827baf6d98ec46f28793103383bca5866c33d0863c0889dc1ed5cc' 'ae5c015aae46758e69d8a2e7eab12627ef1fa7a29737f060afa1ac87956a65608790c34325817a14b2495e7cd26893e66c2f0ea6b48e9e1afd8921884210b3c9' '660657471d9ed4e04a573a09de6163d3b0724323f7784f40a04add5448df41d77d2a997c36daaf4d9547c9e3397938011c8bcf594fd21e4069fbc40a29065925' '5b58185e29a1e681e9d5d6b16e585c79fd2fa752158dad61f175e3534e411ea5107b6e8bddeb151c993cfd1d84814ec4f4d3b4e8448b99c8ad71f59e335f000f' 'e48407f36083ebedc3c982e55cb40154d8020f643b2313f7dbeba9c50f45a0e75c26eaa6dc06916439fbcbf987d4026e1bb448b58095180280ef8dce0a4483b8' 'fc8098725e8f70d9d74c60ca7e5d785e9c065f9893acf3f213cb5e47c7e64a2af93c0022ea8eb8828e90d20286325b21bad06888f688ec018b52b181b9f7fec3' 'e05f1d7004ca86e5adf6a28f58bb1548f2ade67da888a0f189594d264a1ac1c7d24edf615fa659edc5e509dc04b69d2b272fbf01fabf335c66e9451df3beaf7b' '208acc42517ff74dc60a39f8714ad2f8b159a46845f2cbff07183b65e29a71ea0dcd211756dcc625a1361ab3126d1507a1a5458830dbf8585cb8472d3fc68e88' 'd34069e14dd939b4092d0719f3f0380801e9e2f152f86ebfd2c2af4fe48d130ebde158fa748296269221b8566e1b7b46b57575d7b2283d20e847f7211a4af28c' 'd5c01b85455805d5770e24d399c893ebc857aa29a7f0809f06dda05381dbc55ab04b6a93ab35b6b1352631facab5e6cc42ed0048c52e9faac27c811786bf2c9e' '9a050b203058f217189c6b473e94b88c0d6974af9424c13691cbaba22734badb2087f2de0648e0f82088c30dcc507f392e14dc4fd00b38eeb2b95bcd409b1a24' '2ab844419ad0d456623d267531c028198a5cef96199ef08c430f0b40fc84e48cd1dfcf8aeced4c0257a79f8aed03db9ecfa0518d6906e062a9995e892c388eb3' 'a0b0b851a119cd0dab182544711c82ccd48913a70552708e765303e8c77af19e6d18fab26265251b92ac1e05b489a43013111521dee8fa1edf6d7a87c7a8c281' 'b67167c7c658f5d4c5309aa1f68b3e83ff3ba5878e8391179a60ad556efd6c0500926e1d19a33d631d8305092ab5824cdf0cc24525e9eba31868cfb85b64af16' '7bf80b68344e9c3b13f72033ec23cfc8c7dfbc811ae1d71c5bb9df37c1a605a64900917667bdc840d1c2e8033e0d6a4dbb0e8a5124368ef3c4652d7f85adf828' '1e395caf272de70d546c856e1fc0cf7e5fed90e301270246d2a214f54f5836df0f42dcf9d8ddda20e5e480b8026d9c80942aaf594efcc02778e3aaa7acc7c1d7') # vim:set sw=2 et: