From root@gits.dyndns.org  Thu Mar 15 18:19:20 2001
Return-Path: <root@gits.dyndns.org>
Received: from camus.cybercable.fr (camus.cybercable.fr [212.198.0.200])
	by hub.freebsd.org (Postfix) with SMTP id C6B4037B718
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 15 Mar 2001 18:19:19 -0800 (PST)
	(envelope-from root@gits.dyndns.org)
Received: (qmail 26434093 invoked from network); 16 Mar 2001 02:18:44 -0000
Received: from d165.dhcp212-231.cybercable.fr (HELO gits.dyndns.org) ([212.198.231.165]) (envelope-sender <root@gits.dyndns.org>)
          by camus.cybercable.fr (qmail-ldap-1.03) with SMTP
          for <FreeBSD-gnats-submit@freebsd.org>; 16 Mar 2001 02:18:44 -0000
Received: (from root@localhost)
	by gits.dyndns.org (8.11.3/8.11.3) id f2G2IgL48404;
	Fri, 16 Mar 2001 03:18:42 +0100 (CET)
	(envelope-from root)
Message-Id: <200103160218.f2G2IgL48404@gits.dyndns.org>
Date: Fri, 16 Mar 2001 03:18:42 +0100 (CET)
From: Cyrille Lefevre <clefevre@poboxes.com>
Reply-To: clefevre@poboxes.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: lang/gforth - broken port fixed
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         25841
>Category:       ports
>Synopsis:       lang/gforth - broken port fixed
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lioux
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 15 18:20:01 PST 2001
>Closed-Date:    Thu Mar 22 19:06:18 PST 2001
>Last-Modified:  Thu Mar 22 19:07:02 PST 2001
>Originator:     Cyrille Lefevre
>Release:        FreeBSD 4.3-BETA i386
>Organization:
ACME
>Environment:

System: FreeBSD gits 4.3-BETA FreeBSD 4.3-BETA #11: Wed Mar 14 06:05:05 CET 2001 root@:/disk2/4.x-stable/src/sys/compile/CUSTOM i386

>Description:
	accordingly to fenner's reports, the gforth port is broken.

	Makefile
		updated.
		distributed info files deleted.
		empty dirs and files deleted.

	pkg-plist
		updated.
		info files shrinked.
		empty dirs and files deleted.
		emacs/site-lisp no more deleted.

	files/patch-getopt.c
		new file.

	take care, the following patches are in 2 parts.
	the first one is a diff relative to the gforth and
	the second one is a cvs diff.

>How-To-Repeat:

	http://bento.freebsd.org/errorlogs/3-full/gforth-0.5.0.log

>Fix:

--- /dev/null	Fri Mar 16 01:44:59 2001
+++ files/patch-getopt.c	Fri Mar 16 01:43:19 2001
@@ -0,0 +1,16 @@
+--- engine/getopt.c.orig	Sat Sep 23 20:22:09 2000
++++ engine/getopt.c	Fri Mar 16 01:42:49 2001
+@@ -177,12 +177,12 @@
+   REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+ } ordering, default_ordering = PERMUTE;
+ 
++#include <string.h>
+ #ifdef	__GNU_LIBRARY__
+ /* We want to avoid inclusion of string.h with non-GNU libraries
+    because there are many ways it can cause trouble.
+    On some systems, it contains special magic macros that don't work
+    in GCC.  */
+-#include <string.h>
+ #define	my_index	strchr
+ #define	my_bcopy(src, dst, n)	memcpy ((dst), (src), (n))
+ #else

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/lang/gforth/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- Makefile	2001/02/15 17:01:02	1.3
+++ Makefile	2001/03/16 00:16:54
@@ -13,17 +13,89 @@
 
 MAINTAINER=	clefevre@poboxes.com
 
+#
+# Global variables
+#
+
 CFLAGS=		#none
 STRIP=		#none
 
 GNU_CONFIGURE=	yes
 
-MAN1=		gforth.1
+USE_GMAKE=	yes
+
+ALL_TARGET=	all info
 
-post-install:
-	@install-info ${PREFIX}/info/gforth.info ${PREFIX}/info/dir
-.if !exists(${PREFIX}/share/emacs/site-lisp/gforth.el)
-	@${INSTALL_DATA} ${WRKSRC}/gforth.el ${PREFIX}/share/emacs/site-lisp
+.if make(do-install)
+# DESTDIR isn't honored. fake it w/ prefix.
+MAKE_ARGS=	prefix=${PREFIX}
 .endif
+
+MAN1=		gforth.1
+
+#
+# Local variables
+#
+
+INSTALL_INFO?=	install-info
+
+INFO_FILES=	${PORTNAME}.info
+INFO_DIR=	${PREFIX}/info
+
+EMACS_FILES=	gforth.el
+EMACS_DIR=	${PREFIX}/share/emacs/site-lisp
+
+SHARE_DIR=	${PREFIX}/share/${PORTNAME}
+
+EMPTY_FILES=	siteinit.fs
+FORTH_DIR=	${SHARE_DIR}/site-forth
+
+EMPTY_DIRS=	4stack 6502 8086 avr c165 generic h8 \
+		hppa ia64 m68k misc power shboom sparc
+ARCH_DIR=	${SHARE_DIR}/${PORTVERSION}/arch
+
+#
+# Post-extract
+#
+
+post-extract:
+.for file in ${INFO_FILES}
+	@${RM} -f ${WRKSRC}/doc/${file}*
+.endfor
+
+#
+# Post-patch
+#
+
+post-patch:
+	@${PERL} -pi.fbsd -e 's|makeinfo|makeinfo --no-split|g' \
+		${WRKSRC}/Makefile.in
+
+#
+# Post-install
+#
+
+post-install: install-info install-el \
+	      remove-empty-files remove-empty-dirs
+
+install-info:
+.for file in ${INFO_FILES}
+	@${INSTALL_INFO} ${INFO_DIR}/${file} ${INFO_DIR}/dir
+.endfor
+
+install-el:
+.for file in ${EMACS_FILES}
+	@${INSTALL_DATA} ${WRKSRC}/${file} ${EMACS_DIR}/${file}
+.endfor
+
+remove-empty-files:
+.for file in ${EMPTY_FILES}
+	@${RM} -f ${FORTH_DIR}/${file}
+.endfor
+
+remove-empty-dirs:
+.for dir in ${EMPTY_DIRS}
+	@${RMDIR} ${ARCH_DIR}/${dir}
+.endfor
 
 .include <bsd.port.mk>
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/lang/gforth/pkg-plist,v
retrieving revision 1.1
diff -u -r1.1 pkg-plist
--- pkg-plist	2000/10/21 19:29:01	1.1
+++ pkg-plist	2001/03/16 00:24:36
@@ -1,3 +1,4 @@
+@comment $FreeBSD$
 bin/gforth-0.5.0
 @exec ln -fs %f %B/gforth
 @unexec rm -f %B/gforth
@@ -9,23 +10,10 @@
 @unexec rm -f %B/gforthmi
 @unexec install-info --delete %D/info/gforth.info %D/info/dir
 info/gforth.info
-info/gforth.info-1
-info/gforth.info-10
-info/gforth.info-11
-info/gforth.info-12
-info/gforth.info-13
-info/gforth.info-14
-info/gforth.info-2
-info/gforth.info-3
-info/gforth.info-4
-info/gforth.info-5
-info/gforth.info-6
-info/gforth.info-7
-info/gforth.info-8
-info/gforth.info-9
 @exec install-info %D/info/gforth.info %D/info/dir
 lib/gforth/0.5.0/gforth-ditc
 lib/gforth/0.5.0/gforth.fi
+@exec [ -d %D/lib/gforth/site-forth ] || mkdir %D/lib/gforth/site-forth
 share/emacs/site-lisp/gforth.el
 share/gforth/0.5.0/TAGS
 share/gforth/0.5.0/add.fs
@@ -179,7 +167,7 @@
 share/gforth/0.5.0/vt100key.fs
 share/gforth/0.5.0/wordinfo.fs
 share/gforth/0.5.0/wordsets.fs
-share/gforth/site-forth/siteinit.fs
+@exec [ -d %D/share/gforth/site-forth ] || mkdir %D/share/gforth/site-forth
 @dirrm share/gforth/site-forth
 @dirrm share/gforth/0.5.0/test
 @dirrm share/gforth/0.5.0/kernel
@@ -187,28 +175,12 @@
 @dirrm share/gforth/0.5.0/doc
 @dirrm share/gforth/0.5.0/compat
 @dirrm share/gforth/0.5.0/asm
-@dirrm share/gforth/0.5.0/arch/sparc
-@dirrm share/gforth/0.5.0/arch/shboom
-@dirrm share/gforth/0.5.0/arch/power
-@dirrm share/gforth/0.5.0/arch/misc
 @dirrm share/gforth/0.5.0/arch/mips
-@dirrm share/gforth/0.5.0/arch/m68k
-@dirrm share/gforth/0.5.0/arch/ia64
-@dirrm share/gforth/0.5.0/arch/hppa
-@dirrm share/gforth/0.5.0/arch/h8
-@dirrm share/gforth/0.5.0/arch/generic
-@dirrm share/gforth/0.5.0/arch/c165
-@dirrm share/gforth/0.5.0/arch/avr
 @dirrm share/gforth/0.5.0/arch/alpha
-@dirrm share/gforth/0.5.0/arch/8086
-@dirrm share/gforth/0.5.0/arch/6502
-@dirrm share/gforth/0.5.0/arch/4stack
 @dirrm share/gforth/0.5.0/arch/386
 @dirrm share/gforth/0.5.0/arch
 @dirrm share/gforth/0.5.0
 @dirrm share/gforth
-@unexec rmdir %D/share/emacs/site-lisp 2>/dev/null || true
-@unexec rmdir %D/share/emacs 2>/dev/null || true
 @dirrm lib/gforth/site-forth
 @dirrm lib/gforth/0.5.0
 @dirrm lib/gforth
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->lioux 
Responsible-Changed-By: lioux 
Responsible-Changed-When: Sat Mar 17 19:23:25 PST 2001 
Responsible-Changed-Why:  
I'll handle this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25841 
State-Changed-From-To: open->closed 
State-Changed-By: lioux 
State-Changed-When: Thu Mar 22 19:06:18 PST 2001 
State-Changed-Why:  
Committed with minor port's system style changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25841 
>Unformatted:
