diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-22 10:50:00 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-28 08:27:00 +0100 |
| commit | 81bb1ab604f573379fb66b568fbd89ae19a16f53 (patch) | |
| tree | a5b771b7c1b6b7ccd0f4e41a64657c90f206f469 /meta | |
| parent | 55d0ae691dce48e9d2cb036ec370a79234cf39af (diff) | |
| download | poky-81bb1ab604f573379fb66b568fbd89ae19a16f53.tar.gz | |
libassuan: Improve pkgconfig support
Add api_version and host to the .pc file and use pkg-config in the
m4 macros for the package.
(From OE-Core rev: 17e5793847601d2aeb497ffe14871df65543abfb)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
3 files changed, 163 insertions, 57 deletions
diff --git a/meta/recipes-support/libassuan/files/libassuan-add-pkgconfig-support.patch b/meta/recipes-support/libassuan/files/libassuan-add-pkgconfig-support.patch deleted file mode 100644 index ac1604fe0b..0000000000 --- a/meta/recipes-support/libassuan/files/libassuan-add-pkgconfig-support.patch +++ /dev/null | |||
| @@ -1,57 +0,0 @@ | |||
| 1 | Add pkgconfig support to libassuan. | ||
| 2 | This patch is rejected by upstream for the reason below: | ||
| 3 | They think pkgconfig adds no portability and maintaining them is not worthwhile. | ||
| 4 | |||
| 5 | Upstream-Status: Rejected | ||
| 6 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 7 | Signed-off-by: Constantin Musca <constantinx.musca@intel.com> | ||
| 8 | |||
| 9 | Index: libassuan-2.1.0/Makefile.am | ||
| 10 | =================================================================== | ||
| 11 | --- libassuan-2.1.0.orig/Makefile.am | ||
| 12 | +++ libassuan-2.1.0/Makefile.am | ||
| 13 | @@ -24,10 +24,13 @@ AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gz | ||
| 14 | # (A suitable gitlog-to-changelog script can be found in GnuPG master.) | ||
| 15 | GITLOG_TO_CHANGELOG=gitlog-to-changelog | ||
| 16 | |||
| 17 | +pkgconfigdir = $(libdir)/pkgconfig | ||
| 18 | +pkgconfig_DATA = assuan.pc | ||
| 19 | + | ||
| 20 | EXTRA_DIST = config.rpath autogen.sh README.GIT \ | ||
| 21 | ChangeLog-2011 doc/ChangeLog-2011 src/ChangeLog-2011 \ | ||
| 22 | tests/ChangeLog-2011 contrib/ChangeLog-2011 \ | ||
| 23 | - build-aux/git-log-footer build-aux/git-log-fix | ||
| 24 | + build-aux/git-log-footer build-aux/git-log-fix assuan.pc.in | ||
| 25 | |||
| 26 | SUBDIRS = m4 src doc tests | ||
| 27 | |||
| 28 | Index: libassuan-2.1.0/assuan.pc.in | ||
| 29 | =================================================================== | ||
| 30 | --- /dev/null | ||
| 31 | +++ libassuan-2.1.0/assuan.pc.in | ||
| 32 | @@ -0,0 +1,12 @@ | ||
| 33 | +prefix=@prefix@ | ||
| 34 | +exec_prefix=@exec_prefix@ | ||
| 35 | +libdir=@libdir@ | ||
| 36 | +includedir=@includedir@ | ||
| 37 | + | ||
| 38 | +Name: libassuan | ||
| 39 | +Description: IPC library used by GnuPG and GPGME | ||
| 40 | +Requires: | ||
| 41 | +Version: @VERSION@ | ||
| 42 | +Libs: -L${libdir} -lassuan | ||
| 43 | +Libs.private: -lgpg-error | ||
| 44 | +Cflags: -I${includedir} | ||
| 45 | Index: libassuan-2.1.0/configure.ac | ||
| 46 | =================================================================== | ||
| 47 | --- libassuan-2.1.0.orig/configure.ac | ||
| 48 | +++ libassuan-2.1.0/configure.ac | ||
| 49 | @@ -433,7 +433,7 @@ AC_CONFIG_FILES([doc/Makefile]) | ||
| 50 | AC_CONFIG_FILES([tests/Makefile]) | ||
| 51 | AC_CONFIG_FILES([src/libassuan-config], [chmod +x src/libassuan-config]) | ||
| 52 | AC_CONFIG_FILES([src/versioninfo.rc]) | ||
| 53 | - | ||
| 54 | +AC_CONFIG_FILES([assuan.pc]) | ||
| 55 | AC_OUTPUT | ||
| 56 | |||
| 57 | echo " | ||
diff --git a/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch b/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch new file mode 100644 index 0000000000..4f968812c9 --- /dev/null +++ b/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch | |||
| @@ -0,0 +1,158 @@ | |||
| 1 | Add pkgconfig support to libassuan. | ||
| 2 | This patch is rejected by upstream for the reason below: | ||
| 3 | They think pkgconfig adds no portability and maintaining them is not worthwhile. | ||
| 4 | |||
| 5 | Upstream-Status: Rejected | ||
| 6 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 7 | Signed-off-by: Constantin Musca <constantinx.musca@intel.com> | ||
| 8 | |||
| 9 | Index: libassuan-2.1.1/Makefile.am | ||
| 10 | =================================================================== | ||
| 11 | --- libassuan-2.1.1.orig/Makefile.am 2014-05-13 20:57:37.794398357 +0000 | ||
| 12 | +++ libassuan-2.1.1/Makefile.am 2014-05-13 20:57:37.790398357 +0000 | ||
| 13 | @@ -24,10 +24,13 @@ | ||
| 14 | # (A suitable gitlog-to-changelog script can be found in GnuPG master.) | ||
| 15 | GITLOG_TO_CHANGELOG=gitlog-to-changelog | ||
| 16 | |||
| 17 | +pkgconfigdir = $(libdir)/pkgconfig | ||
| 18 | +pkgconfig_DATA = libassuan.pc | ||
| 19 | + | ||
| 20 | EXTRA_DIST = config.rpath autogen.sh README.GIT \ | ||
| 21 | ChangeLog-2011 doc/ChangeLog-2011 src/ChangeLog-2011 \ | ||
| 22 | tests/ChangeLog-2011 contrib/ChangeLog-2011 \ | ||
| 23 | - build-aux/git-log-footer build-aux/git-log-fix | ||
| 24 | + build-aux/git-log-footer build-aux/git-log-fix libassuan.pc.in | ||
| 25 | |||
| 26 | SUBDIRS = m4 src doc tests | ||
| 27 | |||
| 28 | Index: libassuan-2.1.1/libassuan.pc.in | ||
| 29 | =================================================================== | ||
| 30 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
| 31 | +++ libassuan-2.1.1/libassuan.pc.in 2014-05-13 20:57:37.790398357 +0000 | ||
| 32 | @@ -0,0 +1,14 @@ | ||
| 33 | +prefix=@prefix@ | ||
| 34 | +exec_prefix=@exec_prefix@ | ||
| 35 | +libdir=@libdir@ | ||
| 36 | +includedir=@includedir@ | ||
| 37 | +api_version=@LIBASSUAN_CONFIG_API_VERSION@ | ||
| 38 | +host=@LIBASSUAN_CONFIG_HOST@ | ||
| 39 | + | ||
| 40 | +Name: libassuan | ||
| 41 | +Description: IPC library used by GnuPG and GPGME | ||
| 42 | +Requires: | ||
| 43 | +Version: @VERSION@ | ||
| 44 | +Libs: -L${libdir} -lassuan | ||
| 45 | +Libs.private: -lgpg-error | ||
| 46 | +Cflags: -I${includedir} | ||
| 47 | Index: libassuan-2.1.1/configure.ac | ||
| 48 | =================================================================== | ||
| 49 | --- libassuan-2.1.1.orig/configure.ac 2014-05-13 20:57:37.794398357 +0000 | ||
| 50 | +++ libassuan-2.1.1/configure.ac 2014-05-13 20:57:37.790398357 +0000 | ||
| 51 | @@ -434,7 +434,7 @@ | ||
| 52 | AC_CONFIG_FILES([tests/Makefile]) | ||
| 53 | AC_CONFIG_FILES([src/libassuan-config], [chmod +x src/libassuan-config]) | ||
| 54 | AC_CONFIG_FILES([src/versioninfo.rc]) | ||
| 55 | - | ||
| 56 | +AC_CONFIG_FILES([libassuan.pc]) | ||
| 57 | AC_OUTPUT | ||
| 58 | |||
| 59 | echo " | ||
| 60 | Index: libassuan-2.1.1/src/libassuan.m4 | ||
| 61 | =================================================================== | ||
| 62 | --- libassuan-2.1.1.orig/src/libassuan.m4 2011-04-06 15:37:26.000000000 +0000 | ||
| 63 | +++ libassuan-2.1.1/src/libassuan.m4 2014-05-13 21:06:53.402395537 +0000 | ||
| 64 | @@ -15,18 +15,6 @@ | ||
| 65 | dnl | ||
| 66 | AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], | ||
| 67 | [ AC_REQUIRE([AC_CANONICAL_HOST]) | ||
| 68 | - AC_ARG_WITH(libassuan-prefix, | ||
| 69 | - AC_HELP_STRING([--with-libassuan-prefix=PFX], | ||
| 70 | - [prefix where LIBASSUAN is installed (optional)]), | ||
| 71 | - libassuan_config_prefix="$withval", libassuan_config_prefix="") | ||
| 72 | - if test x$libassuan_config_prefix != x ; then | ||
| 73 | - libassuan_config_args="$libassuan_config_args --prefix=$libassuan_config_prefix" | ||
| 74 | - if test x${LIBASSUAN_CONFIG+set} != xset ; then | ||
| 75 | - LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config | ||
| 76 | - fi | ||
| 77 | - fi | ||
| 78 | - | ||
| 79 | - AC_PATH_TOOL(LIBASSUAN_CONFIG, libassuan-config, no) | ||
| 80 | |||
| 81 | tmp=ifelse([$1], ,1:0.9.2,$1) | ||
| 82 | if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then | ||
| 83 | @@ -37,51 +25,12 @@ | ||
| 84 | min_libassuan_version="$tmp" | ||
| 85 | fi | ||
| 86 | |||
| 87 | - AC_MSG_CHECKING(for LIBASSUAN - version >= $min_libassuan_version) | ||
| 88 | - ok=no | ||
| 89 | - if test "$LIBASSUAN_CONFIG" != "no" \ | ||
| 90 | - && test -f "$LIBASSUAN_CONFIG" ; then | ||
| 91 | - req_major=`echo $min_libassuan_version | \ | ||
| 92 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` | ||
| 93 | - req_minor=`echo $min_libassuan_version | \ | ||
| 94 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` | ||
| 95 | - req_micro=`echo $min_libassuan_version | \ | ||
| 96 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` | ||
| 97 | - | ||
| 98 | - libassuan_config_version=`$LIBASSUAN_CONFIG --version` | ||
| 99 | - major=`echo $libassuan_config_version | \ | ||
| 100 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` | ||
| 101 | - minor=`echo $libassuan_config_version | \ | ||
| 102 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` | ||
| 103 | - micro=`echo $libassuan_config_version | \ | ||
| 104 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` | ||
| 105 | - | ||
| 106 | - if test "$major" -gt "$req_major"; then | ||
| 107 | - ok=yes | ||
| 108 | - else | ||
| 109 | - if test "$major" -eq "$req_major"; then | ||
| 110 | - if test "$minor" -gt "$req_minor"; then | ||
| 111 | - ok=yes | ||
| 112 | - else | ||
| 113 | - if test "$minor" -eq "$req_minor"; then | ||
| 114 | - if test "$micro" -ge "$req_micro"; then | ||
| 115 | - ok=yes | ||
| 116 | - fi | ||
| 117 | - fi | ||
| 118 | - fi | ||
| 119 | - fi | ||
| 120 | - fi | ||
| 121 | - fi | ||
| 122 | - | ||
| 123 | - if test $ok = yes; then | ||
| 124 | - AC_MSG_RESULT([yes ($libassuan_config_version)]) | ||
| 125 | - else | ||
| 126 | - AC_MSG_RESULT(no) | ||
| 127 | - fi | ||
| 128 | + PKG_CHECK_MODULES(LIBASSUAN, [libassuan >= $min_libassuan_version], [ok=yes], [ok=no]) | ||
| 129 | |||
| 130 | if test $ok = yes; then | ||
| 131 | if test "$req_libassuan_api" -gt 0 ; then | ||
| 132 | tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0` | ||
| 133 | + tmp=`$PKG_CONFIG --variable=api_version libassuan` | ||
| 134 | if test "$tmp" -gt 0 ; then | ||
| 135 | AC_MSG_CHECKING([LIBASSUAN API version]) | ||
| 136 | if test "$req_libassuan_api" -eq "$tmp" ; then | ||
| 137 | @@ -96,7 +45,7 @@ | ||
| 138 | |||
| 139 | if test $ok = yes; then | ||
| 140 | if test x"$host" != x ; then | ||
| 141 | - libassuan_config_host=`$LIBASSUAN_CONFIG --host 2>/dev/null || echo none` | ||
| 142 | + libassuan_config_host=`$PKG_CONFIG --variable=host libassuan` | ||
| 143 | if test x"$libassuan_config_host" != xnone ; then | ||
| 144 | if test x"$libassuan_config_host" != x"$host" ; then | ||
| 145 | AC_MSG_WARN([[ | ||
| 146 | @@ -137,12 +86,8 @@ | ||
| 147 | AC_DEFUN([AM_PATH_LIBASSUAN], | ||
| 148 | [ _AM_PATH_LIBASSUAN_COMMON($1) | ||
| 149 | if test $ok = yes; then | ||
| 150 | - LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags` | ||
| 151 | - LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs` | ||
| 152 | ifelse([$2], , :, [$2]) | ||
| 153 | else | ||
| 154 | - LIBASSUAN_CFLAGS="" | ||
| 155 | - LIBASSUAN_LIBS="" | ||
| 156 | ifelse([$3], , :, [$3]) | ||
| 157 | fi | ||
| 158 | AC_SUBST(LIBASSUAN_CFLAGS) | ||
diff --git a/meta/recipes-support/libassuan/libassuan_2.1.1.bb b/meta/recipes-support/libassuan/libassuan_2.1.1.bb index 60b3f929d5..6f7d6745fd 100644 --- a/meta/recipes-support/libassuan/libassuan_2.1.1.bb +++ b/meta/recipes-support/libassuan/libassuan_2.1.1.bb | |||
| @@ -17,3 +17,8 @@ SRC_URI[md5sum] = "757243cc4a71b30ed8d8dbe784035d36" | |||
| 17 | SRC_URI[sha256sum] = "23e2d67779b88e90d29fe1df6b157109f1c2a647d0f1b2a0f4295bb3c0b2039d" | 17 | SRC_URI[sha256sum] = "23e2d67779b88e90d29fe1df6b157109f1c2a647d0f1b2a0f4295bb3c0b2039d" |
| 18 | 18 | ||
| 19 | inherit autotools texinfo binconfig pkgconfig | 19 | inherit autotools texinfo binconfig pkgconfig |
| 20 | |||
| 21 | do_configure_prepend () { | ||
| 22 | # Else these could be used in prefernce to those in aclocal-copy | ||
| 23 | rm ${S}/m4/*.m4 | ||
| 24 | } | ||
