You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2013/07/06 18:26:05 UTC
svn commit: r1500301 - in /tcl/rivet/trunk: Makefile.am Makefile.in
configure.ac src/apache-2/Makefile.am src/apache-2/mod_rivet.c
src/apache-2/rivetCore.c src/parser/parserPkgInit.c
Author: mxmanghi
Date: Sat Jul 6 16:26:05 2013
New Revision: 1500301
URL: http://svn.apache.org/r1500301
Log:
creating commands through RIVET_OBJ_CMD macro also for safe interpreters
Modified:
tcl/rivet/trunk/Makefile.am
tcl/rivet/trunk/Makefile.in
tcl/rivet/trunk/configure.ac
tcl/rivet/trunk/src/apache-2/Makefile.am
tcl/rivet/trunk/src/apache-2/mod_rivet.c
tcl/rivet/trunk/src/apache-2/rivetCore.c
tcl/rivet/trunk/src/parser/parserPkgInit.c
Modified: tcl/rivet/trunk/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/Makefile.am?rev=1500301&r1=1500300&r2=1500301&view=diff
==============================================================================
--- tcl/rivet/trunk/Makefile.am (original)
+++ tcl/rivet/trunk/Makefile.am Sat Jul 6 16:26:05 2013
@@ -14,6 +14,10 @@ SUBDIRS = src doc
RIVETLIB_DESTDIR = $(DESTDIR)@RIVET_TCL_TARGET@
RIVET_PACKAGES = $(RIVETLIB_DESTDIR)/packages
+# I expect this symbol sooner or later to be handled by configure for arch dependent builds
+# Current value is the rivetlib directory
+RIVET_LIBS_ARCH =
+
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
@@ -22,7 +26,7 @@ install-data-local:
cp -v rivet/init.tcl $(RIVETLIB_DESTDIR)/
cp -rv rivet/rivet-tcl $(RIVETLIB_DESTDIR)/
-( cd $(RIVETLIB_DESTDIR); rm -f *.la; \
- echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
+ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
uninstall-local:
rm -f $(RIVETLIB_DESTDIR)/init.tcl
@@ -38,7 +42,7 @@ install-packages:
cp -rv rivet/packages/* $(RIVET_PACKAGES)
-( cd $(RIVETLIB_DESTDIR); \
echo 'eval file delete [glob [file join packages * pkgIndex.tcl]] pkgIndex.tcl' | @TCLSH_PROG@ ; \
- echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
+ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
uninstall-packages:
rm -fr $(RIVET_PACKAGES)
@@ -47,7 +51,7 @@ uninstall-packages:
@rmdir $(RIVETLIB_DESTDIR); \
fi
-( cd $(RIVETLIB_DESTDIR); \
- echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
+ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
#
distclean-local:
Modified: tcl/rivet/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/Makefile.in?rev=1500301&r1=1500300&r2=1500301&view=diff
==============================================================================
--- tcl/rivet/trunk/Makefile.in (original)
+++ tcl/rivet/trunk/Makefile.in Sat Jul 6 16:26:05 2013
@@ -18,7 +18,7 @@
#
# top-level Makefile.am for Apache Rivet: gets turned into a Makefile.in by automake
#
-# $Id: Makefile.am 1492289 2013-06-12 17:10:34Z mxmanghi $
+# $Id: Makefile.am 1496872 2013-06-26 10:19:02Z mxmanghi $
#
# 2007/12/25: Added target uninistall-local that removes the tcl stuff (mxmanghi)
# 2010/06/22: target instal-data-local searches for pkgIndex.tcl files and deletes them
@@ -69,6 +69,8 @@ DIST_COMMON = README $(am__configure_dep
tclconfig/ltmain.sh tclconfig/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/tclconfig/tcl.m4 \
$(top_srcdir)/tclconfig/libtool.m4 \
$(top_srcdir)/m4/ax_prefix_config_h.m4 \
@@ -334,6 +336,10 @@ EXTRA_DIST = LICENSE contrib debian doc
SUBDIRS = src doc
RIVETLIB_DESTDIR = $(DESTDIR)@RIVET_TCL_TARGET@
RIVET_PACKAGES = $(RIVETLIB_DESTDIR)/packages
+
+# I expect this symbol sooner or later to be handled by configure for arch dependent builds
+# Current value is the rivetlib directory
+RIVET_LIBS_ARCH =
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -853,7 +859,8 @@ install-data-local:
$(mkinstalldirs) $(RIVETLIB_DESTDIR)
cp -v rivet/init.tcl $(RIVETLIB_DESTDIR)/
cp -rv rivet/rivet-tcl $(RIVETLIB_DESTDIR)/
- -( cd $(RIVETLIB_DESTDIR); rm -f *.la)
+ -( cd $(RIVETLIB_DESTDIR); rm -f *.la; \
+ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
uninstall-local:
rm -f $(RIVETLIB_DESTDIR)/init.tcl
@@ -869,7 +876,7 @@ install-packages:
cp -rv rivet/packages/* $(RIVET_PACKAGES)
-( cd $(RIVETLIB_DESTDIR); \
echo 'eval file delete [glob [file join packages * pkgIndex.tcl]] pkgIndex.tcl' | @TCLSH_PROG@ ; \
- echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join *[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
+ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
uninstall-packages:
rm -fr $(RIVET_PACKAGES)
@@ -877,6 +884,8 @@ uninstall-packages:
@if [ -z '$(wildcard $(RIVETLIB_DESTDIR)/*)' ]; then \
@rmdir $(RIVETLIB_DESTDIR); \
fi
+ -( cd $(RIVETLIB_DESTDIR); \
+ echo 'eval pkg_mkIndex -verbose [pwd] init.tcl [glob [file join packages * *.tcl] [file join $(RIVET_LIBS_ARCH)*[info sharedlibextension]]]' | @TCLSH_PROG@ ; )
#
distclean-local:
Modified: tcl/rivet/trunk/configure.ac
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/configure.ac?rev=1500301&r1=1500300&r2=1500301&view=diff
==============================================================================
--- tcl/rivet/trunk/configure.ac (original)
+++ tcl/rivet/trunk/configure.ac Sat Jul 6 16:26:05 2013
@@ -245,7 +245,7 @@ AC_DEFUN([APACHE],[
AC_ARG_WITH(
apache,
[ --with-apache[=DIR] Apache server base directory],
- , [with_apache="/usr/local/apache"]
+ , [with_apache="/usr/local/apache2"]
)
apache_base="${with_apache}"
AC_MSG_RESULT([$apache_base])
@@ -370,9 +370,9 @@ AC_DEFUN([APR_HANDLING],[
# 6-Dec-2011: Introducing new ::rivet namespace. Some components
# (namely RivetTcl, providing Tcl level initialization) are required
# within mod_rivet.c. Unfortunalely Tcl < 8.5.10 loaded shared
-# libs exporting names that clashed with Apache's own namespace and,
+# libs exporting names that clashed with Apache own namespace and,
# hence we have to make sure we are running a Tcl compatible version.
-# (See bug #3216070). If you're running Tcl < 8.5.10 we won't go any
+# (See Tcl bug #3216070). If you're running Tcl < 8.5.10 we won't go any
# further ahead...
AX_COMPARE_VERSION([$TCL_VERSION$TCL_PATCH_LEVEL],[lt],[8.5.10],[
Modified: tcl/rivet/trunk/src/apache-2/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/apache-2/Makefile.am?rev=1500301&r1=1500300&r2=1500301&view=diff
==============================================================================
--- tcl/rivet/trunk/src/apache-2/Makefile.am (original)
+++ tcl/rivet/trunk/src/apache-2/Makefile.am Sat Jul 6 16:26:05 2013
@@ -38,13 +38,13 @@ mod_rivet_la_SOURCES = \
TclWebapache.c \
rivetCore.c \
rivetConf.c \
- ../rivetChannel.c \
- ../parser/rivetParser.c
+ ../rivetChannel.c
+# ../parser/rivetParser.c
##mod_rivet_la_SOURCES = mod_rivet.c mod_rivet.h
-mod_rivet_la_LDFLAGS = @TCL_LIB_SPEC@ @APXS_LDFLAGS@ @APR_LDFLAGS@ -module -avoid-version
-mod_rivet_la_LIBADD = @TCL_LIBS@ @APXS_LIBS@
+mod_rivet_la_LDFLAGS = @TCL_LIB_SPEC@ @APXS_LDFLAGS@ @APR_LDFLAGS@ -module -avoid-version -L/usr/local/apache2/lib/rivet2.1
+mod_rivet_la_LIBADD = @TCL_LIBS@ @APXS_LIBS@ -lrivetparser
mod_rivet_la_CPPFLAGS = @TCL_INCLUDES@ @APXS_CPPFLAGS@ @APXS_INCLUDES@ @APR_CPPFLAGS@ @APR_INCLUDES@ -DSTART_TAG='"<?"' -DEND_TAG='"?>"'
# APXS_CPPFLAGS_SHLIB
Modified: tcl/rivet/trunk/src/apache-2/mod_rivet.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/apache-2/mod_rivet.c?rev=1500301&r1=1500300&r2=1500301&view=diff
==============================================================================
--- tcl/rivet/trunk/src/apache-2/mod_rivet.c (original)
+++ tcl/rivet/trunk/src/apache-2/mod_rivet.c Sat Jul 6 16:26:05 2013
@@ -563,7 +563,6 @@ Rivet_ParseExecString (TclWebRequest* re
return res;
}
-
static void
Rivet_CleanupRequest( request_rec *r )
{
@@ -915,6 +914,13 @@ Rivet_PerInterpInit(server_rec *s, rivet
Rivet_InitServerVariables(interp, p );
// Rivet_PropagateServerConfArray( interp, rsc );
+ if (Tcl_PkgRequire(interp, "rivetparser","0.2", 1) == NULL)
+ {
+ ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
+ MODNAME ": Error loading package rivetparser: %s",
+ Tcl_GetStringResult(interp) );
+ exit(1);
+ }
/* Loading into the interpreter the commands provided by librivet.so */
/* Tcl Bug #3216070 has been solved with 8.5.10 and commands shipped with
Modified: tcl/rivet/trunk/src/apache-2/rivetCore.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/apache-2/rivetCore.c?rev=1500301&r1=1500300&r2=1500301&view=diff
==============================================================================
--- tcl/rivet/trunk/src/apache-2/rivetCore.c (original)
+++ tcl/rivet/trunk/src/apache-2/rivetCore.c Sat Jul 6 16:26:05 2013
@@ -232,7 +232,6 @@ TCL_CMD_HEADER( Rivet_Parse_String )
/*
*-----------------------------------------------------------------------------
- *
* Rivet_Include --
*
* Includes a file literally in the output stream. Useful for
Modified: tcl/rivet/trunk/src/parser/parserPkgInit.c
URL: http://svn.apache.org/viewvc/tcl/rivet/trunk/src/parser/parserPkgInit.c?rev=1500301&r1=1500300&r2=1500301&view=diff
==============================================================================
--- tcl/rivet/trunk/src/parser/parserPkgInit.c (original)
+++ tcl/rivet/trunk/src/parser/parserPkgInit.c Sat Jul 6 16:26:05 2013
@@ -118,9 +118,9 @@ EXTERN int
Rivetparser_Init( Tcl_Interp *interp )
{
#ifdef USE_TCL_STUBS
- if (Tcl_InitStubs(interp, "8.5", 0) == NULL)
+ if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL)
#else
- if (Tcl_PkgRequire(interp, "Tcl", "8.5", 0) == NULL)
+ if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 0) == NULL)
#endif
{
return TCL_ERROR;
@@ -146,18 +146,22 @@ Rivetparser_SafeInit( Tcl_Interp *interp
*/
#ifdef USE_TCL_STUBS
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL)
#else
- if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 0) == NULL) {
-#endif
+ if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 0) == NULL)
+#endif
+ {
return TCL_ERROR;
}
+/*
Tcl_CreateObjCommand(interp,
"rivet::parserivetdata",
Parse_RivetData,
NULL,
(Tcl_CmdDeleteProc *)NULL);
+*/
+ RIVET_OBJ_CMD("parserivetdata",Parse_RivetData);
return Tcl_PkgProvide( interp, "rivetparser", "0.2" );
}
---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org