commit:     0ecd82cf195952a45eacfaeb96fca59a476d09e4
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Thu Jun 26 11:09:59 2025 +0000
Commit:     Jaco Kroon <jkroon <AT> gentoo <DOT> org>
CommitDate: Thu Dec  4 10:52:30 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ecd82cf

dev-libs/nng: add 1.11

Migrate to net-libs/mbedtls:3, update to use cmake-3.

Closes: https://bugs.gentoo.org/957472
Closes: https://bugs.gentoo.org/959113
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42760
Closes: https://github.com/gentoo/gentoo/pull/42760
Signed-off-by: Jaco Kroon <jkroon <AT> gentoo.org>

 dev-libs/nng/Manifest                     |   1 +
 dev-libs/nng/files/nng-1.11-cmake-3.patch | 121 ++++++++++++++++++++++++++++++
 dev-libs/nng/nng-1.11.ebuild              |  42 +++++++++++
 3 files changed, 164 insertions(+)

diff --git a/dev-libs/nng/Manifest b/dev-libs/nng/Manifest
index a8792fe00f8c..5a37d7247092 100644
--- a/dev-libs/nng/Manifest
+++ b/dev-libs/nng/Manifest
@@ -1 +1,2 @@
 DIST nng-1.10.1.tar.gz 769608 BLAKE2B 
199a9d67d9806ad493f3e3c3de20a1284c4a8ccffece223c5cfae6c0b7800d596a0f7342f51ff9ed346b00b6c49c4697c64dad3b0046315b3fa6d3a1b9fb3c74
 SHA512 
79d5d176e96591951379150c632322553fb96c62a254a1366303bb491612f84f7b07a7c9e1e1391173d3beb673c4568be3553cc7002165fc9832d738cc0d9a54
+DIST nng-1.11.tar.gz 769602 BLAKE2B 
90b90a413fbab473eb2729f94845fb114860fc99b07aa9c86fba21182a82a32957baa1aad146dfa37d2b51f4a9e38ebc82a20009c42d93e61825227af96590b4
 SHA512 
cceedb16ecc3849f49b76a2ebfee4ba46a6d22b429aa9a5a94354c92aa643c5dcffd325f854ecba8ebe341c514f8288576a7be392f3a03a69152873fdd277fe3

diff --git a/dev-libs/nng/files/nng-1.11-cmake-3.patch 
b/dev-libs/nng/files/nng-1.11-cmake-3.patch
new file mode 100644
index 000000000000..69f8a1fb7fe3
--- /dev/null
+++ b/dev-libs/nng/files/nng-1.11-cmake-3.patch
@@ -0,0 +1,121 @@
+From 
https://github.com/nanomsg/nng/commit/60ff324b1e6e5124dbbfefec732940512ed40f87
+From: Garrett D'Amore <[email protected]>
+Date: Sun, 29 Dec 2024 00:29:51 -0800
+Subject: [PATCH] demos: bump cmake version required to 3.15
+
+This fixes problems finding the threads library.  There may
+still be problems building these with TLS libraries added,
+as those dependencies may not be satisfied if the library lacks
+a cmake configuration file.
+--- a/demo/async/CMakeLists.txt
++++ b/demo/async/CMakeLists.txt
+@@ -1,13 +1,13 @@
+ #
++# Copyright 2024 Staysail Systems, Inc. <[email protected]>
+ # Copyright 2018 Capitar IT Group BV <[email protected]>
+-# Copyright 2018 Staysail Systems, Inc. <[email protected]>
+ #
+ # This software is supplied under the terms of the MIT License, a
+ # copy of which should be located in the distribution where this
+ # file was obtained (LICENSE.txt).  A copy of the license may also be
+ # found online at https://opensource.org/licenses/MIT.
+ 
+-cmake_minimum_required (VERSION 2.8.12)
++cmake_minimum_required (VERSION 3.15)
+ 
+ project(nng-asyncdemo)
+ 
+--- a/demo/http_client/CMakeLists.txt
++++ b/demo/http_client/CMakeLists.txt
+@@ -1,13 +1,13 @@
+ #
+ # Copyright 2018 Capitar IT Group BV <[email protected]>
+-# Copyright 2018 Staysail Systems, Inc. <[email protected]>
++# Copyright 2024 Staysail Systems, Inc. <[email protected]>
+ #
+ # This software is supplied under the terms of the MIT License, a
+ # copy of which should be located in the distribution where this
+ # file was obtained (LICENSE.txt).  A copy of the license may also be
+ # found online at https://opensource.org/licenses/MIT.
+ 
+-cmake_minimum_required (VERSION 2.8.12)
++cmake_minimum_required (VERSION 3.15)
+ 
+ project(http_client)
+ 
+--- a/demo/pubsub_forwarder/CMakeLists.txt
++++ b/demo/pubsub_forwarder/CMakeLists.txt
+@@ -3,7 +3,7 @@
+ # file was obtained (LICENSE.txt).  A copy of the license may also be
+ # found online at https://opensource.org/licenses/MIT.
+ 
+-cmake_minimum_required(VERSION 3.10)
++cmake_minimum_required(VERSION 3.15)
+ project(pubsub_forwarder C)
+ 
+ # Find the nng library
+--- a/demo/raw/CMakeLists.txt
++++ b/demo/raw/CMakeLists.txt
+@@ -1,13 +1,13 @@
+ #
++# Copyright 2024 Staysail Systems, Inc. <[email protected]>
+ # Copyright 2018 Capitar IT Group BV <[email protected]>
+-# Copyright 2018 Staysail Systems, Inc. <[email protected]>
+ #
+ # This software is supplied under the terms of the MIT License, a
+ # copy of which should be located in the distribution where this
+ # file was obtained (LICENSE.txt).  A copy of the license may also be
+ # found online at https://opensource.org/licenses/MIT.
+ 
+-cmake_minimum_required (VERSION 2.8.12)
++cmake_minimum_required (VERSION 3.15)
+ 
+ project(raw)
+ 
+--- a/demo/reqrep/CMakeLists.txt
++++ b/demo/reqrep/CMakeLists.txt
+@@ -1,13 +1,13 @@
+ #
++# Copyright 2024 Staysail Systems, Inc. <[email protected]>
+ # Copyright 2018 Capitar IT Group BV <[email protected]>
+-# Copyright 2018 Staysail Systems, Inc. <[email protected]>
+ #
+ # This software is supplied under the terms of the MIT License, a
+ # copy of which should be located in the distribution where this
+ # file was obtained (LICENSE.txt).  A copy of the license may also be
+ # found online at https://opensource.org/licenses/MIT.
+ 
+-cmake_minimum_required (VERSION 2.8.12)
++cmake_minimum_required (VERSION 3.15)
+ 
+ project(reqrep)
+ 
+--- a/demo/rest/CMakeLists.txt
++++ b/demo/rest/CMakeLists.txt
+@@ -1,13 +1,13 @@
+ #
++# Copyright 2024 Staysail Systems, Inc. <[email protected]>
+ # Copyright 2018 Capitar IT Group BV <[email protected]>
+-# Copyright 2018 Staysail Systems, Inc. <[email protected]>
+ #
+ # This software is supplied under the terms of the MIT License, a
+ # copy of which should be located in the distribution where this
+ # file was obtained (LICENSE.txt).  A copy of the license may also be
+ # found online at https://opensource.org/licenses/MIT.
+ 
+-cmake_minimum_required (VERSION 2.8.12)
++cmake_minimum_required (VERSION 3.15)
+ 
+ project(rest)
+ 
+--- a/demo/stream/CMakeLists.txt
++++ b/demo/stream/CMakeLists.txt
+@@ -6,7 +6,7 @@
+ # file was obtained (LICENSE.txt).  A copy of the license may also be
+ # found online at https://opensource.org/licenses/MIT.
+ 
+-cmake_minimum_required (VERSION 2.8.7)
++cmake_minimum_required (VERSION 3.15)
+ 
+ project(stream)
+ 

diff --git a/dev-libs/nng/nng-1.11.ebuild b/dev-libs/nng/nng-1.11.ebuild
new file mode 100644
index 000000000000..d4a985fb1556
--- /dev/null
+++ b/dev-libs/nng/nng-1.11.ebuild
@@ -0,0 +1,42 @@
+# Copyright 2024-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_REMOVE_MODULES_LIST=( FindMbedTLS )
+inherit cmake
+
+DESCRIPTION="Light-weight brokerless messaging"
+HOMEPAGE="https://nng.nanomsg.org/";
+SRC_URI="https://github.com/nanomsg/nng/archive/refs/tags/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv"
+# compat and deprecated match upstream's default choice
+IUSE="+compat +deprecated doc ssl test tools"
+
+DEPEND="ssl? ( net-libs/mbedtls:3= )"
+RDEPEND="${DEPEND}"
+BDEPEND="doc? ( dev-ruby/asciidoctor )"
+
+RESTRICT="test" # Needs network
+
+DOCS=(README.adoc docs/RATIONALE.adoc)
+
+PATCHES=(
+       "${FILESDIR}/nng-1.11-cmake-3.patch"
+)
+
+src_configure() {
+       local mycmakeargs=(
+               -DNNG_ELIDE_DEPRECATED=$(usex deprecated OFF ON)
+               -DNNG_ENABLE_COMPAT=$(usex compat ON OFF)
+               -DNNG_ENABLE_TLS=$(usex ssl ON OFF)
+               -DNNG_TESTS=$(usex test ON OFF)
+               -DNNG_ENABLE_DOC=$(usex doc ON OFF)
+               -DNNG_ENABLE_NNGCAT=$(usex tools ON OFF)
+               -DNNG_TOOLS=$(usex tools ON OFF)
+       )
+       cmake_src_configure
+}

Reply via email to