diff options
author | Aaron W. Swenson <titanofold@gentoo.org> | 2011-08-23 22:31:43 +0000 |
---|---|---|
committer | Aaron W. Swenson <titanofold@gentoo.org> | 2011-08-23 22:31:43 +0000 |
commit | c5d566a06f995671183fd52662e78f9d52fe6c29 (patch) | |
tree | 7f089858586d4da63556097190d5898c6e3214e8 /dev-db | |
parent | Added ${EPREFIX} where necessary. (diff) | |
download | gentoo-2-c5d566a06f995671183fd52662e78f9d52fe6c29.tar.gz gentoo-2-c5d566a06f995671183fd52662e78f9d52fe6c29.tar.bz2 gentoo-2-c5d566a06f995671183fd52662e78f9d52fe6c29.zip |
Fixes bug 380095 and 380089. Remove files no longer in use.
(Portage version: 2.1.10.3/cvs/Linux i686)
Diffstat (limited to 'dev-db')
-rw-r--r-- | dev-db/postgis/ChangeLog | 9 | ||||
-rw-r--r-- | dev-db/postgis/files/postgis-1.1.1_doc.patch | 16 | ||||
-rw-r--r-- | dev-db/postgis/files/postgis_dbs-1.4 | 49 | ||||
-rw-r--r-- | dev-db/postgis/files/postgis_xsl.patch | 41 | ||||
-rw-r--r-- | dev-db/postgis/postgis-1.4.2.ebuild | 252 |
5 files changed, 309 insertions, 58 deletions
diff --git a/dev-db/postgis/ChangeLog b/dev-db/postgis/ChangeLog index b867b0056ac5..b01ebee56f75 100644 --- a/dev-db/postgis/ChangeLog +++ b/dev-db/postgis/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-db/postgis # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.55 2011/08/07 03:08:39 phajdan.jr Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.56 2011/08/23 22:31:43 titanofold Exp $ + +*postgis-1.4.2 (23 Aug 2011) + + 23 Aug 2011; Aaron W. Swenson <titanofold@gentoo.org> + -files/postgis-1.1.1_doc.patch, +files/postgis_dbs-1.4, + +postgis-1.4.2.ebuild, -files/postgis_xsl.patch: + Fixes bug 380095 and 380089. Remove files no longer in use. 07 Aug 2011; Pawel Hajdan jr <phajdan.jr@gentoo.org> postgis-1.5.3.ebuild: x86 stable wrt bug #376359 diff --git a/dev-db/postgis/files/postgis-1.1.1_doc.patch b/dev-db/postgis/files/postgis-1.1.1_doc.patch deleted file mode 100644 index 3101f1184b65..000000000000 --- a/dev-db/postgis/files/postgis-1.1.1_doc.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- ./doc/Makefile 2005-12-20 10:06:09.000000000 +0100 -+++ ./doc/Makefile 2006-01-19 16:29:50.000000000 +0100 -@@ -69,13 +69,11 @@ - @mkdir -p $(DESTDIR)$(docdir)/postgis - @mkdir -p $(DESTDIR)$(mandir)/man1 - $(INSTALL_DATA) html/postgis.html $(DESTDIR)$(docdir)/postgis/postgis.html -- $(INSTALL_DATA) ../README.postgis $(DESTDIR)$(docdir)/postgis/README.postgis - $(INSTALL_DATA) man/pgsql2shp.1 $(DESTDIR)$(mandir)/man1/pgsql2shp.1 - $(INSTALL_DATA) man/shp2pgsql.1 $(DESTDIR)$(mandir)/man1/shp2pgsql.1 - - uninstall: - rm -f $(DESTDIR)$(docdir)/postgis/postgis.html -- rm -f $(DESTDIR)$(docdir)/postgis/README.postgis - rm -f $(DESTDIR)$(mandir)/man1/shp2pgsql.1 - rm -f $(DESTDIR)$(mandir)/man1/pgsql2shp.1 - diff --git a/dev-db/postgis/files/postgis_dbs-1.4 b/dev-db/postgis/files/postgis_dbs-1.4 new file mode 100644 index 000000000000..fa7ac2542fa9 --- /dev/null +++ b/dev-db/postgis/files/postgis_dbs-1.4 @@ -0,0 +1,49 @@ +# This file is used by 'emerge --config dev-db/postgis' to determine which +# databases it should install to, upgrade or create as a template. + +# Unlike the previous versions of the PostGIS ebuilds, it no longer creates any +# databases except for templates. All databases you list must already exist in +# the cluster. + +# The user to perform the updates as. This user must have the privileges to +# modify all of the databases you list here. +pguser="postgres" + +# By default, no databases will have PostGIS enabled. The databases listed here +# must already exist. The databases you list here must not already be PostGIS +# enabled. Instead, use the upgrade lists further down. +#databases=( "your" "databases" ) + +# Anything you place in this list will create a database and make it a template. +# It will be PostGIS-enabled. To add additional features, add the template names +# to the following lists. +#templates=( "template_postgis" ) + +# The PostGIS enabled templates will be created using this template. +from_template="template1" + +# For a complete set of EPSG coordinate system definition identifiers, you can +# also load the spatial_ref_sys.sql definitions file and populate the +# spatial_ref_sys table. This will permit you to perform ST_Transform() +# operations on geometries. +#epsg_databases=( "enable" "epsg" "on" "these" "databases" ) + +# Add comments to PostGIS functions to the databases in this list. +#comment_databases=( "comments" "on" "these" "databases" ) + +# Any databases you have that are already PostGIS enabled can be listed among +# the following list to perform a soft upgrade. If the soft upgrade fails, +# you'll need to do a hard upgrade. +# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#hard_upgrade + +# Upgrade from PostGIS 1.2 to 1.4 +#upgrade_from_1_2=( "upgrade" "these" "databases" ) + +# Upgrade from PostGIS 1.3 to 1.4 +#upgrade_from_1_3=( "upgrade" "these" "databases" ) + +# Perform a minor upgrade for PostGIS 1.4 +#upgrade_from_1_4=( "upgrade" "these" "databases" ) + +# Uncomment this once you're satisfied with the settings in this file. +#configured="true" diff --git a/dev-db/postgis/files/postgis_xsl.patch b/dev-db/postgis/files/postgis_xsl.patch deleted file mode 100644 index f96a703f0ea0..000000000000 --- a/dev-db/postgis/files/postgis_xsl.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- ./postgis-1.2.0/configure.in 2006-11-10 16:17:10.000000000 +0100 -+++ ./postgis-1.2.0-patched/configure.in 2006-12-19 22:55:03.000000000 +0100 -@@ -323,17 +323,28 @@ - dnl - AC_SUBST(XSLBASE) - XSLBASE= --SEARCHPATH=" -- /usr/share/sgml/docbook/xsl-stylesheets -- /usr/share/xml/docbook/stylesheet/nwalsh -- /usr/share/sgml/docbook/stylesheet/xsl/nwalsh --" --for p in ${SEARCHPATH}; do -- if test -r ${p}/html/docbook.xsl; then -- XSLBASE=${p} -- break -+AC_ARG_WITH(xsl, -+[ --with-xsl=DIR use the xsl stylesheets located in DIR], -+ if test "$with_xsl" = yes; then -+ AC_MSG_ERROR([option --with-xsl requires an argument]) - fi --done -+ if test "$with_xsl" != "no"; then -+ xsl="$with_xsl" -+ else -+ SEARCHPATH=" -+ /usr/share/sgml/docbook/xsl-stylesheets -+ /usr/share/xml/docbook/stylesheet/nwalsh -+ /usr/share/sgml/docbook/stylesheet/xsl/nwalsh -+ " -+ for p in ${SEARCHPATH}; do -+ if test -r "${p}"/html/docbook.xsl; then -+ xsl="${p}" -+ break -+ fi -+ done -+ fi -+) -+XSLBASE="${xsl}" - - dnl - dnl Search for other binaries needed to build docs diff --git a/dev-db/postgis/postgis-1.4.2.ebuild b/dev-db/postgis/postgis-1.4.2.ebuild new file mode 100644 index 000000000000..6940592320e4 --- /dev/null +++ b/dev-db/postgis/postgis-1.4.2.ebuild @@ -0,0 +1,252 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-1.4.2.ebuild,v 1.1 2011/08/23 22:31:43 titanofold Exp $ + +EAPI="4" + +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 gtk" + +RDEPEND=" + || ( + dev-db/postgresql-server:8.4 + dev-db/postgresql-server:8.3 + dev-db/postgresql-server:8.2 + ) + >=sci-libs/geos-3.1 + >=sci-libs/proj-4.5.0 + gtk? ( x11-libs/gtk+:2 ) +" + +DEPEND="${RDEPEND} + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.3 + dev-libs/libxslt + || ( + media-gfx/imagemagick + media-gfx/graphicsmagick[imagemagick] + ) + ) +" + +RESTRICT="test" + +PGIS="$(get_version_component_range 1-2)" + +pkg_setup() { + export PGSLOT="$(postgresql-config show)" + if [[ ${PGSLOT//.} < 82 || ${PGSLOT//.} > 84 ]] ; then + eerror "You must build ${CATEGORY}/${PN} against PostgreSQL between 8.2 and 8.4." + eerror "Set an appropriate slot with postgresql-config." + die "postgresql-config not set to 8.2, 8.3 or 8.4." + fi +} + +src_configure() { + # Configure interprets --without-gui as being the same as --with-gui + if use gtk ; then + econf --with-gui + else + econf + fi +} + +src_compile() { + # Occasionally, builds fail because of out of order compilation. + # Otherwise, it'd be fine. + emake -j1 + cd topology/ + emake -j1 + + if use doc ; then + cd "${S}/doc/" + emake -j1 + fi +} + +src_install() { + emake -j1 DESTDIR="${D}" install + cd topology/ + emake -j1 DESTDIR="${D}" install + + cd "${S}" + dodoc CREDITS TODO loader/README.* doc/*txt + + docinto topology + dodoc topology/{TODO,README} + dobin ./utils/postgis_restore.pl + + if use doc; then + cd doc/html + dohtml -r * + fi + + insinto /usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}/ + doins postgis_comments.sql + + insinto /etc + doins "${FILESDIR}/postgis_dbs-${PGIS}" + + cd "${S}/doc" + doman man/* +} + +pkg_postinst() { + postgresql-config update + + elog "To finish installing or updating PostGIS edit:" + elog " ${EROOT%/}/etc/postgis_dbs" + elog + elog "Then, run:" + elog " emerge --config =${CATEGORY}/${PF}" +} + +pkg_config(){ + source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}" + source "${EROOT%/}/etc/postgis_dbs" + local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}" + + if [[ -n ${configured} ]] ; then + einfon "Password for PostgreSQL user '${pguser}': " + read -s PGPASSWORD + export PGPASSWORD + echo + else + eerror "You must edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "Before running 'emerge --config =${CATEGORY}/${PF}'" + eerror + die "Edit postgis_dbs" + fi + + # The server we work with must be the same slot we built against. + local server_version + server_version=$(psql -U ${pguser} -d postgres -p ${PGPORT} \ + -Aqwtc 'SELECT version()' 2> /dev/null) + if [[ $? = 0 ]] ; then + server_version=$(echo ${server_version} | cut -d " " -f 2 | \ + cut -d "." -f -2 | tr -d .) + if [[ $server_version != ${PGSLOT//.} ]] ; then + unset PGPASSWORD + eerror "Server version must be ${PGSLOT}.x" + die "Server version isn't ${PGSLOT}.x" + fi + else + unset PGPASSWORD + eerror "Is the server running?" + die "Couldn't connect to server." + fi + + local retval + safe_exit() { + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + eend $retval + eerror "All actions could not be performed." + eerror "Read above to see what failed." + eerror "Once you fix the issue, you'll need to edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "As some things may have succeeded." + eerror + die "All actions could not be performed" + } + + local db + for db in ${databases[@]} ; do + ebegin "Performing CREATE LANGUAGE on ${db}" + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit || eend 0 + + ebegin "Enabling PostGIS on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${templates[@]} ; do + ebegin "Creating template database '${db}'" + createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \ + ${db} "PostGIS Template" + retval=$? + [[ $retval != 0 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -c \ + "UPDATE pg_database \ + SET datistemplate = TRUE, datallowconn = TRUE \ + WHERE datname = '${db}'" + retval=$? + [[ $retval != 0 ]] && safe_exit + + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${epsg_databases[@]} ; do + ebegin "Adding EPSG to ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/spatial_ref_sys.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${comment_databases[@]} ; do + ebegin "Adding comments on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_comments.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_2[@]} ; do + ebegin "Upgrading from PostGIS 1.2 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_12_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_3[@]} ; do + ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_4[@]} ; do + ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + # Clean up and make it so the user has to edit postgis_dbs again that + # way this script won't step on any toes due to user error. + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled." + einfo + einfo "To enable other databases, change the default slot:" + einfo " postgresql-config set <slot>" + einfo "Then, emerge this package again:" + einfo " emerge -av =${CATEGORY}/${PF}" +} |