# 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.5.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) 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 # .desktop file generated from jinja2 when build flatpak # https://bugs.archlinux.org/task/79590 & https://bugzilla.mozilla.org/show_bug.cgi?id=1852091 sed -i '/StartupNotify=true/a StartupWMClass=thunderbird' comm/taskcluster/docker/tb-flatpak/org.mozilla.Thunderbird.desktop 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 comm/taskcluster/docker/tb-flatpak/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=('5ddc39b3591427d283c5497f68a1d722409aba54d53342a36a259daa219d8135ecf88868b12235eb9536f46f825722cf6da2781b71a2e10b816281231394b4f9' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '17d382f6af075555d75aa2610300aa10c8ce224ea8f0aa7ef678623705b72f5661226e129bf78adb0fa2bfcd9071245395cd785759d18d3da5f44eece5e540fb' '1729e3ad0007d7ee5ce3caf9083039ff3d8f5a5d4fa3c379cb5b51d3cf2a22bc45ec672ce23ac2760f62d5f806493dfb3774060a6059d79ed7d8522df90a73e1' '80364f5d77336abf1ba21c5ab8df5acbf01199ccc35c70ec1d3e12d63adad87722c0bb352e16040b7172263866c381314c1a5a699f9c19c5a8fb64804a3a562e' '5438bae2e480bd3b701c69f6afc07231d1acb41b33f0a2790efddd3e82a356c6c2f0465dd22b63ff12e3faf2d20a52cd9d52e15c7bcb45aac523718e41afa9f3' '93f5dd0e3167afa56da987f9018cc3b05dbe845e6485d5ccc13c8180dd0f091c4b6ef4b8ac3a31a45fb03946c9f3c0cf3bbab683f9d3536a7af1015e5fadc52c' 'bdea443e9c270eac1696721817f1c57403eb10905d03cccd125700860021dea9c6575114bfd6d3b86e13637277dffae695cb76ecec45e6305f7f5b201c5ad869' '13e6902cf0f9db10b6b8d21883e3c02c221e6bdd2edf8b58851a4d2f00a0bb8b86c459b6c7c48c714ce5490d254d9555d0c1da1e7224d6c3efc1f94996010450' 'f180a9ac2d38f17b04cd3c7281d81202629053c372a7cbf4b9f29b8595b94ed0af6b4b6db63998b10e2c1fbc78c1095f94102241ff11507b26d71620547cd43e' 'b0e4d03ee969195753ff05a2033f4294c670549d8aed3081544d3c9d2e333b7be30dad46c7083b421c0773c78483edbc75f0c083eedc42aa0d08344bcb1d6153' '59299eb274246f7672d39612c0e4db5ee40ba8c7b72bdad04da844386c3e66f3e95e762f580b80a117392d679d5c71003ff90179426208af5cb86561a7dfc763' 'e06141dbb07b7cc3ce31ee4ae56cc2ac1360e00eabe96928d69bb8c199ed86b685b7fa457e71e87c12eca79f8e22e4aebffb8455aa4deef752d7969613a896ef' '7fc29e63f93e765f8c1a16636808a22f054323b6e3504e3c34e4eba8b3402372edb817e7d92fc38b49f5c651ae643f6ca573c027aa6e984f1ea15247ca58b137' '566e9a7c0c1506058a778d1ed2f82e4fa1016dfa1872298c0df341d6074bce9bed855260166d46b229a8e2d0db4492c51e75d2415446d2145128c4def29417de' 'b26dae7dd59c97c669fd81a890b852e2ba2e21b74dac515959ce57fb8b0d504c4429411304eca4f8b8f6a4d2ae92659cdb67e206e250afaf9e820543daf04849' 'a59873bdfc02323269f209f1fd90762ccf60c05e1a72a7669170f0afcaeb35ccf20be3ce32a63781c238be4df84776b76a34447116ff08819351bf7ed8872b85' '55cac94c53814ab61ea1fe892e33fb105c7354f831d6211f17d10cd6c83279492b80b5a9d30d9b339838e92746f85cacbe4974c133c95534b33de72b19cca195' 'fdf063b6bf2d76b7e51a8fca98591809fa096eb6994f363f8a8b4ea95223c5d95c2b5ac65fdb003a3d66ed8946ed7e528ec0c7dec4ac53691c3d4d574c008057' '64e40d793b9c2c2942e4b3b35325ddb68ac02c92acd11bb2a61e8f0092442c87d6a689e44e3f51b5fd114035de5cdff82e9dc38ddb00f3f95cf14d1a4a6f2f77' '2be594bb9b131969ab4b675ba42ebb2a60bd1c13b58610bad0790541b700a0d895d4f8fa599c4b4d9b32800f2801c51334e73f1cc2e87086d3cdbdefedec8ded' 'dda9c53a8e48dc90e470758ce0c7ac848cc1fd967c753ca315db5e73e642b1082f99afe5b74ead52926c1646537914fd4c2043e48befb4b40129cdeeee07f6d5' 'bc4c0c93f978632ccc69effad03c36ac03fbd662f91a24dc14888a4047e6248c50c7d1d5850a44bd6925041ae93a3d391b5e06ee521abbcd512b80a2b241192d' '252a47a8b955440bc5fadbb4edc341765e169f41e3f6a8a26a6e315950294895f243010eae8e80c23fb230be8bc2e97d42dc0a6144f155e9033ca78cc8aafd07' '04a9dde4fb36fb13f34f9148a827eb8454b43d3ba865a0d89368a6c4c2c821b1f3e8113e0740d024a1bdc8eba44f8103b9aa550e05b221caff552969ec689b29' '6fe198097862aaa5ddbd99849a35353861aed30c46068e4354a1abd0662fcb76f8a38965b052b6fbec772440940d3a148bda11fbf373c7404b86bb396e179dc3' '2f6ea88af1595042926eb970e669d2fe457dcef986efde34817cb343873f6e68a058096f5eba69f0187d9a12cb67e90bf0c354f6cfe65a6aea0f8d280b7fa2d4' '7ea1ed8a3c0c2cc3c2968bb12bcb1a617759e08da9fe2f890b38f43a676e30118b2e5ac9e9b223701ca2b85142d0ef119db597ccee24b145dd79b7e6989acca0' 'bdd8acc8467a1f726e33720703b7892a5bb12fc7506df6dd434e1817f5386df81a161d83e49b8748b32fdf20acfc35c003b3e5efa9e5d250d569a9f5f4f795d6' 'b7716a3edbd8a1835055210b2326576e23f2e39dde0b56e7b5c62ee941fb50d29484fe0fc5a869631695d50d87a88f6361c7c0f4ee2a4ee290d5e914d02cfc6b' 'bea5532e3770332e76e0dc58d7760101d7d804969c0580f873a3abc5a264dfbfbe7797e75ce05af14de92e83c1ff1a5e14686ddb6e9cfe40291491e2d76f0141' '1efed62054a0b3e8750f7db1a20082403c03ada9b246da1b01b3536ca8546dd5414cd0fdb0a40446e9e817bb1d4fc96100b58782343e7f1534d706927a3edd09' 'd07f96c9ab5ce125d3aae68eefa702d3766278eb64f1ff4fcbf0b3a5ec7ee9397474f097a68d2792abe195308f0f028351a9f5df1741b775288dbc62a3e93654' '07cffb5adb636bb536fecc1e9dd86fec2d88aa9208a870447f48f798e30661b8a6bee7f3a5cc09bcb4d9a78b64e253ca0b12f4fdcda65770daeb2076ddf7762d' '8b4cde9fb11ddb221839a257a24406e5726291f50660164ee2dd8041da8760c0f149b0799b6a3478a608fce6b2cbc5afe8504a8109d82244eaadd918f7eef2b4' '49388fe03ed200bc615188957a4c38836f327a91ed51b0df8363f0a7cab2f24b64f61337deb56a938cb253619f8b64e13fb8de95388a3f3c7085030be879e1b4' 'a75f48808fdba6821af293d685a2a342e5e27e6b64485cc712588360649117f2a3fe0e8e2f910893df8e3a9088374a6a95b3c23944d9e9f45ccf0e781f60f452' '6934b0b41341ee6f211c82f3838b9b075f6ca217091fc36c172fdcbebc68c2fefa8e3cff0d49d84675f86252d52aae762508e288c049fced5cab0d944c8abf32' '054e3aafdae272ffddab6d589a39f42fff6b0ae19e9773b75d037fa2fbe07d113c4b0279d35339dec145a3c6f3fcd011416d7325fc97c9786cf4d43d6b9a4e04' '9c7c79fb7807f4fa6df3d8ac296da670830b76f093de862158a5cfe4e595a3f42572837904ff4a8cecfcdf0b7b6b892eac02464c9d600aa563befdbfd6738abf' '19536f2542bb1746722bdd1b64392d7a669330005d94501b021dbf298b711360f3d4d7b52bf9b28ad3e634bb1292040bd4ee98fa024ac6a404efabb3d3c68057' 'cc838b420b4b43155aaaaa871ab0b7c07c56a589ca898b8a18164d60efaa4f8cf44328fa7d17b7c6d512115b9f0abe99d84c97f4c8e74bdf02ee7fa0234162d4' '78bc8f2ac79ec6b1bebcd2ea60230a47a219483616ff267695a5b5634fa36625fcb7ada4742e8131c36e7955a7eaebac95666fca8a76044f69e02e90fc3425b4' '4eeb6bb01bb211defaee2ab7f79c352c1c789a09e61dfc91442ca19d8d4db2e43d5fe065c31d9b23f0ce2906b7b43294ac72f2464786536d060eef669cad0e92' '4853c25963d43a4cf5bc1ef112190c5030bf4cf5408fe2fea27066dafa388473d7fcecfd262d4955b695c8cbdc86e5a41d5b07db0e44471b61d0b456d59dd7aa' 'f004f1e309b590646362a1e3debc5514e01ea77fe7aa10a4b61bb5e79970d0e52255fe4261b259c6a5edffd0af28d0bdc325f7a54f15bb49340434ef9324bf57' '42f0a8616e2bd06df0cacd22d6d74f0f2585c195138d58f25f7a103e2afdad862d5d48f308788010249987fe5724d93b491cdc0177df617a36ead754c33b78fe' '0958e9d93257521c875838ef24e4fc180d378336de265a6b302eada0c6ea1d64336437ff4ef8f582bc47e7d74991ae6d7c6500a32fa257971531d52fa5d644e7' 'd1e5941e9d913368088c683fb9ac35fbb325230e0e52dcc732bff7fb546f9f6baefa37ee0c813e5aa4db75c47548633ec0a056f491a77ed20e0778766882572f' '44bc0d612ae0f7b99733f6c68c2be82cc2cd97187e234d1a8f4dbc11b259b02152ac5a86ccae0696e8b57dd9fde5ba1b0fb7ad1f106ee4bc72889d1ccd1457f4' 'd0aa2ee8c69a48cf4dbbd3f97f11889bf129c180b8f3567cfd54a6f029286688fa83227ee71a775ac942e2fae9d5ca4d75ab0325f2d0703996555485f52b8165' 'a98bfdce7f476e229b74f82225206a66317f2b8a109fbed326d461accb9ef8930bd87c141ce55cc15ed0de14b6c83315d59d9ce48fb614546f4bdb454a11fe05' '58004ee5f828371871971e95ee3e3b40804d231d3075695fc5b417cd3a8d4279c2572d25bbf38aaa3ce986f4a50e70c7a033698a1359bba40d9230bfe5d46505' '6c9b5741730fae988b87a482d4780ee39a551e29762b86b82b1e3266624ee1b82a49b19d550c8453d716ecac6e6132373cef4f75d2b0c0d336265422971d40d2' '8f8d4f6fde752c7eb83b18e7077c4912bbb3a0e070077d5eaf2f7f4c873a3cada67daea5330ba8f1c62fe0a6c2a12f1ef59147ca5a71cb122c31ef046e994726' '04ecbaf4fcf5d10540ea0bb69f6bf5485bb6de129deef3849601a70f6525ea178142c228c1fba5e7d3609a485c045ca8f2e6a4fdbe0fb023566aefb08471b17e' '39c9837ba81d967b5d9a36100c5c03e4e16c7c720a0f75fea68484ff1fc02f3d4d4d74d412cf537354f22b86d13d6dc3a59feda9303aec48eedcc2b8334858e2' 'c4bae8ef983234d757324a0c38a17e94861ba2a952eb2df99b34d08fa57d27acd6b254592c3ee7cb80fd201fcfcd096aceb877a2080e163d7414c09487e675d0' '9e0f9919c03af141fc10e6caeab916bf537c02bf36fb229cbb506bd1efd3063f8b1e5cd4d64e39c2705c89dffb6ab20b7b16e5261d6a9329d8ceb921cb2c1206' 'addf03a7cb62dd8eae58276fedb8d6e9a153b6a2f906a3bdbf7b1aecd66bd7ce3fb7cdd040c8765104ce3641dd1d7c35e906ed972a7b07eb6ea7b5e8fddbcc8b' '676b2be7075fb4d898baff593c404f1da9219a94899997f3206ab1aa8976a08aa83cffe8679b0a3daa09c6e3c1a59e1ae61358360f960034432d75d2fb969b77' '0776dac8b5772547f8282401f85b0bd6f04080246603b87efe2cd2f394cb9a88c3f82d93b4837f839345242c8fa5756cb9f6a7c7070491e9d9d78b5304999f5e' 'd3933ecea757ea665c9797911f76ca0a130e368a88de176ad237facc16d098aee51ae66cd03cd2839ca0ac754905214cee5d666888efb7faae8c0f7fcaf97dc0' '0597954c4d11647c212459c47c95fa5834710445e7072de77bc0b055559e51c04a2c1d3ce76114a1bf362203133f4ed979397088a146d22830c6c19764c70679' '5ec1868b9a09ed2f32237b62a59a9233fd668f117ed485d308bc4711f28b1b7b608ce92ae8c5b91299e16dcf1a5ebefff42d97df297e101dda7be8220fd938ce') # vim:set sw=2 et: