2012-10-06 15:54:19 +02:00
|
|
|
# Created by: Sergey Skvortsov <skv@protey.ru>
|
2012-07-17 20:23:25 +02:00
|
|
|
|
|
|
|
PORTNAME= redis
|
2021-06-01 17:55:28 +02:00
|
|
|
PORTVERSION= 6.2.4
|
2012-07-17 20:23:25 +02:00
|
|
|
CATEGORIES= databases
|
2021-02-23 15:16:03 +01:00
|
|
|
MASTER_SITES= https://download.redis.io/releases/
|
2012-07-17 20:23:25 +02:00
|
|
|
PKGNAMESUFFIX= -devel
|
|
|
|
|
|
|
|
MAINTAINER= osa@FreeBSD.org
|
2014-06-10 09:39:01 +02:00
|
|
|
COMMENT= Persistent key-value database with built-in net interface
|
2012-07-17 20:23:25 +02:00
|
|
|
|
2014-06-02 03:42:11 +02:00
|
|
|
LICENSE= BSD3CLAUSE
|
2020-07-04 12:35:12 +02:00
|
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
2012-08-03 06:21:19 +02:00
|
|
|
|
2019-12-07 22:27:58 +01:00
|
|
|
USES+= compiler:c11 gmake
|
2019-11-27 19:20:53 +01:00
|
|
|
|
2020-01-05 00:39:27 +01:00
|
|
|
OPTIONS_DEFINE= JEMALLOC TESTS TLS TRIB
|
2013-08-22 06:40:27 +02:00
|
|
|
OPTIONS_RADIO= EXTLUA
|
2019-12-08 14:02:48 +01:00
|
|
|
OPTIONS_RADIO_EXTLUA= LUA LUAJIT LUAJITOR
|
2015-10-26 00:39:49 +01:00
|
|
|
OPTIONS_SUB= yes
|
2018-06-20 01:00:46 +02:00
|
|
|
JEMALLOC_DESC= Use jemalloc
|
2013-08-22 06:40:27 +02:00
|
|
|
LUA_DESC= Use lang/lua instead of builtin lua
|
2013-01-12 16:48:47 +01:00
|
|
|
LUAJIT_DESC= Use lang/luajit instead of builtin lua
|
2019-12-08 14:02:48 +01:00
|
|
|
LUAJITOR_DESC= Use lang/luajit-openresty instead of builtin lua
|
2020-01-05 00:39:27 +01:00
|
|
|
TLS_DESC= Use TLS (openssl req.)
|
2012-10-06 15:54:19 +02:00
|
|
|
TESTS_DESC= Install lang/tcl for redis unit tests
|
2015-10-26 00:39:49 +01:00
|
|
|
TRIB_DESC= Install redis-trib.rb (lang/ruby req.)
|
2012-10-06 15:54:19 +02:00
|
|
|
|
2020-02-02 03:04:47 +01:00
|
|
|
MAKE_ENV= V=yo OPTIMIZATION=
|
2018-09-18 13:57:06 +02:00
|
|
|
|
2020-01-05 00:39:27 +01:00
|
|
|
JEMALLOC_MAKE_ENV= USE_JEMALLOC=yes
|
2012-10-06 15:54:19 +02:00
|
|
|
|
2020-04-14 17:49:36 +02:00
|
|
|
LUA_USES= lua:51
|
2020-01-05 00:39:27 +01:00
|
|
|
LUA_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-Makefile.lua
|
|
|
|
LUA_VARS= _addflags=true
|
2017-08-21 22:06:35 +02:00
|
|
|
|
2020-01-05 00:39:27 +01:00
|
|
|
LUAJIT_LIB_DEPENDS= libluajit-5.1.so:lang/luajit
|
|
|
|
LUAJIT_BUILD_DEPENDS= ${LOCALBASE}/include/luajit-2.0/lua.h:lang/luajit
|
|
|
|
LUAJIT_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-Makefile.luajit
|
|
|
|
LUAJIT_VARS= _addflags=true
|
2018-06-20 01:00:46 +02:00
|
|
|
|
2020-01-05 00:39:27 +01:00
|
|
|
LUAJITOR_LIB_DEPENDS= libluajit-5.1.so:lang/luajit-openresty
|
|
|
|
LUAJITOR_BUILD_DEPENDS= ${LOCALBASE}/include/luajit-2.1/lua.h:lang/luajit-openresty
|
|
|
|
LUAJITOR_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-Makefile.luajit-or \
|
|
|
|
${PATCHDIR}/extra-patch-deps_lua_src_lua__cjson.c
|
|
|
|
LUAJITOR_VARS= _addflags=true
|
2015-10-26 00:39:49 +01:00
|
|
|
|
2020-01-05 00:39:27 +01:00
|
|
|
TESTS_USES= tcl:build
|
2013-08-22 06:40:27 +02:00
|
|
|
|
2020-01-05 00:39:27 +01:00
|
|
|
TLS_USES= ssl
|
|
|
|
TLS_MAKE_ENV= BUILD_TLS=yes
|
Upgrade from 3.0.0-beta6 to 3.0.0-beta8.
<ChangeLog>
--[ Redis 3.0.0 Beta 8 (version 2.9.57) ] Release date: 29 jul 2014
This is the 8th beta of Redis 3.0.0.
>> General changes
* [FIX] Solaris compilation issues. (Matt Stancliff, Salvatore Sanfilippo)
* [FIX] Allow shared integer objects if maxmemory policy is not LRU based.
(Salvatore Sanfilippo)
* [FIX] PFSELFTEST: less false positives. (Salvatore Sanfilippo)
* [FIX] Fail SYNC if background save child aborted due to a signal. (Yossi
Gottlieb)
* [NEW] Latency framework backported from unstable branch. (Salvatore
Sanfilippo)
* [NEW] AOF rewrite improved for latency. (Salvatore Sanfilippo)
* [NEW] Pub/Sub PING. (Salvatore Sanfilippo)
* [NEW] Much faster ZUNIONSTORE. (Kyle Hubert, Salvatore Sanfilippo)
* [NEW] Faster ll2string() implementation. (Salvatore Sanfilippo)
>> Cluster changes
* [FIX] CLUSTER RESET: Flush slave dataset on reset. (Salvatore Sanfilippo)
* [FIX] Replica migration: don't migrate to masters that never had slaves
in the past, but only to masters that remained orphaned after
failure events. (Salvatore Sanfilippo)
* [NEW] redis-trib: allow to reshard in non-interactive way. (Salvatore
Sanfilippo)
* [NEW] Cluster test: unit 04, check consistency during resharding. (Salvatore
Sanfilippo)
* [NEW] Cluster test: unit 05, slave selection. (Salvatore Sanfilippo)
* [NEW] Cluster test: unit 06, slaves with stale data can't failover. (Salvatore
Sanfilippo)
* [NEW] Cluster test: unit 07, replicas migration. (Salvatore Sanfilippo)
>> Sentinel changes
* No Sentinel changes in this release.
--[ Redis 3.0.0 Beta 7 (version 2.9.56) ] Release date: 30 jun 2014
This is the 7th beta of Redis 3.0.0.
>> General changes
* [FIX] Scripting fixes backported from unstable, see Redis 2.8.12 changelog
for more info. (Salvatore Sanfilippo)
* [FIX] Cancel SHUTDOWN if initial AOF is being written. (Matt Stancliff)
* [NEW] New command: COMMAND, for commands introspection (Matt Stancliff &
Salvatore Sanfilippo)
* [NEW] hiredis: Update to latest version. (Matt Stancliff)
* [NEW] Jemalloc updated to 3.6.0. (Salvatore Sanfilippo)
>> Cluster changes
* [FIX] Cluster: clear NOADDR flag when updating node address.
(Salvatore Sanfilippo)
* [NEW] New CLUSTER SLOTS command to simplify Cluster clients operations.
(Matt Stancliff)
* [NEW] More Cluster tests. (Salvatore Sanfilippo)
* [NEW] Log when failover authorization are granted / denied.
(Salvatore Sanfilippo)
>> Sentinel changes
* [FIX] A few Sentinel bugs fixed and improvements, see Redis 2.8.12
changelog for more info. (Salvatore Sanfilippo & Matt Stancliff)
* [NEW] New Sentinel-Client handshake protocol, ROLE command, CLIENT KILL,
all backported to 3.0 branch. (Salvatore Sanfilippo)
</ChangeLog>
2014-09-10 00:38:00 +02:00
|
|
|
|
2020-01-05 00:39:27 +01:00
|
|
|
TRIB_CATEGORIES= ruby
|
|
|
|
TRIB_USE= ruby=yes
|
|
|
|
TRIB_RUN_DEPENDS= rubygem-redis>=2.2:databases/rubygem-redis
|
2019-12-08 14:02:48 +01:00
|
|
|
|
2020-01-05 00:39:27 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${ARCH} == i386 && ! ${CFLAGS:M-march=*}
|
|
|
|
# Needed for __atomic_fetch_add_8
|
|
|
|
USE_GCC= yes
|
|
|
|
CFLAGS+= -march=i586
|
2013-01-12 16:48:47 +01:00
|
|
|
.endif
|
|
|
|
|
2020-01-05 00:39:27 +01:00
|
|
|
.if defined(_addflags)
|
|
|
|
CFLAGS= -fPIC
|
|
|
|
LDFLAGS= -Wl,-E
|
2012-10-06 15:54:19 +02:00
|
|
|
.endif
|
|
|
|
|
2017-09-22 12:48:57 +02:00
|
|
|
LDFLAGS+= -lpthread -lm -lexecinfo
|
2012-07-17 20:23:25 +02:00
|
|
|
|
2021-04-08 21:30:59 +02:00
|
|
|
CONFLICTS?= redis5-5.* redis-6.*
|
2012-07-17 20:23:25 +02:00
|
|
|
|
2015-10-29 02:34:53 +01:00
|
|
|
USE_RC_SUBR= redis sentinel
|
2016-02-03 02:02:21 +01:00
|
|
|
BIN_FILES= redis-benchmark redis-check-aof redis-check-rdb \
|
2012-11-07 12:56:05 +01:00
|
|
|
redis-cli redis-sentinel redis-server
|
2012-07-17 20:23:25 +02:00
|
|
|
|
|
|
|
USERS= redis
|
|
|
|
GROUPS= redis
|
|
|
|
|
|
|
|
REDIS_DBDIR?= /var/db/redis
|
|
|
|
REDIS_RUNDIR?= /var/run/redis
|
|
|
|
REDIS_LOGDIR?= /var/log/redis
|
|
|
|
|
|
|
|
SUB_FILES= pkg-message
|
2012-08-03 06:24:58 +02:00
|
|
|
SUB_LIST+= PORTNAME=${PORTNAME} \
|
2012-07-17 20:23:25 +02:00
|
|
|
REDIS_USER=${USERS} \
|
|
|
|
REDIS_DBDIR=${REDIS_DBDIR} \
|
|
|
|
REDIS_LOGDIR=${REDIS_LOGDIR} \
|
|
|
|
REDIS_RUNDIR=${REDIS_RUNDIR}
|
|
|
|
|
2012-08-03 06:24:58 +02:00
|
|
|
PLIST_SUB+= REDIS_USER=${USERS} \
|
2012-07-17 20:23:25 +02:00
|
|
|
REDIS_GROUP=${GROUPS} \
|
|
|
|
REDIS_LOGDIR=${REDIS_LOGDIR} \
|
|
|
|
REDIS_DBDIR=${REDIS_DBDIR} \
|
|
|
|
REDIS_RUNDIR=${REDIS_RUNDIR}
|
|
|
|
|
2021-03-06 19:00:29 +01:00
|
|
|
post-patch:
|
|
|
|
${REINPLACE_CMD} '77s!malloc.h!stdlib.h!' ${WRKSRC}/src/zmalloc.h
|
|
|
|
|
2020-01-05 00:39:27 +01:00
|
|
|
post-patch-JEMALLOC-on:
|
2018-06-20 01:00:46 +02:00
|
|
|
@${REINPLACE_CMD} '35s!Linux!FreeBSD!g' ${WRKSRC}/src/Makefile
|
2020-01-05 00:39:27 +01:00
|
|
|
|
2020-01-11 01:44:53 +01:00
|
|
|
post-patch-LUA-on:
|
2015-01-17 20:23:18 +01:00
|
|
|
@cd ${WRKSRC}/deps/lua/src && ${CP} fpconv.* lua_* strbuf.* ${WRKSRC}/src/
|
2020-01-11 01:44:53 +01:00
|
|
|
post-patch-LUAJIT-on: post-patch-LUA-on
|
|
|
|
post-patch-LUAJITOR-on: post-patch-LUA-on
|
2013-01-12 16:48:47 +01:00
|
|
|
|
2012-07-17 20:23:25 +02:00
|
|
|
post-build:
|
|
|
|
${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
|
|
|
${WRKSRC}/redis.conf > ${WRKDIR}/redis.conf
|
|
|
|
|
|
|
|
do-install:
|
2014-06-02 03:42:11 +02:00
|
|
|
${INSTALL_PROGRAM} ${BIN_FILES:C!^!${WRKSRC}/src/!} ${STAGEDIR}${PREFIX}/bin/
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/redis.conf ${STAGEDIR}${PREFIX}/etc/redis.conf.sample
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/sentinel.conf ${STAGEDIR}${PREFIX}/etc/sentinel.conf.sample
|
2014-10-20 12:41:12 +02:00
|
|
|
${MKDIR} ${STAGEDIR}${REDIS_LOGDIR} \
|
|
|
|
${STAGEDIR}${REDIS_DBDIR} \
|
|
|
|
${STAGEDIR}${REDIS_RUNDIR}
|
2012-07-17 20:23:25 +02:00
|
|
|
|
2020-01-05 00:39:27 +01:00
|
|
|
do-install-TRIB-on:
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/src/redis-trib.rb ${STAGEDIR}${PREFIX}/bin/
|
|
|
|
|
2018-06-03 22:12:32 +02:00
|
|
|
do-test:
|
2012-10-06 15:54:19 +02:00
|
|
|
@cd ${WRKSRC} && ${TCLSH} tests/test_helper.tcl
|
|
|
|
|
2019-11-05 22:38:26 +01:00
|
|
|
.include <bsd.port.post.mk>
|