From 6ce510f38cafe86229b225bb6727e538bd35258c Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 8 Jun 2020 09:46:50 +0200 Subject: [PATCH] libksba: 1.3.5 -> 1.4.0 Adjust the pkg-config patch: - upstream added their own .pc file, so adding it again is not needed. - ksba.m4 adjustment to use pkg-config remains in place, but has to be rebased. Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- .../libksba/ksba-add-pkgconfig-support.patch | 130 ++++++++---------- .../{libksba_1.3.5.bb => libksba_1.4.0.bb} | 3 +- 2 files changed, 60 insertions(+), 73 deletions(-) rename meta/recipes-support/libksba/{libksba_1.3.5.bb => libksba_1.4.0.bb} (87%) diff --git a/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch b/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch index 5afe6de923..ebb7fa588a 100644 --- a/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch +++ b/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch @@ -1,3 +1,8 @@ +From 7bd2b060e9ea3e2ff11e67d1e98ab882819b28b7 Mon Sep 17 00:00:00 2001 +From: Chen Qi +Date: Mon, 3 Dec 2012 18:17:31 +0800 +Subject: [PATCH] libksba: add pkgconfig support + Upstream-Status: Denied Add pkgconfig support to libksba. @@ -6,78 +11,49 @@ They think pkgconfig adds no portability and maintaining them is not worthwhile. Signed-off-by: Chen Qi -Index: libksba-1.3.5/Makefile.am -=================================================================== ---- libksba-1.3.5.orig/Makefile.am -+++ libksba-1.3.5/Makefile.am -@@ -20,6 +20,9 @@ - - ACLOCAL_AMFLAGS = -I m4 -I gl/m4 - -+pkgconfigdir = ${libdir}/pkgconfig -+pkgconfig_DATA = ksba.pc -+ - # (A suitable gitlog-to-changelog script can be found in GnuPG master.) - GITLOG_TO_CHANGELOG=gitlog-to-changelog - -Index: libksba-1.3.5/configure.ac -=================================================================== ---- libksba-1.3.5.orig/configure.ac -+++ libksba-1.3.5/configure.ac -@@ -414,6 +414,7 @@ gl/Makefile - src/Makefile - src/ksba-config - src/versioninfo.rc -+ksba.pc - tests/Makefile - doc/Makefile - ]) -Index: libksba-1.3.5/ksba.pc.in -=================================================================== ---- /dev/null -+++ libksba-1.3.5/ksba.pc.in -@@ -0,0 +1,17 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+ -+# API info -+api_version=@KSBA_CONFIG_API_VERSION@ -+host=@KSBA_CONFIG_HOST@ -+ -+Name: ksba -+Description: Libksba provides an easy API to create and parse X.509 and CMS related objects -+Requires: -+Version: @VERSION@ -+Libs: -L${libdir} -lksba -+Libs.private: -L${libdir} -lgpg-error -+Cflags: -I${includedir} -+ -Index: libksba-1.3.5/src/ksba.m4 -=================================================================== ---- libksba-1.3.5.orig/src/ksba.m4 -+++ libksba-1.3.5/src/ksba.m4 -@@ -22,18 +22,7 @@ dnl with a changed API. +diff --git a/src/ksba.m4 b/src/ksba.m4 +index ad8de4f..af903ad 100644 +--- a/src/ksba.m4 ++++ b/src/ksba.m4 +@@ -22,37 +22,6 @@ dnl with a changed API. dnl AC_DEFUN([AM_PATH_KSBA], - [AC_REQUIRE([AC_CANONICAL_HOST]) -- AC_ARG_WITH(ksba-prefix, -- AC_HELP_STRING([--with-ksba-prefix=PFX], -- [prefix where KSBA is installed (optional)]), + [ AC_REQUIRE([AC_CANONICAL_HOST]) +- dnl --with-libksba-prefix=PFX is the preferred name for this option, +- dnl since that is consistent with how our three siblings use the directory/ +- dnl package name in --with-$dir_name-prefix=PFX. +- AC_ARG_WITH(libksba-prefix, +- AC_HELP_STRING([--with-libksba-prefix=PFX], +- [prefix where KSBA is installed (optional)]), +- ksba_config_prefix="$withval", ksba_config_prefix="") +- +- dnl Accept --with-ksba-prefix and make it work the same as +- dnl --with-libksba-prefix above, for backwards compatibility, +- dnl but do not document this old, inconsistently-named option. +- AC_ARG_WITH(ksba-prefix,, - ksba_config_prefix="$withval", ksba_config_prefix="") +- - if test x$ksba_config_prefix != x ; then -- ksba_config_args="$ksba_config_args --prefix=$ksba_config_prefix" -- if test x${KSBA_CONFIG+set} != xset ; then -- KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config -- fi +- if test x${KSBA_CONFIG+set} != xset ; then +- KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config +- fi +- fi +- +- use_gpgrt_config="" +- if test x"$KSBA_CONFIG" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then +- if $GPGRT_CONFIG ksba --exists; then +- KSBA_CONFIG="$GPGRT_CONFIG ksba" +- AC_MSG_NOTICE([Use gpgrt-config as ksba-config]) +- use_gpgrt_config=yes +- fi +- fi +- if test -z "$use_gpgrt_config"; then +- AC_PATH_PROG(KSBA_CONFIG, ksba-config, no) - fi -- AC_PATH_PROG(KSBA_CONFIG, ksba-config, no) tmp=ifelse([$1], ,1:1.0.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then - req_ksba_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` -@@ -43,48 +32,13 @@ AC_DEFUN([AM_PATH_KSBA], +@@ -63,56 +32,13 @@ AC_DEFUN([AM_PATH_KSBA], min_ksba_version="$tmp" fi @@ -90,7 +66,11 @@ Index: libksba-1.3.5/src/ksba.m4 - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - req_micro=`echo $min_ksba_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` -- ksba_config_version=`$KSBA_CONFIG $ksba_config_args --version` +- if test -z "$use_gpgrt_config"; then +- ksba_config_version=`$KSBA_CONFIG --version` +- else +- ksba_config_version=`$KSBA_CONFIG --modversion` +- fi - major=`echo $ksba_config_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` - minor=`echo $ksba_config_version | \ @@ -124,24 +104,32 @@ Index: libksba-1.3.5/src/ksba.m4 # Even if we have a recent libksba, we should check that the # API is compatible. if test "$req_ksba_api" -gt 0 ; then -- tmp=`$KSBA_CONFIG --api-version 2>/dev/null || echo 0` +- if test -z "$use_gpgrt_config"; then +- tmp=`$KSBA_CONFIG --api-version 2>/dev/null || echo 0` +- else +- tmp=`$KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0` +- fi + tmp=`$PKG_CONFIG --variable=api_version ksba` if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([KSBA API version]) if test "$req_ksba_api" -eq "$tmp" ; then -@@ -97,10 +51,8 @@ AC_DEFUN([AM_PATH_KSBA], +@@ -125,14 +51,8 @@ AC_DEFUN([AM_PATH_KSBA], fi fi if test $ok = yes; then -- KSBA_CFLAGS=`$KSBA_CONFIG $ksba_config_args --cflags` -- KSBA_LIBS=`$KSBA_CONFIG $ksba_config_args --libs` +- KSBA_CFLAGS=`$KSBA_CONFIG --cflags` +- KSBA_LIBS=`$KSBA_CONFIG --libs` ifelse([$2], , :, [$2]) -- libksba_config_host=`$LIBKSBA_CONFIG $ksba_config_args --host 2>/dev/null || echo none` +- if test -z "$use_gpgrt_config"; then +- libksba_config_host=`$KSBA_CONFIG --host 2>/dev/null || echo none` +- else +- libksba_config_host=`$KSBA_CONFIG --variable=host 2>/dev/null || echo none` +- fi + libksba_config_host=`$PKG_CONFIG --variable=host ksba` if test x"$libksba_config_host" != xnone ; then if test x"$libksba_config_host" != x"$host" ; then AC_MSG_WARN([[ -@@ -114,8 +66,6 @@ AC_DEFUN([AM_PATH_KSBA], +@@ -146,8 +66,6 @@ AC_DEFUN([AM_PATH_KSBA], fi fi else diff --git a/meta/recipes-support/libksba/libksba_1.3.5.bb b/meta/recipes-support/libksba/libksba_1.4.0.bb similarity index 87% rename from meta/recipes-support/libksba/libksba_1.3.5.bb rename to meta/recipes-support/libksba/libksba_1.4.0.bb index 336d7f8177..a9daf22d77 100644 --- a/meta/recipes-support/libksba/libksba_1.3.5.bb +++ b/meta/recipes-support/libksba/libksba_1.4.0.bb @@ -19,8 +19,7 @@ UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ file://ksba-add-pkgconfig-support.patch" -SRC_URI[md5sum] = "8302a3e263a7c630aa7dea7d341f07a2" -SRC_URI[sha256sum] = "41444fd7a6ff73a79ad9728f985e71c9ba8cd3e5e53358e70d5f066d35c1a340" +SRC_URI[sha256sum] = "bfe6a8e91ff0f54d8a329514db406667000cb207238eded49b599761bfca41b6" do_configure_prepend () { # Else these could be used in preference to those in aclocal-copy -- 2.40.1