Bug 65067 - [PATCH] textproc/xp: USE_JAVA, (NO)PORTDOCS/DOCSDIR, JAVAJARDIR
Summary: [PATCH] textproc/xp: USE_JAVA, (NO)PORTDOCS/DOCSDIR, JAVAJARDIR
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-02 11:40 UTC by Hervé Quiroz
Modified: 2004-05-16 23:41 UTC (History)
1 user (show)

See Also:


Attachments
xp-0.5.patch (16.13 KB, patch)
2004-04-02 11:40 UTC, Hervé Quiroz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hervé Quiroz 2004-04-02 11:40:21 UTC
- use JAVAJARDIR macro provided by bsd.java.mk
- use USE_JAVA to depend on any available JDK that fits (version >= 1.1)
- honor NOPORTDOCS (do not install documentation when it is set)
- honor DOCSDIR (install documentation in the same place as for any other port)
- use PLIST_FILES and PORTDOCS macros (thus no more pkg-plist)

NOTE: I would rather install the JAR with no version number suffix as this is
the case for most Java ports. But people are probably used to the existing
scheme so I didn't make any change to it (if you ask I will provide a patch for
this as well -- simple as only DESTJARFILE needs to be changed).

NOTE2: The port does not install source files anymore. Please tell me if this
is a problem.

Port maintainer (mike@vee.net) is cc'd.

Generated with FreeBSD Port Tools 0.50
Comment 1 Hervé Quiroz 2004-04-03 17:18:43 UTC
A quick update:

- now bsd.java.mk 2.0 compliant
- bumped PORTREVISION
- removed some useless statement


--- Makefile.orig	Sat Apr  3 18:02:53 2004
+++ Makefile	Sat Apr  3 18:04:44 2004
@@ -7,6 +7,7 @@
 
 PORTNAME=	xp
 PORTVERSION=	0.5
+PORTREVISION=	1
 CATEGORIES=	textproc java
 MASTER_SITES=	ftp://ftp.jclark.com/pub/xml/
 DISTNAME=	${PORTNAME}
@@ -14,23 +15,33 @@
 MAINTAINER=	mike@vee.net
 COMMENT=	An XML parser written in Java
 
-RUN_DEPENDS=	${LOCALBASE}/jdk1.1.8/bin/java:${PORTSDIR}/java/jdk11
-
-PLIST_SUB+=	XP_VERSION=${PORTVERSION}
+USE_JAVA=	yes
+JAVA_VERSION=	1.1+
 
 NO_WORKSUBDIR=	yes
 NO_BUILD=	yes
 USE_ZIP=	yes
 
-.include <bsd.port.pre.mk>
+.if !defined(NOPORTDOCS)
+PORTDOCS=	api copying.txt index.html
+.endif
+JARFILE=	${PORTNAME}.jar
+DESTJARFILE=	${PKGNAME}.jar
+PLIST_FILES+=	${JAVAJARDIR:S,^${PREFIX}/,,}/${DESTJARFILE}
 
 do-install:
-	${MKDIR} ${PREFIX}/share/java/classes ${PREFIX}/share/java/${PKGNAME}
-	${INSTALL_DATA} \
-		${WRKDIR}/xp.jar \
-		${PREFIX}/share/java/classes/${PKGNAME}.jar
-	cd ${WRKDIR}; \
-		${CP} -R docs ${PREFIX}/share/java/${PKGNAME}; \
-		${CP} -R com ${PREFIX}/share/java/${PKGNAME}
+	@${ECHO_CMD} -n ">> Installing JAR as ${JAVAJARDIR}/${DESTJARFILE}..."
+	@${MKDIR} ${JAVAJARDIR}
+	@${INSTALL_DATA} ${WRKDIR}/xp.jar ${JAVAJARDIR}/${DESTJARFILE}
+	@${ECHO_CMD} " [ DONE ]"
+.if !defined(NOPORTDOCS)
+	@${ECHO_CMD} -n ">> Installing documentation in ${DOCSDIR}..."
+	@${MKDIR} ${DOCSDIR}
+.for DOCFILE in ${PORTDOCS}
+	@${CP} -r ${WRKDIR}/docs/${DOCFILE} ${DOCSDIR}/
+	@${ECHO_CMD} -n " ${DOCFILE}"
+.endfor
+	@${ECHO_CMD} " [ DONE ]"
+.endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2004-04-04 03:06:40 UTC
State Changed
From-To: open->feedback

Set to feedback to note that maintainer has been asked for approval.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2004-05-16 23:41:21 UTC
State Changed
From-To: feedback->closed

Committed after maintainer timeout (6 weeks).