public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/x86info/, sys-apps/x86info/files/
@ 2020-06-29 12:33 David Seifert
  0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2020-06-29 12:33 UTC (permalink / raw
  To: gentoo-commits

commit:     560917f09c1e92a5f7504ab2b2cb05dba1b111c4
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 29 12:33:02 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Jun 29 12:33:02 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=560917f0

sys-apps/x86info: [QA] Fix various issues

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 | 58 ++++++++++++++++++++++
 sys-apps/x86info/files/x86info-1.30-pic.patch      | 31 ++++++++++++
 sys-apps/x86info/x86info-1.30_p20190617.ebuild     | 16 +++---
 3 files changed, 95 insertions(+), 10 deletions(-)

diff --git a/sys-apps/x86info/files/x86info-1.30-makefile.patch b/sys-apps/x86info/files/x86info-1.30-makefile.patch
new file mode 100644
index 00000000000..e1377c572fb
--- /dev/null
+++ b/sys-apps/x86info/files/x86info-1.30-makefile.patch
@@ -0,0 +1,58 @@
+--- a/lsmsr/Makefile
++++ b/lsmsr/Makefile
+@@ -40,7 +40,8 @@
+ 	generic_msr.h
+ 
+ %.h: %.regs createheader.py
+-	@python createheader.py $< `basename $< .regs` >$@
++	$(PYTHON) createheader.py $< `basename $< .regs` >$@.tmp ; \
++	mv $@.tmp $@
+ 
+ LSMSR_SRC = \
+ 	lsmsr.c \
+--- a/Makefile
++++ b/Makefile
+@@ -2,7 +2,7 @@
+ 
+ CFLAGS = -DVERSION="$(VERSION)"
+ 
+-CFLAGS += -Wall -W -g -O2 -D_FORTIFY_SOURCE=2 -I. -Iinclude
++CFLAGS += -Wall -W -I. -Iinclude
+ ifneq ($(SYSROOT),)
+ CFLAGS += --sysroot=$(SYSROOT)
+ endif
+@@ -33,14 +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)
+-CFLAGS  += $(shell if [ $(CPP_MAJOR) -eq 6 -a $(CPP_MINOR) -ge 3 -a $(DEVEL) -eq 1 ] ; then echo "-Werror"; else echo ""; fi)
+ 
+-LDFLAGS = -Wl,-z,relro,-z,now
+-LDFLAGS += $(shell pkg-config --libs libpci)
+-
+-ifeq ($(CC),"")
+-CC = gcc
+-endif
++LIBS += $(shell pkg-config --libs libpci)
+ 
+ ifdef STATIC_LIBPCI
+ LIBPCI = -Wl,-Bstatic -lpci -Wl,-Bdynamic -lz
+@@ -68,15 +62,15 @@
+ 	$(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)
+ 
+ DEPDIR= .deps
+ -include $(X86INFO_SRC:%.c=$(DEPDIR)/%.d)
+ df = $(DEPDIR)/$(*D)/$(*F)
+ 
+ %.o : %.c
+-	$(QUIET_CC)$(CC) $(CFLAGS) -o $@ -c $<
++	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
+ 	@mkdir -p $(DEPDIR)/$(*D)
+ 	@$(CC) -MM $(CFLAGS) $*.c > $(df).d
+ 	@mv -f $(df).d $(df).d.tmp

diff --git a/sys-apps/x86info/files/x86info-1.30-pic.patch b/sys-apps/x86info/files/x86info-1.30-pic.patch
new file mode 100644
index 00000000000..6288846b48b
--- /dev/null
+++ b/sys-apps/x86info/files/x86info-1.30-pic.patch
@@ -0,0 +1,31 @@
+--- a/cpuid.c
++++ b/cpuid.c
+@@ -25,12 +25,28 @@
+ 
+ 	bind_cpu(cpunr);
+ 
++#ifdef __PIC__
++	/* GCC on i386 bitches if you clobber ebx.  So hide it behind
++	 * gcc's back. */
++	asm(
++		"movl %%ebx,%%edi\n"
++		"cpuid\n"
++		"movl %%ebx,%1\n"
++		"movl %%edi,%%ebx\n"
++		: "=a" (a),
++		  "=m" (b),
++		  "+c" (c),
++		  "=d" (d)
++		: "0" ((unsigned int)idx)
++		: "edi");
++#else
+ 	asm("cpuid"
+ 		: "=a" (a),
+ 		  "=b" (b),
+ 		  "+c" (c),
+ 		  "=d" (d)
+ 		: "0" ((unsigned int)idx));
++#endif
+ 
+ 	if (eax!=NULL)
+ 		*eax = a;

diff --git a/sys-apps/x86info/x86info-1.30_p20190617.ebuild b/sys-apps/x86info/x86info-1.30_p20190617.ebuild
index d8a3b48dfad..add19ae6a60 100644
--- a/sys-apps/x86info/x86info-1.30_p20190617.ebuild
+++ b/sys-apps/x86info/x86info-1.30_p20190617.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-PYTHON_COMPAT=( python2_7 python3_{4..8} )
+PYTHON_COMPAT=( python3_{6..8} )
 
 inherit flag-o-matic linux-info python-any-r1 toolchain-funcs
 
@@ -16,21 +16,17 @@ SRC_URI="https://github.com/kernelslacker/x86info/archive/${COMMIT}.tar.gz -> ${
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="-* ~amd64 ~x86"
-IUSE=""
 
 RDEPEND="sys-apps/pciutils:="
-DEPEND="
-	${PYTHON_DEPS}
-	${RDEPEND}"
+DEPEND="${RDEPEND}"
+BDEPEND="${PYTHON_DEPS}"
 
 CONFIG_CHECK="~MTRR ~X86_CPUID"
 S="${WORKDIR}/${PN}-${COMMIT}"
 
 PATCHES=(
-	#"${FILESDIR}"/1.21-pic.patch
-	"${FILESDIR}"/${PN}-1.24-pic.patch #270388
-	#"${FILESDIR}"/${PN}-1.29-parallel-make-cleanup.patch
-	#"${FILESDIR}"/${PN}-1.30-fix-build-system.patch
+	"${FILESDIR}"/${PN}-1.30-pic.patch #270388
+	"${FILESDIR}"/${PN}-1.30-makefile.patch
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/x86info/, sys-apps/x86info/files/
@ 2020-06-29 13:48 David Seifert
  0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2020-06-29 13:48 UTC (permalink / raw
  To: gentoo-commits

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() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-29 13:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-29 13:48 [gentoo-commits] repo/gentoo:master commit in: sys-apps/x86info/, sys-apps/x86info/files/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2020-06-29 12:33 David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox