My reasoning for keeping it where it currently is, is that PKGNAME/COMMENT
for "things you can run" are together in one place. Can you keep it there
for now and then let's see how it actually looks of any other sapis are
added letter?
--
Sent from a phone, apologies for poor formatting.
On 2 May 2018 07:24:55 Martijn van Duren <openbsd+ports@list.imperialat.at>
wrote:
> Looks OK to me, although I'd place the COMMENT-cgi SAPI's
> CONFIGURE_ARGS to be consistent with PHP_EXTENSIONS, but that's just
> nitpicking.
>
> Can I commit it with that change, or do you want to keep it where it is?
>
> On 04/26/18 13:04, Stuart Henderson wrote:
> > On 2018/04/26 08:55, Martijn van Duren wrote:
>> > On 03/16/18 10:40, Stuart Henderson wrote:
>>> > On 2018/03/16 10:18, Martijn van Duren wrote:
>>>> > Hello ports@,
>>>> >
>>>> > This patch shouldn't cause any change in the resulting packages, but
>>>> > merely prepare for adding additional SAPIs with minimal effor. E.g.
>>>> > php-dbg, or separating other sapi's from main.
>>>> >
>>>> > The MODULE_NAME isn't referenced anywhere and since -cgi isn't
>>>> > assigned it anywhere, but would be assigned it with this diff, I
>>>> > just removed it completely.
>>> >
>>> > I'm not going to look at this until after we're done with 6.3.
>>> >
>>>> > Also opcache is always included now, so just make it's availability
>>>> > explicit. The changes below also allow for easily moving opcache to
>>>> > a subpackage if we so desire. (Hint: I do)
>>> >
>>> > Hint: opcache has no extra deps, it's not loaded by default, the package is
>>> > tiny, the only thing I see moving it doing is make extra work for porters
>>> > and sysadmins.
>>> >
>> > ping
> >
> > Here's a tweaked one, it avoids some of the extra variables which don't
> > seem necessary, uses some shorter variable names, groups CONFIGURE_ARGS
> > (sapi/zend ext's/php ext's).
> >
> > It does seem a bit like deckchair-shuffling as-is, but because it makes it
> > easier to add other sapis I'd be OK with this one.
> >
> Index: Makefile.inc
> ===================================================================
> RCS file: /cvs/ports/lang/php/Makefile.inc,v
> retrieving revision 1.102
> diff -u -p -r1.102 Makefile.inc
> --- Makefile.inc 1 Mar 2018 10:15:02 -0000 1.102
> +++ Makefile.inc 2 May 2018 06:23:05 -0000
> @@ -3,10 +3,8 @@
> BROKEN-hppa= no __sync_bool_compare_and_swap support nor asm fallback
>
> COMMENT-main= server-side HTML-embedded scripting language
> -COMMENT-cgi= cgi sapi for php
>
> PKGNAME-main?= php-${V}
> -PKGNAME-cgi?= php-cgi-${V}
>
> DISTFILES+= php-${V}.tar.bz2
>
> @@ -73,12 +71,22 @@ CONFIGURE_ARGS+= --enable-shared \
> --program-suffix=-${PV} \
> --with-readline
>
> -# apache module
> +# sapi
> +COMMENT-cgi= cgi sapi for php
> +CONFIGURE_ARGS+= --enable-cgi
> +
> CONFIGURE_ARGS+= --with-apxs2=${LOCALBASE}/sbin/apxs2
> BUILD_DEPENDS+= www/apache-httpd
>
> -# default included extensions
> -CONFIGURE_ARGS+= --with-openssl \
> +CONFIGURE_ARGS+= --enable-fpm \
> + --with-fpm-user=www \
> + --with-fpm-group=www
> +
> +# zend extensions
> +CONFIGURE_ARGS+= --enable-opcache
> +
> +# default included php extensions
> +CONFIGURE_ARGS+= --with-openssl \
> --with-zlib \
> --enable-xml \
> --enable-wddx \
> @@ -96,44 +104,52 @@ CONFIGURE_ARGS+= --with-openssl \
> --enable-sysvsem \
> --enable-sysvshm \
> --enable-mbstring \
> - --enable-exif \
> - --enable-cgi \
> - --enable-fpm \
> - --with-fpm-user=www \
> - --with-fpm-group=www
> + --enable-exif
>
> TEST_TARGET= test
> TEST_FLAGS= NO_INTERACTION=1
>
> -MULTI_PACKAGES+= -main -cgi
> +SAPI+= -main -cgi
> +ZEND_EXTENSIONS+= -opcache
> +MULTI_PACKAGES+= ${SAPI} ${PHP_EXTENSIONS}
> +
> +RUN_DEPENDS-main= mail/femail,-chroot
> +
> +.for i in ${SAPI}
> +WANTLIB$i+= c crypto curses iconv intl lzma m pthread \
> + readline ssl xml2 z
> +LIB_DEPENDS$i+= devel/gettext \
> + textproc/libxml
> +.endfor
> +
>
> #
> # Loadable php extensions by name that are included in all versions
> #
>
> # bz2
> -MULTI_PACKAGES+= -bz2
> +PHP_EXTENSIONS+= -bz2
> COMMENT-bz2= bzip2 compression extensions for php
> CONFIGURE_ARGS+= --with-bz2=shared,${LOCALBASE}
> LIB_DEPENDS-bz2= archivers/bzip2
> WANTLIB-bz2= bz2>=10 pthread
>
> # curl
> -MULTI_PACKAGES+= -curl
> +PHP_EXTENSIONS+= -curl
> COMMENT-curl= curl URL library extensions for php
> CONFIGURE_ARGS+= --with-curl=shared,${LOCALBASE}
> LIB_DEPENDS-curl= net/curl
> WANTLIB-curl= pthread crypto nghttp2 ssl z curl>=2
>
> # dba
> -MULTI_PACKAGES+= -dba
> +PHP_EXTENSIONS+= -dba
> COMMENT-dba= dba GDBM access extensions for php
> CONFIGURE_ARGS+= --enable-dba=shared --with-gdbm=${LOCALBASE}
> LIB_DEPENDS-dba= databases/gdbm
> WANTLIB-dba= gdbm>=2 pthread
>
> # gd
> -MULTI_PACKAGES+= -gd
> +PHP_EXTENSIONS+= -gd
> COMMENT-gd= image manipulation extensions for php
> LIB_DEPENDS-gd= graphics/jpeg \
> graphics/png
> @@ -151,23 +167,25 @@ CONFIGURE_ARGS+= --with-gd=shared \
> --with-xpm-dir=${X11BASE}
>
> # gmp
> -MULTI_PACKAGES+= -gmp
> +PHP_EXTENSIONS+= -gmp
> COMMENT-gmp= gmp math library support for php
> CONFIGURE_ARGS+= --with-gmp=shared,${LOCALBASE}
> LIB_DEPENDS-gmp= devel/gmp
> WANTLIB-gmp= gmp>=4 pthread
>
> # intl
> -MULTI_PACKAGES+= -intl
> +PHP_EXTENSIONS+= -intl
> COMMENT-intl= intl library support for php
> CONFIGURE_ARGS+= --enable-intl=shared \
> --with-icu-dir=${LOCALBASE}
> LIB_DEPENDS-intl= textproc/icu4c
> RUN_DEPENDS-intl= textproc/icu4c,-wwwdata
> -WANTLIB-intl= ${COMPILER_LIBCXX} icudata icui18n icuio icuuc m pthread
> +WANTLIB-intl= icudata icui18n icuio icuuc pthread
> +# only needed for php7+, simpler to list it unconditionally
> +WANTLIB-intl+= ${COMPILER_LIBCXX} m
>
> # imap
> -MULTI_PACKAGES+= -imap
> +PHP_EXTENSIONS+= -imap
> COMMENT-imap= imap, pop3 and nntp extensions for php
> CONFIGURE_ARGS+= --with-imap=shared,${LOCALBASE} \
> --with-imap-ssl
> @@ -175,126 +193,126 @@ LIB_DEPENDS-imap= mail/alpine,-c-client
> WANTLIB-imap= pthread crypto ssl c-client>=5
>
> # ldap
> -MULTI_PACKAGES+= -ldap
> +PHP_EXTENSIONS+= -ldap
> COMMENT-ldap= ldap protocol extensions for php
> CONFIGURE_ARGS+= --with-ldap=shared,${LOCALBASE}
> LIB_DEPENDS-ldap= databases/openldap
> WANTLIB-ldap= pthread ldap>=2 lber
>
> # mcrypt
> -MULTI_PACKAGES+= -mcrypt
> +PHP_EXTENSIONS+= -mcrypt
> COMMENT-mcrypt= mcrypt encryption/decryption extensions for php
> CONFIGURE_ARGS+= --with-mcrypt=shared,${LOCALBASE}
> LIB_DEPENDS-mcrypt= security/libmcrypt devel/libtool,-ltdl
> WANTLIB-mcrypt= mcrypt ltdl>=1 pthread
>
> # mysqli
> -MULTI_PACKAGES+= -mysqli
> +PHP_EXTENSIONS+= -mysqli
> COMMENT-mysqli= mysql database access extensions for php
> CONFIGURE_ARGS+= --with-mysqli=shared,${LOCALBASE}/bin/mysql_config
> LIB_DEPENDS-mysqli= databases/mariadb
> WANTLIB-mysqli= crypto m pthread ssl z lib/mysql/mysqlclient
>
> # odbc
> -MULTI_PACKAGES+= -odbc
> +PHP_EXTENSIONS+= -odbc
> COMMENT-odbc= odbc database access extensions for php
> CONFIGURE_ARGS+= --with-iodbc=shared,${LOCALBASE}
> LIB_DEPENDS-odbc= databases/iodbc
> WANTLIB-odbc= iodbc>=2 pthread iodbcinst
>
> # pcntl
> -MULTI_PACKAGES+= -pcntl
> +PHP_EXTENSIONS+= -pcntl
> COMMENT-pcntl= PCNTL extensions for php
> CONFIGURE_ARGS+= --enable-pcntl=shared
> LIB_DEPENDS-pcntl=
> WANTLIB-pcntl= pthread
>
> # pdo-mysql
> -MULTI_PACKAGES+= -pdo_mysql
> +PHP_EXTENSIONS+= -pdo_mysql
> COMMENT-pdo_mysql= PDO mysql database access extensions for php
> CONFIGURE_ARGS+= --with-pdo-mysql=shared,${LOCALBASE}
> LIB_DEPENDS-pdo_mysql= databases/mariadb
> WANTLIB-pdo_mysql= crypto m pthread ssl z lib/mysql/mysqlclient
>
> # pdo-pgsql
> -MULTI_PACKAGES+= -pdo_pgsql
> +PHP_EXTENSIONS+= -pdo_pgsql
> COMMENT-pdo_pgsql= PDO database access extensions for php
> CONFIGURE_ARGS+= --with-pdo-pgsql=shared,${LOCALBASE}
> LIB_DEPENDS-pdo_pgsql= databases/postgresql
> WANTLIB-pdo_pgsql= pq>=2 pthread
>
> # pgsql
> -MULTI_PACKAGES+= -pgsql
> +PHP_EXTENSIONS+= -pgsql
> COMMENT-pgsql= pgsql database access extensions for php
> CONFIGURE_ARGS+= --with-pgsql=shared,${LOCALBASE}
> LIB_DEPENDS-pgsql= databases/postgresql
> WANTLIB-pgsql= pq>=2 pthread
>
> # pspell
> -MULTI_PACKAGES+= -pspell
> +PHP_EXTENSIONS+= -pspell
> COMMENT-pspell= pspell library extensions for php
> CONFIGURE_ARGS+= --with-pspell=shared,${LOCALBASE}
> LIB_DEPENDS-pspell= textproc/aspell/core
> WANTLIB-pspell= aspell>=16 pspell>=16 pthread
>
> # shmop
> -MULTI_PACKAGES+= -shmop
> +PHP_EXTENSIONS+= -shmop
> COMMENT-shmop= shared memory extensions for php
> CONFIGURE_ARGS+= --enable-shmop=shared,${LOCALBASE}
> LIB_DEPENDS-shmop=
> WANTLIB-shmop= pthread
>
> # soap
> -MULTI_PACKAGES+= -soap
> +PHP_EXTENSIONS+= -soap
> COMMENT-soap= SOAP functions for php
> CONFIGURE_ARGS+= --enable-soap=shared,${LOCALBASE}
> LIB_DEPENDS-soap= textproc/libxml
> WANTLIB-soap= iconv m pthread z xml2>=8 lzma
>
> # snmp
> -MULTI_PACKAGES+= -snmp
> +PHP_EXTENSIONS+= -snmp
> COMMENT-snmp= snmp protocol extensions for php
> CONFIGURE_ARGS+= --with-snmp=shared,${LOCALBASE}
> LIB_DEPENDS-snmp= net/net-snmp
> WANTLIB-snmp= crypto m netsnmp>=6.2 pthread
>
> # pdo-dblib
> -MULTI_PACKAGES+= -pdo_dblib
> +PHP_EXTENSIONS+= -pdo_dblib
> COMMENT-pdo_dblib= PDO DB-LIB support for php
> CONFIGURE_ARGS+= --with-pdo-dblib=shared,${LOCALBASE}
> LIB_DEPENDS-pdo_dblib= databases/freetds
> WANTLIB-pdo_dblib= sybdb>=6 pthread
>
> # tidy
> -MULTI_PACKAGES+= -tidy
> +PHP_EXTENSIONS+= -tidy
> COMMENT-tidy= tidy HTML cleaner bindings
> CONFIGURE_ARGS+= --with-tidy=shared,${LOCALBASE}
> LIB_DEPENDS-tidy= www/tidyp
> WANTLIB-tidy= tidyp pthread
>
> # xml-rpc
> -MULTI_PACKAGES+= -xmlrpc
> +PHP_EXTENSIONS+= -xmlrpc
> COMMENT-xmlrpc= XML RPC functions for php
> CONFIGURE_ARGS+= --with-xmlrpc=shared
> LIB_DEPENDS-xmlrpc= textproc/libxml
> WANTLIB-xmlrpc= iconv m z xml2>=8 pthread lzma
>
> # xsl
> -MULTI_PACKAGES+= -xsl
> +PHP_EXTENSIONS+= -xsl
> COMMENT-xsl= XSL functions for php
> CONFIGURE_ARGS+= --with-xsl=shared --enable-dom
> LIB_DEPENDS-xsl= textproc/libxslt
> WANTLIB-xsl= m xml2 xslt>=3 exslt pthread
>
> # zip
> -MULTI_PACKAGES+= -zip
> +PHP_EXTENSIONS+= -zip
> COMMENT-zip= zip functions for php
> CONFIGURE_ARGS+= --enable-zip=shared,${LOCALBASE}
> LIB_DEPENDS-zip=
> WANTLIB-zip= z pthread
>
> # some variables to substitute
> -SUBST_VARS= MODPHP_CONFIG_PATH SV PV ^MODULE_NAME
> +SUBST_VARS= MODPHP_CONFIG_PATH SV PV
> PHP_VERSION= ${V}
> SV= ${PV:S/.//}
>
> @@ -302,16 +320,6 @@ SV= ${PV:S/.//}
> PHPXS_SUBST+= -e 's,${i},${${i}},'
> .endfor
>
> -WANTLIB-main+= c crypto iconv intl lzma m pthread ssl xml2>=8 z
> -WANTLIB-main+= curses readline ${COMPILER_LIBCXX}
> -
> -WANTLIB-cgi= ${WANTLIB-main}
> -LIB_DEPENDS-main= devel/gettext \
> - textproc/libxml
> -RUN_DEPENDS-main= mail/femail,-chroot
> -LIB_DEPENDS-cgi= ${LIB_DEPENDS-main}
> -RUN_DEPENDS-cgi= php-${V}:lang/php/${PV}
> -
> pre-fake:
> ${INSTALL_DATA_DIR} ${PREFIX}/${APACHE_MODULE_SUBDIR}/modules
>
> @@ -325,8 +333,7 @@ pre-configure:
> ${WRKSRC}/scripts/phpize.in \
> ${WRKSRC}/scripts/php-config.in
>
> -.for i in ${MULTI_PACKAGES:N-main:N-cgi:S/-//g}
> -MODULE_NAME-${i}= ${i}
> +.for i in ${MULTI_PACKAGES:N-main:S/-//g}
> DESCR-${i}= ${.CURDIR}/../files/DESCR-${i}
> PKGNAME-${i}= php-${i}-${V}
> .if ${V:M5.6*}
> @@ -338,7 +345,6 @@ RUN_DEPENDS-${i}+= php-${V}:lang/php/${P
> .endfor
>
> DESCR-main= ${.CURDIR}/../files/DESCR-main
> -DESCR-cgi= ${.CURDIR}/../files/DESCR-cgi
>
> post-install:
> ${SUBST_DATA} ${.CURDIR}/../files/README-main \
> @@ -365,17 +371,18 @@ post-install:
> @perl -pi -e
> "s,!!PREFIX!!,${TRUEPREFIX},g;s,!!PV!!,${PV},g;s,!!MV!!,${PV:R},g" \
> ${PREFIX}/share/examples/php-${PV}/php.conf
>
> -.for m in ${MULTI_PACKAGES:N-main:N-cgi:S/-//g}
> +.for m in ${PHP_EXTENSIONS:S/-//g}
> ${INSTALL_DATA} ${WRKBUILD}/modules/${m}.so \
> ${PREFIX}/${MODULES_SUBDIR}/${m}.so
> echo "extension=${m}.so" > \
> ${PREFIX}/share/examples/php-${PV}/${m}.ini
> .endfor
> - if [ -f ${WRKBUILD}/modules/opcache.so ]; then \
> - ${INSTALL_DATA} ${WRKBUILD}/modules/opcache.so \
> - ${PREFIX}/${MODULES_SUBDIR}/opcache.so; \
> - echo "zend_extension=opcache.so" > \
> - ${PREFIX}/share/examples/php-${PV}/opcache.ini; fi
> +.for m in ${ZEND_EXTENSIONS:S/-//g}
> + ${INSTALL_DATA} ${WRKBUILD}/modules/${m}.so \
> + ${PREFIX}/${MODULES_SUBDIR}/${m}.so
> + echo "zend_extension=${m}.so" > \
> + ${PREFIX}/share/examples/php-${PV}/${m}.ini
> +.endfor
> ${INSTALL_DATA_DIR} ${WRKINST}/${CHROOT_DIR}/etc
> echo "www:*:67:67::0:0:dummy user to appease
> c-client:/nonexistent:/sbin/nologin" > \
> ${WRKINST}/${CHROOT_DIR}/etc/master.passwd.imap
> Index: 5.6/Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/php/5.6/Makefile,v
> retrieving revision 1.60
> diff -u -p -r1.60 Makefile
> --- 5.6/Makefile 24 Apr 2018 15:26:58 -0000 1.60
> +++ 5.6/Makefile 2 May 2018 06:23:05 -0000
> @@ -4,6 +4,7 @@ BROKEN-alpha= pcre_jit_compile.c:65:2: e
>
> PV= 5.6
> V= ${PV}.35
> +REVISION= 0
>
> MASTER_SITES0= https://download.suhosin.org/
>
> @@ -24,21 +25,21 @@ pre-patch:
> .endif
>
> # mysql
> -MULTI_PACKAGES+= -mysql
> +PHP_EXTENSIONS= -mysql
> COMMENT-mysql= mysql database access extensions for php5
> CONFIGURE_ARGS+= --with-mysql=shared,${LOCALBASE}
> LIB_DEPENDS-mysql= databases/mariadb
> WANTLIB-mysql= pthread lib/mysql/mysqlclient
>
> # sybase-ct
> -MULTI_PACKAGES+= -sybase_ct
> +PHP_EXTENSIONS+= -sybase_ct
> COMMENT-sybase_ct= sybase database access extensions for php5
> CONFIGURE_ARGS+= --with-sybase-ct=shared,${LOCALBASE}
> LIB_DEPENDS-sybase_ct= databases/freetds
> WANTLIB-sybase_ct= ct pthread
>
> # mssql
> -MULTI_PACKAGES+= -mssql
> +PHP_EXTENSIONS+= -mssql
> COMMENT-mssql= microsoft sql access extensions for php5
> CONFIGURE_ARGS+= --with-mssql=shared,${LOCALBASE}
> LIB_DEPENDS-mssql= databases/freetds
> Index: 7.0/Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/php/7.0/Makefile,v
> retrieving revision 1.44
> diff -u -p -r1.44 Makefile
> --- 7.0/Makefile 24 Apr 2018 15:26:32 -0000 1.44
> +++ 7.0/Makefile 2 May 2018 06:23:05 -0000
> @@ -4,6 +4,7 @@ BROKEN-sparc64= SIGBUS during phar gener
>
> PV= 7.0
> V= ${PV}.29
> +REVISION= 0
>
> BUILD_DEPENDS+= devel/bison
No comments:
Post a Comment