# 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.3.2 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=('e94bdb940327296754324d8fcb055813247a79d377399b84184e0ff80123240d923aa3745c3076d37f06296c8cc49373db2d8e8a6ac4edeaf63cd56ca4652e35' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '87703239b301352b71fabe48a6774c1afe99f7cf606ee747fda31261780ed6f2f84b9e8a0503ed1d0f3dd5223127eb6f5471f3ee83fdfa5d29cd05920cd29141' 'fe0a40b58436a3e56d29e902d9d1f53a4b96d0061cdeee7636f10305f99d6ec8cf5f09eeefd333f8eea4a95a67af4e65580c692e4b675e033e1b48986a179224' 'eb21430708eff7c9b0fcc0bfaa9ea1ff5e1f103a79db4e76237d0ccab60d05e7e02f15fa3d6d2b15d6d7b6cff2a112fa6759e00d082b8e5bc46c45aac82fc7eb' 'd8089ee6cf3691ec576e4e48a04cac8563cb21b189fd037aaaecf64896802056264e781be549e9c2b3d287918a86e4fd885c1148cd334e403b66639c10d15e0a' 'a6ea6907567d86bd55cdfbd5a7a8ece2e16e46db2d615d3e8dcf49bb0146856c593e5b8ae11784baed32524891a839306c106fdee0e9d1c03d99e6cba042ae1c' '52a7d864630708bda19fd8ffd3316e9f1c23d4f6ab942576be64904d0850bf0cbe1c47c0f1b20162dc0b64b314ad5c9eb701472c3dcc0190c19e1363eafd7480' '86909013795eba1889fb079460209f7bfeb7429579e31d245adbca80c21d9cb72c0ed277c9a5e5f5640e3d113e3ed318194ffef977d79d3e48b9e3ee12ca5c2e' '4d0fd1601b32067a74190a2de166c3e40af0e9ae1679dc9984eca489408a28880e698f8f6ad3662b1350907fe24ff3684e86b191c1a32e6800e6522c2ef1de7d' '1ad24a2ff99a8c472b1af38e536804a9894317d4206d105d07fff6700a6de0593feb0241a835af4ced6922f0ebdc48e70f5c2fa444b460e1e2a68c1f6145ea6f' 'cb6d6d75f363e468cf3ebd0d11bb29434ef97fc8d03a66a9a6bb0f39cb729911841255204f73f1d1c6d0f8964b563ac90148e40bc1e17c584cde883e62fc6682' '88e750dc1046fda5b1f5e3035dbdff0164d9935189a935abc55ec38660e246ba65af928545e4c5c1446c0f21bea8a84fedc02576b802c3ec2ff96df948e565af' 'c03259f3dd32a572ae9abd239c66263d288727e9d0d536e3d9932b91308cfc4c8dc848d5146a3ea5c49a5ef59a044f35e656ec510fc6c908bbfb1615e248464e' '68d4b83823ee10a4e99134fc770501f6ede2408a19f77d464d2a547c945e9f5311f554eae80f9ce59919f0427a509ba275812644b336ebf1e2aa91f4d87ff36a' '00c714e9ac248086802b1c898802652d2dff10788cafd8198fe5ab8da2595860dc3e7bc97b622b15f73d7ba4448fa21fb145e984683ad43a6ec829e165b23cc1' '140f4c382059d62063bab4c869a33645a87419f23b6821913b07d6d7e25a320b35cb00c2ef96f3074e4ea9a717a611d2b428b222b57cc53b080485206a8fe6bc' 'ba7a3deb36ba6d846b5f415badb8a1f1e9861b2be73ef6ecaa98b935371947c5dfb04a20221ecdb03f9b77ad61463200bfa3266ea6260e4fdceecfda0bb6d25e' 'cb9ab37e921954e18e8f0ab8de5e94b5b2045ad06de725ae00e9d906ba5f3ba93f27867c0a8bbe7a4f2a8078283df684f70e991dab7d57b5f035773e2a1159d5' '6094096539623f8fd769200240df848cdb0678744ed14f747a3fe2d5391b85bf4bbf56fae70b401445875e199f16f72d121093c9ac2e5f49915257be81fcd4d4' '1f5d6ff840b8ab3c7847caf34c5c3f09c62d821c25d57fe0b952c9aa796813062d7d5a56a9d2fca34178b612a67f7a26ff5c5914b25772c46da3c56273628c29' '98222a2b3da07047771d29a5c1d42c157a3ddef1d4b70c84c389a374baa1dccb03a6b537fe20165f0d83d83cb1b0b175fb355573cf3318cdb43d2879dc73db4a' 'b40530daba74eef5ef9d2b076214cb45af1d346ae9189dcd4c56bd394c2a5626534ec683934997732112a4451412cfb941b4844714e9d4077b5dec6ed1951894' 'c1de10f414a807d4ced5fb15f8228ac91034cb049e10cd5dad4398cee1a8052988b7d54a0e44f167a015b96fae38e0d951aedc91729670a1e637a01380949fd2' '9e38e13caf7c2600f96ca6d64ee0e908d75ddd34aac1d4ceb219d6c970ddd23fb18203109eadeeb0fb4ba6495f6683d9c0589679b5101bd77018b4fbb76fc8cb' 'f3815a83fcece641d78a1ce9a1e09796558947a59cae16e64547c33e233e8035ab3c36a6917c67855b87a0d19099a2ebc2ec2cc5d3eb65b5d58d251826eaf060' '74771989104ae70dc5a6f1cef24f9af5ad63575cdb9f02cba97160e0c5ffa06cbd53d2c1ab9428d8aa39985e6c5f014852926bcf90728696ee9821b9d1c4d9ff' '626aa8d833e6c4f1bfac8bb48d0ff0eb02a59a56371d35a6b06d677cb0d152f19df27fe6da7fa79da6807db7703310954e104288fb090380ca85e01e7d1acda4' '54d2c25eb0f0a24c0792f5cac5d6975ea93074accb4f7baf9fc0c8cdf59539b4c0410fc14ebb2b811489c46aa7e1d45001d00178ef2f8a5237e8abf954297ccc' '3277022ff7c9b514017ff2807a293b7c3cce592064c9df761231f05a062c61324bff4045f842425c4924fa7ceab86cee0e388758faee9cb05023a8a216400a43' '34d6e168d9c071dc44a64edf1578cd42651162027945de4dd2b754f2d09c3beeba5a4fb06c93e7d341f5ad633af96c74266700b549561724fbedaa5c75705ada' 'd10eb1edf5c71fc68ff68527bc8ecf0639d9d544ad2248daeb62713e8fe88b85b4af4b0b6a8ee5827495cc58f0d7ecf3f172b771418497a3cd1c280fceb7d5b5' '5cb883cdb629495e3fc12fdf3864856563feea0398f42fc307d896a0f328f59ef34fc985c8c4278daefe42ab35edcc7f692aa837692b15df15e12d8e75f68350' '638c82c4d73580b861de5db84286e1a222eca02df4b2839cdd0c898c32da476e98bdfc68c407c356ef9e213dfcdfef120c484080168a3c052f06999aa1f8cb2b' 'fab7a6eced1f57439158e3475e5c84269e2cb0140abd4650826e91bc874eb6d73d376dd43469edd7e9a7959f29f07e7c61f3a0422b823cc964c938dc3e73ca96' 'f8906d1a55ec8a31eed73097d38c1fe3a471bc098968cce2abe6cc0a14a945dc83f0f1b4958bcdf991e57a623e2691c28832851aee6baf0aedbeffbe93c1631f' '34f094a94628c603af4fb2438888686cc98d0b522ef6928831fcde0295533d91b68cda844e922af46b45f5674e5c3f7856d875241e64c4efb2024ba6bca1d466' '6d6ae6cdaa5d72d17bacfad359cac1f543ea4ea913e3daf20b6c766e0bc82875b6cda21b055a6dcbee35b6d20325de74f9d8563e8516597bd75df48dc02da274' '693f6ff1a9dc21ecf61646f400898ff46040d337d330d1d8cd89c4a2e5538b50e1fbd8426a1581d37e131a357b876153e6fe7cc8f18337c159ac5a1f197bf536' '24e3a820203c64559e2a9b314eda53143a35df4e22b238ba41fd70f9e75202171342a2f21b395d5f0593afb1f3c7383ff837e6747cdab71f84105110b8da503c' 'db70e351b5eb950d8a1be27fcb113ab37af17ab0e79ad48c4440b70dfe61bfa85dd8d36f850e64bcf5dd4b3f8b9cd8893ed3b1c0b1567b0aaa98118e9e4606e6' '690c6450b23f809061139d2f99f8fcbed1e4397ddb856d97d68818164df9a80ce747e6632477bbce1e69f6a7515241586c4e3f2520f76bd4f558ab95cc0c21eb' 'f6d2476ca8c15a18ea1df7a4dc79afaa71e05c054d4c509bcf1b06ad9a49321918455a1eae366f7d271bfdd0028812235f61b0bd08f41fd744530fdb0f1fc0ac' '7c9277b76fb205b28144fc6d0fe7d3b04f62bb38d3220d334a4f5614bd9faa8a2e1326c01e0a24bb1af8249f5cb1ab40f9c19d3ac42feb8594ea562255fff5e6' 'fe8c509fae6222611d149db428e8b030642faf4a573ca123cb8752e36d27bd6d1c70184cb75da04fea1fc532b72aef3c982f16e36374e07ad1061d6ae6777769' 'b387961ce1cff641c18d343f11bbd2d275585519575adeaa269d83b4c900032b0a30c12d09b920d195c01cfcc58c5f87d5efea48dd29e6a80f26d51ad12eed55' '46fbd44aa4e58d091e1ca9075baa26fded70a20ba7747b38f4729ec75f710af4af087cda41ce4cf799cda5b989a15f8f931998230db1bc940df52dadedc9972f' 'e73307ecc0892babdde468b252eaa86d12d0f6fdf7d464f436e95a5d9c36f3f22eb8ca5a5b3c18054f4474ac5fc370c38605082141d21ddf0c190dfd963d7c2b' 'e7cb99bd503bed1865d77ec9a02751f745282f7b7eb6dc116a000e556b5d2a06593ee211103f021a0326ee8ccd17a38c2dc3974c1d3b35ea1b01c9f43bf95e77' '1e23350f260965fdf631b9b80808ed95440b62b30fa4ea2b9497c31837c27cbc71105c0ed16b24b63854eb7fdf1c0f00eee451bbf5c311e431f43d994ccab38c' '108fe59a4349e0a9e50db068fa77842dd57143b263b6979b3a5aca8c89393937af75906d1116207d4693b271d211204ba90b4ca817552433f7dce7b5c45683f9' 'db90d01f0c666596c3aba2d6deba5ad78225a3a8ba9a8b2d5c2db7197e8c6df4bec31283ec7b5154aab10fbfe5bdb7128ea0cc8bad941f7da63c62b9da279099' '7855c576620b2f717f7d1fd84f855398a249e8227edd979a65610810cd61dbcf984305913406dda5ae3489745a4a9aa4192bfcdc6c63a983cb8ca674d63ccb24' 'cef5ddc78508f47f79432d1b45e3580e56adfbf9bbb49f2944d869e52536dc54fc75685d77ac7020db400cd2cfa966fdc44027b133ea3a708de400468310200d' '4dc0c67e379a6f620005a7cc51ea904c007b0429a002391b11a065414830fdb06309eb60914b17c93e06d7cd201fbe6617a5b74c7c229850255001905bd25b81' 'd85d41f44aa7494f111ffbaeaa220de81c39690172af2ce421bb19ed9cfaaec65530f349cce859ee3aa24b81a293e6110b91fd7820f06ec6dceb0a827cb6e0b3' '51a5910c1638171734aa0c5270e9c294ac38973cae021b2a4abfe1b133de08e00b5ba257c29d786f183c69bf0c12e5cbcb94491f48b3db8b89d7df409be8afb8' '27f1de38f31e917907435af8c93f436486b37767dc4c4c52f8a7fe306be86df8dae512273f044f3e9ac1b35ddc90174c74f4c0e04e06382bc529654735387794' '2b72ff288a186267dd4c896e185215822aad89c45e7de3f4de134ab6959f24212271a936d17d8cb45b819477c82d3c35305c0fea602807e6bd8070fbfdfdb618' '6ffa2f2f0fb451565f2ed9ce32b0fbb888ec05ef0e34fdce4c3c2b40b2429af4a596bd4053f6b20be7741012927790f61a4e49f86af2d69488674abcb92c580a' '1f82e940971452f97a0f10b4b4fdad4d98366dad1cecd63abc7971df5737f63cb2a5dd2b40db039268466996d6d44ae4f2e0b28a56bed90042e6ff230f18b093' '7e1e74951890db1d57a37b6ef597d753b731bf4e5745f24368d0aaebdd74a283db840cf421b5d2fb352c971178916c3d79680b201f0d7e7defb17ca28fb50578' '7f23eac3254c6b037d6a7430afebc12a0985581a74989d5265f5e19996f19d4834a1551221964004b5207dc3a4feb55b96f351bb9924e20c08d8328ef8dae0b4' 'b4a078bf3dfc2bf862cded64adca39cd664e6942dcabb575d7f8ff369049aba513e45253c8a6749d4538ac42ec5fb67eefcc1f95c8e8548f6f2452f64b4c7577' '6f4df2f3fd9ff7dc543432c4b8929c358c0e2b9bc5bd22bd7093f52315b9af5655a5fb030e87dbf642a0f5dd63ebbbba06772b41ace9ed8ba566c394149e3f0c') # vim:set sw=2 et: