diff options
| author | myd7349 <myd7349@gmail.com> | 2020-05-02 06:28:55 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-01 15:28:55 -0700 |
| commit | 0ab1a9e1c64a3968631b59647e771beda7d1f256 (patch) | |
| tree | 5b4ff6d1fe12b2a6fcd0e560438e23289fe9ce13 /ports | |
| parent | bc7d178e62c68adffc84ef8459eecde4a5ed5315 (diff) | |
| download | vcpkg-0ab1a9e1c64a3968631b59647e771beda7d1f256.tar.gz vcpkg-0ab1a9e1c64a3968631b59647e771beda7d1f256.zip | |
[vcpkg] Add new function vcpkg_copy_tools (#8749)
* [vcpkg] Add new function vcpkg_copy_tools
* [cpuinfo][czmq][nanomsg][uriparser] Use vcpkg_copy_tools
* [czmq] Clean even tools are not copied
[libsvm][zyre] Use vcpkg_copy_tools
* [vcpkg-copy-tools] Clean debug/bin
This should fix czmq build error
* [czmq] czmq does not have BUILD_TOOLS option
* [vcpkg] Split clean logic into another function
* [cpuinfo][czmq][nanomsg][uriparser] Fix calling of vcpkg_copy_tools
* [zyre] Fix regression error
* [vcpkg] Update try_remove_empty_directory
* [libsvm] Fix vcpkg_copy_tools call
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/cpuinfo/CONTROL | 2 | ||||
| -rw-r--r-- | ports/cpuinfo/portfile.cmake | 17 | ||||
| -rw-r--r-- | ports/czmq/CONTROL | 2 | ||||
| -rw-r--r-- | ports/czmq/portfile.cmake | 23 | ||||
| -rw-r--r-- | ports/libsvm/CONTROL | 2 | ||||
| -rw-r--r-- | ports/libsvm/portfile.cmake | 23 | ||||
| -rw-r--r-- | ports/nanomsg/CONTROL | 2 | ||||
| -rw-r--r-- | ports/nanomsg/portfile.cmake | 20 | ||||
| -rw-r--r-- | ports/uriparser/CONTROL | 2 | ||||
| -rw-r--r-- | ports/uriparser/portfile.cmake | 19 | ||||
| -rw-r--r-- | ports/zyre/CONTROL | 2 | ||||
| -rw-r--r-- | ports/zyre/portfile.cmake | 20 |
12 files changed, 20 insertions, 114 deletions
diff --git a/ports/cpuinfo/CONTROL b/ports/cpuinfo/CONTROL index 180b26043..0c349078e 100644 --- a/ports/cpuinfo/CONTROL +++ b/ports/cpuinfo/CONTROL @@ -1,5 +1,5 @@ Source: cpuinfo
-Version: 2019-07-28
+Version: 2019-07-28-1
Description: CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)
Homepage: https://github.com/pytorch/cpuinfo
diff --git a/ports/cpuinfo/portfile.cmake b/ports/cpuinfo/portfile.cmake index b5279e30d..9b3db8e45 100644 --- a/ports/cpuinfo/portfile.cmake +++ b/ports/cpuinfo/portfile.cmake @@ -47,19 +47,10 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
if(tools IN_LIST FEATURES)
- foreach(cpuinfo_tool cache-info cpuid-dump cpu-info isa-info)
- file(COPY
- ${CURRENT_PACKAGES_DIR}/bin/${cpuinfo_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}
- DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}
- )
- vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
- endforeach()
-
- if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
- else()
- # TODO: Fix it once this lib supports dynamic building.
- endif()
+ vcpkg_copy_tools(
+ TOOL_NAMES cache-info cpuid-dump cpu-info isa-info
+ AUTO_CLEAN
+ )
endif()
# Handle copyright
diff --git a/ports/czmq/CONTROL b/ports/czmq/CONTROL index 4d68f15b1..2d190c394 100644 --- a/ports/czmq/CONTROL +++ b/ports/czmq/CONTROL @@ -1,5 +1,5 @@ Source: czmq -Version: 2019-06-10-3 +Version: 2019-06-10-4 Build-Depends: zeromq Description: High-level C binding for ZeroMQ Homepage: https://github.com/zeromq/czmq diff --git a/ports/czmq/portfile.cmake b/ports/czmq/portfile.cmake index 2545feea5..a30449329 100644 --- a/ports/czmq/portfile.cmake +++ b/ports/czmq/portfile.cmake @@ -29,7 +29,6 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS draft ENABLE_DRAFTS - tool BUILD_TOOLS curl CZMQ_WITH_LIBCURL httpd CZMQ_WITH_LIBMICROHTTPD lz4 CZMQ_WITH_LZ4 @@ -63,18 +62,12 @@ file(COPY DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} ) -if(CMAKE_HOST_WIN32) - set(EXECUTABLE_SUFFIX ".exe") -else() - set(EXECUTABLE_SUFFIX "") -endif() - if ("tool" IN_LIST FEATURES) - file(COPY ${CURRENT_PACKAGES_DIR}/bin/zmakecert${EXECUTABLE_SUFFIX} - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_copy_tools(TOOL_NAMES zmakecert) endif() +vcpkg_clean_executables_in_bin(FILE_NAMES zmakecert) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -84,16 +77,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) ) endif() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin) -else() - file(REMOVE - ${CURRENT_PACKAGES_DIR}/debug/bin/zmakecert${EXECUTABLE_SUFFIX} - ${CURRENT_PACKAGES_DIR}/bin/zmakecert${EXECUTABLE_SUFFIX}) -endif() - # Handle copyright configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/ports/libsvm/CONTROL b/ports/libsvm/CONTROL index 342536cce..4a9af6018 100644 --- a/ports/libsvm/CONTROL +++ b/ports/libsvm/CONTROL @@ -1,5 +1,5 @@ Source: libsvm
-Version: 323
+Version: 323-1
Description: A library for Support Vector Machines
Homepage: https://www.csie.ntu.edu.tw/~cjlin/libsvm/
diff --git a/ports/libsvm/portfile.cmake b/ports/libsvm/portfile.cmake index f4f7c6960..e473fd3c3 100644 --- a/ports/libsvm/portfile.cmake +++ b/ports/libsvm/portfile.cmake @@ -30,29 +30,8 @@ vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT})
-# Install tools
if ("tools" IN_LIST FEATURES)
- if(VCPKG_TARGET_IS_WINDOWS)
- set(EXECUTABLE_SUFFIX ".exe")
- else()
- set(EXECUTABLE_SUFFIX "")
- endif()
-
- foreach (libsvm_tool svm-predict svm-scale svm-toy svm-train)
- if (EXISTS ${CURRENT_PACKAGES_DIR}/bin/${libsvm_tool}${EXECUTABLE_SUFFIX})
- file(
- COPY ${CURRENT_PACKAGES_DIR}/bin/${libsvm_tool}${EXECUTABLE_SUFFIX}
- DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}
- )
- file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/${libsvm_tool}${EXECUTABLE_SUFFIX})
- endif ()
-
- vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
- endforeach ()
-
- if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
- endif ()
+ vcpkg_copy_tools(TOOL_NAMES svm-predict svm-scale svm-toy svm-train AUTO_CLEAN)
endif ()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
diff --git a/ports/nanomsg/CONTROL b/ports/nanomsg/CONTROL index 8693cfef3..8f6d45e8b 100644 --- a/ports/nanomsg/CONTROL +++ b/ports/nanomsg/CONTROL @@ -1,5 +1,5 @@ Source: nanomsg -Version: 1.1.5-1 +Version: 1.1.5-2 Description: a simple high-performance implementation of several "scalability protocols". These scalability protocols are light-weight messaging protocols which can be used to solve a number of very common messaging patterns, such as request/reply, publish/subscribe, surveyor/respondent, and so forth. These protocols can run over a variety of transports such as TCP, UNIX sockets, and even WebSocket. diff --git a/ports/nanomsg/portfile.cmake b/ports/nanomsg/portfile.cmake index d07685f60..a4125434d 100644 --- a/ports/nanomsg/portfile.cmake +++ b/ports/nanomsg/portfile.cmake @@ -41,30 +41,12 @@ vcpkg_replace_string( ) if(NN_ENABLE_NANOCAT) - if(CMAKE_HOST_WIN32) - set(EXECUTABLE_SUFFIX ".exe") - else() - set(EXECUTABLE_SUFFIX "") - endif() - - file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/nanocat${EXECUTABLE_SUFFIX} - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - - file(REMOVE - ${CURRENT_PACKAGES_DIR}/bin/nanocat${EXECUTABLE_SUFFIX} - ${CURRENT_PACKAGES_DIR}/debug/bin/nanocat${EXECUTABLE_SUFFIX} - ) + vcpkg_copy_tools(TOOL_NAMES nanocat AUTO_CLEAN) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin - ) - vcpkg_replace_string( ${CURRENT_PACKAGES_DIR}/include/nanomsg/nn.h "defined(NN_STATIC_LIB)" diff --git a/ports/uriparser/CONTROL b/ports/uriparser/CONTROL index af57f871a..c86313339 100644 --- a/ports/uriparser/CONTROL +++ b/ports/uriparser/CONTROL @@ -1,5 +1,5 @@ Source: uriparser -Version: 0.9.3-4 +Version: 0.9.3-5 Homepage: https://github.com/uriparser/uriparser Description: uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C89 ("ANSI C"). uriparser is cross-platform, fast, supports Unicode, and is licensed under the New BSD license. diff --git a/ports/uriparser/portfile.cmake b/ports/uriparser/portfile.cmake index aafd0ae6a..5082d7e9b 100644 --- a/ports/uriparser/portfile.cmake +++ b/ports/uriparser/portfile.cmake @@ -31,21 +31,10 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() if(URIPARSER_BUILD_TOOLS) - if(CMAKE_HOST_WIN32) - set(EXECUTABLE_SUFFIX ".exe") - else() - set(EXECUTABLE_SUFFIX "") - endif() - - file(COPY ${CURRENT_PACKAGES_DIR}/bin/uriparse${EXECUTABLE_SUFFIX} - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) - vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - - if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - else() - file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/uriparse${EXECUTABLE_SUFFIX}) - endif() + vcpkg_copy_tools( + TOOL_NAMES uriparse + AUTO_CLEAN + ) endif() set(_package_version_re "#define[ ]+PACKAGE_VERSION[ ]+\"([0-9]+.[0-9]+.[0-9]+)\"") diff --git a/ports/zyre/CONTROL b/ports/zyre/CONTROL index ca8a4507e..5351afb3e 100644 --- a/ports/zyre/CONTROL +++ b/ports/zyre/CONTROL @@ -1,5 +1,5 @@ Source: zyre -Version: 2019-07-07 +Version: 2019-07-07-1 Build-Depends: czmq Description: An open-source framework for proximity-based peer-to-peer applications Homepage: https://github.com/zeromq/zyre diff --git a/ports/zyre/portfile.cmake b/ports/zyre/portfile.cmake index db7e8e8cc..de44b4b03 100644 --- a/ports/zyre/portfile.cmake +++ b/ports/zyre/portfile.cmake @@ -50,25 +50,7 @@ file(COPY DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} ) -if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - set(EXECUTABLE_SUFFIX ".exe") -else() - set(EXECUTABLE_SUFFIX "") -endif() - -file(COPY ${CURRENT_PACKAGES_DIR}/bin/zpinger${EXECUTABLE_SUFFIX} - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) - -if(ZYRE_BUILD_SHARED) - file(REMOVE - ${CURRENT_PACKAGES_DIR}/debug/bin/zpinger${EXECUTABLE_SUFFIX} - ${CURRENT_PACKAGES_DIR}/bin/zpinger${EXECUTABLE_SUFFIX}) -else() - file(REMOVE_RECURSE - ${CURRENT_PACKAGES_DIR}/bin - ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() +vcpkg_copy_tools(TOOL_NAMES zpinger AUTO_CLEAN) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) |
