From a62732b506007d21d85d7e8bf5329d2962b28a43 Mon Sep 17 00:00:00 2001 From: Robert Schade Date: Sat, 25 Nov 2017 20:29:18 +0100 Subject: [PATCH] environment variables instead of patch --- borg.patch | 31 ------------------------------- build.sh | 5 +++-- 2 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 borg.patch diff --git a/borg.patch b/borg.patch deleted file mode 100644 index 1173270..0000000 --- a/borg.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git setup.py setup.py -index 33116acd..40db200f 100644 ---- setup.py -+++ setup.py -@@ -115,7 +115,7 @@ def detect_lz4(prefixes): - include_dirs = [] - library_dirs = [] - --possible_openssl_prefixes = ['/usr', '/usr/local', '/usr/local/opt/openssl', '/usr/local/ssl', '/usr/local/openssl', '/usr/local/borg', '/opt/local'] -+possible_openssl_prefixes = ['/usr', '/usr/local', '/usr/local/opt/openssl', '/usr/local/ssl', '/usr/local/openssl', '/usr/local/borg', '/opt/local', '/data/data/com.termux/files/usr/'] - if os.environ.get('BORG_OPENSSL_PREFIX'): - possible_openssl_prefixes.insert(0, os.environ.get('BORG_OPENSSL_PREFIX')) - ssl_prefix = detect_openssl(possible_openssl_prefixes) -@@ -125,7 +125,7 @@ def detect_lz4(prefixes): - library_dirs.append(os.path.join(ssl_prefix, 'lib')) - - --possible_lz4_prefixes = ['/usr', '/usr/local', '/usr/local/opt/lz4', '/usr/local/lz4', '/usr/local/borg', '/opt/local'] -+possible_lz4_prefixes = ['/usr', '/usr/local', '/usr/local/opt/lz4', '/usr/local/lz4', '/usr/local/borg', '/opt/local', '/data/data/com.termux/files/usr/'] - if os.environ.get('BORG_LZ4_PREFIX'): - possible_lz4_prefixes.insert(0, os.environ.get('BORG_LZ4_PREFIX')) - lz4_prefix = detect_lz4(possible_lz4_prefixes) -@@ -161,7 +161,7 @@ def detect_libb2(prefixes): - crypto_libraries = ['crypto'] - - possible_openssl_prefixes = ['/usr', '/usr/local', '/usr/local/opt/openssl', '/usr/local/ssl', '/usr/local/openssl', -- '/usr/local/borg', '/opt/local', '/opt/pkg', ] -+ '/usr/local/borg', '/opt/local', '/opt/pkg', '/data/data/com.termux/files/usr/'] - if os.environ.get('BORG_OPENSSL_PREFIX'): - possible_openssl_prefixes.insert(0, os.environ.get('BORG_OPENSSL_PREFIX')) - ssl_prefix = detect_openssl(possible_openssl_prefixes) diff --git a/build.sh b/build.sh index 3f31da3..0c20450 100755 --- a/build.sh +++ b/build.sh @@ -65,8 +65,9 @@ make make install install-lib install-dev cd .. -#patching paths in setup.py -patch -p0 < ../borg.patch +#patching paths +export BORG_OPENSSL_PREFIX="/data/data/com.termux/files/usr/" +export BORG_LZ4_PREFIX="/data/data/com.termux/files/usr/" pip install -e .