ports/sysutils/screen/files/patch-configure
Cy Schubert 2fd1af8b15 Correctly identify utmpx support in FreeBSD.
- FreeBSD's utmpx is incorrectly identified in ./configure.
- Because of the falsely identified utmpx support in the ./configure
  script, a previously applied patch, which didn't work, is no longer
  needed.

PR:		241530
Reported by:	Henry David Bartholomew <PopularMoment@protonmail.com>
		Daniel Drinnon <ddrinnon@cdor.net>
2019-10-29 04:23:50 +00:00

162 lines
3.9 KiB
Text

--- configure.orig 2019-10-01 15:27:14.000000000 -0700
+++ configure 2019-10-27 23:29:24.744163000 -0700
@@ -4756,63 +4756,6 @@
else
olibs="$LIBS"
-LIBS="-lcurses $olibs"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking libcurses..." >&5
-$as_echo "$as_me: checking libcurses..." >&6;}
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
-#ifdef __hpux
-__sorry_hpux_libcurses_is_totally_broken_in_10_10();
-#else
-tgetent((char *)0, (char *)0);
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-else
- LIBS="-ltermcap $olibs"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking libtermcap..." >&5
-$as_echo "$as_me: checking libtermcap..." >&6;}
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-tgetent((char *)0, (char *)0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-else
- LIBS="-ltermlib $olibs"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking libtermlib..." >&5
-$as_echo "$as_me: checking libtermlib..." >&6;}
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-tgetent((char *)0, (char *)0);
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-else
LIBS="-lncursesw $olibs"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking libncursesw..." >&5
$as_echo "$as_me: checking libncursesw..." >&6;}
@@ -4897,15 +4840,6 @@
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
if test "$cross_compiling" = yes; then :
echo "- skipping check because we are cross compiling; assuming terminfo database is used" 1>&6
@@ -4917,7 +4851,8 @@
main()
{
- exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
+ char *tgoto(const char *, int, int);
+ exit(strcmp(tgoto("%d%d", 0, 1), "1") ? 0 : 1);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -4967,7 +4902,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys..." >&5
$as_echo "$as_me: checking for SVR4 ptys..." >&6;}
sysvr4ptys=
-if test -c /dev/ptmx ; then
+if test -c /nonexistent ; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5080,19 +5015,17 @@
fi
rm -f conftest*
-if test "$ptys" != "$pdir/pty??" ; then
-p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
-p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
+# XXX: hardcoded, since port must be devfs and various setups independent
+
cat >>confdefs.h <<_ACEOF
-#define PTYRANGE0 "$p0"
+#define PTYRANGE0 "pqrsPQRSlmnoLMNO"
_ACEOF
cat >>confdefs.h <<_ACEOF
-#define PTYRANGE1 "$p1"
+#define PTYRANGE1 "0123456789abcdefghijklmnopqrstuv"
_ACEOF
fi
-fi
# Check whether --with-pty-mode was given.
@@ -5315,9 +5248,11 @@
#include <time.h> /* to get time_t on SCO */
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#if (defined(SVR4) && !defined(DGUX)) || defined(__FreeBSD_cc_version)
#include <utmpx.h>
#define utmp utmpx
+#define pututline pututxline
+#define getutent getutxent
#else
#include <utmp.h>
#endif
@@ -5346,7 +5281,7 @@
#include <time.h>
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#if (defined(SVR4) && !defined(DGUX)) || defined(__FreeBSD_cc_version)
#include <utmpx.h>
#define utmp utmpx
#else
@@ -5383,9 +5318,13 @@
#include <time.h>
#include <sys/types.h>
-#if defined(SVR4) && !defined(DGUX)
+#if (defined(SVR4) && !defined(DGUX)) || defined(__FreeBSD_cc_version)
#include <utmpx.h>
#define utmp utmpx
+#define pututline pututxline
+#define getutent getutxent
+#define pututline pututxline
+#define getutent getutxent
#else
#include <utmp.h>
#endif