Skip to content

Commit

Permalink
Fix build on ARM, insprired by upstream issue #2.
Browse files Browse the repository at this point in the history
  • Loading branch information
joerg committed Mar 10, 2015
1 parent 1a26ec6 commit d9877bc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
8 changes: 7 additions & 1 deletion converters/pyzy/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.5 2014/10/07 16:47:10 adam Exp $
# $NetBSD: Makefile,v 1.6 2015/03/10 15:20:17 joerg Exp $

DISTNAME= pyzy-0.1.0
PKGREVISION= 2
Expand All @@ -21,6 +21,12 @@ PKGCONFIG_OVERRIDE+= pyzy-1.0.pc.in
CONFIGURE_ARGS+= --disable-db-android
CONFIGURE_ARGS+= --enable-db-open-phrase

.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mclang)
# Reduce noise to a level that real warnings can be seen
CXXFLAGS+= -Wno-gnu-designator
.endif

# taken from ${WRKSRC}/data/db/open-phrase/Makefile.am
DBVER= 1.0.0
DBTAR= pyzy-database-${DBVER}.tar.bz2
Expand Down
3 changes: 2 additions & 1 deletion converters/pyzy/distinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.3 2014/05/03 07:14:45 obache Exp $
$NetBSD: distinfo,v 1.4 2015/03/10 15:20:17 joerg Exp $

SHA1 (pyzy-0.1.0.tar.gz) = ffe67a455a537c8ed8a0d138eb014945cd982927
RMD160 (pyzy-0.1.0.tar.gz) = 26cf64a977b030456bd74cca40fc9c9f476f7b7d
Expand All @@ -7,3 +7,4 @@ SHA1 (pyzy-database-1.0.0.tar.bz2) = e38a148a772e9909facda66b2d579e17b94cccbe
RMD160 (pyzy-database-1.0.0.tar.bz2) = 1679567f31c20a235577f02175df38e16a05e7de
Size (pyzy-database-1.0.0.tar.bz2) = 9977983 bytes
SHA1 (patch-src_Database.h) = 93615161afee7614899a8a7248b46a355de75de2
SHA1 (patch-src_Types.h) = 18cbc643ad9640c2fb39d887a3018026806675e4
16 changes: 16 additions & 0 deletions converters/pyzy/patches/patch-src_Types.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$NetBSD: patch-src_Types.h,v 1.1 2015/03/10 15:20:17 joerg Exp $

Make sure that PINYIN_ID_VOID is valid on platforms like ARM with
char == unsigned char.

--- src/Types.h.orig 2015-03-10 14:44:24.000000000 +0000
+++ 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)

0 comments on commit d9877bc

Please sign in to comment.