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 | 172 |
1 files changed, 110 insertions, 62 deletions
diff --git a/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch b/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch index 83054a9c44..3d886bcaa4 100644 --- a/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch +++ b/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch | |||
@@ -1,9 +1,9 @@ | |||
1 | From ec309e20b5a27d42a5fb915c328d61e924ab5f19 Mon Sep 17 00:00:00 2001 | 1 | From b0df1cb468264a9bb9113524f0e1318c456b2348 Mon Sep 17 00:00:00 2001 |
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
3 | Date: Thu, 29 Mar 2018 15:12:17 +0800 | 3 | Date: Thu, 29 Mar 2018 15:12:17 +0800 |
4 | Subject: [PATCH] support pkgconfig | 4 | Subject: [PATCH] support pkgconfig |
5 | 5 | ||
6 | Upstream-Status: Pending | 6 | Upstream-Status: Inappropriate [gnupg upstream will not take this, it has been tried with other components] |
7 | 7 | ||
8 | Rebase to 1.28 | 8 | Rebase to 1.28 |
9 | 9 | ||
@@ -12,18 +12,21 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | |||
12 | Refactored for 1.33 | 12 | Refactored for 1.33 |
13 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | 13 | Signed-off-by: Armin Kuster <akuster808@gmail.com> |
14 | Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> | 14 | Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> |
15 | |||
15 | --- | 16 | --- |
16 | src/gpg-error.m4 | 142 +---------------------------------------------- | 17 | src/gpg-error.m4 | 192 ++--------------------------------------------- |
17 | 1 file changed, 3 insertions(+), 139 deletions(-) | 18 | 1 file changed, 5 insertions(+), 187 deletions(-) |
18 | 19 | ||
19 | diff --git a/src/gpg-error.m4 b/src/gpg-error.m4 | 20 | diff --git a/src/gpg-error.m4 b/src/gpg-error.m4 |
20 | index c9b235f..176bd6a 100644 | 21 | index 7fa52b1..15a0859 100644 |
21 | --- a/src/gpg-error.m4 | 22 | --- a/src/gpg-error.m4 |
22 | +++ b/src/gpg-error.m4 | 23 | +++ b/src/gpg-error.m4 |
23 | @@ -26,139 +26,12 @@ dnl is added to the gpg_config_script_warn variable. | 24 | @@ -15,187 +15,14 @@ |
25 | dnl | ||
26 | dnl Find gpg-error-config, for backward compatibility | ||
24 | dnl | 27 | dnl |
25 | AC_DEFUN([AM_PATH_GPG_ERROR], | 28 | -dnl _AM_PATH_POSSIBLE_GPG_ERROR_CONFIG |
26 | [ AC_REQUIRE([AC_CANONICAL_HOST]) | 29 | -AC_DEFUN([_AM_PATH_POSSIBLE_GPG_ERROR_CONFIG],[dnl |
27 | - gpg_error_config_prefix="" | 30 | - gpg_error_config_prefix="" |
28 | - dnl --with-libgpg-error-prefix=PFX is the preferred name for this option, | 31 | - dnl --with-libgpg-error-prefix=PFX is the preferred name for this option, |
29 | - dnl since that is consistent with how our three siblings use the directory/ | 32 | - dnl since that is consistent with how our three siblings use the directory/ |
@@ -59,50 +62,112 @@ index c9b235f..176bd6a 100644 | |||
59 | - fi | 62 | - fi |
60 | - | 63 | - |
61 | - AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) | 64 | - AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) |
62 | - min_gpg_error_version=ifelse([$1], ,1.33,$1) | 65 | -]) |
63 | - ok=no | ||
64 | - | 66 | - |
65 | - if test "$prefix" = NONE ; then | 67 | -dnl |
66 | - prefix_option_expanded=/usr/local | 68 | -dnl Find gpgrt-config, which uses .pc file |
67 | - else | 69 | -dnl (minimum pkg-config functionality, supporting cross build) |
68 | - prefix_option_expanded="$prefix" | 70 | -dnl |
69 | - fi | 71 | -dnl _AM_PATH_GPGRT_CONFIG |
70 | - if test "$exec_prefix" = NONE ; then | 72 | -AC_DEFUN([_AM_PATH_GPGRT_CONFIG],[dnl |
71 | - exec_prefix_option_expanded=$prefix_option_expanded | 73 | - AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no, [$prefix/bin:$PATH]) |
72 | - else | 74 | - if test "$GPGRT_CONFIG" != "no"; then |
73 | - exec_prefix_option_expanded=$(prefix=$prefix_option_expanded eval echo $exec_prefix) | 75 | - # Determine gpgrt_libdir |
74 | - fi | 76 | - # |
75 | - libdir_option_expanded=$(prefix=$prefix_option_expanded exec_prefix=$exec_prefix_option_expanded eval echo $libdir) | 77 | - # Get the prefix of gpgrt-config assuming it's something like: |
78 | - # <PREFIX>/bin/gpgrt-config | ||
79 | - gpgrt_prefix=${GPGRT_CONFIG%/*/*} | ||
80 | - possible_libdir1=${gpgrt_prefix}/lib | ||
81 | - # Determine by using system libdir-format with CC, it's like: | ||
82 | - # Normal style: /usr/lib | ||
83 | - # GNU cross style: /usr/<triplet>/lib | ||
84 | - # Debian style: /usr/lib/<multiarch-name> | ||
85 | - # Fedora/openSUSE style: /usr/lib, /usr/lib32 or /usr/lib64 | ||
86 | - # It is assumed that CC is specified to the one of host on cross build. | ||
87 | - if libdir_candidates=$(${CC:-cc} -print-search-dirs | \ | ||
88 | - sed -n -e "/^libraries/{s/libraries: =//;s/:/\\ | ||
89 | -/g;p;}"); then | ||
90 | - # From the output of -print-search-dirs, select valid pkgconfig dirs. | ||
91 | - libdir_candidates=$(for dir in $libdir_candidates; do | ||
92 | - if p=$(cd $dir 2>/dev/null && pwd); then | ||
93 | - test -d "$p/pkgconfig" && echo $p; | ||
94 | - fi | ||
95 | - done) | ||
76 | - | 96 | - |
77 | - if test -f $libdir_option_expanded/pkgconfig/gpg-error.pc; then | 97 | - for possible_libdir0 in $libdir_candidates; do |
78 | - gpgrt_libdir=$libdir_option_expanded | 98 | - # possible_libdir0: |
79 | - else | 99 | - # Fallback candidate, the one of system-installed (by $CC) |
80 | - if crt1_path=$(${CC:-cc} -print-file-name=crt1.o 2>/dev/null); then | 100 | - # (/usr/<triplet>/lib, /usr/lib/<multiarch-name> or /usr/lib32) |
81 | - if possible_libdir=$(cd ${crt1_path%/*} && pwd 2>/dev/null); then | 101 | - # possible_libdir1: |
82 | - if test -f $possible_libdir/pkgconfig/gpg-error.pc; then | 102 | - # Another candidate, user-locally-installed |
83 | - gpgrt_libdir=$possible_libdir | 103 | - # (<gpgrt_prefix>/lib) |
104 | - # possible_libdir2 | ||
105 | - # Most preferred | ||
106 | - # (<gpgrt_prefix>/<triplet>/lib, | ||
107 | - # <gpgrt_prefix>/lib/<multiarch-name> or <gpgrt_prefix>/lib32) | ||
108 | - if test "${possible_libdir0##*/}" = "lib"; then | ||
109 | - possible_prefix0=${possible_libdir0%/lib} | ||
110 | - possible_prefix0_triplet=${possible_prefix0##*/} | ||
111 | - if test -z "$possible_prefix0_triplet"; then | ||
112 | - continue | ||
113 | - fi | ||
114 | - possible_libdir2=${gpgrt_prefix}/$possible_prefix0_triplet/lib | ||
115 | - else | ||
116 | - possible_prefix0=${possible_libdir0%%/lib*} | ||
117 | - possible_libdir2=${gpgrt_prefix}${possible_libdir0#$possible_prefix0} | ||
118 | - fi | ||
119 | - if test -f ${possible_libdir2}/pkgconfig/gpg-error.pc; then | ||
120 | - gpgrt_libdir=${possible_libdir2} | ||
121 | - elif test -f ${possible_libdir1}/pkgconfig/gpg-error.pc; then | ||
122 | - gpgrt_libdir=${possible_libdir1} | ||
123 | - elif test -f ${possible_libdir0}/pkgconfig/gpg-error.pc; then | ||
124 | - gpgrt_libdir=${possible_libdir0} | ||
84 | - fi | 125 | - fi |
85 | - fi | 126 | - if test -n "$gpgrt_libdir"; then break; fi |
127 | - done | ||
86 | - fi | 128 | - fi |
129 | - if test -z "$gpgrt_libdir"; then | ||
130 | - # No valid pkgconfig dir in any of the system directories, fallback | ||
131 | - gpgrt_libdir=${possible_libdir1} | ||
132 | - fi | ||
133 | - else | ||
134 | - unset GPGRT_CONFIG | ||
87 | - fi | 135 | - fi |
88 | - | 136 | - |
89 | - if test "$GPG_ERROR_CONFIG" = "no" -a -n "$gpgrt_libdir"; then | 137 | - if test -n "$gpgrt_libdir"; then |
90 | - AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) | 138 | - GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" |
91 | - if test "$GPGRT_CONFIG" = "no"; then | 139 | - if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then |
92 | - unset GPGRT_CONFIG | 140 | - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" |
141 | - AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) | ||
142 | - gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` | ||
93 | - else | 143 | - else |
94 | - GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" | 144 | - gpg_error_config_version=`$GPG_ERROR_CONFIG --version` |
95 | - if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then | 145 | - unset GPGRT_CONFIG |
96 | - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" | ||
97 | - AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) | ||
98 | - gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` | ||
99 | - else | ||
100 | - unset GPGRT_CONFIG | ||
101 | - fi | ||
102 | - fi | 146 | - fi |
103 | - else | 147 | - elif test "$GPG_ERROR_CONFIG" != "no"; then |
104 | - gpg_error_config_version=`$GPG_ERROR_CONFIG --version` | 148 | - gpg_error_config_version=`$GPG_ERROR_CONFIG --version` |
149 | - unset GPGRT_CONFIG | ||
105 | - fi | 150 | - fi |
151 | -]) | ||
152 | - | ||
153 | -dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, | ||
154 | -dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) | ||
155 | -dnl | ||
156 | -dnl Test for libgpg-error and define GPG_ERROR_CFLAGS, GPG_ERROR_LIBS, | ||
157 | -dnl GPG_ERROR_MT_CFLAGS, and GPG_ERROR_MT_LIBS. The _MT_ variants are | ||
158 | -dnl used for programs requireing real multi thread support. | ||
159 | -dnl | ||
160 | -dnl If a prefix option is not used, the config script is first | ||
161 | -dnl searched in $SYSROOT/bin and then along $PATH. If the used | ||
162 | -dnl config script does not match the host specification the script | ||
163 | -dnl is added to the gpg_config_script_warn variable. | ||
164 | -dnl | ||
165 | -AC_DEFUN([AM_PATH_GPG_ERROR],[dnl | ||
166 | -AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
167 | -AC_REQUIRE([_AM_PATH_POSSIBLE_GPG_ERROR_CONFIG])dnl | ||
168 | -AC_REQUIRE([_AM_PATH_GPGRT_CONFIG])dnl | ||
169 | - min_gpg_error_version=ifelse([$1], ,1.33,$1) | ||
170 | - ok=no | ||
106 | - if test "$GPG_ERROR_CONFIG" != "no"; then | 171 | - if test "$GPG_ERROR_CONFIG" != "no"; then |
107 | - req_major=`echo $min_gpg_error_version | \ | 172 | - req_major=`echo $min_gpg_error_version | \ |
108 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` | 173 | - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` |
@@ -121,24 +186,10 @@ index c9b235f..176bd6a 100644 | |||
121 | - fi | 186 | - fi |
122 | - fi | 187 | - fi |
123 | - fi | 188 | - fi |
124 | - if test -z "$GPGRT_CONFIG" -a -n "$gpgrt_libdir"; then | ||
125 | - if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then | ||
126 | - AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) | ||
127 | - if test "$GPGRT_CONFIG" = "no"; then | ||
128 | - unset GPGRT_CONFIG | ||
129 | - else | ||
130 | - GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" | ||
131 | - if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then | ||
132 | - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" | ||
133 | - AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) | ||
134 | - else | ||
135 | - unset GPGRT_CONFIG | ||
136 | - fi | ||
137 | - fi | ||
138 | - fi | ||
139 | - fi | ||
140 | - fi | 189 | - fi |
141 | - AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) | 190 | - AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) |
191 | +AC_DEFUN([AM_PATH_GPG_ERROR], | ||
192 | +[ AC_REQUIRE([AC_CANONICAL_HOST]) | ||
142 | + min_gpg_error_version=ifelse([$1], ,0.0,$1) | 193 | + min_gpg_error_version=ifelse([$1], ,0.0,$1) |
143 | + PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no]) | 194 | + PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no]) |
144 | if test $ok = yes; then | 195 | if test $ok = yes; then |
@@ -163,7 +214,7 @@ index c9b235f..176bd6a 100644 | |||
163 | fi | 214 | fi |
164 | if test x"$gpg_error_config_host" != xnone ; then | 215 | if test x"$gpg_error_config_host" != xnone ; then |
165 | if test x"$gpg_error_config_host" != x"$host" ; then | 216 | if test x"$gpg_error_config_host" != x"$host" ; then |
166 | @@ -174,15 +47,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR], | 217 | @@ -211,15 +38,6 @@ AC_REQUIRE([_AM_PATH_GPGRT_CONFIG])dnl |
167 | fi | 218 | fi |
168 | fi | 219 | fi |
169 | else | 220 | else |
@@ -179,6 +230,3 @@ index c9b235f..176bd6a 100644 | |||
179 | - AC_SUBST(GPG_ERROR_MT_CFLAGS) | 230 | - AC_SUBST(GPG_ERROR_MT_CFLAGS) |
180 | - AC_SUBST(GPG_ERROR_MT_LIBS) | 231 | - AC_SUBST(GPG_ERROR_MT_LIBS) |
181 | ]) | 232 | ]) |
182 | -- | ||
183 | 2.25.1 | ||
184 | |||