diff options
author | Dirkjan Ochtman <djc@gentoo.org> | 2011-04-08 16:37:09 +0000 |
---|---|---|
committer | Dirkjan Ochtman <djc@gentoo.org> | 2011-04-08 16:37:09 +0000 |
commit | a7859fa8a654f0ff2f16ff0da6e9d908d54f9333 (patch) | |
tree | cf4ed7e7ee485fc3dfaa77cc7e2103819fa391af /dev-lua | |
parent | arm stable, bug #359059 (diff) | |
download | gentoo-2-a7859fa8a654f0ff2f16ff0da6e9d908d54f9333.tar.gz gentoo-2-a7859fa8a654f0ff2f16ff0da6e9d908d54f9333.tar.bz2 gentoo-2-a7859fa8a654f0ff2f16ff0da6e9d908d54f9333.zip |
Initial version of luadbi, bug 352379.
(Portage version: 2.1.9.45/cvs/Linux x86_64)
Diffstat (limited to 'dev-lua')
-rw-r--r-- | dev-lua/luadbi/ChangeLog | 10 | ||||
-rw-r--r-- | dev-lua/luadbi/files/0.5-Makefile.patch | 39 | ||||
-rw-r--r-- | dev-lua/luadbi/luadbi-0.5.ebuild | 68 | ||||
-rw-r--r-- | dev-lua/luadbi/metadata.xml | 8 |
4 files changed, 125 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/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> |