diff options
| author | NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> | 2021-08-12 08:18:20 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-11 17:18:20 -0700 |
| commit | c315cf92f7e9ca1247c839106abd49cf5fb6a6eb (patch) | |
| tree | 738f19473d865ed9fdecd3c5c0e46767b53f4b3c | |
| parent | 53204fc2fb53125039709eaabf9b006f01a5d494 (diff) | |
| download | vcpkg-c315cf92f7e9ca1247c839106abd49cf5fb6a6eb.tar.gz vcpkg-c315cf92f7e9ca1247c839106abd49cf5fb6a6eb.zip | |
[keystone] Fix static build with dynamic CRT on Windows (#19491)
* [keystone] Fix static build with dynamic CRT on Windows
* Add port-version
* Update version files
* Add double quotes for the path
* Update versions/k-/keystone.json
* Add comments for kstool
* Update versions/k-/keystone.json
| -rw-r--r-- | ports/keystone/CONTROL | 3 | ||||
| -rw-r--r-- | ports/keystone/portfile.cmake | 40 | ||||
| -rw-r--r-- | ports/keystone/vcpkg.json | 14 | ||||
| -rw-r--r-- | scripts/ci.baseline.txt | 3 | ||||
| -rw-r--r-- | versions/baseline.json | 2 | ||||
| -rw-r--r-- | versions/k-/keystone.json | 5 |
6 files changed, 38 insertions, 29 deletions
diff --git a/ports/keystone/CONTROL b/ports/keystone/CONTROL deleted file mode 100644 index cc2c01c2f..000000000 --- a/ports/keystone/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: keystone -Version: 0.9.2 -Description: Lightweight multi-platform, multi-architecture assembler framework diff --git a/ports/keystone/portfile.cmake b/ports/keystone/portfile.cmake index f75cfeeea..6a6e25690 100644 --- a/ports/keystone/portfile.cmake +++ b/ports/keystone/portfile.cmake @@ -1,3 +1,5 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO keystone-engine/keystone @@ -8,43 +10,37 @@ vcpkg_from_github( vcpkg_find_acquire_program(PYTHON2) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KEYSTONE_BUILD_STATIC) -string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" KEYSTONE_BUILD_STATIC_RUNTIME) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS - -DKEYSTONE_BUILD_STATIC=${KEYSTONE_BUILD_STATIC} - -DKEYSTONE_BUILD_SHARED=${KEYSTONE_BUILD_SHARED} + -DKEYSTONE_BUILD_STATIC_RUNTIME=${KEYSTONE_BUILD_STATIC_RUNTIME} -DPYTHON_EXECUTABLE=${PYTHON2} # Add support for only a subset of architectures #-DLLVM_TARGETS_TO_BUILD="AArch64;X86" ) -vcpkg_install_cmake() +vcpkg_cmake_install() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -if(EXES) - file(REMOVE ${EXES}) -endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + #For windows, do not build kstool if building DLL https://github.com/keystone-engine/keystone/blob/master/CMakeLists.txt#L74 + vcpkg_copy_tools(TOOL_NAMES kstool AUTO_CLEAN) else() # Move DLLs - file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll) - file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") + file(COPY ${DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/bin") file(REMOVE ${DLLS}) - file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) - file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") + file(COPY ${DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") file(REMOVE ${DLLS}) endif() +vcpkg_fixup_pkgconfig() + # Handle copyright -file(INSTALL ${SOURCE_PATH}/COPYING - DESTINATION ${CURRENT_PACKAGES_DIR}/share/keystone - RENAME copyright -) +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
\ No newline at end of file diff --git a/ports/keystone/vcpkg.json b/ports/keystone/vcpkg.json new file mode 100644 index 000000000..62827d58e --- /dev/null +++ b/ports/keystone/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "keystone", + "version-semver": "0.9.2", + "port-version": 1, + "description": "A Lightweight multi-platform, multi-architecture assembler framework.", + "homepage": "https://github.com/keystone-engine/keystone", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 7f53972bc..a1e9fabeb 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -497,8 +497,6 @@ jemalloc:x64-uwp=fail jemalloc:x64-windows-static=fail jinja2cpplight:arm-uwp=fail jinja2cpplight:x64-uwp=fail -keystone:arm-uwp=fail -keystone:x64-uwp=fail kfr:arm64-windows=fail kfr:arm-uwp=fail kfr:x64-linux=fail @@ -1723,7 +1721,6 @@ clockutils:x64-windows-static-md=fail fastcgi:x64-windows-static-md=fail gmp:x64-windows-static-md=fail ijg-libjpeg:x64-windows-static-md=fail -keystone:x64-windows-static-md=fail libcerf:x64-windows-static-md=fail libgo:x64-windows-static-md=fail libmicrohttpd:x64-windows-static-md=fail diff --git a/versions/baseline.json b/versions/baseline.json index 4affd95e1..90d0f9d4e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2870,7 +2870,7 @@ }, "keystone": { "baseline": "0.9.2", - "port-version": 0 + "port-version": 1 }, "kf5archive": { "baseline": "5.84.0", diff --git a/versions/k-/keystone.json b/versions/k-/keystone.json index c89181721..7f8c71f6f 100644 --- a/versions/k-/keystone.json +++ b/versions/k-/keystone.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "34865a7cf3fbcf4f104e8b136862aa8acc1a7ca7", + "version-semver": "0.9.2", + "port-version": 1 + }, + { "git-tree": "779d3f65bc01be0cfb50208ec50673612154023f", "version-string": "0.9.2", "port-version": 0 |
