Skip to content

Commit

Permalink
databases/tarantool: Update to 3.0.0
Browse files Browse the repository at this point in the history
New major release:
https://github.com/tarantool/tarantool/releases/tag/3.0.0

Signed-off-by: Pavel Balaev <mail@void.so>
  • Loading branch information
0x501D authored and arrowd committed Dec 29, 2023
1 parent 1251766 commit 8dbbacc
Show file tree
Hide file tree
Showing 9 changed files with 281 additions and 0 deletions.
60 changes: 60 additions & 0 deletions databases/tarantool/Makefile
@@ -0,0 +1,60 @@
PORTNAME= tarantool
PORTVERSION= 3.0.0
CATEGORIES= databases
MASTER_SITES= https://download.tarantool.org/tarantool/src/

MAINTAINER= balaev@tarantool.org
COMMENT= NoSQL database running in a Lua application server
WWW= https://tarantool.io/

LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE

NOT_FOR_ARCHS= armv6 i386 powerpc64 sparc64
NOT_FOR_ARCHS_REASON= fails to build: Unsupported architecture

BUILD_DEPENDS= gsed:textproc/gsed \
msgpuck>=2.0_6:devel/msgpuck \
curl>=8.4.0:ftp/curl
LIB_DEPENDS= libcurl.so:ftp/curl \
libicui18n.so:devel/icu \
libmsgpuck.so:devel/msgpuck \
libyaml.so:textproc/libyaml \
libzstd.so:archivers/zstd

USES= cmake:noninja compiler:c++11-lang cpe gettext-runtime gmake iconv perl5 readline ssl
USE_PERL5= build

CONFLICTS_INSTALL= tarantool2

BINARY_ALIAS= sed=${LOCALBASE}/bin/gsed
CMAKE_ARGS= -DCMAKE_INSTALL_FULL_SYSCONFDIR=${ETCDIR} \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
-DCMAKE_INSTALL_MANDIR=${PREFIX}/share/man
CMAKE_OFF= ENABLE_BUNDLED_LIBCURL \
ENABLE_BUNDLED_LIBYAML \
ENABLE_BUNDLED_MSGPUCK \
ENABLE_BUNDLED_ZSTD
CMAKE_ON= ENABLE_DIST
MAKE_JOBS_UNSAFE= yes
USE_LDCONFIG= yes
USE_RC_SUBR= tarantool

USERS= tarantool
GROUPS= tarantool

PLIST_SUB= TT_DATADIR=${TT_DATADIR} \
TT_LOGDIR=${TT_LOGDIR}
SUB_FILES= pkg-message

TT_DATADIR?= /var/db/tarantool
TT_LOGDIR?= /var/log/tarantool
TT_RUNDIR?= /var/run/tarantool

post-patch:
@${ECHO_CMD} ${PORTVERSION}-0 > ${WRKSRC}/VERSION

post-install:
@${RMDIR} ${STAGEDIR}${PREFIX}/lib/tarantool/

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions databases/tarantool/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1703671142
SHA256 (tarantool-3.0.0.tar.gz) = 41dee7d752839e47b55dafeca424937e15be2d72d5a002ccc3b7f23dc8dbee3f
SIZE (tarantool-3.0.0.tar.gz) = 43019938
11 changes: 11 additions & 0 deletions databases/tarantool/files/patch-include-order.cmake
@@ -0,0 +1,11 @@
--- src/CMakeLists.txt.orig 2023-12-27 13:53:12.178934000 +0000
+++ src/CMakeLists.txt 2023-12-27 13:53:23.287048000 +0000
@@ -10,7 +10,7 @@
include_directories(${READLINE_INCLUDE_DIRS})
include_directories(${LIBYAML_INCLUDE_DIRS})
include_directories(${MSGPUCK_INCLUDE_DIRS})
-include_directories(BEFORE ${CURL_INCLUDE_DIRS})
+include_directories(${CURL_INCLUDE_DIRS})
include_directories(${ICU_INCLUDE_DIRS})
include_directories(${ICONV_INCLUDE_DIRS})
include_directories(${DECNUMBER_INCLUDE_DIR})
@@ -0,0 +1,11 @@
--- third_party/luajit/cmake/SetVersion.cmake.orig 2021-04-19 14:24:28 UTC
+++ third_party/luajit/cmake/SetVersion.cmake
@@ -4,7 +4,7 @@
# Copyright (C) 2015-2020 IPONWEB Ltd.

function(SetVersion version majver minver patchver tweakver prerel)
- find_package(Git QUIET REQUIRED)
+ find_package(Git QUIET)
if(EXISTS ${CMAKE_SOURCE_DIR}/.git AND Git_FOUND)
# Read version from the project's VCS and store the result
# into version.
14 changes: 14 additions & 0 deletions databases/tarantool/files/pkg-message.in
@@ -0,0 +1,14 @@
[
{ type: install
message: <<EOM
After install, you'll need:

Configuration at /etc/rc.conf:

* Enable tarantool on startup:
tarantool_enable="yes"
* Path to storage link files of instances:
tarantool_instances="%%ETCDIR%%/instances.enabled"
EOM
}
]
53 changes: 53 additions & 0 deletions databases/tarantool/files/tarantool.in
@@ -0,0 +1,53 @@
#!/bin/sh

# PROVIDE: tarantool
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# tarantool_enable="YES"
# tarantool_instances=""
#

. /etc/rc.subr

name="tarantool"
rcvar=tarantool_enable

load_rc_config "$name"

tarantool_enable=${tarantool_enable:-"NO"}
tarantool_instances=${tarantool_instances:-"%%ETCDIR%%/instances.enabled"}

start_cmd="${name}_start"
stop_cmd="${name}_stop"
restart_cmd="${name}_restart"

INSTANCES=$(find ${tarantool_instances} -type l -name '*.lua' 2>/dev/null)
TDAEMON=%%PREFIX%%/bin/tarantool
TCTL=%%PREFIX%%/bin/tarantoolctl

tarantool_start()
{
echo "tarantool: Starting instances"
for inst in ${INSTANCES}
do
${TDAEMON} ${TCTL} start $(basename ${inst} .lua)
done
}

tarantool_stop()
{
echo "tarantool: Stopping instances"
for inst in ${INSTANCES}
do
${TDAEMON} ${TCTL} stop $(basename ${inst} .lua)
done
}

tarantool_restart()
{
tarantool_stop
tarantool_start
}

run_rc_command "$1"
16 changes: 16 additions & 0 deletions databases/tarantool/pkg-descr
@@ -0,0 +1,16 @@
Tarantool is an in-memory database and application server.

Key features of the application server:
- 100% compatible drop-in replacement for Lua 5.1, based on LuaJIT 2.1. Simply
use #!/usr/bin/tarantool instead of #!/usr/bin/lua in your script.
- full support for Lua modules and a rich set of own modules, including
cooperative multitasking, non-blocking I/O, access to external databases, etc

Key features of the database:
- MsgPack data format and MsgPack based client-server protocol
- two data engines: 100% in-memory with optional persistence and a 2-level
disk-based B-tree, to use with large data sets
- multiple index types: HASH, TREE, RTREE, BITSET
- asynchronous master-master replication
- authentication and access control
- the database is just a C extension to the app server and can be turned off
111 changes: 111 additions & 0 deletions databases/tarantool/pkg-plist
@@ -0,0 +1,111 @@
bin/tarantool
bin/tarantoolctl
etc/tarantool/default/tarantool
etc/tarantool/instances.available/example.lua
include/tarantool/lauxlib.h
include/tarantool/lmisclib.h
include/tarantool/lua.h
include/tarantool/lua.hpp
include/tarantool/luaconf.h
include/tarantool/luajit.h
include/tarantool/lualib.h
include/tarantool/module.h
share/man/man1/tarantool.1.gz
share/man/man1/tarantoolctl.1.gz
%%DATADIR%%/luarocks/admin/cache.lua
%%DATADIR%%/luarocks/admin/cmd/add.lua
%%DATADIR%%/luarocks/admin/cmd/make_manifest.lua
%%DATADIR%%/luarocks/admin/cmd/refresh_cache.lua
%%DATADIR%%/luarocks/admin/cmd/remove.lua
%%DATADIR%%/luarocks/admin/index.lua
%%DATADIR%%/luarocks/argparse.lua
%%DATADIR%%/luarocks/build.lua
%%DATADIR%%/luarocks/build/builtin.lua
%%DATADIR%%/luarocks/build/cmake.lua
%%DATADIR%%/luarocks/build/command.lua
%%DATADIR%%/luarocks/build/make.lua
%%DATADIR%%/luarocks/cmd.lua
%%DATADIR%%/luarocks/cmd/build.lua
%%DATADIR%%/luarocks/cmd/config.lua
%%DATADIR%%/luarocks/cmd/doc.lua
%%DATADIR%%/luarocks/cmd/download.lua
%%DATADIR%%/luarocks/cmd/init.lua
%%DATADIR%%/luarocks/cmd/install.lua
%%DATADIR%%/luarocks/cmd/lint.lua
%%DATADIR%%/luarocks/cmd/list.lua
%%DATADIR%%/luarocks/cmd/make.lua
%%DATADIR%%/luarocks/cmd/new_version.lua
%%DATADIR%%/luarocks/cmd/pack.lua
%%DATADIR%%/luarocks/cmd/path.lua
%%DATADIR%%/luarocks/cmd/purge.lua
%%DATADIR%%/luarocks/cmd/remove.lua
%%DATADIR%%/luarocks/cmd/search.lua
%%DATADIR%%/luarocks/cmd/show.lua
%%DATADIR%%/luarocks/cmd/test.lua
%%DATADIR%%/luarocks/cmd/unpack.lua
%%DATADIR%%/luarocks/cmd/upload.lua
%%DATADIR%%/luarocks/cmd/which.lua
%%DATADIR%%/luarocks/cmd/write_rockspec.lua
%%DATADIR%%/luarocks/core/cfg.lua
%%DATADIR%%/luarocks/core/dir.lua
%%DATADIR%%/luarocks/core/hardcoded.lua
%%DATADIR%%/luarocks/core/manif.lua
%%DATADIR%%/luarocks/core/path.lua
%%DATADIR%%/luarocks/core/persist.lua
%%DATADIR%%/luarocks/core/sysdetect.lua
%%DATADIR%%/luarocks/core/util.lua
%%DATADIR%%/luarocks/core/vers.lua
%%DATADIR%%/luarocks/deplocks.lua
%%DATADIR%%/luarocks/deps.lua
%%DATADIR%%/luarocks/dir.lua
%%DATADIR%%/luarocks/download.lua
%%DATADIR%%/luarocks/fetch.lua
%%DATADIR%%/luarocks/fetch/cvs.lua
%%DATADIR%%/luarocks/fetch/git.lua
%%DATADIR%%/luarocks/fetch/git_file.lua
%%DATADIR%%/luarocks/fetch/git_http.lua
%%DATADIR%%/luarocks/fetch/git_https.lua
%%DATADIR%%/luarocks/fetch/git_ssh.lua
%%DATADIR%%/luarocks/fetch/hg.lua
%%DATADIR%%/luarocks/fetch/hg_http.lua
%%DATADIR%%/luarocks/fetch/hg_https.lua
%%DATADIR%%/luarocks/fetch/hg_ssh.lua
%%DATADIR%%/luarocks/fetch/sscm.lua
%%DATADIR%%/luarocks/fetch/svn.lua
%%DATADIR%%/luarocks/fs.lua
%%DATADIR%%/luarocks/fs/lua.lua
%%DATADIR%%/luarocks/fs/tools.lua
%%DATADIR%%/luarocks/fs/macosx.lua
%%DATADIR%%/luarocks/fs/unix.lua
%%DATADIR%%/luarocks/fs/unix/tools.lua
%%DATADIR%%/luarocks/fs/win32.lua
%%DATADIR%%/luarocks/fs/win32/tools.lua
%%DATADIR%%/luarocks/fun.lua
%%DATADIR%%/luarocks/loader.lua
%%DATADIR%%/luarocks/manif.lua
%%DATADIR%%/luarocks/manif/writer.lua
%%DATADIR%%/luarocks/pack.lua
%%DATADIR%%/luarocks/path.lua
%%DATADIR%%/luarocks/persist.lua
%%DATADIR%%/luarocks/queries.lua
%%DATADIR%%/luarocks/remove.lua
%%DATADIR%%/luarocks/repos.lua
%%DATADIR%%/luarocks/require.lua
%%DATADIR%%/luarocks/results.lua
%%DATADIR%%/luarocks/rockspecs.lua
%%DATADIR%%/luarocks/search.lua
%%DATADIR%%/luarocks/signing.lua
%%DATADIR%%/luarocks/test.lua
%%DATADIR%%/luarocks/test/busted.lua
%%DATADIR%%/luarocks/test/command.lua
%%DATADIR%%/luarocks/tools/patch.lua
%%DATADIR%%/luarocks/tools/tar.lua
%%DATADIR%%/luarocks/tools/zip.lua
%%DATADIR%%/luarocks/type/manifest.lua
%%DATADIR%%/luarocks/type/rockspec.lua
%%DATADIR%%/luarocks/type_check.lua
%%DATADIR%%/luarocks/upload/api.lua
%%DATADIR%%/luarocks/upload/multipart.lua
%%DATADIR%%/luarocks/util.lua
@dir(tarantool,tarantool,) %%TT_DATADIR%%
@dir(tarantool,tarantool,) %%TT_LOGDIR%%
2 changes: 2 additions & 0 deletions databases/tarantool2/Makefile
Expand Up @@ -27,6 +27,8 @@ LIB_DEPENDS= libcurl.so:ftp/curl \
USES= cmake:noninja compiler:c++11-lang cpe gettext-runtime gmake iconv perl5 readline ssl
USE_PERL5= build

CONFLICTS_INSTALL= tarantool

BINARY_ALIAS= sed=${LOCALBASE}/bin/gsed
CMAKE_ARGS= -DCMAKE_INSTALL_FULL_SYSCONFDIR=${ETCDIR} \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
Expand Down

0 comments on commit 8dbbacc

Please sign in to comment.