[libvorbis] Fix mingw-dynamic, modernize port (#23761)

* Fix mingw-dynamic builds

* Modernize portfile

* Add explicit usage

* Update versions

* Drop obsolete PREFER_NINJA

* Update versions
This commit is contained in:
Kai Pastor 2022-03-25 22:56:02 +01:00 коммит произвёл GitHub
Родитель 85d85f3873
Коммит 0537d52181
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 73 добавлений и 19 удалений

Просмотреть файл

@ -0,0 +1,33 @@
diff --git a/win32/vorbis.def b/win32/vorbis.def
index 1310b6c..de14385 100644
--- a/win32/vorbis.def
+++ b/win32/vorbis.def
@@ -1,6 +1,5 @@
; vorbis.def
;
-LIBRARY
EXPORTS
_floor_P
_mapping_P
diff --git a/win32/vorbisenc.def b/win32/vorbisenc.def
index 79af064..40a3e39 100644
--- a/win32/vorbisenc.def
+++ b/win32/vorbisenc.def
@@ -1,6 +1,5 @@
; vorbisenc.def
;
-LIBRARY
EXPORTS
vorbis_encode_init
diff --git a/win32/vorbisfile.def b/win32/vorbisfile.def
index 4dc5549..243795d 100644
--- a/win32/vorbisfile.def
+++ b/win32/vorbisfile.def
@@ -1,6 +1,5 @@
; vorbisfile.def
;
-LIBRARY
EXPORTS
ov_clear
ov_open

Просмотреть файл

@ -7,24 +7,19 @@ vcpkg_from_github(
PATCHES
0001-Dont-export-vorbisenc-functions.patch
0002-Fixup-pkgconfig-libs.patch
0003-def-mingw-compat.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(
CONFIG_PATH lib/cmake/Vorbis
TARGET_PATH share/Vorbis
)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME Vorbis CONFIG_PATH "lib/cmake/Vorbis")
vcpkg_fixup_pkgconfig()
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

13
ports/libvorbis/usage Normal file
Просмотреть файл

@ -0,0 +1,13 @@
The package libvorbis provides CMake targets:
# Vorbis reference encoder and decoder, low-level API
find_package(Vorbis CONFIG REQUIRED)
target_link_libraries(main PRIVATE Vorbis::vorbis)
# Audio stream decoding and basic manipulation, high-level API
find_package(Vorbis CONFIG REQUIRED)
target_link_libraries(main PRIVATE Vorbis::vorbisfile)
# Convenience API for setting up an encoding environment
find_package(Vorbis CONFIG REQUIRED)
target_link_libraries(main PRIVATE Vorbis::vorbisenc)

Просмотреть файл

@ -1,11 +1,19 @@
{
"name": "libvorbis",
"version-string": "1.3.7",
"port-version": 1,
"version": "1.3.7",
"port-version": 2,
"description": "Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format",
"homepage": "https://github.com/xiph/vorbis",
"license": "BSD-3-Clause",
"dependencies": [
"libogg"
"libogg",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

Просмотреть файл

@ -4126,7 +4126,7 @@
},
"libvorbis": {
"baseline": "1.3.7",
"port-version": 1
"port-version": 2
},
"libvpx": {
"baseline": "1.10.0",

Просмотреть файл

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c4c646a26ce3e6ad63992d3e4a55cb185159b23c",
"version": "1.3.7",
"port-version": 2
},
{
"git-tree": "54dcb5ab354422e9518a905d501ccc22dcb69098",
"version-string": "1.3.7",