pkgsrc/databases/hiredis/patches/patch-Makefile
wiedi 57fa445acb Update hiredis to 0.13.2
* Prevent crash on pending replies in async code (Thanks, @switch-st)
* Clear `REDIS_CONNECTED` flag when connection is closed (Thanks, Jerry Jacobs)
* Add MacOS X addapter (Thanks, @dizzus)
* Add Qt adapter (Thanks, Pietro Cerutti)
* Add Ivykis adapter (Thanks, Gergely Nagy)

All adapters are provided as is and are only tested where possible.
2015-09-02 15:12:37 +00:00

54 lines
2 KiB
Text

$NetBSD: patch-Makefile,v 1.3 2015/09/02 15:12:37 wiedi Exp $
use libtool
--- Makefile.orig 2015-08-25 12:16:20.000000000 +0000
+++ Makefile
@@ -51,6 +51,7 @@ DYLIB_MAJOR_NAME=$(LIBNAME).$(DYLIBSUFFI
DYLIBNAME=$(LIBNAME).$(DYLIBSUFFIX)
DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname,$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS)
STLIBNAME=$(LIBNAME).$(STLIBSUFFIX)
+LANAME=$(LIBNAME).la
STLIB_MAKE_CMD=ar rcs $(STLIBNAME)
# Platform-specific overrides
@@ -66,7 +67,7 @@ ifeq ($(uname_S),Darwin)
DYLIB_MAKE_CMD=$(CC) -shared -Wl,-install_name,$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS)
endif
-all: $(DYLIBNAME) $(STLIBNAME) hiredis-test $(PKGCONFNAME)
+all: $(LANAME) $(PKGCONFNAME)
# Deps (use make dep to generate this)
async.o: async.c fmacros.h async.h hiredis.h read.h sds.h net.h dict.c dict.h
@@ -83,6 +84,11 @@ $(DYLIBNAME): $(OBJ)
$(STLIBNAME): $(OBJ)
$(STLIB_MAKE_CMD) $(OBJ)
+$(LANAME): $(OBJ)
+ $(LIBTOOL) --mode=link $(CC) -o $(LANAME) $(OBJ:.o=.lo) \
+ -rpath $(PREFIX)/lib \
+ -version-number $(HIREDIS_MAJOR):$(HIREDIS_MINOR)
+
dynamic: $(DYLIBNAME)
static: $(STLIBNAME)
@@ -153,7 +159,7 @@ check: hiredis-test
kill `cat /tmp/hiredis-test-redis.pid`
.c.o:
- $(CC) -std=c99 -pedantic -c $(REAL_CFLAGS) $<
+ $(LIBTOOL) --mode=compile $(CC) -std=c99 -pedantic -c $(REAL_CFLAGS) $<
clean:
rm -rf $(DYLIBNAME) $(STLIBNAME) $(TESTS) $(PKGCONFNAME) examples/hiredis-example* *.o *.gcda *.gcno *.gcov
@@ -183,9 +189,7 @@ $(PKGCONFNAME): hiredis.h
install: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME)
mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH)
$(INSTALL) hiredis.h async.h read.h sds.h adapters $(INSTALL_INCLUDE_PATH)
- $(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME)
- cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIBNAME)
- $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH)
+ $(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) $(LANAME) $(INSTALL_LIBRARY_PATH)
mkdir -p $(INSTALL_PKGCONF_PATH)
$(INSTALL) $(PKGCONFNAME) $(INSTALL_PKGCONF_PATH)