summaryrefslogtreecommitdiff
path: root/devel/gdcm/Makefile
blob: 7a909e0f64c0eaa5a115bf76cd3bacd68b7b6752 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Created by: Pietro Cerutti <gahr@FreeBSD.org>
# $FreeBSD$

PORTNAME=	gdcm
PORTVERSION=	${GDCM_MAJOR}.${GDCM_MINOR}.${GDCM_PATCH}
PORTREVISION=	1
CATEGORIES=	devel
MASTER_SITES=	SF/gdcm/gdcm%202.x/GDCM%20${PORTVERSION}

MAINTAINER=	stephen@FreeBSD.org
COMMENT=	Grassroots DICOM library

LICENSE=	BSD3CLAUSE

BUILD_DEPENDS=	pkgconf:devel/pkgconf
LIB_DEPENDS=	libopenjp2.so:graphics/openjpeg \
		libexpat.so:textproc/expat2

USES=		alias cmake compiler:c++11-lang tar:bzip2 ssl

OPTIONS_DEFINE=		VTK6
OPTIONS_SUB=		yes

VTK6_DESC=		Build VTK 6 integration classes
VTK6_LIB_DEPENDS=	libvtkCommonCore-${VTK6_VERSION}.so:math/vtk6
VTK6_CMAKE_ON=		-DGDCM_USE_VTK:BOOL=ON \
			-DVTK_DIR:PATH=${LOCALBASE}/lib/vtk-${VTK6_VERSION}

# Change this when updating the port
GDCM_MAJOR=	2
GDCM_MINOR=	8
GDCM_PATCH=	8

# Change this whenever VTK is updated
VTK6_VERSION=	6.2

USES=		alias cmake tar:bzip2 ssl
USE_LDCONFIG=	yes
CFLAGS+=	-I${LOCALBASE}/include
CMAKE_ARGS=	-DGDCM_USE_SYSTEM_OPENSSL:BOOL=ON \
		-DGDCM_USE_SYSTEM_EXPAT:BOOL=ON \
		-DGDCM_USE_SYSTEM_OPENJPEG:BOOL=ON \
		-DGDCM_USE_SYSTEM_ZLIB:BOOL=ON \
		-DGDCM_BUILD_APPLICATIONS:BOOL=ON \
		-DGDCM_BUILD_SHARED_LIBS:BOOL=ON \
		-DGDCM_BUILD_EXAMPLES:BOOL=OFF \
		-DGDCM_INSTALL_DATA_DIR:PATH=${DATADIR_REL} \
		-DGDCM_DOCUMENTATION:BOOL=OFF \
		-DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MVTK6}
DESKTOP_ENTRIES="Gdcmviewer" "Simple DICOM Viewer" "" "gdcmviewer" "" ""
PLIST_SUB+=	VTK=""
.else
PLIST_SUB+=	VTK="@comment "
.endif

PLIST_SUB+=	GDCM_MAJOR="${GDCM_MAJOR}" \
		GDCM_MINOR="${GDCM_MINOR}" \
		GDCM_PATCH="${GDCM_PATCH}"

.include <bsd.port.mk>