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