summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Swenson <titanofold@gentoo.org>2013-01-30 14:47:07 +0000
committerAaron Swenson <titanofold@gentoo.org>2013-01-30 14:47:07 +0000
commit0fd8331d8caa7652ea6f1bb6591a7e49f13f7ebb (patch)
tree930698d4864bbd235c77a0fef9c7ddb82ade606a /dev-db/postgis
parentDo not install the update checker. (diff)
downloadhistorical-0fd8331d8caa7652ea6f1bb6591a7e49f13f7ebb.tar.gz
historical-0fd8331d8caa7652ea6f1bb6591a7e49f13f7ebb.tar.bz2
historical-0fd8331d8caa7652ea6f1bb6591a7e49f13f7ebb.zip
Version bumps. Fixes bugs 339116, 423349, and 454276.
Package-Manager: portage-2.1.11.31/cvs/Linux x86_64 Manifest-Sign-Key: 0xD1BBFDA0
Diffstat (limited to 'dev-db/postgis')
-rw-r--r--dev-db/postgis/ChangeLog15
-rw-r--r--dev-db/postgis/Manifest20
-rw-r--r--dev-db/postgis/files/postgis-1.5-ldflags.patch28
-rw-r--r--dev-db/postgis/files/postgis-2.0-ldflags.patch26
-rw-r--r--dev-db/postgis/postgis-1.3.6-r2.ebuild206
-rw-r--r--dev-db/postgis/postgis-1.4.2-r2.ebuild255
-rw-r--r--dev-db/postgis/postgis-1.5.8.ebuild252
-rw-r--r--dev-db/postgis/postgis-2.0.2.ebuild250
8 files changed, 1049 insertions, 3 deletions
diff --git a/dev-db/postgis/ChangeLog b/dev-db/postgis/ChangeLog
index 4b38b292fcb3..2c70e2fcff4e 100644
--- a/dev-db/postgis/ChangeLog
+++ b/dev-db/postgis/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for dev-db/postgis
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.71 2012/11/01 06:39:12 patrick Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgis/ChangeLog,v 1.72 2013/01/30 14:46:58 titanofold Exp $
+
+*postgis-2.0.2 (30 Jan 2013)
+*postgis-1.5.8 (30 Jan 2013)
+*postgis-1.4.2-r2 (30 Jan 2013)
+*postgis-1.3.6-r2 (30 Jan 2013)
+
+ 30 Jan 2013; Aaron W. Swenson <titanofold@gentoo.org>
+ +postgis-1.3.6-r2.ebuild, +postgis-1.4.2-r2.ebuild, +postgis-1.5.8.ebuild,
+ +files/postgis-1.5-ldflags.patch, +postgis-2.0.2.ebuild,
+ +files/postgis-2.0-ldflags.patch:
+ Version bumps. Fixes bugs 339116, 423349, and 454276.
*postgis-1.5.5 (01 Nov 2012)
diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest
index 4fb406fd2399..0d337e25a640 100644
--- a/dev-db/postgis/Manifest
+++ b/dev-db/postgis/Manifest
@@ -1,16 +1,34 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX postgis-1.5-ldflags.patch 1379 SHA256 dd06c5a6dbf085cee2f4d08bae1c6440511596d21876f955f6b6d2e133c97559 SHA512 47164ecf5a875267d545504f2dec6b52d34161cd9598968d323bc8949d9bdcfd911d20519faca1a1cf3ce67d6dd0a9bc201c6afc0df7881752368c70bd3cb69b WHIRLPOOL 8c9fb2945c696b1208ba047e51869f11ceabccabd34d0cc0f2d345bb17d1d1c27421e5536882488eb64460e1e703823e5d3e6392eed1667448313b0fd7330601
+AUX postgis-2.0-ldflags.patch 1355 SHA256 8fd78bcee5d20e8735b4b8d034ca762af0d56d42586449e78207fcad2d52d308 SHA512 5e53f5812d8e4f0be72e92632f881ee8520a9fc0a73ae68a9abc494296075fdc82df51573f7a7d68ea4bf6d691d8de4496bb02f7fa78bf7cf73dcc202af6ae71 WHIRLPOOL 606cbb6a229000f18378f2e3a5e6e0e61d767b2c183df0b28927d4ba9b51488cce2ae36adbfa32386f3c2f5bade3ec6bc92d18bf107de1f9a46c0bd320220af8
AUX postgis_dbs 2096 SHA256 dafde4a1d1d95e18facb3287baddab3c1c116933498c310438c91dbd736833ec SHA512 5a11a3ce0153461f363d1b9a393dd10392e123c7b18b20610a5e26f2c7c6ed258a1517082a244c6ab5de40d439bc8a370848a0177c3c2ffcffc67a24fca8e66a WHIRLPOOL 8e4c34ac428c5ac887b414334fe80424b09845585596be1affaf69a9205af7dd183198eed44fa0406074ad1bcc133db8a9a13acd4a0882945b32ec8e0a480b61
AUX postgis_dbs-1.4 2096 SHA256 287224c16cbd286c75098e786235ad07226217fbcf76071279081e6cb1d1add1 SHA512 520711a6165dbb08c7ce86001f885340b5dbc54efc2a863726b09d93db9e0d888c21fa5b466506456cacadd55db8531284c5b85f484c599d313f4d9aac56c1ef WHIRLPOOL 1b87d8edf109dd76a54a8c7819731a843e7ec139bcaef4b69605304a336eb3d558e656c1adf06ca487f1c5624c542634be7b885dd888e5ef4ec89e2970d38195
DIST postgis-1.3.6.tar.gz 2227317 SHA256 d3b04d4a3439596a1f6368b0627f21762347cef1e0694d5471ef17c6a3b7d144 SHA512 0e98aeaf8c3c3ca1c51c617a6f50f066a69129b63721507708f02c69b5ff8e75c4b7b076f5075263ceedaf10904eaf950784b2c2f9f27ba3bb982f871b68fd4b WHIRLPOOL c45c611a992b044f63be3259c046f01e34b0772f2f95bf7fb7b71b54adef1c72aa3c86141bff8d305751e4598ee18a40e1ebc5439501b76e6c430c19c988d316
DIST postgis-1.4.2.tar.gz 3276515 SHA256 5ce49b83b4c8f62eccb7080157f05299ff0e49c6ba06c3e1fa1ecfa2682c4d4b SHA512 3c27e8ed9eeb0e884190cdd5e4731989f9752e2ba449cdfe45d09cd638bd5b600d5cef16140e072d5e328cac035b2ffcc18392651c7306dcc4b5401429efc73e WHIRLPOOL 34a92d15018c5c414f93bf16c7cccb53af0943564b378bf2ca49d1692ebe51b9935214a5b2e2bddee716734954be7aabe0b4ce8b9c6b7d9cfbb801fa177bf5c4
DIST postgis-1.5.3.tar.gz 3779956 SHA256 a2334f8b229446c0497d48a430a40152a3b71a5da02f414a0340a0a025d416cf SHA512 fe51f6cd452de577d361b56196adcacd6715f608c3e2d073375f36e35a6b47b5cc92f8232b9d1d29cd00d1f85c77dbd035379687f7a180074ee7dbd38ca8f3cd WHIRLPOOL 1139e63a8875c98c6f147cba1b3693602846b61c93d73cb561ef567b29f04f51558dfe8a09e0778247fa3b6fc7d221b5ea8df44862808272123c879b21e36589
DIST postgis-1.5.5.tar.gz 3802212 SHA256 6f7fbb417cfce8cd120d098219ba5f9a19ccdcec0beb0163320b163b23231cf3 SHA512 c9252721c9b6bb9db5c4e9c5d89efdb9767eadc3f8bec0663bb61129c6c78d867114de31aa0022ec4434fe24e5ce3a6d5002158ec6a1e006b2cb2612a4200ea7 WHIRLPOOL 551e1b9f11c9f21409d4f77174f2c2e4433212290b0fdfba53f0e7149bb3c309dfa17a1cac783623775718b4b027d74109164179fa51cdb4ada1d8d5fbe3280c
+DIST postgis-1.5.8.tar.gz 3948219 SHA256 4896fdae2f814b88c3ca458b7d01d7eca7e9aca021599c817919f131a1b0d804 SHA512 30167c56083dcd2aa764ee82b5b124992bfca2ab4eb8753a80f0fe624b310a060411f0714a8e56a1aebc277c3fdf8e1157d13d91560d5a8ffbc64917e9f3c727 WHIRLPOOL c889546679f69bbfc6d015c245721323c39fc18b6da2cfc28e24c7c736be112274f5c43d7d2ce61ea11a49011123d66d1a8f3c79ec3356227c48325945bff72a
DIST postgis-2.0.0.tar.gz 5446748 SHA256 12179e24e348421c60c501590fda25bd349e2f697003958d9493f5c91b280081 SHA512 e6756d9bb2c88cb3cdbd7f74a8d4dff238b7e9e738468234045dce3646e211a28fd760f245cf93af55e096375de580a8283bc836c52ef216e060481dbe216894 WHIRLPOOL 18dac47cb4b3bc8104a79084da6bd32f32a58c3aaef5b96ee2ec67161d31ed0a4bd739e602a57d888f3b481e3b98ab2884ae8d9f8255c59b85e0f83222917d07
DIST postgis-2.0.1.tar.gz 5373194 SHA256 32d181bbf0e648fe31c95b3dd23f7e4e49094d93cb4278fdf71c8feed4e9593c SHA512 c3dd03b8ae6e8917336bbaac0b91343f662d2477a7f54dcb823ef43f5433813615e992e729f2f1a30895c14a5039d3c34d9225e850f193192829380e043fc387 WHIRLPOOL a7df5478b3c23b652d48ac16d4f3fbc2d97bdb70ad5f1a450a3ad6142d977ae7de4cf5d2e53b6aee1a3beaf7feeccb12cc925a2cd08b6b5e74e2ca73e1d1786c
+DIST postgis-2.0.2.tar.gz 5573652 SHA256 57746d040080e624f3e81633a180d8a5fc16b0c035d94fe2c16306023ab1c391 SHA512 b301d77ec5f4fe216b641b150f93520a11d3b14e76af7854df8f3224a6f971183bd06ceb381c94f0089abced3dfb830591654022d43e4506ed0de9717620c5fd WHIRLPOOL 81eb53565849f2e155c5cfe5dac588b99e48eb175c98ea8afb3159ef3b7d1af55ad053c049934d63bae3f013f8d88decc35e14a2f4be44363b2303c9bfe9d647
EBUILD postgis-1.3.6-r1.ebuild 5595 SHA256 4cd4f8fa35064a3a34b873ad7e77dabead3b225bd7028ebbc95f3adc252fef13 SHA512 3eb25213a082b382efcd67ddead113d84928d730a6fa14dbb7a249757268170aef98350fe21d6b2eebaf5febb7bb9624bfef582d597bdee2a898af280267e864 WHIRLPOOL 5217be7480e86c55b51a2ce5fc4e7824ce07cf8af49f95f41c4793c805897a6213eabf4dacb9a1d61268388649115b32643859b54ccc43a45a423131a9e9e081
+EBUILD postgis-1.3.6-r2.ebuild 6017 SHA256 af5177091e4ff0133ab6ad1320da6a7e77975e3cb1972853e705591be54c059f SHA512 58a3a87c8187534c57f5bb7e250e144ad32883a565bc5bda9a035d4bf382860e21485b8f2bc2e5d16235a4b0b5e97b3847aa3b0480a9d552c22a51742bfb535e WHIRLPOOL 1d8c0bc8f29b7bfb73ae56bf5d10f804bdea5342fcb5861f8358295219ef1fcaa62f142d2ea4b952214352e0ba8e10e11e3ba82fa6fe29fa8c5d5cd51f545bfc
EBUILD postgis-1.4.2-r1.ebuild 6696 SHA256 789cd4a5a6515f10946931330b4241c5bdd7f3a8519de059c290713532f2cc11 SHA512 1ebb80920c2d468aba3b31ceacfd5011fc3f8cc3f879506cdf80ca48bb080e01ad541f4844ab73c9635a68f360b8f229aca502e5c35ac4d2f07f52898be3df18 WHIRLPOOL 34ed155d44362eedb82df185203883963458c95598e88f48bb2ca2d604231655c5ae4120261f546a07a928bb13bed64e536ae4fd58dcb5bcd19e565f495c556f
+EBUILD postgis-1.4.2-r2.ebuild 6683 SHA256 86e7e7a070bc058d621658961c8e9baf1eb16a109b973a1dab3e4e9305bb90b2 SHA512 07ec50fc31a5ef2adbe067fc2049a5fc987ed1bf84cb06b3e1ac80075df79f9ff4a17b54d94b1d613ad322aa1497a66271279983f14a5e184450463c20737c24 WHIRLPOOL 7a1a670f9a0c12f55e8d2cd611f5381e24d6fd6dec2c10d0bb8d7121358918545cfddfd3ff582b26ee56a76f3a5ca0c900863331864311f62b32c28948cf2d41
EBUILD postgis-1.5.3-r1.ebuild 6912 SHA256 8680d2bf4db5fc0ff1d1631e7ecf827aae1786f86c5a2f19951bd86a549a156f SHA512 93f568e74cfc1332554655b57963b7874fbd121f7b4904176a24ad7ed796b75fa25080eb82888197b84409a8dcd3da8833515fe5f44f4706851a7ef8b1854ad9 WHIRLPOOL f2e65ea8cedb7ca3ad86a8ba6d342e8c702c6d63aa84165496c0fbfa1e546eda2ffbaaa7a26b9afccc02e6f83d796eac7e6ccd48aafd256fac4306214b1baaf5
EBUILD postgis-1.5.5.ebuild 6913 SHA256 49fa5186e567d8e857ee5088055d2380a3a72b6ae375c40db9bfae53ad78530e SHA512 61baa1c718f490822993d74749da7acdc8fba3e241d976b1526058844e2dd1bb3e2bec2f17e1f7f90047a46b642d3c8ea0fe7e8fd14db6ff5d991634edf46767 WHIRLPOOL 1d85d06d394c0ac5022ba72000fd03412e76aec2cbe4a56a0dddc8440eca49bf4316d29f9b825c8bb0120e125d77d1065f7a7f93bdf3acf901df56eda26ebdb6
+EBUILD postgis-1.5.8.ebuild 6674 SHA256 38555180bb2e4921d6fa19c12aee36d1e016c601c35350e6c43b68b0a2da95ed SHA512 15a4533460d2ab46cbda115ebe1d607939a8014f3f7a7a726fd1138bc0261f03f3a6366737a120590d2d776fa13832377acb79351c739c875e38ce5bce7a4881 WHIRLPOOL d753889eb5384d0a3c4473223d0cba6c17b3be9a2e2b75a4557ebae3ff81ceff12ca0582053d116401f15924d37d7b29c9c78fe4514c88137becbc3746fe8669
EBUILD postgis-2.0.0.ebuild 6901 SHA256 94fddc0709cad9a31370308593318277697d6f88cda576625db57547661c37d9 SHA512 f3985bbd13e2faba0e2c9e8ebcdcbae48b9ffc67c2b5ea965cd66e33f7f9f620217cf029ea487756eb5a45fab5ddd40297b7127c1354c7beb89ae4aa3e1a5708 WHIRLPOOL 6de8c7fbb55e17541d3d86b6bdb475cc28677cf517d286e1f8b392caa2fc0643b695ee4466533ff0f5354e1cce77c2482e7dd16915b45fb37f9134bc0caa78ed
EBUILD postgis-2.0.1.ebuild 6960 SHA256 c2d3875e8c482790d4e7d603048e600863e2cc00faf94f3db365e73038525ecb SHA512 dc45b7fe13883f4c2706c45c3156d4964f4cb09041e8ace5de89adaea4b37ef2ddaf98fa22155ddb6c07bc9a840f32c9088d650952974a9e7c055d6c0e246947 WHIRLPOOL 5870ca61c8cc9872b6bdc917d943e0738356aa3d7947567b6e50f27dc90dcb390d53546c5b14ccf51e94ef8b852481c38343177ab672ae409f4f36c145f2c3c9
-MISC ChangeLog 9849 SHA256 432f4911416fe6e2665d2b96b20f70cb73d06096ff256ecc1e9e51d51d8b0fde SHA512 505badd657895998b4926ecdff5e878ee333222acedc3007baf328c48deaed5743515e090cd25ae10849745c6f57d2e4cb19215a7c26591729e88f9f8a8bf1fc WHIRLPOOL 870e83aab708f0fd83292f3dc15e5ad859f4bd2926c7be557195b54312ee8c7c2380e3436bcf140acbea77ed79c4ae98a191b5617bb6bac762dce2056dcd90e6
+EBUILD postgis-2.0.2.ebuild 6883 SHA256 df4985a1f0849690f2aca4fe12711f8fc4ef9a2022ba27ea22b99819c21028d4 SHA512 ac3e46ad0e6db90761a4d339008b2fe78bd28e99c7b34c18b83e05e40bf3b3fd05de4c70cedf889ee4218a7c5071ada3981c954938477a2dc7df2b4ef0646efd WHIRLPOOL ea048b30a7372a364bd5c2d6d7c813cb2b160d22b9565d00747e873c27245d5fc45b332998d8d80fb593bf231a6a91669592cdd3de5937101b2c6bc22c46c87c
+MISC ChangeLog 10260 SHA256 9ba25b5e6f4ef23451db49afd56cf5986261f1363b7f8c0590d1b97475eced54 SHA512 4b3a9de315c77a7938bff6074f57f3e6ef7516934953fa1febc5322ae3dcbf3031211f4c521825753848a70737452b64d3d9add441ecfd537f8cdf5232bd8ba7 WHIRLPOOL 45611da49cc14ab8ded31ef6543c8e722bef3dffc5053f6bf7f754f2b33638da812459edd284ba0c42af695b8291d2b6ccba6eae19a6fc197820c87aa406283d
MISC metadata.xml 481 SHA256 d0ab8dbe26001259f36c968e1d48ad5fda768227d99319cf4302af804a08d5ef SHA512 5299745d72d13ccc71d5f6eee5d343268a59f57ac208621c81643e7f2160b66382c3dd0bf07c97f4cefaebfbbbfc5e11e6b84318f5fc536877f123be2fd7743e WHIRLPOOL 257b7f00ffcd56df202c0e1cd75383bf7ed9b0c854cadb9371a281bbd200b8686c70d3d28cadd06756510f9d6536ee64c636a12f5170ce5c608e82d1148ba9fe
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.19 (GNU/Linux)
+
+iF4EAREIAAYFAlEJMmcACgkQVxOqA9G7/aCqwQD8DaO/xCzhxILHjerLy4hoKIBv
+83YpBe1+GIJP934ErRcA/jrkwURN10SCmlxKzX1XH+505KzO5OpUYrdLcaDYraCY
+=t8Pd
+-----END PGP SIGNATURE-----
diff --git a/dev-db/postgis/files/postgis-1.5-ldflags.patch b/dev-db/postgis/files/postgis-1.5-ldflags.patch
new file mode 100644
index 000000000000..3ccbb712c2d4
--- /dev/null
+++ b/dev-db/postgis/files/postgis-1.5-ldflags.patch
@@ -0,0 +1,28 @@
+diff -Naurw postgis-1.5.8.orig/loader/Makefile.in postgis-1.5.8/loader/Makefile.in
+--- postgis-1.5.8.orig/loader/Makefile.in 2010-09-10 20:44:05.000000000 +0000
++++ postgis-1.5.8/loader/Makefile.in 2013-01-30 14:31:01.189692941 +0000
+@@ -79,16 +79,16 @@
+ $(CC) $(CFLAGS) $(ICONV_CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $<
+
+ $(PGSQL2SHP): shpopen.o dbfopen.o safileio.o getopt.o pgsql2shp.o $(LIBLWGEOM)
+- $(CC) $(CFLAGS) $^ $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm -o $@
++ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm -o $@
+
+ $(SHP2PGSQL-CLI): stringbuffer.o shpopen.o dbfopen.o safileio.o getopt.o shp2pgsql-core.o shp2pgsql-cli.o $(LIBLWGEOM)
+- $(CC) $(CFLAGS) $^ -o $@ $(ICONV_LDFLAGS) -lm
++ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(ICONV_LDFLAGS) -lm
+
+ shp2pgsql-gui.o: shp2pgsql-gui.c
+ $(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) $(GTK_CFLAGS) -o $@ -c shp2pgsql-gui.c
+
+ $(SHP2PGSQL-GUI): stringbuffer.o shpopen.o dbfopen.o safileio.o shp2pgsql-core.o shp2pgsql-gui.o getopt.o $(LIBLWGEOM) $(GTK_WIN32_RES)
+- $(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm
++ $(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ $(LDFLAGS) $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm
+
+ installdir:
+ @mkdir -p $(DESTDIR)$(bindir)
+@@ -106,4 +106,3 @@
+
+ clean:
+ @rm -f *.o $(SHP2PGSQL-CLI) $(PGSQL2SHP) $(GTK_WIN32_RES)
+-
diff --git a/dev-db/postgis/files/postgis-2.0-ldflags.patch b/dev-db/postgis/files/postgis-2.0-ldflags.patch
new file mode 100644
index 000000000000..f48617cd64a9
--- /dev/null
+++ b/dev-db/postgis/files/postgis-2.0-ldflags.patch
@@ -0,0 +1,26 @@
+diff -Naurw postgis-2.0.2.orig/loader/Makefile.in postgis-2.0.2/loader/Makefile.in
+--- postgis-2.0.2.orig/loader/Makefile.in 2012-03-21 21:36:59.000000000 +0000
++++ postgis-2.0.2/loader/Makefile.in 2013-01-29 21:44:12.566318760 +0000
+@@ -97,11 +97,11 @@
+
+ $(PGSQL2SHP-CLI): $(SHPLIB_OBJS) pgsql2shp-core.o pgsql2shp-cli.o $(LIBLWGEOM)
+ $(LIBTOOL) --mode=link \
+- $(CC) $(CFLAGS) $^ $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) -o $@
++ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) -o $@
+
+ $(SHP2PGSQL-CLI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-cli.o $(LIBLWGEOM)
+ $(LIBTOOL) --mode=link \
+- $(CC) $(CFLAGS) $^ -o $@ $(GETTEXT_LDFLAGS) $(ICONV_LDFLAGS)
++ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(GETTEXT_LDFLAGS) $(ICONV_LDFLAGS)
+
+ shp2pgsql-gui.o: shp2pgsql-gui.c shp2pgsql-core.h shpcommon.h
+ $(CC) $(CFLAGS) $(GTK_CFLAGS) $(PGSQL_FE_CPPFLAGS) -o $@ -c shp2pgsql-gui.c
+@@ -109,7 +109,7 @@
+ $(SHP2PGSQL-GUI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-gui.o pgsql2shp-core.o $(LIBLWGEOM) $(GTK_WIN32_RES)
+ $(LIBTOOL) --mode=link \
+ $(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ \
+- $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS)
++ $(LDFLAGS) $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS)
+
+ installdir:
+ @mkdir -p $(DESTDIR)$(bindir)
diff --git a/dev-db/postgis/postgis-1.3.6-r2.ebuild b/dev-db/postgis/postgis-1.3.6-r2.ebuild
new file mode 100644
index 000000000000..673108a46a0b
--- /dev/null
+++ b/dev-db/postgis/postgis-1.3.6-r2.ebuild
@@ -0,0 +1,206 @@
+# 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-1.3.6-r2.ebuild,v 1.1 2013/01/30 14:46:58 titanofold Exp $
+
+EAPI="1"
+
+inherit eutils multilib 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"
+IUSE="geos proj doc"
+
+RDEPEND=" || (
+ dev-db/postgresql-server:8.4
+ dev-db/postgresql-server:8.3
+ dev-db/postgresql-server:8.2
+ dev-db/postgresql-server:8.1
+ dev-db/postgresql-server:8.0
+ )
+ geos? ( sci-libs/geos )
+ proj? ( sci-libs/proj )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-text/docbook-xsl-stylesheets )"
+
+RESTRICT="test"
+
+pkg_setup(){
+ export PGSLOT="$(postgresql-config show)"
+
+ if [[ ${PGSLOT//.} < 71 || ${PGSLOT//.} > 84 ]] ; then
+ eerror "You must build ${CATEGORY}/${P} against PostgreSQL 7.1 - 8.4."
+ eerror "Set an appropriate slot with postgresql-config."
+ die 'Select a PostgreSQL slot between 8.4 and 9.2'
+ fi
+
+ if [ ! -z "${PGUSER}" ]; then
+ eval unset PGUSER
+ fi
+ if [ ! -z "${PGDATABASE}" ]; then
+ eval unset PGDATABASE
+ fi
+ 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 "by adding their names in the ${ROOT}conf.d/postgis_dbs file"
+ elog "then 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
+
+ echo "template_gis" > postgis_dbs
+ doconfd postgis_dbs
+
+ 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 (upgrade) spatial databases add their names in the"
+ elog "${ROOT}conf.d/postgis_dbs file, then use 'emerge --config postgis'."
+}
+
+pkg_config(){
+ einfo "Create or upgrade a spatial templates and databases."
+ einfo "Please add your databases names into ${ROOT}conf.d/postgis_dbs"
+ einfo "(templates name have to be prefixed with 'template')."
+ for i in $(cat "${ROOT}etc/conf.d/postgis_dbs"); do
+ source "${ROOT}"etc/conf.d/postgresql
+ PGDATABASE=${i}
+ eval set PGDATABASE=${i}
+ myuser="${PGUSER:-postgres}"
+ mydb="${PGDATABASE:-template_gis}"
+ eval set PGUSER=${myuser}
+
+ is_template=false
+ if [ "${mydb:0:8}" == "template" ];then
+ is_template=true
+ mytype="template database"
+ else
+ mytype="database"
+ fi
+
+ einfo
+ einfo "Using the user ${myuser} and the ${mydb} ${mytype}."
+
+ 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
+ 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
+ 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 -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
+ done
+}
diff --git a/dev-db/postgis/postgis-1.4.2-r2.ebuild b/dev-db/postgis/postgis-1.4.2-r2.ebuild
new file mode 100644
index 000000000000..60d23f2b0c3f
--- /dev/null
+++ b/dev-db/postgis/postgis-1.4.2-r2.ebuild
@@ -0,0 +1,255 @@
+# 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-1.4.2-r2.ebuild,v 1.1 2013/01/30 14:46:58 titanofold Exp $
+
+EAPI="4"
+
+inherit 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"
+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[png]
+ media-gfx/graphicsmagick[imagemagick,png]
+ )
+ )
+"
+
+RESTRICT="test"
+
+PGIS="$(get_version_component_range 1-2)"
+
+# not parallel safe
+MAKEOPTS+=" -j1"
+
+pkg_setup() {
+ export PGSLOT="$(postgresql-config show)"
+
+ if [[ ${PGSLOT//.} < 82 || ${PGSLOT//.} > 84 ]] ; then
+ eerror "You must build ${CATEGORY}/${P} against PostgreSQL 8.2 - 8.4."
+ eerror "Set an appropriate slot with postgresql-config."
+ die 'Select a PostgreSQL slot between 8.2 and 8.4'
+ fi
+}
+
+src_configure() {
+ # Configure interprets --without-gui as being the same as --with-gui
+ 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
+ cd topology/
+ emake
+
+ if use doc ; then
+ cd "${S}/doc/"
+ emake
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ cd topology/
+ emake 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-${PGIS}"
+ 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}"
+}
diff --git a/dev-db/postgis/postgis-1.5.8.ebuild b/dev-db/postgis/postgis-1.5.8.ebuild
new file mode 100644
index 000000000000..ab58ac1d5b8f
--- /dev/null
+++ b/dev-db/postgis/postgis-1.5.8.ebuild
@@ -0,0 +1,252 @@
+# 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-1.5.8.ebuild,v 1.1 2013/01/30 14:46:58 titanofold Exp $
+
+EAPI="4"
+
+inherit 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"
+IUSE="doc gtk"
+
+RDEPEND="
+ || (
+ dev-db/postgresql-server:9.1
+ dev-db/postgresql-server:9.0
+ dev-db/postgresql-server:8.4
+ dev-db/postgresql-server:8.3
+ )
+ dev-libs/libxml2:2
+ >=sci-libs/geos-3.2
+ >=sci-libs/proj-4.6.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)"
+
+# not parallel safe
+MAKEOPTS+=" -j1"
+
+pkg_setup() {
+ export PGSLOT="$(postgresql-config show)"
+
+ if [[ ${PGSLOT//.} < 83 || ${PGSLOT//.} > 91 ]] ; then
+ eerror "You must build ${CATEGORY}/${P} against PostgreSQL 8.3 - 9.1."
+ eerror "Set an appropriate slot with postgresql-config."
+ die 'Select a PostgreSQL slot between 8.3 and 9.1'
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-${PGIS}-ldflags.patch"
+}
+
+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
+ use doc && emake -C doc
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ emake -C topology 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 /etc
+ doins "${FILESDIR}/postgis_dbs"
+
+ cd "${S}/doc"
+ doman man/*
+ insinto /usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}/
+ doins postgis_comments.sql
+}
+
+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_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.0.2.ebuild b/dev-db/postgis/postgis-2.0.2.ebuild
new file mode 100644
index 000000000000..a89561f21a93
--- /dev/null
+++ b/dev-db/postgis/postgis-2.0.2.ebuild
@@ -0,0 +1,250 @@
+# 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.0.2.ebuild,v 1.1 2013/01/30 14:46:58 titanofold Exp $
+
+EAPI="4"
+
+inherit 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="
+ || (
+ dev-db/postgresql-server:9.2
+ dev-db/postgresql-server:9.1
+ dev-db/postgresql-server:9.0
+ dev-db/postgresql-server:8.4
+ )
+ dev-libs/libxml2:2
+ >=sci-libs/geos-3.3.3
+ >=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]
+ )
+ )
+"
+
+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"
+
+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"
+}
+
+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
+ use doc && emake -C doc html -j1
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ 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}"
+}