FreeBSD Bugzilla – Attachment 199820 Details for
Bug 233782
devel/py-freebsd: fix with python 3.x and upgrade to version 0.9.4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to update the port
py-freebsd.diff (text/plain), 8.78 KB, created by
Maxim Sobolev
on 2018-12-04 16:34:07 UTC
(
hide
)
Description:
Patch to update the port
Filename:
MIME Type:
Creator:
Maxim Sobolev
Created:
2018-12-04 16:34:07 UTC
Size:
8.78 KB
patch
obsolete
>diff --git a/devel/py-freebsd/Makefile b/devel/py-freebsd/Makefile >index 9c285cde2b..75dcdfea65 100644 >--- a/devel/py-freebsd/Makefile >+++ b/devel/py-freebsd/Makefile >@@ -2,13 +2,9 @@ > # $FreeBSD: head/devel/py-freebsd/Makefile 462307 2018-02-19 11:10:43Z antoine $ > > PORTNAME= freebsd >-PORTVERSION= 0.9.3 >-PORTREVISION= 8 >+PORTVERSION= 0.9.4 > CATEGORIES= devel python >-MASTER_SITES= LOCAL/perky \ >- http://people.freebsd.org/~perky/distfiles/ > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} >-DISTNAME= py-freebsd-${PORTVERSION} > > MAINTAINER= python@FreeBSD.org > COMMENT= Python interface to FreeBSD-specific system libraries >@@ -16,17 +12,15 @@ COMMENT= Python interface to FreeBSD-specific system libraries > LICENSE= BSD2CLAUSE > LICENSE_FILE= ${WRKSRC}/COPYRIGHT > >-USES= python:2.7 >-USE_PYTHON= autoplist distutils >- >-.include <bsd.port.pre.mk> >+USE_GITHUB= yes >+GH_ACCOUNT= sobomax >+GH_TAGNAME= v${PORTVERSION} >+GH_PROJECT= py-${PORTNAME} > >-.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100002 >-EXTRA_PATCHES+= ${FILESDIR}/freebsd11_patch-src__.const.def \ >- ${FILESDIR}/freebsd11_patch-src__netstat.c >-.endif >+USES= python:2.7+ >+USE_PYTHON= autoplist distutils > > post-install: > ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/freebsd.so > >-.include <bsd.port.post.mk> >+.include <bsd.port.mk> >diff --git a/devel/py-freebsd/distinfo b/devel/py-freebsd/distinfo >index 944007e96a..6b2cd7df8a 100644 >--- a/devel/py-freebsd/distinfo >+++ b/devel/py-freebsd/distinfo >@@ -1,2 +1,3 @@ >-SHA256 (py-freebsd-0.9.3.tar.gz) = 4792a5f9d124bd7634890dceeccd9995149176d4d36e17e882eadd4d23b46f92 >-SIZE (py-freebsd-0.9.3.tar.gz) = 26995 >+TIMESTAMP = 1543888048 >+SHA256 (sobomax-py-freebsd-0.9.4-v0.9.4_GH0.tar.gz) = 6086410a666e2df2bb6bd34e1e4e39a5f6d5c36fd5493a9738c8174774556849 >+SIZE (sobomax-py-freebsd-0.9.4-v0.9.4_GH0.tar.gz) = 27547 >diff --git a/devel/py-freebsd/files/freebsd11_patch-src__.const.def b/devel/py-freebsd/files/freebsd11_patch-src__.const.def >deleted file mode 100644 >index d196ac3492..0000000000 >--- a/devel/py-freebsd/files/freebsd11_patch-src__.const.def >+++ /dev/null >@@ -1,10 +0,0 @@ >---- src/.const.def.orig 2005-12-09 03:40:56 UTC >-+++ src/.const.def >-@@ -69,7 +69,6 @@ SETDICT_INT(d, "IFF_BROADCAST", IFF_BROA >- SETDICT_INT(d, "IFF_DEBUG", IFF_DEBUG); >- SETDICT_INT(d, "IFF_LOOPBACK", IFF_LOOPBACK); >- SETDICT_INT(d, "IFF_POINTOPOINT", IFF_POINTOPOINT); >--SETDICT_INT(d, "IFF_SMART", IFF_SMART); >- SETDICT_INT(d, "IFF_RUNNING", IFF_RUNNING); >- SETDICT_INT(d, "IFF_NOARP", IFF_NOARP); >- SETDICT_INT(d, "IFF_PROMISC", IFF_PROMISC); >diff --git a/devel/py-freebsd/files/freebsd11_patch-src__netstat.c b/devel/py-freebsd/files/freebsd11_patch-src__netstat.c >deleted file mode 100644 >index 97309d6dab..0000000000 >--- a/devel/py-freebsd/files/freebsd11_patch-src__netstat.c >+++ /dev/null >@@ -1,10 +0,0 @@ >---- src/netstat.c.orig 2005-05-08 06:55:00 UTC >-+++ src/netstat.c >-@@ -40,7 +40,6 @@ EXPCONST(int IFF_BROADCAST) >- EXPCONST(int IFF_DEBUG) >- EXPCONST(int IFF_LOOPBACK) >- EXPCONST(int IFF_POINTOPOINT) >--EXPCONST(int IFF_SMART) >- EXPCONST(int IFF_RUNNING) >- EXPCONST(int IFF_NOARP) >- EXPCONST(int IFF_PROMISC) >diff --git a/devel/py-freebsd/files/patch-setup.py b/devel/py-freebsd/files/patch-setup.py >deleted file mode 100644 >index 14ccb52bad..0000000000 >--- a/devel/py-freebsd/files/patch-setup.py >+++ /dev/null >@@ -1,10 +0,0 @@ >---- setup.py.orig 2005-12-09 03:39:16 UTC >-+++ setup.py >-@@ -52,6 +52,7 @@ setup(name = "py-freebsd", >- "freebsd", >- ["src/freebsdmodule.c"], >- libraries=libs, >-+ library_dirs=['/lib', '/usr/lib'], >- depends=DEPENDS, >- ) >- ], >diff --git a/devel/py-freebsd/files/patch-src-jail.c b/devel/py-freebsd/files/patch-src-jail.c >deleted file mode 100644 >index 31b873dd93..0000000000 >--- a/devel/py-freebsd/files/patch-src-jail.c >+++ /dev/null >@@ -1,45 +0,0 @@ >---- src/jail.c.orig 2005-05-08 06:55:00 UTC >-+++ src/jail.c >-@@ -40,21 +40,37 @@ static PyObject * >- PyFB_jail(PyObject *self, PyObject *args) >- { >- struct jail jp; >-+ struct in_addr ia; >- char *ipaddr; >-+ int error; >- >- if (!PyArg_ParseTuple(args, "sss:jail", &(jp.path), >- &(jp.hostname), &ipaddr)) >- return NULL; >- >-- jp.version = 0; >-- jp.ip_number = inet_addr(ipaddr); >-- >-- if (jp.ip_number == INADDR_NONE) { >-+ ia.s_addr = inet_addr(ipaddr); >-+ if (ia.s_addr == INADDR_NONE) { >- PyErr_SetString(PyExc_ValueError, "malformed internet address"); >- return NULL; >- } >- >-- if (jail(&jp) == -1) >-+ jp.version = JAIL_API_VERSION; >-+ jp.jailname = NULL; >-+ jp.ip4s = 1; >-+ jp.ip4 = malloc(jp.ip4s * sizeof(struct in_addr)); >-+ if (jp.ip4 == NULL) { >-+ PyErr_SetString(PyExc_ValueError, "Cannot allocate memory"); >-+ return NULL; >-+ } >-+ jp.ip4->s_addr = ia.s_addr; >-+ jp.ip6s = 0; >-+ jp.ip6 = NULL; >-+ >-+ error = jail(&jp); >-+ >-+ free(jp.ip4); >-+ >-+ if (error == -1) >- return OSERROR(); >- >- Py_RETURN_NONE; >diff --git a/devel/py-freebsd/files/patch-src-netstat.c b/devel/py-freebsd/files/patch-src-netstat.c >deleted file mode 100644 >index 840515b264..0000000000 >--- a/devel/py-freebsd/files/patch-src-netstat.c >+++ /dev/null >@@ -1,10 +0,0 @@ >---- src/netstat.c.orig 2005-05-08 06:55:00 UTC >-+++ src/netstat.c >-@@ -243,7 +243,6 @@ PyFB_ifstats(PyObject *self) >- 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/devel/py-freebsd/files/patch-src-process.c b/devel/py-freebsd/files/patch-src-process.c >deleted file mode 100644 >index a63a22c50d..0000000000 >--- a/devel/py-freebsd/files/patch-src-process.c >+++ /dev/null >@@ -1,52 +0,0 @@ >---- src/process.c.orig 2005-05-08 06:55:00 UTC >-+++ src/process.c >-@@ -51,10 +51,19 @@ static char PyFB_setprogname__doc__[] = >- 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 @@ PyFB_setprogname(PyObject *self, PyObjec >- 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/devel/py-freebsd/files/patch-src-sysctl.c b/devel/py-freebsd/files/patch-src-sysctl.c >deleted file mode 100644 >index 26b45327b1..0000000000 >--- a/devel/py-freebsd/files/patch-src-sysctl.c >+++ /dev/null >@@ -1,38 +0,0 @@ >---- src/sysctl.c.orig 2005-05-08 06:55:00 UTC >-+++ src/sysctl.c >-@@ -121,7 +121,7 @@ const size_t sysctl_type_sizes[CTLTYPE] >- 0, /* CTLTYPE_NODE */ >- sizeof(int), /* CTLTYPE_INT */ >- 0, /* CTLTYPE_STRING */ >-- sizeof(quad_t), /* CTLTYPE_QUAD */ >-+ sizeof(quad_t), /* CTLTYPE_S64 */ >- 0, /* CTLTYPE_OPAQUE */ >- sizeof(unsigned int), /* CTLTYPE_UINT */ >- sizeof(long), /* CTLTYPE_LONG */ >-@@ -329,7 +329,7 @@ PyFB_sysctl(PyObject *self, PyObject *ar >- case CTLTYPE_UINT: >- case CTLTYPE_LONG: >- case CTLTYPE_ULONG: >-- case CTLTYPE_QUAD: >-+ case CTLTYPE_S64: >- if (!PyInt_Check(newobj) && !PyLong_Check(newobj)) { >- PyErr_SetString(PyExc_TypeError, >- "argument 2 must be integer for this node"); >-@@ -350,7 +350,7 @@ PyFB_sysctl(PyObject *self, PyObject *ar >- case CTLTYPE_ULONG: >- val.m_ulong = PyLong_AsUnsignedLong(newobj); >- break; >-- case CTLTYPE_QUAD: >-+ case CTLTYPE_S64: >- val.m_quad = (quad_t)PyLong_AsLongLong(newobj); >- break; >- } >-@@ -439,7 +439,7 @@ PyFB_sysctl(PyObject *self, PyObject *ar >- case CTLTYPE_STRING: >- ret = PyString_FromStringAndSize(oldp, oldlen - 1); >- break; >-- case CTLTYPE_QUAD: >-+ case CTLTYPE_S64: >- assert(oldlen == sizeof(quad_t)); >- ret = PyLong_FromLongLong((long long)*(quad_t *)oldp); >- break;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233782
: 199820