[libmagic] no absolute paths (#21266)

This commit is contained in:
autoantwort 2021-11-09 05:39:26 +01:00 committed by GitHub
parent 3730cbe99a
commit d18c04c875
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 14 deletions

View File

@ -34,37 +34,38 @@ endif()
vcpkg_configure_make(
AUTOCONFIG
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH "${SOURCE_PATH}"
)
if(VCPKG_CROSSCOMPILING)
vcpkg_add_to_path(PREPEND ${CURRENT_HOST_INSTALLED_DIR}/tools/libmagic/bin)
vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/libmagic/bin")
elseif(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(EXTRA_ARGS "ADD_BIN_TO_PATH")
endif()
vcpkg_install_make(${EXTRA_ARGS})
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin)
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin")
vcpkg_fixup_pkgconfig()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
if(VCPKG_TARGET_IS_WINDOWS)
if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/share/misc)
file(COPY ${CURRENT_PACKAGES_DIR}/share/${PORT}/misc/magic.mgc DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/share/misc)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/share/misc")
file(COPY "${CURRENT_PACKAGES_DIR}/share/${PORT}/misc/magic.mgc" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/share/misc")
endif()
if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/share/misc)
file(COPY ${CURRENT_PACKAGES_DIR}/share/${PORT}/misc/magic.mgc DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/share/misc)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/share/misc")
file(COPY "${CURRENT_PACKAGES_DIR}/share/${PORT}/misc/magic.mgc" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/share/misc")
endif()
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/man5)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/man5")
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,6 +1,7 @@
{
"name": "libmagic",
"version-string": "5.40",
"port-version": 1,
"description": "This library can be used to classify files according to magic number tests.",
"homepage": "https://github.com/file/file",
"dependencies": [

View File

@ -3590,7 +3590,7 @@
},
"libmagic": {
"baseline": "5.40",
"port-version": 0
"port-version": 1
},
"libmariadb": {
"baseline": "3.1.12",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7bc1a88e28473967fafa7be73db0304f127ae202",
"version-string": "5.40",
"port-version": 1
},
{
"git-tree": "0645b6d33816b293de3dae3b84828b97d06bd0ea",
"version-string": "5.40",