Use the new facility of bsd.port.mk to be able to simplify the interaction

of USE_PHP and OPTIONS.

PR:		ports/106557
Submitted by:	ale
Hat:		portmgr
This commit is contained in:
Mark Linimon 2007-03-06 06:54:19 +00:00
parent 153a5ec176
commit be4c6448a8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=186641
38 changed files with 29 additions and 174 deletions

View File

@ -44,8 +44,6 @@ USE_PHP+= pgsql
IGNORE= needs at least one database back-end
.endif
.include "${PORTSDIR}/Mk/bsd.php.mk"
post-patch:
${FIND} ${WRKSRC} -name '*.orig' -delete

View File

@ -89,10 +89,6 @@ USE_APACHE= 1.3+
RUN_DEPENDS+= lighttpd:${PORTSDIR}/www/lighttpd
.endif
.if defined(WITH_WEB) || !defined(WITHOUT_WEB_EXP)
.include "${PORTSDIR}/Mk/bsd.php.mk"
.endif
pre-everything::
.if (!defined(WITHOUT_APACHE) || defined(WITH_LIGHTTPD)) && !(defined(WITH_WEB) || !defined(WITHOUT_WEB_EXP))
@${ECHO_CMD} "It doesn't make sense to depend on Apache or LightHTTPD if not using either web interface."

View File

@ -89,10 +89,6 @@ USE_APACHE= 1.3+
RUN_DEPENDS+= lighttpd:${PORTSDIR}/www/lighttpd
.endif
.if defined(WITH_WEB) || !defined(WITHOUT_WEB_EXP)
.include "${PORTSDIR}/Mk/bsd.php.mk"
.endif
pre-everything::
.if (!defined(WITHOUT_APACHE) || defined(WITH_LIGHTTPD)) && !(defined(WITH_WEB) || !defined(WITHOUT_WEB_EXP))
@${ECHO_CMD} "It doesn't make sense to depend on Apache or LightHTTPD if not using either web interface."

View File

@ -71,8 +71,8 @@ CONFIGURE_ARGS+= --disable-gnutls --enable-openssl
.if defined(WITH_PHP)
CONFIGURE_ARGS+= --with-php
USE_PHP= yes
USE_PHP_BUILD= yes
PLIST_SUB+= PHP=""
.include "${PORTSDIR}/Mk/bsd.php.mk"
.else
CONFIGURE_ARGS+= --without-php
PLIST_SUB+= PHP="@comment "

View File

@ -42,9 +42,6 @@ USE_PHP+= pgsql
RUN_DEPENDS+= ${LOCALBASE}/share/fpdf/fpdf.php:${PORTSDIR}/print/fpdf
.endif
# we need this because we USE_PHP after bsd.port.pre.mk is included
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-build:
@${REINPLACE_CMD} -e 's,DBlib_path = "",DBlib_path = "${ADODB_DIR}",' \
${WRKSRC}/base_conf.php.dist

View File

@ -37,15 +37,8 @@ _SQLSDIR= misc
LATEST_LINK= pear-Log
OPTIONS= PEAR_DB "PEAR::DB support" off \
PEAR_MDB2 "PEAR::MDB2 support" off
.if exists(${LOCALBASE}/etc/php.conf)
.include "${LOCALBASE}/etc/php.conf"
.endif
.if defined(PHP_VER) && ${PHP_VER} == 5
OPTIONS+= PHP_SQLITE "PHP sqlite support" off
.endif
PEAR_MDB2 "PEAR::MDB2 support" off \
PHP_SQLITE "PHP sqlite support (php5 only)" off
.include <bsd.port.pre.mk>
@ -58,7 +51,7 @@ BUILD_DEPENDS+= ${PEARDIR}/MDB2.php:${PORTSDIR}/databases/pear-MDB2
.endif
.if defined(WITH_PHP_SQLITE)
BUILD_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/sqlite.so:${PORTSDIR}/databases/php5-sqlite
USE_PHP+= sqlite
.endif
.include "${PORTSDIR}/devel/pear/bsd.pear.mk"

View File

@ -18,6 +18,7 @@ COMMENT= Bacula-web provides a summarized output of Bacula jobs
RUN_DEPENDS= ${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB
NO_BUILD= yes
USE_PHP= yes
WANT_PHP_WEB= yes
OPTIONS= POSTGRESQL "Use PostgreSQL database instead of MySQL" on
@ -30,16 +31,14 @@ SUB_FILES= pkg-message
USE_PGSQL= yes
CONFIGURE_ARGS+= --with-postgresql=yes
SUB_LIST+= REQ_PGSQL=postgresql
USE_PHP= pgsql
USE_PHP+= pgsql
.else
CONFIGURE_ARGS+= --with-mysql=yes
USE_MYSQL= yes
SUB_LIST+= REQ_MYSQL=mysql
USE_PHP= mysql
USE_PHP+= mysql
.endif
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${ECHO} "Installing in ${PREFIX}/www/bacula-web"
${MKDIR} ${PREFIX}/www/bacula-web

View File

@ -31,9 +31,7 @@ PKGMESSAGE= ${WRKDIR}/pkg-message
.include <bsd.port.pre.mk>
.if defined(WITH_MYSQL)
# XXX: should be "USE_PHP+=mysql", but the depends are added too early
# by bsd.php.mk
RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/mysql.so:${PORTSDIR}/${mysql_DEPENDS}
USE_PHP+= mysql
.endif
.if defined(WITH_PGSQL)
RUN_DEPENDS+= ${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB

View File

@ -31,9 +31,7 @@ PKGMESSAGE= ${WRKDIR}/pkg-message
.include <bsd.port.pre.mk>
.if defined(WITH_MYSQL)
# XXX: should be "USE_PHP+=mysql", but the depends are added too early
# by bsd.php.mk
RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/mysql.so:${PORTSDIR}/${mysql_DEPENDS}
USE_PHP+= mysql
.endif
.if defined(WITH_PGSQL)
RUN_DEPENDS+= ${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB

View File

@ -31,9 +31,7 @@ PKGMESSAGE= ${WRKDIR}/pkg-message
.include <bsd.port.pre.mk>
.if defined(WITH_MYSQL)
# XXX: should be "USE_PHP+=mysql", but the depends are added too early
# by bsd.php.mk
RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/mysql.so:${PORTSDIR}/${mysql_DEPENDS}
USE_PHP+= mysql
.endif
.if defined(WITH_PGSQL)
RUN_DEPENDS+= ${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB

View File

@ -31,9 +31,7 @@ PKGMESSAGE= ${WRKDIR}/pkg-message
.include <bsd.port.pre.mk>
.if defined(WITH_MYSQL)
# XXX: should be "USE_PHP+=mysql", but the depends are added too early
# by bsd.php.mk
RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/mysql.so:${PORTSDIR}/${mysql_DEPENDS}
USE_PHP+= mysql
.endif
.if defined(WITH_PGSQL)
RUN_DEPENDS+= ${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB

View File

@ -31,9 +31,7 @@ PKGMESSAGE= ${WRKDIR}/pkg-message
.include <bsd.port.pre.mk>
.if defined(WITH_MYSQL)
# XXX: should be "USE_PHP+=mysql", but the depends are added too early
# by bsd.php.mk
RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/mysql.so:${PORTSDIR}/${mysql_DEPENDS}
USE_PHP+= mysql
.endif
.if defined(WITH_PGSQL)
RUN_DEPENDS+= ${LOCALBASE}/share/pear/DB.php:${PORTSDIR}/databases/pear-DB

View File

@ -235,8 +235,6 @@ USE_PHP+= mcal
. endif
.endif
.include "${PORTSDIR}/Mk/bsd.php.mk"
.if ${APACHE_VERSION} >= 20
APACHE_CNFDIR= ${LOCALBASE}/etc/apache${APACHE_VERSION:S/20/2/}
HORDE_INC= ${APACHE_CNFDIR}/Includes

View File

@ -235,8 +235,6 @@ USE_PHP+= mcal
. endif
.endif
.include "${PORTSDIR}/Mk/bsd.php.mk"
.if ${APACHE_VERSION} >= 20
APACHE_CNFDIR= ${LOCALBASE}/etc/apache${APACHE_VERSION:S/20/2/}
HORDE_INC= ${APACHE_CNFDIR}/Includes

View File

@ -39,9 +39,6 @@ USE_PHP+= mysql
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}

View File

@ -39,9 +39,6 @@ USE_PHP+= mysql
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}

View File

@ -39,9 +39,6 @@ USE_PHP+= mysql
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}

View File

@ -39,9 +39,6 @@ USE_PHP+= mysql
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}

View File

@ -39,9 +39,6 @@ USE_PHP+= mysql
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}

View File

@ -39,9 +39,6 @@ USE_PHP+= mysql
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}

View File

@ -39,9 +39,6 @@ USE_PHP+= mysql
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}

View File

@ -39,9 +39,6 @@ USE_PHP+= mysql
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}

View File

@ -39,9 +39,6 @@ USE_PHP+= mysql
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}

View File

@ -39,9 +39,6 @@ USE_PHP+= mysql
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}

View File

@ -41,9 +41,6 @@ USE_PHP+= mysql
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}

View File

@ -41,9 +41,6 @@ USE_PHP+= mysql
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}

View File

@ -39,9 +39,6 @@ USE_PHP+= mysql
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${PREFIX}/${MEDIAWIKIDIR}
${CP} -r ${WRKSRC}/ ${PREFIX}/${MEDIAWIKIDIR}

View File

@ -39,8 +39,6 @@ USE_PHP+= mysql
USE_PHP+= pgsql
.endif
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${INSTALL_DATA} -d ${PREFIX}/${OJSDIR}
@${CP} -Rn ${WRKSRC}/* ${PREFIX}/${OJSDIR}

View File

@ -32,23 +32,10 @@ DOCFILES= INSTALL LICENSE README TODO UPGRADING
OPTIONS= MYSQL "Use MySQL backend" on \
PGSQL "Use PostgreSQL backend" off \
DB4 "Use Berkeley DB4 backend" off
DB4 "Use Berkeley DB4 backend" off \
SQLITE "Use SQLite backend (php5 only)" off
.if exists(${LOCALBASE}/etc/php.conf)
.include "${LOCALBASE}/etc/php.conf"
.endif
.if defined(PHP_VER) && ${PHP_VER} == 5
OPTIONS+= SQLITE "Use SQLite backend" off
.endif
PORT_DBDIR?= /var/db/ports
LATEST_LINK= ${PORTNAME}${PKGNAMESUFFIX}
OPTIONSFILE?= ${PORT_DBDIR}/${LATEST_LINK}/options
.if exists(${OPTIONSFILE})
.include "${OPTIONSFILE}"
.endif
.include <bsd.port.pre.mk>
.if defined(WITH_DB4)
USE_PHP+= dba
@ -84,4 +71,4 @@ do-install:
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -26,30 +26,13 @@ SUB_LIST+= SERENDIPITY=${SERENDIPITY}
SUB_FILES= pkg-message
CONFLICTS= serendipity-1.*
LATEST_LINK= serendipity-devel
LOCALBASE?= /usr/local
OPTIONS= MYSQL "Use MySQL backend" on \
PGSQL "Use PostgreSQL backend" off
PGSQL "Use PostgreSQL backend" off \
SQLITE "Use SQLite backend (php5 only)" off \
MAGICK "Use ImageMagick Library" on
.if exists(${LOCALBASE}/etc/php.conf)
.include "${LOCALBASE}/etc/php.conf"
.endif
.if defined(PHP_VER) && ${PHP_VER} == 5
OPTIONS+= SQLITE "Use SQLite backend" off
.endif
OPTIONS+= MAGICK "Use ImageMagick Library" on
PORT_DBDIR?= /var/db/ports
LATEST_LINK= ${PORTNAME}${PKGNAMESUFFIX}
OPTIONSFILE?= ${PORT_DBDIR}/${LATEST_LINK}/options
.if exists(${OPTIONSFILE})
.include "${OPTIONSFILE}"
.endif
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_MYSQL)
USE_PHP+= mysql
@ -76,4 +59,4 @@ do-install:
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -25,28 +25,12 @@ SUB_LIST+= SERENDIPITY=${SERENDIPITY}
SUB_FILES= pkg-message
USE_BZIP2= YES
LOCALBASE?= /usr/local
OPTIONS= MYSQL "Use MySQL backend" on \
PGSQL "Use PostgreSQL backend" off
PGSQL "Use PostgreSQL backend" off \
SQLITE "Use SQLite backend (php5 only)" off \
MAGICK "Use ImageMagick Library" on
.if exists(${LOCALBASE}/etc/php.conf)
.include "${LOCALBASE}/etc/php.conf"
.endif
.if defined(PHP_VER) && ${PHP_VER} == 5
OPTIONS+= SQLITE "Use SQLite backend" off
.endif
OPTIONS+= MAGICK "Use ImageMagick Library" on
PORT_DBDIR?= /var/db/ports
LATEST_LINK= ${PORTNAME}${PKGNAMESUFFIX}
OPTIONSFILE?= ${PORT_DBDIR}/${LATEST_LINK}/options
.if exists(${OPTIONSFILE})
.include "${OPTIONSFILE}"
.endif
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_MYSQL)
USE_PHP+= mysql
@ -73,4 +57,4 @@ do-install:
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -41,9 +41,6 @@ USE_PHP+= gd
USE_PHP+= zlib
.endif
# Include bsd.php.mk because use USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
.if defined(WITH_IMAGICK)
LIB_DEPENDS+= Magick.10:${PORTSDIR}/graphics/ImageMagick
.endif

View File

@ -41,9 +41,6 @@ USE_PHP+= gd
USE_PHP+= zlib
.endif
# Include bsd.php.mk because use USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
.if defined(WITH_IMAGICK)
LIB_DEPENDS+= Magick.10:${PORTSDIR}/graphics/ImageMagick
.endif

View File

@ -41,9 +41,6 @@ USE_PHP+= gd
USE_PHP+= zlib
.endif
# Include bsd.php.mk because use USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
.if defined(WITH_IMAGICK)
LIB_DEPENDS+= Magick.10:${PORTSDIR}/graphics/ImageMagick
.endif

View File

@ -41,9 +41,6 @@ USE_PHP+= gd
USE_PHP+= zlib
.endif
# Include bsd.php.mk because use USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
.if defined(WITH_IMAGICK)
LIB_DEPENDS+= Magick.10:${PORTSDIR}/graphics/ImageMagick
.endif

View File

@ -41,9 +41,6 @@ USE_PHP+= gd
USE_PHP+= zlib
.endif
# Include bsd.php.mk because use USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
.if defined(WITH_IMAGICK)
LIB_DEPENDS+= Magick.10:${PORTSDIR}/graphics/ImageMagick
.endif

View File

@ -87,9 +87,6 @@ IGNORE= please choose database backend by running 'make config'
USE_PHP+= ldap
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
pre-install:
cd ${WRKSRC} && ${FIND} -s * -type f | \
${SED} -e 's|^|${WCDIR}/|' > ${PLIST} \

View File

@ -17,6 +17,7 @@ COMMENT= A framework for developing PHP web applications
NO_BUILD= yes
USE_PHP= pcre
WANT_PHP_WEB= yes
IGNORE_WITH_PHP=4
USE_GETTEXT= yes
@ -34,9 +35,6 @@ OPTIONS= MYSQL "Install MySQL PDO support" Off \
.include <bsd.port.pre.mk>
DEFAULT_PHP_VER=5
IGNORE_WITH_PHP=4
DB_DEFINED= no
.if defined(WITH_MYSQL)
@ -70,13 +68,10 @@ DB_DEFINED= yes
.endif
.if ${DB_DEFINED} == "yes"
RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/pdo.so:${PORTSDIR}/databases/php5-pdo \
${DB_DEPENDS}
USE_PHP+= pdo
RUN_DEPENDS+= ${DB_DEPENDS}
.endif
# Fix USE_PHP after bsd.port.pre.mk
.include "${PORTSDIR}/Mk/bsd.php.mk"
do-install:
@${MKDIR} ${DATADIR}
${CP} -R ${WRKSRC}/* ${DATADIR}