summaryrefslogtreecommitdiff
path: root/biology/xdrawchem/Makefile
blob: 2d2717310089c66ddac47db3b10fd26a63a5c366 (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
# New ports collection makefile for:	xdrawchem
# Date created:				13 April 2000
# Whom:					Trevor Johnson <trevor@jpj.net>
#
# $FreeBSD$
#

PORTNAME=	xdrawchem
PORTVERSION=	0.99.7
CATEGORIES=	biology
MASTER_SITES=	http://www.prism.gatech.edu/~gte067k/xdrawchem/
EXTRACT_SUFX=	.tgz

MAINTAINER=	trevor@FreeBSD.org

MAKE_ENV=	QTDIR="${X11BASE}"
PLIST=		${WRKDIR}/pkg-plist
USE_GMAKE=	yes
USE_QT_VER=	2
USE_X_PREFIX=	yes
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:S/a//}

pre-build:
	cd ${WRKSRC}; \
		${CXX} ${CXXFLAGS} -O0 -c -DRINGHOME="\"${PREFIX}/share/xdrawchem/\"" -I${X11BASE}/include/qt2 -o molecule_tools.o molecule_tools.cpp

pre-install:
	${ECHO_CMD} bin/xdrawchem > ${PLIST}
	${LS} ${WRKSRC}/ring | \
		${SED} -e 's:^:share/xdrawchem/:' >> ${PLIST}
	${ECHO_CMD} @dirrm share/xdrawchem >> ${PLIST}
.if !defined(NOPORTDOCS)
	cd ${WRKSRC} && ${LS} *txt | \
		${SED} -e 's:^:share/doc/xdrawchem/:' >> ${PLIST}
	${ECHO_CMD} @dirrm share/doc/xdrawchem >> ${PLIST}
	${LS} ${WRKSRC}/save | \
		${SED} -e 's:^:share/examples/xdrawchem/:' >> ${PLIST}
	${ECHO_CMD} @dirrm share/examples/xdrawchem >> ${PLIST}
.endif

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/xdrawchem ${PREFIX}/bin
	${MKDIR} ${DATADIR}
	${INSTALL_DATA} ${WRKSRC}/ring/* ${DATADIR}
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR} ${EXAMPLESDIR}
	${INSTALL_DATA} ${WRKSRC}/save/* ${EXAMPLESDIR}
	${INSTALL_DATA} ${WRKSRC}/*txt ${DOCSDIR}
.endif

.include <bsd.port.mk>