summaryrefslogtreecommitdiff
path: root/cad/meshlab/Makefile
blob: 4f98c1d1d2c654b3221baa685e033c92e8431c90 (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
# ex: ts=8
# New ports collection Makefile for:	meshlab
# Date created:				26 October 2010
# Whom:					gahr
#
# $FreeBSD$
#

PORTNAME=	meshlab
DISTVERSION=	1.3.0
CATEGORIES=	cad
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/MeshLab%20v${PORTVERSION}/
DISTNAME=	MeshLabSrc_AllInc_v${PORTVERSION:S/.//g}
EXTRACT_SUFX=	.tgz

MAINTAINER=	gahr@FreeBSD.org
COMMENT=	A tool for processing and editing 3D triangular meshes

LIB_DEPENDS=	QtSolutions_SOAP-head:${PORTSDIR}/devel/qt4-qtsolutions-soap

USE_GL=		glew glu
USE_QT4=	qmake corelib gui xml opengl network moc uic rcc
MAKE_ENV+=	CXX=clang++

USE_LDCONFIG=	yes

WRKSRC=		${WRKDIR}/${PORTNAME}/src

post-patch:
	${FIND} ${WRKSRC} -name "*.pro" | ${XARGS} ${REINPLACE_CMD} -e 's|^linux-g++|freebsd-g++|'
	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' \
	   ${WRKSRC}/common/pluginmanager.cpp

do-configure:
	cd ${WRKSRC}/external && ${QMAKE} -recursive external.pro
	cd ${WRKSRC} && ${QMAKE} -recursive meshlab_full.pro

do-build:
	cd ${WRKSRC}/external && ${MAKE}
	cd ${WRKSRC} && ${MAKE}

do-install:
	${INSTALL_DATA} ${WRKSRC}/distrib/libcommon.so.1.0.0 ${PREFIX}/lib
	${LN} -sf ${PREFIX}/lib/libcommon.so.1.0.0 ${PREFIX}/lib/libcommon.so.1.0
	${LN} -sf ${PREFIX}/lib/libcommon.so.1.0 ${PREFIX}/lib/libcommon.so.1
	${LN} -sf ${PREFIX}/lib/libcommon.so.1 ${PREFIX}/lib/libcommon.so
	${MKDIR} ${PREFIX}/lib/meshlab/plugins
	cd ${WRKSRC}/distrib/plugins && ${COPYTREE_SHARE} \*.so ${PREFIX}/lib/meshlab/plugins
	${MKDIR} ${PREFIX}/lib/meshlab/shaders
	cd ${WRKSRC}/distrib/shaders && ${COPYTREE_SHARE} \* ${PREFIX}/lib/meshlab/shaders
	${INSTALL_PROGRAM} ${WRKSRC}/distrib/meshlab ${PREFIX}/lib/meshlab
	${LN} -sf ${PREFIX}/lib/meshlab/meshlab ${PREFIX}/bin

.include <bsd.port.mk>