aboutsummaryrefslogtreecommitdiff
path: root/ports/audiofile
diff options
context:
space:
mode:
authorNancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>2021-09-14 11:20:15 +0800
committerGitHub <noreply@github.com>2021-09-13 20:20:15 -0700
commit2294a5b768fad5cc3a2a208a32965d73f014215d (patch)
treeb3b292e0ecdbbf7dd9c2b692cf731339627c27b8 /ports/audiofile
parente571da5c6a1d636b2fa97e61f52427b26cb842f2 (diff)
downloadvcpkg-2294a5b768fad5cc3a2a208a32965d73f014215d.tar.gz
vcpkg-2294a5b768fad5cc3a2a208a32965d73f014215d.zip
[audiofile/cgltf/libsbml] Update to the latest version (#20066)
* [audiofile/cgltf/libsbml] Update to the latest version * Format manifests * [libsbml] Update branch from stable to development * Update versions/l-/libsbml.json * [audiofile] Add options to vcpkg_cmake_configure
Diffstat (limited to 'ports/audiofile')
-rw-r--r--ports/audiofile/fix-cmakeLists.patch38
-rw-r--r--ports/audiofile/portfile.cmake21
-rw-r--r--ports/audiofile/vcpkg.json14
3 files changed, 67 insertions, 6 deletions
diff --git a/ports/audiofile/fix-cmakeLists.patch b/ports/audiofile/fix-cmakeLists.patch
new file mode 100644
index 000000000..a7551d6ad
--- /dev/null
+++ b/ports/audiofile/fix-cmakeLists.patch
@@ -0,0 +1,38 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d43c0c7..1bf21cf 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -4,6 +4,8 @@ cmake_minimum_required (VERSION 3.12)
+ project ("AudioFile" VERSION 1.0.9
+ DESCRIPTION "A simple C++ library for reading and writing audio files."
+ HOMEPAGE_URL "https://github.com/adamstark/AudioFile")
++option(BUILD_EXAMPLES "Build examples" OFF)
++option(BUILD_TESTS "Build tests" OFF)
+
+ #===============================================================================
+ include (GNUInstallDirs)
+@@ -21,10 +23,20 @@ target_include_directories (
+ target_compile_features (${PROJECT_NAME} INTERFACE cxx_std_11)
+
+ #===============================================================================
++if(BUILD_EXAMPLES)
+ add_subdirectory (examples)
++endif()
+
++if(BUILD_TESTS)
+ enable_testing()
+ add_subdirectory (tests)
+-
++endif()
+ #===============================================================================
+-set (CMAKE_SUPPRESS_REGENERATION true)
+\ No newline at end of file
++set (CMAKE_SUPPRESS_REGENERATION true)
++
++#install and export targets
++install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Config)
++export(TARGETS ${PROJECT_NAME} FILE ${PROJECT_NAME}Config.cmake)
++install(EXPORT ${PROJECT_NAME}Config DESTINATION share/AudioFile FILE ${PROJECT_NAME}Config.cmake)
++#install headers
++install(FILES AudioFile.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+\ No newline at end of file
diff --git a/ports/audiofile/portfile.cmake b/ports/audiofile/portfile.cmake
index 49f9a67d2..df0fff374 100644
--- a/ports/audiofile/portfile.cmake
+++ b/ports/audiofile/portfile.cmake
@@ -3,11 +3,24 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO adamstark/AudioFile
- REF ccb64bd86881099e65a329f104733679ae03f63e # 1.0.7
- SHA512 f172f9df95a028c9c3da29cd530dd4b55acad76ee7503000f96ba10c5d014abd219fcd145cea4b7ca7a902c38d968518b39de285d25f7e3ccc56d1ba3769d7b8
+ REF b7dd84abd5763f64fcf74e58499c4b5d779a396d # 1.0.9
+ SHA512 daadbf7badadee4a189453af137b1ea5a5ba3486780d02664d1516f379c3705155b1036a9f8f7acd49b6a82269a07e510edcd5e9de55c73f47250244a510ccbb
HEAD_REF master
+ PATCHES
+ fix-cmakeLists.patch
)
-file(COPY ${SOURCE_PATH}/AudioFile.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_EXAMPLES=OFF
+ -DBUILD_TESTS=OFF
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(PACKAGE_NAME AudioFile)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
-file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) \ No newline at end of file
diff --git a/ports/audiofile/vcpkg.json b/ports/audiofile/vcpkg.json
index d77964203..8d982a697 100644
--- a/ports/audiofile/vcpkg.json
+++ b/ports/audiofile/vcpkg.json
@@ -1,7 +1,17 @@
{
"name": "audiofile",
- "version-string": "1.0.7",
+ "version": "1.0.9",
"description": "A simple header-only C++ library for reading and writing audio files.",
"homepage": "https://github.com/adamstark/AudioFile",
- "license": "GPL-3.0"
+ "license": "GPL-3.0",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
}