[Buildroot] [PATCH] package/pcre: install headers in legacy location

Yann E. MORIN yann.morin.1998 at free.fr
Sat Dec 13 17:08:33 UTC 2014


nmap is looking for pcre headers in pcre/pcre.h which our current
version of pcre does not populates.

So, just create those as symlinks to the actual headers.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
Cc: Romain Naour <romain.naour at openwide.fr>

---
Note: this is not fixing anything for now, because the error in nmap is
hidden by another error. But this is relaticvely easy to fix, so here we
go... ;-)
---
 package/pcre/pcre.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/pcre/pcre.mk b/package/pcre/pcre.mk
index 4ff7abd..f2cf02d 100644
--- a/package/pcre/pcre.mk
+++ b/package/pcre/pcre.mk
@@ -22,5 +22,13 @@ PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_32),--enable-pcre32,--disable-pcre32)
 PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_UTF),--enable-utf,--disable-utf)
 PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_UCP),--enable-unicode-properties,--disable-unicode-properties)
 
+define PCRE_LEGACY_PATHS
+	$(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/pcre
+	for h in $(STAGING_DIR)/usr/include/pcre*.h; do \
+		ln -sf ../$${h##*/} $(STAGING_DIR)/usr/include/pcre/ || exit 1; \
+	done
+endef
+PCRE_POST_INSTALL_STAGING_HOOKS += PCRE_LEGACY_PATHS
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
1.9.1



More information about the buildroot mailing list