Bug 101712 - [MAINTAINER UPDATE] [PATCH] Fix the build for java/jflex
Summary: [MAINTAINER UPDATE] [PATCH] Fix the build for java/jflex
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Herve Quiroz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-09 15:10 UTC by Conor McDermottroe
Modified: 2006-08-22 21:34 UTC (History)
0 users

See Also:


Attachments
file.diff (595 bytes, patch)
2006-08-09 15:10 UTC, Conor McDermottroe
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conor McDermottroe 2006-08-09 15:10:10 UTC
	The build of JFlex needs to be bootstrapped with a pre-built version of
	JFlex. The previous method of handling this in the port didn't actually
	work, unfortunately, since I had a previous install of JFlex when I tested
	it I didn't notice.

	The patch below should remedy this situation.
Comment 1 Herve Quiroz freebsd_committer freebsd_triage 2006-08-12 23:41:33 UTC
Responsible Changed
From-To: freebsd-ports-bugs->hq

I'll handle this.
Comment 2 Herve Quiroz freebsd_committer freebsd_triage 2006-08-12 23:46:23 UTC
State Changed
From-To: open->feedback

Looks like junit.jar is still needed: 

[javac] /tmp/jflex/work/jflex-1.4.1/src/JFlex/tests/AllTests.java:23: package junit.framework does not exist 
[javac] import junit.framework.Test; 
[javac]                        ^
Comment 3 Conor McDermottroe 2006-08-14 14:08:24 UTC
D'Oh! Mental note: always unset CLASSPATH before testing Java patches. :-)

My apologies.

The following patch should work:

diff -ruN jflex.orig/Makefile jflex/Makefile
--- jflex.orig/Makefile Mon Aug 14 13:59:15 2006
+++ jflex/Makefile  Mon Aug 14 14:00:12 2006
@@ -24,13 +24,18 @@
 USE_ANT=   yes
 BUILD_WRKSRC=  ${WRKSRC}/src
 ALL_TARGET=    jar
-MAKE_ENV+=
CLASSPATH="${DISTDIR}/JFlex.jar:${DISTDIR}/java_cup.jar:${JAVALIBDIR}/junit.jar"
+MAKE_ENV+= CLASSPATH="${JAVALIBDIR}/junit.jar"

 .if !defined(NOPORTDOCS)
 PORTDOCS=  *
 .endif

 SUB_FILES= jflex.sh
+
+post-extract:
+   ${MKDIR} ${WRKSRC}/tools
+   ${CP} ${DISTDIR}/JFlex.jar ${WRKSRC}/tools/
+   ${CP} ${DISTDIR}/java_cup.jar ${WRKSRC}/tools/

 do-install:
    ${INSTALL_SCRIPT} ${WRKDIR}/jflex.sh ${PREFIX}/bin/jflex
Comment 4 Herve Quiroz freebsd_committer freebsd_triage 2006-08-14 16:30:09 UTC
State Changed
From-To: feedback->open

Feedback received: new patch submitted.
Comment 5 Herve Quiroz freebsd_committer freebsd_triage 2006-08-22 21:34:44 UTC
State Changed
From-To: open->closed

Patch commited. 

Thanks for your contribution!