Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Apply suggestions from code review

Co-authored-by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>
  • Loading branch information
ras0219-msft and Neumann-A committed Aug 21, 2020
1 parent 2722695 commit bef28ec
Show file tree
Hide file tree
Showing 23 changed files with 511 additions and 274 deletions.
2 changes: 1 addition & 1 deletion ports/ffmpeg/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: ffmpeg
Version: 4.2
Port-Version: 20
Port-Version: 21
Homepage: https://ffmpeg.org
Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.
Expand Down
2 changes: 1 addition & 1 deletion ports/ffmpeg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ cd "$PATH_TO_BUILD_DIR"
echo "=== CONFIGURING ==="
"$PATH_TO_SRC_DIR/configure" --toolchain=msvc "--prefix=$PATH_TO_PACKAGE_DIR" $4
echo "=== BUILDING ==="
make -j6
make -j${VCPKG_CONCURRENCY}
echo "=== INSTALLING ==="
make install
2 changes: 1 addition & 1 deletion ports/ffmpeg/build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ echo "=== CONFIGURING ==="
chmod a+x "$PATH_TO_SRC_DIR/configure"
"$PATH_TO_SRC_DIR/configure" "--prefix=$PATH_TO_PACKAGE_DIR" $4
echo "=== BUILDING ==="
make -j6
make -j${VCPKG_CONCURRENCY}
echo "=== INSTALLING ==="
make install
104 changes: 59 additions & 45 deletions ports/ffmpeg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,57 @@ vcpkg_from_github(
0012-Fix-ssl-110-detection.patch
)

if (${SOURCE_PATH} MATCHES " ")
if (SOURCE_PATH MATCHES " ")
message(FATAL_ERROR "Error: ffmpeg will not build with spaces in the path. Please use a directory with no spaces")
endif()

vcpkg_find_acquire_program(YASM)
get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)

if(VCPKG_TARGET_IS_WINDOWS)
set(SEP ";")
#We're assuming that if we're building for Windows we're using MSVC
set(INCLUDE_VAR "INCLUDE")
set(LIB_PATH_VAR "LIB")
else()
set(SEP ":")
set(INCLUDE_VAR "CPATH")
set(LIB_PATH_VAR "LIBRARY_PATH")
endif()

if(VCPKG_TARGET_IS_WINDOWS)
set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}")
set(ENV{VCPKG_CONCURRENCY} ${VCPKG_CONCURRENCY})

set(ENV{PATH} "$ENV{PATH}${VCPKG_HOST_PATH_SEPARATOR}${YASM_EXE_PATH}")

if(WIN32)
set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}\\build.sh)

if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
vcpkg_acquire_msys(MSYS_ROOT PACKAGES perl gcc diffutils make pkg-config)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES bash diffutils make sed coreutils grep gawk pkg-config
DIRECT_PACKAGES
# Required for "cpp.exe" preprocessor
"https://repo.msys2.org/msys/x86_64/gcc-9.3.0-1-x86_64.pkg.tar.xz"
76af0192a092278e6b26814b2d92815a2c519902a3fec056b057faec19623b1770ac928a59a39402db23cfc23b0d7601b7f88b367b27269361748c69d08654b2
"https://repo.msys2.org/msys/x86_64/isl-0.22.1-1-x86_64.pkg.tar.xz"
f4db50d00bad0fa0abc6b9ad965b0262d936d437a9faa35308fa79a7ee500a474178120e487b2db2259caf51524320f619e18d92acf4f0b970b5cbe5cc0f63a2
"https://repo.msys2.org/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz"
b607da40d3388b440f2a09e154f21966cd55ad77e02d47805f78a9dee5de40226225bf0b8335fdfd4b83f25ead3098e9cb974d4f202f28827f8468e30e3b790d
"https://repo.msys2.org/msys/x86_64/mpc-1.1.0-1-x86_64.pkg.tar.xz"
7d0715c41c27fdbf91e6dcc73d6b8c02ee62c252e027f0a17fa4bfb974be8a74d8e3a327ef31c2460721902299ef69a7ef3c7fce52c8f02ce1cb47f0b6e073e9
"https://repo.msys2.org/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst"
d64fa60e188124591d41fc097d7eb51d7ea4940bac05cdcf5eafde951ed1eaa174468f5ede03e61106e1633e3428964b34c96de76321ed8853b398fbe8c4d072
"https://repo.msys2.org/msys/x86_64/gmp-6.2.0-1-x86_64.pkg.tar.xz"
1389a443e775bb255d905665dd577bef7ed71d51a8c24d118097f8119c08c4dfe67505e88ddd1e9a3764dd1d50ed8b84fa34abefa797d257e90586f0cbf54de8
)
else()
vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils make pkg-config)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES bash diffutils make sed coreutils grep gawk pkg-config)
endif()

set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
else()
set(ENV{PATH} "$ENV{PATH}:${YASM_EXE_PATH}")
set(BASH /bin/bash)
set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/build_linux.sh)
endif()

set(ENV{${INCLUDE_VAR}} "${CURRENT_INSTALLED_DIR}/include${SEP}$ENV{${INCLUDE_VAR}}")
set(ENV{${INCLUDE_VAR}} "${CURRENT_INSTALLED_DIR}/include${VCPKG_HOST_PATH_SEPARATOR}$ENV{${INCLUDE_VAR}}")

set(_csc_PROJECT_PATH ffmpeg)

Expand Down Expand Up @@ -336,7 +350,7 @@ if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQU
vcpkg_find_acquire_program(GASPREPROCESSOR)
foreach(GAS_PATH ${GASPREPROCESSOR})
get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${GAS_ITEM_PATH}")
set(ENV{PATH} "$ENV{PATH}${VCPKG_HOST_PATH_SEPARATOR}${GAS_ITEM_PATH}")
endforeach(GAS_PATH)
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
Expand Down Expand Up @@ -385,7 +399,7 @@ message(STATUS "Building Options: ${OPTIONS}")
# Release build
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
message(STATUS "Building Release Options: ${OPTIONS_RELEASE}")
set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/lib${SEP}${ENV_LIB_PATH}")
set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/lib${VCPKG_HOST_PATH_SEPARATOR}${ENV_LIB_PATH}")
set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE}")
set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}")
set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig")
Expand All @@ -405,7 +419,7 @@ endif()
# Debug build
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
message(STATUS "Building Debug Options: ${OPTIONS_DEBUG}")
set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/debug/lib${SEP}${ENV_LIB_PATH}")
set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/debug/lib${VCPKG_HOST_PATH_SEPARATOR}${ENV_LIB_PATH}")
set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG}")
set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}")
set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig")
Expand All @@ -422,36 +436,36 @@ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
)
endif()

file(GLOB DEF_FILES ${CURRENT_PACKAGES_DIR}/lib/*.def ${CURRENT_PACKAGES_DIR}/debug/lib/*.def)

if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(LIB_MACHINE_ARG /machine:ARM)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(LIB_MACHINE_ARG /machine:ARM64)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(LIB_MACHINE_ARG /machine:x86)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(LIB_MACHINE_ARG /machine:x64)
else()
message(FATAL_ERROR "Unsupported target architecture")
endif()
# Handle tools
if(VCPKG_TARGET_IS_WINDOWS)
file(GLOB DEF_FILES ${CURRENT_PACKAGES_DIR}/lib/*.def ${CURRENT_PACKAGES_DIR}/debug/lib/*.def)

if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(LIB_MACHINE_ARG /machine:ARM)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(LIB_MACHINE_ARG /machine:ARM64)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(LIB_MACHINE_ARG /machine:x86)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(LIB_MACHINE_ARG /machine:x64)
else()
message(FATAL_ERROR "Unsupported target architecture")
endif()

foreach(DEF_FILE ${DEF_FILES})
get_filename_component(DEF_FILE_DIR "${DEF_FILE}" DIRECTORY)
get_filename_component(DEF_FILE_NAME "${DEF_FILE}" NAME)
string(REGEX REPLACE "-[0-9]*\\.def" "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" OUT_FILE_NAME "${DEF_FILE_NAME}")
file(TO_NATIVE_PATH "${DEF_FILE}" DEF_FILE_NATIVE)
file(TO_NATIVE_PATH "${DEF_FILE_DIR}/${OUT_FILE_NAME}" OUT_FILE_NATIVE)
message(STATUS "Generating ${OUT_FILE_NATIVE}")
vcpkg_execute_required_process(
COMMAND lib.exe /def:${DEF_FILE_NATIVE} /out:${OUT_FILE_NATIVE} ${LIB_MACHINE_ARG}
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}
LOGNAME libconvert-${TARGET_TRIPLET}
)
endforeach()
foreach(DEF_FILE ${DEF_FILES})
get_filename_component(DEF_FILE_DIR "${DEF_FILE}" DIRECTORY)
get_filename_component(DEF_FILE_NAME "${DEF_FILE}" NAME)
string(REGEX REPLACE "-[0-9]*\\.def" "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" OUT_FILE_NAME "${DEF_FILE_NAME}")
file(TO_NATIVE_PATH "${DEF_FILE}" DEF_FILE_NATIVE)
file(TO_NATIVE_PATH "${DEF_FILE_DIR}/${OUT_FILE_NAME}" OUT_FILE_NATIVE)
message(STATUS "Generating ${OUT_FILE_NATIVE}")
vcpkg_execute_required_process(
COMMAND lib.exe /def:${DEF_FILE_NATIVE} /out:${OUT_FILE_NATIVE} ${LIB_MACHINE_ARG}
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}
LOGNAME libconvert-${TARGET_TRIPLET}
)
endforeach()

# Handle tools
if (VCPKG_TARGET_IS_WINDOWS)
file(GLOB EXP_FILES ${CURRENT_PACKAGES_DIR}/lib/*.exp ${CURRENT_PACKAGES_DIR}/debug/lib/*.exp)
file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX})
file(GLOB EXE_FILES_REL ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
Expand Down Expand Up @@ -481,15 +495,15 @@ vcpkg_copy_pdbs()

# Handle copyright
file(STRINGS ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-out.log LICENSE_STRING REGEX "License: .*" LIMIT_COUNT 1)
if(${LICENSE_STRING} STREQUAL "License: LGPL version 2.1 or later")
if(LICENSE_STRING STREQUAL "License: LGPL version 2.1 or later")
set(LICENSE_FILE "COPYING.LGPLv2.1")
elseif(${LICENSE_STRING} STREQUAL "License: LGPL version 3 or later")
elseif(LICENSE_STRING STREQUAL "License: LGPL version 3 or later")
set(LICENSE_FILE "COPYING.LGPLv3")
elseif(${LICENSE_STRING} STREQUAL "License: GPL version 2 or later")
elseif(LICENSE_STRING STREQUAL "License: GPL version 2 or later")
set(LICENSE_FILE "COPYING.GPLv2")
elseif(${LICENSE_STRING} STREQUAL "License: GPL version 3 or later")
elseif(LICENSE_STRING STREQUAL "License: GPL version 3 or later")
set(LICENSE_FILE "COPYING.GPLv3")
elseif(${LICENSE_STRING} STREQUAL "License: nonfree and unredistributable")
elseif(LICENSE_STRING STREQUAL "License: nonfree and unredistributable")
set(LICENSE_FILE "COPYING.NONFREE")
file(WRITE ${SOURCE_PATH}/${LICENSE_FILE} ${LICENSE_STRING})
else()
Expand Down
2 changes: 1 addition & 1 deletion ports/ffnvcodec/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: ffnvcodec
Version: 9.1.23.1
Port-Version: 3
Port-Version: 4
Homepage: https://github.com/FFmpeg/nv-codec-headers
Description: FFmpeg version of Nvidia Codec SDK headers.
2 changes: 1 addition & 1 deletion ports/ffnvcodec/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vcpkg_from_github(
# Windows
if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}\\build.sh)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES make pkg-config)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES make bash pkg-config sed coreutils)
set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)

message(STATUS "Building ${_csc_PROJECT_PATH} for Release")
Expand Down
3 changes: 2 additions & 1 deletion ports/icu/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: icu
Version: 67.1-2
Version: 67.1
Port-Version: 2
Homepage: http://icu-project.org/apiref/icu4c/
Description: Mature and widely used Unicode and localization library.
Supports: !(arm|uwp)
4 changes: 2 additions & 2 deletions ports/icu/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ else()
set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --host=i686-pc-mingw32")

# Acquire tools
vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.16 bash coreutils sed grep gawk)

# Insert msys into the path between the compiler toolset and windows system32. This prevents masking of "link.exe" but DOES mask "find.exe".
string(REPLACE ";$ENV{SystemRoot}\\system32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}")
string(REPLACE ";$ENV{SystemRoot}\\System32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\System32;" NEWPATH "${NEWPATH}")
set(ENV{PATH} "${NEWPATH}")
set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)

set(AUTOMAKE_DIR ${MSYS_ROOT}/usr/share/automake-1.15)
set(AUTOMAKE_DIR ${MSYS_ROOT}/usr/share/automake-1.16)
file(COPY ${AUTOMAKE_DIR}/config.guess ${AUTOMAKE_DIR}/config.sub DESTINATION ${SOURCE_PATH}/source)

if(VCPKG_CRT_LINKAGE STREQUAL static)
Expand Down
2 changes: 1 addition & 1 deletion ports/lapack-reference/CONTROL
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ Build-Depends: openblas
Description: Use external optimized BLAS

Feature: blas-select
Build-Depends: lapack-reference[core, noblas](!windows|(windows&!static))
Build-Depends: lapack-reference[core, noblas](!windows|!static)
Description: Use external optimized BLAS
30 changes: 1 addition & 29 deletions ports/lapack-reference/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,40 +64,12 @@ vcpkg_configure_cmake(

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/lapack-${lapack_ver}) #Should the target path be lapack and not lapack-reference?

set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/lapack.pc")
if(EXISTS "${pcfile}")
file(READ "${pcfile}" _contents)
set(_contents "prefix=${CURRENT_INSTALLED_DIR}\n${_contents}")
file(WRITE "${pcfile}" "${_contents}")
endif()
set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/lapack.pc")
if(EXISTS "${pcfile}")
file(READ "${pcfile}" _contents)
set(_contents "prefix=${CURRENT_INSTALLED_DIR}/debug\n${_contents}")
file(WRITE "${pcfile}" "${_contents}")
endif()
if(NOT USE_OPTIMIZED_BLAS)
set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/blas.pc")
if(EXISTS "${pcfile}")
file(READ "${pcfile}" _contents)
set(_contents "prefix=${CURRENT_INSTALLED_DIR}\n${_contents}")
file(WRITE "${pcfile}" "${_contents}")
endif()
set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/blas.pc")
if(EXISTS "${pcfile}")
file(READ "${pcfile}" _contents)
set(_contents "prefix=${CURRENT_INSTALLED_DIR}/debug\n${_contents}")
file(WRITE "${pcfile}" "${_contents}")
endif()
endif()
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()

# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

# remove debug includs
# remove debug includes
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

if(VCPKG_TARGET_IS_WINDOWS)
Expand Down
2 changes: 1 addition & 1 deletion ports/libvpx/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: libvpx
Version: 1.8.1
Port-Version: 9
Port-Version: 10
Homepage: https://github.com/webmproject/libvpx
Description: The reference software implementation for the video coding formats VP8 and VP9.
Supports: !(uwp&arm)
3 changes: 1 addition & 2 deletions ports/libvpx/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)

if(CMAKE_HOST_WIN32)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES make)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES make bash diffutils coreutils gawk sed grep)
set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
set(ENV{PATH} "${YASM_EXE_PATH};${MSYS_ROOT}/usr/bin;$ENV{PATH};${PERL_EXE_PATH}")
else()
Expand Down
2 changes: 1 addition & 1 deletion ports/tensorflow-cc/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: tensorflow-cc
Version: 1.14
Port-Version: 4
Port-Version: 5
Description: Library for computation using data flow graphs for scalable machine learning
Build-Depends: c-ares
Supports: !x86
20 changes: 12 additions & 8 deletions ports/tensorflow-cc/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,21 @@ get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path(PREPEND ${PYTHON3_DIR})
set(ENV{PYTHON_BIN_PATH} "${PYTHON3}")

vcpkg_find_acquire_program(GIT)
get_filename_component(GIT_DIR "${GIT}" DIRECTORY)
vcpkg_add_to_path(PREPEND ${GIT_DIR})

function(tensorflow_try_remove_recurse_wait PATH_TO_REMOVE)
file(REMOVE_RECURSE ${PATH_TO_REMOVE})
if (EXISTS "${PATH_TO_REMOVE}")
execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 5)
_execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 5)
file(REMOVE_RECURSE ${PATH_TO_REMOVE})
endif()
endfunction()

# we currently only support the release version
tensorflow_try_remove_recurse_wait(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
file(GLOB SOURCES ${SOURCE_PATH}/*)
file(COPY ${SOURCES} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)

if(CMAKE_HOST_WIN32)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES unzip patch diffutils git)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES bash unzip patch diffutils libintl gzip coreutils)
vcpkg_add_to_path(${MSYS_ROOT}/usr/bin)
set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
set(ENV{BAZEL_SH} ${MSYS_ROOT}/usr/bin/bash.exe)

Expand All @@ -50,6 +49,11 @@ if(CMAKE_HOST_WIN32)
set(ENV{BAZEL_VC_FULL_VERSION} $ENV{VCToolsVersion})
endif()

# we currently only support the release version
tensorflow_try_remove_recurse_wait(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
file(RENAME ${SOURCE_PATH} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")

# tensorflow has long file names, which will not work on windows
set(ENV{TEST_TMPDIR} ${CURRENT_BUILDTREES_DIR}/../.bzl)

Expand Down
2 changes: 1 addition & 1 deletion ports/vcpkg-gfortran/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: vcpkg-gfortran
Version: 1
Version: 3
Description: Metaport to install gfortran dependencies from msys if VCPKG_USE_EXTERNAL_Fortran is false
Supports: windows & !arm
Loading

0 comments on commit bef28ec

Please sign in to comment.