diff options
Diffstat (limited to 'meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch')
-rw-r--r-- | meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch | 178 |
1 files changed, 98 insertions, 80 deletions
diff --git a/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch b/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch index 3066613d42..ca5f6b5c25 100644 --- a/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch +++ b/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch | |||
@@ -8,53 +8,21 @@ Upstream-Status: Pending | |||
8 | Rebase to 1.28 | 8 | Rebase to 1.28 |
9 | 9 | ||
10 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 10 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
11 | |||
12 | Refactored for 1.33 | ||
13 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
14 | |||
11 | --- | 15 | --- |
12 | configure.ac | 1 + | 16 | configure.ac | 1 + |
13 | src/Makefile.am | 4 ++- | ||
14 | src/gpg-error.m4 | 71 +++-------------------------------------------------- | 17 | src/gpg-error.m4 | 71 +++-------------------------------------------------- |
15 | src/gpg-error.pc.in | 11 +++++++++ | ||
16 | 4 files changed, 18 insertions(+), 69 deletions(-) | 18 | 4 files changed, 18 insertions(+), 69 deletions(-) |
17 | create mode 100644 src/gpg-error.pc.in | 19 | create mode 100644 src/gpg-error.pc.in |
18 | 20 | ||
19 | diff --git a/configure.ac b/configure.ac | 21 | Index: libgpg-error-1.33/src/gpg-error.m4 |
20 | index aca9300..f7794e9 100644 | 22 | =================================================================== |
21 | --- a/configure.ac | 23 | --- libgpg-error-1.33.orig/src/gpg-error.m4 |
22 | +++ b/configure.ac | 24 | +++ libgpg-error-1.33/src/gpg-error.m4 |
23 | @@ -621,6 +621,7 @@ AC_CONFIG_FILES([src/Makefile tests/Makefile]) | 25 | @@ -26,139 +26,13 @@ dnl is added to the gpg_config_script_wa |
24 | AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd]) | ||
25 | AC_CONFIG_FILES([src/versioninfo.rc src/gpg-error.w32-manifest]) | ||
26 | AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config]) | ||
27 | +AC_CONFIG_FILES([src/gpg-error.pc]) | ||
28 | |||
29 | AC_OUTPUT | ||
30 | |||
31 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
32 | index 268c2ab..95f8459 100644 | ||
33 | --- a/src/Makefile.am | ||
34 | +++ b/src/Makefile.am | ||
35 | @@ -87,6 +87,8 @@ bin_SCRIPTS = gpg-error-config | ||
36 | nodist_bin_SCRIPTS = gpgrt-config | ||
37 | m4datadir = $(datadir)/aclocal | ||
38 | m4data_DATA = gpg-error.m4 gpgrt.m4 | ||
39 | +pkgconfigdir = $(libdir)/pkgconfig | ||
40 | +pkgconfig_DATA = gpg-error.pc | ||
41 | |||
42 | EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ | ||
43 | mkerrnos.awk errnos.in README \ | ||
44 | @@ -94,7 +96,7 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ | ||
45 | mkheader.c gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \ | ||
46 | err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 gpgrt.m4 \ | ||
47 | gpg-error.vers gpg-error.def.in \ | ||
48 | - versioninfo.rc.in gpg-error.w32-manifest.in \ | ||
49 | + versioninfo.rc.in gpg-error.w32-manifest.in gpg-error.pc \ | ||
50 | $(lock_obj_pub) | ||
51 | |||
52 | BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ | ||
53 | diff --git a/src/gpg-error.m4 b/src/gpg-error.m4 | ||
54 | index 60c88d8..2ef7e3e 100644 | ||
55 | --- a/src/gpg-error.m4 | ||
56 | +++ b/src/gpg-error.m4 | ||
57 | @@ -26,73 +26,13 @@ dnl is added to the gpg_config_script_warn variable. | ||
58 | dnl | 26 | dnl |
59 | AC_DEFUN([AM_PATH_GPG_ERROR], | 27 | AC_DEFUN([AM_PATH_GPG_ERROR], |
60 | [ AC_REQUIRE([AC_CANONICAL_HOST]) | 28 | [ AC_REQUIRE([AC_CANONICAL_HOST]) |
@@ -66,14 +34,15 @@ index 60c88d8..2ef7e3e 100644 | |||
66 | - AC_HELP_STRING([--with-libgpg-error-prefix=PFX], | 34 | - AC_HELP_STRING([--with-libgpg-error-prefix=PFX], |
67 | - [prefix where GPG Error is installed (optional)]), | 35 | - [prefix where GPG Error is installed (optional)]), |
68 | - [gpg_error_config_prefix="$withval"]) | 36 | - [gpg_error_config_prefix="$withval"]) |
69 | - | 37 | + min_gpg_error_version=ifelse([$1], ,0.0,$1) |
38 | + PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no]) | ||
39 | |||
70 | - dnl Accept --with-gpg-error-prefix and make it work the same as | 40 | - dnl Accept --with-gpg-error-prefix and make it work the same as |
71 | - dnl --with-libgpg-error-prefix above, for backwards compatibility, | 41 | - dnl --with-libgpg-error-prefix above, for backwards compatibility, |
72 | - dnl but do not document this old, inconsistently-named option. | 42 | - dnl but do not document this old, inconsistently-named option. |
73 | - AC_ARG_WITH(gpg-error-prefix,, | 43 | - AC_ARG_WITH(gpg-error-prefix,, |
74 | - [gpg_error_config_prefix="$withval"]) | 44 | - [gpg_error_config_prefix="$withval"]) |
75 | + min_gpg_error_version=ifelse([$1], ,0.0,$1) | 45 | - |
76 | |||
77 | - if test x"${GPG_ERROR_CONFIG}" = x ; then | 46 | - if test x"${GPG_ERROR_CONFIG}" = x ; then |
78 | - if test x"${gpg_error_config_prefix}" != x ; then | 47 | - if test x"${gpg_error_config_prefix}" != x ; then |
79 | - GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config" | 48 | - GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config" |
@@ -92,19 +61,57 @@ index 60c88d8..2ef7e3e 100644 | |||
92 | - esac | 61 | - esac |
93 | - fi | 62 | - fi |
94 | - fi | 63 | - fi |
95 | + PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no]) | 64 | - |
96 | |||
97 | - AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) | 65 | - AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) |
98 | - min_gpg_error_version=ifelse([$1], ,0.0,$1) | 66 | - min_gpg_error_version=ifelse([$1], ,1.33,$1) |
99 | - AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) | ||
100 | - ok=no | 67 | - ok=no |
101 | - if test "$GPG_ERROR_CONFIG" != "no" \ | 68 | - |
102 | - && test -f "$GPG_ERROR_CONFIG" ; then | 69 | - if test "$prefix" = NONE ; then |
70 | - prefix_option_expanded=/usr/local | ||
71 | - else | ||
72 | - prefix_option_expanded="$prefix" | ||
73 | - fi | ||
74 | - if test "$exec_prefix" = NONE ; then | ||
75 | - exec_prefix_option_expanded=$prefix_option_expanded | ||
76 | - else | ||
77 | - exec_prefix_option_expanded=$(prefix=$prefix_option_expanded eval echo $exec_prefix) | ||
78 | - fi | ||
79 | - libdir_option_expanded=$(prefix=$prefix_option_expanded exec_prefix=$exec_prefix_option_expanded eval echo $libdir) | ||
80 | - | ||
81 | - if test -f $libdir_option_expanded/pkgconfig/gpg-error.pc; then | ||
82 | - gpgrt_libdir=$libdir_option_expanded | ||
83 | - else | ||
84 | - if crt1_path=$(${CC:-cc} -print-file-name=crt1.o 2>/dev/null); then | ||
85 | - if possible_libdir=$(cd ${crt1_path%/*} && pwd 2>/dev/null); then | ||
86 | - if test -f $possible_libdir/pkgconfig/gpg-error.pc; then | ||
87 | - gpgrt_libdir=$possible_libdir | ||
88 | - fi | ||
89 | - fi | ||
90 | - fi | ||
91 | - fi | ||
92 | - | ||
93 | - if test "$GPG_ERROR_CONFIG" = "no" -a -n "$gpgrt_libdir"; then | ||
94 | - AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) | ||
95 | - if test "$GPGRT_CONFIG" = "no"; then | ||
96 | - unset GPGRT_CONFIG | ||
97 | - else | ||
98 | - GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" | ||
99 | - if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then | ||
100 | - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" | ||
101 | - AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) | ||
102 | - gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` | ||
103 | - else | ||
104 | - unset GPGRT_CONFIG | ||
105 | - fi | ||
106 | - fi | ||
107 | - else | ||
108 | - gpg_error_config_version=`$GPG_ERROR_CONFIG --version` | ||
109 | - fi | ||
110 | - if test "$GPG_ERROR_CONFIG" != "no"; then | ||
103 | - req_major=`echo $min_gpg_error_version | \ | 111 | - req_major=`echo $min_gpg_error_version | \ |
104 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` | 112 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` |
105 | - req_minor=`echo $min_gpg_error_version | \ | 113 | - req_minor=`echo $min_gpg_error_version | \ |
106 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` | 114 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` |
107 | - gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version` | ||
108 | - major=`echo $gpg_error_config_version | \ | 115 | - major=`echo $gpg_error_config_version | \ |
109 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` | 116 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` |
110 | - minor=`echo $gpg_error_config_version | \ | 117 | - minor=`echo $gpg_error_config_version | \ |
@@ -118,20 +125,47 @@ index 60c88d8..2ef7e3e 100644 | |||
118 | - fi | 125 | - fi |
119 | - fi | 126 | - fi |
120 | - fi | 127 | - fi |
128 | - if test -z "$GPGRT_CONFIG" -a -n "$gpgrt_libdir"; then | ||
129 | - if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then | ||
130 | - AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) | ||
131 | - if test "$GPGRT_CONFIG" = "no"; then | ||
132 | - unset GPGRT_CONFIG | ||
133 | - else | ||
134 | - GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" | ||
135 | - if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then | ||
136 | - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" | ||
137 | - AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) | ||
138 | - else | ||
139 | - unset GPGRT_CONFIG | ||
140 | - fi | ||
141 | - fi | ||
142 | - fi | ||
143 | - fi | ||
121 | - fi | 144 | - fi |
145 | - AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) | ||
122 | if test $ok = yes; then | 146 | if test $ok = yes; then |
123 | - GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags` | 147 | - GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` |
124 | - GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs` | 148 | - GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` |
125 | - GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` | 149 | - if test -z "$GPGRT_CONFIG"; then |
126 | - GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` | 150 | - GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` |
151 | - GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` | ||
152 | - else | ||
153 | - GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` | ||
154 | - GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" | ||
155 | - GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` | ||
156 | - GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" | ||
157 | - fi | ||
127 | - AC_MSG_RESULT([yes ($gpg_error_config_version)]) | 158 | - AC_MSG_RESULT([yes ($gpg_error_config_version)]) |
128 | ifelse([$2], , :, [$2]) | 159 | ifelse([$2], , :, [$2]) |
129 | - gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none` | 160 | if test -z "$GPGRT_CONFIG"; then |
130 | + gpg_error_config_host=`$PKG_CONFIG --variable=host gpg-error` | 161 | - gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` |
162 | - else | ||
163 | - gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` | ||
164 | + gpg_error_config_host=`$PKG_CONFIG --variable=host gpg-error` | ||
165 | fi | ||
131 | if test x"$gpg_error_config_host" != xnone ; then | 166 | if test x"$gpg_error_config_host" != xnone ; then |
132 | if test x"$gpg_error_config_host" != x"$host" ; then | 167 | if test x"$gpg_error_config_host" != x"$host" ; then |
133 | AC_MSG_WARN([[ | 168 | @@ -174,15 +48,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR], |
134 | @@ -107,11 +47,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR], | ||
135 | fi | 169 | fi |
136 | fi | 170 | fi |
137 | else | 171 | else |
@@ -142,24 +176,8 @@ index 60c88d8..2ef7e3e 100644 | |||
142 | - AC_MSG_RESULT(no) | 176 | - AC_MSG_RESULT(no) |
143 | ifelse([$3], , :, [$3]) | 177 | ifelse([$3], , :, [$3]) |
144 | fi | 178 | fi |
145 | AC_SUBST(GPG_ERROR_CFLAGS) | 179 | - AC_SUBST(GPG_ERROR_CFLAGS) |
146 | diff --git a/src/gpg-error.pc.in b/src/gpg-error.pc.in | 180 | - AC_SUBST(GPG_ERROR_LIBS) |
147 | new file mode 100644 | 181 | - AC_SUBST(GPG_ERROR_MT_CFLAGS) |
148 | index 0000000..bc0b174 | 182 | - AC_SUBST(GPG_ERROR_MT_LIBS) |
149 | --- /dev/null | 183 | ]) |
150 | +++ b/src/gpg-error.pc.in | ||
151 | @@ -0,0 +1,11 @@ | ||
152 | +prefix=@prefix@ | ||
153 | +exec_prefix=@exec_prefix@ | ||
154 | +libdir=@libdir@ | ||
155 | +includedir=@includedir@ | ||
156 | +host=@GPG_ERROR_CONFIG_HOST@ | ||
157 | + | ||
158 | +Name: gpg-error | ||
159 | +Description: a library that defines common error values for all GnuPG components | ||
160 | +Version: @VERSION@ | ||
161 | +Libs: -L${libdir} -lgpg-error | ||
162 | +Cflags: -I${includedir} | ||
163 | -- | ||
164 | 1.8.3.1 | ||
165 | |||