Bug 267239 - graphics/colord: Update to 1.4.6; converting to meson build; adding port options
Summary: graphics/colord: Update to 1.4.6; converting to meson build; adding port options
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: Koop Mast
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-21 07:02 UTC by Sean Champ
Modified: 2022-12-20 17:26 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (kwm)
antoine: exp-run+


Attachments
patch for graphics/colord update to 1.4.6 + options (12.12 KB, patch)
2022-10-21 07:02 UTC, Sean Champ
no flags Details | Diff
Updated colord patch (12.09 KB, patch)
2022-11-30 14:52 UTC, Adam Weinberger
no flags Details | Diff
Fixed bash-completion dep (12.16 KB, patch)
2022-12-05 17:58 UTC, Adam Weinberger
no flags Details | Diff
actually working (12.13 KB, patch)
2022-12-10 16:58 UTC, Adam Weinberger
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Champ 2022-10-21 07:02:30 UTC
Created attachment 237496 [details]
patch for graphics/colord update to 1.4.6 + options

colord is now available in a 1.4.6 release

The attached diff will use meson for the port build in graphics/colord, also adding the following port options (from meson options)
- COMPLETIONS for installing shell completions
- DOCS for installing docs
- MANPAGES for building manual pages
- SANE for enabling SANE support
- SENSOR for argyllcms sensor supportoptional, 
- TESTS for self tests during the build

The addition of the SENSOR option has an effect of making the dependency on argyllcms optional. As I've not been able to get jam and argyllcms to build under my local ports config, the option is disabled by default, in the updated port.

For consistency with the earlier release build, the MANPAGES option is added to the options default value
Comment 1 Adam Weinberger freebsd_committer freebsd_triage 2022-11-04 23:29:34 UTC
Thank you for this, Sean! The changes to the MANPAGES option are almost comical: this port has added literally HOURS of time to every gtk30 build because of the docbook-utils dependency that hasn't actually been used since 2018.

Some style stuff: per https://docs.freebsd.org/en/books/porters-handbook/special/#shell-completion, shell completion files should either always be installed, or the option should be enabled by default.

Are you sure about this one? LOCALBASE is where other ports live; PREFIX is where *this port* is going to live.
-	@${REINPLACE_CMD} -e 's|lib/color|db/color|g' \
-		-e 's|/usr/share/color|${PREFIX}/share/color|g' \
+	@${REINPLACE_CMD} -e 's|lib/color\>|db/color|g' \
+		-e 's|/usr/share/color|${LOCALBASE}/share/color|g' \
Comment 2 Adam Weinberger freebsd_committer freebsd_triage 2022-11-30 14:52:12 UTC
Created attachment 238455 [details]
Updated colord patch

Updated the patch to address the previous comments: completion file installed without a COMPLETION option, LOCALBASE -> PREFIX for this port's stuff.
Comment 3 Adam Weinberger freebsd_committer freebsd_triage 2022-11-30 14:55:10 UTC
Requesting an exp-run for this patch please. The entire GTK3 system and GNOME DE depends on this.
Comment 4 Antoine Brodin freebsd_committer freebsd_triage 2022-12-03 21:36:46 UTC
The PORTREVISION=2 should be dropped
Comment 5 Adam Weinberger freebsd_committer freebsd_triage 2022-12-03 22:45:47 UTC
Good catch!
Comment 7 Adam Weinberger freebsd_committer freebsd_triage 2022-12-05 17:58:46 UTC
Created attachment 238547 [details]
Fixed bash-completion dep

Shoot. Try this one instead. Unfortunately I don't have a machine at this time that can test it locally; this should hopefully fix that configure error.
Comment 8 Antoine Brodin freebsd_committer freebsd_triage 2022-12-10 09:26:58 UTC
colord still fails to build:
meson.build:1:0: ERROR: Unknown options: "bash-completion"

Please test locally before requesting an exp-run
Comment 9 Adam Weinberger freebsd_committer freebsd_triage 2022-12-10 16:58:23 UTC
Created attachment 238695 [details]
actually working

I'm really sorry about that.

This is properly tested and builds cleanly.
Comment 10 Adam Weinberger freebsd_committer freebsd_triage 2022-12-10 16:59:25 UTC
Re-requesting exp-run after proper local testing. I apologize for the poor behaviour, Antoine. I try to be much more respectful of your time.
Comment 11 Antoine Brodin freebsd_committer freebsd_triage 2022-12-19 19:03:05 UTC
Exp-run looks fine
Comment 12 commit-hook freebsd_committer freebsd_triage 2022-12-19 19:44:44 UTC
A commit in branch main references this bug:

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

commit 0ceac973c8f6b5ae95c14ed9ed192c3f319e4cf3
Author:     Sean Champ <lab+bsd@thinkum.space>
AuthorDate: 2022-12-19 19:36:29 +0000
Commit:     Adam Weinberger <adamw@FreeBSD.org>
CommitDate: 2022-12-19 19:43:41 +0000

    graphics/colord: Update to 1.4.6

    This update adds many options including COMPLETIONS, DOCS, MANPAGES,
    SANE, and an argyllcms SENSOR option.

    Significantly, it removes the docbook-utils dependency, which brought
    the entire LaTeX system with it. This unfortunate dependency added
    literally hours to the build time of colord and everything which
    required it (in particular, gtk30 and the entire GNOME DE).

    The comical part is that docbook-utils haven't actually been used by
    colord in nearly 5 years; our port was simply never updated to remove
    that dependency. Mercifully, this is now fixed.

    Many thanks to Antoine for running multiple exp-runs caused by me not
    having my act together.

    PR:             267239

 graphics/colord/Makefile                           | 88 ++++++++++++----------
 graphics/colord/distinfo                           |  6 +-
 graphics/colord/files/patch-Makefile.in (gone)     | 10 ---
 graphics/colord/files/patch-configure (gone)       | 11 ---
 graphics/colord/files/patch-man_meson.build (new)  | 10 +++
 graphics/colord/files/patch-src_Makefile_in (gone) | 15 ----
 graphics/colord/pkg-plist                          | 36 +++++++--
 7 files changed, 91 insertions(+), 85 deletions(-)
Comment 13 Adam Weinberger freebsd_committer freebsd_triage 2022-12-19 19:46:49 UTC
Sean, thank you for your work. Antoine, thank you for both your work and your patience.

I'm closing out this PR now. I do not intend to merge it to quarterly at this time as I think it's worth letting it run in main for a while in case there's any runtime fallout.
Comment 14 Vladimir Druzenko freebsd_committer freebsd_triage 2022-12-19 21:39:32 UTC
graphics/colord require devel/libgusb, but devel/libgusb build error:
> meson.build:1:0: ERROR: Unknown options: "vala"

It need small fix:
diff -ur libgusb.orig/Makefile devel/libgusb/Makefile
--- devel/libgusb.orig/Makefile
+++ devel/libgusb/Makefile
@@ -18,8 +18,8 @@

 USE_GNOME=     glib20 introspection:build

-OPTIONS_DEFINE=                DOCS VALA
-OPTIONS_DEFAULT=       DOCS VALA
+OPTIONS_DEFINE=                DOCS VAPI
+OPTIONS_DEFAULT=       DOCS VAPI
 OPTIONS_SUB=           yes

 .include <bsd.port.options.mk>
@@ -27,8 +27,8 @@
 .if !${PORT_OPTIONS:MDOCS}
 MESON_ARGS+=   -Ddocs=false
 .endif
-.if !${PORT_OPTIONS:MVALA}
-MESON_ARGS+=   -Dvala=false
+.if !${PORT_OPTIONS:MVAPI}
+MESON_ARGS+=   -Dvapi=false
 .endif

 .include <bsd.port.mk>
diff -ur devel/libgusb.orig/pkg-plist devel/libgusb/pkg-plist
--- devel/libgusb.orig/pkg-plist
+++ devel/libgusb/pkg-plist
@@ -41,5 +41,5 @@
 %%DOCS%%share/gtk-doc/html/gusb/style.css
 %%DOCS%%share/gtk-doc/html/gusb/up-insensitive.png
 %%DOCS%%share/gtk-doc/html/gusb/up.png
-%%VALA%%share/vala/vapi/gusb.deps
-%%VALA%%share/vala/vapi/gusb.vapi
+%%VAPI%%share/vala/vapi/gusb.deps
+%%VAPI%%share/vala/vapi/gusb.vapi
Comment 15 Adam Weinberger freebsd_committer freebsd_triage 2022-12-19 22:56:31 UTC
(In reply to VVD from comment #14)
Good catch! Can you commit that please?
Comment 16 Vladimir Druzenko freebsd_committer freebsd_triage 2022-12-20 00:15:38 UTC
(In reply to Adam Weinberger from comment #15)
No commit bit. :-(
Comment 17 Adam Weinberger freebsd_committer freebsd_triage 2022-12-20 01:45:27 UTC
(In reply to VVD from comment #16)
Why the heck not?! That's something that should be fixed...
Comment 18 Adam Weinberger freebsd_committer freebsd_triage 2022-12-20 01:48:26 UTC
(In reply to Adam Weinberger from comment #17)
So, that's owned by gnome@ and I am pretty hesitant to step on their toes. Can you file a PR for that please?
Comment 19 Vladimir Druzenko freebsd_committer freebsd_triage 2022-12-20 10:14:35 UTC
(In reply to Adam Weinberger from comment #17)
I meant that I don't have commit access.
tcberner@ promised to look today.
Comment 20 Adam Weinberger freebsd_committer freebsd_triage 2022-12-20 16:32:37 UTC
(In reply to VVD from comment #19)
And I meant that you have submitted hundreds of PRs and really ought to have a commit bit!
Comment 21 commit-hook freebsd_committer freebsd_triage 2022-12-20 17:26:00 UTC
A commit in branch main references this bug:

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

commit cffe8a902ad7752e091d092baf59e549346447ff
Author:     VVD <vvd@unislabs.com>
AuthorDate: 2022-12-20 17:21:29 +0000
Commit:     Tobias C. Berner <tcberner@FreeBSD.org>
CommitDate: 2022-12-20 17:23:28 +0000

    devel/libgusb: fix vala binding option and rename it

    The option was previously called VALA. The canonical name for vala
    binding options is VAPI. So switch to that.

    Further the meson option was also renamed from vala to vapi, so update
    the option switch accordingly.

    PR:             267239

 devel/libgusb/Makefile  | 9 +++++----
 devel/libgusb/pkg-plist | 4 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)
Comment 22 Tobias C. Berner freebsd_committer freebsd_triage 2022-12-20 17:26:55 UTC
(In reply to Adam Weinberger from comment #17)
Agreed :)