From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jun 27 12:00:32 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6CCE710657A9 for ; Wed, 27 Jun 2012 12:00:32 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0E03E8FC1F for ; Wed, 27 Jun 2012 12:00:28 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5RC0RGQ048001 for ; Wed, 27 Jun 2012 12:00:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q5RC0RiR048000; Wed, 27 Jun 2012 12:00:27 GMT (envelope-from gnats) Resent-Date: Wed, 27 Jun 2012 12:00:27 GMT Resent-Message-Id: <201206271200.q5RC0RiR048000@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Miroslav Lachman <000.fbsd@quip.cz> Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7CF851065670 for ; Wed, 27 Jun 2012 11:52:45 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 681308FC14 for ; Wed, 27 Jun 2012 11:52:45 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q5RBqiGm098921 for ; Wed, 27 Jun 2012 11:52:44 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q5RBqiBU098920; Wed, 27 Jun 2012 11:52:44 GMT (envelope-from nobody) Message-Id: <201206271152.q5RBqiBU098920@red.freebsd.org> Date: Wed, 27 Jun 2012 11:52:44 GMT From: Miroslav Lachman <000.fbsd@quip.cz> To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/169485: Convert lang/php53 to OptionsNG X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2012 12:00:32 -0000 >Number: 169485 >Category: ports >Synopsis: Convert lang/php53 to OptionsNG >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 27 12:00:27 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Miroslav Lachman >Release: 9.0-RELEASE >Organization: codeLab.cz >Environment: 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Convert Makefile and Makefile.ext to use OptionsNG >How-To-Repeat: >Fix: apply attached patch Not fully tested, needs careful review! Patch attached with submission follows: --- Makefile.orig 2012-06-25 23:07:17.000000000 +0200 +++ Makefile 2012-06-26 23:33:12.000000000 +0200 @@ -20,6 +20,7 @@ USE_BZIP2= yes MAKE_JOBS_SAFE= yes +NO_OPTIONS_SORT=yes .if !defined(PKGNAMESUFFIX) USE_AUTOTOOLS= autoconf @@ -39,17 +40,20 @@ USE_GNOME= libxml2 -OPTIONS= CLI "Build CLI version" on \ - CGI "Build CGI version" on \ - FPM "Build FPM version (experimental)" off \ - APACHE "Build Apache module" off \ - AP2FILTER " Use Apache 2.x filter interface (experimental)" off \ - DEBUG "Enable debug" off \ - SUHOSIN "Enable Suhosin protection system" on \ - MULTIBYTE "Enable zend multibyte support" off \ - IPV6 "Enable ipv6 support" on \ - MAILHEAD "Enable mail header patch" off \ - LINKTHR "Link thread lib (for threaded extensions)" off +OPTIONS_DEFINE= CLI CGI FPM APACHE AP2FILTER DEBUG SUHOSIN MULTIBYTE IPV6 MAILHEAD LINKTHR +OPTIONS_DEFAULT=CLI CGI SUHOSIN IPV6 + +CLI_DESC= Build CLI version +CGI_DESC= Build CGI version +FPM_DESC= Build FPM version +APACHE_DESC= Build Apache module +AP2FILTER_DESC= Use Apache 2.x filter interface (experimental) +DEBUG_DESC= Enable debug +SUHOSIN_DESC= Enable Suhosin protection system +MULTIBYTE_DESC= Enable zend multibyte support +IPV6_DESC= Enable ipv6 support +MAILHEAD_DESC= Enable mail header patch +LINKTHR_DESC= Link thread lib (for threaded extensions) CONFLICTS= php52-5* php5-5* @@ -62,7 +66,7 @@ PATCH_SITES+= ${MASTER_SITE_LOCAL} PATCH_SITE_SUBDIR= ale -.if !defined(WITHOUT_SUHOSIN) +.if ${PORT_OPTIONS:MSUHOSIN} PATCHFILES+= suhosin-patch-5.3.x-0.9.10.patch.gz PATCH_SITES+= http://download.suhosin.org/:suhosin PLIST_SUB+= SUHOSIN="" @@ -70,12 +74,12 @@ PLIST_SUB+= SUHOSIN="@comment " .endif -.if defined(WITH_MAILHEAD) +.if ${PORT_OPTIONS:MMAILHEAD} PATCHFILES+= php-5.3.x-mail-header.patch:mail PATCH_SITES+= http://choon.net/opensource/php/:mail .endif -.if !defined(WITHOUT_CLI) +.if ${PORT_OPTIONS:MCLI} PHP_SAPI+= cli PLIST_SUB+= CLI="" MAN1+= php.1 @@ -84,7 +88,7 @@ CONFIGURE_ARGS+=--disable-cli .endif -.if !defined(WITHOUT_CGI) +.if ${PORT_OPTIONS:MCGI} PHP_SAPI+= cgi PLIST_SUB+= CGI="" .else @@ -92,7 +96,7 @@ CONFIGURE_ARGS+=--disable-cgi .endif -.if defined(WITH_FPM) +.if ${PORT_OPTIONS:MFPM} PHP_SAPI+= fpm MAN8+= php-fpm.8 USE_RC_SUBR+= php-fpm @@ -104,11 +108,11 @@ PLIST_SUB+= FPM="@comment " .endif -.if defined(WITH_APACHE) +.if ${PORT_OPTIONS:MAPACHE} PHP_SAPI+= mod USE_APACHE= 20+ .include "${PORTSDIR}/Mk/bsd.apache.mk" -.if defined(WITH_AP2FILTER) +.if ${PORT_OPTIONS:MAP2FILTER} CONFIGURE_ARGS+=--with-apxs2filter=${APXS} .else CONFIGURE_ARGS+=--with-apxs2=${APXS} @@ -140,26 +144,26 @@ pthreads_working="yes" \ lt_cv_path_SED="sed" -.if defined(WITH_LINKTHR) +.if ${PORT_OPTIONS:MLINKTHR} CONFIGURE_ENV+= LIBS="${LIBS} ${PTHREAD_LIBS}" .endif -.if defined(WITH_DEBUG) +.if ${PORT_OPTIONS:MDEBUG} CONFIGURE_ARGS+=--enable-debug .endif -.if defined(WITH_MULTIBYTE) +.if ${PORT_OPTIONS:MMULTIBYTE} CONFIGURE_ARGS+=--enable-zend-multibyte .endif -.if defined(WITHOUT_IPV6) +.if empty(PORT_OPTIONS:MIPV6) CONFIGURE_ARGS+=--disable-ipv6 .endif post-patch: @${TOUCH} ${WRKSRC}/ext/php_config.h @${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|" ${WRKSRC}/php.ini-* -.if defined(WITH_FPM) +.if ${PORT_OPTIONS:MFPM} @${REINPLACE_CMD} -e "s|^;\(pid\)|\1|;s|^;\(pm\.[a-z_]*_servers\)|\1|" \ ${WRKSRC}/sapi/fpm/php-fpm.conf.in .endif @@ -185,10 +189,10 @@ @${INSTALL_DATA} ${WRKSRC}/php.ini-production ${PREFIX}/etc @${INSTALL_DATA} ${WRKDIR}/php.conf ${PREFIX}/etc @${TOUCH} ${PREFIX}/include/php/ext/php_config.h -.if defined(WITH_FPM) +.if ${PORT_OPTIONS:MFPM} @${CP} -n ${PREFIX}/etc/php-fpm.conf.default ${PREFIX}/etc/php-fpm.conf .endif -.if defined(WITH_APACHE) +.if ${PORT_OPTIONS:MAPACHE} @${CAT} ${PKGMESSAGE} .endif --- Makefile.ext.orig 2012-06-25 23:07:17.000000000 +0200 +++ Makefile.ext 2012-06-27 00:06:46.000000000 +0200 @@ -40,12 +40,15 @@ .if ${PHP_MODNAME} == "dba" CONFIGURE_ARGS+=--enable-dba -OPTIONS= CDB "cdb database support" on \ - DB4 "Berkeley DB4 support" off \ - GDBM "GDBM database support" off \ - QDBM "QDBM database support" off \ - INIFILE "INI file support" on \ - FLATFILE "flatfile support" on +OPTIONS_DEFINE= CDB DB4 GDBM QDBM INIFILE FLATFILE +OPTIONS_DEFAULT=CDB INIFILE FLATFILE + +CDB_DESC= cdb database support +DB4_DESC= Berkeley DB4 support +GDBM_DESC= GDBM database support +QDBM_DESC= QDBM database support +INIFILE_DESC= INI file support +FLATFILE_DESC= flatfile support PHP_HEADER_DIRS= libcdb libflatfile libinifile .endif @@ -98,9 +101,12 @@ CONFIGURE_ARGS+=--with-xpm-dir=${LOCALBASE} . endif -OPTIONS= T1LIB "Include T1lib support" on \ - TRUETYPE "Enable TrueType string function" on \ - JIS "Enable JIS-mapped Japanese font support" off +OPTIONS_DEFINE= T1LIB TRUETYPE JIS +OPTIONS_DEFAULT=T1LIB TRUETYPE + +T1LIB_DESC= Include T1lib support +TRUETYPE_DESC= Enable TrueType string function +JIS_DESC= Enable JIS-mapped Japanese font support PHP_HEADER_DIRS=libgd .endif @@ -166,7 +172,10 @@ CONFIGURE_ARGS+=--enable-mbstring \ --with-pcre-dir=${LOCALBASE} -OPTIONS= REGEX "Enable multibyte regex support" on +OPTIONS_DEFINE= REGEX +OPTIONS_DEFAULT=REGEX + +REGEX_DESC= Enable multibyte regex support PHP_HEADER_DIRS=libmbfl libmbfl/filters libmbfl/mbfl libmbfl/nls .endif @@ -186,17 +195,25 @@ .endif .if ${PHP_MODNAME} == "mysql" -OPTIONS= MYSQLND "Use MySQL Native Driver" on +OPTIONS_DEFINE= MYSQLND +OPTIONS_DEFAULT=MYSQLND + +MYSQLND_DESC= Use MySQL Native Driver" .endif .if ${PHP_MODNAME} == "mysqli" -OPTIONS= MYSQLND "Use MySQL Native Driver" on +OPTIONS_DEFINE= MYSQLND +OPTIONS_DEFAULT=MYSQLND + +MYSQLND_DESC= Use MySQL Native Driver" .endif .if ${PHP_MODNAME} == "odbc" CONFIGURE_ARGS+=--enable-odbc -OPTIONS= IODBC "Use the iODBC driver instead of unixODBC" off +OPTIONS_DEFINE= IODBC + +IODBC_DESC= Use the iODBC driver instead of unixODBC .endif .if ${PHP_MODNAME} == "openssl" @@ -220,7 +237,9 @@ USE_PHP= pdo USE_PHP_BUILD= yes -OPTIONS= MSSQL "Enable Microsoft SQL Server support" off +OPTIONS_DEFINE= MSSQL + +MSSQL_DESC= Enable Microsoft SQL Server support .endif .if ${PHP_MODNAME} == "pdo_firebird" @@ -233,14 +252,19 @@ .endif .if ${PHP_MODNAME} == "pdo_mysql" -OPTIONS= MYSQLND "Use MySQL Native Driver" on +OPTIONS_DEFINE= MYSQLND +OPTIONS_DEFAULT=MYSQLND + +MYSQLND_DESC= Use MySQL Native Driver" USE_PHP= pdo USE_PHP_BUILD= yes .endif .if ${PHP_MODNAME} == "pdo_odbc" -OPTIONS= IODBC "Use the iODBC driver instead of unixODBC" off +OPTIONS_DEFINE= IODBC + +IODBC_DESC= Use the iODBC driver instead of unixODBC USE_PHP= pdo USE_PHP_BUILD= yes @@ -347,7 +371,9 @@ USE_PHP_BUILD= yes PHP_HEADER_DIRS=libsqlite/src -OPTIONS= UTF8 "Enable UTF-8 support" off +OPTIONS_DEFINE= UTF8 + +UTF8_DESC= Enable UTF-8 support .endif .if ${PHP_MODNAME} == "sqlite3" @@ -452,58 +478,58 @@ .include .if ${PHP_MODNAME} == "dba" -. if defined(WITHOUT_CDB) +. if empty(PORT_OPTIONS:MCDB) CONFIGURE_ARGS+=--without-cdb . endif -. if defined(WITH_DB4) +. if ${PORT_OPTIONS:MDB4} CONFIGURE_ARGS+=--with-db4=${LOCALBASE} USE_BDB= 40+ WITH_BDB_HIGHEST= yes . endif -. if defined(WITH_GDBM) +. if ${PORT_OPTIONS:MGDBM} LIB_DEPENDS+= gdbm.4:${PORTSDIR}/databases/gdbm CONFIGURE_ARGS+=--with-gdbm=${LOCALBASE} . endif -. if defined(WITH_QDBM) +. if ${PORT_OPTIONS:MQDBM} LIB_DEPENDS+= qdbm.14:${PORTSDIR}/databases/qdbm CONFIGURE_ARGS+=--with-qdbm=${LOCALBASE} . endif -. if defined(WITHOUT_INIFILE) +. if empty(PORT_OPTIONS:MINIFILE) CONFIGURE_ARGS+=--disable-inifile . endif -. if defined(WITHOUT_FLATFILE) +. if empty(PORT_OPTIONS:MFLATFILE) CONFIGURE_ARGS+=--disable-flatfile . endif .endif .if ${PHP_MODNAME} == "gd" -. if !defined(WITHOUT_T1LIB) +. if ${PORT_OPTIONS:MT1LIB} LIB_DEPENDS+= t1.5:${PORTSDIR}/devel/t1lib CONFIGURE_ARGS+=--with-t1lib=${LOCALBASE} . endif -. if !defined(WITHOUT_TRUETYPE) +. if ${PORT_OPTIONS:MTRUETYPE} CONFIGURE_ARGS+=--enable-gd-native-ttf . endif -. if defined(WITH_JIS) +. if ${PORT_OPTIONS:MJIS} CONFIGURE_ARGS+=--enable-gd-jis-conv . endif .endif .if ${PHP_MODNAME} == "mbstring" -. if defined(WITHOUT_REGEX) -CONFIGURE_ARGS+=--disable-mbregex -. else +. if ${PORT_OPTIONS:MREGEX} LIB_DEPENDS+= onig.1:${PORTSDIR}/devel/oniguruma4 CONFIGURE_ARGS+=--with-onig=${LOCALBASE} +. else +CONFIGURE_ARGS+=--disable-mbregex . endif .endif .if ${PHP_MODNAME} == "mysql" -. if defined(WITH_MYSQLND) +. if ${PORT_OPTIONS:MMYSQLND} CONFIGURE_ARGS+=--with-mysql=mysqlnd . else CONFIGURE_ARGS+=--with-mysql=${LOCALBASE} \ @@ -514,7 +540,7 @@ .endif .if ${PHP_MODNAME} == "mysqli" -. if defined(WITH_MYSQLND) +. if ${PORT_OPTIONS:MMYSQLND} CONFIGURE_ARGS+=--with-mysqli=mysqlnd . else CONFIGURE_ARGS+=--with-mysqli=${LOCALBASE}/bin/mysql_config @@ -529,7 +555,7 @@ .endif .if ${PHP_MODNAME} == "odbc" -.if defined(WITH_IODBC) +.if ${PORT_OPTIONS:MIODBC} LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc CONFIGURE_ARGS+=--with-iodbc=${LOCALBASE} @@ -541,7 +567,7 @@ .endif .if ${PHP_MODNAME} == "pdo_dblib" -.if defined(WITH_MSSQL) +.if ${PORT_OPTIONS:MMSSQL} LIB_DEPENDS+= sybdb.5:${PORTSDIR}/databases/freetds-msdblib .else LIB_DEPENDS+= ct.4:${PORTSDIR}/databases/freetds @@ -549,7 +575,7 @@ .endif .if ${PHP_MODNAME} == "pdo_odbc" -.if defined(WITH_IODBC) +.if ${PORT_OPTIONS:MIODBC} LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc CONFIGURE_ARGS+=--with-pdo-odbc=iODBC,${LOCALBASE} @@ -561,7 +587,7 @@ .endif .if ${PHP_MODNAME} == "pdo_mysql" -. if defined(WITH_MYSQLND) +. if ${PORT_OPTIONS:MMYSQLND} CONFIGURE_ARGS+=--with-pdo-mysql=mysqlnd USE_PHP+= mysql @@ -574,7 +600,7 @@ .endif .if ${PHP_MODNAME} == "sqlite" -. if defined(WITH_UTF8) +. if ${PORT_OPTIONS:MUTF8} CONFIGURE_ARGS+=--enable-sqlite-utf8 . endif .endif >Release-Note: >Audit-Trail: >Unformatted: