--- pygdchart2-0.beta1.orig/_gdchartc.c +++ pygdchart2-0.beta1/_gdchartc.c @@ -28,11 +28,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "Python.h" + #include #include #include -#include "Python.h" #include "gdchart.h" #include "gdcpie.h" #include "gdc.h" @@ -706,22 +707,22 @@ return NULL; } for (i = 0; i < len; i++){ + char * cstr = NULL; pobj = PySequence_GetItem(lst, i); pstr = PyObject_Str(pobj); Py_DECREF(pobj); if (pstr == NULL) goto cleanup; - slen = PyString_Size(pstr); - if (slen == NULL) + cstr = PyString_AsString(pstr); + mem = strdup(cstr ? cstr : ""); + strings[i] = mem; + Py_DECREF(pstr); + if (!cstr) goto cleanup; - mem = malloc((size_t)slen+1); if (mem == NULL){ PyErr_NoMemory(); goto cleanup; } - strcpy(mem, PyString_AsString(pstr)); - Py_DECREF(pstr); - strings[i] = mem; } return strings; --- pygdchart2-0.beta1.orig/debian/README.Debian +++ pygdchart2-0.beta1/debian/README.Debian @@ -0,0 +1,9 @@ +This package depends on GD. GD is packaged with and without support for +XPM (X Pixmap), and this package favors the non-xpm one, because often +it is used for web applications that do not need the burden of the X +libraries. + +If you want/need/expected support for XPM then make sure to explicitly +install the xpm variant of the GD libraries. + + - Jonas Smedegaard, Wed, 9 Oct 2002 07:13:40 +0200 --- pygdchart2-0.beta1.orig/debian/cdbs/1/rules/buildinfo.mk +++ pygdchart2-0.beta1/debian/cdbs/1/rules/buildinfo.mk @@ -0,0 +1,42 @@ +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2004 Jonas Smedegaard +# Description: Generate and include build information +# +# 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, 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +# 02111-1307 USA. + + +ifndef _cdbs_bootstrap +_cdbs_scripts_path ?= /usr/lib/cdbs +_cdbs_rules_path ?= /usr/share/cdbs/1/rules +_cdbs_class_path ?= /usr/share/cdbs/1/class +endif + +ifndef _cdbs_class_buildinfo +_cdbs_class_buildinfo := 1 + +include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), dh-buildinfo + +common-install-arch common-install-indep:: debian/stamp-buildinfo + +debian/stamp-buildinfo: + dh_buildinfo + +clean:: + rm -f debian/stamp-buildinfo + +endif --- pygdchart2-0.beta1.orig/debian/changelog +++ pygdchart2-0.beta1/debian/changelog @@ -0,0 +1,103 @@ +pygdchart2 (0.beta1-3.8) unstable; urgency=medium + + * Non-maintainer upload. + * Run wrap-and-sort. + * debian/control: changed build dependency 'libgd2-noxpm-dev | libgd2-xpm-dev' + to libgd-dev, avoiding a FTBFS. Thanks to Adrian Bunk . + (Closes: #880780) + + -- Joao Eriberto Mota Filho Tue, 11 Dec 2018 12:27:18 -0200 + +pygdchart2 (0.beta1-3.7) unstable; urgency=medium + + * Non-maintainer upload. + * Bumped DH level to 10. (Closes: #817637) + * debian/control: bumped Standards-Version to 3.9.8. + + -- Joao Eriberto Mota Filho Thu, 22 Dec 2016 20:02:15 -0200 + +pygdchart2 (0.beta1-3.6) unstable; urgency=medium + + * Non-maintainer upload. + * Fix string size allocation error, thanks Kees Cook (Closes: #301563). + + -- Graham Inggs Mon, 18 Jan 2016 13:06:25 +0200 + +pygdchart2 (0.beta1-3.5) unstable; urgency=medium + + * Non-maintainer upload. + * Port to dh-python2. Closes: #786197 + * Add dependency on ${misc:Depends} to python-gdchart2-doc. + + -- Mattia Rizzolo Sat, 12 Dec 2015 18:23:39 +0000 + +pygdchart2 (0.beta1-3.4) unstable; urgency=low + + * Non-maintainer upload. + * Add support for python2.5 (Closes: #433598) + * Fix error with lookup options (Closes: #358446) + * Fix error with using labels longer than 11 chars (Closes: #412434, #424061) + * Remove a useless debhelper Build-Dep + + -- Julien Danjou Wed, 18 Jul 2007 12:20:19 +0200 + +pygdchart2 (0.beta1-3.3) unstable; urgency=high + + * Non-maintainer upload. + * High-urgency upload for RC bugfix, python transition. + * Remove a duplicate Depends: line, overlooked in the previous upload. + + -- Steve Langasek Wed, 30 Aug 2006 15:51:19 -0700 + +pygdchart2 (0.beta1-3.2) unstable; urgency=low + + * Non-maintainer upload. + * Update package for last python policy (Closes: #373493). + + -- Pierre Habouzit Thu, 29 Jun 2006 15:55:52 +0200 + +pygdchart2 (0.beta1-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Stop building modules for python2.1 and python2.2. (closes: #351129) + + -- Pierre Habouzit Sun, 9 Apr 2006 15:53:43 +0200 + +pygdchart2 (0.beta1-3) unstable; urgency=low + + * Update local cdbs python snippet. + * Raise to standards version 3.6.2 (no changes needed). + * Only se cdbs debian/control auto-build when environment includes + DEB_BUILD_OPTIONS=update. + * Auto-update build-dependencies (and manually rip out build-essential + buggily sneaking in). + + -- Jonas Smedegaard Wed, 13 Jul 2005 14:07:12 +0200 + +pygdchart2 (0.beta1-2) unstable; urgency=low + + * Add README.Debian note about how to enable XPM support. + * Enable cdbs debian/rules auto-update. + * Update upstream source location in watch file. + * Use local improved python-distutils cdbs snippet. + * Remove extranous space from short python-gdchart2 description + (thanks to linda). + + -- Jonas Smedegaard Mon, 13 Jun 2005 17:29:44 +0200 + +pygdchart2 (0.beta1-1) unstable; urgency=low + + * First official release. Closes bug#287668, #287694 (thanks to W. + Borgert for encouragement and testing). + * Fix doc-base registration (register as GDChart2, not GDGraph2). + * Add package for Python 2.4, and tighten cdbs build-dependency. + * Mention "OO" in short and long descriptions. + * Add and use local cdbs snippet buildinfo.mk. + + -- Jonas Smedegaard Wed, 29 Dec 2004 17:43:17 +0100 + +pygdchart2 (0.beta1-0.0.jones.1) unstable; urgency=low + + * First unofficial release. + + -- Jonas Smedegaard Sun, 11 Jan 2004 07:01:19 +0100 --- pygdchart2-0.beta1.orig/debian/compat +++ pygdchart2-0.beta1/debian/compat @@ -0,0 +1 @@ +10 --- pygdchart2-0.beta1.orig/debian/control +++ pygdchart2-0.beta1/debian/control @@ -0,0 +1,40 @@ +Source: pygdchart2 +Section: python +Priority: optional +Maintainer: Jonas Smedegaard +Standards-Version: 3.9.8 +Build-Depends: cdbs (>= 0.4.43), + debhelper (>= 10), + dh-buildinfo, + dh-python, + libgd-dev, + libgdchart-gd2-noxpm-dev | libgdchart-gd2-dev, + python-all-dev (>= 2.3.5-11) +X-Python-Version: >= 2.3 + +Package: python-gdchart2 +Architecture: any +Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends} +Provides: ${python:Provides} +Replaces: python2.3-gdchart2 (<< 0.beta1-3.2), + python2.4-gdchart2 (<< 0.beta1-3.2) +Conflicts: python2.3-gdchart2 (<< 0.beta1-3.2), + python2.4-gdchart2 (<< 0.beta1-3.2) +XB-Python-Version: ${python:Versions} +Description: Python OO interface to GDChart + Object-oriented Python interface to the nice 2d and 3d graphics library + GDChart. + . + Website: http://www.nullcube.com/software/pygdchart2.html + +Package: python-gdchart2-doc +Architecture: all +Section: doc +Depends: ${misc:Depends}, ${python:Depends} +Description: Python OO interface to GDChart - docs + Object-oriented Python interface to the nice 2d and 3d graphics library + GDChart. + . + This package contains documentation and a few example scripts. + . + Website: http://www.nullcube.com/software/pygdchart2.html --- pygdchart2-0.beta1.orig/debian/control.in +++ pygdchart2-0.beta1/debian/control.in @@ -0,0 +1,35 @@ +Source: pygdchart2 +Section: python +Priority: optional +Maintainer: Jonas Smedegaard +Standards-Version: 3.7.2 +Build-Depends: libgd2-noxpm-dev | libgd2-xpm-dev, + libgdchart-gd2-noxpm-dev | libgdchart-gd2-dev, + @cdbs@ + +Package: python-gdchart2 +Architecture: any +Depends: python (<< 2.4), python (>= 2.3), python2.3-gdchart2 +Provides: ${python:Provides} +Replaces: python2.3-gdchart2 (<< 0.beta1-3.2), + python2.4-gdchart2 (<< 0.beta1-3.2) +Conflicts: python2.3-gdchart2 (<< 0.beta1-3.2), + python2.4-gdchart2 (<< 0.beta1-3.2) +XB-Python-Version: ${python:Versions} +Description: Python OO interface to GDChart + Object-oriented Python interface to the nice 2d and 3d graphics library + GDChart. + . + Website: http://www.nullcube.com/software/pygdchart2.html + +Package: python-gdchart2-doc +Architecture: all +Section: doc +Depends: ${python:Depends} +Description: Python OO interface to GDChart - docs + Object-oriented Python interface to the nice 2d and 3d graphics library + GDChart. + . + This package contains documentation and a few example scripts. + . + Website: http://www.nullcube.com/software/pygdchart2.html --- pygdchart2-0.beta1.orig/debian/copyright +++ pygdchart2-0.beta1/debian/copyright @@ -0,0 +1,42 @@ +This is PyGDChart2 packaged for Debian GNU systems. + +Upstream source: http://www.nullcube.com/software/pygdchart2.html + +Upstream Author: Nullcube + +Copyright and licensing info: + +License + + PyGDChart is licensed under the BSD license. The full text is included + below, but the essential gist of it is that you can do whatever you + like with PyGDChart, as long as the copyright stays intact. + _________________________________________________________________ + + Copyright (c) 2002, Nullcube Pty Ltd + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of Nullcube 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 COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- pygdchart2-0.beta1.orig/debian/python-gdchart2-doc.doc-base +++ pygdchart2-0.beta1/debian/python-gdchart2-doc.doc-base @@ -0,0 +1,10 @@ +Document: python-gdchart2 +Title: Python GDChart2 Documentation +Author: aldo@nullcube.com +Abstract: This manual describes how to install and use the + GDChart2 Python library. +Section: Apps/Programming + +Format: HTML +Index: /usr/share/doc/python-gdchart2-doc/doc/index.html +Files: /usr/share/doc/python-gdchart2-doc/doc/* --- pygdchart2-0.beta1.orig/debian/rules +++ pygdchart2-0.beta1/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f +# -*- mode: makefile; coding: utf-8 -*- +# Copyright © 2004-2005 Jonas Smedegaard + +# Set DEB_BUILD_OPTIONS=update in environment to regenerate control +ifneq (,$(findstring update,$(DEB_BUILD_OPTIONS))) +DEB_AUTO_UPDATE_DEBIAN_CONTROL := yes +endif + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk +include debian/cdbs/1/rules/buildinfo.mk + +DEB_INSTALL_DOCS_python-gdchart2-doc += doc + +DEB_DESTDIR := debian/python-gdchart2 + +clean:: + rm -rf build --- pygdchart2-0.beta1.orig/debian/watch +++ pygdchart2-0.beta1/debian/watch @@ -0,0 +1,3 @@ +# Run the "uscan" command to check for upstream updates and more. +version=2 +http://www.nullcube.com/software/pygdchart2.html .*pygdchart2-([\d+\.]+|\d+)(\.tar|\.tgz)(\.gz|\.bz2|) debian uupdate --- pygdchart2-0.beta1.orig/gdchart.py +++ pygdchart2-0.beta1/gdchart.py @@ -261,8 +261,8 @@ for k, v in self._lookupOptions[option].items(): if v == val: return k - else: - raise GDChartError, "Lookup value not known - this should never happen. Please contact software authors." + else: + raise GDChartError, "Lookup value not known - this should never happen. Please contact software authors." elif self._maskOptions.has_key(option): lst = [] for k, v in self._maskOptions[option].items():