From 30b0b9c3a8d13807a6822b95d46bc27762529cfb Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 9 Jun 2018 04:06:55 +0200 Subject: [PATCH] net-libs/ccnet: initial import --- packages/net-libs/ccnet/ccnet-6.1.8.exheres-0 | 43 +++++++++++++++++++ .../ccnet/files/fix-libressl-build.patch | 16 +++++++ 2 files changed, 59 insertions(+) create mode 100644 packages/net-libs/ccnet/ccnet-6.1.8.exheres-0 create mode 100644 packages/net-libs/ccnet/files/fix-libressl-build.patch diff --git a/packages/net-libs/ccnet/ccnet-6.1.8.exheres-0 b/packages/net-libs/ccnet/ccnet-6.1.8.exheres-0 new file mode 100644 index 0000000..28cde11 --- /dev/null +++ b/packages/net-libs/ccnet/ccnet-6.1.8.exheres-0 @@ -0,0 +1,43 @@ +# Copyright 2018 Julian Ospald +# Distributed under the terms of the GNU General Public License v2 + +require python [ blacklist=3 has_bin=false multibuild=false ] +require github [ user=haiwen tag="v${PV}" ] +require autotools [ supported_autoconf=[ 2.5 ] supported_automake=[ 1.15 ] ] +require vala [ vala_dep=true ] + +SUMMARY="Ccnet is a framework for writing networked applications in C" +="" + +LICENCES="GPL-2" # has openssl linking exception +SLOT="0" +PLATFORMS="~amd64 ~x86" +MYOPTIONS=" + ( providers: libressl openssl ) [[ number-selected = exactly-one ]] +" + +DEPENDENCIES=" + build: + virtual/pkg-config + build+run: + dev-db/sqlite:3 + dev-libs/glib:2 + dev-libs/jansson + dev-libs/libevent + net-libs/libsearpc[python_abis:*(-)?] + providers:libressl? ( dev-libs/libressl:= ) + providers:openssl? ( dev-libs/openssl ) +" + +BUGS_TO="hasufell@posteo.de" + +DEFAULT_SRC_PREPARE_PATCHES=( + "${FILES}"/fix-libressl-build.patch +) + +src_prepare() { + default + edo sed -i -e "s/(DESTDIR)//" libccnet.pc.in + edo sed -i -e 's/valac /${VALAC} /' lib/Makefile.am + eautoreconf +} diff --git a/packages/net-libs/ccnet/files/fix-libressl-build.patch b/packages/net-libs/ccnet/files/fix-libressl-build.patch new file mode 100644 index 0000000..ae7805b --- /dev/null +++ b/packages/net-libs/ccnet/files/fix-libressl-build.patch @@ -0,0 +1,16 @@ +Source: Me +Reason: fix build with libressl +Upstream: No, notified https://github.com/haiwen/ccnet/issues/122 + +--- a/lib/rsa.c 2017-05-28 03:23:49.499297000 +0200 ++++ b/lib/rsa.c 2017-05-28 03:34:19.755854000 +0200 +@@ -13,7 +13,7 @@ + + /* Forward compatibility functions if libssl < 1.1.0. */ + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER) + + int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) + { +