Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] pari: update to 2.13.2.
@ 2021-08-11  1:45 tornaria
  2021-08-11  1:52 ` sgn
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: tornaria @ 2021-08-11  1:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1590 bytes --]

There is a new pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages pari
https://github.com/void-linux/void-packages/pull/32453

pari: update to 2.13.2.
- enable pthreads build
- switch gp binary to static link libpari; this offsets the slowdown due to pthreads
- ship the static library, so external programs can static link

Rationale:
- pthreads gives an interesting functionality, and recent versions of giac require pari with tls; sagemath requires pari with pthreads.
- The cost for enabling pthreads is quite high, on the order of 30-40% for some tests; -flto saves maybe 1-2% at most.
- On the other hand, switching to static binary yields some savings on the order of 5-10%
- More important: the cost of enabling pthread with -flto for a static binary is only about 5-10%
- In summary: enabling pthread while switching to static is roughly the same speed as current binary, with an interesting feature (esp. if one has many cores) and apparently better compatibility.
- Shipping static library as well is easy and allows for external code linking to the static library.

@sgn: if you agree, I am willing to take over maintainership. I have used pari for 25+ years, and I use it almost daily.

<!-- Mark items with [x] where applicable -->

#### 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


A patch file from https://github.com/void-linux/void-packages/pull/32453.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pari-32453.patch --]
[-- Type: text/x-diff, Size: 2597 bytes --]

From cbc5f9ab95141fbd31171ae8e0fea33d5bab28ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Tue, 10 Aug 2021 19:56:34 -0300
Subject: [PATCH] pari: update to 2.13.2.

- enable pthreads build
- switch gp binary to static link libpari; this offsets the slowdown due
  to pthreads
- ship the static library, so external programs can static link
---
 common/shlibs         |  2 +-
 srcpkgs/pari/template | 18 +++++++++++++-----
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 278d2456072f..8045f19a3abf 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3980,7 +3980,7 @@ libopenaptx.so.0 libopenaptx-0.2.0_1
 libsimavr.so.1 simavr-1.6_2
 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
+libpari-gmp-tls.so.7 pari-2.13.2_1
 libtree-sitter.so.0 tree-sitter-0.19.0_1
 libgtkdatabox.so.1 gtkdatabox3-1.0.0_1
 libwayland-client++.so.0 libwaylandpp-0.2.8_1
diff --git a/srcpkgs/pari/template b/srcpkgs/pari/template
index 8e2a415913ba..aa7c1a53fabb 100644
--- a/srcpkgs/pari/template
+++ b/srcpkgs/pari/template
@@ -1,13 +1,14 @@
 # Template file for 'pari'
 pkgname=pari
-version=2.13.1
+version=2.13.2
 revision=1
 build_style=configure
 build_helper=qemu
 configure_script=./Configure
-configure_args="--prefix=/usr"
+configure_args="--prefix=/usr $(vopt_if pthreads --mt=pthread)"
 make_build_target=all
 make_check_target=test-all
+make_install_target="install install-bin-sta install-lib-sta"
 hostmakedepends="perl texlive"
 makedepends="gmp-devel readline-devel $(vopt_if x11 libX11-devel)"
 short_desc="Fast computations library in number theory"
@@ -15,10 +16,16 @@ maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
 license="GPL-2.0-or-later"
 homepage="https://pari.math.u-bordeaux.fr"
 distfiles="https://pari.math.u-bordeaux.fr/pub/pari/unix/${pkgname}-${version}.tar.gz"
-checksum=81ecf7d70ccdaae230165cff627c9ce2ec297b8f22f9f40742279d85f86dfcb1
+checksum=1679985094a0b723d14f49aa891dbe5ec967aa4040050a2c50bd764ddb3eba24
 
-build_options="x11"
-build_options_default="x11"
+build_options="x11 pthreads"
+build_options_default="x11 pthreads"
+desc_option_pthreads="Enable support for pthreads"
+
+if [ "$build_option_pthreads" ] ; then
+	# reduce speed losses due to pthreads
+	CFLAGS=-flto
+fi
 
 post_patch() {
 	# sse2 is not available on all i686
@@ -50,6 +57,7 @@ pari-devel_package() {
 	depends="pari>=${version}_${revision}"
 	pkg_install() {
 		vmove usr/include
+		vmove "usr/lib/*.a"
 		vmove "usr/lib/*.so"
 	}
 }

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2021-08-15  3:48 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11  1:45 [PR PATCH] pari: update to 2.13.2 tornaria
2021-08-11  1:52 ` sgn
2021-08-11  3:12 ` ericonr
2021-08-11 17:12 ` tornaria
2021-08-11 17:21 ` tornaria
2021-08-11 21:22 ` [PR PATCH] [Updated] " tornaria
2021-08-12  0:09 ` ericonr
2021-08-13 13:41 ` [PR PATCH] [Updated] " tornaria
2021-08-13 15:21 ` tornaria
2021-08-14  0:44 ` [PR REVIEW] " ericonr
2021-08-14  0:44 ` ericonr
2021-08-14  0:45 ` ericonr
2021-08-14  0:45 ` ericonr
2021-08-14 17:52 ` tornaria
2021-08-14 17:55 ` tornaria
2021-08-14 17:57 ` tornaria
2021-08-14 20:29 ` ericonr
2021-08-14 23:06 ` [PR PATCH] [Updated] " tornaria
2021-08-14 23:08 ` [PR REVIEW] " tornaria
2021-08-14 23:09 ` tornaria
2021-08-14 23:10 ` tornaria
2021-08-15  3:47 ` ericonr
2021-08-15  3:48 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).