# 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.10.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 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 echo "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=('35188cab32502ff2451834358f486a095ccef0a7330ee35d116c335555ebaf267e01f7084a6480b7af85436741c8591f08d6ed9a01c1be52d3f147f913c1b5a4' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' 'b3d32a631f43788cff5b69e4202e303762b7c2ffe6a02920fb224eeef15146de5b962f0de5964f99b6e4af2c0480e897566417b54b5a4dae04b2aaee761dc55a' 'a88388f3f4c46b526d26cac16417f6ca2defcdcb3ac3ccf573fee2568f43c8f7265e7c15ade56b37615e8fa1e1f3dd5db040881e7f1816999190eaac5f1bbc9c' '9e76a5af0708e4f0f040bfcd6165c03200a3297ef6962fc6aa594c80e7a75b73fc33c1f9ae1885954cbbbd7ab79a19bdb36e8af3b921bf51114ab0e7b497747a' '7033684ddc017bb9b931847a5eb7c58cd91ac9e9ab67662d63fae23666712aa4bc8ae8a49f3b213c03dada0c903923a9e7e93bf989d270e4b6cf97eab2f72d66' '2da368135f3d0b94616d8f789369f349aead528b712594a42db66839aace8d03bc05107b689168ab83cb55d08d7f03b71c346bd95cb9c1ef87a2569416203b92' '51c18e080ac55b116adc9c8d0c9cc5546fe3c9fdebfbd4752722243cbdf37b33ec30636290d697854a661b9d5c7a554d204ab1d8bd68d0773f56922d4c62a1cc' '07a8fd01074fdb96154681efa2dd01596adccb0f19c2e44412658a9b553e214199f89be6998896fa942c85b53cc93fbf792b74db4994fddb20b94bf81da37e37' '96ca73272aecbb339bfdd943912263cbc36474d1f9c3e9a847b7d31661d7755e6281c3129a22a0893dc8b4d134c5fa0a63c7a9e1cba02e18985de96b6145192b' '9b8048927180e62fb3b6e96b89ba17749554c882a7f82c012c269b12f24f8988814d9e38d0cf2f91a015d75ac12e65c1817a4a87f8da6fc6c155cc8c3b788ed0' '27f823b7714a7fff56403ef5a4d53403a4b9c7bc3d1032df4451d94a6128d0b60228b5cf1f40f2b5a08bd5490e1491e816c6fd928f3e4a67b04ac3b2baf59663' 'cb1091e7e29e0b6a99d217f7f4fb32d47e1afb73c42a421c103464a25900f7d6f03c7114f5aa4001844611f8a02395f2c3f59c44d5fa352f9b748943a9e556d3' '4ca47066fa77b74e3c1405803a19cc92a9ad5982439969d94e3da53f80bf67ee526b88930aa1a0d97aeb0a28a21e1ef3dd4b3ac4153fa3b73a200ad45043a995' '31698ac1fb8c9f9748dd91e4ddbba170101223693f0bd2d74e120f8cc93ff6e96a8e0c5dcd0a841d79b6e893c9d26ac1048bbc8692d588a7f183088cf299863e' '5ef73e8af45122478b6b15e7f858658bcd9d3e60884bbdf7698c4736fc44f2bb2eff1421ed44c456f2c3cf27610a8c22f49185593b1368ffe81ee795f7ed0414' '1da92114e37dd59c1c20f43e16252e4070639ff41a9b8a246f25643f13760f17d7cf98a55dcc540d69f520e6b9062baa95b43bd6f2a232312ad441c069d919d0' '02e72eae322e11b1c081e0bb4d4022b897abd6d67c99e849dca121ca324b8921d265e354872bfd220b8fcbd333add1c0525993687c71b2ff01981ae1acfc4e3c' 'cf52eb4302a007cde9cea0eb0ff0b30091fc611a3b96a916ad8cc6f2a8a309f70bcd89cf9dfcc475c616419e3f81969b48f74e9c0cd83ac35961fa72cf0e0315' '10b50502b301ee1c166cb9b23119cd3e307079ef1774dfa3ecafa50aaed6fa70cd5a34cc01eb12bba3b3cc06c42a43db2689d31c5eb3898293cdb867c092b1b2' '956457315b6feda6a49cae8da2e19b0e391439f6f5749cc6739558a299e18957f3ae7e90ae07eb4fafa060748666842ebb6752c34876d34ebc86639e2314e6b2' '8d71b9a5a4b1894c6753afd71106317783a1070dce31b96ba3c5da117b01f98c9c5083bb14ae58ce21b9fc4b9023e6dc3446cde0b184380e3d9b0cfb153c20fa' '0c6d97e177decd5b95cf10e4bb696bd3410ecb83669fc1941366d4f4b7fdf20a09a30bf908865664154c603bd37cc3b4398b0c5e575b042b4b6ce1c813b6ec6a' 'e0ebdba77475988e00ba8a9269777dd0e503c1c978a02595d2e6f326b4a672681f90762a6c201bb388797cb2dfe596779b40fe0db1cf84c75da9fa0f6a79e83a' '2748440864a3ac6d017ae3f6f983031f87bd44463a029800bd6d90d80bb7e0abee83fde5d833cc2d1609851d3f408ee95a8f42fb2ff7f486e7239a85f2d31d64' '487238f420602787c0989472c615af954ba3f9512601a76e03f414fc071bff5178b934d0005a1543122aa0e5a6bea9110098aa08b52551360346962f8eb2c370' '9e922bad705d8456688c16d38e689d970db781f76cef56bac206cbddc00e3a4d08d73e597713e21807981c55a3a7dcd6abc6694e4933e59fc6e8a05ca10d0ac3' '235bae4c01e9ab9ef7218848cb9cfec75bab1d4d450ffb730aa8db6767ce4df4be9c27858efe3b90c33154cff71e5c7e64b8abcd4515d507055aa5056884f282' '4d93ea45811431721c468b312f85b2b8534c751bb1fc297ae5bfbb6de2bd329740e542f9da38e69be7b14e2de659cec6140234beae7ca752a9028c98e35aef37' 'd84cf338b0290e6934d5d7437fe827bc41e5a1e43ecdf2f23a8d07405ff6a29aded6dfa6b6b10438028632a09c11a9f0e3eecdf716436e6573b368a35445575a' '853d22a9354129df196e8ddb1bf082c584d046aef0451a2838b6f75484d238288f67232d4487bb3b6860f506418cacfe714b6899efd3f9ea76f8d8b7837b1818' 'ddd72550eec6c8f8154cab953dfdd4709f1004fc5eb7a1b11db107a36c24f664e7faafd7afdb6cc48a35e858db6ea8fd7c945b2b3d8eab6facddcb5baf85245c' '980d082b1f2cef0f518c5a8257b9862a19bc9980136adf434b5de3313a2db6aa5e44f3ed0ddd05994208cf4d03114f04f8846d010cfab7e5a161597e5d73318a' '0afc455e7865c45633d90c3512106f965649ff796646683e3d24d925962d8cd11259dc537fd1bab878696ba97582f4768991a07a1122739f162263ed40221aba' '51b76e947f40d78e61ded13ae617b493d4b07df5d206b6c829dd4edd0f1a1b30cb79e908c11191e268901a0b4845e5e5c6de4b601752c1035208d15da5e5dec4' 'a8588a71a2e80a365aae01cdffa3abd016942b06ed75a000fd42306c1cde6b1920f0a692302043d9f485c4c8f13c280643ed4087adc6a380aa183cceafedaf10' '50bec19e317eecf7df2a47037bcdfb9f6c3f84290d8bb28814b868ddf4602d0039796255f90f6afe1ff9cd5c4fcf4df191b79a684ff3e7bd609e2ae481a4a92c' '5bea1b442207bf4c73c2c31cb2ec1efe8adca99f65fc29101def62cb1f277e790dcad0273740bd1107eaec7b6f979c8214f3abe49b32e4a4657ec2039561fb2e' 'd603208058b630ede4f1bee32bee59e2918cf0b3213d5dce5e127aa650f4d290a3ab0fc1c3898cf97815b261989fbe814a0aff8c3d6a2f89bb2e36dd7055cd03' '1a0722fdc8e1bd68cb6c1c6a97ec9a9a8e0cf57623bdf0e0d7612b61476abbe9c08b232e0f95c0d2f865eb4ee5cf9882b4ca7ccfcc71e7a6da6bd8b600b606f1' '3c564b43a967314c49deb6d48169eb926b98e9b1d7b0c020bfb45b1d44844af493753e96eef62a9d42fe409c0e3fee5db2d00273255e1361735394910b591801' '966d135233ffc519d3dea9328b61f798836916fe539911d12d0f48120ac43f51da8709623ab717bf4080c05db9aec5fceca9ad0e0c794519a4990fc60ec975a2' 'd398318cd157ddecfd68d50f3b6ac24d61c89e2b17019727a27f0f3001d1fe1019a2a76273a8da05dfae965a9ce931d97a3d28607ed927da0b03302df421e085' '91f5ba61496ec8ea29a7ff2c24b26c61009bc551efab42c7ab20adede788b0f0628c38b32b1f8fe55284dbaff1c944179a0a71859316c17f3e4dcaaa6c4846b0' 'fc2f6fbc31bd8857c0005705b3c6d535da6a0e5ea8fdec9d389398d5f86632777e3133fb6c95126d413dddc71554f7943b530f835dae5feba054307ac63e11fe' 'd973dbb742b72f5f5f8c308b6e0f5a60c683a18753735f2321cfc1b3dfd96c87efa2a652f6dd8b8db6fdb9cc4e9b411a4135d9b358370df1312ae393cd077668' 'a8a7839cec0274a1b96cdba5dd1d909ca1983be291bad638749028f0b920d77c5bfd75d53a5aec48f8e5be351cba1e7935cc76489197df3705296539ff4aa325' 'a4453f43848e523280c4b73bfa4cb8533a76ea5a80bac053ac4c2bd3f9a7aaae3028aaf2dfe8cb502c6b3ec0fc29c01a70083e4585528afefc83a7f227854026' 'de3c8067459b39812b0770a4817266db4ab913e6bab68ec4a26b2fe570981df227346938affa41160f7ffdbb8f2e91f8c0fcf0ffa5011cb55fab670febbdc1ec' 'a0fb399e6c78b8ea312fe5a74b44dba37dd9476c2469f8f4b2c2630b1ab61e5f3e6c7baca123db8328f73befcc1e8360be40f9f2e85b70f09df4c66d1e308c9b' 'dad1ff486dd16597de3cffa165669a16871ec99b456987d55a4d5e7ff049b2a0420e46e1c88a6ac72b9967bb5f9d4b8edb60902240a13f35ed86d1aedc538731' 'a07dc2d40477c4f761c3d3b0714b65b8004b34a288bdb87f88e869616b6def5d7e16b498f7a5645efd5abc8be20aa2eccb88a4dec4d219dd91571c0cbe4f8bca' '1b92d75781c605dfb6412c8867446f5c68d2f523cbcfddbd50f443730dac7cebbcc214cc08d9adfd6ce3cdd338f2eac473b3187ab6bbaf388c9de4ee3bb5c176' '7fce68b00875123fb36a32ec4d944c63674b554229d94d6c6fac1af34a227004ac2ffe6de7305afc3d216c16cfd208a899c21b1b4ef50cef8d72d036b08ff741' '114eef8c874301c01e41ce9a421cad2e47eeadc0ca1317e3ead0638802b695aa34426b8a9c2ec25d8481ee1a34d795d7058195044daaf7ee464b27b6cf6229d3' 'abe10c64c455ed5d7bc23b522ff2a900f016f8ef298bf039317baa69d36b16c16c3dda8d15176eb3b547727a9ebcf8a74cab9fc7b58a97f5964655d65213940d' '5d852a8225dbb2ffecdb9421097b4079df451522ca298931c140c729fc5750854d8d59a84946274c41cc2d5d01fad970aaee02fade39895d9a07866607324317' '0e4c43cf0e9cd6a4002c089e46566877ed752a29733773fc3a42ea67fc9301d1d0d4f5ea3f5b20ccd82a69eff5640448584e720ba24c49aa6de5eed88c92bc06' 'f061b6143063e6454982a92f6702c78a94c4a65a9c39ccb98a11f7c032e84dd5d9aaba29aa0c786343e268e0d819b095ae588af1fda4340cb09d0dc2d22932b5' '4690d988b0f1b0f6dbea4c24cc127a8200bad792706474498d0915433280866355f035af67734073f9931edf8de368d4716a97c1c367bf7c8e2fc6d566305721' '2263c8673734cf432e608c02a3272b8e620cef02dfa758277ba9cc435f3bad5bff9a6e343aa441eeac62e61a8c6e02fc4a2f8d692f0b886eb27aaaa2581da523' 'bb892968d299aaba6c4f3128fb64bc09ec5b4868fd152cd32ae27961d54a6a94c79f79471370fbede0566a1ab617a99570dcaad3487ebb1c03b4f13a40cf680a' '64f6401bf26e690cdc297b4a3ef3c4db65353e531dcb199a8266036dcc54e0944ae6ab83c8597c01b0ca9d3d840a25fa8feb5574e091896d1e0166a1d97d8798' '1873535c281684c09c6b11a591d593a66d04861bc358c27fc6fd9fc9f47e2f789ca07ac0464fd0f1831e5ed747184e58b59fd37a4882af9f4ed01b719ff8997f' 'a60026790ebaca7525f378e6fe0225c352e88b796582b60722858458f95c86621059255d2d572f07d15e1d23ef057ea0a9ed54ea20dae601dd69bed23b0cf04d') # vim:set sw=2 et: