From c10b1659243a193815748a91e9f8bb7a10a9290b Mon Sep 17 00:00:00 2001
From: Wulf Krueger <philantrop@gentoo.org>
Date: Thu, 27 Sep 2007 18:47:16 +0000
Subject: cmake-2.4.7-r2 now uses the system libraries during the bootstrap
 process instead of the bundled versions. Fixes bug 178999. Furthermore, it
 features a new FindSWIG.cmake module as provided by Axel Roebel on upstream
 bug 4145. Fixes our bug 192594. (Portage version: 2.1.3.9)

---
 dev-util/cmake/files/FindSWIG.cmake        | 56 ++++++++++++++++++++++++++++++
 dev-util/cmake/files/digest-cmake-2.4.7-r2 |  3 ++
 2 files changed, 59 insertions(+)
 create mode 100644 dev-util/cmake/files/FindSWIG.cmake
 create mode 100644 dev-util/cmake/files/digest-cmake-2.4.7-r2

(limited to 'dev-util/cmake/files')

diff --git a/dev-util/cmake/files/FindSWIG.cmake b/dev-util/cmake/files/FindSWIG.cmake
new file mode 100644
index 000000000000..a3b650eb7d0c
--- /dev/null
+++ b/dev-util/cmake/files/FindSWIG.cmake
@@ -0,0 +1,56 @@
+# - Find SWIG
+# This module finds an installed SWIG.  It sets the following variables:
+#  SWIG_FOUND - set to true if SWIG is found
+#  SWIG_DIR - the directory where swig is installed
+#  SWIG_EXECUTABLE - the path to the swig executable
+#  SWIG_VERSION   - the version number of the swig executable
+#
+# All informations are collected from the SWIG_EXECUTABLE so the
+# version to be found can be changed from the command line by
+# means of setting SWIG_EXECUTABLE
+#
+
+SET(SWIG_FOUND FALSE)
+
+FIND_PROGRAM(SWIG_EXECUTABLE swig)
+
+IF(SWIG_EXECUTABLE)
+  EXECUTE_PROCESS(COMMAND ${SWIG_EXECUTABLE} -swiglib
+    OUTPUT_VARIABLE SWIG_swiglib_output
+    ERROR_VARIABLE SWIG_swiglib_error
+    RESULT_VARIABLE SWIG_swiglib_result)
+
+  IF(SWIG_swiglib_result)
+    MESSAGE(SEND_ERROR "Command \"${SWIG_EXECUTABLE} -swiglib\" failed with output:\n${SWIG_swiglib_error}")
+  ELSE(SWIG_swiglib_result)
+    STRING(REGEX REPLACE "[\n\r]+" ";" SWIG_swiglib_output ${SWIG_swiglib_output})
+    # force the path to be computed each time in case SWIG_EXECUTABLE has changed.
+    SET(SWIG_DIR SWIG_DIR-NOTFOUND)
+    FIND_PATH(SWIG_DIR swig.swg PATHS ${SWIG_swiglib_output})
+    IF(SWIG_DIR)
+      SET(SWIG_FOUND 1)
+      SET(SWIG_USE_FILE ${CMAKE_ROOT}/Modules/UseSWIG.cmake)
+      EXECUTE_PROCESS(COMMAND ${SWIG_EXECUTABLE} -version
+	OUTPUT_VARIABLE SWIG_version_output
+	ERROR_VARIABLE SWIG_version_output
+	RESULT_VARIABLE SWIG_version_result)
+      IF(SWIG_version_result)
+        MESSAGE(SEND_ERROR "Command \"${SWIG_EXECUTABLE} -version\" failed with output:\n${SWIG_version_output}")
+      ELSE(SWIG_version_result)
+        STRING(REGEX REPLACE ".*SWIG Version[^0-9.]*\([0-9.]+\).*" "\\1"
+	  SWIG_version_output "${SWIG_version_output}")
+        SET(SWIG_VERSION ${SWIG_version_output} CACHE STRING "Swig version" FORCE)
+      ENDIF(SWIG_version_result)
+    ENDIF(SWIG_DIR)
+  ENDIF(SWIG_swiglib_result)
+ENDIF(SWIG_EXECUTABLE)
+
+IF(NOT SWIG_FOUND)
+  IF(NOT SWIG_FIND_QUIETLY)
+    IF(SWIG_FIND_REQUIRED)
+      MESSAGE(FATAL_ERROR "SWIG was not found. Please specify Swig executable location")
+    ELSE(SWIG_FIND_REQUIRED)
+      MESSAGE(STATUS "SWIG was not found. Please specify Swig executable location")
+    ENDIF(SWIG_FIND_REQUIRED)
+  ENDIF(NOT SWIG_FIND_QUIETLY)
+ENDIF(NOT SWIG_FOUND)
diff --git a/dev-util/cmake/files/digest-cmake-2.4.7-r2 b/dev-util/cmake/files/digest-cmake-2.4.7-r2
new file mode 100644
index 000000000000..159cbb370c75
--- /dev/null
+++ b/dev-util/cmake/files/digest-cmake-2.4.7-r2
@@ -0,0 +1,3 @@
+MD5 4476c423b8f74266136964e42ea88028 cmake-2.4.7.tar.gz 2600960
+RMD160 7fed176c42f39c25e1d4c761436aa4d5a8a64e3a cmake-2.4.7.tar.gz 2600960
+SHA256 2fd5feb294b933ae3a0071b8c7a396797cf79dfe6b0ffeff8788e07ff4107d56 cmake-2.4.7.tar.gz 2600960
-- 
cgit v1.2.3-65-gdbad