sys-libs/gdbm: Fix building with USE flag "exporter"
authorThomas Deutschmann <whissi@gentoo.org>
Tue, 2 Jan 2018 22:10:43 +0000 (23:10 +0100)
committerThomas Deutschmann <whissi@gentoo.org>
Tue, 2 Jan 2018 22:10:54 +0000 (23:10 +0100)
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

sys-libs/gdbm/files/gdbm-1.13-fix-build-with-enable-gdbm-export.patch [new file with mode: 0644]
sys-libs/gdbm/gdbm-1.13-r2.ebuild [moved from sys-libs/gdbm/gdbm-1.13-r1.ebuild with 93% similarity]

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 (file)
index 0000000..eb229f7
--- /dev/null
@@ -0,0 +1,57 @@
+From 272713d611c55effeaf1d2b45fbb2c69d70e4c74 Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <gray@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              <rj7252@att.com>
++Jakub Bogusz            <qboosh@pld-linux.org>
+ Matthew Burgess               <matthew@linuxfromscratch.org>
+ Tanaka Akira          <akr@fsij.org>
+-Thomas Klausner               <tk@giga.or.at>
+\ No newline at end of file
++Thomas Klausner               <tk@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
similarity index 93%
rename from sys-libs/gdbm/gdbm-1.13-r1.ebuild
rename to sys-libs/gdbm/gdbm-1.13-r2.ebuild
index 022e74618c7a52184d1b5c938f50057e50a46b67..84c0aeb6a4c27d8ca7a5e177837295c83b7cd797 100644 (file)
@@ -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}"