diff mbox series

[6/6] package/gnupg2: Add host package

Message ID e73a9bd517211d64f4c0c167a57b2e578665131d.1712957992.git.ben.hutchings@mind.be
State New
Headers show
Series Add host packages of gnupg2 and its dependencies | expand

Commit Message

Ben Hutchings April 12, 2024, 9:43 p.m. UTC
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
---
 package/Config.in.host        |  1 +
 package/gnupg2/Config.in.host | 13 +++++++++++++
 package/gnupg2/gnupg2.mk      | 11 +++++++++++
 3 files changed, 25 insertions(+)
 create mode 100644 package/gnupg2/Config.in.host
diff mbox series

Patch

diff --git a/package/Config.in.host b/package/Config.in.host
index f03ca16b7b..635a7ebc13 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -43,6 +43,7 @@  menu "Host utilities"
 	source "package/genimage/Config.in.host"
 	source "package/genpart/Config.in.host"
 	source "package/gnupg/Config.in.host"
+	source "package/gnupg2/Config.in.host"
 	source "package/go/Config.in.host"
 	source "package/go-bootstrap-stage1/Config.in.host"
 	source "package/go-bootstrap-stage2/Config.in.host"
diff --git a/package/gnupg2/Config.in.host b/package/gnupg2/Config.in.host
new file mode 100644
index 0000000000..c636cbee8b
--- /dev/null
+++ b/package/gnupg2/Config.in.host
@@ -0,0 +1,13 @@ 
+config BR2_PACKAGE_HOST_GNUPG2
+	bool "host gnupg2"
+	depends on !BR2_PACKAGE_HOST_GNUPG
+	help
+	  GnuPG is the GNU project's complete and free implementation
+	  of the OpenPGP standard as defined by RFC4880. GnuPG allows
+	  to encrypt and sign your data and communication, features a
+	  versatile key management system as well as access modules
+	  for all kinds of public key directories. GnuPG, also known
+	  as GPG, is a command line tool with features for easy
+	  integration with other applications.
+
+	  http://gnupg.org/
diff --git a/package/gnupg2/gnupg2.mk b/package/gnupg2/gnupg2.mk
index 986da4790c..b7aa50f801 100644
--- a/package/gnupg2/gnupg2.mk
+++ b/package/gnupg2/gnupg2.mk
@@ -14,6 +14,8 @@  GNUPG2_CPE_ID_PRODUCT = gnupg
 GNUPG2_SELINUX_MODULES = gpg
 GNUPG2_DEPENDENCIES = zlib libgpg-error libgcrypt libassuan libksba libnpth \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv) host-pkgconf
+HOST_GNUPG2_DEPENDENCIES = host-zlib host-libgpg-error host-libgcrypt host-libassuan \
+	host-libksba host-libnpth host-pkgconf
 
 GNUPG2_CONF_OPTS = \
 	--disable-rpath \
@@ -23,9 +25,17 @@  GNUPG2_CONF_OPTS = \
 	--with-ksba-prefix=$(STAGING_DIR)/usr \
 	--with-npth-prefix=$(STAGING_DIR)/usr
 
+HOST_GNUPG2_CONF_OPTS = \
+	--with-gpg-error-prefix=$(HOST_DIR) \
+	--with-libgcrypt-prefix=$(HOST_DIR) \
+	--with-libassuan-prefix=$(HOST_DIR) \
+	--with-ksba-prefix=$(HOST_DIR) \
+	--with-npth-prefix=$(HOST_DIR)
+
 # Force the path to "gpgrt-config" (from the libgpg-error package) to
 # avoid using the one on host, if present.
 GNUPG2_CONF_ENV += GPGRT_CONFIG=$(STAGING_DIR)/usr/bin/gpgrt-config
+HOST_GNUPG2_CONF_ENV += GPGRT_CONFIG=$(HOST_DIR)/bin/gpgrt-config
 
 ifneq ($(BR2_PACKAGE_GNUPG2_GPGV),y)
 define GNUPG2_REMOVE_GPGV
@@ -71,3 +81,4 @@  GNUPG2_CONF_OPTS += --disable-sqlite
 endif
 
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))