mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 05:28:01 +08:00
[libilbc] New port (#15331)
* [libilbc] New port libilbc is an Internet Low Bit Rate Codec (iLBC) / RFC 3951 codec. Closes #14836. * Update ports/libilbc/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * Update ports/libilbc/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [libilbc] Use vcpkg_copy_tools, update arm-uwp. * [libilbc] More packaging cleanups. Add vcpkg_fixup_pkgconfig after vcpkg_install_cmake. Install docs into $PREFIX/share/libilbc. Remove ilbc_test after a dynamic build and the bin and debug/bin dirs after a static build. Fixup include/ilbc_export.h for static builds. Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
This commit is contained in:
parent
6a94f1f8ce
commit
73cfc65919
5
ports/libilbc/CONTROL
Normal file
5
ports/libilbc/CONTROL
Normal file
@ -0,0 +1,5 @@
|
||||
Source: libilbc
|
||||
Version: 3.0.3
|
||||
Description: Open source implementation of the Internet Low Bit Rate Codec (iLBC) / RFC 3951 codec from the WebRTC project.
|
||||
Homepage: https://github.com/TimothyGu/libilbc
|
||||
Supports: !(arm&uwp)
|
13
ports/libilbc/do-not-build-ilbc_test.patch
Normal file
13
ports/libilbc/do-not-build-ilbc_test.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 671ded64d1..1d01f737c2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -332,7 +332,7 @@ install(FILES ilbc.h ${CMAKE_CURRENT_BINARY_DIR}/ilbc_export.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
install(FILES CONTRIBUTING.md NEWS.md README.md
|
||||
DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
-install(TARGETS ilbc ilbc_test
|
||||
+install(TARGETS ilbc
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
33
ports/libilbc/portfile.cmake
Normal file
33
ports/libilbc/portfile.cmake
Normal file
@ -0,0 +1,33 @@
|
||||
set(ILBC_VERSION 3.0.3)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/TimothyGu/libilbc/releases/download/v${ILBC_VERSION}/libilbc-${ILBC_VERSION}.zip"
|
||||
FILENAME "libilbc-${ILBC_VERSION}.zip"
|
||||
SHA512 a5755db093529f6a3fd8fd47da63b57cffff1d3babef443d92f7c5a250ce8d1585adfba525c4037b142d9f00f1675a5054c172bf936be280dfcc22ed553c94c6
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
REF ${ILBC_VERSION}
|
||||
PATCHES do-not-build-ilbc_test.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DCMAKE_INSTALL_DOCDIR=share/${PORT}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/ilbc_export.h "#ifdef ILBC_STATIC_DEFINE" "#if 1")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
Loading…
x
Reference in New Issue
Block a user