From 9946ed245b209a51c84124b6623215c217802417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linh=20Nguy=E1=BB=85n?= Date: Sun, 8 Aug 2021 03:42:29 -0400 Subject: [PATCH] New package: x-unikey-1.0.4 --- .../patch-src_ukengine_mactab.cpp.patch | 11 +++++++++++ .../patch-src_ukengine_usrkeymap.cpp.patch | 18 ++++++++++++++++++ .../patches/patch-src_xim_install.sh.patch | 8 ++++++++ srcpkgs/x-unikey/template | 15 +++++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 srcpkgs/x-unikey/patches/patch-src_ukengine_mactab.cpp.patch create mode 100644 srcpkgs/x-unikey/patches/patch-src_ukengine_usrkeymap.cpp.patch create mode 100644 srcpkgs/x-unikey/patches/patch-src_xim_install.sh.patch create mode 100644 srcpkgs/x-unikey/template diff --git a/srcpkgs/x-unikey/patches/patch-src_ukengine_mactab.cpp.patch b/srcpkgs/x-unikey/patches/patch-src_ukengine_mactab.cpp.patch new file mode 100644 index 000000000000..4bb7988bb542 --- /dev/null +++ b/srcpkgs/x-unikey/patches/patch-src_ukengine_mactab.cpp.patch @@ -0,0 +1,11 @@ +--- a/src/ukengine/mactab.cpp 2006-04-09 11:46:02 UTC ++++ b/src/ukengine/mactab.cpp +@@ -287,7 +287,7 @@ + char key[MAX_MACRO_KEY_LEN]; + + // Parse the input item +- char * pos = strchr(item, ':'); ++ const char * pos = strchr(item, ':'); + if (pos == NULL) + return -1; + int keyLen = (int)(pos - item); diff --git a/srcpkgs/x-unikey/patches/patch-src_ukengine_usrkeymap.cpp.patch b/srcpkgs/x-unikey/patches/patch-src_ukengine_usrkeymap.cpp.patch new file mode 100644 index 000000000000..88e5d81e1b8b --- /dev/null +++ b/srcpkgs/x-unikey/patches/patch-src_ukengine_usrkeymap.cpp.patch @@ -0,0 +1,18 @@ +--- a/src/ukengine/usrkeymap.cpp 2006-04-08 19:31:40.000000000 -0400 ++++ b/src/ukengine/usrkeymap.cpp +@@ -25,6 +25,7 @@ + #include + using namespace std; + ++#include + #include + #include "usrkeymap.h" + +@@ -262,4 +263,4 @@ + return i; + } + return -1; +-} +\ No newline at end of file ++} + diff --git a/srcpkgs/x-unikey/patches/patch-src_xim_install.sh.patch b/srcpkgs/x-unikey/patches/patch-src_xim_install.sh.patch new file mode 100644 index 000000000000..27c5ed4f9339 --- /dev/null +++ b/srcpkgs/x-unikey/patches/patch-src_xim_install.sh.patch @@ -0,0 +1,8 @@ +--- a/src/xim/install.sh 2018-08-25 14:18:57 UTC ++++ b/src/xim/install.sh +@@ -1,4 +1,5 @@ + #!/bin/sh ++exit 0 + echo + echo "To use UniKey, certain environment variables must be set." + echo "Do you want to set these variables in /etc/profile? (y/N) diff --git a/srcpkgs/x-unikey/template b/srcpkgs/x-unikey/template new file mode 100644 index 000000000000..d544fafa03f0 --- /dev/null +++ b/srcpkgs/x-unikey/template @@ -0,0 +1,15 @@ +# Template file for 'x-unikey' +pkgname=x-unikey +version=1.0.4 +revision=1 +build_style=gnu-configure +makedepends="libX11-devel" +short_desc="Vietnamese input method for X" +maintainer="Linh Nguyễn " +license="GPL-2.0-or-later" +homepage="https://www.unikey.org" +distfiles="${SOURCEFORGE_SITE}/unikey/${pkgname}-${version}.tar.bz2" +checksum=aa7dd444853538bcba0f24c4c19692c34d4553a1df213a260c2628a7116b2dd9 + +CFLAGS+="-Wno-narrowing" +CXXFLAGS+="-Wno-narrowing"