1 From 9ef90b958b7ae50aeeb5c269468034d73d6e2efe Mon Sep 17 00:00:00 2001
2 From: Aleksey Kravchenko <rhash.admin@gmail.com>
3 Date: Mon, 31 Jul 2023 02:48:15 +0300
4 Subject: [PATCH] Fix #238: Build on *BSD
8 librhash/Makefile | 8 ++++----
9 2 files changed, 6 insertions(+), 5 deletions(-)
11 diff --git a/configure b/configure
12 index dae76d5..39ef8c1 100755
15 @@ -567,6 +567,7 @@ qnx() { test "$OS_LC" = "qnx"; }
16 sunos() { test "$OS_LC" = "sunos"; }
17 wine() { test "$OS_LC" = "wine"; }
18 win32() { cygwin || mingw32 || mingw64 || msys || wine; }
19 +bsd() { dragonfly || freebsd || netbsd || openbsd ; }
20 posix_make() { aix || bsdos || hpux || irix || qnx || sunos; }
22 #####################################################################
23 @@ -713,7 +714,7 @@ if win32; then
25 SHARED_EXT=".${RHASH_VERSION_MAJOR}.dylib"
28 +elif linux || bsd; then
29 # use the full library version for the library file extension
30 SHARED_EXT=".so.${RHASH_VERSION}"
32 diff --git a/librhash/Makefile b/librhash/Makefile
33 index d48e06e..e8ee862 100644
34 --- a/librhash/Makefile
35 +++ b/librhash/Makefile
36 @@ -27,9 +27,9 @@ install-lib-static: $(LIBRHASH_STATIC)
37 install-lib-shared: $(LIBRHASH_SHARED) $(EXTRA_INSTALL_LIBSHARED)
38 $(INSTALL) -d $(SO_DIR)
39 $(INSTALL_SHARED) $(LIBRHASH_SHARED) $(SO_DIR)/
40 - test "x$(LIBRHASH_SO_MAJ)" != "x$(LIBRHASH_SHARED)" && \
41 + test "x$(LIBRHASH_SO_MAJ)" != "x$(LIBRHASH_SHARED)" || ( \
42 rm -f $(LIBDIR)/$(LIBRHASH_SO_MAJ) && \
43 - ln -s $(LIBRHASH_SHARED) $(LIBDIR)/$(LIBRHASH_SO_MAJ)
44 + ln -s $(LIBRHASH_SHARED) $(LIBDIR)/$(LIBRHASH_SO_MAJ) )
47 $(INSTALL) -d $(LIBDIR)
48 @@ -175,9 +175,9 @@ $(EXPORTS_FILE): $(LIB_HEADERS)
49 $(LIB_HEADERS) | grep -v "$(EXPORTS_SKIP)" > $@
52 - test "x$(LIBRHASH_SO_MAJ)" != "x$(LIBRHASH_SHARED)" && \
53 + test "x$(LIBRHASH_SO_MAJ)" = "x$(LIBRHASH_SHARED)" || ( \
54 rm -f $(LIBRHASH_SO_MAJ) && \
55 - ln -s $(LIBRHASH_SHARED) $(LIBRHASH_SO_MAJ)
56 + ln -s $(LIBRHASH_SHARED) $(LIBRHASH_SO_MAJ) )
57 rm -f $(LIBRHASH_SOLINK)
58 ln -s $(LIBRHASH_SO_MAJ) $(LIBRHASH_SOLINK)