From owner-dev-commits-ports-all@freebsd.org Tue Aug 24 17:35:58 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6207E65C2A4; Tue, 24 Aug 2021 17:35:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GvGVQ1khqz4r4s; Tue, 24 Aug 2021 17:35:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E18044C64; Tue, 24 Aug 2021 17:35:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17OHZvxL054707; Tue, 24 Aug 2021 17:35:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17OHZvdl054706; Tue, 24 Aug 2021 17:35:57 GMT (envelope-from git) Date: Tue, 24 Aug 2021 17:35:57 GMT Message-Id: <202108241735.17OHZvdl054706@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: b38eb689eb2c - main - www/cpp-httplib: Add test target MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b38eb689eb2c1a460ead94c7ea2a5f547d4c2fc0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2021 17:35:58 -0000 The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=b38eb689eb2c1a460ead94c7ea2a5f547d4c2fc0 commit b38eb689eb2c1a460ead94c7ea2a5f547d4c2fc0 Author: Yuri Victorovich AuthorDate: 2021-08-24 17:35:19 +0000 Commit: Yuri Victorovich CommitDate: 2021-08-24 17:35:52 +0000 www/cpp-httplib: Add test target --- www/cpp-httplib/Makefile | 9 ++++++++- www/cpp-httplib/files/patch-test_Makefile | 26 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/www/cpp-httplib/Makefile b/www/cpp-httplib/Makefile index c455afd27fa7..b06955ab1e3a 100644 --- a/www/cpp-httplib/Makefile +++ b/www/cpp-httplib/Makefile @@ -9,7 +9,9 @@ COMMENT= C++ header-only HTTP/HTTPS server and client library LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -USES= cmake +TEST_DEPENDS= gmake:devel/gmake + +USES= cmake localbase:ldflags python:test # localbase only for tests USE_GITHUB= yes GH_ACCOUNT= yhirose @@ -18,6 +20,8 @@ CMAKE_ON= HTTPLIB_REQUIRE_ZLIB NO_ARCH= yes +BINARY_ALIAS= python3=${PYTHON_CMD} # only for tests + PLIST_FILES= include/httplib.h \ lib/cmake/httplib/FindBrotli.cmake \ lib/cmake/httplib/httplibConfig.cmake \ @@ -34,4 +38,7 @@ BROTLI_RUN_DEPENDS= brotli>0:archivers/brotli SSL_USES= ssl SSL_CMAKE_BOOL= HTTPLIB_REQUIRE_OPENSSL HTTPLIB_USE_OPENSSL_IF_AVAILABLE +do-test: install # 3 tests are known to fail: https://github.com/yhirose/cpp-httplib/issues/1028 + @cd ${WRKSRC}/test && ${SETENV} ${MAKE_ENV} ${GMAKE} CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" + .include diff --git a/www/cpp-httplib/files/patch-test_Makefile b/www/cpp-httplib/files/patch-test_Makefile new file mode 100644 index 000000000000..c818a121e196 --- /dev/null +++ b/www/cpp-httplib/files/patch-test_Makefile @@ -0,0 +1,26 @@ +--- test/Makefile.orig 2021-08-24 16:49:33 UTC ++++ test/Makefile +@@ -1,5 +1,5 @@ + #CXX = clang++ +-CXXFLAGS = -g -std=c++11 -I. -Wall -Wextra -Wtype-limits -Wconversion #-fsanitize=address ++CXXFLAGS += -g -std=c++11 -I. -Wall -Wextra -Wtype-limits -Wconversion #-fsanitize=address + + OPENSSL_DIR = /usr/local/opt/openssl@1.1 + OPENSSL_SUPPORT = -DCPPHTTPLIB_OPENSSL_SUPPORT -I$(OPENSSL_DIR)/include -L$(OPENSSL_DIR)/lib -lssl -lcrypto +@@ -20,13 +20,13 @@ proxy : test_proxy + ./test_proxy + + test : test.cc include_httplib.cc ../httplib.h Makefile cert.pem +- $(CXX) -o $@ -I.. $(CXXFLAGS) test.cc include_httplib.cc $(TEST_ARGS) ++ $(CXX) -o $@ -I.. $(CXXFLAGS) test.cc include_httplib.cc ${LDFLAGS} $(TEST_ARGS) + + test_split : test.cc ../httplib.h httplib.cc Makefile cert.pem +- $(CXX) -o $@ $(CXXFLAGS) test.cc httplib.cc $(TEST_ARGS) ++ $(CXX) -o $@ $(CXXFLAGS) test.cc httplib.cc ${LDFLAGS} $(TEST_ARGS) + + test_proxy : test_proxy.cc ../httplib.h Makefile cert.pem +- $(CXX) -o $@ -I.. $(CXXFLAGS) test_proxy.cc $(TEST_ARGS) ++ $(CXX) -o $@ -I.. $(CXXFLAGS) test_proxy.cc ${LDFLAGS} $(TEST_ARGS) + + httplib.cc : ../httplib.h + python3 ../split.py -o .