summaryrefslogtreecommitdiff
path: root/net-misc/tokyotyrant
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/tokyotyrant
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/tokyotyrant')
-rw-r--r--net-misc/tokyotyrant/Manifest9
-rw-r--r--net-misc/tokyotyrant/files/fix_makefiles-1.4.41.patch85
-rw-r--r--net-misc/tokyotyrant/files/fix_testsuite.patch104
-rw-r--r--net-misc/tokyotyrant/files/tokyotyrant.confd15
-rw-r--r--net-misc/tokyotyrant/files/tokyotyrant.initd38
-rw-r--r--net-misc/tokyotyrant/metadata.xml8
-rw-r--r--net-misc/tokyotyrant/tokyotyrant-1.1.41-r1.ebuild64
7 files changed, 323 insertions, 0 deletions
diff --git a/net-misc/tokyotyrant/Manifest b/net-misc/tokyotyrant/Manifest
new file mode 100644
index 000000000000..c3bd055bbfde
--- /dev/null
+++ b/net-misc/tokyotyrant/Manifest
@@ -0,0 +1,9 @@
+AUX fix_makefiles-1.4.41.patch 3247 SHA256 253d02436a3f8cb9f0826ec9380ee89ab9b1ff7451de33095b283f717e5880ee SHA512 0b9a1cc16f999a0a89c5e58fdc7e9aa98c66c9357804c46bb4657279434d59c3928d37ddc774fba53a8bccdd1fd530efa5f418388cb18805a5ffc81fc3405a4b WHIRLPOOL 79272a29fc6a51aa1133d13643703570798237c6b08afd6a04a2ce1465fb07f3e851a3e9102346499c6811769f7ceeead2fe859279b4c260a2a98f676f89b5b2
+AUX fix_testsuite.patch 6590 SHA256 c7d031aa0588ab77d0e37742a0001def4e6671860ae7368df7a8229b68427d92 SHA512 a22dc39f3abe870f6c3219b945411e38035a00e403a477440d11232215e30df03a85eb315f3957dc6d9c494a92a1f4caa641d520744e8bd728b088ea05d3c459 WHIRLPOOL f9533ea95af3ce7541af586569b93143983a19434c5923b447d8cc53c1f8c2f18d2a4da1689932d37b7842cf737e2a58cb65fa91266303a3060e8560821d2432
+AUX tokyotyrant.confd 361 SHA256 cc40f58e8de8cb4b17d7e065ee605f0c558fdbe10ca370ca511498a9005bfe90 SHA512 5e762267eba0f214a47d385c41d32b9a2a82c7ece41c42266ad980a936080528b42d7f86fd2b32679f65e97f6b1b6a3a74d8d7c4465cc9b2739c4d1746f04cf0 WHIRLPOOL 8047daad6f383f683ed82cdbc43299915e0caeb567907f22cfc2c3a8d554ab78c6eecf3269dac014c773ed06623aa0de1e2485af23f03471e56f42a7008eb4ab
+AUX tokyotyrant.initd 800 SHA256 9e8c146c4deaaed7ed3f3949ed9faed60a894bba31c2925ab116b630cbe4ba6f SHA512 e00874a33eeab7228815e303d9a028e9ce50dde96012db397bcf11a530acecbb9a3252468d2745e239e1b7a7e873f3bb87962c585cea122e011a981fdf0ba9bf WHIRLPOOL 045a86e3dca7c6faf353a1b5a44b06a88cbc96bb2964d920bde9b78af063e932ef093167946e07bfc09137028ddc5a3441d4c6edf27b85d48b67d4e2ab944e0a
+DIST tokyotyrant-1.1.41.tar.gz 196196 SHA256 42af70fb9f2795d4e05c3e37941ce392a9eaafc991e230c48115370f6d64b88f SHA512 fb181ecab19981733b4b478614f9b28d7f1f776bafe6c58c4bc3e26ed294301a6242d7cd1d47b7d6b55a93305474d2e8e0a75f2f01af21a8bc93d158c8f8179e WHIRLPOOL a4bc53f222e3a210af6b4c1d7ed7a6f345e457b84de166535758a9459ceab9b07ee9a2654affd85980bdec1ebaaf9c287f80d7938276dc24e3be959a408b5320
+EBUILD tokyotyrant-1.1.41-r1.ebuild 1316 SHA256 2fab0dd483edd69f0d456e7e9f5d18496cddcc0028f3fc1624033664290c78b0 SHA512 951748d4f910e55cfc6f4927b2e53fc25b810313413b519226bcab62c3266814b4977bb3094931521af07c089923a5a1b849e42772aa1e031c054a641a589570 WHIRLPOOL 80f87ecda00c9f910c6447063e9ecb99f23ccdd9abce7e23c54955c0725bf52585fae62e557fb31fdcb5d297526160eb377f47b7ffd7cdbe63b2b2419488c741
+MISC ChangeLog 2449 SHA256 4e7e9ac54e33dfb914b66b27834d71d3153928eb441a027940c019f20e1da66f SHA512 0301dfc3dc19ab9cbd0a793786e8a83db32043b838846f99dc1173e048b5c9c86b95fe6476c175c54837f301e4d96a094aef24925971911ee9e9725d4788222e WHIRLPOOL 84978c73a052affed5765a2fb2a0ef5dbd8b622e7606d254fbb33f9d3622ad070ded19dcbc04a4a3d252c163dc5c976378cc6efb72dd0ff234c76b1e95731778
+MISC ChangeLog-2015 2279 SHA256 81e0814d178ded1a338b76c32d101870885b9b478048345237d93624e18d0711 SHA512 235b11c4f83321aec03d435b3d78c151a4c63298a0bf295cbf99a2540e438f3e82d684ab9982794e04105aa5e90a219a3d4bdc9e1e16a38ac83d8953026a39b1 WHIRLPOOL 97a1981804517b06396ca070f249eb5d5dda1609b80bb5135434592087f1de0795a47d523923c96403d796a1981b23fdf193990be847e06b0b9c0960e1d0ecd8
+MISC metadata.xml 247 SHA256 0deec0776f26fb762fdf7711f4589b14f52a2456436ef557eec62a2cf2fb2bb7 SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7 WHIRLPOOL a135fa622e99d3dcdb432bc6b3c366076b3d86b4bfd9a76c852d781b8e9152541c7e7a2c7c6d6a3c4d2200dce792847a08166aaf7c17c22b6299dfe868234dec
diff --git a/net-misc/tokyotyrant/files/fix_makefiles-1.4.41.patch b/net-misc/tokyotyrant/files/fix_makefiles-1.4.41.patch
new file mode 100644
index 000000000000..40d26cc5f93a
--- /dev/null
+++ b/net-misc/tokyotyrant/files/fix_makefiles-1.4.41.patch
@@ -0,0 +1,85 @@
+diff --git a/Makefile.in b/Makefile.in
+index b388455..52d3bc3 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -58,8 +58,8 @@ CFLAGS = @MYCFLAGS@
+ LDFLAGS = @MYLDFLAGS@
+ CMDLDFLAGS = @MYCMDLDFLAGS@
+ LIBS = @LIBS@
+-LDENV = LD_RUN_PATH=/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@:.
+-RUNENV = @MYLDLIBPATHENV@=.:/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@
++LDENV =
++RUNENV = @MYLDLIBPATHENV@=.:$(LIBDIR)
+ POSTCMD = @MYPOSTCMD@
+
+
+@@ -120,10 +120,6 @@ install :
+ cp -Rf $(LIBRARYFILES) $(DESTDIR)$(LIBDIR)
+ mkdir -p $(DESTDIR)$(BINDIR)
+ cp -Rf $(COMMANDFILES) $(DESTDIR)$(BINDIR)
+- mkdir -p $(DESTDIR)$(SBINDIR)
+- cp -Rf $(INITFILES) $(DESTDIR)$(SBINDIR)
+- mkdir -p $(DESTDIR)$(DATADIR)
+- cp -Rf $(SCREXTFILES) $(DOCUMENTFILES) $(DESTDIR)$(DATADIR)
+ mkdir -p $(DESTDIR)$(MAN1DIR)
+ cd man && cp -Rf $(MAN1FILES) $(DESTDIR)$(MAN1DIR)
+ mkdir -p $(DESTDIR)$(MAN3DIR)
+@@ -132,7 +128,6 @@ install :
+ cd man && cp -Rf $(MAN8FILES) $(DESTDIR)$(MAN8DIR)
+ mkdir -p $(DESTDIR)$(PCDIR)
+ cp -Rf $(PCFILES) $(DESTDIR)$(PCDIR)
+- [ "$$UID" == 0 ] && ldconfig || true
+ @printf '\n'
+ @printf '#================================================================\n'
+ @printf '# Thanks for using Tokyo Tyrant.\n'
+diff --git a/configure.in b/configure.in
+index fbe0c71..809a839 100644
+--- a/configure.in
++++ b/configure.in
+@@ -28,33 +28,15 @@ MYDOCUMENTFILES="COPYING ChangeLog THANKS doc tokyotyrant.idl"
+ MYPCFILES="tokyotyrant.pc"
+
+ # Building flags
+-MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char -O2"
++MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char"
+ MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I$HOME/include -I/usr/local/include"
+ MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__"
+-MYLDFLAGS="-L. -L\$(LIBDIR) -L$HOME/lib -L/usr/local/lib"
++MYLDFLAGS="-L. -L\$(LIBDIR)"
+ MYCMDLDFLAGS=""
+ MYRUNPATH="\$(LIBDIR)"
+ MYLDLIBPATHENV="LD_LIBRARY_PATH"
+ MYPOSTCMD="true"
+
+-# Building paths
+-PATH="$PATH:$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
+-PATH="$PATH:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/xpg4/bin:/usr/xpg6/bin:/usr/ucb"
+-CPATH="$HOME/include:/usr/local/include:$CPATH"
+-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH"
+-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH"
+-PKG_CONFIG_PATH="$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
+-export PATH CPATH LIBRARY_PATH LD_LIBRARY_PATH PKG_CONFIG_PATH
+-if type pkg-config > /dev/null 2>&1
+-then
+- PATH="$PATH:`pkg-config --variable=bindir tokyocabinet`"
+- CPATH="$CPATH:`pkg-config --variable=includedir tokyocabinet`"
+- LIBRARY_PATH="$LIBRARY_PATH:`pkg-config --variable=libdir tokyocabinet`"
+- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:`pkg-config --variable=libdir tokyocabinet`"
+-fi
+-
+-
+-
+ #================================================================
+ # Options
+ #================================================================
+diff --git a/tokyotyrant.pc.in b/tokyotyrant.pc.in
+index efb3749..efec1f6 100644
+--- a/tokyotyrant.pc.in
++++ b/tokyotyrant.pc.in
+@@ -10,5 +10,5 @@ datadir=@datadir@
+ Name: Tokyo Tyrant
+ Description: network interface of Tokyo Cabinet
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -ltokyotyrant @LIBS@
++Libs: -L${libdir} -ltokyotyrant
+ Cflags: -I${includedir}
diff --git a/net-misc/tokyotyrant/files/fix_testsuite.patch b/net-misc/tokyotyrant/files/fix_testsuite.patch
new file mode 100644
index 000000000000..d48825381777
--- /dev/null
+++ b/net-misc/tokyotyrant/files/fix_testsuite.patch
@@ -0,0 +1,104 @@
+--- Makefile.in 2009-10-14 10:33:16.000000000 +0200
++++ Makefile.in.new 2009-10-14 10:27:39.000000000 +0200
+@@ -166,48 +166,49 @@
+
+
+ check :
++ $(RUNENV) $(RUNCMD) ./ttserver -dmn -host 127.0.0.1 -port 19781 -pid /tmp/tttest.pid /tmp/tttest.tch
+ $(RUNENV) $(RUNCMD) ./tcrmgr version
+- $(RUNENV) $(RUNCMD) ./tcrtest write -cnum 5 -tout 5 -rnd 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest write -cnum 5 -tout 5 -nr -rnd 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest write -cnum 5 -tout 5 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest read -cnum 5 -tout 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrtest read -cnum 5 -tout 5 -mul 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrtest remove -cnum 5 -tout 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrtest rcat -cnum 5 -tout 5 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest rcat -cnum 5 -tout 5 -shl 50 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrmgr vanish 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrtest rcat -cnum 5 -tout 5 -dad 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest rcat -cnum 5 -tout 5 -ext putcat -xlr 127.0.0.1 50000
+- $(RUNENV) $(RUNCMD) ./tcrtest misc -cnum 5 -tout 5 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrtest wicked -cnum 5 -tout 5 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrmgr inform 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmgr vanish 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmttest write -tnum 5 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrmttest read -tnum 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmttest remove -tnum 5 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmttest write -tnum 5 -ext putcat -rnd 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrmttest typical -tnum 5 127.0.0.1 5000
+- $(RUNENV) $(RUNCMD) ./tcrmgr vanish 127.0.0.1
+- $(RUNENV) $(RUNCMD) ./tcrmgr put 127.0.0.1 one first
+- $(RUNENV) $(RUNCMD) ./tcrmgr put 127.0.0.1 two second
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dk 127.0.0.1 three third
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dc 127.0.0.1 three third
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dc 127.0.0.1 three third
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dc 127.0.0.1 three third
+- $(RUNENV) $(RUNCMD) ./tcrmgr put 127.0.0.1 four fourth
+- $(RUNENV) $(RUNCMD) ./tcrmgr put -dk 127.0.0.1 five fifth
+- $(RUNENV) $(RUNCMD) ./tcrmgr out 127.0.0.1 one
+- $(RUNENV) $(RUNCMD) ./tcrmgr out 127.0.0.1 two
+- $(RUNENV) $(RUNCMD) ./tcrmgr get 127.0.0.1 three > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr get 127.0.0.1 four > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr get 127.0.0.1 five > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr mget 127.0.0.1 one two three four five > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr misc 127.0.0.1 putlist six sixth seven seventh
+- $(RUNENV) $(RUNCMD) ./tcrmgr misc 127.0.0.1 outlist six
+- $(RUNENV) $(RUNCMD) ./tcrmgr misc 127.0.0.1 getlist three four five six > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr list -pv 127.0.0.1 > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr list -pv -fm f 127.0.0.1 > check.out
+- $(RUNENV) $(RUNCMD) ./tcrmgr http -ih http://127.0.0.1:1978/five > check.out
++ $(RUNENV) $(RUNCMD) ./tcrtest write -port 19781 -cnum 5 -tout 5 -rnd 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest write -port 19781 -cnum 5 -tout 5 -nr -rnd 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest write -port 19781 -cnum 5 -tout 5 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest read -port 19781 -cnum 5 -tout 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrtest read -port 19781 -cnum 5 -tout 5 -mul 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrtest remove -port 19781 -cnum 5 -tout 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrtest rcat -port 19781 -cnum 5 -tout 5 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest rcat -port 19781 -cnum 5 -tout 5 -shl 50 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrmgr vanish -port 19781 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrtest rcat -port 19781 -cnum 5 -tout 5 -dad 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest rcat -port 19781 -cnum 5 -tout 5 -ext putcat -xlr 127.0.0.1 50000
++ $(RUNENV) $(RUNCMD) ./tcrtest misc -port 19781 -cnum 5 -tout 5 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrtest wicked -port 19781 -cnum 5 -tout 5 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrmgr inform -port 19781 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmgr vanish -port 19781 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmttest write -port 19781 -tnum 5 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrmttest read -port 19781 -tnum 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmttest remove -port 19781 -tnum 5 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmttest write -port 19781 -tnum 5 -ext putcat -rnd 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrmttest typical -port 19781 -tnum 5 127.0.0.1 5000
++ $(RUNENV) $(RUNCMD) ./tcrmgr vanish -port 19781 127.0.0.1
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 127.0.0.1 one first
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 127.0.0.1 two second
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dk 127.0.0.1 three third
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dc 127.0.0.1 three third
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dc 127.0.0.1 three third
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dc 127.0.0.1 three third
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 127.0.0.1 four fourth
++ $(RUNENV) $(RUNCMD) ./tcrmgr put -port 19781 -dk 127.0.0.1 five fifth
++ $(RUNENV) $(RUNCMD) ./tcrmgr out -port 19781 127.0.0.1 one
++ $(RUNENV) $(RUNCMD) ./tcrmgr out -port 19781 127.0.0.1 two
++ $(RUNENV) $(RUNCMD) ./tcrmgr get -port 19781 127.0.0.1 three > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr get -port 19781 127.0.0.1 four > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr get -port 19781 127.0.0.1 five > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr mget -port 19781 127.0.0.1 one two three four five > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr misc -port 19781 127.0.0.1 putlist six sixth seven seventh
++ $(RUNENV) $(RUNCMD) ./tcrmgr misc -port 19781 127.0.0.1 outlist six
++ $(RUNENV) $(RUNCMD) ./tcrmgr misc -port 19781 127.0.0.1 getlist three four five six > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr list -port 19781 -pv 127.0.0.1 > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr list -port 19781 -pv -fm f 127.0.0.1 > check.out
++ $(RUNENV) $(RUNCMD) ./tcrmgr http -ih http://127.0.0.1:19781/five > check.out
+ rm -rf ulog ; mkdir -p ulog
+ $(RUNENV) $(RUNCMD) ./ttultest write -lim 10000 ulog 5000
+ $(RUNENV) $(RUNCMD) ./ttultest write -lim 10000 -as ulog 5000
+@@ -215,6 +216,10 @@
+ rm -rf ulog ; mkdir -p ulog
+ $(RUNENV) $(RUNCMD) ./ttultest thread -lim 10000 ulog 5 5000
+ $(RUNENV) $(RUNCMD) ./ttultest thread -lim 10000 -as ulog 5 5000
++
++ kill `cat /tmp/tttest.pid`
++ rm /tmp/tttest.tch
++
+ @printf '\n'
+ @printf '#================================================================\n'
+ @printf '# Checking completed.\n'
diff --git a/net-misc/tokyotyrant/files/tokyotyrant.confd b/net-misc/tokyotyrant/files/tokyotyrant.confd
new file mode 100644
index 000000000000..b6417134f47c
--- /dev/null
+++ b/net-misc/tokyotyrant/files/tokyotyrant.confd
@@ -0,0 +1,15 @@
+# Tokyo tyrant config
+
+# Listening options
+TT_HOST=127.0.0.1
+TT_PORT=1978
+
+# Database file - please refer to man ttserver for alternatives
+TT_DB="/var/lib/tokyotyrant/casket.tch#bnum=1000000#opts=ld"
+
+# ttserver accepts a wide range of options, put them here
+TT_OPTS=""
+
+# don't change these
+TT_PID=/var/run/tokyotyrant/db.pid
+TT_LOG=/var/log/tokyotyrant/db.log \ No newline at end of file
diff --git a/net-misc/tokyotyrant/files/tokyotyrant.initd b/net-misc/tokyotyrant/files/tokyotyrant.initd
new file mode 100644
index 000000000000..f754d4901bfc
--- /dev/null
+++ b/net-misc/tokyotyrant/files/tokyotyrant.initd
@@ -0,0 +1,38 @@
+#!/sbin/openrc-run
+
+extra_commands="configtest reload"
+
+depend() {
+ need net
+}
+
+start() {
+ configtest || return 1
+ ebegin "Starting tokyo tyrant"
+ start-stop-daemon --start --exec /usr/bin/ttserver -- \
+ -pid ${TT_PID} -dmn -host ${TT_HOST} -log ${TT_LOG} \
+ -port ${TT_PORT} ${TT_OPTS} ${TT_DB}
+ eend $? "Failed to start tokyo tyrant"
+}
+
+stop() {
+ configtest || return 1
+ ebegin "Stopping tokyo tyrant"
+ start-stop-daemon --stop --pidfile ${TT_PID}
+ eend $? "Failed to stop tokyo tyrant"
+ rm -f ${TT_PID}
+}
+
+reload() {
+ configtest || return 1
+ ebegin "Gracefully restarting tokyo tyrant"
+ kill -HUP `cat ${TT_PID}` &>/dev/null
+ eend $? "Failed to reload tokyo tyrant"
+}
+
+configtest() {
+ if [ -z "${TT_DB}" ] || [ -z "${TT_PORT}" ] ; then
+ eerror "Please check your configuration"
+ eend $?
+ fi
+}
diff --git a/net-misc/tokyotyrant/metadata.xml b/net-misc/tokyotyrant/metadata.xml
new file mode 100644
index 000000000000..40aa45df2b01
--- /dev/null
+++ b/net-misc/tokyotyrant/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/tokyotyrant/tokyotyrant-1.1.41-r1.ebuild b/net-misc/tokyotyrant/tokyotyrant-1.1.41-r1.ebuild
new file mode 100644
index 000000000000..3aebae8184ac
--- /dev/null
+++ b/net-misc/tokyotyrant/tokyotyrant-1.1.41-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit eutils user
+
+DESCRIPTION="A network interface to Tokyo Cabinet"
+HOMEPAGE="http://fallabs.com/tokyotyrant/"
+SRC_URI="${HOMEPAGE}${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86 ~ppc-macos ~x86-macos"
+IUSE="debug examples lua"
+
+DEPEND="dev-db/tokyocabinet
+ sys-libs/zlib
+ app-arch/bzip2
+ lua? ( dev-lang/lua )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ if use !prefix ; then
+ enewgroup tyrant
+ enewuser tyrant -1 -1 /var/lib/${PN} tyrant
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/fix_makefiles-1.4.41.patch
+ epatch "${FILESDIR}"/fix_testsuite.patch
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable lua)
+}
+
+src_install() {
+ rm ttservctl || die "Install failed"
+ emake DESTDIR="${D}" install || die "Install failed"
+
+ for x in /var/{lib,run,log}/${PN}; do
+ dodir "${x}" || die "Install failed"
+ use prefix || fowners tyrant:tyrant "${x}"
+ done
+
+ if use examples; then
+ insinto /usr/share/${PF}/example
+ doins example/* || die "Install failed"
+ fi
+
+ dohtml doc/* || die
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} || die "Install failed"
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} || die "Install failed"
+
+}
+
+src_test() {
+ emake -j1 check || die "Tests failed"
+}