Index: Makefile
===================================================================
--- Makefile (nonexistent)
+++ Makefile (revision 5)
@@ -0,0 +1,469 @@
+
+COMPONENT_TARGETS = $(HARDWARE_INTEL_PC32)
+COMPONENT_TARGETS += $(HARDWARE_INTEL_PC64)
+COMPONENT_TARGETS += $(HARDWARE_EBOX_3350DX2)
+COMPONENT_TARGETS += $(HARDWARE_CB1X)
+COMPONENT_TARGETS += $(HARDWARE_CB2X)
+COMPONENT_TARGETS += $(HARDWARE_CB3X)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP2E)
+COMPONENT_TARGETS += $(HARDWARE_NANOPI_NEO)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PL2)
+COMPONENT_TARGETS += $(HARDWARE_WECHIP_TX6)
+COMPONENT_TARGETS += $(HARDWARE_FFRK3288)
+COMPONENT_TARGETS += $(HARDWARE_POIN2)
+COMPONENT_TARGETS += $(HARDWARE_RK3328_CC)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_EDGE)
+COMPONENT_TARGETS += $(HARDWARE_LEEZ_P710)
+COMPONENT_TARGETS += $(HARDWARE_M201)
+COMPONENT_TARGETS += $(HARDWARE_MXV)
+COMPONENT_TARGETS += $(HARDWARE_P201)
+COMPONENT_TARGETS += $(HARDWARE_NEXBOX_A95X)
+COMPONENT_TARGETS += $(HARDWARE_ODROID_C2)
+COMPONENT_TARGETS += $(HARDWARE_P212)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM)
+COMPONENT_TARGETS += $(HARDWARE_Q201)
+COMPONENT_TARGETS += $(HARDWARE_ENYBOX_X2)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM2)
+COMPONENT_TARGETS += $(HARDWARE_NIT6Q)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6DL_C)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6Q_C)
+COMPONENT_TARGETS += $(HARDWARE_BONE_BLACK)
+COMPONENT_TARGETS += $(HARDWARE_OMAP5UEVM)
+COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
+COMPONENT_TARGETS += $(HARDWARE_CI20)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_T1)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_M1)
+COMPONENT_TARGETS += $(HARDWARE_S824L)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN)
+COMPONENT_TARGETS += $(HARDWARE_S824L_LSB)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_SIFIVE_U740)
+
+
+NEED_ABS_PATH = true
+COMPONENT_IS_3PP = true
+
+
+include ../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES = sources/packages/n/php
+
+REQUIRES = net/httpd/2.4.51
+REQUIRES += net/alpine/2.25
+REQUIRES += net/curl/7.75.0
+REQUIRES += net/net-snmp/5.9
+REQUIRES += net/openssl/1.1.1r
+REQUIRES += net/krb5/1.19.1
+REQUIRES += net/libnsl/1.3.0
+
+REQUIRES += libs/gmp/6.2.1
+REQUIRES += libs/libffi/3.4.4
+REQUIRES += libs/aspell/0.60.8
+REQUIRES += libs/ncurses/6.3
+REQUIRES += libs/argon2/20190702
+REQUIRES += libs/oniguruma/6.9.7.1
+REQUIRES += libs/pcre2/10.36
+REQUIRES += libs/libgd/2.3.3
+
+REQUIRES += libs/enchant/2.3.2
+REQUIRES += libs/expat/2.5.0
+REQUIRES += libs/libxml2/2.9.9
+REQUIRES += libs/libxslt/1.1.34
+REQUIRES += libs/libedit/20191231-3.1
+REQUIRES += libs/icu4c/68.2
+REQUIRES += libs/libzip/1.9.2
+REQUIRES += libs/libsodium/1.0.18
+REQUIRES += libs/serf/1.3.9
+REQUIRES += libs/tidy-html5/5.8.0
+
+REQUIRES += libs/gdbm/1.23
+REQUIRES += app/db/18.1.40
+REQUIRES += app/mariadb/10.6.5
+REQUIRES += app/postgresql/14.1
+REQUIRES += app/sqlite/3.39.4.0
+REQUIRES += libs/libiodbc/3.52.14
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version = 8.1.2
+tar_xz_archive = $(SRC_PACKAGE_PATH)/packages/n/php/php-$(version).tar.xz
+SRC_ARCHIVE = $(tar_xz_archive)
+SRC_DIR = $(TARGET_BUILD_DIR)/php-$(version)
+src_dir_name = php-$(version)
+src_done = $(TARGET_BUILD_DIR)/.source_done
+
+cacert_archive = $(SRC_PACKAGE_PATH)/packages/n/php/cacert.pem.xz
+
+PATCHES = PATCHES
+
+build_dir = $(TARGET_BUILD_DIR)/build
+build_target = $(TARGET_BUILD_DIR)/.build_done
+install_target = $(TARGET_BUILD_DIR)/.install_done
+
+
+####### Targets
+
+PKG_GROUP = net
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+PHP_PKG_NAME = php
+PHP_PKG_VERSION = 8.1.2
+PHP_PKG_ARCH = $(PKGARCH)
+PHP_PKG_DISTRO_NAME = $(DISTRO_NAME)
+PHP_PKG_DISTRO_VERSION = $(DISTRO_VERSION)
+PHP_PKG_GROUP = $(PKG_GROUP)
+### |---handy-ruler-------------------------------|
+PHP_PKG_SHORT_DESCRIPTION = HTML-embedded scripting language
+PHP_PKG_URL = $(BUG_URL)
+PHP_PKG_LICENSE = PHP
+PHP_PKG_DESCRIPTION_FILE = $(TARGET_BUILD_DIR)/$(PHP_PKG_NAME)-pkg-description
+PHP_PKG_DESCRIPTION_FILE_IN = $(PHP_PKG_NAME)-pkg-description.in
+PHP_PKG_INSTALL_SCRIPT = $(PHP_PKG_NAME)-pkg-install.sh
+
+PHP_PKG = $(CURDIR)/$(TARGET_BUILD_DIR)/$(PHP_PKG_NAME)-package
+
+pkg_basename = $(PHP_PKG_NAME)-$(PHP_PKG_VERSION)-$(PHP_PKG_ARCH)-$(PHP_PKG_DISTRO_NAME)-$(PHP_PKG_DISTRO_VERSION)
+
+pkg_archive = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_certificate = $(call cert-name,$(pkg_archive))
+pkg_signature = $(call sign-name,$(pkg_archive))
+pkg_description = $(call desc-name,$(pkg_archive))
+products = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS = $(build_target)
+BUILD_TARGETS += $(install_target)
+
+PRODUCT_TARGETS = $(products)
+
+ROOTFS_TARGETS = $(pkg_archive)
+
+
+include ../../../build-system/core.mk
+
+
+env_sysroot = INSTALL_ROOT=$(PHP_PKG)
+
+
+extra_configure_switches = --libdir=/usr/lib$(LIBUFFIX)
+extra_configure_switches += --with-libdir=lib$(LIBSUFFIX)
+extra_configure_switches += --localstatedir=/var
+extra_configure_switches += --sysconfdir=/etc/php
+extra_configure_switches += --datarootdir=/usr/share
+extra_configure_switches += --datadir=/usr/share
+extra_configure_switches += --infodir=/usr/share/info
+extra_configure_switches += --mandir=/usr/share/man
+
+extra_configure_switches += --with-apxs2=$(TARGET_DEST_DIR)/usr/bin/apxs
+#
+# Deprecated: --with-pear:
+#
+#extra_configure_switches += --with-pear=/usr/lib$(LIBSUFFIX)/php
+
+extra_configure_switches += --enable-fpm
+extra_configure_switches += --with-fpm-user=nginx
+extra_configure_switches += --with-fpm-group=nginx
+extra_configure_switches += --enable-pcntl
+extra_configure_switches += --enable-mbregex
+extra_configure_switches += --enable-tokenizer=shared
+extra_configure_switches += --with-config-file-scan-dir=/etc/php/php.d
+extra_configure_switches += --with-config-file-path=/etc/php
+extra_configure_switches += --with-layout=GNU
+extra_configure_switches += --disable-sigchild
+extra_configure_switches += --with-libxml
+extra_configure_switches += --with-expat
+extra_configure_switches += --enable-simplexml
+extra_configure_switches += --enable-xmlreader=shared
+extra_configure_switches += --enable-dom=shared
+extra_configure_switches += --enable-filter
+extra_configure_switches += --disable-debug
+extra_configure_switches += --with-openssl=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --with-kerberos=shared,$(TARGET_DEST_DIR)/usr
+#
+# NOTE:
+# We use internal pcre2 library instead of --with-external-pcre
+#
+ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_RISCV64_GLIBC)),)
+extra_configure_switches += --without-pcre-jit
+endif
+extra_configure_switches += --with-zlib=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --enable-bcmath=shared
+extra_configure_switches += --with-bz2=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --enable-calendar=shared
+extra_configure_switches += --enable-ctype=shared
+extra_configure_switches += --with-curl=shared,$(TARGET_DEST_DIR)/usr
+
+extra_configure_switches += --enable-dba=shared
+extra_configure_switches += --with-gdbm=shared,$(TARGET_DEST_DIR)/usr
+#
+# NOTE:
+# ----
+# If db-18.1.x is configured with --enable-compat185 then
+# PHP DBA can be linked with libdb-18.1.so using db_185.h:
+#
+extra_configure_switches += --with-db1=shared,$(TARGET_DEST_DIR)/usr
+
+extra_configure_switches += --enable-exif=shared
+extra_configure_switches += --enable-ftp=shared
+extra_configure_switches += --enable-gd=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --with-external-gd
+extra_configure_switches += --with-avif=no
+extra_configure_switches += --with-webp
+extra_configure_switches += --with-jpeg
+extra_configure_switches += --with-freetype
+extra_configure_switches += --with-xpm=no
+extra_configure_switches += --with-gettext=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --with-gmp=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --with-ffi=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --with-iconv=shared
+
+# IMAP c-client from alpine-2.25:
+extra_configure_switches += --with-imap-ssl=$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --with-imap=$(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/alpine-2.25/c-client
+
+extra_configure_switches += --with-ldap=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --enable-mbstring=shared
+extra_configure_switches += --enable-mysqlnd=shared
+extra_configure_switches += --with-mysqli=shared,mysqlnd
+extra_configure_switches += --with-mysql-sock=/var/run/mysql/mysql.sock
+extra_configure_switches += --with-iodbc=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --enable-pdo=shared
+extra_configure_switches += --with-pdo-mysql=shared,mysqlnd
+extra_configure_switches += --with-pdo-pgsql=shared,$(TARGET_DEST_DIR)/usr/bin/$(TARGET)-pg_config
+extra_configure_switches += --with-pgsql=shared,$(TARGET_DEST_DIR)/usr/bin/$(TARGET)-pg_config
+extra_configure_switches += --with-pdo-sqlite=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --with-pdo-odbc=shared,iODBC,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --with-pspell=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --with-enchant=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --enable-shmop=shared
+extra_configure_switches += --with-snmp=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --enable-soap=shared
+extra_configure_switches += --enable-sockets
+extra_configure_switches += --with-sqlite3=shared
+extra_configure_switches += --enable-sysvmsg
+extra_configure_switches += --enable-sysvsem
+extra_configure_switches += --enable-sysvshm
+extra_configure_switches += --with-xsl=shared,$(TARGET_DEST_DIR)/usr
+extra_configure_switches += --with-zip=shared
+extra_configure_switches += --enable-intl=shared
+extra_configure_switches += --enable-opcache
+extra_configure_switches += --with-gnu-ld
+extra_configure_switches += --with-pic
+extra_configure_switches += --enable-phpdbg
+extra_configure_switches += --with-sodium
+extra_configure_switches += --with-password-argon2
+extra_configure_switches += --without-readline
+extra_configure_switches += --with-libedit
+extra_configure_switches += --with-tidy=shared,$(TARGET_DEST_DIR)/usr
+
+ifeq ($(__ENABLE_STATIC__),yes)
+extra_configure_switches += --enable-static=yes
+else
+extra_configure_switches += --enable-static=no
+endif
+extra_configure_switches += --enable-shared=yes
+
+
+extra_environment = EXTENSION_DIR=/usr/lib$(LIBSUFFIX)/php/extensions
+
+ifneq ($(filter $(TOOLCHAIN),$(TOOLCHAIN_POWER8_GLIBC) $(TOOLCHAIN_POWER9_GLIBC)),)
+extra_environment += ac_cv_c_bigendian_php=yes
+endif
+
+CFLAGS += -Wno-array-bounds -Wno-maybe-uninitialized
+
+
+TARGET_BIN_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX)
+TARGET_LIB_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX):/usr/lib/../lib$(LIBSUFFIX)
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+ $(UNPACK_SRC_ARCHIVE)
+ $(APPLY_PATCHES)
+ @touch $@
+
+$(build_target): $(src_done)
+ @mkdir -p $(build_dir)
+ @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(extra_environment) ../$(src_dir_name)/configure \
+ --prefix=/usr \
+ --build=$(BUILD) \
+ --host=$(TARGET) \
+ $(extra_configure_switches)
+ # ======= Tune configure settings for target =======
+ @( cd $(build_dir) ; \
+ cfgcmd="`cat Makefile | grep '^CONFIGURE_COMMAND' | \
+ sed 's,^CONFIGURE_COMMAND[ \t]*=[ \t]*\(.*$$\),\1,' | \
+ sed \"s,$(TARGET_DEST_DIR),,g\" | \
+ sed \"s,$(TARGET)-,,g\" | \
+ sed \"s, '--build=[^\']*',,g\" | \
+ sed \"s, '--host=[^\']*',,g\" | \
+ sed \"s, 'build_alias=[^\']*',,g\" | \
+ sed \"s, 'host_alias=[^\']*',,g\"`" ; \
+ cfgopt="`cat Makefile | grep '^CONFIGURE_OPTIONS' | \
+ sed 's,^CONFIGURE_OPTIONS[ \t]*=[ \t]*\(.*$$\),\1,' | \
+ sed \"s,$(TARGET_DEST_DIR),,g\" | \
+ sed \"s,$(TARGET)-,,g\" | \
+ sed \"s, '--build=[^\']*',,g\" | \
+ sed \"s, '--host=[^\']*',,g\" | \
+ sed \"s, 'build_alias=[^\']*',,g\" | \
+ sed \"s, 'host_alias=[^\']*',,g\"`" ; \
+ sed -i "s|^\(CONFIGURE_COMMAND[ \t]*=\).*$$|\1 $${cfgcmd}|" Makefile ; \
+ sed -i "s|^\(CONFIGURE_OPTIONS[ \t]*=\).*$$|\1 $${cfgopt}|" Makefile ; \
+ sed -i "s,$(TARGET_DEST_DIR),,g" main/build-defs.h ; \
+ sed -i "s,$(TARGET)-,,g" main/build-defs.h ; \
+ sed -i "s, '--build=[^\']*',,g" main/build-defs.h ; \
+ sed -i "s, '--host=[^\']*',,g" main/build-defs.h ; \
+ sed -i "s, 'build_alias=[^\']*',,g" main/build-defs.h ; \
+ sed -i "s, 'host_alias=[^\']*',,g" main/build-defs.h ; \
+ )
+ @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) \
+ PHP_PHARCMD_EXECUTABLE=$(shell which php)
+ @touch $@
+
+$(install_target): $(build_target)
+ @mkdir -p $(PHP_PKG)/etc/httpd
+ @cp $(TARGET_DEST_DIR)/etc/httpd/httpd.conf* $(PHP_PKG)/etc/httpd/httpd.conf
+ @cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) \
+ PHP_PEARCMD_EXECUTABLE=$(shell which php) -j1 install $(env_sysroot)
+ # ======= Install mod_php.conf etc. =======
+ @mkdir -p $(PHP_PKG)/etc/httpd
+ @rm -f $(PHP_PKG)/etc/httpd/*
+ @chmod 755 $(PHP_PKG)/etc/httpd
+ @cat $(CURDIR)/conf/mod_php.conf | \
+ sed 's,@LIBDIRSUFFIX@,$(LIBSUFFIX),g' > $(PHP_PKG)/etc/httpd/mod_php.conf.new
+ @mkdir -p $(PHP_PKG)/etc/php/php.d
+ @chmod 755 $(PHP_PKG)/etc/php/php.d $(PHP_PKG)/etc/php/php-fpm.d
+ @cat $(SRC_DIR)/php.ini-production > $(PHP_PKG)/etc/php/php.ini.new
+ @cp -a $(SRC_DIR)/php.ini-development $(PHP_PKG)/etc/php
+ @chmod 644 $(PHP_PKG)/etc/php/php.ini.new
+ @chmod 644 $(PHP_PKG)/etc/php/php.ini-development
+ @mv $(PHP_PKG)/etc/php/php-fpm.conf.default $(PHP_PKG)/etc/php/php-fpm.conf.new
+ @chmod 644 $(PHP_PKG)/etc/php/php-fpm.conf.new
+ @mv $(PHP_PKG)/etc/php/php-fpm.d/www.conf.default $(PHP_PKG)/etc/php/php-fpm.d/www.conf.new
+ @chmod 644 $(PHP_PKG)/etc/php/php-fpm.d/www.conf.new
+ @mkdir $(PHP_PKG)/etc/rc.d
+ @cat $(build_dir)/sapi/fpm/init.d.php-fpm > $(PHP_PKG)/etc/rc.d/rc.php-fpm.new
+ @chmod 644 $(PHP_PKG)/etc/rc.d/rc.php-fpm.new
+ @mkdir -p $(PHP_PKG)/var/lib/php
+ @chmod 770 $(PHP_PKG)/var/lib/php
+ # ======= Install Documentation =======
+ @( cd $(PHP_PKG)/usr/share/man/man1 ; \
+ for file in *.1 ; do \
+ ln=`head -n 1 $$file` ; \
+ if [ "`echo $$ln | grep '^\.so '`" != "" ] ; then \
+ origin=`echo $$ln | cut -f 2 -d ' '` ; \
+ origin=`basename $$origin` ; \
+ rm -f $$file ; \
+ ln -sf $$origin $$file ; \
+ fi ; \
+ done ; \
+ )
+ @if [ -d $(PHP_PKG)/usr/share/man ]; then \
+ ( cd $(PHP_PKG)/usr/share/man ; \
+ for manpagedir in `find . -type d -name "man*"` ; do \
+ ( cd $$manpagedir ; \
+ for eachpage in `find . -type l -maxdepth 1` ; do \
+ ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
+ rm $$eachpage ; \
+ done ; \
+ gzip -9 *.? ; \
+ ) \
+ done \
+ ) \
+ fi
+ @mkdir -p $(PHP_PKG)/usr/doc/$(src_dir_name)
+ @cp -a $(SRC_DIR)/LICENSE \
+ $(PHP_PKG)/usr/doc/$(src_dir_name)
+ @mkdir -p $(PHP_PKG)/usr/share/doc/$(src_dir_name)
+ @( cd $(SRC_DIR) ; \
+ cp -a CODING_STANDARDS* CONTRIBUTING* EXTENSIONS LICENSE NEWS README* UPGRADING* \
+ $(PHP_PKG)/usr/share/doc/$(src_dir_name) ; \
+ )
+ @( cd $(SRC_DIR) ; \
+ if [ -r ChangeLog ]; then \
+ DOCSDIR=`echo $(PHP_PKG)/usr/share/doc/$(src_dir_name)` ; \
+ cat ChangeLog | head -n 1000 > $$DOCSDIR/ChangeLog ; \
+ touch -r ChangeLog $$DOCSDIR/ChangeLog ; \
+ fi \
+ )
+ # ======= Tune development '/usr/bin/php-config' sctipt =======
+ @( cd $(PHP_PKG)/usr/bin ; \
+ sed -i 's,^prefix="/usr,prefix="$(TARGET_DEST_DIR)/usr,' php-config ; \
+ )
+ # ======= Install the same to $(TARGET_DEST_DIR) =======
+ $(call install-into-devenv, $(PHP_PKG))
+ # ======= Tune target '/usr/bin/php-config' sctipt =======
+ @( cd $(PHP_PKG)/usr/bin ; \
+ sed -i "s,$(TARGET_DEST_DIR),,g" php-config ; \
+ sed -i "s,$(TARGET)-,,g" php-config ; \
+ sed -i "s, '--build=[^\']*',,g" php-config ; \
+ sed -i "s, '--host=[^\']*',,g" php-config ; \
+ sed -i "s, 'build_alias=[^\']*',,g" php-config ; \
+ sed -i "s, 'host_alias=[^\']*',,g" php-config ; \
+ )
+ # ======= Strip binaries =======
+ @( cd $(PHP_PKG) ; \
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ )
+ifeq ($(__ENABLE_STATIC__),yes)
+ @( cd $(PHP_PKG) ; \
+ find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null ; \
+ )
+endif
+ifneq ($(PATCHELF),)
+ # ======= Set RPATH/RUNPATH for target binaries =======
+ @( cd $(PHP_PKG)/usr ; \
+ for file in `find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+ rpath=`$(PATCHELF) --print-rpath $$file 2> /dev/null` ; \
+ if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+ $(PATCHELF) --set-rpath $(TARGET_BIN_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+ fi ; \
+ done ; \
+ )
+ # ======= Set RPATH/RUNPATH for target shared objects =======
+ @( cd $(PHP_PKG)/usr/lib$(LIBSUFFIX) ; \
+ for file in `find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+ rpath=`$(PATCHELF) --print-rpath $$file 2> /dev/null` ; \
+ if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+ $(PATCHELF) --set-rpath $(TARGET_LIB_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+ fi ; \
+ done ; \
+ )
+endif
+ @touch $@
+
+$(PHP_PKG_DESCRIPTION_FILE): $(PHP_PKG_DESCRIPTION_FILE_IN)
+ @cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_certificate) : $(pkg_archive) ;
+$(pkg_signature) : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(PHP_PKG_DESCRIPTION_FILE) $(PHP_PKG_INSTALL_SCRIPT)
+ @cp $(PHP_PKG_DESCRIPTION_FILE) $(PHP_PKG)/.DESCRIPTION
+ @cp $(PHP_PKG_INSTALL_SCRIPT) $(PHP_PKG)/.INSTALL
+ @$(BUILD_PKG_REQUIRES) $(PHP_PKG)/.REQUIRES
+ @echo "pkgname=$(PHP_PKG_NAME)" > $(PHP_PKG)/.PKGINFO ; \
+ echo "pkgver=$(PHP_PKG_VERSION)" >> $(PHP_PKG)/.PKGINFO ; \
+ echo "arch=$(PHP_PKG_ARCH)" >> $(PHP_PKG)/.PKGINFO ; \
+ echo "distroname=$(PHP_PKG_DISTRO_NAME)" >> $(PHP_PKG)/.PKGINFO ; \
+ echo "distrover=$(PHP_PKG_DISTRO_VERSION)" >> $(PHP_PKG)/.PKGINFO ; \
+ echo "group=$(PHP_PKG_GROUP)" >> $(PHP_PKG)/.PKGINFO ; \
+ echo "short_description=\"$(PHP_PKG_SHORT_DESCRIPTION)\"" >> $(PHP_PKG)/.PKGINFO ; \
+ echo "url=$(PHP_PKG_URL)" >> $(PHP_PKG)/.PKGINFO ; \
+ echo "license=$(PHP_PKG_LICENSE)" >> $(PHP_PKG)/.PKGINFO
+ @$(PSEUDO) sh -c "cd $(PHP_PKG) && \
+ chown -R root:root . && \
+ chown -R 0:80 var/lib/php && \
+ $(MAKE_PACKAGE) -J --linkadd=yes $(GNUPG_OPTIONS) -m -d .. ."
Index: PATCHES
===================================================================
--- PATCHES (nonexistent)
+++ PATCHES (revision 5)
@@ -0,0 +1,8 @@
+
+../../../sources/packages/n/php/patches/php-8.1.2-fpm-conf.patch -p0
+../../../sources/packages/n/php/patches/php-8.1.2-pgsql-cross.patch -p0
+../../../sources/packages/n/php/patches/php-8.1.2-imap-api.patch -p0
+../../../sources/packages/n/php/patches/php-8.1.2-ini.patch -p0
+../../../sources/packages/n/php/patches/php-8.1.2-keccakP-big-endian.patch -p0
+../../../sources/packages/n/php/patches/php-8.1.2-pear-cross.patch -p0
+../../../sources/packages/n/php/patches/php-8.1.2-php-build-dir.patch -p0
Index: conf/mod_php.conf
===================================================================
--- conf/mod_php.conf (nonexistent)
+++ conf/mod_php.conf (revision 5)
@@ -0,0 +1,28 @@
+#
+# mod_php - PHP Hypertext Preprocessor module
+#
+
+# Load the PHP module:
+LoadModule php_module lib@LIBDIRSUFFIX@/httpd/modules/libphp.so
+
+# Tell Apache to feed all *.php files through PHP. If you'd like to
+# parse PHP embedded in files with different extensions, comment out
+# these lines and see the example below.
+<FilesMatch \.php$>
+ SetHandler application/x-httpd-php
+</FilesMatch>
+
+# Tell Apache to feed all *.php, *.html, and *.htm files through
+# the PHP module. Add or subtract extensions here as desired. Please
+# note that running pages through PHP for no reason can be both slow
+# and insecure, so be sure to know what you're doing. It's a convenient
+# shortcut, but probably isn't suitible for high-traffic sites if you
+# write any of your pages in straight HTML.
+#<FilesMatch "\.(php|html|htm)$">
+# SetHandler application/x-httpd-php
+#</FilesMatch>
+
+# This will display PHP files in colored syntax form. Use with caution.
+#<FilesMatch "\.phps$">
+# SetHandler application/x-httpd-php-source
+#</FilesMatch>
Index: conf
===================================================================
--- conf (nonexistent)
+++ conf (revision 5)
Property changes on: conf
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: php-pkg-description.in
===================================================================
--- php-pkg-description.in (nonexistent)
+++ php-pkg-description.in (revision 5)
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+php: php @VERSION@ (HTML-embedded scripting language)
+php:
+php: PHP is an HTML-embedded scripting language. It shares syntax
+php: characteristics with C, Java, and Perl. The primary objective
+php: behind this language is to make a fast and easy-to-use scripting
+php: language for dynamic web sites.
+php:
+php:
+php: Homepage: https://www.php.net
+php:
+php:
Index: php-pkg-install.sh
===================================================================
--- php-pkg-install.sh (nonexistent)
+++ php-pkg-install.sh (revision 5)
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+# Preserve new files
+install_file() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ touch -r $NEW ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ install_file $NEW
+}
+
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ preserve_perms etc/rc.d/rc.php-fpm.new
+ install_file etc/php/php-fpm.d/www.conf.new
+ install_file etc/php/php-fpm.conf.new
+ install_file etc/php/php.ini.new
+ install_file etc/httpd/mod_php.conf.new
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_update() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_update() {
+ post_install
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
Property changes on: php-pkg-install.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: .
===================================================================
--- . (nonexistent)
+++ . (revision 5)
Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~