diff --git a/ports/tcl/CONTROL b/ports/tcl/CONTROL index 2c89905e8..f9aa4762a 100644 --- a/ports/tcl/CONTROL +++ b/ports/tcl/CONTROL @@ -1,4 +1,16 @@ Source: tcl -Version: 8.6.5 +Version: 8.6.10-2 Homepage: https://github.com/tcltk/tcl Description: Tcl provides a powerful platform for creating integration applications that tie together diverse applications, protocols, devices, and frameworks. When paired with the Tk toolkit, Tcl provides the fastest and most powerful way to create GUI applications that run on PCs, Unix, and Mac OS X. Tcl can also be used for a variety of web-related tasks and for creating powerful command languages for applications. + +Feature: thrdalloc +Description: Use the thread allocator (shared global free pool). + +Feature: profile +Description: Adds profiling hooks. Map file is assumed. + +Feature: unchecked +Description: Allows a symbols build to not use the debug enabled runtime (msvcrt.dll not msvcrtd.dll or libcmt.lib not libcmtd.lib). + +Feature: utfmax +Description: Forces Tcl_UniChar to be a 32-bit quantity in stead of 16-bits \ No newline at end of file diff --git a/ports/tcl/portfile.cmake b/ports/tcl/portfile.cmake index b761517b9..834d7dee0 100644 --- a/ports/tcl/portfile.cmake +++ b/ports/tcl/portfile.cmake @@ -1,85 +1,109 @@ -include(vcpkg_common_functions) -# the working 9.0 alpha release has fixes to their nmake script that are needed, 8.6.9 has issues with configuration vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tcltk/tcl - REF fb28af5fa6c4ffcd2d176c5617e5640acbfb8114 - SHA512 f58a0039eb6d48dc711675e5052e18c6a90e377afe02922ab3ba0cbd6655c85d01ae2d954698c6563d45672f700c97cddf1d165ca8bb6064e5aaf8c31c76856f) - -if(VCPKG_TARGET_IS_WINDOWS) - find_program(NMAKE nmake REQUIRED) + REF 2abfa2c03ddc0419e6525f86c2c0323b2ba1932e + SHA512 d9bc83c389cf3b95ab64b75c57eb9a2b23b957503d2dadc2d3f6854e9e784d87d9b2059a82f35accb419693bfe675b523c4751af91efac700644e118ff689fd7) +if (VCPKG_TARGET_IS_WINDOWS) if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64") - set(MACHINE_STR AMD64) + set(TCL_BUILD_MACHINE_STR MACHINE=AMD64) else() - set(MACHINE_STR IX86) + set(TCL_BUILD_MACHINE_STR MACHINE=IX86) endif() - - if(VCPKG_LIBRARY_LINKAGE MATCHES "static") - set(STATIC_OPT ",static") + + # Handle features + set(TCL_BUILD_OPTS OPTS=pdbs) + set(TCL_BUILD_STATS STATS=none) + set(TCL_BUILD_CHECKS CHECKS=none) + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},static,staticpkg) endif() - - message(STATUS "Building ${TARGET_TRIPLET}-release") - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc release OPTS=${STATIC_OPT} MACHINE=${MACHINE_STR} - WORKING_DIRECTORY ${SOURCE_PATH}/win - LOGNAME build-${TARGET_TRIPLET}-release + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},msvcrt) + endif() + + if ("thrdalloc" IN_LIST FEATURES) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},thrdalloc) + endif() + if ("profile" IN_LIST FEATURES) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},profile) + endif() + if ("unchecked" IN_LIST FEATURES) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},unchecked) + endif() + if ("utfmax" IN_LIST FEATURES) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},time64bit) + endif() + + vcpkg_install_nmake( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH win + OPTIONS + ${TCL_BUILD_MACHINE_STR} + ${TCL_BUILD_STATS} + ${TCL_BUILD_CHECKS} + OPTIONS_DEBUG + ${TCL_BUILD_OPTS},symbols + INSTALLDIR=${CURRENT_PACKAGES_DIR}/debug + SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/tools/tcl/debug/lib/tcl9.0 + OPTIONS_RELEASE + ${TCL_BUILD_OPTS} + release + INSTALLDIR=${CURRENT_PACKAGES_DIR} + SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/tools/tcl/lib/tcl9.0 ) - message(STATUS "Building ${TARGET_TRIPLET}-release done") - message(STATUS "Building ${TARGET_TRIPLET}-debug") - - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc release OPTS=symbols${STATIC_OPT} MACHINE=${MACHINE_STR} - WORKING_DIRECTORY ${SOURCE_PATH}/win - LOGNAME build-${TARGET_TRIPLET}-debug - ) - message(STATUS "Building ${TARGET_TRIPLET}-debug done") - - message(STATUS "Installing ${TARGET_TRIPLET}-debug") - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc install INSTALLDIR=${CURRENT_PACKAGES_DIR}\\debug OPTS=symbols${STATIC_OPT} SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}\\tools\\tcl\\debug\\lib\\tcl9.0 - WORKING_DIRECTORY ${SOURCE_PATH}/win - LOGNAME install-${TARGET_TRIPLET}-debug - ) - + # Install + if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL release) + file(GLOB_RECURSE TOOLS + ${CURRENT_PACKAGES_DIR}/lib/dde1.4/* + ${CURRENT_PACKAGES_DIR}/lib/nmake/* + ${CURRENT_PACKAGES_DIR}/lib/reg1.3/* + ${CURRENT_PACKAGES_DIR}/lib/tcl8/* + ${CURRENT_PACKAGES_DIR}/lib/tcl8.6/* + ${CURRENT_PACKAGES_DIR}/lib/tdbcsqlite31.1.0/* + ) + + foreach(TOOL ${TOOLS}) + get_filename_component(DST_DIR ${TOOL} PATH) + file(COPY ${TOOL} DESTINATION ${DST_DIR}) + endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/dde1.4 + ${CURRENT_PACKAGES_DIR}/lib/nmake + ${CURRENT_PACKAGES_DIR}/lib/reg1.3 + ${CURRENT_PACKAGES_DIR}/lib/tcl8 + ${CURRENT_PACKAGES_DIR}/lib/tcl8.6 + ${CURRENT_PACKAGES_DIR}/lib/tdbcsqlite31.1.0 + ) + endif() + if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL debug) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/dde1.4 + ${CURRENT_PACKAGES_DIR}/debug/lib/nmake + ${CURRENT_PACKAGES_DIR}/debug/lib/reg1.3 + ${CURRENT_PACKAGES_DIR}/debug/lib/tcl8 + ${CURRENT_PACKAGES_DIR}/debug/lib/tcl8.6 + ${CURRENT_PACKAGES_DIR}/debug/lib/tdbcsqlite31.1.0 + ) + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - if(VCPKG_LIBRARY_LINKAGE MATCHES "dynamic") - file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/dde1.4 DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/debug/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/dde1.4) - file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/reg1.3 DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/debug/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/reg1.3) - file(COPY ${CURRENT_PACKAGES_DIR}/debug/bin/tcl90g.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/debug) - file(COPY ${CURRENT_PACKAGES_DIR}/debug/bin/tclsh90g.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/tclsh90g.exe) - else() - file(COPY ${CURRENT_PACKAGES_DIR}/debug/bin/tclsh90sg.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/debug/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - endif() - - message(STATUS "Installing ${TARGET_TRIPLET}-debug done") - - message(STATUS "Installing ${TARGET_TRIPLET}-release") - vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc install INSTALLDIR=${CURRENT_PACKAGES_DIR} OPTS=${STATIC_OPT} SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}\\tools\\tcl\\lib\\tcl9.0 - WORKING_DIRECTORY ${SOURCE_PATH}/win - LOGNAME install-${TARGET_TRIPLET}-release - ) - - if(VCPKG_LIBRARY_LINKAGE MATCHES "dynamic") - file(COPY ${CURRENT_PACKAGES_DIR}/lib/dde1.4 DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/dde1.4) - file(COPY ${CURRENT_PACKAGES_DIR}/lib/reg1.3 DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/reg1.3) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/tclsh90.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/bin) - else() - file(COPY ${CURRENT_PACKAGES_DIR}/bin/tclsh90s.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - endif() - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/tcl/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/tclsh90.exe) - message(STATUS "Installing ${TARGET_TRIPLET}-release done") - - file(INSTALL ${SOURCE_PATH}/license.terms DESTINATION ${CURRENT_PACKAGES_DIR}/share/tcl RENAME copyright) + else() - message(ERROR "Unsupported Operating System ${VCPKG_CMAKE_SYSTEM_NAME}") -endif() \ No newline at end of file + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + NO_DEBUG + PROJECT_SUBPATH unix + ) + + vcpkg_install_make() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +endif() + +file(INSTALL ${SOURCE_PATH}/license.terms DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file