gdcm 3.0.0

This commit is contained in:
Thiago Franco de Moraes 2019-05-23 15:06:57 -03:00 committed by FX Coudert
parent b2826cc599
commit 9bc9a5006d

View file

@ -1,8 +1,8 @@
class Gdcm < Formula
desc "Grassroots DICOM library and utilities for medical files"
homepage "https://sourceforge.net/projects/gdcm/"
url "https://downloads.sourceforge.net/project/gdcm/gdcm%202.x/GDCM%202.8.9/gdcm-2.8.9.tar.gz"
sha256 "a2da88b7b3cbf9e76a9df3e89d06d057cca9ce54fc62fb059e04f47bf056b727"
url "https://github.com/malaterre/GDCM/archive/v3.0.0.tar.gz"
sha256 "3de524690102bfa3e9c3a81ff3f17733138183f76b7a5f7d072b20024a255680"
bottle do
sha256 "2b35bf311cd1fc39e0fc1b73e7dfe665eb252a5dfc9e5c0c9895bfd62d852b80" => :mojave
@ -11,11 +11,13 @@ class Gdcm < Formula
end
depends_on "cmake" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => :build
depends_on "swig" => :build
depends_on "openjpeg"
depends_on "openssl"
depends_on "python"
depends_on "vtk"
def install
ENV.cxx11
@ -25,12 +27,13 @@ class Gdcm < Formula
python_executable = Utils.popen_read("python3 -c 'import sys;print(sys.executable)'").chomp
args = std_cmake_args + %W[
-DGDCM_BUILD_APPLICATIONS=ON
-GNinja
-DGDCM_BUILD_APPLICATIONS=OFF
-DGDCM_BUILD_SHARED_LIBS=ON
-DGDCM_BUILD_TESTING=OFF
-DGDCM_BUILD_EXAMPLES=OFF
-DGDCM_BUILD_DOCBOOK_MANPAGES=OFF
-DGDCM_USE_VTK=OFF
-DGDCM_USE_VTK=ON
-DGDCM_USE_SYSTEM_OPENJPEG=ON
-DGDCM_USE_SYSTEM_OPENSSL=ON
-DGDCM_WRAP_PYTHON=ON
@ -45,7 +48,8 @@ class Gdcm < Formula
ENV.append "LDFLAGS", "-undefined dynamic_lookup"
system "cmake", "..", *args
system "make", "install"
system "ninja"
system "ninja", "install"
end
end
@ -59,8 +63,8 @@ class Gdcm < Formula
}
EOS
system ENV.cxx, "-isystem", "#{include}/gdcm-2.8", "-o", "test.cxx.o", "-c", "test.cxx"
system ENV.cxx, "test.cxx.o", "-o", "test", "-L#{lib}", "-lgdcmDSED"
system ENV.cxx, "-std=c++11", "-isystem", "#{include}/gdcm-3.0", "-o", "test.cxx.o", "-c", "test.cxx"
system ENV.cxx, "-std=c++11", "test.cxx.o", "-o", "test", "-L#{lib}", "-lgdcmDSED"
system "./test"
system "python3", "-c", "import gdcm"