aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlj <vljn.ovi@gmail.com>2016-10-14 20:02:46 +0200
committervlj <vljn.ovi@gmail.com>2016-10-24 23:53:14 +0200
commit39521b4d2edc3860af783b3f9ccc1af734c5c65f (patch)
tree4ea5102d75848c660a35d1e8e141df49895b329e
parent75daaa519556ae52d0250da0a6504ee8c1fcf0f6 (diff)
downloadvcpkg-39521b4d2edc3860af783b3f9ccc1af734c5c65f.tar.gz
vcpkg-39521b4d2edc3860af783b3f9ccc1af734c5c65f.zip
Add libogg.
-rw-r--r--ports/libogg/CONTROL3
-rw-r--r--ports/libogg/portfile.cmake43
2 files changed, 46 insertions, 0 deletions
diff --git a/ports/libogg/CONTROL b/ports/libogg/CONTROL
new file mode 100644
index 000000000..266cf4c2b
--- /dev/null
+++ b/ports/libogg/CONTROL
@@ -0,0 +1,3 @@
+Source: libogg
+Version: 1.3.2
+Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs.
diff --git a/ports/libogg/portfile.cmake b/ports/libogg/portfile.cmake
new file mode 100644
index 000000000..8cd5a7a38
--- /dev/null
+++ b/ports/libogg/portfile.cmake
@@ -0,0 +1,43 @@
+# 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(${CMAKE_TRIPLET_FILE})
+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_configure_cmake(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src
+)
+
+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)