debian/0000755000000000000000000000000012231171054007162 5ustar debian/watch0000644000000000000000000000035211212456176010224 0ustar # format version number, currently 3; this line is compulsory! version=3 # URL to the package page followed by a regex to search http://search.cpan.org/dist/Math-Random/ .*/Math-Random-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ debian/clean0000644000000000000000000000001011245256244010167 0ustar test.pl debian/rules0000755000000000000000000000041311562030155010242 0ustar #!/usr/bin/make -f PACKAGE = $(shell dh_listpackages) TMP = $(CURDIR)/debian/$(PACKAGE) %: dh $@ override_dh_auto_install: dh_auto_install rm $(TMP)/usr/lib/perl5/Math/example.pl rm $(TMP)/usr/lib/perl5/Math/test1.pl rm $(TMP)/usr/lib/perl5/Math/test2.pl debian/libmath-random-perl.examples0000644000000000000000000000002311245247343014564 0ustar example.pl test.pl debian/copyright0000644000000000000000000000615111562031675011132 0ustar Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 Maintainer: Geoffrey Rommel Source: http://search.cpan.org/dist/Math-Random/ Name: Math-Random Disclaimer: This package is not part of the Debian operating system. The libmath-random-perl source and binary Debian packages are part of the "non-free" area in our archive. The packages in this area are not part of the Debian system, although they have been configured for use with Debian. We nevertheless support the use of the libmath-random-perl source and binary Debian pacakges and provide infrastructure for non-free packages (such as our bug tracking system and mailing lists). Files: * Copyright: 1997, John Venier 1997, Barry W. Brown 1997, Geoffrey Rommel License-Alias: Perl License: Artistic or GPL-1+ Files: randlib.c, com.c, randlib.h Copyright: Association for Computing Machinery License: ACM Submittal of an algorithm for publication in one of the ACM Transactions implies that unrestricted use of the algorithm within a computer is permissible. General permission to copy and distribute the algorithm without fee is granted provided that the copies are not made or distributed for direct commercial advantage. The ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. . Krogh, F. "Algorithms Policy." ACM Tran. Math. Softw. 13 (1987), 183-186. . Note, however, that only the particular expression of an algorithm can be copyrighted, not the algorithm per se; see 17 USC 102(b). . The authors of Math::Random placed the Randlib code that we have written in the public domain. Files: debian/* Copyright: 2008-2009, Charles Plessy 2009, Jonathan Yu 2009, Ryan Niebur 2011, gregor herrmann License: Poetic This work ‘as-is’ we provide. No warranty, express or implied. We’ve done our best, to debug and test. Liability for damages denied. . Permission is granted hereby, to copy, share, and modify. Use as is fit, free or for profit. On this notice these rights rely. Comment: The text of this license is © 2005 Alexander E Genaud, see `http://genaud.net/2005/10/poetic-license/'. License: Artistic This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License, which comes with Perl. . On Debian systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. debian/source/0000755000000000000000000000000011562032013010457 5ustar debian/source/format0000644000000000000000000000001411562030131011664 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000011562032013010606 5ustar debian/patches/random-seed.patch0000644000000000000000000000342611562031242014035 0ustar Description: Update seeding algorithm By default, this algorithm uses localtime to seed the random number generator, which provides poor randomness when Perl is executed many times sequentially. This patch replaces that with Don Armstrong's proposed solution, Perl_seed. See BTS#537952 for details. Origin: vendor Bug-Debian: http://bugs.debian.org/537952 Bug: https://rt.cpan.org/Ticket/Display.html?id=48080 Forwarded: yes Author: Jonathan Yu Reviewed-by: gregor herrmann Last-Update: 2011-05-09 --- a/Random.pm +++ b/Random.pm @@ -73,7 +73,12 @@ ### set seeds by default -salfph(scalar(localtime())); +if ($] > 5.008001) { + set_default_seed(); +} +else { + salfph(scalar localtime); +} ##################################################################### # RANDOM DEVIATE GENERATORS # --- a/Random.xs +++ b/Random.xs @@ -11,6 +11,23 @@ #include "randlib.h" #include "helper.h" +#define PERL_VERSION_ATLEAST(a,b,c) \ + (PERL_REVISION > (a) \ + || (PERL_REVISION == (a) \ + && (PERL_VERSION > (b) \ + || (PERL_VERSION == (b) && PERL_SUBVERSION >= (c))))) + +#if PERL_VERSION_ATLEAST (5,8,1) +/* For whatever reason, the random seeds need to be in 1..2^30; the below will + * be uniformly distributed assuming the seed value is uniformly distributed. + */ +#define default_seed_mechanism \ + setall((long)(Perl_seed(aTHX) % 1073741824L), \ + (long)(Perl_seed(aTHX) % 1073741824L)); +#else /* Perl < 5.8.1 */ +#define default_seed_mechanism not_here("Perl_seed"); +#endif + static int not_here(s) char *s; @@ -38,6 +55,10 @@ MODULE = Math::Random PACKAGE = Math::Random +void +set_default_seed() + CODE: + default_seed_mechanism; double genbet (aa,bb) debian/patches/pod-errors.patch0000644000000000000000000000131311562031200013716 0ustar Description: Fix POD errors Remove S<> stuff completely, as parsing this confuses some parsers. Origin: vendor Forwarded: no Author: Jonathan Yu Reviewed-by: gregor herrmann Last-Update: 2011-05-09 --- a/Random.pm +++ b/Random.pm @@ -616,8 +616,8 @@ =item C Returns an array of array indices, randomly permuted. The indices -used are S<(0, ... ,>(I<$n>S< - >1)). This produces the indices used -by C for a given seed, without passing arrays. +used are (0, ... , $n-1). This produces the indices used by +C for a given seed, without passing arrays. B the following are equivalent: debian/patches/series0000644000000000000000000000004311236101065012022 0ustar pod-errors.patch random-seed.patch debian/compat0000644000000000000000000000000211562031024010356 0ustar 8 debian/control0000644000000000000000000000223011562031036010563 0ustar Source: libmath-random-perl Section: non-free/perl Priority: optional Build-Depends: perl, debhelper (>= 8) Maintainer: Debian Perl Group Uploaders: Charles Plessy , Jonathan Yu , gregor herrmann Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libmath-random-perl/ Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libmath-random-perl/ Homepage: http://search.cpan.org/dist/Math-Random/ XS-Autobuild: yes Package: libmath-random-perl Architecture: any Depends: ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends} Description: Perl collection of random number generators Math::Random is a Perl port of the C version of randlib, which is a suite of routines for generating random deviates. This supports all the distributions from which the Fortran and C versions generate deviates. Some features are excluded including the multiple generators/splitting facility and antithetic random number generation. These, along with some of the distributions which are included, are probably not of interest except to the very sophisticated user. debian/libmath-random-perl.docs0000644000000000000000000000000711245256012013671 0ustar README debian/changelog0000644000000000000000000000416112231171054011036 0ustar libmath-random-perl (0.71-3build2) trusty; urgency=low * Rebuild for Perl 5.18. -- Colin Watson Mon, 21 Oct 2013 10:21:48 +0100 libmath-random-perl (0.71-3build1) precise; urgency=low * Rebuild for Perl 5.14. -- Colin Watson Tue, 15 Nov 2011 20:03:54 +0000 libmath-random-perl (0.71-3) unstable; urgency=medium [ Ryan Niebur ] * Email change: Jonathan Yu -> jawnsy@cpan.org [ gregor herrmann ] * debian/control: add XS-Autobuild header (closes: #625908). * Switch to source format 3.0 (quilt); remove quilt framework. * debian/copyright: update formatting. * Set Standards-Version to 3.9.2 (no changes). * Bump debhelper compatibility level to 8. * Add /me to Uploaders. * Update patch headers. * Set urgeny to medium (RC bug, perl 5.12 transition). -- gregor herrmann Mon, 09 May 2011 20:35:46 +0200 libmath-random-perl (0.71-2) unstable; urgency=low [ Jonathan Yu ] * Added another way of seeding, proposed by Don Armstrong (Closes: #537952) + Will fall back to localtime for seed on systems without Perl_seed * Standards-Version 3.8.2 (no changes) * Added myself to Uploaders * Changed to new short d/rules format * Cleaned up control description * Added a patch to get rid of POD errors * Remove examples mistakenly installed in /usr/perl5/lib [ Charles Plessy ] * Added non-free disclaimer in debian/copyright. [ gregor herrmann ] * debian/control: fix spacing in long description, thanks to Rhonda for the bug report (closes: #520130). [ Nathan Handler ] * debian/watch: Update to ignore development releases. [ Damyan Ivanov ] * Drop the version from perl build-dependency (satisfied by oldstable) * Add debian/README.source to document quilt usage * Standards-Version: 3.8.3 (no changes) [ gregor herrmann ] * Remove the generated test.pl via debian/clean. -- Jonathan Yu Wed, 26 Aug 2009 06:55:54 -0400 libmath-random-perl (0.71-1) unstable; urgency=low * Initial Release (Closes: #505182). -- Charles Plessy Mon, 10 Nov 2008 14:32:20 +0900