]> git.draconx.ca Git - gentoo-draconx.git/blobdiff - dev-util/cdecl99/cdecl99-1.ebuild
Add ebuild for cdecl99.
[gentoo-draconx.git] / dev-util / cdecl99 / cdecl99-1.ebuild
diff --git a/dev-util/cdecl99/cdecl99-1.ebuild b/dev-util/cdecl99/cdecl99-1.ebuild
new file mode 100644 (file)
index 0000000..85e8370
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright © 2021 Nick Bowler
+# License GPLv3+: GNU General Public License version 3 or any later version.
+# This is free software: you are free to change and redistribute it.
+# There is NO WARRANTY, to the extent permitted by law.
+
+EAPI=7
+
+DESCRIPTION="Explain and construct C declarations"
+HOMEPAGE="http://draconx.ca/projects/cdecl99/"
+SRC_URI="http://draconx.ca/archive/$PN/$P.tar.xz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs test nls readline"
+
+BDEPEND="test? ( virtual/pkgconfig )"
+RDEPEND="nls? ( virtual/libintl )
+       readline? ( sys-libs/readline:= )"
+DEPEND="$RDEPEND
+       test? ( sci-libs/gsl )"
+
+src_configure () {
+       econf \
+               --enable-shared $(use_enable static-libs static) \
+               $(usex !readline gl_cv_lib_readline=no '') \
+               $(use_enable nls)
+}
+
+src_test () {
+       # testcase compilation currently busted with -Wl,--as-needed
+       emake LDFLAGS='-Wl,--no-as-needed' check
+}
+
+src_install () {
+       default
+
+       use static-libs || find "$ED" -name '*.la' -delete
+}