You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
123 lines
3.7 KiB
123 lines
3.7 KiB
# --- SDE-COPYRIGHT-NOTE-BEGIN --- |
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
# |
|
# Filename: package/.../seamonkey/mozilla-conf.in |
|
# Copyright (C) 2006 - 2010 The OpenSDE Project |
|
# Copyright (C) 2004 - 2006 The T2 SDE Project |
|
# Copyright (C) 1998 - 2004 Clifford Wolf |
|
# |
|
# 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 as published by |
|
# the Free Software Foundation; version 2 of the License. A copy of the |
|
# GNU General Public License can be found in the file COPYING. |
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
# default prefix for mozilla derivatives |
|
mozilla_prefix=opt/mozilla.org |
|
[ -n "$mozver" ] || mozver="$ver" |
|
|
|
# set default homepage and distribution |
|
mozilla_branding() { |
|
local distro="OpenSDE $sdever" |
|
local startpage=http://www.opensde.org/ |
|
|
|
# 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 | 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 |
|
# sh |
|
# Build configuration script |
|
# Options for client.mk. |
|
# mk_add_options MOZ_MAKE_FLAGS=-j4 |
|
|
|
# Options for 'configure' (same as command-line options). |
|
ac_add_options --prefix=$root/$prefix |
|
ac_add_options --libdir=$root$libdir |
|
ac_add_options --sysconfdir=$root/etc/$pkg |
|
ac_add_options --localstatedir=$root/var |
|
ac_add_options --enable-default-mozilla-five-home |
|
ac_add_options --with-default-mozilla-five-home=$root$libdir/$pkg-$mozver |
|
ac_add_options --host=$arch_target |
|
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 |
|
ac_add_options --disable-pedantic |
|
ac_add_options --enable-xft |
|
ac_add_options --enable-default-toolkit=gtk2 |
|
ac_add_options --with-system-zlib |
|
ac_add_options --with-system-jpeg |
|
ac_add_options --with-system-png |
|
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 |
|
|
|
# this is needed due to a bug gcc 4.x |
|
# (see http://benjamin.smedbergs.us/blog/2005-10-27/gcc-40-workaround/) |
|
case $arch in |
|
x86-64|powerpc|powerpc64) # maybe more |
|
echo ac_cv_visibility_pragma=no >> .mozconfig |
|
;; |
|
esac |
|
[ $arch = powerpc64 ] && var_append GCC_WRAPPER_APPEND ' ' -mminimal-toc |
|
|
|
# exports |
|
export MOZILLA_FIVE_HOME=$libdir/$pkg-$mozver |
|
export MOZILLA_OFFICIAL=1 BUILD_OFFICIAL=1 |
|
|
|
# Mozilla's configure script don't like --docdir confopt |
|
var_remove_regex confopt ' ' "--docdir=.*" |
|
} |
|
|
|
mozilla_register() { |
|
echo "Run the component registration ..." |
|
export MOZILLA_FIVE_HOME=$libdir/$pkg-$mozver |
|
pushd $MOZILLA_FIVE_HOME |
|
[ -e ./regxpcom ] && LD_LIBRARY_PATH=. ./regxpcom |
|
[ -e ./regchrome ] && LD_LIBRARY_PATH=. ./regchrome |
|
popd |
|
} |
|
|
|
makeopt="-f client.mk build" |
|
makeinstopt="install" |
|
|
|
# generic configuration |
|
hook_add preconf 1 'mozilla_configure' |
|
|
|
# register components |
|
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
|
|
|