From 69e87bf4d96bccab13a81af3560f5a61f767de38 Mon Sep 17 00:00:00 2001 From: Sérgio M. Basto Date: Feb 27 2019 00:42:47 +0000 Subject: New fix for BTFS on unsigned-char arches, EOF is not a char is an int. --- diff --git a/gdcm-2.8.8-dont_use_EOF.patch b/gdcm-2.8.8-dont_use_EOF.patch new file mode 100644 index 0000000..52eedfa --- /dev/null +++ b/gdcm-2.8.8-dont_use_EOF.patch @@ -0,0 +1,41 @@ +--- ./Testing/Source/Common/Cxx/TestString2.cxx.orig 2019-02-26 22:01:26.738230841 +0000 ++++ ./Testing/Source/Common/Cxx/TestString2.cxx 2019-02-26 22:59:07.751826144 +0000 +@@ -16,7 +16,6 @@ + #include + + #include // strlen +-#include // EOF + + int TestString2(int , char *[]) + { +@@ -26,24 +25,24 @@ int TestString2(int , char *[]) + gdcm::String<> s2 = "coucou!"; + std::cout << s2 << " -> " << s2.size() << std::endl; + +- gdcm::String s3 = "coucou"; ++ gdcm::String<'\\',64,0> s3 = "coucou"; + std::cout << s3.c_str() << " -> " << s3.size() << std::endl; + +- gdcm::String s4 = "coucou!"; ++ gdcm::String<'\\',64,0> s4 = "coucou!"; + std::cout << s4.c_str() << " -> " << s4.size() << std::endl; + + const char *s = "coucou!"; +- gdcm::String s5( s, strlen(s) ); ++ gdcm::String<'\\',64,0> s5( s, strlen(s) ); + std::cout << s5.c_str() << " -> " << s5.size() << std::endl; + + std::string ss = "coucou!"; +- gdcm::String s6( ss ); ++ gdcm::String<'\\',64,0> s6( ss ); + std::cout << s6.c_str() << " -> " << s6.size() << std::endl; + +- gdcm::String s7( ss, 1, 5 ); ++ gdcm::String<'\\',64,0> s7( ss, 1, 5 ); + std::cout << s7.c_str() << " -> " << s7.size() << std::endl; + +- gdcm::String s8( ss, 1, 6 ); ++ gdcm::String<'\\',64,0> s8( ss, 1, 6 ); + std::cout << s8.c_str() << " -> " << s8.size() << std::endl; + + return 0; diff --git a/gdcm-2.8.8-fix-narrow.patch b/gdcm-2.8.8-fix-narrow.patch deleted file mode 100644 index 6b2f16b..0000000 --- a/gdcm-2.8.8-fix-narrow.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./Source/Common/gdcmString.h.orig 2019-02-25 17:28:26.424232122 +0000 -+++ ./Source/Common/gdcmString.h 2019-02-25 17:28:57.986168143 +0000 -@@ -27,7 +27,7 @@ namespace gdcm - * TMaxLength is only a hint. Noone actually respect the max length - * TPadChar is the string padding (0 or space) - */ --template -+template - class /*GDCM_EXPORT*/ String : public std::string /* PLEASE do not export me */ - { - // UI wants \0 for pad character, while ASCII ones wants space char... do not allow anything else diff --git a/gdcm.spec b/gdcm.spec index 7951db5..f6037be 100644 --- a/gdcm.spec +++ b/gdcm.spec @@ -3,7 +3,7 @@ Name: gdcm Version: 2.8.8 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Grassroots DiCoM is a C++ library to parse DICOM medical files License: BSD URL: http://gdcm.sourceforge.net/wiki/index.php/Main_Page @@ -28,7 +28,7 @@ Patch5: 0005-use-cpp-11-standard.patch Patch6: 0006-Update-for-new-poppler.patch # Use unversioned directory name Patch7: 0007-Use-unversioned-dir.patch -Patch8: gdcm-2.8.8-fix-narrow.patch +Patch8: gdcm-2.8.8-dont_use_EOF.patch BuildRequires: CharLS-devel >= 1.0 BuildRequires: cmake @@ -284,13 +284,14 @@ make test -C %{_target_platform} || exit 0 %{python3_sitearch}/__pycache__/%{name}* %changelog +* Tue Feb 26 2019 Sérgio Basto - 2.8.8-4 +- New fix for BTFS on unsigned-char arches, EOF is not a char is an int. + * Mon Feb 25 2019 Sérgio Basto - 2.8.8-3 - Manually-specified variables were not used by the project: GDCM_PDF_DOCUMENTATION - Patch for poppler breaks builds for previous releases. - Fix BTFS on unsigned-char arches -- Add -fsigned-char to the build flags. The compiler complaints make sense if - char is unsigned. * Mon Feb 18 2019 Ankur Sinha - 2.8.8-2 - Enable tests