Subject: pkg/29061: x11/mlterm 2.9.1
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <fun@naobsd.org>
List: pkgsrc-bugs
Date: 01/24/2005 14:08:01
>Number:         29061
>Category:       pkg
>Synopsis:       x11/mlterm 2.9.1
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 24 14:08:00 +0000 2005
>Originator:     FUKAUMI Naoki
>Release:        NetBSD 2.99.14
>Organization:
	FUKAUMI Naoki
>Environment:
System: NetBSD tr1.naobsd.org 2.99.14 NetBSD 2.99.14 (TR1) #0: Sun Jan 23 15:06:43 JST 2005 root@tr1.naobsd.org:/usr/obj/i386/sys/arch/i386/compile/TR1 i386
Architecture: i386
Machine: i386
>Description:
	mlterm 2.9.1 is available.
>How-To-Repeat:
	See http://mlterm.sourceforge.net/
>Fix:
	pkgsrc changes:
	- Use gtk2+ instead of gtk+
	- Use Xft2 (via gtk2+) for anti-alias font
	- Use gdk-pixbuf (via gtk2+) for wallpaper
	- Fix kik_pty_streams.c for NetBSD-current with ptm(4)

	XXX patch-aa uses login_tty() in libutil which may not be
	XXX portable. If your OS has /dev/ptmx and both original
	XXX kik_pty_streams.c and patched kik_pty_streams.c don't work,
	XXX see kik_pty_bsd.c::login_tty() and port it to
	XXX kik_pty_streams.c.

	XXX I don't know why kik_pty_*.c is separated and implemented
	XXX differently (with bug?).

Index: Makefile
===================================================================
RCS file: /home/fun/cvsroot/NetBSD/pkgsrc/x11/mlterm/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- Makefile	28 Dec 2004 23:18:17 -0000	1.28
+++ Makefile	1 Jan 2004 04:59:17 -0000
@@ -1,14 +1,9 @@
 # $NetBSD: Makefile,v 1.28 2004/12/28 23:18:17 reed Exp $
 
-DISTNAME=	mlterm-2.8.0
-PKGNAME=	${DISTNAME}pl1
-PKGREVISION=	4
+DISTNAME=	mlterm-2.9.1
 CATEGORIES=	x11
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=mlterm/}
 
-PATCHFILES=	${DISTNAME}pl1.tar.gz
-PATCH_SITES=	${MASTER_SITES}
-
 MAINTAINER=	uebayasi@NetBSD.org
 HOMEPAGE=	http://mlterm.sourceforge.net/
 COMMENT=	Multilingual terminal emulator
@@ -19,32 +14,32 @@
 USE_BUILDLINK3=		yes
 USE_X11=		yes
 USE_LIBTOOL=		yes
-USE_GNU_TOOLS+=		make
 GNU_CONFIGURE=		yes
 
 .include "../../mk/bsd.prefs.mk"
 
-CONFIGURE_ARGS+=	--with-imagelib=imlib
-CONFIGURE_ARGS+=	--enable-anti-alias
+CONFIGURE_ARGS+=	--with-imagelib=gdk-pixbuf
+CONFIGURE_ARGS+=	--with-type-engines=xft
 CONFIGURE_ARGS+=	--without-libiconv-prefix
+CONFIGURE_ARGS+=	--without-libintl-prefix
 
 SUBST_CLASSES+=		link
 SUBST_MESSAGE.link=	"Fixing hardcoded paths and link options."
 SUBST_STAGE.link=	post-patch
-SUBST_FILES.link=	Makefile.in */Makefile.in \
-			*/*/Makefile.in */*/*/Makefile.in \
-			xwindow/x_screen.c xwindow/x_sb_view_factory.c \
-			mlterm/ml_config_menu.c man/mlterm.1
-SUBST_SED.link=		-e 's|-module|-R${X11BASE}/lib -module|g' \
-			-e 's|\(-[R]\)/usr/local/lib||g' \
+SUBST_FILES.link=	Makefile.in */Makefile.in */*/Makefile.in \
+			*/*/*/Makefile.in man/mlterm.1 \
+			mlterm/ml_config_menu.c script/config.rpath \
+			tool/mlconfig/mc_im.c tool/mlconfig/mc_sb_view.c \
+			tool/mlmenu/main.c xwindow/x_im.c \
+			xwindow/x_sb_view_factory.c xwindow/x_screen.c
+SUBST_SED.link=		-e 's|(LIBTOOL_LINK).*(LIBS)|& -R${X11BASE}/lib|g' \
+			-e 's|(LIBTOOL_LINK).*(LIBDIR)|& -R${X11BASE}/lib|g' \
 			-e 's|/usr/local/|${PREFIX}/|g' \
 			-e 's|/usr/X11R6/|${X11BASE}/|g'
 
+.include "../../devel/pkgconfig/buildlink3.mk"
 .include "../../converters/libiconv/buildlink3.mk"
-.include "../../devel/glib/buildlink3.mk"
-.include "../../fonts/Xft2/buildlink3.mk"
-.include "../../fonts/fontconfig/buildlink3.mk"
-.include "../../graphics/imlib/buildlink3.mk"
-.include "../../x11/gtk/buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../x11/gtk2/buildlink3.mk"
 
 .include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /home/fun/cvsroot/NetBSD/pkgsrc/x11/mlterm/PLIST,v
retrieving revision 1.11
diff -u -r1.11 PLIST
--- PLIST	22 Sep 2004 08:10:06 -0000	1.11
+++ PLIST	1 Jan 2004 04:59:17 -0000
@@ -17,6 +17,7 @@
 lib/libkik.la
 lib/libmkf.la
 lib/mlterm/libathena.la
+lib/mlterm/libim-kbd.la
 lib/mlterm/libmotif.la
 lib/mlterm/libmozmodern.la
 lib/mlterm/libnext.la
Index: distinfo
===================================================================
RCS file: /home/fun/cvsroot/NetBSD/pkgsrc/x11/mlterm/distinfo,v
retrieving revision 1.12
diff -u -r1.12 distinfo
--- distinfo	29 Feb 2004 17:41:16 -0000	1.12
+++ distinfo	1 Jan 2004 04:59:17 -0000
@@ -1,7 +1,5 @@
 $NetBSD: distinfo,v 1.12 2004/02/29 17:41:16 minskim Exp $
 
-SHA1 (mlterm-2.8.0.tar.gz) = d32ef91e35ccf31f61332250076ad3e4a555d83f
-Size (mlterm-2.8.0.tar.gz) = 1819417 bytes
-SHA1 (mlterm-2.8.0pl1.tar.gz) = 889b5f0747e895276589414cf26d3ef1df7c31c0
-Size (mlterm-2.8.0pl1.tar.gz) = 700 bytes
-SHA1 (patch-aa) = 48f828de66ecf166e8dc9e14a902730d90690925
+SHA1 (mlterm-2.9.1.tar.gz) = 184bd34d346406695cad2229c0bba005f9b34851
+Size (mlterm-2.9.1.tar.gz) = 1893144 bytes
+SHA1 (patch-aa) = a37632cbf0bd9e17a40fe052ceb2928a2068c086
Index: patches/patch-aa
===================================================================
RCS file: /home/fun/cvsroot/NetBSD/pkgsrc/x11/mlterm/patches/patch-aa,v
retrieving revision 1.4
diff -u -r1.4 patch-aa
--- patches/patch-aa	29 Feb 2004 17:41:16 -0000	1.4
+++ patches/patch-aa	1 Jan 2004 04:59:17 -0000
@@ -1,13 +1,151 @@
-$NetBSD: patch-aa,v 1.4 2004/02/29 17:41:16 minskim Exp $
+$NetBSD$
 
---- tool/mlconfig/po/Makevars.orig	2003-10-05 08:10:06.000000000 -0500
-+++ tool/mlconfig/po/Makevars
-@@ -4,7 +4,7 @@
- DOMAIN = $(PACKAGE)
- 
- # These two variables depend on the location of this directory.
--subdir =
-+subdir = tool/mlconfig/po
- top_builddir = ../../..
+--- kiklib/src/kik_pty_streams.c.orig	2004-10-23 06:59:39.000000000 +0900
++++ kiklib/src/kik_pty_streams.c	2005-01-24 12:58:06.000000000 +0900
+@@ -8,7 +8,7 @@
  
- # These options get passed to xgettext.
+ /* When _XOPEN_SOURCE is defined,
+  * u_int/u_long/... may not be defined without _BSD_SOURCE */
+-#define  _BSD_SOURCE 1
++#define  _NETBSD_SOURCE 1
+ 
+ /* for solaris */
+ #define __EXTENSIONS__
+@@ -34,6 +34,7 @@
+ #ifdef  HAVE_SYS_STROPTS_H
+ #include  <sys/stropts.h>
+ #endif
++#include  <util.h>
+ 
+ #include  "kik_str.h"		/* strdup */
+ #include  "kik_debug.h"
+@@ -99,13 +100,42 @@
+ 		return  -1;
+ 	}
+ 
+-	fcntl(*master, F_SETFL, O_NDELAY);
+-
+ 	if( ( *slave = open( ttydev, O_RDWR | O_NOCTTY, 0)) < 0)
+ 	{
+ 		return -1;
+ 	}
+ 
++	if( ( *slave_name = strdup( ttydev)) == NULL)
++	{
++		close( *master) ;
++		close( *slave) ;
++
++		return  -1 ;
++	}
++
++	pid = fork() ;
++
++	if( pid == -1)
++	{
++		/* fork failed */
++
++		free( *slave_name) ;
++
++		return  -1 ;
++	}
++	else if( pid == 0)
++	{
++		/* child */
++
++		close( *master) ;
++
++		login_tty( *slave) ;
++
++		return  0 ;
++	}
++
++	fcntl(*master, F_SETFL, O_NDELAY);
++
+ 	/*
+ 	 * cygwin doesn't have isastream.
+ 	 */
+@@ -204,78 +234,14 @@
+ 		}
+ 	}
+ 
+-	if( ( *slave_name = strdup( ttydev)) == NULL)
+-	{
+-		close( *master) ;
+-		close( *slave) ;
++	cfsetispeed( &tio , B9600) ;
++	cfsetospeed( &tio , B9600) ;
+ 
+-		return  -1 ;
+-	}
+-
+-	pid = fork() ;
+-
+-	if( pid == -1)
+-	{
+-		/* fork failed */
+-
+-		free( *slave_name) ;
+-
+-		return  -1 ;
+-	}
+-	else if( pid == 0)
++	if( tcsetattr(STDIN_FILENO, TCSANOW , &tio) < 0)
+ 	{
+-		/* child */
+-
+-		close(*master) ;
+-#ifdef HAVE_SETSID
+-		setsid() ;
+-#else /*HAVE_SETSID*/
+-#ifdef TIOCNOTTY
+-		fd = open("/dev/tty", O_RDWR | O_NOCTTY);
+-		if (fd >= 0)
+-		{
+-			ioctl(fd, TIOCNOTTY, NULL);
+-			close(fd);
+-		}
+-#endif /*TIOCNOTTY*/
+-#endif /*HAVE_SETSID*/
+-		fd = open("/dev/tty", O_RDWR | O_NOCTTY);
+-		if (fd >= 0)
+-		{
+-			close(fd);
+-		}
+-		fd = open(ttydev, O_RDWR);
+-		if (fd >= 0)
+-		{
+-			close(fd);
+-		}
+-		fd = open("/dev/tty", O_WRONLY);
+-		if (fd < 0)
+-		{
+-			return -1;
+-		}
+-		close(fd);
+-
+-		dup2( *slave , 0) ;
+-		dup2( *slave , 1) ;
+-		dup2( *slave , 2) ;
+-
+-		if( *slave > STDERR_FILENO)
+-		{
+-			close(*slave) ;
+-		}
+-
+-		cfsetispeed( &tio , B9600) ;
+-		cfsetospeed( &tio , B9600) ;
+-
+-		if( tcsetattr(STDIN_FILENO, TCSANOW , &tio) < 0)
+-		{
+-		#ifdef  DEBUG
+-			kik_warn_printf( KIK_DEBUG_TAG " tcsetattr() failed.\n") ;
+-		#endif
+-		}
+-
+-		return  0 ;
++	#ifdef  DEBUG
++		kik_warn_printf( KIK_DEBUG_TAG " tcsetattr() failed.\n") ;
++	#endif
+ 	}
+ 
+ 	return  pid ;