In message <[email protected]>, Jonathan 
Chen wr
ites:
> On 1/01/24 19:06, Jonathan Chen wrote:
> > Hi,
> > 
> > I'm running a somewhat recent stable-14/amd64 (refreshed 27-Dec-2023), 
> > and I wonder if someone can explain what is happening...
> > 
> > I've got a dev-host which I use as a repo-builder. I have discovered 
> > that if I have linux_enable="YES" on the repo-builder, the resultant 
> > executable from the sysutils/screen package produced will only behave as 
> > expected on other hosts that also have linux_enable="YES". On hosts 
> > where linux_enable is *not* defined (ie linux_enable="NO"), `screen' 
> > will start up and then immediatly quit. There are no core-dumps, or any 
> > other noticeable error-messages.
> > 
> > If I set linux_enable="NO" on the repo-builder, the executable from the 
> > sysutils/screen package produced will work as expected on _all_ hosts, 
> > ie linux_enable=YES|NO.
>
> After an interesting inspection with ktrace and a look-thru' of 
> rc.d/linux, I've managed track the cause of this to pty.ko. This module 
> is loaded with linux_enable=YES, and interferes with the screen package 
> build. With pty.ko loaded, the screen executable generated will expect 
> old style pseudo-terminal names; which is not what is available on a 
> standard STABLE-14 host.
>
> When pty.ko is _not_ loaded, the screen executable generated will work 
> on hosts with linux_enable=YES|NO.
>
> I don't know whether the FreeBSD package builders will be affected, but 
> this factoid will be useful for the archives.
>
> Cheers.
> -- 
> Jonathan Chen <[email protected]>

Can you give the attached patch a try?


diff --git a/sysutils/screen/Makefile b/sysutils/screen/Makefile
index 0ca99d2f6c9a..fe7f443fb75e 100644
--- a/sysutils/screen/Makefile
+++ b/sysutils/screen/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=      screen
 PORTVERSION=   4.9.1
+PORTREVISION=  1
 CATEGORIES=    sysutils
 MASTER_SITES=  GNU \
                ftp://ftp.gnu.org/gnu/screen/ \
diff --git a/sysutils/screen/files/patch-configure.ac 
b/sysutils/screen/files/patch-configure.ac
index 77608dbebb05..9ca352d08b0a 100644
--- a/sysutils/screen/files/patch-configure.ac
+++ b/sysutils/screen/files/patch-configure.ac
@@ -1,5 +1,5 @@
 --- configure.ac.orig  2023-08-15 17:29:26.000000000 -0700
-+++ configure.ac       2023-08-19 07:32:42.246552000 -0700
++++ configure.ac       2024-01-02 15:13:06.080297000 -0800
 @@ -669,7 +669,7 @@
      tgetent((char *)0, (char *)0);
  ],,
@@ -9,7 +9,40 @@
  AC_CHECKING(libcurses)
  AC_TRY_LINK([
      #include <curses.h>
-@@ -900,11 +900,11 @@
+@@ -777,32 +777,6 @@
+ [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
+ fi
+ 
+-if test "$cross_compiling" = no ; then
+-AC_CHECKING(for ptyranges)
+-if test -d /dev/ptym ; then
+-pdir='/dev/ptym'
+-else
+-pdir='/dev'
+-fi
+-dnl SCO uses ptyp%d
+-AC_EGREP_CPP(YES_IS_DEFINED,
+-[#ifdef M_UNIX
+-   YES_IS_DEFINED;
+-#endif
+-], ptys=`echo /dev/ptyp??`, ptys=`echo $pdir/pty??`)
+-dnl if test -c /dev/ptyp19; then
+-dnl ptys=`echo /dev/ptyp??`
+-dnl else
+-dnl ptys=`echo $pdir/pty??`
+-dnl fi
+-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'`
+-AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
+-AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
+-fi
+-fi
+-
+ dnl    ****  pty mode/group handling ****
+ dnl
+ dnl support provided by Luke Mewburn <[email protected]>, 931222
+@@ -900,11 +874,11 @@
  dnl
  dnl    ****  utmp handling  ****
  dnl
@@ -23,7 +56,7 @@
      #include <utmpx.h>
  #define utmp utmpx
  #else
-@@ -917,11 +917,11 @@
+@@ -917,11 +891,11 @@
  [int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], 
AC_DEFINE(GETUTENT),
  olibs="$LIBS"
  LIBS="$LIBS -lgen"
@@ -37,7 +70,7 @@
      #include <utmpx.h>
  #define utmp utmpx
  #else
-@@ -931,13 +931,13 @@
+@@ -931,13 +905,13 @@
  #define pututline _pututline
  #endif
  ],
Cheers,
Cy Schubert <[email protected]>
FreeBSD UNIX:  <[email protected]>   Web:  https://FreeBSD.org
NTP:           <[email protected]>    Web:  https://nwtime.org

                        e^(i*pi)+1=0

Reply via email to