Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 351977 - Enable building dev-lisp/ecls with libffi, and bump version
Summary: Enable building dev-lisp/ecls with libffi, and bump version
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Common Lisp Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-18 08:19 UTC by Marko Kocic
Modified: 2015-11-08 10:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marko Kocic 2011-01-18 08:19:54 UTC
ECL common lisp has released stable version 11.1.1.
It now requires libffi, which, if detected during configure, endbles it to have ffi support.

In order for libffi to be detected, one needs to provide location of its headers in CFLAGS, since those are not installed on standard location.

Adding cflags for local build requires adding the following functin to ebuild:

pkg_setup() {
	append-cflags `pkg-config --cflags libffi`
}
It might be a better way, but I'm not aware of it.

Reproducible: Always

Steps to Reproduce:
1. Build ecls without setting CFLAGS to ffi location
2. :dffi is missing from *features*
3. Build ecls with setting CFLAGS to ffi location
2. :dffi is present in *features*



Here's the ebuild that I use for ecl-git version. It has cflags detection feature described here:


# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2

EGIT_REPO_URI="git://ecls.git.sourceforge.net/gitroot/ecls/ecl"
#EGIT_REPO_URI="git://repo.or.cz/ecl.git"

inherit eutils multilib git flag-o-matic

DESCRIPTION="ECL is an embeddable Common Lisp implementation."
HOMEPAGE="http://common-lisp.net/project/ecl/"

LICENSE="BSD LGPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="X debug gengc +threads +unicode +longdouble precisegc"

DEPEND=">=dev-libs/gmp-4
		app-text/texi2html
		>=dev-libs/boehm-gc-7.2_alpha4
		virtual/libffi"

PROVIDE="virtual/commonlisp"

src_unpack() {
	git_src_unpack
}

pkg_setup() {
	#append-ldflags $(no-as-needed)
	append-cflags `pkg-config --cflags libffi`
}

src_configure() {
	econf \
		--with-system-gmp \
		--enable-boehm=system \
		$(use_enable longdouble) \
		$(use_enable gengc) \
		$(use_enable threads) \
		$(use_with threads __thread) \
		$(use_enable precisegc) \
		$(use_enable unicode) \
		$(use_with X x) \
		$(use_with X clx) \
		|| die "econf failed"
}

src_compile() {
	#parallel fails
	emake -j1 || die "make failed"
}

src_install () {
	emake DESTDIR="${D}" install || die "Could not build ECL"

	dohtml doc/*.html
	dodoc ANNOUNCEMENT Copyright
	dodoc "${FILESDIR}"/README.Gentoo
}
Comment 1 Pacho Ramos gentoo-dev 2015-11-08 10:04:50 UTC
16 version is in the tree