Skip to content

Commit

Permalink
cpp-httplib - new package version 0.18.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzkink committed Dec 8, 2024
1 parent 2095685 commit ee87573
Show file tree
Hide file tree
Showing 5 changed files with 161 additions and 0 deletions.
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
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"
}

0 comments on commit ee87573

Please sign in to comment.