Lines 1-36
Link Here
|
1 |
# Created by: Sergey Skvortsov <skv@protey.ru> |
1 |
# Created by: Sergey Skvortsov <skv@protey.ru> |
2 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
3 |
|
3 |
|
4 |
PORTNAME= redis |
4 |
PORTNAME= redis |
5 |
DISTVERSION= 4.0.14 |
5 |
PORTVERSION= 5.0.6 |
6 |
PORTREVISION= 1 |
|
|
7 |
CATEGORIES= databases |
6 |
CATEGORIES= databases |
8 |
MASTER_SITES= http://download.redis.io/releases/ |
7 |
MASTER_SITES= http://download.redis.io/releases/ |
9 |
|
8 |
|
10 |
MAINTAINER= osa@FreeBSD.org |
9 |
MAINTAINER= osa@FreeBSD.org |
11 |
COMMENT= Persistent key-value database with built-in net interface |
10 |
COMMENT= Persistent key-value database with built-in net interface |
12 |
|
11 |
|
13 |
LICENSE= BSD3CLAUSE |
12 |
LICENSE= BSD3CLAUSE |
14 |
|
13 |
|
15 |
OPTIONS_DEFINE= TESTS TRIB |
14 |
OPTIONS_DEFINE= JEMALLOC TESTS TRIB |
16 |
OPTIONS_RADIO= EXTLUA |
15 |
OPTIONS_RADIO= EXTLUA |
17 |
OPTIONS_RADIO_EXTLUA= LUA LUAJIT |
16 |
OPTIONS_RADIO_EXTLUA= LUA LUAJIT |
18 |
OPTIONS_SUB= yes |
17 |
OPTIONS_SUB= yes |
|
|
18 |
JEMALLOC_DESC= Use jemalloc |
19 |
LUA_DESC= Use lang/lua instead of builtin lua |
19 |
LUA_DESC= Use lang/lua instead of builtin lua |
20 |
LUAJIT_DESC= Use lang/luajit instead of builtin lua |
20 |
LUAJIT_DESC= Use lang/luajit instead of builtin lua |
21 |
TESTS_DESC= Install lang/tcl for redis unit tests |
21 |
TESTS_DESC= Install lang/tcl for redis unit tests |
22 |
TRIB_DESC= Install redis-trib.rb (lang/ruby req.) |
22 |
TRIB_DESC= Install redis-trib.rb (lang/ruby req.) |
23 |
|
23 |
|
|
|
24 |
USES+= compiler gmake |
25 |
MAKE_ENV= "V=yo" |
26 |
|
24 |
.include <bsd.port.options.mk> |
27 |
.include <bsd.port.options.mk> |
25 |
|
28 |
|
26 |
.if ${ARCH} == i386 && ! ${CFLAGS:M-march=*} |
29 |
.if ${ARCH} == i386 && ! ${CFLAGS:M-march=*} |
27 |
# Needed for __atomic_fetch_add_8 |
30 |
# Needed for __atomic_fetch_add_8 |
28 |
USE_GCC= yes |
31 |
USE_GCC= yes |
29 |
CFLAGS+= -march=i586 |
32 |
CFLAGS+= -march=i586 |
30 |
.endif |
33 |
.endif |
31 |
|
34 |
|
|
|
35 |
.if ${PORT_OPTIONS:MJEMALLOC} |
36 |
MAKE_ENV+= "USE_JEMALLOC=yes" |
37 |
.endif |
38 |
|
32 |
.if ${PORT_OPTIONS:MTRIB} |
39 |
.if ${PORT_OPTIONS:MTRIB} |
33 |
CATEGORIES+= ruby |
40 |
CATEGORIES+= ruby |
34 |
USE_RUBY= yes |
41 |
USE_RUBY= yes |
35 |
RUN_DEPENDS= rubygem-redis>=2.2:databases/rubygem-redis |
42 |
RUN_DEPENDS= rubygem-redis>=2.2:databases/rubygem-redis |
36 |
.endif |
43 |
.endif |
Lines 54-67
Link Here
|
54 |
USES+= tcl:build |
61 |
USES+= tcl:build |
55 |
.endif |
62 |
.endif |
56 |
|
63 |
|
57 |
LDFLAGS+= -lpthread -lm -lexecinfo |
64 |
LDFLAGS+= -lpthread -lm -lexecinfo |
58 |
|
65 |
|
59 |
CONFLICTS?= redis-devel-5.* |
66 |
CONFLICTS?= redis4-4.* redis-devel-5.* |
60 |
|
67 |
|
61 |
USES+= gmake |
|
|
62 |
MAKE_ENV= "V=yo" |
63 |
USE_RC_SUBR= redis sentinel |
68 |
USE_RC_SUBR= redis sentinel |
64 |
BIN_FILES= redis-benchmark redis-check-aof redis-check-rdb \ |
69 |
BIN_FILES= redis-benchmark redis-check-aof redis-check-rdb \ |
65 |
redis-cli redis-sentinel redis-server |
70 |
redis-cli redis-sentinel redis-server |
66 |
|
71 |
|
67 |
USERS= redis |
72 |
USERS= redis |
Lines 82-95
Link Here
|
82 |
REDIS_GROUP=${GROUPS} \ |
87 |
REDIS_GROUP=${GROUPS} \ |
83 |
REDIS_LOGDIR=${REDIS_LOGDIR} \ |
88 |
REDIS_LOGDIR=${REDIS_LOGDIR} \ |
84 |
REDIS_DBDIR=${REDIS_DBDIR} \ |
89 |
REDIS_DBDIR=${REDIS_DBDIR} \ |
85 |
REDIS_RUNDIR=${REDIS_RUNDIR} |
90 |
REDIS_RUNDIR=${REDIS_RUNDIR} |
86 |
|
91 |
|
87 |
.if ${PORT_OPTIONS:MLUAJIT} || ${PORT_OPTIONS:MLUA} |
92 |
.include <bsd.port.pre.mk> |
|
|
93 |
|
88 |
post-patch: |
94 |
post-patch: |
|
|
95 |
.if ${PORT_OPTIONS:MJEMALLOC} |
96 |
@${REINPLACE_CMD} '35s!Linux!FreeBSD!g' ${WRKSRC}/src/Makefile |
97 |
.endif |
98 |
.if ${PORT_OPTIONS:MLUA} || ${PORT_OPTIONS:MLUAJIT} |
89 |
@cd ${WRKSRC}/deps/lua/src && ${CP} fpconv.* lua_* strbuf.* ${WRKSRC}/src/ |
99 |
@cd ${WRKSRC}/deps/lua/src && ${CP} fpconv.* lua_* strbuf.* ${WRKSRC}/src/ |
90 |
.endif |
100 |
.endif |
|
|
101 |
.if ${CHOSEN_COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42 |
102 |
${REINPLACE_CMD} -e '/pragma/d' ${WRKSRC}/src/lzf_d.c |
103 |
.endif |
91 |
|
104 |
|
92 |
post-build: |
105 |
post-build: |
93 |
${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ |
106 |
${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ |
94 |
${WRKSRC}/redis.conf > ${WRKDIR}/redis.conf |
107 |
${WRKSRC}/redis.conf > ${WRKDIR}/redis.conf |
95 |
|
108 |
|
Lines 105-110
Link Here
|
105 |
${STAGEDIR}${REDIS_RUNDIR} |
118 |
${STAGEDIR}${REDIS_RUNDIR} |
106 |
|
119 |
|
107 |
do-test: |
120 |
do-test: |
108 |
@cd ${WRKSRC} && ${TCLSH} tests/test_helper.tcl |
121 |
@cd ${WRKSRC} && ${TCLSH} tests/test_helper.tcl |
109 |
|
122 |
|
110 |
.include <bsd.port.mk> |
123 |
.include <bsd.port.post.mk> |