pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/inputmethod/librime Entries in the output file are gen...
details: https://anonhg.NetBSD.org/pkgsrc/rev/9243668fc26e
branches: trunk
changeset: 649975:9243668fc26e
user: joerg <joerg%pkgsrc.org@localhost>
date: Tue Apr 14 14:38:05 2015 +0000
description:
Entries in the output file are generally not correctly aligned, so tell
the compiler explicitly about this fact and use memcpy for writing the
data. Bump revision.
diffstat:
inputmethod/librime/Makefile | 3 +-
inputmethod/librime/distinfo | 3 +-
inputmethod/librime/patches/patch-src_dict_table.cc | 22 +++++++++++++++++++++
3 files changed, 26 insertions(+), 2 deletions(-)
diffs (50 lines):
diff -r ae065db77679 -r 9243668fc26e inputmethod/librime/Makefile
--- a/inputmethod/librime/Makefile Tue Apr 14 14:23:14 2015 +0000
+++ b/inputmethod/librime/Makefile Tue Apr 14 14:38:05 2015 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2015/03/15 20:03:24 hiramatsu Exp $
+# $NetBSD: Makefile,v 1.4 2015/04/14 14:38:05 joerg Exp $
DISTNAME= librime-1.0
+PKGREVISION= 1
CATEGORIES= inputmethod chinese
MASTER_SITES= http://rimeime.googlecode.com/files/
#MASTER_SITES= http://dl.bintray.com/lotem/rime/
diff -r ae065db77679 -r 9243668fc26e inputmethod/librime/distinfo
--- a/inputmethod/librime/distinfo Tue Apr 14 14:23:14 2015 +0000
+++ b/inputmethod/librime/distinfo Tue Apr 14 14:38:05 2015 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1 2014/11/29 09:31:49 obache Exp $
+$NetBSD: distinfo,v 1.2 2015/04/14 14:38:05 joerg Exp $
SHA1 (librime-1.0.tar.gz) = 5fd6db95b039e08dadfe547e3e63962aeaa97d8c
RMD160 (librime-1.0.tar.gz) = 0e5972bfcf179d464a8e58f9ddce3bf55708865b
Size (librime-1.0.tar.gz) = 2576401 bytes
SHA1 (patch-CMakeLists.txt) = 3e478dda0da10ecfc31f1cb7849a5fd0bd21a065
+SHA1 (patch-src_dict_table.cc) = 259704b015c1f6cffd7a5918c1a93c77384e4be7
diff -r ae065db77679 -r 9243668fc26e inputmethod/librime/patches/patch-src_dict_table.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/inputmethod/librime/patches/patch-src_dict_table.cc Tue Apr 14 14:38:05 2015 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_dict_table.cc,v 1.1 2015/04/14 14:38:05 joerg Exp $
+
+--- src/dict/table.cc.orig 2013-11-10 10:20:21.000000000 +0000
++++ src/dict/table.cc
+@@ -403,14 +403,15 @@ bool Table::BuildEntryList(const DictEnt
+ return true;
+ }
+
+-bool Table::BuildEntry(const DictEntry &dict_entry, table::Entry *entry) {
++bool Table::BuildEntry(const DictEntry &dict_entry, __attribute__((aligned(1))) table::Entry *entry) {
+ if (!entry)
+ return false;
+ if (!CopyString(dict_entry.text, &entry->text)) {
+ LOG(ERROR) << "Error creating table entry '" << dict_entry.text << "'; file size: " << file_size();
+ return false;
+ }
+- entry->weight = static_cast<float>(dict_entry.weight);
++ float weight = static_cast<float>(dict_entry.weight);
++ memcpy(&entry->weight, &weight, sizeof(weight));
+ return true;
+ }
+
Home |
Main Index |
Thread Index |
Old Index