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