Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update XED to 2023.12.19 #1007

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 56 additions & 28 deletions ports/xed/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO intelxed/xed
REF v2022.04.17
SHA512 941511144899701854449b510aed9f03244aee7b3d3ac27de75cf2612baaf2a4df9977ba04d3d6c3e4ea87b12525d081585fbf48c0ff9c5fde7a0f8bba889701
HEAD_REF master
REF v2023.12.19
SHA512 a19865fac9d287b8599bd6b990a8faa1b2f39b4f0057b9d8828e1b8c200013e6794a8f3e7bf3592d59277c4c4f7c2a85aa7e9e62ff3546e43bd1855aa8678bf4
HEAD_REF main
)

# Last checked Apr. 18, 2022
# Commit from Apr 16, 2021
# Use latest commit from when xed is last released
vcpkg_from_github(
OUT_SOURCE_PATH MBUILD_SOURCE_PATH
REPO intelxed/mbuild
REF 09b6654be0c52bf1df44e88c88b411a67b624cbd
SHA512 63797a1763ec7ea5ab5897fbd457c0bf715e1a144ae34e44f18c17ab1bbaaa848da479212518eb356d64dd3f46372fb69e955a0033adafc8211f5b4120016ab5
REF c07bd90b71c608c615a7fa643d373f11ba355a24
SHA512 753dcbf1546733ff621ca87244622cae0294ae535476b1fcd334cff35d1d61004b6d5d1508c7c1e9594a34d1333d183fd90fdd2a2cdb7309b67e4a49c5d3e278
HEAD_REF main
PATCHES
# For arm cross compilation
0001-mbuild-remove-m64.patch
)

# Xed has its own compiler detection, and will readily guess wrong.
# Help it out by finding the correct compiler
# Xed has its own compiler detection, and will easily guess wrong.
# Help it out by finding the correct compiler, linker, archiver
z_vcpkg_get_cmake_vars(cmake_vars_file)
include("${cmake_vars_file}")
message(STATUS "Detected CXX compiler: ${VCPKG_DETECTED_CMAKE_CXX_COMPILER}")
message(STATUS "Detected C compiler: ${VCPKG_DETECTED_CMAKE_C_COMPILER}")

# Copy mbuild sources.
message(STATUS "Copying mbuild to parallel source directory...")
file(COPY ${MBUILD_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/../mbuild)
file(COPY "${MBUILD_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/../mbuild")
message(STATUS "Copied mbuild")

set(EXTRA_CXX_FLAGS_RELEASE "")
Expand All @@ -54,15 +53,29 @@ set(DEBUG_TRIPLET ${TARGET_TRIPLET}-dbg)
# Build
vcpkg_find_acquire_program(PYTHON3)
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)

# Not entirely sure if we actually repeat any of the build work if we do
# separate build and install phases, so just combine them for now
# Not sure if separate build and install phases repeat any of the build work,
# so just combine them for now
message(STATUS "Building and installing ${RELEASE_TRIPLET}")
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET})
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET})
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}")
file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}")
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${SOURCE_PATH}/mfile.py install --no-werror "--cc=${VCPKG_DETECTED_CMAKE_C_COMPILER}" "--cxx=${VCPKG_DETECTED_CMAKE_CXX_COMPILER}" --${LINK_TYPE} --install-dir ${CURRENT_PACKAGES_DIR} --build-dir "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}" -j ${VCPKG_CONCURRENCY} "--extra-ccflags=${VCPKG_DETECTED_CMAKE_C_FLAGS} ${VCPKG_DETECTED_CMAKE_C_FLAGS_RELEASE} ${EXTRA_C_FLAGS_RELEASE}" "--extra-cxxflags=${VCPKG_DETECTED_CMAKE_CXX_FLAGS} ${VCPKG_DETECTED_CMAKE_CXX_FLAGS_RELEASE} ${EXTRA_CXX_FLAGS_RELEASE}" "--extra-linkflags=${VCPKG_DETECTED_CMAKE_LINKER_FLAGS} ${VCPKG_DETECTED_CMAKE_LINKER_FLAGS_RELEASE}" --verbose=9
WORKING_DIRECTORY ${SOURCE_PATH}
COMMAND "${PYTHON3}" "${SOURCE_PATH}/mfile.py" install
--install-dir "${CURRENT_PACKAGES_DIR}"
--build-dir "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}"
"--extra-ccflags=${VCPKG_DETECTED_CMAKE_C_FLAGS} ${VCPKG_DETECTED_CMAKE_C_FLAGS_RELEASE} ${EXTRA_C_FLAGS_RELEASE}"
"--extra-cxxflags=${VCPKG_DETECTED_CMAKE_CXX_FLAGS} ${VCPKG_DETECTED_CMAKE_CXX_FLAGS_RELEASE} ${EXTRA_CXX_FLAGS_RELEASE}"
"--extra-linkflags=${VCPKG_DETECTED_CMAKE_LINKER_FLAGS} ${VCPKG_DETECTED_CMAKE_LINKER_FLAGS_RELEASE}"
# All other options should be the same for release
"--cc=${VCPKG_DETECTED_CMAKE_C_COMPILER}"
"--cxx=${VCPKG_DETECTED_CMAKE_CXX_COMPILER}"
"--linker=${VCPKG_DETECTED_CMAKE_LINKER}"
"--ar=${VCPKG_DETECTED_CMAKE_AR}"
"--as=${VCPKG_DETECTED_CMAKE_AS}"
--${LINK_TYPE}
-j ${VCPKG_CONCURRENCY}
--verbose=9
--no-werror
WORKING_DIRECTORY "${SOURCE_PATH}"
LOGNAME python-${TARGET_TRIPLET}-build-install-rel
)

Expand All @@ -76,15 +89,30 @@ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
endif()

if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)

# Not entirely sure if we actually repeat any of the build work if we do
# separate build and install phases, so just combine them for now
# Not sure if separate build and install phases repeat any of the build work,
# so just combine them for now
message(STATUS "Building and installing ${DEBUG_TRIPLET}")
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET})
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET})
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET}")
file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET}")
vcpkg_execute_required_process(
COMMAND ${PYTHON3} ${SOURCE_PATH}/mfile.py install --no-werror "--cc=${VCPKG_DETECTED_CMAKE_C_COMPILER}" "--cxx=${VCPKG_DETECTED_CMAKE_CXX_COMPILER}" --debug --${LINK_TYPE} --install-dir ${CURRENT_PACKAGES_DIR}/debug --build-dir "${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET}" -j ${VCPKG_CONCURRENCY} "--extra-ccflags=${VCPKG_DETECTED_CMAKE_C_FLAGS} ${VCPKG_DETECTED_CMAKE_C_FLAGS_DEBUG} ${EXTRA_C_FLAGS_DEBUG}" "--extra-cxxflags=${VCPKG_DETECTED_CMAKE_CXX_FLAGS} ${VCPKG_DETECTED_CMAKE_CXX_FLAGS_DEBUG} ${EXTRA_CXX_FLAGS_DEBUG}" "--extra-linkflags=${VCPKG_DETECTED_CMAKE_LINKER_FLAGS} ${VCPKG_DETECTED_CMAKE_LINKER_FLAGS_DEBUG}" --verbose=9
WORKING_DIRECTORY ${SOURCE_PATH}
COMMAND "${PYTHON3}" "${SOURCE_PATH}/mfile.py" install
--debug
--install-dir "${CURRENT_PACKAGES_DIR}/debug"
--build-dir "${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET}"
"--extra-ccflags=${VCPKG_DETECTED_CMAKE_C_FLAGS} ${VCPKG_DETECTED_CMAKE_C_FLAGS_DEBUG} ${EXTRA_C_FLAGS_DEBUG}"
"--extra-cxxflags=${VCPKG_DETECTED_CMAKE_CXX_FLAGS} ${VCPKG_DETECTED_CMAKE_CXX_FLAGS_DEBUG} ${EXTRA_CXX_FLAGS_DEBUG}"
"--extra-linkflags=${VCPKG_DETECTED_CMAKE_LINKER_FLAGS} ${VCPKG_DETECTED_CMAKE_LINKER_FLAGS_DEBUG}"
# All other options should be the same for release
"--cc=${VCPKG_DETECTED_CMAKE_C_COMPILER}"
"--cxx=${VCPKG_DETECTED_CMAKE_CXX_COMPILER}"
"--linker=${VCPKG_DETECTED_CMAKE_LINKER}"
"--ar=${VCPKG_DETECTED_CMAKE_AR}"
"--as=${VCPKG_DETECTED_CMAKE_AS}"
--${LINK_TYPE}
-j ${VCPKG_CONCURRENCY}
--no-werror
--verbose=9
WORKING_DIRECTORY "${SOURCE_PATH}"
LOGNAME python-${TARGET_TRIPLET}-build-install-dbg
)

Expand All @@ -98,7 +126,7 @@ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
)
endif()

file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/XEDConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${MBUILD_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME mbuild.copyright)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/XEDConfig.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(INSTALL "${MBUILD_SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME mbuild.copyright)
3 changes: 1 addition & 2 deletions ports/xed/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "xed",
"version-date": "2022-04-17",
"port-version": 1,
"version-date": "2023-12-19",
"description": "x86 encoder decoder",
"homepage": "https://intelxed.github.io/",
"license": "Apache-2.0"
Expand Down
Loading