# 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.1.1 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} thunderbird.desktop 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 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=( '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 ../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=('26f69dded43bd24ffce9acb0de204bef8c10c8df3cb82b33594d035e41179cb7450cb7c10470bfc92a933c1d801fb968049ea8a17d838d16de9973f5dddff9fc' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'ebc23619f5da7deb072f1f8d3f12c9b20c9999f295462f9ee69d8735a82e1ba73359bc5a3a6e04d00942741683f5a399a0520f20b41f65be46e0b5906db152bf' 'a96c994b7b1497b752d0b84d7e5dc3665d21d8e186eb62f43d6a1f1b3d6a117390b5cb9b8f04dfc9f68511f40d3be5d5fa1bafe803f5ca65acdb5eae5b1a4796' 'decf97e53823b1b1a27530d35d153b61a9ec4013303a6092f2cf5d5394eae2bde5ce5b743b091581254a64da44fe644f68b8a3ffe18e85356ab56bbc45f24492' '27ed52187a9defea4e64deb2988755f28c58bc6ced1470206d27d862a4ecabdf875e951fa58c9489408ca74a978f0472c58e0c29152752f893cd1257a8deec73' '144eda8456b8a0f11dd000db8bd2d418a52b8c73e31808812fbb79d2b4f62cb6842bea1f13c8c2f67b6e8d076ef73a0d62dc92860a742f94616f011ab63a3bee' '97323f72632d9df20c23a70efdd95f8fea1780c3b9f56fe2612fcf1e8274f507362cb555ca262d66c8320975dad74998f5395711f18c9ea6523dbd01f4edaeed' '96d8beb90b0973c1f3d9bc3982ed86b5ec13ff416624e4a2537059b836cd867b8e2cea2e61cbc06bc6ff30e9d0f4ef1d085465c1222599dfdeaa3258202e6e28' '0fd3616a81b52b9dcc1fee84075706aa3dae3471184c00d2a97e174cb4e441da67e3eb4ebfe1e86031acc80d4f49b754eb7ac20ca306ebef7522d3f3e3706827' '97333fea0cc0b35c72261ae222ee8db0951928632dadde60e0420b052e25daaab576e2c661529daf0af3ef05c88cd1394c9fea6c4403d0a6be67a31416692697' '11e69b23779d7dd9ae1f30dcee2080d680ad53e48c8dc941f774d2ff88900ee0f3f12ee3f9ff6ff5fa245fabeeee0560c10657e7207419444355d360dac921b0' '2e1990326117564d0c9722e02ed221f9918479a40853c3baf45ad5fbc339f9501e6d7d5beb43f9466b6a2457ac4f8470f42a9f30bc9294bb485a88573341fe74' '0885d19f8c0ed9b4dac8aca7c55d6553773407d4e3174e4d8c577e9084520130dd226e9187a8020971c499ad353b3e69d42d5cb89e5aed650c3457c80ea3b9f2' '531510d51480240eb738f7cf3df745b3cb32c2c63dd2da7ad5b285968e43d66d98d2354f1ddafb8aa5f3ced990eb53b13ef3ef333212a4c26b022b50d45fc665' 'a117ee391c0e73e0ba7e2918848a51efb17ae2a0a93e9db1d6d3041c7b72aa4be7f9435f31164c7215c7048f2a42892eee2591790fd10668657d7f86269780f5' '2b171da449b219d18a3e858716f8427c74038c03e31988415a26c8ebb7b9d43712dd835007924a8e4e5df50c884e04359856a1d3c5e3e48a43f54b6f38c993db' '490c3eb54fb6447cdf1c344fe818c86833354d2d6df93b4b3737ef54677bed34d24f9575232eda3fb0be45e7906a078740edd0ef79e482686381276f89a3dec2' '4209a6d6ced96f88595447532478d96acc83e0de43c93a933d78e0f84c20232388b5e98b88aef0d9e40ebb3a3512ab89e67d79e82c09295ee3ee18c3cfc4f7f9' '5a6499b9f45e6d5fcb1d627f4fa7a0eee942e14c9e64d21e44b98bfd78765c29aed609860682eceea2857002ee7f594d4767d0ad97ac906d3c071540a2dd16ea' '16d264e4a3ddc4fbf861302c374e01df04d47a1a9dd5276be4a29fd3401e7d7ca911b2ef85b4ee82b34be2aef568d1d0e6f999c4fb24ef26d6fe5babd3008d25' '95cb05ef01f82bc45a645cb1da82a04c6d46db3272ec7ba5b42aec8edf4b9c146e4cceb2ad342c476ac011c47e66f191cb886459380a94e30fe0ec3e0fc5d5cb' 'df598248e7aaa875946830baf11978f2694f1c1e5082819428b6bde3e5926c262f1af4a46e7e58dd7a1f5c644992384fdd8b95923fbb099d0fcce828dacf5377' '47c00e91350faafedd61a01ac31ccc8f2a4f739d64da4e7de67e184a3bc07a0871fab5a83e5800f57f5223e77dc5dc301ebf433039cec72f86bc5a4fdd0f7832' 'fabf8e98dd3777a60a6c90db0816099c1b8e6f1b696910a09a601a34e7bdaf5ee64ceebd333563768429639318c546c397b3644f325081f3555f0351a15e849a' 'ab9279a1372c208e1ddba742a054b4145c35ce0f7ac926ee276f7535266a8d1b61fb8a989ca5f15b2e28bfd71cc0d6452fd2ec3eaa2e7bd3202dfdd3c61b0178' '5f07273fdfb5ef525384c596cb31a685f38e83348a832f5710af7972526882b7630dd5ad23bdd7aa9f1ca6f35ed86649ff8aafd3678f75195fcbb8a64fb39452' 'ebad94005dbb88f4ec0f1281357de4d5baffd0cbd09a0852b7d070fcee107b8a60676204c90c707e05208293e62f6c48a1e744bcbc8420e5fac6dfe6b1494cad' '4784905acd3ab9f718ffe32cbcb51821c7eb72988f5e0021ef0099a41610830eda6950220b8256ef1a6c6c5b0cddbb9658ac819037899a09507e86f081046711' '405f8d7a63a368452d243ab23dd3cef787f64c535692baa9e695848f55b388f4ac6c01eab77f6f2c5e0fd774eaa40b212dcee57235a48e4d3d9fb21930cb3ecf' 'bf94d4306f5e32a7a75722a59db8d5ba36f1635fdb8604c22b675935751731434754de912298ea03cb99f4ff8433fa8177d288af7f077293577ab63f52e1a71d' '8e9b0344c5a0e69b88245f663e1e51852bbce450501814af85fe1cdb4db0771134ff349359d9d2cb1a5a7264a96955dd5d53707b574e1a1da755e49bf6c98708' '7d357c32ac6f3b8be3d6079824079c9a149097b3e1eb3ba2b584f48e9c9640a05b00fffe9e0395d02abf994419da215465a3cf18e31a32ee7761c9fe405cb40a' '4e282e36939a21636000e76115be5f4f79c61ec5cf3237e2f1a0492b0c51927abb71f964ecf1fead7cde6814f84ab9b49d517d50c2459426a02c80fadcc29cd4' '8660952d6951e2c7ccce2de5335722bdd89cc7add65151d70773c8576eb600a3e6a9ad7167d730358ca61d017441b0d7b601f2f83085c0f5cfb1d793e86956a7' 'b491b1ce380caf78a43cd31bb09867a556a42ec9eed7670ef21768ed728929f4e690f99b3bfae1edafa6d0f277fc3f838fc52c260aff690b2847cadde0db8841' 'c0b09f6fa3db312595e18e2dd086f1291150705e6c5f61ddf300681055f9b9050ebec877a627f4eb7170fa9ae8be434186ad4e26bc7a9b2a21a2bf4fac6144dd' '420ea8d0a0a0af8c834bb073ce4521aa85863b64a85469dc875aa0c5bd4ed5804690f655d35a1bc9a939a61a486aa486b3e89185a906d849397cf1a612de4118' '62027733106f067599a7830bf78006502e44546c0fa30160d034fca5d0b22e2071d7b2523591f6e7d8a6284c2f4fe0f8ff2663e129b5714c3d0918d6ec866f0d' '3da0fa07fd02078440c51c8a3567080750329500c21df4556682d0c0720a896e723e2ebd02a746730445071007452eb8a82a71b2f2b3818fc4f97443b2df2787' '850b988d862296d76213f9c0f4de79798d9f8393e9139583882a702c8b3530849364225e610f249b2153de5e82975757b7b0e19129072fb20c9093308de042c3' '2b76233a9646c3485f36646be164f0b28151da849697e3a8a30085f6bb77390397bee32f4474b5e302b15fb2a45a2e6df9e32fde30794974d09f811697458bca' 'b22c314ddc440af16d12d6f9ef596ab0bef189b87cfb5694b90e6bc50aff9d9378c139dea2cd9b0f0bd0937b15a775e66eef105d7a4b38e81274d9f3b2b8a303' '74a5501853aaefc83ee9119cf55b0db3878f2d1da06fdf867ef9136f949c36c9c2a9bb28a8564d6b311264ff53bdaaa406c403b966097d14ce1212a4e6387e45' '19cbe31b4c20c7d647cf8d3ef6b8779589e76bc6930e07acba18b1a1ca1123d88a5ae0a67654ff0e6175ad264921156d952c209eafbfbebed7a16f80d1e0b1f4' '3eada26391bf9709d4786daeb3d72fa3380438ed996e20a6e111b59c5ec871a1266d0195a2632ff01ad82fb1d6e50292a77b150ae9f1d94627946fa5c0ba7d1d' '64c0d03ef96d017fdebc325631fc511c84ea22261b6b5d801a839e27fce6674589fb14b04bde4bd6159d72bfae33fe71f47360624c758e4b4c4271c347ef7ade' '2ea39878a04bcd6c6f11a5a6501cb5307311713f049e276ec80c44f417232399c5f675d72707c2bf3687976a7f5f08c0b26ab3df6edaed2431d93f33488905db' 'e1b338fef9ba3ed26cb274896a492068cfda4ed8bcafa62d5c3678967acadeaca98b8fc55f8d2e48663be45532daa6ce805223b998bdcb3d7a8cb59d5725fda3' 'e098d83d691c6ed334d7c16593a7d54539658e570f41ed35252320c00489024152ce14eff5ae285c67e082d780499258d9b0bc8e2e33d848511bfd513b585ddc' '2c02f9295e746666980d267f71d5b2196debf006f3337d49181c4626cfb22ecbe5349af89985838e5e74d49a590d19091ea18b785ad4e48d4cbb91926754a443' '5555f85a08ffd80eb94cf10d5dc76dbb364cca840ff46c031f6c5b359642337f4304a56e377f2a493bf47f07b70a683d1f6e25a431d97c960b95bde37cc1741d' '4d75c4f2b12f3eea86490a79f39809022f7c74ae568584851119ba9f34d9b49f9a4ea3e11a7ebc8ae93632c4c8febc256a4167e25e83357983d75a7a83e86986' 'd2fbf9e4f666a71cbf7d1d0604be6e163cc00c050dfac90467138662ab878fe71916cefdaf33320a68449be84a9984e02dd932613116de8f91b3378c1dc961ab' 'f162aa14451697b5c4eeda129e6f23b22070382a7cd4f663e24820b08e45b5d2dc6dcee20ae70db58bbf0c87bb01609058e8c6845645457a93f7bbe89fc25001' 'f75a7fc7af21da0677fd0225d14ffea8200d4b2c398d0a956a01263fc265245e88857b585c65e14732c872822d12907715ba3e1395430e947756c162cf85a3eb' 'ec7a91c81027124c74680770b8043b5e719a957bf7d3435f79373236884707aa2d682bbe9b607500a4f927c837faf70b928f8a67c521666e5545901858e31000' '9c771583c0d53d1df261836cff1655294c8d9b34fec32892b154dff0551fdd8caf82bb5066cc3d8ae183333563e315aab3099271b5cbccf7753d4dc06ef75039' '74567f8d24b6d6bf316094179b83d20ce2eb8ca1d7c07e2d1a1f3f2124171d5614b8c3b5e51bee4626c9123e58af67c2e653b9ef844fc57b33141a5daf2a1538' 'b7c8c4e3d37e4bbf60f1c43abe39b4ac6a9a14a127f6e21be2e8b0072828112c703a796d858e8b291816b52300eb717134793cc73b9f66f747b6edf98f343275' '2c3a3f5c332076fe28ababe7914889b4dcafb405aefc4a554186b297c09a3b2e3db0eeefa05a1c7c71e2f1d49e02564e94c0e3327b8e19694cd7f988737e9380' 'c2f7ec6feac0e1cd7a78920b558b43da421ae79e763d5661fee46b191190819f8f643c12374e0b7a94bf07c55b3d5191d569d94db296b221802d57b5054adbc9' 'f7d7d46b10bfe59ab8d00039802ac5679caf978d37a3636127ee36d3b687839eb090b69b31d83aa23fb1573601a07da97e05dc59d79c4be769db380da892a3b2' 'b44c4c7027c671543a7e7340c7a96bf9cc53c1940bcf2a3bbc062dbd5dba692f6b2d53e6b3e96617695285767d3814dac15951a8caac017737c13c2cffe598bd' '66acdcacbc37e3306b2e3344b89a163c8b502b2e489a90126c5c50eeecebb3b1340764d7afeb76797ac45de7cfc59cf282f2f42a352b9f07332b7defe7c9adcd') # vim:set sw=2 et: