summaryrefslogtreecommitdiff
path: root/sys-apps/lshw
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/lshw')
-rw-r--r--sys-apps/lshw/Manifest4
-rw-r--r--sys-apps/lshw/files/lshw-02.19.2b-respect-LDFLAGS.patch33
-rw-r--r--sys-apps/lshw/lshw-02.19.2b_p20210121-r1.ebuild2
-rw-r--r--sys-apps/lshw/lshw-02.19.2b_p20210121-r2.ebuild83
4 files changed, 120 insertions, 2 deletions
diff --git a/sys-apps/lshw/Manifest b/sys-apps/lshw/Manifest
index 489f81ac3a66..ce61d1d3836f 100644
--- a/sys-apps/lshw/Manifest
+++ b/sys-apps/lshw/Manifest
@@ -1,4 +1,6 @@
+AUX lshw-02.19.2b-respect-LDFLAGS.patch 815 BLAKE2B 44cd1820a6ba3c854d04d9affeeaab1780ec1c0eebbea930906519363ef8cd31b831c7f6d7c22f8770d6f97cc6dc90d63f2a140e79c7bd3c93cabef1b9542567 SHA512 e3a98a0c5d5b890f18589295bf0d64db04b1d08b66353ad1a658ef84a4e1abd85f9d3d52e8ec7a54234e3573cb3c89e7ccb953544fe3af0b6a168dabb00d45e5
DIST lshw-02.19.2b_p20210121-B.02.19.2_p20210121.tar.gz 2469481 BLAKE2B b9a886c21d6abde00f234cc93fc25ae2b4cf734ffd3fdea7847283fa44eef80bfddd6d83ab428c126ef6518eb8da35f3ba15d88cfc5dbb304813a4d28c173351 SHA512 699ee270eb9a8dd6652d7bcab5d99187585159428bdceab2e17add51e29d73a929a4d34168d92308e775383b9920b07e3b02e0781f9f1b1f099aff3550e9b0c0
-EBUILD lshw-02.19.2b_p20210121-r1.ebuild 2274 BLAKE2B 8378c433b01bda5db13ffef3d0eb8bba5137bdf6a631be8c1709d6ea1652aa439f1243c2c054ef9f07cfd87774f263e1b3b9e29f79872c22df3856482109a7ad SHA512 b1e5f955ae40158e2c509de07636c55a23b26b9d5eb6bb4dd86c9903cbbf20afa8840eb318b4e57c354c8a35a3b216ebd2df0efec6ddcfca7a9cad60d4a9c44c
+EBUILD lshw-02.19.2b_p20210121-r1.ebuild 2267 BLAKE2B b4dee0d296ab18f6ab8eb050d11d911856aaf254c5df4c6ebc3e35fec5af8ed552d6fbca147b586da873320746eb9abbc4f2910240726c6dd69a72e0e5aa7cea SHA512 d6148eaf68bf55043274d39cc77cc6f627c1a160d2bb2689549530d35a4ec0d0f6a2af25428d1152b3d94facabfb5457cc4d206525d536016c1e1e336ae97873
+EBUILD lshw-02.19.2b_p20210121-r2.ebuild 2337 BLAKE2B b10667741c441265be37d6d6be87fae0f5f61fd0703b7505d8fbade3a64d276bcee9ec50458a94c2971be63aad86cbcb490ec7c5e5b863dcfeea7d1ec84087cc SHA512 6542c88a86299725facd8a366955035ded5014d76a88431609725afa8128dcb71a82cb0d57840af9d830db5fdb0e5e419c0228eb608f003d5fdb7b8bcb682af5
EBUILD lshw-02.19.2b_p20210121.ebuild 2262 BLAKE2B 76c1c74029c8115c2894a8bc13683cff4afe075442c2e09a81434dd799e329c5780e4c83420d70dad22f6644e9313a8f64b35d18e6c49859878090769e6e22c1 SHA512 ec6a140e7f30ab39965beef848362e8a20672f8da50fd670aac236f5d9caa97f4e555849468231fbd38631600f910f13b6c342b68a30c7f0ce93c45835ce3280
MISC metadata.xml 462 BLAKE2B 0eca79307d6db1495a4799c970f6de55239b0b3b3636fb6ab833eccf824ed6569206a33272a2dbbc420d8f3d746ee8db7312fbc56f119f068634043699705e0a SHA512 948063d79d644ddfd3b559a7f113c73fa45a43d9282aad12400444d7e9431db44e0a5ef75fc0d866cfae9e0b67859df2b5996512e9eb296622546cb2bfdea9e7
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-r1.ebuild b/sys-apps/lshw/lshw-02.19.2b_p20210121-r1.ebuild
index 494cae1b8fc3..3f20bc27da1c 100644
--- a/sys-apps/lshw/lshw-02.19.2b_p20210121-r1.ebuild
+++ b/sys-apps/lshw/lshw-02.19.2b_p20210121-r1.ebuild
@@ -16,7 +16,7 @@ SRC_URI="https://ezix.org/src/pkg/lshw/archive/${MY_COMMIT}.tar.gz -> ${P}-${MY_
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+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 )"
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
+}