summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbea <orbea@riseup.net>2022-08-30 17:57:06 -0700
committerSam James <sam@gentoo.org>2022-09-01 03:15:41 +0100
commitd920faef3dd6d61ff4163c523a1ec0413c98a790 (patch)
tree63459c4c46f846b13d626ea7bf29a01bf2929eb1 /dev-libs/libgpg-error
parentsys-devel/gettext: fix musl symbol (diff)
downloadgentoo-d920faef3dd6d61ff4163c523a1ec0413c98a790.tar.gz
gentoo-d920faef3dd6d61ff4163c523a1ec0413c98a790.tar.bz2
gentoo-d920faef3dd6d61ff4163c523a1ec0413c98a790.zip
dev-libs/libgpg-error: Add gpgrt-config patch
Adds a patch to remove the standard system --libdir from the gpgrt-config output. This is required when building app-crypt/gpgme with slibtool to avoid linking with the old system library instead of the newly built library. Bug: https://bugs.gentoo.org/811933 Bug: https://bugs.gentoo.org/844226 Upstream-Bug: https://dev.gnupg.org/T6136 Upstream-Commit: https://dev.gnupg.org/rE4615816f71e91f4c3bb8b0e4122dd153ec7c1927 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/libgpg-error')
-rw-r--r--dev-libs/libgpg-error/files/libgpg-error-1.45-gpgrt_config_libdir.patch56
-rw-r--r--dev-libs/libgpg-error/libgpg-error-1.45-r1.ebuild68
2 files changed, 124 insertions, 0 deletions
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
new file mode 100644
index 000000000000..a7db0e4d4b64
--- /dev/null
+++ b/dev-libs/libgpg-error/files/libgpg-error-1.45-gpgrt_config_libdir.patch
@@ -0,0 +1,56 @@
+Upstream:
+https://dev.gnupg.org/rE4615816f71e91f4c3bb8b0e4122dd153ec7c1927
+https://dev.gnupg.org/T6136
+
+From 4615816f71e91f4c3bb8b0e4122dd153ec7c1927 Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka <gniibe@fsij.org>
+Date: Thu, 25 Aug 2022 15:30:07 +0900
+Subject: [PATCH] gpgrt-config: Strip system paths for --cflags and --libs.
+
+* src/gpgrt-config.in: Strip -I and -L with system paths.
+
+--
+
+This behavior is more compatible to pkg-config.
+
+GnuPG-bug-id: 6136
+Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
+
+diff --git a/src/gpgrt-config.in b/src/gpgrt-config.in
+index 3aaa243..85d21b4 100644
+--- a/src/gpgrt-config.in
++++ b/src/gpgrt-config.in
+@@ -1,6 +1,6 @@
+ #!@INSTALLSHELLPATH@
+ # -*- mode: shell-script; sh-shell: "/bin/sh" -*-
+-# Copyright (C) 2018, 2021 g10 Code GmbH
++# Copyright (C) 2018, 2021, 2022 g10 Code GmbH
+ #
+ # This file is free software; as a special exception the author gives
+ # unlimited permission to copy and/or distribute it, with or without
+@@ -193,9 +193,14 @@ list_only_once () {
+ __arg=""
+
+ for __arg; do
+- if not_listed_yet $__arg $__result; then
+- __result="$__result${__result:+ }$__arg"
+- fi
++ case "$__arg" in
++ -I/usr/include|-I/include) ;;
++ *)
++ if not_listed_yet $__arg $__result; then
++ __result="$__result${__result:+ }$__arg"
++ fi
++ ;;
++ esac
+ done
+
+ echo $__result
+@@ -210,6 +215,7 @@ list_only_once_for_libs () {
+ # the resulted list is in reverse order
+ for __arg; do
+ case "$__arg" in
++ -L/usr/lib|-L/usr/lib64|-L/lib|-L/lib64) ;;
+ -l*)
+ # As-is
+ __rev_list="$__arg${__rev_list:+ }$__rev_list"
diff --git a/dev-libs/libgpg-error/libgpg-error-1.45-r1.ebuild b/dev-libs/libgpg-error/libgpg-error-1.45-r1.ebuild
new file mode 100644
index 000000000000..9d47ab1f8c4a
--- /dev/null
+++ b/dev-libs/libgpg-error/libgpg-error-1.45-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools multilib-minimal toolchain-funcs prefix
+
+DESCRIPTION="Contains error handling functions used by GnuPG software"
+HOMEPAGE="https://www.gnupg.org/related_software/libgpg-error"
+SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+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"
+IUSE="common-lisp nls static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}"
+BDEPEND="nls? ( sys-devel/gettext )"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/gpg-error-config
+)
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/gpg-error.h
+ /usr/include/gpgrt.h
+)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.44-remove_broken_check.patch"
+ "${FILESDIR}/${PN}-1.45-gpgrt_config_libdir.patch"
+)
+
+src_prepare() {
+ default
+
+ if use prefix ; then
+ # don't hardcode /usr/xpg4/bin/sh as shell on Solaris
+ sed -i -e 's/solaris\*/disabled/' configure.ac || die
+ fi
+
+ # only necessary for as long as we run eautoreconf, configure.ac
+ # uses ./autogen.sh to generate PACKAGE_VERSION, but autogen.sh is
+ # not a pure /bin/sh script, so it fails on some hosts
+ hprefixify -w 1 autogen.sh
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ $(multilib_is_native_abi || echo --disable-languages)
+ $(use_enable common-lisp languages)
+ $(use_enable nls)
+ # required for sys-power/suspend[crypt], bug 751568
+ $(use_enable static-libs static)
+ $(use_enable test tests)
+ --enable-threads
+ CC_FOR_BUILD="$(tc-getBUILD_CC)"
+ $("${S}/configure" --help | grep -o -- '--without-.*-prefix')
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ find "${ED}" -type f -name '*.la' -delete || die
+}