Bug 226951

Summary: devel/mercurial: enable "hg view"
Product: Ports & Packages Reporter: Martin Birgmeier <d8zNeCFG>
Component: Individual Port(s)Assignee: Kubilay Kocak <koobs>
Status: Closed Works As Intended    
Severity: Affects Only Me CC: python, tcltk
Priority: --- Keywords: feature
Version: LatestFlags: koobs: maintainer-feedback+
Hardware: Any   
OS: Any   

Description Martin Birgmeier 2018-03-26 15:24:36 UTC
I would like to use "hg view". I believe the following changes would be necessary:

- Install /usr/local/share/mercurial/contrib/hgk with mode 755 (instead of 644)

- Depend on tk, probably similar to how devel/git does it.

- The previous point will hopefully also correct the interpreter stored in /usr/local/share/mercurial/contrib/hgk from "wish" to "wish8.6". Compare for example /usr/local/bin/gitk.

Anyway, here "hg view" works after making hgk executable and adding a symlink from wish8.6 to wish (not too elegant).

-- Martin
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2018-03-27 07:19:12 UTC
Hi Martin,

I see no major issues with the proposal (all else being equal), though:

1) Re the wish symlink, if it doesn't already, the tk/tcl port(s) (or the framework they use, Uses/tcl.mk) should be installing the foo->fooX.Y versioned symlinks accordingly to the specified (user, or the default) DEFAULT_VERSION for consuming software (ala hg) to reference in their scripts, rather than requiring patching of scripts/shebangs in each of the consuming software ports source files.

2) Given the size of the tcl/tk stack, put the functionality under an appropriately named OPTION, providing a conditional/optional dependency, rather than a compulsory one. I dont think there would be an issue to provide this as an OPTIONS_DEFAULTS so that packages. 

However, I also note that:

https://www.mercurial-scm.org/wiki/HgkExtension

lists hgk as an "unloved feature", and recommends, hgview, which is in FreeBSD Ports here: https://www.freshports.org/devel/hgview/ (and needs a maintainer)
Comment 2 Martin Birgmeier 2018-03-27 08:53:09 UTC
Hi Kubilay,

Thank you for the quick reply.

Following your lead I have now found x11-toolkits/tk-wrapper and lang/tcl-wrapper which should take care of the tcl and wish commands being available.

Also, I'll look into hgview.

-- Martin
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2018-03-27 09:28:24 UTC
(In reply to Martin Birgmeier from comment #2)

You're welcome Martin, don't hesitate to re-open the issue (updating summary accordingly) if anything still needs improvement in the mercurial port