2005-10-25 20:01:13 +02:00
|
|
|
source $stdenv/setup
|
|
|
|
|
2007-09-05 15:56:12 +02:00
|
|
|
export nodep=TRUE
|
|
|
|
export NO_HIDS=TRUE
|
2007-07-18 18:45:07 +02:00
|
|
|
|
2007-09-05 15:56:12 +02:00
|
|
|
export PATH=$icu/sbin:$PATH
|
2007-07-18 18:45:07 +02:00
|
|
|
|
2009-04-20 15:50:07 +02:00
|
|
|
postUnpack() {
|
|
|
|
tar xvjf $src_system
|
|
|
|
}
|
|
|
|
|
2007-09-05 15:56:12 +02:00
|
|
|
preConfigure() {
|
2010-04-06 23:46:52 +02:00
|
|
|
./configure --help
|
|
|
|
|
2007-09-07 09:08:20 +02:00
|
|
|
for i in sysui/desktop/share/makefile.mk; do
|
2007-09-06 17:00:33 +02:00
|
|
|
substituteInPlace $i --replace /bin/bash $shell
|
2007-09-05 15:56:12 +02:00
|
|
|
done
|
|
|
|
|
2007-09-06 17:00:33 +02:00
|
|
|
SRCDIR=
|
|
|
|
|
2007-12-21 17:39:22 +01:00
|
|
|
sed -e '/CURL_NO_OLDIES/d' -i ucb/source/ucp/ftp/makefile.mk
|
2005-10-25 20:01:13 +02:00
|
|
|
}
|
|
|
|
|
2007-09-07 09:08:20 +02:00
|
|
|
postConfigure() {
|
2008-07-08 10:28:07 +02:00
|
|
|
for i in LinuxX86*Env.Set; do
|
2007-09-07 09:08:20 +02: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 22:42:12 +02:00
|
|
|
|
|
|
|
buildPhase() {
|
2008-07-08 10:28:07 +02:00
|
|
|
source LinuxX86*Env.Set.sh
|
2007-09-06 17:00:33 +02:00
|
|
|
./bootstrap
|
2010-05-19 18:46:48 +02: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 17:00:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
wrapSOffice() {
|
|
|
|
local fn=$1
|
|
|
|
local arg=$2
|
|
|
|
|
|
|
|
# !!! should use makeWrapper for this.
|
2007-09-05 15:56:12 +02:00
|
|
|
|
2007-09-06 17:00:33 +02:00
|
|
|
cat > $out/bin/$fn <<EOF
|
|
|
|
#! $shell
|
|
|
|
# Add fontconfig to the library search path; apparently OpenOffice
|
|
|
|
# looks for it at runtime.
|
2007-09-10 16:03:01 +02:00
|
|
|
export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH\${LD_LIBRARY_PATH:+:}$fontconfig/lib:$libjpeg/lib:$cups/lib
|
|
|
|
export JAVA_HOME=$jdk
|
2009-04-20 15:50:07 +02:00
|
|
|
exec $ooFiles/openoffice.org3/program/soffice $arg "\$@"
|
2007-09-06 17:00:33 +02:00
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/$fn
|
2005-10-26 22:42:12 +02:00
|
|
|
}
|
|
|
|
|
2007-09-06 17:00:33 +02:00
|
|
|
installPhase() {
|
|
|
|
ooFiles=$out/lib/openoffice
|
|
|
|
|
|
|
|
# This was all borrowed from ooo-build-2.2.1's bin/ooinstall.
|
2010-05-19 18:46:48 +02:00
|
|
|
# This needs the ./bootstrap having run in the buildPhase to get some env vars.
|
2007-09-06 17:00:33 +02: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 21:08:02 +02: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 22:48:58 +02: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 10:56:35 +02:00
|
|
|
for appl in $out/share/applications/*.desktop
|
2009-10-15 22:48:58 +02:00
|
|
|
do
|
2009-10-16 14:16:17 +02:00
|
|
|
chmod 644 $appl # What's wrong with the file permissions?
|
2009-10-15 22:48:58 +02:00
|
|
|
sed -i '/Icon/d' $appl
|
2009-10-16 17:31:31 +02:00
|
|
|
echo "Icon=$(echo $(basename $appl) | sed 's/.desktop//')" >> $appl
|
2009-10-15 22:48:58 +02:00
|
|
|
done
|
2009-05-13 11:44:26 +02:00
|
|
|
|
2009-10-15 11:56:40 +02:00
|
|
|
# Copy icons so that the menu items in KDE and GNOME will look much nicer
|
2009-10-15 15:00:43 +02:00
|
|
|
(cd $SRC_ROOT/sysui/desktop/icons
|
2009-10-15 11:56:40 +02: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 22:48:58 +02:00
|
|
|
|
2009-05-13 11:44:26 +02: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 17:00:33 +02:00
|
|
|
}
|
|
|
|
|
2005-10-25 20:01:13 +02:00
|
|
|
genericBuild
|
2007-09-06 17:57:34 +02:00
|
|
|
|