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

2022-12-02 Thread Sam James
commit: 2273bd624c73d57d9ef25315f5f2410264488935
Author: Sam James  gentoo  org>
AuthorDate: Sat Dec  3 05:13:03 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Dec  3 06:06:08 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2273bd62

sci-mathematics/unuran: add 1.9.0

Signed-off-by: Sam James  gentoo.org>

 sci-mathematics/unuran/Manifest|  1 +
 .../files/unuran-1.9.0-configure-clang16.patch | 27 ++
 sci-mathematics/unuran/unuran-1.9.0.ebuild | 59 ++
 3 files changed, 87 insertions(+)

diff --git a/sci-mathematics/unuran/Manifest b/sci-mathematics/unuran/Manifest
index 55e7dd8c0dbd..0451dcefc7dd 100644
--- a/sci-mathematics/unuran/Manifest
+++ b/sci-mathematics/unuran/Manifest
@@ -1 +1,2 @@
 DIST unuran-1.8.1.tar.gz 4409911 BLAKE2B 
2b036032deaeae70aa6ef58124fc88e9c167ae7952d04cba4b50181fff4249eff88c20bbb667c5702899bc863745b6991ae842da86f6bc592b6635dc310ec544
 SHA512 
4d98861914afe39065ec31ee837c0e21e0fb4f4667f559dee38a7a5c4e06f0d09bd550b20d06321d1f5fcd4799d482a9eebc66ac35f8cd7fff834f536d24854c
+DIST unuran-1.9.0.tar.gz 3803126 BLAKE2B 
20a88e9004d284983770364f35941f8ea66e1c68ef8c0ea210e1b12d9027947fbf723032f22f88b87c8f649ab52c904b460673cee8d78a52ff5196a6f4212d9c
 SHA512 
8fe389f2fc569265e7bac2a5de3d12e4a6238076bff2a7e19842a57da314dfdca19ff5c398e24732883a19de794a65bab7d0663b4551c664562a3c93f2d87170

diff --git a/sci-mathematics/unuran/files/unuran-1.9.0-configure-clang16.patch 
b/sci-mathematics/unuran/files/unuran-1.9.0-configure-clang16.patch
new file mode 100644
index ..66a9d44538bb
--- /dev/null
+++ b/sci-mathematics/unuran/files/unuran-1.9.0-configure-clang16.patch
@@ -0,0 +1,27 @@
+https://src.fedoraproject.org/rpms/unuran/blob/4e6e6392ad892454339458b655fd0324e58de3b7/f/unuran-configure-c99.patch
+https://bugzilla.redhat.com/show_bug.cgi?id=2150308
+
+Avoid calling the undeclared exit function.  Instead return
+from main.  Implicit function declarations were removed from C99,
+and future compilers are likely to reject them.
+
+--- a/acinclude.m4
 b/acinclude.m4
+@@ -14,7 +14,7 @@ int main (void)
+nan = inf / inf;
+/* nan = 0.0 / 0.0; */
+status = (nan == nan);
+-   exit (status);
++   return status;
+ }]])],
+ [ac_cv_c_ieee_comparisons="yes"],
+ [ac_cv_c_ieee_comparisons="no"],
+@@ -43,7 +43,7 @@ int main (void)
+double x = 0.0;
+double inf = 1.0 / x;
+int status = (inf < DBL_MAX/2.);
+-   exit (status);
++   return status;
+ }]])],
+ [ac_cv_c_divide_by_zero="yes"],
+ [ac_cv_c_divide_by_zero="no"],

diff --git a/sci-mathematics/unuran/unuran-1.9.0.ebuild 
b/sci-mathematics/unuran/unuran-1.9.0.ebuild
new file mode 100644
index ..971d2638952a
--- /dev/null
+++ b/sci-mathematics/unuran/unuran-1.9.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools out-of-source
+
+DESCRIPTION="Universal Non-Uniform Random number generator"
+HOMEPAGE="https://statmath.wu.ac.at/unuran/;
+SRC_URI="https://statmath.wu.ac.at/unuran/${P}.tar.gz;
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples gsl prng +rngstreams"
+
+DEPEND="
+   gsl? ( sci-libs/gsl:= )
+   prng? ( sci-mathematics/prng )
+   rngstreams? ( sci-mathematics/rngstreams:= )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+   "${FILESDIR}"/${PN}-1.9.0-configure-clang16.patch
+)
+
+src_prepare() {
+   default
+
+   # Clang 16
+   eautoreconf
+}
+
+my_src_configure() {
+   local udefault=builtin
+   use rngstreams && udefault=rngstream
+
+   CONFIG_SHELL="${BROOT}"/bin/bash econf \
+   --enable-shared \
+   --disable-static \
+   --with-urng-default="${udefault}" \
+   $(use_with gsl urng-gsl) \
+   $(use_with prng urng-prng) \
+   $(use_with rngstreams urng-rngstream)
+}
+
+my_src_install_all() {
+   use doc && dodoc doc/${PN}.pdf
+   einstalldocs
+
+   if use examples; then
+   rm examples/Makefile* || die
+   dodoc -r examples
+   docompress -x /usr/share/doc/${PF}/examples
+   fi
+
+   # no static archives
+   find "${D}" -name '*.la' -delete || die
+}



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

2017-02-01 Thread David Seifert
commit: 222aa83673154c6d50b1c2de4b444b90e995d9af
Author: Michael Mair-Keimberger (asterix)  gmail 
 com>
AuthorDate: Wed Feb  1 18:48:44 2017 +
Commit: David Seifert  gentoo  org>
CommitDate: Wed Feb  1 22:39:36 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=222aa836

sci-mathematics/unuran: remove unused patch

Closes: https://github.com/gentoo/gentoo/pull/3764

 .../unuran/files/unuran-1.8.0-nogsl.patch  | 48 --
 1 file changed, 48 deletions(-)

diff --git a/sci-mathematics/unuran/files/unuran-1.8.0-nogsl.patch 
b/sci-mathematics/unuran/files/unuran-1.8.0-nogsl.patch
deleted file mode 100644
index f626653..
--- a/sci-mathematics/unuran/files/unuran-1.8.0-nogsl.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-diff -Nur unuran-1.8.0.orig/configure.ac unuran-1.8.0/configure.ac
 unuran-1.8.0.orig/configure.ac 2010-12-22 05:11:07.0 +
-+++ unuran-1.8.0/configure.ac  2010-12-22 05:15:35.0 +
-@@ -62,10 +62,6 @@
- dnl libm: the standard math library
- AC_CHECK_LIB([m], [sqrt])
- 
--dnl libmgsl: the GNU Scientific library 
--dnl (only used for experimental code)
--AC_CHECK_LIB([gsl], [gsl_integration_qagiu])
--
- dnl Optional support for external uniform random number generators
- 
- dnl RngStream: Pierre L'Ecuyer's multiple random stream generator
-@@ -80,6 +76,11 @@
- AX_ADD_URNG_LIB([gsl],[GSL],[random number generators from GNU Scientific 
Library],
- [gsl],[gsl_rng_alloc],[gsl/gsl_rng.h])
- 
-+if test -n $UNURAN_SUPPORTS_GSL; then
-+  AC_PATH_PROG(GSL_CONFIG, gsl-config, no)
-+  LIBS="$LIBS `$GSL_CONFIG --libs`"
-+fi
-+
- dnl Default URNG
- AC_ARG_WITH(urng_default,
-   [AS_HELP_STRING([--with-urng-default],
-@@ -215,7 +216,8 @@
-   [],
-   [enable_experimental=no])
- AS_IF([test "x$enable_experimental" = xyes],
--  [AC_DEFINE([USE_EXPERIMENTAL_CODE], [1], 
-+  [AC_CHECK_LIB([gsl], [gsl_integration_qagiu])
-+   AC_DEFINE([USE_EXPERIMENTAL_CODE], [1], 
-  [Define to 1 if you want to use experimental code])], 
-   [])
- AM_CONDITIONAL(ENABLE_EXPERIMENTAL, test x$enable_experimental = xyes)
-diff -Nur unuran-1.8.0.orig/tests/Makefile.am unuran-1.8.0/tests/Makefile.am
 unuran-1.8.0.orig/tests/Makefile.am2010-12-22 05:11:07.0 
+
-+++ unuran-1.8.0/tests/Makefile.am 2010-12-22 05:11:19.0 +
-@@ -9,7 +9,7 @@
-  -I$(top_srcdir)/src \
-  -I$(top_srcdir)/src/tests
- 
--noinst_LTLIBRARIES = libtestroutines.la
-+check_LTLIBRARIES = libtestroutines.la
- libtestroutines_la_SOURCES = testroutines.c testcounter.c
- 
- LDADD = \