3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=b5d4ca75bbb11ee5b830fa67213d9f7f
10 PKG_SOURCE_URL
:=http
://fr.php.net
/distributions
/
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 include $(TOPDIR
)/package
/rules.mk
18 define PKG_mod_template
21 install -d
-m0755
$$(IDIR_
$(1))/usr
/lib
/php
22 install -m0755
$(PKG_BUILD_DIR
)/modules
/$(2).so
$$(IDIR_
$(1))/usr
/lib
/php
23 $(RSTRIP
) $$(IDIR_
$(1))
24 $(IPKG_BUILD
) $$(IDIR_
$(1)) $(PACKAGE_DIR
)
28 PKG_CONFIGURE_OPTS
:= \
36 --with-config-file-path
=/etc \
38 --enable-magic-quotes \
39 --enable-memory-limit \
40 --disable-short-tags \
48 --without-libxml-dir \
51 --with-openssl
=shared
,"$(STAGING_DIR)/usr" \
53 --with-openssl-dir
="$(STAGING_DIR)/usr" \
54 --enable-session
=shared \
57 --enable-sockets
=shared \
59 --with-zlib
="$(STAGING_DIR)/usr" \
60 --with-zlib-dir
="$(STAGING_DIR)/usr" \
62 ifneq ($(BR2_PACKAGE_PHP5_MOD_CURL
),)
63 PKG_CONFIGURE_OPTS
+= --with-curl
=shared
,"$(STAGING_DIR)/usr"
65 PKG_CONFIGURE_OPTS
+= --without-curl
67 ifneq ($(BR2_PACKAGE_PHP5_MOD_GD
),)
68 PKG_CONFIGURE_OPTS
+= --with-gd
=shared
,"$(STAGING_DIR)/usr" \
69 --without-freetype-dir \
70 --with-jpeg-dir
="$(STAGING_DIR)/usr" \
71 --with-png-dir
="$(STAGING_DIR)/usr" \
75 --enable-gd-native-ttf \
78 PKG_CONFIGURE_OPTS
+= --without-gd
80 ifneq ($(BR2_PACKAGE_PHP5_MOD_GMP
),)
81 PKG_CONFIGURE_OPTS
+= --with-gmp
=shared
,"$(STAGING_DIR)/usr"
83 PKG_CONFIGURE_OPTS
+= --without-gmp
85 ifneq ($(BR2_PACKAGE_PHP5_MOD_LDAP
),)
86 PKG_CONFIGURE_OPTS
+= --with-ldap
=shared
,"$(STAGING_DIR)/usr" \
87 --with-ldap-sasl
="$(STAGING_DIR)/usr"
89 PKG_CONFIGURE_OPTS
+= --without-ldap
91 ifneq ($(BR2_PACKAGE_PHP5_MOD_MYSQL
),)
92 PKG_CONFIGURE_OPTS
+= --with-mysql
=shared
,"$(STAGING_DIR)/usr"
94 PKG_CONFIGURE_OPTS
+= --without-mysql
96 ifneq ($(BR2_PACKAGE_PHP5_MOD_PCRE
),)
97 PKG_CONFIGURE_OPTS
+= --with-pcre-regex
=shared
,"$(STAGING_DIR)/usr"
99 PKG_CONFIGURE_OPTS
+= --without-pcre-regex
101 ifneq ($(BR2_PACKAGE_PHP5_MOD_PGSQL
),)
102 PKG_CONFIGURE_OPTS
+= --with-pgsql
=shared
,"$(STAGING_DIR)/usr"
104 PKG_CONFIGURE_OPTS
+= --without-pgsql
106 ifneq ($(BR2_PACKAGE_PHP5_MOD_SQLITE
),)
107 PKG_CONFIGURE_OPTS
+= --with-sqlite
=shared
,"$(STAGING_DIR)/usr"
109 PKG_CONFIGURE_OPTS
+= --without-sqlite
111 ifneq ($(BR2_PACKAGE_PHP5_MOD_XML
),)
112 PKG_CONFIGURE_OPTS
+= --enable-xml
=shared
,"$(STAGING_DIR)/usr" \
113 --with-libexpat-dir
="$(STAGING_DIR)/usr"
115 PKG_CONFIGURE_OPTS
+= --disable-xml
118 $(eval
$(call PKG_template
,PHP5_CLI
,php5-cli
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
119 $(eval
$(call PKG_template
,PHP5_CGI
,php5-cgi
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
120 $(eval
$(call PKG_template
,PHP5_FASTCGI
,php5-fastcgi
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
122 $(eval
$(call PKG_template
,PHP5_MOD_CURL
,php5-mod-curl
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
123 $(eval
$(call PKG_template
,PHP5_MOD_FTP
,php5-mod-ftp
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
124 $(eval
$(call PKG_template
,PHP5_MOD_GD
,php5-mod-gd
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
125 $(eval
$(call PKG_template
,PHP5_MOD_GMP
,php5-mod-gmp
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
126 $(eval
$(call PKG_template
,PHP5_MOD_LDAP
,php5-mod-ldap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
127 $(eval
$(call PKG_template
,PHP5_MOD_MYSQL
,php5-mod-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
128 $(eval
$(call PKG_template
,PHP5_MOD_OPENSSL
,php5-mod-openssl
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
129 $(eval
$(call PKG_template
,PHP5_MOD_PCRE
,php5-mod-pcre
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
130 $(eval
$(call PKG_template
,PHP5_MOD_PGSQL
,php5-mod-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
131 $(eval
$(call PKG_template
,PHP5_MOD_SESSION
,php5-mod-session
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
132 $(eval
$(call PKG_template
,PHP5_MOD_SOCKETS
,php5-mod-sockets
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
133 $(eval
$(call PKG_template
,PHP5_MOD_SQLITE
,php5-mod-sqlite
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
134 $(eval
$(call PKG_template
,PHP5_MOD_XML
,php5-mod-xml
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
136 $(eval
$(call PKG_mod_template
,PHP5_MOD_CURL
,curl
))
137 $(eval
$(call PKG_mod_template
,PHP5_MOD_FTP
,ftp
))
138 $(eval
$(call PKG_mod_template
,PHP5_MOD_GD
,gd
))
139 $(eval
$(call PKG_mod_template
,PHP5_MOD_GMP
,gmp
))
140 $(eval
$(call PKG_mod_template
,PHP5_MOD_LDAP
,ldap
))
141 $(eval
$(call PKG_mod_template
,PHP5_MOD_MYSQL
,mysql
))
142 $(eval
$(call PKG_mod_template
,PHP5_MOD_OPENSSL
,openssl
))
143 $(eval
$(call PKG_mod_template
,PHP5_MOD_PCRE
,pcre
))
144 $(eval
$(call PKG_mod_template
,PHP5_MOD_PGSQL
,pgsql
))
145 $(eval
$(call PKG_mod_template
,PHP5_MOD_SESSION
,session
))
146 $(eval
$(call PKG_mod_template
,PHP5_MOD_SOCKETS
,sockets
))
147 $(eval
$(call PKG_mod_template
,PHP5_MOD_SQLITE
,sqlite
))
148 $(eval
$(call PKG_mod_template
,PHP5_MOD_XML
,xml
))
151 $(PKG_BUILD_DIR
)/.configured
:
154 $(PKG_BUILD_DIR
)/.built
:
155 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
156 $(TARGET_CONFIGURE_OPTS
) \
157 CFLAGS
="$(TARGET_CFLAGS)" \
158 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
159 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
160 LIBS
="-lcrypto -lssl" \
161 php_cv_cc_rpath
="no" \
163 --target
=$(GNU_TARGET_NAME
) \
164 --host
=$(GNU_TARGET_NAME
) \
165 --build
=$(GNU_HOST_NAME
) \
166 --program-prefix
="" \
167 --program-suffix
="" \
171 --datadir=/usr
/share \
172 --includedir=/usr
/include \
173 --infodir=/usr
/share
/info \
175 --libexecdir
=/usr
/lib \
176 --localstatedir
=/var \
177 --mandir=/usr
/share
/man \
178 --sbindir
=/usr
/sbin \
180 $(DISABLE_LARGEFILE
) \
182 $(PKG_CONFIGURE_OPTS
) \
186 --enable-force-cgi-redirect \
187 --enable-discard-path \
189 $(MAKE
) -C
$(PKG_BUILD_DIR
)
190 mv
$(PKG_BUILD_DIR
)/sapi
/cli
/php
$(PKG_BUILD_DIR
)/php-cli
191 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
192 $(TARGET_CONFIGURE_OPTS
) \
193 CFLAGS
="$(TARGET_CFLAGS)" \
194 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
195 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
196 LIBS
="-lcrypto -lssl" \
197 php_cv_cc_rpath
="no" \
199 --target
=$(GNU_TARGET_NAME
) \
200 --host
=$(GNU_TARGET_NAME
) \
201 --build
=$(GNU_HOST_NAME
) \
202 --program-prefix
="" \
203 --program-suffix
="" \
207 --datadir=/usr
/share \
208 --includedir=/usr
/include \
209 --infodir=/usr
/share
/info \
211 --libexecdir
=/usr
/lib \
212 --localstatedir
=/var \
213 --mandir=/usr
/share
/man \
214 --sbindir
=/usr
/sbin \
216 $(DISABLE_LARGEFILE
) \
218 $(PKG_CONFIGURE_OPTS
) \
222 --enable-force-cgi-redirect \
223 --enable-discard-path \
225 $(MAKE
) -C
$(PKG_BUILD_DIR
)
226 mv
$(PKG_BUILD_DIR
)/sapi
/cgi
/php
$(PKG_BUILD_DIR
)/php-cgi
227 $(MAKE
) -C
$(PKG_BUILD_DIR
) clean
228 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
229 $(TARGET_CONFIGURE_OPTS
) \
230 CFLAGS
="$(TARGET_CFLAGS)" \
231 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
232 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
233 LIBS
="-lcrypto -lssl" \
234 php_cv_cc_rpath
="no" \
236 --target
=$(GNU_TARGET_NAME
) \
237 --host
=$(GNU_TARGET_NAME
) \
238 --build
=$(GNU_HOST_NAME
) \
239 --program-prefix
="" \
240 --program-suffix
="" \
244 --datadir=/usr
/share \
245 --includedir=/usr
/include \
246 --infodir=/usr
/share
/info \
248 --libexecdir
=/usr
/lib \
249 --localstatedir
=/var \
250 --mandir=/usr
/share
/man \
251 --sbindir
=/usr
/sbin \
253 $(DISABLE_LARGEFILE
) \
255 $(PKG_CONFIGURE_OPTS
) \
259 --enable-force-cgi-redirect \
260 --enable-discard-path \
262 $(MAKE
) -C
$(PKG_BUILD_DIR
)
263 mv
$(PKG_BUILD_DIR
)/sapi
/cgi
/php
$(PKG_BUILD_DIR
)/php-fastcgi
267 install -m0755
-d
$(IDIR_PHP5_CLI
)/etc
268 install -m0644 .
/files
/php.ini
$(IDIR_PHP5_CLI
)/etc
/
269 install -m0755
-d
$(IDIR_PHP5_CLI
)/usr
/bin
270 $(CP
) $(PKG_BUILD_DIR
)/php-cli
$(IDIR_PHP5_CLI
)/usr
/bin
/php
271 $(RSTRIP
) $(IDIR_PHP5_CLI
)
272 $(IPKG_BUILD
) $(IDIR_PHP5_CLI
) $(PACKAGE_DIR
)
275 install -m0755
-d
$(IDIR_PHP5_CGI
)/etc
276 install -m0644 .
/files
/php.ini
$(IDIR_PHP5_CGI
)/etc
/
277 install -m0755
-d
$(IDIR_PHP5_CGI
)/usr
/bin
278 $(CP
) $(PKG_BUILD_DIR
)/php-cgi
$(IDIR_PHP5_CGI
)/usr
/bin
/php
279 $(RSTRIP
) $(IDIR_PHP5_CGI
)
280 $(IPKG_BUILD
) $(IDIR_PHP5_CGI
) $(PACKAGE_DIR
)
282 $(IPKG_PHP5_FASTCGI
):
283 install -m0755
-d
$(IDIR_PHP5_FASTCGI
)/etc
284 install -m0644 .
/files
/php.ini
$(IDIR_PHP5_FASTCGI
)/etc
/
285 install -m0755
-d
$(IDIR_PHP5_FASTCGI
)/etc
/init.d
286 install -m0755 .
/files
/php.init
$(IDIR_PHP5_FASTCGI
)/etc
/init.d
/php
287 install -m0755
-d
$(IDIR_PHP5_FASTCGI
)/usr
/sbin
288 $(CP
) $(PKG_BUILD_DIR
)/php-fastcgi
$(IDIR_PHP5_FASTCGI
)/usr
/sbin
/php
289 $(RSTRIP
) $(IDIR_PHP5_FASTCGI
)
290 $(IPKG_BUILD
) $(IDIR_PHP5_FASTCGI
) $(PACKAGE_DIR
)