pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/php74 lang/php74: Add php74 version 7.4.0 pacakge.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4f1a383da85e
branches:  trunk
changeset: 345631:4f1a383da85e
user:      taca <taca%pkgsrc.org@localhost>
date:      Sun Dec 15 17:56:34 2019 +0000

description:
lang/php74: Add php74 version 7.4.0 pacakge.

Add php74 version 7.4.0 pacakge based on php73.

PHP is a widely-used open source general-purpose scripting language
that is especially suited for web development and can be embedded
into HTML.  It is modular, and object-oriented.  Much of its syntax
is borrowed from C, Java and Perl with a couple of unique PHP-specific
features thrown in.  The language is designed to allow web developers
to write dynamically generated pages quickly.

PHP 7.4 comes with numerous improvements and new features such as

* Typed Properties
* Arrow Functions
* Limited Return Type Covariance and Argument Type Contravariance
* Unpacking Inside Arrays
* Numeric Literal Separator
* Weak References
* Allow Exceptions from __toString()
* Opcache Preloading
* Several Deprecations
* Extensions Removed from the Core

diffstat:

 lang/php74/DESCR                                    |   23 +
 lang/php74/MESSAGE                                  |   11 +
 lang/php74/Makefile                                 |   75 +++++
 lang/php74/Makefile.common                          |   32 ++
 lang/php74/Makefile.php                             |  112 +++++++
 lang/php74/PLIST                                    |  286 ++++++++++++++++++++
 lang/php74/buildlink3.mk                            |   15 +
 lang/php74/distinfo                                 |   19 +
 lang/php74/patches/patch-configure                  |   67 ++++
 lang/php74/patches/patch-disable-filter-url         |   30 ++
 lang/php74/patches/patch-ext_phar_Makefile.frag     |   15 +
 lang/php74/patches/patch-ext_phar_phar_phar.php     |   12 +
 lang/php74/patches/patch-ext_tidy_config.m4         |   15 +
 lang/php74/patches/patch-ext_xsl_php__xsl.h         |   15 +
 lang/php74/patches/patch-php.ini-development        |   34 ++
 lang/php74/patches/patch-php.ini-production         |   34 ++
 lang/php74/patches/patch-run-tests.php              |   12 +
 lang/php74/patches/patch-sapi_cgi_Makefile.frag     |   18 +
 lang/php74/patches/patch-sapi_cli_Makefile.frag     |   19 +
 lang/php74/patches/patch-sapi_fpm_fpm_events_port.c |   49 +++
 lang/php74/patches/patch-sapi_fpm_php-fpm.conf.in   |   15 +
 21 files changed, 908 insertions(+), 0 deletions(-)

diffs (truncated from 992 to 300 lines):

diff -r d5b260b1e568 -r 4f1a383da85e lang/php74/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php74/DESCR  Sun Dec 15 17:56:34 2019 +0000
@@ -0,0 +1,23 @@
+PHP is a widely-used open source general-purpose scripting language
+that is especially suited for web development and can be embedded
+into HTML.  It is modular, and object-oriented.  Much of its syntax
+is borrowed from C, Java and Perl with a couple of unique PHP-specific
+features thrown in.  The language is designed to allow web developers
+to write dynamically generated pages quickly.
+
+PHP 7.4 comes with numerous improvements and new features such as
+
+* Typed Properties
+* Arrow Functions
+* Limited Return Type Covariance and Argument Type Contravariance
+* Unpacking Inside Arrays
+* Numeric Literal Separator
+* Weak References
+* Allow Exceptions from __toString()
+* Opcache Preloading
+* Several Deprecations
+* Extensions Removed from the Core
+
+For source downloads of PHP 7.4 please visit our downloads page Windows
+binaries can be found on the PHP for Windows site.  The list of changes is
+recorded in the ChangeLog.
diff -r d5b260b1e568 -r 4f1a383da85e lang/php74/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php74/MESSAGE        Sun Dec 15 17:56:34 2019 +0000
@@ -0,0 +1,11 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2019/12/15 17:56:34 taca Exp $
+
+To process PHP scripts, you will need a PHP-enabled HTTP server.  You may
+either configure the HTTP server to use the PHP CGI binary located in
+
+        ${CGIDIR}/php
+
+or you may install a PHP module for your HTTP server, e.g. www/ap-php.
+
+===========================================================================
diff -r d5b260b1e568 -r 4f1a383da85e lang/php74/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php74/Makefile       Sun Dec 15 17:56:34 2019 +0000
@@ -0,0 +1,75 @@
+# $NetBSD: Makefile,v 1.1 2019/12/15 17:56:34 taca Exp $
+
+#
+# We can't omit PKGNAME here to handle PKG_OPTIONS.
+#
+PKGNAME=               php-${PHP_VERSION:S/RC/rc/}
+
+COMMENT=               PHP Hypertext Preprocessor version 7.4
+LICENSE=               php
+
+TEST_TARGET=           test
+
+USE_TOOLS+=            gmake lex
+LIBTOOL_OVERRIDE=      # empty
+PHP_CHECK_INSTALLED=   No
+
+PHP_VERSIONS_ACCEPTED=         74
+
+.include "Makefile.php"
+
+CGIDIR=                        ${PREFIX}/libexec/cgi-bin
+EGDIR=                 ${PREFIX}/share/examples/php
+MESSAGE_SUBST+=                CGIDIR=${CGIDIR}
+
+CONFIGURE_ENV+=                lt_cv_path_SED=${SED:Q}
+MAKE_ENV+=             INSTALL_ROOT=${DESTDIR}
+
+CONF_FILES=            ${EGDIR}/php.ini-production ${PKG_SYSCONFDIR}/php.ini
+PLIST_SUBST+=          PHPEXTDIR="${PHP_EXTENSION_DIR}"
+
+# taken from devel/pkgconf/Makefile
+PKGCONFIG_PATHS=       ${PREFIX}/lib/pkgconfig
+PKGCONFIG_PATHS+=      ${PREFIX}/share/pkgconfig
+PKGCONFIG_PATHS+=      /usr/lib/pkgconfig
+
+# At this point, PREFIX is not set yet.
+.if ${LOCALBASE} != ${X11BASE}
+PKGCONFIG_PATHS+=      ${X11BASE}/lib/pkgconfig
+.endif
+
+PHP_PKGCONFIG_PATH=    ${PKGCONFIG_PATHS:ts:}
+
+SUBST_CLASSES+=                path
+SUBST_MESSAGE.path=    Fixing common paths.
+SUBST_STAGE.path=      pre-configure
+SUBST_FILES.path=      configure
+SUBST_FILES.path+=     ext/phar/phar/phar.php
+SUBST_FILES.path+=     php.ini-development php.ini-production run-tests.php
+SUBST_FILES.path+=     sapi/cgi/Makefile.frag
+SUBST_VARS.path=       CGIDIR
+SUBST_VARS.path+=      PREFIX
+SUBST_VARS.path+=      TOOLS_PATH.pkg-config PHP_PKGCONFIG_PATH
+
+INSTALLATION_DIRS+=    ${CGIDIR} ${PHP_EXTENSION_DIR} ${EGDIR} share/php
+
+# Make sure modules can link correctly
+.if ${OPSYS} == "Darwin"
+INSTALL_UNSTRIPPED=    yes
+.endif
+
+# Darwin < 9 (Mac OS X < 10.5 "Leopard") doesn't have gethostuuid(2)
+# and lacks the zone memory allocator
+.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
+CFLAGS+=       -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_WITHOUT_ZONEMALLOC
+.endif
+
+post-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/sapi/cli/php ${DESTDIR}${PREFIX}/bin/php
+       ${INSTALL_DATA} ${WRKSRC}/sapi/cli/php.1 \
+               ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/php.1
+       ${INSTALL_PROGRAM} ${WRKSRC}/sapi/cgi/php-cgi ${DESTDIR}${CGIDIR}/php
+       cd ${WRKSRC}; ${INSTALL_DATA} php.ini-development php.ini-production \
+               ${DESTDIR}${EGDIR}
+
+.include "../../mk/bsd.pkg.mk"
diff -r d5b260b1e568 -r 4f1a383da85e lang/php74/Makefile.common
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php74/Makefile.common        Sun Dec 15 17:56:34 2019 +0000
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile.common,v 1.1 2019/12/15 17:56:34 taca Exp $
+# used by lang/php74/Makefile.php
+# used by lang/php/ext.mk
+# used by meta-pkgs/php74-extensions/Makefile
+
+PHP_VERSION_REQD=      74
+
+.include "../../lang/php/common.mk"
+
+CATEGORIES+=           www
+MAINTAINER?=           pkgsrc-users%NetBSD.org@localhost
+
+USE_TOOLS+=            pkg-config
+
+# needed due to (broken?) configure checks in php-xmlrpc and php5-dom
+CONFIGURE_ENV+=                PHP_LIBXML_SHARED="1"
+
+.if ${OPSYS} == "NetBSD"
+CONFIGURE_ARGS+=       ax_cv_have_func_attribute_ifunc=no
+.endif
+
+.include "../../mk/compiler.mk"
+.if !empty(PKGSRC_COMPILER:Mclang)
+# configure test gets confused by wrappers dropping -R /usr/lib
+CONFIGURE_ARGS+=       php_cv_cc_dashr=no
+.endif
+
+# not every extension actually depend on PCRE, and those which do
+# don't use internal pcre structures, so default to build-time
+# dependency only
+BUILDLINK_DEPMETHOD.pcre2?=    build
+.include "../../devel/pcre2/buildlink3.mk"
diff -r d5b260b1e568 -r 4f1a383da85e lang/php74/Makefile.php
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php74/Makefile.php   Sun Dec 15 17:56:34 2019 +0000
@@ -0,0 +1,112 @@
+# $NetBSD: Makefile.php,v 1.1 2019/12/15 17:56:34 taca Exp $
+# used by lang/php74/Makefile
+# used by www/ap-php/Makefile
+# used by www/php-fpm/Makefile
+
+# segfaults when buidling with many compilers
+# https://bugs.php.net/bug.php?id=74527
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86236
+.if ${MACHINE_ARCH} == "i386"
+CONFIGURE_ARGS+=       --disable-gcc-global-regs
+.endif
+
+# the binary actually needs full dep on PCRE
+BUILDLINK_DEPMETHOD.pcre2=     full
+
+USE_LIBTOOL=           YES
+USE_LANGUAGES=         c c++
+GNU_CONFIGURE=         YES
+BUILD_DEFS+=           VARBASE
+PLIST_VARS+=           dtrace
+
+.include "../../lang/php74/Makefile.common"
+
+DISTINFO_FILE= ${.CURDIR}/../../lang/php74/distinfo
+PATCHDIR=      ${.CURDIR}/../../lang/php74/patches
+
+CONFIGURE_ARGS+=       --with-config-file-path=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+=       --with-config-file-scan-dir=${PKG_SYSCONFDIR}/php.d
+CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+=       --localstatedir=${VARBASE}
+
+CONFIGURE_ARGS+=       --without-mysqli
+CONFIGURE_ARGS+=       --without-iconv
+CONFIGURE_ARGS+=       --without-pear
+CONFIGURE_ARGS+=       --without-sqlite3
+#CONFIGURE_ARGS+=      --without-intl
+
+CONFIGURE_ARGS+=       --disable-posix
+CONFIGURE_ARGS+=       --disable-opcache
+CONFIGURE_ARGS+=       --disable-pdo
+CONFIGURE_ARGS+=       --disable-json
+
+CONFIGURE_ARGS+=       --enable-cgi
+CONFIGURE_ARGS+=       --enable-mysqlnd
+CONFIGURE_ARGS+=       --enable-xml
+#CONFIGURE_ARGS+=      --with-libxml-dir=${PREFIX}
+
+CONFIGURE_ENV+=                EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}"
+
+.include "../../textproc/libxml2/buildlink3.mk"
+
+#CONFIGURE_ARGS+=      --with-pcre-regex=${BUILDLINK_PREFIX.pcre2}
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.${PHP_PKG_PREFIX}
+PKG_SUPPORTED_OPTIONS+=        inet6 ssl maintainer-zts readline argon2
+PKG_SUPPORTED_OPTIONS+=        disable-filter-url
+PKG_SUGGESTED_OPTIONS+=        inet6 ssl readline
+
+.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" || ${OPSYS} == "FreeBSD"
+PKG_SUPPORTED_OPTIONS+=        dtrace
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+=       --enable-ipv6
+.else
+CONFIGURE_ARGS+=       --disable-ipv6
+.endif
+
+.if !empty(PKG_OPTIONS:Mssl)
+.  include "../../security/openssl/buildlink3.mk"
+.  if ${OPSYS} == "SunOS"
+CONFIGURE_ARGS+=       --with-openssl=yes
+LIBS.SunOS+=           -lcrypto
+.  else
+CONFIGURE_ARGS+=       --with-openssl=${BUILDLINK_PREFIX.openssl}
+.  endif
+.else
+CONFIGURE_ARGS+=       --without-openssl
+.endif
+
+.if !empty(PKG_OPTIONS:Mmaintainer-zts)
+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
+
+.if !empty(PKG_OPTIONS:Margon2)
+CONFIGURE_ARGS+=       --with-password-argon2=${BUILDLINK_PREFIX.argon2}
+.include "../../security/argon2/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mdisable-filter-url)
+CFLAGS+=               -DDISABLE_FILTER_URL
+.endif
+
+DL_AUTO_VARS=          yes
+.include "../../mk/dlopen.buildlink3.mk"
diff -r d5b260b1e568 -r 4f1a383da85e lang/php74/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php74/PLIST  Sun Dec 15 17:56:34 2019 +0000
@@ -0,0 +1,286 @@
+@comment $NetBSD: PLIST,v 1.1 2019/12/15 17:56:34 taca Exp $
+bin/phar
+bin/phar.phar
+bin/php
+bin/php-config
+bin/phpdbg
+bin/phpize
+include/php/TSRM/TSRM.h
+include/php/TSRM/tsrm_win32.h
+include/php/Zend/zend.h
+include/php/Zend/zend_API.h
+include/php/Zend/zend_alloc.h
+include/php/Zend/zend_alloc_sizes.h
+include/php/Zend/zend_arena.h
+include/php/Zend/zend_ast.h
+include/php/Zend/zend_bitset.h
+include/php/Zend/zend_build.h
+include/php/Zend/zend_builtin_functions.h
+include/php/Zend/zend_closures.h
+include/php/Zend/zend_compile.h
+include/php/Zend/zend_config.h
+include/php/Zend/zend_config.w32.h
+include/php/Zend/zend_constants.h



Home | Main Index | Thread Index | Old Index