Adam Stevko
2013-11-07 a14fd08b469841dcaa0c695298e555b2b53dcafe
commit | author | age
5ca1d7 1 #
AP 2 # This file and its contents are supplied under the terms of the
a14fd0 3 # Common Development and Distribution License ("CDDL"). You may
5ca1d7 4 # only use this file in accordance with the terms of the CDDL.
AP 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 #
14 include ../../make-rules/shared-macros.mk
15
16 COMPONENT_NAME=        php
4cbb9c 17 COMPONENT_VERSION=    5.4.21
5ca1d7 18 COMPONENT_SRC=        $(COMPONENT_NAME)-$(COMPONENT_VERSION)
AP 19 COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
4cbb9c 20 COMPONENT_ARCHIVE_HASH=    sha256:d7d9a99c656d456c53234c67fe8883438212536364d23b8764110760313c3b7c
5ca1d7 21 COMPONENT_ARCHIVE_URL=    http://uk3.php.net/get/$(COMPONENT_ARCHIVE)/from/this/mirror
AP 22
23 include ../../make-rules/prep.mk
24 include ../../make-rules/configure.mk
25 include ../../make-rules/ips.mk
f37c4b 26
AP 27 PATH= /usr/bin:/usr/gnu/bin:/usr/sbin
5ca1d7 28
AP 29 # Apache Paths
30 AP_PREFIX=/usr/apache2/2.2
31 AP_SYSCONFDIR=/etc/apache2/2.2
32
33 # PHP Paths
34 PHP_PREFIX=/usr/php/5.4
35 PHP_SYSCONFDIR=/etc/php/5.4
36 PHP_DATADIR=/var/php/5.4
37
38 CFLAGS = $(CC_BITS) -D_POSIX_PTHREAD_SEMANTICS
39
40 # Configure Options
41
42 CONFIGURE_OPTIONS      =    --prefix=$(PHP_PREFIX)
43 CONFIGURE_OPTIONS.32   =    --bindir=$(PHP_PREFIX)/bin
44 CONFIGURE_OPTIONS.64   =    --bindir=$(PHP_PREFIX)/bin/$(MACH64)
45 CONFIGURE_OPTIONS.32  +=    --sbindir=$(PHP_PREFIX)/bin
46 CONFIGURE_OPTIONS.64  +=    --sbindir=$(PHP_PREFIX)/bin/$(MACH64)
47 CONFIGURE_OPTIONS.32  +=    --libdir=$(PHP_PREFIX)/lib
48 CONFIGURE_OPTIONS.64  +=    --libdir=$(PHP_PREFIX)/lib/$(MACH64)
49 CONFIGURE_OPTIONS.32  +=    --libexecdir=$(PHP_PREFIX)/libexec
50 CONFIGURE_OPTIONS.64  +=    --libexecdir=$(PHP_PREFIX)/libexec/$(MACH64)
51 CONFIGURE_OPTIONS     +=    --includedir=$(PHP_PREFIX)/include
52 CONFIGURE_OPTIONS     +=    --sysconfdir=$(PHP_SYSCONFDIR)
53 CONFIGURE_OPTIONS     +=    --datadir=$(PHP_DATADIR)
54 CONFIGURE_OPTIONS     +=    --mandir=$(PHP_PREFIX)/share/man
9c9d7f 55 CONFIGURE_OPTIONS     +=    --localstatedir=$(PHP_DATADIR)
5ca1d7 56
AP 57 # SAPI modules
58 CONFIGURE_OPTIONS.32  +=    --with-apxs2=$(AP_PREFIX)/bin/apxs
59 CONFIGURE_OPTIONS.64  +=    --with-apxs2=$(AP_PREFIX)/bin/$(MACH64)/apxs
60 CONFIGURE_OPTIONS     +=        --enable-fpm
61
62 CONFIGURE_OPTIONS.64  +=    --build=x86_64-pc-solaris$(SOLARIS_VERSION)
63
64 CONFIGURE_OPTIONS     +=    --with-config-file-path=$(PHP_SYSCONFDIR)
65 CONFIGURE_OPTIONS     +=    --with-config-file-scan-dir=$(PHP_SYSCONFDIR)/conf.d
66 CONFIGURE_OPTIONS     +=    --with-pear=$(PHP_PREFIX)/share/PEAR
67
68 CONFIGURE_OPTIONS     +=    --with-layout=PHP
69 CONFIGURE_OPTIONS     +=    --with-zend-vm=CALL
70
71 CONFIGURE_OPTIONS     +=    --with-cdb
72 CONFIGURE_OPTIONS     +=    --with-kerberos
73 CONFIGURE_OPTIONS     +=    --with-pcre-regex
74
75 # Shared Extensions
76 CONFIGURE_OPTIONS     +=    --with-curlwrappers
77 CONFIGURE_OPTIONS     +=    --with-gettext=shared
78 CONFIGURE_OPTIONS     +=    --with-xmlrpc=shared
79 CONFIGURE_OPTIONS     +=    --with-gd=shared
80 CONFIGURE_OPTIONS     +=    --with-zlib=shared
81 CONFIGURE_OPTIONS     +=    --with-openssl=shared
82 CONFIGURE_OPTIONS     +=    --with-pdo-sqlite=shared
83 CONFIGURE_OPTIONS     +=    --with-ldap=shared
84
85 # Shared Extensions
86 CONFIGURE_OPTIONS     +=    --with-bz2=shared
87 CONFIGURE_OPTIONS     +=    --with-iconv=shared
88 CONFIGURE_OPTIONS     +=    --with-tidy=shared
89 CONFIGURE_OPTIONS     +=    --with-mhash=shared
90 CONFIGURE_OPTIONS     +=    --with-mcrypt=shared
91 CONFIGURE_OPTIONS     +=    --with-xsl=shared
92 CONFIGURE_OPTIONS     +=    --with-curl=shared
93 CONFIGURE_OPTIONS     +=    --with-readline=shared
94 CONFIGURE_OPTIONS     +=    --with-pspell=shared
95 CONFIGURE_OPTIONS     +=    --with-imap=shared
96 CONFIGURE_OPTIONS     +=    --with-imap-ssl
97
98 # Enabled Extensions
99 #CONFIGURE_OPTIONS     +=    --with-libxml-dir=$(ECPREFIX)
100 #CONFIGURE_OPTIONS     +=    --with-freetype-dir=$(ECPREFIX)
101 #CONFIGURE_OPTIONS     +=    --with-jpeg-dir=$(ECPREFIX)
102 #CONFIGURE_OPTIONS     +=    --with-png-dir=$(ECPREFIX)
103 #CONFIGURE_OPTIONS     +=    --with-zlib-dir=$(ECPREFIX)
104 #CONFIGURE_OPTIONS     +=    --with-xpm-dir=$(ECPREFIX)
105 #CONFIGURE_OPTIONS     +=    --with-libexpat-dir=$(ECPREFIX)
106 #CONFIGURE_OPTIONS     +=    --with-openssl-dir=$(ECPREFIX)
107
108 # Disabled extensions & Options
109 CONFIGURE_OPTIONS     +=    --disable-static
110 CONFIGURE_OPTIONS     +=    --disable-dba
111 CONFIGURE_OPTIONS     +=    --disable-debug
112 CONFIGURE_OPTIONS     +=    --disable-libgcc
113 #CONFIGURE_OPTIONS     +=    --disable-inline-optimization
114 #CONFIGURE_OPTIONS     +=    --disable-libtool-lock
115 #CONFIGURE_OPTIONS     +=    --disable-rpath
116
f37c4b 117 CONFIGURE_OPTIONS     +=    --enable-dtrace
5ca1d7 118 CONFIGURE_OPTIONS     +=    --without-dbm
AP 119 CONFIGURE_OPTIONS     +=    --without-t1lib
120
121 # Enabled extensions
122 CONFIGURE_OPTIONS     +=    --enable-cli
123 CONFIGURE_OPTIONS     +=    --enable-cgi
124 CONFIGURE_OPTIONS     +=    --enable-shared
125 CONFIGURE_OPTIONS     +=    --enable-filter
126 CONFIGURE_OPTIONS     +=    --enable-gd-jis-conv
127 CONFIGURE_OPTIONS     +=    --enable-short-tags
128 CONFIGURE_OPTIONS     +=    --enable-pcntl
129 CONFIGURE_OPTIONS     +=    --enable-shmop
130 CONFIGURE_OPTIONS     +=    --enable-sysvmsg
131 CONFIGURE_OPTIONS     +=    --enable-sysvsem
132 CONFIGURE_OPTIONS     +=    --enable-sysvshm
133 CONFIGURE_OPTIONS     +=    --enable-simplexml
134 CONFIGURE_OPTIONS     +=    --enable-hash
135 CONFIGURE_OPTIONS     +=    --enable-session
136
137 # Shared Extensions
138 CONFIGURE_OPTIONS     +=    --enable-bcmath=shared
139 CONFIGURE_OPTIONS     +=    --enable-json=shared
140 CONFIGURE_OPTIONS     +=    --enable-libxml=shared
141 CONFIGURE_OPTIONS     +=    --enable-ctype=shared
142 CONFIGURE_OPTIONS     +=    --enable-calendar=shared
143 CONFIGURE_OPTIONS     +=    --enable-tokenizer=shared
144 CONFIGURE_OPTIONS     +=    --enable-exif=shared
145 CONFIGURE_OPTIONS     +=    --enable-dom=shared
146 CONFIGURE_OPTIONS     +=    --enable-ftp=shared
ab80c5 147 CONFIGURE_OPTIONS     +=    --enable-intl=shared
5ca1d7 148 CONFIGURE_OPTIONS     +=    --enable-pdo=shared
AP 149 CONFIGURE_OPTIONS     +=    --enable-mbstring=shared
150 CONFIGURE_OPTIONS     +=    --enable-xmlreader=shared
151 CONFIGURE_OPTIONS     +=    --enable-xmlwriter=shared
152 CONFIGURE_OPTIONS     +=    --enable-soap=shared
153 CONFIGURE_OPTIONS     +=    --enable-sockets=shared
154 CONFIGURE_OPTIONS     +=    --enable-wddx=shared
155 CONFIGURE_OPTIONS     +=    --enable-zip=shared
156
157 CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(BITS))
158
159 #CONFIGURE_OPTIONS += $(CONFIGURE_VARIANT_OPTIONS)
160
161 # Installation Arguments
162 COMPONENT_INSTALL_ARGS  += INSTALL_ROOT=$(PROTO_DIR)
163
164 # Pre-Install Actions
165 COMPONENT_PRE_INSTALL_ACTION+= \
166       ( $(MKDIR) -p $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d ; \
30908a 167       echo "Creating fake modules-32.load, modules-64.load and httpd.conf" ; \
5ca1d7 168       echo "\# LoadModule foo_module libexec/mod_foo.so" >> $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules-32.load ; \
AP 169       echo "\# " >> $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules-32.load ; \
170       echo "LoadModule foo_module libexec/mod_foo.so " >> $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules-32.load ; \
30908a 171       cp $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules-32.load  $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules-64.load ; \
AP 172           cp $(PROTO_DIR)/$(AP_SYSCONFDIR)/conf.d/modules-32.load  $(PROTO_DIR)/$(AP_SYSCONFDIR)/httpd.conf \
5ca1d7 173       )
AP 174
175 # Environment Variables
3e47af 176 COMPONENT_BUILD_ENV+=    CC="$(CC) $(CC_BITS)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
5ca1d7 177 CONFIGURE_ENV.32 +=     EXTENSION_DIR=$(PHP_PREFIX)/extensions
AP 178 CONFIGURE_ENV.64 +=     EXTENSION_DIR=$(PHP_PREFIX)/extensions/$(MACH64)
ab80c5 179 CONFIGURE_ENV.32 +=     ICU_CONFIG=/usr/g++/bin/icu-config
AP 180 CONFIGURE_ENV.64 +=     ICU_CONFIG=/usr/g++/bin/amd64/icu-config
5ca1d7 181
AP 182 # Standard build
183 #$(BUILD_DIR_32)/.configured:    CONFIGURE_VARIANT_OPTIONS= \
184 #    --with-apxs2=$(AP_PREFIX)/bin/apxs
185 #$(BUILD_DIR_64)/.configured:    CONFIGURE_VARIANT_OPTIONS= \
186 #    --with-apxs2=$(AP_PREFIX)/bin/$(MACH64)/apxs
187
188 # CGI build
189 #$(BUILD_DIR)/$(MACH32).cgi/.configured:     BITS=32
190 #$(BUILD_DIR)/$(MACH64).cgi/.configured:     BITS=64
191 #$(BUILD_DIR)/$(MACH32).cgi/.configured:     CONFIGURE_VARIANT_OPTIONS= 
192 #$(BUILD_DIR)/$(MACH64).cgi/.configured:     CONFIGURE_VARIANT_OPTIONS= 
193 #$(BUILD_DIR)/$(MACH32).cgi/.built:          BITS=32
194 #$(BUILD_DIR)/$(MACH64).cgi/.built:          BITS=64
195 #$(BUILD_DIR)/$(MACH32).cgi/.installed:      BITS=32
196 #$(BUILD_DIR)/$(MACH64).cgi/.installed:      BITS=64
197
198
199 build:        $(BUILD_32_and_64) 
200 # \
201 #    $(BUILD_DIR)/$(MACH32).cgi/.built \
202 #    $(BUILD_DIR)/$(MACH64).cgi/.built
203
204 install:    $(INSTALL_32_and_64)
205 #    $(CP) $(BUILD_DIR)/$(MACH32).cgi/sapi/cgi/php-cgi $(PROTO_DIR)$(PHP_PREFIX)/bin
206 #    $(CP) $(BUILD_DIR)/$(MACH64).cgi/sapi/cgi/php-cgi $(PROTO_DIR)$(PHP_PREFIX)/bin/$(MACH64)