Gentoo Archives: gentoo-commits

From: Johannes Huber <johu@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/polybar/
Date: Tue, 28 May 2019 20:05:59
Message-Id: 1559073947.fd51a6358515998e2573d7c84619d41ff4a39578.johu@gentoo
1 commit: fd51a6358515998e2573d7c84619d41ff4a39578
2 Author: Johannes Huber <johu <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 28 19:59:30 2019 +0000
4 Commit: Johannes Huber <johu <AT> gentoo <DOT> org>
5 CommitDate: Tue May 28 20:05:47 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd51a635
7
8 x11-misc/polybar: Release switch
9
10 Package-Manager: Portage-2.3.67, Repoman-2.3.13
11 Signed-off-by: Johannes Huber <johu <AT> gentoo.org>
12
13 x11-misc/polybar/polybar-9999.ebuild | 33 +++++++++++++++++++++++++++++----
14 1 file changed, 29 insertions(+), 4 deletions(-)
15
16 diff --git a/x11-misc/polybar/polybar-9999.ebuild b/x11-misc/polybar/polybar-9999.ebuild
17 index 1c6fc7d1218..70e8d426aaf 100644
18 --- a/x11-misc/polybar/polybar-9999.ebuild
19 +++ b/x11-misc/polybar/polybar-9999.ebuild
20 @@ -4,16 +4,26 @@
21 EAPI=7
22
23 PYTHON_COMPAT=( python2_7 )
24 -inherit cmake-utils git-r3 python-single-r1
25 +inherit cmake-utils python-single-r1
26
27 DESCRIPTION="A fast and easy-to-use tool for creating status bars"
28 HOMEPAGE="https://github.com/jaagr/polybar"
29 -EGIT_REPO_URI="https://github.com/jaagr/${PN}.git"
30 -EGIT_CLONE_TYPE="shallow"
31 +
32 +if [[ ${PV} != *9999* ]]; then
33 + XPP_VERSION="1.4.0"
34 + I3IPCPP_VERSION="0.7.1"
35 + SRC_URI="https://github.com/jaagr/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
36 + https://github.com/jaagr/xpp/archive/${XPP_VERSION}.tar.gz -> xpp-${XPP_VERSION}.tar.gz
37 + https://github.com/jaagr/i3ipcpp/archive/v${I3IPCPP_VERSION}.tar.gz -> i3ipcpp-${I3IPCPP_VERSION}.tar.gz"
38 + KEYWORDS="~amd64 ~x86"
39 +else
40 + inherit git-r3
41 + EGIT_REPO_URI="https://github.com/jaagr/${PN}.git"
42 + EGIT_CLONE_TYPE="shallow"
43 +fi
44
45 LICENSE="MIT"
46 SLOT="0"
47 -KEYWORDS=""
48
49 IUSE="alsa curl i3wm ipc mpd network pulseaudio"
50 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
51 @@ -36,6 +46,20 @@ DEPEND="
52
53 RDEPEND="${DEPEND}"
54
55 +src_prepare() {
56 + cmake-utils_src_prepare
57 +
58 + if [[ ${PV} != *9999* ]]; then
59 + rmdir "${S}"/lib/xpp || die
60 + mv "${WORKDIR}"/xpp-$XPP_VERSION "${S}"/lib/xpp || die
61 +
62 + rmdir "${S}"/lib/i3ipcpp || die
63 + mv "${WORKDIR}"/i3ipcpp-$I3IPCPP_VERSION "${S}"/lib/i3ipcpp || die
64 +
65 + sed -i "s/.*cpp_error,.*/&\n\t 'eventstruct' : lambda x, y: None,/" lib/xpp/generators/cpp_client.py || die "sed failed"
66 + fi
67 +}
68 +
69 src_configure() {
70 local mycmakeargs=(
71 -DENABLE_ALSA="$(usex alsa)"
72 @@ -46,5 +70,6 @@ src_configure() {
73 -DENABLE_NETWORK="$(usex network)"
74 -DENABLE_PULSEAUDIO="$(usex pulseaudio)"
75 )
76 +
77 cmake-utils_src_configure
78 }