dev-lang/gprolog: multilib--

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2021-04-18 06:55:00 +01:00
parent e48d119d19
commit 47efaaa9d1
+10 -11
View File
@@ -3,7 +3,7 @@
EAPI=6
inherit epatch flag-o-matic multilib toolchain-funcs
inherit epatch flag-o-matic toolchain-funcs
DESCRIPTION="A native Prolog compiler with constraint solving over finite domains (FD)"
HOMEPAGE="http://www.gprolog.org/"
@@ -15,9 +15,6 @@ SLOT="0"
KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
IUSE="debug doc examples"
DEPEND=""
RDEPEND=""
src_prepare() {
epatch "${FILESDIR}"/${P}-ldflags.patch
epatch "${FILESDIR}"/${P}-links.patch
@@ -31,7 +28,7 @@ src_prepare() {
src_configure() {
CFLAGS_MACHINE="`get-flag -march` `get-flag -mcpu` `get-flag -mtune`"
# Work around -fno-common ( GCC10 default ), bug #71202
# Work around -fno-common (GCC 10 default), bug #71202
append-flags -fcommon
append-flags -fno-strict-aliasing
@@ -48,33 +45,35 @@ src_configure() {
gprolog_use_regs=no
fi
cd "${S}"/src
cd "${S}"/src || die
econf \
CFLAGS_MACHINE="${CFLAGS_MACHINE}" \
--with-c-flags="${CFLAGS}" \
--with-install-dir="${EPREFIX}"/usr/$(get_libdir)/${P} \
--with-links-dir="${EPREFIX}"/usr/bin \
--enable-regs=$gprolog_use_regs \
--enable-regs=${gprolog_use_regs} \
$(use_with doc doc-dir "${EPREFIX}"/usr/share/doc/${PF}) \
$(use_with doc html-dir "${EPREFIX}"/usr/share/doc/${PF}/html) \
$(use_with examples examples-dir "${EPREFIX}"/usr/share/doc/${PF}/examples)
}
src_compile() {
cd "${S}"/src
cd "${S}"/src || die
# gprolog is compiled using gplc which cannot be run in parallel
emake -j1
}
src_test() {
cd "${S}"/src
cd "${S}"/src || die
emake -j1 check
}
src_install() {
cd "${S}"/src
cd "${S}"/src || die
emake DESTDIR="${D}" install
cd "${S}"
cd "${S}" || die
dodoc ChangeLog NEWS PROBLEMS README
}