[arch-commits] Commit in ibus-pinyin/repos (3 files)
Felix Yan
felixonmars at archlinux.org
Thu Dec 17 20:31:37 UTC 2020
Date: Thursday, December 17, 2020 @ 20:31:36
Author: felixonmars
Revision: 778016
archrelease: copy trunk to community-testing-x86_64
Added:
ibus-pinyin/repos/community-testing-x86_64/
ibus-pinyin/repos/community-testing-x86_64/PKGBUILD
(from rev 778015, ibus-pinyin/trunk/PKGBUILD)
ibus-pinyin/repos/community-testing-x86_64/ibus-pinyin-fixes-lua-compile.patch
(from rev 778015, ibus-pinyin/trunk/ibus-pinyin-fixes-lua-compile.patch)
-------------------------------------+
PKGBUILD | 41 ++++++++++++++++
ibus-pinyin-fixes-lua-compile.patch | 86 ++++++++++++++++++++++++++++++++++
2 files changed, 127 insertions(+)
Copied: ibus-pinyin/repos/community-testing-x86_64/PKGBUILD (from rev 778015, ibus-pinyin/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2020-12-17 20:31:36 UTC (rev 778016)
@@ -0,0 +1,41 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Rainy <rainylau(at)gmail(dot)com>
+# Contributor: Lee.maRS<leemars at gmail.com>
+# Contributor: Kerrick Staley <mail at kerrickstaley.com>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+
+pkgname=ibus-pinyin
+pkgver=1.5.0
+pkgrel=8
+pkgdesc='Pinyin (Chinese) input method for the IBus framework'
+arch=('x86_64')
+license=('GPL')
+url="https://github.com/phuang/ibus-pinyin/"
+depends=('ibus' 'pyzy' 'lua')
+makedepends=('intltool')
+source=("https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/ibus/${pkgname}-${pkgver}.tar.gz"
+ 'ibus-pinyin-fixes-lua-compile.patch')
+sha512sums=('b0cd849ee3154543747dde8994eec9aed01d67e0d9be308a2f0230cf22f0281cd8fcabd9763b24238547a37e54400bcd8e541937767b93f005d04302f0c00241'
+ '4d62521eca39099f71824c0fdafcdda41b3920a25411e520023dd20343554f691a6c9629c80977849d70724ad7aa31cae1345d452ba6a8d15019f835c91f3913')
+
+prepare()
+{
+ cd ${pkgname}-${pkgver}
+ patch -p1 -i ../ibus-pinyin-fixes-lua-compile.patch
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+
+ ./configure \
+ --prefix=/usr \
+ --libexecdir=/usr/lib/ibus
+
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+
+ make NO_INDEX=true DESTDIR="${pkgdir}" install
+}
Copied: ibus-pinyin/repos/community-testing-x86_64/ibus-pinyin-fixes-lua-compile.patch (from rev 778015, ibus-pinyin/trunk/ibus-pinyin-fixes-lua-compile.patch)
===================================================================
--- community-testing-x86_64/ibus-pinyin-fixes-lua-compile.patch (rev 0)
+++ community-testing-x86_64/ibus-pinyin-fixes-lua-compile.patch 2020-12-17 20:31:36 UTC (rev 778016)
@@ -0,0 +1,86 @@
+From c42d0a870697e95301deabe0bcb770a68649c81d Mon Sep 17 00:00:00 2001
+From: Peng Wu <alexepico at gmail.com>
+Date: Wed, 31 Jul 2013 10:53:14 +0800
+Subject: [PATCH] fixes lua 5.2 compile
+
+---
+ lua/lua-plugin-init.c | 8 ++++++++
+ lua/lua-plugin.c | 9 +++++++++
+ 2 files changed, 17 insertions(+)
+
+Index: ibus-pinyin-1.5.0/lua/lua-plugin-init.c
+===================================================================
+--- ibus-pinyin-1.5.0.orig/lua/lua-plugin-init.c
++++ ibus-pinyin-1.5.0/lua/lua-plugin-init.c
+@@ -26,6 +26,14 @@
+
+ #include "lua-plugin.h"
+
++#if LUA_VERSION_NUM >= 502
++/* ugly hack for lua 5.2 */
++
++#define lua_objlen lua_rawlen
++
++#endif
++
++
+ static const luaL_Reg lualibs[] = {
+ {"", luaopen_base},
+ {LUA_TABLIBNAME, luaopen_table},
+@@ -344,7 +352,11 @@ static const luaL_Reg imelib[] = {
+ };
+
+ LUALIB_API int luaopen_ime (lua_State *L) {
++#if LUA_VERSION_NUM >= 502
++ luaL_newlib(L, imelib);
++#else
+ luaL_register(L, LUA_IMELIBNAME, imelib);
++#endif
+ return 1;
+ }
+
+Index: ibus-pinyin-1.5.0/lua/lua-plugin.c
+===================================================================
+--- ibus-pinyin-1.5.0.orig/lua/lua-plugin.c
++++ ibus-pinyin-1.5.0/lua/lua-plugin.c
+@@ -25,6 +25,15 @@
+
+ #include "lua-plugin.h"
+
++#if LUA_VERSION_NUM >= 502
++/* ugly hack for lua 5.2 */
++
++#define lua_open luaL_newstate
++
++#define lua_objlen lua_rawlen
++
++#endif
++
+ #define IBUS_ENGINE_PLUGIN_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), IBUS_TYPE_ENGINE_PLUGIN, IBusEnginePluginPrivate))
+
+ struct _IBusEnginePluginPrivate{
+Index: ibus-pinyin-1.5.0/lua/lmyoslib.c
+===================================================================
+--- ibus-pinyin-1.5.0.orig/lua/lmyoslib.c
++++ ibus-pinyin-1.5.0/lua/lmyoslib.c
+@@ -57,7 +57,7 @@ static int getfield (lua_State *L, const
+ res = (int)lua_tointeger(L, -1);
+ else {
+ if (d < 0)
+- return luaL_error(L, "field " LUA_QS " missing in date table", key);
++ return luaL_error(L, "field '%s' missing in date table", key);
+ res = d;
+ }
+ lua_pop(L, 1);
+@@ -157,7 +157,11 @@ static const luaL_Reg syslib[] = {
+
+
+ LUALIB_API int luaopen_myos (lua_State *L) {
++#if LUA_VERSION_NUM >= 502
++ luaL_newlib(L, syslib);
++#else
+ luaL_register(L, LUA_OSLIBNAME, syslib);
++#endif
+ return 1;
+ }
+
More information about the arch-commits
mailing list