debian/0000755000000000000000000000000012023157633007170 5ustar debian/gamera-gui.manpages0000644000000000000000000000002011250262004012701 0ustar doc/manpage/*.1 debian/copyright0000644000000000000000000010167611743061552011140 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: gamera Upstream-Contact: Michael Droettboom, Christoph Dalitz Source: http://gamera.sourceforge.net/ Files: * Copyright: 2001-2011, Christoph Dalitz 2001-2010, Michael Droettboom 2001-2010, Ichiro Fujinaga 2001-2010, Karl MacMillan 2002-2005, Robert Ferguson 2005, Alex Cobb 2005, John Ashley Burgoyne 2007-2010, Robert Butz 2007-2010, Uma Kompella 2007-2009, Rene Baston 2007-2009, Maria Elhachimi 2007-2009, Stefan Ruloff 2007-2009, Ilya Stoyanov 2007-2008, Colin Baumgarten 2009, Jonathan Koch 2010, Hasan Yildiz 2010-2011, Olivier Christen 2010-2011, Tobias Bolten 2011, Christian Brandt 2011, Andreas Leuschner License: GPL-2+ Files: gamera/backport/textwrap.py Comment: Origin: Python standard library Copyright: 1999-2001, Gregory P. Ward 2002-2003, Python Software Foundation License: PSF-2 Files: gamera/backport/ConfigParser.py gamera/backport/sets.py Comment: Origin: Python standard library Copyright: 2002-2004, Python Software Foundation License: PSF-2 Files: gamera/backport/optparse.py Comment: Origin: Python standard library Copyright: 2001-2003, Gregory P. Ward. License: BSD Files: gamera/stats.py gamera/pstat.py gamera/io.py Copyright: 1999-2007, Gary Strangman License: Expat Files: include/vigra/* include/vigra_iterators.hpp Copyright: 1998-2006, Ullrich Köthe 1998-2005, Hans Meine 2001-2002, Gunnar Kedenburg 2003, Christian-Dennis Rahn 2003-2004, Gunnar Kedenburg License: Expat Files: include/boost_limits.hpp Copyright: 1997, Silicon Graphics Computer Systems, Inc. License: other Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Silicon Graphics makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Files: src/ga/* Copyright: 1995-1996, Massachusetts Institute of Technology 1996-1999, Matthew Wall License: other 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: . 1. You may copy and distribute the source code and/or library/executable code for GAlib in any medium provided that you conspicuously and appropriately give credit to the author and keep intact all copyright and disclaimer notices in the library. . 2. Any publications of work based upon experiments that use GAlib must include a suitable acknowledgement of GAlib. A suggested acknowledgement is: "The software for this work used the GAlib genetic algorithm package, written by Matthew Wall at the Massachusetts Institute of Technology." . 3. The author of GAlib and MIT assume absolutely no responsibility for the use or misuse of GAlib. In no event shall the author of GAlib or MIT be liable for any damages resulting from use or performance of GAlib. Files: examples/* Copyright: none License: public-domain Unlike the rest of Gamera, these scripts are provided in the public domain. Files: gamera/pixmaps/img2py.py gamera/pixmaps/img2img.py Comment: Origin: wxPython Copyright: 2002, Total Control Software License: wxWindows-3 Files: gamera/mac/buildpkg.py Copyright: 2002, Dinu C. Gherman License: FreeBSD Files: doc/* Copyright: 2003-2009, Michael Droettboom 2003-2009, Christoph Dalitz License: CC-BY-SA-3.0 Files: debian/* 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 it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991. . This package 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 General Public License for more details. . On Debian systems, the complete text of the GNU General Public License version 2 can be found in the /usr/share/common-licenses/GPL-2 file. License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program 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 General Public License for more details. . On Debian systems, the complete text of the GNU General Public License version 2 can be found in the /usr/share/common-licenses/GPL-2 file. License: wxWindows-3 Copyright (c) 1998 Julian Smart, Robert Roebling et al . Everyone is permitted to copy and distribute verbatim copies of this licence document, but changing it is not allowed. . WXWINDOWS LIBRARY LICENCE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION . This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public Licence as published by the Free Software Foundation; either version 2 of the Licence, 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 Library General Public Licence for more details. . You should have received a copy of the GNU Library General Public Licence along with this software, usually in a file named COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. . EXCEPTION NOTICE . 1. As a special exception, the copyright holders of this library give permission for additional uses of the text contained in this release of the library as licenced under the wxWindows Library Licence, applying either version 3 of the Licence, or (at your option) any later version of the Licence as published by the copyright holders of version 3 of the Licence document. . 2. The exception is that you may use, copy, link, modify and distribute under the user's own terms, binary object code versions of works based on the Library. . 3. If you copy code from files distributed under the terms of the GNU General Public Licence or the GNU Library General Public Licence into a copy of this library, as this licence permits, the exception does not apply to the code that you add in this way. To avoid misleading anyone as to the status of such modified files, you must delete this exception notice from such code and/or adjust the licensing conditions notice accordingly. . 4. If you write modifications of your own for this library, it is your choice whether to permit this exception to apply to your modifications. If you do not wish that, you must delete the exception notice from such code and/or adjust the licensing conditions notice accordingly. License: Expat 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. License: PSF-2 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation. . 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee. . 3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python. . 4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. . 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. . 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. . 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. . 8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement. License: BSD Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: FreeBSD Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: CC-BY-SA-3.0 THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. . BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. . 1. Definitions . a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. . b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License. . c. "Creative Commons Compatible License" means a license that is listed at http://creativecommons.org/compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License, including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works made available under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License. . d. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. . e. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. . f. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. . g. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. . h. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. . i. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. . j. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. . k. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. . 2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. . 3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: . a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; . b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; . c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, . d. to Distribute and Publicly Perform Adaptations. . e. For the avoidance of doubt: . i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; . ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, . iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. . The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. . 4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: . a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(c), as requested. . b. You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of the licenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with the terms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) when You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License. . c. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Ssection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. . d. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. . 5. Representations, Warranties and Disclaimer . UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. . 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. . 7. Termination . a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. . b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. . 8. Miscellaneous . a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. . b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. . c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. . d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. . e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. . f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. debian/gamera-gui.desktop0000644000000000000000000000027211512645371012605 0ustar [Desktop Entry] Version=1.0 Type=Application Name=gamera-gui Icon=gamera-gui GenericName=GUI for the Gamera framework Exec=/usr/bin/gamera_gui %f Terminal=false Categories=Graphics;OCR; debian/run-tests.py0000644000000000000000000000106511743602131011504 0ustar import os import sys from distutils.command.build import build from distutils.core import Distribution build = build(Distribution()) build.finalize_options() sys.path[0:0] = [os.path.abspath(build.build_platlib)] import gamera.paths assert os.path.splitext(gamera.paths.__file__)[0] == os.path.join(sys.path[0], 'gamera', 'paths'), 'Wrong import path: ' + gamera.paths.__file__ os.chdir(os.path.join(os.path.dirname(__file__), '..', 'tests')) gamera.paths.test = os.path.join('..', 'gamera', 'test') sys.argv[1:1] = ['--verbose'] execfile('/usr/bin/nosetests') debian/gamera-gui.docs0000644000000000000000000000003011254656257012064 0ustar README KNOWN_BUGS TODO debian/source/0000755000000000000000000000000011775054121010471 5ustar debian/source/format0000644000000000000000000000001411303776177011710 0ustar 3.0 (quilt) debian/python-gamera-dev.install0000644000000000000000000000003411263570124014103 0ustar usr/include/python*/gamera/ debian/symlink-helper0000755000000000000000000000310011567304024012053 0ustar #!/usr/bin/python import hashlib import os import sys def file_hash(path): hashsum = hashlib.sha256() file = open(path, 'rb') try: hashsum.update(file.read()) finally: file.close() return hashsum.digest() def main(): data = {} if len(sys.argv) != 3: print >>sys.stderr, 'Usage: %s ' sys.exit(1) _, src_dir, dst_dir = sys.argv for root, dirs, files in os.walk(src_dir): for filename in files: path = os.path.join(root, filename) path = os.path.normpath(path) data[file_hash(path)] = path for root, dirs, files in os.walk(dst_dir): for filename in files: if not '_generic' in filename: continue path = os.path.join(root, filename) path = os.path.normpath(path) data[file_hash(path)] = path for root, dirs, files in os.walk(dst_dir): for filename in files: if '_generic' in filename: continue path = os.path.join(root, filename) path = os.path.normpath(path) try: sympath = data[file_hash(path)] except LookupError: pass else: sympath = os.path.join('../' * root.count('/'), sympath) sympath = os.path.normpath(sympath) print >>sys.stderr, 'symlinking %s -> %s' % (path, sympath) os.unlink(path) os.symlink(sympath, path) if __name__ == '__main__': main() # vim:ts=4 sw=4 et debian/changelog0000644000000000000000000002433312023157626011051 0ustar gamera (3.3.3-2ubuntu1) quantal; urgency=low * Build-depend on libtiff-dev rather than libtiff4-dev. -- Colin Watson Sun, 09 Sep 2012 19:27:32 +0100 gamera (3.3.3-2) unstable; urgency=low * DEP-8 tests: use $ADTTMP. * Use rdfind instead of fdupes (closes: #678254). -- Jakub Wilk Wed, 04 Jul 2012 16:50:39 +0200 gamera (3.3.3-1) unstable; urgency=low * New upstream release. + Drop graphmodule-fix-type-mismatch.diff; applied upstream. + Drop gcc-4.7-compat.diff; applied upstream. + Refresh other patches. * Improve DEP-8 tests: + Redirect nosetests output from stderr to stdout. + Copy tests to a temporary directory; remove rw-build-tree restriction. + Rename them, so that they match binary package names. * Fix compatibility with PIL ≥ 1.2. (pil-import.diff) -- Jakub Wilk Wed, 06 Jun 2012 19:37:21 +0200 gamera (3.3.2-3) unstable; urgency=low * Update patch headers. * Set manpage helper executable permissions directly in .debian.tar instead of changing it at build time. * Build -dbg extension modules without optimization. * Bump standards version to 3.9.3. + Update debian/copyright URI. * Build-depend on libpng-dev instead of libpng12-dev (closes: #662340). Thanks to Nobuhiro Iwamatsu for the bug report. * Port the test suite to nose (closes: #664670). + Add patch to fix some incompatibilities. (nosetests.diff) + Build-depend on python-nose instead of python-py. + Update the patch running script. * Cherry-pick upstream patch to fix compatibility with GCC 4.7. (gcc-4.7-compat.diff) * Update the copyright file. * When running tests: + Set sys.path directly in debian/run-tests.py rather than in debian/rules via PYTHONPATH. + Use xargs to iterate over all Python versions. * Run tests in override_dh_auto_test rather than in override_dh_auto_build. * Trap errors from pclose(3) in the test suite. (trap-errors-from-pclose.diff) * Build-depend on procps, as ps(1) is needed for the test suite. * Add DEP-8 tests. -- Jakub Wilk Wed, 18 Apr 2012 21:23:21 +0200 gamera (3.3.2-2) unstable; urgency=low * 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. -- Jakub Wilk Thu, 08 Dec 2011 01:08:04 +0100 gamera (3.3.2-1) unstable; urgency=low * New upstream release. * Export PYTHONWARNINGS=d in debian/rules to enable all warnings in Python code. -- Jakub Wilk Fri, 23 Sep 2011 20:13:36 +0200 gamera (3.3.1-1) unstable; urgency=low * New upstream release. + Drop fix-ftbfs-gcc4.6.diff, applied upstream. * Demote Recommends of the documentation package to Suggests. * Update debian/copyright to the latest DEP-5 version. * Compress binary packages with xz. -- Jakub Wilk Fri, 26 Aug 2011 02:56:11 +0200 gamera (3.3.0-2) unstable; urgency=low * Remove python-stats from Build-Depends (closes: #627726). * Eliminate files with duplicate contents from the documentation package using fdupes and a dedicated script. + Update debian/rules accordingly. + Add fdupes and python (>= 2.5) to Build-Depends-Indep. * Update debian/copyright. -- Jakub Wilk Thu, 26 May 2011 00:58:45 +0200 gamera (3.3.0-1) unstable; urgency=low * New upstream release. + Refresh patches. + Update copyright information. * Use the embedded copy of python-stats again; see bug #620159. -- Jakub Wilk Wed, 04 May 2011 15:35:32 +0200 gamera (3.2.7-3) unstable; urgency=low * Move python-stats from Build-Depends to Build-Depends-Indep. -- Jakub Wilk Sat, 30 Apr 2011 16:57:33 +0200 gamera (3.2.7-2) unstable; urgency=low * Remove io.py, stats.py and pstat.py from the binary package. (Build-)depend on python-stats instead. * Build-depend on python-py (rather than python-codespeak-lib). * Bump standards version to 3.9.2 (no changes needed). * Add a missing include to fix FTBFS with GCC 4.6 (fix-ftbfs-gcc4.6.diff, LP: #770886). -- Jakub Wilk Sat, 30 Apr 2011 13:14:37 +0200 gamera (3.2.7-1) unstable; urgency=low * New upstream release. + Drop fix-memory-leak-to-raw-string.diff, applied upstream. + Refresh other patches. + Don't hardcode Python or wx versions at build time. (setup-no-import-wx.diff) * Strip file extension from icon name in the desktop file (closes: #609570). Thanks to Daniel Stender for the bug report. * Overhaul debian/rules. * Update debian/copyright to the latest DEP-5 version. * Include full text of CC-BY-SA-3.0 in debian/copyright. * Use dpkg-buildflags to set CFLAGS and LDFLAGS. + Build depend on dpkg-dev (>= 1.15.7). * Update patch headers. -- Jakub Wilk Fri, 11 Mar 2011 20:40:45 +0100 gamera (3.2.6-3) unstable; urgency=low * Remove /usr/include/python2.X/gamera in preinst; otherwise dpkg wouldn't replace directories with symlinks or vice-versa (closes: #603602). * Make all /usr/include/python2.X/gamera symlinks to /usr/include/gamera, so that the preinst script could be dropped post-Squeeze. -- Jakub Wilk Mon, 22 Nov 2010 17:31:24 +0100 gamera (3.2.6-2) unstable; urgency=low * Bump standards version to 3.9.1 (no changes needed). * Update patch headers. * Fix memory leak in the _to_raw_string() method (closes: #601597). (fix-memory-leak-to-raw-string.diff) -- Jakub Wilk Sat, 13 Nov 2010 15:19:41 +0100 gamera (3.2.6-1) unstable; urgency=low * New upstream release. + Refresh patches. + Update debian/copyright. * Fix FTBFS with nostrip build option. -- Jakub Wilk Tue, 08 Jun 2010 22:39:54 +0200 gamera (3.2.5-1) unstable; urgency=low * New upstream release: + Drop fix-unaligned-access.diff, tiff-support-64bit.diff, png-support-libpng.diff; all applied upstream. + Refresh the remaining patches. + Update debian/copyright. * Let gamera-dbg only recommend (instead of depending on) python-dbg, as the package can be useful even without the latter. * Move other *-dbg packages from gamera-dbg's Recommends: to Suggests:, as it's unlikely they will be helpful in debugging problems with Gamera. -- Jakub Wilk Wed, 14 Apr 2010 17:35:50 +0200 gamera (3.2.4-2) unstable; urgency=medium * Fix two RC bugs affecting testing (hence urgency=medium): * Link _png_support.so with libpng on all Unix architectures (closes: #570809). (png-support-libpng.diff) * Fix unaligned memory access in the generated C code (closes: #570953). (fix-unaligned-access.diff) * Really remove upstream-applied patches from the source package. * Replace patch fixing TIFF export with the one applied upstream. * Make gamera-gui recommend python-docutils, as it's needed to display context help. * Update debian/copyright. -- Jakub Wilk Wed, 24 Feb 2010 16:47:16 +0100 gamera (3.2.4-1) unstable; urgency=low * New upstream release (closes: #569820). + Enabling “auto-move to next unclassified glyph” no longer triggers IndexError exceptions (closes: #555160). + Drop gui-classifier-glyphs-pane.diff, gui-help-typo.diff, gendoc-source-path.diff, callbackset-unpickle.diff: all applied upstream. + Refresh use-system-modules.diff. * Run tests at build time. + Build-depend on python-codespeak-lib, python-imaging, python-imaging-dbg, python-docutils and python-pygments. + Clean tests/tmp/* files. * Fix TIFF export on 64-bit machines (closes: #570559). -- Jakub Wilk Sun, 21 Feb 2010 11:45:14 +0100 gamera (3.2.3-2) unstable; urgency=low * Provide detached symbols in the *-dbg package. * Switch to source format 3.0 (quilt). * Make python-gamera-dev “Architecture: all”. * Add stricter internel dependencies between python-gamera and python-gamera-dev/gamera-gui. * Update debian/copyright in accordance to the latest DEP-5 version. * Use “XSPV: >= 2.4”, as recent Python Policy frowns on “XSPV: all”. * Move the gamera.gui.has_gui module to the python-gamera package. * Add Debian menu entry. * Add freedesktop.org desktop entry. * Cherry-pick fixes from the upstream VCS: - Work around python-docutils bug, which broke documentation generation (closes: #563139). (gendoc-source-path.diff) - Make gamera.util.CallbackSet objects unpicklable (closes: #555089). - The sets module is deprecated in Python 2.6. Use set objects, rather than sets.Set objects (updated use-system-modules.diff). - Fix a typo in the gamera_gui help text (gui-help-typo.diff). - Fix display of classifier glyphs when adding glyphs to the classifier (closes: #555203). * Bump standards version to 3.8.4 (no changes needed). * Update my e-mail address. * Update dates in debian/copyright. -- Jakub Wilk Sun, 31 Jan 2010 17:54:45 +0100 gamera (3.2.3-1) unstable; urgency=low * Initial release (closes: #269527). * Don't use an embedded copy of the GAlib library (use-system-galib.diff). * Don't use an embedded copy of the VIGRA library (use-system-vigra.diff). * Don't use embedded copies of standard Python modules (use-system-python-modules.diff). * Make plugin/toolkit/test paths compatible with python-support. Fix the documentation generator to look for test files in the build directory. (fix-paths.diff). * Use a prebuilt image for the draw_text plugin documentation example if X server is not available (gendoc-draw-text.diff). -- Jakub Wilk Fri, 09 Oct 2009 21:18:01 +0200 debian/gamera-gui.dirs0000644000000000000000000000002211320143526012056 0ustar usr/share/pixmaps debian/gamera-gui.menu0000644000000000000000000000025411320143526012070 0ustar ?package(gamera-gui):needs="X11" \ section="Applications/Graphics" \ icon="gamera-gui.xpm" \ title="GUI for the Gamera framework" command="/usr/bin/gamera_gui" debian/watch0000644000000000000000000000007311250262004010207 0ustar version=3 http://sf.net/gamera/gamera-([0-9.]+)[.]tar[.]gz debian/patches/0000755000000000000000000000000011775054121010620 5ustar debian/patches/use-system-python-modules.diff0000644000000000000000000001655211743534122016565 0ustar Description: don't use embedded copies of standard Python modules Author: Jakub Wilk Forwarded: no Last-Update: 2012-04-18 --- a/gamera/plugin.py +++ b/gamera/plugin.py @@ -23,7 +23,6 @@ from gamera import paths from gamera import util import new, os, os.path, imp, inspect, sys, copy -from gamera.backport import sets from types import * from enums import * @@ -173,10 +172,10 @@ def methods_flat_category(category, pixel_type=None): if pixel_type == None: - methods = sets.Set() + methods = set() for pixel_type in ALL + [NONIMAGE]: # We have to cast the lists to sets here to make Python 2.3.0 happy. - methods.update(sets.Set(methods_flat_category(category, pixel_type))) + methods.update(set(methods_flat_category(category, pixel_type))) return list(methods) elif plugin_methods.has_key(pixel_type): methods = plugin_methods[pixel_type] --- a/gamera/util.py +++ b/gamera/util.py @@ -27,7 +27,7 @@ from gamera.enums import * from gamera.gui import has_gui from gamera.config import config -from gamera.backport import sets, textwrap +import textwrap config.add_option( "-p", "--progress-bar", action="store_true", @@ -470,9 +470,9 @@ list.extend(self, other) self.trigger_callback('length_change', len(self)) -class CallbackSet(sets.Set, CallbackObject): +class CallbackSet(set, CallbackObject): def __init__(self, initset=None): - sets.Set.__init__(self, initset) + set.__init__(self, initset or ()) CallbackObject.__init__(self) def __del__(self): @@ -488,7 +488,7 @@ def add(self, element): alert = element not in self - sets.Set.add(self, element) + set.add(self, element) if alert: self.trigger_callback('add', [element]) self.trigger_callback('length_change', len(self)) @@ -496,25 +496,25 @@ def remove(self, element): alert = element in self - sets.Set.remove(self, element) + set.remove(self, element) if alert: self.trigger_callback('remove', [element]) self.trigger_callback('length_change', len(self)) def discard(self, element): if element in self: - sets.Set.remove(self, element) + set.remove(self, element) self.trigger_callback('remove', [element]) self.trigger_callback('length_change', len(self)) def pop(self): - result = sets.Set.pop(self) + result = set.pop(self) self.trigger_callback('remove', [result]) self.trigger_callback('length_change', len(self)) def clear(self): self.trigger_callback('remove', self) - sets.Set.clear(self) + set.clear(self) self.trigger_callback('length_change', len(self)) def update(self, iterable): @@ -523,7 +523,7 @@ if i not in self: yield i self.trigger_callback('add', iter()) - sets.Set.update(self, iterable) + set.update(self, iterable) self.trigger_callback('length_change', len(self)) def difference_update(self, iterable): @@ -532,7 +532,7 @@ if i in self: yield i self.trigger_callback('remove', iter()) - sets.Set.difference_update(self, iterable) + set.difference_update(self, iterable) self.trigger_callback('length_change', len(self)) def symmetric_difference_update(self, iterable): @@ -546,7 +546,7 @@ yield i self.trigger_callback('remove', remove_iter()) self.trigger_callback('add', add_iter()) - sets.Set.symmetric_difference_update(self, iterable) + set.symmetric_difference_update(self, iterable) self.trigger_callback('length_change', len(self)) def intersection_update(self, iterable): @@ -555,7 +555,7 @@ if not i in iterable: yield i self.trigger_callback('remove', iter()) - sets.Set.intersection_update(self, iterable) + set.intersection_update(self, iterable) self.trigger_callback('length_change', len(self)) def union_update(self, other): @@ -566,20 +566,19 @@ def __setstate__(self, data): CallbackObject.__init__(self) self.trigger_callback('remove', self) - sets.Set.__setstate__(self, data) + set.__setstate__(self, data) self.trigger_callback('add', self) self.trigger_callback('length_change', len(self)) def get_file_extensions(mode): from gamera import plugin import os.path - from gamera.backport import sets methods = plugin.methods_flat_category("File") methods = [y for x, y in methods if x.startswith(mode) and not x.endswith("image")] if len(methods) == 0: raise RuntimeError("There don't seem to be any imported plugins that can %s files. Try running init_gamera() or explictly loading file i/o plugins such as tiff_support and png_support." % mode) - extensions = sets.Set() + extensions = set() types = [] for method in methods: wildcards = ";".join(["*.%s;*.%s" % @@ -587,8 +586,8 @@ type = "%s Files (%s)|%s" % (method.exts[0].upper(), wildcards, wildcards) types.append(type) # We have to cast the lists to sets here to make Python 2.3.0 happy. - extensions.update(sets.Set(method.exts)) - extensions.update(sets.Set([x.upper() for x in method.exts])) + extensions.update(set(method.exts)) + extensions.update(set([x.upper() for x in method.exts])) all_extensions = ";".join(["*.%s" % x for x in extensions]) types.insert(0, "All images (%s)|%s" % (all_extensions, all_extensions)) types.append("All files (*.*)|*.*") --- a/gamera/stats.py +++ b/gamera/stats.py @@ -3063,9 +3063,8 @@ Usage: dices(x,y) """ - import sets - x = sets.Set(x) - y = sets.Set(y) + x = set(x) + y = set(y) common = len(x.intersection(y)) total = float(len(x) + len(y)) return 2*common/total --- a/gamera/classify.py +++ b/gamera/classify.py @@ -758,7 +758,7 @@ raise ClassifierError("Grouping of only a single glyph is not allowed.") added = [] - removed = util.sets.Set() + removed = set() for glyph in glyphs: for child in glyph.children_images: removed.add(child) --- a/gamera/gui/classifier_display.py +++ b/gamera/gui/classifier_display.py @@ -318,7 +318,7 @@ (-1,0), (0,-1), (1,0), (0,1), # + (-1,-1), (-1,1), (1,-1), (1,1)) # x def find_glyphs_in_rect(self, x1, y1, x2, y2, shift): - matches = util.sets.Set() + matches = set() if x1 == x2 or y1 == y2: point = Point(x1, y1) for i, g in enumerate(self.sorted_glyphs): @@ -336,7 +336,7 @@ matches.add(i) first = True if shift: - selected = util.sets.Set() + selected = set() for i in self.GetSelectedIndices(): selected.add(i) new_matches = matches.symmetric_difference(selected) @@ -995,7 +995,7 @@ if directory == None: gui_util.message("You must provide a directory to load.") return - error_messages = util.sets.Set() + error_messages = set() if settings: try: self._SaveClassifierSettings( @@ -1094,7 +1094,7 @@ self._save_by_criteria_dialog = results - glyphs = util.sets.Set() + glyphs = set() if classifier: glyphs.update(self._classifier.get_glyphs()) if page: debian/patches/trap-errors-from-pclose.diff0000644000000000000000000000066411743534122016163 0ustar Description: trap errors from pclose(3) Author: Jakub Wilk Forwarded: no Last-Update: 2012-04-18 --- a/tests/test_graph.py +++ b/tests/test_graph.py @@ -935,7 +935,8 @@ cmd = "ps u -p %i | awk '{sum=sum+$6}; END {print sum}'" % os.getpid() p = os.popen(cmd, "r") memory = p.readline().strip() - p.close() + if p.close() is not None: + raise OSError return memory debian/patches/series0000644000000000000000000000036511760226330012036 0ustar gendoc-use-wxversion.diff gendoc-draw-text.diff fix-paths.diff use-system-galib.diff use-system-vigra.diff use-system-python-modules.diff setup-no-import-wx.diff namespace-package.diff nosetests.diff trap-errors-from-pclose.diff pil-import.diff debian/patches/pil-import.diff0000644000000000000000000000067411760415563013562 0ustar Description: fix compatibility with PIL ≥ 1.2 Author: Jakub Wilk Forwarded: http://mail.python.org/pipermail/image-sig/2011-January/006650.html Last-Update: 2012-05-26 --- a/gamera/plugins/pil_io.py +++ b/gamera/plugins/pil_io.py @@ -22,7 +22,7 @@ from gamera import config try: - import Image as PIL + from PIL import Image as PIL except ImportError: try: verbose = config.get("verbosity_level") debian/patches/gendoc-draw-text.diff0000644000000000000000000001353511743534122014634 0ustar Description: use pre-built image for draw_text plugin Use a pre-built image for the draw_text plugin documentation example if X server is not available. Author: Jakub Wilk Forwarded: not-needed Last-Update: 2012-04-18 --- a/doc/gendoc.py +++ b/doc/gendoc.py @@ -5,6 +5,8 @@ import wxversion wxversion.select(["2.8", "2.6", "2.5", "2.4"]) +import draw_text_helper + if __name__ == "__main__": core.init_gamera() gendoc.gendoc(classes=[ --- /dev/null +++ b/doc/draw_text_helper.py @@ -0,0 +1,46 @@ +#!/usr/bin/python + +# This script (including the following line) was generated by running itself: +DATA = 320, 300, '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' + +import sys +import os +import bz2 +import base64 + +from gamera.core import init_gamera, Point, Dim, RGB, DENSE +from gamera import plugin +from gamera.plugins.draw import draw_text +from gamera.plugins.string_io import _from_raw_string + +sys.stdout = file(os.devnull, 'w') +init_gamera() +sys.stdout = sys.__stdout__ + +if __name__ == '__main__': + if not os.getenv('DISPLAY'): + print >>sys.stderr, 'This script needs access to an X server' + sys.exit(1) + import wxversion + wxversion.select(['2.8', '2.6', '2.5', '2.4']) + image = draw_text().__doc_example1__() + raw_string = image._to_raw_string() + bz2_string = bz2.compress(raw_string) + base64_string = base64.b64encode(bz2_string) + for line in open(__file__, 'rt'): + if line.startswith('DATA = '): + sys.stdout.write('DATA = %d, %d, %r\n' % (image.dim.ncols, image.dim.nrows, base64_string)) + else: + sys.stdout.write(line) + sys.exit(0) + +if not os.getenv('DISPLAY'): + ncols, nrows, base64_string = DATA + bz2_string = base64.decodestring(base64_string) + raw_string = bz2.decompress(bz2_string) + image = _from_raw_string(Point(0, 0), Dim(ncols, nrows), RGB, DENSE, raw_string) + def static_draw_text_example(self, image=image): + return image + plugin.plugin_methods[RGB]['Draw']['draw_text'].doc_examples = [static_draw_text_example] + +# vim:ts=4 sw=4 noet debian/patches/use-system-galib.diff0000644000000000000000000000455311760165576014666 0ustar Description: don't use the embedded copy of the GAlib library Use the system-wide GAlib library, rather than the copy embedded in Gamera source tarball. See also Debian bug #544693. Author: Jakub Wilk Forwarded: not-needed Last-Update: 2012-04-18 --- a/gamera/gamera_setup.py +++ b/gamera/gamera_setup.py @@ -87,7 +87,7 @@ if macosversion.startswith("10.6"): extras['extra_link_args'].append('-L/Developer/SDKs/MacOSX10.5.sdk/usr/lib') elif '--compiler=mingw32' in sys.argv or not sys.platform == 'win32': - extras['libraries'] = ['stdc++'] # Not for intel compiler + extras['libraries'] = ['stdc++', 'ga'] # Not for intel compiler # Check that we are running a recent enough version of Python. # This depends on the platform. --- a/setup.py +++ b/setup.py @@ -122,8 +122,7 @@ ######################################## # Non-plugin extensions -ga_files = glob.glob("src/ga/*.cpp") -ga_files.append("src/knncoremodule.cpp") +ga_files = ["src/knncoremodule.cpp"] graph_files = glob.glob("src/graph/*.cpp") + glob.glob("src/graph/graphmodule/*.cpp") kdtree_files = ["src/kdtreemodule.cpp", "src/geostructs/kdtree.cpp"] @@ -146,7 +145,7 @@ **gamera_setup.extras ), Extension("gamera.knncore", ga_files, - include_dirs=["include", "src/ga", "src"], + include_dirs=["include", "src"], **gamera_setup.extras), Extension("gamera.graph", graph_files, include_dirs=["include", "src", "include/graph", "src/graph/graphmodule"], --- a/src/knncoremodule.cpp +++ b/src/knncoremodule.cpp @@ -34,10 +34,11 @@ #include #include // for ga optimization +#include +#undef GALIB_USE_COMP_OPERATOR_TEMPLATES #include #include #include -#include // for rand #include #include @@ -1527,7 +1528,7 @@ GA1DArrayGenome & genome = (GA1DArrayGenome &)g; KnnObject* knn = (KnnObject*)genome.userData(); - std::pair ans = leave_one_out(knn, std::numeric_limits::max(), genome()); + std::pair ans = leave_one_out(knn, std::numeric_limits::max(), static_cast(genome)); return (float)ans.first / ans.second; } debian/patches/fix-paths.diff0000644000000000000000000000300411743534122013351 0ustar Description: make plugin/toolkit/test paths compatible with python-support Fix documentation generator to look for test files in the build directory. Author: Jakub Wilk Forwarded: not-needed Last-Update: 2010-09-02 --- a/doc/gendoc.py +++ b/doc/gendoc.py @@ -7,6 +7,12 @@ import draw_text_helper +import sys +import os +import gamera.paths + +gamera.paths.test = os.path.join(os.path.dirname(__file__), '..', 'gamera', 'test') + if __name__ == "__main__": core.init_gamera() gendoc.gendoc(classes=[ --- a/gamera/paths.py +++ b/gamera/paths.py @@ -22,11 +22,7 @@ from __future__ import generators import os, sys, dircache, glob, imp # Python standard library -if 1: - def dummy(): - pass - -lib = os.path.dirname(os.path.realpath(dummy.func_code.co_filename)) +lib = os.path.dirname(__file__) lib_gui = os.path.realpath(os.path.join(lib, "gui")) # Figure out if we are in the source directory or installed plugins = os.path.realpath(os.path.join(lib, "plugins")) @@ -34,11 +30,13 @@ sys.path.append(plugins) plugins_src = "" toolkits = os.path.realpath(os.path.join(lib, "toolkits")) -test = os.path.realpath(os.path.join(lib, "test")) -test_results = os.path.realpath(os.path.join(lib, "test/results")) +test = '/usr/share/gamera/test/' +test_results = os.path.join(test, 'results') def get_toolkit_names(dir): toolkits = [] + if not os.path.exists(dir): + return toolkits listing = dircache.listdir(dir) dircache.annotate(dir, listing) for toolkit in listing: debian/patches/setup-no-import-wx.diff0000644000000000000000000000204611743534122015171 0ustar Description: don't hardcode Python or wx versions at build time Author: Jakub Wilk Forwarded: not-needed Last-Update: 2012-04-18 --- a/setup.py +++ b/setup.py @@ -158,15 +158,9 @@ ########################################## # Here's the basic distutils stuff -# read versions from compile computer -pythonversion = "%d.%d" % (sys.version_info[0],sys.version_info[1]) -import wx -wx_version_info = wx.__version__.split(".") -wxversion = "%s.%s" % (wx_version_info[0],wx_version_info[1]) -description = ("This is the Gamera installer.\n" + \ - "\tPlease ensure that Python " + pythonversion + \ - " and wxPython " + wxversion + "\n" + \ - "\tare installed before proceeding.") +description = ("This is the Gamera installer. " + + "Please ensure that Python 2.4 and wxPython 2.6.x " + + "(or later) are installed before proceeding.") includes = [(os.path.join(gamera_setup.include_path, path), glob.glob(os.path.join("include", os.path.join(path, ext)))) debian/patches/use-system-vigra.diff0000644000000000000000000000061311743534122014675 0ustar Description: don't use an embedded copy of the VIGRA library Author: Jakub Wilk Forwarded: not-needed Last-Update: 2012-04-18 --- a/setup.py +++ b/setup.py @@ -173,7 +173,6 @@ for path, ext in ("", "*.hpp"), ("plugins", "*.hpp"), - ("vigra", "*.hxx"), ("geostructs", "*.hpp"), ("graph", "*.hpp")] debian/patches/gendoc-use-wxversion.diff0000644000000000000000000000100311743534122015536 0ustar Description: documentation generator: prefer wxPython 2.8 Make the documentation generator prefer wxPython 2.8 over other versions. This patch is intended to alleviate Debian bug #451104. Author: Jakub Wilk Forwarded: not-needed Last-Update: 2012-04-18 --- a/doc/gendoc.py +++ b/doc/gendoc.py @@ -2,6 +2,9 @@ from gamera import core, gendoc +import wxversion +wxversion.select(["2.8", "2.6", "2.5", "2.4"]) + if __name__ == "__main__": core.init_gamera() gendoc.gendoc(classes=[ debian/patches/namespace-package.diff0000644000000000000000000000110611743534122014774 0ustar 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: 2012-04-18 --- /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 debian/patches/nosetests.diff0000644000000000000000000000370411743055564013514 0ustar Description: port the test suite to nose Author: Jakub Wilk Bug-Debian: http://bugs.debian.org/664670 Forwarded: not-needed Last-Update: 2012-04-16 --- a/tests/test_graph.py +++ b/tests/test_graph.py @@ -1082,7 +1082,9 @@ #small tests for test in tests_small: for flag in flags: - setattr(TestGraph, "test_small_%d_%s" % (flag, test.__name__ ), _make_test(test,flag)) + f = _make_test(test,flag) + f.__name__ = "test_small_%d_%s" % (flag, test.__name__) + setattr(TestGraph, f.__name__, f) #large default #for test in tests_large: @@ -1093,10 +1095,10 @@ for size in [512]: for test in tests_large: for flag in flags: - setattr(TestGraph, "test_large_%d_%d_%s" % (flag, size, test.__name__ ), - _make_test_size(test, flag, size)) - - + f = _make_test_size(test, flag, size) + f.__name__ = "test_large_%d_%d_%s" % (flag, size, test.__name__) + setattr(TestGraph, f.__name__, f) +del f, test --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -22,4 +22,9 @@ tester = PluginTester() for name, method in tester.methods: - setattr(TestPlugins, "test_plugin_" + name, make_test(tester, method)) + f = make_test(tester, method) + f.__name__ = "test_plugin_" + name + setattr(TestPlugins, f.__name__, f) +del f + +del make_test --- a/tests/test_image.py +++ b/tests/test_image.py @@ -20,6 +20,7 @@ (GREY16, xrange((2 ** 16) - 1))]: inner(type, value, DENSE) inner(ONEBIT, xrange(0, 2 ** 16 - 1), RLE) + test.__name__ = inner.__name__.lstrip('_') return test def _test_image_constructors(type, value, storage): @@ -150,3 +151,5 @@ assert tmp.get((0,0)) == 0 assert tmp.get((5,5)) == 85 assert tmp.get((9,9)) == 255 + +del make_test --- /dev/null +++ b/tests/py/test.py @@ -0,0 +1 @@ +from nose.tools import assert_raises as raises --- /dev/null +++ b/tests/py/__init__.py @@ -0,0 +1 @@ +# debian/python-gamera-doc.examples0000644000000000000000000000001311250262004014226 0ustar examples/* debian/gamera-gui.install0000644000000000000000000000015411320143526012571 0ustar usr/lib/python*/*-packages/gamera/gui/ usr/bin/gamera_gui debian/gamera-gui.desktop usr/share/applications/ debian/python-gamera.install0000644000000000000000000000070411316767334013345 0ustar usr/lib/python*/*-packages/gamera/gui/__init__.py usr/lib/python*/*-packages/gamera/gui/has_gui.py usr/lib/python*/*-packages/gamera/backport/config.py usr/lib/python*/*-packages/gamera/plugins/*[a-z][a-z].so usr/lib/python*/*-packages/gamera/plugins/*.py usr/lib/python*/*-packages/gamera/toolkits/ usr/lib/python*/*-packages/gamera/*[a-z][a-z].so usr/lib/python*/*-packages/gamera/*.py usr/lib/python*/*-packages/gamera/test/* usr/share/gamera/test/ debian/gamera-doc.links0000644000000000000000000000007211250262004012216 0ustar usr/share/doc/gamera-doc/src usr/share/doc/gamera-doc/rst debian/dh_buildid0000755000000000000000000000472611665014722011220 0ustar #!/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 debian/python-gamera-dbg.install0000644000000000000000000000012411256142235014061 0ustar usr/lib/python*/*-packages/gamera/*/*_d.so usr/lib/python*/*-packages/gamera/*_d.so debian/manpage-helper-20000755000000000000000000000020111743612224012133 0ustar #!/bin/sh exec python ./manpage-helper-1 "$@" \ | sed -e 's/^usage/Usage/; s/^options/Options/; s/manpage-helper-1/gamera_gui/g' debian/control0000644000000000000000000000710412023157612010572 0ustar Source: gamera Section: python Priority: optional Maintainer: Ubuntu Developers XSBC-Original-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/ Build-Depends: debhelper (>= 7.3.5~), dpkg-dev (>= 1.15.7~), python-support (>= 0.90), python-all-dev, python-all-dbg, python-nose, procps, python-docutils, python-pygments, python-imaging, python-imaging-dbg, libtiff-dev, libpng-dev, libvigraimpex-dev (>= 1.6.0-1~), libga-dev Build-Depends-Indep: python-numpy, python-wxgtk2.8, help2man, netpbm, python (>= 2.5), rdfind XS-Python-Version: >= 2.4 Standards-Version: 3.9.3 Homepage: http://gamera.sourceforge.net/ Package: python-gamera Architecture: any Pre-Depends: dpkg (>= 1.15.6) Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends} 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 allows for custom extensions. . Gamera can be used for a wide variety of tasks, from building complete image recognition systems down to implementing and evaluating particular algorithms for image processing or document layout analysis. Package: python-gamera-dbg Section: debug Priority: extra Architecture: any Pre-Depends: dpkg (>= 1.15.6) 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. . This package contains Gamera extension modules built for the Python debug interpreter. Package: python-gamera-dev Architecture: all Pre-Depends: dpkg (>= 1.15.6) Depends: python-dev, libvigraimpex-dev, ${misc:Depends} Recommends: python-all-dev, python-gamera (>= ${source:Version}), python-gamera (<= ${source:Version}.0~) Description: framework for building document analysis applications (header files) The Gamera framework is a Python library for building custom applications for document analysis and recognition. . This package contains header files that might be required to build extra C/C++ extension modules for Gamera. Package: gamera-gui Architecture: all Pre-Depends: dpkg (>= 1.15.6) Depends: python, ${python:Depends}, python-gamera (>= ${source:Version}), python-gamera (<= ${source:Version}.0~), python-wxgtk2.8, ${misc:Depends} Recommends: python-matplotlib, python-docutils Suggests: gamera-doc Description: GUI for the Gamera framework The Gamera framework is a Python library for building custom applications for document analysis and recognition. . This package contains GUI for Gamera. Package: gamera-doc Section: doc Architecture: all Pre-Depends: dpkg (>= 1.15.6) Depends: ${misc:Depends} Suggests: python-gamera, gamera-gui Description: documentation for the Gamera framework The Gamera framework is a Python library for building custom applications for document analysis and recognition. . This package contains documentation for Gamera. debian/python-gamera.docs0000644000000000000000000000003011254656257012621 0ustar README KNOWN_BUGS TODO debian/gamera-doc.doc-base0000644000000000000000000000060211263706231012563 0ustar Document: gamera-3-documentation Title: Gamera 3.x documentation Author: Michael Droettboom, Christoph Dalitz Section: Programming Format: HTML Index: /usr/share/doc/gamera-doc/html/index.html Files: /usr/share/doc/gamera-doc/html/*.html Format: Text Index: /usr/share/doc/gamera-doc/rst/index.txt.gz Files: /usr/share/doc/gamera-doc/rst/*.txt /usr/share/doc/gamera-doc/rst/*.txt.gz debian/gamera-doc.docs0000644000000000000000000000005311254656257012052 0ustar doc/html/ doc/src/ README KNOWN_BUGS TODO debian/rules0000755000000000000000000000772511775054043010267 0ustar #!/usr/bin/make -f export PYTHONWARNINGS=d export CFLAGS = $(shell dpkg-buildflags --get CFLAGS) export CFLAGS_noopt = $(patsubst -O%,-O0,$(CFLAGS)) export CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) export LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) ifneq ($(filter parallel=%,$(DEB_BUILD_OPTIONS)),) makeflags = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) endif python_all = pyversions -r | tr ' ' '\n' | sed -e 'p; s/$$/-dbg/' | xargs -t -I {} env {} pythonpath = $$(_py_=$(strip $(1)); _py_=$${_py_\#python}; ls -d $(CURDIR)/build/lib.*-$${_py_}) default_pythonpath = $(call pythonpath,$(shell pyversions -d)) 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 # ========================= .PHONY: build build-arch build-indep build: build-arch build-indep build-arch: dh build build-indep: # Nothing to do in build-indep, "thanks" to bug #374029. .PHONY: override_dh_auto_build override_dh_auto_build: rm -Rf include/zlib*/ src/zlib*/ src/libpng*/ src/libtiff*/ rm -Rf include/vigra/ rm -Rf src/ga/ $(MAKE) -f debian/rules $(makeflags) build/stamp .PHONY: override_dh_auto_test override_dh_auto_test: ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) $(python_all) debian/run-tests.py endif build/stamp: $(patsubst %,build/stamp-python%,$(shell pyversions -rv)) build/stamp: $(patsubst %,build/stamp-python%-dbg,$(shell pyversions -rv)) build/stamp: touch $(@) build/stamp-python%: python$(*) setup.py build touch $(@) build/stamp-python%-dbg: CFLAGS="$$CFLAGS_noopt" python$(*)-dbg setup.py build touch $(@) # binary and binary-* targets # =========================== .PHONY: binary binary-arch binary-indep binary binary-arch binary-indep: dh $(@) .PHONY: override_dh_installman ifneq ($(shell dh_listpackages | grep -x -F gamera-gui),) override_dh_installman: doc/manpage/gamera_gui.1 dh_installman endif .PHONY: override_dh_installdocs override_dh_installdocs: doc/stamp dh_installdocs ifneq ($(shell dh_listpackages | grep -x -F gamera-doc),) cd debian/gamera-doc/usr/share/doc/gamera-doc/html/ && \ $(CURDIR)/debian/symlink-helper ../src/ . && \ rdfind -makehardlinks true -makeresultsfile false . endif doc/manpage/gamera_gui.1: build/stamp mkdir -p doc/manpage/ ln -sf $(CURDIR)/debian/manpage-helper-1 doc/manpage/ ln -sf $(CURDIR)/debian/manpage-helper-2 doc/manpage/gamera_gui cd doc/manpage/ && \ PYTHONPATH=$(default_pythonpath) \ help2man --version-string=$(version) --name='GUI for the Gamera framework' --no-info ./gamera_gui > gamera_gui.1 doc/stamp: build/stamp ifneq ($(shell dh_listpackages | grep -x -F gamera-doc),) cd doc && PYTHONPATH=$(default_pythonpath) python gendoc.py endif touch $(@) .PHONY: override_dh_install override_dh_install: dh_install ifneq ($(shell dh_listpackages | grep -x -F gamera-gui),) find debian/gamera-gui/ -name has_gui.py -delete pngtopnm < gamera/pixmaps/icon.png | ppmtoxpm > debian/gamera-gui/usr/share/pixmaps/gamera-gui.xpm endif .PHONY: override_dh_link override_dh_link: ifneq ($(shell dh_listpackages | grep -x -F python-gamera-dev),) set -e; cd debian/python-gamera-dev/usr/include/; \ mv $(shell pyversions -d)/gamera .; \ rm -Rf python2.*/; \ for version in $(shell pyversions -r); do \ for suffix in "" _d; do \ mkdir -p $$version$$suffix; \ ln -sf ../gamera $$version$$suffix/gamera; \ done; \ done endif dh_link .PHONY: override_dh_strip override_dh_strip: dh_strip --dbg-package=python-gamera-dbg debian/dh_buildid .PHONY: override_dh_gencontrol override_dh_gencontrol: dh_gencontrol -- -Vvigra:Version=$(vigra_version) .PHONY: override_dh_builddeb override_dh_builddeb: dh_builddeb -- -Zxz # clean target # ============ .PHONY: clean clean: dh clean .PHONY: override_dh_auto_clean override_dh_auto_clean: dh_auto_clean rm -Rf doc/html/images/ rm -Rf doc/manpage/ rm -Rf build/ # vim:ts=4 sw=4 noet debian/manpage-helper-10000644000000000000000000000014511250262004012124 0ustar import sys import gamera.gui.gui import gamera.config gamera.config.config.parse_args(sys.argv[1:]) debian/compat0000644000000000000000000000000211250262004010354 0ustar 7 debian/clean0000644000000000000000000000135111340031676010174 0ustar doc/html/*.css doc/html/*.html doc/src/analysis.txt doc/src/binarization.txt doc/src/classes.txt doc/src/classification.txt doc/src/color.txt doc/src/combine.txt doc/src/conversion.txt doc/src/convolution.txt doc/src/corelation.txt doc/src/deformations.txt doc/src/displaying.txt doc/src/draw.txt doc/src/edge.txt doc/src/externallibraries.txt doc/src/features.txt doc/src/file.txt doc/src/filter.txt doc/src/gamera.core.*.txt doc/src/list.txt doc/src/morphology.txt doc/src/pagesegmentation.txt doc/src/plugins.txt doc/src/relational.txt doc/src/runlength.txt doc/src/segmentation.txt doc/src/shearing.txt doc/src/thresholding.txt doc/src/utility.txt doc/src/xml.txt doc/stamp gamera/__version__.py gamera/plugins/_*.cpp gamera_gui tests/tmp/* debian/tests/0000755000000000000000000000000011775054121010333 5ustar debian/tests/python-gamera-dbg0000755000000000000000000000035411772545166013603 0ustar #!/bin/sh set -e -u cp -a tests/ "$ADTTMP" cd "$ADTTMP/tests/" export PYTHONWARNINGS=d pyversions -i \ | tr ' ' '\n' \ | sed -e 's/$/-dbg/' \ | (cd /usr/bin/ && xargs -n1 ls) \ | xargs -I {} env {} \ /usr/bin/nosetests --verbose 2>&1 debian/tests/python-gamera0000755000000000000000000000026211772545166013047 0ustar #!/bin/sh set -e -u cp -a tests/ "$ADTTMP" cd "$ADTTMP/tests/" export PYTHONWARNINGS=d pyversions -i \ | tr ' ' '\n' \ | xargs -I {} env {} \ /usr/bin/nosetests --verbose 2>&1 debian/tests/control0000644000000000000000000000042211760164374011742 0ustar Tests: python-gamera Features: no-build-needed Depends: python-nose, python-gamera, python-docutils, python-pygments Tests: python-gamera-dbg Features: no-build-needed Depends: python-nose, python-dbg, python-gamera, python-gamera-dbg, python-docutils, python-pygments