summaryrefslogtreecommitdiff
path: root/dev-cpp/cpp-httplib
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-07-14 18:04:31 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-07-14 18:04:31 +0000
commitf003095531247db30c44c4f935ecbb216a3014fc (patch)
tree3dcb71429ce5ccb4f07f7be5189477634f9b0b6d /dev-cpp/cpp-httplib
parent2eb9743ff9bb1999fa3671f852c70a86f494fb4b (diff)
downloadbaldeagleos-repo-f003095531247db30c44c4f935ecbb216a3014fc.tar.gz
baldeagleos-repo-f003095531247db30c44c4f935ecbb216a3014fc.tar.xz
baldeagleos-repo-f003095531247db30c44c4f935ecbb216a3014fc.zip
Adding metadata
Diffstat (limited to 'dev-cpp/cpp-httplib')
-rw-r--r--dev-cpp/cpp-httplib/cpp-httplib-0.15.3-r1.ebuild10
-rw-r--r--dev-cpp/cpp-httplib/cpp-httplib-0.16.0.ebuild17
-rw-r--r--dev-cpp/cpp-httplib/files/cmakelists.patch12
-rw-r--r--dev-cpp/cpp-httplib/files/httplib_h.patch21
-rw-r--r--dev-cpp/cpp-httplib/metadata.xml6
5 files changed, 57 insertions, 9 deletions
diff --git a/dev-cpp/cpp-httplib/cpp-httplib-0.15.3-r1.ebuild b/dev-cpp/cpp-httplib/cpp-httplib-0.15.3-r1.ebuild
index f11830102d0d..540afb02dbe8 100644
--- a/dev-cpp/cpp-httplib/cpp-httplib-0.15.3-r1.ebuild
+++ b/dev-cpp/cpp-httplib/cpp-httplib-0.15.3-r1.ebuild
@@ -1,6 +1,5 @@
-# Copyright 2022-2024 Gentoo Authors
+# Copyright 2024 Liguros Authors
# Distributed under the terms of the GNU General Public License v2
-
EAPI=8
PYTHON_COMPAT=( python3_{8,9,10,11,12} )
@@ -24,13 +23,16 @@ fi
LICENSE="MIT"
SLOT="0/$(ver_cut 1-2)" # soversion
-IUSE="brotli ssl test zlib"
+IUSE="brotli libressl ssl test zlib"
REQUIRED_USE="test? ( brotli ssl zlib )"
RESTRICT="!test? ( test )"
RDEPEND="
brotli? ( app-arch/brotli:=[${MULTILIB_USEDEP}] )
- ssl? ( >=dev-libs/openssl-3.0.13:=[${MULTILIB_USEDEP}] )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-3.0.13:=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] )
+ )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
"
DEPEND="
diff --git a/dev-cpp/cpp-httplib/cpp-httplib-0.16.0.ebuild b/dev-cpp/cpp-httplib/cpp-httplib-0.16.0.ebuild
index 7773fdd1648b..3ddfccc68bc6 100644
--- a/dev-cpp/cpp-httplib/cpp-httplib-0.16.0.ebuild
+++ b/dev-cpp/cpp-httplib/cpp-httplib-0.16.0.ebuild
@@ -1,6 +1,5 @@
-# Copyright 2022-2024 Gentoo Authors
+# Copyright 2024 Liguros Authors
# Distributed under the terms of the GNU General Public License v2
-
EAPI=8
PYTHON_COMPAT=( python3_{8,9,10,11,12} )
@@ -24,7 +23,7 @@ fi
LICENSE="MIT"
SLOT="0/$(ver_cut 1-2)" # soversion
-IUSE="brotli ssl test zlib"
+IUSE="brotli libressl ssl test zlib"
REQUIRED_USE="test? ( brotli ssl zlib )"
RESTRICT="!test? ( test )"
@@ -33,7 +32,8 @@ RDEPEND="
app-arch/brotli:=[${MULTILIB_USEDEP}]
)
ssl? (
- >=dev-libs/openssl-3.0.13:=[${MULTILIB_USEDEP}]
+ !libressl? ( >=dev-libs/openssl-3.0.13:=[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl:=[${MULTILIB_USEDEP}] )
)
zlib? (
sys-libs/zlib[${MULTILIB_USEDEP}]
@@ -46,6 +46,15 @@ BDEPEND="
${PYTHON_DEPS}
"
+src_prepare() {
+ if use libressl; then
+ eapply -p1 $FILESDIR/cmakelists.patch
+ eapply -p1 $FILESDIR/httplib_h.patch
+ fi
+
+ cmake_src_prepare
+}
+
src_configure() {
local -a mycmakeargs=(
-DHTTPLIB_COMPILE=yes
diff --git a/dev-cpp/cpp-httplib/files/cmakelists.patch b/dev-cpp/cpp-httplib/files/cmakelists.patch
new file mode 100644
index 000000000000..137a80985b1f
--- /dev/null
+++ b/dev-cpp/cpp-httplib/files/cmakelists.patch
@@ -0,0 +1,12 @@
+diff '--color=auto' -urN cpp-httplib-0.16.0.orig/CMakeLists.txt cpp-httplib-0.16.0/CMakeLists.txt
+--- cpp-httplib-0.16.0.orig/CMakeLists.txt 2024-07-14 10:15:22.128940645 +0200
++++ cpp-httplib-0.16.0/CMakeLists.txt 2024-07-14 10:16:10.259937433 +0200
+@@ -81,7 +81,7 @@
+
+ # Change as needed to set an OpenSSL minimum version.
+ # This is used in the installed Cmake config file.
+-set(_HTTPLIB_OPENSSL_MIN_VER "3.0.0")
++set(_HTTPLIB_OPENSSL_MIN_VER "2.0.0")
+
+ # Lets you disable C++ exception during CMake configure time.
+ # The value is used in the install CMake config file.
diff --git a/dev-cpp/cpp-httplib/files/httplib_h.patch b/dev-cpp/cpp-httplib/files/httplib_h.patch
new file mode 100644
index 000000000000..b37a49341f4f
--- /dev/null
+++ b/dev-cpp/cpp-httplib/files/httplib_h.patch
@@ -0,0 +1,21 @@
+diff '--color=auto' -urN cpp-httplib-0.16.0.orig/httplib.h cpp-httplib-0.16.0/httplib.h
+--- cpp-httplib-0.16.0.orig/httplib.h 2024-07-14 10:29:02.536885895 +0200
++++ cpp-httplib-0.16.0/httplib.h 2024-07-14 10:30:41.405879297 +0200
+@@ -269,7 +269,7 @@
+ #include <iostream>
+ #include <sstream>
+
+-#if OPENSSL_VERSION_NUMBER < 0x30000000L
++#if OPENSSL_VERSION_NUMBER < 0x30000000L && !defined(LIBRESSL_VERSION_NUMBER)
+ #error Sorry, OpenSSL versions prior to 3.0.0 are not supported
+ #endif
+
+@@ -9029,7 +9029,7 @@
+ return false;
+ }
+
+- auto server_cert = SSL_get1_peer_certificate(ssl2);
++ auto server_cert = SSL_get_peer_certificate(ssl2);
+
+ if (server_cert == nullptr) {
+ error = Error::SSLServerVerification;
diff --git a/dev-cpp/cpp-httplib/metadata.xml b/dev-cpp/cpp-httplib/metadata.xml
index 3b4f0b0c4f7c..174ba647e913 100644
--- a/dev-cpp/cpp-httplib/metadata.xml
+++ b/dev-cpp/cpp-httplib/metadata.xml
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd">
<pkgmetadata>
+ <maintainer type="project">
+ <email>dev@liguros.net</email>
+ <name>Development</name>
+ </maintainer>
<maintainer type="person">
<email>xgqt@gentoo.org</email>
<name>Maciej Barć</name>
@@ -16,5 +20,5 @@
<upstream>
<bugs-to>https://github.com/yhirose/cpp-httplib/issues</bugs-to>
</upstream>
- <origin>gentoo-staging</origin>
+ <origin>ports</origin>
</pkgmetadata> \ No newline at end of file