pkgsrc/misc/openoffice/files/soffice
mrauch 92ed427cab Add the pkgsrc library path to LD_LIBRARY_PATH so shared libraries from
other packages which are loaded during runtime via dlopen() can be found.
This is necessary for fixing PR pkg/30473.
2005-10-03 15:53:34 +00:00

57 lines
1.6 KiB
Bash
Executable file

#!/bin/sh
#
# $NetBSD: soffice,v 1.6 2005/10/03 15:53:34 mrauch Exp $
#
SOINST=@@PREFIX@@/@@OPENOFFICE_VERSION@@
[ "$SOFFICE" = "" ] && SOFFICE=$HOME/@@OPENOFFICE_VERSION@@
if [ ! -d "$SOFFICE" ]; then
echo ""
echo "-----------------------------------------------------------------"
echo " OpenOffice has not yet been set up for `whoami`."
echo " Starting setup ... "
echo ""
echo " (If OpenOffice has already been set up for `whoami` or you"
echo " want to install it someplace other than $SOFFICE"
echo " please abort the installation procedure now, set the \$SOFFICE "
echo " environment variable accordingly and rerun $0.)"
echo "-----------------------------------------------------------------"
echo ""
cd $SOINST
BASENAME=`basename $0`
TMPFILE=`mktemp -q /tmp/$BASENAME.XXXXXX`
if [ $? -ne 0 ]; then
echo "$0: Can't create temp file, exiting..."
exit 1
fi
cat << EOF >> ${TMPFILE}
[ENVIRONMENT]
INSTALLATIONMODE=INSTALL_WORKSTATION
INSTALLATIONTYPE=WORKSTATION
DESTINATIONPATH=$SOFFICE
OUTERPATH=
LOGFILE=
EOF
./setup -nogui -r:${TMPFILE}
rm -f ${TMPFILE}
echo ""
echo "Done. Starting OpenOffice ..."
echo ""
fi
# We've got a large number of shared libraries and other single files which
# have to be open for normal operation
ulimit -n `ulimit -n -H`
if [ -z $PTHREAD_DIAGASSERT ]; then
PTHREAD_DIAGASSERT=AEL
export PTHREAD_DIAGASSERT
fi
# Let the standard pkgsrc libraries be found by dlopen()
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:@@PREFIX@@/lib
export LD_LIBRARY_PATH
exec ${SOFFICE}/soffice "$@"