aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorahugeat <hugeat.arthur@gmail.com>2020-07-31 20:28:21 +0200
committerGitHub <noreply@github.com>2020-07-31 11:28:21 -0700
commit31cf09e10898f5fc2d9e02904ca7f5394fe84541 (patch)
tree0fe331a97b66acfb47409579378e1fe4e90917ec
parent092267fd50338d4e1a34e6dd391736bb4ad1fbda (diff)
downloadvcpkg-31cf09e10898f5fc2d9e02904ca7f5394fe84541.tar.gz
vcpkg-31cf09e10898f5fc2d9e02904ca7f5394fe84541.zip
[gf] Add the new package GF (#12426)
* [gf] Add the new package GF * Update CONTROL * Update portfile.cmake * Try to fix failed builds * fix x64-linux build for vcpkg * remove nuklear from dependencies * use vcpkg_fail_port_install to fail early on arm * fix x64-windows build * change the name of the source in CONTROL * change the name of the directory * fix cmake install directory Co-authored-by: Lily <47812810+LilyWangL@users.noreply.github.com> Co-authored-by: Julien Bernard <julien.bernard@univ-fcomte.fr>
-rw-r--r--ports/gamedev-framework/CONTROL6
-rw-r--r--ports/gamedev-framework/portfile.cmake48
2 files changed, 54 insertions, 0 deletions
diff --git a/ports/gamedev-framework/CONTROL b/ports/gamedev-framework/CONTROL
new file mode 100644
index 000000000..851a07f95
--- /dev/null
+++ b/ports/gamedev-framework/CONTROL
@@ -0,0 +1,6 @@
+Source: gamedev-framework
+Version: 0.17
+Homepage: https://github.com/GamedevFramework/gf
+Description: gf is a framework to build 2D games in C++14.
+Build-Depends: sdl2, freetype, zlib, boost-algorithm, boost-filesystem, boost-heap, boost-container, stb, pugixml
+Supports: !arm
diff --git a/ports/gamedev-framework/portfile.cmake b/ports/gamedev-framework/portfile.cmake
new file mode 100644
index 000000000..8ee146e65
--- /dev/null
+++ b/ports/gamedev-framework/portfile.cmake
@@ -0,0 +1,48 @@
+vcpkg_fail_port_install(
+ ON_ARCH "arm"
+)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO GamedevFramework/gf
+ HEAD_REF master
+ REF v0.17.4
+ SHA512 b35e0fef3c9dc397ec43132dcd6ca87f78217c55d72fc1117b1f530d568ad3537a0f682e285840471faa4e06eb7f396b784da767e83686519d0694b198a86379
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DGF_VCPKG=ON
+ -DGF_USE_EMBEDDED_LIBS=OFF
+ -DGF_BUILD_GAMES=OFF
+ -DGF_BUILD_EXAMPLES=OFF
+ -DGF_BUILD_TESTS=OFF
+ -DGF_BUILD_DOCUMENTATION=OFF
+ -DGF_SINGLE_COMPILTATION_UNIT=ON
+ -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
+ OPTIONS_RELEASE -DGF_DEBUG=OFF
+ OPTIONS_DEBUG -DGF_DEBUG=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gf)
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/debug/share"
+ "${CURRENT_PACKAGES_DIR}/debug/include"
+ "${CURRENT_PACKAGES_DIR}/share/doc"
+ "${CURRENT_PACKAGES_DIR}/debug/bin/gf_info.exe"
+ "${CURRENT_PACKAGES_DIR}/bin/gf_info.exe"
+)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(REMOVE_RECURSE
+ "${CURRENT_PACKAGES_DIR}/bin"
+ "${CURRENT_PACKAGES_DIR}/debug/bin"
+ )
+endif()
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)