Bug 211261

Summary: Mk/Uses/tcl.mk: Fix dependency for USES=tk
Product: Ports & Packages Reporter: David Naylor <dbn>
Component: Ports FrameworkAssignee: David Naylor <dbn>
Status: Closed FIXED    
Severity: Affects Some People CC: gahr, ports-bugs, tcltk
Priority: --- Keywords: patch
Version: LatestFlags: koobs: merge-quarterly+
Hardware: Any   
OS: Any   
URL: https://reviews.freebsd.org/D7138
Attachments:
Description Flags
Patch Mk/Uses/tcl.mk to fix stage-qa error none

Description David Naylor freebsd_committer freebsd_triage 2016-07-21 05:43:26 UTC
Created attachment 172769 [details]
Patch Mk/Uses/tcl.mk to fix stage-qa error

When compiling x11-toolkits/pypy-tkinter I get the following warning message:

====> Running Q/A tests (stage-qa)
Error: /usr/local/pypy-5.3/lib_pypy/_tkinter/tklib_cffi.pypy-41.so is linked to /usr/local/lib/libtcl86.so.1 from lang/tcl86 but it is not declared as a dependency
Warning: you need USES+=tcl

However, adding tcl does to USES does not fix the problem.  The reason is that tcl.mk overrides the _TCLTK_LIB_LINE variable.  

Since tk depends on tcl, and any port linking to tk will also link to tcl, I propose the attached patch that includes tcl with tk in the LIB_DEPENDS.
Comment 1 Pietro Cerutti freebsd_committer freebsd_triage 2016-07-21 07:41:12 UTC
I like this approach, but please let's wait and see what happens in https://reviews.freebsd.org/D7138.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-21 08:43:17 UTC
Can't be in Progress without Assignee. Assume Mat (as author of review). Please re-assign if this is incorrect. Final Assignee should be person who commits/MFH's/closes issue, if not author.
Comment 3 Pietro Cerutti freebsd_committer freebsd_triage 2016-07-22 09:58:13 UTC
Please go ahead with this.
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-07-24 08:45:42 UTC
A commit references this bug:

Author: dbn
Date: Sun Jul 24 08:45:31 UTC 2016
New revision: 418990
URL: https://svnweb.freebsd.org/changeset/ports/418990

Log:
  Mk/Uses/tcl.mk: fix stage-qa linking error.

   - If a port links to libtk then it will always also link to libtcl.  Include
     libtcl in the LIB_DEPENDS when linking to libtk.
   - Fix indentation of '.if' statements

  PR:		211261
  Approved by:	gahr
  MFH:		2016Q3

Changes:
  head/Mk/Uses/tcl.mk
Comment 5 David Naylor freebsd_committer freebsd_triage 2016-07-24 08:58:10 UTC
Committed, thanks.
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-07-29 07:23:46 UTC
A commit references this bug:

Author: dbn
Date: Fri Jul 29 07:22:54 UTC 2016
New revision: 419229
URL: https://svnweb.freebsd.org/changeset/ports/419229

Log:
  MFH: r418990

  Mk/Uses/tcl.mk: fix stage-qa linking error.

   - If a port links to libtk then it will always also link to libtcl.  Include
     libtcl in the LIB_DEPENDS when linking to libtk.
   - Fix indentation of '.if' statements

  PR:		211261
  Approved by:	ports-secteam (feld), gahr

Changes:
_U  branches/2016Q3/
  branches/2016Q3/Mk/Uses/tcl.mk