1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-04 06:15:24 +00:00

New port: math/cadabra2

Cadabra is a symbolic computer algebra system (CAS) designed
specifically for the solution of problems encountered in field
theory. It has extensive functionality for tensor computer algebra,
tensor polynomial simplification including multi-term symmetries,
fermions and anti-commuting variables, Clifford algebras and Fierz
transformations, component computations, implicit coordinate
dependence, multiple index types and many more. The input format
is a subset of TeX.

WWW: http://cadabra.science/

PR:		210476
Submitted by:	Yuri Victorovich <yuri@rawbw.com>
This commit is contained in:
Kurt Jaeger 2016-07-10 07:42:55 +00:00
parent accac76631
commit c6cef7f89b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=418304
7 changed files with 140 additions and 0 deletions

View File

@ -96,6 +96,7 @@
SUBDIR += blitz++
SUBDIR += blocksolve95
SUBDIR += bsdnt
SUBDIR += cadabra2
SUBDIR += calc
SUBDIR += calcoo
SUBDIR += calctool

65
math/cadabra2/Makefile Normal file
View File

@ -0,0 +1,65 @@
# Created by: Yuri Victorovich <yuri@rawbw.com>
# $FreeBSD$
PORTNAME= cadabra2
PORTVERSION= 2.0.816
CATEGORIES= math
MAINTAINER= yuri@rawbw.com
COMMENT= Computer algebra system for solving field theory problems
LICENSE= LGPL3
LICENSE_FILE= ${WRKSRC}/doc/license.txt
LIB_DEPENDS= libboost_python.so:devel/boost-python-libs \
libpcrecpp.so:devel/pcre \
libboost_system.so:devel/boost-libs \
libjsoncpp.so:devel/jsoncpp \
libgmp.so:math/gmp \
libuuid.so:misc/e2fsprogs-libuuid
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/sympy/__init__.py:math/py-sympy \
${PYTHON_SITELIBDIR}/matplotlib/__init__.py:math/py-matplotlib
USE_GITHUB= yes
GH_ACCOUNT= kpeeters
GH_TAGNAME= 8258bfc
BROKEN_FreeBSD_9= does not build: fatal error: 'type_traits' file not found
GUI_BROKEN= Builds but has a WebSockets communication problem in the runtime
GUI_CONFLICTS_BUILD= websocketpp-*
OPTIONS_DEFINE= GUI
USES= compiler:c++11-lang cmake gettext gmake pkgconfig python:2 sqlite
GUI_USE= GNOME=gtkmm30,gdkpixbuf2
USE_TEX= base
USE_LDCONFIG= yes
OPTIONS_SUB= yes
GUI_INSTALLS_ICONS= yes
BUILD_DEPENDS+= clang36:lang/clang36
RUN_DEPENDS+= clang36:lang/clang36
CC= clang36
CXX= clang++36
CMAKE_ARGS+= -DBOOST_ROOT=${LOCALBASE}
CMAKE_ARGS+= -DUSE_PYTHON_3:BOOL=OFF
GUI_CMAKE_ON+= -DENABLE_FRONTEND:BOOL=ON
CXXFLAGS+= -I${LOCALBASE}/include
CXXFLAGS+= -I${LOCALBASE}/include/jsoncpp
LDFLAGS+= -L${LOCALBASE}/lib -ljsoncpp
CMAKE_CXX_FLAGS=${CXXFLAGS}
CMAKE_INSTALL_PREFIX=${PREFIX}
post-extract:
${RM} -r ${WRKSRC}/client_server/jsoncpp
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cadabra2html
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cadabra-server
${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/cadabra2.so
post-install-GUI-on:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cadabra-gtk
.include <bsd.port.mk>

3
math/cadabra2/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1466580644
SHA256 (kpeeters-cadabra2-2.0.816-8258bfc_GH0.tar.gz) = ca8b8179b9745737aaa5185825b00031ec5fa79ad23f27bc287254963a17e318
SIZE (kpeeters-cadabra2-2.0.816-8258bfc_GH0.tar.gz) = 3880224

View File

@ -0,0 +1,15 @@
--- CMakeLists.txt.orig 2016-06-20 20:19:43 UTC
+++ CMakeLists.txt
@@ -107,7 +107,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PAT
add_subdirectory(core)
add_subdirectory(client_server)
-add_subdirectory(frontend)
add_subdirectory(tests)
add_subdirectory(web2 EXCLUDE_FROM_ALL)
+option(ENABLE_FRONTEND "Enable the UI frontend" OFF)
+if(ENABLE_FRONTEND)
+ add_subdirectory(frontend)
+endif()
+

View File

@ -0,0 +1,21 @@
--- client_server/CMakeLists.txt.orig 2016-06-23 23:50:35 UTC
+++ client_server/CMakeLists.txt
@@ -78,15 +78,15 @@ add_definitions("-D_WEBSOCKETPP_CPP11_ST
# Create the server library
link_directories(${UUID_LIBRARY_DIRS})
-add_library(cadabra_server SHARED Server.cc Snoop.cc jsoncpp/jsoncpp.cpp)
+add_library(cadabra_server SHARED Server.cc Snoop.cc)
target_link_libraries(cadabra_server ${Boost_LIBRARIES} ${SNOOP_LIBRARIES} sqlite3 ${UUID_LIBRARIES} ${PYTHON_LIBRARIES} )
# Create the client library.
-add_library(cadabra_client SHARED ComputeThread.cc DocumentThread.cc DataCell.cc Actions.cc popen2.cc Snoop.cc jsoncpp/jsoncpp.cpp)
+add_library(cadabra_client SHARED ComputeThread.cc DocumentThread.cc DataCell.cc Actions.cc popen2.cc Snoop.cc)
target_link_libraries(cadabra_client ${Boost_LIBRARIES} sqlite3 ${UUID_LIBRARIES} ${PYTHON_LIBRARIES})
# Create server binary
-include_directories("." "./websocketpp" "./jsoncpp")
+include_directories("." "./websocketpp")
add_executable(cadabra-server cadabra-server.cc)
add_executable(cadabra2html cadabra2html.cc DataCell.cc)
#add_executable(test_talk_to_server test_talk_to_server.cc)

10
math/cadabra2/pkg-descr Normal file
View File

@ -0,0 +1,10 @@
Cadabra is a symbolic computer algebra system (CAS) designed
specifically for the solution of problems encountered in field
theory. It has extensive functionality for tensor computer algebra,
tensor polynomial simplification including multi-term symmetries,
fermions and anti-commuting variables, Clifford algebras and Fierz
transformations, component computations, implicit coordinate
dependence, multiple index types and many more. The input format
is a subset of TeX.
WWW: http://cadabra.science/

25
math/cadabra2/pkg-plist Normal file
View File

@ -0,0 +1,25 @@
%%GUI%%bin/cadabra-gtk
bin/cadabra-server
bin/cadabra2
bin/cadabra2html
lib/libcadabra_client.so
lib/libcadabra_server.so
%%GUI%%lib/libtexengine.so
%%PYTHON_SITELIBDIR%%/cadabra2.so
%%PYTHON_SITELIBDIR%%/cadabra2_defaults.py
%%PYTHON_SITELIBDIR%%/cdb/gr.py
%%GUI%%share/applications/cadabra2.desktop
%%GUI%%%%DATADIR%%/images/cadabra2.png
%%GUI%%%%DATADIR%%/manual/algorithms/distribute.cnb
%%GUI%%share/icons/hicolor/256x256/apps/cadabra2.png
%%GUI%%share/icons/hicolor/64x64/apps/cadabra2.png
%%GUI%%share/icons/hicolor/scalable/apps/cadabra2.svg
%%GUI%%%%TEXMFLOCALDIR%%/tex/latex/cadabra2/breqn.sty
%%GUI%%%%TEXMFLOCALDIR%%/tex/latex/cadabra2/cmbase.sym
%%GUI%%%%TEXMFLOCALDIR%%/tex/latex/cadabra2/flexisym.sty
%%GUI%%%%TEXMFLOCALDIR%%/tex/latex/cadabra2/mathpazo.sym
%%GUI%%%%TEXMFLOCALDIR%%/tex/latex/cadabra2/mathptmx.sym
%%GUI%%%%TEXMFLOCALDIR%%/tex/latex/cadabra2/mathstyle.sty
%%GUI%%%%TEXMFLOCALDIR%%/tex/latex/cadabra2/msabm.sym
%%GUI%%%%TEXMFLOCALDIR%%/tex/latex/cadabra2/tableaux.sty
%%GUI%%@dir %%DATADIR%%/manual/properties