blob: 32579b23fe246ddcd1834b8c5148f7423a77bdfc (
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
PORTNAME= InsightToolkit
DISTVERSIONPREFIX= v
DISTVERSION= 5.3.0
PORTREVISION= 3
CATEGORIES= science biology
MASTER_SITES= https://github.com/InsightSoftwareConsortium/ITK/releases/download/v${DISTVERSION}/:data
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 # gtest required for build, see https://github.com/InsightSoftwareConsortium/ITK/issues/3750
LIB_DEPENDS= libdouble-conversion.so:devel/double-conversion \
libfreetype.so:print/freetype2 \
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 \
libvcl.so:misc/vxl
# dependencies for optional modules
LIB_DEPENDS+= libdcmjpls.so:graphics/dcmtk \
libvtkCommonCore-${VTK_VER}.so:math/vtk${VTK_VER:R}
TEST_DEPENDS= googletest>0:devel/googletest
USES= cmake:testing compiler:c++11-lang eigen:3,build,run gl jpeg localbase:ldflags pkgconfig python:run,test xorg
USE_GL= opengl
USE_XORG= x11
USE_LDCONFIG= ${PREFIX}/lib/InsightToolkit
USE_GITHUB= yes
GH_ACCOUNT= InsightSoftwareConsortium
GH_PROJECT= ITK
CMAKE_ON= BUILD_SHARED_LIBS \
ITK_LEGACY_SILENT \
ITK_USE_SYSTEM_DCMTK \
ITK_USE_SYSTEM_DOUBLECONVERSION \
ITK_USE_SYSTEM_EIGEN \
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_VXL \
ITK_USE_SYSTEM_ZLIB \
Module_ITKIOTransformMINC \
Module_ITKIOPNG \
Module_ITKReview
CMAKE_ARGS= -DPython3_EXECUTABLE=${PYTHON_CMD}
CMAKE_OFF= ITK_USE_KWSTYLE BUILD_TESTING
CMAKE_TESTING_ON= BUILD_TESTING # 4 tests are known to fail, see https://github.com/InsightSoftwareConsortium/ITK/issues/3739
#LDFLAGS+= -lcompat # workaround for: ld: error: lib/liblpsolve55.so.5.5.2: undefined reference to ftime
LDFLAGS+= -L${WRKSRC} -lftime # workaround for: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257789, otherwise the above line should suffice
ITK_VER= ${PORTVERSION:R}
PLIST_SUB+= ITK_VER=${ITK_VER}
OPTIONS_DEFINE= EXAMPLES
EXAMPLES_DESC= Build examples (very time consuming)
EXAMPLES_CMAKE_BOOL= BUILD_EXAMPLES
BINARY_ALIAS= git=${FILESDIR}/fake-git fetch=false
.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}-${DISTVERSION}/.ExternalData/* ${WRKSRC}/.ExternalData/
@${RM} -r ${WRKDIR}/${PORTNAME}-${DISTVERSION}
pre-configure: # workaround for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257789
@${SETENV} ${MAKE_ENV} ${CC} -c -fPIC ${FILESDIR}/ftime.c -o ${WRKSRC}/libftime.o
@${AR} -rcs ${WRKSRC}/libftime.a ${WRKSRC}/libftime.o
post-install: # remove contentless docs
@${RM} -r ${STAGEDIR}${PREFIX}/share
.include <Makefile.remote_modules>
.include <../../math/vtk9/Makefile.version>
.include <bsd.port.post.mk>
|