Bug 265378 - x11/xfce4-goodies can depend on sysutils/xfce4-battery-plugin when battery-plugin is unbuildable
Summary: x11/xfce4-goodies can depend on sysutils/xfce4-battery-plugin when battery-pl...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Some People
Assignee: freebsd-xfce (Nobody)
URL:
Keywords:
: 265379 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-07-22 11:33 UTC by Mike Bristow
Modified: 2022-07-22 20:55 UTC (History)
1 user (show)

See Also:
madpilot: maintainer-feedback+


Attachments
patch v1 (1.37 KB, patch)
2022-07-22 12:46 UTC, Guido Falsi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Bristow 2022-07-22 11:33:25 UTC
Hi,

x11/xfce4-goodies can depend on sysutils/xfce4-battery-plugin, and does so by default.

sysutils/xfce4-battery-plugin is 'ONLY_FOR_ARCHS= amd64 i386'.

This means that building x11/xfce4-goodies on aarch64 (and probably others) fails without some fiddling.

I think you can be cunning with various OPTIONS_ settings to make it so that the BATTERY option is only available on amd64 and i386, and only set by default on those arches... but the following patch follows the powerpc example for the arch I found the problem on (it misses out armv6, armv7, risc64, and risc64sf and possibly more). 

index fb2e9437b7b5..840c34cb8510 100644
--- a/x11/xfce4-goodies/Makefile
+++ b/x11/xfce4-goodies/Makefile
@@ -23,6 +23,7 @@ OPTIONS_EXCLUDE_powerpc=      BATTERY
 OPTIONS_EXCLUDE_powerpc64=     BATTERY
 OPTIONS_EXCLUDE_powerpc64le=   BATTERY
 OPTIONS_EXCLUDE_powerpcspe=    BATTERY
+OPTIONS_EXCLUDE_aarch64=       BATTERY

 OPTIONS_GROUP= APPLICATIONS PANELPLUGINS THUNARPLUGINS UNOFFICIAL
Comment 1 Mike Bristow 2022-07-22 11:48:41 UTC
*** Bug 265379 has been marked as a duplicate of this bug. ***
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2022-07-22 12:20:26 UTC
(In reply to Mike Bristow from comment #0)

Thanks for reporting this.

I need to take a look at this.

Maybe We can play with OPTIONS_DEFINE_${ARCH} and OPTIONS_DEFAULT_${ARCH} to fix this, but I have no experince with these helpers and need to test a little.
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2022-07-22 12:33:11 UTC
(In reply to Guido Falsi from comment #2)

Now that I look in the port,

OPTIONS_DEFINE_${ARCH} cannot be used here due to the BATTERY option being defined in a GROUP.

OPTIONS_DEFAULT_${ARCH} can be used but would not completely solve the issue.

So I will use part of your solution.
Comment 4 Guido Falsi freebsd_committer freebsd_triage 2022-07-22 12:46:01 UTC
Created attachment 235425 [details]
patch v1

I've attached a patch I've still not tested.

The patch removed BATTERY from the global defaults and puts it in OPTIONS_DEFAULT_amd64 and OPTIONS_DEFAULT_i386, so it's not the default except where supported.

I've also added some OPTIONS_EXCLUDE_${ARCH}. To keep the list short I decided to only add the ones relating to the architecture supported by HEAD (upcoming 14.x), as a compromise.

aarch64 was very important to add since it's becoming tier 1.

BTW I have no way of testing the xfce4-battery-plugin plugin on aarch64, but if you want to give it a spin, just comment the ONLY_FOR_ARCHS (or add aarch64) there and see how it behaves. If it happens to work on aarch64 I can enable it.

BTW while here I am enabling BSDCPUFREQ by default again since it should work now (I'm going to test this before committing anyway).
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-07-22 20:54:39 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=41c237b70f3bc9fc19da62c7a87c0c08154ca591

commit 41c237b70f3bc9fc19da62c7a87c0c08154ca591
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2022-07-22 20:50:08 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2022-07-22 20:54:22 +0000

    x11/xfce4-goodies: Enable BATTERY option only for supported archs

    The xfce4-battery-plugin is available only for amd64 and i386. So
    enable the option only for those archs.

    Also add more unsupported archs to the OPTIONS_EXLUDE list.

    While here enable again the BSDCPUFREQ option. xfce4-bsdcpufreq-plugin
    has been fixed some time ago.

    PR:             265378

 x11/xfce4-goodies/Makefile | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
Comment 6 Guido Falsi freebsd_committer freebsd_triage 2022-07-22 20:55:26 UTC
Patch committed, should fix the issue reported.

Thanks!