dev-libs/swayidle: various fixes
authorNiccolò Scatena <speedjack95@gmail.com>
Sat, 9 Feb 2019 16:31:31 +0000 (17:31 +0100)
committerAaron Bauman <bman@gentoo.org>
Wed, 13 Feb 2019 00:04:17 +0000 (19:04 -0500)
 - Use ${PN} wherever possible;

 - Fix use flag order in IUSE;

 - Remove bash-completion use flag: bash completions should be always
   installed (see [1]);

 - Rename use flag: doc -> man (doc is a global use flag used to install
   additional documentation that most users does not want);

 - Fix order of (R)DEPEND;

 - Move scdoc and wayland-protocols deps to BDEPEND (required only when
   building);

 - Fix dependecy blocks: an user may install sway-1.0_beta2 with the
   swayidle use flag disabled and then install the swayidle package;

 - Add -Dwerror=false to meson args.

In metadata.xml:

 - Add upstream infos;

 - Break longdescription at 80 chars for better readability;

 - Add myself as maintainer.

[1] www.gentoo.org/support/news-items/2014-11-25-bash-completion-2_1-r90.html

Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Niccolò Scatena <speedjack95@gmail.com>
Signed-off-by: Aaron Bauman <bman@gentoo.org>
dev-libs/swayidle/metadata.xml
dev-libs/swayidle/swayidle-1.2.ebuild

index b8a1df1de5c93689a937c63ad77747a68ecbff33..880f87d424ecce0135571a332413fde75d127685 100644 (file)
@@ -5,11 +5,26 @@
                <email>prometheanfire@gentoo.org</email>
                <name>Matthew Thode</name>
        </maintainer>
+       <maintainer type="person">
+               <email>speedjack95@gmail.com</email>
+               <name>Niccolò Scatena</name>
+       </maintainer>
        <longdescription lang="en">
-               Sway's idle management daemon, compatible with any Wayland compositor which implements the KDE idle protocol.
+               Sway's idle management daemon, compatible with any Wayland compositor
+               which implements the KDE idle protocol.
        </longdescription>
        <use>
                <flag name="elogind">Enable support for rootless session via elogind</flag>
                <flag name="fish-completion">Enable fish completion support</flag>
+               <flag name="man">Build and install man pages</flag>
        </use>
+       <upstream>
+               <remote-id type="github">swaywm/swayidle</remote-id>
+               <maintainer status="active">
+                       <email>sir@cmpwn.com</email>
+                       <name>Drew DeVault</name>
+               </maintainer>
+               <bugs-to>https://github.com/swaywm/swayidle/issues</bugs-to>
+               <changelog>https://github.com/swaywm/swayidle/releases</changelog>
+       </upstream>
 </pkgmetadata>
index e7c0885af5847f63d4b18e5f32bb0edb617c7ee4..774758c9815e366f1a9a078ed20eca57a4e72329 100644 (file)
@@ -7,33 +7,47 @@ inherit meson
 
 DESCRIPTION="Idle management daemon for Wayland"
 HOMEPAGE="https://github.com/swaywm/swayidle"
-SRC_URI="https://github.com/swaywm/swayidle/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+if [[ ${PV} == 9999 ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/swaywm/${PN}.git"
+else
+       SRC_URI="https://github.com/swaywm/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+       KEYWORDS="~amd64 ~x86"
+fi
 
 LICENSE="MIT"
 SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="systemd elogind zsh-completion bash-completion fish-completion +doc"
+IUSE="elogind fish-completion +man systemd zsh-completion"
 REQUIRED_USE="?? ( elogind systemd )"
 
-RDEPEND="dev-libs/wayland
-       elogind? ( >=sys-auth/elogind-237 )
-       systemd? ( >=sys-apps/systemd-237 )
+DEPEND="
+       dev-libs/wayland
+       elogind? ( >=sys-auth/elogind-237[policykit] )
+       systemd? ( >=sys-apps/systemd-237[policykit] )
+"
+RDEPEND="
+       ${DEPEND}
+       !<=dev-libs/sway-1.0_beta1
+       !~dev-libs/sway-1.0_beta2[swayidle]
 "
-DEPEND="${RDEPEND}
+BDEPEND="
        >=dev-libs/wayland-protocols-1.14
-       doc? ( app-text/scdoc )
-       !<dev-libs/sway-1.0_rc1
+       virtual/pkgconfig
+       man? ( app-text/scdoc )
 "
+
 src_configure() {
        local emesonargs=(
-               -Dman-pages=$(usex doc enabled disabled)
-               -Dzsh-completions=$(usex zsh-completion true false)
-               -Dbash-completions=$(usex bash-completion true false)
-               -Dfish-completions=$(usex fish-completion true false)
+               -Dman-pages=$(usex man enabled disabled)
+               $(meson_use fish-completion fish-completions)
+               $(meson_use zsh-completion zsh-completions)
+               "-Dbash-completions=true"
+               "-Dwerror=false"
        )
-       if use systemd ; then
+       if use systemd; then
                emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=systemd")
-       elif use elogind ; then
+       elif use elogind; then
                emesonargs+=("-Dlogind=enabled" "-Dlogind-provider=elogind")
        else
                emesonargs+=("-Dlogind=disabled")