unixodbc: Use default includedir for target configure

Replace INCLUDE_PREFIX in config.h for host odbc_config instead of
specifying includedir to target configure.

This also updates the prefixes in unixodbc_conf.h to keep config.h and
unixodbc_conf.h in sync.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To 2023-10-27 17:51:58 +08:00 committed by Rosen Penev
parent b0699060c9
commit 3ab793f09e

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=unixodbc PKG_NAME:=unixodbc
PKG_VERSION:=2.3.9 PKG_VERSION:=2.3.9
PKG_RELEASE:=5 PKG_RELEASE:=6
PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.unixodbc.org PKG_SOURCE_URL:=http://www.unixodbc.org
@ -36,8 +36,7 @@ include $(INCLUDE_DIR)/host-build.mk
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
--disable-gui \ --disable-gui \
--with-pic \ --with-pic \
--enable-drivers \ --enable-drivers
--includedir=$(STAGING_DIR)/usr/include
define Package/unixodbc/Default define Package/unixodbc/Default
SUBMENU:=Database SUBMENU:=Database
@ -84,7 +83,7 @@ endef
define Build/InstallDev define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include $(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/$(STAGING_DIR)/usr/include/*.h $(1)/usr/include/ $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
# Save autoconf config.h file for host build # Save autoconf config.h file for host build
# copy target autoconf config.h and unixodbc_conf.h file for host build # copy target autoconf config.h and unixodbc_conf.h file for host build
$(INSTALL_DIR) $(1)/usr/include/unixodbc $(INSTALL_DIR) $(1)/usr/include/unixodbc
@ -123,9 +122,12 @@ endef
define Host/Configure define Host/Configure
$(call Host/Configure/Default) $(call Host/Configure/Default)
cp $(STAGING_DIR)/usr/include/unixodbc/config.h $(HOST_BUILD_DIR) $(CP) $(STAGING_DIR)/usr/include/unixodbc/config.h $(HOST_BUILD_DIR)
sed -i -e 's!\(LIB_PREFIX \).*$$$$!\1"$(STAGING_DIR)/usr/lib"!' $(HOST_BUILD_DIR)/config.h $(CP) $(STAGING_DIR)/usr/include/unixodbc/unixodbc_conf.h $(HOST_BUILD_DIR)
cp $(STAGING_DIR)/usr/include/unixodbc/unixodbc_conf.h $(HOST_BUILD_DIR) $(SED) 's!^#define INCLUDE_PREFIX ".*"!#define INCLUDE_PREFIX "$(STAGING_DIR)/usr/include"!' \
-e 's!^#define LIB_PREFIX ".*"!#define LIB_PREFIX "$(STAGING_DIR)/usr/lib"!' \
$(HOST_BUILD_DIR)/config.h \
$(HOST_BUILD_DIR)/unixodbc_conf.h
endef endef
define Host/Compile define Host/Compile