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