commit:     699f337091c0f6dbea147bca493b5040bb4d12d3
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 29 13:48:22 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Jun 29 13:48:22 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=699f3370

sys-apps/x86info: [QA] Add missing virtual/pkgconfig dependency

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-apps/x86info/files/x86info-1.30-makefile.patch | 28 ++++++++++++++++------
 sys-apps/x86info/x86info-1.30_p20190617.ebuild     |  6 +++--
 2 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/sys-apps/x86info/files/x86info-1.30-makefile.patch 
b/sys-apps/x86info/files/x86info-1.30-makefile.patch
index e1377c572fb..9e1768d6895 100644
--- a/sys-apps/x86info/files/x86info-1.30-makefile.patch
+++ b/sys-apps/x86info/files/x86info-1.30-makefile.patch
@@ -21,7 +21,16 @@
  ifneq ($(SYSROOT),)
  CFLAGS += --sysroot=$(SYSROOT)
  endif
-@@ -33,14 +33,8 @@
+@@ -18,7 +18,7 @@
+ CFLAGS += -Wswitch-enum
+ CFLAGS += -Wundef
+ CFLAGS += -Wwrite-strings
+-CFLAGS += $(shell pkg-config --cflags libpci)
++CFLAGS += $(shell $$PKG_CONFIG --cflags libpci)
+ 
+ # gcc specific
+ ifneq ($(shell $(CC) -v 2>&1 | grep -c "clang"), 1)
+@@ -33,20 +33,8 @@
  CPP_MAJOR := $(shell $(CPP) -dumpversion 2>&1 | cut -d'.' -f1)
  CPP_MINOR := $(shell $(CPP) -dumpversion 2>&1 | cut -d'.' -f2)
  DEVEL   := $(shell grep VERSION Makefile | head -n1 | grep pre | wc -l)
@@ -33,18 +42,23 @@
 -ifeq ($(CC),"")
 -CC = gcc
 -endif
-+LIBS += $(shell pkg-config --libs libpci)
+-
+-ifdef STATIC_LIBPCI
+-LIBPCI = -Wl,-Bstatic -lpci -Wl,-Bdynamic -lz
+-else
+-LIBPCI = -lpci
+-endif
++LIBS += $(shell $$PKG_CONFIG --libs libpci)
+ 
+ SHELL = /bin/sh
  
- ifdef STATIC_LIBPCI
- LIBPCI = -Wl,-Bstatic -lpci -Wl,-Bdynamic -lz
-@@ -68,15 +62,15 @@
+@@ -68,15 +56,14 @@
        $(sort $(patsubst %.c,%.o,$(wildcard vendors/*/*.c)))
  
  x86info: $(X86INFO_OBJS) $(X86INFO_HEADERS)
 -      $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o x86info $(X86INFO_OBJS) \
 -          $(LIBPCI)
-+      $(CC) $(CFLAGS) $(LDFLAGS) -o x86info $(X86INFO_OBJS) \
-+          $(LIBPCI) $(LIBS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o x86info $(X86INFO_OBJS) $(LIBS)
  
  DEPDIR= .deps
  -include $(X86INFO_SRC:%.c=$(DEPDIR)/%.d)

diff --git a/sys-apps/x86info/x86info-1.30_p20190617.ebuild 
b/sys-apps/x86info/x86info-1.30_p20190617.ebuild
index add19ae6a60..e19af2dd09e 100644
--- a/sys-apps/x86info/x86info-1.30_p20190617.ebuild
+++ b/sys-apps/x86info/x86info-1.30_p20190617.ebuild
@@ -19,7 +19,9 @@ KEYWORDS="-* ~amd64 ~x86"
 
 RDEPEND="sys-apps/pciutils:="
 DEPEND="${RDEPEND}"
-BDEPEND="${PYTHON_DEPS}"
+BDEPEND="
+       ${PYTHON_DEPS}
+       virtual/pkgconfig"
 
 CONFIG_CHECK="~MTRR ~X86_CPUID"
 S="${WORKDIR}/${PN}-${COMMIT}"
@@ -40,7 +42,7 @@ src_configure() {
                -Wdeclaration-after-statement -Wredundant-decls
        append-ldflags -Wl,-z,relro,-z,now
 
-       tc-export CC
+       tc-export CC PKG_CONFIG
 }
 
 src_compile() {

Reply via email to