# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/seamonkey/mozilla-conf.in # Copyright (C) 2004 - 2023 The T2 SDE Project # Copyright (C) 1998 - 2004 ROCK Linux Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- runcargo=0 # default prefix for mozilla derivatives mozilla_prefix=opt/mozilla unset AS var_remove_regex makeopt ' ' 'AS=.*' atstage cross && export DESTDIR=$root # set default homepage and distribution mozilla_branding() { local distro="T2 $sdever" local startpage=https://t2sde.org/startpage/ # set distribution if [ -f xpfe/global/build.dtd.in ]; then sed -i "s,0000000000,$distro," xpfe/global/build.dtd.in fi # set startpage find -name region.properties -o -name browserconfig.properties | while read f; do sed -i -e "s,startup.homepage_override_url=.*,startup.homepage_override_url=$startpage," \ -e "s,homePageDefault=.*,homePageDefault=$startpage," \ -e "s,browser.startup.homepage=.*,browser.startup.homepage=$startpage," \ $f done } hook_add preconf 2 "mozilla_branding" # default configuration for mozilla's derivatives mozilla_configure() { cat > .mozconfig <<-EOF # Options for client.mk. mk_add_options MOZ_MAKE_FLAGS=-j${SDECFG_PARALLEL_MAX:-1} # Options for 'configure' (same as command-line options). EOF if atstage cross; then cat <<-EOF >> .mozconfig CROSS_COMPILE=1 TOOLCHAIN_PREFIX=$archprefix ac_add_options --target=$arch_target ac_add_options --host=$arch_build EOF else cat <<-EOF >> .mozconfig ac_add_options --host=$arch_target # needed? EOF fi cat <<-EOF >> .mozconfig ac_add_options --prefix=/$prefix ac_add_options --libdir=$libdir #ac_add_options --sysconfdir=/etc/$pkg #ac_add_options --localstatedir=/var #ac_add_options --enable-default-mozilla-five-home #ac_add_options --with-default-mozilla-five-home=$libdir/$pkg-$ver ac_add_options --disable-debug #ac_add_options --enable-optimize #ac_add_options --disable-dtd-debug ac_add_options --disable-tests #ac_add_options --disable-logging # broken/obsolete since firefox ~42 #ac_add_options --disable-pedantic #ac_add_options --enable-xft ac_add_options --enable-default-toolkit=cairo-gtk2 ac_add_options --with-system-zlib #ac_add_options --with-system-mng #ac_add_options --enable-system-cairo #ac_add_options --enable-crypto #export BUILD_OFFICIAL=1 #export MOZILLA_OFFICIAL=1 #mk_add_options BUILD_OFFICIAL=1 #mk_add_options MOZILLA_OFFICIAL=1 EOF # exports #export MOZILLA_OFFICIAL=1 BUILD_OFFICIAL=1 case "`pkgprefix ver glibc`" in 2.3*) echo "ac_add_options --disable-jemalloc" >> .mozconfig ;; esac } mozilla_register() { echo "Run the component registration ..." export MOZILLA_FIVE_HOME=$libdir/$pkg-$moz_ver pushd $MOZILLA_FIVE_HOME [ -e ./regxpcom ] && LD_LIBRARY_PATH=. ./regxpcom [ -e ./regchrome ] && LD_LIBRARY_PATH=. ./regchrome popd } mozilla_ver() { moz_ver="`sed -n 's/MOZ_APP_VERSION *= *//p' config/autoconf.mk || true`" moz_ver=${moz_ver:-$ver} } var_append makeopt " " "-f client.mk build" # generic configuration hook_add prepatch 1 'mozilla_configure' hook_add premake 5 'mozilla_ver' hook_add postmake 5 'mozilla_register' # cleanups in this fat directory are a bit expensive nocvsinsrcdir=0 chownsrcdir=0 # distribute this file only with seamonkey if [ "$pkg" != "seamonkey" ]; then var_append flist''del '|' ".*/aclocal/nspr\.m4" fi