1################################################################################
2#
3# libgpgme
4#
5################################################################################
6
7LIBGPGME_VERSION = 1.23.2
8LIBGPGME_SITE = https://gnupg.org/ftp/gcrypt/gpgme
9LIBGPGME_SOURCE = gpgme-$(LIBGPGME_VERSION).tar.bz2
10LIBGPGME_LICENSE = LGPL-2.1+
11LIBGPGME_LICENSE_FILES = COPYING.LESSER
12LIBGPGME_CPE_ID_VENDOR = gnupg
13LIBGPGME_CPE_ID_PRODUCT = gpgme
14LIBGPGME_INSTALL_STAGING = YES
15LIBGPGME_DEPENDENCIES = libassuan libgpg-error
16LIBGPGME_CONFIG_SCRIPTS = gpgme-config
17
18LIBGPGME_LANGUAGE_BINDINGS = cl
19# C++ bindings require a C++11 capable gcc, and -Wsuggest-override support
20ifeq ($(BR2_INSTALL_LIBSTDCPP)$(BR2_TOOLCHAIN_GCC_AT_LEAST_5),yy)
21LIBGPGME_LANGUAGE_BINDINGS += cpp
22endif
23
24LIBGPGME_CONF_OPTS = \
25	--with-gpg-error-prefix=$(STAGING_DIR)/usr \
26	--with-libassuan-prefix=$(STAGING_DIR)/usr \
27	--disable-gpgsm-test \
28	--disable-gpgconf-test \
29	--disable-g13-test \
30	--disable-gpg-test \
31	--enable-languages=$(subst $(space),$(comma),$(LIBGPGME_LANGUAGE_BINDINGS))
32
33# Force the path to "gpgrt-config" (from the libgpg-error package) to
34# avoid using the one on host, if present.
35LIBGPGME_CONF_ENV += GPGRT_CONFIG=$(STAGING_DIR)/usr/bin/gpgrt-config
36
37# Handle argp-standalone or it errors out during build
38ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
39# musl libc does not define error_t in errno.h, but argp.h does.
40# Assume we have error_t to avoid collision with the argp.h error_t.
41LIBGPGME_CONF_ENV += LIBS="-largp" ac_cv_type_error_t=yes
42LIBGPGME_DEPENDENCIES += argp-standalone
43endif
44
45# MIPS N64 (re)introduced getdents64 in kernel version 3.10
46ifeq ($(BR2_MIPS_NABI64)x$(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10),yx)
47LIBGPGME_CONF_OPTS += --disable-linux-getdents
48endif
49
50$(eval $(autotools-package))
51