Initial Commit
- initial default booting image
This commit is contained in:
46
package/wampcc/0001-Add-RISC-V-endian-detection.patch
Normal file
46
package/wampcc/0001-Add-RISC-V-endian-detection.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
From e94589ed36c4a311355efc46ba3f76523c546057 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Wed, 7 Aug 2019 16:17:16 +0200
|
||||
Subject: [PATCH] Add RISC-V endian detection
|
||||
|
||||
3rdparty/msgpack-c/include/msgpack/predef/other/endian.h (which comes
|
||||
from Boost) two ways of detecting the endianess:
|
||||
|
||||
(1) It includes <endian.h> if BOOST_LIB_C_GNU is defined, and then
|
||||
use __BYTE_ORDER to decide the endianness.
|
||||
|
||||
(2) Otherwise, if (1) was not possible for some reason, it uses
|
||||
architecture defines to decide the endianness.
|
||||
|
||||
(1) works perfectly fine with glibc toolchains, because
|
||||
BOOST_LIB_C_GNU is defined, but it doesn't work with musl. Due to
|
||||
this, <endian.h> is not included, __BYTE_ORDER is not defined, and
|
||||
method (1) does not work, causing build failures on musl toolchains
|
||||
that don't have explicit handling by architecture name (method 2).
|
||||
|
||||
So this commit fixes RISC-V musl build by adding support for the
|
||||
__riscv architecture define, to determine that the endianness is
|
||||
little endian.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
3rdparty/msgpack-c/include/msgpack/predef/other/endian.h | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/3rdparty/msgpack-c/include/msgpack/predef/other/endian.h b/3rdparty/msgpack-c/include/msgpack/predef/other/endian.h
|
||||
index 3c609fa..63a5722 100644
|
||||
--- a/3rdparty/msgpack-c/include/msgpack/predef/other/endian.h
|
||||
+++ b/3rdparty/msgpack-c/include/msgpack/predef/other/endian.h
|
||||
@@ -127,7 +127,8 @@ information and acquired knowledge:
|
||||
defined(__AARCH64EL__) || \
|
||||
defined(_MIPSEL) || \
|
||||
defined(__MIPSEL) || \
|
||||
- defined(__MIPSEL__)
|
||||
+ defined(__MIPSEL__) || \
|
||||
+ defined(__riscv)
|
||||
# undef MSGPACK_ENDIAN_LITTLE_BYTE
|
||||
# define MSGPACK_ENDIAN_LITTLE_BYTE MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
--
|
||||
2.21.0
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 9c2559434b752df3dc8460ee242d321670a40847 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Mon, 1 Jun 2020 11:41:54 +0200
|
||||
Subject: [PATCH] include/wampcc/platform.h: fix build with musl 1.2.0
|
||||
|
||||
Fix the following build failure on musl 1.2.0 due to time_t being on 64
|
||||
bits:
|
||||
|
||||
/home/naourr/work/instance-0/output-1/build/wampcc-1.6/libs/wampcc/utils.cc: In function 'std::__cxx11::string wampcc::local_timestamp()':
|
||||
/home/naourr/work/instance-0/output-1/build/wampcc-1.6/libs/wampcc/utils.cc:205:15: error: cannot convert 'wampcc::time_val::type_type*' {aka 'long int*'} to 'const time_t*' {aka 'const long long int*'}
|
||||
localtime_r(&now.sec, &parts);
|
||||
^~~~~~~~
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/da996e189220499b85efbdb541a891ac18db38c6
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/darrenjs/wampcc/pull/62]
|
||||
---
|
||||
include/wampcc/platform.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/wampcc/platform.h b/include/wampcc/platform.h
|
||||
index 24d0868..aebf950 100644
|
||||
--- a/include/wampcc/platform.h
|
||||
+++ b/include/wampcc/platform.h
|
||||
@@ -27,7 +27,7 @@ namespace wampcc
|
||||
struct time_val
|
||||
{
|
||||
#ifndef _WIN32
|
||||
- typedef long type_type;
|
||||
+ typedef time_t type_type;
|
||||
#else
|
||||
typedef __time64_t type_type;
|
||||
#endif
|
||||
--
|
||||
2.26.2
|
||||
|
||||
27
package/wampcc/0003-Broken-build-on-Windows.patch
Normal file
27
package/wampcc/0003-Broken-build-on-Windows.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
From eaa70a289288db1e8d90a2a9bcde435a8975fe74 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Lukashevich <sergey.lukashevi4@gmail.com>
|
||||
Date: Fri, 26 Jul 2019 21:58:34 +0300
|
||||
Subject: [PATCH] Broken build on Windows: "http_parser.h(66,18): error C2039:
|
||||
'runtime_error': is not a member of 'std'"
|
||||
|
||||
Add missing <stdexcept> include.
|
||||
|
||||
[Retrieved from:
|
||||
https://github.com/darrenjs/wampcc/commit/eaa70a289288db1e8d90a2a9bcde435a8975fe74]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
include/wampcc/http_parser.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/wampcc/http_parser.h b/include/wampcc/http_parser.h
|
||||
index a9405dd..4c20417 100644
|
||||
--- a/include/wampcc/http_parser.h
|
||||
+++ b/include/wampcc/http_parser.h
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
+#include <stdexcept>
|
||||
|
||||
// types brought in from nodejs http-parser project
|
||||
struct http_parser;
|
||||
35
package/wampcc/0004-Make-compatible-with-CMake-3.8.1.patch
Normal file
35
package/wampcc/0004-Make-compatible-with-CMake-3.8.1.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From 95cbe3bb3e7cfa32b96356edbd3ce7a8a3bb9018 Mon Sep 17 00:00:00 2001
|
||||
From: GHANNADZADEH Saman <saman.ghannadzadeh@oxinst.com>
|
||||
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 <bernd@kuhls.net>
|
||||
---
|
||||
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")
|
||||
|
||||
69
package/wampcc/0005-Build-Debian-packages-using-CPack.patch
Normal file
69
package/wampcc/0005-Build-Debian-packages-using-CPack.patch
Normal file
@@ -0,0 +1,69 @@
|
||||
From 36ef37248c1608a366846d17d60fec217e515377 Mon Sep 17 00:00:00 2001
|
||||
From: GHANNADZADEH Saman <saman.ghannadzadeh@oxinst.com>
|
||||
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 <bernd@kuhls.net>
|
||||
---
|
||||
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)
|
||||
@@ -0,0 +1,38 @@
|
||||
From 047f8742e721db4d0e91bb6313ec668900975de3 Mon Sep 17 00:00:00 2001
|
||||
From: Saman Ghannadzadeh <saman@saman-gh.co.uk>
|
||||
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 <bernd@kuhls.net>
|
||||
[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")
|
||||
32
package/wampcc/Config.in
Normal file
32
package/wampcc/Config.in
Normal file
@@ -0,0 +1,32 @@
|
||||
config BR2_PACKAGE_WAMPCC
|
||||
bool "wampcc"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
|
||||
depends on BR2_USE_MMU # libuv
|
||||
depends on !BR2_STATIC_LIBS # libuv
|
||||
depends on BR2_TOOLCHAIN_HAS_ATOMIC
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libuv
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::shared_future
|
||||
select BR2_PACKAGE_LIBUV
|
||||
select BR2_PACKAGE_JANSSON
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
help
|
||||
wampcc is a C++ library that implements the Web Application
|
||||
Messaging Protocol.
|
||||
|
||||
https://github.com/darrenjs/wampcc
|
||||
|
||||
comment "wampcc needs a toolchain w/ C++, NPTL, dynamic library, gcc >= 4.9"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_ATOMIC
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
|
||||
comment "wampcc needs a toolchain not affected by GCC bug 64735"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_ATOMIC
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
|
||||
3
package/wampcc/wampcc.hash
Normal file
3
package/wampcc/wampcc.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 b3c3633b4c6a74d7ac8a676a7ea30fbfde7ae19aa1fc37de3b8aa3a553b674a2 wampcc-1.6.tar.gz
|
||||
sha256 bd185b1ec8a292d42b42346757ff6e198073e13c1e080e9ea548d34dd42d30d8 LICENSE
|
||||
19
package/wampcc/wampcc.mk
Normal file
19
package/wampcc/wampcc.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
################################################################################
|
||||
#
|
||||
# wampcc
|
||||
#
|
||||
################################################################################
|
||||
|
||||
WAMPCC_VERSION = 1.6
|
||||
WAMPCC_SITE = $(call github,darrenjs,wampcc,v$(WAMPCC_VERSION))
|
||||
WAMPCC_DEPENDENCIES = host-pkgconf libuv jansson openssl
|
||||
WAMPCC_INSTALL_STAGING = YES
|
||||
WAMPCC_LICENSE = MIT
|
||||
WAMPCC_LICENSE_FILES = LICENSE
|
||||
|
||||
# Uses __atomic_fetch_add_8
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
||||
WAMPCC_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user