diff options
author | Felix Yan | 2018-10-03 16:41:23 +0000 |
---|---|---|
committer | Felix Yan | 2018-10-03 16:41:23 +0000 |
commit | e1108be1be9f5030d82c311a900d3d367de94ddf (patch) | |
tree | 82b17c961949490ac4653218177bb0d89e883255 | |
download | aur-e1108be1be9f5030d82c311a900d3d367de94ddf.tar.gz |
extra2community: Moving scim-chewing from extra to community
-rw-r--r-- | PKGBUILD | 35 | ||||
-rw-r--r-- | scim-chewing-libchewing04.patch | 53 |
2 files changed, 88 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c98cb97d2021 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: Gaetan Bisson <bisson@archlinux.org> +# Contributor: whisky <archlinux.cle(at)gmail.com> +# Contributor: damir <damir@archlinux.org> + +pkgname=scim-chewing +pkgver=0.3.5 +pkgrel=4 +pkgdesc='Traditional Chinese input method module for SCIM' +url='http://chewing.im/' +license=('GPL') +arch=('x86_64') +makedepends=('intltool') +depends=('scim' 'libchewing') +source=("https://github.com/chewing/scim-chewing/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.bz2" + scim-chewing-libchewing04.patch) +sha256sums=('e7ae2356a6ca11c342795e3a14ad7667f76a0af4be23e01ea60acc6d4af72d64' + '0dd0ecc6b4f03b599dec97812a7c4534a9edca0243477222a87cd75da74d1c93') + +prepare() { + cd ${pkgname}-${pkgver} + patch -p1 -i ../scim-chewing-libchewing04.patch # Fix build with libchewing 0.4 (Fedora) + autoreconf -vfi + intltoolize --force +} + +build() { + cd ${pkgname}-${pkgver} + ./configure --prefix=/usr + make +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install +} diff --git a/scim-chewing-libchewing04.patch b/scim-chewing-libchewing04.patch new file mode 100644 index 000000000000..4658f47d1328 --- /dev/null +++ b/scim-chewing-libchewing04.patch @@ -0,0 +1,53 @@ +Upstream commits: 545279e 1f3c42d 1e12860 + +--- a/configure.ac ++++ b/configure.ac +@@ -48,7 +48,7 @@ AC_TYPE_SIZE_T + # Checks for libraries. + + SCIM_VERSION=1.0.0 +-CHEWING_VERSION=0.3.4 ++CHEWING_VERSION=0.4.0 + + PKG_CHECK_MODULES(SCIM, [scim >= $SCIM_VERSION]) + +@@ -59,7 +59,7 @@ PKG_CHECK_MODULES(SCIM_GTKUTILS,[scim-gtkutils >= $SCIM_VERSION], + + AC_SUBST(SCIM_VERSION) + +-PKG_CHECK_MODULES(CHEWING, [chewing = $CHEWING_VERSION]) ++PKG_CHECK_MODULES(CHEWING, [chewing >= $CHEWING_VERSION]) + AC_SUBST(CHEWING_VERSION) + + AM_CONDITIONAL(SCIM_BUILD_SETUP, [test "$SCIM_HAS_GTKUTILS" = "yes"]) +--- a/src/scim_chewing_imengine.cpp ++++ b/src/scim_chewing_imengine.cpp +@@ -73,8 +73,6 @@ extern "C" { + void scim_module_exit() + { + _scim_config.reset(); +- /* New API introduced in libchewing 0.2.7 */ +- chewing_Terminate(); + } + + unsigned int scim_imengine_module_init( const ConfigPointer& config ) +@@ -122,10 +120,6 @@ ChewingIMEngineFactory::ChewingIMEngineFactory( const ConfigPointer& config ) + + bool ChewingIMEngineFactory::init() + { +- char prefix[] = CHEWING_DATADIR; +- char hash_postfix[] = "/.chewing/"; +- +- chewing_Init(prefix, (char *)(scim_get_home_dir() + hash_postfix).c_str() ); + return true; + } + +@@ -670,7 +664,7 @@ bool ChewingIMEngineInstance::commit( ChewingContext* ctx ) + + // cursor decoration + int current_cursor = chewing_cursor_Current( ctx ); +- if( chewing_zuin_Check( ctx ) ) { ++ if( chewing_bopomofo_Check( ctx ) ) { + attr.push_back( + Attribute( + current_cursor, |