From 866e1de44c9251c667cd05ff0778adcf84f4a8bc Mon Sep 17 00:00:00 2001 From: Subhaditya Nath Date: Sat, 2 Apr 2022 21:39:14 +0530 Subject: [PATCH] CPU-X: update to 4.3.0, adopt --- .../CPU-X/patches/musl-ctrl-not-defined.patch | 15 -------- srcpkgs/CPU-X/template | 37 ++++++++++--------- 2 files changed, 20 insertions(+), 32 deletions(-) delete mode 100644 srcpkgs/CPU-X/patches/musl-ctrl-not-defined.patch diff --git a/srcpkgs/CPU-X/patches/musl-ctrl-not-defined.patch b/srcpkgs/CPU-X/patches/musl-ctrl-not-defined.patch deleted file mode 100644 index 77b7abec77bc..000000000000 --- a/srcpkgs/CPU-X/patches/musl-ctrl-not-defined.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- a/src/tui_ncurses.c 2021-10-07 14:38:03.886862860 -0400 -+++ b/src/tui_ncurses.c 2021-10-07 14:49:43.258142532 -0400 -@@ -262,6 +262,12 @@ - /* Convert keys when an alternative mapping is used */ - #define ALT_CODE 27 - #define ALT(x) (x & ALT_CODE) -+ -+/* glibc's term.h pulls in sys/ttydefaults.h which has it, but musl's does not. */ -+#ifndef CTRL -+#define CTRL(x) (x&037) -+#endif -+ - static int convert_char(int ch) - { - int i = 0; diff --git a/srcpkgs/CPU-X/template b/srcpkgs/CPU-X/template index 19a01be5978c..7e957443812f 100644 --- a/srcpkgs/CPU-X/template +++ b/srcpkgs/CPU-X/template @@ -1,30 +1,33 @@ # Template file for 'CPU-X' pkgname=CPU-X -version=4.2.0 +version=4.3.0 revision=1 archs="x86_64* i686*" build_style=cmake -hostmakedepends="nasm pkg-config gettext" -makedepends="libcpuid-devel ncurses-devel pciutils-devel - procps-ng-devel glfw-devel $(vopt_if gtk3 'gtk+3-devel')" +# hostmakedepends="nasm pkg-config gettext" +hostmakedepends="pkg-config nasm" +makedepends="ncurses-devel gettext-devel libcpuid-devel pciutils-devel + glfw-devel ocl-icd-devel procps-ng-devel libstatgrab + $(vopt_if gtk3 gtk+3-devel)" +checkdepends="mawk nawk grep" short_desc="Free software that gathers information on CPU, motherboard and more" -maintainer="Orphaned " +maintainer="Subhaditya Nath " license="GPL-3.0-or-later" homepage="https://x0rg.github.io/CPU-X/" changelog="https://raw.githubusercontent.com/X0rg/CPU-X/master/ChangeLog.md" distfiles="https://github.com/X0rg/CPU-X/archive/v${version}.tar.gz" -checksum=3bd8aabe98273012adc6fa25f31cf0f631f0a34c2ec39392fb5f6885551cee1f -# tests depend on: -# having mawk and nawk installed which breaks chroot-gawk -# grep -P, which `chroot-grep` is compiled without -make_check=no - +checksum=6ad7a8ac2d6c687a38a895fbbfbf2de690311676ac374d5857588bb983839433 build_options="gtk3" build_options_default="gtk3" -case "$XBPS_TARGET_MACHINE" in - *-musl) - makedepends+=" libexecinfo-devel" - LDFLAGS="-lexecinfo" - ;; -esac +if [ "$XBPS_TARGET_LIBC" = musl ]; then + makedepends+=" libexecinfo-devel" + LDFLAGS="-lexecinfo" +fi + +# Tests depend on the -P flag of grep, which is not available in chroot-grep +# and installing grep as checkdepends breaks base-chroot. +# So, only run tests in CI, where the masterdir is ephemeral anyway. +if [ "$XBPS_BUILD_ENVIRONMENT" != "void-packages-ci" ]; then + make_check=no # breaks base-chroot +fi