diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-07-01 17:19:21 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-07-01 17:19:21 +0000 |
commit | 3f4e478abd01aea8e42c23fbc385e92ed181e6fc (patch) | |
tree | d53666869a744e982acdb089f71be90d70d258c9 /sys-apps/util-linux/files | |
parent | Version bump wrt bug #325481 by Nicolas Kaiser <nikai@nikai.net> (diff) | |
download | gentoo-2-3f4e478abd01aea8e42c23fbc385e92ed181e6fc.tar.gz gentoo-2-3f4e478abd01aea8e42c23fbc385e92ed181e6fc.tar.bz2 gentoo-2-3f4e478abd01aea8e42c23fbc385e92ed181e6fc.zip |
Add fix from upstream for building with slang #326373 by Mikael Magnusson.
Diffstat (limited to 'sys-apps/util-linux/files')
-rw-r--r-- | sys-apps/util-linux/files/util-linux-2.18-slang.patch | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/sys-apps/util-linux/files/util-linux-2.18-slang.patch b/sys-apps/util-linux/files/util-linux-2.18-slang.patch new file mode 100644 index 000000000000..efbe9d79afa9 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.18-slang.patch @@ -0,0 +1,86 @@ +http://bugs.gentoo.org/326373 + +From 541e6934e1fe6833b125c1c64f9a1108bc3d09fa Mon Sep 17 00:00:00 2001 +From: Karel Zak <kzak@redhat.com> +Date: Thu, 1 Jul 2010 10:56:41 +0200 +Subject: [PATCH] cfdisk: fix --with-slang + +Signed-off-by: Karel Zak <kzak@redhat.com> +--- + fdisk/Makefile.am | 2 +- + fdisk/cfdisk.c | 11 ++++++++++- + 2 files changed, 11 insertions(+), 2 deletions(-) + +--- a/fdisk/Makefile.in ++++ b/fdisk/Makefile.in +@@ -88,8 +88,7 @@ + @ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@HAVE_NCURSES_TRUE@@USE_SLANG_FALSE@am_cfdisk_OBJECTS = cfdisk-cfdisk.$(OBJEXT) \ + @ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@HAVE_NCURSES_TRUE@@USE_SLANG_FALSE@ $(am__objects_2) + @ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@USE_SLANG_TRUE@am_cfdisk_OBJECTS = cfdisk-cfdisk.$(OBJEXT) \ +-@ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@USE_SLANG_TRUE@ $(am__objects_2) \ +-@ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@USE_SLANG_TRUE@ cfdisk-mbsalign.$(OBJEXT) ++@ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@USE_SLANG_TRUE@ $(am__objects_2) + cfdisk_OBJECTS = $(am_cfdisk_OBJECTS) + @ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@HAVE_NCURSES_TRUE@@USE_SLANG_FALSE@cfdisk_DEPENDENCIES = $(ldadd_blkid) + @ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@USE_SLANG_TRUE@cfdisk_DEPENDENCIES = $(ldadd_blkid) +@@ -443,7 +444,7 @@ + @ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@HAVE_STATIC_SFDISK_TRUE@sfdisk_static_SOURCES = $(sfdisk_SOURCES) + @ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@HAVE_STATIC_SFDISK_TRUE@sfdisk_static_LDFLAGS = -all-static + @ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@HAVE_NCURSES_TRUE@@USE_SLANG_FALSE@cfdisk_SOURCES = cfdisk.c $(fdisk_common) +-@ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@USE_SLANG_TRUE@cfdisk_SOURCES = cfdisk.c $(fdisk_common) $(top_srcdir)/lib/mbsalign.c ++@ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@USE_SLANG_TRUE@cfdisk_SOURCES = cfdisk.c $(fdisk_common) + @ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@HAVE_NCURSES_TRUE@@USE_SLANG_FALSE@cfdisk_CFLAGS = $(cflags_blkid) + @ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@USE_SLANG_TRUE@cfdisk_CFLAGS = $(cflags_blkid) + @ARCH_M68K_FALSE@@ARCH_SPARC_FALSE@@HAVE_NCURSES_TRUE@@USE_SLANG_FALSE@cfdisk_LDADD = @NCURSES_LIBS@ $(ldadd_blkid) +diff --git a/fdisk/Makefile.am b/fdisk/Makefile.am +index 9a9db0c..36871f3 100644 +--- a/fdisk/Makefile.am ++++ b/fdisk/Makefile.am +@@ -54,7 +54,7 @@ endif + if USE_SLANG + sbin_PROGRAMS += cfdisk + dist_man_MANS += cfdisk.8 +-cfdisk_SOURCES = cfdisk.c $(fdisk_common) $(top_srcdir)/lib/mbsalign.c ++cfdisk_SOURCES = cfdisk.c $(fdisk_common) + cfdisk_CFLAGS = $(cflags_blkid) + cfdisk_LDADD = -lslang $(ldadd_blkid) + else +diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c +index 30550c0..552858b 100644 +--- a/fdisk/cfdisk.c ++++ b/fdisk/cfdisk.c +@@ -64,6 +64,13 @@ + #include <errno.h> + #include <getopt.h> + #include <fcntl.h> ++ ++#ifdef HAVE_SLANG_H ++#include <slang.h> ++#elif defined(HAVE_SLANG_SLANG_H) ++#include <slang/slang.h> ++#endif ++ + #ifdef HAVE_SLCURSES_H + #include <slcurses.h> + #elif defined(HAVE_SLANG_SLCURSES_H) +@@ -73,6 +80,7 @@ + #elif defined(HAVE_NCURSES_NCURSES_H) + #include <ncurses/ncurses.h> + #endif ++ + #include <signal.h> + #include <math.h> + #include <string.h> +@@ -431,7 +439,8 @@ get_string(char *str, int len, char *def) { + + refresh(); + +-#if defined(HAVE_LIBNCURSESW) && defined(HAVE_WIDECHAR) ++#if !defined(HAVE_SLCURSES_H) && !defined(HAVE_SLANG_SLCURSES_H) && \ ++ defined(HAVE_LIBNCURSESW) && defined(HAVE_WIDECHAR) + while ((key = get_wch(&c)) != ERR && + c != '\r' && c != '\n' && c != KEY_ENTER) { + #else +-- +1.7.1 + |