app-editors/kakoune: drop old 0_pre20160620
[gentoo.git] / sci-libs / lrslib / lrslib-051.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 inherit toolchain-funcs
7
8 DESCRIPTION="self-contained ANSI C implementation of the reverse search algorithm"
9 HOMEPAGE="http://cgm.cs.mcgill.ca/~avis/C/lrs.html"
10 SRC_URI="http://cgm.cs.mcgill.ca/~avis/C/lrslib/${P}.tar.gz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~arm ~x86"
15 IUSE="gmp"
16
17 DEPEND="gmp? ( dev-libs/gmp:0= )"
18 RDEPEND="${DEPEND}"
19
20 src_prepare(){
21         sed -i "s/gcc/$(tc-getCC)/g" makefile || die
22         sed -i "s/-O3/${CFLAGS} ${LDFLAGS}/g" makefile || die
23         # Prefix for install
24         sed -i "s,/usr/local,/usr,g" makefile || die
25 }
26
27 src_compile () {
28         if use gmp ; then
29                 emake all
30                 emake all-shared
31         else
32                 emake allmp
33         fi
34 }
35
36 src_install() {
37         dodoc readme
38         # Library
39         if use gmp ; then
40                 emake DESTDIR="${D}" install-shared
41         fi
42         # Install default set of binaries
43         emake DESTDIR="${D}" install-common
44 }