2005-10-25 18:01:13 +00:00
|
|
|
source $stdenv/setup
|
|
|
|
|
2007-09-05 13:56:12 +00:00
|
|
|
export nodep=TRUE
|
|
|
|
export NO_HIDS=TRUE
|
2007-07-18 16:45:07 +00:00
|
|
|
|
2007-09-05 13:56:12 +00:00
|
|
|
export PATH=$icu/sbin:$PATH
|
2007-07-18 16:45:07 +00:00
|
|
|
|
2009-04-20 13:50:07 +00:00
|
|
|
postUnpack() {
|
|
|
|
tar xvjf $src_system
|
|
|
|
}
|
|
|
|
|
2007-09-05 13:56:12 +00:00
|
|
|
preConfigure() {
|
2010-04-06 21:46:52 +00:00
|
|
|
./configure --help
|
|
|
|
|
2007-09-07 07:08:20 +00:00
|
|
|
for i in sysui/desktop/share/makefile.mk; do
|
2007-09-06 15:00:33 +00:00
|
|
|
substituteInPlace $i --replace /bin/bash $shell
|
2007-09-05 13:56:12 +00:00
|
|
|
done
|
|
|
|
|
2007-09-06 15:00:33 +00:00
|
|
|
SRCDIR=
|
|
|
|
|
2007-12-21 16:39:22 +00:00
|
|
|
sed -e '/CURL_NO_OLDIES/d' -i ucb/source/ucp/ftp/makefile.mk
|
2005-10-25 18:01:13 +00:00
|
|
|
}
|
|
|
|
|
2007-09-07 07:08:20 +00:00
|
|
|
postConfigure() {
|
2008-07-08 08:28:07 +00:00
|
|
|
for i in LinuxX86*Env.Set; do
|
2007-09-07 07:08:20 +00:00
|
|
|
substituteInPlace $i --replace /usr /no-such-path
|
|
|
|
done
|
|
|
|
substituteInPlace solenv/inc/libs.mk \
|
|
|
|
--replace /usr/lib/libjpeg.so $libjpeg/lib/libjpeg.so \
|
|
|
|
--replace /usr/lib64/libjpeg.so $libjpeg/lib/libjpeg.so
|
|
|
|
}
|
2005-10-26 20:42:12 +00:00
|
|
|
|
|
|
|
buildPhase() {
|
2008-07-08 08:28:07 +00:00
|
|
|
source LinuxX86*Env.Set.sh
|
2007-09-06 15:00:33 +00:00
|
|
|
./bootstrap
|
2010-05-19 16:46:48 +00:00
|
|
|
# bootstrap defines the alias 'build', that mostly runs this perl script:
|
|
|
|
(cd instsetoo_native; perl ../solenv/bin/build.pl --all) # wait a few hours... add -P4 for quadcores
|
2007-09-06 15:00:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
wrapSOffice() {
|
|
|
|
local fn=$1
|
|
|
|
local arg=$2
|
|
|
|
|
|
|
|
# !!! should use makeWrapper for this.
|
2007-09-05 13:56:12 +00:00
|
|
|
|
2007-09-06 15:00:33 +00:00
|
|
|
cat > $out/bin/$fn <<EOF
|
|
|
|
#! $shell
|
|
|
|
# Add fontconfig to the library search path; apparently OpenOffice
|
|
|
|
# looks for it at runtime.
|
2007-09-10 14:03:01 +00:00
|
|
|
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH\${LD_LIBRARY_PATH:+:}$fontconfig/lib:$libjpeg/lib:$cups/lib
|
|
|
|
export JAVA_HOME=$jdk
|
2009-04-20 13:50:07 +00:00
|
|
|
exec $ooFiles/openoffice.org3/program/soffice $arg "\$@"
|
2007-09-06 15:00:33 +00:00
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/$fn
|
2005-10-26 20:42:12 +00:00
|
|
|
}
|
|
|
|
|
2007-09-06 15:00:33 +00:00
|
|
|
installPhase() {
|
|
|
|
ooFiles=$out/lib/openoffice
|
|
|
|
|
|
|
|
# This was all borrowed from ooo-build-2.2.1's bin/ooinstall.
|
2010-05-19 16:46:48 +00:00
|
|
|
# This needs the ./bootstrap having run in the buildPhase to get some env vars.
|
2007-09-06 15:00:33 +00:00
|
|
|
eval $(grep 'BUILD\|LAST_MINOR' $SOLARENV/inc/minor.mk)
|
|
|
|
export PYTHONPATH=$SOLARVERSION/$INPATH/lib:$SRC_ROOT/instsetoo_native/$INPATH/bin:$PYTHONPATH
|
|
|
|
export OUT=../$INPATH
|
|
|
|
export LOCAL_OUT=../$INPATH
|
|
|
|
export LOCAL_COMMON_OUT=../$INPATH
|
|
|
|
|
|
|
|
# Do the actual installation into $out.
|
|
|
|
(cd $SRC_ROOT/instsetoo_native/util && perl -w $SOLARENV/bin/make_installer.pl \
|
|
|
|
-f openoffice.lst -l en-US -p OpenOffice \
|
|
|
|
-buildid $BUILD -simple $ooFiles)
|
|
|
|
|
|
|
|
ensureDir $out/bin
|
|
|
|
for i in soffice ooffice; do wrapSOffice $i; done
|
|
|
|
|
|
|
|
# Create some wrappers to start individual OpenOffice components.
|
|
|
|
for i in writer calc draw impress base math web; do wrapSOffice oo$i -$i; done
|
2009-05-12 19:08:02 +00:00
|
|
|
|
|
|
|
# Create symlinks to desktop files, so that openoffice.org apps can be picked from
|
|
|
|
# the application menu in KDE and GNOME
|
|
|
|
ensureDir $out/share
|
|
|
|
ln -s $out/lib/openoffice/openoffice.org3/share/xdg $out/share/applications
|
2009-10-15 20:48:58 +00:00
|
|
|
|
|
|
|
# Apply a minor correction to the *.desktop files in order to correctly address the icons
|
|
|
|
# The openoffice- prefix should be removed from the icon identifiers
|
2009-10-16 08:56:35 +00:00
|
|
|
for appl in $out/share/applications/*.desktop
|
2009-10-15 20:48:58 +00:00
|
|
|
do
|
2009-10-16 12:16:17 +00:00
|
|
|
chmod 644 $appl # What's wrong with the file permissions?
|
2009-10-15 20:48:58 +00:00
|
|
|
sed -i '/Icon/d' $appl
|
2009-10-16 15:31:31 +00:00
|
|
|
echo "Icon=$(echo $(basename $appl) | sed 's/.desktop//')" >> $appl
|
2009-10-15 20:48:58 +00:00
|
|
|
done
|
2009-05-13 09:44:26 +00:00
|
|
|
|
2009-10-15 09:56:40 +00:00
|
|
|
# Copy icons so that the menu items in KDE and GNOME will look much nicer
|
2009-10-15 13:00:43 +00:00
|
|
|
(cd $SRC_ROOT/sysui/desktop/icons
|
2009-10-15 09:56:40 +00:00
|
|
|
install -v -d $out/share/icons/{hicolor,locolor} -m 755
|
|
|
|
cp -rv hicolor/*x* $out/share/icons/hicolor
|
|
|
|
cp -rv locolor/*x* $out/share/icons/locolor
|
|
|
|
)
|
2009-10-15 20:48:58 +00:00
|
|
|
|
2009-05-13 09:44:26 +00:00
|
|
|
# The desktop files expect a openoffice.org3 executable in the PATH, which is a symlink to soffice
|
|
|
|
ln -s $out/bin/soffice $out/bin/openoffice.org3
|
2007-09-06 15:00:33 +00:00
|
|
|
}
|
|
|
|
|
2005-10-25 18:01:13 +00:00
|
|
|
genericBuild
|
2007-09-06 15:57:34 +00:00
|
|
|
|