217 lines
7.6 KiB
Bash
217 lines
7.6 KiB
Bash
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
|
|
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
|
|
# Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
|
|
# Contributor: Ionut Biru <ibiru@archlinux.org>
|
|
# Contributor: Alexander Baldeck <alexander@archlinux.org>
|
|
# Contributor: Dale Blount <dale@archlinux.org>
|
|
# Contributor: Anders Bostrom <anders.bostrom@home.se>
|
|
|
|
pkgbase=thunderbird
|
|
pkgname=(thunderbird)
|
|
pkgver=128.2.1
|
|
pkgrel=1
|
|
pkgdesc='Standalone mail and news reader from mozilla.org'
|
|
url='https://www.thunderbird.net/'
|
|
arch=(x86_64 powerpc64le riscv64)
|
|
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 mesa libpulse libice libsm
|
|
rust clang llvm cbindgen lld
|
|
gawk perl findutils libotr wasi-compiler-rt wasi-libc wasi-libc++ wasi-libc++abi
|
|
)
|
|
makedepends_powerpc64le=(nodejs)
|
|
makedepends_powerpc64=(nodejs)
|
|
makedepends_riscv64=(nodejs-lts-iron)
|
|
makedepends_x86_64=(nasm nodejs)
|
|
options=(!emptydirs !makeflags !lto)
|
|
source=(https://archive.mozilla.org/pub/thunderbird/releases/${pkgver}esr/source/thunderbird-${pkgver}esr.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
|
|
https://github.com/user-attachments/files/16571198/esrpatches.zip
|
|
)
|
|
sha256sums=('81a404aa574b1cb9355bf8ac882ddfa7c2db646a3f8388f63dbec1506f68548a'
|
|
'SKIP'
|
|
'fa11b4736bbf53ec015f71cd42b1040b22d1a855c562b76927b3f0eccb925c85'
|
|
'4a3a61e119637000c563a194283ef741959756b75edf7be84e25b4253c4288c5'
|
|
'59cab9977c3effbba33129c014e87414ea939c02be859f1f0b9d79581c8935eb'
|
|
'3390d127e5dd70a0ff60895bcb044ec4521dd528cd9d6efc27c4ba58df9cca5c'
|
|
'cc7c3ed80b8ff04d1edf97ddd977aab59fc2354526eb3835b3a91df09fa40d90'
|
|
'9a4241af157512580d85e04cc5502248680a178c75038d70ff446055c59e80e6'
|
|
'2d7e423c9590b3196f1a0ee2fdff760ae13328a75ae39cfd895b3f53f60f93c5')
|
|
validpgpkeys=(
|
|
14F26682D0916CDD81E37B6D61B7B526D98F0353 # Mozilla Software Releases <release@mozilla.com>
|
|
4360FE2109C49763186F8E21EBE41E90F6F12F6D # Mozilla Software Releases <release@mozilla.com>
|
|
)
|
|
|
|
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
|
|
# Note: These are for Arch POWER use ONLY. For your own distribution, please
|
|
# get your own set of keys.
|
|
_google_api_key=AIzaSyDgkw4O3LM0Jnr2N7Wq2NG7iUVzRU5sBaA
|
|
|
|
# Mozilla API keys (see https://location.services.mozilla.com/api)
|
|
# Note: These are for Arch POWER use ONLY. For your own distribution, please
|
|
# get your own set of keys.
|
|
_mozilla_api_key=de0473f2-d53f-46da-956c-6aff61bda3ab
|
|
|
|
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
|
|
sed -e 's|880c982df0843cbdff38b9f9c3829a2d863a224e4de2260c41c3ac69e9148ad4|239b3e4d20498f69ed5f94481ed932340bd58cb485b26c35b09517f249d20d11|' \
|
|
-i third_party/rust/bindgen/.cargo-checksum.json
|
|
|
|
# Make icon transparent
|
|
sed -i '/^<rect/d' comm/mail/branding/thunderbird/TB-symbolic.svg
|
|
|
|
printf "%s" "$_google_api_key" >google-api-key
|
|
printf "%s" "$_mozilla_api_key" >mozilla-api-key
|
|
cp ../mozconfig.cfg .mozconfig
|
|
sed "s|@PWD@|${PWD@Q}|g" -i .mozconfig
|
|
|
|
case "${CARCH}" in
|
|
powerpc64*)
|
|
# JIT enablement on powerpc64le provided for ESR by classilla
|
|
# https://github.com/chmeeedalf/gecko-dev/issues/5
|
|
patch -Np1 -i ${srcdir}/esrpatches/823087.diff
|
|
patch -Np1 -i ${srcdir}/esrpatches/823088.diff
|
|
patch -Np1 -i ${srcdir}/esrpatches/823089.diff
|
|
patch -Np1 -i ${srcdir}/esrpatches/823090.diff
|
|
patch -Np1 -i ${srcdir}/esrpatches/823091.diff
|
|
patch -Np1 -i ${srcdir}/esrpatches/823092.diff
|
|
patch -Np1 -i ${srcdir}/esrpatches/823093.diff
|
|
patch -Np1 -i ${srcdir}/esrpatches/823094.diff
|
|
|
|
echo "ac_add_options --disable-webrtc" >> .mozconfig
|
|
echo "export CC=${CHOST}-gcc" >> ../mozconfig
|
|
echo "export CXX=${CHOST}-g++" >> ../mozconfig
|
|
echo "ac_add_options --enable-optimize=\"${CXXFLAGS} -fpermissive\""
|
|
echo 'ac_add_options --enable-linker=bfd' >> ../mozconfig
|
|
echo 'ac_add_options --enable-lto=full' >> ../mozconfig
|
|
echo 'ac_add_options --without-wasm-sandboxed-libraries' >> ../mozconfig
|
|
echo 'ac_add_options --disable-sandbox' >> ../mozconfig
|
|
echo 'ac_add_options --enable-jit' >> ../mozconfig
|
|
;;
|
|
riscv64)
|
|
sed 's@.*enable-linker.*@@g' -i .mozconfig
|
|
;;
|
|
x86_64)
|
|
echo "ac_add_options --disable-elf-hack" >> .mozconfig
|
|
;;
|
|
esac
|
|
}
|
|
|
|
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}"
|
|
CFLAGS="${CFLAGS/-fexceptions/}"
|
|
CXXFLAGS="${CXXFLAGS/_FORTIFY_SOURCE=3/_FORTIFY_SOURCE=2}"
|
|
CXXFLAGS="${CXXFLAGS/-fexceptions/}"
|
|
|
|
./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" <<END
|
|
#!/bin/sh
|
|
exec /usr/lib/$pkgname/thunderbird "\$@"
|
|
END
|
|
|
|
# Replace duplicate binary with wrapper
|
|
# https://bugzilla.mozilla.org/show_bug.cgi?id=658850
|
|
ln -srf "$pkgdir/usr/bin/$pkgname" \
|
|
"$pkgdir/usr/lib/$pkgname/thunderbird-bin"
|
|
}
|
|
|
|
# vim:set sw=2 et:
|