summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2024-03-15 23:40:49 +0100
committerConrad Kostecki <conikost@gentoo.org>2024-03-16 00:58:55 +0100
commitb498913620fb96d27d7c36e11ba463973a5d937a (patch)
tree45a3aefc3894870cd3ee51663ea5f2f868bcd3fa /dev-lua
parentdev-lua/luarocks: add 3.11.0 (diff)
downloadgentoo-b498913620fb96d27d7c36e11ba463973a5d937a.tar.gz
gentoo-b498913620fb96d27d7c36e11ba463973a5d937a.tar.bz2
gentoo-b498913620fb96d27d7c36e11ba463973a5d937a.zip
dev-lua/luadbi: add 0.7.3
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'dev-lua')
-rw-r--r--dev-lua/luadbi/Manifest1
-rw-r--r--dev-lua/luadbi/luadbi-0.7.3.ebuild101
2 files changed, 102 insertions, 0 deletions
diff --git a/dev-lua/luadbi/Manifest b/dev-lua/luadbi/Manifest
index ad160c1bf206..a23ac9b7eccf 100644
--- a/dev-lua/luadbi/Manifest
+++ b/dev-lua/luadbi/Manifest
@@ -1 +1,2 @@
DIST luadbi-0.7.2.tar.gz 36462 BLAKE2B 581c7353bfa36b3f6cabed2df78372f8810300bf4525bf8d370e61d469f9daa5a5c40c58916164a8d0a621a61e983e85c67b23ef03f51212be79f09ad8512047 SHA512 891f99cbc8f1b5327ef820641a1608abf41410f2f28584b975cc3cf65154b9bebf6f1b9ca7d1818b9c965738ad700dd17ae042dfd2a7146cf755871ebae535b9
+DIST luadbi-0.7.3.tar.gz 35753 BLAKE2B ff5fdd144560153fc74733131b48a60a14b7e95de5d6faaa982588cc5df28aa979aa805c5000fdc76fae98b99be4cc4ccb82938c8f6222bcdfe4fca4d12c9bfa SHA512 1122bc9e83cf7071aff8685163a2dc387b40d2fb28aeb57e9c19e14afa6dcb0fb05fa76ea700f69751fdc79b0f1155235195d525041124fed5cefab0d50835bb
diff --git a/dev-lua/luadbi/luadbi-0.7.3.ebuild b/dev-lua/luadbi/luadbi-0.7.3.ebuild
new file mode 100644
index 000000000000..ceace5bd8ac6
--- /dev/null
+++ b/dev-lua/luadbi/luadbi-0.7.3.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+
+inherit lua toolchain-funcs
+
+DESCRIPTION="A database interface library for Lua"
+HOMEPAGE="https://github.com/mwild1/luadbi"
+SRC_URI="https://github.com/mwild1/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="mysql postgres +sqlite test"
+REQUIRED_USE="
+ ${LUA_REQUIRED_USE}
+ || ( mysql postgres sqlite )
+"
+RESTRICT="test"
+
+RDEPEND="
+ ${LUA_DEPS}
+ mysql? ( dev-db/mysql-connector-c:0= )
+ postgres? ( dev-db/postgresql:= )
+ sqlite? ( dev-db/sqlite )
+"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="
+ virtual/pkgconfig
+ test? (
+ dev-lua/busted[${LUA_USEDEP}]
+ dev-lua/luarocks
+ )
+"
+
+src_prepare() {
+ default
+
+ # Respect users CFLAGS
+ sed -e 's/-g //' -e 's/-O2 //g' -i Makefile || die
+
+ lua_copy_sources
+}
+
+lua_src_compile() {
+ pushd "${BUILD_DIR}" || die
+
+ tc-export AR CC
+
+ local myemakeargs=(
+ "LUA_INC=$(lua_get_CFLAGS)"
+ )
+
+ use mysql && emake ${myemakeargs} MYSQL_INC="-I$(mariadb_config --libs)" mysql
+ use postgres && emake ${myemakeargs} PSQL_INC="-I$(pg_config --libdir)" psql
+ use sqlite emake ${myemakeargs} SQLITE3_INC="-I/usr/include" sqlite
+
+ popd
+}
+
+src_compile() {
+ lua_foreach_impl lua_src_compile
+}
+
+lua_src_test() {
+ pushd "${BUILD_DIR}" || die
+ cd "${S}"/tests && ${ELUA} run_tests.lua || die
+ popd
+}
+
+src_test() {
+ lua_foreach_impl lua_src_test
+}
+
+lua_src_install() {
+ pushd "${BUILD_DIR}" || die
+
+ local myemakeargs=(
+ DESTDIR="${ED}"
+ LUA_CDIR="$(lua_get_cmod_dir)"
+ LUA_INC="$(lua_get_CFLAGS)"
+ LUA_LDIR="$(lua_get_lmod_dir)"
+ )
+
+ use mysql && emake ${myemakeargs[@]} install_mysql
+ use postgres && emake ${myemakeargs[@]} install_psql
+ use sqlite && emake ${myemakeargs[@]} install_sqlite3
+
+ popd
+}
+
+src_install() {
+ lua_foreach_impl lua_src_install
+
+ einstalldocs
+}