From 2d5f279aae4b4549d73724d80f04a3d653455d40 Mon Sep 17 00:00:00 2001 From: Tim Yardley Date: Wed, 11 Apr 2007 17:27:38 +0000 Subject: [PATCH] fix pg_config needing to be compiled on the host env for php5 SVN-Revision: 6933 --- libs/postgresql/Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile index 77f5238255..559a78cd57 100644 --- a/libs/postgresql/Makefile +++ b/libs/postgresql/Makefile @@ -53,7 +53,7 @@ define Package/pgsql-server URL:=http://www.postgresql.org/ endef -# Need a native ecpg and zic for build +# Need a native ecpg ,pg_config, and zic for build define Build/Configure (cd $(PKG_BUILD_DIR); rm -f config.cache; \ ./configure \ @@ -88,11 +88,14 @@ define Build/Configure --without-tk \ --with-zlib="yes" \ ); - $(MAKE) -C $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc CC="gcc" CFLAGS+="-I../../libpq" + $(MAKE) -C $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc CC="$(HOSTCC)" CFLAGS+="-I../../libpq" mv $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg \ $(PKG_BUILD_DIR)/src/interfaces/ecpg/preproc/ecpg.host - $(MAKE) -C $(PKG_BUILD_DIR)/src/timezone CC="gcc" + $(MAKE) -C $(PKG_BUILD_DIR)/src/timezone CC="$(HOSTCC)" mv $(PKG_BUILD_DIR)/src/timezone/zic $(PKG_BUILD_DIR)/src/timezone/zic.host + $(MAKE) -C $(PKG_BUILD_DIR)/src/bin/pg_config CC="$(HOSTCC)" + mv $(PKG_BUILD_DIR)/src/bin/pg_config/pg_config \ + $(PKG_BUILD_DIR)/src/bin/pg_config/pg_config.host $(MAKE) -C $(PKG_BUILD_DIR) distclean (cd $(PKG_BUILD_DIR); rm -f config.cache; \ @@ -237,7 +240,7 @@ endef define Build/InstallDev mkdir -p $(STAGING_DIR)/usr/bin - $(CP) $(PKG_INSTALL_DIR)/usr/bin/pg_config $(STAGING_DIR)/usr/bin/ + $(CP) $(PKG_BUILD_DIR)/src/bin/pg_config/pg_config.host $(STAGING_DIR)/usr/bin/pg_config mkdir -p $(STAGING_DIR)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/libpq $(STAGING_DIR)/usr/include/ $(CP) $(PKG_INSTALL_DIR)/usr/include/libpq-fe.h $(STAGING_DIR)/usr/include/ -- 2.30.2