[67316] trunk/dports/graphics/dcmtk

ryandesign at macports.org ryandesign at macports.org
Wed May 5 04:20:55 PDT 2010


Revision: 67316
          http://trac.macports.org/changeset/67316
Author:   ryandesign at macports.org
Date:     2010-05-05 04:20:49 -0700 (Wed, 05 May 2010)
Log Message:
-----------
dcmtk: fix build on Snow Leopard; add openssl dependency; nomaintainer; see #22840

Modified Paths:
--------------
    trunk/dports/graphics/dcmtk/Portfile
    trunk/dports/graphics/dcmtk/files/patch-config-configure.in.diff

Removed Paths:
-------------
    trunk/dports/graphics/dcmtk/files/patch-dcmnet-apps-findscu.cc.diff
    trunk/dports/graphics/dcmtk/files/patch-dcmnet-apps-movescu.cc.diff

Modified: trunk/dports/graphics/dcmtk/Portfile
===================================================================
--- trunk/dports/graphics/dcmtk/Portfile	2010-05-05 10:48:00 UTC (rev 67315)
+++ trunk/dports/graphics/dcmtk/Portfile	2010-05-05 11:20:49 UTC (rev 67316)
@@ -4,10 +4,12 @@
 
 name                        dcmtk
 version                     3.5.4_p2
+set unpatched_version       [lindex [split ${version} _] 0]
+set stripped_version        [string map {. ""} ${unpatched_version}]
+revision                    1
 categories                  graphics
 platforms                   darwin
-maintainers                 uni-koblenz.de:guidolorenz \
-                            openmaintainer
+maintainers                 nomaintainer
 description                 The DICOM Toolkit.
 long_description            DCMTK is a collection of libraries and applications implementing \
                             large parts of the DICOM standard. It includes software for examining, \
@@ -17,38 +19,49 @@
 
 homepage                    http://dicom.offis.de/dcmtk
 
-master_sites                ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk354/ \
-                            http://dicom.offis.de/download/dcmtk/dcmtk354/
-distname                    dcmtk-3.5.4
+master_sites                ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk${stripped_version}/:dcmtk \
+                            http://dicom.offis.de/download/dcmtk/dcmtk${stripped_version}/:dcmtk \
+                            ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk${stripped_version}/patch/:patch \
+                            http://dicom.offis.de/download/dcmtk/dcmtk${stripped_version}/patch/:patch
 
-checksums                   md5 0afd971cdf976a5b336722ef2f68e6d7 \
-                            sha1 169056874947083e68eb941fcd53faaebc862ae5 \
-                            rmd160 d1558c9c68e53e0ea3b080fd2fb50b9d8e30eeba
+distname                    ${name}-${unpatched_version}
+distfiles                   ${distname}${extract.suffix}:dcmtk \
+                            dcmtk-3.5.4_p2.tar.gz:patch
 
+checksums                   ${distname}${extract.suffix} \
+                                md5 0afd971cdf976a5b336722ef2f68e6d7 \
+                                sha1 169056874947083e68eb941fcd53faaebc862ae5 \
+                                rmd160 d1558c9c68e53e0ea3b080fd2fb50b9d8e30eeba \
+                            dcmtk-3.5.4_p2.tar.gz \
+                                md5 d6df5f5c34291d44dd74d6fd0e146a23 \
+                                sha1 41c96c8054d3d74529a5b6f67552b2d5b9aea0c2 \
+                                rmd160 34c19b62c56b6242bf5ca75e620503c40895efb6
+
 depends_lib                 port:zlib \
                             port:tiff \
                             port:libpng \
-                            port:libxml2
+                            port:libxml2 \
+                            port:openssl
 
 destroot.target-append      install-lib
 
-# Apply changes made in ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk354/patch/dcmtk-3.5.4_p2.tar.gz
-patchfiles                  patch-dcmnet-apps-findscu.cc.diff \
-                            patch-dcmnet-apps-movescu.cc.diff
+post-extract {
+    # Two files have to be replaced by patched ones from dcmtk-3.5.4_p2.tar.gz
+    move -force ${worksrcpath}_p2/dcmnet/apps/findscu.cc ${worksrcpath}/dcmnet/apps/findscu.cc
+    move -force ${worksrcpath}_p2/dcmnet/apps/movescu.cc ${worksrcpath}/dcmnet/apps/movescu.cc
+}
 
-platform darwin 9 {
-	# See http://forum.dcmtk.org/viewtopic.php?t=1372
-	
-	patchfiles-append       patch-config-configure.in.diff
-	
-	post-patch {
-		# Usually, we would system "cd ${worksrcpath}/config && ./autoall" here, but due to a
-		# conflict with the MacPorts installation of autoconf, we must make sure that the
-		# original autoconf distrubuted with Leopard (from /usr/bin) is used.
-		system "cd ${worksrcpath}/config && /usr/bin/autoheader"
-		system "cd ${worksrcpath}/config && /usr/bin/autoconf"
-		system "cd ${worksrcpath}/config && /usr/bin/autoconf confmod.in > confmod"
-	}
+# Darwin 9+10 compatibility, see http://forum.dcmtk.org/viewtopic.php?t=1372
+patchfiles                  patch-config-configure.in.diff
+
+post-patch {
+    # After patching config/configure.in, autotools have to be run again.
+    # Usually, we would system "cd ${worksrcpath}/config && ./autoall" here,
+    # but due to a conflict with the MacPorts version of autoconf, we must
+    # make sure that autoconf from /usr/bin is used.
+    system "cd ${worksrcpath}/config && /usr/bin/autoheader"
+    system "cd ${worksrcpath}/config && /usr/bin/autoconf"
+    system "cd ${worksrcpath}/config && /usr/bin/autoconf confmod.in > confmod"
 }
 
 use_parallel_build          no

Modified: trunk/dports/graphics/dcmtk/files/patch-config-configure.in.diff
===================================================================
--- trunk/dports/graphics/dcmtk/files/patch-config-configure.in.diff	2010-05-05 10:48:00 UTC (rev 67315)
+++ trunk/dports/graphics/dcmtk/files/patch-config-configure.in.diff	2010-05-05 11:20:49 UTC (rev 67316)
@@ -1,24 +1,28 @@
 --- config/configure.in.orig	2005-12-14 18:33:38.000000000 +0100
-+++ config/configure.in	2008-07-28 20:26:15.000000000 +0200
-@@ -496,6 +496,10 @@
- 	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CXXFLAGS"
- 	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CFLAGS"
++++ config/configure.in	2009-12-11 02:24:52.000000000 +0100
+@@ -492,9 +492,9 @@
+ 	  ;;
+         *-*-netbsdelf2*)
+ 	  ;;
+-	*-*-darwin8.*)
+-	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CXXFLAGS"
+-	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CFLAGS"
++	*-*-darwin[8-9].*|*-*-darwin10.*)
++	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS"
++	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CFLAGS"
  	  ;; 
-+	*-*-darwin9.*)
-+	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CXXFLAGS"
-+	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CFLAGS"
-+	  ;; 
  	*)
  	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L $CXXFLAGS"
- 	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L $CFLAGS"
-@@ -532,6 +536,10 @@
- 	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CXXFLAGS"
- 	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CFLAGS"
+@@ -528,9 +528,9 @@
+ 	  CXXFLAGS="-D_POSIX_C_SOURCE=199506L $CXXFLAGS"
+ 	  CFLAGS="-D_POSIX_C_SOURCE=199506L $CFLAGS"
+ 	  ;;
+-	*-*-darwin8.*)
+-	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CXXFLAGS"
+-	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CFLAGS"
++	*-*-darwin[8-9].*|*-*-darwin10.*)
++	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CXXFLAGS"
++	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_DARWIN_C_SOURCE $CFLAGS"
  	  ;; 
-+	*-*-darwin9.*)
-+	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CXXFLAGS"
-+	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE $CFLAGS"
-+	  ;; 
  	*)
  	  CXXFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L $CXXFLAGS"
- 	  CFLAGS="-D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L $CFLAGS"

Deleted: trunk/dports/graphics/dcmtk/files/patch-dcmnet-apps-findscu.cc.diff
===================================================================
--- trunk/dports/graphics/dcmtk/files/patch-dcmnet-apps-findscu.cc.diff	2010-05-05 10:48:00 UTC (rev 67315)
+++ trunk/dports/graphics/dcmtk/files/patch-dcmnet-apps-findscu.cc.diff	2010-05-05 11:20:49 UTC (rev 67316)
@@ -1,132 +0,0 @@
---- dcmnet/apps/findscu.cc.orig	2005-12-08 16:44:19.000000000 +0100
-+++ dcmnet/apps/findscu.cc	2007-10-19 12:22:32.000000000 +0200
-@@ -21,10 +21,10 @@
-  *
-  *  Purpose: Query/Retrieve Service Class User (C-FIND operation)
-  *
-- *  Last Update:      $Author: meichel $
-- *  Update Date:      $Date: 2005/12/08 15:44:19 $
-+ *  Last Update:      $Author: onken $
-+ *  Update Date:      $Date: 2006/01/17 15:38:50 $
-  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmnet/apps/findscu.cc,v $
-- *  CVS/RCS Revision: $Revision: 1.47 $
-+ *  CVS/RCS Revision: $Revision: 1.48 $
-  *  Status:           $State: Exp $
-  *
-  *  CVS/RCS Log at end of file
-@@ -111,7 +111,6 @@
-     fprintf(stderr, "\n");
- }
- 
--
- static void
- addOverrideKey(OFConsoleApplication& app, const char* s)
- {
-@@ -119,18 +118,29 @@
-     unsigned int e = 0xffff;
-     int n = 0;
-     char val[1024];
-+    OFString dicName, valStr;
-     OFString msg;
-     char msg2[200];
--
-     val[0] = '\0';
-+
-     // try to parse group and element number
-     n = sscanf(s, "%x,%x=%s", &g, &e, val);
--
--    if (n != 2) {
--      // not a group-element pair, try to lookup in dictionary
-+    OFString toParse = s;
-+    size_t eqPos = toParse.find('=');
-+    if (n < 2)  // if at least no tag could be parsed
-+    { 
-+      // if value is given, extract it (and extrect dictname)
-+      if (eqPos != OFString_npos)
-+      {
-+        dicName = toParse.substr(0,eqPos).c_str();
-+        valStr = toParse.substr(eqPos+1,toParse.length());
-+      }
-+      else // no value given, just dictionary name
-+        dicName = s; // only dictionary name given (without value)
-+      // try to lookup in dictionary
-       DcmTagKey key(0xffff,0xffff);
-       const DcmDataDictionary& globalDataDict = dcmDataDict.rdlock();
--      const DcmDictEntry *dicent = globalDataDict.findEntry(s);
-+      const DcmDictEntry *dicent = globalDataDict.findEntry(dicName.c_str());
-       dcmDataDict.unlock();
-       if (dicent!=NULL) {
-         // found dictionary name, copy group and element number
-@@ -141,24 +151,15 @@
-       else {
-         // not found in dictionary
-         msg = "bad key format or dictionary name not found in dictionary: ";
--        msg += s;
-+        msg += dicName;
-         app.printError(msg.c_str());
-       }
--    }
--    const char* spos = s;
--    char ccc;
--    do
-+    } // tag could be parsed, copy value if it exists
-+    else
-     {
--      ccc = *spos;
--      if (ccc == '=') break;
--      if (ccc == 0) { spos = NULL; break; }
--      spos++;
--    } while(1);
--
--    if (spos && *(spos+1)) {
--        strcpy(val, spos+1);
-+      if (eqPos != OFString_npos)
-+        valStr = toParse.substr(eqPos+1,toParse.length());
-     }
--
-     DcmTag tag(g,e);
-     if (tag.error() != EC_Normal) {
-         sprintf(msg2, "unknown tag: (%04x,%04x)", g, e);
-@@ -169,26 +170,25 @@
-         sprintf(msg2, "cannot create element for tag: (%04x,%04x)", g, e);
-         app.printError(msg2);
-     }
--    if (strlen(val) > 0) {
--        elem->putString(val);
--        if (elem->error() != EC_Normal)
-+    if (valStr.length() > 0) {
-+        if (elem->putString(valStr.c_str()).bad())
-         {
-             sprintf(msg2, "cannot put tag value: (%04x,%04x)=\"", g, e);
-             msg = msg2;
--            msg += val;
-+            msg += valStr;
-             msg += "\"";
-             app.printError(msg.c_str());
-         }
-     }
- 
-     if (overrideKeys == NULL) overrideKeys = new DcmDataset;
--    overrideKeys->insert(elem, OFTrue);
--    if (overrideKeys->error() != EC_Normal) {
-+    if (overrideKeys->insert(elem, OFTrue).bad()) {
-         sprintf(msg2, "cannot insert tag: (%04x,%04x)", g, e);
-         app.printError(msg2);
-     }
- }
- 
-+
- static OFCondition addPresentationContext(T_ASC_Parameters *params);
- 
- static OFCondition
-@@ -1164,6 +1164,10 @@
- /*
- ** CVS Log
- ** $Log: findscu.cc,v $
-+** Revision 1.48  2006/01/17 15:38:50  onken
-+** Fixed "--key" option, which was broken when using the optional assignment ("=")
-+** operation inside the option value
-+**
- ** Revision 1.47  2005/12/08 15:44:19  meichel
- ** Changed include path schema for all DCMTK header files
- **

Deleted: trunk/dports/graphics/dcmtk/files/patch-dcmnet-apps-movescu.cc.diff
===================================================================
--- trunk/dports/graphics/dcmtk/files/patch-dcmnet-apps-movescu.cc.diff	2010-05-05 10:48:00 UTC (rev 67315)
+++ trunk/dports/graphics/dcmtk/files/patch-dcmnet-apps-movescu.cc.diff	2010-05-05 11:20:49 UTC (rev 67316)
@@ -1,121 +0,0 @@
---- dcmnet/apps/movescu.cc.orig	2005-12-08 16:44:20.000000000 +0100
-+++ dcmnet/apps/movescu.cc	2007-10-19 12:59:25.000000000 +0200
-@@ -21,10 +21,10 @@
-  *
-  *  Purpose: Query/Retrieve Service Class User (C-MOVE operation)
-  *
-- *  Last Update:      $Author: meichel $
-- *  Update Date:      $Date: 2005/12/08 15:44:20 $
-+ *  Last Update:      $Author: onken $
-+ *  Update Date:      $Date: 2006/01/17 15:38:50 $
-  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmnet/apps/movescu.cc,v $
-- *  CVS/RCS Revision: $Revision: 1.59 $
-+ *  CVS/RCS Revision: $Revision: 1.60 $
-  *  Status:           $State: Exp $
-  *
-  *  CVS/RCS Log at end of file
-@@ -148,17 +148,29 @@
-     unsigned int e = 0xffff;
-     int n = 0;
-     char val[1024];
-+    OFString dicName, valStr;
-     OFString msg;
-     char msg2[200];
--
-     val[0] = '\0';
--    n = sscanf(s, "%x,%x=%s", &g, &e, val);
- 
--    if (n != 2) {
--      // not a group-element pair, try to lookup in dictionary
-+    // try to parse group and element number
-+    n = sscanf(s, "%x,%x=%s", &g, &e, val);
-+    OFString toParse = s;
-+    size_t eqPos = toParse.find('=');
-+    if (n < 2)  // if at least no tag could be parsed
-+    { 
-+      // if value is given, extract it (and extrect dictname)
-+      if (eqPos != OFString_npos)
-+      {
-+        dicName = toParse.substr(0,eqPos).c_str();
-+        valStr = toParse.substr(eqPos+1,toParse.length());
-+      }
-+      else // no value given, just dictionary name
-+        dicName = s; // only dictionary name given (without value)
-+      // try to lookup in dictionary
-       DcmTagKey key(0xffff,0xffff);
-       const DcmDataDictionary& globalDataDict = dcmDataDict.rdlock();
--      const DcmDictEntry *dicent = globalDataDict.findEntry(s);
-+      const DcmDictEntry *dicent = globalDataDict.findEntry(dicName.c_str());
-       dcmDataDict.unlock();
-       if (dicent!=NULL) {
-         // found dictionary name, copy group and element number
-@@ -168,25 +180,16 @@
-       }
-       else {
-         // not found in dictionary
--        msg = "bad key format or key not found in dictionary: ";
--        msg += s;
-+        msg = "bad key format or dictionary name not found in dictionary: ";
-+        msg += dicName;
-         app.printError(msg.c_str());
-       }
-+    } // tag could be parsed, copy value if it exists
-+    else
-+    {
-+      if (eqPos != OFString_npos)
-+        valStr = toParse.substr(eqPos+1,toParse.length());
-     }
--    const char* spos = s;
--    char ccc;
--    do
--    {
--      ccc = *spos;
--      if (ccc == '=') break;
--      if (ccc == 0) { spos = NULL; break; }
--      spos++;
--    } while(1);
--
--    if (spos && *(spos+1)) {
--        strcpy(val, spos+1);
--    }
--
-     DcmTag tag(g,e);
-     if (tag.error() != EC_Normal) {
-         sprintf(msg2, "unknown tag: (%04x,%04x)", g, e);
-@@ -197,21 +200,19 @@
-         sprintf(msg2, "cannot create element for tag: (%04x,%04x)", g, e);
-         app.printError(msg2);
-     }
--    if (strlen(val) > 0) {
--        elem->putString(val);
--        if (elem->error() != EC_Normal)
-+    if (valStr.length() > 0) {
-+        if (elem->putString(valStr.c_str()).bad())
-         {
-             sprintf(msg2, "cannot put tag value: (%04x,%04x)=\"", g, e);
-             msg = msg2;
--            msg += val;
-+            msg += valStr;
-             msg += "\"";
-             app.printError(msg.c_str());
-         }
-     }
- 
-     if (overrideKeys == NULL) overrideKeys = new DcmDataset;
--    overrideKeys->insert(elem, OFTrue);
--    if (overrideKeys->error() != EC_Normal) {
-+    if (overrideKeys->insert(elem, OFTrue).bad()) {
-         sprintf(msg2, "cannot insert tag: (%04x,%04x)", g, e);
-         app.printError(msg2);
-     }
-@@ -1407,6 +1408,10 @@
- ** CVS Log
- **
- ** $Log: movescu.cc,v $
-+** Revision 1.60  2006/01/17 15:38:50  onken
-+** Fixed "--key" option, which was broken when using the optional assignment ("=")
-+** operation inside the option value
-+**
- ** Revision 1.59  2005/12/08 15:44:20  meichel
- ** Changed include path schema for all DCMTK header files
- **
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100505/230cf43a/attachment.html>


More information about the macports-changes mailing list