app-text/pinfo: fix build w/newer glibc & ncurses
authorMike Frysinger <vapier@gentoo.org>
Wed, 12 Aug 2015 15:03:06 +0000 (11:03 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 12 Aug 2015 15:03:40 +0000 (11:03 -0400)
app-text/pinfo/files/pinfo-0.6.10-libc-basename.patch [new file with mode: 0644]
app-text/pinfo/files/pinfo-0.6.10-ncurses-check.patch [new file with mode: 0644]
app-text/pinfo/pinfo-0.6.10-r5.ebuild

diff --git a/app-text/pinfo/files/pinfo-0.6.10-libc-basename.patch b/app-text/pinfo/files/pinfo-0.6.10-libc-basename.patch
new file mode 100644 (file)
index 0000000..6e9d495
--- /dev/null
@@ -0,0 +1,33 @@
+do not redefine the basename that the C library provides
+
+--- a/src/filehandling_functions.c
++++ b/src/filehandling_functions.c
+@@ -31,7 +31,6 @@ typedef struct
+ }
+ Suffixes;
+-char * basename(char *filename);
+ /******************************************************************************
+@@ -713,20 +712,6 @@ opendirfile(int number)
+       return NULL;
+ }
+-char *
+-basename(char *filename)
+-{
+-      int len = strlen(filename);
+-      char *a = filename + len;
+-      while (a > filename)
+-      {
+-              a--;
+-              if (*a == '/')
+-                      return a + 1;
+-      }
+-      return filename;                /* when it was a basename */
+-}
+-
+ /*
+  * Note: openinfo is a function for reading info files, and putting
+  * uncompressed content into a temporary filename.  For a flexibility, there
diff --git a/app-text/pinfo/files/pinfo-0.6.10-ncurses-check.patch b/app-text/pinfo/files/pinfo-0.6.10-ncurses-check.patch
new file mode 100644 (file)
index 0000000..a5f14c5
--- /dev/null
@@ -0,0 +1,14 @@
+curses_wchar is set to true/false, so trying to assign it to the compiler
+flags variable makes no sense.  it's already been set up the right value
+at this point, so delete the assignment.
+
+--- a/macros/curses.m4
++++ b/macros/curses.m4
+@@ -130,7 +130,6 @@ AC_DEFUN([AC_CHECK_CURSES],[
+               else
+                       AC_DEFINE(CURSES_WCHAR)
+                       CURSES_WCHAR=true
+-                      CURSES_FLAGS=$curses_wchar
+                       AC_SUBST(CURSES_FLAGS)
+               fi
index 793f3b4ec3a76745fd56f99b5d01862f41788768..f16ddb0599534218e6e2d6743bb550b5335fd009 100644 (file)
@@ -36,11 +36,13 @@ src_prepare() {
                "${FILESDIR}"/${PN}-0.6.10-info-suffix.patch \
                "${FILESDIR}"/${PN}-0.6.10-dir-file.patch \
                "${FILESDIR}"/${PN}-0.6.10-tinfo.patch \
-               "${FILESDIR}"/${PN}-0.6.10-gettext-0.19.patch
+               "${FILESDIR}"/${PN}-0.6.10-gettext-0.19.patch \
+               "${FILESDIR}"/${PN}-0.6.10-ncurses-check.patch \
+               "${FILESDIR}"/${PN}-0.6.10-libc-basename.patch
 
        eautoreconf
 
-       append-cflags -D_BSD_SOURCE # sbrk()
+       append-cflags -D_BSD_SOURCE -D_DEFAULT_SOURCE # sbrk()
 }
 
 src_configure() {