# 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.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=('45843709c21eb19d69d43205da6b2f943b584811a29942ffef1933c1ce7882b48046b201c2ff198658fec2c53d479311d8a353731afe6ea53f97b31674d6074a' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '4a19a46ccf11cf454d9655aee26757e82ccb8949c94c6a594958d1586b905805bfbfb21a63f665d0e2eac2057ff054969fcef7b58fa5dbf9651ffa58cb34a556' '3eac7b797ab081eda5fc7851d5c936de4b8513e1e8e33650e0cf8bf5a44387bd2c51c1ad23c83f0ec77123abefd598aa6b343ff8446c14cad19a70d6c2f973bf' '66b3bbaeff50c327416fb361fc3742283e03dc7a4f89c9010785f0f58fb97cadd77f64fb74e8fcfafc3b637ecadcb4ec7ed17343405851a4c0d5548941b75bd5' '2daea0b8296e709d90c17dd84a061e6b07f1f71083b4839d4815ee1643666254807775b88515902eb4b8be7981b4d9e499345fb79249b03bc5833395b607a133' '87af4234dcee1ea0379a3a68a6f738bae2816d2155a7a46e9f417f1d1338412d58b3c42467b77dbc090c105c6323a31a3eab7539e9c2f179cb5a2574731cb1a6' '8a7c8bb77f664b286a3e1ca12b19a252f97e5c736dad8d46d741a2a08befcbbd0c430688da100c784bf39d6eb6be0bbfbfb03806cac708b59a55004e2adf60a1' '0a53a510b4fd219513e06123ef621a425e127586438a68efeb3bce0a976cfecd90926bead372463ddba83eba5c1db59a6f263757279aa56b370024013e215c1b' '945d536ecbbf6d7a25b03dc1a22694d8b5d839d102320a115a65aefa81621235cc9eb4f01891847e6e55f31e5c2103390a5b1e135019bb3c725e71e9a0852a47' '2540188fed14a3ad887d890f4e6545aa8c5af5ae64fc4fea7dbfa1c19dc732de29a1ffd86cceea36015a9563fd26d8b90fa0195a90318c1905a4e0d0db0acefd' '73435c0448d54b373860fc49ae734b8a03f14282db9371c943889f6fcf75a93d8dd39e8eafc7899a8a091d08549d2935cfd70d09530d5e541ecf7ca7eee7b72e' '6f18b352cd4db4a10245c77a72861b0883dbd996c8d4e397f52cb15732a499c072f288544df3238e3b3559f4d337d1433e02c9b3a0080e2a0ebbca155426d91f' '1550b9813d04a1aea73789a70084fc3f5f19f74af5f7d069b1b3e16438bf9de35b1fa6d9194db4ff9d1f889b9abad2faf32534d4c29ec2bfcdb3fbe4f43c4b4e' 'ad5859f2656374c6977712a7aa8e38f54dd5ae54b1b5493200ef1cda6e4827661f8ce9fca620c7b2f31e25761c015fa63ebc6abeeb51f866102f76d0eddd01d1' '710d1582344f983c2b58d53a290db8d46c881826f8ebc3dd1a0cc040320867611f78d899318781e7aff6251a5fb2feb17ed2f0449b87de22134493beccf4b224' 'fe7dd9751acd27c231bc6fa38eeda9f51cb154d402506f5f00e04dae315ccc481f51892c2408aa49b3e13dd54c4b190f1a68d46fc33adf5301b5b25a4ce462ab' '780fda9bf598ee4444c33cb96986ad59ddb862bad9da4a4d824d6cd012be5a83c9e4e4a17e45ed5bd97bbde0c5c4897ccf0620ca2c5548804cb308dace4b54ce' '1e0a811a658057d1ff700ab2a5045ac12c580abc281d787dc62e1f88a8f23e336bd916326784c807506254883afc9c210228a1cfd1946f6421f6f425a7c77be7' '6f80e645497421f3e721916349ea5bfc1dcb5c50e191764a624ba2d249eff098609d58c1e79ea21227a49de06be073c47b0de6d06fd7e8618c65859c23a80e73' '3a6ab4089097589731672e5b87381ff22fab89b43878406e55cc87b60ea3d6115595787fe75af55ab33a8f7f8a985ba62d614f9a0707448742072e648e1af671' '1cb2c86b31896928b3049daeabd19bb9b747dc25518094ed215c4d7563368da2bd77b4959b530565568ab633691fff8461af64460d4c0f4f9536cd28de2f73d8' '9c1a29caf1d669d3744d0934ce086e157f8eacd1b20ee7a6524507543477155879c66ce240af429c3c5ac95252d153a6c3bab1f190e6e34d00b1fae9624fee4a' '5b6b17ec410f1269b5a56f891ab87896785655e65eac388f742d40fec811b69d1d2ad55b71214beea6ee176f7a2ced5aa0687a50fb107e6ec3e4d6dcb5c36b27' '66c01818d3af809a2151e4fc87a669cf063afc280fa9ef8e5a461d7b34117509a837dc5cd8154048ae32644189a62fbe8ccf50949bae62ae5bb0a594efdefbbf' 'ab6597458daf4b77f4887cb38ab2bb0e8707fc4c000cf07050ee3e3d2b934463e4458a8a5c64a454c4a2a512882277d03bcdaadb2724a5bdeffd9688d2dab23d' '2569970b7b8d6e65993c5b01c32be8857b6561690067b3657f9997a54335c81e7404110095a1ee388c934196cc6f5834a4f08d0db0bac0953543830613aed247' '3cea1f997d20d4911323b47d5f61c2fcb3d13a52bc7ef2d9aec7d82f34d6e0eb9d366d4d58e950e4a461bb55ed194c31781be93f61e9121eb7ceb01778043b18' '9a247dffc3b862fb10c785784963c2e624f56de5ff768caaac82cd2ccbf595d022a93c934b63425e81cfa1c98bedab7c9b67bc39244cfd7fe75db3cbee309a79' '00cdd54b1200196b6422ddfaa96679803d32669f94e7614159a9eb706710b909d5036dbe9b6b8b2af60f4e20bddef4001b17a5bec6b20d9c5cb37b1e9cedac90' '78c08e6518eba3f537b716c5ff2b31d531d786ff7832c98b6e55f792c10c6e44fd9804adb1f65c5d683c4980326fe7f3d140559f0747aa6ea41d955cda003bb8' '5e69959b5e1ff717ed7cc5f578adbd5354811e6782e3f876d3f650fa6eb353d0394021b72b114da72ca6aa4b924ea2e4c80fd6e05d0d9d5d05708e409abfcc61' 'caec416b78f024b3d2268c987878d9a895e0f7a4d6683720e58df3fc80a2ba975c80b958211abea6382750f3a8f6e4dbac4aa4809c7e6012690207ba145c6e40' '7c380d84dacb0015c383633fcc1d3b23dd97b91bb68e45820dd730ee1f8a1feb1e2993be29b2a6a5cf9af3b7a626edfc30a054907105ecad2d353d2213b5ebd5' '2672fedbb3dfacb593eec27e77dfda6289d6e659692866b00536eaa55871fb09b84e04b30fcdb30421595271dd57d51ad9d17b8269d081c29fccd948d27dd56f' '7a9dede578dbe6aea161429c8eb31e22135792e5a91f607723e4620f199fb17f63278f009de5fb2055263be21e6342b7f6be8a80f4b93fd1e79371e343cef3c1' '2d9ee2435eeb7e897e21bfc7b99b27a76742e0906e84aea9f319ee325ba71df0d8d454f016dae361d3635201c770f01301dc3f22831f3f797b4dc39af44dac2d' '74bf086a31dcff5b0eb35547baf0e3d64a9c3fc0e216a2f13ee66a4a617d965d93db2837ec61693734592a92ab911ebee0638a45b099652626c9f29d1838e38d' 'd326aa0dbf1f5b2eb2c396a507d9ba7df2fc154b963d7750d52134c1aa774c25d9363c541b427c01c0d542ffff8290781a530850e95887b01b2ee621715f9d00' '8fff50aaf785e146e93040f12d5c3eed71161102a26bf9475b85a2e81ec85572bcb8543935131d7d006f03b190b5de616809e55bdee56b0b44e526e1f086bfbd' '316892307011960f422d7f2318dbacacb0947354dbf87b20ff51e35a277883c7a9facfcc20c9b8d3d76f8bc36222ccb4989ebccd002abc108fb58bdcd5d9aa7b' '1d6c1519320a479da13b827093fa7a605b69d21a3559baa22386e0579cf6e3993a6508a93cef52a410537a13a92d547046b57fe5c4fb09a6cb600dc767c9e5e5' 'a41de032883bfeb4da2da2f8acb3bd09767992e95418272271f1a0bcfbc52b8aee324e5eb36b832d90eec679518d365aaa83c7c110b257ef7997afda9bf49ec7' 'a29cde257e355b868e9fd25fc052bf7527d78ebb0a5c87d29881aba7f1e72abc532eaf9634b068bb49ad97fc25d5d25ae1e4451f9c1fdd2cbd95a55fd2c12ba1' '02c5fa8afb0d7bc959a893fa4c68393e961d31bcb8259666887447b4cb7b8a46a642b02aabe8a25cc3d48243c1225b1c5789668f38378d4e563d54211a6eaabb' '37d51a6c7ec35e330732b180413f18ddb8aff1be761705926ea2a9480dbb9ad198473935a34e70d4690dfc5ee36dfa57aca3285361d73cc5f37a59ab6d9e9c45' '032287f774dce5d60b2809ade73199b070366420b3dc8a71e0352f6ce37a2c8e4218945729a71eb87fba34f0b48a4d773539023c9c7ba14b81630ad00d52a39b' '06af9aefb5f4f9f6135245cde04c0235eff0f20c0bff640e52080eacbac1c69f8177d49f2769d6a1c3f86be1dcafb9eda49081309d1b0e57eef5eac59a2d35e8' '577f694f7d528581f96cceacfcbc593144be74b4e25698fa715e1d9e4ddf6f87712018829193ea1ba2841e34f4e8be94c2af44678a934ff9550208ef22f23968' 'fb4bdca32dbdb080e3fae2b98a1bc5bdffe8a6a0b00e74414001562e5811f1b2e947c918d21048cd41ec942dfac0eadc0b8a7bbbeeafea16b64ee961a8ee6496' '6b43cc4cedf8729c7a3688c97bc65a60f23c1e9009a00fc0f265182a873d1b2f119b5acce8f476c9c7d7da1fd2fa098e7489754dc0bb2256b8e9ecff566f3f4e' '6d060bb9543250ddff1e3d5a09da811f10b28a59582b9e90b363029bf42ea4ce082bcd31ae68440db72d8bbb78fa0cb71bddc34ce1afab61fcba768afd619d0a' '9ab0022615d20ef312e5046065138ed00ff747c6068d4d4b317672fadc4552f4f00b102065f641022cd1f7ce8175bdbd2d0fe4213db902415a7c202f982f8319' 'bb15096cbdcd6f0980187209f8b13ef3d4825831ecb8e7d93ceb6e4c60c2a0e5dab73dd1f181b21cdf5b2d52b6b15ec622605317afce786b7d33658a64bd0c2a' '995e41103237393e6a8f6029437393e5f2d96c76a5f13251da7c546786533d203993e07b2b19c152086525c0e4a0b3281d943498b33bc5aa65371a97fc6f7b4f' 'dfe3500fcc979ed28c7e4c4e0fcd70c2589f9c4622bd77207195607e34900e884594b60c58d044d86af65f7ae7b31998a251e14eb3ea0c434741b632a5a0629f' 'a00ff522b96dcd836e1a3a6e5e3b70aa401f13b6394e0b0e2e704ee472665a3d56edc1e8cfd0a423aa3ffd14f24b55f9e2e58b2fa33313069a2d5d2716c5ec66' '348cc7640ef7ea29a44c31c81d3eb063b709b1979739409a5ac6a3a014b54275bb0adebb0cd321041e38b921cba7c3fb1bc22237535593eb8134171547a17caa' 'ec930ae0bb5b484796aa68b258f306bab067e623a5ef9a6e670b537427924a06c2662709b6d53b2cf77b790ee24eb7e22d2c9524652213e3adff5ee640862745' '006aa1f969a5ffe7750b66eab6d73c79e68c52809e64a580b2919cf0a3ce6df3a55d6ec5dcb708639c6cb2219bd6326ded4f816607424f69654061c5c1a2fb9d' 'adc0a0e1aacd031c72163f71fa9435659ffc6e35979dc26fdea9815554a2fea3f4bad2acb2073044c34f17778deeb7ca6759a9f87ab83f98d5fec790d849892c' 'a632a6697b0e5d155db162b53304b3560dddf6bf484d9b964aa374b2b5a588d34aecf4d6285ce4b1b34bd1550943c02fa1c0b23a8d8b58cc9991cee9523b4646' '7b793b4c5eb2c530a391de85914aca1d49812d541a7239632ad7898b9143163693d0a186067814ae1594bb771fbeb37e2c3993da15caf18980bd3a1121b86684' '613fd2e50aed4b932e8dda6486b0e0af1d5d40633adb81f5d9d9a64feae30ed9023460157fcc3e566f9117796e077cd8feed918bafcd178a55afa62f4152594f' '446489c2ca1a1bfc6e5d3459618c5cd4e8551d09083f70575998ceeaa91a5de6ec6a1e012383f8b61fb1d5b47fbd30617e1710539b54ae94d960d18c5e25e05a') # vim:set sw=2 et: