[Buildroot] [git commit branch/2022.02.x] package/xxhash: fix static library install
Peter Korsgaard
peter at korsgaard.com
Mon Jan 2 14:20:52 UTC 2023
commit: https://git.buildroot.net/buildroot/commit/?id=879200c2677ee1835d500f175ace22158eac94d7
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2022.02.x
Install headers when building statically
Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
(cherry picked from commit 0945e4913fba932217278f484de04cc366415bd6)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
...ile-add-install_libxxhash.includes-target.patch | 39 ++++++++++++++++++++++
package/xxhash/xxhash.mk | 15 +++++++--
2 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/package/xxhash/0004-Makefile-add-install_libxxhash.includes-target.patch b/package/xxhash/0004-Makefile-add-install_libxxhash.includes-target.patch
new file mode 100644
index 0000000000..22c8cdaadf
--- /dev/null
+++ b/package/xxhash/0004-Makefile-add-install_libxxhash.includes-target.patch
@@ -0,0 +1,39 @@
+From b7c91f761b6d0b79398d0a064d2d6e34de3dfa47 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+Date: Tue, 27 Dec 2022 23:12:37 +0100
+Subject: [PATCH] Makefile: add install_libxxhash.includes target
+
+Add install_libxxhash.includes to be able to install headers when
+building and installing the static library
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
+[Upstream status: https://github.com/Cyan4973/xxHash/pull/776]
+---
+ Makefile | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index cfa5779..2276282 100644
+--- a/Makefile
++++ b/Makefile
+@@ -557,6 +557,8 @@ install_libxxhash: libxxhash
+ $(Q)$(INSTALL_PROGRAM) $(LIBXXH) $(DESTDIR)$(LIBDIR)
+ $(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR)
+ $(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT)
++
++install_libxxhash.includes:
+ $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR) # includes
+ $(Q)$(INSTALL_DATA) xxhash.h $(DESTDIR)$(INCLUDEDIR)
+ $(Q)$(INSTALL_DATA) xxh3.h $(DESTDIR)$(INCLUDEDIR) # for compatibility, will be removed in v0.9.0
+@@ -586,7 +588,7 @@ install_man:
+ $(Q)ln -sf xxhsum.1 $(DESTDIR)$(MANDIR)/xxh128sum.1
+
+ .PHONY: install
+-install: install_libxxhash.a install_libxxhash install_libxxhash.pc install_xxhsum install_man ## install libraries, CLI, links and man page
++install: install_libxxhash.a install_libxxhash install_libxxhash.includes install_libxxhash.pc install_xxhsum install_man ## install libraries, CLI, links and man page
+ @echo xxhash installation completed
+
+ .PHONY: uninstall
+--
+2.35.1
+
diff --git a/package/xxhash/xxhash.mk b/package/xxhash/xxhash.mk
index a8f8d1d179..6932113f14 100644
--- a/package/xxhash/xxhash.mk
+++ b/package/xxhash/xxhash.mk
@@ -15,14 +15,23 @@ XXHASH_INSTALL_TARGETS = install_xxhsum
ifeq ($(BR2_STATIC_LIBS),y)
XXHASH_TARGETS += libxxhash.a libxxhash.pc
-XXHASH_INSTALL_TARGETS += install_libxxhash.a install_libxxhash.pc
+XXHASH_INSTALL_TARGETS += \
+ install_libxxhash.a \
+ install_libxxhash.includes \
+ install_libxxhash.pc
else ifeq ($(BR2_SHARED_LIBS),y)
XXHASH_TARGETS += libxxhash libxxhash.pc
-XXHASH_INSTALL_TARGETS += install_libxxhash install_libxxhash.pc
+XXHASH_INSTALL_TARGETS += \
+ install_libxxhash \
+ install_libxxhash.includes \
+ install_libxxhash.pc
else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
XXHASH_TARGETS += libxxhash.a libxxhash libxxhash.pc
XXHASH_INSTALL_TARGETS += \
- install_libxxhash.a install_libxxhash install_libxxhash.pc
+ install_libxxhash.a \
+ install_libxxhash \
+ install_libxxhash.includes \
+ install_libxxhash.pc
endif
define XXHASH_BUILD_CMDS
More information about the buildroot
mailing list