# 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.2 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=('e893cba882fe3fba516758b8822fa16a6c5b1f633cd2877a91357255f956be32b55ee671ab8ebc4372f116848d4fb67a2220a673c8d5f3c95952ba266d99cd67' 'SKIP' '6918c0de63deeddc6f53b9ba331390556c12e0d649cf54587dfaabb98b32d6a597b63cf02809c7c58b15501720455a724d527375a8fb9d757ccca57460320734' '5cd3ac4c94ef6dcce72fba02bc18b771a2f67906ff795e0e3d71ce7db6d8a41165bd5443908470915bdbdb98dddd9cf3f837c4ba3a36413f55ec570e6efdbb9f' 'a34dd97954f415a5ffe956ca1f10718bd164950566ceba328805c2ccbb54ed9081df07f2e063479bf932c4a443bb5b7443cca2f82eea3914465ed6e4863e0c0e' '7e43b1f25827ddae615ad43fc1e11c6ba439d6c2049477dfe60e00188a70c0a76160c59a97cc01d1fd99c476f261c7cecb57628b5be48874be7cf991c22db290' 'fffeb73e2055408c5598439b0214b3cb3bb4e53dac3090b880a55f64afcbc56ba5d32d1187829a08ef06d592513d158ced1fde2f20e2f01e967b5fbd3b2fafd4' '9897cb0ababc8e1a0001c4e1f70e0b39f5cdb9c08c69e3afd42088dfd001aa1fc6996cd83df0db1fb57ee0a80686c35c8df783108408dbe9191602cddd1e3c65' '7f614f229e81d7d31f007f426f6ee3ee97027a8b3144083a5d68a72ef539e49aad856324836252d833815fa4b7a64ff095c2b5538ddbfc2286d09c2879b59863' '600ad9ed3a73020955660c14ed81812368f78e4b8ea28c7ddb91df1f1fe9bef0026a147c7f2671153722fc896e1b8b0aec34cd98df1fb71fb4515aef94a71815' 'e691dd23e830f5e16566c51700f74620965dc31205d6363b267b1c844c5627367a57ed3a73e7fe734b03dca95e5f268ccbfb01435f3075f72740e1fc0719addc' 'dbaae714a1349e03737b519c20432ad6dcb05ea6edaabf3f6d5d0c6813a7ef093aca689afd59d7547b970359589e75f179816369d202e07353e90ca9185cc1b6' 'db82a7f673078df3ba31a70cb880732b59670c810bac5df2170e916f10c85ab7a46274858178c9175bc372b9eb687abcf2141cc13d65cb32bad7792dde798c20' '1d3d9309395f3a1bb342e0edaf2c98dafc8b8011aaffe4e79d461b7ea03237705103413ea3e66bfa9ae470c8304de1c47b478585a1cd2f8cc7e3f5b4b810f6be' 'b15b165abcc4b3d58edc461b26c75bbaa022d7f125224490b3ebc83feb61e38c7e8868890c870d8cc0fd50f7ff2c5bdf840192802f0fa5fec5aba92de5b96966' 'd3226c70c3a3bed22fe698c78d55d6fc62a8708966191bb69d08cd5a1ba7b29aa617cf32e4ac03fd0e1878900f1c46a1efd46940a2d5c41b4706d65529a223cf' '7aaa31bc1349c000c5ced3db09ab8809123bf5b5adc082a4661f565366d20000397ddff7871b211abafdd530f66405aea0b5f41fd4e040b719f623efed1ddbe2' '005e787a2d61db7c98c0f6eed3dcd175d14e0f71d88a5929d2cca43d6a02294823dff66b68bb3503fa79fd0189a026e4d0553ee75a593897884cc2226aaa5d8c' 'ab8958bcd2caa24c1c27c579bffbc9fdad16f16009f30399903f5d54d1dd69da2720c69bedf4e91581647dd4ca28e0c69e79c50fa48616e5a43db1d8e56ef07a' '7c7a0c38946a16c7e9f908fc35a5ef2c60667ffc96ba7f63b777d6f4d8662b3afda91ed5d1964934ec3238d9bf2fe85d66cf7e588a51968dee52e72f45b4c131' '0149393b43a88fe272ba797bd610586b98d1fa92e506dba37ed08d0d55fb8d56365cea4a13d9a26b5b0f5b7b47a922480c1465a4dca0364eb03e8bdd3a6781a4' 'd52ff661909a23ab800a79cf5f21623f7c8719484f7625488a1d838142bfa060330e1d339417ee6be4da5e897ac743fa1e936c03d0a1d877f7c94b0e4dfd67a6' 'e7008ed1ab0ed23ec9cc65a3efbd2b7650a59ef976690969edace15afbc24aa8c4e656b2571e3fd0c7637ef7130a8044e46ff9247b6e7c555b3f87e543602801' 'd131a765a9aa54e65658876394a3d81d5e518d69994abdb64d4168fcbed295d67356861a93d54c7f8a9838c9259cb6b1b6311c6fa16bc42e8db41dc08dda50f2' '30035e038a036adc1ea27bca250eb92504b68e289cd54a943ac85d5414ff4cf4738bb6df611cc29f08a4087dfda445c7e8c384c1fc8031c6c950f1db56ebf04e' '2a2a9551afa570159f4fee364393e672ddc0d865ac67ef7dab50fb0d95f4851eed5b90d6b9d9f32979f6f44dda5d6150c42a7a26ba662ccf50d31962cf5b3fdd' '4175f6080f48c9cebc17d3e69e946b6705009e59156ec0d27749f566a2ffdb865d959d942b2742293b0cc890140f0504c625c1a51326daa5a6d54a0e6fc3a990' '425b32e9a6c7fc2beb89e77d23a05659d2338a6046edbe1a8fedfeab053485faca19adb686382f9e8e8a819cce4a9dd2f3cbb66bc989e2a1584139d6a62ede31' 'c7d34ed79f3f92ce408ed783fe998b404db4794c62cbce4bb6da5f4a439354a58101b5604d762467232b688aa3f479af28a3aa2ce64b865b7589db6883b9b725' 'a721beaa8503bbd6a4ee817e3ed344b209f6ad7c09a4ef46eafd139602f46c22abc84f5cb521b48e539307adae0f3918ef8661d153ded97d0dd4c6853d5fcbb0' '74522c49a8e1af7f75a94808142f630c0f2f168d73ab3d6d418de5d1e0b06240817438cf6b7aa3b62040d48347a492f366f7c7034433f8ea5c8a981dcf07699c' 'ce642db97e827fe2895edf8cbc743267f1a1e1a20a5d82b89e2476bcc5fe0c77ab2cdbea6e67244082504926210519cce960260ac1bed3084dd485a3888bdd2a' '0703f3051db75096bcf018f8ed697ce31870651f11efaf4e3e230a496ca4c5826f1739cc9320a93c2246447b55a6675fabaa9d73e180aa98dda8d7cb7f21ae7b' '0a82a1bed4f78b88ac340cf4c7188c74e6f3f8c18bf64183c0e66e0b469f4f7eef41bc5bcc7e0a8af8d837a2cd9716e2a673265c757096226e4ce944a3a1223b' '902579286db2db6cc1fd6668d89b52a3deed7e047adf117744e1172aa000febb843fb4b2d56cb768e03378a47a01acd5e374e10e93f779b406451b3bc49949ff' 'bfb03dad217aee2398e0d9da3e855b54785f0ede5d5bf20d58b33f778198e3a66ae6b5e04f81e6d677d9cc5c1bdd69fab54ef81294121d4b19aaac063a93acce' 'cf10504dc07333a29096fc9b9a7dcf4cf7ecca1519b015fead5c0e9a53bf27272c18df71a0b7b267a4f2ba7d9cdc1bbd5975254386c495d896c8ff9ebd87b544' '007d757b16ac453a0fbd462a0f56b05e620d342e99d2554f6aa580cdf80e06405fa24f9374bf454806ebb0c19810c8e048fb483f54094060c2881b6f766835a2' '7dd82b24226f7acd2381417691920252e01784d7b2fe965232ab0a13679f666aee3c60adca4dcf33e81e2262441ab36e1b9b9bbd7339ecaca3eff8def53064de' '3c41d39bd0fbb3024b941303c3d983daa86a0eb7c8eeb3586c84ec1738543b72efe2df99a50b607faf21bc923d36cbcc952c7a23eff0bfaa831870e94d93135c' 'b711a445718c0da862d355e0e9c2c6363d37cb6b5f24ab50bc92569d93bcc7c9db12dea0c9ae489467cdb8ad408940b8cefeb2295eb947924a05006a57417b6e' '3b3a8f28439fa913aff16c855ac764da2ef7239eb58073232f304ca4788ec33e901baba5b17289d87c11aef8656e305c837aec8c60ab36c1b7a5b4793a541364' '7c675c3e78bf572dc01002ee6a66fbcd175fed3aebefd3beb0618694423f5af2b948382a30c9a88832329c2dd8fc09fb1dc9f7e1c9239adebb4dbe92b507837d' 'bd0819986c7066d8aa165470185da256348b48b60c99cb23ed20f8f5ec1b769d09b2799db717de174c25e5734974b1de263eee6bf6c31988cf6dd0671f981458' '02c1f357801a56575abebd2fe8bba58dc96a996671bec716560b78f223424d0f27a1218b253cc5dc8d53654b0232a89b00397e3742c71cb6df2e4379c3098543' '2d03cefe5eb1a66ffd741c6f1f9e07ea5ba31e7ad5b339cb142fa8527f745d0cbcfacf02725bd807eb5a600f39c24052d63efd78d8d857529d5f4a8ce0ce4fea' '8ca23c4573cbc9befcf12d9325e154827606b3d8859f2430c89201c6b22eb0d80d6dd7af8625396f45c35ff978331c9b892cbfe7d0567c279b29f3bc21cd21c4' '61e7488575ccdddcdac99adc2216bb6d44c02c9c6ca77dd6e5ce68e5a935b87616371b2c235d34caae41cb1dc89a47c46db150b3d66a5fb7b35d01830cdbbcc9' 'b6ec4f9bbc10937c9401addc7f716ac463ca2bb4ea85a9243b660b7fa0c947974f30f49bf8626bf7c9e1deed7b7374c619fb72340eef56d784d493ee89b46bf0' 'e8135130dada14143566e16d248d079b68c641dc7a7076a0e3acff178e3329ec0093e126dac1974ac14b14fb5f7c5bbb55d61932b8dda2028fa4200c2bc60016' 'c54385d08f6e4e13ab79a41006ec2d9ba77a1c841a3d214856de3d69230dff627e698100b0f68ff019a94ff9d819f8309127ef5bee7a5bd45eb8edc150172640' '460c4adbd09ba0a431cdae3852eef0340e39900102905d17e26ca8d95bdc017064426b235db24af07ceea1911be71ed045ecfd6de14c28984f9c44b5d9862c92' 'cb7fe2199f979e9424f1e48dccad32725f57b5debfeeb9e1fbf5b8ba14ba3ce151f460cd4fb8ed8322f798a3b5fd7f2f5b27f5a58336dd377fca82ab9e22c483' 'a9a98ca72d0881ee5e8d9238840e9b752d85ac38d3b550f64efad069faa9c667407499ca0119aa5729ccd42ec206bea3b19af71de89aa1513c877c4ba4485cbe' 'c3e01f613e65a9922d6f4b184f0e8a08cc01fce145c102cfb0d5f7521492d37b3055619677cfb658cfd7f0bb278eeb2e9b57817ed3182288b7cbfebfe3fd6776' '4b454fa4c22272b577fd2f28b6f47e5aa46bda91695209b924657d9be3b5020c9620dff7963a13ebb704e23a9e934a65c1f08c4b4e445abffa82b4aa0c6fd63b' '8ba7e41485502d514e5cdfff8ab054245c8078f38fb17309215ce3fe6107ee4c6f1f640c8b3ca43b8d3c361f5a62eaaeae7f8df4e03c7d8c0a886da5bf072e2b' 'c13ed079d18ddff232fc286fde5883b96caf6426536469bf5b826e5e23cd10ed54078c6beab9601ab1cf5996ddd455e32d3524cc83c4cb1fe246797500731499' '71fd0eebc12d2f087ffee42c42430002d85f3e77bd4d44b7978770a3f6720240dde2842704115cb7194b3eb7fd22c23e7db16b6f55439d1bc58d6e5b0aa7a740' '4fdd2e2c11c5b7f4506ce93ca54b92749664249a00f6a187402836f8373527dc31e03db2570a1dcd280736c6dad9168ce4dc2b60bf8d8e16df1fecad0aa8a1c2' 'a59e11a157a5cf38d3cc66cfede023317a151e9cdc92fa481d15892879f019a133d93f56c93535a9beb26c67f5a889c0f82bfe10deb600fa052fdaa9658b134b' '6f173fc9d3089f57126f49dd8276f43dc140f383ef97e6cb217a9b23b159edfb8590696453444a1d033357371a7b917c211caa50d3b6f4ea240968538c492a80' '83e2be9f072cb04790cec09104485248e91c83e7d5e06d26a8c8835a2eb7a6fbd2287cf8b7fa01fad7105b8ea127dd12b85eaf76d83efab6e30919e7399f1e1e' 'ac7f15e247a8cf39a81cc9f49493540388b65074442290d648761255fc8bba1f6dd0aa9e9d411d81031e364c74615b66b84296a81f3627f437a06188ee7b4ff3' '7d566a7dda06edd9b77bcfb66c1ff4bc7dd581964295970cbf043e1dafea056f387e6e538607f63773df542f087c6ac7b64f372312ca07fc55059c31de454b23' '788e1933778fed76f6c8621d63f220f8941851255240a0f7602baa2539432a4bce40b2883df1dfd785f637e70f462d2b245d0e58bd1c365b45b3542b6f7ae622' 'e2a59669629d140cc28feaf65bb283fa5573b71a01c94467d9616dad5637a3825174c8715bcda95b30d181e6a61528747ab644cc59594ef9fb54a0cc7c5b97b0' 'a99c59012427b51ffe680ac94eb19c425a46cbb05981bf15c36c34a0a6932d75dbd949d02303a5674ec4858b9041ec1637b1dfcb43aa86d2537b3dc49763d719' '3609c19f7ed6758156203feeebd3ad5e4322ee249b9ef22bc670266f9339e2488cf3f9870bcad61f4eca47be2979ef92889d5e87883bf49a29de7f1c60d2859a' '1f81d0b2f6e7e6ee5af96437ffbfba5b8a975342a619f427c7eeb335325e1ea2d776668de6dd6a0265708b122145490f22f4f0e4e6fad35b846e55c0241af13a' 'd465953a6b3c95933504fd09214f283f95b55cec3b37dc20e4c553e357b1666ddd260197ce23488641a3b20f84c0e73ca0af72b016fc2c1ee322bf2c1199ec95') # vim:set sw=2 et: