# 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=102.4.2 pkgrel=1 pkgdesc='Standalone mail and news reader from mozilla.org' url='https://www.mozilla.org/thunderbird/' 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 botan 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 icu libicui18n.so libicuuc.so freetype2 libfreetype.so fontconfig libfontconfig.so glib2 libglib-2.0.so pixman libpixman-1.so gnupg ) makedepends=( unzip zip diffutils python python-setuptools yasm nasm mesa imake libpulse xorg-server-xvfb autoconf2.13 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} thunderbird.desktop vendor-prefs.js distribution.ini mozconfig.cfg metainfo.patch cbindgen-0.24.patch rustc_version-0.4.0.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 printf "%s" "$_google_api_key" >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=( '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 ../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/$pkgname.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=('d74045e3ded718b9dffbf9f076f61f05be63d1914cca672c5145f86e94677df35c0c86958e31aee4f6388052c766b9588b942ab8578bc214addd49edfaa04a4f' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'c9e4966e135907f7ac3c669da9102de3e1cb90eb84e9d89a572037a2999f552ef9ceacfb031e386b27190449f820784ede8421915ac5dde4ccda3b178a9adff6' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '3526402ccae1f0428f2e45bae8d0b2cb909ac2698bc3508b692b827839ccb21203ce414206039776f6ce946fc53e636290b7870e9886284d5e9d1e8ad050aac9' '36d9662fc94cbf7dcf371adc13a9cda679bc75df961d86de019d3c8ebb0be3062d5ef762d175fab58696db74758100a65de45d7832e0e2bd4e15c901f72d8349' '14ebd81a8a226b23a2915a1e4082c6cbf0ed86ef47c03c98de8f9146319cceb84699863d1df53fa5b51c08b122ed600758069fe33875808b1cca99cfe8c2ff3c' '7507d5f7cb851d07e3b52002605e9ee003738dfcf7b67ade69534c603d4fae1312c0383faf517feaaaa8fa1a458afedfe3f1a3ec0eaac99364e718c1703632ce' 'f8db940f7ebde72b73bfed6483c043a4c12ea516f3613f7f699c25c2fdac3f54f5601c9104a154670bf6cdbf95f66b7a24c042c4dd12adbaa2b1ec978d670c5a' '4f1eac67a367f669fc5e0a59524a7cab5abf1090d3ba7644b69ebc477b92cdc558f968091a63f44e604e10be9226e3c08b607726b55447ac49cdeb718519fd98' '9e441c90994ebda49f6f7c3b19137c3d3845faede3f4f07de2c3a164284d08fd8216b51961126bf9adda62318a84ad3c2b12d0dcf055ab7d3d450a926be4dfb5' '477ff50e728bc3eca193084420dd46088a1181e9f1444977c7d1b4e4c6bb0a6bb501c7526cb1a712fea8b7b159f1e6cfd2ab935bcd0290777c913ec048f0ec44' '8eed52dfa8ed94a1ab4aa0696770523b07a9e6c4551b76aa5d87ba699f5c5ddde6745b3f3074ce8786b2b52adc6dea8f8905464649518a38fba9b5d691005311' '8c69d3201f011f2db121008f1d2ec81f2369e5f4b918d2092a3264d0f9c36a8f4f66219cd9c3dc4188d3a7a7a05176a9f298333fc5f0b4fd278f5ebe916b36bb' '8263fa9357fefb2e8ffc21043356c502524ba0e190baa42d6a171be6b11d4e79f00de9058121940e31abc5f4c6a1eb95d4bd7de941d17ac541c64f3d9035347c' '11aa51d16ec3807c02a3c32798a94c86ae7b9a5fd086aaabefa4dc174702a12bbc5c2dfb49b6bf3b398fc482b24d480cd1ec1c58ab875b7554f47f029e417e49' '802e227b30d8b4d1edbc546d973ce05486a8b80eeb98f0e12a02b6496caf2e03e852060525d5c43e990196fa18c50cde80d3a19c2b9293b0798faf71d8581e61' '094e7914fe73ccd4349f0c979d11656b486aa7ee9d35550ef072af38de0925526051c716ab01c06ca220d4e26699cb01b5a203a8dba1e497e38d4ef8d23e3936' '39d1dc9b447b606f50e189eddc2543048f07e42fb0c78a709b9acf6c377318142050c278857161592d3268d2040531251eae5201acaae53ccfae632575d4dbc3' '6d2a4f87d42c340f0d8768e5c45c22dd0b6c134eaaf0756ad1e5b3f97206840d15cf75cc09828dbe813ff3863266103a0dfd10a44174ca9cfc4646b8a6c337c4' '1b86a5132b403b195749994022f624ad931d413f54f2eeecf02cda4ffb06b15e64e7e03577d44f4b49b1bd11cfe1aaec19ba98ed019e7435316dac39b417944a' 'bd32e4e2972bcc065f2edfb6370993d9894d34ff37c2c78b211b54a77a383f450f1b0ca0f15ccaf62491cc9ae626e86af4b9b3e8844c5e7bf9c04049a617090c' '06a475b8e66dbd5ea4c41c728b88237b3f76a3eb13fa8aca882274da73a8b38cfa779717661935a618ce780b190dc473a1542d3167e29a43195956bdba5abbe2' 'c9d4a6553637abd3d44656a015ed7d17b48b82fe7b3bd2f89da9723d10f9cbef3dff011e41e94b264dfd15182d2d69ff04f8f4650ba6555372da44bb9e1497f7' 'f0776cac9cc1cd9ac716b47302aa93ba6f65fee469f92b42f4366ba557f289c6d98858a7f9631b9f4c1091abf5446e440e855d860f5c5cdadeb3660fbe847c2a' '8504863f40e2016cb69f0444083b3aab74e48d13564ff6ff0f1c512b00b0407622799f1137e05be2396bf4c2af4c96a58b3e95de349eea9405ae1107df1050a8' '9b407d31315671ffe01ce9f767d89eaf43c083d2f41948a65c6eaadab6e33faf48383c8c1c53a02a7bf113260669d80494f4c6ddeca1eeac51e2f8b780fb8f8b' 'dcb0afb46c34581a7d05462d98dd6b6beccdf005d417f76f3997df41313a8d91512febb3ed0611ab16bbfd1b5092c43d0392d3f0f577aa5c147fd6106ce914bc' 'ef94e5b72b68e2cc3692a29b84aecfd82bc17525de9b7ea6c740d38840378da48907e8cd8c765f71788ec6d6f62e80cc74c049e6fedf7655555e4c18193b15c2' 'e50b27c91b68daa2645e58f0bd56a76da42c35d3a3382abe3664629c86389db5a2fb1d72fd033d4de1b63774d9b63885ba8e23fc92cc5e5190f2bed825e91566' '82675a468fc7cd282c64b0e07b01d37b177f54ba1555824e2e0b589a32172ca4c7fb7cd2b63d7ee51bfdf89fc687a93ccb1ddcd252fefeb875a9093faaffa2ea' '6100a61507778adfad01f707511c58812d814705ae70fa29600e6375c8de365d5ea9d74811cfc771a4cb3402fdc38a1d937a383541071eb7e950c60a4a19c693' '0904fa5a6cd4c34c2951459086b974811079a930f8cd683975df23d698a798d5c61906b70127fb667009c0deec397a3d2cd6c2810e6fac09d9fc22d2c9972304' 'e057e55efcf5e7e58d44a5819ef7a082fae408adb31241da0634e234a146425c2febc9934bc279365d33c2a15b2e606e75528bf4d29ea98f743c9def066f4996' '0a4fa6d0689fb027aa2a4194d98e6df0e6e66334df8c6cd42b2254f38215ad314150d474fe40ecfbaa069e5651fa1d16feb19d4d134d7b5a29547b108f69d62b' 'aa71fc3434ddea897b5d9a51e449488b8b706185439898fafeeb3172a973abf5bb707cb1e7069800b506a1345253308c451495fdb12b890b97e2546627c45b4f' 'ce5bf7abc54fca524e50db3f80434035209e3201df088417bebf2c4df54bb76b13f0fed0de88bdeffa01d11f1b1f1aee57ddb69624f7cbcc338e8dab0fa4ae42' 'a8632d326ef57ae058a8fa65b7ff1486fb0d4572057413af16b833e2d9e3450172cb2211f09ebd1997d87dd14232be09420e963622023bb7a7a932f05dc475af' 'bb6f92c8f3aaf05587a7cee5a8b4d5bd313b66c12194ebfc59db415bc8945310e5af176829aa32586850d222f8efed92de14b7c3d0b1e656b4e0faaee9723009' '6b69c547efedbb43db8ce46c6c1bda3abc13b16afefaeec81d09903965bc7c0a9b9ece6f9efa59cc70fb8116c787126e4977fcfe5d3e8f08c13073d7f57630a7' '09322704f7c8f3b7f362335c6f417c45caef2248ae8136e0d8bcd96df52a9989690b4b8289e37e7b6a00368d779ad5402802925d122e267094e225c4087d9237' '3a31d1d1c4eff9872079b137b78522c4796fed0cf61b85dfc9eaa151373749a9298f53d978255f3a569c3bb8f6fcbba63c294ac574debf0e0a9f4dfa6ef937f1' '74401fdcad0b8e4dcc2b2122da23484e89f00fdd7050bfd8c7d555121f3ef1a686b0f8176c845e8fe5137d4be4a88622ae2d4c279a93eaa690ba62f9ed286f6c' '3bc6a0e13537fd819480cb01545cd29784d84a7c63593e3bc89528c8a8ed1058da42e5a306e96cc6422c795c023016ba15360cf0d148a30149c0673ffd89d066' 'ab2e3e027a212edd0bc9a238c084d4ccd3d00e8688299b3251d2eecd8aa4a387cf31dc6cb0b5f41877dbeb6c7f0956702b98d50f13bee0cdf2e6e40a435474e1' '7d1948bfdd0ad20754abea33ad1a06848eb2f2eb15e1d0849dad4165e913886d72f6e17f018bdf4350bba2efc9ee102b6ec8c447890ef37cf8f4ea057c3dd7d5' 'ce5fbdc79c5c41a1be1505a87fc0b32ebf52f0094728299e2c7167dce809f0de1f3429c339ffa97678a90512c8b03b8965981aac297726dce6fb98b17fba7dbd' '7144098ac3b113573b40c118d719ad26c963253161e9121dd358373cf2bbd6e928e76aaffb6ea922ce899c4c19f44b1577514a51cadcc589fc5fc211e255975e' '05e71cc815208a4177208c52dbf64a732f245f10d0b4f1055a2dda6e40da74639d5e219ad0c9193becd94e3e114d687f8ce1bdcc02bbdcc285e2b97c2d4c952c' '632dbd2ee6686d7e024e3708fbe19ed201cc345f1e1e9f56da1b517f35e3069b4bd87d3add6e056581547587072ecddddc3b44bd4ad5d23da86c0f90b6a24207' '90a144f83c5d6e415a6939778bb537181d5d8922103e8dc3c248fd24df17e8964cbaf5646628d3d39eaab58d53c064f48137f364304574f80a65e080273126a1' '10a80d032eed010bc580331f79e4038f1e7debb497d3c948434904c222e7f4bac44b19368ebf3dc2a0cbfd0e0df66786af309f0f4e01ff9922d70673847da68d' 'eaee3ad02883d18365c1b0f9a89abe3c0421be74c517c766ae2a5669af1eb4a7c8ef3e5519bc4dc114356cefddf038b7723e1071313fb19d4d5f0b818aae1fc4' 'c871d6c94c638039184fab6388c62e79e33a269ac8260b8715c69a4ec0ba0e15c93c0d1db69b3664dc744e23ce2093f2c2f2d0745d61421c6f8f30444e110f02' 'a4419cbba043e611f7a34ea4053ab5285b6aee47c09c1a5456881ba77e5ba229a0ea53b50bcdfcfaa2491e1937cca0b6fecbc651e802042279b3d9c2285d3daf' '6356404ce6d06751236a0763dfc7396204f7a68f9067b98a1db8268c9a7c5085caa7f5e88a05d4a40f02975805b2ace1ed9e18e7c0b8486e6fac2afce2eaccf3' '3fdef703253ac4918e38667f7a7d7b0d16ec20638975fa11cd6293f163d3691365b4cc1c5e86a19357062f8c290e9bf3a2013e4525441d3e9fbf56a89ec6210b' '6e11f1f4f09d46752d2d91e00024c97b02802c0feaa9552a3636d1e059f3b096de08b3b1b509213c3cc0a75912400a8af83b15ec01e6fd12709aeb4f7160e388' '766603ed11c9d343aa289ff8755980ed53fd5a7366e1e67d12312bd21794bf8e8ab103dc7afadaf8125edeb852bbc11a8183db9332641aa140cb596bae552355' '9404ff61a93efa682b8748abc9cd93010b3be71cebcf288d12c192e217a61169fed172af5502a8a90c819d1847914f854be0569f4ba3176a7aeb1c87b924fefb' '736cf17567052007e31dcbfad027edcb7215e9f8b8800c011a9691775c3b18873b0595841e566f0dc381ab01a6cfe40db639cd0d7b07556f85fac6fc68db23ab' '750b55322281aabd2a89213eab605e0474aea8a1262d24803e93b16507f844fbd491db861d02fcf64616b0cde9f59a3a3169bcd65feb2edd401124cb0844c295' '19bcd31ebfa4efde7441afad34bd6c2bd3fdf6e6ee4df0c7e61f9ed7f26fa11753e286816be7633861dd837419d047d5b09edad3e8a38dd8440821256cf1b69b' 'a894edb22d6466cf000f1e8fedd873ab2c3f5045deeda03993a4cdcb1a75a917039deb0a74a8f1101d9ca87b362b4fcf8b749ba20da691184dba8a881aec14d6' 'd0d48b6aea0f42ef223f8c364d594752ce8ecdb9e0d1df3a06543320f56cff625c22ce1ab01ddfd4cf555c33a5c79bd5d764ef4fab5c896c893632ffddca6f8f' 'e272c7ffdc98db06ceea5dc51f8db69c07d3172e010d3ee168703da3ab652c127aa4a6f663fabd87ffeed4d2b9c32a0c42fabf34e2a7c2abac42c2d6c5ba32aa' 'aefe2e1726e20a82192006ae81fd4e45f09362a634a87e4792abdc6fdcab938a228005834df31a0d958533d60caa98e002f7b3c70de54cfe1c805c02fee32fd1' 'a5ae3a7aa426bfaf44d13230f14589f56d92bc0b75b4fd24b8c746e7f758492ff21f2bdfd426a578434c35dbc7367bd5eada1961a809a3b303453dd99796777b' '6ddc7bd5aa084658253d228388af2cab035d611131ea2e4e84a6fea5f48c5402e463851d15faa979da1fc7b96535a1ee0aff6de4ebfa91f0f6dc4915da695adf') # vim:set sw=2 et: