Blame SOURCES/0080-libparted-labels-link-with-libiconv-if-needed.patch

003ee8
From 8bec8bcc639cfc7ed0ca7cd3a5321513aa4348fd Mon Sep 17 00:00:00 2001
003ee8
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
003ee8
Date: Sun, 5 Nov 2017 23:33:37 +0100
003ee8
Subject: [PATCH 80/81] libparted/labels: link with libiconv if needed
003ee8
003ee8
gpt.c uses iconv so it should link with it. Otherwise, on platforms
003ee8
where libiconv is a separate library, we get a link failure of parted:
003ee8
003ee8
    CCLD     parted
003ee8
  ../libparted/.libs/libparted.so: undefined reference to `libiconv'
003ee8
  ../libparted/.libs/libparted.so: undefined reference to `libiconv_open'
003ee8
  ../libparted/.libs/libparted.so: undefined reference to `libiconv_close'
003ee8
003ee8
Since iconv functionality is needed unconditionally (not only when
003ee8
gettext is enabled), AM_ICONV needs to be added to configure.ac.
003ee8
003ee8
(cherry picked from commit 571293e3f9ee45f37867578899c6a8a9cd35afd4)
003ee8
---
003ee8
 configure.ac                 | 2 ++
003ee8
 libparted/labels/Makefile.am | 2 +-
003ee8
 2 files changed, 3 insertions(+), 1 deletion(-)
003ee8
003ee8
diff --git a/configure.ac b/configure.ac
003ee8
index 3d57157..5251dfb 100644
003ee8
--- a/configure.ac
003ee8
+++ b/configure.ac
003ee8
@@ -288,6 +288,8 @@ fi
003ee8
 AC_PROG_LIBTOOL
003ee8
 LT_INIT
003ee8
 
003ee8
+AM_ICONV
003ee8
+
003ee8
 AM_GNU_GETTEXT_VERSION([0.18])
003ee8
 AM_GNU_GETTEXT([external])
003ee8
 if test "$USE_INCLUDED_LIBINTL" = "yes"; then
003ee8
diff --git a/libparted/labels/Makefile.am b/libparted/labels/Makefile.am
003ee8
index 3327c8c..db612d1 100644
003ee8
--- a/libparted/labels/Makefile.am
003ee8
+++ b/libparted/labels/Makefile.am
003ee8
@@ -36,7 +36,7 @@ liblabels_la_SOURCES = \
003ee8
   rdb.c		\
003ee8
   sun.c
003ee8
 
003ee8
-liblabels_la_LIBADD = $(OS_LIBS) $(INTLLIBS)
003ee8
+liblabels_la_LIBADD = $(OS_LIBS) $(INTLLIBS) $(LIBICONV)
003ee8
 
003ee8
 AM_CPPFLAGS = $(partedincludedir) $(INTLINCS)
003ee8
 
003ee8
-- 
003ee8
2.13.6
003ee8