summaryrefslogtreecommitdiff
path: root/biology/rasmol/Makefile
blob: 395633830167989778d499d530ffb5cd1a4ed7ea (plain)
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
64
65
# $NetBSD: Makefile,v 1.31 2010/12/30 08:33:47 obache Exp $

DISTNAME=	RasMol_2.7.3
PKGNAME=	rasmol-2.7.3
PKGREVISION=	2
CATEGORIES=	biology
MASTER_SITES=	http://www.bernstein-plus-sons.com/software/

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.bernstein-plus-sons.com/software/rasmol/
COMMENT=	Molecular Graphics Visualisation Tool

PKG_DESTDIR_SUPPORT=	user-destdir

WRKSRC=		${WRKDIR}/${DISTNAME}/src
USE_IMAKE=	YES
USE_TOOLS+=	gunzip mkdirhier

MAKE_ENV+=	DEPTHDEF=${DEPTHDEF:Q}

.include "../../mk/bsd.prefs.mk"

.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32"
GCC_REQD+=		2.95.3
.endif

.if defined(RASMOL_DEPTH)
.  if ${RASMOL_DEPTH} == 32
DEPTHDEF=	-DTHIRTYTWOBIT
.  elif ${RASMOL_DEPTH} == 16
DEPTHDEF=	-DSIXTEENBIT
.  endif
.endif
DEPTHDEF?=	-DEIGHTBIT

pre-configure:
	${LN} -sf ${WRKDIR}/${DISTNAME}/doc  ${WRKSRC}
	${LN} -sf ${WRKDIR}/${DISTNAME}/data ${WRKSRC}
	cd ${WRKSRC} && ${SED} "s#@@PREFIX@@#${PREFIX}#" rasmol.h > \
		rasmol.h.new && ${MV} rasmol.h.new rasmol.h

post-extract:
	cd ${WRKSRC} && ${RM} -rf RCS doc/RCS src/RCS src/msc/RCS

post-install:
	${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/NOTICE ${DESTDIR}${PREFIX}/share/doc/rasmol
	for doc in manualA4.pdf.gz manualA4.ps.gz manualA4.rtf.gz	\
			manualUS.pdf.gz manualUS.ps.gz manualUS.rtf.gz	\
			refcardA4.pdf.gz refcardA4.ps.gz		\
			refcardA4.rtf.gz refcardUS.pdf.gz		\
			refcardUS.ps.gz refcardUS.rtf.gz; do		\
		${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/doc/$$doc		\
			${DESTDIR}${PREFIX}/share/doc/rasmol;		\
	done
	for data in 1crn.pdb 1gpd.pdb.gz 1ldb.pdb.gz 1ldm.pdb.gz	\
			3cro.pdb 4hir.ent.gz 4ins.CIF 7lyz.pdb		\
			IUCR9800028.cif asprin.alc pdb2mcg.ent; do	\
		${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/data/$$data	\
			${DESTDIR}${PREFIX}/share/examples/rasmol;	\
	done

.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/libXi/buildlink3.mk"
.include "../../x11/xextproto/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"