diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-mathematics/prng |
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-mathematics/prng')
-rw-r--r-- | sci-mathematics/prng/Manifest | 7 | ||||
-rw-r--r-- | sci-mathematics/prng/files/prng-3.0.2-fix-c99-inline-semantics.patch | 146 | ||||
-rw-r--r-- | sci-mathematics/prng/files/prng-3.0.2-shared.patch | 52 | ||||
-rw-r--r-- | sci-mathematics/prng/metadata.xml | 16 | ||||
-rw-r--r-- | sci-mathematics/prng/prng-3.0.2-r2.ebuild | 42 |
5 files changed, 263 insertions, 0 deletions
diff --git a/sci-mathematics/prng/Manifest b/sci-mathematics/prng/Manifest new file mode 100644 index 000000000000..9a0f060e3f3f --- /dev/null +++ b/sci-mathematics/prng/Manifest @@ -0,0 +1,7 @@ +AUX prng-3.0.2-fix-c99-inline-semantics.patch 3473 SHA256 c1cfc78d5eb0a7f46859c2e035dce4f93611d5141b0fa12f22efc3b26f024bcf SHA512 bcd545ddd2c8682c533ea5b1d4b97db4cdb44d85644fe2de4da43857cad9b19dbb726ecc50adc082a6f54cd3c3bd78048ee7eb3ac1c333d26272bf4d694f3872 WHIRLPOOL 0e0798dcff87f040b695f6c432885b5ad5009df2f51844397c33ec21081f363de80cbe9562053427ed3db6cce88196b05509cb9ac560aa6775d8434ad3afe62f +AUX prng-3.0.2-shared.patch 1049 SHA256 312f09c10cfd5675c03fd138f7e05625fd44a8e3124471986ac4f7c9afc27060 SHA512 bac71da41ab908b6682d3705434d33f37d7cbb240c87a3fc349b6461d5dc86a90010028be3b0331aa58dc3ddad31efe89986ca24966071092d6845f4c6c80864 WHIRLPOOL 7134b3fdf0853a5d8a04dfac1ba236bd2e807491775ca69596cbbad82396c38411c7ffd6ae3d40ad0b45cf5ea968239a52369937d74ea5d64acd55eca51c41c6 +DIST prng-3.0.2.tar.gz 497047 SHA256 8299182b97c24b7891d74590a8a8438641a6c681ce34d6c3f7bc98a0649da48b SHA512 16addfedd16f1caf7489356770c15bde17d8ec5c66dca9fbaa52e50f850f2ab81a1af9d522bb6028ba5e279490beaf6c72060494e8a5367a7453a417a619367f WHIRLPOOL e23acec196e2fe9743ca083e2928db058c838e316581b8fcf041f83adc394bf92b5e19b8187caa2e02fca507808c00772dda651d310645396b8a76808197ad7f +EBUILD prng-3.0.2-r2.ebuild 835 SHA256 1b17ed49568e260b88f0f07e0ded077153a5426889eaa6cef49faf548d2835d0 SHA512 fbfbd1ec6930d235ed0fcbd3fb3cebdd69af917f76a5e94388d149b3ce43c16db1730584e16ec388237009622c94ac5805fa0906a2724307683aba5be6ee4c2f WHIRLPOOL 1ef4b3962cba99373cf2b45d61cd4605b32767382c954cd96889c62bad9d70afc72060167276fe744afab21ae9b7422665cef75b1e256bed6f452ce68d6aee62 +MISC ChangeLog 2670 SHA256 13104bde06b09b60030a9d9476400133373dc1ce162da5a6826c4a867fda122e SHA512 627b32d52e653e2dec1a819169c30be415456933346433bf3c9be475b25542d6bb698ee378fa71a0f3e778a695e9090e7aca39a945a8bb403d5f31ea94b0bf64 WHIRLPOOL f46be75a81c53ba93c2a84dab3f4c7e710271cf8ef8f90b1acbbbc2f658b07f9890bb0f9e6ebd9cb7f837a66cef0b790ea72a9e66860aea028abee876549ed75 +MISC ChangeLog-2015 1183 SHA256 b071ae8f7b286d47bea5ea99581b993cce375f59fbdd9aac88b1f1367cf1e935 SHA512 6439fb71dc222ca6970bf4ff5406db1bd41a04555d04f8b2a05dde73186d46c0f72c7fb06e200321ae60f2dc181f4d244559014fffaefa5f0d6b6fb678fe288d WHIRLPOOL 94cfdbe370ce9d01398b0f05549415f25b4907096b39286463521a9f0c0ba8def8bd9bae55ab2377a8aa4eb39e1958d675e26bf7a46f9fb767e084b09dbc39e1 +MISC metadata.xml 672 SHA256 eaabbb6cf536c7a78e2a5e1b6eff61b69574cad924cdc7ab96fdc9717c61775c SHA512 ff5dd81995a4a98f6f2e18809e129b93350868237bd1b827bdd2c8d4a56237479044d8e2a8482e82c4a2e6589509caf241afd5d9eb598bb5faacb7bb058cff35 WHIRLPOOL 533df6d138f728919b5a1244c2f716581f838dac49bf95c2120d186af9021505dedc646380fb6e9f083575691699cd05266c30c87be8cfe90015416534ed1641 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 000000000000..c84a288d47dd --- /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 a/sci-mathematics/prng/files/prng-3.0.2-shared.patch b/sci-mathematics/prng/files/prng-3.0.2-shared.patch new file mode 100644 index 000000000000..cee8de060fae --- /dev/null +++ b/sci-mathematics/prng/files/prng-3.0.2-shared.patch @@ -0,0 +1,52 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -23,6 +23,7 @@ + AC_PROG_RANLIB + AC_PROG_INSTALL + AC_PROG_LN_S ++AC_PROG_LIBTOOL + + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +@@ -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]) + + AC_CONFIG_FILES([\ + Makefile \ +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -1,11 +1,11 @@ + ## Process this file with automake to produce Makefile.in + # $Id$ + +-LDADD = $(top_builddir)/src/libprng.a -lm ++LDADD = $(top_builddir)/src/libprng.la -lm + + INCLUDES = -I$(top_srcdir)/src + +-noinst_PROGRAMS = pairs tuples ++check_PROGRAMS = pairs tuples + + # clean backup files + CLEANFILES = *~ +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -3,9 +3,9 @@ + + INCLUDES = + +-lib_LIBRARIES = libprng.a ++lib_LTLIBRARIES = libprng.la + +-libprng_a_SOURCES = \ ++libprng_la_SOURCES = \ + prng.c \ + dicg.c \ + eicg.c \ diff --git a/sci-mathematics/prng/metadata.xml b/sci-mathematics/prng/metadata.xml new file mode 100644 index 000000000000..19da1401e574 --- /dev/null +++ b/sci-mathematics/prng/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci-mathematics@gentoo.org</email> + <name>Gentoo Mathematics Project</name> + </maintainer> + <longdescription lang="en"> + 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. +</longdescription> +</pkgmetadata> diff --git a/sci-mathematics/prng/prng-3.0.2-r2.ebuild b/sci-mathematics/prng/prng-3.0.2-r2.ebuild new file mode 100644 index 000000000000..73e901ea3f8b --- /dev/null +++ b/sci-mathematics/prng/prng-3.0.2-r2.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2017 Gentoo Foundation +# 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="${HOMEPAGE}${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 +} |