Date: Sun, 19 Sep 2021 06:06:39 GMT From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 706aa4d599da - main - www/llhttp: Add llhttp 6.0.4 Message-ID: <202109190606.18J66dRW052222@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=706aa4d599da514c93ec9def7856f313e3dcb8e4 commit 706aa4d599da514c93ec9def7856f313e3dcb8e4 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2021-09-19 05:25:32 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2021-09-19 05:40:28 +0000 www/llhttp: Add llhttp 6.0.4 llhttp is a port of http_parser to llparse. This project aims to: - Make it maintainable - Verifiable - Improving benchmarks where possible WWW: https://llhttp.org/ WWW: https://github.com/nodejs/llhttp --- www/Makefile | 1 + www/llhttp/Makefile | 25 +++++++++++++++++++ www/llhttp/distinfo | 3 +++ www/llhttp/files/CMakeLists.txt | 53 +++++++++++++++++++++++++++++++++++++++++ www/llhttp/pkg-descr | 9 +++++++ www/llhttp/pkg-plist | 4 ++++ 6 files changed, 95 insertions(+) diff --git a/www/Makefile b/www/Makefile index 9f0799516597..70f5e16cf49d 100644 --- a/www/Makefile +++ b/www/Makefile @@ -311,6 +311,7 @@ SUBDIR += linux-opera SUBDIR += litmus SUBDIR += ljdeps + SUBDIR += llhttp SUBDIR += logswan SUBDIR += logtools SUBDIR += ls-qpack diff --git a/www/llhttp/Makefile b/www/llhttp/Makefile new file mode 100644 index 000000000000..10a9a89581d1 --- /dev/null +++ b/www/llhttp/Makefile @@ -0,0 +1,25 @@ +# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org> + +PORTNAME= llhttp +PORTVERSION= 6.0.4 +DISTVERSIONPREFIX= release/v +CATEGORIES= www + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Port of http_parser to llparse + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE-MIT + +USES= cmake + +CMAKE_ON= BUILD_SHARED_LIBS + +GH_ACCOUNT= nodejs +USE_GITHUB= yes + +post-patch: +# https://github.com/nodejs/llhttp/blob/master/CMakeLists.txt + @${CP} ${FILESDIR}/CMakeLists.txt ${WRKSRC}/ + +.include <bsd.port.mk> diff --git a/www/llhttp/distinfo b/www/llhttp/distinfo new file mode 100644 index 000000000000..f53b9c676117 --- /dev/null +++ b/www/llhttp/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1629364640 +SHA256 (nodejs-llhttp-release-v6.0.4_GH0.tar.gz) = a2dc90e41060f89a7682c4c325e226599139a78e65bb5b79f28d6a52bac267c4 +SIZE (nodejs-llhttp-release-v6.0.4_GH0.tar.gz) = 37328 diff --git a/www/llhttp/files/CMakeLists.txt b/www/llhttp/files/CMakeLists.txt new file mode 100644 index 000000000000..41d2000e993d --- /dev/null +++ b/www/llhttp/files/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 3.5.1) +cmake_policy(SET CMP0069 NEW) + +project(llhttp C) + +set(CMAKE_C_STANDARD 99) + +# +# Options +# +# Generic option +option(BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF) + +# Source code +set(LLHTTP_SOURCES + src/llhttp.c + src/http.c + src/api.c +) + +set(LLHTTP_HEADERS + include/llhttp.h +) + +add_library(llhttp) +add_library(llhttp::llhttp ALIAS llhttp) + +target_sources(llhttp PRIVATE ${LLHTTP_SOURCES} ${LLHTTP_HEADERS}) + +# On windows with Visual Studio, add a debug postfix so that release +# and debug libraries can coexist. +if(MSVC) + set(CMAKE_DEBUG_POSTFIX "d") +endif() + +target_include_directories(llhttp PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:include> +) + +set_target_properties(llhttp PROPERTIES PUBLIC_HEADER ${LLHTTP_HEADERS}) + +install(TARGETS llhttp + EXPORT llhttp + ARCHIVE DESTINATION lib + PUBLIC_HEADER DESTINATION include/ +) + +# This is required to work with FetchContent +install(EXPORT llhttp + FILE llhttp-config.cmake + NAMESPACE llhttp:: + DESTINATION lib/cmake/llhttp) diff --git a/www/llhttp/pkg-descr b/www/llhttp/pkg-descr new file mode 100644 index 000000000000..3235e30e2239 --- /dev/null +++ b/www/llhttp/pkg-descr @@ -0,0 +1,9 @@ +llhttp is a port of http_parser to llparse. + +This project aims to: +- Make it maintainable +- Verifiable +- Improving benchmarks where possible + +WWW: https://llhttp.org/ +WWW: https://github.com/nodejs/llhttp diff --git a/www/llhttp/pkg-plist b/www/llhttp/pkg-plist new file mode 100644 index 000000000000..2566db4a9842 --- /dev/null +++ b/www/llhttp/pkg-plist @@ -0,0 +1,4 @@ +include/llhttp.h +lib/cmake/llhttp/llhttp-config-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/llhttp/llhttp-config.cmake +lib/libllhttp.so
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109190606.18J66dRW052222>