commit: 805ce1ec2987ad6da051f98368c94a39b7164fe0 Author: David Seifert <soap <AT> gentoo <DOT> org> AuthorDate: Sun Feb 14 22:46:03 2016 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Sun Feb 14 22:46:03 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=805ce1ec
sci-misc/flashdot: Port to dev-ml/gsl-ocaml Gentoo-Bug: 574564 Package-Manager: portage-2.2.27 .../flashdot/files/flashdot-1.1.4-gsl-ocaml.patch | 23 ++++++++++++++ sci-misc/flashdot/flashdot-1.1.4-r1.ebuild | 36 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/sci-misc/flashdot/files/flashdot-1.1.4-gsl-ocaml.patch b/sci-misc/flashdot/files/flashdot-1.1.4-gsl-ocaml.patch new file mode 100644 index 0000000..4e94e5b --- /dev/null +++ b/sci-misc/flashdot/files/flashdot-1.1.4-gsl-ocaml.patch @@ -0,0 +1,23 @@ +Fix errors caused by wrong parameter type: +* File "mathexpr.ml", line 423, characters 55-56: +* Error: This expression has type int but an expression was expected of type +* float + +--- flashdot-1.1.4/mathexpr/mathexpr.ml ++++ flashdot-1.1.4/mathexpr/mathexpr.ml +@@ -419,7 +419,6 @@ + | "NegativeBinomial" -> + let p = float'_of_string (aod cont_type "P" "1.0") in + let n = float'_of_string (aod cont_type "N" "1.0") in +- (*uncomment this for ocamlgsl > 0.5 ::::let n = int_of_float n in::::*) + fun () -> foi (Gsl_randist.negative_binomial rng p n) + | "Pascal" -> + let p = float'_of_string (aod cont_type "P" "1.0") in +@@ -4094,7 +4093,6 @@ + | "NegativeBinomialPDF" -> + let p = float'_of_string (aod cont_type "P" "1.0") in + let n = float'_of_string (aod cont_type "N" "1.0") in +- (*uncomment this for ocamlgsl > 0.5 ::::let n = int_of_float n in::::*) + fun x -> Gsl_randist.negative_binomial_pdf (int_of_float x) p n + | "PascalPDF" -> + let p = float'_of_string (aod cont_type "P" "1.0") in diff --git a/sci-misc/flashdot/flashdot-1.1.4-r1.ebuild b/sci-misc/flashdot/flashdot-1.1.4-r1.ebuild new file mode 100644 index 0000000..66f46d4 --- /dev/null +++ b/sci-misc/flashdot/flashdot-1.1.4-r1.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +DESCRIPTION="Generator for psychophysical experiments" +HOMEPAGE="http://www.flashdot.info/" +SRC_URI="mirror://gentoo/${P}.tar.bz2 + https://dev.gentoo.org/~tomka/files/${P}.tar.bz2" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" +IUSE="+ocamlopt" + +DEPEND=" + >=dev-lang/ocaml-3.10[ocamlopt?] + dev-ml/gsl-ocaml + dev-ml/lablgl[glut] + dev-ml/ocamlsdl + x11-apps/xdpyinfo" +RDEPEND="${DEPEND}" +PATCHES=( + "${FILESDIR}/${P}-gsl-ocaml.patch" +) + +src_prepare() { + default + MAKEOPTS+=" -j1 VERSION=${PV}" + use ocamlopt || MAKEOPTS+=" TARGETS=flashdot_bytecode BYTECODENAME=flashdot" +} + +src_install() { + emake DESTDIR="${D}" CALLMODE=script install +}