1 |
1 |
# Copyright 1999-2022 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI="8"
|
|
4 |
EAPI=8
|
|
5 |
|
|
6 |
EGIT_REPO_URI="https://git.savannah.gnu.org/git/quilt.git"
|
|
7 |
|
|
8 |
[[ ${PV} == 9999 ]] && inherit git-r3
|
5 |
9 |
|
6 |
10 |
inherit bash-completion-r1
|
7 |
11 |
|
8 |
12 |
DESCRIPTION="quilt patch manager"
|
9 |
13 |
HOMEPAGE="https://savannah.nongnu.org/projects/quilt"
|
10 |
|
SRC_URI="https://savannah.nongnu.org/download/quilt/${P}.tar.gz"
|
|
14 |
[[ ${PV} == 9999 ]] || SRC_URI="https://savannah.nongnu.org/download/quilt/${P}.tar.gz"
|
11 |
15 |
|
12 |
16 |
LICENSE="GPL-2"
|
13 |
17 |
SLOT="0"
|
14 |
|
KEYWORDS="amd64 arm ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-solaris"
|
15 |
|
IUSE="emacs graphviz"
|
16 |
|
# unresolved test failures
|
17 |
|
RESTRICT="test"
|
|
18 |
[[ ${PV} == 9999 ]] || \
|
|
19 |
KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-solaris"
|
|
20 |
IUSE="graphviz"
|
18 |
21 |
|
19 |
|
RDEPEND="sys-apps/ed
|
|
22 |
RDEPEND="
|
20 |
23 |
dev-util/diffstat
|
21 |
|
graphviz? ( media-gfx/graphviz )
|
|
24 |
mail-mta/sendmail
|
|
25 |
sys-apps/ed
|
22 |
26 |
elibc_Darwin? ( app-misc/getopt )
|
23 |
27 |
elibc_SunOS? ( app-misc/getopt )
|
24 |
|
>=sys-apps/coreutils-8.32-r1"
|
|
28 |
>=sys-apps/coreutils-8.32-r1
|
|
29 |
graphviz? ( media-gfx/graphviz )
|
|
30 |
"
|
25 |
31 |
|
26 |
|
PDEPEND="emacs? ( app-emacs/quilt-el )"
|
|
32 |
src_prepare() {
|
27 |
33 |
|
28 |
|
pkg_setup() {
|
29 |
|
use graphviz && return 0
|
30 |
|
echo
|
31 |
|
elog "If you intend to use the folding functionality (graphical illustration of the"
|
32 |
|
elog "patch stack) then you'll need to remerge this package with USE=graphviz."
|
33 |
|
echo
|
34 |
|
}
|
|
34 |
default
|
35 |
35 |
|
36 |
|
src_prepare() {
|
37 |
36 |
# Add support for USE=graphviz
|
38 |
|
use graphviz || PATCHES+=( "${FILESDIR}"/${PN}-0.66-no-graphviz.patch )
|
39 |
|
default
|
|
37 |
use graphviz || eapply "${FILESDIR}/${PN}-0.66-no-graphviz.patch"
|
|
38 |
|
|
39 |
# remove failing test, because it fails on root-build
|
|
40 |
rm -rf test/delete.test
|
40 |
41 |
}
|
41 |
42 |
|
42 |
43 |
src_configure() {
|
|
44 |
local myconf=""
|
43 |
45 |
[[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] && \
|
44 |
46 |
myconf="${myconf} --with-getopt=${EPREFIX}/usr/bin/getopt-long"
|
45 |
47 |
econf ${myconf}
|
... | ... | |
48 |
50 |
src_install() {
|
49 |
51 |
emake BUILD_ROOT="${D}" install
|
50 |
52 |
|
51 |
|
rm -rf "${ED}"/usr/share/doc/${P}
|
52 |
|
dodoc AUTHORS TODO "doc/README" "doc/README.MAIL" "doc/quilt.pdf"
|
53 |
|
|
54 |
53 |
rm -rf "${ED}"/etc/bash_completion.d
|
55 |
54 |
newbashcomp bash_completion ${PN}
|
56 |
55 |
|
|
56 |
rm -rf "${ED}"/usr/share/doc/${PN}
|
|
57 |
dodoc AUTHORS TODO "doc/README" "doc/README.MAIL" "doc/quilt.pdf"
|
|
58 |
|
57 |
59 |
# Remove the compat symlinks
|
58 |
60 |
rm -rf "${ED}"/usr/share/quilt/compat
|
59 |
61 |
|
60 |
62 |
# Remove Emacs mode; newer version is in app-emacs/quilt-el, bug 247500
|
61 |
63 |
rm -rf "${ED}"/usr/share/emacs
|
62 |
64 |
}
|
|
65 |
|
|
66 |
pkg_postinst() {
|
|
67 |
if ! has_version -r 'app-emacs/quilt-el' ; then
|
|
68 |
elog "If you plan to use quilt with emacs consider installing \"app-emacs/quilt-el\""
|
|
69 |
fi
|
|
70 |
}
|