summaryrefslogtreecommitdiff
blob: 2a6394cbd2f23048862f536365fa7d92a2f37470 (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
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

inherit eutils elisp-common flag-o-matic wxwidgets

DESCRIPTION="a reflective, functional programming language"
HOMEPAGE="https://www.cs.berkeley.edu/~bh/logo.html"
SRC_URI="ftp://ftp.cs.berkeley.edu/pub/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="X"

DEPEND="dev-libs/libbsd
	virtual/tex-base
	virtual/texi2dvi
	app-text/texi2html
	X? ( x11-libs/wxGTK:2.8[X] )"

src_prepare() {
	epatch "${FILESDIR}"/${P}-wx.patch
	epatch "${FILESDIR}"/${P}-no-libtermcap.patch
	epatch "${FILESDIR}"/${P}-texi.patch
	epatch "${FILESDIR}"/${P}-destdir.patch

	sed -i -e "/math.h/d" coms.c
	sed -i -e "/math.h/d" graphics.c

	WX_GTK_VER=2.8 need-wxwidgets unicode
	sed -i -e "s_/usr/local/bin/wx-config_${WX_CONFIG}_g" configure-gtk || die
	sed -i -e 's_--host=gtk__g' configure-gtk || die
	sed -i -e "s_/lib/logo_/lib/${P}_" makefile.in || die
	sed -i -e "/doc$/s_\$_/${P}_" docs/makefile || die

	rm -rf csls/CVS || die
}

src_configure() {
	local confsuffix

	use X && confsuffix="-gtk"
	"./configure${confsuffix}" --prefix=/usr $(use_with X x) || die
}

src_compile() {
	strip-flags
	emake CC="$(tc-getCC)" everything
}