Import of pkgsrc-2015Q2
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# $NetBSD: Makefile,v 1.3 2015/03/15 20:03:24 hiramatsu Exp $
|
||||
# $NetBSD: Makefile,v 1.5 2015/04/17 15:52:57 adam Exp $
|
||||
|
||||
DISTNAME= librime-1.0
|
||||
PKGREVISION= 2
|
||||
CATEGORIES= inputmethod chinese
|
||||
MASTER_SITES= http://rimeime.googlecode.com/files/
|
||||
#MASTER_SITES= http://dl.bintray.com/lotem/rime/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: buildlink3.mk,v 1.1 2014/11/29 09:31:49 obache Exp $
|
||||
# $NetBSD: buildlink3.mk,v 1.2 2015/04/17 15:52:57 adam Exp $
|
||||
#
|
||||
|
||||
BUILDLINK_TREE+= librime
|
||||
@@ -7,6 +7,7 @@ BUILDLINK_TREE+= librime
|
||||
LIBRIME_BUILDLINK3_MK:=
|
||||
|
||||
BUILDLINK_API_DEPENDS.librime+= librime>=1.0
|
||||
BUILDLINK_ABI_DEPENDS.librime?= librime>=1.0nb2
|
||||
BUILDLINK_PKGSRCDIR.librime?= ../../inputmethod/librime
|
||||
|
||||
.include "../../converters/opencc/buildlink3.mk"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
$NetBSD: distinfo,v 1.1 2014/11/29 09:31:49 obache Exp $
|
||||
$NetBSD: distinfo,v 1.3 2015/04/21 13:59:31 hiramatsu 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) = d8c952bd5b897d8d05b86b6c515daa3d19b2ba6d
|
||||
|
||||
26
inputmethod/librime/patches/patch-src_dict_table.cc
Normal file
26
inputmethod/librime/patches/patch-src_dict_table.cc
Normal file
@@ -0,0 +1,26 @@
|
||||
$NetBSD: patch-src_dict_table.cc,v 1.2 2015/04/21 13:59:31 hiramatsu Exp $
|
||||
|
||||
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.
|
||||
|
||||
--- src/dict/table.cc.orig 2013-11-10 19:20:21.000000000 +0900
|
||||
+++ src/dict/table.cc 2015-04-18 12:14:33.000000000 +0900
|
||||
@@ -403,14 +403,15 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
-bool Table::BuildEntry(const DictEntry &dict_entry, table::Entry *entry) {
|
||||
+bool Table::BuildEntry(const DictEntry &dict_entry, table::Entry * __attribute__((aligned(1))) 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user