2015-08-17 13:01:14 +03:00
|
|
|
# Copyright 1999-2015 Gentoo Foundation
|
2012-02-06 16:39:49 +04:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2015-08-17 13:01:14 +03:00
|
|
|
EAPI=5
|
2012-02-06 16:39:49 +04:00
|
|
|
|
2015-08-17 13:01:14 +03:00
|
|
|
inherit eutils fixheadtails flag-o-matic toolchain-funcs
|
2012-02-06 16:39:49 +04:00
|
|
|
|
|
|
|
DESCRIPTION="program for applying patches that patch cannot apply because of conflicting changes"
|
|
|
|
HOMEPAGE="http://neil.brown.name/wiggle http://neil.brown.name/git?p=wiggle"
|
|
|
|
SRC_URI="http://neil.brown.name/${PN}/${P}.tar.gz"
|
|
|
|
|
|
|
|
LICENSE="GPL-2"
|
|
|
|
SLOT="0"
|
2015-09-21 11:45:25 +03:00
|
|
|
KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
|
2012-02-06 16:39:49 +04:00
|
|
|
IUSE="test"
|
|
|
|
|
|
|
|
# The 'p' tool does support bitkeeper, but I'm against just dumping it in here
|
|
|
|
# due to it's size. I've explictly listed every other dependancy here due to
|
|
|
|
# the nature of the shell program 'p'
|
2015-08-17 13:01:14 +03:00
|
|
|
RDEPEND="
|
|
|
|
dev-util/diffstat
|
2012-02-06 16:39:49 +04:00
|
|
|
dev-util/patchutils
|
|
|
|
sys-apps/diffutils
|
|
|
|
sys-apps/findutils
|
2013-03-04 02:16:24 +04:00
|
|
|
virtual/awk
|
2012-02-06 16:39:49 +04:00
|
|
|
sys-apps/grep
|
|
|
|
sys-apps/less
|
|
|
|
sys-apps/sed
|
|
|
|
sys-apps/coreutils
|
2015-08-17 13:01:14 +03:00
|
|
|
sys-devel/patch
|
2015-08-27 09:33:10 +03:00
|
|
|
sys-libs/ncurses:0=
|
2015-08-17 13:01:14 +03:00
|
|
|
"
|
2012-02-06 16:39:49 +04:00
|
|
|
DEPEND="${RDEPEND}
|
|
|
|
sys-apps/groff
|
|
|
|
test? ( sys-process/time )"
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
# Fix the reference to the help file so `p help' works
|
|
|
|
sed -i "s:\$0.help:${EPREFIX}/usr/share/wiggle/p.help:" p || die "sed failed on p"
|
|
|
|
|
|
|
|
# Don't add Neil Brown's default sign off line to every patch
|
|
|
|
sed -i '/$CERT/,+4s,^,#,' p || die "sed failed on p"
|
|
|
|
|
|
|
|
# Use prefixed time binary
|
|
|
|
sed -i "s:/usr/bin/time:${EPREFIX}/usr/bin/time:" dotest || die "sed failed on dotest"
|
|
|
|
|
2015-08-17 13:01:14 +03:00
|
|
|
sed \
|
|
|
|
-e "s:-lncurses:$($(tc-getPKG_CONFIG) --libs ncurses):g" \
|
|
|
|
-i Makefile || die
|
|
|
|
|
2012-02-06 16:39:49 +04:00
|
|
|
ht_fix_file p
|
2015-08-17 13:01:14 +03:00
|
|
|
|
|
|
|
append-cppflags -I.
|
2012-02-06 16:39:49 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
2015-08-17 13:01:14 +03:00
|
|
|
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -Wall" ${PN}
|
2012-02-06 16:39:49 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2015-08-17 13:01:14 +03:00
|
|
|
dobin wiggle p
|
|
|
|
doman wiggle.1
|
|
|
|
dodoc ANNOUNCE INSTALL TODO DOC/diff.ps notes
|
2012-02-06 16:39:49 +04:00
|
|
|
insinto /usr/share/wiggle
|
2015-08-17 13:01:14 +03:00
|
|
|
doins p.help
|
2012-02-06 16:39:49 +04:00
|
|
|
}
|