aboutsummaryrefslogtreecommitdiff
path: root/ports/cppmicroservices
diff options
context:
space:
mode:
authorSascha Zelzer <sascha.zelzer@gmail.com>2019-07-06 23:44:54 +0200
committerdan-shaw <51385773+dan-shaw@users.noreply.github.com>2019-07-06 14:44:54 -0700
commit1000d8291be8c7d2c2283efc3fc4a0bb886a483e (patch)
treebe210a0732a5900f19faed1912031e8150eccb26 /ports/cppmicroservices
parent2b8e225b2ea83a3138d4b7345f104c1bd9a129dd (diff)
downloadvcpkg-1000d8291be8c7d2c2283efc3fc4a0bb886a483e.tar.gz
vcpkg-1000d8291be8c7d2c2283efc3fc4a0bb886a483e.zip
[cppmicroservices] Add new port (fix #5801) (#6388)
* [cppmicroservices] Add new port (fix #5801) * turn off linker error checking for static building * remove comments and include * werror flag patch * fix cmake targets
Diffstat (limited to 'ports/cppmicroservices')
-rw-r--r--ports/cppmicroservices/CONTROL3
-rw-r--r--ports/cppmicroservices/portfile.cmake32
-rw-r--r--ports/cppmicroservices/werror.patch13
3 files changed, 48 insertions, 0 deletions
diff --git a/ports/cppmicroservices/CONTROL b/ports/cppmicroservices/CONTROL
new file mode 100644
index 000000000..9a53e06b1
--- /dev/null
+++ b/ports/cppmicroservices/CONTROL
@@ -0,0 +1,3 @@
+Source: cppmicroservices
+Version: 4.0.0-pre1
+Description: An OSGi-like C++ dynamic module system and service registry
diff --git a/ports/cppmicroservices/portfile.cmake b/ports/cppmicroservices/portfile.cmake
new file mode 100644
index 000000000..d0edb6374
--- /dev/null
+++ b/ports/cppmicroservices/portfile.cmake
@@ -0,0 +1,32 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO "CppMicroServices/CppMicroservices"
+ REF b322441568f903ef96c0ccb03e2611d052ceb4e0
+ SHA512 1673dfe9dba913890ec93e351263a924437a0d739a5858dcdc07650e1aaca30c3b4fcce59e32b201c1d65e15eb82e27912d759e4d07ecc149ae8a4f9eb1669bc
+ HEAD_REF development
+ PATCHES werror.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ OPTIONS
+ -DTOOLS_INSTALL_DIR:STRING=tools/cppmicroservices
+ -DAUXILIARY_INSTALL_DIR:STRING=share/cppmicroservices
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppmicroservices RENAME copyright)
+
+vcpkg_fixup_cmake_targets()
+
+# CppMicroServices uses a custom resource compiler to compile resources
+# the zipped resources are then appended to the target which cause the linker to crash
+# when compiling a static library
+if(NOT BUILD_SHARED_LIBS)
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
+endif()
diff --git a/ports/cppmicroservices/werror.patch b/ports/cppmicroservices/werror.patch
new file mode 100644
index 000000000..b06f43a72
--- /dev/null
+++ b/ports/cppmicroservices/werror.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 24fd87e..974064c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -382,7 +382,7 @@ else()
+ usFunctionCheckCompilerFlags(-fstack-protector-all US_CXX_FLAGS)
+ endif()
+
+- foreach(_cxxflag -Werror -Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align
++ foreach(_cxxflag -Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align
+ -Wwrite-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wold-style-cast
+ -Wstrict-null-sentinel -Wsign-promo -fdiagnostics-show-option )
+ usFunctionCheckCompilerFlags(${_cxxflag} US_CXX_FLAGS)