aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-11-03 13:20:48 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-11-03 13:20:48 +0000
commitc35a178b34a2bf8d5d265fba5060c97ad629f558 (patch)
treef830f584e6a995defe51795f53960b567d466905
parentf452d7b439d3ecb03464b87ccffc21a1b407e724 (diff)
math/rubygem-cmath: Add rubygem-cmath 1.0.0
CMath provides trigonometric and transcendental functions for complex numbers. CMath is a library that provides trigonometric and transcendental functions for complex numbers. The functions in this module accept integers, floating-point numbers or complex numbers as arguments. Note that the selection of functions is similar, but not identical, to that in module math. The reason for having two modules is that some users aren't interested in complex numbers, and perhaps don't even know what they are. They would rather have Math.sqrt(-1) raise an exception than return a complex number.
-rw-r--r--math/Makefile1
-rw-r--r--math/rubygem-cmath/Makefile16
-rw-r--r--math/rubygem-cmath/distinfo3
-rw-r--r--math/rubygem-cmath/pkg-descr10
4 files changed, 30 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index e96538f03292..f8856007cf80 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -1140,6 +1140,7 @@
SUBDIR += rubiks
SUBDIR += rubygem-algebra
SUBDIR += rubygem-bigdecimal
+ SUBDIR += rubygem-cmath
SUBDIR += rubygem-enumerable-statistics
SUBDIR += rubygem-expression_parser
SUBDIR += rubygem-fftw3
diff --git a/math/rubygem-cmath/Makefile b/math/rubygem-cmath/Makefile
new file mode 100644
index 000000000000..8b606e61925d
--- /dev/null
+++ b/math/rubygem-cmath/Makefile
@@ -0,0 +1,16 @@
+PORTNAME= cmath
+PORTVERSION= 1.0.0
+CATEGORIES= math rubygems
+MASTER_SITES= RG
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Provide trigonometric and transcendental functions for complex number
+WWW= https://github.com/ruby/cmath
+
+LICENSE= BSD2CLAUSE
+
+USES= gem
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/math/rubygem-cmath/distinfo b/math/rubygem-cmath/distinfo
new file mode 100644
index 000000000000..291da57be0a4
--- /dev/null
+++ b/math/rubygem-cmath/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1730540892
+SHA256 (rubygem/cmath-1.0.0.gem) = 152d2b90edb33765d7fa0f7c9f650d9a6661382804add8ee6e4bce0b7d377ff6
+SIZE (rubygem/cmath-1.0.0.gem) = 6656
diff --git a/math/rubygem-cmath/pkg-descr b/math/rubygem-cmath/pkg-descr
new file mode 100644
index 000000000000..31a1ef2a6de7
--- /dev/null
+++ b/math/rubygem-cmath/pkg-descr
@@ -0,0 +1,10 @@
+CMath provides trigonometric and transcendental functions for complex numbers.
+
+CMath is a library that provides trigonometric and transcendental functions for
+complex numbers. The functions in this module accept integers, floating-point
+numbers or complex numbers as arguments.
+
+Note that the selection of functions is similar, but not identical, to that in
+module math. The reason for having two modules is that some users aren't
+interested in complex numbers, and perhaps don't even know what they are. They
+would rather have Math.sqrt(-1) raise an exception than return a complex number.