Bug 52437 - Unbroke port: x11-toolkits/xview
Unbroke port: x11-toolkits/xview
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: FreeBSD ports mailing list
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-05-19 17:50 UTC by gagnon__s
Modified: 2003-06-19 07:56 UTC (History)
0 users

See Also:


Attachments
patch-text_extras_menu (350 bytes, text/plain)
2003-05-19 17:50 UTC, gagnon__s
no flags Details
types.h.in (95 bytes, text/plain)
2003-05-19 17:50 UTC, gagnon__s
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description gagnon__s 2003-05-19 17:50:14 UTC
	- Unbroke xview on -current machine
	- New files patch-old-wait.h patch-text_extras_menu patch-util-Imakefile
	types.h.in wait.h.in . Put these files in the "files" directory.
	- I take maintainership

Fix: --- 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 <sys/param.h>
 #include <sys/resource.h>
 #include <sys/stat.h>
-#include <sys/wait.h>
+#include "wait.h"
 
 #include <X11/Xos.h>
 #include <X11/Xlib.h>
--- 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 <signal.h>
 #include <sys/time.h>
 #include <sys/types.h>
-#include <sys/wait.h>
+#include "wait.h"
 #include <sys/resource.h>
 #include <sys/ioctl.h>
 #include <xview/notify.h>
--- 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 <sys/param.h>
 #include <sys/stat.h>
-#include <sys/wait.h>
+#include "wait.h"
 #include <stdio.h>
 #include <string.h>
 #include <sgtty.h>
--- 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 <fcntl.h>
 #include <sys/types.h>
 #include <sys/time.h>
-#include <sys/wait.h>
+#include "wait.h"
 #include <pixrect/pixrect.h>
 #include <pixrect/pixfont.h>
 #include <xview_private/i18n_impl.h>
--- 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 <stdio.h>
 #include <fcntl.h>
 #include <sys/types.h>
-#include <sys/wait.h>
+#include "wait.h"
 #include <xview/sun.h>
 #include <xview/frame.h>
 #include <xview/tty.h>
--- 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 <sys/file.h>
 #include <sys/time.h>
 #include <sys/resource.h>
-#include <sys/wait.h>
+#include "wait.h"
 #include <signal.h>
 #include <stdio.h>
 #include <errno.h>
--- 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 <sys/file.h>
 #include <sys/time.h>
 #include <sys/resource.h>
-#include <sys/wait.h>
+#include "wait.h"
 #include <signal.h>
 #include <stdio.h>
 #include <ctype.h>
--- 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 <sys/resource.h>
 #if (defined(BSD) && (BSD >= 199103))
-#include <sys/wait.h>
+#include  "wait.h"
 #include <sys/signal.h>
 #endif
 #include <xview/notify.h>
--- 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 <stdio.h>
 #include <sys/types.h>
-#include <sys/wait.h>
+#include "wait.h"
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <xview/base.h>
--- patch-old-wait.h ends here ---

--- 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	<XView.tmpl>
+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	<XView.tmpl>
 
--- 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 <XView.tmpl>
+INCLUDES=	-I../../build/include
 
            SRCS = soelim.c
            OBJS = soelim.o 
--- patch-util-Imakefile ends here ---



/*
 * 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: src/sys/sys/wait.h,v 1.11 1999/12/29 04:24:50 peter 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 <machine/endian.h>

/*
 * 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 <sys/types.h>
#include <sys/cdefs.h>

__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
--- wait.h.in ends here -----mkMm6ah5XMg28kWUuOcLTNXgnPiLRh2PfFTbD8poVE8RQzYy
Content-Type: text/plain; name="patch-xview"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="patch-xview"

diff -u /usr/ports/x11-toolkits/xview/Makefile ./Makefile
--- /usr/ports/x11-toolkits/xview/Makefile	Sun May 18 06:08:02 2003
+++ ./Makefile	Mon May 19 12:51:09 2003
@@ -2,7 +2,7 @@
 # Date created:		22 November 1994
 # Whom:			ljo (orig)
 #
-# $FreeBSD: ports/x11-toolkits/xview/Makefile,v 1.24 2003/05/18 10:08:02 kris Exp $
+# $FreeBSD: ports/x11-toolkits/xview/Makefile,v 1.23 2003/02/20 19:20:28 knu Exp $
 #
 
 PORTNAME=	xview
@@ -15,27 +15,38 @@
 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
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 500113
-BROKEN=         "Does not compile"
-.endif
-
 USE_IMAKE=	yes
 INSTALLS_SHLIB=	yes
 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
 
+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 <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 500000
+post-patch:
+	@${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -e \
+	's|#include <sys/types.h>|#include "types.h"|;\
+	s|^#endif.*$$|#endif|;s|^#else.*$$|#else|'
 .endif
 
 .include <bsd.port.post.mk>
diff -u /usr/ports/x11-toolkits/xview/pkg-plist ./pkg-plist
--- /usr/ports/x11-toolkits/xview/pkg-plist	Sun Dec 23 21:17:12 2001
+++ ./pkg-plist	Mon May 19 12:51:09 2003
@@ -422,6 +422,8 @@
 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
Comment 1 gagnon__s 2003-05-19 18:21:42 UTC
I forgot to mention that I fix a problem with text.extra.menu

-- 
Serge Gagnon <gagnon__s@videotron.ca>
Comment 2 gagnon__s 2003-05-19 20:15:17 UTC
I would like to mention, too, that Thierry Thomas thierry@pompo.net help
me to make some tests and gave me some useful hints
And Marwan Burell burell@lri.fr to make some tests.

Thanks
-- 
Serge Gagnon <gagnon__s@videotron.ca>
Comment 3 gagnon__s 2003-05-21 00:24:12 UTC
I have tested this port on 5.1 BETA and it works

-- 
Serge Gagnon <gagnon__s@videotron.ca>
Comment 4 Daichi GOTO freebsd_committer 2003-06-19 07:56:40 UTC
State Changed
From-To: open->closed

Committed. Thanks!