diff options
author | Patrick Lauer <patrick@gentoo.org> | 2009-09-19 13:48:52 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2009-09-19 13:48:52 +0000 |
commit | f44bdbc93646ff9af90e2b8f53ed8cdc76a93d16 (patch) | |
tree | 17f0d09f4c1049de17d9472d016eca55899d7415 /dev-db/postgis | |
parent | arm stable, bug #280464 (diff) | |
download | historical-f44bdbc93646ff9af90e2b8f53ed8cdc76a93d16.tar.gz historical-f44bdbc93646ff9af90e2b8f53ed8cdc76a93d16.tar.bz2 historical-f44bdbc93646ff9af90e2b8f53ed8cdc76a93d16.zip |
Bump to 1.4.0, fixes #284733
Package-Manager: portage-2.2_rc40/cvs/Linux x86_64
Diffstat (limited to 'dev-db/postgis')
-rw-r--r-- | dev-db/postgis/ChangeLog | 9 | ||||
-rw-r--r-- | dev-db/postgis/Manifest | 4 | ||||
-rw-r--r-- | dev-db/postgis/postgis-1.4.0.ebuild | 187 |
3 files changed, 197 insertions, 3 deletions
diff --git a/dev-db/postgis/ChangeLog b/dev-db/postgis/ChangeLog index 291d0034213d..939562a832ac 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.39 2009/06/13 20:25:04 djay Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.40 2009/09/19 13:48:52 patrick Exp $ + +*postgis-1.4.0 (19 Sep 2009) + + 19 Sep 2009; Patrick Lauer <patrick@gentoo.org> +postgis-1.4.0.ebuild: + Bump to 1.4.0, fixes #284733 *postgis-1.3.6-r1 (13 Jun 2009) diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest index 7b9b48f67c88..c0dac2416aea 100644 --- a/dev-db/postgis/Manifest +++ b/dev-db/postgis/Manifest @@ -6,6 +6,7 @@ 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 +DIST postgis-1.4.0.tar.gz 3143966 RMD160 e5f6cb7ddc78f7c20954b0aa3a3906e31581a1d7 SHA1 454d87021c46c9fa4f657819e31a74b8fc75193a SHA256 71c5ffde54a2ecbb88fbffa12ca18c617ecfe2404fb9049940cd1b7a06a7e38d 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 @@ -13,5 +14,6 @@ EBUILD postgis-1.3.1.ebuild 5292 RMD160 fc0b526f61d26082e4918606a89ec320ed773ef7 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 5083 RMD160 b625e8efb09935f5b7e45a2d044b2eefe714e951 SHA1 a7add04e8af21b9dd2a8166b19b11a0c35d50292 SHA256 f3c85dc93783e08a81b39ca0ed9f67185ee6d67a52ddbfb096515b4675787df9 +EBUILD postgis-1.4.0.ebuild 5498 RMD160 6aea98c838d5e4e76da9bee199b891e57494f3ac SHA1 065fe9bd0975befeadcfee1addcc4ba5d4356214 SHA256 bd5737d60120f65d95cfa5565e7f016005e31ac9bcd05cfacbdeeceb17c10c8c +MISC ChangeLog 5221 RMD160 8e5f9950be08ca9a3884c08e157eef9ec85cd5a3 SHA1 5d989802a7960132caf07acc07fe86d7953bfef6 SHA256 f8107f18ff16f8d56f5931f75bd7c6a5a96a717f02955aa8bcbe4e031c3ab25e MISC metadata.xml 403 RMD160 5fbeb16f0092761ac18838b12324116f2e6b916a SHA1 126e862a730f1bc58923a92b19ae81bb29fe6f99 SHA256 7cfb1f265694d5c7614ab20a0f456a251d361a95f8dea002e686e0df62038cfc diff --git a/dev-db/postgis/postgis-1.4.0.ebuild b/dev-db/postgis/postgis-1.4.0.ebuild new file mode 100644 index 000000000000..3ce4a9dafb11 --- /dev/null +++ b/dev-db/postgis/postgis-1.4.0.ebuild @@ -0,0 +1,187 @@ +# 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.4.0.ebuild,v 1.1 2009/09/19 13:48:52 patrick 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="doc" + +RDEPEND=">=virtual/postgresql-server-8.2 + sci-libs/geos + 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 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} ||\ + die "Error: econf failed" + + emake -j1 || die "Error: emake failed" + + cd topology/ + emake -j1 || die "Unable to build topology sql file" + + if use doc ; then + cd "${S}" + emake -j1 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 +} |