From e4b8bfe6d0290b70e5ab93cd5e1c140e6a7ff9c0 Mon Sep 17 00:00:00 2001 From: Daichi GOTO Date: Thu, 19 Jun 2003 06:56:25 +0000 Subject: - Unbroke xview on -current machine - New files patch-old-wait.h patch-text_extras_menu patch-util-Imakefile types.h.in wait.h.in. PR: 52437 Submitted by: Serge Gagnon (maintainer) --- x11-toolkits/xview/Makefile | 24 +++- x11-toolkits/xview/files/patch-old-wait.h | 99 ++++++++++++++ x11-toolkits/xview/files/patch-text_extras_menu | 11 ++ x11-toolkits/xview/files/patch-util-Imakefile | 47 +++++++ x11-toolkits/xview/files/types.h.in | 4 + x11-toolkits/xview/files/wait.h.in | 163 ++++++++++++++++++++++++ x11-toolkits/xview/pkg-plist | 2 + 7 files changed, 344 insertions(+), 6 deletions(-) create mode 100644 x11-toolkits/xview/files/patch-old-wait.h create mode 100644 x11-toolkits/xview/files/patch-text_extras_menu create mode 100644 x11-toolkits/xview/files/patch-util-Imakefile create mode 100644 x11-toolkits/xview/files/types.h.in create mode 100644 x11-toolkits/xview/files/wait.h.in (limited to 'x11-toolkits/xview') diff --git a/x11-toolkits/xview/Makefile b/x11-toolkits/xview/Makefile index 76d3b6e5febd..c281a6f3012f 100644 --- a/x11-toolkits/xview/Makefile +++ b/x11-toolkits/xview/Makefile @@ -15,7 +15,7 @@ MASTER_SITES= ${MASTER_SITE_LOCAL} \ MASTER_SITE_SUBDIR= asami/LOCAL_PORTS libraries DISTNAME= xview3.2p1-X11R6 -MAINTAINER= ports@FreeBSD.org +MAINTAINER= gagnon__s@videotron.ca COMMENT= X Window-System-based Visual/Integrated Environment for Workstations USE_IMAKE= yes @@ -24,18 +24,30 @@ IMAKEINCLUDE= "-I${X11BASE}/lib/X11/config -I${WRKSRC}/config" MAKE_ENV+= IMAKEINCLUDE=${IMAKEINCLUDE} XMKMF= ${SETENV} IMAKEINCLUDE=${IMAKEINCLUDE} xmkmf -a ALL_TARGET= World +USE_REINPLACE= yes +REINPLACE_ARGS= -i "" MAN1= msgfmt.1 xgettext.1 xview.1 -.include - -.if ${OSVERSION} >= 500113 -BROKEN= "Does not compile" -.endif +post-configure: + ${CP} ${FILESDIR}/wait.h.in ${WRKSRC}/build/include/wait.h + ${CP} ${FILESDIR}/types.h.in ${WRKSRC}/build/include/types.h post-install: + + ${INSTALL_DATA} ${WRKSRC}/build/include/wait.h ${X11BASE}/include/xview/ + ${INSTALL_DATA} ${WRKSRC}/build/include/types.h ${X11BASE}/include/xview/ .if !defined(NOPORTDOCS) @(cd $(WRKSRC); $(MAKE) -k 'SUBDIRS=doc' install) .endif +.include + +.if ${OSVERSION} >= 500000 +post-patch: + @${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -e \ + 's|#include |#include "types.h"|;\ + s|^#endif.*$$|#endif|;s|^#else.*$$|#else|' +.endif + .include diff --git a/x11-toolkits/xview/files/patch-old-wait.h b/x11-toolkits/xview/files/patch-old-wait.h new file mode 100644 index 000000000000..6c7ecf17b00e --- /dev/null +++ b/x11-toolkits/xview/files/patch-old-wait.h @@ -0,0 +1,99 @@ +--- clients/olwm/olwm.c.orig Tue Apr 22 23:19:15 2003 ++++ clients/olwm/olwm.c Tue Apr 22 23:43:14 2003 +@@ -21,7 +21,7 @@ + #include + #include + #include +-#include ++#include "wait.h" + + #include + #include +--- contrib/examples/notifier/ntfy_pipe.c.orig Tue Apr 22 23:20:04 2003 ++++ contrib/examples/notifier/ntfy_pipe.c Tue Apr 22 23:20:39 2003 +@@ -11,7 +11,7 @@ + #include + #include + #include +-#include ++#include "wait.h" + #include + #include + #include +--- lib/libxview/misc/expandname.c.orig Tue Apr 22 23:21:21 2003 ++++ lib/libxview/misc/expandname.c Tue Apr 22 23:21:39 2003 +@@ -18,7 +18,7 @@ + + #include + #include +-#include ++#include "wait.h" + #include + #include + #include +--- lib/libxview/ttysw/tty.c.orig Tue Apr 22 23:22:10 2003 ++++ lib/libxview/ttysw/tty.c Tue Apr 22 23:22:27 2003 +@@ -17,7 +17,7 @@ + #include + #include + #include +-#include ++#include "wait.h" + #include + #include + #include +--- lib/libxview/ttysw/termsw.c.orig Tue Apr 22 23:23:06 2003 ++++ lib/libxview/ttysw/termsw.c Tue Apr 22 23:23:29 2003 +@@ -17,7 +17,7 @@ + #include + #include + #include +-#include ++#include "wait.h" + #include + #include + #include +--- lib/libxview/ttysw/tty_ntfy.c.orig Tue Apr 22 23:23:54 2003 ++++ lib/libxview/ttysw/tty_ntfy.c Tue Apr 22 23:24:44 2003 +@@ -18,7 +18,7 @@ + #include + #include + #include +-#include ++#include "wait.h" + #include + #include + #include +--- lib/libxview/ttysw/term_ntfy.c.orig Tue Apr 22 23:25:05 2003 ++++ lib/libxview/ttysw/term_ntfy.c Tue Apr 22 23:25:24 2003 +@@ -17,7 +17,7 @@ + #include + #include + #include +-#include ++#include "wait.h" + #include + #include + #include +--- lib/libxview/notify/ntfy.h.orig Tue Apr 22 23:25:54 2003 ++++ lib/libxview/notify/ntfy.h Tue Apr 22 23:26:20 2003 +@@ -23,7 +23,7 @@ + #endif + #include + #if (defined(BSD) && (BSD >= 199103)) +-#include ++#include "wait.h" + #include + #endif + #include +--- lib/libxview/notify/notify.h.orig Tue Apr 22 23:26:42 2003 ++++ lib/libxview/notify/notify.h Tue Apr 22 23:36:29 2003 +@@ -18,7 +18,7 @@ + + #include + #include +-#include ++#include "wait.h" + #include + #include + #include diff --git a/x11-toolkits/xview/files/patch-text_extras_menu b/x11-toolkits/xview/files/patch-text_extras_menu new file mode 100644 index 000000000000..3d2f3ffb2161 --- /dev/null +++ b/x11-toolkits/xview/files/patch-text_extras_menu @@ -0,0 +1,11 @@ +--- lib/libxview/textsw/txt_e_menu.c.orig Sun Apr 27 11:56:09 2003 ++++ lib/libxview/textsw/txt_e_menu.c Sun Apr 27 11:56:37 2003 +@@ -159,7 +159,7 @@ + } + + /* Giving up, try with ancient way (SunView1) */ +- (void) sprintf(tmp, "/usr/lib/.%s", EXTRASMENU); ++ (void) sprintf(tmp, "%s", EXTRASMENU); + result = xv_strsave(tmp); + + found: diff --git a/x11-toolkits/xview/files/patch-util-Imakefile b/x11-toolkits/xview/files/patch-util-Imakefile new file mode 100644 index 000000000000..2b5bb68599e7 --- /dev/null +++ b/x11-toolkits/xview/files/patch-util-Imakefile @@ -0,0 +1,47 @@ +--- util/conversion/Imakefile.orig Sun May 18 19:48:42 2003 ++++ util/conversion/Imakefile Sun May 18 19:49:39 2003 +@@ -3,6 +3,7 @@ + /**/########################################################################## + /**/# @(#)Imakefile 1.3 89/12/29 SMI + /**/# Imakefile for util/conversion ++INCLUDES= -I../../build/include + + SEDFILES= full1.sed \ + full2.sed \ +--- util/xgettext/Imakefile.orig Sun May 18 19:51:00 2003 ++++ util/xgettext/Imakefile Sun May 18 19:51:27 2003 +@@ -2,6 +2,7 @@ + /**/# Imakefile for util/xgettext + + #include ++INCLUDES= -I../../build/include + + MANSUFFIX =1 + SimpleProgramTarget(xgettext) +--- util/cpp/Imakefile.orig Sun May 18 19:58:54 2003 ++++ util/cpp/Imakefile Sun May 18 19:59:49 2003 +@@ -5,6 +5,7 @@ + /**/# generate cpp.... But, for systems on which that isn't a problem, here + /**/# is the proper Imakefile. + /**/# ++INCLUDES= -I../../build/include + + #if defined(SystemV) + STRINGDEFS = +--- util/msgfmt/Imakefile.orig Sun May 18 20:00:36 2003 ++++ util/msgfmt/Imakefile Sun May 18 20:01:17 2003 +@@ -1,5 +1,6 @@ + /**/# @(#)Imakefile 1.5 28 Jun 1993 SMI + /**/# Imakefile for util/msgfmt ++INCLUDES= -I../../build/include + + #include + +--- util/soelim/Imakefile.orig Sun May 18 20:02:07 2003 ++++ util/soelim/Imakefile Sun May 18 20:02:39 2003 +@@ -1,4 +1,5 @@ + #include ++INCLUDES= -I../../build/include + + SRCS = soelim.c + OBJS = soelim.o diff --git a/x11-toolkits/xview/files/types.h.in b/x11-toolkits/xview/files/types.h.in new file mode 100644 index 000000000000..891dae311488 --- /dev/null +++ b/x11-toolkits/xview/files/types.h.in @@ -0,0 +1,4 @@ +#include +#ifndef howmany +#define howmany(x, y) (((x) + ((y) - 1)) / (y)) +#endif diff --git a/x11-toolkits/xview/files/wait.h.in b/x11-toolkits/xview/files/wait.h.in new file mode 100644 index 000000000000..db225434799c --- /dev/null +++ b/x11-toolkits/xview/files/wait.h.in @@ -0,0 +1,163 @@ +/* + * Copyright (c) 1982, 1986, 1989, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)wait.h 8.2 (Berkeley) 7/10/94 + * $FreeBSD: /tmp/pcvs/ports/x11-toolkits/xview/files/Attic/wait.h.in,v 1.1 2003-06-19 06:56:25 daichi Exp $ + */ + +#ifndef _SYS_WAIT_H_ +#define _SYS_WAIT_H_ + +/* + * This file holds definitions relevant to the wait4 system call + * and the alternate interfaces that use it (wait, wait3, waitpid). + */ + +/* + * Macros to test the exit status returned by wait + * and extract the relevant values. + */ +#ifdef _POSIX_SOURCE +#define _W_INT(i) (i) +#else +#define _W_INT(w) (*(int *)&(w)) /* convert union wait to int */ +#define WCOREFLAG 0200 +#endif + +#define _WSTATUS(x) (_W_INT(x) & 0177) +#define _WSTOPPED 0177 /* _WSTATUS if process is stopped */ +#define WIFSTOPPED(x) (_WSTATUS(x) == _WSTOPPED) +#define WSTOPSIG(x) (_W_INT(x) >> 8) +#define WIFSIGNALED(x) (_WSTATUS(x) != _WSTOPPED && _WSTATUS(x) != 0) +#define WTERMSIG(x) (_WSTATUS(x)) +#define WIFEXITED(x) (_WSTATUS(x) == 0) +#define WEXITSTATUS(x) (_W_INT(x) >> 8) +#ifndef _POSIX_SOURCE +#define WCOREDUMP(x) (_W_INT(x) & WCOREFLAG) + +#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) +#define W_STOPCODE(sig) ((sig) << 8 | _WSTOPPED) +#endif + +/* + * Option bits for the third argument of wait4. WNOHANG causes the + * wait to not hang if there are no stopped or terminated processes, rather + * returning an error indication in this case (pid==0). WUNTRACED + * indicates that the caller should receive status about untraced children + * which stop due to signals. If children are stopped and a wait without + * this option is done, it is as though they were still running... nothing + * about them is returned. + */ +#define WNOHANG 1 /* don't hang in wait */ +#define WUNTRACED 2 /* tell about stopped, untraced children */ +#define WLINUXCLONE 0x80000000 /* wait for kthread spawned from linux_clone */ + +#ifndef _POSIX_SOURCE +/* POSIX extensions and 4.2/4.3 compatibility: */ + +/* + * Tokens for special values of the "pid" parameter to wait4. + */ +#define WAIT_ANY (-1) /* any process */ +#define WAIT_MYPGRP 0 /* any process in my process group */ + +#include + +/* + * Deprecated: + * Structure of the information in the status word returned by wait4. + * If w_stopval==WSTOPPED, then the second structure describes + * the information returned, else the first. + */ +union wait { + int w_status; /* used in syscall */ + /* + * Terminated process status. + */ + struct { +#if BYTE_ORDER == LITTLE_ENDIAN + unsigned int w_Termsig:7, /* termination signal */ + w_Coredump:1, /* core dump indicator */ + w_Retcode:8, /* exit code if w_termsig==0 */ + w_Filler:16; /* upper bits filler */ +#endif +#if BYTE_ORDER == BIG_ENDIAN + unsigned int w_Filler:16, /* upper bits filler */ + w_Retcode:8, /* exit code if w_termsig==0 */ + w_Coredump:1, /* core dump indicator */ + w_Termsig:7; /* termination signal */ +#endif + } w_T; + /* + * Stopped process status. Returned + * only for traced children unless requested + * with the WUNTRACED option bit. + */ + struct { +#if BYTE_ORDER == LITTLE_ENDIAN + unsigned int w_Stopval:8, /* == W_STOPPED if stopped */ + w_Stopsig:8, /* signal that stopped us */ + w_Filler:16; /* upper bits filler */ +#endif +#if BYTE_ORDER == BIG_ENDIAN + unsigned int w_Filler:16, /* upper bits filler */ + w_Stopsig:8, /* signal that stopped us */ + w_Stopval:8; /* == W_STOPPED if stopped */ +#endif + } w_S; +}; +#define w_termsig w_T.w_Termsig +#define w_coredump w_T.w_Coredump +#define w_retcode w_T.w_Retcode +#define w_stopval w_S.w_Stopval +#define w_stopsig w_S.w_Stopsig + +#define WSTOPPED _WSTOPPED +#endif /* _POSIX_SOURCE */ + +#ifndef _KERNEL +#include +#include + +__BEGIN_DECLS +struct rusage; /* forward declaration */ + +pid_t wait __P((int *)); +pid_t waitpid __P((pid_t, int *, int)); +#ifndef _POSIX_SOURCE +pid_t wait3 __P((int *, int, struct rusage *)); +pid_t wait4 __P((pid_t, int *, int, struct rusage *)); +#endif +__END_DECLS +#endif + +#endif diff --git a/x11-toolkits/xview/pkg-plist b/x11-toolkits/xview/pkg-plist index 6f02e4d7420c..194d3ff93a71 100644 --- a/x11-toolkits/xview/pkg-plist +++ b/x11-toolkits/xview/pkg-plist @@ -422,6 +422,8 @@ include/xview/text.h include/xview/textsw.h include/xview/tty.h include/xview/ttysw.h +include/xview/types.h +include/xview/wait.h include/xview/win_enum.h include/xview/win_env.h include/xview/win_event.h -- cgit v1.2.3