aboutsummaryrefslogtreecommitdiff
path: root/libs/libhttp-parser/patches/000-fix_darwin_error.patch
blob: 55684a6aef95b0bd94765e9012d560dd606026bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--- a/Makefile
+++ b/Makefile
@@ -25,11 +25,7 @@ SOLIBNAME = libhttp_parser
 SOMAJOR = 2
 SOMINOR = 9
 SOREV   = 4
-ifeq (darwin,$(PLATFORM))
-SOEXT ?= dylib
-SONAME ?= $(SOLIBNAME).$(SOMAJOR).$(SOMINOR).$(SOEXT)
-LIBNAME ?= $(SOLIBNAME).$(SOMAJOR).$(SOMINOR).$(SOREV).$(SOEXT)
-else ifeq (wine,$(PLATFORM))
+ifeq (wine,$(PLATFORM))
 CC = winegcc
 BINEXT = .exe.so
 HELPER = wine
@@ -65,12 +61,8 @@ PREFIX ?= /usr/local
 LIBDIR = $(PREFIX)/lib
 INCLUDEDIR = $(PREFIX)/include
 
-ifeq (darwin,$(PLATFORM))
-LDFLAGS_LIB += -Wl,-install_name,$(LIBDIR)/$(SONAME)
-else
 # TODO(bnoordhuis) The native SunOS linker expects -h rather than -soname...
 LDFLAGS_LIB += -Wl,-soname=$(SONAME)
-endif
 
 test: test_g test_fast
 	$(HELPER) ./test_g$(BINEXT)
@@ -131,14 +123,18 @@ tags: http_parser.c http_parser.h test.c
 	ctags $^
 
 install: library
-	$(INSTALL) -D  http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
-	$(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
+	$(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
+	$(INSTALL)    http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
+	$(INSTALL)    $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
 	ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
 	ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT)
 
 install-strip: library
-	$(INSTALL) -D  http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
-	$(INSTALL) -D -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
+	$(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
+	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
+	$(INSTALL)    http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
+	$(INSTALL) -s $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME)
 	ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
 	ln -sf $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SOLIBNAME).$(SOEXT)