commit:     2a21f609aeffc23219b35a5546e543111b709ff7
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  2 22:10:43 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Jan  2 22:10:54 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a21f609

sys-libs/gdbm: Fix building with USE flag "exporter"

Ebuild changes:
===============
- Patch: Add patch to fix build with --enable-gdbm-export. [Bug 625302] [Link 1]

- Already introduced a sub slot to help upgrading to 1.14 later. [Bug 643188]

Link 1: 
http://git.gnu.org.ua/cgit/gdbm.git/commit/?id=272713d611c55effeaf1d2b45fbb2c69d70e4c74
Closes: https://bugs.gentoo.org/625302
Bug: https://bugs.gentoo.org/643188
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 ...bm-1.13-fix-build-with-enable-gdbm-export.patch | 57 ++++++++++++++++++++++
 .../{gdbm-1.13-r1.ebuild => gdbm-1.13-r2.ebuild}   |  5 +-
 2 files changed, 60 insertions(+), 2 deletions(-)

diff --git 
a/sys-libs/gdbm/files/gdbm-1.13-fix-build-with-enable-gdbm-export.patch 
b/sys-libs/gdbm/files/gdbm-1.13-fix-build-with-enable-gdbm-export.patch
new file mode 100644
index 00000000000..eb229f7261c
--- /dev/null
+++ b/sys-libs/gdbm/files/gdbm-1.13-fix-build-with-enable-gdbm-export.patch
@@ -0,0 +1,57 @@
+From 272713d611c55effeaf1d2b45fbb2c69d70e4c74 Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <g...@gnu.org>
+Date: Sat, 23 Dec 2017 21:27:20 +0000
+Subject: Fix build with --enable-gdbm-export
+
+* THANKS: Add Jakub Bogusz
+* export/export.c: Define GDBM_EXPORT_18 prior to
+including gdbmexp.c
+* src/gdbmexp.c [GDBM_EXPORT_18]: Define GDBM_SET_ERRNO and
+GDBM_ASSERT_CONSISTENCY.
+---
+diff --git a/THANKS b/THANKS
+index 70cb40f..feb1f87 100644
+--- a/THANKS
++++ b/THANKS
+@@ -5,6 +5,7 @@ suggesting various improvements or submitting actual code. 
Here is a list
+ of these people. Help us keep it complete and exempt of errors.
+ 
+ Bill Jones              <rj7...@att.com>
++Jakub Bogusz            <qbo...@pld-linux.org>
+ Matthew Burgess               <matt...@linuxfromscratch.org>
+ Tanaka Akira          <a...@fsij.org>
+-Thomas Klausner               <t...@giga.or.at>
+\ No newline at end of file
++Thomas Klausner               <t...@giga.or.at>
+diff --git a/export/export.c b/export/export.c
+index 39e05d1..ede4858 100644
+--- a/export/export.c
++++ b/export/export.c
+@@ -24,6 +24,7 @@
+ #include <gdbm.h>
+ 
+ /* Pull in gdbm_export() */
++#define GDBM_EXPORT_18
+ #include "gdbmexp.c"
+ 
+ void
+diff --git a/src/gdbmexp.c b/src/gdbmexp.c
+index 457f638..dc46c50 100644
+--- a/src/gdbmexp.c
++++ b/src/gdbmexp.c
+@@ -21,8 +21,13 @@
+ # include "autoconf.h"
+ # include <arpa/inet.h>
+ 
++#ifdef GDBM_EXPORT_18
++# define GDBM_SET_ERRNO(dbf, ec, fatal) gdbm_errno = ec
++# define GDBM_ASSERT_CONSISTENCY(dbf, val)
++#else
+ # include "gdbmdefs.h"
+ # include "gdbm.h"
++#endif
+ 
+ int
+ gdbm_export_to_file (GDBM_FILE dbf, FILE *fp)
+--
+cgit v0.9.0.3

diff --git a/sys-libs/gdbm/gdbm-1.13-r1.ebuild 
b/sys-libs/gdbm/gdbm-1.13-r2.ebuild
similarity index 93%
rename from sys-libs/gdbm/gdbm-1.13-r1.ebuild
rename to sys-libs/gdbm/gdbm-1.13-r2.ebuild
index 022e74618c7..84c0aeb6a4c 100644
--- a/sys-libs/gdbm/gdbm-1.13-r1.ebuild
+++ b/sys-libs/gdbm/gdbm-1.13-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -12,7 +12,7 @@ SRC_URI="mirror://gnu/gdbm/${P}.tar.gz
        exporter? ( mirror://gnu/gdbm/${EX_P}.tar.gz )"
 
 LICENSE="GPL-3"
-SLOT="0"
+SLOT="0/1.13"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux 
~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris 
~sparc64-solaris ~x64-solaris ~x86-solaris"
 IUSE="+berkdb exporter nls +readline static-libs"
 
@@ -23,6 +23,7 @@ RDEPEND="${DEPEND}"
 
 PATCHES=(
        "${FILESDIR}"/gdbm-1.13-fix-a-typo-in-gdbm.h.patch
+       "${FILESDIR}"/gdbm-1.13-fix-build-with-enable-gdbm-export.patch
 )
 
 EX_S="${WORKDIR}/${EX_P}"

Reply via email to