Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jan 2022 23:28:09 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f78ef7bbfffe - main - www/nghttp2: Convert REINPLACE_CMD to patch files
Message-ID:  <202201282328.20SNS9aC094371@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f78ef7bbfffedec5827f4a1ce0608004a3bc2f8a

commit f78ef7bbfffedec5827f4a1ce0608004a3bc2f8a
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-01-28 23:18:54 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-01-28 23:26:40 +0000

    www/nghttp2: Convert REINPLACE_CMD to patch files
---
 www/nghttp2/Makefile                               |  5 --
 www/nghttp2/files/patch-Makefile.in                | 11 +++
 www/nghttp2/files/patch-examples-Makefile.in       | 66 +++++++++++++++++
 www/nghttp2/files/patch-script-fetch-ocsp-response |  7 ++
 www/nghttp2/files/patch-src-Makefile.in            | 83 ++++++++++++++++++++++
 www/nghttp2/files/patch-tests-Makefile.in          | 31 ++++++++
 6 files changed, 198 insertions(+), 5 deletions(-)

diff --git a/www/nghttp2/Makefile b/www/nghttp2/Makefile
index 680209452960..9b2c97126857 100644
--- a/www/nghttp2/Makefile
+++ b/www/nghttp2/Makefile
@@ -49,11 +49,6 @@ HPACK_BUILD_DEPENDS=	jansson>=2.5:devel/jansson
 HPACK_CONFIGURE_ENABLE=	hpack-tools
 HPACK_LIB_DEPENDS=	libjansson.so:devel/jansson
 
-post-patch:
-	@${REINPLACE_CMD} -e '/^SUBDIRS = / s| lib||' ${WRKSRC}/Makefile.in
-	@${REINPLACE_CMD} -e 's|$$[({]top_builddir[})]/lib/libnghttp2.la|-lnghttp2|' ${WRKSRC}/*/Makefile.in
-	@${REINPLACE_CMD} -e '1d' ${WRKSRC}/script/fetch-ocsp-response
-
 # lib/libnghttp2.* are not available until configure phase
 post-configure:
 	@${MKDIR} ${WRKSRC}/lib/.libs/
diff --git a/www/nghttp2/files/patch-Makefile.in b/www/nghttp2/files/patch-Makefile.in
new file mode 100644
index 000000000000..065fc9c70ac2
--- /dev/null
+++ b/www/nghttp2/files/patch-Makefile.in
@@ -0,0 +1,11 @@
+--- Makefile.in.orig	2021-10-19 09:32:30 UTC
++++ Makefile.in
+@@ -464,7 +464,7 @@ top_srcdir = @top_srcdir@
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-SUBDIRS = lib third-party src bpf examples python tests integration-tests \
++SUBDIRS = third-party src bpf examples python tests integration-tests \
+ 	doc contrib script
+ 
+ 
diff --git a/www/nghttp2/files/patch-examples-Makefile.in b/www/nghttp2/files/patch-examples-Makefile.in
new file mode 100644
index 000000000000..879b9c1885cc
--- /dev/null
+++ b/www/nghttp2/files/patch-examples-Makefile.in
@@ -0,0 +1,66 @@
+sed -i .orig 's|$[({]top_builddir[})]/lib/libnghttp2.la|-lnghttp2|' */Makefile.in
+
+--- examples/Makefile.in.orig	2021-10-19 09:32:30 UTC
++++ examples/Makefile.in
+@@ -146,7 +146,7 @@ am__asio_cl_SOURCES_DIST = asio-cl.cc
+ @ENABLE_ASIO_LIB_TRUE@@ENABLE_EXAMPLES_TRUE@am_asio_cl_OBJECTS = asio_cl-asio-cl.$(OBJEXT)
+ asio_cl_OBJECTS = $(am_asio_cl_OBJECTS)
+ am__DEPENDENCIES_1 =
+-@ENABLE_ASIO_LIB_TRUE@@ENABLE_EXAMPLES_TRUE@am__DEPENDENCIES_2 = $(top_builddir)/lib/libnghttp2.la \
++@ENABLE_ASIO_LIB_TRUE@@ENABLE_EXAMPLES_TRUE@am__DEPENDENCIES_2 = -lnghttp2 \
+ @ENABLE_ASIO_LIB_TRUE@@ENABLE_EXAMPLES_TRUE@	$(top_builddir)/src/libnghttp2_asio.la \
+ @ENABLE_ASIO_LIB_TRUE@@ENABLE_EXAMPLES_TRUE@	$(top_builddir)/third-party/liburl-parser.la \
+ @ENABLE_ASIO_LIB_TRUE@@ENABLE_EXAMPLES_TRUE@	$(am__DEPENDENCIES_1) \
+@@ -175,14 +175,14 @@ am__client_SOURCES_DIST = client.c
+ client_OBJECTS = $(am_client_OBJECTS)
+ client_LDADD = $(LDADD)
+ @ENABLE_EXAMPLES_TRUE@client_DEPENDENCIES =  \
+-@ENABLE_EXAMPLES_TRUE@	$(top_builddir)/lib/libnghttp2.la \
++@ENABLE_EXAMPLES_TRUE@	-lnghttp2 \
+ @ENABLE_EXAMPLES_TRUE@	$(top_builddir)/third-party/liburl-parser.la
+ am__deflate_SOURCES_DIST = deflate.c
+ @ENABLE_EXAMPLES_TRUE@am_deflate_OBJECTS = deflate.$(OBJEXT)
+ deflate_OBJECTS = $(am_deflate_OBJECTS)
+ deflate_LDADD = $(LDADD)
+ @ENABLE_EXAMPLES_TRUE@deflate_DEPENDENCIES =  \
+-@ENABLE_EXAMPLES_TRUE@	$(top_builddir)/lib/libnghttp2.la \
++@ENABLE_EXAMPLES_TRUE@	-lnghttp2 \
+ @ENABLE_EXAMPLES_TRUE@	$(top_builddir)/third-party/liburl-parser.la
+ am__libevent_client_SOURCES_DIST = libevent-client.c
+ @ENABLE_EXAMPLES_TRUE@am_libevent_client_OBJECTS =  \
+@@ -190,7 +190,7 @@ am__libevent_client_SOURCES_DIST = libevent-client.c
+ libevent_client_OBJECTS = $(am_libevent_client_OBJECTS)
+ libevent_client_LDADD = $(LDADD)
+ @ENABLE_EXAMPLES_TRUE@libevent_client_DEPENDENCIES =  \
+-@ENABLE_EXAMPLES_TRUE@	$(top_builddir)/lib/libnghttp2.la \
++@ENABLE_EXAMPLES_TRUE@	-lnghttp2 \
+ @ENABLE_EXAMPLES_TRUE@	$(top_builddir)/third-party/liburl-parser.la
+ am__libevent_server_SOURCES_DIST = libevent-server.c
+ @ENABLE_EXAMPLES_TRUE@am_libevent_server_OBJECTS =  \
+@@ -198,7 +198,7 @@ am__libevent_server_SOURCES_DIST = libevent-server.c
+ libevent_server_OBJECTS = $(am_libevent_server_OBJECTS)
+ libevent_server_LDADD = $(LDADD)
+ @ENABLE_EXAMPLES_TRUE@libevent_server_DEPENDENCIES =  \
+-@ENABLE_EXAMPLES_TRUE@	$(top_builddir)/lib/libnghttp2.la \
++@ENABLE_EXAMPLES_TRUE@	-lnghttp2 \
+ @ENABLE_EXAMPLES_TRUE@	$(top_builddir)/third-party/liburl-parser.la
+ AM_V_P = $(am__v_P_@AM_V@)
+ am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+@@ -503,7 +503,7 @@ EXTRA_DIST = CMakeLists.txt
+ @ENABLE_EXAMPLES_TRUE@	@DEFS@
+ 
+ @ENABLE_EXAMPLES_TRUE@AM_LDFLAGS = @LIBTOOL_LDFLAGS@
+-@ENABLE_EXAMPLES_TRUE@LDADD = $(top_builddir)/lib/libnghttp2.la \
++@ENABLE_EXAMPLES_TRUE@LDADD = -lnghttp2 \
+ @ENABLE_EXAMPLES_TRUE@	$(top_builddir)/third-party/liburl-parser.la \
+ @ENABLE_EXAMPLES_TRUE@	@LIBEVENT_OPENSSL_LIBS@ \
+ @ENABLE_EXAMPLES_TRUE@	@OPENSSL_LIBS@ \
+@@ -518,7 +518,7 @@ EXTRA_DIST = CMakeLists.txt
+ # nghttp2/nghttp2.h) in this package is used rather than installed
+ # one.
+ @ENABLE_ASIO_LIB_TRUE@@ENABLE_EXAMPLES_TRUE@ASIOCPPFLAGS = ${AM_CPPFLAGS} ${BOOST_CPPFLAGS}
+-@ENABLE_ASIO_LIB_TRUE@@ENABLE_EXAMPLES_TRUE@ASIOLDADD = $(top_builddir)/lib/libnghttp2.la \
++@ENABLE_ASIO_LIB_TRUE@@ENABLE_EXAMPLES_TRUE@ASIOLDADD = -lnghttp2 \
+ @ENABLE_ASIO_LIB_TRUE@@ENABLE_EXAMPLES_TRUE@	$(top_builddir)/src/libnghttp2_asio.la @JEMALLOC_LIBS@ \
+ @ENABLE_ASIO_LIB_TRUE@@ENABLE_EXAMPLES_TRUE@	$(top_builddir)/third-party/liburl-parser.la \
+ @ENABLE_ASIO_LIB_TRUE@@ENABLE_EXAMPLES_TRUE@	@OPENSSL_LIBS@ \
diff --git a/www/nghttp2/files/patch-script-fetch-ocsp-response b/www/nghttp2/files/patch-script-fetch-ocsp-response
new file mode 100644
index 000000000000..e68d0f63ef0e
--- /dev/null
+++ b/www/nghttp2/files/patch-script-fetch-ocsp-response
@@ -0,0 +1,7 @@
+--- script/fetch-ocsp-response.orig	2021-10-19 09:31:47 UTC
++++ script/fetch-ocsp-response
+@@ -1,4 +1,3 @@
+-#!/usr/bin/env python
+ # -*- coding: utf-8 -*-
+ 
+ # nghttp2 - HTTP/2 C Library
diff --git a/www/nghttp2/files/patch-src-Makefile.in b/www/nghttp2/files/patch-src-Makefile.in
new file mode 100644
index 000000000000..e632cf924baf
--- /dev/null
+++ b/www/nghttp2/files/patch-src-Makefile.in
@@ -0,0 +1,83 @@
+sed -i .orig 's|$[({]top_builddir[})]/lib/libnghttp2.la|-lnghttp2|' */Makefile.in
+
+--- src/Makefile.in.orig	2021-10-19 09:32:30 UTC
++++ src/Makefile.in
+@@ -318,7 +318,7 @@ am__libnghttpx_a_SOURCES_DIST = util.cc util.h http2.c
+ libnghttpx_a_OBJECTS = $(am_libnghttpx_a_OBJECTS)
+ am__DEPENDENCIES_1 =
+ @ENABLE_ASIO_LIB_TRUE@libnghttp2_asio_la_DEPENDENCIES =  \
+-@ENABLE_ASIO_LIB_TRUE@	$(top_builddir)/lib/libnghttp2.la \
++@ENABLE_ASIO_LIB_TRUE@	-lnghttp2 \
+ @ENABLE_ASIO_LIB_TRUE@	$(top_builddir)/third-party/liburl-parser.la \
+ @ENABLE_ASIO_LIB_TRUE@	$(top_builddir)/third-party/libllhttp.la \
+ @ENABLE_ASIO_LIB_TRUE@	$(am__DEPENDENCIES_1) \
+@@ -392,7 +392,7 @@ am__deflatehd_SOURCES_DIST = deflatehd.cc comp_helper.
+ @ENABLE_HPACK_TOOLS_TRUE@	$(am__objects_4)
+ deflatehd_OBJECTS = $(am_deflatehd_OBJECTS)
+ deflatehd_LDADD = $(LDADD)
+-deflatehd_DEPENDENCIES = $(top_builddir)/lib/libnghttp2.la \
++deflatehd_DEPENDENCIES = -lnghttp2 \
+ 	$(top_builddir)/third-party/liburl-parser.la \
+ 	$(top_builddir)/third-party/libllhttp.la
+ am__h2load_SOURCES_DIST = util.cc util.h http2.cc http2.h h2load.cc \
+@@ -411,7 +411,7 @@ am__h2load_SOURCES_DIST = util.cc util.h http2.cc http
+ @ENABLE_APP_TRUE@	$(am__objects_5)
+ h2load_OBJECTS = $(am_h2load_OBJECTS)
+ h2load_LDADD = $(LDADD)
+-h2load_DEPENDENCIES = $(top_builddir)/lib/libnghttp2.la \
++h2load_DEPENDENCIES = -lnghttp2 \
+ 	$(top_builddir)/third-party/liburl-parser.la \
+ 	$(top_builddir)/third-party/libllhttp.la
+ am__inflatehd_SOURCES_DIST = inflatehd.cc comp_helper.c comp_helper.h
+@@ -419,7 +419,7 @@ am__inflatehd_SOURCES_DIST = inflatehd.cc comp_helper.
+ @ENABLE_HPACK_TOOLS_TRUE@	$(am__objects_4)
+ inflatehd_OBJECTS = $(am_inflatehd_OBJECTS)
+ inflatehd_LDADD = $(LDADD)
+-inflatehd_DEPENDENCIES = $(top_builddir)/lib/libnghttp2.la \
++inflatehd_DEPENDENCIES = -lnghttp2 \
+ 	$(top_builddir)/third-party/liburl-parser.la \
+ 	$(top_builddir)/third-party/libllhttp.la
+ am__nghttp_SOURCES_DIST = util.cc http2.cc timegm.c app_helper.cc \
+@@ -438,7 +438,7 @@ am__objects_7 =
+ @ENABLE_APP_TRUE@	$(am__objects_7) tls.$(OBJEXT)
+ nghttp_OBJECTS = $(am_nghttp_OBJECTS)
+ nghttp_LDADD = $(LDADD)
+-nghttp_DEPENDENCIES = $(top_builddir)/lib/libnghttp2.la \
++nghttp_DEPENDENCIES = -lnghttp2 \
+ 	$(top_builddir)/third-party/liburl-parser.la \
+ 	$(top_builddir)/third-party/libllhttp.la
+ am__nghttpd_SOURCES_DIST = util.cc http2.cc timegm.c app_helper.cc \
+@@ -450,13 +450,13 @@ am__nghttpd_SOURCES_DIST = util.cc http2.cc timegm.c a
+ @ENABLE_APP_TRUE@	tls.$(OBJEXT) HttpServer.$(OBJEXT)
+ nghttpd_OBJECTS = $(am_nghttpd_OBJECTS)
+ nghttpd_LDADD = $(LDADD)
+-nghttpd_DEPENDENCIES = $(top_builddir)/lib/libnghttp2.la \
++nghttpd_DEPENDENCIES = -lnghttp2 \
+ 	$(top_builddir)/third-party/liburl-parser.la \
+ 	$(top_builddir)/third-party/libllhttp.la
+ am__nghttpx_SOURCES_DIST = shrpx.cc shrpx.h
+ @ENABLE_APP_TRUE@am_nghttpx_OBJECTS = nghttpx-shrpx.$(OBJEXT)
+ nghttpx_OBJECTS = $(am_nghttpx_OBJECTS)
+-am__DEPENDENCIES_2 = $(top_builddir)/lib/libnghttp2.la \
++am__DEPENDENCIES_2 = -lnghttp2 \
+ 	$(top_builddir)/third-party/liburl-parser.la \
+ 	$(top_builddir)/third-party/libllhttp.la
+ @ENABLE_APP_TRUE@nghttpx_DEPENDENCIES = libnghttpx.a \
+@@ -1146,7 +1146,7 @@ AM_CPPFLAGS = \
+ 	@DEFS@
+ 
+ AM_LDFLAGS = @LIBTOOL_LDFLAGS@
+-LDADD = $(top_builddir)/lib/libnghttp2.la \
++LDADD = -lnghttp2 \
+ 	$(top_builddir)/third-party/liburl-parser.la \
+ 	$(top_builddir)/third-party/libllhttp.la \
+ 	@JEMALLOC_LIBS@ \
+@@ -1322,7 +1322,7 @@ LDADD = $(top_builddir)/lib/libnghttp2.la \
+ @ENABLE_ASIO_LIB_TRUE@libnghttp2_asio_la_CPPFLAGS = ${AM_CPPFLAGS} ${BOOST_CPPFLAGS}
+ @ENABLE_ASIO_LIB_TRUE@libnghttp2_asio_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined -version-info 1:0:0
+ @ENABLE_ASIO_LIB_TRUE@libnghttp2_asio_la_LIBADD = \
+-@ENABLE_ASIO_LIB_TRUE@	$(top_builddir)/lib/libnghttp2.la \
++@ENABLE_ASIO_LIB_TRUE@	-lnghttp2 \
+ @ENABLE_ASIO_LIB_TRUE@	$(top_builddir)/third-party/liburl-parser.la \
+ @ENABLE_ASIO_LIB_TRUE@	$(top_builddir)/third-party/libllhttp.la \
+ @ENABLE_ASIO_LIB_TRUE@	@OPENSSL_LIBS@ \
diff --git a/www/nghttp2/files/patch-tests-Makefile.in b/www/nghttp2/files/patch-tests-Makefile.in
new file mode 100644
index 000000000000..f521a8965870
--- /dev/null
+++ b/www/nghttp2/files/patch-tests-Makefile.in
@@ -0,0 +1,31 @@
+sed -i .orig 's|$[({]top_builddir[})]/lib/libnghttp2.la|-lnghttp2|' */Makefile.in
+
+--- tests/Makefile.in.orig	2021-10-19 09:32:30 UTC
++++ tests/Makefile.in
+@@ -141,7 +141,7 @@ failmalloc_OBJECTS = $(am_failmalloc_OBJECTS)
+ am__DEPENDENCIES_1 =
+ @ENABLE_STATIC_FALSE@@HAVE_CUNIT_TRUE@am__DEPENDENCIES_2 = ${top_builddir}/lib/.libs/*.o \
+ @ENABLE_STATIC_FALSE@@HAVE_CUNIT_TRUE@	$(am__DEPENDENCIES_1)
+-@ENABLE_STATIC_TRUE@@HAVE_CUNIT_TRUE@am__DEPENDENCIES_2 = ${top_builddir}/lib/libnghttp2.la \
++@ENABLE_STATIC_TRUE@@HAVE_CUNIT_TRUE@am__DEPENDENCIES_2 = -lnghttp2 \
+ @ENABLE_STATIC_TRUE@@HAVE_CUNIT_TRUE@	$(am__DEPENDENCIES_1)
+ @ENABLE_FAILMALLOC_TRUE@@HAVE_CUNIT_TRUE@failmalloc_DEPENDENCIES = $(am__DEPENDENCIES_2)
+ AM_V_lt = $(am__v_lt_@AM_V@)
+@@ -177,7 +177,7 @@ am__objects_1 =
+ main_OBJECTS = $(am_main_OBJECTS)
+ @ENABLE_STATIC_FALSE@@HAVE_CUNIT_TRUE@main_DEPENDENCIES = ${top_builddir}/lib/.libs/*.o \
+ @ENABLE_STATIC_FALSE@@HAVE_CUNIT_TRUE@	$(am__DEPENDENCIES_1)
+-@ENABLE_STATIC_TRUE@@HAVE_CUNIT_TRUE@main_DEPENDENCIES = ${top_builddir}/lib/libnghttp2.la \
++@ENABLE_STATIC_TRUE@@HAVE_CUNIT_TRUE@main_DEPENDENCIES = -lnghttp2 \
+ @ENABLE_STATIC_TRUE@@HAVE_CUNIT_TRUE@	$(am__DEPENDENCIES_1)
+ main_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+@@ -732,7 +732,7 @@ EXTRA_DIST = CMakeLists.txt
+ # files directly because the tests use symbols not included in public API.
+ @ENABLE_STATIC_FALSE@@HAVE_CUNIT_TRUE@main_LDADD = ${top_builddir}/lib/.libs/*.o \
+ @ENABLE_STATIC_FALSE@@HAVE_CUNIT_TRUE@	$(am__append_2)
+-@ENABLE_STATIC_TRUE@@HAVE_CUNIT_TRUE@main_LDADD = ${top_builddir}/lib/libnghttp2.la \
++@ENABLE_STATIC_TRUE@@HAVE_CUNIT_TRUE@main_LDADD = -lnghttp2 \
+ @ENABLE_STATIC_TRUE@@HAVE_CUNIT_TRUE@	$(am__append_2)
+ @HAVE_CUNIT_TRUE@main_LDFLAGS = -static
+ @ENABLE_FAILMALLOC_TRUE@@HAVE_CUNIT_TRUE@failmalloc_SOURCES = failmalloc.c failmalloc_test.c failmalloc_test.h \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202201282328.20SNS9aC094371>