]> git.draconx.ca Git - gentoo-draconx.git/blob - dev-util/cdecl99/cdecl99-1.ebuild
Add ebuild for cdecl99.
[gentoo-draconx.git] / dev-util / cdecl99 / cdecl99-1.ebuild
1 # Copyright © 2021 Nick Bowler
2 # License GPLv3+: GNU General Public License version 3 or any later version.
3 # This is free software: you are free to change and redistribute it.
4 # There is NO WARRANTY, to the extent permitted by law.
5
6 EAPI=7
7
8 DESCRIPTION="Explain and construct C declarations"
9 HOMEPAGE="http://draconx.ca/projects/cdecl99/"
10 SRC_URI="http://draconx.ca/archive/$PN/$P.tar.xz"
11
12 LICENSE="GPL-3+"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="static-libs test nls readline"
16
17 BDEPEND="test? ( virtual/pkgconfig )"
18 RDEPEND="nls? ( virtual/libintl )
19         readline? ( sys-libs/readline:= )"
20 DEPEND="$RDEPEND
21         test? ( sci-libs/gsl )"
22
23 src_configure () {
24         econf \
25                 --enable-shared $(use_enable static-libs static) \
26                 $(usex !readline gl_cv_lib_readline=no '') \
27                 $(use_enable nls)
28 }
29
30 src_test () {
31         # testcase compilation currently busted with -Wl,--as-needed
32         emake LDFLAGS='-Wl,--no-as-needed' check
33 }
34
35 src_install () {
36         default
37
38         use static-libs || find "$ED" -name '*.la' -delete
39 }