# 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.1 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=('0324811d3e7e6228bb45cbf01e8a4a08b8386e22d1b52eb79f9a9a3bda940eb9d534ec1230961e9a998a0162c299a1ad49d23c5fbfa8e287896bcc0fd1c398e0' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' '8c75c5851384552608ebd65986e04c1450ec74ea4b0c65032ab67ed6dfb718e9603249026b35c59d01a1531176f76a61be027de700dcd3739db60262ae6c8fb5' 'af8e216243d873de1320ce626c5af4c7cb43e32c35eedc9cd726349e6af25a695cd81e20595e5d3e8d28b64ff69467cc4a96b599364317f65d71259951afef9f' 'd00471a2c9e33673c696164e62afff6af6b1acfdbaac8edfad544e836ca5f5f460e9b0a461a88eed97da61f74867d865319a72b92373efcc93164eecad5a843a' '749f733da4ee23581e47cdf221430c3d8dfcaf4f2f344b72de8c3ff03c6d7037bfbccf4abf3ed3b7a7deda7d68aca68152aeaa8973d41eafb5206de3460b994f' '7d25be6dd72f2cb84111e69373ff8c983b0d9ac948f5d6549b780fa85c79a322a1408b4fb90cf64e310af91066d8416bb8afe2e190b8ef1fa9d29c53a0524fd8' '016a7f6ffc7fc5e935154a05b866a7f11c4fbf669a11100968630e4ec4737faeb9b835086539448c2ecfeef5b6af904f316a3a58e7de9f5fd6be588b303a2417' 'ad32a51299ac1147a4f811fcb577413f6cb340f2b0bdbcac29c5681227ea1d31dea0a7bb199d3c75df9f540c9ff23d0da5fb748c705bc21d525a754f642921bb' 'b551441b1a4421cda5e381ed87e5ab933dbf796276beb225f6af3454ee844980f307ade7629ee826077cca8f3161c3840f7972fbf90e75cc927ee312c4586c77' '9040a2b4e2d2c98643390ea10a0c51d9627ec68cf5a4e4affa456e814c8ce57372b349c2684434beb1f0766a244b1a57437bbc889587591f9f869ee5537779b0' '244fed0e995352b3f775ca53ba5a3d024f12838f9d5c0857d5f28f2349c9759ad2f7fd2a92f63e919643b367796e65f5c3bf894ef90672b5101c09562ee9aabc' '1267fd96824e3eb1dbd5944b143c3847e21fa4d1a0f0239af177c433b7afb49213a6880c739b0be15687db2a581155e1dbfee8fa322b9121506965faf5b03a87' '0921c1e1a4a1010a9341ab6f24b36b0d3acda6acb8bdd0a04c8d393deecfcced78fdc99f978765286fc03f836e0983fc001897376226b475ec6570c1370e2ff9' '9dfc1f9d3033590a59458c6dcf04d8ab5422e0be9338494324551d9d59e74f3aa6dddbc19b5371026cf3349a057c5f73511e0f471c666e3631a21d289212a50a' 'd67007973186c9913cdc2d6417289369e6d64116f8cd1e0f5ca1e1de1a577e356afbd0e7f813fe95e12732233c8e8a93a3d198bf98139ec42c4a80e21fd45da9' '38ca13727b29712aa77c0ae1616fdbc296bfcfaea364a9f5f28743578cde3914bfb4e740903469fd0aed6db0e4dca81d65ce1eb2cca405aadf76046b85d47034' '42238aab98e4fe5566349eddd93398862c5a9ab25bc739f94146722d55924b97e0fd6e93789cc0b1326d8f204f2b02dcb4b30a4906cfbc4d8e7f8e428ba5cfd1' '7982b3cdfdbab6a03c08a71ba5a3f787c87039f4bdfd577916a5b9904cf1f3fabdc7aecc6de7de299be4e7d1e224415277dabaf4d6a946d621ece9639625a5d9' 'b6bf2d4d437a25c0a607f97081646fa98b6f6ff1036097176125fe10354dfacd26dc0244d38406e2679df506a0bf976484b9f52b7fe397a6c08ee4cd2d98c384' 'a09e54f6d024d319a164ff559344b2cd6cb357843db04bb7a8261b73445f9a1ec1bf020e23a13f6ad2120cd54e7af4697115775fe43c8bfad648cbbe4cad748e' '57008efd6740f9f290d28fb833178e4511314af53303b417c8ca63a1470525523731dc79b52d7846b51e8988211479b55916c9d4996ccaf94d9367437d0b5be2' '25b86c9d406c07c557a6e1aba7707fca08e23deb4e3f92e044f1be21389cf18c2aee814d36ee55885628fbb8504a1ff0d7de903db50799022b98b5b989679f70' 'c867e1363132e0d43ecd851bfa60501e0df05b758d42056095371c0e3b6468212402428317279b8988b99b3daf9d3a66d8182da2e635466e4d05405ccbb34532' '8c78e2a472c92e84f8b65f4e0482e082373c370623a9e3c4525e28ac8bb6b265fffc4ec55759d73ecc23d314ffa2105da277da1ba4def6e0dc0ec315175a11a8' '2eca71c898d8e741737bff03b31a5405b809e21fceb62eae26f2d3b30d08f29cf6d37a251656d00784dd5e1c6709d29af677584c86126aba9407c1f824db336b' '681a736b4db7631cad39fc2d06f9c528b08e947abd634d8b83b82c150aa74f4266a8d7f6c5d6f72d5b9fab5c1fd4c1edb4eda6bc9c0f1b4102e657d350e40862' '09dfe926fa2b792003da1fd4e8c9c9294f7b9427e3277e2c53fa47309356472b9ec70ce9ee7784a4b763360533ea99004d057163b9c08076c672240e6c754a78' 'ba703ffeecbcf00bdde7083df6a7c3933e5d863bd51390d0b2293b6b7a5b382a3bfb73c73966b0c95d3c3fa50c52bc3c115cecda5da5e5297261aced2ecd202c' '219e4a2daae6727f178417b39fd49d921d2199183b805be14f6045cf9871be48f054f6d9ad0ded1bb1ebd917e4f2d8e1554c8711114169b0a8c9dad9e5df2bbd' '23f70f5c396acab885b25ebee9d4e3fdd873d9630467126fe480dd9bc4da32ea5163124638231a0301598584189657fe3862b2bfbb00ea3a6043a99a4625c839' '0aa44c4cfe8f88daf9f9877a1a120f3b04ba4ccab7b13c687faa3b704c8dc7ca73f96676d17a4dc7824fe9d6a26d374f632266d8f56443869991518bd37967a1' 'ffb82a1633a6e279bb4dfc049e0863eac98c01ea66109c56100f658006964e8c339508e8a4f20ee7903ba730c4cfe641555be92844c6c4d87f496189dda62244' '13d03fc229803df293f1a0ccf432471aa802f98cd758592e8529fb35580c2aa038d1e1bdb9f328c6f1b97562e19bf5a28f98eab3511a48dcff258c3e2b236d1c' 'dff1cdb4d5340c4bd062bcbdaeec90bb693547252f3df9e3803233f484e19c03db0b565ae4e1aed3cca8471320ee3bf1058326ea258b48056d5691f04d0bc846' 'ff5f7ee0a72fb070d51451eb447fcc4ca2f1058233ee66924674c1da287d0d19de1192a0e8a1526ec627ab936f6f82306ef99d3a6df21978b12faa867581bed4' '0f2be00dd4832b9f5aa1f8d956b857f64061b0e18fdfc1201fc8803c18d73aa47036bec458cb0d4a0289b6850ebe675a53731661221a2f4a4765bfbb250dbe8e' '90b8758121ad9067b71611531b605303316c44c1665586b57a2e4d2903aed960393051a591725a861bb1f49a0b3980102e9fc56eb22ef5a2256ae45251cfd382' '9958e8709294d7124dd82b4dac211765368227ee6b86e5073cc65de99e3393791551e23688774c6494b1fcd5d0b0fb6069a37141a13767247bcfb50e9446c6aa' 'eb44302b7f206725ca9cfd8f44095e767d22f10bb611bcbaeb5fc88b8464e2cc19abe131de63640a75aeeed4faa0d174565f354b132655cf15925577095a3745' '103c8ca18ecb86fe3ade41ecd7b452097226d81224f188d804c0e763d181393535a78e16eda0b4a867494dda3167efdc867040a58cf1a891c8f74f36b0cf36ef' '9e7ccbdd60fda9c1cd68d2d5421a54f2b08f509049862fa9b5131852af964627ffb6104092a61034e3c188c1ba9096eca7ac151b2665a15b5275e8d0990f654b' '22e5d4a3b4de206f0ba65605b9ee61febfda9f66963054041492c01ed37fa6b396213e99b6babb10d42c9256aaf2eba2fcc6b8b329c6ebba2e4ba6a973cbd594' '08ec5507c4cb9cb0c59b9a56f315f34405a3a3fcb214b2090953ea16ff932547887e8a5bea8e47b5cac458e435ff5382dd58cd9fa6f9cb33c3b09843d2a07e02' '726b0508cf721db81fd705351d618cc1a3a15c9043f2257117839c812faeb543ad32512d5f1da94a50170afa9992a42556ba88c519b0ef61312adfb4d502e5e2' '618e1e559af3473d2470936f4dc4527d903a37dff62a6dc211bc4aeb730f53f3f3d3592151a03f71101e6e073582fa189b3aabcbeae35d1a068e1e080e900c12' 'ab676bb859abc34b64e2b83e55ce341923c5892d1b9d01d0bb4b14c19127ee6566a1aed46b0b5876ada53ffb0fccd1c227f8314a294b41fda6996a830fd06e68' 'ebfc746d3d4becaddc7398199e09c59b1cce519d6c082464974ca513d32a4edf1f22db9e11c0d5eec8d31e7ba130cd34089caeb58bcd35800618352ea725b92e' 'c4957f3558262de1304af8efb8d237313cb5dee60f73ad420a91308e58de3aad63e89823b84d13fc7342693754d7181ef934504e391176422ac05547dc23b9db' '124d48fe7c9fcb335f42e3261547345d98f2ef792238d9584edaf1ab7c8da774d74704296e89fda3920d1f8295175680bf8f710f666e9d5597634e678cb01475' 'cf7c910513215212590e0ed9a832b8a95c3f60b36c30d8b4ba21d4b6004cbb6d1342764c7bd1e8e20930152b4bbe0920258af6e7c1fd1dfb1dd75eb57aa1760a' '7154dc4703c92db049fa6210a94fc0ed5e6b9d1ffc5b77e5a0d2756a1b05515fc0715814a0da8d6cf4a40986c5d6c09ac4a49bfae33494fe082e4195b6733c13' '50239f73b9d87be294d93c787a4ec1f24702c3499135fbe00b4cc4d0ead67f7e197de08964fe8484c18da30c705e26fa3d9bb44a672e37cf66070fdc10f902d0' '23670d35b4513eb9bc7921c69217e1a18a41d33d42edfa7e49685f42d4dadfd9b96a52211ccd5764ca6d6dbcb8ac3d49c7db526c7f653d332d404cc3ffb1254b' '34da7ae5873d8a42624e7799c9c0fe6de3c1431d9575b89d5a786d3fa57222c3d77f0821dfb5afd8d90ae839c96f19119742c35a19fa33f2391563e8d1ac3888' 'f4b13b296ac1cf194d03de002a2a58c7dd42020c7fca10071104dbf57a3a04993d14742b7cadaf551dd06efec9fcebb75e887a484ea469d96a2a6d3e8c6dc176' 'a666360bd476f7b525c1d53abd69879497fb01c5f5c43c76e6d4f1434c46f8e208ee431e809e1971f28705a208af7cc6cde15bbf9c78ef6d04d0a6da2addb7c6' '71066c816e2bf06df01b279c9bb855e639570bdd8a3b3ee50563dec447f9fc80bf4f2e4528cc22a108a0afcb1ed47a6d01909756d85026a3417ad675a29ff3a7' '7eb34c25346235c389f47a576fa209388ed260525759b6b2eb9415c3d6ca9d4d60987ccb01edd554742eb4db197920346a80af1a948960f78d3b2819056b20de' '017dc0ae5886e68c0268f9f3e830facbd4e8d685b76f2e2b7525b1ad9d5369f64273c7fdc94cf37adb8a3509c9476d4f601f980ec71b6e175c97244f208924b8' 'e0e9df598e7692ece712fc5fd68d375e5d226ae84be2f43ebb7d8284c652f6aabcdf87e6732f6d8cef978d3c7a7482562c271d7d48ada9c82848d3adc25120a1' 'dd6d9c0187c7b5aaecd6787b9b1db78fda535dcda75daef355397f9c1374d8be17f7f22adc2f6a96e31b66f15060b7f8ce1d0d6843c9b51da3b37d3d0664d514' '49eb6941a967b350f61939b91017d7b1d9bcb07377ea09ad63347d9d94b35cf0eea5be76f1eb56780152e810f92f4f0dca5c79ae83df68443cd727e5ca375da3' '10848d30e4740665863f9189f8ec5e96ec97310d1b7c360b83318e5f67ca537eb1b47699852884f387b58ba5127e7a95d0d77533f22b84860a207e4fd3f36038' 'efdaace7414dcc761daf96790d564aaacf05643c9a22c4539bfe44d84a8af4cc255d68f34fef5296baa858b3df0e5d5c38baa63f7ddf7325c47db3846243fe90') # vim:set sw=2 et: