summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Villavicencio <the_paya@gentoo.org>2008-06-08 19:25:43 +0000
committerJavier Villavicencio <the_paya@gentoo.org>2008-06-08 19:25:43 +0000
commit0fbc4c156f2a60dc0edbf39a6554cc837a669a61 (patch)
treeb44e4c3bc0f22de2b8006938b5283e47dfb32692 /dev-python/py-freebsd
parentMask py-freebsd with 7.0 patches from 6.2 profile (diff)
downloadgentoo-2-0fbc4c156f2a60dc0edbf39a6554cc837a669a61.tar.gz
gentoo-2-0fbc4c156f2a60dc0edbf39a6554cc837a669a61.tar.bz2
gentoo-2-0fbc4c156f2a60dc0edbf39a6554cc837a669a61.zip
Updated patches for py-freebsd with 7.0 support.
(Portage version: 2.1.5.4)
Diffstat (limited to 'dev-python/py-freebsd')
-rw-r--r--dev-python/py-freebsd/ChangeLog11
-rw-r--r--dev-python/py-freebsd/files/fbsd7-netstat.patch10
-rw-r--r--dev-python/py-freebsd/files/process-fix.patch52
-rw-r--r--dev-python/py-freebsd/py-freebsd-0.9.3-r1.ebuild37
4 files changed, 108 insertions, 2 deletions
diff --git a/dev-python/py-freebsd/ChangeLog b/dev-python/py-freebsd/ChangeLog
index 25f224a02622..bc5af2c4123c 100644
--- a/dev-python/py-freebsd/ChangeLog
+++ b/dev-python/py-freebsd/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-python/py-freebsd
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/py-freebsd/ChangeLog,v 1.2 2006/10/28 12:22:11 uberlord Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/py-freebsd/ChangeLog,v 1.3 2008/06/08 19:25:43 the_paya Exp $
+
+*py-freebsd-0.9.3-r1 (08 Jun 2008)
+
+ 08 Jun 2008; Javier Villavicencio <the_paya@gentoo.org>
+ +files/fbsd7-netstat.patch, +files/process-fix.patch,
+ +py-freebsd-0.9.3-r1.ebuild:
+ Updated ebuild with FreeBSD-7.0 support
28 Oct 2006; Roy Marples <uberlord@gentoo.org> py-freebsd-0.9.3.ebuild:
Added ~sparc-fbsd keyword.
diff --git a/dev-python/py-freebsd/files/fbsd7-netstat.patch b/dev-python/py-freebsd/files/fbsd7-netstat.patch
new file mode 100644
index 000000000000..11ae01cc4d6c
--- /dev/null
+++ b/dev-python/py-freebsd/files/fbsd7-netstat.patch
@@ -0,0 +1,10 @@
+--- src/netstat.c.orig 2007-08-17 13:07:10.654911645 -0500
++++ src/netstat.c 2007-08-17 13:07:19.496912514 -0500
+@@ -243,7 +243,6 @@
+ Py_DECREF(t);
+ p_int(type); p_int(physical);
+ p_int(addrlen); p_int(hdrlen);
+- p_int(recvquota); p_int(xmitquota);
+ p_long(mtu); p_long(metric);
+ p_long(baudrate); p_long(ipackets);
+ p_long(ierrors); p_long(opackets);
diff --git a/dev-python/py-freebsd/files/process-fix.patch b/dev-python/py-freebsd/files/process-fix.patch
new file mode 100644
index 000000000000..910492080eb0
--- /dev/null
+++ b/dev-python/py-freebsd/files/process-fix.patch
@@ -0,0 +1,52 @@
+--- src/process.c.orig Sun May 8 08:55:00 2005
++++ src/process.c Sat Nov 25 18:12:52 2006
+@@ -51,10 +51,19 @@
+ static PyObject *
+ PyFB_setprogname(PyObject *self, PyObject *args)
+ {
+- char *progname;
++ const char *progname;
++ static PyObject *namestr = NULL;
+
+ if (!PyArg_ParseTuple(args, "s:setprogname", &progname))
+ return NULL;
++ /*
++ * Setprogname(3) does not copy the string, it only stores the
++ * string pointer. Make sure that the string object does not
++ * get garbage collected and its memory reused!
++ */
++ Py_XDECREF(namestr); /* maybe free old progname */
++ PyArg_ParseTuple(args, "O", &namestr);
++ Py_INCREF(namestr); /* keep new progname object */
+
+ setprogname(progname);
+ Py_RETURN_NONE;
+@@ -64,16 +73,24 @@
+ static char PyFB_setproctitle__doc__[] =
+ "setproctitle(title):\n"
+ "The setproctitle() library routine sets the process title that\n"
+-"appears on the ps(1) command.";
++"appears on the ps(1) command. The progname and a colon are\n"
++"prepended automatically. This behaviour is suppressed when the\n"
++"title starts with a dash (-) character. Calling with a None\n"
++"argument restores a default process title.";
+
+ static PyObject *
+ PyFB_setproctitle(PyObject *self, PyObject *args)
+ {
+- char *newtitle;
++ const char *newtitle;
+
+- if (!PyArg_ParseTuple(args, "s:setproctitle", &newtitle))
++ if (!PyArg_ParseTuple(args, "z:setproctitle", &newtitle))
+ return NULL;
+
+- setproctitle(newtitle);
++ if (newtitle == NULL)
++ setproctitle(NULL);
++ else if (*newtitle == '-')
++ setproctitle("-%s", newtitle+1);
++ else
++ setproctitle("%s", newtitle);
+ Py_RETURN_NONE;
+ }
diff --git a/dev-python/py-freebsd/py-freebsd-0.9.3-r1.ebuild b/dev-python/py-freebsd/py-freebsd-0.9.3-r1.ebuild
new file mode 100644
index 000000000000..263d062473e4
--- /dev/null
+++ b/dev-python/py-freebsd/py-freebsd-0.9.3-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/py-freebsd/py-freebsd-0.9.3-r1.ebuild,v 1.1 2008/06/08 19:25:43 the_paya Exp $
+
+inherit distutils
+
+DESCRIPTION="Python interface to FreeBSD-specific system libraries"
+HOMEPAGE="http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/py-freebsd/"
+SRC_URI="mirror://freebsd/ports/local-distfiles/perky/${P}.tar.gz
+ http://people.freebsd.org/~perky/distfiles/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~sparc-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND="sys-freebsd/freebsd-lib
+ dev-lang/python"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/fbsd7-netstat.patch"
+ epatch "${FILESDIR}/process-fix.patch"
+}
+
+src_test() {
+ mkdir "${T}/tests"
+ "${python}" setup.py install --home="${T}/tests"
+
+ export PYTHONPATH="${T}/tests/$(get_libdir)/python"
+ "${python}" "${S}/tests/test_kqueue.py" || die "test_kqueue failed"
+ "${python}" "${S}/tests/test_sysctl.py" || die "test_sysctl failed"
+
+ rm -rf "${T}/tests"
+}