# 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.6.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} 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 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" # malloc_usable_size is used in various parts of the codebase CFLAGS="${CFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}" ./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/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=('f2efaff8b209234b202671b5322fb14a367b955e28c4b24b139af091b838186126e3d387ca21e57ed089629af876e86b38588789b1ef3db14f4f8703095467b3' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' '35e6c7c9a05c6afe52173e67fc7a4439675e4849b64a3b614aa73a6464ed0bd0ff642cb1469282ff8eea93ed6df53e2bbed45ed0c0c9208d0f7dea5d1ada8ce7' '2ed741fbfc8981d37f1199e34856e2dfe46edbbd400fb5c9618c0c8be106285f972ab6f1ba1e50b07e68ea443ba379c4fd36fe23f95464f729461bfba7f57855' 'c15b004506def3220385edaf48fab319cc442111e556ebd24af0dd19b3083b21d3150af7d399837880cd64ed2fc80c71ac78eb0d70b073e217ca8962e52e5d37' 'c8ad48876ba62f5598316c92dc674c837f64d52867ddb7b1730aef0f16be9d3194f836a30e2b4810387397b21a4c43af494e421e46c3b88128ea979b6569c581' 'f2e4d85a1776fb2e5d6e8f448499595c19cf4f19fcc2b6b75d1dddbdb503953859fb090272c9bb53a2abebbacb65d54998cef83f0e5de372cc10ee253efef2de' 'd54fa7cdada1d3c6c4afc771bdef4f41078c04273baeff711b240b9c31a2210fc8e75d885966d0656f99ea8acb72859f4efd736742504b22d77a60706e48136e' '2f862f9146e2f5865de0b1d2389d2ebda6edaafd094caa07b99e891cf21b8d82358a30df424a7651761e9e0558bddd7a8506c89fc46dba83d20f4a3a25b7509f' '902a8083156700f2eeb91ac4990ae14f15df86400e4ee3de1f25e46dfc99800efbaf64744db2e13ebc97f31e11ee541fbf4cc6eda72aa8f2e88d8b797aaabee3' 'b1c8d21e14e57a5c647d19ff094cc10f0eb081700c4d57db384ae6b1f465d49f5be20b5b49fa5a6f18c0fca91fcc802b2e850f2f405c82ce45aa8382d02a2344' 'beb4fce65fde61183b564f3274e29adcd3baaac1e31c5cd0b44179593bd4ba8ab076f11b19ca000e320ff1cf9a35bc8d40aa779f1825c983a97bce5a5e982958' '9bb63148d0983c38c9ad9d888bd8d24a54dc607c9ec6ad53f005b19935312e9272e60d50bfe817db6e8bbe9017d6d0f2ed73a8f774a808830b45be5a0cb6ab7f' '008ee1f047f32d43c78eb49a6c47cc89799b68808bbb2cd20628423b7c027b7883f93643d53de29b36bc6dbb43f6a2beaa8891b74bef955b2e8f33220db844ce' '827c24727a0cbd1fb10db61e935c2c963597da5675fc97b4db4ade49efdf354bd0c7857958236633764bcb617dd7817a81a389be2cd351baa94f3cf43fae7c1a' 'ba5ebf91b768af5f513b410774b23ebe2a01d89222e43b887b44c52ba3a574baa482a406d7745ab98ab3f9bb4ee3cf5b57c34a29892db4c0adc830f448e0f90f' 'cb7d83c963668aaa77d1e65c5a8a08890dc909f1f391acb9909c53a48cae1d07d500e50044fd6d70dcc1ca714fa748b0931b9d56435345402b5bbcec0724f859' '4c640c598aa64ad64c6402fe46b5add941c88aa2d52df20c80b09a748a22e08dc3a8a1ad969cd7d92ae23b41d0b644d39048fea63e53635949a61099084f5f3d' '594bea3068d52a6bf7cd8bc9efa898576a72817c3705309590c3e872c38e482de1ad001e664769cfc7c673dde4a1b4697dc3829663210a2be09ca412a09213fa' '4aeda13416db5d474670bc2ec32b0c13abcbe4b8fc67d99a4c2877baf1891335c73c6ba3203606488c610170805a2970ea0b02a33ceb5f733878ae7eb19db3e4' '2699d734df4aef349b3a19a5e3c219ed7038735747651bd6e6b3deabc0e094fdae7ec0f2b153851b1d4946030a0f31dc8c7d5df7b60965c6c832f863ec3b643d' 'fde19abdd5590c0a2baa47906502ada17a2d8e01263b7505d59f2d0644fa1e5805794c6becac6e863d7e39ec9fbc96935f52b0cb8b9a765b1841b36822b449b7' '96458b2fcccb90455880e68539951d571603b28c3370437320ebadcfed334368bd1a346f540a403ef45b505c152f6ce72c543e0dea75c1909011084ddbd528e9' '48df5291b18e0b39e94b27f36e6dbc09d7a61894865a9b90bbff542be985a9f2ad0e57e65e6d03f032768cbd9dc24bbdcf7a5c16511fbc3ff49aea1b142400a1' 'e56dd148272571563a7160a8c6c22e51061ac789af2c3f3cea8e6c4463e53dfc786a335f38afe9fe69820a62d91e9041969d6127ee68693ebc04efccdca300a7' '434bf45e37d8a09a36f50573e611f75d22e300674f5e83ba59695ddbafd40df871561090f12a597c09789901b692a30755018e0b7a90e2167008b3956ca35ee3' '7fc4a177efa25db70dfef70c19fd2bacd73fb45c3ae2253d45b93ebf3285241a0b22d0ae16a46baff98b2c2e8f5632ce74362ec450e87d041e374c5977c5838d' 'cddd2037eb802a5cb91c35f387845659782774385847cb0713f94968702f60da5de712fbb7c12a2f513a08b0ffab3a9b3478a586220d97d4e5611e831a8b96e9' 'ee78fb3190d79a61ce625fcdcf309a8e0006316764c3dfea600142c9944daf54dd3c2ecc815af6eac29e5000f0327c4fe13f4eebd0757e71b57570cef3e5e986' 'dd96cad493150471b9ef0a01cb1fcb67514dd3be3bc87625342c8b6e9bad75dd6e28f09049d4bd318d7fc016faa5a8ea2ec0a286c92307aa20406729d4867ce9' '1f2acbd631d171c61decfb8d24813ff9b73108894c78523bef7f3bbc455fc908f551227c5b8b1a80ccb3b5292f39e03de73d7ec1e2c99c01d2f53c0816073801' '0300471e22f22c6e72a3f47093d979829b58946db181b57d9dae40ff51608dde1c95302eb86e81968d533af2622a1173350e31ec6c2b9d8ff424e2ff9995cec3' '9213ccc6e54b0620724b31ba05b945b970c11bd7ff4485d984a0afa588f6ae676c63202c376045a3505cc0ac24876df0ebb8e3827ed9384794f82e8b5f33a848' 'e8edc93b953316578394c294d7e6690e0b3ce2f3f9204bed514aa20c186724f3225e0f5eee4177136bd30abb7bb070ce79a2841a8ef27dff8cd9ae237d0ffdc6' '2bceeb56da213db13e3db301654a0438fcd10923eb4d946f548f7edfca93784eeef9aed5177e32814742c67f2444ef8db4acdaa7b7957d62501139a3f1c879ea' 'd0de1848cedb02c9a608cbe7ea2819a258f92dd574fafbff254a9536b522f59cf7e475801d7f4ac856596f8e698b6458a362a4ebea8077073a387df77c72419c' 'f78f284efd04bd91729a3ea6b4e41deb8b55f733d0ccc42bbe80a29a3c5b96844ed8107bd783de826c030f1e01de240e43d357f523e1f4913e0a47536e381aec' '3953dc8e07f69c9d3f1f55e699d10b5dcc69dacd25c01c99148c33ba5310269384e74bcfb0176dd359f71bbead508584c62981e954c941e605b96897be41bb27' '96121a373288b29d2fc69f82251910c65aa7cba7c757c518297ddcdced4b3da5c298601983e7f7f080e8d3d1637d2cab199e508b210beafac5379c657558d335' '27db1a0acd1b3b0adc59bd0dac09f7bdb1fac5166e2071895fbec02fd77496e3a0a32798c05d18c8837854d1a7dc681eb35f5bf34ee7a6a2ef48c9505b346f45' '289ca1bd4f3c7319f601480399c6eccf53b6bb75968116de394749905f9cad2ecee5d41a48b4554f20097e20542913a0bd8c650ea7b62577a42570c47ba0f2fb' '365669397ea3b6f8d8cb8e537011e864a12e475140cfa01c8d9948361aba43f2034b7774c1936e43d7b798d2898df73cfc43e1b811cbf034fb840b363a195858' 'b356de3faab4cd6a7add08bd54b84da416008c6d4e4e8fe06ad8daede45931c7c0f3f2fd87fd019997a17d71faa0d49c9e1063878a16bbf88a28c6f820c004a8' '6e3ca248265276e246019b34afc833b285cdd4e27e71856138417119df34d2e0e438617e88a52ccb1d6839ab811eb1422f57663153e3b7d8f7248aed84440405' 'c1567b0b8156c29e833805ac7aac30f06da7901e3e22d4e3b6a951dff13124f26c585ab2a32f636564aa89f121c2ecb8029fda031ea112c9b7265e2b7a621619' '0e4614afb7d867daf94b292abe28d9d925b225295237af16907fe15b50199216d8cc47505209a1679d2d059cd33b7186bda7035911894b30ad6d00fa071ab370' '7d5572aac8410ffdcf3a03bb33471fb3d5d077a4f82beb10e088b2f27b24d3b58f67e70ab9f16fc1937760c97d15d264d2520bbd8cb8cf014803c3f09422e6de' 'e5af61f6672cee23832dd08f25bf07a81a1849406bdc769522394dd048b2716092c903770c7fe35a53a02a6296165e1326807aef962282c4fa7a4fd0ee4b1462' 'e31fb929171b0cc92ac27922fe7805f67ddcc9ca3aab6fd6760c174d29f6045ee088714f30a1bc885d7f9d9206473f52f21ae85db041e98cccaa6e59dfbff99c' '80621b3849426eec94b72ac78c7902bacc370edd850894a5c2f7c8880783815bd10f88ad3297c9f7e2991df128aaca74c1762431dc2aec80f77b0677a813f32a' '2b1d4a54e46fa02faf47b450e81e1d3621509d5810947f4a37d042501d2d520c45c5654de407a66fa9d90f9db9622c06a702cf24d4bb53245666de5036de929d' '8ece65c8719de7c4231bbdc653660baf78e876a20a41eb42f2ba01d2d5071e5c6b9b7efb119257507a960310ddfa73327bd3fb841c0d22b85700940df893f556' 'f4b5e95e7f09ec72222a50b25de63a0aecc6b531e074d858ad4a3aa1489ed51bd17bd6e02146266bcd292283d2137efeb2f3039547d2971e488da5ad208e5548' 'e86fe45eb6e79b06997e68abb4c6f8778481e7c89bdc1afebf3870055327f596a67db5fecec8561e37c373e3a04b364defdb174219a07558692d2dc1aff0a552' '2f9b539a939e441c598249d499f0ae7a09cd2b27d69490f0fb4ff9647ac67be824492c1af1560be78366693868bb78e32d897749c78cce1cc750e490b8e83294' '56b52758ef92b9015e43634292dc1995f723e5dbaad5a2743d69cfcdf8d6f10fdb66028b14fec4b382fd5c9487dfed39d8f55ed71aa358a6be7cd9176573fb10' 'c9d3ff8957185adb33aa023dcac366310d6923dbba08a628d0cb2c256c0d2ef646691d1f7cf36375f33103815f4f59421bdad01c2a12a9c6389481d1548b2abc' '7e4341a22ccea39488347eaf8dd7e70490b7adf34ccfd295f866b791e4f01a4c93673c16136dfb5c681fb4593483998598031a14d87850a1c4b334f2f865bf5c' '1bd2ceaacc45b7dc353a31a1160ba01e9902bd7b9f77cecd23979b9d56472b600fe824366c6bd7bdcd54f466dd05ce5a858ff6164ba805fc4f99ffd8da27068e' 'bfc4ebe61b71ce8cae1682d20a77dac64d280cc51856f6f761743bbe98b040e441dde6f65fb9c982a897d58948e6ada279d5a76d8eb2c0a351dfece0dff0cb10' 'c78d146e4771cd60b88564a0ad0ba4529c92eb0955ede3ebd6f37323d41702170426a39f9b68918b824dcca0393964f788ddb027218d20de5bbe5049ff5b9c68' '3629363d03a133466636dd89f21d77a2e8f59e79739207ee6edb8b19007bb9389280f40f2604b8f5853741323120c8f04bb23178d8544869a928839ef38742d2' '9b5dc410baba521e8e9462108576cbff02a41bfd72ccefccd13caa0bdeb50d8bbaaf6cbdb42ae0728c8d53f65679fb3e684a6f506ffde0924c7a281ace9cdc00' 'd87781b0130b8788f822bf447ab322df451cba4149b95397deeecf5e1c3be0ded744d5bd9b4fad9829e8231120356860e13dee32a2bba0a9aae93baa7ca4286f' '72d4fe5e6bab768752d58318e8253f96cf0ce7a511642f920b3a70fae1002ad69f6295bf62775868bc6140a7d1d7285a94d33ff0a1b4e0c866a75f339d13e1ee') # vim:set sw=2 et: