summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGérald Fenoy <djay@gentoo.org>2007-01-06 19:41:27 +0000
committerGérald Fenoy <djay@gentoo.org>2007-01-06 19:41:27 +0000
commitb10c99dbfff7c4911f99e98229efb912cf1c5037 (patch)
treefda216423b036784f9df44c9826fe01469c16691
parentInitial commit (diff)
downloadgentoo-2-b10c99dbfff7c4911f99e98229efb912cf1c5037.tar.gz
gentoo-2-b10c99dbfff7c4911f99e98229efb912cf1c5037.tar.bz2
gentoo-2-b10c99dbfff7c4911f99e98229efb912cf1c5037.zip
adding postgis 1.1.6 and 1.2.0 versions.
(Portage version: 2.1.1-r2)
-rw-r--r--dev-db/postgis/ChangeLog12
-rw-r--r--dev-db/postgis/files/digest-postgis-1.1.63
-rw-r--r--dev-db/postgis/files/digest-postgis-1.2.03
-rw-r--r--dev-db/postgis/metadata.xml1
-rw-r--r--dev-db/postgis/postgis-1.1.4.ebuild4
-rw-r--r--dev-db/postgis/postgis-1.1.6.ebuild190
-rw-r--r--dev-db/postgis/postgis-1.2.0.ebuild190
7 files changed, 399 insertions, 4 deletions
diff --git a/dev-db/postgis/ChangeLog b/dev-db/postgis/ChangeLog
index e919e42ba99b..583178f1f981 100644
--- a/dev-db/postgis/ChangeLog
+++ b/dev-db/postgis/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-db/postgis
-# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.25 2006/12/17 16:13:34 dertobi123 Exp $
+# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.26 2007/01/06 19:41:27 djay Exp $
+
+*postgis-1.2.0 (06 Jan 2007)
+*postgis-1.1.6 (06 Jan 2007)
+
+ 06 Jan 2007; <djay@gentoo.org> metadata.xml, +postgis-1.1.6.ebuild,
+ +postgis-1.2.0.ebuild:
+ Adding postgis-1.1.6 and postgis-1.2.0 ebuilds. Special thanks to
+ dev-zero for his help.
17 Dec 2006; Tobias Scherbaum <dertobi123@gentoo.org>
postgis-1.1.4.ebuild:
diff --git a/dev-db/postgis/files/digest-postgis-1.1.6 b/dev-db/postgis/files/digest-postgis-1.1.6
new file mode 100644
index 000000000000..cb168c1fd524
--- /dev/null
+++ b/dev-db/postgis/files/digest-postgis-1.1.6
@@ -0,0 +1,3 @@
+MD5 d9df1ea49df747607e7ed9fdccf728cb postgis-1.1.6.tar.gz 2039011
+RMD160 414b7d03e1b14f7e46dabc32484ec25b4dc42916 postgis-1.1.6.tar.gz 2039011
+SHA256 18923e610e23e4c5fe706b5d52ff3d44fbddac9876775d36917268d32d7d1580 postgis-1.1.6.tar.gz 2039011
diff --git a/dev-db/postgis/files/digest-postgis-1.2.0 b/dev-db/postgis/files/digest-postgis-1.2.0
new file mode 100644
index 000000000000..5f141e8b96e5
--- /dev/null
+++ b/dev-db/postgis/files/digest-postgis-1.2.0
@@ -0,0 +1,3 @@
+MD5 59b5f89d0a0230b00d80e779bb517520 postgis-1.2.0.tar.gz 2077747
+RMD160 4f2ce71ffd49649cd5712a8bc1a6b822d968797a postgis-1.2.0.tar.gz 2077747
+SHA256 7d8f5782ddca38199a1630765e4a2b6d7d703af0cc28d04685cbc6156177d9cb postgis-1.2.0.tar.gz 2077747
diff --git a/dev-db/postgis/metadata.xml b/dev-db/postgis/metadata.xml
index d06e452b35af..bbcdf2bec405 100644
--- a/dev-db/postgis/metadata.xml
+++ b/dev-db/postgis/metadata.xml
@@ -2,4 +2,5 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>postgresql</herd>
+ <herd>sci-geosciences</herd>
</pkgmetadata>
diff --git a/dev-db/postgis/postgis-1.1.4.ebuild b/dev-db/postgis/postgis-1.1.4.ebuild
index 64a3ecacefa6..43a6f712498f 100644
--- a/dev-db/postgis/postgis-1.1.4.ebuild
+++ b/dev-db/postgis/postgis-1.1.4.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.1.4.ebuild,v 1.3 2006/12/17 16:13:34 dertobi123 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.1.4.ebuild,v 1.4 2007/01/06 19:41:27 djay Exp $
inherit autotools eutils
diff --git a/dev-db/postgis/postgis-1.1.6.ebuild b/dev-db/postgis/postgis-1.1.6.ebuild
new file mode 100644
index 000000000000..c9e8b48d89a0
--- /dev/null
+++ b/dev-db/postgis/postgis-1.1.6.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.1.6.ebuild,v 1.1 2007/01/06 19:41:27 djay Exp $
+
+WANT_AUTOCONF="lastest"
+inherit autotools eutils versionator
+
+KEYWORDS="~x86 ~ppc ~amd64"
+
+DESCRIPTION="Geographic Objects for PostgreSQL"
+HOMEPAGE="http://postgis.refractions.net"
+SRC_URI="http://www.postgis.org/download/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="geos proj doc"
+
+RDEPEND=">=dev-db/postgresql-7.4
+ geos? ( sci-libs/geos )
+ proj? ( sci-libs/proj )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-text/docbook-xsl-stylesheets )"
+
+RESTRICT="test"
+
+pkg_setup(){
+ local tmp
+ tmp="$(portageq match / postgis | cut -d'.' -f2)"
+ if [ "${tmp}" != "$(get_version_component_range 2)" ]; then
+ elog "You must soft upgrade your existing postgis enabled databases"
+ elog "using 'emerge --config postgis'."
+ require_soft_upgrade="1"
+ ebeep 2
+ fi
+}
+
+src_unpack(){
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}_xsl.patch"
+
+ eautoconf
+}
+
+src_compile(){
+ local myconf
+ if use geos; then
+ myconf="--with-geos"
+ fi
+
+ if use doc;then
+ myconf=="${myconf} --with-xsl=$(ls "${ROOT}"usr/share/sgml/docbook/* | \
+ grep xsl\- | cut -d':' -f1)"
+ fi
+
+ econf --enable-autoconf \
+ --datadir=/usr/share/postgresql/contrib/ \
+ --libdir=/usr/$(get_libdir)/postgresql/ \
+ --with-docdir=/usr/share/doc/${PF}/html/ \
+ ${myconf} \
+ $(use_with proj) ||\
+ die "Error: econf failed"
+
+ emake || die "Error: emake failed"
+
+ cd topology/
+ emake || die "Unable to build topology sql file"
+
+ if use doc ; then
+ cd "${S}"
+ emake docs || die "Unable to build documentation"
+ fi
+}
+
+src_install(){
+ dodir /usr/$(get_libdir)/postgresql /usr/share/postgresql/contrib/
+ emake DESTDIR="${D}" install || die "emake install failed"
+ cd "${S}/topology/"
+ emake DESTDIR="${D}" install || die "emake install topology failed"
+
+ cd "${S}"
+ dodoc Changelog CREDITS TODO loader/README.* doc/*txt
+
+ docinto topology
+ dodoc topology/{TODO,README}
+ dobin ./utils/postgis_restore.pl
+
+ cd "${S}"
+ if use doc; then
+ emake DESTDIR="${D}" docs-install || die "emake install docs failed"
+ fi
+
+ if [ ! -z "${require_soft_upgrade}" ]; then
+ grep "'C'" -B 4 "${D}"usr/share/postgresql/contrib/lwpostgis.sql |\
+ grep -v "'sql'" > \
+ "${D}"usr/share/postgresql/contrib/load_before_upgrade.sql
+ fi
+}
+
+pkg_postinst() {
+ elog "To create new spatial database use 'emerge --config ${PN}.'"
+}
+
+pkg_config(){
+ myuser="${PG_USER:-postgres}"
+ mydb="${PGDATABASE:-template_gis}"
+
+ is_template=false
+ if [ "${mydb:0:8}" == "template" ];then
+ is_template=true
+ mytype="template database"
+ else
+ mytype="database"
+ fi
+
+ einfo "Create or upgrade a spatial template and database."
+ einfo "Using the user ${myuser} and the ${mydb} ${mytype}."
+ einfo "Please do 'export PG_USER=...' to use another user."
+ einfo "Please do 'export PGDATABASE=...' to set another template/database"
+ einfo "name (templates name have to be prefixed with 'template')."
+
+ logfile=$(mktemp "${ROOT}tmp/error.log.XXXXXX")
+ safe_exit(){
+ eerror "Removing created ${mydb} ${mytype}"
+ dropdb -q -U "${myuser}" "${mydb}" ||\
+ (eerror "${1}"
+ die "Removing old db failed, you must do it manually")
+ eerror "Please read ${logfile} for more information."
+ die "${1}"
+ }
+
+ # if there is not a table or a template existing with the same name, create.
+ if [ -z "$(psql -U "${myuser}" -l | grep "${mydb}")" ]; then
+ einfo
+ einfo "Please hit ENTER if you want to create the ${mydb}"
+ einfo "${mytype} as "${myuser}" user, or Control-C to abort now..."
+ read
+ createdb -q -O ${myuser} -U ${myuser} ${mydb} ||\
+ die "Unable to create the ${mydb} ${mytype} as ${myuser}"
+ createlang -U ${myuser} plpgsql ${mydb}
+ if [ "$?" == 2 ]; then
+ safe_exit "Unable to createlang plpgsql ${mydb}."
+ fi
+ (psql -q -U ${myuser} ${mydb} -f \
+ "${ROOT}"usr/share/postgresql/contrib/lwpostgis.sql &&
+ psql -q -U ${myuser} ${mydb} -f \
+ "${ROOT}"usr/share/postgresql/contrib/spatial_ref_sys.sql) 2>\
+ "${logfile}"
+ if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
+ safe_exit "Unable to load sql files."
+ fi
+ if ${is_template}; then
+ psql -q -U ${myuser} ${mydb} -c \
+ "UPDATE pg_database SET datistemplate = TRUE
+ WHERE datname = '${mydb}';
+ GRANT ALL ON table spatial_ref_sys, geometry_columns TO PUBLIC;
+ VACUUM FREEZE;" || die "Unable to create ${mydb}"
+ fi
+ else
+ einfo
+ einfo "Please hit ENTER if you want to upgrade the ${mydb}"
+ einfo "${mytype} as ${myuser} user, or Control-C to abort now..."
+ read
+ if [ -e "${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql ];
+ then
+ einfo "Updating the dynamic library references"
+ psql -q -U ${myuser} ${mydb} -f \
+ "${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql\
+ 2> "${logfile}"
+ if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
+ safe_exit "Unable to update references."
+ fi
+ fi
+ if [ -e "${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql ];
+ then
+ einfo "Running soft upgrade"
+ psql -q -U ${myuser} ${mydb} -f \
+ "${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql 2>\
+ "${logfile}"
+ if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
+ safe_exit "Unable to run soft upgrade."
+ fi
+ fi
+ fi
+
+ if ${is_template}; then
+ einfo "You can now create a spatial database using :"
+ einfo "'createdb -T ${mydb} test'"
+ fi
+}
diff --git a/dev-db/postgis/postgis-1.2.0.ebuild b/dev-db/postgis/postgis-1.2.0.ebuild
new file mode 100644
index 000000000000..fbcdc72b3023
--- /dev/null
+++ b/dev-db/postgis/postgis-1.2.0.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.2.0.ebuild,v 1.1 2007/01/06 19:41:27 djay Exp $
+
+WANT_AUTOCONF="lastest"
+inherit autotools eutils versionator
+
+KEYWORDS="~x86 ~ppc ~amd64"
+
+DESCRIPTION="Geographic Objects for PostgreSQL"
+HOMEPAGE="http://postgis.refractions.net"
+SRC_URI="http://www.postgis.org/download/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="geos proj doc"
+
+RDEPEND=">=dev-db/postgresql-7.4
+ geos? ( sci-libs/geos )
+ proj? ( sci-libs/proj )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-text/docbook-xsl-stylesheets )"
+
+RESTRICT="test"
+
+pkg_setup(){
+ local tmp
+ tmp="$(portageq match / postgis | cut -d'.' -f2)"
+ if [ "${tmp}" != "$(get_version_component_range 2)" ]; then
+ elog "You must soft upgrade your existing postgis enabled databases"
+ elog "using 'emerge --config postgis'."
+ require_soft_upgrade="1"
+ ebeep 2
+ fi
+}
+
+src_unpack(){
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}_xsl.patch"
+
+ eautoconf
+}
+
+src_compile(){
+ local myconf
+ if use geos; then
+ myconf="--with-geos"
+ fi
+
+ if use doc;then
+ myconf=="${myconf} --with-xsl=$(ls "${ROOT}"usr/share/sgml/docbook/* | \
+ grep xsl\- | cut -d':' -f1)"
+ fi
+
+ econf --enable-autoconf \
+ --datadir=/usr/share/postgresql/contrib/ \
+ --libdir=/usr/$(get_libdir)/postgresql/ \
+ --with-docdir=/usr/share/doc/${PF}/html/ \
+ ${myconf} \
+ $(use_with proj) ||\
+ die "Error: econf failed"
+
+ emake || die "Error: emake failed"
+
+ cd topology/
+ emake || die "Unable to build topology sql file"
+
+ if use doc ; then
+ cd "${S}"
+ emake docs || die "Unable to build documentation"
+ fi
+}
+
+src_install(){
+ dodir /usr/$(get_libdir)/postgresql /usr/share/postgresql/contrib/
+ emake DESTDIR="${D}" install || die "emake install failed"
+ cd "${S}/topology/"
+ emake DESTDIR="${D}" install || die "emake install topology failed"
+
+ cd "${S}"
+ dodoc Changelog CREDITS TODO loader/README.* doc/*txt
+
+ docinto topology
+ dodoc topology/{TODO,README}
+ dobin ./utils/postgis_restore.pl
+
+ cd "${S}"
+ if use doc; then
+ emake DESTDIR="${D}" docs-install || die "emake install docs failed"
+ fi
+
+ if [ ! -z "${require_soft_upgrade}" ]; then
+ grep "'C'" -B 4 "${D}"usr/share/postgresql/contrib/lwpostgis.sql |\
+ grep -v "'sql'" > \
+ "${D}"usr/share/postgresql/contrib/load_before_upgrade.sql
+ fi
+}
+
+pkg_postinst() {
+ elog "To create new spatial database use 'emerge --config ${PN}.'"
+}
+
+pkg_config(){
+ myuser="${PG_USER:-postgres}"
+ mydb="${PGDATABASE:-template_gis}"
+
+ is_template=false
+ if [ "${mydb:0:8}" == "template" ];then
+ is_template=true
+ mytype="template database"
+ else
+ mytype="database"
+ fi
+
+ einfo "Create or upgrade a spatial template and database."
+ einfo "Using the user ${myuser} and the ${mydb} ${mytype}."
+ einfo "Please do 'export PG_USER=...' to use another user."
+ einfo "Please do 'export PGDATABASE=...' to set another template/database"
+ einfo "name (templates name have to be prefixed with 'template')."
+
+ logfile=$(mktemp "${ROOT}tmp/error.log.XXXXXX")
+ safe_exit(){
+ eerror "Removing created ${mydb} ${mytype}"
+ dropdb -q -U "${myuser}" "${mydb}" ||\
+ (eerror "${1}"
+ die "Removing old db failed, you must do it manually")
+ eerror "Please read ${logfile} for more information."
+ die "${1}"
+ }
+
+ # if there is not a table or a template existing with the same name, create.
+ if [ -z "$(psql -U "${myuser}" -l | grep "${mydb}")" ]; then
+ einfo
+ einfo "Please hit ENTER if you want to create the ${mydb}"
+ einfo "${mytype} as "${myuser}" user, or Control-C to abort now..."
+ read
+ createdb -q -O ${myuser} -U ${myuser} ${mydb} ||\
+ die "Unable to create the ${mydb} ${mytype} as ${myuser}"
+ createlang -U ${myuser} plpgsql ${mydb}
+ if [ "$?" == 2 ]; then
+ safe_exit "Unable to createlang plpgsql ${mydb}."
+ fi
+ (psql -q -U ${myuser} ${mydb} -f \
+ "${ROOT}"usr/share/postgresql/contrib/lwpostgis.sql &&
+ psql -q -U ${myuser} ${mydb} -f \
+ "${ROOT}"usr/share/postgresql/contrib/spatial_ref_sys.sql) 2>\
+ "${logfile}"
+ if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
+ safe_exit "Unable to load sql files."
+ fi
+ if ${is_template}; then
+ psql -q -U ${myuser} ${mydb} -c \
+ "UPDATE pg_database SET datistemplate = TRUE
+ WHERE datname = '${mydb}';
+ GRANT ALL ON table spatial_ref_sys, geometry_columns TO PUBLIC;
+ VACUUM FREEZE;" || die "Unable to create ${mydb}"
+ fi
+ else
+ einfo
+ einfo "Please hit ENTER if you want to upgrade the ${mydb}"
+ einfo "${mytype} as ${myuser} user, or Control-C to abort now..."
+ read
+ if [ -e "${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql ];
+ then
+ einfo "Updating the dynamic library references"
+ psql -q -U ${myuser} ${mydb} -f \
+ "${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql\
+ 2> "${logfile}"
+ if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
+ safe_exit "Unable to update references."
+ fi
+ fi
+ if [ -e "${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql ];
+ then
+ einfo "Running soft upgrade"
+ psql -q -U ${myuser} ${mydb} -f \
+ "${ROOT}"usr/share/postgresql/contrib/lwpostgis_upgrade.sql 2>\
+ "${logfile}"
+ if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then
+ safe_exit "Unable to run soft upgrade."
+ fi
+ fi
+ fi
+
+ if ${is_template}; then
+ einfo "You can now create a spatial database using :"
+ einfo "'createdb -T ${mydb} test'"
+ fi
+}