Skip to content

Instantly share code, notes, and snippets.

@hanya
hanya / JP_108-key
Created February 3, 2019 13:55
Japanese 108 keys layout for Haiku OS
name = JP 108
# Place in /boot/home/config/non-packaged/data/KeyboardLayouts
# Size shortcuts
default-size = 10,10
$b = 5,10
$c = 20,10
$d = 15,10
$e = l15,20,11
@hanya
hanya / ricty_diminished-3.2.3.recipe
Last active February 14, 2019 14:48
HaikuPorts recipe for RictyDiminished font
SUMMARY="Ricty Diminished font"
DESCRIPTION="Ricty Diminished font is designed for text editing \
based on Inconsolata and Circle M+ 1m fonts."
HOMEPAGE="https://www.rs.tus.ac.jp/yyusa/ricty_diminished.html"
COPYRIGHT="2012-2014 Yasunori Yusa
2006-2015 Raph Levien"
LICENSE="SIL Open Font License v1.1"
REVISION="1"
SOURCE_URI="https://github.com/edihbrandon/RictyDiminished/archive/3.2.3.tar.gz"
CHECKSUM_SHA256="4569555415e6b04c6cddc4cd715c7c91aae9ffc2ce5c0ea37d7bd40a5161ac0a"
@hanya
hanya / generate_dictionary.patch
Last active April 1, 2019 08:02
Haikuports recipe for Mozc NEologd UT
diff --git a/generate-dictionary.sh b/generate-dictionary.sh
index d60a741..20f3ee7 100755
--- a/mozcdic-neologd-ut-20190204.1/generate-dictionary.sh
+++ b/mozcdic-neologd-ut-20190204.1/generate-dictionary.sh
@@ -3,23 +3,24 @@
MOZCVER="2.23.2815.102"
DICVER="20190204"
REVISION="1"
-
+TOPDIR=../..
@hanya
hanya / generate_dictionary.patch
Last active April 1, 2019 08:02
Haikuports recipe for Mozc UT2
diff --git a/generate-dictionary.sh b/generate-dictionary.sh
index 2d1e45b..719c628 100755
--- a/mozcdic-ut2-20171008/generate-dictionary.sh
+++ b/mozcdic-ut2-20171008/generate-dictionary.sh
@@ -2,6 +2,8 @@
MOZCVER="2.20.2677.102"
DICVER="20171008"
+TOPDIR=../..
+MOZCDIR=$TOPDIR/sources/mozc
@hanya
hanya / mozc_pack.sh
Created February 13, 2019 16:52
Script to pack mozc with submodules for Haiku ports
packVersion=v2.23.2785.102.7
#git clone -b haiku --recursive --depth=1 https://github.com/hanya/mozc.git
#git submodule clone --init --recursive
#git submodule clone --init --recursive src/third_party/zinnia
cd mozc
git pull
cd ..
#tar -cJf mozc-$packVersion.tar.xz
tar -cjf mozc-$packVersion.tar.bz2 \
@hanya
hanya / sym2lib.py
Last active December 22, 2020 13:10
Converts kicad_sym file into old lib file for stroke font used by KiCAD.
# Converts kicad_sym file into old lib file for stroke font.
# This converter supports only fixed width glyph such as
# Chinese characters, hiragana and katakana.
import sys
from sexpdata import loads, dumps, Symbol
lib_header = """EESchema-LIBRARY Version 2.4
@hanya
hanya / mozc_ut-2.23.2785.102.9.recipe
Last active August 4, 2021 00:01
Mozc with UT dictionary for Haiku
SUMMARY="Japanese input method editor"
DESCRIPTION="A Japanese Input Method Editor (IME) designed for multi-platform. \
This is open source version.
With Mozc UT dictionary which adds over 1,000,000 entries to original dictionary."
HOMEPAGE="https://github.com/google/mozc"
COPYRIGHT="2010-2018 Google Inc.
2017-2019 Hirosi Utumi
2019 Japan post
2009-2011 NICT
2021 Wikipedia"
@hanya
hanya / pack.sh
Created August 6, 2021 00:23
Packing mozc files
packVersion=v2.23.2785.102.4
#git clone -b haiku --recursive --depth=1 https://github.com/hanya/mozc.git
#git submodule clone --init --recursive
#cd mozc
#git pull
cd ..
#tar -cJf mozc-$packVersion.tar.xz
tar -cjf mozc-$packVersion.tar.bz2 \
@hanya
hanya / mozc.patch
Created August 6, 2021 01:06
Patch file for mozc
diff --git a/src/third_party/abseil-cpp/absl/base/config.h b/src/third_party/abseil-cpp/absl/base/config.h
index 9544996..f878679 100644
--- a/src/third_party/abseil-cpp/absl/base/config.h 2021-08-05 16:07:34.771751936 +0900
+++ b/src/third_party/abseil-cpp/absl/base/config.h 2021-08-05 14:02:43.693370880 +0900
@@ -375 +375 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
- defined(__ASYLO__) || defined(__myriad2__)
+ defined(__ASYLO__) || defined(__myriad2__) || defined(__HAIKU__)
<!DOCTYPE html>
<html><head><meta charset="UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Bit display</title>
<style type="text/css">
div#input2, div#input3, div#input4 {
margin-top: 1em;
}
table {