Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jun 2024 14:13:00 +0200
From:      Daniel Engberg <daniel.engberg.lists@pyret.net>
To:        Thierry Thomas <thierry@FreeBSD.org>
Cc:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   Re: git: 12594e1aee7b - main - math/mathex: new port, C++  library to parse/evaluate mathematical expressions
Message-ID:  <74dfc79ede606f9424af2b0f564b01f3@mail.infomaniak.com>
In-Reply-To: <202406211115.45LBFt3m025401@gitrepo.freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On 2024-06-21T13:15:55.000+02:00, Thierry Thomas <thierry@FreeBSD.org>
wrote:

> The branch main has been updated by thierry:
> 
> URL: https://cgit.FreeBSD.org/ports/commit/?id=12594e1aee7b17507b85b8a0ee762a678b3ff79e
> 
> commit 12594e1aee7b17507b85b8a0ee762a678b3ff79e
> 
> Author:     Thierry Thomas <thierry@FreeBSD.org>
> 
> AuthorDate: 2024-06-21 09:22:25 +0000
> 
> Commit:     Thierry Thomas <thierry@FreeBSD.org>
> 
> CommitDate: 2024-06-21 11:15:52 +0000
> 
>     math/mathex: new port, C++ library to parse/evaluate mathematical expressions
> 
>     
> 
>     Remark: upstream seems inactive, but MathEx is still used by Gmsh.
> 
> ---
> 
>  math/Makefile                    |  1 +
> 
>  math/mathex/Makefile             | 44 ++++++++++++++++++++++++++++++++++++++++
> 
>  math/mathex/distinfo             |  3 +++
> 
>  math/mathex/files/patch-makefile | 22 ++++++++++++++++++++
> 
>  math/mathex/pkg-descr            |  4 ++++
> 
>  5 files changed, 74 insertions(+)
> 
> diff --git a/math/Makefile b/math/Makefile
> 
> index 44e78e22da9a..de329683fee5 100644
> 
> --- a/math/Makefile
> 
> +++ b/math/Makefile
> 
> @@ -487,6 +487,7 @@
> 
>      SUBDIR += m4rie
> 
>      SUBDIR += mate-calc
> 
>      SUBDIR += math77
> 
> +    SUBDIR += mathex
> 
>      SUBDIR += mathgl
> 
>      SUBDIR += mathicsscript
> 
>      SUBDIR += mathmod
> 
> diff --git a/math/mathex/Makefile b/math/mathex/Makefile
> 
> new file mode 100644
> 
> index 000000000000..3de5bbbd8e5a
> 
> --- /dev/null
> 
> +++ b/math/mathex/Makefile
> 
> @@ -0,0 +1,44 @@
> 
> +PORTNAME=    mathex
> 
> +DISTVERSION=    0.3-b
> 
> +CATEGORIES=    math science devel
> 
> +MASTER_SITES=    SF/sscilib/mathex
> 
> +
> 
> +MAINTAINER=    thierry@FreeBSD.org
> 
> +COMMENT=    C++ library fo parse/evaluate mathematical expression
> 
> +WWW=        https://sscilib.sourceforge.net/
> 
> +
> 
> +LICENSE=    LGPL21
> 
> +LICENSE_FILE=    ${WRKSRC}/license.txt
> 
> +
> 
> +USES=        dos2unix zip
> 
> +DOS2UNIX_FILES=    makefile
> 
> +
> 
> +WRKSRC=        ${WRKDIR}/${PORTNAME}
> 
> +MAKEFILE=    makefile
> 
> +ALL_TARGET=    ${PORTNAME}
> 
> +USE_LDCONFIG=    yes
> 
> +
> 
> +PLIST_FILES=    ${PREFIX}/include/mathex.h    \
> 
> +        ${PREFIX}/lib/lib${PORTNAME}.so    \
> 
> +        ${PREFIX}/lib/lib${PORTNAME}.so.0
> 
> +PLIST_FILES+=    ${PROGS:C|^|${PREFIX}/bin/|}
> 
> +
> 
> +PROGS=        curvetest inttest tabletest userfunctest
> 
> +
> 
> +OPTIONS_DEFINE=    EXAMPLES
> 
> +
> 
> +post-build:
> 
> +    (cd ${WRKSRC} &&    \
> 
> +    ${CXX} ${LDFLAGS} -shared -o lib${PORTNAME}.so.0 -Wl,-soname,lib${PORTNAME}.so.0 ${PORTNAME}.o)
> 
> +
> 
> +do-install:
> 
> +    ${INSTALL_DATA} ${WRKSRC}/mathex.h ${STAGEDIR}${PREFIX}/include/
> 
> +    ${INSTALL_LIB} ${WRKSRC}/lib${PORTNAME}.so.0 ${STAGEDIR}${PREFIX}/lib/
> 
> +    ${LN} -s lib${PORTNAME}.so.0 ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so
> 
> +
> 
> +do-install-EXAMPLES-on:
> 
> +.for p in ${PROGS}
> 
> +    ${INSTALL_PROGRAM} ${WRKSRC}/${p} ${STAGEDIR}${PREFIX}/bin/
> 
> +.endfor
> 
> +
> 
> +.include <bsd.port.mk> [http://bsd.port.mk>];
> 
> diff --git a/math/mathex/distinfo b/math/mathex/distinfo
> 
> new file mode 100644
> 
> index 000000000000..0d63b2aaf216
> 
> --- /dev/null
> 
> +++ b/math/mathex/distinfo
> 
> @@ -0,0 +1,3 @@
> 
> +TIMESTAMP = 1718957652
> 
> +SHA256 (mathex-0.3-b.zip [http://mathex-0.3-b.zip]) = 8b3ac4e7620e7ffe04deaae9562a37e1e1a375cf589eec06ee3e7a04ea5c9fcc
> 
> +SIZE (mathex-0.3-b.zip [http://mathex-0.3-b.zip]) = 31441
> 
> diff --git a/math/mathex/files/patch-makefile b/math/mathex/files/patch-makefile
> 
> new file mode 100644
> 
> index 000000000000..714e89ccb09a
> 
> --- /dev/null
> 
> +++ b/math/mathex/files/patch-makefile
> 
> @@ -0,0 +1,22 @@
> 
> +--- makefile.orig    2024-06-21 08:45:06 UTC
> 
> ++++ makefile
> 
> +@@ -78,9 +78,9 @@
> 
> + ##############################
> 
> + #  current compiler settings #
> 
> + ##############################
> 
> +-CC        = g++
> 
> +-CFLAGS = -Wall -ggdb -c -o
> 
> +-LFLAGS    = -ggdb -o
> 
> ++CC        = ${CXX}
> 
> ++CFLAGS += -fPIC -c -o
> 
> ++LFLAGS    = ${LDFLAGS} -o
> 
> + # for g++ link  as C++. Thus, is not need to specify stdc++
> 
> + # LIBS      = -lm  -lstdc++
> 
> + LIBS      = -lm
> 
> +@@ -162,4 +162,4 @@ clear:
> 
> + clear:
> 
> +     rm $(OBJECTS)
> 
> + 
> 
> +-# end of makefile
> 
> +\ No newline at end of file
> 
> ++# end of makefile
> 
> diff --git a/math/mathex/pkg-descr b/math/mathex/pkg-descr
> 
> new file mode 100644
> 
> index 000000000000..5b11c45a3736
> 
> --- /dev/null
> 
> +++ b/math/mathex/pkg-descr
> 
> @@ -0,0 +1,4 @@
> 
> +MathEx is a C++ library to parse/evaluate mathematical expression.
> 
> +
> 
> +It is part of the SSCILIB (Small Scientific Library), a collection of small
> 
> +library package to help development of scientific applications.

A bit cleaner and likely sustainable solution would be to import the
CMake build from Fedora/Macports which would likely remove all the
manual workarounds for upstream's Makefile.

https://src.fedoraproject.org/rpms/mathex/blob/rawhide/f/CMakeLists.txt

https://github.com/macports/macports-ports/blob/master/math/mathex/files/CMakeLists.txt

Best regards,

Daniel


[-- Attachment #2 --]
<html><body><div>On 2024-06-21T13:15:55.000+02:00, Thierry Thomas &lt;thierry@FreeBSD.org&gt; wrote:<br></div><div ><div><br></div></div><div><br></div><div class="ik_mail_quote answerContentMessage"><blockquote class="ws-ng-quote"><pre style="white-space: normal;"><div>The branch main has been updated by thierry:<br></div><div><br></div><div>URL: <a data-ik="ik-secure" rel="noopener noreferrer" class="defaultMailLink" href="https://cgit.FreeBSD.org/ports/commit/?id=12594e1aee7b17507b85b8a0ee762a678b3ff79e" target="_blank">https://cgit.FreeBSD.org/ports/commit/?id=12594e1aee7b17507b85b8a0ee762a678b3ff79e</a><br></div><div><br></div><div>commit 12594e1aee7b17507b85b8a0ee762a678b3ff79e<br></div><div>Author:     Thierry Thomas &lt;<a class="defaultMailLink" href="mailto:thierry@FreeBSD.org">thierry@FreeBSD.org</a>&gt;<br></div><div>AuthorDate: 2024-06-21 09:22:25 +0000<br></div><div>Commit:     Thierry Thomas &lt;<a class="defaultMailLink" href="mailto:thierry@FreeBSD.org">thierry@FreeBSD.org</a>&gt;<br></div><div>CommitDate: 2024-06-21 11:15:52 +0000<br></div><div><br></div><div>    math/mathex: new port, C++ library to parse/evaluate mathematical expressions<br></div><div>    <br></div><div>    Remark: upstream seems inactive, but MathEx is still used by Gmsh.<br></div><div>---<br></div><div> math/Makefile                    |  1 +<br></div><div> math/mathex/Makefile             | 44 ++++++++++++++++++++++++++++++++++++++++<br></div><div> math/mathex/distinfo             |  3 +++<br></div><div> math/mathex/files/patch-makefile | 22 ++++++++++++++++++++<br></div><div> math/mathex/pkg-descr            |  4 ++++<br></div><div> 5 files changed, 74 insertions(+)<br></div><div><br></div><div>diff --git a/math/Makefile b/math/Makefile<br></div><div>index 44e78e22da9a..de329683fee5 100644<br></div><div>--- a/math/Makefile<br></div><div>+++ b/math/Makefile<br></div><div>@@ -487,6 +487,7 @@<br></div><div>     SUBDIR += m4rie<br></div><div>     SUBDIR += mate-calc<br></div><div>     SUBDIR += math77<br></div><div>+    SUBDIR += mathex<br></div><div>     SUBDIR += mathgl<br></div><div>     SUBDIR += mathicsscript<br></div><div>     SUBDIR += mathmod<br></div><div>diff --git a/math/mathex/Makefile b/math/mathex/Makefile<br></div><div>new file mode 100644<br></div><div>index 000000000000..3de5bbbd8e5a<br></div><div>--- /dev/null<br></div><div>+++ b/math/mathex/Makefile<br></div><div>@@ -0,0 +1,44 @@<br></div><div>+PORTNAME=	mathex<br></div><div>+DISTVERSION=	0.3-b<br></div><div>+CATEGORIES=	math science devel<br></div><div>+MASTER_SITES=	SF/sscilib/mathex<br></div><div>+<br></div><div>+MAINTAINER=	<a class="defaultMailLink" href="mailto:thierry@FreeBSD.org">thierry@FreeBSD.org</a><br></div><div>+COMMENT=	C++ library fo parse/evaluate mathematical expression<br></div><div>+WWW=		<a data-ik="ik-secure" rel="noopener noreferrer" class="defaultMailLink" href="https://sscilib.sourceforge.net/" target="_blank">https://sscilib.sourceforge.net/</a><br></div><div>+<br></div><div>+LICENSE=	LGPL21<br></div><div>+LICENSE_FILE=	${WRKSRC}/license.txt<br></div><div>+<br></div><div>+USES=		dos2unix zip<br></div><div>+DOS2UNIX_FILES=	makefile<br></div><div>+<br></div><div>+WRKSRC=		${WRKDIR}/${PORTNAME}<br></div><div>+MAKEFILE=	makefile<br></div><div>+ALL_TARGET=	${PORTNAME}<br></div><div>+USE_LDCONFIG=	yes<br></div><div>+<br></div><div>+PLIST_FILES=	${PREFIX}/include/mathex.h	\<br></div><div>+		${PREFIX}/lib/lib${PORTNAME}.so	\<br></div><div>+		${PREFIX}/lib/lib${PORTNAME}.so.0<br></div><div>+PLIST_FILES+=	${PROGS:C|^|${PREFIX}/bin/|}<br></div><div>+<br></div><div>+PROGS=		curvetest inttest tabletest userfunctest<br></div><div>+<br></div><div>+OPTIONS_DEFINE=	EXAMPLES<br></div><div>+<br></div><div>+post-build:<br></div><div>+	(cd ${WRKSRC} &amp;&amp;	\<br></div><div>+	${CXX} ${LDFLAGS} -shared -o lib${PORTNAME}.so.0 -Wl,-soname,lib${PORTNAME}.so.0 ${PORTNAME}.o)<br></div><div>+<br></div><div>+do-install:<br></div><div>+	${INSTALL_DATA} ${WRKSRC}/mathex.h ${STAGEDIR}${PREFIX}/include/<br></div><div>+	${INSTALL_LIB} ${WRKSRC}/lib${PORTNAME}.so.0 ${STAGEDIR}${PREFIX}/lib/<br></div><div>+	${LN} -s lib${PORTNAME}.so.0 ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}.so<br></div><div>+<br></div><div>+do-install-EXAMPLES-on:<br></div><div>+.for p in ${PROGS}<br></div><div>+	${INSTALL_PROGRAM} ${WRKSRC}/${p} ${STAGEDIR}${PREFIX}/bin/<br></div><div>+.endfor<br></div><div>+<br></div><div>+.include &lt;<a data-ik="ik-secure" rel="noopener noreferrer" class="defaultMailLink" href="http://bsd.port.mk>" target="_blank">bsd.port.mk&gt;</a>;<br></div><div>diff --git a/math/mathex/distinfo b/math/mathex/distinfo<br></div><div>new file mode 100644<br></div><div>index 000000000000..0d63b2aaf216<br></div><div>--- /dev/null<br></div><div>+++ b/math/mathex/distinfo<br></div><div>@@ -0,0 +1,3 @@<br></div><div>+TIMESTAMP = 1718957652<br></div><div>+SHA256 (<a data-ik="ik-secure" rel="noopener noreferrer" class="defaultMailLink" href="http://mathex-0.3-b.zip" target="_blank">mathex-0.3-b.zip</a>) = 8b3ac4e7620e7ffe04deaae9562a37e1e1a375cf589eec06ee3e7a04ea5c9fcc<br></div><div>+SIZE (<a data-ik="ik-secure" rel="noopener noreferrer" class="defaultMailLink" href="http://mathex-0.3-b.zip" target="_blank">mathex-0.3-b.zip</a>) = 31441<br></div><div>diff --git a/math/mathex/files/patch-makefile b/math/mathex/files/patch-makefile<br></div><div>new file mode 100644<br></div><div>index 000000000000..714e89ccb09a<br></div><div>--- /dev/null<br></div><div>+++ b/math/mathex/files/patch-makefile<br></div><div>@@ -0,0 +1,22 @@<br></div><div>+--- makefile.orig	2024-06-21 08:45:06 UTC<br></div><div>++++ makefile<br></div><div>+@@ -78,9 +78,9 @@<br></div><div>+ ##############################<br></div><div>+ #  current compiler settings #<br></div><div>+ ##############################<br></div><div>+-CC        = g++<br></div><div>+-CFLAGS = -Wall -ggdb -c -o<br></div><div>+-LFLAGS    = -ggdb -o<br></div><div>++CC        = ${CXX}<br></div><div>++CFLAGS += -fPIC -c -o<br></div><div>++LFLAGS    = ${LDFLAGS} -o<br></div><div>+ # for g++ link  as C++. Thus, is not need to specify stdc++<br></div><div>+ # LIBS      = -lm  -lstdc++<br></div><div>+ LIBS      = -lm<br></div><div>+@@ -162,4 +162,4 @@ clear:<br></div><div>+ clear:<br></div><div>+ 	rm $(OBJECTS)<br></div><div>+ <br></div><div>+-# end of makefile<br></div><div>+\ No newline at end of file<br></div><div>++# end of makefile<br></div><div>diff --git a/math/mathex/pkg-descr b/math/mathex/pkg-descr<br></div><div>new file mode 100644<br></div><div>index 000000000000..5b11c45a3736<br></div><div>--- /dev/null<br></div><div>+++ b/math/mathex/pkg-descr<br></div><div>@@ -0,0 +1,4 @@<br></div><div>+MathEx is a C++ library to parse/evaluate mathematical expression.<br></div><div>+<br></div><div>+It is part of the SSCILIB (Small Scientific Library), a collection of small<br></div><div>+library package to help development of scientific applications.<br></div></pre></blockquote></div><div>A bit cleaner and likely sustainable solution would be to import the CMake build from Fedora/Macports which would likely remove all the manual workarounds for upstream's Makefile.<br></div><div><br></div><div><a href="https://src.fedoraproject.org/rpms/mathex/blob/rawhide/f/CMakeLists.txt" target="_blank" rel="noopener noreferrer" data-ik="ik-secure">https://src.fedoraproject.org/rpms/mathex/blob/rawhide/f/CMakeLists.txt</a><br></div><div><a href="https://github.com/macports/macports-ports/blob/master/math/mathex/files/CMakeLists.txt" target="_blank" rel="noopener noreferrer" data-ik="ik-secure">https://github.com/macports/macports-ports/blob/master/math/mathex/files/CMakeLists.txt</a><br></div><div><br></div><div>Best regards,<br></div><div>Daniel<br></div></body></html>

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?74dfc79ede606f9424af2b0f564b01f3>