# 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.6.0 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 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() { 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" # 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=('2484a99a62fc960b7926b1daa6055e14b1f9e1006ea45522d16131071b33003d4f7ef95911fd2ceb3e941f9d251c66d917013d6a5ecd717d2b1c6d33944f2e01' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' 'de7ff8a267bd0ab3ee3725f6ad9c5efd625ad12e611d46d2e159aa1d6e43ff978ec7da2e6052cc3bc7eb9c22e9ad688d643f15f31513eb26d6a269e3ea0532e7' '6b0115559934892f22b9a478dc3f79616d3ee7d0d1403d5e0d0c1aa74036c894bcb55606125a6c7c758fe2eb42cc8a0e91c68cd3863ad2221068ce8d5b6b944c' '7b06e3e24ab46394227d1bdc9b0b63bb9dde7b15f4ddce150b0172a0d00fe41bf3f023fc098f172f1ad73b5672ab285e59afdd8ca7c75f6d77bf637d625fd764' '250f912d83dad2645fddefc28e58f358baced7d941ac4df0cb20e63da7f08b5f4e44e1793d851839b517b8efc5e8aa9058979d1699660d61f763e877f86f3a66' '15ef396c6060f65e7f22951fed2c89ebcf4a6f018062554b4c1c8956e225ec0f74f507fb6127dec45a56894d06a0d83e86ac45ef1dc426ecdcdb63ae39b9e191' '4a1d60b641c8a81fe264b4809e97f6f933946053bdf7f96170bed977c295bcc9cfcd0efce3b74b9170bcec769b46b2da0d2dbac56e3ae3184804f55f2db39ee7' '85e1620463d43123468d1dce8183f74efc4ca4c46ec4eed609cbd859d6bb996d8235ae974568de60d6bdd7a04d03418af9b1f9cac9b3b85164641cd72e6f0a55' '4874674265cd8667f85c47c4f04342dfda94a679506e0ab27d6ced6bf91d2cccb46ff365b0f001bcb80e031b521a3042f9d48d19a592aa8cfa06872e0c95249a' '26658377a3d9bc37c225df83166a6575b652ecd2e8030e9a87cab4c40d9f2b14cc08c687948d615a4a080fec23ed7843dd6ea2bf271964f0f31bdbd918e623c1' 'aff4151d3de7fc67a50bb55432e0b4c2c60ef9c1d87f6678df5aab89bae8874ae2cf8e347cecb25d2504db43082d34a642316847aa89c17e35c15a3e715512dc' '035b8e81dd6ff442414d26dc7727e18a97fac032dea503621d8f5e24c59bd3622543b66b703bb0947ac60181742196cc764550802d832bd2e7805d2d67cb1efc' 'aad8d9c67b95c74169caa31b6baa48c505ab9b4cd0d39cc80ac1063991d94410f83e72e7f2d7c557a7ed108bc5d08a5bd9f75c798a988957b4ed29a444bfaeb2' 'a2731f0fe4eedd997c7e7fe87f08a7d4f14a7a3eb4fcf397abf0e71d281f481bd6a3658141ea97461aabdda0506428ba46f1bbedeefe861c302044aebef63881' 'ee0dfc43cea886a380f8452d8c45ee366c246e40b440a3f04227ef0bb2a5f9d7792069b7b2c93a159145e97af55af90463147986e79b275c010682ee55f079a4' 'fcefc18ed7dc89e4914b60590a2d15974a875e54e925876e9b3fb6644d417e6e0cb02b3c232c6bfa0ce76d911df9a943ad47d910b4aa8c02dd9c547e03595e90' '5d7671ce22e9dcd09ca57920bca9e9ddb033c622519c21fd9e3541f527b3aacd33606aaf7e54f58eca34e8b95ffdd1ebae2207e3cc7fd7bc2d1494ac0b5076cd' 'dabad0943ddea13c062697677fd39ac167323d05ac2457450adb03bafd9e9315b02c8028049aeb1a7da73efc9c07d430316b5a67e092c70d1636f664816fcc9f' 'a986fd4f3f24b8ab44377f1763b3b1393df5b0b6397618bd6f0b3bb4c8233355d8d8614f4f6e229a3e053c3d51bcf5ea7c274eca39b343180f4892e122446e8c' '1571d4c6b6df1410c8e791870c7ebef1553869b029649aff00db9b816d1492e827be3f4232167454aee5593433029fab228791141a5f3deb64d2a8baf58ef582' '504fa751eedacbe65ee672458d3e4620d793e83ae91e7503b7862af070c5340befb3d7c1830a35c9b9cb63acae9f34c3a9109f8cb86475b3f1aef30b558b413f' '11adabbb4cd240d7f57b9c8b683c073dba236d8f54d53ead48e3bfe82f6867bc4da9d623cd785af1ef64fbcac00ca8cda284672ef8afaa3d667165db5ac89799' '1d76dd1e9e4717b014bc379d7d2942e4ddf02b223c37cf27e3320c6151f0fd9c0130b35908cb769611facb6db95b24bd036a2e4c4d9721e66eb8682d54862b40' '16415e17ac18787bdedcf59c1643ea840ecb0628fddc5a80c3e23bb709b387fbd02c54ff85f54a68e3f59a68acc829b958b4e5334f9bf4eca6fa7cc7151725a2' '3388b4dfb1d9c2faaf5f46fb355bd3041578e8b03233fd9f6d2282df538f2f716012909714f336bb7058df96151a0aadbd10019b819f1002b0ba893ae21a4a7b' '12d081829030a569107acfb99de6d583c01173c1170af4a9906267f0cea709ad70693fa674112fdf08316d6eaac577643e0c194c0e632fb2dd4cd0dceea51c8e' '42c86bbc93f8467ab31c9e0611438f331e06927c6abc0e88c2fffb677e5a8b798060c71466584a4d0bb7832f197d90caae5ff84b48780097043639229ff7f60e' 'fef30822c6dc890cdc2947eabd7be9681d01da2f923d954c21406d3ad38e8eceafa7277d187796265fd432a4ecdd18c1500b6c060a6da6e2f8c654655ef09744' 'b39ab0bbba9ca2198b27bd2ea40b1a189a0ba3d4090eeaab8ee12be50496d9bd0af61566bafad2da2447206b36cfec01a1a9575a2fbad93c61fce4a5e5dbbe0a' '31f0f3c215f8dabb89bfe2e8662db9d96263a604d05e71caaaf62c6051b5217ff540224d3d4faaa5c8c73a5f67320f238b3b54087c50ceaf84d176413eb35b86' '546337ba1619e6040bd1903bde28b01ce5c7793630ddf554f7eae1b46ed56b2a2ccbf8e06f63520a684ad54d081157faf0c24a4523e326282c23c26abd82c3bc' 'a21882d4710de35450fd0ab4c064ba0e5159947cc0e406112b711ff61a92cc17a28bee05194eda5a6e88e6785a53d369f186dd65b936a29a897270f299ada8ea' '53d41f9d180db0d744e93e16be70f502040fa0ded368c63e967348fef795c04dde4d3e9360487db949398390db24019cd8f9332c8f9d5875ba90767e53bbabcd' 'c36087e0495810fdb217d30f8cbe5b5e99c0218187bd0be4f1ddd754e3b8188c036afcada3cb2edbde28eae6171204e0cb3703b0b50bce6a83b2d6acc4eab96f' 'a0bc3a096feb10f63e96cd456fd8b686779463e3ea670c794ba03df45501162a910c43c206296f7102398eb2b8519e8f56d0720df9e2bb6ad6e1577a0ecb342b' 'af0690fc56e21cb6483cc80e66845e3ebfa4333f9c4fde8f5498da15d758222bc659b68930d2e4f1e26ccd86a71ee352dd37f879dc6365354aaae7013e4e317a' 'b46fcda7d137c0f7330f8e129b2ccb740c2d90dc663012893887fc6d5ba938647ce5b9376fd8a60ac8cd52449295b82e06243683deb8474b1752300a65b02367' 'efd334d0e03c59871950a7c2bb0d790e7ca37df43e858d5ceda2abafe69a8433fad01207e705dd905c34ca573093d611d3ff5c2ad244d5f872238b1536080dee' '248db30b4d9f4b43f2e287ca35532881cb63a640e53c8a675836c2d38d65828504a32bb0cb0e9782e0e331f842d244bd795ece95e578c3fd6ba34236ddd2b502' '6122eb7fe0fd01de43895621ef80c868b70fa858465b5d6c0a4e311ac9c0a6ac7d4db7de3d049706f56e63454fd7b1b28c87a2170aaefe99a8ab38961046c0f7' '5dbf61b4341dfdc1dd61c215e4992cb60bf90f68f58b5492e908c020d9ad0ab1fb13cb0f11897b601ce5d64ae5e909b221c9a56c23eace020ab0c1bc161d0b4d' '554661e54fa94bfe67198b58a6834de4808373c400352c0adee6679cefb017d29c87567ee3b279648f99a2872ab7ae03c552ba985a44fd1de50e0ab224b3c37a' 'b130f3c91f71592b85f3969a6c2c51dfd5283b1015108251a779c6ec2d02e2924cbe99890745409bcd3962bf7964d8af52932e3679951193f42ec3868edeb718' '9a06b30dc03e7009b045a2ddfb1cce9ea7f87bc3fcd4600ad2d7421a95c5ac0ee5a8548103e8ca100768b0173e4f123063594242423e5fdeadf2c7a44da8fb8e' '78d2fc46a80e118f98ba6c02179ba1834dd46ff64822a5dfcc5565b1ed617fc65de3f577716db5f643d301e9a7339c2783177f938cbe3da62329b48d9e1e1282' '7904f09c9a662ee2430d49490014f5f909b6b348a0cd6cda09fe06b75e973021fdb6fa910e484c818e654637d923b2bdfea9ae3fc1712bd10a8c51639f6c33de' 'fd75751556487e0b44cd26710095bd0441000964461e8404c2cbb1734cf2d1f277d0e70cb0f8b389f4a24d3419a0894126a44a4b19b90a285cb3591fb7ae50ed' 'f07c8cb15228838cef222e3dfda8e23b63bef8b22a5af894b9e808b623c6bb75b45dfdb12246d251eda140406eb9d2d312b949fc5a1ef8209011c77a7c96c973' '05875bc0b9285eaeda64b0ef203ec26801bc9d24c4b22cd47563801a36d24ab235db63c90dd05eea68e460b9082a7af56f4ca2a0579e6edade5fe6ff8dea3cd5' '7bdbe6d409236a14f1164cc234ffc8ed897f186ef828407efc85d850f4d30233f79c89d03fb88aa674a05ebb7899f34a7ebb3ae8dfa970e0927641db170df325' '91950e41a39fada900ef6689604702e690914f53b03552fc322d859b0581a5f50d571e35a5e4b9ae7c7799e21c1883d72246cc3c33c16d06b8a1deb8d88069d9' '1457a5d8d43d27e23cbf92b5364edc822eb52c764634940f58258b059fa86ebeb8ca93c17c87c1505c7636ffa06e94d5fca5488aec91aaea300fc0ae38acc8c7' '77cf15dc38c999876fe283232729637f3147248cebcab5856963cbe271bf7f442ca612db245ece0d1a3a9755a9b640b31d5f2503d3c8ba74e2683ec78f387d74' '2e3df44fefc145091474a7a445d527d49f82af98e7438bd8c259fa43b6deee8fc00b66ed95e66e058ec7561bcf9ea9a11f3c3097900fc9f6cbe8bd0e1dd8aaa3' '983a03ca11966bf033d9f777c6e364ddb00ffaff72121cf1dc098ad239236585cafe9db732838ef234a1fdafa28f37fbf3ddb80e2b9de43375a85a9ceb812292' '486bb10660ebf07fca4366f40e70894ba441f3792cb1b6f12938a955b487fc3593b6cfc551afdbf1a0775d9f1d85590ee925ac27bf9f19daca87adb40c85e87c' 'bb528c7d430d5fbb28bfc950bb7aef76b90604f7e55db1cb91159064c1cb2e11cbcdca815ab9cbe36f12864fa51798d7568ff2ef7c06f333a2dd95380552b832' 'ada54177c33a174a3462043272a8aea27e9ecbd31ebd9ea84223282ae160a7eaaecb40ea8366931b7b0c82a85c0f848a034a92b2f80cd2c301479013a1de611f' 'eed6e364bc770ededd6a86f4ac4a7dd0913194a30db5b79550d0e7309f533618297f2d4cd56b1114d6e01997ba98717c5ab01dfb00c4f633eecacbb23c5e2fb5' '88e4b4d9bbeb8676a65bf3d6b185c86201475dfe0f8587a481e17c621dbb40c5218637d68c92340e38a754daf38b23a51af79934764f7480face8a26301ac4a7' 'c48d3fb2953451f4b60f416bcbe5f327af01118f6a1a1aeaaa97ceffc9da4e8fd2c06bb0dc17b2cb71ac0b075a60a71acee2d3529bf3e6539311293006b7a5ec' 'fe109df931ad1a7402bdb005b8acf26e5ddacc1fb2f0ec625b20f19b83966e39bcb91362e797c4fe918e904ee808f8e7e2f244bd0bd15ec139301451946e41fd' 'f8f35b4cbdb115cc715829e2069e725c2ca21a67eb260912e76e0b920070bac98d91ae2ba4b003f2fd4e2cc71310accd43ec12b48ccfd46fdbed23d3e9db40f6' '4f2616917a13be4e9a2aa9f2be584eba1d9f2050cb99ca1b5cfc360636417c5a18050913c6e9e72cd1f8d1deadde3132a51755ec4697484fe097919a4a39ce7e') # vim:set sw=2 et: