aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSztergbaum Roman <roman.sztergbaum@epitech.eu>2018-06-26 04:43:00 +0000
committerRobert Schumacher <roschuma@microsoft.com>2018-06-25 21:43:00 -0700
commitbb5303c6e11b13acb39e6c6dbdee1c10c62a761c (patch)
tree4f80d3fee4612066f808eb4550ddada9ee38abbb
parent1ab58d7315a0239366a7643aef4e1edd390990ba (diff)
downloadvcpkg-bb5303c6e11b13acb39e6c6dbdee1c10c62a761c.tar.gz
vcpkg-bb5303c6e11b13acb39e6c6dbdee1c10c62a761c.zip
[sol2] rename port sol to sol2 and fix the full port (#3766)
* [sol2] rename port sol to sol2 and fix the full port * [sol2] Simplification and cleanup. Don't remove upstream's include directory.
-rw-r--r--ports/sol/portfile.cmake14
-rw-r--r--ports/sol2/CONTROL (renamed from ports/sol/CONTROL)4
-rw-r--r--ports/sol2/portfile.cmake25
-rw-r--r--ports/sol2/sol2_fix_install_interface.patch22
-rw-r--r--ports/sol2/sol2_fix_targets.patch39
5 files changed, 88 insertions, 16 deletions
diff --git a/ports/sol/portfile.cmake b/ports/sol/portfile.cmake
deleted file mode 100644
index 8e6516d9a..000000000
--- a/ports/sol/portfile.cmake
+++ /dev/null
@@ -1,14 +0,0 @@
-include(vcpkg_common_functions)
-
-vcpkg_from_github(
- OUT_SOURCE_PATH SOURCE_PATH
- REPO ThePhD/sol2
- REF f8ee7abe527a9e8414fc4965e5cbd0f8395fbeae
- SHA512 6bf090deb3b664e9585672b8f85275b76c53eddc7fe206ceec943522195bb726e976c946b59cc23863bc7e0feab36f4fe1a6a7a5dae3f9c2ec5c64060014afbf
- HEAD_REF develop
-)
-
-file(INSTALL ${SOURCE_PATH}/single/sol/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/)
-
-# Handle copyright
-file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sol RENAME copyright)
diff --git a/ports/sol/CONTROL b/ports/sol2/CONTROL
index aa276b1f2..9314cfcd6 100644
--- a/ports/sol/CONTROL
+++ b/ports/sol2/CONTROL
@@ -1,3 +1,3 @@
-Source: sol
-Version: 2.20.0-1
+Source: sol2
+Version: 2.20.3-1
Description: Sol v2.0 - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great
diff --git a/ports/sol2/portfile.cmake b/ports/sol2/portfile.cmake
new file mode 100644
index 000000000..d51bf25a1
--- /dev/null
+++ b/ports/sol2/portfile.cmake
@@ -0,0 +1,25 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ThePhD/sol2
+ REF v2.20.3
+ SHA512 f1d39a6762c7c9c40bffd08129a80c4c8dd70ffcaadc195cbcd681471e6978176d0ae06d4b8db6aabc05b0ae2670c10bd287b9e859ec7810f2441c3c6c8fe521
+ HEAD_REF develop
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/sol2_fix_targets.patch
+ ${CMAKE_CURRENT_LIST_DIR}/sol2_fix_install_interface.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sol2)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sol2 RENAME copyright)
diff --git a/ports/sol2/sol2_fix_install_interface.patch b/ports/sol2/sol2_fix_install_interface.patch
new file mode 100644
index 000000000..6b2daf66a
--- /dev/null
+++ b/ports/sol2/sol2_fix_install_interface.patch
@@ -0,0 +1,22 @@
+From d72b243c717159b2e44f2dc12d25752be578e2ec Mon Sep 17 00:00:00 2001
+From: Roman Sztergbaum <roman.sztergbaum@epitech.eu>
+Date: Sat, 23 Jun 2018 10:43:51 +0200
+Subject: [PATCH] fix install interface
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index abd298f8..ba52ded8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -141,7 +141,7 @@ CMAKE_DEPENDENT_OPTION(TESTS_DYNAMIC_LOADING_EXAMPLES "Enable build of dynamic l
+ add_library(sol2 INTERFACE)
+ target_include_directories(sol2 INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+- $<INSTALL_INTERFACE:include/sol>)
++ $<INSTALL_INTERFACE:include/sol> $<INSTALL_INTERFACE:include>)
+
+ # # Version configurations
+ configure_package_config_file(
diff --git a/ports/sol2/sol2_fix_targets.patch b/ports/sol2/sol2_fix_targets.patch
new file mode 100644
index 000000000..68b6088b0
--- /dev/null
+++ b/ports/sol2/sol2_fix_targets.patch
@@ -0,0 +1,39 @@
+From c53fa6d2b5f59d737b830021eb0872622b2058a2 Mon Sep 17 00:00:00 2001
+From: Roman Sztergbaum <roman.sztergbaum@epitech.eu>
+Date: Fri, 22 Jun 2018 22:02:11 +0200
+Subject: [PATCH] fix sol2-config.cmake.in
+
+---
+ cmake/sol2-config.cmake.in | 21 ++++++++++++---------
+ 1 file changed, 12 insertions(+), 9 deletions(-)
+
+diff --git a/cmake/sol2-config.cmake.in b/cmake/sol2-config.cmake.in
+index 9c69beb4..c15c0e5d 100644
+--- a/cmake/sol2-config.cmake.in
++++ b/cmake/sol2-config.cmake.in
+@@ -26,13 +26,16 @@ include("${CMAKE_CURRENT_LIST_DIR}/sol2-targets.cmake")
+
+ MESSAGE(STATUS ${CMAKE_CURRENT_LIST_DIR})
+
+-get_target_property(SOL_INCLUDE_DIRS
+- sol2 INTERFACE_INCLUDE_DIRECTORIES)
++if (TARGET sol2)
++ get_target_property(SOL2_INCLUDE_DIRS
++ sol2 INTERFACE_INCLUDE_DIRECTORIES)
++ set_and_check(SOL2_INCLUDE_DIRS "${SOL2_INCLUDE_DIRS}")
++ set(SOL2_LIBRARIES sol2)
++endif()
+
+-get_target_property(SOL_SINGLE_INCLUDE_DIRS
+- sol2_single INTERFACE_INCLUDE_DIRECTORIES)
+-
+-set_and_check(SOL2_INCLUDE_DIRS "${SOL2_INCLUDE_DIRS}")
+-set_and_check(SOL2_INCLUDE_DIRS "${SOL2_SINGLE_INCLUDE_DIRS}")
+-set(SOL2_LIBRARIES sol2)
+-set(SOL2_LIBRARIES_SINGLE sol2_single)
++if(TARGET sol2_single)
++ get_target_property(SOL_SINGLE_INCLUDE_DIRS
++ sol2_single INTERFACE_INCLUDE_DIRECTORIES)
++ set_and_check(SOL2_INCLUDE_DIRS "${SOL2_SINGLE_INCLUDE_DIRS}")
++ set(SOL2_LIBRARIES_SINGLE sol2_single)
++endif()