svn commit: r357278 - in head/devel/gdcm: . files

Pietro Cerutti gahr at FreeBSD.org
Tue Jun 10 07:53:23 UTC 2014


Author: gahr
Date: Tue Jun 10 07:53:22 2014
New Revision: 357278
URL: http://svnweb.freebsd.org/changeset/ports/357278
QAT: https://qat.redports.org/buildarchive/r357278/

Log:
  - 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 at tardisi.com>

Added:
  head/devel/gdcm/files/patch-CMake_FindOpenJPEG.cmake   (contents, props changed)
Modified:
  head/devel/gdcm/Makefile
  head/devel/gdcm/pkg-plist

Modified: head/devel/gdcm/Makefile
==============================================================================
--- head/devel/gdcm/Makefile	Tue Jun 10 07:39:01 2014	(r357277)
+++ head/devel/gdcm/Makefile	Tue Jun 10 07:53:22 2014	(r357278)
@@ -10,15 +10,25 @@ MASTER_SITES=	SF/gdcm/gdcm%202.x/GDCM%20
 MAINTAINER=	gahr at 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:BO
 
 .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}" \

Added: head/devel/gdcm/files/patch-CMake_FindOpenJPEG.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/gdcm/files/patch-CMake_FindOpenJPEG.cmake	Tue Jun 10 07:53:22 2014	(r357278)
@@ -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()

Modified: head/devel/gdcm/pkg-plist
==============================================================================
--- head/devel/gdcm/pkg-plist	Tue Jun 10 07:39:01 2014	(r357277)
+++ head/devel/gdcm/pkg-plist	Tue Jun 10 07:53:22 2014	(r357278)
@@ -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


More information about the svn-ports-head mailing list