diff --git a/lib-make.patch b/lib-make.patch new file mode 100644 index 0000000..1b45b29 --- /dev/null +++ b/lib-make.patch @@ -0,0 +1,38 @@ +From 66db79bbb0977bea7023000dca6211c2cacf9a07 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?P=C3=A1draig=20Brady?= +Date: Mon, 25 May 2020 13:16:31 +0100 +Subject: [PATCH] fix generalization of pattern rules in lib/Makefile + +This was introduced in v1.4.4-383-gf77fd5ce +and results in the default rule in lib/ doing nothing. +--- + lib/Makefile | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/lib/Makefile b/lib/Makefile +index e6213ac8..de437a98 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -221,14 +221,14 @@ libzstd : $(LIBZSTD) + lib : libzstd.a libzstd + + .PHONY: lib-mt +-%-mt : CPPFLAGS += -DZSTD_MULTITHREAD +-%-mt : LDFLAGS += -pthread +-%-mt : % ++% : CPPFLAGS += -DZSTD_MULTITHREAD ++% : LDFLAGS += -pthread ++% : lib + @echo multi-threading build completed + + .PHONY: lib-release +-%-release : DEBUGFLAGS := +-%-release : % ++% : DEBUGFLAGS := ++% : lib + @echo release build completed + + +-- +2.26.2 + diff --git a/zstd.spec b/zstd.spec index e6f3749..4f7c881 100644 --- a/zstd.spec +++ b/zstd.spec @@ -13,7 +13,7 @@ Name: zstd Version: 1.4.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Zstd compression library License: BSD and GPLv2 @@ -21,6 +21,7 @@ URL: https://github.com/facebook/zstd Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch1: pzstd.1.patch +Patch2: lib-make.patch BuildRequires: gcc gtest-devel %if %{with pzstd} @@ -57,6 +58,7 @@ find -name .gitignore -delete %if %{with pzstd} %patch1 -p1 %endif +%patch2 -p1 %build export CFLAGS="$RPM_OPT_FLAGS" @@ -122,6 +124,9 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1 %ldconfig_scriptlets -n lib%{name} %changelog +* Fri May 25 2020 Pádraig Brady - 1.4.5-2 +- Build shared library with correct compiler flags + * Fri May 22 2020 Pádraig Brady - 1.4.5-1 - Latest upstream