From 3922765fdd91e49bbc1ebadadb99dff3a56ef813 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 12 Jan 2019 07:35:01 +0000 Subject: [PATCH] Add upstream patch which fixes libcapstone.pc https://github.com/aquynh/capstone/issues/1339 --- ...-in-pkg-config-for-Makefile-too-1339.patch | 30 +++++++++++++++++++ capstone.spec | 10 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch diff --git a/0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch b/0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch new file mode 100644 index 0000000..b45690a --- /dev/null +++ b/0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch @@ -0,0 +1,30 @@ +From d36b7395e69c70a8d98f78f2bcb20a32bf9f3173 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 11 Jan 2019 13:48:11 +0000 +Subject: [PATCH] Fix include path in pkg-config for Makefile too (#1339). + +Commit 0a39b785d3 fixed the pkg-config include path when using cmake. +However it didn't fix it for the Makefile. This fixes the Makefile +path. + +Signed-off-by: Richard W.M. Jones +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 378f2fea..4a2c2d35 100644 +--- a/Makefile ++++ b/Makefile +@@ -514,7 +514,7 @@ define generate-pkgcfg + echo 'Description: Capstone disassembly engine' >> $(PKGCFGF) + echo 'Version: $(PKG_VERSION)' >> $(PKGCFGF) + echo 'libdir=$(LIBDIR)' >> $(PKGCFGF) +- echo 'includedir=$(INCDIR)' >> $(PKGCFGF) ++ echo 'includedir=$(INCDIR)/capstone' >> $(PKGCFGF) + echo 'archive=$${libdir}/libcapstone.a' >> $(PKGCFGF) + echo 'Libs: -L$${libdir} -lcapstone' >> $(PKGCFGF) + echo 'Cflags: -I$${includedir}' >> $(PKGCFGF) +-- +2.20.1 + diff --git a/capstone.spec b/capstone.spec index f19eea7..fdba216 100644 --- a/capstone.spec +++ b/capstone.spec @@ -1,6 +1,6 @@ Name: capstone Version: 4.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A lightweight multi-platform, multi-architecture disassembly framework %global gituser aquynh @@ -24,6 +24,10 @@ Source0: https://github.com/%{gituser}/%{gitname}/archive/%{version}.tar. # it possible to specify PYTHON2 and PYTHON3 binary to be explicit that by "python" we mean "python2" # Patch0: capstone-python.patch +# Upstream patch which fixes libcapstone.pc. +# See: https://github.com/aquynh/capstone/issues/1339 +Patch1: 0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch + %if 0%{?fedora} > 12 %global with_python3 1 %else @@ -182,6 +186,10 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name %{_javadir}/ %changelog +* Sat Jan 12 2019 Richard W.M. Jones - 4.0.1-2 +- Add upstream patch which fixes libcapstone.pc + https://github.com/aquynh/capstone/issues/1339 + * Fri Jan 11 2019 Michal Ambroz - 4.0.1-1 - bump to 4.0.1 release