1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{6,7} )
8 inherit bash-completion-r1 distutils-r1
10 DESCRIPTION="Manage a stack of patches using GIT as a backend"
11 HOMEPAGE="http://www.procode.org/stgit/"
13 [[ -n ${UPSTREAM_VER} ]] && \
14 UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
16 SRC_URI="https://github.com/ctmarinas/stgit/archive/v${PV}.tar.gz -> ${P}.tar.gz
17 ${UPSTREAM_PATCHSET_URI}"
21 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
24 RDEPEND=">=dev-vcs/git-1.6.3.3"
26 # NOTE: It seems to be quite important which asciidoc version to use.
27 # So keep an eye on it for the future.
36 "${FILESDIR}/${PN}-0.16-man-linkfix.patch"
42 ewarn "Manpages will not be built and installed."
43 ewarn "Enable the 'doc' useflag, if you want them."
48 python_prepare_all() {
50 [[ -n ${UPSTREAM_VER} ]] && \
51 eapply "${WORKDIR}"/patches-upstream
53 # this will be a noop, as we are working with a tarball,
54 # but throws git errors --> just get rid of it
55 echo "version=\"${PV}\"" > "${S}"/stgit/builtin_version.py
57 distutils-r1_python_prepare_all
61 distutils-r1_src_compile
65 emake DESTDIR="${D}" \
66 htmldir="${EPREFIX}/usr/share/doc/${PF}/html/" \
67 mandir="${EPREFIX}/usr/share/man/" \
74 emake DESTDIR="${D}" \
75 htmldir="${EPREFIX}/usr/share/doc/${PF}/html/" \
76 mandir="${EPREFIX}/usr/share/man/" \
77 install-doc install-html
80 distutils-r1_src_install
82 newbashcomp completion/stgit.bash 'stg'