Bug 219511 - graphics/graphviz: shebangfix for modgraph.py
Summary: graphics/graphviz: shebangfix for modgraph.py
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dirk Meyer
Depends on:
Reported: 2017-05-24 21:35 UTC by John Hein
Modified: 2017-05-31 00:11 UTC (History)
0 users

See Also:
dinoex: maintainer-feedback+

[patch] shebangfix for .py (819 bytes, patch)
2017-05-24 21:35 UTC, John Hein
no flags Details | Diff
[patch] [v2] shebangfix for .py (2.02 KB, patch)
2017-05-24 21:40 UTC, John Hein
no flags Details | Diff
[patch] [v3] shebangfix for .py (2.06 KB, patch)
2017-05-30 14:36 UTC, John Hein
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Hein 2017-05-24 21:35:57 UTC
Created attachment 182873 [details]
[patch] shebangfix for .py

stage-qa gives this if PYTHON is on:

Error: '/usr/bin/python' is an invalid shebang you need USES=shebangfix for 'share/graphviz/demo/modgraph.py'

Attached is a patch to fix that and remove tcl shebang stuff that is now in shebangfix.mk.

Note this uses *_VARS option framework.  Changing the PHP, RUBY, LUA, TCL SHEBANG_FILES settings the same way is not included in this patch (but probably should have been).
Comment 1 John Hein 2017-05-24 21:40:05 UTC
Created attachment 182874 [details]
[patch] [v2] shebangfix for .py

v2: for consistency use _VARS for ruby, etc., as well
Comment 2 Dirk Meyer freebsd_committer 2017-05-29 15:07:28 UTC

The extensions in your patch look wrong, example:
+RUBY_VARS=             SHEBANG_FILES+=tclpkg/gv/demo/modgraph.py

regression: IGNORE_WITH_PHP is lost.

regression: tcl_CMD is lost,
needed when TCL is implied by TK.

This patch v2 will not be applied.
Please test.
Comment 3 John Hein 2017-05-30 14:29:52 UTC
Sorry about the copy/paste issue with the extensions.  I have a new patch to fix that.

It also adds back the IGNORE_WITH_PHP I inadvertently removed as well.  I didn't make it conditional on OPTIONS_PHP since that would only be useful if PHP is on anyway, but it could be added to PHP_VARS.

I don't understand 'regression: tcl_CMD is lost'.  I built a fresh graphviz with poudriere testport and just selected the TK option (leaving all other options at their defaults).  The shebang repair for modgraph.tcl seemed to work just fine.  Note that the same tcl_CMD definition that is currently in graphviz/Makefile is in shebangfix.mk.

Tested by:

 - poudriere testport with default options + TK, and 'head modgraph.tcl' to verify shebang fix (#!/usr/local    /bin/tclsh8.6)

 - poudriere with PHP & php70 (modgraph.php has: #!/usr/local/bin/php)

 - stage-qa OK

 - check-orphans OK

 - portlint - no new warnings/errors
Comment 4 John Hein 2017-05-30 14:36:51 UTC
Created attachment 183070 [details]
[patch] [v3] shebangfix for .py

Here's the patch mentioned in comment 3.

It also includes a fix for PYTHON_LDFLAGS I've had for a while... PYTHON_LIBDIR has .py modules not linkable libraries.
Comment 5 commit-hook freebsd_committer 2017-05-30 19:49:48 UTC
A commit references this bug:

Author: dinoex
Date: Tue May 30 19:49:33 UTC 2017
New revision: 442117
URL: https://svnweb.freebsd.org/changeset/ports/442117

  - extend SHEBANG_FILES for modgraph.py
  - remove tcl workaround
  PR:		219511
  Submitted by:	John Hein

  - extend SHEBANG_FILES for modgraph.pl

Comment 6 Dirk Meyer freebsd_committer 2017-05-30 19:53:48 UTC
Commited with changes.
Comment 7 John Hein 2017-05-31 00:11:46 UTC