Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/oath-toolkit/files/, sys-auth/oath-toolkit/
Date: Sat, 27 Oct 2018 20:17:38
Message-Id: 1540671444.05227fb8a49663681f233e0833f8ab0fd8f6e043.dilfridge@gentoo
1 commit: 05227fb8a49663681f233e0833f8ab0fd8f6e043
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 27 20:17:11 2018 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 27 20:17:24 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05227fb8
7
8 sys-auth/oath-toolkit: Add build fix for glibc-2.28, bug 669336
9
10 Closes: https://bugs.gentoo.org/669336
11 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
12 Package-Manager: Portage-2.3.51, Repoman-2.3.11
13
14 .../files/oath-toolkit-2.6.2-glibc228.patch | 100 +++++++++++++++++++++
15 sys-auth/oath-toolkit/oath-toolkit-2.6.2.ebuild | 7 +-
16 2 files changed, 105 insertions(+), 2 deletions(-)
17
18 diff --git a/sys-auth/oath-toolkit/files/oath-toolkit-2.6.2-glibc228.patch b/sys-auth/oath-toolkit/files/oath-toolkit-2.6.2-glibc228.patch
19 new file mode 100644
20 index 00000000000..c43f7aee0fe
21 --- /dev/null
22 +++ b/sys-auth/oath-toolkit/files/oath-toolkit-2.6.2-glibc228.patch
23 @@ -0,0 +1,100 @@
24 +diff -ruN oath-toolkit-2.6.2.orig/liboath/gl/fseeko.c oath-toolkit-2.6.2/liboath/gl/fseeko.c
25 +--- oath-toolkit-2.6.2.orig/liboath/gl/fseeko.c 2016-08-27 13:15:06.000000000 +0200
26 ++++ oath-toolkit-2.6.2/liboath/gl/fseeko.c 2018-10-27 22:07:53.836832404 +0200
27 +@@ -1,18 +1,18 @@
28 + /* An fseeko() function that, together with fflush(), is POSIX compliant.
29 +- Copyright (C) 2007-2016 Free Software Foundation, Inc.
30 ++ Copyright (C) 2007-2018 Free Software Foundation, Inc.
31 +
32 + This program is free software; you can redistribute it and/or modify
33 +- it under the terms of the GNU Lesser General Public License as published by
34 +- the Free Software Foundation; either version 2.1, or (at your option)
35 ++ it under the terms of the GNU General Public License as published by
36 ++ the Free Software Foundation; either version 2, or (at your option)
37 + any later version.
38 +
39 + This program is distributed in the hope that it will be useful,
40 + but WITHOUT ANY WARRANTY; without even the implied warranty of
41 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 +- GNU Lesser General Public License for more details.
43 ++ GNU General Public License for more details.
44 +
45 +- You should have received a copy of the GNU Lesser General Public License along
46 +- with this program; if not, see <http://www.gnu.org/licenses/>. */
47 ++ You should have received a copy of the GNU General Public License along
48 ++ with this program; if not, see <https://www.gnu.org/licenses/>. */
49 +
50 + #include <config.h>
51 +
52 +@@ -33,9 +33,9 @@
53 + #endif
54 + #if _GL_WINDOWS_64_BIT_OFF_T
55 + # undef fseeko
56 +-# if HAVE__FSEEKI64 /* msvc, mingw64 */
57 ++# if HAVE__FSEEKI64 && HAVE_DECL__FSEEKI64 /* msvc, mingw since msvcrt8.0, mingw64 */
58 + # define fseeko _fseeki64
59 +-# else /* mingw */
60 ++# else /* mingw before msvcrt8.0 */
61 + # define fseeko fseeko64
62 + # endif
63 + #endif
64 +@@ -47,12 +47,13 @@
65 + #endif
66 +
67 + /* These tests are based on fpurge.c. */
68 +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
69 ++#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
70 ++ /* GNU libc, BeOS, Haiku, Linux libc5 */
71 + if (fp->_IO_read_end == fp->_IO_read_ptr
72 + && fp->_IO_write_ptr == fp->_IO_write_base
73 + && fp->_IO_save_base == NULL)
74 + #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
75 +- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
76 ++ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
77 + # if defined __SL64 && defined __SCLE /* Cygwin */
78 + if ((fp->_flags & __SL64) == 0)
79 + {
80 +@@ -80,7 +81,7 @@
81 + #elif defined __minix /* Minix */
82 + if (fp_->_ptr == fp_->_buf
83 + && (fp_->_ptr == NULL || fp_->_count == 0))
84 +-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
85 ++#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
86 + if (fp_->_ptr == fp_->_base
87 + && (fp_->_ptr == NULL || fp_->_cnt == 0))
88 + #elif defined __UCLIBC__ /* uClibc */
89 +@@ -117,18 +118,19 @@
90 + if (pos == -1)
91 + {
92 + #if defined __sferror || defined __DragonFly__ || defined __ANDROID__
93 +- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
94 ++ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
95 + fp_->_flags &= ~__SOFF;
96 + #endif
97 + return -1;
98 + }
99 +
100 +-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
101 ++#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
102 ++ /* GNU libc, BeOS, Haiku, Linux libc5 */
103 + fp->_flags &= ~_IO_EOF_SEEN;
104 + fp->_offset = pos;
105 + #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
106 +- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
107 +-# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000)
108 ++ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
109 ++# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000) || defined __minix
110 + /* fp_->_offset is typed as an integer. */
111 + fp_->_offset = pos;
112 + # else
113 +@@ -150,8 +152,8 @@
114 + fp_->_flags &= ~__SEOF;
115 + #elif defined __EMX__ /* emx+gcc */
116 + fp->_flags &= ~_IOEOF;
117 +-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, NonStop Kernel */
118 +- fp->_flag &= ~_IOEOF;
119 ++#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
120 ++ fp_->_flag &= ~_IOEOF;
121 + #elif defined __MINT__ /* Atari FreeMiNT */
122 + fp->__offset = pos;
123 + fp->__eof = 0;
124
125 diff --git a/sys-auth/oath-toolkit/oath-toolkit-2.6.2.ebuild b/sys-auth/oath-toolkit/oath-toolkit-2.6.2.ebuild
126 index f3d38999c1e..26a301c8849 100644
127 --- a/sys-auth/oath-toolkit/oath-toolkit-2.6.2.ebuild
128 +++ b/sys-auth/oath-toolkit/oath-toolkit-2.6.2.ebuild
129 @@ -1,4 +1,4 @@
130 -# Copyright 1999-2018 Gentoo Foundation
131 +# Copyright 1999-2018 Gentoo Authors
132 # Distributed under the terms of the GNU General Public License v2
133
134 EAPI=6
135 @@ -20,7 +20,10 @@ DEPEND="${RDEPEND}
136 test? ( dev-libs/libxml2 )
137 dev-util/gtk-doc-am"
138
139 -PATCHES=( "${FILESDIR}"/${P}-gcc7.patch )
140 +PATCHES=(
141 + "${FILESDIR}"/${P}-gcc7.patch
142 + "${FILESDIR}"/${P}-glibc228.patch
143 +)
144
145 src_prepare() {
146 default