[libflac] Fix pc file (#21675)

* [libflac] fix pc file; remove m flag on windows and add version

* version stuff
This commit is contained in:
Alexander Neumann 2021-11-29 21:02:52 +01:00 committed by GitHub
parent 36de5f9de5
commit b03d383e49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 14 deletions

View File

@ -50,31 +50,42 @@ vcpkg_fixup_cmake_targets(
)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC/export.h
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/FLAC/export.h"
"#if defined(FLAC__NO_DLL)"
"#if 0"
)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h"
"#if defined(FLAC__NO_DLL)"
"#if 0"
)
else()
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC/export.h
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/FLAC/export.h"
"#if defined(FLAC__NO_DLL)"
"#if 1"
)
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h"
"#if defined(FLAC__NO_DLL)"
"#if 1"
)
endif()
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/flac.pc" "Version:" "Version: 1.3.3")
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/flac.pc" " -lm" "")
endif()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/flac++.pc" "Version:" "Version: 1.3.3")
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/flac.pc")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/flac.pc" "Version:" "Version: 1.3.3")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/flac++.pc" "Version:" "Version: 1.3.3")
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/flac.pc" " -lm" "")
endif()
endif()
vcpkg_fixup_pkgconfig()
# This license (BSD) is relevant only for library - if someone would want to install
# FLAC cmd line tools as well additional license (GPL) should be included
file(INSTALL ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/COPYING.Xiph" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,7 +1,7 @@
{
"name": "libflac",
"version-string": "1.3.3",
"port-version": 6,
"version": "1.3.3",
"port-version": 7,
"description": "Library for manipulating FLAC files",
"homepage": "https://xiph.org/flac/",
"dependencies": [

View File

@ -3446,7 +3446,7 @@
},
"libflac": {
"baseline": "1.3.3",
"port-version": 6
"port-version": 7
},
"libfort": {
"baseline": "0.4.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "040c261fb123656fc61f659e887a6db0fabc275e",
"version": "1.3.3",
"port-version": 7
},
{
"git-tree": "682527a63d829627895d16e12759a08c26687db7",
"version-string": "1.3.3",