[arch-commits] Commit in lshw/repos/community-x86_64 (4 files)
Alexander Rødseth
arodseth at gemini.archlinux.org
Thu Aug 25 20:45:49 UTC 2022
Date: Thursday, August 25, 2022 @ 20:45:49
Author: arodseth
Revision: 1280587
archrelease: copy trunk to community-x86_64
Added:
lshw/repos/community-x86_64/82393aa9b59307a443677df7340a1dd38847a5ef.patch
(from rev 1280586, lshw/trunk/82393aa9b59307a443677df7340a1dd38847a5ef.patch)
lshw/repos/community-x86_64/PKGBUILD
(from rev 1280586, lshw/trunk/PKGBUILD)
Deleted:
lshw/repos/community-x86_64/82393aa9b59307a443677df7340a1dd38847a5ef.patch
lshw/repos/community-x86_64/PKGBUILD
------------------------------------------------+
82393aa9b59307a443677df7340a1dd38847a5ef.patch | 116 +++++++++++------------
PKGBUILD | 84 ++++++++--------
2 files changed, 100 insertions(+), 100 deletions(-)
Deleted: 82393aa9b59307a443677df7340a1dd38847a5ef.patch
===================================================================
--- 82393aa9b59307a443677df7340a1dd38847a5ef.patch 2022-08-25 20:45:42 UTC (rev 1280586)
+++ 82393aa9b59307a443677df7340a1dd38847a5ef.patch 2022-08-25 20:45:49 UTC (rev 1280587)
@@ -1,58 +0,0 @@
-From 82393aa9b59307a443677df7340a1dd38847a5ef Mon Sep 17 00:00:00 2001
-From: Yuan-Chen Cheng <ycheng.tw at gmail.com>
-Date: Fri, 25 Oct 2019 11:15:24 -0400
-Subject: [PATCH] correct "JSON output format" without/with all class.
-
-test pass on my machine.
-
-Signed-off-by: Yuan-Chen Cheng <ycheng.tw at gmail.com>
----
- src/core/hw.cc | 25 ++++++++++++++++++++-----
- 1 file changed, 20 insertions(+), 5 deletions(-)
-
-diff --git a/src/core/hw.cc b/src/core/hw.cc
-index 4522c1a..8232337 100644
---- a/src/core/hw.cc
-+++ b/src/core/hw.cc
-@@ -1650,13 +1650,29 @@ string hwNode::asJSON(unsigned level)
- resources.clear();
- }
-
-- for (unsigned int i = 0; i < countChildren(); i++)
-+ if(countChildren()>0)
- {
-- out << getChild(i)->asJSON(visible(getClassName()) ? level + 2 : 1);
-- if (visible(getChild(i)->getClassName()))
-+ bool childOutputed = false;
-+ for (unsigned int i = 0; i < countChildren(); i++)
- {
-- out << "," << endl;
-+ string childJSON = getChild(i)->asJSON(visible(getClassName()) ? level + 2 : 1);
-+ string childJSONstrip = strip(childJSON);
-+ if (childJSONstrip.length() > 0)
-+ {
-+ if (!childOutputed)
-+ {
-+ if(visible(getClassName()))
-+ out << "," << endl << spaces(2*level+2) << "\"children\" : [" << endl;
-+ }
-+ else
-+ out << "," << endl;
-+ childOutputed = true;
-+ out << childJSON;
-+ }
- }
-+
-+ if(visible(getClassName()) && childOutputed)
-+ out << endl << spaces(2*level+2) << "]";
- }
-
- if(visible(getClassName()))
-@@ -1667,7 +1683,6 @@ string hwNode::asJSON(unsigned level)
-
- if (level == 0)
- {
-- out.seekp(-2, std::ios_base::end);
- out << endl << "]" << endl;
- }
-
Copied: lshw/repos/community-x86_64/82393aa9b59307a443677df7340a1dd38847a5ef.patch (from rev 1280586, lshw/trunk/82393aa9b59307a443677df7340a1dd38847a5ef.patch)
===================================================================
--- 82393aa9b59307a443677df7340a1dd38847a5ef.patch (rev 0)
+++ 82393aa9b59307a443677df7340a1dd38847a5ef.patch 2022-08-25 20:45:49 UTC (rev 1280587)
@@ -0,0 +1,58 @@
+From 82393aa9b59307a443677df7340a1dd38847a5ef Mon Sep 17 00:00:00 2001
+From: Yuan-Chen Cheng <ycheng.tw at gmail.com>
+Date: Fri, 25 Oct 2019 11:15:24 -0400
+Subject: [PATCH] correct "JSON output format" without/with all class.
+
+test pass on my machine.
+
+Signed-off-by: Yuan-Chen Cheng <ycheng.tw at gmail.com>
+---
+ src/core/hw.cc | 25 ++++++++++++++++++++-----
+ 1 file changed, 20 insertions(+), 5 deletions(-)
+
+diff --git a/src/core/hw.cc b/src/core/hw.cc
+index 4522c1a..8232337 100644
+--- a/src/core/hw.cc
++++ b/src/core/hw.cc
+@@ -1650,13 +1650,29 @@ string hwNode::asJSON(unsigned level)
+ resources.clear();
+ }
+
+- for (unsigned int i = 0; i < countChildren(); i++)
++ if(countChildren()>0)
+ {
+- out << getChild(i)->asJSON(visible(getClassName()) ? level + 2 : 1);
+- if (visible(getChild(i)->getClassName()))
++ bool childOutputed = false;
++ for (unsigned int i = 0; i < countChildren(); i++)
+ {
+- out << "," << endl;
++ string childJSON = getChild(i)->asJSON(visible(getClassName()) ? level + 2 : 1);
++ string childJSONstrip = strip(childJSON);
++ if (childJSONstrip.length() > 0)
++ {
++ if (!childOutputed)
++ {
++ if(visible(getClassName()))
++ out << "," << endl << spaces(2*level+2) << "\"children\" : [" << endl;
++ }
++ else
++ out << "," << endl;
++ childOutputed = true;
++ out << childJSON;
++ }
+ }
++
++ if(visible(getClassName()) && childOutputed)
++ out << endl << spaces(2*level+2) << "]";
+ }
+
+ if(visible(getClassName()))
+@@ -1667,7 +1683,6 @@ string hwNode::asJSON(unsigned level)
+
+ if (level == 0)
+ {
+- out.seekp(-2, std::ios_base::end);
+ out << endl << "]" << endl;
+ }
+
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-08-25 20:45:42 UTC (rev 1280586)
+++ PKGBUILD 2022-08-25 20:45:49 UTC (rev 1280587)
@@ -1,42 +0,0 @@
-# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Contributor: Stefano Zamprogno <stefano dot zamprogno at gmail dot com>
-# Contributor: Chuck Yang <Chuck.Yang at gmail.com>
-
-pkgname=lshw
-pkgver=B.02.19.2
-pkgrel=4
-pkgdesc="A small tool to provide detailed information on the hardware configuration of the machine."
-url="https://ezix.org/project/wiki/HardwareLiSter"
-license=('GPL')
-arch=('x86_64')
-depends=('gcc-libs' 'hwdata')
-optdepends=('gtk2')
-makedepends=('gcc' 'gtk2' 'sqlite')
-source=(https://ezix.org/software/files/lshw-$pkgver.tar.gz
- 82393aa9b59307a443677df7340a1dd38847a5ef.patch)
-sha256sums=('9bb347ac87142339a366a1759ac845e3dbb337ec000aa1b99b50ac6758a80f80'
- '3906335e802387319900a70c7ce575f0f539fce5befd6d37edc74be0d31141df')
-
-prepare() {
- cd "$srcdir"/$pkgname-$pkgver
- sed -i 's|/usr/bin/gtk-lshw|/usr/sbin/gtk-lshw|' src/gui/integration/gtk-lshw.desktop
- sed -i '/^LDFLAGS=$/d' src/core/Makefile src/gui/Makefile
- patch -p1 <../82393aa9b59307a443677df7340a1dd38847a5ef.patch
-}
-
-build() {
- cd "$srcdir"/$pkgname-$pkgver
- export VERSION=$pkgver
- make SBINDIR=/usr/bin
- make SBINDIR=/usr/bin gui
-}
-
-package() {
- cd "$srcdir"/$pkgname-$pkgver
- make DESTDIR="$pkgdir"/ SBINDIR=/usr/bin install
- make DESTDIR="$pkgdir"/ SBINDIR=/usr/bin install-gui
- install -Dm0644 src/gui/integration/gtk-lshw.desktop "$pkgdir"/usr/share/applications/gtk-lshw.desktop
- install -Dm0644 src/gui/integration/gtk-lshw.pam "$pkgdir"/usr/share/doc/$pkgname/gtk-lshw.pam
- install -Dm0644 src/gui/integration/console.apps "$pkgdir"/usr/share/doc/$pkgname/console.apps
- rm -f "$pkgdir"/usr/share/lshw/{pci,usb}.ids
-}
Copied: lshw/repos/community-x86_64/PKGBUILD (from rev 1280586, lshw/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-08-25 20:45:49 UTC (rev 1280587)
@@ -0,0 +1,42 @@
+# Maintainer: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: Stefano Zamprogno <stefano dot zamprogno at gmail dot com>
+# Contributor: Chuck Yang <Chuck.Yang at gmail.com>
+
+pkgname=lshw
+pkgver=B.02.19.2
+pkgrel=5
+pkgdesc="A small tool to provide detailed information on the hardware configuration of the machine."
+url="https://ezix.org/project/wiki/HardwareLiSter"
+license=('GPL')
+arch=('x86_64')
+depends=('gcc-libs' 'hwdata')
+optdepends=('gtk3')
+makedepends=('gcc' 'gtk2-compat' 'sqlite')
+source=(https://ezix.org/software/files/lshw-$pkgver.tar.gz
+ 82393aa9b59307a443677df7340a1dd38847a5ef.patch)
+sha256sums=('9bb347ac87142339a366a1759ac845e3dbb337ec000aa1b99b50ac6758a80f80'
+ '3906335e802387319900a70c7ce575f0f539fce5befd6d37edc74be0d31141df')
+
+prepare() {
+ cd "$srcdir"/$pkgname-$pkgver
+ sed -i 's|/usr/bin/gtk-lshw|/usr/sbin/gtk-lshw|' src/gui/integration/gtk-lshw.desktop
+ sed -i '/^LDFLAGS=$/d' src/core/Makefile src/gui/Makefile
+ patch -p1 <../82393aa9b59307a443677df7340a1dd38847a5ef.patch
+}
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ export VERSION=$pkgver
+ make SBINDIR=/usr/bin
+ make SBINDIR=/usr/bin gui
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir"/ SBINDIR=/usr/bin install
+ make DESTDIR="$pkgdir"/ SBINDIR=/usr/bin install-gui
+ install -Dm0644 src/gui/integration/gtk-lshw.desktop "$pkgdir"/usr/share/applications/gtk-lshw.desktop
+ install -Dm0644 src/gui/integration/gtk-lshw.pam "$pkgdir"/usr/share/doc/$pkgname/gtk-lshw.pam
+ install -Dm0644 src/gui/integration/console.apps "$pkgdir"/usr/share/doc/$pkgname/console.apps
+ rm -f "$pkgdir"/usr/share/lshw/{pci,usb}.ids
+}
More information about the arch-commits
mailing list