From f003095531247db30c44c4f935ecbb216a3014fc Mon Sep 17 00:00:00 2001 From: "Liguros - Gitlab CI/CD [develop]" Date: Sun, 14 Jul 2024 18:04:31 +0000 Subject: Adding metadata --- dev-cpp/cpp-httplib/cpp-httplib-0.15.3-r1.ebuild | 10 ++++++---- dev-cpp/cpp-httplib/cpp-httplib-0.16.0.ebuild | 17 +++++++++++++---- dev-cpp/cpp-httplib/files/cmakelists.patch | 12 ++++++++++++ dev-cpp/cpp-httplib/files/httplib_h.patch | 21 +++++++++++++++++++++ dev-cpp/cpp-httplib/metadata.xml | 6 +++++- 5 files changed, 57 insertions(+), 9 deletions(-) create mode 100644 dev-cpp/cpp-httplib/files/cmakelists.patch create mode 100644 dev-cpp/cpp-httplib/files/httplib_h.patch (limited to 'dev-cpp') 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 + #include + +-#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 @@ + + dev@liguros.net + Development + xgqt@gentoo.org Maciej Barć @@ -16,5 +20,5 @@ https://github.com/yhirose/cpp-httplib/issues - gentoo-staging + ports \ No newline at end of file -- cgit v1.3