# 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=128.3.3 pkgrel=1 pkgdesc='Standalone mail and news reader from mozilla.org' url='https://www.thunderbird.net/' arch=(x86_64) license=('MPL-2.0' 'GPL-2.0-only' 'LGPL-2.1-only') 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-lts-iron lld gawk perl findutils libotr ) options=(!emptydirs !makeflags !lto) source=(https://archive.mozilla.org/pub/thunderbird/releases/${pkgver}esr/source/thunderbird-${pkgver}esr.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 echo "Applying patch $src..." patch -Np1 < "../$src" done sed -e 's|73114a5c28472e77082ad259113ffafb418ed602c1741f26da3e10278b0bf93e|a88d6cc10ec1322b53a8f4c782b5133135ace0fdfcf03d1624b768788e17be0f|' \ -i third_party/rust/mp4parse/.cargo-checksum.json sed -e 's|880c982df0843cbdff38b9f9c3829a2d863a224e4de2260c41c3ac69e9148ad4|239b3e4d20498f69ed5f94481ed932340bd58cb485b26c35b09517f249d20d11|' \ -i third_party/rust/bindgen/.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}" CFLAGS="${CFLAGS/-fexceptions/}" CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" CXXFLAGS="${CXXFLAGS/-fexceptions/}" ./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}esr/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=('53a5bfacebb4d532f1a66502493e8641c59ce3ebe81530db7c5f9fb75a18db54211a2a4641e1aab96ffed127658a212334fa1a651a575c270118d0eed0a93c27' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' 'ba52cecfa9b583d2b29bd9351c07df011bfe420500796c8ebc2f928433c4c438b92e5cd239abfee4f9f6d0b802c330f23328138d0c7fa0a90ea5cd43f37dba9e' '59643147bedd722a8ab1a28f4e3c45d168d3a45293e817ca1410a9b227b04372d09c6513ce703704b69cb03a3b32b767de98f91cb50b33085fa479bc926eed49' '62c0b2bb05ff3d74e2704d454474aaf1d67789edffb944f39210d525c26d73c76a245e1e9ea0f2bb4f642d30625267cd4b2703ec70f46ed24e45a8bf64434759' '9703efcdb97cba540eb0b8ce89c11109275b75a1d3229406c4d0906a4c4f2a70859869b49c8411b9207518b51a598df279e2c011db4901f3049de9e490c63e3e' 'c530e85552f47c107ae3303074a720142ded6e1e4a17dadfdf6c9e5fb2a0e0f5cc188fa50e9f71f90b11e86488a355993fc9d29e295a5bf276629e13459b8c5a' '108686fcf33967e8456e1aceafb499fc8113315008ef021676be5b465a73f948f035e0a574d4a152143d7ec8a5675e6b2b0215ab53e61f4a93a30982cb7aa9da' '40ce89c4ff9a45adca1c77750dcf498d58dee92139292378cffd9ed476e709654afc0e1c2888a292257e48eed16e64b4139c4e46e915113fabcbdbefdee0ba25' '6ec38c947ee618e8d4031fdb2be29c18227eaa40d03a5776d14de7c41407fac168492346e66289ba66a1e281f9716fee6ae71f92b2d3f857deac2137fc140b9a' '9915ad557587d55a0b894de92c0e4a79a4ee3797bb31b2427454df037893734ff30ef9c40523a106f0c2aaca0152c0943089c2a4da0c6f7eebcb0b72306fdc17' '48ef3b61886178b279d6992472c4743714e89d268a5d96358f91d97775b32047323356cb284813057045d372229fa5930d99167b84ca7be40ef2fc6405157533' '52c5dfacaf272966761e9c0ba1219d8b4b0741058482f06f29405596ae8dddc4c65c88b3cc2c47f6ef0462a8487d2004b983f4d82a8044a151a210ca59ffc96e' 'f9744679862011a2b35e61b8e5f9fb1de699e365b2010612142ea0579cce6b129b8436cc8ff761d4afabbfa8b6fd3de80420069ebe64bf2e90a302ec87a5f2af' '919d59dd266a379fb3c40359667f29bb5307bad623a908e6525899ee119dfdf6c776a4304bb77c8d592feb346674ca4308257aab1dd60b5b6b7f850b9d9e1ceb' '14f861de128c0d4e5d170c5c8cdbc1c8f8bca1be5cd8dd22499bd91c8971d88252a86adce508ef6c3d5dedc586aef897533fee84fa1563e55ec33b57a87f9893' 'c05fb6491a747abb1686100dc648c73a2ce69c08b2fb417afc1774bfe8cc4fe3ca2640de07ef0798d42083837988953bbc4ef55356d679eca3e1f53a4b6d55c1' '664e203ac6014f65bebeab059785c6d05fdbb830c66630eb0c2b83c85e358add6dc41b1b4e2fa854904d6758d0dab8b7516b6828d56f0e8f09c3bf4f9c33249e' '4e90b9a9b145dadba9cc2ee9da816868eb616f8f1914b8d993c7e87634cb1772abe482bcfdca0a2721a7984dd5b2ca921f18c184b60f0d05b37a7532d345a3d3' '5b73b178a544ffd794e41c16e5998fda5555cfaa0d0971ea74ce4ee715ad451e4ae8a33a663cada0b359449ba6f35d0eab6ddcf5af615454e47825d33ca30dd8' 'b02946f69df7175eb9970bbaea0c3d8922c7326e0c1fdaf6a095d5f24a47445f5c9aa91f6ca361cd7e7f2db07e9efc58a6dd011391c2fe2cd45894757aa97172' '9424115c7f599e2dda84fd0ade7ed740eb87e5008e7ec0b31a923387095fece829f29fbf4200f1aa55c8f23148c7f1aa88d77844db099c151ece911efc376b95' '93b57c203344c6ea3081cd52a4d9667f4ef6dc90d118247a99b1a728a3e3042e0bde5516a015d85cf73fc066c609749b2e6648fb78865a37f6f591e5863440d0' 'b3dd2f4b77bdfed132645d781a7ab6cb66f4c17668669639067b2d51de1dde44934e91241be9e80994a04788d867b9f9305526d1debb1b2bcb9edccdd9b8eccf' '566b29a02e5d4436348bcd09ed3efc5d8a40dccbdc7c5bdebf0ef4f126820265457572ad3175122e35d549a7ed35e47acc0203efc75387b357d052ecfe919747' '54fbbad8db77ded44e55b1d9b570aae9b33ca2420eecc353d93643d2f35eb123f097e35b8b7c89df3040c23b4bb215a74fb3d0d3919b096232a1e10d8ff1521b' '9258a17c6e2f51f6d1e70274557c0adbf7723e02a2429077d8c855f15e02cb9d2a6fd798cb2d997004750a77c5b21fa0241b7d2441e891c987a261ed4eb8353a' 'cc6b89af55b086a6224835c337d826a1d7909b5fc4d7a62cde249edbdbb369c2f6a588a8b5307adfb9f56d887ca71d2ce7f5de3f6d186b35eec3da2925079dc9' '152ad30a4b41c1d69fbf7870848328baf6fcb1d59eda3d2554cb63a48c4bec544ae38289f48643115d599118b25bc1607f2cf3292a10cd613d138f8003f0521e' '9b9f9454dfc90101791dd6ac5cf9a19913716be17fd0e57686065f7d6c9a0074572293299c5246aa80466dfea0d9ff6aeea5cce0f49e7885f9c9ca58638cec2a' '8ce0aac896f29f7a5bb227cea892545fd951963c5fad30558e977ed51ed04f4ca3e41e5b2af75ce92d6023e0dc81e1ecf17d6ff352279e136bb843035336bd25' '8cac477730b3af08fa8e5107d537c555e634e3ad50a8a802784a02ebf5393f963f0e996f2aae69a7a471f65e626109aeb2072db33a0487f629547a901d17f11f' '258edcca241027185007edc58ab7811a6f12b582639923a88e050ee2a129fc07092d6d258305f2c053716570a409a26584678bc63491fa63d0440f4498ab1363' '9fe68bb217bdef1051ec718c045beeb71ac5b6c3038094c04bc122cafbecb1032ed8187e61894e86754e7131815ef151fb34a643634e911c8a4382bc2999f46f' 'f1c6673a664d0d7f2b36aec2f961ad85bbc04772bc00f1bb791fc2c3a433fee1ed627ac003edcd5f5b0a77eafe419889c8d4e81839c0e939d1be851957377f0c' 'de53f3351c2f93c2359027e77e03866a24e81b7c63a3a7778d669649fded5eb97bda6ccb555171c1f080aa4bafd30de850d3bfa0d5092e87970f159208d445ca' 'bda1c8ea4000828a60213a1e2a4253a2a0d81e6e93d8d1ab2ab29962da9e83208cdc92d564c4116bbac964d36c2e3ddc8ac75caf361620ba9f362f942bd30699' 'e561537fbef3f72a3161e463f3bf7b51bcfe9dbafcbdf8c2ba06d42470b7119f6a99ce7e588bcd3cfeb87aadaac5d0c28b14a035cf5abd67010b18ea9f1a84e4' '8137fbe1ad08d69c31f80211e878284ce0ef13bd7aaade85ad2d604b96e78c091b52243f5a8fa2b76630eff3d956399300c1d692f46517d888694a2d17253348' '02ed2c44d7719f4a977477b4537a3b05ba7e962907c1f76dbf40c8689e084e30d64fdb4965ff820163cd4e54e6f8079c0ac7854ab140d70c46a77dd004360111' '06a52a954a989cd9461712ccabd42ef0689865424aee4e5d1bc85e8d29d3736444169612c5875de28d345eb82102e4c57a63be2e83caba6e562c775c3fb51901' 'ca7186843c2febbb8dde54000d88d82468ce4a8ec6476d2013b5b127a1e2480ab8b9e3ddc6e7d9a3f7b1ff3f06ae4f57affea5e6e434cce8093e61ea46579786' 'feff1dd2fb62e9754769e2ae3852d8c3229282a10f5a0c7f0f72f5b16db54be2300624e406f82170ffc16f10ed8958e99691df823732507d94078755a882229c' 'b04737a84daf01fed2591fd6c5186dbd1bc447755d2d152e6ffad4f279c3ec04a3fd8571174e6a085b7242ff14569bc85b9f2452883f3dab0d6e0b0488e4a642' '990b901e34defb9e1736f5f2d14c6e40498fa5b55c14b5ad8de7ae7d8a2b96a205bba423f4b4b6b5a901a8458a90cf2d6b20d22f5cd5084a102ce3a3744015b9' '274c2499fb8f8cdec38d34a57c90569bd184a23e53df222a07debacf1bd008bcd2226fad27af250a4145000442231e6bd5bc8761469518408e215663429535b1' 'c7e4eebb4806eeb54da4d7c301e8bb449f10b201962770379104bd9612395c4479bf20de521eeb05b7c29a8e6191bf88647c49527fab0870019cce93bb324bb0' 'fab4d4c55fd9d8a49e1bd8c2d3a404ff47b08b0e3a0bd8e57aa5663dace844d30119c80d4ec20866b90d8dc3581ffbbaded569217f34f772fd165e4c878f2e9d' '9eeff0357470075c20d2b34ae3f92659c0725edd8432d9d2d76b6a809c050b2793e9f54759179e6aa1ec18ac4c8d1ef7c2e0cf1d99174b547e5b65c63d1ff694' '13e1c57b3aaf91d884a25744f1784a64e0ab8c871825b954182a7ce282b58611057e3def5973b0a2d01ac5a909a06de9386c9bd27461645681426bd873f65777' '5e9fb3611663664bfb16c9c792b093cb2b9077b21f9cebc49051287b97ba7b017b41718648d2c8b1c47c2fc2fdbdcba8d300fadd31a08c9a183fac08bcc3c2a3' 'f341cb90ee176f82577071d494271b2fe0e690568005b829bd1e74e8db5866ef82643bf09ec4be828a4df72cee0fea4527c9918780f456be613a574d492cb52f' '003893a2d43b84f562b3997db07864ee2df2bc45a70156d5a2359d2983a1e80ddbad4205a7274d21d7bc15cd042700c2cdcd308848d9469e0d34138ac9ce35fb' '5a929b558ac007bf0f24d60b724dbf7645ba0e2c4f2c04d154b425a45d327d079f3a7a2659a7c3893bb3a79b2897e3030bce1aadf236fd393fada7fe9bffa49b' 'e94879c6c0607c7d1fda87a9e96040ea922b0a53ca84944dd000e9d2add07bfc6f857451d1479ebe656f3e93850ac0a8ad2117ad7e76107b7cc4d11f85e0e935' 'd7a4c3c03f3dadbf40163e4c03a6865608f87ac522237b18082bebaedd11e37e9f64ec97b03e7465abd4370a6d0dda705aacaa605005153964c5e0d4eb737463' '991dd0dbf10bf9e3a1af0cae1e23085a906255e84e9ccb2f5c063a8d363f542f42652b560a822384b19bc6a8e2a4685d8328415e282c24a173da927eb19a3857' 'bc0028e0653733d6274285fe1ba7b3660023e9207a84be7623c1bb723b674f4b160333e89abf1f06caf9d4c361c4ee6fda106ad718d7b9a72da0a2bc40c91a24' '43caab0e45a8a98de5e05f9ae79653f23e9ec98b232e4b43e8a43ed7ea8a160e96d8f733b29b9538e4e271a6c1c9517e3823b07ed020d6524c667893eb0b9cb6' '05658607b967bff998e57b6aa3b13346fdfb7a792bdfc279150f77002c283247e5afa043eaddae36e178a29becee28ed067f874fa871f2094f6851727d144020' 'f5e11db76536fa25558a9664fc2fd47bb0bd84bb92851aae81ab051b5c9b787ad5f05ffa4bbcba693246300a549c1577301c0c47cde4d5d309fb91c010871035' '6bc8cde6901ca61309949cad6503571c1fed1b471c034af797b44d3422351cfd6042d76b0591e01e9b7ce8f29b22b3a3d7da155be8c9e1a5257c074a9b9fa7dc' '98632701e26ce666f5b5b1f21af443061a51c13674591f5a97111282cb939e7598afcb262b11fffe6f6e17ca20329f90a77db2c492fd541d5ebca539ef604d89' '2a026f1500d2a7342ebae47938b87c39146b8e0c1f371142b29af5f953d5fe4d9d4d9d1c45f04eea0a70a85830db41f7dcb3d3c7d7a0114d37e785e1a94e38d2' '89c9b6b465ae023f92f0f329a9e3d473db135f0a0915dd4ed6f51a26a6cfdbf93595a3480c85d7d037218af030e185558b6986f22f6f81c27ebf79239c43c62a') # vim:set sw=2 et: