pcre: remove unnecessary dependency on C++ lib
authorDENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Tue, 23 Jul 2019 06:01:29 +0000 (14:01 +0800)
committerRosen Penev <rosenp@gmail.com>
Wed, 13 Nov 2019 04:16:00 +0000 (20:16 -0800)
Add libpcrecpp to PKG_CONFIG_DEPENDS to properly trigger
reconfiguration, avoiding unnecessary dependency.

This reverts commit 17090fecf18c795f5bfa5e1ea375ccd65d24f227.
This reverts commit ec138f51ab54873252bbe3e848f5fa9c20de78b9.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
(cherry-picked from 41814de0fcc52ce055102ab2f81870bccf884b12)

libs/pcre/Makefile

index e225f29b5b22102aa9ecf94810cfc025306ba236..720142332b2fbe68e085f450db3e433548cab620 100644 (file)
@@ -24,6 +24,8 @@ PKG_FIXUP:=autoreconf
 
 PKG_INSTALL:=1
 
+PKG_CONFIG_DEPENDS := CONFIG_PACKAGE_libpcrecpp
+
 include $(INCLUDE_DIR)/uclibc++.mk
 include $(INCLUDE_DIR)/package.mk
 
@@ -31,7 +33,6 @@ define Package/libpcre/default
   SECTION:=libs
   CATEGORY:=Libraries
   URL:=https://www.pcre.org/
-  DEPENDS:=$(CXX_DEPENDS)
 endef
 
 define Package/libpcre
@@ -47,7 +48,7 @@ endef
 define Package/libpcrecpp
   $(call Package/libpcre/default)
   TITLE:=C++ wrapper for Perl Compatible Regular Expression library
-  DEPENDS:=+libpcre
+  DEPENDS:=+libpcre $(CXX_DEPENDS)
 endef
 
 TARGET_CFLAGS += $(FPIC)
@@ -57,8 +58,7 @@ CONFIGURE_ARGS += \
        --enable-unicode-properties \
        --enable-pcre16 \
        --with-match-limit-recursion=16000 \
-       --enable-cpp
-
+       $(if $(CONFIG_PACKAGE_libpcrecpp),--enable,--disable)-cpp
 
 MAKE_FLAGS += \
        CFLAGS="$(TARGET_CFLAGS)"