summaryrefslogtreecommitdiff
path: root/graphics/PanoTools/Makefile
blob: 4f323b7c48139d50ec0a8fd727f9f03473364540 (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
# $NetBSD: Makefile,v 1.23 2012/10/06 14:10:40 asau Exp $
#

DISTNAME=		PanoTools
PKGNAME=		${DISTNAME}-2.6b1
PKGREVISION=		3
CATEGORIES=		graphics java
MASTER_SITES=		http://www.path.unimelb.edu.au/~dersch/

MAINTAINER=		pkgsrc-users@NetBSD.org
HOMEPAGE=		http://www.path.unimelb.edu.au/~dersch/
COMMENT=		View, create, edit, and remap panoramic images

EMUL_PLATFORMS=		linux-i386
EMUL_MODULES.linux=	base jpeg png tiff

WRKSRC=			${WRKDIR}/PTLinux
BUILD_DIRS=		# empty
USE_JAVA=		run

PKG_JVM?=		sun-jdk
PLIST_SUBST+=		JAVA_HOME="${PKG_JAVA_HOME:C/^${PREFIX}\///}"

INSTALLATION_DIRS=	bin lib ${EMULDIR}/lib libexec/PanoTools \
			${PKG_JAVA_HOME}/lib/${MACHINE_ARCH} \
			share/PanoTools/Templates share/doc/PanoTools

do-install:
	${INSTALL_DATA} ${WRKSRC}/libpano12.so ${DESTDIR}${EMULDIR}/lib
	${LN} -s ${EMULDIR}/lib/libpano12.so				\
		${DESTDIR}${PKG_JAVA_HOME}/lib/${MACHINE_ARCH}/libpano12.lib.so
.for jar in ptcrypt pteditor ptpicker
	${INSTALL_DATA} ${WRKSRC}/${jar}.jar				\
		${DESTDIR}${PREFIX}/share/PanoTools
.endfor
.for doc in Readme.html Readme.txt Copyright/COPYRIGHT_TIFF		\
	Copyright/Copying.html Copyright/README_JPEG			\
	Scripts/Optimizer_Script.txt Scripts/Stitcher_Script.txt
	${INSTALL_DATA} ${WRKSRC}/${doc} ${DESTDIR}${PREFIX}/share/doc/PanoTools
.endfor
.for bin in ptcrypt pteditor ptpicker
	${SED} < ${FILESDIR}/ptfile.sh > ${WRKDIR}/${bin}		\
		-e 's|@@prefix@@|${PREFIX}|g'				\
		-e 's|@@javahome@@|${PKG_JAVA_HOME}|g'			\
		-e 's|@@ptfile@@|${bin}|g'
	${INSTALL_SCRIPT} ${WRKDIR}/${bin} ${DESTDIR}${PREFIX}/bin
.endfor
	${SED} < ${FILESDIR}/mkpthelpers.sh > ${WRKDIR}/mkpthelpers	\
		-e 's|@@prefix@@|${PREFIX}|g'				\
		-e 's|@@javahome@@|${PKG_JAVA_HOME}|g'			\
		-e 's|@@ptfile@@|${bin}|g'
	${INSTALL_SCRIPT} ${WRKDIR}/mkpthelpers ${DESTDIR}${PREFIX}/bin
.for bin in PTAverage PTInterpolate PTMorpher PTOptimizer PTStereo	\
	PTStitcher PTStripe
	${INSTALL_SCRIPT} ${WRKSRC}/Helpers/${bin}			\
		${DESTDIR}${PREFIX}/libexec/PanoTools
	[ ! -f ${WRKSRC}/Helpers/${bin}.txt ] ||			\
	${INSTALL_DATA} ${WRKSRC}/Helpers/${bin}.txt			\
		${DESTDIR}${PREFIX}/share/doc/PanoTools
.endfor
.for hlp in 3DMF_HEADER 3DMF_TRIMESH INDEXED_FACE_FMT LP_ivr		\
	LPjava_html LPjava_ivr VRML_HEADER vrml_wrl
	${INSTALL_DATA} ${WRKSRC}/Helpers/Templates/${hlp}		\
		${DESTDIR}${PREFIX}/share/PanoTools/Templates
.endfor

.include "../../mk/java-vm.mk"
.include "../../mk/bsd.pkg.mk"