From patchwork Sun Jul 28 06:10:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 1137925 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embedded.rocks Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=embedded.rocks header.i=@embedded.rocks header.b="O1MmS6oL"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45xC9m4FtCz9s7T for ; Sun, 28 Jul 2019 16:10:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 79FFB86F7E; Sun, 28 Jul 2019 06:10:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wltUbw_qyYlw; Sun, 28 Jul 2019 06:10:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8B2158705D; Sun, 28 Jul 2019 06:10:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id ED6E11BF95F for ; Sun, 28 Jul 2019 06:10:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id EAB46204A4 for ; Sun, 28 Jul 2019 06:10:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F3400yjuuLME for ; Sun, 28 Jul 2019 06:10:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by silver.osuosl.org (Postfix) with ESMTPS id C34F5203A7 for ; Sun, 28 Jul 2019 06:10:39 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id A1F342400E6 for ; Sun, 28 Jul 2019 08:10:36 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 45xC9R130Cz9rxH; Sun, 28 Jul 2019 08:10:35 +0200 (CEST) Authentication-Results: mail.embedded.rocks (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=embedded.rocks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded.rocks; h=content-transfer-encoding:content-type:content-type :mime-version:references:in-reply-to:x-mailer:message-id:date :date:subject:subject:from:from:received:received; s=default; t= 1564294234; x=1564899035; bh=Rbajy5O1due24mbsm3RE0lPzTQkpgJssh7T AeXl4+Q0=; b=O1MmS6oLFkX/YY1ENqWyCiiR6EzOC11NphiRQ72ZF8jGYR1ZP+T vgLHtwh9gyAOab2iF2O/tvHR6hV5n+iSv3P34JFm/vzdQ+XpoqA4W4R3qqg8jHiu bSUbInfasJokvqshZMHM1zNW1LHKy16mzHRqLmlIkkpT0P+z+TgGwQTP7yZBPZXX rFF/kh77T2B4tYAjbhT6GWeBTsVkkIgluJuBXjjqcS76nPBIhhOhanlgpL3ULyp6 FZBs48QTwW1w0uw+83lbPuHejYL2xqTZHLP1/6UVp1L9Rs4WmSeS/OFluxo8yPjZ 6+5JDcwnhywuTFL/JUcPlBAKQWPvFIdKo7w== Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 8vqPO5tFuyUn; Sun, 28 Jul 2019 08:10:34 +0200 (CEST) Received: from nzxt.fritz.box (port-92-195-79-126.dynamic.qsc.de [92.195.79.126]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Sun, 28 Jul 2019 08:10:34 +0200 (CEST) From: =?utf-8?q?J=C3=B6rg_Krause?= To: buildroot@buildroot.org Date: Sun, 28 Jul 2019 08:10:22 +0200 Message-Id: <20190728061023.5283-3-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190728061023.5283-1-joerg.krause@embedded.rocks> References: <20190728061023.5283-1-joerg.krause@embedded.rocks> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 2/3] package/libgcrypt: add upstream patch to add pkg-config file X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" libgrypt provides a config file `libgcrypt-config`. After the version bump to 1.8.4 upstream added a pkg-config file as well [1]. Using the pkg-config file is preferred over using the package provided config file. For example, the Meson build system requires that for every special config file an entry is added to the `[binary]` section in the cross-compilation.conf file, otherwise it will use the config file found in `PATH`. This is bad when cross-compiling as `PATH` will include pathes to the host and therefore Meson will wrongly use the host config file. To simplify using libgcrypt for packages using the meson infrastructure lets add the pkg-config file. Note, that the additional upstream patch 0003 fixes a typo in the pkg-config file. [1] https://github.com/gpg/libgcrypt/commit/97194b422bc89a6137f4e218d4cdee118c63e96e Signed-off-by: Jörg Krause --- v4: * use individual patches instead of a squashed patch [Arnout Vandecappelle] v3: * initial commit --- ...-libgcrypt.pc-generated-by-configure.patch | 93 +++++++++++++++++++ .../0003-build-Fix-libgcrypt.pc.patch | 31 +++++++ package/libgcrypt/libgcrypt.mk | 1 + 3 files changed, 125 insertions(+) create mode 100644 package/libgcrypt/0002-build-Provide-libgcrypt.pc-generated-by-configure.patch create mode 100644 package/libgcrypt/0003-build-Fix-libgcrypt.pc.patch diff --git a/package/libgcrypt/0002-build-Provide-libgcrypt.pc-generated-by-configure.patch b/package/libgcrypt/0002-build-Provide-libgcrypt.pc-generated-by-configure.patch new file mode 100644 index 0000000000..eaedeaaf2e --- /dev/null +++ b/package/libgcrypt/0002-build-Provide-libgcrypt.pc-generated-by-configure.patch @@ -0,0 +1,93 @@ +From c006d8b897229e22f80cd6105fd64d0630f68867 Mon Sep 17 00:00:00 2001 +From: NIIBE Yutaka +Date: Wed, 24 Oct 2018 14:57:53 +0900 +Subject: [PATCH 1/2] build: Provide libgcrypt.pc, generated by configure. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* configure.ac: Generate src/libgcrypt.pc. +* src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New. +(EXTRA_DIST): Add libgcrypt.pc.in. +* src/libgcrypt-config.in: Use @PACKAGE_VERSION@. +* src/libgcrypt.pc.in: New. + +Fetched from: 97194b422bc89a6137f4e218d4cdee118c63e96e + +Signed-off-by: NIIBE Yutaka +Signed-off-by: Jörg Krause +--- + configure.ac | 1 + + src/Makefile.am | 5 ++++- + src/libgcrypt-config.in | 2 +- + src/libgcrypt.pc.in | 17 +++++++++++++++++ + 4 files changed, 23 insertions(+), 2 deletions(-) + create mode 100644 src/libgcrypt.pc.in + +diff --git a/configure.ac b/configure.ac +index ce11162d..4e788714 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2613,6 +2613,7 @@ doc/Makefile + src/Makefile + src/gcrypt.h + src/libgcrypt-config ++src/libgcrypt.pc + src/versioninfo.rc + tests/Makefile + ]) +diff --git a/src/Makefile.am b/src/Makefile.am +index 3cc4a552..82d6e8a0 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -20,8 +20,11 @@ + + ## Process this file with automake to produce Makefile.in + ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = libgcrypt.pc ++ + EXTRA_DIST = libgcrypt-config.in libgcrypt.m4 libgcrypt.vers \ +- gcrypt.h.in libgcrypt.def ++ gcrypt.h.in libgcrypt.def libgcrypt.pc.in + + bin_SCRIPTS = libgcrypt-config + m4datadir = $(datadir)/aclocal +diff --git a/src/libgcrypt-config.in b/src/libgcrypt-config.in +index c052638c..f7a13afe 100644 +--- a/src/libgcrypt-config.in ++++ b/src/libgcrypt-config.in +@@ -14,7 +14,7 @@ + # General. + prefix="@prefix@" + exec_prefix="@exec_prefix@" +-version="@VERSION@" ++version="@PACKAGE_VERSION@" + includedir="@includedir@" + libdir="@libdir@" + gpg_error_libs="@GPG_ERROR_LIBS@" +diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in +new file mode 100644 +index 00000000..5472da53 +--- /dev/null ++++ b/src/libgcrypt.pc.in +@@ -0,0 +1,17 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++includedir=@includedir@ ++libdir=@libdir@ ++host=@LIBGCRYPT_CONFIG_HOST@ ++api_version=@LIBGCRYPT_CONFIG_API_VERSION@ ++symmetric_ciphers="@LIBGCRYPT_CIPHERS@" ++asymmetric_ciphers="@LIBGCRYPT_PUBKEY_CIPHERS@" ++digests="@LIBGCRYPT_DIGESTS@" ++ ++Name: libgcrypt ++Description: General purpose cryptographic library ++Requires: gpg-error ++Version: @PACKAGE_VERSION@ ++Cflags: @LIBGCRYPT_CONFIG_CFLAGS@ ++Libs: @LIBGCRYPT_CONFIG_LIB@ ++URL: https://www.gnupg.org/software/libgcrypt/index.html +-- +2.22.0 diff --git a/package/libgcrypt/0003-build-Fix-libgcrypt.pc.patch b/package/libgcrypt/0003-build-Fix-libgcrypt.pc.patch new file mode 100644 index 0000000000..8d4639a655 --- /dev/null +++ b/package/libgcrypt/0003-build-Fix-libgcrypt.pc.patch @@ -0,0 +1,31 @@ +From de0245ddfca3cea31311eae9f7f3e8c0da072252 Mon Sep 17 00:00:00 2001 +From: NIIBE Yutaka +Date: Wed, 24 Oct 2018 15:34:57 +0900 +Subject: [PATCH 2/2] build: Fix libgcrypt.pc. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* src/libgcrypt.pc.in: Fix typo. + +Fetched from: 0e071372fc0e6fed4a449955ed0789803ba5e709 + +Signed-off-by: NIIBE Yutaka +Signed-off-by: Jörg Krause +--- + src/libgcrypt.pc.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in +index 5472da53..ec68fa2d 100644 +--- a/src/libgcrypt.pc.in ++++ b/src/libgcrypt.pc.in +@@ -13,5 +13,5 @@ Description: General purpose cryptographic library + Requires: gpg-error + Version: @PACKAGE_VERSION@ + Cflags: @LIBGCRYPT_CONFIG_CFLAGS@ +-Libs: @LIBGCRYPT_CONFIG_LIB@ ++Libs: @LIBGCRYPT_CONFIG_LIBS@ + URL: https://www.gnupg.org/software/libgcrypt/index.html +-- +2.22.0 diff --git a/package/libgcrypt/libgcrypt.mk b/package/libgcrypt/libgcrypt.mk index 5aa44481ae..2799a6fba2 100644 --- a/package/libgcrypt/libgcrypt.mk +++ b/package/libgcrypt/libgcrypt.mk @@ -14,6 +14,7 @@ LIBGCRYPT_DEPENDENCIES = libgpg-error LIBGCRYPT_CONFIG_SCRIPTS = libgcrypt-config # Patching acinclude.m4 in 0001 +# Patching configure.ac and Makefile.am in 0002 LIBGCRYPT_AUTORECONF = YES LIBGCRYPT_CONF_OPTS = \ --with-gpg-error-prefix=$(STAGING_DIR)/usr