changeset 4661:1814816b46df

of-dicom: update to v0.2.1 * build_packages.m: update dicom version * src/of-dicom.mk: update version, checksum, remove autoconf rebuild * src/of-dicom-1-fixes.patch: removed file * dist-files.mk: remove ref to of-dicom-1-fixes.patch
author John Donoghue
date Tue, 17 Apr 2018 12:16:37 -0400
parents 1a99b0de71dc
children b77b935415aa
files build_packages.m dist-files.mk src/of-dicom-1-fixes.patch src/of-dicom.mk
diffstat 4 files changed, 4 insertions(+), 158 deletions(-) [+]
line wrap: on
line diff
--- a/build_packages.m	Thu Apr 12 19:40:40 2018 -0400
+++ b/build_packages.m	Tue Apr 17 12:16:37 2018 -0400
@@ -48,7 +48,7 @@
   try_install quaternion-2.4.0.tar.gz
   try_install fits-1.0.7.tar.gz
   try_install tsa-4.4.5.tar.gz
-  try_install dicom-0.1.1.tar.gz
+  try_install dicom-0.2.1.tar.gz
   try_install netcdf-1.0.11.tar.gz
   try_install ltfat-2.2.0.tar.gz
   try_install database-2.4.2.tar.gz
--- a/dist-files.mk	Thu Apr 12 19:40:40 2018 -0400
+++ b/dist-files.mk	Tue Apr 17 12:16:37 2018 -0400
@@ -464,7 +464,6 @@
   of-database-3-fixes.patch \
   of-database.mk \
   of-dataframe.mk \
-  of-dicom-1-fixes.patch \
   of-dicom.mk \
   of-financial.mk \
   of-fits-1-cross-fixes.patch \
--- a/src/of-dicom-1-fixes.patch	Thu Apr 12 19:40:40 2018 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-diff -r c6fc977bc48a src/Makefile.in
---- a/src/Makefile.in	Thu Feb 23 08:34:52 2017 +0100
-+++ b/src/Makefile.in	Tue May 16 08:25:04 2017 -0400
-@@ -4,6 +4,8 @@
- GDCM_CPPFLAGS = @GDCM_CXXFLAGS@
- GDCM_LIBS = @GDCM_LIBS@
- 
-+OCTAVE_DEFS = -DHAVE_OCTAVE_LOAD_PATH=@HAVE_OCTAVE_LOAD_PATH@
-+
- need_dict = dicominfo.oct dicomwrite.oct dicomlookup.oct
- 
- test_files = dicominfo.cpp dicomdict.cpp dicomread.cpp dicomlookup.cpp isdicom.cpp dicomuid.oct
-@@ -11,13 +13,13 @@
- all: $(need_dict) dicomdict.oct dicomread.oct _gendicomdict.oct isdicom.oct dicomuid.oct
- 
- %.o: %.cpp
--	$(MKOCTFILE) $(GDCM_CPPFLAGS) -c $<
-+	$(MKOCTFILE) $(OCTAVE_DEFS) $(GDCM_CPPFLAGS) -c $<
- 
- $(need_dict): %.oct: %.cpp dicomdict.o
--	$(MKOCTFILE) $(GDCM_CPPFLAGS) $(GDCM_LIBS) $^
-+	$(MKOCTFILE) $(OCTAVE_DEFS) $(GDCM_CPPFLAGS) $(GDCM_LIBS) $^
- 
- %.oct: %.cpp
--	$(MKOCTFILE) $(GDCM_CPPFLAGS) $(GDCM_LIBS) $<
-+	$(MKOCTFILE) $(OCTAVE_DEFS) $(GDCM_CPPFLAGS) $(GDCM_LIBS) $<
- 
- clean:
- 	$(RM) *.o *.oct *~
-diff -r c6fc977bc48a src/configure.ac
---- a/src/configure.ac	Thu Feb 23 08:34:52 2017 +0100
-+++ b/src/configure.ac	Tue May 16 08:25:04 2017 -0400
-@@ -6,9 +6,48 @@
- 
- AC_PROG_SED
- 
-+AC_PATH_PROG([MKOCTFILE], [mkoctfile])
-+if test -z "$MKOCTFILE"; then
-+  AC_MSG_ERROR([*** 'mkoctfile' not found.])
-+fi
-+
- AC_PROG_CXX
- AC_LANG(C++)
- 
-+## octave API tests
-+save_CXX="$CXX"
-+save_CXXFLAGS="$CXXFLAGS"
-+CXX=`${MKOCTFILE} -p CXX`
-+CXXFLAGS="$CXXFLAGS -I`$MKOCTFILE -p OCTINCLUDEDIR`"
-+
-+# need to use interpreter->get_load_path in dev version of octave,
-+# prior to that methods of load_path were static
-+AC_CACHE_CHECK(
-+  [interpreter get_load_path],
-+  [octave_cv_interpreter_get_load_path],
-+  [AC_COMPILE_IFELSE(
-+    [AC_LANG_PROGRAM([
-+      #include <oct.h>
-+      #include <octave.h>
-+      #include <interpreter.h>
-+      #include <load-path.h>
-+      ],
-+      [
-+        octave::load_path &p = octave::interpreter::the_interpreter ()->get_load_path ();
-+      ])],
-+    [octave_cv_interpreter_get_load_path=yes],
-+    [octave_cv_interpreter_get_load_path=no])
-+  ])
-+if test "$octave_cv_interpreter_get_load_path" = "yes" ; then
-+  HAVE_OCTAVE_LOAD_PATH=1
-+else
-+  HAVE_OCTAVE_LOAD_PATH=0
-+fi
-+AC_SUBST(HAVE_OCTAVE_LOAD_PATH)
-+
-+CC=$save_CXX
-+CXXFLAGS=$save_CXXFLAGS
-+
- dnl
- dnl GDCM headers are in a version specific path.  They use CMake and
- dnl provide a project.cmake config file which has the correct flags to
-diff -r c6fc977bc48a src/dicomdict.cpp
---- a/src/dicomdict.cpp	Thu Feb 23 08:34:52 2017 +0100
-+++ b/src/dicomdict.cpp	Tue May 16 08:25:04 2017 -0400
-@@ -25,6 +25,8 @@
-  */
- 
- #include "octave/oct.h"
-+#include "octave/octave.h"
-+#include "octave/interpreter.h"
- #include "octave/load-path.h"
- 
- #include "gdcmDict.h"
-@@ -263,13 +265,20 @@
- 	}
- 
- 	// find dic if it is anywhere in the search path (same path as for m-files etc)
-+	std::string resolved_filename(filename);
- #ifndef NOT_OCT
--	const std::string resolved_filename=load_path::find_file(std::string(filename)) ;
-+#if HAVE_OCTAVE_LOAD_PATH == 1
-+	octave::interpreter *interp = octave::interpreter::the_interpreter ();
-+	if (interp) {
-+		octave::load_path& lp = interp->get_load_path ();
-+		resolved_filename = lp.find_file (std::string (filename));
-+	}
-+	else
-+		warning ("load_dicom_dict: interpreter context missing");
- #else
--        // for debugging: if not running in octave, find_file always returns ""
--	// so we just use the original filename
--	const std::string resolved_filename(filename);
--#endif
-+	resolved_filename=load_path::find_file(std::string(filename));
-+#endif // HAVE_OCTAVE_LOAD_PATH
-+#endif // NOT_OCT
- 
- 	std::ifstream fin(resolved_filename.c_str());
- 	if (!fin) {
-diff -uNr a/src/dicomwrite.cpp b/src/dicomwrite.cpp
---- a/src/dicomwrite.cpp	2017-02-23 01:28:24.157669038 -0500
-+++ b/src/dicomwrite.cpp	2018-04-09 14:40:14.224292229 -0400
-@@ -139,7 +139,7 @@
- }
- 
- void struct2metadata(gdcm::ImageWriter *w, gdcm::File *file, const octave_value  & ov, bool trial, int sequenceDepth) {
--	if(!ov.is_map()){
-+	if(!ov.isstruct()){
- 		error(QUOTED(OCT_FN_NAME)": 3rd arg should be struct holding metadata. it is %s",ov.type_name().c_str()); 
- 		throw std::exception() ;
- 	}
-@@ -297,7 +297,7 @@
- 		if (trial) octave_stdout << '[' << buf << ']' << std::endl;
- 		de->SetByteValue( buf, gdcm::VL((uint32_t)strlen(buf)) );
- 	} else if ( entry.GetVR() & gdcm::VR::SQ) { // sequence
--		if (!ov->is_map()) { 
-+		if (!ov->isstruct()) { 
- 			warning(QUOTED(OCT_FN_NAME)": dicomdict gives VR of SQ for %s, octave value is %s", keyword.c_str(), ov->class_name().c_str());
- 		}
- 		octave_stdout << std::endl;
-diff -uNr a/src/isdicom.cpp b/src/isdicom.cpp
---- a/src/isdicom.cpp	2017-02-23 01:28:24.157669038 -0500
-+++ b/src/isdicom.cpp	2018-04-09 14:39:33.322200138 -0400
-@@ -32,7 +32,7 @@
-   reader.SetFileName (filename.c_str ());
-   // gdcm::Reader.Read() will return false if the file does not exists but
-   // also prints to stderr so we check it first.
--  return file_stat (filename).exists () && reader.Read ();
-+  return octave::sys::file_stat (filename).exists () && reader.Read ();
- }
- 
- DEFUN_DLD (isdicom, args, ,
--- a/src/of-dicom.mk	Thu Apr 12 19:40:40 2018 -0400
+++ b/src/of-dicom.mk	Tue Apr 17 12:16:37 2018 -0400
@@ -3,8 +3,8 @@
 
 PKG             := of-dicom
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 0.2.0
-$(PKG)_CHECKSUM := 46d4be1f9f822451e8fd415fbea4c3d24aaba5db
+$(PKG)_VERSION  := 0.2.1
+$(PKG)_CHECKSUM := 122636971340ddc826c8aa35b244d07e66f9e4ac
 $(PKG)_REMOTE_SUBDIR := 
 $(PKG)_SUBDIR   := dicom-$($(PKG)_VERSION)
 $(PKG)_FILE     := dicom-$($(PKG)_VERSION).tar.gz
@@ -26,6 +26,5 @@
 endef
 
 define $(PKG)_BUILD
-    cd '$(1)/src' && autoreconf -fi
-    $(call OCTAVE_FORGE_PKG_BUILD,$(1),$(2),$(3),$($(PKG)_OPTIONS))
+    $(OCTAVE_FORGE_PKG_BUILD)
 endef