blob: 1ce34df55682f0a3d5aa0adc91f2a00095ad12c7 (
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
|
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: This ebuild is from Lua overlay; Bumped by mva; $
EAPI="5"
inherit eutils toolchain-funcs git-r3 multilib
DESCRIPTION="Lua bindings to Thomas Boutell's gd library"
HOMEPAGE="http://lua-gd.luaforge.net/"
SRC_URI=""
EGIT_REPO_URI="https://github.com/ittner/lua-gd.git"
LICENSE="MIT"
SLOT="0"
KEYWORDS=""
IUSE="doc examples luajit"
RDEPEND="
virtual/lua[luajit=]
media-libs/gd[png]
"
DEPEND="
${RDEPEND}
virtual/pkgconfig
"
QA_PREBUILT="usr/$(get_libdir)/*"
# ^ sorry for that, but upstream prestrips module, and it is impossible to ask
# pkgconfig here, since lua implementation is unknown atm
src_prepare() {
sed -r \
-e "s/^(CFLAGS=)-O3 -Wall /\1/" \
-i Makefile
}
src_compile() {
local lua=lua;
use luajit && lua=luajit;
emake LUAPKG="${lua}" LUABIN="${lua}" CC="$(tc-getCC)"
}
src_install() {
local lua=lua;
use luajit && lua=luajit;
emake \
LUAPKG="${lua}"\
DESTDIR="${D}"\
INSTALL_PATH="$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD ${lua})"\
install
dodoc README
if use doc; then
dohtml doc/*
fi
if use examples; then
insinto /usr/share/doc/${PF}
doins -r demos
fi
}
|