kitgen with packages

"rene" <[email protected]>
Newsgroups gmane.comp.lang.tcl.starkit
Message-ID <[email protected]>
Hi,

currently kitgen only builds tclkits.
To build additional packages with the kitgen source tree try the
following.
The used directory structure is
  ./kitgen
  ./src/        - sources from outside
  ./bin/        - installation of programs
  ./bin/`uname` - installation of platform dependent programs
  ./lib/        - installation of libraries
  ./lib/<name>/pkgIndex.tcl - generated file to call `uname`/
pkgIndex.tcl
files
  ./lib/<name>/`uname`/     - installation of platform dependent
libraries


1. Add to Makefile:

libs:
        sh config.sh 8.5/kit-large aqua univ thread allenc allmsgs
tzdata
        cd 8.5/kit-large && $(MAKE) && $(MAKE) $@

2. Add to makefile.include:

# pwd=kitgen/8.5/kit-large
DIR_SRC=$(shell pwd)/../../../src
DIR_INSTALL=$(shell pwd)/../../..
PKGINDEX1="set dir [file join \$$dir \$$::tcl_platform(os)]"
PKGINDEX2="source [file join \$$dir pkgIndex.tcl]"
UNAME = $(shell uname)

libs: sqlite xotcl

# sqlite3 variables
SQLITE_CVS  = :pserver:[email protected]:/sqlite
SQLITE_WGET = http://www.sqlite.org
SQLITE_TGZ  = sqlite-3_3_13-tea.tar.gz
SQLITE_SRC  = sqlite-3_3_13-tea
SQLITE_LIB  = sqlite3.3.13
# sqlite3 targets
sqlite: build/sqlite $(DIR_INSTALL)/lib/$(SQLITE_LIB)/$(UNAME)
build/sqlite: build/tcl ../$(SQLITE_SRC)
        mkdir -p $@ && cd $@ && CFLAGS="$(CFLAGS)" && export CFLAGS &&
\
        sh ../../../$(SQLITE_SRC)/configure --enable-shared $(TCLDIR)
&& \
        $(MAKE) install-binaries
$(DIR_INSTALL)/lib/$(SQLITE_LIB)/$(UNAME):
        mkdir -p $@ && cp -r build/lib/$(SQLITE_LIB)/* $@
        echo $(PKGINDEX1) > $@/../pkgIndex.tcl
        echo $(PKGINDEX2) >> $@/../pkgIndex.tcl
../$(SQLITE_SRC): $(DIR_SRC)/$(SQLITE_TGZ)
        cd .. && tar xzf $(DIR_SRC)/$(SQLITE_TGZ)
$(DIR_SRC)/$(SQLITE_TGZ):
        mkdir -p $(DIR_SRC)
        cd $(DIR_SRC) && wget $(SQLITE_WGET)/$(SQLITE_TGZ)

# xotcl variables
XOTCL_CVS  =
XOTCL_WGET = http://media.wu-wien.ac.at/download
XOTCL_TGZ  = xotcl-1.5.3.tar.gz
XOTCL_SRC  = xotcl-1.5.3
XOTCL_LIB  = xotcl1.5.3
# xotcl targets
xotcl: build/xotcl $(DIR_INSTALL)/lib/$(XOTCL_LIB)/$(UNAME)
build/xotcl: build/tcl ../$(XOTCL_SRC)
        mkdir -p $@ && cd $@ && CFLAGS="$(CFLAGS)" && export CFLAGS &&
\
        sh ../../../$(XOTCL_SRC)/configure --enable-shared $(TCLDIR)
&& \
        $(MAKE) install-binaries install-libraries
$(DIR_INSTALL)/lib/$(XOTCL_LIB)/$(UNAME):
        mkdir -p $@ && cp -r build/lib/$(XOTCL_LIB)/* $@
        echo $(PKGINDEX1) > $@/../pkgIndex.tcl
        echo $(PKGINDEX2) >> $@/../pkgIndex.tcl
../$(XOTCL_SRC): $(DIR_SRC)/$(XOTCL_TGZ)
        cd .. && tar xzf $(DIR_SRC)/$(XOTCL_TGZ)
$(DIR_SRC)/$(XOTCL_TGZ):
        mkdir -p $(DIR_SRC)
        cd $(DIR_SRC) && wget $(XOTCL_WGET)/$(XOTCL_TGZ)

# tclkit install
install-bin: $(INSTALLDIR)/bin/$(UNAME)
$(INSTALLDIR)/bin/$(UNAME):
        mkdir -p $@ && cp tclkit-cli  tclkit-dyn  tclkit-gui $@


rene
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.