From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jan 17 10:30:20 2007 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 [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E195516A417 for ; Wed, 17 Jan 2007 10:30:20 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id C219313C43E for ; Wed, 17 Jan 2007 10:30:20 +0000 (UTC) (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 l0HAUKpr086480 for ; Wed, 17 Jan 2007 10:30:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l0HAUKVx086479; Wed, 17 Jan 2007 10:30:20 GMT (envelope-from gnats) Resent-Date: Wed, 17 Jan 2007 10:30:20 GMT Resent-Message-Id: <200701171030.l0HAUKVx086479@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, Rong-En Fan Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8641516A412 for ; Wed, 17 Jan 2007 10:24:58 +0000 (UTC) (envelope-from rafan@svm.csie.ntu.edu.tw) Received: from svm.csie.ntu.edu.tw (svm.csie.ntu.edu.tw [140.112.90.75]) by mx1.freebsd.org (Postfix) with ESMTP id 35D3F13C459 for ; Wed, 17 Jan 2007 10:24:57 +0000 (UTC) (envelope-from rafan@svm.csie.ntu.edu.tw) Received: from svm.csie.ntu.edu.tw (localhost [127.0.0.1]) by svm.csie.ntu.edu.tw (8.13.8/8.13.8) with ESMTP id l0HAOv1u049074; Wed, 17 Jan 2007 18:24:57 +0800 (CST) (envelope-from rafan@svm.csie.ntu.edu.tw) Received: (from rafan@localhost) by svm.csie.ntu.edu.tw (8.13.8/8.13.8/Submit) id l0HAOvxU095609; Wed, 17 Jan 2007 18:24:57 +0800 (CST) (envelope-from rafan) Message-Id: <200701171024.l0HAOvxU095609@svm.csie.ntu.edu.tw> Date: Wed, 17 Jan 2007 18:24:57 +0800 (CST) From: Rong-En Fan To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: python@FreeBSD.org Subject: ports/108031: [PATCH] lang/python23: fix readline module build with new ncurses 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: Wed, 17 Jan 2007 10:30:21 -0000 >Number: 108031 >Category: ports >Synopsis: [PATCH] lang/python23: fix readline module build with new ncurses >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: Wed Jan 17 10:30:20 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Rong-En Fan >Release: FreeBSD 6.2-RELEASE amd64 >Organization: NTU CSIE >Environment: >Description: Fix python23 build with ncurses 5.6 (readline module). This change can also found in newer python. http://pointyhat.freebsd.org/errorlogs/i386-errorlogs/e.7.2007011523/python23-2.3.5_1.log Added file(s): - files/patch-Modules-readline.c Port maintainer (python@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- python23-2.3.5_1.patch begins here --- diff -ruN --exclude=CVS /usr/ports/lang/python23/files/patch-Modules-readline.c /home/rafan/work/FreeBSD/ports/lang/python23/files/patch-Modules-readline.c --- /usr/ports/lang/python23/files/patch-Modules-readline.c Thu Jan 1 08:00:00 1970 +++ /home/rafan/work/FreeBSD/ports/lang/python23/files/patch-Modules-readline.c Wed Jan 17 18:13:21 2007 @@ -0,0 +1,44 @@ +--- Modules/readline.c.orig Wed Jan 17 18:10:23 2007 ++++ Modules/readline.c Wed Jan 17 18:12:54 2007 +@@ -93,7 +93,7 @@ + return Py_None; + } + +-static int history_length = -1; /* do not truncate history by default */ ++static int _history_length = -1; /* do not truncate history by default */ + PyDoc_STRVAR(doc_read_history_file, + "read_history_file([filename]) -> None\n\ + Load a readline history file.\n\ +@@ -109,8 +109,8 @@ + if (!PyArg_ParseTuple(args, "|z:write_history_file", &s)) + return NULL; + errno = write_history(s); +- if (!errno && history_length >= 0) +- history_truncate_file(s, history_length); ++ if (!errno && _history_length >= 0) ++ history_truncate_file(s, _history_length); + if (errno) + return PyErr_SetFromErrno(PyExc_IOError); + Py_INCREF(Py_None); +@@ -128,10 +128,10 @@ + static PyObject* + set_history_length(PyObject *self, PyObject *args) + { +- int length = history_length; ++ int length = _history_length; + if (!PyArg_ParseTuple(args, "i:set_history_length", &length)) + return NULL; +- history_length = length; ++ _history_length = length; + Py_INCREF(Py_None); + return Py_None; + } +@@ -148,7 +148,7 @@ + static PyObject* + get_history_length(PyObject *self, PyObject *noarg) + { +- return PyInt_FromLong(history_length); ++ return PyInt_FromLong(_history_length); + } + + PyDoc_STRVAR(get_history_length_doc, --- python23-2.3.5_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: