From 8e8ea93ba40827bbddfb00eac26f890092566d61 Mon Sep 17 00:00:00 2001 From: "Jose G. Juanino" Date: Tue, 16 Jan 2018 22:31:03 +0100 Subject: [PATCH] Fix pkg-fallout by py-borgbackup See http://package19.nyi.freebsd.org/data/103i386-default-build-as-user/459016/logs/py36-borgbackup-1.1.4.log After archivers/liblz4 has been updated to 1.8.1 version, the file /usr/local/include/lz4.h has changed the encoding to utf-8 (earlier version kept us-ascii encoding). This subtle change confuse to py-borgbackup in configure phase, as it expects that lz4.h be ascii encoded. This patch fixes this error, and does not break the build if previous archivers/liblz4 version is installed. --- archivers/py-borgbackup/Makefile | 1 + archivers/py-borgbackup/files/patch-setup_lz4.diff | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 archivers/py-borgbackup/files/patch-setup_lz4.diff diff --git a/archivers/py-borgbackup/Makefile b/archivers/py-borgbackup/Makefile index 15eec0bfa7e4..81a9127f3daa 100644 --- a/archivers/py-borgbackup/Makefile +++ b/archivers/py-borgbackup/Makefile @@ -3,6 +3,7 @@ PORTNAME= borgbackup DISTVERSION= 1.1.4 +PORTREVISION= 1 CATEGORIES= archivers python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/archivers/py-borgbackup/files/patch-setup_lz4.diff b/archivers/py-borgbackup/files/patch-setup_lz4.diff new file mode 100644 index 000000000000..6e7cc08e9a7e --- /dev/null +++ b/archivers/py-borgbackup/files/patch-setup_lz4.diff @@ -0,0 +1,10 @@ ++++ setup_lz4.py +@@ -24,7 +24,7 @@ + for prefix in prefixes: + filename = os.path.join(prefix, 'include', 'lz4.h') + if os.path.exists(filename): +- with open(filename, 'r') as fd: ++ with open(filename, 'r', encoding='utf-8') as fd: + if 'LZ4_compress_default' in fd.read(): # requires lz4 >= 1.7.0 (r129) + return prefix + -- 2.14.1