Re: [Plplot-devel] Tcl 8.5 (and more)

2007-02-12 Thread Orion Poplawski

Maurice LeBrun wrote:

Orion Poplawski writes:
  Could the Tcl interface folks take a look at trying to compile plplot 
  against Tcl 8.5?  It's been put into Fedore Development and plplot 
  compile fails with:

  ..

I may be able to look into it over the weekend.  If someone beats me to it, I
won't complain tho. :)



Here's what I've got so far, plus a couple extra patches.

plplot-5.7.2-tcl85.patch:

TclFormatInt is now a macro, this should be backwards compatible. 
Tcl_Import and Tcl_GetGlobalNamespace now appear to be public, this will 
really need to be wrapped with a Tcl version check or


#ifndef Tcl_Import_TCL_DECLARED
#define Tcl_Import_TCL_DECLARED
EXTERN int   Tcl_Import _ANSI_ARGS_((Tcl_Interp * interp,
Tcl_Namespace * nsPtr, CONST char * 
pattern,

int allowOverwrite));
#endif

which is how it is done in tclDecls.h in 8.5.

plplot-5.7.2-itcl.patch:

itcl/itk are in /usr/lib/itclversion/ and /usr/lib/itkversion in Fedora.

plplot-5.7.2-sitearch.patch:

The python stuff should be installed in an arch specific directory.

plplot-5.7.2-multilib.patch:

Fixes up some multilib issues in Fedora.  I don't think either variable 
is needed with a properly installed pkg-config.



Compiles now but the tcl tests don't pass yet.

--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA DivisionFAX: 303-415-9702
3380 Mitchell Lane  [EMAIL PROTECTED]
Boulder, CO 80301  http://www.cora.nwra.com
--- plplot-5.7.2/cmake/modules/python.cmake.sitelib	2007-01-21 17:46:02.0 -0700
+++ plplot-5.7.2/cmake/modules/python.cmake	2007-02-12 11:17:32.0 -0700
@@ -82,7 +82,7 @@
   set(
   PYTHON_ARG_STRING
   -c \from distutils import sysconfig\;
-  print sysconfig.get_python_lib(0,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}')\
+  print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}')\
   )
   exec_program(
   ${PYTHON_EXECUTABLE}
--- plplot-5.7.2/examples/tk/Makefile.examples.in.multilib	2007-01-21 17:46:03.0 -0700
+++ plplot-5.7.2/examples/tk/Makefile.examples.in	2007-02-12 14:01:06.0 -0700
@@ -24,8 +24,6 @@
 EXEEXT = @EXEEXT@
 
 @[EMAIL PROTECTED] = @LIB_TAG@
[EMAIL PROTECTED]@PKG_CONFIG_ENV = @PKG_CONFIG_ENV@
[EMAIL PROTECTED]@RPATHCMD = @RPATHCMD@
 
 EXECUTABLES_list = \
 		 xtk01$(EXEEXT) \
@@ -38,7 +36,7 @@
 	rm -f $(EXECUTABLES_list)
 
 .c$(EXEEXT):
[EMAIL PROTECTED]@	$(CC) $ -o $@ $(RPATHCMD) `$(PKG_CONFIG_ENV) pkg-config --cflags --libs plplot$(LIB_TAG)-tcl`
[EMAIL PROTECTED]@	$(CC) $ -o $@ `pkg-config --cflags --libs plplot$(LIB_TAG)-tcl`
 @pkg_config_false@	$(CC) $ -o $@ `plplot-config --cflags --libs --with-tcl`
 
 .SUFFIXES: .c $(EXEEXT)
--- plplot-5.7.2/cmake/modules/tcl-related.cmake.itcl	2007-01-21 17:46:02.0 -0700
+++ plplot-5.7.2/cmake/modules/tcl-related.cmake	2007-02-12 17:12:14.0 -0700
@@ -78,7 +78,8 @@
 message(STATUS Looking for itcl library)
 set(itcl_library_versions 3.3 3.2 3.1 3.0 2.1 2.0)
 foreach(version ${itcl_library_versions})
-  find_library(ITCL_LIBRARY itcl${version} ${TCL_LIBRARY})
+  find_library(ITCL_LIBRARY itcl${version} ${TCL_LIBRARY}
+   PATH_SUFFIXES itcl${version})
 endforeach(version ${itcl_library_versions})
 if(ITCL_LIBRARY)
   message(STATUS Looking for itcl library - found)
@@ -138,7 +139,8 @@
 message(STATUS Looking for itk library)
 set(itk_library_versions 3.3 3.2 3.1 3.0 2.1 2.0)
 foreach(version ${itk_library_versions})
-  find_library(ITK_LIBRARY itk${version} ${TK_LIBRARY})
+  find_library(ITK_LIBRARY itk${version} ${TK_LIBRARY}
+   PATH_SUFFIXES itk${version})
 endforeach(version ${itk_library_versions})
 if(ITK_LIBRARY)
   message(STATUS Looking for itk library - found)
--- plplot-5.7.2/bindings/tk/tkMain.c.tcl85	2007-01-21 17:46:01.0 -0700
+++ plplot-5.7.2/bindings/tk/tkMain.c	2007-02-12 16:48:05.0 -0700
@@ -83,15 +83,6 @@
 
 EXTERN int		Itk_Init _ANSI_ARGS_((Tcl_Interp * interp));
 
-/* From tclIntDecls.h */
-
-EXTERN int		Tcl_Import _ANSI_ARGS_((Tcl_Interp * interp,
-Tcl_Namespace * nsPtr, char * pattern,
-int allowOverwrite));
-
-EXTERN Tcl_Namespace *	Tcl_GetGlobalNamespace _ANSI_ARGS_((
-Tcl_Interp * interp));
-
 /*
  * Declarations for various library procedures and variables (don't want
  * to include tkInt.h or tkConfig.h here, because people might copy this
--- plplot-5.7.2/bindings/tcl/tclMain.c.tcl85	2007-01-21 17:46:01.0 -0700
+++ plplot-5.7.2/bindings/tcl/tclMain.c	2007-02-12 17:19:23.0 -0700
@@ -55,7 +55,7 @@
 
 /* From tclIntDecls.h */
 
-EXTERN int		TclFormatInt _ANSI_ARGS_((char * buffer, long n));
+#define TclFormatInt(buf, n)sprintf((buf), %ld, (long)(n))
 EXTERN int		TclObjCommandComplete _ANSI_ARGS_((Tcl_Obj * 

[Plplot-devel] Orion's latest non-Tcl/Tk patches

2007-02-12 Thread Alan W. Irwin
Hi Orion:

New subject since this subset of your patches have nothing to do with Tcl/Tk
The discussion of your remaining (i.e., Tcl/Tk) patches should continue in
the original thread.

On 2007-02-12 17:28-0700 Orion Poplawski wrote:

 [...] plus a couple extra patches.

 plplot-5.7.2-sitearch.patch:

 The python stuff should be installed in an arch specific directory.

Done.  Thanks for spotting this.


 plplot-5.7.2-multilib.patch:

 Fixes up some multilib issues in Fedora.  I don't think either variable is 
 needed with a properly installed pkg-config.

No action (as yet).

Both PKG_CONFIG_ENV and RPATHCMD are essential for non-standard install
locations for PLplot (which we have supported forever, and which I use all
the time).  They should not interfere with anything you do on Fedora.  If
they do interfere, let me know details, and we can work something out to
deal with both the usual non-standard install location needs and your Fedora
needs.

Note, if you don't want to see any rpath imposed at all for the installed
example builds, then use -DUSE_RPATH=OFF.

Alan
_
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Tcl 8.5 (and more)

2007-02-12 Thread Alan W. Irwin
On 2007-02-12 17:28-0700 Orion Poplawski wrote:

 Maurice LeBrun wrote:
 Orion Poplawski writes:
   Could the Tcl interface folks take a look at trying to compile plplot 
  against Tcl 8.5?  It's been put into Fedore Development and plplot   
 compile fails with:
   ..
 
 I may be able to look into it over the weekend.  If someone beats me to 
 it, I
 won't complain tho. :)
 

 Here's what I've got so far [...]

 plplot-5.7.2-itcl.patch:

 itcl/itk are in /usr/lib/itclversion/ and /usr/lib/itkversion in Fedora.

Applied.  I just learned something new about CMake.  If you specify
PATH_SUFFIXES it also searches the non-suffixed directory (which is
necessary for my two platforms).  I just tested this on my Debian stable
platform to make sure.

So Maurice, that just leaves Orion's plplot-5.7.2-tcl85.patch for you to
evaluate.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel


Re: [Plplot-devel] Tcl 8.5 (and more)

2007-02-12 Thread orion
 Maurice LeBrun wrote:
 Orion Poplawski writes:
   Could the Tcl interface folks take a look at trying to compile plplot
   against Tcl 8.5?  It's been put into Fedore Development and plplot
   compile fails with:
   ..

 I may be able to look into it over the weekend.  If someone beats me to
 it, I
 won't complain tho. :)


 Here's what I've got so far, plus a couple extra patches.

 plplot-5.7.2-tcl85.patch:

 TclFormatInt is now a macro, this should be backwards compatible.
 Tcl_Import and Tcl_GetGlobalNamespace now appear to be public, this will
 really need to be wrapped with a Tcl version check or

 #ifndef Tcl_Import_TCL_DECLARED
 #define Tcl_Import_TCL_DECLARED
 EXTERN int   Tcl_Import _ANSI_ARGS_((Tcl_Interp * interp,
  Tcl_Namespace * nsPtr, CONST char *
 pattern,
  int allowOverwrite));
 #endif

 which is how it is done in tclDecls.h in 8.5.

The compiled pltcl gives the following error at startup:

$ ../utils/pltcl
Error Tcl_Init
application-specific initialization failed: too many nested evaluations
(infinite loop?)

so something isn't right.  Not surprising given that I know nothing about
the Tcl interface.

- Orion


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel