commit | author | age
|
499bcf
|
1 |
# |
F |
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. |
|
5 |
# |
|
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. |
|
9 |
# |
|
10 |
|
|
11 |
# |
|
12 |
# Copyright 2013, EveryCity Ltd. All rights reserved. |
|
13 |
# Copyright 2022 Niklas Poslovski |
095935
|
14 |
# Copyright 2022,2024 Friedrich Kink. All rights reserved. |
499bcf
|
15 |
# |
F |
16 |
|
|
17 |
include ../../../../make-rules/shared-macros.mk |
|
18 |
|
|
19 |
COMPONENT_NAME= php |
|
20 |
COMPONENT_MJR_VERSION= 8.2 |
fef1d4
|
21 |
COMPONENT_MNR_VERSION= 17 |
499bcf
|
22 |
COMPONENT_SUMMARY= PHP 8.2 |
F |
23 |
COMPONENT_DESCRIPTION= PHP is a popular general-purpose scripting language that is especially suited to web development. |
|
24 |
COMPONENT_VERSION= $(COMPONENT_MJR_VERSION).$(COMPONENT_MNR_VERSION) |
|
25 |
COMPONENT_PROJECT_URL= https://www.php.net/ |
|
26 |
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
27 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2 |
fef1d4
|
28 |
COMPONENT_ARCHIVE_HASH= sha256:191316c203267d96160b47d22f955d4dc11793de8a5f327e0c2a76275a6894ea |
499bcf
|
29 |
COMPONENT_ARCHIVE_URL= https://www.php.net/distributions/$(COMPONENT_ARCHIVE) |
095935
|
30 |
#COMPONENT_SIG_URL= https://www.php.net/distributions/$(COMPONENT_ARCHIVE).asc |
499bcf
|
31 |
COMPONENT_FMRI= web/$(COMPONENT_NAME)-82 |
F |
32 |
COMPONENT_CLASSIFICATION=Meta Packages/Group Packages |
|
33 |
COMPONENT_LICENSE= PHP License |
|
34 |
COMPONENT_LICENSE_FILE= LICENSE |
e10947
|
35 |
COMPONENT_REVISION= 1 |
499bcf
|
36 |
|
F |
37 |
include $(WS_MAKE_RULES)/common.mk |
|
38 |
|
|
39 |
# Apache Paths |
|
40 |
AP_PREFIX= /usr/apache2/2.4 |
|
41 |
AP_SYSCONFDIR= /etc/apache2/2.4 |
|
42 |
|
|
43 |
# PHP Paths |
|
44 |
PHP_PREFIX= /usr/php/$(COMPONENT_MJR_VERSION) |
|
45 |
PHP_SYSCONFDIR= /etc/php/$(COMPONENT_MJR_VERSION) |
|
46 |
PHP_DATADIR= /var/php/$(COMPONENT_MJR_VERSION) |
|
47 |
|
|
48 |
# -D__solaris__ is very important to trigger patched file TSRM.h |
|
49 |
# otherwise mod_php82.so is crashing |
|
50 |
CFLAGS += $(CC_BITS) -D_XPG4_2 -D__EXTENSIONS__ -D__solaris__ |
|
51 |
CFLAGS += -I/usr/include/openldap |
|
52 |
CPPFLAGS += $(CPP_XPG6MODE) |
|
53 |
LDFLAGS += -lldap_r |
|
54 |
|
|
55 |
# build with the system default libjpeg |
|
56 |
CFLAGS+= $(JPEG_CPPFLAGS) $(JPEG_CFLAGS) |
|
57 |
CXXFLAGS+= $(JPEG_CPPFLAGS) $(JPEG_CXXFLAGS) |
|
58 |
CPPFLAGS+= $(JPEG_CPPFLAGS) |
|
59 |
LDFLAGS+= $(JPEG_LDFLAGS) |
|
60 |
|
|
61 |
# Configure Options |
|
62 |
CONFIGURE_OPTIONS = --prefix=$(PHP_PREFIX) |
|
63 |
CONFIGURE_OPTIONS += --bindir=$(PHP_PREFIX)/bin |
|
64 |
CONFIGURE_OPTIONS += --sbindir=$(PHP_PREFIX)/bin |
|
65 |
CONFIGURE_OPTIONS += --libdir=$(PHP_PREFIX)/lib/$(MACH64) |
|
66 |
CONFIGURE_OPTIONS += --libexecdir=$(PHP_PREFIX)/libexec |
|
67 |
CONFIGURE_OPTIONS += --includedir=$(PHP_PREFIX)/include |
|
68 |
CONFIGURE_OPTIONS += --sysconfdir=$(PHP_SYSCONFDIR) |
|
69 |
CONFIGURE_OPTIONS += --datadir=$(PHP_DATADIR) |
|
70 |
CONFIGURE_OPTIONS += --mandir=$(PHP_PREFIX)/share/man |
|
71 |
CONFIGURE_OPTIONS += --localstatedir=$(PHP_DATADIR) |
|
72 |
CONFIGURE_OPTIONS += OPENSSL_CFLAGS=-I$(OPENSSL_INCDIR) |
|
73 |
CONFIGURE_OPTIONS += OPENSSL_LIBS="-L$(OPENSSL_LIBDIR) -lssl -lcrypto" |
|
74 |
CONFIGURE_OPTIONS += KERBEROS_CFLAGS=-I/usr/include/kerberosv5 |
|
75 |
CONFIGURE_OPTIONS += KERBEROS_LIBS="-L/usr/lib/$(MACH64) -lgss -lkrb5" |
|
76 |
CONFIGURE_OPTIONS += PCRE2_CFLAGS="-I/usr/include/pcre" |
|
77 |
CONFIGURE_OPTIONS += ODBC_CFLAGS="-I/usr/include/odbc" |
|
78 |
|
|
79 |
# SAPI modules |
|
80 |
CONFIGURE_OPTIONS += --with-apxs2=$(AP_PREFIX)/bin/apxs |
|
81 |
CONFIGURE_OPTIONS += --enable-fpm |
|
82 |
|
|
83 |
ifeq ($(strip $(MACH)),i386) |
|
84 |
CONFIGURE_OPTIONS += --build=x86_64-pc-solaris$(SOLARIS_VERSION) |
|
85 |
CONFIGURE_OPTIONS += --with-external-pcre |
|
86 |
else |
|
87 |
CONFIGURE_OPTIONS += --build=sparcv9-sun-solaris$(SOLARIS_VERSION) |
|
88 |
CONFIGURE_OPTIONS += --with-pcre-jit=no |
|
89 |
endif |
|
90 |
|
|
91 |
CONFIGURE_OPTIONS += --with-config-file-path=$(PHP_SYSCONFDIR) |
|
92 |
CONFIGURE_OPTIONS += --with-config-file-scan-dir=$(PHP_SYSCONFDIR)/conf.d |
|
93 |
CONFIGURE_OPTIONS += --with-pear=$(PHP_PREFIX)/share/PEAR |
|
94 |
|
|
95 |
CONFIGURE_OPTIONS += --with-layout=PHP |
|
96 |
|
|
97 |
CONFIGURE_OPTIONS += --with-cdb |
|
98 |
CONFIGURE_OPTIONS += --with-kerberos |
|
99 |
CONFIGURE_OPTIONS += --with-readline |
|
100 |
CONFIGURE_OPTIONS += --enable-dtrace |
|
101 |
CONFIGURE_OPTIONS += --enable-mysqlnd |
|
102 |
|
|
103 |
# Shared Extensions |
|
104 |
CONFIGURE_OPTIONS += --with-gettext=shared |
|
105 |
CONFIGURE_OPTIONS += --with-zlib=shared |
|
106 |
CONFIGURE_OPTIONS += --with-openssl=shared |
|
107 |
CONFIGURE_OPTIONS += --with-pdo-sqlite=shared |
|
108 |
CONFIGURE_OPTIONS += --with-ldap=shared |
|
109 |
CONFIGURE_OPTIONS += --with-bz2=shared |
|
110 |
CONFIGURE_OPTIONS += --with-iconv=shared |
|
111 |
CONFIGURE_OPTIONS += --with-tidy=shared |
|
112 |
CONFIGURE_OPTIONS += --with-mhash=shared |
|
113 |
CONFIGURE_OPTIONS += --with-xsl=shared |
|
114 |
CONFIGURE_OPTIONS += --with-curl=shared |
|
115 |
CONFIGURE_OPTIONS += --with-pspell=shared |
|
116 |
CONFIGURE_OPTIONS += --with-imap=shared |
|
117 |
CONFIGURE_OPTIONS += --with-imap-ssl |
|
118 |
CONFIGURE_OPTIONS += --with-zip=shared |
|
119 |
CONFIGURE_OPTIONS += --with-sodium=shared |
|
120 |
CONFIGURE_OPTIONS += --enable-bcmath=shared |
|
121 |
CONFIGURE_OPTIONS += --enable-ctype=shared |
|
122 |
CONFIGURE_OPTIONS += --enable-calendar=shared |
|
123 |
CONFIGURE_OPTIONS += --enable-tokenizer=shared |
|
124 |
CONFIGURE_OPTIONS += --enable-exif=shared |
|
125 |
CONFIGURE_OPTIONS += --enable-dom=shared |
|
126 |
CONFIGURE_OPTIONS += --enable-ftp=shared |
|
127 |
CONFIGURE_OPTIONS += --enable-intl=shared |
|
128 |
CONFIGURE_OPTIONS += --enable-pdo=shared |
|
129 |
CONFIGURE_OPTIONS += --enable-mbstring=shared |
|
130 |
CONFIGURE_OPTIONS += --enable-xmlreader=shared |
|
131 |
CONFIGURE_OPTIONS += --enable-xmlwriter=shared |
|
132 |
CONFIGURE_OPTIONS += --enable-soap=shared |
|
133 |
CONFIGURE_OPTIONS += --enable-sockets=shared |
|
134 |
CONFIGURE_OPTIONS += --enable-mysqlnd=shared |
|
135 |
CONFIGURE_OPTIONS += --with-snmp=shared |
e10947
|
136 |
CONFIGURE_OPTIONS += --with-mysqli=shared,mysqlnd |
R |
137 |
CONFIGURE_OPTIONS += --with-pdo-mysql=shared,mysqlnd |
499bcf
|
138 |
|
F |
139 |
# Extensions, dependent on other packages |
|
140 |
CONFIGURE_OPTIONS += --with-pgsql=shared,$(PG_BINDIR) |
|
141 |
CONFIGURE_OPTIONS += --with-pdo-pgsql=shared,$(PG_BINDIR) |
|
142 |
|
|
143 |
# Disabled extensions & Options |
|
144 |
CONFIGURE_OPTIONS += --disable-static |
|
145 |
CONFIGURE_OPTIONS += --disable-dba |
|
146 |
CONFIGURE_OPTIONS += --disable-debug |
|
147 |
CONFIGURE_OPTIONS += --disable-libgcc |
|
148 |
CONFIGURE_OPTIONS += --without-dbm |
|
149 |
|
|
150 |
# Enabled extensions |
|
151 |
CONFIGURE_OPTIONS += --enable-zts |
|
152 |
CONFIGURE_OPTIONS += --enable-re2c-cgoto |
|
153 |
CONFIGURE_OPTIONS += --enable-cli |
|
154 |
CONFIGURE_OPTIONS += --enable-cgi |
|
155 |
CONFIGURE_OPTIONS += --with-ffi |
|
156 |
CONFIGURE_OPTIONS += --enable-shared |
|
157 |
CONFIGURE_OPTIONS += --enable-filter |
|
158 |
CONFIGURE_OPTIONS += --enable-gd-jis-conv |
|
159 |
CONFIGURE_OPTIONS += --enable-short-tags |
|
160 |
CONFIGURE_OPTIONS += --enable-pcntl |
|
161 |
CONFIGURE_OPTIONS += --enable-shmop |
|
162 |
CONFIGURE_OPTIONS += --enable-sysvmsg |
|
163 |
CONFIGURE_OPTIONS += --enable-sysvsem |
|
164 |
CONFIGURE_OPTIONS += --enable-sysvshm |
|
165 |
CONFIGURE_OPTIONS += --enable-simplexml |
|
166 |
CONFIGURE_OPTIONS += --enable-session |
|
167 |
CONFIGURE_OPTIONS += --enable-opcache |
|
168 |
CONFIGURE_OPTIONS += --with-mhash |
|
169 |
CONFIGURE_OPTIONS += --enable-gd |
|
170 |
CONFIGURE_OPTIONS += --with-external-gd |
|
171 |
CONFIGURE_OPTIONS += --with-webp |
|
172 |
CONFIGURE_OPTIONS += --with-jpeg |
|
173 |
CONFIGURE_OPTIONS += --with-xpm |
|
174 |
CONFIGURE_OPTIONS += --with-freetype |
|
175 |
CONFIGURE_OPTIONS += --with-gmp |
|
176 |
CONFIGURE_OPTIONS += --with-enchant |
|
177 |
CONFIGURE_OPTIONS += --with-unixODBC |
|
178 |
CONFIGURE_OPTIONS += --with-openssl-dir=$(OPENSSL_PREFIX) |
|
179 |
|
|
180 |
# remove EXTRA_FLAGS to get the right ssl and crypto libs |
|
181 |
# now with fix to cover all EXTRA_LDFLAGS conditions |
|
182 |
COMPONENT_POST_CONFIGURE_ACTION= \ |
|
183 |
(cd $(@D) ; \ |
|
184 |
$(GSED) -i -e 's:^EXTRA_LDFLAGS = .*:EXTRA_LDFLAGS = -avoid-version -module:' -e 's:-L/usr/lib/$(MACH64) ::' -e 's:-R/usr/lib/$(MACH64) ::' Makefile ) |
|
185 |
|
|
186 |
# Installation Arguments |
|
187 |
COMPONENT_INSTALL_ARGS += INSTALL_ROOT=$(PROTO_DIR) |
|
188 |
|
|
189 |
# Pre-Install Actions |
|
190 |
COMPONENT_PRE_INSTALL_ACTION += \ |
|
191 |
( $(MKDIR) -p $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d ; \ |
|
192 |
echo "Creating fake modules.load and httpd.conf" ; \ |
|
193 |
echo "\# LoadModule foo_module libexec/mod_foo.so" >> $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules.load ; \ |
|
194 |
echo "\# " >> $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules.load ; \ |
|
195 |
echo "LoadModule foo_module libexec/mod_foo.so " >> $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules.load ; \ |
|
196 |
cp $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules.load $(PROTO_DIR)/$(AP_SYSCONFDIR)/httpd.conf \ |
|
197 |
) |
|
198 |
|
|
199 |
# Environment Variables |
|
200 |
CONFIGURE_ENV += EXTENSION_DIR=$(PHP_PREFIX)/extensions |
|
201 |
CONFIGURE_ENV += ICU_CONFIG=/usr/bin/icu-config |
|
202 |
CONFIGURE_ENV += PG_CONFIG=$(PG_BINDIR)/pg_config |
|
203 |
CONFIGURE_ENV += PKG_CONFIG_PATH=$(OPENSSL_PREFIX)/lib/$(MACH64)/pkgconfig |
|
204 |
|
|
205 |
COMPONENT_TEST_TARGETS = test |
|
206 |
|
|
207 |
COMPONENT_TEST_ENV += NO_INTERACTION=yes |
|
208 |
|
|
209 |
# Test results are unstable between runs but still useful for humans. |
|
210 |
# test failures; keep going |
|
211 |
COMPONENT_TEST_ARGS += -k -i |
|
212 |
COMPONENT_TEST_TRANSFORMS += \ |
|
213 |
'-e "/^make/d" ' \ |
|
214 |
'-e "/^Time taken/d" ' \ |
|
215 |
'-e "/^TEST RESULT SUMMARY$$/,\$$p" ' \ |
|
216 |
'-e "/.*/d" ' |
|
217 |
|
|
218 |
# Manually added build dependencies |
|
219 |
REQUIRED_PACKAGES += $(PG_DEVELOPER_PKG) |
|
220 |
REQUIRED_PACKAGES += $(PG_SERVICE_PKG) |
|
221 |
REQUIRED_PACKAGES += web/server/apache-24 |
|
222 |
|
|
223 |
# Auto-generated dependencies |
|
224 |
REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG) |
095935
|
225 |
REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG) |
499bcf
|
226 |
REQUIRED_PACKAGES += $(ICU_LIBRARY_PKG) |
F |
227 |
REQUIRED_PACKAGES += $(PG_LIBRARY_PKG) |
|
228 |
REQUIRED_PACKAGES += SUNWcs |
|
229 |
REQUIRED_PACKAGES += compress/bzip2 |
|
230 |
REQUIRED_PACKAGES += database/sqlite-3 |
|
231 |
REQUIRED_PACKAGES += library/gd |
|
232 |
REQUIRED_PACKAGES += library/gmp |
|
233 |
REQUIRED_PACKAGES += library/libffi |
|
234 |
REQUIRED_PACKAGES += library/libxml2 |
|
235 |
REQUIRED_PACKAGES += library/libxslt |
|
236 |
REQUIRED_PACKAGES += library/libzip |
|
237 |
REQUIRED_PACKAGES += library/openldap |
|
238 |
REQUIRED_PACKAGES += library/pcre2 |
|
239 |
REQUIRED_PACKAGES += library/readline |
|
240 |
REQUIRED_PACKAGES += library/security/libsodium |
|
241 |
REQUIRED_PACKAGES += library/security/openssl-31 |
|
242 |
REQUIRED_PACKAGES += library/spell-checking/enchant |
|
243 |
REQUIRED_PACKAGES += library/unixodbc |
|
244 |
REQUIRED_PACKAGES += library/uw-imap |
|
245 |
REQUIRED_PACKAGES += library/zlib |
|
246 |
REQUIRED_PACKAGES += shell/ksh93 |
|
247 |
REQUIRED_PACKAGES += system/library |
|
248 |
REQUIRED_PACKAGES += system/library/math |
|
249 |
REQUIRED_PACKAGES += system/management/snmp/net-snmp |
|
250 |
REQUIRED_PACKAGES += text/aspell |
|
251 |
REQUIRED_PACKAGES += text/oniguruma |
|
252 |
REQUIRED_PACKAGES += text/tidy |
|
253 |
REQUIRED_PACKAGES += web/curl |