# 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.5.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 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 cbindgen-0.24.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=('b6f2828b23616db5620e0364a1ebb02a8676e184d5e361c0aa87f36b64eb6b7f4b1bc3c42675b3ae3092953fbda6b01c18c068b167d40469481b1e18af1dcaa1' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '3526402ccae1f0428f2e45bae8d0b2cb909ac2698bc3508b692b827839ccb21203ce414206039776f6ce946fc53e636290b7870e9886284d5e9d1e8ad050aac9' '36d9662fc94cbf7dcf371adc13a9cda679bc75df961d86de019d3c8ebb0be3062d5ef762d175fab58696db74758100a65de45d7832e0e2bd4e15c901f72d8349' '87f88bcfcf80796e045048d30f1642eb617113984cba2ee99f097cb6a21bcefc3d33111600aa90af6a1037d0a588f017710398be07628cfcae05afeecfec0331' '9c8216f3fadbee50fa717b3decde8ced664f198f079a4e833de354203d78524467216522db8e93051c5ef8687691b3718936b59dd0e5a0b16d35599cfde52771' '6339a03f717e1bda4b37834095aebadbf7db8ba00980508b48c54907db56bb3f925583c564e131353df2aa84e3d0cdf09858b78883e000df7124964fa0baf518' '4c4176c8036d11d07fbb566a98e5fdce1aaf5806c6bd88d393e74be65d465ea0d0123a5fc0318c2e7486b6631387e849ab9c963142aad078bd57ecf8f8d17e3d' '5d0812f274a8d37ce3cd1cc9360c6b0e34e8038dc02bde2cc51ed38754f6728ab2d9e5f0c2475abc90b490948a02a2fe0507c09a883c5420ebdb098afa5c75bd' '5a897c11185175138773e9ed2e2a657363f0232a9c10b23f7d2ddd5da45225bd88aa3c6bc1f3d028d82cb3e671f58c39061cc484a4343482c20ddfead235b7bf' '7a697a373bee328b1bc430f80a15be32e9e54cade138adb166f3aa1df281872921108f3603fdd7e4a2b25603c6be331f363062857fb037b3baf0118fcd26bca3' 'e08db5fc96487108ff40cedc79dbc52d60c06a85f9692980efa7fa4e147f1476b5be15850faff2c40650804926fee1202ae33d904aca8b9d3f58b1e095c40664' '831bda7bc15553452ce6302fba74c71dfa89e47c70e553aeff5fa1f39175022c015e97d30f63f3f4d17ab845e9418f214e8a56a6526273669adaf5c50edf3550' 'e792e0112d32b84456ce57a738bbd0ba1fd20237400387e4627d05c60f572b55ee28485e3490961671673c18c683619a4e96d02da43987945c97fc160fa654ef' 'a0403c8197a3bcdabe046263d5a68ac6cc0ea555dc3d1f5d462447f653da7bcf3ea7fa2f20a47533db6d25d0493a45ee2d954a84499ceca99e87cc6addac5a30' '7077776a6b89c0efd49f1b53c628412a374b2feffad4e8d475ad82bc9d879f40f38cde8ed8b92f1d2543b69b3ab88776fd1070191717f30da6f7a80a7cc9a6bc' 'a3aa103726f8e516bb80cdda5b98847b466ef8381093d6ca6e8f600b2c56ab36099799c67c20cf1746898da0a48e63d032c1dd51352ea5401c49ad11d68d956c' '5b2cb3771907fd96e8f39aea9a2839f457ce66a179849e2de38ca6737081f3099e9423845e784933e931ba0c9c1465d2563d4ad20ca794643d8bac8ba3988b1f' '8b4f4e6973fa1369abb5910c5e534a7fd592d18575fd780fca1f667ea1da2ab86aea78d74f5b97c62c8feb07187d2c86bc731058d4746a0df375a302f450d93e' '2b2745958f3e5b1fbd4c47139b4cc45abda6d530ddc6e6ad5d2dcc3b40b2b23511968f04a7a13ff85eefd11d5037da5fd50abee110b54a40da31a041cdd1c51e' '4512768c6168d75bee3a16a38a57157a227d67129d2e8b8b53f7ba1c3cc66367247b87d94e60979da5cbac35c12ccb825bfb89cfded20532ccbacf4d1fb28e9f' '2b8a903bbdbc4c6547168660cdbc47890dd05e810f02676586c6427f202b8ecf9b76399357dab9d8268581ae98cb9b2e36c560006d1fcca973c21b9a3a9eac26' '80f334627caa22ed98483ced66fe328bbdb90123d0d0c85f2301de060398cae46f09afdd948975df9231aee86d21c80e6ae78342614785f3fed355c51df24023' 'cf273461a4dcf53c5025dc82eebac548ca2495d6dd109be5cf7d9fb71df886ba520a3e067d3d49c6c788a1794feba694f6a98a5ba59117046f209e035d9dfed2' '02d46716afa2229ab8032d88b6ac63a40e445ba7841e322a29353f437f5ab5d6692008382cae9df1816850582cc6b917275a7ed1a9560224bfc42eee79babec8' 'cea496737f46785e4bec8b6b12455b8595af1aa356453e6f34376c8288b886a7e80527557396f0f0a99439886f4cc31815724e6d4b4ac9ed13d1fd356d41433a' '180f0959b46a5a4ce4ecea0c8e5bb374e6f4f64f1091b835211f6eb3d8b977a0546127d3759890b184687570d36ed80748e9fdd49b66a8a588654d3e369757cd' 'ae6dce5b45a6fcddf9f9c04bc23ab7fc9d104d9249e1ca03f3640751d324926687504ad2b75817b498adb9d3db8ac131f942cfe751f7bd530e9334895a043f62' '6aee6f876e8156634c3234d5cfba2e085570403af11d9f2cb2c7a2d864b734e2563b5723d9bd37101a48a832ab06d2c0706cc1cc802b8e49930c693245900e1b' 'a021603f92e8e4ee47083f27742d46acabca340a5f566b20b30545e43260ae7523bcb431de6e99081f013bd8f34d687273ce3ed788e5e51d6ac93e7d9cde61de' 'eea501f01b733b32478059de21dba17f7cc619aad4c2ccb719688b8979ba083297f4538aacfd5a9cf56be82500fd52ab883c06098654fcf2b10283ff66af1222' 'e3ecf8adee761c0824d2929802bf4341a859cd565abc786bc2b5654040c449bb6d426383e79ace3afd286316b8022134c6f90b22fcd16e69c3cab66a9b2e7507' '95d2333a7c11bd57b08cf1f63e67444f6df5ffc65555bd22ce6e3f8446ab1362bf434e95a2ee50c9faf3539613d32532e5332133ddcb804860b214fea9178bcb' 'a27d93e84806efcaaf0ebd631194d632093cdf2c8eaaaeba01953b4a5356c2fde3fc0e76e33189a5fb444c5d36d93a9e2f2a4de4e923e4cc9ea599697e25ab5e' '6135e341d23dcb7f017f437d3bd76edc3a6d800d334bde0391e987b8ad5a2e144bee4571a59a14c43a3e82e0583bc328c8981969c133e9fd9a6fe456c92dc707' 'ca28ec8accb06fd580165ac2979bb49af0ac426981a8c3062f8ec2251f42e84f045f5b74758433c5b91ef1ae2b986498d0d8a8a6f8e226bbc040a76f6e980302' 'dae88b95f700d3ec85bf840b8f5dca58cc4040ce4fff90437090a2d38e01e00de6fe44ecf26add241b29287a8ca1ee34f89f50ddb5ce2cc493720ba8ebe27ce1' '92dcd540f9ac0f10870ec9561bbcfc2100bc07f8680c8d97416300099cbb10764f597756e321cad432f7c1babe8dad184332a03881fc50625a8c7616b2df60d3' 'c4e1fb28cff27b5c6731d889dde46d755fb5b5de0d300778ab44509b7bcc12fcd708e8067c8c71ae6c18de49307100b7993e8edad93db47cc389d7e6ffac537b' 'ab07aea6bc1a88fc54d9212388dec76d200211426cae09148661316bda137fa564417e9699bf5c49f12a9165bbfedeb3464d288a9e6234d4cc94da090e1ddf2d' '6123abf6b28ea3e062eb0d12b63571222186bd412b6175a077787675221f54eedaf16857d10c801d7f1fe0bb0dcf69b202de126e5b910a3c37867e6acb9acebf' 'cd7d777386a6e6bd3a63a0426b1d10ca7fdb1e8914b4833e19098d7023309bc45a560e2ac4fc5632efd71ff8015ba35b76987988a39a163eb16543fd32b6ba0c' 'ede612e93cb013bef06642a729382863fdd9e25fe4fb21d06b91d36d4ed3145897b9b3346f6710060da1d7fcfde5eb89d9081931f53fd85bc2d75774c420dcf1' '73310a4d6b49a069af7dddb31f15157dcb7b44e3eb4cf5dedff5948660ce1ef74e53e9d4e12a097dbef74dc1e5f66d53463f83b114edd3c09661be4d9607983d' 'c72b9779ad6ef5d5784b197fdcf3ff117931ea6d66da396c013b2a41850c9d20a4a6dc6f7859462a6879d275971f0e2d044aae3d40788d5f35180f80c17ed340' '060ef488fb38c947a2be6fa71178538ca1a4100b7fa9b566ef0c5063f4ed4d08d894529042b611760505211b15d498b4cd21d01f168b7fb32264a6f81685a0f1' 'c3a56572ef569c09fe4f0a8cddc73110f25b5fc31b304cfb8ac21188dd7466637607d11fcf4bdea5678f10e7d94f860ba1ddf1d66c36dd08882cfd8880eca1f6' 'c11179ffc17faf43ad7a0fd60ea6848832fcc1f7ef1b7c4bd27d60c462732486ae2abd38c13a20d77f3f63b98f1980a61f327747d51ed4e7a910424e3599d5fe' 'ecd45904664fe6e7e14ff3eedc01317af0a3c309e7bb0ed637a454e2debf6e2937c82c31fe7a13824ceb7a4330020f370117b571e7111810573f14c39cd960b1' '172f0a5ab3f1dd5c794d07925b25416db9afd36a547a4690c09d3f7466f5930f1d685622896d350fbebbafb818307bcf0db1201f7c48abd709a08632a2cfa396' 'ec490f04f30d5cacdf9bb9d58bf0d04084c91bc4c5022eee80ac0936ddb5334770adea7dd5a6ed9e5782d72827c2fd75d57235964b23e14332a3e6dc51f122ff' '78fdb6c5bdf0919ad49605f53f35b31dc8b1dd5aa1b91d5adbd1b2494c2daea5ab0eee1e00cf60e7de0bd50591ffe73a0ccc4c3c75d97b726c23a863482c9af1' '4d56bb4a412548c5e61c11c5c17c3a9f78ee387c20d0845353c93893a2215d72fa7b6eb86b3b26c73b26a4b2298fea5ca7c3a9dbd4a19ec0c96796e80b1e4445' 'a473f95bac0f05dcdec5f14a14168355376bcfa36c10b05101119ef032a3edd2aeda6ef4c138348e20d061087b5d0fb643d5f3e0d764ae3c241b50d92ddd8c3c' 'b06f419d9ffdae93ce9eed53af2320714a8d030149c674e5ee31ee029f904f95cf9eb3700f1aea0477cec1ee8d8748b2c187e9dd326a335dad7b2eeb6bb98d1c' '6061ebdd3323e80775927bfec4c31da09caa1ba446538a729f5d411f8b2897912d5184fe58e0f409dcebfb62f127eb381bd617c548f08ace00a1edc12fbf8b7e' 'cc8e01d12792478e5a4d944a9c636def45b6c129f8297ee292a3cb0537cffd87588daa9fe0dcbcbaf1f35ebf70b60408e219328faa642a65f8a0d17d62be23ea' 'ccd89b79c7ed148b0c3cf17ec426c6f17c31cecab47a7542413dc0de93c771c79b18c9bb15b56161511f0ff08fa79aaa8426a691f8d340b63d4efbd55c5ebafd' '61374f38ff7e3d1a8c5d65de4f95ffcbb437e2ba0e5160945ddac2bab2a23779e78f3d4f2c265558a122e5a744d681118458c6a939c3bcca547b7c90de998dd5' '333e6d8fe81a4a4bead28e767d50de91eb4ad6e699489f5707de33abecb7a0dfb737843e822f487eb2a5e814b23de1fa3f8c2ea99c47a2652f230d0417ddfadd' '00637837eadf37d41db11999373ba01a8169a8084cdfedf824aa8ddc9af39f3c77e70cae1e53079497d3501a7887a66f5ce8862c8b08c794bb3ec7e9197c9021' '9d0e99063cee5beea0de06ed9a9fe13bf408ea12447d89ed20f35f3907dc945ff0136bda7544925d90b94d7f1f540645d1a2d90abc7ad953d9033dbad8d04e78' '8a89937877dc1510ed762589b40770138d6675acb3008e9d504f23a277de0d7fba0e24ac90a1033912cd9e9830ded2c638a313d8dad862b1726d1111e1a04583' '891d0c88db54378306862e644ab2b46c0f95d0ab98c69167d4b736c5f39b87e01352c487230b9496fe0126eae151390a05c12b1aa3327d86407d84cf46fa7f38' '85dec4b8086625cba7d120c24f95794959ba6babf943dfe184e12cca704bd78983f59173a06f25e54c56c76706f3bd1d03061a925d1dad619e9aa77672c3692d' '73c23709d2d994877da5676abafda891c78f830649f908d4f90f5e9033b2b30b6542a7b5e2ca1592874e112c270e73a8b4c783288b953b19abdfdbe73c6949f2' 'c7027c8dec0659662e357468657ec2befe1e4bc50a38acc99849157b5e0a227d574a6238f14335348f9d41fa419859f34f572f2072f01d25d4348c9cef755bfe') # vim:set sw=2 et: