Add support for readline (for interactive PHP CLI).

Add support for DTrace.
This commit is contained in:
fhajny 2012-07-25 13:01:05 +00:00
parent 9e40e35c78
commit 36fb10a7cd
4 changed files with 41 additions and 12 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile.php,v 1.1 2012/06/16 05:21:55 taca Exp $
# $NetBSD: Makefile.php,v 1.2 2012/07/25 13:01:05 fhajny Exp $
# used by lang/php54/Makefile
# used by www/ap-php/Makefile
@ -11,7 +11,7 @@ USE_LIBTOOL= YES
USE_LANGUAGES= c c++
GNU_CONFIGURE= YES
BUILD_DEFS+= VARBASE
PLIST_VARS+= suhosin
PLIST_VARS+= suhosin dtrace
CONFIGURE_ENV+= EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}"
@ -44,9 +44,13 @@ CONFIGURE_ARGS+= --with-libxml-dir=${PREFIX}
# Note: This expression is the same as ${PKGBASE}, but the latter is
# not defined yet, so we cannot use it here.
PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[0-9].*//}
PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts # suhosin
PKG_SUPPORTED_OPTIONS+= inet6 ssl maintainer-zts readline # suhosin
PKG_SUGGESTED_OPTIONS+= inet6 ssl
.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD"
PKG_SUPPORTED_OPTIONS+= dtrace
.endif
#SUBST_CLASSES+= ini
#SUBST_STAGE.ini= post-patch
#SUBST_FILES.ini= php.ini-development
@ -95,5 +99,20 @@ CONFIGURE_ARGS+= --without-openssl
CONFIGURE_ARGS+= --enable-maintainer-zts
.endif
.if !empty(PKG_OPTIONS:Mreadline)
.include "../../devel/readline/buildlink3.mk"
CONFIGURE_ARGS+= --with-readline=${BUILDLINK_PREFIX.readline}
.else
CONFIGURE_ARGS+= --without-readline
.endif
.if !empty(PKG_OPTIONS:Mdtrace)
PLIST.dtrace= yes
CONFIGURE_ARGS+= --enable-dtrace
# See https://bugs.php.net/bug.php?id=61268
INSTALL_MAKE_FLAGS+= -r
.endif
DL_AUTO_VARS= yes
.include "../../mk/dlopen.buildlink3.mk"

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.1 2012/06/16 05:21:55 taca Exp $
@comment $NetBSD: PLIST,v 1.2 2012/07/25 13:01:05 fhajny Exp $
bin/phar
bin/phar.phar
bin/php
@ -25,6 +25,7 @@ include/php/Zend/zend_config.nw.h
include/php/Zend/zend_config.w32.h
include/php/Zend/zend_constants.h
include/php/Zend/zend_dtrace.h
${PLIST.dtrace}include/php/Zend/zend_dtrace_gen.h
include/php/Zend/zend_dynamic_array.h
include/php/Zend/zend_errors.h
include/php/Zend/zend_exceptions.h

View file

@ -1,10 +1,10 @@
$NetBSD: distinfo,v 1.2 2012/07/20 12:29:05 taca Exp $
$NetBSD: distinfo,v 1.3 2012/07/25 13:01:05 fhajny Exp $
SHA1 (php-5.4.5.tar.bz2) = b6c5e6653ba28e2f071bafe30c9691eddb950ba0
RMD160 (php-5.4.5.tar.bz2) = 1f89a9b31d5e14765ad9c4acff43aad825e1f9d8
Size (php-5.4.5.tar.bz2) = 11011780 bytes
SHA1 (patch-acinclude.m4) = afead7122844e8290d9ef4fdb8deec3c40cf0746
SHA1 (patch-configure) = 149d27b5e120e0a15c93d25bcb219ea23caaecba
SHA1 (patch-configure) = 5930b32de104cda553c9701086ffdf35a93f8d97
SHA1 (patch-ext_gd_config.m4) = 089f1c88bd4daa8ebc8911122423c1f88e5d84a0
SHA1 (patch-ext_imap_config.m4) = 01681e8b54ee586ec4db72a5da2d0aec3fa89fcc
SHA1 (patch-ext_mssql_php__mssql.c) = 732e48b05086180585a3087c2e9737db557dbc3b

View file

@ -1,8 +1,17 @@
$NetBSD: patch-configure,v 1.1 2012/06/16 05:21:55 taca Exp $
$NetBSD: patch-configure,v 1.2 2012/07/25 13:01:05 fhajny Exp $
--- configure.orig 2012-05-03 17:11:27.000000000 +0000
--- configure.orig 2012-06-13 06:08:07.000000000 +0000
+++ configure
@@ -23334,7 +23334,7 @@ fi
@@ -20528,7 +20528,7 @@ _ACEOF
cat>>Makefile.objects<<EOF
$ac_bdir$ac_hdrobj: $abs_srcdir/$ac_provsrc
- dtrace -h -C -s $ac_srcdir$ac_provsrc -o \$@ && \$(SED) -ibak 's,PHP_,DTRACE_,g' \$@
+ dtrace -h -C -s $ac_srcdir$ac_provsrc -o \$@ && \$(SED) 's,PHP_,DTRACE_,g' \$@ > \$@.tmp && mv \$@.tmp \$@
\$(PHP_DTRACE_OBJS): $ac_bdir$ac_hdrobj
@@ -23313,7 +23313,7 @@ fi
if test "$found_openssl" = "no"; then
if test "$PHP_OPENSSL_DIR" = "yes"; then
@ -11,7 +20,7 @@ $NetBSD: patch-configure,v 1.1 2012/06/16 05:21:55 taca Exp $
fi
for i in $PHP_OPENSSL_DIR; do
@@ -25333,7 +25333,7 @@ $as_echo "yes" >&6; }
@@ -25312,7 +25312,7 @@ $as_echo "yes" >&6; }
PHP_SQLITE3_CFLAGS="-I@ext_srcdir@/libsqlite $other_flags $threadsafe_flags $debug_flags"
@ -20,7 +29,7 @@ $NetBSD: patch-configure,v 1.1 2012/06/16 05:21:55 taca Exp $
unique=`echo $header_file|$SED 's/[^a-zA-Z0-9]/_/g'`
@@ -36571,7 +36571,7 @@ fi
@@ -36556,7 +36556,7 @@ fi
if test "$found_openssl" = "no"; then
if test "$PHP_OPENSSL_DIR" = "yes"; then
@ -38,7 +47,7 @@ $NetBSD: patch-configure,v 1.1 2012/06/16 05:21:55 taca Exp $
fi
for i in $PHP_OPENSSL_DIR; do
@@ -105056,12 +105056,7 @@ old_CC=$CC
@@ -105147,12 +105147,7 @@ old_CC=$CC
if test "$PHP_THREAD_SAFETY" = "yes" && test -n "$ac_cv_pthreads_cflags"; then
CXXFLAGS="$CXXFLAGS $ac_cv_pthreads_cflags"
INLINE_CFLAGS="$INLINE_CFLAGS $ac_cv_pthreads_cflags"