summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorGérald Fenoy <djay@gentoo.org>2009-06-13 20:25:04 +0000
committerGérald Fenoy <djay@gentoo.org>2009-06-13 20:25:04 +0000
commit40aac2805c6d080bd443469752643e44c3267bdf (patch)
tree12dae84d8175dbce322599d746b0cbd366c69e6f /dev-db
parent--as-needed users, this one is for you. Also remove last 1.4x versions (diff)
downloadhistorical-40aac2805c6d080bd443469752643e44c3267bdf.tar.gz
historical-40aac2805c6d080bd443469752643e44c3267bdf.tar.bz2
historical-40aac2805c6d080bd443469752643e44c3267bdf.zip
Updated 1.3.6 version icluding fixes for bug #273960 #246843. Some
typos. Package-Manager: portage-2.1.6.13/cvs/Linux i686
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/postgis/ChangeLog7
-rw-r--r--dev-db/postgis/Manifest9
-rw-r--r--dev-db/postgis/postgis-1.1.4.ebuild7
-rw-r--r--dev-db/postgis/postgis-1.3.1.ebuild4
-rw-r--r--dev-db/postgis/postgis-1.3.3.ebuild10
-rw-r--r--dev-db/postgis/postgis-1.3.6-r1.ebuild192
6 files changed, 213 insertions, 16 deletions
diff --git a/dev-db/postgis/ChangeLog b/dev-db/postgis/ChangeLog
index bcfb14eab959..291d0034213d 100644
--- a/dev-db/postgis/ChangeLog
+++ b/dev-db/postgis/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-db/postgis
# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.38 2009/06/07 19:17:32 nerdboy Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.39 2009/06/13 20:25:04 djay Exp $
+
+*postgis-1.3.6-r1 (13 Jun 2009)
+
+ 13 Jun 2009; <djay@gentoo.org> +postgis-1.3.6-r1.ebuild:
+ New ebuild to solve the databases upgrade issue (#273960)
*postgis-1.3.6 (07 Jun 2009)
diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest
index 1cd4cba51377..7b9b48f67c88 100644
--- a/dev-db/postgis/Manifest
+++ b/dev-db/postgis/Manifest
@@ -6,11 +6,12 @@ DIST postgis-1.2.1.tar.gz 2084672 RMD160 b5f8c542a143d460ebc1387a0d9e4b69335e73c
DIST postgis-1.3.1.tar.gz 2148125 RMD160 f199505dc04bd2caa0400c9235bbf1aecfe14b6f SHA1 db8e954dfc19e73c2331358a396e2064d1333a72 SHA256 5ce999ae638c1c9f75a7cf85d416eac71cc2d6f668132c2b6a3ae6a12075555c
DIST postgis-1.3.3.tar.gz 2089526 RMD160 4e7d59672486a990f760e7cff2deb49a1332d7cc SHA1 12b0da709360f67340f88774b70cf3bac65fcc24 SHA256 2a3ffb4ffbde3b4e87b99ef5351efa837d60b84ecb34d40c0dcab8e776d15440
DIST postgis-1.3.6.tar.gz 2227317 RMD160 1f1797c8063b40653707be404bdebdc2573bbfea SHA1 1d4c34a31994b75ef79cf139543fc80fe0bd4438 SHA256 d3b04d4a3439596a1f6368b0627f21762347cef1e0694d5471ef17c6a3b7d144
-EBUILD postgis-1.1.4.ebuild 2693 RMD160 ecc850b462b45a710191f44fb13ef4a99f945d0d SHA1 d2be8d5ab0c0542cd4de97b7d750041c80087b2b SHA256 6f4b485c1e238fec52382f6e3923a7a10fe7aac9091aba5047171a0a0611cf59
+EBUILD postgis-1.1.4.ebuild 2666 RMD160 1d3ae69e2a76a79b8bff2b906673b6bdf3449df3 SHA1 d78634c3b924cafcf17668c0522b08f83561fa00 SHA256 ce5e22308194e87202c606c85c6f26efeda1089ef01d004dff982e7bce63c787
EBUILD postgis-1.2.0.ebuild 5391 RMD160 8fcb1986e3f4cb6f043ec657e0ff9a7aa3d2e62b SHA1 36d12213f4f95c10e7849bceffae512fc8208763 SHA256 13795df452ae3e6d72912570240ba454e40bb6b41d8760c04c3787b0c748b8da
EBUILD postgis-1.2.1.ebuild 5587 RMD160 100c3865e4e29f48985bb6364270cde1f995b109 SHA1 8c1d2b03a9151a820eca105ec69b3bd459375259 SHA256 e50da7752f9520cea91d5d926472f66b7a7a3807671f2f772adec5b4ffce7850
-EBUILD postgis-1.3.1.ebuild 5305 RMD160 4bd1d7462709f80a168f803afbb318ae49f45b98 SHA1 de2f523536e75f6df5e536a1db7a143840e365a3 SHA256 e9db8f929fd024e2bd6f673fa1f78c25656fd958afa4c8801b10164702147d92
-EBUILD postgis-1.3.3.ebuild 5308 RMD160 5b2a42f9ca8178d85185a603b441366104d63e87 SHA1 f7cea85a4e5645d3200afbcc07d6a7205638c406 SHA256 2e5249bafef436ddfad3dde4e3ced983df8cc6c64b6440bd75a527d14b74eb2c
+EBUILD postgis-1.3.1.ebuild 5292 RMD160 fc0b526f61d26082e4918606a89ec320ed773ef7 SHA1 284181900e238b3a1fe61d150d08c3bb9a91ddf1 SHA256 c00e11c8389c85d43096b768085917701720626a977cfe6734f8d8855b616a3f
+EBUILD postgis-1.3.3.ebuild 5370 RMD160 69809c1c15b92333dbbde28e82462979aaa0a005 SHA1 fcbf4765184998925a61ae593f2225e6c10fefed SHA256 00e41fabcb4765383b3374caac4f10788eff18a8c341ad98c20e35973eef4dc3
+EBUILD postgis-1.3.6-r1.ebuild 5584 RMD160 5b9ed4739e6e3b9c99adc54b32814649552594f2 SHA1 c569daa1826b774d5397634a005593243c35ce74 SHA256 ec0c917b3ef58e775e666bdaeb6a2597b1042337b83952fc2ef4c3a6ae2b5b64
EBUILD postgis-1.3.6.ebuild 5396 RMD160 09b29542f9bbefdfd1c5ee9f616ff30710fec64a SHA1 2f7fd9720fb3723b3bb0da617159aaebedc04e33 SHA256 1ac2cd6cd7d7fb1173be85f64883d4a337bea073105299fc8d9b9f9449bbe1c5
-MISC ChangeLog 4933 RMD160 f86376f431bc6fc719fab82f97b3d8f313b3556a SHA1 09bfb4ab9a3268cca144df2c8658afb52ae7076a SHA256 fa11674b5ef5beae28a44667cbf87f59163be6ce0b4669951f89b4b366612be8
+MISC ChangeLog 5083 RMD160 b625e8efb09935f5b7e45a2d044b2eefe714e951 SHA1 a7add04e8af21b9dd2a8166b19b11a0c35d50292 SHA256 f3c85dc93783e08a81b39ca0ed9f67185ee6d67a52ddbfb096515b4675787df9
MISC metadata.xml 403 RMD160 5fbeb16f0092761ac18838b12324116f2e6b916a SHA1 126e862a730f1bc58923a92b19ae81bb29fe6f99 SHA256 7cfb1f265694d5c7614ab20a0f456a251d361a95f8dea002e686e0df62038cfc
diff --git a/dev-db/postgis/postgis-1.1.4.ebuild b/dev-db/postgis/postgis-1.1.4.ebuild
index 9b8005dd8019..ace9758ea92b 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-2008 Gentoo Foundation
+# Copyright 1999-2009 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.5 2008/05/21 15:57:24 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.1.4.ebuild,v 1.6 2009/06/13 20:25:04 djay Exp $
inherit autotools eutils
@@ -49,8 +49,6 @@ src_unpack(){
}
src_compile(){
- cd "${S}"
-
econf \
--enable-autoconf \
--datadir=/usr/share/postgresql/contrib/ \
@@ -68,7 +66,6 @@ src_compile(){
}
src_install(){
- cd "${S}"
dodir /usr/$(get_libdir)/postgresql /usr/share/postgresql/contrib/
emake DESTDIR="${D}" install || die "emake install failed"
cd "${S}/topology/"
diff --git a/dev-db/postgis/postgis-1.3.1.ebuild b/dev-db/postgis/postgis-1.3.1.ebuild
index 11e2b06d3931..1058b3b5cb11 100644
--- a/dev-db/postgis/postgis-1.3.1.ebuild
+++ b/dev-db/postgis/postgis-1.3.1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.3.1.ebuild,v 1.6 2009/03/07 06:27:50 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.3.1.ebuild,v 1.7 2009/06/13 20:25:04 djay Exp $
-inherit autotools eutils versionator
+inherit eutils versionator
KEYWORDS="amd64 ppc x86"
diff --git a/dev-db/postgis/postgis-1.3.3.ebuild b/dev-db/postgis/postgis-1.3.3.ebuild
index 62f52065661f..539f113f03b1 100644
--- a/dev-db/postgis/postgis-1.3.3.ebuild
+++ b/dev-db/postgis/postgis-1.3.3.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.3.3.ebuild,v 1.4 2009/03/07 06:27:50 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.3.3.ebuild,v 1.5 2009/06/13 20:25:04 djay Exp $
-inherit autotools eutils versionator
+inherit eutils versionator
KEYWORDS="~amd64 ~ppc ~x86"
@@ -144,8 +144,10 @@ pkg_config(){
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}"
+ GRANT ALL ON table spatial_ref_sys, geometry_columns TO PUBLIC;"\
+ || die "Unable to create ${mydb}"
+ psql -q -U ${myuser} ${mydb} "VACUUM FREEZE;" || \
+ die "Unable to create ${mydb}"
fi
else
einfo
diff --git a/dev-db/postgis/postgis-1.3.6-r1.ebuild b/dev-db/postgis/postgis-1.3.6-r1.ebuild
new file mode 100644
index 000000000000..9bbbbc517ce2
--- /dev/null
+++ b/dev-db/postgis/postgis-1.3.6-r1.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.3.6-r1.ebuild,v 1.1 2009/06/13 20:25:04 djay Exp $
+
+EAPI="1"
+
+inherit eutils versionator
+
+DESCRIPTION="Geographic Objects for PostgreSQL"
+HOMEPAGE="http://postgis.refractions.net"
+SRC_URI="http://postgis.refractions.net/download/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="geos proj doc"
+
+RDEPEND=">=virtual/postgresql-server-8.0
+ geos? ( sci-libs/geos )
+ proj? ( sci-libs/proj )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-text/docbook-xsl-stylesheets )"
+
+RESTRICT="test"
+
+pkg_setup(){
+ if [ ! -z "${PGUSER}" ]; then
+ eval unset PGUSER
+ fi
+ if [ ! -z "${PGDATABASE}" ]; then
+ eval unset PGDATABASE
+ fi
+ local tmp
+ tmp="$(portageq match / ${CATEGORY}/${PN} | cut -d'.' -f2)"
+ if [ "${tmp}" != "$(get_version_component_range 2)" ]; then
+ elog "You must soft upgrade your existing postgis enabled databases"
+ elog "by adding their names in the ${ROOT}conf.d/postgis_dbs file"
+ elog "then using 'emerge --config postgis'."
+ require_soft_upgrade="1"
+ ebeep 2
+ fi
+}
+
+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 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
+
+ echo "template_gis" > postgis_dbs
+ doconfd postgis_dbs
+
+ 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 (upgrade) spatial databases add their names in the"
+ elog "${ROOT}conf.d/postgis_dbs file, then use 'emerge --config postgis'."
+}
+
+pkg_config(){
+ einfo "Create or upgrade a spatial templates and databases."
+ einfo "Please add your databases names into ${ROOT}conf.d/postgis_dbs"
+ einfo "(templates name have to be prefixed with 'template')."
+ for i in $(cat "${ROOT}etc/conf.d/postgis_dbs"); do
+ source "${ROOT}"etc/conf.d/postgresql
+ PGDATABASE=${i}
+ eval set PGDATABASE=${i}
+ myuser="${PGUSER:-postgres}"
+ mydb="${PGDATABASE:-template_gis}"
+ eval set PGUSER=${myuser}
+
+ is_template=false
+ if [ "${mydb:0:8}" == "template" ];then
+ is_template=true
+ mytype="template database"
+ else
+ mytype="database"
+ fi
+
+ einfo
+ einfo "Using the user ${myuser} and the ${mydb} ${mytype}."
+
+ 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
+ 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;" \
+ || die "Unable to create ${mydb}"
+ psql -q -U ${myuser} ${mydb} -c \
+ "VACUUM FREEZE;" || die "Unable to set VACUUM FREEZE option"
+ fi
+ else
+ if [ -e "${ROOT}"usr/share/postgresql/contrib/load_before_upgrade.sql ];
+ then
+ einfo "Updating the dynamic library references"
+ psql -q -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
+ done
+}