diff options
author | minskim <minskim@pkgsrc.org> | 2004-09-15 18:29:20 +0000 |
---|---|---|
committer | minskim <minskim@pkgsrc.org> | 2004-09-15 18:29:20 +0000 |
commit | 55496e93d61e0880759e26333c6cf690aef7d88d (patch) | |
tree | 5a945c33b47052ab55928ac62ddbc8d47ec99e71 /x11/rxvt | |
parent | 480693d8994b7ceb1b8ca1f4213bede48d2159b2 (diff) | |
download | pkgsrc-55496e93d61e0880759e26333c6cf690aef7d88d.tar.gz |
Make this package build on Interix. Based on patches submitted by
Hiramatsu Yoshifumi in PR pkg/26962.
- Use ut_session only when it is available in struct utmpx.
- If updwtmpx is not available, use pututxline instead.
- Bulid functions using struct utmp only when the struct utmp is available.
Diffstat (limited to 'x11/rxvt')
-rw-r--r-- | x11/rxvt/distinfo | 10 | ||||
-rw-r--r-- | x11/rxvt/patches/patch-ac | 27 | ||||
-rw-r--r-- | x11/rxvt/patches/patch-af | 80 | ||||
-rw-r--r-- | x11/rxvt/patches/patch-ag | 22 | ||||
-rw-r--r-- | x11/rxvt/patches/patch-ai | 57 | ||||
-rw-r--r-- | x11/rxvt/patches/patch-aj | 10 |
6 files changed, 196 insertions, 10 deletions
diff --git a/x11/rxvt/distinfo b/x11/rxvt/distinfo index 24fef39a3af..468e93691a5 100644 --- a/x11/rxvt/distinfo +++ b/x11/rxvt/distinfo @@ -1,12 +1,14 @@ -$NetBSD: distinfo,v 1.15 2004/09/15 17:55:53 minskim Exp $ +$NetBSD: distinfo,v 1.16 2004/09/15 18:29:20 minskim Exp $ SHA1 (rxvt-2.7.10.tar.bz2) = 16eae23c3227e28e5e7a53a58eaa3226affe65f9 Size (rxvt-2.7.10.tar.bz2) = 493199 bytes SHA1 (patch-aa) = 11656b4c2d9e22055d203669b588b626079aa320 SHA1 (patch-ab) = 62ef5b28f8842b769829fed0d217a9c54f48c832 -SHA1 (patch-ac) = 3478e6bf322312743ba4fcfab4b13a90fa5d8191 +SHA1 (patch-ac) = 57e55b689dbdbc40008a65147d830b4a00611b9d SHA1 (patch-ad) = 86047c69fa397d71f3e71ae476bd7addd153729f SHA1 (patch-ae) = 76221e9b3cd35a0f40fb6128e0bf9d74d232d907 -SHA1 (patch-af) = e99cda3cc58b1af3bf4d7ecadf55877308c3aee9 -SHA1 (patch-ag) = 9af27e00f94392092471a21f713698e772aebac7 +SHA1 (patch-af) = 6a4f5cf91bc449f7ecef51695be278074e603c8b +SHA1 (patch-ag) = 11019ed97892c8bd8834c56433573719892336c4 SHA1 (patch-ah) = 5e6fcf6b4b4fe1111b97d0b916501ab5855a755a +SHA1 (patch-ai) = 0f3e800efc5b87243208de9fb9fafe9abde73201 +SHA1 (patch-aj) = 43ca25f034e6160f3a3dabbf1488df31cdecf95b diff --git a/x11/rxvt/patches/patch-ac b/x11/rxvt/patches/patch-ac index 6d88bbcd502..212e03de783 100644 --- a/x11/rxvt/patches/patch-ac +++ b/x11/rxvt/patches/patch-ac @@ -1,6 +1,6 @@ -$NetBSD: patch-ac,v 1.7 2004/09/15 17:55:53 minskim Exp $ +$NetBSD: patch-ac,v 1.8 2004/09/15 18:29:20 minskim Exp $ ---- autoconf/configure.in.orig 2003-03-06 20:32:27.000000000 -0600 +--- autoconf/configure.in.orig Thu Mar 6 20:32:27 2003 +++ autoconf/configure.in @@ -393,6 +393,7 @@ AC_CHECK_HEADERS( \ sys/ioctl.h \ @@ -10,3 +10,26 @@ $NetBSD: patch-ac,v 1.7 2004/09/15 17:55:53 minskim Exp $ sys/strredir.h \ sys/time.h \ utmp.h \ +@@ -588,6 +589,7 @@ AC_CHECK_FUNCS( \ + on_exit \ + nanosleep \ + updwtmp \ ++ updwtmpx \ + ttyslot \ + ) + dnl# Note: On NetBSD, openpty() exists in libutil. Don't pull it in +@@ -648,6 +650,14 @@ AC_CACHE_CHECK(for host in utmpx struct, + rxvt_cv_struct_utmpx_host=yes, rxvt_cv_struct_utmpx_host=no)]) + if test x$rxvt_cv_struct_utmpx_host = xyes; then + AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) ++fi ++AC_CACHE_CHECK(for session in utmpx struct, rxvt_cv_struct_utmpx_session, ++[AC_TRY_COMPILE([#include <sys/types.h> ++#include <utmpx.h>], ++[struct utmpx utx; utx.ut_session;], ++rxvt_cv_struct_utmpx_session=yes, rxvt_cv_struct_utmpx_session=no)]) ++if test x$rxvt_cv_struct_utmpx_session = xyes; then ++ AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session) + fi + ) dnl# AC_CHECK_HEADER(utmpx.h + diff --git a/x11/rxvt/patches/patch-af b/x11/rxvt/patches/patch-af index 7ffa5e213ad..7e6c58055ef 100644 --- a/x11/rxvt/patches/patch-af +++ b/x11/rxvt/patches/patch-af @@ -1,6 +1,6 @@ -$NetBSD: patch-af,v 1.8 2004/09/15 17:55:53 minskim Exp $ +$NetBSD: patch-af,v 1.9 2004/09/15 18:29:20 minskim Exp $ ---- configure.orig 2003-03-26 00:07:26.000000000 -0600 +--- configure.orig Wed Mar 26 00:07:26 2003 +++ configure @@ -9481,6 +9481,7 @@ fi @@ -18,3 +18,79 @@ $NetBSD: patch-af,v 1.8 2004/09/15 17:55:53 minskim Exp $ sys/strredir.h \ sys/time.h \ utmp.h \ +@@ -12964,6 +12966,7 @@ for ac_func in \ + on_exit \ + nanosleep \ + updwtmp \ ++ updwtmpx \ + ttyslot \ + + do +@@ -13577,6 +13580,67 @@ if test x$rxvt_cv_struct_utmpx_host = xy + + cat >>confdefs.h <<\_ACEOF + #define HAVE_UTMPX_HOST 1 ++_ACEOF ++ ++fi ++echo "$as_me:$LINENO: checking for session in utmpx struct" >&5 ++echo $ECHO_N "checking for session in utmpx struct... $ECHO_C" >&6 ++if test "${rxvt_cv_struct_utmpx_session+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++#include <sys/types.h> ++#include <utmpx.h> ++int ++main () ++{ ++struct utmpx utx; utx.ut_session; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ rxvt_cv_struct_utmpx_session=yes ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++rxvt_cv_struct_utmpx_session=no ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++echo "$as_me:$LINENO: result: $rxvt_cv_struct_utmpx_session" >&5 ++echo "${ECHO_T}$rxvt_cv_struct_utmpx_session" >&6 ++if test x$rxvt_cv_struct_utmpx_session = xyes; then ++ ++cat >>confdefs.h <<\_ACEOF ++#define HAVE_UTMPX_SESSION 1 + _ACEOF + + fi diff --git a/x11/rxvt/patches/patch-ag b/x11/rxvt/patches/patch-ag index a7a6a1e66ec..9ff221b264f 100644 --- a/x11/rxvt/patches/patch-ag +++ b/x11/rxvt/patches/patch-ag @@ -1,6 +1,6 @@ -$NetBSD: patch-ag,v 1.3 2004/09/15 17:55:53 minskim Exp $ +$NetBSD: patch-ag,v 1.4 2004/09/15 18:29:20 minskim Exp $ ---- autoconf/config.h.in.orig 2003-02-19 18:35:55.000000000 -0600 +--- autoconf/config.h.in.orig Wed Feb 19 18:35:55 2003 +++ autoconf/config.h.in @@ -123,6 +123,9 @@ /* Define to 1 if you have the <sys/strredir.h> header file. */ @@ -12,3 +12,21 @@ $NetBSD: patch-ag,v 1.3 2004/09/15 17:55:53 minskim Exp $ /* Define to 1 if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H +@@ -150,11 +153,17 @@ + /* Define to 1 if you have the `updwtmp' function. */ + #undef HAVE_UPDWTMP + ++/* Define to 1 if you have the `updwtmpx' function. */ ++#undef HAVE_UPDWTMPX ++ + /* Define to 1 if you have the <utmpx.h> header file. */ + #undef HAVE_UTMPX_H + + /* Define if struct utmpx contains ut_host */ + #undef HAVE_UTMPX_HOST ++ ++/* Define if struct utmpx contains ut_session */ ++#undef HAVE_UTMPX_SESSION + + /* Define to 1 if you have the <utmp.h> header file. */ + #undef HAVE_UTMP_H diff --git a/x11/rxvt/patches/patch-ai b/x11/rxvt/patches/patch-ai new file mode 100644 index 00000000000..f3230a80199 --- /dev/null +++ b/x11/rxvt/patches/patch-ai @@ -0,0 +1,57 @@ +$NetBSD: patch-ai,v 1.1 2004/09/15 18:29:20 minskim Exp $ + +--- src/logging.c.orig Sun Dec 15 18:33:04 2002 ++++ src/logging.c +@@ -137,7 +137,9 @@ rxvt_makeutent(rxvt_t *r, const char *pt + STRNCPY(utx->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?", + sizeof(utx->ut_user)); + STRNCPY(utx->ut_id, ut_id, sizeof(utx->ut_id)); ++# ifdef HAVE_UTMPX_SESSION + utx->ut_session = getsid(0); ++# endif + utx->ut_tv.tv_sec = time(NULL); + utx->ut_tv.tv_usec = 0; + utx->ut_pid = r->h->cmd_pid; +@@ -203,7 +205,11 @@ rxvt_makeutent(rxvt_t *r, const char *pt + # endif + # endif + # ifdef HAVE_STRUCT_UTMPX ++# ifdef HAVE_UPDWTMPX + updwtmpx(RXVT_WTMPX_FILE, utx); ++# else ++ pututxline(utx); ++# endif + # endif + } + #endif +@@ -254,7 +260,9 @@ rxvt_cleanutent(rxvt_t *r) + if ((tmputx = getutxid(utx))) /* position to entry in utmp file */ + utx = tmputx; + utx->ut_type = DEAD_PROCESS; ++# ifdef HAVE_UTMPX_SESSION + utx->ut_session = getsid(0); ++# endif + utx->ut_tv.tv_sec = time(NULL); + utx->ut_tv.tv_usec = 0; + #endif +@@ -275,7 +283,11 @@ rxvt_cleanutent(rxvt_t *r) + # endif + # endif + # ifdef HAVE_STRUCT_UTMPX ++# ifdef HAVE_UPDWTMPX + updwtmpx(RXVT_WTMPX_FILE, utx); ++# else ++ pututxline(utx); ++# endif + # endif + } + #endif +@@ -327,7 +339,7 @@ rxvt_write_bsd_utmp(int utmp_pos, struct + /* + * Update a BSD style wtmp entry + */ +-#if defined(WTMP_SUPPORT) && !defined(HAVE_UPDWTMP) ++#if defined(WTMP_SUPPORT) && !defined(HAVE_UPDWTMP) && defined(HAVE_STRUCT_UTMP) + /* INTPROTO */ + void + rxvt_update_wtmp(const char *fname, const struct utmp *putmp) diff --git a/x11/rxvt/patches/patch-aj b/x11/rxvt/patches/patch-aj new file mode 100644 index 00000000000..fe7c32ee8f0 --- /dev/null +++ b/x11/rxvt/patches/patch-aj @@ -0,0 +1,10 @@ +$NetBSD: patch-aj,v 1.1 2004/09/15 18:29:20 minskim Exp $ + +--- src/logging.intpro.orig Wed Mar 26 00:12:28 2003 ++++ src/logging.intpro +@@ -1,3 +1,5 @@ ++#ifdef HAVE_STRUCT_UTMP + int rxvt_write_bsd_utmp __PROTO((int utmp_pos, struct utmp *wu)); + void rxvt_update_wtmp __PROTO((const char *fname, const struct utmp *putmp)); ++#endif + void rxvt_update_lastlog __PROTO((const char *fname, const char *pty, const char *host)); |