package/sslh: add optional pcre dependency
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Fri, 5 Apr 2019 21:16:35 +0000 (23:16 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 11 Apr 2019 13:01:47 +0000 (15:01 +0200)
pcre dependency has been added in version 1.18 and
https://github.com/yrutschle/sslh/commit/ab3324be477b2663196e0cc73d96aa38d59da65a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/sslh/sslh.mk

index 3a9223b23aee7ffb7eae502c81e040608f09ef23..5c868dfe2f7fee4d010e200b6d1544609b34cfc2 100644 (file)
@@ -11,12 +11,22 @@ SSLH_LICENSE_FILES = COPYING
 
 SSLH_DEPENDENCIES = libconfig
 
+SSLH_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS)
+
+ifeq ($(BR2_PACKAGE_PCRE),y)
+SSLH_DEPENDENCIES += pcre
+SSLH_MAKE_OPTS += USELIBPCRE=1
+else
+SSLH_MAKE_OPTS += USELIBPCRE=
+endif
+
 define SSLH_BUILD_CMDS
-       $(TARGET_MAKE_ENV) $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+       $(TARGET_MAKE_ENV) $(MAKE1) $(SSLH_MAKE_OPTS) -C $(@D)
 endef
 
 define SSLH_INSTALL_TARGET_CMDS
-       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+       $(TARGET_MAKE_ENV) $(MAKE) $(SSLH_MAKE_OPTS) -C $(@D) \
+               DESTDIR=$(TARGET_DIR) install
 endef
 
 define SSLH_INSTALL_INIT_SYSV