diff options
author | Steve Arnold <nerdboy@gentoo.org> | 2009-06-07 19:17:32 +0000 |
---|---|---|
committer | Steve Arnold <nerdboy@gentoo.org> | 2009-06-07 19:17:32 +0000 |
commit | 9a1d8962241ccaabb893472d38707d8400f45c1a (patch) | |
tree | cf64c4504e0a4ea041a128da56899a26c621b182 /dev-db | |
parent | Stable on alpha, bug #272531 (diff) | |
download | historical-9a1d8962241ccaabb893472d38707d8400f45c1a.tar.gz historical-9a1d8962241ccaabb893472d38707d8400f45c1a.tar.bz2 historical-9a1d8962241ccaabb893472d38707d8400f45c1a.zip |
Updated to current upstream release; includes bug fixes, pgsql updates.
Package-Manager: portage-2.2_rc33/cvs/Linux x86_64
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/postgis/ChangeLog | 8 | ||||
-rw-r--r-- | dev-db/postgis/Manifest | 14 | ||||
-rw-r--r-- | dev-db/postgis/postgis-1.3.6.ebuild | 184 |
3 files changed, 194 insertions, 12 deletions
diff --git a/dev-db/postgis/ChangeLog b/dev-db/postgis/ChangeLog index 35c1a53c9fc3..bcfb14eab959 100644 --- a/dev-db/postgis/ChangeLog +++ b/dev-db/postgis/ChangeLog @@ -1,6 +1,12 @@ # 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.37 2009/03/07 06:27:50 zmedico Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.38 2009/06/07 19:17:32 nerdboy Exp $ + +*postgis-1.3.6 (07 Jun 2009) + + 07 Jun 2009; Steve Arnold <nerdboy@gentoo.org> +postgis-1.3.6.ebuild: + Updated to current upstream release; includes bug fixes, pgsql updates. + Package config updated, but still needs user testing. 07 Mar 2009; Zac Medico <zmedico@gentoo.org> postgis-1.2.0.ebuild, postgis-1.2.1.ebuild, postgis-1.3.1.ebuild, postgis-1.3.3.ebuild: diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest index 3d2446cd1607..1cd4cba51377 100644 --- a/dev-db/postgis/Manifest +++ b/dev-db/postgis/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX postgis-1.1.1_doc.patch 711 RMD160 182a5127d83b18b48c5b013b63427d485f770e36 SHA1 00ad7282712c851fc38c852a8d21a70c5ab2b969 SHA256 4c0b50b26bc22e09d60ac14ad4639880e1fca7c92eb55929d6dc10c0ec4ce691 AUX postgis_xsl.patch 1058 RMD160 052a9578b27edbded5f7885de5efa3595b4c7ac1 SHA1 23e73c1f5eec58e781ba110d04d12bef4093bcee SHA256 ed309baa8aa7e9f10f1006c954f75aa9a4898c820ae46b76d5389c618fb7c08d DIST postgis-1.1.4.tar.gz 1853989 RMD160 8441aba816154ebe743a93334df9df43a15fa87e SHA1 96afd988aeabb92efa0a99b25cc77be29c700dde SHA256 8f7c74c34431120364d623d0d7ef2556ae6c9bb153b9621eb93ebf56a5396018 @@ -8,17 +5,12 @@ DIST postgis-1.2.0.tar.gz 2077747 RMD160 4f2ce71ffd49649cd5712a8bc1a6b822d968797 DIST postgis-1.2.1.tar.gz 2084672 RMD160 b5f8c542a143d460ebc1387a0d9e4b69335e73c3 SHA1 0a47bde414bf691fb624ead37cc119687aba14df SHA256 edb57786b78bf89b72f60607cb38fa10da00354c2c4476c09bb3d88ca3c0d61f 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.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 -MISC ChangeLog 4700 RMD160 4f5b2ca48e0813da663c230f9fd7fb9670457c88 SHA1 653e0ca786a3f373969ea5946aaf83dd11b7c05b SHA256 d24f2390053a091a301862f1b52b0f5061b1ad8e8317a54eaeb781b0ee12ae07 +EBUILD postgis-1.3.6.ebuild 5396 RMD160 09b29542f9bbefdfd1c5ee9f616ff30710fec64a SHA1 2f7fd9720fb3723b3bb0da617159aaebedc04e33 SHA256 1ac2cd6cd7d7fb1173be85f64883d4a337bea073105299fc8d9b9f9449bbe1c5 +MISC ChangeLog 4933 RMD160 f86376f431bc6fc719fab82f97b3d8f313b3556a SHA1 09bfb4ab9a3268cca144df2c8658afb52ae7076a SHA256 fa11674b5ef5beae28a44667cbf87f59163be6ce0b4669951f89b4b366612be8 MISC metadata.xml 403 RMD160 5fbeb16f0092761ac18838b12324116f2e6b916a SHA1 126e862a730f1bc58923a92b19ae81bb29fe6f99 SHA256 7cfb1f265694d5c7614ab20a0f456a251d361a95f8dea002e686e0df62038cfc ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.10 (GNU/Linux) - -iEYEARECAAYFAkmyE/oACgkQ/ejvha5XGaMErgCfUQ3Ov7yLSWfxZIOsV/fuKFvK -fuQAn3+Vf3kY2B0M7DGiNq4conXIK5pf -=2Kv9 ------END PGP SIGNATURE----- diff --git a/dev-db/postgis/postgis-1.3.6.ebuild b/dev-db/postgis/postgis-1.3.6.ebuild new file mode 100644 index 000000000000..da821f451ef1 --- /dev/null +++ b/dev-db/postgis/postgis-1.3.6.ebuild @@ -0,0 +1,184 @@ +# 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.ebuild,v 1.1 2009/06/07 19:17:32 nerdboy 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(){ + 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 "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 + + 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;" \ + || die "Unable to create ${mydb}" + psql -q -U ${myuser} ${mydb} -c \ + "VACUUM FREEZE;" || die "Unable to set VACUUM FREEZE option" + 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 +} |