--- dhcpcd-ui-0.7.2.ebuild 2014-09-18 09:31:26.035984691 +0200 +++ net-misc/dhcpcd-ui/dhcpcd-ui-0.7.2.ebuild 2014-09-18 09:29:50.413985396 +0200 @@ -1,19 +1,25 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: net-misc/dhcpcd-ui/dhcpcd-ui-0.7.2.ebuild,v 1.1 2014/09/17 18:29:24 -tclover Exp $ +# $Header: net-misc/dhcpcd-ui/dhcpcd-ui-0.7.2.ebuild,v 1.1 2014/09/18 18:29:24 -tclover Exp $ EAPI=5 -inherit systemd multilib +if [[ ${PV} == "9999" ]]; then + FOSSIL_URI="http://roy.marples.name/projects/dhcpcd" +else + SRC_URI="http://roy.marples.name/downloads/${PN}/${P}.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" +fi + +inherit eutils systemd DESCRIPTION="Desktop notification and configuration for dhcpcd" HOMEPAGE="http://roy.marples.name/projects/dhcpcd-ui/" -SRC_URI="http://roy.marples.name/downloads/dhcpcd/${P}.tar.bz2" LICENSE="BSD-2" SLOT="0" -KEYWORDS="~amd64 ~x86" IUSE="debug gtk gtk3 icons qt4 systemd libnotify" +REQUIRED_USE="qt4? ( icons )" DEPEND="virtual/libintl libnotify? ( virtual/notification-daemon ) @@ -24,7 +30,36 @@ RDEPEND="${DEPEND} !icons? ( x11-themes/hicolor-icon-theme )" -src_configure() { +if [[ ${PV} == "9999" ]]; then + DEPEND+=" dev-vcs/fossil" + + src_unpack() + { + local distdir=${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}} + local repo=${distdir}/fossil/${PN}.fossil + + addwrite "${distdir}" + + if [[ -e "${repo}" ]]; then + fossil pull "${FOSSIL_URI}" -R "${repo}" || die + else + mkdir -p "${distdir}/fossil" || die + fossil clone "${FOSSIL_URI}" "${repo}" || die + fi + + mkdir -p "${S}" || die + cd "${S}" || die + fossil open "${repo}" || die + } +fi + +src_prepare() +{ + epatch_user +} + +src_configure() +{ local myeconfargs=( $(use_enable debug) $(use_with icons) @@ -35,10 +70,10 @@ econf "${myeconfargs[@]}" } -src_install() { +src_install() +{ emake DESTDIR="${D}" INSTALL_ROOT="${D}" install use systemd && systemd_dounit src/dhcpcd-online/dhcpcd-wait-online.service } -