From owner-dev-commits-ports-all@freebsd.org Mon May 24 00:48:10 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9650D652AA5; Mon, 24 May 2021 00:48:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FpJV23Ly9z3lh1; Mon, 24 May 2021 00:48:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C0A72109F; Mon, 24 May 2021 00:48:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14O0mAFA028096; Mon, 24 May 2021 00:48:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14O0mAbt028095; Mon, 24 May 2021 00:48:10 GMT (envelope-from git) Date: Mon, 24 May 2021 00:48:10 GMT Message-Id: <202105240048.14O0mAbt028095@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Li-Wen Hsu Subject: git: fb4bd742805a - main - sysutils/xosview: Fix build for aarch64 and other archs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb4bd742805ad510aa813c322045875e72f05eac Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 May 2021 00:48:10 -0000 The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/ports/commit/?id=fb4bd742805ad510aa813c322045875e72f05eac commit fb4bd742805ad510aa813c322045875e72f05eac Author: Otacílio de Araújo Ramos Neto AuthorDate: 2021-05-24 00:46:29 +0000 Commit: Li-Wen Hsu CommitDate: 2021-05-24 00:46:29 +0000 sysutils/xosview: Fix build for aarch64 and other archs PR: 255922 --- sysutils/xosview/Makefile | 4 +-- sysutils/xosview/files/patch-bsd_kernel.cc | 50 ++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/sysutils/xosview/Makefile b/sysutils/xosview/Makefile index 16ab32e7e8e0..8a9a9ccd31ca 100644 --- a/sysutils/xosview/Makefile +++ b/sysutils/xosview/Makefile @@ -2,6 +2,7 @@ PORTNAME= xosview DISTVERSION= 1.23 +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= otaciliodearaujo@gmail.com @@ -10,9 +11,6 @@ COMMENT= Graphical performance meter LICENSE= BSD4CLAUSE GPLv2 LICENSE_COMB= multi -ONLY_FOR_ARCHS= amd64 i386 -ONLY_FOR_ARCHS_REASON= uses x86-specific hardware resources - RUN_DEPENDS= font-misc-misc>=1.1.2:x11-fonts/font-misc-misc USES= gmake xorg diff --git a/sysutils/xosview/files/patch-bsd_kernel.cc b/sysutils/xosview/files/patch-bsd_kernel.cc new file mode 100644 index 000000000000..4fb5fe787e4f --- /dev/null +++ b/sysutils/xosview/files/patch-bsd_kernel.cc @@ -0,0 +1,50 @@ +--- bsd/kernel.cc.orig 2021-05-16 03:48:22 UTC ++++ bsd/kernel.cc +@@ -48,8 +48,10 @@ static int maxcpus = 1; + #include + #include + #include ++#if defined(__amd64__) || defined(__i386__) + #include + #endif ++#endif + + #if defined(XOSVIEW_NETBSD) + #include +@@ -1558,6 +1560,7 @@ BSDHasBattery() { + #else // XOSVIEW_FREEBSD || XOSVIEW_DFBSD + int fd; + if ( (fd = open(ACPIDEV, O_RDONLY)) == -1 ) { ++ #if defined(__amd64__) || defined(__i386__) + // No ACPI -> try APM + if ( (fd = open(APMDEV, O_RDONLY)) == -1 ) + return false; +@@ -1569,6 +1572,9 @@ BSDHasBattery() { + if (aip.ai_batt_stat == 0xff || aip.ai_batt_life == 0xff) + return false; + return true; ++ #else ++ return false; ++ #endif + } + + union acpi_battery_ioctl_arg battio; +@@ -1717,6 +1723,7 @@ BSDGetBatteryInfo(int *remaining, unsigned int *state) + /* Adapted from acpiconf and apm. */ + int fd; + if ( (fd = open(ACPIDEV, O_RDONLY)) == -1 ) { ++ #if defined(__amd64__) || defined(__i386__) + // No ACPI -> try APM + if ( (fd = open(APMDEV, O_RDONLY)) == -1 ) + err(EX_OSFILE, "could not open %s or %s", ACPIDEV, APMDEV); +@@ -1740,6 +1747,10 @@ BSDGetBatteryInfo(int *remaining, unsigned int *state) + else + *state = XOSVIEW_BATT_NONE; + return; ++ #else ++ *state = XOSVIEW_BATT_NONE; ++ return; ++ #endif + } + // ACPI + union acpi_battery_ioctl_arg battio;