diff options
author | Dirkjan Ochtman <djc@gentoo.org> | 2011-05-02 16:37:07 +0000 |
---|---|---|
committer | Dirkjan Ochtman <djc@gentoo.org> | 2011-05-02 16:37:07 +0000 |
commit | 259296f369426aac77d36ca4b06215c953f2ffda (patch) | |
tree | 90c3b478f331afaff3bfa77b4e9f0db27784713d /dev-lua/luadbi | |
parent | Version bump thanks to Justin Lecher (bug #365695). Enforce USE=vanilla (bug ... (diff) | |
download | gentoo-2-259296f369426aac77d36ca4b06215c953f2ffda.tar.gz gentoo-2-259296f369426aac77d36ca4b06215c953f2ffda.tar.bz2 gentoo-2-259296f369426aac77d36ca4b06215c953f2ffda.zip |
Fix path to postgres header (bug 364141).
(Portage version: 2.1.9.46/cvs/Linux x86_64)
Diffstat (limited to 'dev-lua/luadbi')
-rw-r--r-- | dev-lua/luadbi/ChangeLog | 8 | ||||
-rw-r--r-- | dev-lua/luadbi/files/0.5-postgres-path.patch | 9 | ||||
-rw-r--r-- | dev-lua/luadbi/luadbi-0.5-r1.ebuild | 69 |
3 files changed, 85 insertions, 1 deletions
diff --git a/dev-lua/luadbi/ChangeLog b/dev-lua/luadbi/ChangeLog index 24942c5f6353..15efbf7fc84f 100644 --- a/dev-lua/luadbi/ChangeLog +++ b/dev-lua/luadbi/ChangeLog @@ -1,6 +1,12 @@ # 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 $ +# $Header: /var/cvsroot/gentoo-x86/dev-lua/luadbi/ChangeLog,v 1.2 2011/05/02 16:37:07 djc Exp $ + +*luadbi-0.5-r1 (02 May 2011) + + 02 May 2011; Dirkjan Ochtman <djc@gentoo.org> + +files/0.5-postgres-path.patch, +luadbi-0.5-r1.ebuild: + Fix path to postgres header (bug 364141). *luadbi-0.5 (08 Apr 2011) diff --git a/dev-lua/luadbi/files/0.5-postgres-path.patch b/dev-lua/luadbi/files/0.5-postgres-path.patch new file mode 100644 index 000000000000..87a0e889a582 --- /dev/null +++ b/dev-lua/luadbi/files/0.5-postgres-path.patch @@ -0,0 +1,9 @@ +--- dbd/postgresql/dbd_postgresql.h.old 2010-05-01 06:25:12.000000000 +0200 ++++ dbd/postgresql/dbd_postgresql.h 2011-04-19 16:59:53.364944209 +0200 +@@ -1,5 +1,5 @@ + #include <libpq-fe.h> +-#include <postgres_fe.h> ++#include <server/postgres_fe.h> + #include <dbd/common.h> + + /*
\ No newline at end of file diff --git a/dev-lua/luadbi/luadbi-0.5-r1.ebuild b/dev-lua/luadbi/luadbi-0.5-r1.ebuild new file mode 100644 index 000000000000..42073f5ae8ba --- /dev/null +++ b/dev-lua/luadbi/luadbi-0.5-r1.ebuild @@ -0,0 +1,69 @@ +# 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-r1.ebuild,v 1.1 2011/05/02 16:37:07 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}/${PV}-Makefile.patch" + epatch "${FILESDIR}/${PV}-postgres-path.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 +} |