-
Notifications
You must be signed in to change notification settings - Fork 727
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
math/mathpresso: New port: Mathematical expression parser and JIT com…
…piler
- Loading branch information
Showing
5 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <bsd.port.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TIMESTAMP = 1672022436 | ||
SHA256 (kobalicek-mathpresso-g20211213-9256fa3_GH0.tar.gz) = 8c6e67abc5572ff34e6a29640089d03a63b680a5b216eda36fc8593396797f38 | ||
SIZE (kobalicek-mathpresso-g20211213-9256fa3_GH0.tar.gz) = 53143 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |