From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Oct 19 12:20:41 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B211F16A412 for ; Thu, 19 Oct 2006 12:20:41 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA1FA43D7B for ; Thu, 19 Oct 2006 12:20:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k9JCKK8M033193 for ; Thu, 19 Oct 2006 12:20:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k9JCKK3d033188; Thu, 19 Oct 2006 12:20:20 GMT (envelope-from gnats) Resent-Date: Thu, 19 Oct 2006 12:20:20 GMT Resent-Message-Id: <200610191220.k9JCKK3d033188@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Akihiko HAYASHI Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0F61616A403 for ; Thu, 19 Oct 2006 12:18:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id C750643D58 for ; Thu, 19 Oct 2006 12:18:45 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k9JCIjbC032627 for ; Thu, 19 Oct 2006 12:18:45 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k9JCIjMH032626; Thu, 19 Oct 2006 12:18:45 GMT (envelope-from nobody) Message-Id: <200610191218.k9JCIjMH032626@www.freebsd.org> Date: Thu, 19 Oct 2006 12:18:45 GMT From: Akihiko HAYASHI To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: ports/104564: compile failure at ports/graphic/py-cairo on FreeBSD4 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2006 12:20:41 -0000 >Number: 104564 >Category: ports >Synopsis: compile failure at ports/graphic/py-cairo on FreeBSD4 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Oct 19 12:20:19 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Akihiko HAYASHI >Release: 4-stable >Organization: >Environment: FreeBSD vega.totalware.gifu.gifu.jp 4.11-STABLE FreeBSD 4.11-STABLE #32: Fri Sep 29 12:37:20 JST 2006 root@vega.totalware.gifu.gifu.jp:/usr/src/sys/compile/VEGA i386 >Description: compile failure at ports/graphic/py-cairo on FreeBSD4. This is py-cairo problem, not port script. py-cairo sources use C99 style, not ANSI-C. and py-cairo's configure checks stdint.h, but source 'cairo/pycairo-surface.c' #include stdint.h unconditionaly. then, py-cairo can be builded on gcc3/FreeBSD6, but cannot on gcc2.9/FreeBSD4. at previos version of ports/graphic/py-cairo, files/patch-cairo_pycairo-font.c(removed) patches ANSI-C style. >How-To-Repeat: port build at FreeBSD4 >Fix: patch is following. Patch attached with submission follows: --- cairo/pycairo-font.c.orig Sat Apr 29 19:04:31 2006 +++ cairo/pycairo-font.c Thu Oct 19 15:11:29 2006 @@ -197,6 +197,7 @@ PycairoFontFace *ff; PycairoFontOptions *fo; PycairoMatrix *mx1, *mx2; + PyObject *o; if (!PyArg_ParseTuple(args, "O!O!O!O!:ScaledFont.__new__", &PycairoFontFace_Type, &ff, @@ -205,7 +206,7 @@ &PycairoFontOptions_Type, &fo)) return NULL; - PyObject *o = type->tp_alloc(type, 0); + o = type->tp_alloc(type, 0); if (o != NULL) { cairo_scaled_font_t *scaled_font = cairo_scaled_font_create (ff->font_face, &mx1->matrix, &mx2->matrix, fo->font_options); --- cairo/pycairo-surface.c.orig Mon Jul 3 11:58:14 2006 +++ cairo/pycairo-surface.c Thu Oct 19 20:35:09 2006 @@ -34,7 +34,11 @@ # include #endif -#include +#if defined(HAVE_STDINT_H) +# include +#elsif defined(HAVE_INTTYPES_H) +# include +#endif #include "pycairo-private.h" @@ -519,6 +523,7 @@ static PyObject * image_surface_create_from_png (PyTypeObject *type, PyObject *file) { + PyObject* reader; if (PyObject_TypeCheck (file, &PyBaseString_Type)) { return PycairoSurface_FromSurface ( cairo_image_surface_create_from_png (PyString_AsString(file)), @@ -526,7 +531,7 @@ } /* file or file-like object argument */ - PyObject* reader = PyObject_GetAttrString (file, "read"); + reader = PyObject_GetAttrString (file, "read"); if (reader == NULL || !PyCallable_Check (reader)) { Py_XDECREF(reader); PyErr_SetString(PyExc_TypeError, @@ -700,6 +705,7 @@ { double width_in_points, height_in_points; PyObject *file; + PyObject* writer; if (!PyArg_ParseTuple(args, "Odd:PDFSurface.__new__", &file, &width_in_points, &height_in_points)) @@ -713,7 +719,7 @@ NULL); } /* file or file-like object argument */ - PyObject* writer = PyObject_GetAttrString (file, "write"); + writer = PyObject_GetAttrString (file, "write"); if (writer == NULL || !PyCallable_Check (writer)) { Py_XDECREF(writer); PyErr_SetString(PyExc_TypeError, @@ -803,6 +809,7 @@ { double width_in_points, height_in_points; PyObject *file; + PyObject* writer; if (!PyArg_ParseTuple(args, "Odd:PSSurface.__new__", &file, &width_in_points, &height_in_points)) @@ -817,7 +824,7 @@ } /* else: file or file-like object argument */ - PyObject* writer = PyObject_GetAttrString (file, "write"); + writer = PyObject_GetAttrString (file, "write"); if (writer == NULL || !PyCallable_Check (writer)) { Py_XDECREF(writer); PyErr_SetString(PyExc_TypeError, @@ -942,6 +949,7 @@ { double width_in_points, height_in_points; PyObject *file; + PyObject* writer; if (!PyArg_ParseTuple(args, "Odd:SVGSurface.__new__", &file, &width_in_points, &height_in_points)) @@ -955,7 +963,7 @@ NULL); } /* else: file or file-like object argument */ - PyObject* writer = PyObject_GetAttrString (file, "write"); + writer = PyObject_GetAttrString (file, "write"); if (writer == NULL || !PyCallable_Check (writer)) { Py_XDECREF(writer); PyErr_SetString(PyExc_TypeError, >Release-Note: >Audit-Trail: >Unformatted: