gtk+3: fix dependencies for new gnome/accessibility/at-spi2-core
[oi-userland.git] / components / web / php / php-8_3 / Makefile
blobd02f06bcbfd40e5379a6e485d074c2f8e118ae93
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"). You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright 2024 Friedrich Kink. All rights reserved.
15 include ../../../../make-rules/shared-macros.mk
17 COMPONENT_NAME= php
18 COMPONENT_MJR_VERSION= 8.3
19 COMPONENT_MNR_VERSION= 14
20 COMPONENT_REVISION= 1
21 COMPONENT_SUMMARY= PHP 8.3
22 COMPONENT_DESCRIPTION= PHP is a popular general-purpose scripting language that is especially suited to web development.
23 COMPONENT_VERSION= $(COMPONENT_MJR_VERSION).$(COMPONENT_MNR_VERSION)
24 COMPONENT_PROJECT_URL= https://www.php.net/
25 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
26 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
27 COMPONENT_ARCHIVE_HASH= sha256:f56fa669ce4c01452a2921f40034d779d8c2b97d0749493ad4781813b9221cf8
28 COMPONENT_ARCHIVE_URL= https://www.php.net/distributions/$(COMPONENT_ARCHIVE)
29 #COMPONENT_SIG_URL= https://www.php.net/distributions/$(COMPONENT_ARCHIVE).asc
30 COMPONENT_FMRI= web/$(COMPONENT_NAME)-83
31 COMPONENT_CLASSIFICATION=Meta Packages/Group Packages
32 COMPONENT_LICENSE= PHP License
33 COMPONENT_LICENSE_FILE= LICENSE
35 include $(WS_MAKE_RULES)/common.mk
37 # remove syntactically wrong options
38 COMPONENT_POST_CONFIGURE_ACTION+= \
39 (cd $(@D) ; \
40 $(GSED) -i -e 's:-Wl,-Wl,::' Makefile )
42 # Apache Paths
43 AP_PREFIX= /usr/apache2/2.4
44 AP_SYSCONFDIR= /etc/apache2/2.4
46 # PHP Paths
47 PHP_PREFIX= /usr/php/$(COMPONENT_MJR_VERSION)
48 PHP_SYSCONFDIR= /etc/php/$(COMPONENT_MJR_VERSION)
49 PHP_DATADIR= /var/php/$(COMPONENT_MJR_VERSION)
51 # -D__solaris__ is very important to trigger TSRM related stuff
52 # otherwise mod_php83.so is crashing
53 CFLAGS += $(CC_BITS) -D_XPG4_2 -D__EXTENSIONS__ -std=c17 -D__solaris__
54 CFLAGS += -I/usr/include/openldap
55 CPPFLAGS += $(CPP_XPG6MODE)
56 LDFLAGS += -lldap_r
58 # Configure Options
59 CONFIGURE_OPTIONS = --prefix=$(PHP_PREFIX)
60 CONFIGURE_OPTIONS += --bindir=$(PHP_PREFIX)/bin
61 CONFIGURE_OPTIONS += --sbindir=$(PHP_PREFIX)/bin
62 CONFIGURE_OPTIONS += --libdir=$(PHP_PREFIX)/lib/$(MACH64)
63 CONFIGURE_OPTIONS += --libexecdir=$(PHP_PREFIX)/libexec
64 CONFIGURE_OPTIONS += --includedir=$(PHP_PREFIX)/include
65 CONFIGURE_OPTIONS += --sysconfdir=$(PHP_SYSCONFDIR)
66 CONFIGURE_OPTIONS += --datadir=$(PHP_DATADIR)
67 CONFIGURE_OPTIONS += --mandir=$(PHP_PREFIX)/share/man
68 CONFIGURE_OPTIONS += --localstatedir=$(PHP_DATADIR)
69 CONFIGURE_OPTIONS += OPENSSL_CFLAGS=-I$(OPENSSL_INCDIR)
70 CONFIGURE_OPTIONS += OPENSSL_LIBS="-L$(OPENSSL_LIBDIR) -lssl -lcrypto"
71 CONFIGURE_OPTIONS += KERBEROS_CFLAGS=-I/usr/include/kerberosv5
72 CONFIGURE_OPTIONS += KERBEROS_LIBS="-L/usr/lib/$(MACH64) -lgss -lkrb5"
73 CONFIGURE_OPTIONS += PCRE2_CFLAGS="-I/usr/include/pcre"
74 CONFIGURE_OPTIONS += ODBC_CFLAGS="-I/usr/include/odbc"
76 # SAPI modules
77 CONFIGURE_OPTIONS += --with-apxs2=$(AP_PREFIX)/bin/apxs
78 CONFIGURE_OPTIONS += --enable-fpm
80 ifeq ($(strip $(MACH)),i386)
81 CONFIGURE_OPTIONS += --build=x86_64-pc-solaris$(SOLARIS_VERSION)
82 CONFIGURE_OPTIONS += --with-external-pcre
83 else
84 CONFIGURE_OPTIONS += --build=sparcv9-sun-solaris$(SOLARIS_VERSION)
85 CONFIGURE_OPTIONS += --with-pcre-jit=no
86 endif
88 CONFIGURE_OPTIONS += --with-config-file-path=$(PHP_SYSCONFDIR)
89 CONFIGURE_OPTIONS += --with-config-file-scan-dir=$(PHP_SYSCONFDIR)/conf.d
90 CONFIGURE_OPTIONS += --with-pear=$(PHP_PREFIX)/share/PEAR
92 CONFIGURE_OPTIONS += --with-layout=PHP
94 CONFIGURE_OPTIONS += --enable-rtld-now
95 CONFIGURE_OPTIONS += --with-cdb
96 CONFIGURE_OPTIONS += --with-kerberos
97 CONFIGURE_OPTIONS += --with-readline
98 CONFIGURE_OPTIONS += --enable-dtrace
99 CONFIGURE_OPTIONS += --enable-mysqlnd
101 # Shared Extensions
102 CONFIGURE_OPTIONS += --with-gettext=shared
103 CONFIGURE_OPTIONS += --with-zlib=shared
104 CONFIGURE_OPTIONS += --with-openssl=shared
105 CONFIGURE_OPTIONS += --with-pdo-sqlite=shared
106 CONFIGURE_OPTIONS += --with-ldap=shared
107 CONFIGURE_OPTIONS += --with-bz2=shared
108 CONFIGURE_OPTIONS += --with-iconv=shared
109 CONFIGURE_OPTIONS += --with-tidy=shared
110 CONFIGURE_OPTIONS += --with-mhash=shared
111 CONFIGURE_OPTIONS += --with-xsl=shared
112 CONFIGURE_OPTIONS += --with-curl=shared
113 CONFIGURE_OPTIONS += --with-pspell=shared
114 CONFIGURE_OPTIONS += --with-imap=shared
115 CONFIGURE_OPTIONS += --with-imap-ssl
116 CONFIGURE_OPTIONS += --with-zip=shared
117 CONFIGURE_OPTIONS += --with-sodium=shared
118 CONFIGURE_OPTIONS += --enable-bcmath=shared
119 CONFIGURE_OPTIONS += --enable-ctype=shared
120 CONFIGURE_OPTIONS += --enable-calendar=shared
121 CONFIGURE_OPTIONS += --enable-tokenizer=shared
122 CONFIGURE_OPTIONS += --enable-exif=shared
123 CONFIGURE_OPTIONS += --enable-dom=shared
124 CONFIGURE_OPTIONS += --enable-ftp=shared
125 CONFIGURE_OPTIONS += --enable-intl=shared
126 CONFIGURE_OPTIONS += --enable-pdo=shared
127 CONFIGURE_OPTIONS += --enable-mbstring=shared
128 CONFIGURE_OPTIONS += --enable-xmlreader=shared
129 CONFIGURE_OPTIONS += --enable-xmlwriter=shared
130 CONFIGURE_OPTIONS += --enable-soap=shared
131 CONFIGURE_OPTIONS += --enable-sockets=shared
132 CONFIGURE_OPTIONS += --enable-mysqlnd=shared
133 CONFIGURE_OPTIONS += --with-snmp=shared
134 CONFIGURE_OPTIONS += --with-mysqli=shared,mysqlnd
135 CONFIGURE_OPTIONS += --with-pdo-mysql=shared,mysqlnd
137 # Extensions, dependent on other packages
138 CONFIGURE_OPTIONS += --with-pgsql=shared,$(PG_BINDIR)
139 CONFIGURE_OPTIONS += --with-pdo-pgsql=shared,$(PG_BINDIR)
141 # Disabled extensions & Options
142 CONFIGURE_OPTIONS += --disable-static
143 CONFIGURE_OPTIONS += --disable-dba
144 CONFIGURE_OPTIONS += --disable-debug
145 CONFIGURE_OPTIONS += --disable-libgcc
146 CONFIGURE_OPTIONS += --without-dbm
148 # Enabled extensions
149 CONFIGURE_OPTIONS += --enable-zts
150 CONFIGURE_OPTIONS += --enable-re2c-cgoto
151 CONFIGURE_OPTIONS += --enable-cli
152 CONFIGURE_OPTIONS += --enable-cgi
153 CONFIGURE_OPTIONS += --with-ffi
154 CONFIGURE_OPTIONS += --enable-shared
155 CONFIGURE_OPTIONS += --enable-filter
156 CONFIGURE_OPTIONS += --enable-gd-jis-conv
157 CONFIGURE_OPTIONS += --enable-short-tags
158 CONFIGURE_OPTIONS += --enable-pcntl
159 CONFIGURE_OPTIONS += --enable-shmop
160 CONFIGURE_OPTIONS += --enable-sysvmsg
161 CONFIGURE_OPTIONS += --enable-sysvsem
162 CONFIGURE_OPTIONS += --enable-sysvshm
163 CONFIGURE_OPTIONS += --enable-simplexml
164 CONFIGURE_OPTIONS += --enable-session
165 CONFIGURE_OPTIONS += --enable-opcache
166 CONFIGURE_OPTIONS += --with-mhash
167 CONFIGURE_OPTIONS += --enable-gd
168 CONFIGURE_OPTIONS += --with-external-gd
169 CONFIGURE_OPTIONS += --with-webp
170 CONFIGURE_OPTIONS += --with-jpeg
171 CONFIGURE_OPTIONS += --with-xpm
172 CONFIGURE_OPTIONS += --with-freetype
173 CONFIGURE_OPTIONS += --with-gmp
174 CONFIGURE_OPTIONS += --with-enchant
175 CONFIGURE_OPTIONS += --with-unixODBC
176 CONFIGURE_OPTIONS += --with-openssl-dir=$(OPENSSL_PREFIX)
178 # Installation Arguments
179 COMPONENT_INSTALL_ARGS += INSTALL_ROOT=$(PROTO_DIR)
181 # Pre-Install Actions
182 COMPONENT_PRE_INSTALL_ACTION += \
183 ( $(MKDIR) -p $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d ; \
184 echo "Creating fake modules.load and httpd.conf" ; \
185 echo "\# LoadModule foo_module libexec/mod_foo.so" >> $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules.load ; \
186 echo "\# " >> $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules.load ; \
187 echo "LoadModule foo_module libexec/mod_foo.so " >> $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules.load ; \
188 cp $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules.load $(PROTO_DIR)/$(AP_SYSCONFDIR)/httpd.conf \
191 # Environment Variables
192 CONFIGURE_ENV += EXTENSION_DIR=$(PHP_PREFIX)/extensions
193 CONFIGURE_ENV += ICU_CONFIG=/usr/bin/icu-config
194 CONFIGURE_ENV += PG_CONFIG=$(PG_BINDIR)/pg_config
195 CONFIGURE_ENV += MYSQL_CONFIG=$(MYSQL_CONFIG)
196 CONFIGURE_ENV += PKG_CONFIG_PATH=$(OPENSSL_PREFIX)/lib/$(MACH64)/pkgconfig
198 COMPONENT_TEST_TARGETS = test
200 COMPONENT_TEST_ENV += NO_INTERACTION=yes
202 # Test results are unstable between runs but still useful for humans.
203 # test failures; keep going
204 COMPONENT_TEST_ARGS += -k -i
205 COMPONENT_TEST_TRANSFORMS += \
206 '-e "/^make/d" ' \
207 '-e "/^Time taken/d" ' \
208 '-e "/^TEST RESULT SUMMARY$$/,\$$p" ' \
209 '-e "/.*/d" '
211 # Manually added build dependencies
212 REQUIRED_PACKAGES += $(PG_DEVELOPER_PKG)
213 REQUIRED_PACKAGES += $(PG_SERVICE_PKG)
214 REQUIRED_PACKAGES += $(OPENSSL_PKG)
215 REQUIRED_PACKAGES += web/server/apache-24
217 # Auto-generated dependencies
218 REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
219 REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
220 REQUIRED_PACKAGES += $(ICU_LIBRARY_PKG)
221 REQUIRED_PACKAGES += $(PG_LIBRARY_PKG)
222 REQUIRED_PACKAGES += $(READLINE_PKG)
223 REQUIRED_PACKAGES += SUNWcs
224 REQUIRED_PACKAGES += compress/bzip2
225 REQUIRED_PACKAGES += database/sqlite-3
226 REQUIRED_PACKAGES += library/gd
227 REQUIRED_PACKAGES += library/gmp
228 REQUIRED_PACKAGES += library/libffi
229 REQUIRED_PACKAGES += library/libxml2
230 REQUIRED_PACKAGES += library/libxslt
231 REQUIRED_PACKAGES += library/libzip
232 REQUIRED_PACKAGES += library/openldap
233 REQUIRED_PACKAGES += library/pcre2
234 REQUIRED_PACKAGES += library/security/libsodium
235 REQUIRED_PACKAGES += library/security/openssl
236 REQUIRED_PACKAGES += library/spell-checking/enchant
237 REQUIRED_PACKAGES += library/unixodbc
238 REQUIRED_PACKAGES += library/uw-imap
239 REQUIRED_PACKAGES += library/zlib
240 REQUIRED_PACKAGES += shell/ksh93
241 REQUIRED_PACKAGES += system/library
242 REQUIRED_PACKAGES += system/library/math
243 REQUIRED_PACKAGES += system/management/snmp/net-snmp
244 REQUIRED_PACKAGES += text/aspell
245 REQUIRED_PACKAGES += text/oniguruma
246 REQUIRED_PACKAGES += text/tidy
247 REQUIRED_PACKAGES += web/curl