summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/plplot/files/plplot-5.9.10-tcltk.patch')
-rw-r--r--sci-libs/plplot/files/plplot-5.9.10-tcltk.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/sci-libs/plplot/files/plplot-5.9.10-tcltk.patch b/sci-libs/plplot/files/plplot-5.9.10-tcltk.patch
new file mode 100644
index 000000000000..94271604c76e
--- /dev/null
+++ b/sci-libs/plplot/files/plplot-5.9.10-tcltk.patch
@@ -0,0 +1,80 @@
+Allow itcl and itk 4.0.0, applied upstream in trunk
+bicatali nov 2013
+
+--- cmake/modules/tcl-related.cmake.orig 2013-11-05 11:31:42.436587456 -0800
++++ cmake/modules/tcl-related.cmake 2013-11-05 11:31:54.411661141 -0800
+@@ -85,16 +85,16 @@
+ OUTPUT_VARIABLE AVAILABLE_ITCL)
+ if(AVAILABLE_ITCL)
+ execute_process(
+- COMMAND ${TCL_TCLSH} GetITCL_Version.tcl
+- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/modules
+- OUTPUT_VARIABLE itcl_library_versions)
++ COMMAND ${TCL_TCLSH} GetITCL_Version.tcl
++ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/modules
++ OUTPUT_VARIABLE itcl_library_versions)
+ message(STATUS "Looking for itcl.h")
+ find_path(ITCL_INCLUDE_PATH itcl.h ${TCL_INCLUDE_PATH})
+ if(ITCL_INCLUDE_PATH)
+ message(STATUS "Looking for itcl.h - found")
+ message(STATUS "Looking for itcl library")
+- get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH)
+- set(itcl_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
++ get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH)
++ set(itcl_library_versions 4.0.0 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
+ foreach(version ${itcl_library_versions})
+ find_library(ITCL_LIBRARY itcl${version} PATHS ${TCL_LIBRARY_PATH}
+ PATH_SUFFIXES itcl${version})
+@@ -132,13 +132,21 @@
+ else(ENABLE_itcl)
+ set(MKTCLINDEX_ARGS "-tcl")
+ endif(ENABLE_itcl)
++
+ if(ENABLE_tk AND NOT X11_FOUND)
+ message(STATUS "WARNING: X11 not found, disabling Tk interface code")
+ set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE)
+ endif(ENABLE_tk AND NOT X11_FOUND)
+ if(ENABLE_tk)
++ get_filename_component(TK_LIBRARY_PATH ${TK_LIBRARY} PATH)
++ if(NOT ${TK_LIBRARY_PATH} STREQUAL ${TCL_LIBRARY_PATH})
++ message(STATUS "TCL_LIBRARY_PATH = ${TCL_LIBRARY_PATH}")
++ message(STATUS "TK_LIBRARY_PATH = ${TK_LIBRARY_PATH}")
++ message(STATUS "WARNING: the Tcl and Tk library locations are inconsistent so those libraries are likely not compatible")
++ endif(NOT ${TK_LIBRARY_PATH} STREQUAL ${TCL_LIBRARY_PATH})
++ endif(ENABLE_tk)
++ if(ENABLE_tk)
+ set(TK_INCLUDE_PATH ${TK_INCLUDE_PATH} ${X11_INCLUDE_DIR})
+- set(TK_LIBRARY ${TK_LIBRARY})
+ message(STATUS "TK_INCLUDE_PATH = ${TK_INCLUDE_PATH}")
+ message(STATUS "TK_LIBRARY = ${TK_LIBRARY}")
+ else(ENABLE_tk)
+@@ -153,9 +161,9 @@
+ if(ITK_INCLUDE_PATH)
+ message(STATUS "Looking for itk.h - found")
+ message(STATUS "Looking for itk library")
+- set(itk_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
++ set(itk_library_versions 4.0.0 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
+ foreach(version ${itk_library_versions})
+- find_library(ITK_LIBRARY itk${version}
++ find_library(ITK_LIBRARY itk${version} PATHS ${TCL_LIBRARY_PATH}
+ PATH_SUFFIXES itk${version})
+ endforeach(version ${itk_library_versions})
+ if(ITK_LIBRARY)
+--- bindings/tk/tkMain.c.orig 2013-11-05 11:34:29.219602234 -0800
++++ bindings/tk/tkMain.c 2013-11-05 11:34:48.394718925 -0800
+@@ -1,4 +1,4 @@
+-// $Id: plplot-5.9.10-tcltk.patch,v 1.1 2013/11/05 23:56:14 bicatali Exp $
++// $Id: plplot-5.9.10-tcltk.patch,v 1.1 2013/11/05 23:56:14 bicatali Exp $
+ //
+ // Modified version of tkMain.c, from Tk 3.6.
+ // Maurice LeBrun
+@@ -85,7 +85,8 @@
+
+ // From tclIntDecls.h
+
+-#ifndef Tcl_Import_TCL_DECLARED
++//#ifndef Tcl_Import_TCL_DECLARED
++#if 0
+ EXTERN int Tcl_Import _ANSI_ARGS_( ( Tcl_Interp * interp,
+ Tcl_Namespace * nsPtr, char * pattern,
+ int allowOverwrite ) );