Bug 273806 - x11/libXcursor: Avoid duplicated path in XCURSORPATH
Summary: x11/libXcursor: Avoid duplicated path in XCURSORPATH
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks: 273744
  Show dependency treegraph
 
Reported: 2023-09-14 22:42 UTC by Guido Falsi
Modified: 2023-09-25 13:12 UTC (History)
6 users (show)

See Also:
manu: maintainer-feedback+
madpilot: merge-quarterly?


Attachments
patch v1 (651 bytes, patch)
2023-09-14 22:42 UTC, Guido Falsi
madpilot: maintainer-approval? (x11)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Falsi freebsd_committer freebsd_triage 2023-09-14 22:42:15 UTC
Created attachment 244858 [details]
patch v1

by default libXcursor is being build passing to it an ICONDIR that causes the configure script to define an XCURSORPATH with that value duplicated. This can be seen in any build log, the cc commands get this argument:

-DXCURSORPATH=\"~/.local/share/icons:~/.icons:/usr/local/share/icons:/usr/local/share/pixmaps:/usr/local/share/icons\"


This is causing issues with xfce4-mouse-settings from xfce4-settings port, which scans this path for cursor themes. This software performs no checks for duplicates, so cursor themes are duplicated in the UI.

The details of this are in bug #273744

I have checked the configure script, which has some simple check to try to avid such duplicates, but actually fails due to variable substitutions being performed in multiple steps and the check for equal variables fails to catch our path.

So, to avoid this, I thought we could directly pass the full xcursor search path with the configure --with-cursorpath variable, so we have full control over it.

Testing in poudriere shows it does what it is expected, I'm going to run test it on my machines as soon the build run ends.

Can this be approved?

Thanks in advance.
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2023-09-15 11:10:26 UTC
I'm now running with the attached patch applied, port compiles fine in poudriere for all supported OS versions and works fine at runtime.
Comment 2 Gleb Popov freebsd_committer freebsd_triage 2023-09-15 11:43:18 UTC
Not wearing x11 hat, but the change makes sense for me.
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2023-09-25 13:02:39 UTC
@manu thanks for the approval, I missed it, noticed it now, committing this shortly!
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-09-25 13:08:33 UTC
A commit in branch main references this bug:

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

commit ffd7b6bd590ff4552e1f04c8004c723e296b669a
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2023-09-25 13:06:43 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2023-09-25 13:06:43 +0000

    x11/libXcursor: Avoid duplicates in cursor search path

    The cursor search path extrapolated by the configure script contains
    duplicated paths. Work around this by providing the full correct
    search path to configure via --with-cursorpath

    PR:             273806, 273744
    Reviewed by:    arrowd
    Approved by:    x11 (manu)

 x11/libXcursor/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2023-09-25 13:12:53 UTC
Committewd. Thanks!