From f898279de8d469fc58b8b18d41cce5bb8949cd00 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Fri, 17 Feb 2017 23:55:47 +0100 Subject: [PATCH] net-im/ricochet: initial import of version 1.1.4 --- metadata/repository_mask.conf | 7 +++ .../ricochet-1.1.4-fix-libressl-compat.patch | 37 ++++++++++++++ .../net-im/ricochet/ricochet-1.1.4.exheres-0 | 50 +++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 packages/net-im/ricochet/files/ricochet-1.1.4-fix-libressl-compat.patch create mode 100644 packages/net-im/ricochet/ricochet-1.1.4.exheres-0 diff --git a/metadata/repository_mask.conf b/metadata/repository_mask.conf index 9b57001..fd853a0 100644 --- a/metadata/repository_mask.conf +++ b/metadata/repository_mask.conf @@ -27,3 +27,10 @@ *token = pre-release *description = [ Mask pre-releases ] ]] + +net-im/ricochet[providers:libressl] [[ + author = [ Julian Ospald ] + token = testing + description = [ Unapproved LibreSSL patch ] +]] + diff --git a/packages/net-im/ricochet/files/ricochet-1.1.4-fix-libressl-compat.patch b/packages/net-im/ricochet/files/ricochet-1.1.4-fix-libressl-compat.patch new file mode 100644 index 0000000..3b5896a --- /dev/null +++ b/packages/net-im/ricochet/files/ricochet-1.1.4-fix-libressl-compat.patch @@ -0,0 +1,37 @@ +From 5a02ee50fe3806a195ee0c730415160ffefc14ef Mon Sep 17 00:00:00 2001 +From: Julian Ospald +Date: Fri, 17 Feb 2017 14:00:21 +0100 +Subject: [PATCH] Fix LibreSSL compatibility +Upstream: submitted, https://github.com/ricochet-im/ricochet/pull/527 + +--- + src/main.cpp | 2 +- + src/utils/CryptoKey.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/main.cpp b/src/main.cpp +index 4fda541..fd4abfa 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -86,7 +86,7 @@ int main(int argc, char *argv[]) + initTranslation(); + + /* Initialize OpenSSL's allocator */ +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER) + CRYPTO_malloc_init(); + #else + OPENSSL_malloc_init(); +diff --git a/src/utils/CryptoKey.cpp b/src/utils/CryptoKey.cpp +index 0ddaa7e..64f4008 100644 +--- a/src/utils/CryptoKey.cpp ++++ b/src/utils/CryptoKey.cpp +@@ -39,7 +39,7 @@ + #include + #include + +-#if OPENSSL_VERSION_NUMBER < 0x10100000L ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER) + void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q) + { + *p = r->p; diff --git a/packages/net-im/ricochet/ricochet-1.1.4.exheres-0 b/packages/net-im/ricochet/ricochet-1.1.4.exheres-0 new file mode 100644 index 0000000..86d34df --- /dev/null +++ b/packages/net-im/ricochet/ricochet-1.1.4.exheres-0 @@ -0,0 +1,50 @@ +# Copyright 2017 Julian Ospald +# Distributed under the terms of the GNU General Public License v2 + +require qmake [ slot=5 ] +require github [ user="ricochet-im" tag="v${PV}" ] +require gtk-icon-cache + +SUMMARY="Anonymous peer-to-peer instant messaging" +HOMEPAGE="https://ricochet.im/ ${HOMEPAGE}" + +LICENCES="BSD-3 CCPL-Attribution-ShareAlike-4.0 LGPL-2.1 openssl" +SLOT="0" +PLATFORMS="~amd64 ~x86" +MYOPTIONS=" + ( providers: libressl openssl ) [[ number-selected = exactly-one ]] +" + +DEPENDENCIES=" + build: + virtual/pkg-config + build+run: + dev-libs/protobuf-c + x11-libs/qtbase:5 + x11-libs/qtdeclarative:5 + x11-libs/qtmultimedia:5 + x11-libs/qtquickcontrols:5 + x11-libs/qttools:5 + providers:libressl? ( dev-libs/libressl:= ) + providers:openssl? ( dev-libs/openssl ) + run: + net-misc/tor +" + +BUGS_TO="hasufell@posteo.de" + +DEFAULT_SRC_PREPARE_PATCHES=( + "${FILES}"/${PNV}-fix-libressl-compat.patch +) + +EQMAKE_PARAMS=( + DEFINES+=RICOCHET_NO_PORTABLE +) + +src_prepare() { + edo sed -i \ + -e 's#target.path = /usr/bin#target.path = /usr/'$(exhost --target)'/bin#' \ + ${PN}.pro + default +} +