[PATCH] pcre: bring back C++ bindings
Rosen Penev
rosenp at gmail.com
Tue Mar 16 22:35:26 GMT 2021
It seems some people use them privately.
Reported-by: Jan Kardell <jan.kardell at telliq.com>
Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
package/libs/pcre/Makefile | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/package/libs/pcre/Makefile b/package/libs/pcre/Makefile
index 8644746b4b..60f30cd787 100644
--- a/package/libs/pcre/Makefile
+++ b/package/libs/pcre/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=pcre
PKG_VERSION:=8.44
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
@@ -24,6 +24,7 @@ PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_CONFIG_DEPENDS:=\
+ CONFIG_PACKAGE_libpcrecpp \
CONFIG_PCRE_JIT_ENABLED
include $(INCLUDE_DIR)/package.mk
@@ -54,12 +55,19 @@ define Package/libpcre32
TITLE:=A Perl Compatible Regular Expression library (32bit support)
endef
+define Package/libpcrecpp
+ $(call Package/libpcre/default)
+ TITLE:=C++ wrapper for Perl Compatible Regular Expression library
+ DEPENDS:=+libpcre +libstdcpp
+endef
+
+
HOST_CONFIGURE_ARGS += \
--enable-utf8 \
--enable-unicode-properties \
--enable-pcre16 \
--with-match-limit-recursion=16000 \
- --disable-cpp
+ --enable-cpp
TARGET_CFLAGS += $(FPIC)
@@ -70,7 +78,7 @@ CONFIGURE_ARGS += \
--enable-pcre32 \
$(if $(CONFIG_PCRE_JIT_ENABLED),--enable-jit,--disable-jit) \
--with-match-limit-recursion=16000 \
- -disable-cpp
+ --$(if $(CONFIG_PACKAGE_libpcrecpp),en,dis)able-cpp
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)"
@@ -109,7 +117,13 @@ define Package/libpcre32/install
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre32.so* $(1)/usr/lib/
endef
+define Package/libpcrecpp/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcrecpp.so.* $(1)/usr/lib/
+endef
+
$(eval $(call BuildPackage,libpcre))
$(eval $(call BuildPackage,libpcre16))
$(eval $(call BuildPackage,libpcre32))
+$(eval $(call BuildPackage,libpcrecpp))
$(eval $(call HostBuild))
--
2.25.1
More information about the openwrt-devel
mailing list