From f0815eb528f8d2bddff9d9184520c35747f8ea9d Mon Sep 17 00:00:00 2001 From: Osyotr Date: Mon, 18 Jul 2022 23:16:02 +0300 Subject: [PATCH] [libtheora] Fix x64-linux-debug build (#25819) Also switch to vcpkg-cmake and install both copyright files Co-authored-by: Osyotr <8740768+Osyotr@users.noreply.github.com> --- ports/libtheora/CMakeLists.txt | 6 +++--- ports/libtheora/portfile.cmake | 21 ++++++++++----------- ports/libtheora/vcpkg.json | 13 +++++++++++-- versions/baseline.json | 2 +- versions/l-/libtheora.json | 5 +++++ 5 files changed, 30 insertions(+), 17 deletions(-) diff --git a/ports/libtheora/CMakeLists.txt b/ports/libtheora/CMakeLists.txt index 0d4aed76e0..c11adc21ce 100644 --- a/ports/libtheora/CMakeLists.txt +++ b/ports/libtheora/CMakeLists.txt @@ -103,9 +103,9 @@ install( install(TARGETS theora theoraenc theoradec EXPORT unofficial-theora-targets - RUNTIME DESTINATION bin - LIBRARY DESTINATION bin - ARCHIVE DESTINATION lib + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) install(EXPORT unofficial-theora-targets diff --git a/ports/libtheora/portfile.cmake b/ports/libtheora/portfile.cmake index 8c88e261b2..5b84a7d726 100644 --- a/ports/libtheora/portfile.cmake +++ b/ports/libtheora/portfile.cmake @@ -8,9 +8,9 @@ vcpkg_from_github( 0001-fix-uwp.patch ) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/libtheora.def DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-theora-config.cmake.in DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/libtheora.def" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-theora-config.cmake.in" DESTINATION "${SOURCE_PATH}") if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") set(THEORA_X86_OPT ON) @@ -18,18 +18,17 @@ else() set(THEORA_X86_OPT OFF) endif() -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" OPTIONS -DUSE_X86=${THEORA_X86_OPT} ) -vcpkg_install_cmake() +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/unofficial-theora") + vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/unofficial-theora TARGET_PATH share/unofficial-theora) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtheora) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libtheora/LICENSE ${CURRENT_PACKAGES_DIR}/share/libtheora/copyright) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING" "${SOURCE_PATH}/LICENSE") diff --git a/ports/libtheora/vcpkg.json b/ports/libtheora/vcpkg.json index 58167e7d1b..17f4ccdf99 100644 --- a/ports/libtheora/vcpkg.json +++ b/ports/libtheora/vcpkg.json @@ -1,10 +1,19 @@ { "name": "libtheora", "version-string": "1.2.0alpha1-20170719", - "port-version": 3, + "port-version": 4, "description": "Theora is a free and open video compression format from the Xiph.org Foundation.", "homepage": "https://github.com/xiph/theora", + "license": null, "dependencies": [ - "libogg" + "libogg", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } ] } diff --git a/versions/baseline.json b/versions/baseline.json index 9068a62199..ba5408f03b 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4146,7 +4146,7 @@ }, "libtheora": { "baseline": "1.2.0alpha1-20170719", - "port-version": 3 + "port-version": 4 }, "libtins": { "baseline": "4.3", diff --git a/versions/l-/libtheora.json b/versions/l-/libtheora.json index 3aa9a91bb9..4fba0ff535 100644 --- a/versions/l-/libtheora.json +++ b/versions/l-/libtheora.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "77e6aad4fc7e821831290f3e17d368ea17609117", + "version-string": "1.2.0alpha1-20170719", + "port-version": 4 + }, { "git-tree": "f54e2dbc66d96847b2b075baa7ae3a4cc032328d", "version-string": "1.2.0alpha1-20170719",