[Pkg-phototools-devel] [PATCH] Import changes to get 1.4 to use cmake

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Feb 16 14:57:45 UTC 2011


---
 debian/README.source                               |   10 +-
 debian/TODO                                        |   12 +-
 debian/changelog                                   |   24 +--
 debian/compat                                      |    2 +-
 debian/control                                     |   25 ++--
 debian/docs                                        |    1 +
 debian/extract_j2k_from_mj2.pod                    |   53 ------
 debian/frames_to_mj2.pod                           |  154 ------------------
 debian/image_to_j2k.pod                            |  171 --------------------
 debian/j2k_to_image.pod                            |   67 --------
 debian/libopenjpeg-dev.install                     |    3 +-
 debian/libopenjpeg2.install                        |    2 +-
 debian/mj2_to_frames.pod                           |   41 -----
 debian/openjpeg-tools.install                      |   13 +-
 debian/openjpeg-tools.manpages                     |    8 +-
 debian/patches/00list                              |    5 -
 debian/patches/30_fix_build_for_debian.dpatch      |   80 ---------
 debian/patches/31_use_system_tiff_headers.dpatch   |   21 ---
 debian/patches/32_fix_FTBFS_on_alpha.dpatch        |   21 ---
 ...fix_potential_crash_patch_in_opj_destroy.dpatch |   19 ---
 ...encode_and_prevent_buffer_overrun_in_MCT.dpatch |   38 -----
 debian/patches/index_create_cmake.patch            |   32 ++++
 debian/patches/math.patch                          |   15 ++
 debian/patches/series                              |    2 +
 debian/rules                                       |   99 ++----------
 debian/watch                                       |    3 +-
 debian/wrap_j2k_in_mj2.pod                         |   58 -------
 27 files changed, 99 insertions(+), 880 deletions(-)
 create mode 100644 debian/docs
 delete mode 100644 debian/extract_j2k_from_mj2.pod
 delete mode 100644 debian/frames_to_mj2.pod
 delete mode 100644 debian/image_to_j2k.pod
 delete mode 100644 debian/j2k_to_image.pod
 delete mode 100644 debian/mj2_to_frames.pod
 delete mode 100644 debian/patches/00list
 delete mode 100755 debian/patches/30_fix_build_for_debian.dpatch
 delete mode 100755 debian/patches/31_use_system_tiff_headers.dpatch
 delete mode 100755 debian/patches/32_fix_FTBFS_on_alpha.dpatch
 delete mode 100755 debian/patches/33_fix_potential_crash_patch_in_opj_destroy.dpatch
 delete mode 100755 debian/patches/34_fix_alpha_encode_and_prevent_buffer_overrun_in_MCT.dpatch
 create mode 100644 debian/patches/index_create_cmake.patch
 create mode 100644 debian/patches/math.patch
 create mode 100644 debian/patches/series
 delete mode 100644 debian/wrap_j2k_in_mj2.pod

diff --git a/debian/README.source b/debian/README.source
index 4d20f67..b40e874 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -1,7 +1,9 @@
+openjpeg for Debian
+-------------------
+
+<this file describes information about the source package, see Debian policy
+manual section 4.14. You WILL either need to modify or delete this file>
+
 
-This package uses dpatch to manage all modifications to the upstream
-source. Changes are stored in the source package as diffs in
-debian/patches and applied during the build.
 
-Please see /usr/share/doc/dpatch/README.source(.gz) for a detailed explanation.
 
diff --git a/debian/TODO b/debian/TODO
index 88c769a..185451a 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -5,6 +5,7 @@ TODO for openjpeg:
     source package when upstream marks the copyright and licence correctly.
 
   * Build and distribute some of the additional tools including:
+    + mj2/          - motion tools for jpeg2000 files.
     + jpwl/         - JPEG 2000 Wireless tools: encode JPEG2000 files to
                       withstand transmission errors.
     + jp3d/         - Volumetric Imaging.
@@ -12,16 +13,9 @@ TODO for openjpeg:
     Note, none of these tools are built by default in the standard OpenJPEG2000
     distribution. They are also not built from the top level makefile. Some of
     the tools do not build cleanly from the source distribution and require
-    further work to be able to be included in the openjpeg-tools package. It
-    is also noted that the tools are specifically excluded for non-windows builds
-    in the CMake version of the build rules.
-
-    The jpwl tools require a rebuild of the main libopenjpeg2 library with the
-    -DUSE_JPWL option set. This causes incompatible changes with normal
-    operation of libopenjpeg2 and would have to generate an alternative
-    libopenjpeg2 library.
+    further work to be able to be included in the openjpeg-tools package.
 
   * Improve the handling of the .so symlinks, which are at the moment manually
     created through debian/*.links, with hardcoded filenames.
 
- -- Robin Cornelius <robin.cornelius at gmail.com>  Tue, 22 Apr 2009 14:48:23 +1000
+ -- Robin Cornelius <robin.cornelius at gmail.com>  Tue, 04 Mar 2008 09:19:20 +0000
diff --git a/debian/changelog b/debian/changelog
index 6d0576b..965a215 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,23 +1,11 @@
-openjpeg (1.3+dfsg-5) unstable; urgency=low
-
-  * Include motion j2k codec in build
-    - Implement man pages for the mj2 tools
-    - Use clean target of mj2/Makefile when running the debian/rules clean
-      target
-    - Update build patch, to set gcc options for mj2 Makefile based on the
-      settings in debian/rules
-  * Add to the packages to fix a lintian warning because we are using
-    deb-helper and misc:Depends is a requirment
-  * Fix a crash path in openjpeg that was identified when placing the
-    lib under load
-  * Place -dbg package in section debug
-  * Implement a README.source
-  * Bump standards version as we are bringing the package up to latest
-    spec
-  * Fix alpha channel encode by preventing an overrun in the static MCT
-    tables when processing more than 3 color components. (Closes: #541807)
-
- -- Robin Cornelius <robin.cornelius at gmail.com>  Wed, 16 Aug 2009 13:44:32 +0100
+openjpeg (1.4.0-1) experimental; urgency=low
+
+  * New upstream
+  * Added myself to Uploaders
+  * Switch to CMake (default build system according to upstream)
+  * Remove old *.pod file now that upstream ships man pages
+
+ -- Mathieu Malaterre <mathieu.malaterre at gmail.com>  Wed, 16 Feb 2011 13:31:59 +0100
 
 openjpeg (1.3+dfsg-4) unstable; urgency=high
 
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..7f8f011 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+7
diff --git a/debian/control b/debian/control
index 4e37a23..74bb517 100644
--- a/debian/control
+++ b/debian/control
@@ -1,10 +1,11 @@
 Source: openjpeg
 Priority: extra
 Maintainer: Debian PhotoTools Maintainers <pkg-phototools-devel at lists.alioth.debian.org>
-Uploaders: Robin Cornelius <robin.cornelius at gmail.com>, Cyril Brulebois <kibi at debian.org>
+Uploaders: Robin Cornelius <robin.cornelius at gmail.com>, Cyril Brulebois <kibi at debian.org>,
+ Mathieu Malaterre <mathieu.malaterre at gmail.com>
 Homepage: http://www.openjpeg.org
-Build-Depends: debhelper (>= 5), dpatch (>= 2), libtiff4-dev
-Standards-Version: 3.8.1
+Build-Depends: debhelper (>= 5), quilt, libtiff4-dev
+Standards-Version: 3.9.1
 Section: libs
 Vcs-Browser: http://git.debian.org/?p=pkg-phototools/openjpeg.git
 Vcs-Git: git://git.debian.org/git/pkg-phototools/openjpeg.git
@@ -12,7 +13,7 @@ Vcs-Git: git://git.debian.org/git/pkg-phototools/openjpeg.git
 Package: libopenjpeg-dev
 Section: libdevel
 Architecture: any
-Depends: libopenjpeg2 (= ${binary:Version}), ${misc:Depends}
+Depends: libopenjpeg2 (= ${binary:Version})
 Description: development files for libopenjpeg2, a JPEG 2000 image library
  Libopenjpeg2 is a library for handling the JPEG 2000 image compression format.
  JPEG 2000 is a wavelet-based image compression standard and permits progressive
@@ -23,14 +24,14 @@ Description: development files for libopenjpeg2, a JPEG 2000 image library
 Package: libopenjpeg2
 Section: libs
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}
 Description: JPEG 2000 image compression/decompression library
  Libopenjpeg2 is a library for handling the JPEG 2000 image compression format.
 
 Package: libopenjpeg2-dbg
-Section: debug
+Section: libdevel
 Architecture: any
-Depends: libopenjpeg2 (= ${binary:Version}), ${misc:Depends}
+Depends: libopenjpeg2 (= ${binary:Version})
 Description: debug symbols for libopenjpeg2, a JPEG 2000 image library
  This package contains the debug symbols to match the runtime component of the
  libopenjpeg2 library, allowing debugging of a program using libopenjpeg2 to
@@ -39,18 +40,12 @@ Description: debug symbols for libopenjpeg2, a JPEG 2000 image library
 Package: openjpeg-tools
 Section: graphics
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}
 Description: command-line tools using the JPEG 2000 library
  This package provides with command-line tools allowing for conversions between
- several formats and also provides tools for encoding and decoding
- motion-jpeg2000 video formats:
+ several formats:
   - j2k_to_image: decodes j2k, jp2, and jpt files to pgm, ppm, pnm,
                   pgx, and bmp.
   - image_to_j2k: encodes pnm, pgm, pgx, bmp, and ppm files to j2k,
                   and jp2.
   - index_create: create jp2 with JPIP index file from a j2k file.
-  - frames_to_mj2: convert YUV video streams to mj2 format.
-  - mj2_to_frames: convert mj2 video streams to YUV format.
-  - wrap_j2k_in_mj2: wrap j2k codestreams into mj2 format.
-  - extract-j2k-from_mj2: extract j2k codestreams from the mj2 format.
-
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README
diff --git a/debian/extract_j2k_from_mj2.pod b/debian/extract_j2k_from_mj2.pod
deleted file mode 100644
index f4f00c4..0000000
--- a/debian/extract_j2k_from_mj2.pod
+++ /dev/null
@@ -1,53 +0,0 @@
-=head1 NAME
-
-extract_j2k_from_mj2 - extract j2k bitstreams from a mj2 file
-
-=head1 SYNOPSIS
-
-B<extract_j2k_from_mj2> I<input> I<output-base-name>
-
-
-=head1 DESCRIPTION
-
-extract_j2k_from_mj2 extracts j2k bitstreams that are wrapped within in mj2 file.
-
-=head1 OPTIONS
-
-=over
-
-=item I<input>
-The mj2 file to process
-
-=item  I<output-base-name>
-
-The base name used for each codestream found. Each codestream found will
-create a new file with the name specified plus and underscore followed
-by 5 digits that specifies the sequence, e.g.
-
-output_00000.j2k
-
-=back
-
-=head1 EXAMPLE
-
-You have a mj2 file that contains 3 j2k codesteams which you want to extract
-
-I<extract_j2k_from_mj2 infile.mj2 example>
-
-The following files will be created :-
-
-example_00000.j2k
-example_00001.j2k
-example_00002.j2k
-
-=head1 AUTHOR
-
-Written by Robin Cornelius <robin.cornelius at gmail.com> based on the output of extract_j2k_to_mj2 as part of the Debian packaging of OpenJPEG
-
-=head1 COPYRIGHT
-
-Copyright 2009 Robin Cornelius <robin.cornelius at gmail.com>
-
-=head1 SEE ALSO
-
-L<wrap_j2k_to_mj2(1)>, L<frames_to_mj2(1)>, L<mj2_to_frames(1)>, L<http://www.openjpeg.org/index.php?menu=doc#MJ2>
diff --git a/debian/frames_to_mj2.pod b/debian/frames_to_mj2.pod
deleted file mode 100644
index 76fcbd5..0000000
--- a/debian/frames_to_mj2.pod
+++ /dev/null
@@ -1,154 +0,0 @@
-=head1 NAME
-
-frames_to_mj2 - convert a yuv video file to a motion jpeg2000 encoded file
-
-
-=head1 SYNOPSIS
-
-B<mj2_to_frames> B<-i> I<input> B<-o> I<output> B<-W> I<width,height,CbCrSubsampling-dx,CbCrSubsampling-dy> B<-F> I<framerate> [-cinema2k] [-cinema4k] [-r I<ratios> | -q I<psnr>] [-n rI<escount>] [-b I<blocksize>] [-c I<precintsize>] [-t I<tilesize>] [-p I<progression>] [-s I<subsampling>] [-POC I<orders>] [-SOP] [-EPH] [-M I<modeflags>] [-x I<indexfile>] [-ROI:quantize] [-d I<imageoffset>] [-T I<tileoffset>] [-I]
-
-
-=head1 DESCRIPTION
-
-frames_to_mj2 encodes a video stream in yuv format to the motion jpeg 2000
-format.
-
-=head1 OPTIONS
-
-=over
-
-=item B<-i> I<input>
-
-The input YUV encoded video file to process
-
-=item B<-o> I<output>
-
-Name of file to output encoded video in motion jpeg 2000 to
-
-=item B<-W> I<width,height,CbCrSubsampling-dx,CbCrSubsampling-dy>
-
-width, the output frame width
-height, the output frame height
-CbCrSubsampling_dx, sub sampling in x direction
-CbCrSubsampling_dy, sub sampling in y direction
-
-=item B<-cinema2k> I<fps>
-
-Digital Cinema 2K profile compliant codestream for 2K resolution. 24 or 48 fps.
-
-=item B<-cinema4k> [I<fps>]
-
-Digital Cinema 4K profile compliant codestream for 4K resolution. fps default is 24
-
-=item B<-r> I<ratios>
-
-compression factor for successive layers, comma separated
-
-=item B<-q> I<psnr>
-
-psnr for successive layers, comma separated
-
-=item B<-n> I<rescount>
-
-number of resolutions
-
-=item B<-b> I<blocksize>
-
-width and height of code block, comma-separated
-
-=item B<-c> I<precintsize>
-
-width and height of precinct, comma-seperated
-
-=item B<-t> I<tilesize>
-
-width and height of tile, comma-separated
-
-=item B<-p> I<progression>
-
-progression order, one of LRCP, RLCP, RPCL, PCRL, CPRL
-
-=item B<-s> I<subsampling>
-
-subsampling factor in X and Y, comma-separated. Values larger than 2 can produce errors
-
-=item B<-POC> I<orders>
-
-progression order change
-
-=item B<-SOP>
-
-write SOP marker before each packet
-
-=item B<-EPH>
-
-write EPH marker after each header packet
-
-=item B<-M> I<modeflags>
-
-Sum of the values of the modes, as follows:
-
-=over
-
-=item 1. BYPASS (LAZY)
-
-=item 2. RESET
-
-=item 4. RESTART (TERMALL)
-
-=item 8. VSC
-
-=item 16. ERTERM (SEGTERM)
-
-=item 32. SEGMARK (SEGSYM)
-
-=back
-
-=for
-	TODO: a line bre3ak seems to be missing here. I don't know how to
-	handle this one. Please let me know when you've found how to
-	do it. :)
-=cut
-
-=item B<-x> I<indexfile>
-
-create an index file
-
-=item B<-ROI:>I<quantize>
-
-quantization indices upshifted for component c between 0 and 2 inclusive with an upshift of U between 0 and 37 inclusive
-
-=item B<-d> I<imageoffset>
-
-X and Y offset of the origin of the image, comma-separated
-
-=item B<-T> I<tileoffset>
-
-X and Y offset of the origin of the tiles, comma-separated
-
-=item B<-I>
-
-use the irreversible DWT 9-7
-
-=back
-
-
-=head1 EXAMPLE
-
-To encode a file with the standard YUV CIF frames of 352*288 format, at 30 frames per second :- 
-
-frames_to_mj2 -i yuv_file.yuv -o mj2_file.mj2 -W 352,288,2,2 -F 30
-
-=head1 AUTHOR
-
-Written by Robin Cornelius <robin.cornelius at gmail.com> based on the output of mj2_to_frames as part of the Debian packaging of OpenJPEG
-
-
-=head1 COPYRIGHT
-
-Copyright 2009 Robin Cornelius <robin.cornelius at gmail.com>
-
-
-=head1 SEE ALSO
-
-L<mj2_to_frames(1)>, L<wrap_j2k_to_mj2(1)>, L<extract_j2k_from_mj2(1)>, L<image_to_j2k(1)>, L<http://www.openjpeg.org/index.php?menu=doc#MJ2>
diff --git a/debian/image_to_j2k.pod b/debian/image_to_j2k.pod
deleted file mode 100644
index 0bdf3dd..0000000
--- a/debian/image_to_j2k.pod
+++ /dev/null
@@ -1,171 +0,0 @@
-=head1 NAME
-
-image_to_j2k - convert a PNM, PGM, PPM, PGX or BMP into a J2K or JP2 file
-
-
-=head1 SYNOPSIS
-
-=for
-	TODO: Eventually introduce B<>'s and I<>'s in the synopsis
-	line, but that might be tedious for a non-obvious benefit.
-=cut
-
-B<image_to_j2k> -i source -o destination [-cinema2k] [-cinema4k] [-r ratios | -q psnr] [-n rescount] [-b blocksize] [-c precintsize] [-t tilesize] [-p progression] [-s subsampling] [-POC orders] [-SOP] [-EPH] [-M modeflags] [-x indexfile] [-ROI:quantize] [-d imageoffset] [-T tileoffset] [-I]
-image_to_j2k -ImgDir sourcedir -OutFor extension [-cinema2k] [-cinema4k] [-r ratios | -q psnr] [-n rescount] [-b blocksize] [-c precintsize] [-t tilesize] [-p progression] [-s subsampling] [-POC orders] [-SOP] [-EPH] [-M modeflags] [-x indexfile] [-ROI:quantize] [-d imageoffset] [-T tileoffset] [-I]
-image_to_j2k -h
-
-
-=head1 DESCRIPTION
-
-image_to_j2k converts an image into a JPEG 2000-encoded image
-
-
-=head1 OPTIONS
-
-=over
-
-=item B<-ImgDir> I<sourcedir>
-
-Directory of PGM, PPM, PNM, PGX or BMP files to convert
-
-=item B<-OutFor> I<extension>
-
-J2K or JP2 output file format
-
-=item B<-i> I<source>
-
-PNM, PGM or PPM file to convert
-
-=item B<-o> I<destination>
-
-J2K or JP2 file to output to
-
-=item B<-h>
-
-Display help information
-
-=item B<-cinema2k> I<fps>
-
-Digital Cinema 2K profile compliant codestream for 2K resolution. 24 or 48 fps.
-
-=item B<-cinema4k> [I<fps>]
-
-Digital Cinema 4K profile compliant codestream for 4K resolution. fps default is 24
-
-=item B<-r> I<ratios>
-
-compression factor for successive layers, comma seperated
-
-=item B<-q> I<psnr>
-
-psnr for successive layers, comma seperated
-
-=item B<-n> I<rescount>
-
-number of resolutions
-
-=item B<-b> I<blocksize>
-
-width and height of code block, comma-seperated
-
-=item B<-c> I<precintsize>
-
-width and height of precinct, comma-seperated
-
-=item B<-t> I<tilesize>
-
-width and height of tile, comma-seperated
-
-=item B<-p> I<progression>
-
-progression order, one of LRCP, RLCP, RPCL, PCRL, CPRL
-
-=item B<-s> I<subsampling>
-
-subsampling factor in X and Y, comma-seperated. Values larger than 2 can produce errors
-
-=item B<-POC> I<orders>
-
-progression order change
-
-=item B<-SOP>
-
-write SOP marker before each packet
-
-=item B<-EPH>
-
-write EPH marker after each header packet
-
-=item B<-M> I<modeflags>
-
-Sum of the values of the modes, as follows:
-
-=over
-
-=item 1. BYPASS (LAZY)
-
-=item 2. RESET
-
-=item 4. RESTART (TERMALL)
-
-=item 8. VSC
-
-=item 16. ERTERM (SEGTERM)
-
-=item 32. SEGMARK (SEGSYM)
-
-=back
-
-=for
-	TODO: a line bre3ak seems to be missing here. I don't know how to
-	handle this one. Please let me know when you've found how to
-	do it. :)
-=cut
-
-=item B<-x> I<indexfile>
-
-create an index file
-
-=item B<-ROI:>I<quantize>
-
-quantization indices upshifted for component c between 0 and 2 inclusive with an upshift of U between 0 and 37 inclusive
-
-=item B<-d> I<imageoffset>
-
-X and Y offset of the origin of the image, comma-seperated
-
-=item B<-T> I<tileoffset>
-
-X and Y offset of the origin of the tiles, comma-seperated
-
-=item B<-I>
-
-use the irreversible DWT 9-7
-
-=back
-
-
-=head1 EXAMPLE
-
-ratios: 20,10,1  Quality 1: compress 20x; Quality 2: compress 10x; Quality 3: lossless compression
-
-psnr: 30,40,50
-
-quantize: c=0,U=25
-
-orders: T1=0,0,1,5,3,CPRL  Title 1: Resolution 0 start, component 0 start, layer 1 end, resolution 5 end, component 3 end, CPRL progression
-
-
-=head1 AUTHOR
-
-Written by Paul Hampson <Paul.Hampson at Pobox.com> based on the output of image_to_j2k -h as part of the Debian packaging of OpenJPEG
-
-
-=head1 COPYRIGHT
-
-Copyright 2007 Paul Hampson
-
-
-=head1 SEE ALSO
-
-L<j2k_to_image(1)>, L<http://www.openjpeg.org/index.php?menu=doc#encoder>
diff --git a/debian/j2k_to_image.pod b/debian/j2k_to_image.pod
deleted file mode 100644
index 9a81d54..0000000
--- a/debian/j2k_to_image.pod
+++ /dev/null
@@ -1,67 +0,0 @@
-=head1 NAME
-
-j2k_to_image - convert a J2K, JP2 or JPT file into a PGM, PPM, PNM, PGX or BMP file
-
-
-=head1 SYNOPSIS
-
-B<j2k_to_image> B<-i> I<source> B<-o> I<destination> [B<-r> I<reduction>] [B<-l> I<layers>]
-
-B<j2k_to_image> B<-ImgDir> I<sourcedir> B<-OutFor> I<extension> [B<-r> I<reduction>] [B<-l> I<layers>]
-
-B<j2k_to_image> B<-h>
-
-
-=head1 DESCRIPTION
-
-j2k_to_image decodes a JPEG 2000-encoded image into another image format
-
-
-=head1 OPTIONS
-
-=over
-
-=item B<-ImgDir> I<sourcedir>
-
-Directory of J2K, JP2 or JPT files to convert
-
-=item B<-OutFor> I<extension>
-
-PGM, PPM, PNM, PGX or BMP output file format
-
-=item B<-i> I<source>
-
-J2K, JP2 or JPT file to convert
-
-=item B<-o> I<destination>
-
-PGM, PPM, PNM, PGX or BMP file to output to
-
-=item B<-h>
-
-Display help information
-
-=item B<-r> I<reduction>
-
-Number of highest resolution levels to be discarded. Output resolution is effectively divided by 2^reduction
-
-=item B<-l> I<layers>
-
-Maximum count of quality layers to decode
-
-=back
-
-
-=head1 AUTHOR
-
-Written by Paul Hampson <Paul.Hampson at Pobox.com> based on the output of j2k_to_image -h as part of the Debian packaging of OpenJPEG
-
-
-=head1 COPYRIGHT
-
-Copyright 2007 Paul Hampson
-
-
-=head1 SEE ALSO
-
-L<image_to_j2k(1)>, L<http://www.openjpeg.org/index.php?menu=doc#decoder>
diff --git a/debian/libopenjpeg-dev.install b/debian/libopenjpeg-dev.install
index d2390aa..efef1a8 100644
--- a/debian/libopenjpeg-dev.install
+++ b/debian/libopenjpeg-dev.install
@@ -1,2 +1 @@
-*.h usr/include/
-lib*.a usr/lib
+usr/include/openjpeg-1.4/*.h
diff --git a/debian/libopenjpeg2.install b/debian/libopenjpeg2.install
index 190b994..86572f3 100644
--- a/debian/libopenjpeg2.install
+++ b/debian/libopenjpeg2.install
@@ -1 +1 @@
-lib*.so* usr/lib/
+usr/lib/lib*.so* 
diff --git a/debian/mj2_to_frames.pod b/debian/mj2_to_frames.pod
deleted file mode 100644
index 3d2fa4f..0000000
--- a/debian/mj2_to_frames.pod
+++ /dev/null
@@ -1,41 +0,0 @@
-=head1 NAME
-
-mj2_to_frames - Decode a motion jpeg2000 file to a a YUV video file
-
-=head1 SYNOPSIS
-
-B<mj2_to_frames> B<-i> I<input> B<-o> I<output>
-
-
-=head1 DESCRIPTION
-
-mj2_to_image decodes a video stream in motion jpeg2000 (mj2) format. 
-
-=head1 OPTIONS
-
-=over
-
-=item B<-i> I<input>
-
-The input mj2 encoded video file to process
-
-=item B<-o> I<output>
-
-Name of file to output decoded video data in YUV format.
-
-=back
-
-
-=head1 AUTHOR
-
-Written by Robin Cornelius <robin.cornelius at gmail.com> based on the output of mj2_to_frames as part of the Debian packaging of OpenJPEG
-
-
-=head1 COPYRIGHT
-
-Copyright 2009 Robin Cornelius <robin.cornelius at gmail.com>
-
-
-=head1 SEE ALSO
-
-L<frames_to_mj2(1)>, L<wrap_j2k_to_mj2(1)>, L<extract_j2k_from_mj2(1)>, L<http://www.openjpeg.org/index.php?menu=doc#MJ2>
diff --git a/debian/openjpeg-tools.install b/debian/openjpeg-tools.install
index 0548b37..c6b0806 100644
--- a/debian/openjpeg-tools.install
+++ b/debian/openjpeg-tools.install
@@ -1,8 +1,5 @@
-j2k_to_image /usr/bin/
-image_to_j2k /usr/bin/
-index_create /usr/bin/
-jp2-thumbnailer /usr/bin/
-extract_j2k_from_mj2 /usr/bin/
-frames_to_mj2 /usr/bin/
-mj2_to_frames /usr/bin/
-wrap_j2k_in_mj2 /usr/bin/
+usr/bin/j2k_to_image
+usr/bin/j2k_dump
+usr/bin/image_to_j2k
+usr/bin/index_create
+debian/jp2-thumbnailer usr/bin
diff --git a/debian/openjpeg-tools.manpages b/debian/openjpeg-tools.manpages
index 836967b..ef0a03a 100644
--- a/debian/openjpeg-tools.manpages
+++ b/debian/openjpeg-tools.manpages
@@ -1,7 +1 @@
-debian/extract_j2k_from_mj2.1
-debian/frames_to_mj2.1
-debian/image_to_j2k.1
-debian/index_create.1
-debian/j2k_to_image.1
-debian/mj2_to_frames.1
-debian/wrap_j2k_in_mj2.1
+usr/share/man/*
diff --git a/debian/patches/00list b/debian/patches/00list
deleted file mode 100644
index fe13d06..0000000
--- a/debian/patches/00list
+++ /dev/null
@@ -1,5 +0,0 @@
-30_fix_build_for_debian.dpatch
-31_use_system_tiff_headers.dpatch
-32_fix_FTBFS_on_alpha.dpatch
-33_fix_potential_crash_patch_in_opj_destroy.dpatch
-34_fix_alpha_encode_and_prevent_buffer_overrun_in_MCT.dpatch
diff --git a/debian/patches/30_fix_build_for_debian.dpatch b/debian/patches/30_fix_build_for_debian.dpatch
deleted file mode 100755
index dfe8d55..0000000
--- a/debian/patches/30_fix_build_for_debian.dpatch
+++ /dev/null
@@ -1,80 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 30_fix_build_for_debian.dpatch by Robin Cornelius <robin.cornelius at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Dont apply the -s strip flag to the shared lib debian will do it for us 
-## DP: where necessary
-## DP: Remove unnecessary linkage on lstdc++ and lm and add missing linkage for -lm
-
- at DPATCH@
-
-Index: ./Makefile
-===================================================================
---- ./Makefile	(revision 96)
-+++ ./Makefile	(working copy)
-@@ -18,8 +18,7 @@
- # Converts cr/lf to just lf
- DOS2UNIX = dos2unix
- 
--COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99 -fPIC
--LIBRARIES = -lstdc++
-+COMPILERFLAGS = -Wall -O3 -ffast-math -std=c99 -fPIC -g $(EXTRA_CFLAGS)
- 
- MODULES = $(SRCS:.c=.o)
- CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
-@@ -54,7 +53,7 @@
- 	$(AR) r $@ $(MODULES)
- 
- $(SHAREDLIB): $(MODULES)
--	$(CC) -s -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
-+	$(CC) -shared -Wl,-soname,$(LIBNAME) -o $@ $(MODULES) -lm
- 
- install: OpenJPEG
- 	install -d '$(DESTDIR)$(INSTALL_LIBDIR)' '$(DESTDIR)$(INSTALL_INCLUDE)'
-
-Index: ./indexer_JPIP/Makefile
-===================================================================
---- ./indexer_JPIP/Makefile	(revision 95)
-+++ ./indexer_JPIP/Makefile	(working copy)
-@@ -1,7 +1,6 @@
- CC = gcc
- 
--LDFLAGS = -lm
--CFLAGS = -Wall
-+CFLAGS = -Wall $(EXTRA_CFLAGS)
- 
- all: index_create
- 
-Index: ./codec/Makefile
-===================================================================
---- ./codec/Makefile	(revision 96)
-+++ ./codec/Makefile	(working copy)
-@@ -1,13 +1,13 @@
- # Makefile for the main OpenJPEG codecs: j2k_to_image and image_to_j2k
- 
--CFLAGS = -O3 -lstdc++ # -g -p -pg
-+CFLAGS = $(EXTRA_CFLAGS) # -g -p -pg
- 
- all: j2k_to_image image_to_j2k
- 
--j2k_to_image: j2k_to_image.c ../libopenjpeg.a
-+j2k_to_image: j2k_to_image.c
- 	gcc $(CFLAGS) compat/getopt.c index.c convert.c j2k_to_image.c -o j2k_to_image -L.. -lopenjpeg -I ../libopenjpeg/ -lm -ltiff
- 
--image_to_j2k: image_to_j2k.c ../libopenjpeg.a
-+image_to_j2k: image_to_j2k.c
- 	gcc $(CFLAGS) compat/getopt.c index.c convert.c image_to_j2k.c -o image_to_j2k -L.. -lopenjpeg -I ../libopenjpeg/ -lm -ltiff
- 
- clean:
-Index: ./mj2/Makefile
-===================================================================
---- ./mj2/MakeFile	2008-03-10 08:50:35.000000000 +0000
-+++ ./mj2/Makefile	2009-04-21 11:47:59.000000000 +0100
-@@ -1,6 +1,6 @@
- # Makefile for the MJ2 codecs of the OpenJPEG library: frames_to_mj2, mj2_to_frames, extract_j2k_from_mj2 and wrap_j2k_in_mj2
- 
--CFLAGS = -O3 -lstdc++ # -g -p -pg
-+CFLAGS = ${EXTRA_CFLAGS} # -O3 -lstdc++ # -g -p -pg
- 
- all: frames_to_mj2 mj2_to_frames extract_j2k_from_mj2 wrap_j2k_in_mj2
- 
diff --git a/debian/patches/31_use_system_tiff_headers.dpatch b/debian/patches/31_use_system_tiff_headers.dpatch
deleted file mode 100755
index 4106065..0000000
--- a/debian/patches/31_use_system_tiff_headers.dpatch
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Use system tiff headers.dpatch by Robin Cornelius <robin.cornelius at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Use system tiff headers
-
- at DPATCH@
-
-Index: ./codec/convert.c
-===================================================================
---- ./codec/convert.c	(revision 507)
-+++ ./codec/convert.c	(working copy)
-@@ -33,7 +33,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include "openjpeg.h"
--#include "../libs/libtiff/tiffio.h"
-+#include <tiffio.h>
- #include "convert.h"
- 
- /*
diff --git a/debian/patches/32_fix_FTBFS_on_alpha.dpatch b/debian/patches/32_fix_FTBFS_on_alpha.dpatch
deleted file mode 100755
index f605312..0000000
--- a/debian/patches/32_fix_FTBFS_on_alpha.dpatch
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Fix FTBFS on alpha platforms.dpatch by Arthur Loiret <aloiret at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Don't abort compilation when alpha is detected, if linux is
-## DP: detected as well. In this case, that's not Alpha OSF1, but
-## DP: Linux on Alpha, which has dirent.h.
-
- at DPATCH@
-
---- a/codec/dirent.h
-+++ b/codec/dirent.h
-@@ -118,7 +118,7 @@
- #   define HAVE_SYS_DIR_H
- # elif defined(__hpux)                         /* HP-UX */
- #   define HAVE_DIRENT_H
--# elif defined(__alpha) || defined(__alpha__)  /* Alpha OSF1 */
-+# elif defined(__osf__) || defined(__digital__)  /* Alpha OSF1 */
- #   error "not implemented"
- # elif defined(__sgi)                          /* Silicon Graphics */
- #   define HAVE_DIRENT_H
diff --git a/codec/dirent.h b/codec/dirent.h
diff --git a/debian/patches/33_fix_potential_crash_patch_in_opj_destroy.dpatch b/debian/patches/33_fix_potential_crash_patch_in_opj_destroy.dpatch
deleted file mode 100755
index 13adcfe..0000000
--- a/debian/patches/33_fix_potential_crash_patch_in_opj_destroy.dpatch
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Prevent crash on opj_destroy().dpatch by Robin Cornelius <robin.cornelius at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Fix a crash path in openjpeg where image->comps is wild and gets used 
-## DP: in opj_destroy()
-
- at DPATCH@
-
---- openjpeg-1.3+dfsg.orig/libopenjpeg/image.c	2007-10-18 13:26:11.000000000 +0100
-+++ openjpeg/libopenjpeg/image.c	2009-10-29 09:16:32.578125000 +0000
-@@ -28,6 +28,7 @@
- 
- opj_image_t* opj_image_create0(void) {
- 	opj_image_t *image = (opj_image_t*)opj_malloc(sizeof(opj_image_t));
-+	image->comps = NULL;
- 	return image;
- }
- 
diff --git a/debian/patches/34_fix_alpha_encode_and_prevent_buffer_overrun_in_MCT.dpatch b/debian/patches/34_fix_alpha_encode_and_prevent_buffer_overrun_in_MCT.dpatch
deleted file mode 100755
index 8af2cac..0000000
--- a/debian/patches/34_fix_alpha_encode_and_prevent_buffer_overrun_in_MCT.dpatch
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## Fix alpha encode by preventing a buffer overrun when processing MCT tables for more that 3 components.dpatch by Robin Cornelius <robin.cornelius at gmail.com>
-
- at DPATCH@
-
---- ./libopenjpeg/t1.c	2009-08-16 09:17:53.000000000 +0100
-+++ ./libopenjpeg/t1.c	2009-08-16 09:21:42.000000000 +0100
-@@ -738,14 +738,27 @@
- 		double stepsize,
- 		int numcomps)
- {
--	double w1, w2, wmsedec;
-+	double w1 = 1, w2, wmsedec;
-+	
-+	// Prevent running an MCT on more than 3 components. NB openjpeg v2.0 will support this via
-+	// custom MCT tables that can be passed as encode parameters, 1.3 cannot support this as it
-+	// uses a static table of 3 entries and there for can only cope with 3 components with out an
-+	// array overflow
-+
-+	if(numcomps==3) {
-+	        if (qmfbid == 1) {
-+			w1 = (numcomps > 1) ? mct_getnorm(compno) : 1.0;
-+		} else {
-+			w1 = (numcomps > 1) ? mct_getnorm_real(compno) : 1.0;	
-+		}
-+	}	
-+
- 	if (qmfbid == 1) {
--		w1 = (numcomps > 1) ? mct_getnorm(compno) : 1.0;
- 		w2 = dwt_getnorm(level, orient);
- 	} else {			/* if (qmfbid == 0) */
--		w1 = (numcomps > 1) ? mct_getnorm_real(compno) : 1.0;
- 		w2 = dwt_getnorm_real(level, orient);
- 	}
-+
- 	wmsedec = w1 * w2 * stepsize * (1 << bpno);
- 	wmsedec *= wmsedec * nmsedec / 8192.0;
- 	
diff --git a/debian/patches/index_create_cmake.patch b/debian/patches/index_create_cmake.patch
new file mode 100644
index 0000000..19c81bd
--- /dev/null
+++ b/debian/patches/index_create_cmake.patch
@@ -0,0 +1,32 @@
+Integrate upstream patch:
+
+http://code.google.com/p/openjpeg/source/detail?r=728
+Index: openjpeg_v1_4_sources_r697/CMakeLists.txt
+===================================================================
+--- openjpeg_v1_4_sources_r697.orig/CMakeLists.txt	2011-01-02 19:14:55.000000000 +0100
++++ openjpeg_v1_4_sources_r697/CMakeLists.txt	2011-02-16 14:13:47.000000000 +0100
+@@ -179,9 +179,9 @@
+ #-----------------------------------------------------------------------------
+ # Build INDEXER_JPIP executables ?
+ OPTION(BUILD_INDEXER_JPIP "Build the INDEXER_JPIP executables" OFF)
+-IF(BUILD_INDEXER_JPIP AND NOT UNIX)
++IF(BUILD_INDEXER_JPIP)
+   SUBDIRS(indexer_JPIP)
+-ENDIF(BUILD_INDEXER_JPIP AND NOT UNIX)
++ENDIF(BUILD_INDEXER_JPIP)
+ 
+ #-----------------------------------------------------------------------------
+ # Build DOCUMENTATION ?
+Index: openjpeg_v1_4_sources_r697/indexer_JPIP/CMakeLists.txt
+===================================================================
+--- openjpeg_v1_4_sources_r697.orig/indexer_JPIP/CMakeLists.txt	2011-02-16 14:17:04.000000000 +0100
++++ openjpeg_v1_4_sources_r697/indexer_JPIP/CMakeLists.txt	2011-02-16 14:17:26.000000000 +0100
+@@ -3,3 +3,8 @@
+ ADD_EXECUTABLE(index_create
+ bio.c cio.c int.c pi.c t2.c tgt.c tcd.c index_create.c jpip.c jp2.c
+ )
++
++INSTALL(TARGETS index_create
++EXPORT OpenJPEGTargets
++DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications
++)
diff --git a/debian/patches/math.patch b/debian/patches/math.patch
new file mode 100644
index 0000000..f22e699
--- /dev/null
+++ b/debian/patches/math.patch
@@ -0,0 +1,15 @@
+Integrate upstream patch:
+
+http://code.google.com/p/openjpeg/source/detail?r=729
+Index: openjpeg_v1_4_sources_r697/libopenjpeg/CMakeLists.txt
+===================================================================
+--- openjpeg_v1_4_sources_r697.orig/libopenjpeg/CMakeLists.txt	2011-02-16 14:36:35.000000000 +0100
++++ openjpeg_v1_4_sources_r697/libopenjpeg/CMakeLists.txt	2011-02-16 14:36:51.000000000 +0100
+@@ -30,6 +30,7 @@
+   ENDIF(BUILD_SHARED_LIBS)
+ ENDIF(WIN32)
+ ADD_LIBRARY(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
++TARGET_LINK_LIBRARIES(${OPENJPEG_LIBRARY_NAME} m)
+ SET_TARGET_PROPERTIES(${OPENJPEG_LIBRARY_NAME} PROPERTIES ${OPENJPEG_LIBRARY_PROPERTIES})
+ 
+ # Install library
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a3d04ca
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+index_create_cmake.patch
+math.patch
diff --git a/debian/rules b/debian/rules
index d27ead4..63ca636 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,101 +1,30 @@
 #!/usr/bin/make -f
 
-include /usr/share/dpatch/dpatch.make
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
 
-# used as trailer in the generated manpages
 UVERSION = $(shell dpkg-parsechangelog | perl -ne 'print "$$1\n" if (/^Version: (.*?)(?:\.dfsg)?\-.*?$$/)')
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	EXTRA_CFLAGS += -O0
-else
-	# Upstream default optimisation level
-	EXTRA_CFLAGS += -O3
-endif
+%:
+	dh --parallel --with quilt --buildsystem=cmake $@ 
 
-build: build-stamp
-build-stamp: patch
-	dh_testdir
+override_dh_auto_configure:
+	dh_auto_configure -- -DBUILD_INDEXER_JPIP:BOOL=ON
 
-	# build all library targets
-	$(MAKE) OpenJPEG
-	$(MAKE) -C codec
-	$(MAKE) -C indexer_JPIP
-	$(MAKE) -C mj2
+POD2MAN=pod2man --utf8 --center="OPENJPEG TOOLS" --release=$(UVERSION)
 
-	# build manpages
+override_dh_auto_build:
+	# build jp2-thumbnailer manpages
 	for i in debian/*.pod; do \
-		pod2man --center 'OPENJPEG TOOLS' \
-			--release $(UVERSION) \
-			$$i $${i%%.pod}.1 ; \
+		$(POD2MAN) $$i $${i%%.pod}.1 ; \
 	done
 
-	touch $@
-
-clean: realclean unpatch
-realclean:
-	dh_testdir
-	dh_testroot
-
-	# Remove execute permission since upstreams ships all files with +x
-	chmod -R a-x .
-	chmod -R a+X .
-	chmod a+x debian/rules
-
-	[ ! -f  codec/*.o ] || $(MAKE) -C codec clean
-	[ ! -f  indexer_JPIP/*.o ] || $(MAKE) -C indexer_JPIP clean
-
-	$(MAKE) clean
-	$(MAKE) clean -C mj2
-
+override_dh_auto_clean:
 	# delete the manpages which were built from perlpod (not using *.1,
 	# in case a later file is added and not checked in)
 	for i in debian/*.pod; do \
 		rm -f $${i%%.pod}.1; \
 	done
-
-	dh_clean indexer_JPIP/index_create codec/image_to_j2k codec/j2k_to_image libopenjpeg.a.nopic libopenjpeg.so build-stamp
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_clean -k
-	dh_installdirs
-
-	$(MAKE) dist
-	# The libraries and header file are in dist/
-	# So we'll dump the binaries there too
-	cp codec/j2k_to_image codec/image_to_j2k dist/
-	cp indexer_JPIP/index_create dist/
-	cp debian/jp2-thumbnailer dist/
-	cp mj2/extract_j2k_from_mj2 dist/
-	cp mj2/frames_to_mj2 dist/
-	cp mj2/mj2_to_frames dist/
-	cp mj2/wrap_j2k_in_mj2 dist/
-
-binary-indep: build install
-# We have nothing to do by default.
-
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs ChangeLog
-	dh_installdocs
-	dh_installexamples
-	dh_install --sourcedir=dist/
-	dh_installman
-	dh_gconf	
-	dh_link
-	dh_strip --dbg-package=libopenjpeg2-dbg
-	dh_compress
-	dh_fixperms
-	dh_makeshlibs
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-
-.PHONY: build clean realclean binary-indep binary-arch binary install
-.SUFFIXES: .1 .help
diff --git a/debian/watch b/debian/watch
index 450f802..0f2187e 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,3 @@
 # Compulsory line, this is a version 3 file
 version=3
-opts=uversionmangle=s/_/./g,dversionmangle=s/\+dfsg// http://www.openjpeg.org/index.php?menu=download openjpeg_v([0-9_.]+)\.tar\.gz
-
+http://googlecode.debian.net/p/openjpeg/openjpeg_v(\d+.*)\.tgz
diff --git a/debian/wrap_j2k_in_mj2.pod b/debian/wrap_j2k_in_mj2.pod
deleted file mode 100644
index 957fdef..0000000
--- a/debian/wrap_j2k_in_mj2.pod
+++ /dev/null
@@ -1,58 +0,0 @@
-=head1 NAME
-
-wrap_j2k_in_mj2 - wrap one or several j2k bitstreams into a mj2 file
-
-=head1 SYNOPSIS
-
-B<wrap_j2k_in_mj2> I<input-base-name> I<output_file>
-
-
-=head1 DESCRIPTION
-
-wrap_j2k_in_mj2 wraps one or several j2k bitstreams into a mj2 file. The
-wrapping is done using the default parameters of 25 frames per second, no
-sound and no hint tracks.
-
-=head1 OPTIONS
-
-=over
-
-=item I<input-base-name>
-This name is taken and used for a search of matching names that are appended
-with an underscore and 5 digits eg _00000. An input of example would match:-
-
-example_00000.j2k
-example_00001.j2k etc...
-
-The sequence numbers give the sequence used when wrapping the code streams.
-
-=item  I<output-file>
-
-The name of the file to create as the output of the wrap process.
-
-=back
-
-=head1 EXAMPLE
-
-You have 3 j2k codesteam files named :- 
-
-example_00000.j2k
-example_00001.j2k
-example_00002.j2k
-
-and want to merge these into a single mj2 file
-
-I<wrap_j2k_in_mj2 example outfile.mj2>
-
-=head1 AUTHOR
-
-Written by Robin Cornelius <robin.cornelius at gmail.com> based on the output of wrap_j2k_in_mj2 as part of the Debian packaging of OpenJPEG
-
-=head1 COPYRIGHT
-
-Copyright 2009 Robin Cornelius <robin.cornelius at gmail.com>
-
-
-=head1 SEE ALSO
-
-L<extract_j2k_from_mj2(1)>, L<frames_to_mj2(1)>, L<mj2_to_frames(1)>, L<http://www.openjpeg.org/index.php?menu=doc#MJ2>
-- 
1.7.2.3




More information about the Pkg-phototools-devel mailing list