fix php4 compile on arm, add fpic while we're at it
[openwrt/svn-archive/archive.git] / lang / php4 / Makefile
index acb4cf67a40bf63a1d56ce6e6fe3a017344cb036..5c8bab0512c8785871117538661bdf71f4b74a53 100644 (file)
@@ -1,5 +1,5 @@
-# 
-# Copyright (C) 2006,2007 OpenWrt.org
+#
+# Copyright (C) 2006-2008 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php4
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=php4
-PKG_VERSION:=4.3.11
-PKG_RELEASE:=2
+PKG_VERSION:=4.4.7
+PKG_RELEASE:=1
 
 PKG_SOURCE:=php-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://fr.php.net/distributions/
 
 PKG_SOURCE:=php-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://fr.php.net/distributions/
-PKG_MD5SUM:=fbc67d240812136a9842bc1f2a217b7a
+PKG_MD5SUM:=3f21b44d37a57ca3876d3aea713c700d
 PKG_BUILD_DIR:=$(BUILD_DIR)/php-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
 PKG_BUILD_DIR:=$(BUILD_DIR)/php-$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/package.mk
@@ -24,11 +24,12 @@ define Package/php4/Default
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=PHP4 Hypertext preprocessor
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=PHP4 Hypertext preprocessor
+  DEPENDS:=@!TARGET_ixp4xx
   URL:=http://www.php.net/
 endef
 
 define Package/php4/Default/description
   URL:=http://www.php.net/
 endef
 
 define Package/php4/Default/description
- PHP is a widely-used general-purpose scripting language that is especially 
+ PHP is a widely-used general-purpose scripting language that is especially
  suited for Web development and can be embedded into HTML.
 endef
 
  suited for Web development and can be embedded into HTML.
 endef
 
@@ -39,7 +40,7 @@ endef
 
 define Package/php4/description
 $(call Package/php4/Default/description)
 
 define Package/php4/description
 $(call Package/php4/Default/description)
- This package contains only the PHP config file. You must actually choose 
+ This package contains only the PHP config file. You must actually choose
  your PHP flavour (cli, cgi or fastcgi).
 endef
 
  your PHP flavour (cli, cgi or fastcgi).
 endef
 
@@ -142,12 +143,6 @@ define Package/php4-mod-sockets
   TITLE:=Sockets module
 endef
 
   TITLE:=Sockets module
 endef
 
-define Package/php4-mod-sqlite
-  $(call Package/php4/Default)
-  DEPENDS:=php4 +libsqlite2
-  TITLE:=SQLite module
-endef
-
 define Package/php4-mod-xml
   $(call Package/php4/Default)
   DEPENDS:=php4 +libexpat
 define Package/php4-mod-xml
   $(call Package/php4/Default)
   DEPENDS:=php4 +libexpat
@@ -186,7 +181,7 @@ PKG_CONFIGURE_OPTS:= \
          --with-zlib-dir="$(STAGING_DIR)/usr" \
 
 ifneq ($(SDK),)
          --with-zlib-dir="$(STAGING_DIR)/usr" \
 
 ifneq ($(SDK),)
-  PKG_BUILD_DEPENDS:=libopenssl zlib libcurl libgd libgmp libopenldap libmysqlclient libpq libsqlite2 libexpat
+  PKG_BUILD_DEPENDS:=libopenssl zlib libcurl libgd libgmp libopenldap libmysqlclient libpq libexpat
 # force PKG_CONFIGURE_{LIBS,OPTS} below when built in the SDK
   CONFIG_PACKAGE_php4-cli:=m
   CONFIG_PACKAGE_php4-cgi:=m
 # force PKG_CONFIGURE_{LIBS,OPTS} below when built in the SDK
   CONFIG_PACKAGE_php4-cli:=m
   CONFIG_PACKAGE_php4-cgi:=m
@@ -198,7 +193,6 @@ ifneq ($(SDK),)
   CONFIG_PACKAGE_php4-mod-mysql:=m
   CONFIG_PACKAGE_php4-mod-pcre:=m
   CONFIG_PACKAGE_php4-mod-pgsql:=m
   CONFIG_PACKAGE_php4-mod-mysql:=m
   CONFIG_PACKAGE_php4-mod-pcre:=m
   CONFIG_PACKAGE_php4-mod-pgsql:=m
-  CONFIG_PACKAGE_php4-mod-sqlite:=m
   CONFIG_PACKAGE_php4-mod-xml:=m
 endif
 
   CONFIG_PACKAGE_php4-mod-xml:=m
 endif
 
@@ -246,11 +240,6 @@ ifneq ($(CONFIG_PACKAGE_php4-mod-pgsql),)
 else
   PKG_CONFIGURE_OPTS+= --without-pgsql
 endif
 else
   PKG_CONFIGURE_OPTS+= --without-pgsql
 endif
-ifneq ($(CONFIG_PACKAGE_php4-mod-sqlite),)
-  PKG_CONFIGURE_OPTS+= --with-sqlite=shared,"$(STAGING_DIR)/usr"
-else
-  PKG_CONFIGURE_OPTS+= --without-sqlite
-endif
 ifneq ($(CONFIG_PACKAGE_php4-mod-xml),)
   PKG_CONFIGURE_OPTS+= --enable-xml=shared \
        --with-expat-dir="$(STAGING_DIR)/usr"
 ifneq ($(CONFIG_PACKAGE_php4-mod-xml),)
   PKG_CONFIGURE_OPTS+= --enable-xml=shared \
        --with-expat-dir="$(STAGING_DIR)/usr"
@@ -261,6 +250,8 @@ endif
 define Build/Configure
 endef
 
 define Build/Configure
 endef
 
+TARGET_CFLAGS += $(if $(CONFIG_BIG_ENDIAN),-DIEEE_BIG_ENDIAN,-DIEEE_LITTLE_ENDIAN) $(FPIC)
+
 ifneq ($(CONFIG_PACKAGE_php4-cli),)
   define Build/Compile/php4-cli
        -$(MAKE) -C $(PKG_BUILD_DIR) clean
 ifneq ($(CONFIG_PACKAGE_php4-cli),)
   define Build/Compile/php4-cli
        -$(MAKE) -C $(PKG_BUILD_DIR) clean
@@ -376,6 +367,5 @@ $(eval $(call BuildPlugin,php4-mod-pcre,pcre))
 $(eval $(call BuildPlugin,php4-mod-pgsql,pgsql))
 $(eval $(call BuildPlugin,php4-mod-session,session))
 $(eval $(call BuildPlugin,php4-mod-sockets,sockets))
 $(eval $(call BuildPlugin,php4-mod-pgsql,pgsql))
 $(eval $(call BuildPlugin,php4-mod-session,session))
 $(eval $(call BuildPlugin,php4-mod-sockets,sockets))
-$(eval $(call BuildPlugin,php4-mod-sqlite,sqlite))
 $(eval $(call BuildPlugin,php4-mod-xml,xml))
 
 $(eval $(call BuildPlugin,php4-mod-xml,xml))