forked from openwrt/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed openwrt#4705 Reported-by: Michael Braun <[email protected]> Signed-off-by: Daniel Golle <[email protected]>
- Loading branch information
Showing
1 changed file
with
30 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,16 +9,24 @@ include $(TOPDIR)/rules.mk | |
|
||
PKG_NAME:=unixodbc | ||
PKG_VERSION:=2.3.4 | ||
PKG_RELEASE:=4 | ||
PKG_RELEASE:=5 | ||
|
||
PKG_SOURCE_URL:=ftp://ftp.unixodbc.org/pub/unixODBC/ | ||
PKG_SOURCE:=unixODBC-$(PKG_VERSION).tar.gz | ||
PKG_HASH:=2e1509a96bb18d248bf08ead0d74804957304ff7c6f8b2e5965309c632421e39 | ||
PKG_BUILD_DIR:=$(BUILD_DIR)/unixODBC-$(PKG_VERSION) | ||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/unixODBC-$(PKG_VERSION) | ||
PKG_MAINTAINER:=Thomas Heil <[email protected]> | ||
PKG_LICENSE:=prog GPL libs LGPL | ||
HOST_BUILD_DEPENDS:=unixodbc | ||
|
||
# if your other package depends on unixodbc and needs | ||
# odbc_config, add to your other Makefile | ||
# PKG_BUILD_DEPENDS:=unixodbc/host | ||
|
||
include $(INCLUDE_DIR)/package.mk | ||
include $(INCLUDE_DIR)/host-build.mk | ||
|
||
CONFIGURE_ARGS += \ | ||
--disable-gui \ | ||
--with-pic \ | ||
|
@@ -74,12 +82,6 @@ define Build/Compile | |
$(MAKE_FLAGS) \ | ||
ARCH="$(ARCH)" \ | ||
CC="$(TARGET_CC)" | ||
rm $(PKG_BUILD_DIR)/exe/{odbc_config,odbc-config.o} | ||
$(MAKE) -C $(PKG_BUILD_DIR)/exe \ | ||
DESTDIR="$(PKG_INSTALL_DIR)" \ | ||
CC="$(HOSTCC)" \ | ||
CFLAGS="$(HOST_CFLAGS) -DUSE_UNIXODBC_CONF_H" \ | ||
LDFLAGS="$(HOST_LDFLAGS)" | ||
$(MAKE) -C $(PKG_BUILD_DIR) \ | ||
DESTDIR="$(PKG_INSTALL_DIR)" \ | ||
$(MAKE_FLAGS) \ | ||
|
@@ -88,10 +90,6 @@ define Build/Compile | |
endef | ||
|
||
define Build/InstallDev | ||
$(INSTALL_DIR) $(1)/host/bin | ||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/odbc_config $(1)/host/bin | ||
$(INSTALL_DIR) $(1)/usr/bin | ||
$(LN) ../../host/bin/odbc_config $(1)/usr/bin | ||
$(INSTALL_DIR) $(1)/usr/include | ||
$(CP) $(PKG_INSTALL_DIR)/$(STAGING_DIR)/usr/include/*.h $(1)/usr/include/ | ||
$(INSTALL_DIR) $(1)/usr/lib | ||
|
@@ -126,6 +124,27 @@ define Package/pgsqlodbc/install | |
echo "Driver = /usr/lib/libodbcpsql.so" >> $(1)/etc/odbcinst.ini.d/pgsqlodbc.ini | ||
endef | ||
|
||
define Host/Configure | ||
$(call Host/Configure/Default) | ||
cp $(PKG_BUILD_DIR)/config.h $(HOST_BUILD_DIR) | ||
cp $(PKG_BUILD_DIR)/unixodbc_conf.h $(HOST_BUILD_DIR) | ||
endef | ||
|
||
define Host/Compile | ||
$(MAKE) -C $(HOST_BUILD_DIR)/exe \ | ||
DESTDIR="$(HOST_INSTALL_DIR)" \ | ||
CC="$(HOSTCC)" \ | ||
CFLAGS="$(HOST_CFLAGS) -DUSE_UNIXODBC_CONF_H" \ | ||
LDFLAGS="$(HOST_LDFLAGS)" \ | ||
odbc_config | ||
endef | ||
|
||
define Host/Install | ||
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin | ||
$(CP) $(HOST_BUILD_DIR)/exe/odbc_config $(STAGING_DIR_HOST)/bin | ||
endef | ||
|
||
$(eval $(call BuildPackage,unixodbc)) | ||
$(eval $(call BuildPackage,unixodbc-tools)) | ||
$(eval $(call BuildPackage,pgsqlodbc)) | ||
$(eval $(call HostBuild)) |