public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/prng/, sci-mathematics/prng/files/
@ 2021-05-19 21:37 Andrew Savchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Savchenko @ 2021-05-19 21:37 UTC (permalink / raw
  To: gentoo-commits

commit:     f478c4901cfca32cca3a8c32d2988b373a2b32cb
Author:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
AuthorDate: Wed May 19 21:36:07 2021 +0000
Commit:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
CommitDate: Wed May 19 21:36:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f478c490

sci-mathematics/prng: cleanup old

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>

 .../prng-3.0.2-fix-c99-inline-semantics.patch      | 146 ---------------------
 sci-mathematics/prng/prng-3.0.2-r2.ebuild          |  42 ------
 2 files changed, 188 deletions(-)

diff --git a/sci-mathematics/prng/files/prng-3.0.2-fix-c99-inline-semantics.patch b/sci-mathematics/prng/files/prng-3.0.2-fix-c99-inline-semantics.patch
deleted file mode 100644
index c84a288d47d..00000000000
--- a/sci-mathematics/prng/files/prng-3.0.2-fix-c99-inline-semantics.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-Use portable 'static inline' semantics that work in GNU89 and C99
-See also: http://www.greenend.org.uk/rjk/tech/inline.html
-
---- a/src/dicg.c
-+++ b/src/dicg.c
-@@ -441,7 +441,7 @@
-  * Algorithm by Karin Schaber and Otmar Lendl.
-  *
-  */                                                  
--inline prng_num prng_dicg_multiply(int k,prng_num c, prng_num d)
-+prng_num prng_dicg_multiply(int k,prng_num c, prng_num d)
- {
-   int i;
-   struct mtable *t;
---- a/src/external.c
-+++ b/src/external.c
-@@ -139,7 +139,7 @@
-  *      gen:  Pointer to a struct prng.
-  *
-  */
--inline prng_num prng_tt800_get_next_int(struct prng *gen)
-+prng_num prng_tt800_get_next_int(struct prng *gen)
- {
- unsigned int y;
- struct tt800_state *g;
---- a/src/icg.c
-+++ b/src/icg.c
-@@ -110,7 +110,7 @@
-  *      gen:  Pointer to a struct prng.
-  *
-  */
--inline prng_num prng_icg_get_next_int(struct prng *gen)
-+prng_num prng_icg_get_next_int(struct prng *gen)
- {
-   s_prng_num inv, current, prod;
-   
---- a/src/lcg.c
-+++ b/src/lcg.c
-@@ -111,7 +111,7 @@
-  *      gen:  Pointer to a struct prng.
-  *
-  */
--inline prng_num prng_lcg_get_next_int(struct prng *gen)
-+prng_num prng_lcg_get_next_int(struct prng *gen)
- {
-   s_prng_num ax, current;
- 
---- a/src/meicg.c
-+++ b/src/meicg.c
-@@ -106,7 +106,7 @@
-  *      gen:  Pointer to a struct prng.
-  *
-  */
--inline prng_num prng_meicg_get_next_int(struct prng *gen)
-+prng_num prng_meicg_get_next_int(struct prng *gen)
- {
-   s_prng_num an, sum, inv, n;
- 
---- a/src/mt19937.c
-+++ b/src/mt19937.c
-@@ -172,7 +172,7 @@
-  *      gen:  Pointer to a struct prng.
-  *
-  */
--inline prng_num prng_mt19937_get_next_int(struct prng *gen)
-+prng_num prng_mt19937_get_next_int(struct prng *gen)
- {
- #define MT  gen->data.mt19937_data.mt
- #define MTI gen->data.mt19937_data.mti
---- a/src/prng.h
-+++ b/src/prng.h
-@@ -406,7 +406,7 @@
- /* INLINE fnk def. for mult_mod, I don't know if this works for non-GCC */
- 
- #ifdef __GNUC__
--extern __inline__ prng_num mult_mod(prng_num s,struct mult_mod_struct *mm)
-+static inline prng_num mult_mod(prng_num s,struct mult_mod_struct *mm)
- {
- s_prng_num s_tmp;
- 
---- a/src/qcg.c
-+++ b/src/qcg.c
-@@ -107,7 +107,7 @@
-  *      gen:  Pointer to a struct prng.
-  *
-  */
--inline prng_num prng_qcg_get_next_int(struct prng *gen)
-+prng_num prng_qcg_get_next_int(struct prng *gen)
- {
-   s_prng_num current, sum, square, q_term, l_term;
- 
---- a/src/support.c
-+++ b/src/support.c
-@@ -449,52 +449,6 @@
- 		}
- }
- 
--#ifndef __cplusplus
--/* 
-- * Modular Multiplication. Uses the precalculated values from mult_mod_setup.
-- *
-- *
-- * Input: 
-- *	s	An prng_num. 
-- *	mm	pointer to a struct mult_mod_struct initialized 
-- *		by mult_mod_setup.
-- *
-- * Output:
-- *      (mm->a*s) mod mm->p
-- *
-- */
--prng_num mult_mod(prng_num s,struct mult_mod_struct *mm)
--{
--s_prng_num s_tmp;
--
--switch(mm->algorithm)
--	{
--	case PRNG_MM_ZERO:	return(0);
--			break;
--	case PRNG_MM_ONE:	return(s);
--			break;
--	case PRNG_MM_SIMPLE: return((s * mm->a) % mm->p );
--			break;
--	case PRNG_MM_SCHRAGE:
--			s_tmp = mm->a * ( s % mm->q ) - 
--				mm->r * ( s / mm->q );
--			if (s_tmp < 0) s_tmp += mm->p;
--			return(s_tmp);
--			break;
--	case PRNG_MM_DECOMP: return(mult_mod_generic(s,mm->a,mm->p)); 
--			break;
--#ifdef HAVE_LONGLONG
--	case PRNG_MM_LL:	return(mult_mod_ll(s,mm->a,mm->p));
--			break;
--#endif
--	case PRNG_MM_POW2:	return((s*mm->a) & mm->mask);
--			break;
--	}
--/* not reached */
--return(0);
--}
--#endif
--
- 
- /* 
-  * Modular Multiplication: Decomposition method (from L'Ecuyer & Cote)

diff --git a/sci-mathematics/prng/prng-3.0.2-r2.ebuild b/sci-mathematics/prng/prng-3.0.2-r2.ebuild
deleted file mode 100644
index 83b0901cdd8..00000000000
--- a/sci-mathematics/prng/prng-3.0.2-r2.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools
-
-DESCRIPTION="Pseudo-Random Number Generator library"
-HOMEPAGE="http://statmath.wu.ac.at/prng/"
-SRC_URI="http://statmath.wu.ac.at/prng/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT=0
-KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
-IUSE="doc examples static-libs"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.0.2-shared.patch
-	"${FILESDIR}"/${PN}-3.0.2-fix-c99-inline-semantics.patch
-)
-
-src_prepare() {
-	default
-	eautoreconf
-}
-
-src_configure() {
-	econf $(use_enable static-libs static)
-}
-
-src_install() {
-	default
-	use doc && dodoc doc/${PN}.pdf
-	if use examples; then
-		rm examples/Makefile* || die
-		dodoc -r examples
-		docompress -x /usr/share/doc/${PF}/examples
-	fi
-	if ! use static-libs; then
-		find "${D}" -name '*.la' -delete || die
-	fi
-}


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

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/prng/, sci-mathematics/prng/files/
@ 2025-09-14  7:33 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-09-14  7:33 UTC (permalink / raw
  To: gentoo-commits

commit:     fcd9b2c3d8c14a577b0666204a531ef3dc7eabe1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 14 07:00:53 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 14 07:33:00 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcd9b2c3

sci-mathematics/prng: fix -lm patch, EAPI 8

This exists since

commit 070e580ea7f3d551b066f5f1a0dff666bf67645f
Author:     Sebastien Fabbro <bicatali <AT> gentoo.org>
AuthorDate: Fri Dec 17 22:36:07 2010 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo.org>
CommitDate: Fri Dec 17 22:36:07 2010 +0000

    moved to the main tree

    (Portage version: 2.1.9.25/cvs/Linux x86_64)

If we're going to patch configure to search for -lm, we should use
the result...

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-mathematics/prng/files/prng-3.0.2-shared.patch                  | 2 +-
 sci-mathematics/prng/{prng-3.0.2-r3.ebuild => prng-3.0.2-r4.ebuild} | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sci-mathematics/prng/files/prng-3.0.2-shared.patch b/sci-mathematics/prng/files/prng-3.0.2-shared.patch
index cee8de060fae..e74efa409cd4 100644
--- a/sci-mathematics/prng/files/prng-3.0.2-shared.patch
+++ b/sci-mathematics/prng/files/prng-3.0.2-shared.patch
@@ -27,7 +27,7 @@
  # $Id$
  
 -LDADD = $(top_builddir)/src/libprng.a -lm
-+LDADD = $(top_builddir)/src/libprng.la -lm
++LDADD = $(top_builddir)/src/libprng.la $(LIBM)
  
  INCLUDES = -I$(top_srcdir)/src
  

diff --git a/sci-mathematics/prng/prng-3.0.2-r3.ebuild b/sci-mathematics/prng/prng-3.0.2-r4.ebuild
similarity index 99%
rename from sci-mathematics/prng/prng-3.0.2-r3.ebuild
rename to sci-mathematics/prng/prng-3.0.2-r4.ebuild
index e25b96a897a2..dfcc63eed90a 100644
--- a/sci-mathematics/prng/prng-3.0.2-r3.ebuild
+++ b/sci-mathematics/prng/prng-3.0.2-r4.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit autotools
 


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

end of thread, other threads:[~2025-09-14  7:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-14  7:33 [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/prng/, sci-mathematics/prng/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2021-05-19 21:37 Andrew Savchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox