diff options
Diffstat (limited to 'graphics/php-gdal/Makefile')
-rw-r--r-- | graphics/php-gdal/Makefile | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/graphics/php-gdal/Makefile b/graphics/php-gdal/Makefile new file mode 100644 index 000000000000..2eb05db51b26 --- /dev/null +++ b/graphics/php-gdal/Makefile @@ -0,0 +1,51 @@ +# New ports collection makefile for: php-gdal +# Date created: 2012-03-06 +# Whom: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= gdal +PORTVERSION= 1.9.1 +CATEGORIES= graphics +MASTER_SITES= http://download.osgeo.org/gdal/ \ + ftp://ftp.remotesensing.org/pub/gdal/ \ + LOCAL/sunpoet +PKGNAMEPREFIX= php- + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= PHP binding for GDAL + +BUILD_DEPENDS= ${LOCALBASE}/bin/swig:${PORTSDIR}/devel/swig13 +LIB_DEPENDS= gdal:${PORTSDIR}/graphics/gdal + +ALL_TARGET= php_gdal.so php_gdalconst.so php_ogr.so php_osr.so +CFLAGS+= -I${LOCALBASE}/include -fPIC +DEFAULT_PHP_VER=53 +IGNORE_WITH_PHP=5 +LIBTOOLFILES= # empty +MAKEFILE= GNUmakefile +PHP_MOD_NAME= php_${PORTNAME} +USE_AUTOTOOLS= libtool +USE_GMAKE= yes +USE_PHP= yes +USE_PHP_BUILD= yes +WRKSRC= ${WRKDIR}/${DISTNAME}/swig/php + +post-patch: + @${REINPLACE_CMD} -e 's|^CC=.*$$|CC=${CC}|; s|^CXX=.*$$|CXX=${CXX}|; s|^CFLAGS=.*$$|CFLAGS=${CFLAGS}|' ${WRKSRC}/${MAKEFILE} + +do-configure: + @${DO_NADA} + +# include/cpl_config.h will exist after build phase +pre-build: + ${SED} -e '/^GDAL_ROOT/d' ${DATADIR}/GDALmake.opt > ${WRKSRC}/../../GDALmake.opt + ${CP} ${LOCALBASE}/include/cpl_config.h ${WRKSRC}/../../port/ + +do-install: + ${MKDIR} ${PREFIX}/lib/php/${PHP_EXT_DIR}/ ${PREFIX}/include/php/ext/${PORTNAME}/ + ${INSTALL_LIB} ${WRKSRC}/*.so ${PREFIX}/lib/php/${PHP_EXT_DIR}/ + ${INSTALL_DATA} ${WRKSRC}/*.h ${PREFIX}/include/php/ext/${PORTNAME}/ + +.include <bsd.port.mk> |