Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-plugins/pidgin-telegram/files/, x11-plugins/pidgin-telegram/
Date: Thu, 22 Nov 2018 21:30:26
Message-Id: 1542922210.7f2b4044d41090f465e12091ac2a1759e6240c3e.mgorny@gentoo
1 commit: 7f2b4044d41090f465e12091ac2a1759e6240c3e
2 Author: Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
3 AuthorDate: Sat Nov 10 08:33:24 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 22 21:30:10 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f2b4044
7
8 x11-plugins/pidgin-telegram: add LibreSSL support
9
10 Closes: https://bugs.gentoo.org/666562
11 Package-Manager: Portage-2.3.51, Repoman-2.3.12
12 Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com>
13 Closes: https://github.com/gentoo/gentoo/pull/10384
14 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
15
16 .../files/pidgin-telegram-1.3.1-libressl.patch | 25 +++++++++++
17 .../pidgin-telegram-1.3.1-r2.ebuild | 49 ++++++++++++++++++++++
18 2 files changed, 74 insertions(+)
19
20 diff --git a/x11-plugins/pidgin-telegram/files/pidgin-telegram-1.3.1-libressl.patch b/x11-plugins/pidgin-telegram/files/pidgin-telegram-1.3.1-libressl.patch
21 new file mode 100644
22 index 00000000000..ca1ffee7cc4
23 --- /dev/null
24 +++ b/x11-plugins/pidgin-telegram/files/pidgin-telegram-1.3.1-libressl.patch
25 @@ -0,0 +1,25 @@
26 +From 6ab594162a228bb5d79ba274859d4d2ab0eb7041 Mon Sep 17 00:00:00 2001
27 +From: Stefan Strogin <stefan.strogin@×××××.com>
28 +Date: Sat, 10 Nov 2018 10:15:19 +0200
29 +Subject: [PATCH] Fix LibreSSL <2.7.0 support
30 +
31 +---
32 + tgl/crypto/rsa_pem_openssl.c | 2 +-
33 + 1 file changed, 1 insertion(+), 1 deletion(-)
34 +
35 +diff --git a/tgl/crypto/rsa_pem_openssl.c b/tgl/crypto/rsa_pem_openssl.c
36 +index fe5cd9c..be657b3 100644
37 +--- a/tgl/crypto/rsa_pem_openssl.c
38 ++++ b/tgl/crypto/rsa_pem_openssl.c
39 +@@ -31,7 +31,7 @@
40 + #include "meta.h"
41 + #include "rsa_pem.h"
42 +
43 +-#if OPENSSL_VERSION_NUMBER < 0x10100000L
44 ++#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (defined(LIBRESSL_VERSION_NUMBER) && (LIBRESSL_VERSION_NUMBER < 0x2070000fL))
45 +
46 + int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
47 + {
48 +--
49 +2.19.1
50 +
51
52 diff --git a/x11-plugins/pidgin-telegram/pidgin-telegram-1.3.1-r2.ebuild b/x11-plugins/pidgin-telegram/pidgin-telegram-1.3.1-r2.ebuild
53 new file mode 100644
54 index 00000000000..07eb0e85f55
55 --- /dev/null
56 +++ b/x11-plugins/pidgin-telegram/pidgin-telegram-1.3.1-r2.ebuild
57 @@ -0,0 +1,49 @@
58 +# Copyright 1999-2018 Gentoo Authors
59 +# Distributed under the terms of the GNU General Public License v2
60 +
61 +EAPI="7"
62 +
63 +DESCRIPTION="A libpurple protocol plugin that adds support for the Telegram messenger"
64 +HOMEPAGE="https://github.com/majn/telegram-purple"
65 +SRC_URI="https://github.com/majn/telegram-purple/releases/download/v${PV}/telegram-purple_${PV}.orig.tar.gz"
66 +
67 +LICENSE="GPL-2+"
68 +KEYWORDS="~amd64 ~x86"
69 +SLOT="0"
70 +IUSE="gcrypt libressl +nls +webp"
71 +
72 +RDEPEND="net-im/pidgin
73 + sys-libs/zlib:=
74 + gcrypt? ( dev-libs/libgcrypt:0= )
75 + !gcrypt? (
76 + libressl? ( dev-libs/libressl:0= )
77 + !libressl? ( dev-libs/openssl:0= )
78 + )
79 + nls? ( sys-devel/gettext )
80 + webp? ( media-libs/libwebp:= )"
81 +
82 +BDEPEND="virtual/pkgconfig"
83 +DEPEND="${RDEPEND}"
84 +
85 +PATCHES=( "${FILESDIR}/${P}-libressl.patch" )
86 +
87 +S="${WORKDIR}/telegram-purple"
88 +
89 +DOCS=( "AUTHORS" "CHANGELOG.md" "HACKING.md" "HACKING.BUILD.md" "README.md" )
90 +
91 +src_prepare() {
92 + default
93 +
94 + # Remove '-Werror' to make it compile
95 + find -name 'Makefile*' -exec sed -i -e 's/-Werror //' {} + || die
96 +}
97 +
98 +src_configure() {
99 + local myeconfargs=(
100 + $(use_enable gcrypt)
101 + $(use_enable nls translation)
102 + $(use_enable webp libwebp)
103 + )
104 +
105 + econf "${myeconfargs[@]}"
106 +}