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

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