diff options
author | Manuel Rüger <mrueg@gentoo.org> | 2014-01-13 03:48:03 +0000 |
---|---|---|
committer | Manuel Rüger <mrueg@gentoo.org> | 2014-01-13 03:48:03 +0000 |
commit | 3e63ebef6cb47b5c8f6cecb89f8039000219c26c (patch) | |
tree | 9c65fe3c88c44f20d8c4b0e60643bcc58f73524f /dev-lua/luadbi | |
parent | Version bump. (diff) | |
download | gentoo-2-3e63ebef6cb47b5c8f6cecb89f8039000219c26c.tar.gz gentoo-2-3e63ebef6cb47b5c8f6cecb89f8039000219c26c.tar.bz2 gentoo-2-3e63ebef6cb47b5c8f6cecb89f8039000219c26c.zip |
Add fix for postgres' server include path by Alexander Sulfrian. Fixes bug #497698.
(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key )
Diffstat (limited to 'dev-lua/luadbi')
-rw-r--r-- | dev-lua/luadbi/ChangeLog | 10 | ||||
-rw-r--r-- | dev-lua/luadbi/luadbi-0.5-r4.ebuild | 64 |
2 files changed, 72 insertions, 2 deletions
diff --git a/dev-lua/luadbi/ChangeLog b/dev-lua/luadbi/ChangeLog index 92aeccff4399..99f53ec81d1e 100644 --- a/dev-lua/luadbi/ChangeLog +++ b/dev-lua/luadbi/ChangeLog @@ -1,6 +1,12 @@ # 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.18 2013/12/24 12:52:24 ago Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lua/luadbi/ChangeLog,v 1.19 2014/01/13 03:48:03 mrueg Exp $ + +*luadbi-0.5-r4 (13 Jan 2014) + + 13 Jan 2014; Manuel Rüger <mrueg@gentoo.org> +luadbi-0.5-r4.ebuild: + Add fix for postgres' server include path by Alexander Sulfrian. Fixes bug + #497698. 24 Dec 2013; Agostino Sarubbo <ago@gentoo.org> luadbi-0.5-r3.ebuild: Stable for x86, wrt bug #488410 diff --git a/dev-lua/luadbi/luadbi-0.5-r4.ebuild b/dev-lua/luadbi/luadbi-0.5-r4.ebuild new file mode 100644 index 000000000000..a30a56191a69 --- /dev/null +++ b/dev-lua/luadbi/luadbi-0.5-r4.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lua/luadbi/luadbi-0.5-r4.ebuild,v 1.1 2014/01/13 03:48:03 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 ~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 +} |