[liblzma] add install bundle for support build target for ios platform. (#18829)

* [liblzma] add install bundle for support build target for ios platform.

* Remove the deprecated functions

* format vcpkg.json

* Update the baseline version

Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
This commit is contained in:
Jimmy Lee 2021-07-23 06:48:47 +08:00 committed by GitHub
parent f241ffc3f0
commit dad6d64276
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 15 deletions

View File

@ -1,5 +0,0 @@
Source: liblzma
Version: 5.2.5
Port-Version: 2
Homepage: https://github.com/xz-mirror/xz
Description: Compression library with an API similar to that of zlib.

View File

@ -0,0 +1,23 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 52439b3..0b5e371 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -526,6 +526,7 @@ if(HAVE_GETOPT_LONG)
install(TARGETS xzdec
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT xzdec)
if(UNIX)
@@ -653,6 +654,7 @@ if(NOT MSVC AND HAVE_GETOPT_LONG)
install(TARGETS xz
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}"
COMPONENT xz)
install(FILES src/xz/xz.1
--
2.30.1 (Apple Git-130)

View File

@ -8,15 +8,15 @@ vcpkg_from_github(
enable-uwp-builds.patch
fix_config_include.patch
win_output_name.patch # Fix output name on Windows. Autotool build does not generate lib prefixed libraries on windows.
add_support_ios.patch # add install bundle info for support ios
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DCMAKE_DEBUG_POSTFIX=d" # This was in the old vcpkg CMakeLists.txt and I don't intend to fix it all over vcpkg
)
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()
set(exec_prefix "\${prefix}")
@ -39,7 +39,7 @@ endif()
vcpkg_fixup_pkgconfig()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/liblzma)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/liblzma)
file(WRITE "${CURRENT_PACKAGES_DIR}/share/liblzma/liblzma-config.cmake" "include(\"\${CMAKE_CURRENT_LIST_DIR}/liblzmaConfig.cmake\")")
file(APPEND "${CURRENT_PACKAGES_DIR}/share/liblzma/liblzmaConfig.cmake"
@ -100,9 +100,9 @@ endif()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/lzma.h "${_contents}")
if (VCPKG_BUILD_TYPE STREQUAL debug)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include)
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/include")
else()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
@ -113,7 +113,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
)
endif()
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
set(TOOLS xz xzdec)
@ -130,5 +130,5 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
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)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

17
ports/liblzma/vcpkg.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "liblzma",
"version-semver": "5.2.5",
"port-version": 3,
"description": "Compression library with an API similar to that of zlib.",
"homepage": "hhttps://github.com/xz-mirror/xz",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -3330,7 +3330,7 @@
},
"liblzma": {
"baseline": "5.2.5",
"port-version": 2
"port-version": 3
},
"libmad": {
"baseline": "0.15.1-8",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "2c5f893c8d78d30c4641e9f4d0c7818386f8c8c9",
"version-semver": "5.2.5",
"port-version": 3
},
{
"git-tree": "5f491131f98307f42a98db7ad0b5455225481284",
"version-string": "5.2.5",