From 8dc012dfad6559a00f0aa78fb12a9ce8912d624c Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Thu, 6 Dec 2018 09:43:36 -0200 Subject: [PATCH 1/2] unixodbc: Fix LIB_PREFIX in host build When copying config.h from PKG_BUILD_DIR to HOST_BUILD_DIR, LIB_PREFIX is set to /usr/lib. Then when odbc_config is run, it reports /usr/lib as the --lib-dir, and in --libs as well, and dependent packages may fail. Set it to $(STAGING_DIR)/usr/lib to make it right. Signed-off-by: Eneas U de Queiroz --- libs/unixodbc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/unixodbc/Makefile b/libs/unixodbc/Makefile index 966848ac3..21a8af180 100644 --- a/libs/unixodbc/Makefile +++ b/libs/unixodbc/Makefile @@ -132,6 +132,7 @@ endef define Host/Configure $(call Host/Configure/Default) cp $(PKG_BUILD_DIR)/config.h $(HOST_BUILD_DIR) + sed -i -e 's!\(LIB_PREFIX \).*$$$$!\1"$(STAGING_DIR)/usr/lib"!' $(HOST_BUILD_DIR)/config.h cp $(PKG_BUILD_DIR)/unixodbc_conf.h $(HOST_BUILD_DIR) endef From e4693dd939ad7901137b3b201be18a1c51d18f6c Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Thu, 6 Dec 2018 12:03:02 -0200 Subject: [PATCH 2/2] unixodbc: fix clean-build compilation For host compilation, the configure-generated config.h from the target compilation is used in place of the host-generated file. When the target package is compiled with clean-build, that file is gone. This saves the file under $(STAGING_DIR), and fetch it from there. Signed-off-by: Eneas U de Queiroz --- libs/unixodbc/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/unixodbc/Makefile b/libs/unixodbc/Makefile index 21a8af180..fad277eac 100644 --- a/libs/unixodbc/Makefile +++ b/libs/unixodbc/Makefile @@ -97,6 +97,8 @@ endef define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/$(STAGING_DIR)/usr/include/*.h $(1)/usr/include/ + # Save autoconf config.h file for host build + $(CP) $(PKG_BUILD_DIR)/config.h $(1)/usr/include/unixodbc_ac_config.h $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/ $(INSTALL_DIR) $(1)/etc @@ -131,7 +133,8 @@ endef define Host/Configure $(call Host/Configure/Default) - cp $(PKG_BUILD_DIR)/config.h $(HOST_BUILD_DIR) + # copy target autoconf config.h file for host build + cp $(STAGING_DIR)/usr/include/unixodbc_ac_config.h $(HOST_BUILD_DIR) sed -i -e 's!\(LIB_PREFIX \).*$$$$!\1"$(STAGING_DIR)/usr/lib"!' $(HOST_BUILD_DIR)/config.h cp $(PKG_BUILD_DIR)/unixodbc_conf.h $(HOST_BUILD_DIR) endef