From 5b65fbcc6502caf378f61381e5536ae5e20c72a2 Mon Sep 17 00:00:00 2001 From: Don Rumata Date: Thu, 18 Feb 2016 15:23:11 -0500 Subject: [PATCH] remove unnecessary libiconv dependencies The compiled libaprutil library contains references to libiconv, libiconv_open and libiconv_close functions from the full gettext package even when the full gettext support is disabled (i.e. the CONFIG_BUILD_NLS configuration parameter is not set). The dependency on these ICONV functions breaks compilation of some packages that depend on libaprutil, such as subversion: /usr/lib/libaprutil-1.so: undefined reference to `libiconv' /usr/lib/libaprutil-1.so: undefined reference to `libiconv_open' /usr/lib/libaprutil-1.so: undefined reference to `libiconv_close' Signed-off-by: Don Rumata --- libs/apr-util/Makefile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/libs/apr-util/Makefile b/libs/apr-util/Makefile index ae352f2fd3..97d377c077 100644 --- a/libs/apr-util/Makefile +++ b/libs/apr-util/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2014 OpenWrt.org +# Copyright (C) 2007-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=apr-util PKG_VERSION:=1.5.4 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@APACHE/apr/ @@ -41,16 +41,21 @@ CONFIGURE_ARGS += \ --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \ --with-expat="$(STAGING_DIR)/usr" \ --without-sqlite2 \ - --with-sqlite3="$(STAGING_DIR)/usr" \ - --with-iconv="$(ICONV_PREFIX)" \ + --with-sqlite3="$(STAGING_DIR)/usr" + +ifdef $(CONFIG_BUILD_NLS) + CONFIGURE_ARGS += --with-iconv="$(ICONV_PREFIX)" +else + CONFIGURE_ARGS += --without-iconv +endif CONFIGURE_VARS += \ ac_cv_file_dbd_apr_dbd_mysql_c=no \ ac_cv_path_ODBC_CONFIG= \ - APR_BUILD_DIR="$(STAGING_DIR)/usr/share/build-1" \ + APR_BUILD_DIR="$(STAGING_DIR)/usr/share/build-1" MAKE_FLAGS += \ - APRUTIL_LIBS="-lsqlite3 $(TARGET_LDFLAGS) -lexpat $(if $(ICONV_FULL),-liconv) -lapr-1 -luuid -lm -lcrypt" \ + APRUTIL_LIBS="-lsqlite3 $(TARGET_LDFLAGS) -lexpat $(if $(ICONV_FULL),-liconv) -lapr-1 -luuid -lm -lcrypt" define Build/InstallDev $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include/apr-1/ $(1)/usr/lib $(1)/usr/lib/pkgconfig/