From f5e86977ee27205b01bb2ff8507cecbb52b0bf9a Mon Sep 17 00:00:00 2001 From: Piraty Date: Fri, 17 Apr 2020 00:37:46 +0200 Subject: [PATCH] lshw: update to B.02.19.2. --- srcpkgs/lshw/patches/fix-array-bounds.patch | 13 --------- srcpkgs/lshw/patches/musl-basename.patch | 13 --------- srcpkgs/lshw/template | 32 +++++++++++---------- 3 files changed, 17 insertions(+), 41 deletions(-) delete mode 100644 srcpkgs/lshw/patches/fix-array-bounds.patch diff --git a/srcpkgs/lshw/patches/fix-array-bounds.patch b/srcpkgs/lshw/patches/fix-array-bounds.patch deleted file mode 100644 index 7e6d66eed27..00000000000 --- a/srcpkgs/lshw/patches/fix-array-bounds.patch +++ /dev/null @@ -1,13 +0,0 @@ -Fix GCC warning "array subscript is above array bounds [-Warray-bounds]" - ---- src/core/dmi.cc 2016-05-06 22:17:33.416045355 +0200 -+++ src/core/dmi.cc 2016-05-06 22:21:31.694032471 +0200 -@@ -511,7 +511,7 @@ - if (num <= 0x0A) - return _(memory_array_location[num]); - if (num >= 0xA0 && num < 0xA4) -- return _(jp_memory_array_location[num]); -+ return _(jp_memory_array_location[num - 0xA0]); - return ""; - } - diff --git a/srcpkgs/lshw/patches/musl-basename.patch b/srcpkgs/lshw/patches/musl-basename.patch index 613e9edfd1b..c8cee61ba50 100644 --- a/srcpkgs/lshw/patches/musl-basename.patch +++ b/srcpkgs/lshw/patches/musl-basename.patch @@ -1,18 +1,5 @@ For musl libc declare a macro version of basename(3). ---- src/core/dasd.cc 2016-05-07 05:33:49.580629923 +0200 -+++ src/core/dasd.cc 2016-05-07 05:35:10.000625574 +0200 -@@ -10,6 +10,10 @@ - #include - #include - -+#if !defined(__GLIBC__) -+#define basename(src) (strrchr(src,'/') ? strrchr(src,'/')+1 : src) -+#endif -+ - using namespace std; - - /*Read only block devices, not partitions*/ --- src/core/sysfs.cc 2016-05-07 05:36:45.771620396 +0200 +++ src/core/sysfs.cc 2016-05-07 05:37:33.265617827 +0200 @@ -19,6 +19,10 @@ diff --git a/srcpkgs/lshw/template b/srcpkgs/lshw/template index bbcab29d082..c6d0130a766 100644 --- a/srcpkgs/lshw/template +++ b/srcpkgs/lshw/template @@ -1,28 +1,30 @@ # Template file for 'lshw' pkgname=lshw -version=B.02.18 -revision=7 +version=B.02.19.2 +revision=1 +build_style=gnu-makefile +make_build_args="VERSION=${version}" +make_build_target="all gui" +make_install_args="SBINDIR=/usr/bin" +make_install_target="install install-gui" +make_use_env=yes hostmakedepends="docbook2x pkg-config" -makedepends="gtk+-devel libglade-devel sqlite-devel" +makedepends="gtk+-devel" short_desc="Hardware lister application" maintainer="Enno Boland " license="GPL-2.0-only" -homepage="http://ezix.org/project/wiki/HardwareLiSter" -distfiles="http://ezix.org/software/files/lshw-${version}.tar.gz" -checksum=ae22ef11c934364be4fd2a0a1a7aadf4495a0251ec6979da280d342a89ca3c2f +homepage="https://ezix.org/project/wiki/HardwareLiSter" +distfiles="https://ezix.org/software/files/lshw-${version}.tar.gz" +checksum=9bb347ac87142339a366a1759ac845e3dbb337ec000aa1b99b50ac6758a80f80 -do_build() { +post_patch() { case "$XBPS_TARGET_MACHINE" in - *-musl) cp -p ${FILESDIR}/confname.h ${wrksrc}/src/core - find . -type f -exec sed -i "{}" -e "s;__uint;uint;g" \; + *-musl) + cp -p ${FILESDIR}/confname.h ${wrksrc}/src/core ;; esac - sed -i 's,CXXFLAGS=,CXXFLAGS += ,g; s,LDFLAGS=,LDFLAGS += ,g' \ - src/Makefile src/gui/Makefile - make CC=$CC CXX=$CXX PREFIX=/usr SBINDIR=/usr/bin all gui -} -do_install() { - make PREFIX=/usr SBINDIR=/usr/bin DESTDIR=${DESTDIR} install install-gui + vsed -i src/Makefile src/gui/Makefile \ + -e 's,CXXFLAGS=,CXXFLAGS += ,g' } gtk-lshw_package() {