# 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.11.1 pkgrel=1 pkgdesc='Standalone mail and news reader from mozilla.org' url='https://www.thunderbird.net/' arch=(x86_64) license=('MPL-2.0' 'GPL-2.0-only' 'LGPL-2.1-only') 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 org.mozilla.Thunderbird.desktop thunderbird-system-icu-74.patch) # https://bugzilla.mozilla.org/show_bug.cgi?id=1862601 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() { # packed_simd no longer builds with 1.78.0 #rustup toolchain update --profile minimal 1.77.2 #rustup default 1.77.2 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 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" # 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 ../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=('1a1f438c7047908788bc983aa681c3293ce02da006477b491a49ced5941433ca3381e01f76afc6bb5572415025acfd0fa657f063ef26b3a63646594c27202717' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' '7a2e986f218bf8f1323bf45041d54eeacf9e2ccbf1778e37136591fb2341265c695450954c9f800e0d0c5825a7816649f64b332a33ceddd59f4eb43dab248752' '1506ea4f2a86c2b4ba930ba382341c54f26f21328af5445bfab5cb570af53b0d06d496d56f05464bd397f895bf766b3347822b72818e8bed425e7e9cdffa137e' '7d1535455b4a2ce41f0aa6c377dc57d4a351c0a28bf00eb656ae0b552bc051bfe256953c9aef6da92bb665487b55bbc5f0071d876c4396c3bd6ea53adbdbd1c4' '024c1254c0a857332f71a3191943419598c6ff517fe3664e0ff08a444b5d6bdf25590fb631550b6adf8a58bd26811c8872dbcdb34146f8956cfdd7ba6dfb344d' 'b5a383ae34d9a9cc076ebd315bba671b5cf0e02596797d9632519dd99c276660cb7177f0e22ed4ed8f88d12b086a129046e44892d4ee386520f1d95d51ffa205' 'd1dafbf9080c1f1db22d387ce4773c663bdd1d270dbe7a5d8748ecf411ed3e4d64f849dd162f41db792b308523a8389539f5ee55a0f0e9dcb3d97764224d6636' 'b7a3648875442490b11af639b212ad968bbf64741233b98eab252b687209ff9052bb06086ebd3fedf8c767efa809e08f0d6234c4095c5ccfc3effb3576bb1522' '2a7c0110416a0552a964f501d048beb796fa2d298863a00f6c11a45d034fcae8c4e29e64f6128a3e45e58e5b4aaa35cf27062d94841ae05403c11cfee34b362b' 'd185c045cde749a058b4741d9771dc86e51b3fb30b6a49aaf07678b5220a2cb29921aa46c1f3a55d1fe3634021c7e0b415bd7661a6c14de8c7b89d8ed6bdd4bd' '1fe01e2a4c7e3990e8881bcae448c86fcf54afcee75997996f1b91ed3cbb80ed3b4904ff13ee2b1478a2dbded5c6e1304fb4e479a7c85a3b5f3d8141325a5c71' 'f563fc77f785ffa1e7685b3546d923d2d0e5fcc3bdc7b87a2143cd1984df9b3e14faf6b28fa14139839e45a85264434089e08888946069f5a8c09bcaffe33de5' '9f3e57a7a39be59240b82a3973543676d6ef87c708cca7316c7979e26cd265d87e14f3729344e7e0e3b6d3afd5fe9ede929099c9ec70d1b587e87b9788023add' '9493f93b30c8f7caf1c07a005ad1538d2da99c444070500cffea2b18dde5220a81c019eb487ca0c0a39f3e410f1ba3cf78a4f7644dc1f37aeec64b79e36c46d2' 'd915d02a752f62e433472627c3421ff1841618341e8ff27b7996b955dd638db36bb70e7d3dea28fe100d38a2518e2b42ef4bc71197981fd424cbbe8528dba5d2' 'd5ced4647b381cbc4019537f0b1124780b2d46cbdc14a1380b90d9d4babf8ede771c9a6d3aa51b4e6204490e8cee5cc76dcb9881645d8968a8f016617b92a240' '2e5612498e603941a321f5edce35af3267f8052792ecacf6a8ea4b905c85fda8fd8ab3f61b9409822ff4f81c95cc8b2cfa22430e89eb35932765ce8f52b32007' '3f28770d0eb767ffe914b0e3f8aef4157c24657174144c478565c759f694a9132e0ef1a865562a96fcfbd83e7a23d2f25ea748e19f4f559961b0cdf226df3896' '7609b7f90fb89ca06df2e48065895aa4b73f38aa21e4799392fb830dfaa00ec6391ca2c2e9542aa84f66e48ae3bbaadc23614c699bfdf229caa9c1d1dcbbeed9' '1142a2421b1ddec007e3b3a2929c58e60dccebb2a3ef203b825db8dcddab9657bb6bd2dbee56261d54fdf93d8866cb8a0b2b028131204297b077a5f68b95715e' '47fd9e99e06b4b37d5ef74236c9a8d41fbe1e23938110c5b04f9cdc1d00040c7f2c5b9ddae4daabeeb22627595d2643c52b300e7490ff44014271471db9ca0db' '722c1fd50544f6da54b0a2487ee16187271445a15b8841c32886a103d561a55db59234b4ef5359d97f5a8c08c8a6121335112c9b062787787e1f415aca9fd888' '502dadd6b7906a883dd8c2136a8a15696c90ce9c33d0c74e198e673e3f4623d0fb0a6c117d01448eb1edbafc534de343be1b9a055f20d1bbc306592122d66a55' '4eefe1e5be9a01f22326a0d6a2cd98e1aa578994732d2b09dfa4e8f7cc453b1c85b517f0393445604e6f851b94ab4195ca05c89357d7fafc0f84555c9e02df59' 'd4f832ada9a61870612fbfd5d79c74ac80162df0a1ebad8872c2e6ab5b85569ebd035856ecad5b6b87b28948139f97c56577732609da5216b9f11a68ee7cc7cc' 'a7599530e4759713eac67a06ba8256f265f6f5dcd3492d6865bd8e39821e187c5ae6576f3a5b47847ea94bd5e1aed56229292a9cd45a4d4448a3081d42f19e23' '2d0ceb132498b30a777dccabfb312daa37be851d80fbe39efe2f0a9f2aee88ba60683408bfe0e19640d781cb12ee36297fba9e34888c6d2448eed510f96b7375' '4ec5d864007004a4e8a2d19ce6305c8b5b15bd91f546f4a75889a958fd9fe208fdbdfa148dad4554cf18c168bd93fe3118e6a2bbc4080381371917b24c2e9e6b' '385b489efaeb24375227c6e293513ac492ac05857127616ba0877f1b954613453115f4cc2a766ee1c7ae764425cd20a1e423e30cd62fa1fa5c0399db74c6d89a' 'ac79b2eb924d0b69771a6f4c8b051b8d6258b5fcd051392e57b08c804b1c0e15ed17bba4ad4421dfd64a08939812599bf4bd0072f1de037555eae87be8d30fcd' '431f186bb0f17332b916691bc7576dbefc58f8e78a2bda9c4cd9a476fcbc2ae9a5f602d36ea17afd21b65c39f6585152d2867e317dcac16cdd66c1a8f03e9f5b' '6f3a5f20ab2c28631c6d16b2a2ae0c82163cac0ab07d1b91e044ca0a6f5016d22abb4b97bc13ab4bc0861c17725568f4475c383c6a91afd48769c58c56d752ca' '8c63433079420eb4c2331e37608223ebbf21c4228fbc2a9e0375c2c482acaf2bd7b160974bbe4aa4ad52721dfc9dbf57136ce4fa5ef6fd05106b990497752331' '607039a2490b450548d8f51ea2622773c5e570245be7b6a80f36b1d89e4b72723cbfce38b299e4d422eae81d5fccdf8d3de03c7ba64acf3c3c99d28dbf93bee8' '4fae05347125d6ce69737922caea80fc9584f99736e53e6c2610f1fabf4548e13f2bd22822d13b0e4cac25389a12c98c6cb5432c34b0163e3eb37f0644c69228' 'dadd5be43b6d9a7b02edfcb385abc60af6dfa1f6bc72f50a626d0a1bb7928dccfcdf4765f7b084eb26a77b0b7ae78af7a47112ea28057e3e7cf1778490ba2703' 'c15cf29f7964664d5bb9bde5280387d5e4ddb8bdbcf0a2e598989464da2734e26eff135277d6e8c50eebd04d5d2f1f49f39fea9bcfa35a95b23c668139812437' '889f9304374e4a35e83dd082fba49bbbce1070b06bfae323e9080e66bbdd69ef14edb0c3f3eb170f4f8d01b4529f41509189801e7a813df371adf10d8e70928f' '4edf817cb105281722be4d18e93fb82bbec611f1a4844e893e20e6750018dbe830c1e44efae38674b1e984f27cfa2306b7b8c61b8353db4ea046c9a685f20c75' 'f3f851aa9d95fa45220e7563e0152e4e9223b2b9164e5ee531c3c289c6c1bba6f0449311bd233ca8245df72d245a53c8a9300219d72d7676f25125073d5860e7' 'd7856b4f8ccd3f965b06d7c745fb1fd396df6950ddeeca710b402a013bb75df1796bceb7bd31ca962aea9fdf7c33ff42c06c83de2bedbd250d82f4cefd0d42f7' '3f6e9ce9ba7190169bdab77256eaf8982a5590ddd26f89b24ecb906148191e320307e939146881bda925bc731603fb41fac9c81f09e36772a23000519d085665' '2727428e955e65f24379981f73cc55f7c831e09b9ab7ba2d47c3cc99ca6f73e50e2a9dc320c7ef7ab4fd08116dff3f398bdcbe83afc9de4e4f13d3c170cad660' 'd20a9c5fbdc38090bb126184e466ffb9f79239bd1dfd221ff6fb496033b7655ea65fef8d1cf058bb8c7b601ee1c169d7f69568eb7e12344bc972791cc12a9457' 'be3600761a73731a60d47fc37a0963c60e20749321f93f7736f68114bd4e227805f2dade32f82d0f58f5f52155cd6e9d8f4819681def5f4afdca24c8949d0d11' 'f0de02df80c9fc043e0f874e61bc3c462ebb5e49b5be3727f47ccd113272b88e2a8b7a02b1334c9cbade4bb7c4932a545f2654b8c7ef87362fa3516cc0ea5f79' '3737dd411432421a6a303a96738306db6c156596058c2fbac258fadb9184a3403281c0114d2d037a95f23e3910687198a215191ab5afd9f9c98e41913060bfc4' '0cf7ee1bc79886fbec9c11d0afba12534d80f8f8d8124c42a84c90a47de1a88973f2f0e0aec0562bdcaf6bef3c0b79b9a23bb5f99abdce7bc9c99205549e4927' 'fb7e434fdd76b94c0fffc282edba84ceba9259ca025120f221bbd03c654f17a67e5d9bf9218893dfbc9a243a76fa3e0fd68c7d75dda6d5ddaab6246ff358579f' '2fa7af9db3dfea5b2d31eed543357b3b047bd65904823db624465b8df8a14100259bb25d292f6f3dd37ab640e4a98418912e93fc5d8badaa4f736d9868c3ba25' 'dfa11705311f2371355d2e745c47a42c1d5fb4c60fc1d575ab25650c78d905e780c748a71e8d677b7ddd24370410d95367b7e61a2e0f300bdebd13a4cb89cea9' '505e7a560ad24f8077c7ec243a50080528dc40e75fa7e4d2e69cca8b04c299a44e309d158c760c67369c190a674c97d5e7240c81739d7928047834c4473899ba' '8b8cf0b39dd7ea032a69c05e606ffd089e854fd35522436c475050a0a356fb4d45b3be3dea06c22622ecd86b27190113e0f642d10397c855fd842bb08980cd06' '9a15492c2df3450f532311c076600500ba5bfc11f995272c2b24d9d25b254e37ffa8d7e5bd90100b3c145f15b81431adb695c12483fab548fa0791215288c8cb' '78849e83e065bd5502f91f6e870d36565a59cd533fba82b7105a4f086e3bcd52a57ede5ca68c560c32ff57ca0ff93caf589e63e820727e6ca543f888b29e9a14' 'b4be864253f02542934900cad888bf92fe8922c8e87daae8bf099279ee4d06f741ba31a74d44350632c97d72a4d51ed2debd157c74adc75c58978d21f8010f18' '304f3946a596b197525263a58995b8256edc097cacee2fb7fa94fc48b7372dace6590eff4f1dbb1d3389d5dfd6aef9692768b4a3802ebe4d4cce5fe463a60a9f' 'de5d48ddd4792cd9a6c31024ceb678475d5516c712c81493560835feb058862de959d3e2800c3a33813a7a314056a4bb403e593ded88efc5a40ad218515a619e' '443fe8f6815a40bf2bccc2628857228d2a9af84ddc10e39e1c6e2ad527292a4d56f04e8bf8c35ff223184a1525cd05871a38e33a6d49c6e7ea8065a4aff2c734' '3882220c6811e178fc8ebe36a9706419ef2b40fed4b7b970b3876df96aad3bcc5448227924b836efccdd87f2bf7469dffb63aa8350bccccd35ae4c12436a7244' 'e6d6227818b668301cfa5bfd3ee4a0c3e727365d1bf3c05e54353158a83585f815e4c8a5f16145fdb893c342e3562f0226dbff9a94535a57045065bea721f9dc' '2afdd6d318c48aca73d5bf1f88477bba638c4ed5f1b8cac7919c409a5a5a715819bbf4f752b398ae249d13eccff51beedb4657667112bab6bb32894f58e4446f' 'd83fdbb374359ee1450fe305b85e360781853c114a18597d4e72fc928e0584273a80ab96d4a8bbc3dc8cb11312013bb01dd1d3cf0ee7b974639090cc28e65155' '14bd6e4c4746f838c7f0813d304c7d861a31623ed7ea6c9dbc0f6126adc674e9b9b73631472138465a23b0f3f463284f9b378cc5367212318bda8dadb913627a') # vim:set sw=2 et: