aboutsummaryrefslogtreecommitdiff
path: root/archivers
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2015-09-04 17:24:08 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2015-09-04 17:24:08 +0000
commit9271cd1ae2f1310885f249c27102cbea04f38f73 (patch)
tree85e7469f3bdedf9df16e16df4f8573ab1723524a /archivers
parentf7e1c0c39d197c5e104ea9fe6ecc86507706d4dd (diff)
downloadports-9271cd1ae2f1310885f249c27102cbea04f38f73.tar.gz
ports-9271cd1ae2f1310885f249c27102cbea04f38f73.zip
- Add an upstream patch for archivers/py-lz4 to export its version number.
- Remove a local hack for x11/xpra to properly detect LZ4 version.
Notes
Notes: svn path=/head/; revision=396121
Diffstat (limited to 'archivers')
-rw-r--r--archivers/py-lz4/Makefile1
-rw-r--r--archivers/py-lz4/files/patch-setup.py19
-rw-r--r--archivers/py-lz4/files/patch-src_python-lz4.c13
3 files changed, 32 insertions, 1 deletions
diff --git a/archivers/py-lz4/Makefile b/archivers/py-lz4/Makefile
index a4da14af80fd..4ccf4f99fe95 100644
--- a/archivers/py-lz4/Makefile
+++ b/archivers/py-lz4/Makefile
@@ -2,6 +2,7 @@
PORTNAME= lz4
PORTVERSION= 0.7.0
+PORTREVISION= 1
CATEGORIES= archivers python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
diff --git a/archivers/py-lz4/files/patch-setup.py b/archivers/py-lz4/files/patch-setup.py
index 08278d35ed1e..57c736a5e2a6 100644
--- a/archivers/py-lz4/files/patch-setup.py
+++ b/archivers/py-lz4/files/patch-setup.py
@@ -1,6 +1,23 @@
--- setup.py.orig 2014-07-07 13:03:03 UTC
+++ setup.py
-@@ -29,7 +29,7 @@ setup(
+@@ -4,10 +4,11 @@
+ from setuptools import setup, find_packages, Extension
+
+ VERSION = (0, 7, 0)
++VERSION_STR = ".".join([str(x) for x in VERSION])
+
+ setup(
+ name='lz4',
+- version=".".join([str(x) for x in VERSION]),
++ version=VERSION_STR,
+ description="LZ4 Bindings for Python",
+ long_description=open('README.rst', 'r').read(),
+ author='Steeve Morin',
+@@ -26,10 +27,11 @@ setup(
+ "-Wall",
+ "-W",
+ "-Wundef",
++ "-DVERSION=\"%s\"" % VERSION_STR,
"-DLZ4_VERSION=\"r119\"",
])
],
diff --git a/archivers/py-lz4/files/patch-src_python-lz4.c b/archivers/py-lz4/files/patch-src_python-lz4.c
new file mode 100644
index 000000000000..942f087e3227
--- /dev/null
+++ b/archivers/py-lz4/files/patch-src_python-lz4.c
@@ -0,0 +1,13 @@
+--- src/python-lz4.c.orig 2014-07-07 13:03:03 UTC
++++ src/python-lz4.c
+@@ -202,6 +202,10 @@ void initlz4(void)
+ INITERROR;
+ }
+
++ PyModule_AddStringConstant(module, "VERSION", VERSION);
++ PyModule_AddStringConstant(module, "__version__", VERSION);
++ PyModule_AddStringConstant(module, "LZ4_VERSION", LZ4_VERSION);
++
+ #if PY_MAJOR_VERSION >= 3
+ return module;
+ #endif