aboutsummaryrefslogtreecommitdiff
path: root/cad/PrusaSlicer/Makefile
blob: 28d6156b20292378a63cb3fd9435bdb310099cec (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
55
56
57
58
59
60
61
62
# $FreeBSD$

PORTNAME=		PrusaSlicer
DISTVERSIONPREFIX=	version_
DISTVERSION=		2.2.0
PORTREVISION=		6
CATEGORIES=		cad

MAINTAINER=	teodorsigaev@gmail.com
COMMENT=	Slicing application for 3D printers

LICENSE=	AGPLv3
LICENSE_FILE=	${WRKSRC}/LICENSE

LIB_DEPENDS=	libtbb.so:devel/tbb \
		libboost_log.so:devel/boost-libs \
		libHalf.so:graphics/ilmbase \
		libnlopt.so:math/nlopt \
		libwx_gtk3u_core-3.1.so:x11-toolkits/wxgtk31 \
		libcurl.so:ftp/curl \
		libexpat.so:textproc/expat2 \
		libopenvdb.so:misc/openvdb \
		libgmp.so:math/gmp \
		libmpfr.so:math/mpfr
BUILD_DEPENDS=	cereal>=1.2.2:devel/cereal \
		eigen>=3.3:math/eigen3 \
		googletest>=1.7:devel/googletest \
		boost-libs>=1.64:devel/boost-libs \
		wx31-gtk3>=3.1:x11-toolkits/wxgtk31 \
		cmake>=3.2:devel/cmake \
		ninja>=1.8.2:devel/ninja \
		openvdb>=6.1.0:misc/openvdb \
		gmp>=6.1.2:math/gmp \
		mpfr>=4.0.2:math/mpfr \
		qt5-buildtools>=0:devel/qt5-buildtools

USES=		cmake gettext gl iconv pkgconfig

CMAKE_ARGS+=	-DwxWidgets_CONFIG_EXECUTABLE=${LOCALBASE}/bin/wxgtk3u-3.1-config \
		-DCGAL_DIR=${WRKSRC}/CGAL/lib/cmake/CGAL
CMAKE_INSTALL_PREFIX=	${PREFIX}/${PORTNAME}

USE_GITHUB=	yes
GH_ACCOUNT=	prusa3d
GH_TUPLE=	CGAL:cgal:releases/CGAL-5.0.2:cgal
USE_GL=		gl glu glew

post-patch:
	${REINPLACE_CMD} -e 's,%%WRKSRC%%,${WRKSRC},' \
		${WRKSRC}/CMakeLists.txt

pre-configure:
	cd ${WRKSRC_cgal} && \
	${CMAKE_BIN} -E remove CGALConfig-installation-dirs.cmake && \
	${MKDIR} build && cd build && \
	${CMAKE_BIN} -DCMAKE_INSTALL_PREFIX=${WRKSRC}/CGAL \
		-DCMAKE_PREFIX_PATH=${WRKSRC}/CGAL \
		-DCMAKE_MODULE_PATH=${WRKSRC}/cmake/modules \
		-DCMAKE_BUILD_TYPE=Release .. && \
	${BSDMAKE} all install

.include <bsd.port.mk>