# 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.12.0 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 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 icu libicui18n.so libicuuc.so freetype2 libfreetype.so fontconfig libfontconfig.so glib2 libglib-2.0.so pixman libpixman-1.so gnupg json-c libcanberra ) 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} thunderbird.desktop vendor-prefs.js distribution.ini mozconfig.cfg metainfo.patch rustc_version-0.4.0.patch gcc-13.patch rust-1.70.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 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=('303787a8f22a204e48784d54320d5f4adaeeeedbe4c2294cd26ad75792272ffc9453be7f0ab1434214b61a2cc46982c23c4fd447c4d80d588df4a7800225ddee' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '36d9662fc94cbf7dcf371adc13a9cda679bc75df961d86de019d3c8ebb0be3062d5ef762d175fab58696db74758100a65de45d7832e0e2bd4e15c901f72d8349' '3fbbcdb2cdce00156ec54d517d4709203b5324cc73b02df32be3891eed24c37d8ea4ac8acee3b462da340ef7e2addd602575f350b10d830cf3eefb707e849794' '1e8699ff5cfb2fe0d6b43af7afe22fe354601b29f4b81f919e5569bbfe2215a4f7319c9c04bc3b64bc557f924122c9e8c33c9a7a57f4dfb63f13dc36f9bc679c' '0d3ec14b80d936bf3d8c676ff3350e64148899ec0c1f675ce9afb4c1b4db190b7aff896b1b6021710ee6bef5e187c7dec2e5186ec7d7cbd4db5147bae5525274' '234f9f8cb953367427acf4f66d78b09b17b42a5b68e7e88d6d05a553480b97d0ba6795c6397d47c2ec56128f9617eb12fde62ae5da561a4f46265f4848a3958b' '36bfd1a60fba2e68f9f70acdf16baf70bb98cf9d29b9445e1bb12049cf0a35e31690bf1a08921bbfb231f028f37229166ea003a441ccfa4d9f92037611c987a3' '53289e594064486b4de310bf63f31bb49953522eebea135c86d4ea2c88516e870449cde96dfb7016460b92927c6ab60f11a8f7a23097544963eb26094b529e17' '7a4c9f79bd4e3c91c73b310f499f3fba53d394a03ffe389646bd5aad0b7721d2128927c30264a4d7fc84d633901568eed7ad265420b1e6e10f06c9cca08b7873' '0bce25a993e8f5b46247197a98c279563ec0be9fae9c867f4a18a9a97bc740ff517c42ffc9f283e180a7cbd6e83f57172e3d1555204fba4c2ab16e753c9eaf3a' '851d756c599bf6ed164b73bf1de839f428741bbee2dcdaa61a4a04fa5b75cdc9c407201dc0e1e1ab4f97ef0fbcc46065c90eee2d29126bd1025bc80bfe91664e' '2c4b350de4c2e9519ef3c2f08520e8b38e06bb8d5143b747a6cb4eeb6f2a6cd1b1127634f6b2ac61583eaeb3799ee0549f8509edfa118de91422293bc9e204ea' 'c31e9aa24759b3e611e06615130f1ae9639af47770c7f22a198f9f188ab80aa9fcdd73c0f5c5580dbedf0f11c55a9d6979fdc658dd072642ce32729a779d97d1' 'ae4b457d5f8fbd3380923315a1cb0b3970e25e32affa0e7aed6053cc56f11fee0a12b202d9a3cef9e3066247a417e2d2e2db33bf9a729759725cf27a9180637e' 'f16f6bd0ebc7602ed6ca21217070fa9cdb2006d324c91124bcf1fa9a0afc6fa59e0f634e9d18922fabd78bd6cefe9e9f6a5bcfb7a28f396368ab698589938876' '331072b54d61003f75b34a99570292f84453a0e635f864c528ce48c94fba23e0150313354d882245feb2d1228a2e9d9c195a412c08be4e788571aa0979359231' '783e51e6befe3a35ea382db2c385351a08bea7189646178fd1ec576ef207bdda644261e0c56cf37183caaacb3316a64636559ef7b6b80d03596af7255bed29ff' 'c9cc17de9186a3f6d966902acecb4e930559ad58f035c0820638fa1881cf7766f9b658dacebd84d654dbf533303e1732686f2b6d34aaf50a35472bab18f9d713' '0b156b3b2edfbe851e88366fcd949492e77172918888ff92ac851f51bf6fc28cfece130bb46f5fddd3efae9d92a5970433e28dc76b3fa42076de572af0076595' 'c6eb2e6a9804d2496711b5f09b1fc30b0f17b631a907fa12cb4e8481190a0300b6db47b2d7ec4e938b967199bc91a5f18b7f7f97c2bdd7c6a8c820b1265ba643' '5d264ac7c7cfc3bac8dcf07e81862fe5443e97008196184871efe94ace36ae839dac53ad4aefbb0632f5e4ded9e55c5ef3aa0d8eb75bd28cb047fbab1f70580f' 'd078785c664ad134775804590652803be5e7ebfbe60a7d361640ce8045b73c265824b623bc0ac7394ba38bf265d1b63130f335d63649dde3817750cda36a4b6d' 'f3d6702738c55c7f4daf18d1a9183d34c1dfbb9074621363369a3132c64ef1975f4651fc9659cb1450c8d4cd610810eaf6e90f30dcc1fe1afbfc74402af3b4ec' 'ad84aa83c1b2dc87e09babeef1d01737e3e3ab7edd4f816532d860cb61294380cea35ebc80566ad3eb531af77da05e10a0a0447f99ccc0bf386ae6344407a873' 'e82318909b0650aecf14b74fd7e724a376f18d86414090d9e5227eeffd1fdcf2b0540cfb8a6ec5608ef0bebb2ecc203508cd3c80777c331757abd00fea4b643f' '97bbfe9e21c88b69de7ff940365504d3cf12d5d28fbb5bdd591a02a2549c821227a90d3c577c1c2af04675bf66bf2c8d8126aa7697b620edf052da974724a5b1' '57d4b3f74bb3bec813ca5227ef753c6ee3b4b06603abaec92f5955dc6e404ee65ffb95d7d746a0dc1f0f9290f2630dc6ac054ca2118e24b197d3da3043de17a0' 'cebd6a55ffe2d0a9a3ee031f473765170110c3e7ed8a3d1858d778fea82278f9ee926a6c0e3f95bf839020176d858d4b9068ef2e64324370d2f7f2cb8456380b' 'e119d6522b862885a51619850a69b410b1f858626e85abdadd8869849e7d1618c346a412a0daf598640b19a63e43084bacc9d9f4e8334243c5c32fbbb4676be7' 'a228c41464538e9da97f47073d8f91784ad43c97f4ed05af42a918eb0a1e2cc96b44fe78ca6ac40a530c841c6b70a331d03eaa0d9cd0ac40bf0c3e70529eb5af' '21fe33cf3b6b9458355df136ec506a95b038f89cb6362450591f6fa32e88b161107a4798e411227602d9ac86e719ef56dbd47824065069e60fc4c9b92eae6484' '8df2e4a2bcdfd0ff230e33bdf39a2cf512a507ed0cb96a586925a56124e07bd4b8f3819c1ef0e850845bcc15f7859014c1ff635f80e0b952c8f538f6b6c4e054' 'e778ccc08bcefa6bdad70bd88728577ca2bf9fd240b61bc2bd7d526d9fa6ab0d954fb8c421f3e948e80cf63a343062cd34f15c7f682bd75e9d36a185dd132aa9' 'dc5e5e47781ac3d497337ee7ce8d0dc8861621a696b7acebbf0c2da72e5b11d96462adab8729288f3c1b60462d52e0c0092995d4f3bcebadd3cf0891d1a11553' 'f0379f6cb8c57a746e1870307b5995526eaa0f95333617e4982182ea72a8e274f372f3c73f43c36c9271b4408f5a3991891268af25b51950626f6d8936d3b4fe' '6a8e35e3dc35107407b76f2ebc871c1778d7862d89b0359d112bc94af9e44b001399bfb9326ddd181f8d67c9647c84ee3338851052a33dd6aa5e91e234068f40' '04411e9638cd659a3229b003921538c7c30fb3aba2f81281748f5f840c179df3ceb2b6a08001ff4bb759c92d9c0f811cb539414ad99d29a479998b6a07bd127c' '9ebe2f5216605e026a3cb4fb0a61a22e9ec4042cf3a7985c4e02336995c83b92afa6b845a4c198b1d610bf3a2f9bff9f7d68929099491a190676767ad33ef39d' '02e9a60645bd07aaf6893e6486669b7e64922f8a1e0ecee692101f940d6a9dea948a361ffa2660efd34d18a4b48b45810d2d00773497869ff7ce2568247a8def' 'e02118ef8f18ca606c33fed58e5f8be43dd0f7064751253194c14840787c10c56f27746667495978ad2dcc077f8bd5c3c10c17bebb91437534ce1ac18ead4d70' '4a66118c6e6264ee282b83f0e9130b51f3840752590520d7c73024719993d9748254c15f66dc5cf4c9f99c80d1baa283748860e95d2c2a7564aa1def7d57752a' '46e79c514903cc3281acb0979cf8a97a31156595d25e3b087602f73bccb14df3d9d9f6e31d2fccba0073b732c31af4727ec9dae17cb7d3ea52faa34e0dbff576' '33ab8f47c0e9880ecfab67181387e934b43e46bf92ad1544d8f3475d3ab360cab46dd091f4b2f2f944fb9b0ae4048c93227bbd7fe8793a1b60ae39c7b42c43e7' '4c2c0ae55698a24fe3b138cddd014b09274030aa153b9e84afcad9076eab92fae8dfe2791cb3e30c97481a55c70567c6ef4b9c6b82c840ec44d82b12f70d87e2' 'f3caa0be15061497d574ae31a5b14a843d1c7172a3ee9b71339e956a09d7ab4760975591272570a9522bcd578bd1934ec17f0bcb8aed4edd1b043b1a0e528a7b' '36107365ca9924194fb0c26f3e4f035c957926977dcd498bff3b19bdc3fc903c50ee42d3c706b54a0bc0620d4ef1f5ae0ae82c1a67c8ace2a022b4587efe3a60' 'c24c45ac61ea454ed53be9f3d91beb6599a2693985b78da53164731a2ec0437f8da2c5518f5f9dd00cf8fb3270347dc1a4bb65866ccbe336e454735c675db1a5' '69d7e52e17ae5c66046dfd04b8eade756062d8fb96b1cd8b549b2af3ea1727d522add6c89e17046eab6720af0e287dee54c191f92e01c48a536b223d69c6db83' 'b1ef2038b4b0a7bd64593002704f5b5904c9fd15c3c51f6c695dd671bff3fc8d8fbce1d379dbaa0a7a90ceb42a89adb61dfc9e36bcced2130761fb32c1301187' '2e83af2e03534b255a95f34804a5be9ef86f2fc276b7f8f32fb66cd1193df70022536404f198aefee1cc347ece87cfdd17ff9ff7b99d7b3bdefeccfa6c70bd19' '273ba7d25954433d1ad1a3f46c0fe2a8c967a6274816d66f3eebf05fe8ac8685150df2141eacdfe78db13051c92f370c4ae5b157febc20092151a0748fb38623' 'fbacb25c83ea7c78f0c1e471579638ba67c84a3588d319047ce9e2e54729dbe83a95fca0e9f9f94b3a274bf4906aff8b0457b5a1896ac6754f40de13db0e184c' '1ec6c62d90e1ffeb9bc3aea34ac68cdecf272e8a9a6240ed7d53e3328797c98960a9f907583d7a08e237e0042037c8717d408966a3f1197ad97dd5fe97547607' 'c67e6ffaf8b442dc5f519554010e04f52dec69de554942af1890c31045545643a9e1818e7207ac040662f2a62573ae92db13190dd0808f54a00967c9c28cc292' 'ca0c2a3a4c1e25f4ceb02061376004b2e82c76e17fefe1deb8971db070ab25e3f72170e4cbfacbb9fe74b0a47e7b82aff0a9a6eae124087eac4718a04b186acf' 'd3a967b7b6e2383aefcf63158d8aba856854b832d75a7c978c75dfad07793f1863996c7e5312272651b8f7479e07892bf0871df82ed4e2cb0becf0cf45524019' 'feac5432e2c0082238eb510d20ce47eea812b4513383c301a656672b1401f46a2e9e9efe3f31963636b909ec673282941681cefb5d0ffe9b073473ddd54900a2' 'f1b21c88e2270d86aca20e09062fb593767d6f38308e9dc72378ec8be5d4abfd90103bb68692ecd5c8847362c63e9706c31fc273471227a22edc2eb7850bdd48' '82c95e95963f5d4cdee39b45c60d8c706a051333c8e40bab01a90cbb7af180a1f741d46fd01411ce40da8eb0d2acfb1132dd1730bd804726627b1cfefd041181' '72e93022ef447a63eddc6f55717dbcd661c2b9ab7ce0f0249d88abca9eb1c124f28cd1c792dc3bf2fa39c6a33d4b2edf0fb999c130c8d10c704bedc3777a48e4' 'abf3696fcee1e4038ded1006822f4dbf29a6d39d8ec2b785fab81da6aeb23db4156e3bbb615f3e9df6684b31b0b60893d9d8f1542ae24f1ad22c0228c8cf5a46' '668c5bfd2314eb8c363bcef0575969c8e628cae286009561e4b8922c9b486b3d01c7ef86221f6442def63e489cb116f87eda92164b2b338988fe77109d464d94' '80158d3b4762385ecb7322ce2af20535ec907943137e467858cc6e37f0cf47e9a430921d78d55fa3e3bc6fdecbd045d365047781530c67c30235acdf266fd96f' '080ce00445c8d61d559a90141add9da9892cc584c50cbc2e0dad65c1fb30df4cecfd331433dea898763569f2b1e268eacf9867f333b2cf9b0dac17a7aca0bbd5' 'b4aed65f63be3082104446703f5c65405934bc454afe9d643c8c1053d0e28befa08634545a37539d9b8a16069723dd175743d835d673d509d1dd0c3ba5687243' 'e3d901fe873badd85f104316ec331010df4390960d45830c9acd859e0a4849d1b9089d7ceb2adf4d8366d1b4b95e68be3423ce358e1b1e9651eaec1538f319cf' '34f903a976e2cf9e942202d5153ae7385612df68cb429dcc9bd75f6e2fd96c173a01742a15a49f8ff7c29b618f55198cec096a1be22fd32c5d971692efd27c89') # vim:set sw=2 et: