diff options
author | Yasuhiro Kimura <yasu@FreeBSD.org> | 2024-04-03 04:33:57 +0000 |
---|---|---|
committer | Yasuhiro Kimura <yasu@FreeBSD.org> | 2024-04-03 04:35:57 +0000 |
commit | 81b6dcb645eeb87f8313fd015f09f08ef6611138 (patch) | |
tree | c3793d0252d2d8fa203b9ce7d7219adb322e19f0 /databases/redis62 | |
parent | 59889eeb5d48a5eed680532707659b60c268b6f8 (diff) | |
download | ports-81b6dcb645eeb87f8313fd015f09f08ef6611138.tar.gz ports-81b6dcb645eeb87f8313fd015f09f08ef6611138.zip |
Diffstat (limited to 'databases/redis62')
-rw-r--r-- | databases/redis62/Makefile | 89 | ||||
-rw-r--r-- | databases/redis62/files/extra-patch-deps_lua_src_lua__cjson.c | 11 | ||||
-rw-r--r-- | databases/redis62/files/extra-patch-src-Makefile.lua | 58 | ||||
-rw-r--r-- | databases/redis62/files/extra-patch-src-Makefile.luajit | 58 | ||||
-rw-r--r-- | databases/redis62/files/extra-patch-src-Makefile.luajit-or | 58 | ||||
-rw-r--r-- | databases/redis62/pkg-plist | 1 |
6 files changed, 22 insertions, 253 deletions
diff --git a/databases/redis62/Makefile b/databases/redis62/Makefile index b9fe47b713e7..cb25c52f4506 100644 --- a/databases/redis62/Makefile +++ b/databases/redis62/Makefile @@ -1,5 +1,6 @@ PORTNAME= redis DISTVERSION= 6.2.14 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= https://download.redis.io/releases/ PKGNAMESUFFIX= 62 @@ -14,95 +15,52 @@ LICENSE_FILE= ${WRKSRC}/COPYING USES+= compiler:c11 cpe gmake tcl:test CPE_VENDOR= redislabs CPE_PRODUCT= redis +USE_RC_SUBR= redis sentinel MAKE_ENV= OPTIMIZATION= \ V=yo +LDFLAGS+= -lpthread -lm -lexecinfo + CONFLICTS_INSTALL= redis redis-devel redis6 redis70 # etc/rc.d/redis PORTSCOUT= limit:^6\.2 +SUB_FILES= pkg-message +SUB_LIST+= PORTNAME=${PORTNAME} \ + REDIS_DBDIR=${REDIS_DBDIR} \ + REDIS_LOGDIR=${REDIS_LOGDIR} \ + REDIS_RUNDIR=${REDIS_RUNDIR} \ + REDIS_USER=${USERS} + +USERS= redis +GROUPS= redis + +PLIST_SUB+= REDIS_DBDIR=${REDIS_DBDIR} \ + REDIS_GROUP=${GROUPS} \ + REDIS_LOGDIR=${REDIS_LOGDIR} \ + REDIS_RUNDIR=${REDIS_RUNDIR} \ + REDIS_USER=${USERS} -OPTIONS_DEFINE= JEMALLOC TLS TRIB +OPTIONS_DEFINE= JEMALLOC TLS OPTIONS_DEFAULT= TLS -OPTIONS_RADIO= EXTLUA -OPTIONS_RADIO_EXTLUA= LUA LUAJIT OPTIONS_SUB= yes JEMALLOC_DESC= Use jemalloc -LUAJIT_DESC= Use luajit instead of builtin lua -LUA_DESC= Use lang/lua instead of builtin lua TLS_DESC= Use TLS (openssl req.) -TRIB_DESC= Install redis-trib.rb (lang/ruby req.) JEMALLOC_MAKE_ENV= USE_JEMALLOC=yes -LUAJIT_BROKEN= Fails to link -LUAJIT_USES= luajit -LUAJIT_VARS= _ADDFLAGS=true -LUA_BROKEN= Fails to link -LUA_USES= lua:51 -LUA_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-Makefile.lua -LUA_VARS= _ADDFLAGS=true TLS_USES= ssl TLS_MAKE_ENV= BUILD_TLS=yes -TRIB_CATEGORIES= ruby -TRIB_RUN_DEPENDS= rubygem-redis>=2.2:databases/rubygem-redis -TRIB_USES= ruby - -.include <bsd.port.pre.mk> - -.if ${ARCH} == i386 && !${CFLAGS:M-march=*} -# Needed for __atomic_fetch_add_8 -USE_GCC= yes -CFLAGS+= -march=i586 -.endif - -.if defined(_ADDFLAGS) -CFLAGS+= -fPIC -LDFLAGS+= -Wl,-E -.endif - -.if ${PORT_OPTIONS:MLUAJIT} -. if ${LUAJIT_VER} == luajit -EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-Makefile.luajit -. else -EXTRA_PATCHES= ${PATCHDIR}/extra-patch-src-Makefile.luajit-or \ - ${PATCHDIR}/extra-patch-deps_lua_src_lua__cjson.c -. endif -.endif - -LDFLAGS+= -lpthread -lm -lexecinfo -USE_RC_SUBR= redis sentinel BIN_FILES= redis-benchmark redis-check-aof redis-check-rdb redis-cli \ redis-sentinel redis-server -USERS= redis -GROUPS= redis - REDIS_DBDIR?= /var/db/redis REDIS_RUNDIR?= /var/run/redis REDIS_LOGDIR?= /var/log/redis -SUB_FILES= pkg-message -SUB_LIST+= PORTNAME=${PORTNAME} \ - REDIS_DBDIR=${REDIS_DBDIR} \ - REDIS_LOGDIR=${REDIS_LOGDIR} \ - REDIS_RUNDIR=${REDIS_RUNDIR} \ - REDIS_USER=${USERS} - -PLIST_SUB+= REDIS_DBDIR=${REDIS_DBDIR} \ - REDIS_GROUP=${GROUPS} \ - REDIS_LOGDIR=${REDIS_LOGDIR} \ - REDIS_RUNDIR=${REDIS_RUNDIR} \ - REDIS_USER=${USERS} - post-patch-JEMALLOC-on: - @${REINPLACE_CMD} '35s!Linux!FreeBSD!g' ${WRKSRC}/src/Makefile - -post-patch-LUA-on: - @cd ${WRKSRC}/deps/lua/src && ${CP} fpconv.* lua_* strbuf.* ${WRKSRC}/src/ -post-patch-LUAJIT-on: post-patch-LUA-on -post-patch-LUAJITOR-on: post-patch-LUA-on + @${REINPLACE_CMD} '58s!Linux!FreeBSD!g' ${WRKSRC}/src/Makefile post-build: ${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ @@ -116,10 +74,7 @@ do-install: ${STAGEDIR}${REDIS_DBDIR} \ ${STAGEDIR}${REDIS_RUNDIR} -do-install-TRIB-on: - ${INSTALL_SCRIPT} ${WRKSRC}/src/redis-trib.rb ${STAGEDIR}${PREFIX}/bin/ - do-test: @cd ${WRKSRC} && ${TCLSH} tests/test_helper.tcl -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/databases/redis62/files/extra-patch-deps_lua_src_lua__cjson.c b/databases/redis62/files/extra-patch-deps_lua_src_lua__cjson.c deleted file mode 100644 index 32e322d0d490..000000000000 --- a/databases/redis62/files/extra-patch-deps_lua_src_lua__cjson.c +++ /dev/null @@ -1,11 +0,0 @@ ---- deps/lua/src/lua_cjson.c.orig 2019-12-08 12:56:31 UTC -+++ deps/lua/src/lua_cjson.c -@@ -1299,7 +1299,7 @@ - * - * luaL_setfuncs() is used to create a module table where the functions have - * json_config_t as their first upvalue. Code borrowed from Lua 5.2 source. */ --static void luaL_setfuncs (lua_State *l, const luaL_Reg *reg, int nup) -+void luaL_setfuncs (lua_State *l, const luaL_Reg *reg, int nup) - { - int i; - diff --git a/databases/redis62/files/extra-patch-src-Makefile.lua b/databases/redis62/files/extra-patch-src-Makefile.lua deleted file mode 100644 index 398d415bd6e4..000000000000 --- a/databases/redis62/files/extra-patch-src-Makefile.lua +++ /dev/null @@ -1,58 +0,0 @@ ---- src/Makefile.orig 2021-01-12 14:21:03 UTC -+++ src/Makefile -@@ -16,7 +16,7 @@ - uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') - uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') - OPTIMIZATION?=-O2 --DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram -+DEPENDENCY_TARGETS=hiredis linenoise hdr_histogram - NODEPS:=clean distclean - - # Default settings -@@ -83,8 +83,8 @@ - # Override default settings if possible - -include .make-settings - --FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) --FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) -+FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) -+FINAL_LDFLAGS=$(LDFLAGS) $(DEBUG) - FINAL_LIBS=-lm - DEBUG=-g -ggdb - -@@ -188,7 +188,7 @@ - endif - endif - # Include paths to dependencies --FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -+FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/hdr_histogram - - # Determine systemd support and/or build preference (defaulting to auto-detection) - BUILD_WITH_SYSTEMD=no -@@ -251,6 +251,9 @@ - FINAL_LIBS += ../deps/hiredis/libhiredis_ssl.a $(LIBSSL_LIBS) $(LIBCRYPTO_LIBS) - endif - -+FINAL_CFLAGS+=-I${PREFIX}/include/lua51 -+FINAL_LIBS+= -L${PREFIX}/lib -llua-5.1 -+ - REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) - REDIS_LD=$(QUIET_LINK)$(CC) $(FINAL_LDFLAGS) - REDIS_INSTALL=$(QUIET_INSTALL)$(INSTALL) -@@ -271,6 +274,7 @@ - REDIS_SERVER_NAME=redis-server$(PROG_SUFFIX) - REDIS_SENTINEL_NAME=redis-sentinel$(PROG_SUFFIX) - REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crcspeed.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o lolwut6.o acl.o gopher.o tracking.o connection.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o -+REDIS_SERVER_OBJ+=fpconv.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o strbuf.o - REDIS_CLI_NAME=redis-cli$(PROG_SUFFIX) - REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o ae.o crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o - REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX) -@@ -324,7 +328,7 @@ - - # redis-server - $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) -- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS) -+ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS) - - # redis-sentinel - $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/databases/redis62/files/extra-patch-src-Makefile.luajit b/databases/redis62/files/extra-patch-src-Makefile.luajit deleted file mode 100644 index eef0a18eb74e..000000000000 --- a/databases/redis62/files/extra-patch-src-Makefile.luajit +++ /dev/null @@ -1,58 +0,0 @@ ---- src/Makefile.orig 2021-01-12 14:21:03 UTC -+++ src/Makefile -@@ -16,7 +16,7 @@ - uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') - uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') - OPTIMIZATION?=-O2 --DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram -+DEPENDENCY_TARGETS=hiredis linenoise hdr_histogram - NODEPS:=clean distclean - - # Default settings -@@ -83,8 +83,8 @@ - # Override default settings if possible - -include .make-settings - --FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) --FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) -+FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) -+FINAL_LDFLAGS=$(LDFLAGS) $(DEBUG) - FINAL_LIBS=-lm - DEBUG=-g -ggdb - -@@ -188,7 +188,7 @@ - endif - endif - # Include paths to dependencies --FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -+FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/hdr_histogram - - # Determine systemd support and/or build preference (defaulting to auto-detection) - BUILD_WITH_SYSTEMD=no -@@ -251,6 +251,9 @@ - FINAL_LIBS += ../deps/hiredis/libhiredis_ssl.a $(LIBSSL_LIBS) $(LIBCRYPTO_LIBS) - endif - -+FINAL_CFLAGS+=-I${PREFIX}/include/luajit-2.0 -+FINAL_LIBS+= -L${PREFIX}/lib -lluajit-5.1 -+ - REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) - REDIS_LD=$(QUIET_LINK)$(CC) $(FINAL_LDFLAGS) - REDIS_INSTALL=$(QUIET_INSTALL)$(INSTALL) -@@ -271,6 +274,7 @@ - REDIS_SERVER_NAME=redis-server$(PROG_SUFFIX) - REDIS_SENTINEL_NAME=redis-sentinel$(PROG_SUFFIX) - REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crcspeed.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o lolwut6.o acl.o gopher.o tracking.o connection.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o -+REDIS_SERVER_OBJ+=fpconv.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o strbuf.o - REDIS_CLI_NAME=redis-cli$(PROG_SUFFIX) - REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o ae.o crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o - REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX) -@@ -324,7 +328,7 @@ - - # redis-server - $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) -- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS) -+ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS) - - # redis-sentinel - $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/databases/redis62/files/extra-patch-src-Makefile.luajit-or b/databases/redis62/files/extra-patch-src-Makefile.luajit-or deleted file mode 100644 index ca57ef49c35c..000000000000 --- a/databases/redis62/files/extra-patch-src-Makefile.luajit-or +++ /dev/null @@ -1,58 +0,0 @@ ---- src/Makefile.orig 2021-01-12 14:21:03 UTC -+++ src/Makefile -@@ -16,7 +16,7 @@ - uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') - uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') - OPTIMIZATION?=-O2 --DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram -+DEPENDENCY_TARGETS=hiredis linenoise hdr_histogram - NODEPS:=clean distclean - - # Default settings -@@ -83,8 +83,8 @@ - # Override default settings if possible - -include .make-settings - --FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) --FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) -+FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) -+FINAL_LDFLAGS=$(LDFLAGS) $(DEBUG) - FINAL_LIBS=-lm - DEBUG=-g -ggdb - -@@ -188,7 +188,7 @@ - endif - endif - # Include paths to dependencies --FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -+FINAL_CFLAGS+= -I../deps/hiredis -I../deps/linenoise -I../deps/hdr_histogram - - # Determine systemd support and/or build preference (defaulting to auto-detection) - BUILD_WITH_SYSTEMD=no -@@ -251,6 +251,9 @@ - FINAL_LIBS += ../deps/hiredis/libhiredis_ssl.a $(LIBSSL_LIBS) $(LIBCRYPTO_LIBS) - endif - -+FINAL_CFLAGS+=-I${PREFIX}/include/luajit-2.1 -+FINAL_LIBS+= -L${PREFIX}/lib -lluajit-5.1 -+ - REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) - REDIS_LD=$(QUIET_LINK)$(CC) $(FINAL_LDFLAGS) - REDIS_INSTALL=$(QUIET_INSTALL)$(INSTALL) -@@ -271,6 +274,7 @@ - REDIS_SERVER_NAME=redis-server$(PROG_SUFFIX) - REDIS_SENTINEL_NAME=redis-sentinel$(PROG_SUFFIX) - REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crcspeed.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o lolwut6.o acl.o gopher.o tracking.o connection.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o -+REDIS_SERVER_OBJ+=fpconv.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o strbuf.o - REDIS_CLI_NAME=redis-cli$(PROG_SUFFIX) - REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o ae.o crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o - REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX) -@@ -324,7 +328,7 @@ - - # redis-server - $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) -- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS) -+ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS) - - # redis-sentinel - $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/databases/redis62/pkg-plist b/databases/redis62/pkg-plist index 7bc055909fdd..fafc472df89b 100644 --- a/databases/redis62/pkg-plist +++ b/databases/redis62/pkg-plist @@ -4,7 +4,6 @@ bin/redis-check-rdb bin/redis-cli bin/redis-sentinel bin/redis-server -%%TRIB%%bin/redis-trib.rb @sample etc/redis.conf.sample @sample(%%REDIS_USER%%,%%REDIS_GROUP%%,) etc/sentinel.conf.sample @dir(%%REDIS_USER%%,%%REDIS_GROUP%%,) %%REDIS_DBDIR%% |