# 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.6.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 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=('34f79068685ace75ca65141d8165138d25326e9d0a1c25b0463ea69c64a7240dd19c6c894c875c5429cf7b40344fbd32b1ba0412bf8893c4bb744c83f8bc25ad' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '36d9662fc94cbf7dcf371adc13a9cda679bc75df961d86de019d3c8ebb0be3062d5ef762d175fab58696db74758100a65de45d7832e0e2bd4e15c901f72d8349' '39ad5d3381ecc100cf42dadb448eb14402cd88669a65d0ec75d3b9579a9d8a24f515b4050c75c9b6f131adc1fd4a844039c4c8c168e5f76f68bf433176000abd' '0a6fdf6d5b20e5182004581df031ae3203a43b716a719aa83a61d1b71b6d352c3838f6e35afa19c8a91eaacc1920731c2f9b715d794fd5448da39c8f3599659d' '6c1ee7f96671a7b6ea7e23ebdd23e96b8475061010bdaa6d8a0d74d80e4522025bc02e5f7cfa76592e9d3a9a0e3e07d2119a6d77bcb9071c3a483f111d7f5cae' '942a18d839495933c26d60374bb2d29e5a89e1db658553e991647c97d6144a7d2a32505933a2e0014df1655fffb500e8242878b103178dcad3909f7589de6ae3' '78577af4b6ac2ecfbeb6a18cafb67b26170316681af8076f076a601872d71b9ce65945034627fc493720bd032b0388b5db696902e44bc2e35afa1507f0406231' '54478151924207b75f45d7ff11842ce116b044775915eba930a68c40b4793dadb8cf085d78c07b358a8bac07b78d4d68dfbdf8ac08f02f5e347ef89fb619326e' '596125f8ce3be2853d2d9ffbebe13e5989be1c694d29c5e8bace20045e372c54d8fa3f67f66fa91df571accdb4c8399cea5d479754ba53c7a6007e331e255780' '736bbfbe3984a1d6bfd32a4832a9af390b8c47ff46840de54645a1868274f45066a2fda55b247c4b33413f939b8c79048676fc2c8902c2919e2629ba0725ec0a' '02f671229d632d69a2934e0c67540c67a2d94585ea1d5182b23c44ffa82eb17b6c030e43283c510cfd85c9237cece364fdf6769b52dcda5caedf5c5a9afb4a34' 'eb10c6609f1259000090ccb73986a8422dc123e8e89ebe8149567a3423e84ca616cfef1f95fc1daf3aadeb91d3c7a6bd9a3512e79c62692e6bcb386d22fd366c' 'd2a229417c1a7240f9f2e19cc1bceeb3cb747a3dfa03a118c3a6372e22c03278750d46b5f2e287a2e5dcb872f96f9330202593a369921694589d4b70b7c1797f' 'e251e4cfe9b6edfe490b51bd3cd8e5d0a12331a66af4d5722524951f1d004a29b5b5a326786c974e062ae6422ae5c985cf133a77e411032befbac3d6bd19427c' 'df878b5fca899fdd05f9c6e232d3b350bfb0eecb498c262b29387f277fce87cc097864d9c3a350434e37d32adbba103053d6ebc7b89617e71aa351420f0c2b3d' '051fc46752afb99c0485d2d7a541a6ecb25198ca4980c7738e0936bef93af84df216109d746109d81fca97742ba72111368192f438eb64417625572267dc4ef3' '0b0f8d1715db33e9b0380032c1e9e68e94bb8fdaf4a0c5dce6fe20d9f28868403dbb8b2a052e38e31ad577ce8f3d42932065a9c74c63b0a4642084ecccb0517c' '0c7edb9013e9b1afc9811c4d73401fc866bff5264e12876cbede57396a1dae5f1043a83a02302f478569bbe326e82c09f2007e619ef54dbfb3e35c28b9229e65' '71d875eed4dacaf6c57206e42377003ebe724c303b552db0338a7a96d1f66861eafe35b80c0db4e859d8bfe1dbf9082bd6d14c4f35ee820e0f534efae75d466e' '3a0cc7cda34f5103f12311d1ae5414d4b1ae20fa6824ffd16472e8dcc6909d2c87ee987bbfcef5050690e69426c3c4da47dffbf2c224deb1420122fab2be2325' '7f9b72b447362eaa90ffd9e107fc0596252ad9401b672e6e42cae6f357817e1823bbd0b3a96de3c1e2662de80dd3c8d36159fef6e5b34cea6ed7df513b1586fb' 'ce103d756783ff5d7f0f98380b40fb8519642dc59c656551314edc99350bcf63990cb42c6c4b6febe3c14293284c968bd747c75fbdabd1bb0965fed2e841e884' '02e0d8a607d6c1a0a87f18c980fc71c4e07e37d216c862bd166b8b1985d58987bc6722145bfe5d7cf393f6f3a9a94f5689a3f8eec3a8b05c34d5d7c744963a3a' 'aab507318faa49cdf5023d398efb8f30672fff3684b76c95d0596d7b1ea2a2d8e330bfe2a3c3a790b73ea7a4380e84c819ec17a8f1c71354e70cc84fe08dee05' '43c19548f1c66eb6056aa8a97650cf9776898953c48861afa97bc44dd8c55ba884b5ab1ce2d925d2fd641dc10c57f10ea25cfa3802508d84515f4cea78af409b' '2ed196425786723ed4906b25b029380fcc1d3a3f029fb14aa8bfffb6fe68b28d70cf6d1173e50ef15639f7480c439266a9a76a56c2f2e4cb99eea1d3f580bbb9' '9c6265b64258c828b508054a3b35a0b6d716922203166fa386d06540a5439aa37c0eca62acfd2d0ac767b282d1b7036cec861f8b02125cf4f9432a04f9858618' '9679ddb054f31a23cefbe810432884ff88b755287eaea4ffb6d80d3532b213ad026f12d8a868c5c0f3030b87fc459fb01d2896dddea4564374171c2cea79c68a' '6de0f31ebe635f09192ae04ef9abb7dfb726ee7b98240a96e8f25d1de46c30b0430941b89bcffdcfdb265e4636bbf5952fbc2a1df0a075f7e16ac2a783e3180c' '9f57830a5380d9684a009f63f123169eecbdc68d4288c6776639f95ba3c065ad311c3729f822b221763a5cea43839cce88fb68c0164d0af6ca066b7bf55f1b10' '86a3ce8fd33bbdbb12e439dc9caf2540ac364cccdc5a908a4792f6bf82612a2bf4c63a392b7f65e9fbbd31fd5556e6dbbf6b83e3e3aef66296e1da12a2c3aec7' '3f3ff25a4a1815ca8e18dc9922d533a77a4798f465e3ca94b137505ae159c62b7357ac8db2519fd0019dd52c20c018908b3aec99af16340550b0a098948854a4' 'd9640654e1909504443c58d43c013c4a46161d21443be9d3799d0ba0b7a512891ded3124f1b03a42073268cbc4f8eeaca52c9f6f62eaec7223b201c62228ed19' '7a5b612777826f92abeab4d20e04824e05c3543da022a87ca15e30f1bcdbb60008bf867dc3105f2960a1f0065b1b8ea5ab7213309a7692c302aa6cf289c56762' '9b628ae20c00f85ddc71c6551791c91ab0b5a42bdd0a0757b999827bc90cc3f24abae37d797715f9956ab05c5f07a5242615968254556837bb63a975f370b2d6' 'dad1d4a4d039f42bf8b8338abf83d52a843358d765d1c6169a6efb88cfeffcf109f8e6157ef08dd58bda772f9873b485f3c70fc75b571ee13575dc4cec576926' '0776d7977973d543da901dbbacf393a2bc9710a40ea77aea26411610589f6e88452633ac1fcd2eaa6d5f3873629e2f4bdf84fc6684a6181fa9c51835d182094a' 'ebd01f0581d5c380118a74c8caf96802d7e0a9168ec1512ea691fd933139d71f03c0be48ea1e4fcbca4196a8512788c4c7b614c151797eb788633dcfd8ade56a' '7683cebf8f35cfc8f40747982be4365757517eb29f38f429889205479d607fbc4322cd52ca0e95e7d95aeec102a6ad85cd2bfc2f96e9184a605ccf8f2d70f4e6' 'dbdb14b1f1817169f5a923b31e22d307808c0c5e2dc37d9eb5907a7549a18e52c324098487e61e739ff6d1c7a531ec231005fed14c85995f6eaaec1897b90d85' 'fc1b6f6ad34519eb7b6a8e00a5a6f191fccde5ee1fab24eb7417e1f8b384cb79c20ab8190f0773d17bff7f1c6caac76cac6ab79b1f7207e5260485b611fa0b43' 'fd5da6cbda18266b5f2af0fe2dcb48a4342a4fbdc64e56457532a7c1b298b3b14e8ef6cb82b56d479f3f503ae89141aa7a8f7e97cdfe5fafdfb6768398b61eea' 'c330d82486c5113f190ae6708cd097b71979a66c8e990702bfa2a7e129cb004b72f50e0498086dcea430b971465d14e35c4e9406f3564e2bc14bf8d91bd7b557' '1ec77469b9a8263f3986e215996dc9269e40666cf1d9db8d57ef9a60616be28feb9d7bf022c3df7fab79d4b47579167cf9adba0fa9f47a0eca35c72edc0b8ee4' 'fcfaa77776c01f9b30ba7fcb1fa09196b131f43ad1811822553419f8660b1048bf878eb54cb1e1d94dc774441375558a0ed9cf0f2db690876d9ae786f5bd5f6d' 'fc732834cc0d69fbb6fedef64404eb76b1a3930958ffc20f482b8fb6f99a71043335cefd9cc34da64a3f7fcee51f02499021962044e93675ca235044e543c884' '9f40f5bdfd169a812e7903971e90a416e5afa5940c159a93ceb9b8099185c53cae8f60db200b0e882e219e52e19081014a17954fe12a2ae8e6ff3e67f54f8949' '80abb78e6af93fb0808c9ff0d815262c2bcdec4610f6f5acbe61dd5c3f7e1a8627f5699dab39964c00f43bc00c0c8b69a129caec06dfae183ef00b69a0e6be91' '47c0c6a1c9945f4220330d0e514fbe0ac92758a1278c76ee9511953bba13498ea07ff16a40f9e27062dc351942723f9864132fc7a330f5b47914b1e5ed8fdcb0' '3cf8c8bc313a9dd385b5186ef35dd20e6be5314374eb788dd7d8203efb2be9335c55c264a1e886eb445c55dd81f9b623527d26f28c4cace28967b5f058cd9503' '9fe6acc962feab4af57d7f8d42f447c315019afa911950d1480ae45f44b102ea7e3fb28af21f609671c07acda307ea9863fe7de823242cb7017f5bee940de967' '3c15aa06cb8d5a7bd40c8c6bf6aad727ef6c482991318f4c37da54239aa19bf2440391b80350f29716d8d270031ab82e84f85e921abc3e06d5d6235e54f93579' 'a5f1d1f6a4a243c08b262be67ee5cbaf683297f411b10268a12fb106f79d909605cdf6997a6f3fb27a7ed8e6e99cf205de6d8acd173052dc87b71b8c619cddef' '4db3a11ad4f79969b7ffc896a6c085e6b11410abce3ebb198c8ce7c9a1972510b59307be9ff31213af9bfd2d742e572354a1153fe2a35fc9ee5759a83a1a5c00' '92c76c1e2fe327445c442656b7a7b256225b8517b9d37705746d388fe8428122b376fc7ed2bb01cecae70e4d756431c2596f37dfc21c2eaa146ffcd2e215e92e' '6f1117c9b43759841f66eba4d2423914d05f6c8255f8e231359a0f31bc116afe1a6b6fdc059c35145f873be168ece0bbe403fcd675510282583cccb195daeb2c' '19e0b4520796f0abbe30761134eeffaa130d903abdf77a1eef24f36b1feb7ed9e3a4758ead61fce7e53b201dd1619afe0aa50c813f49f92c56834ed8a3ce100f' '5f91e8d45f540d1a2dd018bb40052dcec931d01e574d91db3803bede2c3de896252f17aa22d3a135b89d96d219c6c6c1a2fc72d6cee461c4e200ecd5bac382c1' 'ef3b2a00a8a03584b751940ecaa06698106982704df843b05c49f9d27d7cfc46faffd0b25621cfed7843b0b9b6456e33e7e87388ceab68eb156d9320e03d7e00' 'af51189eeaa7fa102ae0948b2210e8c2cdd9792209157248576c5859d8572f8b31496ebe18fc27e64c55f348278ce5ea0e850d951736752a48364d75640e37a3' '7694f113a68dd6d9acc77ba4566abfa342c0d2a9023c4722f878e75763f9cc046f935063e3d76b9d2f7de1c83aa74cc1cdf3441a66913a3a387809d75a643ea1' '47820076488e81d7e792574633d44f7114ddada2a8a65738ad8f6531ce77f2f63018c46b26d38f704e690b851c8a732cb8e57f52d8ffb807f37f9cfde034b0b9' '031ce995cdb963f0568affbf191abf15a3ee321278bd907213372c967624b66214d2233118903dea0e21708537f599a35181fa34003083293e0ebb0c6fc58be4' 'dcc1f0281926eaf0b480c702df74ccf8decf3d53902df96b7deec1e68d7ad0472c01a8f9aa1b7ee8bf9d7e5ec577e8bde682922c99cdc0b43d83c6a520d18523' '904c5a8159b4d468745455b090013d6447de265d13b031f0ef19f2488130767e556e9a9513ebd8614ce6def270966e4a55fb57281092c45e41cee98f41bdcb3c') # vim:set sw=2 et: