Gentoo Archives: gentoo-commits

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