blob: 69aa2ed48fcc193fe6af0c8b927a479e0c1178db (
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
|
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/angelscript/angelscript-2.27.1.ebuild,v 1.3 2014/01/04 22:49:31 mgorny Exp $
EAPI=5
inherit toolchain-funcs multilib-minimal
DESCRIPTION="A flexible, cross-platform scripting library"
HOMEPAGE="http://www.angelcode.com/angelscript/"
SRC_URI="http://www.angelcode.com/angelscript/sdk/files/angelscript_${PV}.zip"
LICENSE="ZLIB"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc static-libs"
DEPEND="app-arch/unzip"
S=${WORKDIR}/sdk
S2=${WORKDIR}/sdk_static
pkg_setup() {
tc-export CXX AR RANLIB
}
src_prepare() {
if use static-libs ; then
cp -pR "${WORKDIR}"/sdk "${S2}"/ || die
fi
multilib_copy_sources
}
multilib_src_compile() {
einfo "Shared build"
emake -C ${PN}/projects/gnuc SHARED=1 VERSION=${PV}
if multilib_build_binaries ; then
if use static-libs ; then
einfo "Static build"
emake -C "${S2}"/${PN}/projects/gnuc
fi
fi
}
multilib_src_install() {
doheader ${PN}/include/angelscript.h
dolib.so ${PN}/lib/libangelscript-${PV}.so
dosym libangelscript-${PV}.so /usr/$(get_libdir)/libangelscript.so
if multilib_build_binaries ; then
if use static-libs ; then
dolib.a "${S2}"/${PN}/lib/libangelscript.a
fi
fi
}
multilib_src_install_all() {
use doc && dohtml -r "${WORKDIR}"/sdk/docs/*
}
|