aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorpi <pi@FreeBSD.org>2016-10-21 17:01:10 +0800
committerpi <pi@FreeBSD.org>2016-10-21 17:01:10 +0800
commit7e879e64fdcd12d13ea22bc78f139ba3c1c5f7c5 (patch)
treea59f7bfade1a507774284e2d3169b7a8b42bdae3 /math
parentd0990fa5f7b78e738da7fa06b8da33608be849cb (diff)
downloadfreebsd-ports-gnome-7e879e64fdcd12d13ea22bc78f139ba3c1c5f7c5.tar.gz
freebsd-ports-gnome-7e879e64fdcd12d13ea22bc78f139ba3c1c5f7c5.tar.zst
freebsd-ports-gnome-7e879e64fdcd12d13ea22bc78f139ba3c1c5f7c5.zip
math/cadabra2: update 2.0.816 -> 2.0.930
- Unbreaks GUI by applying two patches: - Patch in boost headers to prevent EINPROGRESS mishandling https://github.com/zaphoyd/websocketpp/issues/563 - Patch in websocketpp fixing IPv4 vs. IPv6 mismatch https://github.com/zaphoyd/websocketpp/issues/587 - GUI option is made default - Clones icons for the GUI app cadabra2-gui - Adds "USE_TEX=texmf texhash" to allow for unincluded latex macros, and to make tex hash local packages installed by cadabra2 - Verified that cadabra2 GUI now works fine - it is able to run many examples from their website. PR: 213329 Submitted by: Yuri Victorovich <yuri@rawbw.com> (maintainer)
Diffstat (limited to 'math')
-rw-r--r--math/cadabra2/Makefile45
-rw-r--r--math/cadabra2/distinfo6
-rw-r--r--math/cadabra2/files/patch-CMakeLists.txt15
-rw-r--r--math/cadabra2/files/patch-override_include_boost_asio_detail_impl_socket__ops.ipp19
-rw-r--r--math/cadabra2/files/patch-override_include_websocketpp_transport_asio_endpoint.hpp20
-rw-r--r--math/cadabra2/pkg-plist76
6 files changed, 153 insertions, 28 deletions
diff --git a/math/cadabra2/Makefile b/math/cadabra2/Makefile
index 62c335ef42a0..9b6813d9b079 100644
--- a/math/cadabra2/Makefile
+++ b/math/cadabra2/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= cadabra2
-PORTVERSION= 2.0.816
-PORTREVISION= 2
+PORTVERSION= 2.0.930
CATEGORIES= math
MAINTAINER= yuri@rawbw.com
@@ -12,9 +11,12 @@ COMMENT= Computer algebra system for solving field theory problems
LICENSE= LGPL3
LICENSE_FILE= ${WRKSRC}/doc/license.txt
+PATCH_DEPENDS= ${NONEXISTENT}:devel/boost-libs:extract \
+ ${NONEXISTENT}:devel/websocketpp:extract
+BUILD_DEPENDS= ${LOCALBASE}/include/websocketpp/client.hpp:devel/websocketpp
LIB_DEPENDS= libboost_python.so:devel/boost-python-libs \
- libpcrecpp.so:devel/pcre \
libboost_system.so:devel/boost-libs \
+ libpcrecpp.so:devel/pcre \
libjsoncpp.so:devel/jsoncpp \
libgmp.so:math/gmp \
libuuid.so:misc/e2fsprogs-libuuid
@@ -23,23 +25,23 @@ RUN_DEPENDS= ${PYTHON_SITELIBDIR}/sympy/__init__.py:math/py-sympy \
USE_GITHUB= yes
GH_ACCOUNT= kpeeters
-GH_TAGNAME= 8258bfc
+GH_TAGNAME= 85ac041
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
+OPTIONS_DEFAULT=GUI
-USES= compiler:c++14-lang cmake gettext gmake pkgconfig python:2 sqlite
+USES= compiler:c++14-lang cmake gettext-runtime gmake pkgconfig python:2 sqlite
GUI_USE= GNOME=gtkmm30,gdkpixbuf2
-USE_TEX= base
+USE_TEX= base texmf texhash
USE_LDCONFIG= yes
OPTIONS_SUB= yes
GUI_INSTALLS_ICONS= yes
CMAKE_ARGS+= -DBOOST_ROOT=${LOCALBASE}
CMAKE_ARGS+= -DUSE_PYTHON_3:BOOL=OFF
+GUI_CMAKE_OFF+= -DENABLE_FRONTEND:BOOL=OFF
GUI_CMAKE_ON+= -DENABLE_FRONTEND:BOOL=ON
CXXFLAGS+= -I${LOCALBASE}/include
CXXFLAGS+= -I${LOCALBASE}/include/jsoncpp
@@ -48,7 +50,23 @@ CMAKE_CXX_FLAGS=${CXXFLAGS}
CMAKE_INSTALL_PREFIX=${PREFIX}
post-extract:
- ${RM} -r ${WRKSRC}/client_server/jsoncpp
+ @${RM} -r ${WRKSRC}/client_server/jsoncpp ${WRKSRC}/client_server/websocketpp
+
+pre-patch:
+ # workaround for https://github.com/zaphoyd/websocketpp/issues/563, so that the local patch can be applied
+ @${MKDIR} ${WRKSRC}/override/include/boost/asio/detail/impl
+ @${CP} `${MAKE} -C ${PORTSDIR}/devel/boost-libs -V WRKSRC`/boost/asio/detail/impl/socket_ops.ipp \
+ ${WRKSRC}/override/include/boost/asio/detail/impl/
+ # workaround for https://github.com/zaphoyd/websocketpp/issues/587, so that the local patch can be applied
+ @${MKDIR} ${WRKSRC}/override/include/websocketpp/transport/asio
+ @${CP} `${MAKE} -C ${PORTSDIR}/devel/websocketpp -V WRKSRC`/websocketpp/transport/asio/endpoint.hpp \
+ ${WRKSRC}/override/include/websocketpp/transport/asio/
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|"$${GIT_COMMIT_SERIAL}.$${GIT_SHORT_SHA}"|"FreeBSD port version=${PORTVERSION} tag=${GH_TAGNAME}"|' \
+ ${WRKSRC}/CMakeLists.txt
+ @${REINPLACE_CMD} -e 's|include_directories(|include_directories($${PROJECT_SOURCE_DIR}/override/include |' \
+ ${WRKSRC}/CMakeLists.txt
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cadabra2html
@@ -57,5 +75,14 @@ post-install:
post-install-GUI-on:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cadabra-gtk
+ @${GZIP_CMD} ${GZIP} < ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/cadabra2.svg \
+ > ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/cadabra2.svgz
+ @${RM} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/cadabra2.svg
+ @${LN} ${STAGEDIR}${PREFIX}/share/icons/hicolor/256x256/apps/cadabra2.png \
+ ${STAGEDIR}${PREFIX}/share/icons/hicolor/256x256/apps/cadabra-gtk.png
+ @${LN} ${STAGEDIR}${PREFIX}/share/icons/hicolor/64x64/apps/cadabra2.png \
+ ${STAGEDIR}${PREFIX}/share/icons/hicolor/64x64/apps/cadabra-gtk.png
+ @${LN} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/cadabra2.svgz \
+ ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/cadabra-gtk.svgz
.include <bsd.port.mk>
diff --git a/math/cadabra2/distinfo b/math/cadabra2/distinfo
index 3825c383d9de..f58335e3b702 100644
--- a/math/cadabra2/distinfo
+++ b/math/cadabra2/distinfo
@@ -1,3 +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
+TIMESTAMP = 1476032351
+SHA256 (kpeeters-cadabra2-2.0.930-85ac041_GH0.tar.gz) = 3d07c5e72fd3ae79214e9472d44c12e2b304ad91d992ced2377a0484a5c494b2
+SIZE (kpeeters-cadabra2-2.0.930-85ac041_GH0.tar.gz) = 3908288
diff --git a/math/cadabra2/files/patch-CMakeLists.txt b/math/cadabra2/files/patch-CMakeLists.txt
deleted file mode 100644
index cbec85133cd9..000000000000
--- a/math/cadabra2/files/patch-CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
---- 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()
-+
diff --git a/math/cadabra2/files/patch-override_include_boost_asio_detail_impl_socket__ops.ipp b/math/cadabra2/files/patch-override_include_boost_asio_detail_impl_socket__ops.ipp
new file mode 100644
index 000000000000..830cd763fa12
--- /dev/null
+++ b/math/cadabra2/files/patch-override_include_boost_asio_detail_impl_socket__ops.ipp
@@ -0,0 +1,19 @@
+--- override/include/boost/asio/detail/impl/socket_ops.ipp.orig 2016-10-09 22:39:18 UTC
++++ override/include/boost/asio/detail/impl/socket_ops.ipp
+@@ -469,7 +469,15 @@ template <typename SockLenType>
+ inline int call_connect(SockLenType msghdr::*,
+ socket_type s, const socket_addr_type* addr, std::size_t addrlen)
+ {
+- return ::connect(s, addr, (SockLenType)addrlen);
++ int res = ::connect(s, addr, (SockLenType)addrlen);
++ if (res == -1 && errno==EINPROGRESS) {
++ fd_set write_fd;
++ FD_ZERO(&write_fd);
++ FD_SET(s, &write_fd);
++ res = ::select (s+1, NULL, &write_fd,NULL,NULL);
++ res = res > 0 ? 0 : res;
++ }
++ return res;
+ }
+
+ int connect(socket_type s, const socket_addr_type* addr,
diff --git a/math/cadabra2/files/patch-override_include_websocketpp_transport_asio_endpoint.hpp b/math/cadabra2/files/patch-override_include_websocketpp_transport_asio_endpoint.hpp
new file mode 100644
index 000000000000..2bd5f5559f4e
--- /dev/null
+++ b/math/cadabra2/files/patch-override_include_websocketpp_transport_asio_endpoint.hpp
@@ -0,0 +1,20 @@
+--- override/include/websocketpp/transport/asio/endpoint.hpp.orig 2016-10-09 22:39:45 UTC
++++ override/include/websocketpp/transport/asio/endpoint.hpp
+@@ -491,7 +491,7 @@ public:
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ void listen(uint16_t port, lib::error_code & ec) {
+- listen(lib::asio::ip::tcp::v6(), port, ec);
++ listen(lib::asio::ip::tcp::v4(), port, ec);
+ }
+
+ /// Set up endpoint for listening on a port
+@@ -507,7 +507,7 @@ public:
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ void listen(uint16_t port) {
+- listen(lib::asio::ip::tcp::v6(), port);
++ listen(lib::asio::ip::tcp::v4(), port);
+ }
+
+ /// Set up endpoint for listening on a host and service (exception free)
diff --git a/math/cadabra2/pkg-plist b/math/cadabra2/pkg-plist
index 1ca554e959ab..8056eeedd06f 100644
--- a/math/cadabra2/pkg-plist
+++ b/math/cadabra2/pkg-plist
@@ -13,7 +13,10 @@ lib/libcadabra_server.so
%%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%%share/icons/hicolor/scalable/apps/cadabra2.svgz
+%%GUI%%share/icons/hicolor/256x256/apps/cadabra-gtk.png
+%%GUI%%share/icons/hicolor/64x64/apps/cadabra-gtk.png
+%%GUI%%share/icons/hicolor/scalable/apps/cadabra-gtk.svgz
%%GUI%%%%TEXMFLOCALDIR%%/tex/latex/cadabra2/breqn.sty
%%GUI%%%%TEXMFLOCALDIR%%/tex/latex/cadabra2/cmbase.sym
%%GUI%%%%TEXMFLOCALDIR%%/tex/latex/cadabra2/flexisym.sty
@@ -23,3 +26,74 @@ lib/libcadabra_server.so
%%GUI%%%%TEXMFLOCALDIR%%/tex/latex/cadabra2/msabm.sym
%%GUI%%%%TEXMFLOCALDIR%%/tex/latex/cadabra2/tableaux.sty
%%GUI%%@dir %%DATADIR%%/manual/properties
+%%GUI%%%%DATADIR%%/manual/algorithms/asym.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/canonicalise.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/collect_factors.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/collect_terms.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/combine.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/complete.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/decompose_product.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/drop_weight.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/eliminate_kronecker.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/eliminate_metric.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/epsilon_to_delta.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/evaluate.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/expand.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/expand_delta.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/expand_diracbar.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/expand_power.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/factor_in.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/factor_out.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/fierz.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/integrate_by_parts.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/join_gamma.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/keep_weight.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/product_rule.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/reduce_delta.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/rename_dummies.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/rewrite_indices.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/sort_product.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/sort_sum.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/split_gamma.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/split_index.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/substitute.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/take_match.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/unwrap.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/vary.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/young_project_product.cnb
+%%GUI%%%%DATADIR%%/manual/algorithms/young_project_tensor.cnb
+%%GUI%%%%DATADIR%%/manual/properties/Accent.cnb
+%%GUI%%%%DATADIR%%/manual/properties/AntiCommuting.cnb
+%%GUI%%%%DATADIR%%/manual/properties/AntiSymmetric.cnb
+%%GUI%%%%DATADIR%%/manual/properties/Commuting.cnb
+%%GUI%%%%DATADIR%%/manual/properties/CommutingAsProduct.cnb
+%%GUI%%%%DATADIR%%/manual/properties/CommutingAsSum.cnb
+%%GUI%%%%DATADIR%%/manual/properties/Coordinate.cnb
+%%GUI%%%%DATADIR%%/manual/properties/DAntiSymmetric.cnb
+%%GUI%%%%DATADIR%%/manual/properties/Depends.cnb
+%%GUI%%%%DATADIR%%/manual/properties/Derivative.cnb
+%%GUI%%%%DATADIR%%/manual/properties/Diagonal.cnb
+%%GUI%%%%DATADIR%%/manual/properties/DiracBar.cnb
+%%GUI%%%%DATADIR%%/manual/properties/Distributable.cnb
+%%GUI%%%%DATADIR%%/manual/properties/EpsilonTensor.cnb
+%%GUI%%%%DATADIR%%/manual/properties/FilledTableau.cnb
+%%GUI%%%%DATADIR%%/manual/properties/GammaMatrix.cnb
+%%GUI%%%%DATADIR%%/manual/properties/ImplicitIndex.cnb
+%%GUI%%%%DATADIR%%/manual/properties/IndexInherit.cnb
+%%GUI%%%%DATADIR%%/manual/properties/Indices.cnb
+%%GUI%%%%DATADIR%%/manual/properties/Integer.cnb
+%%GUI%%%%DATADIR%%/manual/properties/InverseMetric.cnb
+%%GUI%%%%DATADIR%%/manual/properties/KroneckerDelta.cnb
+%%GUI%%%%DATADIR%%/manual/properties/LaTeXForm.cnb
+%%GUI%%%%DATADIR%%/manual/properties/Metric.cnb
+%%GUI%%%%DATADIR%%/manual/properties/NonCommuting.cnb
+%%GUI%%%%DATADIR%%/manual/properties/PartialDerivative.cnb
+%%GUI%%%%DATADIR%%/manual/properties/RiemannTensor.cnb
+%%GUI%%%%DATADIR%%/manual/properties/SatisfiesBianchi.cnb
+%%GUI%%%%DATADIR%%/manual/properties/SelfAntiCommuting.cnb
+%%GUI%%%%DATADIR%%/manual/properties/SelfCommuting.cnb
+%%GUI%%%%DATADIR%%/manual/properties/SelfNonCommuting.cnb
+%%GUI%%%%DATADIR%%/manual/properties/SortOrder.cnb
+%%GUI%%%%DATADIR%%/manual/properties/Spinor.cnb
+%%GUI%%%%DATADIR%%/manual/properties/Symmetric.cnb
+%%GUI%%%%DATADIR%%/manual/properties/TableauSymmetry.cnb