aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2013-05-30 07:07:38 +0000
committerXin LI <delphij@FreeBSD.org>2013-05-30 07:07:38 +0000
commitc211319ae856fea08e534afc7c0da654f3132b71 (patch)
tree1ccb4d2990e4dd3ab66f4829b3c5a029f3fc6ada
parent0fdcbf71bae5474a566f0b3d929ed4a6c71a1873 (diff)
Notes
-rw-r--r--net/py-txamqp/Makefile6
-rw-r--r--net/py-txamqp/files/patch-src__txamqp__codec.py42
2 files changed, 45 insertions, 3 deletions
diff --git a/net/py-txamqp/Makefile b/net/py-txamqp/Makefile
index cb24161c4820..85ecef9d2fdb 100644
--- a/net/py-txamqp/Makefile
+++ b/net/py-txamqp/Makefile
@@ -3,14 +3,14 @@
PORTNAME= txamqp
PORTVERSION= 0.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net python
MASTER_SITES= http://launchpadlibrarian.net/30388120/ \
# http://launchpad.net/txamqp/trunk/${PORTVERSION}/+download/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= python-${PORTNAME}_${PORTVERSION}.orig
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= horus.li@gmail.com
COMMENT= Twisted Python library for the AMQP messaging protocol
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}thrift>0:${PORTSDIR}/devel/py-thrift
@@ -28,7 +28,7 @@ PLIST_SUB= PORTNAME="${PORTNAME}"
# TODO: Install txAMQP examples.
# Don't try to install Twisted yourself, txAMQP. thx!
-do-patch:
+post-patch:
@${REINPLACE_CMD} -e '/install_requires/s/^/#/' ${WRKSRC}/setup.py
.include <bsd.port.mk>
diff --git a/net/py-txamqp/files/patch-src__txamqp__codec.py b/net/py-txamqp/files/patch-src__txamqp__codec.py
new file mode 100644
index 000000000000..33692abea963
--- /dev/null
+++ b/net/py-txamqp/files/patch-src__txamqp__codec.py
@@ -0,0 +1,42 @@
+--- ./src/txamqp/codec.py.orig 2009-08-16 19:25:45.000000000 +0800
++++ ./src/txamqp/codec.py 2013-05-30 13:54:50.000000000 +0800
+@@ -25,12 +25,12 @@
+ """
+
+ from cStringIO import StringIO
+-from struct import *
++from struct import pack, calcsize, unpack
+
+ class EOF(Exception):
+ pass
+
+-class Codec:
++class Codec(object):
+
+ def __init__(self, stream):
+ self.stream = stream
+@@ -153,6 +153,13 @@
+ def decode_longstr(self):
+ return self.dec_str("!L")
+
++ # timestamp
++ def encode_timestamp(self, o):
++ self.pack("!Q", o)
++
++ def decode_timestamp(self):
++ return self.unpack("!Q")
++
+ # table
+ def encode_table(self, tbl):
+ enc = StringIO()
+@@ -180,6 +187,10 @@
+ value = self.decode_longstr()
+ elif type == "I":
+ value = self.decode_long()
++ elif type == "F":
++ value = self.decode_table()
++ elif type == "t":
++ value = (self.decode_octet() != 0)
+ else:
+ raise ValueError(repr(type))
+ result[key] = value