summaryrefslogtreecommitdiff
path: root/x11-wm/i3
diff options
context:
space:
mode:
authorJakov Smolić <jsmolic@gentoo.org>2021-09-04 14:06:46 +0200
committerJakov Smolić <jsmolic@gentoo.org>2021-09-04 14:06:55 +0200
commit060aac3f521a62449838a4855298005250ebc4d4 (patch)
treedfc23cad613a828a90c5d306d0ab30090fb8128d /x11-wm/i3
parentmedia-gfx/hydrus: Add 453 (diff)
downloadgentoo-060aac3f521a62449838a4855298005250ebc4d4.tar.gz
gentoo-060aac3f521a62449838a4855298005250ebc4d4.tar.bz2
gentoo-060aac3f521a62449838a4855298005250ebc4d4.zip
x11-wm/i3: Style fixes
* Drop redundant first if block * Sort dependencies alphabetically * Add RESTRICT line Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
Diffstat (limited to 'x11-wm/i3')
-rw-r--r--x11-wm/i3/i3-4.19.2.ebuild33
-rw-r--r--x11-wm/i3/i3-9999.ebuild43
2 files changed, 43 insertions, 33 deletions
diff --git a/x11-wm/i3/i3-4.19.2.ebuild b/x11-wm/i3/i3-4.19.2.ebuild
index 0b7b213271dd..8aedb5be5197 100644
--- a/x11-wm/i3/i3-4.19.2.ebuild
+++ b/x11-wm/i3/i3-4.19.2.ebuild
@@ -4,15 +4,13 @@
EAPI=7
inherit meson optfeature virtualx
-if [[ "${PV}" = *9999 ]]; then
- inherit git-r3
-fi
DESCRIPTION="An improved dynamic tiling window manager"
HOMEPAGE="https://i3wm.org/"
if [[ "${PV}" = *9999 ]]; then
EGIT_REPO_URI="https://github.com/i3/i3"
EGIT_BRANCH="next"
+ inherit git-r3
else
SRC_URI="https://i3wm.org/downloads/${P}.tar.xz"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
@@ -21,12 +19,16 @@ fi
LICENSE="BSD"
SLOT="0"
IUSE="doc test"
+RESTRICT="!test? ( test )"
-COMMON_DEPEND="dev-libs/libev
+COMMON_DEPEND="
+ dev-libs/libev
dev-libs/libpcre
dev-libs/yajl
+ x11-libs/cairo[X,xcb(+)]
x11-libs/libxcb[xkb]
x11-libs/libxkbcommon[X]
+ x11-libs/pango[X]
x11-libs/startup-notification
x11-libs/xcb-util
x11-libs/xcb-util-cursor
@@ -34,17 +36,17 @@ COMMON_DEPEND="dev-libs/libev
x11-libs/xcb-util-wm
x11-libs/xcb-util-xrm
x11-misc/xkeyboard-config
- x11-libs/cairo[X,xcb(+)]
- x11-libs/pango[X]"
-DEPEND="${COMMON_DEPEND}
+"
+DEPEND="
+ ${COMMON_DEPEND}
test? (
dev-perl/AnyEvent
- dev-perl/X11-XCB
+ dev-perl/ExtUtils-PkgConfig
dev-perl/Inline
dev-perl/Inline-C
dev-perl/IPC-Run
- dev-perl/ExtUtils-PkgConfig
dev-perl/local-lib
+ dev-perl/X11-XCB
virtual/perl-Test-Simple
x11-base/xorg-server[xephyr]
x11-misc/xvfb-run
@@ -53,15 +55,18 @@ DEPEND="${COMMON_DEPEND}
app-text/asciidoc
app-text/xmlto
dev-lang/perl
- )"
-RDEPEND="${COMMON_DEPEND}
+ )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
dev-lang/perl
dev-perl/AnyEvent-I3
- dev-perl/JSON-XS"
+ dev-perl/JSON-XS
+"
BDEPEND="virtual/pkgconfig"
PATCHES=(
- "${FILESDIR}/${PN}-4.16-musl-GLOB_TILDE.patch"
+ "${FILESDIR}"/${PN}-4.16-musl-GLOB_TILDE.patch
)
src_prepare() {
@@ -75,7 +80,7 @@ src_prepare() {
src_configure() {
local emesonargs=(
- -Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
+ -Ddocdir="${EPREFIX}"/usr/share/doc/${PF}
$(meson_use doc docs)
$(meson_use doc mans)
)
diff --git a/x11-wm/i3/i3-9999.ebuild b/x11-wm/i3/i3-9999.ebuild
index 99bd3b7ad0b6..8aedb5be5197 100644
--- a/x11-wm/i3/i3-9999.ebuild
+++ b/x11-wm/i3/i3-9999.ebuild
@@ -4,15 +4,13 @@
EAPI=7
inherit meson optfeature virtualx
-if [[ "${PV}" = *9999 ]]; then
- inherit git-r3
-fi
DESCRIPTION="An improved dynamic tiling window manager"
HOMEPAGE="https://i3wm.org/"
if [[ "${PV}" = *9999 ]]; then
EGIT_REPO_URI="https://github.com/i3/i3"
EGIT_BRANCH="next"
+ inherit git-r3
else
SRC_URI="https://i3wm.org/downloads/${P}.tar.xz"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
@@ -21,12 +19,16 @@ fi
LICENSE="BSD"
SLOT="0"
IUSE="doc test"
+RESTRICT="!test? ( test )"
-COMMON_DEPEND="dev-libs/libev
+COMMON_DEPEND="
+ dev-libs/libev
dev-libs/libpcre
dev-libs/yajl
+ x11-libs/cairo[X,xcb(+)]
x11-libs/libxcb[xkb]
x11-libs/libxkbcommon[X]
+ x11-libs/pango[X]
x11-libs/startup-notification
x11-libs/xcb-util
x11-libs/xcb-util-cursor
@@ -34,17 +36,17 @@ COMMON_DEPEND="dev-libs/libev
x11-libs/xcb-util-wm
x11-libs/xcb-util-xrm
x11-misc/xkeyboard-config
- x11-libs/cairo[X,xcb(+)]
- x11-libs/pango[X]"
-DEPEND="${COMMON_DEPEND}
+"
+DEPEND="
+ ${COMMON_DEPEND}
test? (
dev-perl/AnyEvent
- dev-perl/X11-XCB
+ dev-perl/ExtUtils-PkgConfig
dev-perl/Inline
dev-perl/Inline-C
dev-perl/IPC-Run
- dev-perl/ExtUtils-PkgConfig
dev-perl/local-lib
+ dev-perl/X11-XCB
virtual/perl-Test-Simple
x11-base/xorg-server[xephyr]
x11-misc/xvfb-run
@@ -53,21 +55,24 @@ DEPEND="${COMMON_DEPEND}
app-text/asciidoc
app-text/xmlto
dev-lang/perl
- )"
-RDEPEND="${COMMON_DEPEND}
+ )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
dev-lang/perl
dev-perl/AnyEvent-I3
- dev-perl/JSON-XS"
+ dev-perl/JSON-XS
+"
BDEPEND="virtual/pkgconfig"
PATCHES=(
- "${FILESDIR}/${PN}-4.16-musl-GLOB_TILDE.patch"
+ "${FILESDIR}"/${PN}-4.16-musl-GLOB_TILDE.patch
)
src_prepare() {
default
- cat <<- EOF > "${T}"/i3wm
+ cat > "${T}"/i3wm <<- EOF || die
#!/bin/sh
exec /usr/bin/i3
EOF
@@ -75,7 +80,7 @@ src_prepare() {
src_configure() {
local emesonargs=(
- -Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
+ -Ddocdir="${EPREFIX}"/usr/share/doc/${PF}
$(meson_use doc docs)
$(meson_use doc mans)
)
@@ -83,6 +88,10 @@ src_configure() {
meson_src_configure
}
+src_test() {
+ virtx meson_src_test
+}
+
src_install() {
meson_src_install
@@ -90,10 +99,6 @@ src_install() {
doexe "${T}"/i3wm
}
-src_test() {
- virtx meson_src_test
-}
-
pkg_postinst() {
optfeature_header "There are several packages that may be useful with i3:"
optfeature "application launcher" x11-misc/dmenu