mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
websocketpp, new recipe (#4384)
This commit is contained in:
141
dev-cpp/websocketpp/patches/websocketpp-0.8.1.patchset
Normal file
141
dev-cpp/websocketpp/patches/websocketpp-0.8.1.patchset
Normal file
@@ -0,0 +1,141 @@
|
||||
From 8b262621b4de9546744e187bfcd978067687c80f Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sat, 14 Sep 2019 10:27:13 +0200
|
||||
Subject: Set correct path for $includeDir (merged upstream)
|
||||
|
||||
|
||||
diff --git a/cmake/CMakeHelpers.cmake b/cmake/CMakeHelpers.cmake
|
||||
index 1478f4b..f603632 100644
|
||||
--- a/cmake/CMakeHelpers.cmake
|
||||
+++ b/cmake/CMakeHelpers.cmake
|
||||
@@ -80,7 +80,7 @@ macro (final_target)
|
||||
endif ()
|
||||
|
||||
install (DIRECTORY ${CMAKE_SOURCE_DIR}/${TARGET_NAME}
|
||||
- DESTINATION include/
|
||||
+ DESTINATION ${INSTALL_INCLUDE_DIR}/
|
||||
FILES_MATCHING PATTERN "*.hpp*")
|
||||
endmacro ()
|
||||
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From 96ca41275f85a4c1d6a8e18066462d89f4a09428 Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sat, 14 Sep 2019 14:38:58 +0200
|
||||
Subject: Update version number in CMakeList.txt (import merged PR)
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2786aba..2d13117 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -24,7 +24,7 @@ endif ()
|
||||
############ Project name and version
|
||||
set (WEBSOCKETPP_MAJOR_VERSION 0)
|
||||
set (WEBSOCKETPP_MINOR_VERSION 8)
|
||||
-set (WEBSOCKETPP_PATCH_VERSION 0)
|
||||
+set (WEBSOCKETPP_PATCH_VERSION 1)
|
||||
set (WEBSOCKETPP_VERSION ${WEBSOCKETPP_MAJOR_VERSION}.${WEBSOCKETPP_MINOR_VERSION}.${WEBSOCKETPP_PATCH_VERSION})
|
||||
|
||||
if(POLICY CMP0048)
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From a856149c76031db2e54e540a9b46eb8157fbe16c Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Sat, 28 Sep 2019 08:08:30 +0200
|
||||
Subject: Add Haiku changes (PR upstreamed)
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2d13117..413935c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -123,7 +123,15 @@ if (BUILD_TESTS OR BUILD_EXAMPLES)
|
||||
|
||||
# g++
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
+ if (NOT APPLE AND NOT HAIKU)
|
||||
set (WEBSOCKETPP_PLATFORM_LIBS pthread rt)
|
||||
+ else()
|
||||
+ if (HAIKU)
|
||||
+ set (WEBSOCKETPP_PLATFORM_LIBS pthread network)
|
||||
+ else()
|
||||
+ set (WEBSOCKETPP_PLATFORM_LIBS pthread)
|
||||
+ endif()
|
||||
+ endif()
|
||||
set (WEBSOCKETPP_PLATFORM_TLS_LIBS ssl crypto)
|
||||
set (WEBSOCKETPP_BOOST_LIBS system thread)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
@@ -141,11 +149,15 @@ if (BUILD_TESTS OR BUILD_EXAMPLES)
|
||||
|
||||
# clang
|
||||
if (CMAKE_COMPILER_IS_CLANGXX)
|
||||
- if (NOT APPLE)
|
||||
+ if (NOT APPLE AND NOT HAIKU)
|
||||
set (WEBSOCKETPP_PLATFORM_LIBS pthread rt)
|
||||
+ else()
|
||||
+ if (HAIKU)
|
||||
+ set (WEBSOCKETPP_PLATFORM_LIBS pthread network)
|
||||
else()
|
||||
set (WEBSOCKETPP_PLATFORM_LIBS pthread)
|
||||
endif()
|
||||
+ endif()
|
||||
set (WEBSOCKETPP_PLATFORM_TLS_LIBS ssl crypto)
|
||||
set (WEBSOCKETPP_BOOST_LIBS system thread)
|
||||
set (CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++0x -stdlib=libc++") # todo: is libc++ really needed here?
|
||||
@@ -202,7 +214,7 @@ if (BUILD_TESTS OR BUILD_EXAMPLES)
|
||||
endif ()
|
||||
|
||||
if (NOT Boost_USE_STATIC_LIBS)
|
||||
- add_definitions (/DBOOST_TEST_DYN_LINK)
|
||||
+ add_definitions (-DBOOST_TEST_DYN_LINK)
|
||||
endif ()
|
||||
|
||||
set (Boost_FIND_REQUIRED TRUE)
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From fc459b5f1637c1394bb49e31268a1dddb15d350e Mon Sep 17 00:00:00 2001
|
||||
From: begasus <begasus@gmail.com>
|
||||
Date: Mon, 18 Nov 2019 08:32:36 +0100
|
||||
Subject: Disable tests test_transport and test_transport_asio_timers (known issues)
|
||||
|
||||
|
||||
diff --git a/test/transport/CMakeLists.txt b/test/transport/CMakeLists.txt
|
||||
index 6b44d98..e54885a 100644
|
||||
--- a/test/transport/CMakeLists.txt
|
||||
+++ b/test/transport/CMakeLists.txt
|
||||
@@ -1,25 +1,5 @@
|
||||
if (OPENSSL_FOUND)
|
||||
|
||||
-# Test transport integration
|
||||
-file (GLOB SOURCE integration.cpp)
|
||||
-
|
||||
-init_target (test_transport)
|
||||
-build_test (${TARGET_NAME} ${SOURCE})
|
||||
-link_boost ()
|
||||
-link_openssl()
|
||||
-final_target ()
|
||||
-set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "test")
|
||||
-
|
||||
-# Test transport asio timers
|
||||
-file (GLOB SOURCE asio/timers.cpp)
|
||||
-
|
||||
-init_target (test_transport_asio_timers)
|
||||
-build_test (${TARGET_NAME} ${SOURCE})
|
||||
-link_boost ()
|
||||
-link_openssl()
|
||||
-final_target ()
|
||||
-set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "test")
|
||||
-
|
||||
# Test transport asio security
|
||||
file (GLOB SOURCE asio/security.cpp)
|
||||
|
||||
--
|
||||
2.24.0
|
||||
|
||||
75
dev-cpp/websocketpp/websocketpp-0.8.1.recipe
Normal file
75
dev-cpp/websocketpp/websocketpp-0.8.1.recipe
Normal file
@@ -0,0 +1,75 @@
|
||||
SUMMARY="Websocket++ header-only library"
|
||||
DESCRIPTION="WebSocket++ is a header only C++ library that implements RFC6455 \
|
||||
The WebSocket Protocol. It allows integrating WebSocket client and server \
|
||||
functionality into C++ programs. It uses interchangeable network transport \
|
||||
modules including one based on raw char buffers, one based on C++ iostreams, \
|
||||
and one based on Asio (either via Boost or standalone). End users can write \
|
||||
additional transport policies to support other networking or event libraries \
|
||||
as needed."
|
||||
HOMEPAGE="https://github.com/zaphoyd/websocketpp"
|
||||
COPYRIGHT="2018, Peter Thorson"
|
||||
LICENSE="BSD (2-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/zaphoyd/websocketpp/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="178899de48c02853b55b1ea8681599641cedcdfce59e56beaff3dd0874bf0286"
|
||||
PATCHES="websocketpp-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
websocketpp$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
devel:libboost_system$secondaryArchSuffix
|
||||
devel:libboost_thread$secondaryArchSuffix
|
||||
devel:libboost_unit_test_framework$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
fi
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
||||
TESTS=ON
|
||||
else
|
||||
TESTS=OFF
|
||||
fi
|
||||
mkdir -p build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release \
|
||||
-DENABLE_CPP11=ON \
|
||||
-DBUILD_TESTS=$TESTS \
|
||||
-DCMAKE_INSTALL_PREFIX=$prefix \
|
||||
-DINSTALL_INCLUDE_DIR:PATH=$includeDir \
|
||||
-DINSTALL_CMAKE_DIR:PATH=$libDir/cmake
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
# we don't want the test binaries installed
|
||||
rm -rf $prefix/bin
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd build
|
||||
make test
|
||||
}
|
||||
Reference in New Issue
Block a user