Gentoo Archives: gentoo-commits

From: Akinori Hattori <hattya@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-i18n/ibus-fbterm/files/, app-i18n/ibus-fbterm/
Date: Fri, 17 Sep 2021 14:00:45
Message-Id: 1631887233.cb95d9f7d0c6ac43c43ce470dabd2463a1462ce7.hattya@gentoo
1 commit: cb95d9f7d0c6ac43c43ce470dabd2463a1462ce7
2 Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 17 13:59:15 2021 +0000
4 Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 17 14:00:33 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb95d9f7
7
8 app-i18n/ibus-fbterm: fix build with Clang
9
10 Closes: https://bugs.gentoo.org/734214
11 Package-Manager: Portage-3.0.20, Repoman-3.0.3
12 Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org>
13
14 app-i18n/ibus-fbterm/files/ibus-fbterm-clang.patch | 48 ++++++++++++++++++++++
15 app-i18n/ibus-fbterm/ibus-fbterm-1.0.1.ebuild | 5 ++-
16 2 files changed, 52 insertions(+), 1 deletion(-)
17
18 diff --git a/app-i18n/ibus-fbterm/files/ibus-fbterm-clang.patch b/app-i18n/ibus-fbterm/files/ibus-fbterm-clang.patch
19 new file mode 100644
20 index 00000000000..797592c3240
21 --- /dev/null
22 +++ b/app-i18n/ibus-fbterm/files/ibus-fbterm-clang.patch
23 @@ -0,0 +1,48 @@
24 +--- a/backend/fbio.c
25 ++++ b/backend/fbio.c
26 +@@ -204,7 +204,7 @@
27 + int
28 + fb_io_get_fd (FbIo *io)
29 + {
30 +- g_return_if_fail (FB_IS_IO (io));
31 ++ g_return_val_if_fail (FB_IS_IO (io), -1);
32 + return io->priv->fd;
33 + }
34 +
35 +--- a/backend/fbshell.c
36 ++++ b/backend/fbshell.c
37 +@@ -17,11 +17,11 @@
38 + * You should have received a copy of the GNU General Public License
39 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
40 + */
41 +-#include <glib.h>
42 +-
43 +-#define _XOPEN_SOURCE
44 ++#define _XOPEN_SOURCE 600
45 + #define __USE_XOPEN
46 +
47 ++#include <glib.h>
48 ++
49 + #include <errno.h>
50 + #include <fcntl.h>
51 + #include <pty.h>
52 +--- a/backend/fbshellman.c
53 ++++ b/backend/fbshellman.c
54 +@@ -81,7 +81,7 @@
55 + FbShellManagerPrivate *priv;
56 + int index, temp, i;
57 +
58 +- g_return_if_fail (FB_IS_SHELL_MANAGER (shell_manager));
59 ++ g_return_val_if_fail (FB_IS_SHELL_MANAGER (shell_manager), NR_SHELLS);
60 +
61 + #define STEP() do { \
62 + if (forward) temp++; \
63 +@@ -267,7 +267,7 @@
64 + FbShell *
65 + fb_shell_manager_active_shell (FbShellManager *shell_manager)
66 + {
67 +- g_return_if_fail (FB_IS_SHELL_MANAGER (shell_manager));
68 ++ g_return_val_if_fail (FB_IS_SHELL_MANAGER (shell_manager), NULL);
69 +
70 + return shell_manager->priv->active_shell;
71 + }
72
73 diff --git a/app-i18n/ibus-fbterm/ibus-fbterm-1.0.1.ebuild b/app-i18n/ibus-fbterm/ibus-fbterm-1.0.1.ebuild
74 index 1b6ae892c9c..148fb8ed475 100644
75 --- a/app-i18n/ibus-fbterm/ibus-fbterm-1.0.1.ebuild
76 +++ b/app-i18n/ibus-fbterm/ibus-fbterm-1.0.1.ebuild
77 @@ -20,7 +20,10 @@ RDEPEND="app-i18n/ibus
78 DEPEND="${RDEPEND}"
79 BDEPEND="virtual/pkgconfig"
80
81 -PATCHES=( "${FILESDIR}"/${PN}-man.patch )
82 +PATCHES=(
83 + "${FILESDIR}"/${PN}-clang.patch
84 + "${FILESDIR}"/${PN}-man.patch
85 +)
86
87 AT_M4DIR="m4"