[magics] 03/31: Debian 2.18.7-2

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Jun 12 11:09:46 UTC 2015


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

mckinstry pushed a commit to branch master
in repository magics.

commit 67a12d6a4cb96d36fdfc2448cc7616ad8a7fa05f
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Sun Dec 23 00:40:48 2012 +0000

    Debian 2.18.7-2
---
 debian/README-testfailures.txt     |  64 ++++++++++
 debian/changelog                   | 247 +++++++++++++++++++++++++++++++++++++
 debian/compat                      |   1 +
 debian/control                     |  87 +++++++++++++
 debian/copyright                   |  48 +++++++
 debian/libmagics++-data.install    |   1 +
 debian/libmagics++-dev.install     |  10 ++
 debian/libmagplus3.install         |   1 +
 debian/magics++.install            |   3 +
 debian/patches/cve-2010-3393.patch |  31 +++++
 debian/patches/dynamic_link.patch  |  21 ++++
 debian/patches/enable_static.patch |  18 +++
 debian/patches/gcc-4.7.patch       | 144 +++++++++++++++++++++
 debian/patches/magics-config.patch | 131 ++++++++++++++++++++
 debian/patches/series              |   6 +
 debian/patches/terralib.patch      | 141 +++++++++++++++++++++
 debian/rules                       |  88 +++++++++++++
 debian/source/format               |   1 +
 debian/source/options              |   1 +
 19 files changed, 1044 insertions(+)

diff --git a/debian/README-testfailures.txt b/debian/README-testfailures.txt
new file mode 100644
index 0000000..62aa9c4
--- /dev/null
+++ b/debian/README-testfailures.txt
@@ -0,0 +1,64 @@
+This package fails the test fortran/layout_test in some circumstances.
+
+As it passes in others, I suspect a bad test, and have enabled the package, disabling the tests
+for the meantime.
+
+Details debugged so far:
+(1) ./layout_test works for me (TM)
+(2) "make check" fails on this test.
+(3) setting ulimit -s 8192 make check makes it work, on some platforms.
+
+Running the test under valgrind leads to:
+
+==10896== Process terminating with default action of signal 11 (SIGSEGV)
+==10896==  Access not within mapped region at address 0xBD08D00
+==10896==    at 0x42162D3: magics::Matrix::operator()(int, int) const (Matrix.h:300)
+==10896==    by 0x4219BD1: magics::MatrixHandler<magics::GeoPoint>::operator()(int, int) const (MatrixHandler.h:57)
+
+while Matrix.h has:
+
+
+297     double operator()(int row, int column) const
+298     {
+299            // Here for perfrormance we are trusting the user we do not catch exception 
+300                                 return (*this)[ row * columns_ + column];
+301 
+302     }
+
+Core dump:
+
+
+Core was generated by `./layout_test'.
+Program terminated with signal 11, Segmentation fault.
+#0  magics::Matrix::operator() (this=0x77eb0b98, row=511, column=85) at ../../src/common/Matrix.h:300
+300                                     return (*this)[ row * columns_ + column];
+(gdb) 
+(gdb) where
+#0  magics::Matrix::operator() (this=0x77eb0b98, row=511, column=85) at ../../src/common/Matrix.h:300
+#1  0x4020ebd2 in magics::MatrixHandler<magics::GeoPoint>::operator() (this=0x77ee42e0, i=511, j=85) at ../../src/common/MatrixHandler.h:57
+#2  0x4020ebd2 in magics::MatrixHandler<magics::GeoPoint>::operator() (this=0xbfe0d384, i=511, j=85) at ../../src/common/MatrixHandler.h:57
+#3  0x4024f140 in magics::BoxMatrixHandler<magics::GeoPoint>::operator() (this=0xbfe0d240, row=0, column=0) at ../../src/common/MatrixHandler.h:622
+#4  0x4020ebd2 in magics::MatrixHandler<magics::GeoPoint>::operator() (this=0x7864b458, i=0, j=0) at ../../src/common/MatrixHandler.h:57
+#5  0x4021140f in MatrixTreshold<magics::GeoPoint>::operator() (this=0xbfe0d340, row=0, column=0) at ../../src/visualisers/Contour.cc:69
+#6  0x4021cf88 in setMinMax (this=0xbfe0d340) at ../../src/common/MatrixHandler.h:166
+#7  max (this=0xbfe0d340) at ../../src/common/MatrixHandler.h:186
+#8  magics::MatrixHandler<magics::GeoPoint>::max (this=0xbfe0d340) at ../../src/common/MatrixHandler.h:182
+#9  0x4024e4fb in magics::Contour<magics::GeoPoint>::operator() (this=0x85f4e68, data=..., parent=...) at ../../src/visualisers/Contour.cc:124
+#10 0x4022110a in magics::VisualAction<magics::GeoPoint>::visit (this=0x85f3788, drawing=...) at VisualAction.cc:82
+#11 0x402f4f37 in magics::DrawingVisitor::visit (this=0x78961678, object=...) at SceneVisitor.h:116
+#12 0x4021aa14 in magics::VisualAction<magics::GeoPoint>::visit (this=0x85f3788, layer=..., visitors=...) at VisualAction.cc:268
+#13 0x402cd2e5 in magics::ViewNode::visit (this=0x85f3b80, tree=...) at ViewNode.cc:263
+#14 0x402c9312 in dispatch<magics::SceneLayer> (visitor=..., this=0x85f37c0) at BasicSceneObject.h:194
+#15 magics::FortranSceneNode::visit (this=0x85f37c0, tree=...) at SceneNode.cc:130
+#16 0x402c806e in dispatch<magics::Layout> (visitor=..., this=0x85ea528) at BasicSceneObject.h:194
+#17 visit (tree=..., this=0x85ea528) at BasicSceneObject.h:256
+#18 magics::RootScenePage::visit (this=0x85ea528, tree=...) at RootSceneNode.h:61
+#19 0x402c5c36 in dispatch<magics::Layout> (visitor=..., this=0x85eb220) at BasicSceneObject.h:194
+#20 magics::RootSceneNode::execute (this=0x85eb220) at RootSceneNode.cc:255
+#21 0x402000e9 in magics::FortranMagics::pclose (this=0x85e8728) at FortranMagics.cc:150
+#22 0x4035b994 in pclose_ () at MagicsCalls.cc:714
+#23 0x080491f7 in layout_test () at layout_test.f:96
+#24 main (argc=1, argv=0xbfe0ed4d "./layout_test") at layout_test.f:99
+#25 0x40ac6e46 in __libc_start_main (main=0x8048e90 <main>, argc=1, ubp_av=0xbfe0d794, init=0x804aba0 <__libc_csu_init>, fini=0x804ab90 <__libc_csu_fini>, 
+    rtld_fini=0x4000e310, stack_end=0xbfe0d78c) at libc-start.c:228
+#26 0x08049261 in _start ()
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..345beb2
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,247 @@
+magics++ (2.18.7-2) unstable; urgency=low
+
+  * libproj-dev is now a requirement, not optional. Include it.
+    Closes: #695963. 
+  * Enable hardening.
+  * Don't ship empty dir /usr/share/magics in -dev package.
+  * -data package is now M-A: foreign to satisfy m-a dependencies.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Tue, 18 Dec 2012 11:54:23 +0000
+
+magics++ (2.18.7-1) unstable; urgency=low
+
+  * New upstream release.
+  * Now at Standards-Version: 3.9.4
+  * Patch from Michael Terry for Ubuntu to delete bogus symlinks when 
+    building.
+  * Remove --with-terralib as no longer understood by configure;
+    MAGPLUS_HOME needs to be set when configure run
+  * python-magics++ now depends on python-simplejson
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Mon, 10 Dec 2012 06:22:47 +0000
+
+magics++ (2.14.11-4) unstable; urgency=low
+
+  * Rebuild to fix gcc-4.7 issue. Closes: #646734 
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Thu, 14 Jun 2012 12:32:31 +0100
+
+magics++ (2.14.11-3) unstable; urgency=low
+
+  * Don't forget libdir. read it from pkg-config too. Closes: #674472. 
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Fri, 08 Jun 2012 13:31:18 +0100
+
+magics++ (2.14.11-2) unstable; urgency=low
+
+  * Make magics-config use pkg-config to retrieve arch-dependent variables,
+    for multi-arch support. Closes: #674472. 
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Thu, 07 Jun 2012 16:13:01 +0100
+
+magics++ (2.14.11-1) unstable; urgency=low
+
+  * Standards-Version: 3.9.3. No changes required.
+  * New upstream release.
+  * Fixes for gcc-4.7. Closes: #673885.
+  * Now need python-instant for numpy.i, which is no longer shipped in the
+    swig/ directory.
+  * Now use xz compression.
+  * Make "./debian rules clean" actually work.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Tue, 22 May 2012 17:42:33 +0100
+
+magics++ (2.14.5-2) unstable; urgency=low
+
+  * boostlib > 1.32 needs libboost-dev dependency to build. 
+  Closes: #653298. 
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Sun, 01 Jan 2012 13:05:35 +0000
+
+magics++ (2.14.5-1) unstable; urgency=low
+
+  * New upstream release.
+  * Fix typo in homepage description. Closes: #571529. 
+  * Fix FTBFS in as-needed patch which no longer applied correctly.
+    Closes: #650453.
+  * Remove patches to Makefile.in, now its autogenerated. Just patch
+    Makefile.am.
+  * Move python-magics++ into Section: python from utils
+  
+ -- Alastair McKinstry <mckinstry at debian.org>  Wed, 21 Dec 2011 15:03:16 +0000
+
+magics++ (2.12.9-5) unstable; urgency=low
+
+  * Recommends: pkg-config in -dev package.
+  * Rebuild against new libgrib-api-dev. 
+  * Change section: for python-magics to utils, to match overrides. 
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Thu, 20 Oct 2011 10:40:35 +0100
+
+magics++ (2.12.9-4) unstable; urgency=low
+
+  * Add "-lz" to the LIBS to ensure its linked in correctly, adding zlib1-dev
+   to the B-D to ensure it is present. 
+  * Move libMagPlusSingle.a into /usr/lib/${DEB_HOST_MULTIARCH}/ dir
+    Closes: #642446.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Sat, 24 Sep 2011 15:05:00 +0100
+
+magics++ (2.12.9-3) unstable; urgency=low
+
+  * Add as-needed.patch to ltmain.sh to fix -Wl,--as-needed issues 
+  * Add LIBS=" -lX11 -lpng12" to configure line to link directly libraries that
+    are needed. 
+  * Disable test: layout_test fails on some platforms, but only within the 
+    Make check context; debugging in progress, but fix FTBFS for python 
+    transition. Details in README-testfailures.txt in debian/
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Tue, 13 Sep 2011 13:45:47 +0100
+
+magics++ (2.12.9-2) unstable; urgency=low
+
+  * Allow building against libhdf5-dev, not just libhdf5-serial-dev. 
+  * Add DEP-3 tags to patches
+  * Loop over and include support for all supported python versions.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Sat, 10 Sep 2011 11:18:22 +0100
+
+magics++ (2.12.9-1) unstable; urgency=low
+
+  * New upstream release.
+  * Test: layout_test breaks unless ulimit -s 8192 is set beforehand
+     in the debian/rules. Why?
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Fri, 08 Jul 2011 17:16:45 +0100
+
+magics++ (2.12.8.dfsg-1) unstable; urgency=low
+
+  * New upstream release.
+  * Move build system from cdbs to debhelper 7
+  * Move from python-support to dhpython2
+  * Depend on libopenjpeg-dev, for grib-api functionality. 
+  * Move to Standards-Version: 3.9.2 
+  * Build against libterralib3-dev, was libterralib1-dev. 
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Sat, 18 Jun 2011 17:27:27 +0100
+
+magics++ (2.10.0.dfsg-7) unstable; urgency=low
+
+  * Depend on ${python:Depends}. Closes: #609197. 
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Tue, 11 Jan 2011 21:01:37 +0000
+
+magics++ (2.10.0.dfsg-6) unstable; urgency=low
+
+  * FTBFS with python2.7. Patch from Sameer Morar. Closes: #608788.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Tue, 04 Jan 2011 11:25:40 +0000
+
+magics++ (2.10.0.dfsg-5.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/patches
+    - (cve-2010-3393--bug598418): Refresh patch. Restore deleted line
+      'python="@MAGICS_PYTHON@"' and adjust $ldlib.
+      (important, security, reopened; Closes: #598418).
+
+ -- Jari Aalto <jari.aalto at cante.net>  Sun, 24 Oct 2010 19:20:57 +0300
+
+magics++ (2.10.0.dfsg-5) unstable; urgency=low
+
+  * CVE-2010-3393: Fix LD_LIBRARY_PATH edit. Closes: #598418. 
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Wed, 29 Sep 2010 12:43:09 +0100
+
+magics++ (2.10.0.dfsg-4) unstable; urgency=low
+
+  * Explicitly add dh_pysupport call to triger update-python-modules in
+    postinst, prerm files. Also, move *.so files in python-magics++.install to 
+    /usr/lib/pymodules so that they are found and acted upon. Closes: #592422. 
+  * Added python-magics++ to Section: python as recommended by lintian.
+  * Added clean rule to delete symlinks, so double-builds succeed.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Wed, 11 Aug 2010 10:07:21 +0100
+
+magics++ (2.10.0.dfsg-3) unstable; urgency=low
+
+  * Build-Depend on python-numpy as well. Closes: #590951. 
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Fri, 30 Jul 2010 17:40:23 +0100
+
+magics++ (2.10.0.dfsg-2) unstable; urgency=low
+
+  * Add python support package python-magics++:
+    * Add build-depends on python-all-dev, swig, python-support
+    * Temporararily disable tests, as python tests have paths trouble.
+    * Remove rpath with chrpath
+  * Standrds-Version: 3.9.1
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Wed, 28 Jul 2010 01:02:07 +0100
+
+magics++ (2.10.0.dfsg-1) unstable; urgency=low
+
+  * New Upstream release
+   - DFSG version has terralib and pdfs removed.
+  * Move to Standards-Version: 3.9.0
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Wed, 21 Jul 2010 08:19:15 +0100
+
+magics++ (2.8.0.dfsg-5) unstable; urgency=low
+
+  * Typo in homepage URL. Closes: #571529.
+  * Move to Standards-Version: 3.8.4, no changes required. 
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Fri, 26 Feb 2010 11:43:35 +0000
+
+magics++ (2.8.0.dfsg-4) unstable; urgency=low
+
+  * Build-Dep: libxml-parser-perl and python for tests.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Thu, 07 Jan 2010 12:46:27 +0000
+
+magics++ (2.8.0.dfsg-3) unstable; urgency=low
+
+  * Add Build-Depends: libtool. 
+  * Set MAGPLUS_HOME in debian/rules so that tests run, and add gfortran 
+    dependency for fortran tests, Add Build-Dep on ttf-dejavu-core for testing.
+  * Disable printer_test as it requires a data file thats missing. 
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Wed, 06 Jan 2010 21:30:31 +0000
+
+magics++ (2.8.0.dfsg-2) unstable; urgency=low
+
+  * Patch: enable static libs in configure.ac. Closes: #562120. 
+  * Add dynamic_linking.patch to link libs to libMagPlus directly rather
+    than just magmlx, and remove libs via --as-needed.
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Wed, 23 Dec 2009 09:33:38 +0000
+
+magics++ (2.8.0.dfsg-1) unstable; urgency=low
+
+  * New upstream release. 
+  * Add libjasper dependency for grib-api. Add Closes: #562040.
+  * Added libcairo2-dev, libpango1.0-dev build dependencies now needed.
+  * Removed dependency on quilt ; now source format 3.0, so dpkg handles
+   this. 
+  * EpsBufr.patch now in upstream; removed
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Tue, 22 Dec 2009 11:26:27 +0000
+
+magics++ (2.6.4~dfsg-1) unstable; urgency=low
+
+  * Initial Debian release. Closes: #522984.
+  * Removed pdfs, making dfsg-free version.
+  * Removed terralib from sources; now use external terralib library, for
+    licensing reasons. 
+  * Change version number to ~ before upload, so non-dfsg can go away if 
+    PDF sources issue solved.
+  * Move to Standards-Version: 3.8.3
+  * DH_COMPAT is now 7. 
+  * Moved shared data to libmagics++-data.
+  * Build against libgrib-api, libemos-dev now in unstable.
+  * libmagics++ depends on ttf-dejavu-* fonts rather than includes them;
+  * Build-depend on libhdf5-serial-dev rather than virtual libhdf5-dev
+  * Removed ttf fonts. 
+
+ -- Alastair McKinstry <mckinstry at debian.org>  Fri, 06 Nov 2009 19:54:22 +0000
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..7fae0e2
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,87 @@
+Source: magics++
+Section: utils
+Priority: optional
+Maintainer: Alastair McKinstry <mckinstry at debian.org>
+Build-Depends: debhelper  (>= 8.1.3~) , dh-buildinfo, libhdf5-serial-dev | libhdf5-dev, libnetcdf-dev, libgl1-mesa-dev, libgd2-xpm-dev, libemos-dev, libgrib-api-dev, libterralib-dev, libjasper-dev, libcairo2-dev, libpango1.0-dev, autoconf, automake, libtool, gfortran, ttf-dejavu-core, libxml-parser-perl, python-all-dev (>= 2.6.6-3) , swig, chrpath, python-numpy, libopenjpeg-dev, ghostscript, zlib1g-dev, dh-autoreconf (>= 4~), libboost-dev, python-instant, python3-all-dev, libproj-dev
+Standards-Version: 3.9.3
+Homepage: http://www.ecmwf.int/products/data/software/magics++.html
+X-Python-Version: >= 2.6
+
+Package: libmagplus3
+Section: libs
+Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
+Depends: libmagics++-data,${misc:Depends}, ${shlibs:Depends}, ttf-dejavu-core, ttf-dejavu-extra, ghostscript
+Description: ECMWF meteorological plotting software library
+ Magics++ is the latest generation of the ECMWF's Meteorological plotting
+ software MAGICS. Although completely redesigned in C++, it is intended to be
+ as backwards-compatible as possible with the Fortran interface.
+ Besides its programming interfaces (Fortran and C), Magics++ offers MagML,
+ a plot description language based on XML aimed at automatic web production.
+ .
+ The library supports the plotting of contours, wind fields, observations,
+ satellite images, symbols, text, axis and graphs (including boxplots).
+ .
+ Data fields to be plotted may be presented in various formats,
+ for instance GRIB 1 and 2 code data, Gaussian grid, regularly spaced grid
+ and fitted data. Input data can also be in BUFR and NetCDF format
+ or retrieved from an ODB database.
+ .
+ The produced meteorological plots can be saved in various formats,
+ such as PostScript, EPS, PDF, GIF, PNG, SVG and KML.
+
+Package: libmagics++-dev
+Section: libdevel
+Architecture: any
+Multi-Arch: same
+Depends: libmagplus3 ( = ${binary:Version} ), ${misc:Depends}, ${python:Depends}
+Recommends: pkg-config
+Description: Development files for ECMWF  plotting software MAGICS++
+ Magics++ is the latest generation of the ECMWF's Meteorological plotting
+ software MAGICS. Although completely redesigned in C++, it is intended to be
+ as backwards-compatible as possible with the Fortran interface.
+ Besides its programming interfaces (Fortran and C), Magics++ offers MagML,
+ a plot description language based on XML aimed at automatic web production.
+ .
+ This package includes the header files and static libraries needed to build 
+ against libmagics++.
+
+Package: magics++
+Architecture: any
+Multi-Arch: foreign
+Depends: libmagplus3 ( = ${binary:Version} ), ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}
+Description: Executables for the magics++ library
+ Magics++ is the latest generation of the ECMWF's Meteorological plotting
+ software MAGICS. Although completely redesigned in C++, it is intended to be
+ as backwards-compatible as possible with the Fortran interface.
+ Besides its programming interfaces (Fortran and C), Magics++ offers MagML,
+ a plot description language based on XML aimed at automatic web production.
+ .
+ This package contains the MagcML binary that may be used with magics++.
+
+Package: python-magics++
+Section: python
+Architecture: any
+Depends:  libmagplus3 ( = ${binary:Version} ), ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}, python, python-simplejson
+Description: python support for Magics++
+ Magics++ is the latest generation of the ECMWF's Meteorological plotting
+ software MAGICS. Although completely redesigned in C++, it is intended to be
+ as backwards-compatible as possible with the Fortran interface.
+ Besides its programming interfaces (Fortran and C), Magics++ offers MagML,
+ a plot description language based on XML aimed at automatic web production.
+ .
+ This package provides python support for the magics++ library.
+
+Package: libmagics++-data
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Description: Data files needed for magics++ library
+ Magics++ is the latest generation of the ECMWF's Meteorological plotting
+ software MAGICS. Although completely redesigned in C++, it is intended to be
+ as backwards-compatible as possible with the Fortran interface.
+ Besides its programming interfaces (Fortran and C), Magics++ offers MagML,
+ a plot description language based on XML aimed at automatic web production.
+ .
+ This package contains data expected by the magics++ library.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..58ad2e4
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,48 @@
+This package was debianized by Alastair McKinstry <mckinstry at debian.org>, on
+Mon,  6 Apr 2009 16:22:04 +0100.  It was downloaded from
+http://www.ecmwf.int/products/data/software/magics++.html.
+
+The Debian packaging is Copyright  2009, Alastair McKinstry <mckinstry at debian.org>,
+is licensed under the terms of the GNU GPL version 3.
+
+Magics++
+========
+
+Copyright 2007,2008 ECMWF
+
+This product mainly includes software developed at "The European Centre for 
+Medium-Range Weather Forecasts" (ECMWF - http://www.ecmwf.int ).
+
+Licensed under the Apache License, version 2.0
+The text of the license can be found in /usr/share/common-licenses/Apache-2.0
+
+OpenGL font rendering - OGLFT
+=============================
+
+(src/driver/OpenGLDriverText.cc/.h)
+
+ * OGLFT: A library for drawing text with OpenGL using the FreeType library
+ * Copyright (C) 2002 lignum Computing, Inc. <oglft at lignumcomputing.com>
+ * $Id: OGLFT.cpp,v 1.11 2003/10/01 14:21:18 allen Exp $
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+G S H H S
+=========
+Global Self-consistant Hierarchical High-resolution Shorelines.
+This is shipped with magics++, and is also covered by the Gnu General Public License.
+The text of the license can be found in /usr/share/common-licenses/GPL-2.0.
+
+The original GSHHS can be retrieved from: http://www.ngdc.noaa.gov/mgg/shorelines/gshhs.html
diff --git a/debian/libmagics++-data.install b/debian/libmagics++-data.install
new file mode 100644
index 0000000..1d24459
--- /dev/null
+++ b/debian/libmagics++-data.install
@@ -0,0 +1 @@
+debian/tmp/usr/share/magics/* usr/share/magics
diff --git a/debian/libmagics++-dev.install b/debian/libmagics++-dev.install
new file mode 100644
index 0000000..b9b193c
--- /dev/null
+++ b/debian/libmagics++-dev.install
@@ -0,0 +1,10 @@
+debian/tmp/usr/lib/*/libMagPlusSingle.a 
+debian/tmp/usr/lib/*/libMagPlusDouble.a 
+debian/tmp/usr/lib/*/libMagPlus.a 
+debian/tmp/usr/include/magics usr/include
+debian/tmp/usr/bin/magics-config usr/bin
+debian/tmp/usr/lib/*/pkgconfig/magics.pc 
+debian/tmp/usr/share/aclocal/magics.m4	usr/share/aclocal
+debian/tmp/usr/bin/magicsCompatibilityChecker usr/bin
+
+
diff --git a/debian/libmagplus3.install b/debian/libmagplus3.install
new file mode 100644
index 0000000..a9811bf
--- /dev/null
+++ b/debian/libmagplus3.install
@@ -0,0 +1 @@
+debian/tmp/usr/lib/*/libMagPlus.so.3.0.0 
diff --git a/debian/magics++.install b/debian/magics++.install
new file mode 100644
index 0000000..24ecec0
--- /dev/null
+++ b/debian/magics++.install
@@ -0,0 +1,3 @@
+usr/bin/magjson  
+usr/bin/magmlx  
+usr/bin/mapgen_clip
diff --git a/debian/patches/cve-2010-3393.patch b/debian/patches/cve-2010-3393.patch
new file mode 100644
index 0000000..9d0465a
--- /dev/null
+++ b/debian/patches/cve-2010-3393.patch
@@ -0,0 +1,31 @@
+From 4d974cdaf4547520d6ce335f88f5f67712e97766 Mon Sep 17 00:00:00 2001
+From: Jari Aalto <jari.aalto at cante.net>
+Date: Sat, 16 Oct 2010 19:52:12 +0300
+Subject: [PATCH] CVE-2010-3393 insecure library loading Bug#598418
+Organization: Private
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Jari Aalto <jari.aalto at cante.net>
+---
+Index: magics++-2.18.1/magics-config.in
+===================================================================
+--- magics++-2.18.1.orig/magics-config.in	2012-10-15 12:23:32.000000000 +0100
++++ magics++-2.18.1/magics-config.in	2012-10-31 15:38:22.000000000 +0000
+@@ -76,6 +76,7 @@
+ 	fi
+ fi
+ 
++ldlib="${prefix}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+ if test $# -eq 0; then
+ 	usage 1 1>&2
+ fi
+@@ -132,7 +133,7 @@
+ 		echo ""
+ 		echo "   export MAGPLUS_HOME=${prefix}"
+ 		echo "   export PATH=${prefix}/bin:\$PATH"
+-		echo "   export LD_LIBRARY_PATH=${libdir}:\$LD_LIBRARY_PATH"
++                echo "   export LD_LIBRARY_PATH=\"$ldlib\""
+ 		echo "   export PYTHONPATH=\"${py_dir}:\${PYTHONPATH:-/usr/lib}\""
+ 		echo ""
+ 		echo " You might want add these lines to your login scripts (.profile, .kshrc or .bashrc)."
diff --git a/debian/patches/dynamic_link.patch b/debian/patches/dynamic_link.patch
new file mode 100644
index 0000000..eb7d270
--- /dev/null
+++ b/debian/patches/dynamic_link.patch
@@ -0,0 +1,21 @@
+Description: Link libMagPlus.so.3.0.0 against extra libraries that are provided
+ in dynamic form by Debian.
+Author: Alastair McKinstry <mckinstry at debian.org>
+Last-Updated: 2010-07-23
+Forwarded: no
+
+Index: magics++-2.18.1/configure.ac
+===================================================================
+--- magics++-2.18.1.orig/configure.ac	2012-10-15 12:23:25.000000000 +0100
++++ magics++-2.18.1/configure.ac	2012-10-31 15:38:08.000000000 +0000
+@@ -724,7 +724,9 @@
+ fi
+ AC_SUBST(proj4)
+ 
+-
++# Add dynamic libs needed by Debian
++LIBS="$CAIRO_LIBS $LIBS -lemosR64 -lgrib_api -lterralib -lstdc++ -lm $NETCDF_LIBS"
++LDFLAGS="$CAIRO_LDFLAGS $LDFLAGS -Wl,--as-needed"
+ 
+ ############################################
+ #
diff --git a/debian/patches/enable_static.patch b/debian/patches/enable_static.patch
new file mode 100644
index 0000000..6b1325d
--- /dev/null
+++ b/debian/patches/enable_static.patch
@@ -0,0 +1,18 @@
+Author: Alastair McKinstry <mckinstry at debian.org>
+Description: Enable building static libs
+Last-Updated: 2011-06-16
+Forwarded: not-needed
+
+Index: magics++-2.18.1/configure.ac
+===================================================================
+--- magics++-2.18.1.orig/configure.ac	2012-10-31 15:38:30.000000000 +0000
++++ magics++-2.18.1/configure.ac	2012-10-31 15:38:38.000000000 +0000
+@@ -55,7 +55,7 @@
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+ 
+ 
+-AC_DISABLE_STATIC         # TEMPORARY !!!!
++#AC_DISABLE_STATIC         # TEMPORARY !!!!
+ AC_AIX
+ LT_INIT
+ #AC_PROG_CC([xlc_r icc aCC gcc cc CC])
diff --git a/debian/patches/gcc-4.7.patch b/debian/patches/gcc-4.7.patch
new file mode 100644
index 0000000..e76b7a9
--- /dev/null
+++ b/debian/patches/gcc-4.7.patch
@@ -0,0 +1,144 @@
+Author: Alastair McKinstry <mckinstry at debian.org>
+Description: Fixes needed for compilation with gcc-4.7
+Forwarded: no
+Last-Updaged: 2012-05-22
+Bug-Origin: http://bugs.debian.org/673885.
+
+Index: magics++-2.18.1/src/visualisers/IsoPlot.cc
+===================================================================
+--- magics++-2.18.1.orig/src/visualisers/IsoPlot.cc	2012-10-15 12:23:37.000000000 +0100
++++ magics++-2.18.1/src/visualisers/IsoPlot.cc	2012-10-31 15:46:02.000000000 +0000
+@@ -456,36 +456,36 @@
+        RangeType def = cell->range();
+             
+        if ( def != multipleRange ) {
+-             push_back(cell);
++             this->push_back(cell);
+        }
+        else {
+              delete cell;
+-             push_back(new CellBox(parent_, row1_, row, column1_, column));
+-             push_back(new CellBox(parent_, row+1, row2_, column1_, column));
++             this->push_back(new CellBox(parent_, row1_, row, column1_, column));
++             this->push_back(new CellBox(parent_, row+1, row2_, column1_, column));
+        }
+        cell = new CellBox(parent_, row1_, row2_, column+1, column2_);
+        def = cell->range();
+ 
+        if ( def != multipleRange ) {
+-             push_back(cell);
++             this->push_back(cell);
+        }
+        else {
+              delete cell;
+-             push_back(new CellBox(parent_, row1_, row, column+1, column2_));
+-             push_back(new CellBox(parent_, row+1, row2_, column+1, column2_));
++             this->push_back(new CellBox(parent_, row1_, row, column+1, column2_));
++             this->push_back(new CellBox(parent_, row+1, row2_, column+1, column2_));
+        }
+        return;
+     }
+ 
+     if (row2_- row1_ > 0) {
+-       push_back(new CellBox(parent_, row1_, row, column1_, column2_));
+-       push_back(new CellBox(parent_, row+1, row2_, column1_, column2_));
++       this->push_back(new CellBox(parent_, row1_, row, column1_, column2_));
++       this->push_back(new CellBox(parent_, row+1, row2_, column1_, column2_));
+        return;
+     }
+ 
+     if (column2_- column1_ > 0) {
+-       push_back(new CellBox(parent_, row1_, row2_, column1_, column));
+-       push_back(new CellBox(parent_, row1_, row2_, column+1, column2_));
++       this->push_back(new CellBox(parent_, row1_, row2_, column1_, column));
++       this->push_back(new CellBox(parent_, row1_, row2_, column+1, column2_));
+        return;
+     }
+ }
+@@ -1302,12 +1302,12 @@
+  */
+  void IsoPlot::operator()(MatrixHandler& data, BasicGraphicsObjectContainer& parent)
+ {
+-    prepare(data);
++    this->prepare(data);
+     if ( legend_only_ ) return;
+     
+     {
+         Timer timer("contouring", "Time spent in contouring");
+-        isoline(data, parent);
++        this->isoline(data, parent);
+     }
+ 
+ #ifdef ISOPLOT_DEBUG
+@@ -1352,7 +1352,7 @@
+  void NoIsoPlot::operator()(MatrixHandler& data, BasicGraphicsObjectContainer& parent)
+ {
+     // Create the isolines...        
+-    if ( !prepare(data) ) {    
++    if ( !this->prepare(data) ) {    
+         if ( legend_only_ ) return;
+         (*shading_)(data, parent);
+         // do not send the isolines...  
+Index: magics++-2.18.1/src/visualisers/Filter.cc
+===================================================================
+--- magics++-2.18.1.orig/src/visualisers/Filter.cc	2012-10-15 12:23:37.000000000 +0100
++++ magics++-2.18.1/src/visualisers/Filter.cc	2012-10-31 15:41:45.000000000 +0000
+@@ -202,7 +202,7 @@
+ 			{
+ //				MagLog::debug() << "Min " << lin+fcr+1 << " " << col+fcc+1 << " " << val << "\n";
+ 				lo = lo+1;
+-				push_back(UserPoint(this->matrix_.column(lin+fcr, col+fcc),this->matrix_.row(lin+fcr, col+fcc),val));
++				this->push_back(UserPoint(this->matrix_.column(lin+fcr, col+fcc),this->matrix_.row(lin+fcr, col+fcc),val));
+ 				this->back().low(true);
+ 				this->back().high(false);
+ 			}
+@@ -233,7 +233,7 @@
+ 			{
+ //				MagLog::debug() << "Max " << lin+fcr+1 << " " << col+fcc+1 << " " << val << "\n";
+ 				hi = hi+1;
+-				push_back(UserPoint(this->matrix_.column(lin+fcr, col+fcc),this->matrix_.row(lin+fcr, col+fcc),val));
++				this->push_back(UserPoint(this->matrix_.column(lin+fcr, col+fcc),this->matrix_.row(lin+fcr, col+fcc),val));
+ 				this->back().high(true);
+ 				this->back().low(false);
+ 			}
+Index: magics++-2.18.1/src/visualisers/Bar.cc
+===================================================================
+--- magics++-2.18.1.orig/src/visualisers/Bar.cc	2012-10-15 12:23:37.000000000 +0100
++++ magics++-2.18.1/src/visualisers/Bar.cc	2012-10-31 15:44:17.000000000 +0000
+@@ -98,13 +98,13 @@
+ 	
+ 	vector<string>::iterator annotation = annotation_.begin();
+ 	
+-	for (CustomisedPointsList::const_iterator point = points.begin(); point != points.end(); ++point)
++	for (CustomisedPointsList::const_iterator pt = points.begin(); pt != points.end(); ++pt)
+ 	{
+ 		
+-		x = (**point)["x"];
+-		next = ((point+1) != points.end() ) ? (**(point+1))["x"] : x;
+-		bottom = (min_value_ == INT_MAX) ? (**point)["y_lower"]: min_value_;
+-		top = (**point)["y_upper"];
++		x = (**pt)["x"];
++		next = ((pt+1) != points.end() ) ? (**(pt+1))["x"] : x;
++		bottom = (min_value_ == INT_MAX) ? (**pt)["y_lower"]: min_value_;
++		top = (**pt)["y_upper"];
+ 		
+ 		map<string,  Renderer>::iterator renderer = renderers_.find(lowerCase(bar_style_) );
+ 
+Index: magics++-2.18.1/src/decoders/MapGenDecoder.cc
+===================================================================
+--- magics++-2.18.1.orig/src/decoders/MapGenDecoder.cc	2012-10-15 12:23:36.000000000 +0100
++++ magics++-2.18.1/src/decoders/MapGenDecoder.cc	2012-10-31 15:47:05.000000000 +0000
+@@ -73,11 +73,11 @@
+                 continue;
+ 			if ( strncmp(line,"# -b", 4) == 0 ) 
+ 			   if ( record_ < 0 ) {
+-				   if ( this->empty() ) push_back(new PointsList());
++				   if ( this->empty() ) this->push_back(new PointsList());
+ 				   this->back()->push_back(new UserPoint(0,0,0, true));
+ 			   }
+ 			   else
+-				   push_back(new PointsList());
++				   this->push_back(new PointsList());
+ 			else {
+ 				sscanf(line, "%f %f", &lon, &lat);
+ 				this->back()->push_back(new UserPoint(lon, lat, i++));
diff --git a/debian/patches/magics-config.patch b/debian/patches/magics-config.patch
new file mode 100644
index 0000000..257863e
--- /dev/null
+++ b/debian/patches/magics-config.patch
@@ -0,0 +1,131 @@
+Description: Make magics-config inherit from pkg-config, for Multi-arch support.
+Author: Alastair McKinstry <mckinstry at debian.org>
+Bug-Origin: http://bugs.debian.org/674472
+Last-Updated: 2012-06-08
+Forwarded: no
+
+Index: magics++-2.18.1/magics-config.in
+===================================================================
+--- magics++-2.18.1.orig/magics-config.in	2012-10-31 15:38:22.000000000 +0000
++++ magics++-2.18.1/magics-config.in	2012-10-31 15:47:28.000000000 +0000
+@@ -2,17 +2,21 @@
+ 
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+-libdir=@libdir@
++libdir=`pkg-config --variable=libdir magics`
+ includedir=@includedir@
+-F77="@F77@"
+-CC="@CC@"
+-CXX="@CXX@"
+-CXXFLAGS="@CXXFLAGS@" 
+-AXX="@AXX@"
+-SHLIB_EXT="@SHLIB_EXT@"
+-FFLAGS="@FFLAGS@"
+-CPPLIBS="@CPPLIBS@"
+-py_dir="@PYTHON_SITE_PKG@"
++F77=`pkg-config --variable=F77 magics`
++CC=`pkg-config --variable=CC magics`
++CXX=`pkg-config --variable=CXX magics`
++CXXFLAGS=`pkg-config --variable=CXXFLAGS magics`
++AXX=`pkg-config --variable=AXX magics`
++SHLIB_EXT=`pkg-config --variable=SHLIB_EXT magics`
++FFLAGS=`pkg-config --variable=FFLAGS magics`
++CPPLIBS=`pkg-config --variable=CPPLIBS magics`
++LDFLAGS=`pkg-config --variable=LDFLAGS magics`
++FLIBS=`pkg-config --variable=FLIBS magics`
++MAGICS_3RDPARTY_LIBS=`pkg-config --variable=MAGICS_3RDPARTY_LIBS magics`
++MAGICS_3RDPARTY_INCLUDE=`pkg-config --variable=MAGICS_3RDPARTY_INCLUDE magics`
++py_dir=`pkg-config --variable=py_dir magics`
+ suffix=""
+ 
+ #
+@@ -230,7 +234,7 @@
+ 	if test "$includedir" != "/usr/include" ; then
+ 		my_cxxflags="-I${includedir}"
+ 	fi
+-	echo "${AXX} ${my_cxxflags} @MAGICS_3RDPARTY_INCLUDE@"
++	echo "${AXX} ${my_cxxflags} ${MAGICS_3RDPARTY_INCLUDE}"
+ fi
+ 
+ if test "$echo_libs" = "yes"; then
+@@ -240,7 +244,7 @@
+ 		my_libs="${libdir}/libMagPlus.a"
+ 	fi
+ 
+-	my_libs="${my_libs} @LDFLAGS@ @MAGICS_3RDPARTY_LIBS@ @FLIBS@"
++	my_libs="${my_libs} ${LDFLAGS} ${MAGICS_3RDPARTY_LIBS} ${FLIBS}"
+ 
+ 	if test "$echo_clibs" = "yes"; then
+ 		my_libs="${my_libs} $CPPLIBS"
+@@ -258,7 +262,7 @@
+ 
+ if test "$echo_static" = "yes"; then
+ 	if test -f ${libdir}/libMagPlus.a ; then
+-	  static="${precision} ${libdir}/libMagPlus.a -L${libdir} @LDFLAGS@ @MAGICS_3RDPARTY_LIBS@ $CPPLIBS"
++	  static="${precision} ${libdir}/libMagPlus.a -L${libdir} ${LDFLAGS} ${MAGICS_3RDPARTY_LIBS} $CPPLIBS"
+ 	  echo ${static}
+ 	else
+ 	  echo "magics-config: NO STATIC LIBRARY available"
+@@ -267,7 +271,7 @@
+ 
+ if test "$echo_shared" = "yes"; then
+ 	if test -f ${libdir}/libMagPlus.${SHLIB_EXT} ; then
+-	  shared="${precision} -L${libdir} -lMagPlus @LDFLAGS@ @MAGICS_3RDPARTY_LIBS@ $CPPLIBS"
++	  shared="${precision} -L${libdir} -lMagPlus ${LDFLAGS} ${MAGICS_3RDPARTY_LIBS} $CPPLIBS"
+ 	  echo ${shared}
+ 	else
+ 	  echo "magics-config: NO SHARED LIBRARY"
+@@ -275,7 +279,7 @@
+ fi
+ 
+ if test "$echo_flibs" = "yes"; then
+-	echo @FLIBS@
++	echo ${FLIBS}
+ fi
+ 
+ if test "$compile" = "yes"; then
+@@ -289,8 +293,8 @@
+ 	if test ${name} != ${f77_file} ; then
+ 	      out="-o $name "              ### avoid overriding source file
+ 	fi
+-	echo "$F77 ${out}$f77_file ${FFLAGS} ${precision} -L${libdir} -lMagPlus @LDFLAGS@ @MAGICS_3RDPARTY_LIBS@ $CPPLIBS"
+-	$F77 ${out}$f77_file ${FFLAGS} ${precision} -L${libdir} -Wl,-rpath,${libdir} -lMagPlus @LDFLAGS@ @MAGICS_3RDPARTY_LIBS@ $CPPLIBS
++	echo "$F77 ${out}$f77_file ${FFLAGS} ${precision} -L${libdir} -lMagPlus ${LDFLAGS} ${MAGICS_3RDPARTY_LIBS} $CPPLIBS"
++	$F77 ${out}$f77_file ${FFLAGS} ${precision} -L${libdir} -Wl,-rpath,${libdir} -lMagPlus ${LDFLAGS} ${MAGICS_3RDPARTY_LIBS} $CPPLIBS
+ fi
+ 
+ if test "$compileC" = "yes"; then
+@@ -304,6 +308,6 @@
+ 	if test ${name} != ${c_file} ; then
+ 	      out="-o $name "              ### avoid overriding source file
+ 	fi
+-	echo "$CC ${out}$c_file ${CFLAGS} -L${libdir} -lMagPlus @LDFLAGS@ @MAGICS_3RDPARTY_LIBS@ $CPPLIBS @FLIBS@"
+-	$CC ${out}$c_file ${CFLAGS} -I${includedir} -L${libdir} -Wl,-rpath,${libdir} -lMagPlus @LDFLAGS@ @MAGICS_3RDPARTY_LIBS@ $CPPLIBS @FLIBS@
++	echo "$CC ${out}$c_file ${CFLAGS} -L${libdir} -lMagPlus ${LDFLAGS} ${MAGICS_3RDPARTY_LIBS} $CPPLIBS ${FLIBS}"
++	$CC ${out}$c_file ${CFLAGS} -I${includedir} -L${libdir} -Wl,-rpath,${libdir} -lMagPlus ${LDFLAGS} ${MAGICS_3RDPARTY_LIBS} $CPPLIBS ${FLIBS}
+ fi
+Index: magics++-2.18.1/src/magics.pc.in
+===================================================================
+--- magics++-2.18.1.orig/src/magics.pc.in	2012-10-15 12:23:36.000000000 +0100
++++ magics++-2.18.1/src/magics.pc.in	2012-10-31 15:47:28.000000000 +0000
+@@ -2,6 +2,19 @@
+ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+ includedir=@includedir@
++F77="@F77@"
++CC="@CC@"
++CXX="@CXX@"
++CXXFLAGS="@CXXFLAGS@"
++AXX="@AXX@"
++SHLIB_EXT="@SHLIB_EXT@"
++FFLAGS="@FFLAGS@"
++CPPLIBS="@CPPLIBS@"
++LDFLAGS="@LDFLAGS@"
++FLIBS="@FLIBS@"
++MAGICS_3RDPARTY_LIBS="@MAGICS_3RDPARTY_LIBS@"
++MAGICS_3RDPARTY_INCLUDE="@MAGICS_3RDPARTY_INCLUDE@"
++py_dir="@PYTHON_SITE_PKG@"
+ 
+ Name: Magics
+ Description: Multi-platform meteorological graphics library
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cc66b4c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,6 @@
+dynamic_link.patch
+cve-2010-3393.patch
+terralib.patch
+enable_static.patch
+gcc-4.7.patch
+magics-config.patch
diff --git a/debian/patches/terralib.patch b/debian/patches/terralib.patch
new file mode 100644
index 0000000..1b1551f
--- /dev/null
+++ b/debian/patches/terralib.patch
@@ -0,0 +1,141 @@
+Author: Alastair McKinstry <mckinstry at debian.org>
+Description: Add Debians libterralib, rather than built-in version
+Last-Updated: 2011-07-08
+Forwarded: not-needed
+
+Index: magics++-2.18.1/configure.ac
+===================================================================
+--- magics++-2.18.1.orig/configure.ac	2012-10-31 15:38:08.000000000 +0000
++++ magics++-2.18.1/configure.ac	2012-10-31 15:38:30.000000000 +0000
+@@ -990,7 +990,7 @@
+ 
+ 
+ MAGICS_3RDPARTY_INCLUDE="$CPPFLAGS"
+-MAGICS_3RDPARTY_LIBS="$LIBS $GRIBAPI_LIBS $MAGICS_3RDPARTY_LIBS $NETCDF_LIBS"
++MAGICS_3RDPARTY_LIBS="$LIBS $GRIBAPI_LIBS $MAGICS_3RDPARTY_LIBS $NETCDF_LIBS -lterralib"
+ LIBS="$LIBS $NETCDF_LIBS"
+ 
+ AC_SUBST(MAGICS_3RDPARTY_INCLUDE)
+@@ -1031,7 +1031,6 @@
+ 		src/drivers/Makefile
+ 		src/oda/Makefile
+ 		src/visualisers/Makefile
+-		src/terralib/Makefile
+ 		src/MvObs/Makefile
+ 		src/libTable/Makefile
+ 		src/libMagWrapper/Makefile
+Index: magics++-2.18.1/src/visualisers/ImagePlotting.cc
+===================================================================
+--- magics++-2.18.1.orig/src/visualisers/ImagePlotting.cc	2012-10-15 12:23:37.000000000 +0100
++++ magics++-2.18.1/src/visualisers/ImagePlotting.cc	2012-10-31 15:38:30.000000000 +0000
+@@ -124,7 +124,8 @@
+ 	parin.nlines_ = rdin.getRows();
+ 	parin.resx_   = abs(rdin.getXResolution());
+ 	parin.resy_   = abs(rdin.getYResolution());
+-	parin.decName("MEM");
++	//parin.decName("MEM");
++        parin.decoderIdentifier_ = "MEM";
+ 	
+ 	parin.projection(&rdin.getProjection());
+ 	UserPoint ll = rdin.getLowerLeftCorner();
+@@ -136,7 +137,8 @@
+ 
+ 	// Copy input image to the raster structure
+ 	TeRaster rastin(parin);
+-	rastin.params().decName("MEM");
++	// rastin.params().decName("MEM");
++        rastin.params().decoderIdentifier_ = "MEM";
+ 	bool ok = rastin.init(parin);
+ 	for (i = 0; i < parin.nlines_; i++)
+ 		for (j = 0; j < parin.ncols_; j++)
+@@ -164,7 +166,8 @@
+ 	double res = (maxX-minX)/double(nnx-1);
+ 
+ 	parout.boundingBoxResolution(minX,minY,maxX,maxY,res,res, TeBox::TeLOWERLEFT);
+-	parout.decName("MEM");
++	// parout.decName("MEM");
++        parout.decoderIdentifier_ = "MEM";
+ 	parout.nBands(1);
+ 	parout.setDummy(0);
+ 	parout.setDataType(TeUNSIGNEDSHORT); // see note 2 above
+@@ -172,7 +175,8 @@
+ 
+ 	// Initialise raster structure
+ 	TeRaster rastout(parout);
+-	rastout.params().decName("MEM");
++	// rastout.params().decName("MEM");
++        rastout.params().decoderIdentifier_ = "MEM";
+ 	ok = rastout.init(parout);
+ 
+ 	// Reproject input data
+@@ -230,10 +234,12 @@
+ 	UserPoint ur = rdin.getUpperRightCorner();
+ 	parin.boundingBoxResolution(ll.x(),ll.y(),ur.x(),ur.y(), parin.resx_, parin.resy_);
+ 	parin.nBands(1);
+-	parin.setDataType(TeUNSIGNEDSHORT);
++	// parin.setDataType(TeUNSIGNEDSHORT);
+ 	//parin.compressionType_ = TeNoCompression;
++         parin.dataType_[0] = TeUNSIGNEDSHORT;
+     parin.setCompressionMode(TeRasterParams::TeNoCompression);
+-	parin.decName("MEM");
++	// parin.decName("MEM");
++        parin.decoderIdentifier_ = "MEM";
+ 
+ 	// Copy input image to the raster structure
+ 	TeRaster rastin(parin);
+@@ -247,7 +253,8 @@
+ 	TeRasterParams parout;
+ 	TeProjection& projout = const_cast<Transformation * >(&transformation)->getProjection();
+ 	parout.projection(&projout);
+-	parout.decName("MEM");
++	// parout.decName("MEM");
++        parout.decoderIdentifier_ = "MEM";
+ 
+ 	double minX = transformation.getMinPCX();  
+ 	double maxX = transformation.getMaxPCX();  
+Index: magics++-2.18.1/src/Makefile.am
+===================================================================
+--- magics++-2.18.1.orig/src/Makefile.am	2012-10-15 12:23:34.000000000 +0100
++++ magics++-2.18.1/src/Makefile.am	2012-10-31 15:38:30.000000000 +0000
+@@ -8,8 +8,8 @@
+ endif
+ 
+ #if MAGICS_TERRALIB
+-MAG_TERRALIB_DIR 	= terralib
+-terralib_lib		= terralib/libterralib.la
++MAG_TERRALIB_DIR 	= 
++terralib_lib		= 
+ #endif
+ 
+ if MAGICS_JSON
+@@ -163,16 +163,8 @@
+ EXTRA_DIST	= 	boost
+ 
+ if MAGICS_RASTER
+-sharettfdir		= $(datadir)/magics/ttf
+-sharettf_DATA		= $(top_srcdir)/share/magics/ttf/DejaVuSans-BoldOblique.ttf \
+-			$(top_srcdir)/share/magics/ttf/DejaVuSans.ttf \
+-			$(top_srcdir)/share/magics/ttf/DejaVuSerif-Oblique.ttf \
+-			$(top_srcdir)/share/magics/ttf/DejaVuSans-Bold.ttf \
+-			$(top_srcdir)/share/magics/ttf/DejaVuSerif-BoldOblique.ttf \
+-			$(top_srcdir)/share/magics/ttf/DejaVuSerif.ttf \
+-			$(top_srcdir)/share/magics/ttf/DejaVuSans-Oblique.ttf \
+-			$(top_srcdir)/share/magics/ttf/DejaVuSerif-Bold.ttf \
+-			$(top_srcdir)/share/magics/ttf/LICENSE-dejavu-ttf-2.15
++sharettfdir		= 
++sharettf_DATA		= 
+ endif
+ 
+ shareefidir		= $(datadir)/magics/efi
+Index: magics++-2.18.1/configure
+===================================================================
+--- magics++-2.18.1.orig/configure	2012-10-15 12:24:22.000000000 +0100
++++ magics++-2.18.1/configure	2012-10-31 15:38:30.000000000 +0000
+@@ -22843,7 +22843,6 @@
+     "src/drivers/Makefile") CONFIG_FILES="$CONFIG_FILES src/drivers/Makefile" ;;
+     "src/oda/Makefile") CONFIG_FILES="$CONFIG_FILES src/oda/Makefile" ;;
+     "src/visualisers/Makefile") CONFIG_FILES="$CONFIG_FILES src/visualisers/Makefile" ;;
+-    "src/terralib/Makefile") CONFIG_FILES="$CONFIG_FILES src/terralib/Makefile" ;;
+     "src/MvObs/Makefile") CONFIG_FILES="$CONFIG_FILES src/MvObs/Makefile" ;;
+     "src/libTable/Makefile") CONFIG_FILES="$CONFIG_FILES src/libTable/Makefile" ;;
+     "src/libMagWrapper/Makefile") CONFIG_FILES="$CONFIG_FILES src/libMagWrapper/Makefile" ;;
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..bfd822e
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+
+# To enable all, uncomment following line
+DEB_BUILD_MAINT_OPTIONS:= hardening=+allx
+DEB_CFLAGS_MAINT_APPEND:= -Wall -pedantic
+export DEB_BUILD_MAINT_OPTIONS
+export DEB_CFLAGS_MAINT_APPEND
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+%:
+	dh $@  --with python2,python3,autoreconf
+
+CFLAGS += -fPIC
+
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+# --enable-opengl can't be used as lesstif not supported - missing Motif functionality
+
+override_dh_auto_clean:
+	find . -type l -exec rm {} \;
+	find . \( -name '*.pyc' -o -name '*.o' -o -name '*.a' \)  -exec rm {} \;
+	find . -name '.libs' -exec rm -rf {} \;  || echo ".libs deleted already."
+	find test \( -name '*.ps' -o -name '*.pdf' -o -name '*.svg' -o -name '*.png' \
+	       -o -name '*.kmz' \)  -exec rm  {} \;
+	rm -f config.log
+	rm -rf share/magics/ttf src/terralib
+	$(MAKE) -k distclean || echo "Already distcleaned"
+
+override_dh_autoreconf:
+	# remove out of date files
+	rm -f conf/config.guess conf/config.sub
+	libtoolize -c -f
+	dh_autoreconf --as-needed
+
+override_dh_auto_configure:
+	# link for font for tesing.
+	mkdir -p share/fonts/truetype/ttf-dejavu/
+	ln -sf /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf share/fonts/truetype/ttf-dejavu/
+	# Link terralib
+	[ -e src/terralib ] || ln -sf  /usr/include/terralib src/terralib
+	# Now build. LDFLAGS is a nasty hack past libtool breakage in install, where it fails
+	# to find libraries _it_ created. And it makes stuff in the install step. bah.
+	# autoreconf -if
+	dh_auto_configure -- \
+		--enable-bufr --enable-static --enable-cairo --with-emos-libraries=/usr/lib \
+		--enable-python \
+		LDFLAGS="$(LDFLAGS) -L$(shell pwd)/src/.libs -Wl,--as-needed"  LIBS=" -lX11 -lpng12 -lz" \
+		MAGPLUS_HOME=$(shell pwd)
+override_dh_auto_test check:
+	echo "Tests disabled; see README-testfailures.txt for details"
+	# (ulimit -s 8192; export PYTHONPATH=$(shell pwd)/swig ; export MAGPLUS_HOME=$(shell pwd) ; $(MAKE) check )
+	
+override_dh_auto_install:
+	#chrpath -d swig/*.so
+	dh_auto_install
+	# call configure to rebuild swig/Makefile with correct python version.
+	# (cd swig/Magics && ln -sf /usr/share/pyshared/instant/swig/numpy.i )
+	for pyvers in $(shell pyversions -r) ; do \
+                ver=`echo $$pyvers | sed -e 's/python//g' ` ; \
+		dh_auto_configure -- \
+			--enable-bufr --enable-static --enable-cairo --with-emos-libraries=/usr/lib \
+			--enable-python PYTHON=$$pyvers PYTHON_VERSION=$$ver \
+			LDFLAGS="$(LDFLAGS) -L$(shell pwd)/src/.libs -Wl,--as-needed" ; \
+		$(MAKE) -C python/Magics clean install PYTHON_INCLUDE_DIR=/usr/include/$$pyvers \
+			DESTDIR=$(CURDIR)/debian/python-magics++ \
+			MAGPLUS_HOME=$(shell pwd) ; done 
+	$(MAKE) -C tools prefix=$(shell pwd)/debian/tmp/usr install
+	cp tools/mapgen_clip debian/tmp/usr/bin
+	find debian -name '*.la' -delete
+	find debian -name '_Magics.so.0' -delete  # Bogus symlinks
+	# Hack. dh_python2 doesn't know multarch yet.
+	mv debian/python-magics++/usr/lib/${DEB_HOST_MULTIARCH}/p* debian/python-magics++/usr/lib
+	rmdir debian/python-magics++/usr/lib/${DEB_HOST_MULTIARCH}
+	dh_python2 
+	for pyvers in $(shell pyversions -r) ; do \
+    		dh_python2 /usr/lib/$$pyvers/site-packages/Magics ; \
+	done
+	dh_numpy -p python-magics++
+	# remove fonts that are present in dejavu-ttf
+	rm -rf debian/libmagics++-data/usr/share/magics/ttf
+	find debian -name '*.so' -exec chrpath -d {} \;
+	# Deal with links for Multi-Arch:
+	dh_link -p libmagics++-dev /usr/lib/$(DEB_HOST_MULTIARCH)/libMagPlus.so.3.0.0    /usr/lib/$(DEB_HOST_MULTIARCH)/libMagPlus.so
+	dh_link -p libmagplus3     /usr/lib/$(DEB_HOST_MULTIARCH)/libMagPlus.so.3.0.0    /usr/lib/$(DEB_HOST_MULTIARCH)/libMagPlus.so.3
+	mkdir -p debian/libmagics++-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig
+	find debian -name '*.la' -delete 
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/source/options b/debian/source/options
new file mode 100644
index 0000000..b7bc1f2
--- /dev/null
+++ b/debian/source/options
@@ -0,0 +1 @@
+compression = "xz"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/magics.git



More information about the debian-science-commits mailing list