libzvt2 stable port information

Package: libzvt2
Version: 2.0.1
Revision: 1019
BuildDepends: <<
atk1 (>= 1.24.0-1),
autoconf,
automake1.10,
cairo (>= 1.8-1),
expat1,
fink (>= 0.24.12-1),
fontconfig2-dev (>= 2.4.1-1),
freetype219 (>= 2.3.7-7),
gettext-bin,
gettext-tools,
glib2-dev (>= 2.18.0-1),
glitz,
gtk+2-dev (>= 2.14.0-1),
libart2,
libgettext3-dev,
libiconv-dev,
libpng3,
libtool14,
pango1-xft2-ft219-dev (>= 1.22.0-4),
pixman (>= 0.12.0-1),
pkgconfig (>= 0.23),
x11-dev,
xft2-dev
<<
Source: mirror:gnome:sources/libzvt/2.0/libzvt-%v.tar.bz2
Source-MD5: 4bbea49495a341650fa1f89908e6554e
PatchFile: %n.patch
PatchFile-MD5: 8e45164decb7698394134c050d9f2581
PatchScript: <<
%{default_script}
autoreconf -fi
<<
SetCPPFLAGS: -I%p/lib/fontconfig2/include
SetLDFLAGS: -L%p/lib/fontconfig2/lib
SetCFLAGS: -Os -pipe
ConfigureParams: --program-suffix=-2 --disable-dependency-tracking --disable-static PKG_CONFIG_PATH="%p/lib/fontconfig2/lib/pkgconfig:$PKG_CONFIG_PATH"
InstallScript: make -j1 install DESTDIR=%d
PostInstScript: <<
chgrp admin %p/sbin/gnome-pty-helper-2
chmod u+s %p/sbin/gnome-pty-helper-2
<<
SplitOff: <<
Package: %N-shlibs
Depends: <<
%N (= %v-%r),
atk1-shlibs (>= 1.24.0-1),
cairo-shlibs (>= 1.8-1),
fontconfig2-shlibs (>= 2.4.1-1),
freetype219-shlibs (>= 2.3.7-7),
glib2-shlibs (>= 2.18.0-1),
gtk+2-shlibs (>= 2.14.0-1),
libart2-shlibs,
libgettext3-shlibs,
libiconv,
pango1-xft2-ft219-shlibs (>= 1.22.0-4),
x11-shlibs
<<
Files: lib/libzvt-2.0.*.dylib
Shlibs: %p/lib/libzvt-2.0.0.dylib 1.0.0 %n (>= 2.0.1-4)
DocFiles: libzvt/AUTHORS libzvt/BUGS COPYING* ChangeLog NEWS libzvt/README libzvt/TODO
<<
SplitOff2: <<
Package: %N-dev
Depends: %N-shlibs (= %v-%r)
BuildDependsOnly: True
Files: include lib/libzvt-2.0.* lib/pkgconfig
DocFiles: libzvt/AUTHORS libzvt/BUGS COPYING* ChangeLog NEWS libzvt/README libzvt/TODO
<<
DocFiles: libzvt/AUTHORS libzvt/BUGS COPYING* ChangeLog NEWS libzvt/README libzvt/TODO
Description: Zed's Virtual Terminal
License: LGPL
Maintainer: None
DescPort: <<
Clean up libzvt.h for gtk+2-2.14 deprecations.
<<
DescPackaging: <<
Originally packaged by Masanori Sekino.

Need to patch to fix incomplete support for --program-suffix
See: http://bugzilla.gnome.org/show_bug.cgi?id=325720

Do special perm flags in PostInst for --build-as-nobody

Easier to redo autotools than to patch lots of bugs in
very-old version.

Don't know where AC_CHECK_UTMP comes from, so retain
it from aclocal.m4 in acinclude.m4.

Add per-target CFLAGS for gnome_pty_helper to avoid
collision with gnome-login-support compiled object

libzvt uses x11 directly so link against libX11 directly.

%N (gnome-pty-helper-2) is used at runtime by dylib, not vice
versa, so %N-shlibs:Depends:%N
<<
Homepage: http://www.gnome.org

libzvt2 stable port .patch

diff -Nurd -x'*~' libzvt-2.0.1.orig/acinclude.m4 libzvt-2.0.1/acinclude.m4
--- libzvt-2.0.1.orig/acinclude.m4 1969-12-31 19:00:00.000000000 -0500
+++ libzvt-2.0.1/acinclude.m4 2008-12-23 03:56:38.000000000 -0500
@@ -0,0 +1,255 @@
+# old names
+AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
+
+# This is just to silence aclocal about the macro not being used
+ifelse([AC_DISABLE_FAST_INSTALL])
+
+# Checks for availability of various utmp fields
+#
+# Original code by Bernhard Rosenkraenzer (bero@linux.net.eu.org), 1998.
+# Modifications by Timur Bakeyev (timur@gnu.org), 1999.
+#
+
+dnl AC_CHECK_UTMP()
+dnl Test for presence of the field and define HAVE_UT_UT_field macro
+dnl
+
+AC_DEFUN([AC_CHECK_UTMP],[
+
+AC_CHECK_HEADERS(sys/time.h utmp.h utmpx.h)
+AC_HEADER_TIME
+
+if test "$ac_cv_header_utmpx_h" = "yes"; then
+ AC_DEFINE(UTMP,[struct utmpx])
+else
+ AC_DEFINE(UTMP,[struct utmp])
+fi
+
+dnl some systems (BSD4.4-like) require time.h to be included before utmp.h :/
+AC_MSG_CHECKING(for ut_host field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include
+#include
+#else
+#ifdef HAVE_SYS_TIME_H
+#include
+#else
+#include
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include
+#endif
+#ifdef HAVE_UTMPX_H
+#include
+#endif],[UTMP ut; char *p; p=ut.ut_host;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_HOST)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_pid field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include
+#include
+#else
+#ifdef HAVE_SYS_TIME_H
+#include
+#else
+#include
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include
+#endif
+#ifdef HAVE_UTMPX_H
+#include
+#endif],[UTMP ut; int i; i=ut.ut_pid;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_PID)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_id field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include
+#include
+#else
+#ifdef HAVE_SYS_TIME_H
+#include
+#else
+#include
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include
+#endif
+#ifdef HAVE_UTMPX_H
+#include
+#endif],[UTMP ut; char *p; p=ut.ut_id;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_ID)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_name field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include
+#include
+#else
+#ifdef HAVE_SYS_TIME_H
+#include
+#else
+#include
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include
+#endif
+#ifdef HAVE_UTMPX_H
+#include
+#endif],[UTMP ut; char *p; p=ut.ut_name;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_NAME)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_type field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include
+#include
+#else
+#ifdef HAVE_SYS_TIME_H
+#include
+#else
+#include
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include
+#endif
+#ifdef HAVE_UTMPX_H
+#include
+#endif],[UTMP ut; int i; i=(int) ut.ut_type;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_TYPE)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_exit.e_termination field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include
+#include
+#else
+#ifdef HAVE_SYS_TIME_H
+#include
+#else
+#include
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include
+#endif
+#ifdef HAVE_UTMPX_H
+#include
+#endif],[UTMP ut; ut.ut_exit.e_termination=0;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_EXIT_E_TERMINATION)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_user field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include
+#include
+#else
+#ifdef HAVE_SYS_TIME_H
+#include
+#else
+#include
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include
+#endif
+#ifdef HAVE_UTMPX_H
+#include
+#endif],[UTMP ut; char *p; p=ut.ut_user;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_USER)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_time field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include
+#include
+#else
+#ifdef HAVE_SYS_TIME_H
+#include
+#else
+#include
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include
+#endif
+#ifdef HAVE_UTMPX_H
+#include
+#endif],[UTMP ut; ut.ut_time=0;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_TIME)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_tv field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include
+#include
+#else
+#ifdef HAVE_SYS_TIME_H
+#include
+#else
+#include
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include
+#endif
+#ifdef HAVE_UTMPX_H
+#include
+#endif],[UTMP ut; ut.ut_tv={0, 0};],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_TV)
+fi
+AC_MSG_RESULT($result)
+
+AC_MSG_CHECKING(for ut_syslen field in the utmp structure)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include
+#include
+#else
+#ifdef HAVE_SYS_TIME_H
+#include
+#else
+#include
+#endif
+#endif
+#ifdef HAVE_UTMP_H
+#include
+#endif
+#ifdef HAVE_UTMPX_H
+#include
+#endif],[UTMP ut; ut.ut_syslen=0;],result=yes,result=no)
+if test "$result" = "yes"; then
+ AC_DEFINE(HAVE_UT_UT_SYSLEN)
+fi
+AC_MSG_RESULT($result)
+
+])
diff -Nurd -x'*~' libzvt-2.0.1.orig/configure.in libzvt-2.0.1/configure.in
--- libzvt-2.0.1.orig/configure.in 2002-06-24 11:40:25.000000000 -0400
+++ libzvt-2.0.1/configure.in 2008-12-23 04:31:32.000000000 -0500
@@ -43,6 +43,7 @@

AC_ISC_POSIX
AC_PROG_CC
+AM_PROG_CC_C_O
AC_STDC_HEADERS
AM_PROG_LIBTOOL

@@ -130,6 +131,7 @@
gtk+-2.0 >= 1.3.11
libart-2.0 >= 2.3.5
])
+ZVT_LIBS="$ZVT_LIBS -L/usr/X11R6/lib -lX11"

AC_SUBST(ZVT_LIBS)
AC_SUBST(ZVT_CFLAGS)
diff -Nurd -x'*~' libzvt-2.0.1.orig/libzvt/Makefile.am libzvt-2.0.1/libzvt/Makefile.am
--- libzvt-2.0.1.orig/libzvt/Makefile.am 2002-06-24 11:39:33.000000000 -0400
+++ libzvt-2.0.1/libzvt/Makefile.am 2008-12-23 04:05:35.000000000 -0500
@@ -1,4 +1,4 @@
-ptyhelperdir = $(libexecdir)/libzvt-2.0
+ptyhelperdir = $(sbindir)

noinst_PROGRAMS = zterm test-utmp
ptyhelper_PROGRAMS = gnome-pty-helper
@@ -80,6 +80,7 @@
gnome-login-support.c \
gnome-utmp.c

+gnome_pty_helper_CFLAGS= $(AM_CFLAGS)
gnome_pty_helper_LDADD= $(UTIL_LIBS)

# Since we do gnome-pty-helper manually, include the relevant sources here
@@ -100,5 +101,3 @@
test_utmp_LDADD =

install-exec-local: install-ptyhelperPROGRAMS
- -file=$(DESTDIR)$(ptyhelperdir)/gnome-pty-helper; \
- chown @PTY_HELPER_UID@ $$file && chgrp @PTY_HELPER_GID@ $$file && chmod u+s $$file
diff -Nurd -x'*~' libzvt-2.0.1.orig/libzvt/libzvt.h libzvt-2.0.1/libzvt/libzvt.h
--- libzvt-2.0.1.orig/libzvt/libzvt.h 2002-06-03 12:59:26.000000000 -0400
+++ libzvt-2.0.1/libzvt/libzvt.h 2008-12-23 03:31:26.000000000 -0500
@@ -46,11 +46,11 @@
/* #define ZVT_NO_TRANSPARENT 1 */

#define ZVT_TYPE_TERM (zvt_term_get_type ())
-#define ZVT_TERM(obj) (GTK_CHECK_CAST ((obj), ZVT_TYPE_TERM, ZvtTerm))
-#define ZVT_TERM_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), ZVT_TYPE_TERM, ZvtTermClass))
-#define ZVT_IS_TERM(obj) (GTK_CHECK_TYPE ((obj), ZVT_TYPE_TERM))
-#define ZVT_IS_TERM_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), ZVT_TYPE_TERM))
-#define ZVT_TERM_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), ZVT_TYPE_TERM, ZvtTermClass))
+#define ZVT_TERM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ZVT_TYPE_TERM, ZvtTerm))
+#define ZVT_TERM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ZVT_TYPE_TERM, ZvtTermClass))
+#define ZVT_IS_TERM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ZVT_TYPE_TERM))
+#define ZVT_IS_TERM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ZVT_TYPE_TERM))
+#define ZVT_TERM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ZVT_TYPE_TERM, ZvtTermClass))

/* Capabilities

diff -Nurd -x'*~' libzvt-2.0.1.orig/libzvt/subshell.c libzvt-2.0.1/libzvt/subshell.c
--- libzvt-2.0.1.orig/libzvt/subshell.c 2002-06-19 14:53:58.000000000 -0400
+++ libzvt-2.0.1/libzvt/subshell.c 2008-12-23 03:32:35.000000000 -0500
@@ -242,7 +242,7 @@
close (helper_socket_fdpassing [0]);
close (helper_socket_fdpassing [1]);

- execl (PTY_HELPER_DIR "/gnome-pty-helper", "gnome-pty-helper", NULL);
+ execl (PTY_HELPER_DIR "/gnome-pty-helper-2", "gnome-pty-helper-2", NULL);
exit (1);
} else {
close (helper_socket_fdpassing [1]);

libzvt2 _unstable_ port .patch