Gentoo Archives: gentoo-commits

From: Conrad Kostecki <conikost@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/spectrum2/
Date: Thu, 30 Jul 2020 13:38:10
Message-Id: 1596116273.b43e934ebfdd14c72dc35cce2fab950bf4af2ccb.conikost@gentoo
1 commit: b43e934ebfdd14c72dc35cce2fab950bf4af2ccb
2 Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 30 13:29:19 2020 +0000
4 Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 30 13:37:53 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b43e934e
7
8 net-im/spectrum2: enable tests (stable)
9
10 Since python isn't needed at all for tests, it can be dropped.
11
12 Bug: https://bugs.gentoo.org/734558
13 Package-Manager: Portage-2.3.103, Repoman-2.3.23
14 Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
15
16 net-im/spectrum2/spectrum2-2.0.12-r3.ebuild | 107 ++++++++++++++++++++++++++++
17 1 file changed, 107 insertions(+)
18
19 diff --git a/net-im/spectrum2/spectrum2-2.0.12-r3.ebuild b/net-im/spectrum2/spectrum2-2.0.12-r3.ebuild
20 new file mode 100644
21 index 00000000000..85771c62be5
22 --- /dev/null
23 +++ b/net-im/spectrum2/spectrum2-2.0.12-r3.ebuild
24 @@ -0,0 +1,107 @@
25 +# Copyright 1999-2020 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +inherit cmake systemd
31 +
32 +DESCRIPTION="An open source instant messaging transport"
33 +HOMEPAGE="https://www.spectrum.im"
34 +SRC_URI="https://github.com/SpectrumIM/spectrum2/archive/${PV}.tar.gz -> ${P}.tar.gz"
35 +
36 +LICENSE="GPL-2+"
37 +SLOT="0"
38 +KEYWORDS="amd64"
39 +IUSE="doc frotz irc mysql postgres purple sms +sqlite test twitter whatsapp xmpp"
40 +REQUIRED_USE="|| ( mysql postgres sqlite )"
41 +RESTRICT="!test? ( test )"
42 +
43 +RDEPEND="
44 + acct-group/spectrum
45 + acct-user/spectrum
46 + dev-libs/boost:=[nls]
47 + dev-libs/expat
48 + dev-libs/libev:=
49 + dev-libs/log4cxx
50 + dev-libs/jsoncpp:=
51 + dev-libs/openssl:0=
52 + dev-libs/popt
53 + dev-libs/protobuf:=
54 + net-dns/libidn:0=
55 + net-im/swift:=
56 + net-misc/curl
57 + sys-libs/zlib:=
58 + frotz? ( !games-engines/frotz )
59 + irc? ( net-im/libcommuni )
60 + mysql? (
61 + || (
62 + dev-db/mariadb-connector-c
63 + dev-db/mysql-connector-c
64 + )
65 + )
66 + postgres? ( >=dev-libs/libpqxx-6.4.5:= )
67 + purple? (
68 + dev-libs/glib
69 + net-im/pidgin:=
70 + )
71 + sms? ( app-mobilephone/smstools )
72 + sqlite? ( dev-db/sqlite:3 )
73 + twitter? ( net-misc/curl )
74 + whatsapp? ( net-im/transwhat )"
75 +
76 +DEPEND="
77 + ${RDEPEND}
78 + doc? ( app-doc/doxygen )
79 + test? ( dev-util/cppunit )
80 +"
81 +
82 +PATCHES="
83 + "${FILESDIR}/${P}-boost-173-compatibility.patch"
84 + "${FILESDIR}/${P}-gcc-10-compatibility.patch"
85 +"
86 +
87 +src_prepare() {
88 + # Respect users LDFLAGS
89 + sed -i -e "s/-Wl,-export-dynamic/& ${LDFLAGS}/" spectrum/src/CMakeLists.txt || die
90 +
91 + cmake_src_prepare
92 +}
93 +
94 +src_configure() {
95 + local mycmakeargs=(
96 + -DENABLE_DOCS="$(usex doc)"
97 + -DENABLE_FROTZ="$(usex frotz)"
98 + -DENABLE_IRC="$(usex irc)"
99 + -DENABLE_MYSQL="$(usex mysql)"
100 + -DENABLE_PQXX="$(usex postgres)"
101 + -DENABLE_PURPLE="$(usex purple)"
102 + $(usex irc '-DENABLE_QT4=OFF' '')
103 + -DENABLE_SMSTOOLS3="$(usex sms)"
104 + -DENABLE_SQLITE3="$(usex sqlite)"
105 + -DENABLE_TESTS="$(usex test)"
106 + -DENABLE_TWITTER="$(usex twitter)"
107 + -DENABLE_XMPP="$(usex xmpp)"
108 + -DLIB_INSTALL_DIR="$(get_libdir)"
109 + )
110 +
111 + cmake_src_configure
112 +}
113 +
114 +src_test() {
115 + cd "${BUILD_DIR}/tests/libtransport" || die
116 + ./libtransport_test || die
117 +}
118 +
119 +src_install() {
120 + cmake_src_install
121 +
122 + diropts -o spectrum -g spectrum
123 + keepdir /var/log/spectrum2 /var/lib/spectrum2
124 + diropts
125 +
126 + newinitd "${FILESDIR}"/spectrum2.initd spectrum2
127 + systemd_newunit "${FILESDIR}"/spectrum2.service spectrum2.service
128 + systemd_newtmpfilesd "${FILESDIR}"/spectrum2.tmpfiles-r1 spectrum2.conf
129 +
130 + einstalldocs
131 +}