123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- # Template file for 'basilisk'
- pkgname=basilisk
- version=2024.02.03
- revision=1
- _UXP_version=RB_20230711
- create_wrksrc=yes
- build_wrksrc="basilisk"
- hostmakedepends="autoconf213 perl pkgconf python unzip yasm zip tar
- which"
- makedepends="libXt-devel $(vopt_if alsa alsa-lib-devel)
- $(vopt_if dbus dbus-glib-devel) $(vopt_if pulseaudio pulseaudio-devel)
- $(vopt_if xscreensaver libXScrnSaver-devel) $(vopt_if sndio sndio-devel)
- $(vopt_if jack jack-devel) $(vopt_if gtk3 gtk+3-devel gtk+-devel)"
- short_desc="Basilisk is a browser application built on the Unified XUL Platform"
- maintainer="MarcoAPC <marcoaureliopc@gmail.com>"
- license="MPL-2.0, GPL-2.0-or-later, LGPL-2.1-or-later"
- homepage="https://www.basilisk-browser.org/"
- distfiles="https://repo.palemoon.org/Basilisk-Dev/Basilisk/archive/v${version}.tar.gz
- https://repo.palemoon.org/MoonchildProductions/UXP/archive/${_UXP_version}.tar.gz"
- checksum="dca0b2ed0192e13ca81aa0ac38651efd88df0712a73d2b8cc66d0af794bf890d
- e84c42eddba97672e17dbedddb83d6587f7860c55b418e6569881d4c3f029fc7"
- patch_args="-Np1 --directory=${build_wrksrc}"
- CFLAGS="-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64"
- CXXFLAGS="-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64"
- build_options="alsa jack dbus pulseaudio xscreensaver sndio gtk3"
- build_options_default="alsa"
- if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
- makedepends+=" libatomic-devel"
- fi
- post_extract() {
- rmdir basilisk/platform
- mv uxp basilisk/platform
- }
- post_patch() {
- if [ "$build_option_gtk3" ]; then
- patch -Np1 --directory=${build_wrksrc} -i "${FILESDIR}/no-gtk2.patch"
- fi
- }
- do_build() {
- cp "${FILESDIR}/mozconfig" ".mozconfig"
- cat <<! >>.mozconfig
- ac_add_options --enable-default-toolkit=cairo-gtk$(vopt_if gtk3 '3' '2')
- ac_add_options $(vopt_enable alsa)
- ac_add_options $(vopt_enable jack)
- ac_add_options $(vopt_enable sndio)
- ac_add_options $(vopt_enable dbus)
- ac_add_options $(vopt_enable pulseaudio)
- export MOZ_PKG_SPECIAL=gtk$(vopt_if gtk3 '3' '2')
- !
- case "$XBPS_TARGET_MACHINE" in
- *-musl)
- echo "ac_add_options --disable-jemalloc" >>.mozconfig
- echo "ac_add_options --disable-gold" >>.mozconfig
- ;;
- esac
- case "$XBPS_TARGET_MACHINE" in
- x86_64*|i686*|arm*|aarch64*)
- echo "ac_add_options --disable-elf-hack" >>.mozconfig
- ;;
- esac
- if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
- export LDFLAGS+=" -latomic"
- fi
- if [ "$CROSS_BUILD" ]; then
- export HOST_CFLAGS="${XBPS_CFLAGS}"
- export HOST_CXXFLAGS="${XBPS_CXXFLAGS}"
- export CXXFLAGS+=" ${CFLAGS}"
- export LDFLAGS+=" -L${XBPS_CROSS_BASE}/usr/lib"
- export ac_cv_sqlite_secure_delete=yes \
- ac_cv_sqlite_threadsafe=yes \
- ac_cv_sqlite_enable_fts3=yes \
- ac_cv_sqlite_dbstat_vtab=yes \
- ac_cv_sqlite_enable_unlock_notify=yes \
- ac_cv_prog_hostcxx_works=1
- echo "ac_add_options --target=${XBPS_CROSS_TRIPLET:-${XBPS_TRIPLET}}" >>.mozconfig
- echo "ac_add_options --host=${XBPS_TRIPLET}" >>.mozconfig
- else
- echo "ac_add_options --target=${XBPS_TRIPLET}" >>.mozconfig
- echo "ac_add_options --host=${XBPS_TRIPLET}" >>.mozconfig
- fi
- # work around large debug symbols on 32-bit hosts
- if [ "$XBPS_WORDSIZE" = "32" ]; then
- echo "ac_add_options --disable-debug-symbols" >>.mozconfig
- export LDFLAGS+=" -Wl,--no-keep-memory"
- fi
- if [ "$SOURCE_DATE_EPOCH" ]; then
- export MOZ_BUILD_DATE=$(date --date "@$SOURCE_DATE_EPOCH" "+%Y%m%d%H%M%S")
- fi
- export LDFLAGS+=" -Wl,-rpath=/usr/lib/basilisk"
- # increase default stack size as basilisk uses a recursive js parser
- export LDFLAGS+=" -Wl,-z,stack-size=524288"
- export MOZ_MAKE_FLAGS="${makejobs}"
- export MOZ_NOSPAM=1
- export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild"
- rm -f old-configure
- ./mach build
- }
- do_install() {
- export MOZBUILD_STATE_PATH="${wrksrc}/mozbuild"
- DESTDIR="$DESTDIR" ./mach install
- vinstall ${FILESDIR}/basilisk.desktop 644 usr/share/applications
- for i in 16 32 48; do
- vinstall basilisk/branding/unofficial/default$i.png 644 usr/share/icons/hicolor/${i}x${i}/apps basilisk.png
- done
- # We don't want the development stuff
- rm -rf ${DESTDIR}/usr/{include,lib/basilisk-devel}
- # https://bugzilla.mozilla.org/show_bug.cgi?id=658850
- ln -sf basilisk ${DESTDIR}/usr/lib/basilisk/basilisk-bin
- }
|