BUILD NOTES FOR TCLX 8.3.X PACKAGES
===================================


1) PACKAGES

The upstream TclX has been split into 6 packages:

	tclx8.3		binaries and libraries
	tclx8.3-dev	development files
	tclx8.3-doc	manpages

	tkx8.3		binaries and libraries
	tkx8.3-dev	development files
	tkx8.3-doc	manpages

The tclx8.3, tclx8.3-dev, tkx8.3 and tkx8.3-dev conflict with previous
versions of tclx and tclx-dev but not with future version of the TclX
packages so that in the future you will be able to install multiple
versions of the packages.

However the tclx8.3-doc and tkx8.3-doc still conflict with different
versions of the same packages since they contain the same manpages.

The original unversioned binaries and libraries files have been renamed
to include the version number and replaced with a debian alternative.


2) TCL SOURCES

The upstream sources needed the Tcl/Tk sources for the compilation.
This is no longer required for the compilation of the Debian package since
the test programs are not compiled and the required Tcl/Tk manpages are
copied from the installed tcl*-doc and tk*-doc packages with the script
`copymanpages' found in the debian directory. So you need only the
tcl8.3-dev and tk8.3-dev packages for the compilation.

The makefiles have been modified to find manpages in the temporary dir
created by copymanpages during the package build step:

    --- tclx8.3-8.3.5.orig/tcl/unix/Makefile.in	Thu Aug 10 04:21:48 2000
    +++ tclx8.3-8.3.5/tcl/unix/Makefile.in	Tue Dec  3 17:29:04 2002
    @@ -311,11 +313,8 @@
     BUILDHELP=@BUILDHELP@
     buildhelp: tcl tcl.tndx
     	rm -rf ${HELP_DIR} help help.tmp
    -	if test ! -d @HELP_DIR@ ; then \
    -	    mkdir -p @HELP_DIR@ ; \
    -	fi
     	mkdir -p ${HELP_DIR}
    -	${BLDMANHELP} ${TCL_SRC_DIR}/doc ${TCLX_TOOLS_SRC_DIR}/tclmanpages \
    +	${BLDMANHELP} ${TCL_MAN_DIR} ${TCLX_TOOLS_SRC_DIR}/tclmanpages \
     	    ${HELP_DIR} Tcl.brf
     	${RUNTCL} -c "buildhelp ${HELP_DIR} TclX.brf ${TCLX_DOC_DIR}/TclX.n"
     	${INSTCOPY} ${HELP_DIR} ${INSTALL_ROOT}${TCLX_INST_RUNTIME}/help

    --- tclx8.3-8.3.5.orig/tk/unix/Makefile.in	Thu Aug 10 04:21:48 2000
    +++ tclx8.3-8.3.5/tk/unix/Makefile.in	Tue Dec  3 17:42:24 2002
    @@ -203,11 +205,8 @@
     BUILDHELP=@BUILDHELP@
     buildhelp:
     	rm -rf ${HELP_DIR} help help.tmp
    -	if test ! -d @HELP_DIR@ ; then \
    -	    mkdir -p @HELP_DIR@ ;\
    -	fi
     	mkdir -p ${HELP_DIR}
    -	${BLDMANHELP} ${TK_SRC_DIR}/doc ${TCLX_TOOLS_SRC_DIR}/tkmanpages \
    +	${BLDMANHELP} ${TK_MAN_DIR} ${TCLX_TOOLS_SRC_DIR}/tkmanpages \
     	    ${HELP_DIR} Tk.brf
     	${INSTCOPY} ${HELP_DIR} ${INSTALL_ROOT}${TKX_INST_RUNTIME}/help

    
3) SHARED LIBRARIES

Shared libraries must be libxxx.so.full_version with soname and symlink
libxxx.so.major_version. The SHARED_LIB_SUFFIX is changed to .so.1 by
patching the unix/configure script:

    --- unix/configure.orig	Tue Aug 29 05:58:00 2000
    +++ unix/configure	Tue Apr  3 17:57:23 2001
    @@ -2536,6 +2536,11 @@
     	UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'
         fi
     
    +    # I have hardcoded the SHARED_LIB_SUFFIX since the Debian
    +    # maintainer of tcl8.3 is changing SHLIB_SUFFIX at every
    +    # release. -- dz
    +    #
    +    SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.so.1'


The ld soname option and the .so link to the shared library are added by
patching the {tcl,tk}/unix/Makefile.in:

    --- tclx8.3-8.3.0.orig/tcl/unix/Makefile.in
    +++ tclx8.3-8.3.0/tcl/unix/Makefile.in
    @@ -167,7 +167,9 @@
     	PATH=${TCL_UNIX_DIR}:${PATH}; export PATH; \
     	TCL_LIBRARY=${TCL_UNIX_DIR}/../library; export TCL_LIBRARY; \
     	LD_LIBRARY_PATH=${TCL_UNIX_DIR}:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH; \
    -	${TCL_SHLIB_LD} -o ${TCLX_SHLIB_NAME} ${SOBJS} ${TCL_SHLIB_LD_LIBS}
    +	${TCL_SHLIB_LD} -o ${TCLX_SHLIB_NAME} ${SOBJS} ${TCL_SHLIB_LD_LIBS} \
    +	    -Wl,-soname,$(TCLX_SHLIB_NAME)
    +	ln -sf $(TCLX_SHLIB_NAME) $(TCLX_SHLIB_NAME:.so.1=.so)
     
     hello:	hello.c
     	${CC} ${LD_SWITCHES} -o $@ hello.c ${STATIC_LIBS}

    --- tclx8.3-8.3.0.orig/tk/unix/Makefile.in
    +++ tclx8.3-8.3.0/tk/unix/Makefile.in
    @@ -115,7 +115,9 @@
     	rm -f ${TKX_SHLIB_NAME}
     	${TCL_SHLIB_LD} -o ${TKX_SHLIB_NAME} ${SOBJS} \
     	    ${TK_BUILD_STUB_LIB_SPEC} ${TCLX_BUILD_LIB_SPEC} \
    -	    ${TCL_BUILD_STUB_LIB_SPEC} ${TCL_SHLIB_LD_LIBS}
    +	    ${TCL_BUILD_STUB_LIB_SPEC} ${TCL_SHLIB_LD_LIBS} \
    +	    -Wl,-soname,$(TKX_SHLIB_NAME)
    +	ln -sf $(TKX_SHLIB_NAME) $(TKX_SHLIB_NAME:.so.1=.so)
     
     hello:	hello.c
     	${CC} ${LD_SWITCHES} -o $@ hello.c ${STATIC_LIBS}

The .so link is also created by debian/rules in the install directory.

In tk/unix/Makefile.in I have also fixed the library search order when
linking wishx so that it is always compiled aganist own libraries even
if another version of tclx is already installed in the system.


4) TCLXCONFIG.SH

The original tclxConfig.sh contains a reference to the build directory, which
is invalid when the package is installed, so I have changed it to contain the
path of the tclx library dir where the includes are installed. I have also
removed the TCLX_LD_SEARCH_FLAGS variable since it contains an invalid value
and is anyway not needed on Debian systems:

    --- tclx8.3-8.3.5.orig/tcl/unix/tclxConfig.sh.in	Thu Apr 17 06:59:52 1997
    +++ tclx8.3-8.3.5/tcl/unix/tclxConfig.sh.in	Tue Dec  3 17:37:29 2002
    @@ -29,18 +29,11 @@
     # String to pass to linker to pick up the TclX library from its
     # build directory.
     #
    -TCLX_BUILD_LIB_SPEC='@TCLX_BUILD_LIB_SPEC@'
    +TCLX_BUILD_LIB_SPEC='@TCLX_LIB_SPEC@'
     
     #
     # String to pass to linker to pick up the TclX library from its
     # installed directory.
     #
     TCLX_LIB_SPEC='@TCLX_LIB_SPEC@'
    -
    -#
    -# Search flags that specify how to find the TclX shared libraries at run time
    -# on some systems.
    -#
    -TCLX_LD_SEARCH_FLAGS='@TCLX_LD_SEARCH_FLAGS@'
    -

    --- tclx8.3-8.3.5.orig/tk/unix/tkxConfig.sh.in	Thu Apr 17 07:00:11 1997
    +++ tclx8.3-8.3.5/tk/unix/tkxConfig.sh.in	Tue Dec  3 17:43:10 2002
    @@ -30,7 +30,7 @@
     # String to pass to linker to pick up the TkX library from its
     # build directory.
     #
    -TKX_BUILD_LIB_SPEC='@TKX_BUILD_LIB_SPEC@'
    +TKX_BUILD_LIB_SPEC='@TKX_LIB_SPEC@'
     
     #
     # String to pass to linker to pick up the TclX library from its


5) TEST PROGRAMS

The TclX test program are not built since they require the full tcl/tk source
tree, and I don't want tclx packages depend on tcl sources. The makefiles have
been patched by removing test dependencies:

    --- tclx8.3-8.3.5.orig/tcl/unix/Makefile.in       Thu Aug 10 04:21:48 2000
    +++ tclx8.3-8.3.5/tcl/unix/Makefile.in        Tue Dec  3 17:05:07 2002
    @@ -136,7 +136,7 @@
     #
     all: binaries libraries doc
     
    -binaries: tcl checkup RUNTIME tclXtest
    +binaries: tcl checkup RUNTIME
     
     libraries: tcl.tndx tcl.tlib tclx.tcl buildidx.tcl
     
    --- tclx8.3-8.3.5.orig/tk/unix/Makefile.in        Thu Aug 10 04:21:48 2000
    +++ tclx8.3-8.3.5/tk/unix/Makefile.in Tue Dec  3 17:10:43 2002
    @@ -85,7 +85,7 @@
     #
     all: binaries libraries doc
     
    -binaries: wishx tktest
    +binaries: wishx
     
     libraries: RUNTIME
 

-- 
Massimo Dal Zotto <dz@debian.org>
