Sunday, May 27, 2018

Re: PHP enable phpdbg SAPI

Paragraphs in DESCR-dbg would read better the other way round, otherwise ok.

On 2018/05/27 08:52, Martijn van Duren wrote:
> This diff enables the phpdbg SAPI. It's not perfect, but helped me out a
> couple of times in the past.
>
> OK?
>
> martijn@
>
> Index: Makefile.inc
> ===================================================================
> RCS file: /cvs/ports/lang/php/Makefile.inc,v
> retrieving revision 1.107
> diff -u -p -r1.107 Makefile.inc
> --- Makefile.inc 25 May 2018 22:43:41 -0000 1.107
> +++ Makefile.inc 27 May 2018 06:51:32 -0000
> @@ -4,6 +4,7 @@ BROKEN-hppa= no __sync_bool_compare_and_
>
> COMMENT-main= server-side HTML-embedded scripting language
> COMMENT-cgi= cgi sapi for php
> +COMMENT-dbg= debug sapi for php
>
> PKGNAME-main?= php-${V}
>
> @@ -72,7 +73,11 @@ CONFIGURE_ARGS+= --enable-shared \
> CONFIGURE_ARGS+= --with-mysql-sock=${LOCALSTATEDIR}/run/mysql/mysql.sock
>
> # sapi
> +# cgi
> CONFIGURE_ARGS+= --enable-cgi
> +# phpdbg
> +CONFIGURE_ARGS+= --enable-phpdbg
> +WANTLIB-dbg= readline
>
> CONFIGURE_ARGS+= --with-apxs2=${LOCALBASE}/sbin/apxs2
> BUILD_DEPENDS+= www/apache-httpd
> @@ -109,7 +114,7 @@ CONFIGURE_ARGS+= --with-openssl \
> TEST_TARGET= test
> TEST_FLAGS= NO_INTERACTION=1
>
> -SAPI+= -main -cgi
> +SAPI+= -main -cgi -dbg
> ZEND_EXTENSIONS+= -opcache
> MULTI_PACKAGES+= ${SAPI} ${PHP_EXTENSIONS}
>
> @@ -378,6 +383,8 @@ post-install:
> ${INSTALL_PROGRAM} ${WRKBUILD}/sapi/cgi/php-cgi ${PREFIX}/bin/php-cgi-${PV}
> # Make sure that php-cgi.1 still just sources php.1 when importing a new major version.
> ${INSTALL_MAN} ${WRKSRC}/sapi/cli/php.1 ${PREFIX}/man/man1/php-cgi-${PV}.1
> + ${INSTALL_PROGRAM} ${WRKBUILD}/sapi/phpdbg/phpdbg ${PREFIX}/bin/phpdbg-${PV}
> + ${INSTALL_MAN} ${WRKBUILD}/sapi/phpdbg/phpdbg.1 ${PREFIX}/man/man1/phpdbg-${PV}.1
> ${INSTALL_PROGRAM} ${WRKBUILD}/ext/phar/phar.phar ${PREFIX}/bin/phar-${PV}
> ${INSTALL_MAN} ${WRKBUILD}/ext/phar/phar.1 ${PREFIX}/man/man1/phar-${PV}.1
> ${INSTALL_PROGRAM} ${WRKBUILD}/sapi/fpm/php-fpm ${PREFIX}/sbin/php-fpm-${PV}
> Index: 5.6/patches/patch-sapi_phpdbg_phpdbg_h
> ===================================================================
> RCS file: 5.6/patches/patch-sapi_phpdbg_phpdbg_h
> diff -N 5.6/patches/patch-sapi_phpdbg_phpdbg_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ 5.6/patches/patch-sapi_phpdbg_phpdbg_h 27 May 2018 06:51:32 -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +
> +Index: sapi/phpdbg/phpdbg.h
> +--- sapi/phpdbg/phpdbg.h.orig
> ++++ sapi/phpdbg/phpdbg.h
> +@@ -64,7 +64,7 @@
> + # include "TSRM.h"
> +

No comments:

Post a Comment