Files
ports/lang/ruby16-shim-ruby18/pkg-install
T
Akinori MUSHA 2930c5c821 Add ruby16-shim-ruby18, version 1.7.2.2002.05.21.
Ruby Shim is a set of modules that provide the libraries and the
additional features that will appear in the next version of Ruby.

Shim between 1.6 and 1.8 includes:

	features/ruby18	Hooks to support ruby 1.8 extensions
	dl		Interface to dynamic linker
	racc-runtime	Racc runtime module
	stringio	IO interface for String
	strscan		Fast string scanner
	benchmark	Benchmark module
	fileutils	File & directory manipulation
	pp		Pretty printer (prettier version of `p')
	tsort		Topological sorter

Accordingly, this port obsoletes and replaces the following ports:

	devel/ruby-dl
	devel/ruby-fileutils
	devel/ruby-fnmatch
	devel/ruby-racc-runtime
	devel/ruby-strscan

They will be automatically deinstalled during the installation process
of this port.
2002-06-08 17:24:56 +00:00

54 lines
809 B
Bash

#!/bin/sh
#
# $FreeBSD$
PKGNAME=$1
PKG_DBDIR=${PKG_DBDIR:-/var/db/pkg}
die () {
echo $* >&2
exit 1
}
delete_modules () {
modules="
dl
fileutils
fnmatch
racc-runtime
strscan
"
echo "Deinstalling modules being replaced by $PKGNAME..."
cd $PKG_DBDIR || die "$PKG_DBDIR is not found"
for portname in $modules; do
for pkg in $RUBY_PKGNAMEPREFIX$portname-*; do
if [ -d $pkg ]; then
echo "---> $pkg"
/usr/sbin/pkg_delete -f $pkg
fi
done
done
}
RUBY_PKGNAMEPREFIX=$(expr "$PKGNAME" : '\([^-]*-\)')
if [ -z $RUBY_PKGNAMEPREFIX ]; then
die "Cannot determine RUBY_PKGNAMEPREFIX from '$PKGNAME'."
fi
case $2 in
PRE-INSTALL)
delete_modules
;;
POST-INSTALL)
;;
*)
die "usage: sh $0 \$PKGNAME { PRE-INSTALL | POST-INSTALL }"
;;
esac
exit 0