Re: devel/vte* without gnome-pty-helper

2012-02-23 Thread Landry Breuil
On Thu, Feb 23, 2012 at 06:05:59PM +0100, Martin Pieuchot wrote:
 Diff below adds a new option for the libvte to rely on openpty(3) to
 allocate a pseudo-tty. With it, we no longer need the gnome-pty-helper.
 
 If you use a terminal relying on the libvte, please test this diff and
 report any breakage and/or improvement. Oks are also welcome ;)

Works after some fiddling with xfce4-terminal using devel/vte, i386 
ppc.
Your diff lacks patch-configure_in in devel/vte/patches, and it doesn't
apply (?) in vte3/Makefile.

Landry



Re: devel/vte* without gnome-pty-helper

2012-02-23 Thread Martin Pieuchot
On 23/02/12(Thu) 20:22, Landry Breuil wrote:
 On Thu, Feb 23, 2012 at 06:05:59PM +0100, Martin Pieuchot wrote:
  Diff below adds a new option for the libvte to rely on openpty(3) to
  allocate a pseudo-tty. With it, we no longer need the gnome-pty-helper.
  
  If you use a terminal relying on the libvte, please test this diff and
  report any breakage and/or improvement. Oks are also welcome ;)
 
 Works after some fiddling with xfce4-terminal using devel/vte, i386 
 ppc.
 Your diff lacks patch-configure_in in devel/vte/patches, and it doesn't
 apply (?) in vte3/Makefile.

Here's a new diff that should fix that. Thanks for spotting it.

Martin


Index: vte/Makefile
===
RCS file: /cvs/ports/devel/vte/Makefile,v
retrieving revision 1.95
diff -u -p -r1.95 Makefile
--- vte/Makefile6 Feb 2012 22:07:09 -   1.95
+++ vte/Makefile23 Feb 2012 19:38:17 -
@@ -14,7 +14,7 @@ SHARED_LIBS+= vte 14.1# 2609.0
 FULLPKGNAME-main=  vte-${GNOME_VERSION}
 FULLPKGNAME-python=py-${DISTNAME}
 
-REVISION-main =5
+REVISION-main =6
 REVISION-python =  3
 
 CATEGORIES=devel
@@ -39,7 +39,7 @@ WANTLIB += Xi Xinerama Xrandr Xrender Xx
 WANTLIB += expat ffi fontconfig freetype gdk_pixbuf-2.0 gio-2.0
 WANTLIB += glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0 m ncurses
 WANTLIB += pango-1.0 pangocairo-1.0 pangoft2-1.0 pcre pixman-1
-WANTLIB += png pthread-stubs xcb xcb-render xcb-shm z
+WANTLIB += png pthread-stubs stdc++ util xcb xcb-render xcb-shm z
 
 
 MODPY_RUNDEP=  No
@@ -63,8 +63,13 @@ CONFIGURE_ARGS+= --enable-python
 
 MODGNOME_TOOLS=goi
 
-CONFIGURE_STYLE=   gnu
+AUTOCONF_VERSION=  2.68
+AUTOMAKE_VERSION=  1.11
+
+CONFIGURE_STYLE=   autoconf
 CONFIGURE_ARGS+=   --disable-Bsymbolic \
+   --disable-gnome-pty-helper \
+   --enable-bsd-pty \
--with-gtk=2.0 \
--program-suffix=2
 
Index: vte/patches/patch-configure_in
===
RCS file: vte/patches/patch-configure_in
diff -N vte/patches/patch-configure_in
--- /dev/null   1 Jan 1970 00:00:00 -
+++ vte/patches/patch-configure_in  23 Feb 2012 19:33:56 -
@@ -0,0 +1,51 @@
+$OpenBSD$
+
+Support for the openpty(3) backend.
+
+--- configure.in
 configure.in
+@@ -313,7 +313,7 @@ AC_SUBST(VTE_DEFAULT_EMULATION)
+ AM_CONDITIONAL(VTE_DEFAULT_EMULATION, [test $emulation != xterm])
+ 
+ # Check for headers.
+-AC_CHECK_HEADERS(sys/select.h sys/syslimits.h sys/termios.h sys/un.h 
sys/wait.h stropts.h termios.h wchar.h)
++AC_CHECK_HEADERS(sys/select.h sys/syslimits.h sys/termios.h sys/un.h 
sys/wait.h stropts.h termios.h util.h wchar.h)
+ AC_HEADER_TIOCGWINSZ
+ 
+ # Check for PTY handling functions.
+@@ -324,6 +324,7 @@ AC_CHECK_FUNCS([cfmakeraw fork setsid setpgid getpgid 
getpt grantpt unlockpt pts
+ 
AC_CHECK_FUNC(socket,[have_socket=1],AC_CHECK_LIB(socket,socket,[have_socket=1; 
LIBS=$LIBS -lsocket]))
+ 
AC_CHECK_FUNC(socketpair,[have_socketpair=1],AC_CHECK_LIB(socket,socketpair,[have_socketpair=1;
 LIBS=$LIBS -lsocket]))
+ 
AC_CHECK_FUNC(recvmsg,[have_recvmsg=1],AC_CHECK_LIB(socket,recvmsg,[have_recvmsg=1;
 LIBS=$LIBS -lsocket -lnsl]))
++AC_CHECK_FUNC(openpty,[have_openpty=1],AC_CHECK_LIB(util,openpty,[have_openpty=1;
 LIBS=$LIBS -lutil]))
+ if test x$have_socket = x1 ; then
+   AC_DEFINE(HAVE_SOCKET,1,[Define if you have the socket function.])
+ fi
+@@ -333,6 +334,9 @@ fi
+ if test x$have_recvmsg = x1 ; then
+   AC_DEFINE(HAVE_RECVMSG,1,[Define if you have the recvmsg function.])
+ fi
++if test x$have_openpty = x1 ; then
++  AC_DEFINE(HAVE_OPENPTY,1,[Define if you have the openpty function.])
++fi
+ AC_CHECK_FUNC(floor,,AC_CHECK_LIB(m,floor,LIBS=[$LIBS -lm]))
+ AC_CHECK_FUNCS([ceil floor])
+ 
+@@ -423,6 +427,17 @@ fi
+ AM_CONDITIONAL(BUILD_GNOME_PTY_HELPER,[test $enable_gnome_pty_helper != no])
+ 
+ 

++# BSD PTY
++
++
++AC_ARG_ENABLE(bsd-pty, [AS_HELP_STRING(--enable-bsd-pty,Support bsd rather 
than unix98 ptys [default=no])], enable_bsd_pty=$enableval, 
enable_bsd_pty=yes)
++if test $enable_bsd_pty != no; then
++  AC_DEFINE(VTE_USE_BSD_PTY,1,[Define if you intend to use bsd-pty.])
++  AC_CONFIG_SUBDIRS(bsd-pty)
++fi
++AM_CONDITIONAL(BUILD_BSD_PTY,[test $enable_bsd_pty != no])
++
++
+ # Glade catalogue
+ 

+ 
Index: vte/patches/patch-gnome-pty-helper_Makefile_in
===
RCS file: vte/patches/patch-gnome-pty-helper_Makefile_in
diff -N 

Re: devel/vte* without gnome-pty-helper

2012-02-23 Thread Landry Breuil
On Thu, Feb 23, 2012 at 08:43:12PM +0100, Martin Pieuchot wrote:
 On 23/02/12(Thu) 20:22, Landry Breuil wrote:
  On Thu, Feb 23, 2012 at 06:05:59PM +0100, Martin Pieuchot wrote:
   Diff below adds a new option for the libvte to rely on openpty(3) to
   allocate a pseudo-tty. With it, we no longer need the gnome-pty-helper.
   
   If you use a terminal relying on the libvte, please test this diff and
   report any breakage and/or improvement. Oks are also welcome ;)
  
  Works after some fiddling with xfce4-terminal using devel/vte, i386 
  ppc.
  Your diff lacks patch-configure_in in devel/vte/patches, and it doesn't
  apply (?) in vte3/Makefile.
 
 Here's a new diff that should fix that. Thanks for spotting it.

Definitely ok for me, and thanks for working on this :)

Landry