mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/2] php: reanimate PHP as PHP8
@ 2022-05-30 16:55 Andreas Helmcke
  2022-06-03  7:07 ` Michael Olbrich
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Helmcke @ 2022-05-30 16:55 UTC (permalink / raw)
  To: ptxdist

PHP5 is gone with commit f356f581e17a9474bdc01dbe3907f96558101609   "php5: remove old package"

Let's try now with PHP8 instead and a minimal feature set due to limited
test options. The remaining features can be extended on demand.

Co-authored-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Andreas Helmcke <ahelmcke@ela-soft.com>
---
Changes to original patch:
  - removed DEBUG Option
  - added modules session and filter
  - added license information

  rules/php8.in   |  75 +++++++++++++++++++++++++++++
  rules/php8.make | 122 ++++++++++++++++++++++++++++++++++++++++++++++++
  2 files changed, 197 insertions(+)
  create mode 100644 rules/php8.in
  create mode 100644 rules/php8.make

diff --git a/rules/php8.in b/rules/php8.in
new file mode 100644
index 000000000..2ed2ea7fd
--- /dev/null
+++ b/rules/php8.in
@@ -0,0 +1,75 @@
+## SECTION=scripting_languages
+# php6 configuration
+
+menuconfig PHP8
+       tristate
+       prompt "php8                          "
+       select GLIBC_M
+       help
+         PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used
+         general-purpose scripting language that is especially suited for web
+         development and can be embedded into HTML.
+
+if PHP8
+
+config PHP8_INI
+       bool
+       prompt "install /etc/php8/php.ini"
+       default y
+       help
+         Installs (if present) the
+         "./projectroot/etc/php8/php.ini" file from your
+         workspace, otherwise a generic one from the ptxdist
+         directory.
+
+# ----------------------------------------------------------------------------
+# SAPI Modules (add more on demand)
+# ----------------------------------------------------------------------------
+
+choice
+       prompt "SAPI Module"
+       default PHP8_SAPI_NONE
+       help
+         Select one of the SAP (Server Application Programming) Interfaces to
+         be supported at run-time. It is possible to select no SAP interface
+         here, then your PHP supports a command line interface (CLI) only.
+
+config PHP8_SAPI_CGI
+       bool
+       prompt "cgi"
+       help
+         Build standard CGI version of PHP.
+
+config PHP8_SAPI_NONE
+       bool
+       prompt "none"
+       select PHP8_SAPI_CLI
+       help
+         This forces a command line interface variant only.
+
+endchoice
+
+config PHP8_SESSION
+       bool
+       prompt "session support"
+       default y
+       help
+         A session is a way to store information to be used across multiple
+         pages. The information is stored locally only.
+
+config PHP8_FILTER
+       bool
+       prompt "filter support"
+       default y
+       help
+         This extension filters data by either validating or sanitizing it.
+         This is especially useful when the data source contains unknown (or foreign) data, like user supplied input.
+         For example, this data may come from an HTML form.
+
+config PHP8_SAPI_CLI
+       bool
+       prompt "cli"
+       help
+         Build command line interface (CLI) version of PHP
+
+endif
diff --git a/rules/php8.make b/rules/php8.make
new file mode 100644
index 000000000..839d5ffdd
--- /dev/null
+++ b/rules/php8.make
@@ -0,0 +1,122 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2006-2008 by Robert Schwebel
+#               2009, 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
+#               2015 by Bruno Thomsen <bth@kamstrup.com>
+#               2021 by Juergen Borleis <jbe@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PHP8) += php8
+
+#
+# Paths and names
+#
+PHP8_VERSION   := 8.1.6
+PHP8_MD5       := 943eae7f07c2056ce87478e7d6c0cbbb
+PHP8           := php-$(PHP8_VERSION)
+PHP8_SUFFIX    := tar.xz
+PHP8_SOURCE    := $(SRCDIR)/$(PHP8).$(PHP8_SUFFIX)
+PHP8_DIR       := $(BUILDDIR)/$(PHP8)
+PHP8_LICENSE   := PHP-3.01
+PHP8_LICENSE_FILES := file://LICENSE;md5=99532e0f6620bc9bca34f12fadaee33c
+
+#
+# Note: older releases are moved to the 'museum', but the 'de.php.net'
+# response with a HTML file instead of the archive. So, try the 'museum'
+# URL first
+#
+PHP8_URL := \
+       http://museum.php.net/php8/$(PHP8).$(PHP8_SUFFIX) \
+       http://de.php.net/distributions/$(PHP8).$(PHP8_SUFFIX)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PHP8_CONF_ENV := \
+       $(CROSS_ENV) \
+       ac_cv_prog_cc_cross=yes \
+       ac_cv_c_bigendian_php=$(call ptx/yesno, PTXCONF_ENDIAN_BIG)
+
+#
+# autoconf
+#
+PHP8_AUTOCONF := \
+       $(CROSS_AUTOCONF_USR) \
+       --with-config-file-path=/etc/php8 \
+       --without-iconv \
+       --disable-phpdbg \
+       --with-libdir=/usr/$(CROSS_LIB_DIR) \
+       --disable-opcache \
+       --disable-zend-signals
+
+# ----------------------------------------------------------------------------
+# Network options
+# ----------------------------------------------------------------------------
+
+ifndef PTXCONF_GLOBAL_IPV6
+PHP8_AUTOCONF += --disable-ipv6
+endif
+
+# ----------------------------------------------------------------------------
+# One of the "Server Application Programming Interfaces"
+# ----------------------------------------------------------------------------
+
+ifndef PTXCONF_PHP8_SAPI_CGI
+PHP8_AUTOCONF += \
+       --disable-cgi
+endif
+
+# ----------------------------------------------------------------------------
+# Generic configurations
+# ----------------------------------------------------------------------------
+
+ifndef PTXCONF_PHP8_SAPI_CLI
+PHP8_AUTOCONF += --disable-cli
+endif
+
+# ----------------------------------------------------------------------------
+# Extensions
+# ----------------------------------------------------------------------------
+
+# Please extend on demand...
+PHP8_AUTOCONF += --disable-all \
+       --$(call ptx/endis, PTXCONF_PHP8_SESSION)-session \
+       --$(call ptx/endis, PTXCONF_PHP8_FILTER)-filter
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/php8.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, php8)
+       @$(call install_fixup, php8,PRIORITY,optional)
+       @$(call install_fixup, php8,SECTION,base)
+       @$(call install_fixup, php8,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
+       @$(call install_fixup, php8,DESCRIPTION,missing)
+
+ifdef PTXCONF_PHP8_SAPI_CLI
+       @$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php)
+endif
+
+ifdef PTXCONF_PHP8_SAPI_CGI
+       @$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php-cgi)
+endif
+
+ifdef PTXCONF_PHP8_INI
+       @$(call install_alternative, php8, 0, 0, 0644, /etc/php8/php.ini)
+endif
+
+       @$(call install_finish, php8)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
2.34.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ptxdist] [PATCH 1/2] php: reanimate PHP as PHP8
  2022-05-30 16:55 [ptxdist] [PATCH 1/2] php: reanimate PHP as PHP8 Andreas Helmcke
@ 2022-06-03  7:07 ` Michael Olbrich
  2022-06-03 15:12   ` [ptxdist] [PATCH v2 " Andreas Helmcke
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Olbrich @ 2022-06-03  7:07 UTC (permalink / raw)
  To: Andreas Helmcke; +Cc: ptxdist

On Mon, May 30, 2022 at 06:55:01PM +0200, Andreas Helmcke wrote:
> PHP5 is gone with commit f356f581e17a9474bdc01dbe3907f96558101609   "php5: remove old package"
> 
> Let's try now with PHP8 instead and a minimal feature set due to limited
> test options. The remaining features can be extended on demand.
> 
> Co-authored-by: Juergen Borleis <jbe@pengutronix.de>
> Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
> Signed-off-by: Andreas Helmcke <ahelmcke@ela-soft.com>
> ---
> Changes to original patch:
>  - removed DEBUG Option
>  - added modules session and filter
>  - added license information
> 
>  rules/php8.in   |  75 +++++++++++++++++++++++++++++
>  rules/php8.make | 122 ++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 197 insertions(+)
>  create mode 100644 rules/php8.in
>  create mode 100644 rules/php8.make
> 
> diff --git a/rules/php8.in b/rules/php8.in
> new file mode 100644
> index 000000000..2ed2ea7fd
> --- /dev/null
> +++ b/rules/php8.in
> @@ -0,0 +1,75 @@
> +## SECTION=scripting_languages
> +# php6 configuration
> +
> +menuconfig PHP8
> +       tristate
> +       prompt "php8                          "
> +       select GLIBC_M
> +       help
> +         PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used
> +         general-purpose scripting language that is especially suited for web
> +         development and can be embedded into HTML.

At some point all tabs got replaced by spaces.

Michael

> +
> +if PHP8
> +
> +config PHP8_INI
> +       bool
> +       prompt "install /etc/php8/php.ini"
> +       default y
> +       help
> +         Installs (if present) the
> +         "./projectroot/etc/php8/php.ini" file from your
> +         workspace, otherwise a generic one from the ptxdist
> +         directory.
> +
> +# ----------------------------------------------------------------------------
> +# SAPI Modules (add more on demand)
> +# ----------------------------------------------------------------------------
> +
> +choice
> +       prompt "SAPI Module"
> +       default PHP8_SAPI_NONE
> +       help
> +         Select one of the SAP (Server Application Programming) Interfaces to
> +         be supported at run-time. It is possible to select no SAP interface
> +         here, then your PHP supports a command line interface (CLI) only.
> +
> +config PHP8_SAPI_CGI
> +       bool
> +       prompt "cgi"
> +       help
> +         Build standard CGI version of PHP.
> +
> +config PHP8_SAPI_NONE
> +       bool
> +       prompt "none"
> +       select PHP8_SAPI_CLI
> +       help
> +         This forces a command line interface variant only.
> +
> +endchoice
> +
> +config PHP8_SESSION
> +       bool
> +       prompt "session support"
> +       default y
> +       help
> +         A session is a way to store information to be used across multiple
> +         pages. The information is stored locally only.
> +
> +config PHP8_FILTER
> +       bool
> +       prompt "filter support"
> +       default y
> +       help
> +         This extension filters data by either validating or sanitizing it.
> +         This is especially useful when the data source contains unknown (or foreign) data, like user supplied input.
> +         For example, this data may come from an HTML form.
> +
> +config PHP8_SAPI_CLI
> +       bool
> +       prompt "cli"
> +       help
> +         Build command line interface (CLI) version of PHP
> +
> +endif
> diff --git a/rules/php8.make b/rules/php8.make
> new file mode 100644
> index 000000000..839d5ffdd
> --- /dev/null
> +++ b/rules/php8.make
> @@ -0,0 +1,122 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2006-2008 by Robert Schwebel
> +#               2009, 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
> +#               2015 by Bruno Thomsen <bth@kamstrup.com>
> +#               2021 by Juergen Borleis <jbe@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_PHP8) += php8
> +
> +#
> +# Paths and names
> +#
> +PHP8_VERSION   := 8.1.6
> +PHP8_MD5       := 943eae7f07c2056ce87478e7d6c0cbbb
> +PHP8           := php-$(PHP8_VERSION)
> +PHP8_SUFFIX    := tar.xz
> +PHP8_SOURCE    := $(SRCDIR)/$(PHP8).$(PHP8_SUFFIX)
> +PHP8_DIR       := $(BUILDDIR)/$(PHP8)
> +PHP8_LICENSE   := PHP-3.01
> +PHP8_LICENSE_FILES := file://LICENSE;md5=99532e0f6620bc9bca34f12fadaee33c
> +
> +#
> +# Note: older releases are moved to the 'museum', but the 'de.php.net'
> +# response with a HTML file instead of the archive. So, try the 'museum'
> +# URL first
> +#
> +PHP8_URL := \
> +       http://museum.php.net/php8/$(PHP8).$(PHP8_SUFFIX) \
> +       http://de.php.net/distributions/$(PHP8).$(PHP8_SUFFIX)
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +PHP8_CONF_ENV := \
> +       $(CROSS_ENV) \
> +       ac_cv_prog_cc_cross=yes \
> +       ac_cv_c_bigendian_php=$(call ptx/yesno, PTXCONF_ENDIAN_BIG)
> +
> +#
> +# autoconf
> +#
> +PHP8_AUTOCONF := \
> +       $(CROSS_AUTOCONF_USR) \
> +       --with-config-file-path=/etc/php8 \
> +       --without-iconv \
> +       --disable-phpdbg \
> +       --with-libdir=/usr/$(CROSS_LIB_DIR) \
> +       --disable-opcache \
> +       --disable-zend-signals
> +
> +# ----------------------------------------------------------------------------
> +# Network options
> +# ----------------------------------------------------------------------------
> +
> +ifndef PTXCONF_GLOBAL_IPV6
> +PHP8_AUTOCONF += --disable-ipv6
> +endif
> +
> +# ----------------------------------------------------------------------------
> +# One of the "Server Application Programming Interfaces"
> +# ----------------------------------------------------------------------------
> +
> +ifndef PTXCONF_PHP8_SAPI_CGI
> +PHP8_AUTOCONF += \
> +       --disable-cgi
> +endif
> +
> +# ----------------------------------------------------------------------------
> +# Generic configurations
> +# ----------------------------------------------------------------------------
> +
> +ifndef PTXCONF_PHP8_SAPI_CLI
> +PHP8_AUTOCONF += --disable-cli
> +endif
> +
> +# ----------------------------------------------------------------------------
> +# Extensions
> +# ----------------------------------------------------------------------------
> +
> +# Please extend on demand...
> +PHP8_AUTOCONF += --disable-all \
> +       --$(call ptx/endis, PTXCONF_PHP8_SESSION)-session \
> +       --$(call ptx/endis, PTXCONF_PHP8_FILTER)-filter
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/php8.targetinstall:
> +       @$(call targetinfo)
> +
> +       @$(call install_init, php8)
> +       @$(call install_fixup, php8,PRIORITY,optional)
> +       @$(call install_fixup, php8,SECTION,base)
> +       @$(call install_fixup, php8,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
> +       @$(call install_fixup, php8,DESCRIPTION,missing)
> +
> +ifdef PTXCONF_PHP8_SAPI_CLI
> +       @$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php)
> +endif
> +
> +ifdef PTXCONF_PHP8_SAPI_CGI
> +       @$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php-cgi)
> +endif
> +
> +ifdef PTXCONF_PHP8_INI
> +       @$(call install_alternative, php8, 0, 0, 0644, /etc/php8/php.ini)
> +endif
> +
> +       @$(call install_finish, php8)
> +
> +       @$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.34.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ptxdist] [PATCH v2 1/2] php: reanimate PHP as PHP8
  2022-06-03  7:07 ` Michael Olbrich
@ 2022-06-03 15:12   ` Andreas Helmcke
  2022-06-09 18:00     ` Michael Olbrich
  2022-06-10  6:19     ` Michael Olbrich
  0 siblings, 2 replies; 8+ messages in thread
From: Andreas Helmcke @ 2022-06-03 15:12 UTC (permalink / raw)
  To: ptxdist

PHP5 is gone with commit f356f581e17a9474bdc01dbe3907f96558101609   "php5: remove old package"

Let's try now with PHP8 instead and a minimal feature set due to limited
test options. The remaining features can be extended on demand.

Co-authored-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Andreas Helmcke <ahelmcke@ela-soft.com>
---
v2 changes:
 - format: correct use of tabs for indention

 rules/php8.in   |  75 +++++++++++++++++++++++++++++
 rules/php8.make | 122 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 197 insertions(+)
 create mode 100644 rules/php8.in
 create mode 100644 rules/php8.make

diff --git a/rules/php8.in b/rules/php8.in
new file mode 100644
index 000000000..2ed2ea7fd
--- /dev/null
+++ b/rules/php8.in
@@ -0,0 +1,75 @@
+## SECTION=scripting_languages
+# php6 configuration
+
+menuconfig PHP8
+	tristate
+	prompt "php8                          "
+	select GLIBC_M
+	help
+	  PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used
+	  general-purpose scripting language that is especially suited for web
+	  development and can be embedded into HTML.
+
+if PHP8
+
+config PHP8_INI
+	bool
+	prompt "install /etc/php8/php.ini"
+	default y
+	help
+	  Installs (if present) the
+	  "./projectroot/etc/php8/php.ini" file from your
+	  workspace, otherwise a generic one from the ptxdist
+	  directory.
+
+# ----------------------------------------------------------------------------
+# SAPI Modules (add more on demand)
+# ----------------------------------------------------------------------------
+
+choice
+	prompt "SAPI Module"
+	default PHP8_SAPI_NONE
+	help
+	  Select one of the SAP (Server Application Programming) Interfaces to
+	  be supported at run-time. It is possible to select no SAP interface
+	  here, then your PHP supports a command line interface (CLI) only.
+
+config PHP8_SAPI_CGI
+	bool
+	prompt "cgi"
+	help
+	  Build standard CGI version of PHP.
+
+config PHP8_SAPI_NONE
+	bool
+	prompt "none"
+	select PHP8_SAPI_CLI
+	help
+	  This forces a command line interface variant only.
+
+endchoice
+
+config PHP8_SESSION
+	bool
+	prompt "session support"
+	default y
+	help
+	  A session is a way to store information to be used across multiple
+	  pages. The information is stored locally only.
+
+config PHP8_FILTER
+	bool
+	prompt "filter support"
+	default y
+	help
+	  This extension filters data by either validating or sanitizing it. 
+	  This is especially useful when the data source contains unknown (or foreign) data, like user supplied input. 
+	  For example, this data may come from an HTML form. 
+
+config PHP8_SAPI_CLI
+	bool
+	prompt "cli"
+	help
+	  Build command line interface (CLI) version of PHP
+
+endif
diff --git a/rules/php8.make b/rules/php8.make
new file mode 100644
index 000000000..839d5ffdd
--- /dev/null
+++ b/rules/php8.make
@@ -0,0 +1,122 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2006-2008 by Robert Schwebel
+#               2009, 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
+#               2015 by Bruno Thomsen <bth@kamstrup.com>
+#               2021 by Juergen Borleis <jbe@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PHP8) += php8
+
+#
+# Paths and names
+#
+PHP8_VERSION	:= 8.1.6
+PHP8_MD5	:= 943eae7f07c2056ce87478e7d6c0cbbb
+PHP8		:= php-$(PHP8_VERSION)
+PHP8_SUFFIX	:= tar.xz
+PHP8_SOURCE	:= $(SRCDIR)/$(PHP8).$(PHP8_SUFFIX)
+PHP8_DIR	:= $(BUILDDIR)/$(PHP8)
+PHP8_LICENSE 	:= PHP-3.01
+PHP8_LICENSE_FILES := file://LICENSE;md5=99532e0f6620bc9bca34f12fadaee33c
+
+#
+# Note: older releases are moved to the 'museum', but the 'de.php.net'
+# response with a HTML file instead of the archive. So, try the 'museum'
+# URL first
+#
+PHP8_URL := \
+	http://museum.php.net/php8/$(PHP8).$(PHP8_SUFFIX) \
+	http://de.php.net/distributions/$(PHP8).$(PHP8_SUFFIX)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PHP8_CONF_ENV := \
+	$(CROSS_ENV) \
+	ac_cv_prog_cc_cross=yes \
+	ac_cv_c_bigendian_php=$(call ptx/yesno, PTXCONF_ENDIAN_BIG)
+
+#
+# autoconf
+#
+PHP8_AUTOCONF := \
+	$(CROSS_AUTOCONF_USR) \
+	--with-config-file-path=/etc/php8 \
+	--without-iconv \
+	--disable-phpdbg \
+	--with-libdir=/usr/$(CROSS_LIB_DIR) \
+	--disable-opcache \
+	--disable-zend-signals
+
+# ----------------------------------------------------------------------------
+# Network options
+# ----------------------------------------------------------------------------
+
+ifndef PTXCONF_GLOBAL_IPV6
+PHP8_AUTOCONF += --disable-ipv6
+endif
+
+# ----------------------------------------------------------------------------
+# One of the "Server Application Programming Interfaces"
+# ----------------------------------------------------------------------------
+
+ifndef PTXCONF_PHP8_SAPI_CGI
+PHP8_AUTOCONF += \
+	--disable-cgi
+endif
+
+# ----------------------------------------------------------------------------
+# Generic configurations
+# ----------------------------------------------------------------------------
+
+ifndef PTXCONF_PHP8_SAPI_CLI
+PHP8_AUTOCONF += --disable-cli
+endif
+
+# ----------------------------------------------------------------------------
+# Extensions
+# ----------------------------------------------------------------------------
+
+# Please extend on demand...
+PHP8_AUTOCONF += --disable-all \
+	--$(call ptx/endis, PTXCONF_PHP8_SESSION)-session \
+	--$(call ptx/endis, PTXCONF_PHP8_FILTER)-filter
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/php8.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, php8)
+	@$(call install_fixup, php8,PRIORITY,optional)
+	@$(call install_fixup, php8,SECTION,base)
+	@$(call install_fixup, php8,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
+	@$(call install_fixup, php8,DESCRIPTION,missing)
+
+ifdef PTXCONF_PHP8_SAPI_CLI
+	@$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php)
+endif
+
+ifdef PTXCONF_PHP8_SAPI_CGI
+	@$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php-cgi)
+endif
+
+ifdef PTXCONF_PHP8_INI
+	@$(call install_alternative, php8, 0, 0, 0644, /etc/php8/php.ini)
+endif
+
+	@$(call install_finish, php8)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.34.1




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ptxdist] [PATCH v2 1/2] php: reanimate PHP as PHP8
  2022-06-03 15:12   ` [ptxdist] [PATCH v2 " Andreas Helmcke
@ 2022-06-09 18:00     ` Michael Olbrich
  2022-06-10  6:19     ` Michael Olbrich
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Olbrich @ 2022-06-09 18:00 UTC (permalink / raw)
  To: Andreas Helmcke; +Cc: ptxdist

On Fri, Jun 03, 2022 at 05:12:08PM +0200, Andreas Helmcke wrote:
> PHP5 is gone with commit f356f581e17a9474bdc01dbe3907f96558101609   "php5: remove old package"
> 
> Let's try now with PHP8 instead and a minimal feature set due to limited
> test options. The remaining features can be extended on demand.
> 
> Co-authored-by: Juergen Borleis <jbe@pengutronix.de>
> Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
> Signed-off-by: Andreas Helmcke <ahelmcke@ela-soft.com>
> ---
> v2 changes:
>  - format: correct use of tabs for indention
> 
>  rules/php8.in   |  75 +++++++++++++++++++++++++++++
>  rules/php8.make | 122 ++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 197 insertions(+)
>  create mode 100644 rules/php8.in
>  create mode 100644 rules/php8.make
> 
> diff --git a/rules/php8.in b/rules/php8.in
> new file mode 100644
> index 000000000..2ed2ea7fd
> --- /dev/null
> +++ b/rules/php8.in
> @@ -0,0 +1,75 @@
> +## SECTION=scripting_languages
> +# php6 configuration
> +
> +menuconfig PHP8
> +	tristate
> +	prompt "php8                          "
> +	select GLIBC_M
> +	help
> +	  PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used
> +	  general-purpose scripting language that is especially suited for web
> +	  development and can be embedded into HTML.
> +
> +if PHP8
> +
> +config PHP8_INI
> +	bool
> +	prompt "install /etc/php8/php.ini"
> +	default y
> +	help
> +	  Installs (if present) the
> +	  "./projectroot/etc/php8/php.ini" file from your
> +	  workspace, otherwise a generic one from the ptxdist
> +	  directory.
> +
> +# ----------------------------------------------------------------------------
> +# SAPI Modules (add more on demand)
> +# ----------------------------------------------------------------------------
> +
> +choice
> +	prompt "SAPI Module"
> +	default PHP8_SAPI_NONE
> +	help
> +	  Select one of the SAP (Server Application Programming) Interfaces to
> +	  be supported at run-time. It is possible to select no SAP interface
> +	  here, then your PHP supports a command line interface (CLI) only.
> +
> +config PHP8_SAPI_CGI
> +	bool
> +	prompt "cgi"
> +	help
> +	  Build standard CGI version of PHP.
> +
> +config PHP8_SAPI_NONE
> +	bool
> +	prompt "none"
> +	select PHP8_SAPI_CLI
> +	help
> +	  This forces a command line interface variant only.
> +
> +endchoice
> +
> +config PHP8_SESSION
> +	bool
> +	prompt "session support"
> +	default y
> +	help
> +	  A session is a way to store information to be used across multiple
> +	  pages. The information is stored locally only.
> +
> +config PHP8_FILTER
> +	bool
> +	prompt "filter support"
> +	default y
> +	help
> +	  This extension filters data by either validating or sanitizing it. 
> +	  This is especially useful when the data source contains unknown (or foreign) data, like user supplied input. 
> +	  For example, this data may come from an HTML form. 
> +
> +config PHP8_SAPI_CLI
> +	bool
> +	prompt "cli"
> +	help
> +	  Build command line interface (CLI) version of PHP
> +
> +endif
> diff --git a/rules/php8.make b/rules/php8.make
> new file mode 100644
> index 000000000..839d5ffdd
> --- /dev/null
> +++ b/rules/php8.make
> @@ -0,0 +1,122 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2006-2008 by Robert Schwebel
> +#               2009, 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
> +#               2015 by Bruno Thomsen <bth@kamstrup.com>
> +#               2021 by Juergen Borleis <jbe@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_PHP8) += php8
> +
> +#
> +# Paths and names
> +#
> +PHP8_VERSION	:= 8.1.6
> +PHP8_MD5	:= 943eae7f07c2056ce87478e7d6c0cbbb
> +PHP8		:= php-$(PHP8_VERSION)
> +PHP8_SUFFIX	:= tar.xz
> +PHP8_SOURCE	:= $(SRCDIR)/$(PHP8).$(PHP8_SUFFIX)
> +PHP8_DIR	:= $(BUILDDIR)/$(PHP8)
> +PHP8_LICENSE 	:= PHP-3.01
> +PHP8_LICENSE_FILES := file://LICENSE;md5=99532e0f6620bc9bca34f12fadaee33c
> +
> +#
> +# Note: older releases are moved to the 'museum', but the 'de.php.net'
> +# response with a HTML file instead of the archive. So, try the 'museum'
> +# URL first
> +#
> +PHP8_URL := \
> +	http://museum.php.net/php8/$(PHP8).$(PHP8_SUFFIX) \
> +	http://de.php.net/distributions/$(PHP8).$(PHP8_SUFFIX)
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +PHP8_CONF_ENV := \
> +	$(CROSS_ENV) \
> +	ac_cv_prog_cc_cross=yes \
> +	ac_cv_c_bigendian_php=$(call ptx/yesno, PTXCONF_ENDIAN_BIG)

This is copied from the php5 rule. Is this stuff still needed?

> +
> +#
> +# autoconf
> +#
> +PHP8_AUTOCONF := \
> +	$(CROSS_AUTOCONF_USR) \
> +	--with-config-file-path=/etc/php8 \
> +	--without-iconv \
> +	--disable-phpdbg \
> +	--with-libdir=/usr/$(CROSS_LIB_DIR) \
> +	--disable-opcache \
> +	--disable-zend-signals

The configure script has a lot more options. Please use configure_helper.py
to check what's missing. If you're unsure about an option, then it's
usually a good idea to just stick to the default for it. Just make sure to
disable anything that would require an external dependency unless you add
the dependency explicitly in the menu file.

> +
> +# ----------------------------------------------------------------------------
> +# Network options
> +# ----------------------------------------------------------------------------
> +
> +ifndef PTXCONF_GLOBAL_IPV6
> +PHP8_AUTOCONF += --disable-ipv6
> +endif
> +
> +# ----------------------------------------------------------------------------
> +# One of the "Server Application Programming Interfaces"
> +# ----------------------------------------------------------------------------
> +
> +ifndef PTXCONF_PHP8_SAPI_CGI
> +PHP8_AUTOCONF += \
> +	--disable-cgi
> +endif
> +
> +# ----------------------------------------------------------------------------
> +# Generic configurations
> +# ----------------------------------------------------------------------------
> +
> +ifndef PTXCONF_PHP8_SAPI_CLI
> +PHP8_AUTOCONF += --disable-cli
> +endif
> +
> +# ----------------------------------------------------------------------------
> +# Extensions
> +# ----------------------------------------------------------------------------
> +
> +# Please extend on demand...
> +PHP8_AUTOCONF += --disable-all \
> +	--$(call ptx/endis, PTXCONF_PHP8_SESSION)-session \
> +	--$(call ptx/endis, PTXCONF_PHP8_FILTER)-filter

Don't split the options like this. Just add them all above in one go, in
the order of './configure --help'.

If ptx/endis cannot be used because the option is broken, then use
ptx/ifdef (see libpcre.make for an example).

Michael

> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/php8.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, php8)
> +	@$(call install_fixup, php8,PRIORITY,optional)
> +	@$(call install_fixup, php8,SECTION,base)
> +	@$(call install_fixup, php8,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
> +	@$(call install_fixup, php8,DESCRIPTION,missing)
> +
> +ifdef PTXCONF_PHP8_SAPI_CLI
> +	@$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php)
> +endif
> +
> +ifdef PTXCONF_PHP8_SAPI_CGI
> +	@$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php-cgi)
> +endif
> +
> +ifdef PTXCONF_PHP8_INI
> +	@$(call install_alternative, php8, 0, 0, 0644, /etc/php8/php.ini)
> +endif
> +
> +	@$(call install_finish, php8)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.34.1
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ptxdist] [PATCH v2 1/2] php: reanimate PHP as PHP8
  2022-06-03 15:12   ` [ptxdist] [PATCH v2 " Andreas Helmcke
  2022-06-09 18:00     ` Michael Olbrich
@ 2022-06-10  6:19     ` Michael Olbrich
  2022-06-10  9:42       ` Andreas Helmcke
  2022-06-13 19:25       ` [ptxdist] [PATCH v3 " Andreas Helmcke
  1 sibling, 2 replies; 8+ messages in thread
From: Michael Olbrich @ 2022-06-10  6:19 UTC (permalink / raw)
  To: Andreas Helmcke; +Cc: ptxdist

On Fri, Jun 03, 2022 at 05:12:08PM +0200, Andreas Helmcke wrote:
> PHP5 is gone with commit f356f581e17a9474bdc01dbe3907f96558101609   "php5: remove old package"
> 
> Let's try now with PHP8 instead and a minimal feature set due to limited
> test options. The remaining features can be extended on demand.
> 
> Co-authored-by: Juergen Borleis <jbe@pengutronix.de>
> Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
> Signed-off-by: Andreas Helmcke <ahelmcke@ela-soft.com>
> ---
> v2 changes:
>  - format: correct use of tabs for indention
> 
>  rules/php8.in   |  75 +++++++++++++++++++++++++++++
>  rules/php8.make | 122 ++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 197 insertions(+)
>  create mode 100644 rules/php8.in
>  create mode 100644 rules/php8.make
> 
> diff --git a/rules/php8.in b/rules/php8.in
> new file mode 100644
> index 000000000..2ed2ea7fd
> --- /dev/null
> +++ b/rules/php8.in
> @@ -0,0 +1,75 @@
> +## SECTION=scripting_languages
> +# php6 configuration
> +
> +menuconfig PHP8
> +	tristate
> +	prompt "php8                          "
> +	select GLIBC_M
> +	help
> +	  PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used
> +	  general-purpose scripting language that is especially suited for web
> +	  development and can be embedded into HTML.
> +
> +if PHP8
> +
> +config PHP8_INI
> +	bool
> +	prompt "install /etc/php8/php.ini"
> +	default y
> +	help
> +	  Installs (if present) the
> +	  "./projectroot/etc/php8/php.ini" file from your
> +	  workspace, otherwise a generic one from the ptxdist
> +	  directory.
> +
> +# ----------------------------------------------------------------------------
> +# SAPI Modules (add more on demand)
> +# ----------------------------------------------------------------------------
> +
> +choice
> +	prompt "SAPI Module"
> +	default PHP8_SAPI_NONE
> +	help
> +	  Select one of the SAP (Server Application Programming) Interfaces to
> +	  be supported at run-time. It is possible to select no SAP interface
> +	  here, then your PHP supports a command line interface (CLI) only.
> +
> +config PHP8_SAPI_CGI
> +	bool
> +	prompt "cgi"
> +	help
> +	  Build standard CGI version of PHP.
> +
> +config PHP8_SAPI_NONE
> +	bool
> +	prompt "none"
> +	select PHP8_SAPI_CLI
> +	help
> +	  This forces a command line interface variant only.
> +
> +endchoice
> +
> +config PHP8_SESSION
> +	bool
> +	prompt "session support"
> +	default y
> +	help
> +	  A session is a way to store information to be used across multiple
> +	  pages. The information is stored locally only.
> +
> +config PHP8_FILTER
> +	bool
> +	prompt "filter support"
> +	default y
> +	help
> +	  This extension filters data by either validating or sanitizing it. 
> +	  This is especially useful when the data source contains unknown (or foreign) data, like user supplied input. 
> +	  For example, this data may come from an HTML form. 
> +
> +config PHP8_SAPI_CLI
> +	bool
> +	prompt "cli"
> +	help
> +	  Build command line interface (CLI) version of PHP
> +
> +endif
> diff --git a/rules/php8.make b/rules/php8.make
> new file mode 100644
> index 000000000..839d5ffdd
> --- /dev/null
> +++ b/rules/php8.make
> @@ -0,0 +1,122 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2006-2008 by Robert Schwebel
> +#               2009, 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
> +#               2015 by Bruno Thomsen <bth@kamstrup.com>
> +#               2021 by Juergen Borleis <jbe@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_PHP8) += php8
> +
> +#
> +# Paths and names
> +#
> +PHP8_VERSION	:= 8.1.6
> +PHP8_MD5	:= 943eae7f07c2056ce87478e7d6c0cbbb
> +PHP8		:= php-$(PHP8_VERSION)
> +PHP8_SUFFIX	:= tar.xz
> +PHP8_SOURCE	:= $(SRCDIR)/$(PHP8).$(PHP8_SUFFIX)
> +PHP8_DIR	:= $(BUILDDIR)/$(PHP8)
> +PHP8_LICENSE 	:= PHP-3.01
> +PHP8_LICENSE_FILES := file://LICENSE;md5=99532e0f6620bc9bca34f12fadaee33c
> +
> +#
> +# Note: older releases are moved to the 'museum', but the 'de.php.net'
> +# response with a HTML file instead of the archive. So, try the 'museum'
> +# URL first
> +#
> +PHP8_URL := \
> +	http://museum.php.net/php8/$(PHP8).$(PHP8_SUFFIX) \
> +	http://de.php.net/distributions/$(PHP8).$(PHP8_SUFFIX)
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +PHP8_CONF_ENV := \
> +	$(CROSS_ENV) \
> +	ac_cv_prog_cc_cross=yes \
> +	ac_cv_c_bigendian_php=$(call ptx/yesno, PTXCONF_ENDIAN_BIG)
> +
> +#
> +# autoconf
> +#
> +PHP8_AUTOCONF := \
> +	$(CROSS_AUTOCONF_USR) \
> +	--with-config-file-path=/etc/php8 \
> +	--without-iconv \
> +	--disable-phpdbg \
> +	--with-libdir=/usr/$(CROSS_LIB_DIR) \
> +	--disable-opcache \
> +	--disable-zend-signals
> +
> +# ----------------------------------------------------------------------------
> +# Network options
> +# ----------------------------------------------------------------------------
> +
> +ifndef PTXCONF_GLOBAL_IPV6
> +PHP8_AUTOCONF += --disable-ipv6
> +endif
> +
> +# ----------------------------------------------------------------------------
> +# One of the "Server Application Programming Interfaces"
> +# ----------------------------------------------------------------------------
> +
> +ifndef PTXCONF_PHP8_SAPI_CGI
> +PHP8_AUTOCONF += \
> +	--disable-cgi
> +endif
> +
> +# ----------------------------------------------------------------------------
> +# Generic configurations
> +# ----------------------------------------------------------------------------
> +
> +ifndef PTXCONF_PHP8_SAPI_CLI
> +PHP8_AUTOCONF += --disable-cli
> +endif
> +
> +# ----------------------------------------------------------------------------
> +# Extensions
> +# ----------------------------------------------------------------------------
> +
> +# Please extend on demand...
> +PHP8_AUTOCONF += --disable-all \
> +	--$(call ptx/endis, PTXCONF_PHP8_SESSION)-session \
> +	--$(call ptx/endis, PTXCONF_PHP8_FILTER)-filter
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/php8.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, php8)
> +	@$(call install_fixup, php8,PRIORITY,optional)
> +	@$(call install_fixup, php8,SECTION,base)
> +	@$(call install_fixup, php8,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
> +	@$(call install_fixup, php8,DESCRIPTION,missing)
> +
> +ifdef PTXCONF_PHP8_SAPI_CLI
> +	@$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php)
> +endif
> +
> +ifdef PTXCONF_PHP8_SAPI_CGI
> +	@$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php-cgi)
> +endif
> +
> +ifdef PTXCONF_PHP8_INI
> +	@$(call install_alternative, php8, 0, 0, 0644, /etc/php8/php.ini)

php8 does not install this, so you need to add on to ptxdist in
projectroot/.

Michael

> +endif
> +
> +	@$(call install_finish, php8)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> -- 
> 2.34.1
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ptxdist] [PATCH v2 1/2] php: reanimate PHP as PHP8
  2022-06-10  6:19     ` Michael Olbrich
@ 2022-06-10  9:42       ` Andreas Helmcke
  2022-06-13 19:25       ` [ptxdist] [PATCH v3 " Andreas Helmcke
  1 sibling, 0 replies; 8+ messages in thread
From: Andreas Helmcke @ 2022-06-10  9:42 UTC (permalink / raw)
  To: ptxdist


Hello,

Am 10.06.22 um 08:19 schrieb Michael Olbrich:
> On Fri, Jun 03, 2022 at 05:12:08PM +0200, Andreas Helmcke wrote:
>> +
>> +ifdef PTXCONF_PHP8_SAPI_CGI
>> +    @$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php-cgi)
>> +endif
>> +
>> +ifdef PTXCONF_PHP8_INI
>> +    @$(call install_alternative, php8, 0, 0, 0644, /etc/php8/php.ini)
>
> php8 does not install this, so you need to add on to ptxdist in
> projectroot/.
>

php8 does provide templates for php.ini. I would like to use this file:
.../build-target/php-8.1.6/php.ini-production

I'd like to have ptxdist to install php.ini from the users project root, if provided (just like install_alternative does) but copy php-ini-production as php.ini, if install_alternative does not find a source.

I think I can achieve this just with copying php.ini-production to ptxdist projectroot/ but then with each version bump this has to be done manually again.

Is there a better solution?

Andreas 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [ptxdist] [PATCH v3 1/2] php: reanimate PHP as PHP8
  2022-06-10  6:19     ` Michael Olbrich
  2022-06-10  9:42       ` Andreas Helmcke
@ 2022-06-13 19:25       ` Andreas Helmcke
  2022-06-20  6:19         ` [ptxdist] [APPLIED] " Michael Olbrich
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Helmcke @ 2022-06-13 19:25 UTC (permalink / raw)
  To: ptxdist

PHP5 is gone with commit
 f356f581e17a9474bdc01dbe3907f96558101609   "php5: remove old package"

Let's try now with PHP8 instead and a minimal feature set due to limited
test options. The remaining features can be extended on demand.

Co-authored-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Andreas Helmcke <ahelmcke@ela-soft.com>
---
Patch changes:

v3: changes suggested by Michael Olbrich
 - install default php8.ini
 - explicitly set all configure options
 - removed PHP5 leftovers
   
v2:
 - format: correct use of tabs for indention

 rules/php8.in   |  75 +++++++++++++++
 rules/php8.make | 244 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 319 insertions(+)
 create mode 100644 rules/php8.in
 create mode 100644 rules/php8.make

diff --git a/rules/php8.in b/rules/php8.in
new file mode 100644
index 000000000..2ed2ea7fd
--- /dev/null
+++ b/rules/php8.in
@@ -0,0 +1,75 @@
+## SECTION=scripting_languages
+# php6 configuration
+
+menuconfig PHP8
+	tristate
+	prompt "php8                          "
+	select GLIBC_M
+	help
+	  PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used
+	  general-purpose scripting language that is especially suited for web
+	  development and can be embedded into HTML.
+
+if PHP8
+
+config PHP8_INI
+	bool
+	prompt "install /etc/php8/php.ini"
+	default y
+	help
+	  Installs (if present) the
+	  "./projectroot/etc/php8/php.ini" file from your
+	  workspace, otherwise a generic one from the ptxdist
+	  directory.
+
+# ----------------------------------------------------------------------------
+# SAPI Modules (add more on demand)
+# ----------------------------------------------------------------------------
+
+choice
+	prompt "SAPI Module"
+	default PHP8_SAPI_NONE
+	help
+	  Select one of the SAP (Server Application Programming) Interfaces to
+	  be supported at run-time. It is possible to select no SAP interface
+	  here, then your PHP supports a command line interface (CLI) only.
+
+config PHP8_SAPI_CGI
+	bool
+	prompt "cgi"
+	help
+	  Build standard CGI version of PHP.
+
+config PHP8_SAPI_NONE
+	bool
+	prompt "none"
+	select PHP8_SAPI_CLI
+	help
+	  This forces a command line interface variant only.
+
+endchoice
+
+config PHP8_SESSION
+	bool
+	prompt "session support"
+	default y
+	help
+	  A session is a way to store information to be used across multiple
+	  pages. The information is stored locally only.
+
+config PHP8_FILTER
+	bool
+	prompt "filter support"
+	default y
+	help
+	  This extension filters data by either validating or sanitizing it. 
+	  This is especially useful when the data source contains unknown (or foreign) data, like user supplied input. 
+	  For example, this data may come from an HTML form. 
+
+config PHP8_SAPI_CLI
+	bool
+	prompt "cli"
+	help
+	  Build command line interface (CLI) version of PHP
+
+endif
diff --git a/rules/php8.make b/rules/php8.make
new file mode 100644
index 000000000..c65d0d192
--- /dev/null
+++ b/rules/php8.make
@@ -0,0 +1,244 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2006-2008 by Robert Schwebel
+#               2009, 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
+#               2015 by Bruno Thomsen <bth@kamstrup.com>
+#               2021 by Juergen Borleis <jbe@pengutronix.de>
+#               2022 by Andreas Helmcke <ahelmcke@ela-soft.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PHP8) += php8
+
+#
+# Paths and names
+#
+PHP8_VERSION	:= 8.1.6
+PHP8_MD5	:= 943eae7f07c2056ce87478e7d6c0cbbb
+PHP8		:= php-$(PHP8_VERSION)
+PHP8_SUFFIX	:= tar.xz
+PHP8_SOURCE	:= $(SRCDIR)/$(PHP8).$(PHP8_SUFFIX)
+PHP8_DIR	:= $(BUILDDIR)/$(PHP8)
+PHP8_LICENSE 	:= PHP-3.01
+PHP8_LICENSE_FILES := file://LICENSE;md5=99532e0f6620bc9bca34f12fadaee33c
+
+#
+# Note: older releases are moved to the 'museum', but the 'de.php.net'
+# response with a HTML file instead of the archive. So, try the 'museum'
+# URL first
+#
+PHP8_URL := \
+	http://museum.php.net/php8/$(PHP8).$(PHP8_SUFFIX) \
+	http://de.php.net/distributions/$(PHP8).$(PHP8_SUFFIX)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+PHP8_AUTOCONF := \
+	$(CROSS_AUTOCONF_USR) \
+	--disable-rpath \
+	--disable-re2c-cgoto \
+	--disable-gcc-global-regs \
+	--without-apxs2 \
+	--$(call ptx/endis, PTXCONF_PHP8_SAPI_CLI)-cli \
+	--disable-embed \
+	--disable-fpm \
+	--without-fpm-user \
+	--without-fpm-group \
+	--without-fpm-systemd \
+	--without-fpm-acl \
+	--without-fpm-apparmor \
+	--disable-fuzzer \
+	--disable-fuzzer-msan \
+	--disable-litespeed \
+	--disable-phpdbg \
+	--disable-phpdbg-debug \
+	--disable-phpdbg-readline \
+	--$(call ptx/endis, PTXCONF_PHP8_SAPI_CGI)-cgi \
+	--without-valgrind \
+	--disable-gcov \
+	--disable-debug \
+	--disable-debug-assertions \
+	--disable-zts \
+	--disable-rtld-now \
+	--without-layout \
+	--with-config-file-path=/etc/php8 \
+	--without-config-file-scan-dir \
+	--disable-sigchild \
+	--disable-libgcc \
+	--disable-short-tags \
+	--disable-dmalloc \
+	--$(call ptx/endis, PTXCONF_GLOBAL_IPV6)-ipv6 \
+	--disable-dtrace \
+	--disable-fd-setsize \
+	--disable-werror \
+	--disable-memory-sanitizer \
+	--disable-address-sanitizer \
+	--disable-undefined-sanitizer \
+	--disable-all \
+	--without-libxml \
+	--without-openssl \
+	--without-kerberos \
+	--without-system-ciphers \
+	--without-external-pcre \
+	--without-pcre-jit \
+	--without-sqlite3 \
+	--without-zlib \
+	--disable-bcmath \
+	--without-bz2 \
+	--disable-calendar \
+	--disable-ctype \
+	--without-curl \
+	--disable-dba \
+	--without-qdbm \
+	--without-gdbm \
+	--without-ndbm \
+	--without-db4 \
+	--without-db3 \
+	--without-db2 \
+	--without-db1 \
+	--without-dbm \
+	--without-tcadb \
+	--without-lmdb \
+	--without-cdb \
+	--disable-inifile \
+	--disable-flatfile \
+	--disable-dom \
+	--without-enchant \
+	--disable-exif \
+	--without-ffi \
+	--disable-fileinfo \
+	--$(call ptx/endis, PTXCONF_PHP8_FILTER)-filter \
+	--disable-ftp \
+	--without-openssl-dir \
+	--disable-gd \
+	--without-external-gd \
+	--without-avif \
+	--without-webp \
+	--without-jpeg \
+	--without-xpm \
+	--without-freetype \
+	--disable-gd-jis-conv \
+	--without-gettext \
+	--without-gmp \
+	--without-mhash \
+	--without-iconv \
+	--without-imap \
+	--without-imap-ssl \
+	--disable-intl \
+	--without-ldap \
+	--without-ldap-sasl \
+	--disable-mbstring \
+	--disable-mbregex \
+	--without-mysqli \
+	--without-mysql-sock \
+	--without-oci8 \
+	--without-odbcver \
+	--without-adabas \
+	--without-sapdb \
+	--without-solid \
+	--without-ibm-db2 \
+	--without-empress \
+	--without-empress-bcs \
+	--without-custom-odbc \
+	--without-iodbc \
+	--without-esoob \
+	--without-unixODBC \
+	--without-dbmaker \
+	--disable-opcache \
+	--disable-huge-code-pages \
+	--disable-opcache-jit \
+	--disable-pcntl \
+	--disable-pdo \
+	--without-pdo-dblib \
+	--without-pdo-firebird \
+	--without-pdo-mysql \
+	--without-zlib-dir \
+	--without-pdo-oci \
+	--without-pdo-odbc \
+	--without-pdo-pgsql \
+	--without-pdo-sqlite \
+	--without-pgsql \
+	--disable-phar \
+	--disable-posix \
+	--without-pspell \
+	--without-libedit \
+	--without-readline \
+	--$(call ptx/endis, PTXCONF_PHP8_SESSION)-session \
+	--without-mm \
+	--disable-shmop \
+	--disable-simplexml \
+	--without-snmp \
+	--disable-soap \
+	--disable-sockets \
+	--without-sodium \
+	--without-external-libcrypt \
+	--without-password-argon2 \
+	--disable-sysvmsg \
+	--disable-sysvsem \
+	--disable-sysvshm \
+	--without-tidy \
+	--disable-tokenizer \
+	--disable-xml \
+	--without-expat \
+	--disable-xmlreader \
+	--disable-xmlwriter \
+	--without-xsl \
+	--disable-zend-test \
+	--without-zip \
+	--disable-mysqlnd \
+	--disable-mysqlnd-compression-support \
+	--without-pear \
+	--disable-fiber-asm \
+	--disable-zend-signals
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/php8.install:
+	@$(call targetinfo)
+	@$(call world/install, PHP8)
+	@install -vD -m644 $(PHP8_DIR)/php.ini-production \
+		$(PHP8_PKGDIR)/etc/php8/php.ini
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/php8.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, php8)
+	@$(call install_fixup, php8,PRIORITY,optional)
+	@$(call install_fixup, php8,SECTION,base)
+	@$(call install_fixup, php8,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
+	@$(call install_fixup, php8,DESCRIPTION,missing)
+
+ifdef PTXCONF_PHP8_SAPI_CLI
+	@$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php)
+endif
+
+ifdef PTXCONF_PHP8_SAPI_CGI
+	@$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php-cgi)
+endif
+
+ifdef PTXCONF_PHP8_INI
+	@$(call install_alternative, php8, 0, 0, 0644, /etc/php8/php.ini)
+endif
+
+	@$(call install_finish, php8)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.34.1





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [ptxdist] [APPLIED] php: reanimate PHP as PHP8
  2022-06-13 19:25       ` [ptxdist] [PATCH v3 " Andreas Helmcke
@ 2022-06-20  6:19         ` Michael Olbrich
  0 siblings, 0 replies; 8+ messages in thread
From: Michael Olbrich @ 2022-06-20  6:19 UTC (permalink / raw)
  To: ptxdist; +Cc: Andreas Helmcke

Thanks, applied as a79ab0d71b2fd1d3a330c43ded232255afd8163c.

Michael

[sent from post-receive hook]

On Mon, 20 Jun 2022 08:19:37 +0200, Andreas Helmcke <ahelmcke@ela-soft.com> wrote:
> PHP5 is gone with commit
>  f356f581e17a9474bdc01dbe3907f96558101609   "php5: remove old package"
> 
> Let's try now with PHP8 instead and a minimal feature set due to limited
> test options. The remaining features can be extended on demand.
> 
> Co-authored-by: Juergen Borleis <jbe@pengutronix.de>
> Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
> Signed-off-by: Andreas Helmcke <ahelmcke@ela-soft.com>
> Message-Id: <98039f8a-eab3-9406-83e9-1d3a1515ae46@ela-soft.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/php8.in b/rules/php8.in
> new file mode 100644
> index 000000000000..2ed2ea7fddd5
> --- /dev/null
> +++ b/rules/php8.in
> @@ -0,0 +1,75 @@
> +## SECTION=scripting_languages
> +# php6 configuration
> +
> +menuconfig PHP8
> +	tristate
> +	prompt "php8                          "
> +	select GLIBC_M
> +	help
> +	  PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used
> +	  general-purpose scripting language that is especially suited for web
> +	  development and can be embedded into HTML.
> +
> +if PHP8
> +
> +config PHP8_INI
> +	bool
> +	prompt "install /etc/php8/php.ini"
> +	default y
> +	help
> +	  Installs (if present) the
> +	  "./projectroot/etc/php8/php.ini" file from your
> +	  workspace, otherwise a generic one from the ptxdist
> +	  directory.
> +
> +# ----------------------------------------------------------------------------
> +# SAPI Modules (add more on demand)
> +# ----------------------------------------------------------------------------
> +
> +choice
> +	prompt "SAPI Module"
> +	default PHP8_SAPI_NONE
> +	help
> +	  Select one of the SAP (Server Application Programming) Interfaces to
> +	  be supported at run-time. It is possible to select no SAP interface
> +	  here, then your PHP supports a command line interface (CLI) only.
> +
> +config PHP8_SAPI_CGI
> +	bool
> +	prompt "cgi"
> +	help
> +	  Build standard CGI version of PHP.
> +
> +config PHP8_SAPI_NONE
> +	bool
> +	prompt "none"
> +	select PHP8_SAPI_CLI
> +	help
> +	  This forces a command line interface variant only.
> +
> +endchoice
> +
> +config PHP8_SESSION
> +	bool
> +	prompt "session support"
> +	default y
> +	help
> +	  A session is a way to store information to be used across multiple
> +	  pages. The information is stored locally only.
> +
> +config PHP8_FILTER
> +	bool
> +	prompt "filter support"
> +	default y
> +	help
> +	  This extension filters data by either validating or sanitizing it. 
> +	  This is especially useful when the data source contains unknown (or foreign) data, like user supplied input. 
> +	  For example, this data may come from an HTML form. 
> +
> +config PHP8_SAPI_CLI
> +	bool
> +	prompt "cli"
> +	help
> +	  Build command line interface (CLI) version of PHP
> +
> +endif
> diff --git a/rules/php8.make b/rules/php8.make
> new file mode 100644
> index 000000000000..c65d0d192ae2
> --- /dev/null
> +++ b/rules/php8.make
> @@ -0,0 +1,244 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2006-2008 by Robert Schwebel
> +#               2009, 2012 by Marc Kleine-Budde <mkl@pengutronix.de>
> +#               2015 by Bruno Thomsen <bth@kamstrup.com>
> +#               2021 by Juergen Borleis <jbe@pengutronix.de>
> +#               2022 by Andreas Helmcke <ahelmcke@ela-soft.com>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_PHP8) += php8
> +
> +#
> +# Paths and names
> +#
> +PHP8_VERSION	:= 8.1.6
> +PHP8_MD5	:= 943eae7f07c2056ce87478e7d6c0cbbb
> +PHP8		:= php-$(PHP8_VERSION)
> +PHP8_SUFFIX	:= tar.xz
> +PHP8_SOURCE	:= $(SRCDIR)/$(PHP8).$(PHP8_SUFFIX)
> +PHP8_DIR	:= $(BUILDDIR)/$(PHP8)
> +PHP8_LICENSE 	:= PHP-3.01
> +PHP8_LICENSE_FILES := file://LICENSE;md5=99532e0f6620bc9bca34f12fadaee33c
> +
> +#
> +# Note: older releases are moved to the 'museum', but the 'de.php.net'
> +# response with a HTML file instead of the archive. So, try the 'museum'
> +# URL first
> +#
> +PHP8_URL := \
> +	http://museum.php.net/php8/$(PHP8).$(PHP8_SUFFIX) \
> +	http://de.php.net/distributions/$(PHP8).$(PHP8_SUFFIX)
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#
> +# autoconf
> +#
> +PHP8_AUTOCONF := \
> +	$(CROSS_AUTOCONF_USR) \
> +	--disable-rpath \
> +	--disable-re2c-cgoto \
> +	--disable-gcc-global-regs \
> +	--without-apxs2 \
> +	--$(call ptx/endis, PTXCONF_PHP8_SAPI_CLI)-cli \
> +	--disable-embed \
> +	--disable-fpm \
> +	--without-fpm-user \
> +	--without-fpm-group \
> +	--without-fpm-systemd \
> +	--without-fpm-acl \
> +	--without-fpm-apparmor \
> +	--disable-fuzzer \
> +	--disable-fuzzer-msan \
> +	--disable-litespeed \
> +	--disable-phpdbg \
> +	--disable-phpdbg-debug \
> +	--disable-phpdbg-readline \
> +	--$(call ptx/endis, PTXCONF_PHP8_SAPI_CGI)-cgi \
> +	--without-valgrind \
> +	--disable-gcov \
> +	--disable-debug \
> +	--disable-debug-assertions \
> +	--disable-zts \
> +	--disable-rtld-now \
> +	--without-layout \
> +	--with-config-file-path=/etc/php8 \
> +	--without-config-file-scan-dir \
> +	--disable-sigchild \
> +	--disable-libgcc \
> +	--disable-short-tags \
> +	--disable-dmalloc \
> +	--$(call ptx/endis, PTXCONF_GLOBAL_IPV6)-ipv6 \
> +	--disable-dtrace \
> +	--disable-fd-setsize \
> +	--disable-werror \
> +	--disable-memory-sanitizer \
> +	--disable-address-sanitizer \
> +	--disable-undefined-sanitizer \
> +	--disable-all \
> +	--without-libxml \
> +	--without-openssl \
> +	--without-kerberos \
> +	--without-system-ciphers \
> +	--without-external-pcre \
> +	--without-pcre-jit \
> +	--without-sqlite3 \
> +	--without-zlib \
> +	--disable-bcmath \
> +	--without-bz2 \
> +	--disable-calendar \
> +	--disable-ctype \
> +	--without-curl \
> +	--disable-dba \
> +	--without-qdbm \
> +	--without-gdbm \
> +	--without-ndbm \
> +	--without-db4 \
> +	--without-db3 \
> +	--without-db2 \
> +	--without-db1 \
> +	--without-dbm \
> +	--without-tcadb \
> +	--without-lmdb \
> +	--without-cdb \
> +	--disable-inifile \
> +	--disable-flatfile \
> +	--disable-dom \
> +	--without-enchant \
> +	--disable-exif \
> +	--without-ffi \
> +	--disable-fileinfo \
> +	--$(call ptx/endis, PTXCONF_PHP8_FILTER)-filter \
> +	--disable-ftp \
> +	--without-openssl-dir \
> +	--disable-gd \
> +	--without-external-gd \
> +	--without-avif \
> +	--without-webp \
> +	--without-jpeg \
> +	--without-xpm \
> +	--without-freetype \
> +	--disable-gd-jis-conv \
> +	--without-gettext \
> +	--without-gmp \
> +	--without-mhash \
> +	--without-iconv \
> +	--without-imap \
> +	--without-imap-ssl \
> +	--disable-intl \
> +	--without-ldap \
> +	--without-ldap-sasl \
> +	--disable-mbstring \
> +	--disable-mbregex \
> +	--without-mysqli \
> +	--without-mysql-sock \
> +	--without-oci8 \
> +	--without-odbcver \
> +	--without-adabas \
> +	--without-sapdb \
> +	--without-solid \
> +	--without-ibm-db2 \
> +	--without-empress \
> +	--without-empress-bcs \
> +	--without-custom-odbc \
> +	--without-iodbc \
> +	--without-esoob \
> +	--without-unixODBC \
> +	--without-dbmaker \
> +	--disable-opcache \
> +	--disable-huge-code-pages \
> +	--disable-opcache-jit \
> +	--disable-pcntl \
> +	--disable-pdo \
> +	--without-pdo-dblib \
> +	--without-pdo-firebird \
> +	--without-pdo-mysql \
> +	--without-zlib-dir \
> +	--without-pdo-oci \
> +	--without-pdo-odbc \
> +	--without-pdo-pgsql \
> +	--without-pdo-sqlite \
> +	--without-pgsql \
> +	--disable-phar \
> +	--disable-posix \
> +	--without-pspell \
> +	--without-libedit \
> +	--without-readline \
> +	--$(call ptx/endis, PTXCONF_PHP8_SESSION)-session \
> +	--without-mm \
> +	--disable-shmop \
> +	--disable-simplexml \
> +	--without-snmp \
> +	--disable-soap \
> +	--disable-sockets \
> +	--without-sodium \
> +	--without-external-libcrypt \
> +	--without-password-argon2 \
> +	--disable-sysvmsg \
> +	--disable-sysvsem \
> +	--disable-sysvshm \
> +	--without-tidy \
> +	--disable-tokenizer \
> +	--disable-xml \
> +	--without-expat \
> +	--disable-xmlreader \
> +	--disable-xmlwriter \
> +	--without-xsl \
> +	--disable-zend-test \
> +	--without-zip \
> +	--disable-mysqlnd \
> +	--disable-mysqlnd-compression-support \
> +	--without-pear \
> +	--disable-fiber-asm \
> +	--disable-zend-signals
> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/php8.install:
> +	@$(call targetinfo)
> +	@$(call world/install, PHP8)
> +	@install -vD -m644 $(PHP8_DIR)/php.ini-production \
> +		$(PHP8_PKGDIR)/etc/php8/php.ini
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/php8.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, php8)
> +	@$(call install_fixup, php8,PRIORITY,optional)
> +	@$(call install_fixup, php8,SECTION,base)
> +	@$(call install_fixup, php8,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
> +	@$(call install_fixup, php8,DESCRIPTION,missing)
> +
> +ifdef PTXCONF_PHP8_SAPI_CLI
> +	@$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php)
> +endif
> +
> +ifdef PTXCONF_PHP8_SAPI_CGI
> +	@$(call install_copy, php8, 0, 0, 0755, -, /usr/bin/php-cgi)
> +endif
> +
> +ifdef PTXCONF_PHP8_INI
> +	@$(call install_alternative, php8, 0, 0, 0644, /etc/php8/php.ini)
> +endif
> +
> +	@$(call install_finish, php8)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-06-20  6:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-30 16:55 [ptxdist] [PATCH 1/2] php: reanimate PHP as PHP8 Andreas Helmcke
2022-06-03  7:07 ` Michael Olbrich
2022-06-03 15:12   ` [ptxdist] [PATCH v2 " Andreas Helmcke
2022-06-09 18:00     ` Michael Olbrich
2022-06-10  6:19     ` Michael Olbrich
2022-06-10  9:42       ` Andreas Helmcke
2022-06-13 19:25       ` [ptxdist] [PATCH v3 " Andreas Helmcke
2022-06-20  6:19         ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox