diff options
author | Xin Yang <yangmame@icloud.com> | 2024-02-23 09:10:27 +0800 |
---|---|---|
committer | Remigiusz Micielski <rmicielski@purelymail.com> | 2024-02-23 16:20:46 +0100 |
commit | 151b6712419f4fea89d727a5f10e0711a14f6df3 (patch) | |
tree | 91329f5d56a4ba05aea3e9b6f4cacc19998edf00 /net-vpn | |
parent | net-libs/ixwebsocket: add fix server empty thread name patch (diff) | |
download | guru-151b6712419f4fea89d727a5f10e0711a14f6df3.tar.gz guru-151b6712419f4fea89d727a5f10e0711a14f6df3.tar.bz2 guru-151b6712419f4fea89d727a5f10e0711a14f6df3.zip |
net-vpn/candy: new package, add 3.9.1
Closes: https://github.com/gentoo/guru/pull/140
Signed-off-by: Xin Yang <yangmame@icloud.com>
Signed-off-by: Remigiusz Micielski <rmicielski@purelymail.com>
Diffstat (limited to 'net-vpn')
-rw-r--r-- | net-vpn/candy/Manifest | 1 | ||||
-rw-r--r-- | net-vpn/candy/candy-3.9.1.ebuild | 52 | ||||
-rw-r--r-- | net-vpn/candy/files/candy-3.9.1-use-system-ixwebsocket.patch | 60 | ||||
-rw-r--r-- | net-vpn/candy/metadata.xml | 15 |
4 files changed, 128 insertions, 0 deletions
diff --git a/net-vpn/candy/Manifest b/net-vpn/candy/Manifest new file mode 100644 index 000000000..f87e317a7 --- /dev/null +++ b/net-vpn/candy/Manifest @@ -0,0 +1 @@ +DIST candy-3.9.1.tar.gz 37847 BLAKE2B af7c857a8a41f0e98bd744162be563b973e20a630fb505de91155ab9fb7a17679a2bb9f69db8c737258d1293c5d77ad96a65a2b22455512b8f97390a7368165f SHA512 aa9727c74ab7c9536331098f11a2837daa51aa58503cbf5b43536afedf5eea8d30db296f515c4689cf44c980eea5a88e06ad161836fe64d4146de4fdce9d99ac diff --git a/net-vpn/candy/candy-3.9.1.ebuild b/net-vpn/candy/candy-3.9.1.ebuild new file mode 100644 index 000000000..843aa73cd --- /dev/null +++ b/net-vpn/candy/candy-3.9.1.ebuild @@ -0,0 +1,52 @@ +# 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 +" +RDEPEND="${DEPEND}" +BDEPEND=" + dev-libs/spdlog +" + +src_prepare() { + eapply "${FILESDIR}/${P}-use-system-ixwebsocket.patch" + cmake_src_prepare + default +} + +src_configure() { + local mycmakeargs=( + -DBUILD_SHARED_LIBS=OFF + ) + cmake_src_configure +} + +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-3.9.1-use-system-ixwebsocket.patch b/net-vpn/candy/files/candy-3.9.1-use-system-ixwebsocket.patch new file mode 100644 index 000000000..445d5ad08 --- /dev/null +++ b/net-vpn/candy/files/candy-3.9.1-use-system-ixwebsocket.patch @@ -0,0 +1,60 @@ +From 317538a145784eb28b530a7969e941dc047cbf06 Mon Sep 17 00:00:00 2001 +From: lanthora <lanthora@outlook.com> +Date: Wed, 21 Feb 2024 06:20:29 +0000 +Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=85=88=E4=BD=BF=E7=94=A8=E7=B3=BB?= + =?UTF-8?q?=E7=BB=9F=E7=9A=84=20ixwebsocket?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + CMakeLists.txt | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2da4334..160cfa1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,9 +20,13 @@ pkg_check_modules( + liburiparser + ) + ++pkg_check_modules(IXWEBSOCKET ixwebsocket) ++ + find_library(ARGP_LIB argp) + +-include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/ixwebsocket.cmake) ++if (NOT IXWEBSOCKET_FOUND) ++ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/ixwebsocket.cmake) ++endif() + + if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/wintun.cmake) +@@ -30,7 +34,12 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + endif() + + include_directories(${DEPENDENCIES_INCLUDEDIR}) +-include_directories(${ixwebsocket_SOURCE_DIR}) ++ ++if (IXWEBSOCKET_FOUND) ++ include_directories(${IXWEBSOCKET_INCLUDEDIR}) ++else() ++ include_directories(${ixwebsocket_SOURCE_DIR}) ++endif() + + add_subdirectory(${SOURCE}/core) + add_subdirectory(${SOURCE}/websocket) +@@ -43,7 +52,12 @@ target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE websocket) + target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE tun) + target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE peer) + target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE utility) +-target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ixwebsocket) ++ ++if (IXWEBSOCKET_FOUND) ++ target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ${IXWEBSOCKET_LIBRARIES}) ++else() ++ target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ixwebsocket) ++endif() + + if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE iphlpapi) diff --git a/net-vpn/candy/metadata.xml b/net-vpn/candy/metadata.xml new file mode 100644 index 000000000..67deff1af --- /dev/null +++ b/net-vpn/candy/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>yangmame@icloud.com</email> + <name>Xin Yang</name> + </maintainer> + <upstream> + <remote-id type="github">lanthora/candy</remote-id> + <maintainer> + <name>lanthora</name> + <email>lanthora@outlook.com</email> + </maintainer> + </upstream> +</pkgmetadata> |