diff options
Diffstat (limited to 'app-i18n/yaskkserv')
-rw-r--r-- | app-i18n/yaskkserv/Manifest | 7 | ||||
-rw-r--r-- | app-i18n/yaskkserv/files/yaskkserv-gentoo.patch | 93 | ||||
-rw-r--r-- | app-i18n/yaskkserv/files/yaskkserv.confd | 10 | ||||
-rw-r--r-- | app-i18n/yaskkserv/files/yaskkserv.initd | 13 | ||||
-rw-r--r-- | app-i18n/yaskkserv/files/yaskkserv.service | 12 | ||||
-rw-r--r-- | app-i18n/yaskkserv/metadata.xml | 11 | ||||
-rw-r--r-- | app-i18n/yaskkserv/yaskkserv-1.1.0.ebuild | 82 |
7 files changed, 228 insertions, 0 deletions
diff --git a/app-i18n/yaskkserv/Manifest b/app-i18n/yaskkserv/Manifest new file mode 100644 index 000000000000..59b31ba49975 --- /dev/null +++ b/app-i18n/yaskkserv/Manifest @@ -0,0 +1,7 @@ +AUX yaskkserv-gentoo.patch 5013 BLAKE2B 5eed1d31e9ded20e2736747afdf7b646daf918259c60a03bef12059de5bb275189e22e35965be90ce8318233478baa7d76a771ac9faa67163bd084a5b95f65f4 SHA512 2a60853a4badd5d32482be108b36cce90fa42995f2cbe1d9324e6d3da2a94ee8f6744f1b9bce3b9f34f1b2b0cddd8cb5a212e06b7b45d95b744e162f58ec0ba0 +AUX yaskkserv.confd 280 BLAKE2B 465561acdcf1daa1589d84a74708ceff777dee5ed04510e2ca04bac2dbd034d1a5847476b68844bbd819f6818b8b1a07c52404548d417a8db30737ca7f235eb2 SHA512 dd9c906937814a1e59d92d80427e4ba97b2ff8e0a3d26dc457b882693de30ad5db5aa7941b948f876d7ef90b402bd4c42142eac3caca29f6976197463597a835 +AUX yaskkserv.initd 341 BLAKE2B 1e26304d24ecb6a931936ff06d9f24bb92b4aa01a3ea7d5db0ec7cd12c48c062f5ce664624b51592d87bb971cb82855fbc2220ca82cd6d0f4d55172e7ba2b0f5 SHA512 2fd63604283c811c7f6fe192e3d8f2b5b3542106b54d39707aa8d6116328634ae43421d6a620fcd1555cdbd53985b2444a381bc32e071cac7e040f6a337a3d8e +AUX yaskkserv.service 277 BLAKE2B 7755728e443ceccdd359864bea9e9e25926c860f13fb3acbecebfdedd919db7fd65ecc1e922f662dc676b2aa90b325a7aaed049abcae9291602f0bb5097b0015 SHA512 8ff4aa6ec41c3df17f560de157a60cd3bf3fcc03a2613c603d533f2891207b7001e2469dd3e9ac8c8cfc7ab5909978467922906e22ba4b4635627b234008ce32 +DIST yaskkserv-1.1.0.tar.xz 75108 BLAKE2B ac567d4715d1767f0690462de934768335eafe4a61010534c16b430876f81ce43ac175dcc0a2546af996dd0bef8fd4c744b475985365abe3d571a4ed3f1c3a4c SHA512 9956a9b2fe587491b7c5f76482f13f91d1c87d445f2ff7effa5ffb68efe076f54f1c63e95b980d889963ac507ed49fa37f76f9deb239da7b7409da5be025c000 +EBUILD yaskkserv-1.1.0.ebuild 1634 BLAKE2B 9d38a535488ba0470aef7bed156208e5c92d12207a659458c9a355ffa6dd36b5b98d4e641531073b5b1424b37102ac83a5f7a0887ec7f8384f884b806770ed28 SHA512 64bfc3d49f57b5098c82aa0e325eaedb7b2b52055288b9ba78fd00643cfcaa63d69e63d3d9d469c87eb49505907b67e12d5a99997fc0387c25c4c1e87e2a5016 +MISC metadata.xml 327 BLAKE2B e7280f2de60adaf8396e8530232e5c100ceb19ff3938d0635135b5664f2bd5175dff3556f07b35278b6835b8df8a6b32299d17d840fcf23a77806f038bd6ad2b SHA512 4e5e5cc7feecfa981ffbacc46f83a56d0dac8f2c5f2cc745ad9dff4ee0f674d40e3b8b8cf46389ffebc0f19281081f9b96d0066588412db91519ec880a10ea73 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..d2e5aefd9e10 --- /dev/null +++ b/app-i18n/yaskkserv/files/yaskkserv.initd @@ -0,0 +1,13 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/${RC_SVCNAME}_${YASKKSERV_SERVER_TYPE}" +command_args="--no-daemonize ${YASKKSERV_OPTS}" +command_background="true" +pidfile="${pidfile:-/run/${RC_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..0d0ae48356cc --- /dev/null +++ b/app-i18n/yaskkserv/yaskkserv-1.1.0.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 +} + +yaskkserv_update() { + 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 +} + +pkg_postinst() { + yaskkserv_update + + 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() { + yaskkserv_update +} |