blob: 2f1392c43a51c8be9768332bdb9d7e29627c9ff2 (
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
|
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
VCS="git"
LUA_COMPAT="lua51 lua52 lua53 luajit2"
GITHUB_A="Tangent128"
GITHUB_A="zhangxiangxiao"
inherit lua
DESCRIPTION="Lua module for reading Linux input events from /dev/input/eventXX nodes"
HOMEPAGE="https://github.com/Tangent128/lua-evdev"
LICENSE="MIT"
SLOT="0"
KEYWORDS=""
IUSE="examples"
RDEPEND=""
DEPEND="
${RDEPEND}
"
DOCS=(README.md)
EXAMPLES=(example/.)
all_lua_prepare() {
sed -r \
-e '1iCC ?= gcc' \
-e '/^CFLAGS/s@$@ -I.@' \
-e 's@gcc@\$\(CC\)@g' \
-i Makefile
lua_default
}
each_lua_prepare() {
lua_is_jit && (
sed -r \
-e '/^CFLAGS/s@\$\(COMPAT_CFLAGS\) -I.@@' \
-e '/^CORE_C/s@(evdev/core.c) .*@\1@' \
-i Makefile
sed -r \
-e '/#include "compat53\/compat-5.3.h"/d' \
-i evdev/core.c
)
lua_default
}
each_lua_install() {
rm evdev/core.c
dolua evdev evdev.lua
}
|