blob: cfdd5d9c07c299999289d59bb9d2d74aa7d41293 (
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
|
# New ports collection Makefile for: gdcm
# Date created: 24 February 2010
# Whom: gahr
#
# $FreeBSD$
PORTNAME= gdcm
PORTVERSION= ${GDCM_MAJ}.${GDCM_MIN}
PORTREVISION= 3
CATEGORIES= devel
MASTER_SITES= SF/gdcm/gdcm%202.x/GDCM%20${PORTVERSION}
MAINTAINER= gahr@FreeBSD.org
COMMENT= Grassroots DICOM library
LIB_DEPENDS= openjpeg.2:${PORTSDIR}/graphics/openjpeg \
expat.6:${PORTSDIR}/textproc/expat2
OPTIONS= VTK "Build the VTK bindings" off
USE_BZIP2= yes
USE_CMAKE= yes
USE_OPENSSL= yes
USE_LDCONFIG= ${PREFIX}/lib \
${PREFIX}/lib/gdcm-${GDCM_MAJ}
CFLAGS+= -I${LOCALBASE}/include
CMAKE_ARGS+= -DGDCM_PDF_DOCUMENTATION:BOOL=NO \
-DGDCM_USE_SYSTEM_OPENSSL:BOOL=YES \
-DGDCM_USE_SYSTEM_EXPAT:BOOL=YES \
-DGDCM_USE_SYSTEM_OPENJPEG:BOOL=YES \
-DGDCM_USE_SYSTEM_ZLIB:BOOL=YES
.include <bsd.port.options.mk>
.if defined(WITH_VTK)
LIB_DEPENDS+= vtkHybrid.5:${PORTSDIR}/math/vtk5
CMAKE_ARGS+= -DGDCM_USE_VTK:BOOL=YES
PLIST_SUB+= VTK=""
.else
PLIST_SUB+= VTK="@comment "
.endif
GDCM_SO= 2
GDCM_MAJ= 2.2
GDCM_MIN= 0
PLIST_SUB+= GDCM_MAJ="${GDCM_MAJ}" \
GDCM_MIN="${GDCM_MIN}" \
GDCM_SO="${GDCM_SO}"
CMAKE_OUTSOURCE=yes
CMAKE_ARGS+= -DGDCM_BUILD_APPLICATIONS:BOOL=YES \
-DGDCM_BUILD_SHARED_LIBS:BOOL=YES \
-DGDCM_BUILD_EXAMPLES:BOOL=NO \
-DGDCM_INSTALL_DATA_DIR:STRING=${DATADIR} \
-DGDCM_USE_SYSTEM_OPENJPEG:BOOL=YES
.if !defined(NOPORTDOCS)
BUILD_DEPENDS+= doxygen:${PORTSDIR}/devel/doxygen \
pdflatex:${PORTSDIR}/print/teTeX-base
CMAKE_ARGS+= -DGDCM_DOCUMENTATION:BOOL=YES \
-DGDCM_INSTALL_MAN_DIR:STRING=${MAN1PREFIX}/man
MAN1= gdcm2vtk.1 gdcmconv.1 gdcmanon.1 gdcmgendir.1 \
gdcmdump.1 gdcmimg.1 gdcminfo.1 gdcmpdf.1 \
gdcmraw.1 gdcmscanner.1 gdcmtar.1 gdcmviewer.1 \
gdcm2pnm.1 gdcmdiff.1 gdcmscu.1
PORTDOCS= *
post-install:
${MKDIR} ${DOCSDIR}
cd ${INSTALL_WRKSRC}/Utilities/doxygen/html && ${COPYTREE_SHARE} \* ${DOCSDIR}
.else
CMAKE_ARGS+= -DGDCM_DOCUMENTATION:BOOL=NO
.endif
.include <bsd.port.pre.mk>
.if ${OSVERSION} <= 701000
MANUAL_PACKAGE_BUILD= hangs on pointyhat
.endif
post-patch:
${REINPLACE_CMD} -e 's| NAMELINK_SKIP||; s| NAMELINK_ONLY||' ${WRKSRC}/CMakeLists.txt
${REINPLACE_CMD} -e 's|share/man|man|g;' ${WRKSRC}/CMakeLists.txt
.include <bsd.port.post.mk>
|