diff options
author | Patrick Lauer <patrick@gentoo.org> | 2013-11-11 07:24:10 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2013-11-11 07:24:10 +0000 |
commit | 1b98dcd4e4c6ec9bd728847c0b292ac43927cd84 (patch) | |
tree | 2c3af9545ecc00107ce129c32cf3026299b48ea0 /dev-db/postgis | |
parent | Depend on the newly introduced icedtea7 flag for icedtea-web:0 (diff) | |
download | historical-1b98dcd4e4c6ec9bd728847c0b292ac43927cd84.tar.gz historical-1b98dcd4e4c6ec9bd728847c0b292ac43927cd84.tar.bz2 historical-1b98dcd4e4c6ec9bd728847c0b292ac43927cd84.zip |
Bump
Package-Manager: portage-2.2.7/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 | 14 | ||||
-rw-r--r-- | dev-db/postgis/postgis-2.1.1.ebuild | 297 |
3 files changed, 306 insertions, 12 deletions
diff --git a/dev-db/postgis/ChangeLog b/dev-db/postgis/ChangeLog index aa0a12e9c145..7c23f214d609 100644 --- a/dev-db/postgis/ChangeLog +++ b/dev-db/postgis/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-db/postgis # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.86 2013/08/23 11:01:47 titanofold Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.87 2013/11/11 07:23:59 patrick Exp $ + +*postgis-2.1.1 (11 Nov 2013) + + 11 Nov 2013; Patrick Lauer <patrick@gentoo.org> +postgis-2.1.1.ebuild: + Bump 23 Aug 2013; Aaron W. Swenson <titanofold@gentoo.org> +files/postgis-2.0-arflags.patch: diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest index 9b42f83530ac..f9bcd3dc8d2b 100644 --- a/dev-db/postgis/Manifest +++ b/dev-db/postgis/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA256 - AUX postgis-1.5-ldflags.patch 1379 SHA256 dd06c5a6dbf085cee2f4d08bae1c6440511596d21876f955f6b6d2e133c97559 SHA512 47164ecf5a875267d545504f2dec6b52d34161cd9598968d323bc8949d9bdcfd911d20519faca1a1cf3ce67d6dd0a9bc201c6afc0df7881752368c70bd3cb69b WHIRLPOOL 8c9fb2945c696b1208ba047e51869f11ceabccabd34d0cc0f2d345bb17d1d1c27421e5536882488eb64460e1e703823e5d3e6392eed1667448313b0fd7330601 AUX postgis-2.0-arflags.patch 539 SHA256 02429ac34d53c0beaae9d323b65cc85702e46fbf7f83cfd0d0ba7c0f74ba3afa SHA512 e600cf3548fa7c13f7cddec24a0f9078646155b48fb42cd1d41bff311976718ba93bcf7d8361d0494df5e3c6bdff74af5b8b4821026a49618ad3d835383f2785 WHIRLPOOL 506aa9782eac840a9ee21ad2b139035431e2fee2e96b4a8f0900d71bb9aaf693a3f1fae864ad1a19133b4cba362153afda9ef1222cc3bab5e5aaa309772a16e4 AUX postgis-2.0-ldflags.patch 1355 SHA256 8fd78bcee5d20e8735b4b8d034ca762af0d56d42586449e78207fcad2d52d308 SHA512 5e53f5812d8e4f0be72e92632f881ee8520a9fc0a73ae68a9abc494296075fdc82df51573f7a7d68ea4bf6d691d8de4496bb02f7fa78bf7cf73dcc202af6ae71 WHIRLPOOL 606cbb6a229000f18378f2e3a5e6e0e61d767b2c183df0b28927d4ba9b51488cce2ae36adbfa32386f3c2f5bade3ec6bc92d18bf107de1f9a46c0bd320220af8 @@ -14,17 +11,12 @@ DIST postgis-1.4.2.tar.gz 3276515 SHA256 5ce49b83b4c8f62eccb7080157f05299ff0e49c DIST postgis-1.5.8.tar.gz 3948219 SHA256 4896fdae2f814b88c3ca458b7d01d7eca7e9aca021599c817919f131a1b0d804 SHA512 30167c56083dcd2aa764ee82b5b124992bfca2ab4eb8753a80f0fe624b310a060411f0714a8e56a1aebc277c3fdf8e1157d13d91560d5a8ffbc64917e9f3c727 WHIRLPOOL c889546679f69bbfc6d015c245721323c39fc18b6da2cfc28e24c7c736be112274f5c43d7d2ce61ea11a49011123d66d1a8f3c79ec3356227c48325945bff72a DIST postgis-2.0.3.tar.gz 5581619 SHA256 7f865a6fdf19afed7d2f3e7178cd504f7254a9e96f2ce6a07d0ea19edc1668a0 SHA512 e49232a0aebd202a053e2f6cb741551e932e49a8c535fadd22fe15c654e3823c2f43a4c78dc0340cddbbc7f9298651dc16e1737be3bfe0779cc4feede032facc WHIRLPOOL 9c7985ab6d50a4a8ffa4e8fa5ea69c7e365aae8d90a3ea70c978149e5a9efe4a29a29d11db5d2a6b5c830dcd5ba458a3263288f32a5af54665f5d1cab3357415 DIST postgis-2.1.0.tar.gz 6518378 SHA256 fc00481aec904661f3eb11da4305b1666f2040c28b0651de7eac6c22f217b26c SHA512 ed5140aef0e68cb075fc06eaa91733c46d38ce4e01cbf1d97d14ff1a4d447f7cfcaf32924150946c7bb388d334bd5bc9f97753c47c84c16068b9dff6438e8493 WHIRLPOOL a52000a334dd2bb246b665ec7bcd743833c4699cb0cabdd1d9bab3538ee18df6e7b766c06728a97274647f63da1cc130f79902a32cf0621d9a3b8190c8fe596e +DIST postgis-2.1.1.tar.gz 6717940 SHA256 f55acf056362e7e78766bec7a403e02a3b6b087a6d18b4222647b6a932d5c945 SHA512 f85c4d1db32802b3acbda3f4c391ca961bf1301c699a00682265c7a984fbc74ee7b9fbfc5580fc04dff0491921eb6dbe4d8bd73dded216794a4b7f90c3ed650f WHIRLPOOL 807d0ce975b72315a72d4c2ecd192c612b00530a7e542b18429fed0c69cf6cb95285554c34be58e3d2a2c513f436289449dfbe82c7430fba87e901a4bea49c2d EBUILD postgis-1.3.6-r2.ebuild 6017 SHA256 af5177091e4ff0133ab6ad1320da6a7e77975e3cb1972853e705591be54c059f SHA512 58a3a87c8187534c57f5bb7e250e144ad32883a565bc5bda9a035d4bf382860e21485b8f2bc2e5d16235a4b0b5e97b3847aa3b0480a9d552c22a51742bfb535e WHIRLPOOL 1d8c0bc8f29b7bfb73ae56bf5d10f804bdea5342fcb5861f8358295219ef1fcaa62f142d2ea4b952214352e0ba8e10e11e3ba82fa6fe29fa8c5d5cd51f545bfc EBUILD postgis-1.4.2-r2.ebuild 6683 SHA256 86e7e7a070bc058d621658961c8e9baf1eb16a109b973a1dab3e4e9305bb90b2 SHA512 07ec50fc31a5ef2adbe067fc2049a5fc987ed1bf84cb06b3e1ac80075df79f9ff4a17b54d94b1d613ad322aa1497a66271279983f14a5e184450463c20737c24 WHIRLPOOL 7a1a670f9a0c12f55e8d2cd611f5381e24d6fd6dec2c10d0bb8d7121358918545cfddfd3ff582b26ee56a76f3a5ca0c900863331864311f62b32c28948cf2d41 EBUILD postgis-1.5.8.ebuild 6704 SHA256 3faab2cd45dc34a6db623e46c9f62575cc566fe8ebf49ec3d5a634d987e34fb9 SHA512 452941afbd1d2d4789440910aaf02e297f62162c02dad712b8acfca4c4739c760561fe67835abd1dc02c20729e562c001b6fbeabf7df274efbb9266f0f6587eb WHIRLPOOL 89084aced98180bb1f0b60765f0d17b1740ab2f92c53586c780763c295f65e7d7f739e57cf03e35b26930e53af1812bc46dc7359c0fb45e29485335c3132cb35 EBUILD postgis-2.0.3.ebuild 7173 SHA256 23a8a46795272d037cce3c13d24661437d868bc619728db03c54ce5dcd2da455 SHA512 f86a22ee0dc79d68446733988ca4945bd4c0f6164d13e9719b049b774098709a9c40af71f487c90f4e45af09261920e24aa44c745c463c2bad1c7a43ffff3f1e WHIRLPOOL 8d970567789cf660c7496fa04e8287c28e6ceb4bfea782cb6c7d275307e9a6cdc370874ed4c1e4cbee9ec17ffc8e58443935046bef39e40c13733f0416a1b87e EBUILD postgis-2.1.0.ebuild 7783 SHA256 4aad7effe579361bfe1805f2b37b6ce843fc50b459edb1189af3941d4f988e79 SHA512 bac609b91a65c36cb6955670560bcd3f3433cf4d96a27623c572a8eaa3561d8dac60c1e95d82ff0047b177cf69c6cf6724e4b1481c499e20b2df54ef8a5e6f50 WHIRLPOOL 30f19e888bb832724f22d9263e0d50e58837dbc0003a06ce3d2d5f236304fd50bdf449a2f45a95a6d83a251990dc917bb91efd42c3d2c32c294683c856cdd334 -MISC ChangeLog 12526 SHA256 22c7142ad269cc1600de4ce8a4166ca63a941e8173f4b8aaf5dae7282f18045f SHA512 446e1a8fc79e170f8f53786709cda53e1cf3fcf48d08e4d7b36e98d997e17f8ff42b50517e6a032643a1f4a7b0df63486716bf125a56708ac24b5e9c8305efc7 WHIRLPOOL 3ff300887b7653a082bf3bc782055a4d59f0af5a8535c237cea1e2023f674b060919fea0a3929a32edb3e4cd542c4d530e7d527cfc60c4da4b4e5dfac5537641 +EBUILD postgis-2.1.1.ebuild 7903 SHA256 1c2bc63d95c3c1c8b6fa9186277fd0b9eac2a1ae94786e0d8e5a45bd510c8c97 SHA512 d795af60a063693073b4e819bf76df9afa0e5c7adb75f178630a424613d83c4683c1173922dd830c03758bf6d67857c5ea071ac3f47fca252e421a1dc09be352 WHIRLPOOL 57cde91de8967acd3822dc2afa1c8c7c76f6861a3f02f4bd866ce50b4631bbc4118cbc5b1c05f83ea91739f9837f222781d2bc63f386d7af526ca17d66f69c9c +MISC ChangeLog 12634 SHA256 61ceec71a533eec1510a72fb652120667e4f719cea93833e819533bb0c8d8152 SHA512 1b4b0e89e298645a3c64a423d926c554da6186e608554294bff521774e80fc111baa702f38c15e27d6e846129b4e68211e222b6b76d73bce1fb1d6a333679e25 WHIRLPOOL 3a184cd7a23fdd2c53cabdc06361ed7880a6a679aaf2d2e7fc4a6e26f47ea839d1c5549f751f55abd70d1d47b3e7800d7f84b62d5a627807cf9b0b94f49463c7 MISC metadata.xml 481 SHA256 d0ab8dbe26001259f36c968e1d48ad5fda768227d99319cf4302af804a08d5ef SHA512 5299745d72d13ccc71d5f6eee5d343268a59f57ac208621c81643e7f2160b66382c3dd0bf07c97f4cefaebfbbbfc5e11e6b84318f5fc536877f123be2fd7743e WHIRLPOOL 257b7f00ffcd56df202c0e1cd75383bf7ed9b0c854cadb9371a281bbd200b8686c70d3d28cadd06756510f9d6536ee64c636a12f5170ce5c608e82d1148ba9fe ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.20 (GNU/Linux) - -iF4EAREIAAYFAlIXQSEACgkQVxOqA9G7/aD6VAEAlDelNxys3zUDoF1xcV6faFOF -N1jlcH/i+AHOqNq9HMgA/2USTytQbPbLJireaxTFmPC2DUodt0tmX1PT/LR9RTG3 -=Y+Jb ------END PGP SIGNATURE----- diff --git a/dev-db/postgis/postgis-2.1.1.ebuild b/dev-db/postgis/postgis-2.1.1.ebuild new file mode 100644 index 000000000000..e7cb7fc3e3b2 --- /dev/null +++ b/dev-db/postgis/postgis-2.1.1.ebuild @@ -0,0 +1,297 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-2.1.1.ebuild,v 1.1 2013/11/11 07:23:59 patrick Exp $ + +EAPI="5" +POSTGRES_COMPAT=( 9.{0,1,2,3} ) + +inherit autotools eutils versionator + +MY_PV=$(replace_version_separator 3 '') +MY_P="${PN}-${MY_PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Geographic Objects for PostgreSQL" +HOMEPAGE="http://postgis.net" +SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc gtk test" + +RDEPEND=" + || ( + dev-db/postgresql-server:9.3 + dev-db/postgresql-server:9.2 + dev-db/postgresql-server:9.1 + dev-db/postgresql-server:9.0 + ) + dev-libs/json-c + dev-libs/libxml2:2 + >=sci-libs/geos-3.3.8 + >=sci-libs/proj-4.6.0 + >=sci-libs/gdal-1.10.0 + gtk? ( x11-libs/gtk+:2 ) +" + +DEPEND="${RDEPEND} + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.5 + dev-libs/libxslt + || ( + media-gfx/imagemagick[png] + media-gfx/graphicsmagick[imagemagick,png] + ) + ) + virtual/pkgconfig + test? ( dev-util/cunit ) +" + +PGIS="$(get_version_component_range 1-2)" + +REQUIRED_USE="test? ( doc )" + +# Needs a running psql instance, doesn't work out of the box +RESTRICT="test" + +# These modules are built using the same *FLAGS that were used to build +# dev-db/postgresql. The right thing to do is to ignore the current +# *FLAGS settings. +QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" + +# Because developers have been fooled into thinking recursive make is a +# good thing. +MAKEOPTS="-j1" + +postgres_check_slot() { + if ! declare -p POSTGRES_COMPAT &>/dev/null; then + die 'POSTGRES_COMPAT not declared.' + fi + +# Don't die because we can't run postgresql-config during pretend. +[[ "$EBUILD_PHASE" = "pretend" \ + && -z "$(which postgresql-config 2> /dev/null)" ]] && return 0 + + local res=$(echo ${POSTGRES_COMPAT[@]} \ + | grep -c $(postgresql-config show 2> /dev/null) 2> /dev/null) + + if [[ "$res" -eq "0" ]] ; then + eerror "PostgreSQL slot must be set to one of: " + eerror " ${POSTGRES_COMPAT[@]}" + return 1 + fi + + return 0 +} + +pkg_pretend() { + postgres_check_slot || die +} + +pkg_setup() { + postgres_check_slot || die + export PGSLOT="$(postgresql-config show)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.1-ldflags.patch" \ + "${FILESDIR}/${PN}-2.0-arflags.patch" \ + "${FILESDIR}/${PN}-2.1-pkgconfig-json.patch" + + local AT_M4DIR="macros" + eautoreconf +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + econf \ + --with-pgconfig="/usr/lib/postgresql-${PGSLOT}/bin/pg_config" \ + ${myargs} +} + +src_compile() { + # Occasionally, builds fail because of out of order compilation. + # Otherwise, it'd be fine. + emake + emake -C topology + + if use doc ; then + emake comments + emake cheatsheets + emake -C doc html + fi +} + +src_install() { + emake DESTDIR="${D}" install + use doc && emake DESTDIR="${D}" comments-install + emake -C topology DESTDIR="${D}" install + dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + use doc && dohtml -r doc/html/* + + docinto topology + dodoc topology/{TODO,README} + + insinto /etc + doins "${FILESDIR}/postgis_dbs" +} + +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}" + local comment_file + for comment_file in "${postgis_path}"/*_comments.sql ; do + psql -q -U ${pguser} -p ${PGPORT} -d ${db} -f "${comment_file}" + retval=$? + [[ $retval == 0 ]] && continue || safe_exit + done + eend 0 + 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 "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_5[@]} ; 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}" +} |