Revision: 12920
http://sourceforge.net/p/plplot/code/12920
Author: airwin
Date: 2014-01-05 23:04:10 +0000 (Sun, 05 Jan 2014)
Log Message:
-----------
Update epa_build configuration of itcl3 so that it works on MinGW/MSYS.
Modified Paths:
--------------
trunk/cmake/epa_build/itcl3/CMakeLists.txt
Modified: trunk/cmake/epa_build/itcl3/CMakeLists.txt
===================================================================
--- trunk/cmake/epa_build/itcl3/CMakeLists.txt 2014-01-05 20:14:19 UTC (rev 12919)
+++ trunk/cmake/epa_build/itcl3/CMakeLists.txt 2014-01-05 23:04:10 UTC (rev 12920)
@@ -41,6 +41,14 @@
source_PATH
)
+if(MSYS_PLATFORM)
+ set(library_prefix)
+ set(library_suffix .dll)
+else(MSYS_PLATFORM)
+ set(library_prefix lib)
+ set(library_suffix .so)
+endif(MSYS_PLATFORM)
+
set(CFLAGS "$ENV{CFLAGS}")
# Drop -fvisibility=hidden since that option does not for itcl3.
string(REGEX REPLACE "-fvisibility=hidden" "" CFLAGS "${CFLAGS}")
@@ -51,9 +59,15 @@
# But currently just use the ordinary install location.
set(INCRTCL3_PREFIX ${EPA_CMAKE_INSTALL_PREFIX})
+set(VERSION 3.4.1)
+string(REGEX REPLACE "\\.[0-9]$" "" DIRVERSION ${VERSION})
+if(MSYS_PLATFORM)
+ string(REGEX REPLACE "\\." "" LIBVERSION ${DIRVERSION})
+else(MSYS_PLATFORM)
+ set(LIBVERSION ${DIRVERSION})
+endif(MSYS_PLATFORM)
+
# Data that is related to downloads.
-set(VERSION 3.4.1)
-set(LIBVERSION 3.4)
set(URL http://downloads.sourceforge.net/project/incrtcl/%5bIncr%20Tcl_Tk%5d-source/${VERSION}/itcl${VERSION}.tar.gz)
set(DOWNLOAD_HASH_TYPE MD5)
set(DOWNLOAD_HASH e7c98e0f69df1a675073ddd3344f0b7f)
@@ -67,7 +81,7 @@
DEPENDS ${dependencies_targets}
URL ${URL}
URL_HASH ${DOWNLOAD_HASH_TYPE}=${DOWNLOAD_HASH}
- CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} "CFLAGS=${CFLAGS}" ${source_PATH}/configure --prefix=${INCRTCL3_PREFIX} --exec-prefix=${INCRTCL3_PREFIX} --includedir=${INCRTCL3_PREFIX}/include/itcl${LIBVERSION} --mandir=${INCRTCL3_PREFIX}/share/man ${ENABLE_64_BIT} --with-tcl=${EPA_CMAKE_INSTALL_PREFIX}/lib --with-tclinclude=${EPA_CMAKE_INSTALL_PREFIX}/include
+ CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} "CFLAGS=${CFLAGS}" ${source_PATH}/configure --prefix=${INCRTCL3_PREFIX} --exec-prefix=${INCRTCL3_PREFIX} --includedir=${INCRTCL3_PREFIX}/include/itcl${DIRVERSION} --mandir=${INCRTCL3_PREFIX}/share/man ${ENABLE_64_BIT} --with-tcl=${EPA_CMAKE_INSTALL_PREFIX}/lib --with-tclinclude=${EPA_CMAKE_INSTALL_PREFIX}/include
BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_MAKE_COMMAND}
INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_MAKE_COMMAND} install
)
@@ -78,11 +92,11 @@
COMMAND echo "Replace build-tree locations by install-tree locations"
COMMAND ${SED_EXECUTABLE}
# Cover two different patterns of uppercasing.
- -e "s@^\\(itcl_SRC_DIR='\\).*@\\1${INCRTCL3_PREFIX}/include/itcl${LIBVERSION}'@"
- -e "s@^\\(ITCL_SRC_DIR='\\).*@\\1${INCRTCL3_PREFIX}/include/itcl${LIBVERSION}'@"
+ -e "s@^\\(itcl_SRC_DIR='\\).*@\\1${INCRTCL3_PREFIX}/include/itcl${DIRVERSION}'@"
+ -e "s@^\\(ITCL_SRC_DIR='\\).*@\\1${INCRTCL3_PREFIX}/include/itcl${DIRVERSION}'@"
# Cover two different patterns of uppercasing.
- -e "/itcl_B/s@='\\(-L\\)\\?.*build_itcl3@='\\1${INCRTCL3_PREFIX}/lib/itcl${LIBVERSION}@"
- -e "/ITCL_B/s@='\\(-L\\)\\?.*build_itcl3@='\\1${INCRTCL3_PREFIX}/lib/itcl${LIBVERSION}@"
+ -e "/itcl_B/s@='\\(-L\\)\\?.*build_itcl3@='\\1${INCRTCL3_PREFIX}/lib/itcl${DIRVERSION}@"
+ -e "/ITCL_B/s@='\\(-L\\)\\?.*build_itcl3@='\\1${INCRTCL3_PREFIX}/lib/itcl${DIRVERSION}@"
# Overwrite original file.
-i itclConfig.sh
APPEND
@@ -92,7 +106,7 @@
OUTPUT
${EPA_BASE}/Stamp/build_${PACKAGE}/build_${PACKAGE}-install
COMMAND ${CMAKE_COMMAND} -E echo "Install-tree fixups"
- COMMAND ${CHMOD_EXECUTABLE} -v ${SO_NUMERICAL_PERMISSIONS} ${INCRTCL3_PREFIX}/lib/itcl${LIBVERSION}/libitcl${LIBVERSION}.so
- COMMAND ${CMAKE_COMMAND} -E rename ${INCRTCL3_PREFIX}/lib/itclConfig.sh ${INCRTCL3_PREFIX}/lib/itcl${LIBVERSION}/itclConfig.sh
+ COMMAND ${CHMOD_EXECUTABLE} -v ${SO_NUMERICAL_PERMISSIONS} ${INCRTCL3_PREFIX}/lib/itcl${DIRVERSION}/${library_prefix}itcl${LIBVERSION}${library_suffix}
+ COMMAND ${CMAKE_COMMAND} -E rename ${INCRTCL3_PREFIX}/lib/itclConfig.sh ${INCRTCL3_PREFIX}/lib/itcl${DIRVERSION}/itclConfig.sh
APPEND
)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|