summaryrefslogtreecommitdiff
path: root/dev-lua/luadbi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-lua/luadbi
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-lua/luadbi')
-rw-r--r--dev-lua/luadbi/Manifest4
-rw-r--r--dev-lua/luadbi/files/0.5-r2-Makefile.patch47
-rw-r--r--dev-lua/luadbi/luadbi-0.5-r5.ebuild63
-rw-r--r--dev-lua/luadbi/metadata.xml8
4 files changed, 122 insertions, 0 deletions
diff --git a/dev-lua/luadbi/Manifest b/dev-lua/luadbi/Manifest
new file mode 100644
index 000000000000..d9b1702231d1
--- /dev/null
+++ b/dev-lua/luadbi/Manifest
@@ -0,0 +1,4 @@
+AUX 0.5-r2-Makefile.patch 1785 BLAKE2B c626b6909496a48cf6d059028d882fba69947ceaf2cbb6b5f5ba8ce86ae7f31c240a4e502afb818a51144b97a63946859e1d3dd9396347a2a319f6fac71a1770 SHA512 c9eca24aac386d34dff68a61e538dd2c736569b62e1afc9b0ff2bad14f26c42d402ec1e0eba2f7e974d6e689c70f880c31cfbc955a4e2afa8ca4bebcd351ae58
+DIST luadbi.0.5.tar.gz 22454 BLAKE2B 538fa935ece2a8e0f852cef33716570a6e85100ec26892d7a76c5b00a7fceb82411e2ebe29d25de42cf6ee6bdbfdf5102875bb4d04d65f86dfdc9d79fecef359 SHA512 4ed641e113e90acc8a4f6b3b2d0f5d5044c0fbbef3b2fdfb84d15e17115e45c553a33b19bfb165e5af11a2adce501d66859963e3363d3ab1c6a39b0b2ae92e62
+EBUILD luadbi-0.5-r5.ebuild 1806 BLAKE2B 04e53cad9497933fd81bdefead2de4093e8f8f778f4376a8da511e1af6d01a172f6b3d4a7d795e5797d92b2e74fc6b218d3376e79776a8053637f12770e623e3 SHA512 46a3f2a28f6cdbce7d89effa1a887e007ef360c6d73fd08d17361e43afd8f9dd87f287e4d67e95c1c64adeb4757b7870b2820c48524a02f54bd74dec7b741b5b
+MISC metadata.xml 243 BLAKE2B ae629fd9f0637db05afd7749d7ecef15baf33f716d7a6f9972214040c75ab219283b85aab2721d88ae59eb24040af1e744f75f39c6c0a1bd2ff5c007a24f5eb9 SHA512 05ffe6ac7acff76e9dced367bfd8033602835e047e01f8a87decf2a05ff548395e56f8a1d3be5388b61df32d6bb329725141a0d356efa2651a1c555d882219cc
diff --git a/dev-lua/luadbi/files/0.5-r2-Makefile.patch b/dev-lua/luadbi/files/0.5-r2-Makefile.patch
new file mode 100644
index 000000000000..b37b3c00efe0
--- /dev/null
+++ b/dev-lua/luadbi/files/0.5-r2-Makefile.patch
@@ -0,0 +1,47 @@
+--- Makefile.orig 2013-02-01 13:34:54.490898002 +0400
++++ Makefile 2013-02-01 13:44:25.927772130 +0400
+@@ -1,5 +1,6 @@
+ CC=gcc
+-CFLAGS=-g -pedantic -Wall -O2 -shared -fpic -I /usr/include/lua5.1 -I /usr/include/mysql -I /usr/include/postgresql/ -I /opt/ibm/db2exc/V9.5/include/ -I /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/ -I .
++INCLUDES=-I /usr/include/lua5.1 -I /usr/include/mysql -I /usr/include/postgresql/ -I /opt/ibm/db2exc/V9.5/include/ -I /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/rdbms/public/ -I .
++CFLAGS+=-pedantic -shared -fpic $(INCLUDES)
+ AR=ar rcu
+ RANLIB=ranlib
+ RM=rm -rf
+@@ -27,6 +27,14 @@
+ DB2_OBJS=$(OBJS) build/dbd_db2_main.o build/dbd_db2_connection.o build/dbd_db2_statement.o
+ ORACLE_OBJS=$(OBJS) build/dbd_oracle_main.o build/dbd_oracle_connection.o build/dbd_oracle_statement.o
+
++INSTALL = install
++INSTALL_PROGRAM = $(INSTALL)
++INSTALL_DATA = $(INSTALL) -m 644
++LUA_INC_DIR=/usr/include/lua5.1
++LUA_LIB_DIR=/usr/lib
++INSTALL_DIR_LUA=/usr/share/lua/5.1
++INSTALL_DIR_BIN=/usr/lib/lua/5.1
++
+ free: mysql psql sqlite3
+
+ all: mysql psql sqlite3 db2 oracle
+@@ -90,3 +98,21 @@
+ build:
+ $(MKDIR) ${BUILDDIR}
+
++install_lua:
++ $(INSTALL_DATA) -D DBI.lua $(DESTDIR)$(INSTALL_DIR_LUA)/DBI.lua
++
++install_mysql: install_lua
++ $(INSTALL_PROGRAM) -D $(DBDMYSQL) $(DESTDIR)$(INSTALL_DIR_BIN)/$(DBDMYSQL)
++
++install_psql: install_lua
++ $(INSTALL_PROGRAM) -D $(DBDPSQL) $(DESTDIR)$(INSTALL_DIR_BIN)/$(DBDPSQL)
++
++install_sqlite3: install_lua
++ $(INSTALL_PROGRAM) -D $(DBDSQLITE3) $(DESTDIR)$(INSTALL_DIR_BIN)/$(DBDSQLITE3)
++
++install_db2: install_lua
++ $(INSTALL_PROGRAM) -D $(DBDDB2) $(DESTDIR)$(INSTALL_DIR_BIN)/$(DBDDB2)
++
++install_oracle: install_lua
++ $(INSTALL_PROGRAM) -D $(DBDORACLE) $(DESTDIR)$(INSTALL_DIR_BIN)/$(DBDORACLE)
++
diff --git a/dev-lua/luadbi/luadbi-0.5-r5.ebuild b/dev-lua/luadbi/luadbi-0.5-r5.ebuild
new file mode 100644
index 000000000000..e1cdb2f76572
--- /dev/null
+++ b/dev-lua/luadbi/luadbi-0.5-r5.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="DBI module for Lua"
+HOMEPAGE="https://code.google.com/p/luadbi/"
+SRC_URI="https://luadbi.googlecode.com/files/${PN}.${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="mysql postgres +sqlite"
+REQUIRED_USE="|| ( mysql postgres sqlite )"
+
+RDEPEND=">=dev-lang/lua-5.1
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql )
+ sqlite? ( >=dev-db/sqlite-3 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-r2-Makefile.patch
+ sed -i -e "s#^INSTALL_DIR_LUA=.*#INSTALL_DIR_LUA=$(pkg-config --variable INSTALL_LMOD lua)#" \
+ -e "s#^INSTALL_DIR_BIN=.*#INSTALL_DIR_BIN=$(pkg-config --variable INSTALL_CMOD lua)#" \
+ -e "s#^LUA_INC_DIR=.*#LUA_INC_DIR=$(pkg-config --variable INSTALL_INC lua)#" \
+ -e "s#^LUA_LIB_DIR=.*#LUA_LIB_DIR=$(pkg-config --variable INSTALL_LIB lua)#" \
+ -e "s#^LUA_LIB =.*#LUA_LIB=lua#" Makefile || die
+
+ drivers=""
+
+ if use mysql; then
+ drivers+="mysql "
+ sed -i -e "s#^\(INCLUDES.*\)#\1 $(mysql_config --include)#" \
+ -e "s#^\(MYSQL_LDFLAGS=\$(COMMON_LDFLAGS)\).*#\1 $(mysql_config --libs)#" Makefile || die
+ fi
+
+ if use postgres; then
+ drivers+="psql "
+ sed -i -e "s#^\(INCLUDES.*\)#\1 -I$(pg_config --includedir) -I$(pg_config --includedir-server)#" \
+ -e "s#^\(PSQL_LDFLAGS=\$(COMMON_LDFLAGS)\).*#\1 -L$(pg_config --libdir) -lpq#" Makefile || die
+ fi
+
+ use sqlite && drivers+="sqlite3"
+}
+
+src_compile() {
+ append-flags -fPIC
+ for driver in ${drivers}; do
+ emake CC="$(tc-getCC)" COMMON_LDFLAGS="${LDFLAGS}" ${driver}
+ done
+}
+
+src_install() {
+ for driver in ${drivers}; do
+ emake DESTDIR="${D}" "install_${driver// /}"
+ done
+}
diff --git a/dev-lua/luadbi/metadata.xml b/dev-lua/luadbi/metadata.xml
new file mode 100644
index 000000000000..2ff9f66c8898
--- /dev/null
+++ b/dev-lua/luadbi/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="google-code">luadbi</remote-id>
+ </upstream>
+</pkgmetadata>