From 76492cd0c1117468acc8d39c1795d08d4aee9133 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Tue, 8 Sep 2015 00:56:17 +0000 Subject: [PATCH] added extra/uim --- extra/uim/PKGBUILD | 49 +++++++++++++++++++++++++++ extra/uim/aarch64.diff | 76 ++++++++++++++++++++++++++++++++++++++++++ extra/uim/install | 13 ++++++++ 3 files changed, 138 insertions(+) create mode 100644 extra/uim/PKGBUILD create mode 100644 extra/uim/aarch64.diff create mode 100644 extra/uim/install diff --git a/extra/uim/PKGBUILD b/extra/uim/PKGBUILD new file mode 100644 index 000000000..23a3079cd --- /dev/null +++ b/extra/uim/PKGBUILD @@ -0,0 +1,49 @@ +# $Id$ +# Maintainer: Gaetan Bisson +# Contributor: damir + +# ALARM: Kevin Mihelich +# - patch for AArch64 + +pkgname=uim +pkgver=1.8.6 +pkgrel=3 +pkgdesc='Multilingual input method library' +url='http://code.google.com/p/uim/' +license=('custom:BSD') +arch=('i686' 'x86_64') +depends=('libxft' 'libedit' 'm17n-lib') +makedepends=('intltool' 'gettext' 'qt4' 'gtk2' 'gtk3' 'anthy') +optdepends=('qt4: immodule and helper applications' + 'gtk2: immodule and helper applications' + 'gtk3: immodules and helper applications') +source=("https://uim.googlecode.com/files/${pkgname}-${pkgver}.tar.gz" + 'aarch64.diff') +sha1sums=('409c30b31b9e58e3c18cb7862933487b0585cd1d' + '35d2a2e2920addc97b6a73eb7ea0f56c89ff014f') + +install=install + +prepare() { + patch -p1 -d "${pkgname}-${pkgver}/sigscheme" -i ../../aarch64.diff +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + ./configure \ + --prefix=/usr \ + --libexecdir=/usr/lib/uim \ + --with-anthy-utf8 \ + --with-qt4-immodule \ + --with-qt4 \ + + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make -j1 DESTDIR="${pkgdir}" install + rm "${pkgdir}"/usr/lib/libgcroots.a + install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" +} diff --git a/extra/uim/aarch64.diff b/extra/uim/aarch64.diff new file mode 100644 index 000000000..123bbc1b1 --- /dev/null +++ b/extra/uim/aarch64.diff @@ -0,0 +1,76 @@ +From: Matthias Klose +Description: Added AARCH64 support to gcconfig.h (libgcroots). It needs to get symbols file updated, as well. +Bug: https://groups.google.com/forum/#!topic/uim-en/fxixLmHXcq0 +Bug-Debian: http://bugs.debian.org/758710 +Origin: upstream, https://github.com/ctyler/libgcroots/commit/da6e6884a1119e2cf6be88b4cf5eb9091c52beeb + +Index: b/libgcroots/include/private/gcconfig.h +=================================================================== +--- a/libgcroots/include/private/gcconfig.h ++++ b/libgcroots/include/private/gcconfig.h +@@ -62,6 +62,13 @@ + # endif + + /* Determine the machine type: */ ++# if defined(__aarch64__) ++# define AARCH64 ++# if !defined(LINUX) ++# define NOSYS ++# define mach_type_known ++# endif ++# endif + # if defined(__arm__) || defined(__thumb__) + # define ARM32 + # if !defined(LINUX) && !defined(NETBSD) +@@ -231,6 +238,10 @@ + # define IA64 + # define mach_type_known + # endif ++# if defined(LINUX) && defined(__aarch64__) ++# define AARCH64 ++# define mach_type_known ++# endif + # if defined(LINUX) && defined(__arm__) + # define ARM32 + # define mach_type_known +@@ -504,6 +515,7 @@ + /* running Amdahl UTS4 */ + /* S390 ==> 390-like machine */ + /* running LINUX */ ++ /* AARCH64 ==> ARM AArch64 */ + /* ARM32 ==> Intel StrongARM */ + /* IA64 ==> Intel IPF */ + /* (e.g. Itanium) */ +@@ -1724,6 +1736,32 @@ + # endif + # endif + ++# ifdef AARCH64 ++# define CPP_WORDSZ 64 ++# define MACH_TYPE "AARCH64" ++# define ALIGNMENT 8 ++# ifndef HBLKSIZE ++# define HBLKSIZE 4096 ++# endif ++# ifdef LINUX ++# define OS_TYPE "LINUX" ++# define LINUX_STACKBOTTOM ++# define USE_GENERIC_PUSH_REGS ++# define DYNAMIC_LOADING ++ extern int __data_start[]; ++# define DATASTART ((ptr_t)__data_start) ++ extern char _end[]; ++# define DATAEND ((ptr_t)(&_end)) ++# endif ++# ifdef NOSYS ++ /* __data_start is usually defined in the target linker script. */ ++ extern int __data_start[]; ++# define DATASTART ((ptr_t)__data_start) ++ extern void *__stack_base__; ++# define STACKBOTTOM ((ptr_t)__stack_base__) ++# endif ++# endif ++ + # ifdef ARM32 + # define CPP_WORDSZ 32 + # define MACH_TYPE "ARM32" diff --git a/extra/uim/install b/extra/uim/install new file mode 100644 index 000000000..1dffeec76 --- /dev/null +++ b/extra/uim/install @@ -0,0 +1,13 @@ +post_install() { + [[ -x usr/bin/gtk-query-immodules-2.0 ]] && usr/bin/gtk-query-immodules-2.0 > etc/gtk-2.0/gtk.immodules + [[ -x usr/bin/gtk-query-immodules-3.0 ]] && usr/bin/gtk-query-immodules-3.0 > usr/lib/gtk-3.0/3.0.0/immodules.cache + true +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +}