From stolz@i2.informatik.rwth-aachen.de  Wed Feb 19 08:45:43 2003
Return-Path: <stolz@i2.informatik.rwth-aachen.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 6138B37B401; Wed, 19 Feb 2003 08:45:43 -0800 (PST)
Received: from atlas.informatik.rwth-aachen.de (atlas.Informatik.RWTH-Aachen.DE [137.226.194.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id A6D6B43FAF; Wed, 19 Feb 2003 08:45:39 -0800 (PST)
	(envelope-from stolz@i2.informatik.rwth-aachen.de)
Received: from menelaos.informatik.rwth-aachen.de (menelaos.Informatik.RWTH-Aachen.DE [137.226.194.73])
	by atlas.informatik.rwth-aachen.de (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with ESMTP id h1JGjcW06585;
	Wed, 19 Feb 2003 17:45:38 +0100
Received: (from stolz@localhost)
	by menelaos.informatik.rwth-aachen.de (8.12.6/8.12.6/Submit) id h1JGjorm022040;
	Wed, 19 Feb 2003 17:45:50 +0100 (CET)
	(envelope-from stolz)
Message-Id: <200302191645.h1JGjorm022040@menelaos.informatik.rwth-aachen.de>
Date: Wed, 19 Feb 2003 17:45:50 +0100 (CET)
From: Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
Reply-To: Volker Stolz <stolz@i2.informatik.rwth-aachen.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: znerd@freebsd.org
Subject: [patch] Unbreak java/jlint on -current (bento)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         48464
>Category:       ports
>Synopsis:       [patch] Unbreak java/jlint on -current (bento)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    znerd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 19 08:50:11 PST 2003
>Closed-Date:    Mon Mar 03 13:37:34 PST 2003
>Last-Modified:  Mon Mar 03 13:37:34 PST 2003
>Originator:     Volker Stolz
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
Lehrstuhl fr Informatik II
>Environment:
System: FreeBSD menelaos.informatik.rwth-aachen.de 4.7-STABLE FreeBSD 4.7-STABLE #2: Fri Feb 7 12:48:00 CET 2003 root@menelaos.informatik.rwth-aachen.de:/usr/src/sys/compile/MENELAOS i386


>Description:
- unbreak with new gcc on -current ('using namespace std')
- CFLAGS/env police
- condense port's Makefile
- install additional shell script
- install documentation (honour NOPORTDOCS)
- tested on: -STABLE, -CURRENT
>How-To-Repeat:
>Fix:
Two new patch files:
- files/patch-Makefile
- files/patch-field_desc.hh

diff -urN jlint.orig/Makefile jlint/Makefile
--- jlint.orig/Makefile	Tue Nov 27 13:22:20 2001
+++ jlint/Makefile	Wed Feb 19 17:39:19 2003
@@ -13,15 +13,20 @@
 
 MAINTAINER=	znerd@FreeBSD.org
 
-PLIST_SUB+=	T=${TARGET_DIR:S/^${PREFIX}\///}
-TARGET_DIR?=	${PREFIX}/bin
+USE_REINPLACE=	YES
 
 .include <bsd.port.pre.mk>
 
+post-patch:
+	@${REINPLACE_CMD} -e 's,/bin/bash,/bin/sh,' ${WRKSRC}/jlint.sh
+
 do-install:
-	${MKDIR} ${TARGET_DIR}
-	${CP} ${WRKSRC}/jlint ${TARGET_DIR}
-	${CP} ${WRKSRC}/antic ${TARGET_DIR}
-	${CHMOD} 755 ${TARGET_DIR}/jlint ${TARGET_DIR}/antic
+	${INSTALL_PROGRAM} ${WRKSRC}/jlint ${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/antic ${PREFIX}/bin
+	${INSTALL_SCRIPT} ${WRKSRC}/jlint.sh ${PREFIX}/bin
+.if !defined(NOPORTDOCS)
+	${MKDIR} ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/manual.pdf ${WRKSRC}/manual.html ${DOCSDIR}
+.endif
 
 .include <bsd.port.post.mk>
diff -urN jlint.orig/files/patch-Makefile jlint/files/patch-Makefile
--- jlint.orig/files/patch-Makefile	Thu Jan  1 01:00:00 1970
+++ jlint/files/patch-Makefile	Wed Feb 19 17:21:27 2003
@@ -0,0 +1,31 @@
+--- Makefile.orig	Wed Feb 19 17:20:06 2003
++++ Makefile	Wed Feb 19 17:21:13 2003
+@@ -3,8 +3,8 @@
+ # Makefile for Unix and GNU/Linux with gcc/g++ compiler
+ # Edit here:
+ 
+-CC=gcc
+-CPP=g++
++CC?=gcc
++CPP=$(CXX)
+ 
+ # Hints:
+ # if you use egcs-2.90.* version of GCC please add option -fno-exceptions 
+@@ -18,7 +18,7 @@
+ 
+ # Optimized version
+ 
+-CFLAGS = -c -Wall -O2 -g -DSLIST
++CFLAGS += -c
+ # add -DHASH_TABLE for extra speed (may sometimes produce inconsistent results)
+ 
+ # Optimized version with switched off asserts
diff -urN jlint.orig/files/patch-field_desc.hh jlint/files/patch-field_desc.hh
--- jlint.orig/files/patch-field_desc.hh	Thu Jan  1 01:00:00 1970
+++ jlint/files/patch-field_desc.hh	Wed Feb 19 17:22:24 2003
@@ -0,0 +1,13 @@
+--- field_desc.hh.orig	Wed Feb 19 17:20:15 2003
++++ field_desc.hh	Wed Feb 19 17:22:10 2003
+@@ -1,10 +1,7 @@
+ #ifndef FIELD_DESC_HH
+ #define FIELD_DESC_HH
+ 
+-#ifdef VISUAL_CPP
+ using namespace std;
+-#pragma warning (disable : 4786)
+-#endif
+ 
+ #include "component_desc.hh"
+ #include "utf_string.hh"
diff -urN jlint.orig/pkg-plist jlint/pkg-plist
--- jlint.orig/pkg-plist	Mon Jun 25 06:00:58 2001
+++ jlint/pkg-plist	Wed Feb 19 17:39:28 2003
@@ -1,2 +1,6 @@
-%%T%%/jlint
-%%T%%/antic
+bin/jlint
+bin/jlint.sh
+bin/antic
+%%PORTDOCS%%share/doc/jlint/manual.pdf
+%%PORTDOCS%%share/doc/jlint/manual.html
+%%PORTDOCS%%@dirrm share/doc/jlint
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->znerd 
Responsible-Changed-By: arved 
Responsible-Changed-When: Wed Feb 19 09:54:42 PST 2003 
Responsible-Changed-Why:  
Over to Maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48464 
State-Changed-From-To: open->closed 
State-Changed-By: znerd 
State-Changed-When: Mon Mar 3 13:37:08 PST 2003 
State-Changed-Why:  
Committed, thanks a lot! 

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