summaryrefslogtreecommitdiff
path: root/graphics/radiance/Makefile
blob: 2b9b125cd62bc744ea2b6daa29746f4639514c90 (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# $NetBSD: Makefile,v 1.15 2006/04/28 16:55:10 joerg Exp $
#

DISTNAME=	rad3R6P1
PKGNAME=	radiance-3.6.1
PKGREVISION=	3
CATEGORIES=	graphics
MASTER_SITES=	http://www.radiance-online.org/software/non-cvs/	\
		http://www.radiance-online.org/software/
DISTFILES+=	${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}supp${EXTRACT_SUFX}

MAINTAINER=	jschauma@NetBSD.org
HOMEPAGE=	http://www.radiance-online.org/
COMMENT=	Physically-based, image-generating, backward raytracer

WRKSRC=		${WRKDIR}/ray

LICENSE=	radiance-license

PATCHEES=	makeall ./src/rt/Rmakefile ./src/util/Rmakefile		\
		./src/ot/Rmakefile ./src/meta/Rmakefile 		\
		./src/hd/Rmakefile ./src/gen/Rmakefile 			\
		./src/cv/Rmakefile ./src/common/Rmakefile 		\
		./src/cal/Rmakefile installib				\
		./src/cv/mgflib/Makefile ./src/meta/lib4014/Makefile 	\
		./src/px/Rmakefile					\
		./src/px/tiff/contrib/acorn/Makefile 			\
		./src/px/tiff/contrib/addtiffo/Makefile  		\
		./src/px/tiff/contrib/iptcutil/Makefile

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

.if ${OPSYS} == "NetBSD"
PKGSRC_ARCH=	9
PLIST_SUBST+=	USE_GL="@comment "
.elif ${OPSYS} == "FreeBSD"
PKGSRC_ARCH=	8
PLIST_SUBST+=	USE_GL="@comment "
.elif ${OPSYS} == "DragonFly"
PKGSRC_ARCH=	12
PLIST_SUBST+=	USE_GL="@comment "
.elif ${OPSYS} == "Linux"
PLIST_SUBST+=	USE_GL="@comment "
PKGSRC_ARCH=	6
.elif ${OPSYS} == "IRIX"
PKGSRC_ARCH=	3
PLIST_SUBST+=	USE_GL=""
.endif

MAKE_ENV+=	MV=${MV:Q} RM=${RM:Q} CP=${CP:Q}			\
		INSTALL_SCRIPT=${INSTALL_SCRIPT:Q} 			\
		INSTALL_PROGRAM=${INSTALL_PROGRAM:Q}			\
		RANLIB=${RANLIB:Q} AR=${AR:Q}

do-configure:
.for patchee in ${PATCHEES}
	${SED} -e 's|@PREFIX@|${PREFIX}|g' 				\
		-e 's|@PKGSRC_ARCH@|${PKGSRC_ARCH}|g'			\
		-e 's|@WRKSRC@|${WRKSRC}|g'				\
		-e 's|@X11BASE@|${X11BASE}|g'				\
		-e 's|@MAKE@|${MAKE}|g'					\
		${WRKSRC}/${patchee} >	${WRKSRC}/${patchee}.tmp &&	\
	${MV} ${WRKSRC}/${patchee}.tmp ${WRKSRC}/${patchee}
.endfor
	${RM} ${WRKSRC}/lib/.gdb_history

do-build:
	cd ${WRKSRC} && ${MAKE_ENV} csh ./makeall install
	@${RM} -f ${WRKSRC}/radiance/bin/wish*

do-install:
	${INSTALL_DATA_DIR} ${PREFIX}/radiance
	cd ${WRKSRC}/radiance && ${PAX} -rw . ${PREFIX}/radiance/
	${INSTALL_DATA_DIR} ${PREFIX}/radiance/obj
	cd ${WRKSRC}/obj && ${PAX} -rw . ${PREFIX}/radiance/obj/
	${INSTALL_DATA_DIR} ${PREFIX}/radiance/lib
	cd ${WRKSRC}/lib && ${PAX} -rw . ${PREFIX}/radiance/lib/
	${INSTALL_DATA_DIR} ${PREFIX}/radiance/man
	cd ${WRKSRC}/doc/man && ${PAX} -rw . ${PREFIX}/radiance/man/
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/radiance
	${INSTALL_DATA} ${WRKSRC}/doc/pdf/*.pdf ${PREFIX}/share/doc/radiance/
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/html/radiance
	${INSTALL_DATA} ${WRKSRC}/doc/ray.html ${PREFIX}/share/doc/radiance/index.html

.include "../../graphics/tiff/buildlink3.mk"
.include "../../x11/tk/buildlink3.mk"
.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"