2019-08-14 05:12:28 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO yasm/yasm
|
2021-12-09 05:13:43 +08:00
|
|
|
REF 009450c7ad4d425fa5a10ac4bd6efbd25248d823 # 1.3.0 plus bugfixes for https://github.com/yasm/yasm/issues/153
|
|
|
|
SHA512 a542577558676d11b52981925ea6219bffe699faa1682c033b33b7534f5a0dfe9f29c56b32076b68c48f65e0aef7c451be3a3af804c52caa4d4357de4caad83c
|
2019-08-14 05:12:28 +08:00
|
|
|
HEAD_REF master
|
2022-07-06 20:57:34 +00:00
|
|
|
PATCHES
|
|
|
|
add-feature-tools.patch
|
|
|
|
fix-arm-cross-build.patch
|
2019-08-14 05:12:28 +08:00
|
|
|
)
|
|
|
|
|
2021-12-09 05:13:43 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
tools BUILD_TOOLS
|
2019-08-14 05:12:28 +08:00
|
|
|
)
|
|
|
|
|
2021-12-09 05:13:43 +08:00
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
|
|
|
vcpkg_add_to_path("${PYTHON3_DIR}")
|
2019-08-14 05:12:28 +08:00
|
|
|
|
2022-07-06 20:57:34 +00:00
|
|
|
set(HOST_TOOLS_OPTIONS "")
|
|
|
|
if (VCPKG_CROSSCOMPILING)
|
|
|
|
list(APPEND HOST_TOOLS_OPTIONS
|
|
|
|
"-D_tmp_RE2C_EXE=${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}/re2c${VCPKG_HOST_EXECUTABLE_SUFFIX}"
|
|
|
|
"-D_tmp_GENPERF_EXE=${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}/genperf${VCPKG_HOST_EXECUTABLE_SUFFIX}"
|
|
|
|
"-D_tmp_GENMACRO_EXE=${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}/genmacro${VCPKG_HOST_EXECUTABLE_SUFFIX}"
|
|
|
|
"-D_tmp_GENVERSION_EXE=${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}/genversion${VCPKG_HOST_EXECUTABLE_SUFFIX}"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2021-12-09 05:13:43 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
2022-07-06 20:57:34 +00:00
|
|
|
${HOST_TOOLS_OPTIONS}
|
2021-12-09 05:13:43 +08:00
|
|
|
-DENABLE_NLS=OFF
|
|
|
|
-DYASM_BUILD_TESTS=OFF
|
2019-08-14 05:12:28 +08:00
|
|
|
)
|
|
|
|
|
2021-12-09 05:13:43 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-08-14 05:12:28 +08:00
|
|
|
|
2021-12-09 05:13:43 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
if (BUILD_TOOLS)
|
2022-07-06 20:57:34 +00:00
|
|
|
set(EXTRA_BUILD_TOOLS "")
|
|
|
|
if (NOT VCPKG_CROSSCOMPILING)
|
|
|
|
list(APPEND EXTRA_BUILD_TOOLS re2c genmacro genperf genversion)
|
|
|
|
endif()
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES vsyasm yasm ytasm ${EXTRA_BUILD_TOOLS} AUTO_CLEAN)
|
2021-12-09 05:13:43 +08:00
|
|
|
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()
|
|
|
|
endif()
|
2019-08-14 05:12:28 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2021-12-09 05:13:43 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2019-08-14 05:12:28 +08:00
|
|
|
endif()
|
|
|
|
|
2021-12-09 05:13:43 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-08-14 05:12:28 +08:00
|
|
|
|
2022-02-25 02:50:02 +08:00
|
|
|
configure_file("${CURRENT_PORT_DIR}/vcpkg-port-config.cmake.in"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-port-config.cmake" @ONLY)
|
2019-08-14 05:12:28 +08:00
|
|
|
# Handle copyright
|
2021-12-09 05:13:43 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|