Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpp-httplib - new package version 0.18.3 #19901

Open
wants to merge 1 commit into
base: oi/hipster
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions components/library/cpp-httplib/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2024 Friedrich Kink
#

BUILD_STYLE= cmake
include ../../../make-rules/shared-macros.mk

COMPONENT_NAME= cpp-httplib
COMPONENT_VERSION= 0.18.3
COMPONENT_SUMMARY= A C++ header-only HTTP/HTTPS server and client library
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= v$(COMPONENT_VERSION).tar.gz
COMPONENT_ARCHIVE_HASH= sha256:a0567bcd6c3fe5cef1b329b96245119047f876b49e06cc129a36a7a8dffe173e
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please give the archive a proper name.

COMPONENT_ARCHIVE_URL= https://github.com/yhirose/$(COMPONENT_NAME)/archive/refs/tags/$(COMPONENT_ARCHIVE)
COMPONENT_PROJECT_URL= https://github.com/yhirose/$(COMPONENT_NAME)
COMPONENT_FMRI= library/$(COMPONENT_NAME)
COMPONENT_CLASSIFICATION=System/Libraries
COMPONENT_LICENSE= MIT
COMPONENT_LICENSE_FILE= LICENSE

include $(WS_MAKE_RULES)/common.mk

LDFLAGS += -lsocket

CMAKE_OPTIONS += -DCMAKE_BUILD_TYPE=Release
CMAKE_OPTIONS += -DBUILD_SHARED_LIBS=ON
CMAKE_OPTIONS += -DHTTPLIB_REQUIRE_OPENSSL=ON
CMAKE_OPTIONS += -DHTTPLIB_REQUIRE_ZLIB=ON
CMAKE_OPTIONS += -DHTTPLIB_REQUIRE_BROTLI=ON
CMAKE_OPTIONS += -DHTTPLIB_COMPILE=ON
CMAKE_OPTIONS += -DHTTPLIB_TEST=ON

# Do not change the order of these regexp transforms.
COMPONENT_TEST_TRANSFORMS += \
'-e "/Test /d" ' \
'-e "/ Start/d" ' \
'-e "/^Output/d" ' \
'-e "/^Errors/d" ' \
'-e "/^Use /d" '

# manually added packages
REQUIRED_PACKAGES += developer/googletest

# Auto-generated dependencies
REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
REQUIRED_PACKAGES += $(OPENSSL_PKG)
REQUIRED_PACKAGES += library/brotli
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += system/library
37 changes: 37 additions & 0 deletions components/library/cpp-httplib/cpp-httplib.p5m
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2024 Friedrich Kink
#

set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.human-version value=$(HUMAN_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)

license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'

file path=usr/include/httplib.h
file path=usr/lib/$(MACH64)/cmake/httplib/FindBrotli.cmake
file path=usr/lib/$(MACH64)/cmake/httplib/httplibConfig.cmake
file path=usr/lib/$(MACH64)/cmake/httplib/httplibConfigVersion.cmake
file path=usr/lib/$(MACH64)/cmake/httplib/httplibTargets-release.cmake
file path=usr/lib/$(MACH64)/cmake/httplib/httplibTargets.cmake
link path=usr/lib/$(MACH64)/libcpp-httplib.so target=libcpp-httplib.so.0.18
file path=usr/lib/$(MACH64)/libcpp-httplib.so.$(HUMAN_VERSION)
link path=usr/lib/$(MACH64)/libcpp-httplib.so.0.18 \
target=libcpp-httplib.so.$(HUMAN_VERSION)
file path=usr/share/doc/httplib/README.md
file path=usr/share/licenses/httplib/LICENSE
37 changes: 37 additions & 0 deletions components/library/cpp-httplib/manifests/sample-manifest.p5m
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2024 <contributor>
#

set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.human-version value=$(HUMAN_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)

license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'

file path=usr/include/httplib.h
file path=usr/lib/$(MACH64)/cmake/httplib/FindBrotli.cmake
file path=usr/lib/$(MACH64)/cmake/httplib/httplibConfig.cmake
file path=usr/lib/$(MACH64)/cmake/httplib/httplibConfigVersion.cmake
file path=usr/lib/$(MACH64)/cmake/httplib/httplibTargets-release.cmake
file path=usr/lib/$(MACH64)/cmake/httplib/httplibTargets.cmake
link path=usr/lib/$(MACH64)/libcpp-httplib.so target=libcpp-httplib.so.0.18
file path=usr/lib/$(MACH64)/libcpp-httplib.so.$(HUMAN_VERSION)
link path=usr/lib/$(MACH64)/libcpp-httplib.so.0.18 \
target=libcpp-httplib.so.$(HUMAN_VERSION)
file path=usr/share/doc/httplib/README.md
file path=usr/share/licenses/httplib/LICENSE
11 changes: 11 additions & 0 deletions components/library/cpp-httplib/patches/namespace.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- cpp-httplib-0.18.3/test/test.cc 2024-12-03 12:33:00.000000000 +0100
+++ cpp-httplib-0.18.3/test/test.cc.new 2024-12-08 15:42:59.644483507 +0100
@@ -2995,7 +2995,7 @@
t_.join();
}

- map<string, string> persons_;
+ std::map<std::string, std::string> persons_;
#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
SSLClient cli_;
SSLServer svr_;
15 changes: 15 additions & 0 deletions components/library/cpp-httplib/pkg5
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"dependencies": [
"developer/googletest",
"library/brotli",
"library/security/openssl-3",
"library/zlib",
"system/library",
"system/library/g++-13-runtime",
"system/library/gcc-13-runtime"
],
"fmris": [
"library/cpp-httplib"
],
"name": "cpp-httplib"
}