From nobody Wed Jul 19 18:26:08 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R5km10Jbnz4mv9S; Wed, 19 Jul 2023 18:26:09 +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 4R5km06GCcz3hwc; Wed, 19 Jul 2023 18:26:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689791168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zm41DgNeATzlHhzUQr5ob8g0CQs6A0MgA47ieVTaL3U=; b=LiNuB2FgAzMvwFz+E8c11oa8LKLpwUI+pNEZOi6WOtOoHtq5Iy8UVzp6eTDnhVKrqvVXAb 2trOWInrKzh014nwV2KjWUpqvGa/W/xujbATan4NSs11XDmp3kB3oOj6+5R0FFPVgNpVtn V+f46hkpUEKYYlneCqCGe3vZ9b9InCpv/sajdKpkNRMwxDa5qkpZjxgPmXYSskkFdvc3tZ PvR80fc+O3c2k49Fx1oxoKyZikD52oJW29yDfv9bH04JiCRlXwtTKszxmSjM/Zve3hjiJ6 yU58MEbldhwWmwalPO+PzZEProutYPR5ihUh/b+u5hrujMSAFSWPsxmFytoKfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689791168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zm41DgNeATzlHhzUQr5ob8g0CQs6A0MgA47ieVTaL3U=; b=Xl4C4uZ453y06d5JeEp7ksyIN34G7mrHGbCzj4CMGyUBAjfXblhAj8SsSVCt0idwHHtu7s QVaik8tZDrCb2kv1PYAUsYYyfAA4OFmPTulUugI9QsKa2H/52DjBumr0IScKnCWRhdnHht F7JrSyX4jMDD10dgODuM565RZ4iLQ5AgeTBMN5j4Iy+Ciivui0vCSfh/4G7leoe36f0EfO srbZR4p4rK+Cj4Z8b06MPoCB4LMLIjeN2G7p1WwRS9HvhurF6mRIh3qHdUHj5/tyfHlPm/ PUeR0go+1huGyNUQ7HTr8Ex3rv+vRVQ5m1UEtCKHV5tpgM3f/3eEWt2Rr9Sa4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689791168; a=rsa-sha256; cv=none; b=FT8V+xgikgnYvhO0jlUr22MantdF/fZgqRyYWmJT7H+QNKT9WtiJvlqBtHODv7DjL1tlsQ m3NZgXw1ok9o3EMxqiCLfbjjGGmziLC8Ikv+jqGOb1h4yQEYOIbvkoK8MVFmLxIlyZHzNK FoyeMWMwb9py3hKn6NutyI2xQjspXhqXGTrXs9d1T+RUClpBYKNFVoYfAsG4/B41AwCfJp EsO6iSMbGoBwjzihSxodO6Q9+UY9g5eteGix8loX+7ut4WfK0pW+A81oaO5kZ3+jlI/AHq zNGF/GI2miaHiXP2Q/rubntY4atjkp8Kk76GeKsjG78QB8jh0wurRRiQWYDSng== 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 4R5km05KDgzyh3; Wed, 19 Jul 2023 18:26:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36JIQ85C016743; Wed, 19 Jul 2023 18:26:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36JIQ8VG016742; Wed, 19 Jul 2023 18:26:08 GMT (envelope-from git) Date: Wed, 19 Jul 2023 18:26:08 GMT Message-Id: <202307191826.36JIQ8VG016742@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: f3a0c9a0ce90 - main - math/clad: Add test target List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org 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: f3a0c9a0ce90f5bc83f96664dc16e94a5d0665cc Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=f3a0c9a0ce90f5bc83f96664dc16e94a5d0665cc commit f3a0c9a0ce90f5bc83f96664dc16e94a5d0665cc Author: Yuri Victorovich AuthorDate: 2023-07-18 13:55:24 +0000 Commit: Yuri Victorovich CommitDate: 2023-07-19 18:26:04 +0000 math/clad: Add test target --- math/clad/Makefile | 15 +++++++++++++-- ...tch-demos_ErrorEstimation_CustomModel_CustomModel.cpp | 16 ++++++++++++++++ ...patch-demos_ErrorEstimation_PrintModel_PrintModel.cpp | 16 ++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/math/clad/Makefile b/math/clad/Makefile index 3d91651338d7..523b321ac885 100644 --- a/math/clad/Makefile +++ b/math/clad/Makefile @@ -10,14 +10,25 @@ WWW= https://github.com/vgvassilev/clad LICENSE= LGPL3 LICENSE_FILE= ${WRKSRC}/License.txt -USES= cmake compiler:c++14-lang llvm:15,build,run +USES= cmake:testing compiler:c++14-lang llvm:15,build,run USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= vgvassilev CMAKE_ARGS= -DClang_DIR=${LLVM_PREFIX}/lib/cmake/clang \ - -DLLVM_DIR=${LLVM_PREFIX}/lib/cmake/llvm + -DLLVM_DIR=${LLVM_PREFIX}/lib/cmake/llvm \ + -DLLVM_EXTERNAL_LIT=${LLVM_PREFIX}/bin/llvm-lit CMAKE_ON= BUILD_SHARED_LIBS +CMAKE_TESTING_ON= FREEBSD_BUILD_TESTS FREEBSD_BUILD_DEMOS +CMAKE_TESTING_TARGET= check-clad + +post-patch: + @${REINPLACE_CMD} \ + -e ' \ + s|import lit|&${LLVM_VERSION}|; \ + s|lit\.|lit${LLVM_VERSION}.| \ + ' \ + ${WRKSRC}/test/lit.cfg .include diff --git a/math/clad/files/patch-demos_ErrorEstimation_CustomModel_CustomModel.cpp b/math/clad/files/patch-demos_ErrorEstimation_CustomModel_CustomModel.cpp new file mode 100644 index 000000000000..d8e6163e4c60 --- /dev/null +++ b/math/clad/files/patch-demos_ErrorEstimation_CustomModel_CustomModel.cpp @@ -0,0 +1,16 @@ +- workaround for errors like: +- ld: error: undefined reference due to --no-allow-shlib-undefined: __progname +- >>> referenced by /lib/libc.so.7 + +--- demos/ErrorEstimation/CustomModel/CustomModel.cpp.orig 2023-07-19 16:59:14 UTC ++++ demos/ErrorEstimation/CustomModel/CustomModel.cpp +@@ -2,6 +2,9 @@ + + #include "CustomModel.h" + ++char **environ = nullptr; ++const char *__progname = "x"; ++ + // Here we use the BuildOp function provided by clad to build a multiplication + // expression that clad can generate code for. + clang::Expr* CustomModel::AssignError(clad::StmtDiff refExpr, diff --git a/math/clad/files/patch-demos_ErrorEstimation_PrintModel_PrintModel.cpp b/math/clad/files/patch-demos_ErrorEstimation_PrintModel_PrintModel.cpp new file mode 100644 index 000000000000..ba2ae07083d5 --- /dev/null +++ b/math/clad/files/patch-demos_ErrorEstimation_PrintModel_PrintModel.cpp @@ -0,0 +1,16 @@ +- workaround for errors like: +- ld: error: undefined reference due to --no-allow-shlib-undefined: __progname +- >>> referenced by /lib/libc.so.7 + +--- demos/ErrorEstimation/PrintModel/PrintModel.cpp.orig 2023-07-18 14:54:11 UTC ++++ demos/ErrorEstimation/PrintModel/PrintModel.cpp +@@ -4,6 +4,9 @@ + #include "PrintModel.h" + #include "clad/Differentiator/CladUtils.h" + ++char **environ = nullptr; ++const char *__progname = "x"; ++ + // Here we use the BuildOp function provided by clad to build a multiplication + // expression that clad can generate code for. + clang::Expr* PrintModel::AssignError(clad::StmtDiff refExpr,