From 823e6a2abf52eb37f3f819145c7091d37b77d57a Mon Sep 17 00:00:00 2001 From: Roman Sztergbaum Date: Sun, 10 Jun 2018 16:26:25 +0200 Subject: [PATCH 1/2] [shiva] add a port of shiva c++ engine --- ports/shiva/CONTROL | 4 ++++ ports/shiva/portfile.cmake | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 ports/shiva/CONTROL create mode 100644 ports/shiva/portfile.cmake diff --git a/ports/shiva/CONTROL b/ports/shiva/CONTROL new file mode 100644 index 0000000000..edd7136d4e --- /dev/null +++ b/ports/shiva/CONTROL @@ -0,0 +1,4 @@ +Source: shiva +Version: 0.1 +Description: Modern C++ Game Engine +Build-Depends: boost-stacktrace, boost-filesystem, entt, eastl diff --git a/ports/shiva/portfile.cmake b/ports/shiva/portfile.cmake new file mode 100644 index 0000000000..bbe1400d3a --- /dev/null +++ b/ports/shiva/portfile.cmake @@ -0,0 +1,35 @@ +# Common Ambient Variables: +# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} +# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} +# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} +# PORT = current port name (zlib, etc) +# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) +# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) +# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) +# VCPKG_ROOT_DIR = +# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) +# + +include(vcpkg_common_functions) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/shiva-0.1) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/Milerius/shiva/archive/0.1.zip" + FILENAME "shiva.zip" + SHA512 8c736af68f7e82cfce3a90bfedb310f132f78bb3c2c5d0e83899761526ceccab8c72b47674c825b53428d4c97355656954d231e9eaed062be8e498746c4fb2ad +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DSHIVA_BUILD_TESTS=OFF + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/shiva) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/shiva-0.1/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shiva) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/shiva/LICENSE ${CURRENT_PACKAGES_DIR}/share/shiva/copyright) \ No newline at end of file From 220e086d12457c8b2071fefb514a777fc3853761 Mon Sep 17 00:00:00 2001 From: roman Sztergbaum Date: Wed, 13 Jun 2018 00:00:16 +0200 Subject: [PATCH 2/2] [shiva] modernize portfile --- ports/shiva/portfile.cmake | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/ports/shiva/portfile.cmake b/ports/shiva/portfile.cmake index bbe1400d3a..b0b1af7f9e 100644 --- a/ports/shiva/portfile.cmake +++ b/ports/shiva/portfile.cmake @@ -1,35 +1,22 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/shiva-0.1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/Milerius/shiva/archive/0.1.zip" - FILENAME "shiva.zip" - SHA512 8c736af68f7e82cfce3a90bfedb310f132f78bb3c2c5d0e83899761526ceccab8c72b47674c825b53428d4c97355656954d231e9eaed062be8e498746c4fb2ad + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Milerius/shiva + REF 0.1 + SHA512 16921b997071e5717b9207e2fe6e4595759fd8bf872ac1f37c57b01b59e9dbe8f4f16140556ea4ee69966458360d01635caef70fb864f0ec1d43f7b63e009952 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja + PREFER_NINJA OPTIONS -DSHIVA_BUILD_TESTS=OFF - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/shiva) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/shiva-0.1/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shiva) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shiva) file(RENAME ${CURRENT_PACKAGES_DIR}/share/shiva/LICENSE ${CURRENT_PACKAGES_DIR}/share/shiva/copyright) \ No newline at end of file