3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=fbc67d240812136a9842bc1f2a217b7a
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
:= \
35 --with-config-file-path
=/etc \
37 --enable-magic-quotes \
38 --enable-memory-limit \
40 --disable-short-tags \
49 --with-openssl
=shared
,"$(STAGING_DIR)/usr" \
51 --with-openssl-dir
="$(STAGING_DIR)/usr" \
52 --enable-session
=shared \
53 --enable-sockets
=shared \
55 --with-zlib
="$(STAGING_DIR)/usr" \
56 --with-zlib-dir
="$(STAGING_DIR)/usr" \
58 ifneq ($(BR2_PACKAGE_PHP4_MOD_CURL
),)
59 PKG_CONFIGURE_OPTS
+= --with-curl
=shared
,"$(STAGING_DIR)/usr"
61 PKG_CONFIGURE_OPTS
+= --without-curl
63 ifneq ($(BR2_PACKAGE_PHP4_MOD_GD
),)
64 PKG_CONFIGURE_OPTS
+= --with-gd
=shared
,"$(STAGING_DIR)/usr" \
65 --without-freetype-dir \
66 --with-jpeg-dir
="$(STAGING_DIR)/usr" \
67 --with-png-dir
="$(STAGING_DIR)/usr" \
71 --enable-gd-native-ttf \
74 PKG_CONFIGURE_OPTS
+= --without-gd
76 ifneq ($(BR2_PACKAGE_PHP4_MOD_GMP
),)
77 PKG_CONFIGURE_OPTS
+= --with-gmp
=shared
,"$(STAGING_DIR)/usr"
79 PKG_CONFIGURE_OPTS
+= --without-gmp
81 ifneq ($(BR2_PACKAGE_PHP4_MOD_LDAP
),)
82 PKG_CONFIGURE_OPTS
+= --with-ldap
=shared
,"$(STAGING_DIR)/usr"
83 --with-ldap-sasl
="$(STAGING_DIR)/usr"
85 PKG_CONFIGURE_OPTS
+= --without-ldap
87 ifneq ($(BR2_PACKAGE_PHP4_MOD_MYSQL
),)
88 PKG_CONFIGURE_OPTS
+= --with-mysql
=shared
,"$(STAGING_DIR)/usr"
90 PKG_CONFIGURE_OPTS
+= --without-mysql
92 ifneq ($(BR2_PACKAGE_PHP4_MOD_PCRE
),)
93 PKG_CONFIGURE_OPTS
+= --with-pcre-regex
=shared
,"$(STAGING_DIR)/usr"
95 PKG_CONFIGURE_OPTS
+= --without-pcre-regex
97 ifneq ($(BR2_PACKAGE_PHP4_MOD_PGSQL
),)
98 PKG_CONFIGURE_OPTS
+= --with-pgsql
=shared
,"$(STAGING_DIR)/usr"
100 PKG_CONFIGURE_OPTS
+= --without-pgsql
102 ifneq ($(BR2_PACKAGE_PHP4_MOD_SQLITE
),)
103 PKG_CONFIGURE_OPTS
+= --with-sqlite
=shared
,"$(STAGING_DIR)/usr"
105 PKG_CONFIGURE_OPTS
+= --without-sqlite
107 ifneq ($(BR2_PACKAGE_PHP4_MOD_XML
),)
108 PKG_CONFIGURE_OPTS
+= --enable-xml
=shared \
109 --with-expat-dir
="$(STAGING_DIR)/usr"
111 PKG_CONFIGURE_OPTS
+= --disable-xml
114 $(eval
$(call PKG_template
,PHP4_CLI
,php4-cli
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
115 $(eval
$(call PKG_template
,PHP4_CGI
,php4-cgi
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
116 $(eval
$(call PKG_template
,PHP4_FASTCGI
,php4-fastcgi
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
118 $(eval
$(call PKG_template
,PHP4_MOD_CURL
,php4-mod-curl
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
119 $(eval
$(call PKG_template
,PHP4_MOD_FTP
,php4-mod-ftp
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
120 $(eval
$(call PKG_template
,PHP4_MOD_GD
,php4-mod-gd
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
121 $(eval
$(call PKG_template
,PHP4_MOD_GMP
,php4-mod-gmp
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
122 $(eval
$(call PKG_template
,PHP4_MOD_LDAP
,php4-mod-ldap
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
123 $(eval
$(call PKG_template
,PHP4_MOD_MYSQL
,php4-mod-mysql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
124 $(eval
$(call PKG_template
,PHP4_MOD_OPENSSL
,php4-mod-openssl
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
125 $(eval
$(call PKG_template
,PHP4_MOD_PCRE
,php4-mod-pcre
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
126 $(eval
$(call PKG_template
,PHP4_MOD_PGSQL
,php4-mod-pgsql
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
127 $(eval
$(call PKG_template
,PHP4_MOD_SESSION
,php4-mod-session
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
128 $(eval
$(call PKG_template
,PHP4_MOD_SOCKETS
,php4-mod-sockets
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
129 $(eval
$(call PKG_template
,PHP4_MOD_SQLITE
,php4-mod-sqlite
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
130 $(eval
$(call PKG_template
,PHP4_MOD_XML
,php4-mod-xml
,$(PKG_VERSION
)-$(PKG_RELEASE
),$(ARCH
)))
132 $(eval
$(call PKG_mod_template
,PHP4_MOD_CURL
,curl
))
133 $(eval
$(call PKG_mod_template
,PHP4_MOD_FTP
,ftp
))
134 $(eval
$(call PKG_mod_template
,PHP4_MOD_GD
,gd
))
135 $(eval
$(call PKG_mod_template
,PHP4_MOD_GMP
,gmp
))
136 $(eval
$(call PKG_mod_template
,PHP4_MOD_LDAP
,ldap
))
137 $(eval
$(call PKG_mod_template
,PHP4_MOD_MYSQL
,mysql
))
138 $(eval
$(call PKG_mod_template
,PHP4_MOD_OPENSSL
,openssl
))
139 $(eval
$(call PKG_mod_template
,PHP4_MOD_PCRE
,pcre
))
140 $(eval
$(call PKG_mod_template
,PHP4_MOD_PGSQL
,pgsql
))
141 $(eval
$(call PKG_mod_template
,PHP4_MOD_SESSION
,session
))
142 $(eval
$(call PKG_mod_template
,PHP4_MOD_SOCKETS
,sockets
))
143 $(eval
$(call PKG_mod_template
,PHP4_MOD_SQLITE
,sqlite
))
144 $(eval
$(call PKG_mod_template
,PHP4_MOD_XML
,xml
))
147 $(PKG_BUILD_DIR
)/.configured
:
150 $(PKG_BUILD_DIR
)/.built
:
151 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
152 $(TARGET_CONFIGURE_OPTS
) \
153 CFLAGS
="$(TARGET_CFLAGS)" \
154 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
155 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
156 LIBS
="-lcrypto -lssl" \
157 php_cv_cc_rpath
="no" \
159 --target
=$(GNU_TARGET_NAME
) \
160 --host
=$(GNU_TARGET_NAME
) \
161 --build
=$(GNU_HOST_NAME
) \
162 --program-prefix
="" \
163 --program-suffix
="" \
167 --datadir=/usr
/share \
168 --includedir=/usr
/include \
169 --infodir=/usr
/share
/info \
171 --libexecdir
=/usr
/lib \
172 --localstatedir
=/var \
173 --mandir=/usr
/share
/man \
174 --sbindir
=/usr
/sbin \
176 $(DISABLE_LARGEFILE
) \
178 $(PKG_CONFIGURE_OPTS
) \
182 --enable-force-cgi-redirect \
183 --enable-discard-path \
185 $(MAKE
) -C
$(PKG_BUILD_DIR
)
186 mv
$(PKG_BUILD_DIR
)/sapi
/cli
/php
$(PKG_BUILD_DIR
)/php-cli
187 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
188 $(TARGET_CONFIGURE_OPTS
) \
189 CFLAGS
="$(TARGET_CFLAGS)" \
190 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
191 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
192 LIBS
="-lcrypto -lssl" \
193 php_cv_cc_rpath
="no" \
195 --target
=$(GNU_TARGET_NAME
) \
196 --host
=$(GNU_TARGET_NAME
) \
197 --build
=$(GNU_HOST_NAME
) \
198 --program-prefix
="" \
199 --program-suffix
="" \
203 --datadir=/usr
/share \
204 --includedir=/usr
/include \
205 --infodir=/usr
/share
/info \
207 --libexecdir
=/usr
/lib \
208 --localstatedir
=/var \
209 --mandir=/usr
/share
/man \
210 --sbindir
=/usr
/sbin \
212 $(DISABLE_LARGEFILE
) \
214 $(PKG_CONFIGURE_OPTS
) \
218 --enable-force-cgi-redirect \
219 --enable-discard-path \
221 $(MAKE
) -C
$(PKG_BUILD_DIR
)
222 mv
$(PKG_BUILD_DIR
)/sapi
/cgi
/php
$(PKG_BUILD_DIR
)/php-cgi
223 $(MAKE
) -C
$(PKG_BUILD_DIR
) clean
224 (cd
$(PKG_BUILD_DIR
); rm -rf config.
{cache
,status
} ; \
225 $(TARGET_CONFIGURE_OPTS
) \
226 CFLAGS
="$(TARGET_CFLAGS)" \
227 CPPFLAGS
="-I$(STAGING_DIR)/usr/include" \
228 LDFLAGS
="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
229 LIBS
="-lcrypto -lssl" \
230 php_cv_cc_rpath
="no" \
232 --target
=$(GNU_TARGET_NAME
) \
233 --host
=$(GNU_TARGET_NAME
) \
234 --build
=$(GNU_HOST_NAME
) \
235 --program-prefix
="" \
236 --program-suffix
="" \
240 --datadir=/usr
/share \
241 --includedir=/usr
/include \
242 --infodir=/usr
/share
/info \
244 --libexecdir
=/usr
/lib \
245 --localstatedir
=/var \
246 --mandir=/usr
/share
/man \
247 --sbindir
=/usr
/sbin \
249 $(DISABLE_LARGEFILE
) \
251 $(PKG_CONFIGURE_OPTS
) \
255 --enable-force-cgi-redirect \
256 --enable-discard-path \
258 $(MAKE
) -C
$(PKG_BUILD_DIR
)
259 mv
$(PKG_BUILD_DIR
)/sapi
/cgi
/php
$(PKG_BUILD_DIR
)/php-fastcgi
263 install -m0755
-d
$(IDIR_PHP4_CLI
)/etc
264 install -m0644 .
/files
/php.ini
$(IDIR_PHP4_CLI
)/etc
/
265 install -m0755
-d
$(IDIR_PHP4_CLI
)/usr
/bin
266 $(CP
) $(PKG_BUILD_DIR
)/php-cli
$(IDIR_PHP4_CLI
)/usr
/bin
/php
267 $(RSTRIP
) $(IDIR_PHP4_CLI
)
268 $(IPKG_BUILD
) $(IDIR_PHP4_CLI
) $(PACKAGE_DIR
)
271 install -m0755
-d
$(IDIR_PHP4_CGI
)/etc
272 install -m0644 .
/files
/php.ini
$(IDIR_PHP4_CGI
)/etc
/
273 install -m0755
-d
$(IDIR_PHP4_CGI
)/usr
/bin
274 $(CP
) $(PKG_BUILD_DIR
)/php-cgi
$(IDIR_PHP4_CGI
)/usr
/bin
/php
275 $(RSTRIP
) $(IDIR_PHP4_CGI
)
276 $(IPKG_BUILD
) $(IDIR_PHP4_CGI
) $(PACKAGE_DIR
)
278 $(IPKG_PHP4_FASTCGI
):
279 install -m0755
-d
$(IDIR_PHP4_FASTCGI
)/etc
280 install -m0644 .
/files
/php.ini
$(IDIR_PHP4_FASTCGI
)/etc
/
281 install -m0755
-d
$(IDIR_PHP4_FASTCGI
)/etc
/init.d
282 install -m0755 .
/files
/php.init
$(IDIR_PHP4_FASTCGI
)/etc
/init.d
/php
283 install -m0755
-d
$(IDIR_PHP4_FASTCGI
)/usr
/sbin
284 $(CP
) $(PKG_BUILD_DIR
)/php-fastcgi
$(IDIR_PHP4_FASTCGI
)/usr
/sbin
/php
285 $(RSTRIP
) $(IDIR_PHP4_FASTCGI
)
286 $(IPKG_BUILD
) $(IDIR_PHP4_FASTCGI
) $(PACKAGE_DIR
)