From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AE185158041 for ; Thu, 29 Feb 2024 15:43:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B689AE29C5; Thu, 29 Feb 2024 15:43:28 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8E2E8E29C5 for ; Thu, 29 Feb 2024 15:43:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 444CD343084 for ; Thu, 29 Feb 2024 15:43:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A0FE7118C for ; Thu, 29 Feb 2024 15:43:25 +0000 (UTC) From: "David Roman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Roman" Message-ID: <1709221376.edb423f1db1df4f7ef36c155987979d7b37cbdfb.davidroman@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: net-vpn/candy/, net-vpn/candy/files/ X-VCS-Repository: repo/proj/guru X-VCS-Files: net-vpn/candy/Manifest net-vpn/candy/candy-4.0.ebuild net-vpn/candy/files/candy-4.0-show-version-and-use-cflags-env.patch X-VCS-Directories: net-vpn/candy/ net-vpn/candy/files/ X-VCS-Committer: davidroman X-VCS-Committer-Name: David Roman X-VCS-Revision: edb423f1db1df4f7ef36c155987979d7b37cbdfb X-VCS-Branch: dev Date: Thu, 29 Feb 2024 15:43:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e651c644-a9ee-40ff-9556-3bc81da7e095 X-Archives-Hash: db121761e87e098ae5388891e84c56d7 commit: edb423f1db1df4f7ef36c155987979d7b37cbdfb Author: Xin Yang icloud com> AuthorDate: Thu Feb 29 03:51:23 2024 +0000 Commit: David Roman gmail com> CommitDate: Thu Feb 29 15:42:56 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=edb423f1 net-vpn/candy: new 4.0 ebuild with version and cflags env patch Closes: https://github.com/gentoo/guru/pull/145 Signed-off-by: Xin Yang icloud.com> Signed-off-by: David Roman gmail.com> net-vpn/candy/Manifest | 1 + net-vpn/candy/candy-4.0.ebuild | 43 ++++++++++++ ...candy-4.0-show-version-and-use-cflags-env.patch | 80 ++++++++++++++++++++++ 3 files changed, 124 insertions(+) diff --git a/net-vpn/candy/Manifest b/net-vpn/candy/Manifest index f87e317a79..ae1de07b3a 100644 --- a/net-vpn/candy/Manifest +++ b/net-vpn/candy/Manifest @@ -1 +1,2 @@ DIST candy-3.9.1.tar.gz 37847 BLAKE2B af7c857a8a41f0e98bd744162be563b973e20a630fb505de91155ab9fb7a17679a2bb9f69db8c737258d1293c5d77ad96a65a2b22455512b8f97390a7368165f SHA512 aa9727c74ab7c9536331098f11a2837daa51aa58503cbf5b43536afedf5eea8d30db296f515c4689cf44c980eea5a88e06ad161836fe64d4146de4fdce9d99ac +DIST candy-4.0.tar.gz 43112 BLAKE2B 84c3fbab30dc1d40ba73e7c90a02bf6c13b9bb0de2339fe128c958242213986dc2c490c680032c98f9a3a849e237f1f22274b600e55ed94aea91d9529bf972bf SHA512 9f76ab338cec381e1421040055ba73882a32f6b2b9bebe8fbc289c1c0e418506a57698fa8e551a31a918dfbcfa668dbb6c1d82390a2496a7fe35d6a17adacd64 diff --git a/net-vpn/candy/candy-4.0.ebuild b/net-vpn/candy/candy-4.0.ebuild new file mode 100644 index 0000000000..70b9c5a55e --- /dev/null +++ b/net-vpn/candy/candy-4.0.ebuild @@ -0,0 +1,43 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake systemd + +DESCRIPTION="Another virtual private network that supports peer-to-peer connections" +HOMEPAGE="https://github.com/lanthora/candy" +SRC_URI="https://github.com/lanthora/candy/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + dev-libs/uriparser + dev-libs/libconfig + net-libs/ixwebsocket[ws] + dev-libs/openssl + sys-libs/zlib + dev-libs/libfmt + dev-libs/spdlog +" +RDEPEND="${DEPEND}" + +src_prepare() { + eapply "${FILESDIR}/${P}-show-version-and-use-cflags-env.patch" + cmake_src_prepare + default +} + +src_install(){ + cmake_src_install + default + + insinto /etc + doins candy.conf + fperms 0644 /etc/candy.conf + + systemd_dounit candy.service + systemd_dounit candy@.service +} diff --git a/net-vpn/candy/files/candy-4.0-show-version-and-use-cflags-env.patch b/net-vpn/candy/files/candy-4.0-show-version-and-use-cflags-env.patch new file mode 100644 index 0000000000..c0e0121f14 --- /dev/null +++ b/net-vpn/candy/files/candy-4.0-show-version-and-use-cflags-env.patch @@ -0,0 +1,80 @@ +From de8f5a3109ee3bdc472fbc7fcb1572aaad0b8cb9 Mon Sep 17 00:00:00 2001 +From: lanthora +Date: Thu, 29 Feb 2024 05:16:53 +0000 +Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=98=BE=E7=A4=BA=E7=89=88?= + =?UTF-8?q?=E6=9C=AC=E5=8F=B7?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + CMakeLists.txt | 10 ++++++---- + src/main/main.cc | 13 +++++++++++++ + 2 files changed, 19 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1ebf2c0..dffc31d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,10 +1,12 @@ + cmake_minimum_required(VERSION 3.18.4) + +-project(candy CXX) ++project(candy LANGUAGES CXX VERSION 4.0) + +-set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++2b -Wall -Werror -Wfatal-errors -Wno-unknown-pragmas") +-set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g -fsanitize=address") +-set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O2") ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++2b -Wall -Werror -Wfatal-errors -Wno-unknown-pragmas") ++set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address") ++set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2") ++ ++add_compile_definitions(VERSION="${CMAKE_PROJECT_VERSION}") + + include_directories(${CMAKE_SOURCE_DIR}/src) + +diff --git a/src/main/main.cc b/src/main/main.cc +index 286d24d..65cdc4f 100644 +--- a/src/main/main.cc ++++ b/src/main/main.cc +@@ -21,6 +21,10 @@ + + #include + ++#ifndef VERSION ++#define VERSION "unknown" ++#endif ++ + namespace { + + struct arguments { +@@ -54,6 +58,7 @@ struct argp_option options[] = { + {"config", 'c', "PATH", 0, "Configuration file path"}, + {"discovery", OPT_DISCOVERY_INTERVAL, "SECONDS", 0, "Active discovery broadcast interval"}, + {"route", 'r', "COST", 0, "Cost of routing"}, ++ {"version", 'v', 0, 0, "Show version"}, + {"no-timestamp", OPT_NO_TIMESTAMP, 0, 0, "Log does not show time"}, + {"debug", OPT_LOG_LEVEL_DEBUG, 0, 0, "Show debug level logs"}, + {"auto-restart", OPT_AUTO_RESTART, 0, 0, "Automatic restart"}, +@@ -72,6 +77,11 @@ int setLogLevelDebug() { + return 0; + } + ++void showVersion() { ++ std::cout << VERSION << std::endl; ++ exit(0); ++} ++ + bool needShowUsage(struct arguments *arguments, struct argp_state *state) { + if (state->arg_num > 0) + return true; +@@ -141,6 +151,9 @@ int parseOption(int key, char *arg, struct argp_state *state) { + case 'c': + parseConfigFile(arguments, arg); + break; ++ case 'v': ++ showVersion(); ++ break; + case OPT_NO_TIMESTAMP: + disableLogTimestamp(); + break; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 33C7D158041 for ; Thu, 29 Feb 2024 21:44:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 46846E2A18; Thu, 29 Feb 2024 21:44:20 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 25EE9E2A17 for ; Thu, 29 Feb 2024 21:44:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2FBF1343018 for ; Thu, 29 Feb 2024 21:44:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 84C6DE95 for ; Thu, 29 Feb 2024 21:44:17 +0000 (UTC) From: "David Roman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Roman" Message-ID: <1709221376.edb423f1db1df4f7ef36c155987979d7b37cbdfb.davidroman@gentoo> Subject: [gentoo-commits] repo/proj/guru:master commit in: net-vpn/candy/files/, net-vpn/candy/ X-VCS-Repository: repo/proj/guru X-VCS-Files: net-vpn/candy/Manifest net-vpn/candy/candy-4.0.ebuild net-vpn/candy/files/candy-4.0-show-version-and-use-cflags-env.patch X-VCS-Directories: net-vpn/candy/ net-vpn/candy/files/ X-VCS-Committer: davidroman X-VCS-Committer-Name: David Roman X-VCS-Revision: edb423f1db1df4f7ef36c155987979d7b37cbdfb X-VCS-Branch: master Date: Thu, 29 Feb 2024 21:44:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: edcdd38a-5a85-4ff3-a4ca-7a0b12bba842 X-Archives-Hash: f1abececa09437794264b983368ee6d3 Message-ID: <20240229214417.iuhqUbGVQvd5uAMmjobWKzwzmTbvgSXdiV8FZJ-jwTQ@z> commit: edb423f1db1df4f7ef36c155987979d7b37cbdfb Author: Xin Yang icloud com> AuthorDate: Thu Feb 29 03:51:23 2024 +0000 Commit: David Roman gmail com> CommitDate: Thu Feb 29 15:42:56 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=edb423f1 net-vpn/candy: new 4.0 ebuild with version and cflags env patch Closes: https://github.com/gentoo/guru/pull/145 Signed-off-by: Xin Yang icloud.com> Signed-off-by: David Roman gmail.com> net-vpn/candy/Manifest | 1 + net-vpn/candy/candy-4.0.ebuild | 43 ++++++++++++ ...candy-4.0-show-version-and-use-cflags-env.patch | 80 ++++++++++++++++++++++ 3 files changed, 124 insertions(+) diff --git a/net-vpn/candy/Manifest b/net-vpn/candy/Manifest index f87e317a79..ae1de07b3a 100644 --- a/net-vpn/candy/Manifest +++ b/net-vpn/candy/Manifest @@ -1 +1,2 @@ DIST candy-3.9.1.tar.gz 37847 BLAKE2B af7c857a8a41f0e98bd744162be563b973e20a630fb505de91155ab9fb7a17679a2bb9f69db8c737258d1293c5d77ad96a65a2b22455512b8f97390a7368165f SHA512 aa9727c74ab7c9536331098f11a2837daa51aa58503cbf5b43536afedf5eea8d30db296f515c4689cf44c980eea5a88e06ad161836fe64d4146de4fdce9d99ac +DIST candy-4.0.tar.gz 43112 BLAKE2B 84c3fbab30dc1d40ba73e7c90a02bf6c13b9bb0de2339fe128c958242213986dc2c490c680032c98f9a3a849e237f1f22274b600e55ed94aea91d9529bf972bf SHA512 9f76ab338cec381e1421040055ba73882a32f6b2b9bebe8fbc289c1c0e418506a57698fa8e551a31a918dfbcfa668dbb6c1d82390a2496a7fe35d6a17adacd64 diff --git a/net-vpn/candy/candy-4.0.ebuild b/net-vpn/candy/candy-4.0.ebuild new file mode 100644 index 0000000000..70b9c5a55e --- /dev/null +++ b/net-vpn/candy/candy-4.0.ebuild @@ -0,0 +1,43 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake systemd + +DESCRIPTION="Another virtual private network that supports peer-to-peer connections" +HOMEPAGE="https://github.com/lanthora/candy" +SRC_URI="https://github.com/lanthora/candy/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + dev-libs/uriparser + dev-libs/libconfig + net-libs/ixwebsocket[ws] + dev-libs/openssl + sys-libs/zlib + dev-libs/libfmt + dev-libs/spdlog +" +RDEPEND="${DEPEND}" + +src_prepare() { + eapply "${FILESDIR}/${P}-show-version-and-use-cflags-env.patch" + cmake_src_prepare + default +} + +src_install(){ + cmake_src_install + default + + insinto /etc + doins candy.conf + fperms 0644 /etc/candy.conf + + systemd_dounit candy.service + systemd_dounit candy@.service +} diff --git a/net-vpn/candy/files/candy-4.0-show-version-and-use-cflags-env.patch b/net-vpn/candy/files/candy-4.0-show-version-and-use-cflags-env.patch new file mode 100644 index 0000000000..c0e0121f14 --- /dev/null +++ b/net-vpn/candy/files/candy-4.0-show-version-and-use-cflags-env.patch @@ -0,0 +1,80 @@ +From de8f5a3109ee3bdc472fbc7fcb1572aaad0b8cb9 Mon Sep 17 00:00:00 2001 +From: lanthora +Date: Thu, 29 Feb 2024 05:16:53 +0000 +Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=98=BE=E7=A4=BA=E7=89=88?= + =?UTF-8?q?=E6=9C=AC=E5=8F=B7?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + CMakeLists.txt | 10 ++++++---- + src/main/main.cc | 13 +++++++++++++ + 2 files changed, 19 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1ebf2c0..dffc31d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,10 +1,12 @@ + cmake_minimum_required(VERSION 3.18.4) + +-project(candy CXX) ++project(candy LANGUAGES CXX VERSION 4.0) + +-set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++2b -Wall -Werror -Wfatal-errors -Wno-unknown-pragmas") +-set(CMAKE_CXX_FLAGS_DEBUG_INIT "-g -fsanitize=address") +-set(CMAKE_CXX_FLAGS_RELEASE_INIT "-O2") ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++2b -Wall -Werror -Wfatal-errors -Wno-unknown-pragmas") ++set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address") ++set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2") ++ ++add_compile_definitions(VERSION="${CMAKE_PROJECT_VERSION}") + + include_directories(${CMAKE_SOURCE_DIR}/src) + +diff --git a/src/main/main.cc b/src/main/main.cc +index 286d24d..65cdc4f 100644 +--- a/src/main/main.cc ++++ b/src/main/main.cc +@@ -21,6 +21,10 @@ + + #include + ++#ifndef VERSION ++#define VERSION "unknown" ++#endif ++ + namespace { + + struct arguments { +@@ -54,6 +58,7 @@ struct argp_option options[] = { + {"config", 'c', "PATH", 0, "Configuration file path"}, + {"discovery", OPT_DISCOVERY_INTERVAL, "SECONDS", 0, "Active discovery broadcast interval"}, + {"route", 'r', "COST", 0, "Cost of routing"}, ++ {"version", 'v', 0, 0, "Show version"}, + {"no-timestamp", OPT_NO_TIMESTAMP, 0, 0, "Log does not show time"}, + {"debug", OPT_LOG_LEVEL_DEBUG, 0, 0, "Show debug level logs"}, + {"auto-restart", OPT_AUTO_RESTART, 0, 0, "Automatic restart"}, +@@ -72,6 +77,11 @@ int setLogLevelDebug() { + return 0; + } + ++void showVersion() { ++ std::cout << VERSION << std::endl; ++ exit(0); ++} ++ + bool needShowUsage(struct arguments *arguments, struct argp_state *state) { + if (state->arg_num > 0) + return true; +@@ -141,6 +151,9 @@ int parseOption(int key, char *arg, struct argp_state *state) { + case 'c': + parseConfigFile(arguments, arg); + break; ++ case 'v': ++ showVersion(); ++ break; + case OPT_NO_TIMESTAMP: + disableLogTimestamp(); + break;