This is an automated email from the git hooks/post-receive script.

gert-guest pushed a commit to branch master
in repository dicom3tools.

commit 89fd31e9a3b4c995b168a925c940a7ab6438b47a
Author: Gert Wollny <gw.foss...@gmail.com>
Date:   Thu Dec 17 13:01:28 2015 +0100

    Add Debian directory
---
 debian/README.Debian                   |  49 +++++
 debian/changelog                       | 292 ++++++++++++++++++++++++++++
 debian/compat                          |   1 +
 debian/control                         |  28 +++
 debian/copyright                       |  42 ++++
 debian/patches/20_gcc4.3.patch         | 340 +++++++++++++++++++++++++++++++++
 debian/patches/bmpdump.man.patch       |  22 +++
 debian/patches/codeblockstylefix.patch |  25 +++
 debian/patches/dckey_mayham.patch      |  10 +
 debian/patches/dctable_mayhem.patch    |  10 +
 debian/patches/dctopgm8_mayhem.patch   |  12 ++
 debian/patches/jpegdump.man.patch      |  22 +++
 debian/patches/project.tmpl.patch      |  28 +++
 debian/patches/pvrg_naming.patch       |  34 ++++
 debian/patches/series                  |   9 +
 debian/patches/strip.patch             |  38 ++++
 debian/rules                           |  76 ++++++++
 debian/source/format                   |   1 +
 debian/watch                           |   4 +
 19 files changed, 1043 insertions(+)

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..4a4ec84
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,49 @@
+dicom3tools for Debian
+----------------------
+
+What are the dicom3tools ...
+
+See: http://www.dclunie.com/dicom3tools.html
+
+We only distribute the read-only command line executables, just as the 
official ones:
+
+$ unzip dicom3tools_winexe_1.00.snapshot.20090716.zip
+Archive:  dicom3tools_winexe_1.00.snapshot.20090716.zip
+  inflating: andump.exe              
+  inflating: dcdump.exe              
+  inflating: dcentvfy.exe            
+  inflating: dcfile.exe              
+  inflating: dchist.exe              
+  inflating: dciodvfy.exe            
+  inflating: dckey.exe               
+  inflating: dcsort.exe              
+  inflating: dcsrdump.exe            
+  inflating: dcstats.exe             
+  inflating: dctable.exe             
+  inflating: cygwin1.dll             
+
+In order to use the command line tools that generate DICOM file, you need to 
compile
+dicom3tools from source and set the UID root appropriately. See documentation
+for more information.
+
+
+
+
+Historical footnote:
+At first the package was being distributed with tool that 
+would generate DICOM with invalid root UID:
+...
+The package is setup so that default Root UID is 0.0.0.0. This means that DICOM
+file created will be syntactically correct, but will be refused by standard 
DICOM
+implementation as this is not allowed as valid Root UID. You should either only
+use this package for validation, but not in a production site, where produced
+DICOM files are supposed to be sent to the outside world.
+...
+
+But the main author objected that this would be extremely dangerous, as such 
it was decided to
+only distribute the exact same binaries as the one for windows and MacOSx. Ref:
+
+Debian package for dicom3tools:
+http://groups.google.com/group/comp.protocols.dicom/browse_thread/thread/719f2662d40e5c63
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Sun, 09 Aug 2009 10:39:39 
+0200
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..09f0992
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,292 @@
+dicom3tools (1.00~20151213160232-1) UNRELEASED; urgency=medium
+
+  * New upstream version 
+  * Add patch dckey_mayhem.patch Closes: #715786
+  * Add patch dctable_mayhem.patch Closes: #715809
+  * Add patch dckey_mayhem.patch Closes: #715811
+  * d/control: Add Gert Wollny to uploaders 
+  * d/copyright: Update copyright year of original source, add Gert 
+    to d/* copyrights. 
+
+ -- Gert Wollny <gw.foss...@gmail.com>  Wed, 16 Dec 2015 11:28:25 +0100
+
+dicom3tools (1.00~20150717110018-1) unstable; urgency=medium
+
+  * New upstream version
+  * Add myself to Uploaders
+  * Priority: optional
+  * cme fix dpkg-control
+  * DEP5 copyright
+  * debian/rules: short dh
+
+ -- Andreas Tille <ti...@debian.org>  Sun, 19 Jul 2015 12:51:57 +0200
+
+dicom3tools (1.00~20140902075059-1) unstable; urgency=low
+
+  * New upstream
+  * Handle large Pixel Data (>2Gb)
+
+ -- Mathieu Malaterre <ma...@debian.org>  Thu, 04 Sep 2014 09:52:31 +0200
+
+dicom3tools (1.00~20140527121828-1) unstable; urgency=low
+
+  * New upstream, use new numbering convention
+  * Remove patch applied upstream:
+    - fixkdu.patch
+    - fixupdict.patch
+
+ -- Mathieu Malaterre <ma...@debian.org>  Tue, 03 Jun 2014 21:03:52 +0200
+
+dicom3tools (1.00~20140306-1) unstable; urgency=low
+
+  * New upstream
+  * Bump to Std-Vers 3.9.5, no changes needed
+  * Reduce dependency, move to Recommends instead
+  * Remove unrelated Suggests
+
+ -- Mathieu Malaterre <ma...@debian.org>  Mon, 10 Mar 2014 11:21:32 +0100
+
+dicom3tools (1.00~20140105-1) unstable; urgency=low
+
+  * New upstream
+  * Update private attributes + New CPs
+
+ -- Mathieu Malaterre <ma...@debian.org>  Mon, 13 Jan 2014 14:04:13 +0100
+
+dicom3tools (1.00~20131005-1) unstable; urgency=low
+
+  * New upstream
+  * Fix compilation issues with clang
+
+ -- Mathieu Malaterre <ma...@debian.org>  Tue, 08 Oct 2013 17:37:51 +0200
+
+dicom3tools (1.00~20130914-1) unstable; urgency=low
+
+  * New upstream
+  * Add recent CPs corrections
+
+ -- Mathieu Malaterre <ma...@debian.org>  Tue, 17 Sep 2013 17:04:54 +0200
+
+dicom3tools (1.00~20130623-2) unstable; urgency=low
+
+  * Add dcunrgb (+Depends: netpbm)
+  * Fix other.tpl dict
+
+ -- Mathieu Malaterre <ma...@debian.org>  Fri, 05 Jul 2013 09:58:29 +0200
+
+dicom3tools (1.00~20130623-1) unstable; urgency=low
+
+  * New upstream
+  * Include latest Supps + CPs
+
+ -- Mathieu Malaterre <ma...@debian.org>  Thu, 04 Jul 2013 08:18:31 +0200
+
+dicom3tools (1.00~20130322-1) unstable; urgency=low
+
+  * New upstream
+  * Use proposed d/watch (Thanks Bart Martens)
+
+ -- Mathieu Malaterre <ma...@debian.org>  Fri, 31 May 2013 16:16:21 +0200
+
+dicom3tools (1.0~20130226-2) unstable; urgency=low
+
+  * New upstream
+  * Fix issue with PBM/PPM conversion
+
+ -- Mathieu Malaterre <ma...@debian.org>  Thu, 28 Feb 2013 13:55:53 +0100
+
+dicom3tools (1.0~20130220b-1) experimental; urgency=low
+
+  * New upstream
+  * Add code for Sup 162 (SCOORD3D)
+
+ -- Mathieu Malaterre <ma...@debian.org>  Fri, 22 Feb 2013 09:46:12 +0100
+
+dicom3tools (1.0~20130210b-1) experimental; urgency=low
+
+  * New upstream
+  * Add support for WSI and 3D US. Closes: #670536
+
+ -- Mathieu Malaterre <ma...@debian.org>  Mon, 11 Feb 2013 10:14:14 +0100
+
+dicom3tools (1.0~20121227-1) unstable; urgency=low
+
+  * New upstream
+  * Switch Std-Vers to 3.9.4, no changes needed
+  * Use upstream bzip2 tarball directly
+  * Fix dcj2k with no option (lossless was lossy)
+  * Add CPPFLAGS to compilation. Closes: #678328
+
+ -- Mathieu Malaterre <ma...@debian.org>  Wed, 09 Jan 2013 11:50:45 +0100
+
+dicom3tools (1.0~20120911-1) unstable; urgency=low
+
+  * New upstream
+    - Add support for DICOS
+  * Fix issues with the new SCImage family
+
+ -- Mathieu Malaterre <ma...@debian.org>  Thu, 11 Oct 2012 09:38:38 +0200
+
+dicom3tools (1.0~20120505-1) unstable; urgency=low
+
+  * New upstream.
+   - Adding lots of private attributes
+  * Remove dccp. Closes: #667575
+  * Fix jpegdump. Closes: #668629
+
+ -- Mathieu Malaterre <ma...@debian.org>  Sun, 20 May 2012 19:02:30 +0200
+
+dicom3tools (1.0~20120402-1) unstable; urgency=low
+
+  * New upstream
+   - add more private attribute
+   - improve legacy multi-frame conversion 
+  * Remove DMUA flag, not required aymore
+  * Use my @d.o alias
+
+ -- Mathieu Malaterre <ma...@debian.org>  Wed, 04 Apr 2012 15:17:57 +0200
+
+dicom3tools (1.0~20120305-1) unstable; urgency=low
+
+  * New release
+   - remove 20_gcc4.3.patch applied upstream (partially)
+   - remove configure.patch applied upstream
+  * Bump Standards-Version to 3.9.3. No changes needed.
+  * Use DEP-3 for patches
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Fri, 09 Mar 2012 16:12:57 
+0100
+
+dicom3tools (1.0~20120224-1) unstable; urgency=low
+
+  [ Thorsten Alteholz ]
+  * debian/rules get-orig-source: put orig.tar.gz in ../tarballs to allow
+    automatic build with svn-buildpackage
+
+  [ Mathieu Malaterre ]
+  * Remove fixup_tpl patch, applied upstream.
+  * Improve Surf Seg IOD
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Sun, 26 Feb 2012 20:53:28 
+0100
+
+dicom3tools (1.0~20111213-1) unstable; urgency=low
+
+  * New upstream
+   - Improve human vs animal view position conditions
+  * Fix VCS urls
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Fri, 16 Dec 2011 11:50:18 
+0100
+
+dicom3tools (1.0~20111109-1) unstable; urgency=low
+
+  * New upstream
+  * Switch to dpkg-source 3.0 (quilt) format
+  * Add hardening compilation flags
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Fri, 11 Nov 2011 16:49:07 
+0100
+
+dicom3tools (1.0~20110918-1) unstable; urgency=low
+
+  * New upstream
+    - Mostly private attributes fixes
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Fri, 23 Sep 2011 08:33:19 
+0200
+
+dicom3tools (1.0~20110901-1) unstable; urgency=low
+
+  * New upstream
+  * Fix lintian debian-rules-missing-recommended-target
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Sat, 03 Sep 2011 17:39:25 
+0200
+
+dicom3tools (1.0~20110529-1) unstable; urgency=low
+
+  * New upstream
+  * Allow new executable: pnmtoraw
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Fri, 17 Jun 2011 12:10:34 
+0200
+
+dicom3tools (1.0~20110522-1) unstable; urgency=low
+
+  * New upstream
+  * Update Standards-Version to 3.9.2. No changes needed
+  * Properly handle uncompressed icon. Closes: #625816
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Sat, 28 May 2011 17:55:51 
+0200
+
+dicom3tools (1.0~20110207-1) unstable; urgency=low
+
+  * New upstream
+  * Fix dctopgm8 and MONOCHROME1 windowing
+  * Add cmd line opt for dctopgm8 (override VOI LUT)
+  * Add suggest on pvrg-jpeg
+  * Use --no-name when compressing orig tarball
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Wed, 20 Apr 2011 11:35:51 
+0200
+
+dicom3tools (1.0~20101204-1) experimental; urgency=low
+
+  * New upsteam
+  * Add new command line tools: dctopgm8, dcposn, dctopgx, dctopnm
+  * Bump Standard-Version to 3.9.1, no change needed
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Thu, 13 Jan 2011 09:11:20 
+0100
+
+dicom3tools (1.0~20100510-1) unstable; urgency=low
+
+  * New upstream (fix pnmtodc for odd length)
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Tue, 11 May 2010 11:39:07 
+0200
+
+dicom3tools (1.0~20100206-2) unstable; urgency=low
+
+  * Add jpegdump command line tool for dumping jpeg structure.
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Mon, 03 May 2010 17:50:53 
+0200
+
+dicom3tools (1.0~20100206-1) unstable; urgency=low
+
+  * New upstream.
+  * Bump Standard-Version to 3.8.4, no change needed
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Thu, 25 Feb 2010 09:49:28 
+0100
+
+dicom3tools (1.0~20091217-1) unstable; urgency=low
+
+  * Fix DEB_BUILD_OPTIONS=nostrip discarded (Closes: #559320)
+  * dciodvfy: Allow RGB for RLE. Closes: #561122 
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Sun, 27 Dec 2009 15:06:08 
+0100
+
+dicom3tools (1.0~20091113-1) unstable; urgency=low
+
+  * New upstream.
+  * Add new utilities: dcdirdmp, dcsrdump
+  * Remove static libraries
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Fri, 20 Nov 2009 14:44:50 
+0100
+
+dicom3tools (1.0~20090716-4) unstable; urgency=low
+
+  * Fix compilation on hurd-i386 
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Fri, 11 Sep 2009 09:25:13 
+0200
+
+dicom3tools (1.0~20090716-3) unstable; urgency=low
+
+  * debian/control: adding dep to x11proto-xext-dev, find X11/extensions/XShm.h
+  * Fix compilation on kFreeBSD (Closes: #545844) 
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Wed, 09 Sep 2009 18:27:23 
+0200
+
+dicom3tools (1.0~20090716-2) unstable; urgency=low
+
+  * debian/control: adding dep to libx11-dev, to find X11/Xlib.h 
+  * Fix compilation on buildd machine with no tty (Closes: #545697) 
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Tue, 08 Sep 2009 16:44:03 
+0200
+
+dicom3tools (1.0~20090716-1) unstable; urgency=low
+
+  * Initial Release (Closes: #508901)
+
+ -- Mathieu Malaterre <mathieu.malate...@gmail.com>  Sun, 09 Aug 2009 10:39:39 
+0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..e55fb8b
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,28 @@
+Source: dicom3tools
+Maintainer: Debian Med Packaging Team 
<debian-med-packag...@lists.alioth.debian.org>
+Uploaders: Mathieu Malaterre <ma...@debian.org>,
+           Andreas Tille <ti...@debian.org>,
+          Gert Wollny <gw.foss...@gmail.com>
+Section: graphics
+Priority: optional
+Build-Depends: debhelper (>= 9),
+               xutils-dev,
+               libx11-dev,
+               libxext-dev,
+               dpkg-dev (>= 1.16.1~)
+Standards-Version: 3.9.6
+Vcs-Browser: 
http://anonscm.debian.org/viewvc/debian-med/trunk/packages/dicom3tools/trunk/
+Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/dicom3tools/trunk/
+Homepage: http://www.dclunie.com/dicom3tools.html
+
+Package: dicom3tools
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends}
+Recommends: netpbm
+Suggests: pvrg-jpeg
+Description: DICOM medical image files manipulation and conversion tools
+ Command line utilities for creating, modifying, dumping and validating
+ files of DICOM attributes. Support conversion of some proprietary medical
+ image formats to DICOM. Can handle older ACR/NEMA format data, and some
+ proprietary versions of that such as SPI.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..2dcaee1
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,42 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Dicom3tools
+Upstream-Contact: David A. Clunie <dclu...@dclunie.com>
+Source: http://www.dclunie.com/dicom3tools/workinprogress/
+
+Files: *
+Copyright: 1993-2015, David A. Clunie DBA PixelMed Publishing
+License: BSD-3-clause
+Comment:
+    This software has neither been tested nor approved for clinical use or for 
incorporation in
+    a medical device. It is the redistributor's or user's responsibility to 
comply with any
+    applicable local, state, national or international regulations.
+
+Files: debian/*
+Copyright: 2008-2014 Mathieu Malaterre <ma...@debian.org>
+           2015      Andreas Tille <ti...@debian.org>, 
+                     Gert Wollny <gw.foss...@gmail.com> 
+License: BSD-3-clause
+
+License: BSD-3-clause
+    Redistribution and use in source and binary forms, with or without 
modification, are
+    permitted provided that the following conditions are met:
+ .
+    1. Redistributions of source code must retain the above copyright notice, 
this list of
+       conditions and the following disclaimers.
+ .
+    2. Redistributions in binary form must reproduce the above copyright 
notice, this list of
+       conditions and the following disclaimers in the documentation and/or 
other materials
+       provided with the distribution.
+ .
+    3. Neither the name of PixelMed Publishing nor the names of its 
contributors may
+       be used to endorse or promote products derived from this software.
+ .
+    This software is provided by the copyright holders and contributors "as 
is" and any
+    express or implied warranties, including, but not limited to, the implied 
warranties
+    of merchantability and fitness for a particular purpose are disclaimed. In 
no event
+    shall the copyright owner or contributors be liable for any direct, 
indirect, incidental,
+    special, exemplary, or consequential damages (including, but not limited 
to, procurement
+    of substitute goods or services; loss of use, data or profits; or business 
interruption)
+    however caused and on any theory of liability, whether in contract, strict 
liability, or
+    tort (including negligence or otherwise) arising in any way out of the use 
of this software,
+    even if advised of the possibility of such damage.    
diff --git a/debian/patches/20_gcc4.3.patch b/debian/patches/20_gcc4.3.patch
new file mode 100644
index 0000000..45b4b6d
--- /dev/null
+++ b/debian/patches/20_gcc4.3.patch
@@ -0,0 +1,340 @@
+Description: Porting to gcc 4.3
+ http://gcc.gnu.org/gcc-4.3/porting_to.html
+ Most can be automated with:
+ find . -type f -exec sed -i -e 's/#include <iostream.h>/#include 
<iostream>\nusing namespace std;/g' {} \;
+ find . -type f -exec sed -i -e 's/#include <iomanip.h>/#include <iomanip>/g' 
{} \;
+ find . -type f -exec sed -i -e 's/#include <fstream.h>/#include <fstream>/g' 
{} \;
+ the most complex part comes from the deprecation of ostrstream with a
+ different ostringstream (allocation is not done at same level)
+ This patch is kept around as code still uses ostrstream, which has been 
deprecated. It will be used
+ when default c++ compiler for debian will not accept it anymore.
+Author: Mathieu Malaterre <mathieu.malate...@gmail.com>
+Forwarded: dclu...@dclunie.com
+Last-Update: 2012-03-05
+
+Index: dicom3tools-1.0~20120228/appsrc/dcfile/dcdirmk.cc_sqlengths
+===================================================================
+--- dicom3tools-1.0~20120228.orig/appsrc/dcfile/dcdirmk.cc_sqlengths   
2001-11-11 15:57:50.000000000 +0100
++++ dicom3tools-1.0~20120228/appsrc/dcfile/dcdirmk.cc_sqlengths        
2012-03-05 10:54:02.000000000 +0100
+@@ -1,4 +1,4 @@
+-#include <fstream.h>
++#include <fstream>
+ 
+ #include "attrmxls.h"
+ #include "attrtype.h"
+Index: dicom3tools-1.0~20120228/appsrc/misc/jpegdump.cc.pre2000
+===================================================================
+--- dicom3tools-1.0~20120228.orig/appsrc/misc/jpegdump.cc.pre2000      
2001-11-11 15:57:49.000000000 +0100
++++ dicom3tools-1.0~20120228/appsrc/misc/jpegdump.cc.pre2000   2012-03-05 
10:54:02.000000000 +0100
+@@ -1,4 +1,5 @@
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+ 
+ #include "basetype.h"
+ 
+Index: dicom3tools-1.0~20120228/libsrc/include/dctool/uidgen.h
+===================================================================
+--- dicom3tools-1.0~20120228.orig/libsrc/include/dctool/uidgen.h       
2006-10-22 00:03:44.000000000 +0200
++++ dicom3tools-1.0~20120228/libsrc/include/dctool/uidgen.h    2012-03-05 
10:54:02.000000000 +0100
+@@ -1,9 +1,12 @@
++#include <sstream>
++using namespace std;
++
+ #ifndef __Header_uidgen__
+ #define __Header_uidgen__
+ 
+ class GeneratedUID {
+-      ostrstream ost;
+-      char *string;
++      ostringstream ost;
++      char* string;
+       const char *stamp;
+ protected:
+       void    setSOPInstance();
+Index: dicom3tools-1.0~20120228/libsrc/include/generic/errclass.h
+===================================================================
+--- dicom3tools-1.0~20120228.orig/libsrc/include/generic/errclass.h    
2012-02-26 12:17:47.000000000 +0100
++++ dicom3tools-1.0~20120228/libsrc/include/generic/errclass.h 2012-03-05 
10:54:02.000000000 +0100
+@@ -27,15 +27,16 @@
+ 
+       ~ErrorsInClass()
+               {
+-                      if (errorstring) delete[] errorstring;
++                      //if (errorstring) delete[] errorstring;
++                      if (errorstring) free(errorstring);
+               }
+ 
+       bool            good(void)      { return good_flag; }
+ 
+       const char *    errors(void)
+               {
+-                      errorstream << ends;
+-                      errorstring=errorstream.str();
++                      errorstream; // << ends;
++                      errorstring=strdup(errorstream.str().c_str());
+                       return errorstring ? errorstring : "";
+               }
+ };
+Index: dicom3tools-1.0~20120228/libsrc/src/dcdisp/rdgray.cc.postsignextend
+===================================================================
+--- dicom3tools-1.0~20120228.orig/libsrc/src/dcdisp/rdgray.cc.postsignextend   
2001-11-11 15:57:50.000000000 +0100
++++ dicom3tools-1.0~20120228/libsrc/src/dcdisp/rdgray.cc.postsignextend        
2012-03-05 10:54:02.000000000 +0100
+@@ -1,4 +1,5 @@
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+ 
+ #include "basetype.h"
+ #include "srcsink.h"
+Index: dicom3tools-1.0~20120228/libsrc/src/dcdisp/rdimage.cc.postsignextend
+===================================================================
+--- dicom3tools-1.0~20120228.orig/libsrc/src/dcdisp/rdimage.cc.postsignextend  
2001-11-11 15:57:50.000000000 +0100
++++ dicom3tools-1.0~20120228/libsrc/src/dcdisp/rdimage.cc.postsignextend       
2012-03-05 10:54:02.000000000 +0100
+@@ -1,5 +1,6 @@
+-#include <iostream.h>
+-#include <iomanip.h>
++#include <iostream>
++using namespace std;
++#include <iomanip>
+ 
+ #include "basetype.h"
+ #include "srcsink.h"
+Index: dicom3tools-1.0~20120228/libsrc/src/dcdisp/usegray.cc.signedwork
+===================================================================
+--- dicom3tools-1.0~20120228.orig/libsrc/src/dcdisp/usegray.cc.signedwork      
2001-11-11 15:57:50.000000000 +0100
++++ dicom3tools-1.0~20120228/libsrc/src/dcdisp/usegray.cc.signedwork   
2012-03-05 10:54:02.000000000 +0100
+@@ -1,5 +1,6 @@
+-#include <iostream.h> // only for debugging
+-#include <iomanip.h>  // only for debugging
++#include <iostream>
++using namespace std;  // only for debugging
++#include <iomanip>    // only for debugging
+ 
+ #include "basetype.h"
+ #include "usegray.h"
+Index: dicom3tools-1.0~20120228/libsrc/src/dctool/uidgen.cc
+===================================================================
+--- dicom3tools-1.0~20120228.orig/libsrc/src/dctool/uidgen.cc  2012-02-26 
13:01:26.000000000 +0100
++++ dicom3tools-1.0~20120228/libsrc/src/dctool/uidgen.cc       2012-03-05 
10:54:02.000000000 +0100
+@@ -107,7 +107,8 @@
+ 
+ GeneratedUID::~GeneratedUID()
+ {
+-      if (string) delete[] string;
++      //if (string) delete[] string;
++      if (string) free(string);
+ }
+ 
+ GeneratedUID::operator char *(void)
+@@ -119,8 +120,9 @@
+               ost << stamp;
+       else
+               ost << (unsigned long)time(0) << "." << (unsigned long)getpid 
() << "." << (unsigned long)gethostid();
+-      ost << ends;
++      //ost << ends;
+ 
+-      return string=ost.str();
++  string = strdup( ost.str().c_str() );
++       return string;
+ }
+ 
+Index: dicom3tools-1.0~20120228/libsrc/src/generic/ioopto.cc
+===================================================================
+--- dicom3tools-1.0~20120228.orig/libsrc/src/generic/ioopto.cc 2012-02-26 
12:29:33.000000000 +0100
++++ dicom3tools-1.0~20120228/libsrc/src/generic/ioopto.cc      2012-03-05 
10:54:02.000000000 +0100
+@@ -32,7 +32,7 @@
+ char *
+ OutputOptions::usage(void)
+ {
+-      ostrstream ostr;
++      ostringstream ostr;
+       const char **ptr;
+       const char *lead;
+ 
+@@ -41,10 +41,10 @@
+               ostr << lead << "-" << *ptr;
+       ostr << " " << MMsgDC(OutputFile) << "]";
+ 
+-      ostr << ends;
++      //ostr << ends;
+ 
+       // string deletion becomes callers responsibility ...
+-      return ostr.str();
++      return strdup(ostr.str().c_str());
+ }
+ 
+ void
+Index: dicom3tools-1.0~20120228/libsrc/src/locale/mesgtext.cc
+===================================================================
+--- dicom3tools-1.0~20120228.orig/libsrc/src/locale/mesgtext.cc        
2012-02-26 12:56:24.000000000 +0100
++++ dicom3tools-1.0~20120228/libsrc/src/locale/mesgtext.cc     2012-03-05 
10:54:02.000000000 +0100
+@@ -43,28 +43,28 @@
+ char *
+ EMSGDC_Class::error(const char *index)
+ {
+-      ostrstream stream;
++      ostringstream stream;
+       stream << findDescription("Error") << " - ";
+-      if (index && strlen(index)) stream << findDescription(index) << ends;
+-      return stream.str();
++      if (index && strlen(index)) stream << findDescription(index); // << 
ends;
++      return strdup(stream.str().c_str());
+ }
+ 
+ char *
+ EMSGDC_Class::warning(const char *index)
+ {
+-      ostrstream stream;
++      ostringstream stream;
+       stream << findDescription("Warning") << " - ";
+-      if (index && strlen(index)) stream << findDescription(index) << ends;
+-      return stream.str();
++      if (index && strlen(index)) stream << findDescription(index); // << 
ends;
++      return strdup(stream.str().c_str());
+ }
+ 
+ char *
+ EMSGDC_Class::abort(const char *index)
+ {
+-      ostrstream stream;
++      ostringstream stream;
+       stream << findDescription("Abort") << " - ";
+-      if (index && strlen(index)) stream << findDescription(index) << ends;
+-      return stream.str();
++      if (index && strlen(index)) stream << findDescription(index); // << 
ends;
++      return strdup(stream.str().c_str());
+ }
+ 
+ const char *
+Index: dicom3tools-1.0~20120228/libsrc/support/binval.awk
+===================================================================
+--- dicom3tools-1.0~20120228.orig/libsrc/support/binval.awk    2002-06-20 
17:23:25.000000000 +0200
++++ dicom3tools-1.0~20120228/libsrc/support/binval.awk 2012-03-05 
10:54:02.000000000 +0100
+@@ -13,6 +13,8 @@
+       print ""
+ 
+       if (role == "declare" || role == "define") {
++              print "#include <sstream>"
++              print "using namespace std;"
+               print "#ifndef __Header_" outname "__"
+               print "#define __Header_" outname "__"
+               print ""
+@@ -40,7 +42,7 @@
+               print "BinaryBitMapDescription_" name "(Uint16 value)"
+               print "{"
+               print "\tUint16 validmask=0;"
+-              print "\tostrstream ost;"
++              print "\tostringstream ost;"
+       }
+ 
+       }
+@@ -59,7 +61,7 @@
+               print "char *"
+               print "BinaryValueDescription_" name "(Uint16 value)"
+               print "{"
+-              print "\tostrstream ost;"
++              print "\tostringstream ost;"
+               print "\tswitch (value) {"
+       }
+ 
+@@ -89,8 +91,8 @@
+ 
+               if (role == "define") {
+                       print "\t\tcase " code ":"
+-                      print "\t\t\tost << \"" meaning "\" << ends;"
+-                      print "\t\t\treturn ost.str();"
++                      print "\t\t\tost << \"" meaning "\" /*<< ends*/;"
++                      print "\t\t\treturn strdup(ost.str().c_str());"
+               }
+       }
+       else if (mode == "bitmap") {
+@@ -156,7 +158,7 @@
+                       print "\t{"
+                       print "\t\tvalidmask|=(1<<" bitnumber ");"
+                       print "\t\tUint16 bitvalue=value&(1<<" bitnumber ");"
+-                      print "\t\tost << \"" meaning "(\" << (bitvalue ? \"" 
truevalue "\" : \"" falsevalue "\") << \") \" << ends;"
++                      print "\t\tost << \"" meaning "(\" << (bitvalue ? \"" 
truevalue "\" : \"" falsevalue "\") << \") \" /*<< ends*/;"
+                       print "\t}"
+               }
+       }
+@@ -171,7 +173,7 @@
+               print "\tif (value&~validmask)"
+               print "\t\treturn 0;"
+               print "\telse"
+-              print "\t\treturn ost.str();"
++              print "\t\treturn strdup(ost.str().c_str());"
+               print "}"
+               print ""
+       }
+Index: dicom3tools-1.0~20120228/libsrc/support/tagval.awk
+===================================================================
+--- dicom3tools-1.0~20120228.orig/libsrc/support/tagval.awk    2002-06-20 
17:23:25.000000000 +0200
++++ dicom3tools-1.0~20120228/libsrc/support/tagval.awk 2012-03-05 
10:54:02.000000000 +0100
+@@ -11,6 +11,8 @@
+       print ""
+ 
+       if (role == "declare" || role == "define") {
++              print "#include <sstream>"
++              print "using namespace std;"
+               print "#ifndef __Header_" outname "__"
+               print "#define __Header_" outname "__"
+               print ""
+@@ -36,7 +38,7 @@
+               print "char *"
+               print "TagValueDescription_" name "(Uint16 group,Uint16 
element)"
+               print "{"
+-              print "\tostrstream ost;"
++              print "\tostringstream ost;"
+               print "\tUint32 value=(((Uint32)group)<<16)|(Uint32)element;"
+               print "\tswitch (value) {"
+       }
+@@ -82,8 +84,8 @@
+       else {
+               if (role == "define") {
+                       print "\t\tcase (((Uint32)" group ")<<16)|(Uint32)" 
element" :"
+-                      print "\t\t\tost << \"" meaning "\" << ends;"
+-                      print "\t\t\treturn ost.str();"
++                      print "\t\t\tost << \"" meaning "\" /*<< ends*/;"
++                      print "\t\t\treturn strdup(ost.str().c_str());"
+               }
+       }
+ 
+Index: dicom3tools-1.0~20120228/support/mktime.cc
+===================================================================
+--- dicom3tools-1.0~20120228.orig/support/mktime.cc    2012-02-26 
12:27:31.000000000 +0100
++++ dicom3tools-1.0~20120228/support/mktime.cc 2012-03-05 10:54:02.000000000 
+0100
+@@ -5,7 +5,8 @@
+ #include <cstdlib>
+ #else
+ #include <time.h>
+-#include <iostream.h>
++#include <iostream>
++using namespace std;
+ #include <assert.h>
+ #include <stdlib.h>
+ #endif
+Index: dicom3tools-1.0~20120228/libsrc/src/dctool/attrmxrd.cc
+===================================================================
+--- dicom3tools-1.0~20120228.orig/libsrc/src/dctool/attrmxrd.cc        
2012-02-26 01:44:47.000000000 +0100
++++ dicom3tools-1.0~20120228/libsrc/src/dctool/attrmxrd.cc     2012-03-05 
10:54:02.000000000 +0100
+@@ -6,6 +6,7 @@
+ #include "attrothr.h"
+ #include "attrval.h"
+ #include "mesgtext.h"
++#include <stdio.h> // EOF
+ 
+ // This may be defined in attrtype.h previously ...
+ 
+Index: dicom3tools-1.0~20120228/appsrc/dcfile/dcfile.cc
+===================================================================
+--- dicom3tools-1.0~20120228.orig/appsrc/dcfile/dcfile.cc      2012-02-26 
03:05:55.000000000 +0100
++++ dicom3tools-1.0~20120228/appsrc/dcfile/dcfile.cc   2012-03-05 
10:54:02.000000000 +0100
+@@ -7,6 +7,7 @@
+ #include "attrval.h"
+ #include "elmconst.h"
+ #include "transynd.h"
++#include <stdio.h>
+ 
+ static bool
+ isOtherByteOrWordVR(const char *vr)
diff --git a/debian/patches/bmpdump.man.patch b/debian/patches/bmpdump.man.patch
new file mode 100644
index 0000000..ff445b4
--- /dev/null
+++ b/debian/patches/bmpdump.man.patch
@@ -0,0 +1,22 @@
+Description: the bmpdump.man file was empty. We need to provide a minimal one 
instead.
+Author: Mathieu Malaterre <ma...@debian.org>
+Forwarded: not-needed
+Last-Update: 2012-03-05
+
+--- /dev/null
++++ b/appsrc/misc/bmpdump.man
+@@ -0,0 +1,14 @@
++.TH bmpdump: "1" "May 2010" "bmpdump" "User Commands"
++.SH NAME
++bmpdump: \- manual page for bmpdump
++.SH SYNOPSIS
++.B bmpdump
++[\fIOPTION\fR]... < \fIFILE\fR...
++.SH DESCRIPTION
++bmpdump
++.PP
++dumps a BMP file, it will display the structure and values contained in the 
specified BMP file
++
++This manual page was written by Mathieu Malaterre
++<ma...@debian.org> for the Debian GNU/Linux system (but may be used by 
others).
++
diff --git a/debian/patches/codeblockstylefix.patch 
b/debian/patches/codeblockstylefix.patch
new file mode 100644
index 0000000..453fd25
--- /dev/null
+++ b/debian/patches/codeblockstylefix.patch
@@ -0,0 +1,25 @@
+Description: Invalid Code-block style for the SPcod and SPcoc parameters
+Author: Mathieu Malaterre <ma...@debian.org>
+Bug-Debian: http://bugs.debian.org/668629
+
+--- a/appsrc/misc/jpegdump.cc
++++ b/appsrc/misc/jpegdump.cc
+@@ -820,12 +820,12 @@ public:
+                       
+                       CodeBlockStyle                          = buffer[8];
+                       // Table A.19 - Code-block style for the SPcod and 
SPcoc parameters 
+-                      SelectiveArithmeticCodingBypass                 = (Scod 
& 0x01) != 0;
+-                      ResetContextProbabilitiesOnCodingPassBoundaries = (Scod 
& 0x02) != 0;
+-                      TerminationOnEachCodingPass                     = (Scod 
& 0x04) != 0;
+-                      VerticallyCausalContext                         = (Scod 
& 0x08) != 0;
+-                      PredictableTermination                          = (Scod 
& 0x10) != 0;
+-                      SegmentationSymbolsAreUsed                      = (Scod 
& 0x20) != 0;
++                      SelectiveArithmeticCodingBypass                 = 
(CodeBlockStyle & 0x01) != 0;
++                      ResetContextProbabilitiesOnCodingPassBoundaries = 
(CodeBlockStyle & 0x02) != 0;
++                      TerminationOnEachCodingPass                     = 
(CodeBlockStyle & 0x04) != 0;
++                      VerticallyCausalContext                         = 
(CodeBlockStyle & 0x08) != 0;
++                      PredictableTermination                          = 
(CodeBlockStyle & 0x10) != 0;
++                      SegmentationSymbolsAreUsed                      = 
(CodeBlockStyle & 0x20) != 0;
+ 
+                       WaveletTransformation = buffer[9];
+                       descriptionOfWaveletTransformation = 
getDescriptionOfWaveletTransformation(WaveletTransformation);
diff --git a/debian/patches/dckey_mayham.patch 
b/debian/patches/dckey_mayham.patch
new file mode 100644
index 0000000..5805679
--- /dev/null
+++ b/debian/patches/dckey_mayham.patch
@@ -0,0 +1,10 @@
+--- a/appsrc/dcfile/dckey.cc
++++ b/appsrc/dcfile/dckey.cc
+@@ -101,6 +101,7 @@
+        || !options.good()
+        || !input_opener.good()
+        || !options
++         || !keylist
+        || bad) {
+               cerr    << MMsgDC(Usage) << ": " << options.command()
+                       << dicom_input_options.usage()
diff --git a/debian/patches/dctable_mayhem.patch 
b/debian/patches/dctable_mayhem.patch
new file mode 100644
index 0000000..21e26ab
--- /dev/null
+++ b/debian/patches/dctable_mayhem.patch
@@ -0,0 +1,10 @@
+--- a/appsrc/dcfile/dctable.cc
++++ b/appsrc/dcfile/dctable.cc
+@@ -180,6 +180,7 @@
+       if (!dicom_input_options.good()
+        || !options.good()
+        || !options
++       || !keylist
+        || bad) {
+               cerr    << MMsgDC(Usage) << ": " << options.command()
+                       << dicom_input_options.usage()
diff --git a/debian/patches/dctopgm8_mayhem.patch 
b/debian/patches/dctopgm8_mayhem.patch
new file mode 100644
index 0000000..0163c6e
--- /dev/null
+++ b/debian/patches/dctopgm8_mayhem.patch
@@ -0,0 +1,12 @@
+--- a/appsrc/dcfile/dctopgm8.cc
++++ b/appsrc/dcfile/dctopgm8.cc
+@@ -929,6 +929,9 @@
+       if (!vBitsAllocated && vBitsStored)
+               vBitsAllocated=((vBitsStored-1u)/8u+1u)*8u;
+ 
++      if (!success)
++          return 1;
++
+       if (!vBitsAllocated) {
+               if (strcmp(aPixelData->getVR(),"OW") == 0)
+                       vBitsAllocated=16;
diff --git a/debian/patches/jpegdump.man.patch 
b/debian/patches/jpegdump.man.patch
new file mode 100644
index 0000000..c990364
--- /dev/null
+++ b/debian/patches/jpegdump.man.patch
@@ -0,0 +1,22 @@
+Description: the jpegdump.man file was empty. We need to provide a minimal one 
instead.
+Author: Mathieu Malaterre <ma...@debian.org>
+Forwarded: not-needed
+Last-Update: 2012-03-05
+
+--- /dev/null
++++ b/appsrc/misc/jpegdump.man
+@@ -0,0 +1,14 @@
++.TH JPEGDUMP: "1" "May 2010" "jpegdump" "User Commands"
++.SH NAME
++jpegdump: \- manual page for jpegdump
++.SH SYNOPSIS
++.B jpegdump
++[\fIOPTION\fR]... < \fIFILE\fR...
++.SH DESCRIPTION
++jpegdump
++.PP
++dumps a JPEG file, it will display the structure and values contained in the 
specified JPEG file
++
++This manual page was written by Mathieu Malaterre
++<ma...@debian.org> for the Debian GNU/Linux system (but may be used by 
others).
++
diff --git a/debian/patches/project.tmpl.patch 
b/debian/patches/project.tmpl.patch
new file mode 100644
index 0000000..a4956b2
--- /dev/null
+++ b/debian/patches/project.tmpl.patch
@@ -0,0 +1,28 @@
+Description: This is a patch to install in /usr/bin instead of /local
+Author: Mathieu Malaterre <ma...@debian.org>
+Forwarded: not-needed
+Last-Update: 2012-03-05
+
+--- a/config/Project.tmpl
++++ b/config/Project.tmpl
+@@ -18,16 +18,16 @@ XCOMM ----------------------------------
+    PRIVCONFIGDIR = PrivConfigDir
+ 
+ #ifndef InstallBinDir
+-#define InstallBinDir /usr/local/bin
++#define InstallBinDir /usr/bin
+ #endif
+ #ifndef InstallIncDir
+-#define InstallIncDir /usr/local/include
++#define InstallIncDir /usr/include
+ #endif
+ #ifndef InstallLibDir
+-#define InstallLibDir /usr/local/lib
++#define InstallLibDir /usr/lib
+ #endif
+ #ifndef InstallManDir
+-#define InstallManDir /usr/local/man
++#define InstallManDir /usr/share/man
+ #endif
+ 
+           PATHSEP = /                 /* for building filenames */
diff --git a/debian/patches/pvrg_naming.patch b/debian/patches/pvrg_naming.patch
new file mode 100644
index 0000000..9a66c3d
--- /dev/null
+++ b/debian/patches/pvrg_naming.patch
@@ -0,0 +1,34 @@
+Description: Use debian convention for pvrg naming
+Author: Mathieu Malaterre <ma...@debian.org>
+Forwarded: not-needed
+Last-Update: 2012-03-05
+
+--- a/appsrc/dcfile/dcjpeg.script
++++ b/appsrc/dcfile/dcjpeg.script
+@@ -13,7 +13,7 @@ DCCP=dccp
+ DCTORAW=dctoraw
+ DCKEY=dckey
+ DCENCAP=dcencap
+-JPEG=jpeg
++JPEG=pvrg-jpeg
+ 
+ infile="$1"
+ shift
+--- a/appsrc/dcfile/dcunjpeg.script
++++ b/appsrc/dcfile/dcunjpeg.script
+@@ -11,7 +11,7 @@ DCDUMP=dcdump
+ DCTORAW=dctoraw
+ DCKEY=dckey
+ PNMTORAW=pnmtoraw
+-JPEG=jpeg
++JPEG=pvrg-jpeg
+ DJPEG=djpeg
+ KDUEXPAND=kdu_expand
+ 
+@@ -143,4 +143,4 @@ then
+ else
+       echo 1>&2 "Could not find suitable codec or codec failed for Transfer 
Syntax $transfersyntaxuid"
+       exit 1
+-fi
+\ No newline at end of file
++fi
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..8937d28
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,9 @@
+project.tmpl.patch
+strip.patch
+jpegdump.man.patch
+bmpdump.man.patch
+pvrg_naming.patch
+codeblockstylefix.patch
+dckey_mayham.patch
+dctopgm8_mayhem.patch
+dctable_mayhem.patch
diff --git a/debian/patches/strip.patch b/debian/patches/strip.patch
new file mode 100644
index 0000000..0cdda0a
--- /dev/null
+++ b/debian/patches/strip.patch
@@ -0,0 +1,38 @@
+Description: Remove hard-coded strip call, instead rely on dh_strip to do the 
work
+ so that we respect DEB_BUILD_OPTION=nostrip
+ We also need to remove the -s from the 'install' command (InstPgmFlags)
+Author: Mathieu Malaterre <ma...@debian.org>
+Forwarded: not-needed
+Last-Update: 2012-03-05
+
+--- a/config/Imake.p-rules
++++ b/config/Imake.p-rules
+@@ -72,7 +72,6 @@ program: objects deplibs                                     
         @@\
+       $(CCC) -o $@ objects $(CPLUSPLUS_LDOPTIONS) locallibs \          @@\
+               $(CPLUSPLUS_LDLIBS) syslibs \                            @@\
+               $(CPLUSPLUS_EXTRA_LOAD_FLAGS)                            @@\
+-      $(STRIP) $@$(EXECUTABLESUFFIX)                           @@\
+                                                                        @@\
+ clean::                                                                       
 @@\
+       $(RM) program$(EXECUTABLESUFFIX)
+--- a/config/Imake.rules
++++ b/config/Imake.rules
+@@ -110,7 +110,6 @@ program: objects deplibs                                   
         @@\
+       $(CCC) -o $@ objects $(CPLUSPLUS_LDOPTIONS) locallibs \          @@\
+               $(CPLUSPLUS_LDLIBS) syslibs \                            @@\
+               $(CPLUSPLUS_EXTRA_LOAD_FLAGS)                            @@\
+-      $(STRIP) $@                                                      @@\
+                                                                        @@\
+ clean::                                                                       
 @@\
+       $(RM) program
+--- a/config/Imake.tmpl
++++ b/config/Imake.tmpl
+@@ -203,7 +203,7 @@ XCOMM the platform-specific parameters -
+ #endif
+ 
+ #ifndef InstPgmFlags
+-#define InstPgmFlags -s
++#define InstPgmFlags
+ #endif
+ #ifndef InstBinFlags
+ #define InstBinFlags -m 0755
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..92f33c8
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,76 @@
+#!/usr/bin/make -f
+#export DH_VERBOSE=1
+
+-include /usr/share/dpkg/buildflags.mk
+CFLAGS+=$(CPPFLAGS)
+CXXFLAGS+=$(CPPFLAGS)
+
+VER_MAJOR = 1
+VER_MINOR = 00
+VER_PATCH = $(shell dpkg-parsechangelog | grep '^Version' | cut -d' ' -f2 | 
cut -f1 -d- | cut -f2 -d~)
+UPSTREAM_SRC = dicom3tools_1.00.snapshot.$(VER_PATCH)
+
+VER_FULL = $(VER_MAJOR).$(VER_MINOR)~$(VER_PATCH)
+DEBIAN_SRC_DIR = dicom3tools-$(VER_FULL)
+DEBIAN_SRC_TAR = dicom3tools_$(VER_FULL).orig.tar.gz
+
+ifneq (,$(findstring regression_testing_dicom,$(MM_BUILD_OPTIONS)))
+DCLIST = -name andump\* -o -name dcsmpte\* -o -name dccp\* -o -name dcintro\* 
-o -name pdftodc\* -o -name rawnjl2\* -o -name ancreate\* -o -name dcencap\* -o 
-name dctoraw\* -o -name dcjpeg\* -o -name dcmulti\* -o -name dcuncat\* -o 
-name pnmtodc\* -o -name dcjls\* -o -name dcj2k\* -o -name dcunjpeg\* -o -name 
dcunjls\* -o -name bmpdump\* -o -name jpegdump\* -o -name dcdirdmp\* -o -name 
dcdump\* -o -name dcentvfy\* -o -name dcfile\* -o -name dchist\* -o -name 
dciodvfy\* -o -name dckey\*  [...]
+ifneq (,$(filter default_uid_root=%,$(MM_BUILD_OPTIONS)))
+DEFAULTUIDROOT = $(patsubst default_uid_root=%,%,$(filter 
default_uid_root=%,$(MM_BUILD_OPTIONS)))
+IMAKEFLAGS = -DDefaultUIDRoot=$(DEFAULTUIDROOT)
+endif
+else
+DCLIST = -name andump\* -o -name jpegdump\* -o -name dcdirdmp\* -o -name 
dcdump\* -o -name dcentvfy\* -o -name dcfile\* -o -name dchist\* -o -name 
dciodvfy\* -o -name dckey\* -o -name dcsort\* -o -name dcsrdump\* -o -name 
dcstats\* -o -name dctable\* -o -name dctopgm8\* -o -name dcposn\* -o -name 
dctopgx\* -o -name dctopnm\* -o -name dcunrgb\*
+endif
+
+%:
+       dh $@
+
+override_dh_auto_configure:
+       # http://www.gnu.org/manual/gawk/html_node/Special-FD.html
+       find . -name \*.awk -exec sed -i -e 's@/dev/tty@/dev/stderr@g' {} \;
+       sh Configure
+       imake -I./config -DTmpPath=/tmp -DOptimizeLevel=-O2 $(IMAKEFLAGS)
+
+override_dh_auto_build:
+       $(MAKE) World C_DEBUGFLAGS="$(CFLAGS)" 
CPLUSPLUS_DEBUGFLAGS="$(CXXFLAGS)" C_EXTRA_LOAD_FLAGS="$(LDFLAGS)" 
CPLUSPLUS_EXTRA_LOAD_FLAGS="$(LDFLAGS)"
+
+override_dh_installman:
+       $(MAKE) DESTDIR=$(CURDIR)/debian/dicom3tools install.man
+       # remove empty man page
+       find $(CURDIR)/debian/dicom3tools -type f -size 0 -print | xargs rm
+       # Move the special .so (groff source file to /usr/share/dicom3tools to 
please lintian
+       mkdir -p $(CURDIR)/debian/dicom3tools/usr/share/dicom3tools
+       mv $(CURDIR)/debian/dicom3tools/usr/share/man/man1/*.so 
$(CURDIR)/debian/dicom3tools/usr/share/dicom3tools
+       # Let's use the new file location:
+       find $(CURDIR)/debian/dicom3tools/usr/share/man/man1 -type f -exec sed 
-i -e 's@.so man1@.so ../dicom3tools@g' {} \;
+       # Cannot start a line with a . (it is a macro)
+       # http://www.mail-archive.com/groff@gnu.org/msg04712.html
+       find $(CURDIR)/debian/dicom3tools/usr/share/man/man1 -type f -exec sed 
-i -e 's/^\.\.\.$$/\\\&\.\.\./g' {} \;
+       #  a newline character is not allowed in an escape name / a space 
character is not allowed in an escape name
+       find $(CURDIR)/debian/dicom3tools/usr/share/man/man1 -type f -exec sed 
-i -e 's/\\n/\\/g' {} \;
+       # hyphen-used-as-minus-sign
+       #find $(CURDIR)/debian/dicom3tools/usr/share/man/man1 -type f -exec sed 
-i -e 's/-/\\-/g' {} \;
+       # Can't use above -> manpage-has-bad-whatis-entry
+       # Remove (except special list from official upstream releases) :
+       find $(CURDIR)/debian/dicom3tools/usr/bin -type f -not \( $(DCLIST) \) 
-print | xargs rm;
+       find $(CURDIR)/debian/dicom3tools/usr/share/man -type f -not \( 
$(DCLIST) \) -print | xargs rm;
+
+override_dh_install:
+       dh_install
+       # now that we have removed empty man page, we need to remove associated 
binaries
+       for file in ancp andiff antodc.all binpatch dcanon dcburn dccmp dccomb 
dcdecmpr dcdiff dclutburn \
+                                                       dclutmix dcmvhier.8only 
dcmvhier.all dcortho dcostosr dcpost dcproj dcrmsfx.all \
+                                                       dcsrmrg dcsub dcswab 
dcunjpeg.all dumptiff dumpwhat gentodc.dat.all \
+                                                       jpegsplit pbmswbit 
pgmtobmp pnmpred pqsplit rawarith rawdiff rawmask; do \
+               find $(CURDIR)/debian/dicom3tools -type f -name $$file\* -print 
| xargs rm; \
+       done
+       # Remove all static lib
+       rm -rf $(CURDIR)/debian/dicom3tools/usr/lib
+
+override_dh_installchangelogs:
+       dh_installchangelogs CHANGES
+
+get-orig-source:
+       uscan --verbose --force-download --rename --destdir ../tarballs
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..547b57a
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=3
+opts=dversionmangle=s/^(1\.0)(~\d{8})/$10$2/,uversionmangle=s/(\d)\.snapshot\.(\d{8})/$1~$2/
 \
+http://www.dclunie.com/dicom3tools/workinprogress/ \
+(?:.*/|)dicom3tools[\-\._](\d\S*)\.(?:tar\.xz|txz|tar\.bz2|tbz2|tar\.gz|tgz)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/debian-med/dicom3tools.git

_______________________________________________
debian-med-commit mailing list
debian-med-commit@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to