# $Id: Portfile 32256 2007-12-23 09:18:47Z ryandesign@macports.org $

PortSystem 1.0
name		slib-guile
version		1.0
revision	2
categories	devel
maintainers	nomaintainer
platforms	darwin
description	Wrapper port to properly set up slib and guile together
long_description	Create two symbolic links and a catalog file \
			so that guile can find the slib library files.
depends_lib	port:slib port:guile
distfiles

use_configure	no

build {}

destroot {
	system "mkdir -p ${workpath}/destroot${prefix}/share/guile"
	system "mkdir -p ${workpath}/destroot${prefix}/share/guile/`guile-config info guileversion | cut -d . -f 1-2`"
	system "ln -s ${prefix}/lib/slib ${workpath}/destroot${prefix}/share/guile/`guile-config info guileversion | cut -d . -f 1-2`/slib"
	file link -s ${workpath}/destroot${prefix}/share/guile/slib ${prefix}/lib/slib
}

post-activate {
	system "${prefix}/bin/guile -c \"(use-modules (ice-9 slib)) (require 'new-catalog)\""
}
