summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2016-05-13 22:22:11 +0900
committerAkinori Hattori <hattya@gentoo.org>2016-05-13 22:22:11 +0900
commitc1008b229e24c56c8a30d591cc32344e1a549e44 (patch)
tree59a921a41869f8b412c9ba83deb6386d1f9e95b6 /app-i18n
parentdev-db/postgresql: Remove unneeded inherit in live ebuild (diff)
downloadgentoo-c1008b229e24c56c8a30d591cc32344e1a549e44.tar.gz
gentoo-c1008b229e24c56c8a30d591cc32344e1a549e44.tar.bz2
gentoo-c1008b229e24c56c8a30d591cc32344e1a549e44.zip
app-i18n/yaskkserv: initial import
Gentoo-Bug: 413809 Package-Manager: portage-2.2.28
Diffstat (limited to 'app-i18n')
-rw-r--r--app-i18n/yaskkserv/Manifest1
-rw-r--r--app-i18n/yaskkserv/files/yaskkserv-gentoo.patch93
-rw-r--r--app-i18n/yaskkserv/files/yaskkserv.confd10
-rw-r--r--app-i18n/yaskkserv/files/yaskkserv.initd14
-rw-r--r--app-i18n/yaskkserv/files/yaskkserv.service12
-rw-r--r--app-i18n/yaskkserv/metadata.xml11
-rw-r--r--app-i18n/yaskkserv/yaskkserv-1.1.0.ebuild79
7 files changed, 220 insertions, 0 deletions
diff --git a/app-i18n/yaskkserv/Manifest b/app-i18n/yaskkserv/Manifest
new file mode 100644
index 000000000000..caf2190fab2f
--- /dev/null
+++ b/app-i18n/yaskkserv/Manifest
@@ -0,0 +1 @@
+DIST yaskkserv-1.1.0.tar.xz 75108 SHA256 b7297220492e1dc4cf0b48bc2ff1dd9fd3e88cf6f8a318a45a667574112ef56a SHA512 9956a9b2fe587491b7c5f76482f13f91d1c87d445f2ff7effa5ffb68efe076f54f1c63e95b980d889963ac507ed49fa37f76f9deb239da7b7409da5be025c000 WHIRLPOOL 7a7b4379a57b7c44dbe91a14d392d5c1c76860df32ea4d890652abef3c9445f1ef87ac72c5e003ec3de7e07019f046d12e1506710a4798f72b79321aa5a98d2c
diff --git a/app-i18n/yaskkserv/files/yaskkserv-gentoo.patch b/app-i18n/yaskkserv/files/yaskkserv-gentoo.patch
new file mode 100644
index 000000000000..56894afd4321
--- /dev/null
+++ b/app-i18n/yaskkserv/files/yaskkserv-gentoo.patch
@@ -0,0 +1,93 @@
+--- a/Makefile
++++ b/Makefile
+@@ -57,16 +57,16 @@
+ $(MAKE) --no-print-directory -C $(SOURCE_PATH) -f $(MAKEFILE) test
+
+ install_common_ :
+- $(MKDIR) -p $(PREFIX)/bin
+- $(INSTALL) $(VAR_PATH)/yaskkserv_make_dictionary/yaskkserv_make_dictionary $(PREFIX)/bin/yaskkserv_make_dictionary
++ $(MKDIR) -p $(DESTDIR)$(PREFIX)/bin
++ $(INSTALL) $(VAR_PATH)/yaskkserv_make_dictionary/yaskkserv_make_dictionary $(DESTDIR)$(PREFIX)/bin/yaskkserv_make_dictionary
+
+ install : install_normal
+
+ install_all : install_common_
+- $(MKDIR) -p $(PREFIX)/sbin
+- $(INSTALL) $(VAR_PATH)/yaskkserv_simple/yaskkserv_simple $(PREFIX)/sbin/yaskkserv_simple
+- $(INSTALL) $(VAR_PATH)/yaskkserv_normal/yaskkserv_normal $(PREFIX)/sbin/yaskkserv_normal
+- $(INSTALL) $(VAR_PATH)/yaskkserv_hairy/yaskkserv_hairy $(PREFIX)/sbin/yaskkserv_hairy
++ $(MKDIR) -p $(DESTDIR)$(PREFIX)/sbin
++ $(INSTALL) $(VAR_PATH)/yaskkserv_simple/yaskkserv_simple $(DESTDIR)$(PREFIX)/sbin/yaskkserv_simple
++ $(INSTALL) $(VAR_PATH)/yaskkserv_normal/yaskkserv_normal $(DESTDIR)$(PREFIX)/sbin/yaskkserv_normal
++ $(INSTALL) $(VAR_PATH)/yaskkserv_hairy/yaskkserv_hairy $(DESTDIR)$(PREFIX)/sbin/yaskkserv_hairy
+
+ install_simple : install_common_
+ $(MKDIR) -p $(PREFIX)/sbin
+--- a/source/Makefile.bsd_cygwin_linux_gcc.common
++++ b/source/Makefile.bsd_cygwin_linux_gcc.common
+@@ -16,16 +16,16 @@
+ endif # DEBUG
+
+ INCLUDE_FLAGS = -I . -I $(VAR_PATH) -I $(PROJECT_ROOT)/source/skk -I $(PROJECT_ROOT)/source/skk/architecture -I $(PROJECT_ROOT)/source/skk/architecture/$(ARCHITECTURE_LOWER_CASE)
+-LIBRARY_FLAGS = -L/usr/lib
++LIBRARY_FLAGS =
+
+-CPPFLAGS = $(DEBUG_FLAGS) $(CXXFLAGS_ARCHITECTURE) $(CXXFLAGS_BYTE_ORDER) $(CXXFLAGS_CONFIG) $(INCLUDE_FLAGS) $(CXXFLAGS_DEFINE) -D $(PROJECT_IDENTIFIER)_VERSION=\"$(PROJECT_VERSION)\"
++CPPFLAGS += $(DEBUG_FLAGS) $(CXXFLAGS_ARCHITECTURE) $(CXXFLAGS_BYTE_ORDER) $(CXXFLAGS_CONFIG) $(INCLUDE_FLAGS) $(CXXFLAGS_DEFINE) -D $(PROJECT_IDENTIFIER)_VERSION=\"$(PROJECT_VERSION)\"
+
+-CXXFLAGS = $(DEBUG_FLAGS) $(CXXFLAGS_ARCHITECTURE) $(CXXFLAGS_BYTE_ORDER) $(CXXFLAGS_CONFIG) $(INCLUDE_FLAGS) $(OPTIMIZE_FLAGS) $(CXXFLAGS_WARNING) -fno-exceptions -fno-rtti -fmessage-length=0 -pipe -fPIC -D $(PROJECT_IDENTIFIER)_VERSION=\"$(PROJECT_VERSION)\"
++CXXFLAGS += $(DEBUG_FLAGS) $(CXXFLAGS_ARCHITECTURE) $(CXXFLAGS_BYTE_ORDER) $(CXXFLAGS_CONFIG) $(INCLUDE_FLAGS) $(OPTIMIZE_FLAGS) $(CXXFLAGS_WARNING) -fno-exceptions -fno-rtti -fmessage-length=0 -pipe -fPIC -D $(PROJECT_IDENTIFIER)_VERSION=\"$(PROJECT_VERSION)\"
+
+-LDFLAGS = $(DEBUG_FLAGS) $(LDFLAGS_ARCHITECTURE) $(OPTIMIZE_FLAGS) -pipe $(LIBRARY_FLAGS) -fPIC
++LDFLAGS += $(DEBUG_FLAGS) $(LDFLAGS_ARCHITECTURE) $(OPTIMIZE_FLAGS) -pipe $(LIBRARY_FLAGS) -fPIC
+
+ CXX = $(CCACHE) $(COMPILER)
+ LD = $(COMPILER)
+ CPP = $(CXX)
+ LD = $(CXX)
+-STRIP = strip
++STRIP = true
+--- a/source/yaskkserv_hairy/Makefile.bsd_cygwin_linux_gcc
++++ b/source/yaskkserv_hairy/Makefile.bsd_cygwin_linux_gcc
+@@ -12,7 +12,7 @@
+ # RUN_FLAGS = --port=9999 --google-japanese-input=dictionary --google-suggest --google-japanese-input-timeout=1.1 https://www.google.com
+ # RUN_FLAGS = --port=9999 --google-japanese-input=dictionary --google-japanese-input-timeout=1.1 http://www.google.com /home/wac/local/share/skk/SKK-JISYO.total+zipcode.yaskkserv
+ # RUN_FLAGS = --port=9999 --google-japanese-input=dictionary --google-japanese-input-timeout=1.1 http://www.google.com
+-CXXFLAGS += $(CXXFLAGS_OPTIMIZE_SERVER_HAIRY) $(CXXFLAGS_WARNING_SERVER_HAIRY)
++CXXFLAGS += $(CXXFLAGS_WARNING_SERVER_HAIRY)
+
+ SOURCES = ${wildcard *.cpp}
+ OBJECTS = ${addprefix $(VAR_PATH)/$(TARGET_BASE)/,$(SOURCES:.cpp=.o)}
+--- a/source/yaskkserv_make_dictionary/Makefile.bsd_cygwin_linux_gcc
++++ b/source/yaskkserv_make_dictionary/Makefile.bsd_cygwin_linux_gcc
+@@ -5,7 +5,7 @@
+ TARGET_BASE = yaskkserv_make_dictionary
+
+ RUN_FLAGS =
+-CXXFLAGS += $(CXXFLAGS_OPTIMIZE_TOOL) $(CXXFLAGS_WARNING_TOOL)
++CXXFLAGS += $(CXXFLAGS_WARNING_TOOL)
+
+ SOURCES = ${wildcard *.cpp}
+ OBJECTS = ${addprefix $(VAR_PATH)/$(TARGET_BASE)/,$(SOURCES:.cpp=.o)}
+--- a/source/yaskkserv_normal/Makefile.bsd_cygwin_linux_gcc
++++ b/source/yaskkserv_normal/Makefile.bsd_cygwin_linux_gcc
+@@ -5,7 +5,7 @@
+ TARGET_BASE = yaskkserv_normal
+
+ RUN_FLAGS = --check-update --port=9999 /var/tmp/SKK-JISYO.total+zipcode.yaskkserv
+-CXXFLAGS += $(CXXFLAGS_OPTIMIZE_SERVER_NORMAL) $(CXXFLAGS_WARNING_SERVER_NORMAL)
++CXXFLAGS += $(CXXFLAGS_WARNING_SERVER_NORMAL)
+
+ SOURCES = ${wildcard *.cpp}
+ OBJECTS = ${addprefix $(VAR_PATH)/$(TARGET_BASE)/,$(SOURCES:.cpp=.o)}
+--- a/source/yaskkserv_simple/Makefile.bsd_cygwin_linux_gcc
++++ b/source/yaskkserv_simple/Makefile.bsd_cygwin_linux_gcc
+@@ -5,7 +5,7 @@
+ TARGET_BASE = yaskkserv_simple
+
+ RUN_FLAGS = --port=9999 /var/tmp/SKK-JISYO.total+zipcode.yaskkserv
+-CXXFLAGS += $(CXXFLAGS_OPTIMIZE_SERVER_SIMPLE) $(CXXFLAGS_WARNING_SERVER_SIMPLE)
++CXXFLAGS += $(CXXFLAGS_WARNING_SERVER_SIMPLE)
+
+ SOURCES = ${wildcard *.cpp}
+ OBJECTS = ${addprefix $(VAR_PATH)/$(TARGET_BASE)/,$(SOURCES:.cpp=.o)}
diff --git a/app-i18n/yaskkserv/files/yaskkserv.confd b/app-i18n/yaskkserv/files/yaskkserv.confd
new file mode 100644
index 000000000000..eef7cad616ab
--- /dev/null
+++ b/app-i18n/yaskkserv/files/yaskkserv.confd
@@ -0,0 +1,10 @@
+# Select yaskkserv server type:
+# - simple
+# Without dictionary reloading
+# - normal
+# - hairy
+# With "Server completion" and "Google Japanese Input API"
+YASKKSERV_SERVER_TYPE="normal"
+
+# Options to pass to yaskkserv
+YASKKSERV_OPTS="/usr/share/skk/SKK-JISYO.L.yaskkserv"
diff --git a/app-i18n/yaskkserv/files/yaskkserv.initd b/app-i18n/yaskkserv/files/yaskkserv.initd
new file mode 100644
index 000000000000..a378c266af71
--- /dev/null
+++ b/app-i18n/yaskkserv/files/yaskkserv.initd
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+command=/usr/sbin/${SVCNAME}_${YASKKSERV_SERVER_TYPE}
+command_args="--no-daemonize ${YASKKSERV_OPTS}"
+command_background="true"
+pidfile=${pidfile:-/run/${SVCNAME}.pid}
+
+depend() {
+ need net
+ use logger
+}
diff --git a/app-i18n/yaskkserv/files/yaskkserv.service b/app-i18n/yaskkserv/files/yaskkserv.service
new file mode 100644
index 000000000000..40c8ee4c8974
--- /dev/null
+++ b/app-i18n/yaskkserv/files/yaskkserv.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Yet Another SKK server
+After=yaskkserv.socket
+Requires=yaskkserv.socket
+
+[Service]
+User=nobody
+EnvironmentFile=/etc/conf.d/yaskkserv
+ExecStart=/usr/sbin/yaskkserv${YASKKSERV_SERVER_TYPE} --no-daemonize ${YASKKSERV_OPTS}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-i18n/yaskkserv/metadata.xml b/app-i18n/yaskkserv/metadata.xml
new file mode 100644
index 000000000000..11ae35030635
--- /dev/null
+++ b/app-i18n/yaskkserv/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>cjk@gentoo.org</email>
+ <name>Cjk</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">wachikun/yaskkserv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-i18n/yaskkserv/yaskkserv-1.1.0.ebuild b/app-i18n/yaskkserv/yaskkserv-1.1.0.ebuild
new file mode 100644
index 000000000000..f227c2f35906
--- /dev/null
+++ b/app-i18n/yaskkserv/yaskkserv-1.1.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+inherit toolchain-funcs systemd
+
+DESCRIPTION="Yet Another SKK server"
+HOMEPAGE="http://umiushi.org/~wac/yaskkserv/"
+SRC_URI="http://umiushi.org/~wac/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gnutls libressl systemd"
+
+RDEPEND="app-i18n/skk-jisyo
+ gnutls? ( net-libs/gnutls )
+ !gnutls? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ systemd? ( virtual/udev[systemd] )"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+REQUIRED_USE="?? ( gnutls libressl )"
+
+PATCHES=( "${FILESDIR}"/${PN}-gentoo.patch )
+DOCS=( README.md )
+HTML_DOCS=( documentation/. )
+
+src_configure() {
+ econf \
+ $(use_enable gnutls) \
+ $(use_enable systemd) \
+ --compiler="${tc_getCXX}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install_all
+ einstalldocs
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+
+ systemd_dounit examples/${PN}.socket
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
+
+pkg_postinst() {
+ pkg_config
+
+ elog "You need to run:"
+ elog " emerge --config =${CATEGORY}/${PF}"
+ elog "after updating app-i18n/skk-jisyo from next time."
+}
+
+pkg_postrm() {
+ rm -f "${ROOT}"/usr/share/skk/SKK-JISYO.*.${PN}
+ rmdir "${ROOT}"/usr/share/skk 2>/dev/null
+}
+
+pkg_config() {
+ local f
+ for f in "${ROOT}"/usr/share/skk/SKK-JISYO.*; do
+ case ${f} in
+ *.cdb)
+ ;;
+ *.${PN})
+ [[ -f ${f%.*} ]] || rm -f "${f}"
+ ;;
+ *)
+ [[ ${f} -nt ${f}.${PN} ]] && ${PN}_make_dictionary "${f}" "${f}.${PN}"
+ ;;
+ esac
+ done
+}