mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-08 22:52:59 -04:00
dev-cpp/trantor: New package.
Non-blocking I/O tcp network lib based on c++14/17 Signed-off-by: Ronny (tastytea) Gutbrod <gentoo@tastytea.de>
This commit is contained in:
1
dev-cpp/trantor/Manifest
Normal file
1
dev-cpp/trantor/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST trantor-1.5.1.tar.gz 102696 BLAKE2B 7670b2e2bb56b703aa387df463433261cff33b5a8682681071ff5159d14a516e11faebde7e2431232ba3651f6420a017491a7468ce3f90c4c099284808e27171 SHA512 9f6664abc94943598805192ee09a98340e6e20efb15e448aac5e21480f1798b0991782d18766f5ef54399251d4980c2f68aeda3136c7e058e3c31623c8f7ce3f
|
||||
34
dev-cpp/trantor/files/trantor-1.5.1_GNUInstallDirs.patch
Normal file
34
dev-cpp/trantor/files/trantor-1.5.1_GNUInstallDirs.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
From 68aa2e7d41002d00c5d3bd3c6a7d55b0ebb8154d Mon Sep 17 00:00:00 2001
|
||||
From: tastytea <tastytea@tastytea.de>
|
||||
Date: Mon, 16 Aug 2021 21:43:59 +0200
|
||||
Subject: [PATCH] cmake: Use GNUInstallDirs to figure out install dirs.
|
||||
|
||||
And set initial value for INSTALL_BIN_DIR.
|
||||
---
|
||||
CMakeLists.txt | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ad5a1b3..44ca114 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -11,12 +11,13 @@ set(TRANTOR_PATCH_VERSION 1)
|
||||
set(TRANTOR_VERSION
|
||||
${TRANTOR_MAJOR_VERSION}.${TRANTOR_MINOR_VERSION}.${TRANTOR_PATCH_VERSION})
|
||||
|
||||
+include(GNUInstallDirs)
|
||||
# Offer the user the choice of overriding the installation directories
|
||||
-set(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries")
|
||||
+set(INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Installation directory for libraries")
|
||||
set(INSTALL_INCLUDE_DIR
|
||||
- include
|
||||
+ ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
CACHE PATH "Installation directory for header files")
|
||||
-set(DEF_INSTALL_TRANTOR_CMAKE_DIR lib/cmake/Trantor)
|
||||
+set(DEF_INSTALL_TRANTOR_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/Trantor)
|
||||
set(INSTALL_TRANTOR_CMAKE_DIR
|
||||
${DEF_INSTALL_TRANTOR_CMAKE_DIR}
|
||||
CACHE PATH "Installation directory for cmake files")
|
||||
--
|
||||
2.31.1
|
||||
|
||||
11
dev-cpp/trantor/metadata.xml
Normal file
11
dev-cpp/trantor/metadata.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>gentoo@tastytea.de</email>
|
||||
<name>Ronny (tastytea) Gutbrod</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<doc>https://trantor.docsforge.com/</doc>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
47
dev-cpp/trantor/trantor-1.5.1.ebuild
Normal file
47
dev-cpp/trantor/trantor-1.5.1.ebuild
Normal file
@@ -0,0 +1,47 @@
|
||||
# Copyright 2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake
|
||||
|
||||
DESCRIPTION="Non-blocking I/O tcp network lib based on c++14/17"
|
||||
HOMEPAGE="https://github.com/an-tao/trantor"
|
||||
SRC_URI="https://github.com/an-tao/trantor/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="adns doc +ssl test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
adns? ( net-dns/c-ares )
|
||||
ssl? ( dev-libs/openssl )
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
doc? ( app-doc/doxygen )
|
||||
test? ( dev-cpp/gtest )
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${PN}-1.5.1_GNUInstallDirs.patch" )
|
||||
|
||||
src_prepare() {
|
||||
use adns || sed -i '/find_package(c-ares)/d' CMakeLists.txt || die
|
||||
use ssl || sed -i '/find_package(OpenSSL)/d' CMakeLists.txt || die
|
||||
|
||||
use doc && HTML_DOCS="${BUILD_DIR}/docs/trantor/html/*"
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local -a mycmakeargs=(
|
||||
"-DBUILD_TRANTOR_SHARED=YES"
|
||||
"-DBUILD_DOC=$(usex doc)"
|
||||
"-DBUILD_TESTING=$(usex test)"
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
Reference in New Issue
Block a user