[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

@ -12,8 +12,8 @@ vcpkg_from_github(
if(VCPKG_TARGET_IS_MINGW) if(VCPKG_TARGET_IS_MINGW)
set(WITH_STACK_PROTECTOR OFF) set(WITH_STACK_PROTECTOR OFF)
string(APPEND VCPKG_C_FLAGS "-D_FORTIFY_SOURCE=0") string(APPEND VCPKG_C_FLAGS " -D_FORTIFY_SOURCE=0")
string(APPEND VCPKG_CXX_FLAGS "-D_FORTIFY_SOURCE=0") string(APPEND VCPKG_CXX_FLAGS " -D_FORTIFY_SOURCE=0")
else() else()
set(WITH_STACK_PROTECTOR ON) set(WITH_STACK_PROTECTOR ON)
endif() endif()
@ -50,31 +50,42 @@ vcpkg_fixup_cmake_targets(
) )
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") 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 defined(FLAC__NO_DLL)"
"#if 0" "#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 defined(FLAC__NO_DLL)"
"#if 0" "#if 0"
) )
else() 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 defined(FLAC__NO_DLL)"
"#if 1" "#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 defined(FLAC__NO_DLL)"
"#if 1" "#if 1"
) )
endif() endif()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/flac.pc" "Version:" "Version: 1.3.3")
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) 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 # 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 # 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", "name": "libflac",
"version-string": "1.3.3", "version": "1.3.3",
"port-version": 6, "port-version": 7,
"description": "Library for manipulating FLAC files", "description": "Library for manipulating FLAC files",
"homepage": "https://xiph.org/flac/", "homepage": "https://xiph.org/flac/",
"dependencies": [ "dependencies": [

View File

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

View File

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