summaryrefslogtreecommitdiff
path: root/cad/meshlab/Makefile
blob: e4f40a9c8cab12026581e96125419950fbd915f4 (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
PORTNAME=	meshlab
DISTVERSIONPREFIX=	Meshlab-
DISTVERSION=	2020.05
PORTREVISION=	1
CATEGORIES=	cad

MAINTAINER=	lbartoletti@FreeBSD.org
COMMENT=	3D triangular meshes processing and editing tool
WWW=		https://www.meshlab.net/

LICENSE=	GPLv2

BUILD_DEPENDS=	${LOCALBASE}/include/vcglib/img/img.h:devel/vcglib
LIB_DEPENDS=	libmpirxx.so:math/mpir

USES=		dos2unix gl qmake:outsource qt:5
USE_GL=		gl glu glew
USE_QT=		buildtools_build core gui network \
		opengl script xml xmlpatterns widgets
USE_GITHUB=	yes
GH_ACCOUNT=	cnr-isti-vclab
USE_LDCONFIG=	yes

QMAKE_SOURCE_PATH=	${WRKSRC}/src/meshlab.pro

DOS2UNIX_GLOB=	*.c *.cpp *.h

.if !exists(/usr/include/omp.h)
USES+=		compiler:gcc-c++11-lib
.else
USES+=		compiler:c++11-lang
.endif

post-patch:
	${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/src/general.pri

do-install:
	${MKDIR} ${STAGEDIR}${PREFIX}/lib/meshlab/plugins
	cd ${BUILD_WRKSRC}/distrib/plugins && ${INSTALL_LIB} *.so ${STAGEDIR}${PREFIX}/lib/meshlab/plugins
	${MKDIR} ${STAGEDIR}${PREFIX}/lib/meshlab/shaders
	cd ${WRKSRC}/distrib/shaders && ${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/lib/meshlab/shaders
	${INSTALL_LIB} ${BUILD_WRKSRC}/distrib/lib/* ${STAGEDIR}${PREFIX}/lib
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/distrib/meshlab ${STAGEDIR}${PREFIX}/lib/meshlab
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/distrib/meshlabserver ${STAGEDIR}${PREFIX}/lib/meshlab
	${RLN} ${STAGEDIR}${PREFIX}/lib/meshlab/meshlab ${STAGEDIR}${PREFIX}/bin
	${RLN} ${STAGEDIR}${PREFIX}/lib/meshlab/meshlabserver ${STAGEDIR}${PREFIX}/bin

.include <bsd.port.mk>