Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/postgis/
Date: Thu, 30 Jan 2020 19:58:40
Message-Id: 1580414305.0013ad54f8a1b802403d20be7989895d07f19133.asturm@gentoo
1 commit: 0013ad54f8a1b802403d20be7989895d07f19133
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 30 19:54:55 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 30 19:58:25 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0013ad54
7
8 dev-db/postgis: Sync 2.5.3 with 9999, fix dependencies
9
10 Package-Manager: Portage-2.3.86, Repoman-2.3.20
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 dev-db/postgis/postgis-2.5.3-r1.ebuild | 135 +++++++++++++++++++++++++++++++++
14 1 file changed, 135 insertions(+)
15
16 diff --git a/dev-db/postgis/postgis-2.5.3-r1.ebuild b/dev-db/postgis/postgis-2.5.3-r1.ebuild
17 new file mode 100644
18 index 00000000000..5c308dbe1b1
19 --- /dev/null
20 +++ b/dev-db/postgis/postgis-2.5.3-r1.ebuild
21 @@ -0,0 +1,135 @@
22 +# Copyright 1999-2020 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +
27 +POSTGRES_COMPAT=( 9.{4..6} {10..12} )
28 +POSTGRES_USEDEP="server"
29 +inherit autotools eapi7-ver postgres-multi
30 +
31 +MY_P="${PN}-$(ver_rs 3 '')"
32 +
33 +if [[ ${PV} = *9999* ]] ; then
34 + inherit git-r3
35 + EGIT_REPO_URI="https://git.osgeo.org/gitea/postgis/postgis.git"
36 +else
37 + PGIS="$(ver_cut 1-2)"
38 + SRC_URI="https://download.osgeo.org/postgis/source/${MY_P}.tar.gz"
39 + KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
40 +fi
41 +
42 +DESCRIPTION="Geographic Objects for PostgreSQL"
43 +HOMEPAGE="https://postgis.net"
44 +
45 +S="${WORKDIR}/${MY_P}"
46 +
47 +LICENSE="GPL-2"
48 +SLOT="0"
49 +IUSE="address-standardizer doc gtk mapbox static-libs test topology"
50 +
51 +REQUIRED_USE="test? ( doc ) ${POSTGRES_REQ_USE}"
52 +
53 +# Needs a running psql instance, doesn't work out of the box
54 +RESTRICT="test"
55 +
56 +RDEPEND="${POSTGRES_DEP}
57 + dev-libs/json-c:=
58 + dev-libs/libxml2:2
59 + >=sci-libs/geos-3.5.0
60 + >=sci-libs/proj-4.6.0:=
61 + >=sci-libs/gdal-1.10.0
62 + address-standardizer? ( dev-libs/libpcre )
63 + gtk? ( x11-libs/gtk+:2 )
64 + mapbox? ( dev-libs/protobuf-c:= )
65 +"
66 +DEPEND="${RDEPEND}
67 + virtual/pkgconfig
68 + doc? (
69 + app-text/docbook-xsl-stylesheets
70 + app-text/docbook-xml-dtd:4.5
71 + dev-libs/libxslt
72 + virtual/imagemagick-tools[png]
73 + )
74 + test? ( dev-util/cunit )
75 +"
76 +
77 +PATCHES=( "${FILESDIR}/${PN}-2.2.0-arflags.patch" )
78 +
79 +src_prepare() {
80 + default
81 +
82 + if [[ ${PV} = *9999* ]] ; then
83 + source "${S}"/Version.config
84 + PGIS="${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}"
85 + fi
86 +
87 + # These modules are built using the same *FLAGS that were used to build
88 + # dev-db/postgresql. The right thing to do is to ignore the current
89 + # *FLAGS settings.
90 + QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
91 +
92 + local AT_M4DIR="macros"
93 + eautoreconf
94 +
95 + postgres-multi_src_prepare
96 +}
97 +
98 +src_configure() {
99 + local myeconfargs=(
100 + $(use_with address-standardizer)
101 + $(use_with gtk gui)
102 + $(use_with mapbox protobuf)
103 + $(use_with topology)
104 + )
105 + postgres-multi_foreach econf "${myeconfargs[@]}"
106 +}
107 +
108 +src_compile() {
109 + postgres-multi_foreach emake
110 + postgres-multi_foreach emake -C topology
111 +
112 + if use doc ; then
113 + postgres-multi_foreach emake comments
114 + postgres-multi_foreach emake cheatsheets
115 + postgres-multi_forbest emake -C doc html
116 + fi
117 +}
118 +
119 +src_install() {
120 + postgres-multi_foreach emake DESTDIR="${D}" install
121 + postgres-multi_foreach emake -C topology DESTDIR="${D}" install
122 + postgres-multi_forbest dobin ./utils/postgis_restore.pl
123 +
124 + dodoc CREDITS TODO loader/README.* doc/*txt
125 +
126 + docinto topology
127 + dodoc topology/{TODO,README}
128 +
129 + if use doc ; then
130 + postgres-multi_foreach emake DESTDIR="${D}" comments-install
131 +
132 + docinto html
133 + postgres-multi_forbest dodoc doc/html/{postgis.html,style.css}
134 +
135 + docinto html/images
136 + postgres-multi_forbest dodoc doc/html/images/*
137 + fi
138 +
139 + use static-libs || find "${ED}" -name '*.a' -delete
140 +}
141 +
142 +pkg_postinst() {
143 + ebegin "Refreshing PostgreSQL symlinks"
144 + postgresql-config update
145 + eend $?
146 +
147 + local base_uri="https://postgis.net/docs/manual-"
148 + if [[ ${PV} = *9999* ]] ; then
149 + base_uri+="dev"
150 + else
151 + base_uri+="${PGIS}"
152 + fi
153 +
154 + elog "To finish installing PostGIS, follow the directions detailed at:"
155 + elog "${base_uri}/postgis_installation.html#create_new_db_extensions"
156 +}