summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2009-10-09 23:45:18 +0000
committerPatrick Lauer <patrick@gentoo.org>2009-10-09 23:45:18 +0000
commit0fcbd583a3caa11a68b8cb1b7856272d8cfa53c1 (patch)
tree52d94331dc8a15a5ab50837e72a8ab7732ddd40c
parentInitial import of tokyocabinet. Thanks to Petteri Raety, Mark Lewandowski and... (diff)
downloadgentoo-2-0fcbd583a3caa11a68b8cb1b7856272d8cfa53c1.tar.gz
gentoo-2-0fcbd583a3caa11a68b8cb1b7856272d8cfa53c1.tar.bz2
gentoo-2-0fcbd583a3caa11a68b8cb1b7856272d8cfa53c1.zip
Initial import of tokyotyrant. Thanks to Johan Bergstroem for the ebuild. Closes #288265
(Portage version: 2.2_rc44/cvs/Linux x86_64)
-rw-r--r--net-misc/tokyotyrant/ChangeLog13
-rw-r--r--net-misc/tokyotyrant/files/fix_makefiles.patch72
-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.xml9
-rw-r--r--net-misc/tokyotyrant/tokyotyrant-1.1.35.ebuild56
7 files changed, 307 insertions, 0 deletions
diff --git a/net-misc/tokyotyrant/ChangeLog b/net-misc/tokyotyrant/ChangeLog
new file mode 100644
index 000000000000..a8f75716b471
--- /dev/null
+++ b/net-misc/tokyotyrant/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for net-misc/tokyotyrant
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/tokyotyrant/ChangeLog,v 1.1 2009/10/09 23:45:18 patrick Exp $
+
+*tokyotyrant-1.1.35 (09 Oct 2009)
+
+ 09 Oct 2009; Patrick Lauer <patrick@gentoo.org>
+ +tokyotyrant-1.1.35.ebuild, +files/fix_makefiles.patch,
+ +files/fix_testsuite.patch, +files/tokyotyrant.confd,
+ +files/tokyotyrant.initd, +metadata.xml:
+ Initial import of tokyotyrant. Thanks to Johan Bergstroem for the ebuild.
+ Closes #288265
+
diff --git a/net-misc/tokyotyrant/files/fix_makefiles.patch b/net-misc/tokyotyrant/files/fix_makefiles.patch
new file mode 100644
index 000000000000..594964cb4203
--- /dev/null
+++ b/net-misc/tokyotyrant/files/fix_makefiles.patch
@@ -0,0 +1,72 @@
+diff -ur Makefile.in Makefile.in.new
+--- Makefile.in 2009-08-04 09:42:37.000000000 +0200
++++ Makefile.in 2009-10-08 20:53:16.000000000 +0200
+@@ -58,8 +58,8 @@
+ 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,8 +120,6 @@
+ 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)
+diff -ur configure.in configure.in.new
+--- configure.in 2009-09-17 17:26:04.000000000 +0200
++++ configure.in 2009-10-08 20:53:57.000000000 +0200
+@@ -28,33 +28,15 @@
+ 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 -ur tokyotyrant.pc.in tokyotyrant.pc.in.new
+--- tokyotyrant.pc.in 2008-02-18 08:29:28.000000000 +0100
++++ tokyotyrant.pc.in.new 2009-10-08 20:54:12.000000000 +0200
+@@ -10,5 +10,5 @@
+ 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..9ece96f71296
--- /dev/null
+++ b/net-misc/tokyotyrant/files/fix_testsuite.patch
@@ -0,0 +1,104 @@
+--- Makefile.in 2009-10-08 20:53:16.000000000 +0200
++++ Makefile.in.new 2009-10-08 21:32:19.000000000 +0200
+@@ -168,49 +168,50 @@
+
+
+ check :
++ $(RUNENV) $(RUNCMD) ./ttserver -dmn -host 127.0.0.1 -port 19781 -pid /tmp/tttest.pid /tmp/tttest.tch
+ rm -rf casket* ulog
+ $(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
+@@ -219,6 +220,9 @@
+ $(RUNENV) $(RUNCMD) ./ttultest thread -lim 10000 ulog 5 5000
+ $(RUNENV) $(RUNCMD) ./ttultest thread -lim 10000 -as ulog 5 5000
+ rm -rf casket* ulog
++
++ 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..132b71098d0a
--- /dev/null
+++ b/net-misc/tokyotyrant/files/tokyotyrant.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+
+opts="${opts} 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
+} \ No newline at end of file
diff --git a/net-misc/tokyotyrant/metadata.xml b/net-misc/tokyotyrant/metadata.xml
new file mode 100644
index 000000000000..e433c08d449a
--- /dev/null
+++ b/net-misc/tokyotyrant/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-misc/tokyotyrant/tokyotyrant-1.1.35.ebuild b/net-misc/tokyotyrant/tokyotyrant-1.1.35.ebuild
new file mode 100644
index 000000000000..17a574d9b202
--- /dev/null
+++ b/net-misc/tokyotyrant/tokyotyrant-1.1.35.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/tokyotyrant/tokyotyrant-1.1.35.ebuild,v 1.1 2009/10/09 23:45:18 patrick Exp $
+
+EAPI=2
+
+inherit eutils
+
+DESCRIPTION="A network interface to Tokyo Cabinet"
+HOMEPAGE="http://1978th.net/tokyotyrant/"
+SRC_URI="${HOMEPAGE}${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug lua"
+
+DEPEND="dev-db/tokyocabinet
+ sys-libs/zlib
+ app-arch/bzip2
+ lua? ( dev-lang/lua )"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup tyrant
+ enewuser tyrant -1 -1 /var/lib/${PN} tyrant
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/fix_makefiles.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"
+ fowners tyrant:tyrant "${x}"
+ done
+
+ newinitd "${FILESDIR}/${PN}.initd" ${PN} || die "Install failed"
+ newconfd "${FILESDIR}/${PN}.confd" ${PN} || die "Install failed"
+
+}
+
+src_test() {
+ emake -j1 check || die "Tests failed"
+}