You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by da...@apache.org on 2003/03/26 08:52:30 UTC

cvs commit: tcl-rivet/src make.tcl mod_rivet.c rivetPkgInit.c

davidw      2003/03/25 23:52:30

  Modified:    .        ChangeLog
               rivet    init.tcl
               src      make.tcl mod_rivet.c rivetPkgInit.c
  Log:
  * src/rivetPkgInit.c (Rivet_Init): Bump version number to 1.1.
  
  * src/mod_rivet.c (Rivet_InitTclStuff): Use Tcl_PkgRequire to load
    Rivet's init.tcl.
  
  * src/make.tcl: Use Tcl file location instead of Apache-based file
    location, in order to use Tcl_PkgRequire to load Rivet's init.tcl.
  
  * rivet/init.tcl: Provide 'RivetTcl' package.  (init): Use [info
    script] instead of server(RIVET_DIR) variable.
  
  Revision  Changes    Path
  1.102     +11 -0     tcl-rivet/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/ChangeLog,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- ChangeLog	26 Mar 2003 02:50:50 -0000	1.101
  +++ ChangeLog	26 Mar 2003 07:52:29 -0000	1.102
  @@ -1,5 +1,16 @@
   2003-03-25  David N. Welton  <da...@dedasys.com>
   
  +	* src/rivetPkgInit.c (Rivet_Init): Bump version number to 1.1.
  +
  +	* src/mod_rivet.c (Rivet_InitTclStuff): Use Tcl_PkgRequire to load
  +	Rivet's init.tcl.
  +
  +	* src/make.tcl: Use Tcl file location instead of Apache-based file
  +	location, in order to use Tcl_PkgRequire to load Rivet's init.tcl.
  +
  +	* rivet/init.tcl: Provide 'RivetTcl' package.
  +	(init): Use [info script] instead of server(RIVET_DIR) variable.
  +
   	* src/make.tcl: Add a debinstall target as a temporary way to
   	build .deb files.
   
  
  
  
  1.7       +5 -3      tcl-rivet/rivet/init.tcl
  
  Index: init.tcl
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/rivet/init.tcl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- init.tcl	7 Sep 2002 18:31:50 -0000	1.6
  +++ init.tcl	26 Mar 2003 07:52:29 -0000	1.7
  @@ -1,3 +1,5 @@
  +package provide RivetTcl 1.1
  +
   namespace eval ::Rivet {
   
       ###
  @@ -53,17 +55,17 @@
   	## We insert it at the head of the list because we want any of
   	## our procs named the same as Tcl's procs to be overridden.
   	## Example: parray
  -	set tclpath [file join $server(RIVET_DIR) rivet-tcl]
  +	set tclpath [file join [file dirname [info script]] rivet-tcl]
   	set auto_path [linsert $auto_path 0 $tclpath]
   
   	## Add the packages directory to the auto_path.
   	## If we have a packages$tcl_version directory
   	## (IE: packages8.3, packages8.4) append that as well.
  -	set pkgpath [file join $server(RIVET_DIR) packages]
  +	set pkgpath [file join [file dirname [info script]] packages]
   	lappend auto_path $pkgpath
   	lappend auto_path ${pkgpath}-local
   
  -	if {[file exists ${pkgpath}$::tcl_version]} {
  +	if { [file exists ${pkgpath}$::tcl_version] } {
   	    lappend auto_path ${pkgpath}$::tcl_version
   	}
   
  
  
  
  1.32      +5 -2      tcl-rivet/src/make.tcl
  
  Index: make.tcl
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/src/make.tcl,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- make.tcl	26 Mar 2003 02:50:50 -0000	1.31
  +++ make.tcl	26 Mar 2003 07:52:30 -0000	1.32
  @@ -47,7 +47,7 @@
   
   set INCLUDEDIR [exec $APXS -q INCLUDEDIR]
   set LIBEXECDIR [exec $APXS -q LIBEXECDIR]
  -set PREFIX [exec $APXS -q PREFIX]
  +set PREFIX [lindex $auto_path end]
   
   set INC "-I$INCLUDEDIR -I$TCL_PREFIX/include"
   
  @@ -199,6 +199,8 @@
   
   AddNode install {
       depends $MOD_SHLIB $LIB_SHLIB
  +    tcl file delete -force [file join $LIBEXECDIR rivet]
  +    tcl file delete -force [file join $PREFIX rivet]
       tcl file copy -force $MOD_SHLIB $LIBEXECDIR
       tcl file copy -force [file join .. rivet] $PREFIX
       tcl file copy -force $LIB_SHLIB [file join $PREFIX rivet packages rivet]
  @@ -211,6 +213,7 @@
   set DEBPREFIX [file join [pwd] .. debian tmp]
   AddNode debinstall {
       depends $MOD_SHLIB $LIB_SHLIB
  +    tcl {file delete -force [file join $DEBPREFIX/$LIBEXECDIR rivet]}
       tcl {file copy -force $MOD_SHLIB "$DEBPREFIX/$LIBEXECDIR"}
       tcl {file copy -force [file join .. rivet] "$DEBPREFIX/$PREFIX/lib"}
       tcl {file copy -force $LIB_SHLIB "$DEBPREFIX/[file join $PREFIX/lib rivet packages rivet]"}
  
  
  
  1.62      +2 -3      tcl-rivet/src/mod_rivet.c
  
  Index: mod_rivet.c
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/src/mod_rivet.c,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- mod_rivet.c	15 Mar 2003 01:24:10 -0000	1.61
  +++ mod_rivet.c	26 Mar 2003 07:52:30 -0000	1.62
  @@ -639,8 +639,7 @@
       Tcl_SetAssocData(interp, "rivet", NULL, globals);
   
       /* Eval Rivet's init.tcl file to load in the Tcl-level commands. */
  -    if( Tcl_EvalFile( interp, ap_server_root_relative(p, RIVET_INIT) )
  -	== TCL_ERROR ) {
  +    if( Tcl_PkgRequire(interp, "RivetTcl", "1.1", 1) == NULL ) {
   	ap_log_error( APLOG_MARK, APLOG_ERR, s,
   		      "init.tcl must be installed correctly for Apache Rivet to function: %s",
   		      Tcl_GetStringResult(interp) );
  
  
  
  1.2       +1 -1      tcl-rivet/src/rivetPkgInit.c
  
  Index: rivetPkgInit.c
  ===================================================================
  RCS file: /home/cvs/tcl-rivet/src/rivetPkgInit.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- rivetPkgInit.c	11 Jan 2002 06:47:48 -0000	1.1
  +++ rivetPkgInit.c	26 Mar 2003 07:52:30 -0000	1.2
  @@ -14,5 +14,5 @@
   
       Rivet_InitWWW( interp );
   
  -    return Tcl_PkgProvide( interp, "Rivet", "1.0" );
  +    return Tcl_PkgProvide( interp, "Rivet", "1.1" );
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-cvs-help@tcl.apache.org