* [gentoo-commits] repo/gentoo:master commit in: sys-apps/lshw/, sys-apps/lshw/files/
@ 2016-02-06 13:29 Anthony G. Basile
0 siblings, 0 replies; 7+ messages in thread
From: Anthony G. Basile @ 2016-02-06 13:29 UTC (permalink / raw
To: gentoo-commits
commit: db21c283b846584ce1aa5e1bc7677876aec19007
Author: jakeogh <github.com <AT> v6y <DOT> net>
AuthorDate: Sat Feb 6 02:01:21 2016 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Feb 6 13:37:05 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db21c283
sys-apps/lshw: version bump to 02.17b-r2 with upstreamed musl patch
See: https://github.com/gentoo/gentoo/pull/800
sys-apps/lshw/files/lshw-02.17b-musl.patch | 186 +++++++++++++++++++++++++++++
sys-apps/lshw/lshw-02.17b-r2.ebuild | 73 +++++++++++
2 files changed, 259 insertions(+)
diff --git a/sys-apps/lshw/files/lshw-02.17b-musl.patch b/sys-apps/lshw/files/lshw-02.17b-musl.patch
new file mode 100644
index 0000000..3fb3cef
--- /dev/null
+++ b/sys-apps/lshw/files/lshw-02.17b-musl.patch
@@ -0,0 +1,186 @@
+--- a/src/core/osutils.cc 2016-02-04 23:47:31.071246925 +0000
++++ b/src/core/osutils.cc 2016-02-04 23:54:17.125253018 +0000
+@@ -9,6 +9,7 @@
+ #include <dirent.h>
+ #include <limits.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <string.h>
+ #include <regex.h>
+ #include <ctype.h>
+@@ -496,48 +497,48 @@
+
+ unsigned short be_short(const void * from)
+ {
+- __uint8_t *p = (__uint8_t*)from;
++ uint8_t *p = (uint8_t*)from;
+
+- return ((__uint16_t)(p[0]) << 8) +
+- (__uint16_t)p[1];
++ return ((uint16_t)(p[0]) << 8) +
++ (uint16_t)p[1];
+ }
+
+
+ unsigned short le_short(const void * from)
+ {
+- __uint8_t *p = (__uint8_t*)from;
++ uint8_t *p = (uint8_t*)from;
+
+- return ((__uint16_t)(p[1]) << 8) +
+- (__uint16_t)p[0];
++ return ((uint16_t)(p[1]) << 8) +
++ (uint16_t)p[0];
+ }
+
+
+ unsigned long be_long(const void * from)
+ {
+- __uint8_t *p = (__uint8_t*)from;
++ uint8_t *p = (uint8_t*)from;
+
+- return ((__uint32_t)(p[0]) << 24) +
+- ((__uint32_t)(p[1]) << 16) +
+- ((__uint32_t)(p[2]) << 8) +
+- (__uint32_t)p[3];
++ return ((uint32_t)(p[0]) << 24) +
++ ((uint32_t)(p[1]) << 16) +
++ ((uint32_t)(p[2]) << 8) +
++ (uint32_t)p[3];
+ }
+
+
+ unsigned long le_long(const void * from)
+ {
+- __uint8_t *p = (__uint8_t*)from;
++ uint8_t *p = (uint8_t*)from;
+
+- return ((__uint32_t)(p[3]) << 24) +
+- ((__uint32_t)(p[2]) << 16) +
+- ((__uint32_t)(p[1]) << 8) +
+- (__uint32_t)p[0];
++ return ((uint32_t)(p[3]) << 24) +
++ ((uint32_t)(p[2]) << 16) +
++ ((uint32_t)(p[1]) << 8) +
++ (uint32_t)p[0];
+
+ }
+
+
+ unsigned long long be_longlong(const void * from)
+ {
+- __uint8_t *p = (__uint8_t*)from;
++ uint8_t *p = (uint8_t*)from;
+
+ return ((unsigned long long)(p[0]) << 56) +
+ ((unsigned long long)(p[1]) << 48) +
+@@ -552,7 +553,7 @@
+
+ unsigned long long le_longlong(const void * from)
+ {
+- __uint8_t *p = (__uint8_t*)from;
++ uint8_t *p = (uint8_t*)from;
+
+ return ((unsigned long long)(p[7]) << 56) +
+ ((unsigned long long)(p[6]) << 48) +
+--- a/src/core/device-tree.cc 2016-02-05 00:02:15.539260197 +0000
++++ b/src/core/device-tree.cc 2016-02-05 00:38:50.523293133 +0000
+@@ -16,6 +16,7 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+@@ -24,13 +25,13 @@
+ __ID("@(#) $Id: device-tree.cc 2433 2012-01-10 22:01:30Z lyonel $");
+
+ #define DIMMINFOSIZE 0x80
+-typedef __uint8_t dimminfo_buf[DIMMINFOSIZE];
++typedef uint8_t dimminfo_buf[DIMMINFOSIZE];
+
+ struct dimminfo
+ {
+- __uint8_t version3;
++ uint8_t version3;
+ char serial[16];
+- __uint16_t version1, version2;
++ uint16_t version1, version2;
+ };
+
+ #define DEVICETREE "/proc/device-tree"
+--- a/src/core/pci.cc 2016-02-05 06:02:38.744584655 +0000
++++ b/src/core/pci.cc 2016-02-05 06:02:20.471584381 +0000
+@@ -7,6 +7,7 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <stdint.h>
++#include <libgen.h>
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -1131,9 +1132,9 @@
+ string drivername = readlink(string(devices[i]->d_name)+"/driver");
+ string modulename = readlink(string(devices[i]->d_name)+"/driver/module");
+
+- device->setConfig("driver", basename(drivername.c_str()));
++ device->setConfig("driver", basename(const_cast<char *>(drivername.c_str())));
+ if(exists(modulename))
+- device->setConfig("module", basename(modulename.c_str()));
++ device->setConfig("module", basename(const_cast<char *>(modulename.c_str())));
+
+ if(exists(string(devices[i]->d_name)+"/rom"))
+ {
+--- a/src/core/network.cc 2016-02-05 02:20:31.174384674 +0000
++++ b/src/core/network.cc 2016-02-05 02:21:27.940385526 +0000
+@@ -31,6 +31,7 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <stdio.h>
++#include <stdint.h>
+ #include <string.h>
+ #include <string>
+ #include <sys/types.h>
+@@ -49,9 +50,9 @@
+ #define SIOCETHTOOL 0x8946
+ #endif
+ typedef unsigned long long u64;
+-typedef __uint32_t u32;
+-typedef __uint16_t u16;
+-typedef __uint8_t u8;
++typedef uint32_t u32;
++typedef uint16_t u16;
++typedef uint8_t u8;
+
+ struct ethtool_cmd
+ {
+--- a/src/core/cpufreq.cc 2016-02-05 02:24:29.199388245 +0000
++++ b/src/core/cpufreq.cc 2016-02-05 02:26:03.283389657 +0000
+@@ -14,6 +14,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#include <limits.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <dirent.h>
+--- a/src/core/abi.cc 2016-02-05 06:13:46.072594669 +0000
++++ b/src/core/abi.cc 2016-02-05 06:14:19.320595168 +0000
+@@ -11,6 +11,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <dirent.h>
++#include <limits.h>
+
+ __ID("@(#) $Id: mem.cc 1352 2006-05-27 23:54:13Z ezix $");
+
+@@ -19,7 +20,7 @@
+ bool scan_abi(hwNode & system)
+ {
+ // are we compiled as 32- or 64-bit process ?
+- system.setWidth(sysconf(_SC_LONG_BIT));
++ system.setWidth(sysconf(LONG_BIT));
+
+ pushd(PROC_SYS);
+
diff --git a/sys-apps/lshw/lshw-02.17b-r2.ebuild b/sys-apps/lshw/lshw-02.17b-r2.ebuild
new file mode 100644
index 0000000..fcca24e
--- /dev/null
+++ b/sys-apps/lshw/lshw-02.17b-r2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic eutils toolchain-funcs
+
+MAJ_PV=${PV:0:${#PV}-1}
+MIN_PVE=${PV:0-1}
+MIN_PV=${MIN_PVE/b/B}
+
+MY_P="$PN-$MIN_PV.$MAJ_PV"
+DESCRIPTION="Hardware Lister"
+HOMEPAGE="http://ezix.org/project/wiki/HardwareLiSter"
+SRC_URI="http://ezix.org/software/files/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="gtk sqlite static"
+
+REQUIRED_USE="static? ( !gtk )"
+
+RDEPEND="gtk? ( x11-libs/gtk+:2 )
+ sqlite? ( dev-db/sqlite:3 )"
+DEPEND="${RDEPEND}
+ gtk? ( virtual/pkgconfig )
+ sqlite? ( virtual/pkgconfig )"
+RDEPEND="${RDEPEND}
+ sys-apps/hwids"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-fat.patch \
+ "${FILESDIR}"/${P}-musl.patch
+ # correct gettext behavior
+ if [[ -n "${LINGUAS+x}" ]] ; then
+ local langs
+
+ for i in $(cd src/po ; echo *.po | sed 's/\.po//') ; do
+ if has ${i} ${LINGUAS} ; then
+ langs += " ${i}"
+ fi
+ done
+ sed -i \
+ -e "/^LANGUAGES =/ s/=.*/= $langs/" \
+ src/po/Makefile || die
+ fi
+}
+
+src_compile() {
+ tc-export CC CXX AR
+ use static && append-ldflags -static
+
+ local sqlite=$(usex sqlite 1 0)
+
+ emake SQLITE=$sqlite all
+ if use gtk ; then
+ emake SQLITE=$sqlite gui
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
+ dodoc README docs/*
+ if use gtk ; then
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install-gui
+ make_desktop_entry /usr/sbin/gtk-lshw "Hardware Lister" "/usr/share/lshw/artwork/logo.svg"
+ fi
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/lshw/, sys-apps/lshw/files/
@ 2017-03-15 6:02 Mike Frysinger
0 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2017-03-15 6:02 UTC (permalink / raw
To: gentoo-commits
commit: 7b78b84875091a71d06d0917f29b64e896a35a42
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 15 06:00:02 2017 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Mar 15 06:01:57 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b78b848
sys-apps/lshw: version bump to 02.18b #612430
sys-apps/lshw/Manifest | 1 +
sys-apps/lshw/files/lshw-02.18b-gentoo.patch | 161 +++++++++++++++++++++
.../lshw/files/lshw-02.18b-gettext-array.patch | 31 ++++
sys-apps/lshw/lshw-02.18b.ebuild | 72 +++++++++
4 files changed, 265 insertions(+)
diff --git a/sys-apps/lshw/Manifest b/sys-apps/lshw/Manifest
index 84a667f9302..5170bcc0535 100644
--- a/sys-apps/lshw/Manifest
+++ b/sys-apps/lshw/Manifest
@@ -1,2 +1,3 @@
DIST lshw-B.02.16.tar.gz 1845891 SHA256 809882429555b93259785cc261dbff04c16c93d064db5f445a51945bc47157cb SHA512 ad3bd3d7b6f36f912265f0853f5aa37158c6d420a90a5e84b3e8fcd8a3c6137f7505cb5361e3eceb49954332d2466c686c946dcda8db0da3d51b3c48e343c2ab WHIRLPOOL 8e3200b726432859965be744c6afa437ffb4b57166084432064621773018b6f997a282ddea813916bc7faeced22a1286044b91bd69422b83372f03cf0878ca2d
DIST lshw-B.02.17.tar.gz 2005737 SHA256 eb9cc053fa0f1e78685cb695596e73931bfb55d2377e3bc3b8b94aff4c5a489c SHA512 868899dce98e786a08a2134d6e132c388d71ab0f03fa6e10881e14d7a882c1882b46bbc6bd6ddb021cfab87ad6c9fd369453c3916f0b3353027eb2d470e55d9b WHIRLPOOL 5b18df2732e50f38dd8d9168adb6083e9a637cf9596f692a7e6806cda2ad05c777babdbeab470d948604f45bbbf1282be6d9fc68bf5c70741acf2d884e93e749
+DIST lshw-B.02.18.tar.gz 2322176 SHA256 ae22ef11c934364be4fd2a0a1a7aadf4495a0251ec6979da280d342a89ca3c2f SHA512 4385db86101178b8bd33a80e991718e14f83277c66b3d63ae97cb4339196873b6e9b31a174024bf43d16fe66e1d7f8cf5cea56076697878087880c8821b11e47 WHIRLPOOL 42a76daa9426dbca1f9acd9afc5e66542ea87e4e6cc53c2a125443d3338765ce55845981d1d50b380201dc10c8f0cae6fd1eb573573eb7262ce87c85d74f3e20
diff --git a/sys-apps/lshw/files/lshw-02.18b-gentoo.patch b/sys-apps/lshw/files/lshw-02.18b-gentoo.patch
new file mode 100644
index 00000000000..0a50e9dc868
--- /dev/null
+++ b/sys-apps/lshw/files/lshw-02.18b-gentoo.patch
@@ -0,0 +1,161 @@
+--- lshw-B.02.18/src/Makefile
++++ lshw-B.02.18/src/Makefile
+@@ -21,11 +21,11 @@
+ CXX?=c++
+ INCLUDES=-I./core/
+ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
+-CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+ ifeq ($(SQLITE), 1)
+ CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
+ endif
+-LDFLAGS=-L./core/ -g
++LDFLAGS += -L./core/
+ ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
+ LDFLAGS+= -Wl,--as-needed
+ endif
+@@ -39,27 +39,25 @@
+ export LIBS
+ export LDFLAGS
+
+-DATAFILES = pci.ids usb.ids oui.txt manuf.txt
+-
+-all: $(PACKAGENAME) $(PACKAGENAME).1 $(DATAFILES)
++all: $(PACKAGENAME) $(PACKAGENAME).1
+
+ .cc.o:
+ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+ .PHONY: core
+ core:
+- +make -C core all
++ $(MAKE) -C core all
+
+ $(PACKAGENAME): core $(PACKAGENAME).o
+ $(CXX) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
+
+ .PHONY: po
+ po:
+- +make -C po all
++ $(MAKE) -C po all
+
+ .PHONY: gui
+ gui: core
+- +make -C gui all
++ $(MAKE) -C gui all
+
+ .PHONY: nologo
+ nologo:
+@@ -70,7 +68,6 @@
+
+ $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o
+ $(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
+- $(STRIP) $@
+
+ .PHONY: compressed
+ compressed: $(PACKAGENAME)-compressed
+@@ -93,14 +90,13 @@
+ manuf.txt:
+ wget -O $@ http://anonsvn.wireshark.org/wireshark/trunk/manuf
+
+-install: all
++install:
+ $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
+ $(INSTALL) -m 0755 $(PACKAGENAME) $(DESTDIR)/$(SBINDIR)
+ $(INSTALL) -d -m 0755 $(DESTDIR)/$(MANDIR)/man1
+ $(INSTALL) -m 0644 $(PACKAGENAME).1 $(DESTDIR)/$(MANDIR)/man1
+ $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
+- $(INSTALL) -m 0644 $(DATAFILES) $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
+- make -C po install
++ $(MAKE) -C po install
+
+ install-gui: gui
+ $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
+@@ -112,8 +108,8 @@
+
+ clean:
+ rm -f $(PACKAGENAME).o $(PACKAGENAME) $(PACKAGENAME)-static $(PACKAGENAME)-compressed
+- make -C core clean
+- make -C gui clean
++ $(MAKE) -C core clean
++ $(MAKE) -C gui clean
+
+ .timestamp:
+ date --utc +%Y%m%d%H%M%S > $@
+--- lshw-B.02.18/src/core/Makefile
++++ lshw-B.02.18/src/core/Makefile
+@@ -1,10 +1,9 @@
+ PACKAGENAME?=lshw
+
+-CXX=c++
++CXX?=c++
+ INCLUDES=
+ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
+-CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+-LDFLAGS=
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+ LDSTATIC=
+ LIBS=
+
+--- lshw-B.02.18/src/core/pci.cc
++++ lshw-B.02.18/src/core/pci.cc
+@@ -17,7 +17,7 @@
+
+ #define PROC_BUS_PCI "/proc/bus/pci"
+ #define SYS_BUS_PCI "/sys/bus/pci"
+-#define PCIID_PATH DATADIR"/pci.ids:/usr/share/lshw/pci.ids:/usr/local/share/pci.ids:/usr/share/pci.ids:/etc/pci.ids:/usr/share/hwdata/pci.ids:/usr/share/misc/pci.ids"
++#define PCIID_PATH "/usr/share/misc/pci.ids"
+
+ #define PCI_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 revision */
+ #define PCI_VENDOR_ID 0x00 /* 16 bits */
+--- lshw-B.02.18/src/core/usb.cc
++++ lshw-B.02.18/src/core/usb.cc
+@@ -27,7 +27,7 @@
+
+ #define PROCBUSUSBDEVICES "/proc/bus/usb/devices"
+ #define SYSKERNELDEBUGUSBDEVICES "/sys/kernel/debug/usb/devices"
+-#define USBID_PATH DATADIR"/usb.ids:/usr/share/lshw/usb.ids:/usr/local/share/usb.ids:/usr/share/usb.ids:/etc/usb.ids:/usr/share/hwdata/usb.ids:/usr/share/misc/usb.ids"
++#define USBID_PATH "/usr/share/misc/usb.ids"
+
+ #define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */
+ #define USB_CLASS_AUDIO 1
+--- lshw-B.02.18/src/gui/Makefile
++++ lshw-B.02.18/src/gui/Makefile
+@@ -1,5 +1,7 @@
+ PACKAGENAME?=lshw
+
++SQLITE?=0
++
+ CXX?=c++
+ CC?=cc
+ STRIP?=strip
+@@ -8,14 +10,15 @@
+ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
+ GTKINCLUDES=$(shell pkg-config gtk+-2.0 --cflags)
+ INCLUDES=-I../core $(GTKINCLUDES)
+-CXXFLAGS=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
++CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
+ CFLAGS=$(CXXFLAGS) $(DEFINES)
+ GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs)
+-LIBS=-L../core -llshw -lresolv $(GTKLIBS)
+-LDFLAGS=
+-ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
+- LDFLAGS+= -Wl,--as-needed
+-endif
++LIBS=-L../core -llshw -lresolv $(GTKLIBS)
++
++ifeq ($(SQLITE), 1)
++ CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
++ LIBS+= $(shell pkg-config --libs sqlite3)
++endif
+
+ OBJS = gtk-lshw.o callbacks.o engine.o print-gui.o stock.o
+ SRCS = $(OBJS:.o=.c)
+@@ -39,7 +42,6 @@
+ $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ install: all
+- $(STRIP) gtk-$(PACKAGENAME)
+
+ clean:
+ rm -f $(OBJS) gtk-$(PACKAGENAME) gtk-lshw.glade.bak gtk-lshw.gladep.bak callbacks.c.bak callbacks.h.bak Makefile.bak
diff --git a/sys-apps/lshw/files/lshw-02.18b-gettext-array.patch b/sys-apps/lshw/files/lshw-02.18b-gettext-array.patch
new file mode 100644
index 00000000000..4aea6420d7c
--- /dev/null
+++ b/sys-apps/lshw/files/lshw-02.18b-gettext-array.patch
@@ -0,0 +1,31 @@
+patch sent upstream
+
+From 1fb7ebed787ec1b73218c1f12cbb71b103433375 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 14 Mar 2017 22:25:12 -0700
+Subject: [PATCH] fix array access with string translations
+
+The code forgot to rebase the num to 0 before indexing the string array.
+It also provides 5 strings, but was only allowing 4 to be accessed.
+---
+ src/core/dmi.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/core/dmi.cc b/src/core/dmi.cc
+index 250f48572d54..0db074975f2d 100644
+--- a/src/core/dmi.cc
++++ b/src/core/dmi.cc
+@@ -510,8 +510,8 @@ static const char *dmi_memory_array_location(u8 num)
+ };
+ if (num <= 0x0A)
+ return _(memory_array_location[num]);
+- if (num >= 0xA0 && num < 0xA4)
+- return _(jp_memory_array_location[num]);
++ if (num >= 0xA0 && num <= 0xA4)
++ return _(jp_memory_array_location[num - 0xA0]);
+ return "";
+ }
+
+--
+2.12.0
+
diff --git a/sys-apps/lshw/lshw-02.18b.ebuild b/sys-apps/lshw/lshw-02.18b.ebuild
new file mode 100644
index 00000000000..b29154e51e8
--- /dev/null
+++ b/sys-apps/lshw/lshw-02.18b.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PLOCALES='fr'
+
+inherit flag-o-matic eutils toolchain-funcs l10n
+
+MAJ_PV=${PV:0:${#PV}-1}
+MIN_PVE=${PV:0-1}
+MIN_PV=${MIN_PVE/b/B}
+
+MY_P="$PN-$MIN_PV.$MAJ_PV"
+DESCRIPTION="Hardware Lister"
+HOMEPAGE="http://ezix.org/project/wiki/HardwareLiSter"
+SRC_URI="http://ezix.org/software/files/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="gtk sqlite static"
+
+REQUIRED_USE="static? ( !gtk )"
+
+RDEPEND="gtk? ( x11-libs/gtk+:2 )
+ sqlite? ( dev-db/sqlite:3 )"
+DEPEND="${RDEPEND}
+ gtk? ( virtual/pkgconfig )
+ sqlite? ( virtual/pkgconfig )"
+RDEPEND="${RDEPEND}
+ sys-apps/hwids"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-02.18b-gentoo.patch
+ "${FILESDIR}"/${PN}-02.18b-gettext-array.patch
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ l10n_find_plocales_changes "src/po" "" ".po" || die
+ sed -i \
+ -e "/^LANGUAGES =/ s/=.*/= $(l10n_get_locales)/" \
+ src/po/Makefile || die
+ sed -i \
+ -e 's:\<pkg-config\>:${PKG_CONFIG}:' \
+ src/Makefile src/gui/Makefile || die
+}
+
+src_compile() {
+ tc-export CC CXX AR PKG_CONFIG
+ use static && append-ldflags -static
+
+ # Need two sep make statements to avoid parallel build issues. #588174
+ local sqlite=$(usex sqlite 1 0)
+ emake SQLITE=${sqlite} all
+ use gtk && emake SQLITE=${sqlite} gui
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install $(usex gtk 'install-gui' '')
+ dodoc README.md docs/*
+ if use gtk ; then
+ newicon -s scalable src/gui/artwork/logo.svg gtk-lshw.svg
+ make_desktop_entry \
+ "${EPREFIX}"/usr/sbin/gtk-lshw \
+ "${DESCRIPTION}"
+ fi
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/lshw/, sys-apps/lshw/files/
@ 2017-09-01 2:22 Tim Harder
0 siblings, 0 replies; 7+ messages in thread
From: Tim Harder @ 2017-09-01 2:22 UTC (permalink / raw
To: gentoo-commits
commit: c6e928d9d154ce3c86d89e961bf5afcb1200a440
Author: Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 1 02:19:32 2017 +0000
Commit: Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Fri Sep 1 02:21:52 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6e928d9
sys-apps/lshw: remove old
sys-apps/lshw/Manifest | 1 -
sys-apps/lshw/files/lshw-02.17b-fat.patch | 10 --
sys-apps/lshw/files/lshw-02.17b-gentoo.patch | 159 -----------------------
sys-apps/lshw/files/lshw-02.17b-musl.patch | 186 ---------------------------
sys-apps/lshw/lshw-02.17b-r1.ebuild | 71 ----------
sys-apps/lshw/lshw-02.17b-r2.ebuild | 67 ----------
sys-apps/lshw/lshw-02.17b.ebuild | 69 ----------
7 files changed, 563 deletions(-)
diff --git a/sys-apps/lshw/Manifest b/sys-apps/lshw/Manifest
index 5170bcc0535..675dc5e69f3 100644
--- a/sys-apps/lshw/Manifest
+++ b/sys-apps/lshw/Manifest
@@ -1,3 +1,2 @@
DIST lshw-B.02.16.tar.gz 1845891 SHA256 809882429555b93259785cc261dbff04c16c93d064db5f445a51945bc47157cb SHA512 ad3bd3d7b6f36f912265f0853f5aa37158c6d420a90a5e84b3e8fcd8a3c6137f7505cb5361e3eceb49954332d2466c686c946dcda8db0da3d51b3c48e343c2ab WHIRLPOOL 8e3200b726432859965be744c6afa437ffb4b57166084432064621773018b6f997a282ddea813916bc7faeced22a1286044b91bd69422b83372f03cf0878ca2d
-DIST lshw-B.02.17.tar.gz 2005737 SHA256 eb9cc053fa0f1e78685cb695596e73931bfb55d2377e3bc3b8b94aff4c5a489c SHA512 868899dce98e786a08a2134d6e132c388d71ab0f03fa6e10881e14d7a882c1882b46bbc6bd6ddb021cfab87ad6c9fd369453c3916f0b3353027eb2d470e55d9b WHIRLPOOL 5b18df2732e50f38dd8d9168adb6083e9a637cf9596f692a7e6806cda2ad05c777babdbeab470d948604f45bbbf1282be6d9fc68bf5c70741acf2d884e93e749
DIST lshw-B.02.18.tar.gz 2322176 SHA256 ae22ef11c934364be4fd2a0a1a7aadf4495a0251ec6979da280d342a89ca3c2f SHA512 4385db86101178b8bd33a80e991718e14f83277c66b3d63ae97cb4339196873b6e9b31a174024bf43d16fe66e1d7f8cf5cea56076697878087880c8821b11e47 WHIRLPOOL 42a76daa9426dbca1f9acd9afc5e66542ea87e4e6cc53c2a125443d3338765ce55845981d1d50b380201dc10c8f0cae6fd1eb573573eb7262ce87c85d74f3e20
diff --git a/sys-apps/lshw/files/lshw-02.17b-fat.patch b/sys-apps/lshw/files/lshw-02.17b-fat.patch
deleted file mode 100644
index 08654fd5af6..00000000000
--- a/sys-apps/lshw/files/lshw-02.17b-fat.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-http://bugs.gentoo.org/485496
-
---- src/core/fat.cc
-+++ src/core/fat.cc
-@@ -82,4 +82,5 @@
- uint8_t pmagic[2];
- } __attribute__((__packed__)) fat32;
-+ char sector[512]; // to make sure the whole struct is at least 512 bytes long
- } __attribute__((__packed__)) type;
- } __attribute__((__packed__));
diff --git a/sys-apps/lshw/files/lshw-02.17b-gentoo.patch b/sys-apps/lshw/files/lshw-02.17b-gentoo.patch
deleted file mode 100644
index 1d3d431ec80..00000000000
--- a/sys-apps/lshw/files/lshw-02.17b-gentoo.patch
+++ /dev/null
@@ -1,159 +0,0 @@
---- lshw-B.02.17.orig/src/Makefile
-+++ lshw-B.02.17/src/Makefile
-@@ -21,11 +21,11 @@
- CXX?=c++
- INCLUDES=-I./core/
- DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
--CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
-+CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
- ifeq ($(SQLITE), 1)
- CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
- endif
--LDFLAGS=-L./core/ -g
-+LDFLAGS += -L./core/
- ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
- LDFLAGS+= -Wl,--as-needed
- endif
-@@ -39,27 +39,25 @@
- export LIBS
- export LDFLAGS
-
--DATAFILES = pci.ids usb.ids oui.txt manuf.txt
--
--all: $(PACKAGENAME) $(PACKAGENAME).1 $(DATAFILES)
-+all: $(PACKAGENAME) $(PACKAGENAME).1
-
- .cc.o:
- $(CXX) $(CXXFLAGS) -c $< -o $@
-
- .PHONY: core
- core:
-- +make -C core all
-+ $(MAKE) -C core all
-
- $(PACKAGENAME): core $(PACKAGENAME).o
- $(CXX) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
-
- .PHONY: po
- po:
-- +make -C po all
-+ $(MAKE) -C po all
-
- .PHONY: gui
- gui: core
-- +make -C gui all
-+ $(MAKE) -C gui all
-
- .PHONY: nologo
- nologo:
-@@ -70,7 +68,6 @@
-
- $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o
- $(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
-- $(STRIP) $@
-
- .PHONY: compressed
- compressed: $(PACKAGENAME)-compressed
-@@ -93,14 +90,13 @@
- manuf.txt:
- wget -O $@ http://anonsvn.wireshark.org/wireshark/trunk/manuf
-
--install: all
-+install:
- $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
- $(INSTALL) -m 0755 $(PACKAGENAME) $(DESTDIR)/$(SBINDIR)
- $(INSTALL) -d -m 0755 $(DESTDIR)/$(MANDIR)/man1
- $(INSTALL) -m 0644 $(PACKAGENAME).1 $(DESTDIR)/$(MANDIR)/man1
- $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
-- $(INSTALL) -m 0644 $(DATAFILES) $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
-- make -C po install
-+ $(MAKE) -C po install
-
- install-gui: gui
- $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
-@@ -112,8 +108,8 @@
-
- clean:
- rm -f $(PACKAGENAME).o $(PACKAGENAME) $(PACKAGENAME)-static $(PACKAGENAME)-compressed
-- make -C core clean
-- make -C gui clean
-+ $(MAKE) -C core clean
-+ $(MAKE) -C gui clean
-
- .timestamp:
- date --utc +%Y%m%d%H%M%S > $@
---- lshw-B.02.17.orig/src/core/Makefile
-+++ lshw-B.02.17/src/core/Makefile
-@@ -1,10 +1,9 @@
- PACKAGENAME?=lshw
-
--CXX=c++
-+CXX?=c++
- INCLUDES=
- DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
--CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
--LDFLAGS=
-+CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
- LDSTATIC=
- LIBS=
-
---- lshw-B.02.17.orig/src/core/pci.cc
-+++ lshw-B.02.17/src/core/pci.cc
-@@ -17,7 +17,7 @@
-
- #define PROC_BUS_PCI "/proc/bus/pci"
- #define SYS_BUS_PCI "/sys/bus/pci"
--#define PCIID_PATH DATADIR"/pci.ids:/usr/share/lshw/pci.ids:/usr/local/share/pci.ids:/usr/share/pci.ids:/etc/pci.ids:/usr/share/hwdata/pci.ids:/usr/share/misc/pci.ids"
-+#define PCIID_PATH "/usr/share/misc/pci.ids"
-
- #define PCI_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 revision */
- #define PCI_VENDOR_ID 0x00 /* 16 bits */
---- lshw-B.02.17.orig/src/core/usb.cc
-+++ lshw-B.02.17/src/core/usb.cc
-@@ -27,7 +27,7 @@
-
- #define PROCBUSUSBDEVICES "/proc/bus/usb/devices"
- #define SYSKERNELDEBUGUSBDEVICES "/sys/kernel/debug/usb/devices"
--#define USBID_PATH DATADIR"/usb.ids:/usr/share/lshw/usb.ids:/usr/local/share/usb.ids:/usr/share/usb.ids:/etc/usb.ids:/usr/share/hwdata/usb.ids:/usr/share/misc/usb.ids"
-+#define USBID_PATH "/usr/share/misc/usb.ids"
-
- #define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */
- #define USB_CLASS_AUDIO 1
---- lshw-B.02.17.orig/src/gui/Makefile
-+++ lshw-B.02.17/src/gui/Makefile
-@@ -1,5 +1,7 @@
- PACKAGENAME?=lshw
-
-+SQLITE?=0
-+
- CXX?=c++
- CC?=cc
- STRIP?=strip
-@@ -8,13 +10,14 @@
- DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
- GTKINCLUDES=$(shell pkg-config gtk+-2.0 --cflags)
- INCLUDES=-I../core $(GTKINCLUDES)
--CXXFLAGS=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
-+CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
- CFLAGS=$(CXXFLAGS) $(DEFINES)
- GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs)
--LIBS=-L../core -llshw -lresolv -lsqlite3 $(GTKLIBS)
--LDFLAGS=
--ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
-- LDFLAGS+= -Wl,--as-needed
-+LIBS=-L../core -llshw -lresolv $(GTKLIBS)
-+
-+ifeq ($(SQLITE), 1)
-+ CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
-+ LIBS+= $(shell pkg-config --libs sqlite3)
- endif
-
- OBJS = gtk-lshw.o callbacks.o engine.o print-gui.o stock.o
-@@ -39,7 +42,6 @@
- $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
-
- install: all
-- $(STRIP) gtk-$(PACKAGENAME)
-
- clean:
- rm -f $(OBJS) gtk-$(PACKAGENAME) gtk-lshw.glade.bak gtk-lshw.gladep.bak callbacks.c.bak callbacks.h.bak Makefile.bak
diff --git a/sys-apps/lshw/files/lshw-02.17b-musl.patch b/sys-apps/lshw/files/lshw-02.17b-musl.patch
deleted file mode 100644
index 3fb3cef087f..00000000000
--- a/sys-apps/lshw/files/lshw-02.17b-musl.patch
+++ /dev/null
@@ -1,186 +0,0 @@
---- a/src/core/osutils.cc 2016-02-04 23:47:31.071246925 +0000
-+++ b/src/core/osutils.cc 2016-02-04 23:54:17.125253018 +0000
-@@ -9,6 +9,7 @@
- #include <dirent.h>
- #include <limits.h>
- #include <stdlib.h>
-+#include <stdint.h>
- #include <string.h>
- #include <regex.h>
- #include <ctype.h>
-@@ -496,48 +497,48 @@
-
- unsigned short be_short(const void * from)
- {
-- __uint8_t *p = (__uint8_t*)from;
-+ uint8_t *p = (uint8_t*)from;
-
-- return ((__uint16_t)(p[0]) << 8) +
-- (__uint16_t)p[1];
-+ return ((uint16_t)(p[0]) << 8) +
-+ (uint16_t)p[1];
- }
-
-
- unsigned short le_short(const void * from)
- {
-- __uint8_t *p = (__uint8_t*)from;
-+ uint8_t *p = (uint8_t*)from;
-
-- return ((__uint16_t)(p[1]) << 8) +
-- (__uint16_t)p[0];
-+ return ((uint16_t)(p[1]) << 8) +
-+ (uint16_t)p[0];
- }
-
-
- unsigned long be_long(const void * from)
- {
-- __uint8_t *p = (__uint8_t*)from;
-+ uint8_t *p = (uint8_t*)from;
-
-- return ((__uint32_t)(p[0]) << 24) +
-- ((__uint32_t)(p[1]) << 16) +
-- ((__uint32_t)(p[2]) << 8) +
-- (__uint32_t)p[3];
-+ return ((uint32_t)(p[0]) << 24) +
-+ ((uint32_t)(p[1]) << 16) +
-+ ((uint32_t)(p[2]) << 8) +
-+ (uint32_t)p[3];
- }
-
-
- unsigned long le_long(const void * from)
- {
-- __uint8_t *p = (__uint8_t*)from;
-+ uint8_t *p = (uint8_t*)from;
-
-- return ((__uint32_t)(p[3]) << 24) +
-- ((__uint32_t)(p[2]) << 16) +
-- ((__uint32_t)(p[1]) << 8) +
-- (__uint32_t)p[0];
-+ return ((uint32_t)(p[3]) << 24) +
-+ ((uint32_t)(p[2]) << 16) +
-+ ((uint32_t)(p[1]) << 8) +
-+ (uint32_t)p[0];
-
- }
-
-
- unsigned long long be_longlong(const void * from)
- {
-- __uint8_t *p = (__uint8_t*)from;
-+ uint8_t *p = (uint8_t*)from;
-
- return ((unsigned long long)(p[0]) << 56) +
- ((unsigned long long)(p[1]) << 48) +
-@@ -552,7 +553,7 @@
-
- unsigned long long le_longlong(const void * from)
- {
-- __uint8_t *p = (__uint8_t*)from;
-+ uint8_t *p = (uint8_t*)from;
-
- return ((unsigned long long)(p[7]) << 56) +
- ((unsigned long long)(p[6]) << 48) +
---- a/src/core/device-tree.cc 2016-02-05 00:02:15.539260197 +0000
-+++ b/src/core/device-tree.cc 2016-02-05 00:38:50.523293133 +0000
-@@ -16,6 +16,7 @@
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <stdlib.h>
-+#include <stdint.h>
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
-@@ -24,13 +25,13 @@
- __ID("@(#) $Id: device-tree.cc 2433 2012-01-10 22:01:30Z lyonel $");
-
- #define DIMMINFOSIZE 0x80
--typedef __uint8_t dimminfo_buf[DIMMINFOSIZE];
-+typedef uint8_t dimminfo_buf[DIMMINFOSIZE];
-
- struct dimminfo
- {
-- __uint8_t version3;
-+ uint8_t version3;
- char serial[16];
-- __uint16_t version1, version2;
-+ uint16_t version1, version2;
- };
-
- #define DEVICETREE "/proc/device-tree"
---- a/src/core/pci.cc 2016-02-05 06:02:38.744584655 +0000
-+++ b/src/core/pci.cc 2016-02-05 06:02:20.471584381 +0000
-@@ -7,6 +7,7 @@
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <stdint.h>
-+#include <libgen.h>
- #include <unistd.h>
- #include <stdio.h>
- #include <string.h>
-@@ -1131,9 +1132,9 @@
- string drivername = readlink(string(devices[i]->d_name)+"/driver");
- string modulename = readlink(string(devices[i]->d_name)+"/driver/module");
-
-- device->setConfig("driver", basename(drivername.c_str()));
-+ device->setConfig("driver", basename(const_cast<char *>(drivername.c_str())));
- if(exists(modulename))
-- device->setConfig("module", basename(modulename.c_str()));
-+ device->setConfig("module", basename(const_cast<char *>(modulename.c_str())));
-
- if(exists(string(devices[i]->d_name)+"/rom"))
- {
---- a/src/core/network.cc 2016-02-05 02:20:31.174384674 +0000
-+++ b/src/core/network.cc 2016-02-05 02:21:27.940385526 +0000
-@@ -31,6 +31,7 @@
- #include <fcntl.h>
- #include <unistd.h>
- #include <stdio.h>
-+#include <stdint.h>
- #include <string.h>
- #include <string>
- #include <sys/types.h>
-@@ -49,9 +50,9 @@
- #define SIOCETHTOOL 0x8946
- #endif
- typedef unsigned long long u64;
--typedef __uint32_t u32;
--typedef __uint16_t u16;
--typedef __uint8_t u8;
-+typedef uint32_t u32;
-+typedef uint16_t u16;
-+typedef uint8_t u8;
-
- struct ethtool_cmd
- {
---- a/src/core/cpufreq.cc 2016-02-05 02:24:29.199388245 +0000
-+++ b/src/core/cpufreq.cc 2016-02-05 02:26:03.283389657 +0000
-@@ -14,6 +14,7 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
-+#include <limits.h>
- #include <stdio.h>
- #include <unistd.h>
- #include <dirent.h>
---- a/src/core/abi.cc 2016-02-05 06:13:46.072594669 +0000
-+++ b/src/core/abi.cc 2016-02-05 06:14:19.320595168 +0000
-@@ -11,6 +11,7 @@
- #include <unistd.h>
- #include <stdlib.h>
- #include <dirent.h>
-+#include <limits.h>
-
- __ID("@(#) $Id: mem.cc 1352 2006-05-27 23:54:13Z ezix $");
-
-@@ -19,7 +20,7 @@
- bool scan_abi(hwNode & system)
- {
- // are we compiled as 32- or 64-bit process ?
-- system.setWidth(sysconf(_SC_LONG_BIT));
-+ system.setWidth(sysconf(LONG_BIT));
-
- pushd(PROC_SYS);
-
diff --git a/sys-apps/lshw/lshw-02.17b-r1.ebuild b/sys-apps/lshw/lshw-02.17b-r1.ebuild
deleted file mode 100644
index 75c7fccc514..00000000000
--- a/sys-apps/lshw/lshw-02.17b-r1.ebuild
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit flag-o-matic eutils toolchain-funcs
-
-MAJ_PV=${PV:0:${#PV}-1}
-MIN_PVE=${PV:0-1}
-MIN_PV=${MIN_PVE/b/B}
-
-MY_P="$PN-$MIN_PV.$MAJ_PV"
-DESCRIPTION="Hardware Lister"
-HOMEPAGE="http://ezix.org/project/wiki/HardwareLiSter"
-SRC_URI="http://ezix.org/software/files/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
-IUSE="gtk sqlite static"
-
-REQUIRED_USE="static? ( !gtk )"
-
-RDEPEND="gtk? ( x11-libs/gtk+:2 )
- sqlite? ( dev-db/sqlite:3 )"
-DEPEND="${RDEPEND}
- gtk? ( virtual/pkgconfig )
- sqlite? ( virtual/pkgconfig )"
-RDEPEND="${RDEPEND}
- sys-apps/hwids"
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
- epatch \
- "${FILESDIR}"/${P}-gentoo.patch \
- "${FILESDIR}"/${P}-fat.patch
- # correct gettext behavior
- if [[ -n "${LINGUAS+x}" ]] ; then
- local langs
-
- for i in $(cd src/po ; echo *.po | sed 's/\.po//') ; do
- if has ${i} ${LINGUAS} ; then
- langs+=" ${i}"
- fi
- done
- sed -i \
- -e "/^LANGUAGES =/ s/=.*/= $langs/" \
- src/po/Makefile || die
- fi
-}
-
-src_compile() {
- tc-export CC CXX AR
- use static && append-ldflags -static
-
- local sqlite=$(usex sqlite 1 0)
-
- emake SQLITE=$sqlite all
- if use gtk ; then
- emake SQLITE=$sqlite gui
- fi
-}
-
-src_install() {
- emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
- dodoc README docs/*
- if use gtk ; then
- emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install-gui
- make_desktop_entry /usr/sbin/gtk-lshw "Hardware Lister" "/usr/share/lshw/artwork/logo.svg"
- fi
-}
diff --git a/sys-apps/lshw/lshw-02.17b-r2.ebuild b/sys-apps/lshw/lshw-02.17b-r2.ebuild
deleted file mode 100644
index 74fc33cfafa..00000000000
--- a/sys-apps/lshw/lshw-02.17b-r2.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PLOCALES='fr'
-
-inherit flag-o-matic eutils toolchain-funcs l10n
-
-MAJ_PV=${PV:0:${#PV}-1}
-MIN_PVE=${PV:0-1}
-MIN_PV=${MIN_PVE/b/B}
-
-MY_P="$PN-$MIN_PV.$MAJ_PV"
-DESCRIPTION="Hardware Lister"
-HOMEPAGE="http://ezix.org/project/wiki/HardwareLiSter"
-SRC_URI="http://ezix.org/software/files/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
-IUSE="gtk sqlite static"
-
-REQUIRED_USE="static? ( !gtk )"
-
-RDEPEND="gtk? ( x11-libs/gtk+:2 )
- sqlite? ( dev-db/sqlite:3 )"
-DEPEND="${RDEPEND}
- gtk? ( virtual/pkgconfig )
- sqlite? ( virtual/pkgconfig )"
-RDEPEND="${RDEPEND}
- sys-apps/hwids"
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
- epatch \
- "${FILESDIR}"/${P}-gentoo.patch \
- "${FILESDIR}"/${P}-fat.patch \
- "${FILESDIR}"/${P}-musl.patch
-
- l10n_find_plocales_changes "src/po" "" ".po" || die
- sed -i \
- -e "/^LANGUAGES =/ s/=.*/= $(l10n_get_locales)/" \
- src/po/Makefile || die
- sed -i \
- -e 's:\<pkg-config\>:${PKG_CONFIG}:' \
- src/Makefile src/gui/Makefile || die
-}
-
-src_compile() {
- tc-export CC CXX AR PKG_CONFIG
- use static && append-ldflags -static
-
- # Need two sep make statements to avoid parallel build issues. #588174
- local sqlite=$(usex sqlite 1 0)
- emake SQLITE=${sqlite} all
- use gtk && emake SQLITE=${sqlite} gui
-}
-
-src_install() {
- emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install $(usex gtk 'install-gui' '')
- dodoc README docs/*
- if use gtk ; then
- make_desktop_entry /usr/sbin/gtk-lshw "Hardware Lister" "/usr/share/lshw/artwork/logo.svg"
- fi
-}
diff --git a/sys-apps/lshw/lshw-02.17b.ebuild b/sys-apps/lshw/lshw-02.17b.ebuild
deleted file mode 100644
index 1ce460e3b86..00000000000
--- a/sys-apps/lshw/lshw-02.17b.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-inherit flag-o-matic eutils toolchain-funcs
-
-MAJ_PV=${PV:0:${#PV}-1}
-MIN_PVE=${PV:0-1}
-MIN_PV=${MIN_PVE/b/B}
-
-MY_P="$PN-$MIN_PV.$MAJ_PV"
-DESCRIPTION="Hardware Lister"
-HOMEPAGE="http://ezix.org/project/wiki/HardwareLiSter"
-SRC_URI="http://ezix.org/software/files/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
-IUSE="gtk sqlite static"
-
-REQUIRED_USE="static? ( !gtk )"
-
-RDEPEND="gtk? ( x11-libs/gtk+:2 )
- sqlite? ( dev-db/sqlite:3 )"
-DEPEND="${RDEPEND}
- gtk? ( virtual/pkgconfig )
- sqlite? ( virtual/pkgconfig )"
-RDEPEND="${RDEPEND}
- sys-apps/hwids"
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-gentoo.patch
- # correct gettext behavior
- if [[ -n "${LINGUAS+x}" ]] ; then
- local langs
-
- for i in $(cd src/po ; echo *.po | sed 's/\.po//') ; do
- if has ${i} ${LINGUAS} ; then
- langs+=" ${i}"
- fi
- done
- sed -i \
- -e "/^LANGUAGES =/ s/=.*/= $langs/" \
- src/po/Makefile || die
- fi
-}
-
-src_compile() {
- tc-export CC CXX AR
- use static && append-ldflags -static
-
- local sqlite=$(usex sqlite 1 0)
-
- emake SQLITE=$sqlite all
- if use gtk ; then
- emake SQLITE=$sqlite gui
- fi
-}
-
-src_install() {
- emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
- dodoc README docs/*
- if use gtk ; then
- emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install-gui
- make_desktop_entry /usr/sbin/gtk-lshw "Hardware Lister" "/usr/share/lshw/artwork/logo.svg"
- fi
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/lshw/, sys-apps/lshw/files/
@ 2018-01-04 7:14 Mike Frysinger
0 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2018-01-04 7:14 UTC (permalink / raw
To: gentoo-commits
commit: 1cb1b9ca5d372c83314d9f7b02c80eb7c10cc0bc
Author: Wenkai Du <wenkai.du <AT> intel <DOT> com>
AuthorDate: Thu Jan 4 07:13:02 2018 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Jan 4 07:13:27 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cb1b9ca
sys-apps/lshw: add upstream fix for crashes w/Intel SGX
sys-apps/lshw/files/lshw-02.18b-sgx.patch | 32 ++++++++++++++
sys-apps/lshw/lshw-02.18b-r1.ebuild | 73 +++++++++++++++++++++++++++++++
2 files changed, 105 insertions(+)
diff --git a/sys-apps/lshw/files/lshw-02.18b-sgx.patch b/sys-apps/lshw/files/lshw-02.18b-sgx.patch
new file mode 100644
index 00000000000..92bd6c23e2f
--- /dev/null
+++ b/sys-apps/lshw/files/lshw-02.18b-sgx.patch
@@ -0,0 +1,32 @@
+patch from upstream:
+https://ezix.org/src/pkg/lshw/commit/5e5744732b2dcdf83845919256388b3842033183
+
+From 5e5744732b2dcdf83845919256388b3842033183 Mon Sep 17 00:00:00 2001
+From: Wenkai Du <wenkai.du@intel.com>
+Date: Fri, 22 Dec 2017 09:57:57 -0800
+Subject: [PATCH] lshw: fix segmentation fault when /dev/sgx is present
+
+When Intel SGX is enabled in kernel, /dev/sgx is created and is
+picked up by "/dev/sg*" glob matching.
+
+Signed-off-by: Wenkai Du <wenkai.du@intel.com>
+---
+ src/core/scsi.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/scsi.cc b/src/core/scsi.cc
+index b38dda2cd8a8..75061c0fb195 100644
+--- a/src/core/scsi.cc
++++ b/src/core/scsi.cc
+@@ -30,7 +30,7 @@
+
+ __ID("@(#) $Id$");
+
+-#define SG_X "/dev/sg*"
++#define SG_X "/dev/sg[0-9]*"
+ #define SG_MAJOR 21
+
+ #ifndef SCSI_IOCTL_GET_PCI
+--
+2.15.1
+
diff --git a/sys-apps/lshw/lshw-02.18b-r1.ebuild b/sys-apps/lshw/lshw-02.18b-r1.ebuild
new file mode 100644
index 00000000000..c22eab42757
--- /dev/null
+++ b/sys-apps/lshw/lshw-02.18b-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PLOCALES='fr'
+
+inherit flag-o-matic eutils toolchain-funcs l10n
+
+MAJ_PV=${PV:0:${#PV}-1}
+MIN_PVE=${PV:0-1}
+MIN_PV=${MIN_PVE/b/B}
+
+MY_P="$PN-$MIN_PV.$MAJ_PV"
+DESCRIPTION="Hardware Lister"
+HOMEPAGE="https://www.ezix.org/project/wiki/HardwareLiSter"
+SRC_URI="https://www.ezix.org/software/files/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="gtk sqlite static"
+
+REQUIRED_USE="static? ( !gtk )"
+
+RDEPEND="gtk? ( x11-libs/gtk+:2 )
+ sqlite? ( dev-db/sqlite:3 )"
+DEPEND="${RDEPEND}
+ gtk? ( virtual/pkgconfig )
+ sqlite? ( virtual/pkgconfig )"
+RDEPEND="${RDEPEND}
+ sys-apps/hwids"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-02.18b-gentoo.patch
+ "${FILESDIR}"/${PN}-02.18b-gettext-array.patch
+ "${FILESDIR}"/${PN}-02.18b-sgx.patch
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ l10n_find_plocales_changes "src/po" "" ".po" || die
+ sed -i \
+ -e "/^LANGUAGES =/ s/=.*/= $(l10n_get_locales)/" \
+ src/po/Makefile || die
+ sed -i \
+ -e 's:\<pkg-config\>:${PKG_CONFIG}:' \
+ src/Makefile src/gui/Makefile || die
+}
+
+src_compile() {
+ tc-export CC CXX AR PKG_CONFIG
+ use static && append-ldflags -static
+
+ # Need two sep make statements to avoid parallel build issues. #588174
+ local sqlite=$(usex sqlite 1 0)
+ emake SQLITE=${sqlite} all
+ use gtk && emake SQLITE=${sqlite} gui
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install $(usex gtk 'install-gui' '')
+ dodoc README.md docs/*
+ if use gtk ; then
+ newicon -s scalable src/gui/artwork/logo.svg gtk-lshw.svg
+ make_desktop_entry \
+ "${EPREFIX}"/usr/sbin/gtk-lshw \
+ "${DESCRIPTION}"
+ fi
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/lshw/, sys-apps/lshw/files/
@ 2018-05-21 16:15 Mikle Kolyada
0 siblings, 0 replies; 7+ messages in thread
From: Mikle Kolyada @ 2018-05-21 16:15 UTC (permalink / raw
To: gentoo-commits
commit: b364b02cbb702e6fd958196de8df835a24fdb045
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Mon May 21 16:14:49 2018 +0000
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Mon May 21 16:14:49 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b364b02c
sys-apps/lshw: Drop old
Package-Manager: Portage-2.3.24, Repoman-2.3.6
sys-apps/lshw/Manifest | 1 -
sys-apps/lshw/files/lshw-02.16b-gentoo.patch | 161 ---------------------------
sys-apps/lshw/lshw-02.16b-r2.ebuild | 69 ------------
3 files changed, 231 deletions(-)
diff --git a/sys-apps/lshw/Manifest b/sys-apps/lshw/Manifest
index 964450426c4..e68eaf4c638 100644
--- a/sys-apps/lshw/Manifest
+++ b/sys-apps/lshw/Manifest
@@ -1,2 +1 @@
-DIST lshw-B.02.16.tar.gz 1845891 BLAKE2B 57d22af384b9f6f1878439f48ebd31163738744842a7682877126d6f914c1496442d79dc818e774f76ee04c4a284407c5ce53ba72af71571731bb4940f8a2338 SHA512 ad3bd3d7b6f36f912265f0853f5aa37158c6d420a90a5e84b3e8fcd8a3c6137f7505cb5361e3eceb49954332d2466c686c946dcda8db0da3d51b3c48e343c2ab
DIST lshw-B.02.18.tar.gz 2322176 BLAKE2B 66183895fcdd5b47bfaa044c10f7b561b3310829b53828444a20f078ce63e166a878595c8a8a79e22f1e4ab726e98165a1b31225997785d2bfc3ad5d7b0c5214 SHA512 4385db86101178b8bd33a80e991718e14f83277c66b3d63ae97cb4339196873b6e9b31a174024bf43d16fe66e1d7f8cf5cea56076697878087880c8821b11e47
diff --git a/sys-apps/lshw/files/lshw-02.16b-gentoo.patch b/sys-apps/lshw/files/lshw-02.16b-gentoo.patch
deleted file mode 100644
index dfd2c898370..00000000000
--- a/sys-apps/lshw/files/lshw-02.16b-gentoo.patch
+++ /dev/null
@@ -1,161 +0,0 @@
---- lshw-B.02.16.orig/src/core/Makefile
-+++ lshw-B.02.16/src/core/Makefile
-@@ -1,10 +1,9 @@
- PACKAGENAME?=lshw
-
--CXX=c++
-+CXX?=c++
- INCLUDES=
- DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
--CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
--LDFLAGS=
-+CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
- LDSTATIC=
- LIBS=
-
---- lshw-B.02.16.orig/src/gui/Makefile
-+++ lshw-B.02.16/src/gui/Makefile
-@@ -1,5 +1,7 @@
- PACKAGENAME?=lshw
-
-+SQLITE?=0
-+
- CXX?=c++
- CC?=cc
- STRIP?=strip
-@@ -8,13 +10,14 @@ OBJCOPY?=objcopy
- DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
- GTKINCLUDES=$(shell pkg-config gtk+-2.0 --cflags)
- INCLUDES=-I../core $(GTKINCLUDES)
--CXXFLAGS=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
-+CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
- CFLAGS=$(CXXFLAGS) $(DEFINES)
- GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs)
--LIBS=-L../core -llshw -lresolv -lsqlite3 $(GTKLIBS)
--LDFLAGS=
--ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
-- LDFLAGS+= -Wl,--as-needed
-+LIBS=-L../core -llshw -lresolv $(GTKLIBS)
-+
-+ifeq ($(SQLITE), 1)
-+ CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
-+ LIBS+= $(shell pkg-config --libs sqlite3)
- endif
-
- OBJS = gtk-lshw.o callbacks.o engine.o print-gui.o stock.o
-@@ -39,8 +42,7 @@ gtk-$(PACKAGENAME): $(OBJS) ../core/libl
- $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
-
- install: all
-- $(STRIP) gtk-$(PACKAGENAME)
--
-+
- clean:
- rm -f $(OBJS) gtk-$(PACKAGENAME) gtk-lshw.glade.bak gtk-lshw.gladep.bak callbacks.c.bak callbacks.h.bak Makefile.bak
-
---- lshw-B.02.16.orig/src/Makefile
-+++ lshw-B.02.16/src/Makefile
-@@ -21,11 +21,11 @@ export SQLITE
- CXX?=c++
- INCLUDES=-I./core/
- DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
--CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
-+CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
- ifeq ($(SQLITE), 1)
- CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
- endif
--LDFLAGS=-L./core/ -g
-+LDFLAGS += -L./core/
- ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
- LDFLAGS+= -Wl,--as-needed
- endif
-@@ -39,27 +39,25 @@ export CXXFLAGS
- export LIBS
- export LDFLAGS
-
--DATAFILES = pci.ids usb.ids oui.txt manuf.txt
--
--all: $(PACKAGENAME) $(PACKAGENAME).1 $(DATAFILES)
-+all: $(PACKAGENAME) $(PACKAGENAME).1
-
- .cc.o:
- $(CXX) $(CXXFLAGS) -c $< -o $@
-
- .PHONY: core
- core:
-- +make -C core all
-+ $(MAKE) -C core all
-
- $(PACKAGENAME): core $(PACKAGENAME).o
- $(CXX) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
-
- .PHONY: po
- po:
-- +make -C po all
-+ $(MAKE) -C po all
-
- .PHONY: gui
- gui: core
-- +make -C gui all
-+ $(MAKE) -C gui all
-
- .PHONY: nologo
- nologo:
-@@ -70,7 +68,6 @@ static: $(PACKAGENAME)-static
-
- $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o
- $(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
-- $(STRIP) $@
-
- .PHONY: compressed
- compressed: $(PACKAGENAME)-compressed
-@@ -93,14 +90,13 @@ oui.txt:
- manuf.txt:
- wget -O $@ http://anonsvn.wireshark.org/wireshark/trunk/manuf
-
--install: all
-+install:
- $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
- $(INSTALL) -m 0755 $(PACKAGENAME) $(DESTDIR)/$(SBINDIR)
- $(INSTALL) -d -m 0755 $(DESTDIR)/$(MANDIR)/man1
- $(INSTALL) -m 0644 $(PACKAGENAME).1 $(DESTDIR)/$(MANDIR)/man1
- $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
-- $(INSTALL) -m 0644 $(DATAFILES) $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
-- make -C po install
-+ $(MAKE) -C po install
-
- install-gui: gui
- $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
-@@ -112,8 +108,8 @@ install-gui: gui
-
- clean:
- rm -f $(PACKAGENAME).o $(PACKAGENAME) $(PACKAGENAME)-static $(PACKAGENAME)-compressed
-- make -C core clean
-- make -C gui clean
-+ $(MAKE) -C core clean
-+ $(MAKE) -C gui clean
-
- .timestamp:
- date --utc +%Y%m%d%H%M%S > $@
---- lshw-B.02.16.orig/src/core/pci.cc
-+++ lshw-B.02.16/src/core/pci.cc
-@@ -17,7 +17,7 @@ __ID("@(#) $Id
-
- #define PROC_BUS_PCI "/proc/bus/pci"
- #define SYS_BUS_PCI "/sys/bus/pci"
--#define PCIID_PATH DATADIR"/pci.ids:/usr/share/lshw/pci.ids:/usr/local/share/pci.ids:/usr/share/pci.ids:/etc/pci.ids:/usr/share/hwdata/pci.ids:/usr/share/misc/pci.ids"
-+#define PCIID_PATH "/usr/share/misc/pci.ids"
-
- #define PCI_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 revision */
- #define PCI_VENDOR_ID 0x00 /* 16 bits */
---- lshw-B.02.16.orig/src/core/usb.cc
-+++ lshw-B.02.16/src/core/usb.cc
-@@ -27,7 +27,7 @@
-
- #define PROCBUSUSBDEVICES "/proc/bus/usb/devices"
- #define SYSBUSUSBDEVICES "/sys/bus/usb/devices"
--#define USBID_PATH DATADIR"/usb.ids:/usr/share/lshw/usb.ids:/usr/local/share/usb.ids:/usr/share/usb.ids:/etc/usb.ids:/usr/share/hwdata/usb.ids:/usr/share/misc/usb.ids"
-+#define USBID_PATH "/usr/share/misc/usb.ids"
-
- #define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */
- #define USB_CLASS_AUDIO 1
diff --git a/sys-apps/lshw/lshw-02.16b-r2.ebuild b/sys-apps/lshw/lshw-02.16b-r2.ebuild
deleted file mode 100644
index 36348d30564..00000000000
--- a/sys-apps/lshw/lshw-02.16b-r2.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-inherit flag-o-matic eutils toolchain-funcs
-
-MAJ_PV=${PV:0:${#PV}-1}
-MIN_PVE=${PV:0-1}
-MIN_PV=${MIN_PVE/b/B}
-
-MY_P="$PN-$MIN_PV.$MAJ_PV"
-DESCRIPTION="Hardware Lister"
-HOMEPAGE="https://www.ezix.org/project/wiki/HardwareLiSter"
-SRC_URI="https://www.ezix.org/software/files/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
-IUSE="gtk sqlite static"
-
-REQUIRED_USE="static? ( !gtk )"
-
-RDEPEND="gtk? ( x11-libs/gtk+:2 )
- sqlite? ( dev-db/sqlite:3 )"
-DEPEND="${RDEPEND}
- gtk? ( virtual/pkgconfig )
- sqlite? ( virtual/pkgconfig )"
-RDEPEND="${RDEPEND}
- sys-apps/hwids"
-
-S=${WORKDIR}/${MY_P}
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-gentoo.patch
- # correct gettext behavior
- if [[ -n "${LINGUAS+x}" ]] ; then
- local langs
-
- for i in $(cd po ; echo *.po | sed 's/\.po//') ; do
- if has ${i} ${LINGUAS} ; then
- langs+=" ${i}"
- fi
- done
- sed -i \
- -e "/^LANGUAGES =/ s/=.*/= $langs/" \
- src/po/Makefile || die
- fi
-}
-
-src_compile() {
- tc-export CC CXX AR
- use static && append-ldflags -static
-
- local sqlite=$(usex sqlite 1 0)
-
- emake SQLITE=$sqlite all
- if use gtk ; then
- emake SQLITE=$sqlite gui
- fi
-}
-
-src_install() {
- emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
- dodoc README docs/*
- if use gtk ; then
- emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install-gui
- make_desktop_entry /usr/sbin/gtk-lshw "Hardware Lister" "/usr/share/lshw/artwork/logo.svg"
- fi
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/lshw/, sys-apps/lshw/files/
@ 2021-05-18 14:15 Ben Kohler
0 siblings, 0 replies; 7+ messages in thread
From: Ben Kohler @ 2021-05-18 14:15 UTC (permalink / raw
To: gentoo-commits
commit: 209fbd0bc15fe7ff4c8eab6e578677db5628571d
Author: Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Tue May 18 14:08:01 2021 +0000
Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Tue May 18 14:15:05 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=209fbd0b
sys-apps/lshw: drop old
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>
sys-apps/lshw/Manifest | 1 -
sys-apps/lshw/files/lshw-02.18b-gentoo.patch | 161 ---------------------
.../lshw/files/lshw-02.18b-gettext-array.patch | 31 ----
sys-apps/lshw/files/lshw-02.18b-sgx.patch | 32 ----
sys-apps/lshw/lshw-02.18b-r1.ebuild | 73 ----------
sys-apps/lshw/lshw-02.18b.ebuild | 72 ---------
6 files changed, 370 deletions(-)
diff --git a/sys-apps/lshw/Manifest b/sys-apps/lshw/Manifest
index 4ddd546f9aa..37b8ca7c4e8 100644
--- a/sys-apps/lshw/Manifest
+++ b/sys-apps/lshw/Manifest
@@ -1,3 +1,2 @@
-DIST lshw-B.02.18.tar.gz 2322176 BLAKE2B 66183895fcdd5b47bfaa044c10f7b561b3310829b53828444a20f078ce63e166a878595c8a8a79e22f1e4ab726e98165a1b31225997785d2bfc3ad5d7b0c5214 SHA512 4385db86101178b8bd33a80e991718e14f83277c66b3d63ae97cb4339196873b6e9b31a174024bf43d16fe66e1d7f8cf5cea56076697878087880c8821b11e47
DIST lshw-B.02.19.2.tar.gz 2467937 BLAKE2B 8317def382bcb189c164bddf2dd766c614c6a0a49449ceee81f516125ef14ba24f5933b1f08f13b5ae52a96304baa1cc7ac5171231911ecaa466522a7c0c4c6f SHA512 f3abc6241fe7912740f11b5b97a1f7778cb7cc69f5209b83063cbc1d3aa7b082dedb3aac4119ce100391547400ed6bb2d413ca47de50794e1066f31961be41a5
DIST lshw-B.02.19.2_p20210121.tar.gz 2469481 BLAKE2B b9a886c21d6abde00f234cc93fc25ae2b4cf734ffd3fdea7847283fa44eef80bfddd6d83ab428c126ef6518eb8da35f3ba15d88cfc5dbb304813a4d28c173351 SHA512 699ee270eb9a8dd6652d7bcab5d99187585159428bdceab2e17add51e29d73a929a4d34168d92308e775383b9920b07e3b02e0781f9f1b1f099aff3550e9b0c0
diff --git a/sys-apps/lshw/files/lshw-02.18b-gentoo.patch b/sys-apps/lshw/files/lshw-02.18b-gentoo.patch
deleted file mode 100644
index dd42df9b528..00000000000
--- a/sys-apps/lshw/files/lshw-02.18b-gentoo.patch
+++ /dev/null
@@ -1,161 +0,0 @@
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -21,11 +21,11 @@
- CXX?=c++
- INCLUDES=-I./core/
- DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
--CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
-+CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
- ifeq ($(SQLITE), 1)
- CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
- endif
--LDFLAGS=-L./core/ -g
-+LDFLAGS += -L./core/
- ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
- LDFLAGS+= -Wl,--as-needed
- endif
-@@ -39,27 +39,25 @@
- export LIBS
- export LDFLAGS
-
--DATAFILES = pci.ids usb.ids oui.txt manuf.txt
--
--all: $(PACKAGENAME) $(PACKAGENAME).1 $(DATAFILES)
-+all: $(PACKAGENAME) $(PACKAGENAME).1
-
- .cc.o:
- $(CXX) $(CXXFLAGS) -c $< -o $@
-
- .PHONY: core
- core:
-- +make -C core all
-+ $(MAKE) -C core all
-
- $(PACKAGENAME): core $(PACKAGENAME).o
- $(CXX) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
-
- .PHONY: po
- po:
-- +make -C po all
-+ $(MAKE) -C po all
-
- .PHONY: gui
- gui: core
-- +make -C gui all
-+ $(MAKE) -C gui all
-
- .PHONY: nologo
- nologo:
-@@ -70,7 +68,6 @@
-
- $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o
- $(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS)
-- $(STRIP) $@
-
- .PHONY: compressed
- compressed: $(PACKAGENAME)-compressed
-@@ -93,14 +90,13 @@
- manuf.txt:
- wget -O $@ http://anonsvn.wireshark.org/wireshark/trunk/manuf
-
--install: all
-+install:
- $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
- $(INSTALL) -m 0755 $(PACKAGENAME) $(DESTDIR)/$(SBINDIR)
- $(INSTALL) -d -m 0755 $(DESTDIR)/$(MANDIR)/man1
- $(INSTALL) -m 0644 $(PACKAGENAME).1 $(DESTDIR)/$(MANDIR)/man1
- $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
-- $(INSTALL) -m 0644 $(DATAFILES) $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)
-- make -C po install
-+ $(MAKE) -C po install
-
- install-gui: gui
- $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR)
-@@ -112,8 +108,8 @@
-
- clean:
- rm -f $(PACKAGENAME).o $(PACKAGENAME) $(PACKAGENAME)-static $(PACKAGENAME)-compressed
-- make -C core clean
-- make -C gui clean
-+ $(MAKE) -C core clean
-+ $(MAKE) -C gui clean
-
- .timestamp:
- date --utc +%Y%m%d%H%M%S > $@
---- a/src/core/Makefile
-+++ b/src/core/Makefile
-@@ -1,10 +1,9 @@
- PACKAGENAME?=lshw
-
--CXX=c++
-+CXX?=c++
- INCLUDES=
- DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
--CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
--LDFLAGS=
-+CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
- LDSTATIC=
- LIBS=
-
---- a/src/core/pci.cc
-+++ b/src/core/pci.cc
-@@ -17,7 +17,7 @@
-
- #define PROC_BUS_PCI "/proc/bus/pci"
- #define SYS_BUS_PCI "/sys/bus/pci"
--#define PCIID_PATH DATADIR"/pci.ids:/usr/share/lshw/pci.ids:/usr/local/share/pci.ids:/usr/share/pci.ids:/etc/pci.ids:/usr/share/hwdata/pci.ids:/usr/share/misc/pci.ids"
-+#define PCIID_PATH "/usr/share/misc/pci.ids"
-
- #define PCI_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 revision */
- #define PCI_VENDOR_ID 0x00 /* 16 bits */
---- a/src/core/usb.cc
-+++ b/src/core/usb.cc
-@@ -27,7 +27,7 @@
-
- #define PROCBUSUSBDEVICES "/proc/bus/usb/devices"
- #define SYSKERNELDEBUGUSBDEVICES "/sys/kernel/debug/usb/devices"
--#define USBID_PATH DATADIR"/usb.ids:/usr/share/lshw/usb.ids:/usr/local/share/usb.ids:/usr/share/usb.ids:/etc/usb.ids:/usr/share/hwdata/usb.ids:/usr/share/misc/usb.ids"
-+#define USBID_PATH "/usr/share/misc/usb.ids"
-
- #define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */
- #define USB_CLASS_AUDIO 1
---- a/src/gui/Makefile
-+++ b/src/gui/Makefile
-@@ -1,5 +1,7 @@
- PACKAGENAME?=lshw
-
-+SQLITE?=0
-+
- CXX?=c++
- CC?=cc
- STRIP?=strip
-@@ -8,14 +10,15 @@
- DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
- GTKINCLUDES=$(shell pkg-config gtk+-2.0 --cflags)
- INCLUDES=-I../core $(GTKINCLUDES)
--CXXFLAGS=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
-+CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
- CFLAGS=$(CXXFLAGS) $(DEFINES)
- GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs)
--LIBS=-L../core -llshw -lresolv $(GTKLIBS)
--LDFLAGS=
--ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
-- LDFLAGS+= -Wl,--as-needed
--endif
-+LIBS=-L../core -llshw -lresolv $(GTKLIBS)
-+
-+ifeq ($(SQLITE), 1)
-+ CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
-+ LIBS+= $(shell pkg-config --libs sqlite3)
-+endif
-
- OBJS = gtk-lshw.o callbacks.o engine.o print-gui.o stock.o
- SRCS = $(OBJS:.o=.c)
-@@ -39,7 +42,6 @@
- $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
-
- install: all
-- $(STRIP) gtk-$(PACKAGENAME)
-
- clean:
- rm -f $(OBJS) gtk-$(PACKAGENAME) gtk-lshw.glade.bak gtk-lshw.gladep.bak callbacks.c.bak callbacks.h.bak Makefile.bak
diff --git a/sys-apps/lshw/files/lshw-02.18b-gettext-array.patch b/sys-apps/lshw/files/lshw-02.18b-gettext-array.patch
deleted file mode 100644
index 4aea6420d7c..00000000000
--- a/sys-apps/lshw/files/lshw-02.18b-gettext-array.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-patch sent upstream
-
-From 1fb7ebed787ec1b73218c1f12cbb71b103433375 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Tue, 14 Mar 2017 22:25:12 -0700
-Subject: [PATCH] fix array access with string translations
-
-The code forgot to rebase the num to 0 before indexing the string array.
-It also provides 5 strings, but was only allowing 4 to be accessed.
----
- src/core/dmi.cc | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/core/dmi.cc b/src/core/dmi.cc
-index 250f48572d54..0db074975f2d 100644
---- a/src/core/dmi.cc
-+++ b/src/core/dmi.cc
-@@ -510,8 +510,8 @@ static const char *dmi_memory_array_location(u8 num)
- };
- if (num <= 0x0A)
- return _(memory_array_location[num]);
-- if (num >= 0xA0 && num < 0xA4)
-- return _(jp_memory_array_location[num]);
-+ if (num >= 0xA0 && num <= 0xA4)
-+ return _(jp_memory_array_location[num - 0xA0]);
- return "";
- }
-
---
-2.12.0
-
diff --git a/sys-apps/lshw/files/lshw-02.18b-sgx.patch b/sys-apps/lshw/files/lshw-02.18b-sgx.patch
deleted file mode 100644
index 92bd6c23e2f..00000000000
--- a/sys-apps/lshw/files/lshw-02.18b-sgx.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-patch from upstream:
-https://ezix.org/src/pkg/lshw/commit/5e5744732b2dcdf83845919256388b3842033183
-
-From 5e5744732b2dcdf83845919256388b3842033183 Mon Sep 17 00:00:00 2001
-From: Wenkai Du <wenkai.du@intel.com>
-Date: Fri, 22 Dec 2017 09:57:57 -0800
-Subject: [PATCH] lshw: fix segmentation fault when /dev/sgx is present
-
-When Intel SGX is enabled in kernel, /dev/sgx is created and is
-picked up by "/dev/sg*" glob matching.
-
-Signed-off-by: Wenkai Du <wenkai.du@intel.com>
----
- src/core/scsi.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/core/scsi.cc b/src/core/scsi.cc
-index b38dda2cd8a8..75061c0fb195 100644
---- a/src/core/scsi.cc
-+++ b/src/core/scsi.cc
-@@ -30,7 +30,7 @@
-
- __ID("@(#) $Id$");
-
--#define SG_X "/dev/sg*"
-+#define SG_X "/dev/sg[0-9]*"
- #define SG_MAJOR 21
-
- #ifndef SCSI_IOCTL_GET_PCI
---
-2.15.1
-
diff --git a/sys-apps/lshw/lshw-02.18b-r1.ebuild b/sys-apps/lshw/lshw-02.18b-r1.ebuild
deleted file mode 100644
index f3e16336e3f..00000000000
--- a/sys-apps/lshw/lshw-02.18b-r1.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PLOCALES='fr'
-
-inherit desktop flag-o-matic toolchain-funcs l10n
-
-MAJ_PV=${PV:0:${#PV}-1}
-MIN_PVE=${PV:0-1}
-MIN_PV=${MIN_PVE/b/B}
-
-MY_P="${PN}-${MIN_PV}.${MAJ_PV}"
-DESCRIPTION="Hardware Lister"
-HOMEPAGE="https://www.ezix.org/project/wiki/HardwareLiSter"
-SRC_URI="https://www.ezix.org/software/files/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="gtk sqlite static"
-
-REQUIRED_USE="static? ( !gtk !sqlite )"
-
-RDEPEND="gtk? ( x11-libs/gtk+:2 )
- sqlite? ( dev-db/sqlite:3 )"
-DEPEND="${RDEPEND}
- gtk? ( virtual/pkgconfig )
- sqlite? ( virtual/pkgconfig )"
-RDEPEND="${RDEPEND}
- sys-apps/hwids"
-
-S=${WORKDIR}/${MY_P}
-
-PATCHES=(
- "${FILESDIR}"/${PN}-02.18b-gentoo.patch
- "${FILESDIR}"/${PN}-02.18b-gettext-array.patch
- "${FILESDIR}"/${PN}-02.18b-sgx.patch
-)
-
-src_prepare() {
- epatch "${PATCHES[@]}"
-
- l10n_find_plocales_changes "src/po" "" ".po" || die
- sed -i \
- -e "/^LANGUAGES =/ s/=.*/= $(l10n_get_locales)/" \
- src/po/Makefile || die
- sed -i \
- -e 's:\<pkg-config\>:${PKG_CONFIG}:' \
- src/Makefile src/gui/Makefile || die
-}
-
-src_compile() {
- tc-export CC CXX AR PKG_CONFIG
- use static && append-ldflags -static
-
- # Need two sep make statements to avoid parallel build issues. #588174
- local sqlite=$(usex sqlite 1 0)
- emake SQLITE=${sqlite} all
- use gtk && emake SQLITE=${sqlite} gui
-}
-
-src_install() {
- emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install $(usex gtk 'install-gui' '')
- dodoc README.md docs/*
- if use gtk ; then
- newicon -s scalable src/gui/artwork/logo.svg gtk-lshw.svg
- make_desktop_entry \
- "${EPREFIX}"/usr/sbin/gtk-lshw \
- "${DESCRIPTION}"
- fi
-}
diff --git a/sys-apps/lshw/lshw-02.18b.ebuild b/sys-apps/lshw/lshw-02.18b.ebuild
deleted file mode 100644
index 8243b8bc20c..00000000000
--- a/sys-apps/lshw/lshw-02.18b.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PLOCALES='fr'
-
-inherit desktop flag-o-matic toolchain-funcs l10n
-
-MAJ_PV=${PV:0:${#PV}-1}
-MIN_PVE=${PV:0-1}
-MIN_PV=${MIN_PVE/b/B}
-
-MY_P="${PN}-${MIN_PV}.${MAJ_PV}"
-DESCRIPTION="Hardware Lister"
-HOMEPAGE="https://www.ezix.org/project/wiki/HardwareLiSter"
-SRC_URI="https://www.ezix.org/software/files/${MY_P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="gtk sqlite static"
-
-REQUIRED_USE="static? ( !gtk )"
-
-RDEPEND="gtk? ( x11-libs/gtk+:2 )
- sqlite? ( dev-db/sqlite:3 )"
-DEPEND="${RDEPEND}
- gtk? ( virtual/pkgconfig )
- sqlite? ( virtual/pkgconfig )"
-RDEPEND="${RDEPEND}
- sys-apps/hwids"
-
-S=${WORKDIR}/${MY_P}
-
-PATCHES=(
- "${FILESDIR}"/${PN}-02.18b-gentoo.patch
- "${FILESDIR}"/${PN}-02.18b-gettext-array.patch
-)
-
-src_prepare() {
- epatch "${PATCHES[@]}"
-
- l10n_find_plocales_changes "src/po" "" ".po" || die
- sed -i \
- -e "/^LANGUAGES =/ s/=.*/= $(l10n_get_locales)/" \
- src/po/Makefile || die
- sed -i \
- -e 's:\<pkg-config\>:${PKG_CONFIG}:' \
- src/Makefile src/gui/Makefile || die
-}
-
-src_compile() {
- tc-export CC CXX AR PKG_CONFIG
- use static && append-ldflags -static
-
- # Need two sep make statements to avoid parallel build issues. #588174
- local sqlite=$(usex sqlite 1 0)
- emake SQLITE=${sqlite} all
- use gtk && emake SQLITE=${sqlite} gui
-}
-
-src_install() {
- emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install $(usex gtk 'install-gui' '')
- dodoc README.md docs/*
- if use gtk ; then
- newicon -s scalable src/gui/artwork/logo.svg gtk-lshw.svg
- make_desktop_entry \
- "${EPREFIX}"/usr/sbin/gtk-lshw \
- "${DESCRIPTION}"
- fi
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/lshw/, sys-apps/lshw/files/
@ 2021-12-13 15:17 Ben Kohler
0 siblings, 0 replies; 7+ messages in thread
From: Ben Kohler @ 2021-12-13 15:17 UTC (permalink / raw
To: gentoo-commits
commit: 21a5b70c1df92f2cee5a4d655e1cc01a3c128e97
Author: Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 13 15:17:06 2021 +0000
Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Mon Dec 13 15:17:39 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21a5b70c
sys-apps/lshw: respect LDFLAGS
Closes: https://bugs.gentoo.org/829001
Package-Manager: Portage-3.0.29, Repoman-3.0.3
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>
.../lshw/files/lshw-02.19.2b-respect-LDFLAGS.patch | 33 +++++++++
sys-apps/lshw/lshw-02.19.2b_p20210121-r2.ebuild | 83 ++++++++++++++++++++++
2 files changed, 116 insertions(+)
diff --git a/sys-apps/lshw/files/lshw-02.19.2b-respect-LDFLAGS.patch b/sys-apps/lshw/files/lshw-02.19.2b-respect-LDFLAGS.patch
new file mode 100644
index 000000000000..cce97cc611b6
--- /dev/null
+++ b/sys-apps/lshw/files/lshw-02.19.2b-respect-LDFLAGS.patch
@@ -0,0 +1,33 @@
+diff --git a/src/Makefile b/src/Makefile
+index 7ae8218..5c990b0 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -30,7 +30,7 @@ endif
+ ifeq ($(ZLIB), 1)
+ CXXFLAGS+= -DZLIB $(shell pkg-config --cflags zlib)
+ endif
+-LDFLAGS+=-L./core/ -g
++LIBS+=-L./core/
+ ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
+ LDFLAGS+= -Wl,--as-needed
+ endif
+@@ -44,7 +44,6 @@ ifeq ($(ZLIB), 1)
+ endif
+
+ export CXXFLAGS
+-export LIBS
+ export LDFLAGS
+
+ ifeq ($(ZLIB), 1)
+diff --git a/src/gui/Makefile b/src/gui/Makefile
+index 63c4ff5..7946736 100644
+--- a/src/gui/Makefile
++++ b/src/gui/Makefile
+@@ -18,7 +18,6 @@ LIBS+=-L../core -llshw -lresolv $(GTKLIBS)
+ ifeq ($(SQLITE), 1)
+ LIBS+= $(shell pkg-config --libs sqlite3)
+ endif
+-LDFLAGS=
+ ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
+ LDFLAGS+= -Wl,--as-needed
+ endif
diff --git a/sys-apps/lshw/lshw-02.19.2b_p20210121-r2.ebuild b/sys-apps/lshw/lshw-02.19.2b_p20210121-r2.ebuild
new file mode 100644
index 000000000000..e3f4bf9fca99
--- /dev/null
+++ b/sys-apps/lshw/lshw-02.19.2b_p20210121-r2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PLOCALES='fr'
+
+inherit desktop flag-o-matic plocale toolchain-funcs xdg
+
+MY_COMMIT="fdab06ac0b190ea0aa02cd468f904ed69ce0d9f1"
+MY_PV=$(ver_cut 3 PV/b/B).$(ver_cut 1-3)_$(ver_cut 5-6)
+
+DESCRIPTION="Hardware Lister"
+HOMEPAGE="https://www.ezix.org/project/wiki/HardwareLiSter"
+SRC_URI="https://ezix.org/src/pkg/lshw/archive/${MY_COMMIT}.tar.gz -> ${P}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="gtk sqlite static"
+
+REQUIRED_USE="static? ( !gtk !sqlite )"
+
+DEPEND="${RDEPEND}"
+RDEPEND="sys-apps/hwdata
+ gtk? ( x11-libs/gtk+:3 )
+ sqlite? ( dev-db/sqlite:3 )"
+BDEPEND="gtk? ( virtual/pkgconfig )
+ sqlite? ( virtual/pkgconfig )"
+
+S=${WORKDIR}/${PN}
+
+DOCS=( COPYING README.md docs/{Changelog,TODO,IODC.txt,lshw.xsd,proc_usb_info.txt} )
+
+PATCHES=( "${FILESDIR}"/lshw-02.19.2b-respect-LDFLAGS.patch )
+
+src_prepare() {
+ default
+
+ plocale_find_changes "src/po" "" ".po" || die
+ sed -i \
+ -e "/^LANGUAGES =/ s/=.*/= $(plocale_get_locales)/" \
+ src/po/Makefile || die
+ sed -i \
+ -e 's:\<pkg-config\>:${PKG_CONFIG}:' \
+ -e 's:+\?make -C:${MAKE} -C:' \
+ -e '/^CXXFLAGS/s:=-g: +=:' \
+ -e '/^CXXFLAGS/s:-g ::' \
+ -e '/^LDFLAGS/s: -g::' \
+ -e '/^all:/s: $(DATAFILES)::' \
+ -e '/^install:/s: all::' \
+ src/Makefile src/gui/Makefile || die
+ sed -i \
+ -e '/^CXXFLAGS/s:\?=-g: +=:' \
+ -e '/^LDFLAGS=/d' \
+ src/core/Makefile || die
+ sed -i \
+ -e '/^#define PCIID_PATH/s:DATADIR"\/pci.ids.*:"/usr/share/hwdata/pci.ids":' \
+ src/core/pci.cc || die
+ sed -i \
+ -e '/^#define USBID_PATH/s:DATADIR"\/usb.ids.*:"/usr/share/hwdata/usb.ids":' \
+ src/core/usb.cc || die
+}
+
+src_compile() {
+ tc-export CC CXX AR PKG_CONFIG
+ use static && append-ldflags -static
+
+ # Need two sep make statements to avoid parallel build issues. #588174
+ local sqlite=$(usex sqlite 1 0)
+ emake VERSION=${MY_PV} SQLITE=${sqlite} all
+ use gtk && emake SQLITE=${sqlite} gui
+}
+
+src_install() {
+ emake VERSION=${MY_PV} DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install $(usex gtk 'install-gui' '')
+ if use gtk ; then
+ newicon -s scalable src/gui/artwork/logo.svg gtk-lshw.svg
+ make_desktop_entry \
+ "${EPREFIX}"/usr/sbin/gtk-lshw \
+ "${DESCRIPTION}"
+ fi
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-12-13 15:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-15 6:02 [gentoo-commits] repo/gentoo:master commit in: sys-apps/lshw/, sys-apps/lshw/files/ Mike Frysinger
-- strict thread matches above, loose matches on Subject: below --
2021-12-13 15:17 Ben Kohler
2021-05-18 14:15 Ben Kohler
2018-05-21 16:15 Mikle Kolyada
2018-01-04 7:14 Mike Frysinger
2017-09-01 2:22 Tim Harder
2016-02-06 13:29 Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox