summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorleot <leot@pkgsrc.org>2018-09-18 14:17:26 +0000
committerleot <leot@pkgsrc.org>2018-09-18 14:17:26 +0000
commit9526733646ae7ec42e48fa1db456c012dfe7156f (patch)
tree70567386b99774b82dde4ded93a50f013ea91998 /misc
parent055e390301f1941b9a38612e854c4635d08098ac (diff)
downloadpkgsrc-9526733646ae7ec42e48fa1db456c012dfe7156f.tar.gz
rlwrap: Properly include <util.h> for openpty(3)
Previously on NetBSD and probably other system that has openpty(3) in util.h the compilation lead to a: ptytty.c: In function 'ptytty_get_pty': ptytty.c:72:7: warning: implicit declaration of function 'openpty' [-Wimplicit-function-declaration] if (openpty(&pfd, fd_tty, tty_name, NULL, NULL) != -1) { ^~~~~~~ due a missing <util.h> inclusion. Add a patch for configure.ac (and auto* tools to USE_TOOLS) in order to address that. Originally reported by Matthew Mondor via PR pkg/46190 and thanks to Matthew and <wiz> for their analysis!
Diffstat (limited to 'misc')
-rw-r--r--misc/rlwrap/Makefile6
-rw-r--r--misc/rlwrap/distinfo3
-rw-r--r--misc/rlwrap/patches/patch-configure.ac19
3 files changed, 26 insertions, 2 deletions
diff --git a/misc/rlwrap/Makefile b/misc/rlwrap/Makefile
index 0b1d32148c3..db16ce608e7 100644
--- a/misc/rlwrap/Makefile
+++ b/misc/rlwrap/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2018/08/22 09:45:46 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2018/09/18 14:17:26 leot Exp $
#
DISTNAME= rlwrap-0.43
@@ -14,6 +14,7 @@ LICENSE= gnu-gpl-v2
GNU_CONFIGURE= yes
USE_TOOLS+= gmake perl:run
+USE_TOOLS+= autoreconf autoconf automake
REPLACE_PERL+= filters/censor_passwords
REPLACE_PERL+= filters/count_in_prompt
@@ -37,6 +38,9 @@ PYTHON_VERSIONS_INCOMPATIBLE= 27
TEST_TARGET= check
+pre-configure:
+ cd ${WRKSRC} && autoreconf -fi
+
.include "options.mk"
BUILDLINK_API_DEPENDS.readline+=readline>=4.2
diff --git a/misc/rlwrap/distinfo b/misc/rlwrap/distinfo
index 1c4cd597508..d5e4256725f 100644
--- a/misc/rlwrap/distinfo
+++ b/misc/rlwrap/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.6 2017/04/10 20:30:15 leot Exp $
+$NetBSD: distinfo,v 1.7 2018/09/18 14:17:26 leot Exp $
SHA1 (rlwrap-0.43.tar.gz) = 0c0a3a6012a003d4ae3a44e9f82f9090b4ac4650
RMD160 (rlwrap-0.43.tar.gz) = 8c122eb2acb8963132be744aae0f6d416169877e
SHA512 (rlwrap-0.43.tar.gz) = 4a1440b2eef3a1664c6381eb09c19f4030de2c0ef4f1f3509f7d6e130d3c5e9c3ceb00fc6ea6052b22bbe1f6b162f72e0b47564df34ccecc5220f195c22e86a1
Size (rlwrap-0.43.tar.gz) = 313139 bytes
+SHA1 (patch-configure.ac) = b5550f832f276388efa1544ac4f860c338747e2c
diff --git a/misc/rlwrap/patches/patch-configure.ac b/misc/rlwrap/patches/patch-configure.ac
new file mode 100644
index 00000000000..641e9a401f7
--- /dev/null
+++ b/misc/rlwrap/patches/patch-configure.ac
@@ -0,0 +1,19 @@
+$NetBSD: patch-configure.ac,v 1.1 2018/09/18 14:17:26 leot Exp $
+
+Really check for <util.h> needed by openpty(3) at least on NetBSD.
+
+Please note that src/rlwrap.h already checked for HAVE_UTIL_H in
+src/rlwrap.h but actually HAVE_UTIL_H was never defined because
+util.h was not added to the AC_CHECK_HEADERS().
+
+--- configure.ac.orig 2017-03-03 09:41:58.000000000 +0000
++++ configure.ac
+@@ -102,7 +102,7 @@ AC_CHECK_PROG(STRIP,strip,strip,true)
+ # Checks for header files.
+ AC_HEADER_STDC
+ AC_HEADER_SYS_WAIT
+-AC_CHECK_HEADERS([errno.h fcntl.h libgen.h libutil.h stdlib.h string.h sched.h sys/ioctl.h sys/wait.h sys/resource.h stddef.h ])
++AC_CHECK_HEADERS([errno.h fcntl.h libgen.h libutil.h util.h stdlib.h string.h sched.h sys/ioctl.h sys/wait.h sys/resource.h stddef.h ])
+ AC_CHECK_HEADERS([termios.h unistd.h stdint.h time.h getopt.h regex.h curses.h termcap.h ])
+
+ AC_CHECK_HEADERS([ term.h ncurses/term.h], , ,