aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLyle Tafoya <lyle.tafoya@gmail.com>2018-10-12 04:12:10 +0000
committerRobert Schumacher <roschuma@microsoft.com>2018-10-11 21:12:10 -0700
commitadcf87465f11421a0dc4edad5ee6befbf28c2372 (patch)
tree4672f05ce14b792932c5e7f58776253d3f66e51e
parent4ff1f5022194e650e12fa5703f51f81cc3bfef6a (diff)
downloadvcpkg-adcf87465f11421a0dc4edad5ee6befbf28c2372.tar.gz
vcpkg-adcf87465f11421a0dc4edad5ee6befbf28c2372.zip
Fixes #4422 dynamic build failure on Linux (#4423)
* Fixes #4422 dynamic build failure on Linux * [libvorbis] Adapt to modern best practices. Test for files instead of using the platform.
-rw-r--r--ports/libvorbis/CONTROL2
-rw-r--r--ports/libvorbis/portfile.cmake45
2 files changed, 22 insertions, 25 deletions
diff --git a/ports/libvorbis/CONTROL b/ports/libvorbis/CONTROL
index 96b9ed8df..355d89e80 100644
--- a/ports/libvorbis/CONTROL
+++ b/ports/libvorbis/CONTROL
@@ -1,4 +1,4 @@
Source: libvorbis
-Version: 1.3.6-112d3bd
+Version: 1.3.6-112d3bd-1
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/portfile.cmake b/ports/libvorbis/portfile.cmake
index 6a862c84b..83db50e01 100644
--- a/ports/libvorbis/portfile.cmake
+++ b/ports/libvorbis/portfile.cmake
@@ -1,29 +1,27 @@
-# Common Ambient Variables:
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# TARGET_TRIPLET is the current triplet (x86-windows, etc)
-# PORT is the current port name (zlib, etc)
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-#
-
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/vorbis-112d3bd0aaacad51305e1464d4b381dabad0e88b)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/xiph/vorbis/archive/112d3bd0aaacad51305e1464d4b381dabad0e88b.zip"
- FILENAME "vorbis-112d3bd0aaacad51305e1464d4b381dabad0e88b.zip"
- SHA512 94e773a34f3e8d1c8ed0422f0eab345b35f76a96760141af83d69d007ebf076fca2d083a77d36bfa4ea10dfefa03a8fa35201aced963655ab8a524aaa7580b11
-)
-
-vcpkg_extract_source_archive(${ARCHIVE})
-vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO xiph/vorbis
+ REF 112d3bd0aaacad51305e1464d4b381dabad0e88b
+ SHA512 df20e072a5e024ca2b8fc0e2890bb8968c0c948a833149a6026d2eaf6ab57b88b6d00d0bfb3b8bfcf879c7875e7cfacb8c6bf454bfc083b41d76132c567ff7ae
+ HEAD_REF master
PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/0001-Dont-export-vorbisenc-functions.patch
- ${CMAKE_CURRENT_LIST_DIR}/0002-Allow-deprecated-functions.patch
+ 0001-Dont-export-vorbisenc-functions.patch
+ 0002-Allow-deprecated-functions.patch
)
-file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/include" OGG_INCLUDE)
-file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/lib/ogg.lib" OGG_LIB_REL)
-file(TO_NATIVE_PATH "${VCPKG_ROOT_DIR}/installed/${TARGET_TRIPLET}/debug/lib/ogg.lib" OGG_LIB_DBG)
+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}
@@ -38,7 +36,6 @@ vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
-file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libvorbis)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/libvorbis/COPYING ${CURRENT_PACKAGES_DIR}/share/libvorbis/copyright)
+configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/libvorbis/copyright COPYONLY)
vcpkg_copy_pdbs()