aboutsummaryrefslogtreecommitdiff
path: root/science/InsightToolkit521/Makefile
blob: 56a498b903694ed83ae0674a5d5795b6ec3ce79d (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
PORTNAME=	InsightToolkit
DISTVERSIONPREFIX=	v
DISTVERSION=	5.2.1
CATEGORIES=	science biology
MASTER_SITES=	https://github.com/InsightSoftwareConsortium/ITK/releases/download/v${DISTVERSION}/:data
PKGNAMESUFFIX=	521
DISTFILES=	InsightData-${DISTVERSION}.tar.gz:data

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Insight Toolkit
WWW=		https://www.itk.org

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	googletest>=0:devel/googletest
LIB_DEPENDS=	libgdcmCommon.so:devel/gdcm \
		libexpat.so:textproc/expat2 \
		libfftw.so:math/fftw \
		libhdf5.so:science/hdf5 \
		libpng.so:graphics/png \
		libsz.so:science/libaec \
		libtiff.so:graphics/tiff

USES=		cmake:testing compiler:c++11-lang eigen:3 jpeg pkgconfig python:test
USE_LDCONFIG=	${PREFIX}/lib/InsightToolkit

USE_GITHUB=	yes
GH_ACCOUNT=	InsightSoftwareConsortium
GH_PROJECT=	ITK

CMAKE_ON=	BUILD_SHARED_LIBS \
		ITK_FORBID_DOWNLOADS \
		ITK_LEGACY_SILENT \
		ITK_USE_SYSTEM_EXPAT \
		ITK_USE_SYSTEM_FFTW \
		ITK_USE_SYSTEM_GDCM \
		ITK_USE_SYSTEM_HDF5 \
		ITK_USE_SYSTEM_JPEG \
		ITK_USE_SYSTEM_LIBRARIES \
		ITK_USE_SYSTEM_PNG \
		ITK_USE_SYSTEM_TIFF \
		ITK_USE_SYSTEM_ZLIB \
		Module_ITKIOMIC \
		Module_ITKIOTransformMINC \
		Module_ITKReview
CMAKE_ARGS=	-DPython3_EXECUTABLE=${PYTHON_CMD}
CMAKE_OFF=	ITK_USE_KWSTYLE BUILD_TESTING
CMAKE_TESTING_ON=	BUILD_TESTING # 3 tests are known to fail, see https://github.com/InsightSoftwareConsortium/ITK/issues/3739

CXXFLAGS_i386=	-msse2 # to fix this error: always_inline function '_mm_cvtsd_si32' requires target feature 'sse2' (i386 doesn't have SSE2 enabled by default)

ITK_VER=	${PORTVERSION:R}

PLIST_SUB+=	ITK_VER=${ITK_VER}

OPTIONS_DEFINE=	EXAMPLES TESTING
EXAMPLES_DESC=	Build examples (very time consuming)
TESTING_DESC=	Build testing programs (very time consuming)

EXAMPLES_CMAKE_BOOL=	BUILD_EXAMPLES
TESTING_CMAKE_BOOL=	BUILD_TESTING

.include <bsd.port.pre.mk>

.if ${CHOSEN_COMPILER_TYPE} == gcc
PLIST_SUB+=	CHOSEN_COMPILER_TYPE="GNU"
.else
PLIST_SUB+=	CHOSEN_COMPILER_TYPE="Clang"
.endif

post-extract:
	${MV} ${WRKDIR}/${PORTNAME}-${PORTVERSION}/.ExternalData/* ${WRKSRC}/.ExternalData/
	${RM} -r ${WRKDIR}/${PORTNAME}-${PORTVERSION}

.include <bsd.port.post.mk>