summaryrefslogtreecommitdiff
blob: b617020ed09030ce6dc14078237dac8f0a8f2760 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit autotools toolchain-funcs

DESCRIPTION="C language utilities"
HOMEPAGE="http://www.sigala.it/sandro/software.php#cutils"
SRC_URI="http://www.sigala.it/sandro/files/${P}.tar.gz"

LICENSE="BSD-2"
SLOT="0"
KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"

BDEPEND="
	app-alternatives/lex
	app-alternatives/yacc"

PATCHES=(
	"${FILESDIR}"/${PN}-infopage.patch
	"${FILESDIR}"/${P}-case-insensitive.patch
	"${FILESDIR}"/${P}-ar.patch
	"${FILESDIR}"/${P}-clang16.patch
)

src_prepare() {
	default

	mv src/cdecl/{,cutils-}cdecl.1 || die

	# delete pointless README
	rm README.compile || die

	# Force rebuild of cutils.info
	rm doc/cutils.info || die

	sed -e "s/cdecl/cutils-cdecl/g"	\
		-i doc/cutils.texi || die
	sed -e "/PROG/s/cdecl/cutils-cdecl/" \
		-i src/cdecl/Makefile.in || die
	sed -e "/Xr/s/cdecl/cutils-cdecl/" \
		-i src/cundecl/cundecl.1 || die
	sed -e "/Nm/s/cdecl/cutils-cdecl/" \
		-i src/cdecl/cutils-cdecl.1 || die

	eautoreconf #871402
}

src_compile() {
	tc-export AR #724270

	emake -j1
}

src_install() {
	default
	dodoc HISTORY
}

pkg_postinst() {
	elog "cdecl was installed as cutils-cdecl because of a naming conflict"
	elog "with dev-util/cdecl."
}