vcpkg/ports/tcl/portfile.cmake

140 lines
5.0 KiB
CMake
Raw Normal View History

2019-09-29 12:52:58 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO tcltk/tcl
[vcpkg] Improve make builds (#10402) * update all 16 configure_make ports * add make wrappers for msvc * improve make builds * fix relativ path errors on linux (and osx?) * revisit all 16 portfiles again * remove trace from install * fix relative build path issues. * bump control of the 16 configure ports * never forget .... real linux is case sensitive .... * Revert "bump control of the 16 configure ports" This reverts commit 40d6d81c01d2709c4acbdbec503b4787c3fd8282. * Revert "Revert "bump control of the 16 configure ports"" This reverts commit 9c9851ddfcd01bfad604ab9c9aed7379238d619a. * bump control again for real ci rebuild * add copy_source * remove message * pass parameters to vcpkg_build_make * fix healpix build. * fix libmagic regression * fix libwandio regression * pfring changes regression fix? (cannot test in wsl) * ws change to retrigger CI * fix libpq regression * fix libudns regression * add share/pkgconfig to PKG_CONFIG_PATH * cleanup of deprecated options * cleanup docs * Revert "bump control again for real ci rebuild" This reverts commit b4bc18edc2376eba6c3aa3dda52bd82286f23616. * shared binaries on linux should stay in lib. Only dlls are mvoed to bin * move pkgconfig check and add message about missing system packages * added autopoint as a build requirement * fix prerun shell working dir. * a few fixes from the x windows pr - add libpath setting - fixed pkgconfig search on windows platforms - fixed autopoint msys package on windows * fix release prefix * minimal cleanup and ws changes to trigger true CI rebuild * fix tcl by upgrading * remove unnecessary rename * fix pfring? can't test in WSL. Linux kernel headers required. * fix lowercase in patch * fix libwandio * remove x264 from fail list * replace wrappers with wrappers from automake * update make ports * remove unnecessary message * refactor vcpkg_configure_make * [tcl] remove stray ? * [farmhash] fix build * [freexl] ws change to retrigger ci build * [x264] add pthread as a dependency * [vcpkg/scripts] add ignore flag correctly * [sdl] fix vcpkg_fixup_pkgconfig call * [farmhash/freexl] delete configure and recreate it. * [libudns] remove trailing ? * [freexl] use empty build target * [freexl] add system library; remove previous change * Update ports/x264/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [libwandio] remove unncessary comment Co-authored-by: dan-shaw <51385773+dan-shaw@users.noreply.github.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2020-05-22 01:46:07 +08:00
REF 0fa6a4e5aad821a5c34fdfa070c37c3f1ffc8c8e
SHA512 9d7f35309fe8b1a7c116639aaea50cc01699787c7afb432389bee2b9ad56a67034c45d90c9585ef1ccf15bdabf0951cbef86257c0c6aedbd2591bbfae3e93b76
PATCHES force-shell-install.patch
)
2019-09-29 12:52:58 +08:00
if (VCPKG_TARGET_IS_WINDOWS)
2019-09-29 12:52:58 +08:00
if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64")
set(TCL_BUILD_MACHINE_STR MACHINE=AMD64)
2019-09-29 12:52:58 +08:00
else()
set(TCL_BUILD_MACHINE_STR MACHINE=IX86)
2019-09-29 12:52:58 +08:00
endif()
# 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)
2019-09-29 12:52:58 +08:00
endif()
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
release
${TCL_BUILD_OPTS}
INSTALLDIR=${CURRENT_PACKAGES_DIR}
SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/tools/tcl/lib/tcl9.0
2019-09-29 12:52:58 +08:00
)
# Install
# Note: tcl shell requires it to be in a folder adjacent to the /lib/ folder, i.e. in a /bin/ folder
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
file(GLOB_RECURSE TOOL_BIN
${CURRENT_PACKAGES_DIR}/bin/*.exe
${CURRENT_PACKAGES_DIR}/bin/*.dll
)
file(COPY ${TOOL_BIN} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/bin/)
# Remove .exes only after copying
file(GLOB_RECURSE TOOL_EXES
${CURRENT_PACKAGES_DIR}/bin/*.exe
)
file(REMOVE ${TOOL_EXES})
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
)
2019-09-29 12:52:58 +08:00
endif()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
file(GLOB_RECURSE TOOL_BIN
${CURRENT_PACKAGES_DIR}/debug/bin/*.exe
${CURRENT_PACKAGES_DIR}/debug/bin/*.dll
)
file(COPY ${TOOL_BIN} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/debug/bin/)
# Remove .exes only after copying
file(GLOB_RECURSE EXES
${CURRENT_PACKAGES_DIR}/debug/bin/*.exe
)
file(REMOVE ${EXES})
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)
else()
[vcpkg] Improve make builds (#10402) * update all 16 configure_make ports * add make wrappers for msvc * improve make builds * fix relativ path errors on linux (and osx?) * revisit all 16 portfiles again * remove trace from install * fix relative build path issues. * bump control of the 16 configure ports * never forget .... real linux is case sensitive .... * Revert "bump control of the 16 configure ports" This reverts commit 40d6d81c01d2709c4acbdbec503b4787c3fd8282. * Revert "Revert "bump control of the 16 configure ports"" This reverts commit 9c9851ddfcd01bfad604ab9c9aed7379238d619a. * bump control again for real ci rebuild * add copy_source * remove message * pass parameters to vcpkg_build_make * fix healpix build. * fix libmagic regression * fix libwandio regression * pfring changes regression fix? (cannot test in wsl) * ws change to retrigger CI * fix libpq regression * fix libudns regression * add share/pkgconfig to PKG_CONFIG_PATH * cleanup of deprecated options * cleanup docs * Revert "bump control again for real ci rebuild" This reverts commit b4bc18edc2376eba6c3aa3dda52bd82286f23616. * shared binaries on linux should stay in lib. Only dlls are mvoed to bin * move pkgconfig check and add message about missing system packages * added autopoint as a build requirement * fix prerun shell working dir. * a few fixes from the x windows pr - add libpath setting - fixed pkgconfig search on windows platforms - fixed autopoint msys package on windows * fix release prefix * minimal cleanup and ws changes to trigger true CI rebuild * fix tcl by upgrading * remove unnecessary rename * fix pfring? can't test in WSL. Linux kernel headers required. * fix lowercase in patch * fix libwandio * remove x264 from fail list * replace wrappers with wrappers from automake * update make ports * remove unnecessary message * refactor vcpkg_configure_make * [tcl] remove stray ? * [farmhash] fix build * [freexl] ws change to retrigger ci build * [x264] add pthread as a dependency * [vcpkg/scripts] add ignore flag correctly * [sdl] fix vcpkg_fixup_pkgconfig call * [farmhash/freexl] delete configure and recreate it. * [libudns] remove trailing ? * [freexl] use empty build target * [freexl] add system library; remove previous change * Update ports/x264/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [libwandio] remove unncessary comment Co-authored-by: dan-shaw <51385773+dan-shaw@users.noreply.github.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2020-05-22 01:46:07 +08:00
file(REMOVE "${SOURCE_PATH}/unix/configure")
vcpkg_configure_make(
SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH unix
2019-09-29 12:52:58 +08:00
)
vcpkg_install_make()
[vcpkg] Improve make builds (#10402) * update all 16 configure_make ports * add make wrappers for msvc * improve make builds * fix relativ path errors on linux (and osx?) * revisit all 16 portfiles again * remove trace from install * fix relative build path issues. * bump control of the 16 configure ports * never forget .... real linux is case sensitive .... * Revert "bump control of the 16 configure ports" This reverts commit 40d6d81c01d2709c4acbdbec503b4787c3fd8282. * Revert "Revert "bump control of the 16 configure ports"" This reverts commit 9c9851ddfcd01bfad604ab9c9aed7379238d619a. * bump control again for real ci rebuild * add copy_source * remove message * pass parameters to vcpkg_build_make * fix healpix build. * fix libmagic regression * fix libwandio regression * pfring changes regression fix? (cannot test in wsl) * ws change to retrigger CI * fix libpq regression * fix libudns regression * add share/pkgconfig to PKG_CONFIG_PATH * cleanup of deprecated options * cleanup docs * Revert "bump control again for real ci rebuild" This reverts commit b4bc18edc2376eba6c3aa3dda52bd82286f23616. * shared binaries on linux should stay in lib. Only dlls are mvoed to bin * move pkgconfig check and add message about missing system packages * added autopoint as a build requirement * fix prerun shell working dir. * a few fixes from the x windows pr - add libpath setting - fixed pkgconfig search on windows platforms - fixed autopoint msys package on windows * fix release prefix * minimal cleanup and ws changes to trigger true CI rebuild * fix tcl by upgrading * remove unnecessary rename * fix pfring? can't test in WSL. Linux kernel headers required. * fix lowercase in patch * fix libwandio * remove x264 from fail list * replace wrappers with wrappers from automake * update make ports * remove unnecessary message * refactor vcpkg_configure_make * [tcl] remove stray ? * [farmhash] fix build * [freexl] ws change to retrigger ci build * [x264] add pthread as a dependency * [vcpkg/scripts] add ignore flag correctly * [sdl] fix vcpkg_fixup_pkgconfig call * [farmhash/freexl] delete configure and recreate it. * [libudns] remove trailing ? * [freexl] use empty build target * [freexl] add system library; remove previous change * Update ports/x264/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [libwandio] remove unncessary comment Co-authored-by: dan-shaw <51385773+dan-shaw@users.noreply.github.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2020-05-22 01:46:07 +08:00
vcpkg_fixup_pkgconfig()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
2019-09-29 12:52:58 +08:00
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
endif()
2019-09-29 12:52:58 +08:00
file(INSTALL ${SOURCE_PATH}/license.terms DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)