diff options
Diffstat (limited to 'dev-lua/luadbi')
-rw-r--r-- | dev-lua/luadbi/Manifest | 6 | ||||
-rw-r--r-- | dev-lua/luadbi/files/0.5-r2-Makefile.patch | 47 | ||||
-rw-r--r-- | dev-lua/luadbi/luadbi-0.5-r5.ebuild | 63 | ||||
-rw-r--r-- | dev-lua/luadbi/metadata.xml | 8 |
4 files changed, 124 insertions, 0 deletions
diff --git a/dev-lua/luadbi/Manifest b/dev-lua/luadbi/Manifest new file mode 100644 index 000000000000..ae8e3cca25bd --- /dev/null +++ b/dev-lua/luadbi/Manifest @@ -0,0 +1,6 @@ +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-r5.ebuild 1806 SHA256 fc9f78900961c8fd53a972cc4f0723956d11de0556de8d8f2abfc0610dc9072a SHA512 46a3f2a28f6cdbce7d89effa1a887e007ef360c6d73fd08d17361e43afd8f9dd87f287e4d67e95c1c64adeb4757b7870b2820c48524a02f54bd74dec7b741b5b WHIRLPOOL d9ad25eef89aadc30c8ce9a1aa0d66b63735e1ecaa7612d95083e9237e82f22998d682ea666ad5c2564eb3f89c186c8de34f4d7064583eafe777d86f01b7887a +MISC ChangeLog 2522 SHA256 97194d27e6e328df95ee1f14ca05fa01565ac48d1e48e31cf6a57f6a2ab22580 SHA512 cc231ca8334ce01577edd866b4afdbfc09d51d513c8b385b0dcd7f16168b3240b980b34bf4fd68f820f5254296c6b61af6ba7e8aea64d4bdefa003984c53ab28 WHIRLPOOL aa1cfb63da124a321362824390362aaec6a6d693aa6db8d8f734e90e90cf119badb0690fe37ef1b2519a65e4f2eb0d20f39117df1d47fe97cca3912d91ac365c +MISC ChangeLog-2015 3677 SHA256 e81a081cc34f1d68e5d43e57fb28ad102d6eb34c4baa594b8935cb6d02cca27f SHA512 a99cfdbff8db72ff35e811239c6ea1326a732dfd70a2c244712ea7dc9178a5ce2eae85dd1a5099a2d83f62548bd8879347fdc9c0e203c72d0b4404c2866474b9 WHIRLPOOL d391bb07410fc50f129f5b8d59a4848d574f9f0976453db08bb3931ef6ecc2e726c98b0243980d637c2139bef7c66cf284637c6bb579905fae6bece20e1dd98b +MISC metadata.xml 243 SHA256 0ba0de97503566cf2b949682ecfe4ef9d81024e2d4887fb0a560b12230bd82cb SHA512 05ffe6ac7acff76e9dced367bfd8033602835e047e01f8a87decf2a05ff548395e56f8a1d3be5388b61df32d6bb329725141a0d356efa2651a1c555d882219cc WHIRLPOOL 769000959133eb6d1a5ffdd0c5f61c342175e9ced5249101b367daa07e6ed822a8d4f1c2d6ab142c6fc1e089a1aa52111250c15a6ee8e90be4a1b16b07cdd5a4 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> |