diff -Nru gamera-3.3.2/debian/changelog gamera-3.3.2/debian/changelog --- gamera-3.3.2/debian/changelog 2011-10-17 20:38:38.000000000 +0000 +++ gamera-3.3.2/debian/changelog 2011-12-08 00:08:07.000000000 +0000 @@ -1,9 +1,18 @@ -gamera (3.3.2-1ubuntu1) precise; urgency=low +gamera (3.3.2-2) unstable; urgency=low - * Pre-Depends: dpkg (>= 1.15.6) for xz compression support. Needed until - after Ubuntu 12.04 LTS. + * Use dpkg-buildflags to set CPPFLAGS. + * Move detached debugging symbols to /usr/lib/debug/.build-id/ (using a + dedicated dh_buildid script). + * Add pre-dependency on dpkg >= 1.15.6 (for data.tar.xz support). + * Drop preinst/postrm scripts that were needed to fix #603602. + * Create namespace package ‘gamera.toolkit’. This allows + python-gamera.toolkit.* packages, both those using dh_python2 and those + using python-support, to be co-importable. (namespace-package.diff) + * Fix type mismatch in graph initialization code (hopefully closes: #650520; + graphmodule-fix-type-mismatch.diff). + * Add Built-Using fields to python-gamera and python-gamera-dbg. - -- Colin Watson Mon, 17 Oct 2011 21:38:37 +0100 + -- Jakub Wilk Thu, 08 Dec 2011 01:08:04 +0100 gamera (3.3.2-1) unstable; urgency=low diff -Nru gamera-3.3.2/debian/control gamera-3.3.2/debian/control --- gamera-3.3.2/debian/control 2011-10-17 20:38:35.000000000 +0000 +++ gamera-3.3.2/debian/control 2011-12-07 22:24:44.000000000 +0000 @@ -1,8 +1,7 @@ Source: gamera Section: python Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Jakub Wilk +Maintainer: Jakub Wilk Uploaders: Debian Python Modules Team Vcs-Svn: svn://svn.debian.org/python-modules/packages/gamera/trunk Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/gamera/trunk/ @@ -27,6 +26,7 @@ Replaces: gamera-gui (<< 3.2.3-2~) Recommends: python-wxgtk2.8, python-numpy, python-imaging Suggests: gamera-doc +Built-Using: libvigraimpex (= ${vigra:Version}) Description: framework for building document analysis applications The Gamera framework is a Python library for building custom applications for document analysis and recognition. Additionally, it @@ -44,6 +44,7 @@ Depends: python-gamera (= ${binary:Version}), ${python:Depends}, ${shlibs:Depends}, ${misc:Depends} Recommends: python-dbg Suggests: python-wxgtk2.8-dbg, python-numpy-dbg, python-imaging-dbg +Built-Using: libvigraimpex (= ${vigra:Version}) Description: framework for building document analysis applications (debug symbols) The Gamera framework is a Python library for building custom applications for document analysis and recognition. diff -Nru gamera-3.3.2/debian/copyright gamera-3.3.2/debian/copyright --- gamera-3.3.2/debian/copyright 2011-08-15 21:12:47.000000000 +0000 +++ gamera-3.3.2/debian/copyright 2011-10-21 17:14:28.000000000 +0000 @@ -121,6 +121,10 @@ Copyright: 2009-2011, Jakub Wilk License: GPL-2 +Files: debian/dh_buildid +Copyright: 2011, Jakub Wilk +License: Expat + License: GPL-2 This package is free software; you can redistribute it and/or modify diff -Nru gamera-3.3.2/debian/dh_buildid gamera-3.3.2/debian/dh_buildid --- gamera-3.3.2/debian/dh_buildid 1970-01-01 00:00:00.000000000 +0000 +++ gamera-3.3.2/debian/dh_buildid 2011-11-28 23:31:30.000000000 +0000 @@ -0,0 +1,82 @@ +#!/usr/bin/perl + +# Copyright © 2011 Jakub Wilk +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +=head1 NAME + +dh_buildid - move /usr/lib/debug/* files into build-id locations + +=cut + +use strict; +use warnings; + +use File::Find; +use Debian::Debhelper::Dh_Lib; + +=head1 SYNOPSIS + +B [S>] [B<-X>I] + +=cut + +init(); + +umask 0022; +foreach my $package (@{$dh{DOPACKAGES}}) { + my $debug_root = tmpdir($package) . "/usr/lib/debug"; + my $build_id_root = "$debug_root/.build-id"; + next unless -d $debug_root; + my $wanted = sub { + return unless -f $_; + return if excludefile($_); + my $path = $_; + my $elfnotes = `readelf -n $path`; + my ($build_id_dir, $build_id_path); + if ($elfnotes=~/^\s+Build ID: ([0-9a-f]{2})([0-9a-f]+)$/m) { + $build_id_dir = "$build_id_root/$1"; + $build_id_path = "$build_id_dir/$2.debug" + } else { + # Maybe built with old GCC? Or readelf is too old? Or it's not an ELF + # at all? Anyway, leaving it as it won't hurt. + return; + } + doit('mkdir', '-p', $build_id_dir) + unless -d $build_id_dir; + doit('mv', $path, $build_id_path); + }; + find({wanted => $wanted, no_chdir => 1}, $debug_root); + # Pure empty directories: + doit('find', $debug_root, '-type', 'd', '-empty', '-delete'); +} + +=head1 SEE ALSO + +L + +=head1 AUTHOR + +Jakub Wilk + +=cut + +# vim:ts=4 sw=4 et diff -Nru gamera-3.3.2/debian/patches/graphmodule-fix-type-mismatch.diff gamera-3.3.2/debian/patches/graphmodule-fix-type-mismatch.diff --- gamera-3.3.2/debian/patches/graphmodule-fix-type-mismatch.diff 1970-01-01 00:00:00.000000000 +0000 +++ gamera-3.3.2/debian/patches/graphmodule-fix-type-mismatch.diff 2011-11-30 15:11:49.000000000 +0000 @@ -0,0 +1,29 @@ +Description: Fix type mismatch in graph initialization code. + Fix type mismatch in graph_new() and graph_copy() functions. The ‘i’ format + unit represents an ‘int’, not an ‘unsigned long’. Use the ‘k’ format unit + instead. +Author: Jakub Wilk +Bug-Debian: http://bugs.debian.org/650520 +Forwarded: no +Last-Update: 2011-11-28 + +--- a/src/graph/graphmodule/graphobject.cpp ++++ b/src/graph/graphmodule/graphobject.cpp +@@ -419,7 +419,7 @@ + PyObject* graph_new(PyTypeObject* pytype, PyObject* args, + PyObject* kwds) { + unsigned long flags = FLAG_FREE; +- if (PyArg_ParseTuple(args, CHAR_PTR_CAST "|i:Graph.__init__", &flags) <= 0) ++ if (PyArg_ParseTuple(args, CHAR_PTR_CAST "|k:Graph.__init__", &flags) <= 0) + return NULL; + + return (PyObject*)graph_new(flags); +@@ -479,7 +479,7 @@ + PyObject* graph_copy(PyObject* self, PyObject* args) { + INIT_SELF_GRAPH(); + unsigned long flags = FLAG_FREE; +- if (PyArg_ParseTuple(args, CHAR_PTR_CAST "|i:Graph.copy", &flags) <= 0) ++ if (PyArg_ParseTuple(args, CHAR_PTR_CAST "|k:Graph.copy", &flags) <= 0) + return NULL; + + return (PyObject*)graph_copy(so, flags); diff -Nru gamera-3.3.2/debian/patches/namespace-package.diff gamera-3.3.2/debian/patches/namespace-package.diff --- gamera-3.3.2/debian/patches/namespace-package.diff 1970-01-01 00:00:00.000000000 +0000 +++ gamera-3.3.2/debian/patches/namespace-package.diff 2011-12-08 00:07:32.000000000 +0000 @@ -0,0 +1,18 @@ +Description: Create namespace package ‘gamera.toolkit’. + Create namespace package ‘gamera.toolkit’. This allows python-gamera.toolkit.* + packages, both those using dh_python2 and those using python-support, to be + co-importable. +Author: Jakub Wilk +Forwarded: not-needed +Last-Update: 2011-11-24 + +--- /dev/null ++++ b/gamera/toolkits/__init__.py +@@ -0,0 +1,7 @@ ++import distutils.sysconfig ++import pkgutil ++__path__ = ( ++ pkgutil.extend_path(__path__, __name__) + ++ [distutils.sysconfig.get_python_lib() + '/gamera/toolkits'] ++) ++del distutils, pkgutil diff -Nru gamera-3.3.2/debian/patches/series gamera-3.3.2/debian/patches/series --- gamera-3.3.2/debian/patches/series 2011-08-26 00:00:17.000000000 +0000 +++ gamera-3.3.2/debian/patches/series 2011-11-28 23:12:30.000000000 +0000 @@ -5,3 +5,5 @@ use-system-vigra.diff use-system-python-modules.diff setup-no-import-wx.diff +namespace-package.diff +graphmodule-fix-type-mismatch.diff diff -Nru gamera-3.3.2/debian/python-gamera-dev.postrm gamera-3.3.2/debian/python-gamera-dev.postrm --- gamera-3.3.2/debian/python-gamera-dev.postrm 2010-11-22 16:16:48.000000000 +0000 +++ gamera-3.3.2/debian/python-gamera-dev.postrm 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -#!/bin/sh - -set -e - -# TODO: remove this snippet after Squeeze release - -if [ "$1" = "abort-upgrade" ] -then - # preinst upgrade has just failed; it might have removed some important - # files, so leave the package in the Half-Installed state. - exit 1 -fi - -#DEBHELPER# diff -Nru gamera-3.3.2/debian/python-gamera-dev.preinst gamera-3.3.2/debian/python-gamera-dev.preinst --- gamera-3.3.2/debian/python-gamera-dev.preinst 2010-11-22 16:16:48.000000000 +0000 +++ gamera-3.3.2/debian/python-gamera-dev.preinst 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -#!/bin/sh - -set -e - -# TODO: remove this snippet after Squeeze release - -if [ "$1" = "upgrade" ] -then - # See bug #603602 - rm -Rf /usr/include/python2.*/gamera -fi - -#DEBHELPER# diff -Nru gamera-3.3.2/debian/rules gamera-3.3.2/debian/rules --- gamera-3.3.2/debian/rules 2011-09-15 16:56:32.000000000 +0000 +++ gamera-3.3.2/debian/rules 2011-12-07 22:24:44.000000000 +0000 @@ -3,6 +3,7 @@ export PYTHONWARNINGS=d export CFLAGS = $(shell dpkg-buildflags --get CFLAGS) +export CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) export LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) ifneq ($(filter parallel=%,$(DEB_BUILD_OPTIONS)),) @@ -16,6 +17,7 @@ version = $(shell dpkg-parsechangelog | grep ^Version | cut -d ' ' -f 2) +vigra_version = $(shell dpkg-query -Wf '$${Version}' libvigraimpex-dev | sed -e 's/[+]b[0-9]\+$$//') # build and build-* targets # ========================= @@ -115,10 +117,12 @@ .PHONY: override_dh_strip override_dh_strip: -ifeq ($(filter nostrip,$(DEB_BUILD_OPTIONS)),) dh_strip --dbg-package=python-gamera-dbg - cd debian/*-dbg/usr/lib/debug/usr/lib && mv pyshared pymodules -endif + debian/dh_buildid + +.PHONY: override_dh_gencontrol +override_dh_gencontrol: + dh_gencontrol -- -Vvigra:Version=$(vigra_version) .PHONY: override_dh_builddeb override_dh_builddeb: