summaryrefslogtreecommitdiff
path: root/sci-mathematics
diff options
context:
space:
mode:
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/4ti2/4ti2-1.6.2.ebuild37
-rw-r--r--sci-mathematics/4ti2/4ti2-1.6.5.ebuild37
-rw-r--r--sci-mathematics/4ti2/4ti2-1.6.6.ebuild37
-rw-r--r--sci-mathematics/4ti2/4ti2-1.6.7.ebuild43
-rw-r--r--sci-mathematics/4ti2/Manifest12
-rw-r--r--sci-mathematics/4ti2/files/4ti2-1.3.2-gold.patch17
-rw-r--r--sci-mathematics/4ti2/metadata.xml12
-rw-r--r--sci-mathematics/Macaulay2/Macaulay2-1.7_pre.ebuild153
-rw-r--r--sci-mathematics/Macaulay2/Macaulay2-1.8.2.1-r1.ebuild136
-rw-r--r--sci-mathematics/Macaulay2/Manifest14
-rw-r--r--sci-mathematics/Macaulay2/files/1.6-lapack.patch50
-rw-r--r--sci-mathematics/Macaulay2/files/1.6-paths-of-external-programs.patch73
-rw-r--r--sci-mathematics/Macaulay2/files/70Macaulay2-gentoo.el11
-rw-r--r--sci-mathematics/Macaulay2/files/Macaulay2-1.8.2.1-lapack.patch50
-rw-r--r--sci-mathematics/Macaulay2/metadata.xml15
-rw-r--r--sci-mathematics/agda-lib-ffi/Manifest7
-rw-r--r--sci-mathematics/agda-lib-ffi/agda-lib-ffi-0.0.2-r2.ebuild35
-rw-r--r--sci-mathematics/agda-lib-ffi/agda-lib-ffi-0.0.2.ebuild33
-rw-r--r--sci-mathematics/agda-lib-ffi/metadata.xml14
-rw-r--r--sci-mathematics/agda-stdlib/Manifest9
-rw-r--r--sci-mathematics/agda-stdlib/agda-stdlib-2.4.2.5.ebuild66
-rw-r--r--sci-mathematics/agda-stdlib/agda-stdlib-2.5.2.0.13.ebuild68
-rw-r--r--sci-mathematics/agda-stdlib/files/50agda-stdlib-gentoo.el1
-rw-r--r--sci-mathematics/agda-stdlib/files/standard-library.agda-lib2
-rw-r--r--sci-mathematics/agda-stdlib/metadata.xml21
-rw-r--r--sci-mathematics/agda/Manifest9
-rw-r--r--sci-mathematics/agda/agda-2.4.2.5-r2.ebuild130
-rw-r--r--sci-mathematics/agda/agda-2.5.2-r1.ebuild148
-rw-r--r--sci-mathematics/agda/files/50agda2-gentoo.el10
-rw-r--r--sci-mathematics/agda/files/agda-2.4.2.5-hashtables.patch13
-rw-r--r--sci-mathematics/agda/metadata.xml23
-rw-r--r--sci-mathematics/arb/Manifest4
-rw-r--r--sci-mathematics/arb/arb-2.11.1-r1.ebuild58
-rw-r--r--sci-mathematics/arb/files/arb-2.11.1-pie-ftbs.patch17
-rw-r--r--sci-mathematics/arb/metadata.xml18
-rw-r--r--sci-mathematics/axiom/Manifest8
-rw-r--r--sci-mathematics/axiom/axiom-200805.ebuild96
-rw-r--r--sci-mathematics/axiom/files/axiom-200711-gcl-configure.patch11
-rw-r--r--sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.Makefile.patch10
-rw-r--r--sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.patch.input168
-rw-r--r--sci-mathematics/axiom/metadata.xml8
-rw-r--r--sci-mathematics/bertini/Manifest5
-rw-r--r--sci-mathematics/bertini/bertini-1.4.ebuild57
-rw-r--r--sci-mathematics/bertini/metadata.xml25
-rw-r--r--sci-mathematics/calc/Manifest13
-rw-r--r--sci-mathematics/calc/calc-2.12.2.2.ebuild51
-rw-r--r--sci-mathematics/calc/calc-2.12.4.13-r1.ebuild56
-rw-r--r--sci-mathematics/calc/calc-2.12.5.4.ebuild60
-rw-r--r--sci-mathematics/calc/files/2.12.4.0-ldflags.patch101
-rw-r--r--sci-mathematics/calc/files/calc-2.12.2.2-libdir-fix.patch12
-rw-r--r--sci-mathematics/calc/files/calc-2.12.4.13-prefix.patch87
-rw-r--r--sci-mathematics/calc/files/calc-2.12.5.4-as-needed.patch161
-rw-r--r--sci-mathematics/calc/metadata.xml18
-rw-r--r--sci-mathematics/cgal/Manifest10
-rw-r--r--sci-mathematics/cgal/cgal-4.10.ebuild88
-rw-r--r--sci-mathematics/cgal/cgal-4.9.ebuild86
-rw-r--r--sci-mathematics/cgal/files/cgal-4.7-fix-buildsystem.patch19
-rw-r--r--sci-mathematics/cgal/metadata.xml28
-rw-r--r--sci-mathematics/coq/Manifest7
-rw-r--r--sci-mathematics/coq/coq-8.6.1.ebuild91
-rw-r--r--sci-mathematics/coq/coq-8.6.ebuild91
-rw-r--r--sci-mathematics/coq/metadata.xml28
-rw-r--r--sci-mathematics/cvc3/Manifest8
-rw-r--r--sci-mathematics/cvc3/cvc3-2.4.1-r1.ebuild141
-rw-r--r--sci-mathematics/cvc3/cvc3-2.4.1.ebuild156
-rw-r--r--sci-mathematics/cvc3/files/50cvc3-gentoo.el3
-rw-r--r--sci-mathematics/cvc3/files/cvc3-2.4.1-gccv6-fix.patch76
-rw-r--r--sci-mathematics/cvc3/metadata.xml45
-rw-r--r--sci-mathematics/dataplot/Manifest14
-rw-r--r--sci-mathematics/dataplot/dataplot-20090821.ebuild82
-rw-r--r--sci-mathematics/dataplot/dataplot-20131220.ebuild85
-rw-r--r--sci-mathematics/dataplot/files/90dataplot3
-rw-r--r--sci-mathematics/dataplot/files/Makefile.am.2009082146
-rw-r--r--sci-mathematics/dataplot/files/Makefile.am.2013122046
-rw-r--r--sci-mathematics/dataplot/files/configure.ac.2009082176
-rw-r--r--sci-mathematics/dataplot/files/configure.ac.2013122076
-rw-r--r--sci-mathematics/dataplot/files/dataplot-20090821-opengl.patch47
-rw-r--r--sci-mathematics/dataplot/metadata.xml16
-rw-r--r--sci-mathematics/diagrtb/Manifest6
-rw-r--r--sci-mathematics/diagrtb/diagrtb-2.64.ebuild32
-rw-r--r--sci-mathematics/diagrtb/files/CMakeLists.txt13
-rw-r--r--sci-mathematics/diagrtb/metadata.xml27
-rw-r--r--sci-mathematics/drgeo/Manifest7
-rw-r--r--sci-mathematics/drgeo/drgeo-1.1.0-r1.ebuild47
-rw-r--r--sci-mathematics/drgeo/files/drgeo-1.1.0-gcc45.patch61
-rw-r--r--sci-mathematics/drgeo/metadata.xml19
-rw-r--r--sci-mathematics/dunshire/Manifest4
-rw-r--r--sci-mathematics/dunshire/dunshire-0.1.1.ebuild31
-rw-r--r--sci-mathematics/dunshire/metadata.xml12
-rw-r--r--sci-mathematics/e/Manifest10
-rw-r--r--sci-mathematics/e/e-1.5.ebuild127
-rw-r--r--sci-mathematics/e/e-1.6.ebuild127
-rw-r--r--sci-mathematics/e/e-1.8-r1.ebuild118
-rw-r--r--sci-mathematics/e/e-1.8.ebuild118
-rw-r--r--sci-mathematics/e/metadata.xml35
-rw-r--r--sci-mathematics/ent/Manifest6
-rw-r--r--sci-mathematics/ent/ent-101202.ebuild30
-rw-r--r--sci-mathematics/ent/files/101202-gentoo.patch20
-rw-r--r--sci-mathematics/ent/metadata.xml8
-rw-r--r--sci-mathematics/euler/Manifest10
-rw-r--r--sci-mathematics/euler/euler-1.61.0.ebuild42
-rw-r--r--sci-mathematics/euler/files/command-gcc4-gentoo.patch12
-rw-r--r--sci-mathematics/euler/files/configure-gentoo.patch37
-rw-r--r--sci-mathematics/euler/files/euler-fortify.patch36
-rw-r--r--sci-mathematics/euler/files/euler-glibc-2.4-gentoo.patch13
-rw-r--r--sci-mathematics/euler/files/euler-xdg.patch23
-rw-r--r--sci-mathematics/euler/metadata.xml11
-rw-r--r--sci-mathematics/factmsieve/Manifest6
-rw-r--r--sci-mathematics/factmsieve/factmsieve-76-r1.ebuild31
-rw-r--r--sci-mathematics/factmsieve/files/factmsieve-76.patch52
-rw-r--r--sci-mathematics/factmsieve/metadata.xml8
-rw-r--r--sci-mathematics/fann/Manifest7
-rw-r--r--sci-mathematics/fann/fann-2.2.0-r1.ebuild39
-rw-r--r--sci-mathematics/fann/fann-9999.ebuild28
-rw-r--r--sci-mathematics/fann/files/fann-2.2.0-examples.patch23
-rw-r--r--sci-mathematics/fann/metadata.xml19
-rw-r--r--sci-mathematics/flint/Manifest16
-rw-r--r--sci-mathematics/flint/files/flint-2.4.3-cflags-ldflags.patch33
-rw-r--r--sci-mathematics/flint/files/flint-2.4.3-libdir.patch44
-rw-r--r--sci-mathematics/flint/files/flint-2.4.3-whitespaces.patch54
-rw-r--r--sci-mathematics/flint/files/flint-2.4.4-PIE-FTBFS.patch17
-rw-r--r--sci-mathematics/flint/files/flint-2.4.4-test.patch19
-rw-r--r--sci-mathematics/flint/files/flint-2.4.5-gmp6-compat.patch115
-rw-r--r--sci-mathematics/flint/files/flint-2.4.5-ntl62.patch13
-rw-r--r--sci-mathematics/flint/flint-2.4.4-r1.ebuild71
-rw-r--r--sci-mathematics/flint/flint-2.4.5.ebuild73
-rw-r--r--sci-mathematics/flint/flint-2.5.2.ebuild67
-rw-r--r--sci-mathematics/flint/metadata.xml16
-rw-r--r--sci-mathematics/form/Manifest7
-rw-r--r--sci-mathematics/form/form-4.1.ebuild81
-rw-r--r--sci-mathematics/form/form-4.2.0.ebuild81
-rw-r--r--sci-mathematics/form/metadata.xml15
-rw-r--r--sci-mathematics/fricas/Manifest10
-rw-r--r--sci-mathematics/fricas/files/64fricas-gentoo.el2
-rw-r--r--sci-mathematics/fricas/fricas-1.3.0-r1.ebuild101
-rw-r--r--sci-mathematics/fricas/fricas-1.3.1.ebuild101
-rw-r--r--sci-mathematics/fricas/fricas-1.3.2.ebuild101
-rw-r--r--sci-mathematics/fricas/metadata.xml32
-rw-r--r--sci-mathematics/frobby/Manifest9
-rw-r--r--sci-mathematics/frobby/files/frobby-cflags-no-strip-soname.patch47
-rw-r--r--sci-mathematics/frobby/files/frobby-gcc-4.7.patch32
-rw-r--r--sci-mathematics/frobby/files/frobby-gmp-5.1.patch12
-rw-r--r--sci-mathematics/frobby/frobby-0.9.0-r1.ebuild54
-rw-r--r--sci-mathematics/frobby/frobby-0.9.0-r2.ebuild63
-rw-r--r--sci-mathematics/frobby/metadata.xml11
-rw-r--r--sci-mathematics/genius/Manifest6
-rw-r--r--sci-mathematics/genius/genius-1.0.21.ebuild55
-rw-r--r--sci-mathematics/genius/metadata.xml22
-rw-r--r--sci-mathematics/geogebra/Manifest227
-rw-r--r--sci-mathematics/geogebra/geogebra-5.0.339.0_p20170308.ebuild334
-rw-r--r--sci-mathematics/geogebra/metadata.xml16
-rw-r--r--sci-mathematics/geomview/Manifest9
-rw-r--r--sci-mathematics/geomview/files/50geomview-gentoo.el7
-rw-r--r--sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch34
-rw-r--r--sci-mathematics/geomview/files/gvcl-mode.el172
-rw-r--r--sci-mathematics/geomview/geomview-1.9.5-r1.ebuild70
-rw-r--r--sci-mathematics/geomview/metadata.xml15
-rw-r--r--sci-mathematics/gfan/Manifest7
-rw-r--r--sci-mathematics/gfan/files/gfan-0.5-double-declare-fix.patch12
-rw-r--r--sci-mathematics/gfan/files/gfan-0.5-gcc6.1-compat.patch70
-rw-r--r--sci-mathematics/gfan/gfan-0.5-r1.ebuild38
-rw-r--r--sci-mathematics/gfan/metadata.xml11
-rw-r--r--sci-mathematics/ggnfs/Manifest9
-rw-r--r--sci-mathematics/ggnfs/files/ggnfs-0.77.1-gentoo.patch158
-rw-r--r--sci-mathematics/ggnfs/ggnfs-0.77.1-r2.ebuild66
-rw-r--r--sci-mathematics/ggnfs/metadata.xml11
-rw-r--r--sci-mathematics/gimps/Manifest11
-rw-r--r--sci-mathematics/gimps/files/README.gentoo25
-rw-r--r--sci-mathematics/gimps/files/gimps-25.6-conf.d12
-rw-r--r--sci-mathematics/gimps/files/gimps-28.9-init.d32
-rw-r--r--sci-mathematics/gimps/files/gimps.service14
-rw-r--r--sci-mathematics/gimps/files/gimps.tmpfiles1
-rw-r--r--sci-mathematics/gimps/gimps-28.10-r1.ebuild60
-rw-r--r--sci-mathematics/gimps/metadata.xml16
-rw-r--r--sci-mathematics/ginac/Manifest8
-rw-r--r--sci-mathematics/ginac/files/ginac-1.5.1-pkgconfig.patch9
-rw-r--r--sci-mathematics/ginac/ginac-1.6.6.ebuild58
-rw-r--r--sci-mathematics/ginac/ginac-1.7.2.ebuild65
-rw-r--r--sci-mathematics/ginac/metadata.xml16
-rw-r--r--sci-mathematics/glpk/Manifest24
-rw-r--r--sci-mathematics/glpk/files/glpk-4.52.1-mariadb-5.5.patch11
-rw-r--r--sci-mathematics/glpk/files/glpk-4.54-debundle-system-libs.patch86
-rw-r--r--sci-mathematics/glpk/files/glpk-4.57-debundle-system-libs.patch88
-rw-r--r--sci-mathematics/glpk/files/glpk-4.60-debundle-system-libs.patch92
-rw-r--r--sci-mathematics/glpk/files/glpk-4.63-debundle-system-libs.patch94
-rw-r--r--sci-mathematics/glpk/glpk-4.45.ebuild63
-rw-r--r--sci-mathematics/glpk/glpk-4.48.ebuild52
-rw-r--r--sci-mathematics/glpk/glpk-4.54.ebuild58
-rw-r--r--sci-mathematics/glpk/glpk-4.55.ebuild58
-rw-r--r--sci-mathematics/glpk/glpk-4.57.ebuild61
-rw-r--r--sci-mathematics/glpk/glpk-4.60.ebuild61
-rw-r--r--sci-mathematics/glpk/glpk-4.61-r1.ebuild62
-rw-r--r--sci-mathematics/glpk/glpk-4.63.ebuild62
-rw-r--r--sci-mathematics/glpk/metadata.xml17
-rw-r--r--sci-mathematics/gmm/Manifest5
-rw-r--r--sci-mathematics/gmm/gmm-5.1.ebuild22
-rw-r--r--sci-mathematics/gmm/metadata.xml17
-rw-r--r--sci-mathematics/gmp-ecm/Manifest8
-rw-r--r--sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r5.ebuild55
-rw-r--r--sci-mathematics/gmp-ecm/gmp-ecm-6.4.4-r1.ebuild64
-rw-r--r--sci-mathematics/gmp-ecm/gmp-ecm-9999.ebuild52
-rw-r--r--sci-mathematics/gmp-ecm/metadata.xml12
-rw-r--r--sci-mathematics/gretl/Manifest9
-rw-r--r--sci-mathematics/gretl/files/50gretl-gentoo.el16
-rw-r--r--sci-mathematics/gretl/files/gretl-1.9.14-readline.patch10
-rw-r--r--sci-mathematics/gretl/gretl-1.9.14.ebuild111
-rw-r--r--sci-mathematics/gretl/gretl-1.9.90.ebuild111
-rw-r--r--sci-mathematics/gretl/metadata.xml26
-rw-r--r--sci-mathematics/gsl-shell/Manifest11
-rw-r--r--sci-mathematics/gsl-shell/files/gsl-shell-2.2.0-pkg-config.patch33
-rw-r--r--sci-mathematics/gsl-shell/files/gsl-shell-2.3.0-gdt-cflags.patch20
-rw-r--r--sci-mathematics/gsl-shell/files/gsl-shell-font.patch10
-rw-r--r--sci-mathematics/gsl-shell/files/gsl-shell-nogui.patch25
-rw-r--r--sci-mathematics/gsl-shell/files/gsl-shell-strip.patch8
-rw-r--r--sci-mathematics/gsl-shell/files/gsl-shell-usr.patch8
-rw-r--r--sci-mathematics/gsl-shell/gsl-shell-2.3.0_beta1.ebuild64
-rw-r--r--sci-mathematics/gsl-shell/metadata.xml24
-rw-r--r--sci-mathematics/gwnum/Manifest5
-rw-r--r--sci-mathematics/gwnum/gwnum-277.ebuild33
-rw-r--r--sci-mathematics/gwnum/metadata.xml8
-rw-r--r--sci-mathematics/isabelle/Manifest24
-rw-r--r--sci-mathematics/isabelle/files/isabelle-2012-graphbrowser.patch11
-rw-r--r--sci-mathematics/isabelle/files/isabelle-2012-reverse-line-editor-order.patch12
-rw-r--r--sci-mathematics/isabelle/files/isabelle-2016-classpath.patch32
-rw-r--r--sci-mathematics/isabelle/files/isabelle-2016-jfreechart-classpath.patch16
-rw-r--r--sci-mathematics/isabelle/files/isabelle-2016.1-bash_process-1.2.1-settings.patch7
-rw-r--r--sci-mathematics/isabelle/files/isabelle-2016.1-disable-jedit-build-after-install.patch128
-rw-r--r--sci-mathematics/isabelle/files/isabelle-2016.1-jortho-1.0-2-classpath.patch8
-rw-r--r--sci-mathematics/isabelle/files/isabelle-2016.1-libsha1.patch11
-rw-r--r--sci-mathematics/isabelle/files/isabelle-2016.1-smt_read_only_certificates.patch33
-rw-r--r--sci-mathematics/isabelle/files/isabelle-2016.1-smt_timeout.patch22
-rw-r--r--sci-mathematics/isabelle/isabelle-2016.1.ebuild328
-rw-r--r--sci-mathematics/isabelle/metadata.xml29
-rw-r--r--sci-mathematics/jags/Manifest11
-rw-r--r--sci-mathematics/jags/jags-3.4.0.ebuild46
-rw-r--r--sci-mathematics/jags/jags-4.0.0.ebuild46
-rw-r--r--sci-mathematics/jags/jags-4.1.0.ebuild45
-rw-r--r--sci-mathematics/jags/jags-4.2.0.ebuild45
-rw-r--r--sci-mathematics/jags/metadata.xml21
-rw-r--r--sci-mathematics/kodkod/Manifest8
-rw-r--r--sci-mathematics/kodkod/files/kodkod-1.5.2-changes-in-most-specific-varargs-method-selection.patch28
-rw-r--r--sci-mathematics/kodkod/kodkod-1.5.2-r1.ebuild142
-rw-r--r--sci-mathematics/kodkod/kodkod-1.5.2.ebuild143
-rw-r--r--sci-mathematics/kodkod/metadata.xml21
-rw-r--r--sci-mathematics/kodkodi/Manifest6
-rw-r--r--sci-mathematics/kodkodi/kodkodi-1.5.2-r1.ebuild107
-rw-r--r--sci-mathematics/kodkodi/kodkodi-1.5.2.ebuild106
-rw-r--r--sci-mathematics/kodkodi/metadata.xml19
-rw-r--r--sci-mathematics/lpsolve/Manifest5
-rw-r--r--sci-mathematics/lpsolve/lpsolve-5.5.2.0.ebuild28
-rw-r--r--sci-mathematics/lpsolve/metadata.xml15
-rw-r--r--sci-mathematics/lybniz/Manifest5
-rw-r--r--sci-mathematics/lybniz/lybniz-1.3.2-r1.ebuild27
-rw-r--r--sci-mathematics/lybniz/metadata.xml15
-rw-r--r--sci-mathematics/mathmod/Manifest4
-rw-r--r--sci-mathematics/mathmod/mathmod-4.1-r1.ebuild43
-rw-r--r--sci-mathematics/mathmod/metadata.xml22
-rw-r--r--sci-mathematics/mathomatic/Manifest7
-rw-r--r--sci-mathematics/mathomatic/mathomatic-15.8.5.ebuild41
-rw-r--r--sci-mathematics/mathomatic/mathomatic-16.0.5.ebuild43
-rw-r--r--sci-mathematics/mathomatic/metadata.xml17
-rw-r--r--sci-mathematics/maxima/Manifest25
-rw-r--r--sci-mathematics/maxima/files/50maxima-gentoo-1.el13
-rw-r--r--sci-mathematics/maxima/files/clisp-1.patch19
-rw-r--r--sci-mathematics/maxima/files/clozurecl-2.patch27
-rw-r--r--sci-mathematics/maxima/files/cmucl-1.patch19
-rw-r--r--sci-mathematics/maxima/files/db-0.patch20
-rw-r--r--sci-mathematics/maxima/files/ecls-2.patch35
-rw-r--r--sci-mathematics/maxima/files/emacs-0.patch32
-rw-r--r--sci-mathematics/maxima/files/rmaxima-0.patch25
-rw-r--r--sci-mathematics/maxima/files/sbcl-1.patch18
-rw-r--r--sci-mathematics/maxima/files/sbcl-2.patch13
-rw-r--r--sci-mathematics/maxima/files/wish-2.patch26
-rw-r--r--sci-mathematics/maxima/files/xdg-utils-0.patch35
-rw-r--r--sci-mathematics/maxima/maxima-5.37.3-r4.ebuild208
-rw-r--r--sci-mathematics/maxima/maxima-5.38.1.ebuild208
-rw-r--r--sci-mathematics/maxima/maxima-5.39.0.ebuild208
-rw-r--r--sci-mathematics/maxima/maxima-5.40.0.ebuild208
-rw-r--r--sci-mathematics/maxima/maxima-5.41.0.ebuild208
-rw-r--r--sci-mathematics/maxima/metadata.xml35
-rw-r--r--sci-mathematics/metadata.xml37
-rw-r--r--sci-mathematics/minisat/Manifest10
-rw-r--r--sci-mathematics/minisat/files/minisat-2.2.0-header_fix.patch160
-rw-r--r--sci-mathematics/minisat/files/minisat-2.2.0_p20130925-nusmv.patch527
-rw-r--r--sci-mathematics/minisat/metadata.xml15
-rw-r--r--sci-mathematics/minisat/minisat-2.2.0-r4.ebuild65
-rw-r--r--sci-mathematics/minisat/minisat-2.2.0_p20130925.ebuild57
-rw-r--r--sci-mathematics/mlpy/Manifest5
-rw-r--r--sci-mathematics/mlpy/metadata.xml17
-rw-r--r--sci-mathematics/mlpy/mlpy-3.5.0.ebuild34
-rw-r--r--sci-mathematics/msieve/Manifest10
-rw-r--r--sci-mathematics/msieve/files/fix-version.patch15
-rw-r--r--sci-mathematics/msieve/files/fix-version2.patch14
-rw-r--r--sci-mathematics/msieve/files/msieve-1.51-reduce-printf.patch44
-rw-r--r--sci-mathematics/msieve/files/reduce-printf.patch62
-rw-r--r--sci-mathematics/msieve/metadata.xml14
-rw-r--r--sci-mathematics/msieve/msieve-1.51.ebuild55
-rw-r--r--sci-mathematics/msieve/msieve-9999.ebuild51
-rw-r--r--sci-mathematics/nauty/Manifest9
-rw-r--r--sci-mathematics/nauty/metadata.xml14
-rw-r--r--sci-mathematics/nauty/nauty-2.5.9.ebuild41
-rw-r--r--sci-mathematics/nauty/nauty-2.6.7.ebuild48
-rw-r--r--sci-mathematics/nestedsums/Manifest5
-rw-r--r--sci-mathematics/nestedsums/metadata.xml15
-rw-r--r--sci-mathematics/nestedsums/nestedsums-1.5.1.ebuild44
-rw-r--r--sci-mathematics/normaliz/Manifest14
-rw-r--r--sci-mathematics/normaliz/files/normaliz-2.12.1-respect-flags.patch47
-rw-r--r--sci-mathematics/normaliz/files/normaliz-2.12.2-gcc49.patch11
-rw-r--r--sci-mathematics/normaliz/files/normaliz-3.0.0-respect-flags.patch47
-rw-r--r--sci-mathematics/normaliz/metadata.xml19
-rw-r--r--sci-mathematics/normaliz/normaliz-2.12.2.ebuild63
-rw-r--r--sci-mathematics/normaliz/normaliz-3.1.1.ebuild62
-rw-r--r--sci-mathematics/normaliz/normaliz-3.1.3.ebuild64
-rw-r--r--sci-mathematics/normaliz/normaliz-3.3.0.ebuild60
-rw-r--r--sci-mathematics/num-utils/Manifest8
-rw-r--r--sci-mathematics/num-utils/metadata.xml8
-rw-r--r--sci-mathematics/num-utils/num-utils-0.3.ebuild25
-rw-r--r--sci-mathematics/num-utils/num-utils-0.5-r1.ebuild47
-rw-r--r--sci-mathematics/nusmv/Manifest6
-rw-r--r--sci-mathematics/nusmv/metadata.xml15
-rw-r--r--sci-mathematics/nusmv/nusmv-2.6.0.ebuild82
-rw-r--r--sci-mathematics/octave-epstk/Manifest9
-rw-r--r--sci-mathematics/octave-epstk/metadata.xml14
-rw-r--r--sci-mathematics/octave-epstk/octave-epstk-2.3.ebuild39
-rw-r--r--sci-mathematics/octave-epstk/octave-epstk-2.4.ebuild39
-rw-r--r--sci-mathematics/octave/Manifest13
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch11
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-fix-qscintilla-detection.patch14
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-imagemagick-configure.patch16
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-imagemagick.patch139
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-ncurses-pkgconfig.patch37
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-pkgbuilddir.patch41
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-texi.patch11
-rw-r--r--sci-mathematics/octave/files/octave-4.2.0-zlib-underlinking.patch10
-rw-r--r--sci-mathematics/octave/metadata.xml19
-rw-r--r--sci-mathematics/octave/octave-4.2.1.ebuild187
-rw-r--r--sci-mathematics/otter/Manifest7
-rw-r--r--sci-mathematics/otter/files/otter-3.3-build.patch114
-rw-r--r--sci-mathematics/otter/files/otter-3.3-gold.patch16
-rw-r--r--sci-mathematics/otter/metadata.xml8
-rw-r--r--sci-mathematics/otter/otter-3.3-r3.ebuild42
-rw-r--r--sci-mathematics/p9m4/Manifest9
-rw-r--r--sci-mathematics/p9m4/files/p9m4-v05-package.patch67
-rw-r--r--sci-mathematics/p9m4/files/p9m4-v05-python2.6.patch44
-rw-r--r--sci-mathematics/p9m4/files/p9m4-v05-use-inst-paths.patch42
-rw-r--r--sci-mathematics/p9m4/metadata.xml17
-rw-r--r--sci-mathematics/p9m4/p9m4-05-r1.ebuild108
-rw-r--r--sci-mathematics/pari-data/Manifest9
-rw-r--r--sci-mathematics/pari-data/metadata.xml18
-rw-r--r--sci-mathematics/pari-data/pari-data-20120726.ebuild25
-rw-r--r--sci-mathematics/pari/Manifest44
-rw-r--r--sci-mathematics/pari/files/50pari-gentoo.el10
-rw-r--r--sci-mathematics/pari/files/pari-2.3.2-ppc-powerpc-arch-fix.patch11
-rw-r--r--sci-mathematics/pari/files/pari-2.3.2-strip.patch11
-rw-r--r--sci-mathematics/pari/files/pari-2.3.5-doc-make.patch46
-rw-r--r--sci-mathematics/pari/files/pari-2.3.5-no-dot-inc.patch61
-rw-r--r--sci-mathematics/pari/files/pari-2.5.0-doc-make.patch82
-rw-r--r--sci-mathematics/pari/files/pari-2.5.0-macos.patch21
-rw-r--r--sci-mathematics/pari/files/pari-2.5.0-mp.c.patch23
-rw-r--r--sci-mathematics/pari/files/pari-2.5.0-no-dot-inc.patch61
-rw-r--r--sci-mathematics/pari/files/pari-2.5.1-1302.patch33
-rw-r--r--sci-mathematics/pari/files/pari-2.5.1-1304.patch39
-rw-r--r--sci-mathematics/pari/files/pari-2.5.1-gcc47.patch18
-rw-r--r--sci-mathematics/pari/files/pari-2.5.1-no-automagic.patch100
-rw-r--r--sci-mathematics/pari/files/pari-2.5.4-polred.patch754
-rw-r--r--sci-mathematics/pari/files/pari-2.5.4-slow_determinant.patch100
-rw-r--r--sci-mathematics/pari/files/pari-2.7.0-doc-make.patch89
-rw-r--r--sci-mathematics/pari/files/pari-2.7.0-no-automagic.patch100
-rw-r--r--sci-mathematics/pari/files/pari-2.7.0-no-dot-inc.patch64
-rw-r--r--sci-mathematics/pari/files/pari-2.7.0-slow-discriminant.patch54
-rw-r--r--sci-mathematics/pari/files/pari-2.7.1-perl-5.22-doc.patch12
-rw-r--r--sci-mathematics/pari/metadata.xml28
-rw-r--r--sci-mathematics/pari/pari-2.3.5.ebuild138
-rw-r--r--sci-mathematics/pari/pari-2.5.0-r3.ebuild136
-rw-r--r--sci-mathematics/pari/pari-2.5.1-r1.ebuild138
-rw-r--r--sci-mathematics/pari/pari-2.5.1.ebuild138
-rw-r--r--sci-mathematics/pari/pari-2.5.2.ebuild134
-rw-r--r--sci-mathematics/pari/pari-2.5.3.ebuild134
-rw-r--r--sci-mathematics/pari/pari-2.5.4.ebuild142
-rw-r--r--sci-mathematics/pari/pari-2.7.0.ebuild134
-rw-r--r--sci-mathematics/pari/pari-2.7.1.ebuild136
-rw-r--r--sci-mathematics/polymake/Manifest5
-rw-r--r--sci-mathematics/polymake/metadata.xml24
-rw-r--r--sci-mathematics/polymake/polymake-3.0_p2.ebuild90
-rw-r--r--sci-mathematics/prng/Manifest7
-rw-r--r--sci-mathematics/prng/files/prng-3.0.2-fix-c99-inline-semantics.patch146
-rw-r--r--sci-mathematics/prng/files/prng-3.0.2-shared.patch52
-rw-r--r--sci-mathematics/prng/metadata.xml16
-rw-r--r--sci-mathematics/prng/prng-3.0.2-r2.ebuild42
-rw-r--r--sci-mathematics/prover9/Manifest7
-rw-r--r--sci-mathematics/prover9/files/LADR-2009-11A-manpages.patch466
-rw-r--r--sci-mathematics/prover9/metadata.xml18
-rw-r--r--sci-mathematics/prover9/prover9-2009.11a.ebuild119
-rw-r--r--sci-mathematics/pspp/Manifest8
-rw-r--r--sci-mathematics/pspp/files/50pspp-gentoo.el6
-rw-r--r--sci-mathematics/pspp/metadata.xml16
-rw-r--r--sci-mathematics/pspp/pspp-0.10.1.ebuild78
-rw-r--r--sci-mathematics/pspp/pspp-0.10.2.ebuild78
-rw-r--r--sci-mathematics/pymc/Manifest6
-rw-r--r--sci-mathematics/pymc/files/pymc-2.3.6-remove-hardcoded-blas.patch11
-rw-r--r--sci-mathematics/pymc/metadata.xml16
-rw-r--r--sci-mathematics/pymc/pymc-2.3.6.ebuild53
-rw-r--r--sci-mathematics/pymc3/Manifest3
-rw-r--r--sci-mathematics/pymc3/metadata.xml19
-rw-r--r--sci-mathematics/pymc3/pymc3-3.1.ebuild60
-rw-r--r--sci-mathematics/qtoctave/Manifest14
-rw-r--r--sci-mathematics/qtoctave/files/qtoctave-0.10.1-build-out-of-source.patch20
-rw-r--r--sci-mathematics/qtoctave/files/qtoctave-0.10.1-build-widgetserver.patch98
-rw-r--r--sci-mathematics/qtoctave/files/qtoctave-0.10.1-desktop-file.patch8
-rw-r--r--sci-mathematics/qtoctave/files/qtoctave-0.10.1-doc-path.patch64
-rw-r--r--sci-mathematics/qtoctave/files/qtoctave-0.10.1-filedialog-filters.patch37
-rw-r--r--sci-mathematics/qtoctave/files/qtoctave-0.10.1-initial_position.patch61
-rw-r--r--sci-mathematics/qtoctave/files/qtoctave-0.10.1-no-native-menubars.patch35
-rw-r--r--sci-mathematics/qtoctave/files/qtoctave-0.10.1-qtinfo-octave3.4.patch15
-rw-r--r--sci-mathematics/qtoctave/files/qtoctave-0.10.1-use_octave_htmldoc.patch34
-rw-r--r--sci-mathematics/qtoctave/metadata.xml16
-rw-r--r--sci-mathematics/qtoctave/qtoctave-0.10.1-r1.ebuild47
-rw-r--r--sci-mathematics/reduce/Manifest8
-rw-r--r--sci-mathematics/reduce/files/64reduce-gentoo.el4
-rw-r--r--sci-mathematics/reduce/files/csl2
-rw-r--r--sci-mathematics/reduce/files/redcsl2
-rw-r--r--sci-mathematics/reduce/metadata.xml19
-rw-r--r--sci-mathematics/reduce/reduce-20110414-r1.ebuild94
-rw-r--r--sci-mathematics/relational/Manifest5
-rw-r--r--sci-mathematics/relational/metadata.xml11
-rw-r--r--sci-mathematics/relational/relational-2.5.ebuild42
-rw-r--r--sci-mathematics/rkward/Manifest7
-rw-r--r--sci-mathematics/rkward/metadata.xml16
-rw-r--r--sci-mathematics/rkward/rkward-0.6.1.ebuild36
-rw-r--r--sci-mathematics/rkward/rkward-0.6.5.ebuild37
-rw-r--r--sci-mathematics/rngstreams/Manifest5
-rw-r--r--sci-mathematics/rngstreams/metadata.xml15
-rw-r--r--sci-mathematics/rngstreams/rngstreams-1.0.1.ebuild24
-rw-r--r--sci-mathematics/rstudio/Manifest92
-rw-r--r--sci-mathematics/rstudio/files/rsession.conf26
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.97.336-boost-1.53.patch64
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.97.336-linker_flags.patch18
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.97.336-paths.patch112
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.97.336-prefs.patch24
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.97.551-boost-1.53.patch64
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.97.551-linker_flags.patch18
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.97.551-paths.patch112
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.97.551-prefs.patch24
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.98.1091-boost-1.57.patch60
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.98.1091-pandoc.patch26
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.98.490-linker_flags.patch18
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.98.490-paths.patch120
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.98.490-prefs.patch24
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.98.932-pandoc.patch25
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.98.932-paths.patch140
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.99.473-clang-pandoc.patch77
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.99.473-paths.patch130
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.99.473-qtsingleapplication.patch60
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.99.486-systemd.patch22
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.99.879-clang-pandoc.patch77
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.99.879-paths.patch130
-rw-r--r--sci-mathematics/rstudio/files/rstudio-0.99.879-prefs.patch45
-rw-r--r--sci-mathematics/rstudio/files/rstudio-1.0.44-clang-pandoc.patch71
-rw-r--r--sci-mathematics/rstudio/files/rstudio-1.0.44-paths.patch130
-rw-r--r--sci-mathematics/rstudio/files/rstudio-1.0.44-systemd.patch21
-rw-r--r--sci-mathematics/rstudio/files/rstudio-server.conf35
-rw-r--r--sci-mathematics/rstudio/files/rstudio-server.initd15
-rw-r--r--sci-mathematics/rstudio/files/rstudio-server.service.in10
-rw-r--r--sci-mathematics/rstudio/metadata.xml18
-rw-r--r--sci-mathematics/rstudio/rstudio-0.97.336.ebuild143
-rw-r--r--sci-mathematics/rstudio/rstudio-0.97.551.ebuild143
-rw-r--r--sci-mathematics/rstudio/rstudio-0.98.1028.ebuild164
-rw-r--r--sci-mathematics/rstudio/rstudio-0.98.1091.ebuild198
-rw-r--r--sci-mathematics/rstudio/rstudio-0.98.490-r1.ebuild129
-rw-r--r--sci-mathematics/rstudio/rstudio-0.98.490.ebuild142
-rw-r--r--sci-mathematics/rstudio/rstudio-0.98.932.ebuild173
-rw-r--r--sci-mathematics/rstudio/rstudio-0.98.953.ebuild174
-rw-r--r--sci-mathematics/rstudio/rstudio-0.99.473-r1.ebuild240
-rw-r--r--sci-mathematics/rstudio/rstudio-0.99.482.ebuild240
-rw-r--r--sci-mathematics/rstudio/rstudio-0.99.483.ebuild240
-rw-r--r--sci-mathematics/rstudio/rstudio-0.99.484.ebuild240
-rw-r--r--sci-mathematics/rstudio/rstudio-0.99.486-r1.ebuild248
-rw-r--r--sci-mathematics/rstudio/rstudio-0.99.491.ebuild248
-rw-r--r--sci-mathematics/rstudio/rstudio-0.99.879.ebuild249
-rw-r--r--sci-mathematics/rstudio/rstudio-0.99.893.ebuild249
-rw-r--r--sci-mathematics/rstudio/rstudio-0.99.896.ebuild249
-rw-r--r--sci-mathematics/rstudio/rstudio-0.99.902.ebuild249
-rw-r--r--sci-mathematics/rstudio/rstudio-0.99.903.ebuild249
-rw-r--r--sci-mathematics/rstudio/rstudio-1.0.136.ebuild247
-rw-r--r--sci-mathematics/rstudio/rstudio-1.0.143.ebuild247
-rw-r--r--sci-mathematics/rstudio/rstudio-1.0.153.ebuild247
-rw-r--r--sci-mathematics/rstudio/rstudio-1.0.44.ebuild247
-rw-r--r--sci-mathematics/rw/Manifest5
-rw-r--r--sci-mathematics/rw/metadata.xml35
-rw-r--r--sci-mathematics/rw/rw-0.7-r2.ebuild34
-rw-r--r--sci-mathematics/sha1-polyml/Manifest7
-rw-r--r--sci-mathematics/sha1-polyml/metadata.xml17
-rw-r--r--sci-mathematics/sha1-polyml/sha1-polyml-5.5.0.ebuild80
-rw-r--r--sci-mathematics/sha1-polyml/sha1-polyml-5.6_p1.ebuild61
-rw-r--r--sci-mathematics/singular/Manifest25
-rw-r--r--sci-mathematics/singular/files/60singular-gentoo.el10
-rw-r--r--sci-mathematics/singular/files/singular-3.0.4.4-nostrip.patch12
-rw-r--r--sci-mathematics/singular/files/singular-3.1.0-emacs-22.patch13
-rw-r--r--sci-mathematics/singular/files/singular-3.1.0-gentoo.patch81
-rw-r--r--sci-mathematics/singular/files/singular-3.1.3.2-python.patch45
-rw-r--r--sci-mathematics/singular/files/singular-3.1.3.3-Minor.h.patch10
-rw-r--r--sci-mathematics/singular/files/singular-3.1.3.3-install_name.patch23
-rw-r--r--sci-mathematics/singular/files/singular-3.1.6-factory_template_instantiation.patch26
-rw-r--r--sci-mathematics/singular/files/singular-3.1.6-ntl6compat.patch44
-rw-r--r--sci-mathematics/singular/files/singular-4.0.0-fix-omalloc-ar-detection.patch12
-rw-r--r--sci-mathematics/singular/files/singular-4.0.2-ntl8-compat.patch38
-rw-r--r--sci-mathematics/singular/files/singular-4.0.3-fix-destdir.patch26
-rw-r--r--sci-mathematics/singular/files/singular-4.0.3-fix-resources-name.patch307
-rw-r--r--sci-mathematics/singular/metadata.xml11
-rw-r--r--sci-mathematics/singular/singular-3.1.6.ebuild177
-rw-r--r--sci-mathematics/singular/singular-4.0.2.ebuild144
-rw-r--r--sci-mathematics/singular/singular-4.0.3.ebuild103
-rw-r--r--sci-mathematics/snns/Manifest10
-rw-r--r--sci-mathematics/snns/files/4.2-ldflags.patch42
-rw-r--r--sci-mathematics/snns/files/4.3-bison-version.patch11
-rw-r--r--sci-mathematics/snns/files/4.3-snns-netperf.patch164
-rw-r--r--sci-mathematics/snns/files/4.3-unstrip.patch11
-rw-r--r--sci-mathematics/snns/metadata.xml15
-rw-r--r--sci-mathematics/snns/snns-4.3-r2.ebuild123
-rw-r--r--sci-mathematics/spass/Manifest7
-rw-r--r--sci-mathematics/spass/metadata.xml18
-rw-r--r--sci-mathematics/spass/spass-3.7.ebuild81
-rw-r--r--sci-mathematics/spass/spass-3.9.ebuild145
-rw-r--r--sci-mathematics/spin/Manifest14
-rw-r--r--sci-mathematics/spin/files/spin-6.2.1-makefile.patch21
-rw-r--r--sci-mathematics/spin/files/spin-6.2.5-makefile.patch21
-rw-r--r--sci-mathematics/spin/files/spin-6.4.5-makefile.patch20
-rw-r--r--sci-mathematics/spin/metadata.xml5
-rw-r--r--sci-mathematics/spin/spin-6.2.1.ebuild42
-rw-r--r--sci-mathematics/spin/spin-6.2.3.ebuild47
-rw-r--r--sci-mathematics/spin/spin-6.2.5.ebuild47
-rw-r--r--sci-mathematics/spin/spin-6.4.5.ebuild47
-rw-r--r--sci-mathematics/topcom/Manifest7
-rw-r--r--sci-mathematics/topcom/files/topcom-0.17.7-buildsystem.patch327
-rw-r--r--sci-mathematics/topcom/metadata.xml11
-rw-r--r--sci-mathematics/topcom/topcom-0.17.7.ebuild53
-rw-r--r--sci-mathematics/twelf/Manifest12
-rw-r--r--sci-mathematics/twelf/files/50twelf-gentoo.el4
-rw-r--r--sci-mathematics/twelf/files/twelf-1.7.1-Makefile.patch43
-rw-r--r--sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-Makefile.patch13
-rw-r--r--sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-twelf-dot-texi.patch14
-rw-r--r--sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf-init.patch22
-rw-r--r--sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf.patch11
-rw-r--r--sci-mathematics/twelf/files/twelf-1.7.1-mlton-mlb.patch409
-rw-r--r--sci-mathematics/twelf/metadata.xml13
-rw-r--r--sci-mathematics/twelf/twelf-1.7.1.ebuild111
-rw-r--r--sci-mathematics/unuran/Manifest5
-rw-r--r--sci-mathematics/unuran/metadata.xml19
-rw-r--r--sci-mathematics/unuran/unuran-1.8.1.ebuild44
-rw-r--r--sci-mathematics/wxmaxima/Manifest11
-rw-r--r--sci-mathematics/wxmaxima/metadata.xml18
-rw-r--r--sci-mathematics/wxmaxima/wxmaxima-15.08.2.ebuild75
-rw-r--r--sci-mathematics/wxmaxima/wxmaxima-16.04.2.ebuild75
-rw-r--r--sci-mathematics/wxmaxima/wxmaxima-16.12.0.ebuild75
-rw-r--r--sci-mathematics/wxmaxima/wxmaxima-16.12.2.ebuild75
-rw-r--r--sci-mathematics/xmds/Manifest5
-rw-r--r--sci-mathematics/xmds/metadata.xml17
-rw-r--r--sci-mathematics/xmds/xmds-2.2.2.ebuild43
-rw-r--r--sci-mathematics/yacas/Manifest5
-rw-r--r--sci-mathematics/yacas/metadata.xml25
-rw-r--r--sci-mathematics/yacas/yacas-1.6.1-r1.ebuild54
-rw-r--r--sci-mathematics/yafu/Manifest7
-rw-r--r--sci-mathematics/yafu/files/fix-Makefile.patch11
-rw-r--r--sci-mathematics/yafu/metadata.xml14
-rw-r--r--sci-mathematics/yafu/yafu-1.34.3.ebuild55
-rw-r--r--sci-mathematics/yafu/yafu-9999.ebuild55
-rw-r--r--sci-mathematics/z3/Manifest6
-rw-r--r--sci-mathematics/z3/files/z3-4.4.1-gcc-6.patch18
-rw-r--r--sci-mathematics/z3/metadata.xml25
-rw-r--r--sci-mathematics/z3/z3-4.4.1.ebuild178
-rw-r--r--sci-mathematics/z3/z3-4.5.0.ebuild186
571 files changed, 32026 insertions, 0 deletions
diff --git a/sci-mathematics/4ti2/4ti2-1.6.2.ebuild b/sci-mathematics/4ti2/4ti2-1.6.2.ebuild
new file mode 100644
index 000000000000..d107c3deb4a7
--- /dev/null
+++ b/sci-mathematics/4ti2/4ti2-1.6.2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+# The swig subdir is not used, so we can skip running autotools in it. #518000
+AT_NO_RECURSIVE=1
+
+inherit autotools-utils
+
+DESCRIPTION="Software package for algebraic, geometric and combinatorial problems"
+HOMEPAGE="http://www.4ti2.de/"
+SRC_URI="http://4ti2.de/version_${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-macos"
+IUSE="static-libs"
+
+DEPEND="
+ sci-mathematics/glpk:0[gmp]
+ dev-libs/gmp[cxx]"
+RDEPEND="${DEPEND}"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.2-gold.patch
+ )
+
+src_prepare() {
+ sed \
+ -e "s:^CXX.*$:CXX=$(tc-getCXX):g" \
+ -i m4/glpk-check.m4 || die
+ autotools-utils_src_prepare
+}
diff --git a/sci-mathematics/4ti2/4ti2-1.6.5.ebuild b/sci-mathematics/4ti2/4ti2-1.6.5.ebuild
new file mode 100644
index 000000000000..816cc21252a4
--- /dev/null
+++ b/sci-mathematics/4ti2/4ti2-1.6.5.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+# The swig subdir is not used, so we can skip running autotools in it. #518000
+AT_NO_RECURSIVE=1
+
+inherit autotools-utils
+
+DESCRIPTION="Software package for algebraic, geometric and combinatorial problems"
+HOMEPAGE="http://www.4ti2.de/"
+SRC_URI="http://4ti2.de/version_${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-macos"
+IUSE="static-libs"
+
+DEPEND="
+ sci-mathematics/glpk:0[gmp]
+ dev-libs/gmp[cxx]"
+RDEPEND="${DEPEND}"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.2-gold.patch
+ )
+
+src_prepare() {
+ sed \
+ -e "s:^CXX.*$:CXX=$(tc-getCXX):g" \
+ -i m4/glpk-check.m4 || die
+ autotools-utils_src_prepare
+}
diff --git a/sci-mathematics/4ti2/4ti2-1.6.6.ebuild b/sci-mathematics/4ti2/4ti2-1.6.6.ebuild
new file mode 100644
index 000000000000..63371b8f47d1
--- /dev/null
+++ b/sci-mathematics/4ti2/4ti2-1.6.6.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+# The swig subdir is not used, so we can skip running autotools in it. #518000
+AT_NO_RECURSIVE=1
+
+inherit autotools-utils
+
+DESCRIPTION="Software package for algebraic, geometric and combinatorial problems"
+HOMEPAGE="http://www.4ti2.de/"
+SRC_URI="http://4ti2.de/version_${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc x86 ~x86-macos"
+IUSE="static-libs"
+
+DEPEND="
+ sci-mathematics/glpk:0[gmp]
+ dev-libs/gmp[cxx]"
+RDEPEND="${DEPEND}"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.2-gold.patch
+ )
+
+src_prepare() {
+ sed \
+ -e "s:^CXX.*$:CXX=$(tc-getCXX):g" \
+ -i m4/glpk-check.m4 || die
+ autotools-utils_src_prepare
+}
diff --git a/sci-mathematics/4ti2/4ti2-1.6.7.ebuild b/sci-mathematics/4ti2/4ti2-1.6.7.ebuild
new file mode 100644
index 000000000000..c06748c20172
--- /dev/null
+++ b/sci-mathematics/4ti2/4ti2-1.6.7.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils
+
+DESCRIPTION="Software package for algebraic, geometric and combinatorial problems"
+HOMEPAGE="http://www.4ti2.de/"
+SRC_URI="http://4ti2.de/version_${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="static-libs"
+
+DEPEND="
+ sci-mathematics/glpk:0[gmp]
+ dev-libs/gmp[cxx]"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.3.2-gold.patch
+)
+
+src_prepare() {
+ default
+ sed -e "s:^CXX.*$:CXX=$(tc-getCXX):g" \
+ -i m4/glpk-check.m4 || die
+ # The swig subdir is not used, so we can skip running autotools in it. #518000
+ AT_NO_RECURSIVE=1 eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ use static-libs || prune_libtool_files --all
+}
diff --git a/sci-mathematics/4ti2/Manifest b/sci-mathematics/4ti2/Manifest
new file mode 100644
index 000000000000..fcde6e20ca80
--- /dev/null
+++ b/sci-mathematics/4ti2/Manifest
@@ -0,0 +1,12 @@
+AUX 4ti2-1.3.2-gold.patch 652 SHA256 50ebe74bb3fc8c0863a12823e52f4dc9d1fe7ab6e8674d53453adb5fd8460601 SHA512 60b14d7b287b69adbce420f37dad5d83ce21bfa4329ea0810c67f054d35a71f6795b0a8206b268ec9cfa08f796a4cd80a34d816c691e8e3e77adcbc5217b43a7 WHIRLPOOL ac0358e169846be7ac75380d69752f24b8bd5e9a68e4ad59abc840fcf86c6998f76df37888cf305ab2c4bf8b96dd2ce566f13a434f0522f377f8feb337b1e22b
+DIST 4ti2-1.6.2.tar.gz 5531651 SHA256 e1b39c5c051904e41deefce5419b16d723b1f403c616ddd6e3610e260d4b5711 SHA512 ff68f767b8677ce0ce94cca39fa3ef87835d77a951f0ec6ae28ab171bf09ae25c551d88c2cdf5bf3115b33bd32366b063533a1c22576130a00f542f9370bcd7b WHIRLPOOL f125cee526f8d2693b01978fd39cc36c900e7611ac0b8026f33c68ec8ccb0bb29cdffdf5c11adc6a5f7041389d34e6cacff173437c4be725c9b390a25e24e397
+DIST 4ti2-1.6.5.tar.gz 5640117 SHA256 079abe725fb1cc811184eca1d079a51f701a20c02c894422be59cd923c2cd21b SHA512 90dc105d99659e3c2213b484b6d21e877d7484ca0ad0373ece066df26de7c0e0cce614faaae9f7b678d03fa54f987fe95ab6d3f958477b1294a2dc00733a3a08 WHIRLPOOL b72d84e4e9557f85cadd3d93305b19162e85321bbc8dc974febe5f01e4a218c61d5e831de0ae8fc294e0f21c2469c663e53dde41f2e943db9df6011b758c1ccf
+DIST 4ti2-1.6.6.tar.gz 5640126 SHA256 2ae9f7dd6a387fd6f0454b4bc2d02cf389f504230cc9f782c35bb5ea4a8df10a SHA512 89f36aaf3d8f41bb31b37b44a013ea966d9664880473ad0d6d1825ffb00afec1eff3139c09ac6b684f0679e2ae0d201a84396bb721aa1f63dc1deca592392c41 WHIRLPOOL c5255ffe43eb65ec7d19f8cf24de3ab69e5f2466a91009a336a367cfab768d882781a91ab82d3077600edc08c6fb3f6f3686536e8e5bcbc6a1ca16f1feaa0ef0
+DIST 4ti2-1.6.7.tar.gz 5649869 SHA256 d4833a831d8d437f595d2e234a4471d7adbe1523fc63aa46cacea56af3e831bb SHA512 38d638fe01ff3cef1aebae1eefd276cf02f808978851b4465e132f77d3ab34ea51d512e2ea28a42ac65263b458c43cf420dc5f8ac930f959dd0c14916cef9841 WHIRLPOOL c2159243d6664e1c7a0b880e336055d7f53b8367f36c7b5255cad0f3b861d8c1e9ab109cb5d5b243a934df8ca1f95e61f85496fa54354d131447b0fb70c13048
+EBUILD 4ti2-1.6.2.ebuild 789 SHA256 3d23abace99194ea30f381da9ed0d8ec6f96e2b8645a7b83ca6ad7ee6a8f93fc SHA512 58e22453125f1329e5df372b4ed2bf3672de5180acd3667e90b528211a427c18ce77e041e91ab13ff96157f329210ed40771779940b323e5ef330aba417aabe4 WHIRLPOOL a9ee9210c34afcf66fb0dc0ad94c63b4408579db2d7d6237521f1cfec034153895968c6f93489d8b45e582358fe2acfb55bc90c785843533b4a243f49dc01945
+EBUILD 4ti2-1.6.5.ebuild 791 SHA256 fe2b9ac6ce0ff70a6d8f1f2ba36b3485f77b1fd351c2fead62dd68dddd9a7d4d SHA512 4951d3a3e5ddaf1641e0466e5601350b69c46f6e184a20d23466140bdc958e5538663dce8bb1e2395316dd63499a93d0eaef224188f407c7cb45104cc073652d WHIRLPOOL e56c202616789a74765511b5e62a77bca7283e9ef5faa74e5e0324a9af0b89005c7e145a1f81a54999490fe7ed2f7c91e8a647b8dbafbae2708aa0d9d52e67a2
+EBUILD 4ti2-1.6.6.ebuild 798 SHA256 a829827c2cf467b3af47565129bc68e04748bd0c4d760dcb880ba3cb76b846a9 SHA512 e531966d6b40f7da358890db343d62536cd1947c5473a4e310e1bc639701442a779e6b37697bbaa9c1d3a25f5a5c4621ca6e5129361e9314bedeeade2e5a885e WHIRLPOOL ec61890451ab63e4b3048407d892193728285f19b523c3423a7a034cf0362315c2e72ac07755e61df6f49c6aa57d2042582d9b73166c2731681307e1809cdce2
+EBUILD 4ti2-1.6.7.ebuild 918 SHA256 a72d8875394fce3584c7907bef729019afb1e458cf63f8af7ac71ecb35a37d07 SHA512 b492edd19531900aa43ba8f945d3bbb804e15156e1a096b1045358a1fbbd0537bfe2ebe568dc8ca2e12045303ff7b16d57c0349865ac503842fd62b602b274ff WHIRLPOOL 8acfe0643ce2febf7d5ad5dc0b06d59267c38939cff81b6898e37fe2d92488cfc074ef153e7ca6acc5d3a8fd5c7e4e464847a34adf0adb4f90bc9c92dd61885a
+MISC ChangeLog 3072 SHA256 29c13f08174277b22f3d9f9dfcaf90bf4310f88d5ab5ea4a9ba361594b3de67a SHA512 a6da631da8c77aee8c7586a07cbc2ba65bc070bb033b2bbd679eac360dbd0a1c34a16486c5b1058002418e1ccc00c6b1071c0203449826c8e54104f1389ac465 WHIRLPOOL 2cc66d4de3dc699483c84b37c2c2b60d168df9d449c793a51843a90230cd12bac8685daf0e82b0f7d6fa4c9460358374024f5be0387d7c681c8788aa8aac64a1
+MISC ChangeLog-2015 3437 SHA256 256bdcae54b58b0d08006988f9ee8f721e2c23e8fbe88d849ddfe2c1d9233fad SHA512 806e26e49a52611b3bc33bfbe4d0fee1623ca44a2e39188c73892f14e896172cc152a3cbd525bbf1124e69bcc0d535fadb07af78946a06b334f280aa0a7d4778 WHIRLPOOL e09411d7de7ccd1f1a12fe8d4f2b52f16c6029515d2fe5c05d7209ea53b3b56c75f218dc2af18787ba527d9b21b38f235894857bd763cecee69ef51ab8fe735b
+MISC metadata.xml 446 SHA256 3719f31df109749d5b09e66b108d498d5802ce8d0d294ff41f5ec30a87d20957 SHA512 2c7950b353c54597eebcff1f50e5045f792ef37cfe59f0142160bdf5ea47ff6be57bd698b051e6c56863b109fde983c1aeeca87827289abde96838af1aa3f7d1 WHIRLPOOL 027b45b9401cb32e220777ac286a387011ef19431660c46143d0709458ce2457b302d2edf7e842428090405480b159b0803cd8131a677616ce2bb290f3a4392e
diff --git a/sci-mathematics/4ti2/files/4ti2-1.3.2-gold.patch b/sci-mathematics/4ti2/files/4ti2-1.3.2-gold.patch
new file mode 100644
index 000000000000..bb1e8c4aad39
--- /dev/null
+++ b/sci-mathematics/4ti2/files/4ti2-1.3.2-gold.patch
@@ -0,0 +1,17 @@
+ m4/glpk-check.m4 | 2 +-
+ src/groebner/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/groebner/Makefile.am b/src/groebner/Makefile.am
+index 992c4ae..ba2f463 100644
+--- a/src/groebner/Makefile.am
++++ b/src/groebner/Makefile.am
+@@ -269,7 +269,7 @@ lib4ti2int64_la_SOURCES = $(lib4ti2sources)
+ # Arbitrary precision flags.
+ # 4ti2 uses GMP (GLPL), an arbitrary precision arithmetic library.
+ if HAVE_GMP_WITH_CXX
+-4ti2gmp_LDADD = lib4ti2gmp.la
++4ti2gmp_LDADD = lib4ti2gmp.la -lgmp
+ 4ti2gmp_CPPFLAGS = -D_4ti2_GMP_ $(GMP_CFLAGS)
+ 4ti2gmp_SOURCES = $(4ti2sources)
+ lib4ti2gmp_la_CPPFLAGS = -D_4ti2_GMP_
diff --git a/sci-mathematics/4ti2/metadata.xml b/sci-mathematics/4ti2/metadata.xml
new file mode 100644
index 000000000000..69d5057d7b72
--- /dev/null
+++ b/sci-mathematics/4ti2/metadata.xml
@@ -0,0 +1,12 @@
+<?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">
+4ti2 is a software package for algebraic, geometric and combinatorial problems
+on linear spaces and for toric ideals too.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/Macaulay2/Macaulay2-1.7_pre.ebuild b/sci-mathematics/Macaulay2/Macaulay2-1.7_pre.ebuild
new file mode 100644
index 000000000000..4b4e620d27db
--- /dev/null
+++ b/sci-mathematics/Macaulay2/Macaulay2-1.7_pre.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools elisp-common eutils flag-o-matic python-single-r1 toolchain-funcs
+
+FACTORY="factory-4.0.0+m4"
+FACTORY_GFTABLES="factory.4.0.1-gftables"
+
+DESCRIPTION="Research tool for commutative algebra and algebraic geometry"
+HOMEPAGE="http://www.math.uiuc.edu/Macaulay2/"
+BASE_URI="http://www.math.uiuc.edu/Macaulay2/Downloads/OtherSourceCode/trunk"
+SRC_URI="
+ https://dev.gentoo.org/~tomka/files/${P}.tar.bz2
+ ${BASE_URI}/${FACTORY}.tar.gz
+ ${BASE_URI}/${FACTORY_GFTABLES}.tar.gz
+ ${BASE_URI}/gtest-1.7.0.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+IUSE="debug emacs +optimization"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}
+ sys-process/time
+ virtual/pkgconfig"
+
+RDEPEND="${PYTHON_DEPS}
+ sys-libs/gdbm
+ <dev-libs/ntl-7
+ sci-mathematics/pari[gmp]
+ >=sys-libs/readline-6.1
+ dev-libs/libxml2:2
+ sci-mathematics/flint[gc]
+ sci-mathematics/frobby
+ sci-mathematics/4ti2
+ sci-mathematics/nauty
+ >=sci-mathematics/normaliz-2.8
+ sci-mathematics/gfan
+ sci-libs/mpir[cxx]
+ dev-libs/mpfr
+ sci-libs/cdd+
+ sci-libs/cddlib
+ sci-libs/lrslib[gmp]
+ virtual/blas
+ virtual/lapack
+ dev-util/ctags
+ sys-libs/ncurses
+ >=dev-libs/boehm-gc-7.4[threads]
+ dev-libs/libatomic_ops
+ emacs? ( virtual/emacs )"
+
+SITEFILE=70Macaulay2-gentoo.el
+
+S="${WORKDIR}/M2/"
+
+pkg_setup () {
+ tc-export CC CPP CXX PKG_CONFIG
+ append-cppflags "-I/usr/include/frobby"
+ # gtest needs python:2
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Patching .m2 files to look for external programs in
+ # /usr/bin
+ epatch "${FILESDIR}"/1.6-paths-of-external-programs.patch
+
+ # Shortcircuit lapack tests
+ epatch "${FILESDIR}"/1.6-lapack.patch
+
+ # Factory is a statically linked library which (in this flavor) are not used by any
+ # other program. We build it internally and don't install it.
+ cp "${DISTDIR}/${FACTORY}.tar.gz" "${S}/BUILD/tarfiles/" \
+ || die "copy failed"
+ cp "${DISTDIR}/${FACTORY_GFTABLES}.tar.gz" "${S}/BUILD/tarfiles/" \
+ || die "copy failed"
+ # Macaulay2 developers want that gtest is built internally because
+ # the documentation says it may fail if build with options not the
+ # same as the tested program.
+ cp "${DISTDIR}/gtest-1.7.0.tar.gz" "${S}/BUILD/tarfiles/" \
+ || die "copy failed"
+
+ eautoreconf
+}
+
+src_configure (){
+ # Recommended in bug #268064 Possibly unecessary
+ # but should not hurt anybody.
+ if ! use emacs; then
+ tags="ctags"
+ fi
+
+ # configure instead of econf to enable install with --prefix
+ ./configure LIBS="$($(tc-getPKG_CONFIG) --libs lapack)" \
+ --prefix="${D}/usr" \
+ --disable-encap \
+ --disable-strip \
+ --with-issue=Gentoo \
+ $(use_enable optimization optimize) \
+ $(use_enable debug) \
+ --enable-build-libraries="factory" \
+ --with-unbuilt-programs="4ti2 gfan normaliz nauty cddplus lrslib" \
+ || die "failed to configure Macaulay"
+}
+
+src_compile() {
+ # Parallel build not supported yet
+ emake IgnoreExampleErrors=true -j1
+
+ if use emacs; then
+ cd "${S}/Macaulay2/emacs" || die
+ elisp-compile *.el
+ fi
+}
+
+src_test() {
+ # No parallel tests yet & Need to increase the time
+ # limit for long running tests in Schubert2 to pass
+ emake TLIMIT=550 -j1 check
+}
+
+src_install () {
+ # Parallel install not supported yet
+ emake IgnoreExampleErrors=true -j1 install
+
+ # Remove emacs files and install them in the
+ # correct place if use emacs
+ rm -rf "${ED}"/usr/share/emacs/site-lisp || die
+ if use emacs; then
+ cd "${S}/Macaulay2/emacs" || die
+ elisp-install ${PN} *.elc *.el
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ elog "If you want to set a hot key for Macaulay2 in Emacs add a line similar to"
+ elog "(global-set-key [ f12 ] 'M2)"
+ elog "in order to set it to F12 (or choose a different one)."
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/Macaulay2/Macaulay2-1.8.2.1-r1.ebuild b/sci-mathematics/Macaulay2/Macaulay2-1.8.2.1-r1.ebuild
new file mode 100644
index 000000000000..0836337b8d5d
--- /dev/null
+++ b/sci-mathematics/Macaulay2/Macaulay2-1.8.2.1-r1.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools elisp-common eutils flag-o-matic multilib python-single-r1 toolchain-funcs
+
+# To stop the download madness we now roll our own tarball (Feb 2016)
+DESCRIPTION="Research tool for commutative algebra and algebraic geometry"
+HOMEPAGE="http://www.math.uiuc.edu/Macaulay2/"
+BASE_URI="http://www.math.uiuc.edu/Macaulay2/Downloads/OtherSourceCode/"
+BASE_URI2="https://dev.gentoo.org/~tomka/files/"
+SRC_URI="
+ ${BASE_URI2}/${P}-fat.tar.bz2
+"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~arm ~x86"
+IUSE="debug emacs +optimization"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}
+ sys-process/time
+ virtual/pkgconfig"
+
+RDEPEND="${PYTHON_DEPS}
+ sys-libs/gdbm
+ sci-mathematics/pari[gmp]
+ >=sys-libs/readline-6.1
+ dev-libs/libxml2:2
+ sci-mathematics/flint[gc]
+ sci-mathematics/frobby
+ sci-mathematics/4ti2
+ sci-mathematics/nauty
+ >=sci-mathematics/normaliz-2.8
+ sci-mathematics/gfan
+ sci-libs/cdd+
+ sci-libs/cddlib
+ sci-libs/lrslib[gmp]
+ virtual/blas
+ virtual/lapack
+ dev-util/ctags
+ sys-libs/ncurses
+ >=dev-libs/boehm-gc-7.4[threads]
+ dev-libs/libatomic_ops
+ emacs? ( virtual/emacs )"
+
+SITEFILE=70Macaulay2-gentoo.el
+
+S="${WORKDIR}/M2/M2"
+
+pkg_setup () {
+ tc-export CC CPP CXX PKG_CONFIG
+ append-cppflags "-I/usr/include/frobby"
+ # gtest needs python:2
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Patching .m2 files to look for external programs in
+ # /usr/bin
+ epatch "${FILESDIR}"/1.6-paths-of-external-programs.patch
+
+ # Shortcircuit lapack tests
+ epatch "${FILESDIR}/${P}"-lapack.patch
+
+ eautoreconf
+}
+
+src_configure (){
+ # Recommended in bug #268064 Possibly unecessary
+ # but should not hurt anybody.
+ if ! use emacs; then
+ tags="ctags"
+ fi
+
+ # configure instead of econf to enable install with --prefix
+ ./configure LIBS="$($(tc-getPKG_CONFIG) --libs lapack)" \
+ --prefix="${D}usr/" \
+ --libdir='${exec_prefix}'/$(get_libdir)/ \
+ --disable-encap \
+ --disable-strip \
+ --with-issue=Gentoo \
+ $(use_enable optimization optimize) \
+ $(use_enable debug) \
+ --enable-build-libraries="factory" \
+ --with-unbuilt-programs="4ti2 gfan normaliz nauty cddplus lrslib" \
+ || die "failed to configure Macaulay"
+}
+
+src_compile() {
+ # Parallel build not supported yet
+ emake IgnoreExampleErrors=true -j1
+
+ if use emacs; then
+ cd "${S}/Macaulay2/emacs" || die
+ elisp-compile *.el
+ fi
+}
+
+src_test() {
+ # No parallel tests yet & Need to increase the time
+ # limit for long running tests in Schubert2 to pass
+ emake TLIMIT=750 -j1 check
+}
+
+src_install () {
+ # Parallel install not supported yet
+ emake IgnoreExampleErrors=true -j1 install
+
+ # Remove emacs files and install them in the
+ # correct place if use emacs
+ rm -rf "${ED}"/usr/share/emacs/site-lisp || die
+ if use emacs; then
+ cd "${S}/Macaulay2/emacs" || die
+ elisp-install ${PN} *.elc *.el
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ elog "If you want to set a hot key for Macaulay2 in Emacs add a line similar to"
+ elog "(global-set-key [ f12 ] 'M2)"
+ elog "in order to set it to F12 (or choose a different one)."
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/Macaulay2/Manifest b/sci-mathematics/Macaulay2/Manifest
new file mode 100644
index 000000000000..22c1b87d01ae
--- /dev/null
+++ b/sci-mathematics/Macaulay2/Manifest
@@ -0,0 +1,14 @@
+AUX 1.6-lapack.patch 1849 SHA256 d9f49f6b97d12fe09aa7655c24682e16c0da27f3376f82bd62dbac1d907988ae SHA512 89221bf3495f84b0f8f12046dcc3f85f3062c8637d2b42a37817ccef84762ffe31457d2b607457a6a3c23a50f196789d7ca6421e1078191f72bd7e08f46bd36d WHIRLPOOL 0df82df521ea3088a8ea6ec29cb5429ce771d2c40c5662dc0c8a61525893d75809b534c85cc026e2b01cc5d7869afc86ff1101439144c5507e97f3e672c29ba8
+AUX 1.6-paths-of-external-programs.patch 3767 SHA256 af95d1332b04c6746af8c14477830cadb8807da097b14b07d30559df79f9a0bd SHA512 556944da47742a3c4539e084bb6dab7c2375733eb4cbe4d14e1dea852bba3ac61e5f6ad5f805958a52d371a918c8672f7f0308c7c0454a502ca61bb59fea6bf5 WHIRLPOOL c0b0a5638d9a59ea5d5e5c7fe625fb811ece69a3619959aae7d1de1bd525862359163547096c7c5312a66b71e638942c854f96afa9f79b51e0f3395c47d2e240
+AUX 70Macaulay2-gentoo.el 597 SHA256 e5583d11e6ab662261abb32e90fcf31ccf6bd56f2b23b691b9255d1b8d8acb2f SHA512 2d6b6d3c85ca93bf4d4100f2172013074dec83f8ce067af219b026ca2b495ff1aa7fb3da027b64ef8e55ad431ce5d42bffdad1ab474bb3e95240ac4235f2f986 WHIRLPOOL fda758e3dc0972a846c452fc61187577902262e5861401ace4cd1d594fd15b513e08083c0c932cc383e05b6cc4e40b5adb417a1e79567f72e172d5fab43e360d
+AUX Macaulay2-1.8.2.1-lapack.patch 1836 SHA256 f6d600eb2d1abe9a504ed755cc863e3a3fef8378525859497e979cd6c8456441 SHA512 d3d13a67daeda87753c7c4daf888d2982109cb13bc0b88be46c2dd4993715077cf0ce5e155876bf5aaf51c886ce348df550184ade4af71e7143c2c2eb16c3b7f WHIRLPOOL c4cb5daf51c8e98c36a96581e514ad1bb0097995be5c8bdb1c2fc51c4fc8f6ef634edc7a4644e3902562bee57d8866b873c4ffaac3c5bde2f6481e3d362b53f1
+DIST Macaulay2-1.7_pre.tar.bz2 4639477 SHA256 b14918187724f8911bc50edf87c9692209ff0c2191feb257084adc87609eb1cd SHA512 e70376d1e54b6e239ebb3bf676507a2115fdf5c4fbe05f320553029a84114b74d78f54e4d1bdc7643131f3c45c301e83c21ff99e4d4b675372e971368398d6f5 WHIRLPOOL 396311aadb8a7845deaee5aeca49c431430abc46201e935ef72c4579c9cbe6cd4da85f3e09ff0fe647031f8050fb7c62f63ecce251bf34648c1848cd00eef68e
+DIST Macaulay2-1.8.2.1-fat.tar.bz2 26102483 SHA256 11e13fbb4aeeddae1547ed01e499e3f8961446cb9bec8b3162b29cadd2f280c1 SHA512 64f7ea9b01cdb308023a55d8ab8bd6733540f25161dacf27052c071e143418c68c639d5115cf32540c11594b70eae14473f4ef6ce5bd12b6df0722da7c13dd2c WHIRLPOOL 3f9c838d6624f95076957743bf402236708cb2af15b84d24c4446fb193f7608698cc63e43eb8eff8bf878963ce2a9fd85f37128f73d1dbd43d4c0bcda980753d
+DIST factory-4.0.0+m4.tar.gz 4711126 SHA256 9b2498cc7fc6765f1c586e8061ebe236cdce4b32a44721a235ad2644ec3124fb SHA512 1dacb9aae52e655bccbbc960397b02351050791594dd9c39771f0da7f8c6e8130a8827c2a675c3fbaaa214606e123ac9776e1c73d143649353cefc50cadeea3e WHIRLPOOL 47c4d6261fc6cc9c172035d8774f0cde9fa669fa164fc4a0f47e84ba789d69d14f5a16d042451564412fdedddec71335714ad751508495c22cea25b69f10b925
+DIST factory.4.0.1-gftables.tar.gz 2974152 SHA256 9cd158ceb1c2b1c47bdca2c0b004bba92cb0e0aaa0ea6a43ca784ebdce10eebd SHA512 060c58fe6e4565dd5e7649bfa070f14dec3c383a55ebab52a9f02b58a6405e2183e0c7e08964cddb87b81e872c0d8a52d7bd4575d07269547be544cf6a725a76 WHIRLPOOL a721a6824681118578c7289cea77a3f47e5c7654f30dc454eaac76b19cc89e416ae54b8d21a69f897d7087d4b67990634fc960f81df2ea53f428868d608dc9c2
+DIST gtest-1.7.0.tar.gz 1001582 SHA256 c0f860eee47c86e0aeb462fd0bdfd70e3975297e0b8b178e0e03a95e1f6c9bc4 SHA512 a9f5c047b39efb2d11b55ee9913662ca402ac6837b3ad2d278ecfbd1caf32ed4546f169e3e92503d57bf3b62ccf89cd062da1c7ea3638aae98e868d2766363c3 WHIRLPOOL 36edbdf8be7c3793a89918a3c43d74e75a6281a37c394f7d2f20506130a76aab04a3beddba01bf7f0e9b6901c7e834ca014c31c913c0ea846d3f6be9c93599d2
+EBUILD Macaulay2-1.7_pre.ebuild 3919 SHA256 0fad15c873f0fccfd72902fe78e3a7ffa139475e6d8c8ddce84ea43e11fef435 SHA512 14c8b36de0533f5779441adbe7ea993fd0fb1451f8482acb8f411fe0ba60f094d7cd5a5fabbacd570715bf6333baa1a8076d4f279d22983ccf182049d732176b WHIRLPOOL e329100c0ed1353cd4e5ef14d5315ac6fa96415e26b251a27dac5b4607f5b4886c1eb80a3ef004f0f391db95a01c321c98217f3c0e39f10c47e582ec3a9fa9aa
+EBUILD Macaulay2-1.8.2.1-r1.ebuild 3278 SHA256 7b4b7c00fe02dc72948e8c2907df0c7c521a157be85a16ab991204a22eae0648 SHA512 92d1d78fe0f63c11da1d6f3eab8307fb299b094bd54ff9afb12a8059e899a378dbbca6a911be224bb7de1bad9d2c5a29962398b79484c6b653df2467aaaefff2 WHIRLPOOL 726a7838b423600d720b157c00de8cacdb979009cf377212cd612dbd76888f934ffe40cef3fc7472d7d9fef1b9880bd5c62aa71e0552c77ebb7b0fdacb3d9e82
+MISC ChangeLog 3523 SHA256 08fcf9f065526780a43683f0cd4bfca555b4577eca88fbc32c82bbd7c6a0f032 SHA512 aa49ebe203869fdb9afe725a473dcbc61d92701365b8af6eb214e6d43274f64c05a403925dab5c5ab63601fe40f30b35441d937716587dd346230cee8fca01b4 WHIRLPOOL f90ab74803c4ce0c5fb95849ffd78d0604d6c5aa8e3566a32736b9bb02ce1e484162747c9f6e0a5dd9ad7cb513aa608b8d95394d0d96113d4e3f7c8d925baf0e
+MISC ChangeLog-2015 3125 SHA256 6c09e6c967f44675d6596baf5fc9bda14cd880c434ff3bfa697c136d5a8d55ee SHA512 af194798a10316494c0274acaff98b1c59e3f66e494b88e1f06ec6b255984da543a4112cadd74379357088ac9ef3d4ba19599d8015f1a42a683f6fbe3a13aff5 WHIRLPOOL fe9810cbbf5f3e0b1d3d0cbcb4ad197a5da30c9d83760bf6939294e4f4f75b70a273fbdbd576d692eb2285a77d1c725c44aa35288c401c956d66dd2e6f1e28df
+MISC metadata.xml 527 SHA256 2e223e8122ed746f08249e1507afa8cdb1bf1e107fbe4a04dd6068ac1ac8ecfc SHA512 7ca19042c8405096453426ec3582c3d342ff9a37ec520372f11ffd4e00a78ef018cc49d3f851e6dff2a000314f0eb6de0a4640d37edcb19ff2ad65196aaa03a1 WHIRLPOOL badd6d07f141d42b74d1fc2bbe56335bcbc192775da24b5472f30c0a8cf03e8daefa2eafaa8f38fb961d799b639647a7cd964db4b6667845c2c7b1510285953f
diff --git a/sci-mathematics/Macaulay2/files/1.6-lapack.patch b/sci-mathematics/Macaulay2/files/1.6-lapack.patch
new file mode 100644
index 000000000000..e9a434eeb28e
--- /dev/null
+++ b/sci-mathematics/Macaulay2/files/1.6-lapack.patch
@@ -0,0 +1,50 @@
+--- configure.ac 2012-10-24 09:29:55.240498786 -0700
++++ configure.ac.2 2012-10-30 15:07:27.172846300 -0700
+@@ -1285,46 +1285,7 @@
+ done
+ test $BUILD_factory = yes && BUILTLIBS="$SINGULARLIBS $BUILTLIBS"
+
+-# we need to do the fortran library testing last, in case AC_SEARCH_LIBS adds
+-# one of them to $LIBS, making it impossible to check for the presence of C or
+-# C++ libraries. (I'm not sure why putting -llapack on the gcc command line
+-# needlessly causes the library to be linked against.)
+-FORTRANUSED=no
+-if test "$LAPACK" = yes
+-then AC_MSG_CHECKING([whether the vecLib framework is available])
+- SAVELIBS=$LIBS LIBS="-framework vecLib $LIBS"
+- AC_LANG(C)
+- AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM(,[sgemv_();dgetrf_();])],
+- [
+- AC_MSG_RESULT(yes)
+- ],
+- [
+- AC_MSG_RESULT(no)
+- LIBS=$SAVELIBS
+- FORTRANUSED=yes
+- if test $BUILD_lapack = no
+- then AC_LANG(Fortran)
+- if test "$FC" = ""
+- then AC_MSG_ERROR(no fortran compiler found)
+- else AC_MSG_NOTICE(using fortran compiler $FC)
+- fi
+- AC_SEARCH_LIBS(sgemv,blas f77blas,,BUILD_lapack=yes)
+- AC_SEARCH_LIBS(dgetrf,lapack,,BUILD_lapack=yes)
+- fi
+- ])
+-fi
+-test $BUILD_lapack = yes && BUILTLIBS="-llapack -lblas $BUILTLIBS"
+-
+-if test $BUILD_lapack = yes
+-then # test whether the fortran compiler can handle lapack, which, starting with
+- # version 3.2, requires fortran 90, not fortran 77
+- AC_LANG(Fortran)
+- AC_MSG_CHECKING([whether the fortran compiler is modern enough for lapack])
+- AC_COMPILE_IFELSE([instrinsic maxloc],
+- AC_MSG_ERROR(the fortran compiler ($FC) does not support the Fortran 90 language required for compiling lapack),
+- AC_MSG_RESULT(yes))
+-fi
++BUILTLIBS="$(${PKG_CONFIG} --libs lapack) $BUILTLIBS"
+
+ if test $BUILD_memtailor = yes
+ then BUILTLIBS="-lmemtailor $BUILTLIBS"
diff --git a/sci-mathematics/Macaulay2/files/1.6-paths-of-external-programs.patch b/sci-mathematics/Macaulay2/files/1.6-paths-of-external-programs.patch
new file mode 100644
index 000000000000..4c090deec9d8
--- /dev/null
+++ b/sci-mathematics/Macaulay2/files/1.6-paths-of-external-programs.patch
@@ -0,0 +1,73 @@
+diff -U 3 -dHrN M2source/Macaulay2/packages/FourTiTwo.m2 M2source.patch/Macaulay2/packages/FourTiTwo.m2
+--- M2source/Macaulay2/packages/FourTiTwo.m2 2011-09-22 14:36:51.000000000 +0100
++++ M2source.patch/Macaulay2/packages/FourTiTwo.m2 2011-09-24 21:24:12.000000000 +0100
+@@ -47,7 +47,7 @@
+
+ path'4ti2 = (options FourTiTwo).Configuration#"path"
+ -- NOTE: the absolute path should be put into the .init file for 4ti2 inside the .Macaulay2 directory.
+-if path'4ti2 == "" then path'4ti2 = prefixDirectory | currentLayout#"programs"
++if path'4ti2 == "" then path'4ti2 = "/usr/bin/"
+
+ getFilename = () -> (
+ filename := temporaryFileName();
+diff -U 3 -dHrN M2source/Macaulay2/packages/gfanInterface.m2 M2source.patch/Macaulay2/packages/gfanInterface.m2
+--- M2source/Macaulay2/packages/gfanInterface.m2 2011-05-14 12:00:59.000000000 +0100
++++ M2source.patch/Macaulay2/packages/gfanInterface.m2 2011-09-24 21:24:12.000000000 +0100
+@@ -25,7 +25,7 @@
+ }
+
+ gfan'path = gfanInterface#Options#Configuration#"path"
+-if gfan'path == "" then gfan'path = prefixDirectory | currentLayout#"programs"
++if gfan'path == "" then gfan'path = "/usr/bin/"
+ if instance(gfan'path, String) then gfan'path = {gfan'path}
+ if not instance(gfan'path,List) then error "expected configuration option gfan'path to be a list of strings or a string"
+ gfan'path = join(
+diff -U 3 -dHrN M2source/Macaulay2/packages/NautyGraphs.m2 M2source.patch/Macaulay2/packages/NautyGraphs.m2
+--- M2source/Macaulay2/packages/NautyGraphs.m2 2011-08-26 11:05:30.000000000 +0100
++++ M2source.patch/Macaulay2/packages/NautyGraphs.m2 2011-09-24 21:25:53.000000000 +0100
+@@ -32,7 +32,7 @@
+ -- Check the ~/.Macaulay2/init-NautyGraphs.m2 file for the absolute path.
+ -- If it's not there, then use the M2-Programs directory.
+ nauty'path = (options NautyGraphs).Configuration#"path";
+-if nauty'path == "" then nauty'path = prefixDirectory | currentLayout#"programs";
++if nauty'path == "" then nauty'path = "/usr/bin/";
+
+ -------------------
+ -- Exports
+diff -U 3 -dHrN M2source/Macaulay2/packages/Nauty.m2 M2source.patch/Macaulay2/packages/Nauty.m2
+--- M2source/Macaulay2/packages/Nauty.m2 2011-08-26 11:05:30.000000000 +0100
++++ M2source.patch/Macaulay2/packages/Nauty.m2 2011-09-24 21:24:12.000000000 +0100
+@@ -48,7 +48,8 @@
+ -- Check the ~/.Macaulay2/init-Nauty.m2 file for the absolute path.
+ -- If it's not there, then use the M2-Programs directory.
+ nauty'path = (options Nauty).Configuration#"path";
+-if nauty'path == "" then nauty'path = prefixDirectory | currentLayout#"programs";
++if nauty'path == "" then nauty'path = "/usr/bin/";
++
+
+ -------------------
+ -- Exports
+diff -U 3 -dHrN M2source/Macaulay2/packages/Normaliz.m2 M2source.patch/Macaulay2/packages/Normaliz.m2
+--- M2source/Macaulay2/packages/Normaliz.m2 2011-05-25 16:47:50.000000000 +0100
++++ M2source.patch/Macaulay2/packages/Normaliz.m2 2011-09-24 21:24:12.000000000 +0100
+@@ -166,7 +166,7 @@
+ nmzExec="normaliz";
+ );
+ -- return nmzExec;
+- return prefixDirectory | currentLayout#"programs" | nmzExec;
++ return "/usr/bin/" | nmzExec;
+ );
+
+
+diff -U 3 -dHrN M2source/Macaulay2/packages/StatePolytope.m2 M2source.patch/Macaulay2/packages/StatePolytope.m2
+--- M2source/Macaulay2/packages/StatePolytope.m2 2010-09-10 16:47:20.000000000 +0100
++++ M2source.patch/Macaulay2/packages/StatePolytope.m2 2011-09-24 21:24:12.000000000 +0100
+@@ -31,7 +31,7 @@
+
+
+ gfanCommand = (options StatePolytope)#Configuration#"gfan command"
+-if gfanCommand === "gfan" then gfanCommand = prefixDirectory | currentLayout#"programs" | gfanCommand
++if gfanCommand === "gfan" then gfanCommand = "/usr/bin/" | gfanCommand
+ gfanCommand = "!" | gfanCommand
+
+ --The next two functions print out the ring and the ideal in the format required by gfan
diff --git a/sci-mathematics/Macaulay2/files/70Macaulay2-gentoo.el b/sci-mathematics/Macaulay2/files/70Macaulay2-gentoo.el
new file mode 100644
index 000000000000..ac86e2132ed5
--- /dev/null
+++ b/sci-mathematics/Macaulay2/files/70Macaulay2-gentoo.el
@@ -0,0 +1,11 @@
+;; sci-mathematics/Macaulay2 init file
+
+(add-to-list 'load-path "/usr/share/emacs/site-lisp/Macaulay2")
+
+(defvar M2-exe "/usr/bin/M2" "*The default Macaulay2 executable name.")
+(autoload 'M2 "M2.el" "Run Macaulay 2 in a buffer." t)
+(autoload 'Macaulay2 "M2" "Run Macaulay 2 in a buffer, non-interactive." t)
+(autoload 'M2-mode "M2" "Macaulay 2 editing mode" t)
+(autoload 'm2-mode "M2" "Macaulay 2 editing mode, name in lower case" t)
+(autoload 'm2-comint-mode "M2" "Macaulay 2 command interpreter mode, name in lower case" t)
+(setq auto-mode-alist (append auto-mode-alist '(("\\.m2$" . M2-mode)))) \ No newline at end of file
diff --git a/sci-mathematics/Macaulay2/files/Macaulay2-1.8.2.1-lapack.patch b/sci-mathematics/Macaulay2/files/Macaulay2-1.8.2.1-lapack.patch
new file mode 100644
index 000000000000..25185e7c560e
--- /dev/null
+++ b/sci-mathematics/Macaulay2/files/Macaulay2-1.8.2.1-lapack.patch
@@ -0,0 +1,50 @@
+--- configure.ac 2015-09-03 14:49:42.000000000 +0200
++++ configure.ac.new 2016-01-27 12:50:07.812215547 +0100
+@@ -1301,46 +1301,7 @@
+ BUILTLIBS="$SINGULARLIBS $BUILTLIBS"
+ fi
+
+-# we need to do the fortran library testing last, in case AC_SEARCH_LIBS adds
+-# one of them to $LIBS, making it impossible to check for the presence of C or
+-# C++ libraries. (I'm not sure why putting -llapack on the gcc command line
+-# needlessly causes the library to be linked against.)
+-FORTRANUSED=no
+-if test "$LAPACK" = yes
+-then AC_MSG_CHECKING([whether the Accelerate framework is available])
+- SAVELIBS=$LIBS LIBS="-framework Accelerate $LIBS"
+- AC_LANG(C)
+- AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM(,[sgemv_();dgetrf_();])],
+- [
+- AC_MSG_RESULT(yes)
+- ],
+- [
+- AC_MSG_RESULT(no)
+- LIBS=$SAVELIBS
+- FORTRANUSED=yes
+- if test $BUILD_lapack = no
+- then AC_LANG(Fortran)
+- if test "$FC" = ""
+- then AC_MSG_ERROR(no fortran compiler found)
+- else AC_MSG_NOTICE(using fortran compiler $FC)
+- fi
+- AC_SEARCH_LIBS(sgemv,blas f77blas,,BUILD_lapack=yes)
+- AC_SEARCH_LIBS(dgetrf,lapack,,BUILD_lapack=yes)
+- fi
+- ])
+-fi
+-test $BUILD_lapack = yes && BUILTLIBS="-llapack -lrefblas $BUILTLIBS"
+-
+-if test $BUILD_lapack = yes
+-then # test whether the fortran compiler can handle lapack, which, starting with
+- # version 3.2, requires fortran 90, not fortran 77
+- AC_LANG(Fortran)
+- AC_MSG_CHECKING([whether the fortran compiler is modern enough for lapack])
+- AC_COMPILE_IFELSE([instrinsic maxloc],
+- AC_MSG_ERROR(the fortran compiler ($FC) does not support the Fortran 90 language required for compiling lapack),
+- AC_MSG_RESULT(yes))
+-fi
++BUILTLIBS="$(${PKG_CONFIG} --libs lapack) $BUILTLIBS"
+
+ test "$USE_FCLIBS" = no && FCLIBS=
+ test "$FORTRANUSED" = no && FCLIBS=
diff --git a/sci-mathematics/Macaulay2/metadata.xml b/sci-mathematics/Macaulay2/metadata.xml
new file mode 100644
index 000000000000..76821a208f0c
--- /dev/null
+++ b/sci-mathematics/Macaulay2/metadata.xml
@@ -0,0 +1,15 @@
+<?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>
+ <use>
+ <flag name="optimization">Accept upstream's choices for -O option, i.e. -O3 almost everywhere.</flag>
+ </use>
+ <longdescription lang="en">
+ Macaulay2 is a research tool for algraic geometry and commutative
+ algebra.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/agda-lib-ffi/Manifest b/sci-mathematics/agda-lib-ffi/Manifest
new file mode 100644
index 000000000000..44d6a7b0b245
--- /dev/null
+++ b/sci-mathematics/agda-lib-ffi/Manifest
@@ -0,0 +1,7 @@
+DIST agda-stdlib-2.4.2.3.tar.gz 252558 SHA256 bb444fb35096be277c07aa27652c24509449fee9188325bb13eaac68b91eca7d SHA512 d503fc2abd18ab8c367a1947301e0302a6ff9fcbb6376a01f016aa2ab7a9a967e5adb96c5013db1892f4acd9fab62bead11c58c4d443784aff1e42ee4ffd4aa9 WHIRLPOOL 829e5613f2e03cda80608ef0899db413c98a505c9ba595d3aacd12171fc2e30e18e72365770a85655c7670fc5d45103c3b186d2bf8d9697aebae15bc9f40feaf
+DIST lib-0.7.tar.gz 226400 SHA256 631a33e8e27ead32c85cc92a0a85849744d3b2960ef9675736d54288267ed2fa SHA512 557aa7b9b143f2e4a2249881a98c753035962bc5d9222241e6b4fe86aab8642986aa9db7ca6fc2b2da8486f9294ff30c4c2edfa0222ba95d9216ed2d0e00c114 WHIRLPOOL f51ba5c3430e9a8a11d8eacab3b6121c730e4a437286b88f743fc2521bf1941a889d5274dd4aa7f4fe283595b5ac29a8a35735d873eedc94505455178d167536
+EBUILD agda-lib-ffi-0.0.2-r2.ebuild 733 SHA256 b2c2291fcf1e77c4eed8cb686bb4d8f43eb7971293da82ed4e556ea60ef189c9 SHA512 92182ff0f4ff71d3d6f67b2a01dd7a066d21a4c6054b3bd9e4333ed04741b781dc59b8e8e72a5a73b7d3e0e181b93adeb5f3f093ad746a243f38a01bdffdaec1 WHIRLPOOL 575baca9f51faf0712570d92086d1fc53154fc523d367d9c2b7485dbf1ec9f45063cf6c13cb614aeba18f0923c5596d54c52180e485840b3b1d76bba6535aa88
+EBUILD agda-lib-ffi-0.0.2.ebuild 656 SHA256 699897007bce45ad5e7053c66561bc7f9048a4fcd085a19a6b57b92c8578345e SHA512 08e7debee9a5de4091376447e0aa09186c37878bd745cc6bf96d838f08e442b1b06125fa42c9c9e3e9f4133a4480a8add95fdd69c3938b4807b6238eb7a32140 WHIRLPOOL 1f4275673cdc808c2d2e440fd56db244785c0ed0776f5b87a9accaf03e9c416b2cc346a05788770c28c4c55c69d6afc426a4ec929e94be0a99e899ebe6a3eea7
+MISC ChangeLog 2667 SHA256 c27ef5495c17d1fc2f4100bc99dee02689c4923ff51ac23ff0339655942fabe3 SHA512 134e7cede68c9eda902d2d70fd5d6f84b5af45f13acb6b3dd08d9b8784ed4b365859eb9ac802485f70b771d3e22653ff50f676eae6ebda4ad9dbd42658194bfb WHIRLPOOL fed1d125fab253050c482392d14afc42eef24b0dbfa435751b8eb31c7480eca3c96de27c7669431a86a4c8fcc569495a4bca4fe2404c956e8970059e762e4d00
+MISC ChangeLog-2015 820 SHA256 a1856b3a4dac67c6d6ff50e3683b98ec0d7ca5951d59738dcae1887082ecad1e SHA512 6cca223a64c52c62fe358eb4fb2bbedaccca589e408372cbe797e3ad0079f268d3b27473f8e7e665e6fdc0e1334a04c13e673fd3fd0097b073d6b80b8f66a30c WHIRLPOOL eaad564045dc8a3c8a0fb6b4c85283aea4fcce948b4dc1eb12fa23106788da399a893394b8a63fe2e44201cd6e7616238fd991729d524e28f587224bff370455
+MISC metadata.xml 427 SHA256 3a5e586e7e761960a08899a6debd1af5b6e4f8cad19ca5b9ae5fde98d64008e5 SHA512 5dcdfd777392fbc8d215e263cf2ef8be706ebb4790bc79f551d19f25bd061a144751b5c4ee39b75cd974fd996239c70a9ca14bcacd512503d0189dec98faf30f WHIRLPOOL f93338bd8db6cfe7a8c32265e086cfe0fceaa39d634d6e1c4a39597bc302e8b1b62ec944ea15f39b77383e3b61ac787de984fc44e144b7523182416f1ed65246
diff --git a/sci-mathematics/agda-lib-ffi/agda-lib-ffi-0.0.2-r2.ebuild b/sci-mathematics/agda-lib-ffi/agda-lib-ffi-0.0.2-r2.ebuild
new file mode 100644
index 000000000000..44bf12e940e8
--- /dev/null
+++ b/sci-mathematics/agda-lib-ffi/agda-lib-ffi-0.0.2-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.5
+
+CABAL_FEATURES="lib"
+inherit haskell-cabal
+
+AGDA_PN="agda-stdlib"
+AGDA_PV="2.4.2.3"
+AGDA_P="${AGDA_PN}-${AGDA_PV}"
+
+DESCRIPTION="Auxiliary Haskell code used by Agda's standard library"
+HOMEPAGE="http://wiki.portal.chalmers.se/agda/"
+SRC_URI="https://github.com/agda/${AGDA_PN}/archive/${AGDA_PV}.tar.gz -> ${AGDA_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/ghc-6.10.4:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8
+"
+
+S="${WORKDIR}/${AGDA_P}/ffi"
+
+src_prepare() {
+ cabal_chdeps \
+ 'base >= 4.5.0.0 && < 4.9' 'base >= 4.5.0.0'
+}
diff --git a/sci-mathematics/agda-lib-ffi/agda-lib-ffi-0.0.2.ebuild b/sci-mathematics/agda-lib-ffi/agda-lib-ffi-0.0.2.ebuild
new file mode 100644
index 000000000000..6b8ed5ad076c
--- /dev/null
+++ b/sci-mathematics/agda-lib-ffi/agda-lib-ffi-0.0.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# ebuild generated by hackport 0.3.5
+
+CABAL_FEATURES="lib"
+inherit haskell-cabal
+
+AGDA_P="lib-0.7"
+
+DESCRIPTION="Auxiliary Haskell code used by Agda's standard library"
+HOMEPAGE="http://wiki.portal.chalmers.se/agda/"
+SRC_URI="http://www.cse.chalmers.se/~nad/software/${AGDA_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/ghc-6.10.4:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8
+"
+
+S="${WORKDIR}/${AGDA_P}/ffi"
+
+src_prepare() {
+ cabal_chdeps \
+ 'base >= 3.0.3.1 && < 4.7' 'base >= 3.0.3.1'
+}
diff --git a/sci-mathematics/agda-lib-ffi/metadata.xml b/sci-mathematics/agda-lib-ffi/metadata.xml
new file mode 100644
index 000000000000..adc5490ee507
--- /dev/null
+++ b/sci-mathematics/agda-lib-ffi/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </maintainer>
+ <longdescription>
+ Auxiliary Haskell code used by Agda's standard library.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">agda/agda-stdlib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/agda-stdlib/Manifest b/sci-mathematics/agda-stdlib/Manifest
new file mode 100644
index 000000000000..7851500504bb
--- /dev/null
+++ b/sci-mathematics/agda-stdlib/Manifest
@@ -0,0 +1,9 @@
+AUX 50agda-stdlib-gentoo.el 58 SHA256 e14091719568a863fdcdeb032b398b47cc5dc22d44c5552ade66daff2cd10946 SHA512 f45f0e59a1becd5d2b13b452219cc77b553dad9480a848ea62f276e106ab911ed1594e826fe487b886fe9b6e8aadcfde47de4fb1b0ab144ae98b6ac9eb385cfd WHIRLPOOL b03e7359f9576887f35167b208cb9e6c4b599afa9bf963a51fbd8b1c13d636b56d2b20d769a78f567f1c9f956e048185eb5dd45b6281931e1e0cb04d11b6adce
+AUX standard-library.agda-lib 55 SHA256 72951ff077635d93ac576039441cedad9e1d20cfcee881190e87b0ef80386a45 SHA512 b1e2cbffe4b99157661fe6f4685580c7524890735db0a20ae1942e076b00d0df13624f587ea7584319e5665484da63beb3e0e5c77226bdbe02a4a80fa33a17b4 WHIRLPOOL e5cee4e35151979f4c33d32b82195694ad621591fbe9d4b53a7281c6d595e42313721458be88ec7e6d3671cf3285070d01656c5219ed8296d80f09570527578d
+DIST agda-stdlib-2.4.2.5.tar.gz 253379 SHA256 9b46956e88a886cd08a8e6e83bea6115844860d7e927279abacc52e84b302b16 SHA512 b15ed5838916240c8602fe7a4bccddf43c71ab3a18ecb5a6dc85199b908e261b04cf794a4d93c90af0a9263a36603c392280639ace7fecead0c39269c2623302 WHIRLPOOL 6414b268a813309e7315d6e2ff9345efdb95d1559966f8755607045a685d4b7cf521750ac7efa8dd90001357d7c825d31589dfd2fe771d379f45d79739c7d66c
+DIST agda-stdlib-2.5.2.0.13.tar.gz 264701 SHA256 e7cffc2b8b168c3584b6d1e760d2b49850835444e4777caa69eb29b3677ef8bb SHA512 340a7b9cb15793cdbe99f558a32eaab3476b94b4d43d45bdc92c6b368197d075c977fd2f6ce0c5b0baf584289a2218b07dd030ad2b83f6d9e4bc7effee91eece WHIRLPOOL 9e888be7ef5e09d678f64b487cff457381d417db475e7445b47afb415b80fcd0d3cbef756d9a13de22d704c243d7222429d3fcf1e9cd28776b0a54f7d278b0d0
+EBUILD agda-stdlib-2.4.2.5.ebuild 1916 SHA256 4767ca7be43a85f3fd643c2194e23682bb99667793afb2608a2a640c6d31e7a4 SHA512 83c74eee1022fda2fcf36346aa3017d3f0a73994037187ef674723ccb90f761c37ed5d75294452d88074e8e44541452edccbc4bf5c3286147f3067923eabbdfa WHIRLPOOL 3e8418e25dfb3cf524a36b565c77bc127caf67713775ad18ced620a95245b3b3daec00d3dc4811714c5989e2b417ccbbf36bdcc675b47311d08f5ccba59f99af
+EBUILD agda-stdlib-2.5.2.0.13.ebuild 2177 SHA256 4b5c31fbf0c2faa71a88b70529fd94ab2d13f677ebc76c2e28149353c2a34214 SHA512 bf10ddd12a01feb400944e0b63d6575dc6c2cfd54f8651f333bb8577e03ef6ce714581dd5ffe077f906746babf65b511df0b1f6e87f5bbf51ce4e6e0e6dcfec5 WHIRLPOOL a3af1d00e8802330237c73cbe34435dc89fe627d019a099c5f88cb32a2c77341953b34decf62c8b0e9fc314a5c8159afdee19184981ea9f1a14b778ea857c22e
+MISC ChangeLog 3314 SHA256 75b1bf493e1f3bf3b2504a672a3b426b4c0abd8460ab35a75ed17aeec4bbc4ae SHA512 ae0b25132515e38d877955b5c1fc0f6b984903b9f28ba7ae5fff2ffc0d79894f9f3999c24cd74805614e780cc51d9817c33c2d4eb1cfce3cb3ec13adce4cbb93 WHIRLPOOL 94370a1c983bf5024686cfa99ac88e96b11e95ad65217fb499ab81f5b35bbf0dfbf2f1699a89ad494c744e5832ddc36bc51e749ee4b9cae8c963e8b9e5f7c2b4
+MISC ChangeLog-2015 2275 SHA256 723429902a29ca158b7dacce676b84e5485adf65bc082268afbf17eaff2a4e85 SHA512 4f2ea98a6e7b5906dd62418da0ffdc67b287716185ad7e0c29e8e935abe602959a92d5c4e242cd22e3eb2abdeceaf565eff99cadb38521fc9266e4c4d7e77f94 WHIRLPOOL 9596803784c97fa9c83c183056d6b47c11fe34626d4d58ceaa928b0ed35d73adf54fb1cde396173dcc7b5fe01aefda7bd6bcad96f13485d6c4ad062f1ff3dd2c
+MISC metadata.xml 658 SHA256 bf71547b6e8c89c3cea08016ee5e74068bc644c6b9d70d1d38682b678881defb SHA512 d1afae7ae946e667e796060d28ef006a47823de3b30c5e493dcba4a606a585b52308e4740b780f88fb7a9b69d1e534bc35514d31b030eed74b6439507e1239c3 WHIRLPOOL d47d2c43de46ade534e3da529846809bee56c38a41dbc69205e8bab89c7c44830f56f275d6134fd6abc8cfc6e541a33aa180c71d28d1ad5f39b938bce51e8ea3
diff --git a/sci-mathematics/agda-stdlib/agda-stdlib-2.4.2.5.ebuild b/sci-mathematics/agda-stdlib/agda-stdlib-2.4.2.5.ebuild
new file mode 100644
index 000000000000..f4be8e1439ec
--- /dev/null
+++ b/sci-mathematics/agda-stdlib/agda-stdlib-2.4.2.5.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CABAL_FEATURES="bin"
+inherit haskell-cabal elisp-common
+
+DESCRIPTION="Agda standard library"
+HOMEPAGE="http://wiki.portal.chalmers.se/agda/"
+SRC_URI="https://github.com/agda/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="profile +ffi"
+
+# filemanip is used in lib.cabal to make the GenerateEverything and
+# AllNonAsciiChars executables, so agda-stdlib does not require a subslot
+# dependency on filemanip.
+
+RDEPEND="~sci-mathematics/agda-${PV}:=[profile?]
+ >=dev-haskell/filemanip-0.3.6.2[profile?] <dev-haskell/filemanip-0.4[profile?]
+ >=dev-lang/ghc-6.12.1
+ ffi? ( sci-mathematics/agda-lib-ffi )
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8.0.2
+"
+
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+ cabal-mksetup
+ eapply_user
+}
+
+src_compile() {
+ haskell-cabal_src_compile
+ "${S}"/dist/build/GenerateEverything/GenerateEverything \
+ || die "GenerateEverything failed"
+ local prof
+ use profile && prof="--ghc-flag=-prof"
+ agda +RTS -K1G -RTS ${prof} \
+ -i "${S}" -i "${S}"/src "${S}"/Everything.agda || die
+ # Although my agda-9999 build has
+ # /var/tmp/portage/sci-mathematics/agda-9999/work/agda-9999/dist/build/autogen/Paths_Agda.hs
+ # containing:
+ # datadir = "/usr/share/agda-9999/ghc-7.6.1"
+ # it fails without the --css option like:
+ # /usr/share/agda-9999/ghc-7.4.1/Agda.css: copyFile: does not exist
+ local cssdir=$(egrep 'datadir *=' "${S}/dist/build/autogen/Paths_lib.hs" | sed -e 's@datadir = \(.*\)@\1@')
+ agda --html -i "${S}" -i "${S}"/src --css="${cssdir}/Agda.css" "${S}"/README.agda || die
+}
+
+src_test() {
+ agda -i "${S}" -i "${S}"/src README.agda || die
+}
+
+src_install() {
+ insinto usr/share/agda-stdlib
+ insopts --preserve-timestamps
+ doins -r src/*
+ dodoc -r html/*
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
+}
diff --git a/sci-mathematics/agda-stdlib/agda-stdlib-2.5.2.0.13.ebuild b/sci-mathematics/agda-stdlib/agda-stdlib-2.5.2.0.13.ebuild
new file mode 100644
index 000000000000..e1dcba466e3a
--- /dev/null
+++ b/sci-mathematics/agda-stdlib/agda-stdlib-2.5.2.0.13.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CABAL_FEATURES="bin"
+inherit haskell-cabal elisp-common
+
+## shared with sci-mathematics/agda
+# upstream does not maintain version ordering:
+# https://github.com/agda/agda-stdlib/releases
+# 0.11 -> 2.5.0.20160213 -> 2.5.0.20160412 -> 0.12 -> 0.13
+# As Agda-stdlib is tied to Agda version we encode
+# both versions in gentoo version.
+##
+MY_UPSTREAM_AGDA_STDLIB_V="0.13"
+MY_GENTOO_AGDA_STDLIB_V="${PV}.${MY_UPSTREAM_AGDA_STDLIB_V}"
+MY_UPSTREAM_AGDA_V="${PV%.${MY_UPSTREAM_AGDA_STDLIB_V}}"
+
+DESCRIPTION="Agda standard library"
+HOMEPAGE="http://wiki.portal.chalmers.se/agda/"
+SRC_URI="https://github.com/agda/${PN}/archive/v${MY_UPSTREAM_AGDA_STDLIB_V}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="profile +ffi"
+
+RDEPEND=">=sci-mathematics/agda-${MY_UPSTREAM_AGDA_V}:=[profile?]
+ ffi? ( sci-mathematics/agda-lib-ffi )
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.16.0
+ >=dev-haskell/filemanip-0.3.6.2[profile?] <dev-haskell/filemanip-0.4[profile?]
+ >=dev-lang/ghc-7.6.3
+"
+
+S=${WORKDIR}/${PN}-${MY_UPSTREAM_AGDA_STDLIB_V}
+
+src_compile() {
+ haskell-cabal_src_compile
+ "${S}"/dist/build/GenerateEverything/GenerateEverything \
+ || die "GenerateEverything failed"
+ local prof
+ use profile && prof="--ghc-flag=-prof"
+ agda +RTS -K1G -RTS ${prof} \
+ -i "${S}" -i "${S}"/src "${S}"/Everything.agda || die
+ # Although my agda-9999 build has
+ # /var/tmp/portage/sci-mathematics/agda-9999/work/agda-9999/dist/build/autogen/Paths_Agda.hs
+ # containing:
+ # datadir = "/usr/share/agda-9999/ghc-7.6.1"
+ # it fails without the --css option like:
+ # /usr/share/agda-9999/ghc-7.4.1/Agda.css: copyFile: does not exist
+ local cssdir=$(egrep 'datadir *=' "${S}/dist/build/autogen/Paths_lib.hs" | sed -e 's@datadir = \(.*\)@\1@')
+ agda --html -i "${S}" -i "${S}"/src --css="${cssdir}/Agda.css" "${S}"/README.agda || die
+}
+
+src_test() {
+ agda -i "${S}" -i "${S}"/src README.agda || die
+}
+
+src_install() {
+ insinto usr/share/agda-stdlib
+ insopts --preserve-timestamps
+ doins -r src/*
+ dodoc -r html/*
+ doins "${FILESDIR}/standard-library.agda-lib"
+}
diff --git a/sci-mathematics/agda-stdlib/files/50agda-stdlib-gentoo.el b/sci-mathematics/agda-stdlib/files/50agda-stdlib-gentoo.el
new file mode 100644
index 000000000000..62264a4451a0
--- /dev/null
+++ b/sci-mathematics/agda-stdlib/files/50agda-stdlib-gentoo.el
@@ -0,0 +1 @@
+(setq agda2-include-dirs '("." "/usr/share/agda-stdlib"))
diff --git a/sci-mathematics/agda-stdlib/files/standard-library.agda-lib b/sci-mathematics/agda-stdlib/files/standard-library.agda-lib
new file mode 100644
index 000000000000..7cd8525ff7bd
--- /dev/null
+++ b/sci-mathematics/agda-stdlib/files/standard-library.agda-lib
@@ -0,0 +1,2 @@
+name: standard-library
+include: /usr/share/agda-stdlib
diff --git a/sci-mathematics/agda-stdlib/metadata.xml b/sci-mathematics/agda-stdlib/metadata.xml
new file mode 100644
index 000000000000..5cb285fc8d71
--- /dev/null
+++ b/sci-mathematics/agda-stdlib/metadata.xml
@@ -0,0 +1,21 @@
+<?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>
+ <maintainer type="project">
+ <email>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </maintainer>
+ <longdescription lang="en">
+ Agda standard library.
+</longdescription>
+ <use>
+ <flag name="ffi">Install agda-lib-ffi for compilation using the MAlonzo backend</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">agda/agda-stdlib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/agda/Manifest b/sci-mathematics/agda/Manifest
new file mode 100644
index 000000000000..e8ee6cff1b76
--- /dev/null
+++ b/sci-mathematics/agda/Manifest
@@ -0,0 +1,9 @@
+AUX 50agda2-gentoo.el 317 SHA256 043797b8766a610c08a5aa10b4ea46b955f208b851f0baea4ba4dbff74fb3417 SHA512 55b7438896cb66b4b32b0ba0d9468bb2496df1f63a78f3f4b4e19cc038018605c9cbd7880d2be1b40d6d1509ac6df20304cdc8c2ccde69e89777acfc65a1ce8e WHIRLPOOL cba0b37c78d2e409081f90d7d68a2b5c21ad8cb79f51ff364c8ee9107c9f42a229d60b195a984acfcc45a9638b04bac0371e9eea4ef2bde1680983a85832329a
+AUX agda-2.4.2.5-hashtables.patch 558 SHA256 e6a3fad604bd3908eae84b259a5c23c767101af0ee54f1d148f367f100b20115 SHA512 0297fc4605db3dc11f08ec068cfdce908d273c6d14f472e4d00b4416a8e5f671b3b77d4e0cb671671bafd07b39ec46e72eab6cab972145199b25b3c4cfb0b3a6 WHIRLPOOL ce15e62578cae8e3d6f218e12633cb0d695833195d3aaa27259745f6c5a1478426cc92a2be8c554515dcd2a83aca4e2d8f50063b805676b7e76d245e99e8ce69
+DIST Agda-2.4.2.5.tar.gz 1031427 SHA256 959658a372d93b735d92191b372d221461026c98de4f92e56d198b576dfb67ee SHA512 c2e090a42f699200854c20dad868b4b67e99107f0cdbba20ed268f4618fcf80068ee31db37e4b6637f73128d9f652ef9276d8f7adea54628da759d79f5e4f4a2 WHIRLPOOL dd2d579242b395835a25910409df1eacaa5c7253a43d7cd6fbeb51146df5252ef2f255d063d15c5cc6bd3fab9e568a60b798539c4f73747411f31919970dee1e
+DIST Agda-2.5.2.tar.gz 1240885 SHA256 d812cec3bf7f03c4b27248572475c7e060154102771a8434cc11ba89f5691439 SHA512 39ec73316eb7409f7f2618e86a9a3a2c420c93470bf46a1c37a4c4753c6c831d2d6da9ba007086ddee9defd481a695bf142a0a7d360dfa01bdb1fb92467af164 WHIRLPOOL b85abca763117f8216dac5055ada3d8fd46d0efb7ed5bc32d7b491416c74213741822c798dbabdf227bf420776ad32423eac7e06ffe74196381b1fd4886255c4
+EBUILD agda-2.4.2.5-r2.ebuild 4430 SHA256 edf1f52e5be8c2227101842dd822e31143c426a7f7dee1579a4b6335668d9948 SHA512 5af62713f088922724bd2356bb3fe9602d5af59a512b06eedbe2ee113858e7368830c8135aa7f10bc76502c69282e6151d9a18a4869f035f2ea098a5823f04ea WHIRLPOOL 7e8ee8029cfe126f078524443236fae65719441e1891c8fe0cc871f86a2ce5996c143e3de11c1965d327233197c19410cadda66a617e53a52937f74553c401e0
+EBUILD agda-2.5.2-r1.ebuild 5264 SHA256 9930e1d0fccedc03749a7acd16f173e76d1cfc06504fcf1e2530046b595a9354 SHA512 4c8e7b1cc863ee0df7924659772b3fb7fad5088514f4731ac33849eb9c3a5f9cf0871686775e595fbe841147dab96e1980f8155a6df1f8418b7498974120144d WHIRLPOOL 45fa2bbc2addb17636aabb665ff001871aedac05294823347e869c40b7de39126fa9cfbc30f0fffb9736358429b81045d7fa401e04c85d464a2840744c0973f2
+MISC ChangeLog 5291 SHA256 8d3adab1f7acbe83b609e88a69bc56b2211a9adc16c073d13284e3b816243eb2 SHA512 409335c1d73e02bfe5de7707062208aa43d483ee72ee08da9f86ea950ae29b584d1731da85e8f309c4d3f94987adce4eb4f8926951a5d9ec4b37a8c36405e295 WHIRLPOOL 5d684b0f50d088a8579379bc87699908d6ef3c411b4f769ace5b66138cfb1ed60c8824345e8cfd209116f56eec65ae2bffbdb58d9212e33e254439f417f9d142
+MISC ChangeLog-2015 6423 SHA256 af74d03a5c5906f77c2e59945fd47daf25e0d7a64940b1f40e92acb784da75fd SHA512 27c98a52d2852db59cd966285c6f60da11acad3c546a59ac1681c164aa3c6269a07a7547fa34af384bd3ace7819c40f5e0927ee9bd69947d6a08478a618ff19c WHIRLPOOL 564e5e34757d8282dcbf3ee751b7b60f6ba5efa82c3803b5948553fbe69ce0f013e46bd2305c72daad3fc129c1d3fea470eb7e5775da44bf762a39e1cf3c17bb
+MISC metadata.xml 907 SHA256 ed83e483c63850f224d6d7dd21a746524e15424b434b4b9e9c3be4999c365d9a SHA512 d48af119f929e739634165e1ece14ef2bf55eb996fd0852fd34783a18da04a156bf858b3f0a7ad3cd5c85e55c564bfb3e5552786161fd2ad66f86eb5d3d91426 WHIRLPOOL 1f323030980e834df9c7abd1fbdad038d3513a231813a1c59a6ab428f74e719b472c7f1559ace228eb03504a6aa3f22b61028a18e1edb4b8fa0f004ea8220e49
diff --git a/sci-mathematics/agda/agda-2.4.2.5-r2.ebuild b/sci-mathematics/agda/agda-2.4.2.5-r2.ebuild
new file mode 100644
index 000000000000..04d8026b58b3
--- /dev/null
+++ b/sci-mathematics/agda/agda-2.4.2.5-r2.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# ebuild generated by hackport 0.4.6.9999
+
+CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
+inherit haskell-cabal elisp-common
+
+MY_PN="Agda"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A dependently typed functional programming language and proof assistant"
+HOMEPAGE="http://wiki.portal.chalmers.se/agda/"
+SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="+cpphs +stdlib emacs"
+
+RDEPEND=">=dev-haskell/binary-0.7.2.1:=[profile?] <dev-haskell/binary-0.8:=[profile?]
+ >=dev-haskell/boxes-0.1.3:=[profile?] <dev-haskell/boxes-0.2:=[profile?]
+ >=dev-haskell/data-hash-0.2.0.0:=[profile?] <dev-haskell/data-hash-0.3:=[profile?]
+ >=dev-haskell/edit-distance-0.2.1.2:=[profile?] <dev-haskell/edit-distance-0.3:=[profile?]
+ >=dev-haskell/equivalence-0.2.5:=[profile?] <dev-haskell/equivalence-0.4:=[profile?]
+ >=dev-haskell/geniplate-mirror-0.6.0.6:=[profile?] <dev-haskell/geniplate-mirror-0.8:=[profile?]
+ >=dev-haskell/hashable-1.2.1.0:=[profile?] <dev-haskell/hashable-1.3:=[profile?]
+ >=dev-haskell/haskeline-0.7.1.3:=[profile?] <dev-haskell/haskeline-0.8:=[profile?]
+ >=dev-haskell/haskell-src-exts-1.16.0.1:=[profile?] <dev-haskell/haskell-src-exts-1.18:=[profile?]
+ >=dev-haskell/parallel-3.2.0.4:=[profile?] <dev-haskell/parallel-3.3:=[profile?]
+ >=dev-haskell/quickcheck-2.8:2=[profile?] <dev-haskell/quickcheck-2.9:2=[profile?]
+ >=dev-haskell/strict-0.3.2:=[profile?] <dev-haskell/strict-0.4:=[profile?]
+ >=dev-haskell/text-0.11.3.1:=[profile?] <dev-haskell/text-1.3:=[profile?]
+ >=dev-haskell/transformers-compat-0.3.3.3:=[profile?]
+ >=dev-haskell/unordered-containers-0.2.5.0:=[profile?] <dev-haskell/unordered-containers-0.3:=[profile?]
+ >=dev-haskell/void-0.5.4:=[profile?] <dev-haskell/void-0.9:=[profile?]
+ >=dev-haskell/xhtml-3000.2.1:=[profile?] <dev-haskell/xhtml-3000.3:=[profile?]
+ >=dev-haskell/zlib-0.4.0.1:=[profile?]
+ >=dev-lang/ghc-7.6.2:=
+ >=dev-haskell/hashtables-1.0.1.8:=[profile?] <dev-haskell/hashtables-1.3:=[profile?]
+ >=dev-haskell/mtl-2.1.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?]
+ >=dev-haskell/transformers-0.3:=[profile?] <dev-haskell/transformers-0.5:=[profile?]
+"
+RDEPEND+="
+ emacs? ( app-emacs/haskell-mode
+ virtual/emacs )
+"
+PDEPEND="stdlib? ( =sci-mathematics/agda-stdlib-${PV} )"
+DEPEND="${RDEPEND}
+ dev-haskell/alex
+ >=dev-haskell/cabal-1.16.0
+ dev-haskell/happy
+ cpphs? ( dev-haskell/cpphs )
+"
+RDEPEND+="!sci-mathematics/agda-executable"
+
+SITEFILE="50${PN}2-gentoo.el"
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-hashtables.patch
+
+ sed -e '/.*emacs-mode.*$/d' \
+ -i "${S}/${MY_PN}.cabal" \
+ || die "Could not remove agda-mode from ${MY_PN}.cabal"
+ sed -e '/^executable agda-mode$/a \ \ buildable: False' \
+ -i "${S}/${MY_PN}.cabal" \
+ || die "Could not remove agda-mode executable from ${MY_PN}.cabal"
+
+ cabal_chdeps \
+ 'zlib >= 0.4.0.1 && < 0.6.1' 'zlib >= 0.4.0.1' \
+ 'transformers-compat >= 0.3.3.3 && < 0.5' 'transformers-compat >= 0.3.3.3' \
+ 'build-tools: cpphs >= 1.19 && < 1.20' 'build-tools: cpphs >= 1.19' \
+ 'alex >= 3.1.0 && < 3.2' 'alex >= 3.1.0'
+}
+
+src_configure() {
+ haskell-cabal_src_configure \
+ $(cabal_flag cpphs cpphs)
+}
+
+src_compile() {
+ if use emacs; then
+ BYTECOMPFLAGS="-L ./src/data/emacs-mode"
+ elisp-compile src/data/emacs-mode/*.el \
+ || die "Failed to compile emacs mode"
+ fi
+ haskell-cabal_src_compile
+}
+
+src_test() {
+ export LD_LIBRARY_PATH="${S}/dist/build${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+
+ dist/build/agda/agda --test +RTS -M1g || die
+}
+
+src_install() {
+ local add="${ED}"/usr/share/"${P}/ghc-$(ghc-version)"
+
+ haskell-cabal_src_install
+
+ export LD_LIBRARY_PATH="${S}/dist/build${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+ # generate Primitive.agdai, emulate Setup.hs postinst phase
+ Agda_datadir="${add}" \
+ "${ED}"/usr/bin/agda "${add}"/lib/prim/Agda/Primitive.agda \
+ || die "Failed to build 'Primitive.agdai'"
+
+ if use emacs; then
+ elisp-install ${PN} src/data/emacs-mode/*.el \
+ || die "Failed to install emacs mode"
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
+ || die "Failed to install elisp site file"
+ fi
+}
+
+pkg_postinst() {
+ haskell-cabal_pkg_postinst
+ if use emacs; then
+ elisp-site-regen
+ fi
+}
+
+pkg_postrm() {
+ haskell-cabal_pkg_postrm
+ if use emacs; then
+ elisp-site-regen
+ fi
+}
diff --git a/sci-mathematics/agda/agda-2.5.2-r1.ebuild b/sci-mathematics/agda/agda-2.5.2-r1.ebuild
new file mode 100644
index 000000000000..dcdb851153f5
--- /dev/null
+++ b/sci-mathematics/agda/agda-2.5.2-r1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# ebuild generated by hackport 0.5.1
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal elisp-common
+
+MY_PN="Agda"
+MY_P="${MY_PN}-${PV}"
+
+## shared with sci-mathematics/agda-stdlib
+# upstream does not maintain version ordering:
+# https://github.com/agda/agda-stdlib/releases
+# 0.11 -> 2.5.0.20160213 -> 2.5.0.20160412 -> 0.12
+# As Agda-stdlib is tied to Agda version we encode
+# both versions in gentoo version.
+##
+MY_UPSTREAM_AGDA_STDLIB_V="0.13"
+MY_GENTOO_AGDA_STDLIB_V="${PV}.${MY_UPSTREAM_AGDA_STDLIB_V}"
+
+DESCRIPTION="A dependently typed functional programming language and proof assistant"
+HOMEPAGE="http://wiki.portal.chalmers.se/agda/"
+SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="+cpphs debug uhc +stdlib emacs"
+
+RESTRICT=test # Unrecognized option: --test (did you mean any of --help --js --css ?)
+
+RDEPEND=">=dev-haskell/boxes-0.1.3:=[profile?] <dev-haskell/boxes-0.2:=[profile?]
+ >=dev-haskell/data-hash-0.2.0.0:=[profile?] <dev-haskell/data-hash-0.3:=[profile?]
+ >=dev-haskell/edisoncore-1.3.1.1:=[profile?] <dev-haskell/edisoncore-1.3.2:=[profile?]
+ >=dev-haskell/edit-distance-0.2.1.2:=[profile?] <dev-haskell/edit-distance-0.3:=[profile?]
+ >=dev-haskell/equivalence-0.2.5:=[profile?] <dev-haskell/equivalence-0.4:=[profile?]
+ >=dev-haskell/fail-4.9:=[profile?] <dev-haskell/fail-4.10:=[profile?]
+ >=dev-haskell/geniplate-mirror-0.6.0.6:=[profile?] <dev-haskell/geniplate-mirror-0.8:=[profile?]
+ >=dev-haskell/gitrev-1.2:=[profile?] <dev-haskell/gitrev-2.0:=[profile?]
+ >=dev-haskell/hashable-1.2.1.0:=[profile?] <dev-haskell/hashable-1.3:=[profile?]
+ >=dev-haskell/haskeline-0.7.1.3:=[profile?] <dev-haskell/haskeline-0.8:=[profile?]
+ >=dev-haskell/ieee754-0.7.8:=[profile?] <dev-haskell/ieee754-0.8:=[profile?]
+ >=dev-haskell/monadplus-1.4:=[profile?] <dev-haskell/monadplus-1.5:=[profile?]
+ >=dev-haskell/murmur-hash-0.1:=[profile?] <dev-haskell/murmur-hash-0.2:=[profile?]
+ >=dev-haskell/parallel-3.2.0.4:=[profile?] <dev-haskell/parallel-3.3:=[profile?]
+ >=dev-haskell/regex-tdfa-1.2.2:=[profile?] <dev-haskell/regex-tdfa-1.3:=[profile?]
+ >=dev-haskell/semigroups-0.18:=[profile?] <dev-haskell/semigroups-0.19:=[profile?]
+ >=dev-haskell/strict-0.3.2:=[profile?] <dev-haskell/strict-0.4:=[profile?]
+ >=dev-haskell/text-0.11.3.1:=[profile?] <dev-haskell/text-1.3:=[profile?]
+ >=dev-haskell/transformers-compat-0.3.3.3:=[profile?] <dev-haskell/transformers-compat-0.6:=[profile?]
+ >=dev-haskell/unordered-containers-0.2.5.0:=[profile?] <dev-haskell/unordered-containers-0.3:=[profile?]
+ >=dev-haskell/xhtml-3000.2.1:=[profile?] <dev-haskell/xhtml-3000.3:=[profile?]
+ >=dev-haskell/zlib-0.4.0.1:=[profile?]
+ >=dev-lang/ghc-7.10.1:=
+ >=dev-haskell/hashtables-1.0.1.8:=[profile?] <dev-haskell/hashtables-1.3:=[profile?]
+ >=dev-haskell/mtl-2.1.1:=[profile?] <dev-haskell/mtl-2.3:=[profile?]
+ uhc? ( >=dev-haskell/shuffle-0.1.3.3:=[profile?]
+ >=dev-haskell/uhc-light-1.1.9.2:=[profile?] <dev-haskell/uhc-light-1.2:=[profile?]
+ >=dev-haskell/uhc-util-0.1.6.7:=[profile?] <dev-haskell/uhc-util-0.1.7:=[profile?]
+ >=dev-haskell/uulib-0.9.20:=[profile?] )
+"
+RDEPEND+="
+ emacs? ( app-emacs/haskell-mode
+ virtual/emacs )
+"
+PDEPEND="stdlib? ( =sci-mathematics/agda-stdlib-${MY_GENTOO_AGDA_STDLIB_V} )"
+DEPEND="${RDEPEND}
+ dev-haskell/alex
+ >=dev-haskell/cabal-1.22.2.0
+ dev-haskell/happy
+ cpphs? ( dev-haskell/cpphs )
+"
+RDEPEND+="!sci-mathematics/agda-executable"
+
+SITEFILE="50${PN}2-gentoo.el"
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+ if ! use emacs; then
+ sed -e '/.*emacs-mode.*$/d' \
+ -i "${S}/${MY_PN}.cabal" \
+ || die "Could not remove agda-mode from ${MY_PN}.cabal"
+ fi
+}
+
+src_configure() {
+ haskell-cabal_src_configure \
+ $(cabal_flag cpphs cpphs) \
+ $(cabal_flag debug debug) \
+ $(cabal_flag uhc uhc)
+}
+
+src_compile() {
+ if use emacs; then
+ BYTECOMPFLAGS="-L ./src/data/emacs-mode"
+ elisp-compile src/data/emacs-mode/*.el \
+ || die "Failed to compile emacs mode"
+ fi
+ haskell-cabal_src_compile
+}
+
+src_test() {
+ export LD_LIBRARY_PATH="${S}/dist/build${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+
+ dist/build/agda/agda --test +RTS -M1g || die
+}
+
+src_install() {
+ local add="${ED}"/usr/share/"${P}/ghc-$(ghc-version)"
+
+ haskell-cabal_src_install
+
+ export LD_LIBRARY_PATH="${S}/dist/build${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+ # compile Agda.Primitive and Agda.Builtin modules, emulate Setup.hs postinst phase
+ Agda_datadir="${add}" \
+ "${ED}"/usr/bin/agda "${add}"/lib/prim/Agda/Primitive.agda \
+ || die "Failed to build 'Primitive.agdai'"
+ for file in "${add}"/lib/prim/Agda/Builtin/*.agda; do
+ Agda_datadir="${add}" \
+ "${ED}"/usr/bin/agda "${file}" \
+ || die "Failed to build '${file}'"
+ done
+
+ if use emacs; then
+ elisp-install ${PN} src/data/emacs-mode/*.el \
+ || die "Failed to install emacs mode"
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
+ || die "Failed to install elisp site file"
+ fi
+}
+
+pkg_postinst() {
+ haskell-cabal_pkg_postinst
+ if use emacs; then
+ elisp-site-regen
+ fi
+}
+
+pkg_postrm() {
+ haskell-cabal_pkg_postrm
+ if use emacs; then
+ elisp-site-regen
+ fi
+}
diff --git a/sci-mathematics/agda/files/50agda2-gentoo.el b/sci-mathematics/agda/files/50agda2-gentoo.el
new file mode 100644
index 000000000000..fd1367f727e6
--- /dev/null
+++ b/sci-mathematics/agda/files/50agda2-gentoo.el
@@ -0,0 +1,10 @@
+;;; agda site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'agda2-mode "agda2.el"
+ "Major mode for Agda files" t)
+(unless (assoc "\\.agda" auto-mode-alist)
+ (setq auto-mode-alist
+ (nconc '(("\\.agda" . agda2-mode)
+ ("\\.alfa" . agda2-mode)) auto-mode-alist)))
+
diff --git a/sci-mathematics/agda/files/agda-2.4.2.5-hashtables.patch b/sci-mathematics/agda/files/agda-2.4.2.5-hashtables.patch
new file mode 100644
index 000000000000..9bba347fa292
--- /dev/null
+++ b/sci-mathematics/agda/files/agda-2.4.2.5-hashtables.patch
@@ -0,0 +1,13 @@
+diff --git a/src/full/Agda/Utils/HashMap.hs b/src/full/Agda/Utils/HashMap.hs
+index 5e1da8b..7c34548 100644
+--- a/src/full/Agda/Utils/HashMap.hs
++++ b/src/full/Agda/Utils/HashMap.hs
+@@ -5,7 +5,7 @@ module Agda.Utils.HashMap
+ ) where
+
+ import Data.Hashable
+-import Data.HashMap.Strict as HashMap
++import Data.HashMap.Strict as HashMap (HashMap, filter, lookup, insert, delete, empty, insertWith, toList, adjust, union, unionWith, elems, fromList, (!), keys, map, unions, foldr)
+ import qualified Data.Maybe as Maybe
+
+ -- | Like 'Data.Map.Strict.mapMaybe'.
diff --git a/sci-mathematics/agda/metadata.xml b/sci-mathematics/agda/metadata.xml
new file mode 100644
index 000000000000..057c778e5810
--- /dev/null
+++ b/sci-mathematics/agda/metadata.xml
@@ -0,0 +1,23 @@
+<?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>
+<maintainer type="project">
+ <email>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </maintainer>
+<longdescription lang="en">
+ Agda is an interactive proof editor, or proof assistant. Its input language,
+ called Agda language (or simply Agda), is based on a constructive type
+ theory á la Martin-Löf, extended with dependent record types,
+ inductive definitions, module structures and a class hierarchy mechanism.
+</longdescription>
+<use>
+ <flag name="cpphs">Use cpphs instead of cpp.</flag>
+ <flag name="stdlib">Install the standard library.</flag>
+ <flag name="uhc">Add support for the uhc backend.</flag>
+</use>
+</pkgmetadata>
diff --git a/sci-mathematics/arb/Manifest b/sci-mathematics/arb/Manifest
new file mode 100644
index 000000000000..3d52f99f1884
--- /dev/null
+++ b/sci-mathematics/arb/Manifest
@@ -0,0 +1,4 @@
+AUX arb-2.11.1-pie-ftbs.patch 585 SHA256 4b4ab12d340c043de62b03c07da95ddfa17e45641d2b7efee42e25e85d42b77a SHA512 f147d61a6c9dfac57ded28a7265db9e6be76ebb8c9c787960d4dafc36ef703cebc42ba4a3ca8ef03ae3b81589d6a6a555a7ff381ddc9fd391466156677e0b4ff WHIRLPOOL 5b6c5a2516a52f80577f4f9ea15c467e342c8d532f3cbbb8ab47edd8383cbf140b1b635958d07d7acd85fafba08a55a9ff1edba9cce77226191b83325a435dd2
+DIST arb-2.11.1.tar.gz 1248835 SHA256 de37f008fd154bd4b9c3fd7f5b0f13928cd109358d01959a98245fe33d08bf63 SHA512 7a014da5208b55f20c7a3cd3eb51070b09ae107b04cbbd6329925780c2ab4d7c38e1fb3619f21456fa806939818370fcae921f59eb013661b6bdd3d0971e3353 WHIRLPOOL 12cd12786e60a5f37da6c1623468e2f8908af2dfa553bc50261f6735e0513ab34400da3e06d99128b2197add6d371a9c1ea732012ae3bd5ab3bd97de6a18520f
+EBUILD arb-2.11.1-r1.ebuild 1584 SHA256 d2245b0573c63f382c9c0ac32fc1cd72b031c96c8196951b65a006bae11716f7 SHA512 a489c8422518fdcb774e42b77c176301d64fc2c4d76ea8dc5865556ad2a1ce6ec562fed29e7c913c37fc69281d9b2d34fd62d2aaf5936e0fc0a6ed7679df0df8 WHIRLPOOL 6305135624be7e372fa75fa8320cee2de6c60a00d0fadd584fc79559ff2eb0a1db52fc29f9a54eca3737bca6e9975587b6eaeb87bc1278b2c4b6ff8dfdfce601
+MISC metadata.xml 756 SHA256 b85d966b5602cd3f7fed761cdc0ea5a3e3f0cce572382efaed26e2b5aa8a18b1 SHA512 843e473b1cb261c97f817d2c003f632c973a67ba1d8cfe188a40f41cc89fe6167917e2b669768420a7c7c88b19f5b4b68ba4529ab73e373c6696786ecfad11b6 WHIRLPOOL de90f607a88d279419d5953c34beae7ff9a15f2048f91521ace6878481691799b5fa954a9de246957c373f51494c23f32f6df54ad190c1d90e4429dcad416343
diff --git a/sci-mathematics/arb/arb-2.11.1-r1.ebuild b/sci-mathematics/arb/arb-2.11.1-r1.ebuild
new file mode 100644
index 000000000000..88e262a3d9fd
--- /dev/null
+++ b/sci-mathematics/arb/arb-2.11.1-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="C library for arbitrary-precision interval arithmetic"
+HOMEPAGE="http://fredrikj.net/arb/"
+SRC_URI="https://github.com/fredrik-johansson/arb/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0/2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-macos"
+IUSE="static-libs"
+
+RDEPEND="
+ dev-libs/gmp:0=
+ dev-libs/mpfr:0=
+ >=sci-mathematics/flint-2.5.0:=
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-pie-ftbs.patch )
+
+src_configure() {
+ # Not an autoconf configure script.
+ # Note that it appears to have been cloned from the flint configure script
+ # and that not all the options offered are valid.
+ tc-export CC AR CXX
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ --with-flint="${EPREFIX}/usr" \
+ --with-gmp="${EPREFIX}/usr" \
+ --with-mpfr="${EPREFIX}/usr" \
+ $(use_enable static-libs static) \
+ CFLAGS="${CPPFLAGS} ${CFLAGS}" || die
+}
+
+src_compile() {
+ emake verbose
+}
+
+src_test() {
+ # Have to set the library path otherwise a previous install of libarb may be loaded.
+ # This is in part a consequence of setting the soname/installnae I think.
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ DYLD_LIBRARY_PATH="${S}" emake AT= QUIET_CC= QUIET_CXX= QUIET_AR= check
+ else
+ LD_LIBRARY_PATH="${S}" emake AT= QUIET_CC= QUIET_CXX= QUIET_AR= check
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" install
+ use static-libs || prune_libtool_files --all
+ dodoc README.md
+}
diff --git a/sci-mathematics/arb/files/arb-2.11.1-pie-ftbs.patch b/sci-mathematics/arb/files/arb-2.11.1-pie-ftbs.patch
new file mode 100644
index 000000000000..b2db6b2a294c
--- /dev/null
+++ b/sci-mathematics/arb/files/arb-2.11.1-pie-ftbs.patch
@@ -0,0 +1,17 @@
+Description: Use -r instead of -Wl,-r to fix FTBFS with PIE enabled
+Author: Logan Rosen
+Forwarded: yes
+
+diff --git a/Makefile.subdirs b/Makefile.subdirs
+index 3dc757d..f0ec923 100644
+--- a/Makefile.subdirs
++++ b/Makefile.subdirs
+@@ -52,7 +52,7 @@ $(BUILD_DIR)/$(MOD_DIR)_%.o: %.c
+ $(QUIET_CC) $(CC) $(CFLAGS) $(INCS) -c $< -o $@ -MMD -MP -MF "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$@"
+
+ $(MOD_LOBJ): $(LOBJS)
+- $(QUIET_CC) $(CC) $(ABI_FLAG) -Wl,-r $^ -o $@ -nostdlib
++ $(QUIET_CC) $(CC) $(ABI_FLAG) -r $^ -o $@ -nostdlib
+
+ -include $(LOBJS:.lo=.d)
+
diff --git a/sci-mathematics/arb/metadata.xml b/sci-mathematics/arb/metadata.xml
new file mode 100644
index 000000000000..5830a1d45f91
--- /dev/null
+++ b/sci-mathematics/arb/metadata.xml
@@ -0,0 +1,18 @@
+<?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">
+ Arb is a C library for arbitrary-precision interval arithmetic,
+ using a midpoint-radius representation (“ball arithmetic”). It
+ supports real and complex numbers, polynomials, power series,
+ matrices, and evaluation of many transcendental functions. All
+ operations are done with automatic, rigorous error bounds.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">fredrik-johansson/arb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/axiom/Manifest b/sci-mathematics/axiom/Manifest
new file mode 100644
index 000000000000..548fedc5175c
--- /dev/null
+++ b/sci-mathematics/axiom/Manifest
@@ -0,0 +1,8 @@
+AUX axiom-200711-gcl-configure.patch 445 SHA256 1e56780436eae1f9c31e55ac3c2903a62837cd957fe323f995922e2a4629c4f9 SHA512 fe03fccc6d165e2bc6785c39aa0b3fa5d44761054931162e7b96667e1ad29c941bbb38f1eabb81a638eee3cefeeeb8bf3b31e69f3f2a8f3871fa192466bfda64 WHIRLPOOL b1e183648dee06bea1dbcafb1d28c2fe8ce017d1638dbc6dad30d8ada5aa129d105aa9da68a1d32580528df084f1ddaf0370ad75e84a05256244da94b478dbaf
+AUX noweb-2.9-insecure-tmp-file.Makefile.patch 439 SHA256 3c4b5bea61620cb545e576d2e82dd8daa0478fc6c40ae0a93dbdac432aa9531d SHA512 2f13d849e01a68b2c04a978889755fd8d5160d929dae3ccb398015e40044cfcf2f40eca4824171fc65cec381f956c947886762383adddeeff541eb5f509f0425 WHIRLPOOL 5199ccd1f53e8500efe13a705e1595c73bd6410c9b64899c3934c3556149f6b930abc0be5d83b69124476a9643769e42b0a5da2c7444dd79606cf94d59be83da
+AUX noweb-2.9-insecure-tmp-file.patch.input 4819 SHA256 68bf232fd91b94fc9d08373d079afcb890a6af6991373da81089560ce21889a9 SHA512 90c7407823d47e89ee1268a1f4d06c13439d0fa77aee23f0db7e5875c7535f1083dedde622d9b1f5586232389bcebd1353f7e2dd0535fec5d039af8eddde9b9d WHIRLPOOL 8ccc85588383bf658541fe0c9a637975b3cbe3dcc2cf8bdc4de7df02d3e5932214e1b9097c6549c1a43cd87f3ce24ce5a4c4b12418516046e0a769b65cd67601
+DIST axiom-may2008-src.tgz 207172456 SHA256 c91cc50a9a6b9d66b398f8b96236249db72b6ce280d51c188db1805a4534380e SHA512 36f137622a3179aa8c84ddbe6506681a67e1f8d69db430777c3eb6aca0da24c601b2c63f586ead838f74ae3b2043d46b63d742e1dd1191fbf3a10affb958662c WHIRLPOOL 5e4d79ddfa48039dc7940e3b9b99807689fa55f0de34d446d505455820d3150fada9c1a0dac5ca073657c80714c8788d8b2c7573c482d1e756f640299387128a
+EBUILD axiom-200805.ebuild 2856 SHA256 324b82e76862569f15c9cb73fd431f5dd8ec6746ec7da498ad6d4969dd09a055 SHA512 c0b6c81d3fef16810db118700e10008703d2a3ca6eea3ff8b741a335d0a351ba82463c2f4d8c5b83cb0816e8decaa6638b91bfd5c96e6090f82a93bb6bd029d0 WHIRLPOOL 2f8d6170fe2e9795a6147f0ebc3d31535aabc25773189c845ec4848a1e13f4ec8c65c5c01a5141735d0c96bd9d1f56d9f481315662b49801624c59094a9c9338
+MISC ChangeLog 2574 SHA256 891d8d30c56bd32ec85b78edb9a0ffdb81c2f199a7ca9e81bb623d93f4fc5876 SHA512 9546e8663e3e2d466293eedeedc3412e536d33019c43e728c83087bb71a9b6a90dfb19e8b3af41351500c7509ebeeb5084e6a2f02ed5a404a86a04c844cc5f4e WHIRLPOOL 4c5c938d9c4e1dbc791df36f946893d5b82a30065726f0ec606081ec59684c6d3887e71377d5e63e7316b901efc296a5bcf1134939d98afd6a203185c71a0f14
+MISC ChangeLog-2015 3894 SHA256 40443558447fd878b4fb783d352773bf692e7508acd5565d981a7f26d386ba42 SHA512 ee2097c0140c16dbb6662744d62a7ea7a63ef77e83cc0f4a64c0b3eb96ad41cfea14da3e21494bcb9d6ac9823d6a2b965b861de070c89a2568e4bbcca747ba6d WHIRLPOOL ca88778553d80c4261bdb9c9d8b0ff1c7294b74bc206c318ab76de643d23cc8c2a6087bffa2aafe8c1e4bbdb7824003f13db233b01e553136264b0fdfbfbda0f
+MISC metadata.xml 269 SHA256 a871d7ff10784843cabcb9dc241de96e6fce441b85b5985450dfa226a550d776 SHA512 ecf9121172cdf04793bdbf6684060c7f15fb2a25606e53d8fc7dbc78efe24e264affa600c1ee3106ce8216b7093dff66eced3f78dd6ca7bd6ee589d1c7912cd6 WHIRLPOOL 8b7ba32ab675a9464103d73a803eeb3dae79f7f2ac90fea364a7d003efd6cc4db9c5e098bea367c269fc27e239a6ece61f3e9ce9a0657471197395f27b87bb36
diff --git a/sci-mathematics/axiom/axiom-200805.ebuild b/sci-mathematics/axiom/axiom-200805.ebuild
new file mode 100644
index 000000000000..ff9ea32b60ba
--- /dev/null
+++ b/sci-mathematics/axiom/axiom-200805.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils multilib flag-o-matic
+
+DESCRIPTION="Axiom is a general purpose Computer Algebra system"
+HOMEPAGE="http://axiom.axiom-developer.org/"
+SRC_URI="http://www.axiom-developer.org/axiom-website/downloads/${PN}-may2008-src.tgz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# NOTE: Do not strip since this seems to remove some crucial
+# runtime paths as well, thereby, breaking axiom
+RESTRICT="strip"
+
+DEPEND="virtual/latex-base
+ x11-libs/libXaw
+ sys-apps/debianutils
+ sys-process/procps"
+RDEPEND=""
+
+S="${WORKDIR}"/${PN}
+
+pkg_setup() {
+ # for 2.6.25 kernels and higher we need to have
+ # /proc/sys/kernel/randomize_va_space set to somthing other
+ # than 2, otherwise gcl fails to compile (see bug #186926).
+ local current_setting=$(/sbin/sysctl kernel.randomize_va_space 2>/dev/null | cut -d' ' -f3)
+ if [[ ${current_setting} == 2 ]]; then
+ echo
+ eerror "Your kernel has brk randomization enabled. This will"
+ eerror "cause axiom to fail to compile *and* run (see bug #186926)."
+ eerror "You can issue:"
+ eerror
+ eerror " /sbin/sysctl -w kernel.randomize_va_space=1"
+ eerror
+ eerror "as root to turn brk randomization off temporarily."
+ eerror "However, when not using axiom you may want to turn"
+ eerror "brk randomization back on via"
+ eerror
+ eerror " /sbin/sysctl -w kernel.randomize_va_space=2"
+ eerror
+ eerror "since it results in a less secure kernel."
+ die "Kernel brk randomization detected"
+ fi
+}
+
+src_prepare() {
+ cp "${FILESDIR}"/noweb-2.9-insecure-tmp-file.patch.input \
+ "${S}"/zips/noweb-2.9-insecure-tmp-file.patch \
+ || die "Failed to fix noweb"
+ cp "${FILESDIR}"/${PN}-200711-gcl-configure.patch \
+ "${S}"/zips/gcl-2.6.7.configure.in.patch \
+ || die "Failed to fix gcl-2.6.7 configure"
+ epatch "${FILESDIR}"/noweb-2.9-insecure-tmp-file.Makefile.patch
+
+ # lots of strict-aliasing badness
+ append-flags -fno-strict-aliasing
+}
+
+src_compile() {
+ # use gcl 2.6.7
+ sed -e "s:GCLVERSION=gcl-2.6.8pre$:GCLVERSION=gcl-2.6.7:" \
+ -i Makefile.pamphlet Makefile \
+ || die "Failed to select proper gcl"
+
+ # fix libXpm.a location
+ sed -e "s:X11R6/lib:$(get_libdir):g" -i Makefile.pamphlet \
+ || die "Failed to fix libXpm lib paths"
+
+ # Let the fun begin...
+ AXIOM="${S}"/mnt/linux emake -j1
+}
+
+src_install() {
+ emake DESTDIR="${D}"/opt/axiom COMMAND="${D}"/opt/axiom/mnt/linux/bin/axiom install
+
+ mv "${D}"/opt/axiom/mnt/linux/* "${D}"/opt/axiom \
+ || die "Failed to mv axiom into its final destination path."
+ rm -fr "${D}"/opt/axiom/mnt \
+ || die "Failed to remove old directory."
+
+ dodir /usr/bin
+ dosym /opt/axiom/bin/axiom /usr/bin/axiom
+
+ sed -e "2d;3i AXIOM=/opt/axiom" \
+ -i "${D}"/opt/axiom/bin/axiom \
+ || die "Failed to patch axiom runscript!"
+
+ dodoc changelog readme faq
+}
diff --git a/sci-mathematics/axiom/files/axiom-200711-gcl-configure.patch b/sci-mathematics/axiom/files/axiom-200711-gcl-configure.patch
new file mode 100644
index 000000000000..a5ecb58d7cc7
--- /dev/null
+++ b/sci-mathematics/axiom/files/axiom-200711-gcl-configure.patch
@@ -0,0 +1,11 @@
+--- configure 2008-02-01 09:06:15.000000000 -0500
++++ configure.new 2008-02-01 09:03:18.000000000 -0500
+@@ -1711,7 +1711,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`${AWK} '{print $3}' /etc/.relid'`
++ system=MP-RAS-`${AWK} '{print $3}' '/etc/.relid'`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
diff --git a/sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.Makefile.patch b/sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.Makefile.patch
new file mode 100644
index 000000000000..b8cd40ea03bb
--- /dev/null
+++ b/sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.Makefile.patch
@@ -0,0 +1,10 @@
+--- Makefile~ 2005-09-05 19:50:31.000000000 +0100
++++ Makefile 2006-02-17 17:08:31.000000000 +0000
+@@ -85,6 +85,7 @@
+ ${PATCH} <${ZIPS}/noweb.modules.c.patch ; \
+ cd ${OBJ}/noweb/src ; \
+ ${PATCH} <${ZIPS}/noweb.src.Makefile.patch ; \
++ ${PATCH} -p0 <${ZIPS}/noweb-2.9-insecure-tmp-file.patch ; \
+ ./awkname ${AWK} ; \
+ ${ENV} ${MAKE} BIN=${MNT}/${SYS}/bin/lib LIB=${MNT}/${SYS}/bin/lib \
+ MAN=${MNT}/${SYS}/bin/man \
diff --git a/sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.patch.input b/sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.patch.input
new file mode 100644
index 000000000000..00288a8a3133
--- /dev/null
+++ b/sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.patch.input
@@ -0,0 +1,168 @@
+--- awkname
++++ awkname
+@@ -5,7 +5,7 @@
+ esac
+
+ rc=0
+-new=/tmp/$$.new; old=/tmp/$$.old
++new=$(tempfile -p new); old=$(tempfile -p old)
+
+ for file in lib/emptydefn lib/unmarkup lib/toascii \
+ awk/noidx awk/totex awk/tohtml awk/noindex \
+--- awk/totex.nw
++++ awk/totex.nw
+@@ -24,7 +24,7 @@
+ @
+ On an ugly system, we have to put it in a file.
+ <<invoke awk program using file>>=
+-awkfile=/tmp/totex$$.awk
++awkfile=$(tempfile -p totex)
+ trap 'rm -f $awkfile; exit 1' 0 1 2 15 # clean up files
+ cat > $awkfile << 'EOF'
+ <<awk program for conversion to {\TeX}>>
+--- lib/toascii
++++ lib/toascii
+@@ -7,9 +7,9 @@
+ *) echo "This can't happen -- $i passed to toascii" 1>&2 ; exit 1 ;;
+ esac
+ done
+-awkfile="tmp/awk$$.tmp"
+-textfile="/tmp/text$$.tmp"
+-tagsfile="/tmp/tags$$.tmp"
++awkfile=$(tempfile -p awk -s .tmp)
++textfile=$(tempfile -p text -s .tmp)
++tagsfile=$(tempfile -p tags -s .tmp)
+ export awkfile textfile tagsfile
+ trap 'rm -f $awkfile $textfile $tagsfile' 0 1 2 10 14 15
+ nawk 'BEGIN { textfile=ENVIRON["textfile"]
+--- shell/cpif
++++ shell/cpif
+@@ -17,7 +17,7 @@
+ 0) echo 'Usage: '`basename $0`' [ -eq -ne ] file...' 1>&2; exit 2
+ esac
+
+-new=/tmp/$$
++new=$(tempfile)
+ trap 'rm -f $new; exit 1' 1 2 15 # clean up files
+
+ cat >$new
+--- shell/nonu
++++ shell/nonu
+@@ -2,7 +2,7 @@
+ LIB=/usr/public/pkg/noweb/lib
+ # attempt to convert nuweb to noweb using sam
+
+-tmp=/tmp/nonu$$
++tmp=$(tempfile -p nonu)
+ trap '/bin/rm -f $tmp; exit 1' 1 2 15 # clean up files
+ cp $1 $tmp || exit 1
+
+--- shell/roff.nw
++++ shell/roff.nw
+@@ -80,7 +80,7 @@
+ other, and quoting each quote is ugly. The pragmatic solution is to
+ copy the awk program into a temporary file, using a shell here-document.
+ <<invoke awk program>>=
+-awkfile="/tmp/noweb$$.awk"
++awkfile=$(tempfile -p noweb -s .awk)
+ trap 'rm -f $awkfile' 0 1 2 10 14 15
+ cat > $awkfile << 'EOF'
+ <<awk program>>
+@@ -662,12 +662,13 @@
+
+ base="`basename $1 | sed '/\./s/\.[^.]*$//'`"
+ tagsfile="$base.nwt"
++tmpfile=$(tempfile -p tags)
+ (echo ".so $macrodir/tmac.w"
+ if [ -r "$tagsfile" ]; then
+- cp $tagsfile /tmp/tags.$$
++ cp $tagsfile $tmpfile
+ $AWK '<<action for [[tags]] line>>
+- <<functions>>' /tmp/tags.$$
+- rm -f /tmp/tags.$$
++ <<functions>>' $tmpfile
++ rm -f $tmpfile
+ fi
+ cat "$@") |
+ ($ROFF $opts 2>$tagsfile)
+--- shell/noroff
++++ shell/noroff
+@@ -35,9 +35,10 @@
+
+ base="`basename $1 | sed '/\./s/\.[^.]*$//'`"
+ tagsfile="$base.nwt"
++tmpfile=$(tempfile -p tags)
+ (echo ".so $macrodir/tmac.w"
+ if [ -r "$tagsfile" ]; then
+- cp $tagsfile /tmp/tags.$$
++ cp $tagsfile $tmpfile
+ $AWK '{
+ if (sub(/^###TAG### / , "")) tags[$1] = $2
+ else if (sub(/^###BEGINCHUNKS###/, "")) printf ".de CLIST\n.CLISTBEGIN\n"
+@@ -88,8 +89,8 @@
+ # print str3
+ # print convquote(str3)
+ # }
+- function tag(s) { if (s in tags) return tags[s]; else return "???" }' /tmp/tags.$$
+- rm -f /tmp/tags.$$
++ function tag(s) { if (s in tags) return tags[s]; else return "???" }' $tmpfile
++ rm -f $tmpfile
+ fi
+ cat "$@") |
+ ($ROFF $opts 2>$tagsfile)
+--- shell/toroff
++++ shell/toroff
+@@ -9,7 +9,7 @@
+ exit 1;;
+ esac
+ done
+-awkfile="/tmp/noweb$$.awk"
++awkfile=$(tempfile -p noweb -s .awk)
+ trap 'rm -f $awkfile' 0 1 2 10 14 15
+ cat > $awkfile << 'EOF'
+ /^@begin docs 0$/ { if (delay) next }
+--- lib/toascii.nw
++++ lib/toascii.nw
+@@ -28,9 +28,9 @@
+ Also arranged here is a temporary file for storage of the awk program on an
+ ugly system, as discussed below.
+ <<arrange temporary files>>=
+-awkfile="tmp/awk$$.tmp"
+-textfile="/tmp/text$$.tmp"
+-tagsfile="/tmp/tags$$.tmp"
++awkfile=$(tempfile -p awk -s .tmp) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
++textfile=$(tempfile -p text -s .tmp) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
++tagsfile=$(tempfile -p tags -s .tmp) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
+ export awkfile textfile tagsfile
+ trap 'rm -f $awkfile $textfile $tagsfile' 0 1 2 10 14 15
+ @ %def textfile tagsfile awkfile
+--- shell/roff.mm
++++ shell/roff.mm
+@@ -214,7 +214,7 @@
+ .ADDLIST 1a
+ .PRINTLIST
+
+-awkfile="/tmp/noweb$$.awk"
++awkfile=$(tempfile -p noweb -s .awk) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
+ trap 'rm -f $awkfile' 0 1 2 10 14 15
+ cat > $awkfile \&<< 'EOF'
+ \c
+@@ -1628,14 +1628,15 @@
+ tagsfile="$base.nwt"
+ (echo ".so $macrodir/tmac.w"
+ if [ -r "$tagsfile" ]; then
+- cp $tagsfile /tmp/tags.$$
++ tagstemp=$(tempfile -p tags) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
++ cp $tagsfile $tagstemp
+ $AWK '\c
+ .USE "action for \*[BEGINCONVQUOTE]tags\*[ENDCONVQUOTE] line" 11c
+ \&
+ \c
+ .USE "functions" 8a
+-\&' /tmp/tags.$$
+- rm -f /tmp/tags.$$
++\&' $tagstemp
++ rm -f $tagstemp
+ fi
+ cat "$@") |
+ ($ROFF $opts 2>$tagsfile)
diff --git a/sci-mathematics/axiom/metadata.xml b/sci-mathematics/axiom/metadata.xml
new file mode 100644
index 000000000000..514f7304d513
--- /dev/null
+++ b/sci-mathematics/axiom/metadata.xml
@@ -0,0 +1,8 @@
+<?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>
+</pkgmetadata>
diff --git a/sci-mathematics/bertini/Manifest b/sci-mathematics/bertini/Manifest
new file mode 100644
index 000000000000..d0f5551b6eba
--- /dev/null
+++ b/sci-mathematics/bertini/Manifest
@@ -0,0 +1,5 @@
+DIST BertiniSource_v1.4.tar.gz 1827401 SHA256 61ce11b2714d1540311c1a8e3192ff92bfbd8fd85c357b554d22ab6cbe67f6a1 SHA512 bb53f8ed24a0f21e95b4e373be36039b69ea0ddb11ad8240bcf52ce64436a56c1f2057a5d733d017fdf68cfb3598a473e1f12b4659308890e2e2575b7d8143f6 WHIRLPOOL f832076f0c2277c35df28d7ed94476e1ec086c5fcb4a80e52fd3cd2d5fce79ecbc66606ba1cb0f71ca0fa6180c0e82e79b5cc85eb5949de64b6c9d8e2e8b7e6a
+EBUILD bertini-1.4.ebuild 1041 SHA256 0f6a63715c85f5156f4cf9a6f68357da77025e5c66d7753cb037e0d460e9391d SHA512 4757e0e9486c1878c51e0fafa101dbc71e2107ca872afbc16268b366b39c4a60c88e2d9a2e2b93c027cf06ec8e1136cd2ece12bdd913f73d669b26096269ba05 WHIRLPOOL 97c70916758afbd1ef9d5d1d7670049ca47aa2024dda6a92b4d91980d683911476e1b65d29c1085a953650075d349188fa482047aa2b91ed65db8dcc1b8c29cd
+MISC ChangeLog 2430 SHA256 b3a340e4efe92f7b3b33e1848d4f461268db2935e6e614d3731cdcae99a397d7 SHA512 85bf37e0d3910a01b74992683e6b58d7254bc3b5e2d64948edd03a82ebb64c81519aa85ac1ab259073ca123253bee4d528f3f7ec667376c5d6f46f82d1888c51 WHIRLPOOL 34f8904c80f9954d70327c8c6f695f8bc94b5f97ce4911467ac7467039d79d21c6aea42e2b7405a545c1a21d62da6a7d1049a0123ffd9e2183655e434ae585be
+MISC ChangeLog-2015 366 SHA256 d9ecd4284c2045754e9d954c05761c581cb77b865f3cfbbf0bc689c6ebe57185 SHA512 2cf11ebe1a982e85a6bc89cc7f45046bd15a69dd41f2881a3289b33bff5ac6c717a9e053059cc9c48406beaad6fc78ba4bcd973566a131ef654100f68fafad2e WHIRLPOOL 9d3f2247dcc8875876eb0583aab29e1b78b12826598fa6564602971110397241025db0318c3ee54b2c3de2a661c006bcf67b68b48102f0abc55d596dd0fcd559
+MISC metadata.xml 815 SHA256 759050f82cb66ec0ac30293e3bb4a286d46523a2ef108116b50ca040b43cf8e2 SHA512 552d4d83e494fdc984fc55924b287c45430381fe7ba7f90eb5ba0db5ecb0de68ed683fd57ac76ba0aca8488ed6b3c501608fecf0b94c35238b443a0a09081242 WHIRLPOOL 066493a4fdb26d4c1e9123f576c7fc8e0e50eea0014eb84205f4e4444371dca69dc7e4490eb9b177f71cd0b923e8374de57215736716cc9407c6f01c661b0cb8
diff --git a/sci-mathematics/bertini/bertini-1.4.ebuild b/sci-mathematics/bertini/bertini-1.4.ebuild
new file mode 100644
index 000000000000..8eb1c6cae69d
--- /dev/null
+++ b/sci-mathematics/bertini/bertini-1.4.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+MYP="BertiniSource_v${PV}"
+
+DESCRIPTION="Software for Numerical Algebraic Geometry"
+HOMEPAGE="http://bertini.nd.edu"
+
+SRC_URI="http://www3.nd.edu/~sommese/bertini/${MYP}.tar.gz"
+
+LICENSE="bertini"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples +optimization"
+DEPEND="
+ sys-devel/bison
+ sys-devel/flex
+"
+RDEPEND="
+ dev-libs/gmp
+ dev-libs/mpfr
+"
+
+S="${WORKDIR}/${MYP}/src"
+
+src_prepare() {
+ if ! use optimization; then
+ sed -i -e "s/\$(OPT)/ ${CXXFLAGS} ${LDFLAGS}/" Makefile
+ else
+ sed -i -e "s/\$(OPT)/ \$(OPT) ${LDFLAGS}/" Makefile
+ fi
+ sed -i -e "s/gcc/$(tc-getCC)/" Makefile
+}
+
+src_configure() {
+ :
+}
+
+src_compile() {
+ emake
+}
+
+src_install() {
+ dobin bertini
+ if use doc; then
+ dodoc "${WORKDIR}/${MYP}/BertiniUsersManual.pdf"
+ fi
+ if use examples; then
+ insinto "/usr/share/${PN}"
+ doins -r "${WORKDIR}/${MYP}/examples"
+ elog "Examples have been installed into /usr/share/${MYP}"
+ fi
+}
diff --git a/sci-mathematics/bertini/metadata.xml b/sci-mathematics/bertini/metadata.xml
new file mode 100644
index 000000000000..b7d09f96e255
--- /dev/null
+++ b/sci-mathematics/bertini/metadata.xml
@@ -0,0 +1,25 @@
+<?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>
+Bertini: Software for Numerical Algebraic Geometry
+
+Facts in brief:
+
+ Purpose: The numerical solution of systems of polynomial equations
+
+ Approach: Homotopy continuation.
+
+ Authors: Daniel J. Bates, Jonathan D. Hauenstein, Andrew J. Sommese, Charles W. Wampler
+
+ Background: Bertini is a general-purpose solver, written in C, that was
+ created for research about polynomial continuation.
+</longdescription>
+<use>
+ <flag name="optimization">Accept upstream's choices for -O option.</flag>
+</use>
+</pkgmetadata>
diff --git a/sci-mathematics/calc/Manifest b/sci-mathematics/calc/Manifest
new file mode 100644
index 000000000000..474e0b96966c
--- /dev/null
+++ b/sci-mathematics/calc/Manifest
@@ -0,0 +1,13 @@
+AUX 2.12.4.0-ldflags.patch 4026 SHA256 64b84a9d0d89816c6a02409524ee826ae3a84fe216693e4c32b6bbe0a2df7189 SHA512 d0e6ca66504962e9c6b037a598b06239475c8a1b2e9152945ebec70be60f3b4e43dfbec95ac46bcc15d79ea5f81622a499807d523ee3f4ffb2b1134a00829433 WHIRLPOOL b3345db3a66d6a108389bd3cfbf637434ad996105e2af6993e9ab9b32cc674623f925e0d558d6a64da2020352b8c62f8f1523cb0fc829c0700ea8b8853bb7e2a
+AUX calc-2.12.2.2-libdir-fix.patch 570 SHA256 e3728498caa9c65d01c43c40896b82849e6845b74613fbe0b1d03f3502fb33c7 SHA512 ad15beeb3a52682e8119582b67abbecbe6de0aeac207b5cc88d085d986c34617b09e08678eae49a105577e415381ea99c6514a454d26c40cd77bfab8b375d79c WHIRLPOOL baabbddd8f3add133b28d083edeca3d2a5a518b2b47db260a6b5a185b5276e80a6b980fddfd4559ce93cade6b4e6823e9ffc304c5cf82f41c0d8d4237cee1245
+AUX calc-2.12.4.13-prefix.patch 3189 SHA256 083d0d622c6c925e41a29f725e0bb2f129d3f39489f159de10741670f3f44249 SHA512 aedaf30a8837cc1ff545b502e60e3284e4d8df37dd9d98516fbed17788f3d9a497aa3ba66f4613bd237de6152c041b339f26c89ff20ccdc1fb15387f9dba166e WHIRLPOOL 1b1d54db049d01012ffd513e3c58345b7e7dcba7212d23caac831612ca8b9f0647c612cc800a3108bd8b34ee7b5487090dc0fe99f176be67dbb1d1b330012899
+AUX calc-2.12.5.4-as-needed.patch 6226 SHA256 ba58efba9fcb4197c3ad06db43cca8b723ae3508a060f6215d081f986e2a4dec SHA512 fd65cdc727b9859d8d1a55e4140bb74301dc1941f647f5d52026818a1da56f90d21eea26a578bfd4fb0988cb3c516985239e8a06a3de15a9109fbe77b9536466 WHIRLPOOL 4d310eb93104d24d8e762e5b1cac979c5b8950d475755e27f3fc8173d25957548c8e2820dd1ad9fdbb73e1ec01a119a2d68d27104c753165450d1b8338f7e092
+DIST calc-2.12.2.2.tar.bz2 864687 SHA256 0a334cd331a4953a86365becce9b9f401b264a580a1f2130d5de700fa093772a SHA512 701e8414366f112aa0aba2359a0d76037994fa647d14beb216a23a05e328665b2e0218b902b5e2a447ccf6277795baef4c68e278e12dfc40b1ee95f23858b9f4 WHIRLPOOL 4392e55e6fe257457b87e3446f32f742fb3f7c0f116da8b399b29144e4c7997bafdd69fe971d206094503791a5511b2bd187b2b1676f9792c17feb3bd87b560f
+DIST calc-2.12.4.13.tar.bz2 970778 SHA256 1e6fd3256bd7bf738fcfe6e2d6a9d8a6bb0f37393aba6020b01d96274419a92c SHA512 7b7136c793917652ce2f2b3866b2db16a69dbead729d8a72b8c1359ebb8a4e1d4e7a3a8b214f8e85b9ccf41193ba6ffcb49926cc68f494e2b6cdff58559f2534 WHIRLPOOL 365700655f53eb5efb58ee6fbdf1d123943c2cc6a799318d9a48e2c5b8e0e2e871fd36e54b185442e0a0bc5380644edca1612bbfe7e2506247015743cdb556ee
+DIST calc-2.12.5.4.tar.bz2 956258 SHA256 a776121efe49f3230a293e28682e52ff6d5f2f1896d3a9b474a51de8c890919e SHA512 07c89059d4718b29e649a5198e0bb6c6a6d9c6705a0050ad744146f1649c65d0fb1277a68eb45daca907b08ef9336de2002808a5f9b2312e413eb3afb74d491f WHIRLPOOL 210f259749c7ea5427b7c3698d17cb9af72243e39cde54d1371f246d96a9f9e360f645e8f0ce64514e92275a17756cf57c4757410bd7db192f0767f48676abfd
+EBUILD calc-2.12.2.2.ebuild 1128 SHA256 f2f390573d991a9e43c9c696cc9c10b8b43af5e97292124db32db6c46f6d4bf8 SHA512 2ec64eecab37798e0bb17f18c078e95ffdbacb469201c6b3beb8ab610d0ffc317ae45807304162847660c3411c46de5f69285b727fa6fb2398d1d56aed5d2a48 WHIRLPOOL b80cd96d2253929894db36079d238f68a9ef23370d439487385e692f4f30961b08141acdff8401977f62e6af07b69fc7295efa9961910b8bdb7e9d40346dbecb
+EBUILD calc-2.12.4.13-r1.ebuild 1324 SHA256 4cd1eae77d134e4a2c65b8f990a341679066332f6d9b4721544061a9fae9084c SHA512 0b71f653135b3c9241243110f1387d8bfa3ff80e5d12bc41dde8c7354d1dc00a7fe0dd1716772e22f8a9959aef621bdbdb78c3c7c8988d6353e8e090d47ae3b3 WHIRLPOOL 6840b77f9694464ae3c3ecb32d87fa83172e6490ed0b428de77c98a6c4876ed6bf003ea1404712bac9590086261a88944505d031774633534b56731233d7e899
+EBUILD calc-2.12.5.4.ebuild 1313 SHA256 3fb8f9fe045e1f4eec97615acb9bac769008c12b635d79007071744028cffa88 SHA512 ccbb388e68777c4a674504324e1dfaf0ca67c4a3125350a3ebe06c8f0f75989c6edae559475b0152e6a8200f74b04ce29eb50dad383a7a6c2eb17ee335cdfc43 WHIRLPOOL 7d7ef5e78c7f8ce37571f75b8b3e21c3519fd7e4ffc81f8a1da8d53a75b9afbae22c48fe77a91ab4a5f76bbf0a7f5264e2ed5cfa313c278b6e48fb313a8529fb
+MISC ChangeLog 3932 SHA256 013b2156a7280ce68dde7aabdaeae2f8e89f820aa44da55824a9c322d4bce0b5 SHA512 5444d27a341f54fd96bf10a0b36ca19f306c1501d4b2f78447231405d169a4b55b3d68f28c0704acbfead40b393dbf65cf16846e9243c52b7a3ffaae265c150a WHIRLPOOL 16872d3ab12538da11af3fe42c6617890e1b427c23200b1d45e5bd43c4022aa30ab5a2c090fb50c5722e80b2d636c5e7f07fe47b5d263be6b20f564bb27b21b6
+MISC ChangeLog-2015 4150 SHA256 9c0207dd7b3961636b5bafc844abf622c4c9a560dc2766333c480b28b14897bb SHA512 0040aa5b40c11688fc838a4377915585393bfb0d7510eedba82ef9607551d08f22e3a0ec647fe33b2a9db77536ccdf801273b451442a4d122f6265c454b232b4 WHIRLPOOL 1710d2f41fe071e6587d89c245ccbbff3270070dc927e34f4439d2afd8bb12afceeaadadb1b96a06a7e0e1c268d7ac286a92eb40137e7c6351e920797221db1a
+MISC metadata.xml 711 SHA256 e8eacd7a036bfd336637538624d956792ba2f8b22d53bef703729084444c834d SHA512 8d88980b122ab65162de6d7038f4fc3744f741dabaf543d3edb6a013b61c3c6b53e30643174064c14fadc6d85d08c141aae0336f347b95caa78019c4e6fa8290 WHIRLPOOL 6b0b0f7b6aeb38529a9962803bf544032288526a3a900c62a29c6aa69615f15a4bdc46a919e277bbdeea9b3a0a216c9eae2ca11c512c77b3baead849fa1fb858
diff --git a/sci-mathematics/calc/calc-2.12.2.2.ebuild b/sci-mathematics/calc/calc-2.12.2.2.ebuild
new file mode 100644
index 000000000000..900ddc9a4298
--- /dev/null
+++ b/sci-mathematics/calc/calc-2.12.2.2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils multilib
+
+DESCRIPTION="An arbitrary precision C-like arithmetic system"
+HOMEPAGE="http://www.isthe.com/chongo/tech/comp/calc/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+SLOT="0"
+LICENSE="LGPL-2"
+KEYWORDS="~alpha amd64 ~ppc ~ppc64 ~x86"
+
+IUSE=""
+
+DEPEND=">=sys-libs/ncurses-5.2
+ >=sys-libs/readline-4.2"
+
+RDEPEND="${DEPEND}
+ >=sys-apps/less-348"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-libdir-fix.patch
+
+ sed -e "s:LIBDIR= /usr/lib:LIBDIR= /usr/$(get_libdir):" \
+ -i Makefile || die "Failed to fix multilib in makefile"
+}
+
+src_compile() {
+ # bug #299224
+ emake -j1 \
+ T="${D}" \
+ DEBUG="${CFLAGS}" \
+ CALCPAGER=less \
+ USE_READLINE="-DUSE_READLINE" \
+ READLINE_LIB="-lreadline -lhistory -lncurses" \
+ all \
+ || die
+ if echo "${LD_PRELOAD}" | grep -q "sandbox"; then
+ ewarn "Can't run check when running in sandbox - see bug #59676"
+ else
+ make chk || die "Check failed"
+ fi
+}
+
+src_install() {
+ make T="${D}" install || die
+ dodoc BUGS CHANGES LIBRARY README
+}
diff --git a/sci-mathematics/calc/calc-2.12.4.13-r1.ebuild b/sci-mathematics/calc/calc-2.12.4.13-r1.ebuild
new file mode 100644
index 000000000000..7e43d678ca58
--- /dev/null
+++ b/sci-mathematics/calc/calc-2.12.4.13-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Arbitrary precision C-like arithmetic system"
+HOMEPAGE="http://www.isthe.com/chongo/tech/comp/calc/"
+SRC_URI="http://www.isthe.com/chongo/src/calc/${P}.tar.bz2"
+
+SLOT="0"
+LICENSE="LGPL-2"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+
+IUSE=""
+
+DEPEND="
+ sys-libs/ncurses:0=
+ sys-libs/readline:0="
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.12.4.13-prefix.patch\
+ "${FILESDIR}"/2.12.4.0-ldflags.patch
+ ln -sf libcustcalc.so.${PV} custom/libcustcalc.so || die
+ sed -i -e "/DIR/s:/usr:${EPREFIX}/usr:g" Makefile || die
+}
+
+src_compile() {
+ # parallel compilation hard to fix. better to leave upstream.
+ emake -j1 \
+ CC="$(tc-getCC)" \
+ DEBUG="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CALCPAGER="${PAGER}" \
+ USE_READLINE="-DUSE_READLINE" \
+ READLINE_LIB="-lreadline -lhistory -lncurses -L\"${S}\"/custom -lcustcalc" \
+ all
+}
+
+src_test() {
+ if echo "${LD_PRELOAD}" | grep -q "sandbox"; then
+ ewarn "Can't run check when running in sandbox - see bug #59676"
+ else
+ emake chk
+ fi
+}
+
+src_install() {
+ emake \
+ T="${D}" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ install
+ dodoc BUGS CHANGES LIBRARY README
+}
diff --git a/sci-mathematics/calc/calc-2.12.5.4.ebuild b/sci-mathematics/calc/calc-2.12.5.4.ebuild
new file mode 100644
index 000000000000..c8ebd6a8570c
--- /dev/null
+++ b/sci-mathematics/calc/calc-2.12.5.4.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Arbitrary precision C-like arithmetic system"
+HOMEPAGE="http://www.isthe.com/chongo/tech/comp/calc/"
+SRC_URI="http://www.isthe.com/chongo/src/calc/${P}.tar.bz2"
+
+SLOT="0"
+LICENSE="LGPL-2"
+KEYWORDS="~alpha amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+
+IUSE=""
+
+RDEPEND="
+ sys-libs/ncurses:0=
+ sys-libs/readline:0="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-as-needed.patch"
+)
+
+src_prepare() {
+ default
+ ln -sf libcustcalc.so.${PV} custom/libcustcalc.so || die
+ sed -i -e "/DIR/s:/usr:${EPREFIX}/usr:g" Makefile || die
+}
+
+src_compile() {
+ # parallel compilation hard to fix. better to leave upstream.
+ emake -j1 \
+ CC="$(tc-getCC)" \
+ DEBUG="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CALCPAGER="${PAGER}" \
+ USE_READLINE="-DUSE_READLINE" \
+ READLINE_LIB="-lreadline -lhistory $(pkg-config --libs ncurses) -L\"${S}\"/custom -lcustcalc" \
+ all
+}
+
+src_test() {
+ if echo "${LD_PRELOAD}" | grep -q "sandbox"; then
+ ewarn "Can't run check when running in sandbox - see bug #59676"
+ else
+ emake chk
+ fi
+}
+
+src_install() {
+ emake \
+ T="${D}" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ install
+ dodoc BUGS CHANGES LIBRARY README
+}
diff --git a/sci-mathematics/calc/files/2.12.4.0-ldflags.patch b/sci-mathematics/calc/files/2.12.4.0-ldflags.patch
new file mode 100644
index 000000000000..0f2b67d2c084
--- /dev/null
+++ b/sci-mathematics/calc/files/2.12.4.0-ldflags.patch
@@ -0,0 +1,101 @@
+diff --git a/Makefile b/Makefile
+index b526442..baa8273 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1144,11 +1144,13 @@ BLD_TYPE= calc-dynamic-only
+ #
+ CC_SHARE= -fPIC
+ LD_SHARE=
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ else
+-LIBCUSTCALC_SHLIB=
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ endif
+ #
+ CC_STATIC=
+@@ -1227,9 +1229,9 @@ BLD_TYPE= calc-dynamic-only
+ #
+ CC_SHARE= -fPIC
+ LD_SHARE=
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+ else
+ LIBCUSTCALC_SHLIB=
+ endif
+@@ -1267,9 +1269,9 @@ BLD_TYPE= calc-dynamic-only
+ #
+ CC_SHARE= -fPIC
+ LD_SHARE=
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+ else
+ LIBCUSTCALC_SHLIB=
+ endif
+@@ -1304,9 +1306,9 @@ CC_SHARE= -fPIC
+ DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+ LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+ "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+ else
+ LIBCUSTCALC_SHLIB=
+ endif
+@@ -1340,8 +1342,8 @@ BLD_TYPE= calc-static-only
+ #
+ CC_SHARE= -fPIC
+ LD_SHARE=
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+ #
+ CC_STATIC=
+ LD_STATIC=
+@@ -1394,9 +1396,9 @@ BLD_TYPE= calc-static-only
+ #
+ CC_SHARE= -fPIC
+ LD_SHARE=
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+ else
+ LIBCUSTCALC_SHLIB=
+ endif
+@@ -1431,9 +1433,9 @@ CC_SHARE= -fPIC
+ DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+ LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+ "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+ else
+ LIBCUSTCALC_SHLIB=
+ endif
+@@ -2002,7 +2004,7 @@ calc-static-only: ${STATIC_FIRST_TARGETS} ${EARLY_TARGETS} \
+
+ calc${EXT}: .hsrc ${CALCOBJS} ${CALC_DYNAMIC_LIBS} ${MAKE_FILE}
+ ${RM} -f $@
+- ${CC} ${CALCOBJS} ${LDFLAGS} ${LD_SHARE} ${CALC_DYNAMIC_LIBS} \
++ ${CC} ${LDFLAGS} ${CALCOBJS} ${LD_SHARE} ${CALC_DYNAMIC_LIBS} \
+ ${READLINE_LIB} ${READLINE_EXTRAS} -o $@
+
+ libcalc${LIB_EXT_VERSION}: ${LIBOBJS} ver_calc${EXT} ${MAKE_FILE}
diff --git a/sci-mathematics/calc/files/calc-2.12.2.2-libdir-fix.patch b/sci-mathematics/calc/files/calc-2.12.2.2-libdir-fix.patch
new file mode 100644
index 000000000000..f265793ab871
--- /dev/null
+++ b/sci-mathematics/calc/files/calc-2.12.2.2-libdir-fix.patch
@@ -0,0 +1,12 @@
+diff -Naur calc-2.12.2.2.old/Makefile calc-2.12.2.2/Makefile
+--- calc-2.12.2.2.old/Makefile 2007-09-29 12:58:19.000000000 -0400
++++ calc-2.12.2.2/Makefile 2007-10-24 06:40:10.000000000 -0400
+@@ -1131,7 +1131,7 @@
+ BLD_TYPE= calc-dynamic-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
++DEFAULT_LIB_INSTALL_PATH= /lib:/usr/lib:${LIBDIR}:/usr/local/lib
+ LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+ "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
+ LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
diff --git a/sci-mathematics/calc/files/calc-2.12.4.13-prefix.patch b/sci-mathematics/calc/files/calc-2.12.4.13-prefix.patch
new file mode 100644
index 000000000000..727618c3fe71
--- /dev/null
+++ b/sci-mathematics/calc/files/calc-2.12.4.13-prefix.patch
@@ -0,0 +1,87 @@
+diff --git a/Makefile b/Makefile
+index cc84386..b526442 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1143,9 +1143,7 @@ ifeq ($(target),Linux)
+ BLD_TYPE= calc-dynamic-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+-LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+- "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
++LD_SHARE=
+ LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+ LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+@@ -1177,9 +1175,8 @@ ifeq ($(target),Darwin)
+ BLD_TYPE= calc-dynamic-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:${LIBDIR}:/usr/local/lib
+ LD_SHARE= ${DARWIN_ARCH}
+-LIBCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib
++LIBCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib -install_name ${LIBDIR}/libcalc${LIB_EXT_VERSION}
+ ifdef ALLOW_CUSTOM
+ LIBCUSTCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib
+ else
+@@ -1196,7 +1193,7 @@ CCWERR=
+ CCOPT= ${DEBUG}
+ CCMISC= ${DARWIN_ARCH}
+ #
+-LCC= MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} gcc
++LCC= gcc
+ CC= ${PURIFY} ${LCC} ${CCWERR}
+ #
+ # Darmin dynamic shared lib filenames
+@@ -1211,7 +1208,6 @@ LDCONFIG:=
+ # DARWIN_ARCH= -arch i386 # Intel binary
+ # DARWIN_ARCH= -arch ppc # PPC binary
+ DARWIN_ARCH= # native binary
+-MACOSX_DEPLOYMENT_TARGET=10.8
+ #
+ endif
+
+@@ -1230,9 +1226,7 @@ ifeq ($(target),FreeBSD)
+ BLD_TYPE= calc-dynamic-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+-LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+- "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
++LD_SHARE=
+ LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+ LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+@@ -1272,9 +1266,7 @@ ifeq ($(target),OpenBSD)
+ BLD_TYPE= calc-dynamic-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+-LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+- "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
++LD_SHARE=
+ LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+ LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+@@ -1347,9 +1339,7 @@ ifeq ($(target),simple)
+ BLD_TYPE= calc-static-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+-LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+- "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
++LD_SHARE=
+ LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+ #
+@@ -1403,9 +1393,7 @@ CALCRC= ${CALC_SHAREDIR}/startup;~/.calcrc;./.calcinit
+ BLD_TYPE= calc-static-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+-LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+- "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
++LD_SHARE=
+ LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+ LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
diff --git a/sci-mathematics/calc/files/calc-2.12.5.4-as-needed.patch b/sci-mathematics/calc/files/calc-2.12.5.4-as-needed.patch
new file mode 100644
index 000000000000..3e7e03002ac3
--- /dev/null
+++ b/sci-mathematics/calc/files/calc-2.12.5.4-as-needed.patch
@@ -0,0 +1,161 @@
+--- calc-2.12.5.3/Makefile
++++ calc-2.12.5.3/Makefile
+@@ -1136,14 +1136,14 @@
+ BLD_TYPE= calc-dynamic-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+-LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+- "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LD_SHARE=
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ else
+-LIBCUSTCALC_SHLIB=
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ endif
+ #
+ CC_STATIC=
+@@ -1173,7 +1173,6 @@
+ BLD_TYPE= calc-dynamic-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:${LIBDIR}:/usr/local/lib
+ LD_SHARE= ${DARWIN_ARCH}
+ #SET_INSTALL_NAME= no
+ SET_INSTALL_NAME= yes
+@@ -1249,14 +1248,14 @@
+ BLD_TYPE= calc-dynamic-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+-LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+- "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LD_SHARE=
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ else
+-LIBCUSTCALC_SHLIB=
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ endif
+ #
+ CC_STATIC=
+@@ -1294,12 +1293,10 @@
+ BLD_TYPE= calc-dynamic-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+-LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+- "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LD_SHARE=
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+ else
+ LIBCUSTCALC_SHLIB=
+ endif
+@@ -1333,12 +1330,10 @@
+ BLD_TYPE= calc-dynamic-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+-LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+- "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LD_SHARE=
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+ else
+ LIBCUSTCALC_SHLIB=
+ endif
+@@ -1370,12 +1365,10 @@
+ BLD_TYPE= calc-static-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+-LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+- "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LD_SHARE=
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+ else
+ LIBCUSTCALC_SHLIB=
+ endif
+@@ -1411,11 +1404,9 @@
+ BLD_TYPE= calc-static-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+-LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+- "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LD_SHARE=
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+ #
+ CC_STATIC=
+ LD_STATIC=
+@@ -1470,12 +1461,11 @@
+ BLD_TYPE= calc-static-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+-LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+- "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LD_SHARE=
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+ LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
+ else
+ LIBCUSTCALC_SHLIB=
+ endif
+@@ -1510,14 +1500,14 @@
+ BLD_TYPE= calc-static-only
+ #
+ CC_SHARE= -fPIC
+-DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
+-LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
+- "-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
+-LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
++LD_SHARE=
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ ifdef ALLOW_CUSTOM
+-LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ else
+-LIBCUSTCALC_SHLIB=
++LIBCUSTCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
++LIBCALC_SHLIB= -shared ${LDFLAGS} "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
+ endif
+ #
+ CC_STATIC=
+@@ -2110,7 +2100,7 @@
+
+ calc${EXT}: .hsrc ${CALCOBJS} ${CALC_DYNAMIC_LIBS} ${MAKE_FILE}
+ ${RM} -f $@
+- ${CC} ${CALCOBJS} ${LDFLAGS} ${LD_SHARE} ${CALC_DYNAMIC_LIBS} \
++ ${CC} ${LDFLAGS} ${CALCOBJS} ${LD_SHARE} ${CALC_DYNAMIC_LIBS} \
+ ${READLINE_LIB} ${READLINE_EXTRAS} -o $@
+
+ libcalc${LIB_EXT_VERSION}: ${LIBOBJS} ver_calc${EXT} ${MAKE_FILE}
diff --git a/sci-mathematics/calc/metadata.xml b/sci-mathematics/calc/metadata.xml
new file mode 100644
index 000000000000..eb2669de9d83
--- /dev/null
+++ b/sci-mathematics/calc/metadata.xml
@@ -0,0 +1,18 @@
+<?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">
+ Calc is an interactive calculator which provides for easy large
+ numeric calculations, but which also can be easily programmed for
+ difficult or long calculations. It can accept a command line argument,
+ in which case it executes that single command and exits. Otherwise, it
+ enters interactive mode.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">calc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/cgal/Manifest b/sci-mathematics/cgal/Manifest
new file mode 100644
index 000000000000..86d579203fc6
--- /dev/null
+++ b/sci-mathematics/cgal/Manifest
@@ -0,0 +1,10 @@
+AUX cgal-4.7-fix-buildsystem.patch 761 SHA256 b005e46e49c7c4b7938c36d0a1fc170e4e04c7bc693e00c3cc05a8297effefe1 SHA512 97d380e915561a8407f6daf681457d5cce1f5ae2f8e1af25b1bea21876d661941144d53c6d96f90c65b9377aece98d2c0b14450917f4b768644de51020fe2338 WHIRLPOOL b8730651bb986f84f6547648cdf794c9b1a372d0b4d1865ec42a59a3c9eddeb2d8fb89609e000cd574fc0eca94804cb47b3bf5c6f6646137aeef3367cef566e0
+DIST CGAL-4.10-doc_html.tar.xz 27147028 SHA256 a65471afa68e34f2fdd607c60625db941de34d5d8c5759b3f3cb3aae3c563a6a SHA512 1c1c90c3ce07c5e4bf5a125cd5dccd0595f5c5d8fcf0f16df8a5506c6fe611c30440e034621c3477ae55670f96abbe389bfc2f3e0c88e099133b03cce6f2923d WHIRLPOOL 82bd1988915c1fc89d98ac11270e00a573b2885df3404deb2166fcdaf7d4d0a663bbdc5e56acfe00fbb401314b0f6a097847ea703c188522a6112f2d4c4f3eb0
+DIST CGAL-4.10.tar.xz 14249804 SHA256 eb56e17dcdecddf6a6fb808931b2142f20aaa182916ddbd912273c51e0f0c045 SHA512 2029ad647e73692bb38b2ed9606aae61ec1d74df886bb6fd0f4e3388fb08a51de87a1e290df0dcc621a8abc2654915e2d331ec9f6d27ddd9a21f187a165fa09d WHIRLPOOL df96d9d9820214d7ddacd86eda1edeecf92ab0022203a26ca21ba61f65ba1872e62004761f97aee01dcc1f9dfcf32659ec025c43d44e434d578c68b012c495d9
+DIST cgal-4.9-doc_html-1.tar.xz 26612436 SHA256 f02d18177eac67b602f44a6aa26e8c6ccce1cf32d2b1928dc2456488fa7b06a3 SHA512 df9855ff2b152a32dfb584c68b861e2cd480c073cd8cfddc494295455aff8d96e00ba6424b7a7f460e2f9e8db0fcefe858a656f4834821dd5466f61eb3d555b2 WHIRLPOOL 6b8ae1a88bf546eb54b8b6777f3e9a67688ae51003018ded145e168353020ba6b250a3702c4065e6bcb64bd291b492dffc5a68d4f7cc75670b20cee1aa2b3347
+DIST cgal-4.9.tar.xz 13749292 SHA256 63ac5df71f912f34f2f0f2e54a303578df51f4ec2627db593a65407d791f9039 SHA512 6f55e061917869dea1083e6fccac132a5232c2de4c01d0ed052bbb31789a23cc66334f12a884ed1e8a1b84af0e2a7186000964dd12e4b41914ee7fd5e36baca8 WHIRLPOOL a0554c118b02f23f07c6625f26fe37b0c2fddf0464f06b6c2be27be16bb0e796a8167a5380406a8e15d0f10f2f0f2dd1c1a51dcf6b3339a7234c189b8203e2ce
+EBUILD cgal-4.10.ebuild 1996 SHA256 3eecc7cce351b176b0b641ffc155ba2cabf558d3320f1d6bb0627449863d68cf SHA512 af69e87c18b6d000f224402e609c729051b1d05d864d759c0e7e5a2550c9ff2f5cd15e899bbd475879a86fb10bef41a33f149dd50615337a9ff9fcd73937bed5 WHIRLPOOL 07698dfac4d0409cd43f1b39870bb2c4e6a9cfe5e947122b3e1679f103965dfd7f9e9392aada349a73c545be7c417ee5f22fc4df456cb79f443e37e1d3ee1ab7
+EBUILD cgal-4.9.ebuild 1920 SHA256 ed685e790ac30508c135be51274ef701fb280d3739169d1fa5674572b3e1b688 SHA512 19e6e2a617a8c9c4fbd5ab4f832c14f5c5ca6ce600f34e3aa6dc8f73aa98c0b3e0b64667a5f29d552c974f164e71c500ee1c3f14c781e659a5fdfae6615c6f03 WHIRLPOOL 51e5c11a18eaa6cdccaf93673fabfa4fe2f287f930e20a232aee480eaba05027b8709b3ae0c5a72cd1178cc68cd8cada31b2f933466dc6d6a9f1fb7f32ae262e
+MISC ChangeLog 4619 SHA256 4210645cae15e999d10ea583dd3ec7f1a3c58b1dcc7a66131b6bb2752afb1fdd SHA512 4d478e3a88a250fa0054cda8856a8959195a519a496cac90315d954a42c52ff75d57f35165cc32063d96987529da81d686b635cc35740cdfd634eacd9f2252cb WHIRLPOOL f9667d860815b7a33de7b16713ec5ed936b040df68864fa3961004baeafa471040cd0d046803334a2bf5e998817923d373b1be1caf4bf2e95f30332d1bfe0f9c
+MISC ChangeLog-2015 4429 SHA256 57f6baa8960302195581c7c836cf8f596351da1e4c5e1c41618d146d5a4a4b0a SHA512 15d9fb8a5795b6d8a434b9d2ececd587c10b25dfbe4fdf9ce6096150e6a756d5aedc50eafbcee190c96e518fe87604b1e4668feebe48f0d742628dc705ab83b7 WHIRLPOOL 5d7e8660a1d78b3fc88334d2e4f5da11f48be2d965eeec1c06ccf78653ccdff60b36ed8f2fdad12708522c3f18e419505657dad6af75f8342cfeb60249a1b029
+MISC metadata.xml 1320 SHA256 ec19cae222012105154341d89afe512b61b6aa93d280aed2f8714fb967ac4f0c SHA512 ee385a11e84af08f5c8146da067d27beceea4f15b2ede403ed799dc7766a4f749904356f22175eceb121555d6a40f3994381f6a1f8d2a90178962b65cf2a40d0 WHIRLPOOL c08c5ca8f8a276c0caed2935dc5fa3bf1e35b51387e46401c20f16b5fc94b91ce0a69be1e1e8f52024bbf2ce0227c121f055f3eb1949748f536e3a2aafe75ff5
diff --git a/sci-mathematics/cgal/cgal-4.10.ebuild b/sci-mathematics/cgal/cgal-4.10.ebuild
new file mode 100644
index 000000000000..7d4bbdec8af9
--- /dev/null
+++ b/sci-mathematics/cgal/cgal-4.10.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic
+
+MY_P=CGAL-${PV}
+
+DESCRIPTION="C++ library for geometric algorithms and data structures"
+HOMEPAGE="http://www.cgal.org/"
+SRC_URI="
+ https://github.com/CGAL/cgal/releases/download/releases%2F${MY_P}/${MY_P}.tar.xz
+ doc? ( https://github.com/CGAL/cgal/releases/download/releases%2F${MY_P}/${MY_P}-doc_html.tar.xz )"
+
+LICENSE="LGPL-3 GPL-3 Boost-1.0"
+SLOT="0/13"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples +gmp mpfi ntl qt5"
+
+RDEPEND="
+ >=dev-cpp/eigen-3.1
+ dev-libs/boost:=
+ dev-libs/mpfr:0
+ sys-libs/zlib:=
+ x11-libs/libX11:=
+ virtual/glu:=
+ virtual/opengl:=
+ gmp? ( dev-libs/gmp:=[cxx] )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtopengl:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ )
+ mpfi? ( sci-libs/mpfi )
+ ntl? ( dev-libs/ntl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.7-fix-buildsystem.patch"
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+ # modules provided by dev-util/cmake and dev-cpp/eigen
+ rm cmake/modules/Find{Eigen3,GLEW,OpenGL}.cmake || die
+ sed -e '/install(FILES AUTHORS/d' \
+ -i CMakeLists.txt || die
+
+ # use C++11 threads instead of boost::thread
+ append-cxxflags -std=c++11
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCGAL_INSTALL_LIB_DIR="$(get_libdir)"
+ -DCGAL_INSTALL_CMAKE_DIR="$(get_libdir)/cmake"
+ -DWITH_CGAL_Qt3=OFF
+ -DWITH_LEDA=OFF
+ -DWITH_Eigen3=ON
+ -DWITH_ZLIB=ON
+ -DWITH_GMP="$(usex gmp)"
+ -DWITH_GMPXX="$(usex gmp)"
+ -DWITH_CGAL_Qt5="$(usex qt5)"
+ -DWITH_MPFI="$(usex mpfi)"
+ -DWITH_NTL="$(usex ntl)"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ if use examples; then
+ dodoc -r examples demo
+ docompress -x /usr/share/doc/${PF}/{examples,demo}
+ fi
+ if use doc; then
+ docinto html/
+ dodoc -r "${WORKDIR}"/doc_html/*
+ docompress -x /usr/share/doc/${PF}/html
+ fi
+}
diff --git a/sci-mathematics/cgal/cgal-4.9.ebuild b/sci-mathematics/cgal/cgal-4.9.ebuild
new file mode 100644
index 000000000000..b8c9051efdad
--- /dev/null
+++ b/sci-mathematics/cgal/cgal-4.9.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils flag-o-matic
+
+MY_P=CGAL-${PV}
+
+DESCRIPTION="C++ library for geometric algorithms and data structures"
+HOMEPAGE="http://www.cgal.org/"
+SRC_URI="
+ https://github.com/CGAL/cgal/releases/download/releases%2F${MY_P}/${MY_P}.tar.xz -> ${P}.tar.xz
+ doc? ( https://github.com/CGAL/cgal/releases/download/releases%2F${MY_P}/${MY_P}-doc_html.tar.xz -> ${P}-doc_html-1.tar.xz )"
+
+LICENSE="LGPL-3 GPL-3 Boost-1.0"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples +gmp mpfi ntl qt5"
+
+RDEPEND="
+ >=dev-cpp/eigen-3.1
+ dev-libs/boost:=
+ dev-libs/mpfr:0
+ sys-libs/zlib
+ x11-libs/libX11
+ virtual/glu
+ virtual/opengl
+ gmp? ( dev-libs/gmp[cxx] )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtopengl:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ )
+ mpfi? ( sci-libs/mpfi )
+ ntl? ( dev-libs/ntl )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+PATCHES=(
+ "${FILESDIR}/${PN}-4.7-fix-buildsystem.patch"
+)
+
+src_prepare() {
+ cmake-utils_src_prepare
+ # modules provided by dev-util/cmake and dev-cpp/eigen
+ rm cmake/modules/Find{Eigen3,GLEW,OpenGL}.cmake || die
+ sed \
+ -e '/install(FILES AUTHORS/d' \
+ -i CMakeLists.txt || die
+
+ # use C++11 threads instead of boost::thread
+ append-cxxflags -std=c++11
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCGAL_INSTALL_LIB_DIR="$(get_libdir)"
+ -DCGAL_INSTALL_CMAKE_DIR="lib/cmake"
+ -DWITH_CGAL_Qt3=OFF
+ -DWITH_LEDA=OFF
+ -DWITH_Eigen3=ON
+ -DWITH_ZLIB=ON
+ -DWITH_GMP="$(usex gmp)"
+ -DWITH_GMPXX="$(usex gmp)"
+ -DWITH_CGAL_Qt5="$(usex qt5)"
+ -DWITH_MPFI="$(usex mpfi)"
+ -DWITH_NTL="$(usex ntl)"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ if use examples; then
+ dodoc -r examples demo
+ fi
+ if use doc; then
+ docinto html/
+ dodoc -r "${WORKDIR}"/doc_html/*
+ fi
+}
diff --git a/sci-mathematics/cgal/files/cgal-4.7-fix-buildsystem.patch b/sci-mathematics/cgal/files/cgal-4.7-fix-buildsystem.patch
new file mode 100644
index 000000000000..6aabdc395395
--- /dev/null
+++ b/sci-mathematics/cgal/files/cgal-4.7-fix-buildsystem.patch
@@ -0,0 +1,19 @@
+Remove customized handling of ${CMAKE_BUILD_TYPE} which conflicts with
+how Gentoo handles ${CMAKE_BUILD_TYPE}:
+* CMake Error at cmake/modules/CGAL_SetupFlags.cmake:65 (message):
+* Gentoo is not a valid build type: only Release or Debug is allowed
+* Call Stack (most recent call first):
+* CMakeLists.txt:519 (include)
+
+--- CGAL-4.7/cmake/modules/CGAL_SetupFlags.cmake
++++ CGAL-4.7/cmake/modules/CGAL_SetupFlags.cmake
+@@ -61,9 +61,6 @@
+ add_definitions(-DCGAL_TEST_SUITE)
+ endif()
+
+-if ( NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
+- message( FATAL_ERROR "${CMAKE_BUILD_TYPE} is not a valid build type: only Release or Debug is allowed" )
+-endif()
+
+ message( STATUS "Build type: ${CMAKE_BUILD_TYPE}" )
+
diff --git a/sci-mathematics/cgal/metadata.xml b/sci-mathematics/cgal/metadata.xml
new file mode 100644
index 000000000000..ec85a1dbc69a
--- /dev/null
+++ b/sci-mathematics/cgal/metadata.xml
@@ -0,0 +1,28 @@
+<?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 Computational Geometry Algorithms Library is a collaborative
+ open source library containing:
+ * the Kernel with geometric primitives such as points, vectors,
+ lines, predicates for testing things such as relative positions of
+ points, and operations such as intersections and distance calculation.
+ * the Basic Library which is a collection of standard data
+ structures and geometric algorithms, such as convex hull in 2D/3D,
+ (Delaunay) triangulation in 2D/3D, planar map, polyhedron, smallest
+ enclosing circle, and multidimensional query structures.
+ * the Support Library which offers interfaces to other packages,
+ e.g., for visualisation, and I/O, and other support facilities.
+ </longdescription>
+ <use>
+ <flag name="mpfi">Enable support for multiple recision interval arithmetic via <pkg>sci-libs/mpfi</pkg></flag>
+ <flag name="ntl">Enable support for <pkg>dev-libs/ntl</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="github">CGAL/cgal</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/coq/Manifest b/sci-mathematics/coq/Manifest
new file mode 100644
index 000000000000..3e8ded2d230d
--- /dev/null
+++ b/sci-mathematics/coq/Manifest
@@ -0,0 +1,7 @@
+DIST coq-8.6.1.tar.gz 5588811 SHA256 32f8aa92853483dec18030def9f0857a708fee56cf4287e39c9a260f08138f9d SHA512 814ab76a06ca15f927081428da74add4bc67290199fa011853b9c68a00cdefaf813b10fbac18a434f4504fce8f2173eb544080bf6f50d62caa41bb8724b13083 WHIRLPOOL e0d918909b9902acd4ab0f8b4b5ce425ed8a26e80f5e2714b7e0c38ed737b9c83eab3a7fc8ba1407298bdf24adbcd435771d5cd92f3e4296e04b5503aea44c2d
+DIST coq-8.6.tar.gz 5538848 SHA256 6e3c3cf5c8e2b0b760dc52738e2e849f3a8c630869659ecc0cf41413fcee81df SHA512 9f5f4913fda8cf83683fec9398b42d4567207c3d4b52b4638d5e09a24ed25a43905fb57a9fac1bb9f9d681bd47f3560e1da74e79348b3a3fd93e2e8c686cebae WHIRLPOOL 714226c0f9138ea7dc9828db6dbc59e9b6e0c18ae305fc1a67c5c1c7a950ec1deabd37f462e20d1d1ddbd148a8bc3845a72f88f5ef6cbd4f93abfd02539dbcbc
+EBUILD coq-8.6.1.ebuild 2028 SHA256 02827340a119cf3aa0d92ecc4a3980f172ed348b0c9bda435d1f944ec628ccd6 SHA512 efe0e46aba141542802906c411de43257c8bd4b154f8828888b4b01651d5c7fb38d28e40f12cafc2df2cfefdefba94fe733dfe6490761a11813800fa03c4f320 WHIRLPOOL f5274e936235506e94faac5c4450f26e3e6403bd30b3bf5822731e36ea5e367556d9e51422e8f4fdbb14968ab77c9524b1470ded1012fa60435145821504083e
+EBUILD coq-8.6.ebuild 2025 SHA256 d13623720648406f7f58b4e8ccb65f056247e84b79b86d6e3be88b20af1c3351 SHA512 c3dcd0da423c16ffd723ef88178387c98e10444a766a5534b175bb945c8931151a0e13f2c0398bd248b6581480d3b9d46a29e55789ff492c179eca1ab28841ca WHIRLPOOL 6d0c8ead2898b74404d41f498fb9c57623bc9f745e31bee5d9a3e777dd07c4ba36f829898c73e8ef12ee66f65ef6c029ef45d732476c66d7e2ab3f7af3bc1aa9
+MISC ChangeLog 6481 SHA256 6959b4954d8c792af17a3ba3f4146bbefd6c815f70b960493c8d78848efa7949 SHA512 7e6b99d739d20cd9a8c7feb3293af390cd46f11e28dd65d9589573322eb586b51aeb55ff5b63a11257afea6a60f6812e7fdc255b63ad9bbeb7cf30f464c7bce1 WHIRLPOOL 5c30f15e3e745abad186f2397932cbac296f88a55bf4babf8b8db8700e038efc84e8dac186f9eff842503c2122435ca8d5b1e00bf803bed6b852060a64b0e40d
+MISC ChangeLog-2015 14610 SHA256 29ea672165f7b1d0c386175e219d9685d07fa53ed4a8a8d02278fd8390fa1190 SHA512 5530975ef086bc4ad2fc579f07b1718d451df04ff13b350f080630972f4b9da6560d61f5f6c9dd61881a79beca58f71aa356dbf84cdc47022037f638516a6b27 WHIRLPOOL 2fa629c380ee9ec61e0ccf8aa26d3025545d5a702eb89bd5c944170f0f1fe13af8d1cf065a368927bdc5c88cae63a251ea7daff72aa8cf38c30a10e3e2d4ebad
+MISC metadata.xml 1113 SHA256 1720d2147ae5051682d692c927e93f4ce8ccba8b6593a27720a6bc173fca562e SHA512 10bf7af26739a58d7e2165ab8d02b6412540c2abd1e28b800976fd8fc9df78275b5dafbdb2e660eae7fb4946769b41812ee5d2bba931317870d993869d7412b8 WHIRLPOOL f09aa337d190b08f69438479bcf51f0821c30158ca8c44c07a8eb8a4b5ced2a8af47d10d1867a5d6603e55dfbb90bc701de381a3ab1799b9dc2057b793329782
diff --git a/sci-mathematics/coq/coq-8.6.1.ebuild b/sci-mathematics/coq/coq-8.6.1.ebuild
new file mode 100644
index 000000000000..9b09cfd79ddd
--- /dev/null
+++ b/sci-mathematics/coq/coq-8.6.1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils multilib
+
+MY_PV=${PV/_p/pl}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Proof assistant written in O'Caml"
+HOMEPAGE="http://coq.inria.fr/"
+SRC_URI="http://${PN}.inria.fr/distrib/V${MY_PV}/files/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="gtk debug +ocamlopt doc camlp5"
+
+RDEPEND="
+ >=dev-lang/ocaml-3.11.2:=[ocamlopt?]
+ camlp5? ( >=dev-ml/camlp5-6.02.3:=[ocamlopt?] )
+ !camlp5? ( dev-ml/camlp4:= )
+ gtk? ( >=dev-ml/lablgtk-2.10.1:=[sourceview,ocamlopt?] )"
+DEPEND="${RDEPEND}
+ dev-ml/findlib
+ doc? (
+ media-libs/netpbm[png,zlib]
+ virtual/latex-base
+ dev-tex/hevea
+ dev-tex/xcolor
+ dev-texlive/texlive-pictures
+ || ( dev-texlive/texlive-mathscience dev-texlive/texlive-mathextra )
+ dev-texlive/texlive-latexextra
+ )"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ ocaml_lib=$(ocamlc -where)
+ local myconf=(
+ -prefix /usr
+ -bindir /usr/bin
+ -libdir /usr/$(get_libdir)/coq
+ -mandir /usr/share/man
+ -emacslib /usr/share/emacs/site-lisp
+ -coqdocdir /usr/$(get_libdir)/coq/coqdoc
+ -docdir /usr/share/doc/${PF}
+ -configdir /etc/xdg/${PN}
+ -lablgtkdir ${ocaml_lib}/lablgtk2
+ )
+
+ use debug && myconf+=( -debug )
+ use doc || myconf+=( -with-doc no )
+
+ if use gtk; then
+ if use ocamlopt; then
+ myconf+=( -coqide opt )
+ else
+ myconf+=( -coqide byte )
+ fi
+ else
+ myconf+=( -coqide no )
+ fi
+
+ use ocamlopt || myconf+=( -byte-only )
+
+ if use camlp5; then
+ myconf+=( -usecamlp5 -camlp5dir ${ocaml_lib}/camlp5 )
+ else
+ myconf+=( -usecamlp4 )
+ fi
+
+ export CAML_LD_LIBRARY_PATH="${S}/kernel/byterun/"
+ ./configure ${myconf[@]} || die "configure failed"
+}
+
+src_compile() {
+ emake STRIP="true" -j1 world VERBOSE=1
+}
+
+src_test() {
+ emake STRIP="true" check VERBOSE=1
+}
+
+src_install() {
+ emake STRIP="true" COQINSTALLPREFIX="${D}" install VERBOSE=1
+ dodoc README.md CREDITS CHANGES
+
+ use gtk && make_desktop_entry "coqide" "Coq IDE" "${EPREFIX}/usr/share/coq/coq.png"
+}
diff --git a/sci-mathematics/coq/coq-8.6.ebuild b/sci-mathematics/coq/coq-8.6.ebuild
new file mode 100644
index 000000000000..f2f38a063820
--- /dev/null
+++ b/sci-mathematics/coq/coq-8.6.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils multilib
+
+MY_PV=${PV/_p/pl}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Proof assistant written in O'Caml"
+HOMEPAGE="http://coq.inria.fr/"
+SRC_URI="http://${PN}.inria.fr/distrib/V${MY_PV}/files/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="gtk debug +ocamlopt doc camlp5"
+
+RDEPEND="
+ >=dev-lang/ocaml-3.11.2:=[ocamlopt?]
+ camlp5? ( >=dev-ml/camlp5-6.02.3:=[ocamlopt?] )
+ !camlp5? ( dev-ml/camlp4:= )
+ gtk? ( >=dev-ml/lablgtk-2.10.1:=[sourceview,ocamlopt?] )"
+DEPEND="${RDEPEND}
+ dev-ml/findlib
+ doc? (
+ media-libs/netpbm[png,zlib]
+ virtual/latex-base
+ dev-tex/hevea
+ dev-tex/xcolor
+ dev-texlive/texlive-pictures
+ || ( dev-texlive/texlive-mathscience dev-texlive/texlive-mathextra )
+ dev-texlive/texlive-latexextra
+ )"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ ocaml_lib=$(ocamlc -where)
+ local myconf=(
+ -prefix /usr
+ -bindir /usr/bin
+ -libdir /usr/$(get_libdir)/coq
+ -mandir /usr/share/man
+ -emacslib /usr/share/emacs/site-lisp
+ -coqdocdir /usr/$(get_libdir)/coq/coqdoc
+ -docdir /usr/share/doc/${PF}
+ -configdir /etc/xdg/${PN}
+ -lablgtkdir ${ocaml_lib}/lablgtk2
+ )
+
+ use debug && myconf+=( -debug )
+ use doc || myconf+=( -with-doc no )
+
+ if use gtk; then
+ if use ocamlopt; then
+ myconf+=( -coqide opt )
+ else
+ myconf+=( -coqide byte )
+ fi
+ else
+ myconf+=( -coqide no )
+ fi
+
+ use ocamlopt || myconf+=( -byte-only )
+
+ if use camlp5; then
+ myconf+=( -usecamlp5 -camlp5dir ${ocaml_lib}/camlp5 )
+ else
+ myconf+=( -usecamlp4 )
+ fi
+
+ export CAML_LD_LIBRARY_PATH="${S}/kernel/byterun/"
+ ./configure ${myconf[@]} || die "configure failed"
+}
+
+src_compile() {
+ emake STRIP="true" -j1 world VERBOSE=1
+}
+
+src_test() {
+ emake STRIP="true" check VERBOSE=1
+}
+
+src_install() {
+ emake STRIP="true" COQINSTALLPREFIX="${D}" install VERBOSE=1
+ dodoc README.md CREDITS CHANGES
+
+ use gtk && make_desktop_entry "coqide" "Coq IDE" "${EPREFIX}/usr/share/coq/coq.png"
+}
diff --git a/sci-mathematics/coq/metadata.xml b/sci-mathematics/coq/metadata.xml
new file mode 100644
index 000000000000..1bf44c44c547
--- /dev/null
+++ b/sci-mathematics/coq/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ml@gentoo.org</email>
+ <name>Gentoo ML Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Developed in the LogiCal project, the Coq tool is a formal proof
+ management system: a proof done with Coq is mechanically checked
+ by the machine.
+ In particular, Coq allows:
+ * the definition of functions or predicates,
+ * to state mathematical theorems and software specifications,
+ * to develop interactively formal proofs of these theorems,
+ * to check these proofs by a small certification "kernel".
+ Coq is based on a logical framework called "Calculus of Inductive
+ Constructions" extended by a modular development system for
+ theories.
+</longdescription>
+ <use>
+ <flag name="camlp5">Build using camlp5. This is required for some plugins like Ssreflect.</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/cvc3/Manifest b/sci-mathematics/cvc3/Manifest
new file mode 100644
index 000000000000..b5293cb82616
--- /dev/null
+++ b/sci-mathematics/cvc3/Manifest
@@ -0,0 +1,8 @@
+AUX 50cvc3-gentoo.el 164 SHA256 1fbca0f0a0556eb5fc1d8ba4361f2143bc7fe81b08c21c1da752121ea3d25b90 SHA512 bba873dfaeadc821ffc41168df51a0e0d5c0d038f60a36ba4f74c83d0ef8fb4ff3089cb587b680d5058c7fcddad2585c1e913cb25d8e2256cccda5872f017d07 WHIRLPOOL ba6691a596a47670d0b143e957f10112de18493df013c9ffa8f232f0e7450adcea184a60246a44286976ddc683954354ecd985481a0407df83359d8b5bb07ccb
+AUX cvc3-2.4.1-gccv6-fix.patch 2907 SHA256 2218a10ba315200a0cf6d436999a8840913add7b6e030948daac4b40b5d5e65c SHA512 1e4e54820aa0ff256bc12916be1219961848430d3448ac4e04d4dcab5ba3ef1e056cad1a3c68ba5e9ff4f0f48c5a92e1b2e9e7eb14837265b166abe1228005cf WHIRLPOOL b66be69a05e3031dd8a2dc998503002ffbf8a7a005dd2d33d8f4f220fcc267cf61ddfd5f0c6cdbe499ae0132bb45da5b7435b92379471d02ecd06f3d25298938
+DIST cvc3-2.4.1.tar.gz 1196616 SHA256 d55b1d6006cfbac3f6d4c086964558902c3ed0efa66ac499cfb2193f3ee4acf7 SHA512 48e5cd82b3eb7506d762c2abc8db0c8fbc548575a1362dda53888075ac105a5bc0f0d58dfe01b60f207bc00ff8dfc39a5b3d9317784fe551658c884bb02e1ff2 WHIRLPOOL 9d39dacff010f093685191737d41760a84ac7d12246ddaafbb9f48c78c7bff5697c5e85c62ef44b7dc76f86a55c118c041323c3a1b1953f5c725447795375d93
+EBUILD cvc3-2.4.1-r1.ebuild 4298 SHA256 d1278bb19e75b03b2584d708d3018926c651451491dd8efae4044bb75cb4c784 SHA512 7cc46232b5f2aa148967e13796ed6ba689e5b98bce5677a9efb1492bd97af7a6bf5e6c48d648e15d8e5b035f73a0a8930b66d903c2a57fdc8cabc756681dd252 WHIRLPOOL f9a3ddc4152fb595fbb3487561e6ea454c925b8a4f866246684b55b4d7dd7b190849b2902f1e9b6a84c985c80ebdcd3fad83a7fac7615b376347f6a6e1cbf7dc
+EBUILD cvc3-2.4.1.ebuild 4240 SHA256 a49f42650b8fc3b531c6d331b4eb03edfb9cb5ecd9e018b9790370e2478457a4 SHA512 31329c448ca916bf2c26f712399b85e5da447649850bfef83c0b3c2ae3ac18e531189fa42295c47eb2c24780f7e8fea612ec6af50ee91efb89594baec7208706 WHIRLPOOL 11812d6657060b8f31450c8a99c74d69a447cc3295af8b623e15201afdc8fb5c611a1e00d6b3bb37d1cc22d5df56a611d7d4e38305623dc3b1139a33db86c9a6
+MISC ChangeLog 3640 SHA256 1215580f8d4b259ad8d0f139d8ee479e75c32ded4ba8259c1dabfd14ca2e99ff SHA512 a9c188bfa1d03337bc28240476274ba05c1cf2bcfcac94fc9141bdb3dcad7eb262c4599a465287637b6090fb76fd870cc0c882d1c3b097e5f6253dda82cd4c2c WHIRLPOOL d237773b12d969fab388a80c6eaec4150884d3f44734506b5356bf4c9f7f081613531da0f99483fd3648d91de6ce3d9eba303cdb6b2b2ace58ca7a7f23b5ffb5
+MISC ChangeLog-2015 1461 SHA256 9a76013008472466d700fdb89bbd50a763bc87dec872ecfd4f93d590fd3ac69c SHA512 48f5075521f141a27d2f33bd3b9d5e3230f509dd17d171924a9505492d8a3a2a48b703ce5c56a677b67337cbfc8cfa722f2eada7f93915ee8ef106574202c8fc WHIRLPOOL 1828e770765b900329b0680f9da2d7633bc75076212fc148cebce7d208f59f20185f07a873508dadd1e14f559551359ef02c35219d7eedeadc9422ef4685eba5
+MISC metadata.xml 1806 SHA256 421b2a561d7853f7e1fe24347048417973d07415cf8960ab98141fe5f8da72ee SHA512 7717a3e172f56cdac0c6716e2c776578fc5e5ee35dad288c605d28034eca54049414e7450d9b2a7d17869f3cdd0da41f61e407c5cd52fef2f3fa225e3e99133f WHIRLPOOL 1cfe5761f0a78064efa29b98b5e0a957cc7eadd39c6ef1bc33d1fb07aa5ee5e4fe15227d2956ef8d765229c3c0c3d9a4edcd9fd4e1ee7ee3b3d564d74fe90dbf
diff --git a/sci-mathematics/cvc3/cvc3-2.4.1-r1.ebuild b/sci-mathematics/cvc3/cvc3-2.4.1-r1.ebuild
new file mode 100644
index 000000000000..b51969ee713f
--- /dev/null
+++ b/sci-mathematics/cvc3/cvc3-2.4.1-r1.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit elisp-common
+
+DESCRIPTION="CVC3 is a theorem prover for Satisfiability Modulo Theories (SMT) problems"
+HOMEPAGE="http://www.cs.nyu.edu/acsys/cvc3/index.html"
+SRC_URI="http://www.cs.nyu.edu/acsys/cvc3/releases/2.4.1/${P}.tar.gz"
+
+LICENSE="BSD MIT HPND zchaff? ( zchaff )"
+RESTRICT="mirror zchaff? ( bindist )"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc emacs isabelle test zchaff"
+
+RDEPEND="dev-libs/gmp:0=
+ isabelle? ( >=sci-mathematics/isabelle-2011.1-r1:= )"
+DEPEND="${RDEPEND}
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz
+ )
+ emacs? (
+ virtual/emacs
+ )"
+
+SITEFILE="50${PN}-gentoo.el"
+
+PATCHES=( "${FILESDIR}/${P}-gccv6-fix.patch" )
+
+src_prepare() {
+ default
+
+ sed -e 's#prefix=@prefix@#prefix=$(patsubst %/,%,$(DESTDIR))@prefix@#' \
+ -e 's#libdir=@libdir@#libdir=$(patsubst %/,%,$(DESTDIR))@libdir@#' \
+ -e 's#mandir=@mandir@#mandir=$(patsubst %/,%,$(DESTDIR))@mandir@#' \
+ -i "${S}/Makefile.local.in" \
+ || die "Could not set DESTDIR in Makefile.local.in"
+}
+
+src_configure() {
+ # --enable-static disables building of shared libraries, statically
+ # links /usr/bin/cvc3 and installs static libraries.
+ # --enable-static --enable-sharedlibs behaves the same as just --enable-static
+ econf \
+ --enable-dynamic \
+ $(use_enable zchaff)
+
+ if use test; then
+ sed -e 's@LD_LIBS = @LD_LIBS = -L'"${S}"'/lib -Wl,-R'"${S}"'/lib @' \
+ -i "${S}/test/Makefile" \
+ || die "Could not set library paths in test/Makefile"
+ fi
+}
+
+src_compile() {
+ emake
+
+ use doc && emake -C doc
+
+ if use emacs; then
+ pushd emacs >/dev/null || die
+ elisp-compile *.el || die "emacs elisp compile failed"
+ popd >/dev/null || die
+ fi
+
+ use test && emake -C test
+}
+
+src_test() {
+ pushd test >/dev/null || die
+ ./bin/test || die "Testsuite failed"
+ popd >/dev/null || die
+}
+
+src_install() {
+ use doc && local HTML_DOCS=( doc/html/*.{html,gif,png,css} )
+ default
+
+ if use emacs; then
+ elisp-install ${PN} emacs/*.{el,elc}
+ cp "${FILESDIR}"/${SITEFILE} "${S}" || die "Failed to copy Emacs files"
+ elisp-site-file-install ${SITEFILE}
+ fi
+
+ if use isabelle; then
+ ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \
+ || die "isabelle getenv ISABELLE_HOME failed"
+ [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
+ dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ cat >> settings <<- EOF || die "Failed to create Isabelle configuration for CVC3"
+ CVC3_COMPONENT="\$COMPONENT"
+ CVC3_HOME="${EPREFIX}/usr/bin"
+ CVC3_SOLVER="\$CVC3_HOME/cvc3"
+ CVC3_REMOTE_SOLVER="cvc3"
+ CVC3_INSTALLED="yes"
+ EOF
+ insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ doins settings
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ if use isabelle; then
+ if [[ -f "${EROOT%/}/etc/isabelle/components" ]]; then
+ if egrep "contrib/${PN}-[0-9.]*" "${EROOT%/}/etc/isabelle/components"; then
+ sed -e "/contrib\/${PN}-[0-9.]*/d" \
+ -i "${EROOT%/}/etc/isabelle/components" || die "Failed to remove old CVC3 registrations in Isabelle"
+ fi
+ cat >> "${EROOT%/}/etc/isabelle/components" <<- EOF || die "Failed to register CVC3 with Isabelle"
+ contrib/${PN}-${PV}
+ EOF
+ fi
+ fi
+ if use zchaff; then
+ einfo "This copy of CVC3 is also configured to use the SAT solver zchaff whose"
+ einfo "copyright is owned by Princeton University and is more restrictive."
+ einfo "Specifically, it may be used for internal, noncommercial, research purposes"
+ einfo "only. See the copyright notices from the zchaff source files which are"
+ einfo "included in the LICENSE file."
+ einfo "To build CVC3 without these files, please build cvc3 without the zchaff"
+ einfo "use flag (note: zchaff is disabled by default):"
+ einfo "USE=-zchaff emerge sci-mathemathematics/cvc3"
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+ if use isabelle; then
+ if [[ ! -f "${EROOT%/}/usr/bin/cvc3" && -f "${EROOT%/}/etc/isabelle/components" ]]; then
+ # Note: this sed should only match the version of this ebuild
+ # Which is what we want as we do not want to remove the line
+ # of a new CVC3 being installed during an upgrade.
+ sed -e "/contrib\/${PN}-${PV}/d" \
+ -i "${EROOT%/}/etc/isabelle/components" || die "Failed to unregister CVC3 from Isabelle"
+ fi
+ fi
+}
diff --git a/sci-mathematics/cvc3/cvc3-2.4.1.ebuild b/sci-mathematics/cvc3/cvc3-2.4.1.ebuild
new file mode 100644
index 000000000000..4352e6377d2c
--- /dev/null
+++ b/sci-mathematics/cvc3/cvc3-2.4.1.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit elisp-common
+
+DESCRIPTION="CVC3 is a theorem prover for Satisfiability Modulo Theories (SMT) problems"
+HOMEPAGE="http://www.cs.nyu.edu/acsys/cvc3/index.html"
+SRC_URI="http://www.cs.nyu.edu/acsys/cvc3/releases/2.4.1/${P}.tar.gz"
+
+LICENSE="BSD MIT HPND zchaff? ( zchaff )"
+RESTRICT="mirror zchaff? ( bindist )"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc emacs isabelle test zchaff"
+
+RDEPEND="dev-libs/gmp:0=
+ isabelle? (
+ >=sci-mathematics/isabelle-2011.1-r1:=
+ )"
+DEPEND="${RDEPEND}
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz
+ )
+ emacs? (
+ virtual/emacs
+ )"
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ sed -e 's#prefix=@prefix@#prefix=$(patsubst %/,%,$(DESTDIR))@prefix@#' \
+ -e 's#libdir=@libdir@#libdir=$(patsubst %/,%,$(DESTDIR))@libdir@#' \
+ -e 's#mandir=@mandir@#mandir=$(patsubst %/,%,$(DESTDIR))@mandir@#' \
+ -i "${S}/Makefile.local.in" \
+ || die "Could not set DESTDIR in Makefile.local.in"
+}
+
+src_configure() {
+ # --enable-static disables building of shared libraries, statically
+ # links /usr/bin/cvc3 and installs static libraries.
+ # --enable-static --enable-sharedlibs behaves the same as just --enable-static
+ econf \
+ --enable-dynamic \
+ $(use_enable zchaff)
+
+ if use test; then
+ sed -e 's@LD_LIBS = @LD_LIBS = -L'"${S}"'/lib -Wl,-R'"${S}"'/lib @' \
+ -i "${S}/test/Makefile" \
+ || die "Could not set library paths in test/Makefile"
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use doc; then
+ pushd doc || die "Could not cd to doc"
+ emake
+ popd
+ fi
+
+ if use emacs ; then
+ pushd "${S}/emacs" || die "Could change directory to emacs"
+ elisp-compile *.el || die "emacs elisp compile failed"
+ popd
+ fi
+
+ if use test; then
+ pushd test || die "Could not cd to test"
+ emake
+ popd
+ fi
+}
+
+src_test() {
+ pushd test || die "Could not cd to test"
+ ./bin/test || die "tests failed"
+ popd
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use doc; then
+ pushd "${S}"/doc/html || die "Could not cd to doc/html"
+ dohtml *.html
+ insinto /usr/share/doc/${PF}/html
+ doins *.css *.gif *.png
+ popd
+ fi
+
+ if use emacs ; then
+ elisp-install ${PN} emacs/*.{el,elc}
+ cp "${FILESDIR}"/${SITEFILE} "${S}"
+ elisp-site-file-install ${SITEFILE}
+ fi
+
+ if use isabelle; then
+ ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \
+ || die "isabelle getenv ISABELLE_HOME failed"
+ [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
+ dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ cat <<- EOF >> "${S}/settings"
+ CVC3_COMPONENT="\$COMPONENT"
+ CVC3_HOME="${ROOT}usr/bin"
+ CVC3_SOLVER="\$CVC3_HOME/cvc3"
+ CVC3_REMOTE_SOLVER="cvc3"
+ CVC3_INSTALLED="yes"
+ EOF
+ insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ doins "${S}/settings"
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+ if use isabelle; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
+ sed -e "/contrib\/${PN}-[0-9.]*/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ cat <<- EOF >> "${ROOT}etc/isabelle/components"
+ contrib/${PN}-${PV}
+ EOF
+ fi
+ fi
+ if use zchaff; then
+ einfo "This copy of CVC3 is also configured to use the SAT solver zchaff whose"
+ einfo "copyright is owned by Princeton University and is more restrictive."
+ einfo "Specifically, it may be used for internal, noncommercial, research purposes"
+ einfo "only. See the copyright notices from the zchaff source files which are"
+ einfo "included in the LICENSE file."
+ einfo "To build CVC3 without these files, please build cvc3 without the zchaff"
+ einfo "use flag (note: zchaff is disabled by default):"
+ einfo "USE=-zchaff emerge sci-mathemathematics/cvc3"
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+ if use isabelle; then
+ if [ ! -f "${ROOT}usr/bin/cvc3" ]; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ # Note: this sed should only match the version of this ebuild
+ # Which is what we want as we do not want to remove the line
+ # of a new CVC3 being installed during an upgrade.
+ sed -e "/contrib\/${PN}-${PV}/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ fi
+ fi
+}
diff --git a/sci-mathematics/cvc3/files/50cvc3-gentoo.el b/sci-mathematics/cvc3/files/50cvc3-gentoo.el
new file mode 100644
index 000000000000..8e046edf7ad1
--- /dev/null
+++ b/sci-mathematics/cvc3/files/50cvc3-gentoo.el
@@ -0,0 +1,3 @@
+(add-to-list 'load-path "@SITELISP@")
+(add-to-list 'auto-mode-alist '("\\.cvc\\'" . cvc-mode))
+(autoload 'cvc-mode "cvc-mode" "CVC specifications editing mode." t)
diff --git a/sci-mathematics/cvc3/files/cvc3-2.4.1-gccv6-fix.patch b/sci-mathematics/cvc3/files/cvc3-2.4.1-gccv6-fix.patch
new file mode 100644
index 000000000000..1fb3516b8c27
--- /dev/null
+++ b/sci-mathematics/cvc3/files/cvc3-2.4.1-gccv6-fix.patch
@@ -0,0 +1,76 @@
+commit 4eb28b907e89be05d92eb704115f821b9b848e60
+Author: Matthew Dawson <matthew@mjdsystems.ca>
+Date: Sun Oct 16 22:06:03 2016 -0400
+
+ Fix gcc v6 compile failures.
+
+ * Use std::hash<const char*> over std::hash<char *>, as throwing away the const is not allowed.
+ * Use Hash::hash by default in CDMap over std::hash, to get Hash::hash<CVC3::expr>
+
+diff --git a/src/expr/expr_value.cpp b/src/expr/expr_value.cpp
+index 0c85ff6..e4dd251 100644
+--- a/src/expr/expr_value.cpp
++++ b/src/expr/expr_value.cpp
+@@ -29,7 +29,7 @@ namespace CVC3 {
+ // Class ExprValue static members
+ ////////////////////////////////////////////////////////////////////////
+
+-std::hash<char*> ExprValue::s_charHash;
++std::hash<const char*> ExprValue::s_charHash;
+ std::hash<long int> ExprValue::s_intHash;
+
+ ////////////////////////////////////////////////////////////////////////
+diff --git a/src/include/cdmap.h b/src/include/cdmap.h
+index faf682a..c3b094c 100644
+--- a/src/include/cdmap.h
++++ b/src/include/cdmap.h
+@@ -43,9 +43,9 @@ namespace CVC3 {
+ // Auxiliary class: almost the same as CDO (see cdo.h), but on
+ // setNull() call it erases itself from the map.
+
+-template <class Key, class Data, class HashFcn = std::hash<Key> > class CDMap;
++template <class Key, class Data, class HashFcn = Hash::hash<Key> > class CDMap;
+
+-template <class Key, class Data, class HashFcn = std::hash<Key> >
++template <class Key, class Data, class HashFcn = Hash::hash<Key> >
+ class CDOmap :public ContextObj {
+ Key d_key;
+ Data d_data;
+diff --git a/src/include/expr_hash.h b/src/include/expr_hash.h
+index b2107d7..baa2eab 100644
+--- a/src/include/expr_hash.h
++++ b/src/include/expr_hash.h
+@@ -20,7 +20,6 @@
+ * hash_set over Expr class.
+ */
+ /*****************************************************************************/
+-
+ #ifndef _cvc3__expr_h_
+ #include "expr.h"
+ #endif
+diff --git a/src/include/expr_value.h b/src/include/expr_value.h
+index 95102b2..f53aa4d 100644
+--- a/src/include/expr_value.h
++++ b/src/include/expr_value.h
+@@ -179,7 +179,7 @@ protected:
+ // Static hash functions. They don't depend on the context
+ // (ExprManager and such), so it is still thread-safe to have them
+ // static.
+- static std::hash<char*> s_charHash;
++ static std::hash<const char*> s_charHash;
+ static std::hash<long int> s_intHash;
+
+ static size_t pointerHash(void* p) { return s_intHash((long int)p); }
+diff --git a/src/theory_core/theory_core.cpp b/src/theory_core/theory_core.cpp
+index df5289f..37ccab9 100644
+--- a/src/theory_core/theory_core.cpp
++++ b/src/theory_core/theory_core.cpp
+@@ -710,7 +710,7 @@ TheoryCore::TheoryCore(ContextManager* cm,
+ // d_termTheorems(cm->getCurrentContext()),
+ d_predicates(cm->getCurrentContext()),
+ d_solver(NULL),
+- d_simplifyInPlace(false),
++ d_simplifyInPlace(NULL),
+ d_currentRecursiveSimplifier(NULL),
+ d_resourceLimit(0),
+ d_timeBase(0),
diff --git a/sci-mathematics/cvc3/metadata.xml b/sci-mathematics/cvc3/metadata.xml
new file mode 100644
index 000000000000..cb6781b3e6dd
--- /dev/null
+++ b/sci-mathematics/cvc3/metadata.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>gienah@gentoo.org</email>
+ <name>Mark Wright</name>
+</maintainer>
+<maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+</maintainer>
+<longdescription lang="en">
+CVC3 is an automatic theorem prover for Satisfiability Modulo Theories
+(SMT) problems. It can be used to prove the validity (or, dually, the
+satisfiability) of first-order formulas in a large number of built-in
+logical theories and their combination.
+
+CVC3 is the last offspring of a series of popular SMT provers, which
+originated at Stanford University with the SVC system. In particular,
+it builds on the code base of CVC Lite, its most recent
+predecessor. Its high level design follows that of the Sammy prover.
+
+CVC3 works with a version of first-order logic with polymorphic types
+and has a wide variety of features including:
+
+ several built-in base theories: rational and integer linear
+ arithmetic, arrays, tuples, records, inductive data types, bit
+ vectors, and equality over uninterpreted function symbols;
+ support for quantifiers;
+ an interactive text-based interface;
+ a rich C and C++ API for embedding in other systems;
+ proof and model generation abilities;
+ predicate subtyping;
+ essentially no limit on its use for research or commercial
+ purposes (see license).
+</longdescription>
+<use>
+ <flag name="isabelle">Add integration support for the Isabelle/HOL
+ theorem prover.</flag>
+ <flag name="zchaff">Use the SAT solver zchaff whose copyright is
+ owned by Princeton University and is more restrictive (see zchaff
+ license).
+ </flag>
+</use>
+</pkgmetadata>
diff --git a/sci-mathematics/dataplot/Manifest b/sci-mathematics/dataplot/Manifest
new file mode 100644
index 000000000000..307de159682f
--- /dev/null
+++ b/sci-mathematics/dataplot/Manifest
@@ -0,0 +1,14 @@
+AUX 90dataplot 75 SHA256 a0e547d52eca3ec872bd996712e93d550d65f66a693416ce6944504cab78df6c SHA512 5791dee87c98c13da3454d530f4290a130f426175e15efe1b8803d0436f867f49bdff13040df30168279d8eedf5268066f53d242a59ebd6bf7fd34d2e96073ac WHIRLPOOL e6b2d629df8b4b9e1d427ab6daf30e8316bda08abc00000dbe42c6afa62535a1766d80bbd1cfdfe579691fddf2e5eeb144b15bbcf6b81f2bec95c24ff0f3b5d8
+AUX Makefile.am.20090821 1360 SHA256 e37e969a56ef87e344bfc84444bbc4658bebe4babaf8efcb87f5dc4e4ef19a10 SHA512 0e6dc0595318bd411217093f36c4de47929d97102afe18869602f0866e1e07810814c483f5091ac3e511104defaaec6f1595826c5245d8086ee697bef2817c81 WHIRLPOOL 64a808f5202f08fc3a12daf2f506a85ab3f942c3dafb4fcfd870787af6255bc3a57b7266c9c3ae09067fa72471f96b98535589c37be54d1d7b4c14379afaf937
+AUX Makefile.am.20131220 1370 SHA256 43bf3243b5fd509cb7da07993429b87cee04b59fe09ed5eb39a0b1532619fa94 SHA512 d6081620833d3bf739b03c50f873c48f88acb2c10802f3ad0a946449f861eb3022f57e5536b90c71183dbca5c075ab230419be437e18e57c200a3f9d9a52dbed WHIRLPOOL bf04577d7ca7fb51471111c0199bc5f2d0d694ec86a3b994de17d4be8af70ab5f8106ccf79c107aaab25ffb868658b0aecc09c964d9ef9157c3fe75035eb8960
+AUX configure.ac.20090821 2282 SHA256 f5223e1e740e6d235b4c882c1f7671f477ee0fced083e1448d9144659601a499 SHA512 85f187133a6e38a491b4c998a51d01308e68e94dff99e04fba291debca2f20ce349cf864b47778f4e01c88ae5dcb8a18ef077209a4e446c00159c6343aaeb17a WHIRLPOOL 735fdef865db721f0e6e76acc33f44a49d7f3b1702e6b54540048bea72ce4b31eab30ed936378a268c926cf26bebb2a8b9c833e9e515125b78817147037d34db
+AUX configure.ac.20131220 2282 SHA256 9ef382818a294369d18d5fe0aa45386c2834e0d04aea12ed5cb139029930ee36 SHA512 db4742468d9530c8103e54b4ccb4f0b3435e90bde6d692ed26f4677244bf7ce0b1f31bd5ee6fc58a493e3676693cef2513e42685881eabe48ff4ff1c94ff165e WHIRLPOOL 07c604f279ff62a253436e10646bf87f83bae0b4129f53cebb52aaef6095a91149948a8833efeb898e6c8d7bf4ea57cb2239af842f2cdadec7c2ae46a55e96d0
+AUX dataplot-20090821-opengl.patch 1678 SHA256 ff4b5d8d082e9550ae8fb086102020175d9ea299fb315740bf0420f328933de8 SHA512 cff8c08458c6d7ae57faa9e32ccf42b42adb9797b6b514aa597c34d5067935fefb5d1da9abf14ea2a74c17d3862d6b844f2e244895fb167fbce0b7b352f5dc07 WHIRLPOOL ff4e7181341a0e4ea9947234cb16a6112efc5704f046e090160469ff0f1731614d8c589481b58dbb072e3e1d495a62c410a4d6d8819282f17015d46bd1f5a204
+DIST dplib.2009_07_15.tar.gz 7507367 SHA256 bb1dce97fbcec611cabe636bbdf20efa77c191b84e9c3db621554daea831f00d SHA512 5e4e6c866a5690c3f67b322d53b6bf1bec33c488a99c95f360ce74785a57286541945fdcab5cbbacb04039046f5ba94aeaf8112b80aa34ed2c2cf04abc6f7d40 WHIRLPOOL f531fe7fa4ef3f2ffb65777dd2e5d08f68fd32f5fcf7fbae19db2e5e015e9aba88577c71e9f4dac1f638d8fccf749b0a9c13fd30f7950a7f24669caed5e7e8b1
+DIST dpsrc_2009_08_21.tar.gz 6656048 SHA256 ee47746fb28b88a5a0affa6a51a0e10c9350b1dc28977ecbee19d64a1e204cd4 SHA512 1e655c6832b724b9f69692f28f5497fb4064d208cde5462c4bd73c8d255605ba62b9b703f5ea32bbe7506b18ccd0ad5c4c2556381fbebdb6e05ce51625a4a339 WHIRLPOOL 7ed6951206cd35e449123bd8863f7b3ae26fbcf947156fb6b018aa200768c72861feca65392740303da644c33738d442aa59cab7a09ddb2bcc6dd9dcff70d003
+DIST dpsrc_2013_12_20.tar.gz 6761551 SHA256 419f2a672e2fcc076d95bb67f5c2a9c05a66dc1f697c729b52cddb860e83ae12 SHA512 a62df14f3ec59ccae4ead52b34adfc6e881ade1397e5a31b8a73c9740e7a2245317fef4f9756224c8d2fb57799c2247b15f6c4d65777de6302553fd138bb4083 WHIRLPOOL d43e99f2cc59d483f4f7843b532d324b94ec6d75c5ddd42f737570e5b058da2d8f874bea387627f6a87949677607769bf1e6c32103ed706980617ca77483955e
+EBUILD dataplot-20090821.ebuild 1994 SHA256 4b93d255931f45b17743c1ecb7cfaff4f2ce87109836de60d16f4c0f45f83fcf SHA512 fbc70e994352c44b3f8a238757e2c4876fabeac9f034ec57cbacd26d01cc070535cef84e758562e4e2b47b792e1ffbe41bc3cb5811e416fa5de176f5c3394ac3 WHIRLPOOL 7ab24d8066955a00472c94f1f78b413a6a8e059ab2f9bff8ffad50a91a615a7f465944daec1ad559c65f8103c5de16966578f1452e581850f8b7f5ea7ce79ba5
+EBUILD dataplot-20131220.ebuild 2019 SHA256 6b0216f0731681d4a047f816dcb54fe23003db710ffa21dfb447f44bd66e6b60 SHA512 a8156a6640185313fda0f3092b5372eb8d771fd118626893addecd258efc624d0f26bed9206a133c962f1f655c7b138586e2c0f307137e4a465fc5b376e21db3 WHIRLPOOL b98bbad683f97c6bcb9e0275bb41722a03d8f2ddd608aeb297a9eeb0bbe8a8ccfcaa03af3d3f673a5431db637cbbc7d0651d61015a4a31183f18aadf56a2383b
+MISC ChangeLog 3153 SHA256 61980f6b3ef3f9c0360c0d5d00fd6fd8cc1d783fc3ce8e269809120e18a08273 SHA512 e3e1060f8f46545f487e33d3fe229751b84b4b0a87329c023cb6f1148bbe612a8353e89c393a22eba09c05a5b7091f02a04a0e5b9efaa41469ce25ea553102d7 WHIRLPOOL dafea2305cae85bb50f8d131ffef130f60d5a2948a749de38b2aa3ebae6dff92e6776590136f80c12dd9e9d064c0a9512723d427e584e45d47ae6455a4313526
+MISC ChangeLog-2015 6577 SHA256 8eb29827b261899faf47f5c4645512b01d2995ac9f2851c0a7937292aeac5e9e SHA512 4c78f23ee0b112ea7f5465864c896b4b1d2e0d0d5f29298709e8f2d465e4fb22bc648337cd51d993d5d38a8fbb5b213cd348ac628bd1e90a0030e7d1129bf892 WHIRLPOOL 6a10c45303523ad31e719b8774e248ffa87c11bba78bd930f93fb2282b1535c65530b88cbb8b8b30a7e90c7eba175ae7c57e0c9b5f25eac7ca352e3ce166793c
+MISC metadata.xml 729 SHA256 1f3c9d4cae4c86a89e00c294962b917e461b72c726f7f0d236bc10185a6ead6c SHA512 9e3ff791dba6c01cf997c725c10b4dc614c2785faba67504b68d9295eed65110be5cde92588ba9a3d89842a62709ac4ff69fda03f87e8929b21e5ec1335beb19 WHIRLPOOL 55543353e269d5caee029272f9316df5e85c9e9530ce33f3ae3b519d0a9940d5bc5a2941b2635b5ab65d0faa988c6baae99c1f2edb50c956de639b41e0926274
diff --git a/sci-mathematics/dataplot/dataplot-20090821.ebuild b/sci-mathematics/dataplot/dataplot-20090821.ebuild
new file mode 100644
index 000000000000..1bfc53057aa1
--- /dev/null
+++ b/sci-mathematics/dataplot/dataplot-20090821.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fortran-2 toolchain-funcs autotools
+
+# YEAR MONTH DAY
+MY_PV=${PV:0:4}_${PV:4:2}_${PV:6:2}
+MY_P=dpsrc_${MY_PV}
+# MY_PV_AUX usually ${MY_PV}
+MY_PV_AUX=2009_07_15
+MY_P_AUX=dplib.${MY_PV_AUX}
+
+DESCRIPTION="Program for scientific visualization and statistical analyis"
+HOMEPAGE="http://www.itl.nist.gov/div898/software/dataplot/"
+SRC_URI="
+ ftp://ftp.nist.gov/pub/dataplot/unix/${MY_P}.tar.gz
+ ftp://ftp.nist.gov/pub/dataplot/unix/${MY_P_AUX}.tar.gz"
+
+SLOT="0"
+LICENSE="public-domain"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples gd opengl X"
+
+REQUIRED_USE="opengl? ( X )"
+
+COMMON_DEPEND="
+ media-libs/plotutils
+ opengl? ( virtual/opengl )
+ gd? ( media-libs/gd[png,jpeg] )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+RDEPEND="${COMMON_DEPEND}
+ X? ( x11-misc/xdg-utils )"
+
+S="${WORKDIR}/${MY_P}"
+S_AUX="${WORKDIR}/${MY_P_AUX}"
+
+src_unpack() {
+ # unpacking and renaming because
+ # upstream does not use directories
+ mkdir "${S_AUX}" || die
+ pushd "${S_AUX}" > /dev/null || die
+ unpack ${MY_P_AUX}.tar.gz
+ popd > /dev/null || die
+ mkdir ${MY_P} || die
+ cd "${S}" || die
+ unpack ${MY_P}.tar.gz
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-opengl.patch
+ cp "${FILESDIR}"/Makefile.am.${PV} Makefile.am || die
+ cp "${FILESDIR}"/configure.ac.${PV} configure.ac || die
+ sed -e "s:IHOST1='SUN':IHOST1='@HOST@:" \
+ -e "s:/usr/local/lib:@datadir@:g" \
+ dp1_linux.f > dp1_linux.f.in || die
+ sed -e "s/(MAXOBV=.*)/(MAXOBV=@MAXOBV@)/" \
+ -e "s:/usr/local/lib:@datadir@:g" \
+ DPCOPA.INC > DPCOPA.INC.in || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable gd) \
+ $(use_enable opengl gl) \
+ $(use_enable X)
+}
+
+src_install() {
+ default
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r "${S_AUX}"/data/*
+ fi
+ insinto /usr/share/dataplot
+ doins "${S_AUX}"/dp{mes,sys,log}f.tex
+ doenvd "${FILESDIR}"/90${PN}
+}
diff --git a/sci-mathematics/dataplot/dataplot-20131220.ebuild b/sci-mathematics/dataplot/dataplot-20131220.ebuild
new file mode 100644
index 000000000000..b021da235fa7
--- /dev/null
+++ b/sci-mathematics/dataplot/dataplot-20131220.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils fortran-2 toolchain-funcs autotools
+
+# YEAR MONTH DAY
+MY_PV=${PV:0:4}_${PV:4:2}_${PV:6:2}
+MY_P=dpsrc_${MY_PV}
+# MY_PV_AUX usually ${MY_PV}
+MY_PV_AUX=2009_07_15
+MY_P_AUX=dplib.${MY_PV_AUX}
+
+DESCRIPTION="Program for scientific visualization and statistical analyis"
+HOMEPAGE="http://www.itl.nist.gov/div898/software/dataplot/"
+SRC_URI="
+ ftp://ftp.nist.gov/pub/dataplot/unix/${MY_P}.tar.gz
+ ftp://ftp.nist.gov/pub/dataplot/unix/${MY_P_AUX}.tar.gz"
+
+SLOT="0"
+LICENSE="public-domain"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples gd opengl X"
+
+REQUIRED_USE="opengl? ( X )"
+
+COMMON_DEPEND="
+ media-libs/plotutils
+ opengl? ( virtual/opengl )
+ gd? ( media-libs/gd[png,jpeg] )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+RDEPEND="${COMMON_DEPEND}
+ X? ( x11-misc/xdg-utils )"
+
+S="${WORKDIR}/${MY_P}"
+S_AUX="${WORKDIR}/${MY_P_AUX}"
+
+PATCHES=( "${FILESDIR}"/${PN}-20090821-opengl.patch )
+
+src_unpack() {
+ # unpacking and renaming because
+ # upstream does not use directories
+ mkdir "${S_AUX}" || die
+ pushd "${S_AUX}" > /dev/null || die
+ unpack ${MY_P_AUX}.tar.gz
+ popd > /dev/null || die
+ mkdir ${MY_P} || die
+ cd "${S}" || die
+ unpack ${MY_P}.tar.gz
+}
+
+src_prepare() {
+ default
+ cp "${FILESDIR}"/Makefile.am.${PV} Makefile.am || die
+ cp "${FILESDIR}"/configure.ac.${PV} configure.ac || die
+ sed -e "s:IHOST1='SUN':IHOST1='@HOST@:" \
+ -e "s:/usr/local/lib:@datadir@:g" \
+ dp1_linux.f > dp1_linux.f.in || die
+ sed -e "s/(MAXOBV=.*)/(MAXOBV=@MAXOBV@)/" \
+ -e "s:/usr/local/lib:@datadir@:g" \
+ DPCOPA.INC > DPCOPA.INC.in || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable gd) \
+ $(use_enable opengl gl) \
+ $(use_enable X)
+}
+
+src_install() {
+ default
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r "${S_AUX}"/data/*
+ fi
+ insinto /usr/share/dataplot
+ doins "${S_AUX}"/dp{mes,sys,log}f.tex
+ doenvd "${FILESDIR}"/90${PN}
+}
diff --git a/sci-mathematics/dataplot/files/90dataplot b/sci-mathematics/dataplot/files/90dataplot
new file mode 100644
index 000000000000..9bb5e1dc56d5
--- /dev/null
+++ b/sci-mathematics/dataplot/files/90dataplot
@@ -0,0 +1,3 @@
+DATAPLOT_FILES="/usr/share/dataplot"
+DATAPLOT_WEB="OFF"
+BROWSER="xdg-open"
diff --git a/sci-mathematics/dataplot/files/Makefile.am.20090821 b/sci-mathematics/dataplot/files/Makefile.am.20090821
new file mode 100644
index 000000000000..e10cf41ebd54
--- /dev/null
+++ b/sci-mathematics/dataplot/files/Makefile.am.20090821
@@ -0,0 +1,46 @@
+bin_PROGRAMS = dataplot
+dataplot_SOURCES = dp1_linux.f \
+ dp2.f dp3.f dp4.f dp5.f dp6.f dp7.f dp8.f dp9.f dp10.f dp11.f \
+ dp12.f dp13.f dp14.f dp15.f dp16.f dp17.f dp18.f dp19.f dp20.f dp21.f \
+ dp22.f dp23.f dp24.f dp25.f dp26.f dp27.f dp28.f dp29.f dp30.f dp31.f \
+ dp32.f dp33.f dp34.f dp35.f dp36.f dp37.f dp38.f dp39.f dp40.f dp41.f \
+ dp42.f dp43.f dp44.f dp45.f dp46.f \
+ dpcalc.f dpdds2.f dpdds3.f dpdds.f edinit.f edmai2.f edsear.f edsub.f \
+ edwrst.f fit3b.f starpac.f tcdriv_nopc.f aqua_src.f cluster.f compgeom.f \
+ optimi.f libplot_src.c rldp.c main.f
+
+if ENABLE_GD
+dataplot_SOURCES += gd_src.c
+else
+dataplot_SOURCES += gd_src.f
+endif
+
+if ENABLE_GL
+dataplot_SOURCES += gl_src.c
+else
+dataplot_SOURCES += gl_src.f
+endif
+
+if ENABLE_X11
+dataplot_SOURCES += x11_src.c
+else
+dataplot_SOURCES += x11src.f
+endif
+
+dataplot_CFLAGS = @GL_CFLAGS@
+dataplot_LDADD = @GD_LIBS@ @GL_LIBS@ @X11_LIBS@ $(FLIBS) -lreadline
+
+# this is to remove ambiguity between the similar filenames
+# of the c and f77 version (shortcoming of automake)
+# the f77 versions are forced
+# the c versions objects are called dataplot-gd_src.o etc
+gd_src.o: gd_src.f
+ $(F77COMPILE) -c -o $@ $<
+gl_src.o: gl_src.f
+ $(F77COMPILE) -c -o $@ $<
+aqua_src.o: aqua_src.f
+ $(F77COMPILE) -c -o $@ $<
+libplot_src.o: libplot_src.f
+ $(F77COMPILE) -c -o $@ $<
+rldp.o: rldp.f
+ $(F77COMPILE) -c -o $@ $<
diff --git a/sci-mathematics/dataplot/files/Makefile.am.20131220 b/sci-mathematics/dataplot/files/Makefile.am.20131220
new file mode 100644
index 000000000000..85e8c493b80f
--- /dev/null
+++ b/sci-mathematics/dataplot/files/Makefile.am.20131220
@@ -0,0 +1,46 @@
+bin_PROGRAMS = dataplot
+dataplot_SOURCES = dp1_linux.f \
+ dp2.f dp3.f dp4.f dp5.f dp6.f dp7.f dp8.f dp9.f dp10.f dp11.f \
+ dp12.f dp13.f dp14.f dp15.f dp16.f dp17.f dp18.f dp19.f dp20.f dp21.f \
+ dp22.f dp23.f dp24.f dp25.f dp26.f dp27.f dp28.f dp29.f dp30.f dp31.f \
+ dp32.f dp33.f dp34.f dp35.f dp36.f dp37.f dp38.f dp39.f dp40.f dp41.f \
+ dp42.f dp43.f dp44.f dp45.f dp46.f \
+ dpcalc.f dpdds2.f dpdds3.f dpdds.f edinit.f edmai2.f edsear.f edsub.f \
+ edwrst.f fit3b.f starpac.f tcdriv_nopc.f aqua_src.f cluster.f compgeom.f \
+ optimi.f libplot_src.c rldp.c main.f gks_src.f
+
+if ENABLE_GD
+dataplot_SOURCES += gd_src.c
+else
+dataplot_SOURCES += gd_src.f
+endif
+
+if ENABLE_GL
+dataplot_SOURCES += gl_src.c
+else
+dataplot_SOURCES += gl_src.f
+endif
+
+if ENABLE_X11
+dataplot_SOURCES += x11_src.c
+else
+dataplot_SOURCES += x11src.f
+endif
+
+dataplot_CFLAGS = @GL_CFLAGS@
+dataplot_LDADD = @GD_LIBS@ @GL_LIBS@ @X11_LIBS@ $(FLIBS) -lreadline
+
+# this is to remove ambiguity between the similar filenames
+# of the c and f77 version (shortcoming of automake)
+# the f77 versions are forced
+# the c versions objects are called dataplot-gd_src.o etc
+gd_src.o: gd_src.f
+ $(F77COMPILE) -c -o $@ $<
+gl_src.o: gl_src.f
+ $(F77COMPILE) -c -o $@ $<
+aqua_src.o: aqua_src.f
+ $(F77COMPILE) -c -o $@ $<
+libplot_src.o: libplot_src.f
+ $(F77COMPILE) -c -o $@ $<
+rldp.o: rldp.f
+ $(F77COMPILE) -c -o $@ $<
diff --git a/sci-mathematics/dataplot/files/configure.ac.20090821 b/sci-mathematics/dataplot/files/configure.ac.20090821
new file mode 100644
index 000000000000..fa9a700aa060
--- /dev/null
+++ b/sci-mathematics/dataplot/files/configure.ac.20090821
@@ -0,0 +1,76 @@
+AC_PREREQ(2.59)
+AC_INIT([dataplot], [20090821], [n.heckert@nist.gov])
+AC_CONFIG_HEADER([config.h])
+AC_CONFIG_AUX_DIR(config)
+AM_MAINTAINER_MODE
+AM_INIT_AUTOMAKE([foreign])
+
+AC_PROG_CC
+AC_PROG_F77
+AC_F77_LIBRARY_LDFLAGS
+case $F77 in
+ *gfortran*) FFLAGS="${FFLAGS} -w -fno-range-check" ;;
+ *) ;;
+esac
+
+AC_CANONICAL_HOST
+case $host in
+ i?86*linux*) MAXOBV=100000 ;;
+ *64*linux*) MAXOBV=1000000 ;;
+esac
+AC_SUBST(MAXOBV)
+
+AC_ARG_ENABLE(gd,
+ [AS_HELP_STRING([--enable-gd], [Enable the gd device driver])],
+ [enable_gd=$enableval],
+ [enable_gd=no])
+
+AC_CHECK_LIB(plot, pl_closepl_r, ,
+ [AC_MSG_ERROR([plotutils libraries not found])])
+
+AC_ARG_ENABLE(gl,
+ [AS_HELP_STRING([--enable-gl], [Enable the OpenGL device driver])],
+ [enable_gl=$enableval],
+ [enable_gl=no])
+
+AC_ARG_ENABLE(X,
+ [AS_HELP_STRING([--enable-X], [Enable the X11 device driver])],
+ [enable_x11=$enableval],
+ [enable_x11=no])
+
+if test x"$enable_gd" = x"yes"; then
+ AC_CHECK_PROG(enable_gd, [gdlib-config],,
+ [AC_MSG_ERROR([GD driver requested but gdlib-config not found])])
+ GD_LIBS="`gdlib-config --libs` -lgd"
+ GD_CFLAGS="`gdlib-config --cflags`"
+ AC_SUBST(GD_LIBS)
+ AC_SUBST(GD_CFLAGS)
+fi
+AM_CONDITIONAL(ENABLE_GD, [test x"$enable_gd" = x"yes"] )
+
+if test x"$enable_gl" = x"yes"; then
+dnl hardcoded opengl libs (should be host/implementation dependent)
+ AC_CHECK_HEADER(GL/gl.h,,
+ [AC_MSG_ERROR([OpenGL driver requested but header gl.h not found])])
+ AC_CHECK_HEADER(GL/glu.h,,
+ [AC_MSG_ERROR([OpenGL driver requested but header glu.h not found])])
+ GL_CFLAGS="-DUNIX_OS -DAPPEND_UNDERSCORE -DSUBROUTINE_CASE"
+ AC_SUBST(GL_CFLAGS)
+
+ AC_CHECK_LIB(GL, glXCreateContext, GL_LIBS="-lGL",
+ [AC_MSG_ERROR([OpenGL driver requested but libraries not found])])
+ AC_CHECK_LIB(GLU, gluPerspective, GL_LIBS="-lGL -lGLU",
+ [AC_MSG_ERROR([OpenGL driver requested but libraries not found])])
+ GL_LIBS="-lGL -lGLU"
+ AC_SUBST(GL_LIBS)
+fi
+AM_CONDITIONAL(ENABLE_GL, [ test x"$enable_gl" = x"yes" ])
+
+if test x"$enable_x11" = x"yes"; then
+ PKG_CHECK_MODULES(X11, x11,,
+ [AC_MSG_ERROR([X11 driver requested but pkgconfig module not found])])
+fi
+AM_CONDITIONAL(ENABLE_X11, [ test x"$enable_x11" = x"yes" ])
+
+AC_CONFIG_FILES([Makefile DPCOPA.INC dp1_linux.f])
+AC_OUTPUT
diff --git a/sci-mathematics/dataplot/files/configure.ac.20131220 b/sci-mathematics/dataplot/files/configure.ac.20131220
new file mode 100644
index 000000000000..e2e1412fbfe8
--- /dev/null
+++ b/sci-mathematics/dataplot/files/configure.ac.20131220
@@ -0,0 +1,76 @@
+AC_PREREQ(2.59)
+AC_INIT([dataplot], [20131220], [n.heckert@nist.gov])
+AC_CONFIG_HEADER([config.h])
+AC_CONFIG_AUX_DIR(config)
+AM_MAINTAINER_MODE
+AM_INIT_AUTOMAKE([foreign])
+
+AC_PROG_CC
+AC_PROG_F77
+AC_F77_LIBRARY_LDFLAGS
+case $F77 in
+ *gfortran*) FFLAGS="${FFLAGS} -w -fno-range-check" ;;
+ *) ;;
+esac
+
+AC_CANONICAL_HOST
+case $host in
+ i?86*linux*) MAXOBV=100000 ;;
+ *64*linux*) MAXOBV=1000000 ;;
+esac
+AC_SUBST(MAXOBV)
+
+AC_ARG_ENABLE(gd,
+ [AS_HELP_STRING([--enable-gd], [Enable the gd device driver])],
+ [enable_gd=$enableval],
+ [enable_gd=no])
+
+AC_CHECK_LIB(plot, pl_closepl_r, ,
+ [AC_MSG_ERROR([plotutils libraries not found])])
+
+AC_ARG_ENABLE(gl,
+ [AS_HELP_STRING([--enable-gl], [Enable the OpenGL device driver])],
+ [enable_gl=$enableval],
+ [enable_gl=no])
+
+AC_ARG_ENABLE(X,
+ [AS_HELP_STRING([--enable-X], [Enable the X11 device driver])],
+ [enable_x11=$enableval],
+ [enable_x11=no])
+
+if test x"$enable_gd" = x"yes"; then
+ AC_CHECK_PROG(enable_gd, [gdlib-config],,
+ [AC_MSG_ERROR([GD driver requested but gdlib-config not found])])
+ GD_LIBS="`gdlib-config --libs` -lgd"
+ GD_CFLAGS="`gdlib-config --cflags`"
+ AC_SUBST(GD_LIBS)
+ AC_SUBST(GD_CFLAGS)
+fi
+AM_CONDITIONAL(ENABLE_GD, [test x"$enable_gd" = x"yes"] )
+
+if test x"$enable_gl" = x"yes"; then
+dnl hardcoded opengl libs (should be host/implementation dependent)
+ AC_CHECK_HEADER(GL/gl.h,,
+ [AC_MSG_ERROR([OpenGL driver requested but header gl.h not found])])
+ AC_CHECK_HEADER(GL/glu.h,,
+ [AC_MSG_ERROR([OpenGL driver requested but header glu.h not found])])
+ GL_CFLAGS="-DUNIX_OS -DAPPEND_UNDERSCORE -DSUBROUTINE_CASE"
+ AC_SUBST(GL_CFLAGS)
+
+ AC_CHECK_LIB(GL, glXCreateContext, GL_LIBS="-lGL",
+ [AC_MSG_ERROR([OpenGL driver requested but libraries not found])])
+ AC_CHECK_LIB(GLU, gluPerspective, GL_LIBS="-lGL -lGLU",
+ [AC_MSG_ERROR([OpenGL driver requested but libraries not found])])
+ GL_LIBS="-lGL -lGLU"
+ AC_SUBST(GL_LIBS)
+fi
+AM_CONDITIONAL(ENABLE_GL, [ test x"$enable_gl" = x"yes" ])
+
+if test x"$enable_x11" = x"yes"; then
+ PKG_CHECK_MODULES(X11, x11,,
+ [AC_MSG_ERROR([X11 driver requested but pkgconfig module not found])])
+fi
+AM_CONDITIONAL(ENABLE_X11, [ test x"$enable_x11" = x"yes" ])
+
+AC_CONFIG_FILES([Makefile DPCOPA.INC dp1_linux.f])
+AC_OUTPUT
diff --git a/sci-mathematics/dataplot/files/dataplot-20090821-opengl.patch b/sci-mathematics/dataplot/files/dataplot-20090821-opengl.patch
new file mode 100644
index 000000000000..c2640db69c85
--- /dev/null
+++ b/sci-mathematics/dataplot/files/dataplot-20090821-opengl.patch
@@ -0,0 +1,47 @@
+--- dpsrc_2013_12_20/gl_src.c.orig 2001-02-28 16:45:56.000000000 -0500
++++ dpsrc_2013_12_20/gl_src.c 2008-04-10 17:03:03.000000000 -0400
+@@ -154,7 +154,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <math.h>
+-#include <strings.h>
++#include <string.h>
+
+ #if UNIX == 0
+ #include <X11/Xlib.h>
+@@ -257,7 +257,7 @@
+ /* flags for current attribute settings */
+ static int OPEN_FLAG = 0; /* 0 - X11 closed, 1 - X11 open */
+ static int OPEN_FLAG_2 = 0; /* 0 - repeat graph window closed, 1 - open */
+-int GRAPH_FLAG = 0; /* 0 - gleras has not been called, 1 - gleras has been called */
++static int GRAPH_FLAG = 0; /* 0 - gleras has not been called, 1 - gleras has been called */
+ int WIDTH_CURRENT; /* current line width */
+ int LINE_STYLE_CURRENT; /* current line style */
+ char FONT_NAME_CURRENT[80]; /* name of current font */
+@@ -922,7 +922,7 @@
+ glNewList(list_id, GL_COMPILE_AND_EXECUTE);
+
+ glClearColor(red_temp,green_temp,blue_temp,1.0);
+- glclear(GL_COLOR_BUFFER_BIT);
++ glClear(GL_COLOR_BUFFER_BIT);
+
+ GRAPH_FLAG = 1;
+ }
+@@ -1486,7 +1486,7 @@
+ * Color only set if being changed.
+ */
+ #if APPEND_UNDERSCORE == 1 && SUBROUTINE_CASE == 1
+-void glseco(jcol, red, green, blue)
++void glseco_(jcol, red, green, blue)
+ #elif APPEND_UNDERSCORE == 1 && SUBROUTINE_CASE == 0
+ void GLSECO_(jcol, red, green, blue)
+ #elif APPEND_UNDERSCORE == 0 && SUBROUTINE_CASE == 1
+@@ -1691,7 +1691,7 @@
+ width = isize[0];
+ #endif
+ if (width < 1.0) width = 1.0;
+- glPointsize(width);
++ glPointSize(width);
+ glBegin(GL_POINTS);
+ #if PRECISION == 0
+ glVertex2f(*ix, *iy);
diff --git a/sci-mathematics/dataplot/metadata.xml b/sci-mathematics/dataplot/metadata.xml
new file mode 100644
index 000000000000..f334283b0e67
--- /dev/null
+++ b/sci-mathematics/dataplot/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">
+ Dataplot is a software system for scientific visualization,
+ statistical analysis, and non-linear modeling. The target Dataplot
+ user is the researcher and analyst engaged in the characterization,
+ modeling, visualization, analysis, monitoring, and optimization of
+ scientific and engineering processes (original version:1978).
+ Gentoo version adds autotools to facilitate building and robustness.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/diagrtb/Manifest b/sci-mathematics/diagrtb/Manifest
new file mode 100644
index 000000000000..d9f0ce56de60
--- /dev/null
+++ b/sci-mathematics/diagrtb/Manifest
@@ -0,0 +1,6 @@
+AUX CMakeLists.txt 364 SHA256 00f44ed116a81a0eda1252505d6c9714a708ee021ab682d32de109d41c03b7d7 SHA512 24938f1b63bd943e6a00829f9a8bffc5774de46926d9d822e14a34b1e718bdfd31d5783fce829632203654aa7508755d5b9afa3c1822d43fcb685b81c3bd155a WHIRLPOOL 7833f801ab40988dddabf6a683dc4c93b2ce57a2ffd4a46927a8d62629a9faf2cad49c1476b891625324b50fda57c752e4f9b7721559be784fce48fd5882691b
+DIST diagrtb-2.64.tar.gz 2429842 SHA256 bbab6ed2f9eeae1c64d0d55764908748a5e321589df81c7d87647623950b7aa0 SHA512 90b1cb40d6d31cf40e27fcd50cdf864e7de036a415c56c1406f6af58339788b6a2f000abe117ad4200d3086f589e4ee916e3a7e2dd52522581de2244ad444a2c WHIRLPOOL 9f4da56b72c0a9152b8873c986d8153cc66916ff62c366b0cbe2b389062738825830ee904d964ddd1bc0dd02f7be342320100a75f373cf76e5a9b422c595022c
+EBUILD diagrtb-2.64.ebuild 711 SHA256 f12a924e6a59e10024143cf363ca35f87e200461aaf2a20b00700f18462e3762 SHA512 9bfd2036a3f3847871f36b51016b630c5f968dde95c9f1b3a7756cdc45a0e5d8718680b451374acbde931336316ab6010caaa215f3155e9f7e4894ede73d1ee8 WHIRLPOOL 272b7f5cf2a0791bca1c38a0170313854b94bdc68c8416dd8c35e646e19d86fe43795eb199ce5399e1f1da4fbede843a9056b06be402fffb838ad52994b2b876
+MISC ChangeLog 2595 SHA256 5d7c9c392b1fba0f8a0c232ac978d112608170569a0b32badc684474a61d8c23 SHA512 4f1f92b4eef21b4115509cd0d6caef17e8b0ee01646eecf84cad6b47be5f6693fc722d823824d8162e249b2620b00a48011ced16462e8ab7c2338f766e21661b WHIRLPOOL db24be25d2147895054bfdfdfecf0c2e14ddce4829cfca6de14fed2d32521c28933e9baea48bd4b521307e1928dbbc3e7660b87b0949ea4a038cb376a8cefec4
+MISC ChangeLog-2015 518 SHA256 a8251e454428276b6404988cb1dca1aa88417155c484e1850e2645b42217b377 SHA512 ccbb829d44197e840979b141bc91e3448d758b32b34643199ed048480d325ca7bb7a9ec868c4de7944f2a1bacfeb4a08092a4711a36930ea2fb3f12c37683387 WHIRLPOOL 7a3fb885ac746aa90e2538047c0322a0d87fbb49010bef3ebfc6a43997857cd2af2e49b48c5aecf92a6d697f93a71bf80a28b03f939488f9ddf74a129f5d85da
+MISC metadata.xml 1227 SHA256 6095dc7cff57d0c081e5dc900402ec4b783721854ce03765faa77c10c5c333a7 SHA512 868e64815be28cc00c952f682e31dd07a6fa2d244a97ab15805be62ad288531284da74aeb4525210477c00952ebe039de503af572ecd1aad0ceef7160a0578fd WHIRLPOOL a5471336efaf972e04b0d8e0347d5100d5b902894ef70a17ca389c8e048f7c7d33704c22b241652d729979701eaf019a375d7182187dbe4c2df3e8872669151b
diff --git a/sci-mathematics/diagrtb/diagrtb-2.64.ebuild b/sci-mathematics/diagrtb/diagrtb-2.64.ebuild
new file mode 100644
index 000000000000..7d68ff7897a9
--- /dev/null
+++ b/sci-mathematics/diagrtb/diagrtb-2.64.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils fortran-2
+
+DESCRIPTION="Calculation of some eigenvectors of a large real, symmetrical, matrix"
+HOMEPAGE="http://ecole.modelisation.free.fr/modes.html"
+SRC_URI="http://ecole.modelisation.free.fr/rtb2011.tar.gz -> ${P}.tar.gz"
+
+LICENSE="all-rights-reserved"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="examples"
+RESTRICT="mirror bindist"
+
+S="${WORKDIR}"/Source_RTB2011
+
+src_prepare() {
+ cp "${FILESDIR}"/CMakeLists.txt . || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DEXAMPLES=$(usex examples)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/sci-mathematics/diagrtb/files/CMakeLists.txt b/sci-mathematics/diagrtb/files/CMakeLists.txt
new file mode 100644
index 000000000000..d1eb6c62f09f
--- /dev/null
+++ b/sci-mathematics/diagrtb/files/CMakeLists.txt
@@ -0,0 +1,13 @@
+cmake_minimum_required (VERSION 2.6)
+project (DIAGRTB Fortran)
+
+option (EXAMPLES "Instal additional example files" OFF)
+
+add_executable(diagrtb diagrtb.f)
+
+install (TARGETS diagrtb DESTINATION bin)
+install (FILES diagrtb.README DESTINATION share/doc/diagrtb)
+
+if ( EXAMPLES )
+ install (DIRECTORY ../Try_RTB2011 DESTINATION share/diagrtb/examples)
+endif (EXAMPLES)
diff --git a/sci-mathematics/diagrtb/metadata.xml b/sci-mathematics/diagrtb/metadata.xml
new file mode 100644
index 000000000000..a8d5288c5ad0
--- /dev/null
+++ b/sci-mathematics/diagrtb/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-chemistry@gentoo.org</email>
+ <name>Gentoo Chemistry Project</name>
+ </maintainer>
+ <longdescription>
+A fortran program for the calculation of some eigenvectors of a large real,
+symmetrical, matrix.
+If the matrix was obtained, for instance, with the PDBMAT program, these
+eigenvectors correspond to the low-frequency normal modes (i.e., mostly
+those with a collective character) of the system. Note that in the case of
+proteins, low-frequency normal modes thus obtained are found to be very close
+to those obtained with standard, much more realistic (e.g., all atoms with
+empirical force fields), models.
+
+The method used rests upon the RTB approximation (standing for
+Rotations-Translations-of-Blocks). Within the frame of this approximation,
+blocks of n (n=1,2,...) consecutive monomers (amino-acid residues) are
+assumed to behave like rigid bodies.
+
+Requirements: a matrix in the "i j non-zero-ij-matrix-element" format.
+A file with the coordinates of the system, in the PDB or "x y z mass
+block-number" format.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/drgeo/Manifest b/sci-mathematics/drgeo/Manifest
new file mode 100644
index 000000000000..43e2da768024
--- /dev/null
+++ b/sci-mathematics/drgeo/Manifest
@@ -0,0 +1,7 @@
+AUX drgeo-1.1.0-gcc45.patch 1111 SHA256 ba8dd0e7a17ad8b2fad7ebba1ce7c4ae3d754d565ba261b7bbda7cddb1b5c9fd SHA512 8a30d6a1e7f11194bfeb04938de594eb81bc89420102b0920f7b3e34d666a36557de5edd2cec064d7383db105c17131247c810753c7f2ee674e7f7b0b28dfa28 WHIRLPOOL 422c219ea139d3f7e3fabdb36c69f0b5fa6fbe05b7f9830bea88ff94a426ed6076937970830e1c825f88653bfa495af76d15d7d876b4a679a744a7215b3568fe
+DIST drgeo-1.1.0.tar.gz 1608361 SHA256 8c93bb637c11ca1647f90e0d97ea03d5938efddc36c2d73b40f15ff8df672216 SHA512 6dee654e674d76e9725ddb4c8b4374c34c93a8cd367ff827f1a8816168a85cabb6341a9b8770659e15f26d3888181b0c13e9d92ee2290df664fda55bed625f6d WHIRLPOOL 85b678a41ea3fff2596ddc45d0a77c81425181cb91ebd27ef8481ad5346035c4b45ecc0387565156708ced574eb9931f2cc835c6605ea5d0491b70b84d4ce81e
+DIST drgeo-doc-1.5.tar.gz 2730242 SHA256 a6453dc630a40dd1c84ed90a7b7ff4fa3806e4e3ce01d149b59df29318255cb2 SHA512 a8010eaca8e5f8aec365317aaec277a61579f217510ffe6c0585371f139f891041388437765d6e67c3373bc87267b864f159067e142f55396a782dec9a61ff54 WHIRLPOOL 94feb51f0a600f1fcd27a9b4fa5216d29e3e39c57e0625772c62848b0b1ac3fd42e2dcebe460456491a55f594b0f29548903f1e82de19a070a8825ed1150dda9
+EBUILD drgeo-1.1.0-r1.ebuild 1092 SHA256 6eb030269158a2d0af87a1c5b0fc509d60550a0f86f3c26273acf0c38b788803 SHA512 4a3659e64216547dc7a8c2764285184d9e68a20cd0db4cbcffa528387dd8b683d34f641a12e37da00e88ff3e047927a838849c3998f9f93b31c13eb70dcf6317 WHIRLPOOL 748e3e060c4e8500a52406ded2ef55ed21ea237c16931f74a2e9801852902f8a60e3c5aae541af74fc05e9c799a6e251b5a0e8b3f6f48094cb0e7d3115faebfa
+MISC ChangeLog 2460 SHA256 c2816e2292b269676092f157d5a2c9dd31b08229bfdb4a1c5d4ba434ac0ea145 SHA512 0a3fc10334c97e758ff37d46ae77d69315768472614cead3327aa171a4aa2ed6fd219a671521266ce3abaa91c82630d0799986a26a10c8715f598d02c1f51865 WHIRLPOOL 8b5686df21a1b1684c2e8edc29756e33d80c0d5060ba6776a7b007a41fee277df515f97be4cd3358dbe67124a11c0a4896988d98ce3fbe5674c07fe7bd89a66b
+MISC ChangeLog-2015 3758 SHA256 2a4aed132d6f625152aaac38ddb1cec69340f9d499fedd446eae581e85e52fa3 SHA512 7b593138a6a8204120e72706ee0509e3b3e7b3d91191c5e59c906be7aee18a44dd5e859dedf215c12bf830fd0f60e5e49e4e64eb250e83018fd4eaa76943ca53 WHIRLPOOL 00cf5c1a89e94dca93fa23f037b819a4a15de2d8b48863befcecdf83fce66c1b7b710e3508377c8af8e9736ee2d00fe1dc341b2615cb364e0679097cb9d9d2b9
+MISC metadata.xml 779 SHA256 fa1bd3621614785628f199a4f64381573fd75e41e49d585dadbe07ae4d39411c SHA512 e448ae0653c511970d6d83a88dadbcaa5d5fe343062d09fbfd23ece82fa27e021bb0b7b4e31e7c94afc7637bd8f946875087a34beaa96b9f87c8a1fbb151b84b WHIRLPOOL f1a524031dec46047beab3cdbd7c80381c7c2d126bb3a0e95ae3c43e55cb394094b37b027d73f3ac1cc9d73137675e7c9adb9e208c72fe0ab30e25a13cb74b2e
diff --git a/sci-mathematics/drgeo/drgeo-1.1.0-r1.ebuild b/sci-mathematics/drgeo/drgeo-1.1.0-r1.ebuild
new file mode 100644
index 000000000000..c80f79a9a0cf
--- /dev/null
+++ b/sci-mathematics/drgeo/drgeo-1.1.0-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+DOC="${PN}-doc-1.5"
+
+DESCRIPTION="Interactive geometry package"
+HOMEPAGE="http://www.ofset.org/drgeo"
+SRC_URI="
+ mirror://sourceforge/ofset/${P}.tar.gz
+ mirror://sourceforge/ofset/${DOC}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="nls"
+
+RDEPEND="
+ dev-libs/libxml2:2
+ dev-scheme/guile:=[deprecated]
+ gnome-base/libglade:2.0
+ x11-libs/gtk+:2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${P}-gcc45.patch )
+
+src_configure() {
+ default
+ # Can't make the documentation as it depends on Hyperlatex which isn't
+ # yet in portage. Fortunately HTML is already compiled for us in the
+ # tarball and so can be installed. Just create the make install target.
+ cd "${WORKDIR}"/${DOC} || die
+ econf
+}
+
+src_install() {
+ sed -i -e "s/gnome-drgenius.png/${PN}/" \
+ -e '/^Categories=/s/Application;//' \
+ ${PN}.desktop || die
+ default
+ emake -C "${WORKDIR}"/${DOC}/$(usex nls "" c) DESTDIR="${D}" install
+ doicon glade/${PN}.png
+}
diff --git a/sci-mathematics/drgeo/files/drgeo-1.1.0-gcc45.patch b/sci-mathematics/drgeo/files/drgeo-1.1.0-gcc45.patch
new file mode 100644
index 000000000000..257cbb23d111
--- /dev/null
+++ b/sci-mathematics/drgeo/files/drgeo-1.1.0-gcc45.patch
@@ -0,0 +1,61 @@
+Fix build with GCC 4.5, fix random SIGSEGV
+
+http://bugs.gentoo.org/show_bug.cgi?id=322211
+https://bugzilla.redhat.com/show_bug.cgi?id=454045
+
+--- a/geo/drgeo_figure.h
++++ b/geo/drgeo_figure.h
+@@ -322,4 +322,11 @@
+ gboolean showGrid;
+ };
+
++struct
++{
++ drgeoPoint mouse;
++ drgeoFigure *figure;
++}
++drgeoDialogData;
++
+ #endif
+--- a/geo/drgeo_figure.cc
++++ b/geo/drgeo_figure.cc
+@@ -48,13 +48,6 @@
+ #include "drgeo_dialog.h"
+ #include "traite.h"
+
+-extern struct
+-{
+- drgeoPoint mouse;
+- drgeoFigure *figure;
+-}
+-drgeoDialogData;
+-
+ typedef struct drgeoSearchValue
+ {
+ gpointer value;
+@@ -1309,7 +1302,7 @@
+ gint
+ drgeoFigure::preferedUndoLevel ()
+ {
+- atoi (drgeoConfigGet (":undoLevel"));
++ return atoi (drgeoConfigGet (":undoLevel"));
+ }
+
+ void
+--- a/geo/drgeo_dialog.cc
++++ b/geo/drgeo_dialog.cc
+@@ -38,14 +38,6 @@
+ // Used in the style dialod callback, I know it's ugly, but so easy
+ static drgeoFigure *selected_figure;
+
+-struct
+-{
+- drgeoPoint mouse;
+- drgeoFigure *figure;
+-}
+-drgeoDialogData;
+-
+-
+ static void drgeo_edit_dialog_cb (GtkWidget * dialog,
+ gint button, gpointer entry);
+
diff --git a/sci-mathematics/drgeo/metadata.xml b/sci-mathematics/drgeo/metadata.xml
new file mode 100644
index 000000000000..eb9a9a8a8d37
--- /dev/null
+++ b/sci-mathematics/drgeo/metadata.xml
@@ -0,0 +1,19 @@
+<?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">
+ Dr. Geo is a GTK2 interactive geometry software. It allows one to
+ create geometric figure plus the interactive manipulation of
+ such figure in respect with their geometric constraints. It is
+ useable in teaching situation with students from primary or
+ secondary level. It also features an integrated Scheme
+ programming language to define scripts within a figure.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ofset</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/dunshire/Manifest b/sci-mathematics/dunshire/Manifest
new file mode 100644
index 000000000000..8282b2539201
--- /dev/null
+++ b/sci-mathematics/dunshire/Manifest
@@ -0,0 +1,4 @@
+DIST dunshire-0.1.1.tar.gz 300878 SHA256 93ff5659d96687fa2f5f1d1c7432bb03187ad3ec8357a30856aec4bf353bf71c SHA512 5cdf8125d7fc1f76a483009392360e9e9088f9b58ca3f123d14e366421e831e4e7c8e17d367ba0430fb3cd61873cae7a004c903ff5417bfc9adecb7831681081 WHIRLPOOL 4fec60b47ddd228d428fd7e7def122e4757b2e19a5ae565d47b9b70480c1d9d80d8d583aaef9cf81caedc6d23655293e201f6ce4487e18beca5cef8b3b3edd5a
+EBUILD dunshire-0.1.1.ebuild 696 SHA256 37adabf6d763534f6cd6ae5bd86ce40d88352304a54d5659a5552c23b3a95858 SHA512 4f5fee0ebef99a9ec255cf50f5e5c7a89b3598cf436d49b8525f93c9d2ca385c950649880fcb5b7119bb19e05631913dd4ec87bdcb7bf4402226161d40e2506d WHIRLPOOL ce97715cc4f57591d737ca9964e48c8ad90752362a1b267505aade65c50a262c44ec6a4138197967432d0f0e2f32c0e48993a21fe432cf50735d3a714d093149
+MISC ChangeLog 348 SHA256 75c6e35bb85b0005bb114ceb150d02e129421b75f7ca77e135c6ad555d07263d SHA512 a894b39ec0fb223f6581f80227f47fbca7d053dc2b92d3ea22555334419567b82e6e801839e42a4386f137786412f6985f3ea156c2bb2d611bf2f93bf47b37db WHIRLPOOL 29d87390e88de102a92e6381b4ecba67bb0ae5ff9ed4fa0ff9d008dc97902e3fcb4f591d7fd7ed893d98580c6f7488fd79412710025ac87d0262b12d4570ecf9
+MISC metadata.xml 328 SHA256 0294101ed96ea0cb38d89255f3c359cbc25389c3119243173c8cd4f49c97bb6d SHA512 1ae4898a1247c78ba707aa6e38819cbc5277e46fd32d3ca1172c70c18f42247624755262e3886a2deee76d2a39a3a54750edbc2d77a339543741c2488b095e45 WHIRLPOOL b68029cfb119e475abf0b41e6c6d972f33abdeea3dff7c32455443a9956672d9b4f60ce868688801daedaee3e1171795b4929edbf13364f1b7b06bca54253c70
diff --git a/sci-mathematics/dunshire/dunshire-0.1.1.ebuild b/sci-mathematics/dunshire/dunshire-0.1.1.ebuild
new file mode 100644
index 000000000000..fd21e23a8a9a
--- /dev/null
+++ b/sci-mathematics/dunshire/dunshire-0.1.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python library to solve linear games over symmetric cones"
+HOMEPAGE="http://michael.orlitzky.com/code/dunshire"
+SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="AGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+
+RDEPEND="dev-python/cvxopt[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/build/html/. )
+ local DOCS=( doc/README.rst )
+ distutils-r1_python_install_all
+}
+
+python_test() {
+ esetup.py test
+}
diff --git a/sci-mathematics/dunshire/metadata.xml b/sci-mathematics/dunshire/metadata.xml
new file mode 100644
index 000000000000..cf8612d137ba
--- /dev/null
+++ b/sci-mathematics/dunshire/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+ </maintainer>
+
+ <upstream>
+ <remote-id type="pypi">dunshire</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/e/Manifest b/sci-mathematics/e/Manifest
new file mode 100644
index 000000000000..e96f893862fe
--- /dev/null
+++ b/sci-mathematics/e/Manifest
@@ -0,0 +1,10 @@
+DIST E-1.5.tgz 1689077 SHA256 37239f169a9af3bb64edd205abe5022a043a1f4ea9ec694b39a9e61b37f5e46f SHA512 a2534c9e278741fed2f0005f5fa2b4ea60d71babd4e38c207a48f496df6916bf9ff4bf0ba41ae899eaeeeec7235ff1d759629dbcb627dd8766168f9bc98a4894 WHIRLPOOL e659d8e5917c505f2976532f0a19f0e2f845230c656f4cc62c5538f760e2559b06c0d9e47bc0e1df7eb9000791d0fa09ef5bf94dcc43f233e7514cffacf6893a
+DIST E-1.6.tgz 1627003 SHA256 91afe68f37ca2005a8eead3bdba0a4452de7cf7100369c9955304c8609b70c90 SHA512 769aa4d04595181285be49c1f21d7e8a47936fab78b5d6f2975910a64d4928cd2be97d781c4092dadab48d213a6bc788b8247a2310cf71042b1339129fe0cdf2 WHIRLPOOL 96c82427132017ee3f78c644ede9a018c74d59d7029fe006435baac9502d6cf6b097c51eeb1078b98ce8a208572956db756dcccd6529bcaba32519596dabf486
+DIST E-1.8.tgz 1832975 SHA256 636a5353046680f9c960d02d942df0a55af2e3941676df76e3356a334f6e842e SHA512 1b4358c636e8ea564ca942e1221e78234a9f0f793991f637bd7ec4d92eb9aa4a408a14c707405271fc017a9d63884d70bdfb0ed1b878383a1a44cfa57a7bdd51 WHIRLPOOL a917f756ce820344500712597db52d9e3716eab7eb60fb54fc15a247ecea25eb7a6bd3ac20bced771ece6296d78aaa7c64ea87a6239d6a7e3cd43d79fbaa83b9
+EBUILD e-1.5.ebuild 3351 SHA256 d1ad4483b755416bbc1f97d8ff9442a95815beb2a763ac0d5f736300ed29663c SHA512 076d4b17661ed30e3321dd9312fcb4a7904a98d69a61bbf6cf9718ba55422048a861e54e1780513b7fb4384a3ea6a3a05d8f6c79c43ff051f06e7a301612573e WHIRLPOOL 2e5c5dd383dfb1d6d3d8e94b50d7a895ac6b338dbacffbdbdb8e3b09f1af3cd90b2c06e89a4027bca3ded15160ae00645b2a7af52383c7dab1512eecabcfb333
+EBUILD e-1.6.ebuild 3351 SHA256 28665c88831ed0a5ae414940f0d1ef3b0dcdc1d8beee66e539f7a81444d6560f SHA512 07ae850f91c1406369fbd89ed5a12205da41bccb762af521b88bec2557a30c87d8ce332353e5f9f124ecfb9bde23343665d90464ce41d211c341c205454779ed WHIRLPOOL 50b19610ac9922ac9b5beaae12a58ee77023ee4e7baebb4f306a81e0417a066980716d431a540d9c8e1a820ba77be364a132f915ea46c1ead159fd212b9bf8d6
+EBUILD e-1.8-r1.ebuild 3172 SHA256 85d05bfd10b7c404b829d5398cfcb0ba529415714acfab5a63605872dae7c9f9 SHA512 ca65245640594ff13a36e6350b91229835e21fe8a9a1841d3168007899fcf4e9db25c36901008d4fba1250e948635001322e2a9b3408b79fae1d126913a4733a WHIRLPOOL 46c1b1211535b06b4fee8f45f7943c6f85dfd39289db2d4edf7af8a3d63709fc9163cb0326c8dcdc7109d6b4011e869dfd173d15fdcb3da8659e24441c77cc10
+EBUILD e-1.8.ebuild 3172 SHA256 4ae1bf502f4b11f39c02dd889d41e29b76e47170eed5b6d8c50acc79a8325abb SHA512 13e554697d0c8386c0b58a2b73ccc52c0f741436c36e6e18d7fc2fd382ffa1f01c2a580ce296c1aa8191634f6857d0e6ab5e585a66dd4606fe49b6471fb25597 WHIRLPOOL eb92f9fd74d5b52f7f43189c7fa38b1b10df585314bc2335c91de9fb5d828ac024d453d859714846c303968419dbcbda7a1128d47a94362589f9c45b9b618e76
+MISC ChangeLog 2877 SHA256 b794cf20b8bb17ff45c3ccddb00bc68f005e9d5111e27db7feace8deaaa59549 SHA512 76efc0c383d5a38185a92bacc69180c8e878f6268a06265bd53b27cc2395e4e9ba4046e0416dc62c417aa8b04ca179c9d37fa2f9ad3c6c4c95ea2ac79c5df566 WHIRLPOOL b7c3b1665949346719c264066128e768d63e19efd80d2ec48109d863ba4944d78d29520dfd1a63b497556b6d052f87c423137024665d7ab70cb85b94efc3b80c
+MISC ChangeLog-2015 1121 SHA256 13615f38f134f721a4bc9aff7e4c405b44597c0bd1e11b6cd01d7c0e51ec4a56 SHA512 2bdc1bea4d27d7964f9db3f41a3090abd52a8d70b5b13e48727ee4daba6c458057a9f62ae022daec66ae1fde6e2f1da8b431b43b210333f432a7f3d3ee078104 WHIRLPOOL ccf47c3f7a2e34295d0eba8e8f4555090ecd570982d6e8c5ef99be6fdd4656c488edbcf8ec940e2f57b710468cbee8106f0e56d6dcc7ad82e9b14f25d26ac320
+MISC metadata.xml 1462 SHA256 e3504d1c26535ad65dbc9de7a69b51a845cf26984f0125b6d99ed168c27d0fe4 SHA512 635575800430295b5110104d38cbab61277b8d32acd23b883053a3092df0ea6531bac0fbae8a402cc9af0e11d7095959f44bee989050e4123ea7400c4c671e23 WHIRLPOOL 7f763e6756af18abab44cc8459f02f29f4d5e9bc332eb4ef9a71b492f162688f806432ca729bbf341421f7af08421e78dcb98f8811f3a1826190795ca4b38f45
diff --git a/sci-mathematics/e/e-1.5.ebuild b/sci-mathematics/e/e-1.5.ebuild
new file mode 100644
index 000000000000..82fd6f490d9a
--- /dev/null
+++ b/sci-mathematics/e/e-1.5.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_PN="E"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="E is a theorem prover for full first-order logic with equality"
+HOMEPAGE="http://www4.informatik.tu-muenchen.de/~schulz/E/E.html"
+SRC_URI="http://www4.in.tum.de/~schulz/WORK/E_DOWNLOAD/V_${PV}/${MY_PN}.tgz -> ${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples isabelle"
+
+RDEPEND="isabelle? (
+ >=sci-mathematics/isabelle-2011.1-r1:=
+ )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_PN}
+
+src_configure() {
+ ./configure --prefix="${ROOT}usr" \
+ --man-prefix="${ROOT}share/man" \
+ || die "E configure failed"
+
+ sed -e "s@CFLAGS = @CFLAGS = ${CFLAGS} @" \
+ -e "s@LD = \$(CC) @LD = \$(CC) ${LDFLAGS} @" \
+ -i "${S}/Makefile.vars" \
+ || die "Could not add our flags to Makefile.vars"
+}
+
+src_install() {
+ for i in "${S}/PROVER/eprover" \
+ "${S}/PROVER/epclextract" \
+ "${S}/PROVER/eproof" \
+ "${S}/PROVER/eproof_ram" \
+ "${S}/PROVER/eground" \
+ "${S}/PROVER/e_ltb_runner" \
+ "${S}/PROVER/e_axfilter" \
+ "${S}/PROVER/checkproof" \
+ "${S}/PROVER/ekb_create" \
+ "${S}/PROVER/ekb_delete" \
+ "${S}/PROVER/ekb_ginsert" \
+ "${S}/PROVER/ekb_insert"
+ do
+ dobin "${i}"
+ done
+
+ for i in "${S}/DOC/man/eprover.1" \
+ "${S}/DOC/man/epclextract.1" \
+ "${S}/DOC/man/eproof.1" \
+ "${S}/DOC/man/eproof_ram.1" \
+ "${S}/DOC/man/eground.1" \
+ "${S}/DOC/man/e_ltb_runner.1" \
+ "${S}/DOC/man/e_axfilter.1" \
+ "${S}/DOC/man/checkproof.1" \
+ "${S}/DOC/man/ekb_create.1" \
+ "${S}/DOC/man/ekb_delete.1" \
+ "${S}/DOC/man/ekb_ginsert.1" \
+ "${S}/DOC/man/ekb_insert.1"
+ do
+ doman "${i}"
+ done
+
+ if use doc; then
+ pushd "${S}"/DOC || die "Could not cd to DOC"
+ dodoc ANNOUNCE CREDITS DONE E-REMARKS E-REMARKS.english E-USERS \
+ HISTORY NEWS PORTING ReadMe THINKME TODO TPTP_SUBMISSION \
+ WISHLIST eprover.pdf
+ dohtml *.html
+ insinto /usr/share/doc/${PF}/html
+ doins estyle.sty
+ popd
+ fi
+
+ if use examples; then
+ dodir /usr/share/${MY_PN}/examples
+ insinto /usr/share/${MY_PN}/examples
+ doins -r EXAMPLE_PROBLEMS
+ doins -r SIMPLE_APPS
+ fi
+
+ if use isabelle; then
+ ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \
+ || die "isabelle getenv ISABELLE_HOME failed"
+ [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
+ dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ cat <<- EOF >> "${S}/settings"
+ E_HOME="${ROOT}usr/bin"
+ E_VERSION="${PV}"
+ EOF
+ insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ doins "${S}/settings"
+ fi
+}
+
+pkg_postinst() {
+ if use isabelle; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
+ sed -e "/contrib\/${PN}-[0-9.]*/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ cat <<- EOF >> "${ROOT}etc/isabelle/components"
+ contrib/${PN}-${PV}
+ EOF
+ fi
+ fi
+}
+
+pkg_postrm() {
+ if use isabelle; then
+ if [ ! -f "${ROOT}usr/bin/eproof" ]; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ # Note: this sed should only match the version of this ebuild
+ # Which is what we want as we do not want to remove the line
+ # of a new E being installed during an upgrade.
+ sed -e "/contrib\/${PN}-${PV}/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ fi
+ fi
+}
diff --git a/sci-mathematics/e/e-1.6.ebuild b/sci-mathematics/e/e-1.6.ebuild
new file mode 100644
index 000000000000..39cde267248b
--- /dev/null
+++ b/sci-mathematics/e/e-1.6.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_PN="E"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="E is a theorem prover for full first-order logic with equality"
+HOMEPAGE="http://www4.informatik.tu-muenchen.de/~schulz/E/E.html"
+SRC_URI="http://www4.in.tum.de/~schulz/WORK/E_DOWNLOAD/V_${PV}/${MY_PN}.tgz -> ${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples isabelle"
+
+RDEPEND="isabelle? (
+ >=sci-mathematics/isabelle-2011.1-r1:=
+ )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_PN}
+
+src_configure() {
+ ./configure --prefix="${ROOT}usr" \
+ --man-prefix="${ROOT}share/man" \
+ || die "E configure failed"
+
+ sed -e "s@CFLAGS = @CFLAGS = ${CFLAGS} @" \
+ -e "s@LD = \$(CC) @LD = \$(CC) ${LDFLAGS} @" \
+ -i "${S}/Makefile.vars" \
+ || die "Could not add our flags to Makefile.vars"
+}
+
+src_install() {
+ for i in "${S}/PROVER/eprover" \
+ "${S}/PROVER/epclextract" \
+ "${S}/PROVER/eproof" \
+ "${S}/PROVER/eproof_ram" \
+ "${S}/PROVER/eground" \
+ "${S}/PROVER/e_ltb_runner" \
+ "${S}/PROVER/e_axfilter" \
+ "${S}/PROVER/checkproof" \
+ "${S}/PROVER/ekb_create" \
+ "${S}/PROVER/ekb_delete" \
+ "${S}/PROVER/ekb_ginsert" \
+ "${S}/PROVER/ekb_insert"
+ do
+ dobin "${i}"
+ done
+
+ for i in "${S}/DOC/man/eprover.1" \
+ "${S}/DOC/man/epclextract.1" \
+ "${S}/DOC/man/eproof.1" \
+ "${S}/DOC/man/eproof_ram.1" \
+ "${S}/DOC/man/eground.1" \
+ "${S}/DOC/man/e_ltb_runner.1" \
+ "${S}/DOC/man/e_axfilter.1" \
+ "${S}/DOC/man/checkproof.1" \
+ "${S}/DOC/man/ekb_create.1" \
+ "${S}/DOC/man/ekb_delete.1" \
+ "${S}/DOC/man/ekb_ginsert.1" \
+ "${S}/DOC/man/ekb_insert.1"
+ do
+ doman "${i}"
+ done
+
+ if use doc; then
+ pushd "${S}"/DOC || die "Could not cd to DOC"
+ dodoc ANNOUNCE CREDITS DONE E-REMARKS E-REMARKS.english E-USERS \
+ HISTORY NEWS PORTING ReadMe THINKME TODO TPTP_SUBMISSION \
+ WISHLIST eprover.pdf
+ dohtml *.html
+ insinto /usr/share/doc/${PF}/html
+ doins estyle.sty
+ popd
+ fi
+
+ if use examples; then
+ dodir /usr/share/${MY_PN}/examples
+ insinto /usr/share/${MY_PN}/examples
+ doins -r EXAMPLE_PROBLEMS
+ doins -r SIMPLE_APPS
+ fi
+
+ if use isabelle; then
+ ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \
+ || die "isabelle getenv ISABELLE_HOME failed"
+ [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
+ dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ cat <<- EOF >> "${S}/settings"
+ E_HOME="${ROOT}usr/bin"
+ E_VERSION="${PV}"
+ EOF
+ insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ doins "${S}/settings"
+ fi
+}
+
+pkg_postinst() {
+ if use isabelle; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
+ sed -e "/contrib\/${PN}-[0-9.]*/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ cat <<- EOF >> "${ROOT}etc/isabelle/components"
+ contrib/${PN}-${PV}
+ EOF
+ fi
+ fi
+}
+
+pkg_postrm() {
+ if use isabelle; then
+ if [ ! -f "${ROOT}usr/bin/eproof" ]; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ # Note: this sed should only match the version of this ebuild
+ # Which is what we want as we do not want to remove the line
+ # of a new E being installed during an upgrade.
+ sed -e "/contrib\/${PN}-${PV}/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ fi
+ fi
+}
diff --git a/sci-mathematics/e/e-1.8-r1.ebuild b/sci-mathematics/e/e-1.8-r1.ebuild
new file mode 100644
index 000000000000..d21fa37fa82b
--- /dev/null
+++ b/sci-mathematics/e/e-1.8-r1.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+MY_PN="E"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="E is a theorem prover for full first-order logic with equality"
+HOMEPAGE="http://www4.informatik.tu-muenchen.de/~schulz/E/E.html"
+SRC_URI="http://www4.in.tum.de/~schulz/WORK/E_DOWNLOAD/V_${PV}/${MY_PN}.tgz -> ${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples isabelle"
+
+RDEPEND="isabelle? (
+ >=sci-mathematics/isabelle-2011.1-r1:=
+ )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_PN}
+
+src_configure() {
+ ./configure --prefix="${ROOT}usr" \
+ --man-prefix="${ROOT}share/man" \
+ || die "E configure failed"
+
+ sed -e "s@CFLAGS = @CFLAGS = ${CFLAGS} @" \
+ -e "s@LD = \$(CC) @LD = \$(CC) ${LDFLAGS} @" \
+ -i "${S}/Makefile.vars" \
+ || die "Could not add our flags to Makefile.vars"
+}
+
+src_install() {
+ dobin "${S}/PROVER/eprover" \
+ "${S}/PROVER/epclextract" \
+ "${S}/PROVER/eproof" \
+ "${S}/PROVER/eproof_ram" \
+ "${S}/PROVER/eground" \
+ "${S}/PROVER/e_ltb_runner" \
+ "${S}/PROVER/e_axfilter" \
+ "${S}/PROVER/checkproof" \
+ "${S}/PROVER/ekb_create" \
+ "${S}/PROVER/ekb_delete" \
+ "${S}/PROVER/ekb_ginsert" \
+ "${S}/PROVER/ekb_insert"
+
+ doman "${S}/DOC/man/eprover.1" \
+ "${S}/DOC/man/epclextract.1" \
+ "${S}/DOC/man/eproof.1" \
+ "${S}/DOC/man/eproof_ram.1" \
+ "${S}/DOC/man/eground.1" \
+ "${S}/DOC/man/e_ltb_runner.1" \
+ "${S}/DOC/man/e_axfilter.1" \
+ "${S}/DOC/man/checkproof.1" \
+ "${S}/DOC/man/ekb_create.1" \
+ "${S}/DOC/man/ekb_delete.1" \
+ "${S}/DOC/man/ekb_ginsert.1" \
+ "${S}/DOC/man/ekb_insert.1"
+
+ if use doc; then
+ pushd "${S}"/DOC || die "Could not cd to DOC"
+ dodoc ANNOUNCE CREDITS DONE E-REMARKS E-REMARKS.english E-USERS \
+ HISTORY NEWS PORTING ReadMe THINKME TODO TPTP_SUBMISSION \
+ WISHLIST eprover.pdf
+ dohtml *.html
+ dohtml estyle.sty
+ popd
+ fi
+
+ if use examples; then
+ insinto /usr/share/${MY_PN}/examples
+ doins -r EXAMPLE_PROBLEMS
+ doins -r SIMPLE_APPS
+ fi
+
+ if use isabelle; then
+ ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \
+ || die "isabelle getenv ISABELLE_HOME failed"
+ [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
+ cat <<- EOF >> "${S}/settings"
+ E_HOME="${ROOT}usr/bin"
+ E_VERSION="${PV}"
+ EOF
+ insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ doins "${S}/settings"
+ fi
+}
+
+pkg_postinst() {
+ if use isabelle; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
+ sed -e "/contrib\/${PN}-[0-9.]*/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ cat <<- EOF >> "${ROOT}etc/isabelle/components"
+ contrib/${PN}-${PV}
+ EOF
+ fi
+ fi
+}
+
+pkg_postrm() {
+ if use isabelle; then
+ if [ ! -f "${ROOT}usr/bin/eproof" ]; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ # Note: this sed should only match the version of this ebuild
+ # Which is what we want as we do not want to remove the line
+ # of a new E being installed during an upgrade.
+ sed -e "/contrib\/${PN}-${PV}/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ fi
+ fi
+}
diff --git a/sci-mathematics/e/e-1.8.ebuild b/sci-mathematics/e/e-1.8.ebuild
new file mode 100644
index 000000000000..c6173fc90ec2
--- /dev/null
+++ b/sci-mathematics/e/e-1.8.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_PN="E"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="E is a theorem prover for full first-order logic with equality"
+HOMEPAGE="http://www4.informatik.tu-muenchen.de/~schulz/E/E.html"
+SRC_URI="http://www4.in.tum.de/~schulz/WORK/E_DOWNLOAD/V_${PV}/${MY_PN}.tgz -> ${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples isabelle"
+
+RDEPEND="isabelle? (
+ >=sci-mathematics/isabelle-2011.1-r1:=
+ )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_PN}
+
+src_configure() {
+ ./configure --prefix="${ROOT}usr" \
+ --man-prefix="${ROOT}share/man" \
+ || die "E configure failed"
+
+ sed -e "s@CFLAGS = @CFLAGS = ${CFLAGS} @" \
+ -e "s@LD = \$(CC) @LD = \$(CC) ${LDFLAGS} @" \
+ -i "${S}/Makefile.vars" \
+ || die "Could not add our flags to Makefile.vars"
+}
+
+src_install() {
+ dobin "${S}/PROVER/eprover" \
+ "${S}/PROVER/epclextract" \
+ "${S}/PROVER/eproof" \
+ "${S}/PROVER/eproof_ram" \
+ "${S}/PROVER/eground" \
+ "${S}/PROVER/e_ltb_runner" \
+ "${S}/PROVER/e_axfilter" \
+ "${S}/PROVER/checkproof" \
+ "${S}/PROVER/ekb_create" \
+ "${S}/PROVER/ekb_delete" \
+ "${S}/PROVER/ekb_ginsert" \
+ "${S}/PROVER/ekb_insert"
+
+ doman "${S}/DOC/man/eprover.1" \
+ "${S}/DOC/man/epclextract.1" \
+ "${S}/DOC/man/eproof.1" \
+ "${S}/DOC/man/eproof_ram.1" \
+ "${S}/DOC/man/eground.1" \
+ "${S}/DOC/man/e_ltb_runner.1" \
+ "${S}/DOC/man/e_axfilter.1" \
+ "${S}/DOC/man/checkproof.1" \
+ "${S}/DOC/man/ekb_create.1" \
+ "${S}/DOC/man/ekb_delete.1" \
+ "${S}/DOC/man/ekb_ginsert.1" \
+ "${S}/DOC/man/ekb_insert.1"
+
+ if use doc; then
+ pushd "${S}"/DOC || die "Could not cd to DOC"
+ dodoc ANNOUNCE CREDITS DONE E-REMARKS E-REMARKS.english E-USERS \
+ HISTORY NEWS PORTING ReadMe THINKME TODO TPTP_SUBMISSION \
+ WISHLIST eprover.pdf
+ dohtml *.html
+ dohtml estyle.sty
+ popd
+ fi
+
+ if use examples; then
+ insinto /usr/share/${MY_PN}/examples
+ doins -r EXAMPLE_PROBLEMS
+ doins -r SIMPLE_APPS
+ fi
+
+ if use isabelle; then
+ ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \
+ || die "isabelle getenv ISABELLE_HOME failed"
+ [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
+ cat <<- EOF >> "${S}/settings"
+ E_HOME="${ROOT}usr/bin"
+ E_VERSION="${PV}"
+ EOF
+ insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ doins "${S}/settings"
+ fi
+}
+
+pkg_postinst() {
+ if use isabelle; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
+ sed -e "/contrib\/${PN}-[0-9.]*/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ cat <<- EOF >> "${ROOT}etc/isabelle/components"
+ contrib/${PN}-${PV}
+ EOF
+ fi
+ fi
+}
+
+pkg_postrm() {
+ if use isabelle; then
+ if [ ! -f "${ROOT}usr/bin/eproof" ]; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ # Note: this sed should only match the version of this ebuild
+ # Which is what we want as we do not want to remove the line
+ # of a new E being installed during an upgrade.
+ sed -e "/contrib\/${PN}-${PV}/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ fi
+ fi
+}
diff --git a/sci-mathematics/e/metadata.xml b/sci-mathematics/e/metadata.xml
new file mode 100644
index 000000000000..38c1496fe98f
--- /dev/null
+++ b/sci-mathematics/e/metadata.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>gienah@gentoo.org</email>
+ <name>Mark Wright</name>
+</maintainer>
+<maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+</maintainer>
+<longdescription lang="en">
+E is a theorem prover for full first-order logic with equality. It
+accepts a problem specification, typically consisting of a number of
+first-order clauses or formulas, and a conjecture, again either in
+clausal or full first-order form. The system will then try to find a
+formal proof for the conjecture, assuming the axioms.
+
+If a proof is found, the system can provide a detailed list of proof
+steps that can be individually verified. If the conjecture is
+existential (i.e. it’s of the form “there exists an X with property
+P”), the latest versions can also provide possible answers (values for
+X).
+
+Development of E started as part of the E-SETHEO project at TUM. The
+first public release was in in 1998, and the system has been
+continuously improved ever since. I believe that E now is one of the
+most powerful and friendly reasoning systems for first-order
+logic. The prover has successfully participated in many competitions.
+</longdescription>
+<use>
+ <flag name="isabelle">Add integration support for the Isabelle/HOL
+ theorem prover.</flag>
+</use>
+</pkgmetadata>
diff --git a/sci-mathematics/ent/Manifest b/sci-mathematics/ent/Manifest
new file mode 100644
index 000000000000..e4bc16b4cae6
--- /dev/null
+++ b/sci-mathematics/ent/Manifest
@@ -0,0 +1,6 @@
+AUX 101202-gentoo.patch 448 SHA256 03e84206b47757dbfaf98d455e6b831f856d6694f7c46eefee93001c2ad57570 SHA512 5655516ffa53d65da36c7607c972592cb63d675293eb5163578db539db95b5172019832d50f9f5a641b94b0cbff78af6641d56a86619303ecc6533772460161a WHIRLPOOL 43e669d33ae6c1b6db4063cceccad23b2e9de4f46f4409167e46f8874994f878fc42f49915bf032a5b13e1fcf9360015022bf4bc528b34d4a2ba913e508fdb23
+DIST random-101202.zip 76200 SHA256 c14ed62db24511848d6b37d4bf8869185b65be9042ffad5272257f3a249569ec SHA512 f74cfae8cd8b9f405b7459a350571d3ef438bdba42508da59ca214f6e7f6372d253a4c1a30685aa7dfc1cf14dde9796ea54bf42aa103a63bae09a5bb3fd3d3d8 WHIRLPOOL 07e58de14ae02afe1f04346dbb13d0ce9be087caabba633ddc88f87a2b503048157aa71d75075b82f52b5b789fae3cf9575fff76ca1585c6fe4b7a5ba52caf32
+EBUILD ent-101202.ebuild 562 SHA256 1af312355f37c3e7e7354be7e83da276b4f9e1c9106093973c361b223adc4b18 SHA512 64be67110edc53dc9901e3158c81922a74b8d12bf3e10f6d35d95d70cda4f7915f8055ee492b043e41f09782ce4802366e4afb177d28bfa65062eec42f9a5537 WHIRLPOOL 1ba5c623397da48c4f245ccde145dabbb7749559af48ef13c1616ef86418be479831aaed11a3e1355a2b009c5066a885d38cbddc5d2c4a1b9ce51e614b227b4b
+MISC ChangeLog 2776 SHA256 b396068de88fee522ec39b9342579223c1670f3834c0c4d0d5cc41497fa391fc SHA512 0edc6cf8ed85c996e5a4b6b6442fb05ba8e7f30cb90cd63b43362b0fdc8758f9351dc39813771a861929e431b418ac2766172f46e3cd3e5adaeb4ffee7510369 WHIRLPOOL c42e7a67b4c2fb4d988d271174cfd5ac0a80c4e697a67b70bb5e420fc3da8cbea43557cae56c76488b864ec170ab2cd43f36a6dc2fcc5334115c8c55e88bb8a6
+MISC ChangeLog-2015 479 SHA256 8ca2092c437d00eb46d6f554914a9b8adfc70b343d24f453c13a75396d02cfef SHA512 8622c719390049b5cc984771ab140838815ac4df747dba8e220340c1dfb12eca617906f227feff038eff4ea20874dfc79d520f654b332c3d8fcc8cda5df2365e WHIRLPOOL a425b6f5365cceb20b7f4ca5c85303b88ca5928b49fccea6c2abd72ac0afcc468ec45171d69bc7a034b77d97a49aee5b1346f1272778145838769f27e9082d2f
+MISC metadata.xml 275 SHA256 e5a2fe85169f6b7059d13eb621074265a64001eed42e8e2007f382bdeb4d5419 SHA512 e7e449f8bf039a1fc4707c0b12706d27b237fb3e7bee5e457bc79e032a04d7b9eb2901059b007350cc3617689638b76f97fbbd672e2d0101e2071448642415a7 WHIRLPOOL 4f23a2300b60b7c821db79e09a4597bdd498eb477b917af4b69a93678b370f2735d9f08bfc09b807bce26c2f8e34d5de2fcd62f1fa7665eb5f7428bbf5a85328
diff --git a/sci-mathematics/ent/ent-101202.ebuild b/sci-mathematics/ent/ent-101202.ebuild
new file mode 100644
index 000000000000..ca734a7d70d9
--- /dev/null
+++ b/sci-mathematics/ent/ent-101202.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Pseudorandom number sequence test"
+HOMEPAGE="http://www.fourmilab.ch/random/"
+SRC_URI="mirror://gentoo/random-${PV}.zip"
+
+SLOT="0"
+LICENSE="public-domain"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}-gentoo.patch
+ tc-export CC
+}
+
+src_install() {
+ dobin ${PN}
+ dohtml ${PN}.html ${PN}itle.gif
+}
diff --git a/sci-mathematics/ent/files/101202-gentoo.patch b/sci-mathematics/ent/files/101202-gentoo.patch
new file mode 100644
index 000000000000..a71bc5050637
--- /dev/null
+++ b/sci-mathematics/ent/files/101202-gentoo.patch
@@ -0,0 +1,20 @@
+diff --git a/Makefile b/Makefile
+index 2a150cf..3f9b883 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,12 +1,12 @@
+
+ # Unix make file for random test program
+
+-CC = gcc
+-CFLAGS = -g -Wall
++CC ?= gcc
++CFLAGS ?= -g -Wall
+ #CFLAGS = -O
+
+ ent: ent.o iso8859.o randtest.o chisq.o
+- $(CC) $(CFLAGS) ent.o iso8859.o randtest.o chisq.o -o ent -lm
++ $(CC) $(LDFLAGS) $(CFLAGS) ent.o iso8859.o randtest.o chisq.o -o ent -lm
+
+ ent.c: iso8859.h randtest.h
+
diff --git a/sci-mathematics/ent/metadata.xml b/sci-mathematics/ent/metadata.xml
new file mode 100644
index 000000000000..d17eda6d58f4
--- /dev/null
+++ b/sci-mathematics/ent/metadata.xml
@@ -0,0 +1,8 @@
+<?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>
+</pkgmetadata>
diff --git a/sci-mathematics/euler/Manifest b/sci-mathematics/euler/Manifest
new file mode 100644
index 000000000000..cd60b01298c7
--- /dev/null
+++ b/sci-mathematics/euler/Manifest
@@ -0,0 +1,10 @@
+AUX command-gcc4-gentoo.patch 341 SHA256 9871a61e1a04efc3780c0a140eb86b055c6d2637e75a4316b3988580e93c0787 SHA512 a7fc90f924798faba502568e0fa44bef3717bf7d6ff4039d2379d837cd820fc05d51bc1ceadb985ec32c87a9f706789c726d9c833f087d5696e3573da0364276 WHIRLPOOL 2c260b806d9bbb2eba5210e3d15e2906a0d26112b126d0dbf5bcf48ab622aa4f68b49d0b94acbe06763472040542ddde0deeba6cb665791102857869270a877b
+AUX configure-gentoo.patch 884 SHA256 d35a06badcb2777db737c0ea26d347df7fb7dd44b00fce23c58920774f25569d SHA512 f5be6b7214c1898dd203b0c3b5cfe7edc7e6e7f47e7c4a39e85113d1affbd740f8cc413d38ace42672a4ac2224ce248092432beda91c0423f8726ac0b0fbd72a WHIRLPOOL 448a0746957356150f403551aa522170d9e1ce92bbb1dbe500bde1be09ed211e35929785d3f77dd02c21af6939282d68b12a8ead382972a4a4d90cffcb901b61
+AUX euler-fortify.patch 1150 SHA256 60e1496a994576fd5948c0dfce20cf75f0a45b0e24a5a71d0568159cfe4c29d7 SHA512 2ae0d856f4147a29f2cfd0e615c9ae39ed48ee765599527f529465b2f42ad64e7c2adb6a5ac4e25c72f09f0ee50ae6f09282d0f6af6cd976ecaecede847c2854 WHIRLPOOL 3842405b8ca97cf76148d46aa5135cbc607aea4370dbaf923595924d8a536f2f9aeecedaad1677589add97c97a9c993e0a353238dd0115f9c901c9fc921e4cf0
+AUX euler-glibc-2.4-gentoo.patch 349 SHA256 90b7dd6d35c38bf18adb64b1312912c4aeb3147ecc65b0899899cc05534d2fe6 SHA512 34cef14fb232a3156f84df23a9132392c03b30677cd067ffcabb866c938a6a0b43d431e8da2295ee431701d232cc6e05f30acecc901dcd4f19fa6424b185d463 WHIRLPOOL 42b24e95c1ba41be2a56414c3b5c307428ada62a8e6e7faaa3ce7d7d281d5c5e0228562fb07368d1114d2e23f5139b1253ac8c370c4abee419bc59fd2d6b8e64
+AUX euler-xdg.patch 918 SHA256 a475529fcab14e7e8f7c08ef84bb73e36c3c4126052b6839ee2962ab1617bfa0 SHA512 fdb89244a2365845857a11682d1499ea03ed37d01aedd4cf8c8869b8f0023fd58d7818ccb771924bc265bd518ba518637a11b2c80ea4e39ffee22431a7ca7ab6 WHIRLPOOL c7add434024723ef0d6805862df2abe6d8e6ef9cf19f4220741d51c1235e0a44f3deca31d9ae6a8ee046639140acd4e05d77f076f436ea3963f13db5b6331ba2
+DIST euler-1.61.0.tgz 1202485 SHA256 1350a3ded26fa8bab2580a1dc3a689aabbb100b872df62819327282773e02d95 SHA512 f8b9b0c6aa5aea4bd42bd33fff986a52c624c268ede11b83c2c53293a5acbda45317ecc719c12f377b236460c7ff0dba1d110ee8e90b526fc70af03ed0327b27 WHIRLPOOL 46967a4d5cb82a3fcc42730c8ecdb5b529e176bd6b9dcf1055e7790f9d15cfc85eda60bae66543a6cca1fda73cf88f15bc200ac1cdc5c10347a1237fcaa06aae
+EBUILD euler-1.61.0.ebuild 1014 SHA256 3731a44b452bc77a3f04485610689a816b7283f54a37327433c7d81ce0562547 SHA512 7d3f85e9ddf1abc0bb5a34729bba84aee784f60c00de7b808d26e8c584f08a209a5d0354c129fb7af739be0d4aff60c0db422e0c46600a60664f9870ab882dd6 WHIRLPOOL 012ed95944d4ac93b63a3d91732c593f98bc4efafa427b4c695bc9b2c8e4d152d533434d1ebdc3c50f76273a1e85b47a2c79e3c671e4cd9e7222c62106cb9af5
+MISC ChangeLog 2588 SHA256 4520e95ffe80a316d414e81d3fb6acd4418c80daeb02a78b96939abe7c0bfc09 SHA512 e3008da88aeb9960b88a77b084d0272851fdc60f37e5043355849d6a5c00fba4326a702b32f105805d6beedfe724069e2643c896bcbefa0b078d9746a642fd92 WHIRLPOOL f09720a17dc0b2001caaf13fab4cb98c9533f1658b386c9ec1a4be9fc65f7ddef75306dcc2eb2f7775f7b1f765efb9986e20ba81b79ce27977ead8bfbe3a4411
+MISC ChangeLog-2015 5487 SHA256 782af35e2ac606b08c03b95299d124d95796b62dd7c7120bbddcaac9cc039af1 SHA512 f99a67efaad65986ffcfc33a90751ac454f97728cd1448936fd189539428ea1b796840ef0a08d93ac3e38556668b8acd06b54b8c7d7498f9aa802cad680c8318 WHIRLPOOL 9a10e237a9554544b1ec1a342677b7841c452447380d557344545a89317b117eeb3a441b2bb2c46cbd07c19a1cb162a8458fa88e5e40110f216ce57b5f676b30
+MISC metadata.xml 344 SHA256 da0533c24b4bf7052321e84d9f8449b3cb5f7aa9d5ec9cf3b6bdee4f9835b411 SHA512 77983d74c782fcccc0b146e8687f29657387bbe048af00078f8decb3c84c1e288f48c8f29c35bf8c606e6a9306d3d258697f8e2ff07129fb59551d05c694cd82 WHIRLPOOL 46ea2a8c0549c6bd00eae91153ad33c7cbae5bebd043deb2013ce1b63e6e21ad42ebcb0ac556cae4ce1f4c6c64978a3ba8930404b90b99570b363de0ec4ef0e1
diff --git a/sci-mathematics/euler/euler-1.61.0.ebuild b/sci-mathematics/euler/euler-1.61.0.ebuild
new file mode 100644
index 000000000000..a938c5786928
--- /dev/null
+++ b/sci-mathematics/euler/euler-1.61.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+inherit autotools-utils
+
+DESCRIPTION="Mathematical programming environment"
+HOMEPAGE="http://euler.sourceforge.net/"
+SRC_URI="mirror://sourceforge/euler/${P}.tgz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc -sparc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+DEPEND="x11-libs/gtk+:2
+ virtual/pkgconfig"
+
+RDEPEND="x11-libs/gtk+:2
+ x11-misc/xdg-utils"
+
+PATCHES=(
+ "${FILESDIR}"/configure-gentoo.patch
+ "${FILESDIR}"/command-gcc4-gentoo.patch
+ "${FILESDIR}"/${PN}-glibc-2.4-gentoo.patch
+ "${FILESDIR}"/${PN}-xdg.patch
+ "${FILESDIR}"/${PN}-fortify.patch
+)
+
+src_prepare() {
+ # gentoo specific stuff
+ sed -i -e '/COPYING/d' -e '/INSTALL/d' Makefile.am || die
+ sed -i \
+ -e "s:doc/euler:doc/${PF}:g" \
+ Makefile.am docs/Makefile.am \
+ docs/*/Makefile.am docs/*/images/Makefile.am src/main.c \
+ || die "sed for docs failed"
+ autotools-utils_src_prepare
+}
diff --git a/sci-mathematics/euler/files/command-gcc4-gentoo.patch b/sci-mathematics/euler/files/command-gcc4-gentoo.patch
new file mode 100644
index 000000000000..c405d65bd76e
--- /dev/null
+++ b/sci-mathematics/euler/files/command-gcc4-gentoo.patch
@@ -0,0 +1,12 @@
+diff -Naur euler-1.61.0/src/command.c euler-1.61.0-new/src/command.c
+--- euler-1.61.0/src/command.c 2005-10-24 00:38:24.000000000 +0000
++++ euler-1.61.0-new/src/command.c 2006-02-08 23:30:43.000000000 +0000
+@@ -732,7 +732,7 @@
+ }
+
+
+-static int command_count;
++int command_count;
+
+ commandtyp command_list[] = {
+ {"quit",c_quit,do_quit},
diff --git a/sci-mathematics/euler/files/configure-gentoo.patch b/sci-mathematics/euler/files/configure-gentoo.patch
new file mode 100644
index 000000000000..e1e7c6ef1e6b
--- /dev/null
+++ b/sci-mathematics/euler/files/configure-gentoo.patch
@@ -0,0 +1,37 @@
+diff -Naur euler-1.61.0/configure.in euler-1.61.0-new/configure.in
+--- euler-1.61.0/configure.in 2005-10-30 16:40:27.000000000 +0000
++++ euler-1.61.0-new/configure.in 2006-02-08 23:38:54.000000000 +0000
+@@ -8,8 +8,6 @@
+ AM_CONFIG_HEADER(config.h)
+
+ AC_ISC_POSIX
+-CFLAGS=""
+-AC_SUBST(CFLAGS)
+ AC_PROG_CC
+ AM_PROG_CC_STDC
+ AC_HEADER_STDC
+@@ -21,6 +19,10 @@
+
+
+ dnl Checks for libraries.
++dnl Check for libm for fmod()
++AC_SEARCH_LIBS([fmod], [m], [], [
++ AC_MSG_ERROR([unable to find the fmod() function])
++])
+
+
+ dnl Checks for header files.
+diff -Naur euler-1.61.0/src/Makefile.am euler-1.61.0-new/src/Makefile.am
+--- euler-1.61.0/src/Makefile.am 2005-10-30 22:48:35.000000000 +0000
++++ euler-1.61.0-new/src/Makefile.am 2006-02-08 23:41:32.000000000 +0000
+@@ -7,10 +7,6 @@
+ INCLUDES = \
+ $(GTK_CFLAGS)
+
+-AM_CFLAGS =\
+- -Wall\
+- -O3
+-
+ bin_PROGRAMS = euler
+
+ euler_SOURCES = \
diff --git a/sci-mathematics/euler/files/euler-fortify.patch b/sci-mathematics/euler/files/euler-fortify.patch
new file mode 100644
index 000000000000..efb366e2cc04
--- /dev/null
+++ b/sci-mathematics/euler/files/euler-fortify.patch
@@ -0,0 +1,36 @@
+diff -Nur euler-1.61.0.orig/src/command.c euler-1.61.0/src/command.c
+--- euler-1.61.0.orig/src/command.c 2010-11-19 17:50:54.000000000 +0000
++++ euler-1.61.0/src/command.c 2010-11-19 18:23:11.000000000 +0000
+@@ -606,7 +606,7 @@
+ void do_help (void)
+ { char name[256];
+ header *hd;
+- int count,i,defaults;
++ size_t count,i,defaults;
+ char *p,*end,*pnote;
+ builtintyp *b;
+ scan_space();
+diff -Nur euler-1.61.0.orig/src/stack.h euler-1.61.0/src/stack.h
+--- euler-1.61.0.orig/src/stack.h 2010-11-19 17:50:54.000000000 +0000
++++ euler-1.61.0/src/stack.h 2010-11-19 18:19:23.000000000 +0000
+@@ -63,7 +63,7 @@
+ #endif
+ } dims;
+
+-typedef struct { unsigned long s; } inttyp;
++typedef struct { size_t s; } inttyp;
+
+ typedef struct { header hd; double val; } realtyp;
+
+diff -Nur euler-1.61.0.orig/src/udf.c euler-1.61.0/src/udf.c
+--- euler-1.61.0.orig/src/udf.c 2010-11-19 17:50:54.000000000 +0000
++++ euler-1.61.0/src/udf.c 2010-11-19 18:21:20.000000000 +0000
+@@ -334,7 +334,7 @@
+ { char name[16];
+ header *hd;
+ char *p,*pnote;
+- int i,count,defaults;
++ size_t i,count,defaults;
+ builtintyp *b;
+ scan_space();
+ scan_name(name); hd=searchudf(name);
diff --git a/sci-mathematics/euler/files/euler-glibc-2.4-gentoo.patch b/sci-mathematics/euler/files/euler-glibc-2.4-gentoo.patch
new file mode 100644
index 000000000000..da377bd5f3ba
--- /dev/null
+++ b/sci-mathematics/euler/files/euler-glibc-2.4-gentoo.patch
@@ -0,0 +1,13 @@
+# patch to fix missing CLK_TCK in glibc 2.4
+
+--- src/main.c. 2006-04-04 15:05:34.000000000 +0200
++++ src/main.c 2006-04-04 15:09:20.000000000 +0200
+@@ -439,7 +439,7 @@
+ gettimer(TIMEOFDAY,&t);
+ return (t.tv_sec+t.tv_nsec/1000000000.0);
+ #else
+- return ((double)(times(NULL)))/CLK_TCK;
++ return ((double)(times(NULL)))/CLOCKS_PER_SEC;
+ #endif
+ }
+
diff --git a/sci-mathematics/euler/files/euler-xdg.patch b/sci-mathematics/euler/files/euler-xdg.patch
new file mode 100644
index 000000000000..cb1bf54a2bbb
--- /dev/null
+++ b/sci-mathematics/euler/files/euler-xdg.patch
@@ -0,0 +1,23 @@
+--- docs/doc.html.orig 2008-01-07 23:11:25.490634852 +0000
++++ docs/doc.html 2008-01-07 23:13:57.652980222 +0000
+@@ -184,7 +184,8 @@
+ <div align=center><img src="images/pref3.gif"></div>
+
+ <p align="justify">Finally, You can set a flag to let Euler save preferences at exit (the default).
+-You may choose another browser than the one suggested (netscape by default). And
++You may choose another browser than the one suggested (your default
++ desktop browser is selected with xdg-open by default). And
+ You can also reset the preferences to the default values.</p>
+ <div align=center><img src="images/pref4.gif"></div>
+
+--- src/rc.h.orig 2008-01-07 23:15:36.617118688 +0000
++++ src/rc.h 2008-01-07 23:15:54.097371330 +0000
+@@ -26,7 +26,7 @@
+ #define E_GSTACK_DEFAULT 4*1024l
+ #define E_GLINES_DEFAULT 40
+
+-#define E_BROWSER_DEFAULT "netscape"
++#define E_BROWSER_DEFAULT "xdg-open"
+
+ #define MAX_COLORS 16
+
diff --git a/sci-mathematics/euler/metadata.xml b/sci-mathematics/euler/metadata.xml
new file mode 100644
index 000000000000..e24974c021f4
--- /dev/null
+++ b/sci-mathematics/euler/metadata.xml
@@ -0,0 +1,11 @@
+<?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>
+ <upstream>
+ <remote-id type="sourceforge">euler</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/factmsieve/Manifest b/sci-mathematics/factmsieve/Manifest
new file mode 100644
index 000000000000..c0b68a0d3b06
--- /dev/null
+++ b/sci-mathematics/factmsieve/Manifest
@@ -0,0 +1,6 @@
+AUX factmsieve-76.patch 1386 SHA256 ed69d01cf81a69cf19250d216923d452d6a81184a342080eba8914a252360b28 SHA512 f2dcda3838b27d39e235875a9be7dfccf69618f73daf73d28f599a33fe428bec289f52329128179772f6fbcdaa8692df9763af75b701459f03698c768fed584f WHIRLPOOL 92f0e8f3ccf1bdcda8927626ba69d8329811051018be5d595bb03c8c880c28a30274043c571e5f06fff1a6b98666cf4dfe4725ec894bd6c047ca4b4baac50be4
+DIST factmsieve.76.zip 19563 SHA256 961db0a36acc58ebf5ce2f5ba9f952e018a9aefbc2f9f8ab8b2a425757c2e2a2 SHA512 b07b0676a635ff746b1edfaf064d27388df8f9c5c2fe1bd1e80d4c839c6e518e3a0b39a06b76f3d59c9fa3f4cc99df0831ba6309a2a7d2eb779b952a29996431 WHIRLPOOL c5d818122f5db9b744272999bb72c42eb73a35dd20ad4ce46822b7e5be2f978a6582c9c5a2402f5fc9a1db4e8ec9f5373f7b090421000f85abecec156cf97a81
+EBUILD factmsieve-76-r1.ebuild 687 SHA256 2a995823c09d6a72926028c728bb127695961dc8b6cb6bea9b9fa614524537b0 SHA512 d79cf5f87602e5ca197bff1866c97a30d1538a64423483ab6331be57dba9c090cbcba07b8424623a10374e68586dcb7b1e6f4eefd23d987cc334f8e4bb47f3e4 WHIRLPOOL 17a5ecad76f66becfaa1d330b07069be2dc29bbb33be1e9557701d92b0fc028ce278f97d1e83c6d8ba9a228b95ec63e23f33d5d4f46c747f1ce65eb16cfba483
+MISC ChangeLog 2502 SHA256 d13a388b7b1035ee6ddf7b399ded40fb1af95356ebf547cb0320caf9310d78d7 SHA512 050fa3c9761bb15761cc4f9e4dcb630cb7f0802bb5beb4b736e01af9f6a16254ba4461f442bc7a5ea727c367db0f2ebd5fa0473f7ffe09bdd4afe8fe66ec185b WHIRLPOOL ba54f9966058a27e0eb078318966e5d3c13516da964c83d5faff9b1c3bfa118e1c914db752586a5c6a55d14eb563d7e7a383d15d3ca715c4612b609341991d4f
+MISC ChangeLog-2015 512 SHA256 24f6a710fd26af62dc5ed5836b5b669bfc7811cff7e56b9c24b4aa253c117de5 SHA512 b6c731c4accdf25eabb18e80bf4dbb7803687907ec584e766b0fb5f1766d621f25afdb72e3db19eb90b7edb5049ffe01a3d187abe4afd5ab70f45014ddd707fe WHIRLPOOL 240a26985068e923c8a886b35938f4d7620098c160a7d14f6778b82d071c74f1c3dc4bd8260f855af7f068bffd581e38c35993d8b5c57a6e03b248e211f622de
+MISC metadata.xml 247 SHA256 0deec0776f26fb762fdf7711f4589b14f52a2456436ef557eec62a2cf2fb2bb7 SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7 WHIRLPOOL a135fa622e99d3dcdb432bc6b3c366076b3d86b4bfd9a76c852d781b8e9152541c7e7a2c7c6d6a3c4d2200dce792847a08166aaf7c17c22b6299dfe868234dec
diff --git a/sci-mathematics/factmsieve/factmsieve-76-r1.ebuild b/sci-mathematics/factmsieve/factmsieve-76-r1.ebuild
new file mode 100644
index 000000000000..b8e607498d38
--- /dev/null
+++ b/sci-mathematics/factmsieve/factmsieve-76-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1
+
+DESCRIPTION="Convenient factorization helper script using msieve and ggnfs"
+HOMEPAGE="http://gladman.plushost.co.uk/oldsite/computing/factoring.php"
+SRC_URI="http://gladman.plushost.co.uk/oldsite/computing/${PN}.${PV}.zip"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ sci-mathematics/msieve
+ sci-mathematics/ggnfs"
+DEPEND=""
+
+S="${WORKDIR}"
+PATCHES=( "${FILESDIR}/${P}.patch" )
+
+src_install() {
+ python_fix_shebang ${PN}.py
+ dobin ${PN}.py
+}
diff --git a/sci-mathematics/factmsieve/files/factmsieve-76.patch b/sci-mathematics/factmsieve/files/factmsieve-76.patch
new file mode 100644
index 000000000000..eaf50efaecca
--- /dev/null
+++ b/sci-mathematics/factmsieve/files/factmsieve-76.patch
@@ -0,0 +1,52 @@
+--- a/factmsieve.py
++++ b/factmsieve.py
+@@ -1,3 +1,4 @@
++#!/usr/bin/env python
+ # factmsieve.py - A Python driver for GGNFS and MSIEVE
+ #
+ # Copyright (c) 2010, Brian Gladman
+@@ -56,9 +57,12 @@
+ import time, subprocess, gzip, glob, math, tempfile, datetime
+ import atexit, threading, collections, multiprocessing, platform
+
++# need to save pwd
++CUR_DIR=os.path.realpath(os.curdir)
++
+ # Set binary directory paths
+-GGNFS_PATH = '../../bin/x64/Release/'
+-MSIEVE_PATH = '../../../msieve/build.vc10/x64/Release/'
++GGNFS_PATH = '/usr/bin/'
++MSIEVE_PATH = '/usr/bin/'
+
+ # Set the number of CPU cores and threads
+ NUM_CORES = 4
+@@ -69,7 +73,7 @@
+ # number of linear algebra threads to launch
+ LA_THREADS = NUM_CORES * THREADS_PER_CORE
+
+-USE_CUDA = True
++USE_CUDA = False
+ GPU_NUM = 0
+ MSIEVE_POLY_TIME_LIMIT = 0
+
+@@ -103,8 +107,8 @@
+
+ # default parameter files
+
+-DEFAULT_PAR_FILE = GGNFS_PATH + 'def-par.txt'
+-DEFAULT_POLSEL_PAR_FILE = GGNFS_PATH + 'def-nm-params.txt'
++DEFAULT_PAR_FILE = '/usr/share/doc/ggnfs/def-par.txt'
++DEFAULT_POLSEL_PAR_FILE = '/usr/share/doc/ggnfs/def-nm-params.txt'
+
+ # temporary files
+
+@@ -258,7 +262,8 @@
+ # write string to log(s):
+
+ def write_string_to_log(s):
+- with open(LOGNAME, 'a') as out_f:
++ # XXX hax
++ with open(CUR_DIR+'/'+LOGNAME, 'a') as out_f:
+ print(date_time_string() + s, file = out_f)
+
+ def output(s, console = True, log = True):
diff --git a/sci-mathematics/factmsieve/metadata.xml b/sci-mathematics/factmsieve/metadata.xml
new file mode 100644
index 000000000000..40aa45df2b01
--- /dev/null
+++ b/sci-mathematics/factmsieve/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-mathematics/fann/Manifest b/sci-mathematics/fann/Manifest
new file mode 100644
index 000000000000..530c208afae1
--- /dev/null
+++ b/sci-mathematics/fann/Manifest
@@ -0,0 +1,7 @@
+AUX fann-2.2.0-examples.patch 941 SHA256 c4fecc90a3e001a2db726a7e86531711f509d915724c8dd96acee87d84adbcf7 SHA512 617c43352912b965d0c7ef445aecdb15a5148260e3f41c1b0e8cdd5abb0246e6ad0338c74b75c690fbc63175692578dcc596612108c3b9804694cecace046b34 WHIRLPOOL 3dbc3c7ab92b111a82c50dd7555e5193725233b53a4db34d572aaf2d60e451d26f5c18bceb572b2088dede192e11441d74c41212589f918015dea6fd76b47581
+DIST FANN-2.2.0-Source.zip 2285087 SHA256 434b85fce60701c4e0066c442d60110d8e649f278e4edb814f0c0e7a1e0929fd SHA512 c486694aac53cf91a83f8b68d9020fc74ca2bea9416c9d06b6dc8f53d30a2261bd00212e3d439adef9fbdd82532056f7c1afed793f5574c2d6191d84d26fb5c2 WHIRLPOOL 12f6ccaa425bfcd495d47e5a20ad6549a53dba984a9f8f3f0baec078b420a56c8cced6926702604142e543a8920cb30dc57cfa80888c14cfc86a534d6f8cd6a3
+EBUILD fann-2.2.0-r1.ebuild 769 SHA256 81e28c33a7d0a245604f0c8beaaa9c1e5af6985b783c076e81dd8f705faf9f3d SHA512 2f620edb4c345f50b1344bf7fb47d9471e6daae9d7c4c6f2fa9ef60f61c26bb3d62d7cd9b20a23f8816c3bd6a18b466eb2c8ac070adf75371c8772d389b94738 WHIRLPOOL 7d158fc3fdfc43f0d2b1ad3a2b5d7202493c60673a4dd530c771916f37871588a2d1d0b2d2706d6cb6a8348a6b142e89d418bcfd0e76e897b1084298fa4207be
+EBUILD fann-9999.ebuild 657 SHA256 b6351709122eb4d11a8b00ed5c65dd35977fd02f1cc85e83869bdf918c16afc2 SHA512 5c2002f43aa598135999993929a09584b048d9d2f0d5e2b695a7e5e1d54b0f84e7e92ca4fcec91831f202ab0f40231cfdcd3666517d2d0634e67be393611876b WHIRLPOOL 434b54e69e49053de801cbfca207514089bad445944de5ed9e5b855f34c40e144ab2c993c6724b855f22ab01f82631e63bffc828fa232e5068f6ae57baa55945
+MISC ChangeLog 3406 SHA256 f357daa686edc4c94989ba931e8c2a12e24adad2b603e2b6fafdbc3f3a5e958b SHA512 4a907256b11d9da0f6c6c5f60d704d50f7538831d2cb59ce6040158c025784ab70782b9cc00259b2278623d83fb4136ae4be3333d6ffc0ae55bbf09ae3ef706e WHIRLPOOL b61b4b77a0fbd1368f08a4a93594480e51f365c7430feb363344df4e6415b9de37af177586b9fc860bfa962b080f1dcfa7073499072a10a5d06d4a46bc78b02b
+MISC ChangeLog-2015 3595 SHA256 35f1c1926c937834b379a0ecc3bc84c5461a0a77d4712e9ff88408cacde73a93 SHA512 753980e2b0a0028876e5203e0be6197623b40b33a272a2e8ca3ed702b868ecdcba88599bc3c92a965278e52db45ad499c4249f5f762428966d831e6d46b4e051 WHIRLPOOL 00198c4f2c63e915848b24b409a8442ce077c596e765867946410755e350101d062120b7daa33aba39f13453402e2dba94f43ce5714c9215ca4a1cf38a6fc4a4
+MISC metadata.xml 841 SHA256 a8fdc1801f3a55f05b17dc7a13a1cb270f4736a961a4aa6e998ba0904b7e11fb SHA512 4cca56af735bab9710d8e62891c749e990813eb99bc28c01fec63de8038fecd89bbd7b331841a530aaf1b61cf3b77f7995a7006cebe158ad197527ae2fea7ef6 WHIRLPOOL 3f314db0bcdb81ade32e2afec0b6bdfc30c98733fe339c3f1de10d0759f0fe2d9e6f6f1e32af93ccf718e01f224a60917657ffebc494f98392b3768216db7fe8
diff --git a/sci-mathematics/fann/fann-2.2.0-r1.ebuild b/sci-mathematics/fann/fann-2.2.0-r1.ebuild
new file mode 100644
index 000000000000..614220457998
--- /dev/null
+++ b/sci-mathematics/fann/fann-2.2.0-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-multilib
+
+MY_P=FANN-${PV}-Source
+
+DESCRIPTION="Fast Artificial Neural Network Library"
+HOMEPAGE="http://leenissen.dk/fann/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="examples"
+
+RDEPEND=""
+DEPEND="app-arch/unzip"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}/${P}-examples.patch" )
+
+src_test() {
+ cd examples || die
+ emake CFLAGS="${CFLAGS} -I../src/include -L${BUILD_DIR}/src"
+ LD_LIBRARY_PATH="${BUILD_DIR}/src" emake runtest
+ emake clean
+}
+
+src_install() {
+ cmake-multilib_src_install
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/sci-mathematics/fann/fann-9999.ebuild b/sci-mathematics/fann/fann-9999.ebuild
new file mode 100644
index 000000000000..ffe0d8b9bb2d
--- /dev/null
+++ b/sci-mathematics/fann/fann-9999.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-multilib git-r3
+
+DESCRIPTION="Fast Artificial Neural Network Library"
+HOMEPAGE="http://leenissen.dk/fann/"
+EGIT_REPO_URI="https://github.com/libfann/fann"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="examples"
+
+src_test() {
+ cd examples || die 'fails to enter examples directory'
+ LD_LIBRARY_PATH="${BUILD_DIR}/src" GCC="$(tc-getCC) ${CFLAGS} -I../src/include -L${BUILD_DIR}/src" emake -e runtest
+ emake clean
+}
+
+src_install() {
+ cmake-multilib_src_install
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/sci-mathematics/fann/files/fann-2.2.0-examples.patch b/sci-mathematics/fann/files/fann-2.2.0-examples.patch
new file mode 100644
index 000000000000..189e6936e457
--- /dev/null
+++ b/sci-mathematics/fann/files/fann-2.2.0-examples.patch
@@ -0,0 +1,23 @@
+--- a/examples/Makefile.orig 2012-01-24 05:31:40.000000000 +0000
++++ b/examples/Makefile 2012-05-08 19:00:08.000000000 +0100
+@@ -1,7 +1,6 @@
+ # This makefile is on purpose not made with configure, to show how to use the library
+ # The make file requires that the fann library is installed (see ../README)
+
+-GCC=gcc
+
+ TARGETS = xor_train xor_test xor_test_fixed simple_train steepness_train simple_test robot mushroom cascade_train scaling_test scaling_train
+ DEBUG_TARGETS = xor_train_debug xor_test_debug xor_test_fixed_debug cascade_train_debug
+@@ -9,10 +8,10 @@
+ all: $(TARGETS)
+
+ %: %.c Makefile
+- $(GCC) -O3 $< -o $@ -lfann -lm
++ $(CC) $(CFLAGS) $< -lfann -lm -o $@
+
+ %_fixed: %.c Makefile
+- $(GCC) -O3 -DFIXEDFANN $< -o $@ -lfixedfann -lm
++ $(CC) $(CFLAGS) -DFIXEDFANN $< -lfixedfann -lm -o $@
+
+ clean:
+ rm -f $(TARGETS) $(DEBUG_TARGETS) xor_fixed.data *.net *~ *.obj *.exe *.tds noscale.txt withscale.txt scale_test_results.txt
diff --git a/sci-mathematics/fann/metadata.xml b/sci-mathematics/fann/metadata.xml
new file mode 100644
index 000000000000..0e980124731f
--- /dev/null
+++ b/sci-mathematics/fann/metadata.xml
@@ -0,0 +1,19 @@
+<?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">
+ Fast Artificial Neural Network Library implements multilayer artificial
+ neural networks in C with support for both fully connected and sparsely
+ connected networks. Cross-platform execution in both fixed and floating
+ point are supported. It includes a framework for easy handling of
+ training data sets. It is easy to use, versatile, well documented, and
+ fast. Delphi, PHP, Python and other bindings are available.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">fann</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/flint/Manifest b/sci-mathematics/flint/Manifest
new file mode 100644
index 000000000000..18bae1baf6ee
--- /dev/null
+++ b/sci-mathematics/flint/Manifest
@@ -0,0 +1,16 @@
+AUX flint-2.4.3-cflags-ldflags.patch 1879 SHA256 a07c6d13a239a208f80561deb262af52c2d3da9bfb08744c10f4e50797f24408 SHA512 05fe22492d8e96eeabd30c5b28f8743354e8bf4e593eaf58d8be6bb47341a1c7148c13de681a5983fdae32cc246259ab69cff8b390002c0836ac2ae7d0a9b87e WHIRLPOOL 8210033b3ff8e1df2ad5a40ce9b4d6d34407b00c861b981cc785581099828a7a07c7f6d3f231d4ca7a5311bee26a39d880b3f89cc96378aa6b88791e7a008b65
+AUX flint-2.4.3-libdir.patch 1215 SHA256 def40bcf963341d11982f0ce2bd04567c0381ac085c9103320c780b95cd2d402 SHA512 92beca631043d9bf40f8174462a213e56963736b3b3926540cbd010938e57fd8eb3565185e1941d969700566e106adbd006396b65ba9877dbcf6c630287a7ac7 WHIRLPOOL 899eb997426883e49843a6dd998cce9842cd12446ba4037c03849fa7227eed877520341e95a0d2c22c9f3e4f2b78c8f4cc4af2020a9d2d09d4c4df5bb95dce10
+AUX flint-2.4.3-whitespaces.patch 1929 SHA256 e11afffa161207f73f905040dbede8246b4d96e2698ec780c9e1e1890f23bf71 SHA512 4bfa3bf3d7393ab577988b4def04fb2fe4107679a8f3eb2db7fd2c900d6ba0b79e685f5357d5d99633ea6eb8e4c7c38530f69f35fcfa250d6751e3d1f41a025f WHIRLPOOL 27b87df0bac1e74555c9f83cde575d1eaaeeec2a18245bd3df92b57b1c019168b33140275b18b7d89f67a69d0f3a488812e4a655d43d461fb6f34c6823d1ef86
+AUX flint-2.4.4-PIE-FTBFS.patch 615 SHA256 0e8ba7b48d70c703e511d71d4e59b6b359273c480b01f02879ca0aaaaa5395c3 SHA512 80b5c7f68a6a31d2e8a8e5182f6eb975bfecfeae4fc30a039d0dd047d7c0351207980d0688de523789d876f098b111c9ab8f26b97bf95cd57a1c2f95ed6e46b1 WHIRLPOOL ad489ceb047a0137033a1d9e51d45a1f2cebe9613834f042788c758b590d4f42b3b4ee88959ba2266cafcfe2286c87eac7083513a8747cd1d771c0bdd5390fb0
+AUX flint-2.4.4-test.patch 709 SHA256 41ba827bffa88c62ecdb93a2a7b1ddd01a3ad395e36b34b93a05c7c26e76ee57 SHA512 46f66ef5104b535c0004b63cac30bd0dcd66ff554502387597d0ab5f8d7a8189431872510c0666ad99dd7c15ec7756a87b670ef162ad6b085150c6eee7a7a376 WHIRLPOOL 29d73e80b43b06e7111dae44722967b5910850f7416aa03e5fd054aee8009a256fdf05e49b61370b8d4f9dd91aef1a5fc9535822c870cc9217fe45f75a2ee618
+AUX flint-2.4.5-gmp6-compat.patch 3495 SHA256 57e2ec6769844cada6a8cffda9da3ad9c323e945e10ab00b10d921152a0707b2 SHA512 e7caf37d900380eacb5bea67be1d2e78a1468b92dd21c052d8d5b5d362782425b52107cc97dc68ef73e0da494071f01e980e6b1fafed5bfc8a090f8b9e7e5c3b WHIRLPOOL 3d76de9620b213417cd97be2a937ddad96000c8f03ea0eb559d3659915c54d90b5282f504669f9b59acfb14ebe550cbc102890442f5bf36418a65b73c443f255
+AUX flint-2.4.5-ntl62.patch 454 SHA256 e4dc970d1aaea39621215843eb92643a5c5b27e66c8378d30229546f10588322 SHA512 c19092d0dd4060469e383aa0844cff40ab55d9f4dda77edf5f8dc7f1a8ad833541cdf92d196fc6b21ad43fadcba6d70d0ace4574e1c6828d2c25d9f74094fbb0 WHIRLPOOL ba14c88a1b661f35a2f23cad271bce7206d995831b85d10f106cefa9ab2afb8e9beafcdb4aa77aa3e530f92a0034b75da7e9fde0c3a90774229b3f6ba11ef72c
+DIST flint-2.4.4.tar.gz 1639262 SHA256 c4799e9394ef06d7b8625f7fd74ba2d8ca115dbb2aa506dcc6e369b49d0e5bc7 SHA512 236997cf64bdc96741740889f450fdbaf7d7e9b58252645f864d28005c9e7bdf87f7187cd17526606c605f0489f026398a1361b8f209f71158ca3b31c42d86d2 WHIRLPOOL 299820bc656e955d54dd06be3a1ba68440e8d9c72785ac54e7d9559da073b31c07b73598c9b18c98889f836dfd25ed8cd96d62a901a12a529698ae00ba30f1d1
+DIST flint-2.4.5.tar.gz 1640022 SHA256 e489354df00f0d84976ccdd0477028693977c87ccd14f3924a89f848bb0e01e3 SHA512 088ff512ea2330f9323a6ca0dc875e8c0926d755317d6007eba4b333a14d7612e82ebcfeabd26d1ec4b9204c4517dee08f914ad1ec852e37336fe378710a8bfc WHIRLPOOL cf5a22a9353cc23f1ab056cf6737d61d8de91ab0dc0c4a2ae46cf0777abee240a49f76de15bf854a8275023735101ce306789bca9a052151b09017e02d111069
+DIST flint-2.5.2.tar.gz 2212242 SHA256 cbf1fe0034533c53c5c41761017065f85207a1b770483e98b2392315f6575e87 SHA512 cce36947b558aabecaf780171b4bbc0e1330c3b1a7e3580717584be5cab4991d33b190531c7995b224a3a440e28c4a610d6f781901e29f48ced12a9c5ba960a2 WHIRLPOOL 74b237a8d258d17395aa0bf474c24a8ffe7ad01c4cbc4aa5b712fe14f1920191d9f96ef062461fbe8750b4461eacb0d88ff2a9d19990450363d87104e9ce203d
+EBUILD flint-2.4.4-r1.ebuild 1543 SHA256 71407bd86120707fa2439bcffb34a310c9c9e0b41006345b4249e3ea83ca05a9 SHA512 bee9f783ce831ff3c6a745d7c4ebdb046cc0c2b62136c3ba337bc5e47a0ba5782af9f0ead4573c12d695283b14087d2d5fe4d824f5b47bf474bb45a335758cee WHIRLPOOL 0d8f901aae14310ef1e908052cb53c2466a7fee0309328b6313ea5c839017be97bd65ad4f9fe17477065350fc9c2e58611754482f9635420c8308e708fb0f56f
+EBUILD flint-2.4.5.ebuild 1631 SHA256 805f1dd9889d743209e567d7b0ef796ed27c007a688a0f4ca04153d1d70325c8 SHA512 f1cb533494568b2f0c808a683285815fc34730d59030661bfab7c2a7819f43f08e69e3e8b47081f3b123565b3ce38d49c85f841600c7cff07e4e644c6556eda1 WHIRLPOOL c4ff98a1dcdb8d91313578b72801c423e8251f7d1188125ee1b7e5ebdfa1e45deef641ffe6838fdfe43a820acb6246b676fe1dbec97cf72bf8c907dbb70f3acc
+EBUILD flint-2.5.2.ebuild 1367 SHA256 1f29e2d316834b0f8c88f9d444900161b36726073f8dd367741b1a812ed61e1f SHA512 c886113d3cf3c19cc87817296d25695a7824c27ff30ff150721765766d11830f3e6c0bdf49b0b3e80ab33cf4439d42fe1bf5d1a055696d8396f79c1714cac04a WHIRLPOOL 57827583abb8e71f1903097fc1fa24a6f3b9dfa424f3bf39f51d1bc78ce4e8756b69d6be52b182f63fd04560bca9242cd73b48c70252cade8ff8a2c9c3fa9173
+MISC ChangeLog 3947 SHA256 58c11335d1a7fee292c6297e47cdb579aacc41cb3e2f2a3011f91cfa1ae6db42 SHA512 a635cc0ba1d7c8066f020007aa2cf4a766dfb3213d22ade4793879f631d74a0b39348bf22218633a37e79164822940b2b0b110971ca6c18343e8056e6a4e910a WHIRLPOOL f705b1b655642a102ba1fc04d768137e753a6cbf80a2c9b47bbf2bf0433b803821a93544267cdf6e0e61f7954f45ca99627cd87a3ea9aacf7df9dd461f91534c
+MISC ChangeLog-2015 2034 SHA256 0cbf5344cf945ccd4e168451219af7c7ab3e168209abc92db0292116f4e2f10d SHA512 51e6a829ed7fbc519e5109306d89c9a339c0480de321929f5ac4481afb71b6e2fbe072bacc1675d5dc39690ba60d37f25593c70925c346796daef99e6a2db005 WHIRLPOOL c37d0d8a42ef5456fb50ad983b315d019a54c79eb5724fa08a0969a26cafded8215364bd29f53e7231e6137f7f175d7a2aaef7c6cf149ba393e3256f7f1a8b27
+MISC metadata.xml 481 SHA256 aa0c6c478e6d1b531548b1c78a5960d47f68903edb5ebb8094f8b9d5dba1e936 SHA512 63b38afaf08270df42d3a26cca9f5f491562dd89d8e9c43def3849a624d6694343147e47a602d75e44a656a8db1f7cb06885534fe39917cb46f2f895efc8ff16 WHIRLPOOL b25a9ad37cc33b17c4b696b46490800b875b0b89d634cc9ba2ada509e044508ded783e3e1d8bb5de3a0f5531404da52384d087c1d45890b3f1a60c0810dc3459
diff --git a/sci-mathematics/flint/files/flint-2.4.3-cflags-ldflags.patch b/sci-mathematics/flint/files/flint-2.4.3-cflags-ldflags.patch
new file mode 100644
index 000000000000..f0a2ec8531b0
--- /dev/null
+++ b/sci-mathematics/flint/files/flint-2.4.3-cflags-ldflags.patch
@@ -0,0 +1,33 @@
+commit afadc8d05674a0e3e2fcf6dfbcf5f3c8f9133119
+Author: hasufell <hasufell@hasufell.de>
+Date: Sun May 18 19:32:59 2014 +0200
+
+ Respect CFLAGS/CXXFLAGS/LDFLAGS, fixes #66
+
+ Even in linking command CFLAGS should be respected, no matter
+ if all objects have already been compiled or not. Some flags
+ affect both linking and object compilation and users shouldn't
+ be required to figure them out. This is standard in most build
+ systems anyway.
+
+ Reorderd the linker line a bit, so it matches common practice,
+ although this doesn't matter technically (except that LDFLAGS
+ must go before libraries we link against).
+
+diff --git a/Makefile.in b/Makefile.in
+index a522ac1..6dda689 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -104,10 +104,10 @@ $(FLINT_LIB): $(LOBJS) $(LIB_SOURCES) $(EXT_SOURCES) $(HEADERS) $(EXT_HEADERS) |
+ $(AT)$(foreach dir, $(BUILD_DIRS), mkdir -p build/$(dir); BUILD_DIR=../build/$(dir); export BUILD_DIR; MOD_DIR=$(dir); export MOD_DIR; $(MAKE) -f ../Makefile.subdirs -C $(dir) shared || exit $$?;)
+ $(AT)if [ "$(WANT_NTL)" -eq "1" ]; then \
+ $(MAKE) build/interfaces/NTL-interface.lo; \
+- $(CXX) $(ABI_FLAG) -shared $(EXTRA_SHARED_FLAGS) build/interfaces/NTL-interface.lo $(LOBJS) $(MOD_LOBJS) $(EXT_OBJS) $(LIBS2) -o $(FLINT_LIB); \
++ $(CXX) $(CXXFLAGS) $(ABI_FLAG) -shared $(EXTRA_SHARED_FLAGS) build/interfaces/NTL-interface.lo $(LOBJS) $(MOD_LOBJS) $(EXT_OBJS) -o $(FLINT_LIB) $(LDFLAGS) $(LIBS2); \
+ fi
+ $(AT)if [ "$(WANT_NTL)" -ne "1" ]; then \
+- $(CC) $(ABI_FLAG) -shared $(EXTRA_SHARED_FLAGS) $(LOBJS) $(MOD_LOBJS) $(EXT_OBJS) $(LIBS2) -o $(FLINT_LIB); \
++ $(CC) $(CFLAGS) $(ABI_FLAG) -shared $(EXTRA_SHARED_FLAGS) $(LOBJS) $(MOD_LOBJS) $(EXT_OBJS) -o $(FLINT_LIB) $(LDFLAGS) $(LIBS2); \
+ fi
+
+ libflint.a: $(OBJS) $(LIB_SOURCES) $(EXT_SOURCES) $(HEADERS) $(EXT_HEADERS) | build build/interfaces
diff --git a/sci-mathematics/flint/files/flint-2.4.3-libdir.patch b/sci-mathematics/flint/files/flint-2.4.3-libdir.patch
new file mode 100644
index 000000000000..a569be40b8b8
--- /dev/null
+++ b/sci-mathematics/flint/files/flint-2.4.3-libdir.patch
@@ -0,0 +1,44 @@
+From 27eb23c1844029ee64907500bd8aa87097ffcd32 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@hasufell.de>
+Date: Sun, 18 May 2014 18:46:24 +0200
+Subject: [PATCH] Allow to control LIBDIR
+
+Some distributions have lib32/lib64 and need to control
+the destination properly.
+---
+ Makefile.in | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index c16f838..b6ea4c9 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -4,6 +4,8 @@ else
+ $(DLPATH):=$(DLPATH_ADD)
+ endif
+
++LIBDIR=lib
++
+ QUIET_CC = @echo ' ' CC ' ' $@;
+ QUIET_CXX = @echo ' ' CXX ' ' $@;
+ QUIET_AR = @echo ' ' AR ' ' $@;
+@@ -169,13 +171,13 @@ else
+ endif
+
+ install: library
+- mkdir -p $(DESTDIR)$(PREFIX)/lib
++ mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR)
+ mkdir -p $(DESTDIR)$(PREFIX)/include/flint
+ $(AT)if [ "$(FLINT_SHARED)" -eq "1" ]; then \
+- cp $(FLINT_LIB) $(DESTDIR)$(PREFIX)/lib; \
++ cp $(FLINT_LIB) $(DESTDIR)$(PREFIX)/$(LIBDIR); \
+ fi
+ $(AT)if [ "$(FLINT_STATIC)" -eq "1" ]; then \
+- cp libflint.a $(DESTDIR)$(PREFIX)/lib; \
++ cp libflint.a $(DESTDIR)$(PREFIX)/$(LIBDIR); \
+ fi
+ cp $(HEADERS) $(DESTDIR)$(PREFIX)/include/flint
+ $(AT)if [ ! -z $(EXT_HEADERS) ]; then \
+--
+1.9.3
+
diff --git a/sci-mathematics/flint/files/flint-2.4.3-whitespaces.patch b/sci-mathematics/flint/files/flint-2.4.3-whitespaces.patch
new file mode 100644
index 000000000000..3d63aedeab3c
--- /dev/null
+++ b/sci-mathematics/flint/files/flint-2.4.3-whitespaces.patch
@@ -0,0 +1,54 @@
+From 3506d617ef9dfc5184aa99be05a25e4f73d6c3f6 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@hasufell.de>
+Date: Sun, 18 May 2014 18:47:27 +0200
+Subject: [PATCH] Quote variables that could contain whitespaces
+
+Make does NOT take care of this in this context. It's
+not a variable assignment and installation would fail
+if DESTDIR contains any whitespace.
+---
+ Makefile.in | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index b6ea4c9..a522ac1 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -171,23 +171,23 @@ else
+ endif
+
+ install: library
+- mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR)
+- mkdir -p $(DESTDIR)$(PREFIX)/include/flint
++ mkdir -p "$(DESTDIR)$(PREFIX)/$(LIBDIR)"
++ mkdir -p "$(DESTDIR)$(PREFIX)/include/flint"
+ $(AT)if [ "$(FLINT_SHARED)" -eq "1" ]; then \
+- cp $(FLINT_LIB) $(DESTDIR)$(PREFIX)/$(LIBDIR); \
++ cp $(FLINT_LIB) "$(DESTDIR)$(PREFIX)/$(LIBDIR)"; \
+ fi
+ $(AT)if [ "$(FLINT_STATIC)" -eq "1" ]; then \
+- cp libflint.a $(DESTDIR)$(PREFIX)/$(LIBDIR); \
++ cp libflint.a "$(DESTDIR)$(PREFIX)/$(LIBDIR)"; \
+ fi
+- cp $(HEADERS) $(DESTDIR)$(PREFIX)/include/flint
++ cp $(HEADERS) "$(DESTDIR)$(PREFIX)/include/flint"
+ $(AT)if [ ! -z $(EXT_HEADERS) ]; then \
+- cp $(EXT_HEADERS) $(DESTDIR)$(PREFIX)/include/flint; \
++ cp $(EXT_HEADERS) "$(DESTDIR)$(PREFIX)/include/flint"; \
+ fi
+- mkdir -p $(DESTDIR)$(FLINT_CPIMPORT_DIR)
+- cp qadic/CPimport.txt $(DESTDIR)$(FLINT_CPIMPORT_DIR)
+- mkdir -p $(DESTDIR)$(PREFIX)/include/flint/flintxx
+- cp flintxx/*.h $(DESTDIR)$(PREFIX)/include/flint/flintxx
+- cp *xx.h $(DESTDIR)$(PREFIX)/include/flint
++ mkdir -p "$(DESTDIR)$(FLINT_CPIMPORT_DIR)"
++ cp qadic/CPimport.txt "$(DESTDIR)$(FLINT_CPIMPORT_DIR)"
++ mkdir -p "$(DESTDIR)$(PREFIX)/include/flint/flintxx"
++ cp flintxx/*.h "$(DESTDIR)$(PREFIX)/include/flint/flintxx"
++ cp *xx.h "$(DESTDIR)$(PREFIX)/include/flint"
+
+ build:
+ mkdir -p build
+--
+1.9.3
+
diff --git a/sci-mathematics/flint/files/flint-2.4.4-PIE-FTBFS.patch b/sci-mathematics/flint/files/flint-2.4.4-PIE-FTBFS.patch
new file mode 100644
index 000000000000..5689e3633ee4
--- /dev/null
+++ b/sci-mathematics/flint/files/flint-2.4.4-PIE-FTBFS.patch
@@ -0,0 +1,17 @@
+Description: invoke $(CC) with -r and not -Wl,-r to fix FTBFS with PIE enabled
+Author: Logan Rosen <logan@ubuntu.com>
+Forwarded: yes
+
+diff --git a/Makefile.subdirs b/Makefile.subdirs
+index ec05fb0..f2d8b37 100644
+--- a/Makefile.subdirs
++++ b/Makefile.subdirs
+@@ -59,7 +59,7 @@ $(BUILD_DIR)/$(MOD_DIR)_%.o: %.c
+ $(QUIET_CC) $(CC) $(CFLAGS) $(INCS) -c $< -o $@ -MMD -MP -MF "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$@"
+
+ $(MOD_LOBJ): $(LOBJS)
+- $(QUIET_CC) $(CC) $(ABI_FLAG) -Wl,-r $^ -o $@ -nostdlib
++ $(QUIET_CC) $(CC) $(ABI_FLAG) -r $^ -o $@ -nostdlib
+
+ -include $(LOBJS:.lo=.d)
+
diff --git a/sci-mathematics/flint/files/flint-2.4.4-test.patch b/sci-mathematics/flint/files/flint-2.4.4-test.patch
new file mode 100644
index 000000000000..11b7cfe21115
--- /dev/null
+++ b/sci-mathematics/flint/files/flint-2.4.4-test.patch
@@ -0,0 +1,19 @@
+commit 5e3d4a0504158f70d227e7cfc03985fe9a646797
+Author: hasufell <hasufell@hasufell.de>
+Date: Wed Jul 2 12:58:50 2014 +0200
+
+ Fix NTL test build
+
+diff --git a/Makefile.in b/Makefile.in
+index 6dda689..e9de7da 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -214,7 +214,7 @@ build/interfaces/NTL-interface.o: interfaces/NTL-interface.cpp NTL-interface.h
+ $(QUIET_CXX) $(CXX) $(CFLAGS) $(INCS) -c $< -o $@;
+
+ build/interfaces/test/t-NTL-interface$(EXEEXT): interfaces/test/t-NTL-interface.cpp
+- $(QUIET_CXX) $(CXX) $(CFLAGS) $(INCS) $< build/interfaces/NTL-interface.o -o $@ $(LIBS);
++ $(QUIET_CXX) $(CXX) $(CFLAGS) $(INCS) $< build/interfaces/NTL-interface.lo -o $@ $(LIBS);
+
+ print-%:
+ @echo '$*=$($*)'
diff --git a/sci-mathematics/flint/files/flint-2.4.5-gmp6-compat.patch b/sci-mathematics/flint/files/flint-2.4.5-gmp6-compat.patch
new file mode 100644
index 000000000000..559cbe51fb28
--- /dev/null
+++ b/sci-mathematics/flint/files/flint-2.4.5-gmp6-compat.patch
@@ -0,0 +1,115 @@
+From a7f911140e7d0a0125653a40aa2c5fe257bd78f5 Mon Sep 17 00:00:00 2001
+From: Fredrik Johansson <fredrik.johansson@gmail.com>
+Date: Thu, 18 Sep 2014 14:49:05 +0200
+Subject: [PATCH] redefine fmpz_invmod to consider any integer invertible mod 1
+ (for gmp 6.0 compatibility)
+
+---
+ fmpz/doc/fmpz.txt | 3 ++-
+ fmpz/invmod.c | 11 +++++++++--
+ fmpz/test/t-invmod.c | 21 +++++++++++++++++----
+ 3 files changed, 28 insertions(+), 7 deletions(-)
+
+diff --git a/fmpz/doc/fmpz.txt b/fmpz/doc/fmpz.txt
+index fb422d8..2ada719 100644
+--- a/fmpz/doc/fmpz.txt
++++ b/fmpz/doc/fmpz.txt
+@@ -899,7 +899,8 @@ int fmpz_invmod(fmpz_t f, const fmpz_t g, const fmpz_t h)
+ Sets $f$ to the inverse of $g$ modulo $h$. The value of $h$ may
+ not be $0$ otherwise an exception results. If the inverse exists
+ the return value will be non-zero, otherwise the return value will
+- be $0$ and the value of $f$ undefined.
++ be $0$ and the value of $f$ undefined. As a special case, we
++ consider any number invertible modulo $h = \pm 1$, with inverse 0.
+
+ void fmpz_negmod(fmpz_t f, const fmpz_t g, const fmpz_t h)
+
+diff --git a/fmpz/invmod.c b/fmpz/invmod.c
+index a0cf601..0e20f39 100644
+--- a/fmpz/invmod.c
++++ b/fmpz/invmod.c
+@@ -67,7 +67,11 @@ fmpz_invmod(fmpz_t f, const fmpz_t g, const fmpz_t h)
+ if (c2 < WORD(0))
+ c2 = -c2;
+ if (c2 == WORD(1))
+- return 0; /* special case not handled by n_invmod */
++ {
++ fmpz_zero(f);
++ return 1; /* special case not handled by n_invmod */
++ }
++
+ gcd = z_gcdinv(&inv, c1, c2);
+
+ return (gcd == UWORD(1) ? fmpz_set_si(f, inv), 1 : 0);
+@@ -106,7 +110,10 @@ fmpz_invmod(fmpz_t f, const fmpz_t g, const fmpz_t h)
+ if (c2 < WORD(0))
+ c2 = -c2;
+ if (c2 == WORD(1))
+- return 0; /* special case not handled by z_gcd_invert */
++ {
++ fmpz_zero(f);
++ return 1; /* special case not handled by z_gcd_invert */
++ }
+ /* reduce g mod h first */
+
+ r = flint_mpz_fdiv_ui(COEFF_TO_PTR(c1), c2);
+diff --git a/fmpz/test/t-invmod.c b/fmpz/test/t-invmod.c
+index aea236e..8ff1c7f 100644
+--- a/fmpz/test/t-invmod.c
++++ b/fmpz/test/t-invmod.c
+@@ -30,6 +30,19 @@
+ #include "ulong_extras.h"
+ #include "fmpz.h"
+
++/* Use the definiton of GMP versions >= 6.0 */
++int
++mpz_invert2(mpz_t a, const mpz_t b, const mpz_t c)
++{
++ if (mpz_cmpabs_ui(c, 1) == 0)
++ {
++ mpz_set_ui(a, 0);
++ return 1;
++ }
++ else
++ return mpz_invert(a, b, c);
++}
++
+ int
+ main(void)
+ {
+@@ -63,7 +76,7 @@ main(void)
+ fmpz_get_mpz(e, b);
+
+ r1 = fmpz_invmod(c, a, b);
+- r2 = mpz_invert(f, d, e);
++ r2 = mpz_invert2(f, d, e);
+
+ fmpz_get_mpz(g, c);
+
+@@ -106,7 +119,7 @@ main(void)
+ fmpz_get_mpz(d, a);
+
+ r1 = fmpz_invmod(c, a, a);
+- r2 = mpz_invert(f, d, d);
++ r2 = mpz_invert2(f, d, d);
+
+ fmpz_get_mpz(g, c);
+
+@@ -149,7 +162,7 @@ main(void)
+ fmpz_get_mpz(e, b);
+
+ r1 = fmpz_invmod(a, a, b);
+- r2 = mpz_invert(f, d, e);
++ r2 = mpz_invert2(f, d, e);
+
+ fmpz_get_mpz(g, a);
+
+@@ -192,7 +205,7 @@ main(void)
+ fmpz_get_mpz(e, b);
+
+ r1 = fmpz_invmod(b, a, b);
+- r2 = mpz_invert(f, d, e);
++ r2 = mpz_invert2(f, d, e);
+
+ fmpz_get_mpz(g, b);
+
diff --git a/sci-mathematics/flint/files/flint-2.4.5-ntl62.patch b/sci-mathematics/flint/files/flint-2.4.5-ntl62.patch
new file mode 100644
index 000000000000..e08fa774e298
--- /dev/null
+++ b/sci-mathematics/flint/files/flint-2.4.5-ntl62.patch
@@ -0,0 +1,13 @@
+diff -druN flint-2.5.orig/interfaces/NTL-interface.cpp flint-2.5/interfaces/NTL-interface.cpp
+--- flint-2.5.orig/interfaces/NTL-interface.cpp 2014-07-16 07:50:40.000000000 -0700
++++ flint-2.5/interfaces/NTL-interface.cpp 2014-08-26 07:51:55.585884615 -0700
+@@ -32,9 +32,7 @@
+ #include <NTL/ZZ.h>
+ #include <NTL/ZZX.h>
+ #include <NTL/mat_ZZ.h>
+-#include <NTL/lip.h>
+ #include <NTL/ctools.h>
+-#include <NTL/g_lip.h>
+ #include <gmp.h>
+
+ #include "flint.h"
diff --git a/sci-mathematics/flint/flint-2.4.4-r1.ebuild b/sci-mathematics/flint/flint-2.4.4-r1.ebuild
new file mode 100644
index 000000000000..1068395a40c3
--- /dev/null
+++ b/sci-mathematics/flint/flint-2.4.4-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Fast Library for Number Theory"
+HOMEPAGE="http://www.flintlib.org/"
+SRC_URI="http://www.flintlib.org/${P}.tar.gz"
+
+RESTRICT="mirror"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="doc gc ntl static-libs test"
+
+RDEPEND="dev-libs/gmp:0=
+ dev-libs/mpfr:0
+ gc? ( dev-libs/boehm-gc )
+ ntl? ( dev-libs/ntl )"
+DEPEND="${RDEPEND}
+ doc? (
+ app-text/texlive-core
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.4.3-libdir.patch \
+ "${FILESDIR}"/${PN}-2.4.3-whitespaces.patch \
+ "${FILESDIR}"/${PN}-2.4.3-cflags-ldflags.patch \
+ "${FILESDIR}"/${PN}-2.4.4-test.patch \
+ "${FILESDIR}"/${PN}-2.4.4-PIE-FTBFS.patch
+
+ sed -i \
+ -e '/echo "DLPATH_ADD=/s/\$DLPATH_ADD/\\\$(CURDIR)/' \
+ ./configure || die
+}
+
+src_configure() {
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ --with-gmp="${EPREFIX}/usr" \
+ --with-mpfr="${EPREFIX}/usr" \
+ $(usex ntl "--with-ntl=${EPREFIX}/usr" "") \
+ $(use_enable static-libs static) \
+ $(usex gc "--with-gc=${EPREFIX}/usr" "") \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ || die
+}
+
+src_compile() {
+ emake verbose
+
+ if use doc ; then
+ emake -C doc/latex
+ fi
+}
+
+src_test() {
+ emake AT= QUIET_CC= QUIET_CXX= QUIET_AR= check
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" install
+ einstalldocs
+ use doc && dodoc doc/latex/flint-manual.pdf
+}
diff --git a/sci-mathematics/flint/flint-2.4.5.ebuild b/sci-mathematics/flint/flint-2.4.5.ebuild
new file mode 100644
index 000000000000..b36ea8b5f2b3
--- /dev/null
+++ b/sci-mathematics/flint/flint-2.4.5.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Fast Library for Number Theory"
+HOMEPAGE="http://www.flintlib.org/"
+SRC_URI="http://www.flintlib.org/${P}.tar.gz"
+
+RESTRICT="mirror"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc gc ntl static-libs test"
+
+RDEPEND="dev-libs/gmp:0=
+ dev-libs/mpfr:0
+ gc? ( dev-libs/boehm-gc )
+ ntl? ( dev-libs/ntl )"
+DEPEND="${RDEPEND}
+ doc? (
+ app-text/texlive-core
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.4.3-libdir.patch \
+ "${FILESDIR}"/${PN}-2.4.3-whitespaces.patch \
+ "${FILESDIR}"/${PN}-2.4.3-cflags-ldflags.patch \
+ "${FILESDIR}"/${PN}-2.4.4-test.patch \
+ "${FILESDIR}"/${PN}-2.4.5-gmp6-compat.patch \
+ "${FILESDIR}"/${PN}-2.4.5-ntl62.patch \
+ "${FILESDIR}"/${PN}-2.4.4-PIE-FTBFS.patch
+
+ sed -i \
+ -e '/echo "DLPATH_ADD=/s/\$DLPATH_ADD/\\\$(CURDIR)/' \
+ ./configure || die
+}
+
+src_configure() {
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ --with-gmp="${EPREFIX}/usr" \
+ --with-mpfr="${EPREFIX}/usr" \
+ $(usex ntl "--with-ntl=${EPREFIX}/usr" "") \
+ $(use_enable static-libs static) \
+ $(usex gc "--with-gc=${EPREFIX}/usr" "") \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ || die
+}
+
+src_compile() {
+ emake verbose
+
+ if use doc ; then
+ emake -C doc/latex
+ fi
+}
+
+src_test() {
+ emake AT= QUIET_CC= QUIET_CXX= QUIET_AR= check
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" install
+ einstalldocs
+ use doc && dodoc doc/latex/flint-manual.pdf
+}
diff --git a/sci-mathematics/flint/flint-2.5.2.ebuild b/sci-mathematics/flint/flint-2.5.2.ebuild
new file mode 100644
index 000000000000..64f94ae79dcf
--- /dev/null
+++ b/sci-mathematics/flint/flint-2.5.2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils multilib toolchain-funcs
+
+DESCRIPTION="Fast Library for Number Theory"
+HOMEPAGE="http://www.flintlib.org/"
+SRC_URI="http://www.flintlib.org/${P}.tar.gz"
+
+RESTRICT="mirror"
+LICENSE="GPL-2"
+SLOT="0/13"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc gc ntl static-libs test"
+
+RDEPEND="dev-libs/gmp:=
+ dev-libs/mpfr:=
+ gc? ( dev-libs/boehm-gc )
+ ntl? ( dev-libs/ntl:= )"
+DEPEND="${RDEPEND}
+ doc? (
+ app-text/texlive-core
+ dev-texlive/texlive-latex
+ dev-texlive/texlive-latexextra
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.4.4-PIE-FTBFS.patch
+
+ sed -i \
+ -e '/echo "DLPATH_ADD=/s/\$DLPATH_ADD/\\\$(CURDIR)/' \
+ ./configure || die
+}
+
+src_configure() {
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ --with-gmp="${EPREFIX}/usr" \
+ --with-mpfr="${EPREFIX}/usr" \
+ $(usex ntl "--with-ntl=${EPREFIX}/usr" "") \
+ $(use_enable static-libs static) \
+ $(usex gc "--with-gc=${EPREFIX}/usr" "") \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ || die
+}
+
+src_compile() {
+ emake verbose
+
+ if use doc ; then
+ emake -C doc/latex
+ fi
+}
+
+src_test() {
+ emake AT= QUIET_CC= QUIET_CXX= QUIET_AR= check
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" install
+ einstalldocs
+ use doc && dodoc doc/latex/flint-manual.pdf
+}
diff --git a/sci-mathematics/flint/metadata.xml b/sci-mathematics/flint/metadata.xml
new file mode 100644
index 000000000000..d455fe29d0e2
--- /dev/null
+++ b/sci-mathematics/flint/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="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">wbhart/flint2</remote-id>
+ </upstream>
+ <use>
+ <flag name="gc">Enable garbage collection
+ support via <pkg>dev-libs/boehm-gc</pkg></flag>
+ <flag name="ntl">Build NTL interface</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/form/Manifest b/sci-mathematics/form/Manifest
new file mode 100644
index 000000000000..12f819093506
--- /dev/null
+++ b/sci-mathematics/form/Manifest
@@ -0,0 +1,7 @@
+DIST form-4.1.tar.gz 1260530 SHA256 fb3470937d66ed5cb1af896b15058836d2c805d767adac1b9073ed2df731cbe9 SHA512 39ab2fa1e448d6d5e427cc2c92285cc27f84724addffc378f3b799fc2b3f6381b8dceb87cb980062b980885d8d81591c5c7ff7b0dbeae7b6d9a3cf0b03d58aae WHIRLPOOL 1950ebc2357a78bf7430dd35852ab538e14b2ec68df8e9d11d7adcc31c365c14175c91bee984458794346a3b66b0580bea8625eeeff8c9c0f2045bab2bb1b5f8
+DIST form-4.2.0.tar.gz 1386285 SHA256 55fb2f69b98e4bd48e365b2245f3d0e22ef0f969d07b1a4aa81b120baf42a2a4 SHA512 7566b89c1c1b74da58da92426f5e4beee271d4273df6cbe1d1de1a17377125b745103852c363dfe8ff1b0e9cb9ba4c84187406e8f77b23f5198fd592f5dfe341 WHIRLPOOL 149e94c0c551481d9d4f035b71c5255ad59a6568ebab9b94e146bfb050af9989bd7dd371bb15035eea4c589d736ee61bc903d0bb4383902c5c0605da606c0d75
+EBUILD form-4.1.ebuild 1718 SHA256 0974c7700d9ccb747b862c06ffd656304ba1e9d516793fa12093bb04bf9476d4 SHA512 69602e500fe94f135344598528e082565b51d1cf9c6381af3217e0bd9d75b5f61e8258e7c11f23976c694ebeabb91a230a2656f2d20ad57eccacc3a865875fc8 WHIRLPOOL 0af968ea3e893d1dd020f0b97f7c6c985e763943ba28465fa49e96deb68795ac0b9963769adfebebb0cef1afe6b62b8af28d9690a16cde31f03b114953bb940b
+EBUILD form-4.2.0.ebuild 1735 SHA256 f6fe057d99e68f0f5fb5d4d705446ca6d28fc42e4af4e95882749008d687795c SHA512 6a68e65ad9d0e4035b419ac49ea82fe476ea1153d1eb338b535994055f3a390932a5f65e72a99699ed2063af03bcea498e6803cdd35f56a282b9e8a31e97e756 WHIRLPOOL 68533e759f7a26f49db41ba0d59cb49e526294cc539d9befe0301ba1987c85003e3b6c3f2df7a301e1ec4b16a74fccc30cb98b85ddd2ac22c5a1c94c23b93510
+MISC ChangeLog 2545 SHA256 254b91425e41e5ed1e08f5bece114fb281c4e698ec8f0ce3b9ed4a04e55e3892 SHA512 78350ca5f70beff501ccab6958cf7b0fdb5553090411b668ac09e669c20f605b323a6c0273dac2f33fc8e833ac5cdd7e9e700938cc4b8f0e6af6ab824de96ba7 WHIRLPOOL 734f6ba6cb92c2ef8cdaf56c212f0bfc058f855e18dea0b8a94b6e6f29506b5ef390d383f03dc31d27c4467bc5bc50ec7a9a5e1d974d854cb07d70f3570e0011
+MISC ChangeLog-2015 983 SHA256 44972646f70d769f5d878da67a43a3ad8593f920d57acb5934136d4d0aa19e06 SHA512 c346cb55a673d42ae243302f24f8aaf3cc8d622399fa1f54608a97f54e32a00264a0f71ce85364f73784482b7bee8938c90cc93538722275da8608f256e983bc WHIRLPOOL b80c6ae8da698007112ab449750c9a0036fa062755395b6e913c494da9705d3627183a8fa4e68b7133c7ecd8ad47456c56c1f3ec6920f2b112ab85fed120089d
+MISC metadata.xml 573 SHA256 30b6ddd620c9013624d1e56a459d9ed0b666c9db506e5b73f226dfb4571baaa8 SHA512 24b8b3fa4128f8d36cb30b2ae1b2a29cd5a5823309ed36ededf0e2682627f418a7274728547ea293b50b41100dfb1f9bff2120129c2e367bbcc4cc6eabb0d384 WHIRLPOOL 7aaa3523dcfea104bf07fa15a2a9c738f2448234abf9fa8b13618a2ac6190d4676da1ea3d96212627339df132613cb9c270633aacb3edc5d2ba5cd8384993a1e
diff --git a/sci-mathematics/form/form-4.1.ebuild b/sci-mathematics/form/form-4.1.ebuild
new file mode 100644
index 000000000000..6eb0f062f04b
--- /dev/null
+++ b/sci-mathematics/form/form-4.1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools
+
+DESCRIPTION="Symbolic Manipulation System"
+HOMEPAGE="http://www.nikhef.nl/~form/"
+SRC_URI="http://www.nikhef.nl/~form/maindir/binaries/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="devref doc doxygen gmp mpi threads zlib"
+
+RDEPEND="
+ gmp? ( dev-libs/gmp:0= )
+ mpi? ( virtual/mpi )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ devref? ( dev-texlive/texlive-latex )
+ doc? ( dev-texlive/texlive-latex )
+ doxygen? ( app-doc/doxygen )"
+
+src_prepare() {
+ sed -i 's/LINKFLAGS = -s/LINKFLAGS =/' sources/Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-scalar \
+ --enable-largefile \
+ --disable-debug \
+ --disable-static-link \
+ --with-api=posix \
+ $(use_with gmp ) \
+ $(use_enable mpi parform ) \
+ $(use_enable threads threaded ) \
+ $(use_with zlib ) \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}"
+}
+
+src_compile() {
+ default
+ if use devref; then
+ pushd doc/devref > /dev/null || die "doc/devref does not exist"
+ LANG=C emake pdf
+ popd > /dev/null
+ fi
+ if use doc; then
+ pushd doc/manual > /dev/null || die "doc/manual does not exist"
+ LANG=C emake pdf
+ popd > /dev/null
+ fi
+ if use doxygen; then
+ pushd doc/doxygen > /dev/null || die "doc/doxygen does not exist"
+ emake html
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ default
+ if use devref; then
+ insinto /usr/share/doc/${PF}
+ doins doc/devref/devref.pdf
+ fi
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins doc/manual/manual.pdf
+ fi
+ if use doxygen; then
+ dohtml -r doc/doxygen/html/*
+ fi
+}
diff --git a/sci-mathematics/form/form-4.2.0.ebuild b/sci-mathematics/form/form-4.2.0.ebuild
new file mode 100644
index 000000000000..8f30d5b663c9
--- /dev/null
+++ b/sci-mathematics/form/form-4.2.0.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools
+
+DESCRIPTION="Symbolic Manipulation System"
+HOMEPAGE="http://www.nikhef.nl/~form/"
+SRC_URI="https://github.com/vermaseren/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="devref doc doxygen gmp mpi threads zlib"
+
+RDEPEND="
+ gmp? ( dev-libs/gmp:0= )
+ mpi? ( virtual/mpi )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ devref? ( dev-texlive/texlive-latex )
+ doc? ( dev-texlive/texlive-latex )
+ doxygen? ( app-doc/doxygen )"
+
+src_prepare() {
+ sed -i 's/LINKFLAGS = -s/LINKFLAGS =/' sources/Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-scalar \
+ --enable-largefile \
+ --disable-debug \
+ --disable-static-link \
+ --with-api=posix \
+ $(use_with gmp ) \
+ $(use_enable mpi parform ) \
+ $(use_enable threads threaded ) \
+ $(use_with zlib ) \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}"
+}
+
+src_compile() {
+ default
+ if use devref; then
+ pushd doc/devref > /dev/null || die "doc/devref does not exist"
+ LANG=C emake pdf
+ popd > /dev/null
+ fi
+ if use doc; then
+ pushd doc/manual > /dev/null || die "doc/manual does not exist"
+ LANG=C emake pdf
+ popd > /dev/null
+ fi
+ if use doxygen; then
+ pushd doc/doxygen > /dev/null || die "doc/doxygen does not exist"
+ emake html
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ default
+ if use devref; then
+ insinto /usr/share/doc/${PF}
+ doins doc/devref/devref.pdf
+ fi
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins doc/manual/manual.pdf
+ fi
+ if use doxygen; then
+ dohtml -r doc/doxygen/html/*
+ fi
+}
diff --git a/sci-mathematics/form/metadata.xml b/sci-mathematics/form/metadata.xml
new file mode 100644
index 000000000000..046e2a6564f3
--- /dev/null
+++ b/sci-mathematics/form/metadata.xml
@@ -0,0 +1,15 @@
+<?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">
+A system which can efficiently manipulate huge formulas limited only by available disk space.
+</longdescription>
+ <use>
+ <flag name="devref">Build and install developers reference</flag>
+ <flag name="doxygen">Build and install API documentation</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/fricas/Manifest b/sci-mathematics/fricas/Manifest
new file mode 100644
index 000000000000..88a5a9c6c842
--- /dev/null
+++ b/sci-mathematics/fricas/Manifest
@@ -0,0 +1,10 @@
+AUX 64fricas-gentoo.el 101 SHA256 b41c5e5323b2e2f38f04856fdff293c110bbc6016cab84f7af29772ef3366b2a SHA512 be36ef5bfb525aa054cd3881ece83d47ee3a9cb7ef1b0c26215d449ddcad8f9f57045b29ab9063a62f43caa764abb251e5fcd04cf1d15bcc423e40d9e69239ef WHIRLPOOL 8c45eb3935184310180ba2f03bc3c182d57d373063daa8094d3737d82828e50d87222a17f2a880450b9aeec6d0be2763b0f0cdc5dfab26fb01d92a2833ece505
+DIST fricas-1.3.0-full.tar.bz2 10459788 SHA256 d4ceb6bcf4049196130d463dc7442dd206fd9cde0634f3e2f70add2e2c774f03 SHA512 fd084c3d3ada76424b0159eff76660872da63c1e25f392d98bc7175b37c05fe23a117587addc89828ff38a368f5161d34febcc269f530710ff7da6b53860653f WHIRLPOOL c334c42ee83f676ce9640870e4ddf42a2a3c034570c173ec633c6eecf45d3e2d14f9e6e9fa4240d4f090fa0b1ddfaa3e4b117d530dc6f3c9d70a9b1a399cd188
+DIST fricas-1.3.1-full.tar.bz2 10522387 SHA256 7d4a768aed086aefa332930787dbc1be810aeded9385ae2b7205d6c1827c5c30 SHA512 d492686fc03ed704cc015ec0ba250ab7928b637ff6ef8cf1aa924190e7fe22bd63a512074439dbf7ce44dce786d51ad5e27857522a1e21136b4b8d6cf014c486 WHIRLPOOL 143c7ef847292ac37ae9f1322ec4d93e3879e0fc9b602d727b870c808569aa2dc6c4f76e0f1880ec3bb2915e713fa773c1e936be2b9059b73e7d5786efeef297
+DIST fricas-1.3.2-full.tar.bz2 10523665 SHA256 798b123e61f3566e6b1b367c235f5b4599a9c737b938aa71f32d0aabb7db439d SHA512 679dffbe8a991d4ae3d6667a6163337ffa24d48b9d1d776ba1a39569cb3b9f17e8d484075746b75b7eb6bbe5b9d26af3e526850a19118274988b9e88ad52a679 WHIRLPOOL 2ce62a2917a6378d75e844ba0b63d1386552698181892ad9f1d519019c89525c20b19b6ea6a7e9f93b656529c7bd4f1f2f2c6a7f571fec1e2713a4faa0d3e41b
+EBUILD fricas-1.3.0-r1.ebuild 2321 SHA256 f2fe4931cddfc9dfbfd072298c0a4dd448c010b494c58fd280523c7f46a5ef1b SHA512 c4cfd4e382a0bca917619e15ce3eaca011acaf91d724b9ee882ed02e41a3ab7df0f221d2ebe84d79bd48c80b4d108c5affa0ad93c57d714734c1ed2a703344b3 WHIRLPOOL bf9540a0b0a7c7094c1089a6851c709387cfb5ff355ca1d02e093b03004b88d9e86383abfcc5eb0faf621ece981d921ce7a51232fd445eae36f1a6f9d62f3f25
+EBUILD fricas-1.3.1.ebuild 2274 SHA256 f761b0e8664ad97fc0ca588effa670fcf79b761465673d9b3a4130b4d87e493c SHA512 488e3b29f0920821c248c49e5019f4f1880fe66842fc74f8c0a8453a2b7a157892bedb75814655f70d42d42cc70c0b2b02d2c0f3acd3f31b2e0b34c5c02d400c WHIRLPOOL ec79f4835c41d02a97c8c7318e500480c5bada1447c76d682bd3355bc53c96b93b8b8d3bd2484a622afa98da4819080d7f3874400bc9ee8a2067846fb3e01f08
+EBUILD fricas-1.3.2.ebuild 2274 SHA256 f761b0e8664ad97fc0ca588effa670fcf79b761465673d9b3a4130b4d87e493c SHA512 488e3b29f0920821c248c49e5019f4f1880fe66842fc74f8c0a8453a2b7a157892bedb75814655f70d42d42cc70c0b2b02d2c0f3acd3f31b2e0b34c5c02d400c WHIRLPOOL ec79f4835c41d02a97c8c7318e500480c5bada1447c76d682bd3355bc53c96b93b8b8d3bd2484a622afa98da4819080d7f3874400bc9ee8a2067846fb3e01f08
+MISC ChangeLog 4059 SHA256 ec88ec0d1da7bf544568a5117d742e7a8d74ae9f6abaeb803c87008d2039dda5 SHA512 90304bb771aaf25f98749b0f2b3ad1d4cfa6d8636aedf6d3c875bf8e71c455bb5db75549240b4559b15d3b5f0e1797b773406dabdb2d773bdd77c39439eb77a4 WHIRLPOOL 07b09517af6356340c05b9724fcb34b11394e22b553a569c94ed532a281cde5e409b1ef2fb748fafa080c0867139908edb3f1e64188e8f35ec60e8e35dca6eb0
+MISC ChangeLog-2015 3964 SHA256 37464809b9c1a47c32500cbffc884678bce740a23e305ecf4604036d27482b2d SHA512 39d814ac321d96a8066d782dca3d94bb973625b524ddab4e60eaa7d5a96bce2bf3ad2fdde1cd5697192046c4ef5fcb4784c10a07e8ff3ba972c55d57d55455b4 WHIRLPOOL 7fe6a3ecfdb04668f3ebfe0828e61b37178dac0ae0c69f14e232821aa27511ac4058ea8167dfcc872015bec9abd986bc621e2d73e005c972b5567fa29c2c3254
+MISC metadata.xml 1161 SHA256 91db17143c83c3ed286a401f1f6353cb16f8cb33aa1428d08fc532733f807d2b SHA512 c0555d42cc2d50498b1fa4bbf0fd658332f6ad79aaf0ab207ded28f7463401c901b67f53a1274794db2c0927806501493f99277f5325d52ccfacf5e522cfdfc5 WHIRLPOOL 38d387cee9fc1ab0427d5ea06837e091c709446d1aa7295672ccec43c5d904e93942767a3f0365b541d4cd6302916c691a7c930ae1ab0aaa5084b506d62c6ebc
diff --git a/sci-mathematics/fricas/files/64fricas-gentoo.el b/sci-mathematics/fricas/files/64fricas-gentoo.el
new file mode 100644
index 000000000000..bc610ea83925
--- /dev/null
+++ b/sci-mathematics/fricas/files/64fricas-gentoo.el
@@ -0,0 +1,2 @@
+;; site-init for sci-mathematics/fricas
+(add-to-list 'load-path "/usr/share/emacs/site-lisp/fricas")
diff --git a/sci-mathematics/fricas/fricas-1.3.0-r1.ebuild b/sci-mathematics/fricas/fricas-1.3.0-r1.ebuild
new file mode 100644
index 000000000000..10e11cd67e79
--- /dev/null
+++ b/sci-mathematics/fricas/fricas-1.3.0-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=5
+inherit multilib elisp-common
+
+DESCRIPTION="FriCAS is a fork of Axiom computer algebra system"
+HOMEPAGE="http://${PN}.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-full.tar.bz2"
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# Supported lisps, number 0 is the default
+LISPS=( sbcl cmucl gcl ecls clisp clozurecl )
+# Version restrictions, . means no restrictions
+REST=( ">=dev-lisp/sbcl-1.3.6:= <dev-lisp/sbcl-1.3.13" . . . . . )
+# command name: . means just ${LISP}
+COMS=( . lisp . ecl . ccl )
+
+IUSE="${LISPS[*]} X emacs gmp"
+RDEPEND="X? ( x11-libs/libXpm x11-libs/libICE )
+ emacs? ( virtual/emacs )
+ gmp? ( dev-libs/gmp:= )"
+
+# Generating lisp deps
+n=${#LISPS[*]}
+for ((n--; n > 0; n--)); do
+ LISP=${LISPS[$n]}
+ if [ "${REST[$n]}" = "." ]; then
+ DEP="dev-lisp/${LISP}"
+ else
+ DEP="${REST[$n]}"
+ fi
+ RDEPEND="${RDEPEND} ${LISP}? ( ${DEP}:= ) !${LISP}? ("
+done
+if [ "${REST[0]}" = "." ]; then
+ DEP="dev-lisp/${LISPS[0]}"
+else
+ DEP="${REST[0]}"
+fi
+RDEPEND="${RDEPEND} ${DEP}:="
+n=${#LISPS[*]}
+for ((n--; n > 0; n--)); do
+ RDEPEND="${RDEPEND} )"
+done
+
+DEPEND="${RDEPEND}"
+
+# necessary for clisp and gcl
+RESTRICT="strip"
+
+src_configure() {
+ local LISP n
+ LISP=sbcl
+ n=${#LISPS[*]}
+ for ((n--; n > 0; n--)); do
+ if use ${LISPS[$n]}; then
+ LISP=${COMS[$n]}
+ if [ "${LISP}" = "." ]; then
+ LISP=${LISPS[$n]}
+ fi
+ fi
+ done
+ einfo "Using lisp: ${LISP}"
+
+ # aldor is not yet in portage
+ econf --disable-aldor --with-lisp=${LISP} $(use_with X x) $(use_with gmp)
+}
+
+src_compile() {
+ # bug #300132
+ emake -j1
+}
+
+src_test() {
+ emake -j1 all-input
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install
+ dodoc README FAQ
+
+ if use emacs; then
+ sed -e "s|(setq load-path (cons (quote \"/usr/$(get_libdir)/fricas/emacs\") load-path)) ||" \
+ -i "${D}"/usr/bin/efricas \
+ || die "sed efricas failed"
+ elisp-install ${PN} "${D}"/usr/$(get_libdir)/${PN}/emacs/*.el
+ elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
+ else
+ rm "${D}"/usr/bin/efricas || die "rm efricas failed"
+ fi
+ rm -r "${D}"/usr/$(get_libdir)/${PN}/emacs || die "rm -r emacs failed"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/fricas/fricas-1.3.1.ebuild b/sci-mathematics/fricas/fricas-1.3.1.ebuild
new file mode 100644
index 000000000000..315a133b047b
--- /dev/null
+++ b/sci-mathematics/fricas/fricas-1.3.1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=5
+inherit multilib elisp-common
+
+DESCRIPTION="FriCAS is a fork of Axiom computer algebra system"
+HOMEPAGE="http://${PN}.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-full.tar.bz2"
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# Supported lisps, number 0 is the default
+LISPS=( sbcl cmucl gcl ecls clisp clozurecl )
+# Version restrictions, . means no restrictions
+REST=( . . . . . . )
+# command name: . means just ${LISP}
+COMS=( . lisp . ecl . ccl )
+
+IUSE="${LISPS[*]} X emacs gmp"
+RDEPEND="X? ( x11-libs/libXpm x11-libs/libICE )
+ emacs? ( virtual/emacs )
+ gmp? ( dev-libs/gmp:= )"
+
+# Generating lisp deps
+n=${#LISPS[*]}
+for ((n--; n > 0; n--)); do
+ LISP=${LISPS[$n]}
+ if [ "${REST[$n]}" = "." ]; then
+ DEP="dev-lisp/${LISP}"
+ else
+ DEP="${REST[$n]}"
+ fi
+ RDEPEND="${RDEPEND} ${LISP}? ( ${DEP}:= ) !${LISP}? ("
+done
+if [ "${REST[0]}" = "." ]; then
+ DEP="dev-lisp/${LISPS[0]}"
+else
+ DEP="${REST[0]}"
+fi
+RDEPEND="${RDEPEND} ${DEP}:="
+n=${#LISPS[*]}
+for ((n--; n > 0; n--)); do
+ RDEPEND="${RDEPEND} )"
+done
+
+DEPEND="${RDEPEND}"
+
+# necessary for clisp and gcl
+RESTRICT="strip"
+
+src_configure() {
+ local LISP n
+ LISP=sbcl
+ n=${#LISPS[*]}
+ for ((n--; n > 0; n--)); do
+ if use ${LISPS[$n]}; then
+ LISP=${COMS[$n]}
+ if [ "${LISP}" = "." ]; then
+ LISP=${LISPS[$n]}
+ fi
+ fi
+ done
+ einfo "Using lisp: ${LISP}"
+
+ # aldor is not yet in portage
+ econf --disable-aldor --with-lisp=${LISP} $(use_with X x) $(use_with gmp)
+}
+
+src_compile() {
+ # bug #300132
+ emake -j1
+}
+
+src_test() {
+ emake -j1 all-input
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install
+ dodoc README FAQ
+
+ if use emacs; then
+ sed -e "s|(setq load-path (cons (quote \"/usr/$(get_libdir)/fricas/emacs\") load-path)) ||" \
+ -i "${D}"/usr/bin/efricas \
+ || die "sed efricas failed"
+ elisp-install ${PN} "${D}"/usr/$(get_libdir)/${PN}/emacs/*.el
+ elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
+ else
+ rm "${D}"/usr/bin/efricas || die "rm efricas failed"
+ fi
+ rm -r "${D}"/usr/$(get_libdir)/${PN}/emacs || die "rm -r emacs failed"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/fricas/fricas-1.3.2.ebuild b/sci-mathematics/fricas/fricas-1.3.2.ebuild
new file mode 100644
index 000000000000..315a133b047b
--- /dev/null
+++ b/sci-mathematics/fricas/fricas-1.3.2.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=5
+inherit multilib elisp-common
+
+DESCRIPTION="FriCAS is a fork of Axiom computer algebra system"
+HOMEPAGE="http://${PN}.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-full.tar.bz2"
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# Supported lisps, number 0 is the default
+LISPS=( sbcl cmucl gcl ecls clisp clozurecl )
+# Version restrictions, . means no restrictions
+REST=( . . . . . . )
+# command name: . means just ${LISP}
+COMS=( . lisp . ecl . ccl )
+
+IUSE="${LISPS[*]} X emacs gmp"
+RDEPEND="X? ( x11-libs/libXpm x11-libs/libICE )
+ emacs? ( virtual/emacs )
+ gmp? ( dev-libs/gmp:= )"
+
+# Generating lisp deps
+n=${#LISPS[*]}
+for ((n--; n > 0; n--)); do
+ LISP=${LISPS[$n]}
+ if [ "${REST[$n]}" = "." ]; then
+ DEP="dev-lisp/${LISP}"
+ else
+ DEP="${REST[$n]}"
+ fi
+ RDEPEND="${RDEPEND} ${LISP}? ( ${DEP}:= ) !${LISP}? ("
+done
+if [ "${REST[0]}" = "." ]; then
+ DEP="dev-lisp/${LISPS[0]}"
+else
+ DEP="${REST[0]}"
+fi
+RDEPEND="${RDEPEND} ${DEP}:="
+n=${#LISPS[*]}
+for ((n--; n > 0; n--)); do
+ RDEPEND="${RDEPEND} )"
+done
+
+DEPEND="${RDEPEND}"
+
+# necessary for clisp and gcl
+RESTRICT="strip"
+
+src_configure() {
+ local LISP n
+ LISP=sbcl
+ n=${#LISPS[*]}
+ for ((n--; n > 0; n--)); do
+ if use ${LISPS[$n]}; then
+ LISP=${COMS[$n]}
+ if [ "${LISP}" = "." ]; then
+ LISP=${LISPS[$n]}
+ fi
+ fi
+ done
+ einfo "Using lisp: ${LISP}"
+
+ # aldor is not yet in portage
+ econf --disable-aldor --with-lisp=${LISP} $(use_with X x) $(use_with gmp)
+}
+
+src_compile() {
+ # bug #300132
+ emake -j1
+}
+
+src_test() {
+ emake -j1 all-input
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install
+ dodoc README FAQ
+
+ if use emacs; then
+ sed -e "s|(setq load-path (cons (quote \"/usr/$(get_libdir)/fricas/emacs\") load-path)) ||" \
+ -i "${D}"/usr/bin/efricas \
+ || die "sed efricas failed"
+ elisp-install ${PN} "${D}"/usr/$(get_libdir)/${PN}/emacs/*.el
+ elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
+ else
+ rm "${D}"/usr/bin/efricas || die "rm efricas failed"
+ fi
+ rm -r "${D}"/usr/$(get_libdir)/${PN}/emacs || die "rm -r emacs failed"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/fricas/metadata.xml b/sci-mathematics/fricas/metadata.xml
new file mode 100644
index 000000000000..7e1b9cc30dcd
--- /dev/null
+++ b/sci-mathematics/fricas/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>grozin@gentoo.org</email>
+ <name>Andrey Grozin</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+FriCAS is a fork of Axiom computer algebra system.
+</longdescription>
+ <use>
+ <flag name="clisp">Add support for GNU CLISP
+ (<pkg>dev-lisp/clisp</pkg>)</flag>
+ <flag name="cmucl">Add support for CMU Common Lisp
+ (<pkg>dev-lisp/cmucl</pkg>)</flag>
+ <flag name="gcl">Add support for GNU Common Lisp
+ (<pkg>dev-lisp/gcl</pkg>)</flag>
+ <flag name="sbcl">Add support for Steel Bank Common Lisp
+ (<pkg>dev-lisp/sbcl</pkg>)</flag>
+ <flag name="ecls">Add support for Embeddable Common Lisp
+ (<pkg>dev-lisp/ecls</pkg>)</flag>
+ <flag name="clozurecl">Add support for Clozure Common Lisp
+ (<pkg>dev-lisp/clozurecl</pkg>)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">fricas</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/frobby/Manifest b/sci-mathematics/frobby/Manifest
new file mode 100644
index 000000000000..2f6dd0340d6e
--- /dev/null
+++ b/sci-mathematics/frobby/Manifest
@@ -0,0 +1,9 @@
+AUX frobby-cflags-no-strip-soname.patch 1273 SHA256 61ebd2ba9b558ee6c9bd42ed160a2bbb633f59c9bc9f400cd4b37ead1a96982a SHA512 24387271eedb2955c96bd81235e5b425da1df475534522c3d474241328fd40937db4f4efa05c26cc1975d86c5165cbc3ded47f385b6359b46b018cf0d6052f1d WHIRLPOOL 40f392a36341d55f78db6d67cf6d702bb5111e16c1b02447ffbde11566e56fe45f69d8c00a68b17d0830eb8239374ded9d37bfeb888e142fe6859dfc3a4f9a81
+AUX frobby-gcc-4.7.patch 974 SHA256 a1d1092135ee699e2f7b84d45c5130fb8bc4ca996ad92747b9a21d06b35e5f3c SHA512 2e1895b16064cd7121145202f865b0b9ca1cdb3e5088d82f9f80c8a2fdc8ef4a76f734e326d8685465b06218eea1a502d48ee0e6dd51fe92965bc3f8830fc13f WHIRLPOOL 36b02e227f23613a61b3338c9ab9b705a13a45977226cc67725708ae907a552f54907173d537ba029fc0fe49f8021ca4af0b88da902b1cee9f84723bbc468ac9
+AUX frobby-gmp-5.1.patch 482 SHA256 d3d95c47a46c5ac82f5a12e55cc568fa5a2a946cfabd31376ac3a001f3911695 SHA512 a0e113c8a7c25c442a13425baf3fd3259ef48dfa67db25dcc1c87c9a2b1d2453d7daf9778a7c46ce9298db4f59177b63b7811eb4085f206c5a73e538488d174b WHIRLPOOL 5c2b39823ca4a5860c3b126a69137522ee6a38fada93232b74f1789846913bdefdd5101da8b2d9c19393e677e51473bbadce80561f939cd8d19fb125dbb8d4cb
+DIST frobby_v0.9.0.tar.gz 852524 SHA256 af092383e6dc849c86f4e79747ae0e5cd309a690747230e10aa38d60640062df SHA512 b1f64d7a8630ba7f5464e36f66a06a7a7909bc42f2e52898b2967b8ad6288da8ce11a5d79ebfbbfe2f3933930ad26444173f721465ae9a42b6dcf3eef7ecc59e WHIRLPOOL f02c6c794c214c047ae6e1d764b0a29a87be1c080e8ac7489aedb1394a90169f8dc5bb6447c961760a35ba2af90c34ed9bb8e282590d0d05abe791aff7473025
+EBUILD frobby-0.9.0-r1.ebuild 1290 SHA256 778fa24b73ec2a555dd4e0e124389a745c7622b6c3dec2ed4362310d06a1d645 SHA512 71f6c868db325088d46bfbd62500b4f617c9f5db0da5ecf3f3222cc0df12b75a95279c81c99ababaa7ced7cc1858f9e91f14f00dcaec66425da1d77829fd10b5 WHIRLPOOL a162f0a6f052d1008eeb166c6bcf81ab3ba7ccce8783de6405603c851b672966fd0fbfca0e5f95a029e5b284f459b6c7c2e88b88f0e9180fd7cc5e3b62a66280
+EBUILD frobby-0.9.0-r2.ebuild 1302 SHA256 4d688deb4db73779a3f7004c6ce6dfdf64b03b587af0e1565ca30f72219aebeb SHA512 7d4f918f97b25108b3522bce98537b4c7e6ea66beed05e80c8593689c8aaf7f77c5677ac4f60142cdcc0e220f21adf2da4f569fe0ca2b636209cea8ffd19e4cb WHIRLPOOL 9b29303d73ac0733b2f980b0d976ce6a310bfb2bcef6a74df4463c9726617e25610206143f1c6d4866ab80a3bf310d60932b4fe39c6808c2f20f64a1676d1b4c
+MISC ChangeLog 2715 SHA256 f0fa83c5b3d3da5b4e403e5893e6c7aa80ba882c7b41363c136efbd79caf3db7 SHA512 759c61c3d5f6a6af0df4c047d860c5f96bcfb6614668b96df61752142045713bf0348dc58a5dfd39706e83e2fd5dcb3e2c89c57b7d2d142aa2d967df7f170845 WHIRLPOOL b4f38463bee92f4f4a25a5e9382be8a62832066bb6dc4823ee6f78bcc6e3c2693650c68629966bb8ba96f888274ead65364730762d0cad50187ab7ea6e2a55a9
+MISC ChangeLog-2015 2679 SHA256 256d7615e8cb35dfc3a14ab35aa2976776c03f2a8b43728d10cac25544b0d55f SHA512 736ae453f96c80411725b3c86460acf023e41af6f38727d701baadfcdba00790062aeb2ca64612090ae9940828854065bbebc90019392abd78d6eddf150664ab WHIRLPOOL 3b83740ce7c52d140be187ad02106b19c6cbde47a5e297388d62191e189804298014f500f34b2f3f24446143dac9edd854d77d93b2b62a93c4da5cef1b78efa9
+MISC metadata.xml 397 SHA256 571bb5f2085edf3c7bdbdac253da5dc7e0700cf471150463b99fc8b3d8033d0a SHA512 4be3c99cd1664fee30e46f1580d6c723e6aee3a16382a16d3fc71219e9cd934d89d86c0d3dfbb70535e1c60b1640072776a34963d0cea40484e510d0c3ae5d7e WHIRLPOOL b593e786451ccd26b131cc90346edacbf5010e194d8a0c9220825e7cf78913cd5255adbe3037da2f3e5ae2a006cca8b29315a8af15e1c4a042bab4326039afc8
diff --git a/sci-mathematics/frobby/files/frobby-cflags-no-strip-soname.patch b/sci-mathematics/frobby/files/frobby-cflags-no-strip-soname.patch
new file mode 100644
index 000000000000..2f5721d62a71
--- /dev/null
+++ b/sci-mathematics/frobby/files/frobby-cflags-no-strip-soname.patch
@@ -0,0 +1,47 @@
+diff -U 3 -dHrN frobby_v0.9.0.orig/Makefile frobby_v0.9.0/Makefile
+--- frobby_v0.9.0.orig/Makefile 2013-01-15 22:40:13.127937655 +0100
++++ frobby_v0.9.0/Makefile 2013-02-16 10:54:42.265322522 +0100
+@@ -70,7 +70,7 @@
+ BIN_INSTALL_DIR = "/usr/local/bin/"
+ endif
+
+-cflags = $(CFLAGS) $(CPPFLAGS) -Wall -ansi -pedantic -I $(GMP_INC_DIR) \
++cflags = $(CPPFLAGS) -Wall -ansi -pedantic -I $(GMP_INC_DIR) \
+ -Wno-uninitialized -Wno-unused-parameter
+ program = frobby
+ library = libfrobby.a
+@@ -87,7 +87,6 @@
+ MATCH=false
+ ifeq ($(MODE), release)
+ outdir = bin/release/
+- cflags += -O2
+ MATCH=true
+ endif
+ ifeq ($(MODE), debug)
+@@ -99,7 +98,7 @@
+ endif
+ ifeq ($(MODE), shared)
+ outdir = bin/shared/
+- cflags += -O2 -fPIC
++ cflags += -fPIC
+ library = libfrobby.so
+ MATCH=true
+ endif
+@@ -204,16 +203,13 @@
+ mv -f $@.exe $@; \
+ fi
+ endif
+-ifeq ($(MODE), release)
+- strip $@
+-endif
+
+ # Link object files into library
+ library: bin/$(library)
+ bin/$(library): $(objs) | bin/
+ rm -f bin/$(library)
+ ifeq ($(MODE), shared)
+- $(CXX) -shared -o bin/$(library) $(ldflags) \
++ $(CXX) -shared -Wl,-soname,libfrobby.so.0 -o bin/$(library) $(ldflags) \
+ $(patsubst $(outdir)main.o,,$(objs))
+ else
+ ar crs bin/$(library) $(patsubst $(outdir)main.o,,$(objs))
diff --git a/sci-mathematics/frobby/files/frobby-gcc-4.7.patch b/sci-mathematics/frobby/files/frobby-gcc-4.7.patch
new file mode 100644
index 000000000000..4a73161166d9
--- /dev/null
+++ b/sci-mathematics/frobby/files/frobby-gcc-4.7.patch
@@ -0,0 +1,32 @@
+ src/main.cpp | 3 +++
+ src/randomDataGenerators.cpp | 3 +++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index a16754e..315ea53 100755
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -25,6 +25,9 @@
+ #include <ctime>
+ #include <cstdlib>
+
++#include <sys/types.h>
++#include <unistd.h>
++
+ /** This function runs the Frobby console interface. the ::main
+ function calls this function after having set up DEBUG-specific
+ things, catching exceptions, setting the random seed and so on.
+diff --git a/src/randomDataGenerators.cpp b/src/randomDataGenerators.cpp
+index 432a90a..1de3559 100755
+--- a/src/randomDataGenerators.cpp
++++ b/src/randomDataGenerators.cpp
+@@ -26,6 +26,9 @@
+ #include <limits>
+ #include <ctime>
+
++#include <sys/types.h>
++#include <unistd.h>
++
+ void generateLinkedListIdeal(BigIdeal& ideal, size_t variableCount) {
+ VarNames names(variableCount);
+ ideal.clearAndSetNames(variableCount);
diff --git a/sci-mathematics/frobby/files/frobby-gmp-5.1.patch b/sci-mathematics/frobby/files/frobby-gmp-5.1.patch
new file mode 100644
index 000000000000..23cf295b8965
--- /dev/null
+++ b/sci-mathematics/frobby/files/frobby-gmp-5.1.patch
@@ -0,0 +1,12 @@
+diff -U 3 -dHrN frobby_v0.9.0.orig/src/StatisticsStrategy.cpp frobby_v0.9.0/src/StatisticsStrategy.cpp
+--- frobby_v0.9.0.orig/src/StatisticsStrategy.cpp 2013-01-15 22:40:13.186967442 +0100
++++ frobby_v0.9.0/src/StatisticsStrategy.cpp 2013-01-15 22:40:33.267100780 +0100
+@@ -140,7 +140,7 @@
+ if (_nodeCount == 0)
+ return 0.0;
+ else {
+- mpz_class q = mpq_class(_subGenSum) / _nodeCount;
++ mpq_class q = mpq_class(_subGenSum) / _nodeCount;
+ return q.get_d();
+ }
+ }
diff --git a/sci-mathematics/frobby/frobby-0.9.0-r1.ebuild b/sci-mathematics/frobby/frobby-0.9.0-r1.ebuild
new file mode 100644
index 000000000000..42427b592bb2
--- /dev/null
+++ b/sci-mathematics/frobby/frobby-0.9.0-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Software system and project for computations with monomial ideals"
+HOMEPAGE="http://www.broune.com/frobby/"
+SRC_URI="http://www.broune.com/frobby/frobby_v${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="doc static-libs"
+
+RDEPEND="dev-libs/gmp[cxx]"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+S="${WORKDIR}/frobby_v${PV}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${PN}-cflags-no-strip-soname.patch" \
+ "${FILESDIR}/${PN}-gcc-4.7.patch" \
+ "${FILESDIR}/${PN}-gmp-5.1.patch"
+ # CXXFLAGS are called CPPFLAGS
+ sed "s/CPPFLAGS/CXXFLAGS/" -i Makefile || die
+}
+
+src_compile() {
+ # Makefile uses the value of CXX which may be defined in /etc/env,
+ # breaking cross-compile.
+ CXX=$(tc-getCXX) emake
+ MODE=shared CXX=$(tc-getCXX) emake library
+ use static-libs && CXX=$(tc-getCXX) emake library
+ use doc && emake docPdf
+}
+
+src_install() {
+ dobin bin/frobby
+ dolib.so bin/libfrobby.so
+ dosym libfrobby.so "${PREFIX}/usr/$(get_libdir)/libfrobby.so.0"
+ use static-libs && dolib.a bin/libfrobby.a
+
+ insinto /usr/include
+ doins src/frobby.h
+
+ insinto /usr/include/"${PN}"
+ doins src/stdinc.h
+
+ use doc && dodoc bin/manual.pdf
+}
diff --git a/sci-mathematics/frobby/frobby-0.9.0-r2.ebuild b/sci-mathematics/frobby/frobby-0.9.0-r2.ebuild
new file mode 100644
index 000000000000..3632bf9afd6d
--- /dev/null
+++ b/sci-mathematics/frobby/frobby-0.9.0-r2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Software system and project for computations with monomial ideals"
+HOMEPAGE="http://www.broune.com/frobby/"
+SRC_URI="http://www.broune.com/frobby/frobby_v${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="doc static-libs"
+
+RDEPEND="dev-libs/gmp:0=[cxx]"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+S="${WORKDIR}/frobby_v${PV}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-cflags-no-strip-soname.patch"
+ "${FILESDIR}/${PN}-gcc-4.7.patch"
+ "${FILESDIR}/${PN}-gmp-5.1.patch"
+)
+
+src_prepare() {
+ default
+
+ # CXXFLAGS are called CPPFLAGS
+ sed "s/CPPFLAGS/CXXFLAGS/" -i Makefile || die
+}
+
+src_configure() {
+ default
+ # Makefile uses the value of CXX which may be defined in /etc/env,
+ # breaking cross-compile.
+ tc-export CXX
+}
+
+src_compile() {
+ emake
+ MODE=shared emake library
+ use static-libs && emake library
+ use doc && emake docPdf
+}
+
+src_install() {
+ dobin bin/frobby
+ dolib.so bin/libfrobby.so
+ dosym libfrobby.so "${PREFIX}/usr/$(get_libdir)/libfrobby.so.0"
+ use static-libs && dolib.a bin/libfrobby.a
+
+ insinto /usr/include
+ doins src/frobby.h
+
+ insinto /usr/include/"${PN}"
+ doins src/stdinc.h
+
+ use doc && dodoc bin/manual.pdf
+}
diff --git a/sci-mathematics/frobby/metadata.xml b/sci-mathematics/frobby/metadata.xml
new file mode 100644
index 000000000000..eb1b71267423
--- /dev/null
+++ b/sci-mathematics/frobby/metadata.xml
@@ -0,0 +1,11 @@
+<?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">
+Frobby is a software system and library for computations with monomial ideals.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/genius/Manifest b/sci-mathematics/genius/Manifest
new file mode 100644
index 000000000000..f189e3b236c6
--- /dev/null
+++ b/sci-mathematics/genius/Manifest
@@ -0,0 +1,6 @@
+DIST genius-1.0.21.tar.xz 2539784 SHA256 f8c06a4d0aefc1bc934e993aaf8f913451d06c2bae378da1071c3bacf39ed934 SHA512 d4f5e80e1cc6216d7f460f7de86d232566eeb30fec90b93b2e6ccb8d2d0c14aaadf9b969c9a4f940a036e246f085edd02298c769504b620d2eb97ef2a3a852da WHIRLPOOL 52337e85a758d7c1f7b6551c0aec29236bef2f1fbd4f48e29142f8e69c513a7b8ddd79084421cdce79d90fe7a00da4c4d0a9b800ad75f9716cb3108da73b10fd
+DIST genius-reference.pdf 1024944 SHA256 79011ae33ff781507185898ba76b156699061eda78ed16e15aa02195c896ee4b SHA512 04af3870104d2320b1d4b345d74d713a0dfcdf8a228002506508f437659b3ef6037ead0b1f6b37cc335692150750b58c4007fdaaddd9540233474ccd10dac285 WHIRLPOOL 301302145d43843ddd749ab33612438d360462c9d3daa12d7050d9ca6da82bdea3ef53b917989d0c518327780b147a9f74e407f555a62dcdbe0f0c2ef864fa88
+EBUILD genius-1.0.21.ebuild 1104 SHA256 0dd6c0251fea868b69d20e813534790544de1bd34b051218fa1d267af17d358a SHA512 de3c3f51b6117b19c602a8c50a6091c395cbdfb2e38fb65c88cbc5f82138fc4572f2389079b7f59e0d1e580097ce058bc525253bc1721017dc58a934f0a7dcd3 WHIRLPOOL b94ed79d827d3d3e3de4ca93d41d0e09ab5230270adb978c4bc0b5577549163797ca8c7bd84d586ee50619a0ba69a696d8081c55466e259a70974dc61b4c6df3
+MISC ChangeLog 3213 SHA256 0bebb9cc9c6b308ddc920f2bd42f923ba2ca5aa746bdded790921d31f407c2d3 SHA512 45f2d726ebd61f5a58fc810b3922f7e818c61ca153842ae2d742744fcf94f568b8fe622264abcf6392b7c69d4effe5f5634eb54a9dfad7d45f91abe0d14aebe0 WHIRLPOOL d468d2af2684fdcddb2955349df5ad152f1f8c3ada72ffdf655c1e4e34d7c4c3e29307260f78e34e9c3c30c5df866734e4861554bf6d624429684b066dc1e464
+MISC ChangeLog-2015 1907 SHA256 42442e550f3387ef3ae1349f984e94f24e34d3c4da7270ac2ea66f7422b35ff6 SHA512 41cc63bb3be5d5a02fe27c120b17aa0d66656fa4101985037fc90d976690ffcd4264dda218df02d576135e932a5560a1253bb4a996c3d62cd3c6311f945c3018 WHIRLPOOL 0f8c29afdadfc11bd3472bc385353138bbdf34f806a8f6592cd9c31adbd2f4ce3851711eab47b2ec2582a4686253af7569af58b23f4a4b101908d7a2cd03ba38
+MISC metadata.xml 934 SHA256 9ea33121ff11b87b046a6ff44dc1e30d54bc927bf9a6afe05408dd2b3609e927 SHA512 c0262f8a5e3615cf75e0996dcb5339144a897003020172c9dc49d57459c4b8bba72ecf921836e081f4e4b42c62ffd06654e5e2270c7d58487feba9be8b20b215 WHIRLPOOL 9d0fb7ceafa1ff92100c3ccf9387a71e33d83af9d2b557d498e426e4289bc4f181afeaa1ecde5b39817ea5de1136ef2a72aa8133cf384a0d0c45115dcc9f0d62
diff --git a/sci-mathematics/genius/genius-1.0.21.ebuild b/sci-mathematics/genius/genius-1.0.21.ebuild
new file mode 100644
index 000000000000..06833d14df83
--- /dev/null
+++ b/sci-mathematics/genius/genius-1.0.21.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2
+
+DESCRIPTION="Genius Mathematics Tool and the GEL Language"
+HOMEPAGE="http://www.jirka.org/genius.html"
+SRC_URI="${SRC_URI}
+ doc? ( http://www.jirka.org/${PN}-reference.pdf )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc gnome nls"
+
+RDEPEND="
+ dev-libs/glib:2
+ dev-libs/gmp:0=
+ dev-libs/mpfr:0=
+ dev-libs/popt
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ gnome? (
+ x11-libs/gtk+:2
+ gnome-base/libgnome
+ gnome-base/libgnomeui
+ gnome-base/libglade:2.0
+ x11-libs/gtksourceview:2.0
+ x11-libs/vte:0 )
+"
+DEPEND="${RDEPEND}
+ app-text/rarian
+ dev-util/gtk-update-icon-cache
+ dev-util/intltool
+ || ( sys-devel/bison dev-util/yacc )
+ sys-devel/flex
+ app-text/gnome-doc-utils
+ nls? ( sys-devel/gettext )
+"
+
+src_configure() {
+ gnome2_src_configure \
+ $(use_enable gnome) \
+ $(use_enable nls) \
+ --disable-extra-gcc-optimization \
+ --disable-static
+}
+
+src_install() {
+ use doc && DOCS+=" ${DISTDIR}/${PN}-reference.pdf"
+ gnome2_src_install
+}
diff --git a/sci-mathematics/genius/metadata.xml b/sci-mathematics/genius/metadata.xml
new file mode 100644
index 000000000000..2d756ba64d95
--- /dev/null
+++ b/sci-mathematics/genius/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>grozin@gentoo.org</email>
+ <name>Andrey Grozin</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription>Genius is a calculator program which can work
+ with arbitrary precision integers, multiple precision floats,
+ rational numbers, complex numbers, linear algebra, number theory,
+ numerical calculus, statistics, numerical equation solving,
+ combinatorics, elementary functions, modular arithmetic.
+ It has a programming language with automatic typing.
+ It can do various 2D and 3D plots, with possibility
+ to export to eps or png. Genius has a GUI IDE.
+ It can output matrices in LaTeX, Troff (eqn) or MathML.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/geogebra/Manifest b/sci-mathematics/geogebra/Manifest
new file mode 100644
index 000000000000..1c56a1fc93fe
--- /dev/null
+++ b/sci-mathematics/geogebra/Manifest
@@ -0,0 +1,227 @@
+DIST OpenGeoProver-20120725.jar 582538 SHA256 3a75cb7ebf9abc6eff84cb85ae84d1d0fa9300da7d83ec6ae6983ddfd822faee SHA512 4bbf294cba76f84d8ac1426be218292a66e957df778013327a34cc51770ac02580b13a3ebc94aea6e53e4d46ae371fa18eac40439341639c72ba044524578e4b WHIRLPOOL 6f739616e8fcba790c0d028fd0766eeee5f09c92486ef8596c4ced5b6ed8a07eb206a2e617f660c3ad555c0f5401ec259d3305c0b64939ae823a3c872099b699
+DIST OpenGeoProver-20120725.pom 472 SHA256 5425d4970b43d08160d7411026d91ccb82aa60e0aa4088d6443eaef954696fbf SHA512 9f1af522555bc1dac048f2ec9701dc7cdefbfcf0b2850838db3e9626eba05c44c68cf394af9a2cc966265f2236bea3e696a688f1634a38fffdbd4d21cc39f195 WHIRLPOOL 5eb2e504e6daa83941bce8b7d80e71537f054b3e216293eaba70304692e74e83b9460a80a44e97003a71407883ec6bf211691dca37031a454ce7d1aed96d4013
+DIST annotations-1.0.2.jar 6537 SHA256 511a1b9a95466f71fc3afda802b52560a4a5e01f57de030d27604a320430191f SHA512 fd5eebf9e1239b1ff82f77214fe851edc61538a1ec05573f75ef9eeff1ff442dc6924c72743e7eee7a4484aed91591b75723ed33b62a11694c6cd8e288f4ce11 WHIRLPOOL 61844c82a88c99c01020f2302cc5c054c9997b7ca79314b52fdc710c5ef1f0d92e1bf3e01b31a7a941d91b26f71d4299d1be0beecebad84782f74af6797ca7ff
+DIST annotations-1.0.2.pom 472 SHA256 30b15ac8479516c34fb328951e0bb5a7475d6f072facecfe3a9ab52c37998740 SHA512 02f30983451efda061fb0e18e5cdbc845bb9f77d5f18991a89e007b76ef53165411b5f35c0fef6489c413bc76d01ee8e6ba6971881f7f8fdb6505261cdddb329 WHIRLPOOL 650f3d0d19b897a7c5409ee4cabde256b7680bc4670d77058846a301cbf9dc8ee9da988b4d7588cdd4200c4d60bd75e188591f07bf85d81423565f5454282829
+DIST annotations-3.0.1.jar 38806 SHA256 6b47ff0a6de0ce17cbedc3abb0828ca5bce3009d53ea47b3723ff023c4742f79 SHA512 10979196b963d5ca566521a0b51bcabd06996d13eb27b11b368559237f4dad3f214c912e7c6006362167f573e290fe29d5d900bf97dc535d3d9f06f04e8f558e WHIRLPOOL 6379d5f4d1ff08d11153a4e61a14f60bfe9d3253a351607dbd8d63431befd221c7eacde3dbe63918523254bec7c9d9e34b7ed6487d83ed83bb3f8a9db0e0aeef
+DIST annotations-3.0.1.pom 7774 SHA256 649ecedb944702cd5ed3538d0bd651bbe3866cfc1008f6fb265de986d6760292 SHA512 ca0b66bf48b54aa875ca590695779f8de2cdec494b856ee34baa2f9476070b681f08a5833c2080179fa3cf1009fdade3a5296ea43e0cc5eaca5a5312d3bd7829 WHIRLPOOL 276d4c7dd379cddbc809b2b9aaa4088b011bd200a5da7f42186c0b43ee17314feadc64ee4f13dfb23a203c408c4f24968c316ccdfb410dc50f564f6132fb4225
+DIST ant-1.6.5.jar 1034049 SHA256 f06a601c718a7c9262d74b7ec3baad14c82584e89235089b4f821d6a44d9e1e4 SHA512 e18edf49426ccd0da07136d4aac101905afaa531b5e4943d13f9dc227142471fe06ca56bd8c0c44a3b530b4862eb725e6690537fe378aded361d11f1f926ce5e WHIRLPOOL 791cee0b83abf09a1afb9c31209bd3033125da21e829cffa0ef74fd7266384b4f92989ba9b105c919b3eeb6163985e5d9591f9ade455efd72adc5922aef05553
+DIST ant-1.6.5.pom 861 SHA256 6fcdd13d81b32f0edbc890811d2f73d4753b65e6e429edd0072c4160fe077740 SHA512 a1c0885409e4f409f365d4c13372471bb2a4fd0fd26acd598fc8d75c0db11782c7d75332b9c2ce04357535f78c6e1ee9def21b3bddf2dd047ef7c8888fda3f0c WHIRLPOOL 68d0c5b9e769fdf58f38841fdb3d366d0f543fd540e5b3d3f522e7e0742a3344bbd456a8637b70a612ba5bc1b41475dd62b93860c894c60b6b1775f77edd8b1d
+DIST apache-13.pom 13974 SHA256 ff513db0361fd41237bef4784968bc15aae478d4ec0a9496f811072ccaf3841d SHA512 3b25f9f51a7ee9647fe2e1287e75a67ccdf3f08055bec20c6a60b290876afc691f16b23ab3df7b733695b828411b716a0b3509c22ec6fb0c5dce4f21811ae434 WHIRLPOOL 5682a4b19babb92205fadf8f7c228cfd575ea4df01f0f8ef616c4e2b57ec63a70bb506d382dbbafc1e2a0c55f24495cea7cf029900784d53e449d9fb44636532
+DIST apache-15.pom 15236 SHA256 36c2f2f979ac67b450c0cb480e4e9baf6b40f3a681f22ba9692287d1139ad494 SHA512 fb2e3c20f895461a76f8a40d69bb61d8ad17efaa7959877772c290bf982950204f3069f8e60191f1ce8251281a77594bdf010fb3e178dd8e7ab9930ce1d13f23 WHIRLPOOL b9ea3ab4a0aa548a34f747697355dc84aad69c878a76b1e3286a4230dc62a1c4949bd06b9b5a9a24306cbadafcfb18f1122cb4bdbe3231acfdec7b572990f7e9
+DIST apache-16.pom 15397 SHA256 9f85ff2fd7d6cb3097aa47fb419ee7f0ebe869109f98aba9f4eca3f49e74a40e SHA512 82393cf3a0282c45df8cb945cedff90e314cc30e96c0f1d112c9b1a222084250d465377973fd8aacca8bfed5d4b9032544a5369929164811a289e0899ff6f08d WHIRLPOOL 81ff9916c650d5d0b51d3531e3a40e69b49632e2dcb55f5d88578fce3bee5e0ebace3803246fd44754bc33224b83b3eff2d7dca6852f15471e23ef328a60cce7
+DIST apache-3.pom 3430 SHA256 393c50afb4b7aa6eb57e5377a55a1a0610b19f75b52ece01308db04a1187a20e SHA512 2e07dc80988c9cc3ddef4d31dba266aa71f01f25e1e8bf541d3c538c8d7c9c19c7d3c8bcd2a7e19693da311d32911dd677fb4a44e48ceaae25d5ff91cc77bcf7 WHIRLPOOL 7acf6a2f5d1e57ed80bbee5a02833cb6c09f47ac2b17b761e8ed7558a15bf5d6db5a2629a61e0ffd81d29bcdf69b6b24a263cbe7d283e079006a87d1ff5c7da6
+DIST apache-4.pom 4495 SHA256 9e9323a26ba8eb2394efef0c96d31b70df570808630dc147cab1e73541cc5194 SHA512 866f80b02dcfa294fbc77dee0c14e019f5b9fd0d7cdf893c2269e93b17b9b6ac49af76ad30952e87b55c8ea5896d812842ff2f05c69a1553b6eebe0a11a5b4fc WHIRLPOOL b88a3f72ac6ac785dd47c7ad1d437d4a32cbd231a4e0945b02c546b841fa37ed459de497d6bbe2acfd06424dadc067dbcee2e5f5d26dc0381236eff4d13b5857
+DIST apache-9.pom 15160 SHA256 4946e60a547c8eda69f3bc23c5b6f0dadcf8469ea49b1d1da7de34aecfcf18dd SHA512 e909813e0e718bcd76b53eefe9da1325dd1254cffb7f11ae5016b53df500da562b1c100a49c171cae87dac3a75b03610f4ffc39c14656c34e61fe93fb4a4a938 WHIRLPOOL f0e3485131e6eb403f16285ab757d93cd43e15359b697f31220b4baa5549353fbacd92bc5c92c4902dd2c83eab5db70d9873dedf982066f027149860e6a638a2
+DIST apache-el-8.0.9.M3.jar 237638 SHA256 e55df966c864f749becd6f9fbd896e062935650a99880438ffef7b2614d59fc5 SHA512 26b634ea681e195a75de39ebaa1b1e6512fe6ad490547b595cf4bbfdeb635e869480143f7071e2bc85656bfb52996ba47eb24869d5a1fe708634a6b9d6b5d463 WHIRLPOOL 842d889ad4a6cdcb4eeaf1e3aeb437698896100e7e68d82a6fdbf2405103e08000f2d9b3f595a4e9c0d91a2164813f496091a6666b832d04784ee0f576db5496
+DIST apache-el-8.0.9.M3.pom 6313 SHA256 0c6cddfa631dfe1a6cdea60034c199b91720bf5bf31fc73e72cd33abe2f6bb56 SHA512 27cc48772300b2f442b922c0803772ab46a2bd8470d40dd2c9247997d1109920fd927b4ac0b342265101c6a1f8adbb3f795f3ffcb0ca77a8df93577bf9f9acd2 WHIRLPOOL 8ae51e5e470f673b789f2c81963265332e471ea96ce45dfd7371e54eb56125bd782d56a7b295db125b884b762eacde7f7dbd0175750996d3ababfdf66843f3bc
+DIST apache-jsp-8.0.9.M3.jar 955429 SHA256 0c154c190b7e75530e7b0b015a370343e9e5ae80550d7d1e8c12f33725df66ec SHA512 ec9ae6269da70b0497a80052879d7b4b76557238e3a3b30d4ab32a858eaa0c68e82dc0fc468d237ff7b14665c407ba6e9ebf52e7a091607162e1f50f3a23d7ee WHIRLPOOL 922593e3ac3801231eb75585fec23fd8f05bb661bfebb6fafa4ba0f44bfea453e150fc7796620f5cfafb5cf1e8233410ee762ac4e76a0af2479590fc6f0b2bf6
+DIST apache-jsp-8.0.9.M3.pom 11384 SHA256 726e9351acc039f10fdb4c9667af0475b134487164722ed44c879aa2274aee62 SHA512 7cc94b7980e5a55b411ac9db49a06db600a13981c0c8ed1d3bc1a58bb893e7646f5e2424954f91d1466495cbf54b600e051c621a6abef41f9230751cf9c22c57 WHIRLPOOL 0ef90c20060d9e3924597de18ab5451960b3727b0239ee0e4c54de5bb9a5aff00f64ad861640d49e63ac9aca9f8212be0d172c3a7e625fabdb688353b5025a29
+DIST apache-jsp-9.2.14.v20151106.jar 10701 SHA256 a9634bc410be3b8d1f3849429d08a1c3ecaad79a023cbe90ae62f8b493d5f4e2 SHA512 20766c34336c1eb3082d1aec0e0245b9d55340bfda678cbdbc503ad02ff149e0547b35e3827b12402acb5bb07afe3a35c7a79490788809ee615742cee4d18d43 WHIRLPOOL 0e74fd24f270ccd80c4c4fe47a5d9581caab5f826c2b4ccd9e7cbe192319fc62741ab74faec205e0739df21afd27c1b10116c2067c4538e005bb60ddf1ff3933
+DIST apache-jsp-9.2.14.v20151106.pom 4196 SHA256 41c59aea3aa7fbfe7394fc61c751bad6190eace80e4c6ba7a6bfcc5f0ea1d651 SHA512 c9e6297638becd51bb2f0239c028ebeddae44f2351570d0accc4762bd8a4a4e66e5e5115a517c9d2803845fa396827541f12a7bb2d35bf506d8a29fb3d75213e WHIRLPOOL 72957dfe2936c709e37038bf7f920f19e3000c21e9362b1b8fc75d85a3b4b6fded36bacb0686f86660a5377e2b6a728f69c3ea9fa56b63360c5145db57677ab1
+DIST asm-5.0.3.jar 53231 SHA256 71c4f78e437b8fdcd9cc0dfd2abea8c089eb677005a6a5cff320206cc52b46cc SHA512 d35bda1ecf09753572fd0582d2e79f07bbd563ca936d1238690d4bedaf57c68512580c49aba75d03fda41db27b84fc5cb276b8cfd990167ccc9dbecbc69f388d WHIRLPOOL 3b3c5c725bfa9a9cd9e3b72466487a2009cf9892aef7ad909392cd9e4c6ed12be7d2a4fde05e9ecf60f71c558095cf5260783c0dc56ac0b518b80cddc5904d4b
+DIST asm-5.0.3.pom 1935 SHA256 7d34653ffe62be7714d2f1969660a17df9ec1b19d8250c4f03db1123c82ba6a0 SHA512 cd703269dfbc23cef40a33d01fb69c71490a1f65dd95a4f7ea4e019adb6cfcc88b7a15693766773737cb09080b1c947dd1ac54c63d6189485c28c8ab03ce171e WHIRLPOOL b8e8f0bb173ffc96a012587d8795e633fc53121f1acba5f033cab62c63b9ef3966f467f1aaed4c4d700636301bb61d5658b5aa02c8ed1e8741be9ea73613a712
+DIST asm-commons-5.0.3.jar 41717 SHA256 18c1e092230233c9d29e46f21943d769bdb48130cc279e4b0e663f423948c2da SHA512 702037de4cc53d3c4689d25223774384ce93372f4569d05e7e32e77a0d8a7efacaf3f574ee6e3ba5547f06431cb1595426da62f307d6fcf9321aaa9c4d7f6f77 WHIRLPOOL 3ff71c4d25ece610b1d6b6f88d2af3835ce80cb68cb4f4c09b1ce213f98822177a5c7f306bfb7ea6aa7f9454b30739c1a275e968fc67c27e713bfca6c6c3fd6c
+DIST asm-commons-5.0.3.pom 2094 SHA256 e87ea4823ecf2dd856901da359270be904236be59c27e2781eb8d78c97e45b2a SHA512 4c58dcb40b468a6ec8ae5f6d62be2dbe3ba9881ec137e7d8b9bab18992aab824f0d0bb708bfb42922745437f4321ea9ec1a62a00dd77607f1af88aca75d994f7 WHIRLPOOL 2e8274f713f6d637e693f11b400641bed017b125dab52d679d4a7fe406fbfd4213415eb87e22793f0e01a01d611238e55781d0cd7e45e74d44706d5be4f96c22
+DIST asm-parent-5.0.3.pom 5495 SHA256 c2edabf4128a534df4b8b4b0b9b562e94f242ba95ac24dc61485432b8a188e32 SHA512 7015ab7b898704cd0cbeed81bd95a4965b3cb016a486ae79d47f65352f118d1b060e8ae32878b6e68f8d9f87798b2fb75b03d40203d044bd9c7ddc6246ec467e WHIRLPOOL 005acd925d6c73111c5ed1279086d61f13937160bf60005ff8cc19238ea60e7a7c2519388cdd6996fe8379aa33186a324a5675e5dae2b05aae860c814608af14
+DIST asm-tree-5.0.3.jar 29036 SHA256 347a7a9400f9964e87c91d3980e48eebdc8d024bc3b36f7f22189c662853a51c SHA512 41fa352a4b1fcb482cc71a5cf8eb25770e16aeaa926ffc5c9ef5e09ffa29a19cf9f274d7d413839b889620607b16c649fb3df82a41347269fe77c8f0f0e861db WHIRLPOOL 6bd9262126c1d14a87493b0767444bd7fe50248d6d1f4140e52e172e8050b7f9f69fa892ce920b5253b8f57a508734b48cbcdc9f288eab436fd1028b7bf6e6c9
+DIST asm-tree-5.0.3.pom 2083 SHA256 65819ca7c5a218ff49f8ebe72f3b39219c81f137d017acc1aec15b1054cf5236 SHA512 530976577eec3ddc4390c35a97871159de163297e02485ad09cfd3f985d46579e5af82a4f84f96ba66974c9e443e19de563f05ba937ec5bae6e34f251df3180e WHIRLPOOL c220b5aa75586894492307200d6f4b168c44bfc489d9b723a5a28b675ad186a31684eca830df901e98fc5f021c7e01bbee1833114a3a87604329b762ebd857c7
+DIST asm-util-5.0.3.jar 43296 SHA256 2768edbfa2681b5077f08151de586a6d66b916703cda3ab297e58b41ae8f2362 SHA512 4e4520640fbda565f6907b9e368801d4b7ed63e8613493ebc9f4e267808736aab607de7a0c5f410d7e4cf6f7b4fe467446ccddcc9b3ebb2ee6c95791dff1f8d0 WHIRLPOOL 0034193266bc83178dcbcda6689476586948ec6b94395ce03a8db76d1f48b29af1d8946b8fcb6cc0ebe119f58d653926aeb20f2527c6b04cce20d8923b5f5353
+DIST asm-util-5.0.3.pom 2088 SHA256 5ae20e8fdf549b9cede090834725f6454a2cac6f51901307eb4526177e4e3755 SHA512 2ae65e62cf6cc8d108256658ce3a8b382578e18e680c7c3890d44defa5bb61ecf4cd3d9420f5f2af79c630878963b5f7578eb895becc2c735cbe75e72a044218 WHIRLPOOL bd9bfdcfffbfbd04481eca111b1c6455e6194cc2c96aad9f5d74f808eac512ea999ec6d01417b8abdda9589dd814c11c14b2bf8ab1bc44c8e45c2d9ba2b80232
+DIST colt-1.2.0.jar 581945 SHA256 e1fcbfbdd0d0caedadfb59febace5a62812db3b9425f3a03ef4c4cbba3ed0ee3 SHA512 da651ddbc27c9b5fb6d8cfda289b692fba277aadbdebb86517951bb68fa82ae3d974d8bd9a69822dcc35f2fc10dbc433e7e5852d50b0dae6c46326c514b273d8 WHIRLPOOL c0a036a7c247ca1fd253cfa51f55a48aaad1c8c5f7e5a79a73a9c080ec7f07773dea653289ff27093592b30b2ac73efd4fb4fd3854ad427941ed046b27a7db1f
+DIST colt-1.2.0.pom 322 SHA256 ac303a5e0f1ace95a1cc4c15e66b175446da4c22a5e3288e2d19557e60ef44f0 SHA512 6448f598bcbbdcef92ee461647130caf0074084a9abd88fce11a483919a719e574492caaee3abe45cd90fadbee4129bb8839fedf1e0960525d1b9b70330d2d42 WHIRLPOOL 16df666da010456ece03a521ffefb41288e3289ebffd5685d455e29b8fa186e07ef27c665fbf10e5031fcaa064c84fe6b209dd959a1cc9ec3676b87ff0d07fd5
+DIST commons-codec-1.10.jar 284184 SHA256 4241dfa94e711d435f29a4604a3e2de5c4aa3c165e23bd066be6fc1fc4309569 SHA512 8edecc0faf38e8620460909d8191837f34e2bb2ce853677c486c5e79bb79e88d043c3aed69c11f1365c4884827052ee4e1c18ca56e38d1a5bc0ce15c57daeee3 WHIRLPOOL 12f354eacc7546694048c78296653a3c2196f38a903c30163658bbe56033161453dc6d95252aecc233c175bfc8d0ec0550e0954dbe001a4446286a01059caa89
+DIST commons-codec-1.10.pom 11609 SHA256 bdb8db7012d112a6e3ea8fdb7c510b300d99eff0819d27dddba9c43397ea4cfb SHA512 c962333b35a7f3a5a87a498af6156c4a71e7db9b7e2c1e73f09c919ff91b7a8df6ceb50bdf808ddd94729ee83bef69bf3ff5a25dd545f95cccb88a15ecda1622 WHIRLPOOL 1c12181a54d272674a50e6ecee915ff27b1ff309648e3c2ad4be53d687c16374e2573539f465dd155f78c73deae71a0a2855c8363be56fcaa2a15fecb23b9508
+DIST commons-collections-3.2.2.jar 588337 SHA256 eeeae917917144a68a741d4c0dff66aa5c5c5fd85593ff217bced3fc8ca783b8 SHA512 51c72f9aca7726f3c387095e66be85a6df97c74b00a25434b89188c1b8eab6e2b55accf7b9bd412430d22bd09324dec076e300b3d1fa39fccad471f0f2a3da16 WHIRLPOOL ab3f3347268db98c907ba5091a9b15446a7a6d422b8fd877985bcd8b267cda1e2cd175d68e58f270aa509dc00c968ac8acb31bd46c582b7898f9d7dfe688851a
+DIST commons-collections-3.2.2.pom 12403 SHA256 d5d81fcc288c0d8c711c302007cada4aa9a226ed1a112d4baa64cb1d6322170b SHA512 e7a3f8a4b295bc040d15fc5ad5d14a2eb0a4139a2bc734853f6fc5db55170fa9e822532f9ef8e63ae00d7c7ae768e1ea55ce44a66392b25feca4859ac4a35a49 WHIRLPOOL 7ac185ff0c6bba0d4fbecc4bd3617ed5d76c70cc5f0c5a974e9fe2a49e3dccc24d2b8c9d797ccf8269f968b69651a643553de0d0f0096e259f50a7c1f6bd59d4
+DIST commons-collections4-4.1.jar 751238 SHA256 b1fe8b5968b57d8465425357ed2d9dc695504518bed2df5b565c4b8e68c1c8a5 SHA512 1553751f9126b24f8c893b169df881052483ccf1586efeed4215b6ef013e115e001b96a09d348055df6d1be338a0fa1b14b28fedca3f1663273931a7d17e1363 WHIRLPOOL 2547b0d1d62d349754a1c151e3e091bad7ecece5fbc91b4616105295b479d8c559de52a5e9a6fecb0555866edfb31fdb9c1e66d988850b5f1da26ca80ae7f150
+DIST commons-collections4-4.1.pom 21308 SHA256 c0ad42e9103537960d9a74da58ecc24dd1a37a13d1e4c48f0969be93e4018369 SHA512 6b5377e05a4f33c961767f0045723890af1dfe06ba637ded355040f01dbfb202fa55d8fd3740c44fcb9a545548eb66f7e23659e39ac7e642cae0c94438398c10 WHIRLPOOL 29b0441e8794732c1093c56216dcbd6137209f50efe87da6095e602c6222df2a04ccc9b96d45aefc51b107f7ef9868a23d8e1aa11d76bab507bb5f48f2622e0d
+DIST commons-io-2.4.jar 185140 SHA256 cc6a41dc3eaacc9e440a6bd0d2890b20d36b4ee408fe2d67122f328bb6e01581 SHA512 957a438894a196e534af9ae1e61fb21e16f273952b55a81abb8faf0b139fc031ea940cf477f81704db417d1ce6ff2d9ddd4a2cbf316903b0e2dc1aeaef24f292 WHIRLPOOL 9727cac7f72ce2c4bee5a268e617ad0ab385f3002f55916e8101c3f09f6b89e436f9a4e894a577755731a243440f44f976d2ee8899f1cbabc38c241d5d7ef057
+DIST commons-io-2.4.pom 10166 SHA256 b2b5dd46cf998fa626eb6f8a1c114f6167c8d392694164e62533e5898e9b31f2 SHA512 ffa0cf20ea6a6a3e60387c08006864e8b13d6ad02c8b33920d7d420cf2b8db483ad32b0d8c26ca31ebce5a83b05e41b8feb2f9c8753d12d422a503823e1c39bf WHIRLPOOL b1c13db9a808a7083dfcd8743ca3482bfcc0d218a84a74c54d0e5f95a798c358aeaaf7a07c7c55e33f29ee72492bcd306e9d1ce7bbc3364dd97ed99a05925c6d
+DIST commons-lang3-3.4.jar 434678 SHA256 734c8356420cc8e30c795d64fd1fcd5d44ea9d90342a2cc3262c5158fbc6d98b SHA512 b1b556692341a240f8b81f8f71b8b5c0225ccf857ce1b185e7fe6d7a9bb2a4d77823496cd6e2697a20386e7f3ba02d476a0e4ff38071367beb3090104544922d WHIRLPOOL e3ec9f36c4e82917888c5f5b9cbdeee976c249c456b7d51764d323857323258acb2693d77c9d0eb0c5957b54295026096803aebd52c80b6e3b21f270f14e148c
+DIST commons-lang3-3.4.pom 22183 SHA256 686e75b561a13c1031d43a7647a364e2ed3e456467050eac4527b94b06d73fd1 SHA512 a62b2134fe4f9758e04ed7b9eb3d72a806f7efe3d36954e05681c4471f78b580fd684671911f88556791302f1187e2ba577e0184e8b3e4020fb93181aff63ab8 WHIRLPOOL 71b92f8b120148b3f0523e4d2f60d59035dfb6dda71b49228f970516f1f3711e7d105deeb8e2abcdf69f57e911124c8a0b18a50388b8301d337b94e0f4dd6c4e
+DIST commons-logging-1.2.jar 61829 SHA256 daddea1ea0be0f56978ab3006b8ac92834afeefbd9b7e4e6316fca57df0fa636 SHA512 ed00dbfabd9ae00efa26dd400983601d076fe36408b7d6520084b447e5d1fa527ce65bd6afdcb58506c3a808323d28e88f26cb99c6f5db9ff64f6525ecdfa557 WHIRLPOOL fe917d13a73c9dcbddefd8cc5800ad4595b2d6071c3c7314c2b0d393413514f28b664dbf70e07ec32b55e71c9ab1f7234fd714fe268d155f8ff6f72f056ae0b1
+DIST commons-logging-1.2.pom 19206 SHA256 c91ab5aa570d86f6fd07cc158ec6bc2c50080402972ee9179fe24100739fbb20 SHA512 75bef548eea62ab04569791f2fdeed3d0a61edae0534aa035a905dc1d011988fc0f06f52bde377f44e94e6afd4380197148120b152b7a4d20628fb6236cc7261 WHIRLPOOL 51b59de208cf67f47f652f86d8851e953aed2a60e6dba3a77421e2a497e233fbc0b81ca834ab2bed4df72886da25ce2a6bb3445f1c8f8ba5c043d869a6e6846d
+DIST commons-parent-25.pom 48304 SHA256 467ae650442e876867379094e7518dfdd67d22c5352ebd39808c84259e9790ba SHA512 216c232cfcd07d2b662f617b7a467b69c9ed1d58cd84f4f3affc4b1daaab5cee343465169f2439c575e69275f5b3b288f1dc324efbed0fb22bcc88ed21a2ecfe WHIRLPOOL 244489d0ce605a3c33ae54de2139c84d78f4748427cc707235c3d9e4806e7c5391515f3ed03da9ae47c1a1f495eb85b5c0752b92aa7ce8fa0d8eb81c3488e95c
+DIST commons-parent-34.pom 55943 SHA256 3a2e69d06d641d1f3b293126dc9e2e4ea6563bf8c36c87e0ab6fa4292d04b79c SHA512 364ede203a23157ec601d28ff141c0c69759fc5c483e44e346fa1592403f343f0722f7763243b2ee7a190c7a744b1cce1f40247f5a6c7b3dbfbf487c505a40bf WHIRLPOOL 07fcbca80d5397765879dbbb882b7d2e2448da2fa4f45e0f89dc23c0b7b2bd76553b1ac754ccba9491e2ec7a158ae53b1c9517e3e249102ba082d620f182a51d
+DIST commons-parent-35.pom 57772 SHA256 7098a1ab8336ecd4c9dc21cbbcac869f82c66f64b8ac4f7988d41b4fcb44e49a SHA512 865329efefebf61a54b273bd0ab8beaa09ccecea0d12d5cc02479ea62b154cd6973d65fbee5a7773cf87f6b793ac0b0f1681b4b08e6e57049a166ac3f61ed95e WHIRLPOOL ea7b1425b8cbc0866903d9e5541d68986956d4e257ebef4e856673e808cda801cc1452f6460959a27c301f55f495486351ae02851e2cb31b0e51fdc804364656
+DIST commons-parent-37.pom 63042 SHA256 ee705a4dd68d8dcd9cc8d1249d5790861eb145ce7b0c6d6c0555ba94489d014b SHA512 9183a0085f8f05fda802df3f6984470e62c1f9219aea8fd476636d0324406a5c393cf67f958a2edfc5827ea0ce5e169fc404d9bbaf27372b1392d2473fc21255 WHIRLPOOL 4104622b1db0803ecbef88c1168b7dffe7dc1de7d95b877907520f3638e2083b3729abdbb74f39d103f73f48452f223aab796d1dc9a9b7722b10f1b6545f77b8
+DIST commons-parent-38.pom 62182 SHA256 558d961745ebadcc5dc391cfde7d474086d4caaee24dd3e6df931ed9f6b5b495 SHA512 4e5810db261cdbbfd20aad23a14fac56ee2761b43ababfc61a37ff99a335eae21cfb04b6e372756a2318508c644c928eb8233fe6c5e89403dbaefe3490ac9617 WHIRLPOOL b74a21612b9853a7e9339d3b3998327f1775a437717d832d4b1d990028dcedc41e3eeeaa00b3a3b0c5c0920d893bc31f12953f2fbea83897d84f7d8bb4012af0
+DIST commons-parent-39.pom 61975 SHA256 87cd27e1a02a5c3eb6d85059ce98696bb1b44c2b8b650f0567c86df60fa61da7 SHA512 ef77fa2d64e33773dd36ce047c467ac698945a2e2db54027a939a583fb4093fc5e2c1de2587e8f94a9985f7c3d37c6385c11c9b9f21303a52bc585307f44376c WHIRLPOOL cb342301ce015a4a380153bbc1cb424a26854c34976c5211b92be8965878590c39fec76eacc170d3c240bf917c58face4d9a754205672675666bcb05b70b35d5
+DIST cssparser-0.9.18.jar 372937 SHA256 a2ecbd27997d4a15a1eeed9aa13d861090e0cdbdf2d4543c772a34b7c1e32a8f SHA512 299de8c9cccbec843c5180c363dd86415fae4e0259bd0fdd0010ea2cc3e52c30293517ca283493717ec21d2be3913a6f690fedb956b2f5cfa738ce52c9cd5d07 WHIRLPOOL 3302c86d4fa177780f5d4f156a3f7acbc775102857e780c0c91289573a307cde39f6e14327f43edef30a53ef6a447016e05d2fad2bb9fc60fe14206d558d3c71
+DIST cssparser-0.9.18.pom 13309 SHA256 4dbd15c2dfa7830254cfe9d4fc2fcc0c5e6122ba6e944425527f666bf95a98d3 SHA512 4452a129e308cc34d0840de16693469181c15ff98f519912b00656f921f3b9a87752a90277c267f2ccd5b2e02b30c26e3f5c6ba031b996c3496e5ed85e558722 WHIRLPOOL e2a6a91b0bec24089e263b116f924b4d36585b292d4c7b91d16edf00f1852f90db6347356c5c323e2755b757126689ec2592a6a99fbfe0db3f8e38cecca0aba3
+DIST geogebra-5.0.339.0_p20170308.tar.gz 53952712 SHA256 2723605086c60748df6a943764acd23342ac5afafc04b7adf4a24a90d577c2e7 SHA512 7fba06aa3737295994d2f67dd890778d043c2ee2b3781d9b318ef48ebc974601f9b1a60b3892a4c55049d56ba754dee0dc56b132e6c999d1efeb9affb37ff4c0 WHIRLPOOL 0954a4aac849235ac14b894d1eb64bd8a7de3881c22d68e178eadad88f56a715e32ec7a0d1f52a7986fad5a7d2e6bc15be5fa98e5a4bfa9574f6ab527b1b8b5c
+DIST gluegen-rt-2.2.0-natives-linux-amd64.jar 3507 SHA256 e83b85a0beeec9a05f48166c6014540df36a50b061e19da509a7059b79cc5be9 SHA512 96ded720ea75ebd67787c9f04938a728bfec78e11252cce4600ccc0d96c4255e591ce86055f223c30709e645b088366b7a1ccaab2986f93892335c52618147a8 WHIRLPOOL 07f5296f13bf229b4bca9d27b6a04b071131407136ce349cff9cb2db587856477fdae7c9760522418787b7f4952515c46b344409d8f64358cb49d980c8a0e096
+DIST gluegen-rt-2.2.0-natives-linux-i586.jar 3540 SHA256 f17980b85183425b295013c5922ff39d8189f1f889495845515f5da07fa14acb SHA512 f2dbcc2d3749fbe606a928100e645128292e966aa49c9b518f884588e1ecd326a35289b46670695b09f71daa211036f5c055818a69a14acc7fbe018851587a6f WHIRLPOOL c5c6b4a9cf714b0346a09e5574a4ebf14309b90b96b4f1cea31fe71ac22c1d08e15cb7a7ecb809aa8c179f842d99162b275926a8361b6d16d32bac3276e39258
+DIST gluegen-rt-2.2.0-natives-macosx-universal.jar 4328 SHA256 4416aac5c9a2c04db77340bcc9799aa79973de967b592744f6d0e704e9a0dc1f SHA512 40ba7d740e84165b4135e67deb5e6dec698329eda1e9a0c1b8800d35d09399c1a1ad0d296dd74ee71a79924dae31e23001b14a8d9ea236953bacd02c59995008 WHIRLPOOL cc89033d4fd60d71a6e423da710dbb2bc0c568d79bdeea889038f7928a64dafa1da372c30023ce0c9e4f14c16b0e6233f2637e77b0dcd2ae12199e8fe6a84577
+DIST gluegen-rt-2.2.0-natives-windows-amd64.jar 7390 SHA256 2e50a9c65c3afb33293ec493b3904b99539977b1906a2bacde90d1f3fda7d0f2 SHA512 4c3667bd6756fde2d5cd7b9338d7b55ca9b6fd061a8c9b2c99f97f1c10496e9b402ae160f6317ef68fdc44c30468ded12a94e49ff967bf6eb43f8ba10f43597d WHIRLPOOL bb30d6f53a155211d2bf082323dae28a332ab2b112efc41a374cda06f7d6e5db97056879ec9e066bc775cfccb4df33d9fff30fc1b3a62156982057ef3915fd0f
+DIST gluegen-rt-2.2.0-natives-windows-i586.jar 6815 SHA256 425d8e3023395eeaa915c4753a37685abcf30786438cacbfeff99a9ef209da11 SHA512 07eea6a2585164a4e7e7618287a54aedd888d1663c150097e524c9a71de6a898b54149a3ecaae842bbf05e74ae890e3a582ec49df240341cb3e5e5d3fc457b7a WHIRLPOOL 7089b5302f66d31512048b2ec7150ee0dff8164749fbf2cc6777222b7fdca637459584fb6d57f37cf211899367d7e74c0c15d3aa3a32d854b6e50adc57eeaa5e
+DIST gluegen-rt-2.2.0.jar 294615 SHA256 4c11c2d0a3cd2af2e6eca89bdb29b70dda2dfdf801c7210df2af8d7b6ab79cad SHA512 6a867697f6534a78052014b9a1077f80415da43d35e88d5b908424485b0c85116dd96eec43306a0372bd93b90371df36707b644b4948446653b7e0ccf925c274 WHIRLPOOL 592d8075139f192f413571849f9140a16f3370e4fb47258bfe78f126698bcccf24a3b0e95b2f5861c4ff2df4f36040a43c514b8485debfed66325afb01c1010a
+DIST gluegen-rt-2.2.0.pom 464 SHA256 7093f350007601a7132b0b021da85643ffb24c9a0d668f73f85bd7a1f74bab25 SHA512 7f2999ec905580cd99655387bdd25acc80f23f960ac48a18b8a143b22752b87704ccf6fb1a64e6ff41952467d072508a61efff9b918f233661c2afc20ef29bfc WHIRLPOOL d58574f3571fa8d7411f378e368b024b1861014d39b65eed6e87e80d497912fa0120ccb61d04c41aba8eadadc22682b077556e8cb20bb047785780e21d373e0c
+DIST gson-2.6.2.jar 229650 SHA256 b8545ba775f641f8bba86027f06307152279fee89a46a4006df1bf2f874d4d9d SHA512 f6564695f23dda2b74b87240f8a5916b548269903e7ca9861a510900a9f3d30d6215cdd878008632ccfa74f4470a98714d7134db737b417d1e7f98e81f5da405 WHIRLPOOL aa873acb903d1f5ecaddc23758428a91205d3807fceb86d75ffd52d7254d818dad78c4e9e509c80e2e5fc089f3725901fe2a5eba088769d42f86d5943b94485c
+DIST gson-2.6.2.pom 1447 SHA256 93dd4eae02d4ba22a4914fa960670c84e15c8df036c294da66e5bc5b0235251a SHA512 7b89ae0828c7772d9661e826562ffb20b0051bc87952c0bcf3110742c378c33651150fb641e6cea214e5aa3c6c8d00da8d180e4d08bba73cd49f6ab71450d242 WHIRLPOOL 07c777db2e0b251be8ea1257fe062990a13cdc2d8b646ef0a368d60d33d523a6b16d05a444ae19a1c5c555de4d1164d09ca0a36aa59cde38d682a49062c9b0b3
+DIST gson-parent-2.6.2.pom 3584 SHA256 c571d69d7b68ab2cad932bc81196e17bb0b915843b4f215e26627377371a6073 SHA512 3ad4de405ff4784698cafc4c943b01520edea738bfa8e48a3186b38a482754f2e5cd67ff02a0fca78d72ef6ea529c1aa49fddfe7a23ccfd0427dc673b0f76f47 WHIRLPOOL 706633e2fa42b3e9cc7c01fb2338d438d84077d0a5cc797bd1db9046d41997201b1ba86f559cb65dc3ef2bde2a6705e970557dd2bbecad2cf6be0115f9490711
+DIST guava-jdk5-17.0.jar 2059438 SHA256 59bf456547b6dda3ced968cb56f7f2d3e14474e2de2960a32c47e31c1e456c61 SHA512 790230592e6ee849433127104e28c5357d7f6e144219c5ac1d3883e1fddde5f94c7bde1f6ad553b43227bf398d1f578e48bf002f91549251d7218bdef3f77848 WHIRLPOOL 2eb3b848bd4ab4ce6dc98e5960f1d87001afd4b5f17eb9dc0c7c9b6d0927bfb2d056bf88924f173e34b7fd7823fe09f578bdd49b41adb13d37719bc4be53594b
+DIST guava-jdk5-17.0.pom 6477 SHA256 f8c152627813d45bc4e7cc17ad6ed6a649a0231ae819ffb8e05d19b205a3db66 SHA512 43fa0103bd8dfda56e2419dac4b1d0d8af82a7a8941755b95bfb860fc29fdb9d7b6474360bba4dad0a430e2b4bad1241d0c423218d01ee313389c1334d48c060 WHIRLPOOL 0d89b773cbfb6df54f50cdd6cf9f667c975295d6dd73229c639efdd1c6fb0403477e7f966dc2a7986a566f2341e0e3503476639b9d26d232d3e30df3fd7d0e28
+DIST guava-parent-jdk5-17.0.pom 8113 SHA256 5a9606bc27632956b3c11df887e9b3e785854068aaa4e0808ed5660f60b1fb6f SHA512 b552a83521f96ffb202a3380664b52e5cb3b0f391e68b82b0b52596d737db88da1e0bdf57ca15fef4f6250d40ef6b16b052edda5adbe592e2ad5415725bc4fc1 WHIRLPOOL 264bd92bb48ae07d362724c01ed31ed16c841709bdb8a4773f736d5a3e86c1c9a9725344fef61cb18d0eba55cb4bfa79297c62d2b307ab5089c78942d45b4c7d
+DIST gwt-2.8.0.pom 9383 SHA256 d4cb9a29fa2255f22b37b7ff9319e9850bfb099617da119f779117f750d046f1 SHA512 a0e0ec6d4abbf766f426f2ec941be855a3cbdc9d7e6b99d2f33339e28e744f15ebf9aa0dec9da2bde14966df4055410841cd9e984ed538eb4b75cd269cf504f1 WHIRLPOOL 4034a71aef0bbc91177aee6e9e1121a5bfb08ed62e4613d7089fa3ec3aa5563a3eab40e924b2df317db94f46f34d43b4e2aef525c85b6ad62a9bb264689c1860
+DIST gwt-dev-2.8.0.jar 14608601 SHA256 8fc95f97b36568a087580f7c449f5bd698229a1d05942b041a514bb85ae97304 SHA512 e56ee1d3f9f9b5422fcc83c5309616dcc890be5d54c0886443e07cc7052ceae9330e8976f08e2f31bc48e03761aa6a9dcc9351463345bf3eb79ee3ee17e3acfd WHIRLPOOL 91f7cd480e371dd2265fed8ca5aa91b7778156b1161b4c8d815b9207ef20f06ab52ca164602083c1bc76f923dfbf87ab3d6d950084f9f42733a1b0a73b39a3e5
+DIST gwt-dev-2.8.0.pom 4213 SHA256 5bf80762e391ca8dbdbbac6364d10bf3aa3a60436def7e03acd4e398720ba2fb SHA512 fe746bc8338f39498d7e3062f8b6d5210fd66c7079b763d037b37c336b982dacb18f08c7d9fb3b37fb61bf18a4c11d2b0e878df34b55b1c599bc36ee31c2c671 WHIRLPOOL 555662a1d535bfca0d5825c0b8fca9b0ea97a16700d03e460ae8a8134995ec6f5404766f3696f8207b3c1235622adc78526e9feffecfbcf44f2b3ff973dbed3c
+DIST gwt-gradle-plugin-0.6.jar 166873 SHA256 f650af6dd92912497cb4d39e6ae6442918871f801d5d428a852e6edbcd21e07a SHA512 938ee3452999ab912fcc7640dcb68bd3a0561892a5c9f22b1b4ec0add748e50a285a5fdc031c2d4bc31921b3df6ae9a57fd8eaf3ff468ad8f88202599ae89a3c WHIRLPOOL 0cb315075411ce2e908b57aab3a446bb271835a67de9adeafb4aaa0e07799a9e6d51e2b9b1d00532c2a3d1d38c22ba523719a36f2b2babc58ecdc781f35a28e2
+DIST gwt-gradle-plugin-0.6.pom 1037 SHA256 6f2f18db6a5f0c43bb3bb2272c2e7cd474380d4ff0bb8739feaab765333895da SHA512 9d717a8add721ed4207e2a0f7c4955762e7d9850584146191fd33da50a432a0eab4516e7907e9252a24329d7eff2a5d76720b3bdc7a06ef3c1fbd0c98c92c444 WHIRLPOOL dcff6e89a5d30fa9d850c9b15dcbbd17cb85d3856b67a8ea8c33fcc3177d86ac0392041947c0568333d712a85c9f74c9a1626721b6f755c85cabd9c78fb8e4f5
+DIST gwt-servlet-2.8.0.jar 9420713 SHA256 3f68fd4663efe972f23127caef29e698baccb5599c9a55f5e168cc68fd1687d8 SHA512 1e3e8a844382139ac1c96834e577548d241ab0f8393385d7c37605d0d0c9568010bff1b4377e3b6f3bdd8da423f046c5eb8560c83a633110b8afb09a732cd26c WHIRLPOOL 0fdcd68537a1f7a9f6e225504e8f7d906f85ffbd5add5c2cb8fb1e13f6f281e249715a9f2083b0b7f852969a7994f0a258cde29f37fce2162be9dc61d63ebaf6
+DIST gwt-servlet-2.8.0.pom 1103 SHA256 96485747cea5dfdf6d8745ded43a2983362830541f93f682201d9ce0cffeded7 SHA512 830199c572719bf2c0d7df95877b455c5677210ddf441337d3a2fc12b30b674fe93e3b9dcbad9eeccd8bd62f2a961496f86fb4a55f02e224b1d42fbcb24554fc WHIRLPOOL 1182004933b859a3b7426c08be09b55f548cfabc6ed8b5e0404f13e887404653d0ccd7e90b089391a672fb4da8ca5e9b7842ab8386af5fdbd20e4868a8d1dc5a
+DIST gwt-user-2.8.0.jar 16266439 SHA256 07a826107ca2eafd05f2910cbe266f0fa0348e0f72daee7e00a2e228a2b60867 SHA512 b9ef6b578b4af740e5b7b0b2233d7a549c3a216551fce47a96211d49b65194faf8b3384c3a7b58236a6ee6b447193941bcf174ea7e79a3473f8925072dcdcb10 WHIRLPOOL 41659513976434cc62d965d7925c7ae6e630c4051eeb6562feeda4765b619521fa4f6821e2c41b115e0cfe1bcbd29d6cd351e53fc5bf5ac4ab5ca29192f35131
+DIST gwt-user-2.8.0.pom 1567 SHA256 7a4380a83ce12af25a5a33ac3a0e85c6cab12953ed9e12ee14c2e17c2f70706b SHA512 6204b43b3441e89e741b71bb914e48f4be88ecbd4800662f324deab08aa0b32292b2a5d04584ddbd6f53c87bc7cc35877c58d352120bd0e2c850a3e642e58eba WHIRLPOOL ff220b0684ad0f2fd6878b9ceaa6505c46931ea2c7bafdeea5994296de6773d41224c1ef4db9d36c476ae7dc5e1121013546f20e90e1f83c00288b1975d2f45c
+DIST gwtgl-0.9.1-sources.jar 46701 SHA256 24cefe4922873cb30bec9d53c5fe4523d6b710e6a3561d036cb3ba9dfac7b8e1 SHA512 b7ffb496a52ef6c36b4119d4845e8d0a5822168fcb017316291b44ac9ee9960cefdd685416fdb0ae1a485d6b84d1b907ccc68f377f0b58e183b6755c86c5b91b WHIRLPOOL 2c522f38d793513dccd2a9f031d0e80d0c7ffd35bb2de1545b3ce36f01549d606d2826a27d78342e5817132a721a5f078e378d01a5761736130fefdde4c68003
+DIST gwtgl-0.9.1.jar 33713 SHA256 c7ef26efc8ac2458fe2981a3fa05a6c5b3d139f4973b2f58e1c067fa966f82d7 SHA512 f2e8fac2bec74830e97ed634d4715343abc0520a37e5a14023a8f12020e46fe680cba0c450da14401d89884ede2f37622f72e6be264d4a587125b4fba33e7d4b WHIRLPOOL a3b691e84e9184cf0a81dd7fb8fc664884ca146e9ded272db7518e8cea0410f50db1a34399b6b828e3d5c3442f792156953f7fb88d3eb086187ff4a499726893
+DIST gwtgl-0.9.1.pom 463 SHA256 d56f1e91aa64604e6f03343296f61a55f536f6559d3f2c7baae34df6bce73ccc SHA512 1af4c1d81ab6b1a0fa5a650a585fecc8269b8da71aef91fef9aaa915a9f751327a1f3f7e456af59bcad0f982b778c5225e0ddc16dafcacf137c854b64664b874 WHIRLPOOL ac92f2c8d1ea9cfbe7497d3e70ca2da0738da0f089f4833b749e81f3b1fe48363d3939d673f1b00f8da32f39bd251f2669ef3ad7836fe901ef5fca47f50f01a3
+DIST gwtphonegap-3.5.0.1.jar 613570 SHA256 376c2a545c4ae149ddf168230882b7aa409367651b9407f8f9b4be15bdd7d8b6 SHA512 47590e668af989b44effa319d1fd67441a6700d60c637e4ab0473fb2d60bdc70be93332a96a14842b18d1b40ab187530ed35d73937994b4822625b277bb37e28 WHIRLPOOL 772e5786db14d59a1317fe28282c54fda72f0f7e33cdb3f8de9e2c1343d2a14f545c54f5fce5537b1893fa28aa6d1df3031141d10b5882d871ca3782c5608462
+DIST gwtphonegap-3.5.0.1.pom 4704 SHA256 0e57387f61405a7f83b9c9e34a6b5b0b66db96118c2c480b0406e4fb06994d43 SHA512 922cc1a1dcd0e56936a2617f13c8fc6fb5e6a52571c41b2f0dbfc8664072e4fd992deb96a44402d10d631ef429bce370fb87f588f23a8a3709c820583aa6c5af WHIRLPOOL 54e5db4410e0da9aa1f0fbf9aa36ece7b3236662444ea65d1a692bbf423717f2b53af7dca2383c6a21b16347a442a984fcec484b93d1b72776096c1b18912e2e
+DIST htmlunit-2.19.jar 1906761 SHA256 10f16ea03bbe6e41489570bf8994bf04f8763c40b28b3229703ae54f3136c843 SHA512 03fd1211298cc61e35af2f57576f6c329518117d24598f21f18a621ef1bc387a695b376824d14387906122041ed316ae18fa39744bda392042bac321b94ee66f WHIRLPOOL 9e0f5989a6671e9614c40476e32a12a32d417949d431ba2225ad8355db9dbcf2fcdd3ccac696ef54f9095f64b4920634c765fe391f06175c432b0de8a000d9a4
+DIST htmlunit-2.19.pom 36810 SHA256 fd3d5243ad780e07de67c1dba1ce5c9b8821e46765ab01b93277acb614e36f04 SHA512 8796dbf0b8ce136cc7d2a385f34a4cbe98b2de98ada6c27a1d79bf11c415194e0bd6e9984e619488d101144b20d2dcbc1509203476c0182e3ae0a51eee0b84a4 WHIRLPOOL 6c797dfab96dbbaf7347ae2d0c2aafd1571a99cb9ca314b0cc6022bb844350158cbae73c97371ee3c736d188f1a3303fad2c4aa55da892da21f42384ec3f8f5d
+DIST htmlunit-core-js-2.17.jar 1086732 SHA256 32fd749af1599ab0daf22b60cbe97b6792cb9fe8b4220496a3adb667e58a5c3c SHA512 4fca71aa9b7ae412a91a1e9fa051afa5c67abc0f26dd0c96ff91f362bd4c4887398b4885a1e8e8fbf3ada953dbaa86d51350036ae37157e45775f34d66b09770 WHIRLPOOL 16b6ed9d9f89fa35479d0c8058cc7142ef450aa0c15e153b1a3dd6612ef7caf5125221220a538b3e6f69a7df563fd9669ab7fc8dad28c54074beabd53b9318ba
+DIST htmlunit-core-js-2.17.pom 1482 SHA256 63f3246b9c01df032540c2ea31e5796946ca199d32e334bdb76bf02e541440a3 SHA512 4e3d0a0b1bdf77e3d1f9b2716d6c6d011bf7aee3d171af2fb7b541f46fda30e51992f3adc6721cd5304544bcb6cf14e4d936e28bcd7386d5ef94c218a65877ab WHIRLPOOL e319478594f183d3494d920c96eff8555dc675e8bf851c82208c7eaed35ce1b2ec511e65788a10d8c30e8f56009ab1d0db9d6c4879d6983d026664e2dfcf7b09
+DIST httpclient-4.5.1.jar 732765 SHA256 0ba1a340188f33408632cedbe25d6fe17c1458bde17680a06cd6f6a69476ff74 SHA512 720e98b1e33ad14aa13330452070498b7a7bd744a9368c2627183291551388e064a61e8ed88cda967c39b24dab25d2f2ba10d9cc4b2765920905c4087aab7592 WHIRLPOOL 3cda82cda5cc63734ed8570c8829d7da540f7449e16f5f628e0e6089ac5ac74326529f2efde7b338f4b45aacdbeb26387bf88f065a0e46c093a0b1b369e7e312
+DIST httpclient-4.5.1.pom 6393 SHA256 be5dc81f412787ecee00d467c0314e561ed11757e4e02ff941fe5968ed23998b SHA512 f63d4629cbebab394af643959bc091d6dfd45dd09c75820d6d32c6c884abaac77d6d482bc55f2735b66bf846f5a1bee4eb5535e9247cea2e9605cefa31b59e5a WHIRLPOOL d49caeb2e96cc99483e536dfcd17e699cd9fe7ad4c763b1d9bb4705ec8183e55a6fef101852b57be19807ab902062f8470087d5d826d8f65a01342400e9e7399
+DIST httpcomponents-client-4.5.1.pom 15671 SHA256 c7f83ac81491c0ad2c3aa68b6698123bfca40d185180938f146a2c7350f763f7 SHA512 c0d0a29460b8c7ead0a8e3313f1971e9e1e55465dceb86766c2a2f31e1249d841b6105e4b7b4f4a820e985a719605fff6b24eb1ca0fa39bf1c17545bc5841ad5 WHIRLPOOL dad58203a0d3433dfa7bd0bf7923cf05a0ac6dd0d018814b486ee1cae30c00db55315b6f2cb5bc604fd128eb3af508d4d1df0f5c1a160fe27cc940edc2b907b0
+DIST httpcomponents-core-4.4.3.pom 12859 SHA256 1c8df7da4d763bab97529dbadcb7a9a08b9550168f311dd432f3291c6ac26646 SHA512 da83e480a71dac8368cf2827c5ad1b4f6c2f21c4732f6ad587f2b2d26229fa6ca20b89f4c56350cfcad2f18d5b7d4abecde3c26528a537156849cdc4213e992a WHIRLPOOL f965219d3827a922fd0bd39b587524cf79580703590e5630dbb71a6039870dd201397986488a8bac6ede6f2ffca3798a2b308e8971007860053e52e2b1993505
+DIST httpcore-4.4.3.jar 326594 SHA256 e4ce096fab656865f0d78d88887377111fb2f3bcd5004c1cddbc899987f32b5e SHA512 8d6682fe00c25c44cc0308412a97a116543d3210095f591a5155fd6ef3de1dffe0ec3598a99141716895b72061b03b33f714fdf467b7756a02f77941f0a5c8ff WHIRLPOOL 3641e90fafec3ce65bd9f70d06e35fbb1ada1a170fa9f6e1cd524a93f1b9ff9c96f67434f2e97e81398e3b07a53c0946a56aa51356ede4783487f4149a816581
+DIST httpcore-4.4.3.pom 5522 SHA256 970fa3ecdff2246a4c73ad902d2e14f3b3fe8e96f9d53940269287eaa0b574d5 SHA512 cc8e911e3d647760f985809d49a117ef4b1daeaef9667455d5edd50644ee0030bb68f184af9d029dfe8c69f136f4c7fafc27cfdd378855b15ffe5fc24cd737ee WHIRLPOOL fdb27732575efc1bc7621f1d1a83425e24ebe1d00e7bf0287cb75d1e01b3e412906ff720c5441b4d0e4b94580453e3f3b59a915c09833a01e94006e27a680a97
+DIST httpmime-4.5.1.jar 40698 SHA256 8376801929b82e1d64cbf554abc60be94cfe039a874f8e6f371d06dbd97b99df SHA512 365b0d42b27eefe0e655d83b374db0f68183b15e7b84528a05cbddd08c815b7ac3d294e43b27cde459b24af2a474d67fe5d51c136bd859cd652830f43fd60040 WHIRLPOOL 18e92779ccf241acbd5a1d162e53eb584c98e49683a74357bd89c41cf7fc204498f2cd42fb624d15b53f79e9984963bf061812f570041286940cf6f0683d5755
+DIST httpmime-4.5.1.pom 4782 SHA256 d08f37a8c032a138d4209d67eaee4ff75c823e5860fec86d6f9c6637a849fc72 SHA512 fa3d884c4d4f5ec711cebe0c51383dc4a99bf3211cb3f522fbaa212d94b0fdf8e7620ff5653bd4b872adfb9f8f3f1e02d223ade2571da88d85b3fd153c3e5d5c WHIRLPOOL c3a663fe28b55642f27bfe1e667b4c6f6e5dd7f265e6190660874def2062fa4e0850d4217db3e02f1ebf13eda63ad3504ee4b81a438afc271c5a82c9c1d2f01b
+DIST icu4j-50.1.1.jar 9215806 SHA256 e579e154f63ca51c8108f88c3a109d5ebc4d84f165d12335fb1ae2734a8aa5f0 SHA512 4f894deaea0e9c7d094d581b0b8843c5af6e75ba3443b2341ccec65d8e1723ee7c2d8ba746b7e0f59c912bd31b246cde8e00ab99d33860cc7ed25e66a35c14a8 WHIRLPOOL d980c3fc0c1fbe22742eb09a2c23028a109ad0041b8aefa0e56a3c7dabeda4a96d64ebe6b93eb088307cbc9e4fd4800adebebebb383704a54451f6b9dc857cd3
+DIST icu4j-50.1.1.pom 4824 SHA256 2435fdc1b59b08cc4758be029965bbaf7ad534446f6a9dd3d1286ab8b6344473 SHA512 1dc571a4cf10a06eff58a7ae42e3b1c6d426278b3f140b8ed0cb99afb370ca72335996df3302ed5d310ac8cb1b7932ccec6c28e137d046b4e324a519f0871f2a WHIRLPOOL c979d94d7bfd988578bdbd9edd37155fb943b015d707b34c4c8d1a39934bce0c4804a6514809f32c0a4ff7a16bd736fd2ab1a63f301819662a3380d016b4ac74
+DIST jasper-jsp-8.0.9.M3.pom 3283 SHA256 8eb7e8685e474b7af15051c7369e85f56c7b9db1bacb9e17a9a4ef763f224780 SHA512 1e38dfade70c8b3cc04bbd6463f129cb26c6a1e7e373571878cbe1f36543ce937f02feab0ceabec0c1fc36bbde06fa9c988aa4cd83ab5038db81a4d9a6cc3459 WHIRLPOOL 91a6dc4da6f1a28822ad003fba9fad0883e06b456246ea0a29fda7fa051a65eb36118b4839a71e942b79e3242ddf05a03ee7765b130d541b0f3bff321e78bea4
+DIST javacc-6.1.2.jar 551730 SHA256 ed0c5c960961cfeb431382cf0152827b01156747db3792d1bf93e81e32c204ab SHA512 90a2ed25f8e038350933bc08bee7ceaf3b56379e8f309d5c467ca842e6f1d65b827a8fe1588489b5c6b91ad3819d8dd2aeed6a7b563927b146dae5f1efbda7a1 WHIRLPOOL 713ee31308a916f89ba3155cecf713bcb894b3da0bf7516b03d73757f07429028d27fd1e4b5da73653110ea680a5e02e7a27066bc3d6e26c2c212e106c3a2a9d
+DIST javacc-6.1.2.pom 3272 SHA256 75312ead6a8cd339ba014b030cdb2cffbb2a5beff8518a4d01ecdcce38cd8e02 SHA512 6171cc436607ac80195e3edb9ba83124a59ae6572b7355e330c90399f969ef5824866acabae69fe92bda10b64d79edf1f4cd340e2aeb3f3a92a4991b0375d661 WHIRLPOOL 2312a7779433225acbb243443753e0b8a9d064de4a517b17e7fd990a664ebd3b6fc935710121a1b9bae4067b0efab9c6ae40eaf2446b204701292070e1c8486c
+DIST javacc-gradle-plugin-2.4.0.jar 31122 SHA256 46c3074ebbbe10d50ecd6910a626310a41391656790add0917e901a7d69f89dc SHA512 c2a06e1fd49190978bf648e51477bfad108d4df70d8085230bb5a9a1bf53106808b569117c39f152b1c34c05847039228d0737b1ffeeac8f84f28e8fc81aef20 WHIRLPOOL d108bc63586b8e28725d59d8f9169e8406dfa7b2902dfde5c994dbcfebcde06da2d48f38f600b767b4cf844384481827d7047a4620ecb35026a26742bd535456
+DIST javacc-gradle-plugin-2.4.0.pom 1975 SHA256 3534acb87c2dc07da102a38fd709f5a0034781290cfa07233d94cb5cc3a2cab0 SHA512 3c1032a3198f28a7e7235a32909fda7c1273520a2964b957a14081df3e00eb7740d2a55bbcbe5a1573466a23d5be760e561bfbb95d27d3dea48c1f383d715166 WHIRLPOOL 10dfbe24080b3853c3cd5adb85d4735a60998f8d35f64a038eb051dc0b87e8f5758784c5564e383fd881038454690ceab648b6578bc7adbd02e8f74549faa22e
+DIST javagiac-52580-natives-linux-amd64.jar 6636537 SHA256 22e71985fa835f736626a877104d8d3b28efa5885d4fa457b3f48d9ad9a9504e SHA512 762ffac47cf57ecdbc7dc7539da25764b389863ff83d7941f4021672c822a3c9ca6b621c224cdda5142dd918d9628e2081510176d994a7d1f98e731ddb80dde3 WHIRLPOOL af80fc2844335e620104511b810fa6105362bf324a9ceff49a44e1a463b24a46dedcea85b49147ebb15004dc11b4a11d48231c73cfbc498f4e8cb7cf60eeb28d
+DIST javagiac-52580-natives-linux-i586.jar 6777352 SHA256 dd9e3275215172b14599911e9b545aba7c78e70409bd31d9fed51fc835f3d684 SHA512 5570f0d565d7d9a8834ea1f49e9a05dc9ae42e039853e1b609b7557a1ea8411db95f434eacf6bc49b55c20451c7b2fc64700646d267d4bff7ed2a505087fcc9f WHIRLPOOL cb66f031641ae9376c9726a4902c1a2869b53b6562d983927bf41f3db43fc35f8ce7aeb43bec14c19b3be7555009b9aa21ba13802d651a1324da1fedc63f7392
+DIST javagiac-52580-natives-macosx-universal.jar 8382744 SHA256 a0983d82f12d4adf958597de1c619c48be7300c47e1afdb8b5971ec148ba644e SHA512 0b5ca0894b014c7747f578f48bbbf909d5f2af92311aaab0aa249ae27027fbaed2671b1a4e7a99753360e19e6029b49d8eb171d18d81f400262974c4fef5d504 WHIRLPOOL 15d6a92493ea1b248f74e0145389b1e9136c4e1d5c102f4a7ff4b713703eb8d03030bfc8ba7754db8c374ed2adda968c6a2ca775cc0f1b5144537e13561df6fa
+DIST javagiac-52580-natives-windows-amd64.jar 6481087 SHA256 8f7847ad0e9e8f69c361ce7b0d178932b6bf0f02c8b6c55f62b570975490b0de SHA512 fa89cd727d2f578eb174195e3a197edbdf7638a56f79b3d8c9a27bebe15691d7056878adca67556dc4121e15b4dd2f8e16e4f1571f887912ccf7e39e4381f3cb WHIRLPOOL ce8b32aa2f3af51d802a37486fc7a6d68b6a0b7075d76ca5299bbbf7dbca82ca1c6a1e12de084480990c94faf10b640d576658614d9d60484e9ee2b7b352d08e
+DIST javagiac-52580-natives-windows-i586.jar 6391163 SHA256 48e4562cb97155214af1ce96e789ed992eb218c1a41ee10078692c4da8c166d0 SHA512 c5fd72797825073236783eefbaae462b76d8af06dd376d101ce0235485f0d744d6d34411166bd4e4a36c9bd2e1352ae9363518a305c5a039fa6aec507d9ddd48 WHIRLPOOL e7fe15bbb97b2eca35ce56e1a35344b8284cc6c440aef525de03edbfdde1cb72f9006f9282772eae66656973d72a62ebf9654dc3e34ea7faa109f67e91e6524d
+DIST javagiac-52580.pom 396 SHA256 2c210cfdef7d7cdf8df904ed89adaa9d730d0f6478f5663c3bbac761e9190c31 SHA512 d0cce8901a0d20e18ba7089538bdfcd0a601d815d21aa64381a567c9fe1ebfe0afe1c947289aaa1d487519bde0717c57285120dc15d44fdbc2c0add64daddce1 WHIRLPOOL 72ef98f70dea0008648bfee694476c77563c4e71e4e89495e857b4a24124616b5c5c6308e829e6ba7a6ac6501208e0d5735244175a58e6f336eabffa156ead80
+DIST javax.annotation-api-1.2.jar 26366 SHA256 5909b396ca3a2be10d0eea32c74ef78d816e1b4ead21de1d78de1f890d033e04 SHA512 2453330b27a0822bba440c28b98ae1d83d60d97dfa2d040562dd5126b3548e0caa040fea3b886ac6feb0a858e6c1bc45b6c5472b180f1f14792e5ca33e355959 WHIRLPOOL 6030a3d3b1614d05d17f894334a966c731740ae12aa3df4f50729486440643b524e86be3390417625be5165c6e1e493ef9a5a30793924efc64efd0070d08cf67
+DIST javax.annotation-api-1.2.pom 13432 SHA256 52d73f35f7e638ce3cb56546f879c20e7f7019f72aa20cde1fa80e97865dfd40 SHA512 230002a234cc6582532ddc2552ccb96cd6b4bd8c878f00c0f8303dad3f31f71ca68bf4331e9cb18b447f052b3a9d620d8a4582e1d266d5f92159e1c74e041756 WHIRLPOOL eb1c874767b981b9257d1e85bf657f9a24bf90511ed8464ad5c99008cca99b1c836e901e5b632ec5197b34c02ae2464ce5fdc1cc09309d0d0b7888e5bfa7f80d
+DIST javax.servlet-api-3.1.0.jar 95806 SHA256 af456b2dd41c4e82cf54f3e743bc678973d9fe35bd4d3071fa05c7e5333b8482 SHA512 32f7e3565c6cdf3d9a562f8fd597fe5059af0cf6b05b772a144a74bbc95927ac275eb38374538ec1c72adcce4c8e1e2c9f774a7b545db56b8085af0065e4a1e5 WHIRLPOOL d45c39ddab82fc2ac05e756c152ff3c8c406dd59e852fb6b918cbb1656bd9434bfd4bbdd38aff9cc0c7644ba864bd9cfe0a2062e37fe671afdc78aa9efb3ffc8
+DIST javax.servlet-api-3.1.0.pom 13527 SHA256 b31109e22ea3f2df1ad7955432e718a35def50ae6c19698034afa8a0cf9e9069 SHA512 15f79408c44aa4ee0374b8fd74b51ad413698f7314d458e3efd1239fcfd7965d8ed2e66b82144362be7b11c02d27b9a50ce74e583353865e03ee40991cdc4f2c WHIRLPOOL 571674c224ff239b825e94a7f07e09789aff49c779d4d16f58a6153bb08e09da65fad406f60a94538832cdf763d7a40bb9d62c187cbef103ae3dd6ea8c4e6753
+DIST jetty-annotations-9.2.14.v20151106.jar 80156 SHA256 d2e7774a3a15d6169d728c7f42b0e2b8a6dd3ed77dc776a2352e7a5b9b5f3a6b SHA512 6748b07e20d0bd5ef1a24b7859c625560ce8182007b4eb33314217f0d13630e953639b7ea0018b82edf4ec8f0567266b284d4b1a1d62ec57ac1c240b65f4a77c WHIRLPOOL 2ee7b780005911b43c96d048c2f71ca7a234ca8e779e48e58f4aaa5142b37312aab289d2428f290d0659923ce3ecbe587b2bc3056660134bc76846016f5993f5
+DIST jetty-annotations-9.2.14.v20151106.pom 3836 SHA256 cf7a734cd8968f7ce52dee8b76ba19bad8cc7481a68cd359c7369cf23bfb2b71 SHA512 f05e9500b50114b60c0c2aab5568c2a25b82823fc7020f5edb34c8cd08ff2cfa83d1bd4b1af81d9e8786bf7b16376a36663ab6681c3abc6b593389fdd51f445a WHIRLPOOL 9ca4b2af7ce2d4768b3519f87aa06aecbaca5588420a0964e84140e997068fc19c844d62552a778bbc16eb6825f11f92505e50e054b632270d0983ad1e7d41e0
+DIST jetty-continuation-9.2.14.v20151106.jar 15995 SHA256 3e60ef633d4110f020a4d6207966a4884424a65067eea5a041d1eac1066bc453 SHA512 c49d49083c2d30f3dac081d507abbb3816d8c76b1c9ab18cc833b33530ebd5fcaa22e9c60e0a7df378a32bd30bdb4ee57bdc0b0b2fd643d6afb1190fc375b599 WHIRLPOOL 8f05f31811a2722deee73cfb96946a8d3811466e37edb449849e5b10619955fd03c4fbde54a00bbfddb3301c3eba28b2ba5d29786e4f786b578209734e0145ea
+DIST jetty-continuation-9.2.14.v20151106.pom 2014 SHA256 eb9204173b9227f2e40210dc0a94611a230e0dddc16cca192f2a9411dc7a79ce SHA512 e37884a09be44176c085f8a13f58c39824b85e8e52f96ee4cbaaf4ac1eeb023e78b3c453b35389b943f348b36327f48cf68455d871f9e613d958d38ef32685f8 WHIRLPOOL 46e490e437b28afee8be78f82821441ab8cca41cdcf22fbcd848e1cd074696717665ef54b07293da904a5c0146a7c67a0e6f70c83b03df55dbe11291e0d41e9d
+DIST jetty-http-9.0.5.v20130815.jar 105046 SHA256 38c11730e376b95751fe12e8bf0c9a73ed704b9877b5e1e2c37ce5d3d4675d6a SHA512 53d2242a4de7da6b34cdb8c75936f154c354afea8d7b2a697ca7cc93a58901e2e35468363812e34d37530dc66f863739a7ebb783ad8645c12137f6e5a7b73bb5 WHIRLPOOL 4ec0654b8cc0249b63e9a4823d108a76c998cbec5ac0cb40fea377b128591c427489b7f2ee0bb87a4ffefbaf50918639d4f409b7e938ccf3c2c20f62dce34874
+DIST jetty-http-9.0.5.v20130815.pom 2517 SHA256 8d1e9c533d19927722f2c7f5c94a2763c1d637d7aaa34480baee575361144f8b SHA512 85354893b41243e96d1c28101e06ea812b54ba1aa1f4bdbbfc6edb7036a5b1e572c465447d8121ecc1d6f7384a2db8d8d502f547d95fe1ab74a4a884df597c09 WHIRLPOOL 9eb22272ae300539eac9ce1f759c443f36e59391dc96eeae1911716de3e6dd4480ee1efe22e9e6878c0856a217c51e95c6ef45f7e6cee3a33bddbe3b11cec261
+DIST jetty-http-9.2.14.v20151106.jar 105860 SHA256 635e5912cb14dfaefdf8fc7369fe96baa8d888b691a00290603d8bda41b80d61 SHA512 419208b9e94f0f7ad15ccfffa108e25fb322ef7efd07888b7737192a160873728fad833f7edbf4dbfdb19449f9c1d07bb89b626cd712395d15460755a00115d1 WHIRLPOOL 5d50618f89d7e08552006d8b429c9b8d7aa33305992f68e694a70ebbbfef3bd2e9a6b9e27f0f3a30baa3eb4c9c308744593a6276ad3ffad0f70eceef37e921b1
+DIST jetty-http-9.2.14.v20151106.pom 2524 SHA256 005b8e337b7682e00f8b4469c6270ca5092418d2347852f710fa63510ad91725 SHA512 88f031081a309ac8cc1c57a8729b6750bbc2f364b77a0657fad287854d1a5793130a89a91e7e151c10fb58a10e543ff9f3f9c1b9f3e1f476bfe9e787507c5106 WHIRLPOOL 21fa650b5853290e5a9beb7e314deb2a1e4f4b1f49a09e2f5abaf9a8efb9730bf5aa4cc58dab6912b8cb41353741665843da5f72d96c64e24649ffafb32cd69a
+DIST jetty-io-9.2.14.v20151106.jar 108324 SHA256 16f2d49f497e5e42c92d96618adee2626af5ba1ac927589529b6fd9a92266d3a SHA512 4155d6b03d0f1494c00681154f942542b8c83ad19f17496fa42c1d57b2609e5760ac9009d813903752370ce32e4b8a4ba9c89feb1595693b09902a489c01f231 WHIRLPOOL 3d51bf4d0944e5465b3d359c90ee6dbd0b51ff335125b1f9a0c9fdb7d5159ae2b6775d39fd3956ef9dd3ac91a41127891215443f1bc06899ed7c5c9019ede2c5
+DIST jetty-io-9.2.14.v20151106.pom 2288 SHA256 f2ccd306d16986d3c5df1c113edc88d1d23980a85a3aee5379225503743360a2 SHA512 3c87b45531f24871265cb281bf964c1f5b98078e28fe6613a1b6eb7fdbf1044e5957199b99b1a551f4a2a695877fcb6f16949aa6c5dc26eb547469ac5f13ac5a WHIRLPOOL 191ef4012856bae8c613258abbb26bb2a767caec25052a9b99c3c2b7ed0729c70134dfbbbcc547acf745df5324aaffb1a47ddc2ea61c57e27a11d505c06a9ab4
+DIST jetty-io-9.3.0.M2.jar 107802 SHA256 7d2bdb267889afd8ca67edb1bb1fc1d560b0cb06aab012b77285b44a085e2163 SHA512 2da44fb4381824888e7edd4fdfef554ae7c6c214c093023e535119445497aff57b34681e9c3ba91f49cf0d84ccb74684bd9c2923b9b8e515a26d99643ef0daf2 WHIRLPOOL b8b56692f9cefafc3618ed9ff429fdc8c9478b98a3406b517c17e50117419f67515fab0e0c539a6e49fc8105afdcda74aed97f0658cbc8021176b9fee480f785
+DIST jetty-io-9.3.0.M2.pom 1436 SHA256 508abb68b5cff4411958c55326ea4395c104bd3da4fd3eacabd65112af567528 SHA512 8cdf1a797858881188da51da30def3865324845fb17f11824b796b13a182d0ba4fb00e3cc141e5d52afa4b9ebeed18f307bfc12020ab2c08e753e50040c96e1b WHIRLPOOL 257916e37fff2a6c53c858523d8794c25bc1748480d159eaa5821314dea9bf2549a699d24dcf3685eeeaa9a7c889c8c8d6410803984a6cccfb7d064c4a234669
+DIST jetty-jndi-9.2.14.v20151106.jar 41268 SHA256 9181d263612c457437d6f7e8470588eed862cdf1f08eec808d6577503bec5653 SHA512 ffc652792282878006b34a79bdd26169cd1491b269bab715df317bcabe13fbdfe5aaea30cbf7cd15ec925e8adc6149027b7839284a9359b2119dc171571ab350 WHIRLPOOL 996962cc7b768469fea15b7419e4042f58e9e9898bae4bcd994817f673e55e5bcb09c9cca57b6ba80842ab29f326ab43a8059dbab94b8c9578f0af4b23e5d661
+DIST jetty-jndi-9.2.14.v20151106.pom 3319 SHA256 93a983c6ccd16140aba5d2cb54d0837eaa4542cc583f8892e63e0deaf9436cf6 SHA512 a57269cca958ce738b48fae43d2ed28702c4561158bac52ee4271fea476db3fdf05307d8e3ba1523e0b0eb8f73fd1eb42769ac71f5ee8f4017a93a89ce6259ec WHIRLPOOL 57193bab752d983d3cdf53f9e6ef85110eb8dbae559baf16321ad9365de1399223a2fc460986e0b88157b2878bfc20c7de20fb1597767bc1bdbe4ee6e36eb8db
+DIST jetty-parent-18.pom 16496 SHA256 a3578c9748a785c8d5be737222d3078663f590332ce3d5d24bd132825c73f63c SHA512 64db2021bf61c2d0369426b8eb3e00c4fa6b85cec0bd0dc69f61935880918bc41621c5c05a0edb37e8876a8b7c72b2fe1efc57d83ccf141e6b82423ac511bc92 WHIRLPOOL bbb134133d373ecb48992b894dc7365598f06ec7b9f4396a12aa082f9b3b6a9dc2520b8448678c58ffa632a66245f109963c29a14d5a0c80f4625064307a7764
+DIST jetty-parent-20.pom 21197 SHA256 cad17899a82a634fb487060875eb66dfbaf6e4127abab78655d43028de4af284 SHA512 c69400fd1097f156f4134312bfe868e36c0edcdfff9083ac0180b3e723f01c0840b79d5abcfbce479fa4846de3f8dcb4c5e699b3ddd9629a746e5aa0b8bf13ac WHIRLPOOL 03ef6a2ca45af9519f7f51c4bbe54eecab288770dc8d1256af679b86c50fc026cbe2dc0b5d7b107aad98ea713875968dfa4b9cd6dc41b481ceb2ebe6997f78e1
+DIST jetty-parent-22.pom 22261 SHA256 1bf3b6f1a4027d49a1bd5d44499b620e511a58232984c9c8919e81337a4a7a12 SHA512 30f43cbbb015eac54c954b49bbabecd9f1a69bacdb48def49b6ae79c3b917eda756f373fe81ce24e78c6e6794005c3dedeef4cd4e7ff44e216461554480fede5 WHIRLPOOL d4b94367126d4055b3bfa512096d572e08adb19f6595c9cd3e1003541d5744df0e856ce33967325b8a7b38378c1e316327ad497f11836817f63150f6f4b62e1c
+DIST jetty-parent-23.pom 21913 SHA256 ff229d8af3732c662c623fe403f7e7ac102fe54555ad01f382432e09deda8c51 SHA512 440905aac391d61ab5e02a02b86f473c85084b5fecbfb6a82bd87ed5cc6565f491b4f9cd483ceb17dfe6fc8d29c54389579548dae75373a23ad0bb78422bf22b WHIRLPOOL d07a19bc60ad3f9663fe1bf39f6b784bdecb8db822e032712ab2e8f06aa6c9cec85387a1b497f152abcc8ea1575356f12efee7b47402012d7d80abeb7aba4872
+DIST jetty-plus-9.2.14.v20151106.jar 54159 SHA256 6c2c574507c693ad76fde1500b9090baccf346313ed342d98c4104234149bdf8 SHA512 8131c6066dd344cc3778a8ce5e44b753d20f47261aaea88ea52df2dec44cc3ef3d68649ad4760b2de706bbef4595c70fe69b064f03e111488b234b65b1b1df6e WHIRLPOOL 00fac447002739888462137959168362f7ba823660138250f8902cb3ff23c9afb74c4815244ab36d44d267da8bfb9f9c8cfa83d883834613a483bbe53a189120
+DIST jetty-plus-9.2.14.v20151106.pom 4272 SHA256 2c1e51582377fd2b1c9eb1b0d1e593305e436b74a4b48d1375b03e9cfb5f45a8 SHA512 333b94e54ac5036af6dec36318ec895dd69b2d71f9f8456963a2466dd0749de97bfbc184bd9ed39d892ea86d0bfa89922cb50bf3b30f4d7437b1ffbd1a546b31 WHIRLPOOL eed2e8dadb25f971cc985c4304fa7269364df792a899c4bf076d133a130cf5a6ccd59fc515ead154d7b7812a1883f96c3193227f3fe411e29785ae9b3797d755
+DIST jetty-project-9.0.5.v20130815.pom 26990 SHA256 46edcb2c666e4dbfd0a22194a31868932f178d05ef4dd4b1dcb8a4e98307d087 SHA512 84006e3600f8811d00aa58761eeb602dcf00a1390b5430b8c976a3ae1d65b89b44c443641205a6122128f53ff89e40e77124c153992f201a7168c08733ab3197 WHIRLPOOL ba32a7cdb14f18549eac2d831e363fd801f07cfe49725d0f1a9fb0283be23da58ced523713f374a7d44221aa0906e92982849856c5436ece171e14b5da815387
+DIST jetty-project-9.2.13.v20150730.pom 36896 SHA256 86dd09a4a0c7f05718257853428f772c93f8ddf7af2d37e2431ed38f3d6302e8 SHA512 c3ddec7c6b71f31ebf6f6ea1bccec889f6b19f19cd3348f032bf3bfabf10f16149f1daf7b592b3c2d60f7e271538a288a5ce30d4a5f92b21fbbc20d4a61d27a3 WHIRLPOOL 9eb8cdb30b47bd3e23d88a44fa0f97662b08d2538bf03ed319bb2a3e18d66c8f30b5a650a934a95eac6e6d015c9d665f3917361fa195edc39d10a537942636d7
+DIST jetty-project-9.2.14.v20151106.pom 37745 SHA256 d42b3078169a3318d1803cb66bada87e7e609f98bd41eff339397e822a6844b4 SHA512 87f550ee5e69644781b9e70e0917e73c78fdec75bc5095b509383bb9f35ba4ff7b1d89a7382f2a2f9cc74347030b501b386c8e302451bfa1359e29e9dc2945f7 WHIRLPOOL 13ce39c3d62487e55d817d4a17a2509c61128178914fe37bf4bd1925d7fae528a1c72945ca8184091e0e0c13c07b0598a5fa7267e35b36a7e5c5e387b07a98f0
+DIST jetty-project-9.3.0.M2.pom 34423 SHA256 1319642a86392fbcd31382132f8c0c9724251045f4e2fd51f958181d1e91b81f SHA512 75127fc94bc84c165b884c9eafe70bde240e13ccd0c4fd412a26d6457c65580f8807498116c0f71ae34b3eac99f4edcfd035e3c4bd6194def8132db7d135cd1e WHIRLPOOL 9a843db68b477efa2c3e8fc5a8b9378461d8885fae4c94210862ec2a01d9f1dd79e049a61491b85febad97feface25d16563010d2c38d1e27b87a7231ee96a16
+DIST jetty-schemas-3.1.M0.jar 188164 SHA256 bb94452226bf103848614948c88f44d1057c2d9203d53affc1c9057a16223907 SHA512 97861156ed46e2621e8418d9f55a6477feede0ab2eeb4fed61d44680970ad123f33c690040caccd52ed41f4a1c2ab0aae22a402cc1da412f716b46a0465e8987 WHIRLPOOL 28e66bd1761955d529229e723ccb48c5b2ac26661ca643ed3fe9f7d58c324c25b6d35fdb2cfe32300d5f63543b2482d8b4a16a82aada289aba9804fbb6c93f73
+DIST jetty-schemas-3.1.M0.pom 3211 SHA256 e5679dcc8bb56b94d7223368d290f49f338f1f02eccb2972bbef55b16bea6456 SHA512 9b7159b69795453181bdef76875d895abdfe1e5aa7f4b36ebf72ab0f61f2e523bb5c46ced62a06e96f85b1efd715a08f1d016538b0ede8e6bf2cde14b5f7b1ce WHIRLPOOL 26c4d66774e9bdbd493287243cb4f4eea54eb21f566c6c7f70fbdc387b01db0d8d66d0ae9c588e63f1489e20a3cb3811888fcaf04382fcb8aba04376e17800c2
+DIST jetty-security-9.2.14.v20151106.jar 95926 SHA256 1810b2395f6f0717aef296c6c2d6f9504deb2076ef68b3312e1644c0b9cc3921 SHA512 fdd4ac8e7fc75890dfb1f08a70f26a50eb99dbf7560e72145d1c766fd091a0e0bad014d0db4fd12af05b00bcf93b2caf5adf76fa99fb3accefead057373271a7 WHIRLPOOL 39046eadd864b3ad016522edf544a6a55fbd5efcaa09908e60f0947ceebe56cb71d169011cf1709da0511c07cd70b42e271396656df77302154f63a2d511a8e3
+DIST jetty-security-9.2.14.v20151106.pom 2777 SHA256 b2952c3a435aead694ac6b3926fd14302fb7c9b67e5f123e62f2c2dfc5211b12 SHA512 93cdaefb99ce8d9311e31539096d482adb1853c13b46d711e859c1e49cee0f6b82e84501350bb94e64e3142846a69b97f809ea09196ac6088dc41ec75d5e3f62 WHIRLPOOL 319b415d880aa60991f1930e587c15b5c2f86a3cc30e5a6abeceb449b31c1a2119206be6dc071e6ca75a272f0b77c22264169405e36c2f9eaaa3dbb8901a75d8
+DIST jetty-server-9.2.14.v20151106.jar 419105 SHA256 bedeec57bccd1680c8ec71ea0071d4e6946fd8152668b69ab753b34729993e8b SHA512 544b6bae4105ec73c8d60ba953dc132fbe6843618f3e1aaa2337d020bc4e9a2c9c5d21ece2a6c2603bc94fb8aede76998ba436e35f7d90042532190ed34e4609 WHIRLPOOL 91a7470e1b88fd50e33f150e14fd3e4e87e5ca9cd3de82bea89826e49d7974b7b3c6849d02cb3aa5d920de6eff3e0c8f66eeb89ad35567fa9ca7717355179f07
+DIST jetty-server-9.2.14.v20151106.pom 4102 SHA256 0f64c6b9d614868576624c5be25c1b5712247c86109f6b983413f9358765b234 SHA512 b596e37c391a3503d6cfa523db0c30371481f362f34bf0de53e6b4bc8c9559ac75ee4997ee4e3bf056da06063661b9b472afbabfff815fe1c64858f5d2271690 WHIRLPOOL c3dd946bd6b955136e55a447dfd0af718a6f1555c44baf976458fd67f87bc70fca7f54f1bb64d42484d52331379f73209a7182c497e8328f2122327bbd11ab54
+DIST jetty-servlet-9.2.14.v20151106.jar 115713 SHA256 ac13cca38e1541647a2fbe726a871dc5c22a757c0d8900c08d77302e414a725f SHA512 14afb94bd3b0d1db885604abe362dd6e3d05856ca9b9c139824fcdd4fe268c6fefa1bc742e92d0a76ab7f5adf46524321119f5a7333222412341488696c810ef WHIRLPOOL d1b13a0d89ccd4eea21be980c3bc6315ffb6dbd618a59deb1a4b11245d6c44492cb744ff30f93ee47b26802cfa68c0ad77ee255dfa6fb9fb44ef92d8387bf1f6
+DIST jetty-servlet-9.2.14.v20151106.pom 3283 SHA256 bdf1d2938a0a966354da785b02e2aa146c20b3e2348c3c8801b7e865d69b9ed1 SHA512 fb5febbdc3f2696835b3e80a917e354a09bf9e61fa2b7b8ecfbe3c2d57d8d11cb4f4d1764b6911ef62de7b25bda43367f00f5dc5a5236ced8f28a2e6ba26dd33 WHIRLPOOL dbfcbbf1a05eee2629f6208a1e75af0353ef2f9d7f1df70990c3c278acbd683d774be1f31024b38627ab8494a8980362ac50e300d4f59904118e606942d55b69
+DIST jetty-servlets-9.2.14.v20151106.jar 122602 SHA256 2a6e50cc48cfb5de3c3cf15176e229861ac7bc5e03285408078658298b75c421 SHA512 d8c091832ac8ce4a06df88b4ebb6420eefe207905df696782cf44f36cca6124ee7015725e38774758372f25ab9d2d378b773973c002e710a741ce42b7ad4b67d WHIRLPOOL 459b1d7d306f2208ac4123a8d2a9d54518c3c545f614de501e166f458b7e2f57f0712b368288952ebfba86bee5e23fd8b9df9bc8e2a191cdcd0fe3fbd449b499
+DIST jetty-servlets-9.2.14.v20151106.pom 3847 SHA256 5f457540cff7ff7a6526a76756cf628d41b94452aefe1f8c44d497c0fdbffc7d SHA512 1f3376b47363016efe4dcb6c72058cfd7dacde2c1165c8cacd97b2a21b5428273687f027caf3939ba8bdbf1f369994194c47c1f35a2d610792e43b66dcb29c99 WHIRLPOOL 40a09a52ecca48cd5261eb6954dc3ef674b462608a7ba9b0f13e01d06a1327a98e45d540745ae41d584f7744d982080d81f11b903f33a827b7a3ffbb8edf5a44
+DIST jetty-toolchain-1.4.pom 1440 SHA256 5e619144e308c3d703cb7dbfd695b658a7bce4f950cbc51e65d2b155997d60e4 SHA512 524b2b409e7007a0c031d8712b6918e7fa9bd371ccd44d5bcac779324a5fc8484540b672ef0a72bc357c5c4ab3fe8f7ef31c28ace9f8c22bf33647aede750b36 WHIRLPOOL 0049008b3e23f31bd1afa447c2056407155b1f4a46d25c1300c26e9e1ff9c97ea21e092efe5c334167a7dd1698db1d40042e757f880af4d774c3b48f3f165838
+DIST jetty-util-9.2.14.v20151106.jar 361119 SHA256 277a2cc734139f620bf5c88c09af2f0328b0114f6fad52776abfbcd8d37166ce SHA512 8ec2d7d5828c521342dfcb05389dbd64e2b63caa2b7ca7e8a5fd9b3ec495563539af915b21d09ed37d5854e659041b9f27abb05bb118da3c2a1adc6b09ffffdb WHIRLPOOL 30a4cee379c5414c85beafa2a953340fa3e1056f7afcc50aeef0e1d44387f0e6d2008c9e431cf6a3def763deadf8d8c3f5dd3b1c6959375deebc361f90005dc3
+DIST jetty-util-9.2.14.v20151106.pom 3597 SHA256 397d1545515be5d460ebf0743692fb1ad6cfb1e02d4f3d2ec1b199ce6dc0a446 SHA512 4320c0f7fb0a2bcdb83554ac084cebb22465e3a87d917ab1aac1661e97d0083d2f22306751c828440734205f42bb348b7d054588dc819282adf16a11190e0089 WHIRLPOOL 9336cc3dd9f554e010f89e33c260a2c6cfd93eeb0752f7d5634882ef24a0c7415dd14cc7031d899ed2102c9f7ce41dd76c2ea4ff1804e2db2b306e95419e2dea
+DIST jetty-util-9.3.0.M2.jar 366443 SHA256 9ddb2e3ca81328f507a771c5293fd52e63eda502c161fb0dd247398bd30bbbdd SHA512 ee6bd3a2215701987478dd27478f7df8018ff06c79055ad5b63e86a7e555e940a634906b56194a29112741b972003efa5fe1a0679024ce2f86b69a5aff1aaf3d WHIRLPOOL f5e13021de169e737fc30fecbfc2d466b65a9be495faeb622cf6d8a47ab27ef64fa18e99127a1549313694c9a8fc0ee51141a2ce4613f29de406e0cf0a0ccc4f
+DIST jetty-util-9.3.0.M2.pom 2710 SHA256 2cfacdc3a288c6ad5692b6563ca829dadf1921c9596ec277413055d32ff7bd10 SHA512 6706a20b883580fc04d40b2708e825d363afa03b47dad27bae392ed6ed85f80aa1d0f2d8c87cb2650b1765ffb492225770a7f6a83a8b8cda80ebc8bde47c40e7 WHIRLPOOL 483ce6c05f0d15dd7183a6bf4881b2e3540a65635b54d19bab91bd0a7ff6c3736ad71c8487dfbb59afd580cb9f2427bb77bea544795f954ebf947abddc5b4ba2
+DIST jetty-webapp-9.2.14.v20151106.jar 107865 SHA256 1865f0d3c0edc8727eb4e4d1f9c808cec039095e95cfff45816ea6f7059e6fc5 SHA512 36cf475e1a6d8a3eefb439d23edb918cd42aaf7f04718e587f081d2a393ee38eb7ffc747ed7302f47e6aa36843ce6e4defb2ab1c75ef985fc15920e27c12cb57 WHIRLPOOL 91e58695a445a84dbe0531528205b2f53e627b0f7f41e80f223b940b9c0fae19a6dc0e642ebc2fd6496f78cadb0b25468b45955ca69531599912be2788efab50
+DIST jetty-webapp-9.2.14.v20151106.pom 3537 SHA256 94e6e8df24e7960a22f3d6e7d030308f50b94b476622e84262993755c24b4694 SHA512 b3bccd674774529e9506a9d11a0b26d49daa4f5a2e8a3cd068948944c5a8c74811ae2a83b5bb7ed25ae95071b94b3caa3176e7493b100d735632578f7bbaf8fe WHIRLPOOL 9f5c73e048b3624c8753b2150ed6a1ab87b088a677ac23bf58c4e79fba477e1526d96942f35d1f8d723050f648d25d55f154e433aeb9d4f8089d85f8bf3c16e8
+DIST jetty-xml-9.2.14.v20151106.jar 44136 SHA256 3d13667a02e331c86b124d020338ec5cc901a7986ddf9fd99782578fe77a0459 SHA512 eb5a335dd44b4f55e66d5159e8c93896a3747b27e92760e2b15e599a80a33b719fc209ec2b56299122a6c93e89ad6921b4c482fb132b406aad57d889ab2d1046 WHIRLPOOL 0fceccb940602e62147a1ce51371d50c2f1d82058ec90fd47a76597a51d8bf8441dd41403e4308b827c3bf13d5f2285ce43636e0d71571574d0fabbeb3dce4b8
+DIST jetty-xml-9.2.14.v20151106.pom 2024 SHA256 96e9e5f03b094ebf46d9b718e330e01793dc8d4dc7875030d2e0ffeb1bcd7d37 SHA512 e3202bb9d3ab244ae5a88678bafc6f8879c8435f3ecd4bec470b6c9a5670a909a297a07c0de06f5772fabc4d05365acacd5824e8c349e44b719da386aaf0adb3 WHIRLPOOL 9e49483a5d8d5218a536bd2510469fa890b817611c4a58c3ea5445fec712b2bf078cadb0170fbd2708b3aad82992fb7e876e4ce71d39b10736ec37d931f15e82
+DIST jna-4.1.0.jar 914597 SHA256 1aa37e9ea6baa0ee152d89509f758f0847eac66ec179b955cafe0919e540a92e SHA512 ea1b400cf25c6032160553f19baedb21103341f1c4236fbecf5f8462cc4db06f3459d7812ed0ad07a0b9faa3b576f8fa6edbd9ed64f9486b85e5bf982c21775e WHIRLPOOL 4e2fe72e136c5c0a2bf41c6d373c5dee6961ee92471fd82b9104864b2ebb2152119864de14a896146346fe6b335bde3d54d8df01e7e64828bad705a428bc8ed3
+DIST jna-4.1.0.pom 454 SHA256 e5afaacf447757a3f555dee1d7e3137a36b8f3d9831d30fde569293a0f4620af SHA512 10bb99a73d5abaea792db9fffcbd6d7786a3dd37a16083ab0f702cc90705eee567a05f8a4441f5e1310f6e644f6d7c96a7ed375d3d89ca54b4bb13ae2802cc94 WHIRLPOOL 939b19abff36ea89c915b29e2ff70ecc283e7dab1db51a70388c07bba26add2d9c8d6264276a568864c2457a3e9cc31c23fc7efe6f80276ee15a68612820d7b5
+DIST jogl-all-2.2.0-natives-linux-amd64.jar 201593 SHA256 2b2a2fd17035fe6e2ae6cf152b179955f23c9de582fb0f5f4c50cba021c1eaa8 SHA512 2d54fc8b1158b467ccf53aa6ee81d0aa4e7ffa3aca993ed0c058246fd7b77951d4941ac72d5d54ebcd6b15a1bdd40528aca6a27e5d4a33c2c6033b9f0201889d WHIRLPOOL 61fc4d3419ab0a79742e25ced13f16d68a6451296deeeea34ee58552f38c03dfa00c0225d8c7d12e40029c11f3da2a52bff9f599982d7f341cd1508f4ef38090
+DIST jogl-all-2.2.0-natives-linux-i586.jar 201141 SHA256 aa7fb15ba00a4eaad3f77e89902cd43d950534e7930b34a4ba7e1d2d58d23989 SHA512 75a98a8d6bab5ec54d89a85e3c03e77df30a5d0732082c009f6d698ee5f79e36f225427985a4bd07aec6ee28f6a5b8eed62b904053be88d765778fcc7394976a WHIRLPOOL d327c6041c970227bcf425bea9f3db37965275b19f4ff919cee992cc0a0c346eeeed27f1d7edae255573631152a0cf57bee8b963d30f34a40168373d0e8129d0
+DIST jogl-all-2.2.0-natives-macosx-universal.jar 399524 SHA256 e61999ad85e937278b937de4be8733c9d7005edbfd0a6009b26714a773a83e3e SHA512 470a664f0a7ccd535010d311cbcba507819c0a667bffaa310a9fe40d34c9c191a035a4bc1fa1b6a8d944a0cab24194d0e003f06137093d7aa717d2e8e88a606a WHIRLPOOL 98d5d367ed59576449f1e8c14e89a33c0559664b7bb954c5e41ca1ca7a94912c64de3bc2bbbab6b39e3cbf89599e4df98fb4fcf32f186d707872ac5cd9439fbb
+DIST jogl-all-2.2.0-natives-windows-amd64.jar 215644 SHA256 751dc231fd1023d4be6dd8ed6cc8a789152c6dd8775d2d5e5569952cf8035466 SHA512 e70c577b9e9e98c30932d717e86c839732646aba414f284b08ab8ee95498adb53effe55e5f72d1c74826c92951873900705b34e3d2d9b02f7252dbe875c6b80e WHIRLPOOL 1808c06c235362b99352cd01d83d7de274342f28047dfc21516616374c1a9cacaa3033a0a19357abdf6e955996add49839928d716270b55f0323147efdb5a52c
+DIST jogl-all-2.2.0-natives-windows-i586.jar 186284 SHA256 fb4d3a166c9f975d066b556bf5de70a2240c472c58550be2337406ff5c125197 SHA512 fd592429c2dd884248ea625e9df0ab559f090d5196026a991128ccb9ccc8b90d4f95f875d9466004f27c79dddc21125aac2d20df03be8a02318be716c5fe8845 WHIRLPOOL 0d40b6f85e53c83bb6662a34465f7c17fd0f44b57ca44afb3b8a0fe3264bb5b3086ea35b3a5a8ea368d15ca51e648df1c1d1d41cec4b5a449f5e89e3cca37029
+DIST jogl-all-2.2.0.jar 3098167 SHA256 c510591431cf112d307e6e57e48df19fd812bbb93f274547254e194a222e8fc8 SHA512 5f04f0bebe23d5b522fbbcd3cd5b6c7c7907e8628335ede92adc9eefd590477ad2fc065505dae2491446c707b73e78d222619a2011529b503d8e8a7f4ddfb3da WHIRLPOOL c9438790ca83bb447cfe07b1276a053bb9ecbd493577be9be5d1fb6048bff17b3aedcafcc62e52fe6d85dd2704d60fbd87c57ecc49206ce368abcf839e505669
+DIST jogl-all-2.2.0.pom 462 SHA256 f9b27888082ae60d40f1552b7e9ca961c6767cb794eb73a65c53b9d6a5420392 SHA512 e0392adc9748ab953a89164150809d24ad8a24a0e0eb59e37c5981950ca9a2bac2e1a18ddf7c3b75ff77934d7cfd44b2cf4f19db50424d01800edd3188ac5c8a WHIRLPOOL 8db28ac1dae33cae8042665b964877b300b21604918806cefc53096fdbf9cdceb8b7bf9f7b48939083d523fc87da897ee835ab636fc8667985c0ebd24f2f2631
+DIST jsinterop-1.0.1.pom 1417 SHA256 91c50d1414dd8ed5780468d08dab2acecf089698be0ed32e3483168902348903 SHA512 e2b218f0092fe756fe003d4ee49ecf9d8f8f22f25813d2c7b9c003d7c93a84366c8ce607e69bd9ae0395c67de9a41aa300a34c91bd3044207fa12bc3d75c33be WHIRLPOOL 89acea341c070130732a7a943cf12fed4579e206ec4e9ec6a7ffb0050ea79ded87ff984f5a2c66fa8f72ff75232dade5add488c4691bb4adc8653abb4f498fa5
+DIST jsinterop-annotations-1.0.1-sources.jar 9422 SHA256 082d7a7cba06f0543b7d0085929897f343054acd8491a4d7020ab433d4f6daf5 SHA512 5bcbc49ebbbd4a99d9f4b01724a2bd58b74c12318d43fdf8594846cee7c00b28ee0db7f41d1b68c5961c17a1f971800f7adda325534cea95b4108238f935abaa WHIRLPOOL 618face006828485af583e2a30ba380002cd17479ffc9d11e00e48afa3d2d11f4c9b8a10f751a4a6b47b31a0882f94d22bbb81e75aec0fdf4a9abc5d7fdc7c5a
+DIST jsinterop-annotations-1.0.1.jar 4075 SHA256 b2cc45519d62a1144f8cd932fa0c2c30a944c3ae9f060934587a337d81b391c8 SHA512 2ada0b5c0eedd8e0574d1382dd08ce21dd6a40225fae06ab421b32561d4df48804407f21ed00c278bc135af972caea7651c104adde35d03e87feed4df6c09c07 WHIRLPOOL 57b0d72931a04a36ee4a16f4b76a65f695df5ac6acc4f44db28077a2bb2a9daa610b7a477542f195df937cd7f3f3ac1ca4ee8af3de3af7cc09141953bb88f556
+DIST jsinterop-annotations-1.0.1.pom 605 SHA256 7b5e0ba9e390fcb777135244a941f0d09d24d76f2b53d70aa3928521d3188b3a SHA512 828edb7bd7e13cc88d9a29744fa6f23c002f23ae204dd1c9183a655914fe568042a463627e7335dc54c3b01d023976e9ee8b7d435af83bfbfdfd69677a1ac53c WHIRLPOOL 3ce239fff6cfe56b71e6a4faa5162c6a3343b5c264c95bae472cb8b0b45da8319a48580f436f9fdc77f48d3ed341114471f47c91a5d3fda8fd29e4f2177f70f8
+DIST jsobject-1.jar 2130 SHA256 e958a7df0ac7f684f3f10d46d34287662176afebc69263fc34094d2089dde53b SHA512 2701369816d331d09f8b2ecae8fe88817a075c34fa18fc6cc305f08011c7911e0fd966eb1d02a14b9ebe61660c1099a7cff056978b958e967c9964b78150da6f WHIRLPOOL 0b543a8cd370cafd105d75eaa2616197a8aeb7c3d7268c4f9c207fcde58734036cb49046334936ae7e0eab880b681f1812e1bc9effa3a86109cc9c6140f663ca
+DIST jsobject-1.pom 467 SHA256 1fb2a68279072c439a67f9884ecbd322b6f119640c59380362ee780b1e6c6a61 SHA512 98ba5d4e7dfd18898450831012ce39eacecb50a701a8e8be867403fd4c662e84aaafd88896f826885d5a3f13e54fb4abad8196dbef47abe51dc5258c4b62f764 WHIRLPOOL 5c07f0e81f9ea868fdd29abdf7895868b0a9d69b20e5311a39fb50951becceef33ef24b3a1794222a2ed0e075b8c59b81ac6bd005f162e1911a5a872c84dbbd8
+DIST jvnet-parent-3.pom 4789 SHA256 30f5789efa39ddbf96095aada3fc1260c4561faf2f714686717cb2dc5049475a SHA512 93b78fac40ca4de12d5a2fb4e339ba9e3c40a25ddcfe58272dc2a8e4b36d2c7cc51075aa2a25f0b3c1d4bd3142551e77847d1bd5599c60f5d50d548b72b74bfa WHIRLPOOL 928f5c216bddb86a76ed6f5f3b7baf78700fed4816fc00668031e011743e4daffde8973d46ebddd525f46594e4810990a7fc57465dc54a3879fe344b3986d1b1
+DIST lesscss-engine-1.3.0.jar 42031 SHA256 59fbc3189a8d1f7b9dc6731ece1fbf86e960a9ca859ab6545c87f58d09fd7f86 SHA512 adc4fd20faf30c7d0b598d095d057246151ce6c2682a5dca03b30a2d6f075ce1d45b68aee8e54b5d8347a77cc80c7bb77e986a061d5672a1196435ac8500a6ab WHIRLPOOL 5a882814a24fee4da91bb352855ecc2c335d4b17a8001e3b51a6204afb0321424b08c8a0576e2daf5b843c6b7e332703ae96e71ebe770804e930f4799822d023
+DIST lesscss-engine-1.3.0.pom 5046 SHA256 42db0ad3a70f3a187bcbace8a694a4477396f529f8329185d6fb01fb56781ab9 SHA512 c3d25cc30c4ce4588644ceca7ca4c109a3c4544d9f0f7a2d6b493055269adbd06ad7aedaba6f88c4424c389801f6b2309b83e91ceb0e6da8467069268d34223e WHIRLPOOL 6680e5e428c68fdfae9a6d9a96ec1351b48a353abf288206abe50b98bdc94752d355c0e661ebd4e823b026951d3aff279f93dd341f52e5a27e77efd4190ecf72
+DIST libpxcclr-20150901-natives-windows-amd64.jar 107919 SHA256 07866be99bf2ccb4307a9bdd44eb9a67e95866f358568b7a5f4059b879a8b1d5 SHA512 e01433084cff05fb66ab3ffb185a6f88c8adb6929eec72cd798e264d25908aaad5052c760bf7fb3e10e32c90205a94a8fd530f62cd822ba46c6e94f3f1710d4c WHIRLPOOL e9cdc374975e611cdf59be7c5df26b5834bd02feb0280427cb68c3a8d917fc1897b85f005990eb7e242f954aed7c0da507aee8088d2274867300676cfc90a915
+DIST libpxcclr-20150901-natives-windows-i586.jar 127551 SHA256 96eea7e95d85078f7cc2511fad2071a110fd09eea7b07339065bd122d0bfa63f SHA512 a6de1002ca2b60aee87a7c5eb43962dfcb2636f056789fcef179131fa3b3f276c46006e8979e28cac71ae06b64e276c97767bf5d2e2735d98a3613ae69805e07 WHIRLPOOL 6d8090362adad01e0e29155c5b1271ad681632395924f13695d4fc4eb3b79c3461ee80f33c3c811f486a52b07d4ac4451f1c60dd19882826e3c9bd4468df9090
+DIST libpxcclr-20150901.jar 165083 SHA256 b4c2646d6724a4f7efb8a6d84b9d686555d41709b3b17b5d139600f790b76c7b SHA512 63517be9793b981c5f05867eb69cfef7361666ea36611ab8d77f1cbec156f5c41ea295289f3806380ece7c1857ad71850c7ab03d23f1c40cd6f9aaba4800ebbc WHIRLPOOL 017398941ccb31fe5ab2124043770d7c05df4d11c109ef507f90d7ce4479e56f6abaacc97e21a9095887979f5f1d84c0de7e0d3e377bd5d1ce9e72535f785508
+DIST libpxcclr-20150901.pom 467 SHA256 0e9d927b5f01e2f3c1a7be321d610fde8be89b90d6733e59ef68551875625229 SHA512 89bb91b7d2a91ac336632c77cfb322b840ad2bff43206a937f3e7d488b8c11da8223ccff5de46b9854b0939cb7181d501730537d2e4d8979a698d45fcc14d3a9 WHIRLPOOL bb8a0a7c528d09a4bf1eeaf79e5ad64de1a2ef887edf425adf9a1881c22e5c3d3a9d92fa59b2d2ec697aa5c67410b9a4a4b9e838ef78bd27240046781c7cc78b
+DIST mac_extensions-20040714.jar 4189 SHA256 f0f46aaca0deba5d07490f66d420a58e5a17e4fe8b5118a3ae831207d953f52b SHA512 bb3ed2a14f7265f98c766e0eaaa8dd89f1a65f391192fe069214577ab3bc43ce9c7f3dd82285049fa5ff3ff9516e39b9192ac1a31d21cd8326876e1e7a2ce30d WHIRLPOOL 4f67526af9ec99856c36ce6279285e3d71f6f8c9a83fd1bbf92fce9730fd1e7f06ba1f94c46c17ea7911eb7294ceba1dd48fa657e08a19444844630f6fec0801
+DIST mac_extensions-20040714.pom 470 SHA256 a86e348e8b4914fe662c059bafa3763aba304f15aaaa4db565e8b9ddf518a71c SHA512 5d58ad750c3dbd367a2bbca2748f2c7515f78a9887d628fe16d61500857fab3bf4352f988b0db09a4a59356289f5aac7c1886fe4f99c6e3f4d17a08961565a8e WHIRLPOOL ce088a6a4b7b3bc0a4c2472ad8fa7641bd99342283c9d577e76dd9c5efd1f037018196446d00941027b3a7935a8b21954e9a01312ccc911fb7857a1fc1a95238
+DIST nekohtml-1.9.22.jar 125315 SHA256 452978e8b6667c7b8357fd3f0a2f2f405e4560a7148143a69181735da5d19045 SHA512 7050af64354bcc0f38692e1858294de01815c1103554a38b206c31d70f493f64ed4a7176f46f1fa76ad4cea36304b682347d1d5a4a2438c0b677b67bc3f5e749 WHIRLPOOL e5bf8944d8c99aecc4668cd72de9392a5170551d6a870c08d9a9c7db3fd59bbba203be2a564e0469042991d5e48d9ebfc86b67da006da11d3bc36794bdc237ab
+DIST nekohtml-1.9.22.pom 1426 SHA256 2871c7442b83dd0eec56ebd75461e671bec32dcfe4161eb359266e6794ca5ab5 SHA512 b44a90ed78ad2450e6a897e0a43ef7f898a83e59789d8683295f5f457043284af41280f7b3a66f64a8522b4fa50f8bcead8c2cb84dcc685db8503349d0a32fed WHIRLPOOL ccfe12267953e1b6a18d4f6d99c99097bfd54e19e6cb5aa07a98c3fc00e5e2f42c00b83470a27c9809e29d94d5fbf6b44271923a5c44426af5783e34e432b29b
+DIST oss-parent-4.pom 4000 SHA256 c513995cf019d9213d4fda666589937b2bf1bea5c4cdd337e6170e80b18406ee SHA512 0f395ef7a0e56c623aac1d93d4ef7d20bd5cac4dea08ac8db85b71a16c5bb239f19cf2aa3a1459aca3c257acfb8d5b2e88febe0b2282122796faee153265d101 WHIRLPOOL 92eb9d06e968235a4e3a3144929a047e9dcada47a965d204034e7a00131f5f4873b29e149e45e1946d9a4dae76435341dabd3ee146ff92c87272d4995db0a6a8
+DIST oss-parent-7.pom 4824 SHA256 b51f8867c92b6a722499557fc3a1fdea77bdf9ef574722fe90ce436a29559454 SHA512 63b0951f793ee9d25239ee44760e4d51de3b8503e438e567862306f2d175019d8617eb854bc4ee2374c39f385e0a1094c3c7097f899b2074e4acda14fe6030fb WHIRLPOOL 1e4bde4a1a7942b77bbe1ff2e46dc19124f4a40e53de8bc8af59c36000bbbc454e44d0282b25b35bcaccf8e002d64624b5a4a84b3bb5afe9c449062aa62c990a
+DIST ow2-1.3.pom 9509 SHA256 51215c67d2c068d8b7d2f6f80f51372a098075deccc448d4bdd7b987ba8328fb SHA512 dabd83686169bf4771c719d055ff296a05d108552ead8a531954ac081eb128edb9cb0fb9631f20e4bbe16035e2f1a1d5972c09ddff7f2153e64d538015638765 WHIRLPOOL 4949f048978f04627d5bf332d886e3155147200b973320d148ecd20348006416cfbbf77f978ed53dfdf432c992c3b81df209ed0236186941a5565f8d5097c353
+DIST project-7.pom 27243 SHA256 3d6eba428555a558de046b5d76eacc1f5a54b4f5f20b84d636ed7aff18aa48c3 SHA512 bbf658ad8f5fc0b54851147add99a134b944801e9579b17fec45486b36694a6bd007ae43bd9d4b5ea1d3a2778a8137a16d2226b7bdf65f0ccfda65d397858b6e WHIRLPOOL a80be195e2d5069975b3f80b26cad06e07d08e3d5dce19660c9b910bb1ec7807577bfc9f2760d804cd8a7429f0087b107b20c0046f92d43cada1223e04f11e75
+DIST requestfactory-2.8.0.pom 2042 SHA256 f8b7cdca1aad2241f1d67d11899d536e31bb44e258302f5c48834b05cb87bd2e SHA512 39a2036e01347030364e60af3297f95c82fde53a1c60b96530f9a53d510bc53129c33eca42f94b5d4617d9cf31ebb03e63e798c38d83a4942437d0c8dbe06bc8 WHIRLPOOL c724ae8b8dd8db2eba17edce0114ca31ccbceef9956e824d77342abba7dc2ce94e84a052ba210ef34d893012a82ed6c2201f06d366ffdfef7a66e7b5b9a8a4c7
+DIST rhino-1.7R3.jar 1094805 SHA256 54f044b054726042ba39e1116d0a9a93dcc3b3f390a79986a6251d8bb2167e6d SHA512 136910ad2a72a3a06fab06ef671e3123e1438259a9c4b9dd93f6c4110a55fb3e2b3846beed32d54d134ffdb3849b30cc9efe724f71f27cc143c072c4d57d6a9e WHIRLPOOL 517a15e78b31e87f2b194e256c4284bae07b8250ed73830f2601b759a9af77ac57f33368b6d852eec8537177479096386b22b22428ea12bc875afb639d91732a
+DIST rhino-1.7R3.pom 1428 SHA256 e781063e78cdf052bdaad54a3e43e9a31206ec95848e75029bc8226d3d9ab265 SHA512 c521c538a5969b1fb608fd4902e1d9b6ac5a33b8022ffa28f966a8d0a6ab84a3dfb855bf588f1bac1d7164706747f7ba0cd1dad88d2814e8d376ac5b16187991 WHIRLPOOL 87090f83cb54255b8ea79a6e58adb427357288119289e1b16d1797a0db775d5c6ddfd7792b449047002d459ebb4e2e1041d47c4094d85e4d967c34b3feca63ad
+DIST sac-1.3.jar 15808 SHA256 003785669f921aafe4f137468dd20a01a36111e94fd7449f26c16e7924d82d23 SHA512 2e8e54a7426fde22f27add41bbd6c002d386377008eca83659083b91070e5be7d5579105fc0113319fdb323bb70795eb6a8cf9877b6c0dcc3349661a926ff547 WHIRLPOOL a2af9c8a9ee0f9c76c7ff0f4005647412d5851117df1a50366c378ff48f93d9a40caeb06195ec7b2c161c0125609cc399d6ddbfac3000040511587d058cbbd67
+DIST sac-1.3.pom 1134 SHA256 04655c4805567c4c6ef5aae4491db4310e2ae3347784ff17888d45d8bdb66919 SHA512 9e3df6259b59c2b0b980d6b15d82832cbf024041e87fe9ecc4378f52ad539ef8be3dfca537818fdc29d14ed619971893aa6f6930543b3e7b43218ea421f8d1c5 WHIRLPOOL b841b6b117041e7f15d37e36f23b1a4e6744d703c75c7d869e309e0d061dbce062041dcd5946124e33294f7a6c01ff9c907c823ac262b162ddd8727f05009fa0
+DIST serializer-2.7.2.jar 276420 SHA256 e8f5b4340d3b12a0cfa44ac2db4be4e0639e479ae847df04c4ed8b521734bb4a SHA512 884d865865858a46306a3680df69f3f0efa0df1313706b54e6900d36af21e17cb6828f5a6bac551c59f7f80bdd1cb64c3fdbde44e213519c4af87969e9e70774 WHIRLPOOL cde8211263f0f08af46c2002ab092a56d82e76373dda9d228b1e2e547ea2eb00a5fa2b173adb62d2d6750db752790ff023a59bd4594eaa818212e555f5736b42
+DIST serializer-2.7.2.pom 1089 SHA256 bb2bc5b33b8a9030e4abe03022ec4993b3ccbe30fd2aaf1fc019a0b80cc04969 SHA512 1a20cd7008ab876f9605a67515d558b26b9be009c4f49cb27ddf5aa715b5d164c476c236b6d6edf39e81538dfb1516271c3859af8e73f8cdbeee24efb45e9a44 WHIRLPOOL 30fcb9b01ff17f93fb3d1d2fb7723a82ca0f2b15d39b2898e3847e984910f8056bf7b8ffd9f970119cdfab11383af2c962394e26f1d1eb284ba2f06e607812a4
+DIST tapestry-4.0.2.jar 1087335 SHA256 16dfc5b6b322bb0734b80e89d77fbeb987c809002fe59d52d9707a035949b107 SHA512 9747e4dbcd952166e9f92ca2d60ad80007d02b6ce418d4bb9f1de426b760364851b24f5c707bcd54ca329695a6e2e501cbdb6fcf1e2fc8870e33b8e5e239aa1f WHIRLPOOL 9a5bb3a9905402c01332bef2dd2644dc19e01e60c716d4b49ded66080a3af10cddc8bc8ee431c5ae3fa403182079e166f5e731859622f5d46fb6ce3b229e5c4c
+DIST tapestry-4.0.2.pom 1494 SHA256 e35d17f1e8ada6f70479bb611a347a6b2b54cd7745ad25380f7955b3ad9e0e86 SHA512 dde98e0510ebe27cfd6654cc537b9e9e20a65faa970ddc472ada0fc46b2c51b42455cbc6c698b5e1d92e563b1cd18096448bcb4c4fc89b9fc7b4ebe475d1f782 WHIRLPOOL 0edb85150aac504ba11492e38372a2006a61b359066d63a4bc50816416a3c933d2a55bfd685d258e041d928d11238cdad826b5357199c805a6ab76571fbb09ec
+DIST validation-api-1.0.0.GA-sources.jar 65220 SHA256 a394d52a9b7fe2bb14f0718d2b3c8308ffe8f37e911956012398d55c9f9f9b54 SHA512 88bcde2fc9446b09cb24e73137cd16ed54953a6d93f33e8500ca196e4cec07ac03ebc446f4629291e6437d2f3757802236e56974cd3023bb25886e69e2330fc0 WHIRLPOOL 9eef9230c08a712ddcdb81c85961fb3be7661bce3276adc77b91f274ba2df2edd7c919fad38e2499ccd58287477ca75cff55d4f86bc8d86c6c6020900e08cf6c
+DIST validation-api-1.0.0.GA.jar 47433 SHA256 e459f313ebc6db2483f8ceaad39af07086361b474fa92e40f442e8de5d9895dc SHA512 af6714687690d007b56b67cb430fbe2e32e0802ab8b7220daa6ad1559dbd3e08af4eada7ece48be9a2472589e703258d4a21e98582961273051244fe9a08fa2a WHIRLPOOL d81c339139cd8195e902411d0d6c5dc44a6828bf4d6a598dc1c235c37d7f47eeabb180d5134e784c1342deb06c27a6dd7fe69e514c45c1f69dcd341cf0f03b91
+DIST validation-api-1.0.0.GA.pom 4389 SHA256 315dc7e22cd34c83662433534d482414eb83d7d656a1c2751ef3ac605ffba367 SHA512 6a808f25cb6e5465a27ecb8050f6893fa96791fb98af68de193fa8eaded54cd03311c6cdb759d0c49a62e694c2c47e7cfacd57eba25e921501d5cb955d99aa40 WHIRLPOOL 710fc6c73e0a5f0a26404ec4824f8a730edddfc0bc2fa16e2ad51c9d31855af15012912350ad56faac887f157e89a14ad48ff69975770bcdc13c5f0a0a8a9934
+DIST websocket-api-9.0.5.v20130815.jar 42020 SHA256 daf15ae2d5c4befc7b4ed59b6279e9aa614fb0b2904ca48b1abc8af4030d7b33 SHA512 06746dd5598c20cd72aa0fa9216f6390ea00c36eeae375ce56675149493098fcb56f94beb1025c82a5f01db5a378ec260ac785b9d972acb06e4be5feee669ad1 WHIRLPOOL 55464348089b6873237f49023c6d8d3fd6b248d52b0cd5fb541a94ab223bd1bff61eabf30cddbfce7834e8803dabedad5ed0a17b7185dbcf371a2c5da77b23df
+DIST websocket-api-9.0.5.v20130815.pom 2238 SHA256 97c1b11418901fe3cc7507024a561caa37d774acaeef0cab22504b171ec47a68 SHA512 d7fa0a596441a005e9b44778589054f1f2b5e9f97070d86e116a9966778fadb8f40f5021fdadffbeab635e0fbada78d5138f3a5d6dc3a59d29a6cebee39dde82 WHIRLPOOL 0cd0682c9c1e57ca29a01a7795687ec6c040fe6e5411aea658211bf719d08424bb6649541386fa5cdb21bb7cadfa04ede417be73c0895539d9cac2e598f910b9
+DIST websocket-api-9.2.13.v20150730.jar 43773 SHA256 09da128275944e340a4a3357ad59e125df11a5cac0e63a2d1a0a098fa0463a11 SHA512 54225a31f09d6ae18b663e70f766d2fc66f7d7354a439c83ed80f5d0bba70d8c1f88a9ceb217802d7731865a89ce929ca00a9e01f3f346324a7e58c5880d0edd WHIRLPOOL f3ece3d46de57a552317e4c910f03e1a1385da81aaaffe8d81529fd902479605e9666cc6c18a192aabeec8c3bb2df6e2e27f102a1fb8db0ae4e8a7f56aadd863
+DIST websocket-api-9.2.13.v20150730.pom 2200 SHA256 916d8307ca1671f39cef896dc45b08ca9573a3427301153e67976a4cb98e0b5f SHA512 3cd0cda79f04ebfaf0115d595c7d6015fd38f47daa11eac195304a0c2d7a52f41b30fffebdabfe70822aca4415299671d5c37bd668a4ce146adc2fb773c49e11 WHIRLPOOL 68200fc1264da7de5fbe8aa2809fbc6a7429b26a3ebae985acc1db04fa3dfa1c707d9530c23161aac33fe1ea9779146eeb118f348f9b6e593c48331cd5cd1051
+DIST websocket-client-9.0.5.v20130815.jar 33672 SHA256 c2d60751ff608acb8ee0af5ec8db429d484e6271ddd8cb03fee0f4b8e413ddf3 SHA512 f929d868334b46b3ebd83b1871f6e13ddefdfabebde95828cc0783a855ba3b5af8827c4305fae9a079616b9d6d8dd525d33fba2b397fb189dc552b1ea400405a WHIRLPOOL 15ff47c16922baa0fe7ca88058f572457665ba239087856b3a3ee589624d4bb2797ba367855080cf8452dadc532bbe4a1d12da5ec2d159427d5211e8b5f35178
+DIST websocket-client-9.0.5.v20130815.pom 4869 SHA256 095c8728590665d6cae8d4410e7d30881a97788d640681039e7b64391bd38fd7 SHA512 39fec2375635109e188e19cc1359b169b723b11b115cff49a6fcaf6a2b4427ef5ec36566eb65b3f857dfc6fd118b985060192ed0366f05052815dbd1617b6b1f WHIRLPOOL 966154d082dc1cb3c13741bd355ff2621f0f30515d2f142b3b16cf92ba13be61c43aded6d88f11545827a272d5ef0404a4ad18e9d7030e5803c47b4d7708ab29
+DIST websocket-client-9.2.13.v20150730.jar 36261 SHA256 030c1582c768809078ffd604c687ec3dbf4ad207dfc292fd4a1062bd5a35f556 SHA512 4ce37814b72cf4fa700d841bdc913a60a166d7c0c0be894264c76dc5095c3f9cfd39180fdd91f21efccd0f317fa43a0199f1233ba0ba65593c4fe3b403b7b154 WHIRLPOOL 15f0ee07f7750a7a01fbbfbebf0cb547ee9ae7bdaeb80f8695d9e33ae18bba8cf51085f79f59884c0890217e531943b8e27d78c7b6e535b6ed5141ae6c4a2cd0
+DIST websocket-client-9.2.13.v20150730.pom 5112 SHA256 1b59a8d87308c8b331d6547fc5e6aaafbf2a663ab46a25977ad72c22b8b7e560 SHA512 f0084ae388e2ce5557aae419493d695edc6c67965ea1b01d4f1cf67f5169e7c1a2a75a1f086b884741d9675dc6be51f623bdaa3e40909cda23b6e1c03775b00c WHIRLPOOL 4254fa5c6308735ca6f45f46a19e317d8e2f2434a09b3f5f0e0ba398487b8ad7370e75bb5f66caed39252d10d458f8c0a5ec9c3c99756ce259ac87312aadeecb
+DIST websocket-common-9.0.5.v20130815.jar 146472 SHA256 6270e49b17782df8e2a2d54e397160973c792bf0df6c30182df3f26d85f5e60c SHA512 1416f49ec2b3fab10735c3c57f8b9cfdc2eb0a7f94c331d89f9bc8d72da8d353250b63faae917dbd3773ae43d5281f7da99fdc70b98e2e793bc7087f75c1443d WHIRLPOOL ffce698094a24083c6ff3c7134c07addf10e02f615ec96d0434578271cde942941f7520df2328edf0cfab9320106c2b2306543182022cd9ce2823c70e32bbc5c
+DIST websocket-common-9.0.5.v20130815.pom 2314 SHA256 8670ece642320ccbc235c69d785e0aef87b9f446e2e9f1bec025623499c426fb SHA512 1a80409753514f780cd9ddef4ff854c4373c503c68d4ab71aebbb74af44bffedc4d66a31ed0e94cf61f48414192eea68f468a04ca7a5570b64a2105d23bd2a24 WHIRLPOOL fc9edf81133a4222bb2840bfa1515ad1ac0f083eaa9b6b258c70e17228713c03518c5c47d79c0f91287c21ccfe014d82aa7f471a76338520a44a4347ba6bc677
+DIST websocket-common-9.2.13.v20150730.jar 179844 SHA256 861d99ac74d5f6a8ccf22e0c060c6eb0a0142e6327149ff298a7452b66ea5db6 SHA512 934a326b09889e26d028c19a8590f26d7e1f99f936560f929ec140a6075612b5a05340270aa07032f0b232449f6bef4793ee39aa00482c208aaf9b09155c906c WHIRLPOOL 1db2fd80a65068fa81dbb1b8ebb1e6071017e77eb82ce25c954b51f3f0985122887f970f12714785eb798cf8c379f908ec37d45ebe661de1a2d7fe396ccbeccf
+DIST websocket-common-9.2.13.v20150730.pom 2648 SHA256 72c342a0a5f451b4a2631dd0d50d61b51cf6543658019996af5378dd0b568d06 SHA512 4442eac343727e6643b5c270361515fe683faab15b440582107e83b53ec1ff909b0337efeb48ef0dcfc569d8a3b4bea34a76e4484700c3df89d559703717c519 WHIRLPOOL f56ea135c6de89fb9358e31c10ca83248e6510dcd7aec7ba2fabbe1d1c7783a52483f6fa31127cb86b37668dc366eb9a93456acbb82748f6aaa866708e5b0574
+DIST websocket-parent-9.0.5.v20130815.pom 2590 SHA256 96e4d525d6dc328de44b75d2de434934b9a78507b18669b937b4804491e809ee SHA512 2bf9bf610ba94918fda8adb4ca13950f6a40658276387d6937857bccfc55b3a6b399d11fb63ae638be6c2a032dbebf05d13f42cb4d6c1bf6f116fcc4a1303c28 WHIRLPOOL 4901c0c8e66f7fef04236edfe3dcba0c03ff86d207fcd85d6a05b6a6c7017709209be7dc76d4dbaeaa763d89d958ca37fba29dd69c568aac4ba1fb73aa42300a
+DIST websocket-parent-9.2.13.v20150730.pom 3496 SHA256 2361049aaab9327f67da663120232b3b14b83a5615f21177d4f7fbe2169113cc SHA512 c691d69e009039c54657dcad58b010ac1b3e614cf3fddd9527bd3f0c5d879630a13b8d4f5f22b4c7385914e122eca081903f6f9e1360c4bf94097dd38baaa059 WHIRLPOOL 1a88c76b421d490d0ac12777dde25b158baa3d088e4c65e57f966059afc3f55eaf5b516550593407eda1fdb4817a6f1e9462075c851a21119c1f0851dabd93c7
+DIST websocket-server-9.0.5.v20130815.jar 23751 SHA256 1cd7be6d89e36e77b798363d8a1829794f6a28673ddc7abf68bdef04c7ae4c18 SHA512 4cec1e57baee12c7e6266f37133f94d69009e26eac924b345c00496b418ae5e185e362a3f564fef019facc67b91fef7ea0218bc8734c6d2c999c0c07efd61968 WHIRLPOOL ea0c54501d8d610ab097a2d26a2b6d756d0a1ffcf873b5fa72bd610fec269efb852ba365e91325f122c24b295786c5a3fd4336677c5691f598fde2e281b82158
+DIST websocket-server-9.0.5.v20130815.pom 2856 SHA256 794efd865ba7bf4857d7485f78593c87fd5403b0954e5ee277190e32e189e78f SHA512 f5e7451b84b8585d8c1b75bc822e31f3b0ea69bab5a6e6e11ed49ec55f822af103a5af34b9929e28b9d188b713e35c658a74793dd00e3c84616fdf5ef900c751 WHIRLPOOL ba448cbfd6a24d3287a648e66887c85b99ef4bc83e8233ec24d483119f3cc65887e8bb14f7b0510a96d1596f4aaeafaa21e2783dbc231f1855591e4caf5ada3d
+DIST websocket-servlet-9.0.5.v20130815.jar 11254 SHA256 76e32bcecac35b7bd48daebfa253dc432327fac3391d1b90ad510da0b71056ea SHA512 e75eb30b6da51e5a4edb84a65ede2c7ba55f5e16a986e556c7495ee172826bde53320852fd63a69ba8523d024c783203c485b7f61f8258e4de01cb26e9c01eb2 WHIRLPOOL 32ce4466c3c0cea2dd0fe28db272f4dc455d67302d727b3fe9f8c3d7f68fe6784fbce525a1f4adf366d2d7ce92a96a3c4a872f8db50ff238f69d19d7a69e58d8
+DIST websocket-servlet-9.0.5.v20130815.pom 1304 SHA256 877be1e85c1a7eb236e6ddc71f44e18e4a0f8968e5ad699b3e637bbda330d4cf SHA512 b03e74297007e11452ba0b19b5105d44e4100529f50df71b2ac57f9bdbd0ad8c3bd5b29d7121ca07452ec34e8757844cc0f349a80343efbb83c34943599d0bfb WHIRLPOOL e8a47083911278a5e1d28ee28fc308f8729e393a61ebbd6e2d2f658c5ca54c976e03015d0632d62fe22f44586cd5cbf83a252b6bbf7ecd4b209d83a6e18a738c
+DIST xalan-2.7.2.jar 3154938 SHA256 a44bd80e82cb0f4cfac0dac8575746223802514e3cec9dc75235bc0de646af14 SHA512 00f859c5bd65f6dc91e396ce91fe2f6d30b2354d6b419cd9ea96984c5403e5cd1342bb9362b0ae1f2792612f0df731c4f7ac92f16a825bb7e22089c27a129c6c WHIRLPOOL 76564f8718670ce06056e5e214ddc333bf305c150c46ae83ad5a3029303d72556473a377a969eaf2b1107b76464363c441fe8421fd3385767dd34ede04e91000
+DIST xalan-2.7.2.pom 1277 SHA256 47e04c9456485a9cd106fe6e722097efb5c65954392a5cb095b8686cd094d292 SHA512 4b95e3eb3a2ab262c9a27040a5214cfb8c49c36ece8e71a933074eb063205ef96deff351f017b034c9c97d43d77b020482aade7bc01e1245d8ee10a51269c5ce WHIRLPOOL 8570ea152576ada230f5ee750f42969d7b1b393caee01ea28a3fcfe1235d23bf139aaa3b840fb8587573bf83de813c7192dde879ba3228d6ac7730cbba7e87e4
+DIST xercesImpl-2.11.0.jar 1367760 SHA256 175bbbd9def7a22a30e05f9c8db629c88fa5bdfc57d5658791901b54222abe1c SHA512 3a527c420ed28a4b6aeab2c9f8b456b9b02edacfeebcee4056257bf02341cecadc89d394fce6f9487b457f6b795cdb626882ed4cf39c1049782909ff291494e5 WHIRLPOOL 1e26538cfb67a91438fa19f41a09e5bec4a1d8322e226f9134139eda137f625b7db4513f0fa643a964ceb06841f5217d7e069178543e1c5cfeb50a7be2c9d855
+DIST xercesImpl-2.11.0.pom 3392 SHA256 33e6b2d75a5786b2c2233531cc39a46461fb420a6a94e806cc35ac669182c418 SHA512 8386161183818577aedbd136fd3c575d011d67b72aafc8e94adc54d969c12f0bb3a6b59698b776b112d76678c26dbd01541f6853b1c2e2a637330afed9affed5 WHIRLPOOL b990fa3a960fb717e09af23091f2f931e6964a2f38080d88f24a6ef7ffddc9918a4b4c4d267a554b76df9330198481da517d7c97c727f09adfe495ea2dd7f332
+DIST xml-apis-1.3.04.jar 194354 SHA256 d404aa881eb9c5f7a4fb546e84ea11506cd417a72b5972e88eff17f43f9f8a64 SHA512 1086a52924add2406e0b4ec7219a8783ac20e02a32a7a2461efbf092f0070501f7cade9c0588907c403352f1a48f80b950e6d40b2e4e3e9eb886e7db4e97bdec WHIRLPOOL 553ebb5bcae1d920b67f92fbba86912e069337e9676cd450441b2de9afb9f422173723339b5a13bda9c5fa3fbccc9d0da0cf049b2a2ad52a60bb71ebe00c8e53
+DIST xml-apis-1.3.04.pom 1822 SHA256 35a1fd49d44b41c616d48ca99097a32efa2b64e1b3739fbac6fbf36e3c3b57b1 SHA512 98efaaedfd6f663dcb7353c1f47dd4f6157c00eabd7f96beb37aad711ba2f380c087f45584757543ac6d566cd0b1f2d955b076dcdf48ffa22a770e3fc5d8e3c0 WHIRLPOOL 97ff960d0531a8899f0cbc6562a477634296ea8f321bc67a7eadfee28cacd1c64e5f9ac9e2a3cf005adc9bbd42f8dac481e01939d9edca56e18cd12e3ea4ae05
+DIST xml-apis-1.4.01.jar 220536 SHA256 a840968176645684bb01aed376e067ab39614885f9eee44abe35a5f20ebe7fad SHA512 8db0283b6840cd6407957d296b802e3edf90653e2722f8e29f86c1c0b60996c4b43e9e065e6864dab89b2138ddb0174d9b4fdda4a93f94eeb884783db82f3268 WHIRLPOOL 0734853ed6fba0336e6348d413381c70dca82b82af0ffd02d013448bdb0fe9dd1aa8d252b39ee351b307d486498f953fc9074185f58fbf5ef96e86218252e620
+DIST xml-apis-1.4.01.pom 2661 SHA256 09a82ff150ac86bfa31145e0a6afd89a02e4504785f5da112e4fae1425020e92 SHA512 814138ba9398f277244281968ff82a3f772425b48a720d401ddfcefdab9becce0e87d3475838e07b5ba23383d2106e36c515f35868643079ebe8a37a4381f990 WHIRLPOOL c31876f2dbd7665d608021dda0300e6ac08dd55ab285bc9c58cc523262754ac6421749a958ea102d3ea60147b7963515169b3334814d540fff6612d76c31fd9f
+DIST zspace-20151207-natives-windows-amd64.jar 100200 SHA256 ec16df6263bc3222cfe1046e742d2759fe71e1df68b890decc4d933f33d20ef5 SHA512 b91f82bfebc0d0796e7738f2baa09cf18a281fbfda8f7daf23bfcd735d9c5a79a506b3b13076477541533306ce077925a77e925e80f386d93b48311a5d1adae0 WHIRLPOOL d2b4da7038853f6df3d163b2259b1f8da0f9c1b544e8c338b0aa77d438d9d87e28cd24c951ddc2899a47fa5d5f97b207dcb04a6a55230cd8e2d141ed56ff261d
+DIST zspace-20151207-natives-windows-i586.jar 93739 SHA256 c2eb4606c847975dcd9e256ac56dc17d2cc9b67346b4c8ae5de383048c7ae082 SHA512 f8510a0c063f3dcb7bc0e9691c52c8d679b426b83a2a42486c26bff491622153fdadb1a200c48348ad83bb791a90ee0583fc62cd7a1ea095ac747fbd8124c02d WHIRLPOOL e974f678b834ed96acc1ea2443486a60375d02b3293aa92ac9de8aa192dd9d55d3f49bacc966d1f8e1cbec1f22cec1632a24216be3c13adfc2fc30454240c07b
+DIST zspace-20151207.jar 50355 SHA256 b2dba979dfed00dbf2d65d4f3e75cbefd8fef9d98101f981b8afbc6107fbd16d SHA512 fceaefe001696eba60d4554d8a240be80695b34e0bcdc9743ef3342fbaac5383edd7200326d9ba2802adec709eef2e0ec5f99d46016e620507bc670148c482e7 WHIRLPOOL 40de5fe02127f2220e63354b66e05dbd2995326c21e34f6f0c6d6b61e7cc12390d6a2044c1ac0c6c851be48452d95d51f064eab1c5bddd20b916ab545bd06315
+DIST zspace-20151207.pom 463 SHA256 7a5220430afed3d1dbc52f6f219a2367b0e00692616ccdb76e466079167fba46 SHA512 b9d72979ffcd959ec03b20aacdb0b2c0fc64e7c9e35d548ba7a81e7219efc3e1dcbd0b5d209ba1ede345933f28dd32649f8fcf4c909e2dd920b532db174ec05d WHIRLPOOL 6db108439f2174072fa7c900a9e47f0224692a293972a075e470d188f1e37cc7c2c4e84d3f962ddad37a3542f5a5ac904c032be1e38e67489a614652f070e0c1
+EBUILD geogebra-5.0.339.0_p20170308.ebuild 23768 SHA256 78af562f9b9c6d03815d979fab29a113c15a2a4cd06debf9f0d2e9bde09aa26f SHA512 024034a30d08c406c710a23d496f8b57c4900e46275abd83b340307faac27c7b38335bda118d6ed1e14269195d84e90496d3ae5159cd86fb4ed7d0435aa6fa59 WHIRLPOOL 58f194978e0234b599762ad5880290270268a9c0ae11f01c66d287362f44002dd9529bbbdac4d890410ec9f766f70aa52a6ca14d2ff7564d605ad63a5ab87c13
+MISC ChangeLog 2234 SHA256 7100acacfb95b0b8dd9fd49579580b73f4eb3fc61136d08982fbf210c57e0b50 SHA512 f69c943a627d1c5e42f0b20146b922b92aa6623cc4ba34709dcea56dfc31e88049509fe33742a246cad8298229efa3031afb54c374b0444f5666acd1ace81712 WHIRLPOOL fb650003368b3c410019e891675ced9fbff494b1572a0f46bdbdaacd3e1f5373709ce10a8d41f928286aa5757acb2ba8082c83522682c6754420ad9df78a255e
+MISC ChangeLog-2015 427 SHA256 0383eaa945ca8270b2879d1bb2c63769828ea433c6ec62dab1ddc3e064338676 SHA512 1ecb55653796d6633c0e1f43b92d95adaed462a82672364a433f03aa9862ec3b686516cd3e45665ce4eb738465964547c500b085e8b13ec589ea3c8bbd777d55 WHIRLPOOL 537e4bc201948c2d3e8de3685e1dab144ae16a0ab50a2e21cf44b0d501eb09d8d8f1a2d5e263fb351a29189293fcb2f8f9cc3b421425c59c0f27598ad06c9379
+MISC metadata.xml 635 SHA256 22e341034efe6e2daf8c687a4c587e8b600e271068717531e770c6ea0dfff93f SHA512 ded258a66544e18eeb020d40823f044e3fb2b3af06781d854656467ba8fa2400b5353b123b4e0a278b1d6cdf81853a960f2da42a60a7b7b46617463b347c659b WHIRLPOOL 81246568c56b94e59b0bb1a9c3ccf1d7eeefc2fe36d600f281be352389d75c2e83ba32f99a2e6b168739a506df609437cd81ddc66f909f3889cc0d99fdbbb67b
diff --git a/sci-mathematics/geogebra/geogebra-5.0.339.0_p20170308.ebuild b/sci-mathematics/geogebra/geogebra-5.0.339.0_p20170308.ebuild
new file mode 100644
index 000000000000..22c7ea2ca1a6
--- /dev/null
+++ b/sci-mathematics/geogebra/geogebra-5.0.339.0_p20170308.ebuild
@@ -0,0 +1,334 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils gnome2-utils xdg
+
+MY_COMMIT_HASH="7d5ac993d3f88f6701f56edbfe325d86afcaad87"
+
+DESCRIPTION="Mathematics software for geometry"
+HOMEPAGE="https://www.geogebra.org"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${MY_COMMIT_HASH}.tar.gz -> ${P}.tar.gz
+ http://dev.geogebra.org/maven2/com/apple/mac_extensions/20040714/mac_extensions-20040714.jar
+ http://dev.geogebra.org/maven2/com/apple/mac_extensions/20040714/mac_extensions-20040714.pom
+ http://dev.geogebra.org/maven2/com/googlecode/gwtgl/0.9.1/gwtgl-0.9.1.jar
+ http://dev.geogebra.org/maven2/com/googlecode/gwtgl/0.9.1/gwtgl-0.9.1.pom
+ http://dev.geogebra.org/maven2/com/googlecode/gwtgl/0.9.1/gwtgl-0.9.1-sources.jar
+ http://dev.geogebra.org/maven2/com/google/j2objc/annotations/1.0.2/annotations-1.0.2.jar
+ http://dev.geogebra.org/maven2/com/google/j2objc/annotations/1.0.2/annotations-1.0.2.pom
+ http://dev.geogebra.org/maven2/com/jogamp/gluegen-rt/2.2.0/gluegen-rt-2.2.0.jar
+ http://dev.geogebra.org/maven2/com/jogamp/gluegen-rt/2.2.0/gluegen-rt-2.2.0-natives-linux-amd64.jar
+ http://dev.geogebra.org/maven2/com/jogamp/gluegen-rt/2.2.0/gluegen-rt-2.2.0-natives-linux-i586.jar
+ http://dev.geogebra.org/maven2/com/jogamp/gluegen-rt/2.2.0/gluegen-rt-2.2.0-natives-macosx-universal.jar
+ http://dev.geogebra.org/maven2/com/jogamp/gluegen-rt/2.2.0/gluegen-rt-2.2.0-natives-windows-amd64.jar
+ http://dev.geogebra.org/maven2/com/jogamp/gluegen-rt/2.2.0/gluegen-rt-2.2.0-natives-windows-i586.jar
+ http://dev.geogebra.org/maven2/com/jogamp/gluegen-rt/2.2.0/gluegen-rt-2.2.0.pom
+ http://dev.geogebra.org/maven2/com/jogamp/jogl-all/2.2.0/jogl-all-2.2.0.jar
+ http://dev.geogebra.org/maven2/com/jogamp/jogl-all/2.2.0/jogl-all-2.2.0-natives-linux-amd64.jar
+ http://dev.geogebra.org/maven2/com/jogamp/jogl-all/2.2.0/jogl-all-2.2.0-natives-linux-i586.jar
+ http://dev.geogebra.org/maven2/com/jogamp/jogl-all/2.2.0/jogl-all-2.2.0-natives-macosx-universal.jar
+ http://dev.geogebra.org/maven2/com/jogamp/jogl-all/2.2.0/jogl-all-2.2.0-natives-windows-amd64.jar
+ http://dev.geogebra.org/maven2/com/jogamp/jogl-all/2.2.0/jogl-all-2.2.0-natives-windows-i586.jar
+ http://dev.geogebra.org/maven2/com/jogamp/jogl-all/2.2.0/jogl-all-2.2.0.pom
+ http://dev.geogebra.org/maven2/com/ogprover/OpenGeoProver/20120725/OpenGeoProver-20120725.jar
+ http://dev.geogebra.org/maven2/com/ogprover/OpenGeoProver/20120725/OpenGeoProver-20120725.pom
+ http://dev.geogebra.org/maven2/com/sun/jna/4.1.0/jna-4.1.0.jar
+ http://dev.geogebra.org/maven2/com/sun/jna/4.1.0/jna-4.1.0.pom
+ http://dev.geogebra.org/maven2/com/zspace/zspace/20151207/zspace-20151207.jar
+ http://dev.geogebra.org/maven2/com/zspace/zspace/20151207/zspace-20151207-natives-windows-amd64.jar
+ http://dev.geogebra.org/maven2/com/zspace/zspace/20151207/zspace-20151207-natives-windows-i586.jar
+ http://dev.geogebra.org/maven2/com/zspace/zspace/20151207/zspace-20151207.pom
+ http://dev.geogebra.org/maven2/fr/ujf-grenoble/javagiac/52580/javagiac-52580-natives-linux-amd64.jar
+ http://dev.geogebra.org/maven2/fr/ujf-grenoble/javagiac/52580/javagiac-52580-natives-linux-i586.jar
+ http://dev.geogebra.org/maven2/fr/ujf-grenoble/javagiac/52580/javagiac-52580-natives-macosx-universal.jar
+ http://dev.geogebra.org/maven2/fr/ujf-grenoble/javagiac/52580/javagiac-52580-natives-windows-amd64.jar
+ http://dev.geogebra.org/maven2/fr/ujf-grenoble/javagiac/52580/javagiac-52580-natives-windows-i586.jar
+ http://dev.geogebra.org/maven2/fr/ujf-grenoble/javagiac/52580/javagiac-52580.pom
+ http://dev.geogebra.org/maven2/intel/rssdk/libpxcclr/20150901/libpxcclr-20150901.jar
+ http://dev.geogebra.org/maven2/intel/rssdk/libpxcclr/20150901/libpxcclr-20150901-natives-windows-amd64.jar
+ http://dev.geogebra.org/maven2/intel/rssdk/libpxcclr/20150901/libpxcclr-20150901-natives-windows-i586.jar
+ http://dev.geogebra.org/maven2/intel/rssdk/libpxcclr/20150901/libpxcclr-20150901.pom
+ http://dev.geogebra.org/maven2/netscape/javascript/jsobject/1/jsobject-1.jar
+ http://dev.geogebra.org/maven2/netscape/javascript/jsobject/1/jsobject-1.pom
+ https://plugins.gradle.org/m2/ca/coglinc/javacc-gradle-plugin/2.4.0/javacc-gradle-plugin-2.4.0.jar
+ https://plugins.gradle.org/m2/ca/coglinc/javacc-gradle-plugin/2.4.0/javacc-gradle-plugin-2.4.0.pom
+ https://plugins.gradle.org/m2/com/google/guava/guava-jdk5/17.0/guava-jdk5-17.0.jar
+ https://plugins.gradle.org/m2/com/google/guava/guava-jdk5/17.0/guava-jdk5-17.0.pom
+ https://plugins.gradle.org/m2/com/google/guava/guava-parent-jdk5/17.0/guava-parent-jdk5-17.0.pom
+ https://plugins.gradle.org/m2/commons-io/commons-io/2.4/commons-io-2.4.jar
+ https://plugins.gradle.org/m2/commons-io/commons-io/2.4/commons-io-2.4.pom
+ https://plugins.gradle.org/m2/de/richsource/gradle/plugins/gwt-gradle-plugin/0.6/gwt-gradle-plugin-0.6.jar
+ https://plugins.gradle.org/m2/de/richsource/gradle/plugins/gwt-gradle-plugin/0.6/gwt-gradle-plugin-0.6.pom
+ https://plugins.gradle.org/m2/org/apache/apache/16/apache-16.pom
+ https://plugins.gradle.org/m2/org/apache/apache/9/apache-9.pom
+ https://plugins.gradle.org/m2/org/apache/commons/commons-collections4/4.1/commons-collections4-4.1.jar
+ https://plugins.gradle.org/m2/org/apache/commons/commons-collections4/4.1/commons-collections4-4.1.pom
+ https://plugins.gradle.org/m2/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar
+ https://plugins.gradle.org/m2/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.pom
+ https://plugins.gradle.org/m2/org/apache/commons/commons-parent/25/commons-parent-25.pom
+ https://plugins.gradle.org/m2/org/apache/commons/commons-parent/37/commons-parent-37.pom
+ https://plugins.gradle.org/m2/org/apache/commons/commons-parent/38/commons-parent-38.pom
+ https://plugins.gradle.org/m2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
+ https://repo1.maven.org/maven2/ant/ant/1.6.5/ant-1.6.5.jar
+ https://repo1.maven.org/maven2/ant/ant/1.6.5/ant-1.6.5.pom
+ https://repo1.maven.org/maven2/colt/colt/1.2.0/colt-1.2.0.jar
+ https://repo1.maven.org/maven2/colt/colt/1.2.0/colt-1.2.0.pom
+ https://repo1.maven.org/maven2/com/asual/lesscss/lesscss-engine/1.3.0/lesscss-engine-1.3.0.jar
+ https://repo1.maven.org/maven2/com/asual/lesscss/lesscss-engine/1.3.0/lesscss-engine-1.3.0.pom
+ https://repo1.maven.org/maven2/com/google/code/findbugs/annotations/3.0.1/annotations-3.0.1.jar
+ https://repo1.maven.org/maven2/com/google/code/findbugs/annotations/3.0.1/annotations-3.0.1.pom
+ https://repo1.maven.org/maven2/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar
+ https://repo1.maven.org/maven2/com/google/code/gson/gson/2.6.2/gson-2.6.2.pom
+ https://repo1.maven.org/maven2/com/google/code/gson/gson-parent/2.6.2/gson-parent-2.6.2.pom
+ https://repo1.maven.org/maven2/com/googlecode/gwtphonegap/gwtphonegap/3.5.0.1/gwtphonegap-3.5.0.1.jar
+ https://repo1.maven.org/maven2/com/googlecode/gwtphonegap/gwtphonegap/3.5.0.1/gwtphonegap-3.5.0.1.pom
+ https://repo1.maven.org/maven2/com/google/gwt/gwt/2.8.0/gwt-2.8.0.pom
+ https://repo1.maven.org/maven2/com/google/gwt/gwt-dev/2.8.0/gwt-dev-2.8.0.jar
+ https://repo1.maven.org/maven2/com/google/gwt/gwt-dev/2.8.0/gwt-dev-2.8.0.pom
+ https://repo1.maven.org/maven2/com/google/gwt/gwt-servlet/2.8.0/gwt-servlet-2.8.0.jar
+ https://repo1.maven.org/maven2/com/google/gwt/gwt-servlet/2.8.0/gwt-servlet-2.8.0.pom
+ https://repo1.maven.org/maven2/com/google/gwt/gwt-user/2.8.0/gwt-user-2.8.0.jar
+ https://repo1.maven.org/maven2/com/google/gwt/gwt-user/2.8.0/gwt-user-2.8.0.pom
+ https://repo1.maven.org/maven2/com/google/jsinterop/jsinterop/1.0.1/jsinterop-1.0.1.pom
+ https://repo1.maven.org/maven2/com/google/jsinterop/jsinterop-annotations/1.0.1/jsinterop-annotations-1.0.1.jar
+ https://repo1.maven.org/maven2/com/google/jsinterop/jsinterop-annotations/1.0.1/jsinterop-annotations-1.0.1.pom
+ https://repo1.maven.org/maven2/com/google/jsinterop/jsinterop-annotations/1.0.1/jsinterop-annotations-1.0.1-sources.jar
+ https://repo1.maven.org/maven2/com/google/web/bindery/requestfactory/2.8.0/requestfactory-2.8.0.pom
+ https://repo1.maven.org/maven2/com/ibm/icu/icu4j/50.1.1/icu4j-50.1.1.jar
+ https://repo1.maven.org/maven2/com/ibm/icu/icu4j/50.1.1/icu4j-50.1.1.pom
+ https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.jar
+ https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.pom
+ https://repo1.maven.org/maven2/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar
+ https://repo1.maven.org/maven2/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.pom
+ https://repo1.maven.org/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.jar
+ https://repo1.maven.org/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.pom
+ https://repo1.maven.org/maven2/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar
+ https://repo1.maven.org/maven2/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.pom
+ https://repo1.maven.org/maven2/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar
+ https://repo1.maven.org/maven2/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.pom
+ https://repo1.maven.org/maven2/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar
+ https://repo1.maven.org/maven2/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.pom
+ https://repo1.maven.org/maven2/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA-sources.jar
+ https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/6.1.2/javacc-6.1.2.jar
+ https://repo1.maven.org/maven2/net/java/dev/javacc/javacc/6.1.2/javacc-6.1.2.pom
+ https://repo1.maven.org/maven2/net/java/jvnet-parent/3/jvnet-parent-3.pom
+ https://repo1.maven.org/maven2/net/sourceforge/cssparser/cssparser/0.9.18/cssparser-0.9.18.jar
+ https://repo1.maven.org/maven2/net/sourceforge/cssparser/cssparser/0.9.18/cssparser-0.9.18.pom
+ https://repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit/2.19/htmlunit-2.19.jar
+ https://repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit/2.19/htmlunit-2.19.pom
+ https://repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.17/htmlunit-core-js-2.17.jar
+ https://repo1.maven.org/maven2/net/sourceforge/htmlunit/htmlunit-core-js/2.17/htmlunit-core-js-2.17.pom
+ https://repo1.maven.org/maven2/net/sourceforge/nekohtml/nekohtml/1.9.22/nekohtml-1.9.22.jar
+ https://repo1.maven.org/maven2/net/sourceforge/nekohtml/nekohtml/1.9.22/nekohtml-1.9.22.pom
+ https://repo1.maven.org/maven2/org/apache/apache/13/apache-13.pom
+ https://repo1.maven.org/maven2/org/apache/apache/15/apache-15.pom
+ https://repo1.maven.org/maven2/org/apache/apache/3/apache-3.pom
+ https://repo1.maven.org/maven2/org/apache/apache/4/apache-4.pom
+ https://repo1.maven.org/maven2/org/apache/commons/commons-parent/34/commons-parent-34.pom
+ https://repo1.maven.org/maven2/org/apache/commons/commons-parent/35/commons-parent-35.pom
+ https://repo1.maven.org/maven2/org/apache/commons/commons-parent/39/commons-parent-39.pom
+ https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1.jar
+ https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1.pom
+ https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.5.1/httpcomponents-client-4.5.1.pom
+ https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.4.3/httpcomponents-core-4.4.3.pom
+ https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.3/httpcore-4.4.3.jar
+ https://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.3/httpcore-4.4.3.pom
+ https://repo1.maven.org/maven2/org/apache/httpcomponents/httpmime/4.5.1/httpmime-4.5.1.jar
+ https://repo1.maven.org/maven2/org/apache/httpcomponents/httpmime/4.5.1/httpmime-4.5.1.pom
+ https://repo1.maven.org/maven2/org/apache/httpcomponents/project/7/project-7.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/apache-jsp/9.2.14.v20151106/apache-jsp-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/apache-jsp/9.2.14.v20151106/apache-jsp-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-annotations/9.2.14.v20151106/jetty-annotations-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-annotations/9.2.14.v20151106/jetty-annotations-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-continuation/9.2.14.v20151106/jetty-continuation-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-continuation/9.2.14.v20151106/jetty-continuation-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-http/9.0.5.v20130815/jetty-http-9.0.5.v20130815.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-http/9.0.5.v20130815/jetty-http-9.0.5.v20130815.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-http/9.2.14.v20151106/jetty-http-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-http/9.2.14.v20151106/jetty-http-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-io/9.2.14.v20151106/jetty-io-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-io/9.2.14.v20151106/jetty-io-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-io/9.3.0.M2/jetty-io-9.3.0.M2.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-io/9.3.0.M2/jetty-io-9.3.0.M2.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-jndi/9.2.14.v20151106/jetty-jndi-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-jndi/9.2.14.v20151106/jetty-jndi-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-parent/18/jetty-parent-18.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-parent/20/jetty-parent-20.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-parent/22/jetty-parent-22.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-parent/23/jetty-parent-23.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-plus/9.2.14.v20151106/jetty-plus-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-plus/9.2.14.v20151106/jetty-plus-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-project/9.0.5.v20130815/jetty-project-9.0.5.v20130815.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-project/9.2.13.v20150730/jetty-project-9.2.13.v20150730.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-project/9.2.14.v20151106/jetty-project-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-project/9.3.0.M2/jetty-project-9.3.0.M2.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-security/9.2.14.v20151106/jetty-security-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-security/9.2.14.v20151106/jetty-security-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-server/9.2.14.v20151106/jetty-server-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-server/9.2.14.v20151106/jetty-server-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlet/9.2.14.v20151106/jetty-servlet-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlet/9.2.14.v20151106/jetty-servlet-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlets/9.2.14.v20151106/jetty-servlets-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlets/9.2.14.v20151106/jetty-servlets-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-util/9.2.14.v20151106/jetty-util-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-util/9.2.14.v20151106/jetty-util-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-util/9.3.0.M2/jetty-util-9.3.0.M2.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-util/9.3.0.M2/jetty-util-9.3.0.M2.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-webapp/9.2.14.v20151106/jetty-webapp-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-webapp/9.2.14.v20151106/jetty-webapp-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-xml/9.2.14.v20151106/jetty-xml-9.2.14.v20151106.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-xml/9.2.14.v20151106/jetty-xml-9.2.14.v20151106.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/toolchain/jetty-schemas/3.1.M0/jetty-schemas-3.1.M0.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/toolchain/jetty-schemas/3.1.M0/jetty-schemas-3.1.M0.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/toolchain/jetty-toolchain/1.4/jetty-toolchain-1.4.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-api/9.0.5.v20130815/websocket-api-9.0.5.v20130815.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-api/9.0.5.v20130815/websocket-api-9.0.5.v20130815.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-api/9.2.13.v20150730/websocket-api-9.2.13.v20150730.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-api/9.2.13.v20150730/websocket-api-9.2.13.v20150730.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-client/9.0.5.v20130815/websocket-client-9.0.5.v20130815.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-client/9.0.5.v20130815/websocket-client-9.0.5.v20130815.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-client/9.2.13.v20150730/websocket-client-9.2.13.v20150730.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-client/9.2.13.v20150730/websocket-client-9.2.13.v20150730.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-common/9.0.5.v20130815/websocket-common-9.0.5.v20130815.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-common/9.0.5.v20130815/websocket-common-9.0.5.v20130815.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-common/9.2.13.v20150730/websocket-common-9.2.13.v20150730.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-common/9.2.13.v20150730/websocket-common-9.2.13.v20150730.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-parent/9.0.5.v20130815/websocket-parent-9.0.5.v20130815.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-parent/9.2.13.v20150730/websocket-parent-9.2.13.v20150730.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-server/9.0.5.v20130815/websocket-server-9.0.5.v20130815.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-server/9.0.5.v20130815/websocket-server-9.0.5.v20130815.pom
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-servlet/9.0.5.v20130815/websocket-servlet-9.0.5.v20130815.jar
+ https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-servlet/9.0.5.v20130815/websocket-servlet-9.0.5.v20130815.pom
+ https://repo1.maven.org/maven2/org/mortbay/jasper/apache-el/8.0.9.M3/apache-el-8.0.9.M3.jar
+ https://repo1.maven.org/maven2/org/mortbay/jasper/apache-el/8.0.9.M3/apache-el-8.0.9.M3.pom
+ https://repo1.maven.org/maven2/org/mortbay/jasper/apache-jsp/8.0.9.M3/apache-jsp-8.0.9.M3.jar
+ https://repo1.maven.org/maven2/org/mortbay/jasper/apache-jsp/8.0.9.M3/apache-jsp-8.0.9.M3.pom
+ https://repo1.maven.org/maven2/org/mortbay/jasper/jasper-jsp/8.0.9.M3/jasper-jsp-8.0.9.M3.pom
+ https://repo1.maven.org/maven2/org/mozilla/rhino/1.7R3/rhino-1.7R3.jar
+ https://repo1.maven.org/maven2/org/mozilla/rhino/1.7R3/rhino-1.7R3.pom
+ https://repo1.maven.org/maven2/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar
+ https://repo1.maven.org/maven2/org/ow2/asm/asm/5.0.3/asm-5.0.3.pom
+ https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar
+ https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.pom
+ https://repo1.maven.org/maven2/org/ow2/asm/asm-parent/5.0.3/asm-parent-5.0.3.pom
+ https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar
+ https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.pom
+ https://repo1.maven.org/maven2/org/ow2/asm/asm-util/5.0.3/asm-util-5.0.3.jar
+ https://repo1.maven.org/maven2/org/ow2/asm/asm-util/5.0.3/asm-util-5.0.3.pom
+ https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom
+ https://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/4/oss-parent-4.pom
+ https://repo1.maven.org/maven2/org/w3c/css/sac/1.3/sac-1.3.jar
+ https://repo1.maven.org/maven2/org/w3c/css/sac/1.3/sac-1.3.pom
+ https://repo1.maven.org/maven2/tapestry/tapestry/4.0.2/tapestry-4.0.2.jar
+ https://repo1.maven.org/maven2/tapestry/tapestry/4.0.2/tapestry-4.0.2.pom
+ https://repo1.maven.org/maven2/xalan/serializer/2.7.2/serializer-2.7.2.jar
+ https://repo1.maven.org/maven2/xalan/serializer/2.7.2/serializer-2.7.2.pom
+ https://repo1.maven.org/maven2/xalan/xalan/2.7.2/xalan-2.7.2.jar
+ https://repo1.maven.org/maven2/xalan/xalan/2.7.2/xalan-2.7.2.pom
+ https://repo1.maven.org/maven2/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar
+ https://repo1.maven.org/maven2/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.pom
+ https://repo1.maven.org/maven2/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.jar
+ https://repo1.maven.org/maven2/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04.pom
+ https://repo1.maven.org/maven2/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar
+ https://repo1.maven.org/maven2/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.pom
+"
+
+LICENSE="Geogebra CC-BY-NC-SA-3.0 GPL-3 Apache-2.0 BSD-2 BSD BSD-4 colt EPL-1.0 icu LGPL-2.1 LGPL-2.1+ MIT W3C || ( GPL-2 CDDL )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RESTRICT="bindist"
+DEPEND="dev-java/oracle-jdk-bin[javafx]
+ >=dev-java/gradle-bin-3.0"
+# Requires oracle-jdk/jre-bin because there is no openjfx ebuild as of now
+RDEPEND="|| (
+ dev-java/oracle-jre-bin[javafx]
+ dev-java/oracle-jdk-bin[javafx]
+ )"
+
+S="${WORKDIR}/${PN}-${MY_COMMIT_HASH}/"
+
+# Override the repositories with our local maven repository
+# so that it doesn't attemp to fetch from the network
+__set_gradle_repositories() {
+ cat > "${S}/gradle-scripts/repositories.gradle" <<-EOF || die
+ allprojects {
+ buildscript {
+ repositories {
+ maven { url "${1}" }
+ }
+ }
+
+ repositories {
+ maven { url "${1}" }
+ }
+ }
+EOF
+}
+
+# Create a maven repository layout and
+# populate using the required pom and jar files
+__create_maven_repository() {
+ local maven_basedir="${1}"
+ local f
+ local d
+ local s
+
+ mkdir -p "${maven_basedir}" || die
+ for s in ${SRC_URI}; do
+ # This regex is very specific for SRC_URI instead of a generic URI regex
+ if [[ ${s} =~ (http|https)://[a-zA-Z0-9.-_]*/(maven2|m2)/(.*[.]jar|.*[.]pom)$ ]]; then
+ f=$(basename "${BASH_REMATCH[-1]}")
+ d=$(dirname "${BASH_REMATCH[-1]}")
+
+ mkdir -p "${maven_basedir}"/"${d}" || die
+ cp "${DISTDIR}/${f}" "${maven_basedir}/${d}/" || die
+ fi
+ done
+}
+
+src_unpack() {
+ local maven_basedir="${T}/m2"
+
+ unpack "${P}.tar.gz"
+
+ __create_maven_repository "${maven_basedir}"
+ __set_gradle_repositories "${maven_basedir}"
+}
+
+src_compile() {
+ local gradle_home="${T}/.gradle"
+
+ gradle -g "${gradle_home}" --no-daemon --offline \
+ :desktop:installDist || die "Gradle build has failed."
+}
+
+src_install() {
+ local destdir="/opt/${PN}"
+
+ insinto "${destdir}"
+ doins -r desktop/build/install/desktop/lib/
+
+ exeinto "${destdir}"/bin
+ doexe desktop/build/install/desktop/bin/desktop
+ dosym "${destdir}"/bin/desktop /usr/bin/geogebra
+
+ make_desktop_entry geogebra Geogebra "geogebra" Science
+}
+
+pkg_preinst() {
+ xdg_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_pkg_postrm
+ gnome2_icon_cache_update
+}
diff --git a/sci-mathematics/geogebra/metadata.xml b/sci-mathematics/geogebra/metadata.xml
new file mode 100644
index 000000000000..5087bdcd1f42
--- /dev/null
+++ b/sci-mathematics/geogebra/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="person">
+ <email>amynka@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ GeoGebra is interactive mathematics software for learning and teaching mathematics
+ and science from primary school up to university level.
+ Constructions can be made with points, vectors, segments, lines, polygons,
+ conic sections, inequalities, implicit polynomials and functions.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">geogebra/geogebra</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/geomview/Manifest b/sci-mathematics/geomview/Manifest
new file mode 100644
index 000000000000..76fc2ea33d58
--- /dev/null
+++ b/sci-mathematics/geomview/Manifest
@@ -0,0 +1,9 @@
+AUX 50geomview-gentoo.el 231 SHA256 b109acc005929e40cfe416b45ddea7e5c2831fe47648d4164905c587194a58d9 SHA512 c5d1420dedc078cee78870c48556f5470f384f1fd69c4cb4935ff4f59cbf2a9c17ea6e1dcdbf36149fcc4af2f801cc7420f1a1b0df8d96e14b97eb6439e94986 WHIRLPOOL 57c71c097c91f97e87bccd3eda89aabd7f2756e4667d94341b085b36016363072f8044e8db7ab355948835e419e1f42f5c79b0b5e9146fde5fe94d18b972ad4e
+AUX geomview-1.9.5-zlib.patch 1048 SHA256 4011e121f1c7f7396ad4e6b2fed7e88bc6782222c0382f1be1805843d59d8a3c SHA512 f7c15b512425e8c60ff5fe4eea7ab22b4c86633efca3905ac303f0c35f4cce8a6a70841fdc5bc25e861d594d8c25d73214f9b8dfbb4c824524461f52abf530e4 WHIRLPOOL 3b52449ff9655d2196e1baaa1d2c8626d72fe46d559b0ffb8fe078ad34947ed67bd8b2fe73549cb5079ae018a471f180baf2bb765d36ceb9581bed9c8c7aaf8b
+AUX gvcl-mode.el 7416 SHA256 924325cdd45314b7038c02d1afd1620f5884343b7c5fd8a5bc38a42437d9d811 SHA512 b7f834cc5a3187e4a1fe5342a392d22576aee7f76f95493e02512e3055b1f5e349e170405e6b419c06816470167fc3a063f6f6dee934b35ed4f02f5a3e0a0812 WHIRLPOOL b37892d488384bcf64327e60f95fd69a1539913fad28fbcb9837e9c7072ac9647df74482a3d1fa78a87272c49d665ba85875ea0b27f375adaf3cfd51543c7731
+DIST geomview-1.9.5.tar.bz2 4532535 SHA256 6b683735582ac4eab7f2618cf924c1244de58dd3ef195d06442aaea54cd9fb40 SHA512 a22bcd254e1e4c5c6797811f315d158f84fe82a3f95646bfdf3be203e9cd7fc8cacbf26f55a0a08bcb47cf2b2ad17ae4b48cdc4d78f810f48dab9fa1c7d56e7f WHIRLPOOL f89188ba357f814408fd8523ec416aab6052c1fb110110547e3e48a6c2d4bd8aa3d14f9d4995173e38714fa69156940950e2e4266d34685159d6ad35279b67f1
+DIST geomview.png.tar 10240 SHA256 cf1f5b94d868d363fa6f251343b1426cc7e9ed36ed8ee1fea4339ccabcba33cb SHA512 3abdc04f04410a50876af6b0f1aefc6891c47926ca9e5a4a31bd001310972996497f4e6c33db059fdbca09b236b7763e5476d75427e653d54861b4b3a4e54f51 WHIRLPOOL fecc6989bbef303b379673a503c322db1c8bbe61c346bc3dee984319eb29537985f2696c5a716e94398eb873fd6ed77a06e2462b615d7d4f22bad0bb033765a3
+EBUILD geomview-1.9.5-r1.ebuild 1468 SHA256 c872b72e269f01568505ab33e1b23a2ac3d5759887c3600d4165c409c01b85d8 SHA512 55b235a90a28d8061577ac022c4564148b6e8ee8568bc633bc51cdf45aa688c4f2206cccbddf75bb1c0ecbec497154001b56e45d43408280a696592015c9fc15 WHIRLPOOL a323b1fa960c50e610df91efd36be0d2151989bef4f1ab3ef50647c6239df880792eb736dca89cfe1bf1f8f1a2953bcb46802613efecf56d2474f12cd1687c38
+MISC ChangeLog 2794 SHA256 af927307168ff579f4887387e57c4343ae36111a0e6d55ff16600188521ecafa SHA512 0d1d1436946c840f69868798fe18ee9c1b304b06c7f022e38dabc4c868bb95a5986567a12c9c56179dd853668ac88d2bc5bceb3a00b9fbc0710f38c582cd086b WHIRLPOOL dbe18caaaa605f767688f57c5628bf0b6337c95eeae1320299daa4695604e7758b46006be1426c4116e942241efe1f1fc9a8b6d38d4c539a3363b394e5b98eb0
+MISC ChangeLog-2015 4458 SHA256 64f5104035ec767952d370e0e7d19827a4aa2761185f262c08a66538ada0313d SHA512 661e30da88f025511c267dea0b7a1077e732e0e015d46879e51b556a674211c761ae44b04a97d6ac022b0c87bbe8e1c2079d2890b3ffa24ebaef821ad9244300 WHIRLPOOL f908127a69392b264880b9e1c581b848a32bb92a5400995456c1f003f8af6fbe476dd98740e63ea2941cbfd8f81f1c8a1c32f01becaf2c8c727663bfa1bd6ae6
+MISC metadata.xml 571 SHA256 7e7a2cc2663bcc08af4c5bc7d497bc2287dbe57aa8fd0c5632616f6a68df1b6e SHA512 80840d70575485e2e4358734df0468566ad42f7768273640291a646b4261ae51823f682ad0e6582954502fcc1c69622d473abee45275a4907f6b30fc91c94d48 WHIRLPOOL bca94423c9fed43ddabfa2e0db70bcc733fd5d262abcbf34a71a9a9a96013fa36ab52fcfb198e24dd7553f6c8d836ddc5fc499ae4b9c395163a027f6abb3d229
diff --git a/sci-mathematics/geomview/files/50geomview-gentoo.el b/sci-mathematics/geomview/files/50geomview-gentoo.el
new file mode 100644
index 000000000000..2e078ec06c38
--- /dev/null
+++ b/sci-mathematics/geomview/files/50geomview-gentoo.el
@@ -0,0 +1,7 @@
+
+;;; geomview site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'gvcl-mode "gvcl-mode"
+ "Major mode for editing Geomview Command Language files." t)
+(add-to-list 'auto-mode-alist '("\\.gcl\\'" . gvcl-mode))
diff --git a/sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch b/sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch
new file mode 100644
index 000000000000..5d4b16a0867a
--- /dev/null
+++ b/sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch
@@ -0,0 +1,34 @@
+Upstream diff to fix missing declarations with --without-zlib:
+* image.c:1028:34: error: 'gzip_data_pipe' undeclared here (not in a function)
+* { decompressors+1, "gzip -dc", gzip_data_pipe, { "z", "gz", "gzip", NULL } },
+* ^~~~~~~~~~~~~~
+See also: https://bugs.gentoo.org/show_bug.cgi?id=596414
+
+--- a/src/lib/shade/image.c
++++ b/src/lib/shade/image.c
+@@ -36,6 +36,8 @@
+
+ #ifndef HAVE_LIBZ
+ # define HAVE_LIBZ 0
++#elif HAVE_LIBZ
++# define HAVE_LIBZ 1
+ #endif
+
+ #if HAVE_LIBZ
+@@ -1025,9 +1027,15 @@
+ };
+
+ static struct filter decompressors[] = {
++#if HAVE_LIBZ
+ { decompressors+1, "gzip -dc", gzip_data_pipe, { "z", "gz", "gzip", NULL } },
+- { decompressors+2, "bzip2 -dc", NULL, { "bz2", "bzip2", NULL } },
++#else
++ { decompressors+1, "gzip -dc", NULL, { "z", "gz", "gzip", NULL } },
++#endif
++ { HAVE_LIBZ ? decompressors+2 : NULL, "bzip2 -dc", NULL, { "bz2", "bzip2", NULL } },
++#if HAVE_LIBZ
+ { NULL, NULL, zlib_data_pipe, { "zlib", NULL } },
++#endif
+ };
+
+ static struct filter converters[] = {
diff --git a/sci-mathematics/geomview/files/gvcl-mode.el b/sci-mathematics/geomview/files/gvcl-mode.el
new file mode 100644
index 000000000000..cbfadafc205f
--- /dev/null
+++ b/sci-mathematics/geomview/files/gvcl-mode.el
@@ -0,0 +1,172 @@
+;;; gvcl-mode.el --- A major mode for editing Geomview Command Language files
+
+;; Copyright (C) 2007 Claus-Justus Heine
+
+;; Author: Claus-Justus Heine
+;; Keywords: extensions
+
+;; This file 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 2, or (at your option)
+;; any later version.
+
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; Writing an Emacs major mode is really a non-trivial task. This file
+;; really covers only some basic things (comment-start,
+;; syntax-highlighting, crude indentation support).
+
+;;; Code:
+
+;; Setup
+
+;;First, we define some variables that all modes should
+;;define. gvlisp-mode-hook allows the user to run their own code when
+;;your mode is run
+
+(defvar gvcl-mode-hook nil)
+
+(defvar gvcl-indent-offset 2 "Incremental indentation offset.")
+
+;;Now we create a keymap. This map, here called gvcl-mode-map, allows
+;;both you and users to define their own keymaps. The keymap is
+;;immediately set to a default keymap. Then, using define-key, we
+;;insert an example keybinding into the keymap, which maps the
+;;newline-and-indent function to Control-j (which is actually the
+;;default binding for this function, but is included anyway as an
+;;example). Of course, you may define as many keybindings as you wish.
+;;
+;;If your keymap will have very few entries, then you may want to
+;;consider make-sparse-keymap rather than make-keymap
+(defvar gvcl-mode-map
+ (let ((gvcl-mode-map (make-keymap)))
+ (define-key gvcl-mode-map "\C-j" 'newline-and-indent)
+ gvcl-mode-map)
+ "Keymap for Geomview Command Language major mode.")
+
+;;Here, we append a definition to auto-mode-alist. This tells emacs
+;;that when a buffer with a name ending with .wpd is opened, then
+;;gvcl-mode should be started in that buffer. Some modes leave this
+;;step to the user.
+(add-to-list 'auto-mode-alist '("\\.gcl\\'" . gvcl-mode))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Syntax highlighting using keywords
+
+(defconst gvcl-font-lock-keywords-1
+ (list
+ '("(\\s-*\\(redraw\\|process-events\\|interest\\|time-interests\\|and\\|sleep-\\(for\\|until\\)\\|or\\|hdefine\\|geometry\\|quote\\|eval\\|if\\|while\\|setq\\|echo\\|let\\|exit\\|quit\\|lambda\\|defun\\|progn\\|backcolor\\|read\\|camera\\|new-geometry\\|car\\|cdr\\|cons\\|emodule\\S-*\\|ui-\\S-+\\|normalization\\)\\>" . font-lock-builtin-face)
+ '("\\(\"\\w*\"\\)" . font-lock-variable-name-face))
+ "Minimal highlighting expressions for GVCL mode.")
+
+(defconst gvcl-font-lock-keywords-2
+ (append gvcl-font-lock-keywords-1
+ (list
+ '("\\<\\(\\(location\\|origin\\)\\s-+\\(camera\\|local\\|global\\|ndc\\|screen\\)\\)\\>" . font-lock-constant-face)
+ '("\\<\\(define\\|geom\\(etry\\)?\\|camera\\|window\\|inertia\\|allgeoms\\|focus-change\\)\\>" . font-lock-keyword-face)))
+ "Additional Keywords to highlight in GVCL mode.")
+
+(defconst gvcl-font-lock-keywords-3
+ (append gvcl-font-lock-keywords-2
+ (list
+ '("\\<\\(INST\\|T?LIST\\|\\(ST\\)?Z?u?v?C?N?U?4?n?\\(OFF\\|MESH\\|SKEL\\|VECT\\|QUAD\\|BEZ\\|BBP\\|BBOX\\|SPHERE\\|GROUP\\|DISCGRP\\|COMMENT\\)\\)\\>" . font-lock-type-face)
+ ;; more OOGL keywords
+ '("\\<\\(SINUSOIDAL\\|CYLINDRICAL\\|RECTANGULAR\\|STEREOGRAPHIC\\|ONEFACE\\)\\>" . font-lock-keyword-face)
+ ;; apperance constants
+ '("\\<\\(blend\\|modulate\\|replace\\|decal\\|replacelights\\|face\\|edge\\|vect\\|transparent\\|normal\\|normscale\\|evert\\|texturing\\|mipmap\\|linear\\|mipinterp\\|backcull\\|concave\\|shadelines\\|keepcolor\\|smooth\\|flat\\|constant\\|csmooth\\|vcflat\\|replacelights\\|clamp\\s-+\\(s\\|t\\|st\\|none\\)\\)\\>" . font-lock-constant-face)
+ ;; image constants
+ '("\\<\\(RGB\\|RGBA\\|ALPHA\\|LUMINANCE\\|LUMINANCE_ALPHA\\)\\>" . font-lock-constant-face)
+ ;; image keywords
+ '("\\<\\(inertia\\|width\\|height\\|channels\\|maxval\\|data\\)\\>" . font-lock-keyword-face)
+ ;; apperance keywords
+ '("\\<\\(apply\\|shading\\|localviewer\\|attenconst\\|attenmult2?\\|normscale\\|shading\\|linewidth\\|patchdice\\|ka\\|ambient\\|kd\\|diffuse\\|ks\\|specular\\|shininess\\|backdiffuse\\|alpha\\|edgecolor\\|normalcolor\\|color\\|position\\|file\\|alphafile\\|background\\|texturing\\)\\>" . font-lock-keyword-face)
+ ;; some more types
+ '("\\<\\(texture\\|light\\|material\\|lighting\\|light\\|image\\|appearance\\|n?transforms?\\|tlist\\)\\>" . font-lock-type-face)
+ ;; some more constants
+ '("\\<\\(yes\\|no\\|on\\|off\\|toggle\\|center\\|none\\)\\>" . font-lock-constant-face)
+ ))
+ "Balls-out highlighting in GVCL mode.")
+
+;;I've now defined more GVCL constants. This completes the list of
+;;GVCL keywords.
+
+(defvar gvcl-font-lock-keywords gvcl-font-lock-keywords-3
+ "Default highlighting expressions for GVCL mode.")
+
+;;Here I've defined the default level of highlighting to be the
+;;maximum. This is just my preference\u2014 the user can change this
+;;variable (if the user knows how! This might be something to put in
+;;the documentation for your own mode).
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Indentation
+
+(defun gvcl-indent-line ()
+ "Indent current line as GVCL code."
+ (interactive)
+;; (beginning-of-line)
+ (let ((savep (> (current-column) (current-indentation)))
+ (indent (condition-case nil (max (gvcl-calculate-indentation) 0)
+ (error 0))))
+ (if savep
+ (save-excursion (indent-line-to indent))
+ (indent-line-to indent))))
+
+(defun gvcl-calculate-indentation ()
+ "Return the column to which the current line should be indented."
+ (save-excursion
+ (beginning-of-line)
+ (if (< (point) 2)
+ 0
+ (skip-chars-forward " \t")
+ (let ((indent-above (if (eq (char-syntax (following-char)) ?\) )
+ 0
+ gvcl-indent-offset)))
+ (up-list -1)
+ (+ (current-indentation) indent-above)))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; The syntax table
+
+(defvar gvcl-mode-syntax-table
+ (let ((st (make-syntax-table)))
+ (modify-syntax-entry ?_ "w" st)
+ (modify-syntax-entry ?# "<" st)
+ (modify-syntax-entry ?\n ">" st)
+ (modify-syntax-entry ?{ "(}" st)
+ (modify-syntax-entry ?} "){" st)
+ (modify-syntax-entry ?( "()" st)
+ (modify-syntax-entry ?) ")(" st)
+ st)
+ "Syntax table for `gvcl-mode'.")
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Derive the stuff from fundamental mode
+
+(define-derived-mode gvcl-mode fundamental-mode "GVCL"
+ "Major mode for editing Geomview Command Language files."
+ (set (make-local-variable 'font-lock-defaults) '(gvcl-font-lock-keywords))
+ (set (make-local-variable 'comment-start) "# ")
+ (set (make-local-variable 'comment-start-skip) "#+\\s-*")
+ (set (make-local-variable 'indent-line-function) 'gvcl-indent-line))
+
+
+(provide 'gvcl-mode)
+
+(provide 'gvcl-mode)
+
+;;; gvcl-mode.el ends here
diff --git a/sci-mathematics/geomview/geomview-1.9.5-r1.ebuild b/sci-mathematics/geomview/geomview-1.9.5-r1.ebuild
new file mode 100644
index 000000000000..675a3515f014
--- /dev/null
+++ b/sci-mathematics/geomview/geomview-1.9.5-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit elisp-common eutils fdo-mime flag-o-matic
+
+DESCRIPTION="Interactive Geometry Viewer"
+HOMEPAGE="http://geomview.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
+ https://dev.gentoo.org/~jlec/distfiles/geomview.png.tar"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="motionaveraging debug emacs zlib"
+
+DEPEND="x11-libs/motif:0
+ virtual/glu
+ virtual/opengl
+ emacs? ( virtual/emacs )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ x11-misc/xdg-utils"
+
+S="${WORKDIR}/${P/_/-}"
+
+SITEFILE="50${PN}-gentoo.el"
+PATCHES=( "${FILESDIR}/${PN}-1.9.5-zlib.patch" )
+
+src_configure() {
+ econf \
+ --with-htmlbrowser=xdg-open \
+ --with-pdfviewer=xdg-open \
+ $(use_enable debug d1debug) \
+ $(use_with zlib) \
+ $(use_enable motionaveraging motion-averaging)
+}
+
+src_compile() {
+ default
+
+ if use emacs; then
+ cp "${FILESDIR}/gvcl-mode.el" . || die
+ elisp-compile *.el
+ fi
+}
+
+src_install() {
+ default
+
+ doicon "${WORKDIR}"/geomview.png
+ make_desktop_entry ${PN} "GeomView ${PV}" \
+ /usr/share/pixmaps/${PN}.png \
+ "Science;Math;Education"
+
+ if use emacs; then
+ elisp-install ${PN} *.el *.elc
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/geomview/metadata.xml b/sci-mathematics/geomview/metadata.xml
new file mode 100644
index 000000000000..961597db5582
--- /dev/null
+++ b/sci-mathematics/geomview/metadata.xml
@@ -0,0 +1,15 @@
+<?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>Geomview is an interactive geometry viewer and Object Oriented Graphics Library (OOGL).</longdescription>
+ <use>
+ <flag name="motionaveraging">Enable experimental motion averaging technique</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">geomview</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/gfan/Manifest b/sci-mathematics/gfan/Manifest
new file mode 100644
index 000000000000..da9c53936ee1
--- /dev/null
+++ b/sci-mathematics/gfan/Manifest
@@ -0,0 +1,7 @@
+AUX gfan-0.5-double-declare-fix.patch 470 SHA256 3dbd642c4bfb349b89d85ff1eb366b58e9895233c92e4580ba98dfab8a3dca66 SHA512 25f340d5636c1cc719328a00561d9c4e5ab3a67633a9fb0ceb23ca0c771fe579f60678649affdf5be76d189f43a986eecd13a91d9681e847ed8b7c1c4c4ed118 WHIRLPOOL 2bf21ff8abc64d565e96e455a587b3ae6860ad34e4be54d91fe21086f6e7cbc9df22c71e03980e8cfe58fc8262523e1e1e14bace2d8d720135d0b32043f26029
+AUX gfan-0.5-gcc6.1-compat.patch 2000 SHA256 8f6b870a63e58c12af3eb714bf7213b19957ea3a3552452ab8e2c88aa1180447 SHA512 daf9527baf68299063ccdd82b53e92a63584fd5cf432b2d889c4aad08ccff0a31c0a75a7b6defd018021df4f46831ed7727a1bd6ea1b0da1fe9a924f9b208fe9 WHIRLPOOL a12e3799416d6feee4bd36eeb4c0a8e547d0da30d91cd58ebde8d78e78d5741e39d30a0df6004ded89c1cd6b92d60aa7793653bfeb184bf773f416a5d3e4df96
+DIST gfan0.5.tar.gz 1134987 SHA256 d7307c8979220adc0a7ce5acf472178a6c280c963967df6241392ed9954cc1fb SHA512 11a9657adcd5b39f73244450c09b132d8cd19474d0f9151c0127682bc16847537e4096d39e8a0a63b5c6aef6720e54a72bfd361a5271808d5a5595fd2df494fa WHIRLPOOL d01a196972a1b0e87e161b3100fb0ec004fa304f6b9e258321e1bf60724826d4d0fa7b3632c8fb7d5789b6f07a2d934ad35501132a68905f8fed7d4a08bd8ed2
+EBUILD gfan-0.5-r1.ebuild 856 SHA256 5e4c8f5100590c4cd520a7232f8ad9db39475088ad8762d78c03bfaba35e5aeb SHA512 b44f8316297138a2d1c0570b1fbaaa2a26122c28746ddec3bef31319e8ce319bd75084d480dcad61b867988da43d4d632c13a71e3afd732ac7daf0daa3c5509c WHIRLPOOL 27acfea0e08f56626ee1e9be24b132ada2ad34fa34f7c7929b21ebdff64ac8a8f7375da6c408ff8e41ea26bb7709f7379542d1a8fb3e85014752135ce551eec1
+MISC ChangeLog 3063 SHA256 93682d69d05e77aad2e2c78ae3ad728ca9d3480d0511477ff8aad3ba1679c681 SHA512 0bc81e991b5843690af45e232838872dd24a5453590de7c604ac9b98907532375c41acad0e660302c4b5c9ce0d56850e0cfa589558a74faa3329b37d530e4af4 WHIRLPOOL ce757bf7e59e7e7c03d72d91bfb0ab754e17fb8d5e4202f6d542a7e1b7c778ef96b956c1e652939e5a64f1e433b597df77657f460ac77b135c61368271bb98cc
+MISC ChangeLog-2015 1836 SHA256 a8321729d8f1c33da45768da76dcf508fbc5067cac6f4d918631cf56c1ca3b32 SHA512 a849940ed46b2635e4eabace0f9f68f3edad66fe700b56a3503e29e23b8d7b2f1f2bc7028cadf06b7d5ab099873c6cd62aa501a946f19c8d505ea870c5ba0ca8 WHIRLPOOL d233f8327efe8ea93074dc7989a1bb0075c5e476dde55835279b3438be5719226fa49838c95944e7fee2efedba61d48fb84559d425e76bab30263fadbd06109b
+MISC metadata.xml 398 SHA256 b9c457186c0f8142244dfd6816846213388f328a249295f0a38299b2f5421d61 SHA512 ac0668f6b8af01557b5a29a5aab5f6064f77eaed62e3fc080a5c808a62310dedd935271f58035e7c9b340df582922d2a960f67f148d61779a9a64fc1fbf7457e WHIRLPOOL 7c869ccf772dff7c53e3b4f1543f440f49c26c1520d779bc0f6a818ec47623f7d1a962c8ab095cc20a6df2a72e8099e8593faf6225831c6ccade01606e5ee790
diff --git a/sci-mathematics/gfan/files/gfan-0.5-double-declare-fix.patch b/sci-mathematics/gfan/files/gfan-0.5-double-declare-fix.patch
new file mode 100644
index 000000000000..239540884011
--- /dev/null
+++ b/sci-mathematics/gfan/files/gfan-0.5-double-declare-fix.patch
@@ -0,0 +1,12 @@
+diff -U 3 -dHrN gfan0.5/app_minkowski.cpp gfan0.5-new/app_minkowski.cpp
+--- gfan0.5/app_minkowski.cpp 2011-01-23 12:21:47.000000000 -0500
++++ gfan0.5-new/app_minkowski.cpp 2012-06-29 15:23:48.604280985 -0400
+@@ -160,7 +160,7 @@
+ //log0 fprintf(Stderr,"4");
+ f.insert(c);
+ //log0 fprintf(Stderr,"5\n");
+- static int i;
++ // static int i;
+ //log0 fprintf(Stderr,"inserted:%i\n",++i);
+ }
+ log1 fprintf(Stderr,"Resolving symmetries.\n");
diff --git a/sci-mathematics/gfan/files/gfan-0.5-gcc6.1-compat.patch b/sci-mathematics/gfan/files/gfan-0.5-gcc6.1-compat.patch
new file mode 100644
index 000000000000..8479557b61bb
--- /dev/null
+++ b/sci-mathematics/gfan/files/gfan-0.5-gcc6.1-compat.patch
@@ -0,0 +1,70 @@
+--- a/app_fiberpolytope.cpp
++++ b/app_fiberpolytope.cpp
+@@ -63,7 +63,7 @@
+
+ /* If the vector configuration B does not have full rank then
+ change coordinates. */
+- if(rank(B)!=B.getHeight())
++ if(rank_(B)!=B.getHeight())
+ {
+ FieldMatrix M=integerMatrixToFieldMatrix(B,Q);
+ M.reduce(false,true);//force integer operations - preserving volume
+@@ -83,7 +83,7 @@
+ log1 debug<<"Done computing restricting cone\n";
+
+ debug<<B.getRows();
+- debug<<int(rank(B));
++ debug<<int(rank_(B));
+
+ Triangulation2 t(B);
+ log1 debug<<"Computing initial triangulation\n";
+@@ -143,7 +143,7 @@
+ */
+ /* If the vector configuration A does not have full rank then
+ change coordinates. */
+-/* if(rank(A)!=A.getHeight())
++/* if(rank_(A)!=A.getHeight())
+ {
+ FieldMatrix M=integerMatrixToFieldMatrix(A,Q);
+ M.reduce(false,true);//force integer operations - preserving volume
+--- a/app_secondaryfan.cpp
++++ b/app_secondaryfan.cpp
+@@ -307,7 +307,7 @@
+
+ if(scaleOption.getValue())
+ {
+- if(rank(A)!=A.getHeight())
++ if(rank_(A)!=A.getHeight())
+ {
+ cerr << "The vector configuration must have full rank in order to use the scale option.\n";
+ assert(0);
+@@ -342,7 +342,7 @@
+
+ /* If the vector configuration A does not have full rank then
+ change coordinates. */
+- if(rank(A)!=A.getHeight())
++ if(rank_(A)!=A.getHeight())
+ {
+ FieldMatrix M=integerMatrixToFieldMatrix(A,Q);
+ M.reduce(false,true);//force integer operations - preserving volume
+--- a/matrix.cpp
++++ b/matrix.cpp
+@@ -61,7 +61,7 @@
+
+ #include "linalg.h"
+
+-int rank(IntegerMatrix const &m)
++int rank_(IntegerMatrix const &m)
+ {
+ return integerMatrixToFieldMatrix(m,Q).rank();
+ }
+--- a/matrix.h
++++ b/matrix.h
+@@ -147,6 +147,6 @@
+
+ FloatMatrix integerToFloatMatrix(IntegerMatrix const &m);
+ IntegerVector flattenMatrix(IntegerMatrix const &m);
+-int rank(IntegerMatrix const &m);
++int rank_(IntegerMatrix const &m);
+
+ #endif
diff --git a/sci-mathematics/gfan/gfan-0.5-r1.ebuild b/sci-mathematics/gfan/gfan-0.5-r1.ebuild
new file mode 100644
index 000000000000..ec591ee19578
--- /dev/null
+++ b/sci-mathematics/gfan/gfan-0.5-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="computes Groebner fans and tropical varities"
+HOMEPAGE="http://www.math.tu-berlin.de/~jensen/software/gfan/gfan.html"
+SRC_URI="http://www.math.tu-berlin.de/~jensen/software/gfan/${PN}${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+DEPEND="dev-libs/gmp[cxx]
+ sci-libs/cddlib"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${PV}/"
+
+PATCHES=(
+ "${FILESDIR}/${P}-double-declare-fix.patch"
+ "${FILESDIR}/${P}-gcc6.1-compat.patch"
+ )
+
+src_prepare () {
+ default
+ sed -i -e "s/-O2/${CXXFLAGS}/" \
+ -e "/GPROFFLAG =/d" \
+ -e "s/g++/$(tc-getCXX)/" \
+ -e "s/\$(CCLINKER)/& \$(LDFLAGS)/" Makefile || die
+}
+
+src_install() {
+ emake PREFIX="${ED}/usr" install
+}
diff --git a/sci-mathematics/gfan/metadata.xml b/sci-mathematics/gfan/metadata.xml
new file mode 100644
index 000000000000..abc08ece6082
--- /dev/null
+++ b/sci-mathematics/gfan/metadata.xml
@@ -0,0 +1,11 @@
+<?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">
+ gfan is a computer algebra tool to compute Groebner fans and tropical varieties.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/ggnfs/Manifest b/sci-mathematics/ggnfs/Manifest
new file mode 100644
index 000000000000..fe206709cf72
--- /dev/null
+++ b/sci-mathematics/ggnfs/Manifest
@@ -0,0 +1,9 @@
+AUX ggnfs-0.77.1-gentoo.patch 5074 SHA256 7e303c43095abb0b4ace6fb1f9f6c790cf57f93afb568a22f171133daf52d339 SHA512 bc2dc58784aa5c78b79f5021f57f7974dbb475e2489d8864549134dbf002aefd7546d2eadca03d04daa89638de02494052583e91b4b79628b500a1c584dd3f0a WHIRLPOOL 2253fec0d4eaa8b80d8a42cb1302d372e1d95d8d24fe293422ff5b2d0ba83ed7dc2f14d0e419b2b4ab1ff4c13074f0b1839d586a9dd22198b63329be1870ead1
+DIST def-nm-params.txt 3495 SHA256 5febf991cdd4112265bd58379c6d0819e6bb01b6e656902256fe13e4b63ba97c SHA512 b924292bc5354f87a3f88f2c35b767b9183704ced61c0e709cdd0974a2e1f34a4c170c6d12524b10162f63306f74001ad30e82ac7997d98db823006086772460 WHIRLPOOL 9ecabb6bee118269bd4d345582d36f9f82d54585ce7092adb3b6e1d27be4d0297201a408c76bb692047192a996982113d8387aad3c4764062f6d23f2f9febc82
+DIST def-par.txt 4957 SHA256 40d0b9be2c52282f29ff8cbc50799b625fc05b1da6eb7f2070fb3eb2ac81e7fa SHA512 fc0851513b1170e0a43e7458e24da4274146272018b7fefbe35280005ebeba20458756c4d4715b2a98780354dd1c5bcf31d98dd1388f1d352fb718062141c434 WHIRLPOOL 81151ab8235b2b55a7e8ceca4453b49bab3d3109eaf1352808b7e42c3612977402856c518ba8d8a1e5b6b80e33bbc3f33bdc565da5d3ee9e4251a1d253ace496
+DIST ggnfs-0.77.1.zip 2279013 SHA256 f6509661f22c562b3616e99989d39c160e8f49664e1fe3215d2f0d1441003a7a SHA512 77f5050d1310df5de45e80a25c8421cc9240ce11776fc4af596ce19d8b064b926dcc7e6dd7b2ef12d86056f7af0b67db2f746fc261cba24bbcf1efef06287513 WHIRLPOOL 5cb0e67aebd7ed9001ea2347b2211f9ca84ec50d18982436b111c0abb1c3223c66fbb5d029fa38d43e1137e7e7c7087daca85648fba7da92bbfcfe3760ccf87e
+DIST ggnfs-doc.pdf 252344 SHA256 6319442ba7fbeffa7000eb8ded1998877f3ecafc96551fa52c396d7f5d0775f2 SHA512 60f4153dbd31d7484b37a4f805eb71c9a785af884f228039136cd92e64ef145593dc0fde9e6f1c58a11d2d5124760d08d66566134f764e65f7dce86a36a11f01 WHIRLPOOL d93477a474172feb6bcb1db8cad04084496105e990d7906eee839ec49884718c3310e413cdfc6c3a36a42da755cf430a1db337a27a72a152aec6f62b17005758
+EBUILD ggnfs-0.77.1-r2.ebuild 2414 SHA256 35f7fd92bd5dca284f8b9f0791dd05d281cef397d4881df5d1406533341fb177 SHA512 867fb413b4a210e7f90befd863e34cf0cf00f0e8818779440a3c11da8d04e1aed03f1ad5bc9a69c8e0c53ad2e14a89457922fd8ad24c4b46bea77063e184dc46 WHIRLPOOL f4cef6922fc827b173910c2d49885e6a1731860e19f0518cf4f55c74b53214da207112dc6846b70bee9c014ddd2812ca8bffa449fa1340fde98f20260a6f587b
+MISC ChangeLog 2219 SHA256 95718ad3967bfaf3c8bc26d00346d0e33b505df876fd778018635e0c97b1104d SHA512 b7fd14ab7847770b96deb299b71526cc308b5c1c6baab85166d5b1922257fee49808c925e28529fcac9878687afd3b39f566dc44fe52755b39e4849736f4ed22 WHIRLPOOL 179e3c2efdd65c638a98184ae7d451f14f523ececa91cac2c6fdb061cc13704f2bc5d073b04c2a0782168c0f7372043dd11d4bdf4a8907987047bf04262085cc
+MISC ChangeLog-2015 1448 SHA256 f2d523718030aa1bfe9d5b217d255fd522afe57f0932d95a3a642bfde186a655 SHA512 fb83d00e84cadc3f9497856e24c1c87a6cbd6dadde44d55100d972122e70117562bbf10260718f3932f5f1aa801a80a7d71f523427c54d7146cd1472af144845 WHIRLPOOL 73ca6eaed122e7f9c1613cf62b4f082b4fa69cae102532c96037b171307f5e273bea07a27f6bb5ca2a507d69b19d91df797f6f994f0ea98771f5f2a7074886c0
+MISC metadata.xml 333 SHA256 2d85a7b4ab56074f8cda797b27648476cc5784eac8baf8c4da20545394605afa SHA512 9a14587ab135233970b6569cee5d7123a6a3f9fc86a4eed4ba47369f176b726321148ea705fed87b840d41558a1a73dad95af10098e4b721d51cc50d781f6610 WHIRLPOOL 868f430cb510ff34262cb66283fe3cbd18a4ee5199e80d951017833294e9d7e308246b4fc1ddb9022295baedfc7616f43800eaf73db095d4e1821ac9bb628913
diff --git a/sci-mathematics/ggnfs/files/ggnfs-0.77.1-gentoo.patch b/sci-mathematics/ggnfs/files/ggnfs-0.77.1-gentoo.patch
new file mode 100644
index 000000000000..ac7516034147
--- /dev/null
+++ b/sci-mathematics/ggnfs/files/ggnfs-0.77.1-gentoo.patch
@@ -0,0 +1,158 @@
+ src/Makefile | 34 +++++++++++++++++-----------------
+ src/lasieve4/Makefile | 6 +++---
+ src/pol5/Makefile | 8 ++++----
+ 3 files changed, 24 insertions(+), 24 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 01f66be..59b433f 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -1,15 +1,15 @@
+ # Workaround for PPC
+ # Due to unknown reason -march isn't supported there
+ ifeq ($(ARCH),970)
+- ALLOPT=-mcpu=$(ARCH) -m64 -pipe
++ ALLOPT=
+ else
+- ALLOPT=-march=$(ARCH) -pipe
++ ALLOPT=
+ endif
+
+ INC=-I. -I.. -I../include $(LOCALINC)
+ LIBS=-lgmp -lm
+ BINDIR=../bin
+-LIBFLAGS=$(LOCALLIB)
++LDFLAGS+=$(LOCALLIB)
+
+ MATBUILD_TPIE=0
+ TPIE_DIR=../../tpie
+@@ -17,7 +17,7 @@ TPIE_DIR=../../tpie
+ # Turn on\off workaround for GMP 4.2 bug
+ # Consult http://swox.com/list-archives/gmp-bugs/2006-May/000475.html
+ # for more info
+-GMP_BUG=1
++GMP_BUG=0
+
+ ifeq ($(HOST),generic)
+ ALLOPT+= -DGGNFS_HOST_GENERIC
+@@ -32,10 +32,10 @@ ifeq ($(ARCH),prescott)
+ ALLOPT+= -DL2_CACHE_SIZE=1024
+ endif
+
+-DEBUGOPT=-W -Wall -g -pg
++DEBUGOPT=-W -Wall
+
+-CFLAGS=-DNDEBUG -O3 -funroll-loops -finline-functions \
+- -ftracer -fomit-frame-pointer -W -Wall $(ALLOPT)
++CFLAGS+=-DNDEBUG \
++ -W -Wall $(ALLOPT)
+ # CFLAGS=$(DEBUGOPT) $(ALLOPT)
+ # -ffast-math removed since -funsafe-math-optimizations seems to cause occasional problems, especially in sqrt
+
+@@ -71,7 +71,7 @@ endif
+ ifeq ($(MATBUILD_TPIE),1)
+ BINS+= $(BINDIR)/matbuild-tpie
+ INC+= -I$(TPIE_DIR)/include
+- LIBFLAGS+= -L$(TPIE_DIR)/lib
++ LDFLAGS+= -L$(TPIE_DIR)/lib
+ LIBS+=-ltpie
+ endif
+
+@@ -97,35 +97,35 @@ bins : $(BINS)
+ $(CC) $(CFLAGS) -o $@ -c $*.S
+
+ $(BINDIR)/sieve : sieve.c clsieve.c $(OBJS) makefb.o
+- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ $^ $(LIBS)
++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ $(BINDIR)/makefb : makefb.c $(OBJS)
+- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -D_MAKEFB_STANDALONE -o $@ \
++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -D_MAKEFB_STANDALONE -o $@ \
+ makefb.c $(OBJS) $(LIBS)
+
+ $(BINDIR)/procrels : procrels.c $(OBJS)
+- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ procrels.c $(OBJS) $(LIBS)
++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ procrels.c $(OBJS) $(LIBS)
+
+ $(BINDIR)/matbuild : matbuild.c $(OBJS)
+- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ matbuild.c combparts.c \
++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ matbuild.c combparts.c \
+ $(OBJS) $(LIBS)
+
+ $(BINDIR)/matbuild-tpie : matbuild.c $(OBJS)
+- $(CPP) $(INC) $(CFLAGS) $(LIBFLAGS) -DGGNFS_TPIE -o $@ matbuild.c \
++ $(CPP) $(INC) $(CFLAGS) $(LDFLAGS) -DGGNFS_TPIE -o $@ matbuild.c \
+ experimental/combparts_tpie.cpp experimental/llist_tpie.cpp \
+ $(OBJS) $(LIBS)
+
+ $(BINDIR)/matprune : matprune.c $(OBJS)
+- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ matprune.c $(OBJS) $(LIBS)
++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ matprune.c $(OBJS) $(LIBS)
+
+ $(BINDIR)/matsolve : matsolve.c $(OBJS)
+- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ matsolve.c $(OBJS) $(LIBS)
++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ matsolve.c $(OBJS) $(LIBS)
+
+ $(BINDIR)/sqrt : sqrt.c $(OBJS)
+- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ sqrt.c $(OBJS) $(LIBS)
++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ sqrt.c $(OBJS) $(LIBS)
+
+ $(BINDIR)/polyselect : polyselect.c $(OBJS)
+- $(CC) $(INC) $(CFLAGS) $(LIBFLAGS) -o $@ polyselect.c $(OBJS) $(LIBS)
++ $(CC) $(INC) $(CFLAGS) $(LDFLAGS) -o $@ polyselect.c $(OBJS) $(LIBS)
+
+ latsiever :
+ $(MAKE) -C lasieve4
+diff --git a/src/lasieve4/Makefile b/src/lasieve4/Makefile
+index 31e05a9..6886b16 100644
+--- a/src/lasieve4/Makefile
++++ b/src/lasieve4/Makefile
+@@ -10,8 +10,8 @@
+ # 6/13/04: Hacked up for use in GGNFS by Chris Monico.
+
+ INC=-I.. -I../../include $(LOCALINC)
+-LIBFLAGS=-L. $(LOCALLIB)
+-CFLAGS+=-Os
++LDFLAGS+=-L. $(LOCALLIB)
++CFLAGS+=
+
+ BINDIR=../../bin
+ FACT=prho.o
+@@ -58,7 +58,7 @@ gnfs-lasieve4eI%.o: gnfs-lasieve4e.c lasieve.h asm/siever-config.h
+
+ $(BINDIR)/gnfs-lasieve4I%e: gnfs-lasieve4eI%.o $(OBJS) libgmp-aux.a \
+ asm/liblasieve.a asm/liblasieveI%.a $(FACT)
+- $(CC) $(CFLAGS) $(INC) $(LIBFLAGS) -o $@ $^ $(LIBS)
++ $(CC) $(CFLAGS) $(INC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ asm/lib%.a:
+ $(MAKE) -C asm
+diff --git a/src/pol5/Makefile b/src/pol5/Makefile
+index 44b08be..e474ffb 100644
+--- a/src/pol5/Makefile
++++ b/src/pol5/Makefile
+@@ -1,6 +1,6 @@
+ BINDIR=../../bin
+ INC=-I.. -I../../include $(LOCALINC)
+-LIBFLAGS=$(LOCALLIB)
++LDFLAGS+=$(LOCALLIB)
+ LIBS=-lm -lgmp
+ CFLAGS2=
+
+@@ -46,13 +46,13 @@ all: $(BINS)
+ $(CC) $(INC) -c $(CFLAGS) $(CFLAGS2) $^
+
+ $(BINDIR)/pol51m0b: pol51m0b.o $(OBJS) $(OBJS2)
+- $(CC) $(INC) -o $@ $(CFLAGS) $(CFLAGS2) $^ $(LIBFLAGS) $(LIBS)
++ $(CC) $(INC) $(LDFLAGS) -o $@ $(CFLAGS) $(CFLAGS2) $^ $(LIBS)
+
+ $(BINDIR)/pol51m0n: pol51m0n.o $(OBJS) $(OBJS3)
+- $(CC) $(INC) $(CFLAGS) $(CFLAGS2) -o $@ $^ $(LIBFLAGS) $(LIBS)
++ $(CC) $(INC) $(CFLAGS) $(CFLAGS2) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ $(BINDIR)/pol51opt: pol51opt.o $(OBJS) $(OBJS4)
+- $(CC) $(INC) $(CFLAGS) $(CFLAGS2) -o $@ $^ $(LIBFLAGS) $(LIBS)
++ $(CC) $(INC) $(CFLAGS) $(CFLAGS2) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ clean : ;
+ rm -f $(BINS) *.o core
diff --git a/sci-mathematics/ggnfs/ggnfs-0.77.1-r2.ebuild b/sci-mathematics/ggnfs/ggnfs-0.77.1-r2.ebuild
new file mode 100644
index 000000000000..5f92618d36ad
--- /dev/null
+++ b/sci-mathematics/ggnfs/ggnfs-0.77.1-r2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="A suite of algorithms to help factoring large integers"
+# inactive old homepage exists, this is a fork
+HOMEPAGE="https://github.com/radii/ggnfs"
+# snapshot because github makes people stupid
+SRC_URI="
+ http://dev.gentooexperimental.org/~dreeevil/${P}.zip
+ http://stuff.mit.edu/afs/sipb/project/pari-gp/ggnfs/Linux/src/def-par.txt
+ http://stuff.mit.edu/afs/sipb/project/pari-gp/ggnfs/Linux/src/def-nm-params.txt
+ http://gentooexperimental.org/~patrick/ggnfs-doc.pdf"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=dev-libs/gmp-4.3:0
+ app-arch/unzip"
+RDEPEND="${DEPEND}
+ !sci-mathematics/cado-nfs" # file collisions, fixable
+
+S=${WORKDIR}/${PN}-master
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ echo "#define GGNFS_VERSION \"0.77.1-$ARCH\"" > include/version.h || die
+ # fix directory symlink, add missing targets, rewrite variable used by portage internally
+ cd src/lasieve4 && rm -f -r asm && ln -s ppc32 asm || die
+ sed -i -e 's/all: liblasieve.a/all: liblasieve.a liblasieveI11.a liblasieveI15.a liblasieveI16.a/' asm/Makefile || die
+ cd "${S}"
+ sed -i -e 's/ARCH/MARCH/g' Makefile src/Makefile || die
+ sed -i -e 's/$(LSBINS) strip/$(LSBINS)/' src/Makefile || die #No stripping!
+ sed -i -e 's/SVN \$Revision\$/0.77.1 snapshot/' src/experimental/lasieve4_64/gnfs-lasieve4e.c src/lasieve4/gnfs-lasieve4e.c || die
+ tc-export CC
+}
+
+src_configure() { :; }
+
+src_compile() {
+ # setting MARCH like this is fugly, but it uses -march=$ARCH - better fix welcome
+ # it also assumes a recent-ish compiler
+ cd src
+ HOST="generic" MARCH="${ARCH}" emake -j1
+}
+
+src_install() {
+ mkdir -p "${D}/usr/bin/"
+ for i in gnfs-lasieve4I11e gnfs-lasieve4I12e gnfs-lasieve4I13e gnfs-lasieve4I14e \
+ gnfs-lasieve4I15e gnfs-lasieve4I16e makefb matbuild matprune matsolve pol51m0b pol51m0n \
+ pol51opt polyselect procrels sieve sqrt; do
+ cp "${S}/bin/${i}" "${D}/usr/bin/" || die
+ done
+ mkdir -p "${D}/usr/share/doc/${PN}"
+ cp "${DISTDIR}/def-par.txt" "${D}/usr/share/doc/${PN}" || die
+ cp "${DISTDIR}/def-nm-params.txt" "${D}/usr/share/doc/${PN}" || die
+ docompress -x "/usr/share/doc/${PN}/def-par.txt"
+ docompress -x "/usr/share/doc/${PN}/def-nm-params.txt"
+ # TODO: docs? File collisions?
+ cp ${DISTDIR}/ggnfs-doc.pdf "${D}/usr/share/doc/${PN}" || die
+}
diff --git a/sci-mathematics/ggnfs/metadata.xml b/sci-mathematics/ggnfs/metadata.xml
new file mode 100644
index 000000000000..b75f4bc2a9eb
--- /dev/null
+++ b/sci-mathematics/ggnfs/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">radii/ggnfs</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/gimps/Manifest b/sci-mathematics/gimps/Manifest
new file mode 100644
index 000000000000..583ad63416d3
--- /dev/null
+++ b/sci-mathematics/gimps/Manifest
@@ -0,0 +1,11 @@
+AUX README.gentoo 1049 SHA256 1e4625ba0d1be2babf9594b031d0c4eed881be3ba3d4b6e1ee3d0dc537ed8a84 SHA512 c3fc1873bf1ed4ccb1412814b0feca17ea36804fe98b1c93601d579f21b0bccfa45ece7efcd2f34c3825d786f5126bd8a7e48e2f6739a7f2a321fe52ec148be6 WHIRLPOOL db020217affb0f533b97e774864d08d93d9de64105cedb5548d7d7ef28d88564d158b4ed6263157235b72d7de85f70a9c65803f06298c295280558426af2d2a6
+AUX gimps-25.6-conf.d 254 SHA256 1eae64e8172c1be714f856bb71df00d35a2f42568b37adfd59fd799e09ad3b3e SHA512 619f8c385d3c721868d5458f46967d936408db43398326414ad40b66be4092c87c0d8a5018540f949a25c56cc1a0c27ab5a493b77c3095c5870d1facae557bc5 WHIRLPOOL 39610d1ac60dab3b054dde280bc69cba621b0f4381a414abb3225e06fe022336fb30349864b771eb92652b4685bfef3453a3a7af83c1e6aa89a1bd10121b8132
+AUX gimps-28.9-init.d 722 SHA256 faa2b81ac40382dca87ed75e678fe05cc4593772ddae4f23516bb77f60d50a29 SHA512 8a7501d8347aa0974268c910890550a2ce5a3d11606670dd69d5e5ccb1046e2994bc5b1f04f9e9dae89174a5a69f9158757079b835fbff50fd25f983190521e9 WHIRLPOOL 2e8d0a773ab79ef0606b713b0f01bbb34655f4a3761f88cbfe49ee24725e551ed852a150dbbc0652f005f7691668dc59489444f3c7090ed662b89cefcbba254f
+AUX gimps.service 283 SHA256 4a55637b7ef6fd039f0c457fbd360a102049da9c4881145fca4b54a318f27ca8 SHA512 710c7d075d5542364746b837f2b62257011abb8f45862bf0a1fabd53adb182b5fd969256c7f3221506fef38e81ab1b0f4698efafc1ca7908d9e2d42dee386d8b WHIRLPOOL 2a73110c93952129eaeddf7bb639155836f5ea552bd879c84d0239cb812573a21b0b0c17983b0ec3f48ce43eaa79cc370c67dc0834127339206021cd259dddaa
+AUX gimps.tmpfiles 38 SHA256 0c8ed02b8ab1fc91cc07562da331599ed19523db827c2700510c783823fd0f07 SHA512 61c5eda13289175cdf55704442ceab4d5391d24cfa49f04155799fc2798e5ad5f1e624802e1c04b99685b1560f9898d1b0fc0c15c82251d1a765dd5de93024d8 WHIRLPOOL c63dec16c7feddf6f5594627dfd24a12b1b4e929d0689e26382e328d96cbcbde7a30f4f39d36ea389ad58efa1645db443ebed7e724d40fcb28ea542729d8eb3c
+DIST p95v2810.linux32.tar.gz 4610763 SHA256 ef9b90e9b82c6710af53471eb18328b80cc46f0a41f137bc224efca0ed570d95 SHA512 ac2e0f2e1b557b71084027a5bd7cafeb350df3ee9edf347766d34d4a607034827494eb15dae30404da33f8c9f279a85e033cf845800868f4c51087a35b49c521 WHIRLPOOL f3609de0845308811e09f4a2159709ea69b070f20fe3cc9e71d0bd9d98fff579e0763b8f52cfcc65339dfa3723f622bd97334ae3daf975ad0a9898f803d6c70a
+DIST p95v2810.linux64.tar.gz 5707219 SHA256 ed5a8b94fdd65436e98e57ea0838035fd44c62492009d00f5fba508cb85481c7 SHA512 c4fd692df3018e5e73ba6095de5ed394f36d5c89dd81c2c7f2c74a4ce3184b22176dc13b8b59e4f42c1781e911107dc12224cfcddef882535931319ec93120f1 WHIRLPOOL 91c1f657df196b8eb27b88727e35cee831a98cbe99d3a88834ba868c4b491144fc4efb66d389f76203481f252b3ef9cc0c2241aa3d153abc1857f09cf3971ac7
+EBUILD gimps-28.10-r1.ebuild 1427 SHA256 a572bf83acd804b68b0d9312680b1c03e109619aaab18377f39ad28f5f7043be SHA512 8ea450a833c7b7085cdd1065460a5d53f4e96c236c85bfca1439954898f426b7384dbedda750bb1a0a7806f815d253febfcc31168a3a1d0fd1b3a64098b6b26d WHIRLPOOL d56ceec01b04bc5a769e79bbdd2c3daefbcce735d0dfbc88977df6e053f1c5828d6e23224db00ed0e3fc6096f5b287b0365b68a2c447c5198bb922141734431e
+MISC ChangeLog 4474 SHA256 98f801512530b18553e32f11990664bf311104c06395a5fc249ab99c746eb476 SHA512 b0ca00967ab4958c9c43fdb541e2d98d000674e697e9a331b0da7fb536772b3bcd38965340bcffba3a81c4a120c6af80e8d5003994b4b99bbcc6c9994a75637c WHIRLPOOL 2dcc25c51cf9d6dce7dd04b9cd4b19aaa6143c1972079826c5fdbb862ad47d087ce547df9384bb8a5d9fff048948b4a1203163bfcb0ec480bd4e1b98dcde2ba4
+MISC ChangeLog-2015 12000 SHA256 a91c6afd35d223e01208443e3e7feca56914e803c2bc7ceed39cdf3aac410ad6 SHA512 e8decab8060cd770ebe550ede6596940c5fdfcaaf7e357a40c79f728fd8e86c3b7b45fe93c2ce9c53c3ca244c0d049792fcd4383eac09ad3245b45d060714280 WHIRLPOOL aab8ac4123d830545e3822208a340795d4dfc2b06839e5022ce9acc0611cd767d752c067b175ae64566d7385162ee3c088dedc91ed95a1434ed50302307e8e06
+MISC metadata.xml 529 SHA256 401aa5cfcc911c3a7708c125acb5b64ca9ea5481f45300b1f507ff8b02af146c SHA512 a7fb9bd05f987e1d48a04b70e78cbb3906927197793870435fee8b68dd9da623a68fc30ca96d0173952414d9741674ba2cc2c3f821dfd7b302f91f09e887a362 WHIRLPOOL 25448438ad9cf8fa8abfdc6fad1f0ca6cde394d58770be1f96ea53c1fa05ca3663128336dd66745f88f300451ab8cac2c5f5f606a1b6a4417a9ba3187cc1f6aa
diff --git a/sci-mathematics/gimps/files/README.gentoo b/sci-mathematics/gimps/files/README.gentoo
new file mode 100644
index 000000000000..f034cd1293d8
--- /dev/null
+++ b/sci-mathematics/gimps/files/README.gentoo
@@ -0,0 +1,25 @@
+Useful documentation for running the GIMPS daemon can be found at:
+http://www.mersenne.org/gettingstarted/
+http://www.mersenneforum.org/forumdisplay.php?f=10
+
+To run the GIMPS daemon as an unprivileged user some steps are required.
+
+1. Before starting the GIMPS service run (as root) the following command:
+ # /opt/gimps/mprime -m -w/var/lib/gimps
+2. Answer 'Y' to the "Join Gimps?" question
+3. Accept default values for the following question (or tweak them as you
+deem necessary)
+4. Stop the running tests with ^C
+5. Exit the client, pressing '5'
+6. Change the owner and group of all the files in /var/lib/gimps to
+nobody:nobody:
+ # chown nobody:nobody /var/lib/gimps/*
+
+Then you can use `/etc/init.d/gimps start` to start a GIMPS client in the
+background at boot. Have a look at /etc/conf.d/gimps and check some
+configuration options.
+
+If you don't want to use the init script to start gimps, remember to
+pass it an additional command line parameter specifying where the data
+files are to be stored, e.g.:
+# /opt/gimps/mprime -w/var/lib/gimps"
diff --git a/sci-mathematics/gimps/files/gimps-25.6-conf.d b/sci-mathematics/gimps/files/gimps-25.6-conf.d
new file mode 100644
index 000000000000..4b98e1dbc28b
--- /dev/null
+++ b/sci-mathematics/gimps/files/gimps-25.6-conf.d
@@ -0,0 +1,12 @@
+# Config file for /etc/init.d/gimps
+
+USER="nobody"
+GROUP="nobody"
+
+# set up any options you want for GIMPS
+# for more info, `mprime -h`
+# GIMPS_OPTIONS=""
+
+# this is the directory where GIMPS run-time
+# data files will be stored
+GIMPS_DIR=/var/lib/gimps
diff --git a/sci-mathematics/gimps/files/gimps-28.9-init.d b/sci-mathematics/gimps/files/gimps-28.9-init.d
new file mode 100644
index 000000000000..00eca8268055
--- /dev/null
+++ b/sci-mathematics/gimps/files/gimps-28.9-init.d
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ checkpath -d -o ${USER}:${GROUP} ${GIMPS_DIR}
+
+ if [ ! -e "${GIMPS_DIR}/local.txt" ]; then
+ eerror "GIMPS has not been configured. Please configure it manually before"
+ eerror "starting this initscript."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting GIMPS"
+ start-stop-daemon --quiet --start -b --exec /opt/gimps/mprime \
+ --chdir ${GIMPS_DIR} --user ${USER}:${GROUP} \
+ -- -w${GIMPS_DIR} ${GIMPS_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping GIMPS"
+ start-stop-daemon --quiet --stop --exec /opt/gimps/mprime
+ eend $?
+}
diff --git a/sci-mathematics/gimps/files/gimps.service b/sci-mathematics/gimps/files/gimps.service
new file mode 100644
index 000000000000..d3436717b175
--- /dev/null
+++ b/sci-mathematics/gimps/files/gimps.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Great Internet Mersenne Prime Search client
+After=network.target local-fs.target
+Wants=local-fs.target
+
+[Service]
+User=nobody
+Group=nobody
+ExecStart=/opt/gimps/mprime -w/var/lib/gimps
+StandardOutput=null
+StandardError=journal
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sci-mathematics/gimps/files/gimps.tmpfiles b/sci-mathematics/gimps/files/gimps.tmpfiles
new file mode 100644
index 000000000000..c965e7de5352
--- /dev/null
+++ b/sci-mathematics/gimps/files/gimps.tmpfiles
@@ -0,0 +1 @@
+d /var/lib/gimps 0755 nobody nobody -
diff --git a/sci-mathematics/gimps/gimps-28.10-r1.ebuild b/sci-mathematics/gimps/gimps-28.10-r1.ebuild
new file mode 100644
index 000000000000..975d1aea937a
--- /dev/null
+++ b/sci-mathematics/gimps/gimps-28.10-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils systemd readme.gentoo-r1
+
+DESCRIPTION="The Great Internet Mersenne Prime Search"
+HOMEPAGE="http://mersenne.org/"
+SRC_URI="
+ amd64? ( ftp://mersenne.org/gimps/p95v${PV/./}.linux64.tar.gz )
+ x86? ( ftp://mersenne.org/gimps/p95v${PV/./}.linux32.tar.gz )"
+
+SLOT="0"
+LICENSE="GIMPS"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+
+# Since there are no statically linked binaries for this version of mprime,
+# and no static binaries for amd64 in general, we use the dynamically linked
+# ones and try to cover the .so deps with the packages listed in RDEPEND.
+DEPEND=""
+RDEPEND="net-misc/curl"
+
+S="${WORKDIR}"
+I="/opt/gimps"
+
+QA_PREBUILT="opt/gimps/mprime"
+
+DOCS="license.txt readme.txt stress.txt whatsnew.txt undoc.txt"
+
+src_install() {
+ dodir ${I} /var/lib/gimps
+ pax-mark m mprime
+ cp mprime "${D}/${I}" || die
+ fperms a-w "${I}/mprime"
+ fowners root:0 "${I}"
+ fowners root:0 "${I}/mprime"
+
+ einstalldocs
+
+ readme.gentoo_create_doc
+
+ newinitd "${FILESDIR}/${PN}-28.9-init.d" gimps
+ newconfd "${FILESDIR}/${PN}-25.6-conf.d" gimps
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+ systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}.conf"
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
+
+pkg_postrm() {
+ echo
+ einfo "GIMPS data files were not removed."
+ einfo "Remove them manually from /var/lib/gimps/"
+ echo
+}
diff --git a/sci-mathematics/gimps/metadata.xml b/sci-mathematics/gimps/metadata.xml
new file mode 100644
index 000000000000..8b56e92728c6
--- /dev/null
+++ b/sci-mathematics/gimps/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="person">
+ <email>paolo.pedroni@iol.it</email>
+ <name>Paolo Pedroni</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Gentoo Proxy Maintainers Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-mathematics/ginac/Manifest b/sci-mathematics/ginac/Manifest
new file mode 100644
index 000000000000..ac75ebecfe97
--- /dev/null
+++ b/sci-mathematics/ginac/Manifest
@@ -0,0 +1,8 @@
+AUX ginac-1.5.1-pkgconfig.patch 340 SHA256 bd1a63b67f1c1786e537992b50b9bb376a14be54971bd0ac8912a584f7f802d8 SHA512 b88c7ef69686733a3e817d9d4961246eb64aebf753b51bf8f6ea5c6fdfef41e52b6a20656e074f0bcc42dfe7965a440642d9036628a139f2c87bbde5f59d76d1 WHIRLPOOL b0f8c2f7f6971934a3abf9e2a1790a7c4e4a1cd08fecb2eeb0d3ab7ba0334834479e35083c4a59bdfc2de4e231bafaa5e924b3d2f2f77c9b0c4063deb1fb0f3d
+DIST ginac-1.6.6.tar.bz2 1028211 SHA256 25ec6d535ee77caf6161843688489cfc319b6c4fda46c5d7878587ee5562ddce SHA512 495ef255dd32e71ee91257a515c0566e56525e0c54c8955c19beaf9e2e55457f7d8171c7e5f6e4f29f555f5d262bbaf4edf4f033166c4904c016987a5029e958 WHIRLPOOL c4efc7286377da939ad8196b898086bb67b63102b23c703d3b5fc462be108fc96883597dea50297ec4a26d5bd19f15af8b01c36782c6e6a1886c284cf19771fc
+DIST ginac-1.7.2.tar.bz2 1056339 SHA256 24b75b61c5cb272534e35b3f2cfd64f053b28aee7402af4b0e569ec4de21d8b7 SHA512 5c356beb8e0830b9f5805870f67298d4c19e512db8b8f46a37b490c19179a5c99e4497439e5adb575dd97e7deb5fe0b931a4b6db80e98a8e1e6f46977e33d8cf WHIRLPOOL 7f913725b078dc63bf9dd335b17b813d3e4ee36f21eb932f27d06fbff69feb308d719a4432a3ce6fdd9b84e3d478b523c1a7149fa874ad92106962480a597f0d
+EBUILD ginac-1.6.6.ebuild 1399 SHA256 ae4df1202f3aabd2edda8bff2809d17b07e237df8d1caeda95c8add093560b54 SHA512 31c59064921777d53910155484aa0c21260d4a1ad80d3747356ca05a0c870d1b9a69f21ad114f766336c350a1ccb6c3526cc79b2e28b7093e89b1a37e9e9af81 WHIRLPOOL 14d5e4e1c0771a106e9e5cef0478f3df5e8209c071f8b10a818f8e78bddacaa58ff601d4721551f4ad41985a5e429c77da961dad59dff78698c69f5eb48758f7
+EBUILD ginac-1.7.2.ebuild 1524 SHA256 4e9a3dcc06cdb4d1f4e115b93a2a04b15969471ff80168d3e5233407d32168f4 SHA512 aad536ef6e61f981f2be144f1f4131a98d77730845266daba5d57cadf176e5b78eedb862cf2b8a5ae4708b4ac1cdcc763f7e181ad473022f3363d4e5ba9b43de WHIRLPOOL b32cab58dc558e4a6c9ee09811b267f0930901e4170a402b8760f1b933733efe348b4a2c75f8ccb8941f9e40b3c293a9828f8559871658283797d2a2575f9b19
+MISC ChangeLog 3397 SHA256 ad13627533db977914d6f2fb3cd71b200435e09daaff008200738a430e95a19e SHA512 04ed1bf98d9edef4848205391b7989c036b02f170d9a57b9f9bcf8c24a541c060d7e53efb256ccab9c44a458bc660edc43ecf10580aa2bf536b58b424ea6f36d WHIRLPOOL ed15f4f4d1b36f9594d0a985bf3930c7ea6f641bc841873a0637d90fc9a8308095ac52f9be2afc6e2086bed94f996322c26228d1685d87dc124f5bc0498343a6
+MISC ChangeLog-2015 9038 SHA256 ca492c873ef8f7b9b7c4d420dbf8d9d2066882d6fc9f610b62722c5e43e5ae8e SHA512 39a1b3d98fd3f01c898fc9b532f563bec6e8ce1e2f5f3ca0ff61ca898382d85981ab5351f925b93626871e57be6b2dc4b28dbdb5d6d5e1c959b8fbf50809789f WHIRLPOOL c5e2cd00930ae25567b856524b1e97ceca78ba360eaf5bd3d20cdc268f6c0e239f5038e254c6d5477b4632b279234a43f89d6b0e3f8f373ec6ba713f3f556b54
+MISC metadata.xml 679 SHA256 db54d9352104db057b0902caeb93158f82e1f67669ab22c755db5726c4802310 SHA512 d6034309f9f5959615287773a58e3f87be9664da83c1ec17b701454224fd7e1806deb21717144ca7845615ffb13dc59bfae7f77fefc589f19bee9c10655e8e5d WHIRLPOOL b8500aec2f6e2827bc913262d33072180708e0fb47dca546878d136a07025ecd5944b0ea6ec5848a85c7343e077d3260fcc7c5fdb5f3779c05a6b9f8e4af3842
diff --git a/sci-mathematics/ginac/files/ginac-1.5.1-pkgconfig.patch b/sci-mathematics/ginac/files/ginac-1.5.1-pkgconfig.patch
new file mode 100644
index 000000000000..5a6784d6b802
--- /dev/null
+++ b/sci-mathematics/ginac/files/ginac-1.5.1-pkgconfig.patch
@@ -0,0 +1,9 @@
+--- ginac-1.4.4.org/ginac.pc.in 2009-03-16 21:17:22.000000000 +0530
++++ ginac-1.4.4/ginac.pc.in 2009-03-16 21:25:28.000000000 +0530
+@@ -7,5 +7,5 @@
+ Description: C++ library for symbolic calculations
+ Version: @VERSION@
+ Requires: cln >= 1.1.6
+-Libs: -L${libdir} -lginac @GINACLIB_RPATH@
++Libs: -L${libdir} -lginac
+ Cflags: -I${includedir}
diff --git a/sci-mathematics/ginac/ginac-1.6.6.ebuild b/sci-mathematics/ginac/ginac-1.6.6.ebuild
new file mode 100644
index 000000000000..fc61631e2feb
--- /dev/null
+++ b/sci-mathematics/ginac/ginac-1.6.6.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools-utils
+
+DESCRIPTION="C++ library and tools for symbolic calculations"
+SRC_URI="http://www.ginac.de/${P}.tar.bz2"
+HOMEPAGE="http://www.ginac.de/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+IUSE="doc static-libs"
+
+RDEPEND=">=sci-libs/cln-1.2.2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen
+ media-gfx/transfig
+ virtual/texi2dvi
+ dev-texlive/texlive-fontsrecommended
+ )"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.5.1-pkgconfig.patch )
+
+src_configure() {
+ local myeconfargs=( --disable-rpath )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+ if use doc; then
+ export VARTEXFONTS="${T}"/fonts
+ cd "${BUILD_DIR}/doc/reference"
+ emake html pdf
+ cd "${BUILD_DIR}/doc/tutorial"
+ emake ginac.pdf ginac.html
+ fi
+}
+
+src_install() {
+ autotools-utils_src_install
+ if use doc; then
+ cd "${BUILD_DIR}"/doc
+ insinto /usr/share/doc/${PF}
+ newins tutorial/ginac.pdf tutorial.pdf
+ newins reference/reference.pdf reference.pdf
+ insinto /usr/share/doc/${PF}/html/reference
+ doins -r reference/html_files/*
+ insinto /usr/share/doc/${PF}/html
+ newins tutorial/ginac.html tutorial.html
+ insinto /usr/share/doc/${PF}/examples
+ doins "${S}"/doc/examples/*.cpp examples/ginac-examples.*
+ fi
+}
diff --git a/sci-mathematics/ginac/ginac-1.7.2.ebuild b/sci-mathematics/ginac/ginac-1.7.2.ebuild
new file mode 100644
index 000000000000..29e2114ed722
--- /dev/null
+++ b/sci-mathematics/ginac/ginac-1.7.2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools-utils flag-o-matic
+
+DESCRIPTION="C++ library and tools for symbolic calculations"
+SRC_URI="http://www.ginac.de/${P}.tar.bz2"
+HOMEPAGE="http://www.ginac.de/"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc static-libs"
+
+RDEPEND=">=sci-libs/cln-1.2.2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen
+ media-gfx/transfig
+ virtual/texi2dvi
+ dev-texlive/texlive-fontsrecommended
+ )"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.5.1-pkgconfig.patch )
+
+src_configure() {
+ local myeconfargs=( --disable-rpath )
+ append-cxxflags -std=c++11
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile
+ if use doc; then
+ export VARTEXFONTS="${T}"/fonts
+ cd "${BUILD_DIR}/doc/reference"
+ emake html pdf
+ cd "${BUILD_DIR}/doc/tutorial"
+ emake ginac.pdf ginac.html
+ fi
+}
+
+src_test() {
+ pushd ../${P}_build > /dev/null
+ emake check
+ popd > /dev/null
+}
+
+src_install() {
+ autotools-utils_src_install
+ if use doc; then
+ cd "${BUILD_DIR}"/doc
+ insinto /usr/share/doc/${PF}
+ newins tutorial/ginac.pdf tutorial.pdf
+ newins reference/reference.pdf reference.pdf
+ insinto /usr/share/doc/${PF}/html/reference
+ doins -r reference/html_files/*
+ insinto /usr/share/doc/${PF}/html
+ newins tutorial/ginac.html tutorial.html
+ insinto /usr/share/doc/${PF}/examples
+ doins "${S}"/doc/examples/*.cpp examples/ginac-examples.*
+ fi
+}
diff --git a/sci-mathematics/ginac/metadata.xml b/sci-mathematics/ginac/metadata.xml
new file mode 100644
index 000000000000..2362ddf77046
--- /dev/null
+++ b/sci-mathematics/ginac/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">
+ GiNaC is an iterated and recursive acronym for GiNaC is Not a CAS,
+ where CAS stands for Computer Algebra System. It is designed to allow
+ the creation of integrated systems that embed symbolic manipulations
+ together with more established areas of computer science (like
+ computation-intense numeric applications, graphical interfaces, etc.)
+ under one roof.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/glpk/Manifest b/sci-mathematics/glpk/Manifest
new file mode 100644
index 000000000000..2ef43a472ddd
--- /dev/null
+++ b/sci-mathematics/glpk/Manifest
@@ -0,0 +1,24 @@
+AUX glpk-4.52.1-mariadb-5.5.patch 275 SHA256 9125267c1434e881a48f159db52009663b72155c648e77a5c153d3bdc1b06576 SHA512 32669b38d5ec7b1ae4d97e07cb9fa054952321e516a8a4cd9d64bc1237081bf14be031513cc2db96c142cdb01b2fe602f843eb51864ce71e106a4cff662903d0 WHIRLPOOL f77f9e0a18f1be010bab620ebbd4d7fc9ca6fd2312e03a993435dce829bd4297cc69fc1b03d9afae4a7ec6b3cc108dd4cb584fa8fea21dcacdc9a9552e7cfe4b
+AUX glpk-4.54-debundle-system-libs.patch 1763 SHA256 9c442dcfe85ea68c63802502f9e7648e9cfa207306b96a2ca4679bb96df46ae4 SHA512 57d5cdff8d9da56b4d5db22655b019d35efa5b938e25622246fa6d5a54421ae9221d5a164894cbd1c19cd46a963eb26132d7ba1f4aa26ff9eb401a155f77949a WHIRLPOOL 7539d64417878de9cfe1bbf73e0fb7ab484729fdaa37081669cae2f6071f29ab6e683477c2efcee3ff0609eac0a94e3fab145f8d75c8dde401e00f3d0957d415
+AUX glpk-4.57-debundle-system-libs.patch 1729 SHA256 72509303083b60995ae02f7c5603c4d5037ea74a02b8a97da9a6cd9f618bfb67 SHA512 406795f4dd5249aaab90707c9f9c7315a8b7dad90e5ee8995701d5ecc7027085a1c4ae5ed3b72cb18b4c2c9e1a2ae3332bccdd5ffd371e78761d4bcc9354c253 WHIRLPOOL b2f689f6d716cd72b9295e4e521d60df2340498e6884c558f4e01bd826e4c507e85f129677a127f475096e67640b171d123c0ef312a62d3bcfe488f9bdf07232
+AUX glpk-4.60-debundle-system-libs.patch 1811 SHA256 634c0d83233e3b8c85321991518322e0f6cfe36e7c999363a13b5418a03b9537 SHA512 733e94e8f8e16b452bd436b8ea87c8d330f2c180fa0e8c9332adb4b4cd52cafc6c82a95d362b848bd86c787df2c268138352b29f63860897106f6b3e10d63d38 WHIRLPOOL aceca1251e8b16f91cb5bea9c1c0dc85d80708da11c5049015486b39df98ba88a6cc4a7cfd15c6e08cf803df6c5acd38f5ff6037ebe0009b2437a2c4f17055de
+AUX glpk-4.63-debundle-system-libs.patch 2240 SHA256 f571568ddb0214352ecc6d74e75417236a594733996ca7c84cf7b78a17ba16ea SHA512 186c1dd2197119b376a76a2db9a73d7fc1e43adc6ae54f5d3e39ad9114a9a406d45dd7bce4bcea31cfce94e71234b70872db22378e8312026912a93077488805 WHIRLPOOL 8d24121393e18f423b8f3661b3b1c0a784f53444f5278c73a7ed4ce65faf52eb8fdd6841e3c193313a95ea04bd555b69c43f73f9707ea62c70c7e881c3ca7766
+DIST glpk-4.45.tar.gz 3132439 SHA256 9207cb613d4436d9a66bc1b1f2018176d106cef0e92a3a85500feeec373be98c SHA512 27089b760d89ee16c5a3332d319007af4b05e8d27df0b990311508f856a01461d8b7b40b111bbf1f3dd4d754af84000112f95349d5286e6d3e42e56226f98649 WHIRLPOOL 7c050210e29f4c13b39e85dc10c9aeed846d7ee912c7dac5a83d13b87648a4e4bf4dce365d2575b6ad7994c56570d74ec87c219f101aaccbec39fd0e14353182
+DIST glpk-4.48.tar.gz 3488482 SHA256 abc2c8f895b20a91cdfcfc04367a0bc8677daf8b4ec3f3e86c5b71c79ac6adb1 SHA512 16795e6cf4db302f25e06e5c9a660e5ed8c7b24ffc5126cde0f864e83fa77d4d61838eab4f716291d568963dddf7442a36a39425a62bd58bd00ca73dac4ffa70 WHIRLPOOL c3e826d08cc6033e8553d7d1fb2a556d42622f38a184e8bbc18bf29d872103245218482b749bfb214cf707cc60eaaf54d7e6840537b483cf8e63c2d33b2c313d
+DIST glpk-4.54.tar.gz 3098202 SHA256 ab72c8078402d34d176eda18c3f9a6ef006e223d530897a4d1d73fb4ad12f9a1 SHA512 7eb815a6d8416dd9f2bb94e9a4aef493c171898404ebc6276fcc1c4f3b4244220213a2bd098707104589348080820a7cb8a717aab73ca513f05b2f9a10aea070 WHIRLPOOL 56ff0baf5e98fdc8e12e4d4db664a4a287dc358dd75839d90d463c04e3e7d97b1023ea93217dd642f6737cccddecdb8f534980e48f8893aff395dc430622de69
+DIST glpk-4.55.tar.gz 3424345 SHA256 37090d7f16796ec1034496e182a39d5cc8bb7c9fb5dc48a38b13d620bf2b1de7 SHA512 a0c8ce0c850e0075098f0526db8f7584a86d5cb44d8ddefa55abf9f1f66af89f5aec19cf1cad51fc5585d8dfa50eab6ece984a038e00c472aec2ef1473eac689 WHIRLPOOL 4b3f543c862008dd09e867947c0383eb2f482f63b8fe30d9f682ccc7d0af1693af043c8cd63362be1bc736ef39393d59cdf0196326b08c7f48495bb5b5937487
+DIST glpk-4.57.tar.gz 3782998 SHA256 7323b2a7cc1f13e45fc845f0fdca74f4daea2af716f5ad2d4d55b41e8394275c SHA512 1979e59b96ce359168a81b720207045916f66c5755023b02c2e197e5a713d456165d94f1e40830547dc072de865f94e3b3a4d8e66d5d15aeb93f304f1893fe48 WHIRLPOOL 225760810ae9efbff31d0238dff08d966db5167e9b61a79f960d03b6d6bdaa2ed7d9b1e7608a99418d5346d3e8ddbe8b58f0d561aaacb292decf235b821fbc62
+DIST glpk-4.60.tar.gz 4160915 SHA256 1356620cb0a0d33ac3411dd49d9fd40d53ece73eaec8f6b8d19a77887ff5e297 SHA512 521bc48c588318fe6075eb66b1c43465200039f64b105b4a24f9f6eb9bb4742c7ebc96750ce999f64c60d6531486476386467dd41e949f1a00cba0cf00fbe20a WHIRLPOOL dfde976f9a32ba1751d1a0748c21023e0df802a1f22501c70091cbfb273bde8b73951eceb2a0768bc5634d6786c1cdb109e36af78e72ac7825fa9743737721f4
+DIST glpk-4.61.tar.gz 4116291 SHA256 9866de41777782d4ce21da11b88573b66bb7858574f89c28be6967ac22dfaba9 SHA512 0bcf89b62a2b3f565356b7ae538c5af6f3b4283234827c4212284d4924ce93980f6971f51313f1c08790e23e860771545dc58fdb8b35405d37404589683f40a1 WHIRLPOOL 01228c555ba7d17668a35a80bdf37dba00a1a105291288aa5ebef43c3ea3999e81042e0f98b5bfbfd7d44804a79014281120aaf10ca181be1b0615b97925407c
+DIST glpk-4.63.tar.gz 4131787 SHA256 914d27f1a51c2bf4a51f1bd4a507f875fcca99db7b219380b836a25b29b3e7f6 SHA512 3ee9b9ec5322282a9c62b2ee209fc7760383a6a764ef3816445ffb66f15ed4d00309bff1b98d50c243b58aa74f83072afde45c389799e637e11e86f4db45276c WHIRLPOOL 30facc4776e3db4232ff2924452ee0601bda78b3888f162a12e84af2f2232fbcbd986a9e849a6ce38fa19688c45eb6c6852ca76cc277ea5324e8a55fe899088e
+EBUILD glpk-4.45.ebuild 1456 SHA256 1577fa8a920ef13eed65175ff714bed74bbdb026410ce50b210c08da23494a0b SHA512 50e52c850b0ae23ea2445c54b14e052b6649b9e3a1413834d475ec208f55d9be32a1c46d5a86d25e8d61bbe41b9ddc7cc1558549750eb0d5c97bea65eff1f914 WHIRLPOOL edb9cabf9ca8e6c56f23b10d0a6399c3cca01fb7db87f5d5df2c5c8f03f14605275a65bd54975039214331e1e62e86fc037ee64dc0efce797a140c98f8e4e5f7
+EBUILD glpk-4.48.ebuild 1246 SHA256 a640b6330ecf0fdab68146930baac375df57739794587e0a94d82a0861062f06 SHA512 e728e1ff297c1bc4c8330a05088963c86878cb899bebce23159fcc7dd1431a4fe4212f3b92709e4414ba966a42327a66e66ae4cb5d345aca8e9ae07e6eb321f3 WHIRLPOOL 8c014fe77d422f80841f4c617a6f6c206bac1d949030282b5386ffc4e00623b8f6259d70bdcc076785298e6dcc506cfda7e4339929d50471794dfe5229689e3f
+EBUILD glpk-4.54.ebuild 1347 SHA256 415f803488ceb9104ead4ffab284ca88e4974d26893d79235d1cf1be86c1b30b SHA512 85f8a0446443a6db3d9e7ebe6fdce97c8acb6b7fe9b67acc91a338fe855f5da9335e39b357ddb42d9c80efd625636a580a189a62c29f5384bf4ebd33530aba43 WHIRLPOOL 9966e27e0e5c7c0efa9b1f741b86940d17387a521ad80dfc0e774cce58a4534c80e563572fc50f44c23c7b253ea2982e2795a26244de2a5073ef7b4a139e74cc
+EBUILD glpk-4.55.ebuild 1347 SHA256 415f803488ceb9104ead4ffab284ca88e4974d26893d79235d1cf1be86c1b30b SHA512 85f8a0446443a6db3d9e7ebe6fdce97c8acb6b7fe9b67acc91a338fe855f5da9335e39b357ddb42d9c80efd625636a580a189a62c29f5384bf4ebd33530aba43 WHIRLPOOL 9966e27e0e5c7c0efa9b1f741b86940d17387a521ad80dfc0e774cce58a4534c80e563572fc50f44c23c7b253ea2982e2795a26244de2a5073ef7b4a139e74cc
+EBUILD glpk-4.57.ebuild 1315 SHA256 d590b71c771b07944a1c583b817c471b420d7a4c14296ca7aef9e7e389ccfe8e SHA512 bbf6657723a9acedfdcbdf4aacffdc0c10e04274bcb2405ea8cd4e16c5a17d1aa0a8c8cb29d24c17c47d805078ab54ba06595626ec8d1e1c7b1d91d1155f2231 WHIRLPOOL 743ad16be80dd8062ec7028deca813a57a7a196b9410057e44b08f6124c15a1c9af7c223bcd0096e739e45c7bb88d15137561fd142f0f1faf81a5dce9e555f99
+EBUILD glpk-4.60.ebuild 1321 SHA256 b671f9c496dd2727e07944624fec3869b50a31f8ebe51406f62c88c1bc3047c0 SHA512 d08285cad862a073fbaf8e5c33ce3220cd0dd0ac77f9b5d509d44ce83b26220727adf2251e190bd3cd0d59c8112e6d331c25e75b6e12947643b2366297fba2c4 WHIRLPOOL 8001fab2cdd16f1ea91bf2780a0f26a1a21c979ae8e638f27626969e1f6a78eb8185b60d58e98a086802de6f287cf6cda97f5fa7a2ca3b005d06b8af650f9918
+EBUILD glpk-4.61-r1.ebuild 1371 SHA256 840d75670251e229e2cc2338fbf3f6bdc8b5b107f068a13ccf62d4c53d094fa3 SHA512 0b5ff8d0c16d053fbe5cb9a98ac87207f433b7e9fae4ce3d80083a423e01ba8396080c42ffee55f64ab1c16d22bed37a3baf19d08975959c2232650fedffd74f WHIRLPOOL d732ed51b6ee155f8ff09a381f543d196933f53fec854226b6f4cdb8cbd8c9fd4b832e4e2b2d1ed2d01dc1f9f2976ae42f595dad973a311ce8cadc1c1d445053
+EBUILD glpk-4.63.ebuild 1370 SHA256 bcd793cff796457548531b2be38700fb1769627eb842d2ce08775bba687824d7 SHA512 e3cdcbe9d82c397ccbbfaf47daf4b826a4d373ef33b84486417a072c3f6a0e0e6ba3f5fba4b0f659d46abab78c6c5771bb7adf893432b6c31ec0132c4bcc2289 WHIRLPOOL 36555628f5a5090e287a7196a3b1c2206e81931081065971827ff410af18a7f3d9145af173ae955a684dcaad69afbf772f2596542b238f6ee2e195bec1942436
+MISC ChangeLog 3630 SHA256 0586aff273680ef8e4ce18d2cfe4b3b60bd841a2b56ff0b6dfcc3b6e415d383c SHA512 15259fb0e755e64b2ad33ba3d7cadab1b954f431917f847a65c41e412178d2f242b0bb6cbc1ebfa82afa62dc1f2b406d42889c3044c7fc881e758f215d8f5309 WHIRLPOOL 89ac2cc3a83229329e700e391751ff8cfdbf8dfe17bc30792ae0b3c7b6a0e1734ce6aaf0925819c6b29c7abdca560c168220cf2dfdd12f2aea702429d94ada78
+MISC ChangeLog-2015 10948 SHA256 581cb219e0a74c9d0f03c4396beea266cc37cc1daadba7b65b89bab09a7f4640 SHA512 5b57eab22f60815e27ee9fafd98e3c1481ca0ebfda35558c911c827768da7f2525d817a62f636e94fc3d4d62f4f5ff3dc09f3fdb1db2683beca987048e32437d WHIRLPOOL f216f24b75ede3ad5adb05d2595ba0c31dff38adea1d6c7506984e057273bab52fb29fbaff2128ae84b1abcc18ada4f2a2dbbb1e92112d396a9bd7022aee486e
+MISC metadata.xml 668 SHA256 8cbcca21a5696013e042f16c2983b1318d69fe0793c7091816ae6008a3f08c48 SHA512 0c37b2854097a14a58070b1651ccdcdfae652e7d2b5afd62c617e22fa0256acee07aab0409f6621382151e1fb5e605002a3a809113693b2078054a4b16e72452 WHIRLPOOL ec80a813ef0e6d90c3fe4eeb54e4869b9edc248ff06d91812859d8c145e9beaf1d9eb16cc7dc19a400951dd425e3d746e476df8deb2b6c008aebe13034b79db9
diff --git a/sci-mathematics/glpk/files/glpk-4.52.1-mariadb-5.5.patch b/sci-mathematics/glpk/files/glpk-4.52.1-mariadb-5.5.patch
new file mode 100644
index 000000000000..06aa8e5de95c
--- /dev/null
+++ b/sci-mathematics/glpk/files/glpk-4.52.1-mariadb-5.5.patch
@@ -0,0 +1,11 @@
+--- glpk-4.52.1/src/glpsql.c.orig 2014-02-05 22:14:21.487843989 +0100
++++ glpk-4.52.1/src/glpsql.c 2014-02-05 22:14:32.764510562 +0100
+@@ -1106,8 +1106,6 @@
+ #define byte_defined 1
+ #endif
+
+-#include <my_global.h>
+-#include <my_sys.h>
+ #include <mysql.h>
+
+ struct db_mysql
diff --git a/sci-mathematics/glpk/files/glpk-4.54-debundle-system-libs.patch b/sci-mathematics/glpk/files/glpk-4.54-debundle-system-libs.patch
new file mode 100644
index 000000000000..a3140341a483
--- /dev/null
+++ b/sci-mathematics/glpk/files/glpk-4.54-debundle-system-libs.patch
@@ -0,0 +1,86 @@
+Remove suitesparse (camd,colamd) and zlib bundles
+bicatali - apr 2014
+
+--- configure.ac.orig 2014-04-05 14:18:56.045148287 -0700
++++ configure.ac 2014-04-05 14:23:24.878803309 -0700
+@@ -59,6 +59,11 @@
+ dnl Check for math library
+ AC_CHECK_LIB([m], [exp])
+
++AC_CHECK_LIB([amd], [amd_1])
++AC_CHECK_LIB([colamd], [colamd])
++AC_CHECK_HEADER([amd.h])
++AC_CHECK_LIB([z], [gzopen])
++
+ dnl Check for <sys/time.h> header
+ AC_CHECK_HEADER([sys/time.h],
+ AC_DEFINE([HAVE_SYS_TIME_H], [1], [N/A]))
+--- src/Makefile.am.orig 2014-04-05 14:19:16.401273769 -0700
++++ src/Makefile.am 2014-04-05 14:21:56.696259485 -0700
+@@ -6,15 +6,12 @@
+
+ libglpk_la_CPPFLAGS = \
+ -I$(srcdir) \
+--I$(srcdir)/amd \
+ -I$(srcdir)/bflib \
+ -I$(srcdir)/cglib \
+--I$(srcdir)/colamd \
+ -I$(srcdir)/env \
+ -I$(srcdir)/minisat \
+ -I$(srcdir)/misc \
+--I$(srcdir)/proxy \
+--I$(srcdir)/zlib
++-I$(srcdir)/proxy
+
+ libglpk_la_LDFLAGS = \
+ -version-info 37:1:1 \
+@@ -92,18 +89,6 @@
+ glpssx02.c \
+ glptsp.c \
+ lux.c \
+-amd/amd_1.c \
+-amd/amd_2.c \
+-amd/amd_aat.c \
+-amd/amd_control.c \
+-amd/amd_defaults.c \
+-amd/amd_dump.c \
+-amd/amd_info.c \
+-amd/amd_order.c \
+-amd/amd_post_tree.c \
+-amd/amd_postorder.c \
+-amd/amd_preprocess.c \
+-amd/amd_valid.c \
+ bflib/btf.c \
+ bflib/btfint.c \
+ bflib/fhv.c \
+@@ -117,7 +102,6 @@
+ bflib/sva.c \
+ cglib/cfg.c \
+ cglib/cfg1.c \
+-colamd/colamd.c \
+ env/alloc.c \
+ env/dlsup.c \
+ env/env.c \
+@@ -150,21 +134,6 @@
+ misc/wclique.c \
+ misc/wclique1.c \
+ proxy/proxy.c \
+-proxy/proxy1.c \
+-zlib/adler32.c \
+-zlib/compress.c \
+-zlib/crc32.c \
+-zlib/deflate.c \
+-zlib/gzclose.c \
+-zlib/gzlib.c \
+-zlib/gzread.c \
+-zlib/gzwrite.c \
+-zlib/inffast.c \
+-zlib/inflate.c \
+-zlib/inftrees.c \
+-zlib/trees.c \
+-zlib/uncompr.c \
+-zlib/zio.c \
+-zlib/zutil.c
++proxy/proxy1.c
+
+ ## eof ##
diff --git a/sci-mathematics/glpk/files/glpk-4.57-debundle-system-libs.patch b/sci-mathematics/glpk/files/glpk-4.57-debundle-system-libs.patch
new file mode 100644
index 000000000000..d9efff2bb5f5
--- /dev/null
+++ b/sci-mathematics/glpk/files/glpk-4.57-debundle-system-libs.patch
@@ -0,0 +1,88 @@
+Remove suitesparse (camd,colamd) and zlib bundles
+bicatali - apr 2014
+Updated for 4.57 by soap (Jan 2016)
+
+--- glpk-4.57/configure.ac
++++ glpk-4.57/configure.ac
+@@ -59,6 +59,11 @@
+ dnl Check for math library
+ AC_CHECK_LIB([m], [exp])
+
++AC_CHECK_LIB([amd], [amd_1])
++AC_CHECK_LIB([colamd], [colamd])
++AC_CHECK_HEADER([amd.h])
++AC_CHECK_LIB([z], [gzopen])
++
+ dnl Check for <sys/time.h> header
+ AC_CHECK_HEADER([sys/time.h],
+ AC_DEFINE([HAVE_SYS_TIME_H], [1], [N/A]))
+--- glpk-4.57/src/Makefile.am
++++ glpk-4.57/src/Makefile.am
+@@ -6,16 +6,13 @@
+
+ libglpk_la_CPPFLAGS = \
+ -I$(srcdir) \
+--I$(srcdir)/amd \
+ -I$(srcdir)/bflib \
+ -I$(srcdir)/cglib \
+--I$(srcdir)/colamd \
+ -I$(srcdir)/env \
+ -I$(srcdir)/minisat \
+ -I$(srcdir)/misc \
+ -I$(srcdir)/proxy \
+--I$(srcdir)/simplex \
+--I$(srcdir)/zlib
++-I$(srcdir)/simplex
+
+ libglpk_la_LDFLAGS = \
+ -version-info 38:0:2 \
+@@ -90,18 +87,6 @@
+ glpssx01.c \
+ glpssx02.c \
+ lux.c \
+-amd/amd_1.c \
+-amd/amd_2.c \
+-amd/amd_aat.c \
+-amd/amd_control.c \
+-amd/amd_defaults.c \
+-amd/amd_dump.c \
+-amd/amd_info.c \
+-amd/amd_order.c \
+-amd/amd_post_tree.c \
+-amd/amd_postorder.c \
+-amd/amd_preprocess.c \
+-amd/amd_valid.c \
+ bflib/btf.c \
+ bflib/btfint.c \
+ bflib/fhv.c \
+@@ -115,7 +100,6 @@
+ bflib/sva.c \
+ cglib/cfg.c \
+ cglib/cfg1.c \
+-colamd/colamd.c \
+ env/alloc.c \
+ env/dlsup.c \
+ env/env.c \
+@@ -158,21 +142,6 @@
+ simplex/spxprob.c \
+ simplex/spychuzc.c \
+ simplex/spychuzr.c \
+-simplex/spydual.c \
+-zlib/adler32.c \
+-zlib/compress.c \
+-zlib/crc32.c \
+-zlib/deflate.c \
+-zlib/gzclose.c \
+-zlib/gzlib.c \
+-zlib/gzread.c \
+-zlib/gzwrite.c \
+-zlib/inffast.c \
+-zlib/inflate.c \
+-zlib/inftrees.c \
+-zlib/trees.c \
+-zlib/uncompr.c \
+-zlib/zio.c \
+-zlib/zutil.c
++simplex/spydual.c
+
+ ## eof ##
diff --git a/sci-mathematics/glpk/files/glpk-4.60-debundle-system-libs.patch b/sci-mathematics/glpk/files/glpk-4.60-debundle-system-libs.patch
new file mode 100644
index 000000000000..8790de5414fd
--- /dev/null
+++ b/sci-mathematics/glpk/files/glpk-4.60-debundle-system-libs.patch
@@ -0,0 +1,92 @@
+Remove suitesparse (camd,colamd) and zlib bundles
+bicatali - apr 2014
+Updated for 4.57 by soap (Jan 2016)
+Updated for 4.60 by bicatali (Dec 2016)
+
+--- glpk-4.60/configure.ac
++++ glpk-4.60/configure.ac
+@@ -59,6 +59,11 @@
+ dnl Check for math library
+ AC_CHECK_LIB([m], [exp])
+
++AC_CHECK_LIB([amd], [amd_1])
++AC_CHECK_LIB([colamd], [colamd])
++AC_CHECK_HEADER([amd.h])
++AC_CHECK_LIB([z], [gzopen])
++
+ dnl Check for <sys/time.h> header
+ AC_CHECK_HEADER([sys/time.h],
+ AC_DEFINE([HAVE_SYS_TIME_H], [1], [N/A]))
+
+--- glpk-4.60/src/Makefile.am
++++ glpk-4.60/src/Makefile.am
+@@ -6,18 +6,15 @@
+
+ libglpk_la_CPPFLAGS = \
+ -I$(srcdir) \
+--I$(srcdir)/amd \
+ -I$(srcdir)/api \
+ -I$(srcdir)/bflib \
+ -I$(srcdir)/cglib \
+--I$(srcdir)/colamd \
+ -I$(srcdir)/env \
+ -I$(srcdir)/minisat \
+ -I$(srcdir)/misc \
+ -I$(srcdir)/mpl \
+ -I$(srcdir)/proxy \
+--I$(srcdir)/simplex \
+--I$(srcdir)/zlib
++-I$(srcdir)/simplex
+
+ libglpk_la_LDFLAGS = \
+ -version-info 41:0:1 \
+@@ -63,18 +60,6 @@
+ glpssx02.c \
+ lux.c \
+ spv.c \
+-amd/amd_1.c \
+-amd/amd_2.c \
+-amd/amd_aat.c \
+-amd/amd_control.c \
+-amd/amd_defaults.c \
+-amd/amd_dump.c \
+-amd/amd_info.c \
+-amd/amd_order.c \
+-amd/amd_post_tree.c \
+-amd/amd_postorder.c \
+-amd/amd_preprocess.c \
+-amd/amd_valid.c \
+ api/advbas.c \
+ api/asnhall.c \
+ api/asnlp.c \
+@@ -142,7 +127,6 @@
+ cglib/gmicut.c \
+ cglib/gmigen.c \
+ cglib/mirgen.c \
+-colamd/colamd.c \
+ env/alloc.c \
+ env/dlsup.c \
+ env/env.c \
+@@ -195,21 +179,6 @@
+ simplex/spxprob.c \
+ simplex/spychuzc.c \
+ simplex/spychuzr.c \
+-simplex/spydual.c \
+-zlib/adler32.c \
+-zlib/compress.c \
+-zlib/crc32.c \
+-zlib/deflate.c \
+-zlib/gzclose.c \
+-zlib/gzlib.c \
+-zlib/gzread.c \
+-zlib/gzwrite.c \
+-zlib/inffast.c \
+-zlib/inflate.c \
+-zlib/inftrees.c \
+-zlib/trees.c \
+-zlib/uncompr.c \
+-zlib/zio.c \
+-zlib/zutil.c
++simplex/spydual.c
+
+ ## eof ##
diff --git a/sci-mathematics/glpk/files/glpk-4.63-debundle-system-libs.patch b/sci-mathematics/glpk/files/glpk-4.63-debundle-system-libs.patch
new file mode 100644
index 000000000000..e836219d0add
--- /dev/null
+++ b/sci-mathematics/glpk/files/glpk-4.63-debundle-system-libs.patch
@@ -0,0 +1,94 @@
+Remove suitesparse (camd,colamd) and zlib bundles
+bicatali - apr 2014
+Updated for 4.57 by soap (Jan 2016)
+Updated for 4.60 by bicatali (Dec 2016)
+Updated for 4.63 by bicatali (Jul 2017)
+
+diff -Nuar --exclude '*.orig' --exclude '*.rej' --exclude '*~' glpk-4.63.orig/configure.ac glpk-4.63/configure.ac
+--- glpk-4.63.orig/configure.ac 2017-07-25 00:00:00.000000000 -0700
++++ glpk-4.63/configure.ac 2017-07-27 14:10:47.986520907 -0700
+@@ -69,6 +69,11 @@
+ dnl Check for math library
+ AC_CHECK_LIB([m], [exp])
+
++AC_CHECK_LIB([amd], [amd_1])
++AC_CHECK_LIB([colamd], [colamd])
++AC_CHECK_HEADER([amd.h])
++AC_CHECK_LIB([z], [gzopen])
++
+ dnl Check for <sys/time.h> header
+ AC_CHECK_HEADER([sys/time.h],
+ AC_DEFINE([HAVE_SYS_TIME_H], [1], [N/A]))
+diff -Nuar --exclude '*.orig' --exclude '*.rej' --exclude '*~' glpk-4.63.orig/src/Makefile.am glpk-4.63/src/Makefile.am
+--- glpk-4.63.orig/src/Makefile.am 2017-07-25 00:00:00.000000000 -0700
++++ glpk-4.63/src/Makefile.am 2017-07-27 14:11:30.841536062 -0700
+@@ -6,18 +6,15 @@
+
+ libglpk_la_CPPFLAGS = \
+ -I$(srcdir) \
+--I$(srcdir)/amd \
+ -I$(srcdir)/api \
+ -I$(srcdir)/bflib \
+ -I$(srcdir)/cglib \
+--I$(srcdir)/colamd \
+ -I$(srcdir)/env \
+ -I$(srcdir)/minisat \
+ -I$(srcdir)/misc \
+ -I$(srcdir)/mpl \
+ -I$(srcdir)/proxy \
+--I$(srcdir)/simplex \
+--I$(srcdir)/zlib
++-I$(srcdir)/simplex
+
+ libglpk_la_LDFLAGS = \
+ -version-info 42:2:2 \
+@@ -57,18 +54,6 @@
+ glpssx01.c \
+ glpssx02.c \
+ lux.c \
+-amd/amd_1.c \
+-amd/amd_2.c \
+-amd/amd_aat.c \
+-amd/amd_control.c \
+-amd/amd_defaults.c \
+-amd/amd_dump.c \
+-amd/amd_info.c \
+-amd/amd_order.c \
+-amd/amd_post_tree.c \
+-amd/amd_postorder.c \
+-amd/amd_preprocess.c \
+-amd/amd_valid.c \
+ api/advbas.c \
+ api/asnhall.c \
+ api/asnlp.c \
+@@ -142,7 +127,6 @@
+ cglib/gmigen.c \
+ cglib/mirgen.c \
+ cglib/spv.c \
+-colamd/colamd.c \
+ env/alloc.c \
+ env/dlsup.c \
+ env/env.c \
+@@ -196,21 +180,6 @@
+ simplex/spxprob.c \
+ simplex/spychuzc.c \
+ simplex/spychuzr.c \
+-simplex/spydual.c \
+-zlib/adler32.c \
+-zlib/compress.c \
+-zlib/crc32.c \
+-zlib/deflate.c \
+-zlib/gzclose.c \
+-zlib/gzlib.c \
+-zlib/gzread.c \
+-zlib/gzwrite.c \
+-zlib/inffast.c \
+-zlib/inflate.c \
+-zlib/inftrees.c \
+-zlib/trees.c \
+-zlib/uncompr.c \
+-zlib/zio.c \
+-zlib/zutil.c
++simplex/spydual.c
+
+ ## eof ##
diff --git a/sci-mathematics/glpk/glpk-4.45.ebuild b/sci-mathematics/glpk/glpk-4.45.ebuild
new file mode 100644
index 000000000000..87a75a0c57ef
--- /dev/null
+++ b/sci-mathematics/glpk/glpk-4.45.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="GNU Linear Programming Kit"
+LICENSE="GPL-3"
+HOMEPAGE="https://www.gnu.org/software/glpk/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+SLOT="0"
+IUSE="doc examples gmp odbc mysql static-libs"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux"
+
+RDEPEND="sys-libs/zlib
+ odbc? ( || ( dev-db/libiodbc dev-db/unixODBC ) )
+ gmp? ( dev-libs/gmp )
+ mysql? ( virtual/mysql )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-4.52.1-mariadb-5.5.patch
+}
+
+src_configure() {
+ local myconf="--disable-dl"
+ if use mysql || use odbc; then
+ myconf="--enable-dl"
+ fi
+
+ [[ -z $(type -P odbc-config) ]] && \
+ append-cppflags $(pkg-config --cflags libiodbc)
+
+ econf \
+ --with-zlib \
+ $(use_enable static-libs static) \
+ $(use_with gmp) \
+ $(use_enable odbc) \
+ $(use_enable mysql) \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc AUTHORS ChangeLog NEWS README || \
+ die "failed to install docs"
+
+ insinto /usr/share/doc/${PF}
+ if use examples; then
+ emake distclean
+ doins -r examples || die "failed to install examples"
+ fi
+ if use doc; then
+ cd "${S}"/doc
+ doins *.pdf notes/*.pdf || die "failed to instal djvu and pdf"
+ dodoc *.txt || die "failed to install manual files"
+ fi
+}
diff --git a/sci-mathematics/glpk/glpk-4.48.ebuild b/sci-mathematics/glpk/glpk-4.48.ebuild
new file mode 100644
index 000000000000..f8ce132717c0
--- /dev/null
+++ b/sci-mathematics/glpk/glpk-4.48.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs autotools-utils
+
+DESCRIPTION="GNU Linear Programming Kit"
+LICENSE="GPL-3"
+HOMEPAGE="https://www.gnu.org/software/glpk/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+SLOT="0"
+IUSE="doc examples gmp odbc mysql static-libs"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+
+RDEPEND="
+ gmp? ( dev-libs/gmp:0 )
+ mysql? ( virtual/mysql )
+ odbc? ( || ( dev-db/libiodbc dev-db/unixODBC ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.52.1-mariadb-5.5.patch
+)
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable mysql)
+ $(use_enable odbc)
+ $(use_with gmp)
+ )
+ if use mysql || use odbc; then
+ myeconfargs+=( --enable-dl )
+ else
+ myeconfargs+=( --disable-dl )
+ fi
+ [[ -z $(type -P odbc-config) ]] && \
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags libiodbc)
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+ use doc && dodoc doc/*.pdf doc/notes/*.pdf doc/*.txt
+}
diff --git a/sci-mathematics/glpk/glpk-4.54.ebuild b/sci-mathematics/glpk/glpk-4.54.ebuild
new file mode 100644
index 000000000000..948bf8bbcafb
--- /dev/null
+++ b/sci-mathematics/glpk/glpk-4.54.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit eutils flag-o-matic toolchain-funcs autotools-utils
+
+DESCRIPTION="GNU Linear Programming Kit"
+LICENSE="GPL-3"
+HOMEPAGE="https://www.gnu.org/software/glpk/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+SLOT="0/36"
+IUSE="doc examples gmp odbc mysql static-libs"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ sci-libs/amd:0=
+ sci-libs/colamd:=
+ sys-libs/zlib:0=
+ gmp? ( dev-libs/gmp:0= )
+ mysql? ( virtual/mysql )
+ odbc? ( || ( dev-db/libiodbc:0 dev-db/unixODBC:0 ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.54-debundle-system-libs.patch
+)
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable mysql)
+ $(use_enable odbc)
+ $(use_with gmp)
+ )
+ if use mysql || use odbc; then
+ myeconfargs+=( --enable-dl )
+ else
+ myeconfargs+=( --disable-dl )
+ fi
+ [[ -z $(type -P odbc-config) ]] && \
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags libiodbc)
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ use doc && dodoc doc/*.pdf doc/notes/*.pdf doc/*.txt
+}
diff --git a/sci-mathematics/glpk/glpk-4.55.ebuild b/sci-mathematics/glpk/glpk-4.55.ebuild
new file mode 100644
index 000000000000..948bf8bbcafb
--- /dev/null
+++ b/sci-mathematics/glpk/glpk-4.55.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit eutils flag-o-matic toolchain-funcs autotools-utils
+
+DESCRIPTION="GNU Linear Programming Kit"
+LICENSE="GPL-3"
+HOMEPAGE="https://www.gnu.org/software/glpk/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+SLOT="0/36"
+IUSE="doc examples gmp odbc mysql static-libs"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ sci-libs/amd:0=
+ sci-libs/colamd:=
+ sys-libs/zlib:0=
+ gmp? ( dev-libs/gmp:0= )
+ mysql? ( virtual/mysql )
+ odbc? ( || ( dev-db/libiodbc:0 dev-db/unixODBC:0 ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.54-debundle-system-libs.patch
+)
+
+src_configure() {
+ local myeconfargs=(
+ $(use_enable mysql)
+ $(use_enable odbc)
+ $(use_with gmp)
+ )
+ if use mysql || use odbc; then
+ myeconfargs+=( --enable-dl )
+ else
+ myeconfargs+=( --disable-dl )
+ fi
+ [[ -z $(type -P odbc-config) ]] && \
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags libiodbc)
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ use doc && dodoc doc/*.pdf doc/notes/*.pdf doc/*.txt
+}
diff --git a/sci-mathematics/glpk/glpk-4.57.ebuild b/sci-mathematics/glpk/glpk-4.57.ebuild
new file mode 100644
index 000000000000..db5c9d1472c0
--- /dev/null
+++ b/sci-mathematics/glpk/glpk-4.57.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic toolchain-funcs
+
+DESCRIPTION="GNU Linear Programming Kit"
+LICENSE="GPL-3"
+HOMEPAGE="https://www.gnu.org/software/glpk/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+SLOT="0/36"
+IUSE="doc examples gmp odbc mysql static-libs"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+
+RDEPEND="
+ sci-libs/amd:0=
+ sci-libs/colamd:=
+ sys-libs/zlib:0=
+ gmp? ( dev-libs/gmp:0= )
+ mysql? ( virtual/mysql )
+ odbc? ( || ( dev-db/libiodbc:0 dev-db/unixODBC:0 ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-debundle-system-libs.patch
+)
+
+src_prepare() {
+ use odbc && [[ -z $(type -P odbc_config) ]] && \
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags libiodbc)
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ if use mysql || use odbc; then
+ myconf="--enable-dl"
+ else
+ myconf="--disable-dl"
+ fi
+
+ econf ${myconf} \
+ $(use_enable mysql) \
+ $(use_enable odbc) \
+ $(use_with gmp)
+}
+
+src_install() {
+ default
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ use doc && dodoc doc/*.pdf doc/notes/*.pdf doc/*.txt
+}
diff --git a/sci-mathematics/glpk/glpk-4.60.ebuild b/sci-mathematics/glpk/glpk-4.60.ebuild
new file mode 100644
index 000000000000..e860582c03f0
--- /dev/null
+++ b/sci-mathematics/glpk/glpk-4.60.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic toolchain-funcs
+
+DESCRIPTION="GNU Linear Programming Kit"
+LICENSE="GPL-3"
+HOMEPAGE="https://www.gnu.org/software/glpk/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+SLOT="0/40"
+IUSE="doc examples gmp odbc mysql static-libs"
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+
+RDEPEND="
+ sci-libs/amd:0=
+ sci-libs/colamd:=
+ sys-libs/zlib:0=
+ gmp? ( dev-libs/gmp:0= )
+ mysql? ( virtual/mysql )
+ odbc? ( || ( dev-db/libiodbc:0 dev-db/unixODBC:0 ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-debundle-system-libs.patch
+)
+
+src_prepare() {
+ use odbc && [[ -z $(type -P odbc_config) ]] && \
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags libiodbc)
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ if use mysql || use odbc; then
+ myconf="--enable-dl"
+ else
+ myconf="--disable-dl"
+ fi
+
+ econf ${myconf} \
+ $(use_enable mysql) \
+ $(use_enable odbc) \
+ $(use_with gmp)
+}
+
+src_install() {
+ default
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ use doc && dodoc doc/*.pdf doc/notes/*.pdf doc/*.txt
+}
diff --git a/sci-mathematics/glpk/glpk-4.61-r1.ebuild b/sci-mathematics/glpk/glpk-4.61-r1.ebuild
new file mode 100644
index 000000000000..dfc1dfe7f6c9
--- /dev/null
+++ b/sci-mathematics/glpk/glpk-4.61-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic toolchain-funcs
+
+DESCRIPTION="GNU Linear Programming Kit"
+LICENSE="GPL-3"
+HOMEPAGE="https://www.gnu.org/software/glpk/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+SLOT="0/40"
+IUSE="doc examples gmp odbc mysql static-libs"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+
+RDEPEND="
+ sci-libs/amd:0=
+ sci-libs/colamd:=
+ sys-libs/zlib:0=
+ gmp? ( dev-libs/gmp:0= )
+ mysql? ( virtual/mysql )
+ odbc? ( || ( dev-db/libiodbc:0 dev-db/unixODBC:0 ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.60-debundle-system-libs.patch
+)
+
+src_prepare() {
+ use odbc && [[ -z $(type -P odbc_config) ]] && \
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags libiodbc)
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ if use mysql || use odbc; then
+ myconf="--enable-dl"
+ else
+ myconf="--disable-dl"
+ fi
+
+ econf ${myconf} \
+ $(use_enable mysql) \
+ $(use_enable odbc) \
+ $(use_enable static-libs static) \
+ $(use_with gmp)
+}
+
+src_install() {
+ default
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ use doc && dodoc doc/*.pdf doc/notes/*.pdf doc/*.txt
+}
diff --git a/sci-mathematics/glpk/glpk-4.63.ebuild b/sci-mathematics/glpk/glpk-4.63.ebuild
new file mode 100644
index 000000000000..73e2f18581cf
--- /dev/null
+++ b/sci-mathematics/glpk/glpk-4.63.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic toolchain-funcs
+
+DESCRIPTION="GNU Linear Programming Kit"
+LICENSE="GPL-3"
+HOMEPAGE="https://www.gnu.org/software/glpk/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+SLOT="0/40"
+IUSE="doc examples gmp odbc mysql static-libs"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
+
+RDEPEND="
+ sci-libs/amd:0=
+ sci-libs/colamd:=
+ sys-libs/zlib:0=
+ gmp? ( dev-libs/gmp:0= )
+ mysql? ( virtual/mysql )
+ odbc? ( || ( dev-db/libiodbc:0 dev-db/unixODBC:0 ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.63-debundle-system-libs.patch
+)
+
+src_prepare() {
+ use odbc && [[ -z $(type -P odbc_config) ]] && \
+ append-cppflags $($(tc-getPKG_CONFIG) --cflags libiodbc)
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ if use mysql || use odbc; then
+ myconf="--enable-dl"
+ else
+ myconf="--disable-dl"
+ fi
+
+ econf ${myconf} \
+ $(use_enable mysql) \
+ $(use_enable odbc) \
+ $(use_enable static-libs static) \
+ $(use_with gmp)
+}
+
+src_install() {
+ default
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ use doc && dodoc doc/*.pdf doc/notes/*.pdf doc/*.txt
+}
diff --git a/sci-mathematics/glpk/metadata.xml b/sci-mathematics/glpk/metadata.xml
new file mode 100644
index 000000000000..237a45406ed4
--- /dev/null
+++ b/sci-mathematics/glpk/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The GNU Linear Programming Kit package is intended for solving
+ large-scale linear programming (LP), mixed integer programming
+ (MIP), and other related problems. It is a set of routines written
+ in ANSI C and organized in the form of a callable library.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/gmm/Manifest b/sci-mathematics/gmm/Manifest
new file mode 100644
index 000000000000..d3e01cfbfeee
--- /dev/null
+++ b/sci-mathematics/gmm/Manifest
@@ -0,0 +1,5 @@
+DIST gmm-5.1.tar.gz 537290 SHA256 90e6bf309b81f496b401a375fe99826ad4b5c6ba99db6c92b37f9261db462636 SHA512 403074c2efedf2d9f63076a46faabb27c1bc19356284fac89aef58220ce0900d126b6f1a4f9bbef1641be1d609a8379729cad063695a570756ae0b2c470cedad WHIRLPOOL 6d152bb978b66cfdd70042ceab866365a377e76206867ee090b727f50fcc0f68796dae3754240a2fc6bb4c4de09fe0e45d2518a1098fa85a003f6bacaf62bbc9
+EBUILD gmm-5.1.ebuild 571 SHA256 c5ce4b6f78178a3e45bcefea2a931ac8c161d04e41cc220473cec7ca776c16fe SHA512 38e82747d1144b37b682b3599024af980e8d2e38a7f4bd078dcec3866c1709c0ec494fe95b271ca26df2ed3cf927d6465088a6bf9e9eea0742fcf7e8e4c7f78a WHIRLPOOL f528c8ed0042e307b0a28e10d4f5e0f8bdea6f92c3e18740b87bf3e8382aed1788e8be63b98ff78fb7c65a2d0a09b4bc9b4a29a7efe0ddbbbc3eb0166411e6bc
+MISC ChangeLog 3103 SHA256 a68d19600e1355dc0f5b695b0e91d4c2b86dd39145548d49ba35da8a3b447ad7 SHA512 569a33771bcb7b3a3d09e074ef209e88ba3e52cc8355d5018d357101170d73d1ac95ddc36b2e6e00394f4fd0836d80186458ef8c9899cdadbfecf25f73e8fdff WHIRLPOOL 55e12b2fdcdbc4b9adc4c439117ee24adf3ae8b963e80b45044620b5e96dee5f9c8be4a3826d9116ca9d019f05d90a5ae65f860fd9c2e793c6beec3d918f8ad6
+MISC ChangeLog-2015 4041 SHA256 e4af67d623d54b5d88f4af76b3c7575c0080e8a1461926577d9fe5ed91de2314 SHA512 9e772dcec1bd34ece1c2a826c0fa88efe316676f38ee40e038f6e9fec3d5ad839979bca97d91a15c040ba3e936d3a6eafb1369f2b40ae1e0ae27a6cb659ca5c0 WHIRLPOOL 626907aca614385570208643c2b05151e7dab1afb62ef6e31d4b2b448cddd02e0f1902b08f8ebfc82468048020693b1394c2dce791ee99c32b51ef74de9c6834
+MISC metadata.xml 747 SHA256 e94581878b7061b4ef22ed87c34b2f61b41c71ead737a31b8667b921b696b746 SHA512 10c681ecfb5f05c61b24badecdc640e92053c56b3d1c3a324a8664a6c4012823c08070f7fd7334007353b04203f5570ded69821779446ce209896301741b7415 WHIRLPOOL aa70e119e205c46bc38073b2a09a2ec12a9d1ab961d54d21f71bf9bbae2fc47a82b1f3fd35ae9123cbf4d18ed78cf818d2e17b54f36bb05171de4d430c07557e
diff --git a/sci-mathematics/gmm/gmm-5.1.ebuild b/sci-mathematics/gmm/gmm-5.1.ebuild
new file mode 100644
index 000000000000..afc103e6cc62
--- /dev/null
+++ b/sci-mathematics/gmm/gmm-5.1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+DESCRIPTION="Generic C++ template library for sparse, dense and skyline matrices"
+SRC_URI="https://download.gna.org/getfem/stable/${P}.tar.gz"
+HOMEPAGE="https://www-gmm.insa-toulouse.fr/getfem/"
+
+LICENSE="|| ( LGPL-3 LGPL-3-with-linking-exception )"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~hppa ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE=""
+
+src_configure() {
+ # required for tests, #612294
+ append-cxxflags -std=c++14
+
+ default
+}
diff --git a/sci-mathematics/gmm/metadata.xml b/sci-mathematics/gmm/metadata.xml
new file mode 100644
index 000000000000..ace95c48b19f
--- /dev/null
+++ b/sci-mathematics/gmm/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>amynka@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+ Gmm++ is a generic C++ template library for sparse, dense and
+ skyline matrices. It is built as a set of generic algorithms (mult,
+ add, copy, sub-matrices, dense and sparse solvers ...) for any
+ interfaced vector type or matrix type. It can be view as a glue
+ library allowing cooperation between several vector and matrix
+ types. However, basic sparse, dense and skyline matrix/vector types
+ are built in Gmm++, hence it can be used as a standalone linear
+ algebra library.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/gmp-ecm/Manifest b/sci-mathematics/gmp-ecm/Manifest
new file mode 100644
index 000000000000..89e42cc6b181
--- /dev/null
+++ b/sci-mathematics/gmp-ecm/Manifest
@@ -0,0 +1,8 @@
+DIST gmp-ecm-6.4.3.tar.gz 944719 SHA256 946c9870c0b76ada2f6342515386828800c096fe32ff347c82374d5a4ec73685 SHA512 71ccdf3b48e96b0acad45302c87a7b17a20ad289efde212a34fb11491531b96848f1824606fdab7604874ca7d8165baba4bbfbc8424e27e8844444ad0d4f56a6 WHIRLPOOL b177904307fefbffc0c8aec2d20eb6de8475428f84f4e263b032fd47b671dba44211a2fcb80cacead76545429a7df5cd444137853145ee4ced62cb8356753579
+DIST gmp-ecm-6.4.4.tar.gz 941058 SHA256 c813a814592d8092745012debdba25388211e1a2579c26183adda7cfa215b06c SHA512 039009de2d1a22de7abed2e2b843fa2bc684ddcfc45892891a24b93ad4b3640a97d2e7612ebcbdbca8db032534c226ad77c67199772b21a6139e5fa205687097 WHIRLPOOL 47cb942a4e3fd3d8a978df031dbcb19ea200e43eb9cd6ac2a9b551b7d7a8caed6f2e6ec8d7f7ec84584035b24ed2b49839582f758d245df8e297038d82be2cf8
+EBUILD gmp-ecm-6.4.3-r5.ebuild 1527 SHA256 b06fd19cd5c80297be388601d242bdfc5d4a85bb2b95f6172f91a2dd9b2a3bde SHA512 c24c1ae83890157b556f8bdf50602ad89ccb9b121a393c49a6d15c5c1e0f936752712e80acf275844f7bf30abe3309f2eb2a351b9191e7208c111f9a89abc31b WHIRLPOOL c5405dcae288723ab67fd302e4512e1435618e6e3bf7beded4d1c48ac0aafe02832c20656eece53074a3896151219b8650dc793c6ea87ebe0a197d9bd41c2c11
+EBUILD gmp-ecm-6.4.4-r1.ebuild 1649 SHA256 d95f8f4d63720788764ea3f9988edbd1994796ac3343f47fa8a0b79423487a07 SHA512 1428f77708781c19dff5ff426821dcc8a1e3f612186993fcb4aa9280c31eed2909d5637d7d8ab7d6d461b1377c5ea2d5ccb1b1fd5f80384c89a87d3f0bfa2e31 WHIRLPOOL e9cc10a60e2567c0d32b67dace8324b6bd39d51020a6624c20344d357273478960dd56be4525413d4f3c93f3ee8350318d3e043e53d7517534125a92aa9ab80b
+EBUILD gmp-ecm-9999.ebuild 1183 SHA256 004b038210e5cc00b836067749898f2e8f8db2fbc37a244c4f5c3b4297a13038 SHA512 8228893e6e7392e2ba8dafa8479cf960870b0944dd5e40a3b3e3d9f37db4bea21430605d06bf168c089dd8fb95ac4a88e73793e81be058b84cc4f326c810c76c WHIRLPOOL 71b5dec7c7b5372409c8b12ada891eedadff7b4c762a9b80c3eec95c1966cb83f6adeb426e8834f6771b29bd1c53337a511bf3e927a79c164c4821707ebdcac5
+MISC ChangeLog 2557 SHA256 7cb622a0837d5f3276eebd1f1a29f13778429d0206a8252e2523e58164476466 SHA512 4ecb1324ac72be23fb72df225d154322c8054f1d6a5339785c8428a0c5e533bc4258b7e04b6104459a42338c225912e6e54004d467c63b54416579624754645f WHIRLPOOL d0c60d99b9441d41dec9f1f5aae90548d9cb0bf4eb9ea0c8b7d9d434c00153f8bd9d4fe1aacafc1a636a325a273c5d5b1eee57fcaa03e157591ea22eef83c0ba
+MISC ChangeLog-2015 2220 SHA256 06b21ac380258d6f93bb3723c8aa8181afd4cb708e8a157f2e0f40bea58854fb SHA512 257ac0721567ea1c6c7885c80ccc44a9d210ff08fc2c5c2e9db980de1fb7f4f5d265064ecb5409ab672bf4bb0e035a1afe715e8558399b932ef5f1d79caa350d WHIRLPOOL c784c9f70e0d106e11026292290f51ce577fdd7d74c5ca2911c9d79daa70606690bcc6765c83db8031411455d35ac81cb21447bcc4fbdee6f9879eae803b95dd
+MISC metadata.xml 443 SHA256 8dd44cc20355874b9d51f59381841475314a44587df029ede32cd99482f5a159 SHA512 6da5d2c056bb4924e15ed21993ad60755616a59be5fb0b5a94f9869f3ff03ed45df9512e2b22e29d65b27b32d4a8d97cfeb99559e0c0682333485f8d187c4b46 WHIRLPOOL ec5c1616e477ec654a17808a5a9943a538335cd1b8601a8987c43a7ebbb3574b6ff2e1cdf7ff2f2f13507fd61c6a3405599c543b4c2a3e8ab8cc7f69a71d8c62
diff --git a/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r5.ebuild b/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r5.ebuild
new file mode 100644
index 000000000000..e60693532085
--- /dev/null
+++ b/sci-mathematics/gmp-ecm/gmp-ecm-6.4.3-r5.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+DESCRIPTION="Elliptic Curve Method for Integer Factorization"
+HOMEPAGE="http://ecm.gforge.inria.fr/"
+SRC_URI="https://gforge.inria.fr/frs/download.php/30965/${P}.tar.gz"
+
+inherit eutils
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+blas +custom-tune gwnum -openmp test"
+
+# gmp 5.1 breaks a few things with this version
+DEPEND="<dev-libs/gmp-5.1.0
+ blas? ( sci-libs/gsl )
+ gwnum? ( sci-mathematics/gwnum )
+ openmp? ( sys-devel/gcc[openmp] )"
+RDEPEND="${DEPEND}"
+
+# can't be both enabled
+REQUIRED_USE="gwnum? ( !openmp )"
+
+S=${WORKDIR}/ecm-${PV}
+
+src_configure() {
+ if use gwnum; then myconf="--with-gwnum=/usr/lib"; fi
+ # --enable-shellcmd is broken
+ econf $(use_enable openmp) $myconf
+}
+
+src_compile() {
+ if use custom-tune; then
+ use amd64 && cd x86_64
+ use x86 && cd pentium4
+ emake -j1 || die # build libecm/libmulredc.la
+ cd .. && make bench_mulredc || die
+ sed -i -e 's:#define TUNE_MULREDC_TABLE://#define TUNE_MULREDC_TABLE:g' `readlink ecm-params.h` || die
+ sed -i -e 's:#define TUNE_SQRREDC_TABLE://#define TUNE_SQRREDC_TABLE:g' `readlink ecm-params.h` || die
+ ./bench_mulredc | tail -n 4 >> `readlink ecm-params.h` || die
+ fi
+ emake -j1 || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ mkdir -p "${D}/usr/include/${PN}/"
+ cp "${S}"/*.h "${D}/usr/include/${PN}" || die "Failed to copy headers" # needed by other apps like YAFU
+}
+
+src_test() {
+ make check || die
+}
diff --git a/sci-mathematics/gmp-ecm/gmp-ecm-6.4.4-r1.ebuild b/sci-mathematics/gmp-ecm/gmp-ecm-6.4.4-r1.ebuild
new file mode 100644
index 000000000000..209011200da1
--- /dev/null
+++ b/sci-mathematics/gmp-ecm/gmp-ecm-6.4.4-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib
+
+DESCRIPTION="Elliptic Curve Method for Integer Factorization"
+HOMEPAGE="http://ecm.gforge.inria.fr/"
+SRC_URI="https://gforge.inria.fr/frs/download.php/32159/${P}.tar.gz"
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+blas +custom-tune gwnum -openmp static-libs test"
+
+DEPEND="
+ dev-libs/gmp:0=
+ blas? ( sci-libs/gsl )
+ gwnum? ( sci-mathematics/gwnum )
+ openmp? ( sys-devel/gcc:*[openmp] )"
+RDEPEND="${DEPEND}"
+
+# can't be both enabled
+REQUIRED_USE="gwnum? ( !openmp )"
+
+S=${WORKDIR}/ecm-${PV}
+
+MAKEOPTS+=" -j1"
+
+src_prepare() {
+ sed -e '/libecm_la_LIBADD/s:$: -lgmp:g' -i Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ use gwnum && local myconf="--with-gwnum="${EPREFIX}"/usr/$(get_libdir)"
+ # --enable-shellcmd is broken
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ $(use_enable openmp) \
+ ${myconf}
+}
+
+src_compile() {
+ append-ldflags "-Wl,-z,noexecstack"
+ if use custom-tune; then
+ use amd64 && cd x86_64
+ use x86 && cd pentium4
+ emake
+ cd .. && make bench_mulredc || die
+ sed -i -e 's:#define TUNE_MULREDC_TABLE://#define TUNE_MULREDC_TABLE:g' `readlink ecm-params.h` || die
+ sed -i -e 's:#define TUNE_SQRREDC_TABLE://#define TUNE_SQRREDC_TABLE:g' `readlink ecm-params.h` || die
+ ./bench_mulredc | tail -n 4 >> `readlink ecm-params.h` || die
+ fi
+ default
+}
+
+src_install() {
+ default
+ mkdir -p "${ED}/usr/include/${PN}/"
+ cp "${S}"/*.h "${ED}/usr/include/${PN}" || die "Failed to copy headers" # needed by other apps like YAFU
+}
diff --git a/sci-mathematics/gmp-ecm/gmp-ecm-9999.ebuild b/sci-mathematics/gmp-ecm/gmp-ecm-9999.ebuild
new file mode 100644
index 000000000000..a7936e1d8eab
--- /dev/null
+++ b/sci-mathematics/gmp-ecm/gmp-ecm-9999.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Elliptic Curve Method for Integer Factorization"
+HOMEPAGE="http://ecm.gforge.inria.fr/"
+#SRC_URI="https://gforge.inria.fr/frs/download.php/30965/${P}.tar.gz"
+ESVN_REPO_URI="svn://scm.gforge.inria.fr/svnroot/ecm/trunk"
+
+inherit autotools eutils flag-o-matic subversion
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="blas gwnum -openmp test"
+
+DEPEND="
+ dev-libs/gmp:0=
+ blas? ( sci-libs/gsl )
+ gwnum? ( sci-mathematics/gwnum )
+ openmp? ( sys-devel/gcc:*[openmp] )"
+RDEPEND="${DEPEND}"
+
+# can't be both enabled
+REQUIRED_USE="gwnum? ( !openmp )"
+
+S=${WORKDIR}/ecm-${PV}
+
+MAKEOPTS+=" -j1"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ if use gwnum; then myconf="--with-gwnum=/usr/lib"; fi
+ # --enable-shellcmd is broken
+ econf $(use_enable openmp) $myconf
+}
+
+src_compile() {
+ append-ldflags "-Wl,-z,noexecstack"
+ # the custom-tune bits are obsoleted with sane defaults
+ default
+}
+
+src_install() {
+ default
+ mkdir -p "${D}/usr/include/${PN}/"
+ cp "${S}"/*.h "${D}/usr/include/${PN}" || die "Failed to copy headers" # needed by other apps like YAFU
+}
diff --git a/sci-mathematics/gmp-ecm/metadata.xml b/sci-mathematics/gmp-ecm/metadata.xml
new file mode 100644
index 000000000000..928a8daa2073
--- /dev/null
+++ b/sci-mathematics/gmp-ecm/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <use>
+ <flag name="custom-tune">Improve performance of some operations by selecting machine-specific defaults</flag>
+ <flag name="gwnum">Use GWNum lib where possible</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/gretl/Manifest b/sci-mathematics/gretl/Manifest
new file mode 100644
index 000000000000..292028b4a75d
--- /dev/null
+++ b/sci-mathematics/gretl/Manifest
@@ -0,0 +1,9 @@
+AUX 50gretl-gentoo.el 473 SHA256 7f5398d85016858044257a900e33d9441aa7a3981ac1d71feff79c26b03aa939 SHA512 dff2fd680e295ba8cd722092d5ffe8cb36cd9b79f2ed2be69c8adaa5e414a456abb40c0ec70a6fc0d6b9fb09bf936e3c6ef6804f87bde62d86d3692c34ec595e WHIRLPOOL 6ab37909501bd70482b3b0f0f7febf8930701aafbd227c1bba6c0d9f50be3c46947eb236e1e30b43d7313f739a1b49727d40fc4e055672ce6d4e812a26cfeec8
+AUX gretl-1.9.14-readline.patch 390 SHA256 be172668e2e85b1ac8490b9aeb3f205189cf270ea65e89d76805fad136e4d987 SHA512 e67dc762b90fa9dee505155452008667916724e669216da09816a2236b863d9798e091237bbb722aea91e42c6ce1fe50deff33cc4148a7b403c1a455f4c74177 WHIRLPOOL 7f02f2638db3bca1edb84ccd3e169f208c8095638c1d1d8516551822684e6198c5d62f0a38769f19ea447d28cb660377b320d23990bdc99041c13b0bef6d3b50
+DIST gretl-1.9.14.tar.xz 7564192 SHA256 ceabb8cbf461ab340093f3d38d9c87d91f6d17c62906d3d8d7bfe58812ba965b SHA512 61ff44cc52f3da971d3cf2cc6e52e0401280521fd761ea098f753acc529c9d35a12fc296b46136d5d257c9a29a83f91a78a77822a00ce3f65776a17f97223ee1 WHIRLPOOL d592d50ba57cfcde2cba6e31199f2d853d300fe5fcc4e2afc6c9906f8f9f6c3ac02a2d24a98c53fb86fb92e7c133717bbdadaa6bd93406d1deb69b3b30be2756
+DIST gretl-1.9.90.tar.xz 7764820 SHA256 f14941786de985e40af8e5f31fb71ee05b17002627055f0f6341b63258c4fdcc SHA512 35ec45fb2ad2dec490567411c1a5d909dc7fc8f0c4a6ca142e6e92b2d95a9efc9581f154a7806cf3f5178b530cdca9508b7c215bca29e1bcaebfa874d476667a WHIRLPOOL c688135030057df291576b5e8e08300d59b183a013064ae9adb7a934e4fd5436b0b2b23d27f340dcd4c0aac24fd16419dd377e3c650a2c90705e5caa8cedf24f
+EBUILD gretl-1.9.14.ebuild 2564 SHA256 200eabf4422359b8497cefad5365c8c8038a98974d6b4ba513402224bb833cc3 SHA512 8d582245edbf018e413015a8e6775dffbcb6bf7a7fda2562fd5765e4b3146e4b43156ced5b8bd484d1bb7d643caee06e5e51d502c5fb15d68359a0210842c8a9 WHIRLPOOL 79d3715267211465492d047e74c39184f175c232b8307a0c9b59459f9c5cb4ce08e19d42e120dd6b9ea34397250fa18f9fd7b3ea9ff4408d940cb8854642dc10
+EBUILD gretl-1.9.90.ebuild 2700 SHA256 d443ffba42871113d49053a6f763ee8b86ecb0131f1c8829b1f7c7a7b7dc42c9 SHA512 fe5c407c2b6259fc0921f012b7a19f48a5068482f2dede71ab11eff05f2344cec5a14be582d65aa0644a21d124f5be047201e2364194924dac68e339f181fb66 WHIRLPOOL 8165df3ed0cc234f8452fab99052cce8db690b55681f7d79ce3b5a48e0afcf4976ea2b4227ee14132b2e3b8462293d0ff298a50eb93c2693c85574eb2c5472ae
+MISC ChangeLog 2672 SHA256 67f0ef52909947a77adf5733ddf82c9aa8c1d553bc99f6ddd8c6f2702394faf8 SHA512 caeede82a067bf7c41db144334c9cbd178b53ba2afb532ab2477fc433564a6215e4a62ee559c4d6af8a90dfe8414ed793a85e3915d8fb71f830302a4b85473a0 WHIRLPOOL 94b1680257dd7097771fdabc6e633643cd58d37d510f5cf76813310ea6b1306d6f6feee46f99155c42db30d5c683e7f3b81d41392c900c83152ae729fe68a43f
+MISC ChangeLog-2015 8301 SHA256 62d79b4d1348c4797aee80b7988cc85e5072ca7ae4095d7361efaf9fd5627ab1 SHA512 59e2f7caa9ade3da477de557b558e7e4b9965c7bc45bfe2de83644d19e8755e4248eeeaef009d210c403fddf30d613f763bb1556ebd16334a337649229d457cc WHIRLPOOL d64a1108f703215c1ef8b2469508c345f0ffc8ea824acc3a254a95e944d78e6fc25e2ed202d37fdc9aa45997c915f69efbd37c09567165338f60a1350bcf7f87
+MISC metadata.xml 1122 SHA256 0afaca4222891d50992d18f84a9e9cf786de9c3292775987af03d9cd24bf75ed SHA512 d5f169c5b22c7991efb2080425f682d51b9c5acd472d3f3155f64a45044c1a9a449ca5d34be9f792d7ce62be41584926c35896ffaf82c07fd6aeca17d0da423d WHIRLPOOL 3adbf0fa7ab3f3af1d5d3e9cc955e4ae310b1bf769b7a35c2010111e2375d51547b059feb0977ec1a9e8ddb7ce97eecb3f74f535b5627eef0903467a995e5b4f
diff --git a/sci-mathematics/gretl/files/50gretl-gentoo.el b/sci-mathematics/gretl/files/50gretl-gentoo.el
new file mode 100644
index 000000000000..c5f3159efc0b
--- /dev/null
+++ b/sci-mathematics/gretl/files/50gretl-gentoo.el
@@ -0,0 +1,16 @@
+
+;;; sci-mathematics/gretl site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+
+(autoload 'gretl-mode "gretl" nil t)
+;; not adding to auto-mode-alist since .inp is too generic as extension
+;;(add-to-list 'auto-mode-alist '("\\.inp\\'" . gretl-mode))
+
+;; Automatically turn on the abbrev, auto-fill and font-lock features
+(add-hook 'gretl-mode-hook
+ (lambda ()
+ (abbrev-mode 1)
+ (auto-fill-mode 1)
+ (if (eq window-system 'x)
+ (font-lock-mode 1))))
diff --git a/sci-mathematics/gretl/files/gretl-1.9.14-readline.patch b/sci-mathematics/gretl/files/gretl-1.9.14-readline.patch
new file mode 100644
index 000000000000..9f6996b9c916
--- /dev/null
+++ b/sci-mathematics/gretl/files/gretl-1.9.14-readline.patch
@@ -0,0 +1,10 @@
+--- cli/complete.c.ORIG 2007-08-22 16:44:46.000000000 +0200
++++ cli/complete.c 2014-03-26 16:54:40.463070119 +0100
+@@ -126,6 +126,6 @@
+ rl_readline_name = "gretl";
+
+ /* Tell the completer that we want a crack first. */
+- rl_attempted_completion_function = (CPPFunction *) gretl_completion;
++ rl_attempted_completion_function = (rl_completion_func_t*) gretl_completion;
+ }
+
diff --git a/sci-mathematics/gretl/gretl-1.9.14.ebuild b/sci-mathematics/gretl/gretl-1.9.14.ebuild
new file mode 100644
index 000000000000..3d18e40578d0
--- /dev/null
+++ b/sci-mathematics/gretl/gretl-1.9.14.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+USE_EINSTALL=true
+
+inherit eutils elisp-common toolchain-funcs
+
+DESCRIPTION="Regression, econometrics and time-series library"
+HOMEPAGE="http://gretl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="accessibility cpu_flags_x86_avx emacs gnome gtk nls odbc openmp python
+ readline cpu_flags_x86_sse2 R static-libs"
+
+CDEPEND="
+ dev-libs/glib:2
+ dev-libs/gmp:0=
+ dev-libs/libxml2:2
+ dev-libs/mpfr:0
+ sci-libs/fftw:3.0
+ sci-visualization/gnuplot
+ virtual/lapack
+ virtual/latex-base
+ accessibility? ( app-accessibility/flite )
+ emacs? ( virtual/emacs )
+ gtk? (
+ media-libs/gd[png]
+ sci-visualization/gnuplot[gd]
+ x11-libs/gtk+:3
+ x11-libs/gtksourceview:3.0 )
+ odbc? ( dev-db/unixODBC )
+ R? ( dev-lang/R )
+ readline? ( sys-libs/readline:0 )"
+RDEPEND="${CDEPEND}
+ python? ( dev-python/numpy )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+
+SITEFILE=50${PN}-gentoo.el
+
+REQUIRED_USE="emacs? ( gtk )"
+
+pkg_setup() {
+ if use openmp && [[ $(tc-getCC)$ == *gcc* ]] && ! tc-has-openmp
+ then
+ ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 "
+ die "Need an OpenMP capable compiler"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-readline.patch
+}
+
+src_configure() {
+ econf \
+ --disable-rpath \
+ --enable-shared \
+ --with-mpfr \
+ $(use_enable cpu_flags_x86_avx avx) \
+ $(use_enable gtk gui) \
+ $(use_enable gtk gtk3) \
+ $(use_enable gtk xdg) \
+ $(use_enable gtk xdg-utils) \
+ $(use_enable nls) \
+ $(use_enable openmp) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable static-libs static) \
+ $(use_with accessibility audio) \
+ $(use_with odbc) \
+ $(use_with readline) \
+ $(use_with R libR) \
+ ${myconf} \
+ LAPACK_LIBS="$($(tc-getPKG_CONFIG) --libs lapack)"
+}
+
+src_compile() {
+ emake
+ if use emacs; then
+ cd utils/emacs && emake
+ elisp-compile gretl.el
+ fi
+}
+
+src_install() {
+ # to fix
+ emake -j1 DESTDIR="${D}" install
+ if use emacs; then
+ elisp-install ${PN} utils/emacs/gretl.{el,elc}
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+ dodoc README README.audio ChangeLog CompatLog
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ elog "To begin using gretl-mode for all \".inp\" files that you edit,"
+ elog "add the following line to your \"~/.emacs\" file:"
+ elog " (add-to-list 'auto-mode-alist '(\"\\\\.inp\\\\'\" . gretl-mode))"
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/gretl/gretl-1.9.90.ebuild b/sci-mathematics/gretl/gretl-1.9.90.ebuild
new file mode 100644
index 000000000000..a376ae9b64c8
--- /dev/null
+++ b/sci-mathematics/gretl/gretl-1.9.90.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+USE_EINSTALL=true
+
+inherit eutils elisp-common toolchain-funcs
+
+DESCRIPTION="Regression, econometrics and time-series library"
+HOMEPAGE="http://gretl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0/10"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="accessibility cpu_flags_x86_avx +curl emacs gnome gtk mpi nls odbc openmp python
+ readline cpu_flags_x86_sse2 R static-libs"
+
+CDEPEND="
+ dev-libs/glib:2=
+ dev-libs/gmp:0=
+ dev-libs/libxml2:2=
+ dev-libs/mpfr:0=
+ sci-libs/fftw:3.0=
+ sci-visualization/gnuplot
+ virtual/lapack
+ virtual/latex-base
+ accessibility? ( app-accessibility/flite:= )
+ curl? ( net-misc/curl:0= )
+ emacs? ( virtual/emacs )
+ gtk? (
+ media-libs/gd:2=[png]
+ sci-visualization/gnuplot[gd]
+ x11-libs/gtk+:3=
+ x11-libs/gtksourceview:3.0= )
+ mpi? ( virtual/mpi )
+ odbc? ( dev-db/unixODBC:0= )
+ R? ( dev-lang/R:0= )
+ readline? ( sys-libs/readline:0= )"
+RDEPEND="${CDEPEND}
+ python? ( dev-python/numpy )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+
+SITEFILE=50${PN}-gentoo.el
+
+REQUIRED_USE="emacs? ( gtk ) !curl? ( !gtk )"
+
+pkg_setup() {
+ if use openmp && [[ $(tc-getCC)$ == *gcc* ]] && ! tc-has-openmp ; then
+ ewarn "You are using a non capable gcc compiler ( < 4.2 ? )"
+ die "Need an OpenMP capable compiler"
+ fi
+}
+
+src_configure() {
+ econf \
+ --disable-rpath \
+ --enable-shared \
+ --with-mpfr \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ $(use_enable cpu_flags_x86_avx avx) \
+ $(use_enable curl www) \
+ $(use_enable gtk gui) \
+ $(use_enable gtk xdg) \
+ $(use_enable gtk xdg-utils) \
+ $(use_enable nls) \
+ $(use_enable openmp) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable static-libs static) \
+ $(use_with accessibility audio) \
+ $(use_with mpi) \
+ $(use_with odbc) \
+ $(use_with readline) \
+ $(use_with R libR) \
+ ${myconf} \
+ LAPACK_LIBS="$($(tc-getPKG_CONFIG) --libs lapack)"
+}
+
+src_compile() {
+ emake
+ if use emacs; then
+ cd utils/emacs && emake
+ elisp-compile gretl.el
+ fi
+}
+
+src_install() {
+ # to fix
+ emake -j1 DESTDIR="${D}" install
+ if use emacs; then
+ elisp-install ${PN} utils/emacs/gretl.{el,elc}
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+ dodoc README README.audio ChangeLog CompatLog
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ elog "To use gretl-mode for all \".inp\" files that you edit,"
+ elog "add the following line to your \"~/.emacs\" file:"
+ elog " (add-to-list 'auto-mode-alist '(\"\\\\.inp\\\\'\" . gretl-mode))"
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/gretl/metadata.xml b/sci-mathematics/gretl/metadata.xml
new file mode 100644
index 000000000000..fd52df2f1c98
--- /dev/null
+++ b/sci-mathematics/gretl/metadata.xml
@@ -0,0 +1,26 @@
+<?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">
+ GNU Regression, Econometrics and Time-series Library provides
+ a library which comprises various functions relating to econometric
+ estimation, a command-line client program and a GUI. The library is
+ based on the stand-alone command-line econometrics program ESL,
+ originally written by Ramu Ramanathan of the Department of Economics
+ at UC-San Diego. The interfaces offer several least-squares based
+ estimators. Besides reading data files in its own format it also
+ reads RATS 4 databases. It has a built-in spreadsheet for editing
+ data, and uses gnuplot for graphing. It can output regression results
+ in LaTeX format.
+</longdescription>
+ <use>
+ <flag name="R">Enable support for <pkg>dev-lang/R</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">gretl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/gsl-shell/Manifest b/sci-mathematics/gsl-shell/Manifest
new file mode 100644
index 000000000000..aa471e1eb78c
--- /dev/null
+++ b/sci-mathematics/gsl-shell/Manifest
@@ -0,0 +1,11 @@
+AUX gsl-shell-2.2.0-pkg-config.patch 1030 SHA256 c621924b171cc03acd8e451a145624289cfc90ce1eff16c24eda2d46f00d1d8b SHA512 94fc8e8ea69ed5a6ec492958dbe32fccc6b668a7864c972e98d86909f2425b589388fe91f397fae441ad2f70b27148ae911d7dc7210be223284597bdbe562ea3 WHIRLPOOL 96291354b79bd92a0a7bdee8fed4f3ed54399735a3781a7993ef8a50365c0430b9389494eb39be9e421a3e7cd7ba38c54b67fea985eb1ed19ad619ff0587f939
+AUX gsl-shell-2.3.0-gdt-cflags.patch 551 SHA256 2511a828ca4b96e4930f8da5e6b9a5e7bd996599e67e80c2bd4a18b89f814bd1 SHA512 00260e88352c2502aaf8a05243b9dbcf204c639c8fa14777ffd05d69e185409ccae80d86cd592b85fa2815e20ee97bfd711e02302b6bc0e5ee28265d8ddab7c6 WHIRLPOOL 0bd5e07fe5335967a53190b4e8a6137ebf985e086ed961255159cf17352c816101ab08d3cdcf2e90e9a04e906f9f3e67b0999bd33c5f45a0775990ffe118bfd2
+AUX gsl-shell-font.patch 643 SHA256 41fcdae34ad50d9af430314520458833943dc7e218ec707e14f115b190208321 SHA512 feeb151ff96c02b523f284acbaf214480b92cac42af497f6210726ff2a3b837c6792733ad5c2ac4be58fea68c18c5d10bf7db711336e32c9998c1456bfa3cbff WHIRLPOOL e7816c93202c0c60a18598630174c4af7200a64cfc4ec9944b3ea8c3a3a5452faf00431b2e20f83e840c063f82c1a0ee65a7de554fafa9a21446a4c5da651ae2
+AUX gsl-shell-nogui.patch 809 SHA256 6243647228918d4cdde4e1360ca0b7a7b4577b35044043db5d48a84333aea15d SHA512 b43d8009fef20ef847e098d4279b415ab26643970157b4fd49be1e255e1e8f59862159c2cb6054726d988c2d8b3bd6935673a509c803f486388a333040cde409 WHIRLPOOL ca0c1822b51fc7d0c78c6249790af8ae0018618055fa4ef1e8e775d3dd685aa26258c0120a79903dd40ef721a35f60b09beefe0ef31c626aa9738e376214ef21
+AUX gsl-shell-strip.patch 361 SHA256 b055fda96fa65658ff73143c5ab2242fabf2ff90e9a01da57758cf073f48de86 SHA512 ecb78c52f34d678ecec5ca5f6ee9c85cf954866347501aaf2fd31133357d8085bbbaf3d6118ae2cd20e8375927ae9c1958732bfab09bf308bde7fc3255fa35bf WHIRLPOOL 56ceab90c029426a1697a77c37049b275996d8ebbbf13d5f7e5a20d2dd8c5167ba3a034ff6071b3dab741ef1286d1692b84e3e99b5cd223af98fd74712f08f0d
+AUX gsl-shell-usr.patch 250 SHA256 e0199baa0018dc68f1eef3d51d6fcd8f501725ee9f368446a1312608e6dbed28 SHA512 e10df17a16969ad700e7f16c8fcf694e9c5f2d346e6db7ad5d616122c5160d9ea3d894354aef4214e48233a17e101b20b51c939fdbcb29b25169a4c6c07bc0c3 WHIRLPOOL f586cb39b7e585a0949a61dffe36274285f64f22d428439c1c281e942d9a8cd3dee660a79891d4615402a90e7ddc7b113a36ded05f917ca8cf1e634f42f7b1ae
+DIST gsl-shell-2.3.0-beta1.tar.gz 3380519 SHA256 a57e1d5b8e40418ca453c1bf900cf57546258d8ef87b2d0647207f7473be1cb4 SHA512 627c0b6bb35bc1a33bab16d0bb2b193b5a005a1d97a96e6a9038fbe7144936427131197983a2ef347ed91c655a82a4d477430a610d9e36453a2669ef0baae231 WHIRLPOOL 737ad32ff8f1f10a2caa5d76d24a107994a8fae9179a5f536880d0e9359562b1f9c59aee5825327a3175a06c30bbbb7b272cde07061364172a58dc4860e867bf
+EBUILD gsl-shell-2.3.0_beta1.ebuild 1582 SHA256 9c3437be53cb5bd4c958e9ea9f5ec2ad87a54ef081f9635ec3ad17b6d354c329 SHA512 163c279d16cea566c05ff1807f11d0a90020dd86fcfdf12ec2a9d0374a29a5baa84b412c694d8fcda61577a5ef8b67624f649d2acee161ac2ea48bdaa5ca43d8 WHIRLPOOL 777930950689d657c74e56eb2385fb0554d394be781f9258394b77fa127980d889484f35264fa89124c5ae2f0951c016af4b7965c4cd7717eed4c585f18985c6
+MISC ChangeLog 3201 SHA256 3d0df777e6241f5becccda0614ddbbaf4e7584cd993bc68824fc4a6858f61269 SHA512 58edd5ac8552403e9a11303dbd68e1af9c9cb5a3edfcdb771e1045a5f42a751ee6419f9a4c06b91af28f499d838483da2aff1bee6a87d5ab8d85ede486e475da WHIRLPOOL 6ef72560116e2b81427fcc773d95fef445f31a236f74467adb5857fed5f098d38a4a189158de1a5da05b4e61efdc33202a7efd4e8c3fa208c3533b8735d2bcbe
+MISC ChangeLog-2015 1790 SHA256 a0331cab6d6ad2ef422637bdd9fe5a2cc9034c80c77f5435226ea97368a95e27 SHA512 3e90ae832328a8ec0a7abd6fce35c5949871477cd608a6ab1d878e90465906ecca23614c7322f90f3da64d3b6e8800288c70a06b2d1cb31cf24dbb9341c5384b WHIRLPOOL 72c5048be1bc0bbc21af3d5e685a19fd58ddee357536c03878734004e062745ca616b4c686bec58122edf0f24c2043e96dd4fa9b31129719b9250208014b1d29
+MISC metadata.xml 962 SHA256 d66c7ed3d88c87a395e5b5682abb3fd6021d7580208353a8bde11727e9a57ac9 SHA512 5f11d160f940b7121192cace40644bca41a79ef43ed8d99f0346ca2617953ca5ccecef9bf88ccf95fe726057b4f9a17d847dfd9e2d322a0548a708ec2e49f6e4 WHIRLPOOL a515da58b19884891bf5bd50f17bb659e0db39ed4401f6a798d5ac48811b1a54340afd99c79e336661576c01f8c732cfbf4f03a8718da822bb9f1ba03d1947ac
diff --git a/sci-mathematics/gsl-shell/files/gsl-shell-2.2.0-pkg-config.patch b/sci-mathematics/gsl-shell/files/gsl-shell-2.2.0-pkg-config.patch
new file mode 100644
index 000000000000..8bb28635df2b
--- /dev/null
+++ b/sci-mathematics/gsl-shell/files/gsl-shell-2.2.0-pkg-config.patch
@@ -0,0 +1,33 @@
+ makepackages | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/makepackages b/makepackages
+index afeef79..a724e82 100644
+--- a/makepackages
++++ b/makepackages
+@@ -52,17 +52,17 @@ else
+ PTHREADS_LIBS = -lpthread
+
+ else
+- AGG_INCLUDES = -I/usr/include/agg2
+- AGG_LIBS = -lagg -lX11
++ AGG_INCLUDES = $(shell $(PKG_CONFIG) --cflags libagg)
++ AGG_LIBS = $(shell $(PKG_CONFIG) --libs libagg) -lX11
+
+- GSL_INCLUDES =
+- GSL_LIBS = -lgsl -lblas
++ GSL_INCLUDES = $(shell $(PKG_CONFIG) --cflags gsl)
++ GSL_LIBS = $(shell $(PKG_CONFIG) --libs gsl)
+
+- FOX_INCLUDES := $(shell pkg-config fox --cflags)
+- FOX_LIBS = $(shell pkg-config fox --libs)
++ FOX_INCLUDES := $(shell $(PKG_CONFIG) fox --cflags)
++ FOX_LIBS = $(shell $(PKG_CONFIG) fox --libs)
+
+- FREETYPE_INCLUDES = -I/usr/include/freetype2
+- FREETYPE_LIBS = -lfreetype
++ FREETYPE_INCLUDES = $(shell $(PKG_CONFIG) --cflags freetype2)
++ FREETYPE_LIBS = $(shell $(PKG_CONFIG) --libs freetype2)
+
+ PTHREADS_LIBS = -lpthread
+ endif
diff --git a/sci-mathematics/gsl-shell/files/gsl-shell-2.3.0-gdt-cflags.patch b/sci-mathematics/gsl-shell/files/gsl-shell-2.3.0-gdt-cflags.patch
new file mode 100644
index 000000000000..388fa003f0ff
--- /dev/null
+++ b/sci-mathematics/gsl-shell/files/gsl-shell-2.3.0-gdt-cflags.patch
@@ -0,0 +1,20 @@
+--- a/gdt/Makefile
++++ b/gdt/Makefile
+@@ -27,7 +27,7 @@ include $(GSH_BASE_DIR)/makedefs
+
+ INCLUDES += -I$(GSH_BASE_DIR)
+
+-CFLAGS += -std=c99
++GDT_CFLAGS = $(CFLAGS) -std=c99
+
+ GDT_SRC_FILES = char_buffer.c gdt_index.c gdt_table.c
+ GDT_OBJ_FILES := $(GDT_SRC_FILES:%.c=%.o)
+@@ -36,7 +36,7 @@ DEP_FILES := $(GDT_SRC_FILES:%.c=.deps/%.P)
+
+ DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-COMPILE = $(CC) $(CFLAGS) $(LUA_CFLAGS) $(DEFS) $(INCLUDES)
++COMPILE = $(CC) $(GDT_CFLAGS) $(LUA_CFLAGS) $(DEFS) $(INCLUDES)
+
+ TARGETS = libgdt.a
+
diff --git a/sci-mathematics/gsl-shell/files/gsl-shell-font.patch b/sci-mathematics/gsl-shell/files/gsl-shell-font.patch
new file mode 100644
index 000000000000..d8879497c4cd
--- /dev/null
+++ b/sci-mathematics/gsl-shell/files/gsl-shell-font.patch
@@ -0,0 +1,10 @@
+diff -r -U1 gsl-shell.orig/agg-plot/support_x11.cpp gsl-shell/agg-plot/support_x11.cpp
+--- gsl-shell.orig/agg-plot/support_x11.cpp 2012-11-27 04:55:38.000000000 +0700
++++ gsl-shell/agg-plot/support_x11.cpp 2012-11-30 23:02:31.000000000 +0700
+@@ -9,4 +9,4 @@
+ #else
+-const char *ttf_names[] = {"ubuntu-font-family/Ubuntu-R.ttf", "freefont/FreeSans.ttf", "ttf-dejavu/DejaVuSans.ttf", 0};
+-#define TTF_SYSTEM_DIR "/usr/share/fonts/truetype/"
++const char *ttf_names[] = {"ubuntu-font-family/Ubuntu-R.ttf", "freefont-ttf/FreeSans.ttf", "dejavu/DejaVuSans.ttf", 0};
++#define TTF_SYSTEM_DIR "/usr/share/fonts/"
+ #define CONSOLE_FONT_NAME "monospace"
diff --git a/sci-mathematics/gsl-shell/files/gsl-shell-nogui.patch b/sci-mathematics/gsl-shell/files/gsl-shell-nogui.patch
new file mode 100644
index 000000000000..16d3eb0f04d2
--- /dev/null
+++ b/sci-mathematics/gsl-shell/files/gsl-shell-nogui.patch
@@ -0,0 +1,25 @@
+diff -r -U1 gsl-shell.orig/Makefile gsl-shell/Makefile
+--- gsl-shell.orig/Makefile 2012-09-21 19:54:05.000000000 +0700
++++ gsl-shell/Makefile 2012-09-21 19:53:37.000000000 +0700
+@@ -29,3 +29,2 @@
+ GSL_SHELL = gsl-shell$(EXE_EXT)
+-GSL_SHELL_GUI = gsl-shell-gui$(EXE_EXT)
+ LUA_CFLAGS = -I$(LUADIR)/src
+@@ -73,4 +72,3 @@
+ INCLUDES += $(PTHREADS_CFLAGS) -Iagg-plot
+-GUI_SUBDIR = fox-gui
+-SUBDIRS += agg-plot $(GUI_SUBDIR)
++SUBDIRS += agg-plot
+ LUAGSL_LIBS += agg-plot/libaggplot.a
+@@ -105,6 +103,5 @@
+
+-install: $(GSL_SHELL) $(GUI_SUBDIR)
++install: $(GSL_SHELL)
+ mkdir -p $(INSTALL_BIN_DIR)
+ cp $(GSL_SHELL) $(INSTALL_BIN_DIR)
+- cp fox-gui/$(GSL_SHELL_GUI) $(INSTALL_BIN_DIR)
+ mkdir -p $(INSTALL_LIB_DIR)
+@@ -122,3 +119,2 @@
+ $(MAKE) -C $(LUADIR) clean
+- $(MAKE) -C fox-gui clean
+ $(HOST_RM) *.o $(TARGETS)
diff --git a/sci-mathematics/gsl-shell/files/gsl-shell-strip.patch b/sci-mathematics/gsl-shell/files/gsl-shell-strip.patch
new file mode 100644
index 000000000000..1d50a7e831af
--- /dev/null
+++ b/sci-mathematics/gsl-shell/files/gsl-shell-strip.patch
@@ -0,0 +1,8 @@
+diff -r -U1 gsl-shell.orig/Makefile gsl-shell/Makefile
+--- gsl-shell.orig/Makefile 2012-09-12 01:13:31.000000000 +0700
++++ gsl-shell/Makefile 2012-09-26 16:13:56.000000000 +0700
+@@ -109,4 +109,2 @@
+ cp fox-gui/$(GSL_SHELL_GUI) $(INSTALL_BIN_DIR)
+- strip $(INSTALL_BIN_DIR)/$(GSL_SHELL)
+- strip $(INSTALL_BIN_DIR)/$(GSL_SHELL_GUI)
+ mkdir -p $(INSTALL_LIB_DIR)
diff --git a/sci-mathematics/gsl-shell/files/gsl-shell-usr.patch b/sci-mathematics/gsl-shell/files/gsl-shell-usr.patch
new file mode 100644
index 000000000000..20ca6d317c7a
--- /dev/null
+++ b/sci-mathematics/gsl-shell/files/gsl-shell-usr.patch
@@ -0,0 +1,8 @@
+diff -r -U1 gsl-shell.orig/makeconfig gsl-shell/makeconfig
+--- gsl-shell.orig/makeconfig 2012-09-12 01:13:31.000000000 +0700
++++ gsl-shell/makeconfig 2012-09-26 16:16:43.000000000 +0700
+@@ -21,3 +21,3 @@
+
+-PREFIX= /usr/local
++PREFIX= /usr
+ DESTDIR=
diff --git a/sci-mathematics/gsl-shell/gsl-shell-2.3.0_beta1.ebuild b/sci-mathematics/gsl-shell/gsl-shell-2.3.0_beta1.ebuild
new file mode 100644
index 000000000000..739ce56d681c
--- /dev/null
+++ b/sci-mathematics/gsl-shell/gsl-shell-2.3.0_beta1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+MY_P=${P/_/-}
+DESCRIPTION="Lua interactive shell for sci-libs/gsl"
+HOMEPAGE="http://www.nongnu.org/gsl-shell/"
+SRC_URI="http://download.savannah.gnu.org/releases/${PN}/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-3"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc fox"
+
+RDEPEND="
+ >=sci-libs/gsl-1.14
+ virtual/blas
+ >=x11-libs/agg-2.5
+ >=media-libs/freetype-2.4.10
+ sys-libs/readline:0=
+ || ( media-fonts/ubuntu-font-family media-fonts/freefont media-fonts/dejavu )
+ fox? ( x11-libs/fox:1.6 )"
+DEPEND="${DEPEND}
+ virtual/pkgconfig
+ doc? ( dev-python/sphinx[latex] )"
+
+S="${WORKDIR}"/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-font.patch
+ "${FILESDIR}"/${PN}-strip.patch
+ "${FILESDIR}"/${PN}-usr.patch
+ "${FILESDIR}"/${PN}-2.2.0-pkg-config.patch
+ "${FILESDIR}"/${P/_beta*/}-gdt-cflags.patch
+)
+
+src_prepare() {
+ tc-export PKG_CONFIG
+ use fox || PATCHES+=( "${FILESDIR}"/${PN}-nogui.patch )
+ default
+}
+
+src_compile() {
+ local BLAS=$($(tc-getPKG_CONFIG) --libs blas)
+
+ if use fox; then
+ local FOX_INCLUDES="$(WANT_FOX=1.6 fox-config --cflags)"
+ local FOX_LIBS="$(WANT_FOX=1.6 fox-config --libs)"
+ emake -j1 CFLAGS="${CFLAGS}" GSL_LIBS="$($(tc-getPKG_CONFIG) --libs gsl) ${BLAS}" \
+ FOX_INCLUDES="${FOX_INCLUDES}" FOX_LIBS="${FOX_LIBS}"
+ else
+ emake -j1 CFLAGS="${CFLAGS}" GSL_LIBS="$($(tc-getPKG_CONFIG) --libs gsl) ${BLAS}"
+ fi
+
+ use doc && emake -C doc/user-manual -j1 html
+}
+
+src_install() {
+ use doc && HTML_DOCS+=( doc/user-manual/_build/html/. )
+ default
+}
diff --git a/sci-mathematics/gsl-shell/metadata.xml b/sci-mathematics/gsl-shell/metadata.xml
new file mode 100644
index 000000000000..1404e62dc2a1
--- /dev/null
+++ b/sci-mathematics/gsl-shell/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>grozin@gentoo.org</email>
+ <name>Andrey Grozin</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+GSL shell offers an interactive command-line interface
+that gives access to GSL collection of mathematical functions.
+GSL shell is based on the powerful and elegant scripting language Lua.
+GSL shell is not just a wrapper over the C API of GSL
+but does offer much more simple and expressive way to use GSL.
+The objective of GSL shell is to give the user the power
+of easily access GSL functions without having to write a complete C application.
+</longdescription>
+ <use>
+ <flag name="fox">Build a <pkg>x11-libs/fox</pkg> GUI</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/gwnum/Manifest b/sci-mathematics/gwnum/Manifest
new file mode 100644
index 000000000000..03972ac6a30f
--- /dev/null
+++ b/sci-mathematics/gwnum/Manifest
@@ -0,0 +1,5 @@
+DIST gwnum-277.tar.bz2 24143696 SHA256 bbd7baec05d66b3cbe315e742b1b1aaa882dea838bed4901203c29a2e231397f SHA512 d88a15b01fad458640a84ffa3d5fca6fb35ecd99aff711e679cdae2a58b95c9caefdd4218015f620fd7a93bb54aabad1311205d7ec62d212ca8c6e80af696cc3 WHIRLPOOL db520213f8b324e5c4dc21800424755cd8f23cbbe26619f6393e8b5ed65653a89b73098638fd75137a05a6a323fc71b0acc5496d5ad405fe70f7d26671b301df
+EBUILD gwnum-277.ebuild 786 SHA256 067f7e2d04a199c3cc01ffad9deb49aa10b9cb51f66f38ff00ea7c8034df0508 SHA512 d91f3e4cd41c6fcfc3437725ca4a651bb5480f39af0f5821e64c082ce74849d4d2f899e9a3bf4b611e6d1f9717ba0dc61d8d2952b58388acb39c385364a35529 WHIRLPOOL 752c8b83be73c068ac20475de853b537d41f46c4cf4082ee80dea6b46fe303b59aadd82017b09fb2c1f9fcbc2c20ab06a1c088bbfccc3743da3cf7362a381b71
+MISC ChangeLog 2173 SHA256 fe2dd5de4755b42ed90927b9bf47265d0d87b70b30b5dcfc3216ce7619e15116 SHA512 f4aff9457c97fc8341c3470f0735d58d70d8000dd4e0050460cd190107cc8537e38c7bbd5e9b3aa20b8fc33563ffea8b54bc862910722d0d0a44f4cd93f900c1 WHIRLPOOL 0cff2b5121e605936c5f6d87e6eb08f33f5dbe773faed7566b92bbd20825b56396dc0919382c526c1280b815be7c26fe145ea62b6555523c8130da1b29e937f9
+MISC ChangeLog-2015 559 SHA256 8c549bf083b9bdfede0e22a91944b264129cb864f86a8c92583d459cb8c0f233 SHA512 aeee85dcf234083bfd2b0bd9e90b5b4d896cc912ae82599a2fbb3849003eb88a1070a026efa97a8c1ec80a03441ef7e4630e62ef61c8018a90c415bcd9956047 WHIRLPOOL 73fc7f9c3f207fa7f6756790d5d1596c1bb138f9da5ccb2e49deaa92f12ecf8fe1779820e0997b0bd083769ab2cef802eb06139c64ebe87ab360fce54cd4d6a8
+MISC metadata.xml 247 SHA256 0deec0776f26fb762fdf7711f4589b14f52a2456436ef557eec62a2cf2fb2bb7 SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7 WHIRLPOOL a135fa622e99d3dcdb432bc6b3c366076b3d86b4bfd9a76c852d781b8e9152541c7e7a2c7c6d6a3c4d2200dce792847a08166aaf7c17c22b6299dfe868234dec
diff --git a/sci-mathematics/gwnum/gwnum-277.ebuild b/sci-mathematics/gwnum/gwnum-277.ebuild
new file mode 100644
index 000000000000..e19779765901
--- /dev/null
+++ b/sci-mathematics/gwnum/gwnum-277.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+DESCRIPTION="George Woltman's GWNUM library"
+HOMEPAGE="http://www.mersenne.org/freesoft/"
+# Sourcecode split out from prime95, we don't need the full lib
+SRC_URI="http://gentooexperimental.org/~patrick/${P}.tar.bz2"
+
+inherit eutils
+
+LICENSE="gwnum BSD GPL-2+"
+SLOT="0"
+# Need to test if it actually compiles on x86
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+RESTRICT="bindist" #465566
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ # makefile doesn't return zero? || die fails :(
+ use amd64 && emake -f make64
+ use x86 && emake
+}
+
+src_install() {
+ mkdir "${D}/usr/lib" -p
+ cp gwnum.a gwnum.lib "${D}/usr/lib" || die
+ mkdir "${D}/usr/include" -p
+ cp *.h "${D}/usr/include" || die
+}
diff --git a/sci-mathematics/gwnum/metadata.xml b/sci-mathematics/gwnum/metadata.xml
new file mode 100644
index 000000000000..40aa45df2b01
--- /dev/null
+++ b/sci-mathematics/gwnum/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-mathematics/isabelle/Manifest b/sci-mathematics/isabelle/Manifest
new file mode 100644
index 000000000000..ed0433d15bcd
--- /dev/null
+++ b/sci-mathematics/isabelle/Manifest
@@ -0,0 +1,24 @@
+AUX isabelle-2012-graphbrowser.patch 354 SHA256 0b6d3a3736ec89ad870ef24bb2ba3c2006a907e1a29a113e3f63a5ad609ec4b7 SHA512 ef850f554a41292e6a1811489309b9c13404191258acdf46d4739360b951634aaa76d25fcbef3784a54c25972b6a81ec2d4d151b6f53684224cdec286d4082c0 WHIRLPOOL dec708ff2653bdd50af5cccedd31c5e6f06d3e9910c4155d53c4a24b9b70c868226a4c68a12fadac868296fa95024799ef9cd027fd56f1d7c4e825cacddc74f1
+AUX isabelle-2012-reverse-line-editor-order.patch 423 SHA256 51a172b46baaaa269488801bad3d46ba4ccd0e3df35b2c15dc9b75592ceb843e SHA512 de9499e5c0d9bc22a72ef15320490fea7e71afbfe1ab6bc3a6a71a866eda2050833d47aadc7c0c7b106d4f0a28fa9a062ec2d9a6c15bf6c0eedd54274df20515 WHIRLPOOL 3a96e039df568ffd449dc0dc18a888d55a5b3db2940beb7f7e28628e0abdd3bd4132162abc7cac8c633f562cb2b18afb8a4e84cea26fa18f086488bfd3781a48
+AUX isabelle-2016-classpath.patch 1269 SHA256 bec5d12bd8895357dd71a15d223f400121264d6e7b12a430f7c15ef9620dc3d4 SHA512 912930f7bd392bb6bb8569d447f3c0ba52c872c5be26b25fa551749ce4938cdc6bb1db4687a3e682e70dcb418e5f4b2d2cb5a49b470089618ff27653f492d096 WHIRLPOOL f0186add1c3724162acfbf40fcfd327986009f42e040672da0c73ed310dd0763b9e70c1dfd8c3da55810342b6093d324abe58f47e108d9d9ce9950ad203b1275
+AUX isabelle-2016-jfreechart-classpath.patch 930 SHA256 fb31e9e9c64347527bcfffaa3cd438fcb808f3634e382c7172117aa7bcf677c1 SHA512 0479a158a25f11f9c1a2edea49fd5c5e635558095c46c543fe73cacc58aecedb91e9528ddc02be7bf1f4f3c6f4251e6918449f24dfa93aec3494aeed2590e7a6 WHIRLPOOL df86c65a35c533ad7eff1cf117f782d1b212e901029445d54f63e395c090876a06c65953f18883e42512e991530cea9c295f43def70529f56be6b7e276c70697
+AUX isabelle-2016.1-bash_process-1.2.1-settings.patch 399 SHA256 f62478173c20d103431e94399875d329a939be7e87a9491d2403d6f24249d81e SHA512 0965da49933834c2746f55a80e84ecfcf4e1a0faf6997224cc08ec3e458998887234839d346a2a12bf2ea2efbb91a1b4a53dcd4d390832655f30ce519fa59a66 WHIRLPOOL 0ccaa3e2ff323f0d82c34be8b5de0734b7dd639d837a42b8b29b04dc1f79f6a04d5c8571d5637dfa4a0ff7e871e6a15a0993b4c493ecd6c20d5a1f969de78ab8
+AUX isabelle-2016.1-disable-jedit-build-after-install.patch 3852 SHA256 43a5cc45fd60400f727e20074502b0f3649b883e9c86b6d24cf1fd28f06ed91f SHA512 1786facbfe939841b6949be37712a087e5a80afb564a39d9019bc2c2110604328056a06f10737a732a9ad7c4a9a36ced8347b1b2c17f4744f20c3ebe2cd1445e WHIRLPOOL ba4165605aff3ce054f6f2c1ed45027871b2a8d3094386b6d711af79aa2d49f7af9e1724a4d45f2d914550405593c68ea5a493abd28c6d9d5a7a9ae50847e7e6
+AUX isabelle-2016.1-jortho-1.0-2-classpath.patch 505 SHA256 b828cb77123941de1b5d8c0a47951827c70cb55673057f7b3e5e240638f7cc47 SHA512 74af59748e537b70bde496c67f93b2a3de1947616f4289421f4d2c045c63ac53f7c3eb6c435818c598285871afe012d6a3eabb94793f408d6c1e13e3f7812408 WHIRLPOOL f29c9f525e41ac30be31cf6ea827ab9d598989a03ae2ab6185616bf0825e6378fa6e3b8ca4d1eb54f94768e4ed99773be1427d038442cd4dfa17bb360d2697f3
+AUX isabelle-2016.1-libsha1.patch 535 SHA256 bd5a7cf8cf9216cb25132554f44aaa3c0e437a1b0e02b356b0c6d3e1acc14454 SHA512 7200f3a66c1ede6d1957cbab928a48ae6d7e785123e2df45bbbd62a8f09172b3fad383757929ee27f1efe358a61bff5c6f6de6fe486f2ffd269d08d2de840708 WHIRLPOOL 8b62ebbcfb29aefae6231abc5988b0254489fd5e07de46dde561408f5c7f6da28b48a6e648397f3795eb9152fab0bab82b826cced0191f6c33c49ce4122d81a1
+AUX isabelle-2016.1-smt_read_only_certificates.patch 1372 SHA256 ff201c0cb0d7220a1a43eeb8d5cf5882fe31029b9c89694cf90d2082f4af9063 SHA512 c6ef0253ef6fc100050dd35c15be07f17da14ef3119971a150d177f5fedec0bd134834965eee9dbcfa8e485fd05841b8770e0aaada75c74503ea2b3e6dd2bef3 WHIRLPOOL a13c69d0e708666134836b66b0ddb2d611d6f4ee1af9bca2025827db3376931900b82b17a571b925c88aa67e332599ee706b2c9f7eaeb507dd8e3a879fffb0a5
+AUX isabelle-2016.1-smt_timeout.patch 1092 SHA256 59e40843f954522f5be53b10dc958bbbc0bf1eb34a0a2a4503335eca816f5bf5 SHA512 ffbfb74959f35856c085a593e164d93a71bc08ce9c88d50d911f4cb4652b1be9aeade8d80cecf9f15165ba35135719ca36f82d3cbf789f1d8a9fac52bdb84bde WHIRLPOOL 3ce7708c58d84d14851d2cf5dc44cc265eca6388e0ec4c65eff3302d7ef92b90627f968b6ee06e28cb5ca189ccd3445d89346f519b49cca07e147bc0e2a50f3e
+DIST Isabelle2016-1.tar.gz 39567637 SHA256 79831f83df4f0275fbd64caf3cd3e170354809478139907f6e25ebc8fc4a083f SHA512 c7da7900033a8c816f002b8899e398da7819dc457b3b1176dc9a19adffeb42d5524f2d14581a391487da1f36ffeabd0867bacab6462f3decfc0f7a9caf81a2d2 WHIRLPOOL 98d8cd767e04a7c46d19c91886fd7a98ca935625454b57df4f968f874340aaa5a6184004c6879ebc1c35f971b4e5ff1a52f06e33e1d14e377dbce346e201d655
+DIST bash_process-isabelle-component-1.2.1.tar.gz 33182 SHA256 50ba6bed5a8fbcf26b9e9b090af783e1288daa9b6d2e67ec65e7de8621049bf4 SHA512 d9817191af5660e38f1647401803115a93f0052291bfbbcb1cd9b41a4bab89b3ebdde22b40744a04ad3268aed8ca037ae59981c513f71b3ff6d89855d29e14c3 WHIRLPOOL f8392e4df237e758568b3edd25b83b44b916a81f9a18f6d6dd931a084de9a915930ae9e65e39b7b39b80ab9f738fd112113c4c3496ef3433fd17efff2f51068a
+DIST csdp-isabelle-component-6.x.tar.gz 493 SHA256 65dde42fa476095052ca3820df4c0e45089653d4467a53de711c8e13670a1b19 SHA512 9be28ecbf61d0f6ad23e28d44bd7ceb8f06ab22f3a05a7c823a9c5bf52ddcf5e5c300c41e14451d6b8e6a4c32b1bbd17769c731cd890fab335a866cd5e735290 WHIRLPOOL c930c531637172e4c75ec44d68f71e69e748a8b976fa3651ef4015fb6a90e30b568bd092632dc16c6389aac09bc13f3249af6c3ac261f09ad2dc5ad915282f99
+DIST isabelle_fonts-isabelle-component-20160830.tar.gz 249427 SHA256 1e99293f2f77f906f32c3974becd7c4a9d474050d3ab78222e3e5f40fe3d8fce SHA512 a185f79990478861832e9400ea37ffd02f582d3f916d26d901b8b0ec923027c412538bafe4a763a132adb9277a4b00a7a510762928ec49433ef550ae3fe59dbc WHIRLPOOL c15a6df44fce1d5577a7642d7b659b4b202bfd148db35c2429ec8e6c2680e7f1302b6249792150f0563a4e9cd9c92325bedc33194c0c7cf5008f2a3f4677ef02
+DIST jedit_build-isabelle-component-20161024.tar.gz 10819946 SHA256 5b3cc4d2916a77ceef1b7aea80c3ade715795d2c2359f4f8f73b32e334c3f22e SHA512 0563b696307dd33b244e4ecc62664056a2b003c3291a5e3d7dd4f1c936dac2c3257ff90273cb2c8dc3bf9dea40fae745fabb57fc5f4ed420d0c8fd7d2b917433 WHIRLPOOL 46edf80819abef2c900a2d0dfb20530685678c25780a56946f8fa4af66abb047cfdcab17a7bb9700e60028e5465d93c227d7515084f6020546c781419d91cc03
+DIST jfreechart-isabelle-component-1.0.14-1.tar.gz 3444825 SHA256 b0eb7365c4c5877379889100f081a4afc4117afc0d332941c3dd01bef2c4aee9 SHA512 ee1d84a45e43029d5e3acee823176196da19789322e8d3c2c81d5504930ad81d50e16e5da87655e4151034901daefb4ce6b82334839e39134b3a7ce32203aa67 WHIRLPOOL e6f9caadb802ecb5b784e86e96c008e9271aa0b1c940152fb0b0358280d9c1e274bb0dee1507f8ff0fe7f43f863db538d631c76e146d1f66ab6e8a8fb27eb42d
+DIST jortho-isabelle-component-1.0-2.tar.gz 1723761 SHA256 cf004d735252dcdc00ff6d3c9b5cc400f56bc8b7eb49ed9a3227f12779639bad SHA512 8bef5e025d13b76c86a727bf93887b846cc906b2ce00299c38f69ccf33fb9dc7411e55b6fd1c56ed993c180d83a7e9ed90122f7feb6ae4fb70df93802ac21211 WHIRLPOOL 2a9aae3dcc62c52c194f17d0b5e59d710bd8efdb9e75ed6dd9fa68746a9bbc5178a218e405d7a23bf15d3957c3e1a8543ccdeb04f8556b05b8802aed47d8e537
+DIST polyml-isabelle-component-5.6-1.tar.gz 822 SHA256 158d597bb103b173ce95b40f4a5ed3bf45fce9a7185be4240e0fb69dbb74431d SHA512 403239aa48aab8c39e12cd5f82cb5e3ba7c31f9325d88f5137d3ec509bb25ab4eb8b1103a66b8ea5ad45c7c968ef092749c486217528a5db4223819106c00a59 WHIRLPOOL 6a1f766c71543748cdeab6bc1e3e1e7b8ab81b49976bebf0ec72086be8f161cd23b913d28cf0f0386b8f33a7b9637427a2c57f1bd7adf58c8c0f58054f84a9db
+DIST ssh-java-isabelle-component-20161009.tar.gz 412919 SHA256 60d9448e664a357816e64e4d21ce0db9fb27354e8c64e1199c4be839b084145e SHA512 685a9b8791046c1bc21aa77614fb1b304e7438715377e179954ebfd1603434ff66fe23e90de928a5af6f51a48ae6ea6f05f9ff8941d98f7c3a43fdda02d3b519 WHIRLPOOL 3c5c666f86e08c81d75b13442a98b6eaa51418a8a55310e87c53e68480e31ec6050c1e2b3876a0a3e06c58e5e8c9735150408e8fd120a8d83b9827b9b84b2c7c
+DIST xz-java-isabelle-component-1.5.tar.gz 315 SHA256 e7fdd433608561c87558d4d0ee39166e8396ce11242e85391417ec7fd3ce7b8e SHA512 6dfec49e12c4cafbb6b6386dd54477e86b6bb419a77c52d9606a0305aeea9cd11f087ed6bba77352c7bf9ec656052ef617e845f472e57b5cdfbccf22b2eeb4fa WHIRLPOOL 9c1fc16db0adc88557b81608902d9d69007dc90d5849f4f7501101930842ce81ded76af0e76e38df8bd0b07d137e53bafaa338bf6c7ae338e97af2a1433d5c1d
+EBUILD isabelle-2016.1.ebuild 11274 SHA256 70a5e4c8965efae590906057a261faa529a3c90b3a7e69d17320806da21cf02a SHA512 7d804624134b7659f62c2738f2fa20f4a1da39eab58f80cd20d47aad8fe326b4d9366a3c96ac51c5f2abfb2bbfd4656c979330794c85f0659b04f93759f53fc9 WHIRLPOOL 480bed7421e31bef346fc5b638e258359e284325ea8732f0a987f6596c8b8b5b869432d1587d36032a11b2f7cec27fb2d1842e06e847abc9f1d78ac9cd2a3b0d
+MISC ChangeLog 5348 SHA256 e08f36b3eaffd50a2683159655ab699b798e40376206e55967329ccfd0fb7808 SHA512 fcb4e7b2a34b2d17574c95eb8acfb1abbbbcf81855c60d6e85254df1d115fd12c0be613870fad613ef6eea0d50df63a9395210e9ce53cddddff78c740f448cd9 WHIRLPOOL 343447929e1cd264c470034e2e00d630529aa0716009ac361db1fad66113083aac79670f654906f6330c3be6c3de8cd8f70ba3e58cf88d113da44cb0ad11c854
+MISC ChangeLog-2015 4737 SHA256 8248af61826e77588bf83a0f9f6c80ff77b77bdffc09616061cfcbbcd39a9fcc SHA512 daa0e357b200d5b3896fad1e54860b388cfff74eab89aa4e7a5eee372130f720f4295f6f514c30d6a1463e15e47c920b6fd3df33d35dc7938412a388aed627a1 WHIRLPOOL 2aca3833b8bd919f15c9510fd90468486574ab80a4b80ceeb47fef03d172f788522e9d5d74603c61c1b0b7da2bfeb8eb10dd63219f6849e66a89803d8b9a5c3a
+MISC metadata.xml 1207 SHA256 0004d339e6cc2a11a1e5927b5111e31b565defe600805546cb2461012db433f3 SHA512 158021354cea7c08befe74a21aa066e529a9ba315d2ae4bfa3e17c689439564358650d0100c43e18851ae4138744b451b70eb3fdf49f2ce90e37eac7b3f2268b WHIRLPOOL 3a477b11204a4f46ab796e8fa833a5d23232c842b91f571359c263f2e1a62c3dc88a19cca3d4e3b91960f471659f2552a0bb91a5de8198646b32b27faec02175
diff --git a/sci-mathematics/isabelle/files/isabelle-2012-graphbrowser.patch b/sci-mathematics/isabelle/files/isabelle-2012-graphbrowser.patch
new file mode 100644
index 000000000000..3e63f1c62237
--- /dev/null
+++ b/sci-mathematics/isabelle/files/isabelle-2012-graphbrowser.patch
@@ -0,0 +1,11 @@
+--- Isabelle2012-orig/lib/browser/build 2012-05-20 19:34:33.000000000 +1000
++++ Isabelle2012/lib/browser/build 2012-05-26 22:18:41.952750622 +1000
+@@ -6,6 +6,8 @@
+ #
+ # Requires proper Isabelle settings environment.
+
++ISABELLE_HOME="$(cd "$(dirname "${0}")/../.."; pwd -P)"
++source "$ISABELLE_HOME/lib/scripts/getsettings" || exit 2
+
+ ## diagnostics
+
diff --git a/sci-mathematics/isabelle/files/isabelle-2012-reverse-line-editor-order.patch b/sci-mathematics/isabelle/files/isabelle-2012-reverse-line-editor-order.patch
new file mode 100644
index 000000000000..233ea5b50fad
--- /dev/null
+++ b/sci-mathematics/isabelle/files/isabelle-2012-reverse-line-editor-order.patch
@@ -0,0 +1,12 @@
+--- Isabelle2012-orig/etc/settings 2012-05-23 03:07:38.000000000 +1000
++++ Isabelle2012/etc/settings 2012-05-27 12:43:36.209715015 +1000
+@@ -62,8 +62,8 @@
+ ###
+
+ ISABELLE_LINE_EDITOR=""
+-[ -z "$ISABELLE_LINE_EDITOR" ] && ISABELLE_LINE_EDITOR="$(type -p rlwrap)"
+ [ -z "$ISABELLE_LINE_EDITOR" ] && ISABELLE_LINE_EDITOR="$(type -p ledit)"
++[ -z "$ISABELLE_LINE_EDITOR" ] && ISABELLE_LINE_EDITOR="$(type -p rlwrap)"
+
+
+ ###
diff --git a/sci-mathematics/isabelle/files/isabelle-2016-classpath.patch b/sci-mathematics/isabelle/files/isabelle-2016-classpath.patch
new file mode 100644
index 000000000000..032b18b71f3b
--- /dev/null
+++ b/sci-mathematics/isabelle/files/isabelle-2016-classpath.patch
@@ -0,0 +1,32 @@
+Index: Isabelle2016/lib/Tools/java
+===================================================================
+--- Isabelle2016.orig/lib/Tools/java
++++ Isabelle2016/lib/Tools/java
+@@ -10,5 +10,5 @@ declare -a JAVA_ARGS; eval "JAVA_ARGS=($
+ unset CLASSPATH
+
+ isabelle_java java "${JAVA_ARGS[@]}" \
+- -classpath "$(platform_path "$ISABELLE_CLASSPATH")" "$@"
++ -classpath "$(platform_path "$ISABELLE_CLASSPATH:$(java-config -p scala-2.11)")" "$@"
+
+Index: Isabelle2016/lib/Tools/scala
+===================================================================
+--- Isabelle2016.orig/lib/Tools/scala
++++ Isabelle2016/lib/Tools/scala
+@@ -14,4 +14,4 @@ do
+ done
+
+ isabelle_scala scala "${SCALA_ARGS[@]}" \
+- -classpath "$(platform_path "$ISABELLE_CLASSPATH")" "$@"
++ -classpath "$(platform_path "$ISABELLE_CLASSPATH:$(java-config -p scala-2.11)")" "$@"
+Index: Isabelle2016/lib/Tools/scalac
+===================================================================
+--- Isabelle2016.orig/lib/Tools/scalac
++++ Isabelle2016/lib/Tools/scalac
+@@ -7,5 +7,5 @@
+ isabelle_admin_build jars || exit $?
+
+ isabelle_scala scalac -Dfile.encoding=UTF-8 \
+- -classpath "$(platform_path "$ISABELLE_CLASSPATH")" "$@"
++ -classpath "$(platform_path "$ISABELLE_CLASSPATH:$(java-config -p scala-2.11)")" "$@"
+
diff --git a/sci-mathematics/isabelle/files/isabelle-2016-jfreechart-classpath.patch b/sci-mathematics/isabelle/files/isabelle-2016-jfreechart-classpath.patch
new file mode 100644
index 000000000000..9a88ebef26ca
--- /dev/null
+++ b/sci-mathematics/isabelle/files/isabelle-2016-jfreechart-classpath.patch
@@ -0,0 +1,16 @@
+--- Isabelle2016-orig/contrib/jfreechart-1.0.14-1/etc/settings 2013-09-12 07:46:57.000000000 +1000
++++ Isabelle2016/contrib/jfreechart-1.0.14-1/etc/settings 2016-07-07 17:22:55.716464804 +1000
+@@ -1,9 +1,8 @@
+ # -*- shell-script -*- :mode=shellscript:
+
+ JFREECHART_HOME="$COMPONENT"
+-JFREECHART_JAR_NAMES="iText-2.1.5.jar jcommon-1.0.18.jar jfreechart-1.0.14.jar"
+-
+-classpath "$JFREECHART_HOME/lib/iText-2.1.5.jar"
+-classpath "$JFREECHART_HOME/lib/jcommon-1.0.18.jar"
+-classpath "$JFREECHART_HOME/lib/jfreechart-1.0.14.jar"
++JFREECHART_JAR_NAMES="$(java-config --classpath itext | sed -e 's@:@ @g' -e 's@/[^ ]*/@@g') $(java-config --classpath jcommon-1.0 | sed -e 's@:@ @g' -e 's@/[^ ]*/@@g') $(java-config --classpath jfreechart-1.0 | sed -e 's@:@ @g' -e 's@/[^ ]*/@@g')"
+
++classpath "$(java-config --classpath itext)"
++classpath "$(java-config --classpath jcommon-1.0)"
++classpath "$(java-config --classpath jfreechart-1.0)"
diff --git a/sci-mathematics/isabelle/files/isabelle-2016.1-bash_process-1.2.1-settings.patch b/sci-mathematics/isabelle/files/isabelle-2016.1-bash_process-1.2.1-settings.patch
new file mode 100644
index 000000000000..38d047199ce8
--- /dev/null
+++ b/sci-mathematics/isabelle/files/isabelle-2016.1-bash_process-1.2.1-settings.patch
@@ -0,0 +1,7 @@
+--- Isabelle2016-1-orig/contrib/bash_process-1.2.1/etc/settings 2016-02-14 09:48:03.000000000 +1100
++++ Isabelle2016-1/contrib/bash_process-1.2.1/etc/settings 2017-01-02 13:44:49.355549312 +1100
+@@ -1,3 +1,3 @@
+ # -*- shell-script -*- :mode=shellscript:
+
+-ISABELLE_BASH_PROCESS="$COMPONENT/${ISABELLE_PLATFORM64:-$ISABELLE_PLATFORM32}/bash_process"
++ISABELLE_BASH_PROCESS="$COMPONENT/bash_process"
diff --git a/sci-mathematics/isabelle/files/isabelle-2016.1-disable-jedit-build-after-install.patch b/sci-mathematics/isabelle/files/isabelle-2016.1-disable-jedit-build-after-install.patch
new file mode 100644
index 000000000000..6bac5ccbe748
--- /dev/null
+++ b/sci-mathematics/isabelle/files/isabelle-2016.1-disable-jedit-build-after-install.patch
@@ -0,0 +1,128 @@
+--- Isabelle2016-1-orig/src/Tools/jEdit/lib/Tools/jedit 2016-12-13 01:03:49.000000000 +1100
++++ Isabelle2016-1/src/Tools/jEdit/lib/Tools/jedit 2017-01-01 17:24:50.107722845 +1100
+@@ -239,125 +239,6 @@
+ "$ISABELLE_JEDIT_BUILD_HOME/contrib/jsr305-2.0.0.jar"
+ )
+
+-
+-# target
+-
+-TARGET="dist/jars/Isabelle-jEdit.jar"
+-
+-declare -a UPDATED=()
+-
+-if [ "$BUILD_JARS" = jars_fresh ]; then
+- OUTDATED=true
+-else
+- OUTDATED=false
+- if [ ! -e "$TARGET" ]; then
+- OUTDATED=true
+- else
+- if [ -n "$ISABELLE_JEDIT_BUILD_HOME" ]; then
+- declare -a DEPS=(
+- "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$PURE_JAR"
+- "${SOURCES[@]}" "${RESOURCES[@]}"
+- )
+- elif [ -e "$ISABELLE_HOME/Admin/build" ]; then
+- declare -a DEPS=("$PURE_JAR" "${SOURCES[@]}" "${RESOURCES[@]}")
+- else
+- declare -a DEPS=()
+- fi
+- for DEP in "${DEPS[@]}"
+- do
+- [ ! -e "$DEP" ] && fail "Missing file: $DEP"
+- [ "$DEP" -nt "$TARGET" ] && {
+- OUTDATED=true
+- UPDATED["${#UPDATED[@]}"]="$DEP"
+- }
+- done
+- fi
+-fi
+-
+-
+-# build
+-
+-if [ "$OUTDATED" = true ]
+-then
+- echo "### Building Isabelle/jEdit ..."
+-
+- [ "${#UPDATED[@]}" -gt 0 ] && {
+- echo "Changed files:"
+- for FILE in "${UPDATED[@]}"
+- do
+- echo " $FILE"
+- done
+- }
+-
+- [ -z "$ISABELLE_JEDIT_BUILD_HOME" ] && \
+- fail "Unknown ISABELLE_JEDIT_BUILD_HOME -- missing auxiliary component"
+-
+- rm -rf dist || failed
+- mkdir -p dist dist/classes || failed
+-
+- cp -p -R -f "$ISABELLE_JEDIT_BUILD_HOME/contrib/$ISABELLE_JEDIT_BUILD_VERSION/." dist/.
+- cp -p -R -f "${RESOURCES[@]}" dist/classes/.
+- cp src/jEdit.props dist/properties/.
+- cp -p -R -f src/modes/. dist/modes/.
+-
+- perl -i -e 'while (<>) {
+- if (m/FILE="ml.xml"/ or m/FILE_NAME_GLOB="...sml,ml."/) { }
+- elsif (m/NAME="javacc"/) {
+- print qq!<MODE NAME="isabelle" FILE="isabelle.xml" FILE_NAME_GLOB="{*.thy,ROOT0.ML,ROOT.ML}"/>\n\n!;
+- print qq!<MODE NAME="isabelle-ml" FILE="isabelle-ml.xml" FILE_NAME_GLOB="*.ML"/>\n\n!;
+- print qq!<MODE NAME="isabelle-news" FILE="isabelle-news.xml"/>\n\n!;
+- print qq!<MODE NAME="isabelle-options" FILE="isabelle-options.xml"/>\n\n!;
+- print qq!<MODE NAME="isabelle-root" FILE="isabelle-root.xml" FILE_NAME_GLOB="ROOT"/>\n\n!;
+- print;
+- }
+- elsif (m/NAME="sqr"/) {
+- print qq!<MODE NAME="sml" FILE="sml.xml" FILE_NAME_GLOB="*.{sml,sig}"/>\n\n!;
+- print;
+- }
+- else { print; }
+- }' dist/modes/catalog
+-
+- cd dist
+- isabelle_jdk jar xf jedit.jar
+- cp "$ISABELLE_HOME/lib/logo/isabelle_transparent-32.gif" \
+- "org/gjt/sp/jedit/icons/themes/classic/32x32/apps/isabelle.gif" || failed
+- cp "$ISABELLE_HOME/lib/logo/isabelle_transparent-32.gif" \
+- "org/gjt/sp/jedit/icons/themes/tango/32x32/apps/isabelle.gif" || failed
+- isabelle_jdk jar cfe jedit.jar org.gjt.sp.jedit.jEdit org || failed
+- rm -rf META-INF org
+- cd ..
+-
+- cp -p -R -f "${JEDIT_JARS[@]}" dist/jars/. || failed
+- (
+- #FIXME workarounds for scalac 2.11.0
+- export CYGWIN="nodosfilewarning"
+- function stty() { :; }
+- export -f stty
+-
+- for JAR in "$JEDIT_JAR" "${JEDIT_JARS[@]}" "$PURE_JAR"
+- do
+- classpath "$JAR"
+- done
+- export CLASSPATH="$(platform_path "$ISABELLE_CLASSPATH")"
+- exec "$SCALA_HOME/bin/scalac" $ISABELLE_SCALA_BUILD_OPTIONS -d dist/classes "${SOURCES[@]}"
+- ) || fail "Failed to compile sources"
+-
+- cd dist/classes
+- isabelle_jdk jar cf "../jars/Isabelle-jEdit.jar" * || failed
+- cd ../..
+- rm -rf dist/classes
+-
+- cp "$ISABELLE_JEDIT_BUILD_HOME/doc/jedit5.3.0manual-a4.pdf" dist/doc/jedit-manual.pdf
+- cp dist/doc/CHANGES.txt dist/doc/jedit-changes
+- cat > dist/doc/Contents <<EOF
+-Original jEdit Documentation
+- jedit-manual jEdit 5.3 User's Guide
+- jedit-changes jEdit 5.3 Version History
+-
+-EOF
+-
+-fi
+-
+ popd >/dev/null
+
+
diff --git a/sci-mathematics/isabelle/files/isabelle-2016.1-jortho-1.0-2-classpath.patch b/sci-mathematics/isabelle/files/isabelle-2016.1-jortho-1.0-2-classpath.patch
new file mode 100644
index 000000000000..a34cae3fcf45
--- /dev/null
+++ b/sci-mathematics/isabelle/files/isabelle-2016.1-jortho-1.0-2-classpath.patch
@@ -0,0 +1,8 @@
+--- Isabelle2016-1-orig/contrib/jortho-1.0-2/etc/settings 2014-04-16 06:03:34.000000000 +1000
++++ Isabelle2016-1/contrib/jortho-1.0-2/etc/settings 2017-01-02 00:13:01.619790577 +1100
+@@ -3,4 +3,4 @@
+ JORTHO_HOME="$COMPONENT"
+ JORTHO_DICTIONARIES="$JORTHO_HOME/dictionaries/en.gz:$JORTHO_HOME/dictionaries/en_US.gz:$JORTHO_HOME/dictionaries/en_GB-ise.gz:$JORTHO_HOME/dictionaries/en_GB-ize.gz:$JORTHO_HOME/dictionaries/en_CA.gz"
+
+-classpath "$JORTHO_HOME/jortho.jar"
++classpath "$(java-config -p jortho)"
diff --git a/sci-mathematics/isabelle/files/isabelle-2016.1-libsha1.patch b/sci-mathematics/isabelle/files/isabelle-2016.1-libsha1.patch
new file mode 100644
index 000000000000..f19436acd1c3
--- /dev/null
+++ b/sci-mathematics/isabelle/files/isabelle-2016.1-libsha1.patch
@@ -0,0 +1,11 @@
+--- Isabelle2016-1-orig/src/Pure/General/sha1.ML 2016-12-13 01:03:45.000000000 +1100
++++ Isabelle2016-1/src/Pure/General/sha1.ML 2016-12-28 20:50:36.814706587 +1100
+@@ -146,7 +146,7 @@
+ (* C library and memory *)
+
+ val library_path =
+- Path.explode ("$ML_HOME/" ^ (if ML_System.platform_is_windows then "sha1.dll" else "libsha1.so"));
++ Path.explode ("$SHA1_HOME/" ^ (if ML_System.platform_is_windows then "sha1.dll" else "libsha1.so"));
+
+ fun with_memory n =
+ Thread_Attributes.uninterruptible (fn restore_attributes => fn f =>
diff --git a/sci-mathematics/isabelle/files/isabelle-2016.1-smt_read_only_certificates.patch b/sci-mathematics/isabelle/files/isabelle-2016.1-smt_read_only_certificates.patch
new file mode 100644
index 000000000000..d766a957021d
--- /dev/null
+++ b/sci-mathematics/isabelle/files/isabelle-2016.1-smt_read_only_certificates.patch
@@ -0,0 +1,33 @@
+--- Isabelle2016-1-orig/src/HOL/SMT_Examples/Boogie.thy 2016-12-13 01:03:38.000000000 +1100
++++ Isabelle2016-1/src/HOL/SMT_Examples/Boogie.thy 2016-12-30 23:46:11.947737290 +1100
+@@ -52,7 +52,7 @@
+ section \<open>Verification condition proofs\<close>
+
+ declare [[smt_oracle = false]]
+-declare [[smt_read_only_certificates = true]]
++declare [[smt_read_only_certificates = false]]
+
+
+ declare [[smt_certificates = "Boogie_Max.certs"]]
+--- Isabelle2016-1-orig/src/HOL/SMT_Examples/SMT_Examples.thy 2016-12-13 01:03:38.000000000 +1100
++++ Isabelle2016-1/src/HOL/SMT_Examples/SMT_Examples.thy 2016-12-30 23:46:11.953737338 +1100
+@@ -9,7 +9,7 @@
+ begin
+
+ declare [[smt_certificates = "SMT_Examples.certs"]]
+-declare [[smt_read_only_certificates = true]]
++declare [[smt_read_only_certificates = false]]
+
+
+ section \<open>Propositional and first-order logic\<close>
+--- Isabelle2016-1-orig/src/HOL/SMT_Examples/SMT_Word_Examples.thy 2016-12-13 01:03:38.000000000 +1100
++++ Isabelle2016-1/src/HOL/SMT_Examples/SMT_Word_Examples.thy 2016-12-30 23:46:11.967737450 +1100
+@@ -11,7 +11,7 @@
+ declare [[smt_oracle = true]]
+ declare [[z3_extensions = true]]
+ declare [[smt_certificates = "SMT_Word_Examples.certs"]]
+-declare [[smt_read_only_certificates = true]]
++declare [[smt_read_only_certificates = false]]
+
+ text \<open>
+ Currently, there is no proof reconstruction for words.
diff --git a/sci-mathematics/isabelle/files/isabelle-2016.1-smt_timeout.patch b/sci-mathematics/isabelle/files/isabelle-2016.1-smt_timeout.patch
new file mode 100644
index 000000000000..249c94bd2583
--- /dev/null
+++ b/sci-mathematics/isabelle/files/isabelle-2016.1-smt_timeout.patch
@@ -0,0 +1,22 @@
+--- Isabelle2016-1-orig/src/HOL/SMT.thy 2016-12-13 01:03:38.000000000 +1100
++++ Isabelle2016-1/src/HOL/SMT.thy 2016-12-30 14:11:09.379863215 +1100
+@@ -201,7 +201,7 @@
+ (given in seconds) to restrict their runtime.
+ \<close>
+
+-declare [[smt_timeout = 20]]
++declare [[smt_timeout = 300]]
+
+ text \<open>
+ SMT solvers apply randomized heuristics. In case a problem is not
+--- Isabelle2016-1-orig/src/HOL/Tools/SMT/smt_config.ML 2016-12-13 01:03:42.000000000 +1100
++++ Isabelle2016-1/src/HOL/Tools/SMT/smt_config.ML 2016-12-30 14:11:27.186904132 +1100
+@@ -170,7 +170,7 @@
+ (* options *)
+
+ val oracle = Attrib.setup_config_bool @{binding smt_oracle} (K true)
+-val timeout = Attrib.setup_config_real @{binding smt_timeout} (K 30.0)
++val timeout = Attrib.setup_config_real @{binding smt_timeout} (K 300.0)
+ val reconstruction_step_timeout = Attrib.setup_config_real @{binding smt_reconstruction_step_timeout} (K 10.0)
+ val random_seed = Attrib.setup_config_int @{binding smt_random_seed} (K 1)
+ val read_only_certificates = Attrib.setup_config_bool @{binding smt_read_only_certificates} (K false)
diff --git a/sci-mathematics/isabelle/isabelle-2016.1.ebuild b/sci-mathematics/isabelle/isabelle-2016.1.ebuild
new file mode 100644
index 000000000000..99534d2b1389
--- /dev/null
+++ b/sci-mathematics/isabelle/isabelle-2016.1.ebuild
@@ -0,0 +1,328 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils check-reqs java-pkg-2 versionator
+
+MY_PN="Isabelle"
+MY_PV=$(replace_all_version_separators '-')
+MY_P="${MY_PN}${MY_PV}"
+
+BP_PV="1.2.1"
+BP_PN="bash_process"
+BP_P="${BP_PN}-${BP_PV}"
+BP_IC_PN="${BP_PN}-isabelle-component"
+BP_IC_P="${BP_IC_PN}-${BP_PV}"
+
+# csdp is used in the compile of HOL_ex in
+# Library/Sum_of_Squares/sos_wrapper.ML where it execs $ISABELLE_CSDP
+CSDP_PV="6.x"
+CSDP_PN="csdp"
+CSDP_P="${CSDP_PN}-${CSDP_PV}"
+CSDP_IC_PN="${CSDP_PN}-isabelle-component"
+CSDP_IC_P="${CSDP_IC_PN}-${CSDP_PV}"
+
+ISABELLE_FONTS_PV="20160830"
+ISABELLE_FONTS_PN="isabelle_fonts"
+ISABELLE_FONTS_P="${ISABELLE_FONTS_PN}-${ISABELLE_FONTS_PV}"
+ISABELLE_FONTS_IC_PN="${ISABELLE_FONTS_PN}-isabelle-component"
+ISABELLE_FONTS_IC_P="${ISABELLE_FONTS_IC_PN}-${ISABELLE_FONTS_PV}"
+
+JEDIT_PV="20161024"
+JEDIT_PN="jedit_build"
+JEDIT_P="${JEDIT_PN}-${JEDIT_PV}"
+JEDIT_IC_PN="${JEDIT_PN}-isabelle-component"
+JEDIT_IC_P="${JEDIT_IC_PN}-${JEDIT_PV}"
+
+JORTHO_PV="1.0-2"
+JORTHO_PN="jortho"
+JORTHO_P="${JORTHO_PN}-${JORTHO_PV}"
+JORTHO_IC_PN="${JORTHO_PN}-isabelle-component"
+JORTHO_IC_P="${JORTHO_IC_PN}-${JORTHO_PV}"
+
+JFREECHART_PV="1.0.14-1"
+JFREECHART_PN="jfreechart"
+JFREECHART_P="${JFREECHART_PN}-${JFREECHART_PV}"
+JFREECHART_IC_PN="${JFREECHART_PN}-isabelle-component"
+JFREECHART_IC_P="${JFREECHART_IC_PN}-${JFREECHART_PV}"
+
+POLYML_PV="5.6-1"
+POLYML_PN="polyml"
+POLYML_P="${POLYML_PN}-${POLYML_PV}"
+POLYML_IC_PN="${POLYML_PN}-isabelle-component"
+POLYML_IC_P="${POLYML_IC_PN}-${POLYML_PV}"
+
+SSH_JAVA_PV="20161009"
+SSH_JAVA_PN="ssh-java"
+SSH_JAVA_P="${SSH_JAVA_PN}-${SSH_JAVA_PV}"
+SSH_JAVA_IC_PN="${SSH_JAVA_PN}-isabelle-component"
+SSH_JAVA_IC_P="${SSH_JAVA_IC_PN}-${SSH_JAVA_PV}"
+
+XZ_JAVA_PV="1.5"
+XZ_JAVA_PN="xz-java"
+XZ_JAVA_P="${XZ_JAVA_PN}-${XZ_JAVA_PV}"
+XZ_JAVA_IC_PN="${XZ_JAVA_PN}-isabelle-component"
+XZ_JAVA_IC_P="${XZ_JAVA_IC_PN}-${XZ_JAVA_PV}"
+
+SS="2.11"
+
+DESCRIPTION="Isabelle is a generic proof assistant"
+HOMEPAGE="http://www.cl.cam.ac.uk/research/hvg/Isabelle/index.html"
+SRC_URI="http://isabelle.in.tum.de/website-${MY_P}/dist/${MY_P}.tar.gz
+ http://isabelle.in.tum.de/dist/contrib/${BP_P}.tar.gz -> ${BP_IC_P}.tar.gz
+ https://dev.gentoo.org/~gienah/snapshots/${CSDP_IC_P}.tar.gz
+ http://isabelle.in.tum.de/dist/contrib/${ISABELLE_FONTS_P}.tar.gz -> ${ISABELLE_FONTS_IC_P}.tar.gz
+ http://isabelle.in.tum.de/components/${JORTHO_P}.tar.gz -> ${JORTHO_IC_P}.tar.gz
+ http://isabelle.in.tum.de/components/${JEDIT_P}.tar.gz -> ${JEDIT_IC_P}.tar.gz
+ http://isabelle.in.tum.de/dist/contrib/${JFREECHART_P}.tar.gz -> ${JFREECHART_IC_P}.tar.gz
+ https://dev.gentoo.org/~gienah/snapshots/${POLYML_IC_P}.tar.gz
+ http://isabelle.in.tum.de/dist/contrib/${SSH_JAVA_P}.tar.gz -> ${SSH_JAVA_IC_P}.tar.gz
+ https://dev.gentoo.org/~gienah/snapshots/${XZ_JAVA_IC_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc graphbrowsing ledit readline"
+
+#upstream says
+#bash 2.x/3.x, Poly/ML 5.x, Perl 5.x,
+#for document preparation: complete LaTeX
+DEPEND=">=app-shells/bash-3.0:*
+ >=dev-java/jcommon-1.0.18:1.0
+ dev-java/jortho:0
+ >=dev-java/jfreechart-1.0.14:1.0
+ >=dev-java/itext-2.1.5:0
+ dev-java/xz-java:0
+ >=dev-lang/ghc-7.6.3
+ >=dev-lang/polyml-5.6:=[-portable]
+ >=dev-lang/perl-5.8.8-r2
+ >=dev-lang/swi-prolog-6.6.6
+ sci-libs/coinor-csdp
+ =sci-mathematics/z3-4.4*[isabelle]
+ >=virtual/jdk-1.8
+ doc? (
+ virtual/latex-base
+ dev-tex/rail
+ )
+ >=dev-lang/scala-2.11.8:${SS}
+ ledit? (
+ app-misc/ledit
+ )
+ readline? (
+ app-misc/rlwrap
+ )"
+
+RDEPEND="dev-perl/libwww-perl
+ sci-mathematics/sha1-polyml
+ >=virtual/jre-1.8
+ ${DEPEND}"
+
+S="${WORKDIR}"/Isabelle${MY_PV}
+TARGETDIR="/usr/share/Isabelle"
+
+# Notes on QA warnings: * Class files not found via DEPEND in package.env
+# Stuff with $ in the name appear to be spurious:
+# isabelle/Markup_Tree$$anonfun$results$1$1.class
+# scala/tools/nsc/backend/jvm/GenJVM$BytecodeGenerator$$anonfun$computeLocalVarsIndex$1.class
+# It wants javafx, I am unsure how to fix this. I test isabelle with the Sun JDK:
+# javafx/application/Platform.class javafx
+# Presumably the user can provide the jEdit plugins if they are necessary:
+# marker/MarkerSetsPlugin.class http://plugins.jedit.org/plugins/?MarkerSets
+# projectviewer/gui/OptionPaneBase.class http://plugins.jedit.org/plugins/?ProjectViewer
+
+JAVA_GENTOO_CLASSPATH="itext,jcommon-1.0,jortho,jfreechart-1.0,scala-${SS},xz-java"
+
+CHECKREQS_MEMORY="8192M"
+CHECKREQS_DISK_BUILD="17G"
+CHECKREQS_DISK_USR="8G"
+
+src_unpack() {
+ unpack "${MY_P}.tar.gz"
+ cd "${S}/contrib" || die
+ unpack ${BP_IC_P}.tar.gz
+ unpack ${CSDP_IC_P}.tar.gz
+ unpack ${ISABELLE_FONTS_IC_P}.tar.gz
+ unpack ${JEDIT_IC_P}.tar.gz
+ unpack ${JORTHO_IC_P}.tar.gz
+ unpack ${JFREECHART_IC_P}.tar.gz
+ unpack ${POLYML_IC_P}.tar.gz
+ unpack ${SSH_JAVA_IC_P}.tar.gz
+ unpack ${XZ_JAVA_IC_P}.tar.gz
+}
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ check-reqs_pkg_setup
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+ java-pkg_getjars ${JAVA_GENTOO_CLASSPATH}
+ rm -rf "${S}/contrib/${BP_P}/{x86-cygwin,x86-darwin,x86_64-darwin,x86-linux,x86_64-linux}" \
+ || die "Could not remove bash_process binaries"
+ rm -f "${S}/contrib/${JORTHI_P}/${JORTHO_PN}.jar" \
+ || die "Could not remove contrib/${JORTHI_P}/${JORTHO_PN}.jar"
+ eapply "${FILESDIR}/${PN}-2016-classpath.patch"
+ eapply "${FILESDIR}/${PN}-2016-jfreechart-classpath.patch"
+ eapply "${FILESDIR}/${PN}-2016.1-bash_process-1.2.1-settings.patch"
+ eapply "${FILESDIR}/${PN}-2012-graphbrowser.patch"
+ eapply "${FILESDIR}/${PN}-2016.1-libsha1.patch"
+ eapply "${FILESDIR}/${PN}-2016.1-smt_timeout.patch"
+ eapply "${FILESDIR}/${PN}-2016.1-smt_read_only_certificates.patch"
+ eapply "${FILESDIR}/${PN}-2016.1-disable-jedit-build-after-install.patch"
+ eapply "${FILESDIR}/${PN}-2016.1-jortho-1.0-2-classpath.patch"
+ local polymlver=$(poly -v | cut -d' ' -f2)
+ local polymlarch=$(poly -v | cut -d' ' -f9 | cut -d'-' -f1)
+ cat <<- EOF >> "${S}/etc/settings"
+ # Poly/ML Gentoo (${polymlarch,,})
+ ML_PLATFORM=${polymlarch,,}-linux
+ ML_HOME="${ROOT}usr/bin"
+ ML_SYSTEM=polyml-${polymlver}
+ ML_OPTIONS="-H 1000"
+ ML_SOURCES="${ROOT}usr/src/debug/dev-lang/polyml-${polymlver}"
+
+ ISABELLE_GHC="${ROOT}usr/bin/ghc"
+ ISABELLE_OCAML="${ROOT}usr/bin/ocaml"
+ ISABELLE_SWIPL="${ROOT}usr/bin/swipl"
+ ISABELLE_JDK_HOME="\$(java-config --jdk-home)"
+ ISABELLE_BUILD_JAVA_OPTIONS="-Djava.awt.headless=true"
+ SCALA_HOME="${ROOT}usr/share/scala-${SS}"
+ SHA1_HOME="${ROOT}usr/$(get_libdir)/sha1-polyml"
+ EOF
+ local Z3_P="$(best_version sci-mathematics/z3 | sed 's:sci-mathematics/::')"
+ cat <<- EOF >> "${S}/etc/components"
+ #bundled components
+ contrib/${BP_P}
+ contrib/${CSDP_P}
+ contrib/${ISABELLE_FONTS_P}
+ contrib/${JEDIT_P}
+ contrib/${JORTHO_P}
+ contrib/${JFREECHART_P}
+ contrib/${POLYML_P}
+ contrib/${SSH_JAVA_P}
+ contrib/${XZ_JAVA_P}
+ contrib/${Z3_P}
+ EOF
+ local Z3_RC="${ROOT}usr/share/Isabelle/contrib/${Z3_P}"
+ [ -d "${Z3_RC}" ] \
+ || die "z3 isabelle component directory ${Z3_RC} does not exist"
+ ln -s "${Z3_RC}" \
+ "${S}/contrib/${Z3_P}" \
+ || die "Failed to create z3 isabelle component symbolic link"
+ if use ledit && ! use readline; then
+ eapply "${FILESDIR}/${PN}-2012-reverse-line-editor-order.patch"
+ fi
+ rm -f "${S}/contrib/${JFREECHART_P}/lib"/*.jar \
+ || die "Could not rm bundled jar files supplied by Gentoo"
+}
+
+src_compile() {
+ unset DISPLAY
+ einfo "Building Isabelle. This may take some time."
+ pushd contrib/${BP_P} || die "Could not cd to contrib/${BP_P}"
+ $(tc-getCC) ${CFLAGS} ${LDFLAGS} -o ${BP_PN} ${BP_PN}.c \
+ || die "Could not build ${BP_PN}"
+ popd || die
+ if use graphbrowsing
+ then
+ rm -f "${S}/lib/browser/GraphBrowser.jar" \
+ || die "failed cleaning graph browser directory"
+ pushd "${S}/lib/browser" \
+ || die "Could not change directory to lib/browser"
+ ./build || die "failed building the graph browser"
+ popd
+ fi
+ ./bin/isabelle jedit -b -f || die "pide build failed"
+ pushd "${S}"/src/Pure || die "Could not change directory to src/Pure"
+ ../../bin/isabelle env ./build-jars -f || die "build-jars failed"
+ popd || die
+ ./bin/isabelle build -a -b -s -v || die "isabelle build failed"
+}
+
+src_install() {
+ local Z3_P="$(best_version sci-mathematics/z3 | sed 's:sci-mathematics/::')"
+ rm "${S}/contrib/${Z3_P}" \
+ || die "Failed to remove z3 isabelle component symbolic link"
+
+ insinto ${TARGETDIR}
+ doins -r src
+ doins -r lib
+ doins -r contrib
+ doins ROOTS
+
+ docompress -x /usr/share/doc/${PF}
+ dodoc -r doc
+ if use doc; then
+ dosym /usr/share/doc/${PF}/doc "${TARGETDIR}/doc"
+ # The build of sci-mathematics/haskabelle with use doc requires
+ # sci-mathematics/isabelle[doc?]. The haskabelle doc build requires
+ # the src/Doc directory stuff in the isabelle package.
+ doins -r src/Doc
+ for i in $(find ./src/Doc -type f -executable -print)
+ do
+ exeinto $(dirname "${TARGETDIR}/${i}")
+ doexe ${i}
+ done
+ fi
+
+ for i in $(find \
+ ./{bin,lib,"contrib/${BP_P}/${BP_PN}",src/HOL,src/Pure,src/Tools} \
+ -type f -executable -print)
+ do
+ exeinto $(dirname "${TARGETDIR}/${i}")
+ doexe ${i}
+ done
+
+ insinto /etc/isabelle
+ doins -r etc/*
+ dosym /etc/isabelle "${TARGETDIR}/etc"
+
+ local LIBDIR="/usr/"$(get_libdir)"/Isabelle"${MY_PV}
+ dosym "${LIBDIR}/heaps" "${TARGETDIR}/heaps"
+ insinto ${LIBDIR}
+ doins -r heaps
+
+ ./bin/isabelle install -d ${TARGETDIR} "${ED}usr/bin" \
+ || die "isabelle install failed"
+ newicon lib/icons/"${PN}.xpm" "${PN}.xpm"
+ newicon lib/icons/"${PN}-mini.xpm" "${PN}-mini.xpm"
+
+ java-pkg_regjar \
+ $(find . -type f -name \*.jar -print | sed -e "s@^\.@${ED}${TARGETDIR}@g")
+
+ local DOCS=( "ANNOUNCE" "CONTRIBUTORS" "COPYRIGHT" "NEWS" "README" )
+ einstalldocs
+}
+
+pkg_postinst() {
+ # If any of the directories in /etc/isabelle/components do not exist, then
+ # even isabelle getenv ISABELLE_HOME fails. Hence it is necessary to
+ # to delete any non-existing directories. If an old Isabelle version was
+ # installed with component ebuilds like sci-mathematics/e, then the
+ # Isabelle version is upgraded, then the contrib directories will not
+ # exist initially, it is necessary to delete them from /etc/isabelle/components.
+ # Then these components are rebuilt (creating these directories) using the
+ # EAPI=5 subslot depends.
+ for i in $(egrep '^[^#].*$' "${ROOT}etc/isabelle/components")
+ do
+ if [ ! -d ${TARGETDIR}/${i} ]; then
+ sed -e "\@${i}@d" -i "${ROOT}etc/isabelle/components"
+ fi
+ done
+ if use ledit && use readline; then
+ elog "Both readline and ledit use flags specified. The default setting"
+ elog "if both are installed is to use readline (rlwrap), this can be"
+ elog "modfied by editing the ISABELLE_LINE_EDITOR setting in"
+ elog "${ROOT}/etc/isabelle/settings"
+ fi
+ elog "Please ensure you have a pdf viewer installed, for example:"
+ elog "As root: emerge app-text/zathura-pdf-poppler"
+ elog "Please configure your preferred pdf viewer, something like:"
+ elog "As normal user: xdg-mime default zathura.desktop application/pdf"
+ elog "Or alternatively by editing the PDF_VIEWER variable in the system"
+ elog "settings file ${ROOT}etc/isabelle/settings and/or the user"
+ elog "settings file \$HOME/.isabelle/${MY_P}/etc/settings"
+ elog "For nitpick it is necessary to install:"
+ elog "emerge sci-mathematics/kodkodi"
+}
diff --git a/sci-mathematics/isabelle/metadata.xml b/sci-mathematics/isabelle/metadata.xml
new file mode 100644
index 000000000000..d59b385fb4ad
--- /dev/null
+++ b/sci-mathematics/isabelle/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>gienah@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+</maintainer>
+<longdescription lang="en">
+Isabelle is a generic proof assistant. It allows mathematical
+formulas to be expressed in a formal language and provides tools
+for proving those formulas in a logical calculus. The main
+application is the formalization of mathematical proofs and in
+particular formal verification, which includes proving the
+correctness of computer hardware or software and proving
+properties of computer languages and protocols.
+</longdescription>
+<use>
+ <flag name="graphbrowsing">Generate theory browsing information,
+ including HTML documents that show a theory's definition, the
+ theorems proved in its ML file and the relationship with its
+ ancestors and descendants.</flag>
+ <flag name="ledit">Use ledit for the isabelle tty line editor</flag>
+ <flag name="readline">Use readline (rlwrap) for the isabelle tty line
+ editor</flag>
+</use>
+</pkgmetadata>
diff --git a/sci-mathematics/jags/Manifest b/sci-mathematics/jags/Manifest
new file mode 100644
index 000000000000..5e782f9f6412
--- /dev/null
+++ b/sci-mathematics/jags/Manifest
@@ -0,0 +1,11 @@
+DIST JAGS-3.4.0.tar.gz 1677450 SHA256 2beaa9a2672c2c95efc55ffa4c8b597a872f20232373daebd17ad539d3d7d82b SHA512 7a330ea41eab63b23d8ae3622c6920f0dc3dba653a18256957b9b862bb86b746ff706e9e9bf3f806524250b439161a6df4ad05af682354073f9b0074f9825896 WHIRLPOOL 48f2bf92f80ea0558697701320e142a61b3eb5cfefe234973a6a189096b7887ec5ea829f8f6183bf9ad4a0f6fb07d769c710b721ec1e211772cbeaea0187c8e2
+DIST JAGS-4.0.0.tar.gz 1880476 SHA256 a1d572269029d90d4e8b25757fd7ae9678994bd682937ec505ddcf06185d2c4c SHA512 bbe4f4600dff0fc1db6f8548b8d386ea804174d69788646681de6d006a0e0ab018fb01257b5737f871d10c8b59865950fb91b6a9cad5d1e6addc415004c6f82c WHIRLPOOL d1f2ad15834252c63300259c789f69ca0fa008d0c2008d504db2c394642f7a63180baae76bc272a33a92c83addc373fd9ce026063ea74b40397ac902c2272aed
+DIST JAGS-4.1.0.tar.gz 1872634 SHA256 45ecf31b5b2127620a79875745b8ea4203ca2430a8b3625f5e80adc897cdf522 SHA512 76b52764e57e6c4450cc52c7c7c3de384f93bd6e57d8b88f1863b7c329bdd2ec39834902c223d433d263bcf29362b958807a9cb96b9066d4f75832b366339fd8 WHIRLPOOL b0187c02a971ccc733c34aa2e4f8e1ed32d1c767d97fb667034cd6035c08f63c2a6c014dcb5d5dd7ed080fdc9fae34be7bf002d0d631a6a454b849cf7c3cec67
+DIST JAGS-4.2.0.tar.gz 1875538 SHA256 af3e9d2896d3e712f99e2a0c81091c6b08f096650af6aa9d0c631c0790409cf7 SHA512 316483cd1a879c70c9b8ad6f23665196b95b9745da3924a47e14f4b0fd7c1abf9237575561cb31044623594360b6e991de68e1d9746baedeb285c65b77baada8 WHIRLPOOL 84e13b5c581cb740a25bd94d95049d6e8830e3b9403b29b188d0ab1ec552e99015620fa93f0e6da85ce293db3bf8b07f1d763e48f6d7cef745c9d9a424ea637c
+EBUILD jags-3.4.0.ebuild 977 SHA256 2e9d464defabdccd73dde0cce5ad8d9f105a3077cae44d1108a1dbd12a849ba2 SHA512 129dfdb423688686fd0b52f02b6934204a0ac9cb140427e3ba0bf4028ac8d4c6a3e50179e38a08f7533842d5a6e281a2f97693a0df9857ab82980d730697b4ac WHIRLPOOL e7abac4c6e989b9b4fbac4c388075a0b6fbe61982b572cf9efa9a22b1405bfdad93b16fe871fa18795a814ddcd41e3ae5d4a92ffaa590cf33ff74fbfb54a7a33
+EBUILD jags-4.0.0.ebuild 974 SHA256 daecda92ae9aeaa90b1939aba619b43e50b2b1a33eb2b3f4c6f26a8b126b2652 SHA512 962d8374060fc4de2661cf22926e2f31f7fe2b7b24df767e49815f115b45355cd0f1970785121f5d97154c3ae07ae5722b9ca00b13ed6e6860085e936f5191c1 WHIRLPOOL bbc762419c8e2b61f4480124deb19d846564afefbe67acfdaa31d2d9517cf2a67f3f23508e46ec632c57a73f53738ab7160689a248c3ad94283b69f0285f5565
+EBUILD jags-4.1.0.ebuild 885 SHA256 6fec2e5b31a1fdb9d87413bd8b47204db9394c25d200f0682742afd28945e7f6 SHA512 cfae8a6a14df0c226fcf42a56b281d9aa1c298e169b25d706e33f89318c6b08c1a9fb335879ceb5ae879e6139e6900724c91b325200a1f1908cab9ea8ed441a0 WHIRLPOOL 4033276ea954a98a45b679f269eff93dc3fbd1b94ee81e1f471e6764096d868401d25be8aa2ce49ffecfb851b2fc7df9b47d402c54b7a1b94c169a4dafa946ce
+EBUILD jags-4.2.0.ebuild 883 SHA256 fb758b4c833cc8597731c6151cb8e5887a90df557fcc1f9ca941de08e5d6af20 SHA512 96182242c5d7b049a808b3396625b2235cb30923fa77ede74cf0a2117b469ea0d1f339920f6ea122ac868c5704c77fd9fd784ea8c8805a21a7d733fbd34441bb WHIRLPOOL d625afdee494836234b8026e1136c96ec3934bcafd96757eafb6e4bdd40165d28137182a59fe5ea032003e87f8bfb1778087d111915be6a4f907d83bfbccc967
+MISC ChangeLog 3364 SHA256 bd181d4d78026160e100e5776be54dd17b169a05fe4718bddfea57c51a60509d SHA512 f6f485540c5d9797627fcbc28c5a1f560f1d7172b8ab8612fc0a1522f5185687cbe4f1d159ae7cd37e20256459c5f93ff4a38d78fa5e84e28e12868e3ea4ae1f WHIRLPOOL 14b65f6d82bd241d3afe9f703255aa2c6bf3169e520534e60e3f11983e04d5dd340282fa9810620113d9b1f9b01f4a216f7ef3565be236da7261fa0b65d37bd4
+MISC ChangeLog-2015 2622 SHA256 c9791b23299a7ec79040216f9ad658acd88e87af8af99c684128fdbc130f2203 SHA512 fb1ddcabf2dc73340f12bb6b40126aa60ba6c1961d2219a87b9005a7c7bac0ebc39c0013c7f9c188a064e43eab467d43334ccb0c989b60c7186fd4a2f86f6eef WHIRLPOOL 39b4efb4b474404f7d31ecd2a402afec4948ba148a43aac36334b01f4ce7d77db2d2d29a5a3a7be8cb6ad271a05a0e2e1569f266a6d3f99a83c4a895c96af72b
+MISC metadata.xml 862 SHA256 079ae87016ad150693389b962d6bbb83d70918805168e1adfbbe6fd6aeae945a SHA512 86f27a081286b51ba645006d3c65ec43d69aa4e15218bac97730295e2ebd1cab67c592f1c7fefdbdd9b959b68e54eaf358173f7d599cb1ab5ff13dea7eef3705 WHIRLPOOL e5bce84891d4ea260adccec1e4f7a1163d5aff07494f09cf84365148fbeaa94758c5f12c90c2dbe411e19a363b896b5c64cc09b3925867afa1547bd11b7df651
diff --git a/sci-mathematics/jags/jags-3.4.0.ebuild b/sci-mathematics/jags/jags-3.4.0.ebuild
new file mode 100644
index 000000000000..b7217d8d3027
--- /dev/null
+++ b/sci-mathematics/jags/jags-3.4.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools-utils toolchain-funcs
+
+MYP="JAGS-${PV}"
+
+DESCRIPTION="Just Another Gibbs Sampler for Bayesian MCMC simulation"
+HOMEPAGE="http://mcmc-jags.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/mcmc-jags/JAGS/3.x/Source/${MYP}.tar.gz"
+LICENSE="GPL-2"
+IUSE="doc"
+
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ virtual/blas
+ virtual/lapack"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-latexextra
+ )"
+
+S="${WORKDIR}/${MYP}"
+
+src_configure() {
+ local myeconfargs=(
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)"
+ --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile all $(use doc && echo docs)
+}
+
+src_install() {
+ autotools-utils_src_install
+ use doc && dodoc "${BUILD_DIR}"/doc/manual/*.pdf
+}
diff --git a/sci-mathematics/jags/jags-4.0.0.ebuild b/sci-mathematics/jags/jags-4.0.0.ebuild
new file mode 100644
index 000000000000..5ad4ed026ac1
--- /dev/null
+++ b/sci-mathematics/jags/jags-4.0.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools-utils toolchain-funcs
+
+MYP="JAGS-${PV}"
+
+DESCRIPTION="Just Another Gibbs Sampler for Bayesian MCMC simulation"
+HOMEPAGE="http://mcmc-jags.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/mcmc-jags/JAGS/4.x/Source/${MYP}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+RDEPEND="
+ virtual/blas
+ virtual/lapack"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-latexextra
+ )"
+
+S="${WORKDIR}/${MYP}"
+
+src_configure() {
+ local myeconfargs=(
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)"
+ --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
+ )
+ autotools-utils_src_configure
+}
+
+src_compile() {
+ autotools-utils_src_compile all $(usex doc docs "")
+}
+
+src_install() {
+ autotools-utils_src_install
+ use doc && dodoc "${BUILD_DIR}"/doc/manual/*.pdf
+}
diff --git a/sci-mathematics/jags/jags-4.1.0.ebuild b/sci-mathematics/jags/jags-4.1.0.ebuild
new file mode 100644
index 000000000000..e5ebc8c33151
--- /dev/null
+++ b/sci-mathematics/jags/jags-4.1.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs
+
+MYP="JAGS-${PV}"
+
+DESCRIPTION="Just Another Gibbs Sampler for Bayesian MCMC simulation"
+HOMEPAGE="http://mcmc-jags.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/mcmc-jags/JAGS/4.x/Source/${MYP}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+RDEPEND="
+ virtual/blas
+ virtual/lapack"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-latexextra
+ )"
+
+S="${WORKDIR}/${MYP}"
+
+src_configure() {
+ econf \
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
+ --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
+}
+
+src_compile() {
+ emake all $(usex doc docs "")
+}
+
+src_install() {
+ default
+ use doc && dodoc doc/manual/*.pdf
+ prune_libtool_files
+}
diff --git a/sci-mathematics/jags/jags-4.2.0.ebuild b/sci-mathematics/jags/jags-4.2.0.ebuild
new file mode 100644
index 000000000000..0ff7b08efd9f
--- /dev/null
+++ b/sci-mathematics/jags/jags-4.2.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs
+
+MYP="JAGS-${PV}"
+
+DESCRIPTION="Just Another Gibbs Sampler for Bayesian MCMC simulation"
+HOMEPAGE="http://mcmc-jags.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/mcmc-jags/JAGS/4.x/Source/${MYP}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+RDEPEND="
+ virtual/blas
+ virtual/lapack"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-latexextra
+ )"
+
+S="${WORKDIR}/${MYP}"
+
+src_configure() {
+ econf \
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
+ --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
+}
+
+src_compile() {
+ emake all $(usex doc docs "")
+}
+
+src_install() {
+ default
+ use doc && dodoc doc/manual/*.pdf
+ prune_libtool_files
+}
diff --git a/sci-mathematics/jags/metadata.xml b/sci-mathematics/jags/metadata.xml
new file mode 100644
index 000000000000..ff35c78e124a
--- /dev/null
+++ b/sci-mathematics/jags/metadata.xml
@@ -0,0 +1,21 @@
+<?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">
+ JAGS is Just Another Gibbs Sampler. It is a program for analysis of
+ Bayesian hierarchical models using Markov Chain Monte Carlo (MCMC)
+ simulation not wholly unlike BUGS.
+ JAGS was written with three aims in mind:
+ * To have an engine for the BUGS language that runs on Unix
+ * To be extensible, allowing users to write their own functions,
+ distributions and samplers.
+ * To be a plaftorm for experimentation with ideas in Bayesian modelling
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">mcmc-jags</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/kodkod/Manifest b/sci-mathematics/kodkod/Manifest
new file mode 100644
index 000000000000..b93bf86cca86
--- /dev/null
+++ b/sci-mathematics/kodkod/Manifest
@@ -0,0 +1,8 @@
+AUX kodkod-1.5.2-changes-in-most-specific-varargs-method-selection.patch 1045 SHA256 87727817e23d03156acc5a56238124e265f0eef13f441ea5ba6802df1e94ca34 SHA512 ff30065387503ffa1fb74de988a36526f3680a648faae1a6826db6b91c2dfaac0f63ff6dba32e5fcef11a7b5727a385dfd9301d030f45213e091886c40ea7867 WHIRLPOOL 413786b0562f86e378d96494f71a81da4b6eedb0b66c2b64c908c7adf8b309d62c5d3999a0aca9d135601f1c337c05a927b73926c2c52e0232edd114d2f4c9f1
+DIST kodkod-1.5.2.zip 2092639 SHA256 c54e2181f1e094bf34d52d3ab47b313c4d4464dc25c2cbb3ffd80929d1004a41 SHA512 d55d84e1daabe37c6994fd434c157d5eaecd1d0b2bbe4ab5a2d5e0e529a378d0cb8dc1eac5b89336706f899b23b9682dfd1033f4a2caec76485b12966e091df0 WHIRLPOOL 9919b7bb4de3cf8d53804cfb4a8c5874575acadc6fc7f0afcabd31847947e2f1f77ffb5565fe283088bafb9421fdc8d1245243a58e7f5d97004ecf66d7f1ac12
+DIST waf-1.7.16 91846 SHA256 b64dc26c882572415fd450b745006107965f3fe17b357e3eb43d6676c9635a61 SHA512 ccdf27cac76f525e11bde20d01c3f81b738b4c990934ee290a390fcf1b278da05047bcee76973c80be4557689344f6df33c13e232b278258745e2f19eeed5ebf WHIRLPOOL 79b59876606a93c7a13548799c8797f40515cbf8bc2944018de758df3e8cd9698e4304d5d26a03ae883195ec02d6e0b12e6fc7160e4ef31446d7c3d05f98983a
+EBUILD kodkod-1.5.2-r1.ebuild 3837 SHA256 a6e3c44db1e7df48365ce110a542523aa24d3c5663aea998f364a9743a32158c SHA512 76b42bb0e823f1bfe318af13cee2a2b6a8f93d49b3dca93a92bcf3eb876351a684464d03c5d5e7eed4227501ca37c5c306c44e330cbba9f8e3766afacbbef2a2 WHIRLPOOL dd025639003090ef45cc2ae14435c922074ff923ed723cf76be5b94da01e41ce251e0dab427a7ce6d655690cfb037d8e168162033c34f46ce731edae2d3561b2
+EBUILD kodkod-1.5.2.ebuild 3835 SHA256 68d6396a5aae65c39811daa4c1ca192d3724c72217dc0ea8adf6048594798611 SHA512 eb5da579f6a4ecdc317a13c497b1c89fad986cf65e77e8881ca7c9370761878f5d71737196c685a08c857c59f267e29703bef68c6186f5f1622111a786303e64 WHIRLPOOL 09482eb2335397cb08760344f8aa8918ca9286ded1e4fac982057ae5399ccf340d256eb59c2997dc26edd36884707bbd7b32beab3e7606d6a8d7041b9405e9d4
+MISC ChangeLog 2672 SHA256 496577e3c620e3b7adfd8dd3bfd034a5b898cd14fb9c3c290b14af1765607ee1 SHA512 cc8e3e424542d6eb4dded7b79834661662bb8de6a1eda36a7bebd915cd89e33da107a59f3176daa5241c95a3b08566a1940f4b350c7a5d3a51b17d5efc1dcf08 WHIRLPOOL 64928ea9c56357865c8f85e9e2ce86fb4d5281bc8dc250e44c13536612ed9e7772f73eef78f78f31020e3504fd4c95b9d0ec63dff5978599ce5f04090441d56a
+MISC ChangeLog-2015 1610 SHA256 30deee75c33c3c7a96b5e23a2f158ea8e6fa41e0669dbd33f2583268cdc9a371 SHA512 b7df15d187f83a091984086a86c203352eda2703f7ca61c6c0dfbb647fea8fa028120d5cc889ac759158391019b51f5a2afc61a2f02e4d9a446ecb8113e49b39 WHIRLPOOL d5fcf9557975baed7eb6cbc921a6ae6ec5a226b68ef15e6bc8e04148d2f3d5451b82713d0a1ce7a23a13a28611d54d5e974a2edc7a42ab75f8c8b333eacc9af4
+MISC metadata.xml 927 SHA256 612583df06c7395a1f8d8e05ac0ae2abe26159eca5f48b9d35bfeb0ecc1987da SHA512 6ef6a53f3a21c6786ba6044925d13de7bf396a3e59d1810e963a75005575e57d9a816ac765338055f1d7a3f05f7fda8c98d6a357da7d310a223b0158d887b307 WHIRLPOOL 18c13191680d0ae580a06eeb5780963f2ca047aeaf3b56bf089e5def9fbd19af147af5763e4cb16fc00bb534f72d1f1037a7b3947c7ce3c717a881eef5324b08
diff --git a/sci-mathematics/kodkod/files/kodkod-1.5.2-changes-in-most-specific-varargs-method-selection.patch b/sci-mathematics/kodkod/files/kodkod-1.5.2-changes-in-most-specific-varargs-method-selection.patch
new file mode 100644
index 000000000000..613d713f0070
--- /dev/null
+++ b/sci-mathematics/kodkod/files/kodkod-1.5.2-changes-in-most-specific-varargs-method-selection.patch
@@ -0,0 +1,28 @@
+--- kodkod-1.5-orig/src/kodkod/util/ints/Ints.java 2011-09-22 19:00:22.000000000 +1000
++++ kodkod-1.5/src/kodkod/util/ints/Ints.java 2013-02-02 22:30:12.825378928 +1100
+@@ -316,25 +316,6 @@
+ }
+
+ /**
+- * An implementation of Paul Hsieh's hashing function,
+- * described at http://www.azillionmonkeys.com/qed/hash.html.
+- * The method returns a 32 bit hash of the given objects' hash codes,
+- * or zero if the array is empty. Any null references in the array
+- * are taken to have 0 as their hash code value.
+- * @return a 32 bit hash of the given objects' hashCodes
+- */
+- public static int superFastHash(Object... key) {
+- if (key.length==0) return 0;
+- int hash = key.length;
+-
+- for(Object o : key) {
+- hash = superFastHashIncremental(o == null ? 0 : o.hashCode(), hash);
+- }
+- // no end cases since the hashcodes of key parts are ints
+- return superFastHashAvalanche(hash);
+- }
+-
+- /**
+ * An implementation of an IntSet wrapper for an IntRange.
+ */
+ private static final class RangeIntSet extends AbstractIntSet {
diff --git a/sci-mathematics/kodkod/kodkod-1.5.2-r1.ebuild b/sci-mathematics/kodkod/kodkod-1.5.2-r1.ebuild
new file mode 100644
index 000000000000..33f6ca4a7bc9
--- /dev/null
+++ b/sci-mathematics/kodkod/kodkod-1.5.2-r1.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+JAVA_PKG_IUSE="doc source"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+)'
+
+inherit eutils java-pkg-2 python-any-r1 waf-utils
+
+DESCRIPTION="a constraint solver for relational logic"
+HOMEPAGE="http://alloy.mit.edu/kodkod/index.html"
+SRC_URI="http://alloy.mit.edu/kodkod/${PV}/${P}.zip
+ https://waf.googlecode.com/files/waf-1.7.16"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEP="${PYTHON_DEPS}"
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.6
+ app-arch/unzip"
+
+S="${WORKDIR}/kodkod-1.5"
+
+JAVA_SRC_DIR="src"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+ java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+ unpack "${A% *}"
+ cp "${DISTDIR}/${A#* }" "${S}/waf" || die "Could not copy waf"
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+ chmod u+x waf \
+ || die "Could not set execute permisions on waf file"
+ sed -e 's@private N parent, left, right@protected N parent, left, right@' \
+ -e 's@private boolean color@protected boolean color@' \
+ -i "${S}/src/kodkod/util/ints/IntTree.java" \
+ || die "Could not change private to protected in IntTree.java"
+ sed -e 's@conf.env.LINKFLAGS =@conf.env.LINKFLAGS +=@' \
+ -i "${S}/lib/cryptominisat-2.9.1/wscript" \
+ -i "${S}/lib/lingeling-276/wscript" \
+ || die "Could not fix wscripts to respect LDFLAGS"
+ # Fix bug 453162 - sci-mathematics/kodkod-1.5.2: fails to build
+ epatch "${FILESDIR}/${PN}-1.5.2-changes-in-most-specific-varargs-method-selection.patch"
+
+ # Fix Bug 458462 sci-mathematics/kodkod-1.5.2: fails to build with JAVA_PKG_STRICT
+ local x=""
+ for i in $JAVACFLAGS
+ do
+ if [ "${x}" == "" ]; then
+ x="'${i}'"
+ else
+ x="${x}, '${i}'"
+ fi
+ done
+ for j in $(find . -name wscript -print)
+ do
+ sed -e "s@def configure(conf):@def configure(conf):\n conf.env.JAVACFLAGS = [${x}]@" \
+ -i "${j}" \
+ || die "Could not set JAVACFLAGS in ${j}"
+ done
+}
+
+# note: kodkod waf fails when passed --libdir:
+# waf: error: no such option: --libdir
+src_configure() {
+ ${WAF_BINARY:="${S}/waf"}
+
+ tc-export AR CC CPP CXX RANLIB
+ echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr $@ configure"
+
+ CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${WAF_BINARY}" \
+ "--prefix=${EPREFIX}/usr" \
+ "$@" \
+ configure || die "configure failed"
+}
+
+src_compile() {
+ waf-utils_src_compile
+ if has doc ${JAVA_PKG_IUSE} && use doc; then
+ pushd src/kodkod || die "Could not cd to src/kodkod"
+ local doclint="-Xdoclint:none"
+ local jv="$(javac -version 2>&1 | cut -d' ' -f 2)"
+ if [[ "${jv}" == 1.6* ]] || [[ "${jv}" == 1.7* ]]; then
+ doclint=""
+ fi
+ javadoc ${doclint} -sourcepath "${S}"/src/kodkod:"${S}"/build/src/kodkod \
+ -classpath $(find "${PWD}" -name \*.jar -print | xargs | sed -e 's@ @:@g') \
+ $(find . -name \*.java -print) \
+ || die "javadoc failed"
+ popd
+ fi
+}
+
+src_install() {
+ insinto "/usr/"$(get_libdir)
+ dodir "/usr/"$(get_libdir)"/${PN}"
+ exeinto "/usr/"$(get_libdir)"/${PN}"
+ for i in $(find . \( -name \*.so -o -name plingeling \) -print | xargs); do
+ doexe $i
+ done
+
+ for i in $(find . \( -name kodkod.jar -o -name org.sat4j.core.jar \) -print | xargs); do
+ einfo "java-pkg_dojar $i"
+ java-pkg_dojar $i
+ done
+
+ # javadoc
+ if has doc ${JAVA_PKG_IUSE} && use doc; then
+ java-pkg_dojavadoc src/kodkod
+ fi
+
+ # dosrc
+ if has source ${JAVA_PKG_IUSE} && use source; then
+ local srcdirs=""
+ if [[ ${JAVA_SRC_DIR} ]]; then
+ local parent child
+ for parent in ${JAVA_SRC_DIR}; do
+ for child in ${parent}/*; do
+ srcdirs="${srcdirs} ${child}"
+ done
+ done
+ else
+ # take all directories actually containing any sources
+ srcdirs="$(cut -d/ -f1 ${sources} | sort -u)"
+ fi
+ java-pkg_dosrc ${srcdirs}
+ fi
+}
diff --git a/sci-mathematics/kodkod/kodkod-1.5.2.ebuild b/sci-mathematics/kodkod/kodkod-1.5.2.ebuild
new file mode 100644
index 000000000000..230c75396a8e
--- /dev/null
+++ b/sci-mathematics/kodkod/kodkod-1.5.2.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+)'
+
+inherit eutils java-pkg-2 python-any-r1 waf-utils
+
+DESCRIPTION="a constraint solver for relational logic"
+HOMEPAGE="http://alloy.mit.edu/kodkod/index.html"
+SRC_URI="http://alloy.mit.edu/kodkod/${PV}/${P}.zip
+ https://waf.googlecode.com/files/waf-1.7.16"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEP="${PYTHON_DEPS}"
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.6
+ app-arch/unzip"
+
+S="${WORKDIR}/kodkod-1.5"
+
+JAVA_SRC_DIR="src"
+LIBDIR="/usr/"$(get_libdir)"/${PN}"
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+ java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+ unpack "${A% *}"
+ cp "${DISTDIR}/${A#* }" "${S}/waf" || die "Could not copy waf"
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+ chmod u+x waf \
+ || die "Could not set execute permisions on waf file"
+ sed -e 's@private N parent, left, right@protected N parent, left, right@' \
+ -e 's@private boolean color@protected boolean color@' \
+ -i "${S}/src/kodkod/util/ints/IntTree.java" \
+ || die "Could not change private to protected in IntTree.java"
+ sed -e 's@conf.env.LINKFLAGS =@conf.env.LINKFLAGS +=@' \
+ -i "${S}/lib/cryptominisat-2.9.1/wscript" \
+ -i "${S}/lib/lingeling-276/wscript" \
+ || die "Could not fix wscripts to respect LDFLAGS"
+ # Fix bug 453162 - sci-mathematics/kodkod-1.5.2: fails to build
+ epatch "${FILESDIR}/${PN}-1.5.2-changes-in-most-specific-varargs-method-selection.patch"
+
+ # Fix Bug 458462 sci-mathematics/kodkod-1.5.2: fails to build with JAVA_PKG_STRICT
+ local x=""
+ for i in $JAVACFLAGS
+ do
+ if [ "${x}" == "" ]; then
+ x="'${i}'"
+ else
+ x="${x}, '${i}'"
+ fi
+ done
+ for j in $(find . -name wscript -print)
+ do
+ sed -e "s@def configure(conf):@def configure(conf):\n conf.env.JAVACFLAGS = [${x}]@" \
+ -i "${j}" \
+ || die "Could not set JAVACFLAGS in ${j}"
+ done
+}
+
+# note: kodkod waf fails when passed --libdir:
+# waf: error: no such option: --libdir
+src_configure() {
+ ${WAF_BINARY:="${S}/waf"}
+
+ tc-export AR CC CPP CXX RANLIB
+ echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr $@ configure"
+
+ CCFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" "${WAF_BINARY}" \
+ "--prefix=${EPREFIX}/usr" \
+ "$@" \
+ configure || die "configure failed"
+}
+
+src_compile() {
+ waf-utils_src_compile
+ if has doc ${JAVA_PKG_IUSE} && use doc; then
+ pushd src/kodkod || die "Could not cd to src/kodkod"
+ local doclint="-Xdoclint:none"
+ local jv="$(javac -version 2>&1 | cut -d' ' -f 2)"
+ if [[ "${jv}" == 1.6* ]] || [[ "${jv}" == 1.7* ]]; then
+ doclint=""
+ fi
+ javadoc ${doclint} -sourcepath "${S}"/src/kodkod:"${S}"/build/src/kodkod \
+ -classpath $(find "${PWD}" -name \*.jar -print | xargs | sed -e 's@ @:@g') \
+ $(find . -name \*.java -print) \
+ || die "javadoc failed"
+ popd
+ fi
+}
+
+src_install() {
+ insinto "/usr/"$(get_libdir)
+ dodir ${LIBDIR}
+ exeinto ${LIBDIR}
+ for i in $(find . \( -name \*.so -o -name plingeling \) -print | xargs); do
+ doexe $i
+ done
+
+ for i in $(find . \( -name kodkod.jar -o -name org.sat4j.core.jar \) -print | xargs); do
+ einfo "java-pkg_dojar $i"
+ java-pkg_dojar $i
+ done
+
+ # javadoc
+ if has doc ${JAVA_PKG_IUSE} && use doc; then
+ java-pkg_dojavadoc src/kodkod
+ fi
+
+ # dosrc
+ if has source ${JAVA_PKG_IUSE} && use source; then
+ local srcdirs=""
+ if [[ ${JAVA_SRC_DIR} ]]; then
+ local parent child
+ for parent in ${JAVA_SRC_DIR}; do
+ for child in ${parent}/*; do
+ srcdirs="${srcdirs} ${child}"
+ done
+ done
+ else
+ # take all directories actually containing any sources
+ srcdirs="$(cut -d/ -f1 ${sources} | sort -u)"
+ fi
+ java-pkg_dosrc ${srcdirs}
+ fi
+}
diff --git a/sci-mathematics/kodkod/metadata.xml b/sci-mathematics/kodkod/metadata.xml
new file mode 100644
index 000000000000..a204ce809b84
--- /dev/null
+++ b/sci-mathematics/kodkod/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gienah@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+Kodkod is an efficient SAT-based constraint solver for first order
+logic with relations, transitive closure, bit-vector arithmetic, and
+partial models. It provides analyses for both satisfiable and
+unsatisfiable problems: a finite model finder for the former and a
+minimal unsatisfiable core extractor for the latter. Kodkod is used in
+a wide range of applications, including code checking, test-case
+generation, declarative execution, declarative configuration, and
+lightweight analysis of Alloy, UML, and Isabelle/HOL.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/kodkodi/Manifest b/sci-mathematics/kodkodi/Manifest
new file mode 100644
index 000000000000..d2544d8c0c27
--- /dev/null
+++ b/sci-mathematics/kodkodi/Manifest
@@ -0,0 +1,6 @@
+DIST kodkodi-1.5.2.tgz 2826648 SHA256 1518d75f3748aa7c791623ff1508b4202f14d744e13b9bd41abf575429caa2b7 SHA512 117e0f1b3e3ee88efb9a9e2f02e8a7ce82a3487528ad0476acf20fafd885d3d48c051bd4a8cb6aa5cda61f24dfa74159448b83398be4119e726e757f6ff3aad4 WHIRLPOOL f331b423b2ad430b59f425d799c3991dccf0e5e9018015f12c30be851f8254cf3b0e39da12fcfd07083813671316ecdcbfc70429742e89cf7b2b4093b773bb0b
+EBUILD kodkodi-1.5.2-r1.ebuild 2893 SHA256 2137673566d857beceec8a5257e366f6f7796180235e57b67be97b2f17f07cb8 SHA512 b7a36e799ed2b0a96a28662f5e0e98c56fcdbac4e85e090b83f30f941300c8cf572a6125b6193abf50341f17ad379db397063aa17aec64b4f8135bd8fb06b0a9 WHIRLPOOL 2edf56afcd9adcb58436d39b6b573d8f62a2c3772f6a5f5e5f0d3bad26fb453952e962677bc871603925e1aed2fb93466e1041185a39ad5a9322f220c794e856
+EBUILD kodkodi-1.5.2.ebuild 2895 SHA256 ad68d5dddedcaafdd6fda1742422dd4dba94ea5e4a67e7abff60ddbb7df71bcd SHA512 186712deb7f8723099aa33a9ddcd26d69c0bee4b69fe1da0f407aba110a08cb7019ade2cfcbb9dffd389c3f55022b00a05545dd8a17b6a6da826cafe8aa5f631 WHIRLPOOL d763705b1aec881893459f3e68593e77f172ed3e7946b71932c9d20ec1b79650989d6021987af70d720ac37b457f27135a963a54ee67207878b2fcae8f5b3e87
+MISC ChangeLog 2827 SHA256 732d7958c480db89ceeeaee294e93166c0972d74b5bd7386014d878bdc2ed1bb SHA512 1df49d5eea38e7c009a0e4539e6a0844724a1bd497ab76c0ff235d927701aedf6b59c8808a69872156dc78a04e85a24d45d0040d6334d0af8f9bc2a961aebdb5 WHIRLPOOL 52287c1e5847958cadc46ff69f9f28d0e1189829600d5dd9feca1001bd5e90627c5f05fdf193263315d47d8fcad3948284570172b5aab4c4faaeea855c46472c
+MISC ChangeLog-2015 899 SHA256 12523e70f4fa56993d9ba08f770be9b5c6841b5084f50588d14872b7e887920d SHA512 2f336f10a94b9c1a80ff402ec1022571c39204db1262898e908c289dfddbf1f9c61127646f94a428d722e1ad058590a0bb345193fa93af124ce64bb512979142 WHIRLPOOL 2196d36752d534bb31d0225b5c1daf5adb2a7c3c645102561752212717d58e97e007dc25bd4a413f3f556e3b59e512528fa0809e1230953cb6be36061a2b997b
+MISC metadata.xml 570 SHA256 b2ff8b295df6d32e8d009c380a770f37ca724f727f54e17ec205111fceff3a14 SHA512 e41523244a6503726c4e81500011d26554e709d6eb670005f761fa6fe82c3243b0f5eb2840f83c242cd376763cc467d40049bbb53cef856724f04f9ab2a1c251 WHIRLPOOL 841b537fdbcb8e9a48956f443b2815b40b6a1e4ae1571f6302b365ec4ef415e758dd39a7de0dd205e980808465da131171abeb2e72c87da00c0956c0fe7ae16b
diff --git a/sci-mathematics/kodkodi/kodkodi-1.5.2-r1.ebuild b/sci-mathematics/kodkodi/kodkodi-1.5.2-r1.ebuild
new file mode 100644
index 000000000000..18f9e89ca3e1
--- /dev/null
+++ b/sci-mathematics/kodkodi/kodkodi-1.5.2-r1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-pkg-simple multilib
+
+DESCRIPTION="A text front-end for the Kodkod Java library"
+HOMEPAGE="http://www21.in.tum.de/~blanchet/#software"
+SRC_URI="http://www21.in.tum.de/~blanchet/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="isabelle examples"
+
+COMMON_DEP="dev-java/antlr:3
+ =sci-mathematics/kodkod-1.5*:="
+RDEPEND="${COMMON_DEP}
+ isabelle? (
+ sci-mathematics/isabelle:=
+ )
+ >=virtual/jre-1.6"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.6
+ app-arch/unzip"
+
+S="${WORKDIR}/${P}"
+
+JAVA_GENTOO_CLASSPATH="kodkod,antlr-3"
+
+src_prepare() {
+ default
+ sed -e 's@exec "$ISABELLE_TOOL" java $KODKODI_JAVA_OPT@java@' \
+ -i "${S}/bin/kodkodi" || die "Could not patch bin/kodkodi"
+ rm -f jar/*.jar || die "Could not rm jar files"
+}
+
+src_compile() {
+ JAVA_SRC_DIR="src"
+ TARGETDIR="/usr/share/${P}"
+ KODKOD_LIBDIR="/usr/"$(get_libdir)"/kodkod"
+
+ java-pkg-simple_src_compile
+
+ pushd "${S}/target/classes" > /dev/null || die
+ jar -uf "${S}"/${PN}.jar $(find -name '*.class') || die
+ popd > /dev/null
+}
+
+src_install() {
+ java-pkg-simple_src_install
+ dodoc README HISTORY manual/${PN}.pdf LICENSES/Kodkodi
+ insinto ${TARGETDIR}
+ if use examples; then
+ doins -r examples
+ fi
+
+ if use isabelle; then
+ ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \
+ || die "isabelle getenv ISABELLE_HOME failed"
+ [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
+ dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ cat <<- EOF >> "${S}/settings"
+ KODKODI="\$COMPONENT"
+ KODKODI_VERSION="${PV}"
+ KODKODI_PLATFORM=\$ISABELLE_PLATFORM
+ KODKODI_CLASSPATH="$(java-config --classpath=antlr:3):${ROOT}usr/share/${PN}-${SLOT}/lib/kodkodi.jar:$(java-config --classpath=kodkod)"
+ KODKODI_JAVA_LIBRARY_PATH="${KODKOD_LIBDIR}"
+ EOF
+ insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ doins "${S}/settings"
+ dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/bin"
+ exeinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/bin"
+ doexe bin/kodkodi
+ fi
+}
+
+pkg_postinst() {
+ if use isabelle; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
+ sed -e "/contrib\/${PN}-[0-9.]*/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ cat <<- EOF >> "${ROOT}etc/isabelle/components"
+ contrib/${PN}-${PV}
+ EOF
+ fi
+ fi
+}
+
+pkg_postrm() {
+ if use isabelle; then
+ if [ ! -f "${ROOT}usr/bin/kodkodi" ]; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ # Note: this sed should only match the version of this ebuild
+ # Which is what we want as we do not want to remove the line
+ # of a new kodkodi being installed during an upgrade.
+ sed -e "/contrib\/${PN}-${PV}/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ fi
+ fi
+}
diff --git a/sci-mathematics/kodkodi/kodkodi-1.5.2.ebuild b/sci-mathematics/kodkodi/kodkodi-1.5.2.ebuild
new file mode 100644
index 000000000000..9041007f4db1
--- /dev/null
+++ b/sci-mathematics/kodkodi/kodkodi-1.5.2.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit java-pkg-2 java-pkg-simple multilib
+
+DESCRIPTION="A text front-end for the Kodkod Java library"
+HOMEPAGE="http://www21.in.tum.de/~blanchet/#software"
+SRC_URI="http://www21.in.tum.de/~blanchet/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="isabelle examples"
+
+COMMON_DEP="dev-java/antlr:3
+ =sci-mathematics/kodkod-1.5*:="
+RDEPEND="${COMMON_DEP}
+ isabelle? (
+ >=sci-mathematics/isabelle-2011-r1:=
+ )
+ >=virtual/jre-1.6"
+DEPEND="${COMMON_DEP}
+ >=virtual/jdk-1.6
+ app-arch/unzip"
+
+S="${WORKDIR}/${P}"
+
+JAVA_GENTOO_CLASSPATH="kodkod,antlr-3"
+
+java_prepare() {
+ sed -e 's@exec "$ISABELLE_TOOL" java $KODKODI_JAVA_OPT@java@' \
+ -i "${S}/bin/kodkodi" || die "Could not patch bin/kodkodi"
+ rm -f jar/*.jar || die "Could not rm jar files"
+}
+
+src_compile() {
+ JAVA_SRC_DIR="src"
+ TARGETDIR="/usr/share/${P}"
+ KODKOD_LIBDIR="/usr/"$(get_libdir)"/kodkod"
+
+ java-pkg-simple_src_compile
+
+ pushd "${S}/target/classes" > /dev/null || die
+ jar -uf "${S}"/${PN}.jar $(find -name '*.class') || die
+ popd > /dev/null
+}
+
+src_install() {
+ java-pkg-simple_src_install
+ dodoc README HISTORY manual/${PN}.pdf LICENSES/Kodkodi
+ insinto ${TARGETDIR}
+ if use examples; then
+ doins -r examples
+ fi
+
+ if use isabelle; then
+ ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \
+ || die "isabelle getenv ISABELLE_HOME failed"
+ [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
+ dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ cat <<- EOF >> "${S}/settings"
+ KODKODI="\$COMPONENT"
+ KODKODI_VERSION="${PV}"
+ KODKODI_PLATFORM=\$ISABELLE_PLATFORM
+ KODKODI_CLASSPATH="$(java-config --classpath=antlr:3):${ROOT}usr/share/${PN}-${SLOT}/lib/kodkodi.jar:$(java-config --classpath=kodkod)"
+ KODKODI_JAVA_LIBRARY_PATH="${KODKOD_LIBDIR}"
+ EOF
+ insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ doins "${S}/settings"
+ dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/bin"
+ exeinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/bin"
+ doexe bin/kodkodi
+ fi
+}
+
+pkg_postinst() {
+ if use isabelle; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
+ sed -e "/contrib\/${PN}-[0-9.]*/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ cat <<- EOF >> "${ROOT}etc/isabelle/components"
+ contrib/${PN}-${PV}
+ EOF
+ fi
+ fi
+}
+
+pkg_postrm() {
+ if use isabelle; then
+ if [ ! -f "${ROOT}usr/bin/kodkodi" ]; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ # Note: this sed should only match the version of this ebuild
+ # Which is what we want as we do not want to remove the line
+ # of a new kodkodi being installed during an upgrade.
+ sed -e "/contrib\/${PN}-${PV}/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ fi
+ fi
+}
diff --git a/sci-mathematics/kodkodi/metadata.xml b/sci-mathematics/kodkodi/metadata.xml
new file mode 100644
index 000000000000..28c187d2755b
--- /dev/null
+++ b/sci-mathematics/kodkodi/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>gienah@gentoo.org</email>
+ <name>Mark Wright</name>
+</maintainer>
+<maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+</maintainer>
+<longdescription lang="en">
+A text front-end for the Kodkod Java library.
+</longdescription>
+<use>
+ <flag name="isabelle">Add integration support for the Isabelle/HOL
+ theorem prover.</flag>
+</use>
+</pkgmetadata>
diff --git a/sci-mathematics/lpsolve/Manifest b/sci-mathematics/lpsolve/Manifest
new file mode 100644
index 000000000000..519d6cb727b1
--- /dev/null
+++ b/sci-mathematics/lpsolve/Manifest
@@ -0,0 +1,5 @@
+DIST lpsolve-5.5.2.0.tar.xz 737000 SHA256 09d914b43db327fa32c94914917c0db9e4f128c407f41df1dae18df6d2c7573d SHA512 341bff74dccf805cfd3aa4ee844a51f3c46ce875e88b1bf079a6ff0074f7cbd27420ec9c6a66a2530098a85c967457214543895651f4c570b956324a51bb9fe6 WHIRLPOOL a8c2a26f2401c5a230043c7e285d6f24d69645aae70a4a0d9eaf973f2afc35e084d2fd32a70e274d19df51d09372052f79f05ba0251694fd6e10b4f18167b921
+EBUILD lpsolve-5.5.2.0.ebuild 710 SHA256 dcfbe9a687b760b17b52b9e3426524fe5b38ac01dd53122ceca7794a5f74f492 SHA512 5a53d63b09575e6e66daad37aa1ab7cfe6a87951ea62cebf13576e3b98ca3db1f2376c125df39526425763380e4e4a0097140005056e9ffe53baf85c4c1bfd6e WHIRLPOOL 0032975a3dd73cea35a5f22dada7a2afe0bde925dcbea10eb94673ad0788726b46d85487b44925a0893c0ba367ca464ff462b2aba5303a8c5e6c5173cf9c00f5
+MISC ChangeLog 3236 SHA256 45d519f08636951beba108fd958dbf6807e4d83a597a7b207edd97f444cf259c SHA512 1b8a0e7637e8b629090bfdec3fe4adc03e882175be34ea42068a1bcec6befb6beedcf8bef28c334088d964710852b9610e5e119cfab201dff00a0896094edb64 WHIRLPOOL 144dfd9f0c4b708f7e6ff2bacdd481f2b6d79f956195ac298ad4551b46e60536043b30d37a1360c5949115ee6cbad9db83b01be2a2e63e72784e887e8ee5aa95
+MISC ChangeLog-2015 1240 SHA256 c1098a2b4b9b56a449cd10c69c128252586943b74832dac00a4e89931cb50d68 SHA512 8dfef306b77bb137b3d232eb8574402af64ad8d87f754c85154d445c62d59196c79d996e139d5b34a6f2da2277b9d2dcc661de350a4228f8338f774fa80b688f WHIRLPOOL f94010b2db0ea8956e16ceafe70ced764abaf8cfb53400aaee0c9eabf3e2a0b7b84b07caec514c5efc78c7e38f93ee5f1d962b688331ba9007c2964f2028cec3
+MISC metadata.xml 462 SHA256 5d35d5d66c49a87326a262861ab9778e8ef97fd351f77e74877eea105073eb46 SHA512 817ef33327783389aa73830c2ff2b9b54a140dbcaa9ed61a6d0ad7c2058014fc311c5abeef20cac157fac94d71fe2e8de8f241b3d7a2a2df26817d96cc19dd86 WHIRLPOOL ca63b2c011373bf7ec2963a4fb83905a9577f13ce248758f7e604fb1e60dba90e4d7bb9d182497c2c82b605d9209c194bb43fc195c692d70cd976e36ae3c2139
diff --git a/sci-mathematics/lpsolve/lpsolve-5.5.2.0.ebuild b/sci-mathematics/lpsolve/lpsolve-5.5.2.0.ebuild
new file mode 100644
index 000000000000..dd828ca40d5a
--- /dev/null
+++ b/sci-mathematics/lpsolve/lpsolve-5.5.2.0.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="Mixed Integer Linear Programming (MILP) solver"
+HOMEPAGE="https://sourceforge.net/projects/lpsolve/"
+SRC_URI="http://dev.gentooexperimental.org/~scarabeus/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+DEPEND="sci-libs/colamd"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+}
+
+src_install() {
+ default
+ # required because it does not provide .pc file
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+}
diff --git a/sci-mathematics/lpsolve/metadata.xml b/sci-mathematics/lpsolve/metadata.xml
new file mode 100644
index 000000000000..05746a2d7cce
--- /dev/null
+++ b/sci-mathematics/lpsolve/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>office@gentoo.org</email>
+ <name>Gentoo Office project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">lpsolve</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/lybniz/Manifest b/sci-mathematics/lybniz/Manifest
new file mode 100644
index 000000000000..ee8f1aeee27f
--- /dev/null
+++ b/sci-mathematics/lybniz/Manifest
@@ -0,0 +1,5 @@
+DIST lybniz-1.3.2.tar.gz 70328 SHA256 07cdd1aee3ea0af700f0e7b2364bfc35136356f0a845c784bb117e600be4636b SHA512 e4a8e92b467657b70a5137ea883a101f8335e2da10ce6a3d69b647cb4968be7c617d64fcc1572ea9e5bf49177282dc648844f4bf763cde00c25081118bf1e79e WHIRLPOOL 990a0df5d24d8d6ac2753b33c4f3ba9a781aaaee4c34fa3c7480007dca2140aeb91bad019da41dce3560a743f525c47426b9c7901e20f4f3befcffae6a725f08
+EBUILD lybniz-1.3.2-r1.ebuild 558 SHA256 e2df0ceb1fa45a0b8d9f8eaa2c893bff5552989cd18eb683253dee20b27d7620 SHA512 e12397cc9283c4826b9175ff5d851fa389ccb06afddcee82f19f08c280537bf56c4550c274811ac6397577334a708dff521810f2b675a91a74719d2aa73e9138 WHIRLPOOL 7f3bd2a5ad4adf9bc556d0b976dd67033bb8a5492ff4d98cd3de29319741ac7744904081459220f46566fa2758cae2d63de188272b254f82f0abf8fb608d9452
+MISC ChangeLog 2431 SHA256 77c3fc00a3235e074ffffcdc102790f324da9fca60382c3cd729837339490f73 SHA512 817a59c72caf88c9755c9efc0880d43b6eb1f1608c6847c0e157bccfd8b309d774bf143171293d9565a7faa1fda25e19fba086835bdacb6fdaaa26fc532d88ce WHIRLPOOL 5fdd0f853990733507641eb1e0de0d7f23a784142145eadf2f68ac341c122a05d2379d4cfdb21faed63cdcfc17d3f470e05f5265798bb1f4cff172a962480708
+MISC ChangeLog-2015 690 SHA256 7387b63dccedbb4ea780b810a81f9a44da232ad1a7699ec8eec65d273ba17bb7 SHA512 6abbf6adcaf072f9aee928db1dccc64ec7f6711d3c54933ef03830ab4ad21a4e5b7f0e74ffbe754c38ef99d61bf63f2077e07ad13ad0b8a0df172fbecba106a6 WHIRLPOOL 86fb2ee975704b3849b4ab45bcbf836d492552ef7ee3eb7f3d9f34a30e9ec121dffb35f717fbf288236d6bf8a29435a306ba6cca0efe060f932dd04d55041797
+MISC metadata.xml 483 SHA256 fe455f45ff02b41f944c69c1b1be0b61933c4843686f8cb4ac8fc747fa62228c SHA512 6ca80d3944b1ee257bfb7c49b9b35d8abd91c54dd6fe34fc1b481d57335dc15b20135d803288603a5095a4bc817374e7120fbe02c87b9e71249d18b24106a19f WHIRLPOOL e2743f67ea4ff0a6d096385bb8412f2e1d6fa4aab14955dae2b41ab5fc20c8e00799e63ded324bd6eac0bfe2d5b7081e632661c3326b6c19c4bcf3f331ddc223
diff --git a/sci-mathematics/lybniz/lybniz-1.3.2-r1.ebuild b/sci-mathematics/lybniz/lybniz-1.3.2-r1.ebuild
new file mode 100644
index 000000000000..3993079f7da7
--- /dev/null
+++ b/sci-mathematics/lybniz/lybniz-1.3.2-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="A function plotter program written in PyGTK"
+HOMEPAGE="http://lybniz2.sourceforge.net/"
+SRC_URI="mirror://sourceforge/lybniz2/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/pygtk:2[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i \
+ -e 's/Education;/Education;Math;/' \
+ ${PN}.desktop || die
+
+ distutils-r1_src_prepare
+}
diff --git a/sci-mathematics/lybniz/metadata.xml b/sci-mathematics/lybniz/metadata.xml
new file mode 100644
index 000000000000..d82130d3e06a
--- /dev/null
+++ b/sci-mathematics/lybniz/metadata.xml
@@ -0,0 +1,15 @@
+<?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">
+ Lybniz is an easy to use mathematical function graph plotter using
+ PyGTK.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">lybniz2</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/mathmod/Manifest b/sci-mathematics/mathmod/Manifest
new file mode 100644
index 000000000000..1400bc27edef
--- /dev/null
+++ b/sci-mathematics/mathmod/Manifest
@@ -0,0 +1,4 @@
+DIST mathmod-4.1.src.zip 974709 SHA256 fff57e82fc57b90af98b345f14219c01b1709b019735739b9244173bec626ad4 SHA512 e7a170f5b57384cca4e755a0bb3691ec3fe29e9b22027534f1e84ed656905495c70eea8c69262f31a937ca508c34177d33adc23f5a8a3c91db1eceb2aa283a6d WHIRLPOOL ee68e96744cd210e727111677c4f7b57221f4754cf60218be980b31d482c1e9a24adaed853e098ad4f2a14ce8a8e1523c07121285746d23fc39035de18650fd1
+EBUILD mathmod-4.1-r1.ebuild 1054 SHA256 1219d9c9037b4b5e3a7d6e55d32134ecfd086640d1b65511d831f2117e4ef684 SHA512 4b49f4b769888e93d334f4a6e5fac8b9d4351f78bd2584dccbe6809932d70c56bc66efd3ad8e01b373be25771bf134f47124bbd4026b2a9b008ee18373de9d9c WHIRLPOOL 9100b216d02cd796ec8cd9bf29aaebca3be5129ef552315d0d7689b39a8cc1650b8e8d0c8a80e42b6a7abe9059227096c8aed297552551755903d5c534751521
+MISC ChangeLog 502 SHA256 8966cd8ac194200df42ced136540f0c4cc583bf4138c503e6ec2b5ba4ca74e21 SHA512 6c29be6c3f7333290394d3f2fd7040559bc6b51f08f7ee4c6370a94da11e42f377de25a752964d160f08e87a1421635b4c7403efcd879829ac1802b053db072d WHIRLPOOL 8f8101be2617a8609cde1bb19093c7ea1f95e36df6b0ebf9cfebfe812a99e7fc3a1177de35bf284b8e08027d7d964b9a5d62fd1c5ed8f0e56d39844b38186b22
+MISC metadata.xml 788 SHA256 02c71d9dd807fb2abda67a561dcda291de42623f6081f97f09f342074ae22750 SHA512 86fb2e6a83ab651507e2089996e48961ce48f602b603b10dfd2e62f45d99a4bb6ec2c2d3e05a1928f4c13acf1404ea65fb37046f01ecfe8fdbd13d3e1c34fbd2 WHIRLPOOL 7710e01afe253e8755d677f5c60e830d0f14386aca931b328dad19d0041a55ab3860180b17c638e2aa33cb5cf03208a6dc7b742cd4ec0eb92b9c34e1f0732b4d
diff --git a/sci-mathematics/mathmod/mathmod-4.1-r1.ebuild b/sci-mathematics/mathmod/mathmod-4.1-r1.ebuild
new file mode 100644
index 000000000000..bdfb57706c69
--- /dev/null
+++ b/sci-mathematics/mathmod/mathmod-4.1-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils gnome2-utils qmake-utils fdo-mime
+
+DESCRIPTION="Plot parametric and implicit surfaces"
+HOMEPAGE="https://www.facebook.com/pages/MathMod/529510253833102"
+SRC_URI="mirror://sourceforge/${PN}/${P}.src.zip"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-qt/qtwidgets:5 dev-qt/qtopengl:5"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${PN}-branches-274-trunk
+
+src_configure() {
+ eqmake5 MathMod.pro
+}
+
+src_install() {
+ exeinto /usr/bin
+ doexe MathMod
+ insinto /usr/share/${P}
+ doins mathmodconfig.js mathmodcollection.js advancedmodels.js
+ newicon -s 16 icon/catenoid_mini_16x16.png catenoid.png
+ newicon -s 32 icon/catenoid_mini_32x32.png catenoid.png
+ newicon -s 64 icon/catenoid_mini_64x64.png catenoid.png
+ make_desktop_entry MathMod MathMod catenoid
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/sci-mathematics/mathmod/metadata.xml b/sci-mathematics/mathmod/metadata.xml
new file mode 100644
index 000000000000..1a5c54097fc1
--- /dev/null
+++ b/sci-mathematics/mathmod/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>grozin@gentoo.org</email>
+ <name>Andrey Grozin</name>
+</maintainer>
+<maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+</maintainer>
+<longdescription lang="en">
+ MathMod is a mathematical modeling software that visualize and animate
+ implicit and parametric surfaces.
+ MathMod supports: 3D and 4D plotting and animation, OBJ output file format,
+ Textue and pigmentation support, Noise and Turbulence effects support,
+ Large set of scripted examples.
+</longdescription>
+<upstream>
+ <remote-id type="sourceforge">mathmod</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/mathomatic/Manifest b/sci-mathematics/mathomatic/Manifest
new file mode 100644
index 000000000000..2e2315525e31
--- /dev/null
+++ b/sci-mathematics/mathomatic/Manifest
@@ -0,0 +1,7 @@
+DIST mathomatic-15.8.5.tar.bz2 270607 SHA256 570065e77196dfca5ad85db4cd9704accf3423fa9552d48a0d847eb67fb7ef98 SHA512 9d8b5fcc369d99b890fde06729daa6c86f1a400d5e42d5fd5d74525b9f4a7c28dea5a05882e753b44590e4624ec7399367a637019867ea85fe68e9e0ed3a3e6e WHIRLPOOL 34c94679cd95cab4bc5b595944d5a82d8cc243dd1203349ca0998ed41e0304d898cbc43fee3155391a2870846dd6d58a404b3cfeedeed05428c4b193135cf94c
+DIST mathomatic-16.0.5.tar.gz 381466 SHA256 d93fe35914dbbafa0e67000480268d7ca3e4de773b70f4130a6b3f4fbb20fae2 SHA512 0d98cf7ad707d6536731c98dd253f4cce30243e9eefe9912b8fec3ad4ac4261e324b93b4f0113789ce17fd0b2e3d75f7b258be7905d8e3c7bb4b756627b75950 WHIRLPOOL f88c06048a35cbea5481fa533a519c2ef13c37b5dc5041d1d114fb089367e18f52a71c4e9df656c29dc8630539cee57af373ccb28934c5c4f8886b655ac09292
+EBUILD mathomatic-15.8.5.ebuild 963 SHA256 4397da97b8d8f9b50cfbe0983156753910042fee4c15e3068535fa517f522fb2 SHA512 64bc75e1f6ffefa26de6e1a91e6e9eecfe4865e89aab000fc2471aa05ccafdaee597166f343cf612c35be4c7071b750ab4e8bae08a4b4ea61d2b0c0051042a13 WHIRLPOOL 4ed61df3113ebe7921af9a2567d82a385ce26d6b22190f71e26765909ad743102204821b835fdc667bb24c7dec9c37896cc569ba26e6060e18fb0e4bf7110d94
+EBUILD mathomatic-16.0.5.ebuild 1073 SHA256 d023f57d73b8daf4fa9ab03044f778536558be009288ecda15ff7df5c0167e1c SHA512 46ef23162020da08fd21f7fb675177def8051a642d7b1fba4593ec2cdd76a08a45f44b779c5ff65978578092ecde1494c04986b1a6a8fcf6fe291c70097995a5 WHIRLPOOL 78943753f819feccdcf9770e7ae5114566f5ee8be410f2493b45f664d56e761d1d411337f6f4dc282c530a58d6b50f93031e38902091733cc5f5c343386e3f03
+MISC ChangeLog 2567 SHA256 1c18b444aa0fa2275eaafd87301ee3edb07f7ae2f7390084a8131d9e69cc4aa2 SHA512 ae53d837a583c07cd7dab82c13427421f2ec5b3e92ee17c2b2093e67a769afaf89fdee56929323cad7460d9cbe47065f863fc3b824b0db31d4fc2c17575c776b WHIRLPOOL c9a08ef0536bd21f31d648d628639e6824ecd47bc5b78837eacfcff66b5672a3d64fadbd7367656c3df142ad5bc2473d11c73a937caba878fa4fcca0fcf85001
+MISC ChangeLog-2015 12190 SHA256 e580bc6d9a9be09f271392005d588793c595106e8b5087414ced7c5f8393594c SHA512 fabb4df04fc298cca9451970bb407436b4b6cb4887ac2e5da89b3533e64d5806e03efb8a34c14224615766771ec9958d50fcabc326511833ededdc05034051d1 WHIRLPOOL ea6e15433a9b23f89a945eb567bc28f791b577b94c2dca4a4576bebd4032af4b7f147100bd62e2c58969412eb6f50f35d53f9216ad2495f28a3e80d38625c891
+MISC metadata.xml 619 SHA256 116b08f211f27344beb04e93bba394c060942fa20a8ebd91476d522961432f2b SHA512 8d5d1fd1e392f8eb3d7cf4551cbb5f2501c4885ae487c8a59555bb625d809d9c1e9ad4a131003d1af56be7d30258f24138a7554fa9848afc4cd58f89535ca7f0 WHIRLPOOL e14f98be69bbf973a407a1466e4910a02d91b3dc705ae13b992b4e16b2a96626be8f5390fc2fde347a61f9245ce470ac1794ae314f93db82e004a24768ee6096
diff --git a/sci-mathematics/mathomatic/mathomatic-15.8.5.ebuild b/sci-mathematics/mathomatic/mathomatic-15.8.5.ebuild
new file mode 100644
index 000000000000..eab05cc8391f
--- /dev/null
+++ b/sci-mathematics/mathomatic/mathomatic-15.8.5.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="Automatic algebraic manipulator"
+HOMEPAGE="http://www.mathomatic.org/"
+SRC_URI="${HOMEPAGE}/archive/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="doc gnuplot"
+
+DEPEND="sys-libs/readline
+ sys-libs/ncurses"
+RDEPEND="${DEPEND}
+ gnuplot? ( sci-visualization/gnuplot )"
+
+src_compile() {
+ append-cflags -DBOLD_COLOR=1
+ emake READLINE=1 CC=$(tc-getCC)
+ emake CC=$(tc-getCC) -C primes
+}
+
+src_test() {
+ default
+ emake -C primes check
+}
+
+src_install() {
+ emake prefix="${EPREFIX}usr" DESTDIR="${D}" bininstall
+ emake prefix="${EPREFIX}usr" DESTDIR="${D}" -C primes install
+ dodoc changes.txt README.txt AUTHORS
+ newdoc primes/README.txt README-primes.txt
+ use doc && emake \
+ prefix="${EPREFIX}usr" \
+ mathdocdir="${EPREFIX}usr/share/doc/${PF}" \
+ DESTDIR="${D}" docinstall
+}
diff --git a/sci-mathematics/mathomatic/mathomatic-16.0.5.ebuild b/sci-mathematics/mathomatic/mathomatic-16.0.5.ebuild
new file mode 100644
index 000000000000..f1a450a5ad0a
--- /dev/null
+++ b/sci-mathematics/mathomatic/mathomatic-16.0.5.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit toolchain-funcs flag-o-matic
+
+DESCRIPTION="Automatic algebraic manipulator"
+HOMEPAGE="https://github.com/mfillpot/mathomatic"
+SRC_URI="https://github.com/mfillpot/mathomatic/archive/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc gnuplot"
+
+DEPEND="sys-libs/readline:=
+ sys-libs/ncurses:="
+RDEPEND="${DEPEND}
+ gnuplot? ( sci-visualization/gnuplot )"
+
+S="${WORKDIR}/${PN}-${P}"
+
+src_compile() {
+ append-cflags -DBOLD_COLOR=1
+ emake READLINE=1 CC=$(tc-getCC)
+ emake CC=$(tc-getCC) -C primes
+}
+
+src_test() {
+ default
+ emake -C primes check
+}
+
+src_install() {
+ emake prefix="${EPREFIX}/usr" DESTDIR="${D}" bininstall m4install
+ emake prefix="${EPREFIX}/usr" DESTDIR="${D}" -C primes install
+ dodoc changes.txt README.txt AUTHORS
+ newdoc primes/README.txt README-primes.txt
+ use doc && emake \
+ prefix="${EPREFIX}/usr" \
+ mathdocdir="${EPREFIX}/usr/share/doc/${PF}" \
+ DESTDIR="${D}" docinstall
+}
diff --git a/sci-mathematics/mathomatic/metadata.xml b/sci-mathematics/mathomatic/metadata.xml
new file mode 100644
index 000000000000..acb132be06ce
--- /dev/null
+++ b/sci-mathematics/mathomatic/metadata.xml
@@ -0,0 +1,17 @@
+<?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>
+ Mathomatic is a small, portable symbolic math program that can
+ automatically solve, simplify, differentiate, combine, and compare
+ algebraic equations, perform polynomial and complex arithmetic,
+ etc.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">mfillpot/mathomatic</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/maxima/Manifest b/sci-mathematics/maxima/Manifest
new file mode 100644
index 000000000000..2d8c4285a42d
--- /dev/null
+++ b/sci-mathematics/maxima/Manifest
@@ -0,0 +1,25 @@
+AUX 50maxima-gentoo-1.el 538 SHA256 60bc64eaeedfe1bbd3dcf40bb0cb02ba5a097ba97a7222b327f48fe6771a82d3 SHA512 e1325f0d401b80f302c3e6b5d6c0fe8f58a53336f670f73450ff7876ca1c25b8bacbaff49ce05ec1dec1dda08062986ba4b9988927fce835dfca9f24460a0ddd WHIRLPOOL 9e5f058cf0560a5fd5813cb7488b3cb27d25c07f49ae32ec62b2bbdcab02882fe070702819f40747bf031edef134285182ecd693051884b987c0744c389b4ace
+AUX clisp-1.patch 1194 SHA256 2e2e37da1901c6dad0851cc82a081906cfb678f01eccba8d91eefa7b4fb1871b SHA512 05febcd92f6e9d667a8bc8c5c2bf7f02a1585cf5cff8add669716b6fc014ca603ee5bd72e2824db2b8d20cf3f7c9e5cc981c7bce7091c8f5f7ec002a20de40d3 WHIRLPOOL 68891d4ec98e33675eaba8412d5493fa4ad26f41fcad82d1bfdb1096811db15ce629ffbcefa75b479985dcffb2c02a5b511cb82719beafbd53f8d2ff9ad9f4e6
+AUX clozurecl-2.patch 1505 SHA256 5fb15195d8864a32a9f5c271a1ddedfaa331589898674901ea91d8709e49394d SHA512 41664b77eae0f2c3cc0e551bd2c26c02769faed339b5725dc790691929094cd5d5008169eba9788515392d9fed00919aaacbb24ee91b76f5d51eb6468335cf9c WHIRLPOOL 5dc9a53536e354292a4a18e479053f9fd52f7fb086aa363a152164740aa29cb623581eb72ab62c25d13ba42a76790d43b16f563e51f04052f26031131a182a71
+AUX cmucl-1.patch 1336 SHA256 178218d3ead339d721c7b8f819cb34170e025ebfb00b6d2f927347a26bed6924 SHA512 3b8c01ecbbcd87101e4e31356293216d9c2a018ddabc076905a8b87eeda27bea6cd36242ab6b9caf7553fb9187544beb620b739211c63e21afa1b2f050ef318e WHIRLPOOL ad923ce5460aaada4622d7401fdc81cee8028c010abe8f57ceb79ca9d8857eb91f40a3a570cdcc76cd64cfb6b2f9532db2ad9d0950596579a811e5d8eb06214c
+AUX db-0.patch 529 SHA256 470f7b590f390afd31bd6deb8f7fa51af89651ad360e06f3511a6433522ce169 SHA512 c3a196c2192be23c7551c1b4dd893c8304926318234ef06cf438c24f425f7fc93d8ebed4a9b4708852bb2e8ca7284afa03dfe53548cec8ebd6ba89e73a901cfa WHIRLPOOL 8c9d2c5e96231e09272467fe134a6775f0e4cc8d939735168ebc468f9778d2d0d620ec2fc3c1358ed3aafb5bb6346a72cc96e51934e3325d181e4a7341b9db57
+AUX ecls-2.patch 1612 SHA256 719b07457b3eccdfe2694b3d92f2c882f1ecb14e0ab1544d9a8243fb231cdfcd SHA512 cd37e62c24f24e49f264d63526615537cb088386cfc48f3eac8fcc746d16f6d79c585dee6f24c664fca355f539728a1a23cc75f3672c240a210a407e87b73141 WHIRLPOOL 14ef102a7f90ec87ebca7b1cf2983a0e63244128bd96da6b7cfaffa6216f327833ce5c40c27fc11e611e44bce88ca66b1b0ec4fe3bec914a8b37b702d19d511d
+AUX emacs-0.patch 807 SHA256 b261df805300f45c3ad881e28e1205dd0ba0b4482a82f32292701b75b2b2eb25 SHA512 f62d364651838ed196a2e8965930b42313cb73f912b898b953b526ffc5dc0135841b53618fbbb6a32d21d3412ba5f2bfb253bf41c640a136f68d830f43628ac4 WHIRLPOOL 18b5b087f73d204896857a1e44e4b076b90af48c0ccd64ae8aa00acfacaaed167bf3d779caaf35843827002c24443bc4d4283b77664c9923984ba4afe69bef63
+AUX rmaxima-0.patch 552 SHA256 73cc45185ee9de683686348e11ed4135a498a1a65cc61b80cf1407c6ec49b133 SHA512 a60c8c5ac23b0342823fbcd15e27f44ea85652640271ea845e383796422fa416b221dd036eb0a1639f70f9b09473471657612c7a5f99892cfb214d52156a6907 WHIRLPOOL a328f28ecf817b77f621d46652df8450e47855614e51f0760be0ac0d9d7e5886956d3ce108e2acdae88b81c2dc8f3cadafe3693529c452d076937b70a9a6256f
+AUX sbcl-1.patch 1412 SHA256 0792033f74af272732c97a16b7b000dfe920ab9a6f28d6c6a47b64c6eafbb313 SHA512 a75d05de3e80e255b36180469a6c51a200b287e8c11aaeb09916a6c8e7b6a16abf41d78a66a51325ca5ca4129c12121ceedd1ae87a89f5adc0666b2094cf2f14 WHIRLPOOL 22bbac501826fa80a73e3f13563600b5731aa11295da6cded2f43afecda7a742f68514cddc1dbb61944b861ae691a166709284e177ad40dac9219cec1dbf1db0
+AUX sbcl-2.patch 1072 SHA256 27346467918b4382d35ff2fc7bf64de647b73b391ea443b7c8fdb08dcf9b009c SHA512 b8df0b53f4ae04e175dfab8889206ea8ffa83c51b2408322423d5f52cf956b1084e7d1ba0c054032f9121cb1684fcc6bb9d48b1a967f9e01492ad25c035b1c62 WHIRLPOOL 7ca8053d74b0a867fc1e3990986f48dcdc611bee64f93b24386b9c18be97706d4d20e46d6917ef1d056b0be2130d200fdbc4757cec2b7c3a4a552cec9c7a2f6b
+AUX wish-2.patch 662 SHA256 d78edf60b416ace294cfe8dc63ef01f9427fc56e39d48445aa874d48ce13b2c5 SHA512 110db85899241e1f9ea8427ffb397737aefe0bb6286d037c2c04cfad9726838521ef6403242aeb1e4246d06f13cf83af84bba38567a99b00ed6a081f17b38ead WHIRLPOOL 70a5823c74653853c18858f182b724c0a75e0b947f6ce8c8dca388535844a6d0698f1d21c73f8add695db1ad0b04cb905446ed8f827ed8894382c96520a02799
+AUX xdg-utils-0.patch 1090 SHA256 99c600c4c7e813305da375a4afa4a5e7ea6aa4ec9f1ecc051b9c913281af53ea SHA512 31b121a2d6f1c24e5f2fa3e6129f661a891660665bf45a2907146e3bae9309d185f83d7001287df92a73aff81562a7011ad6b92e03516883bc0ae0730570fa38 WHIRLPOOL 1aee0e9b00d7991b6d07b954927b152f1a5effddf3dca79b11ba47203f8be8b2d8432feb394295d77fc7669e9c3c8f9e0dd8d4fefc9657270d20e033f5fb49d7
+DIST maxima-5.37.3.tar.gz 29964644 SHA256 8bd5dcd672f37ea752385475fc64f8c87dfa29bbe34766cbcb87b1f63dfb5934 SHA512 a337afdc779abc88297e7dadf8af949da881c91a237e85ed654046c98692f2446c0b2ddb8c81b637cb7a35dd3b712832aadc5dedcaa8b681496dae4835c9d0f1 WHIRLPOOL d24eeb7f39f88b9f542e28db28b8f249b1badc059fe744a83209b102b8f776131e4b2f91c28949f4f6de8323f163cb0a6be9bafc3c0ef058a73e9b543622e976
+DIST maxima-5.38.1.tar.gz 38641257 SHA256 0e866536ab5847ec045ba013570f80f36206ca6ce07a5d13987010bcb321c6dc SHA512 abca10984dbb22a48bae481b2e803cb5bee6776e974b4bb9271773aa035fb5e49f34b2458aabca01f0a681a07179e57c012273be6f8d53c615b3309b1034abf9 WHIRLPOOL 443ab032e784e4e2c37274dc3b1635acd9ede08af7863793f93b2f8fdc10e9cce8d4b1a5e98df9a6486fe97e082fb4030fbb3208939ab627f7ca333de7c224b8
+DIST maxima-5.39.0.tar.gz 38652090 SHA256 f58ff98013fcaa37d8661b941672c38db58f982f082d6cfcca1f1b5fac7d71b3 SHA512 393ade47fc3832ee44df7bf0c3bd2e501755167ec0f02d50d5876e7cf54fe682f2ebf2511290fa498d174e55961451e61ea5c1c5f6e5f9e6d04ad73d45a5d2a9 WHIRLPOOL 35c7e4acf7933c11562ade2ce30b9c3865a052fc13f9880502165313aae66925aff44cc9d70666001d0378ef14b2e0bf6bc2faeb258b6d50e558b9e043cd972c
+DIST maxima-5.40.0.tar.gz 41668208 SHA256 74fe468cd372714622a99afb6b34297589ddd80386e125d71067d3e75519f796 SHA512 7aa36ae56c289e1cc6bb1722a6ee93fed5bf893747a26bb52a48f93cd02d65b63c453f37dc2c86ab4596ad192150aed9ad6b361ab295eda5207d9633c07cdee6 WHIRLPOOL 0e66c5492728a1d21ef7b72fd227943200725c5dad812d81e111f609f381a94a66432c7ff13608e18fc5f2616f8992b46769b421b6942d10fb796d3992d46c8a
+DIST maxima-5.41.0.tar.gz 41540226 SHA256 daf8254600f4c7d9f079a0084178aaf036bd97a63b1e77b945f4120d7e401674 SHA512 1b93ae2db055ba7fb4a95924a896667f0cfa1c675c603c104181662aeb32b10b006158526b2f3ad93a59688a23eacdc82e870bb8ffb182a89e1e51de013ec209 WHIRLPOOL 3b3ebd648be9c51280e80312ef4666eb1e190391f196fd4f4a49326be1abd46f1bbffe2d6184d0e4d477a18f0409eb259104f1a030218bc190185873cee3e3a1
+EBUILD maxima-5.37.3-r4.ebuild 4828 SHA256 724431de44b4b65c638d14fc4560eec20cf45bd6f0758420b796f9b4219ed229 SHA512 633d63be6891ada0e394415e236355c3a5141472df821f37b92e23e3c7b01f1b18e3fba39d60e94b7289d6c0eeae5f1521fa617bb5a3669ccc0905b486f91ecf WHIRLPOOL 20a6c2544cbda7c91f34abed6908dcbab2b361988dbf0156658089ea1d3129117cbe4c64ef8168b65f16ef12e793bd2b6306b4a126d9eaebd11a81fc45b6d0a8
+EBUILD maxima-5.38.1.ebuild 4821 SHA256 defa887bde90ba135ca84645ba8f03f862b3cbb1a8ccd760c3c3fe1efe565b4d SHA512 3003b55bf303482d51462ab9b5332a6cb5e170b9780836666f9af5bd5d0838cca2fe57f26f5c955a5414594184bfd3c90064ee638f086074a40b66a7cf02cc22 WHIRLPOOL 9e31003a78daf7714b3d0dbf3c7ae2a97870af5418376923c7b79983a0408c724354614147c0bf8842c63963f827c12b04e6a77a26627101daf932a9c2f45732
+EBUILD maxima-5.39.0.ebuild 4824 SHA256 af8bbe6eea4ba1ba70ac749ea053e79ac90d5a4b3c3f3f27c3ee68582671a1de SHA512 c7926f33b56a0d18bf958513282ba8876427acac63d27f374b2eda914e733ea693357a01d7bfa90beb6f15d8f849e60c20a81d3436f9942aa510bbb591a5b999 WHIRLPOOL f3034eafe58361d7146b2c110e472c164dd9b94dfd9f5872d9d976ea68fa6540ba3ba145fe6db521bca9edf06a307857a64f90ec4f1fa140f113624c770d2bdb
+EBUILD maxima-5.40.0.ebuild 4824 SHA256 63b572b143b04a22f0de241639fca864cffc2fc16334d2aafa46f7d119537c9c SHA512 cb5bd1095eeeab1a6a08da4f3dd7aaf6ffc7721efb6f8dda327b238a5e879c4f3fca898dd85e363a809cb90747b0f3a85dfcbe2de4311a371b4efd81f7e82335 WHIRLPOOL cbcc129709946395aa722d4411c051718d861abb5faf398fb2fcbd59a502b79652d75c0606c5ee5d60da6870a3c3d93da82374786c4241aa601cb3f106b54bf2
+EBUILD maxima-5.41.0.ebuild 4824 SHA256 63b572b143b04a22f0de241639fca864cffc2fc16334d2aafa46f7d119537c9c SHA512 cb5bd1095eeeab1a6a08da4f3dd7aaf6ffc7721efb6f8dda327b238a5e879c4f3fca898dd85e363a809cb90747b0f3a85dfcbe2de4311a371b4efd81f7e82335 WHIRLPOOL cbcc129709946395aa722d4411c051718d861abb5faf398fb2fcbd59a502b79652d75c0606c5ee5d60da6870a3c3d93da82374786c4241aa601cb3f106b54bf2
+MISC ChangeLog 8801 SHA256 f6a3e5d32576f97dae75966eec54d24c28fcac0012d67433a440f7716f258a2b SHA512 4bcbd12c3023ca1f736ed09127479d3065c49f48c47114bb71e18155aef5fff2ad949146d121c82f16859c577804f8e39202af969467bfc60f6d0a930f70c866 WHIRLPOOL 16aba06e3ac3c093994c7d735391478146877d8ecc14c5e832430b024ab26e72dc2e8472b0c3868157cd60223e60fde964fa870d1908c879d6e14106fe685450
+MISC ChangeLog-2015 26867 SHA256 928928dc8eb994e97729bc32db4f8c018edc7fa47f865b9ff7c5f306c859afa4 SHA512 b193def6b27345190771f51ff3e96f5b6fe36eca890ee5825effccd7d9ed01eb009f71663f8745862eb48b1a63eb324c433c55e7dafc8e8c1711397255b2b970 WHIRLPOOL 66906b06d9b1a21acda62ae8910298718ff82bf40998a8b96d23759cc1b452c9284b37039c79d631bb9a504f06aa393cd0a9add86604b69ffc15e8aaf5767a2e
+MISC metadata.xml 1521 SHA256 0cf04cc8344e9e348fa29e7870be8ccd313212cc0ce4b956a7e10c5018f2932a SHA512 d2db86fcab10cabb9533954838babc9cee4ebb26b99604ebe0cb995b1239ac2a462455cc72d6311dab142290fbf460eaec920138c09045003b46dd382ed8cbf3 WHIRLPOOL 02bfdec70b8d568d342ee04e870687608a17efc5be955a360b879c40d4b8d9d6313117f155b36be13fe5e54fec4ea85568ef06115eb48a844c0c584693d7fff4
diff --git a/sci-mathematics/maxima/files/50maxima-gentoo-1.el b/sci-mathematics/maxima/files/50maxima-gentoo-1.el
new file mode 100644
index 000000000000..be14dbfc7d2f
--- /dev/null
+++ b/sci-mathematics/maxima/files/50maxima-gentoo-1.el
@@ -0,0 +1,13 @@
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'maxima-mode "maxima" "Maxima mode" t)
+(autoload 'maxima "maxima" "Maxima interactive" t)
+(autoload 'dbl "dbl" "Make a debugger to run lisp, maxima and or gdb in" t)
+(add-to-list 'auto-mode-alist '("\\.ma?[cx]\\'" . maxima-mode))
+
+;; emaxima mode
+(autoload 'emaxima-mode "emaxima" "EMaxima" t)
+(add-hook 'emaxima-mode-hook 'emaxima-mark-file-as-emaxima)
+
+;; imaxima
+(autoload 'imaxima "imaxima" "Image support for Maxima." t)
+(autoload 'imath-mode "imath" "Interactive Math minor mode." t)
diff --git a/sci-mathematics/maxima/files/clisp-1.patch b/sci-mathematics/maxima/files/clisp-1.patch
new file mode 100644
index 000000000000..9dc8dfd7d51e
--- /dev/null
+++ b/sci-mathematics/maxima/files/clisp-1.patch
@@ -0,0 +1,19 @@
+diff -r -U1 maxima-5.37.1.orig/src/maxima.in maxima-5.37.1/src/maxima.in
+--- maxima-5.37.1.orig/src/maxima.in 2015-05-22 04:40:03.000000000 +0600
++++ maxima-5.37.1/src/maxima.in 2015-09-03 16:08:22.467930422 +0600
+@@ -135,5 +135,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -q "" -- "$@"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -q -norc "" -- "$@"
+ else
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$@"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$@"
+ fi
+@@ -141,5 +141,5 @@
+ if [ -x "$maxima_image_base" ]; then
+- exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -q "" -- "$@"
++ exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -q -norc "" -- "$@"
+ else
+- exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$@"
++ exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$@"
+ fi
diff --git a/sci-mathematics/maxima/files/clozurecl-2.patch b/sci-mathematics/maxima/files/clozurecl-2.patch
new file mode 100644
index 000000000000..5c5189c7e051
--- /dev/null
+++ b/sci-mathematics/maxima/files/clozurecl-2.patch
@@ -0,0 +1,27 @@
+diff -r -U1 maxima-5.37.1.orig/configure.ac maxima-5.37.1/configure.ac
+--- maxima-5.37.1.orig/configure.ac 2015-09-01 02:28:02.000000000 +0600
++++ maxima-5.37.1/configure.ac 2015-09-03 18:11:54.335618720 +0600
+@@ -386,3 +386,3 @@
+ dnl n.b. openmcl_default_name is hardcoded in "with" message
+-openmcl_default_name=openmcl
++openmcl_default_name=ccl
+ AC_ARG_ENABLE(openmcl,
+diff -r -U1 maxima-5.37.1.orig/src/Makefile.am maxima-5.37.1/src/Makefile.am
+--- maxima-5.37.1.orig/src/Makefile.am 2015-08-11 02:44:21.000000000 +0600
++++ maxima-5.37.1/src/Makefile.am 2015-09-03 17:26:12.849734012 +0600
+@@ -338,3 +338,3 @@
+
+-EXECUTEOPENMCL = $(OPENMCL_NAME) -e
++EXECUTEOPENMCL = $(OPENMCL_NAME) --no-init -e
+ BUILT_FILES += $(OPENMCL_MAXIMA)
+diff -r -U1 maxima-5.37.1.orig/src/maxima.in maxima-5.37.1/src/maxima.in
+--- maxima-5.37.1.orig/src/maxima.in 2015-05-22 04:40:03.000000000 +0600
++++ maxima-5.37.1/src/maxima.in 2015-09-03 17:22:31.841743306 +0600
+@@ -182,5 +182,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -e '(cl-user::run)' -- "$@"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS --no-init -e '(cl-user::run)' -- "$@"
+ else
+- exec "@OPENMCL_NAME@" -I "$maxima_image_base.image" $MAXIMA_LISP_OPTIONS -e '(cl-user::run)' -- "$@"
++ exec "@OPENMCL_NAME@" -I "$maxima_image_base.image" $MAXIMA_LISP_OPTIONS --no-init -e '(cl-user::run)' -- "$@"
+ fi
diff --git a/sci-mathematics/maxima/files/cmucl-1.patch b/sci-mathematics/maxima/files/cmucl-1.patch
new file mode 100644
index 000000000000..c87a6c922b38
--- /dev/null
+++ b/sci-mathematics/maxima/files/cmucl-1.patch
@@ -0,0 +1,19 @@
+diff -r -U1 maxima-5.37.1.orig/src/maxima.in maxima-5.37.1/src/maxima.in
+--- maxima-5.37.1.orig/src/maxima.in 2015-05-22 04:40:03.000000000 +0600
++++ maxima-5.37.1/src/maxima.in 2015-09-03 16:29:30.751877085 +0600
+@@ -152,5 +152,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -- "$@"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -- "$@"
+ else
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$@"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$@"
+ fi
+@@ -158,5 +158,5 @@
+ if [ -x "$maxima_image_base" ]; then
+- exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -quiet -- "$@"
++ exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -- "$@"
+ else
+- exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$@"
++ exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$@"
+ fi
diff --git a/sci-mathematics/maxima/files/db-0.patch b/sci-mathematics/maxima/files/db-0.patch
new file mode 100644
index 000000000000..d6cc18617cc5
--- /dev/null
+++ b/sci-mathematics/maxima/files/db-0.patch
@@ -0,0 +1,20 @@
+diff -r -U2 maxima-5.37.1.orig/src/db.lisp maxima-5.37.1/src/db.lisp
+--- maxima-5.37.1.orig/src/db.lisp 2015-08-11 01:01:13.000000000 +0600
++++ maxima-5.37.1/src/db.lisp 2015-09-04 00:21:43.596685564 +0600
+@@ -389,10 +389,14 @@
+
+ (defmfun isp (pat)
+- (let ((isp 'unknown))
++ (let ((isp 'unknown) #+ccl (err t))
+ (ignore-errors
+ (setq isp
+ (cond ((truep pat))
+ ((falsep pat) nil)
+- (t 'unknown))))
++ (t 'unknown)))
++ (setq err nil))
++ #+ccl
++ (when err
++ (setq +labs nil))
+ isp))
+
diff --git a/sci-mathematics/maxima/files/ecls-2.patch b/sci-mathematics/maxima/files/ecls-2.patch
new file mode 100644
index 000000000000..d9af8c373caf
--- /dev/null
+++ b/sci-mathematics/maxima/files/ecls-2.patch
@@ -0,0 +1,35 @@
+diff -r -U1 maxima-5.37.1.orig/src/maxima.in maxima-5.37.1/src/maxima.in
+--- maxima-5.37.1.orig/src/maxima.in 2015-05-22 04:40:03.000000000 +0600
++++ maxima-5.37.1/src/maxima.in 2015-09-03 16:33:30.913866985 +0600
+@@ -188,3 +188,3 @@
+ elif [ "$MAXIMA_LISP" = "ecl" ]; then
+- exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -- "$@"
++ exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -norc -- "$@"
+
+diff -r -U1 maxima-5.37.1.orig/src/maxima.system maxima-5.37.1/src/maxima.system
+--- maxima-5.37.1.orig/src/maxima.system 2015-09-01 02:26:13.000000000 +0600
++++ maxima-5.37.1/src/maxima.system 2015-09-03 16:42:47.071843596 +0600
+@@ -61,2 +61,10 @@
+ #+ecl
++(defun split-ld-flags-for-ecl (string &aux space)
++ (setf string (string-trim '(#\Space) string))
++ (if (setf space (position #\Space string))
++ (cons (subseq string 0 space)
++ (split-ld-flags-for-ecl (subseq string (1+ space))))
++ (cons string nil)))
++
++#+ecl
+ (defun build-maxima-lib ()
+@@ -77,2 +85,7 @@
+ files)))
++ (c::build-fasl "binary-ecl/maxima" :lisp-files obj
++ :ld-flags
++ (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
++ (find-package "MAXIMA")))))
++ (if (and x (not (string= x ""))) (split-ld-flags-for-ecl x))))
+ (c::build-program "binary-ecl/maxima" :lisp-files obj
+@@ -81,3 +94,3 @@
+ (find-package "MAXIMA")))))
+- (if (and x (not (string= x ""))) (list x)))
++ (if (and x (not (string= x ""))) (split-ld-flags-for-ecl x)))
+ :epilogue-code '(progn (require :defsystem)
diff --git a/sci-mathematics/maxima/files/emacs-0.patch b/sci-mathematics/maxima/files/emacs-0.patch
new file mode 100644
index 000000000000..8c84149e256b
--- /dev/null
+++ b/sci-mathematics/maxima/files/emacs-0.patch
@@ -0,0 +1,32 @@
+--- maxima-5.37.3.orig/configure.ac
++++ maxima-5.37.3/configure.ac
+@@ -513,6 +513,17 @@
+ fi
+ fi
+
++AC_ARG_ENABLE(emacs,
++ [ --enable-emacs Emacs support],
++ [case "${enableval}" in
++ yes) enable_emacs=true ;;
++ no) enable_emacs=false ;;
++ *) AC_MSG_ERROR(bad value ${enableval} for --enable-emacs) ;;
++ esac],
++ [enable_emacs=true])
++
++AM_CONDITIONAL(WANT_EMACS, test x$enable_emacs = xtrue)
++
+ dnl xgettext
+ AC_ARG_ENABLE(gettext,
+ [ --enable-gettext Locale support],
+--- maxima-5.37.3.orig/interfaces/Makefile.am
++++ maxima-5.37.3/interfaces/Makefile.am
+@@ -1,5 +1,8 @@
++if WANT_EMACS
++ MAYBE_EMACS = emacs
++endif
+ if WANT_TK
+ MAYBE_XMAXIMA = xmaxima
+ endif
+-SUBDIRS = emacs $(MAYBE_XMAXIMA)
++SUBDIRS = $(MAYBE_EMACS) $(MAYBE_XMAXIMA)
+ EXTRA_DIST = bin/xmaxima.iss
diff --git a/sci-mathematics/maxima/files/rmaxima-0.patch b/sci-mathematics/maxima/files/rmaxima-0.patch
new file mode 100644
index 000000000000..712cbda19d45
--- /dev/null
+++ b/sci-mathematics/maxima/files/rmaxima-0.patch
@@ -0,0 +1,25 @@
+diff -r -U2 maxima-5.28.0.orig/src/Makefile.am maxima-5.28.0/src/Makefile.am
+--- maxima-5.28.0.orig/src/Makefile.am 2012-06-15 12:21:34.000000000 +0700
++++ maxima-5.28.0/src/Makefile.am 2012-10-30 22:22:29.000000000 +0700
+@@ -4,5 +4,21 @@
+ bin_SCRIPTS = maxima maxima-command.ico maxima.bat set_lang.vbs
+ else
++if SBCL
+ bin_SCRIPTS = maxima rmaxima
++else
++if CMUCL
++bin_SCRIPTS = maxima rmaxima
++else
++if ECL
++bin_SCRIPTS = maxima rmaxima
++else
++if OPENMCL
++bin_SCRIPTS = maxima rmaxima
++else
++bin_SCRIPTS = maxima
++endif
++endif
++endif
++endif
+ endif
+
diff --git a/sci-mathematics/maxima/files/sbcl-1.patch b/sci-mathematics/maxima/files/sbcl-1.patch
new file mode 100644
index 000000000000..8899f0973708
--- /dev/null
+++ b/sci-mathematics/maxima/files/sbcl-1.patch
@@ -0,0 +1,18 @@
+diff -r -U1 maxima-5.37.1.orig/src/maxima.in maxima-5.37.1/src/maxima.in
+--- maxima-5.37.1.orig/src/maxima.in 2015-05-22 04:40:03.000000000 +0600
++++ maxima-5.37.1/src/maxima.in 2015-09-03 16:22:57.340893630 +0600
+@@ -193,5 +193,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$@"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$@"
+ else
+- exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$@"
++ exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$@"
+ fi
+diff -r -U1 maxima-5.37.1.orig/src/server.lisp maxima-5.37.1/src/server.lisp
+--- maxima-5.37.1.orig/src/server.lisp 2015-04-10 01:41:59.000000000 +0600
++++ maxima-5.37.1/src/server.lisp 2015-09-03 16:23:47.100891537 +0600
+@@ -10,3 +10,2 @@
+ (eval-when (:compile-toplevel :load-toplevel :execute)
+- #+sbcl (require 'asdf) ;not needed here for a recent SBCL
+ #+sbcl (require 'sb-posix)
diff --git a/sci-mathematics/maxima/files/sbcl-2.patch b/sci-mathematics/maxima/files/sbcl-2.patch
new file mode 100644
index 000000000000..9fedc741a20d
--- /dev/null
+++ b/sci-mathematics/maxima/files/sbcl-2.patch
@@ -0,0 +1,13 @@
+diff -r -U2 maxima-5.38.0.orig/src/maxima.in maxima-5.38.0/src/maxima.in
+--- maxima-5.38.0.orig/src/maxima.in 2016-04-02 23:42:45.000000000 +0200
++++ maxima-5.38.0/src/maxima.in 2016-04-03 09:07:46.317809312 +0200
+@@ -195,7 +195,7 @@
+ # switch --dynamic-space-size in order to do so.
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$@"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$@"
+ else
+- exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$@"
++ exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$@"
+ fi
+
diff --git a/sci-mathematics/maxima/files/wish-2.patch b/sci-mathematics/maxima/files/wish-2.patch
new file mode 100644
index 000000000000..59427331b38d
--- /dev/null
+++ b/sci-mathematics/maxima/files/wish-2.patch
@@ -0,0 +1,26 @@
+--- maxima-5.37.3.orig/configure.ac
++++ maxima-5.37.3/configure.ac
+@@ -991,6 +991,11 @@
+ [ --with-wish=<prog> Use <prog> for Tk wish shell (default wish)],
+- [WISH="${withval}"],
+- [WISH="wish"])
++ [],
++ [with_wish="wish"])
++case "${with_wish}" in
++ no) WISH="none" ;;
++ yes) WISH="wish" ;;
++ *) WISH="${with_wish}" ;;
++esac
+ AC_SUBST(WISH)
+-
++AM_CONDITIONAL(WANT_TK, test x"${with_wish}" != xno)
+
+--- maxima-5.37.3.orig/interfaces/Makefile.am
++++ maxima-5.37.3/interfaces/Makefile.am
+@@ -1,2 +1,5 @@
+-SUBDIRS = emacs xmaxima
++if WANT_TK
++ MAYBE_XMAXIMA = xmaxima
++endif
++SUBDIRS = emacs $(MAYBE_XMAXIMA)
+ EXTRA_DIST = bin/xmaxima.iss
diff --git a/sci-mathematics/maxima/files/xdg-utils-0.patch b/sci-mathematics/maxima/files/xdg-utils-0.patch
new file mode 100644
index 000000000000..876fe6fcd469
--- /dev/null
+++ b/sci-mathematics/maxima/files/xdg-utils-0.patch
@@ -0,0 +1,35 @@
+--- interfaces/emacs/misc/bookmode.el.orig 2008-02-07 12:42:18.008472937 +0000
++++ interfaces/emacs/misc/bookmode.el 2008-02-07 12:43:02.531010132 +0000
+@@ -680,7 +680,7 @@
+
+ (and tem
+ (list (concat "View "(nth 1 tem))
+- 'call-process "ghostview" nil nil nil
++ 'call-process "xdg-open" nil nil nil
+ (expand-file-name(nth 1 tem))
+ ))
+ (list "Cancel")
+@@ -705,7 +705,7 @@
+ (concat
+ (cond ((looking-at "%PS") "")
+ (t "gzip -dc | "))
+- "ghostview -")
++ "xdg-open -")
+
+ )))
+
+--- interfaces/xmaxima/Tkmaxima/Constants.tcl.orig 2008-02-07 12:42:47.294141832 +0000
++++ interfaces/xmaxima/Tkmaxima/Constants.tcl 2008-02-07 12:43:02.539010587 +0000
+@@ -143,9 +143,9 @@
+ image/gif netmath
+ image/png netmath
+ image/jpeg netmath
+- application/postscript "ghostview -safer %s"
+- application/pdf "acroread %s"
+- application/x-dvi "xdvi %s"
++ application/postscript "xdg-open -safer %s"
++ application/pdf "xdg-open %s"
++ application/x-dvi "xdg-open %s"
+ }
+ set maxima_priv(imagecounter) 0
+
diff --git a/sci-mathematics/maxima/maxima-5.37.3-r4.ebuild b/sci-mathematics/maxima/maxima-5.37.3-r4.ebuild
new file mode 100644
index 000000000000..93b6c5ed9385
--- /dev/null
+++ b/sci-mathematics/maxima/maxima-5.37.3-r4.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools elisp-common eutils
+
+DESCRIPTION="Free computer algebra environment based on Macsyma"
+HOMEPAGE="http://maxima.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+# Supported lisps
+LISPS=( sbcl cmucl gcl ecls clozurecl clisp )
+# <lisp> supports readline: . - no, y - yes
+SUPP_RL=( . . y . . y )
+# . - just --enable-<lisp>, <flag> - --enable-<flag>
+CONF_FLAG=( . . . ecl ccl . )
+# patch file version; . - no patch
+PATCH_V=( 1 1 . 2 2 1 )
+
+IUSE="emacs tk nls unicode X ${LISPS[*]}"
+
+# Languages
+LANGS="de es pt pt_BR"
+for lang in ${LANGS}; do
+ IUSE="${IUSE} linguas_${lang}"
+done
+
+# texlive-latexrecommended needed by imaxima for breqn.sty
+RDEPEND="!app-emacs/imaxima
+ X? ( x11-misc/xdg-utils
+ sci-visualization/gnuplot[gd]
+ tk? ( dev-lang/tk:0 ) )
+ emacs? ( virtual/emacs
+ virtual/latex-base
+ app-emacs/auctex
+ app-text/ghostscript-gpl
+ dev-texlive/texlive-latexrecommended )"
+
+# generating lisp dependencies
+depends() {
+ local LISP DEP
+ LISP=${LISPS[$1]}
+ DEP="dev-lisp/${LISP}:="
+ if [ "${SUPP_RL[$1]}" = "." ]; then
+ DEP="${DEP} app-misc/rlwrap"
+ fi
+ echo ${DEP}
+}
+
+n=${#LISPS[*]}
+for ((n--; n >= 0; n--)); do
+ LISP=${LISPS[${n}]}
+ RDEPEND="${RDEPEND} ${LISP}? ( $(depends ${n}) )"
+ DEF_DEP="${DEF_DEP} !${LISP}? ( "
+done
+
+# default lisp
+DEF_LISP=0 # sbcl
+ARM_LISP=2 # gcl
+DEF_DEP="${DEF_DEP} arm? ( `depends ${ARM_LISP}` ) !arm? ( `depends ${DEF_LISP}` )"
+
+n=${#LISPS[*]}
+for ((n--; n >= 0; n--)); do
+ DEF_DEP="${DEF_DEP} )"
+done
+
+unset LISP
+
+RDEPEND="${RDEPEND}
+ ${DEF_DEP}"
+
+DEPEND="${RDEPEND}
+ sys-apps/texinfo"
+
+TEXMF="${EPREFIX}"/usr/share/texmf-site
+
+pkg_setup() {
+ local n=${#LISPS[*]}
+
+ for ((n--; n >= 0; n--)); do
+ use ${LISPS[${n}]} && NLISPS="${NLISPS} ${n}"
+ done
+
+ if [ -z "${NLISPS}" ]; then
+ use arm && DEF_LISP=${ARM_LISP}
+ ewarn "No lisp specified in USE flags, choosing ${LISPS[${DEF_LISP}]} as default"
+ NLISPS=${DEF_LISP}
+ fi
+}
+
+src_prepare() {
+ local n PATCHES v
+ PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-0 db-0 )
+
+ n=${#PATCHES[*]}
+ for ((n--; n >= 0; n--)); do
+ epatch "${FILESDIR}"/${PATCHES[${n}]}.patch
+ done
+
+ n=${#LISPS[*]}
+ for ((n--; n >= 0; n--)); do
+ v=${PATCH_V[${n}]}
+ if [ "${v}" != "." ]; then
+ epatch "${FILESDIR}"/${LISPS[${n}]}-${v}.patch
+ fi
+ done
+
+ # bug #343331
+ rm share/Makefile.in || die
+ rm src/Makefile.in || die
+ touch src/*.mk
+ touch src/Makefile.am
+ eautoreconf
+}
+
+src_configure() {
+ local CONFS CONF n lang
+ for n in ${NLISPS}; do
+ CONF=${CONF_FLAG[${n}]}
+ if [ ${CONF} = . ]; then
+ CONF=${LISPS[${n}]}
+ fi
+ CONFS="${CONFS} --enable-${CONF}"
+ done
+
+ # enable existing translated doc
+ if use nls; then
+ for lang in ${LANGS}; do
+ if use "linguas_${lang}"; then
+ CONFS="${CONFS} --enable-lang-${lang}"
+ use unicode && CONFS="${CONFS} --enable-lang-${lang}-utf8"
+ fi
+ done
+ fi
+
+ econf ${CONFS} \
+ $(use_with tk wish) \
+ $(use_enable emacs) \
+ --with-lispdir="${EPREFIX}/${SITELISP}/${PN}"
+}
+
+src_compile() {
+ emake
+ if use emacs; then
+ pushd interfaces/emacs/emaxima > /dev/null
+ elisp-compile *.el
+ popd > /dev/null
+ pushd interfaces/emacs/imaxima > /dev/null
+ BYTECOMPFLAGS="-L . -L ../emaxima"
+ elisp-compile *.el
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ docompress -x /usr/share/info
+ emake DESTDIR="${D}" emacsdir="${EPREFIX}/${SITELISP}/${PN}" install
+
+ use tk && make_desktop_entry xmaxima xmaxima \
+ /usr/share/${PN}/${PV}/xmaxima/maxima-new.png \
+ "Science;Math;Education"
+
+ # do not use dodoc because interfaces can't read compressed files
+ # read COPYING before attempt to remove it from dodoc
+ insinto /usr/share/${PN}/${PV}/doc
+ doins AUTHORS COPYING README README.lisps
+ dodir /usr/share/doc
+ dosym ../${PN}/${PV}/doc /usr/share/doc/${PF}
+
+ if use emacs; then
+ elisp-install ${PN} interfaces/emacs/{emaxima,imaxima}/*.{el,elc,lisp}
+ elisp-site-file-install "${FILESDIR}"/50maxima-gentoo-1.el
+
+ rm "${ED}"/${SITELISP}/${PN}/emaxima.sty || die
+ insinto ${TEXMF}/tex/latex/emaxima
+ doins interfaces/emacs/emaxima/emaxima.sty
+
+ insinto /usr/share/${PN}/${PV}/doc/imaxima
+ doins interfaces/emacs/imaxima/README
+ doins -r interfaces/emacs/imaxima/imath-example
+ fi
+
+ # if we use ecls, build an ecls library for maxima
+ if use ecls; then
+ ECLLIB=`ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)"`
+ insinto "${ECLLIB#${EPREFIX}}"
+ doins src/binary-ecl/maxima.fas
+ fi
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ mktexlsr
+ fi
+}
+
+pkg_postrm() {
+ if use emacs; then
+ elisp-site-regen
+ mktexlsr
+ fi
+}
diff --git a/sci-mathematics/maxima/maxima-5.38.1.ebuild b/sci-mathematics/maxima/maxima-5.38.1.ebuild
new file mode 100644
index 000000000000..af6a58ee4353
--- /dev/null
+++ b/sci-mathematics/maxima/maxima-5.38.1.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools elisp-common eutils
+
+DESCRIPTION="Free computer algebra environment based on Macsyma"
+HOMEPAGE="http://maxima.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+# Supported lisps
+LISPS=( sbcl cmucl gcl ecls clozurecl clisp )
+# <lisp> supports readline: . - no, y - yes
+SUPP_RL=( . . y . . y )
+# . - just --enable-<lisp>, <flag> - --enable-<flag>
+CONF_FLAG=( . . . ecl ccl . )
+# patch file version; . - no patch
+PATCH_V=( 2 1 . 2 2 1 )
+
+IUSE="emacs tk nls unicode X ${LISPS[*]}"
+
+# Languages
+LANGS="de es pt pt_BR"
+for lang in ${LANGS}; do
+ IUSE="${IUSE} linguas_${lang}"
+done
+
+# texlive-latexrecommended needed by imaxima for breqn.sty
+RDEPEND="!app-emacs/imaxima
+ X? ( x11-misc/xdg-utils
+ sci-visualization/gnuplot[gd]
+ tk? ( dev-lang/tk:0 ) )
+ emacs? ( virtual/emacs
+ virtual/latex-base
+ app-emacs/auctex
+ app-text/ghostscript-gpl
+ dev-texlive/texlive-latexrecommended )"
+
+# generating lisp dependencies
+depends() {
+ local LISP DEP
+ LISP=${LISPS[$1]}
+ DEP="dev-lisp/${LISP}:="
+ if [ "${SUPP_RL[$1]}" = "." ]; then
+ DEP="${DEP} app-misc/rlwrap"
+ fi
+ echo ${DEP}
+}
+
+n=${#LISPS[*]}
+for ((n--; n >= 0; n--)); do
+ LISP=${LISPS[${n}]}
+ RDEPEND="${RDEPEND} ${LISP}? ( $(depends ${n}) )"
+ DEF_DEP="${DEF_DEP} !${LISP}? ( "
+done
+
+# default lisp
+DEF_LISP=0 # sbcl
+ARM_LISP=2 # gcl
+DEF_DEP="${DEF_DEP} arm? ( `depends ${ARM_LISP}` ) !arm? ( `depends ${DEF_LISP}` )"
+
+n=${#LISPS[*]}
+for ((n--; n >= 0; n--)); do
+ DEF_DEP="${DEF_DEP} )"
+done
+
+unset LISP
+
+RDEPEND="${RDEPEND}
+ ${DEF_DEP}"
+
+DEPEND="${RDEPEND}
+ sys-apps/texinfo"
+
+TEXMF="${EPREFIX}"/usr/share/texmf-site
+
+pkg_setup() {
+ local n=${#LISPS[*]}
+
+ for ((n--; n >= 0; n--)); do
+ use ${LISPS[${n}]} && NLISPS="${NLISPS} ${n}"
+ done
+
+ if [ -z "${NLISPS}" ]; then
+ use arm && DEF_LISP=${ARM_LISP}
+ ewarn "No lisp specified in USE flags, choosing ${LISPS[${DEF_LISP}]} as default"
+ NLISPS=${DEF_LISP}
+ fi
+}
+
+src_prepare() {
+ local n PATCHES v
+ PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-0 )
+
+ n=${#PATCHES[*]}
+ for ((n--; n >= 0; n--)); do
+ epatch "${FILESDIR}"/${PATCHES[${n}]}.patch
+ done
+
+ n=${#LISPS[*]}
+ for ((n--; n >= 0; n--)); do
+ v=${PATCH_V[${n}]}
+ if [ "${v}" != "." ]; then
+ epatch "${FILESDIR}"/${LISPS[${n}]}-${v}.patch
+ fi
+ done
+
+ # bug #343331
+ rm share/Makefile.in || die
+ rm src/Makefile.in || die
+ touch src/*.mk
+ touch src/Makefile.am
+ eautoreconf
+}
+
+src_configure() {
+ local CONFS CONF n lang
+ for n in ${NLISPS}; do
+ CONF=${CONF_FLAG[${n}]}
+ if [ ${CONF} = . ]; then
+ CONF=${LISPS[${n}]}
+ fi
+ CONFS="${CONFS} --enable-${CONF}"
+ done
+
+ # enable existing translated doc
+ if use nls; then
+ for lang in ${LANGS}; do
+ if use "linguas_${lang}"; then
+ CONFS="${CONFS} --enable-lang-${lang}"
+ use unicode && CONFS="${CONFS} --enable-lang-${lang}-utf8"
+ fi
+ done
+ fi
+
+ econf ${CONFS} \
+ $(use_with tk wish) \
+ $(use_enable emacs) \
+ --with-lispdir="${EPREFIX}/${SITELISP}/${PN}"
+}
+
+src_compile() {
+ emake
+ if use emacs; then
+ pushd interfaces/emacs/emaxima > /dev/null
+ elisp-compile *.el
+ popd > /dev/null
+ pushd interfaces/emacs/imaxima > /dev/null
+ BYTECOMPFLAGS="-L . -L ../emaxima"
+ elisp-compile *.el
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ docompress -x /usr/share/info
+ emake DESTDIR="${D}" emacsdir="${EPREFIX}/${SITELISP}/${PN}" install
+
+ use tk && make_desktop_entry xmaxima xmaxima \
+ /usr/share/${PN}/${PV}/xmaxima/maxima-new.png \
+ "Science;Math;Education"
+
+ # do not use dodoc because interfaces can't read compressed files
+ # read COPYING before attempt to remove it from dodoc
+ insinto /usr/share/${PN}/${PV}/doc
+ doins AUTHORS COPYING README README.lisps
+ dodir /usr/share/doc
+ dosym ../${PN}/${PV}/doc /usr/share/doc/${PF}
+
+ if use emacs; then
+ elisp-install ${PN} interfaces/emacs/{emaxima,imaxima}/*.{el,elc,lisp}
+ elisp-site-file-install "${FILESDIR}"/50maxima-gentoo-1.el
+
+ rm "${ED}"/${SITELISP}/${PN}/emaxima.sty || die
+ insinto ${TEXMF}/tex/latex/emaxima
+ doins interfaces/emacs/emaxima/emaxima.sty
+
+ insinto /usr/share/${PN}/${PV}/doc/imaxima
+ doins interfaces/emacs/imaxima/README
+ doins -r interfaces/emacs/imaxima/imath-example
+ fi
+
+ # if we use ecls, build an ecls library for maxima
+ if use ecls; then
+ ECLLIB=`ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)"`
+ insinto "${ECLLIB#${EPREFIX}}"
+ doins src/binary-ecl/maxima.fas
+ fi
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ mktexlsr
+ fi
+}
+
+pkg_postrm() {
+ if use emacs; then
+ elisp-site-regen
+ mktexlsr
+ fi
+}
diff --git a/sci-mathematics/maxima/maxima-5.39.0.ebuild b/sci-mathematics/maxima/maxima-5.39.0.ebuild
new file mode 100644
index 000000000000..b43477f95708
--- /dev/null
+++ b/sci-mathematics/maxima/maxima-5.39.0.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools elisp-common eutils
+
+DESCRIPTION="Free computer algebra environment based on Macsyma"
+HOMEPAGE="http://maxima.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+# Supported lisps
+LISPS=( sbcl cmucl gcl ecls clozurecl clisp )
+# <lisp> supports readline: . - no, y - yes
+SUPP_RL=( . . y . . y )
+# . - just --enable-<lisp>, <flag> - --enable-<flag>
+CONF_FLAG=( . . . ecl ccl . )
+# patch file version; . - no patch
+PATCH_V=( 2 1 . 2 2 1 )
+
+IUSE="emacs tk nls unicode X ${LISPS[*]}"
+
+# Languages
+LANGS="de es pt pt_BR"
+for lang in ${LANGS}; do
+ IUSE="${IUSE} linguas_${lang}"
+done
+
+# texlive-latexrecommended needed by imaxima for breqn.sty
+RDEPEND="!app-emacs/imaxima
+ X? ( x11-misc/xdg-utils
+ sci-visualization/gnuplot[gd]
+ tk? ( dev-lang/tk:0 ) )
+ emacs? ( virtual/emacs
+ virtual/latex-base
+ app-emacs/auctex
+ app-text/ghostscript-gpl
+ dev-texlive/texlive-latexrecommended )"
+
+# generating lisp dependencies
+depends() {
+ local LISP DEP
+ LISP=${LISPS[$1]}
+ DEP="dev-lisp/${LISP}:="
+ if [ "${SUPP_RL[$1]}" = "." ]; then
+ DEP="${DEP} app-misc/rlwrap"
+ fi
+ echo ${DEP}
+}
+
+n=${#LISPS[*]}
+for ((n--; n >= 0; n--)); do
+ LISP=${LISPS[${n}]}
+ RDEPEND="${RDEPEND} ${LISP}? ( $(depends ${n}) )"
+ DEF_DEP="${DEF_DEP} !${LISP}? ( "
+done
+
+# default lisp
+DEF_LISP=0 # sbcl
+ARM_LISP=2 # gcl
+DEF_DEP="${DEF_DEP} arm? ( `depends ${ARM_LISP}` ) !arm? ( `depends ${DEF_LISP}` )"
+
+n=${#LISPS[*]}
+for ((n--; n >= 0; n--)); do
+ DEF_DEP="${DEF_DEP} )"
+done
+
+unset LISP
+
+RDEPEND="${RDEPEND}
+ ${DEF_DEP}"
+
+DEPEND="${RDEPEND}
+ sys-apps/texinfo"
+
+TEXMF="${EPREFIX}"/usr/share/texmf-site
+
+pkg_setup() {
+ local n=${#LISPS[*]}
+
+ for ((n--; n >= 0; n--)); do
+ use ${LISPS[${n}]} && NLISPS="${NLISPS} ${n}"
+ done
+
+ if [ -z "${NLISPS}" ]; then
+ use arm && DEF_LISP=${ARM_LISP}
+ ewarn "No lisp specified in USE flags, choosing ${LISPS[${DEF_LISP}]} as default"
+ NLISPS=${DEF_LISP}
+ fi
+}
+
+src_prepare() {
+ local n PATCHES v
+ PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-0 )
+
+ n=${#PATCHES[*]}
+ for ((n--; n >= 0; n--)); do
+ epatch "${FILESDIR}"/${PATCHES[${n}]}.patch
+ done
+
+ n=${#LISPS[*]}
+ for ((n--; n >= 0; n--)); do
+ v=${PATCH_V[${n}]}
+ if [ "${v}" != "." ]; then
+ epatch "${FILESDIR}"/${LISPS[${n}]}-${v}.patch
+ fi
+ done
+
+ # bug #343331
+ rm share/Makefile.in || die
+ rm src/Makefile.in || die
+ touch src/*.mk
+ touch src/Makefile.am
+ eautoreconf
+}
+
+src_configure() {
+ local CONFS CONF n lang
+ for n in ${NLISPS}; do
+ CONF=${CONF_FLAG[${n}]}
+ if [ ${CONF} = . ]; then
+ CONF=${LISPS[${n}]}
+ fi
+ CONFS="${CONFS} --enable-${CONF}"
+ done
+
+ # enable existing translated doc
+ if use nls; then
+ for lang in ${LANGS}; do
+ if use "linguas_${lang}"; then
+ CONFS="${CONFS} --enable-lang-${lang}"
+ use unicode && CONFS="${CONFS} --enable-lang-${lang}-utf8"
+ fi
+ done
+ fi
+
+ econf ${CONFS} \
+ $(use_with tk wish) \
+ $(use_enable emacs) \
+ --with-lispdir="${EPREFIX}/${SITELISP}/${PN}"
+}
+
+src_compile() {
+ emake
+ if use emacs; then
+ pushd interfaces/emacs/emaxima > /dev/null
+ elisp-compile *.el
+ popd > /dev/null
+ pushd interfaces/emacs/imaxima > /dev/null
+ BYTECOMPFLAGS="-L . -L ../emaxima"
+ elisp-compile *.el
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ docompress -x /usr/share/info
+ emake DESTDIR="${D}" emacsdir="${EPREFIX}/${SITELISP}/${PN}" install
+
+ use tk && make_desktop_entry xmaxima xmaxima \
+ /usr/share/${PN}/${PV}/xmaxima/maxima-new.png \
+ "Science;Math;Education"
+
+ # do not use dodoc because interfaces can't read compressed files
+ # read COPYING before attempt to remove it from dodoc
+ insinto /usr/share/${PN}/${PV}/doc
+ doins AUTHORS COPYING README README.lisps
+ dodir /usr/share/doc
+ dosym ../${PN}/${PV}/doc /usr/share/doc/${PF}
+
+ if use emacs; then
+ elisp-install ${PN} interfaces/emacs/{emaxima,imaxima}/*.{el,elc,lisp}
+ elisp-site-file-install "${FILESDIR}"/50maxima-gentoo-1.el
+
+ rm "${ED}"/${SITELISP}/${PN}/emaxima.sty || die
+ insinto ${TEXMF}/tex/latex/emaxima
+ doins interfaces/emacs/emaxima/emaxima.sty
+
+ insinto /usr/share/${PN}/${PV}/doc/imaxima
+ doins interfaces/emacs/imaxima/README
+ doins -r interfaces/emacs/imaxima/imath-example
+ fi
+
+ # if we use ecls, build an ecls library for maxima
+ if use ecls; then
+ ECLLIB=`ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)"`
+ insinto "${ECLLIB#${EPREFIX}}"
+ doins src/binary-ecl/maxima.fas
+ fi
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ mktexlsr
+ fi
+}
+
+pkg_postrm() {
+ if use emacs; then
+ elisp-site-regen
+ mktexlsr
+ fi
+}
diff --git a/sci-mathematics/maxima/maxima-5.40.0.ebuild b/sci-mathematics/maxima/maxima-5.40.0.ebuild
new file mode 100644
index 000000000000..8bdc377e8486
--- /dev/null
+++ b/sci-mathematics/maxima/maxima-5.40.0.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools elisp-common eutils
+
+DESCRIPTION="Free computer algebra environment based on Macsyma"
+HOMEPAGE="http://maxima.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+# Supported lisps
+LISPS=( sbcl cmucl gcl ecls clozurecl clisp )
+# <lisp> supports readline: . - no, y - yes
+SUPP_RL=( . . y . . y )
+# . - just --enable-<lisp>, <flag> - --enable-<flag>
+CONF_FLAG=( . . . ecl ccl . )
+# patch file version; . - no patch
+PATCH_V=( 2 1 . 2 2 1 )
+
+IUSE="emacs tk nls unicode X ${LISPS[*]}"
+
+# Languages
+LANGS="de es pt pt_BR"
+for lang in ${LANGS}; do
+ IUSE="${IUSE} linguas_${lang}"
+done
+
+# texlive-latexrecommended needed by imaxima for breqn.sty
+RDEPEND="!app-emacs/imaxima
+ X? ( x11-misc/xdg-utils
+ sci-visualization/gnuplot[gd]
+ tk? ( dev-lang/tk:0 ) )
+ emacs? ( virtual/emacs
+ virtual/latex-base
+ app-emacs/auctex
+ app-text/ghostscript-gpl
+ dev-texlive/texlive-latexrecommended )"
+
+# generating lisp dependencies
+depends() {
+ local LISP DEP
+ LISP=${LISPS[$1]}
+ DEP="dev-lisp/${LISP}:="
+ if [ "${SUPP_RL[$1]}" = "." ]; then
+ DEP="${DEP} app-misc/rlwrap"
+ fi
+ echo ${DEP}
+}
+
+n=${#LISPS[*]}
+for ((n--; n >= 0; n--)); do
+ LISP=${LISPS[${n}]}
+ RDEPEND="${RDEPEND} ${LISP}? ( $(depends ${n}) )"
+ DEF_DEP="${DEF_DEP} !${LISP}? ( "
+done
+
+# default lisp
+DEF_LISP=0 # sbcl
+ARM_LISP=2 # gcl
+DEF_DEP="${DEF_DEP} arm? ( `depends ${ARM_LISP}` ) !arm? ( `depends ${DEF_LISP}` )"
+
+n=${#LISPS[*]}
+for ((n--; n >= 0; n--)); do
+ DEF_DEP="${DEF_DEP} )"
+done
+
+unset LISP
+
+RDEPEND="${RDEPEND}
+ ${DEF_DEP}"
+
+DEPEND="${RDEPEND}
+ sys-apps/texinfo"
+
+TEXMF="${EPREFIX}"/usr/share/texmf-site
+
+pkg_setup() {
+ local n=${#LISPS[*]}
+
+ for ((n--; n >= 0; n--)); do
+ use ${LISPS[${n}]} && NLISPS="${NLISPS} ${n}"
+ done
+
+ if [ -z "${NLISPS}" ]; then
+ use arm && DEF_LISP=${ARM_LISP}
+ ewarn "No lisp specified in USE flags, choosing ${LISPS[${DEF_LISP}]} as default"
+ NLISPS=${DEF_LISP}
+ fi
+}
+
+src_prepare() {
+ local n PATCHES v
+ PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-0 )
+
+ n=${#PATCHES[*]}
+ for ((n--; n >= 0; n--)); do
+ epatch "${FILESDIR}"/${PATCHES[${n}]}.patch
+ done
+
+ n=${#LISPS[*]}
+ for ((n--; n >= 0; n--)); do
+ v=${PATCH_V[${n}]}
+ if [ "${v}" != "." ]; then
+ epatch "${FILESDIR}"/${LISPS[${n}]}-${v}.patch
+ fi
+ done
+
+ # bug #343331
+ rm share/Makefile.in || die
+ rm src/Makefile.in || die
+ touch src/*.mk
+ touch src/Makefile.am
+ eautoreconf
+}
+
+src_configure() {
+ local CONFS CONF n lang
+ for n in ${NLISPS}; do
+ CONF=${CONF_FLAG[${n}]}
+ if [ ${CONF} = . ]; then
+ CONF=${LISPS[${n}]}
+ fi
+ CONFS="${CONFS} --enable-${CONF}"
+ done
+
+ # enable existing translated doc
+ if use nls; then
+ for lang in ${LANGS}; do
+ if use "linguas_${lang}"; then
+ CONFS="${CONFS} --enable-lang-${lang}"
+ use unicode && CONFS="${CONFS} --enable-lang-${lang}-utf8"
+ fi
+ done
+ fi
+
+ econf ${CONFS} \
+ $(use_with tk wish) \
+ $(use_enable emacs) \
+ --with-lispdir="${EPREFIX}/${SITELISP}/${PN}"
+}
+
+src_compile() {
+ emake
+ if use emacs; then
+ pushd interfaces/emacs/emaxima > /dev/null
+ elisp-compile *.el
+ popd > /dev/null
+ pushd interfaces/emacs/imaxima > /dev/null
+ BYTECOMPFLAGS="-L . -L ../emaxima"
+ elisp-compile *.el
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ docompress -x /usr/share/info
+ emake DESTDIR="${D}" emacsdir="${EPREFIX}/${SITELISP}/${PN}" install
+
+ use tk && make_desktop_entry xmaxima xmaxima \
+ /usr/share/${PN}/${PV}/xmaxima/maxima-new.png \
+ "Science;Math;Education"
+
+ # do not use dodoc because interfaces can't read compressed files
+ # read COPYING before attempt to remove it from dodoc
+ insinto /usr/share/${PN}/${PV}/doc
+ doins AUTHORS COPYING README README.lisps
+ dodir /usr/share/doc
+ dosym ../${PN}/${PV}/doc /usr/share/doc/${PF}
+
+ if use emacs; then
+ elisp-install ${PN} interfaces/emacs/{emaxima,imaxima}/*.{el,elc,lisp}
+ elisp-site-file-install "${FILESDIR}"/50maxima-gentoo-1.el
+
+ rm "${ED}"/${SITELISP}/${PN}/emaxima.sty || die
+ insinto ${TEXMF}/tex/latex/emaxima
+ doins interfaces/emacs/emaxima/emaxima.sty
+
+ insinto /usr/share/${PN}/${PV}/doc/imaxima
+ doins interfaces/emacs/imaxima/README
+ doins -r interfaces/emacs/imaxima/imath-example
+ fi
+
+ # if we use ecls, build an ecls library for maxima
+ if use ecls; then
+ ECLLIB=`ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)"`
+ insinto "${ECLLIB#${EPREFIX}}"
+ doins src/binary-ecl/maxima.fas
+ fi
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ mktexlsr
+ fi
+}
+
+pkg_postrm() {
+ if use emacs; then
+ elisp-site-regen
+ mktexlsr
+ fi
+}
diff --git a/sci-mathematics/maxima/maxima-5.41.0.ebuild b/sci-mathematics/maxima/maxima-5.41.0.ebuild
new file mode 100644
index 000000000000..8bdc377e8486
--- /dev/null
+++ b/sci-mathematics/maxima/maxima-5.41.0.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools elisp-common eutils
+
+DESCRIPTION="Free computer algebra environment based on Macsyma"
+HOMEPAGE="http://maxima.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+# Supported lisps
+LISPS=( sbcl cmucl gcl ecls clozurecl clisp )
+# <lisp> supports readline: . - no, y - yes
+SUPP_RL=( . . y . . y )
+# . - just --enable-<lisp>, <flag> - --enable-<flag>
+CONF_FLAG=( . . . ecl ccl . )
+# patch file version; . - no patch
+PATCH_V=( 2 1 . 2 2 1 )
+
+IUSE="emacs tk nls unicode X ${LISPS[*]}"
+
+# Languages
+LANGS="de es pt pt_BR"
+for lang in ${LANGS}; do
+ IUSE="${IUSE} linguas_${lang}"
+done
+
+# texlive-latexrecommended needed by imaxima for breqn.sty
+RDEPEND="!app-emacs/imaxima
+ X? ( x11-misc/xdg-utils
+ sci-visualization/gnuplot[gd]
+ tk? ( dev-lang/tk:0 ) )
+ emacs? ( virtual/emacs
+ virtual/latex-base
+ app-emacs/auctex
+ app-text/ghostscript-gpl
+ dev-texlive/texlive-latexrecommended )"
+
+# generating lisp dependencies
+depends() {
+ local LISP DEP
+ LISP=${LISPS[$1]}
+ DEP="dev-lisp/${LISP}:="
+ if [ "${SUPP_RL[$1]}" = "." ]; then
+ DEP="${DEP} app-misc/rlwrap"
+ fi
+ echo ${DEP}
+}
+
+n=${#LISPS[*]}
+for ((n--; n >= 0; n--)); do
+ LISP=${LISPS[${n}]}
+ RDEPEND="${RDEPEND} ${LISP}? ( $(depends ${n}) )"
+ DEF_DEP="${DEF_DEP} !${LISP}? ( "
+done
+
+# default lisp
+DEF_LISP=0 # sbcl
+ARM_LISP=2 # gcl
+DEF_DEP="${DEF_DEP} arm? ( `depends ${ARM_LISP}` ) !arm? ( `depends ${DEF_LISP}` )"
+
+n=${#LISPS[*]}
+for ((n--; n >= 0; n--)); do
+ DEF_DEP="${DEF_DEP} )"
+done
+
+unset LISP
+
+RDEPEND="${RDEPEND}
+ ${DEF_DEP}"
+
+DEPEND="${RDEPEND}
+ sys-apps/texinfo"
+
+TEXMF="${EPREFIX}"/usr/share/texmf-site
+
+pkg_setup() {
+ local n=${#LISPS[*]}
+
+ for ((n--; n >= 0; n--)); do
+ use ${LISPS[${n}]} && NLISPS="${NLISPS} ${n}"
+ done
+
+ if [ -z "${NLISPS}" ]; then
+ use arm && DEF_LISP=${ARM_LISP}
+ ewarn "No lisp specified in USE flags, choosing ${LISPS[${DEF_LISP}]} as default"
+ NLISPS=${DEF_LISP}
+ fi
+}
+
+src_prepare() {
+ local n PATCHES v
+ PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-0 )
+
+ n=${#PATCHES[*]}
+ for ((n--; n >= 0; n--)); do
+ epatch "${FILESDIR}"/${PATCHES[${n}]}.patch
+ done
+
+ n=${#LISPS[*]}
+ for ((n--; n >= 0; n--)); do
+ v=${PATCH_V[${n}]}
+ if [ "${v}" != "." ]; then
+ epatch "${FILESDIR}"/${LISPS[${n}]}-${v}.patch
+ fi
+ done
+
+ # bug #343331
+ rm share/Makefile.in || die
+ rm src/Makefile.in || die
+ touch src/*.mk
+ touch src/Makefile.am
+ eautoreconf
+}
+
+src_configure() {
+ local CONFS CONF n lang
+ for n in ${NLISPS}; do
+ CONF=${CONF_FLAG[${n}]}
+ if [ ${CONF} = . ]; then
+ CONF=${LISPS[${n}]}
+ fi
+ CONFS="${CONFS} --enable-${CONF}"
+ done
+
+ # enable existing translated doc
+ if use nls; then
+ for lang in ${LANGS}; do
+ if use "linguas_${lang}"; then
+ CONFS="${CONFS} --enable-lang-${lang}"
+ use unicode && CONFS="${CONFS} --enable-lang-${lang}-utf8"
+ fi
+ done
+ fi
+
+ econf ${CONFS} \
+ $(use_with tk wish) \
+ $(use_enable emacs) \
+ --with-lispdir="${EPREFIX}/${SITELISP}/${PN}"
+}
+
+src_compile() {
+ emake
+ if use emacs; then
+ pushd interfaces/emacs/emaxima > /dev/null
+ elisp-compile *.el
+ popd > /dev/null
+ pushd interfaces/emacs/imaxima > /dev/null
+ BYTECOMPFLAGS="-L . -L ../emaxima"
+ elisp-compile *.el
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ docompress -x /usr/share/info
+ emake DESTDIR="${D}" emacsdir="${EPREFIX}/${SITELISP}/${PN}" install
+
+ use tk && make_desktop_entry xmaxima xmaxima \
+ /usr/share/${PN}/${PV}/xmaxima/maxima-new.png \
+ "Science;Math;Education"
+
+ # do not use dodoc because interfaces can't read compressed files
+ # read COPYING before attempt to remove it from dodoc
+ insinto /usr/share/${PN}/${PV}/doc
+ doins AUTHORS COPYING README README.lisps
+ dodir /usr/share/doc
+ dosym ../${PN}/${PV}/doc /usr/share/doc/${PF}
+
+ if use emacs; then
+ elisp-install ${PN} interfaces/emacs/{emaxima,imaxima}/*.{el,elc,lisp}
+ elisp-site-file-install "${FILESDIR}"/50maxima-gentoo-1.el
+
+ rm "${ED}"/${SITELISP}/${PN}/emaxima.sty || die
+ insinto ${TEXMF}/tex/latex/emaxima
+ doins interfaces/emacs/emaxima/emaxima.sty
+
+ insinto /usr/share/${PN}/${PV}/doc/imaxima
+ doins interfaces/emacs/imaxima/README
+ doins -r interfaces/emacs/imaxima/imath-example
+ fi
+
+ # if we use ecls, build an ecls library for maxima
+ if use ecls; then
+ ECLLIB=`ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)"`
+ insinto "${ECLLIB#${EPREFIX}}"
+ doins src/binary-ecl/maxima.fas
+ fi
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ mktexlsr
+ fi
+}
+
+pkg_postrm() {
+ if use emacs; then
+ elisp-site-regen
+ mktexlsr
+ fi
+}
diff --git a/sci-mathematics/maxima/metadata.xml b/sci-mathematics/maxima/metadata.xml
new file mode 100644
index 000000000000..2ee0d1e396a8
--- /dev/null
+++ b/sci-mathematics/maxima/metadata.xml
@@ -0,0 +1,35 @@
+<?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">
+ Computer Algebra system, descendent of Macsyma.
+ Maxima is a system for the manipulation of symbolic and
+ numerical expressions, including differentiation, integration,
+ Taylor series, Laplace transforms, ordinary differential
+ equations, systems of linear equations, and vectors, matrices,
+ and tensors. Maxima produces high precision results by using
+ exact fractions and arbitrarily long floating point representations,
+ and can plot functions and data in two and three dimensions.
+</longdescription>
+ <use>
+ <flag name="clisp">Compile maxima with GNU CLISP
+ (<pkg>dev-lisp/clisp</pkg>)</flag>
+ <flag name="clozurecl">Compile maxima with Clozure Common Lisp
+ (<pkg>dev-lisp/clozurecl</pkg>)</flag>
+ <flag name="cmucl">Compile maxima with CMU Common Lisp
+ (<pkg>dev-lisp/cmucl</pkg>)</flag>
+ <flag name="ecls">Compile maxima with Embeddable Common Lisp
+ (<pkg>dev-lisp/ecls</pkg>)</flag>
+ <flag name="gcl">Compile maxima with GNU Common Lisp
+ (<pkg>dev-lisp/gcl</pkg>)</flag>
+ <flag name="sbcl">Compile maxima with Steel Bank Common Lisp
+ (<pkg>dev-lisp/sbcl</pkg>)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">maxima</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/metadata.xml b/sci-mathematics/metadata.xml
new file mode 100644
index 000000000000..1eb658e8e1cc
--- /dev/null
+++ b/sci-mathematics/metadata.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The sci-mathematics category contains mathematical software.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie sci-mathematics enthält mathematische Software.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría sci-mathemathics contiene programas relacionados con las
+ matemáticas.
+ </longdescription>
+ <longdescription lang="ja">
+ sci-mathematicsカテゴリーには数学のソフトウェアが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De sci-mathematics categorie bevat wiskundige software.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm sci-mathematics chứa các phần mềm toán học.
+ </longdescription>
+ <longdescription lang="sk">
+ Kategória sci-mathematics obsahuje matematické programy.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria sci-mathemathics contiene programmi matematici.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria sci-mathematics contém programas matemáticos.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria sci-mathematics zawiera programy naukowe związane z
+ matematyką.
+ </longdescription>
+</catmetadata>
+
diff --git a/sci-mathematics/minisat/Manifest b/sci-mathematics/minisat/Manifest
new file mode 100644
index 000000000000..ac7b99cb502e
--- /dev/null
+++ b/sci-mathematics/minisat/Manifest
@@ -0,0 +1,10 @@
+AUX minisat-2.2.0-header_fix.patch 3879 SHA256 edcfefe00d39997e5c553ad583aa432315425d321af9fb5a56c530862482a50e SHA512 1a8a00e1a049dfab2c7041043ebc47eb09cac38c634c9fc54725fd262d24ef1f49dd445f2330122623d6464effd2755c36e7d16b3d5681a31ca1da0fcf9491b0 WHIRLPOOL 08b5336d0e9032783f2f174c99697ea407efbc4ce7d2a31ebb35544441e02851ea395e32b01d3c10125764f57374c69ad49643ad8700218382b6882607bc87a7
+AUX minisat-2.2.0_p20130925-nusmv.patch 17540 SHA256 88615ec21bfba218959914ce04fb536b77ec459aa62150b380fd802288cbab7c SHA512 cfad7fb104f8630396f745144da7c052b1e6d5eb3ac9f3cc86a71c9d1353664ea9ece3cbd977f12a9d3a18efc245e33eb97bb949516c5620d3f6b76aa3c1586c WHIRLPOOL de43b31eafef9e3a3c4af4ed8b0c48c4d257790372c60636806f884cb91842bc98fecf7dba49e66653190cebce00065bdc5c638261c0b95970da5db62f1ba454
+DIST MiniSat.pdf 327416 SHA256 53197dbd783c924a2627d75e305706297988494265bd5e5ec873840e5d797ac4 SHA512 94e70c721740c0b7fd52621c7a5e43dd9207eed92e60a1c64ee63b541b9861d2580d14ba64c49c6c4f273ac028ded43bc944c71131e51693cdd7d1763af582f6 WHIRLPOOL a087d8929476fc33464d19432fc05a01797761f695b81c0aa6d35270731b00dabe2402ea2cfd705b49d5d6664a3cbd46bc60147d60934acdfc94a33066316185
+DIST minisat-2.2.0.tar.gz 43879 SHA256 92957d851cdc3baddfe07b5fc80ed5a0237c489d0c52ae72f62844b3b46d7808 SHA512 cf79b05d43ebdc8fd8081899a1f853370de051cafe6e5b143eaff9827efc542b58062782a3ce2a3d1a03561a9ffd780c9cdc645bb50036eb61e80fa729136e64 WHIRLPOOL a5117e7bc81aeecb6fa34d8e2dea70b379d9e3463957e7029c80957ff3bcdd3107a99fb0dabfe59b57bfdb16ed51a0a4781c8dbf8e3f6f225ebd5035c1a9ff79
+DIST minisat-2.2.0_p20130925.tar.gz 49544 SHA256 3db05b02f91c4b097b7962e523225aa5e6fa9a6c0d42704a170b01b069cdfcfe SHA512 37fc35cc4f3104d7f0e8ee9f7123fc34e175df578658266799d809d71d6cf081e811919f304a02f6cb9c3827d308e59408149d63d1d1e7c6d0b495350f93b3d9 WHIRLPOOL c976fabadb2149e15260025646e465d7422ffb9fd35e37263766002462de7b8d16db031aacb1458467acd9957eb370894d39ea3a7ddc5c98627f84b0a08b7820
+EBUILD minisat-2.2.0-r4.ebuild 1353 SHA256 a5e06a513d7aac1c7b1f90d59950989e04550bdda8637fb01bdaa032e3c85251 SHA512 d763d57490d349f400f62c5516d99f14df57cf1aa03ec14d0d1035f5e0042ab17a3007637f336bec520295b388e960c0f67d5a6e81a13c90f984d13a43784f9c WHIRLPOOL 2b9ff15bf280a0841780246c3a562b3824ffdd3449357a9555306c20cdc487529a16b2d80773e23b9eba8bd91afbfe39e2386d4fc81d43170d4deb15a1850ad5
+EBUILD minisat-2.2.0_p20130925.ebuild 1604 SHA256 bcc133ffef459fa77716d527c479c83916ce004ad23be2f2bdac8e844fbbbebc SHA512 5214b3ea329966412499728ca437ad49540476284200e634fbfcc36346615e58c07fb1990c679edec7283a7fd2a3c71f2bc2ff7c1e8dadd5c0ea2466f42ce820 WHIRLPOOL 9969adc8a7c7ff8b437dc927dc390974a4c05ebb43c00daa7842777918afe99e32682ba2d33eded2e40a3f12fe4e8496e882d5dc6dbfa1624713e47702321d73
+MISC ChangeLog 3820 SHA256 ec7ce24bae115c4a63beeb290aee9d2c731969c9079f71bfa476153f68c1c251 SHA512 f3e98aea2cbb17e4d52837cf39432cb848039401c95ba5bfa04f25ae62f6ce54d69d6f2998e0c5bcec2ce9836c90a2b457a077718f756254a3b2e08b93b23b85 WHIRLPOOL cf9b2cab0fd01b1b80145f8399bbb2bcd2ce86edbb84132c5d627347936e59d4d4dc28afec6d665c28646f44393674cae4d86d2959429795ec2a123142ef9c66
+MISC ChangeLog-2015 2048 SHA256 755dba04a91cf19ee74cc317b16de162abd38df5887969688b8201a3964b0bd1 SHA512 3c781eb23c4310a6b58b1ad28fca3ae384825f728876853358cf1b83dd04b8710d35a9b69e9fce24b51988c016d1bc758ea14885dbd030cccdeb7ae815180b6c WHIRLPOOL ecae4fb62b9b3f35405a10056660c8871d84e0339e6d8f4dc63e239291a1877355955cde1d612b461327c8125f17c60a64a20d1a75dbee2362c208d9e2f0b903
+MISC metadata.xml 451 SHA256 30cde76f469ab7b407fd6c028f089c7502ac73b571c8c38203f7932b2cab0a35 SHA512 366989ee424c843bf3239bb16f0afa46393dd7fdf2c131a8de6d7bf6ab29fc5db71b3cf47f6acf5923bb4bbcf8244eb655ce465555ea8e17203048be536020e2 WHIRLPOOL 028d60cc31e492bb1ff7a1df0582acc89071337a6bccea40909a83fd1a0fbcebe5393737c14ec0165f021175a70110af813c2762ad7ec2d805c21682616f9819
diff --git a/sci-mathematics/minisat/files/minisat-2.2.0-header_fix.patch b/sci-mathematics/minisat/files/minisat-2.2.0-header_fix.patch
new file mode 100644
index 000000000000..486c012fe2a4
--- /dev/null
+++ b/sci-mathematics/minisat/files/minisat-2.2.0-header_fix.patch
@@ -0,0 +1,160 @@
+--- ./utils/System.h.orig 2010-07-10 09:07:36.000000000 -0700
++++ ./utils/System.h 2011-04-12 18:33:41.000000000 -0700
+@@ -25,7 +25,7 @@
+ #include <fpu_control.h>
+ #endif
+
+-#include "mtl/IntTypes.h"
++#include <mtl/IntTypes.h>
+
+ //-------------------------------------------------------------------------------------------------
+
+--- ./utils/Options.h.orig 2010-07-10 09:07:36.000000000 -0700
++++ ./utils/Options.h 2011-04-12 18:34:38.000000000 -0700
+@@ -25,9 +25,9 @@
+ #include <math.h>
+ #include <string.h>
+
+-#include "mtl/IntTypes.h"
+-#include "mtl/Vec.h"
+-#include "utils/ParseUtils.h"
++#include <mtl/IntTypes.h>
++#include <mtl/Vec.h>
++#include "ParseUtils.h"
+
+ namespace Minisat {
+
+--- ./core/SolverTypes.h.orig 2010-07-10 09:07:36.000000000 -0700
++++ ./core/SolverTypes.h 2011-04-12 18:27:58.000000000 -0700
+@@ -24,11 +24,11 @@
+
+ #include <assert.h>
+
+-#include "mtl/IntTypes.h"
+-#include "mtl/Alg.h"
+-#include "mtl/Vec.h"
+-#include "mtl/Map.h"
+-#include "mtl/Alloc.h"
++#include <mtl/IntTypes.h>
++#include <mtl/Alg.h>
++#include <mtl/Vec.h>
++#include <mtl/Map.h>
++#include <mtl/Alloc.h>
+
+ namespace Minisat {
+
+--- ./core/Solver.h.orig 2010-07-10 09:07:36.000000000 -0700
++++ ./core/Solver.h 2011-04-12 18:26:56.000000000 -0700
+@@ -21,11 +21,11 @@
+ #ifndef Minisat_Solver_h
+ #define Minisat_Solver_h
+
+-#include "mtl/Vec.h"
+-#include "mtl/Heap.h"
+-#include "mtl/Alg.h"
+-#include "utils/Options.h"
+-#include "core/SolverTypes.h"
++#include <mtl/Vec.h>
++#include <mtl/Heap.h>
++#include <mtl/Alg.h>
++#include <utils/Options.h>
++#include "SolverTypes.h"
+
+
+ namespace Minisat {
+--- ./mtl/Vec.h.orig 2010-07-10 09:07:36.000000000 -0700
++++ ./mtl/Vec.h 2011-04-12 18:30:50.000000000 -0700
+@@ -24,8 +24,8 @@
+ #include <assert.h>
+ #include <new>
+
+-#include "mtl/IntTypes.h"
+-#include "mtl/XAlloc.h"
++#include "IntTypes.h"
++#include "XAlloc.h"
+
+ namespace Minisat {
+
+--- ./mtl/Sort.h.orig 2010-07-10 09:07:36.000000000 -0700
++++ ./mtl/Sort.h 2011-04-12 18:31:05.000000000 -0700
+@@ -21,7 +21,7 @@
+ #ifndef Minisat_Sort_h
+ #define Minisat_Sort_h
+
+-#include "mtl/Vec.h"
++#include "Vec.h"
+
+ //=================================================================================================
+ // Some sorting algorithms for vec's
+--- ./mtl/Alg.h.orig 2010-07-10 09:07:36.000000000 -0700
++++ ./mtl/Alg.h 2011-04-12 18:32:26.000000000 -0700
+@@ -21,7 +21,7 @@
+ #ifndef Minisat_Alg_h
+ #define Minisat_Alg_h
+
+-#include "mtl/Vec.h"
++#include "Vec.h"
+
+ namespace Minisat {
+
+--- ./mtl/Alloc.h.orig 2010-07-10 09:07:36.000000000 -0700
++++ ./mtl/Alloc.h 2011-04-12 18:32:18.000000000 -0700
+@@ -21,8 +21,8 @@
+ #ifndef Minisat_Alloc_h
+ #define Minisat_Alloc_h
+
+-#include "mtl/XAlloc.h"
+-#include "mtl/Vec.h"
++#include "XAlloc.h"
++#include "Vec.h"
+
+ namespace Minisat {
+
+--- ./mtl/Heap.h.orig 2010-07-10 09:07:36.000000000 -0700
++++ ./mtl/Heap.h 2011-04-12 18:32:05.000000000 -0700
+@@ -21,7 +21,7 @@
+ #ifndef Minisat_Heap_h
+ #define Minisat_Heap_h
+
+-#include "mtl/Vec.h"
++#include "Vec.h"
+
+ namespace Minisat {
+
+--- ./mtl/Map.h.orig 2010-07-10 09:07:36.000000000 -0700
++++ ./mtl/Map.h 2011-04-12 18:31:36.000000000 -0700
+@@ -20,8 +20,8 @@
+ #ifndef Minisat_Map_h
+ #define Minisat_Map_h
+
+-#include "mtl/IntTypes.h"
+-#include "mtl/Vec.h"
++#include "IntTypes.h"
++#include "Vec.h"
+
+ namespace Minisat {
+
+--- ./mtl/Queue.h.orig 2010-07-10 09:07:36.000000000 -0700
++++ ./mtl/Queue.h 2011-04-12 18:31:18.000000000 -0700
+@@ -21,7 +21,7 @@
+ #ifndef Minisat_Queue_h
+ #define Minisat_Queue_h
+
+-#include "mtl/Vec.h"
++#include "Vec.h"
+
+ namespace Minisat {
+
+--- ./simp/SimpSolver.h.orig 2010-07-10 09:07:36.000000000 -0700
++++ ./simp/SimpSolver.h 2011-04-12 18:35:20.000000000 -0700
+@@ -21,8 +21,8 @@
+ #ifndef Minisat_SimpSolver_h
+ #define Minisat_SimpSolver_h
+
+-#include "mtl/Queue.h"
+-#include "core/Solver.h"
++#include <mtl/Queue.h>
++#include <core/Solver.h>
+
+
+ namespace Minisat {
diff --git a/sci-mathematics/minisat/files/minisat-2.2.0_p20130925-nusmv.patch b/sci-mathematics/minisat/files/minisat-2.2.0_p20130925-nusmv.patch
new file mode 100644
index 000000000000..4b17c8fb44bb
--- /dev/null
+++ b/sci-mathematics/minisat/files/minisat-2.2.0_p20130925-nusmv.patch
@@ -0,0 +1,527 @@
+--- a/Makefile
++++ b/Makefile
+@@ -69,8 +89,8 @@
+ VERB=
+ endif
+
+-SRCS = $(wildcard minisat/core/*.cc) $(wildcard minisat/simp/*.cc) $(wildcard minisat/utils/*.cc)
+-HDRS = $(wildcard minisat/mtl/*.h) $(wildcard minisat/core/*.h) $(wildcard minisat/simp/*.h) $(wildcard minisat/utils/*.h)
++SRCS = $(wildcard minisat/core/*.cc) $(wildcard minisat/simp/*.cc) $(wildcard minisat/utils/*.cc) $(wildcard minisat/proof/*.cc)
++HDRS = $(wildcard minisat/mtl/*.h) $(wildcard minisat/core/*.h) $(wildcard minisat/simp/*.h) $(wildcard minisat/utils/*.h) $(wildcard minisat/proof/*.h)
+ OBJS = $(filter-out %Main.o, $(SRCS:.cc=.o))
+
+ r: $(BUILD_DIR)/release/bin/$(MINISAT)
+@@ -89,7 +109,7 @@
+ lsh: $(BUILD_DIR)/dynamic/lib/$(MINISAT_DLIB).$(SOMAJOR).$(SOMINOR)$(SORELEASE)
+
+ ## Build-type Compile-flags:
+-$(BUILD_DIR)/release/%.o: MINISAT_CXXFLAGS +=$(MINISAT_REL) $(MINISAT_RELSYM)
++$(BUILD_DIR)/release/%.o: MINISAT_CXXFLAGS +=$(MINISAT_REL) $(MINISAT_RELSYM) $(MINISAT_FPIC)
+ $(BUILD_DIR)/debug/%.o: MINISAT_CXXFLAGS +=$(MINISAT_DEB) -g
+ $(BUILD_DIR)/profile/%.o: MINISAT_CXXFLAGS +=$(MINISAT_PRF) -pg
+ $(BUILD_DIR)/dynamic/%.o: MINISAT_CXXFLAGS +=$(MINISAT_REL) $(MINISAT_FPIC)
+@@ -195,7 +215,7 @@
+ $(INSTALL) -d $(DESTDIR)$(bindir)
+ $(INSTALL) -m 755 $(BUILD_DIR)/dynamic/bin/$(MINISAT) $(DESTDIR)$(bindir)
+
+-clean:
++origclean:
+ rm -f $(foreach t, release debug profile dynamic, $(foreach o, $(SRCS:.cc=.o), $(BUILD_DIR)/$t/$o)) \
+ $(foreach t, release debug profile dynamic, $(foreach d, $(SRCS:.cc=.d), $(BUILD_DIR)/$t/$d)) \
+ $(foreach t, release debug profile dynamic, $(BUILD_DIR)/$t/bin/$(MINISAT_CORE) $(BUILD_DIR)/$t/bin/$(MINISAT)) \
+@@ -203,6 +223,7 @@
+ $(BUILD_DIR)/dynamic/lib/$(MINISAT_DLIB).$(SOMAJOR).$(SOMINOR)$(SORELEASE)\
+ $(BUILD_DIR)/dynamic/lib/$(MINISAT_DLIB).$(SOMAJOR)\
+ $(BUILD_DIR)/dynamic/lib/$(MINISAT_DLIB)
++ rm -f $(NUSMV_LIBNAME)
+
+ distclean: clean
+ rm -f config.mk
+--- a/minisat/core/Solver.cc
++++ b/minisat/core/Solver.cc
+@@ -101,7 +101,16 @@
+ , conflict_budget (-1)
+ , propagation_budget (-1)
+ , asynch_interrupt (false)
+-{}
++{
++ // NuSMV: MOD BEGIN
++ /* Disables "progress saving" which relies on last polarity
++ assigned to a var when branching. Polarity for us is forced to
++ be false. See http://reasoning.cs.ucla.edu/fetch.php?id=69&type=pdf
++ */
++ phase_saving = 0;
++ default_polarity = l_Undef;
++ // NuSMV: MOD END
++}
+
+
+ Solver::~Solver()
+@@ -250,8 +259,19 @@
+ {
+ Var next = var_Undef;
+
++ // NuSMV: PREF MOD
++ // Selection from preferred list
++ for (int i = 0; i < preferred.size(); i++) {
++ if (value(preferred[i]) == l_Undef) {
++ next = preferred[i];
++ break;
++ }
++ }
++ // NuSMV: PREF MOD END
++
+ // Random decision:
+- if (drand(random_seed) < random_var_freq && !order_heap.empty()){
++ if (next == var_Undef && // NuSMV: PREF MOD
++ drand(random_seed) < random_var_freq && !order_heap.empty()){
+ next = order_heap[irand(random_seed,order_heap.size())];
+ if (value(next) == l_Undef && decision[next])
+ rnd_decisions++; }
+@@ -269,6 +289,8 @@
+ return lit_Undef;
+ else if (user_pol[next] != l_Undef)
+ return mkLit(next, user_pol[next] == l_True);
++ else if (default_polarity != l_Undef) // NuSMV
++ return mkLit(next, default_polarity == l_True);
+ else if (rnd_pol)
+ return mkLit(next, drand(random_seed) < 0.5);
+ else
+@@ -620,6 +642,19 @@
+ }
+
+
++// NuSMV: PREF MOD
++void Solver::addPreferred(Var v)
++{
++ preferred.push(v);
++}
++
++void Solver::clearPreferred()
++{
++ preferred.clear(0);
++}
++// NuSMV: PREF MOD END
++
++
+ void Solver::rebuildOrderHeap()
+ {
+ vec<Var> vs;
+--- a/minisat/core/Solver.h
++++ b/minisat/core/Solver.h
+@@ -90,6 +90,19 @@
+ void setPolarity (Var v, lbool b); // Declare which polarity the decision heuristic should use for a variable. Requires mode 'polarity_user'.
+ void setDecisionVar (Var v, bool b); // Declare if a variable should be eligible for selection in the decision heuristic.
+
++ // NuSMV: PREF MOD
++ /*
++ * Add a variable at the end of the list of preferred variables
++ * Does not remove the variable from the standard ordering.
++ */
++ void addPreferred(Var v);
++
++ /*
++ * Clear vector of preferred variables.
++ */
++ void clearPreferred();
++ // NuSMV: PREF MOD END
++
+ // Read state:
+ //
+ lbool value (Var x) const; // The current value of a variable.
+@@ -134,6 +147,8 @@
+ int ccmin_mode; // Controls conflict clause minimization (0=none, 1=basic, 2=deep).
+ int phase_saving; // Controls the level of phase saving (0=none, 1=limited, 2=full).
+ bool rnd_pol; // Use random polarities for branching heuristics.
++ lbool default_polarity; // NuSMV: default polarity for vars
++
+ bool rnd_init_act; // Initialize variable activities with a small random value.
+ double garbage_frac; // The fraction of wasted memory allowed before a garbage collection is triggered.
+ int min_learnts_lim; // Minimum number to set the learnts limit to.
+@@ -215,6 +230,10 @@
+ Var next_var; // Next variable to be created.
+ ClauseAllocator ca;
+
++ // NuSMV: PREF MOD
++ vec<Var> preferred;
++ // NuSMV: PREF MOD END
++
+ vec<Var> released_vars;
+ vec<Var> free_vars;
+
+--- a/minisat/core/SolverTypes.h
++++ b/minisat/core/SolverTypes.h
+@@ -52,7 +52,7 @@
+ int x;
+
+ // Use this as a constructor:
+- friend Lit mkLit(Var var, bool sign = false);
++ friend Lit mkLit(Var var, bool sign);
+
+ bool operator == (Lit p) const { return x == p.x; }
+ bool operator != (Lit p) const { return x != p.x; }
+@@ -61,6 +61,7 @@
+
+
+ inline Lit mkLit (Var var, bool sign) { Lit p; p.x = var + var + (int)sign; return p; }
++inline Lit mkLit (Var var) { return mkLit(var, false); }
+ inline Lit operator ~(Lit p) { Lit q; q.x = p.x ^ 1; return q; }
+ inline Lit operator ^(Lit p, bool b) { Lit q; q.x = p.x ^ (unsigned int)b; return q; }
+ inline bool sign (Lit p) { return p.x & 1; }
+@@ -120,6 +121,7 @@
+ inline int toInt (lbool l) { return l.value; }
+ inline lbool toLbool(int v) { return lbool((uint8_t)v); }
+
++#define MINISAT_CONSTANTS_AS_MACROS
+ #if defined(MINISAT_CONSTANTS_AS_MACROS)
+ #define l_True (lbool((uint8_t)0)) // gcc does not do constant propagation if these are real constants.
+ #define l_False (lbool((uint8_t)1))
+--- a/minisat/simp/Solver_C.cc
++++ b/minisat/simp/Solver_C.cc
+@@ -0,0 +1,246 @@
++
++/**************************************************************************************************
++
++Solver_C.C
++
++C-wrapper for Solver.C
++
++ This file is part of NuSMV version 2.
++ Copyright (C) 2007 by FBK-irst.
++ Author: Roberto Cavada <cavada@fbk.eu>
++
++ NuSMV version 2 is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ NuSMV version 2 is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
++
++ For more information on NuSMV see <http://nusmv.fbk.eu>
++ or email to <nusmv-users@fbk.eu>.
++ Please report bugs to <nusmv-users@fbk.eu>.
++
++ To contact the NuSMV development board, email to <nusmv@fbk.eu>. ]
++
++**************************************************************************************************/
++
++
++#include "SimpSolver.h"
++extern "C" {
++#include "Solver_C.h"
++}
++
++namespace {
++using Minisat::lbool;
++} // namespace
++
++extern "C" MiniSat_ptr MiniSat_Create()
++{
++ Minisat::SimpSolver *s = new Minisat::SimpSolver();
++ s->default_polarity = l_True;
++ return (MiniSat_ptr)s;
++}
++
++extern "C" void MiniSat_Delete(MiniSat_ptr ms)
++{
++ delete (Minisat::SimpSolver *)ms;
++}
++
++extern "C" int MiniSat_Nof_Variables(MiniSat_ptr ms)
++{
++ return ((Minisat::SimpSolver *)ms)->nVars();
++}
++
++extern "C" int MiniSat_Nof_Clauses(MiniSat_ptr ms)
++{
++ return ((Minisat::SimpSolver *)ms)->nClauses();
++}
++
++/* variables are in the range 1...N */
++extern "C" int MiniSat_New_Variable(MiniSat_ptr ms)
++{
++ /* Actually, minisat used variable range 0 .. N-1,
++ so in all function below there is a convertion between
++ input variable (1..N) and internal variables (0..N-1)
++ */
++ Minisat::Var var = ((Minisat::SimpSolver *)ms)->newVar();
++ ((Minisat::SimpSolver *)ms)->setFrozen(var, true);
++ return var+1;
++}
++
++
++/*
++ * Here clauses are in dimacs form, variable indexing is 1...N
++ */
++extern "C" int MiniSat_Add_Clause(MiniSat_ptr ms,
++ int *clause_lits, int num_lits)
++{
++ int i;
++ Minisat::vec<Minisat::Lit> cl;
++ for(i = 0; i < num_lits; ++i) {
++ const int lit = clause_lits[i];
++ assert(abs(lit) > 0);
++ assert(abs(lit) <= MiniSat_Nof_Variables((Minisat::SimpSolver*)ms));
++ int var = abs(lit) - 1;
++ cl.push((lit > 0) ? Minisat::mkLit(var) : ~ Minisat::mkLit(var));
++ }
++ ((Minisat::SimpSolver *)ms)->addClause(cl);
++
++ if(((Minisat::SimpSolver *)ms)->okay()) return 1;
++ return 0;
++}
++
++extern "C" int MiniSat_Solve(MiniSat_ptr ms)
++{
++ bool ret = ((Minisat::SimpSolver *)ms)->solve();
++ if(ret) return 1;
++ return 0;
++}
++
++/*
++ * Here the assumption is in "dimacs form", variable indexing is 1...N
++ */
++extern "C" int MiniSat_Solve_Assume(MiniSat_ptr ms,
++ int nof_assumed_lits,
++ int *assumed_lits)
++{
++ int i;
++ Minisat::vec<Minisat::Lit> cl;
++ assert(((Minisat::SimpSolver*)0) != ((Minisat::SimpSolver*)ms));
++ Minisat::SimpSolver& solver = *((Minisat::SimpSolver*)ms);
++
++ solver.simplify();
++ if(solver.okay() == false) return 0;
++
++ assert(nof_assumed_lits >= 0);
++ for(i = 0; i < nof_assumed_lits; ++i) {
++ const int lit = assumed_lits[i];
++ assert(abs(lit) > 0);
++ assert(abs(lit) <= MiniSat_Nof_Variables((Minisat::SimpSolver*)ms));
++ int var = abs(lit) - 1;
++ cl.push((lit > 0) ? Minisat::mkLit(var) : ~Minisat::mkLit(var));
++ }
++
++ if (solver.solve(cl)) return 1;
++ return 0;
++}
++
++extern "C" int MiniSat_simplifyDB(MiniSat_ptr ms)
++{
++ ((Minisat::SimpSolver *)ms)->simplify();
++ if(((Minisat::SimpSolver *)ms)->okay()) return 1;
++ return 0;
++}
++
++/*
++ * Here variables are numbered 1...N
++ */
++extern "C" int MiniSat_Get_Value(MiniSat_ptr ms, int var_num)
++{
++ assert(var_num > 0);
++ if(var_num > MiniSat_Nof_Variables(ms)) return -1;
++ /* minisat assigns all variables. just check */
++ assert(((Minisat::SimpSolver *)ms)->model[var_num-1] != l_Undef);
++
++ if(((Minisat::SimpSolver *)ms)->model[var_num-1] == l_True) return 1;
++ return 0;
++}
++
++extern "C" int MiniSat_Get_Nof_Conflict_Lits(MiniSat_ptr ms)
++{
++ assert(((Minisat::SimpSolver*)0) != ((Minisat::SimpSolver*)ms));
++ Minisat::SimpSolver& solver = *((Minisat::SimpSolver*)ms);
++
++ return solver.conflict.size();
++}
++
++extern "C" void MiniSat_Get_Conflict_Lits(MiniSat_ptr ms, int* conflict_lits)
++{
++ assert(((Minisat::SimpSolver*)0) != ((Minisat::SimpSolver*)ms));
++ Minisat::SimpSolver& solver = *((Minisat::SimpSolver*)ms);
++
++ Minisat::LSet& cf = solver.conflict;
++
++ for (int i = 0; i < cf.size(); ++i) {
++ int v = Minisat::var(~cf[i]);
++ int s = Minisat::sign(~cf[i]);
++ assert(v != Minisat::var_Undef);
++ conflict_lits[i] = (s == 0) ? (v+1) : -(v+1);
++ }
++}
++
++/** mode can be polarity_user, polarity_rnd */
++extern "C" void MiniSat_Set_Polarity_Mode(MiniSat_ptr ms, int mode)
++{
++ assert(((Minisat::SimpSolver*)0) != ((Minisat::SimpSolver*)ms));
++ assert(__polarity_unsupported != mode);
++ Minisat::SimpSolver& solver = *((Minisat::SimpSolver*)ms);
++ if (polarity_rnd == mode) {
++ solver.rnd_pol = true;
++ solver.default_polarity = l_Undef;
++ }
++ else {
++ // assert(polarity_user == mode);
++ solver.rnd_pol = false;
++ switch (mode) {
++ case polarity_false:
++ solver.default_polarity = l_True;
++ break;
++ case polarity_true:
++ solver.default_polarity = l_False;
++ break;
++ default: // polarity_user
++ solver.default_polarity = l_Undef;
++ break;
++ }
++ }
++}
++
++extern "C" int MiniSat_Get_Polarity_Mode(MiniSat_ptr ms)
++{
++ assert(((Minisat::SimpSolver*)0) != ((Minisat::SimpSolver*)ms));
++ Minisat::SimpSolver& solver = *((Minisat::SimpSolver*)ms);
++ //return solver.rnd_pol ? polarity_rnd : polarity_user;
++ if (solver.rnd_pol) {
++ return polarity_rnd;
++ } else if (solver.default_polarity == l_True) {
++ return polarity_false;
++ } else if (solver.default_polarity == l_False) {
++ return polarity_true;
++ } else {
++ return polarity_user;
++ }
++}
++
++extern "C" void MiniSat_Set_Random_Seed(MiniSat_ptr ms, double seed)
++{
++ assert(((Minisat::SimpSolver*)0) != ((Minisat::SimpSolver*)ms));
++ Minisat::SimpSolver& solver = *((Minisat::SimpSolver*)ms);
++ solver.random_seed = seed;
++}
++
++
++// NuSMV: PREF MOD
++/* variables are in the range 1...N */
++extern "C" void MiniSat_Set_Preferred_Variable(MiniSat_ptr ms, int x)
++{
++ /* Actually, minisat used variable range 0 .. N-1,
++ so in all function below there is a convertion between
++ input variable (1..N) and internal variables (0..N-1)
++ */
++ ((Minisat::SimpSolver *)ms)->addPreferred((Minisat::Var) x);
++}
++
++extern "C" void MiniSat_Clear_Preferred_Variables(MiniSat_ptr ms)
++{
++
++ ((Minisat::SimpSolver *)ms)->clearPreferred();
++}
++// NuSMV: PREF MOD END
+--- a/minisat/simp/Solver_C.h
++++ b/minisat/simp/Solver_C.h
+@@ -0,0 +1,72 @@
++/**************************************************************************************************
++
++Solver_C.h
++
++C-wrapper for Solver.h
++
++ This file is part of NuSMV version 2.
++ Copyright (C) 2007 by FBK-irst.
++ Author: Roberto Cavada <cavada@fbk.eu>
++
++ NuSMV version 2 is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ NuSMV version 2 is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with this library; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
++
++ For more information on NuSMV see <http://nusmv.fbk.eu>
++ or email to <nusmv-users@fbk.eu>.
++ Please report bugs to <nusmv-users@fbk.eu>.
++
++ To contact the NuSMV development board, email to <nusmv@fbk.eu>. ]
++
++**************************************************************************************************/
++
++#ifndef SOLVER_C_h
++#define SOLVER_C_h
++
++//=================================================================================================
++// Solver -- the main class:
++
++#define MiniSat_ptr void *
++
++enum {
++ __polarity_unsupported = -1,
++ polarity_true = 0,
++ polarity_false = 1,
++ polarity_user = 2,
++ polarity_rnd = 3,
++};
++
++MiniSat_ptr MiniSat_Create();
++void MiniSat_Delete(MiniSat_ptr);
++int MiniSat_Nof_Variables(MiniSat_ptr);
++int MiniSat_Nof_Clauses(MiniSat_ptr);
++int MiniSat_New_Variable(MiniSat_ptr);
++int MiniSat_Add_Clause(MiniSat_ptr, int *clause_lits, int num_lits);
++int MiniSat_Solve(MiniSat_ptr);
++int MiniSat_Solve_Assume(MiniSat_ptr, int nof_assumed_lits, int *assumed_lits);
++int MiniSat_simplifyDB(MiniSat_ptr);
++int MiniSat_Get_Value(MiniSat_ptr, int var_num);
++int MiniSat_Get_Nof_Conflict_Lits(MiniSat_ptr ms);
++void MiniSat_Get_Conflict_Lits(MiniSat_ptr ms, int* conflict_lits);
++
++void MiniSat_Set_Polarity_Mode(MiniSat_ptr ms, int mode);
++int MiniSat_Get_Polarity_Mode(MiniSat_ptr ms);
++void MiniSat_Set_Random_Seed(MiniSat_ptr ms, double seed);
++
++// NuSMV: PREF MOD
++void MiniSat_Set_Preferred_Variable(MiniSat_ptr, int);
++void MiniSat_Clear_Preferred_Variables(MiniSat_ptr);
++// NuSMV: PREF MOD END
++
++//=================================================================================================
++#endif
+--- a/minisat/utils/System.cc
++++ b/minisat/utils/System.cc
+@@ -77,7 +77,7 @@
+ struct rusage ru;
+ getrusage(RUSAGE_SELF, &ru);
+ return (double)ru.ru_maxrss / 1024; }
+-double Minisat::memUsedPeak() { return memUsed(); }
++double Minisat::memUsedPeak(bool strictlyPeak) { return memUsed(); }
+
+
+ #elif defined(__APPLE__)
+@@ -87,11 +87,11 @@
+ malloc_statistics_t t;
+ malloc_zone_statistics(NULL, &t);
+ return (double)t.max_size_in_use / (1024*1024); }
+-double Minisat::memUsedPeak() { return memUsed(); }
++double Minisat::memUsedPeak(bool strictlyPeak) { return memUsed(); }
+
+ #else
+ double Minisat::memUsed() { return 0; }
+-double Minisat::memUsedPeak() { return 0; }
++double Minisat::memUsedPeak(bool strictlyPeak) { return 0; }
+ #endif
+
+
diff --git a/sci-mathematics/minisat/metadata.xml b/sci-mathematics/minisat/metadata.xml
new file mode 100644
index 000000000000..1d99050d0a59
--- /dev/null
+++ b/sci-mathematics/minisat/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <use>
+ <flag name="extended-solver">Build extended version of SAT solver with
+ additional features.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">niklasso/minisat</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/minisat/minisat-2.2.0-r4.ebuild b/sci-mathematics/minisat/minisat-2.2.0-r4.ebuild
new file mode 100644
index 000000000000..2bbc706d240a
--- /dev/null
+++ b/sci-mathematics/minisat/minisat-2.2.0-r4.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Small yet efficient SAT solver with reference paper"
+HOMEPAGE="http://minisat.se/Main.html"
+SRC_URI="http://minisat.se/downloads/${P}.tar.gz
+ doc? ( http://minisat.se/downloads/MiniSat.pdf )"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+LICENSE="MIT"
+
+IUSE="debug doc extended-solver"
+
+DEPEND="sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+DOCS=( README doc/ReleaseNotes-2.2.0.txt )
+PATCHES=( "${FILESDIR}"/${P}-header_fix.patch )
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ default
+ # Remove makefile silencing
+ sed -i -e 's:@\(\$\|ln\|rm\|for\):\1:g' mtl/template.mk || die
+}
+
+src_configure() {
+ myconf=$(usex debug d r)
+ myext=$(usex debug debug release)
+ mydir=$(usex extended-solver simp core)
+
+ tc-export CXX
+}
+
+src_compile() {
+ export MROOT="$S"
+ emake -C $mydir $myconf
+ LIB="${PN}" emake -C $mydir lib$myconf
+}
+
+src_install() {
+ insinto /usr/include/${PN}2/mtl
+ doins mtl/*.h
+
+ insinto /usr/include/${PN}2/core
+ doins core/Solver*.h
+
+ insinto /usr/include/${PN}2/simp
+ doins simp/Simp*.h
+
+ insinto /usr/include/${PN}2/utils
+ doins utils/*.h
+
+ newbin ${mydir}/${PN}_${myext} ${PN}
+ newlib.a ${mydir}/lib${PN}_${myext}.a lib${PN}.a
+
+ use doc && DOCS+=( "${DISTDIR}"/MiniSat.pdf )
+ einstalldocs
+}
diff --git a/sci-mathematics/minisat/minisat-2.2.0_p20130925.ebuild b/sci-mathematics/minisat/minisat-2.2.0_p20130925.ebuild
new file mode 100644
index 000000000000..308bc18e8afd
--- /dev/null
+++ b/sci-mathematics/minisat/minisat-2.2.0_p20130925.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs vcs-snapshot
+
+DESCRIPTION="Small yet efficient SAT solver with reference paper"
+HOMEPAGE="http://minisat.se/Main.html"
+COMMIT=37dc6c67e2af26379d88ce349eb9c4c6160e8543
+SRC_URI="https://github.com/niklasso/minisat/archive/${COMMIT}.tar.gz -> ${P}.tar.gz
+ doc? ( http://minisat.se/downloads/MiniSat.pdf )"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+LICENSE="MIT"
+
+IUSE="debug doc"
+
+DEPEND="sys-libs/zlib"
+RDEPEND="${DEPEND}"
+DOCS=( README doc/ReleaseNotes-${PV%_*}.txt )
+PATCHES=( "${FILESDIR}"/${P}-nusmv.patch )
+
+src_prepare() {
+ default
+ # Remove makefile silencing and
+ # Remove static linking by default
+ sed -i -e "s/VERB=@/VERB=/" \
+ -e "s/--static //g" \
+ Makefile || die
+
+ sed -i -e "s:\$(exec_prefix)/lib:\$(exec_prefix)/$(get_libdir):" \
+ Makefile || die
+
+ # Fix headers ( #include "minisat/..." -> #include <...> )
+ while IFS="" read -d $'\0' -r file; do
+ einfo Correcting header "$file"
+ sed -i -e 's:#include "minisat/\([^"]*\)":#include <\1>:g' "${file}" || die
+ done < <(find minisat -name "*.h" -print0)
+}
+
+src_configure() {
+ local minisat_cflags="${CFLAGS} -D NDEBUG -I${S}/minisat"
+ emake config prefix="${EPREFIX}"/usr MINISAT_RELSYM="" MINISAT_REL="${minisat_cflags}" MINISAT_PRF="${minisat_cflags}" MINISAT_DEB="${CFLAGS} -D DEBUG -I${S}/minisat"
+}
+
+src_compile() {
+ emake all $(usex debug d "")
+}
+
+src_install() {
+ use doc && DOCS+=( "${DISTDIR}"/MiniSat.pdf )
+ default
+
+ dosym libminisat.a /usr/$(get_libdir)/libMiniSat.a
+}
diff --git a/sci-mathematics/mlpy/Manifest b/sci-mathematics/mlpy/Manifest
new file mode 100644
index 000000000000..3cdb494ddc60
--- /dev/null
+++ b/sci-mathematics/mlpy/Manifest
@@ -0,0 +1,5 @@
+DIST mlpy-3.5.0.tar.gz 1961206 SHA256 344fa75fbf9f76af72f6a346d5309613defc4d244bac13c218e509a51d68bf6a SHA512 b6b3cf6e1d47fe58d68da81752ce9324e78a97c9fc341c93db7b2ea0c5d1730fae9535b69671fda13cb012ab0173951768c1601f2b4ad678a6065c018b34eb0f WHIRLPOOL 531cf00f31e8abb72d4d882aa41379d1214f17f04c028922f084756059d471c3e0ddead82d089262e2855d843e8e8e96233bc06937870e6f1f589906889a756f
+EBUILD mlpy-3.5.0.ebuild 760 SHA256 cbea220884a5beaf1eda85db31bc31ea9ace27f001de6b21d97c47abad36363e SHA512 7c64b4d3e899a1fae30c71a14968d7593584d78b0d3241b3a58aaff1b2ec280d998c1600e6ab0e2a7bf95d2915215a2e7028f46cbfd1a1393975ea17f15db057 WHIRLPOOL 80a641d5280b5add8703f6cfc9a945b8ef06408bb0568b8e38621e65c7bfb1101cdc090afa62eb33ca1d563f1a156c97660a7f10a2931d7bb86fa4dc9dd93698
+MISC ChangeLog 2705 SHA256 092ce2a9a15a41cdff480febb6f193d752a2b8a61042cfaab237bdb1036e6ae3 SHA512 7c0f24bca18b59e41f88b7cc2ed54810f49c7754f6700fdd501f9782511c5564c033bc87776b01b8717d1e7c783187f009033698aaa9ebada069ef024426f1af WHIRLPOOL fb086ffb5f62ff2bab4390c1bec1b53295c04d4e7175fcc5fb7b80141a3076c7d9bd906919933b762a5c257c934af6cd7d054b130eb2f03f843531c2eaa5462f
+MISC ChangeLog-2015 834 SHA256 74db66bfd9f0b89facd9736cd7c06c7641441f3b2c7f0779dea5346129673866 SHA512 5df885df4867b790ab2731a79ad5fdf9a3ba5cd5215e6ee8980cb36d5ce3ed14702cb926d5411b3e079f23aeff6493cd07362b3e538f2269e5273c44c312f4ea WHIRLPOOL c1236ed8a7634f9dbe5453e5271782e23d99cf3418db5f7e90e127d0c7a5981356024f7a95578f0da020b5163fd15efeb03635e256259fb2fad65ff136cc3333
+MISC metadata.xml 636 SHA256 e1263527ab9639d5fb135a6101026fca6ed008a4bf300b949280ed258708e923 SHA512 19452defd96c62d603f0f99cc2fb1359159c91ed7489e2f7d0e7b4d4e290dc9f74d3124b1cf75fa631bd0536df5fb39023efa534c3f6ea4de3e340363d7d8bfa WHIRLPOOL 11f2a615c392bc6feca1babca18cf9e1134edd9a591a7597cd3508b0910ea7197cf61354edb2fd7f151891c805b4fe4c5ed97007239b66af584679fc95474393
diff --git a/sci-mathematics/mlpy/metadata.xml b/sci-mathematics/mlpy/metadata.xml
new file mode 100644
index 000000000000..a878c2ab46ae
--- /dev/null
+++ b/sci-mathematics/mlpy/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ mlpy provides a wide range of state-of-the-art machine learning
+ methods for supervised and unsupervised problems and it is aimed at
+ finding a reasonable compromise among modularity, maintainability,
+ reproducibility, usability and efficiency.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">mlpy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/mlpy/mlpy-3.5.0.ebuild b/sci-mathematics/mlpy/mlpy-3.5.0.ebuild
new file mode 100644
index 000000000000..c25423df83a5
--- /dev/null
+++ b/sci-mathematics/mlpy/mlpy-3.5.0.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="High-performance Python library for predictive modeling"
+HOMEPAGE="https://mlpy.fbk.eu/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+RDEPEND="
+ >=sci-libs/gsl-1.11
+ >=dev-python/numpy-1.3[${PYTHON_USEDEP}]
+ >=sci-libs/scipy-0.7[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
+
+python_install_all() {
+ distutils-r1_python_install_all
+ if use doc; then
+ pushd docs 2>/dev/null || die
+ emake html
+ dohtml -r build/html/*
+ popd 2>/dev/null || die
+ fi
+}
diff --git a/sci-mathematics/msieve/Manifest b/sci-mathematics/msieve/Manifest
new file mode 100644
index 000000000000..6fa7fd4a7a24
--- /dev/null
+++ b/sci-mathematics/msieve/Manifest
@@ -0,0 +1,10 @@
+AUX fix-version.patch 499 SHA256 1c748921c35d34af3267020704a26feb14d3043ce58a9ff7855dbf989e8d213b SHA512 9ea8b52377cf11e6dc34860d3231dee364a8018d860a25ca25901fc00e948adb11ba767106df67e5769e6328fcb703638a14178666f53f9518c0e07b15d36767 WHIRLPOOL 916b1a0b4cfde68a440cdb57a2d411049eb44f9903df5b130da018893903dfa707243a42f9895b6555975a943ce6d48f4228dd94275d727190a3f76751d4c798
+AUX fix-version2.patch 560 SHA256 a3806f9159a0a760ac49872883631bae85fb137a357ee1d3ec9022ca76c10eb1 SHA512 c745b63461a76a20d32c3d022c120ed1ee201a05ed372f01381d71f4cc9601d92089acfc07bfe6930180740c4f4711b88b129d126065558d2cf6d7dd81bf78d8 WHIRLPOOL 26b2205eaf577233fc0b3f0faa7e943cfaefdc2badecdc06a016bf69c533322b600ffbaf6efe2ac02d133028f3b9adfbffdc309cde5370e23b3806d5ac094327
+AUX msieve-1.51-reduce-printf.patch 1598 SHA256 effe23eee2cc845fdf23237790f5cc2dc8f6c5a9141f25d9a52a9be54d00ef5e SHA512 abd539239b1c289265b523f748dc0838df89d532a21c27040b6bbd0a8c7ef10641fc24a06378d48c45fe2d0156f09de06d10412d1d0ec71583c02123fa6158c6 WHIRLPOOL 1e4b175880e3cc5fae4456733b8ae9d29d545d6f477430923ae550437c902015f8d903546d8a97dbe9263ce2b7be6b1180ec6d04816340a1e09e4c036da136bb
+AUX reduce-printf.patch 2105 SHA256 b576d46577c411b1ad814ab48e4fce595927b225e93e311789e6f2135a68a01e SHA512 c0ee9ddbbb41a25a48ec4b6cc80cf6a8afee35a723aee74eb7d7bfa01b545eff1713eaf2077ace7d2a9aca97f00aa42bc36e6d23d7d229f339de1f152316af98 WHIRLPOOL 75a55e0ff6da1e99c96bb2395ce75fbfac1aad1c3bfaf4bb924c957bc821141afd4a805e79bbd4fb47ebeae101c488a2291ca900198fb25cc8f94badfc1eb139
+DIST msieve151.tar.gz 623885 SHA256 26bc1d0d89325986aacfbafb687451f3de5da1bd388e087ec3ac24813e9dc948 SHA512 79c03b5d669de7f05e27fc59fa999f416f513e41cba822376b862c31439fc66cf8749034c1f8f967f745955a5271a484b23e950ffede23d3fa2737ae26dbb0d4 WHIRLPOOL 237f3f1e872b05890e008f8261e0ba5c7621ef7bfa3e78305c17076496ad87d281497e4cf9ee79d2b275a65e86f7c84fa3897697ef823c2e1ffe9725d3b08b9b
+EBUILD msieve-1.51.ebuild 1517 SHA256 5c4fbefc5ca2c3a9bba6129e3429f2116b500861a350184751b2fbaeb8218a7d SHA512 a24368225d685a913b0231d4ca8342a3a4e551c7ee37f16fbe21ce2b957ed4fde235df48244f0723d7d37b5b4fab204b27174666dafcd595baf759c70c33d56f WHIRLPOOL e675eba641aa81d52ac35bdae4c31fe7086d7950899ff2afa8864d57f2324f1ff6a9168995d03f35e2dd500a08462e8681b5ae5316e892540ee16e1e8ec58a64
+EBUILD msieve-9999.ebuild 1390 SHA256 fffa201a3ef3809a88a9e2f5c42064ea27ee42c920385df7b63e84f69ff87966 SHA512 07c5ef126bd37d859d2ed826ff87ce3c7b82bb02f11a23165fddcea791e025ed671231e919b13b8a137ec0fac06270105927c30698c2ef6d56f0666dfe2a386d WHIRLPOOL 835deee21e9c49e59636564f6de9964de92a2d1663a6ef578ae034a6f893d27d100a7d16720c85e3b6ce8006c8a6668569c36c0001be0bfc4747917a87ca9e3f
+MISC ChangeLog 3225 SHA256 d7be1c115c0d55c8b55a1ec1ad3d881945bda554e81899c4fc61aa0177ae4ae1 SHA512 e3f280d7eb7d7e5eded9e4657b62f9e8a5aa17cff64c37fcbfa9c744be1792591b7c442e0d823edbc6d162267182159535c781e622b64d5e357275701b185ecc WHIRLPOOL 4b6b84cb61886c608d853b44e0ccfba8bc6eeb76eddcf33ec2810362f0633e4ba8b74eaab9a72f2a7cd1e7baa710f16157d3560266a7fff401c0bc474873315d
+MISC ChangeLog-2015 2259 SHA256 44dab30f950e139b1aea01e2ba36ce298068ea934a2e83d8e4eafeadf4e702bf SHA512 2b413bf0cbc4a0cf01061a10e99810503fb24f50b792347c718f6e922ba5be84d2d0afd9a2233da4cc8a404a907f9fba2cdc2ec6d9c644cf04361b80840464b4 WHIRLPOOL 643c92858b82aff18ca22f9458dfa8b6894269f6b87baebfb530fadecefac7f3935dfd9ce7f9e9366152c80ef378dadba412718b51ee7e8d7263b1e3528cf5f9
+MISC metadata.xml 417 SHA256 b25ac06b8f7f015ac62f5f6fbbaf2c22678c979ba9627f05c8fbc2f8a6b63177 SHA512 a8c43840089c4516cd31bfd2a9fee4202bdb5a264cb28b22dcd7d17cd40669056cdc4a5c7a437b092bc71b1ec9c1bf6d1bc7f0f8f61858818749fad3e93eaf1d WHIRLPOOL 246ccf5ddd53953cb6a4956eb89a103e99d19770ed8c352f5046a8323ffb867c921eb80fce26f54b90436d0d0633cf8fb3911a7f741011362a1e36b5ac19ce48
diff --git a/sci-mathematics/msieve/files/fix-version.patch b/sci-mathematics/msieve/files/fix-version.patch
new file mode 100644
index 000000000000..748a7ae8c68c
--- /dev/null
+++ b/sci-mathematics/msieve/files/fix-version.patch
@@ -0,0 +1,15 @@
+--- common/driver.c 2011-05-02 09:10:50.000000000 +0800
++++ common/driver.c.new 2012-11-30 16:43:59.067925006 +0800
+@@ -191,10 +191,9 @@
+
+ logprintf(obj, "\n");
+ logprintf(obj, "\n");
+- logprintf(obj, "Msieve v. %d.%02d (SVN %s)\n",
++ logprintf(obj, "Msieve v. %d.%02d\n",
+ MSIEVE_MAJOR_VERSION,
+- MSIEVE_MINOR_VERSION,
+- MSIEVE_SVN_VERSION);
++ MSIEVE_MINOR_VERSION);
+ start_time = time(NULL);
+ if (obj->flags & MSIEVE_FLAG_LOG_TO_STDOUT) {
+ printf("%s", ctime(&start_time));
diff --git a/sci-mathematics/msieve/files/fix-version2.patch b/sci-mathematics/msieve/files/fix-version2.patch
new file mode 100644
index 000000000000..6e956897bdf0
--- /dev/null
+++ b/sci-mathematics/msieve/files/fix-version2.patch
@@ -0,0 +1,14 @@
+--- demo.c 2011-11-25 00:25:28.000000000 +0800
++++ demo.c.new 2012-11-30 16:46:50.417333847 +0800
+@@ -81,9 +81,8 @@
+ /*--------------------------------------------------------------------*/
+ void print_usage(char *progname) {
+
+- printf("\nMsieve v. %d.%02d (SVN %s)\n", MSIEVE_MAJOR_VERSION,
+- MSIEVE_MINOR_VERSION,
+- MSIEVE_SVN_VERSION);
++ printf("\nMsieve v. %d.%02d\n", MSIEVE_MAJOR_VERSION,
++ MSIEVE_MINOR_VERSION);
+
+ printf("\nusage: %s [options] [one_number]\n", progname);
+ printf("\nnumbers starting with '0' are treated as octal,\n"
diff --git a/sci-mathematics/msieve/files/msieve-1.51-reduce-printf.patch b/sci-mathematics/msieve/files/msieve-1.51-reduce-printf.patch
new file mode 100644
index 000000000000..39892716716a
--- /dev/null
+++ b/sci-mathematics/msieve/files/msieve-1.51-reduce-printf.patch
@@ -0,0 +1,44 @@
+diff -Naur msieve-1.50/common/minimize.c msieve-copy/common/minimize.c
+--- msieve-1.50/common/minimize.c 2011-07-04 23:32:33.000000000 +0800
++++ msieve-copy/common/minimize.c 2012-11-26 23:09:22.889240528 +0800
+@@ -210,7 +210,7 @@
+ }
+ }
+
+- printf(":"); // "too many line iterations\n");
++ //printf(":"); // "too many line iterations\n");
+ *min_out = x;
+ *status = 1;
+ return fx;
+diff -Naur msieve-1.50/gnfs/poly/stage2/optimize.c msieve-copy/gnfs/poly/stage2/optimize.c
+--- msieve-1.50/gnfs/poly/stage2/optimize.c 2011-10-15 23:03:39.000000000 +0800
++++ msieve-copy/gnfs/poly/stage2/optimize.c 2012-11-26 23:14:36.243232414 +0800
+@@ -430,9 +430,9 @@
+ #if 0
+ printf("norm %.7e skew %lf\n", *pol_norm, best[SKEWNESS]);
+ for (i = 0; i < 2; i++)
+- gmp_printf("%+Zd\n", c->gmp_lina[i]);
++ //gmp_printf("%+Zd\n", c->gmp_lina[i]);
+ for (i = 0; i <= deg; i++)
+- gmp_printf("%+Zd\n", c->gmp_a[i]);
++ //gmp_printf("%+Zd\n", c->gmp_a[i]);
+ #endif
+ }
+
+diff -Naur msieve-1.50/gnfs/poly/stage2/stage2.c msieve-copy/gnfs/poly/stage2/stage2.c
+--- msieve-1.50/gnfs/poly/stage2/stage2.c 2011-10-09 09:32:49.000000000 +0800
++++ msieve-copy/gnfs/poly/stage2/stage2.c 2012-11-26 23:14:30.894232552 +0800
+@@ -122,10 +122,10 @@
+ }
+
+ #if 0
+- gmp_printf("%+Zd\n", c->gmp_lina[0]);
+- gmp_printf("%+Zd\n", c->gmp_lina[1]);
++ //gmp_printf("%+Zd\n", c->gmp_lina[0]);
++ //gmp_printf("%+Zd\n", c->gmp_lina[1]);
+ for (i = 0; i <= degree; i++)
+- gmp_printf("%+Zd\n", c->gmp_a[i]);
++ //gmp_printf("%+Zd\n", c->gmp_a[i]);
+
+ printf("coeff ratio = %.5lf\n",
+ fabs(mpz_get_d(c->gmp_a[degree-2])) / coeff_bound);
diff --git a/sci-mathematics/msieve/files/reduce-printf.patch b/sci-mathematics/msieve/files/reduce-printf.patch
new file mode 100644
index 000000000000..dad1dc7db8f3
--- /dev/null
+++ b/sci-mathematics/msieve/files/reduce-printf.patch
@@ -0,0 +1,62 @@
+diff -Naur msieve-1.50/common/minimize.c msieve-copy/common/minimize.c
+--- msieve-1.50/common/minimize.c 2011-07-04 23:32:33.000000000 +0800
++++ msieve-copy/common/minimize.c 2012-11-26 23:09:22.889240528 +0800
+@@ -210,7 +210,7 @@
+ }
+ }
+
+- printf("too many line iterations\n");
++ //printf("too many line iterations\n");
+ *min_out = x;
+ *status = 1;
+ return fx;
+diff -Naur msieve-1.50/gnfs/poly/stage2/optimize.c msieve-copy/gnfs/poly/stage2/optimize.c
+--- msieve-1.50/gnfs/poly/stage2/optimize.c 2011-10-15 23:03:39.000000000 +0800
++++ msieve-copy/gnfs/poly/stage2/optimize.c 2012-11-26 23:14:36.243232414 +0800
+@@ -390,7 +390,7 @@
+ score = minimize(best, num_vars, tol, 40,
+ objective, &opt_data);
+
+- printf("i %u score %le\n", i, score);
++ //printf("i %u score %le\n", i, score);
+ for (j = 0; j <= rotate_dim; j++) {
+ double cj = floor(best[ROTATE0 + j] + 0.5);
+ mpz_set_d(c->gmp_help1, cj);
+@@ -422,7 +422,7 @@
+ tol = 1e-5;
+ score = ifs_rectangular(apoly.coeff, apoly.degree,
+ best[SKEWNESS]);
+- printf("transition score %le\n", score);
++ //printf("transition score %le\n", score);
+ }
+ }
+
+@@ -430,9 +430,9 @@
+ #if 0
+ printf("norm %.7e skew %lf\n", *pol_norm, best[SKEWNESS]);
+ for (i = 0; i < 2; i++)
+- gmp_printf("%+Zd\n", c->gmp_lina[i]);
++ //gmp_printf("%+Zd\n", c->gmp_lina[i]);
+ for (i = 0; i <= deg; i++)
+- gmp_printf("%+Zd\n", c->gmp_a[i]);
++ //gmp_printf("%+Zd\n", c->gmp_a[i]);
+ #endif
+ }
+
+diff -Naur msieve-1.50/gnfs/poly/stage2/stage2.c msieve-copy/gnfs/poly/stage2/stage2.c
+--- msieve-1.50/gnfs/poly/stage2/stage2.c 2011-10-09 09:32:49.000000000 +0800
++++ msieve-copy/gnfs/poly/stage2/stage2.c 2012-11-26 23:14:30.894232552 +0800
+@@ -122,10 +122,10 @@
+ }
+
+ #if 0
+- gmp_printf("%+Zd\n", c->gmp_lina[0]);
+- gmp_printf("%+Zd\n", c->gmp_lina[1]);
++ //gmp_printf("%+Zd\n", c->gmp_lina[0]);
++ //gmp_printf("%+Zd\n", c->gmp_lina[1]);
+ for (i = 0; i <= degree; i++)
+- gmp_printf("%+Zd\n", c->gmp_a[i]);
++ //gmp_printf("%+Zd\n", c->gmp_a[i]);
+
+ printf("coeff ratio = %.5lf\n",
+ fabs(mpz_get_d(c->gmp_a[degree-2])) / coeff_bound);
diff --git a/sci-mathematics/msieve/metadata.xml b/sci-mathematics/msieve/metadata.xml
new file mode 100644
index 000000000000..64f702132222
--- /dev/null
+++ b/sci-mathematics/msieve/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <use>
+ <flag name="ecm">Enable support for the GMP-ECM library</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">msieve</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/msieve/msieve-1.51.ebuild b/sci-mathematics/msieve/msieve-1.51.ebuild
new file mode 100644
index 000000000000..ffe3772b82d5
--- /dev/null
+++ b/sci-mathematics/msieve/msieve-1.51.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A C library implementing a suite of algorithms to factor large integers"
+HOMEPAGE="https://sourceforge.net/projects/msieve/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}/Msieve%20v${PV}/${PN}${PV/./}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="zlib +ecm mpi"
+
+# some linking troubles with gwnum
+DEPEND="
+ ecm? ( sci-mathematics/gmp-ecm[-gwnum] )
+ mpi? ( virtual/mpi )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # TODO: Integrate ggnfs properly
+ epatch \
+ "${FILESDIR}"/${P}-reduce-printf.patch \
+ "${FILESDIR}"/fix-version.patch \
+ "${FILESDIR}"/fix-version2.patch
+ sed -i -e 's/-march=k8//' Makefile || die
+ sed -i -e 's/CC =/#CC =/' Makefile || die
+ sed -i -e 's/CFLAGS =/CFLAGS +=/' Makefile || die
+ sed -i -e 's/LIBS += -lecm/LIBS += -lecm -lgomp/' Makefile || die
+}
+
+src_compile() {
+ use ecm && export "ECM=1"
+ use mpi && export "MPI=1"
+ use zlib && export "ZLIB=1"
+ emake \
+ CC=$(tc-getCC) \
+ AR=$(tc-getAR) \
+ OPT_FLAGS="${CFLAGS}" \
+ all
+}
+
+src_install() {
+ mkdir -p "${D}/usr/include/msieve"
+ mkdir -p "${D}/usr/lib/"
+ mkdir -p "${D}/usr/share/doc/${P}/"
+ cp include/* "${D}/usr/include/msieve" || die "Failed to install"
+ cp libmsieve.a "${D}/usr/lib/" || die "Failed to install"
+ dobin msieve || die "Failed to install"
+ cp Readme* "${D}/usr/share/doc/${P}/" || die "Failed to install"
+}
diff --git a/sci-mathematics/msieve/msieve-9999.ebuild b/sci-mathematics/msieve/msieve-9999.ebuild
new file mode 100644
index 000000000000..5da826bda06b
--- /dev/null
+++ b/sci-mathematics/msieve/msieve-9999.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils subversion toolchain-funcs
+
+DESCRIPTION="A C library implementing a suite of algorithms to factor large integers"
+HOMEPAGE="https://sourceforge.net/projects/msieve/"
+#SRC_URI="mirror://sourceforge/${PN}/${PN}/Msieve%20v${PV}/${PN}${PV/./}src.tar.gz"
+ESVN_REPO_URI="https://svn.code.sf.net/p/msieve/code/trunk"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS=""
+IUSE="zlib +ecm mpi"
+
+# some linking troubles with gwnum
+DEPEND="
+ ecm? ( sci-mathematics/gmp-ecm[-gwnum] )
+ mpi? ( virtual/mpi )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # TODO: Integrate ggnfs properly
+ sed -i -e 's/-march=k8//' Makefile || die
+ sed -i -e 's/CC =/#CC =/' Makefile || die
+ sed -i -e 's/CFLAGS =/CFLAGS +=/' Makefile || die
+}
+
+src_compile() {
+ use ecm && export "ECM=1"
+ use mpi && export "MPI=1"
+ use zlib && export "ZLIB=1"
+ emake \
+ CC=$(tc-getCC) \
+ AR=$(tc-getAR) \
+ OPT_FLAGS="${CFLAGS}" \
+ all
+}
+
+src_install() {
+ mkdir -p "${D}/usr/include/msieve"
+ mkdir -p "${D}/usr/lib/"
+ mkdir -p "${D}/usr/share/doc/${P}/"
+ cp include/* "${D}/usr/include/msieve" || die "Failed to install"
+ cp libmsieve.a "${D}/usr/lib/" || die "Failed to install"
+ dobin msieve || die "Failed to install"
+ cp Readme* "${D}/usr/share/doc/${P}/" || die "Failed to install"
+}
diff --git a/sci-mathematics/nauty/Manifest b/sci-mathematics/nauty/Manifest
new file mode 100644
index 000000000000..6ea5f7d8b4ff
--- /dev/null
+++ b/sci-mathematics/nauty/Manifest
@@ -0,0 +1,9 @@
+DIST nauty-popcnt.patch 56034 SHA256 0dc2e0374491dddf5757f0717d0ea3f949f85b540202385662f10c358b4a08e8 SHA512 4931440b6178cb668997539ac2991f0d04758b8750668d4477cb8a456640640c5bb71c2858e423a4ad812e3401151834366e04693bf9a5ecc5ccc211d2e4229c WHIRLPOOL 5ca13e3295922ccf34ef2e8563bc24e941c401d709ab7f84c6846bfb23440eca4b1c323734b2157fc54dcc859883bcf282140819a51ef7f3da8399913daa821d
+DIST nauty25r9.tar.gz 1007323 SHA256 602d0e2e5ab1bdc84ab69f75ebc065833501bd2875cb07b1bb4274e3dd632825 SHA512 79f9054f1d39406063f4cbab61002b27f260b93fd37d6346efdfcd113c59ebab54320e6e7b6cdf26c7eddc376e4ad558e2cd4e6071d418dce2a6918f3c8f7ca2 WHIRLPOOL 0dcce5a74ac5874c5a510cd0d302b5d73897ee3cfaa208945de464e057a4b0af2ba4e717e8d331c51d5065d45363a339e0cd746a0a8fda179ec616b1443e2f63
+DIST nauty26r7.tar.gz 1660659 SHA256 97b5648de17645895cbd56a9a0b3e23cf01f5332c476d013ea459f1a0363cdc6 SHA512 60a724264b43b48338c17240c3cf7156f408267f1b2df995ea7b5ab9fa48852cb11057e83178a364ca028d80dc9124ca9b38cdac34e150a995475140d07c8af6 WHIRLPOOL 16874b8f6874d64a1bff4d2b4f856cc9156dd182b75fe4a3e60754e4bbbd5484733242301ec9763c2c3948b081e1ba0a9271b06226da71f1fc97009c973f2b72
+DIST nauty_2.6r7+ds-1.debian.tar.xz 30328 SHA256 3197d57f3f1b9afe494c9bda07270d9d9aecd5ef213eada77cfaeadfc80c1969 SHA512 fadde6a767e43048980842415207613ffeaa38d021fbf6a3f26a4bbe6877a92ddf5950094de517edd0f924deeacc8dec1d6a7334123c2a87d15befcc3876bc63 WHIRLPOOL 8b17bd77af54b77f089dd495974df965cb6c163106b0686601433b6f264fc33e601454222b520ad0c9e267a28ac8b1b94be28347fd67cece315f98827628ddaa
+EBUILD nauty-2.5.9.ebuild 945 SHA256 93b46920be99fd49f2338ab43330d875383dfd36dfa869acd7b5a43acab55dc1 SHA512 4206a0203297ca7b5e71286b0db9a26bf9e335867ffccc3edcd85df09688cb7b15f6aa526b90a23760f23e019d251e3798bb1ef7ccc23c2a34db1deabb8aa422 WHIRLPOOL d0357ab6f39c41b1a082948e7099f2f1ae213dd5ceb7b64651378a44d8f61da0fd25ce1c5ba9a0520a9b6e5fde41ff852234951856c17d19baeef630fab4163e
+EBUILD nauty-2.6.7.ebuild 1447 SHA256 1c8b4bc1fccc5a7a7eecf1377a1f1741e93438b552008ed179f5268f7d3c587a SHA512 83d1041bf1696b4b19dc1f4afc74f24d3106ed265b58d0ad23990744da43f2178fcc9b68fcaf05942534bd2992c50a93923cc7290336008cfa2b8c496f82f946 WHIRLPOOL b17be3998ae0ef8cc293a9876a1b711050a7d9b2b7c55d4ede930175cd2a40afe30be58c12b0f732efe43c99badd8a24da43ea926968e6f259f89eae3e101d3e
+MISC ChangeLog 2598 SHA256 5fcb634217177d5fcc7d08b647b37ea6c41d9e1a797298d3a31c6fa2b334d190 SHA512 2997dfeab8fe8c593d70b72061d89dd24ae0eea6f8743f53dac28788e15686b746b836a8bd9b2de85fcb74901b76e4dd8eea610cca8083f314395a0de38b1a2c WHIRLPOOL 07a528ae7d0ae0c057c80e9b9f03c3d66f8ffe275b394d5fd6d52710d2ec4212b1568ad12f305f2909d5ad4455fb7a95eeec56361b0caa0bbd628c5d1138d4b9
+MISC ChangeLog-2015 1324 SHA256 a04a489d8ae75a7e9fd9f31b7361543dd0c023beb65996960c04e6192191301b SHA512 4ed7e45d5ebb1abb765d8d40867d0fc00a05b7b27be796bb70e8aeeb7502bbb9d9d1e82ee92abe1b95caa619e0fbcb9dcc3fdaeaa435986d4118fca34bb7d5e1 WHIRLPOOL 996bfcb23904debd5dd307fc8b20e886e93000dd4fb779fea9054cc589cf268a0f20060d69f363197f2e5f78592101d9f378997bad19088106fafdc12a994d46
+MISC metadata.xml 545 SHA256 a948e209f1d1083831477dbb35e333ca2419d116c48ee2c5791c9187175bea40 SHA512 19b48e8150e6776f4c51f80cc0b4d468cbb320a9468dfe298debe21177e13a2c9a41d7ef2a24b54c5e7986231402f72d7db19c6c8b075ae9a3f103c040dd9262 WHIRLPOOL a79ff412cae1098a821fe07283cdded79494fd107d29bd6754bc63ef6cb61bdba659c7b544bc91d38935fa30fdbd4faa619e1c720c047e7699d793f409b77ddc
diff --git a/sci-mathematics/nauty/metadata.xml b/sci-mathematics/nauty/metadata.xml
new file mode 100644
index 000000000000..de93a9455041
--- /dev/null
+++ b/sci-mathematics/nauty/metadata.xml
@@ -0,0 +1,14 @@
+<?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">
+nauty is a program for computing automorphism groups of graphs and digraphs. It can also produce a
+canonical labelling.
+
+nauty is written in a portable subset of C, and runs on a considerable number of different systems.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/nauty/nauty-2.5.9.ebuild b/sci-mathematics/nauty/nauty-2.5.9.ebuild
new file mode 100644
index 000000000000..2caee75851ce
--- /dev/null
+++ b/sci-mathematics/nauty/nauty-2.5.9.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit versionator
+
+MY_PV=$(replace_version_separator 2 'r')
+MY_PV=$(delete_version_separator 1 ${MY_PV})
+
+DESCRIPTION="Computing automorphism groups of graphs and digraphs"
+HOMEPAGE="http://pallini.di.uniroma1.it/"
+SRC_URI="http://cs.anu.edu.au/~bdm/${PN}/${PN}${MY_PV}.tar.gz"
+
+LICENSE="nauty"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE=""
+
+S="${WORKDIR}/${PN}${MY_PV}"
+
+src_prepare () {
+ sed \
+ -e "s/^LDFLAGS=.*/LDFLAGS=${LDFLAGS}/" \
+ -e 's:${CC} -o:${CC} ${LDFLAGS} -o:g' \
+ -e 's:${LDFLAGS}$::g' \
+ -i makefile.in || die
+}
+
+src_test () {
+ emake checks
+ ./runalltests
+}
+
+src_install () {
+ dobin addedgeg amtog biplabg catg complg copyg countg \
+ deledgeg directg dreadnaut dretog genbg geng genrang \
+ gentourng labelg listg multig newedgeg NRswitchg pickg \
+ planarg shortg showg
+ dodoc README formats.txt nug*.pdf
+}
diff --git a/sci-mathematics/nauty/nauty-2.6.7.ebuild b/sci-mathematics/nauty/nauty-2.6.7.ebuild
new file mode 100644
index 000000000000..2e01267a151a
--- /dev/null
+++ b/sci-mathematics/nauty/nauty-2.6.7.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools versionator
+
+MY_PV1=$(replace_version_separator 2 'r')
+MY_PV=$(delete_version_separator 1 ${MY_PV1})
+
+DESCRIPTION="Computing automorphism groups of graphs and digraphs"
+HOMEPAGE="http://pallini.di.uniroma1.it/"
+DEBIAN_PATCH_VERSION="1"
+SRC_URI="http://cs.anu.edu.au/~bdm/${PN}/${PN}${MY_PV}.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${MY_PV1}+ds-${DEBIAN_PATCH_VERSION}.debian.tar.xz
+ http://pkgs.fedoraproject.org/cgit/rpms/nauty.git/plain/nauty-popcnt.patch"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="test"
+
+DEPEND="dev-libs/gmp:0
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${MY_PV}"
+DOCS=( schreier.txt config.txt formats.txt changes24-26.txt )
+PATCHES=(
+ "${WORKDIR}"/debian/patches/upstream-lintian-spelling-error.patch
+ "${WORKDIR}"/debian/patches/upstream-fix-gt_numorbits.patch
+ "${WORKDIR}"/debian/patches/upstream-fix-include-extern.patch
+ "${WORKDIR}"/debian/patches/upstream-zlib-blisstog_c.patch
+ "${WORKDIR}"/debian/patches/upstream-C2help2man.patch
+ "${WORKDIR}"/debian/patches/upstream-autotoolization.patch
+ "${WORKDIR}"/debian/patches/system-preprocessing-examples.patch
+ "${DISTDIR}"/nauty-popcnt.patch
+)
+
+src_prepare() {
+ default
+ rm -f makefile
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-static --enable-runtime-popcnt --enable-tls
+}
diff --git a/sci-mathematics/nestedsums/Manifest b/sci-mathematics/nestedsums/Manifest
new file mode 100644
index 000000000000..fd2bfcfb4f1c
--- /dev/null
+++ b/sci-mathematics/nestedsums/Manifest
@@ -0,0 +1,5 @@
+DIST nestedsums-1.5.1.tar.gz 511814 SHA256 a68446ab86cc4e6cccda90ba9cd7180c8394639b89d2e2d4d9cfd1684e023545 SHA512 e68e6b58125c5049aebe8d3769b92b7af7c40ea1bcf2caac5091a4c79015c51793d0c78dae20e01d05bdaac9106d54c8a59f6b2157ea6d497cfd117008127aa2 WHIRLPOOL 465dd3e4fdfdb1fc636f7f118057338b668a09965a89497fdd2666961eb74bfb4d87cf66d6bc88aade541516d8001fd63b501b58a6ad59b71ae9f5d4eec2284f
+EBUILD nestedsums-1.5.1.ebuild 865 SHA256 7eca598fc4b1350433275d72e7cbbef4af4982ee6a0d152435dce4b826d1fa69 SHA512 b0de9f595f5f994574fc2daf5170b3c7b8d1bf73cf3bf7af0d346efa106a36f1db28154bd99fc87e3c887aaca068cf729b23c10221d7b6ff004a67b6205eb23a WHIRLPOOL 3b8385102e03fddec0b0bb50700814593579519a3564d92eff010186e0c6cc1b19d5a40b93afa1132212c32c02cf3c9da9fae6a49fd1f0b0b8c5c6013cd426f7
+MISC ChangeLog 2594 SHA256 2863432e2b836480e55276bd0c42f1e985eef1ad279e2caf1b72e0077053110e SHA512 7f7967b96e856a365efee08e3da222f1a0090033d5b1cc46a8a67bbb1417a0e6dcdc8f66fe49432b333aba7c5ebb21adb92d4decb7ff3935107c31eab527a83d WHIRLPOOL 6b7922b06351f97a4608fdca631b4579a9ee9bc7c41ebfa920417be38148d2512a65c216fb172e74a5df3c7a1439c51ea6fc263cc7f19fb457fe16ff8bb65942
+MISC ChangeLog-2015 635 SHA256 29496fdd51dc028b47fc4bc9da95947aea8ae8d257aa2b35fded231e5b097eb2 SHA512 5fa4295827a163204ae53ee73ee6f6b06416ac2094cadca55f806a84711ab1932ca7b7530a4354c09db2c5831311e04e3aca795f0de85a1f27a5423edc0cbfe3 WHIRLPOOL 97cecda795e82005d8c25eff24bf11b1c9f0cd4d2b0a2d1fe32cc315a8dec3deddddf813235f4f4258c5fde781065a2399d2eb8011951c13dce1037d64a4d83b
+MISC metadata.xml 501 SHA256 e3bae69d725393947ef7bd8698e6606505b5962cb6a98863d78ee504a995e7e8 SHA512 5869e4268ec16289d392ec2911f1297e19e06cff94b8dac6f4cf57adaeb9fba1dba8853433bed1154a3bd2048cf5b762d6560a70a30fb5de230b5ce6ce1b775c WHIRLPOOL f09d901c7fa858d497041aa5cb99669aec7f0a8c58907802357ae85d717935f684900857a2d8d3f80987762db779012c8e99465682740d4eb1218ea81ae893e8
diff --git a/sci-mathematics/nestedsums/metadata.xml b/sci-mathematics/nestedsums/metadata.xml
new file mode 100644
index 000000000000..ef3fc3585fdb
--- /dev/null
+++ b/sci-mathematics/nestedsums/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>grozin@gentoo.org</email>
+ <name>Andrey Grozin</name>
+</maintainer>
+<maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+</maintainer>
+<longdescription lang="en">
+A GiNaC-based library for symbolic expansion of certain transcendental functions.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/nestedsums/nestedsums-1.5.1.ebuild b/sci-mathematics/nestedsums/nestedsums-1.5.1.ebuild
new file mode 100644
index 000000000000..dda14ea4f26f
--- /dev/null
+++ b/sci-mathematics/nestedsums/nestedsums-1.5.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit flag-o-matic
+
+DESCRIPTION="A GiNaC-based library for symbolic expansion of certain transcendental functions"
+HOMEPAGE="http://wwwthep.physik.uni-mainz.de/~stefanw/nestedsums/"
+IUSE="doc"
+SRC_URI="http://wwwthep.physik.uni-mainz.de/~stefanw/download/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+RDEPEND=">=sci-mathematics/ginac-1.7"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )"
+
+src_configure() {
+ append-cxxflags -std=c++11
+ default
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ doxygen Doxyfile || die "generating documentation failed"
+ fi
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ rm -f "${D}"usr/lib/*.la
+ dodoc AUTHORS ChangeLog
+
+ if use doc; then
+ dohtml reference/html/*
+ fi
+}
diff --git a/sci-mathematics/normaliz/Manifest b/sci-mathematics/normaliz/Manifest
new file mode 100644
index 000000000000..4e056666780a
--- /dev/null
+++ b/sci-mathematics/normaliz/Manifest
@@ -0,0 +1,14 @@
+AUX normaliz-2.12.1-respect-flags.patch 2097 SHA256 e759b884ea9e021d8f22bcd2f38b441517243ae84d19308f6f4349f327bb9385 SHA512 c5a01a49cd1f61a5eea007b991e44eb39910481a214ea169dbf87904c6bf258c23e6a85391e9584d125935b5b71e0b3285339fdd7f8e1d7e824aca6e953a2d54 WHIRLPOOL 7fc5ba979257d3ac56364566bd7e07d1d1154a7856ceea5137ec0daa23cfad97b566466ceb9c0a81b88f174960a98d9bc492d9e42a35d5cf559675c0254cc2aa
+AUX normaliz-2.12.2-gcc49.patch 447 SHA256 2f04a82bf34a07709df04299bbff62ed869f2f94b7473f90cabb208e35278cfe SHA512 465fc30dac17c2ba6c8f702386556fba21d5d2d6cf3282ac5bd87aa2f578b96c5ec852518ab345742518563e4882b99a58484b70576db36766e66498273449e1 WHIRLPOOL 21aad4c16c8d84e0f7d9632dda5ecc99ea71e435f7a3672a41570727c84b635406bf973157c913977f9b11ce0067f04b2bf383765523f0409a24d19bbc35075b
+AUX normaliz-3.0.0-respect-flags.patch 2084 SHA256 1c06e2068efeabad15ccf8af6c5dfec53001248d4870a76f866dddf6adff888a SHA512 e9ecc81f6023d098c2f1ba45676462f8fde2469ccf7e4ae86ce8859ea034a0ee3f8c12f9ea6521356b19a949744c9b8fe319a751c31248dfebea82358ad364a1 WHIRLPOOL 82de8360fe6275f992e12166dd7b882c29c2e7df947a7913316ddb8117e0a2f2ba093b4ea0e01f2095457fb6e5fa8cae789892ca3d39619c540e3ccf6e27a310
+DIST Normaliz2.12.2.zip 6432949 SHA256 230772425b3c9964b9e144c0919c75fac0ec95260a1943c10a8a94eea9d7273e SHA512 fd42071cb87b8efbaf9af0885c173a0583e0b38dedb8821a83225eeebb44060a7b5748c44adfc4faeac20c3a1706071bcb9883cb4447e4a1ff3aeb770bd22038 WHIRLPOOL cb2974e02eac6e6d51c234214a719a24ad2e12d1400f0a6f8aee3e7a4ba3aa2ba053beec65c9032f42726e4dd4f1866820bb5b7b96f7c3d34cd132fcdbdb91af
+DIST Normaliz3.1.1.zip 5839858 SHA256 192e60d3671d4516c4904b166dec96c5b32c63c0fbaae15d067e25b8d9b6119e SHA512 efa75844542df45d3cff6b6f877f2d6132905b722468b3df5a89468798bf66cbaf33f359000fb462f4d24fb3414f4c293a8ba84112a6712862dd593bb5f314ba WHIRLPOOL 5f9b503899d2d7a8c0367d516b709e45e8d034a70c06a16bbfd680c7c2b070fcc3f686c37473c73ab96c4b99b669e767817190d4882fce2085b47a7bf57de51c
+DIST normaliz-3.1.3.tar.gz 3075453 SHA256 f18f037395596219ee67cf40945903f990a6091fd3eb5dc67120d582e889ae34 SHA512 c7fb1620e758dc59de88f0d7c55f50db0f67be772a00af27205e478f30c3836b7cf012a16a8adfdee3f0367d3adb4e3f887dc7d03793a7ca1601968ddb1946ce WHIRLPOOL 7cc3534b59cf4d6af5c1760038e29171b16577b7e5ef8f76da4504cb5471e147948b0711e5deea059f8c610de87d638208e2c2718cc07fb684440677d9f1bea3
+DIST normaliz-3.3.0.tar.gz 4243027 SHA256 0a22132c960c05edbc3c39391d395308f6ba3d9cb076ca075db7bbb639d85bbb SHA512 3e09be1a265746c2cedf24c6a38de2f3801a906a66a0fa73a98b05916a5e6f412d84f5e38276781b5d99ff779a2db3fc420acdadd036e9822cae41b2ed539be5 WHIRLPOOL a08f0ec39d2b1e350eabf45d2aa7c033ed597830bc0cfd9fbcd0bb09af069bbe551d2a967b0d5de5bbffde71aa7945e021fd40d3791dc24d66582d7b27d6d658
+EBUILD normaliz-2.12.2.ebuild 1763 SHA256 30f0fdc1380f745e0fffec9578b93f15f33841db0c0b016037917b3a13df021d SHA512 046df15cc3b7c969993980fd02d49f78ff700779fc83c1b56068f9aeb81c58c5435af53c4e7013097c4b6a4f4cb7b2822c42af00c74dbe70e151683b2986e3a2 WHIRLPOOL 3d7c64c3acc15289503fe6dbc74411080b91eb49ef469d3d4a708793f73b78a5d8cd929ac45ab494eb18bc3d5de9942daf59b388c0e000caccb3d9ad40bbc55d
+EBUILD normaliz-3.1.1.ebuild 1726 SHA256 bc7aab4e72853a23cb1738229bf55c982a052b5fb7434efda2e58496ab4da72b SHA512 458024c4e1695771b8a44a5bfff2cb6eb4d8166075a75c21b849bd406daea2fb1a322b922aa2e1d998efb5ca4bdca525d7a83495dde8168dd497579e486e0cee WHIRLPOOL e1559ee4651bd7b217afb04693be66d48060e942b5d4b9d13b087828e8ebbb9260d1695c8e4612099d43d352a856e5bcff7c50c156e5b32ea408a632eb9bce58
+EBUILD normaliz-3.1.3.ebuild 1664 SHA256 63200f64913de52c2d482a653a426e84c95929de0fd64cc740cad6b5910fc9ea SHA512 c5ba2958be607adee166372ee230ac4d5bfabc78cc86ba5f050f8704a714add25bc73782c31a24a56d08b7bbee9def40b2ce17d4994041dbc6c9659a578b9a4f WHIRLPOOL 1c82f7779d728f9b979fec9037dd55b58833c63688968b9109efbd3b6d1f068d10a7e2c26d429486ac89f464a9a89773b22b85b99d35e07927fa72ccfffdca2d
+EBUILD normaliz-3.3.0.ebuild 1175 SHA256 26bbe24989da7bc15d7a28026f6a36956f390891d3541eb8d1ed35cecfff2337 SHA512 5f05796576e60f6867563279b362b8a0d40f29e4b4a38b2e58bd77e1885cbb1b8a69ebc1842e70eeb11c482063ab5287cfd70121d54a0c1163df02daac50ff72 WHIRLPOOL fb0c76d0abeb4b5953ae037ef5de4ad332a56a60a1008418a117bbf5cd6455f32272dcbbbc46d3f3af2e4da4b863d0f97a12932cb6bebcff03d1b503c2179c14
+MISC ChangeLog 5054 SHA256 c901d2e5dd79aef25d79391d0c0ced48d39ad9a8a22e12fc6619878aa45aeadd SHA512 aa6404eb569e9f5e74536c6d8584b4c71dc099825e71818187be0c114d30f36bd91a4e08173c1c10b7df1a525d5b23074125a9fdc7a0990bddba7af02ce8eb9a WHIRLPOOL 788ef85355597b1050da547b8018505781bd51d7c9bcb0ea6d81788b348322e99f752070a663eee49d6920c8b205893b52ef2e6449babbd981bb1156af0450cf
+MISC ChangeLog-2015 4085 SHA256 e17b8b53bdd005ed6afc6c25cbc864875ba0b4a8cc61b996a5603eb891b6251f SHA512 0016d34d7cfb7fdf5f800113152ca0a826a15e5c79669ef0e7652d2ea611c19fb60ea098f30e5ee8ee48143877622b54f493b745a94544b0dc64b0c193357edc WHIRLPOOL 21755fcc71629ec3837cba0e42b2545781f74f4d28feaef9ca947e01ce2c8d3b7a8b6057c4c06ac364d1f471379d045aee6a7e58793c11578c5be760751a24d5
+MISC metadata.xml 721 SHA256 cf3471c8e3376dc45e894302d00d90ee45e6797c12e98336d547de2b8ef640c7 SHA512 886c0a708e3992b508911fbb493d0a667d0c6f10e8b78ddbf455f269197c8023ba80acec9e9e7f89d39ac5f898273dc0c7de78c81e9cc75b34c63dce3a51d6bb WHIRLPOOL c08c135be3f2c6027523f7e68239f8e45f3fa28067744966e66917c0be1d2996969625a1bd6aa3fdf25b049e9942873a2c7693e4a17dcfe09c96366ce99eccb4
diff --git a/sci-mathematics/normaliz/files/normaliz-2.12.1-respect-flags.patch b/sci-mathematics/normaliz/files/normaliz-2.12.1-respect-flags.patch
new file mode 100644
index 000000000000..d7d83ee79d91
--- /dev/null
+++ b/sci-mathematics/normaliz/files/normaliz-2.12.1-respect-flags.patch
@@ -0,0 +1,47 @@
+diff -U 3 -dHrN Normaliz2.12/source/Makefile Normaliz2.12.patched/source/Makefile
+--- Normaliz2.12/source/Makefile 2014-10-23 15:01:56.000000000 +0200
++++ Normaliz2.12.patched/source/Makefile 2014-10-25 14:56:39.426295174 +0200
+@@ -17,16 +17,16 @@
+ @$(MAKE) normaliz
+
+ normaliz.o: $(SOURCES) $(HEADERS) $(LIBHEADERS)
+- $(CXX) $(CXXFLAGS) $(NORMFLAGS) -c Normaliz.cpp -o normaliz.o
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -c Normaliz.cpp -o normaliz.o
+
+ normaliz: $(SOURCES) $(HEADERS) normaliz.o libnormaliz/libnormaliz.a
+- $(CXX) $(CXXFLAGS) $(NORMFLAGS) normaliz.o libnormaliz/libnormaliz.a $(GMPFLAGS) -o normaliz
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) normaliz.o libnormaliz/libnormaliz.a $(GMPFLAGS) -o normaliz
+
+ normaliz1: $(SOURCES) $(HEADERS) $(LIBHEADERS) $(LIBSOURCES)
+- $(CXX) $(CXXFLAGS) $(NORMFLAGS) Normaliz-impl.cpp $(GMPFLAGS) -o normaliz1
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) Normaliz-impl.cpp $(GMPFLAGS) -o normaliz1
+
+ normaliz-pg: $(SOURCES) $(HEADERS) $(LIBHEADERS) $(LIBSOURCES)
+- $(CXX) $(CXXFLAGS) $(NORMFLAGS) -pg Normaliz-impl.cpp $(GMPFLAGS) -o normaliz-pg
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -pg Normaliz-impl.cpp $(GMPFLAGS) -o normaliz-pg
+
+
+ #always go down the directory and let the make there check what has to be done
+diff -U 3 -dHrN Normaliz2.12/source/Makefile.configuration Normaliz2.12.patched/source/Makefile.configuration
+--- Normaliz2.12/source/Makefile.configuration 2014-10-23 15:01:56.000000000 +0200
++++ Normaliz2.12.patched/source/Makefile.configuration 2014-10-25 15:18:39.876313342 +0200
+@@ -1,11 +1,9 @@
+ ##
+ ## Makefile configuration for normaliz
+ ##
+-CXX = g++
+ #CXX = linux32 g++ -m32 -march=i686 #compile it for linux32
+ CXXFLAGS += -std=c++0x
+ CXXFLAGS += -Wall -pedantic
+-CXXFLAGS += -O3 -funroll-loops
+ #CXXFLAGS += -I /usr/local/boost_1_45_0
+ CXXFLAGS += -g ## debugging
+ #CXXFLAGS += -pg ## profiling
+@@ -19,7 +17,6 @@
+ endif
+
+ ## for distributing the executables link static (does not work for mac)
+-CXXFLAGS += -static
+ ## for almost static compilation on Mac use
+ #CXXFLAGS += -static-libgcc
+ ## make it compatible with older Mac versions
diff --git a/sci-mathematics/normaliz/files/normaliz-2.12.2-gcc49.patch b/sci-mathematics/normaliz/files/normaliz-2.12.2-gcc49.patch
new file mode 100644
index 000000000000..35a28c8cf2a3
--- /dev/null
+++ b/sci-mathematics/normaliz/files/normaliz-2.12.2-gcc49.patch
@@ -0,0 +1,11 @@
+diff -U 3 -dHrN Normaliz2.12/source/libnormaliz/general.h Normaliz2.12.patched/source/libnormaliz/general.h
+--- Normaliz2.12/source/libnormaliz/general.h 2014-10-23 15:01:56.000000000 +0200
++++ Normaliz2.12.patched/source/libnormaliz/general.h 2015-03-01 13:20:01.057017555 +0100
+@@ -27,6 +27,7 @@
+
+ #include <iostream>
+ #include <assert.h>
++#include <cstddef>
+
+ #ifdef _WIN32 //for 32 and 64 bit windows
+ #define NMZ_MPIR //always use MPIR
diff --git a/sci-mathematics/normaliz/files/normaliz-3.0.0-respect-flags.patch b/sci-mathematics/normaliz/files/normaliz-3.0.0-respect-flags.patch
new file mode 100644
index 000000000000..cfd91d2feaff
--- /dev/null
+++ b/sci-mathematics/normaliz/files/normaliz-3.0.0-respect-flags.patch
@@ -0,0 +1,47 @@
+diff -U 3 -dHrN Normaliz3.0.orig/source/Makefile Normaliz3.0/source/Makefile
+--- Normaliz3.0.orig/source/Makefile 2015-09-29 14:05:44.960631514 +0200
++++ Normaliz3.0/source/Makefile 2015-09-29 14:06:06.510346764 +0200
+@@ -19,16 +19,16 @@
+ @$(MAKE) normaliz
+
+ normaliz.o: $(SOURCES) $(HEADERS) $(LIBHEADERS)
+- $(CXX) $(CXXFLAGS) $(NORMFLAGS) -c Normaliz.cpp -o normaliz.o
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -c Normaliz.cpp -o normaliz.o
+
+ normaliz: $(SOURCES) $(HEADERS) normaliz.o libnormaliz/libnormaliz.a
+- $(CXX) $(CXXFLAGS) $(NORMFLAGS) normaliz.o libnormaliz/libnormaliz.a $(LINKFLAGS) -o normaliz
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) normaliz.o libnormaliz/libnormaliz.a $(LINKFLAGS) -o normaliz
+
+ normaliz1: $(SOURCES) $(HEADERS) $(LIBHEADERS) $(LIBSOURCES)
+- $(CXX) $(CXXFLAGS) $(NORMFLAGS) Normaliz-impl.cpp $(LINKFLAGS) -o normaliz1
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) Normaliz-impl.cpp $(LINKFLAGS) -o normaliz1
+
+ normaliz-pg: $(SOURCES) $(HEADERS) $(LIBHEADERS) $(LIBSOURCES)
+- $(CXX) $(CXXFLAGS) $(NORMFLAGS) -pg Normaliz-impl.cpp $(LINKFLAGS) -o normaliz-pg
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -pg Normaliz-impl.cpp $(LINKFLAGS) -o normaliz-pg
+
+
+ #always go down the directory and let the make there check what has to be done
+diff -U 3 -dHrN Normaliz3.0.orig/source/Makefile.configuration Normaliz3.0/source/Makefile.configuration
+--- Normaliz3.0.orig/source/Makefile.configuration 2015-09-29 14:05:44.960631514 +0200
++++ Normaliz3.0/source/Makefile.configuration 2015-09-29 14:07:16.419426513 +0200
+@@ -1,11 +1,9 @@
+ ##
+ ## Makefile configuration for normaliz
+ ##
+-CXX = g++
+ #CXX = linux32 g++ -m32 -march=i686 #compile it for linux32
+ CXXFLAGS += -std=c++0x
+ CXXFLAGS += -Wall -pedantic
+-CXXFLAGS += -O3 -funroll-loops
+ #CXXFLAGS += -I /usr/local/boost_1_45_0
+ #CXXFLAGS += -g ## debugging
+ #CXXFLAGS += -pg ## profiling
+@@ -21,7 +19,6 @@
+ endif
+
+ ## for distributing the executables link static (does not work for mac)
+-CXXFLAGS += -static
+ ## for almost static compilation on Mac use
+ #CXXFLAGS += -static-libgcc
+ ## make it compatible with older Mac versions
diff --git a/sci-mathematics/normaliz/metadata.xml b/sci-mathematics/normaliz/metadata.xml
new file mode 100644
index 000000000000..611dafb67f53
--- /dev/null
+++ b/sci-mathematics/normaliz/metadata.xml
@@ -0,0 +1,19 @@
+<?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>
+ <use>
+ <flag name="extras"> Install <pkg>sci-mathematics/Macaulay2</pkg> and <pkg>sci-mathematics/singular</pkg>packages as shipped by upstream</flag>
+ </use>
+ <longdescription lang="en">
+ Normaliz is a (command line) tool for computations in affine
+ monoids, vector configurations, lattice polytopes, and rational
+ cones.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">Normaliz/Normaliz</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/normaliz/normaliz-2.12.2.ebuild b/sci-mathematics/normaliz/normaliz-2.12.2.ebuild
new file mode 100644
index 000000000000..6c50d7e0a962
--- /dev/null
+++ b/sci-mathematics/normaliz/normaliz-2.12.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs versionator
+
+MYPV=$(get_version_component_range 1-2)
+MYP="Normaliz${MYPV}"
+
+DESCRIPTION="Tool for computations in affine monoids and more"
+HOMEPAGE="http://www.mathematik.uni-osnabrueck.de/normaliz/"
+SRC_URI="http://www.mathematik.uni-osnabrueck.de/${PN}/Normaliz${PV}/Normaliz${PV}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc extras openmp"
+
+RDEPEND="dev-libs/gmp[cxx]"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-libs/boost"
+# Only a boost header is needed -> not RDEPEND
+
+S=${WORKDIR}/${MYP}
+
+src_prepare () {
+ epatch "${FILESDIR}/${PN}-2.12.1-respect-flags.patch"
+ epatch "${FILESDIR}/${PN}-2.12.2-gcc49.patch"
+
+ # Respect users AR tool (Bug 474532)
+ sed -e "s:ar -cr:$(tc-getAR) -cr:" -i source/libnormaliz/Makefile || die
+
+ if use openmp && tc-has-openmp; then
+ export OPENMP=yes
+ else
+ export OPENMP=no
+ fi
+}
+
+src_compile(){
+ emake CXX="$(tc-getCXX)" OPENMP="${OPENMP}" -C source
+}
+
+src_install() {
+ dobin source/normaliz
+ if use doc ; then
+ dodoc doc/"Normaliz.pdf"
+ dodoc doc/"NmzIntegrate.pdf"
+ fi
+ if use extras; then
+ elog "You have selected to install extras which consist of Macaulay2"
+ elog "and Singular packages. These have been installed into "
+ elog "/usr/share/${PN}, and cannot be used without additional setup. Please refer"
+ elog "to the homepages of the respective projects for additional information."
+ elog "Note however, Gentoo's versions of Singular and Macaulay2 bring their own"
+ elog "copies of these interface packages. Usually you don't need normaliz's versions."
+ insinto "/usr/share/${PN}"
+ doins Singular/normaliz.lib
+ doins Macaulay2/Normaliz.m2
+ fi
+}
diff --git a/sci-mathematics/normaliz/normaliz-3.1.1.ebuild b/sci-mathematics/normaliz/normaliz-3.1.1.ebuild
new file mode 100644
index 000000000000..0fcd25b60993
--- /dev/null
+++ b/sci-mathematics/normaliz/normaliz-3.1.1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs versionator
+
+MYPV=$(get_version_component_range 1-2)
+MYP="Normaliz${MYPV}"
+
+DESCRIPTION="Tool for computations in affine monoids and more"
+HOMEPAGE="http://www.mathematik.uni-osnabrueck.de/normaliz/"
+SRC_URI="https://www.normaliz.uni-osnabrueck.de/wp-content/uploads/2016/04/Normaliz${PV}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="doc extras openmp"
+
+RDEPEND="dev-libs/gmp[cxx]"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-libs/boost"
+# Only a boost header is needed -> not RDEPEND
+
+S=${WORKDIR}/${MYP}
+
+src_prepare () {
+ epatch "${FILESDIR}/${PN}-3.0.0-respect-flags.patch"
+
+ # Respect users AR tool (Bug 474532)
+ sed -e "s:ar -cr:$(tc-getAR) -cr:" -i source/libnormaliz/Makefile || die
+
+ if use openmp && tc-has-openmp; then
+ export OPENMP=yes
+ else
+ export OPENMP=no
+ fi
+}
+
+src_compile(){
+ emake CXX="$(tc-getCXX)" OPENMP="${OPENMP}" -C source
+}
+
+src_install() {
+ dobin source/normaliz
+ if use doc ; then
+ dodoc doc/"Normaliz.pdf"
+ dodoc doc/"NmzIntegrate.pdf"
+ fi
+ if use extras; then
+ elog "You have selected to install extras which consist of Macaulay2"
+ elog "and Singular packages. These have been installed into "
+ elog "/usr/share/${PN}, and cannot be used without additional setup. Please refer"
+ elog "to the homepages of the respective projects for additional information."
+ elog "Note however, Gentoo's versions of Singular and Macaulay2 bring their own"
+ elog "copies of these interface packages. Usually you don't need normaliz's versions."
+ insinto "/usr/share/${PN}"
+ doins Singular/normaliz.lib
+ doins Macaulay2/Normaliz.m2
+ fi
+}
diff --git a/sci-mathematics/normaliz/normaliz-3.1.3.ebuild b/sci-mathematics/normaliz/normaliz-3.1.3.ebuild
new file mode 100644
index 000000000000..01a92c6acf0a
--- /dev/null
+++ b/sci-mathematics/normaliz/normaliz-3.1.3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs versionator
+
+MYP="Normaliz-${PV}"
+
+DESCRIPTION="Tool for computations in affine monoids and more"
+HOMEPAGE="http://www.mathematik.uni-osnabrueck.de/normaliz/"
+SRC_URI="https://github.com/Normaliz/Normaliz/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="doc extras openmp"
+
+RDEPEND="
+ dev-libs/gmp[cxx]
+"
+DEPEND="${RDEPEND}
+ doc? ( app-text/texlive )
+ dev-libs/boost"
+# Only a boost header is needed -> not RDEPEND
+
+S=${WORKDIR}/${MYP}
+
+src_prepare () {
+ ./bootstrap.sh || die
+ default
+}
+
+src_configure () {
+ if use openmp && ! tc-has-openmp ; then
+ die "You requested openmp, but your toolchain does not support it."
+ fi
+ econf $(use_enable openmp)
+}
+
+src_install() {
+ default
+ if use doc ; then
+ pushd doc
+ pdflatex Normaliz || die
+ pdflatex Normaliz || die
+ dodoc "Normaliz.pdf"
+ pdflatex NmzIntegrate || die
+ pdflatex NmzIntegrate || die
+ dodoc "NmzIntegrate.pdf"
+ popd
+ fi
+ if use extras; then
+ elog "You have selected to install extras which consist of Macaulay2"
+ elog "and Singular packages. These have been installed into "
+ elog "/usr/share/${PN}, and cannot be used without additional setup. Please refer"
+ elog "to the homepages of the respective projects for additional information."
+ elog "Note however, Gentoo's versions of Singular and Macaulay2 bring their own"
+ elog "copies of these interface packages. Usually you don't need normaliz's versions."
+ insinto "/usr/share/${PN}"
+ doins Singular/normaliz.lib
+ doins Macaulay2/Normaliz.m2
+ fi
+}
diff --git a/sci-mathematics/normaliz/normaliz-3.3.0.ebuild b/sci-mathematics/normaliz/normaliz-3.3.0.ebuild
new file mode 100644
index 000000000000..f379562bd326
--- /dev/null
+++ b/sci-mathematics/normaliz/normaliz-3.3.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools toolchain-funcs eutils
+
+MYP="Normaliz-${PV}"
+
+DESCRIPTION="Tool for computations in affine monoids and more"
+HOMEPAGE="http://www.mathematik.uni-osnabrueck.de/normaliz/"
+SRC_URI="https://github.com/Normaliz/Normaliz/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0/3"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc extras openmp static-libs"
+
+# would be nice to package scip and cocoalib
+
+RDEPEND="
+ dev-libs/gmp:=[cxx]
+"
+DEPEND="${RDEPEND}
+ dev-libs/boost
+"
+# Only a boost header is needed -> not RDEPEND
+
+S="${WORKDIR}/${MYP}"
+
+pkg_setup() {
+ use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure () {
+ econf \
+ $(use_enable openmp) \
+ $(use_enable static-libs static)
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ default
+ use static-libs || prune_libtool_files --all
+ use doc && dodoc doc/Normaliz.pdf
+ if use extras; then
+ newdoc Singular/normaliz.pdf singular-normaliz.pdf
+ insinto /usr/share/${PN}
+ doins Singular/normaliz.lib
+ doins Macaulay2/Normaliz.m2
+ fi
+}
diff --git a/sci-mathematics/num-utils/Manifest b/sci-mathematics/num-utils/Manifest
new file mode 100644
index 000000000000..f2ed1d733ef7
--- /dev/null
+++ b/sci-mathematics/num-utils/Manifest
@@ -0,0 +1,8 @@
+DIST num-utils-0.3.tar.gz 28208 SHA256 2369fbd7ef094129d6bc60c54a22e98d2329e9ce7b1b958614991398ec1bff72 SHA512 d4133062d63477ef69fa4439600e8d48b9d4944a747e3e1913a4b51e24bf07fb20cd0863c1066b90085d64ce76bc23862e2f548861aee4d8e5d36c6ac336ab7c WHIRLPOOL 39a521c3721f048627f9f053735fc8dd360eaa056280912355c91812120367054bd8ca3c84c00aef81b96b0e407e9985da5b3d525a86758992091bda729d8973
+DIST num-utils-0.5.tar.gz 31845 SHA256 03592760fc7844492163b14ddc9bb4e4d6526e17b468b5317b4a702ea7f6c64e SHA512 6f5a2a8304a0ac3cdba342ecfd28ccd926778a5fde5eed4655f973a5c921e558f0986061ec11ba6146382f63a46b1503570576370a28a0f975e361d790f03561 WHIRLPOOL ca4b61fdb2b865e17835c1b6b8698cd4bab8b3f45c42f4f4b6d44a5e2b99b936020738b6a7a2500320ff34ebe8a3d647e5861e09c590adae36910b84ea010667
+DIST num-utils_0.5-11.diff.gz 11702 SHA256 6b4294671eff9378579f20904b27ef42ba4bfb2ac0af74007a81b08e6cc917ad SHA512 b461771ba1c8054d83f1aea06cd6beb92945ba929ff71df9e9c02b589c59dce2f2a19e7dab76120d48de7ae2f9e30f0271ae0b873d6e220ea195e160d4347bbf WHIRLPOOL 281cca6b716b47ca45657fc37a1000b5e6594b9c50223a8d28d5ada0cba7f721ffc0d874cf79afd8600d13ddc7c07851ca251aaac2bc339bafa172ea9870cf7e
+EBUILD num-utils-0.3.ebuild 565 SHA256 cb1a4c63c494b4295549363a2718f8800b8151160b3db78a8345cd5c7e64c742 SHA512 5cb54e3831d8f5451bc2f7e7481d11387d4e2faa795ef0bf04a8d098e028763b44e8506a1805f2c6b694e9f49e5727a2b25913677b0484a46681bca22711c999 WHIRLPOOL ef704dd4532b196565049902f36c40acead5fc02f4513aad660aa80d5859dd6fb37578fe2ac4c9d21c127270b26166a341a65c2fd86c9e65e1887c6c3206abce
+EBUILD num-utils-0.5-r1.ebuild 1102 SHA256 52196ae39bc7c516597019f86f62cb93e574bf83748b0c718c9340609c5d5577 SHA512 cb32d9c43624f37bbd5331be9076d7a2d066e2d5a50ec7341fec402fedfea87477577c1813e384cb392346d060ae32be2559286e447ad104ab6d8ac5b7f6d981 WHIRLPOOL a2618673aaeae6cfbac6ee50b3875ed2978467fc1e9385ca8000286e2927e9b5194a2b623ca13fe55d0c2525831465cc0e6549577d0a448b4eef70f099307e24
+MISC ChangeLog 2671 SHA256 db5689c30e4976d60b76eb5e06a7caadecc4996f9e701e854e54273fe3a1dd50 SHA512 85dd6b0b28ec73d506ed173598e5113d69269fa6dc038a3ec16d8d26c275f919eb1b25100ead261247b2d261dd296a09511affba85959870c77160e50efe6542 WHIRLPOOL e9d0aefed53bea9368cb6d97e33fd4229b17fb8f2c0ae84d2e5f43166681c82ee98c9fdaaa064e3eef545a796ce2036b96bc107a27296a74f9f7342427182128
+MISC ChangeLog-2015 1753 SHA256 57a6aefe52a59d3a75e80b7cf70cd18921467f057bf4645f730da206574df945 SHA512 468d9163b4319d983961f1437710c57da5f169c5b97654c7978263999434d9750850636c431ccf07000d8bb7cb378b668fb3366eb6ca35ccefba5e63dc911502 WHIRLPOOL 14140f3fa91704db31c8c2e300bcb37140cc9ec12a842d0b080bebf64a03555df73bed6b35b3b5b4e93748f2baf14bff4fabea29d2b9ca909e3abdb202973c1c
+MISC metadata.xml 269 SHA256 a871d7ff10784843cabcb9dc241de96e6fce441b85b5985450dfa226a550d776 SHA512 ecf9121172cdf04793bdbf6684060c7f15fb2a25606e53d8fc7dbc78efe24e264affa600c1ee3106ce8216b7093dff66eced3f78dd6ca7bd6ee589d1c7912cd6 WHIRLPOOL 8b7ba32ab675a9464103d73a803eeb3dae79f7f2ac90fea364a7d003efd6cc4db9c5e098bea367c269fc27e239a6ece61f3e9ce9a0657471197395f27b87bb36
diff --git a/sci-mathematics/num-utils/metadata.xml b/sci-mathematics/num-utils/metadata.xml
new file mode 100644
index 000000000000..514f7304d513
--- /dev/null
+++ b/sci-mathematics/num-utils/metadata.xml
@@ -0,0 +1,8 @@
+<?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>
+</pkgmetadata>
diff --git a/sci-mathematics/num-utils/num-utils-0.3.ebuild b/sci-mathematics/num-utils/num-utils-0.3.ebuild
new file mode 100644
index 000000000000..d711b5e0362c
--- /dev/null
+++ b/sci-mathematics/num-utils/num-utils-0.3.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="A set of programs for dealing with numbers from the command line"
+SRC_URI="http://suso.suso.org/programs/num-utils/downloads/${P}.tar.gz"
+HOMEPAGE="http://suso.suso.org/programs/num-utils/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="
+ dev-lang/perl
+ !<sci-chemistry/gromacs-4"
+
+src_compile() {
+ emake || die
+}
+
+src_install () {
+ make ROOT="${D}" install || die
+ dodoc CHANGELOG GOALS MANIFEST README VERSION WARNING
+}
diff --git a/sci-mathematics/num-utils/num-utils-0.5-r1.ebuild b/sci-mathematics/num-utils/num-utils-0.5-r1.ebuild
new file mode 100644
index 000000000000..a6bf9e3f0638
--- /dev/null
+++ b/sci-mathematics/num-utils/num-utils-0.5-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils
+
+DEB_PR=11
+
+DESCRIPTION="A set of programs for dealing with numbers from the command line"
+HOMEPAGE="http://suso.suso.org/programs/num-utils/"
+SRC_URI="
+ http://suso.suso.org/programs/num-utils/downloads/${P}.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}-${DEB_PR}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${WORKDIR}"/${PN}_${PV}-${DEB_PR}.diff
+ sed \
+ -e 's:../orig/num-utils-0.5/::g' \
+ -i "${S}"/debian/patches/*.diff || die
+ epatch "${S}"/debian/patches/*.diff
+
+ local x
+ for x in average bound interval normalize random range round; do
+ mv $x num$x || die "renaming $x failed"
+ done
+
+ sed \
+ -e 's/^RPMDIR/#RPMDIR/' \
+ -e 's/COPYING//' \
+ -e 's/LICENSE//' \
+ -e '/^DOCS/s/MANIFEST//' \
+ -i Makefile || die "sed Makefile failed"
+}
+
+src_install () {
+ emake ROOT="${ED}" install
+}
+
+pkg_postinst() {
+ elog "All ${PN} programs have been renamed with prefix 'num' to avoid collisions"
+}
diff --git a/sci-mathematics/nusmv/Manifest b/sci-mathematics/nusmv/Manifest
new file mode 100644
index 000000000000..dbd13aee680e
--- /dev/null
+++ b/sci-mathematics/nusmv/Manifest
@@ -0,0 +1,6 @@
+DIST NuSMV-2.6.0.tar.gz 4223312 SHA256 dba953ed6e69965a68cd4992f9cdac6c449a3d15bf60d200f704d3a02e4bbcbb SHA512 3749e0267c2adffaa5f2f98ee925f5a774e3132277a02c549b3f4b836f8b090a44d6a14730b58251d7bb88055eb55e89f0eab7fea8714cb2f0786afd803efd0e WHIRLPOOL 26dfa45e0cb97807364783a574f5ec1d26e7240eec411bf1f674872c62e037d912e409dabbfb78fdd52a4a317297fc3918149efe1460dadc0e5d5d0a3cabfb28
+DIST zchaff.64bit.2007.3.12.zip 63139 SHA256 9b88d8f366d0dc6b3cacd9d497e755d06af069ff27411870cc8b40fe0f11911f SHA512 075d0bceede6643a880763943cba9a2fa0f6c58c47b86c0a2bbbe86a2e3925dc5b3859800d1cab0c558d727635556beb77f9efbd0f2837a768ef8d513dc2b300 WHIRLPOOL ba62b561d415ea15f6734466a45760aba4fa45430f1baf904db5f15332bfc94797cbc2f9ebc2f77797bffc1489a54a527790f4f7314bf92871324e8e3cf0c0ab
+EBUILD nusmv-2.6.0.ebuild 2369 SHA256 5f9e57e0f94f891b22dcbb9e76274738d5173298bd50df8cc282f3d6afa80124 SHA512 56b7b6dcac3e810052340a7696b4f185e36d70eb49ffeeb467ab297c37730d8bbadb508f2b1bd54764eb9aca18ef10e7b6b0e336d5e3d9c50d1176186052a34c WHIRLPOOL 2a51c801315c165ffc23e3ff375a7c246ecea117d47b6e1b557d46c846376de7b3bb7718600a7ee0a91005c3a58b081847af1e257bb2e768ac7663f0f549adf0
+MISC ChangeLog 3340 SHA256 01eaf041903e4a7c4a33d1ea3e41be600c6d9ecc4ae2747568c77fe0dd3378b0 SHA512 53dd782b237fc57b57f8299372cbc9d0a987e3dce0f5e229aa07af84dd5b68aca39d1e931b1b63661f830ac16cc38c1029728b63662f4e102dd130cb96ad7482 WHIRLPOOL b95771a1c9db02d56e5f565a6dad0b902410d61e753001f475e87baba20816c709bd50f76534fff48d2b79aaa1a45361054993bb6b57225fbe651ce5c07cdc17
+MISC ChangeLog-2015 2636 SHA256 d27307b29b0d1e07681e1d8744d0aedd993d5f461eef00c6cb154619160f82f6 SHA512 72cc45faa4afe31dfa8f8bcc924f46149da5f4021e5915864eab8ed374710146c3473ce877269c44f89fda3d6415e40b0a62f1f89c4d80d5d6b25de944db5367 WHIRLPOOL ff7e18b94ede30fcda9363027b5b06e52ac87b9f0f2ca102cdc66feb12fbd467a7028263089b4e08018669d4f0f589a076234ccec96dcb5ac2f001171dee00fb
+MISC metadata.xml 475 SHA256 0c736442a96edf62296e7ed3171d64c95a42ad95908d9f26990e320b6f99de85 SHA512 77ced108c3ec2595b851e8be0fe2103087699ff5c222e2c95f09378da82b0f4340e28314e1d763a154d24edeadf42d7e62e521d5b19a201be18748513eab0b2b WHIRLPOOL fbc978ffb6439225f0f11b04ff24c6d65148acf6d1aaaeac3fa399fa382eb14079fdd80ca0cfbc03ee5c51ea66850df56f7d7fe8bacdf091bf296d5a80a980ce
diff --git a/sci-mathematics/nusmv/metadata.xml b/sci-mathematics/nusmv/metadata.xml
new file mode 100644
index 000000000000..314da184fb2b
--- /dev/null
+++ b/sci-mathematics/nusmv/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <use>
+ <flag name="minisat">Enable support for MiniSat</flag>
+ <flag name="zchaff">Enable support for zChaff</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/nusmv/nusmv-2.6.0.ebuild b/sci-mathematics/nusmv/nusmv-2.6.0.ebuild
new file mode 100644
index 000000000000..235562292b07
--- /dev/null
+++ b/sci-mathematics/nusmv/nusmv-2.6.0.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils python-any-r1 toolchain-funcs
+
+MY_P="NuSMV-${PV}"
+NUSMV_A="${MY_P}.tar.gz"
+ZCHAFF_A="zchaff.64bit.2007.3.12.zip"
+
+DESCRIPTION="NuSMV: new symbolic model checker"
+HOMEPAGE="http://nusmv.fbk.eu/"
+SRC_URI="http://nusmv.fbk.eu/distrib/${NUSMV_A}
+ zchaff? ( http://www.princeton.edu/~chaff/zchaff/${ZCHAFF_A} )"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="minisat doc zchaff"
+REQUIRED_USE="|| ( minisat zchaff )"
+
+SHARED_DEPEND="minisat? ( >=sci-mathematics/minisat-2.2.0_p20130925 )"
+RDEPEND="${SHARED_DEPEND}
+ dev-libs/expat"
+DEPEND="${SHARED_DEPEND}
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-latexextra
+ app-doc/doxygen
+ )
+ dev-libs/libxml2
+ ${PYTHON_DEPS}"
+
+S="${WORKDIR}/${MY_P}/NuSMV"
+
+src_unpack() {
+ unpack "${NUSMV_A}"
+ if use zchaff; then
+ cp "${DISTDIR}/${ZCHAFF_A}" "${WORKDIR}/${MY_P}/zChaff" || die
+ fi
+}
+
+src_prepare() {
+ sed -i -e 's/-mcpu=[^\s]*//' "${WORKDIR}/${MY_P}/cudd-2.4.1.1"/Makefile || die
+ # Prevent automatic build of minisat - we are using the ebuild from portage
+ sed -i -e 's/ add_subdirectory(${MINISAT_SOURCE_DIR} ${MINISAT_BUILD_DIR})//' \
+ -e 's/MINISAT_LIB/MiniSat/' CMakeLists.txt || die
+ sed -i -e 's/DEPENDS MINISAT_BUILD//' code/nusmv/core/sat/solvers/CMakeLists.txt || die
+ # Change the "prog-man/html" rule to optional
+ sed -i -e '/\s*install( .*html /s:${PROJECT_BINARY_DIR}:share/nusmv/doc OPTIONAL:' doc/prog-man/CMakeLists.txt || die
+ # Change the doc destination
+ sed -i -e "s:share/nusmv/doc:share/doc/${PF}:" doc/{tutorial,user-man,prog-man}/CMakeLists.txt || die
+
+ # Correction for proper parallel compilation
+# sed -i -e 's/COMMAND ${MAKE}/COMMAND $(MAKE)/' "${WORKDIR}/${MY_P}/"{zchaff,MiniSat}/CMakeLists.txt || die
+ default
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_MINISAT=$(usex minisat)
+ -DENABLE_ZCHAFF=$(usex zchaff)
+ -DMINISAT_INCLUDE_DIR="${EPREFIX}"/usr/include/minisat/simp
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ local targets=( all )
+ use doc && targets+=( prog-man user-man html tutorial docs )
+ cmake-utils_src_compile "${targets[@]}"
+}
+
+src_install() {
+ cmake-utils_src_install
+ # Remove docs where they do not belong to
+ rm -f "${ED%/}"/usr/share/nusmv/{LGPL-2.1,README*,NEWS} || die
+}
diff --git a/sci-mathematics/octave-epstk/Manifest b/sci-mathematics/octave-epstk/Manifest
new file mode 100644
index 000000000000..e8cbe6d0c95b
--- /dev/null
+++ b/sci-mathematics/octave-epstk/Manifest
@@ -0,0 +1,9 @@
+DIST octave-epstk_2.3-2.debian.tar.gz 10079 SHA256 fbfdfb15a1df78395553c8c014c20743312ae84e404697336c8df16ecec6d20d SHA512 076c374581df44d5b6ac9e0a7fd0a412adfda325fd28fbbf036a739d444332a75dea30a3e313f4df8ec54ceab60fea8206cf70837ae83407b17c5ff42e35563f WHIRLPOOL 9ce6b7eec65f1db7e404ea3fb20f4e08dc81d5a6eaf886bffbf1c45acb031364100582fda3f9f14cdaf5613a2be948dee488c90eea57c10a8379fb7ae43df9ae
+DIST octave-epstk_2.3.orig.tar.bz2 1401307 SHA256 c496e1eb1fc97cd01cbe2004664c5ffae271f542cecc63d7f596b062400aae61 SHA512 3b672e78636a1d339355d5f8340a0f35c3af443061e76de875a0f22fae5fa394b3373fb12770705a301dbccdd1ad577aec2934daa04e8f3d16f8133b77e9bbd7 WHIRLPOOL 3d87266ba28bce36df9c34199112c9065bc5743492201a0fd8c2825b16187e47b8d0cae38e33ca58327965183478d2d64ad8244afc015785abdd5681e0984890
+DIST octave-epstk_2.4-1.debian.tar.gz 10905 SHA256 20d961434b58ad3ace9af2ecd199fe458903146126ceaea905ea0173246b1973 SHA512 93ce2bdb04b2be36bc73d2c13a1bdd909b30597a76bc80db0abb1b4f53467742086559ed1f5ce265cea70f84c9b33d07a514b4fc1c8afc46640d0031907e6dea WHIRLPOOL 95d42dd854174d113b5438e581fa3a456e17215baff7dad876dcbe351ea9eafa83080103a5fb6fb8f8ffbacf0d21824d01e791c6bc351959b7cddfe3d321fcda
+DIST octave-epstk_2.4.orig.tar.bz2 1072111 SHA256 8de20e9529a0f3503d50bb31867c00c2564d5e6e570daf5786c51592ec673551 SHA512 64de7c23e2a79f03a6aeaa9e8a73c6d95e59cf616fc601bd8c6ad18d3870b1c60752f95cdc174cc31b3095e8b6e3858111c7d72b3b6df8effee4393791282112 WHIRLPOOL 934853e9517e40c4a404c8bec18c56c9cbe5686ca5efc27f1e72a7edcf97bd80ab71581d6c92f7ece2a730347a304d73611756f9b0e1347b045bbf3a03f8df2e
+EBUILD octave-epstk-2.3.ebuild 885 SHA256 2389dcf51cffed325236a74be7faedaeb4f97ca723c3ae62609cf066ad05fea5 SHA512 7d55c2cc0eaed1747a571ca926e844a27f537bc469c0ba3e6968bf7c564a328891d95a4bb859abcdd7fc585d6a29937d80dfa38c05870f5ec09e94fb2fc8c9a8 WHIRLPOOL 901fbf34846e31227210917e1eea2d9474388cc12f2139514de8206dd26120c8da9a4fb03af442a2c88cd8619bff9ffd984a23225d4e35f509b637d45a54d23a
+EBUILD octave-epstk-2.4.ebuild 871 SHA256 d06803c7c12b1a1a6bb1f752e8ca54a5353cb41924ba93403461c940dbcdfef3 SHA512 a84e188cc192d109733cc27ab92aa54dae4f0a5a184147f8397ff15d2b0391e7676018e29b7f82e896db7fb09e6bc27bc6fac26569a1dd5c20a64220915c3cef WHIRLPOOL 14d9e9826d7d20644ef04d32d57c28fd521f8620fe92480fb974ff2390602af1c370821b7225ab2e3ecfa83ed392ce80fe4d2e47e3a41c3b5e5c7828e59e5aa8
+MISC ChangeLog 2896 SHA256 f151fb3fd29721cd8d45586964c594adaf60b255d4d8a185d390f092d32fec85 SHA512 ee6dc01e43054dfa59d9a0488f80b3948200734fad90cc84c0b97589e35e757c82fee1349df47d55a47feafd194144926c559f89ea0cee67907e162b5f9b1492 WHIRLPOOL 0b959387b3412f0fabd7dc4aa98dbe02506d61c6239360d2081ed7c13546bf8e167dda94379c44a403a60f249847958f7db274a500d89d1e619d138dcdf8f125
+MISC ChangeLog-2015 1242 SHA256 3aff8adc1ada9c462ef543a2957a3e8810d104c9f29ef8cc294e4d879097444f SHA512 ae944cbcb634a0575ae3060e7671ac0c13947954b3dfcaccca1a83a179f131f68acda7053f814288b87664c77184b0a9f845595c26bd8ad7042e2bd790993112 WHIRLPOOL f99234446a1d861360cc7aa6bb2925651c68d835ffc8877d7ffe2b37fbcddcf59b38f7b1eedc5d1223ed907286ed11a9cbb977eb795ebd5bdf2932225933135a
+MISC metadata.xml 608 SHA256 3095decfaca6a8d1004a4beb8f5eb560fb07a2a117e4d790264294b762475e65 SHA512 6d0c0daf3341f957598bb3d4613abb5b913ccba22cfce68f2515706b13fbad50723decab8c0000739ce4d05739b22c491f57d7ce463395aeb6da34806b16b28a WHIRLPOOL c606bb904d2d2a3cff5870a208524937c13e22e7103e6fdc4727682fa7a0e284083d6b33d025d2a8b3c1f352cf41fd3efb5e87f5bc085d11375c506f257af2a9
diff --git a/sci-mathematics/octave-epstk/metadata.xml b/sci-mathematics/octave-epstk/metadata.xml
new file mode 100644
index 000000000000..f42812a09614
--- /dev/null
+++ b/sci-mathematics/octave-epstk/metadata.xml
@@ -0,0 +1,14 @@
+<?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 epsTk package provides, via a set of functions for octave, a
+ toolkit to create powerful encapsulated postscript (.eps) graphs. Most 2D
+ scientific graphics functions are written. The generated .eps-files are very
+ small and can be imported into other documents without loss of quality.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/octave-epstk/octave-epstk-2.3.ebuild b/sci-mathematics/octave-epstk/octave-epstk-2.3.ebuild
new file mode 100644
index 000000000000..f4c6f9a75dc9
--- /dev/null
+++ b/sci-mathematics/octave-epstk/octave-epstk-2.3.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+inherit eutils
+
+DEB_PR=2
+DESCRIPTION="Graphical output functions for Matlab and Octave"
+HOMEPAGE="http://www.epstk.de/"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}.orig.tar.bz2
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}-${DEB_PR}.debian.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~amd64"
+SLOT="0"
+IUSE="doc"
+
+RDEPEND="sci-mathematics/octave
+ app-text/ghostscript-gpl"
+DEPEND=""
+
+S="${WORKDIR}"
+
+src_prepare() {
+ local p
+ cd eps*
+ for p in $(cat "${WORKDIR}"/debian/patches/series); do
+ epatch "${WORKDIR}"/debian/patches/${p}
+ done
+}
+
+src_install () {
+ insinto /usr/share/octave/site/m/${PN}
+ doins eps*/m/* || die
+ use doc && dohtml -r eps*/doc/*
+ insinto /etc
+ doins debian/epstk.conf || die
+ dodoc debian/README.Debian debian/changelog
+}
diff --git a/sci-mathematics/octave-epstk/octave-epstk-2.4.ebuild b/sci-mathematics/octave-epstk/octave-epstk-2.4.ebuild
new file mode 100644
index 000000000000..f1642d9333f1
--- /dev/null
+++ b/sci-mathematics/octave-epstk/octave-epstk-2.4.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils
+
+DEB_PR=1
+DESCRIPTION="Graphical output functions for Matlab and Octave"
+HOMEPAGE="http://www.epstk.de/"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}.orig.tar.bz2
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}-${DEB_PR}.debian.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~amd64"
+SLOT="0"
+IUSE="doc"
+
+RDEPEND="sci-mathematics/octave
+ app-text/ghostscript-gpl"
+DEPEND=""
+
+S="${WORKDIR}"
+
+src_prepare() {
+ local p
+ cd eps*
+ for p in $(cat "${WORKDIR}"/debian/patches/series); do
+ epatch "${WORKDIR}"/debian/patches/${p}
+ done
+}
+
+src_install () {
+ insinto /usr/share/octave/site/m/${PN}
+ doins eps*/m/*
+ use doc && dohtml -r eps*/doc/*
+ insinto /etc
+ doins debian/epstk.conf
+ dodoc debian/README.Debian debian/changelog
+}
diff --git a/sci-mathematics/octave/Manifest b/sci-mathematics/octave/Manifest
new file mode 100644
index 000000000000..3333137bb8ab
--- /dev/null
+++ b/sci-mathematics/octave/Manifest
@@ -0,0 +1,13 @@
+AUX octave-4.2.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch 199 SHA256 b1f3703804afdaeedbde9dd945f07bac30b7b1e689461174aa215f99cb6f7ce4 SHA512 e9984fe54b7b4c49783f5f7559d24e9f1076b47ff8c0ec2751dda2e96c1f84ad48f03a760fd4d8b87fba021174237bc7f19c75ba7f33e84bce6def6318184e7d WHIRLPOOL e75627147eaed13af5e9f4c17b13ba11fd9ac49fa05332e62d5b5f452fbc03af7be200d5c99bfc1ce5c364add1f08bdbeada158f1f2e41a002cd331e5e134d71
+AUX octave-4.2.0-fix-qscintilla-detection.patch 436 SHA256 6ff0648db1b2a2d4e8dd90ed4452a2c0ff7dc3e948eed5accf54d379ed2fe8f3 SHA512 5cee5fbd5c78228e1b179d5541a5ba1fc23e71db1552cb5b2759ed131ba743787b52875aa54527bb3d8f1949061627e72c9cbd253feba5af99f34f228c4a65f7 WHIRLPOOL f476b7fce406937a20821e7550815b776568a22980c8fec42c0b74d55f2f56f37e99e6e0857d87b75528aabf04cf03a71de33f0123d5fb55d5ece7e44629f929
+AUX octave-4.2.0-imagemagick-configure.patch 735 SHA256 9bcf6f6591b691b244eabb172dc55de4afb45a6fa9064b64779f96ae9440977b SHA512 357c46f93b0a998c6966fca1bd97a04641dd9e77251378e945f815a518b55b0ec991c46d209173c23954346bdb5ba914c82a3141e85744aeb7e58a6376be3d5d WHIRLPOOL 1dc87651bbfc77c48afc0776b9b5ab47f55b48587d162ceefd04875af1f09752a21c622f9f864e45090d1eba63ee2a1eabb416976d233e7c60b07c77db2a3495
+AUX octave-4.2.0-imagemagick.patch 5945 SHA256 9ca1bcd8970cb4f05a96a48e1d3bed226c1f44b433a88ab1a00d111bb0dbb923 SHA512 061c941cd23a3565f35c70bfaf0db23ea62f70e8943794216b00cb1d8ced201859f98eae5aba5f566627a301745691b53aa6a62cf9bfc0ee9d99159859ceb593 WHIRLPOOL dd149d5a81dd9c0ed84d6be1ecc85c1cb00d1543ed08bb618d680f42114bd965b922bd20e360c49cd80f54cfc11b1ed130a08d8210e08babaa48777d8c09618a
+AUX octave-4.2.0-ncurses-pkgconfig.patch 1034 SHA256 3ee43b241a62e63970effc6ed1b215c43081a595bbe23f622468e523a6dfdfa9 SHA512 8f5e8dc2506ff0483db2823aa87544ad52a7b65d658db32c9a224aab2adac286892665068170af2d898b372dd6e176123f5516456b7f98e4c0ce5a71559c825f WHIRLPOOL 29b395db7fbda84a5364864e06dede8e8145fd246f0adafb0084524af451e0213b37bee2da36bac2399e8a133a605f1699c118452afb0a667637017882b4adae
+AUX octave-4.2.0-pkgbuilddir.patch 1346 SHA256 2f6c243d9619ab90144a7a501d4549960671eec197351fbca04f5df75f3af13b SHA512 7dc10b4d27aa0fb4443dffaa28c84843d9c233172eb1c7b7d93d196434ea7db9c330b3152def21829e483ab3765423927e70718ca0662ae7aeba3a1a8540fa19 WHIRLPOOL 919936ac50e45c30999b2387121969dd4056497a2dc1a2445202f76b4e0ed528114cc0c6799f03d02cd6eac48944b34054d01c4652f3858cea0c9dc1f711bf3e
+AUX octave-4.2.0-texi.patch 557 SHA256 8506cc1ee125da4f8a84b83921600bb72eb3fbed085b510cee42ef31f36bf5fb SHA512 1d4a6ce92ffde0945858b605cb37ed7c91abca201dd2c7f0d974852ef65c59e638a91aa219612c7acf9b46a0743a4a5e0ccbe590a8a056efd0d9d3293928c56a WHIRLPOOL 868052f5c4e5bd2cfb05e0964938e27c9f41ad5ea54449a3b898dfc0b4835bd631f36582c59ee7d093e2fc172bacb6f1d876d78ee765764bad6017ca73fefb04
+AUX octave-4.2.0-zlib-underlinking.patch 275 SHA256 978280090f7e490c5e5b92785854b6dbe2971e1c7ed9c1f3c087a6e6f61a40e8 SHA512 093b13ad457e290d746908a5de1855071b2cd27b4c08101826d32fcf63398e863c3b72bb81f19255a04a880a2bf49e3ced1141bf7d0044db1328c6f2c9492f66 WHIRLPOOL 0acf0d4798b1895ecb4cdda607d1e8ef6cbe1feb9f856af758c0fe7a96216989e5f6f402c6e46cbacb592415d770cb53c255c5efa3612667325bc6479b2ace82
+DIST octave-4.2.1.tar.gz 25409651 SHA256 80c28f6398576b50faca0e602defb9598d6f7308b0903724442c2a35a605333b SHA512 c437c57eb145ddea7b97124dc6406d130fd91c9141198b93bc756bb05cb3f7645a7c591443faeb65e69edf6abc2b8d5612e515f7703a04eed27213a2133009b7 WHIRLPOOL 4488287a9223ed99fe4ff3423f8ea5157cb538eb54918a53024082083a2f22d2af751f7dde0e489266a518d6ea5265e9c68536b5d5d9a186919d9979e9575333
+EBUILD octave-4.2.1.ebuild 4971 SHA256 341a4d9f62a10b146a1a024d56bc89e3430f1ab59ce911057f0a816a6ff748da SHA512 0f87f0a29c8810cf6a5b70fbb661dcab35003099ac02ee2ae2637b02fa018adfd24a5379fc64ebcc6dff84f535fcc4e90dbcf3b438886d6521045d03d24668f4 WHIRLPOOL 80e749ffc761d151471746f76ef1f387c10ced9262f8fa351f2b638edb4fdafaf62b5588fab2f124d502d5ce748266eff4ad44b5dd18b55fcec7f8e3fd3a55fc
+MISC ChangeLog 10421 SHA256 a856a8962d34922fc2ed7f2345a83ab03937524faa8a0a83ff32ee50455336cf SHA512 1ca5674025c9f72425452de62e1f6ad4ff236283fba2e404c2282136ec7f7fdddd77493bd46ec617471bc45a60811f448a03629e78c7f432fbe70868a36dec1f WHIRLPOOL 947a12ff673a4ee9b208b4afbda2e5d239d3f09a54cb9d1502680d64e2e9ece4e62cdd92af376dd8ea2eadd9db6a91e09403490bac831f76638f6ff83767dec7
+MISC ChangeLog-2015 41905 SHA256 3688b26c076960fc6333348eb2df642f2f8eb588413207b3dc295a2c1f50cb8e SHA512 ed629d1a6e5c0f8bb2f8e7e9a781d8e82423a50ac99f60050d41d183c39e60108cdf9709c09bf71a0a4e888c44d68be06579958d65f066473c248a348d52af85 WHIRLPOOL 0dff1cde4f4e65952c86b5a9f527b61edbb2c87320d7012f1827597bd1f04d9bec60246ecc1b2c55d05a389a5f5af35d7f579e3be9848d2ec6927d754f448060
+MISC metadata.xml 1199 SHA256 f956dc2b28a8ed8806476f32cbf69cf8e160a53fe8c8946cc2bdfa9c35ab5a93 SHA512 aebb1728f0ca59ba83b649eea72c267c530efc0b97b12f0d7958ba8de0f482fcb37245cf93bc188c9368686e0feafc44da4a7dd97d6bab8246309945fee8f7a4 WHIRLPOOL c56e887c29f69873c84a0bcff0907100a76414b50500c388107e67374c84a57d8a6e27f144ac55c6c4c71bf64d08d00b30fab71d347aa9613d41cb1808767f72
diff --git a/sci-mathematics/octave/files/octave-4.2.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch b/sci-mathematics/octave/files/octave-4.2.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch
new file mode 100644
index 000000000000..f6fa7be3b28f
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch
@@ -0,0 +1,11 @@
+--- a/m4/getcwd.m4
++++ b/m4/getcwd.m4
+@@ -110,7 +110,7 @@
+
+ gl_abort_bug=no
+ case "$host_os" in
+- mingw*)
++ *-gnu* | gnu* | mingw*)
+ gl_cv_func_getcwd_path_max=yes
+ ;;
+ *)
diff --git a/sci-mathematics/octave/files/octave-4.2.0-fix-qscintilla-detection.patch b/sci-mathematics/octave/files/octave-4.2.0-fix-qscintilla-detection.patch
new file mode 100644
index 000000000000..ea714ecbfbbf
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-fix-qscintilla-detection.patch
@@ -0,0 +1,14 @@
+In Gentoo, QScintilla for Qt5 has the same library name
+as its Qt4 variant.
+
+--- a/m4/acinclude.m4
++++ b/m4/acinclude.m4
+@@ -1327,7 +1327,7 @@
+ ;;
+ 5)
+ QT_MODULES="Qt5Core Qt5Gui Qt5Network Qt5OpenGL Qt5PrintSupport"
+- octave_qscintilla_libnames="qscintilla2-qt5 qt5scintilla2"
++ octave_qscintilla_libnames="qscintilla2_qt5 qscintilla2"
+ ;;
+ *)
+ AC_MSG_ERROR([Unrecognized Qt version $qt_version])
diff --git a/sci-mathematics/octave/files/octave-4.2.0-imagemagick-configure.patch b/sci-mathematics/octave/files/octave-4.2.0-imagemagick-configure.patch
new file mode 100644
index 000000000000..d5b2870185bb
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-imagemagick-configure.patch
@@ -0,0 +1,16 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -1560,11 +1560,11 @@
+ MAGICK_LIBS=
+
+ PKG_CHECK_EXISTS([$magick++], [
+- ## Make sure we only get -I, -L, and -l flags. Some Graphics/ImageMagick++
++ ## Make sure we only get -I, -D, -L, and -l flags. Some Graphics/ImageMagick++
+ ## packages add extra flags that are useful when building
+ ## Graphics/ImageMagick++ extentions. These extra flags break the
+ ## Octave build.
+- MAGICK_CPPFLAGS=`$PKG_CONFIG --cflags-only-I $magick++`
++ MAGICK_CPPFLAGS=`$PKG_CONFIG --cflags $magick++ | sed -e 's/\(-@<:@DI@:>@@<:@^ \t@:>@*\)\|\(-@<:@^ \t@:>@*\)/\1/g'`
+ MAGICK_LDFLAGS=`$PKG_CONFIG --libs-only-L $magick++`
+ MAGICK_LIBS=`$PKG_CONFIG --libs-only-l $magick++`
+
diff --git a/sci-mathematics/octave/files/octave-4.2.0-imagemagick.patch b/sci-mathematics/octave/files/octave-4.2.0-imagemagick.patch
new file mode 100644
index 000000000000..8fb786964c20
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-imagemagick.patch
@@ -0,0 +1,139 @@
+--- a/libinterp/corefcn/__magick_read__.cc
++++ b/libinterp/corefcn/__magick_read__.cc
+@@ -39,7 +39,15 @@
+
+ #if defined (HAVE_MAGICK)
+
++#define MAGICKCORE_EXCLUDE_DEPRECATED 1
+ #include <Magick++.h>
++#if !defined(QuantumRange) && defined(MaxRGB)
++#define QuantumRange MaxRGB
++#endif
++#if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(QuantumDepth)
++#define MAGICKCORE_QUANTUM_DEPTH QuantumDepth
++#endif
++
+ #include <clocale>
+
+ // In theory, it should be enough to check the class:
+@@ -121,6 +129,9 @@
+ get_depth (Magick::Image& img)
+ {
+ octave_idx_type depth = img.depth ();
++#if defined(MagickLibVersion) && (MagickLibVersion <= 0x686)
++#define Magick MagickCore
++#endif
+ if (depth == 8
+ && img.channelDepth (Magick::RedChannel) == 1
+ && img.channelDepth (Magick::GreenChannel) == 1
+@@ -132,6 +143,9 @@
+ && img.channelDepth (Magick::OpacityChannel) == 1
+ && img.channelDepth (Magick::GrayChannel) == 1)
+ depth = 1;
++#if defined(MagickLibVersion) && (MagickLibVersion <= 0x686)
++#undef Magick
++#endif
+
+ return depth;
+ }
+@@ -355,7 +369,10 @@
+ if (imvec[def_elem].depth () == 32)
+ divisor = std::numeric_limits<uint32_t>::max ();
+ else
+- divisor = MaxRGB / ((uint64_t (1) << imvec[def_elem].depth ()) - 1);
++ {
++ using namespace Magick;
++ divisor = QuantumRange / ((uint64_t (1) << imvec[def_elem].depth ()) - 1);
++ }
+
+ // FIXME: this workaround should probably be fixed in GM by creating a
+ // new ImageType BilevelMatteType
+@@ -489,7 +506,8 @@
+ for (octave_idx_type row = 0; row < nRows; row++)
+ {
+ img_fvec[idx] = pix->red / divisor;
+- a_fvec[idx] = (MaxRGB - pix->opacity) / divisor;
++ using namespace Magick;
++ a_fvec[idx] = (QuantumRange - pix->opacity) / divisor;
+ pix += row_shift;
+ idx++;
+ }
+@@ -568,7 +586,8 @@
+ rbuf[idx] = pix->red / divisor;
+ gbuf[idx] = pix->green / divisor;
+ bbuf[idx] = pix->blue / divisor;
+- a_fvec[a_idx++] = (MaxRGB - pix->opacity) / divisor;
++ using namespace Magick;
++ a_fvec[a_idx++] = (QuantumRange - pix->opacity) / divisor;
+ pix += row_shift;
+ idx++;
+ }
+@@ -655,7 +674,8 @@
+ mbuf[idx] = pix->green / divisor;
+ ybuf[idx] = pix->blue / divisor;
+ kbuf[idx] = pix->opacity / divisor;
+- a_fvec[a_idx++] = (MaxRGB - *apix) / divisor;
++ using namespace Magick;
++ a_fvec[a_idx++] = (QuantumRange - *apix) / divisor;
+ pix += row_shift;
+ idx++;
+ }
+@@ -732,10 +752,11 @@
+ // depth is 8, there's a good chance that we will be limited. It
+ // is also the GraphicsMagick recommended setting and the default
+ // for ImageMagick.
+- if (QuantumDepth < 16)
++ using namespace Magick;
++ if (MAGICKCORE_QUANTUM_DEPTH < 16)
+ warning_with_id ("Octave:GraphicsMagic-Quantum-Depth",
+ "your version of %s limits images to %d bits per pixel\n",
+- MagickPackageName, QuantumDepth);
++ MagickPackageName, MAGICKCORE_QUANTUM_DEPTH);
+
+ initialized = true;
+ }
+@@ -1094,8 +1115,9 @@
+ // From GM documentation:
+ // Color arguments are must be scaled to fit the Quantum size according to
+ // the range of MaxRGB
++ using namespace Magick;
+ const double divisor = static_cast<double>((uint64_t (1) << bitdepth) - 1)
+- / MaxRGB;
++ / QuantumRange;
+
+ const P *img_fvec = img.fortran_vec ();
+ const P *a_fvec = alpha.fortran_vec ();
+@@ -1147,8 +1169,9 @@
+ for (octave_idx_type row = 0; row < nRows; row++)
+ {
+ double grey = octave::math::round (double (*img_fvec) / divisor);
++ using namespace Magick;
+ Magick::Color c (grey, grey, grey,
+- MaxRGB - octave::math::round (double (*a_fvec) / divisor));
++ QuantumRange - octave::math::round (double (*a_fvec) / divisor));
+ pix[GM_idx] = c;
+ img_fvec++;
+ a_fvec++;
+@@ -1216,10 +1239,11 @@
+ {
+ for (octave_idx_type row = 0; row < nRows; row++)
+ {
++ using namespace Magick;
+ Magick::Color c (octave::math::round (double (*img_fvec) / divisor),
+ octave::math::round (double (img_fvec[G_offset]) / divisor),
+ octave::math::round (double (img_fvec[B_offset]) / divisor),
+- MaxRGB - octave::math::round (double (*a_fvec) / divisor));
++ QuantumRange - octave::math::round (double (*a_fvec) / divisor));
+ pix[GM_idx] = c;
+ img_fvec++;
+ a_fvec++;
+@@ -1297,7 +1321,8 @@
+ octave::math::round (double (img_fvec[Y_offset]) / divisor),
+ octave::math::round (double (img_fvec[K_offset]) / divisor));
+ pix[GM_idx] = c;
+- ind[GM_idx] = MaxRGB - octave::math::round (double (*a_fvec) / divisor);
++ using namespace Magick;
++ ind[GM_idx] = QuantumRange - octave::math::round (double (*a_fvec) / divisor);
+ img_fvec++;
+ a_fvec++;
+ GM_idx += nCols;
diff --git a/sci-mathematics/octave/files/octave-4.2.0-ncurses-pkgconfig.patch b/sci-mathematics/octave/files/octave-4.2.0-ncurses-pkgconfig.patch
new file mode 100644
index 000000000000..89f6f6e7014d
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-ncurses-pkgconfig.patch
@@ -0,0 +1,37 @@
+--- a/m4/acinclude.m4
++++ b/m4/acinclude.m4
+@@ -1194,32 +1194,8 @@
+ dnl Find a suitable termlib to use.
+ dnl
+ AC_DEFUN([OCTAVE_CHECK_LIB_TERMLIB], [
+- TERM_LIBS=
+- ac_octave_save_LIBS="$LIBS"
+- AC_SEARCH_LIBS([tputs],
+- [ncurses curses termcap terminfo termlib],
+- [], [])
+- LIBS="$ac_octave_save_LIBS"
+- case "$ac_cv_search_tputs" in
+- -l*)
+- TERM_LIBS="$ac_cv_search_tputs"
+- ;;
+- no)
+- warn_termlibs="I couldn't find -ltermcap, -lterminfo, -lncurses, -lcurses, or -ltermlib!"
+- AC_MSG_WARN([$warn_termlibs])
+- ;;
+- esac
+-
+-dnl Old code (9/9/2012). Delete when new code is definitely proven.
+-dnl
+-dnl for _termlib in ncurses curses termcap terminfo termlib; do
+-dnl AC_CHECK_LIB([${_termlib}], [tputs], [
+-dnl TERM_LIBS="-l${termlib}"
+-dnl octave_cv_lib_found_termlib=yes
+-dnl break])
+-dnl done
+-
+- AC_SUBST(TERM_LIBS)
++ PKG_CHECK_MODULES([TERM], [ncurses])
++ CPPFLAGS="${CPPFLAGS} ${TERM_CFLAGS}"
+ ])
+ dnl
+ dnl Check for the Qhull version.
diff --git a/sci-mathematics/octave/files/octave-4.2.0-pkgbuilddir.patch b/sci-mathematics/octave/files/octave-4.2.0-pkgbuilddir.patch
new file mode 100644
index 000000000000..a72ac97c0a15
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-pkgbuilddir.patch
@@ -0,0 +1,41 @@
+--- a/scripts/pkg/private/install.m
++++ b/scripts/pkg/private/install.m
+@@ -62,7 +62,14 @@
+ for i = 1:length (files)
+ tgz = files{i};
+
+- if (exist (tgz, "file"))
++ ## The filename pointed to an uncompressed package to begin with.
++ if (exist (tgz, "dir"))
++ if (tgz(1) == '/')
++ packdir = tgz;
++ else
++ packdir = fullfile (pwd(), tgz);
++ endif
++ elseif (exist (tgz, "file"))
+ ## Create a temporary directory.
+ tmpdir = tempname ();
+ tmpdirs{end+1} = tmpdir;
+@@ -89,20 +96,12 @@
+ if (length (dirlist) > 3)
+ error ("bundles of packages are not allowed");
+ endif
+- endif
+
+- ## The filename pointed to an uncompressed package to begin with.
+- if (exist (tgz, "dir"))
+- dirlist = {".", "..", tgz};
++ ## The two first entries of dirlist are "." and "..".
++ packdir = fullfile (tmpdir, dirlist{3});
+ endif
+
+ if (exist (tgz, "file") || exist (tgz, "dir"))
+- ## The two first entries of dirlist are "." and "..".
+- if (exist (tgz, "file"))
+- packdir = fullfile (tmpdir, dirlist{3});
+- else
+- packdir = fullfile (pwd (), dirlist{3});
+- endif
+ packdirs{end+1} = packdir;
+
+ ## Make sure the package contains necessary files.
diff --git a/sci-mathematics/octave/files/octave-4.2.0-texi.patch b/sci-mathematics/octave/files/octave-4.2.0-texi.patch
new file mode 100644
index 000000000000..1352ff5a1f75
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-texi.patch
@@ -0,0 +1,11 @@
+--- a/doc/interpreter/module.mk
++++ b/doc/interpreter/module.mk
+@@ -298,6 +298,8 @@
+ $(AWK) -f $(srcdir)/doc/interpreter/mkcontrib.awk $(srcdir)/doc/interpreter/contributors.in > $@-t && \
+ mv $@-t $@
+
++doc/interpreter/preface.texi: doc/interpreter/contributors.texi
++
+ AUTHORS: doc/interpreter/preface.texi doc/interpreter/contributors.texi | doc/interpreter/$(octave_dirstamp)
+ $(AM_V_MAKEINFO)rm -f $@-t $@ && \
+ if [ "x$(srcdir)" != "x." ] && [ -f $(srcdir)/doc/interpreter/contributors.texi ] && [ ! -f doc/interpreter/contributors.texi ]; then \
diff --git a/sci-mathematics/octave/files/octave-4.2.0-zlib-underlinking.patch b/sci-mathematics/octave/files/octave-4.2.0-zlib-underlinking.patch
new file mode 100644
index 000000000000..0c8736069d8e
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-4.2.0-zlib-underlinking.patch
@@ -0,0 +1,10 @@
+--- a/libinterp/corefcn/module.mk
++++ b/libinterp/corefcn/module.mk
+@@ -318,6 +318,7 @@
+ $(HDF5_CPPFLAGS) \
+ $(LLVM_CPPFLAGS) \
+ $(Z_CPPFLAGS)
++libinterp_corefcn_libcorefcn_la_LIBADD = $(Z_LIBS)
+
+ libinterp_corefcn_libcorefcn_la_CFLAGS = $(AM_CFLAGS) $(WARN_CFLAGS)
+
diff --git a/sci-mathematics/octave/metadata.xml b/sci-mathematics/octave/metadata.xml
new file mode 100644
index 000000000000..c11ec7171e00
--- /dev/null
+++ b/sci-mathematics/octave/metadata.xml
@@ -0,0 +1,19 @@
+<?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">
+ Octave is a high-level language, primarily intended for numerical computations. It provides a convenient command line interface for solving linear and nonlinear problems numerically, and for performing other numerical experiments. It may also be used as a batch-oriented language.
+ </longdescription>
+ <use>
+ <flag name="glpk">Add support for <pkg>sci-mathematics/glpk</pkg> for linear programming</flag>
+ <flag name="gui">Enable the graphical user interface</flag>
+ <flag name="openssl">Use <pkg>dev-libs/openssl</pkg> for low level hash functions</flag>
+ <flag name="qhull">Add support for <pkg>media-libs/qhull</pkg>, to allow `delaunay', `convhull', and related functions</flag>
+ <flag name="qrupdate">Add support for <pkg>sci-libs/qrupdate</pkg>for QR and Cholesky update functions</flag>
+ <flag name="sparse">Add enhanced support for sparse matrix algebra with SuiteSparse</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/octave/octave-4.2.1.ebuild b/sci-mathematics/octave/octave-4.2.1.ebuild
new file mode 100644
index 000000000000..e7ecf516cc42
--- /dev/null
+++ b/sci-mathematics/octave/octave-4.2.1.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic fortran-2 java-pkg-opt-2 pax-utils toolchain-funcs xdg-utils
+
+DESCRIPTION="High-level interactive language for numerical computations"
+LICENSE="GPL-3"
+HOMEPAGE="http://www.octave.org/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+SLOT="0/${PV}"
+IUSE="curl doc fftw +glpk gnuplot graphicsmagick gui hdf5 +imagemagick java opengl openssl
+ portaudio postscript +qhull +qrupdate readline sndfile +sparse static-libs X zlib"
+KEYWORDS="amd64 ~arm hppa ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ app-arch/bzip2
+ app-text/ghostscript-gpl
+ dev-libs/libpcre:3=
+ sys-libs/ncurses:0=
+ sys-libs/zlib
+ virtual/blas
+ virtual/lapack
+ curl? ( net-misc/curl:0= )
+ fftw? ( sci-libs/fftw:3.0= )
+ glpk? ( sci-mathematics/glpk:0= )
+ gnuplot? ( sci-visualization/gnuplot )
+ hdf5? ( sci-libs/hdf5:0= )
+ imagemagick? (
+ !graphicsmagick? ( media-gfx/imagemagick:=[cxx] )
+ graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] )
+ )
+ java? ( >=virtual/jre-1.6.0:* )
+ opengl? (
+ media-libs/freetype:2=
+ media-libs/fontconfig:1.0=
+ >=x11-libs/fltk-1.3:1=[opengl,xft]
+ x11-libs/gl2ps:0=
+ virtual/glu
+ )
+ openssl? ( dev-libs/openssl:0= )
+ portaudio? ( media-libs/portaudio )
+ postscript? (
+ app-text/epstool
+ media-gfx/pstoedit
+ media-gfx/transfig
+ )
+ qhull? ( media-libs/qhull:0= )
+ qrupdate? ( sci-libs/qrupdate:0= )
+ gui? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtopengl:5
+ >=x11-libs/qscintilla-2.9.3-r2:=[qt5(+)]
+ )
+ readline? ( sys-libs/readline:0= )
+ sndfile? ( media-libs/libsndfile )
+ sparse? (
+ sci-libs/arpack:0=
+ sci-libs/camd:0=
+ sci-libs/ccolamd:0=
+ sci-libs/cholmod:0=
+ sci-libs/colamd:0=
+ sci-libs/cxsparse:0=
+ sci-libs/umfpack:0=
+ )
+ X? ( x11-libs/libX11:0= )"
+DEPEND="${RDEPEND}
+ gui? ( dev-qt/linguist-tools:5 )
+ qrupdate? ( app-misc/pax-utils )
+ sparse? ( app-misc/pax-utils )
+ java? ( >=virtual/jdk-1.6.0 )
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-fontsrecommended
+ || ( dev-texlive/texlive-plaingeneric dev-texlive/texlive-genericrecommended )
+ dev-texlive/texlive-metapost
+ )
+ sys-apps/texinfo
+ dev-util/gperf
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.2.0-texi.patch
+ "${FILESDIR}"/${PN}-4.2.0-disable-getcwd-path-max-test-as-it-is-too-slow.patch
+ "${FILESDIR}"/${PN}-4.2.0-imagemagick-configure.patch
+ "${FILESDIR}"/${PN}-4.2.0-imagemagick.patch
+ "${FILESDIR}"/${PN}-4.2.0-pkgbuilddir.patch
+ "${FILESDIR}"/${PN}-4.2.0-ncurses-pkgconfig.patch
+ "${FILESDIR}"/${PN}-4.2.0-zlib-underlinking.patch
+ "${FILESDIR}"/${PN}-4.2.0-fix-qscintilla-detection.patch
+)
+
+src_prepare() {
+ # nasty prefix hacks for fltk:1 and qt4 linking
+ if use prefix; then
+ use opengl && append-ldflags -Wl,-rpath,"${EPREFIX}/usr/$(get_libdir)/fltk-1"
+ fi
+
+ # occasional fail on install, force regeneration (bug #401189)
+ rm doc/interpreter/contributors.texi || die
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # [QA] detect underlinking #593670
+ append-ldflags $(test-flags-CXX -Wl,-z,defs)
+
+ # unfortunate dependency on mpi from hdf5 (bug #302621)
+ use hdf5 && has_version sci-libs/hdf5[mpi] && \
+ export CXX=mpicxx CC=mpicc FC=mpif77 F77=mpif77
+
+ econf \
+ --localstatedir="${EPREFIX}/var/state/octave" \
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
+ --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)" \
+ --disable-64 \
+ --disable-jit \
+ --enable-shared \
+ --with-z \
+ --with-bz2 \
+ --without-OSMesa \
+ $(use_enable static-libs static) \
+ $(use_enable doc docs) \
+ $(use_enable java) \
+ $(use_enable readline) \
+ $(use_with curl) \
+ $(use_with fftw fftw3) \
+ $(use_with fftw fftw3f) \
+ $(use_enable fftw fftw-threads) \
+ $(use_with glpk) \
+ $(use_with hdf5) \
+ $(use_with imagemagick magick $(usex graphicsmagick GraphicsMagick ImageMagick)) \
+ $(use_with opengl) \
+ $(use_with opengl fltk) \
+ $(use_with openssl) \
+ $(use_with portaudio) \
+ $(use_with qhull) \
+ $(use_with qrupdate) \
+ $(use_with gui qt 5) \
+ $(use_with sndfile) \
+ $(use_with sparse arpack) \
+ $(use_with sparse umfpack) \
+ $(use_with sparse colamd) \
+ $(use_with sparse ccolamd) \
+ $(use_with sparse cholmod) \
+ $(use_with sparse cxsparse) \
+ $(use_with X x)
+}
+
+src_compile() {
+ default
+ if use java; then
+ pax-mark m "${S}/src/.libs/octave-cli"
+ fi
+}
+
+src_install() {
+ default
+ if use doc; then
+ dodoc $(find doc -name '*.pdf')
+ else
+ # bug 566134, macros.texi is installed by make install if use doc
+ insinto /usr/share/${PN}/${PV}/etc
+ doins doc/interpreter/macros.texi
+ fi
+ [[ -e test/fntests.log ]] && dodoc test/fntests.log
+ use java && \
+ java-pkg_regjar "${ED%/}/usr/share/${PN}/${PV}/m/java/octave.jar"
+ echo "LDPATH=${EPREFIX}/usr/$(get_libdir)/${PN}/${PV}" > 99octave || die
+ doenvd 99octave
+}
+
+pkg_postinst() {
+ xdg_mimeinfo_database_update
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ xdg_mimeinfo_database_update
+ xdg_desktop_database_update
+}
diff --git a/sci-mathematics/otter/Manifest b/sci-mathematics/otter/Manifest
new file mode 100644
index 000000000000..4eb4716145cc
--- /dev/null
+++ b/sci-mathematics/otter/Manifest
@@ -0,0 +1,7 @@
+AUX otter-3.3-build.patch 3072 SHA256 03f1adfca5d49f0bb3d688e8b68341242213d1213e50697eda9c0cc85a7c6bca SHA512 6f961b9fc629fd7ddc0092f12286d6361503e540dd5a9ff2e48a33b95e6122b2ac78a438e1abd765ee4d269062734c28ec2fc997a1b00011e2fdd34812dd228d WHIRLPOOL 036351b5efcebc91552a5aa00ee6d08a0694fdc345c6f3a3b976d5336cf8f2290639e34f80aa480fe6895fbba9deab511540ce13ab91b4d12ea7c9842c8850bb
+AUX otter-3.3-gold.patch 503 SHA256 4699ad771f06f0e7c1384fdfaa2c77f893670a443f762e30679610f299ed3cc1 SHA512 66e4d3f246a1d4efbfdc8b3442bd269990d9c23b90426123ba2ef04b181179fe3a20f39e49bc67c2ad9158946fb0611e4b5700825b27b1af5226ab66fdee16c8 WHIRLPOOL 4059234b3279eff24296be3adae25bcc68a1884b3d888ddd3760117f47fc29479fb66bce22a34b0d8d7b185e17b448f5b1726a733ec2636c75541e7adeb9f957
+DIST otter-3.3.tar.gz 2809092 SHA256 40d7399e96491bcdabce1427c58945b3cfa414e1cefb8edae7bbea02dd6c0249 SHA512 c33d0f89cec647567cb84467a0adff2cd6023d7713f207ceca1736567b40be4ed6ab98f2ded151fa8dac7184a653cd00358ef8b18cf407ac8387d200e6dc073f WHIRLPOOL d2e66951128fb1dfc7fd594d4beb363e1a8c2dfa9df44bc3a89501719426b22b484d3df9ea07051198d58a6ed90a6ddfc52f674139f48dcf32eb5a66f4428196
+EBUILD otter-3.3-r3.ebuild 782 SHA256 ac83124e7227dd6358e6de78000c205e988b75f3b9d8016d9656d7ccdb72e653 SHA512 52786e5b9a7893321503e885a0d4f84cf1a8f3ba0bf6ea5ba0947d052270f662d4fec3f53f86d99a65a15b76e693f2aeb06c7701743b8ca3a399cb774a6ecfd0 WHIRLPOOL 2d1594fb296ba3561316bb8fe0f2499cf0ac68773aa69e8ddac3365bae3b50d8a67e3a78c63620bc3b2edf1a3b10dbc5baf023e5878d8cdd0b0fc8568cc3a9bc
+MISC ChangeLog 2541 SHA256 6d0a12ad0528841c2b4e0de0819c272c645146cca841b0767735a6afff841727 SHA512 93314bfe2ae50f3d5089938accacc04449237db229a64143dcfb45ea0cf568e5d9d390bc47f7c72df2fd262e686aad089fd42616f0039ba7b715456e5a72059a WHIRLPOOL 95abc7c5560bb64155895ee84a2dc1ad7af44242fc8fa0802f06f6eb47d5852e69e2ce14ce005473ac02bed303aea2385109e97163e533dbea7e83791ca86928
+MISC ChangeLog-2015 3516 SHA256 51c191ac900016229f9a8e81cbd8daa295395216b50a8c536984fe9263172325 SHA512 aa98b4d8b3f38db2cf9cb0223cebfffdabd9185bad60d7712cbd648b9cfc45ff4836398783e6b66d02a728148c3807e5bbe468cb52cb36d7968ecbc3e53639f8 WHIRLPOOL ea0c1be5985bcb51b21148d5ccd2876054a8fef8e53ef0e5aa72ac9b5b0b60b4b43c65459353d47e8004f0c1ccd9103cbe1bb953b1534268eec15df867f5c0d7
+MISC metadata.xml 253 SHA256 45344b6a377f639b56950e98338690fa1e0c5b51d2bf174635aff3b025b7e616 SHA512 819062e1ccefa39fc7f577279b08e781b9631eb14b7794db691ab92263c013ca432d279ac08671b19c80f7effb8c67528e5221278c573dd29dc0354bbff4a77e WHIRLPOOL 73680e667729b1d31cac7b2b730a5d94195071c96383438c66c4a94e445fe874e78d3e5e2c9c5a6d77406dc392eab967595402e063e557f9a3680714d709e830
diff --git a/sci-mathematics/otter/files/otter-3.3-build.patch b/sci-mathematics/otter/files/otter-3.3-build.patch
new file mode 100644
index 000000000000..b933d86252d6
--- /dev/null
+++ b/sci-mathematics/otter/files/otter-3.3-build.patch
@@ -0,0 +1,114 @@
+diff -Naur otter-3.3/mace2/Makefile otter-3.3.new/mace2/Makefile
+--- otter-3.3/mace2/Makefile 2003-08-06 10:18:09.000000000 -0400
++++ otter-3.3.new/mace2/Makefile 2010-01-12 19:41:44.000000000 -0500
+@@ -1,8 +1,8 @@
+ DFLAGS = -DTP_NAMES -DTP_SIGNAL -DTP_RUSAGE
+
+-CC = gcc
++#CC = gcc
+
+-CFLAGS = -O $(DFLAGS)
++CFLAGS += $(DFLAGS)
+
+ # CFLAGS = -g $(DFLAGS)
+
+@@ -12,20 +12,17 @@
+ OBJECTS = clock.o avail.o opts.o stats.o miscellany.o flatten.o\
+ dp.o generate.o print.o part.o
+
+-all: mace2 anldp install clean
++all: mace2 anldp
+
+ mace2: mace2.o $(OBJECTS)
+- $(CC) $(CFLAGS) mace2.o $(OBJECTS) ../source/libotter.a -o mace2
++ $(CC) $(CFLAGS) $(LDFLAGS) mace2.o $(OBJECTS) ../source/libotter.a -o ../bin/mace2
+
+ anldp: anldp.o $(OBJECTS)
+- $(CC) $(CFLAGS) anldp.o $(OBJECTS) ../source/libotter.a -o anldp
++ $(CC) $(CFLAGS) $(LDFLAGS) anldp.o $(OBJECTS) ../source/libotter.a -o ../bin/anldp
+
+ mace2.o anldp.o $(OBJECTS): Mace2.h Clock.h Avail.h Opts.h Stats.h\
+ Miscellany.h Dp.h Generate.h Flatten.h Part.h
+
+-install:
+- /bin/mv mace2 anldp ../bin
+-
+ clean:
+ /bin/rm -f *.o
+
+diff -Naur otter-3.3/source/Makefile otter-3.3.new/source/Makefile
+--- otter-3.3/source/Makefile 2003-08-06 21:48:29.000000000 -0400
++++ otter-3.3.new/source/Makefile 2010-01-12 19:58:16.000000000 -0500
+@@ -66,7 +66,7 @@
+ # Specify the C compiler. I recommend gcc (GNU C Compiler) if you have it.
+ # In many Linux environments, cc is just a symlink to gcc.
+
+-CC = gcc
++#CC = gcc
+
+ #############################################################################
+ #
+@@ -74,7 +74,7 @@
+ #
+ # optimized
+
+-CFLAGS = -O $(DFLAGS)
++CFLAGS += $(DFLAGS)
+
+ #
+ # check for strict ANSI conformance with Solaris cc:
+@@ -108,19 +108,20 @@
+
+ #############################################################################
+
+-all: otter install clean
++all: formed
++
++formed: otter
++ +make -C formed clean
++ +make -C formed
+
+ otter: main.o libotter.a
+- $(CC) $(CFLAGS) main.o libotter.a -o otter
++ $(CC) $(CFLAGS) $(LDFLAGS) main.o libotter.a -o ../bin/otter
+
+ libotter.a: $(OBJECTS)
+ $(AR) rs libotter.a $(OBJECTS)
+
+ main.o $(OBJECTS): header.h types.h macros.h cos.h proto.h foreign.h lisp.h
+
+-install:
+- /bin/mv otter ../bin
+-
+ clean:
+ /bin/rm -f *.o
+
+diff -Naur otter-3.3/source/formed/Makefile otter-3.3.new/source/formed/Makefile
+--- otter-3.3/source/formed/Makefile 2003-07-21 15:34:44.000000000 -0400
++++ otter-3.3.new/source/formed/Makefile 2010-01-12 19:37:46.000000000 -0500
+@@ -1,14 +1,14 @@
+
+ DFLAGS = -DTP_NAMES -DTP_SIGNAL -DTP_FORK -DTP_RUSAGE
+
+-CC = gcc
++#CC = gcc
+
+ #############################################################################
+ # Specify the compiler flags; include DFLAGS (above)
+ #
+ # optimized
+
+-CFLAGS = -O $(DFLAGS)
++CFLAGS += $(DFLAGS)
+
+ #
+ # save symbols for debuggers
+@@ -40,7 +40,7 @@
+ XLIBS = -L/usr/X11R6/lib -lXaw
+
+ formed: formed.o display.o callback.o
+- $(CC) $(CFLAGS) formed.o display.o callback.o \
++ $(CC) $(CFLAGS) $(LDFLAGS) formed.o display.o callback.o \
+ ../libotter.a $(XLIBS) -o formed
+
+ display.o callback.o formed.o: formed.h
diff --git a/sci-mathematics/otter/files/otter-3.3-gold.patch b/sci-mathematics/otter/files/otter-3.3-gold.patch
new file mode 100644
index 000000000000..a41672321d67
--- /dev/null
+++ b/sci-mathematics/otter/files/otter-3.3-gold.patch
@@ -0,0 +1,16 @@
+ source/formed/Makefile | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/source/formed/Makefile b/source/formed/Makefile
+index 39eaae5..7526c03 100644
+--- a/source/formed/Makefile
++++ b/source/formed/Makefile
+@@ -37,7 +37,7 @@ CFLAGS += $(DFLAGS)
+ #
+ # The following works on a RedHat 7.3 computer
+
+-XLIBS = -L/usr/X11R6/lib -lXaw
++XLIBS = -L/usr/X11R6/lib -lXaw -lXt -lX11
+
+ formed: formed.o display.o callback.o
+ $(CC) $(CFLAGS) $(LDFLAGS) formed.o display.o callback.o \
diff --git a/sci-mathematics/otter/metadata.xml b/sci-mathematics/otter/metadata.xml
new file mode 100644
index 000000000000..ae9640ffb9f1
--- /dev/null
+++ b/sci-mathematics/otter/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-mathematics/otter/otter-3.3-r3.ebuild b/sci-mathematics/otter/otter-3.3-r3.ebuild
new file mode 100644
index 000000000000..eec8a1d25164
--- /dev/null
+++ b/sci-mathematics/otter/otter-3.3-r3.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="An Automated Deduction System"
+HOMEPAGE="http://www.cs.unm.edu/~mccune/otter/"
+SRC_URI="http://www.cs.unm.edu/~mccune/otter/${P}.tar.gz"
+
+LICENSE="otter"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+RDEPEND="
+ x11-libs/libX11
+ x11-libs/libXaw
+ x11-libs/libXt"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-build.patch
+ "${FILESDIR}"/${P}-gold.patch
+)
+
+src_compile() {
+ tc-export CC
+
+ emake -C source
+ emake -C mace2
+}
+
+src_install() {
+ dobin bin/* source/formed/formed
+
+ dodoc README* Legal Changelog Contents documents/*.pdf
+
+ insinto /usr/share/${PN}
+ doins -r examples examples-mace2
+}
diff --git a/sci-mathematics/p9m4/Manifest b/sci-mathematics/p9m4/Manifest
new file mode 100644
index 000000000000..26d5e7154811
--- /dev/null
+++ b/sci-mathematics/p9m4/Manifest
@@ -0,0 +1,9 @@
+AUX p9m4-v05-package.patch 1860 SHA256 5e4e32d75267fde57222baa0820cd43bb04e9d9a6b8764b14ce1650d8b2c9c90 SHA512 31bbf42c9fc6d266c1bdcc33278dbf2fc7f83c57c302d0af4808a181bcd3f4d64780e02b875c174a7d245c0d3c4ea3703bc8c04d4a70a8543c4d76b2ed3f946f WHIRLPOOL eb63f762f882f657d40db4459c412ee7624a825597e359bbbbb9a643fec4c94aae06c3e2e64f56f1fc4a3194bb218df0848db16fa7c35a635ea5c6a499e40448
+AUX p9m4-v05-python2.6.patch 1909 SHA256 1b0156a2d425eaabf0f7fcb2b8bd7c3dd5036fd043ba073ba95ec937c1a957d6 SHA512 b41da95bff1ea30f45b170383592b8dee78b58592c925ec2979f27810d64e8d9814187b254ff5b005776fe56f00d38b36cfb80c3d5a4abc5a17519a5ebd866a4 WHIRLPOOL 40d330853f7458e87a07103ee5126becec4850d7d97a1b434a6ac19722d5fbb5a4e4c15db240b1c3fe849cf9a5e9bf042e5a1b0b57b1309cd102a46d9b0c4ae2
+AUX p9m4-v05-use-inst-paths.patch 1151 SHA256 67e84e86bd6af5ee972cd45b22df0c4c3c517345d144d6e960cd377d7168471b SHA512 285c92ba2d97346408dbea07ecd2047bd67d7b9b0de96c8676d9280e8cce23c93abba8fdb1443c5f1b942b79903d2f11bf8e90591e2ff70b167ad507fb4c6f85 WHIRLPOOL 67ecd88d27bdbcd0734135199fa7fe474919b5f7d5704822e54f44c45f9adc8d3426de7b7abdb6e29ea42eb966fc2c8703a7f82757b4b9e5ce9e56633c3b2d09
+DIST p9m4-v05-64bit.patch.bz2 5095 SHA256 038eafb0198deabb358e3b9aabe19052970730e7cace2b7dbbbc09947d901d6f SHA512 b80ea7ae9b652b55eee2542ba8d45712871e56dfda2e97bae2011a521e732d221a5c6a36ba33269a80f02ddc98a8f3c2470c7e832fc2b79331e7cca551aa7a36 WHIRLPOOL e5f8dcd5690c3d8ab0cd77c65d4fa31c313ccfe4bd8df57c3cc942c70b30aba694d3f48e6133a9a21f3a370d34c55853df14942c6cd85d523240ee9aa531913e
+DIST p9m4-v05.tar.gz 889707 SHA256 451a05179fcb025b666ec992cd45e0d71dac26e43c1fca814747bef541a040b4 SHA512 6ed8f3a5ab6e6b876eee388ab0f1bc535e60432317131657ba518781912f0f851aeab361d0169f96e29538130d691cf2d3798135e2386a7793799f0c4931120e WHIRLPOOL b05b02523c2e60ef594a34654b997925c43f7d64c0302f0b630d4a4036ccd20e58e39d292a4a1504914357cefc6b71ffdb10a52e5f1e3d467fc18e1d8603cfd7
+EBUILD p9m4-05-r1.ebuild 2899 SHA256 a842c2a2f0037cec5c0f3943f7b8d7d6c3c61b5036aff156af84e6b5ed1e018c SHA512 354a9d06a50fc2423d4505f0f5aeee1b12c7d7ad848abdd65cd48dbeec79f1db116b70385f3606141fe9ac9485089ef598590a7e17368a1f082d85f1998dfdca WHIRLPOOL 802704824dde8a0e3b71231d71994bb0cc3e0611015ae1fb78fdfb77371415b9629a80c2d1156919e8955116b803fe0786a87dbd8c503d9efc0b264a996870fb
+MISC ChangeLog 2943 SHA256 fee215e3f391f5617e349afe3a5aab919e709a8cf832b8957565e22e0e9a7c85 SHA512 211122b4f55e03ac45e17c69182ad954bc954940bda18dfa18255234bc30e144c0dfbd9e64de75ae98f4204c01a855a80ae32234b09ebf2dc29459127866b3df WHIRLPOOL 4fc082ae3094a9a3a7d36a5e5891e1ccb35ff4ffe0e0b6a7877c8673bc0055b3ad99051133a87b88b31c1b44cee7e221a4fc04b610eeb2e26a55fe67e1f8bc16
+MISC ChangeLog-2015 1696 SHA256 322db62d94cda9676962b943a8f00c960fc1be82a874036187fb278483af0c4b SHA512 ebec9ff78cb752a772af8d227957c0ddb65209dcf74810c6dbe66b753a32bf10208cb116265cd06b7d24c37069e089a93cf0561699d8de7a4c1ff0f2ed1470da WHIRLPOOL 5683a8a7c5076ae6e271013fe7b25c49b93821f74162837072f70c31ed7ed058f1c246ce339da508ecc6f9989f7b64c6a41a80f55aef65d33f1cf398dfadef6d
+MISC metadata.xml 637 SHA256 3f5d186890aaf88926ae42efb870195fd14a128e4da3f0c5f184158b3805c7b8 SHA512 68890672339a213c5309632728ff6ef0f4287c1fe22d217fcd2db8bd453802cbf9ed7ab2c2cbf1004f874e5dfc99b313359f37507eccffeec0297ad0a6ed35e3 WHIRLPOOL 5dc3610edfe4c10a21e0b4782f57a66101425fbb6e40f4c3f5491539fc4a9a755d8d8bf0dd9c99e1ae1de44efc9de500d9f723e9ec3189e1e8cf26fe7c8d1fa4
diff --git a/sci-mathematics/p9m4/files/p9m4-v05-package.patch b/sci-mathematics/p9m4/files/p9m4-v05-package.patch
new file mode 100644
index 000000000000..9ca737ce2ffe
--- /dev/null
+++ b/sci-mathematics/p9m4/files/p9m4-v05-package.patch
@@ -0,0 +1,67 @@
+--- p9m4-v05-orig/setup.py 2007-11-17 09:31:26.000000000 +1100
++++ p9m4-v05/setup.py 2012-07-02 23:48:21.753760992 +1000
+@@ -26,23 +26,24 @@
+
+ from setuptools import setup
+
+-APP = ['prover9-mace4.py']
+-DATA_FILES = ['platforms.py',
+- 'utilities.py',
+- 'wx_utilities.py',
+- 'files.py',
+- 'options.py',
+- 'partition_input.py',
+- 'my_setup.py',
+- 'control.py',
+- 'Images',
+- 'Samples',
+- 'bin-mac']
+-OPTIONS = {'argv_emulation': True, 'iconfile': '/Users/mccune/gui/v4/p9.icns'}
++OPTIONS = {'argv_emulation': True, 'iconfile': '/usr/share/p9m4/Images/p9.ico'}
+
+ setup(
+- app=APP,
+- data_files=DATA_FILES,
+- options={'py2app': OPTIONS},
+- setup_requires=['py2app'],
++ name='p9m4',
++ version='05',
++ scripts=['prover9-mace4.py'],
++ package_dir = {'p9m4': 'p9m4'},
++ py_modules=['p9m4.platforms',
++ 'p9m4.utilities',
++ 'p9m4.wx_utilities',
++ 'p9m4.files',
++ 'p9m4.options',
++ 'p9m4.partition_input',
++ 'p9m4.my_setup',
++ 'p9m4.control'],
++ # remove py2app
++ # https://bugs.gentoo.org/show_bug.cgi?id=423555
++ # sci-mathematics/p9m4-05: tries to use network during install
++ # options={'py2app': OPTIONS},
++ # setup_requires=['py2app'],
+ )
+--- p9m4-v05-orig/prover9-mace4.py 2007-12-08 03:27:13.000000000 +1100
++++ p9m4-v05/prover9-mace4.py 2012-01-08 18:12:09.970620044 +1100
+@@ -27,13 +27,13 @@
+
+ # local imports
+
+-import partition_input
+-import utilities
+-from files import *
+-from platforms import *
+-from wx_utilities import *
+-from my_setup import *
+-from control import *
++import p9m4.partition_input
++import p9m4.utilities
++from p9m4.files import *
++from p9m4.platforms import *
++from p9m4.wx_utilities import *
++from p9m4.my_setup import *
++from p9m4.control import *
+
+ Program_name = 'Prover9-Mace4'
+ Program_version = '0.5'
diff --git a/sci-mathematics/p9m4/files/p9m4-v05-python2.6.patch b/sci-mathematics/p9m4/files/p9m4-v05-python2.6.patch
new file mode 100644
index 000000000000..70cb006d268e
--- /dev/null
+++ b/sci-mathematics/p9m4/files/p9m4-v05-python2.6.patch
@@ -0,0 +1,44 @@
+diff -Nur p9m4-0.5/my_setup.py p9m4-0.5.new/my_setup.py
+--- p9m4-0.5/my_setup.py 2008-01-14 23:30:55.000000000 +0000
++++ p9m4-0.5.new/my_setup.py 2008-01-14 23:35:45.000000000 +0000
+@@ -158,7 +158,9 @@
+ self.ed.SetStyle(start, end,
+ wx.TextAttr('RED',
+ wx.Colour(200,200,255)))
+- error_dialog('%s\n%s' % (message,error if error else ''))
++ error_dialog('%s\n%s' % (message,error))
++ else:
++ error_dialog(message)
+ else:
+ frame = Text_frame(self, to_top(self).box_font,
+ 'Error Output',
+diff -Nur p9m4-0.5/partition_input.py p9m4-0.5.new/partition_input.py
+--- p9m4-0.5/partition_input.py 2008-01-14 23:30:55.000000000 +0000
++++ p9m4-0.5.new/partition_input.py 2008-01-14 23:35:45.000000000 +0000
+@@ -63,14 +63,23 @@
+ m2 = r2.search(str, m1.end())
+ while m2 and in_span(m2.start(), comments):
+ m2 = r2.search(str, m2.end())
+- match_end = m2.end() if m2 else len(str)
++ if m2:
++ match_end = m2.end()
++ else:
++ match_end = len(str)
+ other += str[other_start:m1.start()]
+ if remove_patterns:
+ keep_start = m1.end()
+- keep_end = m2.start() if m2 else len(str)
++ if m2:
++ keep_end = m2.start()
++ else:
++ keep_end = len(str)
+ else:
+ keep_start = m1.start()
+- keep_end = m2.end() if m2 else len(str)
++ if m2:
++ keep_end = m2.end()
++ else:
++ keep_end = len(str)
+ matched += str[keep_start:keep_end]
+ next = other_start = match_end
+ else:
diff --git a/sci-mathematics/p9m4/files/p9m4-v05-use-inst-paths.patch b/sci-mathematics/p9m4/files/p9m4-v05-use-inst-paths.patch
new file mode 100644
index 000000000000..5b48b94b27bf
--- /dev/null
+++ b/sci-mathematics/p9m4/files/p9m4-v05-use-inst-paths.patch
@@ -0,0 +1,42 @@
+diff -Nur p9m4-0.5/files.py p9m4-0.5.new/files.py
+--- p9m4-0.5/files.py 2008-01-14 23:31:00.000000000 +0000
++++ p9m4-0.5.new/files.py 2008-01-14 23:39:51.000000000 +0000
+@@ -51,6 +51,9 @@
+ return sys.path[0]
+ # return os.path.dirname(os.path.abspath(sys.argv[0]))
+
++def data_dir():
++ return '/usr/share/p9m4'
++
+ def bin():
+ if Win32():
+ return 'bin-win32'
+@@ -63,13 +66,13 @@
+ return 'bin'
+
+ def bin_dir():
+- return os.path.join(program_dir(), bin())
++ return '/usr/bin'
+
+ def image_dir():
+- return os.path.join(program_dir(), 'Images')
++ return os.path.join(data_dir(), 'Images')
+
+ def sample_dir():
+- return os.path.join(program_dir(), 'Samples')
++ return os.path.join(data_dir(), 'Samples')
+
+ def binary_ok(fullpath):
+ if not fullpath:
+diff -Nur p9m4-0.5/prover9-mace4.py p9m4-0.5.new/prover9-mace4.py
+--- p9m4-0.5/prover9-mace4.py 2007-12-07 16:27:13.000000000 +0000
++++ p9m4-0.5.new/prover9-mace4.py 2008-02-10 22:45:45.000000000 +0000
+@@ -27,6 +27,8 @@
+
+ # local imports
+
++sys.path.append('/usr/share/p9m4/lib')
++
+ import partition_input
+ import utilities
+ from files import *
diff --git a/sci-mathematics/p9m4/metadata.xml b/sci-mathematics/p9m4/metadata.xml
new file mode 100644
index 000000000000..a1db72097c3a
--- /dev/null
+++ b/sci-mathematics/p9m4/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>gienah@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+</maintainer>
+<longdescription lang="en">
+ This is a Graphical User Interface for Prover9 and Mace4.
+ Prover9 is an automated theorem prover for first-order and
+ equational logic, and Mace4 searches for finite models and
+ counterexamples. Prover9 is the successor of the Otter prover.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/p9m4/p9m4-05-r1.ebuild b/sci-mathematics/p9m4/p9m4-05-r1.ebuild
new file mode 100644
index 000000000000..a97703003bec
--- /dev/null
+++ b/sci-mathematics/p9m4/p9m4-05-r1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1
+
+MY_PN="p9m4-v"
+MY_P="${MY_PN}${PV}"
+
+DESCRIPTION="This is a Graphical User Interface for Prover9 and Mace4"
+HOMEPAGE="http://www.cs.unm.edu/~mccune/mace4/"
+SRC_URI="http://www.cs.unm.edu/~mccune/prover9/gui/${MY_P}.tar.gz
+ https://dev.gentoo.org/~gienah/2big4tree/sci-mathematics/p9m4/p9m4-v05-64bit.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+RDEPEND="dev-python/wxpython:*
+ sci-mathematics/prover9"
+DEPEND="${RDEPEND}
+ dev-python/setuptools"
+
+PATCHES=( "${DISTDIR}/${MY_PN}05-64bit.patch.bz2"
+ "${FILESDIR}/${MY_PN}05-use-inst-paths.patch"
+ "${FILESDIR}/${MY_PN}05-package.patch"
+ "${FILESDIR}/${MY_PN}05-python2.6.patch" )
+
+S="${WORKDIR}/${MY_P}/"
+
+python_check_deps() {
+ has_version "dev-python/foo[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+python_prepare_all() {
+ rm -f p9m4-v05/bin/prover9 \
+ p9m4-v05/bin/mace4 \
+ p9m4-v05/bin/interpformat \
+ p9m4-v05/bin/prooftrans \
+ p9m4-v05/bin/isofilter \
+ p9m4-v05/bin/isofilter2 || die "Could not rm old executables"
+ distutils-r1_python_prepare_all
+ mkdir p9m4 || die "Could not create directory p9m4"
+ mv Mac-setup.py \
+ Win32-setup.py \
+ control.py \
+ files.py \
+ my_setup.py \
+ options.py \
+ partition_input.py \
+ platforms.py \
+ utilities.py \
+ wx_utilities.py \
+ p9m4 \
+ || die "Could not move package p9m4 python files to p9m4 directory"
+ touch p9m4/__init__.py \
+ || die "Could not create empty p9m4/__init__.py file"
+}
+
+python_install_all() {
+ dosym /usr/bin/prover9-mace4.py /usr/bin/prover9-mace4
+ insinto /usr/share
+ dodir /usr/share/${PN}/Images
+ insinto /usr/share/${PN}/Images
+ cd "${S}/Images" \
+ || die "Could not cd to Images"
+ doins *.gif *.ico
+ if use examples; then
+ dodir /usr/share/${PN}/Samples
+ insinto /usr/share/${PN}/Samples
+ cd "${S}/Samples" \
+ || die "Could not cd to Samples"
+ doins *.in
+
+ dodir /usr/share/${PN}/Samples/Equality/Mace4
+ insinto /usr/share/${PN}/Samples/Equality/Mace4
+ cd "${S}/Samples/Equality/Mace4" \
+ || die "Could not cd to Samples/Equality/Mace4"
+ doins *.in
+
+ dodir /usr/share/${PN}/Samples/Equality/Prover9
+ insinto /usr/share/${PN}/Samples/Equality/Prover9
+ cd "${S}/Samples/Equality/Prover9" \
+ || die "Could not cd to Samples/Equality/Prover9"
+ doins *.in
+
+ dodir /usr/share/${PN}/Samples/Non-Equality/Mace4
+ insinto /usr/share/${PN}/Samples/Non-Equality/Mace4
+ cd "${S}/Samples/Non-Equality/Mace4" \
+ || die "Could cd to Samples/Non-Equality/Mace4"
+ doins *.in
+
+ dodir /usr/share/${PN}/Samples/Non-Equality/Prover9
+ insinto /usr/share/${PN}/Samples/Non-Equality/Prover9
+ cd "${S}/Samples/Non-Equality/Prover9" \
+ || die "Could not cd to Samples/Non-Equality/Prover9"
+ doins *.in
+ fi
+}
diff --git a/sci-mathematics/pari-data/Manifest b/sci-mathematics/pari-data/Manifest
new file mode 100644
index 000000000000..53960a7a44cc
--- /dev/null
+++ b/sci-mathematics/pari-data/Manifest
@@ -0,0 +1,9 @@
+DIST elldata-20120726.tgz 28386778 SHA256 07780ca9eafd32f8ab6d01724f679c4071a90004abd474cebe5ff75510994c0f SHA512 fa2d080783055e33e8338e4b54c484317896572c5b8e0227042608432f9839ac7467103f7cb74869c051ba70da0122b22ce1a190a688a220718abd5c141121fc WHIRLPOOL 319e1127106a3fe5042d16d21989e52222d54718547e544b3f19ef410ec13155b5e9253591e7070b0006f926d62b66fa87a9c82f1dffe626f261d78357c4f5a1
+DIST galdata-20120726.tgz 53229 SHA256 b7c1650099b24a20bdade47a85a928351c586287f0d4c73933313873e63290dd SHA512 bc89c8a42416e8ca25c356b7ad6d80ffcfff127e561fc338df87147a9e370ec71f7ae2eb6bef73d634cc7a8f18c794d7fd5ebfd0a042d3d356526a2eee28125a WHIRLPOOL 9332243fc120adde8bf511898c89c275b2db7e16f34b66e77ecd8789d0e14cc26a42d10bd7fb2cc849e9ed2b6494912e0baf4c6e8a12a6c9726f54e754a56e39
+DIST galpol-20120726.tgz 469851 SHA256 385d537b3c085d7885a9f6f02d63c2c2ad101dece07c2a19e4fba7bc81f72990 SHA512 4aa390761403f68f0d6b4f783e70b188f55d24c58614f72324c8cad86066e66153111fad674a38aeda84265ee994784a0bf276c49d1faa2c972bc1a075885f27 WHIRLPOOL 59b666f5b2106771af9f795343aefc73071de577e4b66d2bd771ccdf0a1e95e2913c0eec034f5f6b6642bf131051d39ed9902b9ea759722c37e8027d4cef4eef
+DIST nftables-20120726.tgz 8393731 SHA256 8dd3393ce6b3cfcf599f094f7b22bdffe17c3ba25deb912513d54676bd7cfe92 SHA512 cccc62fb0f6d8c578a4e165a1f2daf3b87acbbc38377044ddd98e2901a8e0554a46c8714bad0f4f4e09107b0c0c8f43069b4ddf4fba9c7832bad65ce3c901183 WHIRLPOOL 77f6dccd9c08722b5283670167975a17fdd732ddd234979b82c413b6ac529d068ff64de9bbc77fea45eb8663fa72b168143463642e9d8abcdb3739aa4845258c
+DIST seadata-20120726.tgz 19214199 SHA256 c9282a525ea3f92c1f9c6c69e37ac5a87b48fb9ccd943cfd7c881a3851195833 SHA512 393f2fae45964ad0921fcf417113e10b296cb4c3a0e0eec138c896827f43a5464c4b42a07313e0f3a4383e8df97912e2e359a4cd5225d014d7575e80c7dd996a WHIRLPOOL 0f1c94e8bf5be7ed923a8ff9012fa8df9cf851e1316b09ed28fff707e39abc034cb33ae84bdb80a302211c16ccfbd98ccdbad74254fbc5e3cd80ce28910516d9
+EBUILD pari-data-20120726.ebuild 648 SHA256 69cc6fbf2690dcfc4275c43df3ec3cbd06e6b6b4a2b932b15fc8550db8fc6b4c SHA512 9ea233b08b871303bd7f12c9ea8f816dcc4bae8b1ed2f718c356028f4a060988e2eb806de83791cf4f933782234d0adfc4664a8961eb352b9a3aa01b015b35e7 WHIRLPOOL 75fab1ac4b27007c4eb3e28945e4ebf3b713413c2e00a5692c03106df9539f9938876b84a183a7f13443e839b26eba6a4b3abcc40fd31c905f2872facd96cc33
+MISC ChangeLog 2623 SHA256 0d13809707d595451d10ec2f27344a536137bcc0df425a885980f1ef084d32c8 SHA512 2bbe3c69f09178d64b16e01e417ece07c72b6eef6505c695d4d3d66a4009d401aabd743547618e0b754bf3688f397b15528d2b983b5970e1dab16082c4252ee7 WHIRLPOOL 6454f8cf6e74012d8c53985b4cbde58d2a96f5dfc653c6d9abff1a5a16398146dadf5724555e512a28ab78e8259f5e4c777f3aa31df87e40a24fc13617560157
+MISC ChangeLog-2015 776 SHA256 d3548461c5748b4fe24dd2e20816cf614cdf35e1fabfeca4225a06230aa2bb26 SHA512 5485d36116138645cd533bb1cfce281a827c2b097263c4241599a5977435637595d3a31c0561afb4510c86124573094974b7de05e48e59bd64d9bac3265bb959 WHIRLPOOL 562f2b5f762cb96bf9ece2704a64d69d8b49d43f27ac50e753274d5be6148537562fc7aee9ecdebe8aa6ff07886408333e5d0393c798acfc2e037c79e4e252f8
+MISC metadata.xml 723 SHA256 7f0d2a5c03474ac5e07e224ca06750ea2e7b74e637b55f61f9c9ef66b238d250 SHA512 8b7755928e234dfbb5f085fc9486b9b5948f057f17684883c15956a517248363da12784b5dc5f0341184053035465f09aca9aaf1c6ef26363e0f005bc2fba700 WHIRLPOOL 5851459b043d270f4972c65edf252a4383ab012a3b576dfbfc81d826111fbaca3bd03e0e1fe95a3cad337223c1016742e87975736682b4a50389d703fe15edd4
diff --git a/sci-mathematics/pari-data/metadata.xml b/sci-mathematics/pari-data/metadata.xml
new file mode 100644
index 000000000000..98c04919b996
--- /dev/null
+++ b/sci-mathematics/pari-data/metadata.xml
@@ -0,0 +1,18 @@
+<?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 extra data for PARI consists of:
+ * elldata is PARI/GP version of J. E. Cremona Elliptic Curve Data,
+ needed by ellsearch and ellidentify.
+ * galdata is needed by polgalois to compute Galois group in degrees
+ 8 through 11.
+ * seadata is needed by ellap for large primes.
+ * nftables is a repackaging of the historical megrez number field
+ tables (errors fixed, 1/10th the size, easier to use).
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/pari-data/pari-data-20120726.ebuild b/sci-mathematics/pari-data/pari-data-20120726.ebuild
new file mode 100644
index 000000000000..05dc48afc2f7
--- /dev/null
+++ b/sci-mathematics/pari-data/pari-data-20120726.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="Data sets for pari"
+HOMEPAGE="http://pari.math.u-bordeaux.fr/"
+
+for p in elldata galdata galpol seadata nftables; do
+ SRC_URI="${SRC_URI} http://pari.math.u-bordeaux.fr/pub/pari/packages/${p}.tgz -> ${p}-${PV}.tgz"
+done
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE=""
+
+RDEPEND="!<sci-libs/pari-2.5.0-r1"
+DEPEND="${RDEPEND}"
+S="${WORKDIR}"
+
+src_install() {
+ insinto /usr/share/pari
+ doins -r data/* nftables
+}
diff --git a/sci-mathematics/pari/Manifest b/sci-mathematics/pari/Manifest
new file mode 100644
index 000000000000..7681a7870ab4
--- /dev/null
+++ b/sci-mathematics/pari/Manifest
@@ -0,0 +1,44 @@
+AUX 50pari-gentoo.el 271 SHA256 787e2c797c42645de8429cd449040b81563e07681c557bc9433cc4ef287ffe12 SHA512 2b466ebe72aa17e9b65c8a85b5ba9ba5b393a6983079738a5cc68e4dac1e360aa74e153a672d41f85addae70c9cb30e0d7079acbbf0d39077cba6871ae2f852d WHIRLPOOL fa499717ae5bcd331357a42f1029fc6a46482c32b033b957df80f89dbd455dc7a2074022a50177958cba5f9de5615f4cac0445b6fc4325be23e11cb2279d1261
+AUX pari-2.3.2-ppc-powerpc-arch-fix.patch 453 SHA256 3796b8e994f6dda107dd3733ec0769dbe020debc8f24db89f4f740cd3939f64f SHA512 053f3684d9cdf57d1306fc78856bb82cdd03fc1ba784c2d8c40938823f5202b36add61e59c51bea0e08957e02488641da895af7bbcb0c03aa64feedd2c4d807a WHIRLPOOL e063d3c687bdbfef6270a7c398d659e04b07f7d2602a2b6e5a7e036d3f330d707ca8b459b71582acf02169f187bb9d47a2491c81f0fdc80910bbe9a94e64fee2
+AUX pari-2.3.2-strip.patch 293 SHA256 e4a63e53734295dbbdcf9ade59c12d49a36317be3b25a223c684221086fce21b SHA512 2197f4cd98ef33d5d77827271badc05af99a0d189cf68e5c5f8f895c5fd9bca7e68e6e7fa8086911845eafce6a80c268c793fbca57ecad7cea3ef5d14ee0a168 WHIRLPOOL 4e1ef876471106bd26796d7755298d0776912c2c770726a35b7f0395f5bf28162d211efc54d5f877b5374136fef90ef75fbd1e47ed02d7b6382dcfde2b28ea26
+AUX pari-2.3.5-doc-make.patch 1358 SHA256 9a68848f4b2818f2bbdfc49063af94eb6b54049563ca0d5137d6bfce2450b35b SHA512 74a683a54693bcd6e4155d22f82f173b154c367f381e17387f58f4d5c7ce5d157e1d27869a988c96ea4451dd02ccdb443d6d051a112b80fcaffbbfa785570f77 WHIRLPOOL 4afdd53034793586c05bfb95ce542516c122126903c6eec471d956d81949c20a916bf8757be689dc0bc6da567003ceba9e51cbad5e909a0aa6ebd5351c0d7f98
+AUX pari-2.3.5-no-dot-inc.patch 1594 SHA256 1d1ba8e9a577c31046485c797135eec6b6a804f2a6b22b78becc02d57147cc6b SHA512 4f3e7757c5fa564ea05b843e74118086fb22d8602bf29964aa3be886263941434bc1b7121805c5efafb64c208c2fe181da4831c6d662bda8d1a04cd5d9704605 WHIRLPOOL 1dd30c1a91d9108c0d16560d79cec39dcc909c00b8673739504ac9800edd24338b5365eeb867b5ccd23e7b236a31b031400a09ef7be480f4d7b4bcede00b498d
+AUX pari-2.5.0-doc-make.patch 2280 SHA256 e28a0c8db09f02c30499f606fafa9ebaa5e09bbc25dd87f1ff9ba6cf316b5338 SHA512 8c0d13b2bdc39407b56e1ccf73a01a864575197ce33c58d6507ebf207bb31c8dc1f09e5266dc73f62631af5356f6e78609ba8851ffffffcdced127afcc70f5ab WHIRLPOOL ed570b9a5160251f34ed0fa73f897ccd8e77ba0bb78e1ef9a1099f4dc566ede04fa95997ee17833a38a2eb14e83cc8879354d8eabe481591093f907bcbf54a30
+AUX pari-2.5.0-macos.patch 827 SHA256 0ababf5c7c182b8f8fb46d35f2064a517d5487811e77743b7f64d12c075ed6ac SHA512 bc183e6bd37a1f1abd1f9c5915acbb1d04fa2c5b9aaf60dab9f38afb868c0c061aec0aff6e4e42f930e348ac6c3d406e8dd55166e670b34707ac6577c8b88fc1 WHIRLPOOL 55b059a8eab84c719f956499bd1101a543bc861efa60978badb320913849a2e593a1387d573d20e69df6ae17851e60b495b57ab51c9f2bcbf3273c802eeb0a79
+AUX pari-2.5.0-mp.c.patch 673 SHA256 78db2dcf22cd8f6231926402b69e6b29683fed46c06468d661e6d94d39e07fa8 SHA512 b17b5190883b69037a00a227fbb005ef15d22a08ce0720c2a9886d10ed11199a51a4eba6d7c4aba50f441286b123a1000b47927b40eec5219b6b045db2cd2f66 WHIRLPOOL 541c5f6b785bc1e575aaaa5a2974cba0f0aa41ca1a9f9fada3bcec7afafcb45f6951bd121ded71e3cb8f4cc2aaca8a76cf6ccaee6156fde81f72a7fb680c7e67
+AUX pari-2.5.0-no-dot-inc.patch 1612 SHA256 e685a4f0814aa8742861629d88513bb073b454335318b28adc1fe94f8caa552d SHA512 db318bd6bdc065669a3b9f1c5ca8bed8831c14cf8e2179cb10cb88308c8f28282cb9e6cf9aa50b95d1ac9e4b1ee6219fd85677276e918a2cef50e809f8d12e82 WHIRLPOOL 9287f5d260addb958bd550b452684deb707ee1729a9aad567076661899c907d759b03d72a2e12a1b815b89e19f257c8b33b3ff3f0ea644731b7e85785a46bdf9
+AUX pari-2.5.1-1302.patch 868 SHA256 e5b4a0b31ee598d0bf49ce25d00503691c080d3b4b53051e6982b8d9d9f00a08 SHA512 894c7d8f181c1e472db6d378c9df91465b8f72ec4b00f0451af565c7eef6c378d5886cc14c2973a87950276d4ec62266be8df3d8debadd572bb43b4b5c067b3c WHIRLPOOL 5c733a5224f8d7ddb4b46131b978a89242e3b1124e35724908fe0ab88dda2982c29a107a1607939f623dc4058de36c4f1c58a20ecd6663752c348595dfd158d4
+AUX pari-2.5.1-1304.patch 968 SHA256 2252728ee1f4bf3aef627266704e8ec7c46ede2c48c66748388874689435d86c SHA512 a1c21fab25801e20ba278bbd7cd58cc6b185db6ed0971d125df1f2fde94779ee2562046e53e3550f2ff4d06c89b203216930ee33fea9d37ac74929773c8cc293 WHIRLPOOL 1f33bc6a6a36336376d8d24734bd3f0080fca89b9a5a5aa9d5149d4b12d55561c43d9a71c538792fe8987f794dfd6f63d5a9efde04c906c03095fc664d72cf20
+AUX pari-2.5.1-gcc47.patch 609 SHA256 f450cf7a7642f08abdb59a9c2ec206371cd29b4da771563c323dd756de300294 SHA512 55be2ad6d8b727e057d4bafa1bb771a5d3946d5a26d1a44062c0f476af0e69bb0bfaa63c8f4d8fc8db0183772e77096f704dbc0699ab6865457a5bc39b4326f8 WHIRLPOOL 957cf6d832303fd80ef8b07772a643690078e33dbfc6e6fd165be193446f2adcb21c1b44f42735f4f077648f74a5acf722f54ab499d514b099c2169e91fbaf0b
+AUX pari-2.5.1-no-automagic.patch 3769 SHA256 e0f1e8ef64b0203add85ac9d6adad59d3ea268dd073249c7742bd64507e8395e SHA512 5ea4a477ee2f5c744c3900d47e3c770c366a1a311fb639b7b928861cf79924f73c6ceb1e0d7a07a2cb343cccf2f822fa2b65f67f0a55516e3075a85b9c22614a WHIRLPOOL 4cb4a29a946480f7f04dded34606a1649a759f99da2372f51bd9bc7c6ea44cb08c70ff8d1ed204cd8f5a3f237970fe90d1b8d90578806a73fbdc637395718e7d
+AUX pari-2.5.4-polred.patch 23409 SHA256 8d0a750f07f7ac04f733e5f44127ec90440d60b946bb84a6c9ae0fc8c0bcaf62 SHA512 8251a3246abe90291c82b1e05174e939a92235c1b5fb183d06ef9597bebc6d03cc3905866814e7db2037500b9471bc4def9743027007670ef2f273abd65767dc WHIRLPOOL be587881cfe8678fa8424ec3cc92f3a2d9aca923e85cf2341efead155f03f9904628426d3956989a5ba0886876b633f7ac2d12bc838ff2af5220ad8e1decdec7
+AUX pari-2.5.4-slow_determinant.patch 2626 SHA256 d3fd5e472a7a261b2d68750143145326ef4cba08be2674d8aa04cba3360041a1 SHA512 9c9d1abe6e547f142ed807212c4719fc10ddfa5286e7fbdb3d745ab5d1be30bb0369c956521aef5a258cdb248f5f207b037e8277711fd3a927e941bcceb50063 WHIRLPOOL 47060dff91e8c82693473772f0edd9bad0b3c7dac02bf0a52dd027f6993a8426625232712819f3594794ff9f555db7b8e5c157340ffa48f4a26cfe165b504bfb
+AUX pari-2.7.0-doc-make.patch 2789 SHA256 24002f7c012799b91db21c10ec3f3c7604ea5da6178dce837cbe12e816edcaf9 SHA512 e595b787750e374916cf4f7f6d2f779f961d4f84c0dbdd9a2b30dee2b9c8df2d34ecb332365d8bccd0f2606241d7bbd0fa51710a7951481c68d8feeb719e13dc WHIRLPOOL 45c8e5a70ee256b39e0b4c558c393d5bb3914f85154fad35661326e09c6efaddb9ca5064e22938d3f88f6d4fad59f79fc583724325143521b150ae7abff3ceb3
+AUX pari-2.7.0-no-automagic.patch 3881 SHA256 2ac0b2a810f4f1ccb3eb137a47d3b35d5779471c26391f049c9e9ccbae90b7d9 SHA512 3e55d5c1c3a97be236480c8c602f9bcebb639b1fc6bdf450f26dc99e56d2f6b7dc9bdf8f4863a8780a41ce5d05c4716c40927f96bf649e29aed090e106982184 WHIRLPOOL 80285c88f6b1fb44fefa479bcf9fb1e9f268addccc284f4475c0a0f69b4d871262d474d08f78acc7b249a5ae0ee942fd7f13934365b4e6ca3ef6666df7e4004f
+AUX pari-2.7.0-no-dot-inc.patch 1646 SHA256 793f17ed7dd223ba4d53c592e02852be9cfaf1e367044ddc4ae89d9f47cef5f7 SHA512 7908992b3a38162d805b2c2190587a114248cb7db1424ab6519f6dcb839c4570c4b07b12f54f7f03bc61c08a009cdb0a840747f1436fe287b2f6962edb78d733 WHIRLPOOL 39d75236b17479850b949619347e6f4901445b4998bf1ec478e919696dbf4f6fdeeb41114c356c4d557ba6ea0475b2e35bfa88a065081bbd3de623e88d1e0b75
+AUX pari-2.7.0-slow-discriminant.patch 2030 SHA256 5b233d4f8b4df3aa526ccba93c544aefd8b8cc8d95e14041fbedfa03238cecf9 SHA512 4f4bbb33968450ebf32a90905c80dbb304047620ca3949543c43a87943f3fef9efb16544ca03791fcc41aba65bc93ae5f37e5e64ab1eab0569622572c95234ff WHIRLPOOL 176f30eaa9a5af7cbd97b28669cda00d738e865fb6921e4e0999c4bb37b755b752186988465919dd92cf4d27f45c4571bfe1b5686930b0d1c7153ab5d02caa71
+AUX pari-2.7.1-perl-5.22-doc.patch 507 SHA256 0d6bbf6c49da39a50fb3f23b0a1118697e0af3a8faddea25cb261dfecc1e8e7c SHA512 b3617a54be7525a87b0277eca04eb3124ad027589b34064d830f5a8011ff827d9f43129244d256259227f2e350cac83813283a7bd80a8e6bbb324394c25e74b5 WHIRLPOOL 0e32b5634836c58844cce87d2ebf187e885445352ad9f64d625f8e0b25b82a0a4521d70d6bfbcd0aeecf73918691b60e1f3992da110ead31dd70ee49eb39c43d
+DIST elldata.tgz 14185595 SHA256 4102c23fdbeadc89b47ba31d05fc58cd3c3e0cca216b11ec5c3be1330d4a5218 SHA512 dc13d1cacb98a6c2774936997452bd34ae198da9206fea69bc7cdd28240d0cdd07bb0ec1f14b8e97bea4321a60a6a6144464ab3b629be2e37dd76a73efaf43ef WHIRLPOOL d77dd852997c15b2fbf56bb8c0403de49daae735e8d464c34ec3f44d38913285ea47122af8ddfd38fe6bbbc3187c1060a50c04ca14afae2d5b1532d815210435
+DIST galdata.tgz 53229 SHA256 b7c1650099b24a20bdade47a85a928351c586287f0d4c73933313873e63290dd SHA512 bc89c8a42416e8ca25c356b7ad6d80ffcfff127e561fc338df87147a9e370ec71f7ae2eb6bef73d634cc7a8f18c794d7fd5ebfd0a042d3d356526a2eee28125a WHIRLPOOL 9332243fc120adde8bf511898c89c275b2db7e16f34b66e77ecd8789d0e14cc26a42d10bd7fb2cc849e9ed2b6494912e0baf4c6e8a12a6c9726f54e754a56e39
+DIST nftables.tgz 8393731 SHA256 8dd3393ce6b3cfcf599f094f7b22bdffe17c3ba25deb912513d54676bd7cfe92 SHA512 cccc62fb0f6d8c578a4e165a1f2daf3b87acbbc38377044ddd98e2901a8e0554a46c8714bad0f4f4e09107b0c0c8f43069b4ddf4fba9c7832bad65ce3c901183 WHIRLPOOL 77f6dccd9c08722b5283670167975a17fdd732ddd234979b82c413b6ac529d068ff64de9bbc77fea45eb8663fa72b168143463642e9d8abcdb3739aa4845258c
+DIST pari-2.3.5.tar.gz 2018097 SHA256 47ddae1af73b4476660d2a89338483949067a97ffb8758c82e8189dfa4c89d88 SHA512 0e49e6310b4c76ef3370786a13aa8cbc5bb0b7dc84ec1665866d623e6284f45db8584eea759e8b5954dc9b5c8a3e866e77a377d18073ed33f11708a7e88a4cca WHIRLPOOL 1d7f3fcfb5c4b44479ea7494536bcb7c971df721a23bca9f7bdee878cc91c5beec5353920d352142534e89bb0158bfd8ad9a431a22c90fc577676e3f8ceb8b9b
+DIST pari-2.5.0.tar.gz 2714449 SHA256 5dc923b001ca0f8664facfafcd91946be63faf8f0e1df4b11bfac80f89ec37a2 SHA512 701abdf4d65bcaeac9bdd314b1fc24a59de9ee1874b9abba5761cb88bb871c18d108a99cf1cbf9a357ac192196c043592e0e5d1645689d5a6f85afbfa7a9096f WHIRLPOOL 7a37d1a8b1a07a80a2a568335d4677fc981f242768c44f9bcf0926d9019861483c72ebb861927da4bfcc4b075155b0a893f9029176126c26f08adbc8244b94f8
+DIST pari-2.5.1.tar.gz 2718726 SHA256 72c1828af50878acf5f09b553e45ac04b24400e095d16e6948a06947538a8f4f SHA512 dd304bd02402602c1f114a7f4d1e54af0fce8707b196fd9da617c028ba3426418813aeaf818fecaa9f76572b1d36847463a3aa7f60848cdec607ec70131dc263 WHIRLPOOL acb4e2ce3b6680e6df1adc3d36d23b80b16e9efeb681ea726b74a3d83139152ca5e97ae95101cc79a69b9b34df34805efa09bec6663f30ea658d9cb07c587e45
+DIST pari-2.5.2.tar.gz 2719367 SHA256 6f04da2719b09fc7c4c713377df6541d641bbdd9ffc60aad280ba7951561ed98 SHA512 2d0332e5604a6bd41c8328c4cffc42302dd85db077a950e19769a0cc7b8c3e17b7c4c5c1514ecb2f75757015baa7e7df76f6174e997fbaa90874c5e6cf5e7fce WHIRLPOOL 27acb1350a1b4b06b97590f2e0c83d4cf03d6b321ca734c30c42efd50a370a3a1dabe346ed4bb8da63ee2f9f07a7353fc7358d71dd35c7e0eaab9a440ef19d08
+DIST pari-2.5.3.tar.gz 2720543 SHA256 f421530fe396f14be882e822f972b0514e30ca169c8ff984e413806d2d63527f SHA512 8606f1f1b59a8e9e8b5bdbaacd03f980da99616568c180eb37f6f530efad396343e3146f6c7adfc5dac6e43a1d35c898531ecf61dd6d62c26cafcd2554f8c43b WHIRLPOOL 01ed6c9133b2f16a21b3d9eda84a0ffbaff90fac2ed1ade055850e51524f9d1ba8bc39a9686c72e0705876a63cfd8dd31cd7364c825353b1781a22d305658d2e
+DIST pari-2.5.4.tar.gz 2721861 SHA256 9f37e14aca6c38cc9b7c18edec3319a30dcdb42e217981eda1fe85866c91fa3e SHA512 de2f0593682d638288908636d848489acf115f4858b91c574168db26c4ab7443465a21d1e6c43be19ecc57dcedcd883e5af72b65467a59a2c8811e4eec64e0b9 WHIRLPOOL 522c0451568f37dcbc89a2c47582051579fa7f3bd1eb4a0ad20f0023b1af0f0d5df14ef956bda170ed6539b0d2caa193c1b0807565abcdde9abfd03af0112be6
+DIST pari-2.7.0.tar.gz 3142306 SHA256 ffe9940194b4a1274d8aa690d985e11539be36fcdd2215b74c39b30470a567c2 SHA512 312ed6032e5b1b431d04cccb593e5ca6ca323361736669be0ed345cbb6cf22114c670984ae74120aacb4ac1af822a1fdf76aed7ba59a1cd4f94e26150562ad84 WHIRLPOOL 10473cfe8e873a4f3e15d70b5574502eac0fc7004af0842748436ee01d1470cdd3226864fb207bc31cef5387f41dc3d8503b7726de489469949a3ed0af98d05d
+DIST pari-2.7.1.tar.gz 3140893 SHA256 cc637918f3c0b20dc9bbea99e639e7a288b89ea4d0e4e3f9b7110a115bcb41be SHA512 ff32c181e6810af8a38f0dfe45b9f15d930923da5759c3e88595f56bf3c65ec0a79fdb9fb5f0e4ce0adb1ebc56a84e6b1606085057762073a85c0d1946857d5f WHIRLPOOL abd1f34de0d54f1b9d555927156baf8bdc54bf29c486ee41e943d414dadc3a68ada5e1af0e48acdfebb386273936a4925428a8fda1f69d250e66b15d857e236e
+DIST seadata.tgz 19214199 SHA256 c9282a525ea3f92c1f9c6c69e37ac5a87b48fb9ccd943cfd7c881a3851195833 SHA512 393f2fae45964ad0921fcf417113e10b296cb4c3a0e0eec138c896827f43a5464c4b42a07313e0f3a4383e8df97912e2e359a4cd5225d014d7575e80c7dd996a WHIRLPOOL 0f1c94e8bf5be7ed923a8ff9012fa8df9cf851e1316b09ed28fff707e39abc034cb33ae84bdb80a302211c16ccfbd98ccdbad74254fbc5e3cd80ce28910516d9
+EBUILD pari-2.3.5.ebuild 3839 SHA256 fde037e87412df9c5eb3931546b0833736b03068873c2f74364e030b76bddad2 SHA512 344ed7118f3d9b63d153683515d093d83b961904f4383fd14decf0f9402c4f570ddc2a5f2b4ed2f561d6f91313768eebdac6da3887f591cbe8f6b7024c9ae357 WHIRLPOOL 7c2aa9a4443461a0af2591d2acabe04e88069b726ae82e0a53a35221e1e502ba743aabf2f2d3c151cc99f161620f0d24107f483ea393151c49eca94ced8202c0
+EBUILD pari-2.5.0-r3.ebuild 3824 SHA256 7e80328d157ed8c188e9356ae64dac55e5eb3356d70150f0d8b22f5ec31a0efb SHA512 bae7337fcf806328c2f461f1139dfcddd2215dec04bf98996fc2c6d1806a139362c2eff651f5d5f79cba223a95f6ca4bfcfe64ed9b90866c69f1bbfd6ef73f1c WHIRLPOOL 88e506305f34672977df42fa4bf14dbd3059bcd78b218a52b1dffe60a33eab800a9875e48bbc9fab9723d91d61eeb18141621c32fb5d207ade80e696878907cf
+EBUILD pari-2.5.1-r1.ebuild 4056 SHA256 a6dcd2b03ec69369bda59558c1891c9c0d34bead8b2b6af31eb553a82404be0f SHA512 c4e1176cd5559be694c88ea40fe4a91ffa01393a56605c92511ddf2f043ab5b797e1825b208613a116517fe6172efdce9428372d3547fd8bdc5f478fbcf67da6 WHIRLPOOL a2fe80fb210b549fb54fcb9e417c0c844baf52376cca8c237f81ae14b4aad1886cf7774fd6074b2f0f46faa860ff8ba76083fad927b425a34b9f7f7cfee80614
+EBUILD pari-2.5.1.ebuild 3903 SHA256 58727eb2aadd5b67cd36bca3b5b4a1ac311c995f35d0c3d442d5691f69f6ab3a SHA512 70ed0f66a8e53fba0d7cb956c52adbb452cf02e1f296748f8836eaaa0234b836aa0ab0633880c95cceebdd37fc2f6fa05889eabd13b7adc083d30f06ec4cbbb1 WHIRLPOOL f13003ddf9cae75c51dafdf2fc9b7f1b3d5269dd9fb152d38120bde7cf55b1c8ff004d9ad8901b0d39cd1b87c3610c999f9097f050bb58982a55a30141311158
+EBUILD pari-2.5.2.ebuild 3903 SHA256 9ff6c4177e46c433341e466673a6069516d3e315acebbb4f62f92416f127b3e2 SHA512 20b02b652acfea6f777a5cf4946940d034727cacaf84ddb627799387bbe9c39db47825869a46acd3794b2048733d2b6713d8e5e4d68e383af93077263e2ca98a WHIRLPOOL a8388a7e8a2f7d371572d0a404598099b14e7083ec679a3f5af384a23c3ea9423cfe896f35fcd3c8c8628ffcdb054fd99535679f444f8818663574b62f929783
+EBUILD pari-2.5.3.ebuild 3903 SHA256 e912304e239c677d0ca9831e16fe43e64f4956af5ac21b78ca3c6ef7f246483f SHA512 6bd96c6124a35ee53efa2345e70e9a2931d836a16f1f2e08e285c4a6ec616404ba056f344769ddfb69d0bab1f82ed7c2082ce66fae3b440474a5fc66f1b094e2 WHIRLPOOL 0ed41da2b2bdf9c9d6e67c4ae6e99c4cd7776e308e54273e536175c1f9f4618c3a904ac6bf97147c1fe45fb0a2ca0e3cb2da4d5cf8388e59e20b3d1ce399d404
+EBUILD pari-2.5.4.ebuild 4254 SHA256 15687dda9826e4ea32acd85f696ed4430affdf621cd5c4a315bfbbd8e6f89780 SHA512 b7deb8b4f2d6ec18f7990decf6f35d40fdc8d44b5a823c11feaefdf751e06cfd8f226d1928d534260325071adb675fc5f98cc7c7aed9ce636c8e3429e5926aa1 WHIRLPOOL 228d5582eaa855eecc48cd8749cc5dc39bcae86439be3a1389c12978d054730c6457d40f9a988b8cca756cf0805ebf720686a8905245f1e740131e0fc5b29a36
+EBUILD pari-2.7.0.ebuild 3921 SHA256 5cff116a52cf2ca9f4913d668c8693af10bb40ad7c9e06d7b0ca1fb6c2f1542c SHA512 554b7d5fbb6a45c7a65da9ba7ab63e99ec5af7d4c0e82e4a72d68e7a7d533cc2502db29fff59e617e07794d60f2c5c16bb33da9519d5231c1a8f7b317ff9e204 WHIRLPOOL 99820a61c724d0b4f743909666c81cd10cc036e18a39ca8b8ad49ea736ba949fdf1f67d1bf213a1a0823059c26ed5d50f76a1ee1949f7f8f66d4b13356cbd762
+EBUILD pari-2.7.1.ebuild 4016 SHA256 e5c48ff8e8f3e463f58d136630960b7d06f452cc32f196809475f16bdddebaa2 SHA512 36a9583bc68a3d5703142f74c066b3326d3edfdf5ce92e08372df1f5d0bf11f1b33477e7272d85281ee799a218fc53c1110b43e82ca802cb8ad6a5219945ef12 WHIRLPOOL 356f1e2749e7dd649b91e428615dbd72d7f5853ead261b4a50f22b233c848b2a9c9b56be76960ca237cafdd0ae1441ee63d9a5631dcf0be11515c011dccc3f4e
+MISC ChangeLog 3907 SHA256 9d36f4f698c7b0b00c91d9c61df52ff849929712d805fce8e9eb8da423968c6f SHA512 8c32f37d7d5906c8f743011f75ec48e8028c43e36c91cba53ec1b4d1827efa15ee75922e5317635001871ab568f24dba4c06a1234534a1dcb43dbeae2bc8d0a5 WHIRLPOOL b3a76755e81a798ea0762a6c1819ea7ac275d6f6ee4d58ba06a680f1d4bd22958194646200603c535567c49edda5c2902777c7c15f9b3e7809efad4e32f58e71
+MISC ChangeLog-2015 19569 SHA256 bb053a3edd0a31f38fd9c731177193dbfd1fc5b7f7948518fc7026fdb850f3ff SHA512 404fd8c85bad7a04fa6ce2b11836db7a2510be44ea443b07f263bbdbb6230d24d131a360f5847c2c16642df6d961afb843c69daf56c24478ac00b64277af058a WHIRLPOOL bac82f0597751a287cc0b18ecc382f754facbecb808c81a8ded4920f0926482f133cbe90c383e78e59c6808e6e12aa7dd251c32487516561579c723c6ae14d40
+MISC metadata.xml 1223 SHA256 50e1f5434d3d2597612afd5df9105e4814548c10faefdda7f791e0f3f82318df SHA512 3bb69fc9e0757e6fd1ed9f9394565a34269cd9ccc8dc2ce88283e2f2da8b4ef586b20fb914be28a4b3617ff074319f5925e0fc7a1e264b655303e943a63d6bfe WHIRLPOOL f595ada487113e98061b982215bfff843b200860e437cb34af0bed8be1b53a3b220df479247dcd0c0233885869c38404f56d225f3b8a1a4537c3c77e34a75f7a
diff --git a/sci-mathematics/pari/files/50pari-gentoo.el b/sci-mathematics/pari/files/50pari-gentoo.el
new file mode 100644
index 000000000000..2f5b4da9084e
--- /dev/null
+++ b/sci-mathematics/pari/files/50pari-gentoo.el
@@ -0,0 +1,10 @@
+
+;; site-init for sci-mathematics/pari
+
+(add-to-list 'load-path "@SITELISP@")
+
+(autoload 'gp-mode "pari" nil t)
+(autoload 'gp-script-mode "pari" nil t)
+(autoload 'gp "pari" nil t)
+(autoload 'gpman "pari" nil t)
+(add-to-list 'auto-mode-alist '("\\.gp$" . gp-script-mode))
diff --git a/sci-mathematics/pari/files/pari-2.3.2-ppc-powerpc-arch-fix.patch b/sci-mathematics/pari/files/pari-2.3.2-ppc-powerpc-arch-fix.patch
new file mode 100644
index 000000000000..e3581c9de349
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.3.2-ppc-powerpc-arch-fix.patch
@@ -0,0 +1,11 @@
+diff -Naur pari-2.3.2/config/arch-osname pari-2.3.2.new/config/arch-osname
+--- pari-2.3.2/config/arch-osname 2006-02-15 05:12:59.000000000 -0500
++++ pari-2.3.2.new/config/arch-osname 2007-11-26 00:17:17.000000000 -0500
+@@ -30,6 +30,7 @@
+ osf1) case "$5" in alpha) arch=alpha;; esac;;
+ linux) arch=`uname -m`
+ case $arch in
++ ppc) arch=powerpc;;
+ sparc64) arch=sparcv9;;
+ parisc*) arch=hppa;;
+ sparc) case "`cat /proc/cpuinfo`" in
diff --git a/sci-mathematics/pari/files/pari-2.3.2-strip.patch b/sci-mathematics/pari/files/pari-2.3.2-strip.patch
new file mode 100644
index 000000000000..0fee947fd556
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.3.2-strip.patch
@@ -0,0 +1,11 @@
+--- config/Makefile.SH. 2007-10-01 23:45:45.000000000 +0200
++++ config/Makefile.SH 2007-10-01 23:55:10.000000000 +0200
+@@ -208,7 +208,7 @@
+ MV = mv -f
+ LN = $ln_s
+ CP_F = cp -f
+-STRIP = strip
++STRIP = true
+ STRIPFLAGS =
+
+ # Change these installation directories to suit your needs.
diff --git a/sci-mathematics/pari/files/pari-2.3.5-doc-make.patch b/sci-mathematics/pari/files/pari-2.3.5-doc-make.patch
new file mode 100644
index 000000000000..67edc8c70f11
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.3.5-doc-make.patch
@@ -0,0 +1,46 @@
+--- config/DOC_Make.SH.orig 2010-09-21 21:24:56.655520480 +1200
++++ config/DOC_Make.SH 2010-09-21 21:26:24.683520242 +1200
+@@ -30,23 +30,23 @@
+ -rm -f libpari.std
+ pdftex libpari
+ pdftex libpari
+- make libpari.std; pdftex libpari; rm -f libpari.std
++ \$(MAKE) libpari.std; pdftex libpari; rm -f libpari.std
+ libpari.dvi: \$(PARI_TEX) \$(MACROS)
+ -rm -f libpari.std
+ tex libpari
+ tex libpari
+- make libpari.std; tex libpari; rm -f libpari.std
++ \$(MAKE) libpari.std; tex libpari; rm -f libpari.std
+
+ develop.pdf: develop.tex \$(MACROS)
+ -rm -f develop.std
+ pdftex develop
+ pdftex develop
+- make develop.std; pdftex develop; rm -f develop.std
++ \$(MAKE) develop.std; pdftex develop; rm -f develop.std
+ develop.dvi: develop.tex \$(MACROS)
+ -rm -f develop.std
+ tex develop
+ tex develop
+- make develop.std; tex develop; rm -f develop.std
++ \$(MAKE) develop.std; tex develop; rm -f develop.std
+
+ tutorial.pdf: tutorial.tex \$(MACROS)
+ -rm -f tutorial.std
+@@ -74,13 +74,13 @@
+ -rm -f users.std
+ tex users
+ tex users
+- make users.std; tex users; rm -f users.std
++ \$(MAKE) users.std; tex users; rm -f users.std
+
+ users.pdf: \$(USERS_TEX)
+ -rm -f users.std
+ pdftex users
+ pdftex users
+- make users.std; pdftex users; rm -f users.std
++ \$(MAKE) users.std; pdftex users; rm -f users.std
+
+ gpman: gp.1
+ nroff -man gp.1 | unix2dos -ascii > gp.man
diff --git a/sci-mathematics/pari/files/pari-2.3.5-no-dot-inc.patch b/sci-mathematics/pari/files/pari-2.3.5-no-dot-inc.patch
new file mode 100644
index 000000000000..cd34851a30fb
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.3.5-no-dot-inc.patch
@@ -0,0 +1,61 @@
+From 4f1e00df5ea1e51042146f6277bb1af02f249cc3 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentfredric@gmail.com>
+Date: Sun, 11 Jun 2017 10:31:03 +1200
+Subject: [PATCH] Fix for 5.26 removal of '.' in @INC
+
+Previous scripts assumed CWD was in @INC and that "PARI::822" was in
+wherever CWD was.
+
+This fixes both of those, and the latter, because its not obvious
+from the build system where one should assume CWD to be.
+
+Instead, the absolute path of the directory of these scripts is
+inserted into @INC
+---
+ src/desc/gen_member | 4 ++++
+ src/desc/gen_proto | 4 ++++
+ src/desc/merge_822 | 4 ++++
+ 3 files changed, 12 insertions(+)
+
+diff --git a/src/desc/gen_member b/src/desc/gen_member
+index 2f3cf52..66dea2b 100755
+--- a/src/desc/gen_member
++++ b/src/desc/gen_member
+@@ -1,4 +1,8 @@
+ #!/usr/bin/perl -w
++use File::Spec;
++use File::Basename qw( dirname );
++use lib dirname(File::Spec->rel2abs(__FILE__));
++
+ use PARI::822;
+
+ $class='member_functions';
+diff --git a/src/desc/gen_proto b/src/desc/gen_proto
+index 1b507fa..2fb4d3f 100755
+--- a/src/desc/gen_proto
++++ b/src/desc/gen_proto
+@@ -1,4 +1,8 @@
+ #!/usr/bin/perl -w
++use File::Spec;
++use File::Basename qw( dirname );
++use lib dirname(File::Spec->rel2abs(__FILE__));
++
+ use PARI::822;
+
+ $class=$ARGV[0];
+diff --git a/src/desc/merge_822 b/src/desc/merge_822
+index a02d612..9ca8252 100755
+--- a/src/desc/merge_822
++++ b/src/desc/merge_822
+@@ -1,4 +1,8 @@
+ #!/usr/bin/perl -w
++use File::Spec;
++use File::Basename qw( dirname );
++use lib dirname(File::Spec->rel2abs(__FILE__));
++
+ use PARI::822;
+
+ PARI::822::read(\%funcs,$_,1)
+--
+2.13.1
+
diff --git a/sci-mathematics/pari/files/pari-2.5.0-doc-make.patch b/sci-mathematics/pari/files/pari-2.5.0-doc-make.patch
new file mode 100644
index 000000000000..0882da03e6a4
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.5.0-doc-make.patch
@@ -0,0 +1,82 @@
+--- config/DOC_Make.SH.orig 2011-07-28 14:11:34.430896929 +1200
++++ config/DOC_Make.SH 2011-07-28 14:11:39.832738158 +1200
+@@ -21,7 +21,8 @@
+
+ doc all: develop.dvi libpari.dvi users.dvi refcard.ps tutorial.dvi
+ docps: develop.ps libpari.ps refcard.ps tutorial.ps users.ps INSTALL.ps
+-docpdf: develop.pdf libpari.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf
++#docpdf: develop.pdf libpari.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf
++docpdf: \$(PARI_TEX) \$(MACROS) pass1 pass2 indexing refcard.pdf INSTALL.pdf
+
+ .SUFFIXES: .tex .ipf .pod .inf .dumbpod .3 .html
+
+@@ -37,27 +38,49 @@
+ %.dvi: %.tex \$(MACROS)
+ tex \$<
+
++pass1: \$(PARI_TEX) \$(USERS_TEX) develop.tex tutorial.tex \$(MACROS)
++ -rm -f *.std
++ pdftex libpari
++ pdftex develop
++ pdftex tutorial
++ pdftex users
++
++pass2: pass1
++ pdftex libpari
++ pdftex develop
++ pdftex tutorial
++ pdftex users
++
++indexing: pass2
++ \$(MAKE) libpari.std
++ \$(MAKE) develop.std
++ \$(MAKE) users.std
++ pdftex libpari
++ pdftex develop
++ pdftex users
++ -rm -f *.std
++
+ libpari.pdf: \$(PARI_TEX) \$(MACROS)
+ -rm -f libpari.std
+ pdftex libpari
+ pdftex libpari
+- make libpari.std; pdftex libpari; rm -f libpari.std
++ \$(MAKE) libpari.std; pdftex libpari; rm -f libpari.std
+ libpari.dvi: \$(PARI_TEX) \$(MACROS)
+ -rm -f libpari.std
+ tex libpari
+ tex libpari
+- make libpari.std; tex libpari; rm -f libpari.std
++ \$(MAKE) libpari.std; tex libpari; rm -f libpari.std
+
+ develop.pdf: develop.tex \$(MACROS)
+ -rm -f develop.std
+ pdftex develop
+ pdftex develop
+- make develop.std; pdftex develop; rm -f develop.std
++ \$(MAKE)make develop.std; pdftex develop; rm -f develop.std
+ develop.dvi: develop.tex \$(MACROS)
+ -rm -f develop.std
+ tex develop
+ tex develop
+- make develop.std; tex develop; rm -f develop.std
++ \$(MAKE) develop.std; tex develop; rm -f develop.std
+
+ tutorial.pdf: tutorial.tex \$(MACROS)
+ -rm -f tutorial.std
+@@ -85,13 +108,13 @@
+ -rm -f users.std
+ tex users
+ tex users
+- make users.std; tex users; rm -f users.std
++ \$(MAKE) users.std; tex users; rm -f users.std
+
+ users.pdf: \$(USERS_TEX)
+ -rm -f users.std
+ pdftex users
+ pdftex users
+- make users.std; pdftex users; rm -f users.std
++ \$(MAKE) users.std; pdftex users; rm -f users.std
+
+ gpman: gp.1
+ nroff -man gp.1 | unix2dos -ascii > gp.man
diff --git a/sci-mathematics/pari/files/pari-2.5.0-macos.patch b/sci-mathematics/pari/files/pari-2.5.0-macos.patch
new file mode 100644
index 000000000000..1b4076009379
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.5.0-macos.patch
@@ -0,0 +1,21 @@
+--- config/get_dlld.orig 2011-07-28 14:27:13.341072367 +1200
++++ config/get_dlld 2011-07-28 14:27:46.225178023 +1200
+@@ -94,7 +94,7 @@
+ *) extra=;;
+ esac
+ case "$osname" in
+- darwin) shared=-dynamiclib;;
++ darwin) shared="-dynamiclib -install_name \$(PURELIBDIR)/\$(LIBPARI_DYN)";;
+ *) shared=-shared;;
+ esac
+ DLLDFLAGS="$shared $extra \$(CFLAGS) \$(DLCFLAGS) $DLLDFLAGS"
+--- config/Makefile.SH.orig 2011-07-28 14:29:06.753681364 +1200
++++ config/Makefile.SH 2011-07-28 14:29:10.589276933 +1200
+@@ -234,6 +234,7 @@
+ # DESTDIR is used to install to a false hierachy (to build a Debian package)
+ INCLUDEDIR= "\$(DESTDIR)$includedir"
+ LIBDIR = "\$(DESTDIR)$libdir"
++PURELIBDIR= $libdir
+ BINDIR = "\$(DESTDIR)$bindir"
+ MANDIR = "\$(DESTDIR)$mandir"
+ DATADIR = "\$(DESTDIR)$datadir"
diff --git a/sci-mathematics/pari/files/pari-2.5.0-mp.c.patch b/sci-mathematics/pari/files/pari-2.5.0-mp.c.patch
new file mode 100644
index 000000000000..0bcfffc08176
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.5.0-mp.c.patch
@@ -0,0 +1,23 @@
+Index: src/kernel/gmp/mp.c
+===================================================================
+--- src/kernel/gmp/mp.c (revision 13151)
++++ src/kernel/gmp/mp.c (working copy)
+@@ -45,18 +45,8 @@
+ /*We need PARI invmod renamed to invmod_pari*/
+ #define INVMOD_PARI
+
+-static void *gmp_realloc(void *ptr, size_t old_size, size_t new_size) {
+- (void)old_size; return (void *) pari_realloc(ptr,new_size);
+-}
+-
+-static void gmp_free(void *ptr, size_t old_size){
+- (void)old_size; pari_free(ptr);
+-}
+-
+ int pari_kernel_init(void)
+ {
+- /* Use pari_malloc instead of malloc */
+- mp_set_memory_functions((void *(*)(size_t)) pari_malloc, gmp_realloc, gmp_free);
+ return 0;
+ }
+
diff --git a/sci-mathematics/pari/files/pari-2.5.0-no-dot-inc.patch b/sci-mathematics/pari/files/pari-2.5.0-no-dot-inc.patch
new file mode 100644
index 000000000000..e34fa6b352ab
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.5.0-no-dot-inc.patch
@@ -0,0 +1,61 @@
+From 03df0cdd7228a412d2adfe9ee9c746b3ec69dd6b Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentfredric@gmail.com>
+Date: Sun, 11 Jun 2017 10:31:03 +1200
+Subject: [PATCH] Fix for 5.26 removal of '.' in @INC
+
+Previous scripts assumed CWD was in @INC and that "PARI::822" was in
+wherever CWD was.
+
+This fixes both of those, and the latter, because its not obvious
+from the build system where one should assume CWD to be.
+
+Instead, the absolute path of the directory of these scripts is
+inserted into @INC
+---
+ src/desc/doc_make | 4 ++++
+ src/desc/gen_proto | 4 ++++
+ src/desc/merge_822 | 4 ++++
+ 3 files changed, 12 insertions(+)
+
+diff --git a/src/desc/doc_make b/src/desc/doc_make
+index 02dc90d..55296ed 100755
+--- a/src/desc/doc_make
++++ b/src/desc/doc_make
+@@ -1,4 +1,8 @@
+ #!/usr/bin/perl
++use File::Spec;
++use File::Basename qw( dirname );
++use lib dirname(File::Spec->rel2abs(__FILE__));
++
+ use PARI::822;
+
+ PARI::822::read(\%funcs, "pari.desc");
+diff --git a/src/desc/gen_proto b/src/desc/gen_proto
+index 38c2daf..ffb4276 100755
+--- a/src/desc/gen_proto
++++ b/src/desc/gen_proto
+@@ -1,4 +1,8 @@
+ #!/usr/bin/perl -w
++use File::Spec;
++use File::Basename qw( dirname );
++use lib dirname(File::Spec->rel2abs(__FILE__));
++
+ use PARI::822;
+
+ $class=$ARGV[0];
+diff --git a/src/desc/merge_822 b/src/desc/merge_822
+index 4c9217b..32b3cc9 100755
+--- a/src/desc/merge_822
++++ b/src/desc/merge_822
+@@ -1,4 +1,8 @@
+ #!/usr/bin/perl -w
++use File::Spec;
++use File::Basename qw( dirname );
++use lib dirname(File::Spec->rel2abs(__FILE__));
++
+ use PARI::822;
+
+ open(IN, $ARGV[0]) || die "cannot find $ARGV[0]";
+--
+2.13.1
+
diff --git a/sci-mathematics/pari/files/pari-2.5.1-1302.patch b/sci-mathematics/pari/files/pari-2.5.1-1302.patch
new file mode 100644
index 000000000000..245e587d275c
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.5.1-1302.patch
@@ -0,0 +1,33 @@
+commit 917b505c86a70dda2191d380861af05becc03858
+Author: Karim Belabas <Karim.Belabas@math.u-bordeaux1.fr>
+Date: Mon Mar 12 23:54:11 2012 +0100
+
+ ispower(x < 0,, &n): n could have the wrong sign [#1302]
+
+diff --git a/src/basemath/arith1.c b/src/basemath/arith1.c
+index ded946b..5502ba5 100644
+--- a/src/basemath/arith1.c
++++ b/src/basemath/arith1.c
+@@ -1109,6 +1109,7 @@ Z_isanypower(GEN x, GEN *pty)
+ *pty = gerepileuptoint(av, y);
+ return k;
+ }
++ if (pty) togglesign_safe(pty);
+ }
+ if (pty) *pty = gerepilecopy(av, *pty); else avma = av;
+ return k;
+diff --git a/src/test/32/ispower b/src/test/32/ispower
+index bf4b6f0..84d8de7 100644
+--- a/src/test/32/ispower
++++ b/src/test/32/ispower
+@@ -1118,7 +1118,7 @@
+ [2, 999]
+ [6, 10]
+ [3, -4]
+-[3, 2]
+-[3, 21218]
++[3, -2]
++[3, -21218]
+ [3, -1/4]
+-Total time spent: 3236
++Total time spent: 3012
diff --git a/sci-mathematics/pari/files/pari-2.5.1-1304.patch b/sci-mathematics/pari/files/pari-2.5.1-1304.patch
new file mode 100644
index 000000000000..3da2e8558dac
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.5.1-1304.patch
@@ -0,0 +1,39 @@
+commit ff707a3f2ba2d5c555434ba50547453833a7570f
+Author: Karim Belabas <Karim.Belabas@math.u-bordeaux1.fr>
+Date: Sun Mar 18 23:54:02 2012 +0100
+
+ 71- issquarefree(0) => error [#1304]
+
+diff --git a/src/basemath/ifactor1.c b/src/basemath/ifactor1.c
+index 046491f..8f9fbaa 100644
+--- a/src/basemath/ifactor1.c
++++ b/src/basemath/ifactor1.c
+@@ -3493,7 +3493,11 @@ moebius(GEN n)
+ GEN
+ gissquarefree(GEN x) { return map_proto_lG(issquarefree,x); }
+ long
+-Z_issquarefree(GEN n) { return moebius(n)? 1: 0; }
++Z_issquarefree(GEN n)
++{
++ if (!signe(n)) return 0;
++ return moebius(n)? 1: 0;
++}
+ long
+ issquarefree(GEN x)
+ {
+diff --git a/src/test/32/arith b/src/test/32/arith
+new file mode 100644
+index 0000000..3c5981a
+--- /dev/null
++++ b/src/test/32/arith
+@@ -0,0 +1,2 @@
++0
++Total time spent: 8
+diff --git a/src/test/in/arith b/src/test/in/arith
+new file mode 100644
+index 0000000..fb92bed
+--- /dev/null
++++ b/src/test/in/arith
+@@ -0,0 +1,2 @@
++\\#1304
++issquarefree(0)
diff --git a/sci-mathematics/pari/files/pari-2.5.1-gcc47.patch b/sci-mathematics/pari/files/pari-2.5.1-gcc47.patch
new file mode 100644
index 000000000000..e7b27159fa06
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.5.1-gcc47.patch
@@ -0,0 +1,18 @@
+Index: pari-2.5.1/src/basemath/bibli2.c
+===================================================================
+--- pari-2.5.1.orig/src/basemath/bibli2.c 2012-01-26 17:26:13.000000000 +0100
++++ pari-2.5.1/src/basemath/bibli2.c 2012-06-04 10:08:41.000000000 +0200
+@@ -1394,12 +1394,12 @@
+ int (*CMP)(void*,GEN,GEN);
+ int (*cmp)(GEN,GEN) = (flag & cmp_LEX)? &lexcmp: &gcmp;
+ void *E;
++ struct veccmp_s v;
+
+ if (flag < 0 || flag > (cmp_REV|cmp_LEX|cmp_IND|cmp_UNIQ))
+ pari_err(flagerr,"vecsort");
+ if (k) {
+ long i, j, l, lk, tx, lx;
+- struct veccmp_s v;
+ GEN y;
+
+ /* cf init_sort */
diff --git a/sci-mathematics/pari/files/pari-2.5.1-no-automagic.patch b/sci-mathematics/pari/files/pari-2.5.1-no-automagic.patch
new file mode 100644
index 000000000000..8fee1f7eaf70
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.5.1-no-automagic.patch
@@ -0,0 +1,100 @@
+diff -Nur pari-2.5.1.orig/config/get_config_options pari-2.5.1/config/get_config_options
+--- pari-2.5.1.orig/config/get_config_options 2012-08-01 18:32:03.000000000 +0100
++++ pari-2.5.1/config/get_config_options 2012-08-01 20:57:09.000000000 +0100
+@@ -83,10 +83,12 @@
+ --with-ncurses-lib=*|--with-ncurses=*)
+ with_ncurses_lib=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
+
++ --without-qt|--with-qt=no) without_qt=yes ;;
+ --with-qt) with_qt=yes ;;
+ --with-qt=*)
+ with_qt=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
+
++ --without-fltk|--with-fltk=no) without_fltk=yes ;;
+ --with-fltk) with_fltk=yes ;;
+ --with-fltk=*)
+ with_fltk=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
+@@ -158,7 +160,9 @@
+ --with-gmp-lib=DIR specify location of gmp libs
+
+ --with-qt[=DIR] use the Qt graphical library [prefix for Qt dir.]
++ --without-qt do not try to use the Qt lib
+ --with-fltk[=DIR] use the FLTK graphical library [prefix for FLTK dir.]
++ --without-fltk do not try to use the FLTK lib
+
+ EOT
+ exit 1
+diff -Nur pari-2.5.1.orig/config/get_fltk pari-2.5.1/config/get_fltk
+--- pari-2.5.1.orig/config/get_fltk 2012-08-01 18:32:03.000000000 +0100
++++ pari-2.5.1/config/get_fltk 2012-08-01 22:28:23.000000000 +0100
+@@ -2,6 +2,9 @@
+ with_fltk=yes
+ fi
+ FLTKDIR=
++if test -z "$without_fltk; then
++ FLTKDIR="`fltk-config --prefix 2>/dev/null`"
++fi
+ case "$with_fltk" in
+ yes)
+ pth=$libpth; lib=fltk; . ./locatelib
+diff -Nur pari-2.5.1.orig/config/get_graphic_lib pari-2.5.1/config/get_graphic_lib
+--- pari-2.5.1.orig/config/get_graphic_lib 2012-08-01 18:32:03.000000000 +0100
++++ pari-2.5.1/config/get_graphic_lib 2012-08-01 22:16:57.000000000 +0100
+@@ -11,6 +11,7 @@
+ else
+ if test -n "$with_fltk"; then which_graphic_lib=fltk; fi
+ if test -n "$with_qt"; then which_graphic_lib=Qt; fi
++ if test -n "$without_fltk" -a -n "$without_qt"; then which_graphic_lib=none; fi
+ if test "$which_graphic_lib" != none; then
+ case $osname in
+ mingw) case $which_graphic_lib in
+@@ -41,7 +42,7 @@
+ case $which_graphic_lib in
+ auto|fltk)
+ . ./get_fltk # FLTKDIR, FLTK_LIBS
+- if test -z "$FLTKDIR"; then
++ if test -z "`fltk-config --ldflags 2> /dev/null`"; then
+ case $which_graphic_lib in fltk) which_graphic_lib=none;; esac
+ else
+ which_graphic_lib=fltk
+diff -Nur pari-2.5.1.orig/config/get_Qt pari-2.5.1/config/get_Qt
+--- pari-2.5.1.orig/config/get_Qt 2012-08-01 18:32:03.000000000 +0100
++++ pari-2.5.1/config/get_Qt 2012-08-01 20:39:28.000000000 +0100
+@@ -5,7 +5,7 @@
+ case "$with_qt" in
+ yes)
+ pth="/usr/local/lib /usr/local/share /usr/lib /usr/share"
+- QTDIR=`locatedir qt4/bin $pth`
++ QTDIR=`locatedir qt4 $pth`
+ QTLIB="-lQtCore -lQtGui"
+ which_graphic_lib=Qt4
+ if test -z "$QTDIR"; then
+diff -Nur pari-2.5.1.orig/config/Makefile.SH pari-2.5.1/config/Makefile.SH
+--- pari-2.5.1.orig/config/Makefile.SH 2012-08-01 18:32:03.000000000 +0100
++++ pari-2.5.1/config/Makefile.SH 2012-08-01 21:08:20.000000000 +0100
+@@ -65,12 +65,12 @@
+ PLOTLIBS="-L\$(QTDIR)/lib $QTLIB"
+ graph=plotQt;;
+ Qt4)
+- PLOTCFLAGS='-D__FANCY_WIN__ -I$(QTDIR)/include'
+- PLOTLIBS="-L\$(QTDIR)/lib $QTLIB"
++ PLOTCFLAGS='-D__FANCY_WIN__ `pkg-config --cflags QtGui`'
++ PLOTLIBS="`pkg-config --libs QtGui`"
+ graph=plotQt4;;
+ fltk)
+- PLOTCFLAGS="-I\$(FLTKDIR)/include $X11_INC"
+- PLOTLIBS="-L\$(FLTKDIR)/lib -lfltk $FLTK_LIBS"
++ PLOTCFLAGS="`fltk-config --cxxflags` $X11_INC"
++ PLOTLIBS="`fltk-config --ldflags`"
+ postconfig='-fltk-config --post '
+ graph=plotfltk;;
+ win32)
+@@ -254,7 +254,7 @@
+ GMPINCLUDE = $GMPINCLUDE
+ # Graphic library.
+ QTDIR = "$QTDIR"
+-MOC = \$(QTDIR)/bin/moc
++MOC = "`which moc`"
+ PLOTCFLAGS = $PLOTCFLAGS
+ PLOTLIBS = $PLOTLIBS
+ CPLUSPLUS = g++
diff --git a/sci-mathematics/pari/files/pari-2.5.4-polred.patch b/sci-mathematics/pari/files/pari-2.5.4-polred.patch
new file mode 100644
index 000000000000..4287c9d35d66
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.5.4-polred.patch
@@ -0,0 +1,754 @@
+diff -ru src/src/basemath/base1.c b/src/basemath/base1.c
+--- src/src/basemath/base1.c 2013-05-06 16:01:56.000000000 +0200
++++ b/src/basemath/base1.c 2013-05-06 16:49:09.042406927 +0200
+@@ -1675,40 +1675,42 @@
+ ZX_is_better(GEN y, GEN x, GEN *dx)
+ {
+ GEN d = ZX_disc(y);
+- long cmp = absi_cmp(d, *dx);
++ int cmp;
++ if (!*dx) *dx = ZX_disc(x);
++ cmp = absi_cmp(d, *dx);
+ if (cmp < 0) { *dx = d; return 1; }
+ if (cmp == 0) return cmp_abs_ZX(y, x) < 0;
+ return 0;
+ }
+
+-static GEN polred_aux(nfbasic_t *T, GEN *pro, long flag);
++static void polredbest_aux(nfbasic_t *T, GEN *pro, GEN *px, GEN *pdx, GEN *pa);
+ /* Seek a simpler, polynomial pol defining the same number field as
+ * x (assumed to be monic at this point) */
+ static GEN
+ nfpolred(nfbasic_t *T, GEN *pro)
+ {
+- GEN x = T->x, dx = T->dx, a, z, rev, pow, dpow;
++ GEN x = T->x, dx, b, rev, pow, dpow;
+ long i, n = degpol(x), v = varn(x);
+
+ if (n == 1) {
+ T->x = deg1pol_shallow(gen_1, gen_m1, v);
+ *pro = NULL; return pol_1(v);
+ }
+- z = polred_aux(T, pro, nf_ORIG | nf_RED);
+- if (typ(z) != t_VEC || !ZX_is_better(gel(z,1),x,&dx))
+- return NULL; /* no improvement */
+-
+- rev = QXQ_reverse(gel(z,2), x);
+- x = gel(z,1); if (DEBUGLEVEL>1) err_printf("xbest = %Ps\n",x);
++ polredbest_aux(T, pro, &x, &dx, &b);
++ if (x == T->x) return NULL; /* no improvement */
++ if (DEBUGLEVEL>1) err_printf("xbest = %Ps\n",x);
+
+ /* update T */
++ rev = QXQ_reverse(b, T->x);
+ pow = QXQ_powers(rev, n-1, x);
+ pow = Q_remove_denom(pow, &dpow);
+- a = T->bas;
+- for (i=2; i<=n; i++) gel(a,i) = QX_ZXQV_eval(gel(a,i), pow, dpow);
++ for (i=2; i<=n; i++) gel(T->bas,i) = QX_ZXQV_eval(gel(T->bas,i), pow, dpow);
+ (void)Z_issquareall(diviiexact(dx,T->dK), &(T->index));
+- T->basden = get_bas_den(a);
+- T->dx = dx; T->x = x; *pro = NULL; return rev;
++ T->basden = get_bas_den(T->bas);
++ T->dx = dx;
++ T->x = x;
++ *pro = NULL; /* reset */
++ return rev;
+ }
+
+ /* let bas a t_VEC of QX giving a Z-basis of O_K. Return the index of the
+@@ -1776,7 +1778,7 @@
+ x = Q_primpart(x);
+ RgX_check_ZX(x, "nfinit");
+ if (!ZX_is_irred(x)) pari_err(redpoler, "nfinit");
+- if (flag & nf_RED || !gequal1(gel(x,lg(x)-1)))
++ if (flag & nf_RED || !equali1(gel(x,lg(x)-1)))
+ x = ZX_Q_normalize(x, &(T->lead));
+ nfmaxord(&S, x, flag, fa);
+ index = S.index;
+@@ -1822,26 +1824,32 @@
+ nfinitall(GEN x, long flag, long prec)
+ {
+ const pari_sp av = avma;
+- GEN nf;
++ GEN nf, lead;
+ nfbasic_t T;
+
+ nfbasic_init(x, flag, NULL, &T);
+ nfbasic_add_disc(&T); /* more expensive after set_LLL_basis */
+- if (T.lead != gen_1 && !(flag & nf_RED))
++ lead = T.lead;
++ if (lead != gen_1 && !(flag & nf_RED))
+ {
+ pari_warn(warner,"non-monic polynomial. Result of the form [nf,c]");
+ flag |= nf_RED | nf_ORIG;
+ }
+ if (flag & nf_RED)
+ {
+- GEN ro, rev = nfpolred(&T, &ro);
++ GEN ro, rev;
++ /* lie to polred: more efficient to update *after* modreverse, than to
++ * unscale in the polred subsystem */
++ T.lead = gen_1;
++ rev = nfpolred(&T, &ro);
+ nf = nfbasic_to_nf(&T, ro, prec);
+ if (flag & nf_ORIG)
+ {
+ if (!rev) rev = pol_x(varn(T.x)); /* no improvement */
+- if (T.lead != gen_1) rev = RgX_Rg_div(rev, T.lead);
++ if (lead != gen_1) rev = RgX_Rg_div(rev, lead);
+ nf = mkvec2(nf, mkpolmod(rev, T.x));
+ }
++ T.lead = lead; /* restore */
+ } else {
+ GEN ro; set_LLL_basis(&T, &ro, 0.99);
+ nf = nfbasic_to_nf(&T, ro, prec);
+@@ -1948,7 +1956,7 @@
+ get_polchar(CG_data *d, GEN x)
+ { return get_pol(d, RgM_RgC_mul(d->ZKembed,x)); }
+
+-/* return a defining polynomial for Q(w_i) */
++/* return a defining polynomial for Q(w_k) */
+ static GEN
+ get_polmin_w(CG_data *d, long k)
+ {
+@@ -1956,6 +1964,22 @@
+ if (g) (void)ZX_gcd_all(g, ZX_deriv(g), &g);
+ return g;
+ }
++/* return a defining polynomial for Q(w_k+w_l) */
++static GEN
++get_polmin_add2(CG_data *d, long k, long l)
++{
++ GEN g = get_pol(d, RgV_add(gel(d->ZKembed,k), gel(d->ZKembed,l)));
++ if (g) (void)ZX_gcd_all(g, ZX_deriv(g), &g);
++ return g;
++}
++/* return a defining polynomial for Q(w_k-w_l) */
++static GEN
++get_polmin_sub2(CG_data *d, long k, long l)
++{
++ GEN g = get_pol(d, RgV_sub(gel(d->ZKembed,k), gel(d->ZKembed,l)));
++ if (g) (void)ZX_gcd_all(g, ZX_deriv(g), &g);
++ return g;
++}
+
+ /* does x generate the correct field ? */
+ static GEN
+@@ -2044,13 +2068,67 @@
+ d->v = varn(T->x);
+ d->r1= T->r1; return prec;
+ }
++static void
++update(GEN *pai, GEN *pch, nfbasic_t *T, long orig)
++{
++ GEN ch = *pch, ai = *pai;
++ if (!ch)
++ { /* accuracy too low, compute algebraically */
++ ch = ZXQ_charpoly(ai, T->x, varn(T->x));
++ (void)ZX_gcd_all(ch, ZX_deriv(ch), &ch);
++ }
++ if (ZX_canon_neg(ch) && orig) ai = RgX_neg(ai);
++ if (DEBUGLEVEL>3) err_printf("polred: generator %Ps\n", ch);
++ if (T->lead != gen_1 && orig) ai = RgX_unscale(ai, ginv(T->lead));
++ *pch = ch; *pai = ai;
++}
++static GEN
++findmindisc(GEN y, GEN *pa)
++{
++ GEN a = *pa, x = gel(y,1), b = gel(a,1), dx = NULL;
++ long i, l = lg(y);
++ for (i = 2; i < l; i++)
++ {
++ GEN yi = gel(y,i);
++ if (ZX_is_better(yi,x,&dx)) { x = yi; b = gel(a,i); }
++ }
++ *pa = b; return x;
++}
++/* filter [y,b] from polred_aux: keep a single polynomial of degree n in y
++ * [ the best wrt discriminant ordering ], but keep all non-primitive
++ * polynomials */
++static void
++filter(GEN y, GEN b, long n)
++{
++ GEN x, a, dx;
++ long i, k = 1, l = lg(y);
++ a = x = dx = NULL;
++ for (i = 1; i < l; i++)
++ {
++ GEN yi = gel(y,i), ai = gel(b,i);
++ if (degpol(yi) == n)
++ {
++ if (dx && !ZX_is_better(yi,x,&dx)) continue;
++ if (!dx) dx = ZX_disc(yi);
++ x = yi; a = ai; continue;
++ }
++ gel(y,k) = yi;
++ gel(b,k) = ai; k++;
++ }
++ if (dx)
++ {
++ gel(y,k) = x;
++ gel(b,k) = a; k++;
++ }
++ setlg(y, k);
++ setlg(b, k);
++}
++
+ static GEN
+-polred_aux(nfbasic_t *T, GEN *pro, long flag)
++polred_aux(nfbasic_t *T, GEN *pro, long orig)
+ {
+ GEN b, y, x = T->x;
+- long i, v = varn(x), l = lg(T->bas);
+- const long orig = flag & nf_ORIG;
+- const long nfred = flag & nf_RED;
++ long maxi, i, j, k, v = varn(x), n = lg(T->bas)-1;
+ nffp_t F;
+ CG_data d;
+
+@@ -2058,27 +2136,41 @@
+ *pro = F.ro;
+ d.ZKembed = F.M;
+
+- y = cgetg(l, t_VEC);
+- b = cgetg(l, t_COL);
++ /* n + 2 sum_{1 <= i <= n} n-i = n + n(n-1) = n*n */
++ y = cgetg(n*n + 1, t_VEC);
++ b = cgetg(n*n + 1, t_COL);
++ /* i = 1 */
+ gel(y,1) = deg1pol_shallow(gen_1, gen_m1, v);
+ gel(b,1) = gen_1;
+- for (i = 2; i < l; i++)
++ for (i = k = 2; i <= n; i++)
+ {
+- GEN ch, ai = gel(T->bas,i);
++ GEN ch, ai;
++ ai = gel(T->bas,i);
+ ch = get_polmin_w(&d, i);
+- /* if accuracy too low, compute algebraically */
+- if (!ch)
++ update(&ai, &ch, T, orig);
++ gel(y,k) = ch;
++ gel(b,k) = ai; k++;
++ }
++ k = i;
++ maxi = minss(n, 3);
++ for (i = 1; i <= maxi; i++)
++ for (j = i+1; j <= n; j++)
+ {
+- ch = ZXQ_charpoly(ai, x, v);
+- (void)ZX_gcd_all(ch, ZX_deriv(ch), &ch);
++ GEN ch, ai;
++ ai = gadd(gel(T->bas,i), gel(T->bas,j));
++ ch = get_polmin_add2(&d, i, j);
++ update(&ai, &ch, T, orig);
++ gel(y,k) = ch;
++ gel(b,k) = ai; k++;
++
++ ai = gsub(gel(T->bas,i), gel(T->bas,j));
++ ch = get_polmin_sub2(&d, i, j);
++ update(&ai, &ch, T, orig);
++ gel(y,k) = ch;
++ gel(b,k) = ai; k++;
+ }
+- if (ZX_canon_neg(ch) && orig) ai = RgX_neg(ai);
+- if (nfred && degpol(ch) == l-1) return mkvec2(ch, ai);
+- if (DEBUGLEVEL>3) err_printf("polred: generator %Ps\n", ch);
+- if (T->lead != gen_1 && orig) ai = RgX_unscale(ai, ginv(T->lead));
+- gel(y,i) = ch;
+- gel(b,i) = ai;
+- }
++ setlg(y, k);
++ setlg(b, k); filter(y, b, n);
+ if (!orig) return gen_sort_uniq(y, (void*)cmpii, &gen_cmp_RgX);
+ (void)sort_factor_pol(mkmat2(y, b), cmpii);
+ settyp(y, t_COL); return mkmat2(b, y);
+@@ -2089,10 +2181,58 @@
+ {
+ pari_sp av = avma;
+ GEN ro;
+- nfbasic_t T; nfbasic_init(x, flag & (nf_PARTIALFACT|nf_RED), fa, &T);
++ nfbasic_t T; nfbasic_init(x, flag & nf_PARTIALFACT, fa, &T);
+ return gerepilecopy(av, polred_aux(&T, &ro, flag & nf_ORIG));
+ }
+
++/* finds "best" polynomial in polred_aux list, defaulting to T->x if none of
++ * them is primitive. *px is the ZX, characteristic polynomial of *pb, *pdx
++ * its discriminant.
++ * Set *pro = polroots(T->x) [ NOT *px ], in case caller needs it. */
++static void
++polredbest_aux(nfbasic_t *T, GEN *pro, GEN *px, GEN *pdx, GEN *pb)
++{
++ GEN a, v, y, x = T->x, b = pol_x(varn(x)); /* default values */
++ long i, l, n = degpol(x);
++ v = polred_aux(T, pro, nf_ORIG);
++ *pdx = T->dx;
++ y = gel(v,2);
++ a = gel(v,1); l = lg(a);
++ for (i=1; i<l; i++)
++ {
++ GEN yi = gel(y,i);
++ pari_sp av = avma;
++ if (degpol(yi) == n && ZX_is_better(yi,x,pdx)) { x = yi; b = gel(a,i); }
++ else avma = av;
++ }
++ *px = x;
++ *pb = b;
++}
++GEN
++polredbest(GEN x, long flag)
++{
++ pari_sp av = avma;
++ GEN dx, ro, b;
++ long fl;
++ nfbasic_t T;
++ switch(flag)
++ {
++ default: pari_err(talker, "invalid flag in polredbest()");
++ case 0: fl = nf_PARTIALFACT; break;
++ case 1: fl = nf_PARTIALFACT|nf_ORIG; break;
++ }
++ nfbasic_init(x, fl, NULL, &T);
++ polredbest_aux(&T, &ro, &x, &dx, &b);
++ if (flag)
++ {
++ if (x == T.x)
++ b = pol_x(varn(x)); /* no improvement */
++ else
++ b = QXQ_reverse(b, T.x);
++ x = mkvec2(x, mkpolmod(b,x));
++ }
++ return gerepilecopy(av, x);
++}
+ /* FIXME: backward compatibility */
+ GEN
+ polred0(GEN x, long flag, GEN fa)
+@@ -2273,22 +2413,6 @@
+ return bound;
+ }
+
+-static GEN
+-findmindisc(GEN y, GEN *pa)
+-{
+- GEN a = *pa, x = gel(y,1), b = gel(a,1), dx;
+- long i, l = lg(y);
+-
+- if (l == 2) { *pa = b; return x; }
+- dx = ZX_disc(x);
+- for (i = 2; i < l; i++)
+- {
+- GEN yi = gel(y,i);
+- if (ZX_is_better(yi,x,&dx)) { x = yi; b = gel(a,i); }
+- }
+- *pa = b; return x;
+-}
+-
+ /* z "small" minimal polynomial of Mod(a,x), deg z = deg x */
+ static GEN
+ store(GEN x, GEN z, GEN a, nfbasic_t *T, long flag, GEN u)
+@@ -2355,7 +2479,7 @@
+ GEN y, a, u;
+ nfbasic_t T;
+
+- nfbasic_init(x, flag & (nf_PARTIALFACT|nf_RED), NULL, &T);
++ nfbasic_init(x, flag & nf_PARTIALFACT, NULL, &T);
+ x = T.x; vx = varn(x);
+
+ if (degpol(x) == 1)
+diff -ru src/src/functions/number_fields/polredabs b/src/functions/number_fields/polredabs
+--- src/src/functions/number_fields/polredabs 2013-05-06 16:01:57.000000000 +0200
++++ b/src/functions/number_fields/polredabs 2013-05-06 16:47:04.542393431 +0200
+@@ -17,8 +17,8 @@
+ \misctitle{Warning} This routine uses an exponential-time algorithm to
+ enumerate all potential generators, and may be exceedingly slow when the
+ number field has many subfields, hence a lot of elements of small $T_2$-norm.
+- E.g. do not try it on the compositum of many quadratic fields; in that case,
+- use \tet{polred} instead.
++ The function \tet{polredbest} is in general much faster (it runs in
++ polynomial time), and tends to return polynomials with smaller discriminants.
+
+ The binary digits of $\fl$ mean
+
+@@ -38,6 +38,15 @@
+ (has at most one large prime factor not in the \kbd{addprimes} table), the
+ result is the same.
+
++ \bprog
++ ? T = x^16 - 136*x^14 + 6476*x^12 - 141912*x^10 + 1513334*x^8 - 7453176*x^6 + 13950764*x^4 - 5596840*x^2 + 46225
++ ? T1 = polredabs(T); T2 = polredbest(T);
++ ? [ norml2(polroots(T1)), norml2(polroots(T2)) ]
++ %3 = [88.0000000, 120.000000]
++ ? [ sizedigit(poldisc(T1)), sizedigit(poldisc(T2)) ]
++ %4 = [75, 67]
++ @eprog
++
+ Variant: Instead of the above hardcoded numerical flags, one should use an
+ or-ed combination of
+
+diff -ruN src/src/functions/number_fields/polredbest b/src/functions/number_fields/polredbest
+--- src/src/functions/number_fields/polredbest 1970-01-01 01:00:00.000000000 +0100
++++ b/src/functions/number_fields/polredbest 2013-01-31 14:49:05.547513332 +0100
+@@ -0,0 +1,21 @@
++Function: polredbest
++Section: number_fields
++C-Name: polredbest
++Prototype: GD0,L,
++Help: polredbest(T,{flag=0}): reduction of the polynomial T (gives minimal
++ polynomials only). If flag=1, gives also elements.
++Doc: finds a polynomial with reasonably
++ small coefficients defining the same number field as $T$.
++ All $T$ accepted by \tet{nfinit} are also allowed here (e.g. non-monic
++ polynomials, \kbd{nf}, \kbd{bnf}, \kbd{[T,Z\_K\_basis]}). Contrary to
++ \tet{polredabs}, this routine runs in polynomial time, but it offers no
++ guarantee as to the minimality of its result.
++
++ If $\fl = 1$: outputs a two-component row vector $[P,a]$, where $P$ is the
++ default output and \kbd{Mod(a, P)} is a root of the original $T$.
++ \bprog
++ ? polredbest(x^4 + 8, 1)
++ %1 = [x^4 + 2, Mod(x^3, x^4 + 2)]
++ ? charpoly(%[2])
++ %2 = x^4 + 8
++ @eprog
+diff -ruN src/src/headers/paridecl.h b/src/headers/paridecl.h
+--- src/src/headers/paridecl.h 2012-09-25 23:10:47.000000000 +0200
++++ b/src/headers/paridecl.h 2013-01-31 14:49:05.557525771 +0100
+@@ -889,6 +889,7 @@
+ GEN polredabs0(GEN x, long flag);
+ GEN polredabs2(GEN x);
+ GEN polredabsall(GEN x, long flun);
++GEN polredbest(GEN x, long flag);
+ GEN smallpolred(GEN x);
+ GEN smallpolred2(GEN x);
+ GEN tschirnhaus(GEN x);
+diff -ru src/src/test/32/compat b/src/test/32/compat
+--- src/src/test/32/compat 2013-05-06 16:01:57.000000000 +0200
++++ b/src/test/32/compat 2013-05-06 16:47:04.542393431 +0200
+@@ -787,13 +787,9 @@
+ ? factoreddiscf(p,fa)
+ 136866601
+ ? factoredpolred(p,fa)
+-[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46
+-*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52
+-*x^3 - 197*x^2 - 273*x - 127]
++[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671]
+ ? factoredpolred2(p,fa)
+-[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46
+-*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52
+-*x^3 - 197*x^2 - 273*x - 127]
++[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671]
+ ? factornf(x^3+x^2-2*x-1,t^3+t^2-2*t-1)
+
+ [x + mod(-t, t^3 + t^2 - 2*t - 1) 1]
+@@ -904,7 +900,7 @@
+ ? gcd(12345678,87654321)
+ 9
+ ? getheap()
+-[208, 45748]
++[208, 45584]
+ ? getrand()
+ Vecsmall([1220248512, -582244995, 485580680, -1643185972, -2103930341, -9694
+ 07356, 336208700, 1439513079, -1910826353, -2042699820, 222745475, 183991374
+@@ -2014,7 +2010,7 @@
+ ? orderell(tcurve,[1,2])
+ 6
+ ? ordred(x^3-12*x+45*x-1)
+-[x - 1, x^3 - 363*x - 2663, x^3 + 33*x - 1]
++[x - 1, x^3 + 33*x - 1]
+ ? padicprec(padicno,127)
+ 5
+ ? pascal(8)
+@@ -2093,15 +2089,16 @@
+ ? polint([0,2,3],[0,4,9],5)
+ 25
+ ? polred(x^5-2*x^4-4*x^3-96*x^2-352*x-568)
+-[x - 1, x^5 - x^4 - 6*x^3 + 6*x^2 + 13*x - 5, x^5 - x^4 + 2*x^3 - 4*x^2 + x
+-- 1, x^5 - x^4 + 4*x^3 - 2*x^2 + x - 1, x^5 + 4*x^3 - 4*x^2 + 8*x - 8]
++[x - 1, x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1]
+ ? polred2(x^4-28*x^3-458*x^2+9156*x-25321)
+
+ [1 x - 1]
+
+-[1/115*x^2 - 14/115*x - 327/115 x^2 - 10]
++[1/115*x^2 - 14/115*x - 212/115 x^2 - 2*x - 9]
++
++[-1/115*x^2 + 14/115*x + 442/115 x^2 - 2*x - 9]
+
+-[2/897*x^3 - 14/299*x^2 - 1171/897*x + 9569/897 x^4 - 32*x^2 + 6]
++[1/115*x^2 - 14/115*x - 327/115 x^2 - 10]
+
+ [1/4485*x^3 - 7/1495*x^2 - 1034/4485*x + 7924/4485 x^4 - 8*x^2 + 6]
+
+@@ -2454,13 +2451,21 @@
+ ? smallinitell([0,0,0,-17,0])
+ [0, 0, 0, -17, 0, 0, -34, 0, -289, 816, 0, 314432, 1728]
+ ? smallpolred(x^4+576)
+-[x - 1, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1]
++[x - 1, x^2 - 3*x + 3, x^2 - 2*x + 2, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1]
+ ? smallpolred2(x^4+576)
+
+ [1 x - 1]
+
++[-1/192*x^3 - 1/8*x + 3/2 x^2 - 3*x + 3]
++
++[1/24*x^2 + 1 x^2 - 2*x + 2]
++
++[-1/24*x^2 + 1 x^2 - 2*x + 2]
++
+ [-1/192*x^3 - 1/8*x + 1/2 x^2 - x + 1]
+
++[1/192*x^3 + 1/8*x + 1/2 x^2 - x + 1]
++
+ [1/24*x^2 x^2 + 1]
+
+ [1/192*x^3 + 1/48*x^2 - 1/8*x x^4 - x^2 + 1]
+@@ -2650,6 +2655,6 @@
+ ? getstack()
+ 104
+ ? getheap()
+-[599, 110982]
++[599, 110954]
+ ? print("Total time spent: ",gettime);
+-Total time spent: 236
++Total time spent: 140
+diff -ru src/src/test/32/nfields b/src/test/32/nfields
+--- src/src/test/32/nfields 2013-05-06 16:01:57.000000000 +0200
++++ b/src/test/32/nfields 2013-05-06 16:47:04.542393431 +0200
+@@ -926,45 +926,50 @@
+ ? polgalois(x^6-3*x^2-1)
+ [12, 1, 1, "A_4(6) = [2^2]3"]
+ ? polred(x^5-2*x^4-4*x^3-96*x^2-352*x-568)
+-[x - 1, x^5 - x^4 - 6*x^3 + 6*x^2 + 13*x - 5, x^5 - x^4 + 2*x^3 - 4*x^2 + x
+-- 1, x^5 - x^4 + 4*x^3 - 2*x^2 + x - 1, x^5 + 4*x^3 - 4*x^2 + 8*x - 8]
++[x - 1, x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1]
+ ? polred(x^4-28*x^3-458*x^2+9156*x-25321,3)
+
+ [1 x - 1]
+
+-[1/115*x^2 - 14/115*x - 327/115 x^2 - 10]
++[1/115*x^2 - 14/115*x - 212/115 x^2 - 2*x - 9]
++
++[-1/115*x^2 + 14/115*x + 442/115 x^2 - 2*x - 9]
+
+-[2/897*x^3 - 14/299*x^2 - 1171/897*x + 9569/897 x^4 - 32*x^2 + 6]
++[1/115*x^2 - 14/115*x - 327/115 x^2 - 10]
+
+ [1/4485*x^3 - 7/1495*x^2 - 1034/4485*x + 7924/4485 x^4 - 8*x^2 + 6]
+
+ ? polred(x^4+576,1)
+-[x - 1, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1]
++[x - 1, x^2 - 3*x + 3, x^2 - 2*x + 2, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1]
+ ? polred(x^4+576,3)
+
+ [1 x - 1]
+
++[-1/192*x^3 - 1/8*x + 3/2 x^2 - 3*x + 3]
++
++[1/24*x^2 + 1 x^2 - 2*x + 2]
++
++[-1/24*x^2 + 1 x^2 - 2*x + 2]
++
+ [-1/192*x^3 - 1/8*x + 1/2 x^2 - x + 1]
+
++[1/192*x^3 + 1/8*x + 1/2 x^2 - x + 1]
++
+ [1/24*x^2 x^2 + 1]
+
+ [1/192*x^3 + 1/48*x^2 - 1/8*x x^4 - x^2 + 1]
+
+ ? polred(p2,0,fa)
+-[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46
+-*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52
+-*x^3 - 197*x^2 - 273*x - 127]
++[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671]
+ ? polred(p2,1,fa)
+-[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46
+-*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52
+-*x^3 - 197*x^2 - 273*x - 127]
++[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671]
+ ? polredabs(x^5-2*x^4-4*x^3-96*x^2-352*x-568)
+ x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1
+ ? polredabs(x^5-2*x^4-4*x^3-96*x^2-352*x-568,1)
+ [x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1, Mod(2*x^4 - x^3 + 3*x^2 - 3*x - 1, x^5 -
+ x^4 + 2*x^3 - 4*x^2 + x - 1)]
+ ? polredord(x^3-12*x+45*x-1)
+-[x - 1, x^3 - 363*x - 2663, x^3 + 33*x - 1]
++[x - 1, x^3 + 33*x - 1]
+ ? polsubcyclo(31,5)
+ x^5 + x^4 - 12*x^3 - 21*x^2 + x + 5
+ ? setrand(1);poltschirnhaus(x^5-x-1)
+@@ -1028,6 +1033,6 @@
+ ? sizebyte(%)
+ 152
+ ? getheap
+-[175, 113027]
++[175, 112999]
+ ? print("Total time spent: ",gettime);
+-Total time spent: 116
++Total time spent: 76
+diff -ru src/src/test/64/compat b/src/test/64/compat
+--- src/src/test/64/compat 2013-05-06 16:01:58.000000000 +0200
++++ b/src/test/64/compat 2013-05-06 16:47:04.542393431 +0200
+@@ -789,13 +789,9 @@
+ ? factoreddiscf(p,fa)
+ 136866601
+ ? factoredpolred(p,fa)
+-[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46
+-*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52
+-*x^3 - 197*x^2 - 273*x - 127]
++[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671]
+ ? factoredpolred2(p,fa)
+-[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46
+-*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52
+-*x^3 - 197*x^2 - 273*x - 127]
++[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671]
+ ? factornf(x^3+x^2-2*x-1,t^3+t^2-2*t-1)
+
+ [x + mod(-t, t^3 + t^2 - 2*t - 1) 1]
+@@ -906,7 +902,7 @@
+ ? gcd(12345678,87654321)
+ 9
+ ? getheap()
+-[208, 44472]
++[208, 44308]
+ ? getrand()
+ Vecsmall([-696235626332558091, -7363039021536514678, -3123062006620239999, -
+ 2510915082749224356, -5278885121447018503, 8033304491650294704, 333461878925
+@@ -2014,7 +2010,7 @@
+ ? orderell(tcurve,[1,2])
+ 6
+ ? ordred(x^3-12*x+45*x-1)
+-[x - 1, x^3 - 363*x - 2663, x^3 + 33*x - 1]
++[x - 1, x^3 + 33*x - 1]
+ ? padicprec(padicno,127)
+ 5
+ ? pascal(8)
+@@ -2093,15 +2089,16 @@
+ ? polint([0,2,3],[0,4,9],5)
+ 25
+ ? polred(x^5-2*x^4-4*x^3-96*x^2-352*x-568)
+-[x - 1, x^5 - x^4 - 6*x^3 + 6*x^2 + 13*x - 5, x^5 - x^4 + 2*x^3 - 4*x^2 + x
+-- 1, x^5 - x^4 + 4*x^3 - 2*x^2 + x - 1, x^5 + 4*x^3 - 4*x^2 + 8*x - 8]
++[x - 1, x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1]
+ ? polred2(x^4-28*x^3-458*x^2+9156*x-25321)
+
+ [1 x - 1]
+
+-[1/115*x^2 - 14/115*x - 327/115 x^2 - 10]
++[1/115*x^2 - 14/115*x - 212/115 x^2 - 2*x - 9]
++
++[-1/115*x^2 + 14/115*x + 442/115 x^2 - 2*x - 9]
+
+-[2/897*x^3 - 14/299*x^2 - 1171/897*x + 9569/897 x^4 - 32*x^2 + 6]
++[1/115*x^2 - 14/115*x - 327/115 x^2 - 10]
+
+ [1/4485*x^3 - 7/1495*x^2 - 1034/4485*x + 7924/4485 x^4 - 8*x^2 + 6]
+
+@@ -2454,13 +2451,21 @@
+ ? smallinitell([0,0,0,-17,0])
+ [0, 0, 0, -17, 0, 0, -34, 0, -289, 816, 0, 314432, 1728]
+ ? smallpolred(x^4+576)
+-[x - 1, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1]
++[x - 1, x^2 - 3*x + 3, x^2 - 2*x + 2, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1]
+ ? smallpolred2(x^4+576)
+
+ [1 x - 1]
+
++[-1/192*x^3 - 1/8*x + 3/2 x^2 - 3*x + 3]
++
++[1/24*x^2 + 1 x^2 - 2*x + 2]
++
++[-1/24*x^2 + 1 x^2 - 2*x + 2]
++
+ [-1/192*x^3 - 1/8*x + 1/2 x^2 - x + 1]
+
++[1/192*x^3 + 1/8*x + 1/2 x^2 - x + 1]
++
+ [1/24*x^2 x^2 + 1]
+
+ [1/192*x^3 + 1/48*x^2 - 1/8*x x^4 - x^2 + 1]
+@@ -2649,6 +2654,6 @@
+ ? getstack()
+ 200
+ ? getheap()
+-[599, 100048]
++[599, 100020]
+ ? print("Total time spent: ",gettime);
+-Total time spent: 152
++Total time spent: 180
+diff -ru src/src/test/64/nfields b/src/test/64/nfields
+--- src/src/test/64/nfields 2013-05-06 16:01:58.000000000 +0200
++++ b/src/test/64/nfields 2013-05-06 16:47:04.542393431 +0200
+@@ -928,45 +928,50 @@
+ ? polgalois(x^6-3*x^2-1)
+ [12, 1, 1, "A_4(6) = [2^2]3"]
+ ? polred(x^5-2*x^4-4*x^3-96*x^2-352*x-568)
+-[x - 1, x^5 - x^4 - 6*x^3 + 6*x^2 + 13*x - 5, x^5 - x^4 + 2*x^3 - 4*x^2 + x
+-- 1, x^5 - x^4 + 4*x^3 - 2*x^2 + x - 1, x^5 + 4*x^3 - 4*x^2 + 8*x - 8]
++[x - 1, x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1]
+ ? polred(x^4-28*x^3-458*x^2+9156*x-25321,3)
+
+ [1 x - 1]
+
+-[1/115*x^2 - 14/115*x - 327/115 x^2 - 10]
++[1/115*x^2 - 14/115*x - 212/115 x^2 - 2*x - 9]
++
++[-1/115*x^2 + 14/115*x + 442/115 x^2 - 2*x - 9]
+
+-[2/897*x^3 - 14/299*x^2 - 1171/897*x + 9569/897 x^4 - 32*x^2 + 6]
++[1/115*x^2 - 14/115*x - 327/115 x^2 - 10]
+
+ [1/4485*x^3 - 7/1495*x^2 - 1034/4485*x + 7924/4485 x^4 - 8*x^2 + 6]
+
+ ? polred(x^4+576,1)
+-[x - 1, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1]
++[x - 1, x^2 - 3*x + 3, x^2 - 2*x + 2, x^2 - x + 1, x^2 + 1, x^4 - x^2 + 1]
+ ? polred(x^4+576,3)
+
+ [1 x - 1]
+
++[-1/192*x^3 - 1/8*x + 3/2 x^2 - 3*x + 3]
++
++[1/24*x^2 + 1 x^2 - 2*x + 2]
++
++[-1/24*x^2 + 1 x^2 - 2*x + 2]
++
+ [-1/192*x^3 - 1/8*x + 1/2 x^2 - x + 1]
+
++[1/192*x^3 + 1/8*x + 1/2 x^2 - x + 1]
++
+ [1/24*x^2 x^2 + 1]
+
+ [1/192*x^3 + 1/48*x^2 - 1/8*x x^4 - x^2 + 1]
+
+ ? polred(p2,0,fa)
+-[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46
+-*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52
+-*x^3 - 197*x^2 - 273*x - 127]
++[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671]
+ ? polred(p2,1,fa)
+-[x - 1, x^5 - 2*x^4 - 62*x^3 + 85*x^2 + 818*x + 1, x^5 - 2*x^4 - 53*x^3 - 46
+-*x^2 + 508*x + 913, x^5 - 2*x^4 - 13*x^3 + 37*x^2 - 21*x - 1, x^5 - x^4 - 52
+-*x^3 - 197*x^2 - 273*x - 127]
++[x - 1, x^5 - 80*x^3 - 223*x^2 + 800*x + 2671]
+ ? polredabs(x^5-2*x^4-4*x^3-96*x^2-352*x-568)
+ x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1
+ ? polredabs(x^5-2*x^4-4*x^3-96*x^2-352*x-568,1)
+ [x^5 - x^4 + 2*x^3 - 4*x^2 + x - 1, Mod(2*x^4 - x^3 + 3*x^2 - 3*x - 1, x^5 -
+ x^4 + 2*x^3 - 4*x^2 + x - 1)]
+ ? polredord(x^3-12*x+45*x-1)
+-[x - 1, x^3 - 363*x - 2663, x^3 + 33*x - 1]
++[x - 1, x^3 + 33*x - 1]
+ ? polsubcyclo(31,5)
+ x^5 + x^4 - 12*x^3 - 21*x^2 + x + 5
+ ? setrand(1);poltschirnhaus(x^5-x-1)
+@@ -1030,6 +1035,6 @@
+ ? sizebyte(%)
+ 288
+ ? getheap
+-[175, 102929]
++[175, 102901]
+ ? print("Total time spent: ",gettime);
+-Total time spent: 84
++Total time spent: 110
diff --git a/sci-mathematics/pari/files/pari-2.5.4-slow_determinant.patch b/sci-mathematics/pari/files/pari-2.5.4-slow_determinant.patch
new file mode 100644
index 000000000000..14833da62709
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.5.4-slow_determinant.patch
@@ -0,0 +1,100 @@
+diff -ru src/src/basemath/alglin1.c b/src/basemath/alglin1.c
+--- src/src/basemath/alglin1.c 2012-09-25 23:10:46.000000000 +0200
++++ b/src/basemath/alglin1.c 2013-01-03 13:56:55.487513420 +0100
+@@ -2969,6 +2969,21 @@
+ return NULL; /* not reached */
+ }
+
++/* A a 2x2 matrix
++ returns the determinant of A computed by the simple formula
++*/
++static GEN
++det2x2(GEN A)
++{
++ pari_sp av = avma;
++ GEN a = gcoeff(A, 1, 1),
++ b = gcoeff(A, 1, 2),
++ c = gcoeff(A, 2, 1),
++ d = gcoeff(A, 2, 2);
++ return gerepileupto(av, gsub(gmul(a, d), gmul(b, c)));
++}
++
++
+ static GEN
+ det_simple_gauss(GEN a, GEN data, pivot_fun pivot)
+ {
+@@ -3021,6 +3036,7 @@
+ if (typ(a)!=t_MAT) pari_err(mattype1,"det2");
+ if (!nbco) return gen_1;
+ if (nbco != lg(a[1])-1) pari_err(mattype1,"det2");
++ if (nbco == 2) return det2x2 (a);
+ pivot = get_pivot_fun(a, &data);
+ return det_simple_gauss(a, data, pivot);
+ }
+@@ -3158,11 +3174,7 @@
+ {
+ case 0: return gen_1;
+ case 1: return gcopy(gcoeff(M,1,1));
+- case 2: {
+- GEN a = gcoeff(M,1,1), b = gcoeff(M,1,2);
+- GEN c = gcoeff(M,2,1), d = gcoeff(M,2,2);
+- return gerepileupto(av, gsub(gmul(a,d), gmul(b,c)));
+- }
++ case 2: return det2x2(M);
+ }
+ if (max > ((n+2)>>1)) max = (n+2)>>1;
+ for (j = 1; j <= n; j++)
+@@ -3193,9 +3205,10 @@
+ }
+ if (best_row)
+ {
++ double d = lbest-1;
+ GEN s = NULL;
+ long k;
+- bound /= (lbest-1);
++ bound /= d*d*d;
+ for (k = 1; k < lbest; k++)
+ {
+ GEN c = coeff_det(M, best_row, best[k], max, bound);
+@@ -3205,9 +3218,10 @@
+ }
+ if (best_col)
+ {
++ double d = lbest-1;
+ GEN s = NULL;
+ long k;
+- bound /= (lbest-1);
++ bound /= d*d*d;
+ for (k = 1; k < lbest; k++)
+ {
+ GEN c = coeff_det(M, best[k], best_col, max, bound);
+@@ -3230,15 +3244,24 @@
+ if (!n) return gen_1;
+ if (n != lg(a[1])-1) pari_err(mattype1,"det");
+ if (n == 1) return gcopy(gcoeff(a,1,1));
+- if (RgM_is_FpM(a, &p) && p)
++ if (RgM_is_FpM(a, &p))
+ {
+- pari_sp av = avma;
+- return gerepilecopy(av, Fp_to_mod(FpM_det(RgM_to_FpM(a, p), p), p));
++ pari_sp av;
++ if (!p)
++ { /* ZM */
++ return det_simple_gauss(a, NULL, &gauss_get_pivot_NZ);
++ }
++ else
++ { /* FpM */
++ av = avma;
++ return gerepilecopy(av, Fp_to_mod(FpM_det(RgM_to_FpM(a, p), p), p));
++ }
+ }
++ if (n == 2) return det2x2 (a);
+ pivot = get_pivot_fun(a, &data);
+ if (pivot != gauss_get_pivot_NZ) return det_simple_gauss(a, data, pivot);
+- B = (double)n; B = B*B; B = B*B;
+- return det_develop(a, 7, B);
++ B = (double)n;
++ return det_develop(a, 7, B*B*B);
+ }
+
+
diff --git a/sci-mathematics/pari/files/pari-2.7.0-doc-make.patch b/sci-mathematics/pari/files/pari-2.7.0-doc-make.patch
new file mode 100644
index 000000000000..4292688d97af
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.7.0-doc-make.patch
@@ -0,0 +1,89 @@
+diff -Naur pari-2.7.0/config/DOC_Make.SH pari-2.7.0_a/config/DOC_Make.SH
+--- pari-2.7.0/config/DOC_Make.SH 2014-03-20 21:59:28.000000000 +1300
++++ pari-2.7.0_a/config/DOC_Make.SH 2014-05-05 13:20:09.119923587 +1200
+@@ -23,7 +23,8 @@
+
+ doc all: develop.dvi libpari.dvi parallel.dvi users.dvi refcard.ps tutorial.dvi
+ docps: develop.ps libpari.ps parallel.ps refcard.ps tutorial.ps users.ps INSTALL.ps
+-docpdf: develop.pdf libpari.pdf parallel.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf
++#docpdf: develop.pdf libpari.pdf parallel.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf
++docpdf: \$(PARI_TEX) \$(MACROS) pass1 pass2 indexing refcard.pdf INSTALL.pdf
+
+ .SUFFIXES: .tex .ipf .pod .inf .dumbpod .3 .html
+
+@@ -39,38 +40,60 @@
+ %.dvi: %.tex \$(MACROS)
+ \$(TEX) \$<
+
++pass1: \$(PARI_TEX) \$(USERS_TEX) develop.tex tutorial.tex \$(MACROS)
++ -rm -f *.std
++ pdftex libpari
++ pdftex develop
++ pdftex tutorial
++ pdftex users
++
++pass2: pass1
++ pdftex libpari
++ pdftex develop
++ pdftex tutorial
++ pdftex users
++
++indexing: pass2
++ \$(MAKE) libpari.std
++ \$(MAKE) develop.std
++ \$(MAKE) users.std
++ pdftex libpari
++ pdftex develop
++ pdftex users
++ -rm -f *.std
++
+ libpari.pdf: \$(PARI_TEX) \$(MACROS)
+ -rm -f libpari.std
+ \$(PDFTEX) libpari
+ \$(PDFTEX) libpari
+- make libpari.std; \$(PDFTEX) libpari; rm -f libpari.std
++ \$(MAKE) libpari.std; \$(PDFTEX) libpari; rm -f libpari.std
+ libpari.dvi: \$(PARI_TEX) \$(MACROS)
+ -rm -f libpari.std
+ \$(TEX) libpari
+ \$(TEX) libpari
+- make libpari.std; \$(TEX) libpari; rm -f libpari.std
++ \$(MAKE) libpari.std; \$(TEX) libpari; rm -f libpari.std
+
+ develop.pdf: develop.tex \$(MACROS)
+ -rm -f develop.std
+ \$(PDFTEX) develop
+ \$(PDFTEX) develop
+- make develop.std; \$(PDFTEX) develop; rm -f develop.std
++ \$(MAKE) develop.std; \$(PDFTEX) develop; rm -f develop.std
+ develop.dvi: develop.tex \$(MACROS)
+ -rm -f develop.std
+ \$(TEX) develop
+ \$(TEX) develop
+- make develop.std; \$(TEX) develop; rm -f develop.std
++ \$(MAKE) develop.std; \$(TEX) develop; rm -f develop.std
+
+ parallel.pdf: parallel.tex \$(MACROS)
+ -rm -f parallel.std
+ \$(PDFTEX) parallel
+ \$(PDFTEX) parallel
+- make parallel.std; \$(PDFTEX) parallel; rm -f parallel.std
++ \$(MAKE) parallel.std; \$(PDFTEX) parallel; rm -f parallel.std
+ parallel.dvi: parallel.tex \$(MACROS)
+ -rm -f parallel.std
+ \$(TEX) parallel
+ \$(TEX) parallel
+- make parallel.std; \$(TEX) parallel; rm -f parallel.std
++ \$(MAKE) parallel.std; \$(TEX) parallel; rm -f parallel.std
+
+ tutorial.pdf: tutorial.tex \$(MACROS)
+ -rm -f tutorial.std
+@@ -104,7 +127,7 @@
+ -rm -f users.std
+ \$(PDFTEX) users
+ \$(PDFTEX) users
+- make users.std; \$(PDFTEX) users; rm -f users.std
++ \$(MAKE) users.std; \$(PDFTEX) users; rm -f users.std
+
+ gpman: gp.1
+ nroff -man gp.1 | unix2dos -ascii > gp.man
diff --git a/sci-mathematics/pari/files/pari-2.7.0-no-automagic.patch b/sci-mathematics/pari/files/pari-2.7.0-no-automagic.patch
new file mode 100644
index 000000000000..2d77f19f9f54
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.7.0-no-automagic.patch
@@ -0,0 +1,100 @@
+diff -Naur pari-2.7.0/config/Makefile.SH pari-2.7.0_a/config/Makefile.SH
+--- pari-2.7.0/config/Makefile.SH 2014-03-20 21:59:28.000000000 +1300
++++ pari-2.7.0_a/config/Makefile.SH 2014-05-05 12:00:21.095724368 +1200
+@@ -75,12 +75,12 @@
+ PLOTLIBS="-L\$(QTDIR)/lib $QTLIB"
+ graph=plotQt;;
+ Qt4)
+- PLOTCFLAGS='-D__FANCY_WIN__ -I$(QTDIR)/include'
+- PLOTLIBS="-L\$(QTDIR)/lib $QTLIB"
++ PLOTCFLAGS='-D__FANCY_WIN__ `pkg-config --cflags QtGui`'
++ PLOTLIBS="`pkg-config --libs QtGui`"
+ graph=plotQt4;;
+ fltk)
+- PLOTCFLAGS="-I\$(FLTKDIR)/include $X11_INC"
+- PLOTLIBS="$FLTK_LIBS"
++ PLOTCFLAGS="`fltk-config --cxxflags` $X11_INC"
++ PLOTLIBS="`fltk-config --ldflags`"
+ postconfig='fltk-config --post '
+ graph=plotfltk;;
+ win32)
+@@ -269,7 +269,7 @@
+ GMPINCLUDE = $GMPINCLUDE
+ # Graphic library.
+ QTDIR = "$QTDIR"
+-MOC = \$(QTDIR)/bin/moc
++MOC = "`which moc`"
+ PLOTCFLAGS = $PLOTCFLAGS
+ PLOTLIBS = $PLOTLIBS
+ CPLUSPLUS = g++
+diff -Naur pari-2.7.0/config/get_Qt pari-2.7.0_a/config/get_Qt
+--- pari-2.7.0/config/get_Qt 2014-03-20 21:59:28.000000000 +1300
++++ pari-2.7.0_a/config/get_Qt 2014-05-05 11:56:42.453465262 +1200
+@@ -5,7 +5,7 @@
+ case "$with_qt" in
+ yes)
+ pth="/usr/local/lib /usr/local/share /usr/lib /usr/share"
+- QTDIR=`locatedir qt4/bin $pth`
++ QTDIR=`locatedir qt4 $pth`
+ if test -n "$QTDIR"; then
+ QTLIB="-lQtCore -lQtGui"
+ which_graphic_lib=Qt4
+diff -Naur pari-2.7.0/config/get_config_options pari-2.7.0_a/config/get_config_options
+--- pari-2.7.0/config/get_config_options 2014-03-20 21:59:28.000000000 +1300
++++ pari-2.7.0_a/config/get_config_options 2014-05-05 11:49:14.577963840 +1200
+@@ -85,10 +85,12 @@
+ --with-ncurses-lib=*|--with-ncurses=*)
+ with_ncurses_lib=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
+
++ --without-qt|--with-qt=no) without_qt=yes ;;
+ --with-qt) with_qt=yes ;;
+ --with-qt=*)
+ with_qt=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
+
++ --without-fltk|--with-fltk=no) without_fltk=yes ;;
+ --with-fltk) with_fltk=yes ;;
+ --with-fltk=*)
+ with_fltk=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
+@@ -164,7 +166,9 @@
+ --with-gmp-lib=DIR specify location of gmp libs
+
+ --with-qt[=DIR] use the Qt graphical library [prefix for Qt dir.]
++ --without-qt do not try to use the Qt lib
+ --with-fltk[=DIR] use the FLTK graphical library [prefix for FLTK dir.]
++ --without-fltk do not try to use the FLTK lib
+
+ Environment variables affecting the build:
+ CC C compiler
+diff -Naur pari-2.7.0/config/get_fltk pari-2.7.0_a/config/get_fltk
+--- pari-2.7.0/config/get_fltk 2014-03-20 21:59:28.000000000 +1300
++++ pari-2.7.0_a/config/get_fltk 2014-05-05 11:49:14.578963841 +1200
+@@ -2,6 +2,9 @@
+ with_fltk=yes
+ fi
+ FLTKDIR=
++if test -z "$without_fltk; then
++ FLTKDIR="`fltk-config --prefix 2>/dev/null`"
++fi
+ case "$with_fltk" in
+ yes)
+ pth=$libpth; lib=fltk; . ./locatelib
+diff -Naur pari-2.7.0/config/get_graphic_lib pari-2.7.0_a/config/get_graphic_lib
+--- pari-2.7.0/config/get_graphic_lib 2014-03-20 21:59:28.000000000 +1300
++++ pari-2.7.0_a/config/get_graphic_lib 2014-05-05 11:54:45.469333702 +1200
+@@ -7,6 +7,7 @@
+
+ if test -n "$with_fltk"; then which_graphic_lib=fltk; fi
+ if test -n "$with_qt"; then which_graphic_lib=Qt; fi
++if test -n "$without_fltk" -a -n "$without_qt"; then which_graphic_lib=none; fi
+ if test "$fastread" != yes; then
+ cat << EOT
+ ==========================================================================
+@@ -38,7 +39,7 @@
+ case $osname in
+ darwin) ;; # fltk brings in CoreFoundation, incompatible with pari_daemon
+ *). ./get_fltk # FLTKDIR, FLTK_LIBS ;;
+- if test -z "$FLTKDIR"; then
++ if test -z "`fltk-config --ldflags 2> /dev/null`"; then
+ case $which_graphic_lib in fltk) which_graphic_lib=none;; esac
+ else
+ which_graphic_lib=fltk
diff --git a/sci-mathematics/pari/files/pari-2.7.0-no-dot-inc.patch b/sci-mathematics/pari/files/pari-2.7.0-no-dot-inc.patch
new file mode 100644
index 000000000000..9d868ef6b6a0
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.7.0-no-dot-inc.patch
@@ -0,0 +1,64 @@
+From 2864fe5b852e443d98af92d8929e359525ccb1a2 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentfredric@gmail.com>
+Date: Sun, 11 Jun 2017 10:31:03 +1200
+Subject: [PATCH] Fix for 5.26 removal of '.' in @INC
+
+Previous scripts assumed CWD was in @INC and that "PARI::822" was in
+wherever CWD was.
+
+This fixes both of those, and the latter, because its not obvious
+from the build system where one should assume CWD to be.
+
+Instead, the absolute path of the directory of these scripts is
+inserted into @INC
+---
+ src/desc/doc_make | 5 +++++
+ src/desc/gen_proto | 4 ++++
+ src/desc/merge_822 | 4 ++++
+ 3 files changed, 13 insertions(+)
+
+diff --git a/src/desc/doc_make b/src/desc/doc_make
+index 91b894e..ffbbb78 100755
+--- a/src/desc/doc_make
++++ b/src/desc/doc_make
+@@ -1,6 +1,11 @@
+ #!/usr/bin/perl
+ use warnings FATAL => 'all';
+ use strict;
++
++use File::Spec;
++use File::Basename qw( dirname );
++use lib dirname(File::Spec->rel2abs(__FILE__));
++
+ use PARI::822;
+
+ my (%funcs, %Fun_by_sec);
+diff --git a/src/desc/gen_proto b/src/desc/gen_proto
+index ee55449..5ca0305 100755
+--- a/src/desc/gen_proto
++++ b/src/desc/gen_proto
+@@ -1,4 +1,8 @@
+ #!/usr/bin/perl -w
++use File::Spec;
++use File::Basename qw( dirname );
++use lib dirname(File::Spec->rel2abs(__FILE__));
++
+ use PARI::822;
+
+ $class=$ARGV[0];
+diff --git a/src/desc/merge_822 b/src/desc/merge_822
+index 4c9217b..32b3cc9 100755
+--- a/src/desc/merge_822
++++ b/src/desc/merge_822
+@@ -1,4 +1,8 @@
+ #!/usr/bin/perl -w
++use File::Spec;
++use File::Basename qw( dirname );
++use lib dirname(File::Spec->rel2abs(__FILE__));
++
+ use PARI::822;
+
+ open(IN, $ARGV[0]) || die "cannot find $ARGV[0]";
+--
+2.13.1
+
diff --git a/sci-mathematics/pari/files/pari-2.7.0-slow-discriminant.patch b/sci-mathematics/pari/files/pari-2.7.0-slow-discriminant.patch
new file mode 100644
index 000000000000..814dc4b2ab9d
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.7.0-slow-discriminant.patch
@@ -0,0 +1,54 @@
+diff -ru src/src/basemath/alglin1.c b/src/basemath/alglin1.c
+--- src/src/basemath/alglin1.c 2014-01-29 18:00:27.000000000 +0100
++++ b/src/basemath/alglin1.c 2014-02-09 01:54:37.676725196 +0100
+@@ -247,6 +247,7 @@
+ a = RgM_shallowcopy(a);
+ for (i=1; i<nbco; i++)
+ {
++ int garbage = 0; /* Only gerepile() once per loop iteration */
+ for(k=i; k<=nbco; k++)
+ {
+ gcoeff(a,k,i) = ff->red(E,gcoeff(a,k,i));
+@@ -271,7 +272,7 @@
+ for (j=i+1; j<=nbco; j++)
+ {
+ gcoeff(a,j,k) = ff->add(E, gcoeff(a,j,k), ff->mul(E,m,gcoeff(a,j,i)));
+- if (low_stack(lim, stack_lim(av,1)))
++ if (low_stack(lim, stack_lim(av,1)) && (garbage++ == 0))
+ {
+ if(DEBUGMEM>1) pari_warn(warnmem,"det. col = %ld",i);
+ gerepileall(av,4, &a,&x,&q,&m);
+@@ -3721,6 +3722,7 @@
+ a = RgM_shallowcopy(a);
+ for (i=1; i<nbco; i++)
+ {
++ int garbage = 0; /* Only gerepile() once per loop iteration */
+ k = pivot(a, data, i, NULL);
+ if (k > nbco) return gerepilecopy(av, gcoeff(a,i,i));
+ if (k != i)
+@@ -3740,7 +3742,7 @@
+ for (j=i+1; j<=nbco; j++)
+ {
+ gcoeff(a,j,k) = gsub(gcoeff(a,j,k), gmul(m,gcoeff(a,j,i)));
+- if (low_stack(lim, stack_lim(av,3)))
++ if (low_stack(lim, stack_lim(av,3)) && (garbage++ == 0))
+ {
+ if(DEBUGMEM>1) pari_warn(warnmem,"det. col = %ld",i);
+ gerepileall(av,2, &a,&x);
+@@ -3791,6 +3793,7 @@
+ {
+ GEN ci, ck, m;
+ int diveuc = (gequal1(pprec)==0);
++ int garbage = 0; /* Only gerepile() once per loop iteration */
+
+ p = gcoeff(a,i,i);
+ if (gequal0(p))
+@@ -3827,7 +3830,7 @@
+ GEN p1 = gsub(gmul(p,gel(ck,j)), gmul(m,gel(ci,j)));
+ if (diveuc) p1 = mydiv(p1,pprec);
+ gel(ck,j) = gerepileupto(av2, p1);
+- if (low_stack(lim,stack_lim(av,2)))
++ if (low_stack(lim,stack_lim(av,2)) && (garbage++ == 0))
+ {
+ if(DEBUGMEM>1) pari_warn(warnmem,"det. col = %ld",i);
+ gerepileall(av,2, &a,&pprec);
diff --git a/sci-mathematics/pari/files/pari-2.7.1-perl-5.22-doc.patch b/sci-mathematics/pari/files/pari-2.7.1-perl-5.22-doc.patch
new file mode 100644
index 000000000000..c4bbadcb2e0c
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.7.1-perl-5.22-doc.patch
@@ -0,0 +1,12 @@
+diff -U2 -r pari-2.7.1.orig/src/desc/doc_make pari-2.7.1/src/desc/doc_make
+--- pari-2.7.1.orig/src/desc/doc_make 2014-05-11 00:59:29.000000000 +0700
++++ pari-2.7.1/src/desc/doc_make 2015-11-15 00:51:11.494845695 +0600
+@@ -39,6 +39,6 @@
+ $v =~ s/(\w\w+)/\\var{$1}/g;
+ $v =~ s/\^([a-z])/\\hbox{\\kbd{\\pow}}$1/g;
+- $v =~ s/\\var{flag}/\\fl/g;
+- $v =~ s/\\var{(\d+)}/{$1}/g;
++ $v =~ s/\\var\{flag}/\\fl/g;
++ $v =~ s/\\var\{(\d+)}/{$1}/g;
+
+ $v = "\$($v)\$";
diff --git a/sci-mathematics/pari/metadata.xml b/sci-mathematics/pari/metadata.xml
new file mode 100644
index 000000000000..f4c3bc4e3381
--- /dev/null
+++ b/sci-mathematics/pari/metadata.xml
@@ -0,0 +1,28 @@
+<?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">
+ PARI is a widely used computer algebra system designed for fast
+ computations in number theory (factorizations, algebraic number
+ theory, elliptic curves...), but also contains a large number of other
+ useful functions to compute with mathematical entities such as
+ matrices, polynomials, power series, algebraic numbers, etc., and a
+ lot of transcendental functions.
+ The extra data is avaialable through use flag:
+ * elldata is PARI/GP version of J. E. Cremona Elliptic Curve Data,
+ needed by ellsearch and ellidentify.
+ * galdata is needed by polgalois to compute Galois group in degrees
+ 8 through 11.
+ * seadata is needed by ellap for large primes.
+ * nftables is a repackaging of the historical megrez number field
+tables (errors fixed, 1/10th the size, easier to use).
+
+</longdescription>
+ <use>
+ <flag name="data">Add additional data (elldata, galdata, seadata, nftables)</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/pari/pari-2.3.5.ebuild b/sci-mathematics/pari/pari-2.3.5.ebuild
new file mode 100644
index 000000000000..a0f484b46778
--- /dev/null
+++ b/sci-mathematics/pari/pari-2.3.5.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=3
+inherit elisp-common eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A software package for computer-aided number theory"
+HOMEPAGE="http://pari.math.u-bordeaux.fr/"
+
+SRC_COM="http://pari.math.u-bordeaux.fr/pub/${PN}"
+SRC_URI="${SRC_COM}/unix/${P}.tar.gz
+ data? ( ${SRC_COM}/packages/elldata.tgz
+ ${SRC_COM}/packages/galdata.tgz
+ ${SRC_COM}/packages/seadata.tgz
+ ${SRC_COM}/packages/nftables.tgz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x86-solaris"
+IUSE="doc data fltk gmp static-libs X"
+
+RDEPEND="sys-libs/readline
+ fltk? ( x11-libs/fltk:1 )
+ gmp? ( dev-libs/gmp )
+ X? ( x11-libs/libX11 )
+ doc? ( X? ( x11-misc/xdg-utils ) )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+get_compile_dir() {
+ pushd "${S}/config" >& /dev/null
+ local fastread=yes
+ source ./get_archos
+ popd >& /dev/null
+ echo "O${osname}-${arch}"
+}
+
+src_prepare() {
+ # move data into place
+ if use data; then
+ mv "${WORKDIR}"/data "${S}" || die "failed to move data"
+ fi
+ epatch "${FILESDIR}/"${PN}-2.3.2-strip.patch
+ epatch "${FILESDIR}/"${PN}-2.3.2-ppc-powerpc-arch-fix.patch
+ epatch "${FILESDIR}/"${PN}-2.3.5-doc-make.patch
+ epatch "${FILESDIR}/"${PN}-2.3.5-no-dot-inc.patch
+
+ # disable default building of docs during install
+ sed -i \
+ -e "s:install-doc install-examples:install-examples:" \
+ config/Makefile.SH || die "Failed to fix makefile"
+ # propagate ldflags
+ sed -i \
+ -e 's/-shared $extra/-shared $extra \\$(LDFLAGS)/' \
+ config/get_dlld || die "Failed to fix LDFLAGS"
+ # move doc dir to a gentoo doc dir and replace hardcoded xdvi by xdg-open
+ sed -i \
+ -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \
+ -e 's:"xdvi":"xdg-open":' \
+ -e 's:xdvi -paper 29.7x21cm:xdg-open:' \
+ doc/gphelp.in || die "Failed to fix doc dir"
+ # disable emacs support
+ sed -i -e '/^list=/s/emacs//' Configure \
+ || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ tc-export CC
+ # need to force optimization here, as it breaks without
+ if is-flag -O0; then
+ replace-flags -O0 -O2
+ elif ! is-flag -O?; then
+ append-flags -O2
+ fi
+ # sysdatadir installs a pari.cfg stuff which is informative only
+ ./Configure \
+ --prefix="${EPREFIX}"/usr \
+ --datadir="${EPREFIX}"/usr/share/${PN} \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --sysdatadir="${EPREFIX}"/usr/share/doc/${PF} \
+ --mandir="${EPREFIX}"/usr/share/man/man1 \
+ --with-readline \
+ $(use_with gmp) \
+ || die "./Configure failed"
+}
+
+src_compile() {
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "Bad directory"
+
+ emake ${mymake} CFLAGS="${CFLAGS} -DGCC_INLINE -fPIC" lib-dyn \
+ || die "Building shared library failed!"
+
+ if use static-libs; then
+ emake ${mymake} CFLAGS="${CFLAGS} -DGCC_INLINE" lib-sta \
+ || die "Building static library failed!"
+ fi
+
+ emake ${mymake} CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp \
+ || die "Building executables failed!"
+
+ if use doc; then
+ cd "${S}"
+ # To prevent sandbox violations by metafont
+ VARTEXFONTS="${T}"/fonts emake docpdf \
+ || die "Failed to generate docs"
+ fi
+}
+
+src_test() {
+ emake test-kernel || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "Install failed"
+
+ dodoc AUTHORS Announce.2.1 CHANGES README NEW MACHINES COMPAT
+ if use doc; then
+ emake \
+ DESTDIR="${D}" \
+ EXDIR="${ED}/usr/share/doc/${PF}/examples" \
+ DOCDIR="${ED}/usr/share/doc/${PF}" \
+ install-doc || die "Failed to install docs"
+ insinto /usr/share/doc/${PF}
+ doins doc/*.pdf || die "Failed to install pdf docs"
+ fi
+
+ if use data; then
+ emake DESTDIR="${D}" install-data || die "Failed to install data files"
+ fi
+
+ if use static-libs; then
+ emake \
+ DESTDIR="${D}" \
+ install-lib-sta || die "Install of static library failed"
+ fi
+}
diff --git a/sci-mathematics/pari/pari-2.5.0-r3.ebuild b/sci-mathematics/pari/pari-2.5.0-r3.ebuild
new file mode 100644
index 000000000000..57421935e631
--- /dev/null
+++ b/sci-mathematics/pari/pari-2.5.0-r3.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A software package for computer-aided number theory"
+HOMEPAGE="http://pari.math.u-bordeaux.fr/"
+SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="doc data fltk gmp X"
+
+RDEPEND="sys-libs/readline
+ fltk? ( x11-libs/fltk:1 )
+ gmp? ( dev-libs/gmp )
+ X? ( x11-libs/libX11 )
+ doc? ( X? ( x11-misc/xdg-utils ) )
+ data? ( sci-mathematics/pari-data )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+get_compile_dir() {
+ pushd "${S}/config" > /dev/null
+ local fastread=yes
+ source ./get_archos
+ popd > /dev/null
+ echo "O${osname}-${arch}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}"-2.3.2-strip.patch
+ epatch "${FILESDIR}/${PN}"-2.3.2-ppc-powerpc-arch-fix.patch
+ # fix parallel make
+ epatch "${FILESDIR}/${PN}"-2.5.0-doc-make.patch
+ # sage error handling patch
+ epatch "${FILESDIR}/${PN}"-2.5.0-mp.c.patch
+ # OS X: add -install_name to the linker option
+ epatch "${FILESDIR}/${PN}"-2.5.0-macos.patch
+ # Fix Perl 5.26
+ epatch "${FILESDIR}/"${PN}-2.5.0-no-dot-inc.patch
+
+ # disable default building of docs during install
+ sed -i \
+ -e "s:install-doc install-examples:install-examples:" \
+ config/Makefile.SH || die "Failed to fix makefile"
+
+ # propagate ldflags
+ sed -i \
+ -e 's/$shared $extra/$shared $extra \\$(LDFLAGS)/' \
+ config/get_dlld || die "failed to fix LDFLAGS"
+ # move doc dir to a gentoo doc dir and replace acroread by xdg-open
+ sed -i \
+ -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \
+ -e 's:"acroread":"xdg-open":' \
+ doc/gphelp.in || die "Failed to fix doc dir"
+
+ sed -i "s:/usr:${EPREFIX}/usr:g" config/get_X11 \
+ || die "Failed to fix get_X11"
+
+ # usersch3.tex is generated
+ rm -f doc/usersch3.tex || die "failed to remove generated file"
+}
+
+src_configure() {
+ tc-export CC
+
+ # need to force optimization here, as it breaks without
+ if is-flag -O0; then
+ replace-flags -O0 -O2
+ elif ! is-flag -O?; then
+ append-flags -O2
+ fi
+
+ local myconfig
+ if use gmp ; then
+ myconfig="--with-gmp=${EPREFIX}/usr"
+ else
+ myconfig="--with-gmp=no"
+ fi
+
+ # sysdatadir installs a pari.cfg stuff which is informative only
+ ./Configure \
+ --prefix="${EPREFIX}"/usr \
+ --datadir="${EPREFIX}"/usr/share/${PN} \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --sysdatadir="${EPREFIX}"/usr/share/doc/${PF} \
+ --mandir="${EPREFIX}"/usr/share/man/man1 \
+ --with-readline="${EPREFIX}"/usr \
+ --with-ncurses-lib="${EPREFIX}"/usr/$(get_libdir) \
+ $myconfig \
+ || die "./Configure failed"
+}
+
+src_compile() {
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+
+ # upstream set -fno-strict-aliasing.
+ # aliasing is a known issue on amd64, work on x86 by sheer luck
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -fno-strict-aliasing -DGCC_INLINE -fPIC" lib-dyn
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp
+
+ if use doc; then
+ cd "${S}" || die "failed to change directory"
+ # To prevent sandbox violations by metafont
+ VARTEXFONTS="${T}"/fonts emake docpdf
+ fi
+}
+
+src_test() {
+ emake dobench
+}
+
+src_install() {
+ default
+ dodoc MACHINES COMPAT
+ if use doc; then
+ # install gphelp and the pdf documentations manually.
+ # the install-doc target is overkill.
+ dodoc doc/*.pdf
+ dobin doc/gphelp
+ insinto /usr/share/doc/${PF}
+ # gphelp looks for some of the tex sources...
+ doins doc/*.tex doc/translations
+ # Install the examples - for real.
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+ emake EXDIR="${ED}/usr/share/doc/${PF}/examples" install-examples
+ fi
+}
diff --git a/sci-mathematics/pari/pari-2.5.1-r1.ebuild b/sci-mathematics/pari/pari-2.5.1-r1.ebuild
new file mode 100644
index 000000000000..7202ed087dea
--- /dev/null
+++ b/sci-mathematics/pari/pari-2.5.1-r1.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="A software package for computer-aided number theory"
+HOMEPAGE="http://pari.math.u-bordeaux.fr/"
+SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-fbsd ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="data doc fltk gmp qt4 X"
+
+RDEPEND="sys-libs/readline
+ data? ( sci-mathematics/pari-data )
+ doc? ( X? ( x11-misc/xdg-utils ) )
+ fltk? ( x11-libs/fltk:1 )
+ gmp? ( dev-libs/gmp )
+ qt4? ( dev-qt/qtgui:4 )
+ X? ( x11-libs/libX11 )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+get_compile_dir() {
+ pushd "${S}/config" > /dev/null
+ local fastread=yes
+ source ./get_archos
+ popd > /dev/null
+ echo "O${osname}-${arch}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.3.2-strip.patch
+ epatch "${FILESDIR}"/${PN}-2.3.2-ppc-powerpc-arch-fix.patch
+ # fix parallel make
+ epatch "${FILESDIR}"/${PN}-2.5.0-doc-make.patch
+ # sage error handling patch
+ epatch "${FILESDIR}"/${PN}-2.5.0-mp.c.patch
+ # OS X: add -install_name to the linker option
+ epatch "${FILESDIR}"/${PN}-2.5.0-macos.patch
+ # Fix Perl 5.26
+ epatch "${FILESDIR}/"${PN}-2.5.0-no-dot-inc.patch
+ # from debian, fies bug #423617
+ epatch "${FILESDIR}"/${PN}-2.5.1-gcc47.patch
+ # fix automagic
+ epatch "${FILESDIR}"/${PN}-2.5.1-no-automagic.patch
+ # upstream fixes
+ epatch "${FILESDIR}"/${PN}-2.5.1-1302.patch
+ epatch "${FILESDIR}"/${PN}-2.5.1-1304.patch
+
+ # disable default building of docs during install
+ sed -i \
+ -e "s:install-doc install-examples:install-examples:" \
+ config/Makefile.SH || die "Failed to fix makefile"
+
+ # propagate ldflags
+ sed -i \
+ -e 's/$shared $extra/$shared $extra \\$(LDFLAGS)/' \
+ config/get_dlld || die "failed to fix LDFLAGS"
+ # move doc dir to a gentoo doc dir and replace acroread by xdg-open
+ sed -i \
+ -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \
+ -e 's:"acroread":"xdg-open":' \
+ doc/gphelp.in || die "Failed to fix doc dir"
+
+ sed -i "s:/usr:${EPREFIX}/usr:g" config/get_X11 \
+ || die "Failed to fix get_X11"
+
+ # usersch3.tex is generated
+ rm -f doc/usersch3.tex || die "failed to remove generated file"
+}
+
+src_configure() {
+ tc-export CC
+
+ # need to force optimization here, as it breaks without
+ if is-flag -O0; then
+ replace-flags -O0 -O2
+ elif ! is-flag -O?; then
+ append-flags -O2
+ fi
+
+ # sysdatadir installs a pari.cfg stuff which is informative only
+ ./Configure \
+ --prefix="${EPREFIX}"/usr \
+ --datadir="${EPREFIX}"/usr/share/${PN} \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --sysdatadir="${EPREFIX}"/usr/share/doc/${PF} \
+ --mandir="${EPREFIX}"/usr/share/man/man1 \
+ --with-readline="${EPREFIX}"/usr \
+ --with-ncurses-lib="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with fltk) \
+ $(use_with gmp) \
+ $(use_with qt4 qt) \
+ || die "./Configure failed"
+}
+
+src_compile() {
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+ # upstream set -fno-strict-aliasing.
+ # aliasing is a known issue on amd64, work on x86 by sheer luck
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -fno-strict-aliasing -DGCC_INLINE -fPIC" lib-dyn
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp
+
+ if use doc; then
+ cd "${S}" || die "failed to change directory"
+ # To prevent sandbox violations by metafont
+ VARTEXFONTS="${T}"/fonts emake docpdf
+ fi
+}
+
+src_test() {
+ emake dobench
+}
+
+src_install() {
+ default
+ dodoc MACHINES COMPAT
+ if use doc; then
+ # install gphelp and the pdf documentations manually.
+ # the install-doc target is overkill.
+ dodoc doc/*.pdf
+ dobin doc/gphelp
+ insinto /usr/share/doc/${PF}
+ # gphelp looks for some of the tex sources...
+ doins doc/*.tex doc/translations
+ # Install the examples - for real.
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+ emake EXDIR="${ED}/usr/share/doc/${PF}/examples" install-examples
+ fi
+}
diff --git a/sci-mathematics/pari/pari-2.5.1.ebuild b/sci-mathematics/pari/pari-2.5.1.ebuild
new file mode 100644
index 000000000000..fb1efebef0c3
--- /dev/null
+++ b/sci-mathematics/pari/pari-2.5.1.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A software package for computer-aided number theory"
+HOMEPAGE="http://pari.math.u-bordeaux.fr/"
+SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="doc data fltk gmp X"
+
+RDEPEND="sys-libs/readline
+ fltk? ( x11-libs/fltk:1 )
+ gmp? ( dev-libs/gmp )
+ X? ( x11-libs/libX11 )
+ doc? ( X? ( x11-misc/xdg-utils ) )
+ data? ( sci-mathematics/pari-data )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+get_compile_dir() {
+ pushd "${S}/config" > /dev/null
+ local fastread=yes
+ source ./get_archos
+ popd > /dev/null
+ echo "O${osname}-${arch}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}"-2.3.2-strip.patch
+ epatch "${FILESDIR}/${PN}"-2.3.2-ppc-powerpc-arch-fix.patch
+ # fix parallel make
+ epatch "${FILESDIR}/${PN}"-2.5.0-doc-make.patch
+ # sage error handling patch
+ epatch "${FILESDIR}/${PN}"-2.5.0-mp.c.patch
+ # OS X: add -install_name to the linker option
+ epatch "${FILESDIR}/${PN}"-2.5.0-macos.patch
+ # Fix Perl 5.26
+ epatch "${FILESDIR}/"${PN}-2.5.0-no-dot-inc.patch
+ # from debian, fies bug #423617
+ epatch "${FILESDIR}/${PN}"-2.5.1-gcc47.patch
+
+ # disable default building of docs during install
+ sed -i \
+ -e "s:install-doc install-examples:install-examples:" \
+ config/Makefile.SH || die "Failed to fix makefile"
+
+ # propagate ldflags
+ sed -i \
+ -e 's/$shared $extra/$shared $extra \\$(LDFLAGS)/' \
+ config/get_dlld || die "failed to fix LDFLAGS"
+ # move doc dir to a gentoo doc dir and replace acroread by xdg-open
+ sed -i \
+ -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \
+ -e 's:"acroread":"xdg-open":' \
+ doc/gphelp.in || die "Failed to fix doc dir"
+
+ sed -i "s:/usr:${EPREFIX}/usr:g" config/get_X11 \
+ || die "Failed to fix get_X11"
+
+ # usersch3.tex is generated
+ rm -f doc/usersch3.tex || die "failed to remove generated file"
+}
+
+src_configure() {
+ tc-export CC
+
+ # need to force optimization here, as it breaks without
+ if is-flag -O0; then
+ replace-flags -O0 -O2
+ elif ! is-flag -O?; then
+ append-flags -O2
+ fi
+
+ local myconfig
+ if use gmp ; then
+ myconfig="--with-gmp=${EPREFIX}/usr"
+ else
+ myconfig="--with-gmp=no"
+ fi
+
+ # sysdatadir installs a pari.cfg stuff which is informative only
+ ./Configure \
+ --prefix="${EPREFIX}"/usr \
+ --datadir="${EPREFIX}"/usr/share/${PN} \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --sysdatadir="${EPREFIX}"/usr/share/doc/${PF} \
+ --mandir="${EPREFIX}"/usr/share/man/man1 \
+ --with-readline="${EPREFIX}"/usr \
+ --with-ncurses-lib="${EPREFIX}"/usr/$(get_libdir) \
+ $myconfig \
+ || die "./Configure failed"
+}
+
+src_compile() {
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+
+ # upstream set -fno-strict-aliasing.
+ # aliasing is a known issue on amd64, work on x86 by sheer luck
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -fno-strict-aliasing -DGCC_INLINE -fPIC" lib-dyn
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp
+
+ if use doc; then
+ cd "${S}" || die "failed to change directory"
+ # To prevent sandbox violations by metafont
+ VARTEXFONTS="${T}"/fonts emake docpdf
+ fi
+}
+
+src_test() {
+ emake dobench
+}
+
+src_install() {
+ default
+ dodoc MACHINES COMPAT
+ if use doc; then
+ # install gphelp and the pdf documentations manually.
+ # the install-doc target is overkill.
+ dodoc doc/*.pdf
+ dobin doc/gphelp
+ insinto /usr/share/doc/${PF}
+ # gphelp looks for some of the tex sources...
+ doins doc/*.tex doc/translations
+ # Install the examples - for real.
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+ emake EXDIR="${ED}/usr/share/doc/${PF}/examples" install-examples
+ fi
+}
diff --git a/sci-mathematics/pari/pari-2.5.2.ebuild b/sci-mathematics/pari/pari-2.5.2.ebuild
new file mode 100644
index 000000000000..3bc68a6ccdc0
--- /dev/null
+++ b/sci-mathematics/pari/pari-2.5.2.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="A software package for computer-aided number theory"
+HOMEPAGE="http://pari.math.u-bordeaux.fr/"
+SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-fbsd ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="data doc fltk gmp qt4 X"
+
+RDEPEND="sys-libs/readline
+ data? ( sci-mathematics/pari-data )
+ doc? ( X? ( x11-misc/xdg-utils ) )
+ fltk? ( x11-libs/fltk:1 )
+ gmp? ( dev-libs/gmp )
+ qt4? ( dev-qt/qtgui:4 )
+ X? ( x11-libs/libX11 )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+get_compile_dir() {
+ pushd "${S}/config" > /dev/null
+ local fastread=yes
+ source ./get_archos
+ popd > /dev/null
+ echo "O${osname}-${arch}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.3.2-strip.patch
+ epatch "${FILESDIR}"/${PN}-2.3.2-ppc-powerpc-arch-fix.patch
+ # fix parallel make
+ epatch "${FILESDIR}"/${PN}-2.5.0-doc-make.patch
+ # sage error handling patch
+ epatch "${FILESDIR}"/${PN}-2.5.0-mp.c.patch
+ # OS X: add -install_name to the linker option
+ epatch "${FILESDIR}"/${PN}-2.5.0-macos.patch
+ # Fix Perl 5.26
+ epatch "${FILESDIR}/"${PN}-2.5.0-no-dot-inc.patch
+ # fix automagic
+ epatch "${FILESDIR}"/${PN}-2.5.1-no-automagic.patch
+
+ # disable default building of docs during install
+ sed -i \
+ -e "s:install-doc install-examples:install-examples:" \
+ config/Makefile.SH || die "Failed to fix makefile"
+
+ # propagate ldflags
+ sed -i \
+ -e 's/$shared $extra/$shared $extra \\$(LDFLAGS)/' \
+ config/get_dlld || die "failed to fix LDFLAGS"
+ # move doc dir to a gentoo doc dir and replace acroread by xdg-open
+ sed -i \
+ -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \
+ -e 's:"acroread":"xdg-open":' \
+ doc/gphelp.in || die "Failed to fix doc dir"
+
+ sed -i "s:/\(usr\|lib64\):${EPREFIX}/\1:g" \
+ config/get_{Qt,X11,include_path,libpth} \
+ || die "Failed to fix get_X11"
+
+ # usersch3.tex is generated
+ rm doc/usersch3.tex || die "failed to remove generated file"
+}
+
+src_configure() {
+ tc-export CC
+
+ # need to force optimization here, as it breaks without
+ if is-flag -O0; then
+ replace-flags -O0 -O2
+ elif ! is-flag -O?; then
+ append-flags -O2
+ fi
+
+ # sysdatadir installs a pari.cfg stuff which is informative only
+ ./Configure \
+ --prefix="${EPREFIX}"/usr \
+ --datadir="${EPREFIX}"/usr/share/${PN} \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --sysdatadir="${EPREFIX}"/usr/share/doc/${PF} \
+ --mandir="${EPREFIX}"/usr/share/man/man1 \
+ --with-readline="${EPREFIX}"/usr \
+ --with-ncurses-lib="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with fltk) \
+ $(use_with gmp) \
+ $(use_with qt4 qt) \
+ || die "./Configure failed"
+}
+
+src_compile() {
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+ # upstream set -fno-strict-aliasing.
+ # aliasing is a known issue on amd64, work on x86 by sheer luck
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -fno-strict-aliasing -DGCC_INLINE -fPIC" lib-dyn
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp
+
+ if use doc; then
+ cd "${S}" || die "failed to change directory"
+ # To prevent sandbox violations by metafont
+ VARTEXFONTS="${T}"/fonts emake docpdf
+ fi
+}
+
+src_test() {
+ emake dobench
+}
+
+src_install() {
+ default
+ dodoc MACHINES COMPAT
+ if use doc; then
+ # install gphelp and the pdf documentations manually.
+ # the install-doc target is overkill.
+ dodoc doc/*.pdf
+ dobin doc/gphelp
+ insinto /usr/share/doc/${PF}
+ # gphelp looks for some of the tex sources...
+ doins doc/*.tex doc/translations
+ # Install the examples - for real.
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+ emake EXDIR="${ED}/usr/share/doc/${PF}/examples" install-examples
+ fi
+}
diff --git a/sci-mathematics/pari/pari-2.5.3.ebuild b/sci-mathematics/pari/pari-2.5.3.ebuild
new file mode 100644
index 000000000000..8f42ea7f9a84
--- /dev/null
+++ b/sci-mathematics/pari/pari-2.5.3.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="A software package for computer-aided number theory"
+HOMEPAGE="http://pari.math.u-bordeaux.fr/"
+SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="data doc fltk gmp qt4 X"
+
+RDEPEND="sys-libs/readline
+ data? ( sci-mathematics/pari-data )
+ doc? ( X? ( x11-misc/xdg-utils ) )
+ fltk? ( x11-libs/fltk:1 )
+ gmp? ( dev-libs/gmp )
+ qt4? ( dev-qt/qtgui:4 )
+ X? ( x11-libs/libX11 )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+get_compile_dir() {
+ pushd "${S}/config" > /dev/null
+ local fastread=yes
+ source ./get_archos
+ popd > /dev/null
+ echo "O${osname}-${arch}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.3.2-strip.patch
+ epatch "${FILESDIR}"/${PN}-2.3.2-ppc-powerpc-arch-fix.patch
+ # fix parallel make
+ epatch "${FILESDIR}"/${PN}-2.5.0-doc-make.patch
+ # sage error handling patch
+ epatch "${FILESDIR}"/${PN}-2.5.0-mp.c.patch
+ # OS X: add -install_name to the linker option
+ epatch "${FILESDIR}"/${PN}-2.5.0-macos.patch
+ # Fix Perl 5.26
+ epatch "${FILESDIR}/"${PN}-2.5.0-no-dot-inc.patch
+ # fix automagic
+ epatch "${FILESDIR}"/${PN}-2.5.1-no-automagic.patch
+
+ # disable default building of docs during install
+ sed -i \
+ -e "s:install-doc install-examples:install-examples:" \
+ config/Makefile.SH || die "Failed to fix makefile"
+
+ # propagate ldflags
+ sed -i \
+ -e 's/$shared $extra/$shared $extra \\$(LDFLAGS)/' \
+ config/get_dlld || die "failed to fix LDFLAGS"
+ # move doc dir to a gentoo doc dir and replace acroread by xdg-open
+ sed -i \
+ -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \
+ -e 's:"acroread":"xdg-open":' \
+ doc/gphelp.in || die "Failed to fix doc dir"
+
+ sed -i "s:/\(usr\|lib64\):${EPREFIX}/\1:g" \
+ config/get_{Qt,X11,include_path,libpth} \
+ || die "Failed to fix get_X11"
+
+ # usersch3.tex is generated
+ rm doc/usersch3.tex || die "failed to remove generated file"
+}
+
+src_configure() {
+ tc-export CC
+
+ # need to force optimization here, as it breaks without
+ if is-flag -O0; then
+ replace-flags -O0 -O2
+ elif ! is-flag -O?; then
+ append-flags -O2
+ fi
+
+ # sysdatadir installs a pari.cfg stuff which is informative only
+ ./Configure \
+ --prefix="${EPREFIX}"/usr \
+ --datadir="${EPREFIX}"/usr/share/${PN} \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --sysdatadir="${EPREFIX}"/usr/share/doc/${PF} \
+ --mandir="${EPREFIX}"/usr/share/man/man1 \
+ --with-readline="${EPREFIX}"/usr \
+ --with-ncurses-lib="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with fltk) \
+ $(use_with gmp) \
+ $(use_with qt4 qt) \
+ || die "./Configure failed"
+}
+
+src_compile() {
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+ # upstream set -fno-strict-aliasing.
+ # aliasing is a known issue on amd64, work on x86 by sheer luck
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -fno-strict-aliasing -DGCC_INLINE -fPIC" lib-dyn
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp
+
+ if use doc; then
+ cd "${S}" || die "failed to change directory"
+ # To prevent sandbox violations by metafont
+ VARTEXFONTS="${T}"/fonts emake docpdf
+ fi
+}
+
+src_test() {
+ emake dobench
+}
+
+src_install() {
+ default
+ dodoc MACHINES COMPAT
+ if use doc; then
+ # install gphelp and the pdf documentations manually.
+ # the install-doc target is overkill.
+ dodoc doc/*.pdf
+ dobin doc/gphelp
+ insinto /usr/share/doc/${PF}
+ # gphelp looks for some of the tex sources...
+ doins doc/*.tex doc/translations
+ # Install the examples - for real.
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+ emake EXDIR="${ED}/usr/share/doc/${PF}/examples" install-examples
+ fi
+}
diff --git a/sci-mathematics/pari/pari-2.5.4.ebuild b/sci-mathematics/pari/pari-2.5.4.ebuild
new file mode 100644
index 000000000000..2c261d95efc2
--- /dev/null
+++ b/sci-mathematics/pari/pari-2.5.4.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="Computer-aided number theory C library and tools"
+HOMEPAGE="http://pari.math.u-bordeaux.fr/"
+SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-fbsd ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="data doc fltk gmp qt4 X"
+
+RDEPEND="
+ sys-libs/readline:0=
+ data? ( sci-mathematics/pari-data )
+ doc? ( X? ( x11-misc/xdg-utils ) )
+ fltk? ( x11-libs/fltk:1 )
+ gmp? ( dev-libs/gmp:0= )
+ qt4? ( dev-qt/qtgui:4 )
+ X? ( x11-libs/libX11 )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+get_compile_dir() {
+ pushd "${S}/config" > /dev/null
+ local fastread=yes
+ source ./get_archos
+ popd > /dev/null
+ echo "O${osname}-${arch}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.3.2-strip.patch
+ epatch "${FILESDIR}"/${PN}-2.3.2-ppc-powerpc-arch-fix.patch
+ # fix parallel make
+ epatch "${FILESDIR}"/${PN}-2.5.0-doc-make.patch
+ # sage error handling patch
+ epatch "${FILESDIR}"/${PN}-2.5.0-mp.c.patch
+ # OS X: add -install_name to the linker option
+ epatch "${FILESDIR}"/${PN}-2.5.0-macos.patch
+ # Fix Perl 5.26
+ epatch "${FILESDIR}/"${PN}-2.5.0-no-dot-inc.patch
+ # fix automagic
+ epatch "${FILESDIR}"/${PN}-2.5.1-no-automagic.patch
+ # sage-on-gentoo trac 13902: Slowdown for PARI integer determinant
+ epatch "${FILESDIR}"/${PN}-2.5.4-slow_determinant.patch
+ # sage-on-gentoo trac 13054: polred bug / pari bug 1395
+ epatch "${FILESDIR}"/${PN}-2.5.4-polred.patch
+
+ # disable default building of docs during install
+ sed -i \
+ -e "s:install-doc install-examples:install-examples:" \
+ config/Makefile.SH || die "Failed to fix makefile"
+
+ # propagate ldflags
+ sed -i \
+ -e 's/$shared $extra/$shared $extra \\$(LDFLAGS)/' \
+ config/get_dlld || die "failed to fix LDFLAGS"
+ # move doc dir to a gentoo doc dir and replace acroread by xdg-open
+ sed -i \
+ -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \
+ -e 's:"acroread":"xdg-open":' \
+ doc/gphelp.in || die "Failed to fix doc dir"
+
+ sed -i "s:/\(usr\|lib64\):${EPREFIX}/\1:g" \
+ config/get_{Qt,X11,include_path,libpth} \
+ || die "Failed to fix get_X11"
+
+ # usersch3.tex is generated
+ rm doc/usersch3.tex || die "failed to remove generated file"
+}
+
+src_configure() {
+ tc-export CC
+ export CPLUSPLUS=$(tc-getCXX)
+
+ # need to force optimization here, as it breaks without
+ if is-flag -O0; then
+ replace-flags -O0 -O2
+ elif ! is-flag -O?; then
+ append-flags -O2
+ fi
+
+ # sysdatadir installs a pari.cfg stuff which is informative only
+ ./Configure \
+ --prefix="${EPREFIX}"/usr \
+ --datadir="${EPREFIX}"/usr/share/${PN} \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --sysdatadir="${EPREFIX}"/usr/share/doc/${PF} \
+ --mandir="${EPREFIX}"/usr/share/man/man1 \
+ --with-readline="${EPREFIX}"/usr \
+ --with-ncurses-lib="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with fltk) \
+ $(use_with gmp) \
+ $(use_with qt4 qt) \
+ || die "./Configure failed"
+}
+
+src_compile() {
+ mycxxmake=LD\=$(tc-getCXX)
+
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+ # upstream set -fno-strict-aliasing.
+ # aliasing is a known issue on amd64, work on x86 by sheer luck
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -fno-strict-aliasing -DGCC_INLINE -fPIC" lib-dyn
+ emake ${mymake} ${mycxxmake} \
+ CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp
+
+ if use doc; then
+ cd "${S}" || die "failed to change directory"
+ # To prevent sandbox violations by metafont
+ VARTEXFONTS="${T}"/fonts emake docpdf
+ fi
+}
+
+src_test() {
+ emake dobench
+}
+
+src_install() {
+ emake ${mymake} ${mycxxmake} DESTDIR="${D}" install
+ dodoc MACHINES COMPAT
+ if use doc; then
+ # install gphelp and the pdf documentations manually.
+ # the install-doc target is overkill.
+ dodoc doc/*.pdf
+ dobin doc/gphelp
+ insinto /usr/share/doc/${PF}
+ # gphelp looks for some of the tex sources...
+ doins doc/*.tex doc/translations
+ # Install the examples - for real.
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+ emake EXDIR="${ED}/usr/share/doc/${PF}/examples" install-examples
+ fi
+}
diff --git a/sci-mathematics/pari/pari-2.7.0.ebuild b/sci-mathematics/pari/pari-2.7.0.ebuild
new file mode 100644
index 000000000000..5553fa2865b9
--- /dev/null
+++ b/sci-mathematics/pari/pari-2.7.0.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="Computer-aided number theory C library and tools"
+HOMEPAGE="http://pari.math.u-bordeaux.fr/"
+SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/4"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-fbsd ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="data doc fltk gmp qt4 X"
+
+RDEPEND="
+ sys-libs/readline:0=
+ data? ( sci-mathematics/pari-data )
+ doc? ( X? ( x11-misc/xdg-utils ) )
+ fltk? ( x11-libs/fltk:1= )
+ gmp? ( dev-libs/gmp:0= )
+ qt4? ( dev-qt/qtgui:4= )
+ X? ( x11-libs/libX11:0= )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+get_compile_dir() {
+ pushd "${S}/config" > /dev/null
+ local fastread=yes
+ source ./get_archos
+ popd > /dev/null
+ echo "O${osname}-${arch}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.3.2-strip.patch
+ epatch "${FILESDIR}"/${PN}-2.3.2-ppc-powerpc-arch-fix.patch
+ # fix parallel make
+ epatch "${FILESDIR}"/${PN}-2.7.0-doc-make.patch
+ # fix automagic
+ epatch "${FILESDIR}"/${PN}-2.7.0-no-automagic.patch
+ # sage-on-gentoo trac 15654: PARI discriminant speed depends on stack size
+ epatch "${FILESDIR}"/${PN}-2.7.0-slow-discriminant.patch
+ # Fix Perl 5.26
+ epatch "${FILESDIR}/"${PN}-2.7.0-no-dot-inc.patch
+
+ # disable default building of docs during install
+ sed -i \
+ -e "s:install-doc install-examples:install-examples:" \
+ config/Makefile.SH || die "Failed to fix makefile"
+
+ # propagate ldflags
+ sed -i \
+ -e 's/$shared $extra/$shared $extra \\$(LDFLAGS)/' \
+ config/get_dlld || die "failed to fix LDFLAGS"
+ # move doc dir to a gentoo doc dir and replace acroread by xdg-open
+ sed -i \
+ -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \
+ -e 's:"acroread":"xdg-open":' \
+ doc/gphelp.in || die "Failed to fix doc dir"
+
+ # usersch3.tex is generated
+ rm doc/usersch3.tex || die "failed to remove generated file"
+}
+
+src_configure() {
+ tc-export CC
+ export CPLUSPLUS=$(tc-getCXX)
+
+ # need to force optimization here, as it breaks without
+ if is-flag -O0; then
+ replace-flags -O0 -O2
+ elif ! is-flag -O?; then
+ append-flags -O2
+ fi
+
+ # sysdatadir installs a pari.cfg stuff which is informative only
+ ./Configure \
+ --prefix="${EPREFIX}"/usr \
+ --datadir="${EPREFIX}"/usr/share/${PN} \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --sysdatadir="${EPREFIX}"/usr/share/doc/${PF} \
+ --mandir="${EPREFIX}"/usr/share/man/man1 \
+ --with-readline="${EPREFIX}"/usr \
+ --with-ncurses-lib="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with fltk) \
+ $(use_with gmp) \
+ $(use_with qt4 qt) \
+ || die "./Configure failed"
+}
+
+src_compile() {
+ use hppa && \
+ mymake=DLLD\="${EPREFIX}"/usr/bin/gcc\ DLLDFLAGS\=-shared\ -Wl,-soname=\$\(LIBPARI_SONAME\)\ -lm
+
+ mycxxmake=LD\=$(tc-getCXX)
+
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+ # upstream set -fno-strict-aliasing.
+ # aliasing is a known issue on amd64, work on x86 by sheer luck
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -fno-strict-aliasing -DGCC_INLINE -fPIC" lib-dyn
+ emake ${mymake} ${mycxxmake} \
+ CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp
+
+ if use doc; then
+ cd "${S}" || die "failed to change directory"
+ # To prevent sandbox violations by metafont
+ VARTEXFONTS="${T}"/fonts emake docpdf
+ fi
+}
+
+src_test() {
+ emake dobench
+}
+
+src_install() {
+ emake ${mymake} ${mycxxmake} DESTDIR="${D}" install
+ dodoc MACHINES COMPAT
+ if use doc; then
+ # install gphelp and the pdf documentations manually.
+ # the install-doc target is overkill.
+ dodoc doc/*.pdf
+ dobin doc/gphelp
+ insinto /usr/share/doc/${PF}
+ # gphelp looks for some of the tex sources...
+ doins doc/*.tex doc/translations
+ # Install the examples - for real.
+ emake EXDIR="${ED}/usr/share/doc/${PF}/examples" \
+ -C $(get_compile_dir) install-examples
+ fi
+}
diff --git a/sci-mathematics/pari/pari-2.7.1.ebuild b/sci-mathematics/pari/pari-2.7.1.ebuild
new file mode 100644
index 000000000000..1bf046344426
--- /dev/null
+++ b/sci-mathematics/pari/pari-2.7.1.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="Computer-aided number theory C library and tools"
+HOMEPAGE="http://pari.math.u-bordeaux.fr/"
+SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/4"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="data doc fltk gmp qt4 X"
+
+RDEPEND="
+ sys-libs/readline:0=
+ data? ( sci-mathematics/pari-data )
+ doc? ( X? ( x11-misc/xdg-utils ) )
+ fltk? ( x11-libs/fltk:1= )
+ gmp? ( dev-libs/gmp:0= )
+ qt4? ( dev-qt/qtgui:4= )
+ X? ( x11-libs/libX11:0= )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+get_compile_dir() {
+ pushd "${S}/config" > /dev/null
+ local fastread=yes
+ source ./get_archos
+ popd > /dev/null
+ echo "O${osname}-${arch}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.3.2-strip.patch
+ epatch "${FILESDIR}"/${PN}-2.3.2-ppc-powerpc-arch-fix.patch
+ # fix parallel make
+ epatch "${FILESDIR}"/${PN}-2.7.0-doc-make.patch
+ # fix automagic
+ epatch "${FILESDIR}"/${PN}-2.7.0-no-automagic.patch
+ # sage-on-gentoo trac 15654: PARI discriminant speed depends on stack size
+ epatch "${FILESDIR}"/${PN}-2.7.0-slow-discriminant.patch
+ # Fix Perl 5.26
+ epatch "${FILESDIR}/"${PN}-2.7.0-no-dot-inc.patch
+ # fix building docs with perl-5.22
+ epatch "${FILESDIR}"/${PN}-2.7.1-perl-5.22-doc.patch
+
+ # disable default building of docs during install
+ sed -i \
+ -e "s:install-doc install-examples:install-examples:" \
+ config/Makefile.SH || die "Failed to fix makefile"
+
+ # propagate ldflags
+ sed -i \
+ -e 's/$shared $extra/$shared $extra \\$(LDFLAGS)/' \
+ config/get_dlld || die "failed to fix LDFLAGS"
+ # move doc dir to a gentoo doc dir and replace acroread by xdg-open
+ sed -i \
+ -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \
+ -e 's:"acroread":"xdg-open":' \
+ doc/gphelp.in || die "Failed to fix doc dir"
+
+ # usersch3.tex is generated
+ rm doc/usersch3.tex || die "failed to remove generated file"
+}
+
+src_configure() {
+ tc-export CC
+ export CPLUSPLUS=$(tc-getCXX)
+
+ # need to force optimization here, as it breaks without
+ if is-flag -O0; then
+ replace-flags -O0 -O2
+ elif ! is-flag -O?; then
+ append-flags -O2
+ fi
+
+ # sysdatadir installs a pari.cfg stuff which is informative only
+ ./Configure \
+ --prefix="${EPREFIX}"/usr \
+ --datadir="${EPREFIX}"/usr/share/${PN} \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --sysdatadir="${EPREFIX}"/usr/share/doc/${PF} \
+ --mandir="${EPREFIX}"/usr/share/man/man1 \
+ --with-readline="${EPREFIX}"/usr \
+ --with-ncurses-lib="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with fltk) \
+ $(use_with gmp) \
+ $(use_with qt4 qt) \
+ || die "./Configure failed"
+}
+
+src_compile() {
+ use hppa && \
+ mymake=DLLD\="${EPREFIX}"/usr/bin/gcc\ DLLDFLAGS\=-shared\ -Wl,-soname=\$\(LIBPARI_SONAME\)\ -lm
+
+ mycxxmake=LD\=$(tc-getCXX)
+
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+ # upstream set -fno-strict-aliasing.
+ # aliasing is a known issue on amd64, work on x86 by sheer luck
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -fno-strict-aliasing -DGCC_INLINE -fPIC" lib-dyn
+ emake ${mymake} ${mycxxmake} \
+ CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp
+
+ if use doc; then
+ cd "${S}" || die "failed to change directory"
+ # To prevent sandbox violations by metafont
+ VARTEXFONTS="${T}"/fonts emake docpdf
+ fi
+}
+
+src_test() {
+ emake dobench
+}
+
+src_install() {
+ emake ${mymake} ${mycxxmake} DESTDIR="${D}" install
+ dodoc MACHINES COMPAT
+ if use doc; then
+ # install gphelp and the pdf documentations manually.
+ # the install-doc target is overkill.
+ dodoc doc/*.pdf
+ dobin doc/gphelp
+ insinto /usr/share/doc/${PF}
+ # gphelp looks for some of the tex sources...
+ doins doc/*.tex doc/translations
+ # Install the examples - for real.
+ emake EXDIR="${ED}/usr/share/doc/${PF}/examples" \
+ -C $(get_compile_dir) install-examples
+ fi
+}
diff --git a/sci-mathematics/polymake/Manifest b/sci-mathematics/polymake/Manifest
new file mode 100644
index 000000000000..78ee20f18f3e
--- /dev/null
+++ b/sci-mathematics/polymake/Manifest
@@ -0,0 +1,5 @@
+DIST polymake-3.0r2.tar.bz2 37695790 SHA256 e7c0f8e3a45ea288d2fb4ae781a1dcea913ef9c275fed401632cdb11a672d6dc SHA512 b4c22b2c6da8ef597dc05a44a30c7a55fd924a96854cde3f725095465972eabe1e24508f8e5d544f3131c82c973117b15983c38a0242fc7f1d4a4a8ecddb1d46 WHIRLPOOL 5a236ac32de0dd19e7f0f5b8b1b42f2b72fa2392ee098718383a8dfd0f1d1db3946d5f4f75bd9e4c075033deebcd87ddbb28ce70733d6371fa4624b8b6a4edd1
+EBUILD polymake-3.0_p2.ebuild 2692 SHA256 496782bc3939ab7a2f5aeda7cac8c72f1ea2fd6cd439c49629b0ccc811508680 SHA512 1c56745020235e99cab64e5f2432212805cbabf5b0444588b6f07594c8ece72a999c02b0a41ed1ddb72e2ea408ca75fc7051da3b014ecc14ee0d0fa9e413e171 WHIRLPOOL 09a06ddd26d960c17ea88d8a96f739acf3efed0c66436ea5c5a8c3f641989388be5dfd6ab57f1b9803f122ecce83ae770fda478de9162b530ef2810f41c85045
+MISC ChangeLog 3319 SHA256 eac861918ed525b5ff0b519e6f2ce9bec2bf55e5c5969686e839fdbdd9b8d175 SHA512 8d3df5910feec3c3cd589bdffb4931c0532131ca2bcf94ae87abcac831cc7fd520a62a617da9b04ad7d61bd9bec05a916d1fbf4c68e77f4b1b5a26aff7eaf7bd WHIRLPOOL 59d666fab2bba1a63039bc5c8a4e87242370d3aafb61351f0dc18748225ec1894df8b98ba69561915bb7f552a6f5396fd088f37e58b435533490d7e3b680bdb5
+MISC ChangeLog-2015 2880 SHA256 3227519f7d2cec5213953d6c0c21a8c207017377e945098ae6e22cb82aff493a SHA512 fa58e78a678d0b809a3d18ef230d93bd4bc147562eccedd547d11dd9fe8834a0b8b6a22e32359b08e1ba8835b1e3f60198435b5c5b956f9d8b505f75a2e1563b WHIRLPOOL 43ce1677b024f2580b870009d821a1e31eb4e664bfc9cace46f9a2d64ccaddbe7b2eabdc40d7f7294eb0624be89b6c4ff8414781fdf4e77184be73e6ffc1e4fb
+MISC metadata.xml 1344 SHA256 4db49dc932c001aea71435c2e2bb98e9f561eabc319f04a658e567e7563dcdb4 SHA512 43356916d2941afab2346ab4289ec1ab65a166523682a7831a29261c3f7391072d4fa232c324483e33d523fa80288a208f7937f559e56bb20b3a85d5058779e9 WHIRLPOOL fc9e7da5ab31a373cdeddb5ef7aea7cb52471877e4a32b342d5da0e0916cbf3979cfba9221893e0d2898fbbd9956287b5f516b911525847b24ca7bccd6bf2d47
diff --git a/sci-mathematics/polymake/metadata.xml b/sci-mathematics/polymake/metadata.xml
new file mode 100644
index 000000000000..fb608830c0a6
--- /dev/null
+++ b/sci-mathematics/polymake/metadata.xml
@@ -0,0 +1,24 @@
+<?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>
+<use>
+ <flag name="cdd">Enable sci-libs/cddlib interface for convex hull
+ computations (Should be kept enabled).</flag>
+ <flag name="lrs">Enable sci-libs/lrslib interface for convex hull computations.</flag>
+ <flag name="ppl">Enable dev-libs/ppl interface for convex hull computations.</flag>
+ <flag name="bliss">Enable sci-libs/bliss interface for graph and face lattice isomorphism computations.</flag>
+ <flag name="group">Build extension for dealing with permutation groups and symmetric objects.</flag>
+ <flag name="libnormaliz">Build the bundled extension for lattice related computations.</flag>
+ <flag name="singular">Enable the interface to sci-mathematics/singular for ideal related computations.</flag>
+ <flag name="libpolymake">Build the polymake library to build applications using the C++ interface.</flag>
+</use>
+<longdescription lang="en">
+Polymake started out as a tool for the algorithmic treatment of convex
+polyhedra. By now it also deals with finite simplicial complexes,
+tight spans of finite metric spaces, and other objects.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/polymake/polymake-3.0_p2.ebuild b/sci-mathematics/polymake/polymake-3.0_p2.ebuild
new file mode 100644
index 000000000000..7727fc25d421
--- /dev/null
+++ b/sci-mathematics/polymake/polymake-3.0_p2.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="research tool for polyhedral geometry and combinatorics"
+SRC_URI="https://polymake.org/lib/exe/fetch.php/download/polymake-3.0r2.tar.bz2"
+HOMEPAGE="http://polymake.org"
+
+IUSE="+cdd lrs ppl bliss group +libnormaliz singular libpolymake"
+
+REQUIRED_USE="group? ( cdd lrs )"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="dev-lang/perl
+ dev-libs/gmp:0=
+ dev-libs/mpfr:0
+ dev-libs/libxml2:2
+ dev-libs/libxslt
+ ppl? ( dev-libs/ppl )
+ cdd? ( sci-libs/cddlib )
+ lrs? ( >=sci-libs/lrslib-051[gmp] )
+ bliss? ( sci-libs/bliss[gmp] )
+ group? ( dev-libs/boost:= )
+ libnormaliz? ( dev-libs/boost:= )
+ singular? ( >=sci-mathematics/singular-4.0.1 )"
+RDEPEND="${DEPEND}
+ dev-perl/XML-LibXML
+ dev-perl/XML-LibXSLT
+ dev-perl/XML-Writer
+ dev-perl/Term-ReadLine-Gnu"
+
+S="${WORKDIR}/${PN}-3.0"
+
+pkg_pretend() {
+ einfo "During compile this package uses up to"
+ einfo "750MB of RAM per process. Use MAKEOPTS=\"-j1\" if"
+ einfo "you run into trouble."
+}
+
+src_configure () {
+ export CXXOPT=$(get-flag -O)
+
+ # We need to define BLISS_USE_GMP if bliss was built with gmp support.
+ # Therefore we require gmp support on bliss, so that the package
+ # manager can prevent rebuilds with changed gmp flag.
+ if use bliss ; then
+ append-cxxflags -DBLISS_USE_GMP
+ fi
+
+ # Configure does not accept --host, therefore econf cannot be used
+
+ # Some of the options do not support using just '--with-option'
+ local myconf=""
+ use !group && myconf="$myconf --without-group"
+ use !libnormaliz && myconf="$myconf --without-libnormaliz"
+ use !libpolymake && myconf="$myconf --without-callable"
+
+ # And many other --with-arguments expect a path: --with-option=/path
+ ./configure --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --libexecdir="${EPREFIX}/usr/$(get_libdir)/polymake" \
+ --without-prereq \
+ --without-java \
+ $(use_with cdd cdd "${EPREFIX}/usr") \
+ $(use_with lrs lrs "${EPREFIX}/usr") \
+ $(use_with ppl ppl "${EPREFIX}/usr") \
+ $(use_with bliss bliss "${EPREFIX}/usr") \
+ $(use_with singular singular "${EPREFIX}/usr") \
+ ${myconf} || die
+}
+
+src_install(){
+ emake -j1 DESTDIR="${D}" install
+}
+
+pkg_postinst(){
+ elog "Docs can be found on http://www.polymake.org/doku.php/documentation"
+ elog " "
+ elog "Support for jreality is missing, sorry (see bug #346073)."
+ elog " "
+ elog "Additional features for polymake are available through external"
+ elog "software such as sci-mathematics/4ti2 and sci-mathematics/topcom."
+ elog "After installing new external software run 'polymake --reconfigure'."
+}
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
+}
diff --git a/sci-mathematics/prover9/Manifest b/sci-mathematics/prover9/Manifest
new file mode 100644
index 000000000000..c3edc553c262
--- /dev/null
+++ b/sci-mathematics/prover9/Manifest
@@ -0,0 +1,7 @@
+AUX LADR-2009-11A-manpages.patch 13832 SHA256 d9ecfc1a476d1e06a4b83dc3a96a57c3cf78943571e910ea4be420ce5a255371 SHA512 4c9f862b33d7b6b33b5e4a82b38418c6ae41b7adae565d376cc741608eb989e3846c1e98589dea62f7cadeb0b1f0f5814afe95ee6cf0da63c6961620d8b2677c WHIRLPOOL ce25b003f4ea4262e2431437e840d188ac73bab08f2397d7869badb9adfd783e58fb09d01ddaee983fc4b9078b716cb04958125df800984bdb486f11badd39a6
+DIST LADR-2009-11A-makefile.patch.xz 4300 SHA256 7340ec2ce439a6ed039d7077a417ca5d81ad3acce0b174e96469e8ebad274adf SHA512 c1d2e27d991036af24a29deb4401fbf9687415d2a37bebabb9cfc77d8672e0804d974f92cbd7b8e16c0a0c10b75831847f7b8ddb94244d7e632de7b1be5081f1 WHIRLPOOL 15401ed0b9edafb3841bed7c1c270d8a38544470abf87abd9b70b9eb0aa194d7296146e88b797a568aff7e557a118bfc2ee40d5a5c8ae6a426902db51e11c0ae
+DIST LADR-2009-11A.tar.gz 1795750 SHA256 c32bed5807000c0b7161c276e50d9ca0af0cb248df2c1affb2f6fc02471b51d0 SHA512 f26d3713eb2ba809fb3d55ce179e9d91555ab9166e075aa0843bafe57ce00f153cfed178b61993d4fd471655840e4f40775d75dac9fb5242a67e5d59c970dfc7 WHIRLPOOL 6e6abd1a5c7bfc988fb693eeea08bdfba77c9badea3d4a77764efcb9ee16c36b372241fbf4d4dead911cabf9a03721988f334977379da47d04b4320bae257fad
+EBUILD prover9-2009.11a.ebuild 2501 SHA256 e5f7881d48c8dd70eee7e6ef300f58b5de2e453387556ac10529da3d4e90224f SHA512 9fcd42d72dbb823fd2a71064416fb7d5565c2104aaf78274d3986b605e5182ff5bc09f706191c5441d64392e7de6ae779d33afcb2ca7df6d5476cbcdd01724f0 WHIRLPOOL 4c8ecc39cd6a8e4272d851ac1344e2990e3c0eed1cd01b5182c217791711065063cc9dde5d4838bf9f8922959d624d8390282e4eed8e33c7835ad2d06687d368
+MISC ChangeLog 2506 SHA256 11eea2ed086a936c3bd01d4e215e126b1b934f3685c8788e10388974b7231962 SHA512 0107cff7c26b34a4a2a67f53b8c0dfda01a1ae334b8aac71993b1e6b595e5a83b4a2927c6475856a670c9ef5265870e0024273f44e310f1947196c451b3e5c86 WHIRLPOOL c466e09a66b45b300aed7b389f800cb4bc679707317d83ab54aa4c21a39db38a9d5f7f7b914f95979f4c9cd96f46652651b86be45daf83c89bac228b7573f128
+MISC ChangeLog-2015 1093 SHA256 accadcaa67650488616b1d397e357382252040095843ec6afbaa9d290ae3a92f SHA512 65e8adfe60b4ccb86fbb60990162ee057bf56afc88e0a10f0263325560cf6d5bb71191d76104ff7651aaef39caa8d84c975ad8cef0bafa42416019868be97b6b WHIRLPOOL 5f7bd44aaff1b05be2fa420667c5727c42f86d640eceac4112131ca9b760dd39a65614ac2215f9fb429bd71200e66c09fed67f33686defa64c3e720a84e4b91d
+MISC metadata.xml 643 SHA256 4b9cacae281684bc0e74de2c98f56c897a723a936f5b48e51158896ab72eee7b SHA512 c3160f8aadceb5f065af9c5f14e9fe904b270bba1cf7781d33c39dca4f2641d61123839b93c4d7ad38139e8fc4c221016fe444cbfd7ddc99ea224090fccd7078 WHIRLPOOL d16c76482900958caa7db7be34c00ca77dfb7b86b141189245fd112ff9cb4b002a0dad0c6b7689e36a6620ec715cad91ce89b643e7bb31615dec2f051877009a
diff --git a/sci-mathematics/prover9/files/LADR-2009-11A-manpages.patch b/sci-mathematics/prover9/files/LADR-2009-11A-manpages.patch
new file mode 100644
index 000000000000..6e2324a6a390
--- /dev/null
+++ b/sci-mathematics/prover9/files/LADR-2009-11A-manpages.patch
@@ -0,0 +1,466 @@
+--- /dev/null 2012-01-07 09:10:22.797165727 +1100
++++ LADR-2009-11A/manpages/clausefilter.1 2012-01-07 19:30:44.311801364 +1100
+@@ -0,0 +1,43 @@
++.TH CLAUSEFILTER 1 "January 20, 2007"
++.SH NAME
++clausefilter - filter formulas with models
++.SH SYNOPSIS
++.B clausefilter
++.RI < interpretations-file >
++.RI < test >
++<
++.RI < formulas-file >
++>
++.RI < passing-formulas-file >
++.SH DESCRIPTION
++This manual page documents briefly the
++.B clausefilter
++command.
++.PP
++Given a set of \fIinterpretations\fP, a \fItest\fP to perform, and a
++stream of \fIformulas\fP, \fBclausefilter\fP outputs the formulas
++that pass the test.
++.SH TESTS
++The following tests are available.
++.TP
++.B true_in_all
++Formula true in all interpretations.
++.TP
++.B true_in_some
++Formula true in some interpretation.
++.TP
++.B false_in_all
++Formula false in all interpretations.
++.TP
++.B false_in_some
++Formula false in some interpretation.
++.SH SEE ALSO
++.BR prover9 (1),
++.BR mace4 (1).
++.br
++Full documentation for \fBclausefilter\fP is found in the \fBprover9\fP manual, available on Gentoo systems at \fI/usr/share/doc/prover9-2009.11a/html/index.html\fP.
++.SH AUTHOR
++\fBclausefilter\fP was written by William McCune <mccune@cs.unm.edu>
++.PP
++This manual page was written by Peter Collingbourne <pcc03@doc.ic.ac.uk>,
++for the Debian project (but may be used by others).
+--- /dev/null 2012-01-07 09:10:22.797165727 +1100
++++ LADR-2009-11A/manpages/clausetester.1 2012-01-07 19:30:44.312801386 +1100
+@@ -0,0 +1,29 @@
++.TH CLAUSETESTER 1 "January 20, 2007"
++.SH NAME
++clausetester - check formulas in models
++.SH SYNOPSIS
++.B clausetester
++.RI < interpretations-file >
++<
++.RI < formulas-file >
++>
++.RI < annotated-formulas-file >
++.SH DESCRIPTION
++This manual page documents briefly the
++.B clausetester
++command.
++.PP
++This program takes a set of \fIinterpretations\fP and stream of
++\fIformulas\fP. For each formula, the interpretations in which the
++formula is true are shown, and at the end the number of formulas true
++in each interpretation is shown.
++.SH SEE ALSO
++.BR prover9 (1),
++.BR mace4 (1).
++.br
++Full documentation for \fBclausetester\fP is found in the \fBprover9\fP manual, available on Gentoo systems at \fI/usr/share/doc/prover9-2009.11a/html/index.html\fP.
++.SH AUTHOR
++\fBclausetester\fP was written by William McCune <mccune@cs.unm.edu>
++.PP
++This manual page was written by Peter Collingbourne <pcc03@doc.ic.ac.uk>,
++for the Debian project (but may be used by others).
+--- /dev/null 2012-01-07 09:10:22.797165727 +1100
++++ LADR-2009-11A/manpages/interpfilter.1 2012-01-07 19:30:44.312801386 +1100
+@@ -0,0 +1,43 @@
++.TH INTERPFILTER 1 "January 20, 2007"
++.SH NAME
++interpfilter - filter models with formulas
++.SH SYNOPSIS
++.B interpfilter
++.RI < formulas-file >
++.RI < test >
++<
++.RI < interpretations-file >
++>
++.RI < passing-interpretations-file >
++.SH DESCRIPTION
++This manual page documents briefly the
++.B interpfilter
++command.
++.PP
++Given a set of \fIformulas\fP, a \fItest\fP to perform, and a
++stream of \fIinterpretations\fP, \fBinterpfilter\fP outputs the interpretations
++that pass the test.
++.SH TESTS
++The following tests are available.
++.TP
++.B all_true
++All formulas true in given interpretation.
++.TP
++.B some_true
++Some formula true in given interpretation.
++.TP
++.B all_false
++All formulas false in given interpretation.
++.TP
++.B some_false
++Some formula false in given interpretation.
++.SH SEE ALSO
++.BR prover9 (1),
++.BR mace4 (1).
++.br
++Full documentation for \fBinterpfilter\fP is found in the \fBprover9\fP manual, available on Gentoo systems at \fI/usr/share/doc/prover9-2009.11a/html/index.html\fP.
++.SH AUTHOR
++\fBinterpfilter\fP was written by William McCune <mccune@cs.unm.edu>
++.PP
++This manual page was written by Peter Collingbourne <pcc03@doc.ic.ac.uk>,
++for the Debian project (but may be used by others).
+--- /dev/null 2012-01-07 09:10:22.797165727 +1100
++++ LADR-2009-11A/manpages/interpformat.1 2012-01-07 19:30:44.313801403 +1100
+@@ -0,0 +1,65 @@
++.TH INTERPFORMAT 1 "January 20, 2007"
++.SH NAME
++interpformat \- tool for transforming
++.BR mace4 (1)
++models
++.SH SYNOPSIS
++.B interpformat
++.RI [ options ]
++.RI < transformation >
++\-f
++.I input-file
++>
++.I output-file
++.br
++.B interpformat
++.RI [ options ]
++.RI < transformation >
++<
++.I input-file
++>
++.I output-file
++.SH DESCRIPTION
++The models (structures) in
++.BR mace4 (1)
++output files can be transformed in various ways with the program \fBinterpformat\fP.
++.SH TRANSFORMATIONS
++The transformations are listed here.
++.TP
++.B standard
++one line per operation
++.TP
++.B standard2
++standard, with binary operations in a square (default)
++.TP
++.B portable
++list of lists, suitable for parsing by Python, GAP, etc.
++.TP
++.B tabular
++as nice tables
++.TP
++.B raw
++similar to standard, but without punctuation
++.TP
++.B cooked
++as terms, e.g., f(0,1)=2
++.TP
++.B tex
++formatted for LaTeX
++.TP
++.B xml
++XML
++.SH OPTIONS
++A summary of options is included below.
++.TP
++.B output \fI<operations>
++Output only the listed \fIoperations\fP.
++.SH SEE ALSO
++.BR mace4 (1).
++.br
++Full documentation for \fBinterpformat\fP is found in the \fBprover9\fP manual, available on Gentoo systems at \fI/usr/share/doc/prover9-2009.11a/html/index.html\fP.
++.SH AUTHOR
++\fBinterpformat\fP was written by William McCune <mccune@cs.unm.edu>
++.PP
++This manual page was written by Peter Collingbourne <pcc03@doc.ic.ac.uk>,
++for the Debian project (but may be used by others).
+--- /dev/null 2012-01-07 09:10:22.797165727 +1100
++++ LADR-2009-11A/manpages/isofilter.1 2012-01-07 19:30:44.313801403 +1100
+@@ -0,0 +1,65 @@
++.TH ISOFILTER 1 "January 20, 2007"
++.SH NAME
++isofilter - removes isomorphic structures from
++.BR mace4 (1)
++models
++.SH SYNOPSIS
++.B isofilter
++.RI [ options ]
++<
++.I input-file
++>
++.I output-file
++.br
++.B isofilter0
++.RI [ options ]
++<
++.I input-file
++>
++.I output-file
++.br
++.B isofilter2
++.RI [ options ]
++<
++.I input-file
++>
++.I output-file
++.SH DESCRIPTION
++This manual page documents briefly the \fBisofilter\fP, \fBisofilter0\fP and \fBisofilter2\fP commands.
++.PP
++If
++.BR mace4 (1)
++produces more than one structure, some of them are very likely to be
++isomorphic to others. The program \fBisofilter\fP can be used to remove isomorphic
++structures.
++.SH ALGORITHM
++There are multiple \fBisofilter\fP variants providing alternative algorithms.
++.TP
++.B isofilter
++Uses Occurrence Profiles algorithm.
++.TP
++.B isofilter2
++Uses Canonical Forms algorithm.
++.SH OPTIONS
++A summary of options is included below.
++.TP
++.B ignore_constants
++Ignore all constants during the isomorphism tests.
++.TP
++.B check \fI<operations>
++Consider only the listed \fIoperations\fP in the isomorphism tests.
++.TP
++.B output \fI<operations>
++Output only the listed \fIoperations\fP.
++.TP
++.B wrap
++Enclose the resulting structures in \fBlist(interpretations). ... end_of_list.\fP
++.SH SEE ALSO
++.BR mace4 (1).
++.br
++Full documentation for \fBisofilter\fP is found in the \fBprover9\fP manual, available on Gentoo systems at \fI/usr/share/doc/prover9-2009.11a/html/index.html\fP.
++.SH AUTHOR
++\fBisofilter\fP was written by William McCune <mccune@cs.unm.edu>
++.PP
++This manual page was written by Peter Collingbourne <pcc03@doc.ic.ac.uk>,
++for the Debian project (but may be used by others).
+--- LADR-2009-11A-orig/manpages/mace4.1 2007-12-31 15:43:54.000000000 +1100
++++ LADR-2009-11A/manpages/mace4.1 2012-01-07 19:55:18.746508266 +1100
+@@ -76,11 +76,11 @@
+ .SH SEE ALSO
+ .BR prover9 (1).
+ .br
+-Full documentation for \fBmace4\fP is found in the \fBprover9\fP manual, available on Debian systems in the \fIprover9-doc\fP package at \fI/usr/share/doc/prover9-doc/manual/index.html\fP.
++Full documentation for \fBmace4\fP is found in the \fBprover9\fP manual, available on Gentoo systems at \fI/usr/share/doc/prover9-2009.11a/html/index.html\fP.
+ .br
+ The original \fBmace4\fP manual, which can be downloaded at http://www.cs.unm.edu/~mccune/prover9/mace4.pdf
+ .SH AUTHOR
+-\fBmace4\fP ws written by William McCune <mccune@cs.unm.edu>
++\fBmace4\fP was written by William McCune <mccune@cs.unm.edu>
+ .PP
+ This manual page was written by Peter Collingbourne <pcc03@doc.ic.ac.uk>,
+ for the Debian project (but may be used by others).
+--- /dev/null 2012-01-07 09:10:22.797165727 +1100
++++ LADR-2009-11A/manpages/prooftrans.1 2012-01-07 19:30:44.314801424 +1100
+@@ -0,0 +1,73 @@
++.TH PROOFTRANS 1 "January 20, 2007"
++.SH NAME
++prooftrans - tool for transforming Prover9 proofs
++.SH SYNOPSIS
++.B prooftrans
++.RI [ parents_only ]
++.RI [ expand ]
++.RI [ renumber ]
++.RI [ striplabels ]
++[\fI-f file\fP]
++.br
++.B prooftrans
++xml
++.RI [ expand ]
++.RI [ renumber ]
++.RI [ striplabels ]
++[\fI-f file\fP]
++.br
++.B prooftrans
++ivy
++.RI [ renumber ]
++[\fI-f file\fP]
++.br
++.B prooftrans
++hints
++[\fI-label label\fP]
++.RI [ expand ]
++.RI [ striplabels ]
++[\fI-f file\fP]
++.SH DESCRIPTION
++This manual page documents briefly the
++.B prooftrans
++command.
++.PP
++\fBprooftrans\fP can extract proofs from
++.BR prover9 (1)
++output files and transform them in various ways.
++
++.SH OPTIONS
++A summary of options is included below.
++.TP
++.B renumber
++Renumber steps.
++.TP
++.B parents_only
++Simplify justifications by listing only parents.
++.TP
++.B expand
++Expand all steps, turning secondary justifications into explicit steps.
++.TP
++.B xml
++Produce proofs in XML.
++.TP
++.B ivy
++Produce proofs for checking by the IVY proof checker.
++.TP
++.B hints
++Produce hints for guiding subsequent searches.
++.TP
++.B \-label \fIlabel\fP
++Attach label attributes to the hint clauses consisting of the string \fIlabel\fP and a sequence number generated by prooftrans.
++.TP
++.B \-f \fIfile
++Take input from \fIfile\fP instead of from standard input.
++.SH SEE ALSO
++.BR prover9 (1).
++.br
++Full documentation for \fBprooftrans\fP is found in the \fBprover9\fP manual, available on Gentoo systems at \fI/usr/share/doc/prover9-2009.11a/html/index.html\fP.
++.SH AUTHOR
++\fBprooftrans\fP was written by William McCune <mccune@cs.unm.edu>
++.PP
++This manual page was written by Peter Collingbourne <pcc03@doc.ic.ac.uk>,
++for the Debian project (but may be used by others).
+--- LADR-2009-11A-orig/manpages/prover9.1 2007-12-31 15:43:54.000000000 +1100
++++ LADR-2009-11A/manpages/prover9.1 2012-01-07 19:54:30.928968388 +1100
+@@ -11,7 +11,7 @@
+ .br
+ .B prover9
+ .RI [ options ]
+--f
++\-f
+ .I input-file
+ >
+ .I output-file
+@@ -38,15 +38,15 @@
+ .B \-t \fIn
+ Constrain the search to last about \fIn\fP seconds. For UNIX-like systems, the `user CPU' time is used.
+ .TP
+-.B \-f \fIfiles
+-Take input from \fIfiles\fP instead of from standard input.
++.B \-f \fIfile
++Take input from \fIfile\fP instead of from standard input.
+ .SH SEE ALSO
+ .BR mace4 (1),
+ .BR otter (1).
+ .br
+-On Debian systems, the manual is found in the \fIprover9-doc\fP package, at \fI/usr/share/doc/prover9-doc/manual/index.html\fP.
++On Gentoo systems, the manual is found at \fI/usr/share/doc/prover9-2009.11a/html/index.html\fP.
+ .SH AUTHOR
+-\fBprover9\fP ws written by William McCune <mccune@cs.unm.edu>
++\fBprover9\fP was written by William McCune <mccune@cs.unm.edu>
+ .PP
+ This manual page was written by Peter Collingbourne <pcc03@doc.ic.ac.uk>,
+ for the Debian project (but may be used by others).
+--- /dev/null 2012-01-07 09:10:22.797165727 +1100
++++ LADR-2009-11A/manpages/prover9-apps.1 2012-01-07 19:30:44.315801449 +1100
+@@ -0,0 +1,17 @@
++.TH PROVER9-APPS 1 "June 18, 2008"
++.SH NAME
++prover9-apps \- undocumented Prover9 applications
++.SH DESCRIPTION
++Some programs in the \fBprover9-apps\fP package currently have no manual
++pages. You can obtain documentation on some of these applications via the
++\fBprover9\fP manual, which is available
++at \fI/usr/share/doc/prover9-2009.11a/html/index.html\fP.
++Alternatively invoking the application with the \fB-help\fP option may
++produce documentation. Patches to add manual pages are welcome, and may
++be sent to the Debian package maintainer, whose details are listed below.
++.SH AUTHOR
++The applications were written by William McCune <mccune@cs.unm.edu>.
++.PP
++This manual page was written by Peter Collingbourne <pcc03@doc.ic.ac.uk>,
++for the Debian project (but may be used by others) and modified for Fedora
++by Tim Colles <timc@inf.ed.ac.uk>.
+--- /dev/null 2012-01-07 09:10:22.797165727 +1100
++++ LADR-2009-11A/manpages/rewriter.1 2012-01-07 19:30:44.315801449 +1100
+@@ -0,0 +1,60 @@
++.de Sp \" Vertical space (when we can't use .PP)
++.if t .sp .5v
++.if n .sp
++..
++.de Vb \" Begin verbatim text
++.ft CW
++.nf
++.ne \\$1
++..
++.de Ve \" End verbatim text
++.ft R
++.fi
++..
++.TH REWRITER 1 "January 20, 2007"
++.SH NAME
++rewriter - demodulate terms
++.SH SYNOPSIS
++.B rewriter
++.RI < demodulators-file >
++<
++.RI < terms-file >
++>
++.RI < rewritten-terms-file >
++.SH DESCRIPTION
++This manual page documents briefly the
++.B rewriter
++command.
++.PP
++Rewrite a stream of \fIterms\fP with a list of \fIdemodulators\fP. The
++demodulators are used left-to-right as given, and they are not checked
++for termination.
++.SH SYNTAX
++The file of demodulators contains optional commands
++then a list of demodulators. The commands can be used to
++declare infix operations and associativity/commutativity.
++Example file of demodulators:
++.Sp
++.Vb 10
++\& op(400, infix, ^).
++\& op(400, infix, v).
++\& assoc_comm(^).
++\& assoc_comm(v).
++\& formulas(demodulators).
++\& x ^ x = x.
++\& x ^ (x v y) = x.
++\& x v x = x.
++\& x v (x ^ y) = x.
++\& end_of_list.
++.Ve
++.Sp
++.SH SEE ALSO
++.BR prover9 (1),
++.BR mace4 (1).
++.br
++Full documentation for \fBrewriter\fP is found in the \fBprover9\fP manual, available on Gentoo systems at \fI/usr/share/doc/prover9-2009.11a/html/index.html\fP.
++.SH AUTHOR
++\fBrewriter\fP was written by William McCune <mccune@cs.unm.edu>
++.PP
++This manual page was written by Peter Collingbourne <pcc03@doc.ic.ac.uk>,
++for the Debian project (but may be used by others).
diff --git a/sci-mathematics/prover9/metadata.xml b/sci-mathematics/prover9/metadata.xml
new file mode 100644
index 000000000000..7ff123879bf7
--- /dev/null
+++ b/sci-mathematics/prover9/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gienah@gentoo.org</email>
+ <name>Mark Wright</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Prover9 and Mace4 Prover9 is an automated theorem prover for
+ first-order and equational logic, and Mace4 searches for finite
+ models and counterexamples. Prover9 is the successor of the
+ Otter prover.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/prover9/prover9-2009.11a.ebuild b/sci-mathematics/prover9/prover9-2009.11a.ebuild
new file mode 100644
index 000000000000..56c2ad3a4132
--- /dev/null
+++ b/sci-mathematics/prover9/prover9-2009.11a.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs versionator
+
+MY_PN="LADR"
+typeset -u MY_PV
+MY_PV=$(replace_all_version_separators '-')
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="Automated theorem prover for first-order and equational logic"
+HOMEPAGE="http://www.cs.unm.edu/~mccune/mace4/"
+SRC_URI="
+ http://www.cs.unm.edu/~mccune/mace4/download/${MY_P}.tar.gz
+ https://dev.gentoo.org/~jlec/distfiles/${MY_PN}-2009-11A-makefile.patch.xz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-2"
+IUSE="examples"
+
+PATCHES=(
+ "${WORKDIR}"/${MY_PN}-2009-11A-makefile.patch
+ "${FILESDIR}"/${MY_PN}-2009-11A-manpages.patch
+ )
+
+S="${WORKDIR}/${MY_P}/"
+
+src_prepare() {
+ MAKEOPTS+=" -j1"
+ epatch "${PATCHES[@]}"
+ sed \
+ -e "/^CC =/s:gcc:$(tc-getCC):g" \
+ -i */Makefile || die
+}
+
+src_compile() {
+ emake all
+}
+
+src_install () {
+ dobin \
+ bin/attack \
+ bin/autosketches4 \
+ bin/clausefilter \
+ bin/clausetester \
+ bin/complex \
+ bin/directproof \
+ bin/dprofiles \
+ bin/fof-prover9 \
+ bin/gen_trc_defs \
+ bin/get_givens \
+ bin/get_interps \
+ bin/get_kept \
+ bin/gvizify \
+ bin/idfilter \
+ bin/interpfilter \
+ bin/interpformat \
+ bin/isofilter \
+ bin/isofilter0 \
+ bin/isofilter2 \
+ bin/ladr_to_tptp \
+ bin/latfilter \
+ bin/looper \
+ bin/mace4 \
+ bin/miniscope \
+ bin/mirror-flip \
+ bin/newauto \
+ bin/newsax \
+ bin/olfilter \
+ bin/perm3 \
+ bin/proof3fo.xsl \
+ bin/prooftrans \
+ bin/prover9 \
+ bin/renamer \
+ bin/rewriter \
+ bin/sigtest \
+ bin/test_clause_eval \
+ bin/test_complex \
+ bin/tptp_to_ladr \
+ bin/unfast \
+ bin/upper-covers
+
+ doman \
+ manpages/interpformat.1 \
+ manpages/isofilter.1 \
+ manpages/prooftrans.1 \
+ manpages/mace4.1 \
+ manpages/prover9.1 \
+ manpages/clausefilter.1 \
+ manpages/clausetester.1 \
+ manpages/interpfilter.1 \
+ manpages/rewriter.1 \
+ manpages/prover9-apps.1
+
+ dohtml ladr/index.html.master ladr/html/*
+
+ insinto /usr/$(get_libdir)
+ dolib.so ladr/.libs/libladr.so.4.0.0
+
+ dosym libladr.so.4.0.0 /usr/$(get_libdir)/libladr.so.4
+ dosym libladr.so.4.0.0 /usr/$(get_libdir)/libladr.so
+
+ dodir /usr/include/ladr
+ insinto /usr/include/ladr
+ doins ladr/*.h
+
+ if use examples; then
+ insinto /usr/share/${PN}/examples
+ doins prover9.examples/*
+
+ # The prover9-mace4 script is installed as an example script
+ # to avoid confusion with the GUI sci-mathematics/p9m4 prover9mace4.py
+ insinto /usr/share/${PN}/scripts
+ doins bin/prover9-mace4
+ fi
+}
diff --git a/sci-mathematics/pspp/Manifest b/sci-mathematics/pspp/Manifest
new file mode 100644
index 000000000000..b9ce5fbee537
--- /dev/null
+++ b/sci-mathematics/pspp/Manifest
@@ -0,0 +1,8 @@
+AUX 50pspp-gentoo.el 171 SHA256 92296e81ab389b4c639a67cd015e19d63cf8e40664a95fc568c2c6b6e7608940 SHA512 3e50a08018a0892df4beb400041ec682c94446b4e05ce7d5907ef20eace5426245e684160e85c8629650b8a911e92ef98200638dea1f12d0304fb4e1a8db5883 WHIRLPOOL b6193455db73c4cc90f4548179a77b8a10cbb8a3cdefede9834c4a4e4a9470d6e85474dbd411a8e0015d4b95f6c59574eff4036c7079bd1a1ad1c2c6aee7b482
+DIST pspp-0.10.1.tar.gz 7269109 SHA256 44cc08864de736880bc0d7e2b1f8c8493ac0e0c2164a4f9471077608f00c8677 SHA512 a7f4eec3858340743ff845e67028af76d79a58968ceaa19a87e0443751917b2d70251e53231ecce15c937c9640ac733e00603baa76b4266d693375ab70b870b5 WHIRLPOOL 9a195051d5279a86cd05d586ca5a845443f08346f47aec859a3e768c38d5517f23f47d40cc6fb00c6af6c01af624d251575edfb34dfb0f7c7ee3def1a008a1c7
+DIST pspp-0.10.2.tar.gz 7316470 SHA256 f77cacae6948689a60f1a5808a5d2e183c1cd0847c7fc6142646c63814c0daa9 SHA512 7d6656c03da46b088e87cba7a947d1e56031ff50d704be8201a38563515cf5cf324a05f1d4999ba8aec7b2269a8fdbd09374a11374c9c1b9dd6d78d34fda4b76 WHIRLPOOL f66f0ca98dce4de4b323aa42445d0c8fe3c7d252cd8ed6d1ad1dd961186bf063b9c92114a92e9afb2149b35c03fa595720c8a35b33ff81a56eb5e9e029c85119
+EBUILD pspp-0.10.1.ebuild 1661 SHA256 118265448d0a763a19748141872e605f62b9b75210bde7c9d3bdb93a051fe81e SHA512 3d973985731036f3d9c4858cd5aa58cd1159c64a2f5f4f6f7ec48f00034c4340a9cbfe203a90228529d2a4677004b5da69c488a1a2683224e5450d3ed276dd29 WHIRLPOOL f1c666bd44f0309b0dedb5c6f9b58a92606be747dbb6464d53f3b005f169f32bd2d125a54b0c7f3702fd49298f9d08b96c3b67279a877aefd98dbd9448491e71
+EBUILD pspp-0.10.2.ebuild 1663 SHA256 62006aa78bb694867abe80bece9749a19b1de40775cca77fd434b119b31bc6eb SHA512 0279462e9e548d042a50f92adf568aaccc8286c90146cc904a1ee2b962b320f229cf24d96fd23fb86fb2898781e7548586815266f16c94a868106db654f90b35 WHIRLPOOL edef9c8e47cb5169fe6a5e952b540905e3f7eb9166d13c282d17698d586bb67380a924693482da1b43d049eb306dba0007dfa3c1e9ea04dc74bd19343f9dd017
+MISC ChangeLog 3769 SHA256 266d1592970eba69499b422737dc9965c5c1e77618497b517a895d0c120fe721 SHA512 72116921fc2f1e51cef74008be1c339c897c69dd218adaa60ce2f3f4fc0f256828739e0527dd4a93abbe50eb1541b14046688973678e99fedcf15bfe0c8cb45d WHIRLPOOL a87c96babf2c23b3bd55a483607714e1c8ee2f4ef70056ecda52b42cad9e458fb179641b46381f5f896f13e6dbbf93eae05ed6afafbf41a76a4d6c0dbb012575
+MISC ChangeLog-2015 5628 SHA256 0cd86d46d257fad2be0857cdeda86cfe0929504a6e9c62935b17a3863e777157 SHA512 dcb9406ae5e9f69eb7d8803f9cd6907b48c0de9e2f696c8d0664a07ea330b001875d5c53d3f409495fd29ed77c390231e14230748e51c4dbade1bdf943d8abc1 WHIRLPOOL b2aec9bc44bcd830b8a2a476b8720121d7069fc3f04ec4377e6f60befd3ae9f93bd0eaa0d049dfd176cff9fc436eb4f1341f3739eb504f6783ffe998ac397b23
+MISC metadata.xml 712 SHA256 d3c78f8e06b94d5b91188033e33251ca25475c4ebbdc2f0a2095b122a3fa482c SHA512 a94036498ca6905c251617d7a60c295e0deca5199a6e9003e4e5df66f8d156aa397ca8428e7bb066860423acd2a317a4286bf2bc3e9655e7d361861a6b4e8acc WHIRLPOOL 31c1b23604853432f84e8a90f6650aad2a3b9e74ed9e5f291d3fa74e749e369b9f21c67e5cafc5c8d97b4c8dd76d3f56f4f8a7f0cba3cdd7f82c4891e886fa32
diff --git a/sci-mathematics/pspp/files/50pspp-gentoo.el b/sci-mathematics/pspp/files/50pspp-gentoo.el
new file mode 100644
index 000000000000..adac2e8ed1da
--- /dev/null
+++ b/sci-mathematics/pspp/files/50pspp-gentoo.el
@@ -0,0 +1,6 @@
+
+;;; pspp site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'pspp-mode "pspp-mode" nil t)
+(add-to-list 'auto-mode-alist '("\\.sps\\'" . pspp-mode))
diff --git a/sci-mathematics/pspp/metadata.xml b/sci-mathematics/pspp/metadata.xml
new file mode 100644
index 000000000000..4f8e8d04e96b
--- /dev/null
+++ b/sci-mathematics/pspp/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">
+ PSPP is a program for statistical analysis of sampled data. It
+ interprets commands in the SPSS language and produces tabular and
+ graphical output in ASCII, HTML, or PostScript format.
+ PSPP supports a large subset of SPSS's transformation language. Its
+ statistical procedure support is limited but growing.
+ PSPP has both text-based and a GTK+ based graphical user interfaces.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/pspp/pspp-0.10.1.ebuild b/sci-mathematics/pspp/pspp-0.10.1.ebuild
new file mode 100644
index 000000000000..f1d6cf513599
--- /dev/null
+++ b/sci-mathematics/pspp/pspp-0.10.1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils elisp-common
+
+DESCRIPTION="Program for statistical analysis of sampled data"
+HOMEPAGE="https://www.gnu.org/software/pspp/pspp.html"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="cairo doc emacs examples gtk ncurses nls perl postgres static-libs"
+
+RDEPEND="
+ dev-libs/libxml2:2=
+ sci-libs/gsl:0=
+ sys-devel/gettext:0=
+ sys-libs/readline:0=
+ sys-libs/zlib:0=
+ virtual/libiconv
+ cairo? ( x11-libs/cairo:0=[svg] )
+ emacs? ( virtual/emacs )
+ gtk? (
+ x11-libs/gtk+:3=
+ x11-libs/gtksourceview:3.0= )
+ ncurses? ( sys-libs/ncurses:0= )
+ postgres? ( dev-db/postgresql:=[server] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( virtual/latex-base )"
+
+SITEFILE=50${PN}-gentoo.el
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable static-libs static) \
+ $(use_with cairo) \
+ $(use_with gtk gui) \
+ $(use_with ncurses libncurses) \
+ $(use_with perl perl-module) \
+ $(use_with postgres libpq)
+}
+
+src_compile() {
+ default
+ use doc && emake html pdf
+ use emacs && elisp-compile *.el
+}
+
+src_install() {
+ default
+ if use doc; then
+ dodoc doc/pspp{,-dev}.pdf
+ insinto /usr/share/doc/${PF}/html
+ dodoc -r doc/pspp{,-dev}.html
+ fi
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+ if use emacs; then
+ elisp-install ${PN} *.el *.elc
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+ prune_libtool_files --all
+}
+
+pkg_postinst () {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/pspp/pspp-0.10.2.ebuild b/sci-mathematics/pspp/pspp-0.10.2.ebuild
new file mode 100644
index 000000000000..4492cc326fbb
--- /dev/null
+++ b/sci-mathematics/pspp/pspp-0.10.2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils elisp-common
+
+DESCRIPTION="Program for statistical analysis of sampled data"
+HOMEPAGE="https://www.gnu.org/software/pspp/pspp.html"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cairo doc emacs examples gtk ncurses nls perl postgres static-libs"
+
+RDEPEND="
+ dev-libs/libxml2:2=
+ sci-libs/gsl:0=
+ sys-devel/gettext:0=
+ sys-libs/readline:0=
+ sys-libs/zlib:0=
+ virtual/libiconv
+ cairo? ( x11-libs/cairo:0=[svg] )
+ emacs? ( virtual/emacs )
+ gtk? (
+ x11-libs/gtk+:3=
+ x11-libs/gtksourceview:3.0= )
+ ncurses? ( sys-libs/ncurses:0= )
+ postgres? ( dev-db/postgresql:=[server] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( virtual/latex-base )"
+
+SITEFILE=50${PN}-gentoo.el
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable static-libs static) \
+ $(use_with cairo) \
+ $(use_with gtk gui) \
+ $(use_with ncurses libncurses) \
+ $(use_with perl perl-module) \
+ $(use_with postgres libpq)
+}
+
+src_compile() {
+ default
+ use doc && emake html pdf
+ use emacs && elisp-compile *.el
+}
+
+src_install() {
+ default
+ if use doc; then
+ dodoc doc/pspp{,-dev}.pdf
+ insinto /usr/share/doc/${PF}/html
+ dodoc -r doc/pspp{,-dev}.html
+ fi
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+ if use emacs; then
+ elisp-install ${PN} *.el *.elc
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+ prune_libtool_files --all
+}
+
+pkg_postinst () {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/pymc/Manifest b/sci-mathematics/pymc/Manifest
new file mode 100644
index 000000000000..b6b91b7cd09c
--- /dev/null
+++ b/sci-mathematics/pymc/Manifest
@@ -0,0 +1,6 @@
+AUX pymc-2.3.6-remove-hardcoded-blas.patch 414 SHA256 041bec5d7eccff7e47438e228f030046dd1d442c17dc7f7118e58f2cfc82b190 SHA512 776ecd9876342215c925ad4a2dfa123e9f6656c6e5a8f3b8d208cc89befc84164b5355d4c1afce8be8962951c3343629cfacb0449d6d0b05d9333886803bbb4a WHIRLPOOL 7c979609c33cd1d86503293ceda1cc2771f4c504a26356e33b61897d7d379f38c312bc8237135256ef1ed49634adbf681611d952d6eb4c5b664dca4ae6c0a087
+DIST pymc-2.3.6.zip 402827 SHA256 70b00a9d722d9bba95d975f0a0836e41d8792b8d6fe0dd21b4af209747da3dc5 SHA512 4b5e0663ca296efd8d242a0b6362a12d475cdabf661a430de5455e60999acf8a4a30d053303c2f79e8aec3e5e7d120f56cb341e283aa87f31c224e4e57300d13 WHIRLPOOL 4a0774e0362baef7c6390ec499ba6f605766c614974f04bd9c04e78916b91e0e7f4d35d39e8ba002c654ad15c7158b8b670e6c7010eb1fd8513bfd43e0fe61db
+EBUILD pymc-2.3.6.ebuild 1303 SHA256 9265842164269b4c72750d04684080c85a8df344bfb4f7ac3689d3af7776ee5b SHA512 28d1d613dcbb25025bbf1cc3963af6afc495a8d201ab74d6ba05fb3e6455a5dfe13e480d5768b6d8a02c59764a858eda6c8e60da18739d9c7f0d7521d9115dcc WHIRLPOOL 6efe235202675cac9ff7455909a7ff0b856f57f8959974b9fb3f78bb28c4a8f491ec3397a307cc601393537f87c003b3e0cb1e3e296913aedf64baa1e50bce1e
+MISC ChangeLog 2949 SHA256 89815941f7f0985dc21a39f615084d2b1cc6d8d12f7e61e4c2e88d179b1cf00b SHA512 21c4ede1a8bbb8c6b19652465916916b064314558e3d4d5ae8a42925c2161a7e94901620dbcf35dea6a36358a1054a5e6e27e04bd1f8906772a0c6f20718c0e3 WHIRLPOOL 34dd173bf88708053c15ab9e327cc42c88c2f9fed17f14cf4e7029fa86a4fa4738bc4e5a6db0327f1f8cfedeeafacfde0fadc0dbe1e556d867e849976a3ad391
+MISC ChangeLog-2015 632 SHA256 8861fa0871d0830370195c3004083e79f19434d91a93da5021198858515f7856 SHA512 6c2f3597157f495662802d36f7e5215d15354d7cc186fb9ef3ce4a224fda6ebf9ace68e050ed1174de55e738cd0b46e77af0f3a835bdcb84376a492e25a7dd10 WHIRLPOOL 62dab4ea5544cd57fc16f78398a5b1ac3942057399934b244c3ed79dfa54889a6be076a8b150b4c950d54217a6fd93c1c347600f23d26ab9c1f346bcfca207b3
+MISC metadata.xml 554 SHA256 2dc5dbb5e5bdb7c2d515fda347795f52da76604c9e46ce48ecd5fee83714bb6c SHA512 0d9ac09e21100370ed731a23cbce01c73a734a4e2adb282a2c0cc185c75d011f3aeafc75283d27e30635f00cf7fb27a6a502e1a9cb922892d10016d6e9770d65 WHIRLPOOL f6a19c790e57c3620fb9dedacc83ccecfee7315824dbba9bfdca54c9949660c8cbf3e9ce439e4808bef3076882be6a4177fa1663e88e4b2d0d2c7afd6fb39ac5
diff --git a/sci-mathematics/pymc/files/pymc-2.3.6-remove-hardcoded-blas.patch b/sci-mathematics/pymc/files/pymc-2.3.6-remove-hardcoded-blas.patch
new file mode 100644
index 000000000000..93ce86f5c717
--- /dev/null
+++ b/sci-mathematics/pymc/files/pymc-2.3.6-remove-hardcoded-blas.patch
@@ -0,0 +1,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -80,7 +80,7 @@
+
+ # Compile covariance functions
+ config.add_extension(name='gp.cov_funs.isotropic_cov_funs',\
+-sources=['pymc/gp/cov_funs/isotropic_cov_funs.f','blas/BLAS/dscal.f'],\
++sources=['pymc/gp/cov_funs/isotropic_cov_funs.f'],\
+ extra_info=lapack_info)
+
+ config.add_extension(name='gp.cov_funs.distances',sources=['pymc/gp/cov_funs/distances.f'], extra_info=lapack_info)
diff --git a/sci-mathematics/pymc/metadata.xml b/sci-mathematics/pymc/metadata.xml
new file mode 100644
index 000000000000..0b8c7cb3f0e5
--- /dev/null
+++ b/sci-mathematics/pymc/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="person">
+ <email>heroxbd@gentoo.org</email>
+ <name>Benda Xu</name>
+ </maintainer>
+ <longdescription lang="en">
+PyMC is a python module that implements Bayesian statistical models
+and fitting algorithms, including Markov chain Monte Carlo.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">pymc-devs/pymc</remote-id>
+ <remote-id type="pypi">pymc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/pymc/pymc-2.3.6.ebuild b/sci-mathematics/pymc/pymc-2.3.6.ebuild
new file mode 100644
index 000000000000..dc48d2559a46
--- /dev/null
+++ b/sci-mathematics/pymc/pymc-2.3.6.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit distutils-r1 flag-o-matic fortran-2 toolchain-funcs
+
+DESCRIPTION="Markov Chain Monte Carlo sampling toolkit"
+HOMEPAGE="https://github.com/${PN}-devs/${PN} https://pypi.python.org/pypi/${PN}"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
+
+SLOT=0
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+LICENSE=AFL-3.0
+IUSE="test"
+
+RDEPEND=">=dev-python/numpy-1.6[${PYTHON_USEDEP},lapack]
+ >=dev-python/matplotlib-1.0[${PYTHON_USEDEP}]"
+DEPEND="
+ test? (
+ ${RDEPEND}
+ dev-python/nose[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=( "${FILESDIR}/${PN}-2.3.6-remove-hardcoded-blas.patch" )
+
+# tests freeze at some point
+#RESTRICT="test"
+
+python_prepare_all() {
+ # forcibly remove bundled libs, just to be sure...
+ rm -r blas || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_configure_all() {
+ append-fflags -fPIC
+ append-ldflags -shared
+
+ [[ $(tc-getFC) == *gfortran* ]] && mydistutilsargs=( config_fc --fcompiler=gnu95 )
+}
+
+python_test() {
+ distutils_install_for_testing
+ cd "${TEST_DIR}" || die
+ # Use agg backend instead of gtk
+ echo 'backend : agg' > matplotlibrc || die
+
+ ${EPYTHON} -c "import pymc; pymc.test()" || die "Tests failed on ${EPYTHON}"
+}
diff --git a/sci-mathematics/pymc3/Manifest b/sci-mathematics/pymc3/Manifest
new file mode 100644
index 000000000000..248ae83ce813
--- /dev/null
+++ b/sci-mathematics/pymc3/Manifest
@@ -0,0 +1,3 @@
+DIST pymc3-3.1.tar.gz 34553828 SHA256 218e412408cd5f0bc0e6984404bcaadd32f80c4ef523ac8718c1f0c3fd8c4e28 SHA512 30799d9c1b670adbcf5cc1463029d71a87c7b917e83b1f6cb453d75553616da7173421e7ae6e31b332c85f8170daea735344ff83ba6605cf3b15cf79c5c4fb97 WHIRLPOOL bbc2a7304926bbebbb06c358503ed0ebec7de20c171ea1123eb8a978a4a5407ecb6f0cc6055cd22c6a58571315ad3e877b6317d18b8b02794b4d6c7bade10b79
+EBUILD pymc3-3.1.ebuild 1576 SHA256 5f855cf790c3c3c7cb45e5b6f4741f5950e124c5bec28456728522e797dd3787 SHA512 eb20c0a83771615edd6a6f8227e592d7b4c6fe44ace96559129bae11dd373c308f7ed78a86d477799c2b792934f214a2d80fe2943f31b57776810a5cc953d25e WHIRLPOOL cb566665112c14b055a1b9c3e4b8817dae251b0b0a924235928a25d2c8925d98535251d4094f1ebb4ffe09075f15c5dd6db242544c5a2f929225b2a27b4d827b
+MISC metadata.xml 740 SHA256 2c415f75f2c38e18554b1a5eb504b11d5d7f28fff5eaedb53b846d955c9e7e0b SHA512 c75ed4b57479fef93c4b667792cb284212f859532697c4d4876e2dc23ab13d2c470143d3236de03e741a0797049a12d3a7e2f0d2ae4f07b2cfb0b7943c78526d WHIRLPOOL 2170597440ef3d68ab9f3714812d33e48221ec0af22e12b77843e1341b6e64e2f24ca12901cb1bfc89c9287adc3c6cefa4a3783079afe0138f761a66e781108c
diff --git a/sci-mathematics/pymc3/metadata.xml b/sci-mathematics/pymc3/metadata.xml
new file mode 100644
index 000000000000..4476cda6eeea
--- /dev/null
+++ b/sci-mathematics/pymc3/metadata.xml
@@ -0,0 +1,19 @@
+<?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">
+ PyMC3 is a Python package for Bayesian statistical modeling and
+ Probabilistic Machine Learning which focuses on advanced Markov
+ chain Monte Carlo and variational fitting algorithms. Its
+ flexibility and extensibility make it applicable to a large suite
+ of problems.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">pymc-devs/pymc3</remote-id>
+ <remote-id type="pypi">pymc3</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/pymc3/pymc3-3.1.ebuild b/sci-mathematics/pymc3/pymc3-3.1.ebuild
new file mode 100644
index 000000000000..0361603fbe9f
--- /dev/null
+++ b/sci-mathematics/pymc3/pymc3-3.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit distutils-r1 virtualx xdg-utils
+
+MYP=${P/_}
+S="${WORKDIR}/${MYP}"
+
+DESCRIPTION="Bayesian Modeling and Probabilistic Machine Learning in Python"
+HOMEPAGE="http://pymc-devs.github.io/pymc3/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MYP}.tar.gz"
+
+SLOT=0
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+LICENSE="AFL-3.0"
+
+IUSE="test"
+
+RDEPEND="
+ <=dev-python/CommonMark-0.5.4[${PYTHON_USEDEP}]
+ >=dev-python/joblib-0.9[${PYTHON_USEDEP}]
+ >=dev-python/numpy-1.11[${PYTHON_USEDEP},lapack]
+ >=dev-python/matplotlib-1.5[${PYTHON_USEDEP}]
+ dev-python/nbsphinx[${PYTHON_USEDEP}]
+ dev-python/numpydoc[${PYTHON_USEDEP}]
+ >=dev-python/pandas-0.18[${PYTHON_USEDEP}]
+ >=dev-python/patsy-0.4[${PYTHON_USEDEP}]
+ >=dev-python/recommonmark-0.4[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ >=dev-python/theano-0.9[${PYTHON_USEDEP}]
+ >=dev-python/tqdm-4.8.4[${PYTHON_USEDEP}]
+ >=sci-libs/scipy-0.12[${PYTHON_USEDEP}]
+ virtual/python-enum34[${PYTHON_USEDEP}]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/cython[${PYTHON_USEDEP}]
+ test? (
+ ${RDEPEND}
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/nose-parameterized[${PYTHON_USEDEP}]
+ )
+"
+
+DOCS=(CHANGELOG.md CONTRIBUTING.md RELEASE-NOTES.md
+ CONDUCT.md GOVERNANCE.md README.rst)
+
+python_prepare_all() {
+ xdg_environment_reset
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ echo 'backend: agg' > matplotlibrc || die
+ virtx esetup.py test
+}
diff --git a/sci-mathematics/qtoctave/Manifest b/sci-mathematics/qtoctave/Manifest
new file mode 100644
index 000000000000..777369f09e99
--- /dev/null
+++ b/sci-mathematics/qtoctave/Manifest
@@ -0,0 +1,14 @@
+AUX qtoctave-0.10.1-build-out-of-source.patch 754 SHA256 3ef37bcc3c348fb8c7f2c12db221137cbcd1c62933156a12a6d04ba350e3196b SHA512 f1f02efdaf28ae7b40146ac2526e5518e1fa9e871dcff3ec24fdf5f1ef5592d3cb3023d4d9dcc89837119c53222897bdf6a3a79bbab7f38b3f5c5802e70e8ba6 WHIRLPOOL e9826ee5165543765caa4d898a96c0758ea46dd1d08aab9d6604edd7c6a6583835e82bce229c81995ccb65bde8c260fefa026de48bfafc60bb86f3aea22e5e73
+AUX qtoctave-0.10.1-build-widgetserver.patch 2516 SHA256 2fe0cde5ebdf6844eb9794a9f71e6f8a63750801e4d56640176f6af0ccf9131f SHA512 41169582372f0aed15efd3eaaea953c96da7b29a173eceb2807536c12fd85b13f38743601fa14a6c886dedb46457641bab41c3035ca93fda050187929111a15e WHIRLPOOL 4e086cf96486b779f501ccfa2ed10036e6abae903eb435a94edc1f6c829e62d8b47d2a6671685e7beed05f4309e800efe1cf8a57f424ad30577c2857db19bc84
+AUX qtoctave-0.10.1-desktop-file.patch 325 SHA256 904ed122df2567cd1bd4ea8f44ee84d2c2023b4eeae3e937b9d8b3ec31da8659 SHA512 d4040d70a6f15afcb8fc2c9cdeb343fcdedbee877a8baa8a3c025d66f26a34c4006e8c304dba54c7cd0928719141b1e5d990ecd1d68f000e8ab0b30c61c2cb54 WHIRLPOOL 01f877833ed66eb9264cd33c675dc3b0720b92a764cb5f7cedd9311723a1bafaf899be1abedf976ecec30a1c8903167999dae4d5961ce721ddddf9606e94e027
+AUX qtoctave-0.10.1-doc-path.patch 2215 SHA256 0771e7122fd6a07929cbc3c0e8b4ce9f19a1688bf336a0ed3db02d7c5d95e9c6 SHA512 144600cb25254ba258cd0b0e81031e13df068afc273734946fe4a7a48a5209beed2f591df353cd2b9dcf91123d26a081ff8ed9cfeb2d194a66a2b4267e5b1860 WHIRLPOOL 12b58c7f075cefbc895c2d947b23620c045e1c9eb0cf7adbf3631f449c871ecaa377baaef5c773167109adc4f69b3d2adcc1f412679f947995cda0106dd8292b
+AUX qtoctave-0.10.1-filedialog-filters.patch 1024 SHA256 0ac2f752a2d769cc69416d70ae9bde96997475360e82df23e5e944d7a79bf8ec SHA512 40bdd2f6d241749ea9df8d01394bab986b04c6ab8fd6ee422970d245a421a918de64517cff1f36754cdafb709e29335963cab748085aeb42765e6a4e6b3ca0ce WHIRLPOOL 2fdbe3c4ea7751c771306442fa72a6e0f962d3f889efcdc881a120b3a52bdbf75c132c7ae95b4d4d038495b17566c05526816c219ab7d146fbc5c6b870f3d430
+AUX qtoctave-0.10.1-initial_position.patch 2132 SHA256 dbb356f36e8533ee8a603c90a73c11eb974fa32c59aca8ba5bdd36a29b4c2933 SHA512 958268a7dea55ffbe5bc0f15c9d75018f246cbadfb94b864a88b8124b58f88cb012a3711e7fb4ad0ed7d0b8e6b5acc479e70bfbda7b70845b794ac9c65b8b0a5 WHIRLPOOL 51550514b3282295047f26ed1dbf174f596963cf2968858bf6d982ab3ad3398e80dae3115c37c45c8bcbcdd59c0a59ed31fded2e80c02bfd9bc6b999cd85c012
+AUX qtoctave-0.10.1-no-native-menubars.patch 1756 SHA256 e812de7110f79599d07c880d558ada48ffbfc11e083ff66fd36be1981dddbf19 SHA512 aada2d650ecb0072cd013eab2993820b7a4744506f19d3c64148a10f4f9493101221c9cf2de3ff99a1cc1280a7719fd10ca4cf5341bfc5e778e268c971d9edb6 WHIRLPOOL 1751e4f988eb4fd259789120a1c451ef669fb178edc8d0fe33b0fe9991ba73c3e5d7456b24fc0099445f0b1261afb2668ac6ab62cbf64bf469f5fceaf3e744f3
+AUX qtoctave-0.10.1-qtinfo-octave3.4.patch 508 SHA256 b582d74141ea2596b52ae2b4ae3e7a0c3959069dc0773d6a60c94913101f00b3 SHA512 1bc3193a327d213ddcd252f07597cecdbc6ec065eb2c326694acb79f5745971de46a146ead40a50d64e73f38ab61377cb5b9387ab049bd81c869cef993be6dcb WHIRLPOOL ea072b80d3c4ba4e1c662fc6c7f1ad6e18f458d15386d2b1fdbfe75f66e76a02641cb720ac97433d46d164e5fc6a0a229c8b095b0188e49f99e402a6378d2057
+AUX qtoctave-0.10.1-use_octave_htmldoc.patch 1185 SHA256 ceb7f8fdc7a9616617f21d19ce733556dc44d3f61e95cdb58f63b6cd24a4ccda SHA512 43fe58a6987b168d5582234b5e8e747d2e426dfc88b57c8f79acd3feb744c96b570a07ed8928465fee721f3da62ec62ff462b0bc43b4c8325feb5ab93bb817cf WHIRLPOOL b5d04ed254937c19736b19bf9b2932ea238a8184c59150ba84b123b1c70d16682afe1e8ddd32ea8d4e6ce11744637bb21534bd386878f8484aff8620d3bb3e1f
+DIST qtoctave-0.10.1.tar.gz 4215812 SHA256 4abd367924964887ea691f93c2c8ec90dcc64eb22827893dfb506ae43331b732 SHA512 b91e59ba9f16ebc2da9f2d606d0e7440d06e13cd6670fb7aa896eb30ad43835df74b7ba5127f1e9095c88de2468c6d2b2c174f1c5b1638678968bf81647b665f WHIRLPOOL fc5e3058bf18dcfe1f12315a37d07d4e80b76d6efaaf5c7f1b3622dd2ec6bb8277a76c19f45ce20a00a733db897ba839e23254c55b9cd41664d917a8c54bd097
+EBUILD qtoctave-0.10.1-r1.ebuild 1161 SHA256 d8148d3ed7fc41cb196c0c2e9f0e4339012244f0acf3fe0d75a0d8a5cfb255c2 SHA512 08f25df1a53b52a9393be10fbae9b3c4006aa6c9c4220f3b435b6bd8da3be2c5f098d2e5f99638991a1e1a4b7cb9f132ffb7b857950a1f2d5d2fe263229836fb WHIRLPOOL 9c05d53cc6678bc1f16cb828086d47387036aeafc552cff75f4ad8f7c3d20e1453118c3fb60e80450908f8cb77e1bbdb4d2bfcbf3d303f4e1a5ed933b07c7514
+MISC ChangeLog 3278 SHA256 62cb6472b9dbd65be35cb565d80f2e6bb1b1c755d362b399ad23e190e6440333 SHA512 d400760e9f0d22f858b9e171be6d283228aaad631662de203bcdff1b7bb4d161c074cc7743230ddb7995ab27311c88c5f82e0f34a2f98f7f507e2c471c684e51 WHIRLPOOL 359e44d88e3abf20af008fd0fcc71dad4838b8c12039a954bc457c641d34b4131faae5cbb6b63348dfd51f4c05477149da1bea2b85defcf3b9100c72e09e79f3
+MISC ChangeLog-2015 4683 SHA256 5724ca9bf3d12b6526ba60ab74963bd3b046838327844bf77d4875eeb4b69930 SHA512 5eeb65aea8b3115e40ea210b88be99ee7e612db2f8f823a19b534a58ab6dba321962cecc1458d04a8771669d5f95e3f212475edb55ed48b6542d34bcf5844e89 WHIRLPOOL b48fc594461673da8a2ea60f61fb1ba6623bd4e538a1ece7c2d021967219207007e223e10bb38ff6f96d0283f014eb03a0e0179d881f6fd15d6a66be013cc804
+MISC metadata.xml 668 SHA256 6095d80fd55fb5279d7ffc6c9027e87a182dc10738e4223096a05ae359c0cf70 SHA512 7c451489e7c3f6ed69124913b3360d6b1f300e0baa675eba34968d4e33bb0165bf3e39526b3ae6541e31a5c7558b666c4c46479622137fcc83060b00e93ba184 WHIRLPOOL 5210e0b3cfe9c97baac41c28016274d431aea5013545f48c7b7c33e55f6b4ca64dd1a81293cf155d1199facf892198536a3c7016a71b6efd41accb7a6935f89c
diff --git a/sci-mathematics/qtoctave/files/qtoctave-0.10.1-build-out-of-source.patch b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-build-out-of-source.patch
new file mode 100644
index 000000000000..e4e7ad9f6a69
--- /dev/null
+++ b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-build-out-of-source.patch
@@ -0,0 +1,20 @@
+From: Thomas Weber <tweber@debian.org>
+Description: Remove configure.h to enable correct out-of-source builds
+ The file is included in the upstream tarball due to the way the release
+ tarball is generated.
+Forwarded: not-needed
+
+--- a/qtoctave/src/configure.h
++++ /dev/null
+@@ -1,11 +0,0 @@
+-
+-#ifndef __CONFIGURE_H__
+-#define __CONFIGURE_H__
+-#define CONFIG_PATH "/opt/qtoctave/share/qtoctave"
+-#define HELP_PATH "/opt/qtoctave/share/doc/octave-html/octave_doc/index.html"
+-#define ICON_PATH "/opt/qtoctave/share/qtoctave/images"
+-#define LANG_PATH "/opt/qtoctave/share/qtoctave/lang"
+-#define QTOCTAVE_HELP_PATH "/opt/qtoctave/share/doc/qtoctave/qtoctave_doc/index.html"
+-
+-#define PKG_CMD_PATH "/opt/qtoctave/share/qtoctave/pkg-commands.list"
+-#endif
diff --git a/sci-mathematics/qtoctave/files/qtoctave-0.10.1-build-widgetserver.patch b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-build-widgetserver.patch
new file mode 100644
index 000000000000..17d92a61d5f2
--- /dev/null
+++ b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-build-widgetserver.patch
@@ -0,0 +1,98 @@
+From: Jordi Gutiérrez Hermoso <jordigh@gmail.com>
+Subject: widgetserver wasn't included in newer CMake build, this fixes this
+Forwarded: http://lists.alioth.debian.org/pipermail/pkg-octave-devel/2010-June/007430.html
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -38,6 +38,7 @@
+
+ add_subdirectory (qtoctave_pkg/src)
+ add_subdirectory (xmlwidget/qt4)
++add_subdirectory (widgetserver)
+ add_subdirectory (easy_plot)
+ add_subdirectory (simple_rcs)
+ add_subdirectory (qtjs)
+--- /dev/null
++++ b/widgetserver/CMakeLists.txt
+@@ -0,0 +1,11 @@
++add_subdirectory(widgetserver)
++
++install(
++ DIRECTORY doc
++ DESTINATION share/doc/qtoctave-utils/widgetserver
++)
++
++install(
++ FILES "leeme.txt" "readme.txt"
++ DESTINATION share/doc/qtoctave-utils/widgetserver
++)
+--- /dev/null
++++ b/widgetserver/widgetserver/CMakeLists.txt
+@@ -0,0 +1,48 @@
++FIND_PACKAGE(Qt4 REQUIRED)
++
++MESSAGE (STATUS "Use file: ${QT_USE_FILE}")
++
++SET(QT_USE_QTXML 1)
++
++include(UseQt4)
++
++include_directories(${QT_INCLUDE_DIR})
++include_directories(${QT_QT_INCLUDE_DIR})
++include_directories(${QT_QTCORE_INCLUDE_DIR})
++include_directories(${QT_QTGUI_INCLUDE_DIR})
++include_directories(${QT_QTXML_INCLUDE_DIR})
++include_directories(${CMAKE_CURRENT_BINARY_DIR})
++include_directories(${QT_QTSCRIPT_INCLUDE_DIR})
++include_directories(${QT_QTUITOOLS_INCLUDE_DIR})
++
++FILE(GLOB widgetserver_moc_headers *.h )
++FILE(GLOB widgetserver_sources *.cpp )
++
++# run moc on these files:
++QT4_WRAP_CPP( widgetserver_moc_sources ${widgetserver_moc_headers} )
++
++add_executable(widgetserver
++ ${widgetserver_sources} ${widgetserver_moc_sources} ${widgetserver_moc_headers}
++)
++
++SET_TARGET_PROPERTIES(widgetserver
++ PROPERTIES INSTALL_RPATH ":usr/lib"
++ BUILD_WITH_INSTALL_RPATH true
++ INSTALL_RPATH_USE_LINK_PATH true
++)
++
++TARGET_LINK_LIBRARIES(widgetserver
++ ${Qt4_LIBRARIES}
++ ${QT_QTCORE_LIBRARY}
++ ${QT_QTGUI_LIBRARY}
++ ${QT_QTXML_LIBRARY}
++ ${QT_QTSCRIPT_LIBRARY}
++ ${QT_QTUITOOLS_LIBRARY}
++)
++
++
++install (
++ TARGETS widgetserver
++ RUNTIME DESTINATION bin
++ )
++
+--- a/widgetserver/widgetserver/input.h
++++ b/widgetserver/widgetserver/input.h
+@@ -4,6 +4,7 @@
+ #include <QThread>
+ #include "process.h"
+ #include "buffer.h"
++#include <cstdio>
+
+ class Input:public QThread
+ {
+--- a/widgetserver/widgetserver/process.h
++++ b/widgetserver/widgetserver/process.h
+@@ -5,6 +5,7 @@
+ #include <QMap>
+ #include <QWidget>
+ #include <QBuffer>
++#include <cstdio>
+
+
+ class Widget: public QObject
diff --git a/sci-mathematics/qtoctave/files/qtoctave-0.10.1-desktop-file.patch b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-desktop-file.patch
new file mode 100644
index 000000000000..b48a3c215737
--- /dev/null
+++ b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-desktop-file.patch
@@ -0,0 +1,8 @@
+--- qtoctave/src/config_files/qtoctave.desktop.orig 2013-07-16 11:26:02.619168052 -0700
++++ qtoctave/src/config_files/qtoctave.desktop 2013-07-16 11:25:54.316124742 -0700
+@@ -4,4 +4,4 @@
+ Icon=qtoctave
+ Exec=qtoctave
+ Type=Application
+-Categories=Education;Science;Math;Qt;
++Categories=Development;Education;Science;Math;Qt;
diff --git a/sci-mathematics/qtoctave/files/qtoctave-0.10.1-doc-path.patch b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-doc-path.patch
new file mode 100644
index 000000000000..481520b5c656
--- /dev/null
+++ b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-doc-path.patch
@@ -0,0 +1,64 @@
+--- qtoctave-0.10.1/qtjs/CMakeLists.txt 2011-01-06 23:48:05.000000000 +0200
++++ qtoctave-0.10.1/qtjs/CMakeLists.txt 2011-02-06 18:16:37.000000000 +0200
+@@ -2,10 +2,5 @@
+
+ install(
+ DIRECTORY doc
+- DESTINATION share/doc/qtoctave-utils/qtjs
++ DESTINATION share/qtoctave/qtjs
+ )
+-
+-install(
+- FILES "instalar.txt" "install.txt"
+- DESTINATION share/doc/qtoctave-utils/qtjs
+-)
+\ No newline at end of file
+--- qtoctave-0.10.1/qtoctave/src/CMakeLists.txt 2011-01-06 23:48:07.000000000 +0200
++++ qtoctave-0.10.1/qtoctave/src/CMakeLists.txt 2011-02-06 18:15:41.000000000 +0200
+@@ -74,7 +74,7 @@
+
+ install (
+ DIRECTORY qtoctave_doc
+- DESTINATION share/doc/qtoctave
++ DESTINATION share/qtoctave
+ PATTERN ".svn" EXCLUDE
+ )
+
+--- qtoctave-0.10.1/qtoctave/src/configure.h.in 2011-01-06 23:48:06.000000000 +0200
++++ qtoctave-0.10.1/qtoctave/src/configure.h.in 2011-02-06 18:15:41.000000000 +0200
+@@ -5,7 +5,7 @@
+ #define HELP_PATH "${CMAKE_INSTALL_PREFIX}/share/doc/octave-html/octave_doc/index.html"
+ #define ICON_PATH "${CMAKE_INSTALL_PREFIX}/share/qtoctave/images"
+ #define LANG_PATH "${CMAKE_INSTALL_PREFIX}/share/qtoctave/lang"
+-#define QTOCTAVE_HELP_PATH "${CMAKE_INSTALL_PREFIX}/share/doc/qtoctave/qtoctave_doc/index.html"
++#define QTOCTAVE_HELP_PATH "${CMAKE_INSTALL_PREFIX}/share/qtoctave/qtoctave_doc/index.html"
+
+ #define PKG_CMD_PATH "${CMAKE_INSTALL_PREFIX}/share/qtoctave/pkg-commands.list"
+ #endif
+--- qtoctave-0.10.1/simple_rcs/CMakeLists.txt 2011-01-06 23:48:06.000000000 +0200
++++ qtoctave-0.10.1/simple_rcs/CMakeLists.txt 2011-02-06 18:15:41.000000000 +0200
+@@ -17,6 +17,6 @@
+
+ install(
+ DIRECTORY design
+- DESTINATION share/doc/qtoctave-utils/simple_rcs
++ DESTINATION share/qtoctave/simple_rcs
+ PATTERN ".svn" EXCLUDE
+ )
+\ No newline at end of file
+--- qtoctave-0.10.1/xmlwidget/CMakeLists.txt 2011-01-06 23:48:06.000000000 +0200
++++ qtoctave-0.10.1/xmlwidget/CMakeLists.txt 2011-02-06 18:15:41.000000000 +0200
+@@ -2,10 +2,10 @@
+
+ install(
+ DIRECTORY doc
+- DESTINATION share/doc/qtoctave-utils/xmlwidget
++ DESTINATION share/qtoctave/xmlwidget
+ )
+
+ install(
+ DIRECTORY examples
+- DESTINATION share/doc/qtoctave-utils/xmlwidget
++ DESTINATION share/qtoctave/xmlwidget
+ )
+\ No newline at end of file
diff --git a/sci-mathematics/qtoctave/files/qtoctave-0.10.1-filedialog-filters.patch b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-filedialog-filters.patch
new file mode 100644
index 000000000000..ddee96afc906
--- /dev/null
+++ b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-filedialog-filters.patch
@@ -0,0 +1,37 @@
+Description: Fix *.m filename filters in file dialogs
+ Not forwarded to upstream since upstream author stopped development.
+Author: Sébastien Villemot <sebastien@debian.org>
+Bug-Debian: http://bugs.debian.org/620062
+Forwarded: no
+Last-Update: 2011-08-21
+--- a/qtoctave/src/editor.cpp
++++ b/qtoctave/src/editor.cpp
+@@ -295,7 +295,7 @@
+ {
+ QStringList filters;
+
+- filters << "Octave (*.m; *.M)"
++ filters << "Octave (*.m *.M)"
+ << "Plain text (*.txt)"
+ << "All files (*)";
+
+@@ -475,7 +475,7 @@
+ QFileDialog openDialog(this, tr("Open") /*Qt::Dialog*/);
+
+ QStringList filters;
+- filters << "Octave (*.m; *.M)"
++ filters << "Octave (*.m *.M)"
+ << "Plain text (*.txt)"
+ << "All files (*)";
+
+--- a/qtoctave/src/main.cpp
++++ b/qtoctave/src/main.cpp
+@@ -308,7 +308,7 @@
+ QFileDialog openDialog(NULL, tr("Open"), ".");
+ QStringList filters;
+
+- filters << "Octave (*.m; *.M)";
++ filters << "Octave (*.m *.M)";
+
+ openDialog.setFilters(filters);
+ openDialog.setAcceptMode(QFileDialog::AcceptOpen);
diff --git a/sci-mathematics/qtoctave/files/qtoctave-0.10.1-initial_position.patch b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-initial_position.patch
new file mode 100644
index 000000000000..cd97291a9bd5
--- /dev/null
+++ b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-initial_position.patch
@@ -0,0 +1,61 @@
+Description: Fix crash when closing a dock tool within the first 5 seconds
+ (a NULL pointer dereference caused by a race condition between the user
+ closing the tool and the timer setting the initial positions, prevented by
+ using a QWeakPointer instead of a raw QWidget *)
+Author: Kevin Kofler <kevin.kofler@chello.at>
+Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=722986
+Forwarded: no
+Last-Update: 2011-10-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+diff -ur qtoctave-0.10.1/qtoctave/src/main.cpp qtoctave-0.10.1-initialposition/qtoctave/src/main.cpp
+--- qtoctave-0.10.1/qtoctave/src/main.cpp 2011-01-06 22:48:07.000000000 +0100
++++ qtoctave-0.10.1-initialposition/qtoctave/src/main.cpp 2011-10-06 20:17:03.000000000 +0200
+@@ -595,7 +595,7 @@
+ initPos.maximized=maximized;
+ initPos.minimized=minimized;
+ initPos.widget=bw->parentWidget();
+- if(initPos.widget!=NULL)
++ if(!initPos.widget.isNull())
+ initialPositionList.append(initPos);
+ //bw->show();
+ //bw->move(x,y);
+@@ -694,10 +694,14 @@
+ {
+ foreach(InitialPosition i, initialPositionList)
+ {
+- i.widget->move(i.x,i.y);
+- i.widget->resize(i.width, i.height);
+- if(i.maximized) i.widget->showMaximized();
+- if(i.minimized) i.widget->showMinimized();
++ QWidget *widget = i.widget.data();
++ if (widget)
++ {
++ widget->move(i.x,i.y);
++ widget->resize(i.width, i.height);
++ if(i.maximized) widget->showMaximized();
++ if(i.minimized) widget->showMinimized();
++ }
+ }
+ }
+
+diff -ur qtoctave-0.10.1/qtoctave/src/main.h qtoctave-0.10.1-initialposition/qtoctave/src/main.h
+--- qtoctave-0.10.1/qtoctave/src/main.h 2011-01-06 22:48:08.000000000 +0100
++++ qtoctave-0.10.1-initialposition/qtoctave/src/main.h 2011-10-06 20:12:55.000000000 +0200
+@@ -27,6 +27,7 @@
+ #include <QListWidget>
+ #include <QTimer>
+ #include <QVector>
++#include <QWeakPointer>
+ #include "mainwindow.h"
+ #include "octave_connection.h"
+ #include "terminal.h"
+@@ -41,7 +42,7 @@
+ struct InitialPosition
+ {
+ int x, y, width, height;
+- QWidget *widget;
++ QWeakPointer<QWidget> widget;
+ bool maximized, minimized;
+ };
+
diff --git a/sci-mathematics/qtoctave/files/qtoctave-0.10.1-no-native-menubars.patch b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-no-native-menubars.patch
new file mode 100644
index 000000000000..677b5e5ed817
--- /dev/null
+++ b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-no-native-menubars.patch
@@ -0,0 +1,35 @@
+Description: Do not export docked window menubars to desktop panel
+Author: Aurélien Gâteau <aurelien.gateau@canonical.com>
+Forwarded: Sent to http://groups.google.com/group/qtoctave-english
+Bug-Ubuntu: https://bugs.launchpad.net/appmenu-qt/+bug/673210
+Index: qtoctave-0.10.1/qtoctave/src/basewidget.cpp
+===================================================================
+--- qtoctave-0.10.1.orig/qtoctave/src/basewidget.cpp 2011-01-06 22:48:07.000000000 +0100
++++ qtoctave-0.10.1/qtoctave/src/basewidget.cpp 2011-09-14 11:03:11.000000000 +0200
+@@ -30,6 +30,7 @@
+ //setFocusPolicy(Qt::StrongFocus);
+ session=NULL;
+ QWidget *central=new QWidget(this);
++ menuBar()->setNativeMenuBar(false);
+ setCentralWidget(central);
+
+ QMenu *windows_menu=menuBar()->addMenu(tr("View"));
+Index: qtoctave-0.10.1/qtoctave/src/mainwindow.cpp
+===================================================================
+--- qtoctave-0.10.1.orig/qtoctave/src/mainwindow.cpp 2011-01-06 22:48:07.000000000 +0100
++++ qtoctave-0.10.1/qtoctave/src/mainwindow.cpp 2011-09-14 12:03:14.000000000 +0200
+@@ -39,7 +39,13 @@
+ setSession(session);
+ setWindowIcon(QIcon(QString(ICON_PATH) + "/qtoctave.png"));
+
+- menuBar()->clear();
++ //The menubar provided by BaseWidget is set as not-native to avoid showing up
++ //in top-panel menubars on desktops like Unity, but we want a native menubar
++ //here, and we also want to get rid of the generic "View" item BaseWidget
++ //added to the menubar. Setting a new menubar is the simplest way to do this
++ //(the old one gets deleted).
++ //[1] https://bugs.launchpad.net/appmenu-qt/+bug/673210
++ setMenuBar(new QMenuBar());
+
+ setWindowTitle("QtOctave ["+session->getProjectName()+"]");
+ //resize(QSize(800, 600).expandedTo(minimumSizeHint()));
diff --git a/sci-mathematics/qtoctave/files/qtoctave-0.10.1-qtinfo-octave3.4.patch b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-qtinfo-octave3.4.patch
new file mode 100644
index 000000000000..5d8824789894
--- /dev/null
+++ b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-qtinfo-octave3.4.patch
@@ -0,0 +1,15 @@
+Description: Make qtinfo compatible with Octave >= 3.4
+Origin: upstream, commit: 282
+Forwarded: not-needed
+Last-Update: 2012-03-11
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/qtoctave/src/scripts_octave/qtinfo.m
++++ b/qtoctave/src/scripts_octave/qtinfo.m
+@@ -1,5 +1,5 @@
+ function qtinfo()
+ command=sprintf("qtoctave-info-reader %s > /dev/null", info_file);
+ printf("Starting info: %s\n", command);
+- system(command, 1, "async");
++ system(command, 0, "async");
+ endfunction
diff --git a/sci-mathematics/qtoctave/files/qtoctave-0.10.1-use_octave_htmldoc.patch b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-use_octave_htmldoc.patch
new file mode 100644
index 000000000000..08eeb9c52e34
--- /dev/null
+++ b/sci-mathematics/qtoctave/files/qtoctave-0.10.1-use_octave_htmldoc.patch
@@ -0,0 +1,34 @@
+Description: Update Octave's HTML doc path to use octave-htmldoc
+ Also, avoid failure on nonexistent path to upstream stripped HTML files.
+Author: Thomas Weber <tweber@debian.org>
+Author: Sébastien Villemot <sebastien@debian.org>
+Last-Update: 2012-03-11
+Forwarded: not-needed
+--- a/qtoctave/src/configure.h.in
++++ b/qtoctave/src/configure.h.in
+@@ -2,7 +2,7 @@
+ #ifndef __CONFIGURE_H__
+ #define __CONFIGURE_H__
+ #define CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/share/qtoctave"
+-#define HELP_PATH "${CMAKE_INSTALL_PREFIX}/share/doc/octave-html/octave_doc/index.html"
++#define HELP_PATH "${CMAKE_INSTALL_PREFIX}/share/doc/octave-htmldoc/interpreter/index.html"
+ #define ICON_PATH "${CMAKE_INSTALL_PREFIX}/share/qtoctave/images"
+ #define LANG_PATH "${CMAKE_INSTALL_PREFIX}/share/qtoctave/lang"
+ #define QTOCTAVE_HELP_PATH "${CMAKE_INSTALL_PREFIX}/share/doc/qtoctave/qtoctave_doc/index.html"
+--- a/qtoctave/src/CMakeLists.txt
++++ b/qtoctave/src/CMakeLists.txt
+@@ -64,14 +64,6 @@
+ DESTINATION share/qtoctave/lang
+ )
+
+-
+-
+-install (
+- DIRECTORY octave_doc
+- DESTINATION share/doc/octave-html
+- PATTERN ".svn" EXCLUDE
+- )
+-
+ install (
+ DIRECTORY qtoctave_doc
+ DESTINATION share/doc/qtoctave
diff --git a/sci-mathematics/qtoctave/metadata.xml b/sci-mathematics/qtoctave/metadata.xml
new file mode 100644
index 000000000000..c4c5e08b7a66
--- /dev/null
+++ b/sci-mathematics/qtoctave/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">
+ Besides offering an attractive front-end to GNU Octave, an
+ environment for numerical computation highly compatible with MATLAB,
+ QtOctave currently also features matrix data entry and display and
+ some GUI shortcuts to frequently used Octave functions. It also
+ offers access in place to Octave's documentation with octave-htmldoc
+ or octave-info.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/qtoctave/qtoctave-0.10.1-r1.ebuild b/sci-mathematics/qtoctave/qtoctave-0.10.1-r1.ebuild
new file mode 100644
index 000000000000..72efb864e808
--- /dev/null
+++ b/sci-mathematics/qtoctave/qtoctave-0.10.1-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+PID=2054
+
+DESCRIPTION="Qt4 front-end for Octave"
+HOMEPAGE="http://forja.rediris.es/projects/csl-qtoctave/"
+SRC_URI="http://forja.rediris.es/frs/download.php/${PID}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE=""
+
+CDEPEND="
+ || ( ( >=dev-qt/qtgui-4.8.5:4 dev-qt/designer:4 ) <dev-qt/qtgui-4.8.5:4 )
+ >=dev-qt/qtsvg-4.6:4"
+RDEPEND="${CDEPEND}
+ sci-mathematics/octave"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+
+DOCS=(readme.txt leeme.txt)
+
+PATCHES=(
+ "${FILESDIR}"/${P}-build-out-of-source.patch
+ "${FILESDIR}"/${P}-build-widgetserver.patch
+ "${FILESDIR}"/${P}-doc-path.patch
+ "${FILESDIR}"/${P}-filedialog-filters.patch
+ "${FILESDIR}"/${P}-initial_position.patch
+ "${FILESDIR}"/${P}-no-native-menubars.patch
+ "${FILESDIR}"/${P}-qtinfo-octave3.4.patch
+ "${FILESDIR}"/${P}-use_octave_htmldoc.patch
+ "${FILESDIR}"/${P}-desktop-file.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_SKIP_INSTALL_RPATH=ON
+ -DCMAKE_SKIP_RPATH=ON
+ )
+ cmake-utils_src_configure
+}
diff --git a/sci-mathematics/reduce/Manifest b/sci-mathematics/reduce/Manifest
new file mode 100644
index 000000000000..5a65f84ff6b0
--- /dev/null
+++ b/sci-mathematics/reduce/Manifest
@@ -0,0 +1,8 @@
+AUX 64reduce-gentoo.el 215 SHA256 f5a36df7b436104b4ed133edd02a261163f39ee265d2fb19214ab940c159dd23 SHA512 f2549e91ae3b48c4e90c7f2d4d05779d8d2df67ccffda64387f08e2a8aefbf4ffba336ca0a8b2d00ec6d5533ad9049452f4862e22177344479eec6ca709a8398 WHIRLPOOL 68673bb77e10ad9a5e1206804fd821473d27827a620ddffc018d2127fb413f7e4167e9c5eefbf4bc6d600913bba52ccab40b6f75ee0f7988978293cf893dc5e3
+AUX csl 38 SHA256 d99f85be4783179534d8c805f839d66b75671caa21516a6ba7497fd9639bd68b SHA512 3e492f318f8754d365d8aa711419e091760db547769cd6567ce4da1190379ed97b14e741ea7907646728002520229f683fda1b560c8de4777a9fcef0759bd738 WHIRLPOOL a54963acd7b1e650a6bb693472bd527d9bf7a3cd9f1d9e48bfcb1ca8bdcdab6af16fe24d63157119b6f51182092bf129e7979b5a31bb769ce69dc4d2ea7bba07
+AUX redcsl 41 SHA256 bd76b9bc8eb3ea6445793db744c5d2833e4f777242996e597f9015ad983ee8ba SHA512 c8281a9e30017fd4695bc6f41d30d92a73588ca253e5b6966327671c9cc358c4850349f5913e9a3c98166e089cf8d1756bbedc9bf10e73c3757eeaef09a3eafa WHIRLPOOL 828347ae61e1e14e5ecaec2ead64938635d5e4ffb1a79396c736b38f7081d8611aa0aa5f658dbff4b844ff89a09a9e22a2938c10c76d1e23778f967d341b46bd
+DIST reduce-src-20110414.tar.bz2 136783974 SHA256 d6ac7a30e817ea71555d21b03a119a5236967b251eae8946a1817ae9a81cee03 SHA512 c54c1e069b8dc5aaee2692be26c8932a26d5963adeda56f933e6136c598d7b7e506bce88d7d2eb464ebd9a2dac3cbab2b673e213d8bf52f3ff631c71f9200d11 WHIRLPOOL 9df2f23f9f4b3c273f32a5bc592ed5f80980d2de607e0c66b9de32983426604d475ff59ebc0dea2806a373f8595d85e25af0cf123515506360ebb8b7d7f02c84
+EBUILD reduce-20110414-r1.ebuild 2409 SHA256 e6fcbe6fc26ec9b60e81d8d24098a733b3e33f0deb79df6bf9a34e575b03fa1d SHA512 112dacb31017805924f9f43033395aa03f0b019f44d051f470255b04dd01d7d5fba177df994bb3e60a8b65e2369cc483eb5ab3fa9fc2557bbce5278b2f15240e WHIRLPOOL 3d4e93c594779263dddab4eb97173a67a00c375cd61c45a67ef464a024427ed58f1d84f3d1f5d594122438bb505bf23a47631dcdbb950abc3bb47f7dd4b3e27f
+MISC ChangeLog 2737 SHA256 4733db276d078f757cfebb196d6ee43046882d8346de19d3c6186d631be65ec4 SHA512 6810eead8e8479e38f0a7be7c809861c7b973f2cd4e5f972013cf6ed82a7de31e9e5747a0fffdd993a6c21368f31782939ac0ac54c8b4621d83d0fbb65f6f132 WHIRLPOOL 05b1ce8eb295153ed7460843ca3203d22249aa2e90be4b7da7da2bc02bee27e988eca72611102783dbfe4d5b7804af644ff3d31ce3572d9356fcd07dec606849
+MISC ChangeLog-2015 1156 SHA256 457ae17696ffdd0d57fed5c8138c0a183dcc143d922bc6e679a799b9fc1b2a3e SHA512 51b782cad49c8e22c2c3b4586d56e0000fff5f229baaeb81dd0f97d61b88429eb141de489986b7a16fd4c818f08456018603e236affe3a4426fe225cf0ace3e3 WHIRLPOOL a6eea8cba8056f8bfcc77dc60adcd0a73d31df1bb4ff74a1e6db209a958379774dfbc4f37e06c6d9ce3b25ab2ea710aa173076630ad5869b5210684a0342c004
+MISC metadata.xml 600 SHA256 7f347b2f0805fb9df194bd7ef9774a5022190f1e576a5b0fff4489ceb1a781d1 SHA512 9b90db5a1129766666a6b8d8c4a2011576c44adeb4b8757990ed5dc5e7167dc22300a28ecdbc16c89f0f3b617265d99946f19965498a9fbbf9fa2f10c7e4fc51 WHIRLPOOL e53186e6c958fb5ce28315a3dcfafd93713bddb0c9aa636598e6bdb9329f2cb2338b1a3fa76793897ea595a900f1c1f758f8f6a95bb568d17dc6eee24030c572
diff --git a/sci-mathematics/reduce/files/64reduce-gentoo.el b/sci-mathematics/reduce/files/64reduce-gentoo.el
new file mode 100644
index 000000000000..2c20bff93ede
--- /dev/null
+++ b/sci-mathematics/reduce/files/64reduce-gentoo.el
@@ -0,0 +1,4 @@
+;; site-init for sci-mathematics/reduce
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'reduce-mode "reduce-mode" "Major mode for REDUCE code editing" t)
+(add-to-list 'auto-mode-alist '("\\.red\\'" . reduce-mode))
diff --git a/sci-mathematics/reduce/files/csl b/sci-mathematics/reduce/files/csl
new file mode 100644
index 000000000000..895b6bd8f4a1
--- /dev/null
+++ b/sci-mathematics/reduce/files/csl
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/lib/reduce/csl $*
diff --git a/sci-mathematics/reduce/files/redcsl b/sci-mathematics/reduce/files/redcsl
new file mode 100644
index 000000000000..ff40e3e073ab
--- /dev/null
+++ b/sci-mathematics/reduce/files/redcsl
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/lib/reduce/reduce $*
diff --git a/sci-mathematics/reduce/metadata.xml b/sci-mathematics/reduce/metadata.xml
new file mode 100644
index 000000000000..a79529dfaf64
--- /dev/null
+++ b/sci-mathematics/reduce/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>grozin@gentoo.org</email>
+ <name>Andrey Grozin</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+A general-purpose computer algebra system.
+Powerful, mature and efficient.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">reduce-algebra</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/reduce/reduce-20110414-r1.ebuild b/sci-mathematics/reduce/reduce-20110414-r1.ebuild
new file mode 100644
index 000000000000..34c8cf564d09
--- /dev/null
+++ b/sci-mathematics/reduce/reduce-20110414-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit elisp-common multilib
+
+DESCRIPTION="A general-purpose computer algebra system"
+HOMEPAGE="
+ http://reduce-algebra.sourceforge.net/
+ http://reduce-algebra.com/"
+SRC_URI="mirror://sourceforge/${PN}-algebra/${PN}-src-${PV}.tar.bz2"
+
+SLOT="0"
+LICENSE="BSD-2 X? ( LGPL-2.1 )"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc emacs gnuplot X"
+
+RDEPEND="
+ X? (
+ x11-libs/libXrandr
+ x11-libs/libXcursor
+ x11-libs/libXft
+ )
+ gnuplot? ( sci-visualization/gnuplot )
+ emacs? ( virtual/emacs )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ # If you pass --prefix to this damn configure,
+ # make (not make install!) will try to install stuff
+ # into the live file system => sandbox violation
+ # Therefore, I cannot use econf here
+ # Also, make calls configure in maintainer mode in subdirs *by design*
+ # The trunk sucks less => WONTFIX until the next release
+ ./configure --with-csl $(use_with X gui) || die
+ # psl build requires Internet connection at build time
+ # we cannot support it
+}
+
+src_compile() {
+ emake -j1 STRIP=true
+
+ pushd cslbuild/*/csl/reduce.doc > /dev/null
+ rm -f *.txt *.tex || die
+ popd > /dev/null
+
+ if use emacs; then
+ einfo "Compiling emacs lisp files"
+ elisp-compile generic/emacs/*.el || die "elisp-compile failed"
+ fi
+}
+
+src_test() {
+ emake -j1 testall
+}
+
+src_install() {
+ local lib="$(get_libdir)"
+ dodoc README BUILDING DEPENDENCY_TRACKING
+ pushd bin > /dev/null
+ cp "${FILESDIR}"/redcsl "${FILESDIR}"/csl . || die
+ sed -e "s/lib/${lib}/" -i redcsl || die
+ sed -e "s/lib/${lib}/" -i csl || die
+ dobin redcsl csl
+ popd > /dev/null
+
+ pushd cslbuild/*/csl > /dev/null
+ exeinto /usr/${lib}/${PN}
+ doexe reduce csl
+ insinto /usr/$(get_libdir)/${PN}
+ doins reduce.img csl.img
+ insinto /usr/share/${PN}
+ doins -r ${PN}.doc
+ mv "${D}"usr/share/${PN}/${PN}.doc "${D}"usr/share/${PN}/doc || die
+ dosym /usr/share/${PN}/doc /usr/${lib}/${PN}/${PN}.doc
+ if use X; then
+ doins -r ${PN}.fonts
+ mv "${D}"usr/share/${PN}/${PN}.fonts "${D}"usr/share/${PN}/fonts || die
+ dosym /usr/share/${PN}/fonts /usr/${lib}/${PN}/${PN}.fonts
+ fi
+ popd > /dev/null
+
+ if use doc; then
+ dodoc doc/util/r38.pdf
+ fi
+
+ if use emacs; then
+ pushd generic/emacs > /dev/null
+ elisp-install ${PN} *.el *.elc || die "elisp-install failed"
+ elisp-site-file-install "${FILESDIR}/64${PN}-gentoo.el"
+ popd > /dev/null
+ fi
+}
diff --git a/sci-mathematics/relational/Manifest b/sci-mathematics/relational/Manifest
new file mode 100644
index 000000000000..b7cb8dbd7520
--- /dev/null
+++ b/sci-mathematics/relational/Manifest
@@ -0,0 +1,5 @@
+DIST relational_2.5.orig.tar.gz 118776 SHA256 511330beda30b7acea6a1122bbdf39b1ee8b8f026e41d2bab8aed8b8d52f89b7 SHA512 588e35a57cf915e544d62749b76ed81927ac06fd88271f0d4d88ee5f221928c2c24e2a88165aae63c1b9b120ddaa20e15e21fe9c207eac3150b744274ae45a8a WHIRLPOOL 1fd04109e1ed9ca89fa6c8464f7de71677d8642d9dd1060beca142f276a7df2d7f6a8a9baa620c0e19308b76bd2ff1cb683139adad3a0850856be3e64e7c0ca2
+EBUILD relational-2.5.ebuild 875 SHA256 5fb52d7d7ca9658678e41683097980b1e1050d07935d16aa2346a0fb67a274b9 SHA512 cd1474489f937e3f20d7d55a36953f56041ae68d5c888037fce759c3d99c0447a672c8dfd6467bc6e44274a88e55f0e34102475880e96982ecf2cf0bd7140921 WHIRLPOOL 02e8ef1e7f873512e676b8fc894d03fad1524cdb9ca186c8ed8be52d9497daefa3a9ce59d81608a6a0a995470a93d40880d791a9a07aee2464030e60bc24c4af
+MISC ChangeLog 3372 SHA256 475f4a2edc9121d6085d2ccc0ae75756c839bcb0284b9293d8599a9206b35b9e SHA512 ace4f258fc31cb2b8f7f9a1370bd2bed46ddbe887f55a1f2489b42ec052852e6f3bbb77ea3967b0cf8853c56b3d0dd1091f1fa769638dbc6c41511036b6cd8db WHIRLPOOL 257402abed41b1937987c7545d57318e26be8e898cbbdc6aab730385b7ce346528d1f3b2521ccedc898663b307e6a857fe0828c586ba7c21422992ef0d0210cc
+MISC ChangeLog-2015 924 SHA256 a57377009566106e5e1bb7d50da5099a5822502b92b9918604cc640a1cc0b250 SHA512 7102d105b4a217267ae406d4b0781f6f7a84a322181d1e3046c3f88a12ee20b02eba3906f8e842a1168b06144892088afc02368d2a683e2ab31ba41ca9fddf21 WHIRLPOOL 8a19817842866e760fc30b11de75b21e4a7d812843cb5233227b2e90ce702fc8de63e551fcc1610ac6c44854ef5747e9d2ccadd9a406ec432e209ae792297fe2
+MISC metadata.xml 329 SHA256 84c18c87caad134c182f46cdf9baae9eddac54db161849727dc611c41cde7f32 SHA512 18759433ae0bb33800dc14a9bd518bbd383b8bbdbf876b02dad81afcabe3f0eea7828bd6820989e13253d73c70528d2a3bb4637e5e28d2fa5aab28b84aecdf32 WHIRLPOOL fb679d779485f5129ee906d5d5ccc07b3472ced735639683beeea7bd6dfc9244589136d88dc164b0d75a46eddccbfb1ae191d96a8bd028077448252ea63e25f3
diff --git a/sci-mathematics/relational/metadata.xml b/sci-mathematics/relational/metadata.xml
new file mode 100644
index 000000000000..e3c73f6f84a6
--- /dev/null
+++ b/sci-mathematics/relational/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>qt@gentoo.org</email>
+ <name>Gentoo Qt Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ltworf/relational</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/relational/relational-2.5.ebuild b/sci-mathematics/relational/relational-2.5.ebuild
new file mode 100644
index 000000000000..030001853625
--- /dev/null
+++ b/sci-mathematics/relational/relational-2.5.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5} )
+
+inherit python-single-r1
+
+DESCRIPTION="Educational tool for relational algebra"
+HOMEPAGE="http://ltworf.github.io/relational/"
+SRC_URI="https://github.com/ltworf/${PN}/releases/download/${PV}/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ ${PYTHON_DEPS}
+ dev-python/PyQt5[gui,webkit,widgets,${PYTHON_USEDEP}]
+"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ default
+
+ sed -i -e '/^Terminal=/ s/0/false/' \
+ -e '/^Keywords=/ s/$/;/' \
+ relational.desktop || die
+}
+
+src_install() {
+ emake -j1 DESTDIR="${ED}" install-{relational-cli,python3-relational,relational}
+ python_optimize
+
+ dodoc CHANGELOG complexity CREDITS README.md
+}
diff --git a/sci-mathematics/rkward/Manifest b/sci-mathematics/rkward/Manifest
new file mode 100644
index 000000000000..8f608c68c2e5
--- /dev/null
+++ b/sci-mathematics/rkward/Manifest
@@ -0,0 +1,7 @@
+DIST rkward-0.6.1.tar.gz 1529612 SHA256 7887bc22645a8e6de278da55e31a61acd91aca0ade777af11a110d0dfcfffde7 SHA512 5171b60ed42049de9e0f45b64f61a9bcf1fe8ba89e5a5a8b9ba77b9f7adb0d61630691adcb6636f5d5c5023c64a48220e85ea93c2ea09af34df2fa4be5d0cc9f WHIRLPOOL 2b195384dc0e093b445f7bf21c1f4bc2f378af7e51adb20f046a97e07d7f808b04eb3be9a35198b389b84edc79b3936d2f3d5e7eebc82ff3bb612465b813bcb3
+DIST rkward-0.6.5.tar.gz 3731011 SHA256 3fc5acb48ce717dee8fbbe32973ea4c61f30c335bd18a75471142b19b436a032 SHA512 7ea5016a0bc5bb6ed24e38252338142e32291aaff547dce9c3f61524b60395ce595803aa059580e56c38ed9600d09647acb2a8feb060819a0436475e4bf6f1b6 WHIRLPOOL d7dedc8cb1f65c124ea3d2a3f52c557477d3ce472c33a40df7e0c905d2ee18713dfe7980756058fc62d576661b26db4312f5ce0da017fac13477c670ea238904
+EBUILD rkward-0.6.1.ebuild 763 SHA256 38e9bc4f5b438c18b7e35beda858a9fef8e9d0606cd522133e803e266d9a3dc0 SHA512 3776f95949b81224cf46d86aab9840293cef64098e6132c8c1ab0285229b1f42003cb6b2bc1d334225878c9a2c23da75237ef464009bfdc45eeb5889f24651ef WHIRLPOOL c0346d311e77998efe25a095ddcf6634cddad04d55daec4e7ab2f9b2d8379f48970c43657a33007f1b5ee6db2f2bdc589e856db9552d91378a10f23ed9daba2f
+EBUILD rkward-0.6.5.ebuild 755 SHA256 7918208f519db8ecce23724f8dad35d28e6a273e6f81be33a75f6875317b7cbd SHA512 fb2d171365a77bdaf8392e6aafce803591d16a0334c3f92631240060c02a85937be223163ecbd7801a7c274478b91b7f21ddf4bb88ff29998266a52b2c7d5c4d WHIRLPOOL f4f834c25fd87e4bb6990d57609cc24979ee6f04f30d8d2530eb5fb6bb1d6366945cfa6247b4aea6d186ba4967193b9de02681ccaeb71431ac29bd579ee49408
+MISC ChangeLog 2610 SHA256 ff634cfd1984f9504f5c900ab400704ab512e218ff27de8baa7b107330829360 SHA512 d66852fc9e5fd908bec9d7ec23668e58b43761c829bd82770e8b11df62d3cd3a6f3e69c376d0a2040b043f9efd116202d743a706d195d0f6ee1b99ff37477d82 WHIRLPOOL 1d0a98cbbe86317076d46b976339cf642f21f00955189eab6b42dae11799408bb987220e9eb32726474ba47a3d593936dce5e0e933e53515df71d02290e68390
+MISC ChangeLog-2015 6418 SHA256 b6190dd88880d49676fea2ff2e3067ce7a3478614bcc7ee90c2db01a77051283 SHA512 2f9161e4183bc9166faabf608e65e33b0fa51268594325c51a29286e426fbdc02b35f44201cba810f641fcb90da6e27dcb185551d15a567a6100e8c28bf7176c WHIRLPOOL 876e7af65774af827477bf5425429666a657d282dd5a74f696b98b9c471fdca3f949b9afa0c3f08289543156ee3f1c68a99feb68c1a82b024f951fcc57f28925
+MISC metadata.xml 592 SHA256 e8bae099a5f53cb66dde10449ef70dda3ae52a24981beb4f09c2418921ec12fd SHA512 81c026c96614186bc6b31f9737b91692df82523d2179d467aeb663f10b7ce079a4b52354d8f744dedbe5bf5cf1939921a26f24f8deec9a170ac435da1f9863f6 WHIRLPOOL cfb8755bd0327acdf7039408bd6e81ed2079ff02f660ac350b7845af682b7013f9bf69f27e26437523998ea7735d8761e9b99283481ef788bcaa4ef7e75e08bb
diff --git a/sci-mathematics/rkward/metadata.xml b/sci-mathematics/rkward/metadata.xml
new file mode 100644
index 000000000000..c47f3d391fcb
--- /dev/null
+++ b/sci-mathematics/rkward/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">
+RKWard aims to become an easy to use frontend to R. RKWard is still in
+development status. Right now it is most useful as an IDE to users
+with some experience in R, or willing to learn R.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">rkward</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/rkward/rkward-0.6.1.ebuild b/sci-mathematics/rkward/rkward-0.6.1.ebuild
new file mode 100644
index 000000000000..3b6c48e9bc05
--- /dev/null
+++ b/sci-mathematics/rkward/rkward-0.6.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+KDE_DOC_DIRS="doc"
+KDE_HANDBOOK="optional"
+KDE_LINGUAS="ca cs da de el es fr it lt pl tr zh_CN"
+
+inherit kde4-base
+
+DESCRIPTION="IDE for the R-project"
+HOMEPAGE="http://rkward.sourceforge.net/"
+SRC_URI="mirror://sourceforge/rkward/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="debug"
+
+DEPEND="
+ dev-lang/R
+ $(add_kdeapps_dep katepart)"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ # to have it compatible with R which had a bad R_HOME
+ unset R_HOME
+ kde4-base_src_configure
+}
+
+src_install() {
+ kde4-base_src_install
+ # avoid file collision with kate
+ rm "${ED}"/usr/share/apps/katepart/syntax/r.xml || die
+}
diff --git a/sci-mathematics/rkward/rkward-0.6.5.ebuild b/sci-mathematics/rkward/rkward-0.6.5.ebuild
new file mode 100644
index 000000000000..9b46de92e179
--- /dev/null
+++ b/sci-mathematics/rkward/rkward-0.6.5.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_DOC_DIRS="doc"
+KDE_HANDBOOK="optional"
+WEBKIT_REQUIRED="always"
+inherit kde4-base
+
+DESCRIPTION="IDE for the R-project"
+HOMEPAGE="https://rkward.kde.org/"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug"
+
+DEPEND="
+ $(add_kdeapps_dep katepart)
+ dev-lang/R
+ x11-libs/libX11
+"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ # to have it compatible with R which had a bad R_HOME
+ unset R_HOME
+ kde4-base_src_configure
+}
+
+src_install() {
+ kde4-base_src_install
+ # avoid file collision with kate
+ rm "${ED}"/usr/share/apps/katepart/syntax/r.xml || die
+}
diff --git a/sci-mathematics/rngstreams/Manifest b/sci-mathematics/rngstreams/Manifest
new file mode 100644
index 000000000000..46ca600b80ac
--- /dev/null
+++ b/sci-mathematics/rngstreams/Manifest
@@ -0,0 +1,5 @@
+DIST rngstreams-1.0.1.tar.gz 502458 SHA256 966195febb9fb9417e4e361948843425aee12efc8b4e85332acbcd011ff2d9b0 SHA512 665c27e72a4e1bdc59864f340208d42fc899c1c9429aafe1c7c3f8778dee0bb87ec9da26976a925197e07931bc1c2864dde0cb3fc08996155f775b7e44f9d7f4 WHIRLPOOL b0fe5036076cfb14980ea1f5e23ac19d2ade31f8b6ffef29d2d66f2b96aebf7df15038a913a6077c9eec15dcbda30c3b6ceadde5f5f44ec6461ae30e43f31b11
+EBUILD rngstreams-1.0.1.ebuild 586 SHA256 2485c9a068a335b8a762171aae98f3347f184e16999419139baed24936db05f8 SHA512 e60cf7643db00587579f89bd9694231d4840ca4c2f00c52c30617f28dbcee21b341540dfac938130d687fef6c2e4726061989646c59d2b2a675f475f329395a1 WHIRLPOOL ca0edc09b1a2993f52d2267092a603fc64ef3307deae1e5811ffeb5279505789a530b08c346ca5eebc1f0de13ceec8cf54ca95d54f7fe331f0901913c40042df
+MISC ChangeLog 2443 SHA256 66c7312bd0393be255b6a8eee4a360768d40ef57e3b69e217c553f4b1cd1b4e6 SHA512 9646519a494192d85608c3d15cf56b82eccb00dc96b08f50c7b8a762388081fa80136f6042be3d8cdba34147e5d400c69b0e3f0f4dce85301030253728b5205f WHIRLPOOL 3c91fb8fc5c24e650fa8af906b8490f184cb196f4f1b434475b333d5d207db049bf6a382e844575e49dcdd61fe299a04ecf3eb4e82e2a50c33bc00b4812bb716
+MISC ChangeLog-2015 1343 SHA256 7ae890ed3a1509440615e40636b67983e753fcd5c7c393f71ac99b1767cdffe8 SHA512 f7b6ca35cac2dd43637a9d515d108e97b7cbe19a568e3ad6714100d67834dc4a659e6df749073ebd7bf25bd0a4cfc0acb41fb8b0c64be5d82ef543e7a9f25ec5 WHIRLPOOL c0148a766915dfe40743bb3ae083e460d5f2953ecbaab39dbae72c9708081d2bc6ee14255973949db660a9c72ba117e25b73d5c3c0806ef1b458ea404028ecaa
+MISC metadata.xml 601 SHA256 f43599ac403391324a1d30ef8ef584d6602269802af87f3dc71f2cbf8b08e5b2 SHA512 2c7af3858faa8cc262d3387e4aa6c349e7d410943c7c514eca7d2e0d8aae2a67dfd732ce5802689e6aa25c3e794cfac0d541596a591b80bb57be443b19114445 WHIRLPOOL 8ea55afb510e1d8ec5e4b5cdc092f96991829292bbfe168d7b13cacf88ed361ac373bfe5c523acec366f6aefcb8481c3c41b2b97e012f1c6c08f56911f8e27fa
diff --git a/sci-mathematics/rngstreams/metadata.xml b/sci-mathematics/rngstreams/metadata.xml
new file mode 100644
index 000000000000..1d596eccb7c4
--- /dev/null
+++ b/sci-mathematics/rngstreams/metadata.xml
@@ -0,0 +1,15 @@
+<?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">
+ RngStreams is a C implementation of a high quality uniform random
+ number generator that supports multiple "independent" streams of
+ uniform random numbers. It has been written by Pierre L'Ecuyer and
+ Richard Simard.
+ This is the GNU-style package maintained by Josef Leydold.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/rngstreams/rngstreams-1.0.1.ebuild b/sci-mathematics/rngstreams/rngstreams-1.0.1.ebuild
new file mode 100644
index 000000000000..2ea39b2a42f1
--- /dev/null
+++ b/sci-mathematics/rngstreams/rngstreams-1.0.1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools-utils
+
+DESCRIPTION="Multiple independent streams of pseudo-random numbers"
+HOMEPAGE="http://statmath.wu.ac.at/software/RngStreams/"
+SRC_URI="${HOMEPAGE}${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT=0
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples static-libs"
+
+src_install() {
+ autotools-utils_src_install
+ use doc && dohtml -r doc/rngstreams.html/* && dodoc doc/${PN}.pdf
+ if use examples; then
+ rm examples/Makefile*
+ dodoc -r examples
+ fi
+}
diff --git a/sci-mathematics/rstudio/Manifest b/sci-mathematics/rstudio/Manifest
new file mode 100644
index 000000000000..0ad32c7b024a
--- /dev/null
+++ b/sci-mathematics/rstudio/Manifest
@@ -0,0 +1,92 @@
+AUX rsession.conf 1145 SHA256 23dea938def95eaf559666faba1701f686000d1af510a579d13e415d99b8226e SHA512 90395faac5aa80ce52ae56da3565512b8a880a14ab2acf9a24c7a56c9d03f1e3d5f63ebaca66efa68f5c5c9c831235846df22ca37f20ba071437a2a963b808cf WHIRLPOOL c57d10c1fdccb49004825f4f99e8fb966e4270167be36116a5b73c289bb4af89fb36a99275d1b35d0f2f4b6f3dfc2fa45a9e66892ea9d59a8223afa888990db6
+AUX rstudio-0.97.336-boost-1.53.patch 3048 SHA256 86290a2a4ac39cae8de988739c702f726451d2d4f76d515954edac2db6d5e20e SHA512 eca9b5d112fb84f83533c74b099694c5c5b1eaac3d6b0978a4b2236328b51d41893b1e3e94f3afbbb49cf841401d05cfba6941ff9a1a7f8a2cd35a57cda6176c WHIRLPOOL 280be4773ebeb1deedbc4a32cb07c85f8321bee0676a55bada93c3d5c350e2a4690665723b02ad4132e99b7463f23562f922790004f18fa0064332e1e07883de
+AUX rstudio-0.97.336-linker_flags.patch 806 SHA256 9fa104ef1fc659aeda8108d2a6418679685ae8d0a19e3f5f97a634ad1d1d05d8 SHA512 2049077768ef72faf502387b5eeef80948d0ec748bc52df7bff6e507dd92a8c52b3a7f7f82eda526ea1289f16720ae51fd40c059bd2d04f5eacd51911b995f06 WHIRLPOOL df36ec2fd3c3e9bced79b6f29ecfbeebde8df6a7873f5de8d46ac0ca7f26c7851426c8b869de12ad302d7c152fa2212af25ed4b52e123f324d92cc7085e6e772
+AUX rstudio-0.97.336-paths.patch 5543 SHA256 376b0ba06c3744902b14ce644d481b1a61cd030981faaaadacbf20fa8dea7857 SHA512 42063474152f0c044f9afea3e93812ddae98de012a7f2d3d1b5f23b95353538b97c584bd6e61c8eb5d314b63b4af6161d7088037a8210687c31fd64d53788a4d WHIRLPOOL a028f30c1b5ce8e3773cee2099c683bb2fbe1f0b16ddf45a5bffba499c8460f078ffe25c9b64a8b774464ea72ea71b8cb11f1623789e82c21b897825c650e3ea
+AUX rstudio-0.97.336-prefs.patch 1008 SHA256 ae5bcb603cdd112adb9f5929b9cf15b33db36a9f9efc76bd24fb67855e99150f SHA512 2edd5dee1d59ed2abc64c2f68f354bd0c2d23de649790e956112131988de68d649a09ce9cd893d2715f656e90cabfee8a67f9ef98464b5fc2a6eb17d29e4a50e WHIRLPOOL 83f7f85f2c40a21697db1a5af9f28de80a802005e910a78905b4b45d66accfec03e67fb1c35cc7091eedf9f7d98bcd89e427e200b999edf1b206e1115fe2aac7
+AUX rstudio-0.97.551-boost-1.53.patch 3048 SHA256 86290a2a4ac39cae8de988739c702f726451d2d4f76d515954edac2db6d5e20e SHA512 eca9b5d112fb84f83533c74b099694c5c5b1eaac3d6b0978a4b2236328b51d41893b1e3e94f3afbbb49cf841401d05cfba6941ff9a1a7f8a2cd35a57cda6176c WHIRLPOOL 280be4773ebeb1deedbc4a32cb07c85f8321bee0676a55bada93c3d5c350e2a4690665723b02ad4132e99b7463f23562f922790004f18fa0064332e1e07883de
+AUX rstudio-0.97.551-linker_flags.patch 806 SHA256 9fa104ef1fc659aeda8108d2a6418679685ae8d0a19e3f5f97a634ad1d1d05d8 SHA512 2049077768ef72faf502387b5eeef80948d0ec748bc52df7bff6e507dd92a8c52b3a7f7f82eda526ea1289f16720ae51fd40c059bd2d04f5eacd51911b995f06 WHIRLPOOL df36ec2fd3c3e9bced79b6f29ecfbeebde8df6a7873f5de8d46ac0ca7f26c7851426c8b869de12ad302d7c152fa2212af25ed4b52e123f324d92cc7085e6e772
+AUX rstudio-0.97.551-paths.patch 5543 SHA256 376b0ba06c3744902b14ce644d481b1a61cd030981faaaadacbf20fa8dea7857 SHA512 42063474152f0c044f9afea3e93812ddae98de012a7f2d3d1b5f23b95353538b97c584bd6e61c8eb5d314b63b4af6161d7088037a8210687c31fd64d53788a4d WHIRLPOOL a028f30c1b5ce8e3773cee2099c683bb2fbe1f0b16ddf45a5bffba499c8460f078ffe25c9b64a8b774464ea72ea71b8cb11f1623789e82c21b897825c650e3ea
+AUX rstudio-0.97.551-prefs.patch 1008 SHA256 ae5bcb603cdd112adb9f5929b9cf15b33db36a9f9efc76bd24fb67855e99150f SHA512 2edd5dee1d59ed2abc64c2f68f354bd0c2d23de649790e956112131988de68d649a09ce9cd893d2715f656e90cabfee8a67f9ef98464b5fc2a6eb17d29e4a50e WHIRLPOOL 83f7f85f2c40a21697db1a5af9f28de80a802005e910a78905b4b45d66accfec03e67fb1c35cc7091eedf9f7d98bcd89e427e200b999edf1b206e1115fe2aac7
+AUX rstudio-0.98.1091-boost-1.57.patch 1876 SHA256 cd570ec085eefdb5c6e195210ae33285f347e0c4c80d8309a9275886725e8618 SHA512 5edda18a495e6e95683e4822cda632fbf965cab040424e82368c2d45a2a632057de69c7d3211c40295dd17985fc5786714ef3076b6cb41894f9eeeee1ab5b9ae WHIRLPOOL 20aafb0e70d2e442c8a7f3358eb075ae8d5b5579a1a555c8cca0c380cf82c463a052c53f7a85c748cf0266f4d46ba1380f8c77998a58c56d7d08b89cf94d8f3f
+AUX rstudio-0.98.1091-pandoc.patch 1372 SHA256 9373f509352e6e1b70e27c28c27b0c345750fd30f83b2a6ec4d3e1e495d0936d SHA512 15b51507c71849a0acb2f70b2bd2c85e693263a999975fa9db876bef30b436c4ade10f956ad4aee513a9ca170083ab06aeb42190db7454f13c5f4aaca2ae5b49 WHIRLPOOL e207c543c9cc6448ec8ebbac56f916db27bd3f50f8da9d6f21b3f7509322c06fa47558af545108b89d2c8d1b148348646f0a2a5418a72f286de047089f745765
+AUX rstudio-0.98.490-linker_flags.patch 806 SHA256 9fa104ef1fc659aeda8108d2a6418679685ae8d0a19e3f5f97a634ad1d1d05d8 SHA512 2049077768ef72faf502387b5eeef80948d0ec748bc52df7bff6e507dd92a8c52b3a7f7f82eda526ea1289f16720ae51fd40c059bd2d04f5eacd51911b995f06 WHIRLPOOL df36ec2fd3c3e9bced79b6f29ecfbeebde8df6a7873f5de8d46ac0ca7f26c7851426c8b869de12ad302d7c152fa2212af25ed4b52e123f324d92cc7085e6e772
+AUX rstudio-0.98.490-paths.patch 6156 SHA256 28b21281aa3b02fc2921e06b20a1778f7a85b2973da5d88c6b3eaff0d5957b8f SHA512 3e74bea76654ccf342dab95a61f8cd982faf0073c3fe70c0f13a31382a0349d2d0b79c400f89c760c73c45187e5c57a99e4ab8c546ef7e0cf7eb5a1b22e4dda5 WHIRLPOOL 097edbab026ce6daa4edf30c4d111f54bb711e2561e4b561c26d06a0093b52c7f149c59ff4d95fe616e692c4dabddd86a35c7af435e7de5fe86c694d90b11a20
+AUX rstudio-0.98.490-prefs.patch 1008 SHA256 ae5bcb603cdd112adb9f5929b9cf15b33db36a9f9efc76bd24fb67855e99150f SHA512 2edd5dee1d59ed2abc64c2f68f354bd0c2d23de649790e956112131988de68d649a09ce9cd893d2715f656e90cabfee8a67f9ef98464b5fc2a6eb17d29e4a50e WHIRLPOOL 83f7f85f2c40a21697db1a5af9f28de80a802005e910a78905b4b45d66accfec03e67fb1c35cc7091eedf9f7d98bcd89e427e200b999edf1b206e1115fe2aac7
+AUX rstudio-0.98.932-pandoc.patch 1143 SHA256 0706e41fc00ad7fa5abe3abb4f42c0a93fd1999609063b2cf48d508bb988b6e4 SHA512 3295e41d69e49a8da6fc7605f7f2b53c7697c8cf051861147a544a3be2c97c4afd589f2ba0fe9e2137f93064b660e61060115cd2ec425012fb4416d19fcba3df WHIRLPOOL cc3540f1f557330b62a747ccfd4b57c475e377bf13e0b6c95a284391848c9c4151567dc469fb7319c89e9d8960813b8a4bc529444ad3a002c270515f8fd43beb
+AUX rstudio-0.98.932-paths.patch 6829 SHA256 57d01278b28ad380c731cb33f11374b4353a335059eb3d56a984d7a4f2c1e00f SHA512 1887f2af4a648f1d2975672b91007f5fd29e136c31aed7bf419d969d53010261e59d1a378a66cb18ea8c4ded70deb41aee6c854161daacfb673344dff19bc7fd WHIRLPOOL 3d02919ca2ab1ea745e7b8b5fc85e48826be85695891cfad37ee1c73c93821bc329b831c739e418b88290bb522508eca8b436b0f361ad54ef9236159bf3a42c5
+AUX rstudio-0.99.473-clang-pandoc.patch 3372 SHA256 7d86acc12040a22c80bf012b9a851664e7a6ed3a3a9045bd5658fbdc0e80efdb SHA512 6dcbd6bd7b14f87c590df5290f7c564d69de75e3dd22c1bf0ea523f9863f93c81707ade9e713b46bf69cc272ec85baa063fc3edd8c5f9ce97ccb44903792fdcc WHIRLPOOL c2a83586021b65f68b818a50d536d779a4ce28ce6e8ff074e801e35b95c9f27d58c09539ac6ee6abd115d616199c8f8e100a060746ddb8a0a291604bb5840a7e
+AUX rstudio-0.99.473-paths.patch 6747 SHA256 bf7bd305ecbd927ce7462c35a0e4d75de82a8f719fc03f29c9cf87441662155f SHA512 e1aa3baa524a79d169722f2c72a5ee2e255ba7eb4584e210e837cb35131e1aeae5e848d8f08260108047192eec16e08570382de984d654c28863f3267c6837ea WHIRLPOOL fa4397fb790ac9b2f423880c4358ce3e42f36563a617e8e4e647c439461415a6b600300272b804a7c9528d1eb76573c2e58f19dabc2a614ef9043552af03b268
+AUX rstudio-0.99.473-qtsingleapplication.patch 1889 SHA256 169426c1903a8362f0beeba3208d5b7165f64d0fc3c279c96b08c1dd532f30e1 SHA512 07af71ac080c0a2d4c2c62ec8f0ac451e6100a94e5360fafd274c62e2205d60d0c4b7fe18ed4536e515fa4a51a4ab819e47c529ce4fcbf93532dbb57e123fb37 WHIRLPOOL 878d8d494c14505609d4d960cb249bd3a16242fda5b2b729c780cae93474cfabadb6a095902846008ef6c5dedc1824afa45e99290c3d3def4bb028bc9298bcb3
+AUX rstudio-0.99.486-systemd.patch 1330 SHA256 703fd84a94ca84710d567ced6907b71c560c0f22af8b31e70de16980c06c09cc SHA512 b4784f3f8a6e17269c579127ed8954752be735cc254dcff43c04a569b7ba05536b24c6fde94e55cef7d00fe4279ec1486116e2351877202513f44d530efd9ca4 WHIRLPOOL 898b88199d0e769a710d0b7d8f40382bf9fd3ae9593a5ba8b4dbb87cf2844340721ff9b92741422b9dd60b509ed9e7496d36177f17fb585a8765925601c7aee0
+AUX rstudio-0.99.879-clang-pandoc.patch 3372 SHA256 cdc2818c649efc948a1d6a69f54728c66297604eb853fdafbed85bb1d2eb8c8c SHA512 54b6521e66e5d7b1c2a900ad2b0397b618b47ad11b249a2d2d27bcd140099ef23cb671da1d8d45b6e07a950ad22fa4897159edc86ca8884f592282fc8688684c WHIRLPOOL 588db5d2a5f274b97cafc95ead08a8a4fc4d2126f80a61ea69da6917096c604908401b7ce61cc259900d5f638302df7d3c14be894f58bee0865ac234fa4e3a52
+AUX rstudio-0.99.879-paths.patch 6772 SHA256 22d9f475c2537d39ed9ad4a5c33120c8667fc829239e8d39a7d7bcaa59112361 SHA512 18d68a0171ba774c441bb431dcdb38e6d217f61068f9655fca3e5e7ff66d41e31f27952f14808295889473beec90acf4bf4eaf0da431322f1498dc70e7a09a4b WHIRLPOOL 9cd58522fd3b41554cfcd5bfeb8b552fe51884215fa012516a82bcce81791182ca4e53cde90b3679daa9b397a39a3922c674dac9079d73786e067064b006ccb6
+AUX rstudio-0.99.879-prefs.patch 1859 SHA256 af9e07ced5c0fde92f6804d6347503372529e5ce696c4b1e0f3bb8031eeb7327 SHA512 987d46d7dd8955ae55f29aa2ca51241697405d8219b719342a5e8b6621dcec8bffa5b41d09a82e03d65c6b9797fb6aea8791ea161f4406600a5d5bd20aaf00f8 WHIRLPOOL 6c4255dc09307196af5a7f44a03275106627ee7ddcd13c9582fc357ec3b067ab487e5c41636285a2eb9709ecb3f3dbcf7d65f8ecd62414d1065074d04ab5b488
+AUX rstudio-1.0.44-clang-pandoc.patch 3104 SHA256 a7cdd272ae114d90edd15ace2a6691e55af6b0ab847202e83acaca695f4ee091 SHA512 74b0f3dcc3dd60590dd2106861282f55bca7de157fb2e5fe587ca9311aa4527c8a8d64fc3e914f8d4e11ce65de9abbb79f917d7032b2fbfe4a4a9e8b83eea89b WHIRLPOOL 35f85c9417a0bbe20a7f612989d6923d66400bbb375ef14bda4582abe3b47e22c1c5e8b60dff43a5e9cafab91dd7bb9e772005afc0b1f4c71665f73313b53054
+AUX rstudio-1.0.44-paths.patch 6722 SHA256 615db327a359908fe6e9b54fba13d67a960a29fd4d05f48a0e6ad60f1b15f2e1 SHA512 6191520733f33466cf45bcc102a386763acc37a0cc1c58718cb59f3e3b5549afe5a051039f50aa390d773433d992cdff11bdf27c7e2960eb6177cd99c3169828 WHIRLPOOL 2278a1e75f23099f8fbd0e8b9a5ed50c355618b25f9123b4aaaee7882c616cd0b33379db8980c77c3288d6142d178ac7089edfea18e36b5ef7d590daefa50ba5
+AUX rstudio-1.0.44-systemd.patch 1147 SHA256 eb8dd9881fdd98c0f0600cfa77b610452bc6fec229f68bcdbf95f7945beea2a8 SHA512 ee22d4421ab52cff1815200ce1bda33ba7af752363537c6875ea19151767722183861301082eb03cb34403a08981cb10d66fd496e9e2687a4f3ca9de98f33d91 WHIRLPOOL 422ffb90a2efa587ff5fa3823b5cd6e749f30b65a51dc57d5f3a4464e2024926021aea1a7018da05250d4614aee9ea65d1de8e496bb00c7f29118b7a1900aabe
+AUX rstudio-server.conf 1337 SHA256 327e1a2b7d11c28962924290af19db62987a253ae31065e58d00df0b04233d12 SHA512 f166f1aa4bd370fcfcb44c5694d4e6af8bc64c5f43671e0c1def10c555d248bebf54199097f37d628a083c65913f522b7b44c3bd6a1227c011cf25eed1dba4a6 WHIRLPOOL 77695c3c1b09684adf9318ae5febab97199af58436d1cb0783b78c82ff2da33a98bebd7f5ac9c43a90e0ad852a133caac2a3a0568bbaa4fedca50577172b744b
+AUX rstudio-server.initd 377 SHA256 7b9f1ab9ca75426366649e3fd94c779c1e4f907b8b6fac0ef3d6af680ad00b4e SHA512 828a485338088d129c57debec6557ad35db5b042c61489ae4341717ce2218bec59a873541c270f964bb9c708b75896f1a3e2e64a4245a1713979d3bd42c9d5c8 WHIRLPOOL 7c21bbc40c07898b0866e6d49d2310f804e77882854c75da49b71865c33fd43a15ecf1b8d718f42587b37bbf2defd849275a78657337c31ac2b8714cb9269193
+AUX rstudio-server.service.in 161 SHA256 446649a73c0722950656ff858895f9d0eff98f4455082cdf0175ca11bb0d55a7 SHA512 bcf1f30e460dd5f0562b20489ca5544c6bcfbfb0ee1c636c4365df433e97e02e9e3b233e4159a0c71ad6d319f34f93c22b8fbf6b36463e29f22df2acd71da173 WHIRLPOOL 57c8156f37de4eb4b481ca93c63b455b85c7e192c6b2488b0568b6c82238f56277859e10ce1a1fb25aa06cd3c2d37dfc7f4704b802a59daedb8b9893e48c9c5e
+DIST chromedriver-linux 19303552 SHA256 1ff3e9fc17e456571c440ab160f25ee451b2a4d36e61c8e297737cff7433f48c SHA512 18774ede961dec222058dd0e3f128d63732cd444ee310136b44d5bf508a4f2f2c164a2c8d195d80bce8b5fb6303559e167f82f384e4a58e30f48b151a4206ee8 WHIRLPOOL 06534c131d3a8ade4fb12ad94955f430f23d86654342357d223e78e210cc401416361a847934bccb3957702bbe8fc8a6dd7f18416461edf486145bde96c7091e
+DIST core-dictionaries.zip 876339 SHA256 4341a9630efb9dcf7f215c324136407f3b3d6003e1c96f2e5e1f9f14d5787494 SHA512 9c5830cc9fed575e223f1c61f02e48c5aea6801bb0cd2586f02437c17fdffdb1d36c396d5a8ecbe02ba01196e73458304345b1f6b92c052bc7a7d05961fac2c9 WHIRLPOOL 316dced8ac46e4216613b0b850c33d4c1e10ef0ecd954d786eb131ea80b34e66ba3d39a0ef25b45230b64ded415737ddabef8f7d68f4d42caea98679cff44ee0
+DIST gin-1.5.zip 1055663 SHA256 f561f4eb5d5fe1cff95c881e6aed53a86e9f0de8a52863295a8600375f96ab94 SHA512 3f6649565f9600daaca6ddf3fb431925b5a1ce1ada38e6389de64cef617abba9d3f49c555d0a20053fb06f17ccbe4e1141b39966fbe4b2975d7b120377504897 WHIRLPOOL e66d348ed275eb20518369c39592a5a03ee4257422e2947520385377939de65a54d131332818362a47597392026db48ed1332f11ae218e336798498ae5d5b196
+DIST gwt-2.5.0.rc1.zip 104156555 SHA256 83a6dec583d1b7f3bf3fd2e321d89c1d95881eed1f81c7ea4056201fc105258b SHA512 c0c4f502b4ca191537eada53eb0458c0d33282661423f6d2648e6107ed8e38465b189377fcd0d9babcbf2c688e16080d33cbd7165ed20dafda7fedc39a74e163 WHIRLPOOL b37f12d1937b6479b97e274a59a1856dcf0c5cc3b767b6a19f65d7807e1f32cc2483358f1414c4c9e427d890eb1e0617fe8af84c6f0dca4a9ded64ae5ffde129
+DIST gwt-2.5.1.zip 111070580 SHA256 c457df45a3eed582452c5784ed11746685df494c0ffe4a8ae4de52945916593a SHA512 845c6bc6ce5ade57eeddd8b40cc3458f5e7d40d881cb4017615897eebd5349bfecfef8cd3e3b05a09b33ecf9ee0262d4a84700b0965a27b40cb60d701457a7ea WHIRLPOOL 9d820026e97f96402fc6b69a06f24d2f79df830a0afdba808ab98f14a32312bc999692ad5822005acf6fdcd1b4261918a318f9f20980c640cf32292d5df83a05
+DIST gwt-2.6.0.zip 108819959 SHA256 bd4c13a5d1078446d519a742ee233971e55c447d1b87ffd5b1f90e54dd876b9a SHA512 40690f83f6271ab58abf0ccbf2da1045ea142867ed88accdce91f65a70e39ecf48070696caffcab3f797523ee69b0431b67155b7f04c2856cd95856a7e20d2fb WHIRLPOOL d59ce0f9b13a9956b07905479b394397020fcbc85ac3aabff9ebd74d39b7e660c862e7fe1adb32160e82186d83db10d1254121846e1a9bdafacc38efc55a38fd
+DIST gwt-2.7.0.zip 108818328 SHA256 aa65061b73836190410720bea422eb8e787680d7bc0c2b244ae6c9a0d24747b3 SHA512 a1eed5cc25c888cf81d4f22b1f9494d5d8567b911f7aeb1d164a6359120543668280afe1a3ffc9ed87b139c7db67fbcaaabde2066e3279909d7cd6fc22eaf499 WHIRLPOOL 96ca3c3bd39116fd6109a3e436f41875b6e3343596165d2a7941a961562f5ebd412f0a455d57fc47a9551d0ba76df172a4ad2622500715625faa325d94f3d961
+DIST packrat-0.98.1000.tar.gz 97677 SHA256 c2da99ea6b62fd460f36b76f6c9b91865c42851545d61817c181bf6109e2df6b SHA512 2290c768ecf27a037e73c3f8336b9fd71c68ff19d071b4a8fbc469550d29007cacacdb75f854f73b5db2139a5104f129b85a3612e2ee47bd6118ee13f7d103a6 WHIRLPOOL a2d0c3c3e04cbc496f59abbf1065fcd0b7ae25433ce0b7ca8e75ab59362f320508537b2a62ed1028dd5baad6cbab5ef2e91dd9d3af327bbd04c08a96c57d80f4
+DIST packrat_0.3.0.tar.gz 79974 SHA256 5ea35b6cb964188f4ffe58a3c9cf2c1f5a436569117c218d097e0fa66d032ebb SHA512 7f964e94e62193466e9bc880fea2c2fef8a0996061d9b971789e4e33a2d1e6327033f03236327545aa73e1112e2bea730c3fc0984729ecdec6f1582855c1b249 WHIRLPOOL 7ff4c3f3681300d402e8738b1aceac7ee2dbd55edb36966e3b7453b1b90182093979436d2c1193d460418251bc370ab222f61142311d8fe1a5a42527c5869aa3
+DIST rmarkdown-0.98.1000.tar.gz 1423820 SHA256 56e9f964f805627f6d6face9bf09e6435be4cc48321447ad4041fee86d6f88b4 SHA512 df3540c24c87930fe55bff2ffe67c86c219800cb00ed72ba9451ecd0d0cad411548a78c1a04b9a2e301e853616dcb77e09129c4e48ade6f16d3f14b7ea7e4852 WHIRLPOOL 51098cd48a12a61da312fc1cc96927626db4a19cc069c88f615dd20abe40f52a7b1ac1325b52b1922110ffa76a7f255d9ff2a75cd05d3de01d1b96f0c8286790
+DIST rmarkdown_0.2.49.tar.gz 3846795 SHA256 56b9a032b07d62c6af2a4a2d04007cccf379a9c8e91426c59f265c8b7fd992ee SHA512 46d15c354c9a90ae75a7dc3660b1ea82d097aaceb3dd220a4a8c6f4b22751ad2d63fd5ef3d56821160716ab6552529cef6513b5cd7043368d13513f537511fef WHIRLPOOL d658a091d1b4508ea38fbf2f3691517dc2b814aa3ffaec25483263266106756a89712d7c8a2ec3de8d6d45234d5f8b11340c287509bd836be5875527077f7fcd
+DIST rsconnect_0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0.tar.gz 197051 SHA256 e1e3e1f799eb8be679be9a2ed5aad7e9ce6cd603e3cb43fdc242490f0c311113 SHA512 208dc349f4aa7613ecf94939aba60d22d3a06972344b526c9b6c951015571f5922927bca08db571a7b8a268e42609a4f558f01278c9685f6da2ffc66a1f95ade WHIRLPOOL 4e3d64de00a98190c435d76f12a401d30950fdc7590b6bcc886ae50d4771825d39f93ea2bdcb4a9db026361c522f16f11297ff89dcb15c35f9471c1abf4f4e2c
+DIST rstudio-0.97.336.tar.gz 12598580 SHA256 e6c24d6a865827d3a39e64508976a825bba705efe0921eb06f9a95ba58aefcd1 SHA512 bfaf6218cb400e83a97a320cf633e4656f1552e27bb9843fda1837945a3823fb0df20a2c86e0b6d76608d98806b0acf163aaba10783c923ef900b3eaf03b7569 WHIRLPOOL eca7b837ccff6cc6595298c3137f8663c0754256763a1d049e44a11e10daf53914234c426e004cc1f0158d7b4a38319f61653f78785c7189a64413fc196848c2
+DIST rstudio-0.97.551.tar.gz 12602738 SHA256 caed5f6b6ec57139ddf550dc2f51c1f9a74b39b81b878863b97e1a12edecf498 SHA512 f855a5ba3a86e44c870a4843e94678a1f6eeedc49934d8ad42f202815f93d282913a0be739435be63e510a6ec81b7a1436e4c911acbff955f5fb28b78b00fd10 WHIRLPOOL d8cd3d2978b690fc8c83696cb2017748e74b38309174ac85d6d35d5a1dd91d8e0d8ea06177b349754b3be9eb5e78e04b1d23b82f9e7940d062b262c1eb7eb58e
+DIST rstudio-0.98.1028.tar.gz 15555649 SHA256 19827c3d05b4817530fb07f235fe38ec5e391324acd1d5d8ab6711d0db4757ef SHA512 db1be9f91263386ad0fb8addc80421434695d2c8dd53101af268e878fd59c59b9349cc9456d7096d2c660ee2681cd0172d8f4d8432ccf7322a1a2b473ce291fd WHIRLPOOL ab2974d2e529fea03fe641569d4b74a6eb1d86179be47de46531a970d5f70624824e08573835d531a5033d20f800117174926b83aee290f784ac31f7a9627d7d
+DIST rstudio-0.98.1091.tar.gz 15551758 SHA256 61745708096b5feb3d88befab65adf67dd386262cde1ef2b351f56695f5b9ac2 SHA512 6b2fcd7418118b8845266dc12ff4680623a68a8fdfda2bdc523e8cd30139e99fa29063438fbb441f23d04e57715eec1ee21763baf0ab77d313b763d8b3d9e3a0 WHIRLPOOL 356297217bdc70954b79695755fb873127e9b7c5a8ff2be18e237b559638aa1ec3c0349d8606598bd81e4057914e518748c236dc4a701d9a1f27805c2a4c7327
+DIST rstudio-0.98.490.tar.gz 14989329 SHA256 e38296a10b12c9e769a8be0545c36745999b9ba90942f7ffb6d27f05192a7f93 SHA512 b167083eb4adf1203da63299e61c9e3f40b8aeb4728d25c9d840f8a22659aad8de442dbba3a68e7d11f6157680d3a3636f6d5fecbabab82fd8d1a8278e3f1cb1 WHIRLPOOL d7c07aea3aef424aa9fa05f74b8222cae69b9ce287ba67d80591dc2a433471e7127d975119667560bf6667190d128b0ffcf82f641792075dacf826f4d76df568
+DIST rstudio-0.98.932.tar.gz 15515025 SHA256 e4a69a2f746cb7cfcacd3811f15e41a9d156175607da334f412614cc4cb70728 SHA512 beeb8c035d4f8524bd3e497162e3a218e92fbd1c1704ff3bc99a70a1248244155e3998272a6aa985b59cfa67c640adec877465f5d50acb9e47abca2657f2a06f WHIRLPOOL e422a2cef857aa9d094dd11e62b6c762a2a7477e7d84fd66456152c6521aebd94d4c365980ed6c06fc1c90d5a62426376d978de0ed23186d4732c0b148cc62bc
+DIST rstudio-0.98.953.tar.gz 15518231 SHA256 944f5882a0d61f551cd6f6cbe7882b5a5ea5be12d2c6d5ec9e79cee65869dbb7 SHA512 38a17d1abf91f4e775c4d735152fe6c8030b2df771bd7333fb3c9408fe14ac0b6180d7eaad7ac09ce2d50e5dcaa5a3b828909b30f507fd7c35fe27f7bd96866c WHIRLPOOL e2135f425b48b952282d8c44bd121517098521715c70537a6ac1a3be1732928666c5cb40fbc20b9f394a606e0e116723190790a202cbf62986ffbca528646058
+DIST rstudio-0.99.473.tar.gz 16993092 SHA256 a402995251393d50fa70e2e02188a8b32dc34e067f2f8461f087bf71f643585c SHA512 5615840501f7629e82100fee78c35b8d4dc78d78932d65c2e91a6472bc94726389566f5853a99e3d0631fd260e59acea5a40acf82f72709741b89a1ed3c901af WHIRLPOOL 809549c76efee8b29452584ab4295bcbbf533f8100c8caf4dd3b4a3c8843dc54a0d8f3178a6aecab5c188f2498a74daa6c6677fc6d43bd7dd861487c557e48df
+DIST rstudio-0.99.482.tar.gz 16992873 SHA256 1185d6ce5d3872e134f3255668d8f082370c760f06ec409c7b84c0936f52c4bf SHA512 bdb845cceae851d27323448a3570621bcb2aba7742e9e1669c88f3ebeaaade8c8371eb38f2ad348d7e2b740778c34f73e59013502ae3cebafba84e5d249c3e52 WHIRLPOOL 743440227c8d7e56000b1ff0b1a12def50e006b4f34d2067587274e2bae0eda42656787fc0cf6c51ffdbfcca08fc6eab0d042891bd77e4446b6fe26c6d19cc05
+DIST rstudio-0.99.483.tar.gz 16993049 SHA256 85ce1a2f40690e4ed0338b153a1b3279ce9564396d8c6d6201a0ad39297d4a9a SHA512 7d9cc8b471a4d799f286193da5f6f950f85e82949ede0f1ffe3626a429a49204878fb731250e5f54164a48e1d6e9cbb19a04a38ff83e35fd46c0ba05ef78a9bc WHIRLPOOL 0c5c1d86b0bafe9d5ca02397793f902b4dca7edc3f507a472b8b235f91965d8a769a7873cc87d834fbb121792b52eb6908018ce6579acdf3d285b6ec986abc20
+DIST rstudio-0.99.484.tar.gz 16993033 SHA256 8ca4abccb9b554713077cf1057ac13abadfd7606f22ac3386b2a88a38ae8a427 SHA512 407f50747bca749ef2c512e727cbe062abdd99c1eb76af09761e6bdfb4208f30117e1ee55b485447f64f6cf249bc939ef1fb4f8ce0199595e241a3cc617b4b8b WHIRLPOOL 8cc16553ea2703f005908c69803b64da4172092cb0b3ff9015e7ec354340fcd1cfa82a218ac890adffafe3565ead94bee6f7bd239b1c56ee38cbeb5896f556b0
+DIST rstudio-0.99.486.tar.gz 16992775 SHA256 4057195465e5032625bad0304bfbd9d123a78c3e4d6d5d41abcc6ef6ccd18a6f SHA512 bb88d12f8ae2f79779532371d03a698a2c2897c212c42c8438d5223c14e1033098dbd7c278a929958fa4bbc764a3ceb101abe03634f0e33192de44cf97128a1f WHIRLPOOL 13c35a69e525d90c6694d068526a2aede76a086427539294e46db67d0fc92759fb9cb0a1169cf88745ae1e121fdd7ba2e46bd2d2fb3fa17dc7fcc65848820941
+DIST rstudio-0.99.491.tar.gz 16992702 SHA256 e8c21e2262b610a7ccf39283b97d114bee33c6840a060067b8019404ff44b03f SHA512 2658694d6154f4b91b2dc07a7ec653edb7f593c4d9829a06a5e600e4db465ca6059418be6812d5ba2529fd6202dd136f0f58d74576f856fdcf6f81032d74f3c2 WHIRLPOOL e71650a07cc010ab3c25955c7fa9e90eee68577c1ef78e02a5f81a0160c688908ec5ec4fd89c89e5a9bc49b926623cd5de976fb249aa2d472354d23f5fad76de
+DIST rstudio-0.99.879.tar.gz 17406999 SHA256 73fa59be34eb63d9ed194642a93ad529d2c67cdcbcd2f291952fdef8e999a097 SHA512 c2bbe598a4a9c2abc69e39807af70be5729a06bbcb73bac5249f74f3c3daddb2909bf4a46d988f0d4bfeabe308f0c31d2a75aa28a52f11c1343dfcead07e2c45 WHIRLPOOL 5c9c75a7891ac53eb80a36eff518d77a0c281b16bff383526ac1ede07ee57486d7b00be4e400a0cad48dfea92729becf25c67f18782af7930f9b4218592afe5c
+DIST rstudio-0.99.893.tar.gz 17407634 SHA256 90a657b1fa16cfc575ca884789bac47f17832eb8b92496d044da3c5d79b0b874 SHA512 baa2a8c27e101e74b8a3f3b1cd290c90031881ae11fb44606b9af1efa4114c4c6fe68298f554d8b83f96418159477579414ddb99d49d2942c021aa0697947222 WHIRLPOOL a81ed5ee17a730e9674b2a98b95f87e70c532df95fda15402952901f7def24cc673db724841579e5dbf184a3e9fc16cfada93284b40014edf74863a61e0798a5
+DIST rstudio-0.99.896.tar.gz 17409121 SHA256 05fc7546ad1d21d7e6219538056ec2ee1b86d09b731a588198ce137d3fe25bae SHA512 c62df2a1c54f8c6d14b1239dd746b88693c11c48ec56aa5ae89023e98901793b0e65df44526cbc8c71036c0f73a512767cae086ed3777540b1ceda05e3398e17 WHIRLPOOL 7f4d0ebc8db509f09ccc15da02a4a426de431312f2dc65126bda76e11de0e106671fc7a83e9ea8e66b88f81268d0db8b44014a70744b30641bb58bedda73427d
+DIST rstudio-0.99.902.tar.gz 17408815 SHA256 703a3ebedbb4bb44d2cacffed2615b4f65156fcd4115029931eb5fd99950c689 SHA512 23db68f05900666287901d75f02006f7edacafab057d82a312b4e5aac639ef4b5db702420632f2768e509411bbfc73c32a533aa0f1b33379c10df82e009b974e WHIRLPOOL e7ef3cf0d9a414257c4c0c68809c674721f9513917bd450c9946133ee69dd735374417483c7dc380ee4d387119558c961d4ea815aac5bcd3fa22ee863556e0a4
+DIST rstudio-0.99.903.tar.gz 17409865 SHA256 8902fe7a6f7f6e0d6e8fae2472e479bb9cbe9cbb2e0747e5f01a093d31993a3c SHA512 9ddcfdab187c907dfa3cbf386ee902b43ba35c242b44a4190c58d1e3bad590ca428209423739768b57f759c4bde61ef2b5958fb3cba366d7740753c3c5dbf739 WHIRLPOOL 82ca64883d02aacc0c1081779f769c3ea2bbac3c370f1e62fba18465547742114df18d431f30c3fe449c0ae2ac212cd7dd98a72bb2e5810eb1fc6cdbb3c82a69
+DIST rstudio-1.0.136.tar.gz 17786389 SHA256 bb6a8aa475e09dd090cd2b5ea505f578d270858784120599aee5c10bd8ca58e8 SHA512 cb4f98834f287267925169c8141bd0f95fd23cefdba8f407f76a24617bc40da56430745f112774838345330b9f99b9cac86d5b99517346a019e8e2cb3b01f713 WHIRLPOOL 5932ef2572670951a094f79e8805215fd50c3643b4a4654cb469d7181708a3327763531cb68e968e64ebdb7b44df03da0c18f9a06a12d968e908bedc43dac52f
+DIST rstudio-1.0.143.tar.gz 17791067 SHA256 8ae88731b4474e5e2ff9030aa14e168903fe3a7ffc4fa716f497084a86801062 SHA512 46eaa88dd8332f18bb3a43de6e262d8a365860d9add78aea6a2d345784b239972c9c73bf0b56f1736b2981b8f688dbaf5a83c6848d170c0cf61d0e51dd636a82 WHIRLPOOL db1c11be240db3528e46d359c7d40d64068dfe5f7d915c4a6b690444f7f7fbc11f3898a6e262fa625bfab906f0cbfb2a8e3288a4fd20470423a99d992972fcda
+DIST rstudio-1.0.153.tar.gz 17790922 SHA256 79b90e21e56b114e28b03fd8543a208c55bb9d5f47a87fd29143d08b9a06f7a0 SHA512 d970a9bde88845e3fc6cdaff5233ffb65c03939c685c3fca0dd052246e065c7580b3f9bc4e053a79d2ecbb5f8c283d3fce7b97cc69e43176bd49587c736dab86 WHIRLPOOL c1f4c7bdc8e5a85af53411a35d736278b83f4732d2e273378fecc77cb075dff507147d56012682564edd58041c91cc051189eb38a7348d0827b76c7ac37bd54d
+DIST rstudio-1.0.44.tar.gz 17774065 SHA256 43ece6cfdd1a13ac0e17f2a50154a30a1a14ad6c1b3cf381cc6007988ce44a0f SHA512 a8b975dc517125a257e5f61db5bb137e133b02d738d55553770aa65e388cd112ce646b53b77dc069d1ca95ccd95979f4a57ad60b99fc3b91543cf61e737e8169 WHIRLPOOL 4ad472aed130451e81d8d8e3251d3bbd701a8b8e2fbddf17dc357f39335e33c75505f9443c2c7208e60a19c2767b9328134433e5d4fd22504813020712c658ef
+DIST selenium-java-2.37.0.zip 24625928 SHA256 0eebba65d8edb01c1f46e462907c58f5d6e1cb0ddf63660a9985c8432bdffbb7 SHA512 68624e82dbc751a25c50fad72702a98eb30d77fd4337d2a969f8e06bcc49e5f8c835cd27ec53772f3375014ddde1d5636936e966b75f3594a9f86aa18ba4e779 WHIRLPOOL eb6659aae26f3c78b6f998546b23d0636c9d00ed8a7f985db1463ac4bd483ccb3e643d84e2ca0f59e0636a8de79eb552ff1d68eb6f9c06907029f7552d8f7777
+DIST selenium-server-standalone-2.37.0.jar 34730734 SHA256 97bc8c699037fb6e99ba7af570fb60dbb1b7ce30cde2448287a44ef65b13023e SHA512 b215446d42d2d1f69664349b6ae6dc53a532d3624c91254f0f4183d0ad764648792e5cc1126a55a1e60d9687d55200fed01d6d2f46cc3d853b1fa6ee38111018 WHIRLPOOL 20640591534f31f24825a9ed139589b182e8b60d86541bf0be104d3cc0280983f6566bd0459f2253ac3875b48a2798b205bac8f815a119fff6db625ce9bbc29e
+DIST shinyapps-0.98.1000.tar.gz 910095 SHA256 b95c512ae0a0fb4335878d9cfcf9073e2cb3ccfed73543abe27ea8878ed36d57 SHA512 3162317c4c20cfc1497e952a8235867084d629ae88407e6c465b3e208adb1dc97abfe6b9922e0374ddf4c8e38a76e112942bd312c54a66f74e6f2a3fe4c0a07c WHIRLPOOL ecc2bce78387cb42e9989163d8fca29220e66f085acde3323417058aebb624dafa8c0e1873c7d79e67324cbd5aad250ef9fcdbbc8f659d64482233b95d898a15
+EBUILD rstudio-0.97.336.ebuild 3883 SHA256 716effc57c4c7b8c333ef62fafc9e3fbd8e518079f2d5afc74a96e2fffc6fceb SHA512 020c421da22404c6ca76fcf648c612c09cfffb7664cbe12462eb226f7c587be62e811de7c3efe66dd4f6a7126d1dc1f5217c84135879e781361768b1b6658b0d WHIRLPOOL 886bfd988ae2248dbbc60742c7db35901aa713d83a879f34cf71fcafc2981d0f91dba594fe0c346b5e1f40076d8a02d56b096bf68c219cc12acd6b8b416fbacb
+EBUILD rstudio-0.97.551.ebuild 3883 SHA256 716effc57c4c7b8c333ef62fafc9e3fbd8e518079f2d5afc74a96e2fffc6fceb SHA512 020c421da22404c6ca76fcf648c612c09cfffb7664cbe12462eb226f7c587be62e811de7c3efe66dd4f6a7126d1dc1f5217c84135879e781361768b1b6658b0d WHIRLPOOL 886bfd988ae2248dbbc60742c7db35901aa713d83a879f34cf71fcafc2981d0f91dba594fe0c346b5e1f40076d8a02d56b096bf68c219cc12acd6b8b416fbacb
+EBUILD rstudio-0.98.1028.ebuild 4662 SHA256 10af5dd192cbdc3408b1d753ae2c7e6b98effab31a081e605b8a1c96b513bc42 SHA512 418c6639f6f000706355d5c0b522e81f02a0359b3ca84cbf0a9842d55bd7f8d17a369c68167b230e7300a581653428bee3cd24713529a0199ff88d94dd38dd29 WHIRLPOOL b2910c9c1a262de040c1d5852dc6e80b77a9f65ba38059560f8f1eddfe09a6bbb29c72bdbc4d35e64a090d9aea11abc292d1137d2a413c342e725b5b578f4648
+EBUILD rstudio-0.98.1091.ebuild 6041 SHA256 619b84fcc218b6723c87d0a404f391fde43c7bb704f7540b32eb53ee3a2357a5 SHA512 38dfc7495eb86ee8436fb388e2212df7aa21f3615f05127403015e214e59297bdf94de0c30f22c93a5ae9db85b541d73a253bed17355edad3f83ab1379d5c2ab WHIRLPOOL 420aa7ac88e3219a915d0a4ae7be2ec5ab8234da3dffa62e2a0f23c20fd08f35888a7b2740f032bbc7b53becd62cb6a975318b3071aabd25c9a195a7b427f0fd
+EBUILD rstudio-0.98.490-r1.ebuild 3291 SHA256 8d0124fca469deecc9d80ef4be905a48905b7f1ec62221a3db22af6cf4eaeea2 SHA512 3d8f408f9eec0a3fb8df580572114fb33db9e6c3c561d72fffee158113813f1f0ac944e307824d8ddcf91bcc61f9001b4e7bad57a23235d58b4f32b3a496bd1f WHIRLPOOL fe6102bf95fbe4e2df7930a116ef18afede38f5f6542ee3f4fa65df3f6e17d48092849667813c57a302c823e16cb486e89b460f3c7a8b18fd73ec7747860414d
+EBUILD rstudio-0.98.490.ebuild 3810 SHA256 b482f8181e6b9e2273349cd62e24ab5a3365ec29c027ac9ee003d0dfb94a15c4 SHA512 2b84fc7b013076526fad78e1f279089cb259c845ba36a8ada2e552d9e75ff425a6c6f54c79badd6bd1b72af2fdb6b0e72be7088bb2dbb88c81f7851614841461 WHIRLPOOL a58ac7110e6d81add426e44b4fce6200cafc981596f1f0a530f84b29d9d5981489d005c26d6be5362debff3b9295c4c0ed689b80268d6a9927c958deb4dbce02
+EBUILD rstudio-0.98.932.ebuild 5057 SHA256 ce7c40b20c854091e5e9a92b042bb443a38829fee8fe1ab6d1e97e37c1c5018e SHA512 7b4f7c35c20c290b2dd6b843957b4abd92ff504222b437c0207fb69b7bac2582a03d6ddb91ed850c8d69e37422b7630afc2cb7034c8602b64c586a6a82fb48bb WHIRLPOOL d52a04fe50b31fc8824fd38900a557cf92d8872609704e0b4b5f8d392d7b1833a30c3092f3ee9a16510d11e7e1b5790660feaa5aa3d8b34e0c450a2dff3f9b2f
+EBUILD rstudio-0.98.953.ebuild 5098 SHA256 225c82d85ff08107f2a59fb8c6cd2932072a7212016269c66c2d5a0314add14b SHA512 b23e382098450b805ecdfe3b3ea5765e7b6d59eb66fb359b07687e927eb6bc346d6db3e03aca01438ef91506abc01fe28896222fa38e6632079dc06282bd989c WHIRLPOOL 90fb55b830fcaf81b2d42329bcee3ca97e601398b654be71ea8722ff5d77746bbbf51a2a9d5e0af77b48d142913a5baad046cd593aa567b8109cc7b244aaf253
+EBUILD rstudio-0.99.473-r1.ebuild 8050 SHA256 c6667b6d549cc57bb7b8515111dbc05d735ab0d3ffb74114d0f10b373fa64f9a SHA512 9106ce74affd22edc748c31dea1196e8b84efc3e4814426eb25d37864689f576507bda5b91fad6fd56631073a3f120022c55408226ef0f54df5520842dfbc4e6 WHIRLPOOL d47e7efeeadb8f910fb6fed93dbf34a215f3c07ad55e379d3a5bc156ce7bf0f02a84e81ce26c3e73b68329f4e38e79ce6eed5c68bac90066d68bd6233ce78434
+EBUILD rstudio-0.99.482.ebuild 8050 SHA256 c6667b6d549cc57bb7b8515111dbc05d735ab0d3ffb74114d0f10b373fa64f9a SHA512 9106ce74affd22edc748c31dea1196e8b84efc3e4814426eb25d37864689f576507bda5b91fad6fd56631073a3f120022c55408226ef0f54df5520842dfbc4e6 WHIRLPOOL d47e7efeeadb8f910fb6fed93dbf34a215f3c07ad55e379d3a5bc156ce7bf0f02a84e81ce26c3e73b68329f4e38e79ce6eed5c68bac90066d68bd6233ce78434
+EBUILD rstudio-0.99.483.ebuild 8050 SHA256 c6667b6d549cc57bb7b8515111dbc05d735ab0d3ffb74114d0f10b373fa64f9a SHA512 9106ce74affd22edc748c31dea1196e8b84efc3e4814426eb25d37864689f576507bda5b91fad6fd56631073a3f120022c55408226ef0f54df5520842dfbc4e6 WHIRLPOOL d47e7efeeadb8f910fb6fed93dbf34a215f3c07ad55e379d3a5bc156ce7bf0f02a84e81ce26c3e73b68329f4e38e79ce6eed5c68bac90066d68bd6233ce78434
+EBUILD rstudio-0.99.484.ebuild 8050 SHA256 c6667b6d549cc57bb7b8515111dbc05d735ab0d3ffb74114d0f10b373fa64f9a SHA512 9106ce74affd22edc748c31dea1196e8b84efc3e4814426eb25d37864689f576507bda5b91fad6fd56631073a3f120022c55408226ef0f54df5520842dfbc4e6 WHIRLPOOL d47e7efeeadb8f910fb6fed93dbf34a215f3c07ad55e379d3a5bc156ce7bf0f02a84e81ce26c3e73b68329f4e38e79ce6eed5c68bac90066d68bd6233ce78434
+EBUILD rstudio-0.99.486-r1.ebuild 8331 SHA256 1867ade0251aa4fc6dde44f1b9c698a12e052100b7922f1dd000453a8e74a8fe SHA512 3f08f3e1a3a0bca7ebbd68cbfc92a5e986940419d8e73d75a57639b3accd08498d31481f29ed01405173ff3701b1ad11d047ce674e7f228e3b120e5bcb44c221 WHIRLPOOL fff2b2c3626c7dc1fa1195fd0b17c65391ddbfdb358e80e45c104113b9a2e760a83cbf2c504e524217447c34a41926c2cfe4d9616f97180117db6d2d217da3f8
+EBUILD rstudio-0.99.491.ebuild 8331 SHA256 1867ade0251aa4fc6dde44f1b9c698a12e052100b7922f1dd000453a8e74a8fe SHA512 3f08f3e1a3a0bca7ebbd68cbfc92a5e986940419d8e73d75a57639b3accd08498d31481f29ed01405173ff3701b1ad11d047ce674e7f228e3b120e5bcb44c221 WHIRLPOOL fff2b2c3626c7dc1fa1195fd0b17c65391ddbfdb358e80e45c104113b9a2e760a83cbf2c504e524217447c34a41926c2cfe4d9616f97180117db6d2d217da3f8
+EBUILD rstudio-0.99.879.ebuild 8316 SHA256 901991c7bd1b93a0eecb7c64e391f80511075a035691ee301b71d1d57273d751 SHA512 e9bdae74dd64a90bc8d90f0720b2bf275d0e3c71db2c3a203c1525098fb77f700902ba798f4df36cfbc591b88978500a7191abf1db40d0fd19af15ea626bb32f WHIRLPOOL d158e84d28cbce5cd3a7c589eb8c8471e37ce268f85a08b917cfd6829b7e25b366eee4e676fb899f3e1cdbd0314869c6decd13702cee11a6a952803719671783
+EBUILD rstudio-0.99.893.ebuild 8316 SHA256 3b9e66f514c0b1425d979d45659fe755475d181a03694e26d2a753c3e5abb154 SHA512 4e11ef2c103e25c443d904355a1d48b6ebed83ade801d02a15399292155cf1d6af50a69829d8bec5663878bece6d7f501d06440897829e33c8613d7fd80c2441 WHIRLPOOL 23b7db6ea2f21bfd8c512d694ff8634ddbcb2a9b863ce61e409868e9443998f8955acef49173050e9d96a707e0ce8b4a7c920aff5ee4497468438ff6e4191485
+EBUILD rstudio-0.99.896.ebuild 8316 SHA256 01c6f7bf8fbcf2314cfce4caf096f4f40e3f8c75c7dca6ffb0be5f13bc8954ec SHA512 8e77e5c2ef7be26e4ec9fba4007d327935e1fb9bfc3f187e16a0110369e1f8746e7b1bf1f5167fcafd05ad4f17ff3dcd82b4685a66ca22964389ccaa4b17f425 WHIRLPOOL 1c505f89839cdb67e402a6700ac1b7c7fef93bb2a9c676857fcd9a6d6e219570dff9217e1add6cc0829dd8bf16421f267a2312dd510e62bf2fc05aa85419e513
+EBUILD rstudio-0.99.902.ebuild 8316 SHA256 bf052400486fa62702ac895fca8c511b8b0075ba95587216c04504b45d15b921 SHA512 0d573882f2557e37fddeb5a75ce9187150a5247625b3ff75556a9b07c9afb1ccb2319c042aeb5380d54dd007d836cc8f2df9c5d34324e708d6a0be96959ba3e1 WHIRLPOOL 581b193a52da89cbf36d1de9c13b9595b913598d0116a57b12106cadd7b1ceab23ea9a821361f0b4c8df4b5fabc67233a98ec272971ee59ccd733806347edc63
+EBUILD rstudio-0.99.903.ebuild 8335 SHA256 8cf735d80f6083e5c6f8ef9d68884d1dbe101a793bb577b97d3d120ee9bdc160 SHA512 1ae8e6b50cfd5f78303607746999ea9e5507aef504964d9382628f1c26878161c7beba2e4b1d68e48ab77e994c2ba7880689722eaef108652a996eabb2fc4a91 WHIRLPOOL c500123d8fc438a8736d3ab28ad061dcf6b90b450be3ce4b1adbac9c9a714bc198acfb425bd9f5d0edb3e5cc4c209a953903f0c9b2b59ee1cfee1b247962d5c4
+EBUILD rstudio-1.0.136.ebuild 8318 SHA256 0d5aa29e848b567bc13475a5e81d0dc198147dbdca5d05f2c7de6b577cf944cf SHA512 2e18400a80692509cf5381ea93c322245697e3ee9354aa50c0fb752b3332a5a6db25f0c5df51165202869795fc87a876abe2a370c1be32a41401ec7f911908de WHIRLPOOL b3f584ad5e38a433bd086712bfab22253496d6e1b12b2a2ec3bd8d3f33ed0d596b850118a95049254862047accda829c6b5b55705cb1b5101740301ea97b7cab
+EBUILD rstudio-1.0.143.ebuild 8318 SHA256 0d5aa29e848b567bc13475a5e81d0dc198147dbdca5d05f2c7de6b577cf944cf SHA512 2e18400a80692509cf5381ea93c322245697e3ee9354aa50c0fb752b3332a5a6db25f0c5df51165202869795fc87a876abe2a370c1be32a41401ec7f911908de WHIRLPOOL b3f584ad5e38a433bd086712bfab22253496d6e1b12b2a2ec3bd8d3f33ed0d596b850118a95049254862047accda829c6b5b55705cb1b5101740301ea97b7cab
+EBUILD rstudio-1.0.153.ebuild 8318 SHA256 0d5aa29e848b567bc13475a5e81d0dc198147dbdca5d05f2c7de6b577cf944cf SHA512 2e18400a80692509cf5381ea93c322245697e3ee9354aa50c0fb752b3332a5a6db25f0c5df51165202869795fc87a876abe2a370c1be32a41401ec7f911908de WHIRLPOOL b3f584ad5e38a433bd086712bfab22253496d6e1b12b2a2ec3bd8d3f33ed0d596b850118a95049254862047accda829c6b5b55705cb1b5101740301ea97b7cab
+EBUILD rstudio-1.0.44.ebuild 8318 SHA256 0d5aa29e848b567bc13475a5e81d0dc198147dbdca5d05f2c7de6b577cf944cf SHA512 2e18400a80692509cf5381ea93c322245697e3ee9354aa50c0fb752b3332a5a6db25f0c5df51165202869795fc87a876abe2a370c1be32a41401ec7f911908de WHIRLPOOL b3f584ad5e38a433bd086712bfab22253496d6e1b12b2a2ec3bd8d3f33ed0d596b850118a95049254862047accda829c6b5b55705cb1b5101740301ea97b7cab
+MISC ChangeLog 8907 SHA256 459e4ab51e87acfac9f99eb1c080fe9f34ad5c9e57970b43e4c1cf58b7e62985 SHA512 73e5e23815cb427fb52411f57da406406b602190616ec9a02176aef0a8ce927a27f11d63ebc06fb5ebde1225997999200f1e662c9affa105f2e874cc23e257dd WHIRLPOOL 96c1c0e04217317cf7f662584bece57828f5dc5b39317e34559acd12133c0e87dedc018f2849f40c20ed341deb6652c86cd71658974697e4ba59ea4983903f29
+MISC ChangeLog-2015 5297 SHA256 b7d149869d58c687ab524a33726c4f4df1163475ed6af648fd5eba8e88bc1910 SHA512 cb38d57dc56ec46860e738aa1cd5a8206cc1d74758181900b2cfe60c837160365fec38e68fedf071a16c2296499da7b438cb435487d192b0d52d81e20a7605f2 WHIRLPOOL b3d4cb4b14afeae885e1265bfdc1700061b583152a62db5c4e64add96f0e2e9e3dc3ad6f53397283c85b7eea9fecce589373d392f2f4f3ea94f73267439d3927
+MISC metadata.xml 589 SHA256 9a4c84314097c0bbd3fcd933f22aea585936d114b700c65d5baef3171bb57dc9 SHA512 c2c0e93e8845248cf23b1c85d3373c6c79c5994e077c7ab4050f6460f7852c8ed154b53605acb4495e2b7b7416fddc475a83037511231efb14075b69f9a03b5f WHIRLPOOL bb6aec9bcdf862d61b5f19c7d74a1cf3b45538540825402d253237788b9b93578da51921aa231cdb1455e72f0065eb28d03fc3b4d6d5e98b3367d6f0f9cc04ab
diff --git a/sci-mathematics/rstudio/files/rsession.conf b/sci-mathematics/rstudio/files/rsession.conf
new file mode 100644
index 000000000000..645bfa46b208
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rsession.conf
@@ -0,0 +1,26 @@
+######rsession.conf############
+# Session Timeouts
+# By default if a user hasn't issued a command for 2 hours
+# RStudio will suspend that user's R session to disk so
+# they are no longer consuming server resources (the next
+# time the user attempts to access the server their session
+# will be restored). You can change the timeout (including
+# disabling it by specifying a value of 0) using the
+# session-timeout-minutes setting
+#session-timeout-minutes=30
+
+# By default RStudio sets the R_LIBS_USER environment
+# variable to ~/R/library. This ensures that packages
+# installed by end users do not have R version numbers
+# encoded in the path (which is the default behavior).
+# This in turn enables administrators to upgrade the version
+# of R on the server without reseting users installed packages
+# (which would occur if the installed packages were in an
+# R-version derived directory).
+# If you wish to override this behavior you can do so using
+# the r-libs-user settings
+#r-libs-user=~/R/packages
+
+# You can set the default CRAN repository for the server
+# using the r-cran-repos setting
+#r-cran-repos=http://cran.case.edu/
diff --git a/sci-mathematics/rstudio/files/rstudio-0.97.336-boost-1.53.patch b/sci-mathematics/rstudio/files/rstudio-0.97.336-boost-1.53.patch
new file mode 100644
index 000000000000..38bb63a8ab61
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.97.336-boost-1.53.patch
@@ -0,0 +1,64 @@
+=== modified file 'src/cpp/core/include/core/http/AsyncServer.hpp'
+--- src/cpp/core/include/core/http/AsyncServer.hpp 2013-07-09 12:02:58 +0000
++++ src/cpp/core/include/core/http/AsyncServer.hpp 2013-07-09 12:03:34 +0000
+@@ -264,7 +264,7 @@
+
+ // convert to cannonical HttpConnection
+ boost::shared_ptr<AsyncConnection> pAsyncConnection =
+- boost::shared_static_cast<AsyncConnection>(pConnection);
++ boost::static_pointer_cast<AsyncConnection>(pConnection);
+
+ // call the appropriate handler to generate a response
+ std::string uri = pRequest->uri();
+
+=== modified file 'src/cpp/core/include/core/http/LocalStreamAsyncClient.hpp'
+--- src/cpp/core/include/core/http/LocalStreamAsyncClient.hpp 2013-07-09 12:02:58 +0000
++++ src/cpp/core/include/core/http/LocalStreamAsyncClient.hpp 2013-07-09 12:03:36 +0000
+@@ -87,7 +87,7 @@
+ boost::shared_ptr<AsyncClient<boost::asio::local::stream_protocol::socket> >
+ ptrShared = shared_from_this();
+
+- return boost::shared_static_cast<LocalStreamAsyncClient>(ptrShared);
++ return boost::static_pointer_cast<LocalStreamAsyncClient>(ptrShared);
+ }
+
+ private:
+
+=== modified file 'src/cpp/core/include/core/http/TcpIpAsyncClient.hpp'
+--- src/cpp/core/include/core/http/TcpIpAsyncClient.hpp 2013-07-09 12:02:58 +0000
++++ src/cpp/core/include/core/http/TcpIpAsyncClient.hpp 2013-07-09 12:03:32 +0000
+@@ -74,7 +74,7 @@
+ boost::shared_ptr<AsyncClient<boost::asio::ip::tcp::socket> > ptrShared
+ = shared_from_this();
+
+- return boost::shared_static_cast<TcpIpAsyncClient>(ptrShared);
++ return boost::static_pointer_cast<TcpIpAsyncClient>(ptrShared);
+ }
+
+ private:
+
+=== modified file 'src/cpp/core/include/core/http/TcpIpAsyncClientSsl.hpp'
+--- src/cpp/core/include/core/http/TcpIpAsyncClientSsl.hpp 2013-07-09 12:02:58 +0000
++++ src/cpp/core/include/core/http/TcpIpAsyncClientSsl.hpp 2013-07-09 12:03:39 +0000
+@@ -109,7 +109,7 @@
+ boost::shared_ptr<AsyncClient<boost::asio::ssl::stream<boost::asio::ip::tcp::socket> > > ptrShared
+ = shared_from_this();
+
+- return boost::shared_static_cast<TcpIpAsyncClientSsl>(ptrShared);
++ return boost::static_pointer_cast<TcpIpAsyncClientSsl>(ptrShared);
+ }
+
+ virtual bool isShutdownError(const boost::system::error_code& ec)
+
+=== modified file 'src/cpp/session/http/SessionHttpConnectionListenerImpl.hpp'
+--- src/cpp/session/http/SessionHttpConnectionListenerImpl.hpp 2013-07-09 12:02:58 +0000
++++ src/cpp/session/http/SessionHttpConnectionListenerImpl.hpp 2013-07-09 12:03:29 +0000
+@@ -256,7 +256,7 @@
+ {
+ // convert to cannonical HttpConnection
+ boost::shared_ptr<HttpConnection> ptrHttpConnection =
+- boost::shared_static_cast<HttpConnection>(ptrConnection);
++ boost::static_pointer_cast<HttpConnection>(ptrConnection);
+
+ if (!authenticate(ptrHttpConnection))
+ {
diff --git a/sci-mathematics/rstudio/files/rstudio-0.97.336-linker_flags.patch b/sci-mathematics/rstudio/files/rstudio-0.97.336-linker_flags.patch
new file mode 100644
index 000000000000..a336fccbc981
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.97.336-linker_flags.patch
@@ -0,0 +1,18 @@
+Some gcc hardening options were added, however since we add
+"-Wl,--as-needed" we end up with "-Wl,--as-needed;-Wl,-z,relro" which
+leads to linker errors about unknown options, if we make it so the
+as-needed option is the last option on the line, everything is fine.
+
+diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
+index 0589ca0..fe5bd5f 100644
+--- a/src/cpp/CMakeLists.txt
++++ b/src/cpp/CMakeLists.txt
+@@ -57,7 +57,7 @@ if(UNIX)
+ add_definitions(-D_FORTIFY_SOURCE=2)
+ add_definitions(-fstack-protector --param ssp-buffer-size=4)
+ add_definitions(-pie -fPIE)
+- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro,-z,now")
++ set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,relro,-z,now ${CMAKE_EXE_LINKER_FLAGS}")
+ endif()
+
+ # Win32 specific global directives
diff --git a/sci-mathematics/rstudio/files/rstudio-0.97.336-paths.patch b/sci-mathematics/rstudio/files/rstudio-0.97.336-paths.patch
new file mode 100644
index 000000000000..7b44374a72d2
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.97.336-paths.patch
@@ -0,0 +1,112 @@
+change the install path, as by default everything is dumped right under
+the prefix. After fixing install paths, now fix the source so the
+program can find the moved resources.
+
+diff --git a/CMakeGlobals.txt b/CMakeGlobals.txt
+index da74970..1537bff 100644
+--- a/CMakeGlobals.txt
++++ b/CMakeGlobals.txt
+@@ -103,7 +103,7 @@ else()
+ else()
+ set(RSTUDIO_INSTALL_BIN bin)
+ endif()
+- set(RSTUDIO_INSTALL_SUPPORTING .)
++ set(RSTUDIO_INSTALL_SUPPORTING ${DISTRO_SHARE})
+ endif()
+
+ # if the install prefix is /usr/local then tweak as appropriate
+diff --git a/src/cpp/server/CMakeLists.txt b/src/cpp/server/CMakeLists.txt
+index af4db1c..96b767e 100644
+--- a/src/cpp/server/CMakeLists.txt
++++ b/src/cpp/server/CMakeLists.txt
+@@ -142,7 +142,7 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}
+- DESTINATION ${RSERVER_INITD_DEBIAN_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_DEBIAN_DIR})
+
+ # install configured redhat init.d script
+ set(RSERVER_INITD_REDHAT_DIR "extras/init.d/redhat")
+@@ -150,7 +150,7 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}
+- DESTINATION ${RSERVER_INITD_REDHAT_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_REDHAT_DIR})
+
+ # install configured suse init.d script
+ set(RSERVER_INITD_SUSE_DIR "extras/init.d/suse")
+@@ -158,13 +158,13 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_SUSE_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT}
+- DESTINATION ${RSERVER_INITD_SUSE_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_SUSE_DIR})
+
+ # install pam profile
+ set(RSERVER_PAM_DIR "extras/pam")
+ set(RSERVER_PAM_PROFILE "${RSERVER_PAM_DIR}/rstudio")
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_PAM_PROFILE}
+- DESTINATION ${RSERVER_PAM_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_PAM_DIR})
+
+ # install configured apparmor profile
+ set(RSERVER_APPARMOR_DIR "extras/apparmor")
+@@ -172,9 +172,9 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE}
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+ install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_DIR}/apparmor-profile-load
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+
+ # install configured upstart profile
+ set(RSERVER_UPSTART_DIR "extras/upstart")
+@@ -182,6 +182,6 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE}
+- DESTINATION ${RSERVER_UPSTART_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+
+ endif()
+diff --git a/src/cpp/server/ServerOptions.cpp b/src/cpp/server/ServerOptions.cpp
+index 77a63f1..f0d25f0 100644
+--- a/src/cpp/server/ServerOptions.cpp
++++ b/src/cpp/server/ServerOptions.cpp
+@@ -201,7 +201,7 @@ ProgramStatus Options::read(int argc, char * const argv[])
+
+ // convert relative paths by completing from the system installation
+ // path (this allows us to be relocatable)
+- resolvePath(installPath, &wwwLocalPath_);
++ resolvePath(installPath.childPath(DISTRO_SHARE), &wwwLocalPath_);
+ resolvePath(installPath, &authPamHelperPath_);
+ resolvePath(installPath, &rsessionPath_);
+ resolvePath(installPath, &rldpathPath_);
+diff --git a/src/cpp/session/SessionOptions.cpp b/src/cpp/session/SessionOptions.cpp
+index 0df1081..777cc6a 100644
+--- a/src/cpp/session/SessionOptions.cpp
++++ b/src/cpp/session/SessionOptions.cpp
+@@ -333,12 +333,12 @@ core::ProgramStatus Options::read(int argc, char * const argv[])
+
+ // convert relative paths by completing from the app resource path
+- resolvePath(resourcePath, &rResourcesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &rResourcesPath_);
+ resolvePath(resourcePath, &agreementFilePath_);
+- resolvePath(resourcePath, &wwwLocalPath_);
+- resolvePath(resourcePath, &coreRSourcePath_);
+- resolvePath(resourcePath, &modulesRSourcePath_);
+- resolvePath(resourcePath, &sessionLibraryPath_);
+- resolvePath(resourcePath, &sessionPackagesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &coreRSourcePath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &modulesRSourcePath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &sessionLibraryPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &sessionPackagesPath_);
+ resolvePostbackPath(resourcePath, &rpostbackPath_);
+ #ifdef _WIN32
+ resolvePath(resourcePath, &consoleIoPath_);
+
diff --git a/sci-mathematics/rstudio/files/rstudio-0.97.336-prefs.patch b/sci-mathematics/rstudio/files/rstudio-0.97.336-prefs.patch
new file mode 100644
index 000000000000..3175d47235ab
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.97.336-prefs.patch
@@ -0,0 +1,24 @@
+And now we fix src/gwt/build.xml since java's user preference class is
+braindead and insists on writing where it is not allowed.
+much thanks to http://www.allaboutbalance.com/articles/disableprefs/
+
+diff --git a/src/gwt/build.xml b/src/gwt/build.xml
+index e7d2418..ae3a331 100644
+--- a/src/gwt/build.xml
++++ b/src/gwt/build.xml
+@@ -25,6 +25,7 @@
+ <property name="gwt.extra.args" value=""/>
+ <property name="gwt.main.module" value="org.rstudio.studio.RStudio"/>
+ <property name="ace.bin" value="src/org/rstudio/studio/client/workbench/views/source/editors/text/ace"/>
++ <property environment="env"/>
+
+ <path id="project.class.path">
+ <pathelement location="bin"/>
+@@ -109,6 +110,7 @@
+ </classpath>
+ <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
+ <jvmarg value="-Xmx1024M"/>
++ <jvmarg value="-Djava.util.prefs.userRoot=${env.T}"/>
+ <arg value="-war"/>
+ <arg value="www"/>
+ <arg value="-localWorkers"/>
diff --git a/sci-mathematics/rstudio/files/rstudio-0.97.551-boost-1.53.patch b/sci-mathematics/rstudio/files/rstudio-0.97.551-boost-1.53.patch
new file mode 100644
index 000000000000..38bb63a8ab61
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.97.551-boost-1.53.patch
@@ -0,0 +1,64 @@
+=== modified file 'src/cpp/core/include/core/http/AsyncServer.hpp'
+--- src/cpp/core/include/core/http/AsyncServer.hpp 2013-07-09 12:02:58 +0000
++++ src/cpp/core/include/core/http/AsyncServer.hpp 2013-07-09 12:03:34 +0000
+@@ -264,7 +264,7 @@
+
+ // convert to cannonical HttpConnection
+ boost::shared_ptr<AsyncConnection> pAsyncConnection =
+- boost::shared_static_cast<AsyncConnection>(pConnection);
++ boost::static_pointer_cast<AsyncConnection>(pConnection);
+
+ // call the appropriate handler to generate a response
+ std::string uri = pRequest->uri();
+
+=== modified file 'src/cpp/core/include/core/http/LocalStreamAsyncClient.hpp'
+--- src/cpp/core/include/core/http/LocalStreamAsyncClient.hpp 2013-07-09 12:02:58 +0000
++++ src/cpp/core/include/core/http/LocalStreamAsyncClient.hpp 2013-07-09 12:03:36 +0000
+@@ -87,7 +87,7 @@
+ boost::shared_ptr<AsyncClient<boost::asio::local::stream_protocol::socket> >
+ ptrShared = shared_from_this();
+
+- return boost::shared_static_cast<LocalStreamAsyncClient>(ptrShared);
++ return boost::static_pointer_cast<LocalStreamAsyncClient>(ptrShared);
+ }
+
+ private:
+
+=== modified file 'src/cpp/core/include/core/http/TcpIpAsyncClient.hpp'
+--- src/cpp/core/include/core/http/TcpIpAsyncClient.hpp 2013-07-09 12:02:58 +0000
++++ src/cpp/core/include/core/http/TcpIpAsyncClient.hpp 2013-07-09 12:03:32 +0000
+@@ -74,7 +74,7 @@
+ boost::shared_ptr<AsyncClient<boost::asio::ip::tcp::socket> > ptrShared
+ = shared_from_this();
+
+- return boost::shared_static_cast<TcpIpAsyncClient>(ptrShared);
++ return boost::static_pointer_cast<TcpIpAsyncClient>(ptrShared);
+ }
+
+ private:
+
+=== modified file 'src/cpp/core/include/core/http/TcpIpAsyncClientSsl.hpp'
+--- src/cpp/core/include/core/http/TcpIpAsyncClientSsl.hpp 2013-07-09 12:02:58 +0000
++++ src/cpp/core/include/core/http/TcpIpAsyncClientSsl.hpp 2013-07-09 12:03:39 +0000
+@@ -109,7 +109,7 @@
+ boost::shared_ptr<AsyncClient<boost::asio::ssl::stream<boost::asio::ip::tcp::socket> > > ptrShared
+ = shared_from_this();
+
+- return boost::shared_static_cast<TcpIpAsyncClientSsl>(ptrShared);
++ return boost::static_pointer_cast<TcpIpAsyncClientSsl>(ptrShared);
+ }
+
+ virtual bool isShutdownError(const boost::system::error_code& ec)
+
+=== modified file 'src/cpp/session/http/SessionHttpConnectionListenerImpl.hpp'
+--- src/cpp/session/http/SessionHttpConnectionListenerImpl.hpp 2013-07-09 12:02:58 +0000
++++ src/cpp/session/http/SessionHttpConnectionListenerImpl.hpp 2013-07-09 12:03:29 +0000
+@@ -256,7 +256,7 @@
+ {
+ // convert to cannonical HttpConnection
+ boost::shared_ptr<HttpConnection> ptrHttpConnection =
+- boost::shared_static_cast<HttpConnection>(ptrConnection);
++ boost::static_pointer_cast<HttpConnection>(ptrConnection);
+
+ if (!authenticate(ptrHttpConnection))
+ {
diff --git a/sci-mathematics/rstudio/files/rstudio-0.97.551-linker_flags.patch b/sci-mathematics/rstudio/files/rstudio-0.97.551-linker_flags.patch
new file mode 100644
index 000000000000..a336fccbc981
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.97.551-linker_flags.patch
@@ -0,0 +1,18 @@
+Some gcc hardening options were added, however since we add
+"-Wl,--as-needed" we end up with "-Wl,--as-needed;-Wl,-z,relro" which
+leads to linker errors about unknown options, if we make it so the
+as-needed option is the last option on the line, everything is fine.
+
+diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
+index 0589ca0..fe5bd5f 100644
+--- a/src/cpp/CMakeLists.txt
++++ b/src/cpp/CMakeLists.txt
+@@ -57,7 +57,7 @@ if(UNIX)
+ add_definitions(-D_FORTIFY_SOURCE=2)
+ add_definitions(-fstack-protector --param ssp-buffer-size=4)
+ add_definitions(-pie -fPIE)
+- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro,-z,now")
++ set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,relro,-z,now ${CMAKE_EXE_LINKER_FLAGS}")
+ endif()
+
+ # Win32 specific global directives
diff --git a/sci-mathematics/rstudio/files/rstudio-0.97.551-paths.patch b/sci-mathematics/rstudio/files/rstudio-0.97.551-paths.patch
new file mode 100644
index 000000000000..7b44374a72d2
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.97.551-paths.patch
@@ -0,0 +1,112 @@
+change the install path, as by default everything is dumped right under
+the prefix. After fixing install paths, now fix the source so the
+program can find the moved resources.
+
+diff --git a/CMakeGlobals.txt b/CMakeGlobals.txt
+index da74970..1537bff 100644
+--- a/CMakeGlobals.txt
++++ b/CMakeGlobals.txt
+@@ -103,7 +103,7 @@ else()
+ else()
+ set(RSTUDIO_INSTALL_BIN bin)
+ endif()
+- set(RSTUDIO_INSTALL_SUPPORTING .)
++ set(RSTUDIO_INSTALL_SUPPORTING ${DISTRO_SHARE})
+ endif()
+
+ # if the install prefix is /usr/local then tweak as appropriate
+diff --git a/src/cpp/server/CMakeLists.txt b/src/cpp/server/CMakeLists.txt
+index af4db1c..96b767e 100644
+--- a/src/cpp/server/CMakeLists.txt
++++ b/src/cpp/server/CMakeLists.txt
+@@ -142,7 +142,7 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}
+- DESTINATION ${RSERVER_INITD_DEBIAN_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_DEBIAN_DIR})
+
+ # install configured redhat init.d script
+ set(RSERVER_INITD_REDHAT_DIR "extras/init.d/redhat")
+@@ -150,7 +150,7 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}
+- DESTINATION ${RSERVER_INITD_REDHAT_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_REDHAT_DIR})
+
+ # install configured suse init.d script
+ set(RSERVER_INITD_SUSE_DIR "extras/init.d/suse")
+@@ -158,13 +158,13 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_SUSE_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT}
+- DESTINATION ${RSERVER_INITD_SUSE_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_SUSE_DIR})
+
+ # install pam profile
+ set(RSERVER_PAM_DIR "extras/pam")
+ set(RSERVER_PAM_PROFILE "${RSERVER_PAM_DIR}/rstudio")
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_PAM_PROFILE}
+- DESTINATION ${RSERVER_PAM_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_PAM_DIR})
+
+ # install configured apparmor profile
+ set(RSERVER_APPARMOR_DIR "extras/apparmor")
+@@ -172,9 +172,9 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE}
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+ install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_DIR}/apparmor-profile-load
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+
+ # install configured upstart profile
+ set(RSERVER_UPSTART_DIR "extras/upstart")
+@@ -182,6 +182,6 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE}
+- DESTINATION ${RSERVER_UPSTART_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+
+ endif()
+diff --git a/src/cpp/server/ServerOptions.cpp b/src/cpp/server/ServerOptions.cpp
+index 77a63f1..f0d25f0 100644
+--- a/src/cpp/server/ServerOptions.cpp
++++ b/src/cpp/server/ServerOptions.cpp
+@@ -201,7 +201,7 @@ ProgramStatus Options::read(int argc, char * const argv[])
+
+ // convert relative paths by completing from the system installation
+ // path (this allows us to be relocatable)
+- resolvePath(installPath, &wwwLocalPath_);
++ resolvePath(installPath.childPath(DISTRO_SHARE), &wwwLocalPath_);
+ resolvePath(installPath, &authPamHelperPath_);
+ resolvePath(installPath, &rsessionPath_);
+ resolvePath(installPath, &rldpathPath_);
+diff --git a/src/cpp/session/SessionOptions.cpp b/src/cpp/session/SessionOptions.cpp
+index 0df1081..777cc6a 100644
+--- a/src/cpp/session/SessionOptions.cpp
++++ b/src/cpp/session/SessionOptions.cpp
+@@ -333,12 +333,12 @@ core::ProgramStatus Options::read(int argc, char * const argv[])
+
+ // convert relative paths by completing from the app resource path
+- resolvePath(resourcePath, &rResourcesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &rResourcesPath_);
+ resolvePath(resourcePath, &agreementFilePath_);
+- resolvePath(resourcePath, &wwwLocalPath_);
+- resolvePath(resourcePath, &coreRSourcePath_);
+- resolvePath(resourcePath, &modulesRSourcePath_);
+- resolvePath(resourcePath, &sessionLibraryPath_);
+- resolvePath(resourcePath, &sessionPackagesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &coreRSourcePath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &modulesRSourcePath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &sessionLibraryPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &sessionPackagesPath_);
+ resolvePostbackPath(resourcePath, &rpostbackPath_);
+ #ifdef _WIN32
+ resolvePath(resourcePath, &consoleIoPath_);
+
diff --git a/sci-mathematics/rstudio/files/rstudio-0.97.551-prefs.patch b/sci-mathematics/rstudio/files/rstudio-0.97.551-prefs.patch
new file mode 100644
index 000000000000..3175d47235ab
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.97.551-prefs.patch
@@ -0,0 +1,24 @@
+And now we fix src/gwt/build.xml since java's user preference class is
+braindead and insists on writing where it is not allowed.
+much thanks to http://www.allaboutbalance.com/articles/disableprefs/
+
+diff --git a/src/gwt/build.xml b/src/gwt/build.xml
+index e7d2418..ae3a331 100644
+--- a/src/gwt/build.xml
++++ b/src/gwt/build.xml
+@@ -25,6 +25,7 @@
+ <property name="gwt.extra.args" value=""/>
+ <property name="gwt.main.module" value="org.rstudio.studio.RStudio"/>
+ <property name="ace.bin" value="src/org/rstudio/studio/client/workbench/views/source/editors/text/ace"/>
++ <property environment="env"/>
+
+ <path id="project.class.path">
+ <pathelement location="bin"/>
+@@ -109,6 +110,7 @@
+ </classpath>
+ <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
+ <jvmarg value="-Xmx1024M"/>
++ <jvmarg value="-Djava.util.prefs.userRoot=${env.T}"/>
+ <arg value="-war"/>
+ <arg value="www"/>
+ <arg value="-localWorkers"/>
diff --git a/sci-mathematics/rstudio/files/rstudio-0.98.1091-boost-1.57.patch b/sci-mathematics/rstudio/files/rstudio-0.98.1091-boost-1.57.patch
new file mode 100644
index 000000000000..3a157183c22c
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.98.1091-boost-1.57.patch
@@ -0,0 +1,60 @@
+--- rstudio-0.98.1091-orig/src/cpp/desktop/DesktopApplicationLaunch.hpp 2014-11-06 23:15:47.000000000 +1100
++++ rstudio-0.98.1091/src/cpp/desktop/DesktopApplicationLaunch.hpp 2015-02-28 14:01:51.970672316 +1100
+@@ -19,7 +19,10 @@
+ #include <QObject>
+ #include <QWidget>
+ #include <QApplication>
++// see https://bugreports.qt-project.org/browse/QTBUG-22829
++#ifndef Q_MOC_RUN
+ #include <boost/scoped_ptr.hpp>
++#endif
+
+ namespace desktop {
+
+--- rstudio-0.98.1091-orig/src/cpp/desktop/DesktopSessionLauncher.hpp 2014-11-06 23:15:47.000000000 +1100
++++ rstudio-0.98.1091/src/cpp/desktop/DesktopSessionLauncher.hpp 2015-02-28 14:01:51.972672316 +1100
+@@ -18,7 +18,10 @@
+
+ #include <string>
+
++// see https://bugreports.qt-project.org/browse/QTBUG-22829
++#ifndef Q_MOC_RUN
+ #include <boost/utility.hpp>
++#endif
+
+ #include <core/Error.hpp>
+ #include <core/FilePath.hpp>
+--- rstudio-0.98.1091-orig/src/cpp/core/include/core/FilePath.hpp 2014-11-06 23:15:47.000000000 +1100
++++ rstudio-0.98.1091/src/cpp/core/include/core/FilePath.hpp 2015-02-28 14:01:51.984672314 +1100
+@@ -23,11 +23,14 @@
+ #include <vector>
+ #include <iosfwd>
+
++// see https://bugreports.qt-project.org/browse/QTBUG-22829
++#ifndef Q_MOC_RUN
+ #include <boost/shared_ptr.hpp>
+ #include <boost/scoped_ptr.hpp>
+ #include <boost/function.hpp>
+
+ #include <boost/utility.hpp>
++#endif
+
+ #include <core/Error.hpp>
+ #include <core/Log.hpp>
+--- rstudio-0.98.1091-orig/src/cpp/core/include/core/Error.hpp 2014-11-06 23:15:47.000000000 +1100
++++ rstudio-0.98.1091/src/cpp/core/include/core/Error.hpp 2015-02-28 14:01:51.977672315 +1100
+@@ -20,11 +20,14 @@
+ #include <string>
+ #include <vector>
+
++// see https://bugreports.qt-project.org/browse/QTBUG-22829
++#ifndef Q_MOC_RUN
+ #include <boost/shared_ptr.hpp>
+
+ #include <boost/system/error_code.hpp>
+
+ #include <boost/current_function.hpp>
++#endif
+
+ namespace core {
+
diff --git a/sci-mathematics/rstudio/files/rstudio-0.98.1091-pandoc.patch b/sci-mathematics/rstudio/files/rstudio-0.98.1091-pandoc.patch
new file mode 100644
index 000000000000..3df8d1a986a3
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.98.1091-pandoc.patch
@@ -0,0 +1,26 @@
+--- rstudio-0.98.1091-orig/src/cpp/session/CMakeLists.txt 2014-11-06 23:15:47.000000000 +1100
++++ rstudio-0.98.1091/src/cpp/session/CMakeLists.txt 2014-11-26 17:12:42.699712510 +1100
+@@ -25,9 +25,6 @@
+ if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-23")
+ message(FATAL_ERROR "Mathjax 2.3 not found (re-run install-dependencies script to install)")
+ endif()
+-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc")
+- message(FATAL_ERROR "pandoc not found (re-run install-dependencies script to install)")
+-endif()
+ if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/rmarkdown")
+ message(FATAL_ERROR "rmarkdown package not found (re-run install-dependencies script to install)")
+ endif()
+@@ -343,13 +340,6 @@
+ install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-23"
+ DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
+
+- # install pandoc
+- set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/1.12.4.2")
+- file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
+- install(FILES ${PANDOC_FILES}
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/pandoc)
+-
+ # install rmarkdown package
+ file(GLOB RMARKDOWN_PACKAGE "${RSTUDIO_DEPENDENCIES_DIR}/common/rmarkdown*.tar.gz")
+ install(FILES ${RMARKDOWN_PACKAGE}
diff --git a/sci-mathematics/rstudio/files/rstudio-0.98.490-linker_flags.patch b/sci-mathematics/rstudio/files/rstudio-0.98.490-linker_flags.patch
new file mode 100644
index 000000000000..a336fccbc981
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.98.490-linker_flags.patch
@@ -0,0 +1,18 @@
+Some gcc hardening options were added, however since we add
+"-Wl,--as-needed" we end up with "-Wl,--as-needed;-Wl,-z,relro" which
+leads to linker errors about unknown options, if we make it so the
+as-needed option is the last option on the line, everything is fine.
+
+diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
+index 0589ca0..fe5bd5f 100644
+--- a/src/cpp/CMakeLists.txt
++++ b/src/cpp/CMakeLists.txt
+@@ -57,7 +57,7 @@ if(UNIX)
+ add_definitions(-D_FORTIFY_SOURCE=2)
+ add_definitions(-fstack-protector --param ssp-buffer-size=4)
+ add_definitions(-pie -fPIE)
+- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro,-z,now")
++ set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,relro,-z,now ${CMAKE_EXE_LINKER_FLAGS}")
+ endif()
+
+ # Win32 specific global directives
diff --git a/sci-mathematics/rstudio/files/rstudio-0.98.490-paths.patch b/sci-mathematics/rstudio/files/rstudio-0.98.490-paths.patch
new file mode 100644
index 000000000000..d28ad5cb0752
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.98.490-paths.patch
@@ -0,0 +1,120 @@
+diff --git a/CMakeGlobals.txt b/CMakeGlobals.txt
+index cc10191..f75b85a 100644
+--- a/CMakeGlobals.txt
++++ b/CMakeGlobals.txt
+@@ -105,7 +105,7 @@ else()
+ else()
+ set(RSTUDIO_INSTALL_BIN bin)
+ endif()
+- set(RSTUDIO_INSTALL_SUPPORTING .)
++ set(RSTUDIO_INSTALL_SUPPORTING ${DISTRO_SHARE})
+ endif()
+
+ # if the install prefix is /usr/local then tweak as appropriate
+diff --git a/src/cpp/server/CMakeLists.txt b/src/cpp/server/CMakeLists.txt
+index 184e514..d09aac5 100644
+--- a/src/cpp/server/CMakeLists.txt
++++ b/src/cpp/server/CMakeLists.txt
+@@ -145,7 +145,7 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}
+- DESTINATION ${RSERVER_INITD_DEBIAN_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_DEBIAN_DIR})
+
+ # install configured redhat init.d script
+ set(RSERVER_INITD_REDHAT_DIR "extras/init.d/redhat")
+@@ -153,7 +153,7 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}
+- DESTINATION ${RSERVER_INITD_REDHAT_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_REDHAT_DIR})
+
+ # install configured suse init.d script
+ set(RSERVER_INITD_SUSE_DIR "extras/init.d/suse")
+@@ -161,13 +161,13 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_SUSE_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT}
+- DESTINATION ${RSERVER_INITD_SUSE_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_SUSE_DIR})
+
+ # install pam profile
+ set(RSERVER_PAM_DIR "extras/pam")
+ set(RSERVER_PAM_PROFILE "${RSERVER_PAM_DIR}/rstudio")
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_PAM_PROFILE}
+- DESTINATION ${RSERVER_PAM_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_PAM_DIR})
+
+ # install configured apparmor profile
+ set(RSERVER_APPARMOR_DIR "extras/apparmor")
+@@ -175,9 +175,9 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE}
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+ install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_DIR}/apparmor-profile-load
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+
+ # install configured upstart profile
+ set(RSERVER_UPSTART_DIR "extras/upstart")
+@@ -185,12 +185,12 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE}
+- DESTINATION ${RSERVER_UPSTART_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+ set(RSERVER_UPSTART_PROFILE_REDHAT "${RSERVER_UPSTART_DIR}/rstudio-server.redhat.conf")
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}
+- DESTINATION ${RSERVER_UPSTART_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+
+ endif()
+
+diff --git a/src/cpp/server/ServerOptions.cpp b/src/cpp/server/ServerOptions.cpp
+index 1eaf7c0..4b25fa1 100644
+--- a/src/cpp/server/ServerOptions.cpp
++++ b/src/cpp/server/ServerOptions.cpp
+@@ -307,8 +307,8 @@ ProgramStatus Options::read(int argc,
+
+ // convert relative paths by completing from the system installation
+ // path (this allows us to be relocatable)
+- resolvePath(resourcePath, &wwwLocalPath_);
+- resolvePath(resourcePath, &wwwSymbolMapsPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
+ resolvePath(binaryPath, &authPamHelperPath_);
+ resolvePath(binaryPath, &rsessionPath_);
+ resolvePath(binaryPath, &rldpathPath_);
+diff --git a/src/cpp/session/SessionOptions.cpp b/src/cpp/session/SessionOptions.cpp
+index 44b3d55..a48cdb6 100644
+--- a/src/cpp/session/SessionOptions.cpp
++++ b/src/cpp/session/SessionOptions.cpp
+@@ -357,14 +357,14 @@ core::ProgramStatus Options::read(int argc, char * const argv[])
+ timeoutMinutes_ = 0;
+
+ // convert relative paths by completing from the app resource path
+- resolvePath(resourcePath, &rResourcesPath_);
+- resolvePath(resourcePath, &agreementFilePath_);
+- resolvePath(resourcePath, &wwwLocalPath_);
+- resolvePath(resourcePath, &wwwSymbolMapsPath_);
+- resolvePath(resourcePath, &coreRSourcePath_);
+- resolvePath(resourcePath, &modulesRSourcePath_);
+- resolvePath(resourcePath, &sessionLibraryPath_);
+- resolvePath(resourcePath, &sessionPackagesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &rResourcesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &agreementFilePath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &coreRSourcePath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &modulesRSourcePath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &sessionLibraryPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &sessionPackagesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
+ resolvePostbackPath(resourcePath, &rpostbackPath_);
+ #ifdef _WIN32
+ resolvePath(resourcePath, &consoleIoPath_);
diff --git a/sci-mathematics/rstudio/files/rstudio-0.98.490-prefs.patch b/sci-mathematics/rstudio/files/rstudio-0.98.490-prefs.patch
new file mode 100644
index 000000000000..3175d47235ab
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.98.490-prefs.patch
@@ -0,0 +1,24 @@
+And now we fix src/gwt/build.xml since java's user preference class is
+braindead and insists on writing where it is not allowed.
+much thanks to http://www.allaboutbalance.com/articles/disableprefs/
+
+diff --git a/src/gwt/build.xml b/src/gwt/build.xml
+index e7d2418..ae3a331 100644
+--- a/src/gwt/build.xml
++++ b/src/gwt/build.xml
+@@ -25,6 +25,7 @@
+ <property name="gwt.extra.args" value=""/>
+ <property name="gwt.main.module" value="org.rstudio.studio.RStudio"/>
+ <property name="ace.bin" value="src/org/rstudio/studio/client/workbench/views/source/editors/text/ace"/>
++ <property environment="env"/>
+
+ <path id="project.class.path">
+ <pathelement location="bin"/>
+@@ -109,6 +110,7 @@
+ </classpath>
+ <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
+ <jvmarg value="-Xmx1024M"/>
++ <jvmarg value="-Djava.util.prefs.userRoot=${env.T}"/>
+ <arg value="-war"/>
+ <arg value="www"/>
+ <arg value="-localWorkers"/>
diff --git a/sci-mathematics/rstudio/files/rstudio-0.98.932-pandoc.patch b/sci-mathematics/rstudio/files/rstudio-0.98.932-pandoc.patch
new file mode 100644
index 000000000000..d2b6911eabb8
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.98.932-pandoc.patch
@@ -0,0 +1,25 @@
+--- a/src/cpp/session/CMakeLists.txt
++++ b/src/cpp/session/CMakeLists.txt
+@@ -25,9 +25,6 @@
+ if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax")
+ message(FATAL_ERROR "Mathjax not found (re-run install-dependencies script to install)")
+ endif()
+-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc")
+- message(FATAL_ERROR "pandoc not found (re-run install-dependencies script to install)")
+-endif()
+ if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/rmarkdown")
+ message(FATAL_ERROR "rmarkdown package not found (re-run install-dependencies script to install)")
+ endif()
+@@ -337,12 +334,6 @@
+ install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax"
+ DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
+
+- # install pandoc
+- set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/1.12.3")
+- file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
+- install(PROGRAMS ${PANDOC_FILES}
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/pandoc)
+-
+ # install rmarkdown package
+ file(GLOB RMARKDOWN_PACKAGE "${RSTUDIO_DEPENDENCIES_DIR}/common/rmarkdown*.tar.gz")
+ install(FILES ${RMARKDOWN_PACKAGE}
diff --git a/sci-mathematics/rstudio/files/rstudio-0.98.932-paths.patch b/sci-mathematics/rstudio/files/rstudio-0.98.932-paths.patch
new file mode 100644
index 000000000000..d4bb4249f1a6
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.98.932-paths.patch
@@ -0,0 +1,140 @@
+diff --git a/CMakeGlobals.txt b/CMakeGlobals.txt
+index cc10191..f75b85a 100644
+--- a/CMakeGlobals.txt
++++ b/CMakeGlobals.txt
+@@ -105,7 +105,7 @@ else()
+ else()
+ set(RSTUDIO_INSTALL_BIN bin)
+ endif()
+- set(RSTUDIO_INSTALL_SUPPORTING .)
++ set(RSTUDIO_INSTALL_SUPPORTING ${DISTRO_SHARE})
+ endif()
+
+ # if the install prefix is /usr/local then tweak as appropriate
+diff --git a/src/cpp/server/CMakeLists.txt b/src/cpp/server/CMakeLists.txt
+index 184e514..d09aac5 100644
+--- a/src/cpp/server/CMakeLists.txt
++++ b/src/cpp/server/CMakeLists.txt
+@@ -145,7 +145,7 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}
+- DESTINATION ${RSERVER_INITD_DEBIAN_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_DEBIAN_DIR})
+
+ # install configured redhat init.d script
+ set(RSERVER_INITD_REDHAT_DIR "extras/init.d/redhat")
+@@ -153,7 +153,7 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}
+- DESTINATION ${RSERVER_INITD_REDHAT_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_REDHAT_DIR})
+
+ # install configured suse init.d script
+ set(RSERVER_INITD_SUSE_DIR "extras/init.d/suse")
+@@ -161,13 +161,13 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_SUSE_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT}
+- DESTINATION ${RSERVER_INITD_SUSE_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_SUSE_DIR})
+
+ # install pam profile
+ set(RSERVER_PAM_DIR "extras/pam")
+ set(RSERVER_PAM_PROFILE "${RSERVER_PAM_DIR}/rstudio")
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_PAM_PROFILE}
+- DESTINATION ${RSERVER_PAM_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_PAM_DIR})
+
+ # install configured apparmor profile
+ set(RSERVER_APPARMOR_DIR "extras/apparmor")
+@@ -175,9 +175,9 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE}
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+ install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_DIR}/apparmor-profile-load
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+
+ # install configured upstart profile
+ set(RSERVER_UPSTART_DIR "extras/upstart")
+@@ -185,12 +185,12 @@ if (UNIX AND NOT APPLE)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE}
+- DESTINATION ${RSERVER_UPSTART_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+ set(RSERVER_UPSTART_PROFILE_REDHAT "${RSERVER_UPSTART_DIR}/rstudio-server.redhat.conf")
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}
+- DESTINATION ${RSERVER_UPSTART_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+
+ endif()
+
+diff --git a/src/cpp/server/ServerOptions.cpp b/src/cpp/server/ServerOptions.cpp
+index 1eaf7c0..4b25fa1 100644
+--- a/src/cpp/server/ServerOptions.cpp
++++ b/src/cpp/server/ServerOptions.cpp
+@@ -307,8 +307,8 @@ ProgramStatus Options::read(int argc,
+
+ // convert relative paths by completing from the system installation
+ // path (this allows us to be relocatable)
+- resolvePath(resourcePath, &wwwLocalPath_);
+- resolvePath(resourcePath, &wwwSymbolMapsPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
+ resolvePath(binaryPath, &authPamHelperPath_);
+ resolvePath(binaryPath, &rsessionPath_);
+ resolvePath(binaryPath, &rldpathPath_);
+diff --git a/src/cpp/session/SessionOptions.cpp b/src/cpp/session/SessionOptions.cpp
+index 44b3d55..a48cdb6 100644
+--- a/src/cpp/session/SessionOptions.cpp
++++ b/src/cpp/session/SessionOptions.cpp
+@@ -40,7 +40,7 @@
+ namespace session {
+
+ namespace {
+-const char* const kDefaultPandocPath = "bin/pandoc";
++const char* const kDefaultPandocPath = "bin";
+ const char* const kDefaultPostbackPath = "bin/postback/rpostback";
+ } // anonymous namespace
+
+@@ -392,15 +392,15 @@
+ }
+
+ // convert relative paths by completing from the app resource path
+- resolvePath(resourcePath, &rResourcesPath_);
+- resolvePath(resourcePath, &agreementFilePath_);
+- resolvePath(resourcePath, &wwwLocalPath_);
+- resolvePath(resourcePath, &wwwSymbolMapsPath_);
+- resolvePath(resourcePath, &coreRSourcePath_);
+- resolvePath(resourcePath, &modulesRSourcePath_);
+- resolvePath(resourcePath, &sessionLibraryPath_);
+- resolvePath(resourcePath, &sessionPackagesPath_);
+- resolvePath(resourcePath, &sessionPackageArchivesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &rResourcesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &agreementFilePath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &coreRSourcePath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &modulesRSourcePath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &sessionLibraryPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &sessionPackagesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &sessionPackageArchivesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
+ resolvePostbackPath(resourcePath, &rpostbackPath_);
+ #ifdef _WIN32
+ resolvePath(resourcePath, &consoleIoPath_);
+@@ -409,7 +409,7 @@
+ resolvePath(resourcePath, &msysSshPath_);
+ resolvePath(resourcePath, &sumatraPath_);
+ #endif
+- resolvePath(resourcePath, &hunspellDictionariesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &hunspellDictionariesPath_);
+ resolvePath(resourcePath, &mathjaxPath_);
+ resolvePandocPath(resourcePath, &pandocPath_);
+
diff --git a/sci-mathematics/rstudio/files/rstudio-0.99.473-clang-pandoc.patch b/sci-mathematics/rstudio/files/rstudio-0.99.473-clang-pandoc.patch
new file mode 100644
index 000000000000..b37a91929574
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.99.473-clang-pandoc.patch
@@ -0,0 +1,77 @@
+--- rstudio-0.99.473-orig/src/cpp/session/CMakeLists.txt 2015-08-12 09:58:43.000000000 +1000
++++ rstudio-0.99.473/src/cpp/session/CMakeLists.txt 2015-08-27 00:51:48.395751378 +1000
+@@ -25,30 +25,11 @@
+ if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-23")
+ message(FATAL_ERROR "Mathjax 2.3 not found (re-run install-dependencies script to install)")
+ endif()
+-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc")
+- message(FATAL_ERROR "pandoc not found (re-run install-dependencies script to install)")
+-endif()
+ if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/rsconnect")
+ message(FATAL_ERROR "rsconnect package not found (re-run install-dependencies script to install)")
+ endif()
+
+
+-# verify libclang is installed
+-if(WIN32)
+- set(LIBCLANG_VERSION "3.4")
+-else()
+- set(LIBCLANG_VERSION "3.5")
+-endif()
+-set(LIBCLANG_DIR "${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/${LIBCLANG_VERSION}")
+-if(NOT EXISTS "${LIBCLANG_DIR}")
+- message(FATAL_ERROR "libclang ${LIBCLANG_VERSION} not found (re-run install-dependencies script to install)")
+-endif()
+-set(LIBCLANG_HEADERS_DIR "${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/builtin-headers")
+-if(NOT EXISTS "${LIBCLANG_HEADERS_DIR}")
+- message(FATAL_ERROR "libclang builtin-headers not found (re-run install-dependencies script to install)")
+-endif()
+-
+-
+ # include files
+ file(GLOB_RECURSE SESSION_HEADER_FILES "*.h*")
+
+@@ -391,18 +372,6 @@
+ install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-23"
+ DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
+
+- # install pandoc
+- if(RSTUDIO_PACKAGE_BUILD_SLES)
+- # when producing a SUSE Linux Enterpise build, we want to install the
+- # static Pandoc binaries (see dependencies/common/install-pandoc)
+- set(PANDOC_EXTENSION_DIR "/static")
+- endif()
+- set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/1.13.1${PANDOC_EXTENSION_DIR}")
+- file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
+- install(FILES ${PANDOC_FILES}
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/pandoc)
+-
+ # install rsconnect package
+ file(GLOB RSCONNECT_PACKAGE "${RSTUDIO_DEPENDENCIES_DIR}/common/rsconnect*.tar.gz")
+ install(FILES ${RSCONNECT_PACKAGE}
+@@ -420,24 +389,6 @@
+ install(DIRECTORY "resources/help_resources"
+ DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources)
+
+- # install libclang
+- if(WIN32)
+- file(GLOB LIBCLANG_32_FILES "${LIBCLANG_DIR}/x86/libclang.*")
+- install(PROGRAMS ${LIBCLANG_32_FILES}
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/rsclang/x86)
+- file(GLOB LIBCLANG_64_FILES "${LIBCLANG_DIR}/x86_64/libclang.*")
+- install(PROGRAMS ${LIBCLANG_64_FILES}
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/rsclang/x86_64)
+- else()
+- file(GLOB_RECURSE LIBCLANG_FILES "${LIBCLANG_DIR}/libclang.*")
+- install(PROGRAMS ${LIBCLANG_FILES}
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/rsclang)
+- endif()
+-
+- # install libclang builtin-headers
+- install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/builtin-headers"
+- DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources/libclang")
+-
+ # install 64 bit binaries if we are on win64
+ if(WIN32)
+ if(NOT ("$ENV{PROGRAMW6432}" STREQUAL ""))
diff --git a/sci-mathematics/rstudio/files/rstudio-0.99.473-paths.patch b/sci-mathematics/rstudio/files/rstudio-0.99.473-paths.patch
new file mode 100644
index 000000000000..6b8d8886e21e
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.99.473-paths.patch
@@ -0,0 +1,130 @@
+--- rstudio-0.99.473-orig/CMakeGlobals.txt 2015-08-12 09:58:43.000000000 +1000
++++ rstudio-0.99.473/CMakeGlobals.txt 2015-08-26 22:12:43.614346285 +1000
+@@ -111,7 +111,7 @@
+ else()
+ set(RSTUDIO_INSTALL_BIN bin)
+ endif()
+- set(RSTUDIO_INSTALL_SUPPORTING .)
++ set(RSTUDIO_INSTALL_SUPPORTING ${DISTRO_SHARE})
+ endif()
+
+ # if the install prefix is /usr/local then tweak as appropriate
+--- rstudio-0.99.473-orig/src/cpp/server/CMakeLists.txt 2015-08-12 09:58:43.000000000 +1000
++++ rstudio-0.99.473/src/cpp/server/CMakeLists.txt 2015-08-26 22:15:30.988353389 +1000
+@@ -160,7 +160,7 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}
+- DESTINATION ${RSERVER_INITD_DEBIAN_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_DEBIAN_DIR})
+
+ # install configured redhat init.d script
+ set(RSERVER_INITD_REDHAT_DIR "extras/init.d/redhat")
+@@ -168,7 +168,7 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}
+- DESTINATION ${RSERVER_INITD_REDHAT_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_REDHAT_DIR})
+
+ # install configured suse init.d script
+ set(RSERVER_INITD_SUSE_DIR "extras/init.d/suse")
+@@ -176,13 +176,13 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_SUSE_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT}
+- DESTINATION ${RSERVER_INITD_SUSE_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_SUSE_DIR})
+
+ # install pam profile
+ set(RSERVER_PAM_DIR "extras/pam")
+ set(RSERVER_PAM_PROFILE "${RSERVER_PAM_DIR}/rstudio")
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_PAM_PROFILE}
+- DESTINATION ${RSERVER_PAM_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_PAM_DIR})
+
+ # install configured apparmor profile
+ set(RSERVER_APPARMOR_DIR "extras/apparmor")
+@@ -190,9 +190,9 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE}
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+ install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_DIR}/apparmor-profile-load
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+
+ # install configured upstart profile
+ set(RSERVER_UPSTART_DIR "extras/upstart")
+@@ -200,12 +200,12 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE}
+- DESTINATION ${RSERVER_UPSTART_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+ set(RSERVER_UPSTART_PROFILE_REDHAT "${RSERVER_UPSTART_DIR}/rstudio-server.redhat.conf")
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}
+- DESTINATION ${RSERVER_UPSTART_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+
+ # install configured systemd profile
+ set(RSERVER_SYSTEMD_DIR "extras/systemd")
+--- rstudio-0.99.473-orig/src/cpp/server/ServerOptions.cpp 2015-08-12 09:58:43.000000000 +1000
++++ rstudio-0.99.473/src/cpp/server/ServerOptions.cpp 2015-08-26 22:12:43.615346286 +1000
+@@ -314,8 +314,8 @@
+
+ // convert relative paths by completing from the system installation
+ // path (this allows us to be relocatable)
+- resolvePath(resourcePath, &wwwLocalPath_);
+- resolvePath(resourcePath, &wwwSymbolMapsPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
+ resolvePath(binaryPath, &authPamHelperPath_);
+ resolvePath(binaryPath, &rsessionPath_);
+ resolvePath(binaryPath, &rldpathPath_);
+--- rstudio-0.99.473-orig/src/cpp/session/SessionOptions.cpp 2015-08-12 09:58:43.000000000 +1000
++++ rstudio-0.99.473/src/cpp/session/SessionOptions.cpp 2015-08-26 22:17:40.594358890 +1000
+@@ -43,7 +43,7 @@
+ namespace session {
+
+ namespace {
+-const char* const kDefaultPandocPath = "bin/pandoc";
++const char* const kDefaultPandocPath = "bin";
+ const char* const kDefaultPostbackPath = "bin/postback/rpostback";
+ const char* const kDefaultRsclangPath = "bin/rsclang";
+ } // anonymous namespace
+@@ -431,14 +431,14 @@
+ }
+
+ // convert relative paths by completing from the app resource path
+- resolvePath(resourcePath, &rResourcesPath_);
+- resolvePath(resourcePath, &agreementFilePath_);
+- resolvePath(resourcePath, &wwwLocalPath_);
+- resolvePath(resourcePath, &wwwSymbolMapsPath_);
+- resolvePath(resourcePath, &coreRSourcePath_);
+- resolvePath(resourcePath, &modulesRSourcePath_);
+- resolvePath(resourcePath, &sessionLibraryPath_);
+- resolvePath(resourcePath, &sessionPackageArchivesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &rResourcesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &agreementFilePath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &coreRSourcePath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &modulesRSourcePath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &sessionLibraryPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &sessionPackageArchivesPath_);
+ resolvePostbackPath(resourcePath, &rpostbackPath_);
+ #ifdef _WIN32
+ resolvePath(resourcePath, &consoleIoPath_);
+@@ -447,7 +447,7 @@
+ resolvePath(resourcePath, &msysSshPath_);
+ resolvePath(resourcePath, &sumatraPath_);
+ #endif
+- resolvePath(resourcePath, &hunspellDictionariesPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &hunspellDictionariesPath_);
+ resolvePath(resourcePath, &mathjaxPath_);
+ resolvePath(resourcePath, &libclangHeadersPath_);
+ resolvePandocPath(resourcePath, &pandocPath_);
diff --git a/sci-mathematics/rstudio/files/rstudio-0.99.473-qtsingleapplication.patch b/sci-mathematics/rstudio/files/rstudio-0.99.473-qtsingleapplication.patch
new file mode 100644
index 000000000000..bf66bd236788
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.99.473-qtsingleapplication.patch
@@ -0,0 +1,60 @@
+--- rstudio-0.99.473-orig/src/cpp/desktop/CMakeLists.txt 2015-08-12 09:58:43.000000000 +1000
++++ rstudio-0.99.473/src/cpp/desktop/CMakeLists.txt 2015-08-30 23:16:11.396175587 +1000
+@@ -93,7 +93,12 @@
+ find_package(Qt5DBus REQUIRED)
+ endif()
+
+-
++find_path(QTSINGLEAPPLIB_INCLUDE_DIR NAMES QtSingleApplication
++ PATH_SUFFIXES QtSolutions
++ PATHS
++ /usr/include/qt5)
++find_library(QTSINGLEAPPLIB Qt5Solutions_SingleApplication-2.6
++ libQt5Solutions_SingleApplication-2.6)
+
+ # disable clang warnings for qt sources
+ if(APPLE)
+@@ -113,7 +118,6 @@
+
+ set(MOC_DESKTOP_HEADER_FILES ${DESKTOP_HEADER_FILES})
+ list(REMOVE_ITEM MOC_DESKTOP_HEADER_FILES
+- ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtsingleapplication/qtlockedfile.h
+ ${CMAKE_CURRENT_SOURCE_DIR}/DesktopDetectRHome.hpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/DesktopOptions.hpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/DesktopRVersion.hpp
+@@ -175,8 +179,6 @@
+ DesktopSubMenu.cpp
+ DesktopSynctex.cpp
+ DesktopNetworkAccessManager.cpp
+- 3rdparty/qtsingleapplication/qtsingleapplication.cpp
+- 3rdparty/qtsingleapplication/qtlocalpeer.cpp
+ )
+
+ if(WIN32)
+@@ -219,6 +221,7 @@
+ ${CORE_SOURCE_DIR}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
++ ${QTSINGLEAPPLIB_INCLUDE_DIR}
+ ${TESTS_INCLUDE_DIR}
+ )
+
+@@ -332,6 +335,7 @@
+
+ # set link dependencies
+ target_link_libraries(rstudio
++ ${QTSINGLEAPPLIB}
+ ${QT_LIBRARIES}
+ rstudio-core
+ ${LINK_FLAGS}
+--- rstudio-0.99.473-orig/src/cpp/desktop/DesktopPosixApplication.hpp 2015-08-12 09:58:43.000000000 +1000
++++ rstudio-0.99.473/src/cpp/desktop/DesktopPosixApplication.hpp 2015-08-30 21:41:21.616934106 +1000
+@@ -16,7 +16,7 @@
+ #ifndef DESKTOP_POSIX_APPLICATION_HPP
+ #define DESKTOP_POSIX_APPLICATION_HPP
+
+-#include "3rdparty/qtsingleapplication/QtSingleApplication"
++#include <QtSingleApplication>
+
+ namespace rstudio {
+ namespace desktop {
diff --git a/sci-mathematics/rstudio/files/rstudio-0.99.486-systemd.patch b/sci-mathematics/rstudio/files/rstudio-0.99.486-systemd.patch
new file mode 100644
index 000000000000..4c7eda39cc29
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.99.486-systemd.patch
@@ -0,0 +1,22 @@
+diff -Naur /tmp/rstudio.org/work/rstudio-0.99.486/src/cpp/server/CMakeLists.txt ./work/rstudio-0.99.486/src/cpp/server/CMakeLists.txt
+--- /tmp/rstudio.org/work/rstudio-0.99.486/src/cpp/server/CMakeLists.txt 2015-12-10 19:29:24.408267862 +0100
++++ ./work/rstudio-0.99.486/src/cpp/server/CMakeLists.txt 2015-12-10 19:35:24.660194216 +0100
+@@ -208,17 +208,12 @@
+ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+
+ # install configured systemd profile
+- set(RSERVER_SYSTEMD_DIR "extras/systemd")
++ set(RSERVER_SYSTEMD_DIR "lib/systemd/system")
+ set(RSERVER_SYSTEMD_PROFILE "${RSERVER_SYSTEMD_DIR}/rstudio-server.service")
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_SYSTEMD_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE}
+ DESTINATION ${RSERVER_SYSTEMD_DIR})
+- set(RSERVER_SYSTEMD_PROFILE_REDHAT "${RSERVER_SYSTEMD_DIR}/rstudio-server.redhat.service")
+- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_SYSTEMD_PROFILE_REDHAT}.in
+- ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE_REDHAT})
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE_REDHAT}
+- DESTINATION ${RSERVER_SYSTEMD_DIR})
+
+ endif()
+
diff --git a/sci-mathematics/rstudio/files/rstudio-0.99.879-clang-pandoc.patch b/sci-mathematics/rstudio/files/rstudio-0.99.879-clang-pandoc.patch
new file mode 100644
index 000000000000..c3af2b7a6f56
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.99.879-clang-pandoc.patch
@@ -0,0 +1,77 @@
+--- rstudio-0.99.879-orig/src/cpp/session/CMakeLists.txt 2016-02-12 09:24:39.000000000 +1100
++++ rstudio-0.99.879/src/cpp/session/CMakeLists.txt 2016-02-19 23:04:57.266186448 +1100
+@@ -25,30 +25,11 @@
+ if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-23")
+ message(FATAL_ERROR "Mathjax 2.3 not found (re-run install-dependencies script to install)")
+ endif()
+-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc")
+- message(FATAL_ERROR "pandoc not found (re-run install-dependencies script to install)")
+-endif()
+ if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/rsconnect")
+ message(FATAL_ERROR "rsconnect package not found (re-run install-dependencies script to install)")
+ endif()
+
+
+-# verify libclang is installed
+-if(WIN32)
+- set(LIBCLANG_VERSION "3.4")
+-else()
+- set(LIBCLANG_VERSION "3.5")
+-endif()
+-set(LIBCLANG_DIR "${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/${LIBCLANG_VERSION}")
+-if(NOT EXISTS "${LIBCLANG_DIR}")
+- message(FATAL_ERROR "libclang ${LIBCLANG_VERSION} not found (re-run install-dependencies script to install)")
+-endif()
+-set(LIBCLANG_HEADERS_DIR "${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/builtin-headers")
+-if(NOT EXISTS "${LIBCLANG_HEADERS_DIR}")
+- message(FATAL_ERROR "libclang builtin-headers not found (re-run install-dependencies script to install)")
+-endif()
+-
+-
+ # include files
+ file(GLOB_RECURSE SESSION_HEADER_FILES "*.h*")
+
+@@ -399,18 +380,6 @@
+ install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-23"
+ DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
+
+- # install pandoc
+- if(RSTUDIO_PACKAGE_BUILD_SLES)
+- # when producing a SUSE Linux Enterpise build, we want to install the
+- # static Pandoc binaries (see dependencies/common/install-pandoc)
+- set(PANDOC_EXTENSION_DIR "/static")
+- endif()
+- set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/1.15.2${PANDOC_EXTENSION_DIR}")
+- file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
+- install(FILES ${PANDOC_FILES}
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/pandoc)
+-
+ # install rsconnect package
+ file(GLOB RSCONNECT_PACKAGE "${RSTUDIO_DEPENDENCIES_DIR}/common/rsconnect*.tar.gz")
+ install(FILES ${RSCONNECT_PACKAGE}
+@@ -428,24 +397,6 @@
+ install(DIRECTORY "resources/help_resources"
+ DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources)
+
+- # install libclang
+- if(WIN32)
+- file(GLOB LIBCLANG_32_FILES "${LIBCLANG_DIR}/x86/libclang.*")
+- install(PROGRAMS ${LIBCLANG_32_FILES}
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/rsclang/x86)
+- file(GLOB LIBCLANG_64_FILES "${LIBCLANG_DIR}/x86_64/libclang.*")
+- install(PROGRAMS ${LIBCLANG_64_FILES}
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/rsclang/x86_64)
+- else()
+- file(GLOB_RECURSE LIBCLANG_FILES "${LIBCLANG_DIR}/libclang.*")
+- install(PROGRAMS ${LIBCLANG_FILES}
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/rsclang)
+- endif()
+-
+- # install libclang builtin-headers
+- install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/builtin-headers"
+- DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources/libclang")
+-
+ # install 64 bit binaries if we are on win64
+ if(WIN32)
+ if(NOT ("$ENV{PROGRAMW6432}" STREQUAL ""))
diff --git a/sci-mathematics/rstudio/files/rstudio-0.99.879-paths.patch b/sci-mathematics/rstudio/files/rstudio-0.99.879-paths.patch
new file mode 100644
index 000000000000..a8b48f24968c
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.99.879-paths.patch
@@ -0,0 +1,130 @@
+--- rstudio-0.99.879-orig/CMakeGlobals.txt 2016-02-12 09:24:39.000000000 +1100
++++ rstudio-0.99.879/CMakeGlobals.txt 2016-02-19 22:58:41.396818474 +1100
+@@ -120,7 +120,7 @@
+ else()
+ set(RSTUDIO_INSTALL_BIN bin)
+ endif()
+- set(RSTUDIO_INSTALL_SUPPORTING .)
++ set(RSTUDIO_INSTALL_SUPPORTING ${DISTRO_SHARE})
+ endif()
+
+ # if the install prefix is /usr/local then tweak as appropriate
+--- rstudio-0.99.879-orig/src/cpp/server/CMakeLists.txt 2016-02-12 09:24:39.000000000 +1100
++++ rstudio-0.99.879/src/cpp/server/CMakeLists.txt 2016-02-19 22:58:41.397818478 +1100
+@@ -155,7 +155,7 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}
+- DESTINATION ${RSERVER_INITD_DEBIAN_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_DEBIAN_DIR})
+
+ # install configured redhat init.d script
+ set(RSERVER_INITD_REDHAT_DIR "extras/init.d/redhat")
+@@ -163,7 +163,7 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}
+- DESTINATION ${RSERVER_INITD_REDHAT_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_REDHAT_DIR})
+
+ # install configured suse init.d script
+ set(RSERVER_INITD_SUSE_DIR "extras/init.d/suse")
+@@ -171,13 +171,13 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_SUSE_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT}
+- DESTINATION ${RSERVER_INITD_SUSE_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_SUSE_DIR})
+
+ # install pam profile
+ set(RSERVER_PAM_DIR "extras/pam")
+ set(RSERVER_PAM_PROFILE "${RSERVER_PAM_DIR}/rstudio")
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_PAM_PROFILE}
+- DESTINATION ${RSERVER_PAM_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_PAM_DIR})
+
+ # install configured apparmor profile
+ set(RSERVER_APPARMOR_DIR "extras/apparmor")
+@@ -185,9 +185,9 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE}
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+ install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_DIR}/apparmor-profile-load
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+
+ # install configured upstart profile
+ set(RSERVER_UPSTART_DIR "extras/upstart")
+@@ -195,12 +195,12 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE}
+- DESTINATION ${RSERVER_UPSTART_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+ set(RSERVER_UPSTART_PROFILE_REDHAT "${RSERVER_UPSTART_DIR}/rstudio-server.redhat.conf")
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}
+- DESTINATION ${RSERVER_UPSTART_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+
+ # install configured systemd profile
+ set(RSERVER_SYSTEMD_DIR "extras/systemd")
+--- rstudio-0.99.879-orig/src/cpp/server/ServerOptions.cpp 2016-02-12 09:24:39.000000000 +1100
++++ rstudio-0.99.879/src/cpp/server/ServerOptions.cpp 2016-02-19 22:58:41.397818478 +1100
+@@ -382,8 +382,8 @@
+
+ // convert relative paths by completing from the system installation
+ // path (this allows us to be relocatable)
+- resolvePath(resourcePath, &wwwLocalPath_);
+- resolvePath(resourcePath, &wwwSymbolMapsPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
+ resolvePath(binaryPath, &authPamHelperPath_);
+ resolvePath(binaryPath, &rsessionPath_);
+ resolvePath(binaryPath, &rldpathPath_);
+--- rstudio-0.99.879-orig/src/cpp/session/SessionOptions.cpp 2016-02-12 09:24:39.000000000 +1100
++++ rstudio-0.99.879/src/cpp/session/SessionOptions.cpp 2016-02-20 18:13:34.807771539 +1100
+@@ -49,7 +49,7 @@
+ namespace session {
+
+ namespace {
+-const char* const kDefaultPandocPath = "bin/pandoc";
++const char* const kDefaultPandocPath = "bin";
+ const char* const kDefaultPostbackPath = "bin/postback/rpostback";
+ const char* const kDefaultRsclangPath = "bin/rsclang";
+ } // anonymous namespace
+@@ -451,14 +451,14 @@
+ }
+
+ // convert relative paths by completing from the app resource path
+- resolvePath(resourcePath_, &rResourcesPath_);
+- resolvePath(resourcePath_, &agreementFilePath_);
+- resolvePath(resourcePath_, &wwwLocalPath_);
+- resolvePath(resourcePath_, &wwwSymbolMapsPath_);
+- resolvePath(resourcePath_, &coreRSourcePath_);
+- resolvePath(resourcePath_, &modulesRSourcePath_);
+- resolvePath(resourcePath_, &sessionLibraryPath_);
+- resolvePath(resourcePath_, &sessionPackageArchivesPath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &rResourcesPath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &agreementFilePath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &wwwLocalPath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &coreRSourcePath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &modulesRSourcePath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &sessionLibraryPath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &sessionPackageArchivesPath_);
+ resolvePostbackPath(resourcePath_, &rpostbackPath_);
+ #ifdef _WIN32
+ resolvePath(resourcePath_, &consoleIoPath_);
+@@ -467,7 +467,7 @@
+ resolvePath(resourcePath_, &msysSshPath_);
+ resolvePath(resourcePath_, &sumatraPath_);
+ #endif
+- resolvePath(resourcePath_, &hunspellDictionariesPath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &hunspellDictionariesPath_);
+ resolvePath(resourcePath_, &mathjaxPath_);
+ resolvePath(resourcePath_, &libclangHeadersPath_);
+ resolvePandocPath(resourcePath_, &pandocPath_);
diff --git a/sci-mathematics/rstudio/files/rstudio-0.99.879-prefs.patch b/sci-mathematics/rstudio/files/rstudio-0.99.879-prefs.patch
new file mode 100644
index 000000000000..483613cc5c09
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-0.99.879-prefs.patch
@@ -0,0 +1,45 @@
+--- rstudio-0.99.879-orig/src/gwt/build.xml 2016-02-12 09:24:39.000000000 +1100
++++ rstudio-0.99.879/src/gwt/build.xml 2016-02-20 00:25:39.458756693 +1100
+@@ -25,6 +25,7 @@
+ <property name="gwt.extra.args" value=""/>
+ <property name="gwt.main.module" value="org.rstudio.studio.RStudio"/>
+ <property name="ace.bin" value="src/org/rstudio/studio/client/workbench/views/source/editors/text/ace"/>
++ <property environment="env"/>
+
+ <path id="project.class.path">
+ <pathelement location="bin"/>
+@@ -101,8 +102,10 @@
+ <pathelement location="src"/>
+ <path refid="project.class.path"/>
+ </classpath>
++ <jvmarg value="-Duser.home=${env.T}"/>
+ <!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
+ <jvmarg value="-Xmx1536M"/>
++ <jvmarg value="-Djava.util.prefs.userRoot=${env.T}"/>
+ <arg value="-war"/>
+ <arg value="www"/>
+ <arg value="-localWorkers"/>
+@@ -142,6 +145,7 @@
+ <pathelement location="src"/>
+ <path refid="project.class.path"/>
+ </classpath>
++ <jvmarg value="-Duser.home=${env.T}"/>
+ <jvmarg value="-Xmx2048M"/>
+ <arg value="-war"/>
+ <arg value="www"/>
+@@ -163,6 +167,7 @@
+ <pathelement location="src"/>
+ <path refid="project.class.path"/>
+ </classpath>
++ <jvmarg value="-Duser.home=${env.T}"/>
+ <jvmarg value="-Xmx2048M"/>
+ <arg value="-src"/>
+ <arg value = "src"/>
+@@ -194,6 +199,7 @@
+ <pathelement location="src"/>
+ <path refid="test.class.path"/>
+ </classpath>
++ <jvmarg value="-Duser.home=${env.T}"/>
+ <arg value="org.rstudio.studio.selenium.RStudioTestSuite"/>
+ </java>
+ </sequential>
diff --git a/sci-mathematics/rstudio/files/rstudio-1.0.44-clang-pandoc.patch b/sci-mathematics/rstudio/files/rstudio-1.0.44-clang-pandoc.patch
new file mode 100644
index 000000000000..ed0fc8ebce4b
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-1.0.44-clang-pandoc.patch
@@ -0,0 +1,71 @@
+--- rstudio-1.0.44-orig/src/cpp/session/CMakeLists.txt 2016-10-19 08:32:41.000000000 +1100
++++ rstudio-1.0.44/src/cpp/session/CMakeLists.txt 2016-12-01 23:44:30.130725331 +1100
+@@ -25,24 +25,6 @@
+ if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-26")
+ message(FATAL_ERROR "Mathjax 2.6 not found (re-run install-dependencies script to install)")
+ endif()
+-if(NOT EXISTS "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc")
+- message(FATAL_ERROR "pandoc not found (re-run install-dependencies script to install)")
+-endif()
+-
+-# verify libclang is installed
+-if(WIN32)
+- set(LIBCLANG_VERSION "3.4")
+-else()
+- set(LIBCLANG_VERSION "3.5")
+-endif()
+-set(LIBCLANG_DIR "${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/${LIBCLANG_VERSION}")
+-if(NOT EXISTS "${LIBCLANG_DIR}")
+- message(FATAL_ERROR "libclang ${LIBCLANG_VERSION} not found (re-run install-dependencies script to install)")
+-endif()
+-set(LIBCLANG_HEADERS_DIR "${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/builtin-headers")
+-if(NOT EXISTS "${LIBCLANG_HEADERS_DIR}")
+- message(FATAL_ERROR "libclang builtin-headers not found (re-run install-dependencies script to install)")
+-endif()
+
+
+ # include files
+@@ -420,18 +402,6 @@
+ install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/mathjax-26"
+ DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
+
+- # install pandoc
+- if(RSTUDIO_PACKAGE_BUILD_SLES)
+- # when producing a SUSE Linux Enterpise build, we want to install the
+- # static Pandoc binaries (see dependencies/common/install-pandoc)
+- set(PANDOC_EXTENSION_DIR "/static")
+- endif()
+- set(PANDOC_BIN "${RSTUDIO_DEPENDENCIES_DIR}/common/pandoc/1.17.2${PANDOC_EXTENSION_DIR}")
+- file(GLOB PANDOC_FILES "${PANDOC_BIN}/pandoc*")
+- install(FILES ${PANDOC_FILES}
+- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/pandoc)
+-
+ # install PDF.js
+ install(DIRECTORY "resources/pdfjs"
+ DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources)
+@@ -452,24 +422,6 @@
+ install(DIRECTORY "resources/pagedtable"
+ DESTINATION ${RSTUDIO_INSTALL_SUPPORTING}/resources)
+
+- # install libclang
+- if(WIN32)
+- file(GLOB LIBCLANG_32_FILES "${LIBCLANG_DIR}/x86/libclang.*")
+- install(PROGRAMS ${LIBCLANG_32_FILES}
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/rsclang/x86)
+- file(GLOB LIBCLANG_64_FILES "${LIBCLANG_DIR}/x86_64/libclang.*")
+- install(PROGRAMS ${LIBCLANG_64_FILES}
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/rsclang/x86_64)
+- else()
+- file(GLOB_RECURSE LIBCLANG_FILES "${LIBCLANG_DIR}/libclang.*")
+- install(PROGRAMS ${LIBCLANG_FILES}
+- DESTINATION ${RSTUDIO_INSTALL_BIN}/rsclang)
+- endif()
+-
+- # install libclang builtin-headers
+- install(DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/libclang/builtin-headers"
+- DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources/libclang")
+-
+ # install 64 bit binaries if we are on win64
+ if(WIN32)
+ if(NOT ("$ENV{PROGRAMW6432}" STREQUAL ""))
diff --git a/sci-mathematics/rstudio/files/rstudio-1.0.44-paths.patch b/sci-mathematics/rstudio/files/rstudio-1.0.44-paths.patch
new file mode 100644
index 000000000000..b2a1a33b44c2
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-1.0.44-paths.patch
@@ -0,0 +1,130 @@
+--- rstudio-1.0.44-orig/CMakeGlobals.txt 2016-10-19 08:32:41.000000000 +1100
++++ rstudio-1.0.44/CMakeGlobals.txt 2016-12-01 23:33:04.149326324 +1100
+@@ -123,7 +123,7 @@
+ else()
+ set(RSTUDIO_INSTALL_BIN bin)
+ endif()
+- set(RSTUDIO_INSTALL_SUPPORTING .)
++ set(RSTUDIO_INSTALL_SUPPORTING ${DISTRO_SHARE})
+ endif()
+
+ # if the install prefix is /usr/local then tweak as appropriate
+--- rstudio-1.0.44-orig/src/cpp/server/CMakeLists.txt 2016-10-19 08:32:41.000000000 +1100
++++ rstudio-1.0.44/src/cpp/server/CMakeLists.txt 2016-12-01 23:35:51.634862018 +1100
+@@ -155,7 +155,7 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_DEBIAN_SCRIPT}
+- DESTINATION ${RSERVER_INITD_DEBIAN_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_DEBIAN_DIR})
+
+ # install configured redhat init.d script
+ set(RSERVER_INITD_REDHAT_DIR "extras/init.d/redhat")
+@@ -163,7 +163,7 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_REDHAT_SCRIPT}
+- DESTINATION ${RSERVER_INITD_REDHAT_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_REDHAT_DIR})
+
+ # install configured suse init.d script
+ set(RSERVER_INITD_SUSE_DIR "extras/init.d/suse")
+@@ -171,13 +171,13 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_INITD_SUSE_SCRIPT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT})
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_INITD_SUSE_SCRIPT}
+- DESTINATION ${RSERVER_INITD_SUSE_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_INITD_SUSE_DIR})
+
+ # install pam profile
+ set(RSERVER_PAM_DIR "extras/pam")
+ set(RSERVER_PAM_PROFILE "${RSERVER_PAM_DIR}/rstudio")
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_PAM_PROFILE}
+- DESTINATION ${RSERVER_PAM_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_PAM_DIR})
+
+ # install configured apparmor profile
+ set(RSERVER_APPARMOR_DIR "extras/apparmor")
+@@ -185,9 +185,9 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_APPARMOR_PROFILE}
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+ install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_APPARMOR_DIR}/apparmor-profile-load
+- DESTINATION ${RSERVER_APPARMOR_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_APPARMOR_DIR})
+
+ # install configured upstart profile
+ set(RSERVER_UPSTART_DIR "extras/upstart")
+@@ -195,12 +195,12 @@
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE}
+- DESTINATION ${RSERVER_UPSTART_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+ set(RSERVER_UPSTART_PROFILE_REDHAT "${RSERVER_UPSTART_DIR}/rstudio-server.redhat.conf")
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_UPSTART_PROFILE_REDHAT}
+- DESTINATION ${RSERVER_UPSTART_DIR})
++ DESTINATION ${DISTRO_SHARE}/${RSERVER_UPSTART_DIR})
+
+ # install configured systemd profile
+ set(RSERVER_SYSTEMD_DIR "extras/systemd")
+--- rstudio-1.0.44-orig/src/cpp/server/ServerOptions.cpp 2016-10-19 08:32:41.000000000 +1100
++++ rstudio-1.0.44/src/cpp/server/ServerOptions.cpp 2016-12-01 23:33:04.151326331 +1100
+@@ -386,8 +386,8 @@
+
+ // convert relative paths by completing from the system installation
+ // path (this allows us to be relocatable)
+- resolvePath(resourcePath, &wwwLocalPath_);
+- resolvePath(resourcePath, &wwwSymbolMapsPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwLocalPath_);
++ resolvePath(resourcePath.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
+ resolvePath(binaryPath, &authPamHelperPath_);
+ resolvePath(binaryPath, &rsessionPath_);
+ resolvePath(binaryPath, &rldpathPath_);
+--- rstudio-1.0.44-orig/src/cpp/session/SessionOptions.cpp 2016-10-19 08:32:41.000000000 +1100
++++ rstudio-1.0.44/src/cpp/session/SessionOptions.cpp 2016-12-01 23:33:04.151326331 +1100
+@@ -49,7 +49,7 @@
+ namespace session {
+
+ namespace {
+-const char* const kDefaultPandocPath = "bin/pandoc";
++const char* const kDefaultPandocPath = "bin";
+ const char* const kDefaultPostbackPath = "bin/postback/rpostback";
+ const char* const kDefaultRsclangPath = "bin/rsclang";
+
+@@ -481,14 +481,14 @@
+ }
+
+ // convert relative paths by completing from the app resource path
+- resolvePath(resourcePath_, &rResourcesPath_);
+- resolvePath(resourcePath_, &agreementFilePath_);
+- resolvePath(resourcePath_, &wwwLocalPath_);
+- resolvePath(resourcePath_, &wwwSymbolMapsPath_);
+- resolvePath(resourcePath_, &coreRSourcePath_);
+- resolvePath(resourcePath_, &modulesRSourcePath_);
+- resolvePath(resourcePath_, &sessionLibraryPath_);
+- resolvePath(resourcePath_, &sessionPackageArchivesPath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &rResourcesPath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &agreementFilePath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &wwwLocalPath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &wwwSymbolMapsPath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &coreRSourcePath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &modulesRSourcePath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &sessionLibraryPath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &sessionPackageArchivesPath_);
+ resolvePostbackPath(resourcePath_, &rpostbackPath_);
+ #ifdef _WIN32
+ resolvePath(resourcePath_, &consoleIoPath_);
+@@ -498,7 +498,7 @@
+ resolvePath(resourcePath_, &sumatraPath_);
+ resolvePath(resourcePath_, &winutilsPath_);
+ #endif
+- resolvePath(resourcePath_, &hunspellDictionariesPath_);
++ resolvePath(resourcePath_.childPath(DISTRO_SHARE), &hunspellDictionariesPath_);
+ resolvePath(resourcePath_, &mathjaxPath_);
+ resolvePath(resourcePath_, &libclangHeadersPath_);
+ resolvePandocPath(resourcePath_, &pandocPath_);
diff --git a/sci-mathematics/rstudio/files/rstudio-1.0.44-systemd.patch b/sci-mathematics/rstudio/files/rstudio-1.0.44-systemd.patch
new file mode 100644
index 000000000000..7eafd4386abd
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-1.0.44-systemd.patch
@@ -0,0 +1,21 @@
+--- rstudio-1.0.44-orig/src/cpp/server/CMakeLists.txt 2016-10-19 08:32:41.000000000 +1100
++++ rstudio-1.0.44/src/cpp/server/CMakeLists.txt 2016-12-02 11:11:45.259050839 +1100
+@@ -203,17 +203,12 @@
+ DESTINATION ${RSERVER_UPSTART_DIR})
+
+ # install configured systemd profile
+- set(RSERVER_SYSTEMD_DIR "extras/systemd")
++ set(RSERVER_SYSTEMD_DIR "lib/systemd/system")
+ set(RSERVER_SYSTEMD_PROFILE "${RSERVER_SYSTEMD_DIR}/rstudio-server.service")
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_SYSTEMD_PROFILE}.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE})
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE}
+ DESTINATION ${RSERVER_SYSTEMD_DIR})
+- set(RSERVER_SYSTEMD_PROFILE_REDHAT "${RSERVER_SYSTEMD_DIR}/rstudio-server.redhat.service")
+- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${RSERVER_SYSTEMD_PROFILE_REDHAT}.in
+- ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE_REDHAT})
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${RSERVER_SYSTEMD_PROFILE_REDHAT}
+- DESTINATION ${RSERVER_SYSTEMD_DIR})
+
+ elseif(APPLE)
+
diff --git a/sci-mathematics/rstudio/files/rstudio-server.conf b/sci-mathematics/rstudio/files/rstudio-server.conf
new file mode 100644
index 000000000000..34e93e9fab0b
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-server.conf
@@ -0,0 +1,35 @@
+###########rstudio-server.conf#############
+
+# www-port entry corresponding to the port you want RStudio to listen on
+#www-port=80
+
+
+# By default RStudio binds to address 0.0.0.0 (accepting connections
+# from any remote IP). You can modify this behavior using the
+# www-address entry.
+#www-address=127.0.0.1
+
+
+# You can add elements to the default LD_LIBRARY_PATH for R
+# sessions (as determined by the R ldpaths script) by adding
+# an rsession-ld-library-path entry to the server config file.
+# This might be useful for ensuring that packages can
+# locate external library dependencies that aren't installed
+# in the system standard library paths
+#rsession-ld-library-path=/opt/local/lib:/opt/local/someapp/lib
+
+
+#By default RStudio Server runs against the version of R which
+# is found on the system PATH (using which R). You can override
+# which version of R is used via the rsession-which-r setting
+# in the server config file. For example, if you have two
+# versions of R installed on the server and want to make sure
+# the one at /usr/local/bin/R is used by RStudio then you would use:
+rsession-which-r=/usr/bin/R
+
+########ADDITIONALAL#########
+
+# To limit the users who can login to RStudio to the members
+# of a specific group, you use the auth-required-user-group
+# setting
+auth-required-user-group=rstudio-server
diff --git a/sci-mathematics/rstudio/files/rstudio-server.initd b/sci-mathematics/rstudio/files/rstudio-server.initd
new file mode 100644
index 000000000000..caa7e46d5df8
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-server.initd
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+start() {
+ ebegin "Starting RStudio Server"
+ start-stop-daemon --start --quiet --exec /usr/bin/rserver
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping RStudio Server"
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name /usr/bin/rserver
+ eend $?
+}
diff --git a/sci-mathematics/rstudio/files/rstudio-server.service.in b/sci-mathematics/rstudio/files/rstudio-server.service.in
new file mode 100644
index 000000000000..fb3e37305e00
--- /dev/null
+++ b/sci-mathematics/rstudio/files/rstudio-server.service.in
@@ -0,0 +1,10 @@
+[Unit]
+Description=RStudio Server
+
+[Service]
+Type=forking
+ExecStart=${CMAKE_INSTALL_PREFIX}/bin/rserver
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sci-mathematics/rstudio/metadata.xml b/sci-mathematics/rstudio/metadata.xml
new file mode 100644
index 000000000000..6dc54e48af98
--- /dev/null
+++ b/sci-mathematics/rstudio/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gienah@gentoo.org</email>
+ <name>Mark Wright</name>
+ </maintainer>
+ <longdescription lang="en">
+ RStudio is an integrated development environment (IDE) for R. It can
+ run it on a desktop or even over the web using RStudio Server.
+</longdescription>
+ <use>
+ <flag name="server">Build and install the RStudio server</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">rstudio/rstudio</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/rstudio/rstudio-0.97.336.ebuild b/sci-mathematics/rstudio/rstudio-0.97.336.ebuild
new file mode 100644
index 000000000000..e10f30a21ca6
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.97.336.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+# * fix the about/help/menu and get rid of license
+
+GWTVER=2.5.0.rc1
+GINVER=1.5
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="http://www.rstudio.org"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GINVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWTVER}.zip
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QTVER=4.8
+QTSLOT=4
+RDEPEND="
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ dev-libs/mathjax
+ dev-libs/openssl:0
+ >=virtual/jre-1.5:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QTVER}:${QTSLOT}
+ >=dev-qt/qtdbus-${QTVER}:${QTSLOT}
+ >=dev-qt/qtgui-${QTVER}:${QTSLOT}
+ >=dev-qt/qtwebkit-${QTVER}:${QTSLOT}
+ >=dev-qt/qtxmlpatterns-${QTVER}:${QTSLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.5
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWTVER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} dependencies/common/dictionaries || die
+ mv ../gwt-${GWTVER} src/gwt/lib/gwt/${GWTVER} || die
+ unzip -qd src/gwt/lib/gin/${GINVER} "${DISTDIR}"/gin-${GINVER}.zip || die
+ unzip -qd dependencies/common/dictionaries "${DISTDIR}"/core-dictionaries.zip || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch \
+ "${FILESDIR}"/${P}-prefs.patch \
+ "${FILESDIR}"/${P}-paths.patch \
+ "${FILESDIR}"/${P}-linker_flags.patch \
+ "${FILESDIR}"/${P}-boost-1.53.patch
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # specify that namespace core the is in the global namespace and not
+ # relative to some other namespace (like its ::core not ::boost::core)
+ find . \( -name *.cpp -or -name *.hpp \) -exec sed \
+ -e 's@<core::@< ::core::@g' -e 's@\([^:]\)core::@\1::core::@g' -i {} \;
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "All" "Desktop")")
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.97.551.ebuild b/sci-mathematics/rstudio/rstudio-0.97.551.ebuild
new file mode 100644
index 000000000000..e10f30a21ca6
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.97.551.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+# * fix the about/help/menu and get rid of license
+
+GWTVER=2.5.0.rc1
+GINVER=1.5
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="http://www.rstudio.org"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GINVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWTVER}.zip
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QTVER=4.8
+QTSLOT=4
+RDEPEND="
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ dev-libs/mathjax
+ dev-libs/openssl:0
+ >=virtual/jre-1.5:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QTVER}:${QTSLOT}
+ >=dev-qt/qtdbus-${QTVER}:${QTSLOT}
+ >=dev-qt/qtgui-${QTVER}:${QTSLOT}
+ >=dev-qt/qtwebkit-${QTVER}:${QTSLOT}
+ >=dev-qt/qtxmlpatterns-${QTVER}:${QTSLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.5
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWTVER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} dependencies/common/dictionaries || die
+ mv ../gwt-${GWTVER} src/gwt/lib/gwt/${GWTVER} || die
+ unzip -qd src/gwt/lib/gin/${GINVER} "${DISTDIR}"/gin-${GINVER}.zip || die
+ unzip -qd dependencies/common/dictionaries "${DISTDIR}"/core-dictionaries.zip || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch \
+ "${FILESDIR}"/${P}-prefs.patch \
+ "${FILESDIR}"/${P}-paths.patch \
+ "${FILESDIR}"/${P}-linker_flags.patch \
+ "${FILESDIR}"/${P}-boost-1.53.patch
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # specify that namespace core the is in the global namespace and not
+ # relative to some other namespace (like its ::core not ::boost::core)
+ find . \( -name *.cpp -or -name *.hpp \) -exec sed \
+ -e 's@<core::@< ::core::@g' -e 's@\([^:]\)core::@\1::core::@g' -i {} \;
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "All" "Desktop")")
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.98.1028.ebuild b/sci-mathematics/rstudio/rstudio-0.98.1028.ebuild
new file mode 100644
index 000000000000..ebaf1bd04ec1
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.98.1028.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils cmake-utils gnome2-utils versionator fdo-mime java-pkg-2 pax-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+GWTVER=2.6.0
+GINVER=1.5
+SELENIUMVER=2.37.0
+CHROMEDRIVER_VER=2.7
+PANDOC_VER=1.12.3
+PACKRAT_VER=0.3.0
+RMARKDOWN_VER=0.2.49
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GINVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWTVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUMVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUMVER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~hasufell/distfiles/packrat_${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~hasufell/distfiles/rmarkdown_${RMARKDOWN_VER}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+QTVER=4.8
+QTSLOT=4
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50
+ dev-libs/mathjax
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ sys-libs/zlib
+ >=virtual/jre-1.5:=
+ x11-libs/pango
+ >=dev-qt/qtcore-${QTVER}:${QTSLOT}
+ >=dev-qt/qtdbus-${QTVER}:${QTSLOT}
+ >=dev-qt/qtgui-${QTVER}:${QTSLOT}
+ >=dev-qt/qtwebkit-${QTVER}:${QTSLOT}
+ >=dev-qt/qtxmlpatterns-${QTVER}:${QTSLOT}"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.5
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWTVER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUMVER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWTVER} src/gwt/lib/gwt/${GWTVER} || die
+ unzip -qd src/gwt/lib/gin/${GINVER} \
+ "${DISTDIR}"/gin-${GINVER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUMVER} \
+ "${DISTDIR}"/selenium-java-${SELENIUMVER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUMVER}.jar \
+ src/gwt/lib/selenium/${SELENIUMVER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat_${PACKRAT_VER}.tar.gz
+ unpack rmarkdown_${RMARKDOWN_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown_${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat_${PACKRAT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.98.490-prefs.patch \
+ "${FILESDIR}"/${PN}-0.98.932-paths.patch \
+ "${FILESDIR}"/${PN}-0.98.932-pandoc.patch \
+ "${FILESDIR}"/${PN}-0.98.490-linker_flags.patch
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # specify that namespace core the is in the global namespace and not
+ # relative to some other namespace (like its ::core not ::boost::core)
+ find . \( -name *.cpp -or -name *.hpp \) -exec sed \
+ -e 's@<core::@< ::core::@g' -e 's@\([^:]\)core::@\1::core::@g' -i {} \;
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ -DRSTUDIO_INSTALL_FREEDESKTOP=ON
+ -DRSTUDIO_TARGET=Desktop
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.98.1091.ebuild b/sci-mathematics/rstudio/rstudio-0.98.1091.ebuild
new file mode 100644
index 000000000000..eeda0fd3c15f
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.98.1091.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+GWTVER=2.6.0
+GINVER=1.5
+SELENIUMVER=2.37.0
+CHROMEDRIVER_VER=2.7
+PANDOC_VER=1.12.4.2
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GINVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWTVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUMVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUMVER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QTVER=4.8
+QTSLOT=4
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.3
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ sys-libs/zlib
+ >=virtual/jre-1.5:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QTVER}:${QTSLOT}
+ >=dev-qt/qtdbus-${QTVER}:${QTSLOT}
+ >=dev-qt/qtgui-${QTVER}:${QTSLOT}
+ >=dev-qt/qtwebkit-${QTVER}:${QTSLOT}
+ >=dev-qt/qtxmlpatterns-${QTVER}:${QTSLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.5
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWTVER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUMVER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWTVER} src/gwt/lib/gwt/${GWTVER} || die
+ unzip -qd src/gwt/lib/gin/${GINVER} \
+ "${DISTDIR}"/gin-${GINVER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUMVER} \
+ "${DISTDIR}"/selenium-java-${SELENIUMVER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUMVER}.jar \
+ src/gwt/lib/selenium/${SELENIUMVER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${RMARKDOWN_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.98.490-prefs.patch \
+ "${FILESDIR}"/${PN}-0.98.932-paths.patch \
+ "${FILESDIR}"/${PN}-0.98.1091-pandoc.patch \
+ "${FILESDIR}"/${PN}-0.98.490-linker_flags.patch \
+ "${FILESDIR}"/${PN}-0.98.1091-boost-1.57.patch
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # specify that namespace core the is in the global namespace and not
+ # relative to some other namespace (like its ::core not ::boost::core)
+ find . \( -name *.cpp -or -name *.hpp \) -exec sed \
+ -e 's@<core::@< ::core::@g' -e 's@\([^:]\)core::@\1::core::@g' -i {} \;
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.98.490-r1.ebuild b/sci-mathematics/rstudio/rstudio-0.98.490-r1.ebuild
new file mode 100644
index 000000000000..cb0e8c0ef946
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.98.490-r1.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils cmake-utils gnome2-utils versionator fdo-mime java-pkg-2 pax-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+GWTVER=2.5.1
+GINVER=1.5
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="http://www.rstudio.org"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GINVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWTVER}.zip
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+QTVER=4.8
+QTSLOT=4
+RDEPEND="
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ dev-libs/mathjax
+ dev-libs/openssl:0
+ sys-libs/zlib
+ >=virtual/jre-1.5:=
+ x11-libs/pango
+ >=dev-qt/qtcore-${QTVER}:${QTSLOT}
+ >=dev-qt/qtdbus-${QTVER}:${QTSLOT}
+ >=dev-qt/qtgui-${QTVER}:${QTSLOT}
+ >=dev-qt/qtwebkit-${QTVER}:${QTSLOT}
+ >=dev-qt/qtxmlpatterns-${QTVER}:${QTSLOT}"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.5
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWTVER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} dependencies/common/dictionaries || die
+ mv ../gwt-${GWTVER} src/gwt/lib/gwt/${GWTVER} || die
+ unzip -qd src/gwt/lib/gin/${GINVER} "${DISTDIR}"/gin-${GINVER}.zip || die
+ unzip -qd dependencies/common/dictionaries "${DISTDIR}"/core-dictionaries.zip || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch \
+ "${FILESDIR}"/${P}-prefs.patch \
+ "${FILESDIR}"/${P}-paths.patch \
+ "${FILESDIR}"/${P}-linker_flags.patch
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # specify that namespace core the is in the global namespace and not
+ # relative to some other namespace (like its ::core not ::boost::core)
+ find . \( -name *.cpp -or -name *.hpp \) -exec sed \
+ -e 's@<core::@< ::core::@g' -e 's@\([^:]\)core::@\1::core::@g' -i {} \;
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ -DRSTUDIO_INSTALL_FREEDESKTOP=ON
+ -DRSTUDIO_TARGET=Desktop
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.98.490.ebuild b/sci-mathematics/rstudio/rstudio-0.98.490.ebuild
new file mode 100644
index 000000000000..59f506a074bf
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.98.490.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+GWTVER=2.5.1
+GINVER=1.5
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="http://www.rstudio.org"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GINVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWTVER}.zip
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QTVER=4.8
+QTSLOT=4
+RDEPEND="
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ dev-libs/mathjax
+ dev-libs/openssl:0
+ sys-libs/zlib
+ >=virtual/jre-1.5:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QTVER}:${QTSLOT}
+ >=dev-qt/qtdbus-${QTVER}:${QTSLOT}
+ >=dev-qt/qtgui-${QTVER}:${QTSLOT}
+ >=dev-qt/qtwebkit-${QTVER}:${QTSLOT}
+ >=dev-qt/qtxmlpatterns-${QTVER}:${QTSLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.5
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWTVER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} dependencies/common/dictionaries || die
+ mv ../gwt-${GWTVER} src/gwt/lib/gwt/${GWTVER} || die
+ unzip -qd src/gwt/lib/gin/${GINVER} "${DISTDIR}"/gin-${GINVER}.zip || die
+ unzip -qd dependencies/common/dictionaries "${DISTDIR}"/core-dictionaries.zip || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch \
+ "${FILESDIR}"/${P}-prefs.patch \
+ "${FILESDIR}"/${P}-paths.patch \
+ "${FILESDIR}"/${P}-linker_flags.patch
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # specify that namespace core the is in the global namespace and not
+ # relative to some other namespace (like its ::core not ::boost::core)
+ find . \( -name *.cpp -or -name *.hpp \) -exec sed \
+ -e 's@<core::@< ::core::@g' -e 's@\([^:]\)core::@\1::core::@g' -i {} \;
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.98.932.ebuild b/sci-mathematics/rstudio/rstudio-0.98.932.ebuild
new file mode 100644
index 000000000000..f52c74fdfd93
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.98.932.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+GWTVER=2.6.0
+GINVER=1.5
+SELENIUMVER=2.37.0
+CHROMEDRIVER_VER=2.7
+PANDOC_VER=1.12.3
+PACKRAT_VER=0.3.0
+RMARKDOWN_VER=0.2.49
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="http://www.rstudio.org"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GINVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWTVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUMVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUMVER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~hasufell/distfiles/packrat_${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~hasufell/distfiles/rmarkdown_${RMARKDOWN_VER}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QTVER=4.8
+QTSLOT=4
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ dev-libs/mathjax
+ dev-libs/openssl:0
+ sys-libs/zlib
+ >=virtual/jre-1.5:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QTVER}:${QTSLOT}
+ >=dev-qt/qtdbus-${QTVER}:${QTSLOT}
+ >=dev-qt/qtgui-${QTVER}:${QTSLOT}
+ >=dev-qt/qtwebkit-${QTVER}:${QTSLOT}
+ >=dev-qt/qtxmlpatterns-${QTVER}:${QTSLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.5
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWTVER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUMVER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWTVER} src/gwt/lib/gwt/${GWTVER} || die
+ unzip -qd src/gwt/lib/gin/${GINVER} \
+ "${DISTDIR}"/gin-${GINVER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUMVER} \
+ "${DISTDIR}"/selenium-java-${SELENIUMVER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUMVER}.jar \
+ src/gwt/lib/selenium/${SELENIUMVER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat_${PACKRAT_VER}.tar.gz
+ unpack rmarkdown_${RMARKDOWN_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown_${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat_${PACKRAT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.98.490-prefs.patch \
+ "${FILESDIR}"/${P}-paths.patch \
+ "${FILESDIR}"/${P}-pandoc.patch \
+ "${FILESDIR}"/${PN}-0.98.490-linker_flags.patch
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # specify that namespace core the is in the global namespace and not
+ # relative to some other namespace (like its ::core not ::boost::core)
+ find . \( -name *.cpp -or -name *.hpp \) -exec sed \
+ -e 's@<core::@< ::core::@g' -e 's@\([^:]\)core::@\1::core::@g' -i {} \;
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.98.953.ebuild b/sci-mathematics/rstudio/rstudio-0.98.953.ebuild
new file mode 100644
index 000000000000..9b56c4790ed7
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.98.953.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+GWTVER=2.6.0
+GINVER=1.5
+SELENIUMVER=2.37.0
+CHROMEDRIVER_VER=2.7
+PANDOC_VER=1.12.3
+PACKRAT_VER=0.3.0
+RMARKDOWN_VER=0.2.49
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="http://www.rstudio.org"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GINVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWTVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUMVER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUMVER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~hasufell/distfiles/packrat_${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~hasufell/distfiles/rmarkdown_${RMARKDOWN_VER}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QTVER=4.8
+QTSLOT=4
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ dev-libs/mathjax
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ sys-libs/zlib
+ >=virtual/jre-1.5:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QTVER}:${QTSLOT}
+ >=dev-qt/qtdbus-${QTVER}:${QTSLOT}
+ >=dev-qt/qtgui-${QTVER}:${QTSLOT}
+ >=dev-qt/qtwebkit-${QTVER}:${QTSLOT}
+ >=dev-qt/qtxmlpatterns-${QTVER}:${QTSLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.5
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWTVER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUMVER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWTVER} src/gwt/lib/gwt/${GWTVER} || die
+ unzip -qd src/gwt/lib/gin/${GINVER} \
+ "${DISTDIR}"/gin-${GINVER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUMVER} \
+ "${DISTDIR}"/selenium-java-${SELENIUMVER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUMVER}.jar \
+ src/gwt/lib/selenium/${SELENIUMVER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat_${PACKRAT_VER}.tar.gz
+ unpack rmarkdown_${RMARKDOWN_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown_${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat_${PACKRAT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.98.490-prefs.patch \
+ "${FILESDIR}"/${PN}-0.98.932-paths.patch \
+ "${FILESDIR}"/${PN}-0.98.932-pandoc.patch \
+ "${FILESDIR}"/${PN}-0.98.490-linker_flags.patch
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # specify that namespace core the is in the global namespace and not
+ # relative to some other namespace (like its ::core not ::boost::core)
+ find . \( -name *.cpp -or -name *.hpp \) -exec sed \
+ -e 's@<core::@< ::core::@g' -e 's@\([^:]\)core::@\1::core::@g' -i {} \;
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+}
+
+src_install() {
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.99.473-r1.ebuild b/sci-mathematics/rstudio/rstudio-0.99.473-r1.ebuild
new file mode 100644
index 000000000000..cd4815f5d332
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.99.473-r1.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.3
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.7:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.7:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.98.490-prefs.patch \
+ "${FILESDIR}"/${PN}-0.99.473-paths.patch \
+ "${FILESDIR}"/${PN}-0.99.473-clang-pandoc.patch \
+ "${FILESDIR}"/${PN}-0.98.490-linker_flags.patch \
+ "${FILESDIR}"/${PN}-0.98.1091-boost-1.57.patch \
+ "${FILESDIR}"/${PN}-0.99.473-qtsingleapplication.patch
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # Avoid some of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ sed -e 's@\(\s*\)\(</classpath>\)@\1\2\n\1\<jvmarg value="-Duser.home=${env.T}"/>@g' \
+ -i "${S}"/src/gwt/build.xml \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.99.482.ebuild b/sci-mathematics/rstudio/rstudio-0.99.482.ebuild
new file mode 100644
index 000000000000..cd4815f5d332
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.99.482.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.3
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.7:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.7:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.98.490-prefs.patch \
+ "${FILESDIR}"/${PN}-0.99.473-paths.patch \
+ "${FILESDIR}"/${PN}-0.99.473-clang-pandoc.patch \
+ "${FILESDIR}"/${PN}-0.98.490-linker_flags.patch \
+ "${FILESDIR}"/${PN}-0.98.1091-boost-1.57.patch \
+ "${FILESDIR}"/${PN}-0.99.473-qtsingleapplication.patch
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # Avoid some of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ sed -e 's@\(\s*\)\(</classpath>\)@\1\2\n\1\<jvmarg value="-Duser.home=${env.T}"/>@g' \
+ -i "${S}"/src/gwt/build.xml \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.99.483.ebuild b/sci-mathematics/rstudio/rstudio-0.99.483.ebuild
new file mode 100644
index 000000000000..cd4815f5d332
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.99.483.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.3
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.7:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.7:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.98.490-prefs.patch \
+ "${FILESDIR}"/${PN}-0.99.473-paths.patch \
+ "${FILESDIR}"/${PN}-0.99.473-clang-pandoc.patch \
+ "${FILESDIR}"/${PN}-0.98.490-linker_flags.patch \
+ "${FILESDIR}"/${PN}-0.98.1091-boost-1.57.patch \
+ "${FILESDIR}"/${PN}-0.99.473-qtsingleapplication.patch
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # Avoid some of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ sed -e 's@\(\s*\)\(</classpath>\)@\1\2\n\1\<jvmarg value="-Duser.home=${env.T}"/>@g' \
+ -i "${S}"/src/gwt/build.xml \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.99.484.ebuild b/sci-mathematics/rstudio/rstudio-0.99.484.ebuild
new file mode 100644
index 000000000000..cd4815f5d332
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.99.484.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.3
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.7:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.7:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.98.490-prefs.patch \
+ "${FILESDIR}"/${PN}-0.99.473-paths.patch \
+ "${FILESDIR}"/${PN}-0.99.473-clang-pandoc.patch \
+ "${FILESDIR}"/${PN}-0.98.490-linker_flags.patch \
+ "${FILESDIR}"/${PN}-0.98.1091-boost-1.57.patch \
+ "${FILESDIR}"/${PN}-0.99.473-qtsingleapplication.patch
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # Avoid some of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ sed -e 's@\(\s*\)\(</classpath>\)@\1\2\n\1\<jvmarg value="-Duser.home=${env.T}"/>@g' \
+ -i "${S}"/src/gwt/build.xml \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.99.486-r1.ebuild b/sci-mathematics/rstudio/rstudio-0.99.486-r1.ebuild
new file mode 100644
index 000000000000..a0c4907f68f8
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.99.486-r1.ebuild
@@ -0,0 +1,248 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.3
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.7:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.7:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.98.490-prefs.patch"
+ "${FILESDIR}/${PN}-0.99.473-paths.patch"
+ "${FILESDIR}/${PN}-0.99.473-clang-pandoc.patch"
+ "${FILESDIR}/${PN}-0.98.490-linker_flags.patch"
+ "${FILESDIR}/${PN}-0.98.1091-boost-1.57.patch"
+ "${FILESDIR}/${PN}-0.99.473-qtsingleapplication.patch"
+ "${FILESDIR}/${PN}-0.99.486-systemd.patch"
+)
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch "${PATCHES[@]}"
+
+ # Enable CMake to install our .service file for systemd usage
+ mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
+ cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # Avoid some of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ sed -e 's@\(\s*\)\(</classpath>\)@\1\2\n\1\<jvmarg value="-Duser.home=${env.T}"/>@g' \
+ -i "${S}"/src/gwt/build.xml \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.99.491.ebuild b/sci-mathematics/rstudio/rstudio-0.99.491.ebuild
new file mode 100644
index 000000000000..a0c4907f68f8
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.99.491.ebuild
@@ -0,0 +1,248 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.3
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.7:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.7:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.98.490-prefs.patch"
+ "${FILESDIR}/${PN}-0.99.473-paths.patch"
+ "${FILESDIR}/${PN}-0.99.473-clang-pandoc.patch"
+ "${FILESDIR}/${PN}-0.98.490-linker_flags.patch"
+ "${FILESDIR}/${PN}-0.98.1091-boost-1.57.patch"
+ "${FILESDIR}/${PN}-0.99.473-qtsingleapplication.patch"
+ "${FILESDIR}/${PN}-0.99.486-systemd.patch"
+)
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch "${PATCHES[@]}"
+
+ # Enable CMake to install our .service file for systemd usage
+ mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
+ cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # Avoid some of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ sed -e 's@\(\s*\)\(</classpath>\)@\1\2\n\1\<jvmarg value="-Duser.home=${env.T}"/>@g' \
+ -i "${S}"/src/gwt/build.xml \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.99.879.ebuild b/sci-mathematics/rstudio/rstudio-0.99.879.ebuild
new file mode 100644
index 000000000000..6adb372e5cd4
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.99.879.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.3
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.7:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.7:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.99.879-prefs.patch"
+ "${FILESDIR}/${PN}-0.99.879-paths.patch"
+ "${FILESDIR}/${PN}-0.99.879-clang-pandoc.patch"
+ "${FILESDIR}/${PN}-0.98.490-linker_flags.patch"
+ "${FILESDIR}/${PN}-0.98.1091-boost-1.57.patch"
+ "${FILESDIR}/${PN}-0.99.473-qtsingleapplication.patch"
+ "${FILESDIR}/${PN}-0.99.486-systemd.patch"
+)
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch "${PATCHES[@]}"
+
+ # Enable CMake to install our .service file for systemd usage
+ mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
+ cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # The git commit for tag v0.99.879
+ sed -e 's@git ARGS rev-parse HEAD@echo ARGS 9ac918338d6f9d6dd25807d6d746b470f1cfcf6d@'\
+ -i "${S}"/CMakeLists.txt \
+ "${S}"/CMakeGlobals.txt \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ -DRSTUDIO_VERIFY_R_VERSION=FALSE
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.99.893.ebuild b/sci-mathematics/rstudio/rstudio-0.99.893.ebuild
new file mode 100644
index 000000000000..c3bc93830dde
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.99.893.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.3
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.7:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.7:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.99.879-prefs.patch"
+ "${FILESDIR}/${PN}-0.99.879-paths.patch"
+ "${FILESDIR}/${PN}-0.99.879-clang-pandoc.patch"
+ "${FILESDIR}/${PN}-0.98.490-linker_flags.patch"
+ "${FILESDIR}/${PN}-0.98.1091-boost-1.57.patch"
+ "${FILESDIR}/${PN}-0.99.473-qtsingleapplication.patch"
+ "${FILESDIR}/${PN}-0.99.486-systemd.patch"
+)
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch "${PATCHES[@]}"
+
+ # Enable CMake to install our .service file for systemd usage
+ mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
+ cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # The git commit for tag v0.99.893
+ sed -e 's@git ARGS rev-parse HEAD@echo ARGS 7510856081e5b1b577bcc230fc2c8ac62eafa62e@'\
+ -i "${S}"/CMakeLists.txt \
+ "${S}"/CMakeGlobals.txt \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ -DRSTUDIO_VERIFY_R_VERSION=FALSE
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.99.896.ebuild b/sci-mathematics/rstudio/rstudio-0.99.896.ebuild
new file mode 100644
index 000000000000..134838bcf653
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.99.896.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.3
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.7:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.7:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.99.879-prefs.patch"
+ "${FILESDIR}/${PN}-0.99.879-paths.patch"
+ "${FILESDIR}/${PN}-0.99.879-clang-pandoc.patch"
+ "${FILESDIR}/${PN}-0.98.490-linker_flags.patch"
+ "${FILESDIR}/${PN}-0.98.1091-boost-1.57.patch"
+ "${FILESDIR}/${PN}-0.99.473-qtsingleapplication.patch"
+ "${FILESDIR}/${PN}-0.99.486-systemd.patch"
+)
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch "${PATCHES[@]}"
+
+ # Enable CMake to install our .service file for systemd usage
+ mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
+ cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # The git commit for tag v0.99.896
+ sed -e 's@git ARGS rev-parse HEAD@echo ARGS 5dbc604635bb296bc41fb7fa21e56f7195fbe1ca@'\
+ -i "${S}"/CMakeLists.txt \
+ "${S}"/CMakeGlobals.txt \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ -DRSTUDIO_VERIFY_R_VERSION=FALSE
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.99.902.ebuild b/sci-mathematics/rstudio/rstudio-0.99.902.ebuild
new file mode 100644
index 000000000000..bd0e219d50ff
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.99.902.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.3
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.7:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.7:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.99.879-prefs.patch"
+ "${FILESDIR}/${PN}-0.99.879-paths.patch"
+ "${FILESDIR}/${PN}-0.99.879-clang-pandoc.patch"
+ "${FILESDIR}/${PN}-0.98.490-linker_flags.patch"
+ "${FILESDIR}/${PN}-0.98.1091-boost-1.57.patch"
+ "${FILESDIR}/${PN}-0.99.473-qtsingleapplication.patch"
+ "${FILESDIR}/${PN}-0.99.486-systemd.patch"
+)
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch "${PATCHES[@]}"
+
+ # Enable CMake to install our .service file for systemd usage
+ mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
+ cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # The git commit for tag v0.99.902
+ sed -e 's@git ARGS rev-parse HEAD@echo ARGS 4daf125408b86eeba48a39f62df34eb81d934639@'\
+ -i "${S}"/CMakeLists.txt \
+ "${S}"/CMakeGlobals.txt \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ -DRSTUDIO_VERIFY_R_VERSION=FALSE
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-0.99.903.ebuild b/sci-mathematics/rstudio/rstudio-0.99.903.ebuild
new file mode 100644
index 000000000000..60d0858c53c8
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-0.99.903.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.3
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.7:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.7:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.99.879-prefs.patch"
+ "${FILESDIR}/${PN}-0.99.879-paths.patch"
+ "${FILESDIR}/${PN}-0.99.879-clang-pandoc.patch"
+ "${FILESDIR}/${PN}-0.98.490-linker_flags.patch"
+ "${FILESDIR}/${PN}-0.98.1091-boost-1.57.patch"
+ "${FILESDIR}/${PN}-0.99.473-qtsingleapplication.patch"
+ "${FILESDIR}/${PN}-0.99.486-systemd.patch"
+)
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ java-pkg-2_src_prepare
+
+ egit_clean
+
+ epatch "${PATCHES[@]}"
+
+ # Enable CMake to install our .service file for systemd usage
+ mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
+ cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-23 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # The git commit for tag: git rev-list -n 1 v0.99.903
+ sed -e 's@git ARGS rev-parse HEAD@echo ARGS 0eb2d8ea28ebc1ac6ac327e023becb6133b679c4@'\
+ -i "${S}"/CMakeLists.txt \
+ "${S}"/CMakeGlobals.txt \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ $(cmake-utils_use !dedicated RSTUDIO_INSTALL_FREEDESKTOP)
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ -DRSTUDIO_VERIFY_R_VERSION=FALSE
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-1.0.136.ebuild b/sci-mathematics/rstudio/rstudio-1.0.136.ebuild
new file mode 100644
index 000000000000..dcb101cac4e3
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-1.0.136.ebuild
@@ -0,0 +1,247 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.7.0
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.8:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.8:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.99.879-prefs.patch"
+ "${FILESDIR}/${PN}-1.0.44-paths.patch"
+ "${FILESDIR}/${PN}-1.0.44-clang-pandoc.patch"
+ "${FILESDIR}/${PN}-0.98.490-linker_flags.patch"
+ "${FILESDIR}/${PN}-0.98.1091-boost-1.57.patch"
+ "${FILESDIR}/${PN}-0.99.473-qtsingleapplication.patch"
+ "${FILESDIR}/${PN}-1.0.44-systemd.patch"
+)
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ default
+ java-pkg-2_src_prepare
+ egit_clean
+
+ # Enable CMake to install our .service file for systemd usage
+ mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
+ cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-26 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # The git commit for tag: git rev-list -n 1 v0.99.903
+ sed -e 's@git ARGS rev-parse HEAD@echo ARGS 0eb2d8ea28ebc1ac6ac327e023becb6133b679c4@'\
+ -i "${S}"/CMakeLists.txt \
+ "${S}"/CMakeGlobals.txt \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ -DRSTUDIO_INSTALL_FREEDESKTOP="$(usex !dedicated "ON" "OFF")"
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ -DRSTUDIO_VERIFY_R_VERSION=FALSE
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-1.0.143.ebuild b/sci-mathematics/rstudio/rstudio-1.0.143.ebuild
new file mode 100644
index 000000000000..dcb101cac4e3
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-1.0.143.ebuild
@@ -0,0 +1,247 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.7.0
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.8:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.8:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.99.879-prefs.patch"
+ "${FILESDIR}/${PN}-1.0.44-paths.patch"
+ "${FILESDIR}/${PN}-1.0.44-clang-pandoc.patch"
+ "${FILESDIR}/${PN}-0.98.490-linker_flags.patch"
+ "${FILESDIR}/${PN}-0.98.1091-boost-1.57.patch"
+ "${FILESDIR}/${PN}-0.99.473-qtsingleapplication.patch"
+ "${FILESDIR}/${PN}-1.0.44-systemd.patch"
+)
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ default
+ java-pkg-2_src_prepare
+ egit_clean
+
+ # Enable CMake to install our .service file for systemd usage
+ mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
+ cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-26 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # The git commit for tag: git rev-list -n 1 v0.99.903
+ sed -e 's@git ARGS rev-parse HEAD@echo ARGS 0eb2d8ea28ebc1ac6ac327e023becb6133b679c4@'\
+ -i "${S}"/CMakeLists.txt \
+ "${S}"/CMakeGlobals.txt \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ -DRSTUDIO_INSTALL_FREEDESKTOP="$(usex !dedicated "ON" "OFF")"
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ -DRSTUDIO_VERIFY_R_VERSION=FALSE
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-1.0.153.ebuild b/sci-mathematics/rstudio/rstudio-1.0.153.ebuild
new file mode 100644
index 000000000000..dcb101cac4e3
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-1.0.153.ebuild
@@ -0,0 +1,247 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.7.0
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.8:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.8:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.99.879-prefs.patch"
+ "${FILESDIR}/${PN}-1.0.44-paths.patch"
+ "${FILESDIR}/${PN}-1.0.44-clang-pandoc.patch"
+ "${FILESDIR}/${PN}-0.98.490-linker_flags.patch"
+ "${FILESDIR}/${PN}-0.98.1091-boost-1.57.patch"
+ "${FILESDIR}/${PN}-0.99.473-qtsingleapplication.patch"
+ "${FILESDIR}/${PN}-1.0.44-systemd.patch"
+)
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ default
+ java-pkg-2_src_prepare
+ egit_clean
+
+ # Enable CMake to install our .service file for systemd usage
+ mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
+ cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-26 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # The git commit for tag: git rev-list -n 1 v0.99.903
+ sed -e 's@git ARGS rev-parse HEAD@echo ARGS 0eb2d8ea28ebc1ac6ac327e023becb6133b679c4@'\
+ -i "${S}"/CMakeLists.txt \
+ "${S}"/CMakeGlobals.txt \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ -DRSTUDIO_INSTALL_FREEDESKTOP="$(usex !dedicated "ON" "OFF")"
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ -DRSTUDIO_VERIFY_R_VERSION=FALSE
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rstudio/rstudio-1.0.44.ebuild b/sci-mathematics/rstudio/rstudio-1.0.44.ebuild
new file mode 100644
index 000000000000..dcb101cac4e3
--- /dev/null
+++ b/sci-mathematics/rstudio/rstudio-1.0.44.ebuild
@@ -0,0 +1,247 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils user cmake-utils gnome2-utils pam versionator fdo-mime java-pkg-2 pax-utils qmake-utils
+
+# TODO
+# * package gin and gwt
+# * use dict from tree, linguas
+# * do src_test (use junit from tree?)
+
+# update from scripts in dependencies/common
+# egrep '(GWT_SDK_VER=|GIN_VER=|SELENIUM_VER=|CHROMEDRIVER_VER=)' dependencies/common/install-gwt
+GWT_VER=2.7.0
+GIN_VER=1.5
+SELENIUM_VER=2.37.0
+CHROMEDRIVER_VER=2.7
+# grep 'PANDOC_VERSION=' dependencies/common/update-pandoc
+PANDOC_VER=1.13.1
+# ls dependencies/common/*.tar.gz
+PACKRAT_VER=0.98.1000
+RMARKDOWN_VER=0.98.1000
+SHINYAPPS_VER=0.98.1000
+RSCONNECT_VER=0.4.1.4_fcac892a69817febd7b655b189bf57193260cda0
+
+DESCRIPTION="IDE for the R language"
+HOMEPAGE="
+ http://www.rstudio.org
+ https://github.com/rstudio/rstudio/"
+SRC_URI="
+ https://github.com/rstudio/rstudio/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://s3.amazonaws.com/rstudio-buildtools/gin-${GIN_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/gwt-${GWT_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-java-${SELENIUM_VER}.zip
+ https://s3.amazonaws.com/rstudio-buildtools/selenium-server-standalone-${SELENIUM_VER}.jar
+ https://s3.amazonaws.com/rstudio-buildtools/chromedriver-linux
+ https://s3.amazonaws.com/rstudio-dictionaries/core-dictionaries.zip
+ https://dev.gentoo.org/~gienah/distfiles/packrat-${PACKRAT_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rmarkdown-${RMARKDOWN_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/shinyapps-${SHINYAPPS_VER}.tar.gz
+ https://dev.gentoo.org/~gienah/distfiles/rsconnect_${RSCONNECT_VER}.tar.gz
+"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dedicated server"
+
+QT_VER=5.4
+QT_SLOT=5
+RDEPEND="
+ app-text/pandoc
+ dev-haskell/pandoc-citeproc
+ >=dev-lang/R-2.11.1
+ >=dev-libs/boost-1.50:=
+ >=dev-libs/mathjax-2.7.0
+ dev-libs/openssl:0
+ sys-apps/util-linux
+ >=sys-devel/clang-3.5.0:*
+ sys-libs/zlib
+ >=virtual/jre-1.8:=
+ x11-libs/pango
+ !dedicated? (
+ >=dev-qt/qtcore-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdeclarative-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtdbus-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtgui-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtnetwork-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtopengl-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtpositioning-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtprintsupport-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsingleapplication-2.6.1_p20150629[X,qt5]
+ >=dev-qt/qtsensors-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsql-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtsvg-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwebkit-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtwidgets-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxml-${QT_VER}:${QT_SLOT}
+ >=dev-qt/qtxmlpatterns-${QT_VER}:${QT_SLOT}
+ server? ( virtual/pam )
+ )
+ dedicated? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-java/ant-core
+ >=virtual/jdk-1.8:=
+ virtual/pkgconfig"
+# test? ( dev-java/junit:4 )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.99.879-prefs.patch"
+ "${FILESDIR}/${PN}-1.0.44-paths.patch"
+ "${FILESDIR}/${PN}-1.0.44-clang-pandoc.patch"
+ "${FILESDIR}/${PN}-0.98.490-linker_flags.patch"
+ "${FILESDIR}/${PN}-0.98.1091-boost-1.57.patch"
+ "${FILESDIR}/${PN}-0.99.473-qtsingleapplication.patch"
+ "${FILESDIR}/${PN}-1.0.44-systemd.patch"
+)
+
+src_unpack() {
+ unpack ${P}.tar.gz gwt-${GWT_VER}.zip
+ cd "${S}" || die
+ mkdir -p src/gwt/lib/{gin,gwt} \
+ dependencies/common/dictionaries \
+ src/gwt/lib/selenium/${SELENIUM_VER} \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER} || die
+ mv ../gwt-${GWT_VER} src/gwt/lib/gwt/${GWT_VER} || die
+ unzip -qd src/gwt/lib/gin/${GIN_VER} \
+ "${DISTDIR}"/gin-${GIN_VER}.zip || die
+ unzip -qd dependencies/common/dictionaries \
+ "${DISTDIR}"/core-dictionaries.zip || die
+ unzip -qd src/gwt/lib/selenium/${SELENIUM_VER} \
+ "${DISTDIR}"/selenium-java-${SELENIUM_VER}.zip || die
+ cp "${DISTDIR}"/selenium-server-standalone-${SELENIUM_VER}.jar \
+ src/gwt/lib/selenium/${SELENIUM_VER}/ || die
+ cp "${DISTDIR}"/chromedriver-linux \
+ src/gwt/lib/selenium/chromedriver/${CHROMEDRIVER_VER}/ || die
+ cd dependencies/common || die
+ unpack packrat-${PACKRAT_VER}.tar.gz
+ unpack rmarkdown-${RMARKDOWN_VER}.tar.gz
+ unpack shinyapps-${SHINYAPPS_VER}.tar.gz
+ unpack rsconnect_${RSCONNECT_VER}.tar.gz
+ cp "${DISTDIR}"/rmarkdown-${RMARKDOWN_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/packrat-${PACKRAT_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/shinyapps-${SHINYAPPS_VER}.tar.gz \
+ . || die
+ cp "${DISTDIR}"/rsconnect_${RSCONNECT_VER}.tar.gz \
+ . || die
+}
+
+src_prepare() {
+ default
+ java-pkg-2_src_prepare
+ egit_clean
+
+ # Enable CMake to install our .service file for systemd usage
+ mkdir -vp "${S}/src/cpp/server/lib/systemd/system" || die
+ cp -v "${FILESDIR}/rstudio-server.service.in" "${S}/src/cpp/server/lib/systemd/system/" || die
+
+ # Adding -DDISTRO_SHARE=... to append-flags breaks cmake so using
+ # this sed hack for now. ~RMH
+ sed -i \
+ -e "s|DISTRO_SHARE|\"share/${PN}\"|g" \
+ src/cpp/server/ServerOptions.cpp \
+ src/cpp/session/SessionOptions.cpp || die
+
+ # use mathjax from system
+ ln -sf "${EPREFIX}"/usr/share/mathjax dependencies/common/mathjax-26 || die
+
+ # make sure icons and mime stuff are with prefix
+ sed -i \
+ -e "s:/usr:${EPREFIX}/usr:g" \
+ CMakeGlobals.txt src/cpp/desktop/CMakeLists.txt || die
+
+ # On Gentoo the rstudio-server configuration file is /etc/conf.d/rstudio-server.conf
+ sed -e "s@/etc/rstudio/rserver.conf@${EROOT}etc/conf.d/rstudio-server.conf@" \
+ -i src/cpp/server/ServerOptions.cpp \
+ || die
+
+ # Set the rsession.conf file location for Gentoo prefix
+ sed -e "s@/etc/rstudio/rsession.conf@${EROOT}etc/rstudio/rsession.conf@" \
+ -i src/cpp/session/SessionOptions.cpp \
+ || die
+
+ # dev-qt/qtsingleapplication-2.6.1_p20150629 does not provide a cmake module.
+ # It provides a library that has its version number appended to the end,
+ # which is difficult to handle in cmake, as find_library does not support
+ # searching for wildcard library names. So I find the library name from the
+ # qmake spec, and then sed this into the patched src/cpp/desktop/CMakeLists.txt.
+ rm -rf "${S}"/src/cpp/desktop/3rdparty || die
+ local s=$(grep '\-lQt$${QT_MAJOR_VERSION}Solutions_SingleApplication' \
+ $(qt5_get_mkspecsdir)/features/qtsingleapplication.prf \
+ | sed -e 's@\$\${QT_MAJOR_VERSION}@5@' \
+ -e 's@LIBS \*= -l@@')
+ sed -e "s@Qt5Solutions_SingleApplication-2.6@${s}@g" \
+ -i "${S}"/src/cpp/desktop/CMakeLists.txt \
+ || die
+
+ # The git commit for tag: git rev-list -n 1 v0.99.903
+ sed -e 's@git ARGS rev-parse HEAD@echo ARGS 0eb2d8ea28ebc1ac6ac327e023becb6133b679c4@'\
+ -i "${S}"/CMakeLists.txt \
+ "${S}"/CMakeGlobals.txt \
+ || die
+}
+
+src_configure() {
+ export RSTUDIO_VERSION_MAJOR=$(get_version_component_range 1)
+ export RSTUDIO_VERSION_MINOR=$(get_version_component_range 2)
+ export RSTUDIO_VERSION_PATCH=$(get_version_component_range 3)
+
+ local mycmakeargs=(
+ -DDISTRO_SHARE=share/${PN}
+ -DRSTUDIO_INSTALL_FREEDESKTOP="$(usex !dedicated "ON" "OFF")"
+ -DRSTUDIO_TARGET=$(usex dedicated "Server" "$(usex server "Development" "Desktop")")
+ -DQT_QMAKE_EXECUTABLE=$(qt5_get_bindir)/qmake
+ -DRSTUDIO_VERIFY_R_VERSION=FALSE
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # Avoid the rest of the oracle-jdk-bin-1.8.0.60 sandbox violations F: mkdir S: deny
+ # P: /root/.oracle_jre_usage.
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_compile
+}
+
+src_install() {
+ export ANT_OPTS="-Duser.home=${T}"
+ cmake-utils_src_install
+ pax-mark m "${ED}usr/bin/rstudio"
+ doconfd "${FILESDIR}"/rstudio-server.conf
+ dodir /etc/rstudio
+ insinto /etc/rstudio
+ doins "${FILESDIR}"/rsession.conf
+ dosym /etc/conf.d/rstudio-server.conf /etc/rstudio/rserver.conf
+ if use dedicated || use server; then
+ dopamd src/cpp/server/extras/pam/rstudio
+ newinitd "${FILESDIR}"/rstudio-server.initd rstudio-server
+ fi
+}
+
+pkg_preinst() {
+ use dedicated || gnome2_icon_savelist
+ java-pkg-2_pkg_preinst
+}
+
+pkg_postinst() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+
+ if use dedicated || use server; then
+ enewgroup rstudio-server
+ enewuser rstudio-server -1 -1 -1 rstudio-server
+ fi
+}
+
+pkg_postrm() {
+ use dedicated || { fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update ;}
+}
diff --git a/sci-mathematics/rw/Manifest b/sci-mathematics/rw/Manifest
new file mode 100644
index 000000000000..af7f2755fb26
--- /dev/null
+++ b/sci-mathematics/rw/Manifest
@@ -0,0 +1,5 @@
+DIST rw-0.7.tar.gz 322255 SHA256 e049966e5c4f446b639d4b0c40d3ceddd57a79a8890c10dce90614d105d962e7 SHA512 2bccbaf1a7432b845e9bf14d79e350275d1ca417cb368e870b6cb1a310a92cce67c9e4ce3c550da2900a8e08c3771cc534d593f67267eee17d25c756d8c36e3b WHIRLPOOL 27d274a528a7f074b8ca1b38872220fe4e49488199fa496fab5330fd1866b504851250cfba2539a86c63104bbdee7be29a677aa6a21a7bf899cb546204e9138c
+EBUILD rw-0.7-r2.ebuild 932 SHA256 916c3e7763236a21f52d996d0d2c2b2bd247e5fef9d738554dca5d6c98e6068f SHA512 906441df650f9c36e2cffc43e550be61bba214c43a980909251d7b62ebca024d7df250c4b4ed04defc95ab5316be17ce753e1394c612861daec2dd042eac1c48 WHIRLPOOL 672869ad888c1f12f3695b60c0ce03b24ae647432b3b93b603e281ccecbbea0da5530033c4e998fe77de5d7f054e3f2db4733793776d7f030c7a288f0050a3ef
+MISC ChangeLog 3957 SHA256 f60cdd7a51b63698005a333717c5eefdad0b8ea2024477a52f7ec062edbc99ac SHA512 6ffb8f91563c4a6f4c9711c6fc6be0cf145d008b77b6a0fa84ca294a16b2328142e0b93a8edf70110c462a2d11c822a5c60463941e75d37358abdd2656777727 WHIRLPOOL acc3b3dbcbe1e770fec34714e635cf382fc290ed2f6c95020a3c6f998377765217acd9accba893b230e3cb742f99d591bdeb8cbde1103859e2e7664bddf533e3
+MISC ChangeLog-2015 405 SHA256 a67d90647e74786eb6988f4251c8b3787c99c74d914eff85ef7f455922fec74d SHA512 2a111914d9a646e52471e28f5d8e829a5e8dae518235a58265112d36199052a51bc9ca776bf06c3e80273e800110d943167cc55fe4cbff1f57c4079376c90391 WHIRLPOOL 7626ff0edeba60a8ab78cc62d302d1489110fb6fc42090e36cc6b709db721e5a757c02c9bc9e03ff7009cdbae0c81c1b18f6111fe2ae5abe0fbb82feab249ca4
+MISC metadata.xml 1121 SHA256 8752dd48075d02efc6ba4c87a440b6b701ef3fb282aa2a9f45d395167f803f78 SHA512 9c22d1d83b1c68e0e6cc25d93965b1a4efb01e85083a8886be0b5cd74a4700c74fa855b8d9dbee3feadf102cbe964d1119610e6456e06a1e16ed7e993a35717b WHIRLPOOL 80fd6ec3773d5c169a3d5f6e44b0d72220daed3564782e4a62431d9c4c7aa5880fe545414fdb6f26c38ac1e859ce402f36c123780167f9744e5f70f66f195fe8
diff --git a/sci-mathematics/rw/metadata.xml b/sci-mathematics/rw/metadata.xml
new file mode 100644
index 000000000000..888e9c75b94d
--- /dev/null
+++ b/sci-mathematics/rw/metadata.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+ </maintainer>
+
+ <maintainer type="person">
+ <email>frp.bissey@gmail.com</email>
+ <name>François Bissey</name>
+ </maintainer>
+
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+
+ <longdescription lang="en">
+ rw is a program that calculates rank-width and rank-decompositions.
+ It is based on ideas from "Computing rank-width exactly" by Sang-il Oum,
+ "Sopra una formula numerica" by Ernesto Pascal, "Generation of a Vector
+ from the Lexicographical Index" by B.P. Buckles and M. Lybanon and "Fast
+ additions on masked integers" by Michael D. Adams and David S. Wise.
+ </longdescription>
+
+ <use>
+ <flag name="executable">Build the 'rw' program.</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/rw/rw-0.7-r2.ebuild b/sci-mathematics/rw/rw-0.7-r2.ebuild
new file mode 100644
index 000000000000..c1baf16e3828
--- /dev/null
+++ b/sci-mathematics/rw/rw-0.7-r2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Compute rank-width decompositions of graphs"
+AUTHORPAGE="http://pholia.tdi.informatik.uni-frankfurt.de/~philipp/"
+HOMEPAGE="${AUTHORPAGE}software/${PN}.shtml"
+SRC_URI="${AUTHORPAGE}software/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~amd64-linux ~x86 ~x86-linux ~ppc-macos ~x86-macos ~x64-macos"
+IUSE="+executable"
+
+DEPEND="executable? ( >=dev-libs/igraph-0.6 )"
+
+# We have a file collision (librw.so) with xpaint, bug 560210.
+RDEPEND="${DEPEND}
+ !media-gfx/xpaint"
+
+DOCDIR="/usr/share/doc/${PF}"
+
+src_configure(){
+ econf $(use_enable executable) --docdir="${EPREFIX}${DOCDIR}"
+}
+
+src_install(){
+ # The examples graphs are meant to be fed uncompressed into the 'rw'
+ # program. The rest of the docs are small so just leave everything
+ # uncompressed.
+ docompress -x "${DOCDIR}"
+ default
+}
diff --git a/sci-mathematics/sha1-polyml/Manifest b/sci-mathematics/sha1-polyml/Manifest
new file mode 100644
index 000000000000..b333ad50ad8c
--- /dev/null
+++ b/sci-mathematics/sha1-polyml/Manifest
@@ -0,0 +1,7 @@
+DIST polyml-5.5.0.tar.gz 12776783 SHA256 1ada41fba3f3cd5bb9b3e3dd1585e8576284e9a74ad7c4ddf88c020f716ec7dc SHA512 4d8accc7083e12a0117fb4e34367e9b22c500d31094d8f0e381b91e91a3e8122cb5ca760ecc86bdcf7ff50a460848a181747bafc068b4a300b01de54e55fbad7 WHIRLPOOL 2bc658af92f0b85ae8ba63d3f07caced91a335a3d5541e3988fa78147ef6f6c8713e479cde0ed41077621ead4b3d6eaca466a05d6d87d2f27d427299513d7033
+DIST polyml-5.6-1.tar.gz 22041657 SHA256 6091bbdbad437b6a0293e8091642bf204ff1d71f8d262de46ae200357d98f113 SHA512 3107f4a5b17283dc3873b0ecf7eb1c607c42e14e859b50345b666f19412a2592e359ea29f03e56d390491e9104a71e0bf80eb39884f51d8724b37f8f935fa7d2 WHIRLPOOL 13e8d61c0271855b8034426b6e41aacb1ff694f3fa0ce5c5b4806487567bded7230c5ff64390f163e07da8d78a08f19780ac84d3931e033e8496079a9f18f523
+EBUILD sha1-polyml-5.5.0.ebuild 2720 SHA256 48f90560bb4fe5773c098045d5848608f322907ba023f7a455c0aaaae1cccaeb SHA512 3a321471a02bbda005f91f31d5fd0545b672011782ed3a141c924327bf2cf3fab2d6bd174bb179dc64c4f254651bce2899dd6eccb2fd8815bfb8be8a7214293d WHIRLPOOL 2d633b185465fd5b4332e49e2b9231235080f5be0408cf23b3a67257bd83d3de3caefff0bf8fffda98090438dd819e37cb0cd6378d52f200cfbb8d5769f5ca38
+EBUILD sha1-polyml-5.6_p1.ebuild 1909 SHA256 6ac7902e1c22cc3c9285c8d6c580119201c1b080ba361808e97a73ab62dc08c8 SHA512 a5000690eeaedd7ad5337ce50fcb66fdbabd3a6460c37d218e2d3de705314d0cbaafd740794f1a1585feb8f5d5ce2a68f6efe003843a1448f8748431b50e6493 WHIRLPOOL 9683b3b0854d67f1c59f6f2ec0b52857c7b4c2e639909a49e6f51bf4e6f32c5083eaa3fa6cd4058612c27a3140df2b5800e38535129933ef1e2a5a5ce29439e0
+MISC ChangeLog 2974 SHA256 5cb7b9a485b3d95f46c8261736a0753aa35503721e35ba34b611221ecb02880a SHA512 b6ace56b2d39f6cd4bd93be06763818c6a17259440d55e90b5e5fdb75cf3eb2727f35ffdabfdf55469f019fc7e4a9da8c9c07b0a5056c48bf169951dfa990f27 WHIRLPOOL 028557c4e60c057cd764fc331817bb621c0826be03f3a51a692bf691b7ea7b282fc3ca6e24e216f8d05ab7a91907704c6e3db6434773742daa008db09fae03db
+MISC ChangeLog-2015 518 SHA256 908f9789f16d1987fca80aa15b5c06c8700915f97a989943277bae3d16853a21 SHA512 73f775b6a34e94a15a43092edd0bafbfd0df3dca8278a345567119efc47465e337e210324cd042a7e1a22c9bdbcd9aafda4cb1f9ef0990a7d7c99cb86acf1387 WHIRLPOOL c8b791bc9e4c7c733fa13879f6c27d0c6867ee0baeb5bc1c7ba73dd27c1629cf03e9481f6135ea78f5c6d22b10553aa15d6f21eccd26df35e526fd5ab9599cb6
+MISC metadata.xml 631 SHA256 5ddf29decd7dcde52cccf06113987c56dd703bda7cbf73a17cb40a665f4c26ad SHA512 ce2a008b92696040b1de592443a3bf1ca927aa95380bc92e4558c0d362dd1d2dc33c023a522946fe0295936feb95a2b920cbe0fbd44e65d7c9d5ca3f955bb7b1 WHIRLPOOL 4c756de4547dabe2fb864cb14e4f01c9364a2f4de8339d4a6ca260e27e5ce6e5ee2dcc5be65ad0124e288d604053292fe8c2a2e284f37cc9b6af3f5ef66a6b2c
diff --git a/sci-mathematics/sha1-polyml/metadata.xml b/sci-mathematics/sha1-polyml/metadata.xml
new file mode 100644
index 000000000000..9e1ece80ccf5
--- /dev/null
+++ b/sci-mathematics/sha1-polyml/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gienah@gentoo.org</email>
+ <name>Mark Wright</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+sci-mathematics/sha1-polyml is the implementation of SHA1 taken from
+the GNU coreutils package as described in the sci-mathematics/sha1-polyml
+README. It is required by sci-mathematics/isabelle.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/sha1-polyml/sha1-polyml-5.5.0.ebuild b/sci-mathematics/sha1-polyml/sha1-polyml-5.5.0.ebuild
new file mode 100644
index 000000000000..3a1ac9d40258
--- /dev/null
+++ b/sci-mathematics/sha1-polyml/sha1-polyml-5.5.0.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit multilib
+
+MY_PN=polyml
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="implementation of SHA1 is taken from the GNU coreutils package"
+HOMEPAGE="http://isabelle.in.tum.de/"
+SRC_URI="http://isabelle.in.tum.de/components/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}/sha1"
+
+LIBDIR="/usr/"$(get_libdir)"/${PN}"
+
+# sci-mathematics/isabelle requires sci-mathematics/sha1-polyml, to avoid
+# this warning:
+# ### load_lib </usr/bin/libsha1.so> : /usr/bin/libsha1.so: cannot open shared
+# object file: No such file or directory
+# ### Using slow ML implementation of SHA1.digest
+# sci-mathematics/sha1-polyml supplies the library libsha1.so. Which
+# is the implementation of SHA1 taken from the GNU coreutils package
+# as described in the sci-mathematics/sha1-polyml README. Isabelle
+# builds libsha1.so in the contrib/polyml/$ML_PLATFORM directory.
+# isabelle dynamically loads libsha1.so as a plugin. The Isabelle-2012
+# linux binary bundle places libsha1.so in the contrib/polyml directory, which
+# is referred to as ML_HOME in the Isabelle Pure/General/sha1_polyml.ML source file.
+# ML_HOME is /usr/bin on Gentoo, and we want isabelle to depend o sha1-polyml.
+# For these reasons isabelle is patched to load it from
+# /usr/$(get_libdir)/sha1-polyml/libsha1.so
+
+src_prepare() {
+ cp -p "${S}/build" "${S}/build-orig" || die "Could not cp build to build-orig"
+ sed -e "s@CFLAGS=\"@CFLAGS=\"${CFLAGS} @g" \
+ -e "s@LDFLAGS=\"@LDFLAGS=\"${LDFLAGS} @g" \
+ -i "${S}/build" || die "Could not set flags in build"
+ cp -p "${S}/build" "${S}/tests" || die "Could not cp build to tests"
+ sed -e '/echo "Running tests ..."/,$d' \
+ -i "${S}/build" || die "Could not remove run tests from build"
+ sed -e '$i\\nexit 0' \
+ -i "${S}/build" || die "Could not add exit 0 to build"
+ sed -e 's/echo "Running tests ..."/echo "Running tests ..."\necho "Running tests ..."/' \
+ -i "${S}/tests" || die "Could not duplicate echo line in tests"
+ sed -e '/# building/,/echo "Running tests ..."/d' \
+ -i "${S}/tests" || die "Could not remove build from run tests"
+ sed -e '$i\\nexit 0' \
+ -i "${S}/tests" || die "Could not add exit 0 to tests"
+}
+
+src_compile() {
+ arch=$(uname -m)
+ uos=$(uname)
+ # Switch to ,, when we switch to EAPI=6.
+ #local los=${uos,,}
+ los=$(tr '[:upper:]' '[:lower:]' <<<"${uos}")
+ ./build "${arch}-${los}" || die "build failed"
+}
+
+src_test() {
+ ./tests "${arch}-${los}" || die "tests failed"
+}
+
+src_install() {
+ dodoc README
+ insinto "/usr/"$(get_libdir)
+ dodir ${LIBDIR}
+ exeinto ${LIBDIR}
+ doexe ${arch}-${los}/libsha1.so
+}
diff --git a/sci-mathematics/sha1-polyml/sha1-polyml-5.6_p1.ebuild b/sci-mathematics/sha1-polyml/sha1-polyml-5.6_p1.ebuild
new file mode 100644
index 000000000000..4f792144ace1
--- /dev/null
+++ b/sci-mathematics/sha1-polyml/sha1-polyml-5.6_p1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit multilib toolchain-funcs
+
+MY_PN="polyml"
+MY_PV="5.6-1"
+MY_P="${MY_PN}-${MY_PV}"
+
+DESCRIPTION="implementation of SHA1 is taken from the GNU coreutils package"
+HOMEPAGE="http://isabelle.in.tum.de/"
+SRC_URI="http://isabelle.in.tum.de/components/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}/sha1"
+
+# sci-mathematics/isabelle requires sci-mathematics/sha1-polyml, to avoid
+# this warning:
+# ### load_lib </usr/bin/libsha1.so> : /usr/bin/libsha1.so: cannot open shared
+# object file: No such file or directory
+# ### Using slow ML implementation of SHA1.digest
+# sci-mathematics/sha1-polyml supplies the library libsha1.so. Which
+# is the implementation of SHA1 taken from the GNU coreutils package
+# as described in the sci-mathematics/sha1-polyml README. Isabelle
+# builds libsha1.so in the contrib/polyml/$ML_PLATFORM directory.
+# isabelle dynamically loads libsha1.so as a plugin. The Isabelle-2012
+# linux binary bundle places libsha1.so in the contrib/polyml directory, which
+# is referred to as ML_HOME in the Isabelle Pure/General/sha1_polyml.ML source file.
+# ML_HOME is /usr/bin on Gentoo, and we want isabelle to depend o sha1-polyml.
+# For these reasons isabelle is patched to load it from
+# /usr/$(get_libdir)/sha1-polyml/libsha1.so
+
+src_compile() {
+ $(tc-getCC) \
+ ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -I. -fPIC -shared \
+ -o libsha1.so sha1.c || die "compile libsha1.so failed"
+ $(tc-getCC) \
+ ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -I. \
+ -o test_sha1 test_sha1.c -ldl || die "compile test_sha1 failed"
+}
+
+src_test() {
+ ./test_sha1 ./libsha1.so || die "tests failed"
+}
+
+src_install() {
+ dodoc README
+ local ld="${ROOT}usr/"$(get_libdir)"/${PN}"
+ dodir ${ld}
+ exeinto ${ld}
+ doexe libsha1.so
+}
diff --git a/sci-mathematics/singular/Manifest b/sci-mathematics/singular/Manifest
new file mode 100644
index 000000000000..e7cbee4e6c7e
--- /dev/null
+++ b/sci-mathematics/singular/Manifest
@@ -0,0 +1,25 @@
+AUX 60singular-gentoo.el 298 SHA256 b05a83af5a80fc1240e77d1cd036f4c9ca00907d11fb90d7f0ffb0c92ff7d235 SHA512 4c17a25d91c085e12f26441fcde858e61bf191bd7d9dcf63ff5b5a1dce1d63e3f7c4f78ce8afa4f2359ad4ba6eb51f3e224ae6c502b18f5f7a76738534337431 WHIRLPOOL 371c5fe968afea07fa8ca4bd51392859a18565b6f34e43d698ef433e28db0587eaa64f2b83cc71979104d1ef121c690f8113ed6efa424a00397e0256b58d55d7
+AUX singular-3.0.4.4-nostrip.patch 453 SHA256 70d6972d7bddd1d8d601f715465a46c92eba1edf2c5608bbd01ae65c6fd64553 SHA512 2fd31198c7c4e752976539a7ddc3b03bb4030efc52e66e5a2d34ce438af558d9d8b45aa088da6cf4eb1edf7f7239994f6eea040d0a8eb0c2c854b6275e7dde5f WHIRLPOOL 4cc614b3c1e62e3ad68725e8f0cf85522ee1190fa4d8f8af1344eaead28d9837c60ac468f5b3206ba03dc9db2656257108d029e73f0ab9666f220568f049825d
+AUX singular-3.1.0-emacs-22.patch 637 SHA256 2ae842d9636bd132271a23aa03c6810e6bdfaf0bf31b4376d8488402a41dd5a3 SHA512 19ef6b9252c42f468099b15911251c4b162ca552d86bcb1c90bb86a591b79e1c1d21463e21b14944820761df32d952e03276804a9125580179218b78226bbbdc WHIRLPOOL 99fc3aff600a43208f242a34ca3aa532a1aaee9d10eab3af8f478e9c230eb9dbff69b9b9aed080c5958e894262cf6225caa84e9ecc5b2b32317115c9d97ac30a
+AUX singular-3.1.0-gentoo.patch 4563 SHA256 31cf4c45ad9319431efda173a8bc24a9eac609b9fd2afadbe66156bec43f9146 SHA512 f503ccc1a2501e7a990715e2403989dbc4ec33fd6e4f043379db4b4eb22d18df27acc750271c556dacff2b74a7b5154feb92f3fab2c66de6e464635ff86e86ff WHIRLPOOL 6524e17f8e950ddeb5db0df09b180e48e23bfac8602e4a42416b9a0c726bc613e2a2f497ae37d92da9db02de97f69ac48603a3a2397fb07b4601c8e46c160225
+AUX singular-3.1.3.2-python.patch 1136 SHA256 3fc61301eed3d51ffaf12265e1c302be23ee10cb4d3e9a86769d79bf817c43d3 SHA512 76398bb6f679cba84b71fe7a5ecef6815cf314c87e15286726e4fa079dbefa65cfffd6934695ffe2cc18b6cefea75d960962908a24bfbf9cacbc3e3f74395370 WHIRLPOOL ed3e06a5fb50855a922778ae556adcc7de259a542c0dd570947fcae1c87144987c1d70fc0e5bc1f07d2da888a78ebd10fc5daef8bdd249813c98d5af89380b3a
+AUX singular-3.1.3.3-Minor.h.patch 234 SHA256 87419ec7ec7c51672c77dee048e1ca4dfaa325a37762e282a257cfb3d02da92a SHA512 8748e8c76cb6b33f3d43b604c3dc713e033c7636367d9f3086beaf52428cc3e2cd1244d831d2e94cf29530ad0118c9148ffc1e5364df8680d069d0e3d00592d7 WHIRLPOOL 9a5714376ac7bd6528bb29ba539a9b0ae6a1754d920ad44e9e62ff1dcadf1f524a2824f0115f9ff26af9e54e2692d5075d7459396e89e7649a92ea85785a8fd7
+AUX singular-3.1.3.3-install_name.patch 862 SHA256 2e3d0ca4e072d66feb2a5e2e3db0314f134510a734a78526ba1546d3f00548b8 SHA512 9f641503a62f8de151e9774003b9b52634f27ad8b4355bb72b49239acf4086fc066a7688f1ba2df7a42b05aaf8c89c9fff6100706d7bf71043d931a049804497 WHIRLPOOL 661725f3e8d81bd70cc0b9735dc67d5a71daa2d622f7e43e86c31a8ab68822d2026868030a131d4d7b1fd0ee08a28cc8d403f8048771fface1869d250823b31c
+AUX singular-3.1.6-factory_template_instantiation.patch 900 SHA256 03c64c0f4946a4de9b57f4ae644bb364283763b56075e712c617972de4636c37 SHA512 0a0d7a271fddf543de6d8d987322e4062997a6283ccbb90f55c8d70ed39a2e58a0d68e881c0d260ad9f4ceaf60352bcd78a48b6f707a7719369c0b4cbe47542f WHIRLPOOL 8b0a5903c6d13cb94e68791fa1ab7e6846909059ebf4d9d5eda5a04693fc09eed93c1c95ad03af018068c044846b9da6d98cc11da03a8277d29ce4860671946c
+AUX singular-3.1.6-ntl6compat.patch 1401 SHA256 4fbc4bd0817e585345a7dd3fa8df8c19e8ed241fb78d911c2e7161b1e12e9c1c SHA512 5d6c4ec73b81cebcd8d24dc75efedb2f3da656fc5103701f25f7bba40355e995f116acddb7bb711b8832a89ec55a1b7fbbc7dd9215822f786e7a6012905b66be WHIRLPOOL c0ee7ee9486eda07f00df2ab4604b88813d19dd47662d25e16eb9c83ede3f85589f7c1d6d675791d0198c53ceff9a2fe47c4fdcc185e08d172fa4798bcd6bf76
+AUX singular-4.0.0-fix-omalloc-ar-detection.patch 484 SHA256 510bcac07d297b39579e99caf101cd9132a607453ff2566f8e7024a2cb23ccf6 SHA512 4f74b1d436c17efa3872a6b24e56c691220813a3cc2debeb19caa5dd6bf0e3c39af32e43e3d7afb5af40f985ec56377128185b9138dfcf77a04618ba444ea619 WHIRLPOOL 9485b6c7adce21c208da12acc62babeadeba20bd9fee15c3f10833246f2ed225887cdf8d9e8d35b29ca5753acf7e8dca8a7a802d67a99d6ce066dc027ebbb512
+AUX singular-4.0.2-ntl8-compat.patch 1149 SHA256 fa84f01f4c11b930850327da69ad7a16d7ecb941a4e9fe774b1dcfa77700c442 SHA512 178f0130cd6a606d6c93f5cc42dfe92782a16cc6b3d0e2695ce16d2115f70e502f702e8e72fd5d3b61b1bb5b3f4038a4fbf6277418b3f0bf89cae7939d5ed606 WHIRLPOOL 0d7bf9024410db80379b9d6694bea1c279b9d2ad4c89440206f9c701205241140a31c37a0fa6157be55247d2c6ceca1740a12ef6b723154c682842b9d9c7ce3b
+AUX singular-4.0.3-fix-destdir.patch 992 SHA256 8625dfeb0a1d9a98d5a583592ff0b5deb7129c3dc4c25b9a0c9d0064b7eaabc0 SHA512 6b0496d1901c51da66d75fde1b980333df8b1e03572f49ecd56f3f3c67d3af1b08527c7b764aa3b62b0296b97aaaa861d257a97a4370b3600b2cd7ffb9580936 WHIRLPOOL af0def2b7d222faa40cf3a3266454861d9207cc7b4caf6e618ab7bd5a28f9ed818cf07cf3c19c718a77c2203e89c16dcdd52cde07f6eeb85b904886cc52a6236
+AUX singular-4.0.3-fix-resources-name.patch 10175 SHA256 a34124c55b8a5ad537a3011f4fcf68498f1b53daa56e0e60d68f20cf16e7b5d5 SHA512 29c43d97598c647ac2754ed897411638f0141b60de590a53fc3f476cd1d627b270ecab29e16923b00757d8218d680c6b837070fa6899e4c770243bf71e86a09f WHIRLPOOL 5b3aada3c52bbe63e81eacace1c34e8d4bb59b5da79b71aaf0f2e261901b494aed8c856fcad30afb40b03543e24e607d2825fa22b971c962ddd8966d439ea6ae
+DIST Singular-3-1-6-share.tar.gz 10620177 SHA256 c74a97b7eb8ed53417682637fe11c2480aeb1a6cbf4a8db27a1b16a162e83c4d SHA512 54bff29c5d64609583ec8b1c43005a1ff453c8f2cedfe9a26ac840888e9d306e3104e14aea5a3cc923fac916215c4285ecfe5ae7e1242aee0308b5e4c6e2d48d WHIRLPOOL a1edc8fa9cad189af413870b0e63316e135e8456075f13b3d8036afafd6c25f4bcc854432cdcb8c2ec690c63b43f616367aa9f1027c096e95f22aa0508943f67
+DIST Singular-3-1-6.tar.gz 25535111 SHA256 7956a17a0b5d428fea25bc0bc6c19c753748fb98bb2926c49b9fbcbec94172ff SHA512 103a10dd474d93cceb678bcef1a4aae5ec693cb9e68c9d63a7536929b738a0127501ee145a79cc3b9ddfa4bd1ca0f05e640eeb3b0fbdb60de4f56aa5beacc213 WHIRLPOOL 71ef6d505f7c8b2eeacd46666640d7b3c79f75d6c2c858b135553b1fb3a9dd7d88df74924009468c32aa4aa748b88ccb7762010ab4d36eec420a07fd36e8dd22
+DIST singular-4.0.2-share.tar.gz 8789162 SHA256 fe81cb100f3b73b159eb4a8122a29bc0f7705ef6f62ad55b68b5582c1ec0642d SHA512 068827df04a5d1b4407dbaab1296d0120071dc109b749037b02263d51906852a5c2c1ef321733953a181c2d3d0fe799c197ef0af3b9341810ecf31a5324e0a25 WHIRLPOOL 615487e95e32d9f07552e92ebcd46e3071d110dd31e7d980b01340d22a5205ba2d771532fad1bf44863a38820428157284a171e0b901861fda6e51482d546adc
+DIST singular-4.0.2.tar.gz 8635172 SHA256 c105a2c8ace0b3c9189b782ed63660ce235407d0160907c2cafc2128d36d8cb7 SHA512 4543a45839ce8adc45e3b2edd84a6e398b7ba157da1eda050dbce2a8b20333eb0c63433e3e7eaf59d76bf6bcb65c1b1611bfc08c25fd493c88e2f06624898e3d WHIRLPOOL fe30bc87c6b403b2e30bd1c016aeeb015c2a64a63d87b81536dc53a2555ac068f3e0c6d8763775d8be5e5e1a935aadab1c86b603cbb698234a19cc9cfffac282
+DIST singular-4.0.3-share.tar.gz 6633256 SHA256 391cb9cd7626ee745f269a025530b5b3a33794e7862cf1afd7ca9d109321827a SHA512 5f8ae4ecd22a3470e5f00393e03079936d7ed334f44ae056ed1eb1719054afc4371b03e920b598033605600c843dc39cb6b01308505323e2c084dfe1f7a1b94a WHIRLPOOL b00694bc2d93c9ef6d299d18e9e65133656dbb427aa50de730d78e5c0501332c5a4b3797edf09750179ef4efd980401f46bb5f1beee37bf7474dc6323b9467bd
+DIST singular-4.0.3.tar.gz 12615042 SHA256 4ccf70a9efcf087f436bfea9c09d61a554eb8e7638697093a55998ef846f316e SHA512 781227997c510829b02c969259d627572c0b62aa152c9ef623ff27de5b2df0c8e024f086740b89ca8f96b6e3f7def04f8d62ca79adb199d6249ade9b8cbb06ab WHIRLPOOL 587ff208fb7b03edb3398e0a4b8cf54cfa9ddee6a8a350c5273a4f6074a6e0a3f06e35ad96b8ddb58ef5dd9036b45c81552a925681ecb4df72d895afc010eb0d
+EBUILD singular-3.1.6.ebuild 4724 SHA256 1f04612ae46647188a9e92632029223c9654a8de280f2e8ad36ed4ee2dd1eaa3 SHA512 eb18e7a69b110d71b02a7f1d239c9b9b281f535463105c28687eae1e49d303843e0e71f573bbdfbe051f3efb675f7128f0c9e253f1a43dd3fc9d6c9b91acae6e WHIRLPOOL 512915f56146bb090a9ac03e1529e9c67476e6dbab226d1f1c5f4fc73338de39f5e37251ccebcdbb60f381d78dfe808fdc58c36dd6f2fef81287148d41170430
+EBUILD singular-4.0.2.ebuild 3979 SHA256 3b69ce71551dbe1d964d167cb23cde31dfb0c227d81a0927050582430dc47c64 SHA512 41450e6f7da47c2505c9e889487c52b35701cba8394ad2dfa0cbfbbe55dbeb9d72685ee1d0a584488c3022b75e34f9c5b0ed6d26612a8d31499f02abec1176fd WHIRLPOOL 2168b867d9f4c1045a53459fc3eb9c98da1de332db9b97c54625f2a7fa5e6d6c5f138e7c666f2c1d86ee98550eae33117b0c5227c3ca79a40b4a526d49b791f0
+EBUILD singular-4.0.3.ebuild 2625 SHA256 b71804b949753b9c6c45f5e92a175b540704584e732b5a9e5b33754bea3cee21 SHA512 077b88bbbd4b72247979196cbe32410f9c8012591f12a3df689838da4ac9515664e3fd45c66f31a4444c637ecd7eda829a722027966a2271edc057edf8dc83bd WHIRLPOOL 27d9193d2d69fb3ac047c09554945270313f8ab24c478ae04d6959e4043784029e7c8e0a940c209328a52108113a12c7c9ed12823d7345571dd119f3cb2c952c
+MISC ChangeLog 3736 SHA256 27c9b47835cf9e94b0c1dc5aee2c37a2b943c3e46beb673ac2f07805a5b9bcbf SHA512 0aea5ec92f4eb72d6fb2deeca9172210c0649bd848a4b026451fec2597b2cab2b6cad360ee30ad140b97e69c5b00876fcde42426e7d88ce1ee7faf8fefc842d0 WHIRLPOOL d006dc278b81b55a72230d9b4357d4aef678fd137bc2210fa67fe1dd3c7a3a6c367571fd79a04fcaea516d9a2d696c767fae5337a481b28f854d205354fd2aa2
+MISC ChangeLog-2015 14247 SHA256 9e63d52432acadd40673d66dd10a41dbf5f1faa017e1e6f8fae5c6a5186f76b7 SHA512 a3a2799e4056a788b0587679252d079a1e0abd9be6a21932842479f01b59a1156db972628e94de8c547babe8873a62e678b66ed14c431046ac754287a77e2363 WHIRLPOOL 5f9c1f41c00b5315a2feddcf8e718e77e54fa6f2bbe218096c33c6a9fdfc480c471411b283cc44a34415dc28b29d1d25ebbfc44e41c899edb71c82cec50f1a91
+MISC metadata.xml 389 SHA256 3f927654e2f7ea890a416e0d4d7af859bb522e7fbc90594c4b329f5ff9cc773d SHA512 3c5aea925276639c81a03a2a8d05ecaa48edac510f144d92e173402721dbc253638341ac8afdfbc17098ac35d2f4f47b41e5d56427c8ecaa788dc28fbb0977ae WHIRLPOOL 4cc8f5367efca5c8a5f83069a1be7975baaa6cb2bf730ff673deb2508409576977a122f30dec4f0ea7b1721b6dc92ad5c207a196022eb219037e4a4eb128db64
diff --git a/sci-mathematics/singular/files/60singular-gentoo.el b/sci-mathematics/singular/files/60singular-gentoo.el
new file mode 100644
index 000000000000..7be8c08ef7e9
--- /dev/null
+++ b/sci-mathematics/singular/files/60singular-gentoo.el
@@ -0,0 +1,10 @@
+
+;; site-file for sci-mathematics/singular
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'singular "singular"
+ "Start Singular using default values." t)
+(autoload 'singular-other "singular"
+ "Ask for arguments and start Singular." t)
+
+(add-to-list 'auto-mode-alist '("\\.sing\\'" . c++-mode))
diff --git a/sci-mathematics/singular/files/singular-3.0.4.4-nostrip.patch b/sci-mathematics/singular/files/singular-3.0.4.4-nostrip.patch
new file mode 100644
index 000000000000..5884b6cd2d60
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-3.0.4.4-nostrip.patch
@@ -0,0 +1,12 @@
+diff -Naur Singular-3-0-4/IntegerProgramming/Makefile.in Singular-3-0-4.new/IntegerProgramming/Makefile.in
+--- Singular-3-0-4/IntegerProgramming/Makefile.in 2008-07-09 07:55:13.000000000 -0400
++++ Singular-3-0-4.new/IntegerProgramming/Makefile.in 2008-10-19 22:40:41.000000000 -0400
+@@ -21,7 +21,7 @@
+ endif
+
+ INSTALL = @INSTALL@
+-INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s
++INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ MKINSTALLDIRS = ../mkinstalldirs
+
+ ##
diff --git a/sci-mathematics/singular/files/singular-3.1.0-emacs-22.patch b/sci-mathematics/singular/files/singular-3.1.0-emacs-22.patch
new file mode 100644
index 000000000000..3f4f3c76203c
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-3.1.0-emacs-22.patch
@@ -0,0 +1,13 @@
+diff -Naur Singular-3-1-0/emacs/singular.el Singular-3-1-0.new/emacs/singular.el
+--- Singular-3-1-0/emacs/singular.el 2008-11-03 09:16:38.000000000 -0500
++++ Singular-3-1-0.new/emacs/singular.el 2009-08-20 22:16:57.000000000 -0400
+@@ -865,7 +865,8 @@
+ (add-hook 'singular-post-output-filter-functions 'singular-prompt-remove-filter nil t)
+
+ ;; some relict from Comint mode
+- (setq comint-prompt-regexp singular-comint-prompt-regexp))
++ (setq comint-prompt-regexp singular-comint-prompt-regexp)
++ (setq comint-use-prompt-regexp-instead-of-fields 1))
+ ;; required to use prompt-regexp
+ (setq comint-use-prompt-regexp t)
+ ;;}}}
diff --git a/sci-mathematics/singular/files/singular-3.1.0-gentoo.patch b/sci-mathematics/singular/files/singular-3.1.0-gentoo.patch
new file mode 100644
index 000000000000..ebb402289386
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-3.1.0-gentoo.patch
@@ -0,0 +1,81 @@
+--- kernel/feResource.cc.orig 2010-04-30 10:20:14.000000000 +0000
++++ kernel/feResource.cc 2010-10-11 09:19:01.431179334 +0000
+@@ -41,7 +41,7 @@
+ #define SINGULAR_DEFAULT_DIR "/usr/local/Singular/"S_VERSION1
+ #endif
+ #else // ! defined(MAKE_DISTRIBUTION)
+-#define SINGULAR_DEFAULT_DIR S_ROOT_DIR
++#define SINGULAR_DEFAULT_DIR "@GENTOO_PORTAGE_EPREFIX@/usr"
+ #endif // defined(MAKE_DISTRIBUTION)
+
+ /*****************************************************************
+@@ -73,33 +73,31 @@
+ {
+ {"SearchPath", 's', feResPath, NULL,
+ "$SINGULARPATH;"
+- "%b/LIB;"
+- "%b/MOD;"
++ "%r/share/singular/MOD;"
+ "%r/LIB;"
+- "%r/../LIB;"
++ "%r/share/singular/LIB;"
+ "%d/LIB;"
+- "%d/../LIB"
+ ""},
+- {"Singular", 'S', feResBinary,"SINGULAR_EXECUTABLE", "%d/"S_UNAME"/Singular",(char *)""},
+- {"BinDir", 'b', feResDir, "SINGULAR_BIN_DIR", "%d/"S_UNAME, (char *)""},
+- {"RootDir", 'r', feResDir, "SINGULAR_ROOT_DIR", "%b/..", (char *)""},
++ {"Singular", 'S', feResBinary,"SINGULAR_EXECUTABLE", "%d/bin/Singular",(char *)""},
++ {"BinDir", 'b', feResDir, "SINGULAR_BIN_DIR", "%d/bin", (char *)""},
++ {"RootDir", 'r', feResDir, "SINGULAR_ROOT_DIR", "%d", (char *)""},
+ {"DefaultDir",'d', feResDir, "SINGULAR_DEFAULT_DIR", SINGULAR_DEFAULT_DIR, (char *)""},
+- {"InfoFile", 'i', feResFile, "SINGULAR_INFO_FILE", "%r/info/singular.hlp", (char *)""},
+- {"IdxFile", 'x', feResFile, "SINGULAR_IDX_FILE", "%r/doc/singular.idx", (char *)""},
+- {"HtmlDir", 'h', feResDir, "SINGULAR_HTML_DIR", "%r/html", (char *)""},
++ {"InfoFile", 'i', feResFile, "SINGULAR_INFO_FILE", "%r/share/info/singular.info.bz2", (char *)""},
++ {"IdxFile", 'x', feResFile, "SINGULAR_IDX_FILE", "%r/share/singular/singular.idx", (char *)""},
++ {"HtmlDir", 'h', feResDir, "SINGULAR_HTML_DIR", "%r/share/doc/PFSUBST/html", (char *)""},
+ #ifdef ix86_Win
+ {"HtmlHelpFile",'C', feResFile, "SINGULAR_CHM_FILE", "%r/doc/Manual.chm", (char *)""},
+ #endif
+ {"ManualUrl", 'u', feResUrl, "SINGULAR_URL", "http://www.singular.uni-kl.de/Manual/"S_VERSION1, (char *)""},
+- {"ExDir", 'm', feResDir, "SINGULAR_EXAMPLES_DIR","%r/examples", (char *)""},
++ {"ExDir", 'm', feResDir, "SINGULAR_EXAMPLES_DIR","%r/share/doc/PFSUBST/examples", (char *)""},
+ {"Path", 'p', feResPath, NULL, "%b;$PATH", (char *)""},
+
+ #ifdef ESINGULAR
+ {"emacs", 'E', feResBinary,"ESINGULAR_EMACS", "%b/emacs", (char *)""},
+ {"xemacs", 'A', feResBinary,"ESINGULAR_EMACS", "%b/xemacs", (char *)""},
+ {"SingularEmacs",'M', feResBinary,"ESINGULAR_SINGULAR", "%b/Singular", (char *)""},
+- {"EmacsLoad", 'l', feResFile, "ESINGULAR_EMACS_LOAD", "%e/.emacs-singular", (char *)""},
+- {"EmacsDir", 'e', feResDir, "ESINGULAR_EMACS_DIR", "%r/emacs", (char *)""},
++ {"EmacsLoad", 'l', feResFile, "ESINGULAR_EMACS_LOAD", "%r/share/emacs/site-lisp/singular/.emacs-singular", (char *)""},
++ {"EmacsDir", 'e', feResDir, "ESINGULAR_EMACS_DIR", "%r/share/emacs/site-lisp/singular", (char *)""},
+ #elif defined(TSINGULAR)
+ {"SingularXterm",'M', feResBinary,"TSINGULAR_SINGULAR", "%b/Singular", (char *)""},
+ #ifdef ix86_Win
+@@ -108,7 +106,7 @@
+ {"xterm", 'X', feResBinary,"XTERM", "%b/xterm", (char *)""},
+ #endif
+ #else
+- {"EmacsDir", 'e', feResDir, "SINGULAR_EMACS_DIR", "%r/emacs", (char *)""},
++ {"EmacsDir", 'e', feResDir, "SINGULAR_EMACS_DIR", "%r/share/emacs/site-lisp/singular", (char *)""},
+ #endif
+ {NULL, 0, feResUndef, NULL, NULL, NULL}, // must be the last record
+ };
+--- kernel/mod_raw.cc.orig 2009-11-02 10:12:22.000000000 +0000
++++ kernel/mod_raw.cc 2010-10-11 09:19:01.432179264 +0000
+@@ -109,11 +109,11 @@
+ void* dynl_open_binary_warn(const char* binary_name, const char* msg)
+ {
+ void* handle = NULL;
+- const char* bin_dir = feGetResource('b');
++ const char* bin_dir = feGetResource('r');
+ if (bin_dir != NULL)
+ {
+ char path_name[MAXPATHLEN];
+- sprintf(path_name, "%s%s%s.%s", bin_dir, DIR_SEPP, binary_name,
++ sprintf(path_name, "%s%s%s%s.%s", bin_dir,"/lib/singular", DIR_SEPP, binary_name,
+ DL_TAIL);
+ handle = dynl_open(path_name);
+ if (handle == NULL && ! warn_handle)
diff --git a/sci-mathematics/singular/files/singular-3.1.3.2-python.patch b/sci-mathematics/singular/files/singular-3.1.3.2-python.patch
new file mode 100644
index 000000000000..2cc29c9a553b
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-3.1.3.2-python.patch
@@ -0,0 +1,45 @@
+--- Singular/pyobject.cc.orig 2011-01-31 15:03:16.000000000 +0100
++++ Singular/pyobject.cc 2011-08-24 17:22:57.000000000 +0200
+@@ -14,7 +14,7 @@
+
+
+
+-
++#include <Python.h>
+
+ #include <Singular/mod2.h>
+
+@@ -27,7 +27,7 @@
+
+ #include <Singular/lists.h>
+
+-#include <Python.h>
++
+ #include <iterator> // std::distance
+ #include <stdio.h>
+
+@@ -592,11 +592,12 @@
+ long len = newElts.size();
+ for (long idx = 0; idx < len; ++idx)
+ {
+- char* name = newElts[idx][0].str();
++ PythonObject current (newElts[idx]);
++ char* name = current.operator[](0).str();
+ if (name && (*name != '\0') && (*name != '_'))
+ {
+ Py_XDECREF(get_current_definition(name));
+- newElts[idx][1].import_as(name);
++ newElts[idx].operator[](1).import_as(name);
+ }
+
+ }
+--- Singular/pyobject_setup.cc.orig 2011-02-10 19:15:30.000000000 +0100
++++ Singular/pyobject_setup.cc 2011-08-24 17:23:55.000000000 +0200
+@@ -12,6 +12,7 @@
+ **/
+ //*****************************************************************************
+
++#include <Python.h>
+ #include <Singular/mod2.h>
+ #include <kernel/febase.h>
+ #include "static.h"
diff --git a/sci-mathematics/singular/files/singular-3.1.3.3-Minor.h.patch b/sci-mathematics/singular/files/singular-3.1.3.3-Minor.h.patch
new file mode 100644
index 000000000000..1d03e61ae308
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-3.1.3.3-Minor.h.patch
@@ -0,0 +1,10 @@
+--- src/Singular/Minor.h 2010-02-02 08:22:24.000000000 -0500
++++ patches/Minor.h 2011-06-28 13:26:01.000000000 -0400
+@@ -2,6 +2,7 @@
+ #define MINOR_H
+
+ #include <assert.h>
++#include <time.h>
+ #include <iostream>
+ #include <string>
+
diff --git a/sci-mathematics/singular/files/singular-3.1.3.3-install_name.patch b/sci-mathematics/singular/files/singular-3.1.3.3-install_name.patch
new file mode 100644
index 000000000000..6a7826c390f6
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-3.1.3.3-install_name.patch
@@ -0,0 +1,23 @@
+--- kernel/Makefile.in.orig 2011-10-13 23:36:54.000000000 +0200
++++ kernel/Makefile.in 2011-10-13 23:37:46.000000000 +0200
+@@ -267,7 +267,7 @@
+ -rm -f p_Procs_Dynamic p_Procs_Dynamic.exe
+
+ p_Procs_%.so: p_Procs_Lib_%.dl_o
+- $(LD) ${SLDFLAGS} -o $@ $^
++ $(LD) ${SLDFLAGS} -install_name @GENTOO_PORTAGE_EPREFIX@/usr/lib/singular/$@ -o $@ $^
+
+ ##
+ ## install targets
+
+--- Singular/Makefile.in.orig 2011-10-14 23:59:07.000000000 +0200
++++ Singular/Makefile.in 2011-10-14 23:58:34.000000000 +0200
+@@ -492,7 +492,7 @@
+ $(LD) ${SLDFLAGS} -o $@ $^ -L${libdir} ${MP_LIBS} ${GLIBC_DYN_FIX}
+
+ dbmsr.so: $(DBMSR_SOURCES:.cc=.dl_o)
+- $(LD) ${SLDFLAGS} -o $@ $^ ${GLIBC_DYN_FIX}
++ $(LD) ${SLDFLAGS} -install_name @GENTOO_PORTAGE_EPREFIX@/usr/lib/singular/$@ -o $@ $^ ${GLIBC_DYN_FIX}
+
+ # dynamic module for python bject support
+ pyobject.${MODULE_SUFFIX}: pyobject.dl_o
diff --git a/sci-mathematics/singular/files/singular-3.1.6-factory_template_instantiation.patch b/sci-mathematics/singular/files/singular-3.1.6-factory_template_instantiation.patch
new file mode 100644
index 000000000000..edf764a758eb
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-3.1.6-factory_template_instantiation.patch
@@ -0,0 +1,26 @@
+diff --git a/libfac/factor/tmpl_inst.cc b/libfac/factor/tmpl_inst.cc
+index bda287a..2f5ba49 100644
+Index: libfac/factor/tmpl_inst.cc
+===================================================================
+--- a/libfac/factor/tmpl_inst.cc
++++ b/libfac/factor/tmpl_inst.cc
+@@ -3,7 +3,7 @@
+ ////////////////////////////////////////////////////////////
+
+
+-//#include <templates/ftmpl_array.cc>
++#include <factory/templates/ftmpl_array.cc>
+ //#include <templates/ftmpl_factor.cc>
+ #include <templates/ftmpl_list.h>
+ #include <factory/templates/ftmpl_list.cc>
+@@ -75,8 +75,8 @@ template OSTREAM & operator << ( OSTREAM &, const List<Variable> & );
+ template OSTREAM & operator << ( OSTREAM &, const Array<int> & );
+ #endif
+
+-template class Array<int>;
+-template class Array<Variable>;
++//template class Array<int>;
++//template class Array<Variable>;
+ //template class Array<REvaluation>;
+
+ // for database
diff --git a/sci-mathematics/singular/files/singular-3.1.6-ntl6compat.patch b/sci-mathematics/singular/files/singular-3.1.6-ntl6compat.patch
new file mode 100644
index 000000000000..b0330ccdfc86
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-3.1.6-ntl6compat.patch
@@ -0,0 +1,44 @@
+diff --git a/Singular/claptmpl.cc b/Singular/claptmpl.cc
+index 0fa6109..553afa5 100644
+Index: Singular/claptmpl.cc
+===================================================================
+--- a/Singular/claptmpl.cc
++++ b/Singular/claptmpl.cc
+@@ -123,3 +123,37 @@ template class std::list<PolyMinorValue>;
+ template class Cache<MinorKey, IntMinorValue>;
+ template class Cache<MinorKey, PolyMinorValue>;
+
++#ifdef HAVE_NTL
++#include<NTL/version.h>
++#if NTL_MAJOR_VERSION == 6
++
++#include<NTL/tools.h>
++#include<NTL/lzz_pE.h>
++#include<NTL/lzz_pEX.h>
++#include<NTL/lzz_p.h>
++#include<NTL/vector.h>
++#include<NTL/pair.h>
++#include<NTL/GF2X.h>
++#include<NTL/GF2EX.h>
++#include<NTL/ZZ.h>
++#include<NTL/ZZX.h>
++#include<NTL/ZZ_pX.h>
++#ifdef NTL_CLIENT // in <NTL/tools.h>: using of name space NTL
++NTL_CLIENT
++#endif
++template class Vec<zz_p>;
++template class Vec<zz_pE>;
++template class Mat<zz_p>;
++template class Mat<zz_pE>;
++template class Mat<ZZ>;
++template class Vec<Pair<zz_pEX, long> >;
++template class Vec<Pair<GF2EX, long> >;
++template class Vec<Pair<ZZX, long> >;
++template class Vec<Pair<ZZ_pX, long> >;
++template class Vec<Pair<GF2X, long> >;
++template void swap<zz_pE>(Vec<zz_pE>&, Vec<zz_pE>&);
++template long operator==<zz_p>(Vec<zz_p> const&, Vec<zz_p> const&);
++template Vec<Pair<zz_pX, long> >& Vec<Pair<zz_pX, long> >::operator=(const Vec<Pair<zz_pX, long> >&);
++#endif
++
++#endif
diff --git a/sci-mathematics/singular/files/singular-4.0.0-fix-omalloc-ar-detection.patch b/sci-mathematics/singular/files/singular-4.0.0-fix-omalloc-ar-detection.patch
new file mode 100644
index 000000000000..87b44234af5f
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-4.0.0-fix-omalloc-ar-detection.patch
@@ -0,0 +1,12 @@
+diff -U 3 -dHrN singular-4.0.0.orig/omalloc/configure.ac singular-4.0.0/omalloc/configure.ac
+--- singular-4.0.0.orig/omalloc/configure.ac 2014-03-06 18:07:49.000000000 +0100
++++ singular-4.0.0/omalloc/configure.ac 2014-05-09 15:41:19.755097185 +0200
+@@ -117,7 +117,7 @@
+ dnl check for programs
+ dnl
+ AC_CHECK_PROG(AR, ar, ar, :)
+-if test "$ac_cv_prog_AR" != ar; then
++if test "$ac_cv_prog_AR" = no; then
+ AC_MSG_ERROR(*** ar program not found)
+ fi
+ AC_CHECK_PROGS(PERL, perl, "no")
diff --git a/sci-mathematics/singular/files/singular-4.0.2-ntl8-compat.patch b/sci-mathematics/singular/files/singular-4.0.2-ntl8-compat.patch
new file mode 100644
index 000000000000..d3e6b77a28e9
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-4.0.2-ntl8-compat.patch
@@ -0,0 +1,38 @@
+diff --git a/factory/NTLconvert.cc b/factory/NTLconvert.cc
+index 41ce9b2..e32093d 100644
+--- a/factory/NTLconvert.cc
++++ b/factory/NTLconvert.cc
+@@ -30,6 +30,7 @@
+ #include <NTL/GF2EXFactoring.h>
+ #include <NTL/tools.h>
+ #include <NTL/mat_ZZ.h>
++#include <NTL/version.h>
+ #include "int_int.h"
+ #include <limits.h>
+ #include "NTLconvert.h"
+@@ -500,8 +501,14 @@ convertZZ2CF (const ZZ & a)
+ return CanonicalForm(coeff_long);
+ }
+ else
+- {
+- long sizeofrep= ((long *) a.rep) [1];
++ {
++ const long * rep =
++#if NTL_MAJOR_VERSION <= 6
++ static_cast<long *>( a.rep );
++#else
++ static_cast<long *>( a.rep.rep ); // what about NTL7?
++#endif
++ long sizeofrep= rep[1];
+ bool lessZero= false;
+ if (sizeofrep < 0)
+ {
+@@ -519,7 +526,7 @@ convertZZ2CF (const ZZ & a)
+ cf_stringtemp_l= sizeofrep*sizeof(mp_limb_t)*2;
+ cf_stringtemp= (unsigned char*) Alloc (cf_stringtemp_l);
+ }
+- int cc= mpn_get_str (cf_stringtemp, 16, (mp_limb_t *) (((long *) (a.rep)) + 2), sizeofrep);
++ int cc= mpn_get_str (cf_stringtemp, 16, (mp_limb_t *) ((rep) + 2), sizeofrep);
+
+ char* cf_stringtemp2;
+ if (lessZero)
diff --git a/sci-mathematics/singular/files/singular-4.0.3-fix-destdir.patch b/sci-mathematics/singular/files/singular-4.0.3-fix-destdir.patch
new file mode 100644
index 000000000000..caeed33f1fc3
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-4.0.3-fix-destdir.patch
@@ -0,0 +1,26 @@
+From 7eac42b467723a83a951218be53785411be3dbc4 Mon Sep 17 00:00:00 2001
+From: jgmbenoit <quatermaster@rezozer.net>
+Date: Thu, 28 Apr 2016 05:47:53 +0000
+Subject: [PATCH] automake: install-data-local: missing DESTDIR prefix
+
+---
+ Makefile.am | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 32778f7..24dd251 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -17,9 +17,9 @@ dist-hook:
+ $(srcdir)/git-version-gen $(srcdir)/.tarball-git-version > $(distdir)/.tarball-git-version
+
+ install-data-local:
+- -cat ${top_srcdir}/doc/doc.tbz2| (cd $(datadir)/singular;tar jxf -)
+- -mkdir $(datadir)/info
+- -mv $(datadir)/singular/singular.hlp $(datadir)/info/.
++ -cat ${top_srcdir}/doc/doc.tbz2| (cd $(DESTDIR)$(datadir)/singular; tar jxf -)
++ -mkdir $(DESTDIR)$(datadir)/info
++ -mv $(DESTDIR)$(datadir)/singular/singular.hlp $(DESTDIR)$(datadir)/info/.
+
+ configheaderdir = ${includedir}/singular
+ nodist_configheader_HEADERS = singularconfig.h
diff --git a/sci-mathematics/singular/files/singular-4.0.3-fix-resources-name.patch b/sci-mathematics/singular/files/singular-4.0.3-fix-resources-name.patch
new file mode 100644
index 000000000000..bcda4ced6472
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-4.0.3-fix-resources-name.patch
@@ -0,0 +1,307 @@
+From a3a6a07858b7e91c4c8a3c8d07e53957a8547af2 Mon Sep 17 00:00:00 2001
+From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
+Date: Thu, 1 Sep 2016 10:48:08 +0200
+Subject: [PATCH] change library name: libresources -> libsingular_resources
+
+---
+ Singular/Makefile.am | 4 ++--
+ autogen.sh | 1 +
+ factory/configure.ac | 8 ++++----
+ gfanlib/configure.ac | 2 +-
+ libpolys/configure.ac | 8 ++++----
+ m4/options.m4 | 10 +++++-----
+ resources/Makefile.am | 18 +++++++++---------
+ resources/configure.ac | 6 +++---
+ resources/feFopen.cc | 2 +-
+ resources/feResource.cc | 2 +-
+ resources/omFindExec.c | 2 +-
+ resources/resources.pc.in | 17 -----------------
+ resources/singular_resources.pc.in | 17 +++++++++++++++++
+ 13 files changed, 49 insertions(+), 48 deletions(-)
+ delete mode 100644 resources/resources.pc.in
+ create mode 100644 resources/singular_resources.pc.in
+
+diff --git a/Singular/Makefile.am b/Singular/Makefile.am
+index e2bcc23..be84a08 100644
+--- a/Singular/Makefile.am
++++ b/Singular/Makefile.am
+@@ -176,7 +176,7 @@ ESingular_CPPFLAGS = ${AM_CPPFLAGS} -DESINGULAR -DPROTO
+ # ESingular_LDFLAGS = -static ${AM_LDFLAGS}
+ ESingular_LDADD = ${top_builddir}/libpolys/reporter/libreporter.la \
+ ${top_builddir}/libpolys/misc/libmisc.la ${top_builddir}/omalloc/libomalloc.la \
+-${top_builddir}/resources/libresources.la
++${top_builddir}/resources/libsingular_resources.la
+
+
+ ESingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptES.inc feOpt.cc
+@@ -186,7 +186,7 @@ TSingular_CPPFLAGS = ${AM_CPPFLAGS} -DTSINGULAR -DPROTO
+ # TSingular_LDFLAGS = -static ${AM_LDFLAGS}
+ TSingular_LDADD = ${top_builddir}/libpolys/reporter/libreporter.la \
+ ${top_builddir}/libpolys/misc/libmisc.la ${top_builddir}/omalloc/libomalloc.la \
+-${top_builddir}/resources/libresources.la
++${top_builddir}/resources/libsingular_resources.la
+
+ TSingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptTS.inc feOpt.cc
+ # utils.cc utils.h
+diff --git a/autogen.sh b/autogen.sh
+index d027997..0d09c08 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -4,6 +4,7 @@ cd `dirname "$0"`
+
+ # -d --warnings=all
+ autoreconf -v -f -i
++find . -name configure -exec sed -i "s/-g -O2/-g/g" {} \; -print
+
+ cd -
+
+diff --git a/factory/configure.ac b/factory/configure.ac
+index 7ea255b..a9caf73 100644
+--- a/factory/configure.ac
++++ b/factory/configure.ac
+@@ -120,10 +120,10 @@ AM_CONDITIONAL(
+ [WITH_PARSER_FOR_CANONICAL_FORM],
+ [test "x$enable_streamio" = xyes])
+
+-AC_ARG_VAR( [RESOURCES_INCLUDES], [INCLUDES for libresources] )
+-AC_ARG_VAR( [RESOURCES_LIBS], [LIBS for libresources] )
++AC_ARG_VAR( [RESOURCES_INCLUDES], [INCLUDES for libsingular_resources] )
++AC_ARG_VAR( [RESOURCES_LIBS], [LIBS for libsingular_resources] )
+
+-AC_MSG_CHECKING(whether libresources should be used)
++AC_MSG_CHECKING(whether libsingular_resources should be used)
+ if test "x$with_Singular" = xyes;
+ then
+ AC_MSG_RESULT(yes)
+@@ -134,7 +134,7 @@ then
+ AC_MSG_CHECKING([ RESOURCES_LIBS?..])
+ AC_MSG_RESULT(${RESOURCES_LIBS:-unset})
+
+- PKG_REQUIRE="$PKG_REQUIRE resources"
++ PKG_REQUIRE="$PKG_REQUIRE singular_resources"
+ AC_SUBST(PKG_REQUIRE)
+ else
+ AC_MSG_RESULT(no)
+diff --git a/gfanlib/configure.ac b/gfanlib/configure.ac
+index 015134c..d3d2cd7 100644
+--- a/gfanlib/configure.ac
++++ b/gfanlib/configure.ac
+@@ -2,7 +2,7 @@
+ # Process this file with autoconf to produce a configure script.
+
+ AC_PREREQ([2.63])
+-AC_INIT([libgfan], [0.1], [ren@mathematik.uni-kl.de])
++AC_INIT([libgfan], [0.6], [ren@mathematik.uni-kl.de])
+ AC_CONFIG_MACRO_DIR([../m4])
+ AC_CONFIG_AUX_DIR([../build-aux])
+ AC_CONFIG_SRCDIR([gfanlib.h])
+diff --git a/libpolys/configure.ac b/libpolys/configure.ac
+index 049e44d..4b2f1ae 100644
+--- a/libpolys/configure.ac
++++ b/libpolys/configure.ac
+@@ -90,10 +90,10 @@ SING_CHECK_OMALLOC()
+
+ ENABLE_RESOURCES="yes"
+
+-AC_ARG_VAR( [RESOURCES_INCLUDES], [INCLUDES for libresources] )
+-AC_ARG_VAR( [RESOURCES_LIBS], [LIBS for libresources] )
++AC_ARG_VAR( [RESOURCES_INCLUDES], [INCLUDES for libsingular_resources] )
++AC_ARG_VAR( [RESOURCES_LIBS], [LIBS for libsingular_resources] )
+
+-AC_MSG_CHECKING(whether libresources should be used)
++AC_MSG_CHECKING(whether libsingular_resources should be used)
+
+ if test "x$ENABLE_RESOURCES" = xyes;
+ then
+@@ -105,7 +105,7 @@ then
+ AC_MSG_CHECKING([ RESOURCES_LIBS?..])
+ AC_MSG_RESULT(${RESOURCES_LIBS:-unset})
+
+- PKG_REQUIRE="$PKG_REQUIRE resources"
++ PKG_REQUIRE="$PKG_REQUIRE singular_resources"
+ AC_SUBST(PKG_REQUIRE)
+ else
+ AC_MSG_RESULT(no)
+diff --git a/m4/options.m4 b/m4/options.m4
+index 31b86e4..066dc4d 100644
+--- a/m4/options.m4
++++ b/m4/options.m4
+@@ -150,19 +150,19 @@ AC_DEFUN([SING_USE_OMALLOC],
+
+ AC_DEFUN([SING_USE_RESOURCES],
+ [
+- AC_ARG_ENABLE(resources,
+- [AS_HELP_STRING([--disable-resources], [do NOT use libresources within the factory])],
++ AC_ARG_ENABLE(singular_resources,
++ [AS_HELP_STRING([--disable-singular_resources], [do NOT use libsingular_resources within the factory])],
+ [if test "x$enableval" = "xyes"; then
+ ENABLE_RESOURCES=yes
+ fi],
+ ENABLE_RESOURCES=yes)
+
+- AC_MSG_CHECKING(whether to use libresources in factory and co.)
++ AC_MSG_CHECKING(whether to use libsingular_resources in factory and co.)
+ if test "x$ENABLE_RESOURCES" = xyes; then
+ AC_MSG_RESULT(yes)
+ RESOURCES_INCLUDES="-I$ac_abs_top_srcdir "
+
+- RESOURCES_LIBS="$ac_abs_top_builddir/resources/libresources.la"
++ RESOURCES_LIBS="$ac_abs_top_builddir/resources/libsingular_resources.la"
+
+ AC_SUBST(RESOURCES_INCLUDES)
+ AC_SUBST(RESOURCES_LIBS)
+@@ -171,7 +171,7 @@ AC_DEFUN([SING_USE_RESOURCES],
+
+ ac_configure_args="$ac_configure_args $ENABLE_ARG"
+
+- PKG_REQUIRE="$PKG_REQUIRE resources"
++ PKG_REQUIRE="$PKG_REQUIRE singular_resources"
+ AC_SUBST(PKG_REQUIRE)
+ else
+ AC_MSG_RESULT(no)
+diff --git a/resources/Makefile.am b/resources/Makefile.am
+index fa69ccc..934175b 100644
+--- a/resources/Makefile.am
++++ b/resources/Makefile.am
+@@ -1,24 +1,24 @@
+ ACLOCAL_AMFLAGS = -I ../m4
+
+-libresources_LTLIBRARIES = libresources.la
++libsingular_resources_LTLIBRARIES = libsingular_resources.la
+
+-libresourcesdir = $(libdir)
++libsingular_resourcesdir = $(libdir)
+
+
+ AM_CPPFLAGS = -I${top_srcdir} -I${top_builddir}
+
+
+ SOURCES = omFindExec.c feResource.cc feFopen.cc
+-libresources_la_SOURCES = $(SOURCES)
++libsingular_resources_la_SOURCES = $(SOURCES)
+
+-libresources_la_LDFLAGS = -release ${PACKAGE_VERSION}
++libsingular_resources_la_LDFLAGS = -release ${PACKAGE_VERSION}
+
+-libresources_includedir =$(includedir)/resources
++libsingular_resources_includedir =$(includedir)/resources
+
+-libresources_include_HEADERS = omFindExec.h feResource.h feFopen.h
++libsingular_resources_include_HEADERS = omFindExec.h feResource.h feFopen.h
+
+-nodist_libresources_include_HEADERS = resourcesconfig.h
+-DISTCLEANFILES = $(nodist_libresources_include_HEADERS)
++nodist_libsingular_resources_include_HEADERS = singular_resourcesconfig.h
++DISTCLEANFILES = $(nodist_libsingular_resources_include_HEADERS)
+
+ pkgconfigdir = $(libdir)/pkgconfig
+-pkgconfig_DATA = resources.pc
++pkgconfig_DATA = singular_resources.pc
+diff --git a/resources/configure.ac b/resources/configure.ac
+index bc5f294..212a1d5 100644
+--- a/resources/configure.ac
++++ b/resources/configure.ac
+@@ -1,4 +1,4 @@
+-AC_INIT([resources], [4.0.3])
++AC_INIT([singular_resources], [4.0.3])
+
+ AC_CONFIG_MACRO_DIR([../m4])
+ AC_CONFIG_AUX_DIR([../build-aux])
+@@ -14,7 +14,7 @@ dnl Check if build env is sane
+ AM_SANITY_CHECK
+
+ # Add pre'prefixed config
+-AX_PREFIX_CONFIG_H([resourcesconfig.h],[],[_config.h])
++AX_PREFIX_CONFIG_H([singular_resourcesconfig.h],[],[_config.h])
+
+ SING_RESET_FLAGS()
+ SING_CHECK_SET_ARGS()
+@@ -70,5 +70,5 @@ AX_RECURSIVE_EVAL([[$]datadir], [config_datadir])
+ AX_NORMALIZE_PATH([config_datadir],['/'])
+ AC_DEFINE_UNQUOTED([DATA_DIR],"$config_datadir",[datadir])
+
+-AC_CONFIG_FILES([resources.pc Makefile])
++AC_CONFIG_FILES([singular_resources.pc Makefile])
+ AC_OUTPUT
+diff --git a/resources/feFopen.cc b/resources/feFopen.cc
+index 98cfd44..10800a0 100644
+--- a/resources/feFopen.cc
++++ b/resources/feFopen.cc
+@@ -1,4 +1,4 @@
+-#include "resourcesconfig.h"
++#include "singular_resourcesconfig.h"
+ #include "feResource.h"
+ #include "feFopen.h"
+
+diff --git a/resources/feResource.cc b/resources/feResource.cc
+index 49a6855..a3accf9 100644
+--- a/resources/feResource.cc
++++ b/resources/feResource.cc
+@@ -5,7 +5,7 @@
+ * ABSTRACT: management of resources
+ */
+
+-#include "resourcesconfig.h"
++#include "singular_resourcesconfig.h"
+ #include "feResource.h"
+ #include "omFindExec.h"
+
+diff --git a/resources/omFindExec.c b/resources/omFindExec.c
+index e79f2c8..1d5852a 100644
+--- a/resources/omFindExec.c
++++ b/resources/omFindExec.c
+@@ -6,7 +6,7 @@
+ *******************************************************************/
+
+
+-#include "resourcesconfig.h"
++#include "singular_resourcesconfig.h"
+
+
+ #if defined(HAVE_UNISTD_H) && defined(STDC_HEADERS)
+diff --git a/resources/resources.pc.in b/resources/resources.pc.in
+deleted file mode 100644
+index d040056..0000000
+--- a/resources/resources.pc.in
++++ /dev/null
+@@ -1,17 +0,0 @@
+-prefix=@prefix@
+-exec_prefix=@exec_prefix@
+-libdir=@libdir@
+-includedir=@includedir@
+-
+-Name: @PACKAGE@
+-Description: The Singular resources manager
+-Version: @PACKAGE_VERSION@
+-URL: https://github.com/Singular/Sources/tree/spielwiese/@PACKAGE@
+-
+-# Requires:
+-# Conflicts:
+-
+-Cflags: -I${includedir} @SINGULAR_CFLAGS@
+-Libs: -L${libdir} -l@PACKAGE@
+-# Libs.private:
+-
+diff --git a/resources/singular_resources.pc.in b/resources/singular_resources.pc.in
+new file mode 100644
+index 0000000..d040056
+--- /dev/null
++++ b/resources/singular_resources.pc.in
+@@ -0,0 +1,17 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: @PACKAGE@
++Description: The Singular resources manager
++Version: @PACKAGE_VERSION@
++URL: https://github.com/Singular/Sources/tree/spielwiese/@PACKAGE@
++
++# Requires:
++# Conflicts:
++
++Cflags: -I${includedir} @SINGULAR_CFLAGS@
++Libs: -L${libdir} -l@PACKAGE@
++# Libs.private:
++
diff --git a/sci-mathematics/singular/metadata.xml b/sci-mathematics/singular/metadata.xml
new file mode 100644
index 000000000000..faab92efd936
--- /dev/null
+++ b/sci-mathematics/singular/metadata.xml
@@ -0,0 +1,11 @@
+<?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>
+ <use>
+ <flag name="boost">Compile against external boost headers (<pkg>dev-libs/boost</pkg>)</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/singular/singular-3.1.6.ebuild b/sci-mathematics/singular/singular-3.1.6.ebuild
new file mode 100644
index 000000000000..1aaa72907608
--- /dev/null
+++ b/sci-mathematics/singular/singular-3.1.6.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils elisp-common flag-o-matic multilib prefix python-single-r1 versionator
+
+MY_PN=Singular
+MY_PV=$(replace_all_version_separators -)
+MY_DIR=$(get_version_component_range 1-3 ${MY_PV})
+# Note: Upstream's share tarball may not get updated on every release
+MY_SHARE_DIR="3-1-6"
+MY_PV_SHARE="${MY_PV}"
+
+DESCRIPTION="Computer algebra system for polynomial computations"
+HOMEPAGE="http://www.singular.uni-kl.de/"
+
+SRC_COM="http://www.mathematik.uni-kl.de/ftp/pub/Math/${MY_PN}/SOURCES/"
+SRC_URI="${SRC_COM}${MY_DIR}/${MY_PN}-${MY_PV}.tar.gz
+ ${SRC_COM}${MY_SHARE_DIR}/${MY_PN}-${MY_PV_SHARE}-share.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="boost doc emacs examples python readline test"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/gmp:0=
+ dev-libs/ntl:0=
+ emacs? ( >=virtual/emacs-22 )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ boost? ( dev-libs/boost:0= )"
+
+# Upstream does not care about tests
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_PN}-${MY_DIR}"
+
+pkg_setup() {
+ append-flags -fPIC
+ append-ldflags -fPIC
+ tc-export CC CPP CXX
+ use emacs && elisp-need-emacs 22
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare () {
+ epatch \
+ "${FILESDIR}"/${PN}-3.1.0-gentoo.patch \
+ "${FILESDIR}"/${PN}-3.1.0-emacs-22.patch \
+ "${FILESDIR}"/${PN}-3.0.4.4-nostrip.patch \
+ "${FILESDIR}"/${PN}-3.1.3.3-Minor.h.patch \
+ "${FILESDIR}"/${PN}-3.1.6-ntl6compat.patch \
+ "${FILESDIR}"/${PN}-3.1.6-factory_template_instantiation.patch
+ use python && epatch "${FILESDIR}"/${PN}-3.1.3.2-python.patch
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ epatch "${FILESDIR}"/${PN}-3.1.3.3-install_name.patch
+ eprefixify kernel/Makefile.in
+ eprefixify Singular/Makefile.in
+ fi
+
+ eprefixify kernel/feResource.cc
+
+ # The SLDFLAGS mangling prevents passing raw LDLAGS to gcc (see e.g. bug 414709)
+ sed -i \
+ -e "/CXXFLAGS/ s/--no-exceptions//g" \
+ -e "s/SLDFLAGS=-shared/SLDFLAGS=\"$(raw-ldflags) -shared\"\n\t \tSLDFLAGS2=\"${LDFLAGS} -shared\"/" \
+ -e "s/ SLDFLAGS=/ SLDFLAGS=\n SLDFLAGS2=/" \
+ -e "s/AC_SUBST(SLDFLAGS)/AC_SUBST(SLDFLAGS)\nAC_SUBST(SLDFLAGS2)/" \
+ "${S}"/Singular/configure.in || die
+
+ sed -i \
+ -e "s/@SLDFLAGS@/@SLDFLAGS@\nSLDFLAGS2\t= @SLDFLAGS2@/" \
+ -e "/\$(CXX).*SLDFLAGS/s/SLDFLAGS/SLDFLAGS2/" \
+ "${S}"/Singular/Makefile.in || die
+
+ # remove ntl sources for safety.
+ rm -r ntl || die
+
+ cd "${S}"/Singular || die "failed to cd into Singular/"
+
+ eautoconf
+}
+
+src_configure() {
+ econf \
+ --prefix="${S}"/build \
+ --exec-prefix="${S}"/build \
+ --bindir="${S}"/build/bin \
+ --libdir="${S}"/build/lib \
+ --libexecdir="${S}"/build/lib \
+ --includedir="${S}"/build/include \
+ --with-apint=gmp \
+ --with-NTL \
+ --disable-doc \
+ --without-MP \
+ --without-flint \
+ --enable-factory \
+ --enable-libfac \
+ --enable-IntegerProgramming \
+ --enable-Singular \
+ --with-malloc=system \
+ $(use_with python python embed) \
+ $(use_with boost Boost) \
+ $(use_enable emacs) \
+ $(use_with readline)
+}
+
+src_compile() {
+ emake
+ if use emacs; then
+ cd "${WORKDIR}"/${MY_PN}/${MY_SHARE_DIR}/emacs/
+ elisp-compile *.el
+ fi
+}
+
+src_test() {
+ # Tests fail to link -lsingular, upstream ticket #243
+ emake test
+}
+
+src_install () {
+ dodoc README
+ # execs and libraries
+ cd "${S}"/build/bin
+ dobin ${MY_PN}* gen_test change_cost solve_IP toric_ideal LLL
+ insinto /usr/$(get_libdir)/${PN}
+ doins *.so
+
+ dosym ${MY_PN}-${MY_DIR} /usr/bin/${MY_PN}
+ dosym ${MY_PN}-${MY_DIR} /usr/bin/${PN}
+
+ # stuff from the share tar ball
+ cd "${WORKDIR}"/${MY_PN}/${MY_SHARE_DIR}
+ insinto /usr/share/${PN}
+ doins -r LIB
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+ if use doc; then
+ dohtml -r html/*
+ insinto /usr/share/${PN}
+ doins doc/singular.idx
+ cp info/${PN}.hlp info/${PN}.info &&
+ doinfo info/${PN}.info
+ fi
+ if use emacs; then
+ elisp-install ${PN} emacs/*.el emacs/*.elc emacs/.emacs*
+ elisp-site-file-install "${FILESDIR}"/60${PN}-gentoo.el
+ fi
+}
+
+pkg_postinst() {
+ einfo "The authors ask you to register as a SINGULAR user."
+ einfo "Please check the license file for details."
+ if use emacs; then
+ echo
+ ewarn "Please note that the ESingular emacs wrapper has been"
+ ewarn "removed in favor of full fledged singular support within"
+ ewarn "Gentoo's emacs infrastructure; i.e. just fire up emacs"
+ ewarn "and you should be good to go! See bug #193411 for more info."
+ echo
+ fi
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/singular/singular-4.0.2.ebuild b/sci-mathematics/singular/singular-4.0.2.ebuild
new file mode 100644
index 000000000000..fd44a959ad62
--- /dev/null
+++ b/sci-mathematics/singular/singular-4.0.2.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils elisp-common flag-o-matic multilib prefix versionator
+
+MY_PN=Singular
+MY_PV=$(replace_all_version_separators '.')
+# Consistency is different...
+MY_DIR2=$(get_version_component_range 1-3 ${PV})
+MY_DIR=$(replace_all_version_separators '-' ${MY_DIR2})
+# This is where the share tarball unpacks to
+MY_SHARE_DIR="${WORKDIR}"/share/
+
+DESCRIPTION="Computer algebra system for polynomial computations"
+HOMEPAGE="http://www.singular.uni-kl.de/"
+SRC_URI="http://www.mathematik.uni-kl.de/ftp/pub/Math/${MY_PN}/SOURCES/${MY_DIR}/${PN}-${MY_PV}.tar.gz
+ http://www.mathematik.uni-kl.de/ftp/pub/Math/${MY_PN}/SOURCES/${MY_DIR}/${PN}-${MY_PV}-share.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~x86-linux ~x86-macos"
+IUSE="boost doc emacs examples python +readline"
+
+RDEPEND="dev-libs/gmp:0
+ >=dev-libs/ntl-5.5.1
+ emacs? ( >=virtual/emacs-22 )
+ sci-mathematics/flint
+ sci-mathematics/4ti2
+ sci-libs/cddlib"
+
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ boost? ( dev-libs/boost )
+ readline? ( sys-libs/readline )"
+
+SITEFILE=60${PN}-gentoo.el
+
+S="${WORKDIR}/${PN}-${MY_DIR2}"
+
+pkg_setup() {
+ append-flags "-fPIC"
+ append-ldflags "-fPIC"
+ tc-export AR CC CPP CXX
+
+ # Ensure that >=emacs-22 is selected
+ if use emacs; then
+ elisp-need-emacs 22 || die "Emacs version too low"
+ fi
+}
+
+src_prepare () {
+ # Need to do something about resources later...
+ # epatch "${FILESDIR}"/${PN}-4.0.0-gentoo.patch
+
+ # omalloc's old configure will fail if ar is not exactly 'ar'.
+ epatch "${FILESDIR}"/${PN}-4.0.0-fix-omalloc-ar-detection.patch
+
+ epatch "${FILESDIR}"/${PN}-4.0.2-ntl8-compat.patch
+
+ # autoreconf everything since otherwise it assumes autmake-1.13 is installed
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-gmp \
+ --with-ntl \
+ --with-flint \
+ --enable-gfanlib \
+ --disable-debug \
+ --disable-doc \
+ --enable-factory \
+ --enable-libfac \
+ --enable-IntegerProgramming \
+ $(use_with python python embed) \
+ $(use_with boost Boost) \
+ $(use_enable emacs) \
+ $(use_with readline) || die "configure failed"
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ if use emacs; then
+ cd "${MY_SHARE_DIR}"singular/emacs/
+ elisp-compile *.el || die "elisp-compile failed"
+ fi
+}
+
+# src_install () {
+# dodoc README
+# # execs and libraries
+# cd "${S}"/build/bin
+# dobin ${MY_PN}* gen_test change_cost solve_IP toric_ideal LLL \
+# || die "failed to install binaries"
+# insinto /usr/$(get_libdir)/${PN}
+# doins *.so || die "failed to install libraries"
+#
+# dosym ${MY_PN}-${MY_DIR} /usr/bin/${MY_PN} \
+# || die "failed to create symbolic link"
+#
+# # stuff from the share tar ball
+# cd "${WORKDIR}"/${MY_PN}/${MY_SHARE_DIR}
+# insinto /usr/share/${PN}
+# doins -r LIB || die "failed to install lib files"
+# if use examples; then
+# insinto /usr/share/doc/${PF}
+# doins -r examples || die "failed to install examples"
+# fi
+# if use doc; then
+# dohtml -r html/* || die "failed to install html docs"
+# insinto /usr/share/${PN}
+# doins doc/singular.idx || die "failed to install idx file"
+# cp info/${PN}.hlp info/${PN}.info &&
+# doinfo info/${PN}.info \
+# || die "failed to install info files"
+# fi
+# if use emacs; then
+# elisp-install ${PN} emacs/*.el emacs/*.elc emacs/.emacs* \
+# || die "elisp-install failed"
+# elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+# fi
+# }
+
+pkg_postinst() {
+ einfo "The authors ask you to register as a SINGULAR user."
+ einfo "Please check the license file for details."
+
+ if use emacs; then
+ echo
+ ewarn "Please note that the ESingular emacs wrapper has been"
+ ewarn "removed in favor of full fledged singular support within"
+ ewarn "Gentoo's emacs infrastructure; i.e. just fire up emacs"
+ ewarn "and you should be good to go! See bug #193411 for more info."
+ echo
+ fi
+
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/singular/singular-4.0.3.ebuild b/sci-mathematics/singular/singular-4.0.3.ebuild
new file mode 100644
index 000000000000..819a33a186cc
--- /dev/null
+++ b/sci-mathematics/singular/singular-4.0.3.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools elisp-common flag-o-matic multilib prefix versionator
+
+MY_PN=Singular
+MY_PV=$(replace_all_version_separators '.')
+# Consistency is different...
+MY_DIR2=$(get_version_component_range 1-3 ${PV})
+MY_DIR=$(replace_all_version_separators '-' ${MY_DIR2})
+# This is where the share tarball unpacks to
+
+DESCRIPTION="Computer algebra system for polynomial computations"
+HOMEPAGE="http://www.singular.uni-kl.de/"
+SRC_URI="http://www.mathematik.uni-kl.de/ftp/pub/Math/${MY_PN}/SOURCES/${MY_DIR}/${PN}-${MY_PV}.tar.gz
+ http://www.mathematik.uni-kl.de/ftp/pub/Math/${MY_PN}/SOURCES/${MY_DIR}/${PN}-${MY_PV}-share.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-linux ~x86-macos"
+IUSE="boost doc emacs examples python +readline"
+
+RDEPEND="dev-libs/gmp:0
+ >=dev-libs/ntl-5.5.1
+ emacs? ( >=virtual/emacs-22 )
+ sci-mathematics/flint
+ sci-mathematics/4ti2
+ sci-libs/cddlib"
+
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ boost? ( dev-libs/boost )
+ readline? ( sys-libs/readline )"
+
+SITEFILE=60${PN}-gentoo.el
+
+S="${WORKDIR}/${PN}-${MY_DIR2}"
+
+pkg_setup() {
+ append-flags "-fPIC"
+ append-ldflags "-fPIC"
+ tc-export AR CC CPP CXX
+
+ # Ensure that >=emacs-22 is selected
+ if use emacs; then
+ elisp-need-emacs 22 || die "Emacs version too low"
+ fi
+}
+
+src_prepare () {
+ eapply "${FILESDIR}"/"${P}"-fix-resources-name.patch
+ eapply "${FILESDIR}"/"${P}"-fix-destdir.patch
+ eapply_user
+ # autoreconf everything since otherwise it assumes autmake-1.13 is installed
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-gmp \
+ --with-ntl \
+ --with-flint \
+ --enable-gfanlib \
+ --disable-debug \
+ --disable-doc \
+ --enable-factory \
+ --enable-libfac \
+ --enable-IntegerProgramming \
+ $(use_with python python embed) \
+ $(use_with boost Boost) \
+ $(use_enable emacs) \
+ $(use_with readline) || die "configure failed"
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ if use emacs; then
+ cd "${S}"/emacs/
+ elisp-compile *.el || die "elisp-compile failed"
+ fi
+}
+
+pkg_postinst() {
+ einfo "The authors ask you to register as a SINGULAR user."
+ einfo "Please check the license file for details."
+
+ if use emacs; then
+ echo
+ ewarn "Please note that the ESingular emacs wrapper has been"
+ ewarn "removed in favor of full fledged singular support within"
+ ewarn "Gentoo's emacs infrastructure; i.e. just fire up emacs"
+ ewarn "and you should be good to go! See bug #193411 for more info."
+ echo
+ fi
+
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/snns/Manifest b/sci-mathematics/snns/Manifest
new file mode 100644
index 000000000000..193f557a0515
--- /dev/null
+++ b/sci-mathematics/snns/Manifest
@@ -0,0 +1,10 @@
+AUX 4.2-ldflags.patch 1109 SHA256 5cebf78bf106ae055bb556004dc285b5ae5362e9a1f4eea296c666be6014265b SHA512 274da0d037922c7bec246cb47a57cf63ca700345073ae0159d5636921a51370e02ed4dd18618e657477c513b2141c87a40c7082abe4fdaeb287ce42b33907033 WHIRLPOOL e206c3e530a17b0548bcb30855691f433e4802cbe1a8e2a2a793c4337281fc3d063485039771091bd1580882819edb075669398a0365ab36ec54f94cf5317e75
+AUX 4.3-bison-version.patch 463 SHA256 db71246207e413f56fbc1e673b61f09a0310d6e1e8a40eb2688da87c772c8e6b SHA512 5ad60b931e1bf79ccc023ca6fdde4ded155cf5d5d47216fec4811dc7689c95b0147dbc3210507c20ca59086f9d0e0df30b5c0a42daada549919c473176338344 WHIRLPOOL bdf02e266680efb9ec690ca19b87583b9fc8217369ace023a0a630dfefbcf7554ab9448dc807e8ce7b83bd1e3f2ade17b2e6d369c041d3ceb33848a6e7e97ae9
+AUX 4.3-snns-netperf.patch 4398 SHA256 76a022ba90dc69b1b78a0c4824c9b5a41709e9152abe5813d38a2d555863da7a SHA512 316c1121e7269adc142a0dd7b7dc9882605bc4c01cb5fa15e5b1d3de93ece31e4ff27894439e54fce6c174d763133bf7cd69b2142bfb3f030609e5e9ba5d41c1 WHIRLPOOL 93bc9758bbd87f5fb2fc284f25c2dbee8386e5be5923fb96d64372b0cfc10d2a3a450ad396495c037d1ae726566dfb93ebb0927837c69b9b56daf058f8547a03
+AUX 4.3-unstrip.patch 260 SHA256 4efb6e5fcbb130eb850bc5d0c837db6b37e78466068cf2c472082d8dd8f334d9 SHA512 9fb6826160850c4de977367a16ebfcd49667ee5bb5647a3a0441a32e58ce5e7649e25c03d4c43b71eab037ad13bdefe1668bedde691fc9883ed2e5e743856b16 WHIRLPOOL 462ad2fc58d837b92a6fafe9d7c8a34e539ae39a3074396ae0665dc6b3be846df5b6fc62a0fb95186cd0f84f715b8e76189a62e3aca47bf2ab490391caaf31a7
+DIST SNNSv4.2.Manual.pdf 2103861 SHA256 ffed74a4d63f78b8bf8a400a18ce32c3e8d8b3e89682394cc6af122c097aba62 SHA512 204ff6cf31cdf6496042b7f1b6a1a446c4050c3d4d92ff046dc4970c4f8d3872f5d3430d2f41138e5e5b64a77348b95960eba53b2c305954b68dd0e483828016 WHIRLPOOL f21891640fd4428cf20e31766fd2cc304d003aba6e2277d2dc3f724747ab688621a90e4afecfa6a3c7cb799aee0fdc00574fc7c9eb102c55031767dea703a326
+DIST SNNSv4.3.tar.gz 5076669 SHA256 54bf92d23e9198f9030a3c3d2b741472e9b8660b27d3b419ade6393b1ebf6f62 SHA512 a057dc946b581eee01334956c33d6870b8b994d1b835834d58c37ae3a8585dfb1206f3082b17a49ee97b22f4c07c0efb47e4e3ae5aeb37e97f69472da3e21f0b WHIRLPOOL 29e1afc09a6e5ba7de5fc21d2a995f7f093e02e9f6125831ce29dfeaddd125241f440b362b97af5fe0933a21455b4002f606ecdce7b13f24046d20167bd5ad7d
+EBUILD snns-4.3-r2.ebuild 2818 SHA256 a71824f8a76c511a09f546e2213e9a30bf0f59b6354195e6cc8ed9e5a65bdc07 SHA512 0cb8444ccbfa22458351e1ed5010f4a1335d42a78bfc44a58e64d414a09b139aba6f5f7d9a6471156a30fb42bc4dda6864da08e50786587382f0dd0539dfbf03 WHIRLPOOL 0b9c3860c532fffd3847cf29b77b823647bb5e5b0cc0fc1ee01478edbe759314f1ce3c73db7e1aa313eb7df85b5ad9ab0ac882fc72dcb2fee4f64c85e420830c
+MISC ChangeLog 3692 SHA256 e5f69af5c9ea181143659b8f291333da481d135547c4ffc1f94411d5aaab40e5 SHA512 743fdf6a21a363f3d2784c7c8251da849de5f1415f53b886d69058fd6a42f36d63d0820e936f7d4a22ce3c272adfa89335c2dccc8766576a8d6997c9f9dcde25 WHIRLPOOL a48f484feca399e661ee8a0955e759cb0d4ea20e3a98a455e761247474aa0cfe3415e457f615a6bf26ab773251433cfb4cd52771fc66baa80b557918968bac3e
+MISC ChangeLog-2015 6497 SHA256 7fae9e1502614d953eecda1505207d4b0ee076dc2ec956dcd9a1d3bfcf25815b SHA512 50bf8afa509f15e3cff6b3b3606ab98ecbd04bc7f65259e46e8c4d89f41874502eb6cb51b5c132b9fa9a9c7dbd10ccd2e175457f707d0ae8d32f99826989cde2 WHIRLPOOL a9c90a71c4dc3bed32d8279976b49f21ab777b24f384872e9a82a0f2b2ccbd61544d767fdd8b672f4476a1e071e9b9a02227db7e079099b83eee226251adfd9a
+MISC metadata.xml 450 SHA256 49716db8046aa170a2f72ed14bec1f73335c602bdf2f65c2c88a7c7ed07d7023 SHA512 99adeac1400d381b82d1d3ac3b94b8e00111c7354970937aa5bea8928fdfe15ed85304f073b14018b7396d0213f47c8309b3640570da59d7e5cfd065c395f30f WHIRLPOOL 719ab707add29b757522bfe938724d845bd34c275fa9ea5bb9069845c094bd1df998b02a18f37ae62a2b515728c8be1c426640096304593f0a13e7453ddad1ec
diff --git a/sci-mathematics/snns/files/4.2-ldflags.patch b/sci-mathematics/snns/files/4.2-ldflags.patch
new file mode 100644
index 000000000000..752380d1d8f0
--- /dev/null
+++ b/sci-mathematics/snns/files/4.2-ldflags.patch
@@ -0,0 +1,42 @@
+Respect LDFLAGS
+
+https://bugs.gentoo.org/show_bug.cgi?id=332475
+
+--- tools/sources/Makefile
++++ tools/sources/Makefile
+@@ -147,19 +147,19 @@
+ # Linking of single stand alone programs
+
+ analyze: analyze.o
+- $(CC) analyze.o -lm -o analyze
++ $(CC) $(LDFLAGS) analyze.o -lm -o analyze
+
+ pat_sel_simple: pat_sel_simple.o
+- $(CC) pat_sel_simple.o -lm -o pat_sel_simple
++ $(CC) $(LDFLAGS) pat_sel_simple.o -lm -o pat_sel_simple
+
+ mkhead: mkhead.o
+- $(CC) mkhead.o -lm -o mkhead
++ $(CC) $(LDFLAGS) mkhead.o -lm -o mkhead
+
+ mkout: mkout.o
+- $(CC) mkout.o -lm -o mkout
++ $(CC) $(LDFLAGS) mkout.o -lm -o mkout
+
+ mkpat: mkpat.o
+- $(CC) mkpat.o -lm -o mkpat
++ $(CC) $(LDFLAGS) mkpat.o -lm -o mkpat
+
+
+ # Make sure that kernel libs are available and up to date
+--- xgui/sources/Makefile
++++ xgui/sources/Makefile
+@@ -202,7 +202,7 @@
+ # Linking of xgui
+
+ xgui: $(LIBXGUI1) $(LIBXGUI2) $(BN3DLIB) $(KERNELLIBS)
+- $(CC) $(LIBXGUI1) $(LIBXGUI2) $(BN3DLIB) \
++ $(CC) $(LDFLAGS) $(LIBXGUI1) $(LIBXGUI2) $(BN3DLIB) \
+ $(X_LIBS) -lXaw3d -lXmu -lXt -lXext $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS) \
+ $(KERNELALLLIBS) -o xgui
+
diff --git a/sci-mathematics/snns/files/4.3-bison-version.patch b/sci-mathematics/snns/files/4.3-bison-version.patch
new file mode 100644
index 000000000000..73da70187254
--- /dev/null
+++ b/sci-mathematics/snns/files/4.3-bison-version.patch
@@ -0,0 +1,11 @@
+--- configure.old 2015-04-08 16:27:05.000000000 -0400
++++ configure 2015-04-08 16:26:41.000000000 -0400
+@@ -5071,7 +5071,7 @@
+ else
+ { echo "$as_me:$LINENO: checking for version of bison" >&5
+ echo $ECHO_N "checking for version of bison... $ECHO_C" >&6; }
+- bison_version=`$BISON --version`
++ bison_version=`$BISON --version |head -n 1`
+ { echo "$as_me:$LINENO: result: $bison_version" >&5
+ echo "${ECHO_T}$bison_version" >&6; }
+ warn_bison=yes
diff --git a/sci-mathematics/snns/files/4.3-snns-netperf.patch b/sci-mathematics/snns/files/4.3-snns-netperf.patch
new file mode 100644
index 000000000000..f154a538b2d9
--- /dev/null
+++ b/sci-mathematics/snns/files/4.3-snns-netperf.patch
@@ -0,0 +1,164 @@
+--- a/examples/nettalk.README 2008-04-21 03:55:43.000000000 -0400
++++ b/examples/nettalk.README 2015-04-14 09:38:23.836014999 -0400
+@@ -60,7 +60,7 @@
+ Hints:
+ ======
+
+-We usually call nettalk.net from the tool 'netperf', a benchmarking
++We usually call nettalk.net from the tool 'snns-netperf', a benchmarking
+ version of SNNS without graphical user interface but with the full and
+ current SNNS kernel. It is supplied with SNNS in the tools directory.
+ We usually train and test nettalk for 10 cycles. Since convergence is
+--- a/man/man1/snns.1 2008-04-21 03:56:05.000000000 -0400
++++ b/man/man1/snns.1 2015-04-14 09:36:27.406012874 -0400
+@@ -111,7 +111,7 @@
+ .BR netlearn (1)
+ backpropagation test program
+
+-.BR netperf (1)
++.BR snns-netperf (1)
+ benchmark program
+
+ .BR pat_sel (1)
+@@ -132,4 +132,4 @@
+ yet.
+
+ .SH AUTHOR
+-Guenter W. Mamier
+\ No newline at end of file
++Guenter W. Mamier
+--- a/tools/doc/netperf.doc 2008-04-21 03:56:06.000000000 -0400
++++ b/tools/doc/netperf.doc 1969-12-31 19:00:00.000000000 -0500
+@@ -1,49 +0,0 @@
+- ===============================
+- Description of the tool NETPERF
+- ===============================
+-
+-This is a benchmark program for SNNS. Propagtion and
+-backpropagation tests are performed.
+-
+-synopsis: netperf
+-
+-
+-example:
+-
+-unix >netperf
+-
+-produces
+-
+- SNNS 3D-Kernel V3.1000
+- ----- Benchmark Test -----
+-
+- Filename of the network file: ../../../examples/nettalk.net
+- Loading the network ...
+-
+- Network name: nettalk1
+- No. of units : 349
+- No. of input units : 203
+- No. of output units: 26
+- No. of sites: 0
+- No. of links: 27480
+-
+- Learning function: Std_Backpropagation
+- Update function : Topological_Order
+-
+- Do you want to benchmark
+- Propagation [1] or
+- Backpropagation [2] ?
+- Input: 1
+-
+- Choose no. of cycles: 100
+-
+- Begin propagation ...
+-
+-
+- No. of units updated: 34900
+- No. of sites updated: 0
+- No. of links updated: 2748000
+- CPU Time used: 3.05 seconds
+-
+- No. of connection per second (CPS): 9.0098e+05
+-
+--- a/tools/doc/snns-netperf.doc 1969-12-31 19:00:00.000000000 -0500
++++ b/tools/doc/snns-netperf.doc 2015-04-14 09:37:21.126013855 -0400
+@@ -0,0 +1,49 @@
++ ====================================
++ Description of the tool SNNS-NETPERF
++ ====================================
++
++This is a benchmark program for SNNS. Propagtion and
++backpropagation tests are performed.
++
++synopsis: snns-netperf
++
++
++example:
++
++unix >snns-netperf
++
++produces
++
++ SNNS 3D-Kernel V3.1000
++ ----- Benchmark Test -----
++
++ Filename of the network file: ../../../examples/nettalk.net
++ Loading the network ...
++
++ Network name: nettalk1
++ No. of units : 349
++ No. of input units : 203
++ No. of output units: 26
++ No. of sites: 0
++ No. of links: 27480
++
++ Learning function: Std_Backpropagation
++ Update function : Topological_Order
++
++ Do you want to benchmark
++ Propagation [1] or
++ Backpropagation [2] ?
++ Input: 1
++
++ Choose no. of cycles: 100
++
++ Begin propagation ...
++
++
++ No. of units updated: 34900
++ No. of sites updated: 0
++ No. of links updated: 2748000
++ CPU Time used: 3.05 seconds
++
++ No. of connection per second (CPS): 9.0098e+05
++
+--- a/tools/sources/Makefile 2015-04-14 09:34:31.386010756 -0400
++++ b/tools/sources/Makefile 2015-04-14 09:35:50.526012201 -0400
+@@ -89,7 +89,7 @@
+
+ TOOLS_PRG = $(TOOLS_SOURCES_C:.c=)
+ KRTOOLS_PRG = snns2c pat_sel netlearn td_bignet ff_bignet \
+- netperf snnsbat feedback-gennet convert2snns \
++ snns-netperf snnsbat feedback-gennet convert2snns \
+ isnns linknets
+ BATCH_PRG = batchman
+
+@@ -110,7 +110,7 @@
+ tools: $(TOOLS_PRG) $(KRTOOLS_PRG) $(BATCH_PRG)
+
+ $(TOOLSBINDIR):
+- -mkdir $(TOOLSBINDIR)
++ -mkdir -p $(TOOLSBINDIR)
+
+ install: tools $(TOOLSBINDIR)
+ for tooltarget in $(TOOLS_PRG) $(KRTOOLS_PRG) $(BATCH_PRG) ; do \
+@@ -191,8 +191,8 @@
+ ff_bignet: ff_bignet.o $(KERNELLIBS)
+ $(CC) $(LDFLAGS) ff_bignet.o $(KERNELALLLIBS) -o ff_bignet
+
+-netperf: netperf.o $(KERNELLIBS)
+- $(CC) $(LDFLAGS) netperf.o $(KERNELALLLIBS) -o netperf
++snns-netperf: netperf.o $(KERNELLIBS)
++ $(CC) $(LDFLAGS) netperf.o $(KERNELALLLIBS) -o snns-netperf
+
+ snnsbat: snnsbat.o $(KERNELLIBS)
+ $(CC) $(LDFLAGS) snnsbat.o $(KERNELALLLIBS) -o snnsbat
diff --git a/sci-mathematics/snns/files/4.3-unstrip.patch b/sci-mathematics/snns/files/4.3-unstrip.patch
new file mode 100644
index 000000000000..4f36040e2218
--- /dev/null
+++ b/sci-mathematics/snns/files/4.3-unstrip.patch
@@ -0,0 +1,11 @@
+--- a/configuration/install-sh 2008-04-21 03:55:33.000000000 -0400
++++ b/configuration/install-sh 2015-04-08 16:59:32.000000000 -0400
+@@ -79,7 +79,7 @@
+ shift
+ continue;;
+
+- -s) stripcmd="$stripprog"
++ -s) stripcmd=""
+ shift
+ continue;;
+
diff --git a/sci-mathematics/snns/metadata.xml b/sci-mathematics/snns/metadata.xml
new file mode 100644
index 000000000000..cc5d9687eb2d
--- /dev/null
+++ b/sci-mathematics/snns/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>axs@gentoo.org</email>
+ <name>Ian Stakenvicius</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">snns</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/snns/snns-4.3-r2.ebuild b/sci-mathematics/snns/snns-4.3-r2.ebuild
new file mode 100644
index 000000000000..06d5d7dd7c20
--- /dev/null
+++ b/sci-mathematics/snns/snns-4.3-r2.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+inherit distutils-r1 eutils
+
+MY_P="SNNSv${PV}"
+DESCRIPTION="Stuttgart Neural Network Simulator"
+HOMEPAGE="https://sourceforge.net/projects/snns/"
+SRC_URI="http://www.ra.cs.uni-tuebingen.de/downloads/SNNS/${MY_P}.tar.gz
+ doc? ( http://www.ra.cs.uni-tuebingen.de/downloads/SNNS/SNNSv4.2.Manual.pdf )"
+
+LICENSE="LGPL-2.1"
+KEYWORDS="amd64 ppc x86"
+SLOT="0"
+IUSE="X doc python"
+
+RDEPEND="X? (
+ x11-libs/libX11
+ x11-libs/libXaw3d
+ x11-libs/libXt
+ )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ >=sys-devel/bison-1.2.2"
+
+RDEPEND+=" python? ( ${PYTHON_DEPS} )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/4.3-unstrip.patch
+ epatch "${FILESDIR}"/4.3-bison-version.patch
+ epatch "${FILESDIR}"/4.2-ldflags.patch
+ epatch "${FILESDIR}"/4.3-snns-netperf.patch # bug 248322
+
+ # change all references of Xaw to Xaw3d
+ cd "${S}"/xgui/sources
+ for file in *.c; do
+ sed -e "s:X11/Xaw/:X11/Xaw3d/:g" -i "${file}"
+ done
+
+ # clean up the dirty dist sources and remove files that apparently
+ # are not removed by any clean rules
+ emake clean
+ rm -Rf "${S}"/{tools,xgui}/bin \
+ "${S}"/{Makefile.def,config.h} \
+ "${S}"/configuration/config.{guess,log}
+
+ epatch_user
+
+ if use python; then
+ pushd "${S}"/python > /dev/null || die
+ distutils-r1_src_prepare
+ popd > /dev/null || die
+ fi
+}
+
+src_configure() {
+ econf --enable-global \
+ $(use_with X x)
+
+ if use python; then
+ pushd python > /dev/null || die
+ distutils-r1_src_configure
+ popd > /dev/null || die
+ fi
+}
+
+src_compile() {
+ local compileopts=( compile-kernel compile-tools )
+ use X && compileopts+=( compile-xgui )
+
+ # parallel make sometimes fails (phosphan)
+ # so emake each phase separately (axs)
+ for tgt in "${compileopts[@]}"; do
+ emake ${tgt}
+ done
+
+ if use python; then
+ pushd python > /dev/null || die
+ distutils-r1_src_compile
+ popd > /dev/null || die
+ fi
+}
+
+src_install() {
+ pushd "${S}"/tools/sources > /dev/null || die
+ emake TOOLSBINDIR="${ED}"usr/bin install
+ popd > /dev/null || die
+
+ if use X; then
+ newbin xgui/sources/xgui snns
+
+ echo XGUILOADPATH=/usr/share/doc/${PF} > "${T}"/99snns
+ doenvd "${T}"/99snns
+
+ docompress -x /usr/share/doc/${PF}/{default.cfg,help.hdoc}
+ insinto /usr/share/doc/${PF}
+ doins default.cfg help.hdoc
+ fi
+
+ if use python; then
+ pushd python > /dev/null || die
+ distutils-r1_src_install
+ insinto /usr/share/doc/${PF}/python-examples
+ doins examples/*
+ newdoc README README.python
+ popd > /dev/null || die
+ fi
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins "${DISTDIR}"/${MY_P}.Manual.pdf
+ fi
+
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*
+ doman man/man*/*
+}
diff --git a/sci-mathematics/spass/Manifest b/sci-mathematics/spass/Manifest
new file mode 100644
index 000000000000..ef0da8fd4682
--- /dev/null
+++ b/sci-mathematics/spass/Manifest
@@ -0,0 +1,7 @@
+DIST spass37.tgz 1340925 SHA256 13c67e5e09b814ba50f38a391fe653661ba714e7541ffd4951efef91274aaacc SHA512 5b4efd7b767dfee3f24e7917a6ec58ac240ab33bf601722eabd50af57637d8fdd62de9e34e7cd1cd98b8b7e371c9e2d47c8fa3e07c6e7ce2fa616a76646a4e12 WHIRLPOOL 2fa8881b08a0fcdb9f1a6e7d27849f5c900a32f2cb27d878fbdae4986d0854608fd137e4608349c4eb612f4e1981142e63af8462ab904f7d08c3e2758f319835
+DIST spass39.tgz 554633 SHA256 1797c3fbd1954189c812fbab7927880bad964ded400bae733a9938c7e6b09e85 SHA512 d7ea0697426c476f2e03b2f9078b7e060671067a67fad7144bb5887a2dd3f39e19e1888f121fce546b5d6ea9a4dc458d1cbec56b59c93507e7dc2d0afa25a89b WHIRLPOOL ad69c2e3714c5c640898a71a47ad6ab8370d3dd568372d492e82e6ba17312e84d3885016db3f923a4d7b3967cb0ac65c8e9dd8f0c8ce93f9de0534be01a371aa
+EBUILD spass-3.7.ebuild 1991 SHA256 8524f5dcdd8259d5e1738dff7913a80733c019b2bfea2eb38061d38c10d46a60 SHA512 a155b205249cd9e80b274d8316d42e3a69d60aeecaabe4162b8b6225433a138b5b33605cde7dea391b65c9acb97f65807e0bbf7f2eb9fbe7970e38c81cccb33b WHIRLPOOL 888941f10f766da432b55e3c9e5de885a63232ea03b2cf4dc9150ef1fb2b25bcdb6e575304a774408878f72842c1955d58fae10b34850ad6324adb1bb899814e
+EBUILD spass-3.9.ebuild 4528 SHA256 3e57af8d835a632140db27e2adae2d432fe0f4a8af089dc6e787442f9c27a71e SHA512 5cd41de9201063f2ebf696b5cdd1cf2572e6e0e99282c41a0fd3a92ea8589337da63e4392e0e45257b79dd667d986f7206655310696372ce433e43f5473a6f2c WHIRLPOOL c7d039bc9b3ea7e384f95282a95496879d06f70efb5a348302a8e9b70e1498b0dffc6e46b5c6230a8d048a47b7afe0a7c680409041db6e913d8ab2fb58d11beb
+MISC ChangeLog 2424 SHA256 f4936a0ff754040be0956d786c7158b361c450e27f8237913536b4a4bcda2812 SHA512 4b0181fb1b17724771d12059ce3cf492e51855bfdf79e433c8f390855977c9e5764416ade2a18e3d836044826d796430ca100fec41fe92bbe53bb2a555e4618d WHIRLPOOL 8169fcaec589d542e37d97948ac3e100f2b9a0466a888f9c9390dcb97caccd4643361387af38672f91ee3445de91216666a8e5a03decbaf7685198098720feec
+MISC ChangeLog-2015 1093 SHA256 3c2d8b3531c2a1bc4b3e8043f2e7c22412692835d4afbdec8c6bbdd11be581fb SHA512 a2207b16aa8aad5a71d04e263bddf2cf2044a6f9851dac97aef8af43cd70d917fe875af989782e1116d5f6b3c5080bee687c0301efaa564964368f431b01d809 WHIRLPOOL aacab1927f786e96938be5b4b7073b935f1e882485c6ae98c58cca35e2efa004ff7e97455983d2cb422e7b1e775e5ec4289e789ac4b806ff938071722660aac9
+MISC metadata.xml 576 SHA256 7a3da86dbf6e3e8dbcec949179166741b53122cff989568c9651dee00bc43308 SHA512 0524dd35d60d33e5e75d83079dcf6e9dadfb65bc16fcafda1a8128e0cf8256e0c2d4c1aa0e7f54e19ff6568c00c2be9b9a7b6309d905735b6298bdf721bbbf4c WHIRLPOOL f3e819cae52a36d233867654563bf865f64e3109f4866115d3a565e3923a70d26d21611df23140c456b3b827b8868282187b49be2dc4ac9d1f50527a8812b23b
diff --git a/sci-mathematics/spass/metadata.xml b/sci-mathematics/spass/metadata.xml
new file mode 100644
index 000000000000..742f96e9a9c2
--- /dev/null
+++ b/sci-mathematics/spass/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gienah@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+SPASS: An Automated Theorem Prover for First-Order Logic with Equality.
+</longdescription>
+ <use>
+ <flag name="isabelle">Add integration support for the Isabelle/HOL
+ theorem prover.</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/spass/spass-3.7.ebuild b/sci-mathematics/spass/spass-3.7.ebuild
new file mode 100644
index 000000000000..6f16128d8a8c
--- /dev/null
+++ b/sci-mathematics/spass/spass-3.7.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit versionator
+
+MY_PV=$(delete_all_version_separators "${PV}")
+MY_P="${PN}${MY_PV}"
+
+DESCRIPTION="An Automated Theorem Prover for First-Order Logic with Equality"
+HOMEPAGE="http://www.spass-prover.org/"
+SRC_URI="http://www.spass-prover.org/download/sources/${MY_P}.tgz"
+
+LICENSE="BSD-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples isabelle"
+
+RDEPEND="isabelle? (
+ >=sci-mathematics/isabelle-2011.1-r1:=
+ )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/SPASS-${PV}"
+
+src_prepare() {
+ sed \
+ -e "s:-O3:${CFLAGS}:g" \
+ -i configure || die
+}
+
+src_install() {
+ default
+
+ if use examples; then
+ insinto /usr/share/${PN}/
+ doins -r examples
+ fi
+
+ if use isabelle; then
+ ewarn "All open source versions of spass are broken with Isabelle 2016.1"
+ ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)"
+ [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
+ dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ cat <<- EOF >> "${S}/settings"
+ SPASS_HOME="${ROOT}usr/bin"
+ SPASS_VERSION="${PV}"
+ EOF
+ insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ doins "${S}/settings"
+ fi
+}
+
+pkg_postinst() {
+ if use isabelle; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
+ sed -e "/contrib\/${PN}-[0-9.]*/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ cat <<- EOF >> "${ROOT}etc/isabelle/components"
+ contrib/${PN}-${PV}
+ EOF
+ fi
+ fi
+}
+
+pkg_postrm() {
+ if use isabelle; then
+ if [ ! -f "${ROOT}usr/bin/SPASS" ]; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ # Note: this sed should only match the version of this ebuild
+ # Which is what we want as we do not want to remove the line
+ # of a new spass being installed during an upgrade.
+ sed -e "/contrib\/${PN}-${PV}/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ fi
+ fi
+}
diff --git a/sci-mathematics/spass/spass-3.9.ebuild b/sci-mathematics/spass/spass-3.9.ebuild
new file mode 100644
index 000000000000..8fdbb7ebb633
--- /dev/null
+++ b/sci-mathematics/spass/spass-3.9.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+MY_PV=$(delete_all_version_separators "${PV}")
+MY_P="${PN}${MY_PV}"
+
+DESCRIPTION="An Automated Theorem Prover for First-Order Logic with Equality"
+HOMEPAGE="http://www.spass-prover.org/"
+SRC_URI="http://www.spass-prover.org/download/sources/${MY_P}.tgz"
+
+LICENSE="BSD-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="isabelle"
+
+RDEPEND="isabelle? (
+ sci-mathematics/isabelle:=
+ )"
+DEPEND="${RDEPEND}"
+
+src_unpack() {
+ mkdir -p "${P}" || die
+ cd "${S}" || die
+ unpack "${MY_P}.tgz"
+}
+
+src_compile() {
+ einfo "generating parsers"
+ bison -d -p pro_ -o proparser.c proparser.y || die
+ bison -d -p tptp_ -o tptpparser.c tptpparser.y || die
+ bison -d -p ia_ -o iaparser.c iaparser.y || die
+
+ einfo "generating lexers"
+ flex -Ppro_ -o proscanner.c proscanner.l || die
+ flex -Ptptp_ -o tptpscanner.c tptpscanner.l || die
+ flex -Pia_ -o iascanner.c iascanner.l || die
+
+ einfo "compiling sources"
+ local x
+ for x in *.c
+ do
+ $(tc-getCC) \
+ ${CPPFLAGS} ${CFLAGS} \
+ -c -o ${x/.c/.o} ${x} || die "compile ${x} failed"
+ done
+
+ einfo "linking tptp2dfg"
+ $(tc-getCC) \
+ ${LDFLAGS} -o tptp2dfg \
+ array.o clause.o cmdline.o context.o description.o dfg_diagnostic.o \
+ dfg_string_table.o dfg_token.o dfgparser.o dfglexer.o \
+ tptpparser.o tptpscanner.o eml.o flags.o foldfg.o hashmap.o kbo.o \
+ list.o memory.o misc.o order.o rpos.o sharing.o st.o stack.o \
+ strings.o subst.o symbol.o term.o unify.o tptp2dfg.o -lm \
+ || die "link tptp2dfg failed"
+
+ einfo "linking dfg2ascii"
+ $(tc-getCC) \
+ ${LDFLAGS} -o dfg2ascii \
+ array.o clause.o cmdline.o context.o description.o dfg_diagnostic.o \
+ dfg_string_table.o dfg_token.o dfgparser.o dfglexer.o \
+ tptpparser.o tptpscanner.o eml.o flags.o foldfg.o hashmap.o kbo.o \
+ list.o memory.o misc.o order.o rpos.o sharing.o st.o stack.o \
+ strings.o subst.o symbol.o term.o unify.o dfg2ascii.o -lm \
+ || die "link dfg2ascii failed"
+
+ einfo "linking dfg2dfg"
+ $(tc-getCC) \
+ ${LDFLAGS} -o dfg2dfg \
+ array.o clause.o cmdline.o context.o description.o dfg_diagnostic.o \
+ dfg_string_table.o dfg_token.o dfgparser.o dfglexer.o \
+ tptpparser.o tptpscanner.o eml.o flags.o foldfg.o hashmap.o kbo.o \
+ list.o memory.o misc.o order.o rpos.o sharing.o st.o stack.o \
+ strings.o subst.o symbol.o term.o unify.o approx.o dfg2dfg.o -lm \
+ || die "link dfg2dfg failed"
+
+ einfo "linking SPASS"
+ $(tc-getCC) \
+ ${LDFLAGS} -o SPASS \
+ array.o clause.o cmdline.o context.o description.o dfg_diagnostic.o \
+ dfg_string_table.o dfg_token.o dfgparser.o dfglexer.o \
+ tptpparser.o tptpscanner.o eml.o flags.o foldfg.o hashmap.o kbo.o \
+ list.o memory.o misc.o order.o rpos.o sharing.o st.o stack.o \
+ strings.o subst.o symbol.o term.o unify.o analyze.o clock.o \
+ closure.o cnf.o component.o condensing.o defs.o doc-proof.o graph.o \
+ hash.o hasharray.o iaparser.o iascanner.o partition.o proofcheck.o \
+ ras.o renaming.o resolution.o rules-inf.o rules-red.o rules-sort.o \
+ rules-split.o rules-ur.o search.o sort.o subsumption.o table.o \
+ tableau.o terminator.o top.o vector.o -lm \
+ || die "link SPASS failed"
+}
+
+src_install() {
+ exeinto /usr/bin
+ local x
+ for x in tptp2dfg dfg2ascii dfg2dfg SPASS
+ do
+ doexe ${x}
+ done
+
+ if use isabelle; then
+ ewarn "All open source versions of spass are broken with Isabelle 2016.1"
+ ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)"
+ [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty"
+ dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ cat <<- EOF >> "${S}/settings"
+ SPASS_HOME="${ROOT}usr/bin"
+ SPASS_VERSION="${PV}"
+ EOF
+ insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ doins "${S}/settings"
+ fi
+}
+
+pkg_postinst() {
+ if use isabelle; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
+ sed -e "/contrib\/${PN}-[0-9.]*/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ cat <<- EOF >> "${ROOT}etc/isabelle/components"
+ contrib/${PN}-${PV}
+ EOF
+ fi
+ fi
+}
+
+pkg_postrm() {
+ if use isabelle; then
+ if [ ! -f "${ROOT}usr/bin/SPASS" ]; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ # Note: this sed should only match the version of this ebuild
+ # Which is what we want as we do not want to remove the line
+ # of a new spass being installed during an upgrade.
+ sed -e "/contrib\/${PN}-${PV}/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ fi
+ fi
+}
diff --git a/sci-mathematics/spin/Manifest b/sci-mathematics/spin/Manifest
new file mode 100644
index 000000000000..5fa98a0f8888
--- /dev/null
+++ b/sci-mathematics/spin/Manifest
@@ -0,0 +1,14 @@
+AUX spin-6.2.1-makefile.patch 756 SHA256 befb05f5c54b6099399a0e125f79caa95be38f985deaaddb0e4012d4e47d5db5 SHA512 6547515ca8bfe7eba22eb8d6eb671e19f41abe83cdcf09c0b7ca3d6f3edb79f585d872c469ce7aeab502403f6264b0750c254589a73c3464dfb91cb4174a72f7 WHIRLPOOL 3bdd9a4fdcf0347f9e2abdeb9a4893ef75c0c1c25fa7c2318bc5f36bf93f34363f0f7cf7a0108f295f63358a306eccca4e3ee3858adc24f06e7a7dfa540904fd
+AUX spin-6.2.5-makefile.patch 582 SHA256 77513dbb60e806122b64ccbe178881569cc229a8c88755552f6992476e203fef SHA512 86ca1ea14d43e167540851c2faa3e6bda7f4cc10d6c48179a24045fa9f3da858a13dbc2ea1c06742a38728cd632489cc349f39285c9db5f9bf3963d038bbc015 WHIRLPOOL 295362e94618ea645365d891be55da8ea013150003f26e940b915ed076584eff87432945bc69c7a48dc0f38967347706cccd7d1e89f1212379702b173f5e7d6b
+AUX spin-6.4.5-makefile.patch 620 SHA256 41d5dc3eb7249141c04407c22f2fd602508b5eae712eb4493c642c1f6ad44cc9 SHA512 47b72f5cda3275f62a291870e3683fb3f29f3eeab2d251336777d9a2c814b6be436bcbe59a8d98c0f4f32d7b0a9a2961f34c436d6f265d8a2474258fd9c0d6ee WHIRLPOOL 466386b579f5eb5d09fba494f6d7bc0d6d94ba59c58793c5465524d30938b92bb3ffb6f433eb379a5c819000d37d4a49aec78606c28c008ba4add318b5ea3b54
+DIST spin621.tar.gz 463101 SHA256 2b3a9163e1bce4cb6402550819f6e190449e0e5aeb7b81630a017e130f7921cb SHA512 b10a306bc48b964f8fefec07ee9745ae62faee8af3a62d4f7cc24ee808f69cbc7705b9f33782f76dd28e3ab7a5eeb645759763edc702bf8cb81645ddf3f796b7 WHIRLPOOL 13bb5f820167248857c97ce4e05ab7411f4209da69edc5391aa18ef905825794f1db2d5fb933f4bb2e9b332638b7be8de2bd27b338c4b36314a4cac874a92ba8
+DIST spin623.tar.gz 465637 SHA256 a056a7d360c4ab0322e5e8d09c6a0f23178b2ad471413e208136c5a29f1650ec SHA512 7a4faeee95a8c10b6a875e6bbfe6fdab91f982401601cd33d2701a8001ee27aa21738fe10e01720505b54f9b1369e0e79ae19bdf7909b0ef23bc49f70d76992b WHIRLPOOL 7bb4450313037c65ba0326b3261584592950060fdc28de6bb968958ed7f75976ee45d72499970a08e44021a71d70c2aa61f12072d5a1be266f07968a17db0890
+DIST spin625.tar.gz 468314 SHA256 3273c15af419912b00f1a3b9683af8f516a6a2afae788a575006d5fee0ecf330 SHA512 1679fb52981da762f6a5955116bfa0906bf12de7a219319fedf7ba068ba0c2ad51aa6a49d3b30115391f7070c7169c7c0753a23ef95257d350a9160e2d1f3ded WHIRLPOOL 6d4743449b28f0bd132fe69ea37160c4cce258d020883297f76df34e01e1acaf236c420f2aca600994d310d029051cc0bb2378237efa11903695018144c02733
+DIST spin645.tar.gz 672549 SHA256 44081282eb63cd9df763ebbcf8bad19dbeefecbebf8ac2cc090ea92e2ab71875 SHA512 77bc35bb852c0448915c655bf11910d0b226d30d66abaa63311e6227de03f920ca026e7399cbeebdae631368fd8091f1e8330bd3094bd4febdf7d5c7a81834ad WHIRLPOOL 15fb07d6c0dac8d054cefe2810588ece60bf67bbb920f6ee8800b391b00fbf93d7f7f21988ac7dd84aa644a88a27524af8462fbb4cec438eaee11159683ce2af
+EBUILD spin-6.2.1.ebuild 864 SHA256 ecaccd52a77ad779c970c168b91969660aa970ddbf9c0e5b7ac36c9f6d9f3933 SHA512 2e206f5e656ec31232ae772e2a3051ba8d3e3a14adccd9299f5696baae39f8cead5cd6551300cb4568091271a1f35a8f38f4593ed659e3f50559a737f0caa704 WHIRLPOOL 60de72ce101c4b360f2cad5335248e2372d4fcb388800ea26196c9627f234e3756fafe15bc36a9375b742c321839864b260b395993811ac6ecfdf32db824a513
+EBUILD spin-6.2.3.ebuild 922 SHA256 5fd76149a770f42484cec1dceeccf54d4c3b68ca351bf5450fa42e533476b1f6 SHA512 71136d3b976fc2ebcfaf3f487eb6a475f462736f13f531468ab8c0d7628720e7c41f9690c238523a27aacfed0adcc064659dea8420d9687cc0ee84a8d70940b4 WHIRLPOOL f0dfcd91b3458640e5b9cc00860466e9323cd5043ab8a255f6ad6e2fd421c2fa8c304522a028d88b162f4cb30aa82a1e11626ef6b72af77321e358eaf1ef6177
+EBUILD spin-6.2.5.ebuild 922 SHA256 7d28b4ed9ea50666a75ad5a1f63fcd9ce212ecdcace2e09d6956495346f7921c SHA512 caca36574e1cadc64f3fed7b8685a35133427b3726c71ade3e0cf4164d78ba0bd91331d8d83565e3f59f05e7fa57ea87c231cd8d62c0308c211eee95fbf6c42e WHIRLPOOL b746c0cc16ae941d75e4072ec875992051100740d3a862ddcf5a3c79b1abe9b0427586c3fa36767a6dab8eeb5b5cdb8feff2393df95de08d88949656cf195bef
+EBUILD spin-6.4.5.ebuild 886 SHA256 021c002032a1dbf69baca49add464073118df8386f24b23131757bf4d30578ab SHA512 4882c4aefde1633d067d15114166d010d442704d66bba585134b8e3f55158933f3960221bc12aeed47a14d81982edde196e79511586a6d6c9eb7058110b2f0b4 WHIRLPOOL c3816cfe9b3d26a3447f15d32eba20ea783388ea4a63aa219588e761f9e5bc259b20e940c4b371a0a597a214cf07c87bb59dee26d127a62ff47590759ea8ac38
+MISC ChangeLog 2596 SHA256 fe1da60539c5cafd4b59bd5e07eed5acca63dc0d272e25f735e2eef254f15dc9 SHA512 4d6e18a324268a0449f6c605b102ace20596de2474ddf2b962363a3e934300faa62ae198c22b959bc3d03f313ed2f3c82dc784165e33c456219b1a61115ea47f WHIRLPOOL ee871ee4a09c877e0f19861a784f398ec385c00d71f59af80b8383fd953f834dadf55ca953446092b0422d65bb024318db870ccf0a6cb59fcc73c27758f1fda9
+MISC ChangeLog-2015 2256 SHA256 1c727c470381cc456f5b417c6be6fc9dc8faac13443f9f3b83cee9e0c612d5b2 SHA512 199e51c5f00fe78e9853bcaa47c6bf767d872051b8d18a11f6ad45cda3a60f8d8b036acf1a124928fdd89cf3442555d411c027e70c8f69f911cddc90bbdea54a WHIRLPOOL 77ce8e9ed59266c35f516b1ebe07651f56fffd53ea29d04f0deb6adc968c724fd445e905d6a8432ed67e09127ba49cc620158d9d7afe343bfdb195b25583a27d
+MISC metadata.xml 167 SHA256 5fe493e76bba84455c54b3a46adfae5a1bfe01c764ef0d9e5f6d3e8a1d142188 SHA512 7c8decb24ee3a850e38186cf3c7f8933a28017426806870ad6ef9ceb2533be147a2681fc789b535a81cb528af8c29d90d3006e4f250aee23bd7dea4561294e33 WHIRLPOOL dc6c3dfc7fd7f0d76c97f0786cb76a55b8564f8437f96d4ccebf985817b9f6dcc4c61830aa5df80d725e4a54b281ea2e03d6b0859214af081112cba15025e64b
diff --git a/sci-mathematics/spin/files/spin-6.2.1-makefile.patch b/sci-mathematics/spin/files/spin-6.2.1-makefile.patch
new file mode 100644
index 000000000000..9133f54f9fac
--- /dev/null
+++ b/sci-mathematics/spin/files/spin-6.2.1-makefile.patch
@@ -0,0 +1,21 @@
+--- makefile.orig 2012-05-21 14:59:56.000000000 +0200
++++ makefile 2012-05-21 15:00:47.000000000 +0200
+@@ -13,9 +13,6 @@
+
+ # see also ./make_pc for a simpler script, not requiring make
+
+-CC=gcc
+-CFLAGS=-O2 -DNXT # on some systems add: -I/usr/include
+-
+ # CC=gcc -m32 # 32bit compilation on a 64bit system
+ # for a more picky compilation use gcc-4 and:
+ # CFLAGS=-std=c99 -Wstrict-prototypes -pedantic -fno-strength-reduce -fno-builtin -W -Wshadow -Wpointer-arith -Wcast-qual -Winline -Wall -g -DNXT -DPC
+@@ -43,7 +40,7 @@
+ tl_mem.o tl_rewrt.o tl_cache.o
+
+ spin: $(SPIN_OS) $(TL_OS) spin.o
+- $(CC) $(CFLAGS) -o spin spin.o $(SPIN_OS) $(TL_OS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o spin spin.o $(SPIN_OS) $(TL_OS)
+
+ spin.o: spin.y
+ $(YACC) $(YFLAGS) spin.y
diff --git a/sci-mathematics/spin/files/spin-6.2.5-makefile.patch b/sci-mathematics/spin/files/spin-6.2.5-makefile.patch
new file mode 100644
index 000000000000..585e78b6f550
--- /dev/null
+++ b/sci-mathematics/spin/files/spin-6.2.5-makefile.patch
@@ -0,0 +1,21 @@
+--- makefile.orig 2013-05-05 01:21:02.000000000 +0200
++++ makefile 2013-11-18 01:07:20.000000000 +0100
+@@ -13,9 +13,6 @@
+
+ # see also ./make_pc for a simpler script, not requiring make
+
+-CC=gcc
+-CFLAGS=-O2 -DNXT # on some systems add: -I/usr/include
+-
+ # CFLAGS=-g -O2 -DNXT
+
+ # CC=gcc -m32 # 32bit compilation on a 64bit system
+@@ -45,7 +42,7 @@
+ tl_mem.o tl_rewrt.o tl_cache.o
+
+ spin: $(SPIN_OS) $(TL_OS) spin.o
+- $(CC) $(CFLAGS) -o spin spin.o $(SPIN_OS) $(TL_OS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o spin spin.o $(SPIN_OS) $(TL_OS)
+
+ spin.o: spin.y
+ $(YACC) $(YFLAGS) spin.y
diff --git a/sci-mathematics/spin/files/spin-6.4.5-makefile.patch b/sci-mathematics/spin/files/spin-6.4.5-makefile.patch
new file mode 100644
index 000000000000..64b76ec484f0
--- /dev/null
+++ b/sci-mathematics/spin/files/spin-6.4.5-makefile.patch
@@ -0,0 +1,20 @@
+--- makefile.orig 2016-01-09 12:51:10.260008241 +0100
++++ makefile 2016-01-09 12:52:04.666673549 +0100
+@@ -7,8 +7,6 @@
+ # see also ./make_pc for a simpler script not requiring make
+ # for 32-bit compilation, use ./make32
+
+-CC=gcc
+-CFLAGS=-O2 -DNXT # on some systems add: -I/usr/include
+ # on a PC: add -DPC
+ # on Solaris: add -DSOLARIS
+ # on a Mac: add -DMAC
+@@ -37,7 +35,7 @@
+ tl_mem.o tl_rewrt.o tl_cache.o
+
+ spin: $(SPIN_OS) $(TL_OS) spin.o
+- $(CC) $(CFLAGS) -o spin spin.o $(SPIN_OS) $(TL_OS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o spin spin.o $(SPIN_OS) $(TL_OS)
+
+ install: spin
+ cp spin /usr/local/bin
diff --git a/sci-mathematics/spin/metadata.xml b/sci-mathematics/spin/metadata.xml
new file mode 100644
index 000000000000..7a38bb900964
--- /dev/null
+++ b/sci-mathematics/spin/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/sci-mathematics/spin/spin-6.2.1.ebuild b/sci-mathematics/spin/spin-6.2.1.ebuild
new file mode 100644
index 000000000000..201885a95b4b
--- /dev/null
+++ b/sci-mathematics/spin/spin-6.2.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils versionator
+
+MY_PV=$(replace_all_version_separators '')
+MY_P="${PN}${MY_PV}"
+
+DESCRIPTION="Tool for formal verification of distributed software systems"
+HOMEPAGE="http://spinroot.com/"
+SRC_URI="http://spinroot.com/spin/Src/${MY_P}.tar.gz"
+
+LICENSE="|| ( spin-commercial spin-educational )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="graphviz tk"
+
+DEPEND="sys-devel/bison"
+RDEPEND="sys-devel/gcc
+ sys-process/time
+ tk? (
+ dev-lang/tk
+ graphviz? ( media-gfx/graphviz )
+ )"
+
+S="${WORKDIR}/Spin/Src${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-6.2.1-makefile.patch"
+}
+
+src_install() {
+ dobin spin
+ doman ../Man/spin.1
+ dodoc ../Doc/*
+ if use tk; then
+ newbin "${WORKDIR}/Spin/iSpin/ispin.tcl" ispin
+ make_desktop_entry ispin
+ fi
+}
diff --git a/sci-mathematics/spin/spin-6.2.3.ebuild b/sci-mathematics/spin/spin-6.2.3.ebuild
new file mode 100644
index 000000000000..906dd06fff9a
--- /dev/null
+++ b/sci-mathematics/spin/spin-6.2.3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs versionator
+
+MY_PV=$(replace_all_version_separators '')
+MY_P="${PN}${MY_PV}"
+
+DESCRIPTION="Tool for formal verification of distributed software systems"
+HOMEPAGE="http://spinroot.com/"
+SRC_URI="http://spinroot.com/spin/Src/${MY_P}.tar.gz"
+
+LICENSE="|| ( spin-commercial spin-educational )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="graphviz tk"
+
+DEPEND="sys-devel/bison"
+RDEPEND="sys-devel/gcc
+ sys-process/time
+ tk? (
+ dev-lang/tk
+ graphviz? ( media-gfx/graphviz )
+ )"
+
+S="${WORKDIR}/Spin/Src${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-6.2.1-makefile.patch"
+}
+
+src_compile() {
+ tc-export CC
+ default
+}
+
+src_install() {
+ dobin spin
+ doman ../Man/spin.1
+ dodoc ../Doc/*
+ if use tk; then
+ newbin "${WORKDIR}/Spin/iSpin/ispin.tcl" ispin
+ make_desktop_entry ispin
+ fi
+}
diff --git a/sci-mathematics/spin/spin-6.2.5.ebuild b/sci-mathematics/spin/spin-6.2.5.ebuild
new file mode 100644
index 000000000000..435fb87b5c15
--- /dev/null
+++ b/sci-mathematics/spin/spin-6.2.5.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs versionator
+
+MY_PV=$(replace_all_version_separators '')
+MY_P="${PN}${MY_PV}"
+
+DESCRIPTION="Tool for formal verification of distributed software systems"
+HOMEPAGE="http://spinroot.com/"
+SRC_URI="http://spinroot.com/spin/Src/${MY_P}.tar.gz"
+
+LICENSE="|| ( spin-commercial spin-educational )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="graphviz tk"
+
+DEPEND="sys-devel/bison"
+RDEPEND="sys-devel/gcc
+ sys-process/time
+ tk? (
+ dev-lang/tk
+ graphviz? ( media-gfx/graphviz )
+ )"
+
+S="${WORKDIR}/Spin/Src${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-6.2.5-makefile.patch"
+}
+
+src_compile() {
+ tc-export CC
+ default
+}
+
+src_install() {
+ dobin spin
+ doman ../Man/spin.1
+ dodoc ../Doc/*
+ if use tk; then
+ newbin "${WORKDIR}/Spin/iSpin/ispin.tcl" ispin
+ make_desktop_entry ispin
+ fi
+}
diff --git a/sci-mathematics/spin/spin-6.4.5.ebuild b/sci-mathematics/spin/spin-6.4.5.ebuild
new file mode 100644
index 000000000000..2d78f62dd3c0
--- /dev/null
+++ b/sci-mathematics/spin/spin-6.4.5.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs versionator
+
+MY_PV=$(replace_all_version_separators '')
+MY_P="${PN}${MY_PV}"
+
+DESCRIPTION="Tool for formal verification of distributed software systems"
+HOMEPAGE="http://spinroot.com/"
+SRC_URI="http://spinroot.com/spin/Src/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="graphviz tk"
+
+DEPEND="sys-devel/bison"
+RDEPEND="sys-devel/gcc
+ sys-process/time
+ tk? (
+ dev-lang/tk
+ graphviz? ( media-gfx/graphviz )
+ )"
+
+S="${WORKDIR}/Spin/Src${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-6.4.5-makefile.patch"
+}
+
+src_compile() {
+ tc-export CC
+ default
+}
+
+src_install() {
+ dobin spin
+ doman ../Man/spin.1
+ dodoc ../Doc/*
+ if use tk; then
+ newbin "${WORKDIR}/Spin/iSpin/ispin.tcl" ispin
+ make_desktop_entry ispin
+ fi
+}
diff --git a/sci-mathematics/topcom/Manifest b/sci-mathematics/topcom/Manifest
new file mode 100644
index 000000000000..1c450f38636c
--- /dev/null
+++ b/sci-mathematics/topcom/Manifest
@@ -0,0 +1,7 @@
+AUX topcom-0.17.7-buildsystem.patch 16106 SHA256 74e7f37d68152e03875bbbdc67fa5b6a6649e671ea4f27b482f0e923fa9d2cd7 SHA512 a9fc6a067537f85b437e8a3de17cae8ad1cf96848832bc493ade869be9d4621193ec40752d5f80a5244768fe121a53bde97e606e04ede6f602228d244cf312e6 WHIRLPOOL 1dd57ad98a2e43bb7ad71a81c46d085e816951c82ceaff6abbab0b4e2ba1626a1926e232fadb8c471f54a5000c0bf1983a4e3e9f94df1a7792d127b083839090
+DIST TOPCOM-0.17.7.tar.gz 8661519 SHA256 a22be891225589790fb42d618c1c9657d221914612d4567eaeaaf5d6145667c4 SHA512 528e566e488641e078a8c9150f88a1544f607e6859da1d95a98dc5890c5a52882f8c8790097c3a77277066bd5d4c10a1e0a9c131fbc521f56f6139eeab7e21d1 WHIRLPOOL 1857c43d534aa04c15b02a4d5b378402a7e6c0a456f7be1a3c27f37dbd3938e1ca7aa3b645e56b1b57da8bedc58067a13127b5782e1025bb502be1b864b9295c
+DIST TOPCOM-manual.html 19251 SHA256 b1c3b326044fdb512264fa2bde6fa10962fd276d43fcab71cb0dc8778378608e SHA512 5d0303f141bce12e0354c2fb65420102aa198e2271c0e901621f850b47f9cf9642659b0cf8e9bcc7a6da3b39914c20e47c67e72aa9cf999892f80855daa25c67 WHIRLPOOL cf8da6b8fb7834730d755ba626903547e02864ea7da98be2e08fb9dafb10ef4503340eac3999915d562768ce2aaa07d38088b8b14c6be810681f6ed229f9d7c3
+EBUILD topcom-0.17.7.ebuild 1193 SHA256 40f835a1b47fed81892bf5e01ec6fb3eeb1474f895a1642768f76b8828a4faab SHA512 c65b30b4721c1044e5df58c98b046817ab64d076533be809209e69c90422ac195a57233bc8bddd1b4beaf4d6732042bd1ccb161ec793c57aaf2eedd146ed5f5f WHIRLPOOL 8842cb909c4140f93162374e0ed5e5cffb546c22c5cf9a79d2830cee73dddf51eca977a7482c44af8325ddf4f36620bb86bb60ea3b56a4e68e6f2c5478c25e90
+MISC ChangeLog 2958 SHA256 50e4f5b75e3206be5121084487ac5dd67a5ef6bed26ed48cbb2150c8965f717d SHA512 50031adf49603156f9a7ed99b8a7eb0ca12737ec2252afc5c11ebce311f8e7bd096bacffaa93fd7fee665a393d80ef55769246aa9d36bbdca3b3820f5bd0f61d WHIRLPOOL 0d2f6eb8bb0b960528f6b45ca00ad70a0a3277d22a30a8826ef127be6cca0a5876bc3d76eafee3769d9464365fd5c01670ac5862e572229fbb9640bb1cd5301e
+MISC ChangeLog-2015 993 SHA256 d6abb9f3d9c46f88b8c7ad9e8f0352aa555fa0d586749f8da669fbf2e0d9c00a SHA512 649b87a215526dc609fe3563c82551161729a1718baa531297070b310e22393cfecb77e70f794930abe9f5b72221ed312b9fae9cb23dc758e44cf0cce053411f WHIRLPOOL 3d9c033f47081a7155ee0be533892bb57dbd31ff2aaa36af0bdf00bb9e67c436f29d0394d7090caa3688fcc295e1ae797ab64e3abc1b281fb356f561c8f01a1f
+MISC metadata.xml 412 SHA256 e94119828180b805026e7c598bad2f5110ea4f363ed0277d45b523908c9361e3 SHA512 bbbdf7eefc5eb987cdea30dfd1003ea2ffd89ddc6ca94f03e655dbabed0d7d18ffd88a5d1e429587c1d4f1fb9fd148c0d83ebe7bb7ad6b3d6f198f64e9abc3d2 WHIRLPOOL daff3a037e11b5be9bfddb38b8afc7f8f77608a795035d1147653bb32b4439ade7fba6623415cdaca15045b2360398e60037d74a4c809fb304727ff138d417e2
diff --git a/sci-mathematics/topcom/files/topcom-0.17.7-buildsystem.patch b/sci-mathematics/topcom/files/topcom-0.17.7-buildsystem.patch
new file mode 100644
index 000000000000..154ccd0382b8
--- /dev/null
+++ b/sci-mathematics/topcom/files/topcom-0.17.7-buildsystem.patch
@@ -0,0 +1,327 @@
+diff -U 3 -dHrN topcom-0.17.7.orig/src/Makefile.in topcom-0.17.7/src/Makefile.in
+--- topcom-0.17.7.orig/src/Makefile.in 2016-07-08 12:46:13.000000000 +0200
++++ topcom-0.17.7/src/Makefile.in 2016-09-25 20:22:51.729578197 +0200
+@@ -119,249 +119,206 @@
+ am_B_A_OBJECTS = B_A.$(OBJEXT)
+ B_A_OBJECTS = $(am_B_A_OBJECTS)
+ B_A_LDADD = $(LDADD)
+-B_A_DEPENDENCIES = ../lib-src/libTOPCOM.a ../lib-src-reg/libCHECKREG.a \
+- ../external/lib/libcddgmp.a ../external/lib/libgmpxx.a \
+- ../external/lib/libgmp.a
++B_A_DEPENDENCIES = ../lib-src/libTOPCOM.a ../lib-src-reg/libCHECKREG.a
+ am_B_A_center_OBJECTS = B_A_center.$(OBJEXT)
+ B_A_center_OBJECTS = $(am_B_A_center_OBJECTS)
+ B_A_center_LDADD = $(LDADD)
+ B_A_center_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_B_D_OBJECTS = B_D.$(OBJEXT)
+ B_D_OBJECTS = $(am_B_D_OBJECTS)
+ B_D_LDADD = $(LDADD)
+-B_D_DEPENDENCIES = ../lib-src/libTOPCOM.a ../lib-src-reg/libCHECKREG.a \
+- ../external/lib/libcddgmp.a ../external/lib/libgmpxx.a \
+- ../external/lib/libgmp.a
++B_D_DEPENDENCIES = ../lib-src/libTOPCOM.a ../lib-src-reg/libCHECKREG.a
+ am_chiro2allfinetriangs_OBJECTS = chiro2allfinetriangs.$(OBJEXT)
+ chiro2allfinetriangs_OBJECTS = $(am_chiro2allfinetriangs_OBJECTS)
+ chiro2allfinetriangs_LDADD = $(LDADD)
+ chiro2allfinetriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_chiro2alltriangs_OBJECTS = chiro2alltriangs.$(OBJEXT)
+ chiro2alltriangs_OBJECTS = $(am_chiro2alltriangs_OBJECTS)
+ chiro2alltriangs_LDADD = $(LDADD)
+ chiro2alltriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_chiro2circuits_OBJECTS = chiro2circuits.$(OBJEXT)
+ chiro2circuits_OBJECTS = $(am_chiro2circuits_OBJECTS)
+ chiro2circuits_LDADD = $(LDADD)
+ chiro2circuits_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_chiro2cocircuits_OBJECTS = chiro2cocircuits.$(OBJEXT)
+ chiro2cocircuits_OBJECTS = $(am_chiro2cocircuits_OBJECTS)
+ chiro2cocircuits_LDADD = $(LDADD)
+ chiro2cocircuits_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_chiro2dual_OBJECTS = chiro2dual.$(OBJEXT)
+ chiro2dual_OBJECTS = $(am_chiro2dual_OBJECTS)
+ chiro2dual_LDADD = $(LDADD)
+ chiro2dual_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_chiro2finetriang_OBJECTS = chiro2finetriang.$(OBJEXT)
+ chiro2finetriang_OBJECTS = $(am_chiro2finetriang_OBJECTS)
+ chiro2finetriang_LDADD = $(LDADD)
+ chiro2finetriang_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_chiro2finetriangs_OBJECTS = chiro2finetriangs.$(OBJEXT)
+ chiro2finetriangs_OBJECTS = $(am_chiro2finetriangs_OBJECTS)
+ chiro2finetriangs_LDADD = $(LDADD)
+ chiro2finetriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_chiro2mintriang_OBJECTS = chiro2mintriang.$(OBJEXT)
+ chiro2mintriang_OBJECTS = $(am_chiro2mintriang_OBJECTS)
+ chiro2mintriang_LDADD = $(LDADD)
+ chiro2mintriang_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_chiro2nallfinetriangs_OBJECTS = chiro2nallfinetriangs.$(OBJEXT)
+ chiro2nallfinetriangs_OBJECTS = $(am_chiro2nallfinetriangs_OBJECTS)
+ chiro2nallfinetriangs_LDADD = $(LDADD)
+ chiro2nallfinetriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_chiro2nalltriangs_OBJECTS = chiro2nalltriangs.$(OBJEXT)
+ chiro2nalltriangs_OBJECTS = $(am_chiro2nalltriangs_OBJECTS)
+ chiro2nalltriangs_LDADD = $(LDADD)
+ chiro2nalltriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_chiro2nfinetriangs_OBJECTS = chiro2nfinetriangs.$(OBJEXT)
+ chiro2nfinetriangs_OBJECTS = $(am_chiro2nfinetriangs_OBJECTS)
+ chiro2nfinetriangs_LDADD = $(LDADD)
+ chiro2nfinetriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_chiro2ntriangs_OBJECTS = chiro2ntriangs.$(OBJEXT)
+ chiro2ntriangs_OBJECTS = $(am_chiro2ntriangs_OBJECTS)
+ chiro2ntriangs_LDADD = $(LDADD)
+ chiro2ntriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_chiro2placingtriang_OBJECTS = chiro2placingtriang.$(OBJEXT)
+ chiro2placingtriang_OBJECTS = $(am_chiro2placingtriang_OBJECTS)
+ chiro2placingtriang_LDADD = $(LDADD)
+ chiro2placingtriang_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_chiro2triangs_OBJECTS = chiro2triangs.$(OBJEXT)
+ chiro2triangs_OBJECTS = $(am_chiro2triangs_OBJECTS)
+ chiro2triangs_LDADD = $(LDADD)
+ chiro2triangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_cocircuits2facets_OBJECTS = cocircuits2facets.$(OBJEXT)
+ cocircuits2facets_OBJECTS = $(am_cocircuits2facets_OBJECTS)
+ cocircuits2facets_LDADD = $(LDADD)
+ cocircuits2facets_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_cross_OBJECTS = cross.$(OBJEXT)
+ cross_OBJECTS = $(am_cross_OBJECTS)
+ cross_LDADD = $(LDADD)
+ cross_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_cube_OBJECTS = cube.$(OBJEXT)
+ cube_OBJECTS = $(am_cube_OBJECTS)
+ cube_LDADD = $(LDADD)
+ cube_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_cyclic_OBJECTS = cyclic.$(OBJEXT)
+ cyclic_OBJECTS = $(am_cyclic_OBJECTS)
+ cyclic_LDADD = $(LDADD)
+ cyclic_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_hypersimplex_OBJECTS = hypersimplex.$(OBJEXT)
+ hypersimplex_OBJECTS = $(am_hypersimplex_OBJECTS)
+ hypersimplex_LDADD = $(LDADD)
+ hypersimplex_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_lattice_OBJECTS = lattice.$(OBJEXT)
+ lattice_OBJECTS = $(am_lattice_OBJECTS)
+ lattice_LDADD = $(LDADD)
+ lattice_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2allfinetriangs_OBJECTS = points2allfinetriangs.$(OBJEXT)
+ points2allfinetriangs_OBJECTS = $(am_points2allfinetriangs_OBJECTS)
+ points2allfinetriangs_LDADD = $(LDADD)
+ points2allfinetriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2alltriangs_OBJECTS = points2alltriangs.$(OBJEXT)
+ points2alltriangs_OBJECTS = $(am_points2alltriangs_OBJECTS)
+ points2alltriangs_LDADD = $(LDADD)
+ points2alltriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2chiro_OBJECTS = points2chiro.$(OBJEXT)
+ points2chiro_OBJECTS = $(am_points2chiro_OBJECTS)
+ points2chiro_LDADD = $(LDADD)
+ points2chiro_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2facets_OBJECTS = points2facets.$(OBJEXT)
+ points2facets_OBJECTS = $(am_points2facets_OBJECTS)
+ points2facets_LDADD = $(LDADD)
+ points2facets_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2finetriang_OBJECTS = points2finetriang.$(OBJEXT)
+ points2finetriang_OBJECTS = $(am_points2finetriang_OBJECTS)
+ points2finetriang_LDADD = $(LDADD)
+ points2finetriang_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2finetriangs_OBJECTS = points2finetriangs.$(OBJEXT)
+ points2finetriangs_OBJECTS = $(am_points2finetriangs_OBJECTS)
+ points2finetriangs_LDADD = $(LDADD)
+ points2finetriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2flips_OBJECTS = points2flips.$(OBJEXT)
+ points2flips_OBJECTS = $(am_points2flips_OBJECTS)
+ points2flips_LDADD = $(LDADD)
+ points2flips_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2nallfinetriangs_OBJECTS = points2nallfinetriangs.$(OBJEXT)
+ points2nallfinetriangs_OBJECTS = $(am_points2nallfinetriangs_OBJECTS)
+ points2nallfinetriangs_LDADD = $(LDADD)
+ points2nallfinetriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2nalltriangs_OBJECTS = points2nalltriangs.$(OBJEXT)
+ points2nalltriangs_OBJECTS = $(am_points2nalltriangs_OBJECTS)
+ points2nalltriangs_LDADD = $(LDADD)
+ points2nalltriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2nfinetriangs_OBJECTS = points2nfinetriangs.$(OBJEXT)
+ points2nfinetriangs_OBJECTS = $(am_points2nfinetriangs_OBJECTS)
+ points2nfinetriangs_LDADD = $(LDADD)
+ points2nfinetriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2nflips_OBJECTS = points2nflips.$(OBJEXT)
+ points2nflips_OBJECTS = $(am_points2nflips_OBJECTS)
+ points2nflips_LDADD = $(LDADD)
+ points2nflips_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2ntriangs_OBJECTS = points2ntriangs.$(OBJEXT)
+ points2ntriangs_OBJECTS = $(am_points2ntriangs_OBJECTS)
+ points2ntriangs_LDADD = $(LDADD)
+ points2ntriangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2placingtriang_OBJECTS = points2placingtriang.$(OBJEXT)
+ points2placingtriang_OBJECTS = $(am_points2placingtriang_OBJECTS)
+ points2placingtriang_LDADD = $(LDADD)
+ points2placingtriang_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2triangs_OBJECTS = points2triangs.$(OBJEXT)
+ points2triangs_OBJECTS = $(am_points2triangs_OBJECTS)
+ points2triangs_LDADD = $(LDADD)
+ points2triangs_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_points2volume_OBJECTS = points2volume.$(OBJEXT)
+ points2volume_OBJECTS = $(am_points2volume_OBJECTS)
+ points2volume_LDADD = $(LDADD)
+ points2volume_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_santos_22_triang_OBJECTS = santos_22_triang.$(OBJEXT)
+ santos_22_triang_OBJECTS = $(am_santos_22_triang_OBJECTS)
+ santos_22_triang_LDADD = $(LDADD)
+ santos_22_triang_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_santos_dim4_triang_OBJECTS = santos_dim4_triang.$(OBJEXT)
+ santos_dim4_triang_OBJECTS = $(am_santos_dim4_triang_OBJECTS)
+ santos_dim4_triang_LDADD = $(LDADD)
+ santos_dim4_triang_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ am_santos_triang_OBJECTS = santos_triang.$(OBJEXT)
+ santos_triang_OBJECTS = $(am_santos_triang_OBJECTS)
+ santos_triang_LDADD = $(LDADD)
+ santos_triang_DEPENDENCIES = ../lib-src/libTOPCOM.a \
+- ../lib-src-reg/libCHECKREG.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src-reg/libCHECKREG.a
+ AM_V_P = $(am__v_P_@AM_V@)
+ am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+ am__v_P_0 = false
+@@ -591,9 +548,6 @@
+ santos_22_triang_SOURCES = santos_22_triang.cc
+ LDADD = ../lib-src/libTOPCOM.a \
+ ../lib-src-reg/libCHECKREG.a \
+- ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a \
+- ../external/lib/libgmp.a
+
+ AM_CPPFLAGS = -I../lib-src -I../lib-src-reg -I../wrap-gmp-gmpxx \
+ -I../external/include -I$(includedir) -DVERBOSE -DGMPRATIONAL \
+diff -U 3 -dHrN topcom-0.17.7.orig/src-reg/Makefile.in topcom-0.17.7/src-reg/Makefile.in
+--- topcom-0.17.7.orig/src-reg/Makefile.in 2016-07-08 12:46:13.000000000 +0200
++++ topcom-0.17.7/src-reg/Makefile.in 2016-09-25 20:19:04.062645737 +0200
+@@ -102,8 +102,7 @@
+ checkregularity_OBJECTS = $(am_checkregularity_OBJECTS)
+ checkregularity_LDADD = $(LDADD)
+ checkregularity_DEPENDENCIES = ../lib-src-reg/libCHECKREG.a \
+- ../lib-src/libTOPCOM.a ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a ../external/lib/libgmp.a
++ ../lib-src/libTOPCOM.a
+ AM_V_P = $(am__v_P_@AM_V@)
+ am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+ am__v_P_0 = false
+@@ -257,9 +256,6 @@
+ checkregularity_SOURCES = checkregularity.cc
+ LDADD = ../lib-src-reg/libCHECKREG.a \
+ ../lib-src/libTOPCOM.a \
+- ../external/lib/libcddgmp.a \
+- ../external/lib/libgmpxx.a \
+- ../external/lib/libgmp.a
+
+ AM_CPPFLAGS = -I../lib-src -I../lib-src-reg -I../wrap-gmp-gmpxx \
+ -I../external/include -I$(includedir) -DVERBOSE -DGMPRATIONAL \
diff --git a/sci-mathematics/topcom/metadata.xml b/sci-mathematics/topcom/metadata.xml
new file mode 100644
index 000000000000..bb20ab4b2890
--- /dev/null
+++ b/sci-mathematics/topcom/metadata.xml
@@ -0,0 +1,11 @@
+<?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">
+TOPCOM is a package for computing Triangulations Of Point Configurations and Oriented Matroids
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/topcom/topcom-0.17.7.ebuild b/sci-mathematics/topcom/topcom-0.17.7.ebuild
new file mode 100644
index 000000000000..97a0cf2de6d5
--- /dev/null
+++ b/sci-mathematics/topcom/topcom-0.17.7.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+DESCRIPTION="Computing Triangulations Of Point Configurations and Oriented Matroids"
+HOMEPAGE="http://www.rambau.wm.uni-bayreuth.de/TOPCOM/"
+SRC_URI="
+ http://www.rambau.wm.uni-bayreuth.de/Software/TOPCOM-${PV}.tar.gz
+ doc? ( http://www.rambau.wm.uni-bayreuth.de/TOPCOM/TOPCOM-manual.html )"
+
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE="doc examples static-libs"
+
+DEPEND="
+ dev-libs/gmp:0
+ >=sci-libs/cddlib-094f"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-buildsystem.patch
+)
+
+src_prepare () {
+ # ... and link in tree versions:
+ append-libs -lgmp -lgmpxx -lcddgmp
+
+ find external -delete || die
+
+ default
+}
+
+src_install () {
+ default
+
+ use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*a
+
+ use examples && dodoc -r "${S}"/examples
+
+ docinto /usr/share/doc/${PF}/html
+ use doc && dodoc "${DISTDIR}"/TOPCOM-manual.html
+
+ mv "${ED}"/usr/bin/cube "${ED}"/usr/bin/topcom_cube || die
+}
+
+pkg_postinst() {
+ elog "Due to a file collision with media-libs/lib3ds the helper"
+ elog "'cube' has been installed as topcom_cube (see bug #547030)."
+}
diff --git a/sci-mathematics/twelf/Manifest b/sci-mathematics/twelf/Manifest
new file mode 100644
index 000000000000..6b56bbe3c831
--- /dev/null
+++ b/sci-mathematics/twelf/Manifest
@@ -0,0 +1,12 @@
+AUX 50twelf-gentoo.el 104 SHA256 1d3382c18895a3f5a6b4c1aebc5d9fc2d2aa94a7c196d5b5ccc9a7bc27a1498d SHA512 b6bd1f73b2224c37f783d0b2cdb16cd4e5435280c7448fd7600398ab2806edb574ec4e811adf26bfc1fbc9d0c311dbb521022b2a9dacbfecfa1ffef488c764bb WHIRLPOOL dea650f36310f83a8b4d3ac51cebb19054e48279e589b4080fbd145f5678be2c0555f1594a28443eebe118873639abf933e58a5ac7f510b1c06397d8248876b5
+AUX twelf-1.7.1-Makefile.patch 1298 SHA256 77038dabdd5fc990d78cba18ce42f598a2ec5a94c85a38ff6e15b08b2517853a SHA512 ffc7c147790b180c50eb645b896ad86c35b771ad516d2a85998f8edfd0e1ff1db98d1880b6e8b02e4ddcf8f218761ab26ddfee9bd5ab876b3bd1caa6a3e0e78e WHIRLPOOL ef6e408c659284ea647692fd73dfb9512138ec1287364bd59fac255e7ae6fcec1ac94233c5fd2e695bf03ee73a7b2607d1e00437d97815f8fe3c4d6dc0bebcfa
+AUX twelf-1.7.1-doc-guide-Makefile.patch 498 SHA256 1a71e3686e1d84afbccb39649b1fdcc44a44bc458fd4ede2f323ee7b12a4dc30 SHA512 240192028c9dd9a953ff9778bc9753a08dffa0f3332b72d4d2cd64a594f32fb183092ce1a4ace9fe9e0123d469be50983e4d081db989165beba33212de74b3d0 WHIRLPOOL 62ffc47f3448b75325f051f62a7b2ef7bf60293927f1d7b16a3d441481c9e18602a5c56e8bbaaa51d5c0a33ec5b574a1887f10ee923b241156ec8f3c1e3c9a52
+AUX twelf-1.7.1-doc-guide-twelf-dot-texi.patch 386 SHA256 a21601d5ee953358fc155a96a0167b3fefae2deea9074f7bd53af287836c6df8 SHA512 60741e8df6e2b200f22c435ccf2d092624b601ad71ffc1a3388e9ae1bca6ef0d92092940075d9786efed6218d82cf1a344d3a433eabbdabe2514ff985a6948b7 WHIRLPOOL 1323969b3f369de40e4f6d73b1832e7e4dc3c022fefecf00a6c90ff5bc17cdbe345e66d530589751f87f823c035e72e55ed05d3beaf58aa742e2866db64c57fa
+AUX twelf-1.7.1-emacs-twelf-init.patch 813 SHA256 e3f2ffa9dc7e6c1d05a23ede172199a005411be3061e3d3dab65fcb126db4afe SHA512 b45415b57dee44da7a38ea1f40b58526f0f69d012a16c316ebd6c3c9c856bbffd270f034d172b4ddeb083b7289c87eabf805a96fc9475f501038fb6c85a0f571 WHIRLPOOL c48647209e071b8795fdfb8be44c8397ed814a219dba58801cccb82626025ea1b6132289f63b9d475162df3ab0365b88f38e6b797d557047872e1e9c1e0f6aff
+AUX twelf-1.7.1-emacs-twelf.patch 602 SHA256 30a8fca3da1b64d06ecb7572c62f832fba7cb2c329d73f86aa74714eba8527ef SHA512 e5fd550210b7107fdafc27906dcb22318d1b0b6044d2502cfb968fb3b5d4baca5535cd6ae995638f38395d08641e59f5b87c76eac190653a6dad89bf52eb1a97 WHIRLPOOL 647290f3c6a42e5075baa78e6683a496b6e0472e0346e4ad85d91978f09c1d1137864452f7993e2a6bb99a6b24f4615099c4e8d09aa95deb53af483de37a6006
+AUX twelf-1.7.1-mlton-mlb.patch 11244 SHA256 cde36be7fa9c21871926cc772b3b16fcf0a8b842ee55f9d78f3f875a0927491a SHA512 2d0f42399e444cbb736f38ad7bdc54f51322c17c010b273c365d9db9a1e6c045c19b872d4b5c1e50444559a981aa5569764ac859c7702c116c97c935fd959bfd WHIRLPOOL 1ca8368e5b4a96a0e175b496f8958782f1b4ecfcd4e49c024f8e6f2f711ac4e4db6e615431facc6b3d7a09137f0a6ac26de5fa690c4daaa9add8434d1579ad06
+DIST twelf-src-1.7.1.tar.gz 1147610 SHA256 91b0d4d8c2e54452a042da0ff642f3b46b25efb36a84497aa8b96598f49a213a SHA512 1b4baa0f385b6b605583a9da312f23c775aab43e7398c6e151833a6b95c74112492530f44fcb7b14f8288774e9b63e2f9618a5debfbc4d34737bc2588f5850df WHIRLPOOL 231879beb66ff143acd3245c10b5e25a91994e67eb3b12aedd0e5a2378a94a2e1f3b29953b1ea24e98ca0063f27aff662cfdd1cea01163be435a6dbba1f0d2b9
+EBUILD twelf-1.7.1.ebuild 2330 SHA256 df29280fc8002cbfa4a70442b45f1b9920f8350df1272643b1014ff1b54e18b5 SHA512 e8554e14b6f5f87e1a7f810ec62d6e1e3e597944a98ee322fc022ce922331e1d0e39b7d910e1ec7ea8f6a2de079f6940f3e4dc7fc53fe5f4354dda3bba38b170 WHIRLPOOL 3fb36341f6ad2015983c0e6ce3351e0049a129b244b511227fd5c07f6e5ea2cef5aa5cef8edfafaaa3de99b8c9b44e13ad7378abf19d01138b15480f20a5b8ad
+MISC ChangeLog 2772 SHA256 335e0af993594354b845f928caa66388c4b0cfce793ecff42edafc56742d7c9d SHA512 199ba29e04cd19a314a7c78c51d5da85d68c25a216ee4a6cde87f7f9427303255e8a1e78fc8439742a0d9ac5839c861f3969fc54d37260e8426756cf37f3a592 WHIRLPOOL 1bc9b5525c1b8d42d55a5d39ac16291c75f1ec2d567353878f9e911c5f5f457b542b44c23e3186be0b75384b8c93327060bbd8fd0cca577ee2f0852b73aad74c
+MISC ChangeLog-2015 1479 SHA256 85abc565d663b5e5f26929a0a48db1449bc698a9fa7d4d2a74e0d68e6943b85d SHA512 1de52ef8577cb4bf9e1b8d4b4431aa143643d9008110875a944ecf4a23154e63fa589479f62ea59578880ac66601e00a4b78214d71f0c7b119a1c35ddf7c7a5b WHIRLPOOL 8137d222cfb3d29763d257a5c821a21ec788da579019b3505a60cde24f1c79052994a772541b92f8b6e77228e14d6402928d8a666b0e052a1393ec914a7c3309
+MISC metadata.xml 446 SHA256 2eac2599f3b96078a4a05bee31e00c6187c0270a875362ed515a3b60aa11c0da SHA512 7fcca73104456672c8e262129cdcc232073d6d0a4cd48d6593734646a3611ac6056325cc88be5c3a3585d67bc76fa9fb663a0171df7b84612c56c0ec93bc0e2e WHIRLPOOL 390e4992cc9b66534d410f246dab9cf0f35d49ab2d4fa7886b50803a1a4625345de4bc8d1067cb0e8e51ed7db1a5749e17be1b81f239a0ddd3ac1fc43c862043
diff --git a/sci-mathematics/twelf/files/50twelf-gentoo.el b/sci-mathematics/twelf/files/50twelf-gentoo.el
new file mode 100644
index 000000000000..5bda54b2f19a
--- /dev/null
+++ b/sci-mathematics/twelf/files/50twelf-gentoo.el
@@ -0,0 +1,4 @@
+;;; twelf site-lisp configuration
+
+(setq twelf-root "@SITELISP@")
+(add-to-list 'load-path "@SITELISP@")
diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-Makefile.patch b/sci-mathematics/twelf/files/twelf-1.7.1-Makefile.patch
new file mode 100644
index 000000000000..84631f357d9d
--- /dev/null
+++ b/sci-mathematics/twelf/files/twelf-1.7.1-Makefile.patch
@@ -0,0 +1,43 @@
+--- twelf-orig/Makefile 2011-03-03 09:41:47.000000000 +1100
++++ twelf/Makefile 2012-12-10 00:19:52.255787064 +1100
+@@ -17,6 +17,18 @@
+ twelfdir = `pwd`
+ twelfserver = twelf-server
+
++ifdef CFLAGS
++ccopts=$(foreach cf,$(CFLAGS),-cc-opt $(cf))
++else
++ccopts=
++endif
++
++ifdef LDFLAGS
++linkopts=$(foreach lf,$(LDFLAGS),-link-opt $(lf))
++else
++linkopts=
++endif
++
+ # ---------------------------------------------------------------
+ # You should not need to edit beyond this point
+ # ---------------------------------------------------------------
+@@ -53,12 +65,12 @@
+ echo; echo "Error: MLton >= 20041109 required"; echo; \
+ exit 1; \
+ fi; \
+- $(mlton) -output bin/$(twelfserver) build/$${cmfileid}
++ $(mlton) $(ccopts) $(linkopts) -as-opt -Wa,--noexecstack -output bin/$(twelfserver) build/$${cmfileid}
+
+ .PHONY: twelf-server-smlnj
+ twelf-server-smlnj:
+ $(smlnj) < build/twelf-server-smlnj.sml ;
+- bin/.mkexec "$(smlnj)" "$(twelfdir)" twelf-server "$(twelfserver)" ;
++ bin/.mkexec "$(smlnj)" "$(twelfdir)" twelf-server "$(twelfserver)" "$(twelfexecdir)" ;
+
+ .PHONY: twelf-emacs
+ twelf-emacs: ;
+@@ -87,4 +99,4 @@
+ $(mlton) -output bin/twelf-regression TEST/mlton-regression.cm
+
+ check : twelf-regression
+- $(make) -C TEST check
+\ No newline at end of file
++ $(make) -C TEST check
diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-Makefile.patch b/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-Makefile.patch
new file mode 100644
index 000000000000..092b12b20dc0
--- /dev/null
+++ b/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-Makefile.patch
@@ -0,0 +1,13 @@
+--- twelf-orig/doc/guide/Makefile 2002-09-24 13:59:23.000000000 +1000
++++ twelf/doc/guide/Makefile 2012-12-10 00:51:02.758835185 +1100
+@@ -38,8 +38,8 @@
+
+ twelf_toc.html : twelf.texi;
+ @echo "---------- Creating HTML: twelf_*.html"
+- $(texi2html) -menu -number -split_chapter twelf.texi;
+- $(texi2html) -check *.html;
++ $(texi2html) -menu -number-sections -split_chapter twelf.texi;
++# $(texi2html) -check *.html;
+
+ twelf.pdf : twelf.texi;
+ @echo "---------- Creating unindexed PDF: twelf.pdf"
diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-twelf-dot-texi.patch b/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-twelf-dot-texi.patch
new file mode 100644
index 000000000000..877ecd60b710
--- /dev/null
+++ b/sci-mathematics/twelf/files/twelf-1.7.1-doc-guide-twelf-dot-texi.patch
@@ -0,0 +1,14 @@
+--- twelf-orig/doc/guide/twelf.texi 2004-04-01 04:26:38.000000000 +1000
++++ twelf/doc/guide/twelf.texi 2012-12-08 21:14:17.026139996 +1100
+@@ -12,6 +12,11 @@
+ @syncodeindex fn cp
+ @c %**end of header
+
++@dircategory Programming
++@direntry
++* Twelf User Guide: (twelf). The Twelf User's Guide.
++@end direntry
++
+ @titlepage
+ @title Twelf User's Guide
+ @subtitle Version @value{VERSION}
diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf-init.patch b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf-init.patch
new file mode 100644
index 000000000000..983c3c2290ed
--- /dev/null
+++ b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf-init.patch
@@ -0,0 +1,22 @@
+--- twelf-orig/emacs/twelf-init.el 2002-12-28 16:15:42.000000000 +1100
++++ twelf/emacs/twelf-init.el 2012-12-10 00:45:49.363104690 +1100
+@@ -20,16 +20,13 @@
+ auto-mode-alist)))))
+
+ ;; Default Twelf server program location
+-(setq twelf-server-program
+- (concat twelf-root "bin/twelf-server"))
++(setq twelf-server-program "/usr/bin/twelf-server")
+
+ ;; Default Twelf SML program location
+-(setq twelf-sml-program
+- (concat twelf-root "bin/twelf-sml"))
++(setq twelf-sml-program "/usr/bin/twelf-sml")
+
+ ;; Default documentation location (in info format)
+-(setq twelf-info-file
+- (concat twelf-root "doc/info/twelf.info"))
++(setq twelf-info-file "/usr/share/info/twelf.info")
+
+ ;; Automatically highlight Twelf sources using font-lock
+ (add-hook 'twelf-mode-hook 'twelf-font-fontify-buffer)
diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf.patch b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf.patch
new file mode 100644
index 000000000000..c6c3a9b1fae1
--- /dev/null
+++ b/sci-mathematics/twelf/files/twelf-1.7.1-emacs-twelf.patch
@@ -0,0 +1,11 @@
+--- twelf-orig/emacs/twelf.el 2008-07-13 06:06:03.000000000 +1000
++++ twelf/emacs/twelf.el 2012-12-10 00:39:05.332036491 +1100
+@@ -1815,7 +1815,7 @@
+ (twelf-server-process (twelf-server-process twelf-server-buffer))
+ (proc-mark (process-mark twelf-server-process))
+ (_ (display-buffer twelf-server-buffer))
+- (twelf-server-window (get-buffer-window twelf-server-buffer)))
++ (twelf-server-window (get-buffer-window twelf-server-buffer t)))
+ (if (not (pos-visible-in-window-p proc-mark twelf-server-window))
+ (progn
+ (push-mark proc-mark)
diff --git a/sci-mathematics/twelf/files/twelf-1.7.1-mlton-mlb.patch b/sci-mathematics/twelf/files/twelf-1.7.1-mlton-mlb.patch
new file mode 100644
index 000000000000..24d16049c0e5
--- /dev/null
+++ b/sci-mathematics/twelf/files/twelf-1.7.1-mlton-mlb.patch
@@ -0,0 +1,409 @@
+commit 35216e78de99558a39b147bf06fef85e1aabb2c6
+Author: Rob Simmons <robsimmons@gmail.com>
+Date: Mon Aug 19 11:49:04 2013 -0400
+
+ Transfer Mlton build over to mlb files, as they've been asking us to do for years and now insist on.
+
+diff --git a/Makefile b/Makefile
+index 9d7d422..2422f36 100644
+--- a/Makefile
++++ b/Makefile
+@@ -46,9 +46,9 @@ twelf-server-announce:
+ twelf-server-mlton:
+ mltonversion=`$(mlton) 2>&1 | awk 'NR==1 { print 0+$$2 }'`; \
+ if [ $$mltonversion -ge 20041109 ]; then \
+- cmfileid="twelf-server-mlton.cm"; \
++ cmfileid="twelf-server-mlton.mlb"; \
+ elif [ $$mltonversion="MLTONVERSION" ]; then \
+- cmfileid="twelf-server-mlton.cm"; \
++ cmfileid="twelf-server-mlton.mlb"; \
+ else \
+ echo; echo "Error: MLton >= 20041109 required"; echo; \
+ exit 1; \
+@@ -84,7 +84,7 @@ mlton : twelf-server-announce buildid twelf-server-mlton twelf-emacs
+
+ .PHONY: twelf-regression check
+ twelf-regression: buildid
+- $(mlton) -output bin/twelf-regression TEST/mlton-regression.cm
++ $(mlton) -output bin/twelf-regression TEST/mlton-regression.mlb
+
+ check : twelf-regression
+ $(make) -C TEST check
+diff --git a/TEST/mlton-regression.mlb b/TEST/mlton-regression.mlb
+new file mode 100644
+index 0000000..b77a9ee
+--- /dev/null
++++ b/TEST/mlton-regression.mlb
+@@ -0,0 +1,7 @@
++(* MLton version *)
++
++../build/twelf-core-mlton.mlb
++
++regression.sml
++runquiet.sml
++
+diff --git a/build/twelf-core-mlton.mlb b/build/twelf-core-mlton.mlb
+new file mode 100644
+index 0000000..26843cd
+--- /dev/null
++++ b/build/twelf-core-mlton.mlb
+@@ -0,0 +1,348 @@
++(* Common MLton version *)
++
++$(SML_LIB)/basis/basis.mlb
++$(SML_LIB)/basis/mlton.mlb
++$(SML_LIB)/basis/sml-nj.mlb
++
++../src/compat/array.sig
++../src/compat/vector.sig
++../src/compat/path.sig
++../src/compat/substring.sig
++../src/compat/text-io.sig
++../src/compat/timer.sig
++../src/compat/socket.sig
++../src/compat/compat.sig
++../src/compat/socket.sml
++../src/compat/compat.fun
++../src/compat/compat.sml
++../src/timing/timing.sml
++../src/timing/timers.sig
++../src/timing/timers.fun
++../src/timing/timers.sml
++../src/global/global.sig
++../src/global/global.sml
++../src/lambda/fgnopn.sig
++../src/lambda/fgnopntable.fun
++../src/lambda/intsyn.sig
++../src/lambda/intsyn.fun
++../src/lambda/whnf.sig
++../src/lambda/whnf.fun
++../src/lambda/conv.sig
++../src/lambda/conv.fun
++
++../src/table/table.sig
++../src/table/hash-table.sml
++../src/table/string-hash.sig
++../src/table/string-hash.sml
++../src/table/red-black-tree.fun
++../src/table/sparse-array.sig
++../src/table/sparse-array.fun
++../src/table/sparse-array2.sig
++../src/table/sparse-array2.fun
++../src/table/table.sml
++
++../src/order/order.sig
++../src/order/order.fun
++../src/order/order.sml
++
++../src/lambda/tomega.sig
++../src/lambda/tomega.fun
++../src/lambda/tomega.sml
++../src/paths/paths.sig
++../src/paths/paths.fun
++../src/paths/origins.sig
++../src/paths/origins.fun
++../src/paths/paths.sml
++../src/table/queue.sig
++../src/table/queue.sml
++../src/index/index.sig
++../src/index/index.fun
++../src/index/index-skolem.fun
++../src/index/index.sml
++../src/trail/trail.sig
++../src/trail/notrail.sml
++../src/trail/trail.sml
++../src/lambda/constraints.sig
++../src/lambda/constraints.fun
++../src/lambda/unify.sig
++../src/lambda/unify.fun
++../src/lambda/match.sig
++../src/lambda/match.fun
++../src/lambda/abstract.sig
++../src/lambda/abstract.fun
++../src/lambda/approx.sig
++../src/lambda/approx.fun
++../src/lambda/lambda.sml
++../src/names/names.sig
++../src/names/names.fun
++../src/names/names.sml
++../src/style/style.sig
++../src/style/style.fun
++../src/style/style.sml
++../src/stream/stream.sml
++../src/frontend/lexer.sig
++../src/frontend/lexer.fun
++../src/frontend/twelf.sig
++../src/formatter/formatter.sig
++../src/formatter/formatter.fun
++../src/formatter/formatter.sml
++../src/print/print-omdoc.sig
++../src/print/print-xml.sig
++../src/print/print-omdoc.fun
++../src/print/print-xml.fun
++../src/print/print-twega.sig
++../src/print/print-twega.fun
++../src/print/symbol.sig
++../src/print/symbol.fun
++../src/print/print.sig
++../src/print/print.fun
++../src/print/clause-print.sig
++../src/print/clause-print.fun
++../src/print/print.sml
++../src/typecheck/strict.sig
++../src/typecheck/strict.fun
++../src/typecheck/typecheck.sig
++../src/typecheck/typecheck.fun
++../src/typecheck/typecheck.sml
++../src/modes/modesyn.sml
++../src/modes/modetable.sig
++../src/modes/modetable.fun
++../src/modes/modedec.sig
++../src/modes/modedec.fun
++../src/modes/modecheck.sig
++../src/modes/modecheck.fun
++../src/modes/modeprint.sig
++../src/modes/modeprint.fun
++../src/modes/modes.sml
++../src/tabling/tabledsyn.sig
++../src/tabling/tabledsyn.fun
++../src/tabling/tabled.sml
++../src/subordinate/intset.sml
++../src/subordinate/subordinate.sig
++../src/subordinate/subordinate.fun
++../src/subordinate/subordinate.sml
++../src/solvers/cs-manager.sig
++../src/solvers/cs-manager.fun
++../src/domains/integers.sig
++../src/domains/integers.fun
++../src/domains/field.sig
++../src/domains/ordered-field.sig
++../src/domains/rationals.sig
++../src/domains/rationals.fun
++../src/domains/integers-mod.fun
++../src/domains/domains.sml
++../src/solvers/cs.sig
++../src/solvers/cs-eq-field.sig
++../src/solvers/cs-eq-field.fun
++../src/solvers/cs-ineq-field.fun
++../src/solvers/cs-eq-strings.fun
++../src/solvers/cs-eq-bools.fun
++../src/solvers/cs-eq-integers.sig
++../src/solvers/cs-eq-integers.fun
++../src/solvers/cs-ineq-integers.fun
++../src/solvers/cs-integers-word.fun
++../src/solvers/solvers.sml
++../src/terminate/checking.sig
++../src/terminate/checking.fun
++../src/terminate/reduces.sig
++../src/terminate/reduces.fun
++../src/terminate/terminate.sml
++../src/thm/thmsyn.sig
++../src/thm/thmsyn.fun
++../src/thm/thmprint.sig
++../src/thm/thmprint.fun
++../src/thm/thm.sig
++../src/thm/thm.fun
++../src/thm/thm.sml
++../src/table/red-black-set.sig
++../src/table/red-black-set.sml
++../src/compile/compsyn.sig
++../src/compile/compsyn.fun
++../src/compile/cprint.sig
++../src/compile/cprint.fun
++../src/compile/subtree.sig
++../src/compile/subtree.fun
++../src/compile/compile.sig
++../src/compile/compile.fun
++../src/compile/assign.sig
++../src/compile/assign.fun
++../src/compile/compile.sml
++../src/opsem/absmachine.sig
++../src/opsem/absmachine.fun
++../src/opsem/table-param.sig
++../src/opsem/table-param.fun
++../src/opsem/table-param.sml
++../src/opsem/abstract.sig
++../src/opsem/abstract.fun
++../src/opsem/sw-subtree.sig
++../src/opsem/subtree.fun
++../src/opsem/subtree-inst.fun
++../src/opsem/sw-subtree.fun
++../src/opsem/tabled.sig
++../src/opsem/tabled.fun
++../src/opsem/ptrecon.sig
++../src/opsem/ptrecon.fun
++../src/opsem/trace.sig
++../src/opsem/trace.fun
++../src/opsem/absmachine-sbt.sig
++../src/opsem/absmachine-sbt.fun
++../src/opsem/tmachine.fun
++../src/opsem/swmachine.fun
++../src/opsem/opsem.sml
++../src/m2/meta-global.sig
++../src/m2/meta-global.sml
++../src/table/ring.sig
++../src/table/ring.sml
++../src/m2/metasyn.sig
++../src/m2/metasyn.fun
++../src/m2/meta-abstract.sig
++../src/m2/meta-abstract.fun
++../src/m2/meta-print.sig
++../src/m2/meta-print.fun
++../src/m2/init.sig
++../src/m2/init.fun
++../src/m2/search.sig
++../src/m2/search.fun
++../src/m2/lemma.sig
++../src/m2/lemma.fun
++../src/m2/splitting.sig
++../src/m2/splitting.fun
++../src/m2/filling.sig
++../src/m2/filling.fun
++../src/m2/recursion.sig
++../src/m2/recursion.fun
++../src/m2/qed.sig
++../src/m2/qed.fun
++../src/compat/time-limit.sig
++../src/compat/time-limit.sml
++../src/m2/strategy.sig
++../src/m2/strategy.fun
++../src/m2/prover.sig
++../src/m2/prover.fun
++../src/m2/mpi.sig
++../src/m2/mpi.fun
++../src/m2/skolem.sig
++../src/m2/skolem.fun
++../src/m2/m2.sml
++../src/modules/modsyn.sig
++../src/modules/modsyn.fun
++../src/modules/modules.sml
++../src/heuristic/heuristic.sig
++../src/heuristic/heuristic.sum.fun
++../src/meta/global.sig
++../src/meta/funsyn.sig
++../src/meta/funsyn.fun
++../src/meta/statesyn.sig
++../src/meta/init.sig
++../src/meta/strategy.sig
++../src/meta/relfun.sig
++../src/meta/prover.fun
++../src/meta/funprint.sig
++../src/meta/print.sig
++../src/meta/print.fun
++../src/meta/filling.sig
++../src/meta/data.sig
++../src/meta/splitting.sig
++../src/meta/recursion.sig
++../src/meta/inference.sig
++../src/meta/strategy.fun
++../src/meta/statesyn.fun
++../src/meta/funtypecheck.sig
++../src/meta/uniquesearch.sig
++../src/meta/inference.fun
++../src/meta/abstract.sig
++../src/meta/splitting.fun
++../src/meta/uniquesearch.fun
++../src/meta/search.sig
++../src/meta/search.fun
++../src/meta/recursion.fun
++../src/meta/mpi.sig
++../src/meta/mpi.fun
++../src/meta/data.fun
++../src/meta/global.fun
++../src/meta/filling.fun
++../src/meta/init.fun
++../src/meta/abstract.fun
++../src/meta/funnames.sig
++../src/meta/funnames.fun
++../src/meta/funprint.fun
++../src/meta/weaken.sig
++../src/meta/weaken.fun
++../src/meta/funweaken.sig
++../src/meta/funweaken.fun
++../src/meta/funtypecheck.fun
++../src/meta/relfun.fun
++../src/meta/meta.sml
++../src/worldcheck/worldsyn.sig
++../src/worldcheck/worldsyn.fun
++../src/worldcheck/worldify.sig
++../src/worldcheck/worldify.fun
++../src/worldcheck/worldcheck.sml
++../src/unique/unique.sig
++../src/unique/unique.fun
++../src/unique/unique.sml
++../src/cover/cover.sig
++../src/cover/cover.fun
++../src/cover/total.sig
++../src/cover/total.fun
++../src/cover/cover.sml
++../src/tomega/abstract.sig
++../src/tomega/abstract.fun
++../src/tomega/tomegaprint.sig
++../src/tomega/tomegaprint.fun
++../src/tomega/typecheck.sig
++../src/tomega/typecheck.fun
++../src/tomega/opsem.sig
++../src/tomega/opsem.fun
++../src/tomega/redundant.sig
++../src/tomega/redundant.fun
++../src/tomega/converter.sig
++../src/tomega/converter.fun
++../src/tomega/coverage.sig
++../src/tomega/coverage.fun
++../src/tomega/tomega.sml
++../src/msg/msg.sml
++../src/frontend/recon-term.sig
++../src/frontend/recon-term.fun
++../src/frontend/recon-condec.sig
++../src/frontend/recon-condec.fun
++../src/frontend/recon-query.sig
++../src/frontend/recon-query.fun
++../src/frontend/recon-mode.sig
++../src/frontend/recon-mode.fun
++../src/frontend/recon-thm.sig
++../src/frontend/recon-thm.fun
++../src/frontend/recon-module.sig
++../src/frontend/recon-module.fun
++../src/frontend/parsing.sig
++../src/frontend/parsing.fun
++../src/frontend/parse-term.sig
++../src/frontend/parse-term.fun
++../src/frontend/parse-condec.sig
++../src/frontend/parse-condec.fun
++../src/frontend/parse-query.sig
++../src/frontend/parse-query.fun
++../src/frontend/parse-fixity.sig
++../src/frontend/parse-fixity.fun
++../src/frontend/parse-mode.sig
++../src/frontend/parse-mode.fun
++../src/frontend/parse-thm.sig
++../src/frontend/parse-thm.fun
++../src/frontend/parse-module.sig
++../src/frontend/parse-module.fun
++../src/frontend/parser.sig
++../src/frontend/parser.fun
++../src/frontend/solve.sig
++../src/frontend/solve.fun
++../src/frontend/fquery.sig
++../src/frontend/fquery.fun
++../src/frontend/unknownexn.sig
++../src/frontend/buildid.sml
++../src/frontend/version.sml
++../src/frontend/twelf.fun
++../src/frontend/unknownexn.fun
++../src/frontend/unknownexn-smlnj.sml
++../src/frontend/frontend.sml
++../src/server/sigint.sig
++../src/server/sigint-mlton.sml
++../src/server/server.sml
+diff --git a/build/twelf-server-mlton.mlb b/build/twelf-server-mlton.mlb
+new file mode 100644
+index 0000000..fa4332f
+--- /dev/null
++++ b/build/twelf-server-mlton.mlb
+@@ -0,0 +1,4 @@
++
++twelf-core-mlton.mlb
++twelf-server-mlton.sml
++
+
diff --git a/sci-mathematics/twelf/metadata.xml b/sci-mathematics/twelf/metadata.xml
new file mode 100644
index 000000000000..667fd5f61ae1
--- /dev/null
+++ b/sci-mathematics/twelf/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gienah@gentoo.org</email>
+ <name>Mark Wright</name>
+ </maintainer>
+ <longdescription lang="en">
+Twelf is an implementation of the logical framework LF. It is used for
+logic programming and for the formalization of programming language
+theory.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-mathematics/twelf/twelf-1.7.1.ebuild b/sci-mathematics/twelf/twelf-1.7.1.ebuild
new file mode 100644
index 000000000000..02712b874f0f
--- /dev/null
+++ b/sci-mathematics/twelf/twelf-1.7.1.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit elisp-common eutils multilib
+
+MY_PN="${PN}-src"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Implementation of the logical framework LF"
+HOMEPAGE="http://twelf.org/"
+SRC_URI="http://twelf.plparty.org/releases/${MY_P}.tar.gz"
+
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+LICENSE="BSD-2"
+IUSE="doc emacs examples"
+
+# tests reference non-existing directory TEST
+RESTRICT="test"
+
+RDEPEND="
+ dev-lang/mlton
+ doc? (
+ virtual/latex-base
+ app-text/texi2html
+ )
+ emacs? (
+ virtual/emacs
+ )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}
+
+SITEFILE=50${PN}-gentoo.el
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.7.1-doc-guide-twelf-dot-texi.patch"
+ "${FILESDIR}/${PN}-1.7.1-doc-guide-Makefile.patch"
+ "${FILESDIR}/${PN}-1.7.1-emacs-twelf.patch"
+ "${FILESDIR}/${PN}-1.7.1-emacs-twelf-init.patch"
+ "${FILESDIR}/${PN}-1.7.1-Makefile.patch"
+ "${FILESDIR}/${PN}-1.7.1-mlton-mlb.patch"
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+ sed \
+ -e "s@/usr/bin@${ROOT}usr/bin@g" \
+ -e "s@/usr/share@${ROOT}usr/share@" \
+ -i "${S}"/emacs/twelf-init.el \
+ || die "Could not set ROOT in ${S}/emacs/twelf-init.el"
+}
+
+src_compile() {
+ emake mlton CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS} -fno-PIE"
+ if use emacs ; then
+ pushd "${S}/emacs" || die "Could change directory to emacs"
+ elisp-compile \
+ auc-menu.el \
+ twelf-font.el \
+ twelf-init.el \
+ twelf.el \
+ || die "emacs elisp compile failed"
+ popd
+ fi
+ if use doc; then
+ pushd doc/guide
+ emake all
+ popd
+ fi
+}
+
+ins_example_dir() {
+ insinto "/usr/share/${PN}/examples/${1}"
+ pushd "${S}/${1}"
+ doins -r *
+ popd
+}
+
+src_install() {
+ if use emacs ; then
+ elisp-install ${PN} emacs/*.{el,elc}
+ cp "${FILESDIR}"/${SITEFILE} "${S}"
+ elisp-site-file-install ${SITEFILE}
+ fi
+ if use examples; then
+ ins_example_dir examples
+ ins_example_dir examples-clp
+ ins_example_dir examples-delphin
+ fi
+ dobin bin/twelf-server
+ dohtml doc/html/index.html
+ doinfo doc/guide/twelf.info
+ dodoc doc/guide/twelf.dvi doc/guide/twelf.ps doc/guide/twelf.pdf
+ dohtml doc/guide/twelf/*
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ ewarn "For twelf emacs, add this line to ~/.emacs"
+ ewarn ""
+ ewarn '(load (concat twelf-root "/twelf-init.el"))'
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/unuran/Manifest b/sci-mathematics/unuran/Manifest
new file mode 100644
index 000000000000..b8034b4cf756
--- /dev/null
+++ b/sci-mathematics/unuran/Manifest
@@ -0,0 +1,5 @@
+DIST unuran-1.8.1.tar.gz 4409911 SHA256 c270ae96857857dbac6450043df865e0517f52856ddbe5202fd35583b13c5193 SHA512 4d98861914afe39065ec31ee837c0e21e0fb4f4667f559dee38a7a5c4e06f0d09bd550b20d06321d1f5fcd4799d482a9eebc66ac35f8cd7fff834f536d24854c WHIRLPOOL 7a93a0bb9f052c56f188c117decd4324aeba6bf61bdb8d6d3c10aae921b6a3f174f40baac4f5ecae519c134f8e97cd43fa580ba761429a88f35957b054391b9c
+EBUILD unuran-1.8.1.ebuild 998 SHA256 3875ea8193960bc8a606f8414a4be704b185b7c569baf7b45df8f7798981b7a8 SHA512 3de4820fb515dfa42c896da8fb2ba55def0b0fa23d4c7ca11b3e660f809b41ccc0f2ce174c005bcf42b281133fd4bfb45a048805dbe560b04d375da39f9be7b6 WHIRLPOOL bad8c3de73f228375854ea8710d9f702d82b96b0ccf3aa33feb103ac8a3ae264bec271140d5c637a38d6d3997b28cc4f0ccfd4aacbc9c32d8741c8979bdfa9ab
+MISC ChangeLog 2464 SHA256 7774a9b43d0bccf7f30f4361c4e250f1cc494e2c6158123c89f4efc6c85f66a5 SHA512 ce2f27acd3154aa03736d3cc85dae3b711729f534ba1a6c96207a5822eba358d1bf3529b635db37ad965f46b8ebe2493ae0e5b466e17f86677b16d6ee4097512 WHIRLPOOL 8546242ba78d5fdb78f222fa5d5feaba9818b29f0ef962c0932623e752a350257bc2bdef1efb5c141ce7969f5aaaf040e07406a469c89d25859fd9cf8896bc16
+MISC ChangeLog-2015 1981 SHA256 8639957f88adde128e83716143519fe4633dd1b0ceee20e45c7a726ebd7c4c45 SHA512 fece144976b0270d144f4ed369c83d5d6f4341aea581643da69691d4ff9082a15408a290645c0ec2b100d265119ff9f6da5bcd0bc000ec48e1ff7a82b9c1a0b2 WHIRLPOOL b4d277db0ae3b0ef6adfa565d9151b806135b2333d9d62e2e53bb6f9c40de213c4be0e0bd82698e476ad47fb041d1dc8af1df8fb0e5e37806791ded6929c644e
+MISC metadata.xml 764 SHA256 47409b8b610eabb7a7e8932293eab998ba027ed757896d679027ac59f35fed51 SHA512 8f2012a6e39d3f98f4890603618f3efb6627967cff72c3b6c120d480f552cfd444d84d1bb60c8db58cacb69d7bc4af3a48ba780a14c6e07232c57c465ea36866 WHIRLPOOL 1a48b3e565b1ca94348bb6b2b248a1f7f1710eb682c6304501ce156460baf59dd1a26e6ccfbac5827318811722d1619196e99a9badb1c4d3bac3eb54b4a8c79c
diff --git a/sci-mathematics/unuran/metadata.xml b/sci-mathematics/unuran/metadata.xml
new file mode 100644
index 000000000000..b1bc263b0c53
--- /dev/null
+++ b/sci-mathematics/unuran/metadata.xml
@@ -0,0 +1,19 @@
+<?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">
+ UNU.RAN is an ANSI C library licensed under GPL.
+ It contains universal (also called automatic or black-box) algorithms
+ that can generate random numbers from large classes of continuous or
+ discrete distributions, and also from practically all standard
+ distributions.
+</longdescription>
+ <use>
+ <flag name="rngstreams">Use <pkg>sci-mathematics/rngstreams</pkg> library</flag>
+ <flag name="prng">Use <pkg>sci-mathematics/prng</pkg> library</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/unuran/unuran-1.8.1.ebuild b/sci-mathematics/unuran/unuran-1.8.1.ebuild
new file mode 100644
index 000000000000..f3fea32d662e
--- /dev/null
+++ b/sci-mathematics/unuran/unuran-1.8.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools-utils
+
+DESCRIPTION="Universal Non-Uniform Random number generator"
+HOMEPAGE="http://statmath.wu.ac.at/unuran/"
+SRC_URI="${HOMEPAGE}${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT=0
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples gsl prng +rngstreams static-libs"
+
+DEPEND="
+ gsl? ( sci-libs/gsl )
+ prng? ( sci-mathematics/prng )
+ rngstreams? ( sci-mathematics/rngstreams )"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ local udefault=builtin
+ use rngstreams && udefault=rngstream
+ local myeconfargs=(
+ --enable-shared
+ --with-urng-default=${udefault}
+ $(use_with gsl urng-gsl)
+ $(use_with prng urng-prng)
+ $(use_with rngstreams urng-rngstream)
+ )
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install
+ use doc && dodoc doc/${PN}.pdf
+ if use examples; then
+ rm examples/Makefile*
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/sci-mathematics/wxmaxima/Manifest b/sci-mathematics/wxmaxima/Manifest
new file mode 100644
index 000000000000..a45cb8d23fac
--- /dev/null
+++ b/sci-mathematics/wxmaxima/Manifest
@@ -0,0 +1,11 @@
+DIST wxmaxima-15.08.2.tar.gz 5592673 SHA256 7ad3f018e42d15d06bee5af10053edb72e441c1d1feee318dc6eb927db6a26c5 SHA512 a537c49477f54df4fd9e4e42a5e0d0d740f1ede817d807a98b7cec877a3ad77b2be0a61ae487a7fa5beb193b112eca163b8873292ecab5acf118d58a91e91af6 WHIRLPOOL a4df36704bbd33f841ddf3b9651662a092708850cdc637e6f6bfabc195c1e7e34dd66e14d92ee1cba69f3810bc74a4295837709d38bf6d6ce83b81d7776a3b9a
+DIST wxmaxima-16.04.2.tar.gz 5178050 SHA256 761c2a5630a6d81fa84bc9eba431112910dce818c4dd77338e3a0691c2fcf8ba SHA512 da8159e7c779f50bde7a6f6852987c18aaf724b1ebf0bdc4d231f40b80e04cee2870a520251d212681b3f0a7533d28b744d3684fc395a26d2a46b48c1a31a856 WHIRLPOOL 613950e86516ab73d99180bf2ccc3f8f82167005a89fc07ea3ac0682054325c857bd54d1ab6fd7da200d045db28f9f4f0b2b05f9107916bdf39285afba9bfd0e
+DIST wxmaxima-16.12.0.tar.gz 4842949 SHA256 30d4fcf2b33349fb60d13f7efcd0d9b5460915fa7065665a2c7c291c77d26a06 SHA512 6a68cf6b4fdf07bef7fdd19397c226c3cf4f693aaab8ae028e6af69b114a04fa7dbf20f7f183853f8f655ef8d0bf984ee2a0af6096697ab3c454d17f37c98819 WHIRLPOOL 943d62045215067054ef4135249b6ae9378b0ff38e027f150934e35e91540ef59d3d7f02dfa9ed4cde2302d3be86582f53443cbc286880459338609d23f9c6e6
+DIST wxmaxima-16.12.2.tar.gz 4866058 SHA256 42c0a4dfb2e2ad349a49b117ef7c2e251292fb252ce9fde16242760f3dfc4278 SHA512 346a04c56a236d42e7177da9c12d94a504df7146457394c82293884995222d647746277096c14891c217559a1d9d743963c14d65931b31350ab2480f02fd03c1 WHIRLPOOL 9811a68f66ac46569921b93e5f3050fc4c271b8cf5886ebf0e0ae81d843b3a74bfaf39b7bc3db6e89dfbaa3cb983c8bb9e94a25950d4d113281958ccfed0ced4
+EBUILD wxmaxima-15.08.2.ebuild 1653 SHA256 2aa1c2c6c64ddaa92ace0eb2d031ea0a71d6cf4b2a345f7b4a22e00a1a8e19c1 SHA512 2cdc1c72257ffe6cbcb6c833f6c0c91b857e784d8df6abb595cf9f6172abc78dbbb558a8835e8781d0fd493f2b18358c6ee7260200c524796c2b61f607b597ae WHIRLPOOL 7f264f495ea0a62919f8b9627f0ef33ca794924fe623776f22beffe1a5ae2c9b8cec0b4eb94d5e2ab0ad1b176f365ca2fbac55184a7da3c57435baa45340267a
+EBUILD wxmaxima-16.04.2.ebuild 1656 SHA256 740f3e662eec083b105f3876fbcfc14388ac7d708327bac90fc1cf924d2c9735 SHA512 e3a379cc00ace47d2864a330c505d8f0e288703e8652b66467234fa69dd5143af61db7efd9b1d4ee6a324530febfe188570ba7814d0a67b50c4e0cb6efbc9c74 WHIRLPOOL fad5d98079b14a4d5f51f51483a459583a5e62f2a4f36f66ab1bd753f40f8d7b5bc59adb50e94f4fdf601a4270f09d128b926b486673148d94eb7c6bfdf8df2d
+EBUILD wxmaxima-16.12.0.ebuild 1656 SHA256 740f3e662eec083b105f3876fbcfc14388ac7d708327bac90fc1cf924d2c9735 SHA512 e3a379cc00ace47d2864a330c505d8f0e288703e8652b66467234fa69dd5143af61db7efd9b1d4ee6a324530febfe188570ba7814d0a67b50c4e0cb6efbc9c74 WHIRLPOOL fad5d98079b14a4d5f51f51483a459583a5e62f2a4f36f66ab1bd753f40f8d7b5bc59adb50e94f4fdf601a4270f09d128b926b486673148d94eb7c6bfdf8df2d
+EBUILD wxmaxima-16.12.2.ebuild 1656 SHA256 99f2808ddf35c8c0d30c8f54654a78f3a5405a8690ecddb0f6b25cfb91b36f1a SHA512 e6452ab3a3d4ccbe71befe27477775c00bdfe1235fa10e25acc5ed8d6d528acb735937eccddc288e5a70149baeb852b17fa00d652720526f299b246b4882575a WHIRLPOOL 695e2a783948d5c310a143d30d69ea07a7f7d7fcb938b15c40946a034ee18bc074055d813af39f2aa31f02b5fdf492352c85a8d637321d7ba7046aa19d3373fc
+MISC ChangeLog 4768 SHA256 90d2b1d92acaad436a695ea40d473382650b2ceb407a84ebd7dc95b1d7499aba SHA512 6888862b585d376e7e3cb8f942d72084d29040bcb15ff4ff9997bbb9babbd25b82531f880c274b921e66bd2f9332bd74e4867da15084e95bf57f6736f33cd199 WHIRLPOOL ae4abede78a133ea49db5c007808a02ca95c3e296744109b21db1d67857838b98a92a6ed96f157383f28024563a0d85c58a16ebb662fa772c231e84cc7c1ad6d
+MISC ChangeLog-2015 7758 SHA256 1860b2af5a9aaf7e7e08837bf383febe68562ee6e9c81efb50ee8b5da0ecdbc5 SHA512 9f0ceee5bca2c382a42dfa2661e134103e203d34e32d3e32e69cf1977728b233c55970a009b18f7c53f0e826e063b69671ab8ae9ffbb084597730b6c1f2487d6 WHIRLPOOL 8a31b95332dbc0efd4f4d65af16ab500b4522af01226680d0500820e9f554459ab81e0caa8d36ddf71737b17ed3251ababf04b897c2989cd0a041d2346736f66
+MISC metadata.xml 708 SHA256 7b350613f5d0ae3c932062d299cd591d4dcbfcd5d55ef189d04cca4344bbaf3f SHA512 cce8c3acce5606be24e1dd45e3624b56ec5f1881c80a92e46dcf013690676943d0bf304cb2a7cc76dccdd062567ba37329f87846de3058278ecd7a8c20eceb95 WHIRLPOOL 3c7b24df183f48d8a73a14737a86d813f3b8231655b443f5edae1782a4afe2102fb47993f4746956342c7c5fa84fa588a5821410b73e478926ba87466021031d
diff --git a/sci-mathematics/wxmaxima/metadata.xml b/sci-mathematics/wxmaxima/metadata.xml
new file mode 100644
index 000000000000..07badb330231
--- /dev/null
+++ b/sci-mathematics/wxmaxima/metadata.xml
@@ -0,0 +1,18 @@
+<?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">
+wxMaxima is a wxWidgets GUI for the computer algebra system maxima.
+Most of maxima functions are accessible through menus, some have
+dialogs. The input line has command history (up-key, down-key) and
+completion based on previous input (tab-key).
+wxMaxima provides 2d formated display of maxima output.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">wxmaxima</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/wxmaxima/wxmaxima-15.08.2.ebuild b/sci-mathematics/wxmaxima/wxmaxima-15.08.2.ebuild
new file mode 100644
index 000000000000..58c69f66ff4a
--- /dev/null
+++ b/sci-mathematics/wxmaxima/wxmaxima-15.08.2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+
+inherit eutils gnome2-utils wxwidgets fdo-mime
+
+DESCRIPTION="Graphical frontend to Maxima, using the wxWidgets toolkit"
+HOMEPAGE="http://andrejv.github.io/wxmaxima/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+DEPEND="
+ dev-libs/libxml2:2
+ x11-libs/wxGTK:${WX_GTK_VER}"
+RDEPEND="${DEPEND}
+ media-fonts/jsmath
+ sci-visualization/gnuplot[wxwidgets]
+ sci-mathematics/maxima"
+
+src_prepare() {
+ local i
+
+ # consistent package names
+ sed -e "s:\${datadir}/wxMaxima:\${datadir}/${PN}:g" \
+ -i Makefile.in data/Makefile.in test/Makefile.in || die "sed failed"
+
+ sed -e 's:share/wxMaxima:share/wxmaxima:g' \
+ -i src/wxMaxima.cpp src/wxMaximaFrame.cpp src/Dirstructure.cpp src/Dirstructure.h \
+ || die "sed failed"
+
+ # correct gettext behavior
+ if [[ -n "${LINGUAS+x}" ]] ; then
+ for i in $(cd "${S}"/locales ; echo *.mo) ; do
+ if ! has ${i%.mo} ${LINGUAS} ; then
+ sed -i \
+ -e "/^WXMAXIMA_LINGUAS/s# ${i%.mo}##" \
+ -e "/^WXWIN_LINGUAS/s# ${i%.mo}##" \
+ locales/Makefile.in || die
+ fi
+ done
+ fi
+}
+
+src_configure() {
+ econf \
+ --enable-printing \
+ --with-wx-config=${WX_CONFIG}
+}
+
+src_install () {
+ default
+ doicon -s 128 data/wxmaxima.png
+ make_desktop_entry wxmaxima wxMaxima wxmaxima
+ dosym /usr/share/${PN}/README /usr/share/doc/${PF}/README
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/sci-mathematics/wxmaxima/wxmaxima-16.04.2.ebuild b/sci-mathematics/wxmaxima/wxmaxima-16.04.2.ebuild
new file mode 100644
index 000000000000..934805673cbc
--- /dev/null
+++ b/sci-mathematics/wxmaxima/wxmaxima-16.04.2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+
+inherit eutils gnome2-utils wxwidgets fdo-mime
+
+DESCRIPTION="Graphical frontend to Maxima, using the wxWidgets toolkit"
+HOMEPAGE="http://andrejv.github.io/wxmaxima/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="
+ dev-libs/libxml2:2
+ x11-libs/wxGTK:${WX_GTK_VER}"
+RDEPEND="${DEPEND}
+ media-fonts/jsmath
+ sci-visualization/gnuplot[wxwidgets]
+ sci-mathematics/maxima"
+
+src_prepare() {
+ local i
+
+ # consistent package names
+ sed -e "s:\${datadir}/wxMaxima:\${datadir}/${PN}:g" \
+ -i Makefile.in data/Makefile.in test/Makefile.in || die "sed failed"
+
+ sed -e 's:share/wxMaxima:share/wxmaxima:g' \
+ -i src/wxMaxima.cpp src/wxMaximaFrame.cpp src/Dirstructure.cpp src/Dirstructure.h \
+ || die "sed failed"
+
+ # correct gettext behavior
+ if [[ -n "${LINGUAS+x}" ]] ; then
+ for i in $(cd "${S}"/locales ; echo *.mo) ; do
+ if ! has ${i%.mo} ${LINGUAS} ; then
+ sed -i \
+ -e "/^WXMAXIMA_LINGUAS/s# ${i%.mo}##" \
+ -e "/^WXWIN_LINGUAS/s# ${i%.mo}##" \
+ locales/Makefile.in || die
+ fi
+ done
+ fi
+}
+
+src_configure() {
+ econf \
+ --enable-printing \
+ --with-wx-config=${WX_CONFIG}
+}
+
+src_install () {
+ default
+ doicon -s 128 data/wxmaxima.png
+ make_desktop_entry wxmaxima wxMaxima wxmaxima
+ dosym /usr/share/${PN}/README /usr/share/doc/${PF}/README
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/sci-mathematics/wxmaxima/wxmaxima-16.12.0.ebuild b/sci-mathematics/wxmaxima/wxmaxima-16.12.0.ebuild
new file mode 100644
index 000000000000..934805673cbc
--- /dev/null
+++ b/sci-mathematics/wxmaxima/wxmaxima-16.12.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+
+inherit eutils gnome2-utils wxwidgets fdo-mime
+
+DESCRIPTION="Graphical frontend to Maxima, using the wxWidgets toolkit"
+HOMEPAGE="http://andrejv.github.io/wxmaxima/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="
+ dev-libs/libxml2:2
+ x11-libs/wxGTK:${WX_GTK_VER}"
+RDEPEND="${DEPEND}
+ media-fonts/jsmath
+ sci-visualization/gnuplot[wxwidgets]
+ sci-mathematics/maxima"
+
+src_prepare() {
+ local i
+
+ # consistent package names
+ sed -e "s:\${datadir}/wxMaxima:\${datadir}/${PN}:g" \
+ -i Makefile.in data/Makefile.in test/Makefile.in || die "sed failed"
+
+ sed -e 's:share/wxMaxima:share/wxmaxima:g' \
+ -i src/wxMaxima.cpp src/wxMaximaFrame.cpp src/Dirstructure.cpp src/Dirstructure.h \
+ || die "sed failed"
+
+ # correct gettext behavior
+ if [[ -n "${LINGUAS+x}" ]] ; then
+ for i in $(cd "${S}"/locales ; echo *.mo) ; do
+ if ! has ${i%.mo} ${LINGUAS} ; then
+ sed -i \
+ -e "/^WXMAXIMA_LINGUAS/s# ${i%.mo}##" \
+ -e "/^WXWIN_LINGUAS/s# ${i%.mo}##" \
+ locales/Makefile.in || die
+ fi
+ done
+ fi
+}
+
+src_configure() {
+ econf \
+ --enable-printing \
+ --with-wx-config=${WX_CONFIG}
+}
+
+src_install () {
+ default
+ doicon -s 128 data/wxmaxima.png
+ make_desktop_entry wxmaxima wxMaxima wxmaxima
+ dosym /usr/share/${PN}/README /usr/share/doc/${PF}/README
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/sci-mathematics/wxmaxima/wxmaxima-16.12.2.ebuild b/sci-mathematics/wxmaxima/wxmaxima-16.12.2.ebuild
new file mode 100644
index 000000000000..7a474961e662
--- /dev/null
+++ b/sci-mathematics/wxmaxima/wxmaxima-16.12.2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+
+inherit eutils gnome2-utils wxwidgets fdo-mime
+
+DESCRIPTION="Graphical frontend to Maxima, using the wxWidgets toolkit"
+HOMEPAGE="http://andrejv.github.io/wxmaxima/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="
+ dev-libs/libxml2:2
+ x11-libs/wxGTK:${WX_GTK_VER}"
+RDEPEND="${DEPEND}
+ media-fonts/jsmath
+ sci-visualization/gnuplot[wxwidgets]
+ sci-mathematics/maxima"
+
+src_prepare() {
+ local i
+
+ # consistent package names
+ sed -e "s:\${datadir}/wxMaxima:\${datadir}/${PN}:g" \
+ -i Makefile.in data/Makefile.in test/Makefile.in || die "sed failed"
+
+ sed -e 's:share/wxMaxima:share/wxmaxima:g' \
+ -i src/wxMaxima.cpp src/wxMaximaFrame.cpp src/Dirstructure.cpp src/Dirstructure.h \
+ || die "sed failed"
+
+ # correct gettext behavior
+ if [[ -n "${LINGUAS+x}" ]] ; then
+ for i in $(cd "${S}"/locales ; echo *.mo) ; do
+ if ! has ${i%.mo} ${LINGUAS} ; then
+ sed -i \
+ -e "/^WXMAXIMA_LINGUAS/s# ${i%.mo}##" \
+ -e "/^WXWIN_LINGUAS/s# ${i%.mo}##" \
+ locales/Makefile.in || die
+ fi
+ done
+ fi
+}
+
+src_configure() {
+ econf \
+ --enable-printing \
+ --with-wx-config=${WX_CONFIG}
+}
+
+src_install () {
+ default
+ doicon -s 128 data/wxmaxima.png
+ make_desktop_entry wxmaxima wxMaxima wxmaxima
+ dosym /usr/share/${PN}/README /usr/share/doc/${PF}/README
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/sci-mathematics/xmds/Manifest b/sci-mathematics/xmds/Manifest
new file mode 100644
index 000000000000..0dd21a705358
--- /dev/null
+++ b/sci-mathematics/xmds/Manifest
@@ -0,0 +1,5 @@
+DIST xmds-2.2.2.tar.gz 33449671 SHA256 6ab07b2aa44ef24a81e6cac2b16a6d99f8840531116c25ea40fbe7de20d1b96d SHA512 470652112e17503f6f0a4da9a68d4f360e66d8b29701a30385f3d49f9b0359578c702ff92f54876b473976b0794f6c2b2302b0a16508e09a5ec53572454eda42 WHIRLPOOL 7a9083e02452f4becc69977fbb59b7bb708cdc67475b93e62e92368ba71a3c804165e50d559cda2bfad7d84db2f6e40bd9afbd7d43299a9dc6419a86d385e983
+EBUILD xmds-2.2.2.ebuild 1097 SHA256 16df9e19ecce63e0dfccdb95b2ec8fb42f690e2d37b1f4501ad48a703b3686d4 SHA512 88ac183a3daae878caddde57242dfa5811578635178fa34fa86bf49321155554ab0a40255c7526e6b3aa3b98c72c9f3c77ffad676ec9d89f7055f7f20c50f09a WHIRLPOOL 6faa3fe77c9c7a6be5ba55b97157d33a9b511db1cc224fddb5c32e33d9cdbdb1b8532f0f24ea7c0c2e5b06c95b4a400aa4fa5eb5521f7803ef3f19decf14a7f7
+MISC ChangeLog 2783 SHA256 e427f1a475f7939780109df3d98e74137da59016e4f252973dc985fdb4f6a2e7 SHA512 fc2e9bf32c9da0f80874fa3f3ce8f7b1a9b1feb6cf590ff05d1ece78511da01e48db09ceab18a00c32c83d1612bcedb7a98d91f56389af30e125af8d9f55d448 WHIRLPOOL 6d33eb66cb7bc9f51f655eec4bed0259da26e3204bf76c12d1625fca2b703ff1ef9157a8c5b021a57a835095cc47f4ee40316fb2d68a3fe2cf94f976491852a2
+MISC ChangeLog-2015 1310 SHA256 84d6d8d03f4b1e39fca7db3952d78e9abccdc9102d917ca56cc118d8b9d4a4b9 SHA512 c762762a859763325e7b25d29e88ee4eb28baa41d86e9db23b56db26f2ff08aa6fc78adcf9397c837bd01e78fa363f82af1019a31e45613ba3b60c8822e132d0 WHIRLPOOL 90e6f714775c111bbf409eb897cd7786e7ea0c67e2ba6503beebe59ef9df145f47a9b25042e6593cd099679a6ec4ec191f4ae7a2fc502398763eeb9dcf960f24
+MISC metadata.xml 678 SHA256 18d416b22b8537e0ed8a6720f6556e0f1abe1f07631f74268deb78481b3dc154 SHA512 f177dcaed1bdebc436febbfaa09629d13524cffda2d348b299260bf496f11270b102ac13c81ed676e3f4d6d7472d2651969f08e5405eb7be5f2975336b75d78c WHIRLPOOL 39b68ebfdcaa8107403b4637cb013ad0ba2b13ed140b7cb367fc85a59f8b7e47490bddd316da978fcc0decd193e183d2e2bdfe2539e98b41acb776782193e3f3
diff --git a/sci-mathematics/xmds/metadata.xml b/sci-mathematics/xmds/metadata.xml
new file mode 100644
index 000000000000..3b7403548310
--- /dev/null
+++ b/sci-mathematics/xmds/metadata.xml
@@ -0,0 +1,17 @@
+<?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">
+XMDS is a code generator that integrates differential equations (ODEs, PDEs and
+SDEs are all supported). The system of equations to be integrated is specified
+in a XML file, which XMDS then uses to generate a C++ integrator. The code can
+autamatically take advantage of MPI and FFTW.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">xmds</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/xmds/xmds-2.2.2.ebuild b/sci-mathematics/xmds/xmds-2.2.2.ebuild
new file mode 100644
index 000000000000..bf3dbf1a7e00
--- /dev/null
+++ b/sci-mathematics/xmds/xmds-2.2.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+inherit distutils-r1
+
+DESCRIPTION="XMDS - The eXtensible Multi-Dimensional Simulator"
+HOMEPAGE="http://www.xmds.org"
+SRC_URI="mirror://sourceforge/xmds/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc examples mpi"
+
+DEPEND="dev-python/cheetah[${PYTHON_USEDEP}]"
+RDEPEND=">=sci-libs/fftw-3.3.1:3.0=[mpi?]
+ mpi? ( virtual/mpi )
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/mpmath[${PYTHON_USEDEP}]
+ dev-python/h5py[${PYTHON_USEDEP}]
+ sci-libs/atlas
+ sci-libs/hdf5
+ sci-libs/gsl"
+#virtual/cblas
+
+python_install_all() {
+ use doc && HTML_DOCS+=( documentation/. )
+ if use examples; then
+ docompress -x "/usr/share/doc/${PF}/examples"
+ dodoc -r examples
+ fi
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ elog "Configure XMDS2 by typing"
+ elog "xmds2 --reconfigure"
+ elog "See http://www.xmds.org/installation.html for further informations"
+}
diff --git a/sci-mathematics/yacas/Manifest b/sci-mathematics/yacas/Manifest
new file mode 100644
index 000000000000..f75f0cf8c5a6
--- /dev/null
+++ b/sci-mathematics/yacas/Manifest
@@ -0,0 +1,5 @@
+DIST yacas-1.6.1.tar.gz 2611119 SHA256 6b94394f705bed70a9d104967073efd6c23e9eb1a832805c4d805ef875555ae5 SHA512 fffd15f76fef15aa8502053deefa6fee2a4f8b25414fa1209579351e36131b8117135e5f7009986ac8bb6af575d2e500a0d61c4996a8a50c767a5fa80ac1eff2 WHIRLPOOL 113cecc8b7af9a7569fbfd19366d96b66e698c6432776986a22fe76f29a991ed338d31656cbf50b0fd0c5baa5a5f1f4eb3f2171d6c4f4b657fc7891f0ea3255a
+EBUILD yacas-1.6.1-r1.ebuild 1173 SHA256 180d4d1144daecb35b053772a20984023c998abe8ba3d3d0f10bb3bae20c392c SHA512 8cc592b18d43b83b19623fa773a5f34c3f089959efc254ac5573f5aab0c668a1e75e522d72e67062f350badb875bf6004d2267bb0417c94e1287b38b0bc10abb WHIRLPOOL e6ac7909b80cd13afe4e5bb730f828fbf9b4ad6f29a33f51dd0b13abf12b06d27cffc12e512dce66aaa4d8faa4be569c9c4ffbb139b790eba57738b169f955d2
+MISC ChangeLog 3111 SHA256 4af2019de2ec98668c165f3b6a67eb691ef3fe6897ca1d40620b8602fbbd8945 SHA512 89489dbe395c7349a12d882ca40acd1cd8bb8e04a94fdd66e1a06c9b35aa59955110bd4cdc72f134ff4c0c237b5bb238a589f7e8c785f2e0cd1d1f9c3032bc00 WHIRLPOOL 4a7c8a3c7e4faa2d672363891dfc5f2a10b49e89173857061650c3fe7ace74440b50315b00874b91140fb271749f545dc53a8db1dd89f5130cfaebfb2ec82444
+MISC ChangeLog-2015 7574 SHA256 800a71b20ec27018bff0712c15ba81c307f1ebb737549d60ffa224aa4fee8aba SHA512 d84b96b9a7134128134dc8068557728fd048b56418ff0cdbb47b7f63a7316685cc5e8aa9c0b9623665d96c66865b840cdb3a236643d417932af668d5d5f9291a WHIRLPOOL 2aeb587c49040df10cfaef1786ba23833545891529df100dc298f207d6a806706188abbc101b3ac2e72b4c0c09f866aaf489623323f0df9b03bf805debfc9368
+MISC metadata.xml 1082 SHA256 1c3cb3423373b79e3760ce31c0fd484f9e45fd734659686a4fb0a1465d01951c SHA512 fc56f8a12091e5242041a19384052f62fa019e3413620e8c1e01493956c47952e6465e4e73970a0c339834631fb93f34b3d5800c917beeb5b8a14a53fa21ab21 WHIRLPOOL fb9ea137c057b2eb47494a8df03115f6381e8b4e40c23817f0681577e4e8c794c765ed6b80c751d22f2001ed0b69ec8e4c8886b9f677aa69fe18b8a777e4746e
diff --git a/sci-mathematics/yacas/metadata.xml b/sci-mathematics/yacas/metadata.xml
new file mode 100644
index 000000000000..9790239a614e
--- /dev/null
+++ b/sci-mathematics/yacas/metadata.xml
@@ -0,0 +1,25 @@
+<?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">
+ Yacas (Yet Another Computer Algebra System) is a small and highly
+ flexible general-purpose computer algebra language. The syntax uses a
+ infix-operator grammar parser. The distribution contains a small
+ library of mathematical functions, but its real strength is in the
+ language in which you can easily write your own symbolic manipulation
+ algorithms.
+ </longdescription>
+ <use>
+ <flag name="doc">Generate HTML documentation</flag>
+ <flag name="gui">Build graphical interface for the native yacas engine. Requires Qt5</flag>
+ <flag name="java">Build the Java yacas engine and text console for it</flag>
+ <flag name="jupyter">Add support for jupyter notebook</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">yacas</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/yacas/yacas-1.6.1-r1.ebuild b/sci-mathematics/yacas/yacas-1.6.1-r1.ebuild
new file mode 100644
index 000000000000..66d4e6ae5dac
--- /dev/null
+++ b/sci-mathematics/yacas/yacas-1.6.1-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_IN_SOURCE_BUILD=1
+
+inherit java-pkg-opt-2 cmake-utils
+
+DESCRIPTION="General purpose computer algebra system"
+HOMEPAGE="http://www.yacas.org/"
+SRC_URI="https://codeload.github.com/grzegorzmazur/${PN}/tar.gz/v${PV} -> ${P}.tar.gz"
+
+SLOT="0/1"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc gui java +jupyter static-libs"
+
+COMMON_DEPEND="
+ gui? (
+ dev-qt/qtcore:5[icu]
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtwebkit:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtsql:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtopengl:5
+ dev-qt/qtprintsupport:5
+ )
+ jupyter? (
+ dev-python/jupyter
+ dev-libs/boost:=
+ dev-libs/jsoncpp:=
+ dev-libs/openssl:0=
+ net-libs/zeromq
+ >=net-libs/zmqpp-4.1.2
+ )"
+DEPEND="${COMMON_DEPEND}
+ doc? ( dev-python/sphinx )
+ java? ( >=virtual/jdk-1.6 )"
+RDEPEND="${COMMON_DEPEND}
+ java? ( >=virtual/jre-1.6 )"
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_DOCS=$(usex doc)
+ -DENABLE_CYACAS_GUI=$(usex gui)
+ -DENABLE_CYACAS_KERNEL=$(usex jupyter)
+ -DENABLE_JYACAS=$(usex java)
+ )
+ cmake-utils_src_configure
+}
diff --git a/sci-mathematics/yafu/Manifest b/sci-mathematics/yafu/Manifest
new file mode 100644
index 000000000000..2987a28517b7
--- /dev/null
+++ b/sci-mathematics/yafu/Manifest
@@ -0,0 +1,7 @@
+AUX fix-Makefile.patch 284 SHA256 c15bfdc89a72ff57a85bc75922c65e1338c5fd682886e3a51f50dff6b01703eb SHA512 40e17093675e767cae4f757e85c671b85cd83b57c71c4bf0721a26745dcd5a9a17a8160e0c4caf168f8878461597b6efa30a2f1cec83ba64319acb2787e4609a WHIRLPOOL 0d7bca07af63b391f459e61a7f71bad240801d0c9c0ad3f3dacaa24ad5fc4c076eae9483798b1ff5d3f10b7d2e8b7a31a944fc4fd3d49b97f32a0fbfd9e96564
+DIST yafu-1.34-src.zip 686655 SHA256 ad3e6b74f766a7c59280642065ea9482d438dc3be383962f50119f43948631be SHA512 f8afba77e0286c579b4152517ba3a0b6b85d43606e4fafc653dc06b7f7c2aba0f8f3c65b38f3496657495bff476dd4cc8e06daaad8a7a78a36fc6e1c0cf046a4 WHIRLPOOL 69a2b0a99914bbf3cbb6b0cc91597b3d9ae25f29622af859a279f53c2281ae5e0f4e691112f111ad53781b0fe0258f73b1c9ee400cb4d22c28cfeb136785ca41
+EBUILD yafu-1.34.3.ebuild 1783 SHA256 a55dfb86bb69fd85faf999f1723a1f1e5467d8a4c7640a44d9c2d453c0e04e2a SHA512 f2b86bf2c8b31f67581930fd729eaee3c27d8dd89b570b7f02e58ae4b58833abd309d3d9c1cdce0893ed149a96c25f53e52432102bdc0d063f9e21536056094c WHIRLPOOL 4b6809be558e72fa8573846dba021c55dff0ec3b3f9c04e3aab097a53c189b294900857363d88050bffbc9b729568423b430cf6873f013e6c42be64e99a93717
+EBUILD yafu-9999.ebuild 1759 SHA256 ab2d69e44762866d542bccc260ec428ffc011ad2447faf7cc950c626819999c7 SHA512 024bb3283f5f22328580d3d83360e8bdf783bea00e53a83459b1dcef2a9142c86a9a2d21e061fe68817e2548735931568ec0fb73ccba3a197cd3933bb6d55c55 WHIRLPOOL 04fbc9cc074821664193101eeedd9922fde13ddc1b3929b92705b86726396235e1e93ffd1180c6dcb3088105f8d71e4f10d21bf47ac439ee16ca7ccb3ac13ccb
+MISC ChangeLog 3177 SHA256 11e382bea25aa2411d6a76d18c03e64fa3ed87154a27b6d976439634f8dbecc4 SHA512 161b0235be8bcedd87a223bc4316d372d674cebf76cf17bdfe9a12b58c25cc852ea9345e8da66886f6cd6fdb245d15b4d7a5c01c2ae0b394df748d0a0a3e7841 WHIRLPOOL f355e841522217a5ea1835a4786b2e13258f2b1d252258b4d1601c7d03b3a0c0589deac3c51d014e87a4024ba3d2fc9b1f7862806aaa02eaaf1b7978d58e6f15
+MISC ChangeLog-2015 1847 SHA256 f880dcd6e764ab5deb2bc00fcf3a9e5d7875bcbf347fc8d2323f11149aa385b1 SHA512 43a2712a2617ef2cb9c16ec6067a00b2eeb7877ce488bcb8e35fa6cac8fe43544e6a5e8bb8fefadc872c637b33ceed6754420492cf3715ca80e68aa933102f69 WHIRLPOOL 3a00e9e514f9ccf0a1da6ed74d90527e2bfe48fb53e11fd34213ddceb4a06bee2a94728d826070a079245b9c59951e8c27994aa8097e90bb4114ce214d6ada5e
+MISC metadata.xml 418 SHA256 5517fe34fd42cfb3269d889c7a5bd404833e4da06b262b3a018a56710833a4ad SHA512 36f48590e2713be40668446867f7e5937dd1be766566e2c90330bd467c8797f3169c71d785d3c9a2b3d839a411332f90c4770e27875da99e9e760d60c6b79a6d WHIRLPOOL 6941f55a35458ffa15670e594066ff2e2cfa6391e50d7c499c5d20671dda622853f7b81b135fb0399ace3ae5023650ad97109a90f1d384926e6b1425955c7519
diff --git a/sci-mathematics/yafu/files/fix-Makefile.patch b/sci-mathematics/yafu/files/fix-Makefile.patch
new file mode 100644
index 000000000000..82b8e0d7d2ff
--- /dev/null
+++ b/sci-mathematics/yafu/files/fix-Makefile.patch
@@ -0,0 +1,11 @@
+--- Makefile.orig 2013-03-17 11:20:40.248683894 +0400
++++ Makefile 2013-03-17 11:20:47.352683657 +0400
+@@ -87,7 +87,7 @@ ifeq ($(CC),icc)
+ CFLAGS += -mtune=core2 -march=core2
+ endif
+
+-LIBS += -lecm -lgmp
++LIBS += -lecm -lgmp -lgomp
+
+ CFLAGS += $(OPT_FLAGS) $(WARN_FLAGS) $(INC)
+
diff --git a/sci-mathematics/yafu/metadata.xml b/sci-mathematics/yafu/metadata.xml
new file mode 100644
index 000000000000..651621cc9277
--- /dev/null
+++ b/sci-mathematics/yafu/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <use>
+ <flag name="sieve">Use msieve for the sieving steps of NFS</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">yafu</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/yafu/yafu-1.34.3.ebuild b/sci-mathematics/yafu/yafu-1.34.3.ebuild
new file mode 100644
index 000000000000..cf1be408e987
--- /dev/null
+++ b/sci-mathematics/yafu/yafu-1.34.3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils versionator
+
+MY_PV="$(get_version_component_range 1-2)"
+
+DESCRIPTION="Yet another factoring utility"
+HOMEPAGE="https://sourceforge.net/projects/yafu/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_PV}/${PN}-${MY_PV}-src.zip"
+
+SLOT="0"
+LICENSE="public-domain"
+KEYWORDS="~amd64 ~x86"
+# nfs is overloaded, so using less confusing sieve here
+IUSE="+sieve"
+
+DEPEND="
+ dev-libs/gmp:0=
+ sci-mathematics/gmp-ecm
+ sieve? (
+ sci-mathematics/msieve
+ sci-mathematics/ggnfs )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-Makefile.patch"
+ # This is not nice. But then the Makefile is quite special :)
+ sed -i -e 's:../gmp/include:gmp:' Makefile || die "Failed to rectify things"
+ sed -i -e 's:../gmp-ecm/include:gmp-ecm:' Makefile || die "Failed to rectify things"
+ sed -i -e 's:LIBS += -L../:# LIBS += -L../:g' Makefile || die "Failed to rectify things"
+ sed -i -e 's:\"config.h\":<gmp-ecm/config.h>:g' top/driver.c || die "Failed to rectify things"
+ sed -i -e 's:# LIBS += -L../msieve/lib/linux/x86_64:LIBS += -lmsieve -lz -ldl:' Makefile || die "Failed to rectify things"
+ sed -i -e 's:CFLAGS = -g:#CFLAGS = -g:' Makefile || die "Failed to rectify things"
+ sed -i -e '/$(LIBS)$/s:$(CC):$(CC) $(LDFLAGS):g' Makefile || die
+
+ # proper ggnfs default path
+ sed -i -e 's~strcpy(fobj->nfs_obj.ggnfs_dir,"./");~strcpy(fobj->nfs_obj.ggnfs_dir,"/usr/bin/");~' factor/factor_common.c || die "Failed to rectify things"
+}
+
+src_compile() {
+ local VAR=""
+ # hmm, not that useful:
+ #VAR="TIMING=1 "
+ use sieve && VAR+="NFS=1"
+ use amd64 && emake $VAR x86_64
+ use x86 && emake $VAR x86
+}
+
+src_install() {
+ dobin "${S}/yafu"
+ dodoc docfile.txt README yafu.ini
+}
diff --git a/sci-mathematics/yafu/yafu-9999.ebuild b/sci-mathematics/yafu/yafu-9999.ebuild
new file mode 100644
index 000000000000..3f727cf66ae4
--- /dev/null
+++ b/sci-mathematics/yafu/yafu-9999.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils subversion versionator
+
+DESCRIPTION="Yet another factoring utility"
+HOMEPAGE="https://sourceforge.net/projects/yafu/"
+#SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+ESVN_REPO_URI="https://svn.code.sf.net/p/yafu/code/"
+
+SLOT="0"
+LICENSE="public-domain"
+KEYWORDS=""
+# nfs is overloaded, so using less confusing sieve here
+IUSE="+sieve"
+
+DEPEND="
+ dev-libs/gmp:0=
+ sci-mathematics/gmp-ecm
+ sieve? (
+ sci-mathematics/msieve
+ sci-mathematics/ggnfs )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ cd trunk
+ # This is not nice. But then the Makefile is quite special :)
+ sed -i -e 's:../gmp/include:gmp:' Makefile || die "Failed to rectify things"
+ sed -i -e 's:../gmp-ecm/include:gmp-ecm:' Makefile || die "Failed to rectify things"
+ sed -i -e 's:LIBS += -L../:# LIBS += -L../:g' Makefile || die "Failed to rectify things"
+ sed -i -e 's:\"config.h\":<gmp-ecm/config.h>:g' top/driver.c || die "Failed to rectify things"
+ sed -i -e 's:# LIBS += -L../msieve/lib/linux/x86_64:LIBS += -lmsieve -lz -ldl:' Makefile || die "Failed to rectify things"
+ sed -i -e 's:CFLAGS = -g:#CFLAGS = -g:' Makefile || die "Failed to rectify things"
+ sed -i -e '/$(LIBS)$/s:$(CC):$(CC) $(LDFLAGS):g' Makefile || die
+
+ # proper ggnfs default path
+ sed -i -e 's~strcpy(fobj->nfs_obj.ggnfs_dir,"./");~strcpy(fobj->nfs_obj.ggnfs_dir,"/usr/bin/");~' factor/factor_common.c || die "Failed to rectify things"
+}
+
+src_compile() {
+ local VAR=""
+ cd trunk
+ # hmm, not that useful:
+ #VAR="TIMING=1 "
+ use sieve && VAR+="NFS=1"
+ use amd64 && emake $VAR x86_64
+ use x86 && emake $VAR x86
+}
+
+src_install() {
+ dobin "${S}/yafu"
+ dodoc docfile.txt README yafu.ini
+}
diff --git a/sci-mathematics/z3/Manifest b/sci-mathematics/z3/Manifest
new file mode 100644
index 000000000000..3baa36cae6c2
--- /dev/null
+++ b/sci-mathematics/z3/Manifest
@@ -0,0 +1,6 @@
+AUX z3-4.4.1-gcc-6.patch 668 SHA256 b9a5d3f0946784eb12ac08536afd2704b2d78b868eec9aaa54b7d7aede6a0894 SHA512 2efd883026643f365141665f257a863c6b22ad30327db82ad03719d33abfd58bc681cf4c9db9145098584817e57e59f7b1fe90a5390e72a49bce66cd23481f7f WHIRLPOOL 8acc53aa97dd584db739300a4fbcdbff05d1204c18ef56c29a7cf4c5e7fdda192457c417bf50592593d7c1ebd1dce81c0c3449f123f8bf99faddf82a7ef67ee6
+DIST z3-4.4.1.tar.gz 3347371 SHA256 50967cca12c5c6e1612d0ccf8b6ebf5f99840a783d6cf5216336a2b59c37c0ce SHA512 76991a24f47f2b53ceb8d7a9a6be19913c57994ffb6cf6acfe30f61b2e73959cf02a99f656053594fccb5aaf4d1f44b3ae7e51f1c8953b213d738ceeeaea74f8 WHIRLPOOL aea616b43ae1a962cf00f4748b5a51b38586ccee393e4e27efbf806635a35af416edd6143b4cf01cf2b0df043f64ab4822f7767bb1c0a340fd57ee03627d39e5
+DIST z3-4.5.0.tar.gz 3573695 SHA256 aeae1d239c5e06ac183be7dd853775b84698db1265cb2258e5918a28372d4a0c SHA512 1ebc2c908d90b6b879f1e819c864ff894613276af47a440f27cf94968c195656952434754c3eb20f4bdbdd8497d227d22e1b4821c0d320b11052b5648d9e2dc7 WHIRLPOOL 3178973c2cce1ab3a87db134f7314d54aa5b491500c9f7c30c74d5672cb4995f7d468e62cd18d54b312d4d94fee8b1267c25d09e95075361e869bb36859810ab
+EBUILD z3-4.4.1.ebuild 4306 SHA256 2ac180da21241461f46b628ff963a18e2ad54cc4bd06425002f6048684ac52d1 SHA512 1a370b019b33e83d5984b6abf321b39ff25f3b633ca60b2c48ddf9e33b30252389b5cb6f2e34e0dc1103730c9e5bf60ac688d67914d9c5dae52cf5fc5354620c WHIRLPOOL 5fa1e75f31911c623630937db78f4bcfff86e04eda794d320f51ed8fc5431c6af128461b8deebb62c0707bcc9b82932cf7056541b09d197b381ad49fe4bcb8bf
+EBUILD z3-4.5.0.ebuild 4721 SHA256 d64e6cfe0eecb2f4a1c287c51060777fb8cbc6f42ce675e73a3d1a644ce18ca4 SHA512 e52d01917d884d10c24bf081303bdef7b1efa3b042f838ebc7de678a473fdd01d7738a216c9e14c4929b847fe7e5c3abe7a92bdafc827a1c1aa54b86abe46664 WHIRLPOOL eea7393a9cecb7170fb9f231886043a2037fe1eeed0475507b9d149461a4b281cba460a98ae965b97782987a01dfdcede4d19d70e52d126b92f7c767e0cf5c14
+MISC metadata.xml 780 SHA256 1fcc4b2666bc35c6fbb0d8a01af2ff616f4188e7a7c17d846d3746137d6b51eb SHA512 0be5e944d18dad2cc18350eae6e736f1c5b3705e5a05115a6de8df8ec37322b240952784673e59a3daf51253a3fb91b952b50a3c14628747156b4ff12f09b624 WHIRLPOOL f4b820645c53ba2580f9edb7c6dfd2fc7318b79ef6482cd3b80c0d325d73e6d9d40a49de06729272f4713ed08cd9b09096a8ed5afa2036484ec19df728fa210a
diff --git a/sci-mathematics/z3/files/z3-4.4.1-gcc-6.patch b/sci-mathematics/z3/files/z3-4.4.1-gcc-6.patch
new file mode 100644
index 000000000000..2dc0ddd12f26
--- /dev/null
+++ b/sci-mathematics/z3/files/z3-4.4.1-gcc-6.patch
@@ -0,0 +1,18 @@
+diff --git a/src/util/debug.cpp b/src/util/debug.cpp
+index 54c67fe..66676c6 100644
+--- a/src/util/debug.cpp
++++ b/src/util/debug.cpp
+@@ -78,3 +78,3 @@ void invoke_gdb() {
+ char result;
+- bool ok = (std::cin >> result);
++ bool ok = bool(std::cin >> result);
+ if (!ok) exit(ERR_INTERNAL_FATAL); // happens if std::cin is eof or unattached.
+diff --git a/src/util/mpz.cpp b/src/util/mpz.cpp
+index 8559279..7dca14b 100644
+--- a/src/util/mpz.cpp
++++ b/src/util/mpz.cpp
+@@ -136,3 +136,3 @@ mpz_manager<SYNCH>::mpz_manager():
+ mpz one(1);
+- set(m_two64, UINT64_MAX);
++ set(m_two64, (uint64)UINT64_MAX);
+ add(m_two64, one, m_two64);
diff --git a/sci-mathematics/z3/metadata.xml b/sci-mathematics/z3/metadata.xml
new file mode 100644
index 000000000000..350861622f3d
--- /dev/null
+++ b/sci-mathematics/z3/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gienah@gentoo.org</email>
+ </maintainer>
+ <maintainer type="project">
+ <email>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription lang="en">
+Z3 is a high-performance theorem prover being developed at Microsoft Research.
+ </longdescription>
+ <use>
+ <flag name="isabelle">Add integration support for the Isabelle/HOL
+ theorem prover.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">Z3Prover/z3</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-mathematics/z3/z3-4.4.1.ebuild b/sci-mathematics/z3/z3-4.4.1.ebuild
new file mode 100644
index 000000000000..8fd027f17feb
--- /dev/null
+++ b/sci-mathematics/z3/z3-4.4.1.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit flag-o-matic java-pkg-2 java-pkg-simple python-r1 toolchain-funcs
+
+DESCRIPTION="An efficient theorem prover"
+HOMEPAGE="http://z3.codeplex.com/"
+SRC_URI="https://github.com/Z3Prover/z3/archive/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="MIT"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gmp isabelle java python"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ gmp? ( dev-libs/gmp:0 )"
+DEPEND="${RDEPEND}
+ java? ( >=virtual/jdk-1.8 )"
+
+S=${WORKDIR}/${PN}-${P}
+JAVA_SRC_DIR=${S}/src/api/java
+
+SO1="0"
+SO2="1"
+SOVER="${SO1}.${SO2}"
+
+pkg_setup() {
+ python_setup
+
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ if [[ $(tc-getCXX)$ == *g++* ]] && ! tc-has-openmp; then
+ ewarn "Please use an openmp compatible compiler"
+ ewarn "like >gcc-4.2 with USE=openmp"
+ die "Openmp support missing in compiler"
+ fi
+ fi
+}
+
+src_prepare() {
+ eapply "${FILESDIR}"/${P}-gcc-6.patch
+ default
+
+ sed \
+ -e 's:-O3::g' \
+ -e 's:-fomit-frame-pointer::' \
+ -e 's:-msse2::g' \
+ -e 's:-msse::g' \
+ -e "/LINK_EXTRA_FLAGS/s:@LDFLAGS@:-lrt $(usex gmp -lgmp ""):g" \
+ -e 's:t@\$:t\$:g' \
+ -i scripts/*mk* || die
+
+ sed \
+ -e "s:SLIBEXTRAFLAGS = '':SLIBEXTRAFLAGS = '-Wl,-soname,lib${PN}.so.${SOVER}':" \
+ -i scripts/mk_util.py || die
+
+ append-ldflags -fopenmp
+
+ cat <<- EOF > "${S}/src/api/python/__init__.py" || die
+ from .z3 import *
+
+ from . import z3num
+ from . import z3poly
+ from . import z3printer
+ from . import z3rcf
+ from . import z3types
+ from . import z3util
+
+ # generated files
+ from . import z3core
+ from . import z3consts
+ EOF
+}
+
+src_configure() {
+ export Z3_INSTALL_LIB_DIR="$(get_libdir)"
+ export Z3_INSTALL_INCLUDE_DIR="include/z3"
+ set -- \
+ $(usex gmp --gmp "") \
+ $(usex java --java "")
+ echo ./configure "$@" >&2
+ ./configure "$@" || die
+ ${EPYTHON} scripts/mk_make.py || die
+}
+
+src_compile() {
+ emake \
+ --directory="build" \
+ CXX=$(tc-getCXX) \
+ LINK="$(tc-getCXX) ${LDFLAGS}" \
+ LINK_FLAGS="${LDFLAGS}"
+
+ use java && java-pkg-simple_src_compile
+}
+
+src_install() {
+ dodir /usr/include/${PN}
+ insinto /usr/include/${PN}
+ doins src/api/z3*.h src/api/c++/z3*.h
+ dolib.so build/lib${PN}.so
+ dosym "/usr/$(get_libdir)/lib${PN}.so" \
+ "/usr/$(get_libdir)/lib${PN}.so.${SO1}" \
+ || die "Could not create /usr/$(get_libdir)/lib${PN}.so.${SO1} symlink"
+ dosym "/usr/$(get_libdir)/lib${PN}.so" \
+ "/usr/$(get_libdir)/lib${PN}.so.${SOVER}" \
+ || die "Could not create libz3.so soname symlink"
+ dobin build/z3
+
+ if use examples; then
+ insinto /usr/share/${PN}
+ doins -r examples
+ fi
+
+ if use python; then
+ python_moduleinto "${PN}"
+ instpybind() {
+ python_domodule src/api/python/*.py
+ dosym "/usr/$(get_libdir)/lib${PN}.so" \
+ "$(python_get_sitedir)/${PN}/lib${PN}.so" \
+ || die "Could not create $(python_get_sitedir)/lib${PN}.so symlink for python module"
+ }
+ python_foreach_impl instpybind
+ fi
+
+ use java && java-pkg-simple_src_install
+
+ if use isabelle; then
+ ISABELLE_HOME="${ROOT}usr/share/Isabelle"
+ dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ cat <<- EOF >> "${S}/settings" || die
+ Z3_COMPONENT="\$COMPONENT"
+ Z3_HOME="${ROOT}usr/bin"
+ Z3_SOLVER="${ROOT}usr/bin/z3"
+ Z3_REMOTE_SOLVER="z3"
+ Z3_VERSION="${PV}"
+ Z3_INSTALLED="yes"
+ Z3_NON_COMMERCIAL="yes"
+ EOF
+ insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ doins "${S}/settings"
+ fi
+
+ local DOCS=( "README" "RELEASE_NOTES" )
+ use doc && einstalldocs
+}
+
+pkg_postinst() {
+ if use isabelle; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
+ sed -e "/contrib\/${PN}-[0-9.]*/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ cat <<- EOF >> "${ROOT}etc/isabelle/components"
+ contrib/${PN}-${PV}
+ EOF
+ fi
+ fi
+}
+
+pkg_postrm() {
+ if use isabelle; then
+ if [ ! -f "${ROOT}usr/bin/Z3" ]; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ # Note: this sed should only match the version of this ebuild
+ # Which is what we want as we do not want to remove the line
+ # of a new Isabelle component being installed during an upgrade.
+ sed -e "/contrib\/${PN}-${PV}/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ fi
+ fi
+}
diff --git a/sci-mathematics/z3/z3-4.5.0.ebuild b/sci-mathematics/z3/z3-4.5.0.ebuild
new file mode 100644
index 000000000000..5f19493a454c
--- /dev/null
+++ b/sci-mathematics/z3/z3-4.5.0.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit flag-o-matic java-pkg-2 java-pkg-simple python-r1 toolchain-funcs
+
+DESCRIPTION="An efficient theorem prover"
+HOMEPAGE="http://z3.codeplex.com/"
+SRC_URI="https://github.com/Z3Prover/z3/archive/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="MIT"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples gmp isabelle java python"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ gmp? ( dev-libs/gmp:0 )"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ java? ( >=virtual/jdk-1.8 )"
+
+S=${WORKDIR}/${PN}-${P}
+JAVA_SRC_DIR=${S}/src/api/java
+
+SO1="0"
+SO2="1"
+SOVER="${SO1}.${SO2}"
+
+pkg_setup() {
+ python_setup
+
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ if [[ $(tc-getCXX)$ == *g++* ]] && ! tc-has-openmp; then
+ ewarn "Please use an openmp compatible compiler"
+ ewarn "like >gcc-4.2 with USE=openmp"
+ die "Openmp support missing in compiler"
+ fi
+ fi
+}
+
+src_prepare() {
+ default
+
+ sed \
+ -e 's:-O3::g' \
+ -e 's:-fomit-frame-pointer::' \
+ -e 's:-msse2::g' \
+ -e 's:-msse::g' \
+ -e "/LINK_EXTRA_FLAGS/s:@LDFLAGS@:-lrt $(usex gmp -lgmp ""):g" \
+ -e 's:t@\$:t\$:g' \
+ -i scripts/*mk* || die
+
+ sed \
+ -e "s:SLIBEXTRAFLAGS = '':SLIBEXTRAFLAGS = '-Wl,-soname,lib${PN}.so.${SOVER}':" \
+ -i scripts/mk_util.py || die
+
+ sed -e 's:api\\html\\ml:api/html/ml:' \
+ -e 's:python/z3.py:python/z3/z3.py:' \
+ -i doc/mk_api_doc.py || die
+
+ append-ldflags -fopenmp
+}
+
+src_configure() {
+ local PYTHON_SITEDIR
+ python_export PYTHON_SITEDIR
+ export Z3_INSTALL_LIB_DIR="$(get_libdir)"
+ export Z3_INSTALL_INCLUDE_DIR="include/z3"
+ set -- \
+ --pypkgdir="${PYTHON_SITEDIR}/${PN}" \
+ --prefix="${ROOT}usr" \
+ $(usex gmp --gmp "") \
+ $(usex python --python "") \
+ $(usex java --java "")
+ echo ./configure "$@" >&2
+ # LANG=C to force external tools to output ascii text only
+ # otherwise configure crashes as:
+ # File "scripts/mk_make.py", line 21, in <module>
+ # UnicodeEncodeError: 'ascii' codec can't encode characters in position 80-82: ordinal not in range(128)
+ LANG=C ./configure "$@" || die
+ echo ${EPYTHON} scripts/mk_make.py "$@" >&2
+ LANG=C ${EPYTHON} scripts/mk_make.py || die
+}
+
+src_compile() {
+ emake \
+ --directory="build" \
+ CXX=$(tc-getCXX) \
+ LINK="$(tc-getCXX) ${LDFLAGS}" \
+ LINK_FLAGS="${LDFLAGS}"
+
+ use java && java-pkg-simple_src_compile
+
+ if use doc; then
+ pushd doc || die
+ ${EPYTHON} mk_api_doc.py || die
+ popd || die
+ fi
+}
+
+src_install() {
+ emake \
+ --directory="build" \
+ CXX=$(tc-getCXX) \
+ LINK="$(tc-getCXX) ${LDFLAGS}" \
+ LINK_FLAGS="${LDFLAGS}" \
+ install DESTDIR="${D}"
+
+ dosym "/usr/$(get_libdir)/lib${PN}.so" \
+ "/usr/$(get_libdir)/lib${PN}.so.${SO1}" \
+ || die "Could not create /usr/$(get_libdir)/lib${PN}.so.${SO1} symlink"
+ dosym "/usr/$(get_libdir)/lib${PN}.so" \
+ "/usr/$(get_libdir)/lib${PN}.so.${SOVER}" \
+ || die "Could not create libz3.so soname symlink"
+
+ if use examples; then
+ insinto /usr/share/${PN}
+ doins -r examples
+ fi
+
+ if use python; then
+ python_moduleinto "${PN}"
+ instpybind() {
+ python_domodule src/api/python/z3/*.py
+ dosym "/usr/$(get_libdir)/lib${PN}.so" \
+ "$(python_get_sitedir)/${PN}/lib${PN}.so" \
+ || die "Could not create $(python_get_sitedir)/lib${PN}.so symlink for python module"
+ }
+ python_foreach_impl instpybind
+ fi
+
+ use java && java-pkg-simple_src_install
+
+ if use isabelle; then
+ ISABELLE_HOME="${ROOT}usr/share/Isabelle"
+ dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ cat <<- EOF >> "${S}/settings" || die
+ Z3_COMPONENT="\$COMPONENT"
+ Z3_HOME="${ROOT}usr/bin"
+ Z3_SOLVER="${ROOT}usr/bin/z3"
+ Z3_REMOTE_SOLVER="z3"
+ Z3_VERSION="${PV}"
+ Z3_INSTALLED="yes"
+ Z3_NON_COMMERCIAL="yes"
+ EOF
+ insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc"
+ doins "${S}/settings"
+ fi
+
+ local DOCS=( "README.md" "RELEASE_NOTES" )
+ local HTML_DOCS=( "doc/api/html/." )
+ use doc && einstalldocs
+}
+
+pkg_postinst() {
+ if use isabelle; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then
+ sed -e "/contrib\/${PN}-[0-9.]*/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ cat <<- EOF >> "${ROOT}etc/isabelle/components"
+ contrib/${PN}-${PV}
+ EOF
+ fi
+ fi
+}
+
+pkg_postrm() {
+ if use isabelle; then
+ if [ ! -f "${ROOT}usr/bin/Z3" ]; then
+ if [ -f "${ROOT}etc/isabelle/components" ]; then
+ # Note: this sed should only match the version of this ebuild
+ # Which is what we want as we do not want to remove the line
+ # of a new Isabelle component being installed during an upgrade.
+ sed -e "/contrib\/${PN}-${PV}/d" \
+ -i "${ROOT}etc/isabelle/components"
+ fi
+ fi
+ fi
+}