Gentoo Archives: gentoo-commits

From: Andrey Utkin <andrey_utkin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/spectrum2/
Date: Fri, 20 Sep 2019 08:47:44
Message-Id: 1568969190.e5e358153a69fc3981ee460b96d8e07f6eaf8448.andrey_utkin@gentoo
1 commit: e5e358153a69fc3981ee460b96d8e07f6eaf8448
2 Author: Conrad Kostecki <conrad <AT> kostecki <DOT> com>
3 AuthorDate: Tue Sep 17 18:01:22 2019 +0000
4 Commit: Andrey Utkin <andrey_utkin <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 20 08:46:30 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5e35815
7
8 net-im/spectrum2: drop user eclass
9
10 Dropped user eclass in favour of acct-* packages.
11
12 Package-Manager: Portage-2.3.76, Repoman-2.3.17
13 Signed-off-by: Conrad Kostecki <conrad <AT> kostecki.com>
14 Signed-off-by: Andrey Utkin <andrey_utkin <AT> gentoo.org>
15
16 net-im/spectrum2/spectrum2-2.0.12-r1.ebuild | 117 ++++++++++++++++++++++++++++
17 1 file changed, 117 insertions(+)
18
19 diff --git a/net-im/spectrum2/spectrum2-2.0.12-r1.ebuild b/net-im/spectrum2/spectrum2-2.0.12-r1.ebuild
20 new file mode 100644
21 index 00000000000..328982615fb
22 --- /dev/null
23 +++ b/net-im/spectrum2/spectrum2-2.0.12-r1.ebuild
24 @@ -0,0 +1,117 @@
25 +# Copyright 1999-2019 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +PYTHON_COMPAT=( python2_7 )
31 +
32 +inherit cmake-utils python-any-r1 systemd
33 +
34 +DESCRIPTION="An open source instant messaging transport"
35 +HOMEPAGE="https://www.spectrum.im"
36 +SRC_URI="https://github.com/SpectrumIM/spectrum2/archive/${PV}.tar.gz -> ${P}.tar.gz"
37 +
38 +LICENSE="GPL-2+"
39 +SLOT="0"
40 +KEYWORDS="~amd64"
41 +IUSE="doc frotz irc mysql postgres purple sms +sqlite test twitter whatsapp xmpp"
42 +REQUIRED_USE="|| ( mysql postgres sqlite )"
43 +
44 +RDEPEND="
45 + acct-group/spectrum
46 + acct-user/spectrum
47 + dev-libs/boost:=[nls]
48 + dev-libs/expat
49 + dev-libs/libev:=
50 + dev-libs/log4cxx
51 + dev-libs/jsoncpp:=
52 + dev-libs/openssl:0=
53 + dev-libs/popt
54 + dev-libs/protobuf:=
55 + net-dns/libidn:0=
56 + net-im/swift:=
57 + net-misc/curl
58 + sys-libs/zlib:=
59 + frotz? ( !games-engines/frotz )
60 + irc? ( net-im/libcommuni )
61 + mysql? (
62 + || (
63 + dev-db/mariadb-connector-c
64 + dev-db/mysql-connector-c
65 + )
66 + )
67 + postgres? ( >=dev-libs/libpqxx-6.4.5:= )
68 + purple? (
69 + dev-libs/glib
70 + net-im/pidgin:=
71 + )
72 + sms? ( app-mobilephone/smstools )
73 + sqlite? ( dev-db/sqlite:3 )
74 + twitter? ( net-misc/curl )
75 + whatsapp? ( net-im/transwhat )"
76 +
77 +DEPEND="
78 + ${RDEPEND}
79 + doc? ( app-doc/doxygen )
80 + test? (
81 + ${PYTHON_DEPS}
82 + $(python_gen_any_dep 'dev-python/sleekxmpp[${PYTHON_USEDEP}]')
83 + dev-util/cppunit
84 + net-irc/ngircd
85 + )
86 +"
87 +
88 +# Tests are currently restricted, as they do completly fail
89 +RESTRICT="test"
90 +
91 +python_check_deps() {
92 + has_version "dev-python/sleekxmpp[${PYTHON_USEDEP}]"
93 +}
94 +
95 +pkg_setup() {
96 + use test && python-any-r1_pkg_setup
97 +}
98 +
99 +src_prepare() {
100 + # Respect users LDFLAGS
101 + sed -i -e "s/-Wl,-export-dynamic/& ${LDFLAGS}/" spectrum/src/CMakeLists.txt || die
102 +
103 + cmake-utils_src_prepare
104 +}
105 +
106 +src_configure() {
107 + local mycmakeargs=(
108 + -DENABLE_DOCS="$(usex doc)"
109 + -DENABLE_FROTZ="$(usex frotz)"
110 + -DENABLE_IRC="$(usex irc)"
111 + -DENABLE_MYSQL="$(usex mysql)"
112 + -DENABLE_PQXX="$(usex postgres)"
113 + -DENABLE_PURPLE="$(usex purple)"
114 + -DENABLE_SMSTOOLS3="$(usex sms)"
115 + -DENABLE_SQLITE3="$(usex sqlite)"
116 + -DENABLE_TESTS="$(usex test)"
117 + -DENABLE_TWITTER="$(usex twitter)"
118 + -DENABLE_XMPP="$(usex xmpp)"
119 + -DLIB_INSTALL_DIR="$(get_libdir)"
120 + )
121 +
122 + cmake-utils_src_configure
123 +}
124 +
125 +src_test() {
126 + cd tests/libtransport && "${EPYTHON}" ../start.py || die
127 +}
128 +
129 +src_install() {
130 + cmake-utils_src_install
131 +
132 + diropts -o spectrum -g spectrum
133 + keepdir /var/log/spectrum2 /var/lib/spectrum2
134 + diropts
135 +
136 + newinitd "${FILESDIR}"/spectrum2.initd spectrum2
137 + systemd_newunit "${FILESDIR}"/spectrum2.service spectrum2.service
138 + systemd_newtmpfilesd "${FILESDIR}"/spectrum2.tmpfiles-r1 spectrum2.conf
139 +
140 + einstalldocs
141 +}