summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirkjan Ochtman <djc@gentoo.org>2011-04-08 16:37:09 +0000
committerDirkjan Ochtman <djc@gentoo.org>2011-04-08 16:37:09 +0000
commita455650e9b51be03a121a48c7d00fee9137e3bb3 (patch)
tree2ea038b1f703567fd6f65a6686810141b19f11d7 /dev-lua
parentarm stable, bug #359059 (diff)
downloadhistorical-a455650e9b51be03a121a48c7d00fee9137e3bb3.tar.gz
historical-a455650e9b51be03a121a48c7d00fee9137e3bb3.tar.bz2
historical-a455650e9b51be03a121a48c7d00fee9137e3bb3.zip
Initial version of luadbi, bug 352379.
Package-Manager: portage-2.1.9.45/cvs/Linux x86_64
Diffstat (limited to 'dev-lua')
-rw-r--r--dev-lua/luadbi/ChangeLog10
-rw-r--r--dev-lua/luadbi/Manifest15
-rw-r--r--dev-lua/luadbi/files/0.5-Makefile.patch39
-rw-r--r--dev-lua/luadbi/luadbi-0.5.ebuild68
-rw-r--r--dev-lua/luadbi/metadata.xml8
5 files changed, 140 insertions, 0 deletions
diff --git a/dev-lua/luadbi/ChangeLog b/dev-lua/luadbi/ChangeLog
new file mode 100644
index 000000000000..24942c5f6353
--- /dev/null
+++ b/dev-lua/luadbi/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for dev-lua/luadbi
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lua/luadbi/ChangeLog,v 1.1 2011/04/08 16:37:09 djc Exp $
+
+*luadbi-0.5 (08 Apr 2011)
+
+ 08 Apr 2011; Dirkjan Ochtman <djc@gentoo.org> +files/0.5-Makefile.patch,
+ +luadbi-0.5.ebuild, +metadata.xml:
+ Initial version of luadbi, bug 352379.
+
diff --git a/dev-lua/luadbi/Manifest b/dev-lua/luadbi/Manifest
new file mode 100644
index 000000000000..090c65f4792f
--- /dev/null
+++ b/dev-lua/luadbi/Manifest
@@ -0,0 +1,15 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX 0.5-Makefile.patch 1293 RMD160 1503f79f30bb438e562e78ed11217bbfc4405638 SHA1 b92c87a66ad6bb296d2b43552b5c949c575579b4 SHA256 a9b8a3429f09855aff8b803659a72be2e80a94152f846d1c17cfedcf363ae630
+DIST luadbi.0.5.tar.gz 22454 RMD160 b653e55a47a7f65cb436b962a8035ed5ebb61074 SHA1 c8c650c168599e3ac97634a5ffb28aeaaa4fb635 SHA256 49116458dd80052536bf5d7e2b2a1f5a0fa42a671ce77f1cb7355ef7faeb331e
+EBUILD luadbi-0.5.ebuild 2063 RMD160 a6d3133ae08abfe63ce6ed60912fa4a9dd3fd7c8 SHA1 f2501912a556b70b4bafe9d3cabd0b110a7cf9ce SHA256 1778900df532ab1e56bbd9c8ed0bf5b8d2530e759238a9316a971397f57c7c2c
+MISC ChangeLog 379 RMD160 b8786c1cc098ba0bd7cc53de13e8747ee4a0e0e3 SHA1 5cd63e9b4735ba8ec494e34c140369e31d87a189 SHA256 15bc212a4f170662e92f2db692526e02b184f1a0901402ab8e292fad81d4c5de
+MISC metadata.xml 222 RMD160 1ecd6ec2de3cabca42355c97a60a9ab10e6d04eb SHA1 eb11b76b0b58d89542957a3e8661ae90f01fdd28 SHA256 bf2766a136d56123f5cbd54b934eaf7b781d38cbd24fccb23cfc568535270ac9
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iEYEARECAAYFAk2fOb8ACgkQxeMuLWsGW/uzEQCfSxEo2tFNr5JYM8qtbFLHVWeW
++NUAn3aqpoqmrHDGfTi3eLmr8s4J1zQX
+=/y3b
+-----END PGP SIGNATURE-----
diff --git a/dev-lua/luadbi/files/0.5-Makefile.patch b/dev-lua/luadbi/files/0.5-Makefile.patch
new file mode 100644
index 000000000000..e24cb342e06c
--- /dev/null
+++ b/dev-lua/luadbi/files/0.5-Makefile.patch
@@ -0,0 +1,39 @@
+--- Makefile.old 2010-07-16 08:22:13.000000000 +0200
++++ Makefile 2011-01-08 11:35:16.000000000 +0100
+@@ -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: mysql install_lua
++ $(INSTALL_PROGRAM) -D $(DBDMYSQL) $(DESTDIR)$(INSTALL_DIR_BIN)/$(DBDMYSQL)
++
++install_psql: psql install_lua
++ $(INSTALL_PROGRAM) -D $(DBDPSQL) $(DESTDIR)$(INSTALL_DIR_BIN)/$(DBDPSQL)
++
++install_sqlite3: sqlite3 install_lua
++ $(INSTALL_PROGRAM) -D $(DBDSQLITE3) $(DESTDIR)$(INSTALL_DIR_BIN)/$(DBDSQLITE3)
++
++install_db2: db2 install_lua
++ $(INSTALL_PROGRAM) -D $(DBDDB2) $(DESTDIR)$(INSTALL_DIR_BIN)/$(DBDDB2)
++
++install_oracle: oracle install_lua
++ $(INSTALL_PROGRAM) -D $(DBDORACLE) $(DESTDIR)$(INSTALL_DIR_BIN)/$(DBDORACLE)
++
diff --git a/dev-lua/luadbi/luadbi-0.5.ebuild b/dev-lua/luadbi/luadbi-0.5.ebuild
new file mode 100644
index 000000000000..f749bd58ddf3
--- /dev/null
+++ b/dev-lua/luadbi/luadbi-0.5.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lua/luadbi/luadbi-0.5.ebuild,v 1.1 2011/04/08 16:37:09 djc Exp $
+
+EAPI=2
+
+inherit multilib 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 ~x86"
+IUSE="mysql postgres sqlite"
+
+RDEPEND=">=dev-lang/lua-5.1
+ mysql? ( dev-db/mysql )
+ postgres? ( dev-db/postgresql-base )
+ sqlite? ( >=dev-db/sqlite-3 )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PVR}-Makefile.patch"
+ sed -i -e "s#^INSTALL_DIR_LUA=.*#INSTALL_DIR_LUA=$(pkg-config --variable INSTALL_LMOD lua)#" "${S}/Makefile"
+ sed -i -e "s#^INSTALL_DIR_BIN=.*#INSTALL_DIR_BIN=$(pkg-config --variable INSTALL_CMOD lua)#" "${S}/Makefile"
+ sed -i -e "s#^LUA_INC_DIR=.*#LUA_INC_DIR=$(pkg-config --variable INSTALL_INC lua)#" "${S}/Makefile"
+ sed -i -e "s#^LUA_LIB_DIR=.*#LUA_LIB_DIR=$(pkg-config --variable INSTALL_LIB lua)#" "${S}/Makefile"
+ sed -i -e "s#^LUA_LIB =.*#LUA_LIB=lua#" "${S}/Makefile"
+}
+
+src_compile() {
+ local drivers=""
+ use mysql && drivers="${drivers} mysql"
+ use postgres && drivers="${drivers} psql"
+ use sqlite && drivers="${drivers} sqlite3"
+
+ if [ -z "${drivers// /}" ] ; then
+ eerror
+ eerror "No driver was selected, cannot build."
+ eerror "Please set USE flags to build any driver."
+ eerror "Possible USE flags: mysql postgres sqlite"
+ eerror
+ die "No driver selected"
+ fi
+
+ append-flags -fPIC -c
+ for driver in "${drivers}" ; do
+ emake ${driver} \
+ || die "Compiling driver '${drivers// /}' failed"
+ done
+}
+
+src_install() {
+ local drivers=""
+ use mysql && drivers="${drivers} mysql"
+ use postgres && drivers="${drivers} psql"
+ use sqlite && drivers="${drivers} sqlite3"
+
+ for driver in ${drivers} ; do
+ emake DESTDIR="${D}" "install_${driver// /}" \
+ || die "Install of driver '${drivers// /}' failed"
+ done
+}
diff --git a/dev-lua/luadbi/metadata.xml b/dev-lua/luadbi/metadata.xml
new file mode 100644
index 000000000000..1ea32aebdfe2
--- /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>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>djc@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>