From owner-svn-ports-head@FreeBSD.ORG Tue Jun 10 07:53:23 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAE19869; Tue, 10 Jun 2014 07:53:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A811125B8; Tue, 10 Jun 2014 07:53:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5A7rNUW043551; Tue, 10 Jun 2014 07:53:23 GMT (envelope-from gahr@svn.freebsd.org) Received: (from gahr@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5A7rNRv043548; Tue, 10 Jun 2014 07:53:23 GMT (envelope-from gahr@svn.freebsd.org) Message-Id: <201406100753.s5A7rNRv043548@svn.freebsd.org> From: Pietro Cerutti Date: Tue, 10 Jun 2014 07:53:23 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r357278 - in head/devel/gdcm: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 07:53:23 -0000 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 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@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 -.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