# 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.0.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} thunderbird.desktop vendor-prefs.js distribution.ini mozconfig.cfg metainfo.patch gcc-13.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 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=( '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 ../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=('9a53024790a537fb012d66e683248e82a9b2c2a4db6fc90d1e1d3c785c28e9d65f1d110c33dcbdad63f8f6ecb3e5c6a526c0028c3970125022ebe384506d4ba3' 'SKIP' 'a0061fcb2a7f66061e336a8d95948592f56f4752e56467f14ba63846720ebf845cce7511d1a2637e3b80d5a1ffdaa2fb783fa37195103425ef65222d45372012' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' '347010baf2984689539780f9de6358207c6982dcabbcd48cd703659aa763f869d516ef5b3ab7bb258d67e650fe36487f5eb2f6294c8b7149834adbb5b73122da' '9bd68c3657e7b7b012a36ebd8f94d12d42276cf4044074acee2b19884692d18d5541185d956169fc277931a3278225705111475ceb029d908b257b0c0abb9624' '2d07000196a1ffe9d148ceac67e1f814c84236ccd034fbbfc1e47389c1bd154a4e1ef0b7ae96010016f14d62fb18178f91fd9a01ceac751b57be0cc8d5fe60d7' '1cf2f30fe2eb0f83f251d03428024ce49310f2aa565fb82ba4f48df09889567db5b0cc7924e765f3a2a3e1d19b7ca0c26338a2bc1a98a15f91e6aeb789130b25' 'edcb6c77b514cf3e24abd895acd247e48f672816941971dbbd511ea739737d363839c5e0073adb8fda647996879fc4c1cdcc2bdeadcf0ba3544cdf0df05d67e5' 'c8187540974911288970c0347c52adfb3bee4d9c5ebe4e991919a3e7277f3219e232ef5aae2c1951471b7280caf2c34d42920ffbf97b9b3bfdfe182f4d84ee6c' '5082af8c74fe5276a91787f76fd03cbb84dd61ecd374fcd506b69cd20787f237c21f31ba733bf447194764c51cc1fc57bd8c3bafdfce4683de7057e7d405e0e8' '33770d00d7fad6325ed2ae01dbe7577d4b74bf70d8a3294a182cddd2fe6dfca94c212f3fe70d6aba6fa769775be7cf3770ef3c1680a90a6dbd924e2185c236ad' '4bdffd91ab81012e9a347c83c0f0f3fd9975ab195fbbe4b18c13601f77a721aa2ebb437c17140c068a9424e54c6ae58989857f7052451e9b06e034f8c6828dc4' '9626e4b2836c52d738ed19bd4b8e560afb4bafd79aa12b893658abf9a2f641bd90be01e11131d1241bc150b3f1aa247e93e3a7df56730f4cf25eef65ea6be969' '844751410594b4b4cddc98cce4f1af9273063cfda2cab1f70f0ecbc08ba95795a403f3af822fc7ec6576b6b477a32537f9ad34bbb69bc225377784854d15800c' '370b18a72d5b35975436874f549ffb94fcafd14992e190741d514eb1f00c594b231c82520ab1d13e92c048bbe033bbb7ec9cdcc2baceca064d90e828da3e4191' 'ba174c5c0c398c1af153bcd108265e76314b2e682a84ba6fd837208178df8490b87eafdcd4103185a2e168853e335b7149f062cc9766899640c9dbcdf4ba3375' '6fbb734a5e59c42b8f8438e1a51ef8348b0993c59d2adfcb67b0f9295e664c58589bade2780128b25f02ef7cf2bf8dd6bbf6b76db2a60ac62ce4dee2e402e7c7' 'f6479815930a7509bcdd85a4c5e6002b3eabd15ca6023840316bf8183bc9b883378430d560ba499fd4ecce3d2c79777171b9e66a38b964316d909bd143c8b8e5' '7c2f026dc91f5ed33877f7a1b399fabb979a2dbf74887e49a7a3217a007048862eb4a2632ebcbb6a6354310bfbcc10fc70cbe2a2b0961ae5374096a7cb40ed6f' 'd3ec83e47d7fe6d14ebc967fa33339ce46205886e66e48dc6ca7fcb8e1bc9a43ee6e394f0a4589066fbeda71958402588e832ca1b3a0ee583c8b33bf1ca7867d' '348133143a2037e95a0e83c889c533179db122ce80bbfe6576ca72697bb6f969b7d00388e01f7919728321a828810321a53b3c46cb8ae58de08ad1c8fd1e5f13' '91c03d83919e842df0b59e4f0f286be6c657024851c077978d84cb17d0cd53c3381ba28259722ebcbdea26bb11e5fe41c027f790a2f33110c71628486a28f589' '62dc24e5ac3928d768c0edbf7a1b7a4b75b24a27a4d5efe44366442e7d9f6a48eaef1561a6189cf0f053714b245cfa765ed57f00fb9a1e4303036236b7dea54d' '85d652926238b76ae2fe388f2aa39889a8b02570bb7d6e701138f62e0865031c7c984470cfd0e6d4e97be662051f9f60ab77c96e584b9f8b8765c6e0402404ff' '6ed7685e5778ab7a97264e404f739755939defa8d0316a209d6a56608b738f91732896841da07f5e39c0868dcb43876e0198b3d0f2c8b9ac6ba8933f3999d8b4' '45e86583dfb45bafff2978dc97721106a6506e22e1b8f97733ac1835b9c1e0a04c3fdae9d400ad8466e6f8bde1dc6cb4a16deaf95047e1e113a70b89823f3d03' '2817cf589485019e8259d90485b61dbef1a9384202239d3633d1db57e7afe36949d1c32e43b905a1d60c0f69085789ce3c87cad821c69fcde98d3105abda60ca' '1f90e4b6ccbfa173c9944a9bd33437b57ab7de0ba7dfbbd054dcae48c58dbc2411c89bea523416ffb02d90a7fe7434ebc90c7a0ca48ba45342a2fae40732b702' '8e22a3369889e3a91dbf17c7f82260a41461265a55d3b559cf91d063eb6c2009caa169eac2f414f1f3993e0bcaccb61ab608c84f0bb23e792da5e8d7cb1704f2' '98e7b85aab49f4d742379518af97850935b6f46d92469fdf3fa7e7a22b422986a4db89451512b6157081ce028b16729de0ccc0053f29ae9f6aff8e26e2016ec8' '038aa237bb91d974f00ec11508151ab69e53c26ebebbbc7baee022b2cb061a2604da25ff63cb8d67f63e9dc8b954f37277de0bbb24bca303cd267cf1378ff70a' '0fc03b0e52281ae0c577213689aa5a0cb04c56e63e87bd482b22796d75afc2c67438fed494732cf81d0abb3787ac92c07d1bed0bd5104dad9f371d0047aa3725' '049d18251b6dc37d7ac25c6bf70b8a72b800d65ec1088a18f02423758d52f5eb2280bf771fd67ce3cdcab014c12fb2d9b685d2ff112ffe10b71069ebdfaa1ad0' 'ede6d3825cf07345061381eafc5a10c49bab5e096a5e71f1e68a042e34e8f64917c0e0b6a85019700ddb98dfbe9e3e7d6cb423cd0221d3e2c3871e27343d948c' '0f597f2bf9c56ac0654f33fdd5a93b5e40bd4656e3ff48ef75fabf54347d36b631e80fa3b28c05aef513e8f1b28b0246420df948666a918c07e37c93a25787c7' '63466238b2d62c6cf215c7dc6c14212222411a71887e276ee8f238eacc9f0f2e1ec4dc9f284270089143dff94b1c287cf1e9ad951c76b3b4019e1a775766035c' '6ceec061dd49fdccf17def05206a692e1d4cd4876bb4734f2a6fb1c50da56fd930c65554a1dc3418c168f5cf267c5d4f5d116e0c9c5c5c6c63efd4a77c35d302' 'f6cb8834fbe98634a9e385aeb71f49f017259ab47fcf774242a33064c6769def772c980e64af931d32601dd4ead9970a9e67287b3104a5b303730ee97d891a21' '8f52b17b8a49a7d60ae9e54802dd7d4843cf7c93a6fe416268c9b030ff864cba1fe1ed27cd0b3958b60ee7b55440b5574e43251f68c64e6ff5c2ab8c9bb57f3c' '30fd2e5fba19242bcc84b91358f5df9579649645b5f118068584c5cfb62b5c2c4197ca8bd104193d2f5c958d063ed28601838819dbc14b5612679d1d9d0cf489' '156d49431ea9a0dfed9e36e01e9fb85dee358d7739342f196ec13c8264b4623abe50e1741c83f9a8454607a6440d0820e1602f5e6da90bc78b788ccc284b0d2f' 'fa1c885ceb24aa2f142c3df768292d93f5cb93b7dc99b7fe4d47a4e3323432582c1c4e0595ed78fe2ac7ce1c6cb8651a1b0e3693d070909f179f89616353711c' '036faf74e47a90c58fbdc16c1b42898b81903d36f37b937b1724bc24b1e1ac018d169c956e0c548b904219aed0759869d1272a585568a2bda02fd6b7036765d9' '22254c4a03d9446fa2c8b442b1f950c0e7f8c5dba9a14d93c67658fe125e21831cd399c69a1f58142a799b296ad668fc543d71a9e4b3a81d20966573bb69ceed' '00852c4846513e870263a47e2966589ffd9aac809bb425ea32926140160801ae96a8cae18d06d042cfd777b33147667d9e584cc874807acb33264ab73eb79518' 'caafb23288cdfe9b1fc692b42b1002848b73c4c84541ac4bd51f652436daf0525f5e8d820db66955a15cc1f8bd058ec11c4d7414df85900a2b9e58cf10a77b46' '33220e29f993923997d1ac99c14ee65da171cdf3d1f7608ad9bb83a7694a539649c0921239fa2fa20488710930d6593e80aac22e55053e5497d1c6ed8b92a7ae' 'b1de7e0240ebea2d70212ec38b123c14851b1fca000e326f77e476c1098be33e3962ff9f99e40695b79a1f858888aa712ad7f3d5aa151e957311041aaa408340' 'd908dd14c66bc49fc19824d6c205f7904f49389ddb8a67c1078cf6bc196a66934fbcc5aab91e04f3113972d8d97970ad1cd1f5ba6ac2f71ba13cac5772d2f012' '01266a6b12d957e696bc4ad0416bb3a75e1610e05db3f38380414b18f9d39fc9553c843c6d821ac67154c84356a9a7a88c924441e6af1088aad7856f517e9b9d' '61d16efd703491185ce4f8b028927f98eed57def22cc9b86741397e792ab2e6d28d337393960c4133137cfd44bbc07fc8f91b8b99dd5259e8c11bb1f9cc1f84a' '114cfdb114dc5540bc8d442ec53fcf825b395148f8a1df5e7daac6f4b2499e09148d18b7b84a0f61827b21e5d3bfb6e9e3dc65db5ff272557800b0b3deb4cbee' 'da737340d2b63714f0e3862bd9db26f2fe61f1db854527f8b318b0630523f153d0d0fc102a57349f09eef1dfd71e7ea799efc614c1f8f6636de06c9446cd7a55' '0cc71c1f9035dcc46d7b05f85f5bbeb8c39a2cdd4583d096460116aa2158800392fbb213e7171af844d33281d5d3a46a22c406dd764e255e4e442b2e7ab43368' '7f622f0fed7205c1b5961d35418b6ddef88c2f6cb9c126d282f18b027aeca8ccac0a7a6c4822637b29bfa9172d5224f4809a67e60da893f868bef980bf4ba8cf' '1247b10702d5bcaaa9450b4e3ededbba6da7c7cfab207e68b2eac0f8dbf38ef117f52c94a13fdee3bdba8686d1bb31baa5905fa679d749c77648ab6b71113e77' '4be4addc601494775a5f822a6724f38016889321255961695875b72d826cb23d365670c847d8d0917e9c7baf37084983353e376a60efe2d7bd6aa1dd98cef8c3' '4b6dd93d93e78d266d13c4d83b11813745d7210fc926824abe17e5846c7aa2a3132ec38af281a75ca407aaf46f656bcb6caba954b47fd9a637692ab798787f8e' 'b63edaceb1c8a2a96dcb261b814098677795d1223e90ddb8f45732928b2b1e1831c6580a83d66f709d9f0f3191cced98707f91f4e351d2e22d6e416adac5cf38' '89e0d1f14b87d1fccde7b83aeb56a7c334ed00a4eb28059b18a159b2fd55cdf2597f68a6da6de916d4bfe4029e9af9bb66b31b2ce18ac2d1c9d9c417e336f6c1' '9244d0050a9d98d5a33725502c26f0a8f3cd6d852836fc9c11ca8bd47b8a2f59e8dffc0b9a3f0f4e6d4370a3445689b4782b4d3d2d45224de48c64727c6751bc' '5d0c4a812da5d232a4c7473ca16c95ac18802e1c72712f6db561c8ad5803026db5a2eb24936c00fb2c3702f314fabd0b7cd994ee6a4a4e0cc47eadb5c3a1b0d5' '62879798749573fdd429ad5e398faf98a061de8751e1c2a77072f5b8b8583188ada879a55d423f613e474b5a2fadbea5ae8402eaadd714e18c489804361f53c7' '060384a81aea59e3cd6bc32b6abdb1de4d63d5e2dd0a07b6ac4d36f92de0b95cda2904112fe98e0f8f0b8cd46a4a8897e1469eed64e7785cefd39e2f57e4069f' '855ba6c9ee27b796144a367160d1f0003e0a18bf39fc45cc41a2e5dab36dd2ed3bba85b46cca3779ef6173a39b0f46127993d20308ec7d544e865fce59fa8fe4' '521bcc9a63a53bc5570c2a47330f80e0bc57c1eb211299f21a145a2f6d44c07d4be9c042c13224583e114641ec20476ffd68de624ec9803f35b24e5520ad7366' '9846a0b9067ac694bca75827c45f8133d787a4278f2f3808a81ec0efb9acbe089aacb71370d91a1eb3df27aa206b997915d0aa9fb8b0bcfa936e16499020a5e6') # vim:set sw=2 et: