Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 762796

Summary: dev-vcs/git[gnome-keyring]: ignores CC, CFLAGS, PKG_CONFIG
Product: Gentoo Linux Reporter: David Michael <fedora.dm0>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: normal CC: ionen, polynomial-c, sam
Priority: Normal Keywords: PATCH, PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/20045
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 243502    

Description David Michael 2020-12-31 14:55:52 UTC
https://github.com/git/git/blob/master/contrib/credential/libsecret/Makefile#L4-L7

Reproducible: Always

Steps to Reproduce:
1. emerge -1v dev-vcs/git

Actual Results:  
Package libsecret-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsecret-1.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libsecret-1', required by 'virtual:world', not found
Package libsecret-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsecret-1.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libsecret-1', required by 'virtual:world', not found
gcc -g -O2 -Wall   -o git-credential-libsecret.o -c git-credential-libsecret.c
git-credential-libsecret.c:29:10: fatal error: glib.h: No such file or directory
   29 | #include <glib.h>
      |          ^~~~~~~~
compilation terminated.
make: *** [Makefile:19: git-credential-libsecret.o] Error 1
 * ERROR: dev-vcs/git-2.26.2::gentoo failed (compile phase):
 *   emake failed

Expected Results:  
>>> dev-vcs/git-2.26.2 merged.

--- dev-vcs/git/git-2.26.2.ebuild
+++ dev-vcs/git/git-2.26.2.ebuild
@@ -55,7 +55,10 @@
 
 # Common to both DEPEND and RDEPEND
 DEPEND="
-	gnome-keyring? ( app-crypt/libsecret )
+	gnome-keyring? (
+		app-crypt/libsecret
+		dev-libs/glib:2
+	)
 	!libressl? ( dev-libs/openssl:0= )
 	libressl? ( dev-libs/libressl:= )
 	sys-libs/zlib
@@ -372,7 +375,7 @@
 
 	if use gnome-keyring ; then
 		pushd contrib/credential/libsecret &>/dev/null || die
-		git_emake || die "emake git-credential-libsecret failed"
+		git_emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" PKG_CONFIG="$(tc-getPKG_CONFIG)"
 		popd &>/dev/null || die
 	fi
Comment 1 Ionen Wolkens gentoo-dev 2020-12-31 15:12:44 UTC
Did a quick try to confirm:
    make: gcc: No such file or directory
Comment 2 Larry the Git Cow gentoo-dev 2021-03-22 10:06:55 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb797361214a6547228ddb23a5c046e14a9fdbe5

commit cb797361214a6547228ddb23a5c046e14a9fdbe5
Author:     David Michael <fedora.dm0@gmail.com>
AuthorDate: 2021-03-22 10:06:16 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2021-03-22 10:06:16 +0000

    dev-vcs/git: respect toolchain variables with USE=gnome-keyring
    
    Closes: https://bugs.gentoo.org/762796
    Package-Manager: Portage-3.0.13, Repoman-3.0.2
    Signed-off-by: David Michael <fedora.dm0@gmail.com>
    Signed-off-by: David Seifert <soap@gentoo.org>

 dev-vcs/git/git-2.26.2.ebuild    | 8 ++++++--
 dev-vcs/git/git-2.26.3.ebuild    | 8 ++++++--
 dev-vcs/git/git-2.28.1.ebuild    | 8 ++++++--
 dev-vcs/git/git-2.29.3.ebuild    | 8 ++++++--
 dev-vcs/git/git-2.30.2.ebuild    | 8 ++++++--
 dev-vcs/git/git-2.31.0-r1.ebuild | 8 ++++++--
 dev-vcs/git/git-9999-r1.ebuild   | 8 ++++++--
 dev-vcs/git/git-9999-r2.ebuild   | 8 ++++++--
 dev-vcs/git/git-9999-r3.ebuild   | 8 ++++++--
 dev-vcs/git/git-9999.ebuild      | 8 ++++++--
 10 files changed, 60 insertions(+), 20 deletions(-)