diff options
author | Manuel Rüger <mrueg@gentoo.org> | 2013-07-29 01:49:21 +0000 |
---|---|---|
committer | Manuel Rüger <mrueg@gentoo.org> | 2013-07-29 01:49:21 +0000 |
commit | c2d31f4811279ff4376bb628c1bb727c8db46a1a (patch) | |
tree | f542663e2088afd278e41ee329f0aaa08a00df3a /dev-lua | |
parent | Version bumps (diff) | |
download | gentoo-2-c2d31f4811279ff4376bb628c1bb727c8db46a1a.tar.gz gentoo-2-c2d31f4811279ff4376bb628c1bb727c8db46a1a.tar.bz2 gentoo-2-c2d31f4811279ff4376bb628c1bb727c8db46a1a.zip |
Fixes bug #475942. Ebuild patch by Alexander Tsoy. Minor improvements by me
(Portage version: 2.1.13.1/cvs/Linux x86_64, signed Manifest commit with key )
Diffstat (limited to 'dev-lua')
-rw-r--r-- | dev-lua/luadbi/ChangeLog | 7 | ||||
-rw-r--r-- | dev-lua/luadbi/luadbi-0.5-r3.ebuild | 65 |
2 files changed, 71 insertions, 1 deletions
diff --git a/dev-lua/luadbi/ChangeLog b/dev-lua/luadbi/ChangeLog index 32e01a655c9f..592d65b91a01 100644 --- a/dev-lua/luadbi/ChangeLog +++ b/dev-lua/luadbi/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-lua/luadbi # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lua/luadbi/ChangeLog,v 1.14 2013/07/22 23:33:10 mrueg Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lua/luadbi/ChangeLog,v 1.15 2013/07/29 01:49:21 mrueg Exp $ + +*luadbi-0.5-r3 (29 Jul 2013) + + 29 Jul 2013; Manuel Rüger <mrueg@gentoo.org> +luadbi-0.5-r3.ebuild: + Fixes bug #475942. Ebuild patch by Alexander Tsoy. Minor improvements by me 22 Jul 2013; Manuel Rüger <mrueg@gentoo.org> metadata.xml: Taking up maintainership 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 000000000000..bd22507650a2 --- /dev/null +++ b/dev-lua/luadbi/luadbi-0.5-r3.ebuild @@ -0,0 +1,65 @@ +# 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.1 2013/07/29 01:49:21 mrueg 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 ~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 \ + "${FILESDIR}"/${PV}-postgres-path.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)#" \ + -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 +} |