--- /Volumes/localhorst/usr/portage/sci-geosciences/mapserver/mapserver-4.10.3.ebuild 2007-09-06 05:36:46 +0400 +++ sci-geosciences/mapserver/mapserver-4.10.3.ebuild 2007-10-13 16:29:26 +0400 @@ -2,6 +2,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/mapserver-4.10.3.ebuild,v 1.2 2007/09/06 01:17:33 djay Exp $ +EAPI="prefix" + PHP_EXT_NAME="php_mapscript php_proj" RUBY_OPTIONAL="yes" @@ -12,7 +14,7 @@ SRC_URI="http://download.osgeo.org/mapserver/${P}.tar.gz" LICENSE="MIT" -KEYWORDS="~amd64 ~x86" +KEYWORDS="~amd64 ~x86 ~x86-macos" #I must check for mygis use flag availability #"mono" @@ -44,6 +46,8 @@ WEBAPP_MANUAL_SLOT=yes +GD_PREFIX=`gdlib-config --includedir|sed 's!/include!!'` + want_apache cd_script() { @@ -175,6 +179,7 @@ $(use_with flash ming)\ $(use_with java)\ $(use_with threads)\ + --with-gd=$GD_PREFIX \ ${myconf}\ || die "econf failed" @@ -200,7 +205,7 @@ if use ruby; then cd_script ruby ${step} - RUBY_ECONF="-I${D}" + RUBY_ECONF="-I${ED}" ruby_econf cp ../mapscript.i . || die "Unable to find mapscript.i" sed -e "s:ruby.h defines.h::g" -i ./Makefile @@ -250,16 +255,16 @@ for i in 4 5; do cd_script php$i ${step} uses_php$i - EXT_DIR="$(${PHPCONFIG} --extension-dir)" + EXT_DIR="$(${PHPCONFIG} --extension-dir|sed s!^$EPREFIX!!)" dodir ${EXT_DIR} - cp *.so ${D}/${EXT_DIR} || \ + cp *.so ${ED}/${EXT_DIR} || \ die "Unable to setup php5 mapscript support" done else cd_script php3 ${step} - EXT_DIR="$(${PHPCONFIG} --extension-dir)" + EXT_DIR="$(${PHPCONFIG} --extension-dir|sed s!^$EPREFIX!!)" dodir ${EXT_DIR} - cp *.so ${D}/${EXT_DIR} || \ + cp *.so ${ED}/${EXT_DIR} || \ die "Unable to setup php4 mapscript support" fi mapscript_install_examples php @@ -320,6 +325,6 @@ webapp_src_preinst chmod +x "${S}"/mapserv || die "Unable to find mapserv" - cp "${S}"/mapserv "${D}"/${MY_CGIBINDIR} || die "Unable to install mapserv" + cp "${S}"/mapserv "${ED}"/${MY_CGIBINDIR} || die "Unable to install mapserv" webapp_src_install }