Bug 48574

Summary: tclConfig.sh has a nonexistent path for TCL_SRC_DIR
Product: Ports & Packages Reporter: Joseph Koshy <jkoshy>
Component: Individual Port(s)Assignee: Dirk Meyer <dinoex>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Joseph Koshy freebsd_committer freebsd_triage 2003-02-23 01:40:13 UTC
/usr/local/lib/tcl8.3/tclConfig.sh is a shell script that records 
configuration information about the Tcl build.  Since our packages
are built on the ports build cluster, file names recorded in the
tclConfig.sh script that gets installed under $LOCALBASE are very 
likely to be invalid on a users machine.  The corresponding file
for the Tk toolkit, "tkConfig.sh" has a similar problem.

Any package that uses the paths recorded in these config scripts 
consequently fails to build and run.

Fix: 

The contents of these files should be edited to make these paths relative
to $PORTSDIR, at package install time.   A port that needs to access the
Tcl source tree will then work when BUILD_DEPENDS line like the 
following is specified.

BUILD_DEPENDS=${PORTSDIR}/lang/tcl83/work/tcl8.3.5/README:${PORTSDIR}/lang/tcl8
3:patch

Workaround: build and install Tcl and Tk from source.
How-To-Repeat: 
(nemesis) $ cd /usr/local/lib/tcl8.3
(nemesis) $ grep /tmp/a tclConfig.sh
TCL_BUILD_LIB_SPEC='-L/tmp/a/ports/lang/tcl83/work/tcl8.3.4/unix 
-ltcl83${TCL_DBGX}'
TCL_SRC_DIR='/tmp/a/ports/lang/tcl83/work/tcl8.3.4'
TCL_BUILD_STUB_LIB_SPEC='-L/tmp/a/ports/lang/tcl83/work/tcl8.3.4/unix 
-ltclstub83${TCL_DBGX}'
TCL_BUILD_STUB_LIB_PATH='/tmp/a/ports/lang/tcl83/work/tcl8.3.4/unix/libtclstub8
3${TCL_DBGX}.a'
Comment 1 Dirk Meyer freebsd_committer freebsd_triage 2003-03-05 05:12:51 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

over to maintainer
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2003-03-14 17:55:13 UTC
State Changed
From-To: open->analyzed


The paths can't be relative to portsdir.
But "/tmp" can be replaced with ${WRKDIRPREFIX} 
which would solve the problem for most. 

BUILD_DEPENDS=${PORTSDIR}/lang/tcl83/work/tcl8.3.5/README:${PORTSDIR}/lang/tcl83:patch 

An absolute dependecy like this will fail on bento: 
PORTSDIR=/usr/ports, but /usr/ports is a symlink to /a/ports 
so workdir: ${WRKDIRPREFIX}${PORTSDIR}/lang/tcl83/work/tcl8.3.5/README 
will resolve in /tmp/usr/ports/lang/tcl83/work/tcl8.3.5/README 
but the file is exists only at /tmp/a/ports/lang/tcl83/work/tcl8.3.5/README 

So depedencies to workdirecories must be realative, using ${.CURDIR}. 

This affects a couple of ports: 
/usr/ports/current/c-nocem/Makefile 
/usr/ports/graphics/pvmpov/Makefile 
/usr/ports/java/jdk12/Makefile 
/usr/ports/lang/gpc/Makefile 
/usr/ports/lang/pm3-forms/Makefile 
/usr/ports/lang/pm3-gui/Makefile 
/usr/ports/lang/pm3-m3tk/Makefile 
/usr/ports/lang/pm3-net/Makefile 
/usr/ports/lang/pm3-netobj/Makefile 
/usr/ports/net/cphone/Makefile 
/usr/ports/net/gatekeeper/Makefile 
/usr/ports/net/gnomemeeting/Makefile 
/usr/ports/net/gnomemeeting2/Makefile 
/usr/ports/net/ohphone/Makefile 
/usr/ports/net/openam/Makefile 
/usr/ports/net/opengatekeeper/Makefile 
/usr/ports/net/opengk/Makefile 
/usr/ports/net/openh323/Makefile 
/usr/ports/net/openh323proxy/Makefile 
/usr/ports/net/openmcu/Makefile 
/usr/ports/news/c-nocem/Makefile 
/usr/ports/print/virtualpaper/Makefile 
/usr/ports/sysutils/ipsc/Makefile 
/usr/ports/x11-toolkits/xview-clients/Makefile 
/usr/ports/x11/9term/Makefile
Comment 3 Dirk Meyer freebsd_committer freebsd_triage 2003-03-23 20:36:19 UTC
State Changed
From-To: analyzed->closed

Fixed in tcl82, tcl83, tcl84, tk82, tk83, tk84