[yasm/yasm-tool] Incorporate yasm-tool into yasm (#23218)

* [yasm/yasm-tool] Incorporate yasm-tool into yasm

* version

* Fix merge issue

* version

* Add missing dependency feature

* version

* Apply suggestions

* version
This commit is contained in:
Jack·Boos·Yu 2022-02-25 02:50:02 +08:00 committed by GitHub
parent fabf35daf3
commit b7a1088ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 56 additions and 70 deletions

View File

@ -1,7 +1,7 @@
{
"name": "gmp",
"version-string": "6.2.1",
"port-version": 7,
"port-version": 8,
"description": "The GNU Multiple Precision Arithmetic Library",
"homepage": "https://gmplib.org",
"supports": "!(windows & (arm | arm64))",
@ -12,8 +12,11 @@
"platform": "windows"
},
{
"name": "yasm-tool",
"name": "yasm",
"host": true,
"features": [
"tools"
],
"platform": "windows"
}
]

View File

@ -1,12 +1,16 @@
{
"name": "yasm-tool-helper",
"version-string": "2020-03-11",
"description": "Backfill that depends on yasm-tool:host",
"version-date": "2020-03-11",
"port-version": 1,
"description": "Backfill that depends on yasm:host",
"homepage": "https://github.com/Microsoft/vcpkg",
"dependencies": [
{
"name": "yasm-tool",
"host": true
"name": "yasm",
"host": true,
"features": [
"tools"
]
}
]
}

View File

@ -1 +1 @@
include("${CMAKE_CURRENT_LIST_DIR}/../../../@HOST_TRIPLET@/share/yasm-tool/vcpkg-port-config.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/../../../@HOST_TRIPLET@/share/yasm/vcpkg-port-config.cmake")

View File

@ -1,45 +1 @@
if(VCPKG_TARGET_IS_WINDOWS)
set(YASM_BUILD_BINARY ON)
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
set(VCPKG_LIBRARY_LINKAGE static)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO yasm/yasm
REF 009450c7ad4d425fa5a10ac4bd6efbd25248d823 # 1.3.0 plus bugfixes for https://github.com/yasm/yasm/issues/153
SHA512 a542577558676d11b52981925ea6219bffe699faa1682c033b33b7534f5a0dfe9f29c56b32076b68c48f65e0aef7c451be3a3af804c52caa4d4357de4caad83c
)
file(INSTALL "${SOURCE_PATH}/COPYING"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
RENAME copyright)
foreach(LICENSE Artistic.txt BSD.txt GNU_GPL-2.0 GNU_LGPL-2.0)
file(COPY "${SOURCE_PATH}/${LICENSE}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
endforeach()
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path("${PYTHON3_DIR}")
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DENABLE_NLS=OFF
-DYASM_BUILD_TESTS=OFF
)
vcpkg_install_cmake()
vcpkg_copy_tools(TOOL_NAMES yasm)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include")
else()
set(YASM_BUILD_BINARY OFF)
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
endif()
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake.in"
"${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-port-config.cmake" @ONLY)
SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)

View File

@ -1,8 +1,13 @@
{
"name": "yasm-tool",
"version": "1.3.0",
"port-version": 1,
"description": "A modular assembler.",
"homepage": "http://yasm.tortall.net/",
"supports": "native & !uwp"
"version-date": "2021-12-14",
"description": "Legacy port. Use port yasm instead.",
"dependencies": [
{
"name": "yasm",
"features": [
"tools"
]
}
]
}

View File

@ -29,11 +29,11 @@ vcpkg_cmake_install()
vcpkg_copy_pdbs()
if (BUILD_TOOLS)
vcpkg_copy_tools(TOOL_NAMES vsyasm yasm ytasm AUTO_CLEAN)
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(COPY "${CURRENT_PACKAGES_DIR}/bin/yasmstd${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}"
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
endif()
vcpkg_copy_tools(TOOL_NAMES vsyasm yasm ytasm AUTO_CLEAN)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
@ -42,5 +42,7 @@ endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
configure_file("${CURRENT_PORT_DIR}/vcpkg-port-config.cmake.in"
"${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-port-config.cmake" @ONLY)
# Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -11,11 +11,7 @@ function(yasm_tool_helper)
message(FATAL_ERROR "Unexpected arguments to yasm_tool_helper: ${arg_UNPARSED_ARGUMENTS}")
endif()
if(@YASM_BUILD_BINARY@)
set(YASM "${Z_YASM_TOOL_HELPER_LIST_DIR}/../../tools/yasm-tool/yasm.exe")
else()
vcpkg_find_acquire_program(YASM)
endif()
find_program(YASM yasm PATHS "${Z_YASM_TOOL_HELPER_LIST_DIR}/../../tools/yasm")
if(arg_APPEND_TO_PATH)
get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)

View File

@ -1,7 +1,7 @@
{
"name": "yasm",
"version-string": "1.3.0",
"port-version": 2,
"version": "1.3.0",
"port-version": 3,
"description": "Yasm is a complete rewrite of the NASM assembler under the new BSD License.",
"homepage": "https://github.com/yasm/yasm",
"supports": "windows & !uwp & !arm",

View File

@ -2526,7 +2526,7 @@
},
"gmp": {
"baseline": "6.2.1",
"port-version": 7
"port-version": 8
},
"gmsh": {
"baseline": "4.9.0",
@ -7506,15 +7506,15 @@
},
"yasm": {
"baseline": "1.3.0",
"port-version": 2
"port-version": 3
},
"yasm-tool": {
"baseline": "1.3.0",
"port-version": 1
"baseline": "2021-12-14",
"port-version": 0
},
"yasm-tool-helper": {
"baseline": "2020-03-11",
"port-version": 0
"port-version": 1
},
"yato": {
"baseline": "1.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "8d09c9addf60d381cabe4c565cb59b27f5b2bdc7",
"version-string": "6.2.1",
"port-version": 8
},
{
"git-tree": "5d207c0d8a6481f96f2277fd3245f2a80456a706",
"version-string": "6.2.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0a2dfb294bebae79c48cc710756756164175be1d",
"version-date": "2020-03-11",
"port-version": 1
},
{
"git-tree": "7d0e3b2224338888cd1e2f7a00c182961a7ea760",
"version-string": "2020-03-11",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5dc61ac1b2f25ef005c279fd65cd98cbdedc161a",
"version-date": "2021-12-14",
"port-version": 0
},
{
"git-tree": "456004e2ac7a578572cb14ebf581c246b869516a",
"version": "1.3.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4368509dc3dfe6cab848b8713b22c9c0ef408527",
"version": "1.3.0",
"port-version": 3
},
{
"git-tree": "eaab6c3ae3bfc1ffcfaee3b1695d7ee21dacc7b1",
"version-string": "1.3.0",