]> git.pld-linux.org Git - packages/hiredis.git/blob - link.patch
- link soname properly
[packages/hiredis.git] / link.patch
1 --- hiredis-0.10.0/Makefile     2011-12-20 16:34:25.025574337 +0200
2 +++ hiredis-0.10.0/Makefile     2011-12-20 16:38:47.294352952 +0200
3 @@ -37,7 +37,9 @@
4    DYLIBSUFFIX=so
5    STLIBSUFFIX=a
6    DYLIBNAME?=$(LIBNAME).$(DYLIBSUFFIX)
7 -  DYLIB_MAKE_CMD?=gcc -shared -Wl,-soname,$(DYLIBNAME) -o $(DYLIBNAME)
8 +  DYLIBSONAME?=$(DYLIBNAME).0
9 +  LINKLIBNAME?=$(subst lib,,$(LIBNAME))
10 +  DYLIB_MAKE_CMD?=$(CC) -shared -Wl,-soname,$(DYLIBSONAME) -o $(DYLIBNAME)
11    STLIBNAME?=$(LIBNAME).$(STLIBSUFFIX)
12    STLIB_MAKE_CMD?=ar rcs $(STLIBNAME)
13  endif
14 @@ -88,8 +90,8 @@
15         $(CC) -o $@ $(CCOPT) $(DEBUG) -I$(AE_DIR) $(LDFLAGS) $(STLIBNAME) example-ae.c $(AE_DIR)/ae.o $(AE_DIR)/zmalloc.o
16  endif
17  
18 -hiredis-%: %.o $(STLIBNAME)
19 -       $(CC) -o $@ $(CCOPT) $(DEBUG) $(LDFLAGS) $(STLIBNAME) $<
20 +hiredis-%: %.o $(DYLIBNAME)
21 +       $(CC) -o $@ $(CCOPT) $(DEBUG) -l$(LINKLIBNAME) $(LDFLAGS) $<
22  
23  test: hiredis-test
24         ./hiredis-test
25 @@ -106,7 +108,10 @@
26  install: $(DYLIBNAME) $(STLIBNAME)
27         mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH)
28         $(INSTALL) hiredis.h async.h adapters $(INSTALL_INCLUDE_PATH)
29 -       $(INSTALL) $(DYLIBNAME) $(STLIBNAME) $(INSTALL_LIBRARY_PATH)
30 +       $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH)
31 +       $(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIBNAME).0.0.0
32 +       ln -s $(DYLIBNAME).0.0.0 $(INSTALL_LIBRARY_PATH)/$(DYLIBNAME).0
33 +       ln -s $(DYLIBNAME).0.0.0 $(INSTALL_LIBRARY_PATH)/$(DYLIBNAME)
34  
35  32bit:
36         @echo ""
This page took 0.071844 seconds and 3 git commands to generate.