# 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=91.8.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 ) makedepends=( unzip zip diffutils python python-setuptools yasm nasm mesa imake libpulse xorg-server-xvfb autoconf2.13 rust clang llvm cbindgen nodejs gawk perl findutils libotr ) options=(!emptydirs !makeflags !lto) source=(https://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz{,.asc} thunderbird.desktop 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 echo "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 RUSTFLAGS="-Cdebuginfo=0" } 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_USE_SYSTEM_PYTHON=1 ./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://ftp.mozilla.org/pub/mozilla.org/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=('1591f3e9c76c1f2ea7fa5e194a7d030c8657a7855a95c8a177e8067c5aa838f0d8ca2652cd049b4bc88d0c9e604285a47b0c8316c190e2ceadfc1130d1e4de6c' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' '328422adac0cfe6af4ecdcd864004b7ada8f8171aa954fecc23a7e883e90a9bb0848372faa1100440dc754922f965e1e7b98c185aa88df190bff1051d2146c85' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '698673f6afb6285806bae6c88a619d20ec654d2cd1fc525500022f0300b113a0601be53391ca714b49addb7a8d8be84382892aaf3427fd971925f68e0001bf11' '66c40dd5d43b84ab9aaf2f9bf01dd9e9855bad531022c0c03c018dab4be15d13098fcfcddae7e4b26dbff64f851c26f59985577e8d09cb7ba03a8b303befcb7c' '9477df1858b8b42ebb693681d57bffab925a02ba0be6815d82d65f273c5d52d4915ea129df88c9a992741099df770ac570bc6e169252ef265348ac972765eea6' 'e144d5d1a4c3a37209df9108aeebe544c4bcc33c5d1754884f8378eaddf958886f97b14857346fcf8a472ad78f24af1c2d1cb399fbe73e28d0282e08d04c227f' 'a7e697f83877961f0e687b6c57e9ed3f0b5a5de4cf6089357adbaf1343ec35f4f4bddeb25e4b60bbb93bf2dca364143034286c1cb4c2cc3af0c74186f09a2a18' '1453278f382276bdb6d5344318d7a6b76bfcc863801552d2b4a01f5bd7aa00c218ea604fa1f1e003b74d5721b833b267af7a4cfc4960be21ec940174cb66e547' '6279ec4103c5f8cde8d87fa67911e8d3453663b0093c5b57c6ae04ebf01f0d4d838b08b0effe72ad1bb92bb926f3cfffea6c906e1c700a8d5e0284179b17b97f' '998e7e960c7752b36e523f1302a5f4a74469c2232c531f7dcafe155b0824ded6908ed9865bb10bc5f7dfb4d5d99744c0430ef8a2a96502a5b41431949e9a5f37' '0e7593fbd9c81b026496efb8f2ab95654587ff7fc7bd377594eae866c98d06d032a3a17464fad1645f4414edd7c994d5ee4e400e86cf504bb86eccd8f252a71c' '28119e65a361689be5fe4ae6ee3b823c50420dea2d940911f6861d4c72b466e92aec2c9a8be93b4bde09d499bbf325bf43f3876fd2962a5b9f2fa7a886f69ec8' 'e0e89b9ffef527b7f4df3f8d769b9497efdf1a83bfc126e1a9503609b2982d398caada36004ed4d5a72a33a3fa40e8bef913ea14a8a4bbabfb82aad5c38561c9' '14848fa076d633271ea4ec336c3ce41755f658b51a67d62237a8e544378957a036f56c456ce9cf88735569ab80af4cb80e184da654d62ee548bd23822fce5872' 'a4828d6fc9546bc51c5bf128c87d891c9659e24f21fb6a7ea4bb12d4a3bd4c8f66423a855fbf4ef4dfbf3129a9854cff19f17c4f80bc3cb4b014356f45775eae' '994f03d1367e6b3fe70bd8b1772bbd255505136613f89b13c5dc00fccbe3170ef6220c59dd73bc81555a0cc7a8017fae2d472b5385401a56ca504c407c9c1302' '994ecb8b0452dec85df199e9c0db1b6485c420c8a1cb77eccdc805dbadf43dc86dc64ccc1c35582b30fc2e1d625d35ef5add718808e4e7489ac680fe3eec5652' 'fd770e6a8a9683ab30296f9a40776309095fc3079f10ab2f1aa0f20f0bcf6ba67669db5f0867e029c8ef75a03ee3d92b4ed0f2a98d0a4da580eae9a36a9d66b4' '3093813a60726feea716c6b46660509baa5fc732e0b54765be6429bf2b00dfa5a9dcd7cef69a5a7c963ce9900f0bdc791db20fdc322b67c72f6826cc2a2a5f02' '612c108fc89e84e979154dbcdcd00b246ecdbcba2f4637e19a586ada0d7ebf436f13986b83cef07a8a83e5697079fc6e170434ed83e5c29202cd6d264e1b10db' '7f2a5f1c1204d5857153b5d11eb76ac1b05a9fba810b0a38768438862c0c21ccc51bbee96e3c4da3217c839049b2fec72f0d30c6fafed4b71d31d00b7e176b13' 'a9e64dc7de976bcdbd9f0b9d0c5f5bb256120a127ae7346015a43dffa8c0d2cd55a2c523100124b736796f81707ac29f9e34e217e45725790815f277a699b2c6' 'bfd003432f8a4cbf490504279df1000ee13bbc94cf3f0ce46d20ccd2a373c9901a26b2ee1063681e6324537736678b0f8b7ec4465d517fd0870644863ed2a5a8' '5baeb10395354631562764c59f09518edb48ff30e7612e5f01b5f334e6c07bad743372ead87566b2d15837e9213306fe93a078bcb4719a6718d45986f35fc8b4' 'a0484ba202847e62f50319f26169b126726335ac41c69345225421f8790f6c73b5119b53746cbfa4251545542fcb20fdb1b4deb0e9060fb2082f03733af8d302' 'a39e8007b71b008a64fba4006c2d71cfc908abafb2fc9449c22a771782b1ea2da911361c6c52caab2de97ddbfd2e5d5fb1b65a147aa7d5f3cd9834f047e69d47' '9d1bac64333b2082edb5ee8b9b6e494a25b750f1accab74c2c79bb582408bb776a6bd83b078f2b59ccab445ed2c9f8bffa4089f51ecb18982891a53e7b3751be' 'b0a33d1a5c142b132ae26b11b7258f3707be7c680b4bda6d2a817636aae3b106f6d400484e88368b6acf272b46e274dc6105aaa7be5e2f20833647f46ffc0e33' 'f99d2da0f3c89d0edb3e49b8c6fa7e8055209ba19678f3412a0ace06001b4b9eb45f11d76819b8032b32d9f325b14dca3882aa7cdb727b4dbce714934cc732b8' '852759d628c80b7d155faeb9e90301e1db614c5f1162a2a811597372c22bf1e3631fefb3fe4edcaa5a54584fe89af0ebf3979adb4174a83cc7ec2edc71f22b34' '23b8919329e20f700ee35774f295078767be660d12139eb09d1f1230a76cc320f0d63cf93dc7bec4f02921b4aadae5d10f7f06eafdbbcaa1c9b6f909a1477456' 'bf85f6a83099f4d359506e0a7784576cfa0a544e75762473840ce73c5741fe207cd01897d8d83d464808c13636b05b363578296dc9840aeeb3f88142a5715915' 'e69679b7c50000363e68bf60495a121c9b4e8aeb0b89e36a4b88a0b78b275bd71cb32a7b6b2ae67c9a452c70e16aabb4676b79cbca9c5cbcdd0c770909580517' '64b32c0561a8edde514718ff1061a9e815910026caf58e671c8406ac183a12abd4b4f5ed03c09e0a46e1dd4ff960bea0332b002a2b2fc1dbc2db292cf530b92f' '8af554d31b2769f3e39c829627fbd623fe1292359bd86057b7aea9e5c5013f687eddd47b0dcd83d1d97d2e7143cd07b3ae6646140fcc2979382a79298494bdb5' 'aae751711ce8964adfe9aa431a145b4a93db2301043f49de21028dce6fdab74670a0779fd59177ce974ddef23d830cf06112b033ff2b68793cc2c6ee2b1651d8' '5b852e842fb4b811cf57baeed0eefa9efb60bf898a5d521554b376f41c3b350be8cf2d058757076dbbf7fbe0adf5e7581acedc09662a2d2940f7fd31a5e5a77b' 'e558c45a0064bf49809235ae0008a5f7ff51b26cf5285b59554c2506453b836d31a52a8842758b6392c4e8e357d8c8723ce7277b5e53043b86bf2445bf37b629' '2b2212a7ed9a398af417f1f2e1457d8f6d035b4459f09154ab1e82e57606e03e1e52adfedaefe3b586c79ac5d97261b41504b5413bf3eaca6e498513f300f378' '17e9cf08529e5637a30cd65feb4fc39a2c65d4ffd0674fb67788cdf8c2a3d3830c5135813f73d1b1e6179369a263fb4f8fcc7500e11d86af919da86eb055f48e' '0d3b28c36bbb3a1b3c29fc4cb92cf0a1913f5284bdb10cc8f7fbe02433a6fc4c2ccb78fa6591bc24479ec8a4dd3ba571ea9d90b1d7e9bc36535a88fb53fbf4df' 'e618ed502cc84216e11185e46695b061641607f77b75983de909f7c22f4f05e30671c5baf71cde638a7d5c400bb839a8c124e869453cf3d404b5807b1036c5e0' 'acd4f35c3de92d6d67a5b4329340daa0c1d82a7ef6ecefe94dfeb0ef049dc92a2fb6a92ced709165ff2dd768d4577b9576aa9ca1624aab14bb3fd1bdbd43fcec' 'c0a8b54748b68ad029353c3074513b5fe6dfe37d1cf61ccad64740cd3793c5b375c4449288f47dc5709ee8c423b95d8771bcbdd3e16d20b2c31e4db8b771c1c2' '6ec5dd50ff93d786452b15ee1c1ec9fb560cf422beffb9828008da54928f38a7d51402350adeb8cc7e20dd32374e2fdd891c3e685f1463ae94f2140e246e4ac9' '5369d9187cb1350d97609c51b2dfcf9968b6e2e16ca67a5807308de59d6bb78b3244d1db59e9590781e54f119ec7c80fd7ea02abb737a137a64d4625c1a2e7c3' 'f98526d0704155f699b307936b073f9629c1bd2ff4b3165291107ed346773860c0896713bf309acbade556986387f99c165eaeff062d02d039bb8cdb5295dfb8' '2de6dec6e88557a29970e57c48883640ebfec951293a7dc46dc2301fcaeec55f0651414663f1dd1ad8cbd9d3506a540637e8191d892c0211a1363e9d6a4ceb91' '23bc0d9a7848f1627760e90c41d350349037724b938ec785b5e0b2c07608c9cd702f9bfcf633dfe753e5f7551287898d08669ddfa1391b9cdf0cc1191e485c89' 'da583a0fa99265f11b1016c54d0f97755ae0e132d188d7c6a39b2418930cc110abef5a293626db879e2f417232bcf7c93e690f6fd45560f18bf156d87a6d2a2d' 'e1433036f33f7c920a0df39ad1a3dec4862ea942610463a75ccb2223080db6fe1eabb4af03c8991f7e87ab6ddad8e70ae68f847b0138ec1e0e5e6558c42ac59a' '3be36a4cbae3852fd688c34f7b6ee72fb08b4fb1dd86adcf508ea2f6c8c5eb6a5c282842f017b92fc18245faffc4f7ef9ee4861a33ca12010bbd3f3c86882e2f' '9fc20be6e16a261fc56415a443e7e65e6eae7db5e917331b9a7127b2116b0eda6c746646795da62d4e49b0c871b76999bb396bc3e8aaaf9d8b1ebea46c640dc8' '173260faa9ea1f4fcbdae152b0dc1cfc26aab445a46bd9e5b834e864dd124e2a3b8fbba95fb0445fec8ff77357d1d3c7d9b8a45a30c32bb6b6846fbdc1016c35' '4bc30c15daef990a7b7c3404472d8d333caaf2b94151398bcaf0a05a21899be461d5d561ddd339d1b3ba71e3fe27018e515e869fd6f0b69070e21d233772c0f8' '5d489bba80cc651517f862cdfe5642e225bd4662c196493c0060f50cef4bb2f109092e3d131317e006c4fad4dfff74bffa9a7b076389f162d44c24163ad26c63' 'ae6eb4f020b45069b52429bebb974bcb39bcd2a9b874a96b7e9ad1811ef66f920cc5329ba56c6b9f42e9d9def23dfb7f451e173db5d93c5aa152a61f2a2e535f' '4f3f660e8b3322e4037e6c1f401b863da179a2507df4c83253155cbc97f120c7b68027dc0bcac079deda647a666987958765a4186525a1af5acf1dd05f6ea9f6' 'ce428d16c8089c96cb589889d4642caf7f4fd11842b64ba4570189fe41f608fa68ec07e8a0857281581fd1a770b4b7e95502801c255023a7009352f617bac293' 'e02886bad42d759b1c80dcd2134a8e72f880eb38524b23800f0004e814d7e3d58d5c6f2209d804dcafa76dc801c5fb0b493a986a0260655cab0c1afeadf4208f' '6cde9d0c554c5e7764e7fc27727200356a124d96f8325bc8cf0f7bcaa380900bdbf32173ca78a0db74868b295c68c0ce4026715ea99f06269b7d418fae3a4744' '5b551680aaa9a0a2b482fd3c9e3bb6dc0b661184952e29417ecaf46955ad4667331b97f8cd373c4d7ecc080a5a26709caee02e79585cb3d40e731bc3c9d4ee4d' 'ac1b3342d1094291e25899a8b48bd0bcd7dd3a9e72d3bd854b9dff6441174cd131809891c283b83b1e6e53ec82148428f6bf8bd23b2e811198beb16c2caa7bf1' 'aaa6ccd11325fed781d67f0a004c60c1beb1c902c7746a7c7a945abb2424a5afcbd10cf09655e6872754884ad2de062d012eb9de5fb687bd04074ebceeed2932' 'c0047a86346a509a73002f89d3b34db76436cb4e09f736dca3f61513a710a632248a6eb8e9b0e8fb3ec3311f49d99d688b827b7723e693e3750b6fdbb050cf54') # vim:set sw=2 et: