1 # |
|
2 # CDDL HEADER START |
|
3 # |
|
4 # The contents of this file are subject to the terms of the |
|
5 # Common Development and Distribution License (the "License"). |
|
6 # You may not use this file except in compliance with the License. |
|
7 # |
|
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 # or http://www.opensolaris.org/os/licensing. |
|
10 # See the License for the specific language governing permissions |
|
11 # and limitations under the License. |
|
12 # |
|
13 # When distributing Covered Code, include this CDDL HEADER in each |
|
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 # If applicable, add the following below this CDDL HEADER, with the |
|
16 # fields enclosed by brackets "[]" replaced with your own identifying |
|
17 # information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 # |
|
19 # CDDL HEADER END |
|
20 # |
|
21 # Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. |
|
22 # |
|
23 |
|
24 include ../../../make-rules/shared-macros.mk |
|
25 |
|
26 COMPONENT_NAME= php |
|
27 COMPONENT_VERSION= 5.3.29 |
|
28 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
29 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2 |
|
30 COMPONENT_ARCHIVE_HASH= \ |
|
31 sha256:c4e1cf6972b2a9c7f2777a18497d83bf713cdbecabb65d3ff62ba441aebb0091 |
|
32 COMPONENT_ARCHIVE_URL= http://us.php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror |
|
33 COMPONENT_PROJECT_URL= http://www.php.net/ |
|
34 |
|
35 # |
|
36 # webserver7-spi only for php NSAPI |
|
37 # |
|
38 COMPONENT_NAME_1= webserver7-spi |
|
39 #COMPONENT_VERSION_1= NONE |
|
40 COMPONENT_SRC_1= $(COMPONENT_NAME_1) |
|
41 COMPONENT_ARCHIVE_1= $(COMPONENT_NAME_1).tar.bz2 |
|
42 COMPONENT_ARCHIVE_HASH_1= \ |
|
43 sha256:9739fe99ed270955546313322775940c6b7e8eb802707d248342406ebe5b1c97 |
|
44 # |
|
45 # The Netscape server? |
|
46 # Came from Sun's Netscape (web stack) group originally? |
|
47 COMPONENT_ARCHIVE_URL_1= $(EXTERNAL_ARCHIVE_MIRROR)/$(COMPONENT_ARCHIVE_1) |
|
48 |
|
49 PATCH_DIR = ../php-sapi/patches |
|
50 |
|
51 include ../php-sapi/php.mk |
|
52 |
|
53 include $(WS_MAKE_RULES)/prep.mk |
|
54 include $(WS_MAKE_RULES)/configure.mk |
|
55 include $(WS_MAKE_RULES)/ips.mk |
|
56 |
|
57 include ../common.mk |
|
58 |
|
59 COMPONENT_POST_UNPACK_ACTION += && ( \ |
|
60 set -e; \ |
|
61 $(RM) -r $(COMPONENT_DIR)/$(COMPONENT_SRC_1); \ |
|
62 cd $(COMPONENT_DIR); \ |
|
63 $(UNPACK) $(UNPACK_ARGS) ./$(COMPONENT_ARCHIVE_1); \ |
|
64 ) |
|
65 |
|
66 CONFIGURE_OPTIONS += \ |
|
67 --disable-all \ |
|
68 $(COMMON_CONFIG_OPTIONS) \ |
|
69 --with-config-file-path=$(CONF_DIR) \ |
|
70 --with-config-file-scan-dir=$(CONF_DIR)/conf.d \ |
|
71 --disable-cgi \ |
|
72 --disable-fastcgi \ |
|
73 --enable-discard-path \ |
|
74 --enable-maintainer-zts \ |
|
75 --enable-ftp=shared \ |
|
76 --enable-pdo=shared \ |
|
77 --with-bz2=shared \ |
|
78 --with-curl=shared \ |
|
79 --with-gd=shared \ |
|
80 --with-gettext=shared \ |
|
81 --with-iconv=shared \ |
|
82 --with-imap=shared,$(IMAP_DIR) \ |
|
83 --with-imap-ssl=shared,/usr \ |
|
84 --with-ldap=shared \ |
|
85 --with-mysql=shared,mysqlnd \ |
|
86 --with-mysql-sock=/tmp/mysql.sock \ |
|
87 --with-mysqli=shared,mysqlnd \ |
|
88 --with-nsapi=$(COMPONENT_DIR)/webserver7-spi \ |
|
89 --with-openssl=shared \ |
|
90 --with-pear=$(PEAR_DIR) \ |
|
91 --with-pdo-mysql=shared,mysqlnd \ |
|
92 --with-pdo-sqlite=shared \ |
|
93 --with-snmp=shared,/usr \ |
|
94 --with-sqlite3=shared \ |
|
95 --with-tidy=shared,/usr \ |
|
96 $(SOLARIS_OPENLDAP) |
|
97 |
|
98 CONFIGURE_ENV += $(ZTS_CONF_ENVLINE) |
|
99 |
|
100 COMPONENT_POST_BUILD_ACTION = ( \ |
|
101 set -e; \ |
|
102 cat $(BUILD_DIR_32)/scripts/phpize | \ |
|
103 sed -e "s,^\#!/bin/sh,\#!$(CONFIG_SHELL)," | \ |
|
104 sed -e "s%^prefix=.*%prefix=$(BUILD_DIR_32)%" | \ |
|
105 sed -e "s%^includedir=.*%includedir=$(BUILD_DIR_32)%" | \ |
|
106 sed -e "s%^phpdir=.*%phpdir=$(BUILD_DIR_32)%" | \ |
|
107 sed -e "s%phpdir/phpize.m4%phpdir/scripts/phpize.m4%" | \ |
|
108 sed -e 's%cd "$$phpdir" && cp $$FILES_BUILD "$$builddir"/build%cd "$$phpdir/build" \&\& cp $$FILES_BUILD "$$builddir"/build%' \ |
|
109 > phpize-proto.zts ; \ |
|
110 chmod 755 phpize-proto.zts ) |
|
111 |
|
112 ADD_NSAPI_MODULE_SUPPORT = ( \ |
|
113 set -e; \ |
|
114 $(MKDIR) $(PROTO_DIR)/$(TOP_DIR)/nsapi/; \ |
|
115 $(CP) $(BUILD_DIR_32)/libs/libphp5.so \ |
|
116 $(PROTO_DIR)/$(TOP_DIR)/nsapi/libphp5.so; \ |
|
117 ) |
|
118 |
|
119 FIX_CONFIG_FILES = ( \ |
|
120 set -e; \ |
|
121 cd $(COMPONENT_DIR); \ |
|
122 $(GSED) -e "s@extension_dir = \(.*\)@extension_dir=$(PHP_ROOT_ZTS_EXT)@"< ../php-sapi/build/prototype/$(MACH)/$(CONFDIR)/php.ini > php.ini; \ |
|
123 $(MKDIR) $(PROTO_DIR)/$(NSAPI_CONFDIR); \ |
|
124 $(INSTALL) -m 644 php.ini $(PROTO_DIR)/$(NSAPI_CONFDIR); \ |
|
125 ) |
|
126 |
|
127 COMPONENT_INSTALL_TARGETS = libphp5.la install-modules |
|
128 |
|
129 COMPONENT_POST_INSTALL_ACTION = ( \ |
|
130 set -e; \ |
|
131 $(ADD_NSAPI_MODULE_SUPPORT); \ |
|
132 $(FIX_CONFIG_FILES); \ |
|
133 ) |
|
134 |
|
135 CLEAN_PATHS += webserver7-spi phpize-proto.zts php.ini |
|
136 |
|
137 # Test results not quite stable but good enough for human eyes |
|
138 $(SKIP_TEST_AT_TOP_LEVEL) |
|
139 |
|
140 configure: $(CONFIGURE_32) |
|
141 |
|
142 build: $(BUILD_32) |
|
143 |
|
144 install: $(INSTALL_32) |
|
145 |
|
146 # These test and compare results are not quite stable enough |
|
147 # to use in automated testing but good enough to eye |
|
148 # ball and get a sense that php is working correctly. |
|
149 # Individual tests can be run afterwards. |
|
150 # Several random tests may PASS/FAIL on each run thus invalidating |
|
151 # test and compare results. |
|
152 # To use the master test result file do: |
|
153 # $ gmake build |
|
154 # $ gmake -i -k test |
|
155 # because very likely the comparison phase will fail. |
|
156 |
|
157 # test failures; keep going |
|
158 COMPONENT_TEST_ARGS += -k -i |
|
159 |
|
160 # different results for different architectures |
|
161 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH$(BITS)).master |
|
162 |
|
163 test: $(TEST_32) |
|
164 |
|
165 system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED) |
|
166 |
|
167 # php-sapi does the publish |
|
168 publish: install |
|