summaryrefslogtreecommitdiff
blob: 249b61a839aa684edf273068182cf5d34fc97664 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/swi-prolog-lite/swi-prolog-lite-5.5.39.ebuild,v 1.6 2006/01/20 01:38:08 vapier Exp $

inherit eutils flag-o-matic

DESCRIPTION="free, small, and standard compliant Prolog compiler"
HOMEPAGE="http://www.swi-prolog.org/"
SRC_URI="http://gollem.science.uva.nl/cgi-bin/nph-download/SWI-Prolog/BETA/pl-${PV}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~ppc-macos ~sparc ~x86"
IUSE="berkdb gmp odbc readline ssl static tetex threads X"

DEPEND="sys-libs/ncurses
	odbc? ( dev-db/unixODBC )
	berkdb? ( sys-libs/db )
	readline? ( sys-libs/readline )
	gmp? ( dev-libs/gmp )
	ssl? ( dev-libs/openssl )
	X? ( || ( (
		x11-libs/libX11
		x11-libs/libXft
		x11-libs/libXpm
		x11-libs/libXt
		x11-libs/libICE
		x11-libs/libSM
		x11-proto/xproto )
		virtual/x11 ) )"

S=${WORKDIR}/pl-${PV}

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/${P}-packages-mp-DESTDIR.patch
	epatch "${FILESDIR}"/${P}-packages-semweb-64bit.patch
	epatch "${FILESDIR}"/${P}-packages-ltx2htm-DESTDIR.patch
}

src_compile() {
	append-flags -fno-strict-aliasing
	cd src
	econf \
		$(use_enable gmp) \
		$(use_enable readline) \
		$(use_enable !static shared) \
		$(use_enable threads mt) \
		--disable-custom-flags \
		|| die "econf dev failed"
	emake || die "make dev failed"

	cd ../packages
	econf \
		--without-C-sicstus \
		--with-chr \
		--with-clib \
		--with-clpr \
		--with-cpp \
		$(use_with berkdb db) \
		--with-http \
		--without-jasmine \
		$(use_with x86 jpl) \
		$(use_with tetex ltx2htm) \
		$(use_with gmp mp) \
		$(use_with odbc) \
		$(use_with ssl) \
		--with-table \
		$(use_with X xpce) \
		|| die
	make || die
}

src_install() {
	make -C src DESTDIR="${D}" install || die "install src failed"
	make -C packages DESTDIR="${D}" install || die "install packages failed"
	dodoc ANNOUNCE ChangeLog INSTALL INSTALL.notes PORTING README VERSION
}