* [Buildroot] [PATCH v2 1/2] package/jsoncpp: add host variant
@ 2025-11-09 10:17 Dario Binacchi
2025-11-09 10:17 ` [Buildroot] [PATCH v2 2/2] package/drogon: new package Dario Binacchi
0 siblings, 1 reply; 3+ messages in thread
From: Dario Binacchi @ 2025-11-09 10:17 UTC (permalink / raw)
To: buildroot; +Cc: Bernd Kuhls, Dario Binacchi, Eric Le Bihan
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
no changes since v1
package/jsoncpp/jsoncpp.mk | 2 ++
1 file changed, 2 insertions(+)
diff --git a/package/jsoncpp/jsoncpp.mk b/package/jsoncpp/jsoncpp.mk
index 9915907ea8cf..319944abb7d6 100644
--- a/package/jsoncpp/jsoncpp.mk
+++ b/package/jsoncpp/jsoncpp.mk
@@ -11,5 +11,7 @@ JSONCPP_LICENSE_FILES = LICENSE
JSONCPP_CPE_ID_VALID = YES
JSONCPP_INSTALL_STAGING = YES
JSONCPP_CONF_OPTS = -Dtests=false
+HOST_JSONCPP_CONF_OPTS = -Dtests=false
$(eval $(meson-package))
+$(eval $(host-meson-package))
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2 2/2] package/drogon: new package
2025-11-09 10:17 [Buildroot] [PATCH v2 1/2] package/jsoncpp: add host variant Dario Binacchi
@ 2025-11-09 10:17 ` Dario Binacchi
2026-01-01 13:41 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Dario Binacchi @ 2025-11-09 10:17 UTC (permalink / raw)
To: buildroot; +Cc: Bernd Kuhls, Dario Binacchi, Eric Le Bihan
Drogon is a C++17/20 based HTTP application framework. It can be used to
easily build various types of web application server programs using C++.
Project page: https://github.com/drogonframework/drogon
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
Changes v1 -> v2:
- Drop BR2_ARCH_IS_64 dependency. It has been tested on imx6ull platform.
- Add DROGON_INSTALL_STAGING
- Add 0004-Fix-building-error-for-Werror-unused-value.patch for trantor
submodule.
DEVELOPERS | 1 +
package/Config.in | 1 +
package/Config.in.host | 1 +
...e-fix-cross-compiling-for-drogon_ctl.patch | 81 +++++++++++++++++++
...l-executables-to-bin-to-avoid-build-.patch | 47 +++++++++++
...ples-install-the-example-executables.patch | 31 +++++++
...ilding-error-for-Werror-unused-value.patch | 42 ++++++++++
package/drogon/Config.in | 40 +++++++++
package/drogon/Config.in.host | 20 +++++
package/drogon/drogon.mk | 62 ++++++++++++++
10 files changed, 326 insertions(+)
create mode 100644 package/drogon/0001-cmake-fix-cross-compiling-for-drogon_ctl.patch
create mode 100644 package/drogon/0002-examples-move-all-executables-to-bin-to-avoid-build-.patch
create mode 100644 package/drogon/0003-examples-install-the-example-executables.patch
create mode 100644 package/drogon/0004-Fix-building-error-for-Werror-unused-value.patch
create mode 100644 package/drogon/Config.in
create mode 100644 package/drogon/Config.in.host
create mode 100644 package/drogon/drogon.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index b14c6e3875ec..3a1e2d10fea5 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -808,6 +808,7 @@ F: package/babeld/
F: package/bc/
F: package/cmocka/
F: package/connman/
+F: package/drogon/
F: package/empty/
F: package/iana-assignments/
F: package/inih/
diff --git a/package/Config.in b/package/Config.in
index 930f3680582a..f9b6c89f5e6e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2024,6 +2024,7 @@ menu "Networking"
source "package/davici/Config.in"
source "package/dht/Config.in"
source "package/dpdk/Config.in"
+ source "package/drogon/Config.in"
source "package/enet/Config.in"
source "package/filemq/Config.in"
source "package/fmlib/Config.in"
diff --git a/package/Config.in.host b/package/Config.in.host
index d0088364d07a..bdf7d40d8897 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -30,6 +30,7 @@ menu "Host utilities"
source "package/dosfstools/Config.in.host"
source "package/doxygen/Config.in.host"
source "package/dracut/Config.in.host"
+ source "package/drogon/Config.in.host"
source "package/dtc/Config.in.host"
source "package/e2fsprogs/Config.in.host"
source "package/e2tools/Config.in.host"
diff --git a/package/drogon/0001-cmake-fix-cross-compiling-for-drogon_ctl.patch b/package/drogon/0001-cmake-fix-cross-compiling-for-drogon_ctl.patch
new file mode 100644
index 000000000000..70ec298cf5b8
--- /dev/null
+++ b/package/drogon/0001-cmake-fix-cross-compiling-for-drogon_ctl.patch
@@ -0,0 +1,81 @@
+From 3eda90ee8f46a9f309bf27e7faaf7f2dea1a7fde Mon Sep 17 00:00:00 2001
+From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Date: Tue, 23 Sep 2025 11:37:59 +0200
+Subject: [PATCH] cmake: fix cross-compiling for drogon_ctl
+
+Fix the the following errors raised by building drogon in Buildroot:
+
+[ 70%] Generating filter_cc.h, filter_cc.cc
+cd ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl && ./_drogon_ctl create view ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl/templates/config_yaml.csp
+cd ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl && ./_drogon_ctl create view ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl/templates/demoMain.csp
+cd ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl && ./_drogon_ctl create view ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl/templates/filter_cc.csp
+[ 71%] Generating test_main.h, test_main.cc
+cd ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl && ./_drogon_ctl create view ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl/templates/cmake.csp
+/bin/sh: 1: ./_drogon_ctl: Exec format error
+/bin/sh: 1: ./_drogon_ctl: Exec format error
+make[4]: *** [drogon_ctl/CMakeFiles/drogon_ctl.dir/build.make:88: drogon_ctl/config_yaml.h] Error 126
+make[4]: *** Waiting for unfinished jobs....
+make[4]: *** [drogon_ctl/CMakeFiles/drogon_ctl.dir/build.make:95: drogon_ctl/demoMain.h] Error 126
+/bin/sh: 1: ./_drogon_ctl: Exec format error
+make[4]: *** [drogon_ctl/CMakeFiles/drogon_ctl.dir/build.make:102: drogon_ctl/filter_cc.h] Error 126
+/bin/sh: 1: ./_drogon_ctl: Exec format error
+make[4]: *** [drogon_ctl/CMakeFiles/drogon_ctl.dir/build.make:74: drogon_ctl/cmake.h] Error 126
+
+When building drogon_ctl during cross-compilation, the host version of
+_drogon_ctl must be used to generate output files, since the target
+binary cannot run on the host.
+
+The change ensures that drogon_ctl builds correctly both for native and
+cross-compiling environments.
+
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Upstream: https://github.com/drogonframework/drogon/pull/2389/commits/3eda90ee8f46a9f309bf27e7faaf7f2dea1a7fde
+---
+ CMakeLists.txt | 9 +++++++++
+ drogon_ctl/CMakeLists.txt | 3 ++-
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9cbc6d732a33..7cf091e90ef7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -524,6 +524,15 @@ if (BUILD_EXAMPLES)
+ endif (BUILD_EXAMPLES)
+
+ if (BUILD_CTL)
++ if (CMAKE_CROSSCOMPILING)
++ find_program(HOST_DROGON_CTL _drogon_ctl)
++ if (NOT HOST_DROGON_CTL)
++ message(FATAL_ERROR "_drogon_ctl not found on host system")
++ endif()
++ set(DROGON_CTL "${HOST_DROGON_CTL}")
++ else (CMAKE_CROSSCOMPILING)
++ set(DROGON_CTL "$<TARGET_FILE:_drogon_ctl>")
++ endif (CMAKE_CROSSCOMPILING)
+ add_subdirectory(drogon_ctl)
+ endif (BUILD_CTL)
+
+diff --git a/drogon_ctl/CMakeLists.txt b/drogon_ctl/CMakeLists.txt
+index 04b790d3741b..f6b12bddab60 100755
+--- a/drogon_ctl/CMakeLists.txt
++++ b/drogon_ctl/CMakeLists.txt
+@@ -43,7 +43,7 @@ foreach(cspFile ${SCP_LIST})
+ get_filename_component(classname ${cspFile} NAME_WE)
+ message(STATUS "view classname:" ${classname})
+ add_custom_command(OUTPUT ${classname}.h ${classname}.cc
+- COMMAND $<TARGET_FILE:_drogon_ctl>
++ COMMAND ${DROGON_CTL}
+ ARGS
+ create
+ view
+@@ -63,6 +63,7 @@ if(APPLE)
+ target_link_libraries(drogon_ctl PRIVATE resolv)
+ endif()
+ message(STATUS "bin:" ${INSTALL_BIN_DIR})
++install(TARGETS _drogon_ctl RUNTIME DESTINATION ${INSTALL_BIN_DIR})
+ install(TARGETS drogon_ctl RUNTIME DESTINATION ${INSTALL_BIN_DIR})
+ if(WIN32)
+ set(CTL_FILE $<TARGET_FILE:drogon_ctl>)
+--
+2.43.0
+
diff --git a/package/drogon/0002-examples-move-all-executables-to-bin-to-avoid-build-.patch b/package/drogon/0002-examples-move-all-executables-to-bin-to-avoid-build-.patch
new file mode 100644
index 000000000000..a6621195f902
--- /dev/null
+++ b/package/drogon/0002-examples-move-all-executables-to-bin-to-avoid-build-.patch
@@ -0,0 +1,47 @@
+From 77a8e3c91494ae094b5b1b18594ffaec11d37310 Mon Sep 17 00:00:00 2001
+From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Date: Tue, 23 Sep 2025 17:15:56 +0200
+Subject: [PATCH] examples: move all executables to bin/ to avoid build
+ conflicts
+
+Example executables were previously created in the same folder as their
+source directories. This caused the following errors when building
+drogon in Buildroot:
+
+[ 82%] Linking CXX executable helloworld
+cd ~/buildroot/output/build/drogon-custom/examples && /usr/bin/cmake -E cmake_link_script CMakeFiles/helloworld.dir/link.txt --verbose=1
+~/buildroot/output/host/bin/aarch64-buildroot-linux-gnu-g++ --sysroot=~/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g0 -D_FORTIFY_SOURCE=1 -DNDEBUG CMakeFiles/helloworld.dir/helloworld/main.cc.o CMakeFiles/helloworld.dir/helloworld/HelloController.cc.o CMakeFiles/helloworld.dir/helloworld/HelloViewController.cc.o CMakeFiles/helloworld.dir/HelloView.cc.o -o helloworld -Wl,-rpath,~/buildroot/output/build/drogon-custom:~/buildroot/output/build/drogon-custom/trantor ../libdrogon.so.1.9.11 ../trantor/libtrantor.so.1.5.24 ~/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libjsoncpp.so
+~/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-gnu/13.4.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: cannot open output file helloworld: Is a directory
+collect2: error: ld returned 1 exit status
+make[4]: *** [examples/CMakeFiles/helloworld.dir/build.make:155: examples/helloworld] Error 1
+make[3]: *** [CMakeFiles/Makefile2:385: examples/CMakeFiles/helloworld.dir/all] Error 2
+
+Move all example applications to a dedicated RUNTIME_OUTPUT_DIRECTORY
+(build/examples/bin) to avoid conflicts between source directories
+and generated binaries.
+
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Upstream: https://github.com/drogonframework/drogon/pull/2389/commits/77a8e3c91494ae094b5b1b18594ffaec11d37310
+---
+ examples/CMakeLists.txt | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index dca122f424ba..9d4b91d37034 100755
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -50,6 +50,11 @@ set(example_targets
+ async_stream
+ cors)
+
++foreach(target ${example_targets})
++ set_target_properties(${target} PROPERTIES
++ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
++endforeach()
++
+ # Add warnings for our example targets--some warnings (such as -Wunused-parameter) only appear
+ # when the templated functions are instantiated at their point of use.
+ if(NOT ${CMAKE_PLATFORM_NAME} STREQUAL "Windows" AND CMAKE_CXX_COMPILER_ID MATCHES GNU)
+--
+2.43.0
+
diff --git a/package/drogon/0003-examples-install-the-example-executables.patch b/package/drogon/0003-examples-install-the-example-executables.patch
new file mode 100644
index 000000000000..e8e7383d2ab1
--- /dev/null
+++ b/package/drogon/0003-examples-install-the-example-executables.patch
@@ -0,0 +1,31 @@
+From 535892bf6958c8d5619251ead204ada0002a8674 Mon Sep 17 00:00:00 2001
+From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Date: Tue, 23 Sep 2025 17:21:28 +0200
+Subject: [PATCH] examples: install the example executables
+
+This allows the examples to be used on the target system without
+manually copying them, improving usability.
+
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Upstream: https://github.com/drogonframework/drogon/pull/2389/commits/535892bf6958c8d5619251ead204ada0002a8674
+---
+ examples/CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index 9d4b91d37034..61e65d8323aa 100755
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -55,6 +55,9 @@ foreach(target ${example_targets})
+ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
+ endforeach()
+
++install(TARGETS ${example_targets}
++ RUNTIME DESTINATION ${INSTALL_BIN_DIR})
++
+ # Add warnings for our example targets--some warnings (such as -Wunused-parameter) only appear
+ # when the templated functions are instantiated at their point of use.
+ if(NOT ${CMAKE_PLATFORM_NAME} STREQUAL "Windows" AND CMAKE_CXX_COMPILER_ID MATCHES GNU)
+--
+2.43.0
+
diff --git a/package/drogon/0004-Fix-building-error-for-Werror-unused-value.patch b/package/drogon/0004-Fix-building-error-for-Werror-unused-value.patch
new file mode 100644
index 000000000000..ea2393294b01
--- /dev/null
+++ b/package/drogon/0004-Fix-building-error-for-Werror-unused-value.patch
@@ -0,0 +1,42 @@
+From 7134f2f8e07b89450dd2407e7a21a7b9cea6b192 Mon Sep 17 00:00:00 2001
+From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Date: Sat, 8 Nov 2025 19:39:01 +0100
+Subject: [PATCH] Fix building error for -Werror=unused-value
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Compiling trantor in Buildroot raises the following error:
+
+In file included from output/host/include/openssl/ssl.h:30,
+ from output/build/host-drogon-v1.9.11/trantor/trantor/net/inner/tlsprovider/OpenSSLProvider.cc:6:
+build/host-drogon-v1.9.11/trantor/trantor/net/inner/tlsprovider/OpenSSLProvider.cc: In member function ‘ssize_t OpenSSLProvider::sendTLSData()’:
+output/host/include/openssl/bio.h:629:34: error: value computed is not used [-Werror=unused-value]
+ 629 | # define BIO_reset(b) (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL)
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+output/build/host-drogon-v1.9.11/trantor/trantor/net/inner/tlsprovider/OpenSSLProvider.cc:777:9: note: in expansion of macro ‘BIO_reset’
+ 777 | BIO_reset(wbio_);
+ | ^~~~~~~~~
+
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Upstream: https://github.com/an-tao/trantor/pull/380
+---
+ trantor/trantor/net/inner/tlsprovider/OpenSSLProvider.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/trantor/trantor/net/inner/tlsprovider/OpenSSLProvider.cc b/trantor/trantor/net/inner/tlsprovider/OpenSSLProvider.cc
+index f91e9cde75bd..787cbc405436 100644
+--- a/trantor/trantor/net/inner/tlsprovider/OpenSSLProvider.cc
++++ b/trantor/trantor/net/inner/tlsprovider/OpenSSLProvider.cc
+@@ -774,7 +774,7 @@ struct OpenSSLProvider : public TLSProvider, public NonCopyable
+ {
+ appendToWriteBuffer((char *)data + n, len - n);
+ }
+- BIO_reset(wbio_);
++ (void)BIO_reset(wbio_);
+ if (n < 0)
+ return -1;
+ return len;
+--
+2.43.0
+
diff --git a/package/drogon/Config.in b/package/drogon/Config.in
new file mode 100644
index 000000000000..0db4258e309e
--- /dev/null
+++ b/package/drogon/Config.in
@@ -0,0 +1,40 @@
+config BR2_PACKAGE_DROGON
+ bool "drogon"
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_11 # C++17/20
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ select BR2_PACKAGE_JSONCPP
+ select BR2_PACKAGE_UTIL_LINUX
+ select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+ select BR2_PACKAGE_ZLIB
+ help
+ Drogon is a C++17/20 based HTTP application framework.
+ Drogon can be used to easily build various types of web
+ application server programs using C++.
+
+ https://github.com/drogonframework/drogon
+
+if BR2_PACKAGE_DROGON
+
+config BR2_PACKAGE_DROGON_BROTLI
+ bool "build Brotli"
+
+config BR2_PACKAGE_DROGON_CTL
+ bool "build drogon_ctl"
+ select BR2_PACKAGE_HOST_DROGON
+
+config BR2_PACKAGE_DROGON_EXAMPLES
+ bool "build examples"
+
+config BR2_PACKAGE_DROGON_ORM
+ bool "build orm"
+
+config BR2_PACKAGE_DROGON_YAML_CONFIG
+ bool "build yaml config"
+
+endif
+
+comment "drogon needs a toolchain w/ C++, threads, gcc >= 11"
+ depends on !BR2_INSTALL_LIBSTDCPP || \
+ !BR2_TOOLCHAIN_GCC_AT_LEAST_11 || \
+ !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/drogon/Config.in.host b/package/drogon/Config.in.host
new file mode 100644
index 000000000000..b3b691e2cfe2
--- /dev/null
+++ b/package/drogon/Config.in.host
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_HOST_DROGON
+ bool "drogon"
+ depends on BR2_HOST_INSTALL_LIBSTDCPP
+ depends on BR2_HOST_TOOLCHAIN_GCC_AT_LEAST_11 # C++17/20
+ depends on BR2_HOST_TOOLCHAIN_HAS_THREADS
+ select BR2_HOST_PACKAGE_JSONCPP
+ select BR2_HOST_PACKAGE_UTIL_LINUX
+ select BR2_HOST_PACKAGE_UTIL_LINUX_LIBUUID
+ select BR2_HOST_PACKAGE_ZLIB
+ help
+ Drogon is a C++17/20 based HTTP application framework.
+ Drogon can be used to easily build various types of web
+ application server programs using C++.
+
+ https://github.com/drogonframework/drogon
+
+comment "drogon needs a toolchain w/ C++, threads, gcc >= 11"
+ depends on !BR2_HOST_INSTALL_LIBSTDCPP || \
+ !BR2_HOST_TOOLCHAIN_GCC_AT_LEAST_11 || \
+ !BR2_HOST_TOOLCHAIN_HAS_THREADS
diff --git a/package/drogon/drogon.mk b/package/drogon/drogon.mk
new file mode 100644
index 000000000000..64ad08f4ab42
--- /dev/null
+++ b/package/drogon/drogon.mk
@@ -0,0 +1,62 @@
+################################################################################
+#
+# drogon
+#
+################################################################################
+
+DROGON_VERSION = v1.9.11
+# DROGON_SITE = $(call github,drogonframework,drogon,v$(DROGON_VERSION))
+DROGON_SITE = https://github.com/drogonframework/drogon
+DROGON_SITE_METHOD = git
+DROGON_GIT_SUBMODULES = YES
+DROGON_LICENSE = MIT
+DROGON_LICENSE_FILES = LICENSE
+DROGON_INSTALL_STAGING = YES
+
+DROGON_DEPENDENCIES = jsoncpp util-linux zlib
+HOST_DROGON_DEPENDENCIES = host-jsoncpp host-util-linux host-zlib
+
+DROGON_CONF_OPTS = \
+ -DBUILD_TESTS=OFF
+
+HOST_DROGON_CONF_OPTS = \
+ -DBUILD_TESTS=OFF \
+ -DBUILD_EXAMPLES=OFF
+
+ifeq ($(BR2_PACKAGE_DROGON_BROTLI),y)
+DROGON_CONF_OPTS += -DBUILD_BROTLI=ON
+else
+DROGON_CONF_OPTS += -DBUILD_BROTLI=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_DROGON_CTL),y)
+# When we have drogon_ctl for the target, we need to build the
+# _drogon_ctl tool with host-drogon support so that it can be
+# run during the building process
+DROGON_DEPENDENCIES += host-drogon
+DROGON_CONF_OPTS += -DBUILD_CTL=ON
+HOST_DROGON_CONF_OPTS += -DBUILD_CTL=ON
+else
+DROGON_CONF_OPTS += -DBUILD_CTL=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_DROGON_EXAMPLES),y)
+DROGON_CONF_OPTS += -DBUILD_EXAMPLES=ON
+else
+DROGON_CONF_OPTS += -DBUILD_EXMPLES=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_DROGON_ORM),y)
+DROGON_CONF_OPTS += -DBUILD_ORM=ON
+else
+DROGON_CONF_OPTS += -DBUILD_ORM=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_DROGON_YAML_CONFIG),y)
+DROGON_CONF_OPTS += -DBUILD_YAML_CONFIG=ON
+else
+DROGON_CONF_OPTS += -DBUILD_YAML_CONFIG=OFF
+endif
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/drogon: new package
2025-11-09 10:17 ` [Buildroot] [PATCH v2 2/2] package/drogon: new package Dario Binacchi
@ 2026-01-01 13:41 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-01-01 13:41 UTC (permalink / raw)
To: Dario Binacchi; +Cc: buildroot, Bernd Kuhls, Eric Le Bihan
Hello Dario,
On Sun, 9 Nov 2025 11:17:08 +0100
Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:
> Drogon is a C++17/20 based HTTP application framework. It can be used to
> easily build various types of web application server programs using C++.
>
> Project page: https://github.com/drogonframework/drogon
>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Thanks a lot for this new package proposal. It looks pretty good
overall, I only have a few requests below.
> diff --git a/package/drogon/0001-cmake-fix-cross-compiling-for-drogon_ctl.patch b/package/drogon/0001-cmake-fix-cross-compiling-for-drogon_ctl.patch
> new file mode 100644
> index 000000000000..70ec298cf5b8
> --- /dev/null
> +++ b/package/drogon/0001-cmake-fix-cross-compiling-for-drogon_ctl.patch
> @@ -0,0 +1,81 @@
> +From 3eda90ee8f46a9f309bf27e7faaf7f2dea1a7fde Mon Sep 17 00:00:00 2001
> +From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +Date: Tue, 23 Sep 2025 11:37:59 +0200
> +Subject: [PATCH] cmake: fix cross-compiling for drogon_ctl
> +
> +Fix the the following errors raised by building drogon in Buildroot:
> +
> +[ 70%] Generating filter_cc.h, filter_cc.cc
> +cd ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl && ./_drogon_ctl create view ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl/templates/config_yaml.csp
> +cd ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl && ./_drogon_ctl create view ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl/templates/demoMain.csp
> +cd ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl && ./_drogon_ctl create view ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl/templates/filter_cc.csp
> +[ 71%] Generating test_main.h, test_main.cc
> +cd ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl && ./_drogon_ctl create view ~/buildroot/output/build/drogon-v1.9.11/drogon_ctl/templates/cmake.csp
> +/bin/sh: 1: ./_drogon_ctl: Exec format error
> +/bin/sh: 1: ./_drogon_ctl: Exec format error
> +make[4]: *** [drogon_ctl/CMakeFiles/drogon_ctl.dir/build.make:88: drogon_ctl/config_yaml.h] Error 126
> +make[4]: *** Waiting for unfinished jobs....
> +make[4]: *** [drogon_ctl/CMakeFiles/drogon_ctl.dir/build.make:95: drogon_ctl/demoMain.h] Error 126
> +/bin/sh: 1: ./_drogon_ctl: Exec format error
> +make[4]: *** [drogon_ctl/CMakeFiles/drogon_ctl.dir/build.make:102: drogon_ctl/filter_cc.h] Error 126
> +/bin/sh: 1: ./_drogon_ctl: Exec format error
> +make[4]: *** [drogon_ctl/CMakeFiles/drogon_ctl.dir/build.make:74: drogon_ctl/cmake.h] Error 126
> +
> +When building drogon_ctl during cross-compilation, the host version of
> +_drogon_ctl must be used to generate output files, since the target
> +binary cannot run on the host.
> +
> +The change ensures that drogon_ctl builds correctly both for native and
> +cross-compiling environments.
> +
> +Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +Upstream: https://github.com/drogonframework/drogon/pull/2389/commits/3eda90ee8f46a9f309bf27e7faaf7f2dea1a7fde
It seems like this PR has been merged. Could you replace all Upstream:
links with the link to the final commit? And if any changes were made
as part of the review process, update the patches accordingly?
> +Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +Upstream: https://github.com/drogonframework/drogon/pull/2389/commits/77a8e3c91494ae094b5b1b18594ffaec11d37310
Same.
> +Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +Upstream: https://github.com/drogonframework/drogon/pull/2389/commits/535892bf6958c8d5619251ead204ada0002a8674
Same.
> +Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +Upstream: https://github.com/an-tao/trantor/pull/380
Here as well, the PR has been merged, so this should be updated.
> diff --git a/package/drogon/Config.in b/package/drogon/Config.in
> new file mode 100644
> index 000000000000..0db4258e309e
> --- /dev/null
> +++ b/package/drogon/Config.in
> @@ -0,0 +1,40 @@
> +config BR2_PACKAGE_DROGON
> + bool "drogon"
> + depends on BR2_INSTALL_LIBSTDCPP
> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_11 # C++17/20
> + depends on BR2_TOOLCHAIN_HAS_THREADS
> + select BR2_PACKAGE_JSONCPP
> + select BR2_PACKAGE_UTIL_LINUX
> + select BR2_PACKAGE_UTIL_LINUX_LIBUUID
> + select BR2_PACKAGE_ZLIB
> + help
> + Drogon is a C++17/20 based HTTP application framework.
> + Drogon can be used to easily build various types of web
> + application server programs using C++.
> +
> + https://github.com/drogonframework/drogon
> +
> +if BR2_PACKAGE_DROGON
> +
> +config BR2_PACKAGE_DROGON_BROTLI
> + bool "build Brotli"
What does this do? In Buildroot, Brotli is another package. Is it
related? Unrelated? Is this option enabling Brotli support? Does it
need the external brotli library provided by package/brotli?
A help text would be good, in fact.
> +config BR2_PACKAGE_DROGON_CTL
> + bool "build drogon_ctl"
What does this do? A help text would be good.
> + select BR2_PACKAGE_HOST_DROGON
This option is not needed I believe.
> +
> +config BR2_PACKAGE_DROGON_EXAMPLES
> + bool "build examples"
> +
> +config BR2_PACKAGE_DROGON_ORM
> + bool "build orm"
A help text would be nice.
> +
> +config BR2_PACKAGE_DROGON_YAML_CONFIG
> + bool "build yaml config"
A help text would be nice.
> diff --git a/package/drogon/Config.in.host b/package/drogon/Config.in.host
> new file mode 100644
> index 000000000000..b3b691e2cfe2
> --- /dev/null
> +++ b/package/drogon/Config.in.host
> @@ -0,0 +1,20 @@
> +config BR2_PACKAGE_HOST_DROGON
This option is not needed, host-drogon is just a build dependency of
drogon, so we don't need to have a visible menuconfig option for it.
> + bool "drogon"
This should have been:
bool "host-drogon"
but it's anyway not needed.
> + depends on BR2_HOST_INSTALL_LIBSTDCPP
Option doesn't exist.
> + depends on BR2_HOST_TOOLCHAIN_GCC_AT_LEAST_11 # C++17/20
Same.
> + depends on BR2_HOST_TOOLCHAIN_HAS_THREADS
Same.
> + select BR2_HOST_PACKAGE_JSONCPP
> + select BR2_HOST_PACKAGE_UTIL_LINUX
> + select BR2_HOST_PACKAGE_UTIL_LINUX_LIBUUID
> + select BR2_HOST_PACKAGE_ZLIB
Those options don't exist.
(But this is moot, as this whole file should be dropped, but I just
wanted to point out that you got it wrong on this).
> diff --git a/package/drogon/drogon.mk b/package/drogon/drogon.mk
> new file mode 100644
> index 000000000000..64ad08f4ab42
> --- /dev/null
> +++ b/package/drogon/drogon.mk
> @@ -0,0 +1,62 @@
> +################################################################################
> +#
> +# drogon
> +#
> +################################################################################
> +
> +DROGON_VERSION = v1.9.11
> +# DROGON_SITE = $(call github,drogonframework,drogon,v$(DROGON_VERSION))
Remove this line.
> +DROGON_SITE = https://github.com/drogonframework/drogon
> +DROGON_SITE_METHOD = git
> +DROGON_GIT_SUBMODULES = YES
> +DROGON_LICENSE = MIT
> +DROGON_LICENSE_FILES = LICENSE
> +DROGON_INSTALL_STAGING = YES
> +DROGON_DEPENDENCIES = jsoncpp util-linux zlib
> +HOST_DROGON_DEPENDENCIES = host-jsoncpp host-util-linux host-zlib
> +
> +DROGON_CONF_OPTS = \
> + -DBUILD_TESTS=OFF
> +
> +HOST_DROGON_CONF_OPTS = \
> + -DBUILD_TESTS=OFF \
> + -DBUILD_EXAMPLES=OFF
> +
> +ifeq ($(BR2_PACKAGE_DROGON_BROTLI),y)
> +DROGON_CONF_OPTS += -DBUILD_BROTLI=ON
> +else
> +DROGON_CONF_OPTS += -DBUILD_BROTLI=OFF
> +endif
> +
> +ifeq ($(BR2_PACKAGE_DROGON_CTL),y)
> +# When we have drogon_ctl for the target, we need to build the
> +# _drogon_ctl tool with host-drogon support so that it can be
> +# run during the building process
> +DROGON_DEPENDENCIES += host-drogon
> +DROGON_CONF_OPTS += -DBUILD_CTL=ON
> +HOST_DROGON_CONF_OPTS += -DBUILD_CTL=ON
Since host-drogon is only built when BR2_PACKAGE_DROGON_CTL, this
-DBUILD_CTL=ON for HOST_DROGON_CONF_OPTS should be in the unconditional
assignment of HOST_DROGON_CONF_OPTS (with -DBUILD_TESTS=OFF,
-DBUILD_EXAMPLES=OFF).
Could you adjust those details, and send a new iteration?
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-01 13:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-09 10:17 [Buildroot] [PATCH v2 1/2] package/jsoncpp: add host variant Dario Binacchi
2025-11-09 10:17 ` [Buildroot] [PATCH v2 2/2] package/drogon: new package Dario Binacchi
2026-01-01 13:41 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox