[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/prng/, sci-mathematics/prng/files/

2021-05-19 Thread Andrew Savchenko
commit: f478c4901cfca32cca3a8c32d2988b373a2b32cb
Author: Andrew Savchenko  gentoo  org>
AuthorDate: Wed May 19 21:36:07 2021 +
Commit: Andrew Savchenko  gentoo  org>
CommitDate: Wed May 19 21:36:07 2021 +
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  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..000
--- 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

[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/prng/

2021-05-19 Thread Agostino Sarubbo
commit: 2bd0a3de19160233f6d72680499ada33999586ca
Author: Agostino Sarubbo  gentoo  org>
AuthorDate: Wed May 19 20:08:29 2021 +
Commit: Agostino Sarubbo  gentoo  org>
CommitDate: Wed May 19 20:09:04 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bd0a3de

sci-mathematics/prng: x86 stable wrt bug #790857

Package-Manager: Portage-3.0.13, Repoman-3.0.2
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo  gentoo.org>

 sci-mathematics/prng/prng-3.0.2-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sci-mathematics/prng/prng-3.0.2-r3.ebuild 
b/sci-mathematics/prng/prng-3.0.2-r3.ebuild
index f935d4f0ad1..676b10eb389 100644
--- a/sci-mathematics/prng/prng-3.0.2-r3.ebuild
+++ b/sci-mathematics/prng/prng-3.0.2-r3.ebuild
@@ -11,7 +11,7 @@ SRC_URI="http://statmath.wu.ac.at/prng/${P}.tar.gz;
 
 LICENSE="GPL-2"
 SLOT=0
-KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
 IUSE="doc examples static-libs"
 
 PATCHES=(



[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/prng/

2021-05-19 Thread Agostino Sarubbo
commit: 401edadfbaa4838e33842b1b8de3f10a3cff08e7
Author: Agostino Sarubbo  gentoo  org>
AuthorDate: Wed May 19 20:05:02 2021 +
Commit: Agostino Sarubbo  gentoo  org>
CommitDate: Wed May 19 20:05:02 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=401edadf

sci-mathematics/prng: amd64 stable wrt bug #790857

Package-Manager: Portage-3.0.13, Repoman-3.0.2
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo  gentoo.org>

 sci-mathematics/prng/prng-3.0.2-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sci-mathematics/prng/prng-3.0.2-r3.ebuild 
b/sci-mathematics/prng/prng-3.0.2-r3.ebuild
index add90f9238c..f935d4f0ad1 100644
--- a/sci-mathematics/prng/prng-3.0.2-r3.ebuild
+++ b/sci-mathematics/prng/prng-3.0.2-r3.ebuild
@@ -11,7 +11,7 @@ SRC_URI="http://statmath.wu.ac.at/prng/${P}.tar.gz;
 
 LICENSE="GPL-2"
 SLOT=0
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="amd64 ~x86 ~amd64-linux ~x86-linux"
 IUSE="doc examples static-libs"
 
 PATCHES=(



[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/prng/

2021-05-18 Thread Andrew Savchenko
commit: ae8b9643fbfaa51122f9f7df199c4b5c5f7232b0
Author: Andrew Savchenko  gentoo  org>
AuthorDate: Tue May 18 22:17:54 2021 +
Commit: Andrew Savchenko  gentoo  org>
CommitDate: Tue May 18 22:19:15 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae8b9643

sci-mathematics/prng: cleanup debug code

It has NOOP effect on the resulting library.

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

 sci-mathematics/prng/prng-3.0.2-r3.ebuild | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sci-mathematics/prng/prng-3.0.2-r3.ebuild 
b/sci-mathematics/prng/prng-3.0.2-r3.ebuild
index e4cc42dcc3e..add90f9238c 100644
--- a/sci-mathematics/prng/prng-3.0.2-r3.ebuild
+++ b/sci-mathematics/prng/prng-3.0.2-r3.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit autotools flag-o-matic
+inherit autotools
 
 DESCRIPTION="Pseudo-Random Number Generator library"
 HOMEPAGE="http://statmath.wu.ac.at/prng/;
@@ -25,8 +25,6 @@ src_prepare() {
 }
 
 src_configure() {
-   # bug 705318
-   append-cflags -fvisibility-inlines-hidden
econf $(use_enable static-libs static)
 }
 



[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/prng/files/, sci-mathematics/prng/

2021-05-18 Thread Andrew Savchenko
commit: fcbf9252166ef3f04d46343fb5886aa7e91a58ea
Author: Andrew Savchenko  gentoo  org>
AuthorDate: Tue May 18 21:58:26 2021 +
Commit: Andrew Savchenko  gentoo  org>
CommitDate: Tue May 18 22:02:47 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fcbf9252

sci-mathematics/prng: fix unresolved symbols

Some symbols were unresolved because functions were inlined.
This caused build failure of other packages like unurun.

Bug: https://bugs.gentoo.org/705318
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andrew Savchenko  gentoo.org>

 .../prng-3.0.2-fix-all-c99-inline-semantics.patch  | 404 +
 sci-mathematics/prng/prng-3.0.2-r3.ebuild  |  44 +++
 2 files changed, 448 insertions(+)

diff --git 
a/sci-mathematics/prng/files/prng-3.0.2-fix-all-c99-inline-semantics.patch 
b/sci-mathematics/prng/files/prng-3.0.2-fix-all-c99-inline-semantics.patch
new file mode 100644
index 000..e6281704376
--- /dev/null
+++ b/sci-mathematics/prng/files/prng-3.0.2-fix-all-c99-inline-semantics.patch
@@ -0,0 +1,404 @@
+diff '--color=auto' -Naurd prng-3.0.2.orig/src/anti.c prng-3.0.2/src/anti.c
+--- prng-3.0.2.orig/src/anti.c 2001-11-06 22:31:36.0 +0300
 prng-3.0.2/src/anti.c  2021-05-19 00:41:03.400665843 +0300
+@@ -82,7 +82,7 @@
+  *  gen:  Pointer to a struct prng.
+  *
+  */
+-inline double prng_anti_get_next(struct prng *gen)
++double prng_anti_get_next(struct prng *gen)
+ {
+   return (1. - prng_get_next(gen->data.anti_data.prng));
+ }
+@@ -114,7 +114,7 @@
+  *
+  */
+ /*
+-inline prng_num prng_anti_get_next_int(struct prng *gen)
++prng_num prng_anti_get_next_int(struct prng *gen)
+ ... undefined !!!
+ */
+ 
+diff '--color=auto' -Naurd prng-3.0.2.orig/src/compound.c 
prng-3.0.2/src/compound.c
+--- prng-3.0.2.orig/src/compound.c 2001-11-06 22:34:51.0 +0300
 prng-3.0.2/src/compound.c  2021-05-19 00:41:03.395665825 +0300
+@@ -105,7 +105,7 @@
+  *  gen:  Pointer to a struct prng.
+  *
+  */
+-inline double prng_compound_get_next(struct prng *gen)
++double prng_compound_get_next(struct prng *gen)
+ {
+   int i;
+   double sum = 0.0;
+diff '--color=auto' -Naurd prng-3.0.2.orig/src/cons.c prng-3.0.2/src/cons.c
+--- prng-3.0.2.orig/src/cons.c 2001-11-06 22:35:29.0 +0300
 prng-3.0.2/src/cons.c  2021-05-19 00:41:03.392665813 +0300
+@@ -89,7 +89,7 @@
+  *  gen:  Pointer to a struct prng.
+  *
+  */
+-inline double prng_con_get_next(struct prng *gen)
++double prng_con_get_next(struct prng *gen)
+ {
+   return(prng_get_next(gen->data.con_data.prng));
+ }
+@@ -119,7 +119,7 @@
+  *  gen:  Pointer to a struct prng.
+  *
+  */
+-inline prng_num prng_con_get_next_int(struct prng *gen)
++prng_num prng_con_get_next_int(struct prng *gen)
+ {
+   return(prng_get_next_int(gen->data.con_data.prng));
+ }
+diff '--color=auto' -Naurd prng-3.0.2.orig/src/dicg.c prng-3.0.2/src/dicg.c
+--- prng-3.0.2.orig/src/dicg.c 2001-11-06 22:35:50.0 +0300
 prng-3.0.2/src/dicg.c  2021-05-19 00:41:03.398665836 +0300
+@@ -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;
+@@ -593,7 +593,7 @@
+  *  gen:  Pointer to a struct prng.
+  *
+  */
+-inline prng_num prng_dicg_get_next_int(struct prng *gen) /* DUMMY */
++prng_num prng_dicg_get_next_int(struct prng *gen) /* DUMMY */
+ {
+   s_prng_num inv, current, prod;
+ 
+@@ -619,7 +619,7 @@
+  *  gen:  Pointer to a struct prng.
+  *
+  */
+-inline double prng_dicg_get_next(struct prng *gen)
++double prng_dicg_get_next(struct prng *gen)
+ {
+   return(prng_dicg_get_next_int(gen) * gen->data.dicg_data.inv_p);
+ }
+diff '--color=auto' -Naurd prng-3.0.2.orig/src/eicg.c prng-3.0.2/src/eicg.c
+--- prng-3.0.2.orig/src/eicg.c 2001-11-06 22:36:04.0 +0300
 prng-3.0.2/src/eicg.c  2021-05-19 00:41:03.405665862 +0300
+@@ -120,7 +120,7 @@
+  *  gen:  Pointer to a struct prng.
+  *
+  */
+-inline prng_num prng_eicg_get_next_int(struct prng *gen)
++prng_num prng_eicg_get_next_int(struct prng *gen)
+ {
+   prng_num old;
+ 
+@@ -138,7 +138,7 @@
+  *  gen:  Pointer to a struct prng.
+  *
+  */
+-inline double prng_eicg_get_next(struct prng *gen)
++double prng_eicg_get_next(struct prng *gen)
+ {
+   return(prng_eicg_get_next_int(gen) * gen->data.eicg_data.inv_p);
+ }
+diff '--color=auto' -Naurd prng-3.0.2.orig/src/external.c 
prng-3.0.2/src/external.c
+--- prng-3.0.2.orig/src/external.c 2001-11-06 22:36:35.0 +0300
 prng-3.0.2/src/external.c  2021-05-19 00:41:03.391665810 +0300
+@@ -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;
+ 

[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/prng/

2017-11-25 Thread David Seifert
commit: 2db42e98ce2dc7a3db670cce0a8a3756d441306b
Author: David Seifert  gentoo  org>
AuthorDate: Sat Nov 25 16:52:28 2017 +
Commit: David Seifert  gentoo  org>
CommitDate: Sat Nov 25 17:39:56 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2db42e98

sci-mathematics/prng: [QA] Consistent whitespace in metadata.xml

 sci-mathematics/prng/metadata.xml | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/sci-mathematics/prng/metadata.xml 
b/sci-mathematics/prng/metadata.xml
index 19da1401e57..18463765513 100644
--- a/sci-mathematics/prng/metadata.xml
+++ b/sci-mathematics/prng/metadata.xml
@@ -6,11 +6,11 @@
Gentoo Mathematics Project


-  The Pseudo-Random Number Generator library is a portable,
-  high-performance ANSI-C implementations of pseudorandom number
-  generators such as linear congruential, inversive congruential, and
-  explicit inversive congruential random number generators (called
-  LCG, ICG and EICG, respectively) created by Otmar Lendl. It is part
-  of the pLab project.
-
+   The Pseudo-Random Number Generator library is a portable,
+   high-performance ANSI-C implementations of pseudorandom number
+   generators such as linear congruential, inversive congruential, 
and
+   explicit inversive congruential random number generators (called
+   LCG, ICG and EICG, respectively) created by Otmar Lendl. It is 
part
+   of the pLab project.
+   
 



[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/prng/

2017-03-11 Thread David Seifert
commit: dbbbd2531618d442315889b44c23c84a83b3f034
Author: David Seifert  gentoo  org>
AuthorDate: Sat Mar 11 16:35:51 2017 +
Commit: David Seifert  gentoo  org>
CommitDate: Sat Mar 11 16:43:13 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbbbd253

sci-mathematics/prng: Mark amd64 and x86 stable

Package-Manager: Portage-2.3.4, Repoman-2.3.2

 sci-mathematics/prng/prng-3.0.2-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sci-mathematics/prng/prng-3.0.2-r2.ebuild 
b/sci-mathematics/prng/prng-3.0.2-r2.ebuild
index 5eba1b12905..73e901ea3f8 100644
--- a/sci-mathematics/prng/prng-3.0.2-r2.ebuild
+++ b/sci-mathematics/prng/prng-3.0.2-r2.ebuild
@@ -11,7 +11,7 @@ SRC_URI="${HOMEPAGE}${P}.tar.gz"
 
 LICENSE="GPL-2"
 SLOT=0
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
 IUSE="doc examples static-libs"
 
 PATCHES=(



[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/prng/

2017-03-11 Thread David Seifert
commit: c6ece07f0c6eee800aa9b18bb71165739533edb8
Author: David Seifert  gentoo  org>
AuthorDate: Sat Mar 11 16:36:32 2017 +
Commit: David Seifert  gentoo  org>
CommitDate: Sat Mar 11 16:43:19 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6ece07f

sci-mathematics/prng: Remove old

Package-Manager: Portage-2.3.4, Repoman-2.3.2

 sci-mathematics/prng/prng-3.0.2.ebuild | 29 -
 1 file changed, 29 deletions(-)

diff --git a/sci-mathematics/prng/prng-3.0.2.ebuild 
b/sci-mathematics/prng/prng-3.0.2.ebuild
deleted file mode 100644
index 1bc9beb1c5a..000
--- a/sci-mathematics/prng/prng-3.0.2.ebuild
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=4
-
-AUTOTOOLS_AUTORECONF=yes
-
-inherit autotools-utils
-
-DESCRIPTION="Pseudo-Random Number Generator library"
-HOMEPAGE="http://statmath.wu.ac.at/prng/;
-SRC_URI="${HOMEPAGE}${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT=0
-KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
-IUSE="doc examples static-libs"
-
-PATCHES=( "${FILESDIR}"/${P}-shared.patch )
-
-src_install() {
-   autotools-utils_src_install
-   use doc && dodoc doc/${PN}.pdf
-   if use examples; then
-   rm examples/Makefile*
-   insinto /usr/share/doc/${PF}
-   doins -r examples
-   fi
-}



[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/prng/files/, sci-mathematics/prng/

2017-03-11 Thread David Seifert
commit: 517686ae1b6c4e1f5190c2709380207cc8eb64a4
Author: David Seifert  gentoo  org>
AuthorDate: Sat Mar 11 16:34:52 2017 +
Commit: David Seifert  gentoo  org>
CommitDate: Sat Mar 11 16:43:08 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=517686ae

sci-mathematics/prng: Fix static-libs building

* Also fix C99 inline semantics properly

Package-Manager: Portage-2.3.4, Repoman-2.3.2

 .../prng-3.0.2-fix-c99-inline-semantics.patch  | 146 +
 sci-mathematics/prng/files/prng-3.0.2-shared.patch |  15 +--
 .../{prng-3.0.2-r1.ebuild => prng-3.0.2-r2.ebuild} |  21 ++-
 3 files changed, 167 insertions(+), 15 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
new file mode 100644
index 000..c84a288d47d
--- /dev/null
+++ b/sci-mathematics/prng/files/prng-3.0.2-fix-c99-inline-semantics.patch
@@ -0,0 +1,146 @@
+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 

[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/prng/files/, sci-mathematics/prng/

2016-01-12 Thread David Seifert
commit: 7697105a937fb3043f146d15b1e4a8a8679eaf0b
Author: David Seifert  gentoo  org>
AuthorDate: Tue Jan 12 23:49:20 2016 +
Commit: David Seifert  gentoo  org>
CommitDate: Tue Jan 12 23:50:37 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7697105a

sci-mathematics/prng: Revbump, modernize to EAPI=6, fix #570100

Package-Manager: portage-2.2.26

 sci-mathematics/prng/files/prng-3.0.2-shared.patch | 13 +
 sci-mathematics/prng/prng-3.0.2-r1.ebuild  | 34 ++
 2 files changed, 42 insertions(+), 5 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 c529293..109e74f 100644
--- a/sci-mathematics/prng/files/prng-3.0.2-shared.patch
+++ b/sci-mathematics/prng/files/prng-3.0.2-shared.patch
@@ -9,15 +9,18 @@ diff -Nur prng-3.0.2.orig/configure.ac prng-3.0.2/configure.ac
  
  dnl Checks for typedefs, structures, and compiler characteristics.
  AC_C_CONST
-@@ -39,6 +40,8 @@
+@@ -39,10 +40,7 @@
  dnl Checks for library functions.
  AC_CHECK_FUNCS(strtoul)
  
+-dnl Set flags for compiler
+-if test X"$GCC" = Xyes ; then
+-  AC_SUBST(AM_CFLAGS,"-Wall -fomit-frame-pointer")
+-fi
 +AC_CHECK_LIB([m], [pow])
-+
- dnl Set flags for compiler
- if test X"$GCC" = Xyes ; then
-   AC_SUBST(AM_CFLAGS,"-Wall -fomit-frame-pointer")
+ 
+ AC_CONFIG_FILES([\
+ Makefile \
 diff -Nur prng-3.0.2.orig/examples/Makefile.am prng-3.0.2/examples/Makefile.am
 --- prng-3.0.2.orig/examples/Makefile.am   2010-10-16 18:47:52.0 
+0100
 +++ prng-3.0.2/examples/Makefile.am2010-10-16 18:48:08.0 +0100

diff --git a/sci-mathematics/prng/prng-3.0.2-r1.ebuild 
b/sci-mathematics/prng/prng-3.0.2-r1.ebuild
new file mode 100644
index 000..f3e65ff
--- /dev/null
+++ b/sci-mathematics/prng/prng-3.0.2-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="Pseudo-Random Number Generator library"
+HOMEPAGE="http://statmath.wu.ac.at/prng/;
+SRC_URI="${HOMEPAGE}${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT=0
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples static-libs"
+
+PATCHES=( "${FILESDIR}/${P}-shared.patch" )
+
+src_prepare() {
+   append-cflags -std=gnu89
+   default
+   eautoreconf
+}
+
+src_install() {
+   default
+   use doc && dodoc doc/${PN}.pdf
+   if use examples; then
+   rm examples/Makefile* || die
+   insinto /usr/share/doc/${PF}
+   doins -r examples
+   fi
+}