[source] tools: improve and simplify dosfstools

LEDE Commits lede-commits at lists.infradead.org
Wed Oct 12 02:59:34 PDT 2016


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/4bbc6fb7b7e78496bf08f0d3a80c0e8f15bfe244

commit 4bbc6fb7b7e78496bf08f0d3a80c0e8f15bfe244
Author: Álvaro Fernández Rojas <noltari at gmail.com>
AuthorDate: Tue Oct 11 14:46:15 2016 +0200

    tools: improve and simplify dosfstools
    
    - use default host install and clean.
    - backport compatibility patch for OS X and LEDE (avoids having to force iconv
    for OS X).
    - use default HOST_BUILD_DIR.
    
    Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
 tools/dosfstools/Makefile                          | 11 ---------
 ...to-AC_CHECK_LIB-for-iconv-library-linking.patch | 27 ++++++++++++++++++++++
 2 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/tools/dosfstools/Makefile b/tools/dosfstools/Makefile
index c87d800..86589e6 100644
--- a/tools/dosfstools/Makefile
+++ b/tools/dosfstools/Makefile
@@ -15,21 +15,10 @@ PKG_SOURCE_URL:=https://github.com/dosfstools/dosfstools/releases/download/v$(PK
 		http://fossies.org/linux/misc
 PKG_MD5SUM:=9037738953559d1efe04fc5408b6846216cc0138f7f9d32de80b6ec3c35e7daf
 
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
-
 include $(INCLUDE_DIR)/host-build.mk
 
 ifeq ($(HOST_OS),Darwin)
 HOST_CFLAGS += -UHAVE_ENDIAN_H
-LDLIBS += -liconv
 endif
 
-define Host/Install
-	$(INSTALL_BIN) $(HOST_BUILD_DIR)/src/mkfs.fat $(STAGING_DIR_HOST)/bin/
-endef
-
-define Host/Clean
-	rm -f $(STAGING_DIR_HOST)/bin/mk{dosfs,fs.fat}
-endef
-
 $(eval $(call HostBuild))
diff --git a/tools/dosfstools/patches/0002-Switch-to-AC_CHECK_LIB-for-iconv-library-linking.patch b/tools/dosfstools/patches/0002-Switch-to-AC_CHECK_LIB-for-iconv-library-linking.patch
new file mode 100644
index 0000000..72a932d
--- /dev/null
+++ b/tools/dosfstools/patches/0002-Switch-to-AC_CHECK_LIB-for-iconv-library-linking.patch
@@ -0,0 +1,27 @@
+From 1c6c135ee15e449c1bf2e76d5307f83a3a1d7425 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari at 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 at 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)
+ 
+ AC_CONFIG_FILES([Makefile src/Makefile src/version.h
+ 		 manpages/Makefile manpages/mkfs.fat.8



More information about the lede-commits mailing list