From 47950cabae132e1fc5c874b69665538762caa0f2 Mon Sep 17 00:00:00 2001 From: evpobr Date: Thu, 28 Feb 2019 01:02:09 +0500 Subject: [PATCH] [opus] Fix version "unknown" returned by version API (#5134) Related issues: * erikd/libsndfile#406 * xiph/opus#110 * xiph/opus#111 --- ports/opus/CONTROL | 2 +- ports/opus/package_version.in | 1 + ports/opus/portfile.cmake | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 ports/opus/package_version.in diff --git a/ports/opus/CONTROL b/ports/opus/CONTROL index dd92faea54..a40b11c64c 100644 --- a/ports/opus/CONTROL +++ b/ports/opus/CONTROL @@ -1,3 +1,3 @@ Source: opus -Version: 1.3 +Version: 1.3-1 Description: Totally open, royalty-free, highly versatile audio codec diff --git a/ports/opus/package_version.in b/ports/opus/package_version.in new file mode 100644 index 0000000000..4bc971b335 --- /dev/null +++ b/ports/opus/package_version.in @@ -0,0 +1 @@ +PACKAGE_VERSION="@OPUS_VERSION@" diff --git a/ports/opus/portfile.cmake b/ports/opus/portfile.cmake index d15be61f1c..ae257690ca 100644 --- a/ports/opus/portfile.cmake +++ b/ports/opus/portfile.cmake @@ -3,6 +3,9 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) endif() include(vcpkg_common_functions) + +set(OPUS_VERSION "1.3") + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xiph/opus @@ -12,6 +15,11 @@ vcpkg_from_github( PATCHES "${CMAKE_CURRENT_LIST_DIR}/no-main.patch" ) +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/package_version.in + ${SOURCE_PATH}/package_version +) + # Ensure proper crt linkage file(READ ${SOURCE_PATH}/win32/VS2015/common.props OPUS_PROPS) if(VCPKG_CRT_LINKAGE STREQUAL dynamic)