summaryrefslogtreecommitdiff
path: root/net-libs/http-parser/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-libs/http-parser/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-libs/http-parser/files')
-rw-r--r--net-libs/http-parser/files/0001-makefile-fix-DESTDIR-usage.patch64
-rw-r--r--net-libs/http-parser/files/0002-makefile-quote-variables.patch50
-rw-r--r--net-libs/http-parser/files/0003-makefile-fix-SONAME-symlink-it-should-not-be-a-full-.patch35
-rw-r--r--net-libs/http-parser/files/0004-makefile-add-CFLAGS-to-linking-command.patch31
-rw-r--r--net-libs/http-parser/files/0005-makefile-fix-install-rule-dependency.patch33
-rw-r--r--net-libs/http-parser/files/http-parser-2.6.2-darwin.patch16
6 files changed, 229 insertions, 0 deletions
diff --git a/net-libs/http-parser/files/0001-makefile-fix-DESTDIR-usage.patch b/net-libs/http-parser/files/0001-makefile-fix-DESTDIR-usage.patch
new file mode 100644
index 000000000000..a819cf441d32
--- /dev/null
+++ b/net-libs/http-parser/files/0001-makefile-fix-DESTDIR-usage.patch
@@ -0,0 +1,64 @@
+From 7fbc87986baa09c342abb21e34613e8bbdc3c9c7 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@hasufell.de>
+Date: Mon, 2 Nov 2015 16:24:43 +0100
+Subject: [PATCH 1/4] makefile: fix DESTDIR usage
+
+DESTDIR is not supposed to be set inside other variables. It is
+standard to have this variable in install/uninstall rules, so it
+can be reliably set separately no matter what other variables are set
+to.
+This also avoids potential bugs with setting SONAME or seds on
+installed files (like pkgconfig) which then might include the
+temporary DESTDIR directory.
+
+DESTDIR is really just for installing into a temporary directory or
+a chroot, mostly used by package managers.
+---
+ Makefile | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 33c8ba0..76153a0 100644
+--- a/Makefile
++++ b/Makefile
+@@ -55,7 +55,7 @@ CFLAGS_LIB = $(CFLAGS_FAST) -fPIC
+ LDFLAGS_LIB = $(LDFLAGS) -shared
+
+ INSTALL ?= install
+-PREFIX ?= $(DESTDIR)/usr/local
++PREFIX ?= /usr/local
+ LIBDIR = $(PREFIX)/lib
+ INCLUDEDIR = $(PREFIX)/include
+
+@@ -123,19 +123,19 @@ tags: http_parser.c http_parser.h test.c
+ ctags $^
+
+ install: library
+- $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h
+- $(INSTALL) -D $(SONAME) $(LIBDIR)/$(SONAME)
+- ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT)
++ $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
++ $(INSTALL) -D $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
++ ln -s $(LIBDIR)/$(SONAME) $(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)
+
+ install-strip: library
+- $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h
+- $(INSTALL) -D -s $(SONAME) $(LIBDIR)/$(SONAME)
+- ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT)
++ $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
++ $(INSTALL) -D -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
++ ln -s $(LIBDIR)/$(SONAME) $(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)
+
+ uninstall:
+- rm $(INCLUDEDIR)/http_parser.h
+- rm $(LIBDIR)/$(SONAME)
+- rm $(LIBDIR)/libhttp_parser.so
++ rm $(DESTDIR)$(INCLUDEDIR)/http_parser.h
++ rm $(DESTDIR)$(LIBDIR)/$(SONAME)
++ rm $(DESTDIR)$(LIBDIR)/libhttp_parser.so
+
+ clean:
+ rm -f *.o *.a tags test test_fast test_g \
+--
+2.6.1
+
diff --git a/net-libs/http-parser/files/0002-makefile-quote-variables.patch b/net-libs/http-parser/files/0002-makefile-quote-variables.patch
new file mode 100644
index 000000000000..096ac6b6bd69
--- /dev/null
+++ b/net-libs/http-parser/files/0002-makefile-quote-variables.patch
@@ -0,0 +1,50 @@
+From 9bce473ba7417b45bfdb59d4151a8857dcfff4ad Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@hasufell.de>
+Date: Mon, 2 Nov 2015 16:27:06 +0100
+Subject: [PATCH 2/4] makefile: quote variables
+
+Make does not take care of this in make rules. If any of the variables
+DESTDIR, INCLUDEDIR or LIBDIR contain whitespaces, then the related
+install command will fail.
+
+This is even more important for the uninstall rule.
+---
+ Makefile | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 76153a0..8c4a9d7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -123,19 +123,19 @@ tags: http_parser.c http_parser.h test.c
+ ctags $^
+
+ install: library
+- $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
+- $(INSTALL) -D $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
+- ln -s $(LIBDIR)/$(SONAME) $(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)
++ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h"
++ $(INSTALL) -D $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)"
++ ln -s $(LIBDIR)/$(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)"
+
+ install-strip: library
+- $(INSTALL) -D http_parser.h $(DESTDIR)$(INCLUDEDIR)/http_parser.h
+- $(INSTALL) -D -s $(SONAME) $(DESTDIR)$(LIBDIR)/$(SONAME)
+- ln -s $(LIBDIR)/$(SONAME) $(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)
++ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h"
++ $(INSTALL) -D -s $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)"
++ ln -s $(LIBDIR)/$(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)"
+
+ uninstall:
+- rm $(DESTDIR)$(INCLUDEDIR)/http_parser.h
+- rm $(DESTDIR)$(LIBDIR)/$(SONAME)
+- rm $(DESTDIR)$(LIBDIR)/libhttp_parser.so
++ rm "$(DESTDIR)$(INCLUDEDIR)/http_parser.h"
++ rm "$(DESTDIR)$(LIBDIR)/$(SONAME)"
++ rm "$(DESTDIR)$(LIBDIR)/libhttp_parser.so"
+
+ clean:
+ rm -f *.o *.a tags test test_fast test_g \
+--
+2.6.1
+
diff --git a/net-libs/http-parser/files/0003-makefile-fix-SONAME-symlink-it-should-not-be-a-full-.patch b/net-libs/http-parser/files/0003-makefile-fix-SONAME-symlink-it-should-not-be-a-full-.patch
new file mode 100644
index 000000000000..cafe68d220c9
--- /dev/null
+++ b/net-libs/http-parser/files/0003-makefile-fix-SONAME-symlink-it-should-not-be-a-full-.patch
@@ -0,0 +1,35 @@
+From f45b38c42e7e92a5d0215c44dcf306616536011e Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@hasufell.de>
+Date: Mon, 2 Nov 2015 16:32:11 +0100
+Subject: [PATCH 3/4] makefile: fix SONAME symlink, it should not be a full
+ path
+
+The symlink destination being a full path doesn't give any benefit and
+may break a few use cases of copying these files to a different
+destination, while preserving the symlink.
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8c4a9d7..cbe93e8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -125,12 +125,12 @@ tags: http_parser.c http_parser.h test.c
+ install: library
+ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h"
+ $(INSTALL) -D $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)"
+- ln -s $(LIBDIR)/$(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)"
++ ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)"
+
+ install-strip: library
+ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h"
+ $(INSTALL) -D -s $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)"
+- ln -s $(LIBDIR)/$(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)"
++ ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)"
+
+ uninstall:
+ rm "$(DESTDIR)$(INCLUDEDIR)/http_parser.h"
+--
+2.6.1
+
diff --git a/net-libs/http-parser/files/0004-makefile-add-CFLAGS-to-linking-command.patch b/net-libs/http-parser/files/0004-makefile-add-CFLAGS-to-linking-command.patch
new file mode 100644
index 000000000000..e21cd715499b
--- /dev/null
+++ b/net-libs/http-parser/files/0004-makefile-add-CFLAGS-to-linking-command.patch
@@ -0,0 +1,31 @@
+From 62b1450cfe2e0df2d912279d38edf1b916020101 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@hasufell.de>
+Date: Mon, 2 Nov 2015 16:39:31 +0100
+Subject: [PATCH 4/4] makefile: add CFLAGS to linking command
+
+Although we compile the objects explicitly there are some CFLAGS
+that may also affect linking, which is not always obvious.
+
+This can also be a problem for toolchains that support multiple ABIs
+and need to set CFLAGS=<abi selector>, which will cause linking
+to either fail or produce an unusable executable/library.
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index cbe93e8..ae16f08 100644
+--- a/Makefile
++++ b/Makefile
+@@ -102,7 +102,7 @@ libhttp_parser.o: http_parser.c http_parser.h Makefile
+ $(CC) $(CPPFLAGS_FAST) $(CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o
+
+ library: libhttp_parser.o
+- $(CC) $(LDFLAGS_LIB) -o $(SONAME) $<
++ $(CC) $(CFLAGS_LIB) $(LDFLAGS_LIB) -o $(SONAME) $<
+
+ package: http_parser.o
+ $(AR) rcs libhttp_parser.a http_parser.o
+--
+2.6.1
+
diff --git a/net-libs/http-parser/files/0005-makefile-fix-install-rule-dependency.patch b/net-libs/http-parser/files/0005-makefile-fix-install-rule-dependency.patch
new file mode 100644
index 000000000000..da966373063f
--- /dev/null
+++ b/net-libs/http-parser/files/0005-makefile-fix-install-rule-dependency.patch
@@ -0,0 +1,33 @@
+From b67bfbe6a07529dd82e2ee83b6848d017e6e422f Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@hasufell.de>
+Date: Mon, 2 Nov 2015 16:51:28 +0100
+Subject: [PATCH 5/5] makefile: fix install rule dependency
+
+Otherwise the install rule will recompile the library, no matter
+if it has already been compiled.
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index ae16f08..df0b59f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -122,12 +122,12 @@ parsertrace_g: http_parser_g.o contrib/parsertrace.c
+ tags: http_parser.c http_parser.h test.c
+ ctags $^
+
+-install: library
++install: $(SONAME)
+ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h"
+ $(INSTALL) -D $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)"
+ ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)"
+
+-install-strip: library
++install-strip: $(SONAME)
+ $(INSTALL) -D http_parser.h "$(DESTDIR)$(INCLUDEDIR)/http_parser.h"
+ $(INSTALL) -D -s $(SONAME) "$(DESTDIR)$(LIBDIR)/$(SONAME)"
+ ln -s $(SONAME) "$(DESTDIR)$(LIBDIR)/libhttp_parser.$(SOEXT)"
+--
+2.6.1
+
diff --git a/net-libs/http-parser/files/http-parser-2.6.2-darwin.patch b/net-libs/http-parser/files/http-parser-2.6.2-darwin.patch
new file mode 100644
index 000000000000..b04b4a32bb01
--- /dev/null
+++ b/net-libs/http-parser/files/http-parser-2.6.2-darwin.patch
@@ -0,0 +1,16 @@
+Makefile: set install_name on Darwin
+
+https://bugs.gentoo.org/show_bug.cgi?id=546098
+https://github.com/nodejs/http-parser/issues/356
+
+--- http-parser-2.6.2/Makefile
++++ http-parser-2.6.2/Makefile
+@@ -62,6 +62,8 @@
+ ifneq (darwin,$(PLATFORM))
+ # TODO(bnoordhuis) The native SunOS linker expects -h rather than -soname...
+ LDFLAGS_LIB += -Wl,-soname=$(SONAME)
++else
++LDFLAGS_LIB += -Wl,-install_name,$(LIBDIR)/$(SONAME)
+ endif
+
+ test: test_g test_fast