Gentoo Archives: gentoo-commits

From: "Göktürk Yüksek" <gokturk@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libpreludedb/files/, dev-libs/libpreludedb/
Date: Tue, 24 Dec 2019 21:55:16
Message-Id: 1577224464.d7485fdaa2a9a210b57cb5ea0a42d6e36d8d3120.gokturk@gentoo
1 commit: d7485fdaa2a9a210b57cb5ea0a42d6e36d8d3120
2 Author: Thomas Andrejak <thomas.andrejak <AT> gmail <DOT> com>
3 AuthorDate: Thu Nov 7 01:37:29 2019 +0000
4 Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 24 21:54:24 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7485fda
7
8 dev-libs/libpreludedb: Bump version 5.1
9
10 Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
11
12 dev-libs/libpreludedb/Manifest | 1 +
13 .../files/libpreludedb-5.1.0-fix_gtkdoc_1.32.patch | 13 +
14 .../files/libpreludedb-5.1.0-fix_py38.patch | 11 +
15 .../libpreludedb-5.1.0-update_m4_postgresql.patch | 544 +++++++++++++++++++++
16 dev-libs/libpreludedb/libpreludedb-5.1.0.ebuild | 95 ++++
17 5 files changed, 664 insertions(+)
18
19 diff --git a/dev-libs/libpreludedb/Manifest b/dev-libs/libpreludedb/Manifest
20 index 4992f8d73c4..5310cde2e2f 100644
21 --- a/dev-libs/libpreludedb/Manifest
22 +++ b/dev-libs/libpreludedb/Manifest
23 @@ -2,3 +2,4 @@ DIST libpreludedb-3.0.0.tar.gz 1269937 BLAKE2B 6f6bad7b9529b88bd03b224c1ea4066b9
24 DIST libpreludedb-3.1.0.tar.gz 1291186 BLAKE2B 90b3b6264f0042b14e54abfc3068071419646076fc6cfa3dd84ba6c14797fb0ea88885edef47b8a5d0dc455468e6daaa8e795b621a4f9001d19d8edc33630a88 SHA512 dcb98eff2521979c2956bdd6f3b661c346c0f6748ef820a75d77c948e426a996de26c7fc6b6c2abddc93277db3820eb2f44b61c87feb86483e720cf9b0e0124c
25 DIST libpreludedb-4.0.0.tar.gz 1325812 BLAKE2B 7a506f7cd7b51898e26201f2cc640b1f34227f9cf7c5c6e2385480f1fc0ad854b6d747293ab502b641cc65f1ee9ae4a8f225e6a1d4489bcaa59901c6342f1279 SHA512 13f5dbcfa6af965f2075d60c645ebb19cbd6b18807b26f4f13a7a05f1cf552996f9846e856728a4e1dc621efda693016e82623d4a3cbf74849b3e7114f19faca
26 DIST libpreludedb-4.1.0.tar.gz 1333638 BLAKE2B 380a6d4ef8836555510f9f9882b6100417f2567520c421355fb7eec8d2cd7e2f3942c4cb90ea21fa1557327026edd5c1e35e338a79e06a21cfb2bd6813a289c2 SHA512 de1fa5106d7f34edb5a23e726c968de84bb8b10257587b6ee36276ed75ddc54f4f9539aecb7836e114eb3bfa90104dd3b5e097be0c3d12347dcbded94f293dc4
27 +DIST libpreludedb-5.1.0.tar.gz 1374511 BLAKE2B 569324a5ae484b1d13ac729f25a2f7f8924a8dced923859cdc393289acf0c0cf098ae6e0f9f572a707c85aa9af4a27bbaa0927e20d610b423e2aae86718d232b SHA512 9e45e0f7a945eef254f8e59c0c7212c6afca897584ea8f2c88e16478fde448abdeeb991828cc2482373d2c735e1229f1a11fe9780e40da1a8aed867fe158f481
28
29 diff --git a/dev-libs/libpreludedb/files/libpreludedb-5.1.0-fix_gtkdoc_1.32.patch b/dev-libs/libpreludedb/files/libpreludedb-5.1.0-fix_gtkdoc_1.32.patch
30 new file mode 100644
31 index 00000000000..ecc6d5dc4e0
32 --- /dev/null
33 +++ b/dev-libs/libpreludedb/files/libpreludedb-5.1.0-fix_gtkdoc_1.32.patch
34 @@ -0,0 +1,13 @@
35 +--- a/docs/api/libpreludedb-docs.xml
36 ++++ b/docs/api/libpreludedb-docs.xml
37 +@@ -26,10 +26,6 @@
38 + <xi:include href="xml/preludedb-sql-settings.xml"/>
39 +
40 + </chapter>
41 +- <chapter id="object-tree">
42 +- <title>Object Hierarchy</title>
43 +- <xi:include href="xml/tree_index.sgml"/>
44 +- </chapter>
45 + <index id="api-index-full">
46 + <title>API Index</title>
47 + <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
48
49 diff --git a/dev-libs/libpreludedb/files/libpreludedb-5.1.0-fix_py38.patch b/dev-libs/libpreludedb/files/libpreludedb-5.1.0-fix_py38.patch
50 new file mode 100644
51 index 00000000000..a2a6a0a8be0
52 --- /dev/null
53 +++ b/dev-libs/libpreludedb/files/libpreludedb-5.1.0-fix_py38.patch
54 @@ -0,0 +1,11 @@
55 +--- a/bindings/python/_preludedb.cxx
56 ++++ b/bindings/python/_preludedb.cxx
57 +@@ -3133,7 +3133,7 @@
58 +
59 + SWIGINTERN void
60 + SwigPyStaticVar_dealloc(PyDescrObject *descr) {
61 +- _PyObject_GC_UNTRACK(descr);
62 ++ PyObject_GC_UnTrack(descr);
63 + Py_XDECREF(PyDescr_TYPE(descr));
64 + Py_XDECREF(PyDescr_NAME(descr));
65 + PyObject_GC_Del(descr);
66
67 diff --git a/dev-libs/libpreludedb/files/libpreludedb-5.1.0-update_m4_postgresql.patch b/dev-libs/libpreludedb/files/libpreludedb-5.1.0-update_m4_postgresql.patch
68 new file mode 100644
69 index 00000000000..5bd38a6f4c1
70 --- /dev/null
71 +++ b/dev-libs/libpreludedb/files/libpreludedb-5.1.0-update_m4_postgresql.patch
72 @@ -0,0 +1,544 @@
73 +--- a/m4/ax_lib_postgresql.m4
74 ++++ b/m4/ax_lib_postgresql.m4
75 +@@ -1,10 +1,10 @@
76 + # ===========================================================================
77 +-# http://www.gnu.org/software/autoconf-archive/ax_lib_postgresql.html
78 ++# https://www.gnu.org/software/autoconf-archive/ax_lib_postgresql.html
79 + # ===========================================================================
80 + #
81 + # SYNOPSIS
82 + #
83 +-# AX_LIB_POSTGRESQL([MINIMUM-VERSION])
84 ++# AX_LIB_POSTGRESQL([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
85 + #
86 + # DESCRIPTION
87 + #
88 +@@ -23,133 +23,225 @@
89 + # should be in the PATH)
90 + #
91 + # path - complete path to pg_config utility, use this option if pg_config
92 +-# can't be found in the PATH
93 ++# can't be found in the PATH (You could set also PG_CONFIG variable)
94 + #
95 + # This macro calls:
96 + #
97 +-# AC_SUBST(POSTGRESQL_CFLAGS)
98 ++# AC_SUBST(POSTGRESQL_CPPFLAGS)
99 + # AC_SUBST(POSTGRESQL_LDFLAGS)
100 ++# AC_SUBST(POSTGRESQL_LIBS)
101 + # AC_SUBST(POSTGRESQL_VERSION)
102 + #
103 + # And sets:
104 + #
105 + # HAVE_POSTGRESQL
106 + #
107 ++# It execute if found ACTION-IF-FOUND (empty by default) and
108 ++# ACTION-IF-NOT-FOUND (AC_MSG_FAILURE by default) if not found.
109 ++#
110 + # LICENSE
111 + #
112 + # Copyright (c) 2008 Mateusz Loskot <mateusz@××××××.net>
113 ++# Copyright (c) 2014 Sree Harsha Totakura <sreeharsha@××××××××.in>
114 ++# Copyright (c) 2018 Bastien Roucaries <rouca@××××××.org>
115 + #
116 + # Copying and distribution of this file, with or without modification, are
117 + # permitted in any medium without royalty provided the copyright notice
118 + # and this notice are preserved. This file is offered as-is, without any
119 + # warranty.
120 +
121 +-#serial 9
122 ++#serial 22
123 ++
124 ++AC_DEFUN([_AX_LIB_POSTGRESQL_OLD],[
125 ++ found_postgresql="no"
126 ++ _AX_LIB_POSTGRESQL_OLD_fail="no"
127 ++ while true; do
128 ++ AC_CACHE_CHECK([for the pg_config program], [ac_cv_path_PG_CONFIG],
129 ++ [AC_PATH_PROGS_FEATURE_CHECK([PG_CONFIG], [pg_config],
130 ++ [[ac_cv_path_PG_CONFIG="";$ac_path_PG_CONFIG --includedir > /dev/null \
131 ++ && ac_cv_path_PG_CONFIG=$ac_path_PG_CONFIG ac_path_PG_CONFIG_found=:]],
132 ++ [ac_cv_path_PG_CONFIG=""])])
133 ++ PG_CONFIG=$ac_cv_path_PG_CONFIG
134 ++ AS_IF([test "X$PG_CONFIG" = "X"],[break])
135 ++
136 ++ AC_CACHE_CHECK([for the PostgreSQL libraries CPPFLAGS],[ac_cv_POSTGRESQL_CPPFLAGS],
137 ++ [ac_cv_POSTGRESQL_CPPFLAGS="-I`$PG_CONFIG --includedir`" || _AX_LIB_POSTGRESQL_OLD_fail=yes])
138 ++ AS_IF([test "X$_AX_LIB_POSTGRESQL_OLD_fail" = "Xyes"],[break])
139 ++ POSTGRESQL_CPPFLAGS="$ac_cv_POSTGRESQL_CPPFLAGS"
140 ++
141 ++ AC_CACHE_CHECK([for the PostgreSQL libraries LDFLAGS],[ac_cv_POSTGRESQL_LDFLAGS],
142 ++ [ac_cv_POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir`" || _AX_LIB_POSTGRESQL_OLD_fail=yes])
143 ++ AS_IF([test "X$_AX_LIB_POSTGRESQL_OLD_fail" = "Xyes"],[break])
144 ++ POSTGRESQL_LDFLAGS="$ac_cv_POSTGRESQL_LDFLAGS"
145 ++
146 ++ AC_CACHE_CHECK([for the PostgreSQL libraries LIBS],[ac_cv_POSTGRESQL_LIBS],
147 ++ [ac_cv_POSTGRESQL_LIBS="-lpq"])
148 ++ POSTGRESQL_LIBS="$ac_cv_POSTGRESQL_LIBS"
149 ++
150 ++ AC_CACHE_CHECK([for the PostgreSQL version],[ac_cv_POSTGRESQL_VERSION],
151 ++ [
152 ++ ac_cv_POSTGRESQL_VERSION=`$PG_CONFIG --version | sed "s/^PostgreSQL[[[:space:]]][[[:space:]]]*\([[0-9.]][[0-9.]]*\).*/\1/"` \
153 ++ || _AX_LIB_POSTGRESQL_OLD_fail=yes
154 ++ ])
155 ++ AS_IF([test "X$_AX_LIB_POSTGRESQL_OLD_fail" = "Xyes"],[break])
156 ++ POSTGRESQL_VERSION="$ac_cv_POSTGRESQL_VERSION"
157 ++
158 ++
159 ++ dnl
160 ++ dnl Check if required version of PostgreSQL is available
161 ++ dnl
162 ++ AS_IF([test X"$postgresql_version_req" != "X"],[
163 ++ AC_MSG_CHECKING([if PostgreSQL version $POSTGRESQL_VERSION is >= $postgresql_version_req])
164 ++ AX_COMPARE_VERSION([$POSTGRESQL_VERSION],[ge],[$postgresql_version_req],
165 ++ [found_postgresql_req_version=yes],[found_postgresql_req_version=no])
166 ++ AC_MSG_RESULT([$found_postgresql_req_version])
167 ++ ])
168 ++ AS_IF([test "Xfound_postgresql_req_version" = "Xno"],[break])
169 ++
170 ++ found_postgresql="yes"
171 ++ break
172 ++ done
173 ++])
174 ++
175 ++AC_DEFUN([_AX_LIB_POSTGRESQL_PKG_CONFIG],
176 ++[
177 ++ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
178 ++ found_postgresql=no
179 ++
180 ++ while true; do
181 ++ PKG_PROG_PKG_CONFIG
182 ++ AS_IF([test X$PKG_CONFIG = X],[break])
183 ++
184 ++ _AX_LIB_POSTGRESQL_PKG_CONFIG_fail=no;
185 ++ AS_IF([test "X$postgresql_version_req" = "X"],
186 ++ [PKG_CHECK_EXISTS([libpq],[found_postgresql_pkg_config=yes],[found_postgresql=no])],
187 ++ [PKG_CHECK_EXISTS([libpq >= "$postgresql_version_req"],
188 ++ [found_postgresql=yes],[found_postgresql=no])])
189 ++ AS_IF([test "X$found_postgresql" = "no"],[break])
190 ++
191 ++ AC_CACHE_CHECK([for the PostgreSQL libraries CPPFLAGS],[ac_cv_POSTGRESQL_CPPFLAGS],
192 ++ [ac_cv_POSTGRESQL_CPPFLAGS="`$PKG_CONFIG libpq --cflags-only-I`" || _AX_LIB_POSTGRESQL_PKG_CONFIG_fail=yes])
193 ++ AS_IF([test "X$_AX_LIB_POSTGRESQL_PKG_CONFIG_fail" = "Xyes"],[break])
194 ++ POSTGRESQL_CPPFLAGS="$ac_cv_POSTGRESQL_CPPFLAGS"
195 ++
196 ++
197 ++ AC_CACHE_CHECK([for the PostgreSQL libraries LDFLAGS],[ac_cv_POSTGRESQL_LDFLAGS],
198 ++ [ac_cv_POSTGRESQL_LDFLAGS="`$PKG_CONFIG libpq --libs-only-L --libs-only-other`" || _AX_LIB_POSTGRESQL_PKG_CONFIG_fail=yes])
199 ++ AS_IF([test "X$_AX_LIB_POSTGRESQL_PKG_CONFIG_fail" = "Xyes"],[break])
200 ++ POSTGRESQL_LDFLAGS="$ac_cv_POSTGRESQL_LDFLAGS"
201 ++
202 ++
203 ++ AC_CACHE_CHECK([for the PostgreSQL libraries LIBS],[ac_cv_POSTGRESQL_LIBS],
204 ++ [ac_cv_POSTGRESQL_LIBS="`$PKG_CONFIG libpq --libs-only-l`" || _AX_LIB_POSTGRESQL_PKG_CONFIG_fail=ye])
205 ++ AS_IF([test "X$_AX_LIB_POSTGRESQL_PKG_CONFIG_fail" = "Xyes"],[break])
206 ++ POSTGRESQL_LIBS="$ac_cv_POSTGRESQL_LIBS"
207 ++
208 ++ dnl already checked by exist but need to be recovered
209 ++ AC_CACHE_CHECK([for the PostgreSQL version],[ac_cv_POSTGRESQL_VERSION],
210 ++ [ac_cv_POSTGRESQL_VERSION="`$PKG_CONFIG libpq --modversion`" || _AX_LIB_POSTGRESQL_PKG_CONFIG_fail=yes])
211 ++ AS_IF([test "X$_AX_LIB_POSTGRESQL_PKG_CONFIG_fail" = "Xyes"],[break])
212 ++ POSTGRESQL_VERSION="$ac_cv_POSTGRESQL_VERSION"
213 ++
214 ++ found_postgresql=yes
215 ++ break;
216 ++ done
217 ++
218 ++])
219 ++
220 ++
221 +
222 + AC_DEFUN([AX_LIB_POSTGRESQL],
223 + [
224 + AC_ARG_WITH([postgresql],
225 +- AS_HELP_STRING([--with-postgresql=@<:@ARG@:>@],
226 +- [use PostgreSQL library @<:@default=yes@:>@, optionally specify path to pg_config]
227 +- ),
228 +- [
229 +- if test "$withval" = "no"; then
230 +- want_postgresql="no"
231 +- elif test "$withval" = "yes"; then
232 +- want_postgresql="yes"
233 +- else
234 +- want_postgresql="yes"
235 +- PG_CONFIG="$withval"
236 +- fi
237 +- ],
238 +- [want_postgresql="yes"]
239 ++ AS_HELP_STRING([--with-postgresql=@<:@ARG@:>@],
240 ++ [use PostgreSQL library @<:@default=yes@:>@, optionally specify path to pg_config]
241 ++ ),
242 ++ [
243 ++ AS_CASE([$withval],
244 ++ [[[nN]][[oO]]],[want_postgresql="no"],
245 ++ [[[yY]][[eE]][[sS]]],[want_postgresql="yes"],
246 ++ [
247 ++ want_postgresql="yes"
248 ++ PG_CONFIG="$withval"
249 ++ ])
250 ++ ],
251 ++ [want_postgresql="yes"]
252 + )
253 +
254 +- POSTGRESQL_CFLAGS=""
255 +- POSTGRESQL_LDFLAGS=""
256 +- POSTGRESQL_VERSION=""
257 ++ AC_ARG_VAR([POSTGRESQL_CPPFLAGS],[cpp flags for PostgreSQL overriding detected flags])
258 ++ AC_ARG_VAR([POSTGRESQL_LIBFLAGS],[libs for PostgreSQL overriding detected flags])
259 ++ AC_ARG_VAR([POSTGRESQL_LDFLAGS],[linker flags for PostgreSQL overriding detected flags])
260 ++
261 ++ # populate cache
262 ++ AS_IF([test "X$POSTGRESQL_CPPFLAGS" != X],[ac_cv_POSTGRESQL_CPPFLAGS="$POSTGRESQL_CPPFLAGS"])
263 ++ AS_IF([test "X$POSTGRESQL_LDFLAGS" != X],[ac_cv_POSTGRESQL_LDFLAGS="$POSTGRESQL_LDFLAGS"])
264 ++ AS_IF([test "X$POSTGRESQL_LIBS" != X],[ac_cv_POSTGRESQL_LIBS="$POSTGRESQL_LIBS"])
265 +
266 +- dnl
267 +- dnl Check PostgreSQL libraries (libpq)
268 +- dnl
269 ++ postgresql_version_req=ifelse([$1], [], [], [$1])
270 ++ found_postgresql="no"
271 +
272 +- if test "$want_postgresql" = "yes"; then
273 +- AC_MSG_CHECKING([for $PG_CONFIG])
274 +- if test -z "$PG_CONFIG" -o test; then
275 +- AC_PATH_PROG([PG_CONFIG], [pg_config], [])
276 +- fi
277 +-
278 +- if test ! -x "$PG_CONFIG"; then
279 +- AC_MSG_RESULT([$PG_CONFIG does not exist or it is not an exectuable file])
280 +- PG_CONFIG="no"
281 +- found_postgresql="no"
282 +- fi
283 +-
284 +- if test "$PG_CONFIG" != "no"; then
285 +- AC_MSG_CHECKING([for PostgreSQL libraries])
286 +-
287 +- POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`"
288 +- POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir` -lpq"
289 +-
290 +- POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'`
291 +-
292 +- AC_DEFINE([HAVE_POSTGRESQL], [1],
293 +- [Define to 1 if PostgreSQL libraries are available])
294 +-
295 +- found_postgresql="yes"
296 +- AC_MSG_RESULT([yes])
297 +- else
298 +- found_postgresql="no"
299 +- AC_MSG_RESULT([no])
300 +- fi
301 +- fi
302 ++ POSTGRESQL_VERSION=""
303 +
304 + dnl
305 +- dnl Check if required version of PostgreSQL is available
306 ++ dnl Check PostgreSQL libraries (libpq)
307 + dnl
308 ++ AS_IF([test X"$want_postgresql" = "Xyes"],[
309 ++ _AX_LIB_POSTGRESQL_PKG_CONFIG
310 +
311 +
312 +- postgresql_version_req=ifelse([$1], [], [], [$1])
313 +-
314 +- if test "$found_postgresql" = "yes" -a -n "$postgresql_version_req"; then
315 +-
316 +- AC_MSG_CHECKING([if PostgreSQL version is >= $postgresql_version_req])
317 ++ AS_IF([test X"$found_postgresql" = "Xno"],
318 ++ [_AX_LIB_POSTGRESQL_OLD])
319 +
320 +- dnl Decompose required version string of PostgreSQL
321 +- dnl and calculate its number representation
322 +- postgresql_version_req_major=`expr $postgresql_version_req : '\([[0-9]]*\)'`
323 +- postgresql_version_req_minor=`expr $postgresql_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
324 +- postgresql_version_req_micro=`expr $postgresql_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
325 +- if test "x$postgresql_version_req_micro" = "x"; then
326 +- postgresql_version_req_micro="0"
327 +- fi
328 +-
329 +- postgresql_version_req_number=`expr $postgresql_version_req_major \* 1000000 \
330 +- \+ $postgresql_version_req_minor \* 1000 \
331 +- \+ $postgresql_version_req_micro`
332 +-
333 +- dnl Decompose version string of installed PostgreSQL
334 +- dnl and calculate its number representation
335 +- postgresql_version_major=`expr $POSTGRESQL_VERSION : '\([[0-9]]*\)'`
336 +- postgresql_version_minor=`expr $POSTGRESQL_VERSION : '[[0-9]]*\.\([[0-9]]*\)'`
337 +- postgresql_version_micro=`expr $POSTGRESQL_VERSION : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
338 +- if test "x$postgresql_version_micro" = "x"; then
339 +- postgresql_version_micro="0"
340 +- fi
341 +-
342 +- postgresql_version_number=`expr $postgresql_version_major \* 1000000 \
343 +- \+ $postgresql_version_minor \* 1000 \
344 +- \+ $postgresql_version_micro`
345 +-
346 +- postgresql_version_check=`expr $postgresql_version_number \>\= $postgresql_version_req_number`
347 +- if test "$postgresql_version_check" = "1"; then
348 +- AC_MSG_RESULT([yes])
349 +- else
350 +- AC_MSG_RESULT([no])
351 +- fi
352 +- fi
353 ++ AS_IF([test X"$found_postgresql" = Xyes],[
354 ++ _AX_LIB_POSTGRESQL_OLD_CPPFLAGS="$CPPFLAGS"
355 ++ CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS"
356 ++ _AX_LIB_POSTGRESQL_OLD_LDFLAGS="$LDFLAGS"
357 ++ LDFLAGS="$LDFLAGS $POSTGRESQL_LDFLAGS"
358 ++ _AX_LIB_POSTGRESQL_OLD_LIBS="$LIBS"
359 ++ LIBS="$LIBS $POSTGRESQL_LIBS"
360 ++ while true; do
361 ++ dnl try to compile
362 ++ AC_CHECK_HEADER([libpq-fe.h],[],[found_postgresql=no])
363 ++ AS_IF([test "X$found_postgresql" = "Xno"],[break])
364 ++ dnl try now to link
365 ++ AC_CACHE_CHECK([for the PostgreSQL library linking is working],[ac_cv_postgresql_found],
366 ++ [
367 ++ AC_LINK_IFELSE([
368 ++ AC_LANG_PROGRAM(
369 ++ [
370 ++ #include <libpq-fe.h>
371 ++ ],
372 ++ [[
373 ++ char conninfo[]="dbname = postgres";
374 ++ PGconn *conn;
375 ++ conn = PQconnectdb(conninfo);
376 ++ ]]
377 ++ )
378 ++ ],[ac_cv_postgresql_found=yes],
379 ++ [ac_cv_postgresql_found=no])
380 ++ ])
381 ++ found_postgresql="$ac_cv_postgresql_found"
382 ++ AS_IF([test "X$found_postgresql" = "Xno"],[break])
383 ++ break
384 ++ done
385 ++ CPPFLAGS="$_AX_LIB_POSTGRESQL_OLD_CPPFLAGS"
386 ++ LDFLAGS="$_AX_LIB_POSTGRESQL_OLD_LDFLAGS"
387 ++ LIBS="$_AX_LIB_POSTGRESQL_OLD_LIBS"
388 ++ ])
389 ++
390 ++
391 ++ AS_IF([test "x$found_postgresql" = "xyes"],[
392 ++ AC_DEFINE([HAVE_POSTGRESQL], [1],
393 ++ [Define to 1 if PostgreSQL libraries are available])])
394 ++ ])
395 +
396 + AC_SUBST([POSTGRESQL_VERSION])
397 +- AC_SUBST([POSTGRESQL_CFLAGS])
398 ++ AC_SUBST([POSTGRESQL_CPPFLAGS])
399 + AC_SUBST([POSTGRESQL_LDFLAGS])
400 ++ AC_SUBST([POSTGRESQL_LIBS])
401 ++
402 ++ AS_IF([test "x$found_postgresql" = "xyes"],
403 ++ [ifelse([$2], , :, [$2])],
404 ++ [ifelse([$3], , AS_IF([test X"$want_postgresql" = "Xyes"],[AC_MSG_ERROR([Library requirements (PostgreSQL) not met.])],[:]), [$3])])
405 ++
406 + ])
407 +--- a/configure.ac
408 ++++ b/configure.ac
409 +@@ -158,7 +158,7 @@
410 + dnl ********************************************************
411 + dnl * Check for the PostgreSQL library (PostgreSQL plugin) *
412 + dnl ********************************************************
413 +-AX_LIB_POSTGRESQL()
414 ++AX_LIB_POSTGRESQL([9.0])
415 +
416 + with_pgsql="no"
417 + if test x$POSTGRESQL_VERSION != x; then
418 +--- /dev/null
419 ++++ b/m4/ax_compare_version.m4
420 +@@ -0,0 +1,177 @@
421 ++# ===========================================================================
422 ++# https://www.gnu.org/software/autoconf-archive/ax_compare_version.html
423 ++# ===========================================================================
424 ++#
425 ++# SYNOPSIS
426 ++#
427 ++# AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
428 ++#
429 ++# DESCRIPTION
430 ++#
431 ++# This macro compares two version strings. Due to the various number of
432 ++# minor-version numbers that can exist, and the fact that string
433 ++# comparisons are not compatible with numeric comparisons, this is not
434 ++# necessarily trivial to do in a autoconf script. This macro makes doing
435 ++# these comparisons easy.
436 ++#
437 ++# The six basic comparisons are available, as well as checking equality
438 ++# limited to a certain number of minor-version levels.
439 ++#
440 ++# The operator OP determines what type of comparison to do, and can be one
441 ++# of:
442 ++#
443 ++# eq - equal (test A == B)
444 ++# ne - not equal (test A != B)
445 ++# le - less than or equal (test A <= B)
446 ++# ge - greater than or equal (test A >= B)
447 ++# lt - less than (test A < B)
448 ++# gt - greater than (test A > B)
449 ++#
450 ++# Additionally, the eq and ne operator can have a number after it to limit
451 ++# the test to that number of minor versions.
452 ++#
453 ++# eq0 - equal up to the length of the shorter version
454 ++# ne0 - not equal up to the length of the shorter version
455 ++# eqN - equal up to N sub-version levels
456 ++# neN - not equal up to N sub-version levels
457 ++#
458 ++# When the condition is true, shell commands ACTION-IF-TRUE are run,
459 ++# otherwise shell commands ACTION-IF-FALSE are run. The environment
460 ++# variable 'ax_compare_version' is always set to either 'true' or 'false'
461 ++# as well.
462 ++#
463 ++# Examples:
464 ++#
465 ++# AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
466 ++# AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
467 ++#
468 ++# would both be true.
469 ++#
470 ++# AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
471 ++# AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
472 ++#
473 ++# would both be false.
474 ++#
475 ++# AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
476 ++#
477 ++# would be true because it is only comparing two minor versions.
478 ++#
479 ++# AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
480 ++#
481 ++# would be true because it is only comparing the lesser number of minor
482 ++# versions of the two values.
483 ++#
484 ++# Note: The characters that separate the version numbers do not matter. An
485 ++# empty string is the same as version 0. OP is evaluated by autoconf, not
486 ++# configure, so must be a string, not a variable.
487 ++#
488 ++# The author would like to acknowledge Guido Draheim whose advice about
489 ++# the m4_case and m4_ifvaln functions make this macro only include the
490 ++# portions necessary to perform the specific comparison specified by the
491 ++# OP argument in the final configure script.
492 ++#
493 ++# LICENSE
494 ++#
495 ++# Copyright (c) 2008 Tim Toolan <toolan@×××××××.edu>
496 ++#
497 ++# Copying and distribution of this file, with or without modification, are
498 ++# permitted in any medium without royalty provided the copyright notice
499 ++# and this notice are preserved. This file is offered as-is, without any
500 ++# warranty.
501 ++
502 ++#serial 13
503 ++
504 ++dnl #########################################################################
505 ++AC_DEFUN([AX_COMPARE_VERSION], [
506 ++ AC_REQUIRE([AC_PROG_AWK])
507 ++
508 ++ # Used to indicate true or false condition
509 ++ ax_compare_version=false
510 ++
511 ++ # Convert the two version strings to be compared into a format that
512 ++ # allows a simple string comparison. The end result is that a version
513 ++ # string of the form 1.12.5-r617 will be converted to the form
514 ++ # 0001001200050617. In other words, each number is zero padded to four
515 ++ # digits, and non digits are removed.
516 ++ AS_VAR_PUSHDEF([A],[ax_compare_version_A])
517 ++ A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
518 ++ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
519 ++ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
520 ++ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
521 ++ -e 's/[[^0-9]]//g'`
522 ++
523 ++ AS_VAR_PUSHDEF([B],[ax_compare_version_B])
524 ++ B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
525 ++ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
526 ++ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
527 ++ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
528 ++ -e 's/[[^0-9]]//g'`
529 ++
530 ++ dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
531 ++ dnl # then the first line is used to determine if the condition is true.
532 ++ dnl # The sed right after the echo is to remove any indented white space.
533 ++ m4_case(m4_tolower($2),
534 ++ [lt],[
535 ++ ax_compare_version=`echo "x$A
536 ++x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
537 ++ ],
538 ++ [gt],[
539 ++ ax_compare_version=`echo "x$A
540 ++x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
541 ++ ],
542 ++ [le],[
543 ++ ax_compare_version=`echo "x$A
544 ++x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
545 ++ ],
546 ++ [ge],[
547 ++ ax_compare_version=`echo "x$A
548 ++x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
549 ++ ],[
550 ++ dnl Split the operator from the subversion count if present.
551 ++ m4_bmatch(m4_substr($2,2),
552 ++ [0],[
553 ++ # A count of zero means use the length of the shorter version.
554 ++ # Determine the number of characters in A and B.
555 ++ ax_compare_version_len_A=`echo "$A" | $AWK '{print(length)}'`
556 ++ ax_compare_version_len_B=`echo "$B" | $AWK '{print(length)}'`
557 ++
558 ++ # Set A to no more than B's length and B to no more than A's length.
559 ++ A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
560 ++ B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
561 ++ ],
562 ++ [[0-9]+],[
563 ++ # A count greater than zero means use only that many subversions
564 ++ A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
565 ++ B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
566 ++ ],
567 ++ [.+],[
568 ++ AC_WARNING(
569 ++ [invalid OP numeric parameter: $2])
570 ++ ],[])
571 ++
572 ++ # Pad zeros at end of numbers to make same length.
573 ++ ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
574 ++ B="$B`echo $A | sed 's/./0/g'`"
575 ++ A="$ax_compare_version_tmp_A"
576 ++
577 ++ # Check for equality or inequality as necessary.
578 ++ m4_case(m4_tolower(m4_substr($2,0,2)),
579 ++ [eq],[
580 ++ test "x$A" = "x$B" && ax_compare_version=true
581 ++ ],
582 ++ [ne],[
583 ++ test "x$A" != "x$B" && ax_compare_version=true
584 ++ ],[
585 ++ AC_WARNING([invalid OP parameter: $2])
586 ++ ])
587 ++ ])
588 ++
589 ++ AS_VAR_POPDEF([A])dnl
590 ++ AS_VAR_POPDEF([B])dnl
591 ++
592 ++ dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
593 ++ if test "$ax_compare_version" = "true" ; then
594 ++ m4_ifvaln([$4],[$4],[:])dnl
595 ++ m4_ifvaln([$5],[else $5])dnl
596 ++ fi
597 ++]) dnl AX_COMPARE_VERSION
598 +--- a/configure.ac
599 ++++ b/configure.ac
600 +@@ -170,7 +170,7 @@
601 + LIBS=$LIBS_bkp;
602 +
603 + CPPFLAGS_bkp=$CPPFLAGS
604 +- CPPFLAGS="$POSTGRESQL_CFLAGS"
605 ++ CPPFLAGS="$POSTGRESQL_CPPFLAGS"
606 + AC_CHECK_HEADER(libpq-fe.h, with_pgsql=yes, with_pgsql=no)
607 + CPPFLAGS=$CPPFLAGS_bkp;
608 + fi
609 +--- a/plugins/sql/pgsql/Makefile.am
610 ++++ b/plugins/sql/pgsql/Makefile.am
611 +@@ -1,4 +1,4 @@
612 +-AM_CPPFLAGS=@PCFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/libmissing -I$(top_builddir)/libmissing @LIBPRELUDE_CFLAGS@ @POSTGRESQL_CFLAGS@
613 ++AM_CPPFLAGS=@PCFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/libmissing -I$(top_builddir)/libmissing @LIBPRELUDE_CFLAGS@ @POSTGRESQL_CPPFLAGS@
614 + pgsql_la_LDFLAGS = -module -avoid-version @LIBPRELUDE_LDFLAGS@
615 +
616 + if HAVE_PGSQL
617
618 diff --git a/dev-libs/libpreludedb/libpreludedb-5.1.0.ebuild b/dev-libs/libpreludedb/libpreludedb-5.1.0.ebuild
619 new file mode 100644
620 index 00000000000..f8f0d82b465
621 --- /dev/null
622 +++ b/dev-libs/libpreludedb/libpreludedb-5.1.0.ebuild
623 @@ -0,0 +1,95 @@
624 +# Copyright 1999-2019 Gentoo Authors
625 +# Distributed under the terms of the GNU General Public License v2
626 +
627 +EAPI=7
628 +
629 +PYTHON_COMPAT=( python3_{5,6,7} )
630 +DISTUTILS_OPTIONAL=1
631 +
632 +inherit autotools distutils-r1
633 +
634 +DESCRIPTION="Framework to easy access to the Prelude database"
635 +HOMEPAGE="https://www.prelude-siem.org"
636 +SRC_URI="https://www.prelude-siem.org/pkg/src/${PV}/${P}.tar.gz"
637 +
638 +LICENSE="GPL-2+"
639 +SLOT="0"
640 +KEYWORDS="~amd64 ~x86"
641 +IUSE="mysql postgres python sqlite"
642 +
643 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
644 +
645 +RDEPEND=">=dev-libs/libprelude-5.1.0
646 + <dev-libs/libprelude-6
647 + net-libs/gnutls:=
648 + mysql? ( dev-db/mysql-connector-c:= )
649 + postgres? ( dev-db/postgresql:* )
650 + python? ( ${PYTHON_DEPS} )
651 + sqlite? ( dev-db/sqlite:3 )"
652 +
653 +DEPEND="${RDEPEND}"
654 +
655 +BDEPEND=">=dev-lang/swig-3.0.11
656 + dev-util/gtk-doc-am
657 + sys-devel/flex
658 + virtual/pkgconfig
659 + virtual/yacc
660 + python? ( ${PYTHON_DEPS} )"
661 +
662 +PATCHES=(
663 + "${FILESDIR}/${PN}-4.0.0-fix-python-bindings.patch"
664 + "${FILESDIR}/${PN}-5.1.0-fix_gtkdoc_1.32.patch"
665 + "${FILESDIR}/${PN}-5.1.0-fix_py38.patch"
666 + "${FILESDIR}/${PN}-5.1.0-update_m4_postgresql.patch"
667 +)
668 +
669 +src_prepare() {
670 + default
671 +
672 + eautoreconf
673 +
674 + if use python; then
675 + cd bindings/python || die
676 + distutils-r1_src_prepare
677 + fi
678 +}
679 +
680 +src_configure() {
681 + local myconf=(
682 + --enable-easy-bindings
683 + --with-swig
684 + $(use_with mysql)
685 + $(use_with postgres postgresql)
686 + $(use_with sqlite sqlite3)
687 + )
688 +
689 + if use python; then
690 + python_setup
691 + if python_is_python3; then
692 + myconf+=(--without-python2 --with-python3="${EPYTHON}")
693 + else
694 + myconf+=(--without-python3 --with-python2="${EPYTHON}")
695 + fi
696 + else
697 + myconf+=(--without-python2 --without-python3)
698 + fi
699 +
700 + econf "${myconf[@]}"
701 +}
702 +
703 +src_compile() {
704 + default
705 + if use python; then
706 + cd bindings/python || die
707 + distutils-r1_src_compile
708 + fi
709 +}
710 +
711 +src_install() {
712 + default
713 + find "${D}" -name '*.la' -delete || die
714 + if use python; then
715 + cd bindings/python || die
716 + distutils-r1_src_install
717 + fi
718 +}