From a42af01b72c28a8e1d7b48107b33e4f286a55ef6 Mon Sep 17 00:00:00 2001 From: Park DongHa Date: Tue, 21 Nov 2023 12:31:49 +0900 Subject: [PATCH] [libtheora] install pkg-config files (#34904) * [libtheora] create pkg-config files * [libtheora] fix expression * [libtheora] update baseline * [libtheora] provide version from portfile * Update ports/libtheora/CMakeLists.txt Co-authored-by: Kai Pastor * Update ports/libtheora/portfile.cmake Co-authored-by: Kai Pastor * Update ports/libtheora/CMakeLists.txt Co-authored-by: Kai Pastor * [libtheora] update baseline --------- Co-authored-by: Kai Pastor --- ports/libtheora/CMakeLists.txt | 13 +++++++++++++ ports/libtheora/portfile.cmake | 3 ++- ports/libtheora/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/l-/libtheora.json | 5 +++++ 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ports/libtheora/CMakeLists.txt b/ports/libtheora/CMakeLists.txt index 79d88277918080..1e2d4b8a7db5ef 100644 --- a/ports/libtheora/CMakeLists.txt +++ b/ports/libtheora/CMakeLists.txt @@ -141,3 +141,16 @@ install(EXPORT unofficial-theora-targets NAMESPACE unofficial::theora:: DESTINATION "lib/unofficial-theora" ) + +set(prefix "${CMAKE_INSTALL_PREFIX}") +set(libdir "\${prefix}/lib") +set(exec_prefix "\${prefix}") +set(includedir "\${prefix}/include") +configure_file(theora.pc.in theora.pc @ONLY) +configure_file(theoradec.pc.in theoradec.pc @ONLY) +configure_file(theoraenc.pc.in theoraenc.pc @ONLY) + +install( + FILES "${PROJECT_BINARY_DIR}/theora.pc" "${PROJECT_BINARY_DIR}/theoradec.pc" "${PROJECT_BINARY_DIR}/theoraenc.pc" + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +) diff --git a/ports/libtheora/portfile.cmake b/ports/libtheora/portfile.cmake index 670fe8a4236bcc..b2e324e2e91de7 100644 --- a/ports/libtheora/portfile.cmake +++ b/ports/libtheora/portfile.cmake @@ -21,12 +21,13 @@ endif() vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS + "-DVERSION:STRING=${VERSION}" -DUSE_X86=${THEORA_X86_OPT} ) vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH "lib/unofficial-theora" PACKAGE_NAME "unofficial-theora") - +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/ports/libtheora/vcpkg.json b/ports/libtheora/vcpkg.json index abbc322d3d9c42..a64f03104ab723 100644 --- a/ports/libtheora/vcpkg.json +++ b/ports/libtheora/vcpkg.json @@ -1,7 +1,7 @@ { "name": "libtheora", "version-string": "1.2.0alpha1-20170719", - "port-version": 6, + "port-version": 7, "description": "Theora is a free and open video compression format from the Xiph.org Foundation.", "homepage": "https://github.com/xiph/theora", "license": null, diff --git a/versions/baseline.json b/versions/baseline.json index d67d410e9ca1ed..d63bce37294938 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4866,7 +4866,7 @@ }, "libtheora": { "baseline": "1.2.0alpha1-20170719", - "port-version": 6 + "port-version": 7 }, "libtins": { "baseline": "4.5", diff --git a/versions/l-/libtheora.json b/versions/l-/libtheora.json index 927fce18396b3d..2829cd15d57652 100644 --- a/versions/l-/libtheora.json +++ b/versions/l-/libtheora.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f6cc1235f841d9f9a7b7d1a278dc63b788c63659", + "version-string": "1.2.0alpha1-20170719", + "port-version": 7 + }, { "git-tree": "66646fe9dde7ac30894403ba659941879387904e", "version-string": "1.2.0alpha1-20170719",