[gdcm] Use upstream patch for python keyword conflict

Orion Poplawski orion at fedoraproject.org
Wed Feb 25 22:12:00 UTC 2015


commit 37ad26d55b8971dae6b19187127244a6d7d166f9
Author: Orion Poplawski <orion at cora.nwra.com>
Date:   Wed Feb 25 15:11:59 2015 -0700

    Use upstream patch for python keyword conflict

 gdcm-as.patch | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
 gdcm.spec     |  5 +++-
 2 files changed, 68 insertions(+), 12 deletions(-)
---
diff --git a/gdcm-as.patch b/gdcm-as.patch
index 2c717e1..60ed48f 100644
--- a/gdcm-as.patch
+++ b/gdcm-as.patch
@@ -1,11 +1,64 @@
-diff -up gdcm-2.4.4/Wrapping/Python/gdcmswig.i.as gdcm-2.4.4/Wrapping/Python/gdcmswig.i
---- gdcm-2.4.4/Wrapping/Python/gdcmswig.i.as	2014-09-24 01:40:10.000000000 -0600
-+++ gdcm-2.4.4/Wrapping/Python/gdcmswig.i	2015-02-24 11:54:39.932978476 -0700
-@@ -769,6 +769,7 @@ EXTEND_CLASS_PRINT(gdcm::ModuleEntry)
- %include "gdcmQueryFactory.h"
- %template(CharSetArrayType) std::vector< gdcm::ECharSet >;
- %include "gdcmCompositeNetworkFunctions.h"
-+#define as absyn
- %include "gdcmPresentationContext.h"
- //EXTEND_CLASS_PRINT(gdcm::PresentationContext)
- %include "gdcmPresentationContextGenerator.h"
+commit c333154ef31f15c66e748077475220c04fa1e651
+Author: Mathieu Malaterre <mathieu.malaterre at gmail.com>
+Date:   Tue Feb 24 21:49:44 2015 +0100
+
+    Do not use `as` since it is a reserved python keyword
+
+diff --git a/Source/MessageExchangeDefinition/gdcmAAssociateRQPDU.h b/Source/MessageExchangeDefinition/gdcmAAssociateRQPDU.h
+index 852a684..08309d5 100644
+--- a/Source/MessageExchangeDefinition/gdcmAAssociateRQPDU.h
++++ b/Source/MessageExchangeDefinition/gdcmAAssociateRQPDU.h
+@@ -80,7 +80,7 @@ public:
+   PresentationContextArrayType const &GetPresentationContexts() { return PresContext; }
+ 
+   const PresentationContextRQ *GetPresentationContextByID(uint8_t i) const;
+-  const PresentationContextRQ *GetPresentationContextByAbstractSyntax(AbstractSyntax const & as ) const;
++  const PresentationContextRQ *GetPresentationContextByAbstractSyntax(AbstractSyntax const & absyn ) const;
+   bool IsLastFragment() const { return true; }
+ 
+   const UserInformation & GetUserInformation() const { return UserInfo; }
+diff --git a/Source/MessageExchangeDefinition/gdcmPresentationContextRQ.h b/Source/MessageExchangeDefinition/gdcmPresentationContextRQ.h
+index db06a9f..6de57dc 100644
+--- a/Source/MessageExchangeDefinition/gdcmPresentationContextRQ.h
++++ b/Source/MessageExchangeDefinition/gdcmPresentationContextRQ.h
+@@ -46,7 +46,7 @@ public:
+   const std::ostream &Write(std::ostream &os) const;
+   size_t Size() const;
+ 
+-  void SetAbstractSyntax( AbstractSyntax const & as );
++  void SetAbstractSyntax( AbstractSyntax const & absyn );
+   AbstractSyntax const &GetAbstractSyntax() const { return SubItems; }
+   AbstractSyntax &GetAbstractSyntax() { return SubItems; }
+ 
+commit 36e44b330085ae80b4ecc2d519f43db2a65cd61e
+Author: Mathieu Malaterre <mathieu.malaterre at gmail.com>
+Date:   Wed Feb 25 07:39:22 2015 +0100
+
+    Another round of fixes for bug #345
+
+diff --git a/Source/MessageExchangeDefinition/gdcmPresentationContext.h b/Source/MessageExchangeDefinition/gdcmPresentationContext.h
+index 324f0fa..c4fba12 100644
+--- a/Source/MessageExchangeDefinition/gdcmPresentationContext.h
++++ b/Source/MessageExchangeDefinition/gdcmPresentationContext.h
+@@ -37,7 +37,7 @@ public:
+   PresentationContext( UIDs::TSName asname,
+     UIDs::TSName tsname = UIDs::ImplicitVRLittleEndianDefaultTransferSyntaxforDICOM );
+ 
+-  void SetAbstractSyntax( const char *as ) { AbstractSyntax = as; }
++  void SetAbstractSyntax( const char *absyn ) { AbstractSyntax = absyn; }
+   const char *GetAbstractSyntax() const { return AbstractSyntax.c_str(); }
+ 
+   void AddTransferSyntax( const char *tsstr );
+diff --git a/Source/MessageExchangeDefinition/gdcmPresentationContextGenerator.h b/Source/MessageExchangeDefinition/gdcmPresentationContextGenerator.h
+index 9bb8e43..46b7102 100644
+--- a/Source/MessageExchangeDefinition/gdcmPresentationContextGenerator.h
++++ b/Source/MessageExchangeDefinition/gdcmPresentationContextGenerator.h
+@@ -80,7 +80,7 @@ public:
+   /// Not implemented for now. GDCM internally uses Implicit Little Endian
+   void SetDefaultTransferSyntax( const TransferSyntax &ts );
+ protected:
+-  bool AddPresentationContext( const char *as, const char *ts );
++  bool AddPresentationContext( const char *absyn, const char *ts );
+   const char *GetDefaultTransferSyntax() const;
+ 
+ private:
diff --git a/gdcm.spec b/gdcm.spec
index 0542c54..8a61114 100644
--- a/gdcm.spec
+++ b/gdcm.spec
@@ -6,7 +6,7 @@
 
 Name:		gdcm
 Version:	2.4.4
-Release:	3%{?dist}
+Release:	4%{?dist}
 Summary:	Grassroots DiCoM is a C++ library to parse DICOM medical files
 Group:		System Environment/Libraries
 License:	BSD
@@ -268,6 +268,9 @@ make test -C %{_target_platform} || exit 0
 %{python3_sitearch}/*
 
 %changelog
+* Wed Feb 25 2015 Orion Poplawski <orion at cora.nwra.com> - 2.4.4-3
+- Use upstream patch for python keyword conflict
+
 * Tue Feb 24 2015 Orion Poplawski <orion at cora.nwra.com> - 2.4.4-2
 - Rebuild for gcc 5 C++11 ABI
 - Add patch to fix FTBFS due to variable name/python keyword conflict (bug #1195879)


More information about the scm-commits mailing list