# 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.3.3 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=('631042a3cdbcbae91d93eb71c0d4f6a1122e8bc7000d75fcc7d3cbdd0e82a4b31abac590c75771e77ab08d5700582b6dedacf62ce8e21a91e9ea81aedf1bbeaa' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '6e03e3cc7afdccb1c7e9f5b6c3cd45db216c5402aa8f7313758a3bafa4000db67b39f23c71b5b7c1aa81aa9b4ee4fbc195d37d178049033e71b2bab9c9dff608' '9515a13ca7e1e47ef01d41e16c7c4fc98c0191d9b68e5ade077280367728dc14b136ad1d3c4ab053eb757fda558b4679352aefd31667caab75486d125fa855da' '4bd1fc1b9d79f2c9a7dbba2d6d4403f539fd4ec6681f7b582b5918254dab0a46fc6df314e96da85736e82c6010f9613adae98f881feec904a5384ace4e82d6a9' '0f3c9a62712c858f6c463b6c927bcad92388d47937ad0a0ba347ad937683b6e325630d81de6586f0238e5a1b5ff026de96eb2855cbebae53be6fba89081c5fd0' 'c96ae9fb4293df6da22bed44ce34ba1a65c13d1675fb3321529efb5f93394ddc4de8db5b82020193d5d8e46882306ca06fdc42e2b423bab3dbab9f88587cd3ee' '2658d635802807b24443184f7832edafb730cf242ca1c90bdd519fe2a70fb9eec90ff6b51d29d6f641df284ad8608795cb34f0a3f14fb2bd38a6633852a22aea' 'd803ff8003f41482ec561ae0da1ed61e24ee1faa7516d25bf629d33795a4ded7292ce84078d01313d7764df8c01f868ee7bbc86fbbc90999ca487c4dcf9d1c14' '62f0f97c5900ffed2cc3d50b187918f430e4d1f5e4e7659e56b642c936619304f875ad2a04937792bdc6f94acb5e516c01aa79ec70df791910fcb06d4c8e7dfe' 'b30eba64403bbfa0531e2617a8816b550d5822f2cd00855169b17fcb4a1c0f3e948ebc8d69bcaa8ae81310df93bea1f6a0c8ed52244ababac17e665000f9e922' 'd133e337859ecef1428e51516374b3e147edbd2f8e0492e14698820b92912590ee8263a44665a1d1f402986c85d69d758de3896f9897f9b82a997c412b46b687' '824f28ed212d43551f870a94348a362ff89a70572399be39a4f81791465fd43ae962e99d6d95919ebf1e11664ff07e994fa1c1a2b824abb0ba89c6684b825400' '1295785d1b1aee4769f8265171c6f4812869efc12b404bac975d59e203801d3378e39a4c381fa8ee325bbc0152d1ec27c6ab33c636395c1a918d7801edce258f' '17ffed68293728ab09130911476f5a034288285a9c23cf01dbf19f18e556359e8825e6a0311c4cd35d10827e06cdc09115bb11b7c0f9e490738721ebc1e43402' 'c8cbbfece77bc6c64e285180e86d0be4160855e04b78df90e48f84cd8fc4036a06e42e516beae9cbf24acb598c7f820e5a1b2b90285a80bff00cf645fed5ba38' '22745e5d2a01d37e2e20b6a7fca672789d4052ea78d3ea4e5ffae36ecba583d47738ca507dbdda5e7148b557906c6459dbabf9dccac53357a9097694bd08088a' 'd8c04046791b63df96c735925957a749069616ae0171906fcc910a2238a116206f58d682ecdeca6c919c68745d0b7fae7bb2121843280592c984ec287d81c162' '7a3e735da66e17e073073cdaef636c9f57242a963074929141830b7b6497d0ba6efe9908d213714eac72254031aa631f1e92e14069b2ad281fb7c326f7878c43' 'b972cf06690fb815ef299caffbeaccc1612446aeb314edcb42291b602ddde2b330c4e48dd21ada08e073e201b7ddca577ab8610db87e5962f2316cdfeb145f2a' '37d8ca601b5b694b230d692260ee8f7f2bb7d497bcee19fbbd230166d8a2182ad81618eff93722f5286be426f80e200c5edde694ee2e505f63cbfd59f9c288b2' '7c50a528a6b958a00a5df308c597b715aad1b58568b6079c5c49ac05e0b52cbf489c07a3ba9bf4fd58976a69ceb9e7b1c9efc56fd5f9ac86025ce813671f2625' 'fb56d6661e5ce497db7d6f33b4fb233970737dcd60b927fb2d0c000031e53945a07654b7c415ef6c81f0035bda5743bca4c3630f2ef49119270784fd1a697a53' 'c2c1bdfcc0481d051e0617d41ffae3ceb1533bdbe50a16c650e47172da253745b5c4ee85bba8e5e292c6e217b502f43411b239c5f2b4d14a801d5e9b7f6d4a70' '91c83e07a65960e6cca325603c7ea88a47a0eaddce85caefb6deb805c772487527f3e4102b35af376b23c3f0ebcea7abfe9c48dbaf5e9b40165ce087aedbcdc6' '39e54ba82f4ea9d2224afc0c8fa31bd491a16f4aaa2d80f13bf7980165d9d0e19050495f01a5bc9175a91cc501b2f9aa41a576700c26e23b5df1883b71e6c939' '94afc5372183a3c7f4867a92412e8f776f331d0d4555eaa2f8be58612804f4aead50b821ae19bfe0eb03e1fea7719db12ebe879235872cb17b475a4aabac58e4' 'd6c6229b3ae221034c7ff4cbc72c1ae5ed67bc9d04e58fe25dffdd233b91c2888ad46816a9851862854568665f08501e613fd47b8cab2d8b1c65dee566d42a77' 'd522d930e4bb2da9b7361817bba91bab7b1cdb3c2b03d9d60765c87c4192704ded20b6d467a62d2dc5b8e83f8517f4fe82954874e14603341c78d81654d747f4' 'c488fd450eb4ed67c063be5ca50cb37d1ae98296bc7a22744cbc4878272ef83c7f176b9fcca7b0bbd9d86b9758ae81d4289e6357438d0615efb9a07db8c7a5d2' '29e80be348b7779671d253bbba47d98b7f53ba9120af17b5e461ec9e10a9ca38ddcd098616977f064541882d2f0b91b3f3342bf1f9f099468f17c1e87d7be4e0' '9e714bf8719af828a7e4d8ca53794fd7bf813caabcb3785d1a4466fd40e1848ef4258dddb1b948d4a8e5c568a354f53d2e10fb8770ee9ed5466bccb15a032f88' '8282cd45fdedc69f394381838889f762e81284064b6e32a7000993bcedc3502fcb9741e86233b30b805fa75039da7fa118aa24fefa5269c755e9cd0873571af9' '995d9166c1f1801e4d0f4df4572ec64080b7d29709e53a19a843391b6a872b60714a40c128c525a003efbef7300e0ad109da44a5b098bdaedff972fc5727b04d' '8288e6afecef5dc2e883f3becabc637f20a591da5000c53a9b1dcd311882e3ed13e96b2fbaf692a5dd0132be93c45990a0e00f347107905dedb6a0cae0cb033c' '54cabac8f6227405b5f25c8c73a8e4b438d386cb145aa7c6a9ed1c7e07e179ae009c716e1b8d686fcf45e4b7172bb2f568f7c770904be4a15746b5e67e4c22e3' '8c55bc4ec1527f805a01037605d7802ed79e337a9fad3bce82c19d63094942f63a95e240d7c50930c81969db8fda1b74d7e98817cb7e195f7353dc3ca02ae0f3' 'ec66723547e575f5e3a3f3a9f40fe8b86dff94c630ba61e739e3aa3cfe6c5db9ba779c2b33658ba8f0bc449a684d9ef0a317963c02058d30562bbb073d994f10' '1850fa688131a1624e1008bc08129af5091a0c6ac7c3d7ec4c14f265cd4fc0edf08e31e41a29ada820ede6d0125d7224182464641d57bd69fb24d6d5666bed70' '8ca52879b649b71e5fac18653f4994dc545be86ed0cff276c225a01d79c55b802790d2904a746b51036ca1fce09212238f2b34f9e72654fa30662faa291e790d' '1b2385a400f43d9225eb1047ae0e9c6fcb2bbd9b3eb79805c38b5169c6defb664426eef87dcc7ed3512bcd8aa2ecc7769e0b1ba29b0a3274733119cf0e13cf1c' 'ff780cc489710b542776ad11a6902202416a13ff458317a7be9e4c2b0516191f2c4b5e62c733cb382bae80d2c3aa89dfb4f9a2a0ad6e12d4105d11054a3a8ab8' '0d7502fc427bb1e5eb67054e8807472e5124a562bb9fb40b72e59097b4586fc332bd712851a00ec4a303586b5e6a4c24995caa50f1945173f920f093ef5661f0' '09d9aa5cd0745594cabcd7386182d3c92d458d61106847c86338b636e48e477221df34573e0906bd37f67baf466fec1edad24cc4fae1e4770e7190d59b367f29' '2b3d49f107906e381caf03b135e54fa6087897429ab0c865f27094f2d668b495cf6fea010895a1ad369854ef63e76009ff538c541a8bb25274d4103cf12fa571' '119c85ccbf2685a8575e6e57e314ee1ce287fce9bd31b29525baa87ed2da33cb1392d1d3ac87d264e25ab3f4bdfd2b8dae9aeb1053e5e0ce6aa4e5f20d26aa87' 'a9bbd4cbc7c29ab42583d6961ea25568d3ae6d9bb938c3e2eb907da20881ae05ed952bf1b314621e7bac8287062053f5d67171959d7f1a76091d7e4a74be8095' 'a689bebfcc06e03860e6a8e378b467c13c97778e7b72cdcbe015f549b7438b172779ced7285940998387626e9ef465852901f3acf3947ee022b2886d813befdb' 'ee23e819df684d62e7854ad1f581a24a7ecc7fdd72371a925ff05900895de16365c86db871f4b05229018f793b6304dd7a2bb21ddb266f9eb54c13e31429279d' 'dd0084327e690f607861b09209db51b7e1efda6d0e6377cd97512611d2501b0a51919c4c66f1b972e6ad5c8aeea4d9894cca3849a6869fc80116b51f0203e2a8' '209b81e0d90458fe967487c7da9604e9759aaa9d33de4c348510ba06d4c6a4519df1d4f352ce036d2fc510552ef5154d5f532cb6c677eefc1267335b718c8ab2' '441e67b1c33085fea2bae5eda9e8718c25e3aa57d09cd28b5f07eaf5c50df8dda48fd31585753a600ee591071c2c277eb5f2b43f8c513695f33ced280c6df2bc' 'd757e3d843e880d10c77acde184957f2cce85ce7847eb7894d3080a4f1d793c3cc4a9453492bf330b4bf28d58df6a66aabf10dad4ca0f60e2f10ce503145dee4' 'bd7c4c1a28fa8f3f8cb640790e80b3dff8728121b2e9ad93020e54b7cb55450d46bf916deebfa84a3c01e647c5c8eccd23ea5e335e4ad33dc4f21ebdc7c63a9d' '981cee73acfbc0b6188653f961543348e6927c39076b83246ee6d570b87b9971ebe795b911daa0e2580ea2e6cb7160b0367c557a8a6407c740599a18e15c8c98' '61c0f288d79001196862aed2705e026edbd946da8cabb28aee434c7935d4a35b082efa9f7b161acfe7e2230b8707d640de8b4b4f611c26818198a6addbbd0055' '4af3172e8ac1850a80d58bafc23ac2fe71340236e69c6ff68debdb4e6e488e6fb36a88ed942f927817b9b960dd3ad676cec7f3a0e487234197fb0b026dfc81ba' '82567083ead335e684c68600199bdcb9e5c27c87d0a8cb3188ec3913443a047194758277eb8c4aff583c70c482305568052ff34a21e8922d34cb79b950d9bdcb' '7a90d2024da2f6c4708dff726acf5bae6fb292e04554fe36526100271d1323723689c775343922321916ac5731d34472405148d2a966c6c9566c8c5fac78bdfe' '4771de69044f4b31096f23a53f4cf48375f247e9de578244d2ed130f80a80cca6073d488b6079f482a15ea06a942c3222178328cb9d5237c7bc6acd4b3627d5d' 'b90f174f251b4694f50569a0e4f19d06106ac29b791199db2d06d8e7ffee052c0b9cd8e9a375a4acaf25df24ae3065c9a81db8806535deb37d0f6f6f39ac054a' '167d6e72eb97c91b98a8f378d27258fdfe69867f8b03a1f4087d51457fcbf49625b8ada57f8a49b3f7029c90dcd99dc41cec81fdf572e1bf4236b735248a4c5b' '1a807f1954eac7370d1ae446a13fdb44a1aabfdfb01b5d6e553780b8bc5f77a19217cd7aab51870935d281f85059c829421b53f99b9a43c619712822dce53b84' 'dd28bdbc8d68abd8d8007e1f3f74e3724b710e372e8f28d4cfe3029e45c4cb42dd4d8aa3a10465a8f7c8e25d66f1256402e49c5ba2ba7fc82cceee51fd639de1' '8ecc806bdd8e8fdaf5fc35050401066f27946a9af47cff17b960eaa55b27a7736cfeeeac48fb65db7c83782d65effecc7b6a3592cffd10c75b4f4bcf40d1390e') # vim:set sw=2 et: