[libogg] use vcpkg_from_github

This commit is contained in:
atkawa7 2017-07-27 20:08:28 -07:00
parent 6c22dbea97
commit 2b27fdec67
2 changed files with 12 additions and 36 deletions

View File

@ -1,3 +1,3 @@
Source: libogg
Version: 1.3.2
Version: 2017-07-27-cab46b19847
Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs.

View File

@ -1,44 +1,20 @@
# 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)
find_program(GIT git)
set(GIT_URL "https://git.xiph.org/ogg.git")
set(GIT_REF "cab46b19847eb1d38aeda73ab4708716e5776366")
if(NOT EXISTS "${DOWNLOADS}/ogg.git")
message(STATUS "Cloning")
vcpkg_execute_required_process(
COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/ogg.git
WORKING_DIRECTORY ${DOWNLOADS}
LOGNAME clone
)
endif()
if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git")
message(STATUS "Adding worktree")
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR})
vcpkg_execute_required_process(
COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REF}
WORKING_DIRECTORY ${DOWNLOADS}/ogg.git
LOGNAME worktree
)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO xiph/ogg
REF cab46b19847eb1d38aeda73ab4708716e5776366
SHA512 3a5add81210a699c219ef3cef52ed71e00069dfee160aaf23bb68126f768a57139a77022f8c7bec88143a9393865a1e81b0a4c4e7b9e7f533dc665d656e99d90
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src
SOURCE_PATH ${SOURCE_PATH}
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(COPY ${CURRENT_BUILDTREES_DIR}/src/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libogg)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libogg/COPYING ${CURRENT_PACKAGES_DIR}/share/libogg/copyright)
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libogg RENAME copyright)