aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorgahr <gahr@FreeBSD.org>2014-06-10 15:53:22 +0800
committergahr <gahr@FreeBSD.org>2014-06-10 15:53:22 +0800
commita9eb4f0ad5338a291bb5af8ecb72bad769245192 (patch)
treebefbba284460914fba1644da965669f77f2f69cc /devel
parente355d56a54b5c0b2b04fb2ed6ae1a15f6c543a2a (diff)
downloadfreebsd-ports-gnome-a9eb4f0ad5338a291bb5af8ecb72bad769245192.tar.gz
freebsd-ports-gnome-a9eb4f0ad5338a291bb5af8ecb72bad769245192.tar.zst
freebsd-ports-gnome-a9eb4f0ad5338a291bb5af8ecb72bad769245192.zip
- Fix build with both OpenJPEG 1.5 and 2.0 are installed [1]
- While at it, modernize the use of options and fix a couple of whitespaces PR: 190476 Submitted by: Lawrence Chen <beastie@tardisi.com>
Diffstat (limited to 'devel')
-rw-r--r--devel/gdcm/Makefile34
-rw-r--r--devel/gdcm/files/patch-CMake_FindOpenJPEG.cmake24
-rw-r--r--devel/gdcm/pkg-plist2
3 files changed, 41 insertions, 19 deletions
diff --git a/devel/gdcm/Makefile b/devel/gdcm/Makefile
index 9f8c9a26f58b..fdd942bd17ad 100644
--- a/devel/gdcm/Makefile
+++ b/devel/gdcm/Makefile
@@ -10,15 +10,25 @@ MASTER_SITES= SF/gdcm/gdcm%202.x/GDCM%20${PORTVERSION}
MAINTAINER= gahr@FreeBSD.org
COMMENT= Grassroots DICOM library
+LICENSE= BSD3CLAUSE
+
LIB_DEPENDS= libopenjpeg.so:${PORTSDIR}/graphics/openjpeg15 \
libexpat.so:${PORTSDIR}/textproc/expat2
-OPTIONS_DEFINE= DOCS
-OPTIONS_UNSET= DOCS
-OPTIONS_RADIO= VTK
+OPTIONS_DEFINE= DOCS
+OPTIONS_UNSET= DOCS
+OPTIONS_RADIO= VTK
OPTIONS_RADIO_VTK= VTK5 VTK6
-VTK5_DESC= Build VTK 5 integration classes
-VTK6_DESC= Build VTK 6 integration classes
+
+VTK5_DESC= Build VTK 5 integration classes
+VTK5_LIB_DEPENDS= libvtkHybrid.so:${PORTSDIR}/math/vtk5
+VTK5_CMAKE_ON= -DGDCM_USE_VTK:BOOL=YES \
+ -DVTK_DIR:PATH=${LOCALBASE}/lib/vtk-${VTK5_VERSION}
+
+VTK6_DESC= Build VTK 6 integration classes
+VTK6_LIB_DEPENDS= libvtkCommonCore-${VTK6_VERSION}.so:${PORTSDIR}/math/vtk6
+VTK6_CMAKE_ON= -DGDCM_USE_VTK:BOOL=YES \
+ -DVTK_DIR:PATH=${LOCALBASE}/lib/vtk-${VTK6_VERSION}
# Change this when updating the port
GDCM_MAJOR= 2
@@ -45,22 +55,10 @@ CMAKE_ARGS+= -DGDCM_PDF_DOCUMENTATION:BOOL=NO \
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MVTK5}
-LIB_DEPENDS+= libvtkHybrid.so:${PORTSDIR}/math/vtk5
-CMAKE_ARGS+= -DGDCM_USE_VTK:BOOL=YES \
- -DVTK_DIR:PATH=${LOCALBASE}/lib/vtk-${VTK5_VERSION}
-.endif
-
-.if ${PORT_OPTIONS:MVTK6}
-LIB_DEPENDS+= libvtkCommonCore-${VTK6_VERSION}.so:${PORTSDIR}/math/vtk6
-CMAKE_ARGS+= -DGDCM_USE_VTK:BOOL=YES \
- -DVTK_DIR:PATH=${LOCALBASE}/lib/vtk-${VTK6_VERSION}
-.endif
-
.if ${PORT_OPTIONS:MVTK5} || ${PORT_OPTIONS:MVTK6}
PLIST_SUB+= VTK=""
.else
-PLIST_SUB+= VTK="@comment "
+PLIST_SUB+= VTK="@comment "
.endif
PLIST_SUB+= GDCM_MAJOR="${GDCM_MAJOR}" \
diff --git a/devel/gdcm/files/patch-CMake_FindOpenJPEG.cmake b/devel/gdcm/files/patch-CMake_FindOpenJPEG.cmake
new file mode 100644
index 000000000000..3980d4c04277
--- /dev/null
+++ b/devel/gdcm/files/patch-CMake_FindOpenJPEG.cmake
@@ -0,0 +1,24 @@
+--- CMake/FindOpenJPEG.cmake.orig 2014-04-03 09:33:49.000000000 +0200
++++ CMake/FindOpenJPEG.cmake 2014-06-10 09:34:13.000000000 +0200
+@@ -18,7 +18,15 @@
+ # (To distribute this file outside of CMake, substitute the full
+ # License text for the above reference.)
+
+-# Try first to locate a cmake config file
++# Try with pkg-config first
++find_package(PkgConfig)
++pkg_check_modules(OPENJPEG libopenjpeg1)
++if(OPENJPEG_FOUND)
++ set(OPENJPEG_MAJOR_VERSION 1)
++ set(OPENJPEG_INCLUDE_DIR ${OPENJPEG_INCLUDE_DIRS})
++ set(OPENJPEG_LIBRARIES ${OPENJPEG_LDFLAGS})
++else()
++# Try to locate a cmake config file
+ find_package(OpenJPEG QUIET NO_MODULE)
+
+ if( NOT OpenJPEG_DIR )
+@@ -51,3 +59,4 @@
+ OPENJPEG_INCLUDE_DIR
+ )
+ endif()
++endif()
diff --git a/devel/gdcm/pkg-plist b/devel/gdcm/pkg-plist
index 7d00bf719dae..c0c5929906d6 100644
--- a/devel/gdcm/pkg-plist
+++ b/devel/gdcm/pkg-plist
@@ -11,7 +11,7 @@ bin/gdcmscanner
bin/gdcmscu
bin/gdcmtar
bin/gdcmxml
-%%PORTDOCS%%man/man1/gdcm2pnm.1.gz
+%%PORTDOCS%%man/man1/gdcm2pnm.1.gz
%%PORTDOCS%%man/man1/gdcm2vtk.1.gz
%%PORTDOCS%%man/man1/gdcmanon.1.gz
%%PORTDOCS%%man/man1/gdcmconv.1.gz