mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
added community/pyzy
This commit is contained in:
parent
70046c5c21
commit
cb8bf0d3e1
2 changed files with 55 additions and 0 deletions
42
community/pyzy/PKGBUILD
Normal file
42
community/pyzy/PKGBUILD
Normal file
|
@ -0,0 +1,42 @@
|
|||
# $Id$
|
||||
# Maintainer: Felix Yan <felixonmars@gmail.com>
|
||||
# Contributor: Kerrick Staley <mail@kerrickstaley.com>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - patch to fix build on ARM
|
||||
|
||||
pkgname=pyzy
|
||||
pkgver=1.0
|
||||
_commit="d7747466562cb8b4bc2934708e29b7643c7bedbc"
|
||||
pkgrel=3
|
||||
pkgdesc='The Chinese PinYin and Bopomofo conversion library'
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://github.com/pyzy/pyzy'
|
||||
license=('LGPL')
|
||||
depends=('glib2' 'sqlite' 'util-linux')
|
||||
makedepends=('git' 'doxygen' 'gnome-common' 'python2')
|
||||
source=("git://github.com/pyzy/pyzy.git#commit=$_commit"
|
||||
'pyzy-0.1.0-fixes-compile.patch')
|
||||
md5sums=('SKIP'
|
||||
'f9fedfd7a54e382550ce3dccf21c9306')
|
||||
|
||||
prepare() {
|
||||
cd $pkgname
|
||||
patch -p1 -i ../pyzy-0.1.0-fixes-compile.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname
|
||||
|
||||
# replace python with python2; see https://github.com/hsumita/libpyzy/issues/1
|
||||
find . -name '*.py' -exec sed -ri '1s#(bin/|env )python#\1python2#' '{}' \;
|
||||
|
||||
./autogen.sh --prefix=/usr
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$pkgname"
|
||||
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
13
community/pyzy/pyzy-0.1.0-fixes-compile.patch
Normal file
13
community/pyzy/pyzy-0.1.0-fixes-compile.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
Index: pyzy-0.1.0/src/Types.h
|
||||
===================================================================
|
||||
--- pyzy-0.1.0.orig/src/Types.h
|
||||
+++ pyzy-0.1.0/src/Types.h
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
namespace PyZy {
|
||||
|
||||
-#define PINYIN_ID_VOID (-1)
|
||||
+#define PINYIN_ID_VOID (char(-1))
|
||||
#define PINYIN_ID_ZERO (0)
|
||||
#define PINYIN_ID_B (1)
|
||||
#define PINYIN_ID_C (2)
|
Loading…
Reference in a new issue