xref: /OK3568_Linux_fs/buildroot/package/sngrep/sngrep.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# sngrep
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunSNGREP_VERSION = 1.4.7
8*4882a593SmuzhiyunSNGREP_SITE = $(call github,irontec,sngrep,v$(SNGREP_VERSION))
9*4882a593SmuzhiyunSNGREP_LICENSE = GPL-3.0+
10*4882a593SmuzhiyunSNGREP_LICENSE_FILES = LICENSE
11*4882a593SmuzhiyunSNGREP_AUTORECONF = YES
12*4882a593SmuzhiyunSNGREP_DEPENDENCIES = libpcap ncurses host-pkgconf
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunSNGREP_CONF_ENV += \
15*4882a593Smuzhiyun	$(if $(BR2_STATIC_LIBS),LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --libs`")
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunSNGREP_CONF_OPTS += --disable-unicode
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun# openssl and gnutls can't be enabled at the same time.
20*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_OPENSSL),y)
21*4882a593SmuzhiyunSNGREP_DEPENDENCIES += openssl
22*4882a593SmuzhiyunSNGREP_CONF_OPTS += --with-openssl --without-gnutls
23*4882a593Smuzhiyun# gnutls support also requires libgcrypt
24*4882a593Smuzhiyunelse ifeq ($(BR2_PACKAGE_GNUTLS)$(BR2_PACKAGE_LIBGCRYPT),yy)
25*4882a593SmuzhiyunSNGREP_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config
26*4882a593SmuzhiyunSNGREP_DEPENDENCIES += gnutls libgcrypt
27*4882a593SmuzhiyunSNGREP_CONF_OPTS += --with-gnutls --without-openssl
28*4882a593Smuzhiyunelse
29*4882a593SmuzhiyunSNGREP_CONF_OPTS += --without-gnutls --without-openssl
30*4882a593Smuzhiyunendif
31*4882a593Smuzhiyun
32*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_PCRE),y)
33*4882a593SmuzhiyunSNGREP_DEPENDENCIES += pcre
34*4882a593SmuzhiyunSNGREP_CONF_OPTS += --with-pcre
35*4882a593Smuzhiyunelse
36*4882a593SmuzhiyunSNGREP_CONF_OPTS += --without-pcre
37*4882a593Smuzhiyunendif
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun$(eval $(autotools-package))
40