* Re: More math libraries and tools
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
@ 2021-04-06 3:53 ` abenson
2021-04-06 5:05 ` Math packages: gf2x, ntl, flintlib, arb, eclib tornaria
` (68 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: abenson @ 2021-04-06 3:53 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 276 bytes --]
New comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-813802609
Comment:
> This continues #29997.
Just add to that one. At this point the two conflict -- it's easier to track when it's all in the same PR.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
2021-04-06 3:53 ` abenson
@ 2021-04-06 5:05 ` tornaria
2021-04-06 5:05 ` tornaria
` (67 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-04-06 5:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 353 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-813824490
Comment:
> > This continues #29997.
>
> Just add to that one. At this point the two conflict -- it's easier to track when it's all in the same PR.
You are right. I rebased in several different and independent PR.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
2021-04-06 3:53 ` abenson
2021-04-06 5:05 ` Math packages: gf2x, ntl, flintlib, arb, eclib tornaria
@ 2021-04-06 5:05 ` tornaria
2021-04-07 12:53 ` dkwo
` (66 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-04-06 5:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 392 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-813824490
Comment:
> > This continues #29997.
>
> Just add to that one. At this point the two conflict -- it's easier to track when it's all in the same PR.
You are right. I rebased in several different and independent PR, I hope that makes it easier to review.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (2 preceding siblings ...)
2021-04-06 5:05 ` tornaria
@ 2021-04-07 12:53 ` dkwo
2021-04-09 2:10 ` [PR PATCH] [Updated] " tornaria
` (65 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2021-04-07 12:53 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 188 bytes --]
New comment by dkwo on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-814889375
Comment:
I did not test `eclib`, the rest looks good to me.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR PATCH] [Updated] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (3 preceding siblings ...)
2021-04-07 12:53 ` dkwo
@ 2021-04-09 2:10 ` tornaria
2021-05-13 17:57 ` tornaria
` (64 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-04-09 2:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages math2
https://github.com/void-linux/void-packages/pull/30032
Math packages: gf2x, ntl, flintlib, arb, eclib
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
#### Notes
- This includes: `gf2x` (see also #29783), `ntl`, `flintlib`, `arb`, `eclib`.
- Everything is tested and check pass in x86_64, x86_64-musl, i686.
EDIT: split in smaller independent PR to ease review.
A patch file from https://github.com/void-linux/void-packages/pull/30032.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-math2-30032.patch --]
[-- Type: text/x-diff, Size: 16781 bytes --]
From 5bc4f34cd2443f9327426ead3fe6915c6e8863b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 29 Jan 2018 11:18:35 -0300
Subject: [PATCH 1/6] New package: gf2x-1.3.0
---
common/shlibs | 1 +
srcpkgs/gf2x-devel | 1 +
srcpkgs/gf2x/template | 34 ++++++++++++++++++++++++++++++++++
srcpkgs/gf2x/update | 1 +
4 files changed, 37 insertions(+)
create mode 120000 srcpkgs/gf2x-devel
create mode 100644 srcpkgs/gf2x/template
create mode 100644 srcpkgs/gf2x/update
diff --git a/common/shlibs b/common/shlibs
index 9aa0a601250b..e017738d0e2f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3958,6 +3958,7 @@ libsimavrparts.so.1 simavr-1.6_2
libsword-1.8.1.so libsword-1.8.1_6
libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
+libgf2x.so.3 gf2x-1.3.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/gf2x-devel b/srcpkgs/gf2x-devel
new file mode 120000
index 000000000000..4542295e8de7
--- /dev/null
+++ b/srcpkgs/gf2x-devel
@@ -0,0 +1 @@
+gf2x
\ No newline at end of file
diff --git a/srcpkgs/gf2x/template b/srcpkgs/gf2x/template
new file mode 100644
index 000000000000..e9267578a2c6
--- /dev/null
+++ b/srcpkgs/gf2x/template
@@ -0,0 +1,34 @@
+# Template file for 'gf2x'
+pkgname=gf2x
+version=1.3.0
+revision=1
+wrksrc=gf2x-gf2x-${version}
+build_style="gnu-configure"
+hostmakedepends="automake libtool"
+short_desc="C/C++ library for fast arithmetic in GF(2)[x]"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.inria.fr/gf2x/gf2x"
+distfiles="https://gitlab.inria.fr/gf2x/gf2x/-/archive/gf2x-${version}/gf2x-gf2x-${version}.tar.gz"
+checksum=11bcf98b620c60c2ee3b4460b02b7be741f14cfdc26b542f22c92950926575e0
+
+build_options="native"
+
+if [ ! "$build_option_native" ]; then
+ configure_args="--disable-sse3"
+fi
+
+pre_configure() {
+ autoreconf -fi
+}
+
+gf2x-devel_package() {
+ depends="gf2x-${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/pkgconfig"
+ }
+}
diff --git a/srcpkgs/gf2x/update b/srcpkgs/gf2x/update
new file mode 100644
index 000000000000..504503610161
--- /dev/null
+++ b/srcpkgs/gf2x/update
@@ -0,0 +1 @@
+pkgname=gf2x-gf2x
From 4dfba65ff80f797989a0ac910377b00fec8d3bd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 30 Jan 2018 11:02:38 -0300
Subject: [PATCH 2/6] New package: ntl-11.4.4
---
common/shlibs | 1 +
srcpkgs/ntl-devel | 1 +
srcpkgs/ntl/template | 36 ++++++++++++++++++++++++++++++++++++
srcpkgs/ntl/update | 1 +
4 files changed, 39 insertions(+)
create mode 120000 srcpkgs/ntl-devel
create mode 100644 srcpkgs/ntl/template
create mode 100644 srcpkgs/ntl/update
diff --git a/common/shlibs b/common/shlibs
index e017738d0e2f..6fd7cbd1d29d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3959,6 +3959,7 @@ libsword-1.8.1.so libsword-1.8.1_6
libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgf2x.so.3 gf2x-1.3.0_1
+libntl.so.43 ntl-11.4.4_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/ntl-devel b/srcpkgs/ntl-devel
new file mode 120000
index 000000000000..fc0a39987329
--- /dev/null
+++ b/srcpkgs/ntl-devel
@@ -0,0 +1 @@
+ntl
\ No newline at end of file
diff --git a/srcpkgs/ntl/template b/srcpkgs/ntl/template
new file mode 100644
index 000000000000..e140298eb559
--- /dev/null
+++ b/srcpkgs/ntl/template
@@ -0,0 +1,36 @@
+# Template file for 'ntl'
+pkgname=ntl
+version=11.4.4
+revision=1
+build_wrksrc="src"
+build_style="configure"
+hostmakedepends="perl"
+makedepends="gmp-devel gf2x-devel"
+short_desc="Library for doing Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://libntl.org"
+distfiles="https://libntl.org/ntl-${version}.tar.gz"
+checksum=9d7f6e82e11a409f151c0de2deb08c0d763baf9834fddfd432bf3d218f8021db
+nocross=yes
+
+build_options="native"
+
+do_configure() {
+ # see http://www.shoup.net/ntl/doc/tour-unix.html
+ ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" \
+ PREFIX="/usr" SHARED="on" NTL_GF2X_LIB="on" \
+ NATIVE="$(vopt_if native 'on' 'off')"
+}
+
+ntl-devel_package() {
+ depends="ntl-${version}_${revision}"
+ depends+=" gmp-devel gf2x-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/share"
+ }
+}
diff --git a/srcpkgs/ntl/update b/srcpkgs/ntl/update
new file mode 100644
index 000000000000..8ccb86344234
--- /dev/null
+++ b/srcpkgs/ntl/update
@@ -0,0 +1 @@
+site="${homepage}/download.html"
From 4e05b666b7936fd3bbeb41d3115ca10a4885ed59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 2 Feb 2018 22:42:49 -0300
Subject: [PATCH 3/6] New package: flintlib-2.7.1
---
common/shlibs | 1 +
srcpkgs/flintlib-devel | 1 +
srcpkgs/flintlib/template | 30 ++++++++++++++++++++++++++++++
srcpkgs/flintlib/update | 2 ++
4 files changed, 34 insertions(+)
create mode 120000 srcpkgs/flintlib-devel
create mode 100644 srcpkgs/flintlib/template
create mode 100644 srcpkgs/flintlib/update
diff --git a/common/shlibs b/common/shlibs
index 6fd7cbd1d29d..257b2423ef48 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3960,6 +3960,7 @@ libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
+libflint.so.15 flintlib-2.7.1_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/flintlib-devel b/srcpkgs/flintlib-devel
new file mode 120000
index 000000000000..7c2633183069
--- /dev/null
+++ b/srcpkgs/flintlib-devel
@@ -0,0 +1 @@
+flintlib
\ No newline at end of file
diff --git a/srcpkgs/flintlib/template b/srcpkgs/flintlib/template
new file mode 100644
index 000000000000..149cb66f3187
--- /dev/null
+++ b/srcpkgs/flintlib/template
@@ -0,0 +1,30 @@
+# Template file for 'flintlib'
+pkgname=flintlib
+version=2.7.1
+revision=1
+wrksrc="flint-${version}"
+build_style="configure"
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-ntl=/usr"
+makedepends="mpfr-devel ntl-devel"
+short_desc="Fast Library for Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://flintlib.org"
+distfiles="https://flintlib.org/flint-${version}.tar.gz"
+checksum=186e2fd9ab67df8a05b122fb018269b382e4babcdb17353c4be1fe364dca481e
+nocross=yes
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ CFLAGS="-D_GNU_SOURCE"
+fi
+
+flintlib-devel_package() {
+ depends="flintlib-${version}_${revision}"
+ depends+=" mpfr-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/flintlib/update b/srcpkgs/flintlib/update
new file mode 100644
index 000000000000..8eee53cf22f2
--- /dev/null
+++ b/srcpkgs/flintlib/update
@@ -0,0 +1,2 @@
+pkgname=flint
+site="${homepage}/downloads.html"
From 21b2fd43fe75fa16ff2e89709311fc4f8e2ae11a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 4 Feb 2018 01:00:19 -0300
Subject: [PATCH 4/6] New package: arb-2.19.0
---
common/shlibs | 1 +
srcpkgs/arb-devel | 1 +
srcpkgs/arb/template | 29 +++++++++++++++++++++++++++++
3 files changed, 31 insertions(+)
create mode 120000 srcpkgs/arb-devel
create mode 100644 srcpkgs/arb/template
diff --git a/common/shlibs b/common/shlibs
index 257b2423ef48..85a262ec5070 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3961,6 +3961,7 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
libflint.so.15 flintlib-2.7.1_1
+libarb.so.2 arb-2.19.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/arb-devel b/srcpkgs/arb-devel
new file mode 120000
index 000000000000..456b9f00a86c
--- /dev/null
+++ b/srcpkgs/arb-devel
@@ -0,0 +1 @@
+arb
\ No newline at end of file
diff --git a/srcpkgs/arb/template b/srcpkgs/arb/template
new file mode 100644
index 000000000000..7c7df0aace15
--- /dev/null
+++ b/srcpkgs/arb/template
@@ -0,0 +1,29 @@
+# Template file for 'arb'
+pkgname=arb
+version=2.19.0
+revision=1
+build_style="configure"
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
+makedepends="flintlib-devel"
+short_desc="C library for arbitrary-precision interval arithmetic"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://arblib.org"
+distfiles="https://github.com/fredrik-johansson/arb/archive/${version}.tar.gz"
+checksum=0aec6b492b6e9a543bdb3287a91f976951e2ba74fd4de942e692e21f7edbcf13
+nocross=yes
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ CFLAGS="-D_GNU_SOURCE"
+fi
+
+arb-devel_package() {
+ depends="arb-${version}_${revision}"
+ depends+=" flintlib-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From e1713d4cbc323267e5ce3b4e92a22822f685496c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 1 Jun 2020 14:50:01 -0300
Subject: [PATCH 5/6] New package: eclib-20210318
---
common/shlibs | 1 +
srcpkgs/eclib-devel | 1 +
srcpkgs/eclib/patches/set_precision.patch | 34 +++++++++++++++++++++++
srcpkgs/eclib/template | 30 ++++++++++++++++++++
4 files changed, 66 insertions(+)
create mode 120000 srcpkgs/eclib-devel
create mode 100644 srcpkgs/eclib/patches/set_precision.patch
create mode 100644 srcpkgs/eclib/template
diff --git a/common/shlibs b/common/shlibs
index 85a262ec5070..274e456db446 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3962,6 +3962,7 @@ libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
libflint.so.15 flintlib-2.7.1_1
libarb.so.2 arb-2.19.0_1
+libec.so.7 eclib-20210318_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/eclib-devel b/srcpkgs/eclib-devel
new file mode 120000
index 000000000000..d29e610e9249
--- /dev/null
+++ b/srcpkgs/eclib-devel
@@ -0,0 +1 @@
+eclib
\ No newline at end of file
diff --git a/srcpkgs/eclib/patches/set_precision.patch b/srcpkgs/eclib/patches/set_precision.patch
new file mode 100644
index 000000000000..d1b6072ff399
--- /dev/null
+++ b/srcpkgs/eclib/patches/set_precision.patch
@@ -0,0 +1,34 @@
+This changes 0.3 by 0.3L, otherwise tests fail in i686 due to different rounding.
+
+See: https://github.com/JohnCremona/eclib/issues/68
+
+--- libsrc/eclib/interface.h 2021-03-18 12:22:52.000000000 -0300
++++ libsrc/eclib/interface.h 2021-04-05 15:15:52.355310137 -0300
+@@ -240,7 +240,7 @@
+
+ // Set internal precision to n bits and output precision to (0.3*n)-1 decimal places
+ inline void set_precision(long n)
+-{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3*n)-1);}
++{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3L*n)-1);}
+
+ // Mostly for backward compatibility (used in saturate.cc) or for
+ // temporarily changing internal precision when no output is relevant:
+@@ -252,7 +252,7 @@
+ {long n; cerr<<prompt<<": "; cin>>n; set_precision(n);}
+
+ // read current precision converted to decimal (approximately)
+-inline long decimal_precision() {return long(RR::precision()*0.3);}
++inline long decimal_precision() {return long(RR::precision()*0.3L);}
+
+ // read current bit precision
+ inline long bit_precision() {return RR::precision();}
+@@ -289,7 +289,7 @@
+ inline int is_approx_zero(double x) {return fabs(x)<1e-10;}
+
+ // We cannot set internal bit precision in this mode, so we just set the output decimal precision
+-inline void set_precision(long n) {cout.precision(min(15,long(0.3*n)));}
++inline void set_precision(long n) {cout.precision(min(15,long(0.3L*n)));}
+ inline void set_precision(const string prompt) {cout.precision(15);}
+ #define Pi() 3.1415926535897932384626433832795028841
+ #define Euler() (0.57721566490153286060651209008240243104)
+
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
new file mode 100644
index 000000000000..e545d06eb5e4
--- /dev/null
+++ b/srcpkgs/eclib/template
@@ -0,0 +1,30 @@
+# Template file for 'eclib'
+pkgname=eclib
+version=20210318
+revision=1
+build_style=gnu-configure
+configure_args="--with-flint --with-boost"
+hostmakedepends="automake autoconf-archive libtool"
+makedepends="pari-devel ntl-devel flintlib-devel boost-devel"
+short_desc="Elliptic curve library, includes mwrank"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/JohnCremona/eclib"
+distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
+checksum=8ca611e818cc3acdd54c800be66f66219a52603516bff048d350dd1e95605484
+
+pre_configure() {
+ ./autogen.sh
+}
+
+eclib-devel_package() {
+ depends="eclib-${version}_${revision}"
+ depends+=" ntl-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/pkgconfig"
+ }
+}
From 489dd593d2f64e456d5658f5c79b979a7cf3d901 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 8 Apr 2021 22:58:13 -0300
Subject: [PATCH 6/6] eclib: update to 20210408.
---
srcpkgs/eclib/patches/set_precision.patch | 34 -----------------------
srcpkgs/eclib/template | 4 +--
2 files changed, 2 insertions(+), 36 deletions(-)
delete mode 100644 srcpkgs/eclib/patches/set_precision.patch
diff --git a/srcpkgs/eclib/patches/set_precision.patch b/srcpkgs/eclib/patches/set_precision.patch
deleted file mode 100644
index d1b6072ff399..000000000000
--- a/srcpkgs/eclib/patches/set_precision.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-This changes 0.3 by 0.3L, otherwise tests fail in i686 due to different rounding.
-
-See: https://github.com/JohnCremona/eclib/issues/68
-
---- libsrc/eclib/interface.h 2021-03-18 12:22:52.000000000 -0300
-+++ libsrc/eclib/interface.h 2021-04-05 15:15:52.355310137 -0300
-@@ -240,7 +240,7 @@
-
- // Set internal precision to n bits and output precision to (0.3*n)-1 decimal places
- inline void set_precision(long n)
--{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3*n)-1);}
-+{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3L*n)-1);}
-
- // Mostly for backward compatibility (used in saturate.cc) or for
- // temporarily changing internal precision when no output is relevant:
-@@ -252,7 +252,7 @@
- {long n; cerr<<prompt<<": "; cin>>n; set_precision(n);}
-
- // read current precision converted to decimal (approximately)
--inline long decimal_precision() {return long(RR::precision()*0.3);}
-+inline long decimal_precision() {return long(RR::precision()*0.3L);}
-
- // read current bit precision
- inline long bit_precision() {return RR::precision();}
-@@ -289,7 +289,7 @@
- inline int is_approx_zero(double x) {return fabs(x)<1e-10;}
-
- // We cannot set internal bit precision in this mode, so we just set the output decimal precision
--inline void set_precision(long n) {cout.precision(min(15,long(0.3*n)));}
-+inline void set_precision(long n) {cout.precision(min(15,long(0.3L*n)));}
- inline void set_precision(const string prompt) {cout.precision(15);}
- #define Pi() 3.1415926535897932384626433832795028841
- #define Euler() (0.57721566490153286060651209008240243104)
-
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
index e545d06eb5e4..542ae4aae14f 100644
--- a/srcpkgs/eclib/template
+++ b/srcpkgs/eclib/template
@@ -1,6 +1,6 @@
# Template file for 'eclib'
pkgname=eclib
-version=20210318
+version=20210408
revision=1
build_style=gnu-configure
configure_args="--with-flint --with-boost"
@@ -11,7 +11,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://github.com/JohnCremona/eclib"
distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
-checksum=8ca611e818cc3acdd54c800be66f66219a52603516bff048d350dd1e95605484
+checksum=5354ea8edfedff7f10adeb8c5f8f3705dbeccb56e2840ab1eb2b3fad981c0e22
pre_configure() {
./autogen.sh
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR PATCH] [Updated] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (4 preceding siblings ...)
2021-04-09 2:10 ` [PR PATCH] [Updated] " tornaria
@ 2021-05-13 17:57 ` tornaria
2021-05-13 18:25 ` tornaria
` (63 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-05-13 17:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages math2
https://github.com/void-linux/void-packages/pull/30032
Math packages: gf2x, ntl, flintlib, arb, eclib
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
#### Notes
- This includes: `gf2x` (see also #29783), `ntl`, `flintlib`, `arb`, `eclib`.
- Everything is tested and check pass in x86_64, x86_64-musl, i686.
EDIT: split in smaller independent PR to ease review.
A patch file from https://github.com/void-linux/void-packages/pull/30032.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-math2-30032.patch --]
[-- Type: text/x-diff, Size: 16781 bytes --]
From 5bc4f34cd2443f9327426ead3fe6915c6e8863b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 29 Jan 2018 11:18:35 -0300
Subject: [PATCH 1/6] New package: gf2x-1.3.0
---
common/shlibs | 1 +
srcpkgs/gf2x-devel | 1 +
srcpkgs/gf2x/template | 34 ++++++++++++++++++++++++++++++++++
srcpkgs/gf2x/update | 1 +
4 files changed, 37 insertions(+)
create mode 120000 srcpkgs/gf2x-devel
create mode 100644 srcpkgs/gf2x/template
create mode 100644 srcpkgs/gf2x/update
diff --git a/common/shlibs b/common/shlibs
index 9aa0a601250b..e017738d0e2f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3958,6 +3958,7 @@ libsimavrparts.so.1 simavr-1.6_2
libsword-1.8.1.so libsword-1.8.1_6
libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
+libgf2x.so.3 gf2x-1.3.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/gf2x-devel b/srcpkgs/gf2x-devel
new file mode 120000
index 000000000000..4542295e8de7
--- /dev/null
+++ b/srcpkgs/gf2x-devel
@@ -0,0 +1 @@
+gf2x
\ No newline at end of file
diff --git a/srcpkgs/gf2x/template b/srcpkgs/gf2x/template
new file mode 100644
index 000000000000..e9267578a2c6
--- /dev/null
+++ b/srcpkgs/gf2x/template
@@ -0,0 +1,34 @@
+# Template file for 'gf2x'
+pkgname=gf2x
+version=1.3.0
+revision=1
+wrksrc=gf2x-gf2x-${version}
+build_style="gnu-configure"
+hostmakedepends="automake libtool"
+short_desc="C/C++ library for fast arithmetic in GF(2)[x]"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.inria.fr/gf2x/gf2x"
+distfiles="https://gitlab.inria.fr/gf2x/gf2x/-/archive/gf2x-${version}/gf2x-gf2x-${version}.tar.gz"
+checksum=11bcf98b620c60c2ee3b4460b02b7be741f14cfdc26b542f22c92950926575e0
+
+build_options="native"
+
+if [ ! "$build_option_native" ]; then
+ configure_args="--disable-sse3"
+fi
+
+pre_configure() {
+ autoreconf -fi
+}
+
+gf2x-devel_package() {
+ depends="gf2x-${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/pkgconfig"
+ }
+}
diff --git a/srcpkgs/gf2x/update b/srcpkgs/gf2x/update
new file mode 100644
index 000000000000..504503610161
--- /dev/null
+++ b/srcpkgs/gf2x/update
@@ -0,0 +1 @@
+pkgname=gf2x-gf2x
From 4dfba65ff80f797989a0ac910377b00fec8d3bd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 30 Jan 2018 11:02:38 -0300
Subject: [PATCH 2/6] New package: ntl-11.4.4
---
common/shlibs | 1 +
srcpkgs/ntl-devel | 1 +
srcpkgs/ntl/template | 36 ++++++++++++++++++++++++++++++++++++
srcpkgs/ntl/update | 1 +
4 files changed, 39 insertions(+)
create mode 120000 srcpkgs/ntl-devel
create mode 100644 srcpkgs/ntl/template
create mode 100644 srcpkgs/ntl/update
diff --git a/common/shlibs b/common/shlibs
index e017738d0e2f..6fd7cbd1d29d 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3959,6 +3959,7 @@ libsword-1.8.1.so libsword-1.8.1_6
libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgf2x.so.3 gf2x-1.3.0_1
+libntl.so.43 ntl-11.4.4_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/ntl-devel b/srcpkgs/ntl-devel
new file mode 120000
index 000000000000..fc0a39987329
--- /dev/null
+++ b/srcpkgs/ntl-devel
@@ -0,0 +1 @@
+ntl
\ No newline at end of file
diff --git a/srcpkgs/ntl/template b/srcpkgs/ntl/template
new file mode 100644
index 000000000000..e140298eb559
--- /dev/null
+++ b/srcpkgs/ntl/template
@@ -0,0 +1,36 @@
+# Template file for 'ntl'
+pkgname=ntl
+version=11.4.4
+revision=1
+build_wrksrc="src"
+build_style="configure"
+hostmakedepends="perl"
+makedepends="gmp-devel gf2x-devel"
+short_desc="Library for doing Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://libntl.org"
+distfiles="https://libntl.org/ntl-${version}.tar.gz"
+checksum=9d7f6e82e11a409f151c0de2deb08c0d763baf9834fddfd432bf3d218f8021db
+nocross=yes
+
+build_options="native"
+
+do_configure() {
+ # see http://www.shoup.net/ntl/doc/tour-unix.html
+ ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" \
+ PREFIX="/usr" SHARED="on" NTL_GF2X_LIB="on" \
+ NATIVE="$(vopt_if native 'on' 'off')"
+}
+
+ntl-devel_package() {
+ depends="ntl-${version}_${revision}"
+ depends+=" gmp-devel gf2x-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/share"
+ }
+}
diff --git a/srcpkgs/ntl/update b/srcpkgs/ntl/update
new file mode 100644
index 000000000000..8ccb86344234
--- /dev/null
+++ b/srcpkgs/ntl/update
@@ -0,0 +1 @@
+site="${homepage}/download.html"
From 4e05b666b7936fd3bbeb41d3115ca10a4885ed59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 2 Feb 2018 22:42:49 -0300
Subject: [PATCH 3/6] New package: flintlib-2.7.1
---
common/shlibs | 1 +
srcpkgs/flintlib-devel | 1 +
srcpkgs/flintlib/template | 30 ++++++++++++++++++++++++++++++
srcpkgs/flintlib/update | 2 ++
4 files changed, 34 insertions(+)
create mode 120000 srcpkgs/flintlib-devel
create mode 100644 srcpkgs/flintlib/template
create mode 100644 srcpkgs/flintlib/update
diff --git a/common/shlibs b/common/shlibs
index 6fd7cbd1d29d..257b2423ef48 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3960,6 +3960,7 @@ libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
+libflint.so.15 flintlib-2.7.1_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/flintlib-devel b/srcpkgs/flintlib-devel
new file mode 120000
index 000000000000..7c2633183069
--- /dev/null
+++ b/srcpkgs/flintlib-devel
@@ -0,0 +1 @@
+flintlib
\ No newline at end of file
diff --git a/srcpkgs/flintlib/template b/srcpkgs/flintlib/template
new file mode 100644
index 000000000000..149cb66f3187
--- /dev/null
+++ b/srcpkgs/flintlib/template
@@ -0,0 +1,30 @@
+# Template file for 'flintlib'
+pkgname=flintlib
+version=2.7.1
+revision=1
+wrksrc="flint-${version}"
+build_style="configure"
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-ntl=/usr"
+makedepends="mpfr-devel ntl-devel"
+short_desc="Fast Library for Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://flintlib.org"
+distfiles="https://flintlib.org/flint-${version}.tar.gz"
+checksum=186e2fd9ab67df8a05b122fb018269b382e4babcdb17353c4be1fe364dca481e
+nocross=yes
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ CFLAGS="-D_GNU_SOURCE"
+fi
+
+flintlib-devel_package() {
+ depends="flintlib-${version}_${revision}"
+ depends+=" mpfr-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/flintlib/update b/srcpkgs/flintlib/update
new file mode 100644
index 000000000000..8eee53cf22f2
--- /dev/null
+++ b/srcpkgs/flintlib/update
@@ -0,0 +1,2 @@
+pkgname=flint
+site="${homepage}/downloads.html"
From 21b2fd43fe75fa16ff2e89709311fc4f8e2ae11a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 4 Feb 2018 01:00:19 -0300
Subject: [PATCH 4/6] New package: arb-2.19.0
---
common/shlibs | 1 +
srcpkgs/arb-devel | 1 +
srcpkgs/arb/template | 29 +++++++++++++++++++++++++++++
3 files changed, 31 insertions(+)
create mode 120000 srcpkgs/arb-devel
create mode 100644 srcpkgs/arb/template
diff --git a/common/shlibs b/common/shlibs
index 257b2423ef48..85a262ec5070 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3961,6 +3961,7 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
libflint.so.15 flintlib-2.7.1_1
+libarb.so.2 arb-2.19.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/arb-devel b/srcpkgs/arb-devel
new file mode 120000
index 000000000000..456b9f00a86c
--- /dev/null
+++ b/srcpkgs/arb-devel
@@ -0,0 +1 @@
+arb
\ No newline at end of file
diff --git a/srcpkgs/arb/template b/srcpkgs/arb/template
new file mode 100644
index 000000000000..7c7df0aace15
--- /dev/null
+++ b/srcpkgs/arb/template
@@ -0,0 +1,29 @@
+# Template file for 'arb'
+pkgname=arb
+version=2.19.0
+revision=1
+build_style="configure"
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
+makedepends="flintlib-devel"
+short_desc="C library for arbitrary-precision interval arithmetic"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://arblib.org"
+distfiles="https://github.com/fredrik-johansson/arb/archive/${version}.tar.gz"
+checksum=0aec6b492b6e9a543bdb3287a91f976951e2ba74fd4de942e692e21f7edbcf13
+nocross=yes
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ CFLAGS="-D_GNU_SOURCE"
+fi
+
+arb-devel_package() {
+ depends="arb-${version}_${revision}"
+ depends+=" flintlib-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From e1713d4cbc323267e5ce3b4e92a22822f685496c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 1 Jun 2020 14:50:01 -0300
Subject: [PATCH 5/6] New package: eclib-20210318
---
common/shlibs | 1 +
srcpkgs/eclib-devel | 1 +
srcpkgs/eclib/patches/set_precision.patch | 34 +++++++++++++++++++++++
srcpkgs/eclib/template | 30 ++++++++++++++++++++
4 files changed, 66 insertions(+)
create mode 120000 srcpkgs/eclib-devel
create mode 100644 srcpkgs/eclib/patches/set_precision.patch
create mode 100644 srcpkgs/eclib/template
diff --git a/common/shlibs b/common/shlibs
index 85a262ec5070..274e456db446 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3962,6 +3962,7 @@ libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
libflint.so.15 flintlib-2.7.1_1
libarb.so.2 arb-2.19.0_1
+libec.so.7 eclib-20210318_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/eclib-devel b/srcpkgs/eclib-devel
new file mode 120000
index 000000000000..d29e610e9249
--- /dev/null
+++ b/srcpkgs/eclib-devel
@@ -0,0 +1 @@
+eclib
\ No newline at end of file
diff --git a/srcpkgs/eclib/patches/set_precision.patch b/srcpkgs/eclib/patches/set_precision.patch
new file mode 100644
index 000000000000..d1b6072ff399
--- /dev/null
+++ b/srcpkgs/eclib/patches/set_precision.patch
@@ -0,0 +1,34 @@
+This changes 0.3 by 0.3L, otherwise tests fail in i686 due to different rounding.
+
+See: https://github.com/JohnCremona/eclib/issues/68
+
+--- libsrc/eclib/interface.h 2021-03-18 12:22:52.000000000 -0300
++++ libsrc/eclib/interface.h 2021-04-05 15:15:52.355310137 -0300
+@@ -240,7 +240,7 @@
+
+ // Set internal precision to n bits and output precision to (0.3*n)-1 decimal places
+ inline void set_precision(long n)
+-{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3*n)-1);}
++{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3L*n)-1);}
+
+ // Mostly for backward compatibility (used in saturate.cc) or for
+ // temporarily changing internal precision when no output is relevant:
+@@ -252,7 +252,7 @@
+ {long n; cerr<<prompt<<": "; cin>>n; set_precision(n);}
+
+ // read current precision converted to decimal (approximately)
+-inline long decimal_precision() {return long(RR::precision()*0.3);}
++inline long decimal_precision() {return long(RR::precision()*0.3L);}
+
+ // read current bit precision
+ inline long bit_precision() {return RR::precision();}
+@@ -289,7 +289,7 @@
+ inline int is_approx_zero(double x) {return fabs(x)<1e-10;}
+
+ // We cannot set internal bit precision in this mode, so we just set the output decimal precision
+-inline void set_precision(long n) {cout.precision(min(15,long(0.3*n)));}
++inline void set_precision(long n) {cout.precision(min(15,long(0.3L*n)));}
+ inline void set_precision(const string prompt) {cout.precision(15);}
+ #define Pi() 3.1415926535897932384626433832795028841
+ #define Euler() (0.57721566490153286060651209008240243104)
+
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
new file mode 100644
index 000000000000..e545d06eb5e4
--- /dev/null
+++ b/srcpkgs/eclib/template
@@ -0,0 +1,30 @@
+# Template file for 'eclib'
+pkgname=eclib
+version=20210318
+revision=1
+build_style=gnu-configure
+configure_args="--with-flint --with-boost"
+hostmakedepends="automake autoconf-archive libtool"
+makedepends="pari-devel ntl-devel flintlib-devel boost-devel"
+short_desc="Elliptic curve library, includes mwrank"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/JohnCremona/eclib"
+distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
+checksum=8ca611e818cc3acdd54c800be66f66219a52603516bff048d350dd1e95605484
+
+pre_configure() {
+ ./autogen.sh
+}
+
+eclib-devel_package() {
+ depends="eclib-${version}_${revision}"
+ depends+=" ntl-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/pkgconfig"
+ }
+}
From 489dd593d2f64e456d5658f5c79b979a7cf3d901 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 8 Apr 2021 22:58:13 -0300
Subject: [PATCH 6/6] eclib: update to 20210408.
---
srcpkgs/eclib/patches/set_precision.patch | 34 -----------------------
srcpkgs/eclib/template | 4 +--
2 files changed, 2 insertions(+), 36 deletions(-)
delete mode 100644 srcpkgs/eclib/patches/set_precision.patch
diff --git a/srcpkgs/eclib/patches/set_precision.patch b/srcpkgs/eclib/patches/set_precision.patch
deleted file mode 100644
index d1b6072ff399..000000000000
--- a/srcpkgs/eclib/patches/set_precision.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-This changes 0.3 by 0.3L, otherwise tests fail in i686 due to different rounding.
-
-See: https://github.com/JohnCremona/eclib/issues/68
-
---- libsrc/eclib/interface.h 2021-03-18 12:22:52.000000000 -0300
-+++ libsrc/eclib/interface.h 2021-04-05 15:15:52.355310137 -0300
-@@ -240,7 +240,7 @@
-
- // Set internal precision to n bits and output precision to (0.3*n)-1 decimal places
- inline void set_precision(long n)
--{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3*n)-1);}
-+{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3L*n)-1);}
-
- // Mostly for backward compatibility (used in saturate.cc) or for
- // temporarily changing internal precision when no output is relevant:
-@@ -252,7 +252,7 @@
- {long n; cerr<<prompt<<": "; cin>>n; set_precision(n);}
-
- // read current precision converted to decimal (approximately)
--inline long decimal_precision() {return long(RR::precision()*0.3);}
-+inline long decimal_precision() {return long(RR::precision()*0.3L);}
-
- // read current bit precision
- inline long bit_precision() {return RR::precision();}
-@@ -289,7 +289,7 @@
- inline int is_approx_zero(double x) {return fabs(x)<1e-10;}
-
- // We cannot set internal bit precision in this mode, so we just set the output decimal precision
--inline void set_precision(long n) {cout.precision(min(15,long(0.3*n)));}
-+inline void set_precision(long n) {cout.precision(min(15,long(0.3L*n)));}
- inline void set_precision(const string prompt) {cout.precision(15);}
- #define Pi() 3.1415926535897932384626433832795028841
- #define Euler() (0.57721566490153286060651209008240243104)
-
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
index e545d06eb5e4..542ae4aae14f 100644
--- a/srcpkgs/eclib/template
+++ b/srcpkgs/eclib/template
@@ -1,6 +1,6 @@
# Template file for 'eclib'
pkgname=eclib
-version=20210318
+version=20210408
revision=1
build_style=gnu-configure
configure_args="--with-flint --with-boost"
@@ -11,7 +11,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://github.com/JohnCremona/eclib"
distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
-checksum=8ca611e818cc3acdd54c800be66f66219a52603516bff048d350dd1e95605484
+checksum=5354ea8edfedff7f10adeb8c5f8f3705dbeccb56e2840ab1eb2b3fad981c0e22
pre_configure() {
./autogen.sh
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR PATCH] [Updated] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (5 preceding siblings ...)
2021-05-13 17:57 ` tornaria
@ 2021-05-13 18:25 ` tornaria
2021-08-06 19:18 ` [PR REVIEW] " ericonr
` (62 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-05-13 18:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages math2
https://github.com/void-linux/void-packages/pull/30032
Math packages: gf2x, ntl, flintlib, arb, eclib
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
#### Notes
- This includes: `gf2x` (see also #29783), `ntl`, `flintlib`, `arb`, `eclib`.
- Everything is tested and check pass in x86_64, x86_64-musl, i686.
EDIT: split in smaller independent PR to ease review.
A patch file from https://github.com/void-linux/void-packages/pull/30032.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-math2-30032.patch --]
[-- Type: text/x-diff, Size: 17867 bytes --]
From 6750a0606813671c7edf61eebf3ec308644a6c33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 29 Jan 2018 11:18:35 -0300
Subject: [PATCH 1/7] New package: gf2x-1.3.0
---
common/shlibs | 1 +
srcpkgs/gf2x-devel | 1 +
srcpkgs/gf2x/template | 34 ++++++++++++++++++++++++++++++++++
srcpkgs/gf2x/update | 1 +
4 files changed, 37 insertions(+)
create mode 120000 srcpkgs/gf2x-devel
create mode 100644 srcpkgs/gf2x/template
create mode 100644 srcpkgs/gf2x/update
diff --git a/common/shlibs b/common/shlibs
index 0d53e2be7dfa..d3d7954f50b7 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3974,6 +3974,7 @@ libsword-1.8.1.so libsword-1.8.1_6
libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
+libgf2x.so.3 gf2x-1.3.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/gf2x-devel b/srcpkgs/gf2x-devel
new file mode 120000
index 000000000000..4542295e8de7
--- /dev/null
+++ b/srcpkgs/gf2x-devel
@@ -0,0 +1 @@
+gf2x
\ No newline at end of file
diff --git a/srcpkgs/gf2x/template b/srcpkgs/gf2x/template
new file mode 100644
index 000000000000..e9267578a2c6
--- /dev/null
+++ b/srcpkgs/gf2x/template
@@ -0,0 +1,34 @@
+# Template file for 'gf2x'
+pkgname=gf2x
+version=1.3.0
+revision=1
+wrksrc=gf2x-gf2x-${version}
+build_style="gnu-configure"
+hostmakedepends="automake libtool"
+short_desc="C/C++ library for fast arithmetic in GF(2)[x]"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.inria.fr/gf2x/gf2x"
+distfiles="https://gitlab.inria.fr/gf2x/gf2x/-/archive/gf2x-${version}/gf2x-gf2x-${version}.tar.gz"
+checksum=11bcf98b620c60c2ee3b4460b02b7be741f14cfdc26b542f22c92950926575e0
+
+build_options="native"
+
+if [ ! "$build_option_native" ]; then
+ configure_args="--disable-sse3"
+fi
+
+pre_configure() {
+ autoreconf -fi
+}
+
+gf2x-devel_package() {
+ depends="gf2x-${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/pkgconfig"
+ }
+}
diff --git a/srcpkgs/gf2x/update b/srcpkgs/gf2x/update
new file mode 100644
index 000000000000..504503610161
--- /dev/null
+++ b/srcpkgs/gf2x/update
@@ -0,0 +1 @@
+pkgname=gf2x-gf2x
From cf037c607eb202f9fcd5356c669b72c39b4b1440 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 30 Jan 2018 11:02:38 -0300
Subject: [PATCH 2/7] New package: ntl-11.4.4
---
common/shlibs | 1 +
srcpkgs/ntl-devel | 1 +
srcpkgs/ntl/template | 36 ++++++++++++++++++++++++++++++++++++
srcpkgs/ntl/update | 1 +
4 files changed, 39 insertions(+)
create mode 120000 srcpkgs/ntl-devel
create mode 100644 srcpkgs/ntl/template
create mode 100644 srcpkgs/ntl/update
diff --git a/common/shlibs b/common/shlibs
index d3d7954f50b7..137f67fe4383 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3975,6 +3975,7 @@ libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
+libntl.so.43 ntl-11.4.4_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/ntl-devel b/srcpkgs/ntl-devel
new file mode 120000
index 000000000000..fc0a39987329
--- /dev/null
+++ b/srcpkgs/ntl-devel
@@ -0,0 +1 @@
+ntl
\ No newline at end of file
diff --git a/srcpkgs/ntl/template b/srcpkgs/ntl/template
new file mode 100644
index 000000000000..e140298eb559
--- /dev/null
+++ b/srcpkgs/ntl/template
@@ -0,0 +1,36 @@
+# Template file for 'ntl'
+pkgname=ntl
+version=11.4.4
+revision=1
+build_wrksrc="src"
+build_style="configure"
+hostmakedepends="perl"
+makedepends="gmp-devel gf2x-devel"
+short_desc="Library for doing Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://libntl.org"
+distfiles="https://libntl.org/ntl-${version}.tar.gz"
+checksum=9d7f6e82e11a409f151c0de2deb08c0d763baf9834fddfd432bf3d218f8021db
+nocross=yes
+
+build_options="native"
+
+do_configure() {
+ # see http://www.shoup.net/ntl/doc/tour-unix.html
+ ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" \
+ PREFIX="/usr" SHARED="on" NTL_GF2X_LIB="on" \
+ NATIVE="$(vopt_if native 'on' 'off')"
+}
+
+ntl-devel_package() {
+ depends="ntl-${version}_${revision}"
+ depends+=" gmp-devel gf2x-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/share"
+ }
+}
diff --git a/srcpkgs/ntl/update b/srcpkgs/ntl/update
new file mode 100644
index 000000000000..8ccb86344234
--- /dev/null
+++ b/srcpkgs/ntl/update
@@ -0,0 +1 @@
+site="${homepage}/download.html"
From cc613d072d50b6a03f256e8df1ea567cb9fe5dc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 2 Feb 2018 22:42:49 -0300
Subject: [PATCH 3/7] New package: flintlib-2.7.1
---
common/shlibs | 1 +
srcpkgs/flintlib-devel | 1 +
srcpkgs/flintlib/template | 30 ++++++++++++++++++++++++++++++
srcpkgs/flintlib/update | 2 ++
4 files changed, 34 insertions(+)
create mode 120000 srcpkgs/flintlib-devel
create mode 100644 srcpkgs/flintlib/template
create mode 100644 srcpkgs/flintlib/update
diff --git a/common/shlibs b/common/shlibs
index 137f67fe4383..b8a1f7d0a080 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3976,6 +3976,7 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
+libflint.so.15 flintlib-2.7.1_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/flintlib-devel b/srcpkgs/flintlib-devel
new file mode 120000
index 000000000000..7c2633183069
--- /dev/null
+++ b/srcpkgs/flintlib-devel
@@ -0,0 +1 @@
+flintlib
\ No newline at end of file
diff --git a/srcpkgs/flintlib/template b/srcpkgs/flintlib/template
new file mode 100644
index 000000000000..149cb66f3187
--- /dev/null
+++ b/srcpkgs/flintlib/template
@@ -0,0 +1,30 @@
+# Template file for 'flintlib'
+pkgname=flintlib
+version=2.7.1
+revision=1
+wrksrc="flint-${version}"
+build_style="configure"
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-ntl=/usr"
+makedepends="mpfr-devel ntl-devel"
+short_desc="Fast Library for Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://flintlib.org"
+distfiles="https://flintlib.org/flint-${version}.tar.gz"
+checksum=186e2fd9ab67df8a05b122fb018269b382e4babcdb17353c4be1fe364dca481e
+nocross=yes
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ CFLAGS="-D_GNU_SOURCE"
+fi
+
+flintlib-devel_package() {
+ depends="flintlib-${version}_${revision}"
+ depends+=" mpfr-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/flintlib/update b/srcpkgs/flintlib/update
new file mode 100644
index 000000000000..8eee53cf22f2
--- /dev/null
+++ b/srcpkgs/flintlib/update
@@ -0,0 +1,2 @@
+pkgname=flint
+site="${homepage}/downloads.html"
From 9b51d70e928dcda490847e50f8f1fe702737c71c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 4 Feb 2018 01:00:19 -0300
Subject: [PATCH 4/7] New package: arb-2.19.0
---
common/shlibs | 1 +
srcpkgs/arb-devel | 1 +
srcpkgs/arb/template | 29 +++++++++++++++++++++++++++++
3 files changed, 31 insertions(+)
create mode 120000 srcpkgs/arb-devel
create mode 100644 srcpkgs/arb/template
diff --git a/common/shlibs b/common/shlibs
index b8a1f7d0a080..d4a2cee990e9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3977,6 +3977,7 @@ libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
libflint.so.15 flintlib-2.7.1_1
+libarb.so.2 arb-2.19.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/arb-devel b/srcpkgs/arb-devel
new file mode 120000
index 000000000000..456b9f00a86c
--- /dev/null
+++ b/srcpkgs/arb-devel
@@ -0,0 +1 @@
+arb
\ No newline at end of file
diff --git a/srcpkgs/arb/template b/srcpkgs/arb/template
new file mode 100644
index 000000000000..7c7df0aace15
--- /dev/null
+++ b/srcpkgs/arb/template
@@ -0,0 +1,29 @@
+# Template file for 'arb'
+pkgname=arb
+version=2.19.0
+revision=1
+build_style="configure"
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
+makedepends="flintlib-devel"
+short_desc="C library for arbitrary-precision interval arithmetic"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://arblib.org"
+distfiles="https://github.com/fredrik-johansson/arb/archive/${version}.tar.gz"
+checksum=0aec6b492b6e9a543bdb3287a91f976951e2ba74fd4de942e692e21f7edbcf13
+nocross=yes
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ CFLAGS="-D_GNU_SOURCE"
+fi
+
+arb-devel_package() {
+ depends="arb-${version}_${revision}"
+ depends+=" flintlib-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 09028147864963ac59cb851cbac9bc22b18d8d97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 1 Jun 2020 14:50:01 -0300
Subject: [PATCH 5/7] New package: eclib-20210318
---
common/shlibs | 1 +
srcpkgs/eclib-devel | 1 +
srcpkgs/eclib/patches/set_precision.patch | 34 +++++++++++++++++++++++
srcpkgs/eclib/template | 30 ++++++++++++++++++++
4 files changed, 66 insertions(+)
create mode 120000 srcpkgs/eclib-devel
create mode 100644 srcpkgs/eclib/patches/set_precision.patch
create mode 100644 srcpkgs/eclib/template
diff --git a/common/shlibs b/common/shlibs
index d4a2cee990e9..a7c384e15f0c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3978,6 +3978,7 @@ libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
libflint.so.15 flintlib-2.7.1_1
libarb.so.2 arb-2.19.0_1
+libec.so.7 eclib-20210318_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/eclib-devel b/srcpkgs/eclib-devel
new file mode 120000
index 000000000000..d29e610e9249
--- /dev/null
+++ b/srcpkgs/eclib-devel
@@ -0,0 +1 @@
+eclib
\ No newline at end of file
diff --git a/srcpkgs/eclib/patches/set_precision.patch b/srcpkgs/eclib/patches/set_precision.patch
new file mode 100644
index 000000000000..d1b6072ff399
--- /dev/null
+++ b/srcpkgs/eclib/patches/set_precision.patch
@@ -0,0 +1,34 @@
+This changes 0.3 by 0.3L, otherwise tests fail in i686 due to different rounding.
+
+See: https://github.com/JohnCremona/eclib/issues/68
+
+--- libsrc/eclib/interface.h 2021-03-18 12:22:52.000000000 -0300
++++ libsrc/eclib/interface.h 2021-04-05 15:15:52.355310137 -0300
+@@ -240,7 +240,7 @@
+
+ // Set internal precision to n bits and output precision to (0.3*n)-1 decimal places
+ inline void set_precision(long n)
+-{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3*n)-1);}
++{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3L*n)-1);}
+
+ // Mostly for backward compatibility (used in saturate.cc) or for
+ // temporarily changing internal precision when no output is relevant:
+@@ -252,7 +252,7 @@
+ {long n; cerr<<prompt<<": "; cin>>n; set_precision(n);}
+
+ // read current precision converted to decimal (approximately)
+-inline long decimal_precision() {return long(RR::precision()*0.3);}
++inline long decimal_precision() {return long(RR::precision()*0.3L);}
+
+ // read current bit precision
+ inline long bit_precision() {return RR::precision();}
+@@ -289,7 +289,7 @@
+ inline int is_approx_zero(double x) {return fabs(x)<1e-10;}
+
+ // We cannot set internal bit precision in this mode, so we just set the output decimal precision
+-inline void set_precision(long n) {cout.precision(min(15,long(0.3*n)));}
++inline void set_precision(long n) {cout.precision(min(15,long(0.3L*n)));}
+ inline void set_precision(const string prompt) {cout.precision(15);}
+ #define Pi() 3.1415926535897932384626433832795028841
+ #define Euler() (0.57721566490153286060651209008240243104)
+
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
new file mode 100644
index 000000000000..e545d06eb5e4
--- /dev/null
+++ b/srcpkgs/eclib/template
@@ -0,0 +1,30 @@
+# Template file for 'eclib'
+pkgname=eclib
+version=20210318
+revision=1
+build_style=gnu-configure
+configure_args="--with-flint --with-boost"
+hostmakedepends="automake autoconf-archive libtool"
+makedepends="pari-devel ntl-devel flintlib-devel boost-devel"
+short_desc="Elliptic curve library, includes mwrank"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/JohnCremona/eclib"
+distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
+checksum=8ca611e818cc3acdd54c800be66f66219a52603516bff048d350dd1e95605484
+
+pre_configure() {
+ ./autogen.sh
+}
+
+eclib-devel_package() {
+ depends="eclib-${version}_${revision}"
+ depends+=" ntl-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/pkgconfig"
+ }
+}
From 0b860be4ab5af9518c683a67f1ae2dd86925c193 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 8 Apr 2021 22:58:13 -0300
Subject: [PATCH 6/7] eclib: update to 20210408.
---
srcpkgs/eclib/patches/set_precision.patch | 34 -----------------------
srcpkgs/eclib/template | 4 +--
2 files changed, 2 insertions(+), 36 deletions(-)
delete mode 100644 srcpkgs/eclib/patches/set_precision.patch
diff --git a/srcpkgs/eclib/patches/set_precision.patch b/srcpkgs/eclib/patches/set_precision.patch
deleted file mode 100644
index d1b6072ff399..000000000000
--- a/srcpkgs/eclib/patches/set_precision.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-This changes 0.3 by 0.3L, otherwise tests fail in i686 due to different rounding.
-
-See: https://github.com/JohnCremona/eclib/issues/68
-
---- libsrc/eclib/interface.h 2021-03-18 12:22:52.000000000 -0300
-+++ libsrc/eclib/interface.h 2021-04-05 15:15:52.355310137 -0300
-@@ -240,7 +240,7 @@
-
- // Set internal precision to n bits and output precision to (0.3*n)-1 decimal places
- inline void set_precision(long n)
--{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3*n)-1);}
-+{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3L*n)-1);}
-
- // Mostly for backward compatibility (used in saturate.cc) or for
- // temporarily changing internal precision when no output is relevant:
-@@ -252,7 +252,7 @@
- {long n; cerr<<prompt<<": "; cin>>n; set_precision(n);}
-
- // read current precision converted to decimal (approximately)
--inline long decimal_precision() {return long(RR::precision()*0.3);}
-+inline long decimal_precision() {return long(RR::precision()*0.3L);}
-
- // read current bit precision
- inline long bit_precision() {return RR::precision();}
-@@ -289,7 +289,7 @@
- inline int is_approx_zero(double x) {return fabs(x)<1e-10;}
-
- // We cannot set internal bit precision in this mode, so we just set the output decimal precision
--inline void set_precision(long n) {cout.precision(min(15,long(0.3*n)));}
-+inline void set_precision(long n) {cout.precision(min(15,long(0.3L*n)));}
- inline void set_precision(const string prompt) {cout.precision(15);}
- #define Pi() 3.1415926535897932384626433832795028841
- #define Euler() (0.57721566490153286060651209008240243104)
-
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
index e545d06eb5e4..542ae4aae14f 100644
--- a/srcpkgs/eclib/template
+++ b/srcpkgs/eclib/template
@@ -1,6 +1,6 @@
# Template file for 'eclib'
pkgname=eclib
-version=20210318
+version=20210408
revision=1
build_style=gnu-configure
configure_args="--with-flint --with-boost"
@@ -11,7 +11,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://github.com/JohnCremona/eclib"
distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
-checksum=8ca611e818cc3acdd54c800be66f66219a52603516bff048d350dd1e95605484
+checksum=5354ea8edfedff7f10adeb8c5f8f3705dbeccb56e2840ab1eb2b3fad981c0e22
pre_configure() {
./autogen.sh
From d039ed104203f1c88d2af7075f645d5c18f3ae1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 May 2021 15:24:21 -0300
Subject: [PATCH 7/7] eclib: update to 20210503.
---
srcpkgs/eclib/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
index 542ae4aae14f..bf98c22c8531 100644
--- a/srcpkgs/eclib/template
+++ b/srcpkgs/eclib/template
@@ -1,6 +1,6 @@
# Template file for 'eclib'
pkgname=eclib
-version=20210408
+version=20210503
revision=1
build_style=gnu-configure
configure_args="--with-flint --with-boost"
@@ -11,7 +11,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://github.com/JohnCremona/eclib"
distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
-checksum=5354ea8edfedff7f10adeb8c5f8f3705dbeccb56e2840ab1eb2b3fad981c0e22
+checksum=b742e322f5aeffef7256c05a9b9f744a8f34cb52777c62764cce07a49b1d32fa
pre_configure() {
./autogen.sh
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (6 preceding siblings ...)
2021-05-13 18:25 ` tornaria
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (61 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 201 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684449724
Comment:
```suggestion
build_style=configure
```
Style nit
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (7 preceding siblings ...)
2021-08-06 19:18 ` [PR REVIEW] " ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (60 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 209 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684449977
Comment:
Do you have a simple comment you can add here explaining why?
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (8 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (59 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 226 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684450115
Comment:
Doesn't need to be conditional, setting this for glibc shouldn't hurt anything.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (9 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (58 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 205 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684450332
Comment:
```suggestion
depends="arb>=${version}_${revision}"
```
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (10 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (57 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 199 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684450409
Comment:
```suggestion
vmove usr/include
```
Style nit
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (11 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (56 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684450289
Comment:
```suggestion
depends+=" ${makedepends}"
```
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (12 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (55 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 226 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684453408
Comment:
I remembered it just now, but the default style is actually `${sourcepkg}>=...`
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (13 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (54 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 207 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684450747
Comment:
```suggestion
depends="eclib>=${version}_${revision}"
```
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (14 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (53 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 223 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684450647
Comment:
We usually try to use `autoreconf -fi`, does their script do more than that?
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (15 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (52 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 195 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684450874
Comment:
Same style nit, remove quotes when not globbing.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (16 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (51 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 163 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684451038
Comment:
Same as previous
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (17 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (50 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 160 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684453972
Comment:
Same as above
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (18 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (49 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 163 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684451082
Comment:
Same as previous
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (19 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (48 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 163 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684451200
Comment:
Same as previous
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (20 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (47 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 160 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684454215
Comment:
Same as above
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (21 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (46 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 160 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684453921
Comment:
Same as above
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (22 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:18 ` ericonr
` (45 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 210 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684451235
Comment:
```suggestion
depends="flintlib>=${version}_${revision}"
```
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (23 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:18 ` ericonr
2021-08-06 19:32 ` [PR PATCH] [Updated] " tornaria
` (44 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 206 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684453058
Comment:
```suggestion
depends="gf2x>=${version}_${revision}"
```
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR PATCH] [Updated] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (24 preceding siblings ...)
2021-08-06 19:18 ` ericonr
@ 2021-08-06 19:32 ` tornaria
2021-08-06 19:32 ` tornaria
` (43 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-06 19:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages math2
https://github.com/void-linux/void-packages/pull/30032
Math packages: gf2x, ntl, flintlib, arb, eclib
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
#### Notes
- This includes: `gf2x` (see also #29783), `ntl`, `flintlib`, `arb`, `eclib`.
- Everything is tested and check pass in x86_64, x86_64-musl, i686.
EDIT: split in smaller independent PR to ease review.
A patch file from https://github.com/void-linux/void-packages/pull/30032.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-math2-30032.patch --]
[-- Type: text/x-diff, Size: 18779 bytes --]
From 6750a0606813671c7edf61eebf3ec308644a6c33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 29 Jan 2018 11:18:35 -0300
Subject: [PATCH 1/8] New package: gf2x-1.3.0
---
common/shlibs | 1 +
srcpkgs/gf2x-devel | 1 +
srcpkgs/gf2x/template | 34 ++++++++++++++++++++++++++++++++++
srcpkgs/gf2x/update | 1 +
4 files changed, 37 insertions(+)
create mode 120000 srcpkgs/gf2x-devel
create mode 100644 srcpkgs/gf2x/template
create mode 100644 srcpkgs/gf2x/update
diff --git a/common/shlibs b/common/shlibs
index 0d53e2be7dfa..d3d7954f50b7 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3974,6 +3974,7 @@ libsword-1.8.1.so libsword-1.8.1_6
libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
+libgf2x.so.3 gf2x-1.3.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/gf2x-devel b/srcpkgs/gf2x-devel
new file mode 120000
index 000000000000..4542295e8de7
--- /dev/null
+++ b/srcpkgs/gf2x-devel
@@ -0,0 +1 @@
+gf2x
\ No newline at end of file
diff --git a/srcpkgs/gf2x/template b/srcpkgs/gf2x/template
new file mode 100644
index 000000000000..e9267578a2c6
--- /dev/null
+++ b/srcpkgs/gf2x/template
@@ -0,0 +1,34 @@
+# Template file for 'gf2x'
+pkgname=gf2x
+version=1.3.0
+revision=1
+wrksrc=gf2x-gf2x-${version}
+build_style="gnu-configure"
+hostmakedepends="automake libtool"
+short_desc="C/C++ library for fast arithmetic in GF(2)[x]"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.inria.fr/gf2x/gf2x"
+distfiles="https://gitlab.inria.fr/gf2x/gf2x/-/archive/gf2x-${version}/gf2x-gf2x-${version}.tar.gz"
+checksum=11bcf98b620c60c2ee3b4460b02b7be741f14cfdc26b542f22c92950926575e0
+
+build_options="native"
+
+if [ ! "$build_option_native" ]; then
+ configure_args="--disable-sse3"
+fi
+
+pre_configure() {
+ autoreconf -fi
+}
+
+gf2x-devel_package() {
+ depends="gf2x-${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/pkgconfig"
+ }
+}
diff --git a/srcpkgs/gf2x/update b/srcpkgs/gf2x/update
new file mode 100644
index 000000000000..504503610161
--- /dev/null
+++ b/srcpkgs/gf2x/update
@@ -0,0 +1 @@
+pkgname=gf2x-gf2x
From cf037c607eb202f9fcd5356c669b72c39b4b1440 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 30 Jan 2018 11:02:38 -0300
Subject: [PATCH 2/8] New package: ntl-11.4.4
---
common/shlibs | 1 +
srcpkgs/ntl-devel | 1 +
srcpkgs/ntl/template | 36 ++++++++++++++++++++++++++++++++++++
srcpkgs/ntl/update | 1 +
4 files changed, 39 insertions(+)
create mode 120000 srcpkgs/ntl-devel
create mode 100644 srcpkgs/ntl/template
create mode 100644 srcpkgs/ntl/update
diff --git a/common/shlibs b/common/shlibs
index d3d7954f50b7..137f67fe4383 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3975,6 +3975,7 @@ libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
+libntl.so.43 ntl-11.4.4_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/ntl-devel b/srcpkgs/ntl-devel
new file mode 120000
index 000000000000..fc0a39987329
--- /dev/null
+++ b/srcpkgs/ntl-devel
@@ -0,0 +1 @@
+ntl
\ No newline at end of file
diff --git a/srcpkgs/ntl/template b/srcpkgs/ntl/template
new file mode 100644
index 000000000000..e140298eb559
--- /dev/null
+++ b/srcpkgs/ntl/template
@@ -0,0 +1,36 @@
+# Template file for 'ntl'
+pkgname=ntl
+version=11.4.4
+revision=1
+build_wrksrc="src"
+build_style="configure"
+hostmakedepends="perl"
+makedepends="gmp-devel gf2x-devel"
+short_desc="Library for doing Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://libntl.org"
+distfiles="https://libntl.org/ntl-${version}.tar.gz"
+checksum=9d7f6e82e11a409f151c0de2deb08c0d763baf9834fddfd432bf3d218f8021db
+nocross=yes
+
+build_options="native"
+
+do_configure() {
+ # see http://www.shoup.net/ntl/doc/tour-unix.html
+ ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" \
+ PREFIX="/usr" SHARED="on" NTL_GF2X_LIB="on" \
+ NATIVE="$(vopt_if native 'on' 'off')"
+}
+
+ntl-devel_package() {
+ depends="ntl-${version}_${revision}"
+ depends+=" gmp-devel gf2x-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/share"
+ }
+}
diff --git a/srcpkgs/ntl/update b/srcpkgs/ntl/update
new file mode 100644
index 000000000000..8ccb86344234
--- /dev/null
+++ b/srcpkgs/ntl/update
@@ -0,0 +1 @@
+site="${homepage}/download.html"
From cc613d072d50b6a03f256e8df1ea567cb9fe5dc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 2 Feb 2018 22:42:49 -0300
Subject: [PATCH 3/8] New package: flintlib-2.7.1
---
common/shlibs | 1 +
srcpkgs/flintlib-devel | 1 +
srcpkgs/flintlib/template | 30 ++++++++++++++++++++++++++++++
srcpkgs/flintlib/update | 2 ++
4 files changed, 34 insertions(+)
create mode 120000 srcpkgs/flintlib-devel
create mode 100644 srcpkgs/flintlib/template
create mode 100644 srcpkgs/flintlib/update
diff --git a/common/shlibs b/common/shlibs
index 137f67fe4383..b8a1f7d0a080 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3976,6 +3976,7 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
+libflint.so.15 flintlib-2.7.1_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/flintlib-devel b/srcpkgs/flintlib-devel
new file mode 120000
index 000000000000..7c2633183069
--- /dev/null
+++ b/srcpkgs/flintlib-devel
@@ -0,0 +1 @@
+flintlib
\ No newline at end of file
diff --git a/srcpkgs/flintlib/template b/srcpkgs/flintlib/template
new file mode 100644
index 000000000000..149cb66f3187
--- /dev/null
+++ b/srcpkgs/flintlib/template
@@ -0,0 +1,30 @@
+# Template file for 'flintlib'
+pkgname=flintlib
+version=2.7.1
+revision=1
+wrksrc="flint-${version}"
+build_style="configure"
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-ntl=/usr"
+makedepends="mpfr-devel ntl-devel"
+short_desc="Fast Library for Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://flintlib.org"
+distfiles="https://flintlib.org/flint-${version}.tar.gz"
+checksum=186e2fd9ab67df8a05b122fb018269b382e4babcdb17353c4be1fe364dca481e
+nocross=yes
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ CFLAGS="-D_GNU_SOURCE"
+fi
+
+flintlib-devel_package() {
+ depends="flintlib-${version}_${revision}"
+ depends+=" mpfr-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/flintlib/update b/srcpkgs/flintlib/update
new file mode 100644
index 000000000000..8eee53cf22f2
--- /dev/null
+++ b/srcpkgs/flintlib/update
@@ -0,0 +1,2 @@
+pkgname=flint
+site="${homepage}/downloads.html"
From 9b51d70e928dcda490847e50f8f1fe702737c71c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 4 Feb 2018 01:00:19 -0300
Subject: [PATCH 4/8] New package: arb-2.19.0
---
common/shlibs | 1 +
srcpkgs/arb-devel | 1 +
srcpkgs/arb/template | 29 +++++++++++++++++++++++++++++
3 files changed, 31 insertions(+)
create mode 120000 srcpkgs/arb-devel
create mode 100644 srcpkgs/arb/template
diff --git a/common/shlibs b/common/shlibs
index b8a1f7d0a080..d4a2cee990e9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3977,6 +3977,7 @@ libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
libflint.so.15 flintlib-2.7.1_1
+libarb.so.2 arb-2.19.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/arb-devel b/srcpkgs/arb-devel
new file mode 120000
index 000000000000..456b9f00a86c
--- /dev/null
+++ b/srcpkgs/arb-devel
@@ -0,0 +1 @@
+arb
\ No newline at end of file
diff --git a/srcpkgs/arb/template b/srcpkgs/arb/template
new file mode 100644
index 000000000000..7c7df0aace15
--- /dev/null
+++ b/srcpkgs/arb/template
@@ -0,0 +1,29 @@
+# Template file for 'arb'
+pkgname=arb
+version=2.19.0
+revision=1
+build_style="configure"
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
+makedepends="flintlib-devel"
+short_desc="C library for arbitrary-precision interval arithmetic"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://arblib.org"
+distfiles="https://github.com/fredrik-johansson/arb/archive/${version}.tar.gz"
+checksum=0aec6b492b6e9a543bdb3287a91f976951e2ba74fd4de942e692e21f7edbcf13
+nocross=yes
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ CFLAGS="-D_GNU_SOURCE"
+fi
+
+arb-devel_package() {
+ depends="arb-${version}_${revision}"
+ depends+=" flintlib-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 09028147864963ac59cb851cbac9bc22b18d8d97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 1 Jun 2020 14:50:01 -0300
Subject: [PATCH 5/8] New package: eclib-20210318
---
common/shlibs | 1 +
srcpkgs/eclib-devel | 1 +
srcpkgs/eclib/patches/set_precision.patch | 34 +++++++++++++++++++++++
srcpkgs/eclib/template | 30 ++++++++++++++++++++
4 files changed, 66 insertions(+)
create mode 120000 srcpkgs/eclib-devel
create mode 100644 srcpkgs/eclib/patches/set_precision.patch
create mode 100644 srcpkgs/eclib/template
diff --git a/common/shlibs b/common/shlibs
index d4a2cee990e9..a7c384e15f0c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3978,6 +3978,7 @@ libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
libflint.so.15 flintlib-2.7.1_1
libarb.so.2 arb-2.19.0_1
+libec.so.7 eclib-20210318_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/eclib-devel b/srcpkgs/eclib-devel
new file mode 120000
index 000000000000..d29e610e9249
--- /dev/null
+++ b/srcpkgs/eclib-devel
@@ -0,0 +1 @@
+eclib
\ No newline at end of file
diff --git a/srcpkgs/eclib/patches/set_precision.patch b/srcpkgs/eclib/patches/set_precision.patch
new file mode 100644
index 000000000000..d1b6072ff399
--- /dev/null
+++ b/srcpkgs/eclib/patches/set_precision.patch
@@ -0,0 +1,34 @@
+This changes 0.3 by 0.3L, otherwise tests fail in i686 due to different rounding.
+
+See: https://github.com/JohnCremona/eclib/issues/68
+
+--- libsrc/eclib/interface.h 2021-03-18 12:22:52.000000000 -0300
++++ libsrc/eclib/interface.h 2021-04-05 15:15:52.355310137 -0300
+@@ -240,7 +240,7 @@
+
+ // Set internal precision to n bits and output precision to (0.3*n)-1 decimal places
+ inline void set_precision(long n)
+-{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3*n)-1);}
++{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3L*n)-1);}
+
+ // Mostly for backward compatibility (used in saturate.cc) or for
+ // temporarily changing internal precision when no output is relevant:
+@@ -252,7 +252,7 @@
+ {long n; cerr<<prompt<<": "; cin>>n; set_precision(n);}
+
+ // read current precision converted to decimal (approximately)
+-inline long decimal_precision() {return long(RR::precision()*0.3);}
++inline long decimal_precision() {return long(RR::precision()*0.3L);}
+
+ // read current bit precision
+ inline long bit_precision() {return RR::precision();}
+@@ -289,7 +289,7 @@
+ inline int is_approx_zero(double x) {return fabs(x)<1e-10;}
+
+ // We cannot set internal bit precision in this mode, so we just set the output decimal precision
+-inline void set_precision(long n) {cout.precision(min(15,long(0.3*n)));}
++inline void set_precision(long n) {cout.precision(min(15,long(0.3L*n)));}
+ inline void set_precision(const string prompt) {cout.precision(15);}
+ #define Pi() 3.1415926535897932384626433832795028841
+ #define Euler() (0.57721566490153286060651209008240243104)
+
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
new file mode 100644
index 000000000000..e545d06eb5e4
--- /dev/null
+++ b/srcpkgs/eclib/template
@@ -0,0 +1,30 @@
+# Template file for 'eclib'
+pkgname=eclib
+version=20210318
+revision=1
+build_style=gnu-configure
+configure_args="--with-flint --with-boost"
+hostmakedepends="automake autoconf-archive libtool"
+makedepends="pari-devel ntl-devel flintlib-devel boost-devel"
+short_desc="Elliptic curve library, includes mwrank"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/JohnCremona/eclib"
+distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
+checksum=8ca611e818cc3acdd54c800be66f66219a52603516bff048d350dd1e95605484
+
+pre_configure() {
+ ./autogen.sh
+}
+
+eclib-devel_package() {
+ depends="eclib-${version}_${revision}"
+ depends+=" ntl-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/pkgconfig"
+ }
+}
From 0b860be4ab5af9518c683a67f1ae2dd86925c193 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 8 Apr 2021 22:58:13 -0300
Subject: [PATCH 6/8] eclib: update to 20210408.
---
srcpkgs/eclib/patches/set_precision.patch | 34 -----------------------
srcpkgs/eclib/template | 4 +--
2 files changed, 2 insertions(+), 36 deletions(-)
delete mode 100644 srcpkgs/eclib/patches/set_precision.patch
diff --git a/srcpkgs/eclib/patches/set_precision.patch b/srcpkgs/eclib/patches/set_precision.patch
deleted file mode 100644
index d1b6072ff399..000000000000
--- a/srcpkgs/eclib/patches/set_precision.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-This changes 0.3 by 0.3L, otherwise tests fail in i686 due to different rounding.
-
-See: https://github.com/JohnCremona/eclib/issues/68
-
---- libsrc/eclib/interface.h 2021-03-18 12:22:52.000000000 -0300
-+++ libsrc/eclib/interface.h 2021-04-05 15:15:52.355310137 -0300
-@@ -240,7 +240,7 @@
-
- // Set internal precision to n bits and output precision to (0.3*n)-1 decimal places
- inline void set_precision(long n)
--{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3*n)-1);}
-+{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3L*n)-1);}
-
- // Mostly for backward compatibility (used in saturate.cc) or for
- // temporarily changing internal precision when no output is relevant:
-@@ -252,7 +252,7 @@
- {long n; cerr<<prompt<<": "; cin>>n; set_precision(n);}
-
- // read current precision converted to decimal (approximately)
--inline long decimal_precision() {return long(RR::precision()*0.3);}
-+inline long decimal_precision() {return long(RR::precision()*0.3L);}
-
- // read current bit precision
- inline long bit_precision() {return RR::precision();}
-@@ -289,7 +289,7 @@
- inline int is_approx_zero(double x) {return fabs(x)<1e-10;}
-
- // We cannot set internal bit precision in this mode, so we just set the output decimal precision
--inline void set_precision(long n) {cout.precision(min(15,long(0.3*n)));}
-+inline void set_precision(long n) {cout.precision(min(15,long(0.3L*n)));}
- inline void set_precision(const string prompt) {cout.precision(15);}
- #define Pi() 3.1415926535897932384626433832795028841
- #define Euler() (0.57721566490153286060651209008240243104)
-
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
index e545d06eb5e4..542ae4aae14f 100644
--- a/srcpkgs/eclib/template
+++ b/srcpkgs/eclib/template
@@ -1,6 +1,6 @@
# Template file for 'eclib'
pkgname=eclib
-version=20210318
+version=20210408
revision=1
build_style=gnu-configure
configure_args="--with-flint --with-boost"
@@ -11,7 +11,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://github.com/JohnCremona/eclib"
distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
-checksum=8ca611e818cc3acdd54c800be66f66219a52603516bff048d350dd1e95605484
+checksum=5354ea8edfedff7f10adeb8c5f8f3705dbeccb56e2840ab1eb2b3fad981c0e22
pre_configure() {
./autogen.sh
From d039ed104203f1c88d2af7075f645d5c18f3ae1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 May 2021 15:24:21 -0300
Subject: [PATCH 7/8] eclib: update to 20210503.
---
srcpkgs/eclib/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
index 542ae4aae14f..bf98c22c8531 100644
--- a/srcpkgs/eclib/template
+++ b/srcpkgs/eclib/template
@@ -1,6 +1,6 @@
# Template file for 'eclib'
pkgname=eclib
-version=20210408
+version=20210503
revision=1
build_style=gnu-configure
configure_args="--with-flint --with-boost"
@@ -11,7 +11,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://github.com/JohnCremona/eclib"
distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
-checksum=5354ea8edfedff7f10adeb8c5f8f3705dbeccb56e2840ab1eb2b3fad981c0e22
+checksum=b742e322f5aeffef7256c05a9b9f744a8f34cb52777c62764cce07a49b1d32fa
pre_configure() {
./autogen.sh
From 1d0de43f0a5cb01577362e8272d7780e910f2575 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@gmail.com>
Date: Fri, 6 Aug 2021 16:32:24 -0300
Subject: [PATCH 8/8] Update srcpkgs/arb/template
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Érico Nogueira Rolim <34201958+ericonr@users.noreply.github.com>
---
srcpkgs/arb/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/arb/template b/srcpkgs/arb/template
index 7c7df0aace15..8dc6da4a9488 100644
--- a/srcpkgs/arb/template
+++ b/srcpkgs/arb/template
@@ -2,7 +2,7 @@
pkgname=arb
version=2.19.0
revision=1
-build_style="configure"
+build_style=configure
configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
makedepends="flintlib-devel"
short_desc="C library for arbitrary-precision interval arithmetic"
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR PATCH] [Updated] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (25 preceding siblings ...)
2021-08-06 19:32 ` [PR PATCH] [Updated] " tornaria
@ 2021-08-06 19:32 ` tornaria
2021-08-06 19:36 ` [PR REVIEW] " tornaria
` (42 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-06 19:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages math2
https://github.com/void-linux/void-packages/pull/30032
Math packages: gf2x, ntl, flintlib, arb, eclib
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
#### Notes
- This includes: `gf2x` (see also #29783), `ntl`, `flintlib`, `arb`, `eclib`.
- Everything is tested and check pass in x86_64, x86_64-musl, i686.
EDIT: split in smaller independent PR to ease review.
A patch file from https://github.com/void-linux/void-packages/pull/30032.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-math2-30032.patch --]
[-- Type: text/x-diff, Size: 18779 bytes --]
From 6750a0606813671c7edf61eebf3ec308644a6c33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 29 Jan 2018 11:18:35 -0300
Subject: [PATCH 1/8] New package: gf2x-1.3.0
---
common/shlibs | 1 +
srcpkgs/gf2x-devel | 1 +
srcpkgs/gf2x/template | 34 ++++++++++++++++++++++++++++++++++
srcpkgs/gf2x/update | 1 +
4 files changed, 37 insertions(+)
create mode 120000 srcpkgs/gf2x-devel
create mode 100644 srcpkgs/gf2x/template
create mode 100644 srcpkgs/gf2x/update
diff --git a/common/shlibs b/common/shlibs
index 0d53e2be7dfa..d3d7954f50b7 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3974,6 +3974,7 @@ libsword-1.8.1.so libsword-1.8.1_6
libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
+libgf2x.so.3 gf2x-1.3.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/gf2x-devel b/srcpkgs/gf2x-devel
new file mode 120000
index 000000000000..4542295e8de7
--- /dev/null
+++ b/srcpkgs/gf2x-devel
@@ -0,0 +1 @@
+gf2x
\ No newline at end of file
diff --git a/srcpkgs/gf2x/template b/srcpkgs/gf2x/template
new file mode 100644
index 000000000000..e9267578a2c6
--- /dev/null
+++ b/srcpkgs/gf2x/template
@@ -0,0 +1,34 @@
+# Template file for 'gf2x'
+pkgname=gf2x
+version=1.3.0
+revision=1
+wrksrc=gf2x-gf2x-${version}
+build_style="gnu-configure"
+hostmakedepends="automake libtool"
+short_desc="C/C++ library for fast arithmetic in GF(2)[x]"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.inria.fr/gf2x/gf2x"
+distfiles="https://gitlab.inria.fr/gf2x/gf2x/-/archive/gf2x-${version}/gf2x-gf2x-${version}.tar.gz"
+checksum=11bcf98b620c60c2ee3b4460b02b7be741f14cfdc26b542f22c92950926575e0
+
+build_options="native"
+
+if [ ! "$build_option_native" ]; then
+ configure_args="--disable-sse3"
+fi
+
+pre_configure() {
+ autoreconf -fi
+}
+
+gf2x-devel_package() {
+ depends="gf2x-${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/pkgconfig"
+ }
+}
diff --git a/srcpkgs/gf2x/update b/srcpkgs/gf2x/update
new file mode 100644
index 000000000000..504503610161
--- /dev/null
+++ b/srcpkgs/gf2x/update
@@ -0,0 +1 @@
+pkgname=gf2x-gf2x
From cf037c607eb202f9fcd5356c669b72c39b4b1440 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 30 Jan 2018 11:02:38 -0300
Subject: [PATCH 2/8] New package: ntl-11.4.4
---
common/shlibs | 1 +
srcpkgs/ntl-devel | 1 +
srcpkgs/ntl/template | 36 ++++++++++++++++++++++++++++++++++++
srcpkgs/ntl/update | 1 +
4 files changed, 39 insertions(+)
create mode 120000 srcpkgs/ntl-devel
create mode 100644 srcpkgs/ntl/template
create mode 100644 srcpkgs/ntl/update
diff --git a/common/shlibs b/common/shlibs
index d3d7954f50b7..137f67fe4383 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3975,6 +3975,7 @@ libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
+libntl.so.43 ntl-11.4.4_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/ntl-devel b/srcpkgs/ntl-devel
new file mode 120000
index 000000000000..fc0a39987329
--- /dev/null
+++ b/srcpkgs/ntl-devel
@@ -0,0 +1 @@
+ntl
\ No newline at end of file
diff --git a/srcpkgs/ntl/template b/srcpkgs/ntl/template
new file mode 100644
index 000000000000..e140298eb559
--- /dev/null
+++ b/srcpkgs/ntl/template
@@ -0,0 +1,36 @@
+# Template file for 'ntl'
+pkgname=ntl
+version=11.4.4
+revision=1
+build_wrksrc="src"
+build_style="configure"
+hostmakedepends="perl"
+makedepends="gmp-devel gf2x-devel"
+short_desc="Library for doing Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://libntl.org"
+distfiles="https://libntl.org/ntl-${version}.tar.gz"
+checksum=9d7f6e82e11a409f151c0de2deb08c0d763baf9834fddfd432bf3d218f8021db
+nocross=yes
+
+build_options="native"
+
+do_configure() {
+ # see http://www.shoup.net/ntl/doc/tour-unix.html
+ ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" \
+ PREFIX="/usr" SHARED="on" NTL_GF2X_LIB="on" \
+ NATIVE="$(vopt_if native 'on' 'off')"
+}
+
+ntl-devel_package() {
+ depends="ntl-${version}_${revision}"
+ depends+=" gmp-devel gf2x-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/share"
+ }
+}
diff --git a/srcpkgs/ntl/update b/srcpkgs/ntl/update
new file mode 100644
index 000000000000..8ccb86344234
--- /dev/null
+++ b/srcpkgs/ntl/update
@@ -0,0 +1 @@
+site="${homepage}/download.html"
From cc613d072d50b6a03f256e8df1ea567cb9fe5dc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 2 Feb 2018 22:42:49 -0300
Subject: [PATCH 3/8] New package: flintlib-2.7.1
---
common/shlibs | 1 +
srcpkgs/flintlib-devel | 1 +
srcpkgs/flintlib/template | 30 ++++++++++++++++++++++++++++++
srcpkgs/flintlib/update | 2 ++
4 files changed, 34 insertions(+)
create mode 120000 srcpkgs/flintlib-devel
create mode 100644 srcpkgs/flintlib/template
create mode 100644 srcpkgs/flintlib/update
diff --git a/common/shlibs b/common/shlibs
index 137f67fe4383..b8a1f7d0a080 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3976,6 +3976,7 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
+libflint.so.15 flintlib-2.7.1_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/flintlib-devel b/srcpkgs/flintlib-devel
new file mode 120000
index 000000000000..7c2633183069
--- /dev/null
+++ b/srcpkgs/flintlib-devel
@@ -0,0 +1 @@
+flintlib
\ No newline at end of file
diff --git a/srcpkgs/flintlib/template b/srcpkgs/flintlib/template
new file mode 100644
index 000000000000..149cb66f3187
--- /dev/null
+++ b/srcpkgs/flintlib/template
@@ -0,0 +1,30 @@
+# Template file for 'flintlib'
+pkgname=flintlib
+version=2.7.1
+revision=1
+wrksrc="flint-${version}"
+build_style="configure"
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-ntl=/usr"
+makedepends="mpfr-devel ntl-devel"
+short_desc="Fast Library for Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://flintlib.org"
+distfiles="https://flintlib.org/flint-${version}.tar.gz"
+checksum=186e2fd9ab67df8a05b122fb018269b382e4babcdb17353c4be1fe364dca481e
+nocross=yes
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ CFLAGS="-D_GNU_SOURCE"
+fi
+
+flintlib-devel_package() {
+ depends="flintlib-${version}_${revision}"
+ depends+=" mpfr-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/flintlib/update b/srcpkgs/flintlib/update
new file mode 100644
index 000000000000..8eee53cf22f2
--- /dev/null
+++ b/srcpkgs/flintlib/update
@@ -0,0 +1,2 @@
+pkgname=flint
+site="${homepage}/downloads.html"
From 9b51d70e928dcda490847e50f8f1fe702737c71c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 4 Feb 2018 01:00:19 -0300
Subject: [PATCH 4/8] New package: arb-2.19.0
---
common/shlibs | 1 +
srcpkgs/arb-devel | 1 +
srcpkgs/arb/template | 29 +++++++++++++++++++++++++++++
3 files changed, 31 insertions(+)
create mode 120000 srcpkgs/arb-devel
create mode 100644 srcpkgs/arb/template
diff --git a/common/shlibs b/common/shlibs
index b8a1f7d0a080..d4a2cee990e9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3977,6 +3977,7 @@ libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
libflint.so.15 flintlib-2.7.1_1
+libarb.so.2 arb-2.19.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/arb-devel b/srcpkgs/arb-devel
new file mode 120000
index 000000000000..456b9f00a86c
--- /dev/null
+++ b/srcpkgs/arb-devel
@@ -0,0 +1 @@
+arb
\ No newline at end of file
diff --git a/srcpkgs/arb/template b/srcpkgs/arb/template
new file mode 100644
index 000000000000..7c7df0aace15
--- /dev/null
+++ b/srcpkgs/arb/template
@@ -0,0 +1,29 @@
+# Template file for 'arb'
+pkgname=arb
+version=2.19.0
+revision=1
+build_style="configure"
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
+makedepends="flintlib-devel"
+short_desc="C library for arbitrary-precision interval arithmetic"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://arblib.org"
+distfiles="https://github.com/fredrik-johansson/arb/archive/${version}.tar.gz"
+checksum=0aec6b492b6e9a543bdb3287a91f976951e2ba74fd4de942e692e21f7edbcf13
+nocross=yes
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ CFLAGS="-D_GNU_SOURCE"
+fi
+
+arb-devel_package() {
+ depends="arb-${version}_${revision}"
+ depends+=" flintlib-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 09028147864963ac59cb851cbac9bc22b18d8d97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 1 Jun 2020 14:50:01 -0300
Subject: [PATCH 5/8] New package: eclib-20210318
---
common/shlibs | 1 +
srcpkgs/eclib-devel | 1 +
srcpkgs/eclib/patches/set_precision.patch | 34 +++++++++++++++++++++++
srcpkgs/eclib/template | 30 ++++++++++++++++++++
4 files changed, 66 insertions(+)
create mode 120000 srcpkgs/eclib-devel
create mode 100644 srcpkgs/eclib/patches/set_precision.patch
create mode 100644 srcpkgs/eclib/template
diff --git a/common/shlibs b/common/shlibs
index d4a2cee990e9..a7c384e15f0c 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3978,6 +3978,7 @@ libgf2x.so.3 gf2x-1.3.0_1
libntl.so.43 ntl-11.4.4_1
libflint.so.15 flintlib-2.7.1_1
libarb.so.2 arb-2.19.0_1
+libec.so.7 eclib-20210318_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/eclib-devel b/srcpkgs/eclib-devel
new file mode 120000
index 000000000000..d29e610e9249
--- /dev/null
+++ b/srcpkgs/eclib-devel
@@ -0,0 +1 @@
+eclib
\ No newline at end of file
diff --git a/srcpkgs/eclib/patches/set_precision.patch b/srcpkgs/eclib/patches/set_precision.patch
new file mode 100644
index 000000000000..d1b6072ff399
--- /dev/null
+++ b/srcpkgs/eclib/patches/set_precision.patch
@@ -0,0 +1,34 @@
+This changes 0.3 by 0.3L, otherwise tests fail in i686 due to different rounding.
+
+See: https://github.com/JohnCremona/eclib/issues/68
+
+--- libsrc/eclib/interface.h 2021-03-18 12:22:52.000000000 -0300
++++ libsrc/eclib/interface.h 2021-04-05 15:15:52.355310137 -0300
+@@ -240,7 +240,7 @@
+
+ // Set internal precision to n bits and output precision to (0.3*n)-1 decimal places
+ inline void set_precision(long n)
+-{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3*n)-1);}
++{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3L*n)-1);}
+
+ // Mostly for backward compatibility (used in saturate.cc) or for
+ // temporarily changing internal precision when no output is relevant:
+@@ -252,7 +252,7 @@
+ {long n; cerr<<prompt<<": "; cin>>n; set_precision(n);}
+
+ // read current precision converted to decimal (approximately)
+-inline long decimal_precision() {return long(RR::precision()*0.3);}
++inline long decimal_precision() {return long(RR::precision()*0.3L);}
+
+ // read current bit precision
+ inline long bit_precision() {return RR::precision();}
+@@ -289,7 +289,7 @@
+ inline int is_approx_zero(double x) {return fabs(x)<1e-10;}
+
+ // We cannot set internal bit precision in this mode, so we just set the output decimal precision
+-inline void set_precision(long n) {cout.precision(min(15,long(0.3*n)));}
++inline void set_precision(long n) {cout.precision(min(15,long(0.3L*n)));}
+ inline void set_precision(const string prompt) {cout.precision(15);}
+ #define Pi() 3.1415926535897932384626433832795028841
+ #define Euler() (0.57721566490153286060651209008240243104)
+
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
new file mode 100644
index 000000000000..e545d06eb5e4
--- /dev/null
+++ b/srcpkgs/eclib/template
@@ -0,0 +1,30 @@
+# Template file for 'eclib'
+pkgname=eclib
+version=20210318
+revision=1
+build_style=gnu-configure
+configure_args="--with-flint --with-boost"
+hostmakedepends="automake autoconf-archive libtool"
+makedepends="pari-devel ntl-devel flintlib-devel boost-devel"
+short_desc="Elliptic curve library, includes mwrank"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/JohnCremona/eclib"
+distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
+checksum=8ca611e818cc3acdd54c800be66f66219a52603516bff048d350dd1e95605484
+
+pre_configure() {
+ ./autogen.sh
+}
+
+eclib-devel_package() {
+ depends="eclib-${version}_${revision}"
+ depends+=" ntl-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove "usr/include"
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove "usr/lib/pkgconfig"
+ }
+}
From 0b860be4ab5af9518c683a67f1ae2dd86925c193 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 8 Apr 2021 22:58:13 -0300
Subject: [PATCH 6/8] eclib: update to 20210408.
---
srcpkgs/eclib/patches/set_precision.patch | 34 -----------------------
srcpkgs/eclib/template | 4 +--
2 files changed, 2 insertions(+), 36 deletions(-)
delete mode 100644 srcpkgs/eclib/patches/set_precision.patch
diff --git a/srcpkgs/eclib/patches/set_precision.patch b/srcpkgs/eclib/patches/set_precision.patch
deleted file mode 100644
index d1b6072ff399..000000000000
--- a/srcpkgs/eclib/patches/set_precision.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-This changes 0.3 by 0.3L, otherwise tests fail in i686 due to different rounding.
-
-See: https://github.com/JohnCremona/eclib/issues/68
-
---- libsrc/eclib/interface.h 2021-03-18 12:22:52.000000000 -0300
-+++ libsrc/eclib/interface.h 2021-04-05 15:15:52.355310137 -0300
-@@ -240,7 +240,7 @@
-
- // Set internal precision to n bits and output precision to (0.3*n)-1 decimal places
- inline void set_precision(long n)
--{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3*n)-1);}
-+{RR::SetPrecision(n); RR::SetOutputPrecision(long(0.3L*n)-1);}
-
- // Mostly for backward compatibility (used in saturate.cc) or for
- // temporarily changing internal precision when no output is relevant:
-@@ -252,7 +252,7 @@
- {long n; cerr<<prompt<<": "; cin>>n; set_precision(n);}
-
- // read current precision converted to decimal (approximately)
--inline long decimal_precision() {return long(RR::precision()*0.3);}
-+inline long decimal_precision() {return long(RR::precision()*0.3L);}
-
- // read current bit precision
- inline long bit_precision() {return RR::precision();}
-@@ -289,7 +289,7 @@
- inline int is_approx_zero(double x) {return fabs(x)<1e-10;}
-
- // We cannot set internal bit precision in this mode, so we just set the output decimal precision
--inline void set_precision(long n) {cout.precision(min(15,long(0.3*n)));}
-+inline void set_precision(long n) {cout.precision(min(15,long(0.3L*n)));}
- inline void set_precision(const string prompt) {cout.precision(15);}
- #define Pi() 3.1415926535897932384626433832795028841
- #define Euler() (0.57721566490153286060651209008240243104)
-
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
index e545d06eb5e4..542ae4aae14f 100644
--- a/srcpkgs/eclib/template
+++ b/srcpkgs/eclib/template
@@ -1,6 +1,6 @@
# Template file for 'eclib'
pkgname=eclib
-version=20210318
+version=20210408
revision=1
build_style=gnu-configure
configure_args="--with-flint --with-boost"
@@ -11,7 +11,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://github.com/JohnCremona/eclib"
distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
-checksum=8ca611e818cc3acdd54c800be66f66219a52603516bff048d350dd1e95605484
+checksum=5354ea8edfedff7f10adeb8c5f8f3705dbeccb56e2840ab1eb2b3fad981c0e22
pre_configure() {
./autogen.sh
From d039ed104203f1c88d2af7075f645d5c18f3ae1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Thu, 13 May 2021 15:24:21 -0300
Subject: [PATCH 7/8] eclib: update to 20210503.
---
srcpkgs/eclib/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
index 542ae4aae14f..bf98c22c8531 100644
--- a/srcpkgs/eclib/template
+++ b/srcpkgs/eclib/template
@@ -1,6 +1,6 @@
# Template file for 'eclib'
pkgname=eclib
-version=20210408
+version=20210503
revision=1
build_style=gnu-configure
configure_args="--with-flint --with-boost"
@@ -11,7 +11,7 @@ maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://github.com/JohnCremona/eclib"
distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
-checksum=5354ea8edfedff7f10adeb8c5f8f3705dbeccb56e2840ab1eb2b3fad981c0e22
+checksum=b742e322f5aeffef7256c05a9b9f744a8f34cb52777c62764cce07a49b1d32fa
pre_configure() {
./autogen.sh
From 1d0de43f0a5cb01577362e8272d7780e910f2575 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@gmail.com>
Date: Fri, 6 Aug 2021 16:32:24 -0300
Subject: [PATCH 8/8] Update srcpkgs/arb/template
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Érico Nogueira Rolim <34201958+ericonr@users.noreply.github.com>
---
srcpkgs/arb/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/arb/template b/srcpkgs/arb/template
index 7c7df0aace15..8dc6da4a9488 100644
--- a/srcpkgs/arb/template
+++ b/srcpkgs/arb/template
@@ -2,7 +2,7 @@
pkgname=arb
version=2.19.0
revision=1
-build_style="configure"
+build_style=configure
configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
makedepends="flintlib-devel"
short_desc="C library for arbitrary-precision interval arithmetic"
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (26 preceding siblings ...)
2021-08-06 19:32 ` tornaria
@ 2021-08-06 19:36 ` tornaria
2021-08-06 19:44 ` ericonr
` (41 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-06 19:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
New review comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684463684
Comment:
Somehow I feel uneasy about that.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (27 preceding siblings ...)
2021-08-06 19:36 ` [PR REVIEW] " tornaria
@ 2021-08-06 19:44 ` ericonr
2021-08-06 19:44 ` ericonr
` (40 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 214 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684467393
Comment:
This is done because otherwise parsing is ambiguous and that sucks.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (28 preceding siblings ...)
2021-08-06 19:44 ` ericonr
@ 2021-08-06 19:44 ` ericonr
2021-08-06 20:02 ` tornaria
` (39 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 19:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 191 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684467557
Comment:
And it helps with updates, in some occasions
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (29 preceding siblings ...)
2021-08-06 19:44 ` ericonr
@ 2021-08-06 20:02 ` tornaria
2021-08-06 20:05 ` ericonr
` (38 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-06 20:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]
New review comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684476151
Comment:
I added this to `common/options.description` in #29997 (see 2274429). There is a discussion about this in that PR.
My intention is to have an easy way to recompile math software for native arch. Depending on the package sometimes is sse3, sometimes is more. In this case the library also uses sse4.1 and pclmul, but they are dependents so `--disable-sse3` is enough to disable all of that is not generic (x86_64 implies sse2 but nothing more).
Not disabling sse3 as above means that the library will be compiled with -msse3, -msse41, -mpclmul, ... and maybe also -march=native, etc, so that all the options available in the current cpu will be used.
In general, different software have different features, oftentimes they have custom written asm for different architectures so selecting build option "native" will not necessarily be equivalent to just using `-march=native`.
In many cases (like here) one has to be careful because native is the default and it is necessary to make sure the binary actually is generic enough for x86_64 (I'm not sure how to test this -- can a VM disable some sse levels even if the host has them? I have an old core 2 quad (q9550) working (even with 8GB RAM) but that already has sse3!
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (30 preceding siblings ...)
2021-08-06 20:02 ` tornaria
@ 2021-08-06 20:05 ` ericonr
2021-08-06 20:05 ` ericonr
` (37 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 20:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 284 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684477264
Comment:
AFAIK you can test, but I'm not sure it's necessary. We can wait for bug reports, IMO.
Please import the commit into this PR, then :)
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (31 preceding siblings ...)
2021-08-06 20:05 ` ericonr
@ 2021-08-06 20:05 ` ericonr
2021-08-06 20:11 ` tornaria
` (36 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 20:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684477384
Comment:
I wonder if `native_build` would be better.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (32 preceding siblings ...)
2021-08-06 20:05 ` ericonr
@ 2021-08-06 20:11 ` tornaria
2021-08-06 20:48 ` [PR REVIEW] " tornaria
` (35 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-06 20:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 428 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-894494210
Comment:
General comment for @ericonr : Thanks for your detailed review. I will apply all suggestions you made, and update to newer versions for arb, eclib, flintlib, ntl.
I hope this can be merged into void -- I want to help include more math software in void, I can maintain, update, etc.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (33 preceding siblings ...)
2021-08-06 20:11 ` tornaria
@ 2021-08-06 20:48 ` tornaria
2021-08-06 20:48 ` tornaria
` (34 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-06 20:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 258 bytes --]
New review comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684496524
Comment:
I don't remember from the top of my head; I did try it and something didn't work. I will retry it and comment.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (34 preceding siblings ...)
2021-08-06 20:48 ` [PR REVIEW] " tornaria
@ 2021-08-06 20:48 ` tornaria
2021-08-06 20:52 ` tornaria
` (33 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-06 20:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 306 bytes --]
New review comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684496539
Comment:
Note that many times `makedepends` has more packages than `depends` for the -devel package, just not in this case, that's why I tried to be explicit about it.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (35 preceding siblings ...)
2021-08-06 20:48 ` tornaria
@ 2021-08-06 20:52 ` tornaria
2021-08-06 21:00 ` tornaria
` (32 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-06 20:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
New review comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684498634
Comment:
```
aclocal
libtoolize --automake
automake --add-missing
autoconf
```
I'll try to check if `autoreconf -fi` is enough.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (36 preceding siblings ...)
2021-08-06 20:52 ` tornaria
@ 2021-08-06 21:00 ` tornaria
2021-08-06 21:22 ` ericonr
` (31 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-06 21:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 207 bytes --]
New review comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684502077
Comment:
Isn't `"${homepage}"` the default for `site` in any case?
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (37 preceding siblings ...)
2021-08-06 21:00 ` tornaria
@ 2021-08-06 21:22 ` ericonr
2021-08-06 21:24 ` ericonr
` (30 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 21:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 237 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684510465
Comment:
Right, but if homepage moves to a github website or whatever the path won't exist anymore.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (38 preceding siblings ...)
2021-08-06 21:22 ` ericonr
@ 2021-08-06 21:24 ` ericonr
2021-08-07 0:12 ` ericonr
` (29 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-06 21:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 180 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684511172
Comment:
Ok, that's fair. Can leave as is.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (39 preceding siblings ...)
2021-08-06 21:24 ` ericonr
@ 2021-08-07 0:12 ` ericonr
2021-08-08 23:04 ` tornaria
` (28 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-07 0:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 471 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-894574407
Comment:
My `_GNU_SOURCE` suggestion was apparently a bad idea for one of the packages, feel free to move it back to a conditional for musl.
Turns out glibc will define its own `fdiv` function if you include `<tgmath.h>` with `_GNU_SOURCE` defined, so we can't define it for glibc to avoid polluting the namespace and causing conflicts.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (40 preceding siblings ...)
2021-08-07 0:12 ` ericonr
@ 2021-08-08 23:04 ` tornaria
2021-08-08 23:22 ` [PR PATCH] [Updated] " tornaria
` (27 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-08 23:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 516 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-894868859
Comment:
> My `_GNU_SOURCE` suggestion was apparently a bad idea for one of the packages, feel free to move it back to a conditional for musl.
I actually went ahead and fixed it at the source: https://github.com/wbhart/flint2/pull/988 and https://github.com/fredrik-johansson/arb/pull/376. My new version will include those as patches which they will hopefully be merged upstream.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR PATCH] [Updated] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (41 preceding siblings ...)
2021-08-08 23:04 ` tornaria
@ 2021-08-08 23:22 ` tornaria
2021-08-08 23:24 ` [PR REVIEW] " tornaria
` (26 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-08 23:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages math2
https://github.com/void-linux/void-packages/pull/30032
Math packages: gf2x, ntl, flintlib, arb, eclib
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
#### Notes
- This includes: `gf2x` (see also #29783), `ntl`, `flintlib`, `arb`, `eclib`.
- Everything is tested and check pass in x86_64, x86_64-musl, i686.
EDIT: split in smaller independent PR to ease review.
A patch file from https://github.com/void-linux/void-packages/pull/30032.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-math2-30032.patch --]
[-- Type: text/x-diff, Size: 17357 bytes --]
From 19c61ac367cb0a39d7a2e56d622a7fc18dec96eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 29 Jan 2018 11:18:35 -0300
Subject: [PATCH 1/5] New package: gf2x-1.3.0
---
common/options.description | 1 +
common/shlibs | 1 +
srcpkgs/gf2x-devel | 1 +
srcpkgs/gf2x/template | 35 +++++++++++++++++++++++++++++++++++
srcpkgs/gf2x/update | 1 +
5 files changed, 39 insertions(+)
create mode 120000 srcpkgs/gf2x-devel
create mode 100644 srcpkgs/gf2x/template
create mode 100644 srcpkgs/gf2x/update
diff --git a/common/options.description b/common/options.description
index 06360211a23f..46e24a140e52 100644
--- a/common/options.description
+++ b/common/options.description
@@ -49,6 +49,7 @@ desc_option_lz4="Enable support for LZ4 compression format"
desc_option_lzo="Enable support for LZO compression format"
desc_option_microhttpd="Enable support for microhttpd"
desc_option_mpcdec="Enable support for the Musepack decoder"
+desc_option_native_build="Enable instruction subsets supported by the build computer"
desc_option_notify="Enable support for desktop notifications (libnotify)"
desc_option_nvenc="Enable support for NVENC codecs"
desc_option_openblas="Enable support for OpenBLAS accelerated linear algebra"
diff --git a/common/shlibs b/common/shlibs
index 5affb5dc09fd..6ee93e48bfc9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4008,6 +4008,7 @@ libsword-1.8.1.so libsword-1.8.1_6
libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
+libgf2x.so.3 gf2x-1.3.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/gf2x-devel b/srcpkgs/gf2x-devel
new file mode 120000
index 000000000000..4542295e8de7
--- /dev/null
+++ b/srcpkgs/gf2x-devel
@@ -0,0 +1 @@
+gf2x
\ No newline at end of file
diff --git a/srcpkgs/gf2x/template b/srcpkgs/gf2x/template
new file mode 100644
index 000000000000..918a9f2d0d5a
--- /dev/null
+++ b/srcpkgs/gf2x/template
@@ -0,0 +1,35 @@
+# Template file for 'gf2x'
+pkgname=gf2x
+version=1.3.0
+revision=1
+wrksrc=gf2x-gf2x-${version}
+build_style=gnu-configure
+hostmakedepends="automake libtool"
+short_desc="C/C++ library for fast arithmetic in GF(2)[x]"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.inria.fr/gf2x/gf2x"
+distfiles="https://gitlab.inria.fr/gf2x/gf2x/-/archive/gf2x-${version}/gf2x-gf2x-${version}.tar.gz"
+checksum=11bcf98b620c60c2ee3b4460b02b7be741f14cfdc26b542f22c92950926575e0
+
+build_options="native_build"
+
+if [ -z "$build_option_native_build" ]; then
+ # this disables sse3, ssse3, sse41, pclmul
+ configure_args="--disable-sse3"
+fi
+
+pre_configure() {
+ autoreconf -fi
+}
+
+gf2x-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ vmove usr/lib/pkgconfig
+ }
+}
diff --git a/srcpkgs/gf2x/update b/srcpkgs/gf2x/update
new file mode 100644
index 000000000000..504503610161
--- /dev/null
+++ b/srcpkgs/gf2x/update
@@ -0,0 +1 @@
+pkgname=gf2x-gf2x
From 424c5b7e14b67d4a523ce738764b4d33d7bd50d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 30 Jan 2018 11:02:38 -0300
Subject: [PATCH 2/5] New package: ntl-11.5.1
---
common/shlibs | 1 +
srcpkgs/ntl-devel | 1 +
srcpkgs/ntl/template | 36 ++++++++++++++++++++++++++++++++++++
srcpkgs/ntl/update | 1 +
4 files changed, 39 insertions(+)
create mode 120000 srcpkgs/ntl-devel
create mode 100644 srcpkgs/ntl/template
create mode 100644 srcpkgs/ntl/update
diff --git a/common/shlibs b/common/shlibs
index 6ee93e48bfc9..a35e0d24a9c2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4009,6 +4009,7 @@ libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
+libntl.so.44 ntl-11.5.1_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/ntl-devel b/srcpkgs/ntl-devel
new file mode 120000
index 000000000000..fc0a39987329
--- /dev/null
+++ b/srcpkgs/ntl-devel
@@ -0,0 +1 @@
+ntl
\ No newline at end of file
diff --git a/srcpkgs/ntl/template b/srcpkgs/ntl/template
new file mode 100644
index 000000000000..9020c6b5ce68
--- /dev/null
+++ b/srcpkgs/ntl/template
@@ -0,0 +1,36 @@
+# Template file for 'ntl'
+pkgname=ntl
+version=11.5.1
+revision=1
+build_wrksrc="src"
+build_style=configure
+hostmakedepends="perl libtool"
+makedepends="gmp-devel gf2x-devel"
+short_desc="Library for doing Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://libntl.org"
+distfiles="https://libntl.org/ntl-${version}.tar.gz"
+checksum=210d06c31306cbc6eaf6814453c56c776d9d8e8df36d74eb306f6a523d1c6a8a
+nocross=yes # runs binaries built for target
+
+build_options="native_build"
+
+do_configure() {
+ # see http://www.shoup.net/ntl/doc/tour-unix.html
+ ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" LIBTOOL="libtool" \
+ PREFIX="/usr" SHARED="on" NTL_GF2X_LIB="on" \
+ NATIVE="$(vopt_if native_build 'on' 'off')"
+}
+
+ntl-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ depends+=" ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ vmove usr/share
+ }
+}
diff --git a/srcpkgs/ntl/update b/srcpkgs/ntl/update
new file mode 100644
index 000000000000..7ca2974b146f
--- /dev/null
+++ b/srcpkgs/ntl/update
@@ -0,0 +1 @@
+site="https://libntl.org/download.html"
From fa89aee97db8aa2df40713b8ea7019437730e736 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 2 Feb 2018 22:42:49 -0300
Subject: [PATCH 3/5] New package: flintlib-2.8.0
---
common/shlibs | 1 +
srcpkgs/flintlib-devel | 1 +
.../0001-fix-compilation-with-musl-libc.patch | 80 +++++++++++++++++++
srcpkgs/flintlib/template | 25 ++++++
srcpkgs/flintlib/update | 3 +
5 files changed, 110 insertions(+)
create mode 120000 srcpkgs/flintlib-devel
create mode 100644 srcpkgs/flintlib/patches/0001-fix-compilation-with-musl-libc.patch
create mode 100644 srcpkgs/flintlib/template
create mode 100644 srcpkgs/flintlib/update
diff --git a/common/shlibs b/common/shlibs
index a35e0d24a9c2..bfd2ead4bcb9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4010,6 +4010,7 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
+libflint.so.16 flintlib-2.8.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/flintlib-devel b/srcpkgs/flintlib-devel
new file mode 120000
index 000000000000..7c2633183069
--- /dev/null
+++ b/srcpkgs/flintlib-devel
@@ -0,0 +1 @@
+flintlib
\ No newline at end of file
diff --git a/srcpkgs/flintlib/patches/0001-fix-compilation-with-musl-libc.patch b/srcpkgs/flintlib/patches/0001-fix-compilation-with-musl-libc.patch
new file mode 100644
index 000000000000..646af0ce43d9
--- /dev/null
+++ b/srcpkgs/flintlib/patches/0001-fix-compilation-with-musl-libc.patch
@@ -0,0 +1,80 @@
+From 2a5b3f8bda5a50cb8a17db0c65fba489d1bf7c71 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Fri, 6 Aug 2021 23:57:10 -0300
+Subject: [PATCH] fix compilation with musl libc
+
+Reported upstream at https://github.com/wbhart/flint2/pull/988
+
+---
+ fmpz.h | 3 +++
+ fmpz_mod_poly_factor/factor_distinct_deg_threaded.c | 1 +
+ fmpz_poly/taylor_shift_divconquer.c | 1 +
+ fmpz_poly/taylor_shift_multi_mod_threaded.c | 1 +
+ nmod_poly_factor/factor_distinct_deg_threaded.c | 1 +
+ 5 files changed, 7 insertions(+)
+
+diff --git a/fmpz.h b/fmpz.h
+index bb9aa71c9..a091e082e 100644
+--- a/fmpz.h
++++ b/fmpz.h
+@@ -32,6 +32,9 @@
+ #include "fmpz-conversions.h"
+
+ #if FLINT_USES_PTHREAD
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
+ #include <pthread.h>
+ #endif
+
+diff --git a/fmpz_mod_poly_factor/factor_distinct_deg_threaded.c b/fmpz_mod_poly_factor/factor_distinct_deg_threaded.c
+index 7a0f8cd6d..48ae530e6 100644
+--- a/fmpz_mod_poly_factor/factor_distinct_deg_threaded.c
++++ b/fmpz_mod_poly_factor/factor_distinct_deg_threaded.c
+@@ -15,6 +15,7 @@
+ #define ulong ulongxx/* interferes with system includes */
+
+ #include <math.h>
++#define _GNU_SOURCE
+ #include <pthread.h>
+
+ #undef ulong
+diff --git a/fmpz_poly/taylor_shift_divconquer.c b/fmpz_poly/taylor_shift_divconquer.c
+index 9c1397f3e..608c64a96 100644
+--- a/fmpz_poly/taylor_shift_divconquer.c
++++ b/fmpz_poly/taylor_shift_divconquer.c
+@@ -11,6 +11,7 @@
+ */
+
+ #include <math.h>
++#define _GNU_SOURCE
+ #include <pthread.h>
+ #include <gmp.h>
+ #include "flint.h"
+diff --git a/fmpz_poly/taylor_shift_multi_mod_threaded.c b/fmpz_poly/taylor_shift_multi_mod_threaded.c
+index 87bbe251d..b54886655 100644
+--- a/fmpz_poly/taylor_shift_multi_mod_threaded.c
++++ b/fmpz_poly/taylor_shift_multi_mod_threaded.c
+@@ -10,6 +10,7 @@
+ (at your option) any later version. See <https://www.gnu.org/licenses/>.
+ */
+
++#define _GNU_SOURCE
+ #include <pthread.h>
+ #include <gmp.h>
+ #include "flint.h"
+diff --git a/nmod_poly_factor/factor_distinct_deg_threaded.c b/nmod_poly_factor/factor_distinct_deg_threaded.c
+index 272dd871f..b43765fe4 100644
+--- a/nmod_poly_factor/factor_distinct_deg_threaded.c
++++ b/nmod_poly_factor/factor_distinct_deg_threaded.c
+@@ -15,6 +15,7 @@
+ #define ulong ulongxx/* interferes with system includes */
+
+ #include <math.h>
++#define _GNU_SOURCE
+ #include <pthread.h>
+
+ #undef ulong
+--
+2.32.0
+
diff --git a/srcpkgs/flintlib/template b/srcpkgs/flintlib/template
new file mode 100644
index 000000000000..c8cfca9b7a59
--- /dev/null
+++ b/srcpkgs/flintlib/template
@@ -0,0 +1,25 @@
+# Template file for 'flintlib'
+pkgname=flintlib
+version=2.8.0
+revision=1
+wrksrc="flint-${version}"
+build_style=configure
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-ntl=/usr"
+makedepends="mpfr-devel ntl-devel"
+short_desc="Fast Library for Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://flintlib.org"
+distfiles="https://flintlib.org/flint-${version}.tar.gz"
+checksum=584235cdc39d779d9920eaef16fe084f3c26ffeeea003a3fff64a20a0f33449e
+
+flintlib-devel_package() {
+ depends="flintlib>=${version}_${revision}"
+ depends+=" mpfr-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ }
+}
diff --git a/srcpkgs/flintlib/update b/srcpkgs/flintlib/update
new file mode 100644
index 000000000000..21d6ab4bae5b
--- /dev/null
+++ b/srcpkgs/flintlib/update
@@ -0,0 +1,3 @@
+# package was named 'flintlib' because of another package
+pkgname=flint
+site="https://flintlib.org/downloads.html"
From 2f3225ab0fd7c7d334db7cde04a88c250bfffba2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 4 Feb 2018 01:00:19 -0300
Subject: [PATCH 4/5] New package: arb-2.20.0
---
common/shlibs | 1 +
srcpkgs/arb-devel | 1 +
.../0001-fix-compilation-with-musl-libc.patch | 43 +++++++++++++++++++
srcpkgs/arb/template | 24 +++++++++++
4 files changed, 69 insertions(+)
create mode 120000 srcpkgs/arb-devel
create mode 100644 srcpkgs/arb/patches/0001-fix-compilation-with-musl-libc.patch
create mode 100644 srcpkgs/arb/template
diff --git a/common/shlibs b/common/shlibs
index bfd2ead4bcb9..43c81b9afab8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4011,6 +4011,7 @@ libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
libflint.so.16 flintlib-2.8.0_1
+libarb.so.2 arb-2.20.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/arb-devel b/srcpkgs/arb-devel
new file mode 120000
index 000000000000..456b9f00a86c
--- /dev/null
+++ b/srcpkgs/arb-devel
@@ -0,0 +1 @@
+arb
\ No newline at end of file
diff --git a/srcpkgs/arb/patches/0001-fix-compilation-with-musl-libc.patch b/srcpkgs/arb/patches/0001-fix-compilation-with-musl-libc.patch
new file mode 100644
index 000000000000..b6f4c5d86ee0
--- /dev/null
+++ b/srcpkgs/arb/patches/0001-fix-compilation-with-musl-libc.patch
@@ -0,0 +1,43 @@
+From 65a570aad78d30539cb2cc7facd30cc676334da0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sat, 7 Aug 2021 00:25:49 -0300
+Subject: [PATCH] fix compilation with musl libc
+
+Reported upstream at https://github.com/fredrik-johansson/arb/pull/376
+
+---
+ acb_poly/powsum_series_naive_threaded.c | 2 +-
+ partitions/fmpz_fmpz.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/acb_poly/powsum_series_naive_threaded.c b/acb_poly/powsum_series_naive_threaded.c
+index b665c3cb..acf5f401 100644
+--- a/acb_poly/powsum_series_naive_threaded.c
++++ b/acb_poly/powsum_series_naive_threaded.c
+@@ -9,8 +9,8 @@
+ (at your option) any later version. See <http://www.gnu.org/licenses/>.
+ */
+
+-#include <pthread.h>
+ #include "acb_poly.h"
++#include <pthread.h>
+
+ typedef struct
+ {
+diff --git a/partitions/fmpz_fmpz.c b/partitions/fmpz_fmpz.c
+index 3b63489d..f3913f6b 100644
+--- a/partitions/fmpz_fmpz.c
++++ b/partitions/fmpz_fmpz.c
+@@ -9,8 +9,8 @@
+ (at your option) any later version. See <http://www.gnu.org/licenses/>.
+ */
+
+-#include <pthread.h>
+ #include "partitions.h"
++#include <pthread.h>
+
+ /* defined in flint*/
+ #define NUMBER_OF_SMALL_PARTITIONS 128
+--
+2.32.0
+
diff --git a/srcpkgs/arb/template b/srcpkgs/arb/template
new file mode 100644
index 000000000000..0b1f333b3909
--- /dev/null
+++ b/srcpkgs/arb/template
@@ -0,0 +1,24 @@
+# Template file for 'arb'
+pkgname=arb
+version=2.20.0
+revision=1
+build_style=configure
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
+makedepends="flintlib-devel"
+short_desc="C library for arbitrary-precision interval arithmetic"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://arblib.org"
+distfiles="https://github.com/fredrik-johansson/arb/archive/${version}.tar.gz"
+checksum=d2f186b10590c622c11d1ca190c01c3da08bac9bc04e84cb591534b917faffe7
+
+arb-devel_package() {
+ depends="arb>=${version}_${revision}"
+ depends+=" ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ }
+}
From 79b992b5a972401a6a91e576ab001e5f09037a73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 1 Jun 2020 14:50:01 -0300
Subject: [PATCH 5/5] New package: eclib-20210625
---
common/shlibs | 1 +
srcpkgs/eclib-devel | 1 +
srcpkgs/eclib/template | 30 ++++++++++++++++++++++++++++++
3 files changed, 32 insertions(+)
create mode 120000 srcpkgs/eclib-devel
create mode 100644 srcpkgs/eclib/template
diff --git a/common/shlibs b/common/shlibs
index 43c81b9afab8..6ea8387496c2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4012,6 +4012,7 @@ libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
libflint.so.16 flintlib-2.8.0_1
libarb.so.2 arb-2.20.0_1
+libec.so.8 eclib-20210625_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/eclib-devel b/srcpkgs/eclib-devel
new file mode 120000
index 000000000000..d29e610e9249
--- /dev/null
+++ b/srcpkgs/eclib-devel
@@ -0,0 +1 @@
+eclib
\ No newline at end of file
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
new file mode 100644
index 000000000000..4f36a16287b5
--- /dev/null
+++ b/srcpkgs/eclib/template
@@ -0,0 +1,30 @@
+# Template file for 'eclib'
+pkgname=eclib
+version=20210625
+revision=1
+build_style=gnu-configure
+configure_args="--with-flint --with-boost"
+hostmakedepends="automake autoconf-archive libtool"
+makedepends="pari-devel ntl-devel flintlib-devel boost-devel"
+short_desc="Elliptic curve library, includes mwrank"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/JohnCremona/eclib"
+distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
+checksum=00333fd36afd237c9e6e410c7ab98536ddcd7fdc430e6837fe293247b835c572
+
+pre_configure() {
+ autoreconf -fi
+}
+
+eclib-devel_package() {
+ depends="eclib>=${version}_${revision}"
+ depends+=" ntl-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ vmove usr/lib/pkgconfig
+ }
+}
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (42 preceding siblings ...)
2021-08-08 23:22 ` [PR PATCH] [Updated] " tornaria
@ 2021-08-08 23:24 ` tornaria
2021-08-08 23:25 ` tornaria
` (25 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-08 23:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
New review comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684844201
Comment:
- ntl has a custom configure perl script which runs binaries built for target.
- flintlib and arb should cross-compile fine once ntl is packaged
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (43 preceding siblings ...)
2021-08-08 23:24 ` [PR REVIEW] " tornaria
@ 2021-08-08 23:25 ` tornaria
2021-08-08 23:25 ` tornaria
` (24 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-08 23:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]
New review comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684844201
Comment:
- ntl has a custom configure perl script which runs binaries built for target. I added a comment in the template.
- flintlib and arb should cross-compile fine once ntl is packaged
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (44 preceding siblings ...)
2021-08-08 23:25 ` tornaria
@ 2021-08-08 23:25 ` tornaria
2021-08-08 23:26 ` tornaria
` (23 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-08 23:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 192 bytes --]
New review comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684844290
Comment:
`autoreconf -fi` is ok so I changed to that.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (45 preceding siblings ...)
2021-08-08 23:25 ` tornaria
@ 2021-08-08 23:26 ` tornaria
2021-08-08 23:30 ` [PR PATCH] [Updated] " tornaria
` (22 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-08 23:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 206 bytes --]
New review comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684844341
Comment:
made a comment in the `update` file itself, hope that's ok
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR PATCH] [Updated] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (46 preceding siblings ...)
2021-08-08 23:26 ` tornaria
@ 2021-08-08 23:30 ` tornaria
2021-08-08 23:30 ` [PR REVIEW] " tornaria
` (21 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-08 23:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages math2
https://github.com/void-linux/void-packages/pull/30032
Math packages: gf2x, ntl, flintlib, arb, eclib
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
#### Notes
- This includes: `gf2x` (see also #29783), `ntl`, `flintlib`, `arb`, `eclib`.
- Everything is tested and check pass in x86_64, x86_64-musl, i686.
EDIT: split in smaller independent PR to ease review.
A patch file from https://github.com/void-linux/void-packages/pull/30032.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-math2-30032.patch --]
[-- Type: text/x-diff, Size: 17377 bytes --]
From 19c61ac367cb0a39d7a2e56d622a7fc18dec96eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 29 Jan 2018 11:18:35 -0300
Subject: [PATCH 1/5] New package: gf2x-1.3.0
---
common/options.description | 1 +
common/shlibs | 1 +
srcpkgs/gf2x-devel | 1 +
srcpkgs/gf2x/template | 35 +++++++++++++++++++++++++++++++++++
srcpkgs/gf2x/update | 1 +
5 files changed, 39 insertions(+)
create mode 120000 srcpkgs/gf2x-devel
create mode 100644 srcpkgs/gf2x/template
create mode 100644 srcpkgs/gf2x/update
diff --git a/common/options.description b/common/options.description
index 06360211a23f..46e24a140e52 100644
--- a/common/options.description
+++ b/common/options.description
@@ -49,6 +49,7 @@ desc_option_lz4="Enable support for LZ4 compression format"
desc_option_lzo="Enable support for LZO compression format"
desc_option_microhttpd="Enable support for microhttpd"
desc_option_mpcdec="Enable support for the Musepack decoder"
+desc_option_native_build="Enable instruction subsets supported by the build computer"
desc_option_notify="Enable support for desktop notifications (libnotify)"
desc_option_nvenc="Enable support for NVENC codecs"
desc_option_openblas="Enable support for OpenBLAS accelerated linear algebra"
diff --git a/common/shlibs b/common/shlibs
index 5affb5dc09fd..6ee93e48bfc9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4008,6 +4008,7 @@ libsword-1.8.1.so libsword-1.8.1_6
libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
+libgf2x.so.3 gf2x-1.3.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/gf2x-devel b/srcpkgs/gf2x-devel
new file mode 120000
index 000000000000..4542295e8de7
--- /dev/null
+++ b/srcpkgs/gf2x-devel
@@ -0,0 +1 @@
+gf2x
\ No newline at end of file
diff --git a/srcpkgs/gf2x/template b/srcpkgs/gf2x/template
new file mode 100644
index 000000000000..918a9f2d0d5a
--- /dev/null
+++ b/srcpkgs/gf2x/template
@@ -0,0 +1,35 @@
+# Template file for 'gf2x'
+pkgname=gf2x
+version=1.3.0
+revision=1
+wrksrc=gf2x-gf2x-${version}
+build_style=gnu-configure
+hostmakedepends="automake libtool"
+short_desc="C/C++ library for fast arithmetic in GF(2)[x]"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.inria.fr/gf2x/gf2x"
+distfiles="https://gitlab.inria.fr/gf2x/gf2x/-/archive/gf2x-${version}/gf2x-gf2x-${version}.tar.gz"
+checksum=11bcf98b620c60c2ee3b4460b02b7be741f14cfdc26b542f22c92950926575e0
+
+build_options="native_build"
+
+if [ -z "$build_option_native_build" ]; then
+ # this disables sse3, ssse3, sse41, pclmul
+ configure_args="--disable-sse3"
+fi
+
+pre_configure() {
+ autoreconf -fi
+}
+
+gf2x-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ vmove usr/lib/pkgconfig
+ }
+}
diff --git a/srcpkgs/gf2x/update b/srcpkgs/gf2x/update
new file mode 100644
index 000000000000..504503610161
--- /dev/null
+++ b/srcpkgs/gf2x/update
@@ -0,0 +1 @@
+pkgname=gf2x-gf2x
From 424c5b7e14b67d4a523ce738764b4d33d7bd50d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 30 Jan 2018 11:02:38 -0300
Subject: [PATCH 2/5] New package: ntl-11.5.1
---
common/shlibs | 1 +
srcpkgs/ntl-devel | 1 +
srcpkgs/ntl/template | 36 ++++++++++++++++++++++++++++++++++++
srcpkgs/ntl/update | 1 +
4 files changed, 39 insertions(+)
create mode 120000 srcpkgs/ntl-devel
create mode 100644 srcpkgs/ntl/template
create mode 100644 srcpkgs/ntl/update
diff --git a/common/shlibs b/common/shlibs
index 6ee93e48bfc9..a35e0d24a9c2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4009,6 +4009,7 @@ libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
+libntl.so.44 ntl-11.5.1_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/ntl-devel b/srcpkgs/ntl-devel
new file mode 120000
index 000000000000..fc0a39987329
--- /dev/null
+++ b/srcpkgs/ntl-devel
@@ -0,0 +1 @@
+ntl
\ No newline at end of file
diff --git a/srcpkgs/ntl/template b/srcpkgs/ntl/template
new file mode 100644
index 000000000000..9020c6b5ce68
--- /dev/null
+++ b/srcpkgs/ntl/template
@@ -0,0 +1,36 @@
+# Template file for 'ntl'
+pkgname=ntl
+version=11.5.1
+revision=1
+build_wrksrc="src"
+build_style=configure
+hostmakedepends="perl libtool"
+makedepends="gmp-devel gf2x-devel"
+short_desc="Library for doing Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://libntl.org"
+distfiles="https://libntl.org/ntl-${version}.tar.gz"
+checksum=210d06c31306cbc6eaf6814453c56c776d9d8e8df36d74eb306f6a523d1c6a8a
+nocross=yes # runs binaries built for target
+
+build_options="native_build"
+
+do_configure() {
+ # see http://www.shoup.net/ntl/doc/tour-unix.html
+ ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" LIBTOOL="libtool" \
+ PREFIX="/usr" SHARED="on" NTL_GF2X_LIB="on" \
+ NATIVE="$(vopt_if native_build 'on' 'off')"
+}
+
+ntl-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ depends+=" ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ vmove usr/share
+ }
+}
diff --git a/srcpkgs/ntl/update b/srcpkgs/ntl/update
new file mode 100644
index 000000000000..7ca2974b146f
--- /dev/null
+++ b/srcpkgs/ntl/update
@@ -0,0 +1 @@
+site="https://libntl.org/download.html"
From 251f7070b355dfac18a4641c7fc8bc321b8deed1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 2 Feb 2018 22:42:49 -0300
Subject: [PATCH 3/5] New package: flintlib-2.8.0
---
common/shlibs | 1 +
srcpkgs/flintlib-devel | 1 +
.../0001-fix-compilation-with-musl-libc.patch | 80 +++++++++++++++++++
srcpkgs/flintlib/template | 25 ++++++
srcpkgs/flintlib/update | 3 +
5 files changed, 110 insertions(+)
create mode 120000 srcpkgs/flintlib-devel
create mode 100644 srcpkgs/flintlib/patches/0001-fix-compilation-with-musl-libc.patch
create mode 100644 srcpkgs/flintlib/template
create mode 100644 srcpkgs/flintlib/update
diff --git a/common/shlibs b/common/shlibs
index a35e0d24a9c2..bfd2ead4bcb9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4010,6 +4010,7 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
+libflint.so.16 flintlib-2.8.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/flintlib-devel b/srcpkgs/flintlib-devel
new file mode 120000
index 000000000000..7c2633183069
--- /dev/null
+++ b/srcpkgs/flintlib-devel
@@ -0,0 +1 @@
+flintlib
\ No newline at end of file
diff --git a/srcpkgs/flintlib/patches/0001-fix-compilation-with-musl-libc.patch b/srcpkgs/flintlib/patches/0001-fix-compilation-with-musl-libc.patch
new file mode 100644
index 000000000000..646af0ce43d9
--- /dev/null
+++ b/srcpkgs/flintlib/patches/0001-fix-compilation-with-musl-libc.patch
@@ -0,0 +1,80 @@
+From 2a5b3f8bda5a50cb8a17db0c65fba489d1bf7c71 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Fri, 6 Aug 2021 23:57:10 -0300
+Subject: [PATCH] fix compilation with musl libc
+
+Reported upstream at https://github.com/wbhart/flint2/pull/988
+
+---
+ fmpz.h | 3 +++
+ fmpz_mod_poly_factor/factor_distinct_deg_threaded.c | 1 +
+ fmpz_poly/taylor_shift_divconquer.c | 1 +
+ fmpz_poly/taylor_shift_multi_mod_threaded.c | 1 +
+ nmod_poly_factor/factor_distinct_deg_threaded.c | 1 +
+ 5 files changed, 7 insertions(+)
+
+diff --git a/fmpz.h b/fmpz.h
+index bb9aa71c9..a091e082e 100644
+--- a/fmpz.h
++++ b/fmpz.h
+@@ -32,6 +32,9 @@
+ #include "fmpz-conversions.h"
+
+ #if FLINT_USES_PTHREAD
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
+ #include <pthread.h>
+ #endif
+
+diff --git a/fmpz_mod_poly_factor/factor_distinct_deg_threaded.c b/fmpz_mod_poly_factor/factor_distinct_deg_threaded.c
+index 7a0f8cd6d..48ae530e6 100644
+--- a/fmpz_mod_poly_factor/factor_distinct_deg_threaded.c
++++ b/fmpz_mod_poly_factor/factor_distinct_deg_threaded.c
+@@ -15,6 +15,7 @@
+ #define ulong ulongxx/* interferes with system includes */
+
+ #include <math.h>
++#define _GNU_SOURCE
+ #include <pthread.h>
+
+ #undef ulong
+diff --git a/fmpz_poly/taylor_shift_divconquer.c b/fmpz_poly/taylor_shift_divconquer.c
+index 9c1397f3e..608c64a96 100644
+--- a/fmpz_poly/taylor_shift_divconquer.c
++++ b/fmpz_poly/taylor_shift_divconquer.c
+@@ -11,6 +11,7 @@
+ */
+
+ #include <math.h>
++#define _GNU_SOURCE
+ #include <pthread.h>
+ #include <gmp.h>
+ #include "flint.h"
+diff --git a/fmpz_poly/taylor_shift_multi_mod_threaded.c b/fmpz_poly/taylor_shift_multi_mod_threaded.c
+index 87bbe251d..b54886655 100644
+--- a/fmpz_poly/taylor_shift_multi_mod_threaded.c
++++ b/fmpz_poly/taylor_shift_multi_mod_threaded.c
+@@ -10,6 +10,7 @@
+ (at your option) any later version. See <https://www.gnu.org/licenses/>.
+ */
+
++#define _GNU_SOURCE
+ #include <pthread.h>
+ #include <gmp.h>
+ #include "flint.h"
+diff --git a/nmod_poly_factor/factor_distinct_deg_threaded.c b/nmod_poly_factor/factor_distinct_deg_threaded.c
+index 272dd871f..b43765fe4 100644
+--- a/nmod_poly_factor/factor_distinct_deg_threaded.c
++++ b/nmod_poly_factor/factor_distinct_deg_threaded.c
+@@ -15,6 +15,7 @@
+ #define ulong ulongxx/* interferes with system includes */
+
+ #include <math.h>
++#define _GNU_SOURCE
+ #include <pthread.h>
+
+ #undef ulong
+--
+2.32.0
+
diff --git a/srcpkgs/flintlib/template b/srcpkgs/flintlib/template
new file mode 100644
index 000000000000..f89cb0750c74
--- /dev/null
+++ b/srcpkgs/flintlib/template
@@ -0,0 +1,25 @@
+# Template file for 'flintlib'
+pkgname=flintlib
+version=2.8.0
+revision=1
+wrksrc="flint-${version}"
+build_style=configure
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-ntl=/usr"
+makedepends="mpfr-devel ntl-devel"
+short_desc="Fast Library for Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://flintlib.org"
+distfiles="https://flintlib.org/flint-${version}.tar.gz"
+checksum=584235cdc39d779d9920eaef16fe084f3c26ffeeea003a3fff64a20a0f33449e
+
+flintlib-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ depends+=" mpfr-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ }
+}
diff --git a/srcpkgs/flintlib/update b/srcpkgs/flintlib/update
new file mode 100644
index 000000000000..21d6ab4bae5b
--- /dev/null
+++ b/srcpkgs/flintlib/update
@@ -0,0 +1,3 @@
+# package was named 'flintlib' because of another package
+pkgname=flint
+site="https://flintlib.org/downloads.html"
From 1bbe8f47865d605e9b0fc0ec30b1810e4324e41a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 4 Feb 2018 01:00:19 -0300
Subject: [PATCH 4/5] New package: arb-2.20.0
---
common/shlibs | 1 +
srcpkgs/arb-devel | 1 +
.../0001-fix-compilation-with-musl-libc.patch | 43 +++++++++++++++++++
srcpkgs/arb/template | 24 +++++++++++
4 files changed, 69 insertions(+)
create mode 120000 srcpkgs/arb-devel
create mode 100644 srcpkgs/arb/patches/0001-fix-compilation-with-musl-libc.patch
create mode 100644 srcpkgs/arb/template
diff --git a/common/shlibs b/common/shlibs
index bfd2ead4bcb9..43c81b9afab8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4011,6 +4011,7 @@ libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
libflint.so.16 flintlib-2.8.0_1
+libarb.so.2 arb-2.20.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/arb-devel b/srcpkgs/arb-devel
new file mode 120000
index 000000000000..456b9f00a86c
--- /dev/null
+++ b/srcpkgs/arb-devel
@@ -0,0 +1 @@
+arb
\ No newline at end of file
diff --git a/srcpkgs/arb/patches/0001-fix-compilation-with-musl-libc.patch b/srcpkgs/arb/patches/0001-fix-compilation-with-musl-libc.patch
new file mode 100644
index 000000000000..b6f4c5d86ee0
--- /dev/null
+++ b/srcpkgs/arb/patches/0001-fix-compilation-with-musl-libc.patch
@@ -0,0 +1,43 @@
+From 65a570aad78d30539cb2cc7facd30cc676334da0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
+Date: Sat, 7 Aug 2021 00:25:49 -0300
+Subject: [PATCH] fix compilation with musl libc
+
+Reported upstream at https://github.com/fredrik-johansson/arb/pull/376
+
+---
+ acb_poly/powsum_series_naive_threaded.c | 2 +-
+ partitions/fmpz_fmpz.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/acb_poly/powsum_series_naive_threaded.c b/acb_poly/powsum_series_naive_threaded.c
+index b665c3cb..acf5f401 100644
+--- a/acb_poly/powsum_series_naive_threaded.c
++++ b/acb_poly/powsum_series_naive_threaded.c
+@@ -9,8 +9,8 @@
+ (at your option) any later version. See <http://www.gnu.org/licenses/>.
+ */
+
+-#include <pthread.h>
+ #include "acb_poly.h"
++#include <pthread.h>
+
+ typedef struct
+ {
+diff --git a/partitions/fmpz_fmpz.c b/partitions/fmpz_fmpz.c
+index 3b63489d..f3913f6b 100644
+--- a/partitions/fmpz_fmpz.c
++++ b/partitions/fmpz_fmpz.c
+@@ -9,8 +9,8 @@
+ (at your option) any later version. See <http://www.gnu.org/licenses/>.
+ */
+
+-#include <pthread.h>
+ #include "partitions.h"
++#include <pthread.h>
+
+ /* defined in flint*/
+ #define NUMBER_OF_SMALL_PARTITIONS 128
+--
+2.32.0
+
diff --git a/srcpkgs/arb/template b/srcpkgs/arb/template
new file mode 100644
index 000000000000..55d0681c4baf
--- /dev/null
+++ b/srcpkgs/arb/template
@@ -0,0 +1,24 @@
+# Template file for 'arb'
+pkgname=arb
+version=2.20.0
+revision=1
+build_style=configure
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
+makedepends="flintlib-devel"
+short_desc="C library for arbitrary-precision interval arithmetic"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://arblib.org"
+distfiles="https://github.com/fredrik-johansson/arb/archive/${version}.tar.gz"
+checksum=d2f186b10590c622c11d1ca190c01c3da08bac9bc04e84cb591534b917faffe7
+
+arb-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ depends+=" ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ }
+}
From bcc0a55f50b70339ec99cffb549114abc8dbfb51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 1 Jun 2020 14:50:01 -0300
Subject: [PATCH 5/5] New package: eclib-20210625
---
common/shlibs | 1 +
srcpkgs/eclib-devel | 1 +
srcpkgs/eclib/template | 30 ++++++++++++++++++++++++++++++
3 files changed, 32 insertions(+)
create mode 120000 srcpkgs/eclib-devel
create mode 100644 srcpkgs/eclib/template
diff --git a/common/shlibs b/common/shlibs
index 43c81b9afab8..6ea8387496c2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4012,6 +4012,7 @@ libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
libflint.so.16 flintlib-2.8.0_1
libarb.so.2 arb-2.20.0_1
+libec.so.8 eclib-20210625_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/eclib-devel b/srcpkgs/eclib-devel
new file mode 120000
index 000000000000..d29e610e9249
--- /dev/null
+++ b/srcpkgs/eclib-devel
@@ -0,0 +1 @@
+eclib
\ No newline at end of file
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
new file mode 100644
index 000000000000..77270bf9166b
--- /dev/null
+++ b/srcpkgs/eclib/template
@@ -0,0 +1,30 @@
+# Template file for 'eclib'
+pkgname=eclib
+version=20210625
+revision=1
+build_style=gnu-configure
+configure_args="--with-flint --with-boost"
+hostmakedepends="automake autoconf-archive libtool"
+makedepends="pari-devel ntl-devel flintlib-devel boost-devel"
+short_desc="Elliptic curve library, includes mwrank"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/JohnCremona/eclib"
+distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
+checksum=00333fd36afd237c9e6e410c7ab98536ddcd7fdc430e6837fe293247b835c572
+
+pre_configure() {
+ autoreconf -fi
+}
+
+eclib-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ depends+=" ntl-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ vmove usr/lib/pkgconfig
+ }
+}
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (47 preceding siblings ...)
2021-08-08 23:30 ` [PR PATCH] [Updated] " tornaria
@ 2021-08-08 23:30 ` tornaria
2021-08-08 23:33 ` tornaria
` (20 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-08 23:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 172 bytes --]
New review comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684844948
Comment:
done for all 5 templates
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (48 preceding siblings ...)
2021-08-08 23:30 ` [PR REVIEW] " tornaria
@ 2021-08-08 23:33 ` tornaria
2021-08-08 23:37 ` tornaria
` (19 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-08 23:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 480 bytes --]
New review comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r684845209
Comment:
I changed site to be explicit and not use `${homepage}`, that's what seems to be done in most templates. I didn't see any notice in the template about syncing with `update`, but I think if the homepage changes for some reason and update-check can't find site anymore it will complain about "no version found" or something like that.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (49 preceding siblings ...)
2021-08-08 23:33 ` tornaria
@ 2021-08-08 23:37 ` tornaria
2021-08-09 2:33 ` [PR PATCH] [Updated] " tornaria
` (18 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-08 23:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-894874170
Comment:
Sorry for the double force-push. I realized a minute too late that I was missing a requested change.
I believe I have addressed all the suggestions.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR PATCH] [Updated] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (50 preceding siblings ...)
2021-08-08 23:37 ` tornaria
@ 2021-08-09 2:33 ` tornaria
2021-08-09 2:40 ` tornaria
` (17 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-09 2:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages math2
https://github.com/void-linux/void-packages/pull/30032
Math packages: gf2x, ntl, flintlib, arb, eclib
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
#### Notes
- This includes: `gf2x` (see also #29783), `ntl`, `flintlib`, `arb`, `eclib`.
- Everything is tested and check pass in x86_64, x86_64-musl, i686.
EDIT: split in smaller independent PR to ease review.
A patch file from https://github.com/void-linux/void-packages/pull/30032.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-math2-30032.patch --]
[-- Type: text/x-diff, Size: 12717 bytes --]
From 19c61ac367cb0a39d7a2e56d622a7fc18dec96eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 29 Jan 2018 11:18:35 -0300
Subject: [PATCH 1/5] New package: gf2x-1.3.0
---
common/options.description | 1 +
common/shlibs | 1 +
srcpkgs/gf2x-devel | 1 +
srcpkgs/gf2x/template | 35 +++++++++++++++++++++++++++++++++++
srcpkgs/gf2x/update | 1 +
5 files changed, 39 insertions(+)
create mode 120000 srcpkgs/gf2x-devel
create mode 100644 srcpkgs/gf2x/template
create mode 100644 srcpkgs/gf2x/update
diff --git a/common/options.description b/common/options.description
index 06360211a23f..46e24a140e52 100644
--- a/common/options.description
+++ b/common/options.description
@@ -49,6 +49,7 @@ desc_option_lz4="Enable support for LZ4 compression format"
desc_option_lzo="Enable support for LZO compression format"
desc_option_microhttpd="Enable support for microhttpd"
desc_option_mpcdec="Enable support for the Musepack decoder"
+desc_option_native_build="Enable instruction subsets supported by the build computer"
desc_option_notify="Enable support for desktop notifications (libnotify)"
desc_option_nvenc="Enable support for NVENC codecs"
desc_option_openblas="Enable support for OpenBLAS accelerated linear algebra"
diff --git a/common/shlibs b/common/shlibs
index 5affb5dc09fd..6ee93e48bfc9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4008,6 +4008,7 @@ libsword-1.8.1.so libsword-1.8.1_6
libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
+libgf2x.so.3 gf2x-1.3.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/gf2x-devel b/srcpkgs/gf2x-devel
new file mode 120000
index 000000000000..4542295e8de7
--- /dev/null
+++ b/srcpkgs/gf2x-devel
@@ -0,0 +1 @@
+gf2x
\ No newline at end of file
diff --git a/srcpkgs/gf2x/template b/srcpkgs/gf2x/template
new file mode 100644
index 000000000000..918a9f2d0d5a
--- /dev/null
+++ b/srcpkgs/gf2x/template
@@ -0,0 +1,35 @@
+# Template file for 'gf2x'
+pkgname=gf2x
+version=1.3.0
+revision=1
+wrksrc=gf2x-gf2x-${version}
+build_style=gnu-configure
+hostmakedepends="automake libtool"
+short_desc="C/C++ library for fast arithmetic in GF(2)[x]"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.inria.fr/gf2x/gf2x"
+distfiles="https://gitlab.inria.fr/gf2x/gf2x/-/archive/gf2x-${version}/gf2x-gf2x-${version}.tar.gz"
+checksum=11bcf98b620c60c2ee3b4460b02b7be741f14cfdc26b542f22c92950926575e0
+
+build_options="native_build"
+
+if [ -z "$build_option_native_build" ]; then
+ # this disables sse3, ssse3, sse41, pclmul
+ configure_args="--disable-sse3"
+fi
+
+pre_configure() {
+ autoreconf -fi
+}
+
+gf2x-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ vmove usr/lib/pkgconfig
+ }
+}
diff --git a/srcpkgs/gf2x/update b/srcpkgs/gf2x/update
new file mode 100644
index 000000000000..504503610161
--- /dev/null
+++ b/srcpkgs/gf2x/update
@@ -0,0 +1 @@
+pkgname=gf2x-gf2x
From 424c5b7e14b67d4a523ce738764b4d33d7bd50d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 30 Jan 2018 11:02:38 -0300
Subject: [PATCH 2/5] New package: ntl-11.5.1
---
common/shlibs | 1 +
srcpkgs/ntl-devel | 1 +
srcpkgs/ntl/template | 36 ++++++++++++++++++++++++++++++++++++
srcpkgs/ntl/update | 1 +
4 files changed, 39 insertions(+)
create mode 120000 srcpkgs/ntl-devel
create mode 100644 srcpkgs/ntl/template
create mode 100644 srcpkgs/ntl/update
diff --git a/common/shlibs b/common/shlibs
index 6ee93e48bfc9..a35e0d24a9c2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4009,6 +4009,7 @@ libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
+libntl.so.44 ntl-11.5.1_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/ntl-devel b/srcpkgs/ntl-devel
new file mode 120000
index 000000000000..fc0a39987329
--- /dev/null
+++ b/srcpkgs/ntl-devel
@@ -0,0 +1 @@
+ntl
\ No newline at end of file
diff --git a/srcpkgs/ntl/template b/srcpkgs/ntl/template
new file mode 100644
index 000000000000..9020c6b5ce68
--- /dev/null
+++ b/srcpkgs/ntl/template
@@ -0,0 +1,36 @@
+# Template file for 'ntl'
+pkgname=ntl
+version=11.5.1
+revision=1
+build_wrksrc="src"
+build_style=configure
+hostmakedepends="perl libtool"
+makedepends="gmp-devel gf2x-devel"
+short_desc="Library for doing Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://libntl.org"
+distfiles="https://libntl.org/ntl-${version}.tar.gz"
+checksum=210d06c31306cbc6eaf6814453c56c776d9d8e8df36d74eb306f6a523d1c6a8a
+nocross=yes # runs binaries built for target
+
+build_options="native_build"
+
+do_configure() {
+ # see http://www.shoup.net/ntl/doc/tour-unix.html
+ ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" LIBTOOL="libtool" \
+ PREFIX="/usr" SHARED="on" NTL_GF2X_LIB="on" \
+ NATIVE="$(vopt_if native_build 'on' 'off')"
+}
+
+ntl-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ depends+=" ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ vmove usr/share
+ }
+}
diff --git a/srcpkgs/ntl/update b/srcpkgs/ntl/update
new file mode 100644
index 000000000000..7ca2974b146f
--- /dev/null
+++ b/srcpkgs/ntl/update
@@ -0,0 +1 @@
+site="https://libntl.org/download.html"
From cbb95e6008d5912758ea3d2039e946cf383a31c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 2 Feb 2018 22:42:49 -0300
Subject: [PATCH 3/5] New package: flintlib-2.8.0
---
common/shlibs | 1 +
srcpkgs/flintlib-devel | 1 +
srcpkgs/flintlib/template | 27 +++++++++++++++++++++++++++
srcpkgs/flintlib/update | 3 +++
4 files changed, 32 insertions(+)
create mode 120000 srcpkgs/flintlib-devel
create mode 100644 srcpkgs/flintlib/template
create mode 100644 srcpkgs/flintlib/update
diff --git a/common/shlibs b/common/shlibs
index a35e0d24a9c2..bfd2ead4bcb9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4010,6 +4010,7 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
+libflint.so.16 flintlib-2.8.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/flintlib-devel b/srcpkgs/flintlib-devel
new file mode 120000
index 000000000000..7c2633183069
--- /dev/null
+++ b/srcpkgs/flintlib-devel
@@ -0,0 +1 @@
+flintlib
\ No newline at end of file
diff --git a/srcpkgs/flintlib/template b/srcpkgs/flintlib/template
new file mode 100644
index 000000000000..f661fb35f10b
--- /dev/null
+++ b/srcpkgs/flintlib/template
@@ -0,0 +1,27 @@
+# Template file for 'flintlib'
+pkgname=flintlib
+version=2.8.0
+revision=1
+wrksrc="flint-${version}"
+build_style=configure
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-ntl=/usr"
+makedepends="mpfr-devel ntl-devel"
+short_desc="Fast Library for Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://flintlib.org"
+distfiles="https://flintlib.org/flint-${version}.tar.gz"
+checksum=584235cdc39d779d9920eaef16fe084f3c26ffeeea003a3fff64a20a0f33449e
+
+CFLAGS="-D_GNU_SOURCE" # needed for cpu_set_t
+
+flintlib-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ depends+=" mpfr-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ }
+}
diff --git a/srcpkgs/flintlib/update b/srcpkgs/flintlib/update
new file mode 100644
index 000000000000..21d6ab4bae5b
--- /dev/null
+++ b/srcpkgs/flintlib/update
@@ -0,0 +1,3 @@
+# package was named 'flintlib' because of another package
+pkgname=flint
+site="https://flintlib.org/downloads.html"
From 3aa220de329b09224e93ad57100be8c39081fd30 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 4 Feb 2018 01:00:19 -0300
Subject: [PATCH 4/5] New package: arb-2.20.0
---
common/shlibs | 1 +
srcpkgs/arb-devel | 1 +
srcpkgs/arb/template | 29 +++++++++++++++++++++++++++++
3 files changed, 31 insertions(+)
create mode 120000 srcpkgs/arb-devel
create mode 100644 srcpkgs/arb/template
diff --git a/common/shlibs b/common/shlibs
index bfd2ead4bcb9..43c81b9afab8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4011,6 +4011,7 @@ libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
libflint.so.16 flintlib-2.8.0_1
+libarb.so.2 arb-2.20.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/arb-devel b/srcpkgs/arb-devel
new file mode 120000
index 000000000000..456b9f00a86c
--- /dev/null
+++ b/srcpkgs/arb-devel
@@ -0,0 +1 @@
+arb
\ No newline at end of file
diff --git a/srcpkgs/arb/template b/srcpkgs/arb/template
new file mode 100644
index 000000000000..fcef3bd1662c
--- /dev/null
+++ b/srcpkgs/arb/template
@@ -0,0 +1,29 @@
+# Template file for 'arb'
+pkgname=arb
+version=2.20.0
+revision=1
+build_style=configure
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
+makedepends="flintlib-devel"
+short_desc="C library for arbitrary-precision interval arithmetic"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://arblib.org"
+distfiles="https://github.com/fredrik-johansson/arb/archive/${version}.tar.gz"
+checksum=d2f186b10590c622c11d1ca190c01c3da08bac9bc04e84cb591534b917faffe7
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ # on glibc this would give a conflict with function fdiv()
+ CFLAGS="-D_GNU_SOURCE" # needed for cpu_set_t
+fi
+
+arb-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ depends+=" ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ }
+}
From 74594d741a5dc98a18c07ecbf5742b82f5d47939 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 1 Jun 2020 14:50:01 -0300
Subject: [PATCH 5/5] New package: eclib-20210625
---
common/shlibs | 1 +
srcpkgs/eclib-devel | 1 +
srcpkgs/eclib/template | 30 ++++++++++++++++++++++++++++++
3 files changed, 32 insertions(+)
create mode 120000 srcpkgs/eclib-devel
create mode 100644 srcpkgs/eclib/template
diff --git a/common/shlibs b/common/shlibs
index 43c81b9afab8..6ea8387496c2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4012,6 +4012,7 @@ libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
libflint.so.16 flintlib-2.8.0_1
libarb.so.2 arb-2.20.0_1
+libec.so.8 eclib-20210625_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/eclib-devel b/srcpkgs/eclib-devel
new file mode 120000
index 000000000000..d29e610e9249
--- /dev/null
+++ b/srcpkgs/eclib-devel
@@ -0,0 +1 @@
+eclib
\ No newline at end of file
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
new file mode 100644
index 000000000000..77270bf9166b
--- /dev/null
+++ b/srcpkgs/eclib/template
@@ -0,0 +1,30 @@
+# Template file for 'eclib'
+pkgname=eclib
+version=20210625
+revision=1
+build_style=gnu-configure
+configure_args="--with-flint --with-boost"
+hostmakedepends="automake autoconf-archive libtool"
+makedepends="pari-devel ntl-devel flintlib-devel boost-devel"
+short_desc="Elliptic curve library, includes mwrank"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/JohnCremona/eclib"
+distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
+checksum=00333fd36afd237c9e6e410c7ab98536ddcd7fdc430e6837fe293247b835c572
+
+pre_configure() {
+ autoreconf -fi
+}
+
+eclib-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ depends+=" ntl-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.a
+ vmove usr/lib/*.so
+ vmove usr/lib/pkgconfig
+ }
+}
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (51 preceding siblings ...)
2021-08-09 2:33 ` [PR PATCH] [Updated] " tornaria
@ 2021-08-09 2:40 ` tornaria
2021-08-10 18:38 ` [PR REVIEW] " ericonr
` (16 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-09 2:40 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 525 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-894916605
Comment:
The "fix" for the `_GNU_SOURCE` issue was bad, which caused the musl build to fail check.
Based on this and the comments in https://github.com/wbhart/flint2/pull/988, I removed all patches and reverted back to using `CFLAGS=-D_GNU_SOURCE` in the template, with the care that for `arb` it has to be conditional to avoid a conflict.
Now all tests should pass... :crossed_fingers:
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (52 preceding siblings ...)
2021-08-09 2:40 ` tornaria
@ 2021-08-10 18:38 ` ericonr
2021-08-10 18:38 ` ericonr
` (15 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-10 18:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 151 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r686227320
Comment:
Same
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (53 preceding siblings ...)
2021-08-10 18:38 ` [PR REVIEW] " ericonr
@ 2021-08-10 18:38 ` ericonr
2021-08-10 18:38 ` ericonr
` (14 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-10 18:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 151 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r686226967
Comment:
same
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (54 preceding siblings ...)
2021-08-10 18:38 ` ericonr
@ 2021-08-10 18:38 ` ericonr
2021-08-10 18:38 ` ericonr
` (13 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-10 18:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 168 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r686226587
Comment:
`vmove "usr/lib/*.a"`
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (55 preceding siblings ...)
2021-08-10 18:38 ` ericonr
@ 2021-08-10 18:38 ` ericonr
2021-08-10 18:38 ` ericonr
` (12 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-10 18:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r686228019
Comment:
Make this a single line
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (56 preceding siblings ...)
2021-08-10 18:38 ` ericonr
@ 2021-08-10 18:38 ` ericonr
2021-08-10 18:38 ` ericonr
` (11 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-10 18:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r686228143
Comment:
Same here
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (57 preceding siblings ...)
2021-08-10 18:38 ` ericonr
@ 2021-08-10 18:38 ` ericonr
2021-08-10 18:38 ` ericonr
` (10 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-10 18:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 156 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r686228405
Comment:
Same here
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR REVIEW] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (58 preceding siblings ...)
2021-08-10 18:38 ` ericonr
@ 2021-08-10 18:38 ` ericonr
2021-08-10 20:39 ` [PR PATCH] [Updated] " tornaria
` (9 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-10 18:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 151 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#discussion_r686227711
Comment:
Same
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR PATCH] [Updated] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (59 preceding siblings ...)
2021-08-10 18:38 ` ericonr
@ 2021-08-10 20:39 ` tornaria
2021-08-10 20:46 ` tornaria
` (8 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-10 20:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages math2
https://github.com/void-linux/void-packages/pull/30032
Math packages: gf2x, ntl, flintlib, arb, eclib
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
#### Notes
- This includes: `gf2x` (see also #29783), `ntl`, `flintlib`, `arb`, `eclib`.
- Everything is tested and check pass in x86_64, x86_64-musl, i686.
EDIT: split in smaller independent PR to ease review.
A patch file from https://github.com/void-linux/void-packages/pull/30032.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-math2-30032.patch --]
[-- Type: text/x-diff, Size: 12737 bytes --]
From 2e9bc58a10c0b45976d3cc7d88aa69743913501a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 29 Jan 2018 11:18:35 -0300
Subject: [PATCH 1/5] New package: gf2x-1.3.0
---
common/options.description | 1 +
common/shlibs | 1 +
srcpkgs/gf2x-devel | 1 +
srcpkgs/gf2x/template | 35 +++++++++++++++++++++++++++++++++++
srcpkgs/gf2x/update | 1 +
5 files changed, 39 insertions(+)
create mode 120000 srcpkgs/gf2x-devel
create mode 100644 srcpkgs/gf2x/template
create mode 100644 srcpkgs/gf2x/update
diff --git a/common/options.description b/common/options.description
index 06360211a23f..46e24a140e52 100644
--- a/common/options.description
+++ b/common/options.description
@@ -49,6 +49,7 @@ desc_option_lz4="Enable support for LZ4 compression format"
desc_option_lzo="Enable support for LZO compression format"
desc_option_microhttpd="Enable support for microhttpd"
desc_option_mpcdec="Enable support for the Musepack decoder"
+desc_option_native_build="Enable instruction subsets supported by the build computer"
desc_option_notify="Enable support for desktop notifications (libnotify)"
desc_option_nvenc="Enable support for NVENC codecs"
desc_option_openblas="Enable support for OpenBLAS accelerated linear algebra"
diff --git a/common/shlibs b/common/shlibs
index 278d2456072f..57f5ca62c4c6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3983,6 +3983,7 @@ libsword-1.8.1.so libsword-1.8.1_6
libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
+libgf2x.so.3 gf2x-1.3.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/gf2x-devel b/srcpkgs/gf2x-devel
new file mode 120000
index 000000000000..4542295e8de7
--- /dev/null
+++ b/srcpkgs/gf2x-devel
@@ -0,0 +1 @@
+gf2x
\ No newline at end of file
diff --git a/srcpkgs/gf2x/template b/srcpkgs/gf2x/template
new file mode 100644
index 000000000000..b056ac4f87f7
--- /dev/null
+++ b/srcpkgs/gf2x/template
@@ -0,0 +1,35 @@
+# Template file for 'gf2x'
+pkgname=gf2x
+version=1.3.0
+revision=1
+wrksrc=gf2x-gf2x-${version}
+build_style=gnu-configure
+hostmakedepends="automake libtool"
+short_desc="C/C++ library for fast arithmetic in GF(2)[x]"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.inria.fr/gf2x/gf2x"
+distfiles="https://gitlab.inria.fr/gf2x/gf2x/-/archive/gf2x-${version}/gf2x-gf2x-${version}.tar.gz"
+checksum=11bcf98b620c60c2ee3b4460b02b7be741f14cfdc26b542f22c92950926575e0
+
+build_options="native_build"
+
+if [ -z "$build_option_native_build" ]; then
+ # this disables sse3, ssse3, sse41, pclmul
+ configure_args="--disable-sse3"
+fi
+
+pre_configure() {
+ autoreconf -fi
+}
+
+gf2x-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/lib/pkgconfig
+ }
+}
diff --git a/srcpkgs/gf2x/update b/srcpkgs/gf2x/update
new file mode 100644
index 000000000000..504503610161
--- /dev/null
+++ b/srcpkgs/gf2x/update
@@ -0,0 +1 @@
+pkgname=gf2x-gf2x
From 4a74efaccd81455f50905b91d30a7e9556cc8534 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 30 Jan 2018 11:02:38 -0300
Subject: [PATCH 2/5] New package: ntl-11.5.1
---
common/shlibs | 1 +
srcpkgs/ntl-devel | 1 +
srcpkgs/ntl/template | 36 ++++++++++++++++++++++++++++++++++++
srcpkgs/ntl/update | 1 +
4 files changed, 39 insertions(+)
create mode 120000 srcpkgs/ntl-devel
create mode 100644 srcpkgs/ntl/template
create mode 100644 srcpkgs/ntl/update
diff --git a/common/shlibs b/common/shlibs
index 57f5ca62c4c6..70534cc413b2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3984,6 +3984,7 @@ libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
+libntl.so.44 ntl-11.5.1_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/ntl-devel b/srcpkgs/ntl-devel
new file mode 120000
index 000000000000..fc0a39987329
--- /dev/null
+++ b/srcpkgs/ntl-devel
@@ -0,0 +1 @@
+ntl
\ No newline at end of file
diff --git a/srcpkgs/ntl/template b/srcpkgs/ntl/template
new file mode 100644
index 000000000000..b778ba27a3b7
--- /dev/null
+++ b/srcpkgs/ntl/template
@@ -0,0 +1,36 @@
+# Template file for 'ntl'
+pkgname=ntl
+version=11.5.1
+revision=1
+build_wrksrc="src"
+build_style=configure
+hostmakedepends="perl libtool"
+makedepends="gmp-devel gf2x-devel"
+short_desc="Library for doing Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://libntl.org"
+distfiles="https://libntl.org/ntl-${version}.tar.gz"
+checksum=210d06c31306cbc6eaf6814453c56c776d9d8e8df36d74eb306f6a523d1c6a8a
+nocross=yes # runs binaries built for target
+
+build_options="native_build"
+
+do_configure() {
+ # see http://www.shoup.net/ntl/doc/tour-unix.html
+ ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" LIBTOOL="libtool" \
+ PREFIX="/usr" SHARED="on" NTL_GF2X_LIB="on" \
+ NATIVE="$(vopt_if native_build 'on' 'off')"
+}
+
+ntl-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ depends+=" ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share
+ }
+}
diff --git a/srcpkgs/ntl/update b/srcpkgs/ntl/update
new file mode 100644
index 000000000000..7ca2974b146f
--- /dev/null
+++ b/srcpkgs/ntl/update
@@ -0,0 +1 @@
+site="https://libntl.org/download.html"
From 3f756a78111d65cde35754270ea6e81bb9547381 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 2 Feb 2018 22:42:49 -0300
Subject: [PATCH 3/5] New package: flintlib-2.8.0
---
common/shlibs | 1 +
srcpkgs/flintlib-devel | 1 +
srcpkgs/flintlib/template | 27 +++++++++++++++++++++++++++
srcpkgs/flintlib/update | 3 +++
4 files changed, 32 insertions(+)
create mode 120000 srcpkgs/flintlib-devel
create mode 100644 srcpkgs/flintlib/template
create mode 100644 srcpkgs/flintlib/update
diff --git a/common/shlibs b/common/shlibs
index 70534cc413b2..ce170cbdeaa8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3985,6 +3985,7 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
+libflint.so.16 flintlib-2.8.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/flintlib-devel b/srcpkgs/flintlib-devel
new file mode 120000
index 000000000000..7c2633183069
--- /dev/null
+++ b/srcpkgs/flintlib-devel
@@ -0,0 +1 @@
+flintlib
\ No newline at end of file
diff --git a/srcpkgs/flintlib/template b/srcpkgs/flintlib/template
new file mode 100644
index 000000000000..6552234c7f8f
--- /dev/null
+++ b/srcpkgs/flintlib/template
@@ -0,0 +1,27 @@
+# Template file for 'flintlib'
+pkgname=flintlib
+version=2.8.0
+revision=1
+wrksrc="flint-${version}"
+build_style=configure
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-ntl=/usr"
+makedepends="mpfr-devel ntl-devel"
+short_desc="Fast Library for Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://flintlib.org"
+distfiles="https://flintlib.org/flint-${version}.tar.gz"
+checksum=584235cdc39d779d9920eaef16fe084f3c26ffeeea003a3fff64a20a0f33449e
+
+CFLAGS="-D_GNU_SOURCE" # needed for cpu_set_t
+
+flintlib-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ depends+=" mpfr-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/flintlib/update b/srcpkgs/flintlib/update
new file mode 100644
index 000000000000..21d6ab4bae5b
--- /dev/null
+++ b/srcpkgs/flintlib/update
@@ -0,0 +1,3 @@
+# package was named 'flintlib' because of another package
+pkgname=flint
+site="https://flintlib.org/downloads.html"
From b5da78696f56f81d0a6c2ee304ccf337082c6513 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 4 Feb 2018 01:00:19 -0300
Subject: [PATCH 4/5] New package: arb-2.20.0
---
common/shlibs | 1 +
srcpkgs/arb-devel | 1 +
srcpkgs/arb/template | 29 +++++++++++++++++++++++++++++
3 files changed, 31 insertions(+)
create mode 120000 srcpkgs/arb-devel
create mode 100644 srcpkgs/arb/template
diff --git a/common/shlibs b/common/shlibs
index ce170cbdeaa8..0b0e1fcb59ab 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3986,6 +3986,7 @@ libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
libflint.so.16 flintlib-2.8.0_1
+libarb.so.2 arb-2.20.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/arb-devel b/srcpkgs/arb-devel
new file mode 120000
index 000000000000..456b9f00a86c
--- /dev/null
+++ b/srcpkgs/arb-devel
@@ -0,0 +1 @@
+arb
\ No newline at end of file
diff --git a/srcpkgs/arb/template b/srcpkgs/arb/template
new file mode 100644
index 000000000000..9a390cf4a84b
--- /dev/null
+++ b/srcpkgs/arb/template
@@ -0,0 +1,29 @@
+# Template file for 'arb'
+pkgname=arb
+version=2.20.0
+revision=1
+build_style=configure
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
+makedepends="flintlib-devel"
+short_desc="C library for arbitrary-precision interval arithmetic"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://arblib.org"
+distfiles="https://github.com/fredrik-johansson/arb/archive/${version}.tar.gz"
+checksum=d2f186b10590c622c11d1ca190c01c3da08bac9bc04e84cb591534b917faffe7
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ # on glibc this would give a conflict with function fdiv()
+ CFLAGS="-D_GNU_SOURCE" # needed for cpu_set_t
+fi
+
+arb-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ depends+=" ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 02f6f569a12e7bf8012cf61aa430f4cad0ae0bd6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 1 Jun 2020 14:50:01 -0300
Subject: [PATCH 5/5] New package: eclib-20210625
---
common/shlibs | 1 +
srcpkgs/eclib-devel | 1 +
srcpkgs/eclib/template | 30 ++++++++++++++++++++++++++++++
3 files changed, 32 insertions(+)
create mode 120000 srcpkgs/eclib-devel
create mode 100644 srcpkgs/eclib/template
diff --git a/common/shlibs b/common/shlibs
index 0b0e1fcb59ab..edfc82fbed0b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3987,6 +3987,7 @@ libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
libflint.so.16 flintlib-2.8.0_1
libarb.so.2 arb-2.20.0_1
+libec.so.8 eclib-20210625_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/eclib-devel b/srcpkgs/eclib-devel
new file mode 120000
index 000000000000..d29e610e9249
--- /dev/null
+++ b/srcpkgs/eclib-devel
@@ -0,0 +1 @@
+eclib
\ No newline at end of file
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
new file mode 100644
index 000000000000..935e9c181d2d
--- /dev/null
+++ b/srcpkgs/eclib/template
@@ -0,0 +1,30 @@
+# Template file for 'eclib'
+pkgname=eclib
+version=20210625
+revision=1
+build_style=gnu-configure
+configure_args="--with-flint --with-boost"
+hostmakedepends="automake autoconf-archive libtool"
+makedepends="pari-devel ntl-devel flintlib-devel boost-devel"
+short_desc="Elliptic curve library, includes mwrank"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/JohnCremona/eclib"
+distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
+checksum=00333fd36afd237c9e6e410c7ab98536ddcd7fdc430e6837fe293247b835c572
+
+pre_configure() {
+ autoreconf -fi
+}
+
+eclib-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ depends+=" ntl-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/lib/pkgconfig
+ }
+}
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR PATCH] [Updated] Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (60 preceding siblings ...)
2021-08-10 20:39 ` [PR PATCH] [Updated] " tornaria
@ 2021-08-10 20:46 ` tornaria
2021-08-10 20:48 ` tornaria
` (7 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-10 20:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages math2
https://github.com/void-linux/void-packages/pull/30032
Math packages: gf2x, ntl, flintlib, arb, eclib
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
#### Notes
- This includes: `gf2x` (see also #29783), `ntl`, `flintlib`, `arb`, `eclib`.
- Everything is tested and check pass in x86_64, x86_64-musl, i686.
EDIT: split in smaller independent PR to ease review.
A patch file from https://github.com/void-linux/void-packages/pull/30032.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-math2-30032.patch --]
[-- Type: text/x-diff, Size: 12677 bytes --]
From 2e9bc58a10c0b45976d3cc7d88aa69743913501a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 29 Jan 2018 11:18:35 -0300
Subject: [PATCH 1/5] New package: gf2x-1.3.0
---
common/options.description | 1 +
common/shlibs | 1 +
srcpkgs/gf2x-devel | 1 +
srcpkgs/gf2x/template | 35 +++++++++++++++++++++++++++++++++++
srcpkgs/gf2x/update | 1 +
5 files changed, 39 insertions(+)
create mode 120000 srcpkgs/gf2x-devel
create mode 100644 srcpkgs/gf2x/template
create mode 100644 srcpkgs/gf2x/update
diff --git a/common/options.description b/common/options.description
index 06360211a23f..46e24a140e52 100644
--- a/common/options.description
+++ b/common/options.description
@@ -49,6 +49,7 @@ desc_option_lz4="Enable support for LZ4 compression format"
desc_option_lzo="Enable support for LZO compression format"
desc_option_microhttpd="Enable support for microhttpd"
desc_option_mpcdec="Enable support for the Musepack decoder"
+desc_option_native_build="Enable instruction subsets supported by the build computer"
desc_option_notify="Enable support for desktop notifications (libnotify)"
desc_option_nvenc="Enable support for NVENC codecs"
desc_option_openblas="Enable support for OpenBLAS accelerated linear algebra"
diff --git a/common/shlibs b/common/shlibs
index 278d2456072f..57f5ca62c4c6 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3983,6 +3983,7 @@ libsword-1.8.1.so libsword-1.8.1_6
libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
+libgf2x.so.3 gf2x-1.3.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/gf2x-devel b/srcpkgs/gf2x-devel
new file mode 120000
index 000000000000..4542295e8de7
--- /dev/null
+++ b/srcpkgs/gf2x-devel
@@ -0,0 +1 @@
+gf2x
\ No newline at end of file
diff --git a/srcpkgs/gf2x/template b/srcpkgs/gf2x/template
new file mode 100644
index 000000000000..b056ac4f87f7
--- /dev/null
+++ b/srcpkgs/gf2x/template
@@ -0,0 +1,35 @@
+# Template file for 'gf2x'
+pkgname=gf2x
+version=1.3.0
+revision=1
+wrksrc=gf2x-gf2x-${version}
+build_style=gnu-configure
+hostmakedepends="automake libtool"
+short_desc="C/C++ library for fast arithmetic in GF(2)[x]"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.inria.fr/gf2x/gf2x"
+distfiles="https://gitlab.inria.fr/gf2x/gf2x/-/archive/gf2x-${version}/gf2x-gf2x-${version}.tar.gz"
+checksum=11bcf98b620c60c2ee3b4460b02b7be741f14cfdc26b542f22c92950926575e0
+
+build_options="native_build"
+
+if [ -z "$build_option_native_build" ]; then
+ # this disables sse3, ssse3, sse41, pclmul
+ configure_args="--disable-sse3"
+fi
+
+pre_configure() {
+ autoreconf -fi
+}
+
+gf2x-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/lib/pkgconfig
+ }
+}
diff --git a/srcpkgs/gf2x/update b/srcpkgs/gf2x/update
new file mode 100644
index 000000000000..504503610161
--- /dev/null
+++ b/srcpkgs/gf2x/update
@@ -0,0 +1 @@
+pkgname=gf2x-gf2x
From 2f602e2098c4da49b8a33689a1f78297d416153a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 30 Jan 2018 11:02:38 -0300
Subject: [PATCH 2/5] New package: ntl-11.5.1
---
common/shlibs | 1 +
srcpkgs/ntl-devel | 1 +
srcpkgs/ntl/template | 35 +++++++++++++++++++++++++++++++++++
srcpkgs/ntl/update | 1 +
4 files changed, 38 insertions(+)
create mode 120000 srcpkgs/ntl-devel
create mode 100644 srcpkgs/ntl/template
create mode 100644 srcpkgs/ntl/update
diff --git a/common/shlibs b/common/shlibs
index 57f5ca62c4c6..70534cc413b2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3984,6 +3984,7 @@ libpari-gmp.so.7 pari-2.13.0_1
libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
+libntl.so.44 ntl-11.5.1_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/ntl-devel b/srcpkgs/ntl-devel
new file mode 120000
index 000000000000..fc0a39987329
--- /dev/null
+++ b/srcpkgs/ntl-devel
@@ -0,0 +1 @@
+ntl
\ No newline at end of file
diff --git a/srcpkgs/ntl/template b/srcpkgs/ntl/template
new file mode 100644
index 000000000000..e4b84a45cd3d
--- /dev/null
+++ b/srcpkgs/ntl/template
@@ -0,0 +1,35 @@
+# Template file for 'ntl'
+pkgname=ntl
+version=11.5.1
+revision=1
+build_wrksrc="src"
+build_style=configure
+hostmakedepends="perl libtool"
+makedepends="gmp-devel gf2x-devel"
+short_desc="Library for doing Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://libntl.org"
+distfiles="https://libntl.org/ntl-${version}.tar.gz"
+checksum=210d06c31306cbc6eaf6814453c56c776d9d8e8df36d74eb306f6a523d1c6a8a
+nocross=yes # runs binaries built for target
+
+build_options="native_build"
+
+do_configure() {
+ # see http://www.shoup.net/ntl/doc/tour-unix.html
+ ./configure CXX="$CXX" CXXFLAGS="$CXXFLAGS" LIBTOOL="libtool" \
+ PREFIX="/usr" SHARED="on" NTL_GF2X_LIB="on" \
+ NATIVE="$(vopt_if native_build 'on' 'off')"
+}
+
+ntl-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/share
+ }
+}
diff --git a/srcpkgs/ntl/update b/srcpkgs/ntl/update
new file mode 100644
index 000000000000..7ca2974b146f
--- /dev/null
+++ b/srcpkgs/ntl/update
@@ -0,0 +1 @@
+site="https://libntl.org/download.html"
From ad93954b4390fb3eea960a56efe767b005f67d16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Fri, 2 Feb 2018 22:42:49 -0300
Subject: [PATCH 3/5] New package: flintlib-2.8.0
---
common/shlibs | 1 +
srcpkgs/flintlib-devel | 1 +
srcpkgs/flintlib/template | 26 ++++++++++++++++++++++++++
srcpkgs/flintlib/update | 3 +++
4 files changed, 31 insertions(+)
create mode 120000 srcpkgs/flintlib-devel
create mode 100644 srcpkgs/flintlib/template
create mode 100644 srcpkgs/flintlib/update
diff --git a/common/shlibs b/common/shlibs
index 70534cc413b2..ce170cbdeaa8 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3985,6 +3985,7 @@ libtree-sitter.so.0 tree-sitter-0.19.0_1
libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
+libflint.so.16 flintlib-2.8.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/flintlib-devel b/srcpkgs/flintlib-devel
new file mode 120000
index 000000000000..7c2633183069
--- /dev/null
+++ b/srcpkgs/flintlib-devel
@@ -0,0 +1 @@
+flintlib
\ No newline at end of file
diff --git a/srcpkgs/flintlib/template b/srcpkgs/flintlib/template
new file mode 100644
index 000000000000..078ed5316427
--- /dev/null
+++ b/srcpkgs/flintlib/template
@@ -0,0 +1,26 @@
+# Template file for 'flintlib'
+pkgname=flintlib
+version=2.8.0
+revision=1
+wrksrc="flint-${version}"
+build_style=configure
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-ntl=/usr"
+makedepends="mpfr-devel ntl-devel"
+short_desc="Fast Library for Number Theory"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://flintlib.org"
+distfiles="https://flintlib.org/flint-${version}.tar.gz"
+checksum=584235cdc39d779d9920eaef16fe084f3c26ffeeea003a3fff64a20a0f33449e
+
+CFLAGS="-D_GNU_SOURCE" # needed for cpu_set_t
+
+flintlib-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} mpfr-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/flintlib/update b/srcpkgs/flintlib/update
new file mode 100644
index 000000000000..21d6ab4bae5b
--- /dev/null
+++ b/srcpkgs/flintlib/update
@@ -0,0 +1,3 @@
+# package was named 'flintlib' because of another package
+pkgname=flint
+site="https://flintlib.org/downloads.html"
From 167407b61e4af53c2a2f24efef8368a8b28d5fe7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sun, 4 Feb 2018 01:00:19 -0300
Subject: [PATCH 4/5] New package: arb-2.20.0
---
common/shlibs | 1 +
srcpkgs/arb-devel | 1 +
srcpkgs/arb/template | 28 ++++++++++++++++++++++++++++
3 files changed, 30 insertions(+)
create mode 120000 srcpkgs/arb-devel
create mode 100644 srcpkgs/arb/template
diff --git a/common/shlibs b/common/shlibs
index ce170cbdeaa8..0b0e1fcb59ab 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3986,6 +3986,7 @@ libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
libflint.so.16 flintlib-2.8.0_1
+libarb.so.2 arb-2.20.0_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/arb-devel b/srcpkgs/arb-devel
new file mode 120000
index 000000000000..456b9f00a86c
--- /dev/null
+++ b/srcpkgs/arb-devel
@@ -0,0 +1 @@
+arb
\ No newline at end of file
diff --git a/srcpkgs/arb/template b/srcpkgs/arb/template
new file mode 100644
index 000000000000..f195d8babf12
--- /dev/null
+++ b/srcpkgs/arb/template
@@ -0,0 +1,28 @@
+# Template file for 'arb'
+pkgname=arb
+version=2.20.0
+revision=1
+build_style=configure
+configure_args="--prefix=/usr --with-gmp=/usr --with-mpfr=/usr --with-flint=/usr"
+makedepends="flintlib-devel"
+short_desc="C library for arbitrary-precision interval arithmetic"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="LGPL-2.1-or-later"
+homepage="https://arblib.org"
+distfiles="https://github.com/fredrik-johansson/arb/archive/${version}.tar.gz"
+checksum=d2f186b10590c622c11d1ca190c01c3da08bac9bc04e84cb591534b917faffe7
+
+if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ # on glibc this would give a conflict with function fdiv()
+ CFLAGS="-D_GNU_SOURCE" # needed for cpu_set_t
+fi
+
+arb-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
From 6fdaf00a8e555d18db3524aadad9cc53a38d5fcf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 1 Jun 2020 14:50:01 -0300
Subject: [PATCH 5/5] New package: eclib-20210625
---
common/shlibs | 1 +
srcpkgs/eclib-devel | 1 +
srcpkgs/eclib/template | 29 +++++++++++++++++++++++++++++
3 files changed, 31 insertions(+)
create mode 120000 srcpkgs/eclib-devel
create mode 100644 srcpkgs/eclib/template
diff --git a/common/shlibs b/common/shlibs
index 0b0e1fcb59ab..edfc82fbed0b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3987,6 +3987,7 @@ libgf2x.so.3 gf2x-1.3.0_1
libntl.so.44 ntl-11.5.1_1
libflint.so.16 flintlib-2.8.0_1
libarb.so.2 arb-2.20.0_1
+libec.so.8 eclib-20210625_1
libwayland-client++.so.0 libwaylandpp-0.2.8_1
libwayland-cursor++.so.0 libwaylandpp-0.2.8_1
libwayland-egl++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/eclib-devel b/srcpkgs/eclib-devel
new file mode 120000
index 000000000000..d29e610e9249
--- /dev/null
+++ b/srcpkgs/eclib-devel
@@ -0,0 +1 @@
+eclib
\ No newline at end of file
diff --git a/srcpkgs/eclib/template b/srcpkgs/eclib/template
new file mode 100644
index 000000000000..3db0bd2119b9
--- /dev/null
+++ b/srcpkgs/eclib/template
@@ -0,0 +1,29 @@
+# Template file for 'eclib'
+pkgname=eclib
+version=20210625
+revision=1
+build_style=gnu-configure
+configure_args="--with-flint --with-boost"
+hostmakedepends="automake autoconf-archive libtool"
+makedepends="pari-devel ntl-devel flintlib-devel boost-devel"
+short_desc="Elliptic curve library, includes mwrank"
+maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/JohnCremona/eclib"
+distfiles="https://github.com/JohnCremona/eclib/archive/refs/tags/${version}.tar.gz"
+checksum=00333fd36afd237c9e6e410c7ab98536ddcd7fdc430e6837fe293247b835c572
+
+pre_configure() {
+ autoreconf -fi
+}
+
+eclib-devel_package() {
+ depends="${sourcepkg}>=${version}_${revision} ntl-devel"
+ short_desc+=" - development files"
+ pkg_install() {
+ vmove usr/include
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ vmove usr/lib/pkgconfig
+ }
+}
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (61 preceding siblings ...)
2021-08-10 20:46 ` tornaria
@ 2021-08-10 20:48 ` tornaria
2021-08-17 21:50 ` tornaria
` (6 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-10 20:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 151 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-896306423
Comment:
All done.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (62 preceding siblings ...)
2021-08-10 20:48 ` tornaria
@ 2021-08-17 21:50 ` tornaria
2021-08-18 9:26 ` dkwo
` (5 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-17 21:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 406 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-900654594
Comment:
@dkwo: do you want to test this? I've successfully built sagemath-9.4.rc1 with new pari + new giac + this PR.
Note that you have to rebase this PR before compiling so it gets the pari update (otherwise it will complain about a missing soname and refuse to pkg).
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (63 preceding siblings ...)
2021-08-17 21:50 ` tornaria
@ 2021-08-18 9:26 ` dkwo
2021-08-18 14:44 ` tornaria
` (4 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2021-08-18 9:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 359 bytes --]
New comment by dkwo on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-900962949
Comment:
@tornaria Thanks, I noticed that.
Didn't you need `configure_args+=" --with-readline --with-gmp"` in pari to use with sage?
I will rebuild sage as well soon, but I think you can go ahead with these PR's in the meantime.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (64 preceding siblings ...)
2021-08-18 9:26 ` dkwo
@ 2021-08-18 14:44 ` tornaria
2021-08-18 14:57 ` dkwo
` (3 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: tornaria @ 2021-08-18 14:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-901175916
Comment:
> @tornaria Thanks, I noticed that.
> Didn't you need `configure_args+=" --with-readline --with-gmp"` in pari to use with sage?
Not really, they are default on when `readline-devel` and `gmp-devel` are installed.
If you start our new gp (already in the void repo) you can see in the banner:
```
GP/PARI CALCULATOR Version 2.13.2 (released)
amd64 running linux (x86-64/GMP-6.2.1 kernel) 64-bit version
compiled: Aug 15 2021, gcc version 10.2.1 20201203 (GCC)
threading engine: pthread
(readline v8.1 enabled, extended help enabled)
```
Here gmp, readline are enabled. Also pthreads, which is required in sage starting in 9.4.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (65 preceding siblings ...)
2021-08-18 14:44 ` tornaria
@ 2021-08-18 14:57 ` dkwo
2021-08-18 16:57 ` dkwo
` (2 subsequent siblings)
69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2021-08-18 14:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 159 bytes --]
New comment by dkwo on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-901186346
Comment:
I see, you are right.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (66 preceding siblings ...)
2021-08-18 14:57 ` dkwo
@ 2021-08-18 16:57 ` dkwo
2021-08-18 18:48 ` [PR PATCH] [Merged]: " ericonr
2021-08-18 18:49 ` ericonr
69 siblings, 0 replies; 71+ messages in thread
From: dkwo @ 2021-08-18 16:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 248 bytes --]
New comment by dkwo on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-901275082
Comment:
@tornaria Btw, I've also just built `sage-9.4.rc2` with this, the other four math package and the giac PR's :)
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: [PR PATCH] [Merged]: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (67 preceding siblings ...)
2021-08-18 16:57 ` dkwo
@ 2021-08-18 18:48 ` ericonr
2021-08-18 18:49 ` ericonr
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-18 18:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 796 bytes --]
There's a merged pull request on the void-packages repository
Math packages: gf2x, ntl, flintlib, arb, eclib
https://github.com/void-linux/void-packages/pull/30032
Description:
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
#### Notes
- This includes: `gf2x` (see also #29783), `ntl`, `flintlib`, `arb`, `eclib`.
- Everything is tested and check pass in x86_64, x86_64-musl, i686.
EDIT: split in smaller independent PR to ease review.
^ permalink raw reply [flat|nested] 71+ messages in thread
* Re: Math packages: gf2x, ntl, flintlib, arb, eclib
2021-04-06 3:35 [PR PATCH] More math libraries and tools tornaria
` (68 preceding siblings ...)
2021-08-18 18:48 ` [PR PATCH] [Merged]: " ericonr
@ 2021-08-18 18:49 ` ericonr
69 siblings, 0 replies; 71+ messages in thread
From: ericonr @ 2021-08-18 18:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 197 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/30032#issuecomment-901348335
Comment:
Ping me for the next math package PR we should review ;)
^ permalink raw reply [flat|nested] 71+ messages in thread