1 |
commit: bd5e6af5899d23c545e6a80c5d0b4e116e4b28d0 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 28 17:33:45 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 28 17:44:49 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd5e6af5 |
7 |
|
8 |
dev-lua/luadbi: fix lua deps |
9 |
|
10 |
Package-Manager: Portage-3.0.9, Repoman-3.0.2 |
11 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
12 |
|
13 |
dev-lua/luadbi/luadbi-0.7.2-r101.ebuild | 90 +++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 90 insertions(+) |
15 |
|
16 |
diff --git a/dev-lua/luadbi/luadbi-0.7.2-r101.ebuild b/dev-lua/luadbi/luadbi-0.7.2-r101.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..f19a4a0b67f |
19 |
--- /dev/null |
20 |
+++ b/dev-lua/luadbi/luadbi-0.7.2-r101.ebuild |
21 |
@@ -0,0 +1,90 @@ |
22 |
+# Copyright 1999-2020 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+ |
27 |
+LUA_COMPAT=( lua5-{1..3} luajit ) |
28 |
+ |
29 |
+inherit lua toolchain-funcs |
30 |
+ |
31 |
+DESCRIPTION="A database interface library for Lua" |
32 |
+HOMEPAGE="https://github.com/mwild1/luadbi" |
33 |
+SRC_URI="https://github.com/mwild1/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
34 |
+ |
35 |
+LICENSE="MIT" |
36 |
+SLOT="0" |
37 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
38 |
+IUSE="mysql postgres +sqlite test" |
39 |
+REQUIRED_USE=" |
40 |
+ ${LUA_REQUIRED_USE} |
41 |
+ || ( mysql postgres sqlite ) |
42 |
+" |
43 |
+RESTRICT="test" |
44 |
+ |
45 |
+RDEPEND=" |
46 |
+ ${LUA_DEPS} |
47 |
+ mysql? ( dev-db/mysql-connector-c:0= ) |
48 |
+ postgres? ( dev-db/postgresql:= ) |
49 |
+ sqlite? ( dev-db/sqlite ) |
50 |
+" |
51 |
+ |
52 |
+DEPEND="${RDEPEND}" |
53 |
+ |
54 |
+BDEPEND=" |
55 |
+ virtual/pkgconfig |
56 |
+ test? ( |
57 |
+ >=dev-lua/busted-2.0.0-r100[${LUA_USEDEP}] |
58 |
+ dev-lua/luarocks |
59 |
+ ) |
60 |
+" |
61 |
+ |
62 |
+PATCHES=( "${FILESDIR}/${PN}-0.7.2-mysql-8.patch" ) |
63 |
+ |
64 |
+src_prepare() { |
65 |
+ default |
66 |
+ |
67 |
+ # Respect users CFLAGS |
68 |
+ sed -e 's/-g //' -e 's/-O2 //g' -i Makefile || die |
69 |
+} |
70 |
+ |
71 |
+lua_src_compile() { |
72 |
+ tc-export AR CC |
73 |
+ |
74 |
+ local myemakeargs=( |
75 |
+ "LUA_INC=$(lua_get_CFLAGS)" |
76 |
+ ) |
77 |
+ |
78 |
+ use mysql && emake ${myemakeargs} MYSQL_INC="-I$(mariadb_config --libs)" mysql |
79 |
+ use postgres && emake ${myemakeargs} PSQL_INC="-I$(pg_config --libdir)" psql |
80 |
+ use sqlite emake ${myemakeargs} SQLITE3_INC="-I/usr/include" sqlite |
81 |
+} |
82 |
+ |
83 |
+src_compile() { |
84 |
+ lua_foreach_impl lua_src_compile |
85 |
+} |
86 |
+ |
87 |
+lua_src_test() { |
88 |
+ cd "${S}"/tests && ${ELUA} run_tests.lua || die |
89 |
+} |
90 |
+ |
91 |
+src_test() { |
92 |
+ lua_foreach_impl lua_src_test |
93 |
+} |
94 |
+ |
95 |
+lua_src_install() { |
96 |
+ local myemakeargs=( |
97 |
+ DESTDIR="${ED}" |
98 |
+ LUA_CDIR="$(lua_get_cmod_dir)" |
99 |
+ LUA_LDIR="$(lua_get_lmod_dir)" |
100 |
+ ) |
101 |
+ |
102 |
+ use mysql && emake ${myemakeargs[@]} install_mysql |
103 |
+ use postgres && emake ${myemakeargs[@]} install_psql |
104 |
+ use sqlite && emake ${myemakeargs[@]} install_sqlite3 |
105 |
+} |
106 |
+ |
107 |
+src_install() { |
108 |
+ lua_foreach_impl lua_src_install |
109 |
+ |
110 |
+ einstalldocs |
111 |
+} |