summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2019-06-20 15:21:15 -0700
committerRosen Penev <rosenp@gmail.com>2019-06-20 15:24:41 -0700
commitfbfe49d7ffeae87e3d6538ab49cd7dea3b887142 (patch)
treed2699b82d7d43c0b77ba63b85696a2d075f805e4 /utils
parent274b111782c1d7650ae244a16e141e39d339af32 (diff)
dosfsutils: Properly fix iconv linking
Necessary when using libiconv. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/dosfstools/Makefile4
-rw-r--r--utils/dosfstools/patches/0002-Switch-to-AC_CHECK_LIB-for-iconv-library-linking.patch27
-rw-r--r--utils/dosfstools/patches/010-iconv.patch26
3 files changed, 27 insertions, 30 deletions
diff --git a/utils/dosfstools/Makefile b/utils/dosfstools/Makefile
index 0fc31c772..39f6a8bc7 100644
--- a/utils/dosfstools/Makefile
+++ b/utils/dosfstools/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dosfstools
PKG_VERSION:=4.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/dosfstools/dosfstools/releases/download/v$(PKG_VERSION)/ \
@@ -42,8 +42,6 @@ define Package/dosfstools/description
The dosfstools package includes the mkfs.fat and fsck.fat utilities, which respectively make and check MS-DOS FAT filesystems.
endef
-TARGET_LDFLAGS += $(if $(ICONV_FULL),-liconv)
-
define Package/dosfstools/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fatlabel $(1)/usr/sbin/
diff --git a/utils/dosfstools/patches/0002-Switch-to-AC_CHECK_LIB-for-iconv-library-linking.patch b/utils/dosfstools/patches/0002-Switch-to-AC_CHECK_LIB-for-iconv-library-linking.patch
deleted file mode 100644
index ea9332082..000000000
--- a/utils/dosfstools/patches/0002-Switch-to-AC_CHECK_LIB-for-iconv-library-linking.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 1c6c135ee15e449c1bf2e76d5307f83a3a1d7425 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
-Date: Tue, 11 Oct 2016 12:07:48 +0200
-Subject: [PATCH] Switch to AC_CHECK_LIB for iconv library linking.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-AC_SEARCH_LIB doesn't work properly for openwrt/lede when building dosfstools
-as a package.
-
-Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -59,7 +59,7 @@ if test "x$with_udev" != "xno"; then
- [true])
- fi
-
--AC_SEARCH_LIBS(iconv_open, iconv)
-+AC_CHECK_LIB(iconv, iconv_open)
-
- # xxd (distributed with vim) is used in the testsuite
- AC_CHECK_PROG([XXD_FOUND], [xxd], [yes])
diff --git a/utils/dosfstools/patches/010-iconv.patch b/utils/dosfstools/patches/010-iconv.patch
new file mode 100644
index 000000000..04d402bf3
--- /dev/null
+++ b/utils/dosfstools/patches/010-iconv.patch
@@ -0,0 +1,26 @@
+From e18bcc65d5772e518c6496b439bad8a986f7e434 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Thu, 20 Jun 2019 15:18:19 -0700
+Subject: [PATCH] configure: Fix iconv check for cross compilation
+
+AC_CHECK_LIB is more friendly towards cross-compilation.
+
+Added check for libiconv_open as that can be used when the libc lacks iconv.
+---
+ configure.ac | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 07e8703..1b09964 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -75,7 +75,8 @@ if test "x$with_udev" != "xno"; then
+ [true])
+ fi
+
+-AC_SEARCH_LIBS(iconv_open, iconv)
++AC_CHECK_LIB(iconv, iconv_open)
++AC_CHECK_LIB(iconv, libiconv_open)
+
+ # xxd (distributed with vim) is used in the testsuite
+ AC_CHECK_PROG([XXD_FOUND], [xxd], [yes])