Bug 64703 - Update port: java/jdom [PATCH]
Summary: Update port: java/jdom [PATCH]
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: java (show other bugs)
Version: 5.2.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ernst de Haan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-25 13:20 UTC by Hervé Quiroz
Modified: 2004-04-15 21:48 UTC (History)
0 users

See Also:


Attachments
file.diff (22.99 KB, patch)
2004-03-25 13:20 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-03-25 13:20:15 UTC
- Now using JAVAJARDIR instead of PREFIX/share/java/classes
- Now using PORTDOCS macro (to reduce pkg-plist size and fix the apidocs
  deinstall issue with some JDKs)
- Now using PLIST_FILES macro (to reduce pkg-plist size)
- No longer installing JARs from 'lib' directory (but rather have them declared
  as run dependencies)
- No longer installing junk files (such as perl CVS commiter scripts)
- No longer installing class nor source files
- Now installing samples in EXAMPLESDIR
- Now installing README and such in DOCSDIR
- Will not install docs and samples when NOPORTDOCS is set
- Bumped PORTREVISION

NOTE: For now, the only run dependency is Jaxen (required by JDom for XPath
queries) but we should probably add Xerces-J as well (at least only the APIs
JAR file).
Comment 1 Greg Lewis freebsd_committer 2004-04-02 01:46:36 UTC
Responsible Changed
From-To: freebsd-java->glewis

I'll take this.
Comment 2 Greg Lewis freebsd_committer 2004-04-02 17:55:04 UTC
Responsible Changed
From-To: glewis->znerd

Oops.  Over to maintainer.
Comment 3 Hervé Quiroz 2004-04-03 17:37:20 UTC
Some changes:

- bsd.java.mk 2.0 compliant
- mkdir ${JAVAJARDIR} (just in case)



--- Makefile.orig	Thu Mar 25 14:06:25 2004
+++ Makefile	Sat Apr  3 18:34:08 2004
@@ -7,6 +7,7 @@
 
 PORTNAME=	jdom
 PORTVERSION=	1.0b9
+PORTREVISION=	1
 CATEGORIES=	java
 MASTER_SITES=	http://www.jdom.org/dist/source/
 DISTNAME=	${PORTNAME}-${PORTVERSION:C/[0-9]*\.[0-9]*//}
@@ -15,29 +16,43 @@
 COMMENT=	Java library for accessing and manipulating XML documents
 
 BUILD_DEPENDS=	${ANT}:${PORTSDIR}/devel/apache-ant
+RUN_DEPENDS=	${JAVAJARDIR}/jaxen-jdom.jar:${PORTSDIR}/java/jaxen
 
-USE_JAVA=	1.2+
+USE_JAVA=	yes
+JAVA_VERSION=	1.2+
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:C/[0-9]*\.[0-9]*//}
-PLIST_SUB+=	T=${TARGET_DIR:S/^${PREFIX}\///}
-TARGET_DIR?=	${PREFIX}/share/java/${PORTNAME}-${PORTVERSION}
 ANT?=		${LOCALBASE}/bin/ant
-ANT_TARGET=	package javadoc
+ANT_TARGET=	package
+.if !defined(NOPORTDOCS)
+ANT_TARGET+=	javadoc
+OTHERDOCS=	README.txt TODO.txt CHANGES.txt COMMITTERS.txt LICENSE.txt
+PORTDOCS=	apidocs ${OTHERDOCS}
+.endif
+
+PLIST_FILES=	${JAVAJARDIR:S,^${PREFIX}/,,}/jdom.jar
 
 do-build:
 	@cd ${WRKSRC} && ${ANT} ${ANT_TARGET}
 
 do-install:
-	@${ECHO} -n ">> Creating directory ${TARGET_DIR}..."
-	@${MKDIR} ${TARGET_DIR}
-	@${ECHO} " [ DONE ]"
-
-	@${ECHO} -n ">> Copying files..."
-	@${CP} -r ${WRKSRC}/* ${TARGET_DIR}
-	@${ECHO} " [ DONE ]"
-
-	@${ECHO} -n ">> Installing JAR..."
-	@${CP} ${WRKSRC}/build/jdom.jar ${PREFIX}/share/java/classes/
+	@${ECHO} -n ">> Installing JAR in ${JAVAJARDIR}..."
+	@${MKDIR} ${JAVAJARDIR}
+	@${CP} ${WRKSRC}/build/jdom.jar ${JAVAJARDIR}/
+	@${ECHO} " jdom.jar [ DONE ]"
+.if !defined(NOPORTDOCS)
+	@${ECHO} -n ">> Installing samples in ${EXAMPLESDIR}..."
+	@${MKDIR} ${EXAMPLESDIR}
+	@${CP} -r ${WRKSRC}/samples/* ${EXAMPLESDIR}/
 	@${ECHO} " [ DONE ]"
+	@${ECHO} -n ">> Installing documentation in ${DOCSDIR}..."
+	@${MKDIR} ${DOCSDIR}
+.for PORTDOC in ${OTHERDOCS}
+	@${CP} ${WRKSRC}/${PORTDOC} ${DOCSDIR}/
+	@${ECHO} -n " ${PORTDOC}"
+.endfor
+	@${CP} -r ${WRKSRC}/build/apidocs ${DOCSDIR}/
+	@${ECHO} " apidocs [ DONE ]"
+.endif
 
 .include <bsd.port.mk>
Comment 4 Ernst de Haan freebsd_committer 2004-04-15 21:42:15 UTC
State Changed
From-To: open->closed

Committed, thanks!