Bug 250281 - devel/git: Convert slave ports to flavors
Summary: devel/git: Convert slave ports to flavors
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: Renato Botelho
Depends on:
Reported: 2020-10-12 04:52 UTC by Yasuhiro Kimura
Modified: 2020-11-05 17:05 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (garga)

Patch file (2.32 KB, patch)
2020-10-12 04:52 UTC, Yasuhiro Kimura
no flags Details | Diff
Additional patch file (1.58 KB, patch)
2020-10-12 17:10 UTC, Yasuhiro Kimura
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro Kimura freebsd_committer 2020-10-12 04:52:03 UTC
Created attachment 218676 [details]
Patch file

Convert slave ports to flavors.

To apply attached patch, please take following steps.

1. cd /usr/ports
2. svn move devel/git-gui/pkg-descr devel/git/pkg-descr-gui
3. svn delete devel/git-gui
4. svn move devel/git-lite/pkg-descr devel/git/pkg-descr-lite
5. svn delete devel/git-lite
6. svn patch /path/to/attached/patch
Comment 1 andrew 2020-10-12 15:51:45 UTC
I'm not sure the way this handles OPTIONS works well - I tried something similar in guile-gnome-platform and got pushback from mat (see D22189 on phab).

The main issue is that while slave ports get their own set of options (from OPTIONS_FILE or make.conf category_portname_[UN]SET= vars), flavors don't; they all share a port origin and hence one set of options variables.

I suggest putting this up on phab and soliciting wider review.

Also, typo:

+lite_CONFLISTS_INSTALL=		git git-gui
Comment 2 commit-hook freebsd_committer 2020-10-12 16:04:03 UTC
A commit references this bug:

Author: garga
Date: Mon Oct 12 16:03:45 UTC 2020
New revision: 552136
URL: https://svnweb.freebsd.org/changeset/ports/552136

  Convert git slave ports to flavors

  Create git@lite and git@gui flavors to replace slave ports

  PR:		250281
  Submitted by:	Yasuhiro KIMURA <yasu@utahime.org>
  Sponsored by:	Rubicon Communications, LLC (Netgate)

Comment 3 Renato Botelho freebsd_committer 2020-10-12 16:07:06 UTC
(In reply to andrew from comment #1)
I'm sorry but I just saw your comment after I committed it.  I'll take a look
Comment 4 Yasuhiro Kimura freebsd_committer 2020-10-12 17:10:04 UTC
Created attachment 218698 [details]
Additional patch file

Thank you for committing. But I found my patch causes failure of `make index`. So would you please commit attached patch too?

Best Regards.
Comment 5 andrew 2020-10-12 17:33:27 UTC
So the problem this is causing for me is that I now can't easily turn off SUBTREE for git@lite (because it pulls in a ton of docs build dependencies, which is probably something that should be fixed) without also turning it off for git@default (which would be bad since it's a needed feature), due to the sharing of options.

(It can be done in make.conf using


but that's a really ugly workaround.)

I'm not sure what the best solution here is, but this isn't it. Maybe there should be support in the framework for flavors to have their own options?
Comment 6 commit-hook freebsd_committer 2020-10-13 11:30:56 UTC
A commit references this bug:

Author: garga
Date: Tue Oct 13 11:30:50 UTC 2020
New revision: 552231
URL: https://svnweb.freebsd.org/changeset/ports/552231

  Change dependencies of git-lite to git@lite

  PR:		250281
  Submitted by:	Yasuhiro KIMURA <yasu@utahime.org>

Comment 7 andrew 2020-10-16 18:38:27 UTC
Also, the "gui" flavor will build without a GUI if there exists a configuration file with GUI=off (e.g. created for use with the "default" flavor).
Comment 8 Renato Botelho freebsd_committer 2020-11-05 17:05:09 UTC
(In reply to andrew from comment #7)
I've added the support of having different OPTIONS for each flavor while framework doesn't support it yet.  Thanks!