From 02053fe42b041666b6323f056fa68f5028cb0316 Mon Sep 17 00:00:00 2001 From: Oleg Borodin Date: Sun, 2 Oct 2022 21:10:19 +0200 Subject: [PATCH] updated php72 --- php72/php-mod-posix/files/patch-posix.c | 38 +++++++++++++++++++ php72/php-mod-readline/files/patch-config.m4 | 30 +++++++++++++++ .../files/patch-readline_cli.c | 13 +++++++ .../php-mod-readline/files/patch-x-config.m4 | 12 ------ .../Makefile | 11 +++--- .../distinfo | 2 +- .../pkg-descr | 0 7 files changed, 87 insertions(+), 19 deletions(-) create mode 100644 php72/php-mod-posix/files/patch-posix.c create mode 100644 php72/php-mod-readline/files/patch-config.m4 create mode 100644 php72/php-mod-readline/files/patch-readline_cli.c delete mode 100644 php72/php-mod-readline/files/patch-x-config.m4 rename php72/{php-mod-mcrypt => php-mod-sodium}/Makefile (85%) rename php72/{php-mod-mcrypt => php-mod-sodium}/distinfo (84%) rename php72/{php-mod-mcrypt => php-mod-sodium}/pkg-descr (100%) diff --git a/php72/php-mod-posix/files/patch-posix.c b/php72/php-mod-posix/files/patch-posix.c new file mode 100644 index 00000000..d2365b24 --- /dev/null +++ b/php72/php-mod-posix/files/patch-posix.c @@ -0,0 +1,38 @@ +--- posix.c.orig Fri Feb 23 00:40:39 2007 ++++ posix.c Sun May 13 17:52:27 2007 +@@ -838,7 +838,7 @@ + #if defined(ZTS) && defined(HAVE_GETGRNAM_R) && defined(_SC_GETGR_R_SIZE_MAX) + buflen = sysconf(_SC_GETGR_R_SIZE_MAX); + if (buflen < 1) { +- RETURN_FALSE; ++ buflen = 1024; + } + buf = emalloc(buflen); + g = &gbuf; +@@ -888,7 +888,7 @@ + + grbuflen = sysconf(_SC_GETGR_R_SIZE_MAX); + if (grbuflen < 1) { +- RETURN_FALSE; ++ grbuflen = 1024; + } + + grbuf = emalloc(grbuflen); +@@ -955,7 +955,7 @@ + #if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWNAM_R) + buflen = sysconf(_SC_GETPW_R_SIZE_MAX); + if (buflen < 1) { +- RETURN_FALSE; ++ buflen = 1024; + } + buf = emalloc(buflen); + pw = &pwbuf; +@@ -1004,7 +1004,7 @@ + #if defined(ZTS) && defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWUID_R) + pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); + if (pwbuflen < 1) { +- RETURN_FALSE; ++ pwbuflen = 1024; + } + pwbuf = emalloc(pwbuflen); + diff --git a/php72/php-mod-readline/files/patch-config.m4 b/php72/php-mod-readline/files/patch-config.m4 new file mode 100644 index 00000000..4525b849 --- /dev/null +++ b/php72/php-mod-readline/files/patch-config.m4 @@ -0,0 +1,30 @@ +--- config.m4.orig 2019-02-05 15:43:40 UTC ++++ config.m4 +@@ -5,13 +5,8 @@ dnl + PHP_ARG_WITH(libedit,for libedit readline replacement, + [ --with-libedit[=DIR] Include libedit readline replacement (CLI/CGI only)]) + +-if test "$PHP_LIBEDIT" = "no"; then + PHP_ARG_WITH(readline,for readline support, + [ --with-readline[=DIR] Include readline support (CLI/CGI only)]) +-else +- dnl "register" the --with-readline option to preven invalid "unknown configure option" warning +- php_with_readline=no +-fi + + if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then + for i in $PHP_READLINE /usr/local /usr; do +@@ -74,6 +69,13 @@ if test "$PHP_READLINE" && test "$PHP_RE + -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS + ]) + ++ PHP_CHECK_LIBRARY(readline, rl_completion_matches, ++ [ ++ AC_DEFINE(HAVE_RL_COMPLETION_MATCHES, 1, [ ]) ++ ],[],[ ++ -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS ++ ]) ++ + AC_DEFINE(HAVE_LIBREADLINE, 1, [ ]) + + elif test "$PHP_LIBEDIT" != "no"; then diff --git a/php72/php-mod-readline/files/patch-readline_cli.c b/php72/php-mod-readline/files/patch-readline_cli.c new file mode 100644 index 00000000..02f55974 --- /dev/null +++ b/php72/php-mod-readline/files/patch-readline_cli.c @@ -0,0 +1,13 @@ +--- readline_cli.c.orig 2012-03-02 16:40:26.000000000 +0100 ++++ readline_cli.c 2012-03-02 16:40:43.000000000 +0100 +@@ -19,6 +19,10 @@ + + /* $Id: readline_cli.c 321634 2012-01-01 13:15:04Z felipe $ */ + ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ + #include "php.h" + + #ifndef HAVE_RL_COMPLETION_MATCHES diff --git a/php72/php-mod-readline/files/patch-x-config.m4 b/php72/php-mod-readline/files/patch-x-config.m4 deleted file mode 100644 index 13a06def..00000000 --- a/php72/php-mod-readline/files/patch-x-config.m4 +++ /dev/null @@ -1,12 +0,0 @@ ---- ./config.m4.orig 2016-01-06 17:14:47.000000000 +0200 -+++ ./config.m4 2016-12-03 22:19:43.223269000 +0200 -@@ -2,9 +2,6 @@ - dnl $Id$ - dnl - --PHP_ARG_WITH(libedit,for libedit readline replacement, --[ --with-libedit[=DIR] Include libedit readline replacement (CLI/CGI only)]) -- - if test "$PHP_LIBEDIT" = "no"; then - PHP_ARG_WITH(readline,for readline support, - [ --with-readline[=DIR] Include readline support (CLI/CGI only)]) diff --git a/php72/php-mod-mcrypt/Makefile b/php72/php-mod-sodium/Makefile similarity index 85% rename from php72/php-mod-mcrypt/Makefile rename to php72/php-mod-sodium/Makefile index acec9f3b..b1ba52a1 100644 --- a/php72/php-mod-mcrypt/Makefile +++ b/php72/php-mod-sodium/Makefile @@ -30,9 +30,7 @@ COMMENT= PHP Scripting Language (Apache Module and CLI) BUILD_DEPENDS+= php:lang/php${PORTVERSION:R:S/.//g} #RUN_DEPENDS #BUILD_DEPENDS+= ${RUN_DEPENDS} -LIB_DEPENDS+= libmcrypt.so:crypto/libmcrypt -###LIB_DEPENDS+= libmhash.so:crypto/libmhash - +#LIB_DEPENDS+= libxml2.so:text/libxml2 EXTRACT_AFTER_ARGS= ${DISTNAME}/ext/${MODULE_NAME} @@ -44,8 +42,9 @@ USES+= tar:xz gmake GNU_CONFIGURE= yes CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/php LDFLAGS= -L${LOCALBASE}/lib +CONFIGURE_ARGS+= --with-libxml-dir=${LOCALBASE} -MODULE_NAME= mcrypt +MODULE_NAME= sodium DESTDIRNAME= INSTALL_ROOT #EXTDIR #INCLUDEDIR @@ -57,9 +56,9 @@ post-install: ${RM} -f ${TMPPLIST} cd ${STAGEDIR}${PREFIX} && ${FIND} lib/php -type f >> ${TMPPLIST} ${MKDIR} ${STAGEDIR}${PREFIX}/include/php - cd ${STAGEDIR}${PREFIX} && ${FIND} include/php -type f >> ${TMPPLIST} +# cd ${STAGEDIR}${PREFIX} && ${FIND} include/php -type f >> ${TMPPLIST} cd ${STAGEDIR}${PREFIX} && ${FIND} -ds lib/php -type d | ${SED} -e 's,^,@dir ,' >> ${TMPPLIST} - cd ${STAGEDIR}${PREFIX} && ${FIND} -ds include/php -type d | ${SED} -e 's,^,@dir ,' >> ${TMPPLIST} +# cd ${STAGEDIR}${PREFIX} && ${FIND} -ds include/php -type d | ${SED} -e 's,^,@dir ,' >> ${TMPPLIST} .include #EOF diff --git a/php72/php-mod-mcrypt/distinfo b/php72/php-mod-sodium/distinfo similarity index 84% rename from php72/php-mod-mcrypt/distinfo rename to php72/php-mod-sodium/distinfo index 912baf57..9760d5c2 100644 --- a/php72/php-mod-mcrypt/distinfo +++ b/php72/php-mod-sodium/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1571945608 +TIMESTAMP = 1571945612 SHA256 (php-7.2.24.tar.xz) = a6a6cc03388060aa5f8f9e45799b72bce1c7ed7b9d7b3f1187787202aad91d25 SIZE (php-7.2.24.tar.xz) = 12302284 diff --git a/php72/php-mod-mcrypt/pkg-descr b/php72/php-mod-sodium/pkg-descr similarity index 100% rename from php72/php-mod-mcrypt/pkg-descr rename to php72/php-mod-sodium/pkg-descr