mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
- Replace WITH_(PERL|PHP|...) with PORT_OPTIONS:M
- Replace USE_APACHE with USE_APACHE_RUN PR: 171468 Submitted by: ohauer@
This commit is contained in:
parent
3385e6ed93
commit
51537d65ab
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=303968
@ -42,6 +42,25 @@ MAPSERV_DESC= Mapserv cgi interface support
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MMAPSERV}
|
||||
USE_APACHE_RUN= 22+
|
||||
PLIST_SUB+= MAPSERV=""
|
||||
PLIST_DIRSTRY= www/cgi-bin
|
||||
.else
|
||||
PLIST_SUB+= MAPSERV="@comment "
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MPYTHON}
|
||||
USE_PYTHON= 2.6
|
||||
PLIST_SUB+= PYTHON=""
|
||||
MAP_EGG= MapScript-${PORTVERSION}-${PYTHON_VERSION:S/thon//}
|
||||
PLIST_SUB+= MAP_EGG=${MAP_EGG}
|
||||
.else
|
||||
PLIST_SUB+= PYTHON="@comment "
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MAGG}
|
||||
LIB_DEPENDS+= agg:${PORTSDIR}/graphics/agg
|
||||
CONFIGURE_ARGS+= --with-agg=${LOCALBASE} --with-freetype=${LOCALBASE}
|
||||
@ -108,26 +127,16 @@ RUN_BUILDS= ${BUILD_DEPENDS}
|
||||
CONFIGURE_ARGS+= --with-php=${LOCALBASE}/include/php/
|
||||
PHP_EXTENSION_DIR!= ${LOCALBASE}/bin/php-config --extension-dir | ${SED} -e 's,/usr/local/,,'
|
||||
PLIST_SUB+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR}
|
||||
PLIST_SUB+= WITH_PHP=""
|
||||
PLIST_SUB+= PHP=""
|
||||
.else
|
||||
PLIST_SUB+= WITH_PHP="@comment "
|
||||
PLIST_SUB+= PHP="@comment "
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MPERL}
|
||||
USE_PERL5=yes
|
||||
PLIST_SUB+= WITH_PERL=""
|
||||
PLIST_SUB+= PERL=""
|
||||
.else
|
||||
PLIST_SUB+= WITH_PERL="@comment "
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MPYTHON}
|
||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/python:${PORTSDIR}/lang/python26
|
||||
PLIST_SUB+= WITH_PYTHON=""
|
||||
.include <../../Mk/bsd.python.mk>
|
||||
MAP_EGG= MapScript-${PORTVERSION}-${PYTHON_VERSION:S/thon//}
|
||||
PLIST_SUB+= MAP_EGG=${MAP_EGG}
|
||||
.else
|
||||
PLIST_SUB+= WITH_PYTHON="@comment "
|
||||
PLIST_SUB+= PERL="@comment "
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MCURL}
|
||||
@ -135,15 +144,6 @@ LIB_DEPENDS+= curl:${PORTSDIR}/ftp/curl
|
||||
CONFIGURE_ARGS+= --with-curl=${LOCALBASE}
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MMAPSERV}
|
||||
USE_APACHE= 22+
|
||||
.include "${PORTSDIR}/Mk/bsd.apache.mk"
|
||||
PLIST_SUB+= WITH_MAPSERV=""
|
||||
PLIST_DIRSTRY= www/cgi-bin
|
||||
.else
|
||||
PLIST_SUB+= WITH_MAPSERV="@comment "
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MFASTCGI}
|
||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/cgi-fcgi:${PORTSDIR}/www/fcgi
|
||||
CONFIGURE_ARGS+= --with-fastcgi=${LOCALBASE}
|
||||
@ -156,13 +156,13 @@ CONFIGURE_ARGS+= --enable-debug
|
||||
PROG_FILES= legend scalebar shp2img shptree shptreetst shptreevis sortshp
|
||||
|
||||
post-patch:
|
||||
.if defined(WITH_MING)
|
||||
.if ${PORT_OPTIONS:MMING}
|
||||
${REINPLACE_CMD} -e 's#with_ming/include#with_ming/include/ming#g' \
|
||||
${WRKSRC}/configure
|
||||
.endif
|
||||
|
||||
post-build:
|
||||
.if defined(WITH_PERL)
|
||||
.if ${PORT_OPTIONS:MPERL}
|
||||
(cd ${WRKSRC}/mapscript/perl && ${PERL5} Makefile.PL && make)
|
||||
.endif
|
||||
|
||||
@ -171,27 +171,27 @@ do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin
|
||||
.endfor
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/shp2mysql.pl ${PREFIX}/bin/shp2mysql
|
||||
.if defined(WITH_MAPSERV)
|
||||
.if ${PORT_OPTIONS:MMAPSERV}
|
||||
${MKDIR} ${LOCALBASE}/www/cgi-bin/
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/mapserv ${LOCALBASE}/www/cgi-bin/mapserv
|
||||
.endif
|
||||
|
||||
.if defined(WITH_PHP)
|
||||
.if ${PORT_OPTIONS:MPHP}
|
||||
@${MKDIR} ${LOCALBASE}/${PHP_EXTENSION_DIR}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/mapscript/php/php_mapscript.so ${LOCALBASE}/${PHP_EXTENSION_DIR}/
|
||||
.endif
|
||||
|
||||
.if defined(WITH_PERL)
|
||||
.if ${PORT_OPTIONS:MPERL}
|
||||
(cd ${WRKSRC}/mapscript/perl && make install)
|
||||
.endif
|
||||
|
||||
.if defined(WITH_PYTHON)
|
||||
.if ${PORT_OPTIONS:MPYTHON}
|
||||
(cd ${WRKSRC}/mapscript/python && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py install)
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
.if defined(WITH_PHP)
|
||||
.if ${PORT_OPTIONS:MPHP}
|
||||
@${ECHO_MSG} "Please add the line extension=php_mapscript.so to ${LOCALBASE}/etc/php/extensions.ini"
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -6,17 +6,17 @@ bin/shptree
|
||||
bin/shptreetst
|
||||
bin/shptreevis
|
||||
bin/sortshp
|
||||
%%WITH_MAPSERV%%www/cgi-bin/mapserv
|
||||
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/mapscript/mapscript.so
|
||||
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/mapscript/mapscript.bs
|
||||
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/mapscript/.packlist
|
||||
%%WITH_PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/mapscript.pm
|
||||
%%WITH_PERL%%lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/perllocal.pod
|
||||
%%WITH_PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/mapscript
|
||||
%%WITH_PHP%%%%PHP_EXTENSION_DIR%%/php_mapscript.so
|
||||
%%WITH_PHP%%@dirrmtry %%PHP_EXTENSION_DIR%%
|
||||
%%WITH_PHP%%@dirrmtry etc/php
|
||||
%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/mapscript.py
|
||||
%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/mapscript.pyc
|
||||
%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/_mapscript.so
|
||||
%%WITH_PYTHON%%%%PYTHON_SITELIBDIR%%/%%MAP_EGG%%.egg-info
|
||||
%%MAPSERV%%www/cgi-bin/mapserv
|
||||
%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/mapscript/mapscript.so
|
||||
%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/mapscript/mapscript.bs
|
||||
%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/mapscript/.packlist
|
||||
%%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/mapscript.pm
|
||||
%%PERL%%lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/perllocal.pod
|
||||
%%PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/mapscript
|
||||
%%PHP%%%%PHP_EXTENSION_DIR%%/php_mapscript.so
|
||||
%%PHP%%@dirrmtry %%PHP_EXTENSION_DIR%%
|
||||
%%PHP%%@dirrmtry etc/php
|
||||
%%PYTHON%%%%PYTHON_SITELIBDIR%%/mapscript.py
|
||||
%%PYTHON%%%%PYTHON_SITELIBDIR%%/mapscript.pyc
|
||||
%%PYTHON%%%%PYTHON_SITELIBDIR%%/_mapscript.so
|
||||
%%PYTHON%%%%PYTHON_SITELIBDIR%%/%%MAP_EGG%%.egg-info
|
||||
|
Loading…
Reference in New Issue
Block a user