Skip to content

Instantly share code, notes, and snippets.

@kashif
Created July 5, 2009 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kashif/140950 to your computer and use it in GitHub Desktop.
Save kashif/140950 to your computer and use it in GitHub Desktop.
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header$
inherit autotools eutils versionator
KEYWORDS="~amd64 ~x86"
DESCRIPTION="SpatiaLite extension enables SQLite to support spatial data in a way conformant to OpenGis specifications."
HOMEPAGE="http://www.gaia-gis.it/spatialite"
SRC_URI="http://www.gaia-gis.it/spatialite/libspatialite-amalgamation-${PV}.tar.gz"
LICENSE="MPL-1.1"
SLOT="0"
IUSE="geos proj readline"
RDEPEND=">=dev-db/sqlite-3
geos? ( sci-libs/geos )
proj? ( sci-libs/proj )
readline? ( sys-libs/readline )"
DEPEND="${RDEPEND}"
src_unpack() {
unpack ${A}
cd "libspatialite-amalgamation-2.3.1"
}
src_compile(){
cd "libspatialite-amalgamation-2.3.1"
local myconf
if use geos; then
myconf="--enable-geos --with-geos-lib=/usr/lib"
fi
if use proj; then
myconf="${myconf} --enable-proj --with-proj-lib=/usr/lib"
fi
if use readline; then
myconf="${myconf} --enable-readline"
fi
econf --enable-autoconf ${myconf} ||\
die "Error: econf failed"
emake || die "Error: emake failed"
}
src_install(){
cd "libspatialite-amalgamation-2.3.1"
emake DESTDIR="${D}" install || die "emake install failed"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment