1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00
freebsd-ports/java/shujit/pkg-install
2003-02-25 13:26:06 +00:00

33 lines
621 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
[ "$2" = "POST-INSTALL" ] || exit 0
linkfile="${PKG_PREFIX}/etc/shujit-links"
:>"${linkfile}"
sed 's/[[:space:]]*#.*//' ${PKG_PREFIX}/etc/javavms | while read vm
do
case "$vm" in
*linux*)
# Linux JDKs are not supported
;;
*)
java_home="${vm%%/bin/*}"
case "$java_home" in
*jdk1.1.8*)
libdir="${java_home}/lib/i386/green_threads"
;;
*)
libdir="${java_home}/jre/lib/i386"
;;
esac
echo "Installing link in ${libdir}"
ln -fs "${PKG_PREFIX}/lib/libshujit.so" "${libdir}/libshujit.so"
echo "${libdir}/libshujit.so" >>"${linkfile}"
;;
esac
done