aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dev-lua/luadbi/Manifest3
-rw-r--r--dev-lua/luadbi/files/0.5-r2-Makefile.patch47
-rw-r--r--dev-lua/luadbi/luadbi-0.5-r3.ebuild64
-rw-r--r--metadata/cache/dev-lua/luadbi-0.5-r322
4 files changed, 136 insertions, 0 deletions
diff --git a/dev-lua/luadbi/Manifest b/dev-lua/luadbi/Manifest
new file mode 100644
index 0000000..7199d48
--- /dev/null
+++ b/dev-lua/luadbi/Manifest
@@ -0,0 +1,3 @@
+AUX 0.5-r2-Makefile.patch 1785 SHA256 b04eb65a09578c4a72344107881a09fcca56bd95d7a5d13a2c5e3d8e8c2841a0 SHA512 c9eca24aac386d34dff68a61e538dd2c736569b62e1afc9b0ff2bad14f26c42d402ec1e0eba2f7e974d6e689c70f880c31cfbc955a4e2afa8ca4bebcd351ae58 WHIRLPOOL 01ff9086e393173d567c713de1a04f50c2d4e705d85769dc5dd73c965b94aafeedc8067143480519818f05aa988e1ff3631ce56443590f7720d54a15d2461d23
+DIST luadbi.0.5.tar.gz 22454 SHA256 49116458dd80052536bf5d7e2b2a1f5a0fa42a671ce77f1cb7355ef7faeb331e SHA512 4ed641e113e90acc8a4f6b3b2d0f5d5044c0fbbef3b2fdfb84d15e17115e45c553a33b19bfb165e5af11a2adce501d66859963e3363d3ab1c6a39b0b2ae92e62 WHIRLPOOL 6f1384d562adb7f874b9df6d42ebbe689fbd200ca57881ab76847eae818ffbb85765bfdbeb810511e8cff05170ba104bfc029f9cc969e8799a6971207f4bce4e
+EBUILD luadbi-0.5-r3.ebuild 1916 SHA256 2d2a635da59109d420d50dd12dfacfd682597db56d78d2e3baab9b567d39040c SHA512 70bddadb80710c106be86ee9c31e56985f377435bb0757f479832e5e748165bc2f97ef9870514b1d54aae10907494aa0cd577037f73a3d41ff301d29dc6b4c39 WHIRLPOOL fc1a962db0e579d72440d309d6d49e176c856f2a1777ab92e844795d12489f6b2847348c0826446e50cce878bd490f0097b335969e9b32000e77da260790a830
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 0000000..b37b3c0
--- /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-r3.ebuild b/dev-lua/luadbi/luadbi-0.5-r3.ebuild
new file mode 100644
index 0000000..e3ae5a3
--- /dev/null
+++ b/dev-lua/luadbi/luadbi-0.5-r3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lua/luadbi/luadbi-0.5-r3.ebuild,v 1.3 2013/12/24 12:52:24 ago Exp $
+
+EAPI=5
+
+inherit toolchain-funcs flag-o-matic eutils
+
+DESCRIPTION="DBI module for Lua"
+HOMEPAGE="http://code.google.com/p/luadbi/"
+SRC_URI="http://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-base )
+ 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/metadata/cache/dev-lua/luadbi-0.5-r3 b/metadata/cache/dev-lua/luadbi-0.5-r3
new file mode 100644
index 0000000..67d1b9e
--- /dev/null
+++ b/metadata/cache/dev-lua/luadbi-0.5-r3
@@ -0,0 +1,22 @@
+>=dev-lang/lua-5.1 mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql-base ) sqlite? ( >=dev-db/sqlite-3 ) virtual/pkgconfig
+>=dev-lang/lua-5.1 mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql-base ) sqlite? ( >=dev-db/sqlite-3 )
+0
+http://luadbi.googlecode.com/files/luadbi.0.5.tar.gz
+
+http://code.google.com/p/luadbi/
+MIT
+DBI module for Lua
+~amd64 ~arm x86
+eutils flag-o-matic multilib toolchain-funcs
+mysql postgres sqlite
+|| ( mysql postgres sqlite )
+
+
+5
+
+compile install prepare
+
+
+
+
+