diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-db/postgis |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-db/postgis')
-rw-r--r-- | dev-db/postgis/Manifest | 15 | ||||
-rw-r--r-- | dev-db/postgis/files/postgis-2.0-arflags.patch | 18 | ||||
-rw-r--r-- | dev-db/postgis/files/postgis-2.1-ldflags.patch | 26 | ||||
-rw-r--r-- | dev-db/postgis/files/postgis-2.1.4-pkgconfig-json.patch | 122 | ||||
-rw-r--r-- | dev-db/postgis/files/postgis-2.2.0-arflags.patch | 18 | ||||
-rw-r--r-- | dev-db/postgis/files/postgis_dbs | 49 | ||||
-rw-r--r-- | dev-db/postgis/metadata.xml | 15 | ||||
-rw-r--r-- | dev-db/postgis/postgis-2.1.8-r1.ebuild | 281 | ||||
-rw-r--r-- | dev-db/postgis/postgis-2.3.3.ebuild | 116 | ||||
-rw-r--r-- | dev-db/postgis/postgis-2.4.0.ebuild | 116 | ||||
-rw-r--r-- | dev-db/postgis/postgis-9999.ebuild | 114 |
11 files changed, 890 insertions, 0 deletions
diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest new file mode 100644 index 000000000000..f3fa1ec6f35c --- /dev/null +++ b/dev-db/postgis/Manifest @@ -0,0 +1,15 @@ +AUX postgis-2.0-arflags.patch 539 SHA256 02429ac34d53c0beaae9d323b65cc85702e46fbf7f83cfd0d0ba7c0f74ba3afa SHA512 e600cf3548fa7c13f7cddec24a0f9078646155b48fb42cd1d41bff311976718ba93bcf7d8361d0494df5e3c6bdff74af5b8b4821026a49618ad3d835383f2785 WHIRLPOOL 506aa9782eac840a9ee21ad2b139035431e2fee2e96b4a8f0900d71bb9aaf693a3f1fae864ad1a19133b4cba362153afda9ef1222cc3bab5e5aaa309772a16e4 +AUX postgis-2.1-ldflags.patch 1367 SHA256 30b56a31599a276f9d82658e12744f7aff59eafc1401a6b6ecfe5edca948be56 SHA512 7bfce943698b8ba41fea5606c1a3dc43b2cc11daeb8e81e432701c2cebf300984ff54e8c8817e245ec4195a85b8d28bcfc6b30d111bd6c05341c93e7c769ab35 WHIRLPOOL 9743cdc192ab12ea0a6efc90e4915e6798dee49117d47246aa0405abb1698aba7e276198d1147b8b535abc9b8e4e59ba5f1f8b062062e4d23b91d610358cb9b2 +AUX postgis-2.1.4-pkgconfig-json.patch 4276 SHA256 0a8347d9427e10c9a0d2554f862ecbbacd1bbe1c6f9373ae4c9721ffe8475b00 SHA512 7439b2221bee6e3940485b1964edda10d320493b3dc8b86e1579824a9f0c6b5ff21a3d444077fa331096a9e0e4442df2c792d8a51c79dcf6c680404cbebf9275 WHIRLPOOL 3e4d05566fd38dd7e6c25f39299abf7add7247f558fd0243a0559b664c9fb0a946d45f5e9daf19f43c68fbfe85dfb128bef9e2299d20121058b4b3b5ee3eee03 +AUX postgis-2.2.0-arflags.patch 535 SHA256 7253a58b96f73a685143c0c957c41c9b8008f10752a36b45365e6c9abbc55259 SHA512 7f8b92a582dd11b3040832278b75e65036315ca0e438cb9b19cc5b63a7b5c5bcae8ec274a487a29abadfbbc31cdfacf6c668e46f249d4bf88c09607501cacf66 WHIRLPOOL e08f5e2397dde8012e60bedfbda7c3fa5a88a4409a65929eaa184cdbd1e8aeb4854808c48a3c2fd41d4d0355616d16f70a34f9e534bb3787377e8dbeea6e52d5 +AUX postgis_dbs 2096 SHA256 dafde4a1d1d95e18facb3287baddab3c1c116933498c310438c91dbd736833ec SHA512 5a11a3ce0153461f363d1b9a393dd10392e123c7b18b20610a5e26f2c7c6ed258a1517082a244c6ab5de40d439bc8a370848a0177c3c2ffcffc67a24fca8e66a WHIRLPOOL 8e4c34ac428c5ac887b414334fe80424b09845585596be1affaf69a9205af7dd183198eed44fa0406074ad1bcc133db8a9a13acd4a0882945b32ec8e0a480b61 +DIST postgis-2.1.8.tar.gz 6811272 SHA256 7c2380b895fe7bda34c2e70deab3fcf4c12b13ab40d7501cdaa6fa36f1a6c662 SHA512 e8aeb739a1ecf95b224a3908d2af3aa38933b56c63713af30d14243653745436165b418a3368601a699b744f6fe61ce645c980319eb159395d68166a3815c5f4 WHIRLPOOL b6675fecbb922379bd50c351abe1553fdbda53543fce56451c688e25a3fa2e9d0813d8f3a349b623b85fcb4016fc4710f6746a224ba7673ec0d2106c7635d3d1 +DIST postgis-2.3.3.tar.gz 11342032 SHA256 723d43a1c8ca4cf06359ec0b7fd5521b355db4e37128a26fb8c661b1fe2fc930 SHA512 c0ec4b4b5c470e5f88d1bb72c528269a0cf954981385580db3333502c2da74e431b5a86e3d6427c839c3d4440122be18a69261c8205aa71c8aa4b790550c5e9c WHIRLPOOL 427d4637e0073ad549cd2e74d117b2dc2b0b0e5fff98f9a0bbee3514c00b3688dd56acd7bb3f1742eda61238cf8c5ab81cea6ead7ea5880261b753a86e0f847e +DIST postgis-2.4.0.tar.gz 12576979 SHA256 02baa90f04da41e04b6c18eedfda53110c45ae943d4e65050f6d202f7de07d29 SHA512 813e8e9feb75b58673afaec2dda3b5d8fc586a0f483c553795c8ae2b917bb67a9741e8c901787a0b914c327848323239346f1d816aa60b47d5a7065596de0067 WHIRLPOOL 75403b5d1babdc1d714d29a6c1f86dfcd1503997536d6a35333b6e19c72de44aa131cba3c6a9a4f2ced59a280eb0eaee41696fa8440c2028f8555d6a2c4dcd3b +EBUILD postgis-2.1.8-r1.ebuild 7353 SHA256 e99d42f70adee30cea1d6ef8c2f87185cd07ac314ec407cc053dbbb82f52c480 SHA512 f7341c7ec07f6fefa9b904aa915bef8ac309cd17595f246e26efdc0d932476bee7cc6264c8bdd98b02b0637c2cd24ce31a2aa7799ccf8f4f9d19b6192584a856 WHIRLPOOL 0904d54d41c094dd0cf3de73230bc33d0ff12562ac074dc7c362cb8dc1d57baa309ba30c74571fed4556e633b6bcbec21c196c7fa364e2f3610e651f98a3278a +EBUILD postgis-2.3.3.ebuild 2734 SHA256 0ede97176d14f51bfce0a63646327d759e7214cc50116ed469d0fa58fbc84330 SHA512 04b648cf53497cfb0f5fcdd7a3c033a01f62180f60d82d427d9a163a09484be8c09a63e188237abab37e5028fa36ac2075094d19e96211d50238bb8b95e1234f WHIRLPOOL 634cdce7b397b582194f4b8e050fa2b3e0dad71b855b4b167fa2e8d2811f8b08a8031738718f1785d7ac26c64ec2a84ffe5ec8e90a0f49cc19de06e99a0973a6 +EBUILD postgis-2.4.0.ebuild 2737 SHA256 fb130b6a3f58c723dd74f6fdcc7a554573d763c05dbfb3e8da9fde5310d3b925 SHA512 2bd729a3fb41cac6e283f045741de3fdfb5789849b025cdb76ff9ace385309a2838c6e001a110e853d0f98992d411265634af0526c7f7891ffe4a7269fb35cf6 WHIRLPOOL f00170fcfc1dc542dd852646a8fa1d066e8207238c34ae76c922dbf8b0887ef9905659c6948b1b8f9bf2e1ca86560e45282501b266266ef55463232a3703cd40 +EBUILD postgis-9999.ebuild 2645 SHA256 5086db52abc3f8a51401593892239a77b00dc0ae835c424250ed5632c2ae31a7 SHA512 fc23662b423b3a07d6bd79c36d83677f3bc09975b93259a20b8d46d19eb95542456df9785e21c40d44c6c833cddc08cb34c1b9c214323d2b1661b33262c49e10 WHIRLPOOL ea7254ee0405d04b15169371d371f91b065210b1e2de1283598be5115cb4d06253632783e3ea7118ac95d31ec2cbb7292466feb7bf9cc21d7616ea7ac24313ba +MISC ChangeLog 6529 SHA256 27002d9667de8a361e347cc66c2fc804054e53b1834548a3229526d472d5c36c SHA512 e5011139d4d58675b1513bb128e07c589bfa65a8d6ac9e2d43366f50d8a8cd38f6b08d39b1b6adeff3af0579c22403a5b1643f4f290be3c8a8a08fbf33c00570 WHIRLPOOL 93ed801a763374b3a6afe680e8711fedd7a9e0a149ffb7dc8352664b1f1cc7284886415f879aa1ac2f5b12aec3591e032e1814559c0414fb5f13654c96cddbd6 +MISC ChangeLog-2015 15421 SHA256 0f3e682af97970b63f483d38082d202cad0ce391e805f545590a37fc9fc2c3b3 SHA512 71d3a8f9f00ecdb484fead44508a1f15674b546d60533addf7f91c94d028800b098f52b1172ec028b6c85470154a4b364f10c9e1c8e0e6d0d8139d1aac8b9c6a WHIRLPOOL 651c4e132f36162267fe3473136aecfb8f6266a22d2715989697ff8319c933b058fb3a9fdbcefc6abc9451e5b3da72d94c05c51e31dc90bf6a09dd9e166330d6 +MISC metadata.xml 506 SHA256 ef5bf9003c7834db20fcd1278ec11d36d5e7230c09f25cac7ae4e9b59f70ae74 SHA512 5cbe7ca8eb33c99d029f9491189b1cbe76506b7ff375eba688e9975edc89c2f0518eb65e703c4fcc48600949718b932408fb87217cc3eda2074d9da1577c2803 WHIRLPOOL 255644f4eb56f3964a15388fcdef709483a1e44d1332b9980f58b8cfe9d973a5782363da188fae64811fa0efbb2294d2b232b16c394b304ed1cb66ed3086188c diff --git a/dev-db/postgis/files/postgis-2.0-arflags.patch b/dev-db/postgis/files/postgis-2.0-arflags.patch new file mode 100644 index 000000000000..fa2e9a8da607 --- /dev/null +++ b/dev-db/postgis/files/postgis-2.0-arflags.patch @@ -0,0 +1,18 @@ +diff -Naruw a/raster/rt_core/Makefile.in b/raster/rt_core/Makefile.in +--- a/raster/rt_core/Makefile.in 2012-03-21 21:36:59.000000000 +0000 ++++ b/raster/rt_core/Makefile.in 2013-04-28 13:23:21.055728249 +0000 +@@ -8,7 +8,7 @@ + # + ############################################################################# + +-AR=ar rs ++ARFLAGS=rs + + CC=@CC@ + LIBLWGEOM_LDFLAGS=../../liblwgeom/.libs/liblwgeom.a +@@ -35,4 +35,4 @@ + rm -f Makefile + + librtcore.a: $(RT_OBJS) $(RT_HEADERS) +- $(AR) $(RT_LIB) $(RT_OBJS) ++ $(AR) $(ARFLAGS) $(RT_LIB) $(RT_OBJS) diff --git a/dev-db/postgis/files/postgis-2.1-ldflags.patch b/dev-db/postgis/files/postgis-2.1-ldflags.patch new file mode 100644 index 000000000000..de11510ea37b --- /dev/null +++ b/dev-db/postgis/files/postgis-2.1-ldflags.patch @@ -0,0 +1,26 @@ +diff -Naruw postgis-2.1.0rc1.orig/loader/Makefile.in postgis-2.1.0rc1/loader/Makefile.in +--- postgis-2.1.0rc1.orig/loader/Makefile.in 2013-05-06 08:30:51.000000000 +0000 ++++ postgis-2.1.0rc1/loader/Makefile.in 2013-07-14 17:19:19.313306844 +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/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/files/postgis-2.2.0-arflags.patch b/dev-db/postgis/files/postgis-2.2.0-arflags.patch new file mode 100644 index 000000000000..97770042d8f6 --- /dev/null +++ b/dev-db/postgis/files/postgis-2.2.0-arflags.patch @@ -0,0 +1,18 @@ +diff -Naruw a/raster/rt_core/Makefile.in b/raster/rt_core/Makefile.in +--- a/raster/rt_core/Makefile.in 2015-05-13 14:13:18.000000000 -0400 ++++ b/raster/rt_core/Makefile.in 2015-12-14 16:49:49.166156232 -0500 +@@ -18,7 +18,7 @@ + # + ############################################################################# + +-AR = ar rs ++ARFLAGS = rs + + CC = @CC@ + LIBLWGEOM_LDFLAGS = ../../liblwgeom/.libs/liblwgeom.a +@@ -64,4 +64,4 @@ + rm -f Makefile + + librtcore.a: $(RT_OBJS) +- $(AR) $(RT_LIB) $(RT_OBJS) ++ $(AR) $(ARFLAGS) $(RT_LIB) $(RT_OBJS) diff --git a/dev-db/postgis/files/postgis_dbs b/dev-db/postgis/files/postgis_dbs new file mode 100644 index 000000000000..8a414157f6c6 --- /dev/null +++ b/dev-db/postgis/files/postgis_dbs @@ -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.3 to 1.5 +#upgrade_from_1_3=( "upgrade" "these" "databases" ) + +# Upgrade from PostGIS 1.4 to 1.5 +#upgrade_from_1_4=( "upgrade" "these" "databases" ) + +# Perform a minor upgrade for PostGIS 1.5 +#upgrade_from_1_5=( "upgrade" "these" "databases" ) + +# Uncomment this once you're satisfied with the settings in this file. +#configured="true" diff --git a/dev-db/postgis/metadata.xml b/dev-db/postgis/metadata.xml new file mode 100644 index 000000000000..41af88acdf31 --- /dev/null +++ b/dev-db/postgis/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>pgsql-bugs@gentoo.org</email> + <name>PostgreSQL and Related Package Development</name> + </maintainer> + <maintainer type="project"> + <email>sci-geosciences@gentoo.org</email> + <name>Gentoo Geosciences Project</name> + </maintainer> + <use> + <flag name="gtk">Build shp2pgsql-gui a graphical interface to shp2pgsql</flag> + </use> +</pkgmetadata> diff --git a/dev-db/postgis/postgis-2.1.8-r1.ebuild b/dev-db/postgis/postgis-2.1.8-r1.ebuild new file mode 100644 index 000000000000..7b1340edd962 --- /dev/null +++ b/dev-db/postgis/postgis-2.1.8-r1.ebuild @@ -0,0 +1,281 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" +POSTGRES_COMPAT=( 9.{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 x86 ~amd64-linux ~x86-linux" +IUSE="doc gtk static-libs test" + +RDEPEND=" + || ( + dev-db/postgresql:9.4[server] + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[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 + virtual/imagemagick-tools[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" + +MAKEOPTS+=' -j1' + +# 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_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_match + server_match=$(psql -U ${pguser} -d postgres -p ${PGPORT} \ + -Aqwtc 'SELECT version()' 2> /dev/null | grep -c "PostgreSQL ${PGSLOT}") + if [[ $? = 0 ]] ; then + if [[ $server_match -ne 1 ]] ; 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 "Currently, only one PostgreSQL slot at a time can be PostGIS enabled." +} diff --git a/dev-db/postgis/postgis-2.3.3.ebuild b/dev-db/postgis/postgis-2.3.3.ebuild new file mode 100644 index 000000000000..87001946ec62 --- /dev/null +++ b/dev-db/postgis/postgis-2.3.3.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +POSTGRES_COMPAT=( 9.{2..6} ) +POSTGRES_USEDEP="server" + +inherit autotools eutils postgres-multi 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 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc gtk static-libs test" + +RDEPEND=" + ${POSTGRES_DEP} + dev-libs/json-c + dev-libs/libxml2:2 + >=sci-libs/geos-3.5.0 + >=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 ) ${POSTGRES_REQ_USE}" + +# Needs a running psql instance, doesn't work out of the box +RESTRICT="test" + +MAKEOPTS+=' -j1' + +# 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" + +src_prepare() { + eapply "${FILESDIR}/${PN}-2.2.0-arflags.patch" + + local AT_M4DIR="macros" + eautoreconf + postgres-multi_src_prepare +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + postgres-multi_foreach econf ${myargs} +} + +src_compile() { + postgres-multi_foreach emake + postgres-multi_foreach emake -C topology + + if use doc ; then + postgres-multi_foreach emake comments + postgres-multi_foreach emake cheatsheets + postgres-multi_forbest emake -C doc html + fi +} + +src_install() { + postgres-multi_foreach emake DESTDIR="${D}" install + postgres-multi_foreach emake -C topology DESTDIR="${D}" install + postgres-multi_forbest dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + docinto topology + dodoc topology/{TODO,README} + + if use doc ; then + postgres-multi_foreach emake DESTDIR="${D}" comments-install + + docinto html + postgres-multi_forbest dodoc doc/html/{postgis.html,style.css} + + docinto html/images + postgres-multi_forbest dodoc doc/html/images/* + fi + + use static-libs || find "${ED}" -name '*.a' -delete +} + +pkg_postinst() { + ebegin "Refreshing PostgreSQL symlinks" + postgresql-config update + eend $? + + elog "To finish installing PostGIS, follow the directions detailed at:" + elog "http://postgis.net/docs/manual-${PGIS}/postgis_installation.html#create_new_db_extensions" +} diff --git a/dev-db/postgis/postgis-2.4.0.ebuild b/dev-db/postgis/postgis-2.4.0.ebuild new file mode 100644 index 000000000000..18cd48cf4505 --- /dev/null +++ b/dev-db/postgis/postgis-2.4.0.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +POSTGRES_COMPAT=( 9.{2..6} 10 ) +POSTGRES_USEDEP="server" + +inherit autotools eutils postgres-multi 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 ~x86 ~amd64-linux ~x86-linux" +IUSE="doc gtk static-libs test" + +RDEPEND=" + ${POSTGRES_DEP} + dev-libs/json-c + dev-libs/libxml2:2 + >=sci-libs/geos-3.5.0 + >=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 ) ${POSTGRES_REQ_USE}" + +# Needs a running psql instance, doesn't work out of the box +RESTRICT="test" + +MAKEOPTS+=' -j1' + +# 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" + +src_prepare() { + eapply "${FILESDIR}/${PN}-2.2.0-arflags.patch" + + local AT_M4DIR="macros" + eautoreconf + postgres-multi_src_prepare +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + postgres-multi_foreach econf ${myargs} +} + +src_compile() { + postgres-multi_foreach emake + postgres-multi_foreach emake -C topology + + if use doc ; then + postgres-multi_foreach emake comments + postgres-multi_foreach emake cheatsheets + postgres-multi_forbest emake -C doc html + fi +} + +src_install() { + postgres-multi_foreach emake DESTDIR="${D}" install + postgres-multi_foreach emake -C topology DESTDIR="${D}" install + postgres-multi_forbest dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + docinto topology + dodoc topology/{TODO,README} + + if use doc ; then + postgres-multi_foreach emake DESTDIR="${D}" comments-install + + docinto html + postgres-multi_forbest dodoc doc/html/{postgis.html,style.css} + + docinto html/images + postgres-multi_forbest dodoc doc/html/images/* + fi + + use static-libs || find "${ED}" -name '*.a' -delete +} + +pkg_postinst() { + ebegin "Refreshing PostgreSQL symlinks" + postgresql-config update + eend $? + + elog "To finish installing PostGIS, follow the directions detailed at:" + elog "http://postgis.net/docs/manual-${PGIS}/postgis_installation.html#create_new_db_extensions" +} diff --git a/dev-db/postgis/postgis-9999.ebuild b/dev-db/postgis/postgis-9999.ebuild new file mode 100644 index 000000000000..c112970c7060 --- /dev/null +++ b/dev-db/postgis/postgis-9999.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +POSTGRES_COMPAT=( 9.{3..6} 10 ) +POSTGRES_USEDEP="server" + +inherit autotools eutils postgres-multi subversion versionator + +MY_PV=$(replace_version_separator 3 '') +MY_P="${PN}-${MY_PV}" +S="${WORKDIR}/${MY_P}" + +ESVN_REPO_URI="http://svn.osgeo.org/postgis/trunk/" + +DESCRIPTION="Geographic Objects for PostgreSQL" +HOMEPAGE="http://postgis.net" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="doc gtk static-libs test" + +RDEPEND=" + ${POSTGRES_DEP} + 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 + virtual/imagemagick-tools[png] + ) + virtual/pkgconfig + test? ( dev-util/cunit ) +" + +REQUIRED_USE="test? ( doc )" + +# Needs a running psql instance, doesn't work out of the box +RESTRICT="test" + +MAKEOPTS+=' -j1' + +src_prepare() { + source "${S}"/Version.config + export PGIS="${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}" + + # 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. + export QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" + + eapply_user + + local AT_M4DIR="macros" + eautoreconf + postgres-multi_src_prepare +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + postgres-multi_foreach econf ${myargs} +} + +src_compile() { + postgres-multi_foreach emake + postgres-multi_foreach emake -C topology + + if use doc ; then + postgres-multi_foreach emake comments + postgres-multi_foreach emake cheatsheets + postgres-multi_forbest emake -C doc html + fi +} + +src_install() { + postgres-multi_foreach emake DESTDIR="${D}" install + postgres-multi_foreach emake -C topology DESTDIR="${D}" install + postgres-multi_forbest dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + docinto topology + dodoc topology/{TODO,README} + + if use doc ; then + postgres-multi_foreach emake DESTDIR="${D}" comments-install + + docinto html + postgres-multi_forbest dodoc doc/html/{postgis.html,style.css} + + docinto html/images + postgres-multi_forbest dodoc doc/html/images/* + fi + + use static-libs || find "${ED}" -name '*.a' -delete +} + +pkg_postinst() { + ebegin "Refreshing PostgreSQL symlinks" + postgresql-config update + eend $? + + elog "To finish installing PostGIS, follow the directions detailed at:" + elog "http://postgis.net/docs/manual-dev/postgis_installation.html#create_new_db_extensions" +} |