# 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=115.2.3 pkgrel=1 pkgdesc='Standalone mail and news reader from mozilla.org' url='https://www.thunderbird.net/' 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 botan2 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 freetype2 libfreetype.so fontconfig libfontconfig.so glib2 libglib-2.0.so pixman libpixman-1.so gnupg json-c libcanberra ffmpeg icu libicui18n.so libicuuc.so ) makedepends=( unzip zip diffutils python nasm mesa libpulse libice libsm 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} vendor-prefs.js distribution.ini mozconfig.cfg metainfo.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 sed -e 's|73114a5c28472e77082ad259113ffafb418ed602c1741f26da3e10278b0bf93e|a88d6cc10ec1322b53a8f4c782b5133135ace0fdfcf03d1624b768788e17be0f|' \ -i third_party/rust/mp4parse/.cargo-checksum.json # Make icon transparent sed -i '/^google-api-key printf "%s" "$_mozilla_api_key" >mozilla-api-key cp ../mozconfig.cfg .mozconfig sed "s|@PWD@|${PWD@Q}|g" -i .mozconfig # .desktop file generated from jinja2 when build flatpak # https://bugs.archlinux.org/task/79590 & https://bugzilla.mozilla.org/show_bug.cgi?id=1852091 sed -i '/StartupNotify=true/a StartupWMClass=thunderbird' comm/taskcluster/docker/tb-flatpak/org.mozilla.Thunderbird.desktop 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" # malloc_usable_size is used in various parts of the codebase CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" ./mach configure ./mach build ./mach buildsymbols } package_thunderbird() { optdepends=( 'hunspell-en_us: Spell checking, American English' '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 comm/taskcluster/docker/tb-flatpak/org.mozilla.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/org.mozilla.Thunderbird.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=('983547b2be67ffbe7727efa50bd925f576ec19bcfcf940d5d36def19aebea27494b3af0a37756a441b544ebbca0cf546fcaf8737e76a859b4d860c8294bba1dc' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '295d04ad81651876847e9fd1352c9a82c06570f8b20f05dc55544ebdaf17c131396508af1b77e22f0f41320dad0c1720a100f7dfc6c4691f62a90cdde7e61455' '3f1a56446ce92ed615332a1a001f38e036b5786a78f01d64856e9bcd4f83b6baa89cfed6dae0ce75be76c4fe1313db769362562b927300ff28e1be1b290541df' 'f9e66762e197483f53dc775eb315a923e98ae60494b82e7d2b3be4e9b8a75ebe6d6c561f4c7bde057e4772d25789563b6b76de71905da6828921d1014d5dfd3c' '4def6c67f50428e3cea9eee29170e399df5cb1d0124ee879d92df50e4d5f1d6426a2dadec8c1cb4fe7618b7fae669f6b07b07fb2247d22fa92fec4ee39cdd7fe' '25ac28a576f15fcc43ac5240fa637e610ee0fccfa08ec1860b61eb14c9c49836e4efd246405723fff05bbb410c901d551ca1c153a9b3331c33d07c5c12fc4b87' '4ef1e777d1e539c77b1e99e2f4c59c1746319a4a91e4c4ce5462fce7d517c6946698bebff97223b3faca089d33700ef546a728445e85d9614dd48f49586d04cc' '03259d32f81cb3f6240b82f00b225485837c110d22c8ac0ac73c16599428e407792145bec916e9be34da45e4bb7fc15d021cee4633e2a95c1cf4000cce4e8928' 'f0bea1ddab84e2a3c6da87d742912081dd43247214367476df6f370b4166aa03b759ae3d0810bb63a21dc6cde728abdaadfffbca49740daf90fccb321cfbf38a' 'ac309ab5bab209f01b97d4e97f6c76c65f8f632f76654f421b36ddbadc8fd567c72bb18697eda6c6742902685faf14d3c32e1bae84c7d0455cea79bb9d446038' 'dc2818fbef11c4577b0930d120e10ee3bd7eb59de4fecb574c0d592f4d59d1a0cf5d6ce970da57258c529d18a7f6efe62c3ceb0392751c2f6009c1f5c452bb06' '47866179c361257da0ec6e36b68ff2df6f8e14999091e63675bdaab7c5e4615202c9c8fc3035f981ebb2aff7d248f086eaa76f0f6d7d7b7156e075e952214157' '3279d045f3c692b3b9cdf0f7dafcbab7723ff163d1810d2e889118f52a712f503f1a8b6add542af45c62126545eb59848e2715807462a13006059bcab5016e80' '7d74243e0ea60e09d1d31c25b71d3031cffc383463c2fdef48e248a985598bb7ed8a788e79bfa1da8cf224c3802248b9741f04cd9606a00894765f63c19fa6bc' '583dd7821a452b30ada35189225833eb3e260ba0aa479c797178b1db308c05a192a0412c7c1720ce5cc34a6bfb01973e8b873572c74465d3b0e7bac170ab66c1' 'a0c32d1767807dbaecbc25971f183fff0963e02d3c59e19120cbfbf2d91765bd51faf73bc7d6349532c60eee28e052fe9aad54ab50291ef4b6134ee2f068fc2d' 'feb7e28aa247f2284c89de3f33c6b2263320bf8190593620e6c830674fe870dac8b3477b33beb354172c746acd52b86934eba1012481345316aea185d3541ec1' 'f7d73c112535fe03a6fdfcab712615435823935e7c5b8d312e2ffd96fa85fa4dbb6666873f488f97d254819238337dd70d4c8d45ed2ac85c05b3964dfe3d90f7' 'e5b0a4a9a2c1d3f742af532e9666de34c25132405188362dfec100bbade2e78b52bf640e5b664a686981a544ea3b168666b1c6f533c6cbdf05bd00137cec5638' 'd2324225bbb33730c49d9432ffa9e0967b6c00a6a107902e65c3dda0b32117b5bba67f73724ce40dc798cc8afae261f15a8f632914b8905042d97de7b2277311' 'ec5c2372b46fe6922c1ca3bdf684e4cb4051d2bfb71c0b39281543aa275dce328819e894f1e82720b03a9f74d17f749eee9fc0660999b30c77355ddabeaf7028' '5e6be5da2e512cc20a9f8f9cfd9cb0f42d099d2df3d9aa03f97ddf60a64484897591e470dccb8a4c53829c1c17a460fa5c9b99db6a374b672ca90415f82a9f44' '9ad6eb13f73de43c088724a47a5e8fc2ec9184618484c7947227a034de0b5c08e9515324c265afd36ee0444cdf5bc2beea1e14ad203bb67777a27f7eccae919f' '091c906901f3ba671e0f66183b499ca4049598d0515d1743f6bc2fecd24f81af14ac3b4949fa123501c16e07ac9ba3adb34a32ae33eda5347d957175a4ad7f9b' 'fbd4502a2cc9fb0ac9580bcfaeca6c7d8362ab74490fc582b59613a3574b28461f1904360518507a29abad04d80e93c0570e5d0e57835abea134bc6e7022625c' '8d80c7eb491f3e8ee6f90a5620c0844231022776b84906fcb30be07a441f950b57d13fa62fe9eef6b2dfbf43e618aaa49d8c0ef2de0f36a9cec0c4a8822a52ba' '140bced807cf6d9d87f47848df4c97ec10eb158e174383e31cd8baaf77d2fec0df78936acfe4093b6f04c11ac354e55c0eef55f53ac8b5f29a0145ed1ecb7848' 'fa9dfc42a209c7b18766c3fadc84affb05f109193675e13286deb81a3f26b1dd3498bb97a093170fd630b473008f3b40847c2fae1b060ce60576f503fb71535c' '96fd00361f5815eafc9cde41db40d1b13e744eaab8ef98d5bfdace9817b0d3402b681a8041c3f0c34b65eb7e9670d1df0252d46e769af4193cba94e118363ce4' '8e940da705b77b845b68e0f427c71f01ec8d28de7cd3dac8e0e2490b3c23bd003f0fd711f4d8d16dca88a78c8bc4dcbad2b5965a3f564492e4bdad0011023510' '0c45170c2dc5b52b3644ca73bbfce1cf48c0a8563a21120ca960d6d2b95562f2d30e76ebe0451818ad918c546c666808e9c977200e19ccfc323bf2812d4369b1' '6b45ebabb355494f15c6a6ef9fcf751edc9e7511e9ec4f0477a89c27fbc27e6b1a9fb157cc8796e51ff031b9d49c212eeb643a62ceff0ac5ebdaeb1bd60989c4' 'd68445db4e087062eaaea08300402924d3e79e093ba8eb952e84493202f4ccabd2687bfcd00623f2a2b9fbfcae32c596e5b5b0ce832f42983c79bd00597e23f9' '8564af41feec41c6ea2ca2cbf7de588c46c59cb9269327228c966c0e4f41fd889ac1fc8ce749fdd326ae8f367a3a65bb10f9cc837137099ac8b7afe20a4f39b6' '72ea5862ab418fb6566dc2bdbb5772e98862dba6bb2f10250c3d19807212f07e4db43036c17fb14edb6d4cd89a1e2b422d4aa95e062c2a5b51377dc4f4fda524' '8b105f8ad5eb470762949d5afa824d37d751fcde8b554952eb8ea823687b2354df30e753776a869776d18d4f1a44322b2374cf161794d758769ffd79762c40a4' '3bbe240f5a90f30bce907d8a010333907d8e3d51a15d02393a3b42261df0ea62aa1677fd129753df0e9b2ed5eae02cb25a19cdc0c7c9cd82e722fc844ce10f24' '4cdd7648532be3744299467761e6228a0579f309f7e8cd2ac2905c27645a8a66252c20354fcaac6d934913ef82926ef87efca0ae5902f681de38dc5181a7c47f' '9b940f154690096dc6e2153a5a9d02f389326932fd9f6699140eb33cc6fb47bdc45a74d1783c2042314f7a300a13fdb4329d251e2c0885adeed87246d1656c3b' 'dd1ca450f7894a92f118fe570d9924bbf052a26ef5b62952ee5f2eeadd0cdc747703a7e2c1a229b442b6711e7df37de70b9a04a9fcac49b40f04d38d6e37d452' '520a2c45a3ea77112417393532b29076903788b16cc02f231905ef110c8dce8c42229de26393eb9b4bc728ea0a6cde192b2134d43e312b87b47c9d7fda7ca6ab' '0012362ba459ccb2a441200784b01652520faee5a94d774ba4d54856c6e535c9ff0b842195600e17198fd4a132340e819225fc01a1114e006cc3048b22630f97' '5b65fb881ce29952421a0656f206a71170979a0e7eee741ba9982f569856f5bb66a8356ae45801480156cf5e097ee1b6e71064041f477d402299582333d7f52a' '1dbd932c07632119c2f7fc4aa82ab9c704966519d2385f4d24f70f1d001a6bf5465af56a09b67f033b2e31e6ce8f66a2e1c6fc96c0d99b45e7bc2ea49d393a00' '67d87dde60b4adc0979e3bc328e847141ec9f948f961a49838cb98679416fbde7c5dd8c1fd63d70881d73f70ddcfaa00dbf8307910e9c2284f7ef4260a5bcfd8' '8689dc3502178ecbdc3fa3e1325343dea8247edd66ca927719884bfb0763e4f6eb5a4752ab9252974bf5cdb08981cbfaf6a44c133ae327dee78b744a635fc9ae' 'fc6fa335c126a5a9498391901960ef19cc4bdc612d99f495bc3b8117d7ac749b15167c2e34bbec68fd37e5522abf0aa0fb970f0ea72a843e3d66b955225d0163' 'e2bcbf554507bcc5913c2bf87e74c029a588e1625c39c270abed3031e6933c0bb6983ddce40eb69e015708485005e87244ac56d7b330f54f6af251762b9c0a60' '1e54ae3665a18fc997041ec8972e49bf42dcbc473f00103cdb671f60afffd82f60f01397c4559de8b96238373c11556335a57e112a4eacc95bf288b03cfdeb8d' '5991d7c5eb287585a7b5eace901fc8aeba46ce998c12f9ee5813f52f84fd29ded7a59505328ba2e752bddfe28d72c3f71cc4e565b06d961f0cf2344df36004dc' 'c2748cba6542c6cc1c50b5d2a369be19c4c2ce82fff99421c8e713219bfca12d97dcf7f6aa25479230f1170f2c8f9ca2917dedc073772848c2cb5d4d3fa54755' '243b8ef81801dadb8d89fa9533a7afc7f010babddeb8bbd5e11721a985f9b4ba4db083210144c4906daa662cf51864d14c2357662e8f12cfa4a6a55c0cb97567' '883448318a5dceb86166224c447750ce592aa45dfda4ba4056159cc41c00dfb19f06eb3611f99d96a224aebab46c3dd2b01ae26a78350d78302b7cd81c3182da' '5f2bdc8245429cf815384212fa51bdbe3964408f99d913e6f6226def74eeaf88a252b5f909323f1906ed15970400c677539802b0f666e2036204c7f247c53e8e' '3db77c06451d5dc9fa2dd509086fcfad82a1c94edc7bb7ca32456f1b3c3d416ce31b2570cd8e66884cc10d0389621a3592ed4415fbaf46f7596334e48695220a' '194147593f5f9ae15a7d1b0592d772c4db9a01cdcb6ae01f834cb2143ac4ddec3edb39f170f291c45b1a2bed5cc9c6bb9b86f40ca910ba547473704e2c57bae9' 'cbe50ff4bc393466ebd952d1bb9793135c9773dc7b2266d67249e02a5a4ecf8fe83c3a73710b9e26d4bcbc56d952dc7a7056f548e691ac33ba73850338c2e3b7' 'd3f20d1e97ebbd9338e4740647b05b8fae9d90a336c22cac8610e20982a86d6408f030a08997a5700f0512eafb738e097625f2a34599792d417ead6c70bc9f2b' '4c99fb1c07da37a8e465ba210f3bf67b2bae03c342c408660c764d7a6b689e331b36420561de6c57dee09366be5e46383b7772e0eb61aa1e55117886a041b9a2' 'e5f376ef17e43031282abb4e15ee45e4fe937065a48799d71423c3ada35c19d52a1f0ca692ca30477d78715db3b379b5b40b4e164cd3f8c0e6faf0ef589fc9bd' '90985a31889fbdddf03d80f40f626db5b62284d3ec5db90171f5b1126f00d6e794962d13ba8f397373911faca9f61aec5a5358589c843044a3c61bc0f7fd57f7' '8764e3ba77472b482cefa19840c457827c3b47cbb81f6f33e2735ef12853c074551ff6e793f3a8a1845189d3ecd7d22e2a8526bb45af32e6c6edaf5ba30fa2e5' '54b055e0714e58b50b749ccbd3c8feb36bb6d33547a87d4e9db7c510b3a223fb7123a706de5747d81b282c84b6b1f456a79461e8615f9d38c659af95ea7f7ea8' '26db18ed305d8007aa02f0b4e408ba259c0eb7b2c2ceced9f6bf40d41576a84ed6edb532178b8e4e17d8e98c186281a8b9b2ab51c807212bd6d822785baf31f6') # vim:set sw=2 et: