tcltk-x86_64 stable port information

Package: tcltk
Epoch: 1
Version: 8.5.10
Revision: 5
Architecture: x86_64
BuildDepends: <<
fink-package-precedence,
fontconfig2-dev (>= 2.8.0-4),
freetype219 (>= 2.3.12-1),
pkgconfig (>= 0.23),
x11-dev,
xft2-dev (>= 2.1.14-1)
<<
Depends: <<
%N-shlibs (= %e:%v-%r),
fontconfig2-shlibs (>= 2.8.0-4),
freetype219-shlibs (>= 2.3.12-1),
x11-shlibs,
xft2-shlibs (>= 2.1.14-1)
<<
Source: mirror:sourceforge:tcl/tcl%v-src.tar.gz
Source-MD5: a08eaf8467c0631937067c1948dd326b
SourceDirectory: tcl%v
Source2: mirror:sourceforge:tcl/tk%v-src.tar.gz
Source2-MD5: adfdaca46cc95fec8557df8ecdb0715c
PatchFile: %n-x86_64.patch
PatchFile-MD5: bc4afd9831063750c5914b7cc9335c5c
NoSourceDirectory: true
SetCPPFLAGS: -MD
ConfigureParams: --enable-shared --disable-corefoundation --exec-prefix=%p --mandir=%p/share/man --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib tcl_cv_type_64bit="long long" PKG_CONFIG_PATH="%p/lib/fontconfig2/lib/pkgconfig:%p/lib/xft2/lib/pkgconfig:$PKG_CONFIG_PATH"
InfoTest: TestScript: cd tcl%v/unix;make -k test || exit 2
CompileScript: <<
#!/bin/sh -ev

pushd tcl%v/unix
export COMMAND_MODE=legacy
./configure %c --build=%m-apple-darwin`uname -r|cut -f1 -d.` --host=%m-apple-darwin`uname -r|cut -f1 -d.`
make
popd

pushd tk%v/unix
export DYLD_FALLBACK_LIBRARY_PATH=%b/tcl%v/unix
ac_cv_path_tclsh=%b/tcl%v/unix/tclsh ./configure %c --build=%m-apple-darwin`uname -r|cut -f1 -d.` --host=%m-apple-darwin`uname -r|cut -f1 -d.`
# make genstubs
make
popd
fink-package-precedence --depfile-ext='\.d' --prohibit-bdep=%n-dev .
<<
InstallScript: <<
#!/bin/sh -ev
MAJORVER=8.5

mkdir -p %i/share/doc/%n
make -C tcl%v/unix INSTALL_ROOT=%d install
make -C tk%v/unix INSTALL_ROOT=%d install

ln -s wish${MAJORVER} %i/bin/wish
ln -s tclsh${MAJORVER} %i/bin/tclsh

ln -s tk${MAJORVER} %i/lib/tk
ln -s libtk${MAJORVER}.dylib %i/lib/libtk.dylib
ln -s libtkstub${MAJORVER}.a %i/lib/libtkstub.a
/usr/bin/ranlib %i/lib/libtclstub${MAJORVER}.a

ln -s tcl${MAJORVER} %i/lib/tcl
ln -s libtcl${MAJORVER}.dylib %i/lib/libtcl.dylib
ln -s libtclstub${MAJORVER}.a %i/lib/libtclstub.a
/usr/bin/ranlib %i/lib/libtkstub${MAJORVER}.a

for pkg in tcl tk; do
mkdir -p %i/include/tcltk-private/${pkg}${MAJORVER}/{generic,unix}
cp ${pkg}%v/generic/*.h %i/include/tcltk-private/${pkg}${MAJORVER}/generic
cp ${pkg}%v/unix/*.h %i/include/tcltk-private/${pkg}${MAJORVER}/unix

pushd %i/include
for hdr in *.h ; do
if [ -f tcltk-private/${pkg}${MAJORVER}/generic/${hdr} ]; then
ln -sf ../../../${hdr} tcltk-private/${pkg}${MAJORVER}/generic
fi
done
popd

perl -pi -e "s,%b/${pkg}%v/unix,%p/lib,; s,%b,%p/include/tcltk-private,; s,/${pkg}%v,/${pkg}${MAJORVER},g" %i/lib/${pkg}Config.sh
done
<<
SplitOff: <<
Package: %N-shlibs
Depends: <<
fontconfig2-shlibs (>= 2.8.0-4),
freetype219-shlibs (>= 2.3.12-1),
x11-shlibs,
xft2-shlibs (>= 2.1.14-1)
<<
Files: lib/libtcl8.5.dylib lib/libtk8.5.dylib
Shlibs: <<
%p/lib/libtcl8.5.dylib 8.5.0 %n (>= 8.5.6-1)
%p/lib/libtk8.5.dylib 8.5.0 %n (>= 8.5.6-1)
<<
DocFiles: <<
tcl%v/license.terms:LICENSE.tcl
tcl%v/README:README.tcl
tcl%v/ChangeLog:ChangeLog.tcl
tk%v/license.terms:LICENSE.tk
tk%v/README:README.tk
tk%v/ChangeLog:ChangeLog.tk
<<
<<
SplitOff2: <<
Package: %N-dev
BuildDependsOnly: True
Depends: %N (= %e:%v-%r), %N-shlibs (= %e:%v-%r)
Files: <<
lib/tclConfig.sh
lib/tkConfig.sh
include
lib/libtcl*
lib/libtk*
share/man/man3
share/man/mann
<<
DocFiles: <<
tcl%v/license.terms:LICENSE.tcl
tcl%v/README:README.tcl
tcl%v/ChangeLog:ChangeLog.tcl
tk%v/license.terms:LICENSE.tk
tk%v/README:README.tk
tk%v/ChangeLog:ChangeLog.tk
<<
DescUsage: <<
Packages that want to use the supplied internal-interface headers
should BuildDepends on %n of at least epoch 1 or higher.
<<
<<

DocFiles: <<
tcl%v/license.terms:LICENSE.tcl
tcl%v/README:README.tcl
tcl%v/ChangeLog:ChangeLog.tcl
tk%v/license.terms:LICENSE.tk
tk%v/README:README.tk
tk%v/ChangeLog:ChangeLog.tk
<<
Description: Tool Command Language and the Tk toolkit
DescPort: <<
We add /System/Library/Tcl and /usr/lib to TCL_PACKAGE_PATH so that
Tcl packages (such as darwinports) installed in the standard system
locations will be found.

What is COMMAND_MODE?

Pass CPPFLAGS so it works as everyone expects (*after* local flags),
despite how build system incorrectly reimplements it differently.
<<
DescPackaging: <<
Patch added for crash caused by changed LASTEvent definition in
the xquartz-2.3.0 update. Does not affect binary compatibility.

tcl and tk are build in separate/parallel dirs. Clearer to do
NoSourceDirectory and have them both subdirs of %b than to
have one be %b and keep having to 'cd ..'

Make sure tk build finds tclsh from current build rather than
different-version one from installed fink package or different
arch and build-options one from OS X. Thanks pogma for helping
make sure tclsh finds its libtcl

Don't try xft's older detection method. And fink's (newer) xft
detection publishes x11 flags, so don't also pass them
explicitly (unix/Makefile mis-orders them before fink's)

Installed *Config.sh scripts encode build-dir paths as well as
runtime paths, which other packages may read and then try to
access. We cannot allow that (no guarantee that they exist, or
where they exist, or that they are the correct arch or build-
options, etc), so adjust to point to the installed locations.

Building extensions sometimes needs access to internal
headers, so install them in a private location. Point
*Config.sh vars accordingly. Thanks fedora!
<<
DescDetail: <<
Tcl provides a portable scripting environment for Unix, Windows,
and Macintosh that supports string processing and pattern matching,
native file system access, shell-like control over other programs,
TCP/IP networking, timers, and event-driven I/O.

Tcl has traditional programming constructs like variables, loops,
procedures, namespaces, error handling, script packages,
and dynamic loading of DLLs.

Tk provides portable GUIs on UNIX, Windows, and Macintosh.
A powerful widget set and the concise scripting interface to Tk make
it a breeze to develop sophisticated user interfaces.
<<
PostInstScript: <<
update-alternatives --remove Object.3 %p/share/man/man3/Object.3.tcltk
<<
License: BSD
Homepage: http://www.tcl.tk
Maintainer: Daniel Macks

tcltk-x86_64 stable port .patch

diff -Nurd -x'*~' tcltk-8.5.10.orig/tcl8.5.10/generic/tclInt.h tcltk-8.5.10/tcl8.5.10/generic/tclInt.h
--- tcltk-8.5.10.orig/tcl8.5.10/generic/tclInt.h 2011-06-23 08:52:57.000000000 -0400
+++ tcltk-8.5.10/tcl8.5.10/generic/tclInt.h 2011-07-17 12:38:39.000000000 -0400
@@ -2873,7 +2873,7 @@
MODULE_SCOPE int TclClockOldscanObjCmd(
ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
-MODULE_SCOPE int Tcl_CloseObjCmd(ClientData clientData,
+extern int Tcl_CloseObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
MODULE_SCOPE int Tcl_ConcatObjCmd(ClientData clientData,
@@ -3034,7 +3034,7 @@
MODULE_SCOPE int Tcl_RenameObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
-MODULE_SCOPE int Tcl_ReturnObjCmd(ClientData clientData,
+extern int Tcl_ReturnObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
MODULE_SCOPE int Tcl_ScanObjCmd(ClientData clientData,
diff -Nurd -x'*~' tcltk-8.5.10.orig/tcl8.5.10/generic/tclPort.h tcltk-8.5.10/tcl8.5.10/generic/tclPort.h
--- tcltk-8.5.10.orig/tcl8.5.10/generic/tclPort.h 2011-05-31 11:03:46.000000000 -0400
+++ tcltk-8.5.10/tcl8.5.10/generic/tclPort.h 2011-07-17 12:38:44.000000000 -0400
@@ -22,7 +22,7 @@
#endif
#include "tcl.h"
#if !defined(_WIN32)
-# include "tclUnixPort.h"
+# include "../unix/tclUnixPort.h"
#endif

#if defined(__CYGWIN__)
diff -Nurd -x'*~' tcltk-8.5.10.orig/tcl8.5.10/unix/configure tcltk-8.5.10/tcl8.5.10/unix/configure
--- tcltk-8.5.10.orig/tcl8.5.10/unix/configure 2011-06-23 09:18:36.000000000 -0400
+++ tcltk-8.5.10/tcl8.5.10/unix/configure 2011-07-17 12:38:44.000000000 -0400
@@ -18871,7 +18871,7 @@
else
TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`"
fi
- TCL_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_LIB_FLAG}"
+ TCL_BUILD_LIB_SPEC="`pwd`/${TCL_LIB_FILE}"
TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}"
fi
VERSION='${VERSION}'
@@ -18915,7 +18915,7 @@
TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`"
fi

-TCL_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
+TCL_BUILD_STUB_LIB_SPEC="`pwd`/${TCL_STUB_LIB_FILE}"
TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}"
TCL_STUB_LIB_PATH="${TCL_STUB_LIB_DIR}/${TCL_STUB_LIB_FILE}"
@@ -19097,7 +19097,7 @@



-CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
+EXTRA_CC_SWITCHES="${EXTRA_CC_SWITCHES} ${CPPFLAGS}"; CPPFLAGS=""

: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
diff -Nurd -x'*~' tcltk-8.5.10.orig/tk8.5.10/unix/Makefile.in tcltk-8.5.10/tk8.5.10/unix/Makefile.in
--- tcltk-8.5.10.orig/tk8.5.10/unix/Makefile.in 2011-06-23 14:37:39.000000000 -0400
+++ tcltk-8.5.10/tk8.5.10/unix/Makefile.in 2011-11-03 02:24:06.000000000 -0400
@@ -154,7 +154,7 @@
# Linker switch(es) to use to link with the X11 library archive (the
# configure script will try to set this value automatically, but you
# can override it).
-X11_LIB_SWITCHES = @XLIBSW@ $(XFT_LIBS)
+X11_LIB_SWITCHES = $(XFT_LIBS) @XLIBSW@


# To turn off the security checks that disallow incoming sends when
@@ -324,18 +324,18 @@

CC_SWITCHES_NO_STUBS = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
-I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} -I${TCL_GENERIC_DIR} \
--I${TCL_PLATFORM_DIR} ${@TK_WINDOWINGSYSTEM@_INCLUDES} ${AC_FLAGS} \
+-I${TCL_PLATFORM_DIR} ${AC_FLAGS} \
${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} \
-${NO_DEPRECATED_FLAGS} @EXTRA_CC_SWITCHES@
+${NO_DEPRECATED_FLAGS} @EXTRA_CC_SWITCHES@ ${@TK_WINDOWINGSYSTEM@_INCLUDES}

CC_SWITCHES = $(CC_SWITCHES_NO_STUBS) ${TCL_STUB_FLAGS}

APP_CC_SWITCHES = $(CC_SWITCHES_NO_STUBS) @EXTRA_APP_CC_SWITCHES@

DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} -I${BMAP_DIR} \
--I${TCL_GENERIC_DIR} -I${TCL_PLATFORM_DIR} ${@TK_WINDOWINGSYSTEM@_INCLUDES} \
+-I${TCL_GENERIC_DIR} -I${TCL_PLATFORM_DIR} \
${AC_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} \
-${KEYSYM_FLAGS} @EXTRA_CC_SWITCHES@
+${KEYSYM_FLAGS} @EXTRA_CC_SWITCHES@ ${@TK_WINDOWINGSYSTEM@_INCLUDES}

WISH_OBJS = tkAppInit.o

diff -Nurd -x'*~' tcltk-8.5.10.orig/tk8.5.10/unix/configure tcltk-8.5.10/tk8.5.10/unix/configure
--- tcltk-8.5.10.orig/tk8.5.10/unix/configure 2011-06-23 14:37:39.000000000 -0400
+++ tcltk-8.5.10/tk8.5.10/unix/configure 2011-11-03 02:23:35.000000000 -0400
@@ -10838,19 +10838,14 @@
echo "$as_me:$LINENO: result: $enable_xft" >&5
echo "${ECHO_T}$enable_xft" >&6
else
- found_xft="yes"
- XFT_CFLAGS=`xft-config --cflags 2>/dev/null` || found_xft="no"
- XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no"
- if test "$found_xft" = "no" ; then
found_xft=yes
XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || found_xft="no"
XFT_LIBS=`pkg-config --libs xft 2>/dev/null` || found_xft="no"
- fi
echo "$as_me:$LINENO: result: $found_xft" >&5
echo "${ECHO_T}$found_xft" >&6
if test "$found_xft" = "yes" ; then
tk_oldCFlags=$CFLAGS
- CFLAGS="$CFLAGS $XINCLUDES $XFT_CFLAGS"
+ CFLAGS="$CFLAGS $XFT_CFLAGS $XINCLUDES"
tk_oldLibs=$LIBS
LIBS="$tk_oldLIBS $XFT_LIBS $XLIBSW"
echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
@@ -10915,7 +10910,7 @@
fi
if test "$found_xft" = "yes" ; then
tk_oldCFlags=$CFLAGS
- CFLAGS="$CFLAGS $XINCLUDES $XFT_CFLAGS"
+ CFLAGS="$CFLAGS $XFT_CFLAGS $XINCLUDES"
tk_oldLibs=$LIBS
LIBS="$tk_oldLIBS $XFT_LIBS $XLIBSW"

@@ -11231,7 +11226,7 @@
else
TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`"
fi
- TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}"
+ TK_BUILD_LIB_SPEC="`pwd`/${TK_LIB_FILE}"
TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}"
fi

@@ -11265,7 +11260,7 @@
TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`"
fi

-TK_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_STUB_LIB_FLAG}"
+TK_BUILD_STUB_LIB_SPEC="`pwd`/${TK_STUB_LIB_FILE}"
TK_STUB_LIB_SPEC="-L${TK_STUB_LIB_DIR} ${TK_STUB_LIB_FLAG}"
TK_BUILD_STUB_LIB_PATH="`pwd`/${TK_STUB_LIB_FILE}"
TK_STUB_LIB_PATH="${TK_STUB_LIB_DIR}/${TK_STUB_LIB_FILE}"
@@ -11453,7 +11448,7 @@
LTLIBOBJS=$ac_ltlibobjs


-CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
+EXTRA_CC_SWITCHES="${EXTRA_CC_SWITCHES} ${CPPFLAGS}"; CPPFLAGS=""

: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
diff -Nurd -x'*~' tcltk-8.5.10.orig/tk8.5.10/unix/tkConfig.sh.in tcltk-8.5.10/tk8.5.10/unix/tkConfig.sh.in
--- tcltk-8.5.10.orig/tk8.5.10/unix/tkConfig.sh.in 2011-06-23 14:37:39.000000000 -0400
+++ tcltk-8.5.10/tk8.5.10/unix/tkConfig.sh.in 2011-11-03 02:24:40.000000000 -0400
@@ -32,7 +32,7 @@
TK_LIB_FILE='@TK_LIB_FILE@'

# Additional libraries to use when linking Tk.
-TK_LIBS='@XLIBSW@ @XFT_LIBS@ @LIBS@ @TCL_LIBS@'
+TK_LIBS='@XFT_LIBS@ @XLIBSW@ @LIBS@ @TCL_LIBS@'

# Top-level directory in which Tk's platform-independent files are
# installed.

tcltk-x86_64 _unstable_ port .patch