diff options
author | David Seifert <soap@gentoo.org> | 2020-06-29 14:33:02 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2020-06-29 14:33:02 +0200 |
commit | 560917f09c1e92a5f7504ab2b2cb05dba1b111c4 (patch) | |
tree | 9b1e3814d1cc0873808f32ca8137036a616f362c /sys-apps | |
parent | net-nds/nsscache: [QA] Fix various python issues (diff) | |
download | gentoo-560917f09c1e92a5f7504ab2b2cb05dba1b111c4.tar.gz gentoo-560917f09c1e92a5f7504ab2b2cb05dba1b111c4.tar.bz2 gentoo-560917f09c1e92a5f7504ab2b2cb05dba1b111c4.zip |
sys-apps/x86info: [QA] Fix various issues
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/x86info/files/x86info-1.30-makefile.patch | 58 | ||||
-rw-r--r-- | sys-apps/x86info/files/x86info-1.30-pic.patch | 31 | ||||
-rw-r--r-- | 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 000000000000..e1377c572fbd --- /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 000000000000..6288846b48b7 --- /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 d8a3b48dfadf..add19ae6a60d 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() { |