aboutsummaryrefslogtreecommitdiff
path: root/science/jmol/Makefile
blob: 26a678e8df5e9a5cfe8e480ac0324fc88bd0679f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
PORTNAME=	Jmol
DISTVERSION=	14.32.67
CATEGORIES=	science java
MASTER_SITES=	SF/${PORTNAME:tl}/${PORTNAME}/Version%20${DISTVERSION:R}/${PORTNAME}%20${DISTVERSION}/
DISTFILES=	${PORTNAME}-${DISTVERSION}-full${EXTRACT_SUFX}

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Java 3D viewer for chemical structures

LICENSE=	LGPL21
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

USE_JAVA=	yes
USE_ANT=	yes

NO_ARCH=	yes

WRKSRC=		${WRKDIR}/${PORTNAME:tl}-${DISTVERSION}
SIGN_DIR=	${WRKSRC}/selfSignedCertificate
SUB_FILES=	${EXES}
SUB_LIST=	JAVA=${JAVA}

EXES=		${PORTNAME:tl} ${PORTNAME:tl}data
JARS=		${PORTNAME}.jar Jvxl.jar ${PORTNAME}Data.jar # ${PORTNAME}Lib.jar

PLIST_FILES=	${EXES:S/^/bin\//} \
		${JARS:S/^/${JAVAJARDIR}\//}

OPTIONS_DEFINE=		DOCS JSMOL
OPTIONS_DEFAULT=	JSMOL

JSMOL_DESC=		Install JSmol
JSMOL_BUILD_DEPENDS=	unzip>0:archivers/unzip
JSMOL_VARS=		WWWDIR=${PREFIX}/www/JSmol PLIST=${.CURDIR}/pkg-plist-jsmol

PORTDOCS=	*

DESKTOP_ENTRIES="${PORTNAME}" "" "" "${PORTNAME:tl}" "" false

post-patch:
	@${REINPLACE_CMD} 's|<input message="private property file.*||' ${WRKSRC}/build.xml

post-build-JSMOL-on:
	@${MKDIR} ${WRKDIR}${PREFIX}/www
	@${UNZIP_CMD} -d ${WRKDIR}${PREFIX}/www ${WRKSRC}/jsmol.zip

do-install:
.for exe in ${EXES}
	${INSTALL_SCRIPT} ${WRKDIR}/${exe} ${STAGEDIR}${PREFIX}/bin
.endfor
.for jar in ${JARS}
	${INSTALL_DATA} ${WRKSRC}/build/${jar} ${STAGEDIR}${JAVAJARDIR}
.endfor

do-install-JSMOL-on:
	${MKDIR} ${STAGEDIR}${WWWDIR}
	${CP} -r ${WRKDIR}${PREFIX}/www/jsmol/* ${STAGEDIR}${WWWDIR}
	${RM} ${STAGEDIR}${WWWDIR}/debug.log

do-install-DOCS-on:
	cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>