# 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.0 pkgrel=3 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 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=( '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=('31a8b16164e3bab60b62642e1adc55b3d97fc4f20cf28207b1e599275eb5a207f60b173fd642e8c52a48e83894e2ab874cb8424c22c5c712afd7169084b0a2df' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'e444ad83e092e0714f5100e68908256d019cbb64843d90487b3a104ddc24427fed2e4a4cdb6b51c3007534f2dd00077a1c53e9d69870db1abe49fb4d1c180f33' '3e92e6d6c397fe5b326d434d2a6ad7630c7af7f470084bbd5948b46298a8c25b24139bfd1107ab2827ce89d87ead826be4cd3afb352504b75b109c6e121a0bf7' '65d6390dc2f0c16c6a975ebc5fc41b77d3c8a3f7e1f823baa7546edb803a7ce26e011e4c2c678667c9255c15a5c976858917e4981317c15a9f5470a548272397' '78fe6cdd6a5ad07fe267a7b4041feecfdc0d725e341cc2d961718fecbd5d29c2b42f3252d06832c1bc9442ce95bc8b8cc945efcd109cb925b0cf483b55c0a9fa' '618fbb3dcd7e915cbd3a97ec5784a81ad6e12ed3af8f1cc1320248353ead319269d28859f293ffeff57facc3eab57cf27a0905ccdbcc3e78b76ae41906046d23' '1c41886ef46699be584b33987794d08a7fcd54f05ebcdde528602cb5751721e85e94696a095497b1ec5fd1852c001fb9d1416bb3312d1a6c81c43716d41343f5' 'f271f2283c3d8c5440d20ae39ffe839864cdb8efb769741760fe1006e19f1c1739cb341054eb4863321a5f42488e5f33aee0d3fcee74cbb11d4f6a79d5983702' 'f42ed005f4ac28d6683d90edaa407358f50bcf4a3f736bc7e008f427a8dc853d68796d6ffa4c2c485af5f52e6806d705f15ae7dad731ea5707802f9872205fae' 'd01a4f1d0b9126e279268cb9a817f0345455902ca814a5e9df8f7a13871bedeab9f1bdc06eb4788fa885a2bacf8b53693586134aa89dcce67f47c91bf88a8e9a' '97fd9769acde269917cef7ea3c2dfdabe5efa2e88c421fe8fde84f779223d22beb97fe3e86ffb7a3bb754fe01d56e7125ee999a94806c71a1e90f94852379624' '57990f7841a3a428a310ef82e1b995340bb1d7142bc0771cf3eff881384a05fd1ee314f2e08d011950fda685ccf286e4c835535ecaab4c2518303dac9901d08c' 'cd829ac68b03372830343f85150bcdc019a0e55a082db67fe57280fbebdff6d0193fdf5034f0bb3a79bf2ceada101480524b019f14f5420d6b8b97022aef6526' '0d3797d54f8be66aaa31b93fccb1c8095c3a55de86ac0c09b07fa8e358d27bb3c4a4c3c0383a070a5297c9c7d1ca9ccabdce12bc478aa3b46dae1fef6981410a' '3fefd7d6ea1e9252b8eec6d85267dda0188998125df1a19a37e82c9c3c1f4b63bd8e3620b4826a1395ff750017a3d4ea9de3ff96b7807faedaa21fd328062641' '58477dd9e3df1fd3ddcdc603feb1a2f45f2dfd0d6920d2c06c22215306a88f020178d09a3b943fc2a87766e6e867bd49acc401a18b25a34b31c7c0857f4533a0' 'c06e6260bb245fd5d7d77fab54e9e1dd9945d0e8e56806bed47532866004cafdd68ad267b4fefaf50aa8fc3e38c763a91ed9ce8da7da48aa894453916bca9920' 'b8336f18c7db39c22ddeb43ba3ff9561118ef76f017c0cde05b0d4c2507928cad709d2b3378bd4e7dd32f84260f92a13673358768016a75b654f5926fbec0480' '7d6e9e1c21c9be5d0dd243f64d20c144228ebaa85c694740879962c38fffd04f547aeb30c7075d7ed2c25a626b28799ee3fc9e2aa936c193a07f1ac4adbfcac6' 'bc84737ae19bd7611d43c6a30ab789ec91dc72124fba3d981de93398b4871de287aa8794bf28e393e26465b81af2bd0e69b1192cf27d64211428a01549eb93a6' '61e98f7fa1a610eedfbda2c2fb48f24a19c75f51beb4e1c1eae1c451c6c30e9be5d51ce99f4f8e47f78657980269ce72b1d082cd510828018ef31e9908e10bdc' '395b623d46f9da0dd6ff5b43d73d47cbc3c457e5faead8d979441387869d2ca94838ee26d1d626e1c619463f3f2f9a8777a7a7b9387e92160749e50cb4e6c4fe' '559b619cb920af63cef6d261cd94531266ae15e7c451c9b028956267f6cf07d3c6925b0f8d671d45eb3ab83185f1263556f85be37c466af00031812d245fe225' 'f16679f0770c59430cf8a4b2289d949df1f0823b6ce81cec4af3ede140ab0bd7333985695ef5375fb5d2d9386d8bb64196779146062607ca2e93773ff028b5f6' 'e3d148c6e53a8796a586277482ca193c129613db6f9edbb9c7d690ea29043e1f5d505a93a3bd98c465a5a72b8cb39d0200f5e5f65d7a2789fe2a74c4adb0f5d3' 'b53fba0dff6de7eedfb64629a48a1dc170f62588e3d45eb8d947031b57cc99af1be8c030076394cd636ab061c6ff99917288a2f4fb08a63a2fb93b4f60c69f3d' 'abf347bc0f2de6670a127217645efc2742cde56f80f7abf3081b042d75d479bf1d633a12988971d1b6d58cff9c1ff3dfc689717730f7fd371fcff1bc6bc35ba9' '1edfd7d9f77b0098e9a2da7799eb5b01109928860ec6559d5aea831f74451ae6fd22175cb6979af6b9745c71259530cf1bff9cc1083664b9aec52cd847a74c19' 'ff55138b08462e5a8cff298bc1dff5be19e60c1d1f3780105af4935c8285f0362d4163679e251d16c3eac959db61e0102bcb0c78e8d41243fa1b82006136025e' '7ed2103c6b4de1c1586acaeb042d40adf5f0444bdf518b107ba7a9b4e3c8dfc70967ae363cf30bd0c5b247b63d370e35bb56433ee18b9f9e85f93b84a27ce401' '307cab0f9a352057831506f6d4b1b75fe35b41838ec2bbb9c949640d10c4d156bb71f53f27da764f44c83b32d6677a13022649948d8d581827574fe0f5fc581a' '57d4826c8d520a9c638a007e4162fad95bb9f29847bc2ed596e54b7b7116d4206cc0e1c1b7ce8aba547e9d74c0502e314ff990116e5cf3989b67c492200a7c1e' '672f59e73c8d6393b7db44bd3e4d3cdd907865cf9f437291bb876ae1f982152d74a73329bc7e4c5cb7c4d52618be8bde25fc3228a7c4f7b2351d9767fd63bb5b' '310214af5426bc657ae5045474397be9716519a87914233c491b0c9bd7ec867bc4dab077b0d7b468973318d0f1696af92f21e19537b58a495f550a844d8d8eb8' 'c87881eeda5cb27a08f2096e43199cf4d8325b993eb9eff2cf4622b5e9e6dee391fa8e572d75366808b0d9008aac96d7da1724c8c4a97e3fd7b08961c7fb11e3' '993394457df1aaa26f09e30ed0ec740a86f3da9f2a42cf3de4e30ce2beedf9c776611894cd74e9c42cf1e1e8c9a644913c982788a106f5edb058bbb156c216db' '9e6490b8e3cc8c76ef614ea9a66254619cde5aa3be06b5be8fbe342bfe4b5321150851b3f1ca220b85136c423c178b2363743bd3f860eebfb82e9e1624edb254' 'b426c26ddd9af6064576f95df398add62639151f1f4f5eddaced77b09d53098c3efd146c86e3e64543dada0e324e60735b5ebddcda69ad15c4d2f6bce4e597ac' 'c53488d7b8dcb711ba5d1a49535d3941baf053853fbf7b1018b06a6dbe32947d49fd170bbd7d566cd41ed327dc57e9e6d5443948e6e99e22b97b044f8abec2c8' '3f964f4892c1030ff949fe6b9c01cde31d683b8f3e291b15f22008d67314ed2cd7a16b23c9e61caaa1d4d9ef9e222f3e21cd35b5013f86cb406844151d8e5c53' '1f9cd51bb5d747585abf093ebf3d9d4784ac75f7d0863a205167939459eb5ef55412eadbb7b10913f5c8ad466c10f8dcaadf0de60d0f03361f25734ef8da0b43' '0df4d450927171c8a27ea250f2792fa5371ce89e5c8f0feec68a6f63c74fe16e9495992e37b25357f7581da82ba67efcde007a72aa92b5768e6e6d7b920bc233' '33b586eee79ec1dfd4fd0ef42ebc1e05787090db9f28db399377c0c54a86bb9938e277b8ca2589719403dad9a640f15069b76a580aaf49e6e05642897f8458a0' '85abeb91f2d4a7daf0f86f6aba2ec1e830f882c74b37f7f03e93a81de806c446e770f19f0ac6e5552f66c524c848a07bd21abe42fcde4b3900dbe850785d30be' '561f3af56aea1857b4f8cb579dbf1416816776ecbed90530d7425b51719461616c98f6ab9c9585ee360e9d2a76101c2e765d9bb35291d895e35dab601b9a45f8' '7eb038207c982a47a41ab4a0e8f082d45e90876b06e44666b1261eb09e3992489664c8de5a949ecfcf0f086a690817a422c1a4c2a426bcccc0ea9fc365665941' 'dd9429c8baaef8db58280129787184de39823ed56d426ae225aa22c6c7f25137b63a0a7aced300ce416173fa4dacc77334c61976416c020bfae7534e9086ab74' '39c8b49c3e586020322ed4d43aff6818fe711137f70cbf9d8bc6e489000e4446e59751ab419b7c9c34cea13a626fe1c454aadf90cf6aa5fa7cac9954bc67a22d' '686ec93218ed55b8d4a857e869dec70c2ed70f9ca5f9dc6166b3387d1103bafc8e481a85e398cff17fa9440732a5306053a0f8b2af8209627cb9e9808caaf1ab' '19a1bac5acd2c4c3ab86dd7425e8797277deec9982276fcc81e4cd128bbabb1c2f33fd78d74de66bb6284183248bb66129cf6ab3292e835f6379c72f850d5107' 'e1e011efc0985b20e5a194928091a3bc2027e12d31a9b0742bd0797c1c626a9067b9f7620edf28146fcd8ea599c4259907f18ea1d1cfec5f7c1ab1271b0c62bb' 'df4c2c3d8fbc74ef1afea3897a02e2eb45297643f5a1b08a4f09762f274dfe9d3d2b1ecaae032185c5ea8ef706871b01a954cd4bf2da962c47f5786d0acc771d' '621fe50cd495c6f2665a392e1d29d03c76489566db2224926b6b36a0d313d25c110b7bc5e3c8adb4269da70af8d34d4b3c300ce2e9028338860df5f958d51372' '3f50c537dc5b96d8ee1177e334380b5bb4928ec1a740234ef7cca224089443e4b54c415a1a52fd6e06cd8c35b96a9242104e877db72382a6b6baad1a724b2dd6' '6039c26b51ccdf25234c3d403cecaac208bb3600d2337affaf063c47c40473b09f85d47a2b4728b06a6816bc349c23549f0181ef38f3bbdac2f9ddd7f37ee417' '7c7f89d928ffe59db77de9579fd93218b24c296a0ca14115634bb797dfd1ff0d18355fddb82c8cc4b79e4f242587f735ec2d232f693769411d85fc1ae2380096' '195c2fed8a69c6e56d66369d585b21d96b0d64cfe72d94b4600ebb516cb78f2e23a17f01975c27e5010b28e47a2b934611b770a84641bcf3dc556edb7ea01900' '4aef4c1e4b4c71b13f53a019740f86137ab617c1e713bb4df6497406e90e73126aab1a4a1a7290b10d6725bfd2e2f7cbabaf11e271832e92d1b881104e48dc04' 'ba62b6fcaece8b19786aaa9536723529ffa87035aa0a52bd99faa85e6055f1b84d00dff12bdcf9e95f407a05df53623871c9a7962f2c277cb30ca8b7237bb075' 'e1b48e8863f373703830874e0ad0c5d21b762b48033e8fe72cff6e51c0448a1f3e4d765032f0358a2701c3722ca25a8e2b173a322ee4f54c163bd4bea819d19c' 'b06258f94e8fde43ada16c03d5e13c92aaeb4a1d058b1ec46ef18645aa7e1f17601ca2e906170fe0e4d1f8663a7363b2e255902b6ced5ce557dd8b827a0ae3e4' '989d476f4b2d0e2a28683eaabf6f50e4c2455c1b01afdf73def6192bf56f4875104f54749823228c79f7b5af1ed262c80df2ef1874b22972529fc2931bba7c59' 'd6cbfa16e2063a447a1ad6a0412193e345e00d816c3b827b61f99d9a27100d98df80bbf0c46eadc8d3efd54df6aeb9b716a82d2ab2a54c0366b15f3b18adc513' 'a662177ffc71f8e9bc626bb14ad1ea9190a7d6e8378bd6b2ddbe410ae2f0426f0fb6d7be349ceb26ef0c4ae8d5f3814ce22c47f992f9e4b42ac01e94faa2b491') # vim:set sw=2 et: