summaryrefslogtreecommitdiff
path: root/dev-util/patchutils/patchutils-0.4.4.ebuild
blob: da749ec62987398834a549f4e8e3d855e2515305 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools toolchain-funcs

DESCRIPTION="Collection of tools that operate on patch files"
HOMEPAGE="https://cyberelk.net/tim/software/patchutils/"
SRC_URI="https://github.com/twaugh/patchutils/releases/download/${PV}/${P}.tar.xz"

LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="pcre"

RDEPEND="pcre? ( dev-libs/libpcre2:= )"
DEPEND="
	${RDEPEND}
	elibc_musl? ( >=sys-libs/error-standalone-2.0 )
"
BDEPEND="virtual/pkgconfig"
RDEPEND+="
	!<app-shells/bash-completion-2.16.0-r3
"

src_prepare() {
	default
	eautoreconf
}

src_configure() {
	tc-export PKG_CONFIG

	if use elibc_musl; then
		export CFLAGS="${CFLAGS} $(${PKG_CONFIG} --cflags error-standalone)"
		export LIBS="${LIBS} $(${PKG_CONFIG} --libs error-standalone)"
	fi

	econf $(use_with pcre pcre2)
}