Hi,

.pc files are not copied to the install directory, so python (as a
library) cannot be checked from configure.ac by PKG_CHECK_MODULES. It
caused problem during the port of Zorp GPL to OpenWrt. Possible solution
is attached.

Best regards,
Szilárd Pfeiffer
>From b7a1ac80ec6536b165e2f1db61d4bac9a086c4bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Szil=C3=A1rd=20Pfeiffer?= <coro...@pfeifferszilard.hu>
Date: Thu, 27 Nov 2014 23:19:40 +0100
Subject: [PATCH] Install .pc files from Python package.

---
 lang/python/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lang/python/Makefile b/lang/python/Makefile
index 954612f..6039b2e 100644
--- a/lang/python/Makefile
+++ b/lang/python/Makefile
@@ -104,7 +104,7 @@ endef
 
 define Build/InstallDev
 	$(INSTALL_DIR) $(STAGING_DIR)/mk/
-	$(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/
+	$(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib/ $(1)/usr/lib/pkgconfig
 	$(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/
 	$(INSTALL_DATA) ./files/python-package.mk $(STAGING_DIR)/mk/
 	$(CP) \
@@ -115,6 +115,11 @@ define Build/InstallDev
 		$(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
 		$(1)/usr/lib/
 	$(CP) \
+		$(STAGING_DIR_HOST)/lib/pkgconfig/python.pc \
+		$(STAGING_DIR_HOST)/lib/pkgconfig/python2.pc \
+		$(STAGING_DIR_HOST)/lib/pkgconfig/python-$(PYTHON_VERSION).pc \
+		$(1)/usr/lib/pkgconfig
+	$(CP) \
 		$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
 		$(1)/usr/lib/python$(PYTHON_VERSION)/
 endef
-- 
1.9.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to