1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/seamonkey/mozilla-conf.in
3 # Copyright (C) 2004 - 2022 The T2 SDE Project
4 # Copyright (C) 1998 - 2004 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
17 # default prefix for mozilla derivatives
18 mozilla_prefix=opt/mozilla.org
21 var_remove_regex makeopt ' ' 'AS=.*'
22 atstage cross && export DESTDIR=$root
24 arch_target=${arch_target/sparcv[0-9]-/sparc-}
26 # set default homepage and distribution
28 local distro="T2 $sdever"
29 local startpage=https://t2sde.org/startpage/
32 if [ -f xpfe/global/build.dtd.in ]; then
33 sed -i "s,0000000000,$distro," xpfe/global/build.dtd.in
37 find -name region.properties -o -name browserconfig.properties | while read f; do
38 sed -i -e "s,startup.homepage_override_url=.*,startup.homepage_override_url=$startpage," \
39 -e "s,homePageDefault=.*,homePageDefault=$startpage," \
40 -e "s,browser.startup.homepage=.*,browser.startup.homepage=$startpage," \
45 hook_add preconf 2 "mozilla_branding"
47 # default configuration for mozilla's derivatives
49 cat > .mozconfig <<-EOF
50 # Options for client.mk.
51 mk_add_options MOZ_MAKE_FLAGS=-j${SDECFG_PARALLEL_MAX:-1}
53 # Options for 'configure' (same as command-line options).
56 if atstage cross; then
57 cat <<-EOF >> .mozconfig
59 TOOLCHAIN_PREFIX=$archprefix
60 ac_add_options --target=$arch_target
61 ac_add_options --host=$arch_build
63 else cat <<-EOF >> .mozconfig
64 ac_add_options --host=$arch_target # needed?
68 cat <<-EOF >> .mozconfig
69 ac_add_options --prefix=/$prefix
70 ac_add_options --libdir=$libdir
71 #ac_add_options --sysconfdir=/etc/$pkg
72 #ac_add_options --localstatedir=/var
73 #ac_add_options --enable-default-mozilla-five-home
74 #ac_add_options --with-default-mozilla-five-home=$libdir/$pkg-$ver
75 ac_add_options --disable-debug
76 #ac_add_options --enable-optimize
77 #ac_add_options --disable-dtd-debug
78 ac_add_options --disable-tests
79 #ac_add_options --disable-logging # broken/obsolete since firefox ~42
80 #ac_add_options --disable-pedantic
81 #ac_add_options --enable-xft
82 ac_add_options --enable-default-toolkit=cairo-gtk2
83 ac_add_options --with-system-zlib
84 #ac_add_options --with-system-mng
85 #ac_add_options --enable-system-cairo
86 #ac_add_options --enable-crypto
88 #export BUILD_OFFICIAL=1
89 #export MOZILLA_OFFICIAL=1
90 #mk_add_options BUILD_OFFICIAL=1
91 #mk_add_options MOZILLA_OFFICIAL=1
94 #export MOZILLA_OFFICIAL=1 BUILD_OFFICIAL=1
96 case "`pkgprefix ver glibc`" in
97 2.3*) echo "ac_add_options --disable-jemalloc" >> .mozconfig ;;
100 [[ $arch_target = powerpc64-* ]] && var_append GCC_WRAPPER_APPEND ' ' -mminimal-toc
105 echo "Run the component registration ..."
106 export MOZILLA_FIVE_HOME=$libdir/$pkg-$moz_ver
107 pushd $MOZILLA_FIVE_HOME
108 [ -e ./regxpcom ] && LD_LIBRARY_PATH=. ./regxpcom
109 [ -e ./regchrome ] && LD_LIBRARY_PATH=. ./regchrome
114 moz_ver="`sed -n 's/MOZ_APP_VERSION *= *//p' config/autoconf.mk || true`"
115 moz_ver=${moz_ver:-$ver}
118 var_append makeopt " " "-f client.mk build"
120 # generic configuration
121 hook_add preconf 1 'mozilla_configure'
122 hook_add premake 5 'mozilla_ver'
123 hook_add postmake 5 'mozilla_register'
125 # cleanups in this fat directory are a bit expensive
129 # distribute this file only with seamonkey
130 if [ "$pkg" != "seamonkey" ]; then
131 var_append flist''del '|' ".*/aclocal/nspr\.m4"