summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2021-09-17 22:59:15 +0900
committerAkinori Hattori <hattya@gentoo.org>2021-09-17 23:00:33 +0900
commitcb95d9f7d0c6ac43c43ce470dabd2463a1462ce7 (patch)
treee970a3570e781685fd9d152bdcfb275b1aa111e2 /app-i18n
parentapp-i18n/ibus-fbterm: do not compress man pages (diff)
downloadgentoo-cb95d9f7d0c6ac43c43ce470dabd2463a1462ce7.tar.gz
gentoo-cb95d9f7d0c6ac43c43ce470dabd2463a1462ce7.tar.bz2
gentoo-cb95d9f7d0c6ac43c43ce470dabd2463a1462ce7.zip
app-i18n/ibus-fbterm: fix build with Clang
Closes: https://bugs.gentoo.org/734214 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Akinori Hattori <hattya@gentoo.org>
Diffstat (limited to 'app-i18n')
-rw-r--r--app-i18n/ibus-fbterm/files/ibus-fbterm-clang.patch48
-rw-r--r--app-i18n/ibus-fbterm/ibus-fbterm-1.0.1.ebuild5
2 files changed, 52 insertions, 1 deletions
diff --git a/app-i18n/ibus-fbterm/files/ibus-fbterm-clang.patch b/app-i18n/ibus-fbterm/files/ibus-fbterm-clang.patch
new file mode 100644
index 000000000000..797592c3240b
--- /dev/null
+++ b/app-i18n/ibus-fbterm/files/ibus-fbterm-clang.patch
@@ -0,0 +1,48 @@
+--- a/backend/fbio.c
++++ b/backend/fbio.c
+@@ -204,7 +204,7 @@
+ int
+ fb_io_get_fd (FbIo *io)
+ {
+- g_return_if_fail (FB_IS_IO (io));
++ g_return_val_if_fail (FB_IS_IO (io), -1);
+ return io->priv->fd;
+ }
+
+--- a/backend/fbshell.c
++++ b/backend/fbshell.c
+@@ -17,11 +17,11 @@
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+-#include <glib.h>
+-
+-#define _XOPEN_SOURCE
++#define _XOPEN_SOURCE 600
+ #define __USE_XOPEN
+
++#include <glib.h>
++
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <pty.h>
+--- a/backend/fbshellman.c
++++ b/backend/fbshellman.c
+@@ -81,7 +81,7 @@
+ FbShellManagerPrivate *priv;
+ int index, temp, i;
+
+- g_return_if_fail (FB_IS_SHELL_MANAGER (shell_manager));
++ g_return_val_if_fail (FB_IS_SHELL_MANAGER (shell_manager), NR_SHELLS);
+
+ #define STEP() do { \
+ if (forward) temp++; \
+@@ -267,7 +267,7 @@
+ FbShell *
+ fb_shell_manager_active_shell (FbShellManager *shell_manager)
+ {
+- g_return_if_fail (FB_IS_SHELL_MANAGER (shell_manager));
++ g_return_val_if_fail (FB_IS_SHELL_MANAGER (shell_manager), NULL);
+
+ return shell_manager->priv->active_shell;
+ }
diff --git a/app-i18n/ibus-fbterm/ibus-fbterm-1.0.1.ebuild b/app-i18n/ibus-fbterm/ibus-fbterm-1.0.1.ebuild
index 1b6ae892c9c8..148fb8ed4756 100644
--- a/app-i18n/ibus-fbterm/ibus-fbterm-1.0.1.ebuild
+++ b/app-i18n/ibus-fbterm/ibus-fbterm-1.0.1.ebuild
@@ -20,7 +20,10 @@ RDEPEND="app-i18n/ibus
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
-PATCHES=( "${FILESDIR}"/${PN}-man.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-clang.patch
+ "${FILESDIR}"/${PN}-man.patch
+)
AT_M4DIR="m4"