# 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.9.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=('8ff0bed6e6d7f337ebae09011a10b59343ae7a8355ed1da2d72ec0d4218010adfae78e42565e5b784df26cef4702f313dc9616ac5ca5530fb772d77bdf7f2ea4' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' '39342e9dcd988abc03600bc6a52d9e5d42f7007069b48eb901fa1e12c124374cdc18535d8e6f8b0a74a6729dbc56497a73f923f8f188da6df51206ab6b9f4783' '09d52a96edf92084029c60fc134b6b6240cfc8e7bc962b05fe8c8d55e3fb67ede84c6151b67704b3c95504e2bb9b0326a4b77e356977f68f02acfc5b6d7a8f38' 'acf20bad025d74d158e0a0b4fa16a6afacea89401a4a7ddcbc09247a275d85d6628955c7fc3b5f14e11f5f2f878901c706b0f0143e33d88bbcfef3953370c0a3' 'a9925e2e47c488b578d9f871b6174a43ff463b3f485dad9a7efced335d805a83d91cff679ea1bb9565bac193b824c24e488a66e4a146f539896afac64d3ec00a' '3c667a0fd9a192c80478c848b9825aa7fe700350d020ad47193b2175da1f75bae184b31fab87a1df2566d3e188baa4262241a43104f7bfd5ff66832e1988228c' '16295a98c0f87e53e900988e2e8e7adc8d8f7916d5dd38e323aacd759089316857d54913cdb00b197f15ff13f923fbafdf0ede9ca4c2420509abd8fd3cf6af6d' '8b77b51fc6ca52c9344d0477e0017ee8e341bd658b0001a72ec0cccf55f2d78c6a70c4448049a2e0b5e4e7e526f705ddbcf1fc11921c383f52d2d060e66ee203' '5b79d7b5fe03ac41c0088b44e10aa40b0b73c96e86cb01a14439b54d5a09b679df4c7bc5fa26538504704df1ea722c93ca249bd8536529c2d2134a4ebb515637' 'd62ff0650435d5f5f71d958ddb73f113e567420e41b979b97e089cfa4baaa4b5f3bd5cf38f64f2185e3d66f83a6f905d6cb2ce56411d0e320cc79c21d6a69104' '050c5adaab15c38559e626a698d8109a6b4d36e25c9ee7637971d79211fc2583bfde725cc186b0568bbccab5dceb3d91336d9d4e178250139e21e86b2c8a57e9' '36ec39712a9ed9cca4d6e66245edc7da7d6ca0cf752d322da1a2d56e2f420a2bc405c12adfa2f0fce8e37cb2db3298d95d1b7e9bacc893722517af09797b826a' '36dd31e1c81b6a8c1bead95f89696d9d5385b0e8a8e7c15d9c6ba00116422435cb9841b09e1a6d0d5143b35dc66df2fbcc993cde68970abeb4fa702df49255a7' '32c921bd3515cb39c05d32bc5c74b13adde30a2b755d1e08322ce93455882794e248fa2e318fa8fddb5eb8155863e98df98e4eb0782319b9d99aa19de9335212' 'a3332226d5a1c6448877b5fce7c381e9b40151ac68d449719e52850e0e0793e91cb8847ff7740e860a50abf2694de1f2b14d7d66391402c034043bd8b7c8aa6c' 'fe0536a3fff8dba411ea6b0718f973a9951db5ce9b36b13c440ae7322b5c78a3b6ec7fcda1b28103a9e3046a693db8639c331c15204cd2a9b7298ba9ed803996' '8728b3b5d52f63f112ff9cdc1b3ee820286c40997c59566f73875fb55e1f8321b1393831b4fb37a1a355de3bd1c8af2ae73f09290e778672f08fdd5e4fea4a8c' 'f90d38e1a8e2f1a1e5e823c019bbe5626299a748044645daec997623ea8e57ce4b7fe759b88819708ce31822c498cf6c913295acd6b9b75c1e895e754f0c8a34' 'e9394dfebc48b68da332cc085b23ffafbf006d0fb642f5174ab07efd305f6bbdca942bb8fc52b21ab40c24322c8f36772740ac507ed8a005076b622e1d5bb2f6' '40d9ffa06a6d233aa02523918c3c771f60ac2f0b3d6bcc07f62fcd3fa345f29697765b2dd3d82037545d59c44be9ad0bb48bcd7272f488a4bec3ec38ca88ba45' '3fc6b3c30eabf81f78550567163c8a63075c8584ae8292dfa7b1cf6028545ed340d09105f5a3d95057d3821feace71d0c9177b559e333f41ac31336f5583c4e0' '2005a61b24edef1335bdbf819e99585da1292ad201300340ef57ab988750effe3795b3312c5c211e36f15793378dd578186ccd47f7614fd51250d1336e39b514' '3e005cf0d4890d3a9a6918eb23ccb6e59d1777465e36130df8bf0b8e8beb164fb28b8f3c574a743b1501e6a4a626992787e7d1da0b1145c4a5719a3ba9a5e53d' '25641b6b830bb278a7fb30b211e50f2af952a58f2ea29e1ae0cf6b15671afb80af17dddf0d35eb1217e00050e12dcedb2dd033f9cd53554db0d66161a0ae6c7c' '3238b906e6105ee6d924c3a158cc79f3a2d32f167afe89c0e15dfde39bdadb8e682311c029985e104b1b7e1edab277eec0e05f9a4a25dbe6046d14819c68db61' 'c40da13a40c91357d11c00b19549045ed7124e84bafc0284eddacb3cd997f331dc15c04ab46128a3ea293c0d821685005ee0c789f44a9fca82b8bc3607a887c3' 'e3c3aecbe6060fc6d280b420f69612cc5019e484a486f4c74b7f8791c6f379f1ad9a7dee5fa6deded0a62b5847395ef90dd3df0acf84dbccd77a95eebb42a5b7' 'e051af792b421a75102a2a3287ee553cefe8b8754472135f542060887d9a9db2b62bce4cf722f832ecbe7b1161a14830d37e00dc05e17bec218a7415be23abd3' '14d2e05da32d8a2237740c5bbfe5215726c45057f0a96f26cb0e72f1cb47961a5e0d8a202f74b55be98738cdc2a71f2c03f3f525f4da6499dff489c3c7a209de' '8330cc6e5a42c7ebaf647b59e4ab1198c889ac5ef2b6281963c3937da34e5b15c74f82785436eb6384eed7dae94858b07e0961c4fc5ea332c8270f1964f4395d' '79ac1e3d99f98c7c983a4ff101bfe6001295cff190b43c68c9e94fb3e9d22437cfe4b56e9a288d50ef7b935b4757c72f2951a97efd1f24de59ab401c07706db9' 'fce0e5a2345d8ff858b33798817a4aa41713ff5e619f2b77db3bd1f5b8c6bdc3a3154f97ad72b4fbc39962d8640de54f7413e059a817a720f8190cf67ae22bc5' 'ca3f6fe1d2ef8ef56dbe239599572d46235edc3b5fcbc1221499724a010bde549572d35f7bb98279830ee0ea98e19af7e3b522415e60f38444a758b5f43788c3' '305638c04c89db461d2bac150a180e0f7ba80e47560c3322dd2296a071793001574108340d628b7fbd633a7366383243af4c6504a75819111f2b9665614b51a8' 'b6bd93c2711137668bc4046ed94dcc120a2564a390381cb98fb2a62aa4a8ec30b320e0d617c5e291c7f66324380201174d369a39d9689d84d191aa03d306f4cf' '845ae73f5c204a872150376e80b25c50c7b5bfbde1bb91c0b2ea13f3bf9fe1785582a1588fb3c8cd8086a35ae38e31bb73abe3342655c07b0f20a654bbfdd4ff' '4c210f96522fb6cc9cb68de46f40eeda5584c35d5103706da805980303561cc09000e08d0b71c990902d27d247d9a5f7ab75c1391113906ff196637278d96e3f' '46245284f05d2bcaeb12a1695272d2d93212393e791a72874b0e712970dd9dfbeb5c88dbd63a05296eefc402ddf85e97a5a61121b0d676030948d30ef23cfa35' '00bf226ea9bcb07321cd5e813e7652cdd8dd34021a19592b9bdbf8ed4432142549159d5a747815966bcefac98efcb9e68dd860c3a7971c84ce051abacb8942ce' 'bd5e486711ffa16fd6c1f30baf00ad37a7aa083817fa98625637169b15e1ec9607f00199b96ad715c7fddf761a5bec596efe526884fe7c6e127faad3f9a347ee' 'fc42899383233bb6e5fd67812eeb27355e8bf9c92c6fe188ee4a82ff5dd9a3cf11f1b30dfaf672e8cac302655159eaa2854a0498102f67039c783d989b6fc25c' 'b4adcab74b80d66e651c850425976aab8a1a57d2eea7d566399ce17c8e5d7e3623320b42f78057d6b776edf953f6775cdc5f1d2b459e79d7d1b64adc98d21d8c' '005d3d886d4d0cb27cea0289209b4a377428b81ffd6c1cb6a0c52d4e24e4734dde75ab7f7da1f2e3433dded7513597d25d8b5a040ffa84849119719380a494fd' '7a422cff33be79acd76219bfa7e5d66043e5970f4a75608c04b9ede4099450520398a78c21ce76eeb84f438ef1469f470732adc0e3177fe22cd4a9e5a16321fe' 'b482f0428d827eb97b72641059de7fcf04fe390cb176523a721bc95116a694db9e0efad3a4d4a651627b88d7e20114e471adf211404ee0ad53d921f5ba67c4bd' 'a1bd756c02c6aeed7e8f85907fc2ddbbe719169bb6371171c204d3642bf7fc44b87a1d8ced2572f719850ef01bcf8130a40a47d5a18b3876e87989b1218e76ee' '46186cb606e1fd2a987d07177bb52fe256ad74710d4e7284806c13bdec0b4d1531e5b1473c3ffd5de91ea2ffdc90d22fc3aacf90836a798f110e0440c71ed7e3' '0c9dc5918c60da8074d9f2c681fbb313994660b7173251901059c293414223e6fc5c8701294726c5b580fb133569b3b666d37a38ea39da9706603349c7f56e7d' '5fcff6a7b24df59a625bd5315ff24406c8301a518b99359b04976529cb38fd8a2c96bccaff10d2faf60adf3aaaa5cfaf6637ac631f65cf03b82e44c057bc5476' '2718e178be24ae6bf23a1d84ae19f2e8c92bc555cebec47a4bc0d879fa31f21ce0d71cf68b7f4dd40f01ff2fa2f87f402b7a78269653583b797a51a151987b20' '666184767135c571c6709e114e4d9d4300b2e067ca3f4b6ec83bf0e77b23815e0fe107e1fcef379911c72e2a5aba965b8f9deb11eed1c255d08d6588aa5ade8f' 'f38e5511a8d023687ffeb4dd0e99984977340e20be8feec3cea5faac18abbf990a2d4d068f99f9081279468650039f071237fd4e59de7f9dd3191f9bb5da889e' '1b827328ce77154d369cbe820e5ace0dac320ddac94240ea029ca0bdeaf79699cb4e645087e8a599e5b83b07fcef96c90f8ed7610609924b4dc225571b4e8ae9' '5b281cf07151f4146845410c223f9e8663d5576108537882a263efe794922f437069e0c03b6ab339e65b4a72dfe087bfd731797c7665231f7951fcc417a2da32' '656708c091a7c039b69844416a14c776f873b71910314c1956b94dc52674534d3db294ac67287a6c27e2f6b4955ca36429e201920b2c9db1ff0ed8467680d67f' '10964ffaa844cf76e6ce88e89de5404cf203efc3389f6137e41f0524ee54eee72947c9f96eff79c1390f887edc733954134d06f69275ded6da1f6e471be278fb' '2009eb49fede1ee13a77e9c835ba533d392a8f91215473f2f73a3e2f39d290dc66c2b74f4a7687ad5281ec50027219acfa0665f8e26a6ebd5fc88aa43709f13f' '8ae05c2d8439566dabfb6e9961a403ef27b6f29deae4a5df0db772791d8797a8fcc08f3ad8b195468da866e763c9f0acb6af4d70cf2035db5d816e0b80c4e085' '53ebdadffd8a01a73f5ba9723645ac0d6a6f727f1ebf91c73a94087f74d1d7cadf3444793610be9c13a0e5135d346a22ff585dee8f325844e0f2b693e9ae5f26' 'f003fe09f6390cd1d4ef7e6dfaa1fc1f047dfc1ebd39791c4247a88cd3786710bad58458135a9e0076a4ba2b36cc6f15278489940c424e4b1d7c9c3ae0d4ece1' '7f831a17b45cecf5e36b61d3e63cde8d25901c3287927ebd126c4e058576a372a3cdb574b9c334f7320308bf7b4c0c9de69a8e56e40969ba7cd71fb8c0d230fe' '2a54f295db3f6890976ab90e399789d8f29d6466f77e31ffb05972f20d45f2723d9b7b346734637edef097cad426bb010b40877f641c13b6b40c2b0fa21dfdf2' '9f8559e09d2fea0ee62d20cd6f0f41b31867f505d704d00395c341f3dd9cc404e9c103845e717e45fd50e1baabd0009dd37583a891edccf8129018dbe1db293e' 'a2bdd7260a52c1e3be0bec043d4d62ba2a2831f327c431da7121df987600348e97ab3cc239de5612cca1783b163d2973554db29d91a9352d31c53509374571de') # vim:set sw=2 et: