summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorAaron Swenson <titanofold@gentoo.org>2014-11-05 16:09:18 +0000
committerAaron Swenson <titanofold@gentoo.org>2014-11-05 16:09:18 +0000
commit46566a822349648f36aab1b417894aee342936f8 (patch)
tree4ee48bceaf917346757f4c0016552ac9ea6c3d14 /dev-db
parentFix bugs 361299 and 524052. (diff)
downloadhistorical-46566a822349648f36aab1b417894aee342936f8.tar.gz
historical-46566a822349648f36aab1b417894aee342936f8.tar.bz2
historical-46566a822349648f36aab1b417894aee342936f8.zip
Version bump. Fixes bugs 464392, 507708, and 520694.
Package-Manager: portage-2.2.8-r2/cvs/Linux x86_64 Manifest-Sign-Key: 0xD1BBFDA0
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/postgis/ChangeLog9
-rw-r--r--dev-db/postgis/Manifest13
-rw-r--r--dev-db/postgis/files/postgis-2.1.4-pkgconfig-json.patch122
-rw-r--r--dev-db/postgis/postgis-2.0.6.ebuild267
-rw-r--r--dev-db/postgis/postgis-2.1.4.ebuild294
5 files changed, 700 insertions, 5 deletions
diff --git a/dev-db/postgis/ChangeLog b/dev-db/postgis/ChangeLog
index 33648bff0f1a..6f6b3087e589 100644
--- a/dev-db/postgis/ChangeLog
+++ b/dev-db/postgis/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-db/postgis
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.93 2014/11/03 11:32:12 titanofold Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.94 2014/11/05 16:09:12 titanofold Exp $
+
+*postgis-2.1.4 (05 Nov 2014)
+*postgis-2.0.6 (05 Nov 2014)
+
+ 05 Nov 2014; Aaron W. Swenson <titanofold@gentoo.org> +postgis-2.0.6.ebuild,
+ +postgis-2.1.4.ebuild, +files/postgis-2.1.4-pkgconfig-json.patch:
+ Version bump. Fixes bugs 464392, 507708, and 520694.
03 Nov 2014; Aaron W. Swenson <titanofold@gentoo.org> postgis-2.0.3.ebuild,
postgis-2.1.0.ebuild, postgis-2.1.1.ebuild:
diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest
index 8dc6881388c2..890f4e15d941 100644
--- a/dev-db/postgis/Manifest
+++ b/dev-db/postgis/Manifest
@@ -7,20 +7,25 @@ AUX postgis-2.0-ldflags.patch 1355 SHA256 8fd78bcee5d20e8735b4b8d034ca762af0d56d
AUX postgis-2.0-pkgconfig-json.patch 3517 SHA256 b2658bc9b679b19ec0c04f12de04e7eb02f6669da01929734c4852735cd577c1 SHA512 c57bbd386983857be3808e7b1267fd491758b84f7c5795947ae039fea40cd8a9f0836d585dc6f3204edab17848e7826b7812aa90638c3d3b4c22aa916ddd925d WHIRLPOOL 2c1c990916db26d5e5fbe21c582912a2d64bc3af40f5a6bd37161df692aa78093a5d3644df5bb2b49b70819b91491076bc5905c99a2bbf5d07860f97aaf29f1f
AUX postgis-2.1-ldflags.patch 1367 SHA256 30b56a31599a276f9d82658e12744f7aff59eafc1401a6b6ecfe5edca948be56 SHA512 7bfce943698b8ba41fea5606c1a3dc43b2cc11daeb8e81e432701c2cebf300984ff54e8c8817e245ec4195a85b8d28bcfc6b30d111bd6c05341c93e7c769ab35 WHIRLPOOL 9743cdc192ab12ea0a6efc90e4915e6798dee49117d47246aa0405abb1698aba7e276198d1147b8b535abc9b8e4e59ba5f1f8b062062e4d23b91d610358cb9b2
AUX postgis-2.1-pkgconfig-json.patch 4659 SHA256 cc62f82f0eac1e84095ca597e9f4767c7d09b5a871d9bc90d96a52b5f326065a SHA512 5eb76202170c431f253652a9bbc52f4e33e03777cc0f669da3c47b5c9bc9f4420dc0e9dc7f98a8ea333d08eb3fd36cbfc818e8c59152a5471742aa6190c5a929 WHIRLPOOL ce01e45bc6ad6907ee7c21b131228891cded8d62467cd433dd36808d9958d69a63229230239a75295e7087fb45f79b806e929e16a24f52ad37e1a6d58873ead4
+AUX postgis-2.1.4-pkgconfig-json.patch 4276 SHA256 0a8347d9427e10c9a0d2554f862ecbbacd1bbe1c6f9373ae4c9721ffe8475b00 SHA512 7439b2221bee6e3940485b1964edda10d320493b3dc8b86e1579824a9f0c6b5ff21a3d444077fa331096a9e0e4442df2c792d8a51c79dcf6c680404cbebf9275 WHIRLPOOL 3e4d05566fd38dd7e6c25f39299abf7add7247f558fd0243a0559b664c9fb0a946d45f5e9daf19f43c68fbfe85dfb128bef9e2299d20121058b4b3b5ee3eee03
AUX postgis_dbs 2096 SHA256 dafde4a1d1d95e18facb3287baddab3c1c116933498c310438c91dbd736833ec SHA512 5a11a3ce0153461f363d1b9a393dd10392e123c7b18b20610a5e26f2c7c6ed258a1517082a244c6ab5de40d439bc8a370848a0177c3c2ffcffc67a24fca8e66a WHIRLPOOL 8e4c34ac428c5ac887b414334fe80424b09845585596be1affaf69a9205af7dd183198eed44fa0406074ad1bcc133db8a9a13acd4a0882945b32ec8e0a480b61
AUX postgis_dbs-1.4 2096 SHA256 287224c16cbd286c75098e786235ad07226217fbcf76071279081e6cb1d1add1 SHA512 520711a6165dbb08c7ce86001f885340b5dbc54efc2a863726b09d93db9e0d888c21fa5b466506456cacadd55db8531284c5b85f484c599d313f4d9aac56c1ef WHIRLPOOL 1b87d8edf109dd76a54a8c7819731a843e7ec139bcaef4b69605304a336eb3d558e656c1adf06ca487f1c5624c542634be7b885dd888e5ef4ec89e2970d38195
DIST postgis-2.0.3.tar.gz 5581619 SHA256 7f865a6fdf19afed7d2f3e7178cd504f7254a9e96f2ce6a07d0ea19edc1668a0 SHA512 e49232a0aebd202a053e2f6cb741551e932e49a8c535fadd22fe15c654e3823c2f43a4c78dc0340cddbbc7f9298651dc16e1737be3bfe0779cc4feede032facc WHIRLPOOL 9c7985ab6d50a4a8ffa4e8fa5ea69c7e365aae8d90a3ea70c978149e5a9efe4a29a29d11db5d2a6b5c830dcd5ba458a3263288f32a5af54665f5d1cab3357415
+DIST postgis-2.0.6.tar.gz 5651448 SHA256 438fc9cf8d008c537ed2d6776bc30e726eb1f9a85247df945c2beccc42f33489 SHA512 c838b68b03d08bfd427d8a78c67754697a9409d6333e23e4bf8b63efc4320369258f14a03ba9e21ca4bd967fbfdf99d02720fa370170d4d34c20e31ad47bbf0c WHIRLPOOL 5795385bd146d280c0a8108ccb704417bf206ed80bfa9383c793d1313a3029186d26799438e21b3d6920e92d8859de947e61c1cd55cd0cc275ad800ef128f542
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
+DIST postgis-2.1.4.tar.gz 6854492 SHA256 cd73c2a38428c8736f6cae73b955aee0bd42f9ca4fd8d93c1af464524cb100fc SHA512 1d7dd2547fe9819addea0c9dfb4f4c78f30593af21f7cf05c4e40c2684ea3e04ad50c1937ba72172c69df713384c866e6a336b6cab733c9dd0f273f41df568d2 WHIRLPOOL f685cb2e991319b1a2f7a54ce050217d8ea636c02491fca2dafb1a2f66fe3548d4daff6d3de67925a700d9de42af29dfc4af0d26727e77f969a100a1fe964567
EBUILD postgis-2.0.3.ebuild 7188 SHA256 82363577ee497a8b8155b362a0b9617f3786f1f1fb4f07e54de0761b916d59f6 SHA512 6c05a1537cf8e4cbcbe2203a3a05af31d6309d315ab685b4882ee041adf9258733faa88af4748a087a48d1749af544b0533d3ffd77c7f77913994a57292e9bb4 WHIRLPOOL 1e3dfc9043891c5f6d88b5e911dd74f7a606ca9a4c12b20462043a8f218056ff5d68c7b2c725584e66569e1a3471492c8373d28af8813f880407b929ffd9da0b
+EBUILD postgis-2.0.6.ebuild 7245 SHA256 9487ceaef9876671c5713197534d2790fef0da46d67e7def87bee2e3cda72594 SHA512 0d5f3c961b08d2131f6cd4513a8af93931ecf59bdb6562b455f4ae29ef9c253db2e6e0d49d0a04cdbe8d9f9f237d640b7840fd6944358e0294b6cc53d50eb395 WHIRLPOOL c49597e246e1d9418ca3c17608cead7a22d7838e9117623c66bec15a441ba2b76104e11652fb31c0ce4dfd9c91067fa14b96a2fb09bed90c1159f7f6b5da2997
EBUILD postgis-2.1.0.ebuild 7791 SHA256 9eb718523c8ab27c3ebaa62023d5af1db52e2c147f000f3ca0b6c6fb1f8ce001 SHA512 fd286e608350d6e17908c685a751ce550393d85b4a50bd822226d13ffc0a05775a34a2f4bccdbf87807766e405baea9f1e816ee0a60bcb3b1b7f77714bb8ae95 WHIRLPOOL 676b896e122ac6adbade50bedba2280293e6b154188381c0e79f218708801211ff8532e19018671e747d86a87cdb2bff4ff27f4473f02dcd97d1b2ee7e426eb3
EBUILD postgis-2.1.1.ebuild 7955 SHA256 b7afc5f5ec12b8cb0c7dc810525365135241d16ddf3873db660d1106056d2c44 SHA512 cfff7d798a843217384175134fd7beb6bbbc056641da1c10c4537c4cf0276991c7b4fe94795f013d90faa9c9b287866d4b41d0705abd9cf2b335fd4038ec9a2e WHIRLPOOL 565dacb6aec53cb3aa69cb991d8e44bc81894f895464cb0456ea4348556ec3cff319bc0a3ac20ec88e1ab3b08bf94f136f6ed1189ee7e5817d6bde4560579017
-MISC ChangeLog 13417 SHA256 a7e09633eb859fc25fb47d34eeb72e72067a229bebfd26eba0118111894eefbe SHA512 b607a236381051537747494f046f475b8357312a68681af6a8df420d0e68fa68cc9625100a9335d4b28397607618c4c455ba9161244997e92b1b764bd3caec42 WHIRLPOOL 859d5c3c101d3ea1b9357608aec5333a6e683f51d517adf9c5d20f68eb71bbcc27292c4d1a6ad0eb2f8e66244bc484c57dd17799f142ee9e5216e35e185d4d7e
+EBUILD postgis-2.1.4.ebuild 7822 SHA256 f97710a58cbad87ada0a104a9352385d69fc66b4c6de28b8c9c4fab42f1adf1f SHA512 0880cf04f9bad21f071791c420a98965e034b3c2c6293de241f5c90eb87007dc1350a8d97175f049bac63e57604148cdc90341e0fa8473bfb7c883fa87bb0cb3 WHIRLPOOL 76112e9ff4564f5f75b37eefde1a6363405c922c58fb0d31589c3be41b6594f274b97944e61ae9aae7edd64093b5e6a25efba6d84f92282efea02479f3bdd28b
+MISC ChangeLog 13679 SHA256 b0517a81d67cc30393abea7c52c9022650887f91bc50ccc22b85c530b9529aed SHA512 36ad02ae73e5193253a5e5b7988e7576a551debfd4fa37f4865df86fe7edd4464b1b6a57a971dadd0f0e70afc4084efa349950bf1c7ccb7c86409a268a1aadf7 WHIRLPOOL 0214d97e59f534a815373591a31074d20d01b4db03b3ddecda1deb6d6f43063c170764bac3950fcb4da65e4b0493934bce9e58097a2aabd416b2df13f3471cc8
MISC metadata.xml 293 SHA256 aba886c4c12c0d9948f277e58a17e155a6d3d7c3424f409a4d4789fb613a5cd3 SHA512 74abb5ec4fae7313859af907a10d68462c185f07923fb4a7aeabcfaea949b6e71647dce38fa6fafcda3e24bbb1f4912fbec2405f5b7bfb4ddf012e59d9e31c01 WHIRLPOOL 9627fa5905b0a0758f64d7d269edbd889f26f6e39a03af6aabdf6b2781d23a581b9b4bc97f06589f997dbc4fa15c83fd149bedc9e12c206904e91af42c1eef84
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-iF4EAREIAAYFAlRXZ78ACgkQVxOqA9G7/aAfcAD9FyC/3TBGfU75aTu2fAg9fHfc
-1l0lJElHSZBnaOX5QqwBAIlAGb13UrXwsMzDUefZcMgg6t0tl2F+U8AgxJmci7pe
-=skAz
+iF4EAREIAAYFAlRaS6oACgkQVxOqA9G7/aAsBAD/X3H2WEGXIx3S1Vgetm9gDAeY
+NaVMdbkEPI0Et/cp6vYA/2YejmUnpL0oCh8edtP8N1gjYeSQI0Sxq5KbNV+x08lF
+=kQI/
-----END PGP SIGNATURE-----
diff --git a/dev-db/postgis/files/postgis-2.1.4-pkgconfig-json.patch b/dev-db/postgis/files/postgis-2.1.4-pkgconfig-json.patch
new file mode 100644
index 000000000000..13634abb6de2
--- /dev/null
+++ b/dev-db/postgis/files/postgis-2.1.4-pkgconfig-json.patch
@@ -0,0 +1,122 @@
+diff --git a/configure.ac b/configure.ac
+index a13cf13..c0a7842 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -780,61 +780,19 @@ dnl ===========================================================================
+ dnl Detect if json-c installed
+ dnl ===========================================================================
+
+-CHECK_JSON=yes
+-HAVE_JSON=no
+-HAVE_JSON_C=no
+-
+-AC_ARG_WITH([json],
+- [AS_HELP_STRING([--without-json], [build without json-c support])],
+- [CHECK_JSON="$withval"], [])
+-
+-if test "$CHECK_JSON" != "no"; then dnl {
+-
+-AC_ARG_WITH([jsondir],
+- [AS_HELP_STRING([--with-jsondir=PATH], [specify the json-c installation directory])],
+- [JSONDIR="$withval"], [JSONDIR=])
+-
+-if test ! "x$JSONDIR" = "x"; then
+- dnl Make sure that the directory exists
+- if test "x$JSONDIR" = "xyes"; then
+- AC_MSG_ERROR([you must specify a parameter to --with-jsondir, e.g. --with-jsondir=/path/to])
+- else
+- AC_MSG_RESULT([Using user-specified json-c directory: $JSONDIR])
+-
+- dnl Add the include directory to JSON_CPPFLAGS
+- JSON_CPPFLAGS="-I$JSONDIR/include"
+- JSON_LDFLAGS="-L$JSONDIR/lib"
+- fi
+-fi
+-
+-dnl Check that we can find the json/json.h header file
+-CPPFLAGS_SAVE="$CPPFLAGS"
+-CPPFLAGS="$JSON_CPPFLAGS"
+-AC_CHECK_HEADER([json/json.h], [HAVE_JSON=yes], [
+- AC_CHECK_HEADER([json-c/json.h], [HAVE_JSON=yes; HAVE_JSON_C=yes], [])
+-])
+-CPPFLAGS="$CPPFLAGS_SAVE"
+-
+-dnl Ensure we can link against libjson
+-LIBS_SAVE="$LIBS"
+-LIBS="$JSON_LDFLAGS"
+-AC_CHECK_LIB([json-c], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson-c"], [
+- AC_CHECK_LIB([json], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson"], [], [])
+-], [])
+-LIBS="$LIBS_SAVE"
+-
+-if test "$HAVE_JSON" = "yes"; then
++PKG_CHECK_MODULES([JSON], [json],
++ [
++ HAVE_JSON=yes
+ AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present])
+-fi
+-if test "$HAVE_JSON_C" = "yes"; then
+- AC_DEFINE([HAVE_LIBJSON_C], 1, [Define to 1 if libjson resides in a json-c subdir])
+-fi
+-
+-AC_SUBST([JSON_CPPFLAGS])
+-AC_SUBST([JSON_LDFLAGS])
+-AC_SUBST([HAVE_JSON])
+-
+-fi dnl }
++ ],
++ [
++ PKG_CHECK_MODULES([JSON], [json-c],
++ [
++ HAVE_JSON=yes
++ AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present])
++ ],
++ [HAVE_JSON=no])
++ ])
+
+ dnl ===========================================================================
+ dnl Detect GTK+2.0 for GUI
+@@ -927,7 +885,7 @@ AC_DEFINE_UNQUOTED([POSTGIS_USE_STATS], [1], [Enable use of ANALYZE statistics])
+ CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $XML2_CPPFLAGS $SFCGAL_CPPFLAGS $CPPFLAGS"
+ AC_MSG_RESULT([CPPFLAGS: $CPPFLAGS])
+
+-SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LDFLAGS $XML2_LDFLAGS $SFCGAL_LDFLAGS"
++SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LIBS $XML2_LDFLAGS $SFCGAL_LDFLAGS"
+ AC_SUBST([SHLIB_LINK])
+ dnl AC_MSG_RESULT([SHLIB_LINK: $SHLIB_LINK])
+
+diff --git a/liblwgeom/Makefile.in b/liblwgeom/Makefile.in
+index 3cc6256..5ccbb3b 100644
+--- a/liblwgeom/Makefile.in
++++ b/liblwgeom/Makefile.in
+@@ -11,8 +11,8 @@
+ # **********************************************************************
+
+ CC = @CC@
+-CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @GEOS_CPPFLAGS@ @PROJ_CPPFLAGS@ @JSON_CPPFLAGS@
+-LDFLAGS = @LDFLAGS@ @GEOS_LDFLAGS@ -lgeos_c @PROJ_LDFLAGS@ -lproj @JSON_LDFLAGS@
++CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @GEOS_CPPFLAGS@ @PROJ_CPPFLAGS@ @JSON_CFLAGS@
++LDFLAGS = @LDFLAGS@ @GEOS_LDFLAGS@ -lgeos_c @PROJ_LDFLAGS@ -lproj @JSON_LIBS@
+ NUMERICFLAGS = @NUMERICFLAGS@
+ top_builddir = @top_builddir@
+ prefix = @prefix@
+diff --git a/liblwgeom/lwin_geojson.c b/liblwgeom/lwin_geojson.c
+index 7019626..ec1d594 100644
+--- a/liblwgeom/lwin_geojson.c
++++ b/liblwgeom/lwin_geojson.c
+@@ -19,13 +19,8 @@
+
+ #include <string.h>
+
+-#ifdef HAVE_LIBJSON_C
+-#include <json-c/json.h>
+-#include <json-c/json_object_private.h>
+-#else
+-#include <json/json.h>
+-#include <json/json_object_private.h>
+-#endif
++#include <json.h>
++#include <json_object_private.h>
+
+ #ifndef JSON_C_VERSION
+ // Adds support for libjson < 0.10
diff --git a/dev-db/postgis/postgis-2.0.6.ebuild b/dev-db/postgis/postgis-2.0.6.ebuild
new file mode 100644
index 000000000000..79ed8797caa9
--- /dev/null
+++ b/dev-db/postgis/postgis-2.0.6.ebuild
@@ -0,0 +1,267 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-2.0.6.ebuild,v 1.1 2014/11/05 16:09:12 titanofold Exp $
+
+EAPI="4"
+
+inherit autotools eutils versionator
+
+DESCRIPTION="Geographic Objects for PostgreSQL"
+HOMEPAGE="http://postgis.net"
+SRC_URI="http://download.osgeo.org/postgis/source/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc gtk"
+
+RDEPEND="
+ || (
+ virtual/postgresql:9.2[server]
+ virtual/postgresql:9.1[server]
+ virtual/postgresql:9.0[server]
+ virtual/postgresql:8.4[server]
+ )
+ dev-libs/json-c
+ dev-libs/libxml2:2
+ >=sci-libs/geos-3.3.8
+ >=sci-libs/proj-4.6.0
+ >=sci-libs/gdal-1.9
+ 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[png]
+ media-gfx/graphicsmagick[imagemagick,png]
+ )
+ )
+ virtual/pkgconfig
+"
+
+PGIS="$(get_version_component_range 1-2)"
+
+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"
+
+pkg_setup() {
+ export PGSLOT="$(postgresql-config show)"
+
+ if [[ ${PGSLOT//.} < 84 || ${PGSLOT//.} > 92 ]] ; then
+ eerror "You must build ${CATEGORY}/${P} against PostgreSQL 8.4 - 9.2."
+ eerror "Set an appropriate slot with postgresql-config."
+ die 'Select a PostgreSQL slot between 8.4 and 9.2'
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-${PGIS}-ldflags.patch" \
+ "${FILESDIR}/${PN}-${PGIS}-pkgconfig-json.patch"
+
+ local AT_M4DIR="macros"
+ eautoreconf
+}
+
+src_configure() {
+ local myargs=""
+ use gtk && myargs+=" --with-gui"
+ econf ${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"
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
+
+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}"
+}
diff --git a/dev-db/postgis/postgis-2.1.4.ebuild b/dev-db/postgis/postgis-2.1.4.ebuild
new file mode 100644
index 000000000000..5c8ade578625
--- /dev/null
+++ b/dev-db/postgis/postgis-2.1.4.ebuild
@@ -0,0 +1,294 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/postgis-2.1.4.ebuild,v 1.1 2014/11/05 16:09:12 titanofold Exp $
+
+EAPI="5"
+POSTGRES_COMPAT=( 9.{0,1,2,3,4} )
+
+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 static-libs test"
+
+RDEPEND="
+ || (
+ virtual/postgresql:9.4[server]
+ virtual/postgresql:9.3[server]
+ virtual/postgresql:9.2[server]
+ virtual/postgresql:9.1[server]
+ virtual/postgresql:9.0[server]
+ )
+ dev-libs/json-c
+ dev-libs/libxml2:2
+ >=sci-libs/geos-3.4.2
+ >=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"
+
+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.4-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() {
+ 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"
+
+ use static-libs || find "${ED}" -name '*.a' -delete
+}
+
+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}"
+}