From nobody Mon Dec 26 06:13:19 2022 X-Original-To: dev-commits-ports-main@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 4NgSC40VtFz1LjLT; Mon, 26 Dec 2022 06:13:20 +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 4NgSC33tY0z49RB; Mon, 26 Dec 2022 06:13:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672035199; 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=EgYdAVoDS84oIwqNUtXVmzytW0CIoctUt4bJgcVfIzU=; b=fNNxkHGqERlHYhAGiXF7Z25NMs3NLGuZqakyW7FXOXfFYAOFZNcNY2oyqtyN+31GBi3EN9 k5MeY95qSKA+mQP7T76Esa9YRnwaOSOQN2/BkiSWGWDUJxud2VLwd1w1R++PclL8Pg35JM t4D66ru7t5Ixche/ZleWogBp8FHqGv66ZNFt4o1Vc63ALT+dgWzJqulZydd7Xn+e1nHe31 3VSEz/PXUuhHcyokYcAwUKIj3L2Zl9GUhlzB1++7ZF2QvPvtkRjLJZwejzzWJXE4lMUK3/ b61o29qVFc4fYxQh50fdJZWXBfk0VH3GPFEU7lBiLdqekJJGm3BhH37cN6+Mmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672035199; 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=EgYdAVoDS84oIwqNUtXVmzytW0CIoctUt4bJgcVfIzU=; b=azlQyhOF7grurd03bPFtsCKnwhtu9/Pjqt/YN1JLyrPV2MQn3wIARVf0598JrXreCft94v pXIsNBBpDvaVlacIbjU1odEhb9Ye2gJ5ILx5HP9nZA7mrSN1BF317S1n77/kE+ghjEe3pc qbefpAm+UkQ+nrjFU0KNkIjWCG1efmqLHMS5CJ8+8sCEt+4yBcXB+ctCfzfOMiqxG8TBT1 4HPwi8FsPjKEPR3rX5srteUsO36W4ck6yOlgvlWBJpnF8Dq1TwA3H9jdcRExpCKLO+Le6z mHVbedqiAckiBBI5Omd03u0OP8DNoiY21QG6lHazVMzSG31TgI+HoU7cUDnQAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672035199; a=rsa-sha256; cv=none; b=j2njlEiDZdP39hGm6a0GTp1A/Lq2D7SPu+RKDDYYGf4eL7tIsBryYIm2maZsHydcqqY1z3 +GLZ3jiZhi1fuJOf6zdqSf/NylWX/KVJxn+E5uKfwxPnMvMt3suiB0F1S7YK9qelu7Ftbf 3QRbLne7kNyaJD4ryxJrPhQCQFGVytbU/6cNQ+8Q4gWtlwhAA6UX0vhwIuDZPVUm8sFBmH MsQPSkI745UmQqGwm4NDBwqg9pl4yvWcHKLN/fBKU6DrMNg/hBW1Xj1BIuwcjTDC+ptFzS niHrL+IP7Hh4Nugqow9x3O/Ou3bXcjYDALrj3hUgP1Pa7MoAIQzy25+H1NfEQw== 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 4NgSC32jWdzLj1; Mon, 26 Dec 2022 06:13:19 +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 2BQ6DJaw099786; Mon, 26 Dec 2022 06:13:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BQ6DJiN099785; Mon, 26 Dec 2022 06:13:19 GMT (envelope-from git) Date: Mon, 26 Dec 2022 06:13:19 GMT Message-Id: <202212260613.2BQ6DJiN099785@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: 8898daafe91d - main - math/mathpresso: New port: Mathematical expression parser and JIT compiler List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@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: 8898daafe91dd1bce0fe8d09b6b80df6936c1b7e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=8898daafe91dd1bce0fe8d09b6b80df6936c1b7e commit 8898daafe91dd1bce0fe8d09b6b80df6936c1b7e Author: Yuri Victorovich AuthorDate: 2022-12-26 03:10:14 +0000 Commit: Yuri Victorovich CommitDate: 2022-12-26 06:13:13 +0000 math/mathpresso: New port: Mathematical expression parser and JIT compiler --- math/Makefile | 1 + math/mathpresso/Makefile | 34 ++++++++++++++++++++++++++++++ math/mathpresso/distinfo | 3 +++ math/mathpresso/files/patch-CMakeLists.txt | 28 ++++++++++++++++++++++++ math/mathpresso/pkg-descr | 5 +++++ 5 files changed, 71 insertions(+) diff --git a/math/Makefile b/math/Makefile index 852c866cff0c..c6374d77dabb 100644 --- a/math/Makefile +++ b/math/Makefile @@ -477,6 +477,7 @@ SUBDIR += mathlibtools SUBDIR += mathmod SUBDIR += mathomatic + SUBDIR += mathpresso SUBDIR += matio SUBDIR += matlab-installer SUBDIR += maxima diff --git a/math/mathpresso/Makefile b/math/mathpresso/Makefile new file mode 100644 index 000000000000..ca5a3da7158e --- /dev/null +++ b/math/mathpresso/Makefile @@ -0,0 +1,34 @@ +PORTNAME= mathpresso +DISTVERSION= g20211213 +CATEGORIES= math + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Mathematical expression parser and JIT compiler +WWW= https://github.com/kobalicek/mathpresso + +LICENSE= ZLIB +LICENSE_FILE= ${WRKSRC}/LICENSE.md + +LIB_DEPENDS= libasmjit.so:devel/asmjit + +USES= cmake:testing localbase:ldflags +USE_LDCONFIG= yes + +USE_GITHUB= yes +GH_ACCOUNT= kobalicek +GH_TAGNAME= 9256fa3 + +CMAKE_ARGS= -DASMJIT_CFLAGS="-I${LOCALBASE}/include" -DASMJIT_LIBS=asmjit +CMAKE_TESTING_ON= MATHPRESSO_TEST +CMAKE_TESTING_TARGET= mptest + +PLIST_FILES= include/mathpresso/mathpresso.h \ + lib/libmathpresso.so + +post-install: # workaround for https://github.com/kobalicek/mathpresso/issues/18 + ${INSTALL_LIB} ${BUILD_WRKSRC}/libmathpresso.so ${STAGEDIR}${PREFIX}/lib + +post-test: + @cd ${TEST_WRKSRC} && ./mptest + +.include diff --git a/math/mathpresso/distinfo b/math/mathpresso/distinfo new file mode 100644 index 000000000000..be3abb586e61 --- /dev/null +++ b/math/mathpresso/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1672022436 +SHA256 (kobalicek-mathpresso-g20211213-9256fa3_GH0.tar.gz) = 8c6e67abc5572ff34e6a29640089d03a63b680a5b216eda36fc8593396797f38 +SIZE (kobalicek-mathpresso-g20211213-9256fa3_GH0.tar.gz) = 53143 diff --git a/math/mathpresso/files/patch-CMakeLists.txt b/math/mathpresso/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..92d78b4abd39 --- /dev/null +++ b/math/mathpresso/files/patch-CMakeLists.txt @@ -0,0 +1,28 @@ +--- CMakeLists.txt.orig 2022-12-26 02:50:03 UTC ++++ CMakeLists.txt +@@ -13,12 +13,12 @@ if (NOT DEFINED MATHPRESSO_DIR) + set(MATHPRESSO_DIR "${CMAKE_CURRENT_LIST_DIR}") + endif() + +-if (NOT DEFINED ASMJIT_DIR) +- set(ASMJIT_DIR "${MATHPRESSO_DIR}/../asmjit") +-endif() ++#if (NOT DEFINED ASMJIT_DIR) ++# set(ASMJIT_DIR "${MATHPRESSO_DIR}/../asmjit") ++#endif() + + set(MATHPRESSO_DIR "${MATHPRESSO_DIR}" CACHE PATH "Location of 'mathpresso'") +-set(ASMJIT_DIR "${ASMJIT_DIR}" CACHE PATH "Location of 'asmjit'") ++#set(ASMJIT_DIR "${ASMJIT_DIR}" CACHE PATH "Location of 'asmjit'") + + set(MATHPRESSO_TEST FALSE CACHE BOOL "Build 'mathpresso' test applications") + set(MATHPRESSO_EMBED FALSE CACHE BOOL "Embed 'mathpresso' library (no targets)") +@@ -53,7 +53,7 @@ endif() + if (NOT DEFINED ASMJIT_EMBED) + set(ASMJIT_EMBED TRUE) + endif() +-include("${ASMJIT_DIR}/CMakeLists.txt") ++#include("${ASMJIT_DIR}/CMakeLists.txt") + + list(APPEND MATHPRESSO_DEPS ${ASMJIT_LIBS}) + list(APPEND MATHPRESSO_PRIVATE_CFLAGS "${ASMJIT_CFLAGS}") diff --git a/math/mathpresso/pkg-descr b/math/mathpresso/pkg-descr new file mode 100644 index 000000000000..11ac92a47c2a --- /dev/null +++ b/math/mathpresso/pkg-descr @@ -0,0 +1,5 @@ +MathPresso is a C++ library designed to parse mathematical expressions and +compile them into machine code. It's much faster than traditional AST or +byte-code based evaluators, because there is basically no overhead in the +expression's execution. The JIT compiler is based on AsmJit and works on +X86 and X64 architectures.