# 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.7.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=('6310f3f122a1a61917ec2d0efe3a031b199ac13681e9fb4035abc0f4de0dbafb12accffbd63facb23f2cebf0124a13f7538a33176a2a513d1f685bee40db50ba' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '36d9662fc94cbf7dcf371adc13a9cda679bc75df961d86de019d3c8ebb0be3062d5ef762d175fab58696db74758100a65de45d7832e0e2bd4e15c901f72d8349' '9a0b9f9fb6098e9e0051213009ddd6c05f4608e8b8778111089b366db27c304cc77172595ea37c6a6530948b4fe7018c4adec0670b96c12f05ea18653b868709' '83e2933417fb44d68b219d70fc41b1333ba295bcdf5792d4396dbe042465dcac7352c2affc37b36a2fb7bdc1448489488963fe47dcb97babe10f332e7a257968' '738423b909333807d64e2660c671317a64bca22b351aad58d46a3dde93eaab9476fc8025b5c428aa6ee961cb2d58a8870ee4e046f50c64081402703d22edaaba' 'a8e8a01454fbc87b8d3b5ced6845fb1b1c0c8be3bd5cce45ae271767ceae60abe1e6413f09f61159be4a67b41eef81145e77a678b54c3cdf0034174684c3602e' '932475c25f350609f20a77ae71c7d8e3ab7c30c6a6e5298cecc9bf8954a4850296983a908bd17f1ae0786dcebfde1f3d78527289e44696490101b71bd0ee6e83' '60e4703b6e49ad584693da2f204d4f6a97dfe7326ec0b3c43b8622fc745caae79f63ebabcc0fdacb184fcc42dd02505ef297b5fdb0fcdb8f798660c578a6efb0' 'd75d9867903d2d14d42812c0a0c33c8a58dfc616d7e25c71d5005ee7856e482613341dd8cf85f5e98d97eff9ad001e79808926d298197cd776a02a407dbee061' '6a9c603fd50a05aa3eff38275d1a2a3ffebad003cdcaef76265fcd54b384cfcf28fc9bc522ff939cfecc009a3a119d70a5de4b5ba4284a6d08f46ba8ca2a0f3f' '7d5e588b88d2ea11423c809f369b85e870df6a12f3d21c13afe77eeaff9c9283a855b34339da0ec3dfd0853817e33ebcb78c637af25bb72178e456123d1b1310' '602238caa848bed36650c90bc6c7204c15baa8952302d3c5751d3a27c19d236065d0df0946d764fe7f98a260de9852d5aa796ee469f5b36f29a4bbbcd117fe31' '4c78fc216f4090b36923f2049be43f7fdeba637a5fd454dbedd5deb66d0ba00ef0e6765fa86f49198e4dad3f6e17513d29dbdceea1b5c5d4ab456ba3e2a95afd' '5b3886e7619000283c874372615b3e2b63af56f6c7c252e99c61658d1c6a75885eea14804042f54ae789a56ba9d8ae443538c666661762d586c1331b798ab650' '483a2dedcea8c2e4f58e7c2ceb5d6d39ebea5cdec7d2f608bfe53e47d51314fb0e7a572d47610d62a878f7d1df51285661fe2f2202daf0b61a524e71bfd9499c' '49320cc6832421ddffe9ef52adbcd97c2ab98807257aa914c6588b9b41a5105545c754fcb867d97d4704eb28adb3a7c1d6f71d8e1e0694edb819f63709bc748b' 'd663645c64de389cef61773f42d2569a5aa99ce726d40c1a87c81bce5bb67d026ee80e0f2ac585cfbdef251adcaff9bf0eaf604c3563d979e6528fdc6b23af1b' '5f76d33d880f492800047197b4304bf19cf5a65a9e4e719d9601a92fd08892612384c981246a021c59b9a6a77d07967afe14c267be72f5c01aed612529f568eb' '2058c3e3b692120e2f1d80e0306c94005af1058d5539312a63fd0ed094fcd07fa2f20e5a43d40e34cce60aebdcf2c602612a613485fc6b05ecaf6d1fa2460131' 'e4a58ccc2677dd6be9eb837a28df5526e144367fc5888fca40c32a414403f88128d0aa4776cde06a2f39215d8d1b8eeee6ff46091cf6b13e86eefdd226f08bfc' '61e44874fc3a21c82736a77d4bd5a21ede0d110ed3caf16eda267642aac680cb51d6c68de639da44c5ca1dfda5d5969ab0dc75636d5a1d53ebf92309d5c6196d' 'b3651e0f7ec6c873a837c95661f6103fa0a62452bd6530aa4f2defe77c4cf3092537f364f331f8dc5c74260031b3933f533b4c6bed755dd1ea7eaea8f2d3928e' '00a51c971a62a404804dd370892d518eee42fac04c7431cf3576f21572a3b913ddebdf11bd191462c07ce802ca575afbc9806d40a7b77513d4bb582d5e5b3570' '238668c1a76dc61a1afafc841a50c4428275c4be2c6565de5b44e633062f282c364b9a4bb97be4ae5bb27ef213defc320516810e2fa51f435a88ee444667031f' 'bf128f3402cf0b43dff2bfe2c978bf79173ad8309068f1fb48f4fed343235ad32d4e3179d96e45184e6a9f7df50474368aec3ffad2a6bea00e43bed644830873' '610bf3ada084ade74b98d4c3b80a9e3741ebd5fff28212ff9a37c1715fc41a578b3ba719b3fd25277a36308286c51a7086edde34505e3504cb1f47d9785f42d1' '69b85f47bd937b6f6a0b506cc313e6641fac2bdd02754246dc5e596c9e14969642a9148896850be6db03a529abea1f51e8db2128d970b34fd04ddd759ec0beda' 'c32a5701386cb7ddb18e8ac3716d40fecdfbe9795c4e61520784cdbe8905571115c5728cde151ea7f5cf3092056e2660cb765a802ed96020c00a58916901c82f' '9f75042f9ffbbabc7172ad81e5fc6299e2946b1c3ac37729b63a18ae046bfb8a6e7a32d86c421735cd91e5fd6552ba26caa44ea42c0a93c7d5d0b7cf7c0e32c2' '8bc1ef00426817a1fe48a5d0526d2afd22aab83af8c1381ddb94673bfbd07b0a3b1cb0edfeb3863fc66886481f8407a48d103ebff91c402732ac5445118ecc79' '81df5fa672d97a3fa21356b08d4adc8ef33f34fcbe0d6b5dd25bfc65d7eaff91d92b94acb271ab8c4ad5635388129183634a7fab6dac599dca584b0be6fb6520' 'd81741c82e327d8d8ffdc78fa2e332f75b7960d58df872aa230a42eef25ec79749cc9e4d0679d545b0bee86f261d82b627c1adc5acbba6ff812e65b1421d8075' 'f4aad07c529eba8ea43526b2a3d886216d99da50b25147da7350c3019b995c3381c06d77027637ae8fa4cd606f04582b7e691050a53e1e66bf3355235b158249' '731b114f85b8ed43c9abcc3628a81010a65b25beaedb1ef33f07d7b2e2b65163a5e44ac8d6f02ab447868edef2eae313f88de6ae84ce6f44612bac2d216eb32b' '33a95bd83d8724d47a6561ed618ded2e48fea7a0772b21962640f2d1547db46ffafb5214d2a1cd817469522a78b5edd6900fe6798dc302aa83577378257b23d4' 'a3f820db547bffc03d711c09227600d368d6879b61297138cb7221a99db52f106f8fc8bb90d1a9b109af3355018563aa143fbf64257bceec23c7cf4bd602eb48' 'b65ebae477513d5518f99f60ad62939f43a2633965183b9ddbf05a6a6dfa4145bd1468b001a844f5e766a2c42b095e1e7b8badafd8f4016cc587da43f3b1d40d' '7f096b90ffb95dd5991f2f1e8cc3223db492a29b18f52fe043391ceb41166ad9ff744735a9005c9738d15e42e22bfba4c78833508a084bb86812b676fae1a652' 'e98e731098ed3c5b0745b8a7e67d623d184a90d77d92ee24cfd4a7c5dec32a43a627393ed6cbcc30aff344fcebc44d6f96b4ee2c3fd9aa152a12ba3e650b004e' '7a2311d748a9db46ae20d2837ea6bdfc3976908b2944d5f95944bb869b8c4fb959cb3ed3618ee704761dc93f525b3f59a8f3898f5e1732a45c45a8e64c55030e' 'f8e11b6aa8e247af4071eec77e7ddf1edd15b3d91d965a7e33f9151e985942b23f445c062aa6970f099fa1a10b5ed8673a291ddc9b83d889882c3c9d74285fd7' '405d20a22e2f913a81dc2ab40baf13e659163ad8f03046b2ead93efddfad37c43bdbd2ba5978783f4d5c0c244e688d00833246b674ec1228bbeefbe81ab809ea' '7bc34283408e7ad0eb1aa4e6f4c749fd0e0795d4465fa9514e4dc88d9a7328e58a54151f49850e3142008e8218dabdf838e1324db450833b8713e564e38eb018' '46a02b74365120366c868efa5533b248df860964496c6099640b888da45294400e6f8fb42676744d1a003bfc1099327b35fc7f2e5a9abd58f9a258201ca8f06b' '8c7ac419a4c759f984105a0c48049f50c9c01c32b2b3efaff0e986804a7ac016c4676db26ef7ea3df6add57d1256bbef8cf0621933485153562fa7b7a2defd87' 'fbc94e960ef3fab0779c5a22d33cf09fd8d7e358acbdae1d1e78df355899bd657b3b9b6a6981b3b7aaa07c5e57e8c84d0c88982440aa25067a217e2d4e5c7165' '166c409b077b92a956a8b0e6d55fc479501d8439913dc4fd53db43f6bdce6732b6ac3dff009192e3366b792cd3401896107e0a050631bd367e2bdb70b3beb734' 'a7805529eedb2783cf3d9f43b6a50e573446be027a8077a6e22e4dc37715442275baa4d959da3504fe8704e371d3ae80a1fd68b1e357bd0a68a4e18ac7205e27' '4b6c316dc0e5f2084ee353c5355565b766e06f2c624fe6f4ddd2cf03f4a06aa3170a8727652cbc09eb759f4a80eb67abc6468502e53644a13bf7e92ab9225be2' 'f1c589111a85a037faf10a40938e2d2462ac356adf59808fc9032f00cf90d330119ce94dc3a2d55d8bd9da704748728a8c5a78fa384a037332a13f3dbb7be5bc' '2a06149f323f06919f5c5604e0b48aa893cb493b8eb2759f5c1ee09c66b5a1bd1f2cf01e8979bb5637faf51a554a392ae22a55bb0f1ce542fa3ee19e373a23a9' '3b63648f788d9b2cc24b9880e7e5696ab8412a5082486d066396803d12abc4faec9c9362eae73d2af7e5e7999f0e22997cbe201095899b5bdd73e0b2d12cfa98' '3a32e0790de457d42b84a4685229daed81a39b207dfc568df0d036a82c56bcaf17eb7385d76a298783e3fcc198bc92f5b1c401c5e1e04a6678250c3a54032285' '5d8c60c70a1572fc80d19696df8263c00a931c6387205a4cd661db73c3c7e0628ac77ce3bc90cf95ec1caf24a20f5db0d781336bf314b7e8952036fb210902e3' '0add968d754bca6ce2e0611641c558f8d975521db15dc38e948620633d7521c40209dee4e3f41ab023f50bc6724790497cc13d00e2b2704d0692969df63b2805' 'd5f1659d9abc243bdc45882e54b63bed06d2d4e30db3765b1b6423539d9aea8715a3ddd81be9c41a1ca9a1d29e31a6c64dd570176c5a2a4770cb3cf6c53ff5ac' '181d639e56671e65e48ebacfe238a0af5a9fad6fb52559342a066f06e4415d3d185e8d7fde1f5b0adda6c1ae4683d15ac7612f4ea93a00bb28af13772991f53b' '63e0125d0f9e42414b19fb6785c915a1e3b14f8f191218dd7670db524a584181c95160287fb0496c2ff2274851912674f70260dd997f88463dba7974468961a3' '2fba6ffcf8998455eda8dedccceccd2fc927d40e7ceb30526342dabce98f0400631d98bc5fcc9c825e0593ce6f09a012f64a118b9a8c89cd765ece50fd474125' 'a78e978db04bdf4355393ff9dd9261944d819664955f8e95c012dfc90e6c2a65d5988666abd56b6c5ef966949593e5d4ebfca537485cf903b92ed34c8d72b69e' 'f29b04676731182b73ddf83340d07cb7407f0cc7c224077f202ca3844c0c1a7c569f655853949f41ee564ae104f4bac849111c97c734830fc892e0d57b00cd29' '6093cd2bb8821dc90881fcd1913c2910e9a559665cab0970ec85010b4b0e3cd9ffa8509d77099599debdca65d050713a91a1e6b85e0323b88293bd431105192b' 'e524549754df3ea4a8052430bba789f2b9fefff72bbfd4f735cda474e75fdfcab2a3a0e35cb409cd19db0b1e49fdf05d872ca9c6a16247948d07eb05b7da9ef7' '15a088bbc69186223870889b9333d286868d492f1b3efbe06eeba8f7b15e20ddfe77188a9efa85423497a1de4df22ebe9065a4315cfbe1b1b179e27687885747' 'b1983f73590fbd4313ac8499dd3fb418a35e6080e6199dcc254baeb4aef97c3a98904337959b05bf8bcb5732ba9a7f14066f6da69aafdc9777210341c20315ae') # vim:set sw=2 et: