mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 16:50:06 +02:00
twisted, bump version, enable secondary architecture, dumb python2.7 (#5424)
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
From 2ee4b9c1ba7fe6a62bdb963842741bd013e8c4bd Mon Sep 17 00:00:00 2001
|
||||
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
|
||||
Date: Fri, 20 Jun 2014 04:57:11 +0000
|
||||
Subject: sendmsg.c: fix compiling with gcc2.
|
||||
|
||||
|
||||
diff --git a/twisted/python/_sendmsg.c b/twisted/python/_sendmsg.c
|
||||
index 3f05501..e4d6600 100644
|
||||
--- a/twisted/python/_sendmsg.c
|
||||
+++ b/twisted/python/_sendmsg.c
|
||||
@@ -175,9 +175,11 @@ static PyObject *sendmsg_sendmsg(PyObject *self, PyObject *args, PyObject *keywd
|
||||
|
||||
int fd;
|
||||
int flags = 0;
|
||||
+ size_t all_data_len = 0;
|
||||
Py_ssize_t sendmsg_result, iovec_length;
|
||||
struct msghdr message_header;
|
||||
- struct iovec iov[1];
|
||||
+ struct iovec iov[1];
|
||||
+ struct cmsghdr *control_message = NULL;
|
||||
PyObject *ancillary = NULL;
|
||||
PyObject *iterator = NULL;
|
||||
PyObject *item = NULL;
|
||||
@@ -223,7 +225,7 @@ static PyObject *sendmsg_sendmsg(PyObject *self, PyObject *args, PyObject *keywd
|
||||
goto finished;
|
||||
}
|
||||
|
||||
- size_t all_data_len = 0;
|
||||
+ all_data_len = 0;
|
||||
|
||||
/* First we need to know how big the buffer needs to be in order to
|
||||
have enough space for all of the messages. */
|
||||
@@ -290,7 +292,7 @@ static PyObject *sendmsg_sendmsg(PyObject *self, PyObject *args, PyObject *keywd
|
||||
}
|
||||
|
||||
/* Unpack the tuples into the control message. */
|
||||
- struct cmsghdr *control_message = CMSG_FIRSTHDR(&message_header);
|
||||
+ control_message = CMSG_FIRSTHDR(&message_header);
|
||||
while ( (item = PyIter_Next(iterator)) ) {
|
||||
int type, level;
|
||||
Py_ssize_t data_len;
|
||||
@@ -497,12 +499,13 @@ static PyObject *sendmsg_recvmsg(PyObject *self, PyObject *args, PyObject *keywd
|
||||
static PyObject *sendmsg_getsockfam(PyObject *self, PyObject *args,
|
||||
PyObject *keywds) {
|
||||
int fd;
|
||||
+ socklen_t sz;
|
||||
struct sockaddr sa;
|
||||
static char *kwlist[] = {"fd", NULL};
|
||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "i", kwlist, &fd)) {
|
||||
return NULL;
|
||||
}
|
||||
- socklen_t sz = sizeof(sa);
|
||||
+ sz = sizeof(sa);
|
||||
if (getsockname(fd, &sa, &sz)) {
|
||||
PyErr_SetFromErrno(sendmsg_socket_error);
|
||||
return NULL;
|
||||
--
|
||||
2.2.2
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
From b2c93cc12cec881066556a0b3245acf4273f5f34 Mon Sep 17 00:00:00 2001
|
||||
From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
|
||||
Date: Fri, 20 Jun 2014 04:57:11 +0000
|
||||
Subject: sendmsg.c: fix compiling with gcc2.
|
||||
|
||||
|
||||
diff --git a/src/twisted/python/_sendmsg.c b/src/twisted/python/_sendmsg.c
|
||||
index e84c08b..e9b8677 100644
|
||||
--- a/src/twisted/python/_sendmsg.c
|
||||
+++ b/src/twisted/python/_sendmsg.c
|
||||
@@ -175,9 +175,11 @@ static PyObject *sendmsg_sendmsg(PyObject *self, PyObject *args, PyObject *keywd
|
||||
|
||||
int fd;
|
||||
int flags = 0;
|
||||
+ size_t all_data_len = 0;
|
||||
Py_ssize_t sendmsg_result, iovec_length;
|
||||
struct msghdr message_header;
|
||||
- struct iovec iov[1];
|
||||
+ struct iovec iov[1];
|
||||
+ struct cmsghdr *control_message = NULL;
|
||||
PyObject *ancillary = NULL;
|
||||
PyObject *iterator = NULL;
|
||||
PyObject *item = NULL;
|
||||
@@ -223,7 +225,7 @@ static PyObject *sendmsg_sendmsg(PyObject *self, PyObject *args, PyObject *keywd
|
||||
goto finished;
|
||||
}
|
||||
|
||||
- size_t all_data_len = 0;
|
||||
+ all_data_len = 0;
|
||||
|
||||
/* First we need to know how big the buffer needs to be in order to
|
||||
have enough space for all of the messages. */
|
||||
@@ -298,7 +300,7 @@ static PyObject *sendmsg_sendmsg(PyObject *self, PyObject *args, PyObject *keywd
|
||||
}
|
||||
|
||||
/* Unpack the tuples into the control message. */
|
||||
- struct cmsghdr *control_message = CMSG_FIRSTHDR(&message_header);
|
||||
+ control_message = CMSG_FIRSTHDR(&message_header);
|
||||
while ( (item = PyIter_Next(iterator)) && control_message!=NULL ) {
|
||||
int type, level;
|
||||
Py_ssize_t data_len;
|
||||
@@ -505,12 +507,13 @@ static PyObject *sendmsg_recvmsg(PyObject *self, PyObject *args, PyObject *keywd
|
||||
static PyObject *sendmsg_getsockfam(PyObject *self, PyObject *args,
|
||||
PyObject *keywds) {
|
||||
int fd;
|
||||
+ socklen_t sz;
|
||||
struct sockaddr sa;
|
||||
static char *kwlist[] = {"fd", NULL};
|
||||
if (!PyArg_ParseTupleAndKeywords(args, keywds, "i", kwlist, &fd)) {
|
||||
return NULL;
|
||||
}
|
||||
- socklen_t sz = sizeof(sa);
|
||||
+ sz = sizeof(sa);
|
||||
if (getsockname(fd, &sa, &sz)) {
|
||||
PyErr_SetFromErrno(sendmsg_socket_error);
|
||||
return NULL;
|
||||
--
|
||||
2.11.0
|
||||
|
||||
@@ -20,31 +20,31 @@ text processing, and anything else.
|
||||
- twisted.trial: A unit testing framework that integrates well with \
|
||||
Twisted-based code."
|
||||
HOMEPAGE="https://twistedmatrix.com"
|
||||
COPYRIGHT="2001-2013 Twisted project members"
|
||||
COPYRIGHT="2001-2020 Twisted project members"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/twisted/twisted/archive/twisted-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="c278ff18be0cffc6f1da0aa346d76366a5568eefb1728a885e20cc1bb385e52b"
|
||||
PATCHES="twisted-$portVersion.patchset"
|
||||
CHECKSUM_SHA256="64173c6a561b206bea4193f810ff6f26b549b34e3b581a34eba499669c798427"
|
||||
SOURCE_DIR="twisted-twisted-$portVersion"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 ?x86 x86_64"
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
"
|
||||
PYTHON_PACKAGES=(python python36 python3)
|
||||
PYTHON_VERSIONS=(2.7 3.6 3.7)
|
||||
PYTHON_PACKAGES=(python36 python3)
|
||||
PYTHON_VERSIONS=(3.6 3.7)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
@@ -62,20 +62,6 @@ BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
done
|
||||
|
||||
PROVIDES_python="$PROVIDES_python
|
||||
cmd:cftp
|
||||
cmd:ckeygen
|
||||
cmd:conch
|
||||
cmd:mailmail
|
||||
cmd:manhole
|
||||
cmd:pyhtmlizer
|
||||
cmd:tap2deb
|
||||
cmd:tap2rpm
|
||||
cmd:tkconch
|
||||
cmd:trial
|
||||
cmd:twist
|
||||
cmd:twistd
|
||||
"
|
||||
PROVIDES_python3="$PROVIDES_python3
|
||||
cmd:cftp3
|
||||
cmd:ckeygen3
|
||||
@@ -120,18 +106,18 @@ INSTALL()
|
||||
--root=/ --prefix=$prefix
|
||||
|
||||
if [ $pythonPackage = python3 ]; then
|
||||
for f in $binDir/*; do
|
||||
for f in $prefix/bin/*; do
|
||||
mv $f ${f}3
|
||||
done
|
||||
fi
|
||||
if [ $pythonPackage = python36 ]; then
|
||||
for f in $binDir/*; do
|
||||
for f in $prefix/bin/*; do
|
||||
mv $f ${f}36
|
||||
done
|
||||
fi
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python* \
|
||||
$binDir
|
||||
$prefix/bin
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user