aboutsummaryrefslogtreecommitdiff
path: root/utils/zstd
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-06-09 16:20:45 -0700
committerRosen Penev <rosenp@gmail.com>2020-06-09 16:31:06 -0700
commitec3798645d644d5fa9727a301b4ccdd24e278063 (patch)
treefd045737250060ec4ffc294b895a1a3839eb42ce /utils/zstd
parent2a3948b04dc90600495347e568a659c1605c9704 (diff)
zstd: fix compilation without host distutils
This is the case in debian. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'utils/zstd')
-rw-r--r--utils/zstd/Makefile2
-rw-r--r--utils/zstd/patches/010-python.patch21
2 files changed, 22 insertions, 1 deletions
diff --git a/utils/zstd/Makefile b/utils/zstd/Makefile
index 2542e087c..06030ec75 100644
--- a/utils/zstd/Makefile
+++ b/utils/zstd/Makefile
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=zstd
PKG_VERSION:=1.4.5
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.zst
PKG_SOURCE_URL:=https://github.com/facebook/zstd/releases/download/v$(PKG_VERSION)
diff --git a/utils/zstd/patches/010-python.patch b/utils/zstd/patches/010-python.patch
new file mode 100644
index 000000000..c35c515c3
--- /dev/null
+++ b/utils/zstd/patches/010-python.patch
@@ -0,0 +1,21 @@
+--- a/build/meson/meson.build
++++ b/build/meson/meson.build
+@@ -22,7 +22,6 @@ project('zstd',
+ cc = meson.get_compiler('c')
+ cxx = meson.get_compiler('cpp')
+ pkgconfig = import('pkgconfig')
+-python3 = import('python').find_installation()
+ windows_mod = import('windows')
+
+ host_machine_os = host_machine.system()
+@@ -40,8 +39,8 @@ compiler_msvc = 'msvc'
+ zstd_version = meson.project_version()
+
+ zstd_h_file = join_paths(meson.current_source_dir(), '../../lib/zstd.h')
+-GetZstdLibraryVersion_py = files('GetZstdLibraryVersion.py')
+-r = run_command(python3, GetZstdLibraryVersion_py, zstd_h_file)
++GetZstdLibraryVersion_py = find_program('GetZstdLibraryVersion.py', native : true)
++r = run_command(GetZstdLibraryVersion_py, zstd_h_file)
+ if r.returncode() == 0
+ zstd_version = r.stdout().strip()
+ message('Project version is now: @0@'.format(zstd_version))