summaryrefslogtreecommitdiff
path: root/databases/keydb/files/patch-deps-hiredis-Makefile
diff options
context:
space:
mode:
authorRyan Steinmetz <zi@FreeBSD.org>2023-10-25 14:16:34 -0400
committerRyan Steinmetz <zi@FreeBSD.org>2023-10-25 14:16:34 -0400
commit11f4c366bf393632b33cf681b1ccb3cc1490d9c4 (patch)
treebd2e5e12214c99982aa85f0b1bfa831807ea139d /databases/keydb/files/patch-deps-hiredis-Makefile
parentdevel/ispc: Fix typo in cmake variable name (diff)
databases/keydb: New port!
KeyDB is a high performance fork of Redis with a focus on multithreading, memory efficiency, and high throughput. In addition to performance improvements, KeyDB offers features such as Active Replication, FLASH Storage and Subkey Expires. KeyDB has a MVCC architecture that allows you to execute queries such as KEYS and SCAN without blocking the database and degrading performance. KeyDB maintains full compatibility with the Redis protocol, modules, and scripts. This includes the atomicity guarantees for scripts and transactions. Because KeyDB keeps in sync with Redis development KeyDB is a superset of Redis functionality, making KeyDB a drop in replacement for existing Redis deployments. On the same hardware KeyDB can achieve significantly higher throughput than Redis. Active-Replication simplifies hot-spare failover allowing you to easily distribute writes over replicas and use simple TCP based load balancing/failover. KeyDB's higher performance allows you to do more on less hardware which reduces operation costs and complexity. WWW: https://docs.keydb.dev/
Diffstat (limited to 'databases/keydb/files/patch-deps-hiredis-Makefile')
-rw-r--r--databases/keydb/files/patch-deps-hiredis-Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/databases/keydb/files/patch-deps-hiredis-Makefile b/databases/keydb/files/patch-deps-hiredis-Makefile
new file mode 100644
index 000000000000..78f5c6184fb4
--- /dev/null
+++ b/databases/keydb/files/patch-deps-hiredis-Makefile
@@ -0,0 +1,40 @@
+--- deps/hiredis/Makefile.orig 2023-10-25 15:54:51 UTC
++++ deps/hiredis/Makefile
+@@ -21,7 +21,7 @@ HIREDIS_PATCH=$(shell grep HIREDIS_PATCH hiredis.h | a
+ HIREDIS_SONAME=$(shell grep HIREDIS_SONAME hiredis.h | awk '{print $$3}')
+
+ # Installation related variables and target
+-PREFIX?=/usr/local
++PREFIX?=${PREFIX}
+ INCLUDE_PATH?=include/hiredis
+ LIBRARY_PATH?=lib
+ PKGCONF_PATH?=pkgconfig
+@@ -44,10 +44,9 @@ export REDIS_TEST_CONFIG
+ # Fallback to gcc when $CC is not in $PATH.
+ CC:=$(shell sh -c 'type $${CC%% *} >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
+ CXX:=$(shell sh -c 'type $${CXX%% *} >/dev/null 2>/dev/null && echo $(CXX) || echo g++')
+-OPTIMIZATION?=-O3
+ WARNINGS=-Wall -W -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers
+ DEBUG_FLAGS?= -g -ggdb
+-REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CPPFLAGS) $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS)
++REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG_FLAGS) $(PLATFORM_FLAGS)
+ REAL_LDFLAGS=$(LDFLAGS)
+
+ DYLIBSUFFIX=so
+@@ -106,6 +105,16 @@ ifeq ($(uname_S),Darwin)
+ DYLIB_MAKE_CMD=$(CC) -dynamiclib -Wl,-install_name,$(PREFIX)/$(LIBRARY_PATH)/$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS)
+ SSL_DYLIB_MAKE_CMD=$(CC) -dynamiclib -Wl,-install_name,$(PREFIX)/$(LIBRARY_PATH)/$(SSL_DYLIB_MINOR_NAME) -o $(SSL_DYLIBNAME) $(LDFLAGS) $(SSL_LDFLAGS)
+ DYLIB_PLUGIN=-Wl,-undefined -Wl,dynamic_lookup
++endif
++ifeq ($(uname_S),FreeBSD)
++ CFLAGS?=$(CFLAGS)
++ CCLINK?=pthread
++ LDFLAGS?=-L. -Wl,-rpath,.
++ DYLIBNAME?=libhiredis.so
++ DYLIB_MAKE_CMD?=$(CC) -o ${DYLIBNAME} ${OBJ}
++ STLIBNAME?=libhiredis.a
++ STLIB_MAKE_CMD?=ar rcs ${STLIBNAME} ${OBJ}
++ SSL_LDFLAGS+=${OPENSSL_LDFLAGS}
+ endif
+
+ all: $(DYLIBNAME) $(STLIBNAME) hiredis-test $(PKGCONFNAME)