1 |
commit: d920faef3dd6d61ff4163c523a1ec0413c98a790 |
2 |
Author: orbea <orbea <AT> riseup <DOT> net> |
3 |
AuthorDate: Wed Aug 31 00:57:06 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 1 02:15:41 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d920faef |
7 |
|
8 |
dev-libs/libgpg-error: Add gpgrt-config patch |
9 |
|
10 |
Adds a patch to remove the standard system --libdir from the |
11 |
gpgrt-config output. This is required when building app-crypt/gpgme with |
12 |
slibtool to avoid linking with the old system library instead of the |
13 |
newly built library. |
14 |
|
15 |
Bug: https://bugs.gentoo.org/811933 |
16 |
Bug: https://bugs.gentoo.org/844226 |
17 |
Upstream-Bug: https://dev.gnupg.org/T6136 |
18 |
Upstream-Commit: https://dev.gnupg.org/rE4615816f71e91f4c3bb8b0e4122dd153ec7c1927 |
19 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
20 |
|
21 |
.../libgpg-error-1.45-gpgrt_config_libdir.patch | 56 ++++++++++++++++++ |
22 |
dev-libs/libgpg-error/libgpg-error-1.45-r1.ebuild | 68 ++++++++++++++++++++++ |
23 |
2 files changed, 124 insertions(+) |
24 |
|
25 |
diff --git a/dev-libs/libgpg-error/files/libgpg-error-1.45-gpgrt_config_libdir.patch b/dev-libs/libgpg-error/files/libgpg-error-1.45-gpgrt_config_libdir.patch |
26 |
new file mode 100644 |
27 |
index 000000000000..a7db0e4d4b64 |
28 |
--- /dev/null |
29 |
+++ b/dev-libs/libgpg-error/files/libgpg-error-1.45-gpgrt_config_libdir.patch |
30 |
@@ -0,0 +1,56 @@ |
31 |
+Upstream: |
32 |
+https://dev.gnupg.org/rE4615816f71e91f4c3bb8b0e4122dd153ec7c1927 |
33 |
+https://dev.gnupg.org/T6136 |
34 |
+ |
35 |
+From 4615816f71e91f4c3bb8b0e4122dd153ec7c1927 Mon Sep 17 00:00:00 2001 |
36 |
+From: NIIBE Yutaka <gniibe@××××.org> |
37 |
+Date: Thu, 25 Aug 2022 15:30:07 +0900 |
38 |
+Subject: [PATCH] gpgrt-config: Strip system paths for --cflags and --libs. |
39 |
+ |
40 |
+* src/gpgrt-config.in: Strip -I and -L with system paths. |
41 |
+ |
42 |
+-- |
43 |
+ |
44 |
+This behavior is more compatible to pkg-config. |
45 |
+ |
46 |
+GnuPG-bug-id: 6136 |
47 |
+Signed-off-by: NIIBE Yutaka <gniibe@××××.org> |
48 |
+ |
49 |
+diff --git a/src/gpgrt-config.in b/src/gpgrt-config.in |
50 |
+index 3aaa243..85d21b4 100644 |
51 |
+--- a/src/gpgrt-config.in |
52 |
++++ b/src/gpgrt-config.in |
53 |
+@@ -1,6 +1,6 @@ |
54 |
+ #!@INSTALLSHELLPATH@ |
55 |
+ # -*- mode: shell-script; sh-shell: "/bin/sh" -*- |
56 |
+-# Copyright (C) 2018, 2021 g10 Code GmbH |
57 |
++# Copyright (C) 2018, 2021, 2022 g10 Code GmbH |
58 |
+ # |
59 |
+ # This file is free software; as a special exception the author gives |
60 |
+ # unlimited permission to copy and/or distribute it, with or without |
61 |
+@@ -193,9 +193,14 @@ list_only_once () { |
62 |
+ __arg="" |
63 |
+ |
64 |
+ for __arg; do |
65 |
+- if not_listed_yet $__arg $__result; then |
66 |
+- __result="$__result${__result:+ }$__arg" |
67 |
+- fi |
68 |
++ case "$__arg" in |
69 |
++ -I/usr/include|-I/include) ;; |
70 |
++ *) |
71 |
++ if not_listed_yet $__arg $__result; then |
72 |
++ __result="$__result${__result:+ }$__arg" |
73 |
++ fi |
74 |
++ ;; |
75 |
++ esac |
76 |
+ done |
77 |
+ |
78 |
+ echo $__result |
79 |
+@@ -210,6 +215,7 @@ list_only_once_for_libs () { |
80 |
+ # the resulted list is in reverse order |
81 |
+ for __arg; do |
82 |
+ case "$__arg" in |
83 |
++ -L/usr/lib|-L/usr/lib64|-L/lib|-L/lib64) ;; |
84 |
+ -l*) |
85 |
+ # As-is |
86 |
+ __rev_list="$__arg${__rev_list:+ }$__rev_list" |
87 |
|
88 |
diff --git a/dev-libs/libgpg-error/libgpg-error-1.45-r1.ebuild b/dev-libs/libgpg-error/libgpg-error-1.45-r1.ebuild |
89 |
new file mode 100644 |
90 |
index 000000000000..9d47ab1f8c4a |
91 |
--- /dev/null |
92 |
+++ b/dev-libs/libgpg-error/libgpg-error-1.45-r1.ebuild |
93 |
@@ -0,0 +1,68 @@ |
94 |
+# Copyright 1999-2022 Gentoo Authors |
95 |
+# Distributed under the terms of the GNU General Public License v2 |
96 |
+ |
97 |
+EAPI=8 |
98 |
+ |
99 |
+inherit autotools multilib-minimal toolchain-funcs prefix |
100 |
+ |
101 |
+DESCRIPTION="Contains error handling functions used by GnuPG software" |
102 |
+HOMEPAGE="https://www.gnupg.org/related_software/libgpg-error" |
103 |
+SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" |
104 |
+ |
105 |
+LICENSE="GPL-2 LGPL-2.1" |
106 |
+SLOT="0" |
107 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
108 |
+IUSE="common-lisp nls static-libs test" |
109 |
+RESTRICT="!test? ( test )" |
110 |
+ |
111 |
+RDEPEND="nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )" |
112 |
+DEPEND="${RDEPEND}" |
113 |
+BDEPEND="nls? ( sys-devel/gettext )" |
114 |
+ |
115 |
+MULTILIB_CHOST_TOOLS=( |
116 |
+ /usr/bin/gpg-error-config |
117 |
+) |
118 |
+MULTILIB_WRAPPED_HEADERS=( |
119 |
+ /usr/include/gpg-error.h |
120 |
+ /usr/include/gpgrt.h |
121 |
+) |
122 |
+ |
123 |
+PATCHES=( |
124 |
+ "${FILESDIR}/${PN}-1.44-remove_broken_check.patch" |
125 |
+ "${FILESDIR}/${PN}-1.45-gpgrt_config_libdir.patch" |
126 |
+) |
127 |
+ |
128 |
+src_prepare() { |
129 |
+ default |
130 |
+ |
131 |
+ if use prefix ; then |
132 |
+ # don't hardcode /usr/xpg4/bin/sh as shell on Solaris |
133 |
+ sed -i -e 's/solaris\*/disabled/' configure.ac || die |
134 |
+ fi |
135 |
+ |
136 |
+ # only necessary for as long as we run eautoreconf, configure.ac |
137 |
+ # uses ./autogen.sh to generate PACKAGE_VERSION, but autogen.sh is |
138 |
+ # not a pure /bin/sh script, so it fails on some hosts |
139 |
+ hprefixify -w 1 autogen.sh |
140 |
+ eautoreconf |
141 |
+} |
142 |
+ |
143 |
+multilib_src_configure() { |
144 |
+ local myeconfargs=( |
145 |
+ $(multilib_is_native_abi || echo --disable-languages) |
146 |
+ $(use_enable common-lisp languages) |
147 |
+ $(use_enable nls) |
148 |
+ # required for sys-power/suspend[crypt], bug 751568 |
149 |
+ $(use_enable static-libs static) |
150 |
+ $(use_enable test tests) |
151 |
+ --enable-threads |
152 |
+ CC_FOR_BUILD="$(tc-getBUILD_CC)" |
153 |
+ $("${S}/configure" --help | grep -o -- '--without-.*-prefix') |
154 |
+ ) |
155 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
156 |
+} |
157 |
+ |
158 |
+multilib_src_install_all() { |
159 |
+ einstalldocs |
160 |
+ find "${ED}" -type f -name '*.la' -delete || die |
161 |
+} |