python-mysql: fix uclibc build failure 6419/head
authorSebastian Kemper <sebastian_ml@gmx.net>
Sun, 8 Jul 2018 08:43:02 +0000 (10:43 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Sun, 8 Jul 2018 08:44:29 +0000 (10:44 +0200)
libmariadb 10.2.x needs to be linked in together with iconv. On uclibc
iconv is not included in libc and libiconv-full needs to be used. This
commit helps python-mysql find the shared library.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
lang/python/python-mysql/Makefile

index 607ba914f8f896f015621abc8414df49c3d89127..09fd2420c1770797e3db6d203d6848b4eb94d8f3 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-mysql
 PKG_VERSION:=1.3.12
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-2.0
 
 PKG_SOURCE:=mysqlclient-$(PKG_VERSION).tar.gz
@@ -24,6 +24,14 @@ include ../python3-package.mk
 
 PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
 
+# Help python-mysql find libiconv.so when using uClibc.
+ifneq ($(CONFIG_USE_UCLIBC),)
+TARGET_CPPFLAGS+= \
+       -I$(STAGING_DIR)/usr/lib/libiconv-full/include
+TARGET_LDFLAGS += \
+       -L$(STAGING_DIR)/usr/lib/libiconv-full/lib
+endif
+
 define Package/python-mysql/Default
   SUBMENU:=Python
   SECTION:=lang