pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang lang/php*: clean up php langauges



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b3a2aeac90b0
branches:  trunk
changeset: 406227:b3a2aeac90b0
user:      taca <taca%pkgsrc.org@localhost>
date:      Mon Dec 16 15:58:18 2019 +0000

description:
lang/php*: clean up php langauges

Clean up php languages.

* Clean up php/phpversions.mk a little.
* Add php/replace.mk to provide common shebang line replace for PHP.
* Define USE_TOOLS before including <bsd.prefs.mk>.
* Fix most warnings of pkglint.

No functional change should be done.

diffstat:

 lang/php/phpversion.mk                            |  20 ++++--------------
 lang/php/replace.mk                               |  24 +++++++++++++++++++++++
 lang/php72/Makefile                               |   5 +++-
 lang/php72/Makefile.php                           |  12 +++++-----
 lang/php72/distinfo                               |  14 +++++-------
 lang/php72/patches/patch-ext_phar_Makefile.frag   |   4 ++-
 lang/php72/patches/patch-ext_phar_phar_phar.php   |  10 ---------
 lang/php72/patches/patch-php.ini-development      |   4 ++-
 lang/php72/patches/patch-php.ini-production       |   4 ++-
 lang/php72/patches/patch-run-tests.php            |  10 ---------
 lang/php72/patches/patch-sapi_cgi_Makefile.frag   |   4 ++-
 lang/php72/patches/patch-sapi_fpm_php-fpm.conf.in |   4 ++-
 lang/php73/Makefile                               |   5 +++-
 lang/php73/Makefile.php                           |  12 +++++-----
 lang/php73/distinfo                               |  16 ++++++--------
 lang/php73/patches/patch-ext_phar_Makefile.frag   |   4 ++-
 lang/php73/patches/patch-ext_phar_phar_phar.php   |  10 ---------
 lang/php73/patches/patch-ext_tidy_config.m4       |   4 ++-
 lang/php73/patches/patch-php.ini-development      |   4 ++-
 lang/php73/patches/patch-php.ini-production       |   4 ++-
 lang/php73/patches/patch-run-tests.php            |  10 ---------
 lang/php73/patches/patch-sapi_cgi_Makefile.frag   |   4 ++-
 lang/php73/patches/patch-sapi_fpm_php-fpm.conf.in |   4 ++-
 lang/php74/Makefile                               |   8 ++++--
 lang/php74/distinfo                               |   4 +--
 lang/php74/patches/patch-ext_phar_phar_phar.php   |  12 -----------
 lang/php74/patches/patch-run-tests.php            |  12 -----------
 27 files changed, 101 insertions(+), 127 deletions(-)

diffs (truncated from 516 to 300 lines):

diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php/phpversion.mk
--- a/lang/php/phpversion.mk    Mon Dec 16 15:26:57 2019 +0000
+++ b/lang/php/phpversion.mk    Mon Dec 16 15:58:18 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: phpversion.mk,v 1.278 2019/12/15 17:54:58 taca Exp $
+# $NetBSD: phpversion.mk,v 1.279 2019/12/16 15:58:18 taca Exp $
 #
 # This file selects a PHP version, based on the user's preferences and
 # the installed packages. It does not add a dependency on the PHP
@@ -206,40 +206,30 @@
 # set variables for the version we decided to use:
 #
 .if ${_PHP_VERSION} == "56"
-PHPPKGSRCDIR=          ../../lang/php56
 PHP_VERSION=           ${PHP56_VERSION}
 PHP_INITIAL_TEENY=     3
-PHP_PKG_PREFIX=                php56
 PHP_EXTENSION_DIR=     lib/php/${PHP56_RELDATE}
 .elif ${_PHP_VERSION} == "71"
-PHPPKGSRCDIR=          ../../lang/php71
 PHP_VERSION=           ${PHP71_VERSION}
-PHP_INITIAL_TEENY=     0
-PHP_PKG_PREFIX=                php71
 PHP_EXTENSION_DIR=     lib/php/${PHP71_RELDATE}
 .elif ${_PHP_VERSION} == "72"
-PHPPKGSRCDIR=          ../../lang/php72
 PHP_VERSION=           ${PHP72_VERSION}
-PHP_INITIAL_TEENY=     0
-PHP_PKG_PREFIX=                php72
 PHP_EXTENSION_DIR=     lib/php/${PHP72_RELDATE}
 .elif ${_PHP_VERSION} == "73"
-PHPPKGSRCDIR=          ../../lang/php73
 PHP_VERSION=           ${PHP73_VERSION}
-PHP_INITIAL_TEENY=     0
-PHP_PKG_PREFIX=                php73
 PHP_EXTENSION_DIR=     lib/php/${PHP73_RELDATE}
 .elif ${_PHP_VERSION} == "74"
-PHPPKGSRCDIR=          ../../lang/php74
 PHP_VERSION=           ${PHP74_VERSION}
-PHP_INITIAL_TEENY=     0
-PHP_PKG_PREFIX=                php74
 PHP_EXTENSION_DIR=     lib/php/${PHP74_RELDATE}
 .else
 # force an error
 PKG_FAIL_REASON+=      "${PKG_PHP} is not a valid package"
 .endif
 
+PHP_INITIAL_TEENY?=    0
+PHPPKGSRCDIR=          ../../lang/php${PKG_PHP_VERSION}
+PHP_PKG_PREFIX=                php${PKG_PHP_VERSION}
+
 _PHP_VER_MAJOR=                ${PHP_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
 _PHP_VER_MINOR=                ${PHP_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}
 
diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php/replace.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/php/replace.mk       Mon Dec 16 15:58:18 2019 +0000
@@ -0,0 +1,24 @@
+# $NetBSD: replace.mk,v 1.1 2019/12/16 15:58:18 taca Exp $
+#
+
+.if !defined(_PHP_REPLACE_MK)
+_PHP_REPLACE_MK=       # defined
+
+.include "${.PARSEDIR}/phpversion.mk"
+
+PHP_NAME=      php${PKG_PHP_VERSION}
+
+# fix shebang line.
+#
+# REPLACE_PHP          replace shebang line of specified files.
+#
+.if !empty(REPLACE_PHP)
+REPLACE_INTERPRETER+=  ${PHP_NAME}
+
+REPLACE.${PHP_NAME}.old=       .*php
+REPLACE.${PHP_NAME}.new=       ${PREFIX}/bin/php
+REPLACE_FILES.${PHP_NAME}=     ${REPLACE_PHP}
+
+.endif # defined(REPLACE_PHP)
+
+.endif # _PHP_REPLACE_MK
diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php72/Makefile
--- a/lang/php72/Makefile       Mon Dec 16 15:26:57 2019 +0000
+++ b/lang/php72/Makefile       Mon Dec 16 15:58:18 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2019/10/02 14:05:22 taca Exp $
+# $NetBSD: Makefile,v 1.22 2019/12/16 15:58:18 taca Exp $
 
 #
 # We can't omit PKGNAME here to handle PKG_OPTIONS.
@@ -28,6 +28,8 @@
 CONF_FILES=            ${EGDIR}/php.ini-production ${PKG_SYSCONFDIR}/php.ini
 PLIST_SUBST+=          PHPEXTDIR="${PHP_EXTENSION_DIR}"
 
+REPLACE_PHP=           ext/phar/phar/phar.php run-tests.php
+
 SUBST_CLASSES+=                path
 SUBST_MESSAGE.path=    Fixing common paths.
 SUBST_STAGE.path=      pre-configure
@@ -59,4 +61,5 @@
                ${DESTDIR}${EGDIR}
        ${INSTALL_DATA} ${WRKSRC}/php.gif ${DESTDIR}${PREFIX}/share/php
 
+.include "../../lang/php/replace.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php72/Makefile.php
--- a/lang/php72/Makefile.php   Mon Dec 16 15:26:57 2019 +0000
+++ b/lang/php72/Makefile.php   Mon Dec 16 15:58:18 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.php,v 1.13 2019/10/02 14:05:22 taca Exp $
+# $NetBSD: Makefile.php,v 1.14 2019/12/16 15:58:18 taca Exp $
 # used by lang/php72/Makefile
 # used by www/ap-php/Makefile
 # used by www/php-fpm/Makefile
@@ -13,17 +13,17 @@
 # the binary actually needs full dep on PCRE
 BUILDLINK_DEPMETHOD.pcre=      full
 
-.include "../../lang/php72/Makefile.common"
-
-DISTINFO_FILE= ${.CURDIR}/../../lang/php72/distinfo
-PATCHDIR=      ${.CURDIR}/../../lang/php72/patches
-
 USE_LIBTOOL=           YES
 USE_LANGUAGES=         c c++
 GNU_CONFIGURE=         YES
 BUILD_DEFS+=           VARBASE
 PLIST_VARS+=           dtrace
 
+.include "../../lang/php72/Makefile.common"
+
+DISTINFO_FILE= ${.CURDIR}/../../lang/php72/distinfo
+PATCHDIR=      ${.CURDIR}/../../lang/php72/patches
+
 CONFIGURE_ENV+=                EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}"
 
 .include "../../mk/bsd.prefs.mk"
diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php72/distinfo
--- a/lang/php72/distinfo       Mon Dec 16 15:26:57 2019 +0000
+++ b/lang/php72/distinfo       Mon Dec 16 15:58:18 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.48 2019/11/25 03:12:50 taca Exp $
+$NetBSD: distinfo,v 1.49 2019/12/16 15:58:18 taca Exp $
 
 SHA1 (php-7.2.25.tar.xz) = 3ef98fe23aa61883e7d931f52822f9b7bc4cb3c7
 RMD160 (php-7.2.25.tar.xz) = 393022b9385e9e2ec399ddfd2f57a399dbfbd012
@@ -7,14 +7,12 @@
 SHA1 (patch-configure) = 6e66a79e691a84aa7ae461f8dec1752443ad6b61
 SHA1 (patch-disable-filter-url) = e9e92d686ddd1d1a1ece10fe4feee4e368fe510c
 SHA1 (patch-ext_gd_config.m4) = eaecfb31b18700dd642c067ed82748d4f6be2335
-SHA1 (patch-ext_phar_Makefile.frag) = 558869b60f8ed6674a3ba1d595a65f010df4c426
-SHA1 (patch-ext_phar_phar_phar.php) = f630e3946b21b76d4fe857a43e00e25c9445f2c8
+SHA1 (patch-ext_phar_Makefile.frag) = 53ea5c58b0bc27d236118d5750a74b1cba43e5dd
 SHA1 (patch-ext_recode_recode.c) = 639bf762302c7a30c88d3f3fa862494e0f847bdb
 SHA1 (patch-ext_xsl_php__xsl.h) = a9877bff7bacc77926a4541a0ac171c00ad1a627
-SHA1 (patch-php.ini-development) = dd65962000ec06439fae3c9bf252fa46be4e33fd
-SHA1 (patch-php.ini-production) = ae61dffedf574b688fe576b0b2af748b7a28cd89
-SHA1 (patch-run-tests.php) = 86c4d3f03eb8e31b5a35820f426533c9478571fb
-SHA1 (patch-sapi_cgi_Makefile.frag) = 18769900f588ff81cc34474542afa1d65c070e65
+SHA1 (patch-php.ini-development) = 3b21def5e80441c9f8a97a0723a325245bd62c44
+SHA1 (patch-php.ini-production) = 58261628364ade763e7e67f2b6226412a386afb7
+SHA1 (patch-sapi_cgi_Makefile.frag) = f4cd64d334884c49787d8854115c8cd69cc79bb8
 SHA1 (patch-sapi_cli_Makefile.frag) = 1cd29d09042863acbf5330e406410fdcf75d06b3
 SHA1 (patch-sapi_fpm_fpm_events_port.c) = b82b7caffffde1343190fae430a68eb411b5cf8a
-SHA1 (patch-sapi_fpm_php-fpm.conf.in) = b3c4fd499cbfd2dffd9176abb54e298ea542a5d7
+SHA1 (patch-sapi_fpm_php-fpm.conf.in) = acf9b4e70d4c5ea2b96e37e7bbf9005379ecc4d0
diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php72/patches/patch-ext_phar_Makefile.frag
--- a/lang/php72/patches/patch-ext_phar_Makefile.frag   Mon Dec 16 15:26:57 2019 +0000
+++ b/lang/php72/patches/patch-ext_phar_Makefile.frag   Mon Dec 16 15:58:18 2019 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-ext_phar_Makefile.frag,v 1.1 2017/11/15 08:56:12 jdolecek Exp $
+$NetBSD: patch-ext_phar_Makefile.frag,v 1.2 2019/12/16 15:58:18 taca Exp $
+
+Set shbang for phar correctly.
 
 --- ext/phar/Makefile.frag.orig        2015-06-23 17:33:33.000000000 +0000
 +++ ext/phar/Makefile.frag
diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php72/patches/patch-ext_phar_phar_phar.php
--- a/lang/php72/patches/patch-ext_phar_phar_phar.php   Mon Dec 16 15:26:57 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-$NetBSD: patch-ext_phar_phar_phar.php,v 1.1 2017/11/15 08:56:12 jdolecek Exp $
-
---- ext/phar/phar/phar.php.orig        2015-06-23 17:33:33.000000000 +0000
-+++ ext/phar/phar/phar.php
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/php
-+#!@PREFIX@/bin/php
- <?php
- 
- /** @file phar.php
diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php72/patches/patch-php.ini-development
--- a/lang/php72/patches/patch-php.ini-development      Mon Dec 16 15:26:57 2019 +0000
+++ b/lang/php72/patches/patch-php.ini-development      Mon Dec 16 15:58:18 2019 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-php.ini-development,v 1.1 2017/11/15 08:56:12 jdolecek Exp $
+$NetBSD: patch-php.ini-development,v 1.2 2019/12/16 15:58:18 taca Exp $
+
+Set proper default configuration values.
 
 --- php.ini-development.orig   2015-06-23 17:33:33.000000000 +0000
 +++ php.ini-development
diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php72/patches/patch-php.ini-production
--- a/lang/php72/patches/patch-php.ini-production       Mon Dec 16 15:26:57 2019 +0000
+++ b/lang/php72/patches/patch-php.ini-production       Mon Dec 16 15:58:18 2019 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-php.ini-production,v 1.1 2017/11/15 08:56:12 jdolecek Exp $
+$NetBSD: patch-php.ini-production,v 1.2 2019/12/16 15:58:18 taca Exp $
+
+Set proper default configuration values.
 
 --- php.ini-production.orig    2015-06-23 17:33:33.000000000 +0000
 +++ php.ini-production
diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php72/patches/patch-run-tests.php
--- a/lang/php72/patches/patch-run-tests.php    Mon Dec 16 15:26:57 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-$NetBSD: patch-run-tests.php,v 1.1 2017/11/15 08:56:12 jdolecek Exp $
-
---- run-tests.php.orig 2015-06-23 17:33:33.000000000 +0000
-+++ run-tests.php
-@@ -1,4 +1,4 @@
--#!/usr/bin/env php
-+#!@PREFIX@/bin/php
- <?php
- /*
-    +----------------------------------------------------------------------+
diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php72/patches/patch-sapi_cgi_Makefile.frag
--- a/lang/php72/patches/patch-sapi_cgi_Makefile.frag   Mon Dec 16 15:26:57 2019 +0000
+++ b/lang/php72/patches/patch-sapi_cgi_Makefile.frag   Mon Dec 16 15:58:18 2019 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-sapi_cgi_Makefile.frag,v 1.1 2017/11/15 08:56:12 jdolecek Exp $
+$NetBSD: patch-sapi_cgi_Makefile.frag,v 1.2 2019/12/16 15:58:18 taca Exp $
+
+Install to CGI directory.
 
 --- sapi/cgi/Makefile.frag.orig        2015-06-23 17:33:33.000000000 +0000
 +++ sapi/cgi/Makefile.frag
diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php72/patches/patch-sapi_fpm_php-fpm.conf.in
--- a/lang/php72/patches/patch-sapi_fpm_php-fpm.conf.in Mon Dec 16 15:26:57 2019 +0000
+++ b/lang/php72/patches/patch-sapi_fpm_php-fpm.conf.in Mon Dec 16 15:58:18 2019 +0000
@@ -1,4 +1,6 @@
-$NetBSD: patch-sapi_fpm_php-fpm.conf.in,v 1.1 2017/11/15 08:56:12 jdolecek Exp $
+$NetBSD: patch-sapi_fpm_php-fpm.conf.in,v 1.2 2019/12/16 15:58:18 taca Exp $
+
+Set proper default configuration values.
 
 --- sapi/fpm/php-fpm.conf.in.orig      2015-06-23 17:33:33.000000000 +0000
 +++ sapi/fpm/php-fpm.conf.in
diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php73/Makefile
--- a/lang/php73/Makefile       Mon Dec 16 15:26:57 2019 +0000
+++ b/lang/php73/Makefile       Mon Dec 16 15:58:18 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2019/10/02 14:08:05 taca Exp $
+# $NetBSD: Makefile,v 1.7 2019/12/16 15:58:19 taca Exp $
 
 #
 # We can't omit PKGNAME here to handle PKG_OPTIONS.
@@ -28,6 +28,8 @@
 CONF_FILES=            ${EGDIR}/php.ini-production ${PKG_SYSCONFDIR}/php.ini
 PLIST_SUBST+=          PHPEXTDIR="${PHP_EXTENSION_DIR}"
 
+REPLACE_PHP=           ext/phar/phar/phar.php run-tests.php
+
 SUBST_CLASSES+=                path
 SUBST_MESSAGE.path=    Fixing common paths.
 SUBST_STAGE.path=      pre-configure
@@ -59,4 +61,5 @@
                ${DESTDIR}${EGDIR}
        ${INSTALL_DATA} ${WRKSRC}/php.gif ${DESTDIR}${PREFIX}/share/php
 
+.include "../../lang/php/replace.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 8a5496bc6172 -r b3a2aeac90b0 lang/php73/Makefile.php
--- a/lang/php73/Makefile.php   Mon Dec 16 15:26:57 2019 +0000
+++ b/lang/php73/Makefile.php   Mon Dec 16 15:58:18 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.php,v 1.2 2019/10/02 14:08:05 taca Exp $
+# $NetBSD: Makefile.php,v 1.3 2019/12/16 15:58:19 taca Exp $
 # used by lang/php73/Makefile
 # used by www/ap-php/Makefile
 # used by www/php-fpm/Makefile
@@ -13,17 +13,17 @@
 # the binary actually needs full dep on PCRE
 BUILDLINK_DEPMETHOD.pcre2=     full
 
-.include "../../lang/php73/Makefile.common"
-
-DISTINFO_FILE= ${.CURDIR}/../../lang/php73/distinfo
-PATCHDIR=      ${.CURDIR}/../../lang/php73/patches
-
 USE_LIBTOOL=           YES
 USE_LANGUAGES=         c c++
 GNU_CONFIGURE=         YES
 BUILD_DEFS+=           VARBASE
 PLIST_VARS+=           dtrace
 
+.include "../../lang/php73/Makefile.common"
+



Home | Main Index | Thread Index | Old Index