Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2,1/1] package/libcap: new fix to libcap.pc
@ 2020-11-30  6:48 Fabrice Fontaine
  2020-11-30 20:50 ` [Buildroot] [PATCH v2, 1/1] " Peter Seiderer
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2020-11-30  6:48 UTC (permalink / raw)
  To: buildroot

As spotted by Peter Seiderer, prefix must be passed to
{HOST_LIBCAP,LIBCAP}_BUILD_CMDS so libdir in libcap.pc is set to
/usr/lib instead of /lib

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2:
 - Also fi host libcap

 package/libcap/libcap.mk | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/package/libcap/libcap.mk b/package/libcap/libcap.mk
index a4a9170193..7bb8f57671 100644
--- a/package/libcap/libcap.mk
+++ b/package/libcap/libcap.mk
@@ -20,6 +20,7 @@ LIBCAP_MAKE_FLAGS = \
 	BUILD_CC="$(HOSTCC)" \
 	BUILD_CFLAGS="$(HOST_CFLAGS)" \
 	lib=lib \
+	prefix=/usr \
 	SHARED=$(if $(BR2_STATIC_LIBS),,yes) \
 	PTHREADS=$(if $(BR2_TOOLCHAIN_HAS_THREADS),yes,)
 
@@ -39,27 +40,31 @@ endef
 define LIBCAP_INSTALL_STAGING_CMDS
 	$(foreach d,$(LIBCAP_MAKE_DIRS), \
 		$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$(d) $(LIBCAP_MAKE_FLAGS) \
-			DESTDIR=$(STAGING_DIR) prefix=/usr install
+			DESTDIR=$(STAGING_DIR) install
 	)
 endef
 
 define LIBCAP_INSTALL_TARGET_CMDS
 	$(foreach d,$(LIBCAP_MAKE_DIRS), \
 		$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/$(d) $(LIBCAP_MAKE_FLAGS) \
-			DESTDIR=$(TARGET_DIR) prefix=/usr install
+			DESTDIR=$(TARGET_DIR) install
 	)
 endef
 
+HOST_LIBCAP_MAKE_FLAGS = \
+	DYNAMIC=yes \
+	GOLANG=no \
+	lib=lib \
+	prefix=$(HOST_DIR) \
+	RAISE_SETFCAP=no
+
 define HOST_LIBCAP_BUILD_CMDS
-	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)\
-		DYNAMIC=yes \
-		RAISE_SETFCAP=no GOLANG=no lib=lib
+	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
+		$(HOST_LIBCAP_MAKE_FLAGS)
 endef
 
 define HOST_LIBCAP_INSTALL_CMDS
-	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) prefix=$(HOST_DIR) \
-		DYNAMIC=yes \
-		RAISE_SETFCAP=no GOLANG=no lib=lib install
+	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_LIBCAP_MAKE_FLAGS) install
 endef
 
 $(eval $(generic-package))
-- 
2.29.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-30 20:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-30  6:48 [Buildroot] [PATCH v2,1/1] package/libcap: new fix to libcap.pc Fabrice Fontaine
2020-11-30 20:50 ` [Buildroot] [PATCH v2, 1/1] " Peter Seiderer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox