diff options
| author | Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> | 2019-05-25 00:37:50 +0200 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2019-05-24 15:37:50 -0700 |
| commit | cb98a5c0dd0651fd84573af40aadf267b59a65a3 (patch) | |
| tree | 2e5cde571042157b7ce6aaecb3d44fd2ec1dcc96 | |
| parent | fcc6d6587ee899961a9022c46280530ca5f5ce24 (diff) | |
| download | vcpkg-cb98a5c0dd0651fd84573af40aadf267b59a65a3.tar.gz vcpkg-cb98a5c0dd0651fd84573af40aadf267b59a65a3.zip | |
[libvorbis] patch find_library instead of manually supplying the libr… (#6569)
* [libvorbis] patch find_library instead of manually supplying the library to cmake
* whitespace change to retrigger ci
| -rw-r--r-- | ports/libvorbis/CONTROL | 2 | ||||
| -rw-r--r-- | ports/libvorbis/ogg.patch | 17 | ||||
| -rw-r--r-- | ports/libvorbis/portfile.cmake | 19 |
3 files changed, 20 insertions, 18 deletions
diff --git a/ports/libvorbis/CONTROL b/ports/libvorbis/CONTROL index d60bd25af..780d94a25 100644 --- a/ports/libvorbis/CONTROL +++ b/ports/libvorbis/CONTROL @@ -1,4 +1,4 @@ Source: libvorbis -Version: 1.3.6-9eadecc-1 +Version: 1.3.6-9eadecc-3 Description: Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format. Build-Depends: libogg diff --git a/ports/libvorbis/ogg.patch b/ports/libvorbis/ogg.patch new file mode 100644 index 000000000..323e2c7e2 --- /dev/null +++ b/ports/libvorbis/ogg.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bbc045ba..a23630f5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -57,10 +57,10 @@ if(NOT OGG_ROOT) + find_package(PkgConfig QUIET) + pkg_check_modules(PC_OGG QUIET ogg) + find_path(OGG_INCLUDE_DIRS NAMES ogg/ogg.h HINTS ${PC_OGG_INCLUDE_DIRS} PATH_SUFFIXES ogg) +- find_library(OGG_LIBRARIES NAMES ogg HINTS ${PC_OGG_LIBRARY_DIRS}) ++ find_library(OGG_LIBRARIES NAMES ogg libogg HINTS ${PC_OGG_LIBRARY_DIRS}) + else() + find_path(OGG_INCLUDE_DIRS NAMES ogg/ogg.h HINTS ${OGG_ROOT}/include PATH_SUFFIXES ogg) +- find_library(OGG_LIBRARIES NAMES ogg HINTS ${OGG_ROOT}/lib ${OGG_ROOT}/lib64) ++ find_library(OGG_LIBRARIES NAMES ogg libogg HINTS ${OGG_ROOT}/lib ${OGG_ROOT}/lib64) + endif() + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(OGG DEFAULT_MSG OGG_INCLUDE_DIRS OGG_LIBRARIES) diff --git a/ports/libvorbis/portfile.cmake b/ports/libvorbis/portfile.cmake index 504aeaf22..0e1ef5d42 100644 --- a/ports/libvorbis/portfile.cmake +++ b/ports/libvorbis/portfile.cmake @@ -8,27 +8,12 @@ vcpkg_from_github( PATCHES 0001-Dont-export-vorbisenc-functions.patch 0002-Allow-deprecated-functions.patch + ogg.patch ) -file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" OGG_INCLUDE) -foreach(LIBNAME ogg.lib libogg.a libogg.dylib libogg.so) - if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/${LIBNAME}" OR EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/${LIBNAME}") - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/${LIBNAME}" OGG_LIB_REL) - file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/${LIBNAME}" OGG_LIB_DBG) - break() - endif() -endforeach() - -if(NOT OGG_LIB_REL) - message(FATAL_ERROR "Could not find libraries for dependency libogg!") -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DOGG_INCLUDE_DIRS=${OGG_INCLUDE} - OPTIONS_RELEASE -DOGG_LIBRARIES=${OGG_LIB_REL} - OPTIONS_DEBUG -DOGG_LIBRARIES=${OGG_LIB_DBG} ) vcpkg_install_cmake() @@ -38,4 +23,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/libvorbis/copyright COPYONLY) -vcpkg_copy_pdbs() +vcpkg_copy_pdbs() |
