diff --git a/package/wampcc/0004-Make-compatible-with-CMake-3.8.1.patch b/package/wampcc/0004-Make-compatible-with-CMake-3.8.1.patch new file mode 100644 index 0000000000..69e656a3a6 --- /dev/null +++ b/package/wampcc/0004-Make-compatible-with-CMake-3.8.1.patch @@ -0,0 +1,35 @@ +From 95cbe3bb3e7cfa32b96356edbd3ce7a8a3bb9018 Mon Sep 17 00:00:00 2001 +From: GHANNADZADEH Saman +Date: Mon, 4 Mar 2019 16:21:40 +0000 +Subject: [PATCH] Make compatible with CMake 3.8.1 + +This ups the minimum CMake version, and declares th package version in +the `project(...)` command to be compatible with CMake policy CMP0047. + +Upstream: https://github.com/darrenjs/wampcc/commit/95cbe3bb3e7cfa32b96356edbd3ce7a8a3bb9018 + +Signed-off-by: Bernd Kuhls +--- + CMakeLists.txt | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5ae1a370..251e0caa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,11 +1,11 @@ +-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) ++cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) + +-project(wampcc) +- +-# Version number + set (WAMPCC_VERSION_MAJOR 1) + set (WAMPCC_VERSION_MINOR 6) + set (WAMPCC_VERSION "${WAMPCC_VERSION_MAJOR}.${WAMPCC_VERSION_MINOR}") ++project(wampcc VERSION ${WAMPCC_VERSION}) ++ ++# Version number + # Include extra cmake modules + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") + diff --git a/package/wampcc/0005-Build-Debian-packages-using-CPack.patch b/package/wampcc/0005-Build-Debian-packages-using-CPack.patch new file mode 100644 index 0000000000..6984b47e57 --- /dev/null +++ b/package/wampcc/0005-Build-Debian-packages-using-CPack.patch @@ -0,0 +1,69 @@ +From 36ef37248c1608a366846d17d60fec217e515377 Mon Sep 17 00:00:00 2001 +From: GHANNADZADEH Saman +Date: Mon, 4 Mar 2019 16:28:36 +0000 +Subject: [PATCH] Build Debian packages using CPack + +Upstream: https://github.com/darrenjs/wampcc/commit/36ef37248c1608a366846d17d60fec217e515377 + +Signed-off-by: Bernd Kuhls +--- + CMakeLists.txt | 5 ++++- + cmake/MakeDebPackages.cmake | 26 ++++++++++++++++++++++++++ + 2 files changed, 30 insertions(+), 1 deletion(-) + create mode 100644 cmake/MakeDebPackages.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0a8b528d..a9fb364c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,7 +7,7 @@ project(wampcc VERSION ${WAMPCC_VERSION}) + + # Version number + # Include extra cmake modules +-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") ++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake") + + + ## +@@ -37,6 +37,9 @@ set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation dire + set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers") + set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files") + ++# Allow settin of RPATH for install ++SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) ++ + ## + ## Platform checks, and generate config.h + ## +diff --git a/cmake/MakeDebPackages.cmake b/cmake/MakeDebPackages.cmake +new file mode 100644 +index 00000000..66ecb336 +--- /dev/null ++++ b/cmake/MakeDebPackages.cmake +@@ -0,0 +1,26 @@ ++set(CPACK_PACKAGE_VENDOR "Darren Smith") ++SET(CPACK_PACKAGE_CONTACT "Darren Smith") ++ ++set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/lib") ++ ++SET(CPACK_GENERATOR "DEB") ++SET(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) ++set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) ++set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) ++ ++set(CPACK_DEB_COMPONENT_INSTALL ON) ++set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS YES) ++ ++set(CPACK_COMPONENTS_ALL lib dev) ++set(CPACK_COMPONENT_DEV_DEPENDS lib) ++ ++set(CPACK_DEBIAN_LIB_PACKAGE_NAME libwampcc) ++set(CPACK_DEBIAN_DEV_PACKAGE_NAME libwampcc-dev) ++ ++if(BUILD_UTILS) ++ list(APPEND CPACK_COMPONENTS_ALL util) ++ set(CPACK_COMPONENT_UTIL_DEPENDS lib) ++ set(CPACK_DEBIAN_UTIL_PACKAGE_NAME wampcc-utils) ++endif() ++ ++include(CPack) diff --git a/package/wampcc/0006-Use-CMake-policy-to-set-MSVC-runtime-options.patch b/package/wampcc/0006-Use-CMake-policy-to-set-MSVC-runtime-options.patch new file mode 100644 index 0000000000..5fedd90ad2 --- /dev/null +++ b/package/wampcc/0006-Use-CMake-policy-to-set-MSVC-runtime-options.patch @@ -0,0 +1,38 @@ +From 047f8742e721db4d0e91bb6313ec668900975de3 Mon Sep 17 00:00:00 2001 +From: Saman Ghannadzadeh +Date: Fri, 8 Sep 2023 15:09:23 +0100 +Subject: [PATCH] Use CMake policy to set MSVC runtime options + +Currently, we manually set the MSVC flags to set the runtime to be +static or dynamic. This commit switches to letting CMake automatically do this, +instead of us manually setting flags. + +This should make the CMake recipe more robust. + +Upstream: https://github.com/darrenjs/wampcc/commit/047f8742e721db4d0e91bb6313ec668900975de3 + +Signed-off-by: Bernd Kuhls +[backported for 1.6] +--- + CMakeLists.txt | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7c261cb..28e1965 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,10 +1,13 @@ +-cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) ++cmake_minimum_required(VERSION 3.15.0 FATAL_ERROR) + + set (WAMPCC_VERSION_MAJOR 1) + set (WAMPCC_VERSION_MINOR 6) + set (WAMPCC_VERSION "${WAMPCC_VERSION_MAJOR}.${WAMPCC_VERSION_MINOR}") + project(wampcc VERSION ${WAMPCC_VERSION}) + ++# Allows for setting MSVC static runtime ++cmake_policy(SET CMP0091 NEW) ++ + # Version number + # Include extra cmake modules + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake")