aboutsummaryrefslogtreecommitdiff
path: root/net/iwnet
diff options
context:
space:
mode:
Diffstat (limited to 'net/iwnet')
-rw-r--r--net/iwnet/Makefile27
-rw-r--r--net/iwnet/distinfo3
-rw-r--r--net/iwnet/files/patch-src_CMakeLists.txt25
-rw-r--r--net/iwnet/pkg-descr10
-rw-r--r--net/iwnet/pkg-plist55
5 files changed, 120 insertions, 0 deletions
diff --git a/net/iwnet/Makefile b/net/iwnet/Makefile
new file mode 100644
index 000000000000..b6298dd324f8
--- /dev/null
+++ b/net/iwnet/Makefile
@@ -0,0 +1,27 @@
+PORTNAME= iwnet
+PORTVERSION= g20220907
+CATEGORIES= net www
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= Asynchronous HTTP library with websockets, SSL, routing
+WWW= https://github.com/Softmotions/iwnet
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${LOCALBASE}/include/iowow/iowow.h:databases/iowow
+
+USES= cmake compiler:c11
+USE_GITHUB= yes
+GH_ACCOUNT= Softmotions
+GH_TAGNAME= b67e4ba
+USE_LDCONFIG= yes
+
+CMAKE_ARGS= -DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_TESTS:BOOL=ON
+
+OPTIONS_DEFINE= DOCS
+
+do-test:
+ @cd ${TEST_WRKSRC} && ctest -C ${CMAKE_BUILD_TYPE} ${_MAKE_JOBS}
+
+.include <bsd.port.mk>
diff --git a/net/iwnet/distinfo b/net/iwnet/distinfo
new file mode 100644
index 000000000000..fc6319f8c3e0
--- /dev/null
+++ b/net/iwnet/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1662544984
+SHA256 (Softmotions-iwnet-g20220907-b67e4ba_GH0.tar.gz) = b78ada9082ee2ee7b5261027cbc7ab734be7cdab3134e0c5a1604c37343599a0
+SIZE (Softmotions-iwnet-g20220907-b67e4ba_GH0.tar.gz) = 818116
diff --git a/net/iwnet/files/patch-src_CMakeLists.txt b/net/iwnet/files/patch-src_CMakeLists.txt
new file mode 100644
index 000000000000..32642169582c
--- /dev/null
+++ b/net/iwnet/files/patch-src_CMakeLists.txt
@@ -0,0 +1,25 @@
+--- src/CMakeLists.txt.orig 2022-02-23 09:48:00 UTC
++++ src/CMakeLists.txt
+@@ -52,7 +52,7 @@ endif()
+ set(CMAKE_C_FLAGS_DEBUG
+ "${CMAKE_C_ASAN} -O0 -g -ggdb -Werror -DDEBUG -D_DEBUG -UNDEBUG -Wno-unused-variable"
+ )
+-set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_ASAN} -O3 -DNDEBUG")
++set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_ASAN} -DNDEBUG")
+ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-Wl,-s")
+ set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} -g")
+ set(CMAKE_C_FLAGS_RELEASEWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO})
+@@ -174,13 +174,6 @@ if(BUILD_SHARED_LIBS)
+ SOVERSION ${PROJECT_VERSION_MAJOR}
+ PUBLIC_HEADER "${PUB_HDRS}"
+ DEFINE_SYMBOL IW_API_EXPORTS)
+-
+- if(CMAKE_BUILD_TYPE STREQUAL "Release")
+- add_custom_command(
+- TARGET iwnet
+- POST_BUILD
+- COMMAND ${STRIP_CMD} $<TARGET_FILE:iwnet>)
+- endif()
+
+ set_target_properties(
+ iwnet_s
diff --git a/net/iwnet/pkg-descr b/net/iwnet/pkg-descr
new file mode 100644
index 000000000000..ab84b8bc3a47
--- /dev/null
+++ b/net/iwnet/pkg-descr
@@ -0,0 +1,10 @@
+Pure C asynchronous HTTP framework with support for websockets,
+client/server, TLS 1.2 (SSL), routing.
+
+ - Fast asynchronous HTTP server (iwn_http_server.h)
+ - Web framework based on HTTP server (iwn_wf.h)
+ - Websocket client and server (iwn_ws_server.h, iwn_ws_client.h)
+ - Poller reactor (iwn_poller.h)
+ - SSL layer is based on BearSSL (iwn_brssl_poller_adapter.h)
+ - Manager of child processes (iwn_proc.h)
+ - Timer (iwn_scheduler.h)
diff --git a/net/iwnet/pkg-plist b/net/iwnet/pkg-plist
new file mode 100644
index 000000000000..4f574aa3f910
--- /dev/null
+++ b/net/iwnet/pkg-plist
@@ -0,0 +1,55 @@
+include/iwnet/bearssl.h
+include/iwnet/bearssl_aead.h
+include/iwnet/bearssl_block.h
+include/iwnet/bearssl_ec.h
+include/iwnet/bearssl_hash.h
+include/iwnet/bearssl_hmac.h
+include/iwnet/bearssl_kdf.h
+include/iwnet/bearssl_pem.h
+include/iwnet/bearssl_prf.h
+include/iwnet/bearssl_rand.h
+include/iwnet/bearssl_rsa.h
+include/iwnet/bearssl_ssl.h
+include/iwnet/bearssl_x509.h
+include/iwnet/bre.h
+include/iwnet/bre_asn1.h
+include/iwnet/bre_base.h
+include/iwnet/bre_base64.h
+include/iwnet/bre_pkcs10.h
+include/iwnet/bre_pool.h
+include/iwnet/bre_utils.h
+include/iwnet/brssl.h
+include/iwnet/iwn_base64.h
+include/iwnet/iwn_brssl_poller_adapter.h
+include/iwnet/iwn_codec.h
+include/iwnet/iwn_curl.h
+include/iwnet/iwn_direct_poller_adapter.h
+include/iwnet/iwn_http_server.h
+include/iwnet/iwn_mimetypes.h
+include/iwnet/iwn_net.h
+include/iwnet/iwn_pairs.h
+include/iwnet/iwn_poller.h
+include/iwnet/iwn_poller_adapter.h
+include/iwnet/iwn_proc.h
+include/iwnet/iwn_scheduler.h
+include/iwnet/iwn_tests.h
+include/iwnet/iwn_url.h
+include/iwnet/iwn_utils.h
+include/iwnet/iwn_wf.h
+include/iwnet/iwn_wf_files.h
+include/iwnet/iwn_wf_sst_inmem.h
+include/iwnet/iwn_ws.h
+include/iwnet/iwn_ws_client.h
+include/iwnet/iwn_ws_server.h
+include/iwnet/iwnet.h
+lib/libiwnet-1.a
+lib/libiwnet.so
+lib/libiwnet.so.1
+lib/libiwnet.so.1.1.0
+%%PORTDOCS%%%%DOCSDIR%%/Changelog
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%DATADIR%%/iwnet-exports-%%CMAKE_BUILD_TYPE%%.cmake
+%%DATADIR%%/iwnet-exports.cmake
+%%DATADIR%%/iwnet-static-exports-%%CMAKE_BUILD_TYPE%%.cmake
+%%DATADIR%%/iwnet-static-exports.cmake