# 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.4.0 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=('ad031b3a9b738598358cead23cf8438435016222cd9a474c31892dc1b3db43d2d5d3a10c9639df770dc76eb3c0bc9db8be8beab84828d54ee50fc1e03f0da0a5' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' 'f1beb1991db37c3f8b4d97d4cfe1278abd0c795cb6e49ba0df45f756fd19d2c74c8d28ad50d33f962d347c11bff205270211beaecc98f899478d579804f3737e' '9013121127556fca723faf5e68c0d2a959a486e853d9e22bd9e71750f3098eb73dfb0fa2e98ff74c3caf0760e095d2e3848c7a1bae54e46d4315ede6a941e6d6' '8905cd5832d6e1bb6d7176566ef3fc56affb667606458e315f40eb83539039fd915bfccccb82d6d8cb72085470f87dc4970d12822979ffb5d2c3baa078b4b984' 'd6d6272e5fc6d8c5e3102408972c0e548b34634f8e9fa8173b4f90f0ab8a703a2884e51d588866627a3f1918d3c8e58d4cf04432e2785024856269033c8241a6' 'eab6b79a273b796618a43e2e0f71861f0f0703daec304b4f89f460e60cc70ddfe5f3fd16fbbe791f3f86d56e2c9919b69e90549662a063bf84f258341773c1f2' '3ef4eb25fc8e6bee1568756df965b9707771fd07686430fc946e6d710723657e7b5d7451fd182539db19eb8c6d92ec1e87d81981dbde4e43b5da797dc57dad58' '884c7fdeffa5332d0ee054e92cf934c6c1c50b9482b03c222f43a0e08210eadc5d60b6b291dae614810566891e3f379262a14009210e4ca24bc6a6a87c6a959d' 'ffb2d2728e0fd9d416c905e263688695da7cb16f97d486f2735c037b3b45fdd08af1e2d0a2bfd1485cac6d751a77419f930c105d3597529b54a5474b23a76020' 'b2a7106da4a0b5e042fc43d1ccc607de3fe88088012992931c76e6dbac483dc31a9a97211d0e4a52f37cc22b1f1271c8767dbb9e8786590fe78d48806dd960ff' 'ac735734e6e2d62dd5672dab088ebcd60e9db1f59e6e12d0d742139dbb75fed655d01ed002670a16841983b3edb50b7336f4ce758ce5e948d38a85c915da3c0c' '74fd326cf52ff53fd7a1a842497a0f8ba49cdde84d90d36c7954a375c03adeba4e4db66af8f09ae372eb0e2e4d7732deb456deb1ae662c28ac1e2ea0b9728e09' '64a95debb568e71393603d0e270b7dcbf09fb1c4f19c8d91f8743dd744836b06b685e69b3eafca4209b57a970a9b2ddd050a310f91d200605b54c832db44bb7b' '69c99952e7992cbe30bbd49e40a0356f5defb1c943dd59fee2e9ac388345f31fda9e50325ab6c788a481cef1f599034c05d23d940153b382d822cf4eee86966b' 'd70f3bf341bf8a819c0f7b2762bcb25329908c126e3eeeac736095546398946f52de16c64132d067f4602732e1a69a37fd607a349b5d596be28a4a81fd78b6d7' 'c5a38115ff93f7cf15a12a7f85f654dfbe70782f0afae15347e531b59607f72a66cd8fd17429cee014087582c21c3b18b71da70781315172790d18228bb8e4c8' '3ca50e9aafdab7e70617f4a7f13e0492b1ef086b0a55d8752fef2b17f08c75d0cd0c4240d8d4c5d85d1d307776122838987fb71528cfa88072110b3601771136' '98a59db750eb22cd18c9a000bc530da6c1e025b899aac25b6fe21e8ddc143338ff7c042109f9bcbb4f2b8043828ba0d95cc6ff03f26b0ee834d0c37a011ea3e7' 'efca5bfb6c66c807e1d933e84be0a4b13262f33dcd341f2af0c6fcdabc7557ded52655b7eef30bdbc0349efafc491a7c75fb9314fde29b0ab1c4db031155154e' '08fb4a49fb7fc72640a60f377506b792b15407d4b2aef99804bbc9ce7581a1ab3ed8a5cc8d4e2930df29270278aaea8f354eb5c4efb630f0cecb8fcc2c9bc6f1' '90658bc5e90b190aa20ab08da1044b7187033ad91c30cf303495a301a38f5536dff9138e4e7b33dc6a088f378d393285ec655d63c106b832513664f643f9daec' '5217e1ef65cd69c971f7efd98b05549a90021bb642fde6a8fc6ba02a64042d2b886bd2b2a09dd0e56c0ed1f19b0d11bb692b3910f71209c43f7dccc73ace9ff0' 'be53539a6d6d1105cadeb4423d745659f2f831af17b5588ac3377c43b52c1dac459061ee4f9185e717b5030c9a718a2de3f1612a20276aa891a6301b616583ba' '902c1926fbc341689f97d99af395b16bcd1ad58c9c7fe77af3524fe1089eb5ce02954891d30524303502344b5ff426d9f67d1666a30ae529f7f67b609836984e' '57d20c64c3f91d575252683511d4943d9b4e0cd59edf3b792d1c8ea7db2eb69b24faf3788ea92edbd6fb6e58dd4db470f017ab08684744195fb0d616e1da4e18' 'edd0796b9d1893b9da63132ce95155651a4799f8e8ba29f23616a66f1f5a1ba01b5863991873831b09afbbf9c3e74036630fdb6c47b5fb8bbe541b15fe2110f0' '06998be391b94a4f0a1d816098956b0826b72d556d402dddd471c77987eede2ba406df4db8e8a18f1db640240bbd11238fc4f4a266debb07d97a277dca03a6d1' 'a1731149889311fdb25ba2fca79743c7f2891e00f250764359db9a72c35734ceaa925d83777c5306872ae13dca3e3944682b55a2bb15e7bbda63384ec439fd66' '807a05798244aa55a24170f0d9d200a9a23c1331138f272dfba8e12454e2410a09d8804770e213a4e1fc28b9def23b35f4348e4db0c202c355560174508ed716' '362ec35071ab28633b3fa4e993d0160acd926bb7c87223ac2b886c8e4be740a781f69fad60290fc60cdee84f0a4b3f856a95444717fc754b0f8d58a007b568f8' 'a91efee4e0a07570044f98db5e5020cea08ac8a486dc872864b06ecdda7c71586d31ab97348335021245ea0c8b37b5acdc4f57cb08b86dda454b21d9b510751a' '50e503d68670234f254bcc7775444a142f79eee2497e7dba03ee8ebb84821f113ea774259ebc5bfe9b8a33daf63af2d12829822b72f62161f4421e0d658d4bb0' 'a41399c0fa40ac933d8627983398b3338e9bbe724d8039be41d8fa74f5b7bdcf493992f47e796dd3bb2979e994881bbfac56c354ee62881332866e2713d0e1a1' 'eae1b918b7eab5578dd12ead38772b06bd2d70004f495cc56324c509ce0c1a9a03ea5e6954c243cbf97b43ab494c7f1974c4c1c28d8c3ac454193e680618e3ce' '38778d844b7a3cb4edf98a00082c7439f47aa7e98b28c9268a8c833e37f4f4a3ddee8270628eca2b1383236d6ba3b20c8bbf1134351128b25bc09e6d01d064af' '064cd1083907fa0c09c41bf248e1d24e1e93e39320f3e646e516f900c61ea7b03c4e0d7a2b2e3716fd03a87bcba7d5e48dc068671587501f7e6d1b8275f534aa' 'ebba879b83bf8436187d65175c7fa9437e5c3082a4ca534dca4f307f96d1e256d377e6fee8bac3914981960c50e32d1c708a427cc22b6f2ac613c099b23f9160' 'cffec8f6690dec6f84c1169674a050525dfca5e5f09fea89d1c857a294622b1bf51dbb99b525dde3ec3221f0abc8cd2e7765937123317445d4c7fb58d8b99608' '8463e6c281af8e5ef5499c2b3045c179ee0706e291a95fd3e3ba4c00d06bf55670b10fafe8f7f3164b64555114e229caaaa0ad3abb701122d42dc099a7b35bf9' '14f151d74819b5863597555047d5f82a8a9e5cd48b03d72910b63ee2ec7f13796e1dc258d272f8e61c6ce7b2dc898dee98650e28a318398b972d9953fc4cfd67' '448bc7d78a4d2fa9ca7eb3cafd3dde2814d99e319d5250c1315a9d288db7673ea3a287b97537974f3ae6e57781549deb4fafffd4e2e7fa5702c551c4e41c08d8' 'a9a6b3fb5868075282a35e2bb8596199559b4ee81d59df65fb96d47faad3007b493e54b6518a666628da775f578ea5ec1f07bab1e4f2ebfd583c1904c0332b04' '5088abae8e3643feabed92a929f24bd33ad04a570667aa196cb039924d0764ebe58b97605d28dd5082053689bce18e7d143c2ca6984f92b824d286fc76986a27' '56e3b232b58e1677ca6afc31ef52f84ed9ad573db7bcdaf98b8cc00bdbd5d2110dddffc7b17b435f1aedd61961073daf0bfa02086c0acc955ec7185fc077cf3b' '03b7f15e06ce7d8269435e8c4a150df32d49b58525ebd17ecbbb741dcbba2b94645c8838f308fac5e98e87cd6e272c0450d27aebb7b6128b580e590548b3d480' 'afb8aa6db1f5d970dd1d827348f8f3730da050332bd85efd2751f8511a5a2279996ed861dd987002cc2afcf2bb531f0bc032496acd65acc7668599d8450a48e8' 'e4b4363e5f9bdc0ebfdfd1c86965e62fde83c15fdabf42a28851ab230deb93227b736fe083b9026c65a9cee4af8ad7ecdb21438ae5839f356f5b2b5880821298' '29e06f6654ba2e69769915593e79f6a2ddd8afcc75e42bc2202ab4c8c4cbf6ca8e032e70f01cf6d96b09d12bd8b24d9979175560fe34efeecc6ce643cf546a0c' 'a0b0d6cc5821c19eda972c32ec9568c7c5c9b308ce8ad981e9b575f992ca7e84f878a3828374a25e5aa530c91d5779c11163b966d59a63356c0e8699e52b14b7' '265f36e631ed90d5f599a9f9c4390901fa932d656582bdeb3e7fb1fff80afe6c6470b36f4d6e31bf4de1d41d066a7381ed0eceddf428fb04e8693e18c88fa645' '8e222f6011dc6903894f9493358cc9889744997f948053df0bdb97c46cedaa9f8be88bf793791d495f3ad9d1f6c815dda0c8f3927d6c3580b38cef693b595fce' '63199ebbd0953908d0e393b8badb5085eb604c31d1cfd8015decb168dd4a68070eabf3e8023ea4d59b5e78bf95332499a0d132b79ddff87ead5b789852f786ef' '2deef11dd757bd3273bd6fade4aed4225e018d7e7750bbc244a58f6806e92220e347d677c7852f303b89ea70843858767095e41c9372c67af637d0389e5619b3' '600c142220aaf9a737d14470e00b91c87a37e0b2e9f287beeb0331ab9b58cb8f43264424cb731c4efc62b71ddc5021e6d075c0179ccbee70c97c81e236a67413' 'd8ebe16c4bb67851c7cbd8e4f0bc4ae5e8df57f563fef94f5efa26bc7e9cf97ed6690d555da4639d1ecee143608907ee4e4736bb890d5a0b32062f3172535246' '0b3c21632199b12440acb3965637ab753310e7a3ae130e12d1206b25012172e346802fdf5773e1b003539a37f01ff31343aa87e5634b6e890636b3997bc647c1' '9b4c651c615fbbbe1e6127679a87e9ac0efc4a368b95e70dc839a7340ac2f70f75bcda8a6f55668f1c95fbf875174eddb34ca71133897da717a1de8846042ead' '4dba34687d79f7dc934b7b9d71af44acb69f5852b78e2b96d8f2e2a642ab10f52a9cceab3154787eaa670e87846d2cbbfe5401c27d92d85bd33974a131056a9f' 'a73ac5068ab7ec1cf2612ae8fbb2acc373f0e5aea0cbb3e3b82c936f38c3816521659ba26fd2c88323a501639b3334c75e7fffe0fa0b24d695ca0277caf5e369' '12be78ad1775e3d3a78a47f66ee28500c1e2d19f73c1ac3908cb3a8f3e5472a39d0dba1b371b9957cd2ba5f990f8902f3a0f02608e2b75e39876339c41a78d8e' '9df68540bd81d24a364809577ac86b85aaa53c4e43075476e7f05a6bacf0aa16aeabf0cbcc83eb50fc597a7149ee8e4606473adde731ed3d8f38d2e64f4d4fbc' 'c4a278601901da454638ebd1bee4d4cb2e03a1b21e53b7849003d885e987a750f02ac0e1b2718dc5e4db65aaef37043a673e74e1263f111d671ad76d45afc940' 'd79d8b66ae50e574b68a4a9fc8f726de2d8e15482a98a8427b8498572d01ca356c46704b06b73282dbf9ac8593395ee93bac41ac69986b8c6140d8b3dc74cfb8' '0fef1e5baf436705c1273f915e1beda9593e64d4bde61419159796c9372e9b8c0b879754734e926b5a5a1a4c5060d695348722041700bedeef78684513767e48') # vim:set sw=2 et: