# 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.7.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 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 json-c ) makedepends=( unzip zip diffutils python nasm mesa libpulse 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) 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=('3d01fd859491489321279daa687bfa583e86842e055bf7cd77a99307ddd3256132dba6d8eb6da28b061cd8f908ad347ec25abf98fd763de2071cc01171435f35' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '36d9662fc94cbf7dcf371adc13a9cda679bc75df961d86de019d3c8ebb0be3062d5ef762d175fab58696db74758100a65de45d7832e0e2bd4e15c901f72d8349' 'bc8fbedb66c1872b451b9f830c9dffd1bc89622203fed79e69809afaeb1453c9eea870d20234f8d9c22b81ac8bbde8cbd253c699bcec02bc527a28c029138d2e' 'f3bd6a6b1462dbabdbb24e760eb92a75006f56f53ecc620ff29c43e7ee4dfe8a96849ce68113fad27bb88e1f37b37cd3b379509a371e3c47045157752d3c2b9b' '8c75aac56a8394503ad5c10dd5b61f375439d04ae1f7e796c984832f622b3468e1b3997e8897efe6cc2c00d7718693d973c4469e1184cb531db4cff5da13f303' '98b46eb3849e924c60de64dc25ec5c7462958571ed2b09d3f2af13454b2eceb9baca066e7f5ec0df94d9c4cd88731e34bb77f11bef1f62a96df7e6984e62a87c' '50bc39647e09feb37b6cbf588eb002ecfbb1a31bac37e78952f867fb739670bfc4a8c48a3bb530d8ac095e03889173ee76cef5eabbf4e13c652a7a7fe3daea0d' '2de880702cfcf72a76b23fab8b8abd6a450ef1c8e777f005fa5ae5bcd97f2a8265f189051b63ebfd711fc65011eac23e5ae540195f8d241b9fe193ab6b8fdcb7' 'cbbb6e8653fec70a30c4abfe5784dab85ff3e049eaf17ab377846df8f0124c4c0ed91c73b68f87d28f43ce6b4a6cffffc34b2af3d02fe06bdc1798af7c3aa9df' 'd153982dd05565d872d9e9d16f407027e45119e395dab1fbc68d4567b1d2b229721072c6e83ec23d790254ee12fac1a8d715e0ebacdff136e9207be0d1e272f4' '4b062806c89991bee93973462aed4c94210870110516f583802b3a7a0fee63fdf602a5b7ea692dbd12d9a4619d1989ec9fbf056728a2b4d03de8a4435a759ba5' '9f051e744c12dda01f63ab97ab722f35a666c420115fd68e148782f5648b320376f12bee9d1b786185a9b4811241964ab4af75baff697da87a80dd36d04ec588' '3f505f21363116328f0599b30ef14959d9b4a11b22e75b4add3fe0030b5d6e08c69f7726f4338962d666f6b55e2d1a61beabdeff8e9e35bff124c93b0c375d39' 'e73aeeb0f05ee386358252bc45ba29117e33d92af68d1fcf23b3564a1fe87624fd31a0d676d0694b0d3e2895432c2979ad73736c59943aa3cca0b4ffd980547c' '4d9037849b817709cf533b9618a3c5e1e761de9f19d5aed1b4ad0b7b752602bc64104a055d71aaebea4e13d9ad1e48a6c88633cca8398f95e539b2c45e3c5c29' 'c787e77a93cc2fc59a13b178629a3d756359a0e2a6c7f4087f2f0556cd7388708e978d8c4ad079fa20424e9e6f92921c3dbcdbc19797be3deb279e69a4f5e6a0' 'bc90d856c6d3be7b78dd4f89b20aa5b71794cf4aa5f0d1885855f8150fc4ce51ea9c93f2e7b26cd069c302374744a02d4bbb6d622c326074dc4c9ef70faf9dbc' '6b0012b697a11ce68d9c3af60e15381f3e63caffa32487a334a70accd5751c44f5597b5cb400de2807d0ab1f8e4b34160cb682ace1c5ef50808050a6e89d3238' '61b72bd5eb0b50b509488650f81fefc8d89c20f76705ffc95d234533f641300e61194fe24697fa54e8153985b9e05d5b063a1431d5fc7fee95b4e7d99c756181' '8685e0689d6193f907ab7a3707568fd436edca1daa0d5c9de87772abf59bffa70bc5919448172e54f2ac213299b3bb7a43abf28602d07cee966a421c2ff11363' 'f30687a72a128efa29a4557df56f30b0860d87672efc93c34c0902cd77a1c6cad36d9f7123cb9bc71f7967719275258d1a220f1817829fa59bba74c31d4b652f' '01ea84feb111a89010770cb8361a90b4250589a0baed6b2cdc5d4a8b3ababfd5b7e516c5ff568793138fba2f3c5cd9a34c72e034d121e404dbb3046d9bcb53a3' '14004630c044966648583c29b97c03132ea960a6397a0d2f1dc977d18485c93c901b3c9e0ea54da0646d58a8c87a591f79e8a519927e5a64d648992c5c9b2d57' 'ada16e5ba0711d0b363cae14e0c3e58074f2729714d80dc956117ed4fd84013afa90424c4a0c1ec2c61c22654f9c88cb8b9118f6a8d0bbf1b7da5231dd3d7c77' '329d8c50ffdcb3be7b0462054fd84f82a8ccad61e590a39ee7faea76ab070c8426349f8f64390edd3486dfbc3f9291c86fa0489c9bc6e3ec5c7d0867563e3417' '9e02a7eb6d912ad6458ede42be5b72234ae3e9ea560534d2779c3f12b3fbafe350105c4cc444000978ae8afb3661d27c4c96ef13e9de94ae19166017779c0f98' '29c564b5439e8c3e37403d259deb9c802f3de9c194ff333f218e311f78762eda719e22d6d3f25f9b2fbe8eca21006efab072d46a4842e4b05c5b62145df40591' 'b187a8dd99c7a132786ebba547b02b2fcad2798efbb939ed8c2c98203ad421a687d354b9f7ca68e3582620b385e64f9e89c44293320e0ddc69a2b633e3f09b6e' 'f4fec276a9858b6f415e3cce85e84e61350630739efd58bc93f01b3012d9aa1a0effdb5f1dc3c45ec05de1356ebb0b81cf3cb133a988c529bb478c2d852f2344' '91b8bad098da8d95e562f779889e817ea569693f5cf4bc917fa9591bdcc41ffdb23a115521bcb19466cb569bdde8c88a7337ca40eb7c13000a4499245fae8f63' '1668a906e5d1711e6063fd92e8741e06eae25a88b048711726e69e6aa1c54c10187a146002e6c64f3429baf2de591beca7483681e813f29a9f71e689c2dc9b05' 'dd199ce885a07ec9667e8834ed5fd47ee6f5ac5f138fdbe03c93f58159a6807a45434fb9d5010e3382e310052160b57bf2863df95574a609085c5404d92e85b2' 'a443d8ae7d2b53ae9a05350de53ee22023aa6fb5a51727e88551065c04ffcb7f5c3ae87eec4514c3e5a1d5f60d97580f97f2b4cee12cdf9adf515d49f2d85e9a' 'f4f3adf921cc1a01a953e6c86eca58628a66e8ef473a3b3eede392d04da0c2c1c87ebfd6188ffd48f6f93061ae5a01e02841577de7c1f30e7e3332b9177be0a8' '57851caf296b226ff0ad8deb5d03d9dc4901250ac5a09f08810d4c54e1ba71b26398bb3ecb8c6a3b42fa0f586757f4b10d2e551072c929a72758d1ecc487ef9d' '6fd16b4f3ec386f6e2945c2aa6f90b82b869631b12d7f2e5927c391c2d6d824cbbf5516022dd12d5884b23bfd721b8dc9d66cab0a4c1ee1692936c455788bfe9' 'c271ddbbd7f535fa189636b1ff4259fbd94791b6c940a3eb2fc7f69015ec7ca146475b478dc26487244366a31cd12acf806d229a79cf78abd266b028a791b3db' 'c0df02ff7a28e3aa2c6860445238f2fd143621e191d3f515e941d265e92773fd6e29e6781722f90875cf7ed193f0263e2517659b1a226625cc6a4a7aeb54c624' 'cae2ea418a5ddd95d6189a8dcc31f72d6cb4d254898cefe9993e5bade71d1d644c7fe7c588c6610ccbf4608ce4aeef5e073f8d6d274bbe0782eb3edba5263cc4' '6bba1cb143b959b78f0ed5b463ab30bcd2722a218d27621f90ae1b11ce4108831b47ed97c94ced421e66f5f6523a85a2d8a5cea6e74684653fbcfff744859ea4' '142052f9f1a2ea1546a610e9bb4492349246e8cda7bbc96a8eccedb83b8fcf87f5935cd57293dacbb41f6ac804a24cd995bc8bd0e7feb2f442ce31d4f84edf10' '177933f705c56dc819a056e0c1b9a8232de47f2037b77c329c32b7de9fec358eef90f46757bede7f010e09af5df55a8d9ee051444d6063dc038745f83c9f80ce' '506e6eccb27f12c207105829212cf24ea5159140ce096c4c2c85cd3960e07a48b892e54ddfa6bbe6c46e930ed22f1c7f43b05571bc8d8989e662cce8c574d597' 'e2bfa20acb9887c05288cb4a8e552ffc6ed6272c48ade478e3e14197f8f9ff00ed6a35ce24ab90e22e65d3d3167fc6f112e381317588b179761dc02eb3eccf77' '18ac0439b1f286ade027f9f34bae7ed0920806b021da9b17947dc0435757aa1d5f0a66e1f20cf2bfca6616a36244e2e7bd32b8b4e187503161956bbc26cd37a6' '38601877a56e20f4ea44922ae84d9df17d13745b29a3ddc3721bcb96dcbacd021cccb4eb06f3ceeaf4d7a932bbaf10d5c6abc38c835151ee1216d58850086e11' '41c8c69b105416e0cd4d44d5b92bdd263eb8780595dd4729e46df1f79edad5dcb813b7ecf0000136196a2a794b514bedcb20d665559cf779924c5c2f9e045030' 'd2c1f5afe7c1eeb6293e2c5bab94edb651505d8687b0ecd82f107d16bcb30b56029e9d26206c46ba9ef5b3d6862fe908893fe6678508823933c0612411266b9b' '62b172f241d6942a1a4fe571aea91056d830ce7ae2f9515843635901e67349279c749c0f8652a7ead6e10b37d8826711fae732bfdf64e2177fd8356421cf9414' '82403dcb68f9c81521f8c38f1d6c800f72c2fe212b36252aefda316dd9cd2b6f9191d9a47fe21e2eb8746bcfc66ae79de3897b2195a9c8ab1bc647c1d2866245' '536d142e53dfd0217386c065556ad5ef22f2ac02157c48abb0e465b12f32de42ee4d3076ebf2732b5b930e1b105a95b5e23824ade4b2ff8ccc021f73f0256cfa' 'eeb74b5960476eb4c7dd430a48f56bdeb134c319c209dea801ee565051c3e917c905e6926df75ac523f94773163d7e7836249107c728d7e0af4d9a8a87c9c29d' 'dde54c0de2c47cf2140d79f7d14506417939e9b8f0ca55da3d6b0592a5e566798759cb0628a16ea6a08f7167fdec74cef6628b8f3f425288b4f87c6ecdf5fccd' 'e1c1827575ea40049b2545d660ccd541f7be4d4e0856ec3a857c88f63999e3fc2942b5ac92687550c6c2354e9b4ab1d5aa45f787ec633a7d8e9eb5fca3a0793f' 'a8eb1349c2fb7837ae65671bf7285e332bbeb4e4cbf5561cb643f746c74f89a24df1cfb41a8de8870a9b0b7b2d4207d52f8c4b125385ff23ae837fb9e3e413b6' 'd8bf8e9598293ca574daae09423dd33db9b72a5620f94bc654f7b21937b9c816986665b861881ed282e7109c17eb5a4d933d182b06402738bbbf673ce9c5e11f' '149f2a738828d3eae1de209744486f10ff520b20a16e8b5541fd46382a804a5b52eca2bcbc7445934232ccc67d8c36de897137e65e66703efe509a99f08451b7' 'd2323c3105f367e9fc838462c670a8133d185835a93f5bf0fee7583619ae72e623bf8df5e7e8da3b02ecae3ac5a31e32ea5084aa1c3104f5a349245d199d6d80' 'e19a027fb4f7d80d7995ed687e35a788c50c10314379ef14c0514c4b4825b24300ac7b640b1a6c596bb79d2e7a2c4ac06393021b60bbeaa4abc24db610f9256a' '623dbdbc2c983c9438372d3b071c4f0e67a1aea0a7e619b55db1e4a986a9fc06a7d0f280db5a21db527caf56a250dd90868ab783f5d3b28f9fdfe006385a8c9a' 'a2854763ececb087cbd8838606c26cc7152ec526e67f93150302e5de3414bd4cdbc06de8515826b913c775408eec5f551541282a410665e316e7bb43a1925dab' '402ea4f4e3d3e673116c01756ce544bd036f309e44927b8a9f557551a52b3024a279311fa9bfa5ed5173a2fc73bf7b76773afc97f7eea4455d157dd93b37dc1a' '9572facd02f04008e17cd5530e141cc873f00d2d15f228b9e9b1d7e794ac31907a3bc313bbde7b43d2d07c3f77610f4c51cab3701dc6e2670ae20dd12ddcdaee' '66d2500a4d232d04156feff0fb14c7b4b04dd6339dd0f8ad1adfd14c729c3604b20eb64494ff219df8dc502b4f7a0856438e58940e947bc237c727e431f7c30a' '950aebebeec15dd60afbb4f42406d12653bd3eeaf9eb1a635622d118c1f7de9e785919ce3b0f7beff176bc8f4ec0d38aabe82ba73e168bffec62d1c3bf1bd980') # vim:set sw=2 et: