From: <ai...@us...> - 2014-01-05 20:14:22
|
Revision: 12919 http://sourceforge.net/p/plplot/code/12919 Author: airwin Date: 2014-01-05 20:14:19 +0000 (Sun, 05 Jan 2014) Log Message: ----------- Update the epa_build configuration of tk so that it works on MinGW/MSYS. Tested by: Alan W. Irwin <ai...@us...> on MinGW/MSYS/Wine-1.6.1 for the epa_build project with -DBUILD_THE_BUILDTOOLS=ON using the build_tk target. N.B. this test shows that Tk builds without issues on MinGW/MSYS against the installed Tcl epa_build result, but the test does not include run-time testing. Modified Paths: -------------- trunk/cmake/epa_build/tk/CMakeLists.txt Modified: trunk/cmake/epa_build/tk/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/tk/CMakeLists.txt 2014-01-05 06:47:16 UTC (rev 12918) +++ trunk/cmake/epa_build/tk/CMakeLists.txt 2014-01-05 20:14:19 UTC (rev 12919) @@ -41,25 +41,35 @@ ) # Data that is related to the PATH that must be used. -# N.B. note below that we always use the unix subdirectory of the -# source tree to find the configure script. Note, there is a macosx -# and win subdirectory there as well that contain configure scripts -# with additional options for those platforms, but for now the unix -# version of configure may be good enough for our needs for all -# platforms. +# N.B. note below that we currently use the unix subdirectory for the +# Mac OS X case. There is also a Tcl macosx subdirectory we might +# want to try in that case once an epa_build user with access to a Mac +# OS X platform gives this a try. if(MSYS_PLATFORM) - set(source_PATH ${source_PATH}\\unix) + set(source_PATH ${source_PATH}/win) + set(executable_suffix .exe) + set(library_suffix .a) + # Workaround for the Tk autotools build system for Windows not + # propagating CFLAGS to windres. + set(make_args "RC=windres -I${EPA_CMAKE_INSTALL_PREFIX}/include") else(MSYS_PLATFORM) set(source_PATH ${source_PATH}/unix) + set(executable_suffix) + set(library_suffix .so) + set(make_args) endif(MSYS_PLATFORM) set(CFLAGS "$ENV{CFLAGS}") # Drop -fvisibility=hidden since that option may not work for this package. string(REGEX REPLACE "-fvisibility=hidden" "" CFLAGS "${CFLAGS}") -# Data that is related to downloads. set(TCL_TK_VERSION 8.6.1) string(REGEX REPLACE "\\.[0-9]$" "" TCL_TK_LIBVERSION ${TCL_TK_VERSION}) +if(MSYS_PLATFORM) + string(REGEX REPLACE "\\." "" TCL_TK_LIBVERSION ${TCL_TK_LIBVERSION}) +endif(MSYS_PLATFORM) + +# Data that is related to downloads. set(URL http://downloads.sourceforge.net/project/tcl/Tcl/${TCL_TK_VERSION}/tk${TCL_TK_VERSION}-src.tar.gz) set(DOWNLOAD_HASH_TYPE MD5) set(DOWNLOAD_HASH 63f21c3a0e0cefbd854b4eb29b129ac6) @@ -73,9 +83,9 @@ DEPENDS ${dependencies_targets} URL ${URL} URL_HASH ${DOWNLOAD_HASH_TYPE}=${DOWNLOAD_HASH} - CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} "CFLAGS=${CFLAGS}" CPPFLAGS=-I${EPA_CMAKE_INSTALL_PREFIX}/include ${source_PATH}/${EPA_CONFIGURE_COMMAND} --mandir=${EPA_CMAKE_INSTALL_PREFIX}/share/man ${ENABLE_64_BIT} - BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_MAKE_COMMAND} - INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_MAKE_COMMAND} install + CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} "CFLAGS=${CFLAGS} -I${EPA_CMAKE_INSTALL_PREFIX}/include" ${source_PATH}/${EPA_CONFIGURE_COMMAND} --mandir=${EPA_CMAKE_INSTALL_PREFIX}/share/man ${ENABLE_64_BIT} + BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_MAKE_COMMAND} ${make_args} + INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_MAKE_COMMAND} install ${make_args} ) add_custom_command( @@ -94,7 +104,7 @@ ${EPA_BASE}/Stamp/build_${PACKAGE}/build_${PACKAGE}-install COMMAND echo "Install-tree fixups" COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_MAKE_COMMAND} install-private-headers - COMMAND ${LN_EXECUTABLE} -v -sf wish${TCL_TK_LIBVERSION} ${EPA_CMAKE_INSTALL_PREFIX}/bin/wish - COMMAND ${CHMOD_EXECUTABLE} -v ${SO_NUMERICAL_PERMISSIONS} ${EPA_CMAKE_INSTALL_PREFIX}/lib/libtk${TCL_TK_LIBVERSION}.so + COMMAND ${LN_EXECUTABLE} -v -sf wish${TCL_TK_LIBVERSION}${executable_suffix} ${EPA_CMAKE_INSTALL_PREFIX}/bin/wish${executable_suffix} + COMMAND ${CHMOD_EXECUTABLE} -v ${SO_NUMERICAL_PERMISSIONS} ${EPA_CMAKE_INSTALL_PREFIX}/lib/libtk${TCL_TK_LIBVERSION}${library_suffix} APPEND ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |