Skip to content

Commit

Permalink
*/php80*: Refactor codes
Browse files Browse the repository at this point in the history
- Switch to system pcre2
- Remove no longer required CONFIGURE_ARGS
- Remove unnecessary patch from archivers/php80-phar
- Remove unnecessary patch from converters/php80-mbstring
- Add support for bdb:18 in databases/php80-dba
- Remove unnecessary introduction of configure flags in
  databases/php80-odbc
- Remove unnecessary patch from devel/php80-readline
- Remove NOOP post-patch target from ftp/php80-ftp
- Remove unnecessary patch and NOOP OPTIONS TRUETYPE from
  graphics/php80-gd
- Remove unnecessary patch from mail/php80-imap and remove the OPTION
  for using CCLIENT as this has been marked DEPRECATED since there has
  been no release in last 16 years
- Remove unnecessary patch from sysutils/php80-fileinfo
- Remove unnecessary patch from textproc/php80-simplexml
- Refactor patches for post-patch target in textproc/php80-enchant and
  switch to enchant2 for dependencies
- Refactor patches for post-patch target in textproc/php80-xsl
  • Loading branch information
5u623l20 committed Nov 18, 2023
1 parent 2b1c9d3 commit 4f698c4
Show file tree
Hide file tree
Showing 18 changed files with 56 additions and 390 deletions.
41 changes: 0 additions & 41 deletions archivers/php80-phar/files/patch-config.m4

This file was deleted.

44 changes: 0 additions & 44 deletions converters/php80-mbstring/files/patch-config.m4

This file was deleted.

36 changes: 6 additions & 30 deletions databases/php80-dba/files/patch-config.m4
@@ -1,50 +1,26 @@
--- config.m4.orig 2016-01-06 15:14:47 UTC
--- config.m4.orig 2023-08-03 17:13:08 UTC
+++ config.m4
@@ -324,6 +324,38 @@ if test "$PHP_DB4" != "no"; then
@@ -387,6 +387,14 @@ if test "$PHP_DB4" != "no"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/include/db5.3/db.h
break
+ elif test -f "$i/include/db5/db.h"; then
+ THIS_PREFIX=$i
+ THIS_INCLUDE=$i/include/db5/db.h
+ break
+ elif test -f "$i/include/db48/db.h"; then
+ elif test -f "$i/include/db18/db.h"; then
+ THIS_PREFIX=$i
+ THIS_INCLUDE=$i/include/db48/db.h
+ break
+ elif test -f "$i/include/db47/db.h"; then
+ THIS_PREFIX=$i
+ THIS_INCLUDE=$i/include/db47/db.h
+ break
+ elif test -f "$i/include/db46/db.h"; then
+ THIS_PREFIX=$i
+ THIS_INCLUDE=$i/include/db46/db.h
+ break
+ elif test -f "$i/include/db44/db.h"; then
+ THIS_PREFIX=$i
+ THIS_INCLUDE=$i/include/db44/db.h
+ break
+ elif test -f "$i/include/db43/db.h"; then
+ THIS_PREFIX=$i
+ THIS_INCLUDE=$i/include/db43/db.h
+ break
+ elif test -f "$i/include/db42/db.h"; then
+ THIS_PREFIX=$i
+ THIS_INCLUDE=$i/include/db42/db.h
+ break
+ elif test -f "$i/include/db41/db.h"; then
+ THIS_PREFIX=$i
+ THIS_INCLUDE=$i/include/db41/db.h
+ THIS_INCLUDE=$i/include/db18/db.h
+ break
elif test -f "$i/include/db5.1/db.h"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/include/db5.1/db.h
@@ -366,7 +398,7 @@ if test "$PHP_DB4" != "no"; then
@@ -429,7 +437,7 @@ if test "$PHP_DB4" != "no"; then
break
fi
done
- PHP_DBA_DB_CHECK(4, db-5.3 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
+ PHP_DBA_DB_CHECK(4, db-5 db-5.3 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
+ PHP_DBA_DB_CHECK(4, db-5 db-5.3 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db-18 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
fi
PHP_DBA_STD_RESULT(db4,Berkeley DB4)

34 changes: 12 additions & 22 deletions databases/php80-odbc/files/patch-config.m4
@@ -1,16 +1,6 @@
--- config.m4.orig 2019-08-06 06:54:18 UTC
--- config.m4.orig 2023-08-03 17:13:08 UTC
+++ config.m4
@@ -91,6 +91,9 @@ AC_DEFUN([PHP_ODBC_FIND_EMPRESS_BCS_LIBS
dnl
dnl configure options
dnl
+PHP_ARG_ENABLE(odbc,,
+[ --enable-odbc Enable ODBC support with selected driver])
+
PHP_ARG_WITH([odbcver],,
[AS_HELP_STRING([[--with-odbcver[=HEX]]],
@@ -102,7 +105,7 @@ PHP_ARG_WITH([odbcver],,
@@ -102,7 +102,7 @@ PHP_ARG_WITH([adabas],,
if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH([adabas],,
[AS_HELP_STRING([[--with-adabas[=DIR]]],
Expand All @@ -19,7 +9,7 @@

AC_MSG_CHECKING([for Adabas support])
if test "$PHP_ADABAS" != "no"; then
@@ -132,7 +135,7 @@ fi
@@ -132,7 +132,7 @@ PHP_ARG_WITH([sapdb],,
if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH([sapdb],,
[AS_HELP_STRING([[--with-sapdb[=DIR]]],
Expand All @@ -28,7 +18,7 @@

AC_MSG_CHECKING([for SAP DB support])
if test "$PHP_SAPDB" != "no"; then
@@ -153,7 +156,7 @@ fi
@@ -153,7 +153,7 @@ PHP_ARG_WITH([solid],,
if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH([solid],,
[AS_HELP_STRING([[--with-solid[=DIR]]],
Expand All @@ -37,7 +27,7 @@

AC_MSG_CHECKING(for Solid support)
if test "$PHP_SOLID" != "no"; then
@@ -181,7 +184,7 @@ fi
@@ -181,7 +181,7 @@ PHP_ARG_WITH([ibm-db2],,
if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH([ibm-db2],,
[AS_HELP_STRING([[--with-ibm-db2[=DIR]]],
Expand All @@ -46,7 +36,7 @@

AC_MSG_CHECKING(for IBM DB2 support)
if test "$PHP_IBM_DB2" != "no"; then
@@ -222,7 +225,7 @@ if test -z "$ODBC_TYPE"; then
@@ -222,7 +222,7 @@ PHP_ARG_WITH([empress],,
PHP_ARG_WITH([empress],,
[AS_HELP_STRING([[--with-empress[=DIR]]],
[Include Empress support $EMPRESSPATH (Empress Version >= 8.60
Expand All @@ -55,7 +45,7 @@

AC_MSG_CHECKING(for Empress support)
if test "$PHP_EMPRESS" != "no"; then
@@ -248,7 +251,7 @@ if test -z "$ODBC_TYPE"; then
@@ -248,7 +248,7 @@ PHP_ARG_WITH([empress-bcs],,
PHP_ARG_WITH([empress-bcs],,
[AS_HELP_STRING([[--with-empress-bcs[=DIR]]],
[Include Empress Local Access support $EMPRESSPATH (Empress Version >=
Expand All @@ -64,7 +54,7 @@

AC_MSG_CHECKING(for Empress local access support)
if test "$PHP_EMPRESS_BCS" != "no"; then
@@ -294,7 +297,7 @@ PHP_ARG_WITH([custom-odbc],,
@@ -294,7 +294,7 @@ PHP_ARG_WITH([custom-odbc],,
your include dirs. For example, you should define following for Sybase SQL
Anywhere 5.5.00 on QNX, prior to running this configure script:
CPPFLAGS="-DODBC_QNX -DSQLANY_BUG" LDFLAGS=-lunix
Expand All @@ -73,7 +63,7 @@

AC_MSG_CHECKING(for a custom ODBC support)
if test "$PHP_CUSTOM_ODBC" != "no"; then
@@ -317,7 +320,7 @@ fi
@@ -317,7 +317,7 @@ PHP_ARG_WITH([iodbc],,
if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH([iodbc],,
[AS_HELP_STRING([--with-iodbc],
Expand All @@ -82,7 +72,7 @@

AC_MSG_CHECKING(whether to build with iODBC support)
if test "$PHP_IODBC" != "no"; then
@@ -335,7 +338,7 @@ fi
@@ -335,7 +335,7 @@ PHP_ARG_WITH([esoob],,
if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH([esoob],,
[AS_HELP_STRING([[--with-esoob[=DIR]]],
Expand All @@ -91,7 +81,7 @@

AC_MSG_CHECKING(for Easysoft ODBC-ODBC Bridge support)
if test "$PHP_ESOOB" != "no"; then
@@ -358,7 +361,7 @@ fi
@@ -358,7 +358,7 @@ PHP_ARG_WITH([unixODBC],,
if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH([unixODBC],,
[AS_HELP_STRING([--with-unixODBC],
Expand All @@ -100,7 +90,7 @@

AC_MSG_CHECKING(whether to build with unixODBC support)
if test "$PHP_UNIXODBC" != "no"; then
@@ -386,7 +389,7 @@ fi
@@ -386,7 +386,7 @@ PHP_ARG_WITH([dbmaker],,
if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH([dbmaker],,
[AS_HELP_STRING([[--with-dbmaker[=DIR]]],
Expand Down
33 changes: 0 additions & 33 deletions devel/php80-readline/files/patch-config.m4

This file was deleted.

13 changes: 0 additions & 13 deletions devel/php80-readline/files/patch-readline_cli.c

This file was deleted.

4 changes: 0 additions & 4 deletions ftp/php80-ftp/Makefile
Expand Up @@ -6,8 +6,4 @@ PKGNAMESUFFIX= -ftp

TEST_TARGET= test

post-patch:
@${REINPLACE_CMD} s/HAVE_OPENSSL_EXT/__FreeBSD__/ \
${WRKSRC}/ftp.* ${WRKSRC}/php_ftp.*

.include "${MASTERDIR}/Makefile"
11 changes: 0 additions & 11 deletions graphics/php80-gd/files/patch-gd.c

This file was deleted.

9 changes: 5 additions & 4 deletions lang/php80/Makefile
Expand Up @@ -14,12 +14,13 @@ LICENSE= PHP301
DEPRECATED= Upstream support ends on 2023-11-26
EXPIRATION_DATE= 2023-12-31

USES+= compiler:c11 tar:xz cpe gnome pkgconfig
USES+= compiler:c11 tar:xz cpe gnome localbase pkgconfig
CPE_PRODUCT= php

CONFLICTS_INSTALL?= php[0-9][0-9]${PKGNAMESUFFIX}

.if !defined(PKGNAMESUFFIX)
BUILD_DEPENDS= re2c>0:devel/re2c
LIB_DEPENDS= libpcre2-8.so:devel/pcre2 \
libargon2.so:security/libargon2

Expand All @@ -31,9 +32,10 @@ CONFIGURE_ARGS+= \
--with-layout=GNU \
--with-libxml \
--with-openssl \
--with-password-argon2=${LOCALBASE}
--with-password-argon2=${LOCALBASE} \
--with-external-pcre=${LOCALBASE}

USES+= autoreconf:build localbase ssl
USES+= autoreconf:build ssl
USE_GNOME= libxml2

LDFLAGS= -L${OPENSSLLIB} -lcrypto -lssl
Expand Down Expand Up @@ -128,7 +130,6 @@ CONFIGURE_ENV+= ac_cv_decimal_fp_supported="no" \

post-patch:
@${TOUCH} ${WRKSRC}/ext/php_config.h
@${REINPLACE_CMD} "s|^\(extension_dir\)|; \1|" ${WRKSRC}/php.ini-*

post-patch-FPM-on:
@${REINPLACE_CMD} -e "s|^;\(pid\)|\1|;s|^;\(pm\.[a-z_]*_servers\)|\1|" \
Expand Down

0 comments on commit 4f698c4

Please sign in to comment.