blob: 1843fa0f3f894a4b4b7f2768bbd6030c13561cae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
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:=[opengl]
x11-apps/xdpyinfo"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}/${P}-gsl-ocaml.patch"
"${FILESDIR}"/${P}-Makefile.patch
"${FILESDIR}"/${P}-ocaml-4.09.patch
)
src_prepare() {
default
MAKEOPTS="-j1"
use ocamlopt || MAKEOPTS+=" TARGETS=flashdot_bytecode BYTECODENAME=flashdot"
sed -i \
-e "s|^VERSION.*|VERSION := ${PV}|" \
Makefile \
|| die
sed -i \
-e 's:Gsl_matrix:Gsl.Matrix:g' \
-e 's:Gsl_rng:Gsl.Rng:g' \
-e 's:Gsl_randist:Gsl.Randist:g' \
-e 's:Gsl_sf:Gsl.Sf:g' \
-e 's:Gsl_math:Gsl.Math:g' \
-e 's:Gsl_vector:Gsl.Vector:g' \
-e 's:Gsl_permut:Gsl.Permut:g' \
-e 's:Gsl_linalg:Gsl.Linalg:g' \
-e 's:Gsl_cdf:Gsl.Cdf:g' \
mathexpr/mathexpr.ml \
mathexpr/mathexpr.mli \
mathexpr/random_rng.ml \
mathexpr/sequences.ml \
mathexpr/multibin.ml \
flashdot.ml \
|| die
}
src_configure() {
./configure --prefix=/usr || die
}
src_install() {
emake DESTDIR="${D}" CALLMODE=script install
rm "${D}"/usr/share/doc/${PN}/copyright* || die
mv "${D}"/usr/share/doc/{${PN},${PF}} || die
}
|