2018-12-26 12:53:28 +01:00
|
|
|
# Description: Email client from the Mozilla project
|
|
|
|
# URL: https://www.thunderbird.net/en-US/
|
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
2022-11-13 18:26:13 +01:00
|
|
|
# Depends on: alsa-lib autoconf-2.13 cbindgen clang dbus-glib gnupg libevent libidl libnotify libvpx libwebp lld nodejs nss startup-notification unzip wasi-libc++ xorg-libxcomposite xorg-libxcursor zip
|
2018-12-26 12:53:28 +01:00
|
|
|
# Optional: sccache
|
|
|
|
|
|
|
|
name=thunderbird
|
2023-02-10 18:17:15 +01:00
|
|
|
version=102.7.2
|
2021-02-27 02:37:43 +01:00
|
|
|
release=1
|
2021-02-06 03:02:40 +01:00
|
|
|
source=(https://archive.mozilla.org/pub/thunderbird/releases/$version/source/$name-$version.source.tar.xz
|
2022-10-29 23:45:40 +02:00
|
|
|
$name.desktop)
|
|
|
|
|
2018-12-26 12:53:28 +01:00
|
|
|
build() {
|
|
|
|
cd $name-$version
|
|
|
|
|
2019-12-29 09:42:01 +01:00
|
|
|
if [ -e '/usr/bin/ccache' ]; then
|
|
|
|
export OS_CCACHE_COMPILERCHECK="$(/usr/bin/clang -dumpversion | sed -z 's/\n/ /g'; crux | cut -d' ' -f3)"
|
|
|
|
export CCACHE_COMPILERCHECK="string:$OS_CCACHE_COMPILERCHECK"
|
2020-04-12 02:42:48 +02:00
|
|
|
PATH=$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')
|
2019-12-29 09:42:01 +01:00
|
|
|
fi
|
|
|
|
|
2019-05-19 14:17:04 +02:00
|
|
|
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
|
|
|
|
mkdir "$PKGMK_SOURCE_DIR/rust" || true
|
|
|
|
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
|
2018-12-26 12:53:28 +01:00
|
|
|
|
2022-10-29 23:45:40 +02:00
|
|
|
sed -i '/ROOT_CLIP_CHAIN/d' gfx/webrender_bindings/webrender_ffi.h
|
|
|
|
|
2018-12-26 12:53:28 +01:00
|
|
|
cat <<- EOF > .mozconfig
|
|
|
|
ac_add_options --prefix=/usr
|
2021-09-29 16:18:40 +02:00
|
|
|
ac_add_options --enable-application=comm/mail
|
2018-12-26 12:53:28 +01:00
|
|
|
ac_add_options --with-system-jpeg
|
|
|
|
ac_add_options --with-system-zlib
|
|
|
|
ac_add_options --with-system-png
|
|
|
|
ac_add_options --with-system-nspr
|
|
|
|
ac_add_options --with-system-nss
|
2021-09-29 16:18:40 +02:00
|
|
|
ac_add_options --with-system-libevent
|
|
|
|
ac_add_options --with-system-libvpx
|
|
|
|
ac_add_options --with-system-webp
|
|
|
|
ac_add_options --enable-av1
|
2018-12-26 12:53:28 +01:00
|
|
|
ac_add_options --enable-system-ffi
|
|
|
|
ac_add_options --enable-system-pixman
|
2021-09-29 16:18:40 +02:00
|
|
|
ac_add_options --enable-optimize
|
2021-04-10 16:28:56 +02:00
|
|
|
ac_add_options --enable-linker=lld
|
2021-09-19 13:17:19 +02:00
|
|
|
ac_add_options --enable-lto=thin
|
2020-05-10 11:01:21 +02:00
|
|
|
ac_add_options --enable-release
|
2021-04-10 16:28:56 +02:00
|
|
|
ac_add_options --enable-rust-simd
|
2018-12-26 12:53:28 +01:00
|
|
|
ac_add_options --enable-official-branding
|
|
|
|
ac_add_options --with-distribution-id=nu.crux
|
|
|
|
ac_add_options --disable-debug
|
2021-04-10 16:28:56 +02:00
|
|
|
ac_add_options --disable-debug-symbols
|
|
|
|
ac_add_options --disable-tests
|
2018-12-26 12:53:28 +01:00
|
|
|
ac_add_options --disable-updater
|
|
|
|
ac_add_options --disable-crashreporter
|
|
|
|
ac_add_options --disable-necko-wifi
|
2021-04-10 16:28:56 +02:00
|
|
|
ac_add_options --disable-elf-hack
|
2022-10-29 23:45:40 +02:00
|
|
|
ac_add_options --without-wasm-sandboxed-libraries
|
2018-12-26 12:53:28 +01:00
|
|
|
EOF
|
|
|
|
|
2021-09-19 13:17:19 +02:00
|
|
|
# audio
|
2022-10-29 23:45:40 +02:00
|
|
|
prt-get isinst alsa-lib && echo 'ac_add_options --enable-audio-backends=alsa' >> .mozconfig
|
|
|
|
prt-get isinst pulseaudio && sed -i '/audio-backends/s/alsa/&,pulseaudio/' .mozconfig
|
|
|
|
#prt-get isinst jack && echo 'ac_add_options --enable-jack' >> .mozconfig || echo 'ac_add_options --disable-jack' >> .mozconfig
|
2021-09-19 13:17:19 +02:00
|
|
|
|
|
|
|
prt-get isinst wayland-protocols && \
|
|
|
|
echo 'ac_add_options --enable-default-toolkit=cairo-gtk3-wayland' >> .mozconfig || \
|
|
|
|
echo 'ac_add_options --enable-default-toolkit=cairo-gtk3' >> .mozconfig
|
|
|
|
|
2020-04-12 02:42:48 +02:00
|
|
|
[[ -e '/usr/bin/ccache' ]] && echo 'ac_add_options --enable-ccache' >> .mozconfig
|
|
|
|
|
2021-04-10 16:28:56 +02:00
|
|
|
export PYTHON=/usr/bin/python3
|
|
|
|
export RUSTFLAGS="$RUSTFLAGS -C debuginfo=0"
|
2019-08-30 15:29:03 +02:00
|
|
|
export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib
|
2018-12-26 12:53:28 +01:00
|
|
|
export MOZ_MAKE_FLAGS="-j ${JOBS-1}"
|
|
|
|
export MOZBUILD_STATE_PATH="$PKGMK_SOURCE_DIR/.mozbuild"
|
2021-09-19 13:17:19 +02:00
|
|
|
|
|
|
|
# Disable notification when build system has finished
|
2020-04-12 02:42:48 +02:00
|
|
|
export MOZ_NOSPAM=1
|
2018-12-26 12:53:28 +01:00
|
|
|
|
2021-09-19 13:17:19 +02:00
|
|
|
# Use system's Python environment
|
|
|
|
export MACH_USE_SYSTEM_PYTHON=1
|
|
|
|
|
|
|
|
# Show flags set at the beginning
|
|
|
|
echo "Current BINDGEN_CFLAGS:\t${BINDGEN_CFLAGS:-no value set}"
|
|
|
|
echo "Current CFLAGS:\t\t${CFLAGS:-no value set}"
|
|
|
|
echo "Current CXXFLAGS:\t\t${CXXFLAGS:-no value set}"
|
|
|
|
echo "Current LDFLAGS:\t\t${LDFLAGS:-no value set}"
|
|
|
|
echo "Current RUSTFLAGS:\t\t${RUSTFLAGS:-no value set}"
|
|
|
|
|
|
|
|
# python/mach/mach/mixin/process.py fails to detect SHELL
|
|
|
|
export SHELL='/usr/bin/bash'
|
|
|
|
|
2018-12-26 12:53:28 +01:00
|
|
|
./mach build
|
|
|
|
DESTDIR=$PKG ./mach install
|
|
|
|
|
|
|
|
install -d $PKG/usr/share/pixmaps
|
|
|
|
ln -s /usr/lib/thunderbird/chrome/icons/default/default48.png $PKG/usr/share/pixmaps/thunderbird_default48.png
|
|
|
|
install -D -m 0644 $SRC/$name.desktop $PKG/usr/share/applications/$name.desktop
|
|
|
|
|
|
|
|
find $PKG -iname '*README*' -delete
|
|
|
|
#rm -r $PKG/usr/{include,lib/thunderbird-devel,share/idl}
|
2021-02-06 04:42:26 +01:00
|
|
|
|
|
|
|
install -d $PKG/etc/revdep.d
|
|
|
|
echo "/usr/lib/thunderbird" > $PKG/etc/revdep.d/$name
|
2018-12-26 12:53:28 +01:00
|
|
|
}
|