diff options
author | Patrick Lauer <patrick@gentoo.org> | 2010-02-21 10:43:41 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2010-02-21 10:43:41 +0000 |
commit | ad5488625c8d8f1574488018335b729027e6f20d (patch) | |
tree | 6afaa037c662e73d4b152e7d6a4fbe7fb6afb9c0 /dev-db/postgis | |
parent | Stable on amd64 wrt bug #305625 (diff) | |
download | historical-ad5488625c8d8f1574488018335b729027e6f20d.tar.gz historical-ad5488625c8d8f1574488018335b729027e6f20d.tar.bz2 historical-ad5488625c8d8f1574488018335b729027e6f20d.zip |
Old
Package-Manager: portage-2.2_rc63/cvs/Linux x86_64
Diffstat (limited to 'dev-db/postgis')
-rw-r--r-- | dev-db/postgis/ChangeLog | 7 | ||||
-rw-r--r-- | dev-db/postgis/Manifest | 11 | ||||
-rw-r--r-- | dev-db/postgis/postgis-1.1.4.ebuild | 96 | ||||
-rw-r--r-- | dev-db/postgis/postgis-1.2.0.ebuild | 189 | ||||
-rw-r--r-- | dev-db/postgis/postgis-1.2.1.ebuild | 196 | ||||
-rw-r--r-- | dev-db/postgis/postgis-1.3.3.ebuild | 183 | ||||
-rw-r--r-- | dev-db/postgis/postgis-1.3.6.ebuild | 184 |
7 files changed, 7 insertions, 859 deletions
diff --git a/dev-db/postgis/ChangeLog b/dev-db/postgis/ChangeLog index eaf6db92cef7..e60e9802da90 100644 --- a/dev-db/postgis/ChangeLog +++ b/dev-db/postgis/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-db/postgis # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.42 2010/02/21 10:21:16 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.43 2010/02/21 10:43:41 patrick Exp $ + + 21 Feb 2010; Patrick Lauer <patrick@gentoo.org> -postgis-1.1.4.ebuild, + -postgis-1.2.0.ebuild, -postgis-1.2.1.ebuild, -postgis-1.3.3.ebuild, + -postgis-1.3.6.ebuild: + Old *postgis-1.5.0 (21 Feb 2010) diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest index 3ec590429dbe..c35985a5ee1b 100644 --- a/dev-db/postgis/Manifest +++ b/dev-db/postgis/Manifest @@ -1,21 +1,12 @@ 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 -DIST postgis-1.2.0.tar.gz 2077747 RMD160 4f2ce71ffd49649cd5712a8bc1a6b822d968797a SHA1 b6e33324c4c2dddc925e7bac86fb1f9c635f20a6 SHA256 7d8f5782ddca38199a1630765e4a2b6d7d703af0cc28d04685cbc6156177d9cb -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 DIST postgis-1.4.0.tar.gz 3143966 RMD160 e5f6cb7ddc78f7c20954b0aa3a3906e31581a1d7 SHA1 454d87021c46c9fa4f657819e31a74b8fc75193a SHA256 71c5ffde54a2ecbb88fbffa12ca18c617ecfe2404fb9049940cd1b7a06a7e38d DIST postgis-1.5.0.tar.gz 3752211 RMD160 815c445d7ab628254130d2277648913e945b2af9 SHA1 8addacea2439a52f07735b58268dcef8df46912c SHA256 f79e8f740d48367e5481183c33e09b860c2c4466b196ea99c5601db287e2d324 -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 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 EBUILD postgis-1.4.0.ebuild 5537 RMD160 eb509bd83792d06c48214a82ae22739de5c350a1 SHA1 41453d252cc88ba512bbf81129bf36e9e3bae5a8 SHA256 cdb775323ef36d2a17ccfa5afadee6652665acb698d3ed4fc8aaf3140b03d0e3 EBUILD postgis-1.5.0.ebuild 5557 RMD160 91de4cb19eb03ceff71ed9dba58a132ae5ce5ff3 SHA1 d338c150882f5085ef9888d4b7c96bd62a6b8c70 SHA256 ef1e835567dae1b40e9b11f283edb6248d097bfe3704a44b251e69711531c035 -MISC ChangeLog 5521 RMD160 17065ef1e66f9a7b7b631ba864f885b58009b0d1 SHA1 2d8a48d4345a31c3d08cf91f4ce8db85091fca43 SHA256 c0f5e08b59b78d578e56dbde53c268ffc0837ffade5b655449ebd43496ec1dd4 +MISC ChangeLog 5697 RMD160 a8ed44e8067f7fab2f464f4653fcf63d770c51af SHA1 2fc86222aaaafd1e00114dc7eda310d29d00869c SHA256 2a94d220965a0ca3977d1133a5531912efc7b1724933227bc514e24a7630e8de 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 deleted file mode 100644 index ace9758ea92b..000000000000 --- a/dev-db/postgis/postgis-1.1.4.ebuild +++ /dev/null @@ -1,96 +0,0 @@ -# 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.6 2009/06/13 20:25:04 djay Exp $ - -inherit autotools eutils - -KEYWORDS="~amd64 ppc x86" - -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" - -DEPEND=">=virtual/postgresql-server-7.4 - app-text/docbook-xsl-stylesheets - geos? ( sci-libs/geos ) - proj? ( sci-libs/proj ) - sys-devel/autoconf" -RDEPEND=">=virtual/postgresql-server-7.4 - geos? ( sci-libs/geos ) - proj? ( sci-libs/proj )" - -RESTRICT="test" - -pkg_setup(){ - tmp="$(portageq match / ${CATEGORY}/${PN})" - if [ "${tmp}" != "${CATEGORY}/${PF}" ]; then - ewarn "Don't forget to dump your databases with -Fc options before" - ewarn "upgrading postgis." - ewarn "(see http://postgis.refractions.net/docs/ch02.html#upgrading)" - ebeep 4 - fi -} - -src_unpack(){ - unpack ${A} - cd "${S}" - epatch "${FILESDIR}/${PN}-1.1.1_doc.patch" - - local xslv - xslv="$(ls /usr/share/sgml/docbook/ | grep xsl\-)" - einfo "doc will be build with template :" - einfo "${xslv}" - sed "s:xsl-stylesheets:${xslv}:" -i configure.in || die "xsl-stylesheets pb" - - eautoconf -} - -src_compile(){ - econf \ - --enable-autoconf \ - --datadir=/usr/share/postgresql/contrib/ \ - --libdir=/usr/$(get_libdir)/postgresql/ \ - --with-docdir=/usr/share/doc/${PF}/html/ \ - $(use_with geos) \ - $(use_with proj)\ - || die "Error: econf failed" - - emake || die "Error: emake failed" - - emake docs || die "Unable to build documentation" - cd topology/ - emake || die "Unable to build topology sql file" -} - -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 CHANGES CREDITS README.postgis TODO loader/README.* \ - doc/*txt - - docinto topology - dodoc topology/{TODO,README} - - cd "${S}" - emake DESTDIR="${D}" docs-install || die "emake install docs failed" - - dobin ./utils/postgis_restore.pl -} - -pkg_postinst() { - einfo "To create your first postgis database use the following commands :" - einfo " # su postgres" - einfo " # createdb test" - einfo " # createlang plpgsql test" - einfo " # psql -d test -f /usr/share/postgresql/contrib/lwpostgis.sql" - einfo " # psql -d test -f /usr/share/postgresql/contrib/spatial_ref_sys.sql" - einfo "For more informations see : http://www.postgis.org/documentation.php" - einfo "(For french user only see http://postgis.fr)" -} diff --git a/dev-db/postgis/postgis-1.2.0.ebuild b/dev-db/postgis/postgis-1.2.0.ebuild deleted file mode 100644 index 46ba3aa1a630..000000000000 --- a/dev-db/postgis/postgis-1.2.0.ebuild +++ /dev/null @@ -1,189 +0,0 @@ -# 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.2.0.ebuild,v 1.7 2009/03/07 06:27:50 zmedico Exp $ - -inherit autotools eutils versionator - -KEYWORDS="~amd64 ~ppc ~x86" - -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=">=virtual/postgresql-server-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 / ${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_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 /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.1.ebuild b/dev-db/postgis/postgis-1.2.1.ebuild deleted file mode 100644 index 5f40120191f6..000000000000 --- a/dev-db/postgis/postgis-1.2.1.ebuild +++ /dev/null @@ -1,196 +0,0 @@ -# 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.2.1.ebuild,v 1.3 2009/03/07 06:27:50 zmedico Exp $ - -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=">=virtual/postgresql-server-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 / ${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_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(){ - PGUSER="${PGUSER:-postgres}" - PGDATABASE="${PGDATABASE:-template_postgis}" - - is_template=false - if [ "${PGDATABASE: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 ${PGUSER} and the ${PGDATABASE} ${mytype}." - einfo "Please do 'export PGUSER=...' 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 || (eerror "${1}" - die "Removing old db failed, you must do it manually") - eerror "Please see ${logfile} for more information." - die "${1}" - } - - # if there is not a table or a template existing with the same name, create. - psql -ql 2> ${logfile} - if [ "$?" == 2 ];then - die "Unable to access databases server using the ${PGUSER} user" - fi - PGDBS="$(psql template1 -Atc \ - 'select 1 from pg_tables where tablename=${PGDATABASE};')" - if [ "$(psql -l | grep "${PGDATABASE}")" != 1 ]; then - einfo - einfo "Please hit ENTER if you want to create the ${PGDATABASE}" - einfo "${mytype} as "${PGUSER}" user, or Control-C to abort now..." - read - einfo "Creating the ${mytype} ${PGDATABASE}." - createdb -q -O ${PGUSER} ||\ - die "Unable to create the ${mydb} ${mytype} as ${myuser}" - createlang plpgsql - if [ "$?" == 2 ]; then - safe_exit "${myuser} not allowed to createlang plpgsql ${mydb}." - fi - einfo "Loading PostGIS files into ${PGDATABASE}." - (psql -q -f \ - "${ROOT}"usr/share/postgresql/contrib/lwpostgis.sql && - psql -q -f \ - "${ROOT}"usr/share/postgresql/contrib/spatial_ref_sys.sql) 2>\ - "${logfile}" - if [ "$(grep -c ERROR "${logfile}")" \> 0 ]; then - safe_exit "Unable to load the sql files." - fi - if ${is_template}; then - einfo "Configure ${PGDATABASE} as a ${mytype}" - psql -q -c \ - "UPDATE pg_database SET datistemplate=TRUE, datallowconn=FALSE - WHERE datname = '${PGDATABASE}'; - 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 -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 -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 ${PGDATABASE} <db_name>" - fi -} diff --git a/dev-db/postgis/postgis-1.3.3.ebuild b/dev-db/postgis/postgis-1.3.3.ebuild deleted file mode 100644 index 539f113f03b1..000000000000 --- a/dev-db/postgis/postgis-1.3.3.ebuild +++ /dev/null @@ -1,183 +0,0 @@ -# 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.5 2009/06/13 20:25:04 djay Exp $ - -inherit eutils versionator - -KEYWORDS="~amd64 ~ppc ~x86" - -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=">=virtual/postgresql-server-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 / ${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 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;"\ - || die "Unable to create ${mydb}" - psql -q -U ${myuser} ${mydb} "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.3.6.ebuild b/dev-db/postgis/postgis-1.3.6.ebuild deleted file mode 100644 index da821f451ef1..000000000000 --- a/dev-db/postgis/postgis-1.3.6.ebuild +++ /dev/null @@ -1,184 +0,0 @@ -# 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 -} |