summaryrefslogtreecommitdiff
path: root/dev-lang
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-lang
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/R/Manifest17
-rw-r--r--dev-lang/R/R-3.2.2.ebuild205
-rw-r--r--dev-lang/R/R-3.3.2.ebuild201
-rw-r--r--dev-lang/R/R-3.4.1.ebuild204
-rw-r--r--dev-lang/R/files/R-2.11.1-parallel.patch17
-rw-r--r--dev-lang/R/files/R-2.13.1-zlib_header_fix.patch20
-rw-r--r--dev-lang/R/files/R-3.0.0-rmath-shared.patch28
-rw-r--r--dev-lang/R/files/R-3.3.2-zlib-1.2.10-backport.patch20
-rw-r--r--dev-lang/R/files/R-3.4.1-parallel.patch11
-rw-r--r--dev-lang/R/files/R-3.4.1-rmath-shared.patch21
-rw-r--r--dev-lang/R/metadata.xml24
-rw-r--r--dev-lang/ats/Manifest5
-rw-r--r--dev-lang/ats/ats-0.2.9.ebuild33
-rw-r--r--dev-lang/ats/metadata.xml11
-rw-r--r--dev-lang/bas/Manifest6
-rw-r--r--dev-lang/bas/bas-2.4.ebuild39
-rw-r--r--dev-lang/bas/files/bas-2.1-makefile.patch49
-rw-r--r--dev-lang/bas/metadata.xml8
-rw-r--r--dev-lang/bashforth/Manifest5
-rw-r--r--dev-lang/bashforth/bashforth-0.58a.ebuild24
-rw-r--r--dev-lang/bashforth/metadata.xml8
-rw-r--r--dev-lang/bff/Manifest8
-rw-r--r--dev-lang/bff/bff-1.0.3.1.ebuild40
-rw-r--r--dev-lang/bff/bff-1.0.5.ebuild35
-rw-r--r--dev-lang/bff/metadata.xml11
-rw-r--r--dev-lang/blassic/Manifest9
-rw-r--r--dev-lang/blassic/blassic-0.10.2.ebuild32
-rw-r--r--dev-lang/blassic/blassic-0.10.3.ebuild32
-rw-r--r--dev-lang/blassic/files/blassic-0.10.2-tinfo.patch12
-rw-r--r--dev-lang/blassic/files/blassic-0.10.3-tinfo.patch12
-rw-r--r--dev-lang/blassic/metadata.xml14
-rw-r--r--dev-lang/c-intercal/Manifest8
-rw-r--r--dev-lang/c-intercal/c-intercal-30.0.ebuild79
-rw-r--r--dev-lang/c-intercal/files/50c-intercal-gentoo.el4
-rw-r--r--dev-lang/c-intercal/files/c-intercal-30.0-version.patch11
-rw-r--r--dev-lang/c-intercal/files/c-intercal-30.0-yywrap.patch17
-rw-r--r--dev-lang/c-intercal/metadata.xml17
-rw-r--r--dev-lang/cfortran/Manifest7
-rw-r--r--dev-lang/cfortran/cfortran-4.4-r2.ebuild37
-rw-r--r--dev-lang/cfortran/cfortran-4.4-r3.ebuild49
-rw-r--r--dev-lang/cfortran/metadata.xml14
-rw-r--r--dev-lang/cilk/Manifest7
-rw-r--r--dev-lang/cilk/cilk-5.4.6-r1.ebuild35
-rw-r--r--dev-lang/cilk/cilk-5.4.6-r2.ebuild44
-rw-r--r--dev-lang/cilk/files/cilk-5.4.6-autotools.patch81
-rw-r--r--dev-lang/cilk/metadata.xml19
-rw-r--r--dev-lang/cll1h/Manifest5
-rw-r--r--dev-lang/cll1h/cll1h-0.6-r1.ebuild25
-rw-r--r--dev-lang/cll1h/metadata.xml5
-rw-r--r--dev-lang/clojure/Manifest11
-rw-r--r--dev-lang/clojure/clojure-1.5.1.ebuild32
-rw-r--r--dev-lang/clojure/clojure-1.6.0.ebuild32
-rw-r--r--dev-lang/clojure/clojure-1.7.0.ebuild32
-rw-r--r--dev-lang/clojure/clojure-1.8.0.ebuild32
-rw-r--r--dev-lang/clojure/metadata.xml11
-rw-r--r--dev-lang/closure-compiler-bin/Manifest7
-rw-r--r--dev-lang/closure-compiler-bin/closure-compiler-bin-20150126.ebuild29
-rw-r--r--dev-lang/closure-compiler-bin/closure-compiler-bin-20170218.ebuild29
-rw-r--r--dev-lang/closure-compiler-bin/metadata.xml11
-rw-r--r--dev-lang/coffee-script/Manifest7
-rw-r--r--dev-lang/coffee-script/coffee-script-1.12.5.ebuild41
-rw-r--r--dev-lang/coffee-script/coffee-script-1.9.3-r1.ebuild47
-rw-r--r--dev-lang/coffee-script/metadata.xml11
-rw-r--r--dev-lang/confluence/Manifest5
-rw-r--r--dev-lang/confluence/confluence-0.10.6.ebuild46
-rw-r--r--dev-lang/confluence/metadata.xml8
-rw-r--r--dev-lang/crystal/Manifest22
-rw-r--r--dev-lang/crystal/crystal-0.21.1.ebuild91
-rw-r--r--dev-lang/crystal/crystal-0.22.0.ebuild97
-rw-r--r--dev-lang/crystal/crystal-0.23.0-r1.ebuild100
-rw-r--r--dev-lang/crystal/crystal-0.23.0.ebuild98
-rw-r--r--dev-lang/crystal/crystal-0.23.1.ebuild101
-rw-r--r--dev-lang/crystal/files/crystal-0.20.5-LDFLAGS.patch9
-rw-r--r--dev-lang/crystal/files/crystal-0.20.5-verbose.patch9
-rw-r--r--dev-lang/crystal/files/crystal-0.22.0-blocking-stdio-hack.patch20
-rw-r--r--dev-lang/crystal/files/crystal-0.23.0-verbose-LDFLAGS.patch9
-rw-r--r--dev-lang/crystal/files/crystal-0.23.1-llvm-5.patch837
-rw-r--r--dev-lang/crystal/metadata.xml40
-rw-r--r--dev-lang/duktape/Manifest6
-rw-r--r--dev-lang/duktape/duktape-2.1.0.ebuild43
-rw-r--r--dev-lang/duktape/duktape-2.1.1.ebuild43
-rw-r--r--dev-lang/duktape/files/duktape.pc10
-rw-r--r--dev-lang/duktape/metadata.xml14
-rw-r--r--dev-lang/ekopath/Manifest18
-rw-r--r--dev-lang/ekopath/ekopath-6.0.619_p20151213-r1.ebuild62
-rw-r--r--dev-lang/ekopath/ekopath-6.0.619_p20151213-r100.ebuild73
-rw-r--r--dev-lang/ekopath/ekopath-6.0.756_p20160409-r1.ebuild62
-rw-r--r--dev-lang/ekopath/ekopath-6.0.756_p20160409-r100.ebuild73
-rw-r--r--dev-lang/ekopath/ekopath-6.0.779_p20160428-r1.ebuild62
-rw-r--r--dev-lang/ekopath/ekopath-6.0.779_p20160428-r100.ebuild73
-rw-r--r--dev-lang/ekopath/ekopath-6.0.855_p20160629-r1.ebuild62
-rw-r--r--dev-lang/ekopath/ekopath-6.0.855_p20160629-r100.ebuild73
-rw-r--r--dev-lang/ekopath/ekopath-6.0.967_p20161020-r1.ebuild73
-rw-r--r--dev-lang/ekopath/ekopath-6.0.967_p20161020-r100.ebuild84
-rw-r--r--dev-lang/ekopath/metadata.xml24
-rw-r--r--dev-lang/elixir/Manifest13
-rw-r--r--dev-lang/elixir/elixir-1.3.0-r1.ebuild27
-rw-r--r--dev-lang/elixir/elixir-1.4.4.ebuild27
-rw-r--r--dev-lang/elixir/elixir-1.4.5.ebuild27
-rw-r--r--dev-lang/elixir/elixir-1.5.0.ebuild29
-rw-r--r--dev-lang/elixir/elixir-1.5.1.ebuild29
-rw-r--r--dev-lang/elixir/metadata.xml30
-rw-r--r--dev-lang/epic/Manifest6
-rw-r--r--dev-lang/epic/epic-0.9.3.3-r1.ebuild39
-rw-r--r--dev-lang/epic/files/epic-0.9.3.3-respect-user-cflags.patch13
-rw-r--r--dev-lang/epic/metadata.xml16
-rw-r--r--dev-lang/erlang/Manifest23
-rw-r--r--dev-lang/erlang/erlang-18.3.ebuild161
-rw-r--r--dev-lang/erlang/erlang-19.1.ebuild155
-rw-r--r--dev-lang/erlang/erlang-19.3.ebuild157
-rw-r--r--dev-lang/erlang/erlang-20.0.ebuild157
-rw-r--r--dev-lang/erlang/files/18.2.1-wx3.0.patch113
-rw-r--r--dev-lang/erlang/files/50erlang-gentoo.el5
-rw-r--r--dev-lang/erlang/files/epmd.init19
-rw-r--r--dev-lang/erlang/files/epmd.service9
-rw-r--r--dev-lang/erlang/metadata.xml18
-rw-r--r--dev-lang/esco/Manifest5
-rw-r--r--dev-lang/esco/esco-0.512.ebuild31
-rw-r--r--dev-lang/esco/metadata.xml11
-rw-r--r--dev-lang/execline/Manifest17
-rw-r--r--dev-lang/execline/execline-2.1.1.0.ebuild54
-rw-r--r--dev-lang/execline/execline-2.1.4.5.ebuild54
-rw-r--r--dev-lang/execline/execline-2.1.5.0.ebuild49
-rw-r--r--dev-lang/execline/execline-2.2.0.0.ebuild52
-rw-r--r--dev-lang/execline/execline-2.3.0.0.ebuild52
-rw-r--r--dev-lang/execline/execline-2.3.0.1.ebuild55
-rw-r--r--dev-lang/execline/execline-2.3.0.2.ebuild55
-rw-r--r--dev-lang/execline/metadata.xml13
-rw-r--r--dev-lang/f2c/Manifest8
-rw-r--r--dev-lang/f2c/f2c-20060507.ebuild36
-rw-r--r--dev-lang/f2c/f2c-20100827.ebuild50
-rw-r--r--dev-lang/f2c/metadata.xml18
-rw-r--r--dev-lang/ferite/Manifest6
-rw-r--r--dev-lang/ferite/ferite-1.1.17-r1.ebuild78
-rw-r--r--dev-lang/ferite/files/ferite-pcre.patch26
-rw-r--r--dev-lang/ferite/metadata.xml8
-rw-r--r--dev-lang/fpc/Manifest27
-rw-r--r--dev-lang/fpc/fpc-2.6.4.ebuild174
-rw-r--r--dev-lang/fpc/fpc-3.0.0.ebuild161
-rw-r--r--dev-lang/fpc/fpc-3.0.2-r1.ebuild165
-rw-r--r--dev-lang/fpc/fpc-3.0.2.ebuild161
-rw-r--r--dev-lang/fpc/metadata.xml13
-rw-r--r--dev-lang/fsharp/Manifest7
-rw-r--r--dev-lang/fsharp/fsharp-4.0.1.20.ebuild27
-rw-r--r--dev-lang/fsharp/fsharp-4.1.18.ebuild37
-rw-r--r--dev-lang/fsharp/metadata.xml14
-rw-r--r--dev-lang/gdl/Manifest15
-rw-r--r--dev-lang/gdl/files/0.9.2-include.patch10
-rw-r--r--dev-lang/gdl/files/0.9.5-antlr.patch91
-rw-r--r--dev-lang/gdl/files/0.9.5-png.patch15
-rw-r--r--dev-lang/gdl/files/0.9.6-disable-tests-hanging-under-xvfb-run.patch80
-rw-r--r--dev-lang/gdl/files/0.9.6-fix-file-move.patch14
-rw-r--r--dev-lang/gdl/files/0.9.6-fix-python-function-call.patch30
-rw-r--r--dev-lang/gdl/files/0.9.6-formats.patch111
-rw-r--r--dev-lang/gdl/files/0.9.6-fun-fix.patch56
-rw-r--r--dev-lang/gdl/files/0.9.6-gcc6.patch31
-rw-r--r--dev-lang/gdl/files/0.9.6-python-use-path-and-startup.patch20
-rw-r--r--dev-lang/gdl/gdl-0.9.6-r2.ebuild159
-rw-r--r--dev-lang/gdl/metadata.xml24
-rw-r--r--dev-lang/gforth/Manifest7
-rw-r--r--dev-lang/gforth/files/50gforth-gentoo.el7
-rw-r--r--dev-lang/gforth/files/gforth-0.7.0-make-elc.patch14
-rw-r--r--dev-lang/gforth/gforth-0.7.3.ebuild59
-rw-r--r--dev-lang/gforth/metadata.xml8
-rw-r--r--dev-lang/ghc/Manifest71
-rw-r--r--dev-lang/ghc/files/ghc-7.0.4-CHOST-prefix.patch17
-rw-r--r--dev-lang/ghc/files/ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch78
-rw-r--r--dev-lang/ghc/files/ghc-7.10.3-hardfloat.patch26
-rw-r--r--dev-lang/ghc/files/ghc-7.10.3-relnotes.patch45
-rw-r--r--dev-lang/ghc/files/ghc-7.6.3-preserve-inplace-xattr.patch14
-rw-r--r--dev-lang/ghc/files/ghc-7.8.1_rc1-libbfd.patch81
-rw-r--r--dev-lang/ghc/files/ghc-7.8.2-cgen-constify.patch34
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-linker-warn.patch35
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-pic-sparc.patch31
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-ppc32-fPIC.patch351
-rw-r--r--dev-lang/ghc/files/ghc-7.8.3-prim-lm.patch12
-rw-r--r--dev-lang/ghc/files/ghc-7.8.4-gold.patch27
-rw-r--r--dev-lang/ghc/files/ghc-7.8.4-ia64-CLOSUREs.patch66
-rw-r--r--dev-lang/ghc/files/ghc-8.0.1-limit-jN.patch50
-rw-r--r--dev-lang/ghc/files/ghc-8.0.1-par-g0-on-A32.patch65
-rw-r--r--dev-lang/ghc/files/ghc-8.0.1-ww-args-limit.patch127
-rw-r--r--dev-lang/ghc/files/ghc-8.0.1_rc1-cgen-constify.patch34
-rw-r--r--dev-lang/ghc/files/ghc-8.0.2-O2-unreg.patch35
-rw-r--r--dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch57
-rw-r--r--dev-lang/ghc/files/ghc-8.0.2_rc2-old-sphinx.patch12
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1-darwin.patch31
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-cgen-constify.patch378
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-ghci-cross.patch60
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-hp2ps-cross.patch104
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-stage2-cross.patch81
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-staged-cross.patch43
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-unphased-cross.patch30
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-win32-cross-1.patch124
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc1-win32-cross-2-hack.patch144
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc2-O2-unreg.patch35
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc3-any-vendor.patch44
-rw-r--r--dev-lang/ghc/files/ghc-8.2.1_rc3-stginit-data.patch27
-rw-r--r--dev-lang/ghc/files/ghc-bash-completion218
-rw-r--r--dev-lang/ghc/ghc-7.10.3.ebuild686
-rw-r--r--dev-lang/ghc/ghc-7.8.4.ebuild616
-rw-r--r--dev-lang/ghc/ghc-8.0.2.ebuild681
-rw-r--r--dev-lang/ghc/ghc-8.2.1.ebuild765
-rw-r--r--dev-lang/ghc/metadata.xml13
-rw-r--r--dev-lang/gnat-gpl/Manifest27
-rw-r--r--dev-lang/gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la334
-rw-r--r--dev-lang/gnat-gpl/files/c8920
-rw-r--r--dev-lang/gnat-gpl/files/c9921
-rw-r--r--dev-lang/gnat-gpl/files/fix_libtool_files.sh66
-rw-r--r--dev-lang/gnat-gpl/files/gcc-configure-LANG.patch64
-rw-r--r--dev-lang/gnat-gpl/files/gcc-configure-texinfo.patch16
-rw-r--r--dev-lang/gnat-gpl/files/gcc-spec-env-r1.patch87
-rw-r--r--dev-lang/gnat-gpl/files/gnat-gpl-2016-gentoo.patch57
-rw-r--r--dev-lang/gnat-gpl/files/gnat-gpl-2017-gentoo.patch32
-rw-r--r--dev-lang/gnat-gpl/gnat-gpl-2016.ebuild191
-rw-r--r--dev-lang/gnat-gpl/gnat-gpl-2017.ebuild176
-rw-r--r--dev-lang/gnat-gpl/metadata.xml36
-rw-r--r--dev-lang/gnu-smalltalk/Manifest7
-rw-r--r--dev-lang/gnu-smalltalk/files/50gnu-smalltalk-gentoo.el7
-rw-r--r--dev-lang/gnu-smalltalk/files/gnu-smalltalk-3.2_use-result.patch16
-rw-r--r--dev-lang/gnu-smalltalk/gnu-smalltalk-3.2.5.ebuild80
-rw-r--r--dev-lang/gnu-smalltalk/metadata.xml14
-rw-r--r--dev-lang/gnuprologjava/Manifest5
-rw-r--r--dev-lang/gnuprologjava/files/gnuprologjava-0.2.6-manual.patch11
-rw-r--r--dev-lang/gnuprologjava/gnuprologjava-0.2.6.ebuild44
-rw-r--r--dev-lang/gnuprologjava/metadata.xml8
-rw-r--r--dev-lang/go/Manifest21
-rw-r--r--dev-lang/go/go-1.8.3.ebuild227
-rw-r--r--dev-lang/go/go-1.9.1.ebuild227
-rw-r--r--dev-lang/go/go-1.9.ebuild227
-rw-r--r--dev-lang/go/go-9999.ebuild227
-rw-r--r--dev-lang/go/metadata.xml16
-rw-r--r--dev-lang/gprolog/Manifest10
-rw-r--r--dev-lang/gprolog/files/gprolog-1.4.4-ldflags.patch40
-rw-r--r--dev-lang/gprolog/files/gprolog-1.4.4-links.patch16
-rw-r--r--dev-lang/gprolog/files/gprolog-1.4.4-nodocs.patch30
-rw-r--r--dev-lang/gprolog/files/gprolog-1.4.4-pic-code.patch12
-rw-r--r--dev-lang/gprolog/files/gprolog-1.4.4-txt-file.patch11
-rw-r--r--dev-lang/gprolog/gprolog-1.4.4.ebuild63
-rw-r--r--dev-lang/gprolog/metadata.xml8
-rw-r--r--dev-lang/gwydion-dylan-bin/Manifest6
-rw-r--r--dev-lang/gwydion-dylan-bin/files/20gwydion-dylan-bin4
-rw-r--r--dev-lang/gwydion-dylan-bin/gwydion-dylan-bin-2.4.0-r1.ebuild29
-rw-r--r--dev-lang/gwydion-dylan-bin/metadata.xml14
-rw-r--r--dev-lang/helium/Manifest11
-rw-r--r--dev-lang/helium/files/helium-1.6-respect-cflags-ldflags-nostrip.patch59
-rw-r--r--dev-lang/helium/files/helium-1.8.1-ghc-7.10.patch55
-rw-r--r--dev-lang/helium/files/helium-wrapper-1.631
-rw-r--r--dev-lang/helium/helium-1.6.ebuild104
-rw-r--r--dev-lang/helium/helium-1.8.1.ebuild35
-rw-r--r--dev-lang/helium/metadata.xml8
-rw-r--r--dev-lang/hy/Manifest15
-rw-r--r--dev-lang/hy/hy-0.10.0.ebuild31
-rw-r--r--dev-lang/hy/hy-0.10.1.ebuild31
-rw-r--r--dev-lang/hy/hy-0.11.1.ebuild42
-rw-r--r--dev-lang/hy/hy-0.12.0.ebuild42
-rw-r--r--dev-lang/hy/hy-0.12.1.ebuild42
-rw-r--r--dev-lang/hy/hy-0.13.0.ebuild41
-rw-r--r--dev-lang/hy/metadata.xml11
-rw-r--r--dev-lang/icc/Manifest11
-rw-r--r--dev-lang/icc/icc-13.1.5.192.ebuild33
-rw-r--r--dev-lang/icc/icc-14.0.3.174.ebuild34
-rw-r--r--dev-lang/icc/icc-15.0.6.233.ebuild34
-rw-r--r--dev-lang/icc/metadata.xml16
-rw-r--r--dev-lang/icon/Manifest14
-rw-r--r--dev-lang/icon/files/icon-9.4.3-flags.patch62
-rw-r--r--dev-lang/icon/files/icon-9.5.0-flags.patch75
-rw-r--r--dev-lang/icon/files/icon-9.5.1-flags.patch75
-rw-r--r--dev-lang/icon/files/tests-943.patch113
-rw-r--r--dev-lang/icon/icon-9.4.3-r5.ebuild106
-rw-r--r--dev-lang/icon/icon-9.5.0-r1.ebuild104
-rw-r--r--dev-lang/icon/icon-9.5.0.ebuild103
-rw-r--r--dev-lang/icon/icon-9.5.1.ebuild102
-rw-r--r--dev-lang/icon/metadata.xml16
-rw-r--r--dev-lang/idb/Manifest9
-rw-r--r--dev-lang/idb/idb-13.0.5.192.ebuild32
-rw-r--r--dev-lang/idb/idb-14.0.3.174.ebuild39
-rw-r--r--dev-lang/idb/metadata.xml18
-rw-r--r--dev-lang/ifc/Manifest11
-rw-r--r--dev-lang/ifc/ifc-13.1.5.192.ebuild33
-rw-r--r--dev-lang/ifc/ifc-14.0.3.174.ebuild34
-rw-r--r--dev-lang/ifc/ifc-15.0.6.233.ebuild35
-rw-r--r--dev-lang/ifc/metadata.xml17
-rw-r--r--dev-lang/inform/Manifest5
-rw-r--r--dev-lang/inform/inform-6.33.1_p2.ebuild25
-rw-r--r--dev-lang/inform/metadata.xml44
-rw-r--r--dev-lang/interprolog/Manifest7
-rw-r--r--dev-lang/interprolog/files/build.xml45
-rw-r--r--dev-lang/interprolog/files/interprolog-2.1.2-java1.4.patch24
-rw-r--r--dev-lang/interprolog/interprolog-2.1.2.ebuild60
-rw-r--r--dev-lang/interprolog/metadata.xml8
-rw-r--r--dev-lang/ispc/Manifest6
-rw-r--r--dev-lang/ispc/ispc-1.9.1.ebuild52
-rw-r--r--dev-lang/ispc/ispc-9999.ebuild51
-rw-r--r--dev-lang/ispc/metadata.xml11
-rw-r--r--dev-lang/j/Manifest5
-rw-r--r--dev-lang/j/j-701-r2.ebuild44
-rw-r--r--dev-lang/j/metadata.xml8
-rw-r--r--dev-lang/jimtcl/Manifest16
-rw-r--r--dev-lang/jimtcl/files/jimtcl-0.75-bootstrap.patch15
-rw-r--r--dev-lang/jimtcl/jimtcl-0.70_pre20110317.ebuild37
-rw-r--r--dev-lang/jimtcl/jimtcl-0.73.ebuild42
-rw-r--r--dev-lang/jimtcl/jimtcl-0.74-r1.ebuild46
-rw-r--r--dev-lang/jimtcl/jimtcl-0.75-r1.ebuild71
-rw-r--r--dev-lang/jimtcl/jimtcl-0.75.ebuild46
-rw-r--r--dev-lang/jimtcl/jimtcl-0.76.ebuild71
-rw-r--r--dev-lang/jimtcl/jimtcl-9999.ebuild71
-rw-r--r--dev-lang/jimtcl/metadata.xml11
-rw-r--r--dev-lang/julia/Manifest14
-rw-r--r--dev-lang/julia/files/63julia-gentoo.el2
-rw-r--r--dev-lang/julia/files/julia-0.5.0-fix_build_system.patch85
-rw-r--r--dev-lang/julia/files/julia-0.6.0-fix_build_system.patch87
-rw-r--r--dev-lang/julia/files/julia-9999-fix_build_system.patch64
-rw-r--r--dev-lang/julia/julia-0.5.0-r3.ebuild188
-rw-r--r--dev-lang/julia/julia-0.6.0-r1.ebuild187
-rw-r--r--dev-lang/julia/julia-9999.ebuild166
-rw-r--r--dev-lang/julia/metadata.xml27
-rw-r--r--dev-lang/jwasm/Manifest6
-rw-r--r--dev-lang/jwasm/files/jwasm-2.11-types-test.patch58
-rw-r--r--dev-lang/jwasm/jwasm-2.11a.ebuild39
-rw-r--r--dev-lang/jwasm/metadata.xml12
-rw-r--r--dev-lang/lazarus/Manifest10
-rw-r--r--dev-lang/lazarus/files/lazarus-0.9.26-fpcsrc.patch13
-rw-r--r--dev-lang/lazarus/lazarus-1.0.12.ebuild75
-rw-r--r--dev-lang/lazarus/lazarus-1.6.2.ebuild75
-rw-r--r--dev-lang/lazarus/lazarus-1.6.4.ebuild75
-rw-r--r--dev-lang/lazarus/metadata.xml18
-rw-r--r--dev-lang/lfe/Manifest11
-rw-r--r--dev-lang/lfe/lfe-0.10.1.ebuild36
-rw-r--r--dev-lang/lfe/lfe-0.7.ebuild31
-rw-r--r--dev-lang/lfe/lfe-1.0.ebuild36
-rw-r--r--dev-lang/lfe/lfe-1.1.1.ebuild36
-rw-r--r--dev-lang/lfe/metadata.xml11
-rw-r--r--dev-lang/lisaac/Manifest7
-rw-r--r--dev-lang/lisaac/files/50lisaac-gentoo.el4
-rw-r--r--dev-lang/lisaac/files/lisaac-0.13.1-makefile.patch33
-rw-r--r--dev-lang/lisaac/lisaac-0.13.1-r2.ebuild73
-rw-r--r--dev-lang/lisaac/metadata.xml5
-rw-r--r--dev-lang/logtalk/Manifest15
-rw-r--r--dev-lang/logtalk/files/logtalk-3.00.0-no-user-docs.patch34
-rw-r--r--dev-lang/logtalk/files/logtalk-3.03.0-no-user-docs.patch34
-rw-r--r--dev-lang/logtalk/files/logtalk-3.07.0-no-user-docs.patch34
-rw-r--r--dev-lang/logtalk/files/logtalk-3.11.2-portage.patch18
-rw-r--r--dev-lang/logtalk/logtalk-3.00.0.ebuild132
-rw-r--r--dev-lang/logtalk/logtalk-3.03.0.ebuild132
-rw-r--r--dev-lang/logtalk/logtalk-3.07.0.ebuild130
-rw-r--r--dev-lang/logtalk/logtalk-3.11.2.ebuild126
-rw-r--r--dev-lang/logtalk/metadata.xml12
-rw-r--r--dev-lang/lua/Manifest37
-rw-r--r--dev-lang/lua/files/5.1.4/01_all_boolean_expression.upstream.patch48
-rw-r--r--dev-lang/lua/files/5.1.4/02_all_table.upstream.patch22
-rw-r--r--dev-lang/lua/files/5.1.4/03_all_debug_getfenv.upstream.patch10
-rw-r--r--dev-lang/lua/files/5.1.4/04_all_gc_performance.upstream.patch14
-rw-r--r--dev-lang/lua/files/5.1.4/05_all_string_format.upstream.patch21
-rw-r--r--dev-lang/lua/files/5.1.4/06_all_io_read.upstream.patch15
-rw-r--r--dev-lang/lua/files/5.1.4/07_all_boolean_expression.upstream.patch30
-rw-r--r--dev-lang/lua/files/5.1.4/08_all_metatable.upstream.patch10
-rw-r--r--dev-lang/lua/files/5.1.4/09_all_prototype_collection.upstream.patch13
-rw-r--r--dev-lang/lua/files/5.2.0/01_all_memory_hoarding.upstream.patch49
-rw-r--r--dev-lang/lua/files/5.2.0/02_all_hex_number_handling.upstream.patch26
-rw-r--r--dev-lang/lua/files/configure.in5
-rw-r--r--dev-lang/lua/files/lua-5.1-make-r1.patch66
-rw-r--r--dev-lang/lua/files/lua-5.1-make-r2.patch97
-rw-r--r--dev-lang/lua/files/lua-5.1-make_static-r1.patch12
-rw-r--r--dev-lang/lua/files/lua-5.1-module_paths.patch30
-rw-r--r--dev-lang/lua/files/lua-5.1-readline.patch10
-rw-r--r--dev-lang/lua/files/lua-5.1.4-deprecated.patch46
-rw-r--r--dev-lang/lua/files/lua-5.1.4-test.patch11
-rw-r--r--dev-lang/lua/files/lua-5.1.5-fix_vararg_calls.patch12
-rw-r--r--dev-lang/lua/files/lua-5.2-make-r1.patch75
-rw-r--r--dev-lang/lua/files/lua-5.3-make-r1.patch91
-rw-r--r--dev-lang/lua/files/lua.pc31
-rw-r--r--dev-lang/lua/lua-5.1.5-r100.ebuild137
-rw-r--r--dev-lang/lua/lua-5.1.5-r101.ebuild144
-rw-r--r--dev-lang/lua/lua-5.1.5-r4.ebuild134
-rw-r--r--dev-lang/lua/lua-5.2.3-r1.ebuild136
-rw-r--r--dev-lang/lua/lua-5.2.3-r2.ebuild143
-rw-r--r--dev-lang/lua/lua-5.2.3.ebuild117
-rw-r--r--dev-lang/lua/lua-5.3.3-r1.ebuild143
-rw-r--r--dev-lang/lua/lua-5.3.3.ebuild136
-rw-r--r--dev-lang/lua/metadata.xml13
-rw-r--r--dev-lang/luajit/Manifest12
-rw-r--r--dev-lang/luajit/luajit-1.1.6.ebuild54
-rw-r--r--dev-lang/luajit/luajit-2.0.2.ebuild66
-rw-r--r--dev-lang/luajit/luajit-2.0.3-r1.ebuild61
-rw-r--r--dev-lang/luajit/luajit-2.0.3.ebuild66
-rw-r--r--dev-lang/luajit/luajit-2.0.4.ebuild61
-rw-r--r--dev-lang/luajit/metadata.xml17
-rw-r--r--dev-lang/maude/Manifest9
-rw-r--r--dev-lang/maude/files/maude-2.5.0-prll.patch24
-rw-r--r--dev-lang/maude/files/maude-2.6-search-datadir.patch37
-rw-r--r--dev-lang/maude/files/maude-2.7-bison-parse-param.patch39
-rw-r--r--dev-lang/maude/maude-2.7.ebuild57
-rw-r--r--dev-lang/maude/metadata.xml16
-rw-r--r--dev-lang/mercury-extras/Manifest12
-rw-r--r--dev-lang/mercury-extras/mercury-extras-13.05.2.ebuild198
-rw-r--r--dev-lang/mercury-extras/mercury-extras-14.01.1.ebuild199
-rw-r--r--dev-lang/mercury-extras/mercury-extras-14.01.ebuild198
-rw-r--r--dev-lang/mercury-extras/metadata.xml8
-rw-r--r--dev-lang/mercury/Manifest13
-rw-r--r--dev-lang/mercury/files/50mercury-gentoo.el5
-rw-r--r--dev-lang/mercury/mercury-13.05.2.ebuild198
-rw-r--r--dev-lang/mercury/mercury-14.01.1.ebuild201
-rw-r--r--dev-lang/mercury/mercury-14.01.ebuild202
-rw-r--r--dev-lang/mercury/metadata.xml12
-rw-r--r--dev-lang/metadata.xml40
-rw-r--r--dev-lang/mlton/Manifest10
-rw-r--r--dev-lang/mlton/files/mlton-20070826-no-execmem.patch29
-rw-r--r--dev-lang/mlton/files/mlton-20130715-no-PIE.patch66
-rw-r--r--dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch11
-rw-r--r--dev-lang/mlton/metadata.xml14
-rw-r--r--dev-lang/mlton/mlton-20130715.ebuild119
-rw-r--r--dev-lang/mmix/Manifest9
-rw-r--r--dev-lang/mmix/files/mmix-20110420-makefile.patch71
-rw-r--r--dev-lang/mmix/files/mmix-20131017-format-security.patch59
-rw-r--r--dev-lang/mmix/metadata.xml8
-rw-r--r--dev-lang/mmix/mmix-20131017.ebuild48
-rw-r--r--dev-lang/mmix/mmix-20160804.ebuild48
-rw-r--r--dev-lang/moarvm/Manifest10
-rw-r--r--dev-lang/moarvm/metadata.xml26
-rw-r--r--dev-lang/moarvm/moarvm-2017.07.ebuild61
-rw-r--r--dev-lang/moarvm/moarvm-2017.08.1.ebuild59
-rw-r--r--dev-lang/moarvm/moarvm-2017.09.1.ebuild58
-rw-r--r--dev-lang/moarvm/moarvm-9999.ebuild61
-rw-r--r--dev-lang/mono-basic/Manifest5
-rw-r--r--dev-lang/mono-basic/metadata.xml11
-rw-r--r--dev-lang/mono-basic/mono-basic-2.10.ebuild16
-rw-r--r--dev-lang/mono/Manifest22
-rw-r--r--dev-lang/mono/files/mono-2.10.2-threads-access.patch40
-rw-r--r--dev-lang/mono/files/mono-2.10.9-CVE-2012-3382.patch13
-rw-r--r--dev-lang/mono/files/mono-2.10.9-CVE-2012-3543.patch196
-rw-r--r--dev-lang/mono/files/mono-2.10.9-CVE-2012-3543_2.patch34
-rw-r--r--dev-lang/mono/files/mono-4.8.0.371-makedev.patch34
-rw-r--r--dev-lang/mono/files/mono-4.8.0.371-x86_32.patch27
-rw-r--r--dev-lang/mono/metadata.xml12
-rw-r--r--dev-lang/mono/mono-2.10.9-r2.ebuild265
-rw-r--r--dev-lang/mono/mono-4.4.1.0.ebuild113
-rw-r--r--dev-lang/mono/mono-4.6.1.5-r1.ebuild118
-rw-r--r--dev-lang/mono/mono-4.6.1.5.ebuild113
-rw-r--r--dev-lang/mono/mono-4.8.0.425.ebuild111
-rw-r--r--dev-lang/mono/mono-4.8.0.495.ebuild111
-rw-r--r--dev-lang/mono/mono-4.8.0.524.ebuild111
-rw-r--r--dev-lang/mozart-stdlib/Manifest7
-rw-r--r--dev-lang/mozart-stdlib/files/mozart-stdlib-1.4.0-docroot.patch13
-rw-r--r--dev-lang/mozart-stdlib/files/mozart-stdlib-1.4.0-ozload.patch13
-rw-r--r--dev-lang/mozart-stdlib/metadata.xml8
-rw-r--r--dev-lang/mozart-stdlib/mozart-stdlib-1.4.0-r1.ebuild40
-rw-r--r--dev-lang/mozart/Manifest8
-rw-r--r--dev-lang/mozart/files/50mozart-gentoo.el11
-rw-r--r--dev-lang/mozart/metadata.xml8
-rw-r--r--dev-lang/mozart/mozart-1.4.0-r3.ebuild124
-rw-r--r--dev-lang/mujs/Manifest9
-rw-r--r--dev-lang/mujs/files/mujs-0_p20150202-Makefile.patch28
-rw-r--r--dev-lang/mujs/files/mujs-1.0.1-gentoo.patch37
-rw-r--r--dev-lang/mujs/metadata.xml8
-rw-r--r--dev-lang/mujs/mujs-0_p20161202.ebuild34
-rw-r--r--dev-lang/mujs/mujs-1.0.1-r1.ebuild42
-rw-r--r--dev-lang/nasm/Manifest10
-rw-r--r--dev-lang/nasm/files/nasm-2.13.01-fix-docdir.patch177
-rw-r--r--dev-lang/nasm/metadata.xml20
-rw-r--r--dev-lang/nasm/nasm-2.11.08.ebuild41
-rw-r--r--dev-lang/nasm/nasm-2.12.01.ebuild41
-rw-r--r--dev-lang/nasm/nasm-2.13.01.ebuild44
-rw-r--r--dev-lang/nim/Manifest8
-rw-r--r--dev-lang/nim/metadata.xml11
-rw-r--r--dev-lang/nim/nim-0.16.0.ebuild54
-rw-r--r--dev-lang/nim/nim-0.17.0.ebuild51
-rw-r--r--dev-lang/nim/nim-0.17.2.ebuild55
-rw-r--r--dev-lang/nqp/Manifest10
-rw-r--r--dev-lang/nqp/metadata.xml23
-rw-r--r--dev-lang/nqp/nqp-2017.07.ebuild159
-rw-r--r--dev-lang/nqp/nqp-2017.08.ebuild159
-rw-r--r--dev-lang/nqp/nqp-2017.09.ebuild159
-rw-r--r--dev-lang/nqp/nqp-9999.ebuild159
-rw-r--r--dev-lang/nwcc/Manifest7
-rw-r--r--dev-lang/nwcc/metadata.xml11
-rw-r--r--dev-lang/nwcc/nwcc-0.8.2.ebuild24
-rw-r--r--dev-lang/nwcc/nwcc-0.8.3.ebuild24
-rw-r--r--dev-lang/ocaml/Manifest14
-rw-r--r--dev-lang/ocaml/files/ocaml-rebuild.sh51
-rw-r--r--dev-lang/ocaml/files/ocaml.conf5
-rw-r--r--dev-lang/ocaml/metadata.xml15
-rw-r--r--dev-lang/ocaml/ocaml-4.04.2.ebuild127
-rw-r--r--dev-lang/ocaml/ocaml-4.05.0.ebuild129
-rw-r--r--dev-lang/ocaml/ocaml-4.06.0_beta1.ebuild127
-rw-r--r--dev-lang/open-cobol/Manifest5
-rw-r--r--dev-lang/open-cobol/metadata.xml11
-rw-r--r--dev-lang/open-cobol/open-cobol-1.1.ebuild33
-rw-r--r--dev-lang/opendylan-bin/Manifest18
-rw-r--r--dev-lang/opendylan-bin/metadata.xml8
-rw-r--r--dev-lang/opendylan-bin/opendylan-bin-2011.1.ebuild32
-rw-r--r--dev-lang/opendylan-bin/opendylan-bin-2012.1.ebuild32
-rw-r--r--dev-lang/opendylan-bin/opendylan-bin-2013.1.ebuild32
-rw-r--r--dev-lang/opendylan-bin/opendylan-bin-2013.2.ebuild32
-rw-r--r--dev-lang/opendylan-bin/opendylan-bin-2014.1.ebuild32
-rw-r--r--dev-lang/opendylan/Manifest10
-rw-r--r--dev-lang/opendylan/metadata.xml8
-rw-r--r--dev-lang/opendylan/opendylan-2013.1-r1.ebuild103
-rw-r--r--dev-lang/opendylan/opendylan-2013.2.ebuild108
-rw-r--r--dev-lang/opendylan/opendylan-2014.1.ebuild104
-rw-r--r--dev-lang/opendylan/opendylan-9999.ebuild65
-rw-r--r--dev-lang/orc/Manifest7
-rw-r--r--dev-lang/orc/metadata.xml11
-rw-r--r--dev-lang/orc/orc-0.4.26-r1.ebuild70
-rw-r--r--dev-lang/orc/orc-0.4.27.ebuild70
-rw-r--r--dev-lang/parrot/Manifest11
-rw-r--r--dev-lang/parrot/metadata.xml8
-rw-r--r--dev-lang/parrot/parrot-7.1.0.ebuild83
-rw-r--r--dev-lang/parrot/parrot-7.11.0.ebuild83
-rw-r--r--dev-lang/parrot/parrot-7.5.0.ebuild83
-rw-r--r--dev-lang/parrot/parrot-8.1.0.ebuild83
-rw-r--r--dev-lang/pasm/Manifest6
-rw-r--r--dev-lang/pasm/files/pasm-1.7-ppc.patch29
-rw-r--r--dev-lang/pasm/metadata.xml13
-rw-r--r--dev-lang/pasm/pasm-1.7.ebuild28
-rw-r--r--dev-lang/pcc/Manifest7
-rw-r--r--dev-lang/pcc/files/pcc-1.1.0-multiarch.patch11
-rw-r--r--dev-lang/pcc/metadata.xml8
-rw-r--r--dev-lang/pcc/pcc-1.1.0-r1.ebuild37
-rw-r--r--dev-lang/pcc/pcc-9999.ebuild44
-rw-r--r--dev-lang/perl/Manifest26
-rw-r--r--dev-lang/perl/metadata.xml14
-rw-r--r--dev-lang/perl/perl-5.24.1-r2.ebuild563
-rw-r--r--dev-lang/perl/perl-5.24.2.ebuild564
-rw-r--r--dev-lang/perl/perl-5.24.3.ebuild564
-rw-r--r--dev-lang/perl/perl-5.26.0.ebuild596
-rw-r--r--dev-lang/perl/perl-5.26.1.ebuild623
-rw-r--r--dev-lang/perl/perl-5.26.9999.ebuild623
-rw-r--r--dev-lang/perl/perl-5.28.9999.ebuild623
-rw-r--r--dev-lang/php/Manifest22
-rw-r--r--dev-lang/php/files/20php5-envd2
-rw-r--r--dev-lang/php/files/php-5.6-no-bison-warnings.patch42
-rw-r--r--dev-lang/php/files/php-fpm_at-simple.service13
-rw-r--r--dev-lang/php/files/php-fpm_at.service14
-rw-r--r--dev-lang/php/metadata.xml52
-rw-r--r--dev-lang/php/php-5.6.31.ebuild771
-rw-r--r--dev-lang/php/php-7.0.23.ebuild739
-rw-r--r--dev-lang/php/php-7.0.24.ebuild739
-rw-r--r--dev-lang/php/php-7.1.10.ebuild721
-rw-r--r--dev-lang/php/php-7.1.9.ebuild721
-rw-r--r--dev-lang/php/php-7.2.0_rc2.ebuild734
-rw-r--r--dev-lang/php/php-7.2.0_rc3.ebuild734
-rw-r--r--dev-lang/polyml/Manifest24
-rw-r--r--dev-lang/polyml/files/polyml-5.4.1-asm.patch28
-rw-r--r--dev-lang/polyml/files/polyml-5.4.1-configure.patch11
-rw-r--r--dev-lang/polyml/files/polyml-5.5.0-asm.patch10
-rw-r--r--dev-lang/polyml/files/polyml-5.5.0-configure.patch138
-rw-r--r--dev-lang/polyml/files/polyml-5.5.0-x-it-basis.patch21
-rw-r--r--dev-lang/polyml/files/polyml-5.5.1-inputN-return-for-zero-chars.patch33
-rw-r--r--dev-lang/polyml/files/polyml-5.5.1-optimize-closure.patch141
-rw-r--r--dev-lang/polyml/files/polyml-5.5.2-r1952-check_for_negative_sized_array.patch13
-rw-r--r--dev-lang/polyml/files/polyml-5.5.2-r1954_Fix_segfault_in_FFI_when_malloc_runs_out_of_memory.patch112
-rw-r--r--dev-lang/polyml/files/polyml-5.5.2-r2007_Ensure_the_large_object_cache_pointer_is_cleared.patch27
-rw-r--r--dev-lang/polyml/files/polyml-5.5.2-r2009_Initialise_the_largeObjectCache_fully_in_the_constructor.patch21
-rw-r--r--dev-lang/polyml/metadata.xml18
-rw-r--r--dev-lang/polyml/polyml-5.4.1.ebuild44
-rw-r--r--dev-lang/polyml/polyml-5.5.0.ebuild50
-rw-r--r--dev-lang/polyml/polyml-5.5.1.ebuild71
-rw-r--r--dev-lang/polyml/polyml-5.5.2.ebuild71
-rw-r--r--dev-lang/polyml/polyml-5.6.ebuild52
-rw-r--r--dev-lang/python-exec/Manifest8
-rw-r--r--dev-lang/python-exec/metadata.xml17
-rw-r--r--dev-lang/python-exec/python-exec-2.4.4.ebuild133
-rw-r--r--dev-lang/python-exec/python-exec-2.4.5.ebuild134
-rw-r--r--dev-lang/python-exec/python-exec-9999.ebuild149
-rw-r--r--dev-lang/python/Manifest42
-rw-r--r--dev-lang/python/files/3.6-blake2.patch37
-rw-r--r--dev-lang/python/files/3.6.1-test_socket-AEAD.patch75
-rw-r--r--dev-lang/python/files/pydoc.conf6
-rw-r--r--dev-lang/python/files/pydoc.init24
-rw-r--r--dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch24
-rw-r--r--dev-lang/python/files/python-2.7.10-system-libffi.patch36
-rw-r--r--dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch18
-rw-r--r--dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch13
-rw-r--r--dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch13
-rw-r--r--dev-lang/python/files/python-3.4.5-cross.patch11
-rw-r--r--dev-lang/python/files/python-3.5-distutils-OO-build.patch80
-rw-r--r--dev-lang/python/metadata.xml13
-rw-r--r--dev-lang/python/python-2.7.12.ebuild365
-rw-r--r--dev-lang/python/python-2.7.13.ebuild365
-rw-r--r--dev-lang/python/python-2.7.14.ebuild365
-rw-r--r--dev-lang/python/python-3.4.5.ebuild356
-rw-r--r--dev-lang/python/python-3.4.6.ebuild356
-rw-r--r--dev-lang/python/python-3.5.3.ebuild362
-rw-r--r--dev-lang/python/python-3.5.4.ebuild362
-rw-r--r--dev-lang/python/python-3.6.1-r1.ebuild343
-rw-r--r--dev-lang/python/python-3.6.3.ebuild342
-rw-r--r--dev-lang/qu-prolog/Manifest23
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-10.0-associated-item.patch11
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-10.0-configure.patch21
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-10.0-gcc6.patch38
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.1-cerr-ptr.patch40
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.1-cflags.patch34
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.1-gcc.patch33
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.1-portage.patch32
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.5-cflags.patch34
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.5-portage.patch32
-rw-r--r--dev-lang/qu-prolog/metadata.xml11
-rw-r--r--dev-lang/qu-prolog/qu-prolog-10.0.ebuild97
-rw-r--r--dev-lang/qu-prolog/qu-prolog-9.1-r1.ebuild95
-rw-r--r--dev-lang/qu-prolog/qu-prolog-9.1.ebuild102
-rw-r--r--dev-lang/qu-prolog/qu-prolog-9.5.ebuild93
-rw-r--r--dev-lang/qu-prolog/qu-prolog-9.6.ebuild90
-rw-r--r--dev-lang/qu-prolog/qu-prolog-9.7.ebuild90
-rw-r--r--dev-lang/rakudo/Manifest11
-rw-r--r--dev-lang/rakudo/files/rakudo-2016.04-jna-lib.patch21
-rw-r--r--dev-lang/rakudo/metadata.xml20
-rw-r--r--dev-lang/rakudo/rakudo-2017.07.ebuild72
-rw-r--r--dev-lang/rakudo/rakudo-2017.08.ebuild72
-rw-r--r--dev-lang/rakudo/rakudo-2017.09.ebuild72
-rw-r--r--dev-lang/rakudo/rakudo-9999.ebuild79
-rw-r--r--dev-lang/rebol-bin/Manifest8
-rw-r--r--dev-lang/rebol-bin/metadata.xml12
-rw-r--r--dev-lang/rebol-bin/rebol-bin-3_pre111.ebuild30
-rw-r--r--dev-lang/rebol-bin/rebol-bin-3_pre20140304.ebuild39
-rw-r--r--dev-lang/rebol/Manifest4
-rw-r--r--dev-lang/rebol/metadata.xml8
-rw-r--r--dev-lang/rebol/rebol-9999.ebuild39
-rw-r--r--dev-lang/regina-rexx/Manifest6
-rw-r--r--dev-lang/regina-rexx/files/rxstack-r114
-rw-r--r--dev-lang/regina-rexx/metadata.xml15
-rw-r--r--dev-lang/regina-rexx/regina-rexx-3.9.1-r1.ebuild45
-rw-r--r--dev-lang/rubinius/Manifest6
-rw-r--r--dev-lang/rubinius/files/auto_gem.rb7
-rw-r--r--dev-lang/rubinius/metadata.xml13
-rw-r--r--dev-lang/rubinius/rubinius-3.43.ebuild88
-rw-r--r--dev-lang/ruby/Manifest13
-rw-r--r--dev-lang/ruby/metadata.xml28
-rw-r--r--dev-lang/ruby/ruby-2.2.8.ebuild245
-rw-r--r--dev-lang/ruby/ruby-2.3.5.ebuild242
-rw-r--r--dev-lang/ruby/ruby-2.4.2.ebuild243
-rw-r--r--dev-lang/rust-bin/Manifest24
-rw-r--r--dev-lang/rust-bin/metadata.xml8
-rw-r--r--dev-lang/rust-bin/rust-bin-1.12.1.ebuild101
-rw-r--r--dev-lang/rust-bin/rust-bin-1.13.0.ebuild101
-rw-r--r--dev-lang/rust-bin/rust-bin-1.14.0.ebuild101
-rw-r--r--dev-lang/rust-bin/rust-bin-1.15.0.ebuild101
-rw-r--r--dev-lang/rust-bin/rust-bin-1.15.1.ebuild101
-rw-r--r--dev-lang/rust-bin/rust-bin-1.16.0.ebuild101
-rw-r--r--dev-lang/rust-bin/rust-bin-1.19.0.ebuild101
-rw-r--r--dev-lang/rust/Manifest19
-rw-r--r--dev-lang/rust/metadata.xml15
-rw-r--r--dev-lang/rust/rust-1.15.1.ebuild153
-rw-r--r--dev-lang/rust/rust-1.16.0.ebuild149
-rw-r--r--dev-lang/rust/rust-1.19.0.ebuild166
-rw-r--r--dev-lang/scala-bin/Manifest5
-rw-r--r--dev-lang/scala-bin/metadata.xml11
-rw-r--r--dev-lang/scala-bin/scala-bin-2.11.8.ebuild84
-rw-r--r--dev-lang/scala/Manifest331
-rw-r--r--dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing-SI-7455.patch165
-rw-r--r--dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing.patch236
-rw-r--r--dev-lang/scala/files/scala-2.10.2-maven-deps.patch70
-rw-r--r--dev-lang/scala/files/scala-2.10.2-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.10.3-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.10.4-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.10.6-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.11.1-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.11.11-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.11.2-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.11.4-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.11.6-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.11.7-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.11.8-no-git.patch24
-rw-r--r--dev-lang/scala/files/scala-2.12.1-no-git.patch37
-rw-r--r--dev-lang/scala/files/scala-2.12.1-runner-script.patch22
-rw-r--r--dev-lang/scala/files/scala-2.12.2-no-git.patch23
-rw-r--r--dev-lang/scala/files/scala-2.9.2-java7.patch198
-rw-r--r--dev-lang/scala/metadata.xml14
-rw-r--r--dev-lang/scala/scala-2.10.2-r3.ebuild253
-rw-r--r--dev-lang/scala/scala-2.10.3-r2.ebuild224
-rw-r--r--dev-lang/scala/scala-2.10.4-r2.ebuild223
-rw-r--r--dev-lang/scala/scala-2.10.6.ebuild223
-rw-r--r--dev-lang/scala/scala-2.11.1-r2.ebuild216
-rw-r--r--dev-lang/scala/scala-2.11.11.ebuild224
-rw-r--r--dev-lang/scala/scala-2.11.2-r2.ebuild218
-rw-r--r--dev-lang/scala/scala-2.11.4-r1.ebuild218
-rw-r--r--dev-lang/scala/scala-2.11.4-r2.ebuild218
-rw-r--r--dev-lang/scala/scala-2.11.6-r1.ebuild218
-rw-r--r--dev-lang/scala/scala-2.11.7-r1.ebuild222
-rw-r--r--dev-lang/scala/scala-2.11.8.ebuild222
-rw-r--r--dev-lang/scala/scala-2.12.1.ebuild213
-rw-r--r--dev-lang/scala/scala-2.12.2.ebuild214
-rw-r--r--dev-lang/scala/scala-2.9.3.ebuild226
-rw-r--r--dev-lang/smlnj/Manifest26
-rw-r--r--dev-lang/smlnj/metadata.xml8
-rw-r--r--dev-lang/smlnj/smlnj-110.75.ebuild112
-rw-r--r--dev-lang/snobol/Manifest11
-rw-r--r--dev-lang/snobol/metadata.xml8
-rw-r--r--dev-lang/snobol/snobol-0.99.4.ebuild45
-rw-r--r--dev-lang/snobol/snobol-0.99.44.ebuild51
-rw-r--r--dev-lang/snobol/snobol-1.1.ebuild59
-rw-r--r--dev-lang/snobol/snobol-1.4.1.ebuild52
-rw-r--r--dev-lang/solidity/Manifest5
-rw-r--r--dev-lang/solidity/files/solidity-0.4.2-commit_hash.txt1
-rw-r--r--dev-lang/solidity/metadata.xml15
-rw-r--r--dev-lang/solidity/solidity-0.4.2.ebuild38
-rw-r--r--dev-lang/spidermonkey/Manifest28
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-52-baseconfig.patch22
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-perl-defined-array-check.patch11
-rw-r--r--dev-lang/spidermonkey/metadata.xml18
-rw-r--r--dev-lang/spidermonkey/spidermonkey-1.7.0-r3.ebuild53
-rw-r--r--dev-lang/spidermonkey/spidermonkey-1.8.5-r4.ebuild145
-rw-r--r--dev-lang/spidermonkey/spidermonkey-1.8.5-r6.ebuild150
-rw-r--r--dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild137
-rw-r--r--dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild141
-rw-r--r--dev-lang/spidermonkey/spidermonkey-24.2.0-r3.ebuild154
-rw-r--r--dev-lang/spidermonkey/spidermonkey-24.2.0-r4.ebuild157
-rw-r--r--dev-lang/spidermonkey/spidermonkey-38.2.1_rc0.ebuild146
-rw-r--r--dev-lang/spidermonkey/spidermonkey-45.0.2.ebuild147
-rw-r--r--dev-lang/spidermonkey/spidermonkey-52.4.0_pre20171003-r1.ebuild145
-rw-r--r--dev-lang/squirrel/Manifest11
-rw-r--r--dev-lang/squirrel/files/squirrel-2.2.4-autotools.patch302
-rw-r--r--dev-lang/squirrel/files/squirrel-2.2.4-gcc47.patch59
-rw-r--r--dev-lang/squirrel/files/squirrel-2.2.4-stdint.h.patch75
-rw-r--r--dev-lang/squirrel/files/squirrel-2.2.4-supertux-const.patch22
-rw-r--r--dev-lang/squirrel/metadata.xml12
-rw-r--r--dev-lang/squirrel/squirrel-2.2.4-r2.ebuild46
-rw-r--r--dev-lang/squirrel/squirrel-3.1.ebuild42
-rw-r--r--dev-lang/srf/Manifest6
-rw-r--r--dev-lang/srf/metadata.xml10
-rw-r--r--dev-lang/srf/srf-1.0-r1.ebuild34
-rw-r--r--dev-lang/srf/srf-1.0-r2.ebuild35
-rw-r--r--dev-lang/swi-prolog/Manifest30
-rw-r--r--dev-lang/swi-prolog/metadata.xml12
-rw-r--r--dev-lang/swi-prolog/swi-prolog-6.6.6.ebuild124
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.2.3-r1.ebuild135
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.4.1.ebuild144
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.4.2.ebuild145
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.5.13.ebuild144
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.5.14.ebuild146
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.5.15.ebuild147
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.6.0_rc1.ebuild148
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.6.0_rc2.ebuild148
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.7.0.ebuild146
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.7.1.ebuild147
-rw-r--r--dev-lang/swig/Manifest19
-rw-r--r--dev-lang/swig/metadata.xml31
-rw-r--r--dev-lang/swig/swig-1.3.40-r2.ebuild39
-rw-r--r--dev-lang/swig/swig-2.0.12.ebuild34
-rw-r--r--dev-lang/swig/swig-2.0.9.ebuild34
-rw-r--r--dev-lang/swig/swig-3.0.10.ebuild34
-rw-r--r--dev-lang/swig/swig-3.0.11.ebuild35
-rw-r--r--dev-lang/swig/swig-3.0.12.ebuild35
-rw-r--r--dev-lang/swig/swig-3.0.5.ebuild34
-rw-r--r--dev-lang/swig/swig-3.0.8.ebuild34
-rw-r--r--dev-lang/tcc/Manifest10
-rw-r--r--dev-lang/tcc/files/clang.patch18
-rw-r--r--dev-lang/tcc/files/linker.patch18
-rw-r--r--dev-lang/tcc/metadata.xml11
-rw-r--r--dev-lang/tcc/tcc-0.9.26-r1.ebuild66
-rw-r--r--dev-lang/tcc/tcc-0.9.26-r2.ebuild63
-rw-r--r--dev-lang/tcc/tcc-0.9.26-r3.ebuild71
-rw-r--r--dev-lang/tcc/tcc-9999.ebuild63
-rw-r--r--dev-lang/tcl/Manifest15
-rw-r--r--dev-lang/tcl/files/tcl-8.5.13-multilib.patch12
-rw-r--r--dev-lang/tcl/files/tcl-8.5.14-conf.patch11
-rw-r--r--dev-lang/tcl/files/tcl-8.6.1-conf.patch11
-rw-r--r--dev-lang/tcl/metadata.xml11
-rw-r--r--dev-lang/tcl/tcl-8.5.17-r100.ebuild93
-rw-r--r--dev-lang/tcl/tcl-8.5.17.ebuild114
-rw-r--r--dev-lang/tcl/tcl-8.6.5.ebuild131
-rw-r--r--dev-lang/tcl/tcl-8.6.6.ebuild133
-rw-r--r--dev-lang/tcl/tcl-8.6.7.ebuild131
-rw-r--r--dev-lang/teyjus/Manifest9
-rw-r--r--dev-lang/teyjus/files/50teyjus-gentoo.el3
-rw-r--r--dev-lang/teyjus/files/teyjus-2.0.2-flags.patch14
-rw-r--r--dev-lang/teyjus/metadata.xml32
-rw-r--r--dev-lang/teyjus/teyjus-2.0.2.ebuild117
-rw-r--r--dev-lang/teyjus/teyjus-2.1.ebuild110
-rw-r--r--dev-lang/tinycobol/Manifest6
-rw-r--r--dev-lang/tinycobol/files/tinycobol-0.65.9.patch140
-rw-r--r--dev-lang/tinycobol/metadata.xml8
-rw-r--r--dev-lang/tinycobol/tinycobol-0.65.9.ebuild46
-rw-r--r--dev-lang/tk/Manifest18
-rw-r--r--dev-lang/tk/files/tk-8.4.15-aqua.patch11
-rw-r--r--dev-lang/tk/files/tk-8.5.11-fedora-xft.patch13
-rw-r--r--dev-lang/tk/files/tk-8.5.13-multilib.patch12
-rw-r--r--dev-lang/tk/files/tk-8.5.14-conf.patch16
-rw-r--r--dev-lang/tk/metadata.xml11
-rw-r--r--dev-lang/tk/tk-8.5.17-r100.ebuild93
-rw-r--r--dev-lang/tk/tk-8.5.17.ebuild123
-rw-r--r--dev-lang/tk/tk-8.6.5-r1.ebuild148
-rw-r--r--dev-lang/tk/tk-8.6.5.ebuild143
-rw-r--r--dev-lang/tk/tk-8.6.6.ebuild148
-rw-r--r--dev-lang/tk/tk-8.6.7.ebuild148
-rw-r--r--dev-lang/tuprolog/Manifest20
-rw-r--r--dev-lang/tuprolog/files/build-2.9.2.xml110
-rw-r--r--dev-lang/tuprolog/files/build-3.0.0.xml110
-rw-r--r--dev-lang/tuprolog/files/build-3.0.1.xml110
-rw-r--r--dev-lang/tuprolog/files/tuprolog-2.9.2-no-dynamic-object-test.patch20
-rw-r--r--dev-lang/tuprolog/files/tuprolog-2.9.2-no-ikvm.patch116
-rw-r--r--dev-lang/tuprolog/files/tuprolog-3.0.0-no-dynamic-object-test.patch20
-rw-r--r--dev-lang/tuprolog/files/tuprolog-3.0.0-no-ikvm.patch137
-rw-r--r--dev-lang/tuprolog/files/tuprolog-3.0.0-oolibrary-unit-test.patch11
-rw-r--r--dev-lang/tuprolog/files/tuprolog-3.0.1-no-ikvm.patch137
-rw-r--r--dev-lang/tuprolog/files/tuprolog-3.0.1-oolibrary-unit-test.patch12
-rw-r--r--dev-lang/tuprolog/files/tuprolog-3.1.0-no-ikvm.patch137
-rw-r--r--dev-lang/tuprolog/metadata.xml11
-rw-r--r--dev-lang/tuprolog/tuprolog-2.9.2.ebuild64
-rw-r--r--dev-lang/tuprolog/tuprolog-3.0.1.ebuild65
-rw-r--r--dev-lang/tuprolog/tuprolog-3.1.0.ebuild64
-rw-r--r--dev-lang/vala/Manifest13
-rw-r--r--dev-lang/vala/metadata.xml8
-rw-r--r--dev-lang/vala/vala-0.32.1.ebuild33
-rw-r--r--dev-lang/vala/vala-0.34.8.ebuild33
-rw-r--r--dev-lang/vala/vala-0.34.9.ebuild33
-rw-r--r--dev-lang/vala/vala-0.36.4.ebuild37
-rw-r--r--dev-lang/vala/vala-0.36.5.ebuild37
-rw-r--r--dev-lang/whitespace/Manifest9
-rw-r--r--dev-lang/whitespace/files/whitespace-0.4-ghc-7.10.patch37
-rw-r--r--dev-lang/whitespace/files/whitespace-cabal.patch24
-rw-r--r--dev-lang/whitespace/metadata.xml11
-rw-r--r--dev-lang/whitespace/whitespace-0.3.ebuild33
-rw-r--r--dev-lang/whitespace/whitespace-0.4.ebuild29
-rw-r--r--dev-lang/xsb/Manifest9
-rw-r--r--dev-lang/xsb/metadata.xml11
-rw-r--r--dev-lang/xsb/xsb-3.6.0.ebuild200
-rw-r--r--dev-lang/xsb/xsb-3.7.0.ebuild202
-rw-r--r--dev-lang/yap/Manifest6
-rw-r--r--dev-lang/yap/metadata.xml11
-rw-r--r--dev-lang/yap/yap-6.3.3.ebuild118
-rw-r--r--dev-lang/yasm/Manifest10
-rw-r--r--dev-lang/yasm/files/yasm-1.2.0-fix_cython_check.patch23
-rw-r--r--dev-lang/yasm/metadata.xml8
-rw-r--r--dev-lang/yasm/yasm-1.2.0-r1.ebuild50
-rw-r--r--dev-lang/yasm/yasm-1.3.0.ebuild40
-rw-r--r--dev-lang/yasm/yasm-9999.ebuild67
826 files changed, 61207 insertions, 0 deletions
diff --git a/dev-lang/R/Manifest b/dev-lang/R/Manifest
new file mode 100644
index 000000000000..4c63638a9840
--- /dev/null
+++ b/dev-lang/R/Manifest
@@ -0,0 +1,17 @@
+AUX R-2.11.1-parallel.patch 685 SHA256 5e57374318a3f549fa64c939a45964b941fac1f9b021cdc94ff1d40ff23032c5 SHA512 30491365eee00389f6f09c2093b5b5a568f4567c110cc0cb3332a53d6a7fcd87fe8f46f9f8521cf21bf1f0cfa24f4282a6e22396902f454c43f26542ac22c2a9 WHIRLPOOL 266115362f92a57d7a22d7b8810d12641e44c61b8396a8fd1a7fde2f5655a4990950366fc801d1d621e045a5a0b44d34c982cddb11396e82c019bec386a65f2a
+AUX R-2.13.1-zlib_header_fix.patch 591 SHA256 e185a2c324796c11cca171da63663a59e45b558e13f01af8c9527bd09ea1028b SHA512 1ada5a3ccb0ff902f7df35d6a42f4e99fee6a1f7b36ece000b9e2fed2b731abf5c3687d22239cd324ff6677bf8edff3415aca57c31beef33c73b98073206136a WHIRLPOOL 989418f4fdd120ca0b163b61e7e0bf56e7b52477b38b310ef281c4637c979b5b483d8b955a0167c719ca96e276798ea647d647080164b13e69d3789410d5d813
+AUX R-3.0.0-rmath-shared.patch 1137 SHA256 22d247f2b062074363d3fa6233106291d9b344cff40e56f02c217d97c6bc023f SHA512 92b950703f1bb6dc82b5cee5e4165fddbdf6a2aa2670980460268dae0918f884c8c0ced069b5d106853c7be814025153e8b3fe9689f1db7eeb387cf73b18a4d4 WHIRLPOOL 07c6c18e84c08060d2eef8b7e99ce1a2e49b6511339eac1e5163da056ef58d813dbf8f3a58e1b7b53d96db5b867799cdfcfb285550995cbd28915bafaf7345e7
+AUX R-3.3.2-zlib-1.2.10-backport.patch 511 SHA256 4c5483d64e62630ad0262b2e68ecced9f2b7776222a37a0a2470933ce78935a6 SHA512 29fa5be3de023f0699bab8fec5095f83936d4e40be1cbc43595a7e5ff0023d586c1bfcfe5ed8edde805fa699443e2c6be61779000e6c91be22d7b19309cbb09a WHIRLPOOL 526ccfe5fed8b0e91769aea8e4b4548838876bba7e55e5ff8999f0bec570164b96652223662e616cb59d8b4821b79c882267719b6592f3cd2f468190638bb328
+AUX R-3.4.1-parallel.patch 487 SHA256 7d08b75592f9452b1f92bfe148f9d24fd19ba9163cd16ee2dac753f2c1a891be SHA512 6bc59ebd6c0599110218a70a03030877df8a7fb70d17204a365330d9aa71f7b0688a2502c64b341c478061041da43eb0b0d08cfe63e3e394236142c7d148d778 WHIRLPOOL 5b38e377673d83e814174c0a8bda6bfaa6bf01046ce99b48ca096aef8959a8e910455ee546b58c268b3d48f15ee8680453dfcd0731cf9f00e3867eaaed0baa87
+AUX R-3.4.1-rmath-shared.patch 899 SHA256 76a2d04b3a77884baa3cf84b25920f875e026b73c217c59b06aba2fae634f858 SHA512 20c62b774149ae1959d28217a1be6f30968562de3ad5e4a8d7bfc7c579ca5c35fcd1304d68e222be0a37cb6db9b946fbe82d21a26fecccbecea1401b8c0b25d4 WHIRLPOOL 85ab8d8b183d333f127b4b57d3eb1c4c77e0a9137edcbce652ac01b61c1c07297397a97cb436cd4c5213b1224e95468ec9b660af88c9fed48bc0139db71b38e9
+DIST R-20130129.bash_completion.bz2 4209 SHA256 487e969b94563fec98ec58de7e6142e9361d4219088add0fca282b482a9e01b1 SHA512 910b26e16cfebe677f438abfa5f2652e582db143d91dbf0e7d4b1ea33462c7e5c89c3a3619c63ae98bba26b11a5adb16eda9d344f8cdbe4f0feabc546993c1a5 WHIRLPOOL 2368efaed37fcb6e010f6a234864631f68549bd8e3f733561170cc5b28f5557e546d8561246fb265a481a47991a262fec3acf6abc1dc3929a9357405e0d3c6fc
+DIST R-3.2.2.tar.gz 29772864 SHA256 9c9152e74134b68b0f3a1c7083764adc1cb56fd8336bec003fd0ca550cd2461d SHA512 71ba470875262b9f00fb6970f209788df4dad30e0a28373b824b60d8bc6401afb7786e65387663c6490c7ddcd2bfd7f808a270a3e63238f3d7565d5f93607138 WHIRLPOOL fea59929ada1d67dafc6ad89409d18ad173af7990384033f490a00e0f794d9919aecf7cd37089d105fe03b9cf64d079e5d148622571cec3eb924c1c5bd00081e
+DIST R-3.3.2.tar.gz 29440670 SHA256 d294ad21e9f574fb4828ebb3a94b8cb34f4f304a41687a994be00dd41a4e514c SHA512 06a98687c0b180cb0bfd57440ea26088212d9f48948d503136475bf54b42d72cfec5bea7e333c0cedd60733bd614dd0f8c2eced7e24478b6c89f48e8d0c43482 WHIRLPOOL a68112df87552cc6ca8cd6b78b99dda2a22b8f4cfcd87a4512d541d25ef21358ede1ba71b4d7e9f274bf4e4340de18355a777d9af2ed41c0a498fa11d91cf0d8
+DIST R-3.4.1.tar.gz 30200109 SHA256 02b1135d15ea969a3582caeb95594a05e830a6debcdb5b85ed2d5836a6a3fc78 SHA512 19bd50c87dc001ef947c15c1760f27ac8986ff6b43c6d90d3093ae184e42963027ef06faf31ec57ac9e519af7a35a2f53f8ea23ef75d800ebbd02945cedc4651 WHIRLPOOL 1396303a7ef7a0e8920af867e6b68e171152578231c9a7ad5020b494124922aae634c1ce6d0f2b2f8441481736b93c3abffe142f2af78dbb0dbc754c4faec3f1
+DIST R-78d6830e28ea90a046da79a9b4f70c39594bb6d6.bash_completion 13596 SHA256 7e452a23e0bd96b1076280448d130adab229b8ea37cd4531db77391868a31e97 SHA512 9ccd19bb1b0c18a2f13035ccd6809447429e197e298fb4d1df808ef345d723b42f75a1b91c349f6dbb46e4a82e59ef33e11300c495d79b63d670d0c0f2b16a06 WHIRLPOOL 49fd55e6a52d55f0aa15d3a117394793b6fba6f1b69a26911a2b2d7c40a65c8ec2246851edc3abb52849930c48e817ee62319ae8bc1db0a9b802c95fcb1554e0
+EBUILD R-3.2.2.ebuild 6047 SHA256 8d8a134a4e2df933ffb7812ce6a8af82e30d7d07b30ac912f440a92699af1c7b SHA512 adb3ec5895960448e932fe8e0a77991e8935c02d7e7e703457881a174a67fefe7aa8be26b0fc0591506ee7792476d621499f9393a2e464f14535b95324759d3e WHIRLPOOL 2133ce9457c4dc9fe246058f0786dcfcb44f558eb8ed8ab66914f622b3ae1bba2b39ae7a458bad7646b9acabc3d1af33bcbe62165e8460d767fbda852511359c
+EBUILD R-3.3.2.ebuild 6118 SHA256 29f8b0127a8c677f6b92b6c1de6182820ec2250772cdeceb2fcc3bef825b33cb SHA512 c8a92ff88add7f214abbf8a0dad71df8ef015669048ee1a9688fbbd9eb7e10c76f88380f7bb18db4d8901a633fe038e4104deabcb969bffc62fab298b734a150 WHIRLPOOL 84cd3d7d80973f7048deb0dc7b0861b772555cc39478c20b09bddc509c966d0178e175e2baae068ff76590e183276dd5004140660e97780c74de83b2e471af9f
+EBUILD R-3.4.1.ebuild 6330 SHA256 f9f8b4718cb2175e2d2255550ba9a194ac3b515fd53c55f076b21971ee017158 SHA512 14587dc493d11abcf35e27ec85f908aebb2874554715953fa57227438aff83341d787393a2728c9761a068ecd0a866501e69c2fb6dc3959551a794aff657dd06 WHIRLPOOL b45ec3babb70c6b73957aadd0396306fa0998dddd1d34d1d39db2d9c806a05f31bb6aa297abfde2cffb96a597f5b19aa406ba937c22c309cfe1af2b74d20f3b9
+MISC ChangeLog 5568 SHA256 54a89bc352846d3302948301889da7675af363c1f268710084fd92b9535fba8e SHA512 aa3d0ac91d6ac541b1ce8b1bfbce6500ff78de31ab222384add99c6e41daa6bac79b4e8927b12ab27636ff9cb0e90bc3103877011b826aec9264037b417f2c34 WHIRLPOOL b6a8e2244dc3188ef351efda37bbc29341ce671596ede4e459e7d38a628221d27db380d20a04e37cb75cf5c6b1543ee5e17e2c92fc9fecbab4133fdd2139726d
+MISC ChangeLog-2015 37389 SHA256 101a02192f9731c210a7bd41935776449e2d5f778f901b86a460694c7dfd9292 SHA512 2b84c031ac337650af82a766057425c66e11dcaae6aa5c27d7de6654068f231c0cec051463eb3f853f13afaf0e988b41bbc16280f332d9e9f0463797d03ee5e8 WHIRLPOOL a436c9e0a6dfe45cb95e2ec589134df6ab448dc4e64850ad0a050211bb8912b884c29d455dea4d9d8d3b587ea2f61015a57ad94539cd4e56e38977b1b4d168ac
+MISC metadata.xml 1140 SHA256 4a9651f060b7e0ebd860316761ef907520c59603a81bdc101fb30eb7e19650a1 SHA512 297c7e17998f92fb836b0599ce5221aee1ba1e7b1504edb348a602b695faf381d51f32f6118f5ef4bb353f02e92ffc5b3520b8d317d3e30a68a3cce0254fa6b1 WHIRLPOOL 26e0791b4e1c01b4bf9b6772080c52b9b5554af7feb6b54d71e5a2dbf81c03ea3e3363712f19fa876d839b8d91bfec5266688b29c5e65e205d22f7d167418493
diff --git a/dev-lang/R/R-3.2.2.ebuild b/dev-lang/R/R-3.2.2.ebuild
new file mode 100644
index 000000000000..ae27f02d702e
--- /dev/null
+++ b/dev-lang/R/R-3.2.2.ebuild
@@ -0,0 +1,205 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit bash-completion-r1 autotools eutils flag-o-matic fortran-2 multilib versionator toolchain-funcs
+
+BCP=${PN}-20130129.bash_completion
+DESCRIPTION="Language and environment for statistical computing and graphics"
+HOMEPAGE="http://www.r-project.org/"
+SRC_URI="
+ mirror://cran/src/base/R-3/${P}.tar.gz
+ https://dev.gentoo.org/~bicatali/distfiles/${BCP}.bz2"
+
+LICENSE="|| ( GPL-2 GPL-3 ) LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="cairo doc icu java jpeg lapack minimal nls openmp perl png prefix profile readline static-libs tiff tk X"
+REQUIRED_USE="png? ( || ( cairo X ) ) jpeg? ( || ( cairo X ) ) tiff? ( || ( cairo X ) )"
+
+CDEPEND="
+ app-arch/bzip2:0=
+ app-arch/xz-utils:0=
+ app-text/ghostscript-gpl
+ >=dev-libs/libpcre-8.35:3=
+ virtual/blas:0
+ || ( >=sys-apps/coreutils-8.15 sys-freebsd/freebsd-bin app-misc/realpath )
+ cairo? ( x11-libs/cairo:0=[X] x11-libs/pango:0= )
+ icu? ( dev-libs/icu:= )
+ jpeg? ( virtual/jpeg:0 )
+ lapack? ( virtual/lapack:0 )
+ perl? ( dev-lang/perl )
+ png? ( media-libs/libpng:0= )
+ readline? ( sys-libs/readline:0= )
+ tiff? ( media-libs/tiff:0= )
+ tk? ( dev-lang/tk:0= )
+ X? ( x11-libs/libXmu:0= x11-misc/xdg-utils )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-fontsrecommended
+ )"
+
+RDEPEND="${CDEPEND}
+ >=sys-libs/zlib-1.2.5.1-r2:0[minizip]
+ java? ( >=virtual/jre-1.5 )"
+
+RESTRICT="minimal? ( test )"
+
+R_DIR="${EROOT%/}/usr/$(get_libdir)/${PN}"
+
+pkg_setup() {
+ if use openmp; then
+ if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then
+ ewarn "OpenMP is not available in your current selected gcc"
+ die "need openmp capable gcc"
+ fi
+ FORTRAN_NEED_OPENMP=1
+ fi
+ fortran-2_pkg_setup
+ filter-ldflags -Wl,-Bdirect -Bdirect
+ # avoid using existing R installation
+ unset R_HOME
+ # Temporary fix for bug #419761
+ if [[ ($(tc-getCC) == *gcc) && ($(gcc-version) == 4.7) ]]; then
+ append-flags -fno-ipa-cp-clone
+ fi
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-2.11.1-parallel.patch \
+ "${FILESDIR}"/${PN}-2.13.1-zlib_header_fix.patch \
+ "${FILESDIR}"/${PN}-3.0.0-rmath-shared.patch
+
+ # fix packages.html for doc (gentoo bug #205103)
+ sed -i \
+ -e "s:../../../library:../../../../$(get_libdir)/R/library:g" \
+ src/library/tools/R/Rd.R || die
+
+ # fix Rscript path when installed (gentoo bug #221061)
+ sed -i \
+ -e "s:-DR_HOME='\"\$(rhome)\"':-DR_HOME='\"${R_DIR}\"':" \
+ src/unix/Makefile.in || die "sed unix Makefile failed"
+
+ # fix HTML links to manual (gentoo bug #273957)
+ sed -i \
+ -e 's:\.\./manual/:manual/:g' \
+ $(grep -Flr ../manual/ doc) || die "sed for HTML links failed"
+
+ use lapack && \
+ export LAPACK_LIBS="$($(tc-getPKG_CONFIG) --libs lapack)"
+
+ if use X; then
+ export R_BROWSER="$(type -p xdg-open)"
+ export R_PDFVIEWER="$(type -p xdg-open)"
+ fi
+ use perl && \
+ export PERL5LIB="${S}/share/perl:${PERL5LIB:+:}${PERL5LIB}"
+
+ # don't search /usr/local
+ sed -i -e '/FLAGS=.*\/local\//c\: # removed by ebuild' configure.ac || die
+ # Fix for Darwin (OS X)
+ if use prefix; then
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i \
+ -e 's:-install_name libR.dylib:-install_name ${libdir}/R/lib/libR.dylib:' \
+ -e 's:-install_name libRlapack.dylib:-install_name ${libdir}/R/lib/libRlapack.dylib:' \
+ -e 's:-install_name libRblas.dylib:-install_name ${libdir}/R/lib/libRblas.dylib:' \
+ -e "/SHLIB_EXT/s/\.so/.dylib/" \
+ configure.ac || die
+ # sort of "undo" 2.14.1-rmath-shared.patch
+ sed -i \
+ -e "s:-Wl,-soname=libRmath.so:-install_name ${EROOT%/}/usr/$(get_libdir)/libRmath.dylib:" \
+ src/nmath/standalone/Makefile.in || die
+ else
+ append-ldflags -Wl,-rpath="${EROOT%/}/usr/$(get_libdir)/R/lib"
+ fi
+ fi
+ AT_M4DIR=m4 eaclocal
+ eautoconf
+}
+
+src_configure() {
+ # --with-system-tre \
+ # tre is patched from upstream
+ econf \
+ --enable-byte-compiled-packages \
+ --enable-R-shlib \
+ --disable-R-framework \
+ --with-system-zlib \
+ --with-system-bzlib \
+ --with-system-pcre \
+ --with-system-xz \
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ rdocdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable nls) \
+ $(use_enable openmp) \
+ $(use_enable profile R-profiling) \
+ $(use_enable profile memory-profiling) \
+ $(use_enable static-libs static) \
+ $(use_enable static-libs R-static-lib) \
+ $(use_with cairo) \
+ $(use_with icu ICU) \
+ $(use_with jpeg jpeglib) \
+ $(use_with lapack) \
+ $(use_with !minimal recommended-packages) \
+ $(use_with png libpng) \
+ $(use_with readline) \
+ $(use_with tiff libtiff) \
+ $(use_with tk tcltk) \
+ $(use_with tk tk-config "${EPREFIX}"/usr/lib/tkConfig.sh) \
+ $(use_with tk tcl-config "${EPREFIX}"/usr/lib/tclConfig.sh) \
+ $(use_with X x)
+}
+
+src_compile() {
+ export VARTEXFONTS="${T}/fonts"
+ emake AR="$(tc-getAR)"
+ emake -C src/nmath/standalone \
+ shared $(use static-libs && echo static) AR="$(tc-getAR)"
+ use doc && emake info pdf
+}
+
+src_install() {
+ default
+ emake -j1 -C src/nmath/standalone DESTDIR="${D}" install
+
+ if use doc; then
+ emake DESTDIR="${D}" install-info install-pdf
+ dosym ../manual /usr/share/doc/${PF}/html/manual
+ fi
+
+ cat > 99R <<-EOF
+ LDPATH=${R_DIR}/lib
+ R_HOME=${R_DIR}
+ EOF
+ doenvd 99R
+ newbashcomp "${WORKDIR}"/${BCP} ${PN}
+ # The buildsystem has a different understanding of install_names than
+ # we require. Since it builds modules like shared objects (wrong), many
+ # objects (all modules) get an incorrect install_name. Fixing the build
+ # system here is not really trivial.
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ local mod
+ pushd "${ED}"/usr/lib/R > /dev/null
+ for mod in $(find . -name "*.dylib") ; do
+ mod=${mod#./}
+ install_name_tool -id "${EPREFIX}/usr/lib/R/${mod}" \
+ "${mod}"
+ done
+ popd > /dev/null
+ fi
+ docompress -x /usr/share/doc/${PF}/NEWS.rds
+}
+
+pkg_postinst() {
+ if use java; then
+ einfo "Re-initializing java paths for ${P}"
+ R CMD javareconf
+ fi
+}
diff --git a/dev-lang/R/R-3.3.2.ebuild b/dev-lang/R/R-3.3.2.ebuild
new file mode 100644
index 000000000000..fb9bde8c312a
--- /dev/null
+++ b/dev-lang/R/R-3.3.2.ebuild
@@ -0,0 +1,201 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit bash-completion-r1 autotools eutils flag-o-matic fortran-2 multilib versionator toolchain-funcs
+
+BCP=${PN}-20130129.bash_completion
+DESCRIPTION="Language and environment for statistical computing and graphics"
+HOMEPAGE="http://www.r-project.org/"
+SRC_URI="
+ mirror://cran/src/base/R-3/${P}.tar.gz
+ https://dev.gentoo.org/~bicatali/distfiles/${BCP}.bz2"
+
+LICENSE="|| ( GPL-2 GPL-3 ) LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="cairo doc icu java jpeg lapack minimal nls openmp perl png prefix profile readline static-libs tiff tk X"
+REQUIRED_USE="png? ( || ( cairo X ) ) jpeg? ( || ( cairo X ) ) tiff? ( || ( cairo X ) )"
+
+CDEPEND="
+ app-arch/bzip2:0=
+ app-arch/xz-utils:0=
+ app-text/ghostscript-gpl
+ >=dev-libs/libpcre-8.35:3=
+ virtual/blas:0
+ || ( >=sys-apps/coreutils-8.15 sys-freebsd/freebsd-bin app-misc/realpath )
+ cairo? ( x11-libs/cairo:0=[X] x11-libs/pango:0= )
+ icu? ( dev-libs/icu:= )
+ jpeg? ( virtual/jpeg:0 )
+ lapack? ( virtual/lapack:0 )
+ perl? ( dev-lang/perl )
+ png? ( media-libs/libpng:0= )
+ readline? ( sys-libs/readline:0= )
+ tiff? ( media-libs/tiff:0= )
+ tk? ( dev-lang/tk:0= )
+ X? ( x11-libs/libXmu:0= x11-misc/xdg-utils )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-fontsrecommended
+ )"
+
+RDEPEND="${CDEPEND}
+ >=sys-libs/zlib-1.2.5.1-r2:0[minizip]
+ java? ( >=virtual/jre-1.5 )"
+
+RESTRICT="minimal? ( test )"
+
+pkg_setup() {
+ if use openmp; then
+ if [[ $(tc-getCC) == *gcc ]] && ! tc-has-openmp; then
+ ewarn "OpenMP is not available in your current selected gcc"
+ die "need openmp capable gcc"
+ fi
+ FORTRAN_NEED_OPENMP=1
+ fi
+ fortran-2_pkg_setup
+ filter-ldflags -Wl,-Bdirect -Bdirect
+ # avoid using existing R installation
+ unset R_HOME
+ # Temporary fix for bug #419761
+ if [[ ($(tc-getCC) == *gcc) && ($(gcc-version) == 4.7) ]]; then
+ append-flags -fno-ipa-cp-clone
+ fi
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-2.11.1-parallel.patch \
+ "${FILESDIR}"/${PN}-2.13.1-zlib_header_fix.patch \
+ "${FILESDIR}"/${PN}-3.0.0-rmath-shared.patch \
+ "${FILESDIR}"/${P}-zlib-1.2.10-backport.patch
+
+ # fix packages.html for doc (gentoo bug #205103)
+ sed -i \
+ -e "s:../../../library:../../../../$(get_libdir)/R/library:g" \
+ src/library/tools/R/Rd.R || die
+
+ # fix Rscript path when installed (gentoo bug #221061)
+ sed -i \
+ -e "s:-DR_HOME='\"\$(rhome)\"':-DR_HOME='\"${EROOT%/}/usr/$(get_libdir)/${PN}\"':" \
+ src/unix/Makefile.in || die "sed unix Makefile failed"
+
+ # fix HTML links to manual (gentoo bug #273957)
+ sed -i \
+ -e 's:\.\./manual/:manual/:g' \
+ $(grep -Flr ../manual/ doc) || die "sed for HTML links failed"
+
+ use lapack && \
+ export LAPACK_LIBS="$($(tc-getPKG_CONFIG) --libs lapack)"
+
+ if use X; then
+ export R_BROWSER="$(type -p xdg-open)"
+ export R_PDFVIEWER="$(type -p xdg-open)"
+ fi
+ use perl && \
+ export PERL5LIB="${S}/share/perl:${PERL5LIB:+:}${PERL5LIB}"
+
+ # don't search /usr/local
+ sed -i -e '/FLAGS=.*\/local\//c\: # removed by ebuild' configure.ac || die
+ # Fix for Darwin (OS X)
+ if use prefix; then
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i \
+ -e 's:-install_name libR.dylib:-install_name ${libdir}/R/lib/libR.dylib:' \
+ -e 's:-install_name libRlapack.dylib:-install_name ${libdir}/R/lib/libRlapack.dylib:' \
+ -e 's:-install_name libRblas.dylib:-install_name ${libdir}/R/lib/libRblas.dylib:' \
+ -e "/SHLIB_EXT/s/\.so/.dylib/" \
+ configure.ac || die
+ # sort of "undo" 2.14.1-rmath-shared.patch
+ sed -i \
+ -e "s:-Wl,-soname=libRmath.so:-install_name ${EROOT%/}/usr/$(get_libdir)/libRmath.dylib:" \
+ src/nmath/standalone/Makefile.in || die
+ else
+ append-ldflags -Wl,-rpath="${EROOT%/}/usr/$(get_libdir)/R/lib"
+ fi
+ fi
+ AT_M4DIR=m4 eaclocal
+ eautoconf
+}
+
+src_configure() {
+ # --with-system-tre \
+ # tre is patched from upstream
+ econf \
+ --enable-byte-compiled-packages \
+ --enable-R-shlib \
+ --disable-R-framework \
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ rdocdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable java) \
+ $(use_enable nls) \
+ $(use_enable openmp) \
+ $(use_enable profile R-profiling) \
+ $(use_enable profile memory-profiling) \
+ $(use_enable static-libs static) \
+ $(use_enable static-libs R-static-lib) \
+ $(use_with cairo) \
+ $(use_with icu ICU) \
+ $(use_with jpeg jpeglib) \
+ $(use_with lapack) \
+ $(use_with !minimal recommended-packages) \
+ $(use_with png libpng) \
+ $(use_with readline) \
+ $(use_with tiff libtiff) \
+ $(use_with tk tcltk) \
+ $(use_with tk tk-config "${EPREFIX}"/usr/lib/tkConfig.sh) \
+ $(use_with tk tcl-config "${EPREFIX}"/usr/lib/tclConfig.sh) \
+ $(use_with X x)
+}
+
+src_compile() {
+ export VARTEXFONTS="${T}/fonts"
+ emake AR="$(tc-getAR)"
+ emake -C src/nmath/standalone \
+ shared $(use static-libs && echo static) AR="$(tc-getAR)"
+ use doc && emake info pdf
+}
+
+src_install() {
+ default
+ emake -j1 -C src/nmath/standalone DESTDIR="${D}" install
+
+ if use doc; then
+ emake DESTDIR="${D}" install-info install-pdf
+ dosym ../manual /usr/share/doc/${PF}/html/manual
+ fi
+
+ cat > 99R <<-EOF
+ LDPATH=${EROOT%/}/usr/$(get_libdir)/${PN}/lib
+ R_HOME=${EROOT%/}/usr/$(get_libdir)/${PN}
+ EOF
+ doenvd 99R
+ newbashcomp "${WORKDIR}"/${BCP} ${PN}
+ # The buildsystem has a different understanding of install_names than
+ # we require. Since it builds modules like shared objects (wrong), many
+ # objects (all modules) get an incorrect install_name. Fixing the build
+ # system here is not really trivial.
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ local mod
+ pushd "${ED}"/usr/lib/R > /dev/null
+ for mod in $(find . -name "*.dylib") ; do
+ mod=${mod#./}
+ install_name_tool -id "${EPREFIX}/usr/lib/R/${mod}" \
+ "${mod}"
+ done
+ popd > /dev/null
+ fi
+ docompress -x /usr/share/doc/${PF}/{BioC_mirrors.csv,CRAN_mirrors.csv,KEYWORDS.db,NEWS.rds}
+}
+
+pkg_postinst() {
+ if use java; then
+ einfo "Re-initializing java paths for ${P}"
+ R CMD javareconf
+ fi
+}
diff --git a/dev-lang/R/R-3.4.1.ebuild b/dev-lang/R/R-3.4.1.ebuild
new file mode 100644
index 000000000000..85556b03670f
--- /dev/null
+++ b/dev-lang/R/R-3.4.1.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 autotools eutils flag-o-matic fortran-2 multilib versionator toolchain-funcs
+
+# latest git commit for R bash completion: https://github.com/deepayan/rcompletion
+BCPV=78d6830e28ea90a046da79a9b4f70c39594bb6d6
+
+DESCRIPTION="Language and environment for statistical computing and graphics"
+HOMEPAGE="http://www.r-project.org/"
+SRC_URI="
+ mirror://cran/src/base/R-3/${P}.tar.gz
+ https://raw.githubusercontent.com/deepayan/rcompletion/${BCPV}/bash_completion/R -> ${PN}-${BCPV}.bash_completion"
+
+LICENSE="|| ( GPL-2 GPL-3 ) LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="cairo doc icu java jpeg lapack minimal nls openmp perl png prefix profile readline static-libs tiff tk X"
+REQUIRED_USE="png? ( || ( cairo X ) ) jpeg? ( || ( cairo X ) ) tiff? ( || ( cairo X ) )"
+
+CDEPEND="
+ app-arch/bzip2:0=
+ app-arch/xz-utils:0=
+ app-text/ghostscript-gpl
+ >=dev-libs/libpcre-8.35:3=
+ net-misc/curl
+ virtual/blas:0
+ || ( >=sys-apps/coreutils-8.15 sys-freebsd/freebsd-bin app-misc/realpath )
+ cairo? ( x11-libs/cairo:0=[X] x11-libs/pango:0= )
+ icu? ( dev-libs/icu:= )
+ jpeg? ( virtual/jpeg:0 )
+ lapack? ( virtual/lapack:0 )
+ perl? ( dev-lang/perl )
+ png? ( media-libs/libpng:0= )
+ readline? ( sys-libs/readline:0= )
+ tiff? ( media-libs/tiff:0= )
+ tk? ( dev-lang/tk:0= )
+ X? ( x11-libs/libXmu:0= x11-misc/xdg-utils )"
+
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-fontsrecommended
+ )"
+
+RDEPEND="${CDEPEND}
+ >=sys-libs/zlib-1.2.5.1-r2:0[minizip]
+ java? ( >=virtual/jre-1.5 )"
+
+RESTRICT="minimal? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.4.1-parallel.patch
+ "${FILESDIR}"/${PN}-3.4.1-rmath-shared.patch
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
+ if ! tc-check-openmp; then
+ ewarn "OpenMP is not available in your current selected compiler"
+ die "need openmp capable compiler"
+ fi
+ FORTRAN_NEED_OPENMP=1
+ fi
+ fortran-2_pkg_setup
+ filter-ldflags -Wl,-Bdirect -Bdirect
+ # avoid using existing R installation
+ unset R_HOME
+ # Temporary fix for bug #419761
+ if [[ ($(tc-getCC) == *gcc) && ($(gcc-version) == 4.7) ]]; then
+ append-flags -fno-ipa-cp-clone
+ fi
+}
+
+src_prepare() {
+ default
+
+ # fix packages.html for doc (gentoo bug #205103)
+ sed -e "s:../../../library:../../../../$(get_libdir)/R/library:g" \
+ -i src/library/tools/R/Rd.R || die
+
+ # fix Rscript path when installed (gentoo bug #221061)
+ sed -e "s:-DR_HOME='\"\$(rhome)\"':-DR_HOME='\"${EROOT%/}/usr/$(get_libdir)/${PN}\"':" \
+ -i src/unix/Makefile.in || die "sed unix Makefile failed"
+
+ # fix HTML links to manual (gentoo bug #273957)
+ sed -e 's:\.\./manual/:manual/:g' \
+ -i $(grep -Flr ../manual/ doc) || die "sed for HTML links failed"
+
+ use lapack && \
+ export LAPACK_LIBS="$($(tc-getPKG_CONFIG) --libs lapack)"
+
+ if use X; then
+ export R_BROWSER="$(type -p xdg-open)"
+ export R_PDFVIEWER="$(type -p xdg-open)"
+ fi
+ use perl && \
+ export PERL5LIB="${S}/share/perl:${PERL5LIB:+:}${PERL5LIB}"
+
+ # don't search /usr/local
+ sed -i -e '/FLAGS=.*\/local\//c\: # removed by ebuild' configure.ac || die
+ # Fix for Darwin (OS X)
+ if use prefix; then
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -e 's:-install_name libR.dylib:-install_name ${libdir}/R/lib/libR.dylib:' \
+ -e 's:-install_name libRlapack.dylib:-install_name ${libdir}/R/lib/libRlapack.dylib:' \
+ -e 's:-install_name libRblas.dylib:-install_name ${libdir}/R/lib/libRblas.dylib:' \
+ -e "/SHLIB_EXT/s/\.so/.dylib/" \
+ -i configure.ac || die
+ # sort of "undo" 2.14.1-rmath-shared.patch
+ sed -e "s:-Wl,-soname=libRmath.so:-install_name ${EROOT%/}/usr/$(get_libdir)/libRmath.dylib:" \
+ -i src/nmath/standalone/Makefile.in || die
+ else
+ append-ldflags -Wl,-rpath="${EROOT%/}/usr/$(get_libdir)/R/lib"
+ fi
+ fi
+ AT_M4DIR=m4 eaclocal
+ eautoconf
+}
+
+src_configure() {
+ # --with-system-tre \
+ # tre is patched from upstream
+ econf \
+ --enable-byte-compiled-packages \
+ --enable-R-shlib \
+ --disable-R-framework \
+ --with-blas="$($(tc-getPKG_CONFIG) --libs blas)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ rdocdir="${EPREFIX}/usr/share/doc/${PF}" \
+ $(use_enable java) \
+ $(use_enable nls) \
+ $(use_enable openmp) \
+ $(use_enable profile R-profiling) \
+ $(use_enable profile memory-profiling) \
+ $(use_enable static-libs static) \
+ $(use_enable static-libs R-static-lib) \
+ $(use_with cairo) \
+ $(use_with icu ICU) \
+ $(use_with jpeg jpeglib) \
+ $(use_with lapack) \
+ $(use_with !minimal recommended-packages) \
+ $(use_with png libpng) \
+ $(use_with readline) \
+ $(use_with tiff libtiff) \
+ $(use_with tk tcltk) \
+ $(use_with tk tk-config "${EPREFIX}"/usr/$(get_libdir)/tkConfig.sh) \
+ $(use_with tk tcl-config "${EPREFIX}"/usr/$(get_libdir)/tclConfig.sh) \
+ $(use_with X x)
+}
+
+src_compile() {
+ export VARTEXFONTS="${T}/fonts"
+ emake AR="$(tc-getAR)"
+ emake -C src/nmath/standalone \
+ shared $(use static-libs && echo static) AR="$(tc-getAR)"
+ use doc && emake info pdf
+}
+
+src_install() {
+ default
+ emake -j1 -C src/nmath/standalone DESTDIR="${D}" install
+
+ if use doc; then
+ emake DESTDIR="${D}" install-info install-pdf
+ dosym ../manual /usr/share/doc/${PF}/html/manual
+ fi
+
+ cat > 99R <<-EOF
+ LDPATH=${EROOT%/}/usr/$(get_libdir)/${PN}/lib
+ R_HOME=${EROOT%/}/usr/$(get_libdir)/${PN}
+ EOF
+ doenvd 99R
+ newbashcomp "${DISTDIR}"/${PN}-${BCPV}.bash_completion ${PN}
+ # The buildsystem has a different understanding of install_names than
+ # we require. Since it builds modules like shared objects (wrong), many
+ # objects (all modules) get an incorrect install_name. Fixing the build
+ # system here is not really trivial.
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ local mod
+ pushd "${ED}"/usr/$(get_libdir)/R > /dev/null
+ for mod in $(find . -name "*.dylib") ; do
+ mod=${mod#./}
+ install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/R/${mod}" \
+ "${mod}"
+ done
+ popd > /dev/null
+ fi
+ docompress -x /usr/share/doc/${PF}/{BioC_mirrors.csv,CRAN_mirrors.csv,KEYWORDS.db,NEWS.rds}
+}
+
+pkg_postinst() {
+ if use java; then
+ einfo "Re-initializing java paths for ${P}"
+ R CMD javareconf
+ fi
+}
diff --git a/dev-lang/R/files/R-2.11.1-parallel.patch b/dev-lang/R/files/R-2.11.1-parallel.patch
new file mode 100644
index 000000000000..c713d335badd
--- /dev/null
+++ b/dev-lang/R/files/R-2.11.1-parallel.patch
@@ -0,0 +1,17 @@
+Fix ocasional failure with parallel install
+Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=322965
+R bug: https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14505
+
+Patch by Sebastien Fabbro
+
+--- src/include/Makefile.in.orig 2010-06-15 18:18:54.000000000 +0000
++++ src/include/Makefile.in 2010-06-15 18:19:48.000000000 +0000
+@@ -81,7 +81,7 @@
+ Rmath.h0: $(srcdir)/Rmath.h0.in $(top_builddir)/config.status
+ @cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+-install: installdirs install-intl-@USE_INCLUDED_LIBINTL@
++install: $(OBJ_HEADERS) installdirs install-intl-@USE_INCLUDED_LIBINTL@
+ @for d in $(SUBDIRS); do \
+ (cd $${d} && $(MAKE) $@) || exit 1; \
+ done
diff --git a/dev-lang/R/files/R-2.13.1-zlib_header_fix.patch b/dev-lang/R/files/R-2.13.1-zlib_header_fix.patch
new file mode 100644
index 000000000000..136acb26055f
--- /dev/null
+++ b/dev-lang/R/files/R-2.13.1-zlib_header_fix.patch
@@ -0,0 +1,20 @@
+Update for zlib header changes for zlib > 1.2.5
+
+Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=383431
+R bug: https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14951
+
+Patch by Michael Schreckenbauer
+
+--- src/main/unzip.h.orig 2011-09-24 19:35:53.000000000 -0700
++++ src/main/unzip.h 2011-09-24 19:37:06.000000000 -0700
+@@ -58,6 +58,10 @@
+ #define ZLIB_FILEFUNC_SEEK_END (2)
+ #define ZLIB_FILEFUNC_SEEK_SET (0)
+
++#ifndef OF
++#define OF(x) x
++#endif
++
+ #define ZLIB_FILEFUNC_MODE_READ (1)
+ #define ZLIB_FILEFUNC_MODE_WRITE (2)
+ #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
diff --git a/dev-lang/R/files/R-3.0.0-rmath-shared.patch b/dev-lang/R/files/R-3.0.0-rmath-shared.patch
new file mode 100644
index 000000000000..f53fb7910511
--- /dev/null
+++ b/dev-lang/R/files/R-3.0.0-rmath-shared.patch
@@ -0,0 +1,28 @@
+Link with libm to fix unresolved symbols when linked with as-needed
+and add a soname to the standalone math library
+R bug: https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14953
+
+Patch by Sebastien Fabbro
+Adapted to R-3.0.0 by Denis Dupeyron
+
+--- src/nmath/standalone/Makefile.in.orig 2013-04-04 14:39:15.777544946 -0600
++++ src/nmath/standalone/Makefile.in 2013-04-04 14:40:51.256153179 -0600
+@@ -64,7 +64,8 @@
+ Rexeclibdir_LTLIBRARIES = $(libRmath_la)
+ libRmath_la_SOURCES = $(SOURCES)
+ libRmath_la_OBJECTS = $(OBJECTS:.o=.lo)
+-libRmath_la_LDFLAGS =
++libRmath_la_LDFLAGS = -Wl,-soname=libRmath.so
++libRmath_la_LIBADD = $(LIBM)
+
+ CLEANFILES = Makedeps *.d *.o *.lo test $(SOURCES)
+ DISTCLEANFILES = Makefile $(Rexeclibdir_LIBRARIES) $(Rexeclibdir_LTLIBRARIES)
+@@ -117,7 +118,7 @@
+
+ ## under peculiar circumstances, $(LIBM) here helps.
+ $(libRmath_la): $(libRmath_la_OBJECTS)
+- $(DYLIB_LINK) -o $@ $(libRmath_la_LDFLAGS) $(libRmath_la_OBJECTS) $(LIBM)
++ $(DYLIB_LINK) $(libRmath_la_LDFLAGS) $(libRmath_la_OBJECTS) $(libRmath_la_LIBADD) -o $@
+
+ test: $(srcdir)/test.c
+ $(CC) -o $@ $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(srcdir)/test.c \
diff --git a/dev-lang/R/files/R-3.3.2-zlib-1.2.10-backport.patch b/dev-lang/R/files/R-3.3.2-zlib-1.2.10-backport.patch
new file mode 100644
index 000000000000..2cfb30da90fd
--- /dev/null
+++ b/dev-lang/R/files/R-3.3.2-zlib-1.2.10-backport.patch
@@ -0,0 +1,20 @@
+Index: R.m4
+===================================================================
+--- m4/R.m4 (revision 71152)
++++ m4/R.m4 (revision 71889)
+@@ -3105,10 +3105,11 @@
+ #include <string.h>
+ #include <zlib.h>
+ int main() {
+-#ifdef ZLIB_VERSION
+-/* Work around Debian bug: it uses 1.2.3.4 even though there was no such
+- version on the master site zlib.net */
+- exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0);
++#ifdef ZLIB_VERNUM
++ if (ZLIB_VERNUM < 0x1250) {
++ exit(1);
++ }
++ exit(0);
+ #else
+ exit(1);
+ #endif
diff --git a/dev-lang/R/files/R-3.4.1-parallel.patch b/dev-lang/R/files/R-3.4.1-parallel.patch
new file mode 100644
index 000000000000..6fac15b9ffb7
--- /dev/null
+++ b/dev-lang/R/files/R-3.4.1-parallel.patch
@@ -0,0 +1,11 @@
+--- a/src/include/Makefile.in 2017-07-05 23:09:09.682703655 +0000
++++ b/src/include/Makefile.in 2017-07-05 23:06:56.533612308 +0000
+@@ -81,7 +81,7 @@
+ Rmath.h0: $(srcdir)/Rmath.h0.in $(top_builddir)/config.status
+ @cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+-install: installdirs install-intl-@USE_INCLUDED_LIBINTL@
++install: $(OBJ_HEADERS) installdirs install-intl-@USE_INCLUDED_LIBINTL@
+ @for d in $(SUBDIRS); do \
+ (cd $${d} && $(MAKE) $@) || exit 1; \
+ done
diff --git a/dev-lang/R/files/R-3.4.1-rmath-shared.patch b/dev-lang/R/files/R-3.4.1-rmath-shared.patch
new file mode 100644
index 000000000000..8bc6233de6df
--- /dev/null
+++ b/dev-lang/R/files/R-3.4.1-rmath-shared.patch
@@ -0,0 +1,21 @@
+--- a/src/nmath/standalone/Makefile.in 2017-07-05 23:20:26.098087600 +0000
++++ b/src/nmath/standalone/Makefile.in 2017-07-05 23:21:55.087480310 +0000
+@@ -64,7 +64,8 @@
+ Rexeclibdir_LTLIBRARIES = $(libRmath_la)
+ libRmath_la_SOURCES = $(SOURCES)
+ libRmath_la_OBJECTS = $(OBJECTS:.o=.lo)
+-libRmath_la_LDFLAGS =
++libRmath_la_LDFLAGS = -Wl,-soname=libRmath.so
++libRmath_la_LIBADD = $(LIBM)
+
+ CLEANFILES = Makedeps *.d *.o *.lo test check.log $(SOURCES)
+ DISTCLEANFILES = Makefile $(Rexeclibdir_LIBRARIES) $(Rexeclibdir_LTLIBRARIES)
+@@ -127,7 +128,7 @@
+
+ ## under peculiar circumstances, $(LIBM) here helps.
+ $(libRmath_la): $(libRmath_la_OBJECTS)
+- $(DYLIB_LINK) -o $@ $(libRmath_la_LDFLAGS) $(libRmath_la_OBJECTS) $(LIBM)
++ $(DYLIB_LINK) $(libRmath_la_LDFLAGS) $(libRmath_la_OBJECTS) $(libRmath_la_LIBADD) -o $@
+
+ test: $(srcdir)/test.c
+ $(CC) -o $@ $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(srcdir)/test.c \
diff --git a/dev-lang/R/metadata.xml b/dev-lang/R/metadata.xml
new file mode 100644
index 000000000000..8972d9ed88ca
--- /dev/null
+++ b/dev-lang/R/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>
+ <longdescription lang="en">
+ R is GNU S, a system for statistical computation and graphics. It
+ consists of a language plus a run-time environment with graphics, a
+ debugger, access to certain system functions, and the ability to run
+ programs stored in script files.
+
+ The core of R is an interpreted computer language which allows
+ branching and looping as well as modular programming using functions.
+ The R distribution contains functionality for a large number of
+ statistical procedures such as: linear and generalized linear
+ models, nonlinear regression models, time series analysis, classical
+ parametric and nonparametric tests, clustering, smoothing and
+ graphical data representations. Additional modules ("add-on
+ packages") are available for a variety of specific purposes but are
+ not distributed with this package.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/ats/Manifest b/dev-lang/ats/Manifest
new file mode 100644
index 000000000000..751dbbba4247
--- /dev/null
+++ b/dev-lang/ats/Manifest
@@ -0,0 +1,5 @@
+DIST ats-lang-anairiats-0.2.9.tgz 2466767 SHA256 44bbf49f7bea0e411c5a24ae0ea3ecf1d771886b6bd19ea6798badb01f1512fd SHA512 fc7df7bc032ad665c9c8376245bb52f88f71ab81d36fa6f18e66886d9d19f247f54888a8ae3fa5adf17117ee6826bbbde1a177040dc2657f6da0f98d66b035e3 WHIRLPOOL 9d0f2906c87c98aca69ff0f76db19d42adc8bf5a97625b4f8c13bc751690c389e8b2f871206bad09a64ec2913b740cc38a65448c056a227ac561d832a1541e2e
+EBUILD ats-0.2.9.ebuild 625 SHA256 9fd3a32d1cd95fad3d8f36f8bb58660a499599f5b344a400a7de8ebcd9987b9b SHA512 1764dba459f0623633d05cb811210f2f1d98597537350b37307eb6ea8337586a832b9c4a30f4d64be2861d0a7fa308bf2ae92e836e3bd661a3d5bc8e7434cd61 WHIRLPOOL 946f0a408a6a736108efc5e6153866f0e4bf71422e8c5cc09b859421380e84ed58a1281ac4a1f92a46a4ebb6912acdc9ade78ef37ed407e9bc451cba0ddcb6ac
+MISC ChangeLog 2689 SHA256 475f89940e5c82451940b39a48b9ed77221979778b703746fa96a729b850cb6b SHA512 88f68ea505283e8ff67e982bd17acc5510fedcea7d47232a0970852fe03dfb72ed893cd96b77355575faad282f599858d16cb16327329644e6c0be2c77d3c275 WHIRLPOOL 618619e378b081124baa2781e5d544410047af775cd71af5828f10b9112a70335339eb4ef666cfc43095c7ad2f8421a4c1c4209d3f5f622f4aaeaec9790c66c7
+MISC ChangeLog-2015 341 SHA256 ce22d72417a1c8e823104e0f80188f75741bda5028ec10265681250e85f41ec8 SHA512 f53dd1b5f3aeb01582ccb169ce4d8d4d275d04b82b55ac91ee4ca83b3cd15e8d92a5d329a270987180f57ce5a98158ed959d591a92b9d3558256d5ebe3be717a WHIRLPOOL 114afd6c4fa933208441474938077ca0a6a226d84f40fee34840438552100c1f4aebae2a31a00848dce9d17c9f309e95b6dff193ea9cd51cb057c5e31cab9c51
+MISC metadata.xml 336 SHA256 6bd454ed679cb77a396f8f2f066e3d9a8f72fb76b5fdfcc629b9b75c5c395d98 SHA512 89a4aedb8848847de4acec8320b1d7afa4c7485a72ebe97b23db15e7ff9677efccb71d1643e8670c6fcc5af499d6f5dd2bc88be0a477005c1d15609318f00d88 WHIRLPOOL c73f7aba0d2d6f1e327f9d30779d44f25746a058c5523b4ea2c9bdd3ed375b08938a0efe1a3b7f84d0b7946254e3d36fc32078bab87195c93897872d559edd95
diff --git a/dev-lang/ats/ats-0.2.9.ebuild b/dev-lang/ats/ats-0.2.9.ebuild
new file mode 100644
index 000000000000..829e15d5cec4
--- /dev/null
+++ b/dev-lang/ats/ats-0.2.9.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="ATS Programming Language"
+HOMEPAGE="http://www.ats-lang.org"
+SRC_URI="http://downloads.sourceforge.net/project/ats-lang/ats-lang/anairiats-${PV}/${PN}-lang-anairiats-${PV}.tgz"
+
+SLOT="0"
+LICENSE="GPL-3"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/glib
+ x11-libs/gtk+:2
+ sys-libs/ncurses
+ dev-libs/gmp
+ dev-libs/libpcre
+ virtual/opengl
+ media-libs/libsdl
+ dev-libs/boehm-gc
+ "
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ "
+
+S="${WORKDIR}"/ats-lang-anairiats-${PV}
+
+src_compile() {
+ emake -j1
+}
diff --git a/dev-lang/ats/metadata.xml b/dev-lang/ats/metadata.xml
new file mode 100644
index 000000000000..1b23acd3e816
--- /dev/null
+++ b/dev-lang/ats/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="sourceforge">downloads</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/bas/Manifest b/dev-lang/bas/Manifest
new file mode 100644
index 000000000000..0adf3996b6ac
--- /dev/null
+++ b/dev-lang/bas/Manifest
@@ -0,0 +1,6 @@
+AUX bas-2.1-makefile.patch 1591 SHA256 c974fd3b3448d6719fdfdcb81b31dbc2b923515641e72f1a5390eb9bb6b0bda2 SHA512 4ab41d2fed965f1165e741edc461070bd5ee6d76b05b16751671f34623c6ac7d459924357ce3db8fdaa9421f2e30f41ded5c4424799c82fc75fb337afd674b55 WHIRLPOOL c00ac263178d916c9e3bf4c659247cf81690b1b318b345a4e2a54d42a3199ae087f64ba3e7bd1594150c559d17c11be8101b2086928811536de831d1119a2447
+DIST bas-2.4.tar.gz 258055 SHA256 2a147dd75a80049c1e6030c97aadb03a31fdbb622d0e18bd7961d167c9b48fac SHA512 1a86805d1981a7bc920d7f6ab7827ee9f0ed9535b78b4c46718106e7abe0b1ef9298631e7e4d3d9bf206a8ca0e1239db48a9d94b0b85b71101aea0956d1454d7 WHIRLPOOL 15a1c8a7f00158e330c13998f00976ab10258d8dffb9689722cb01db7ddd62fd15b6a1cc8ad91368a578729e312088a34f29dcaf60b960e43736e3aa2ff8049d
+EBUILD bas-2.4.ebuild 754 SHA256 2aeb57381ab2732cd830a1fe5ee9225a06864fdb07d6b57a8d81b662b234dc6c SHA512 12b86f38f0e838126cbd02a6a6a98fa4b2fe9603921b3806d6ab981b7fd2bb1f0aa1264ecf7cc5cc21918e6904d69228b2eb64b1da1a091550aadb278c0f4d73 WHIRLPOOL 009369d848c632dbc299b3ead5610137f097303b822c423099ad170b2b6f89f3d98f23aa965a23a25d7cc646f05613b1835bafa65232ed96806cd78f860a4dd2
+MISC ChangeLog 2930 SHA256 c51221dabf6698228d72ca4c8aec2dc1a09c50327d9f002263c15252ff45233c SHA512 13ab0be79632f94e720a2524cf5c729ad72a1985be634fcff80107a9552f333fcc7bf501e296e086aa8d571c2d55f788ea09077ce7c490d8b7817c0afa6816d8 WHIRLPOOL a33846393478ff8a24fdf0a358af00d1762f74681ade6aade980fb268572260bdfe4025ed648f706bdb0d9727c869d20792fa779830eaf899feb605ca14c33c5
+MISC ChangeLog-2015 1183 SHA256 31a3f8a8e7169878f33549987df32d369b51a23b6cce80c0ad7e2ba4c0b0b4b2 SHA512 c8500653f999d072e463379d285625b3bc894c1245ec64ffd46216ad89fab469f22f2f82f3002e58ea6622162fcbe5bdeb0a840cf44b25d9a19bf91eb21f05c2 WHIRLPOOL 80ff6bce81735069127eeb0c4bafbe0dc40c1cbc7fab9e4311bd897fb162cbf4bf79dbf794383e78045bc82f59b58bd584cd363c844c5dcd347f0ee0b21f8ed7
+MISC metadata.xml 275 SHA256 7f1f0c57f0471329c49650406db3cda8565f2e251bc98a38354e9dfb37a3d058 SHA512 01eaccce18447fa65e25b0064e088eafed7dd0f45bf938eeb53fc2dd4610039ce2cbefedbd1a35152f924f29cb7e9de8d19a0c75bf7439c48d6f1a2872af15c7 WHIRLPOOL 8aa88719871efb227c5ca31f6e302b8396a72747d95fba200947467fd1901901047e16ba5a59ef603c661be83cb7fb874be56ad111edd670dfc7f9c8afeeba52
diff --git a/dev-lang/bas/bas-2.4.ebuild b/dev-lang/bas/bas-2.4.ebuild
new file mode 100644
index 000000000000..6e07253f7a6e
--- /dev/null
+++ b/dev-lang/bas/bas-2.4.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="An interpreter for the classic dialect of the programming language BASIC"
+HOMEPAGE="http://www.moria.de/~michael/bas/"
+SRC_URI="http://www.moria.de/~michael/bas/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="lr0"
+
+RDEPEND="sys-libs/ncurses
+ virtual/libintl"
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-2.1-makefile.patch
+
+ eautoconf
+}
+
+src_configure() {
+ tc-export AR
+ econf \
+ $(use_enable lr0)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc NEWS README
+ insinto /usr/share/doc/${PF}/pdf
+ doins bas.pdf
+}
diff --git a/dev-lang/bas/files/bas-2.1-makefile.patch b/dev-lang/bas/files/bas-2.1-makefile.patch
new file mode 100644
index 000000000000..3be4bb09eafa
--- /dev/null
+++ b/dev-lang/bas/files/bas-2.1-makefile.patch
@@ -0,0 +1,49 @@
+Fixes makefile.in to respect DESTDIR during install
+Fixes makefile.in to use $MAKE instead of 'make'
+Fixes makefile.in to respect AR during libbas build
+
+Patch by Kevin McCarthy <signals42@gmail.com>
+
+--- Makefile.in
++++ Makefile.in
+@@ -27,7 +27,7 @@
+ libbas.a: auto.o bas.o fs.o global.o token.o program.o \
+ str.o value.o var.o
+ rm -f $@
+- ar cq $@ auto.o bas.o fs.o global.o token.o program.o \
++ $(AR) cq $@ auto.o bas.o fs.o global.o token.o program.o \
+ str.o value.o var.o
+ @RANLIB@ libbas.a
+
+@@ -35,7 +35,7 @@
+ install-po-no:
+ install-po-yes: $(CATALOGS)
+ for cat in $(CATALOGS); do \
+- dir=$(localedir)/`basename $$cat .mo`/LC_MESSAGES; \
++ dir=$(DESTDIR)/$(localedir)/`basename $$cat .mo`/LC_MESSAGES; \
+ [ -d $$dir ] || @INSTALL@ -m 755 -d $$dir; \
+ @INSTALL@ -m 644 $$cat $$dir/bas.mo; \
+ done
+@@ -44,14 +44,14 @@
+ for i in test/test*; do ./$$i || break; done
+
+ install: all
+- @INSTALL@ -m 755 -d @bindir@
+- @INSTALL@ bas @bindir@/bas
+- @INSTALL@ -m 755 -d @libdir@
+- @INSTALL@ -m 644 libbas.a @libdir@/libbas.a
+- @RANLIB@ @libdir@/libbas.a
+- @INSTALL@ -m 755 -d @mandir@/man1
+- @INSTALL@ -m 644 bas.1 @mandir@/man1/bas.1
+- make install-po
++ @INSTALL@ -m 755 -d $(DESTDIR)/@bindir@
++ @INSTALL@ bas $(DESTDIR)/@bindir@/bas
++ @INSTALL@ -m 755 -d $(DESTDIR)/@libdir@
++ @INSTALL@ -m 644 libbas.a $(DESTDIR)/@libdir@/libbas.a
++ @RANLIB@ $(DESTDIR)/@libdir@/libbas.a
++ @INSTALL@ -m 755 -d $(DESTDIR)/@mandir@/man1
++ @INSTALL@ -m 644 bas.1 $(DESTDIR)/@mandir@/man1/bas.1
++ $(MAKE) install-po
+
+ .c.o:
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
diff --git a/dev-lang/bas/metadata.xml b/dev-lang/bas/metadata.xml
new file mode 100644
index 000000000000..62afbf117e8a
--- /dev/null
+++ b/dev-lang/bas/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-needed -->
+ <use>
+ <flag name="lr0">Use the LR0 parser instead of the recursive descending parser</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/bashforth/Manifest b/dev-lang/bashforth/Manifest
new file mode 100644
index 000000000000..7ccb6ecd3499
--- /dev/null
+++ b/dev-lang/bashforth/Manifest
@@ -0,0 +1,5 @@
+DIST bashforth-0.58a 78391 SHA256 846eb063e49aae42c38c29c792ec71a9e0d7b0d60f04cd69c15a8cb53257d128 SHA512 55a158fc80d6108a9151537d9d222f23dbeab9b3c9c821068c15ace283b050c0630da8e1cc0a30d997d76acbcd5f7cc38662c997df0d87b7ce68bb3de446d296 WHIRLPOOL 7041a9f9a903c2850c743668eebc410002f8843bee053c341403b9933f9e8b2e1ce9c6a4c785f84bcc67bc51dc6fd6abab7f55f940bd00c642456c20e86737bf
+EBUILD bashforth-0.58a.ebuild 496 SHA256 32e0bf43712b91fc3dce10610a296b5c6c8b3765f0bc28b1ab9affdca16f3d4e SHA512 4afac34b3ea2bbf666695ce5704b09e30a0ccb78bae90e53740825a7872186489d77905a98d9d4c83a0030763d9009c3694e41ec728639a72ad8e199ddfd9ffc WHIRLPOOL 840ede936e4a49bc498c2d049a163017a5641783e9a2d7aa48cc65fae79456a34c31a7d184f172bda687a6536a0fa76750aec70e4a851629a141f10cdce226a9
+MISC ChangeLog 2182 SHA256 5fbaf7a070e9ee0e54252ccfcb106491a044f7ed697f9a52d6f8eff66e133fdb SHA512 7e8fa1d21f149a75de32d15e1ad740d24ffb6e1bf784b011b30b719b46e714574db32e3e9f2a5cc0dad30bcbe4387b0f9ac7c563b5a14c0a70d9459612ac2d74 WHIRLPOOL 483ebc62d37aaf47a1c3e07b1047de27dfa19b4a083d674ebffd879691232f75f0f9f54b8d8448f6be5517e9f4acacc941075b1d79773925dda9b1845dc39940
+MISC ChangeLog-2015 1548 SHA256 c7fb47ed80931364eff60bdd05eceff0f0550bdc3de7469535963482031b6785 SHA512 49725f08e4bed00785f64a4baddc54266951d59e5cf9f6b693cfc1a1e0c6ab2dfd87133a68ee4f0aac39e122df0246f3276f5e0c009fd2a7f60eef506f43366d WHIRLPOOL 1064e27ba67f4c62d476518b987f1388978fc35cf99d637f462de11b235d42c16ad41388d721c7c9907a3dbaf51309fd1cbb11489f4b35407a780394eedfcfd9
+MISC metadata.xml 252 SHA256 a590e5133cd97a615db4f977b0e28e5c60c56cac76eb3d339109cdf379003b60 SHA512 cbda7bf9832872764ae776ce16b2966c37a2ba3a1982d9817006fd6b82d7b17146434cde428bf114062a483e9053d2acdcdd004695e6ebf428d19cdc09937c65 WHIRLPOOL b209a730a169969b9e3c4d4612368bc5b30bfa5fae275d98d83ba96fd0ad01d308a8fed4f7d67a7c9fa417c624dfeb23ce89ab58923a8a0b5b1bd68ee73f288c
diff --git a/dev-lang/bashforth/bashforth-0.58a.ebuild b/dev-lang/bashforth/bashforth-0.58a.ebuild
new file mode 100644
index 000000000000..12ccf5c5d5ee
--- /dev/null
+++ b/dev-lang/bashforth/bashforth-0.58a.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="String-threaded Forth interpreter in Bash"
+HOMEPAGE="http://www.forthfreak.net/index.cgi?BashForth"
+SRC_URI="http://forthfreak.net/${PN}.versions/${P}"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+IUSE=""
+
+DEPEND=">app-shells/bash-3.0"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${P}" "${S}"
+}
+
+src_install() {
+ newbin "${P}" "${PN}"
+}
diff --git a/dev-lang/bashforth/metadata.xml b/dev-lang/bashforth/metadata.xml
new file mode 100644
index 000000000000..d920e3ba3e56
--- /dev/null
+++ b/dev-lang/bashforth/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>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/bff/Manifest b/dev-lang/bff/Manifest
new file mode 100644
index 000000000000..c2dc80d38210
--- /dev/null
+++ b/dev-lang/bff/Manifest
@@ -0,0 +1,8 @@
+DIST bff-1.0.3.1.tar.gz 2617 SHA256 189438f69bf0b66728caa1afed99e83fc03cdd3bdbcfa3c10c766e7bbea50712 SHA512 0bf9e20ffff204f3092b7f02197002880a0be0f4851f4c5f29bcb0974b90e5d518588c334b4f9224ed3320191269c7b4bfe42bd0339ef5ba86bee8bf1cf2a66d WHIRLPOOL be6e7ee7cbd2da649c3d7c0c29075996a552a9d716fdd34268390e5b6a38f8a4db77c5ab9f7c17c9b5066b605aaeb7950398092be697c961a10b2300d00a6f17
+DIST bff-1.0.5.tar.gz 4833 SHA256 8fff205c1c60f15c43b5613a73f1b6b7cac9f58c7c803eed4ed4c890a9374110 SHA512 78e481f6f371421ce6f046041fe6d48be2e11000ddda82f60244c0100665469c4aff4f151d297bb533140d723f68d5a3844e0c29a256b022ac93cafbd2abe9fd WHIRLPOOL 835763aaedc10a6137710b82bf9a62ea8e438923c954291f13ac23aa04aecef4367fe14619a30322aaf49e002f9eb7a7166aee6d9181ea9b4dfa7bd710dbb897
+DIST mandelbrot.b 11669 SHA256 f0f048e90855450fb06f2bea21f914f0d24e6b6c15fd050c68176ff794c6229e SHA512 3a1950f8be61fd33e563fe17dbc1297deae3ec2d276a6895e4bbb7d55c5bcf33ec7e9024d9776ad5c9c29b25c55bd08dea71403a60f9478fb3b80c22303d0862 WHIRLPOOL 8dca9257c6c6e1c56a8e5b4b9dc3cd698b44d28499b1760caff7b1fe3bdf8ebafdd30fc92b0134484e91d97bf59b6b2ad8dcc5b02892f28d4bb74add97d892e0
+EBUILD bff-1.0.3.1.ebuild 905 SHA256 1d26e55438783f349692219bfdaa877bde338955031cb62da9fbdf959df16f8c SHA512 c4bdf46d22a9cb2fd36b90da74a5b5d79f5ed11f226bdb209de7641f6732626d46ad00906f49277b7b29eac9805593096e0c9e5289b30ace894731064f4b4862 WHIRLPOOL 14804ef0e8985368d4dfbffa73b2c4a66d38cdb755aa22453cd2f3cc0da0c7962e795476287b1c16aa33c2f3b2a7364faa4657acf2a7b81a185aa526e99328cb
+EBUILD bff-1.0.5.ebuild 793 SHA256 243c19e4220abf9e75a427e1f35e27e289f593c86e914b3b7b0b8f97e818127d SHA512 b107dcddd5e2ff2e37add5e0c744e6d00901fb9f51379c07d8101ba08660fd4024e1dc153676511a0fbf31b7cc0a2b6d7244376f9333ec71bbf2f401bae387c0 WHIRLPOOL ef70ae69f7d34d1ddc168e97da9e328b87f4210118471beae1555eeb6d77da0a38d3bc2431ec1679e2e3d039f0f8c6ef0ce2f087ed7f84d6822cd25b428984cf
+MISC ChangeLog 2907 SHA256 dc4c98f11a33a3a203389ae7dfa2e1e00b3d5f1cc13d246021afd6047f3b7d0e SHA512 0425bf5ac240bd0620b6ee935798d7aba03c15f521febe955f04065c7e78c65a11170834ae56f51aa853db2b97c119d24d88b5704bc5d9854eba2dbc9d0c7914 WHIRLPOOL 77e90b1dc6df8ad844e8a4b4a1ae345d6111668a8c3101ab8490b9a4b195cf6ca890538a518ce2bd2a17bd177539a762af3e3c30c8cd7aac984aa5bbcf0af8e6
+MISC ChangeLog-2015 925 SHA256 55b6118ca1cb520ffd209bb2e60a32a7698037d305c08f46e9be04e9c972fe95 SHA512 a22275c06d0f19705ba0186aa845ee8b9563f6001a0957b0db342fe0ba67132cd7ecbe23ef03575de6f73815d30ab5a6311a31b568bb2365dfa5ad960738188c WHIRLPOOL 98f13cc40e68ce6b053c595f776cc92750853ecfc1f87a5eea9fc4b0259d3636e9ca8812df4c9ed4339fdda72b978f080e4f5b426d0358e906913846acfdd1da
+MISC metadata.xml 358 SHA256 f6da3d533904304c333425ea55aba8e364571db1376d026d50e2604025aa6b59 SHA512 dc6a26609f65e38ec703c857c686e555170ad4021a994c3a39af131a9f3a38d6207a70558aae46dc5927dda8a9f735795d879a1ac4088ffeac5d09a068627f9c WHIRLPOOL c84fcaf98eee098af29d294fb51a9e50627b6fd9b49cfcb1b3dd658d669e7af3a7e695b4b8754964be30a61976f7be118df40d949afb8b9068483e26652079ac
diff --git a/dev-lang/bff/bff-1.0.3.1.ebuild b/dev-lang/bff/bff-1.0.3.1.ebuild
new file mode 100644
index 000000000000..e95106f26f97
--- /dev/null
+++ b/dev-lang/bff/bff-1.0.3.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit toolchain-funcs
+
+DESCRIPTION="a brainfuck interpreter"
+HOMEPAGE="http://swapped.cc/bf/"
+SRC_URI="http://swapped.cc/bf/files/${P}.tar.gz
+ test? ( http://swapped.cc/bf/files/mandelbrot.b )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 arm hppa ia64 m68k ppc ppc64 s390 sh x86"
+IUSE="test"
+
+DEPEND=""
+RDEPEND=""
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ use test && cp "${DISTDIR}"/mandelbrot.b "${S}"/
+}
+
+src_compile() {
+ $(tc-getCC) -Wall ${CFLAGS} ${LDFLAGS} -o bff bff.c || die "compile failed"
+}
+
+src_test() {
+ ebegin "Running mandelbrot test"
+ ./bff mandelbrot.b > mandelbrot.out
+ eend $? || die
+ [[ $(md5sum mandelbrot.out) == "5024283fa65866ddd347b877798e84d8 "* ]] \
+ && cat mandelbrot.out \
+ || die "mandelbrot did not output correctly"
+}
+
+src_install() {
+ dobin bff || die
+ dodoc README
+}
diff --git a/dev-lang/bff/bff-1.0.5.ebuild b/dev-lang/bff/bff-1.0.5.ebuild
new file mode 100644
index 000000000000..b0504e8a5fee
--- /dev/null
+++ b/dev-lang/bff/bff-1.0.5.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="A brainfuck interpreter"
+HOMEPAGE="https://github.com/apankrat/bff"
+SRC_URI="https://github.com/apankrat/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~x86"
+IUSE="test"
+
+DEPEND=""
+RDEPEND=""
+
+src_compile() {
+ # Makefile is not nice
+ emake -f /dev/null CC="$(tc-getCC)" bff
+}
+
+src_test() {
+ ebegin "Running mandelbrot test"
+ ./bff samples/mandelbrot.b > mandelbrot.out
+ eend $? || die
+ md5sum -c <<< '5024283fa65866ddd347b877798e84d8 mandelbrot.out' \
+ && cat mandelbrot.out \
+ || die "mandelbrot did not output correctly"
+}
+
+src_install() {
+ dobin bff
+}
diff --git a/dev-lang/bff/metadata.xml b/dev-lang/bff/metadata.xml
new file mode 100644
index 000000000000..50b475c648bb
--- /dev/null
+++ b/dev-lang/bff/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>amynka@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+ bff is a slightly optimized interpreter for brainfuck, a turing-complete
+ programming language.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/blassic/Manifest b/dev-lang/blassic/Manifest
new file mode 100644
index 000000000000..cde964e4d805
--- /dev/null
+++ b/dev-lang/blassic/Manifest
@@ -0,0 +1,9 @@
+AUX blassic-0.10.2-tinfo.patch 398 SHA256 066ba7c35ff8af4868859e445d873301e4389d884191492bb7d4b381ada73cfe SHA512 362e5b0c1f3495b08ea15e78259a42eecc93875fb646c6cc198b89a14802e5bd0258b401ef2875c38f298d28247dcfc8971da916e2b0e89784302a1bd14f14c9 WHIRLPOOL 612d7710c86c3e7f44e3fefbd02383d1f04f12bcc921a39dbc08d9f18b1c484c825394e64615885438eb247a94249ff724656ec863896b68f49a6a5452862bcb
+AUX blassic-0.10.3-tinfo.patch 398 SHA256 066ba7c35ff8af4868859e445d873301e4389d884191492bb7d4b381ada73cfe SHA512 362e5b0c1f3495b08ea15e78259a42eecc93875fb646c6cc198b89a14802e5bd0258b401ef2875c38f298d28247dcfc8971da916e2b0e89784302a1bd14f14c9 WHIRLPOOL 612d7710c86c3e7f44e3fefbd02383d1f04f12bcc921a39dbc08d9f18b1c484c825394e64615885438eb247a94249ff724656ec863896b68f49a6a5452862bcb
+DIST blassic-0.10.2.tgz 361603 SHA256 b0ef334d5c1c710643f1dd11e651ce091e7059aa5e9895b547dfa86c3638bdfa SHA512 20f7210fd42ff58e11d7238aee37c21f18b733faf11edeb1d1a3e78c8fb524e37f0c871a2ab6b6608daaf593c4b4e8da4e2f86cddb8ad5e23905b0ce081feffa WHIRLPOOL ba571518104e319c47a341654f241e0b53ece0b614f200a824440fd0e67795a375d4f1703ccaa42ac8c85572c0ee6b0d3c980379094bc836fc4d866e2678cf1a
+DIST blassic-0.10.3.tgz 391555 SHA256 c9c3002ad0de50aa2211634b41483b83a3dc985ec7ca68818450d8f4891c1693 SHA512 7405e82a4855d87715fa8475e9b1858a95e18cd240c14ff422e31fd799f2d8182c7e0e22bfdfc2d7b95824660b2fe0bec9b0aaaf20dc1ce985f77b6da3173caa WHIRLPOOL 4010bfe149df557abf60edd548eca0074d8b7287e80af8a8bd2ace479f7d2e92d54f68137d19450357b3912bb8297df51cc14728db58140166a3b6ac8f85296c
+EBUILD blassic-0.10.2.ebuild 664 SHA256 5543dd83cb9aafc29cb7a2c203616409b9abbc0f772bc46be2c43cad7d426fa0 SHA512 47e955e45c00eeab39dacaf25f3016dfd21cc652fbe6c170a843746496c1d3de5829fac590cd1d2f94d18dee99f54c8de5864e9b7a1c9b327b18b05430d5780b WHIRLPOOL b0e2bd944f010077c106e1991ad8ce8700d2af652ff68776b82f286aa834d8c1751dcfde6b9e4903540507d8941c2fdae1b8b810c0b4b7221742dc223fbe5b81
+EBUILD blassic-0.10.3.ebuild 665 SHA256 8b0c053d9374897a6df0022702a10cf06cf517bf08fe1a273dbed7f788b233a1 SHA512 4bb6686bc25b84701cdeaaa4014cda88c21040ba4dc6e1cbf5d10864b080ee3c5681ec9356d6d2c3e6f6e9ab955a653c271cc751ac60f43446c6bab05aa0ddbf WHIRLPOOL 68e2196d8e6b91474d8b62c9b5abe1262fa6cc6a40a5b01a82995408118916b5b819f6af4316ef3ba9732c0e5f2892fc3737d438c6a7b48950578a59f33115bc
+MISC ChangeLog 3428 SHA256 b25318746325a130a40b670a0267359849681c18f87eadc1bdd97da2e558bda1 SHA512 438c521194cca78ba9671f51ab8c1b7a2936034a25e5648588410f3aea1763888d1bafc263c0606854a5296fea8017dfedb97de5f3d9e4fd730e6b1c26dd6e87 WHIRLPOOL 3394783eade1c4ae0ec3e7471cf6ac3940bf4898893319f87bd8957ddbd0494b0d7129bfbcf107114c94bb25dfaeb925dc26f9122d68835474e2995c67297a1c
+MISC ChangeLog-2015 4024 SHA256 6d8bbcd910939660f339fa27b4263f917cf10413681460128aa5eabfb339dee5 SHA512 ac179434fcd1dd7364a40562de5275f8f6fece2e2000ea27951ee358bde3fe315aa14fd2bd47788dc102ef2ef7e7406a6ea642872ea378dd13355f8ecc712114 WHIRLPOOL 5104f8e13a0a7836246d963bfcd5dd24a22f9944b0b0f7805a7d928a0080ffc9e1681b715a2f8fab227720033aaa2a7e040ecd0c6278ed17512014f1d6defe42
+MISC metadata.xml 558 SHA256 b4dd5de654cabb20c81a01325121896fcbec6b0754ffddbc96b6a69634f710ce SHA512 e457a6e75314fd2964bd094c812b5beb4fb6da067d5e4080fd98040ab1aa74599e6c1a16af3530c77512c2445e94abb10d7262fec09b7d70b1671ad870a679b3 WHIRLPOOL 490e358a456fddeeeaa65c52ae40e1ae47a67724f20f00c636be97de434c703e0b01958ba3a8e2099d61abc69ed9cba5a68162f4ad27146fb9e08f3785b20ec8
diff --git a/dev-lang/blassic/blassic-0.10.2.ebuild b/dev-lang/blassic/blassic-0.10.2.ebuild
new file mode 100644
index 000000000000..1256cd529348
--- /dev/null
+++ b/dev-lang/blassic/blassic-0.10.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="classic Basic interpreter"
+HOMEPAGE="http://blassic.org"
+SRC_URI="http://blassic.org/bin/${P}.tgz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 hppa ppc x86 ~x86-linux ~ppc-macos ~x86-macos"
+SLOT="0"
+IUSE="X"
+
+RDEPEND="sys-libs/ncurses:0
+ X? ( x11-libs/libICE x11-libs/libX11 x11-libs/libSM )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-svgalib \
+ $(use_with X x)
+}
+
+DOCS=( AUTHORS NEWS README THANKS TODO )
diff --git a/dev-lang/blassic/blassic-0.10.3.ebuild b/dev-lang/blassic/blassic-0.10.3.ebuild
new file mode 100644
index 000000000000..d2c79884455f
--- /dev/null
+++ b/dev-lang/blassic/blassic-0.10.3.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="classic Basic interpreter"
+HOMEPAGE="http://blassic.net"
+SRC_URI="http://blassic.net/bin/${P}.tgz"
+
+LICENSE="GPL-2+"
+KEYWORDS="amd64 hppa ppc x86 ~x86-linux ~ppc-macos ~x86-macos"
+SLOT="0"
+IUSE="X"
+
+RDEPEND="sys-libs/ncurses:0
+ X? ( x11-libs/libICE x11-libs/libX11 x11-libs/libSM )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-tinfo.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-svgalib \
+ $(use_with X x)
+}
+
+DOCS=( AUTHORS NEWS README THANKS TODO )
diff --git a/dev-lang/blassic/files/blassic-0.10.2-tinfo.patch b/dev-lang/blassic/files/blassic-0.10.2-tinfo.patch
new file mode 100644
index 000000000000..3253532a6bc2
--- /dev/null
+++ b/dev-lang/blassic/files/blassic-0.10.2-tinfo.patch
@@ -0,0 +1,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -191,7 +191,8 @@
+ AC_CHECK_HEADERS([ncurses.h],,[ncurses_found=no])
+ if test "$ncurses_found" = yes
+ then
+- AC_CHECK_LIB([ncurses],[tputs],,[ncurses_found=no])
++ AC_CHECK_LIB([tinfo],[tputs],,
++ AC_CHECK_LIB([ncurses],[tputs],,[ncurses_found=no]))
+ if test "$ncurses_found" = yes
+ then
+ AC_DEFINE(BLASSIC_CONFIG_USE_NCURSES)
diff --git a/dev-lang/blassic/files/blassic-0.10.3-tinfo.patch b/dev-lang/blassic/files/blassic-0.10.3-tinfo.patch
new file mode 100644
index 000000000000..3253532a6bc2
--- /dev/null
+++ b/dev-lang/blassic/files/blassic-0.10.3-tinfo.patch
@@ -0,0 +1,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -191,7 +191,8 @@
+ AC_CHECK_HEADERS([ncurses.h],,[ncurses_found=no])
+ if test "$ncurses_found" = yes
+ then
+- AC_CHECK_LIB([ncurses],[tputs],,[ncurses_found=no])
++ AC_CHECK_LIB([tinfo],[tputs],,
++ AC_CHECK_LIB([ncurses],[tputs],,[ncurses_found=no]))
+ if test "$ncurses_found" = yes
+ then
+ AC_DEFINE(BLASSIC_CONFIG_USE_NCURSES)
diff --git a/dev-lang/blassic/metadata.xml b/dev-lang/blassic/metadata.xml
new file mode 100644
index 000000000000..a80f33b0af3d
--- /dev/null
+++ b/dev-lang/blassic/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>mr_bones_@gentoo.org</email>
+ <name>Michael Sterrett</name>
+</maintainer>
+<longdescription>
+Blassic is a classic Basic interpreter. The line numbers are mandatory,
+and it has PEEK &amp; POKE. The main goal is to execute programs written in
+old interpreters, but it can be used as a scripting language. Many examples
+are included in /usr/share/blassic/examples/.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/c-intercal/Manifest b/dev-lang/c-intercal/Manifest
new file mode 100644
index 000000000000..6886a7c61b9a
--- /dev/null
+++ b/dev-lang/c-intercal/Manifest
@@ -0,0 +1,8 @@
+AUX 50c-intercal-gentoo.el 191 SHA256 c8d2bb894ef97e3a9c85b51276cb918636e2aaed3930189035093ea7eecca378 SHA512 957e43fb8ada732ae9224313456d750df25484b8bc8d0d3b1ffcd547542de99ffcffdc8dabbebda0fbaa0a760e799b403a6e1a5160e5359e15072a72e9c19ab2 WHIRLPOOL a8c408b94bae01faba9370ce55991792cdd023e706039307c98eb32319ce5086f94c3120af55bf4eee23588a65dcbff88427de83f4536457634aa7286eb54489
+AUX c-intercal-30.0-version.patch 279 SHA256 00c6e87f98f46ed7073d0af765800cd9d342ede0d8bc0e81fdc1411abba4ea26 SHA512 ba38939f207587ae7b99a2dab63e395c27a01ee6e8495c8b10eee3c9d48ee9848cc2e240cb123abd93e69d1f516cf779f41f5b888ee194641df50001ac446a60 WHIRLPOOL 6492a0707bf43c7a45d79d27cd759369fde31f6a7c02988307aac55c46361ae034c6dd7d0686fd235e23c042c84ac3b7736c84885a144599b11b2a9823b565d1
+AUX c-intercal-30.0-yywrap.patch 282 SHA256 730015aaa73bc91a4534a2e6235ee5ad54c23a24aeaa85f22288ee4c1e4af110 SHA512 b181da7c93268ece0db9244ed7bc0d085d12dfeb92e6f4b6af9b8fe17fed8e5ef432006bb097fc568a401e74540c97a3afa738510f76f78052332c573ae1999c WHIRLPOOL 2617f176a81b070bdd583320ff6716afc8d4d05ab3a605b81f91559208aaf7d2c672cc3d39c0254b98dd59312d4f10266f10018a1d082a1952849b56fea94467
+DIST intercal-0.30.tar.gz 930759 SHA256 b38b62a61a3cb5b0d3ce9f2d09c97bd74796979d532615073025a7fff6be1715 SHA512 e82f52082a73e0eb6116026f78fdcc38369f54af828b9ed0d3ca6ed6c40550bfa81db4ca7c4d09015b5db5104a1c06229cfed52e1d202c3a7443f933fbcc0498 WHIRLPOOL b76542b81d8322c5791a30573e0b7efdd7793a298970b29f074e49fa061e3a28f38fdbf7732f74a77d940e8167650182d3366f657ed525d079feb0c3d47d7dc2
+EBUILD c-intercal-30.0.ebuild 1712 SHA256 88bba03fe1cf5441d89278ac8904764158ef02042e59cd7cbf5c22485d6839ef SHA512 e086415af60d5f2b6c0a97806e320e6af07c990d384f76859232c221e1592c3d9d27a5d0ce4829b3d85070c77901324d1ba09f20f43c291d29be083e49926c48 WHIRLPOOL 3f9ffecb38108b6b38f8fcf79fdd4fe78a77621351394e13e01007d607c6764530edbe8412e3a75c5e902b3a446dab3acf89ca623cd866b79ffadeea2e919959
+MISC ChangeLog 2691 SHA256 5a1c03fee88cb648fdef8fd85cac914defd0b26f7934869104c8accf762f4d9c SHA512 b5b6537ed6201c66b48cf478792aebec5672f864fde9471486adb348975e4c01a9cc662bd281aecbf684348147682df21b6d12e4f0dbc1bd2be44a2cc0b3ab9c WHIRLPOOL 459daffa4b903f928d006184b92c4ab5d136dac59e241eb0c56d351c300749e562578d2ad4f8cd7225741a6deb2251743dd22a8a04d14c6104713ba643d3dab9
+MISC ChangeLog-2015 1588 SHA256 8bd7c4ba677e02172b8fc313d0c2c6bf5a55bb985053dd7027ebd3ebcdf06715 SHA512 a6320a07faba809ab865acc21c3f1cdfd6e42cc34b82ad326d9f54252fb6d78f5171236594498bfdb18966c10388e1be88b07b91379dcc9f6da269673691eaa3 WHIRLPOOL a9c218b68fbb9409006e452dbab170cfe8e92506cdc2720c34835b1c3979db7e79f5729dda89fa1ab1f7e9e3d070fac9d91dd8a00602c69530a89542cc900009
+MISC metadata.xml 669 SHA256 0c9301423112da2ee9f249f7dc94c3c2b7653aa96db4898e9258fa2cc0f3967a SHA512 4e2ab95dd4c7fd02a504dfe1b16a4048bcd1c481fd1a1526927b2e6739738c4977f50449226e6974258382e04505aebfc44c1d9329b56d502b4b0cddd5ba9f82 WHIRLPOOL 40b03aa42a18ce0a362815693bfec6103f69b66b333d2ddf95abb900fa6a809ef2af3f1a08f9d231acde48e50712f2e5d20f4725755d3c139b96649364f71c7c
diff --git a/dev-lang/c-intercal/c-intercal-30.0.ebuild b/dev-lang/c-intercal/c-intercal-30.0.ebuild
new file mode 100644
index 000000000000..52876eed0055
--- /dev/null
+++ b/dev-lang/c-intercal/c-intercal-30.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools elisp-common
+
+# C-INTERCAL uses minor-major ordering of version components and
+# negative version numbers. We map version components -1, -2, ...
+# to 65535, 65534, ..., and subtract one from the next component.
+# For example, upstream version 0.28 is mapped to Gentoo version 28.0
+# and 0.-2.0.29 is mapped to 28.65535.65534.0.
+get_intercal_version() {
+ local i=.${1:-${PV}} j k c=0
+ while [[ ${i} ]]; do
+ (( k = ${i##*.} + c ))
+ (( (c = (k >= 32768)) && (k -= 65536) ))
+ i=${i%.*}
+ j=${j}.${k}
+ done
+ echo ${j#.}
+}
+
+MY_PN="${PN#c-}"
+MY_PV="$(get_intercal_version)"
+DESCRIPTION="C-INTERCAL - INTERCAL to binary (via C) compiler"
+HOMEPAGE="http://www.catb.org/~esr/intercal/"
+SRC_URI="http://www.catb.org/~esr/intercal/${MY_PN}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2+ FDL-1.2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="emacs examples"
+
+RDEPEND="emacs? ( virtual/emacs )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ virtual/yacc"
+
+S="${WORKDIR}/${MY_PN}-${MY_PV}"
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+ eapply "${FILESDIR}"/${P}-version.patch
+ eapply "${FILESDIR}"/${P}-yywrap.patch
+ eapply_user
+ eautoreconf
+}
+
+src_compile() {
+ emake
+
+ if use emacs; then
+ elisp-compile etc/intercal.el
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc BUGS NEWS HISTORY README doc/THEORY.txt
+
+ if use emacs; then
+ elisp-install ${PN} etc/intercal.{el,elc}
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r pit
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/c-intercal/files/50c-intercal-gentoo.el b/dev-lang/c-intercal/files/50c-intercal-gentoo.el
new file mode 100644
index 000000000000..c376230eb41a
--- /dev/null
+++ b/dev-lang/c-intercal/files/50c-intercal-gentoo.el
@@ -0,0 +1,4 @@
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'intercal-mode "intercal"
+ "A major editing mode for the language Intercal." t)
+;;(add-to-list 'auto-mode-alist '("\\.i\\'" . intercal-mode))
diff --git a/dev-lang/c-intercal/files/c-intercal-30.0-version.patch b/dev-lang/c-intercal/files/c-intercal-30.0-version.patch
new file mode 100644
index 000000000000..3fe8d026e23a
--- /dev/null
+++ b/dev-lang/c-intercal/files/c-intercal-30.0-version.patch
@@ -0,0 +1,11 @@
+--- intercal-0.30-orig/configure.ac
++++ intercal-0.30/configure.ac
+@@ -14,7 +14,7 @@
+ subdir-objects no-texinfo.tex -Wall -Wno-override])
+
+ dnl Information about this version of INTERCAL.
+-PACKAGE_VERSION=0.29
++PACKAGE_VERSION=0.30
+
+ dnl Checks for programs.
+ AC_PROG_YACC
diff --git a/dev-lang/c-intercal/files/c-intercal-30.0-yywrap.patch b/dev-lang/c-intercal/files/c-intercal-30.0-yywrap.patch
new file mode 100644
index 000000000000..9d46a91beceb
--- /dev/null
+++ b/dev-lang/c-intercal/files/c-intercal-30.0-yywrap.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/604848
+
+--- intercal-0.30-orig/src/lexer.l
++++ intercal-0.30/src/lexer.l
+@@ -38,12 +38,10 @@
+ /*#undef wchar_t*/
+ /*#define wchar_t unsigned char*/
+
+-#ifndef yywrap
+ static int yywrap(void)
+ {
+ return 1;
+ }
+-#endif /* yywrap */
+
+ int iyylineno = 1;
+
diff --git a/dev-lang/c-intercal/metadata.xml b/dev-lang/c-intercal/metadata.xml
new file mode 100644
index 000000000000..ca95d6d2a97c
--- /dev/null
+++ b/dev-lang/c-intercal/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>ulm@gentoo.org</email>
+</maintainer>
+<maintainer type="person">
+ <email>pchrist@gentoo.org</email>
+</maintainer>
+<longdescription>
+ An implementation of the language INTERCAL, legendary for its perversity
+ and horribleness (this version adds COME FROM for extra flavor). Comes with
+ language manual and examples including possibly the entire extant body of
+ INTERCAL code. Now supports i18n and l14n (to Ancient Roman locale only).
+ Now with fix patch by Donald Knuth.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/cfortran/Manifest b/dev-lang/cfortran/Manifest
new file mode 100644
index 000000000000..d063f6755a04
--- /dev/null
+++ b/dev-lang/cfortran/Manifest
@@ -0,0 +1,7 @@
+DIST cfortran_4.4-14.diff.gz 23084 SHA256 b49fe76e90f4f7c37e9b9709f4efdc4eee44e781d4c1f3842eed24fac0633daa SHA512 1e0b267efc17c2ba30ca1108d59ef87d1a401e6b88bea2c7045458f8cfad6ec9a05f6bf4a08c1d6cb314c790a4969a1f0fdf0c7b6abc28bae544928aad5b0218 WHIRLPOOL 5e07597d527303c1c15d155ac259f41a4d49e3b3285cc581b044ab5a52d05f8228309eea0a27b7e1a40b255fe3330dea4bf6ab4c1ab3453998ac6500ad17e727
+DIST cfortran_4.4.orig.tar.gz 120119 SHA256 ac7182f01afd3cc14b2525850509109598683eeb1e066c4a1f18661fb0d3d926 SHA512 969d0db566ecd7ed7945cac7f8ceea1cbd94ab427734ba83882acf97022c83b1417e32515d847fee89144137f58f7041cf5164fc397f3d7526f3aa958f8b038c WHIRLPOOL a5544fb9c23b5042d7dd2b52a516115b74e12bc54751f2cd6448eecd4f70cd86854ee4b7bac1248d312155e8be9d756e06d0d4a5bbed4162509a1b2b448330de
+EBUILD cfortran-4.4-r2.ebuild 1068 SHA256 a3e3881acb212f3a768cea13c697c118793ec198be893a8fd540124643271425 SHA512 9c21bd9bac59682cefbe4c25acf7c6bc3c4cbb1f080068e0316275ae580309b3907cc1728f5a6cd51e46e00c12711a259778f1a90395077620a46bef65b5e543 WHIRLPOOL 7521c337f9136f06a20ff6c9239df9921cb74c51f84be6d37141ae76f19d9077aa691466dfa2389faca983f8e48394ef201cca1b493917cd9f7557a074286340
+EBUILD cfortran-4.4-r3.ebuild 1147 SHA256 a9a8bb966ec2e7bbe02b5002e0a31f5f5d77f7e80872530bac3ea4f24cdbccfc SHA512 c4b31b1ceb392f8d4e45710684969f6560480b509a616c87822d7d5a6e4e8f0b332f68c31bb5368234e588915458c7d55032931944b27cc81f5e4cb6f05b849d WHIRLPOOL 6b5b480aa91cdabb64dc4769ead6f6dc4e92ad51ca0fddd96f756a4682b66c8900eceb785c938d5251160a1356695fb0e64cead7c12bec1780054d9b3d868b52
+MISC ChangeLog 2488 SHA256 c1b9d91ec3fcdff53c6ce3f1415b8e87b5ed3510ba9eb99e037cc1b8235bf0c3 SHA512 ba58c9224794587ad1fcbab20243e8bec31fd16c0dfad5349ada2983ab30fe26d3693538f6855ae29a4a47130fd47b6addd1212da63ab83592b020a6549dc515 WHIRLPOOL 4d9ec110227f3de0a455e981a56e0f5a246763d67a23a94eedfe6b2060ae96606317175d8abb45c1d03a5479b28e264a0259c525398af4920bc985544abf0f68
+MISC ChangeLog-2015 3234 SHA256 910abb5b8daca41ffd85fa538300a78f90e68d45b3b1ace17206e8b544af572e SHA512 99984082a9ef9d616e11bf627d141baf1a621c262bb367c7c37507578d334f7f233224233fb71638e7d4c5e0cf89e5c44e5e1ac19c83e6da7d29647718218a2b WHIRLPOOL 2a335e8aec337c59d29facb35bd2d27bc91d589b96c69c5e2c162cc707b93411fcbd0bd94758eeba090dfbd8aabb0ce54aecaac2fe8a7289c9fb456a23e786fa
+MISC metadata.xml 588 SHA256 78832948e1f52990505b9a890306c1a3da836bf6924543a88a364dd8ecda1583 SHA512 4cc9d7ec3c44afc7e8ca2b43c04ea67c88fa1be09f9c594d83d1d011823566efd4e6b889fc4e95b019885be4223de32d94e0126acf70fe5e7cabf753a9923d40 WHIRLPOOL 537ba39899ad3371d0acd650d1f0fac2828242d3589f2d9362e31b88a3851812f0e53331e23111cb170a367226626075a96e0924b38f9fc45ec789e79d8d71e3
diff --git a/dev-lang/cfortran/cfortran-4.4-r2.ebuild b/dev-lang/cfortran/cfortran-4.4-r2.ebuild
new file mode 100644
index 000000000000..c8173a9785e7
--- /dev/null
+++ b/dev-lang/cfortran/cfortran-4.4-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+DEB_PR="14"
+
+DESCRIPTION="Header file allowing to call Fortran routines from C and C++"
+SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}.orig.tar.gz
+ mirror://debian/pool/main/c/${PN}/${PN}_${PV}-${DEB_PR}.diff.gz"
+HOMEPAGE="http://www-zeus.desy.de/~burow/cfortran/"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
+LICENSE="LGPL-2"
+IUSE="examples"
+SLOT="0"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${WORKDIR}"/${PN}_${PV}-${DEB_PR}.diff
+ if use examples; then
+ tar xfz cfortran.examples.tar.gz
+ mv eg examples
+ ln -sfn sz1.c examples/sz1/sz1.C
+ ln -sfn pz.c examples/pz/pz.C
+ fi
+}
+
+src_install() {
+ insinto /usr/include/cfortran
+ doins cfortran.h || die
+ dosym cfortran/cfortran.h /usr/include/cfortran.h || die
+ dodoc cfortran.doc debian/{NEWS,changelog,copyright}
+ insinto /usr/share/doc/${PF}
+ doins cfortran.html index.htm cfortest.c cfortex.f
+ use examples && doins -r examples
+}
diff --git a/dev-lang/cfortran/cfortran-4.4-r3.ebuild b/dev-lang/cfortran/cfortran-4.4-r3.ebuild
new file mode 100644
index 000000000000..85738d919546
--- /dev/null
+++ b/dev-lang/cfortran/cfortran-4.4-r3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DEB_PR="14"
+
+DESCRIPTION="Header file allowing to call Fortran routines from C and C++"
+HOMEPAGE="http://www-zeus.desy.de/~burow/cfortran/"
+SRC_URI="
+ mirror://debian/pool/main/c/${PN}/${PN}_${PV}.orig.tar.gz
+ mirror://debian/pool/main/c/${PN}/${PN}_${PV}-${DEB_PR}.diff.gz"
+
+SLOT="0"
+LICENSE="LGPL-2"
+KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+IUSE="examples"
+
+src_unpack() {
+ default
+ if use examples; then
+ tar xvzf "${S}"/cfortran.examples.tar.gz || die
+ mv eg examples || die
+ ln -sfn sz1.c examples/sz1/sz1.C || die
+ ln -sfn pz.c examples/pz/pz.C || die
+ fi
+}
+
+src_prepare() {
+ epatch "${WORKDIR}"/${PN}_${PV}-${DEB_PR}.diff
+}
+
+src_install() {
+ insinto /usr/include/cfortran
+ doins cfortran.h
+
+ dosym cfortran/cfortran.h /usr/include/cfortran.h
+
+ dodoc cfortran.doc debian/{NEWS,changelog,copyright}
+
+ dohtml cfortran.html index.htm cfortest.c cfortex.f
+
+ if use examples; then
+ insinto /usr/share/${PN}
+ doins -r "${WORKDIR}"/examples
+ fi
+}
diff --git a/dev-lang/cfortran/metadata.xml b/dev-lang/cfortran/metadata.xml
new file mode 100644
index 000000000000..abd077c49f95
--- /dev/null
+++ b/dev-lang/cfortran/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@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ cfortran is a header file to ease bridge between C and FORTRAN. It
+ provides an interface between C and FORTRAN routines and global
+ data, i.e. structures and COMMON blocks. This package includes
+ patches from Debian for better support on newer compilers and architectures.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/cilk/Manifest b/dev-lang/cilk/Manifest
new file mode 100644
index 000000000000..ad4bf2a54e85
--- /dev/null
+++ b/dev-lang/cilk/Manifest
@@ -0,0 +1,7 @@
+AUX cilk-5.4.6-autotools.patch 3379 SHA256 b84f9483fafcde6d4be1ec8f364262cdd4e3251cbc6e457250de329bc879c49f SHA512 a69181b04c8ebd5010164d8796e615cd63837be45409438d20d009eb69492cfe5750f1a21754cdadb15cf9ca4645edc65db46092741e6227df4f41fef5110943 WHIRLPOOL e5434e9ab59f732146873db19d68666ec6c2a877fe419c331350cf8b8e782208f377df23accc981b12d84a9af0591c8d5b051c7667578ea673b5a3822717565a
+DIST cilk-5.4.6.tar.gz 1270768 SHA256 0bee5386fabc87c97d716331b1b492eb8f18c8a8398c566afa3663f27139c9f6 SHA512 1ad082c5e1f42a4f15130673d1d43a0b5dedd80ca0e3182765065be8dccce72b26087243ca3405460dcc90332a84c3c5b1decf5a4650505fb738e7e085998e0e WHIRLPOOL 168138300c33c99a8906ad4c4755b57b7fc360bf5042a63b029a7c58cb7572674c9e8a67fe488ac9573461ea5a0cda69cb3d796abca375a4ecd0fcd7cb9bac4b
+EBUILD cilk-5.4.6-r1.ebuild 873 SHA256 4afef69e9a4014289bd6afdd7cbf7353bac29a0877a0624b2adea77c85a9e517 SHA512 9c5414928164016e8f7b2cd3f87513313de62ac2c8d3988b52571bdded22b63bfaec8d18ab46d39cbf5c3ea0226bc35eab2da7b7525f0007ca081c07dc95993c WHIRLPOOL 7aa9f6326ba774041ed017ed74da76337ac1627bbd50a258cf8fcf584e1b8c4de9ffe7b4021dd13434ad25f9736e8d2965570dcba78ba70b340aaa5a4f7dbf3e
+EBUILD cilk-5.4.6-r2.ebuild 970 SHA256 0527137f4d849f465141bf31738861e86840a8d164ccffc9c8874ab2201080f1 SHA512 853142dc8f3e07718e059d618b7b87b112220d3c47f7536c257ae958f9717cef79b7c9a5818684434d358c56b9a7e82df38ae5604c727a9dd08276cbb4b2fc60 WHIRLPOOL 16706d10d7f4fc8469a451f3f6a66420543e5312b569ca94f018ccb85291b7536e723237bcace77e7e8e5da9a18de66f43d4ddce22d567ec0d2671a4f024c7d4
+MISC ChangeLog 2704 SHA256 95b96777be66ce14d7452268761dbc6e063a8d84bb5176b6cd8169de30f0a013 SHA512 f98fa4ce52a2b20a8523e1722def5bcc384ed57fb46990bc13dedcbe589fc4a436616e6a731f07615f2b75bed18a53cf21a9be271f2494dcddeec23d3dc194fc WHIRLPOOL eed1d19917f0d84598db798679e983e515e76fef37383f62fe6332174f4ff6471bee5063460afefc22aab839de847481daee34ce6457fdf65e0cfc24052cdd6c
+MISC ChangeLog-2015 1234 SHA256 0866f1ce3a8e0547fd5ef3c3b5a79e725ce190725c630ec02bdab4162ad1897b SHA512 bfc24c50f334fc3783614d03591f428264cc5d3e47adb4fe33eef99f379345b91b4a58b5d7c9a9e92f1e228cbbd2caa62d22dcdeb8f9d9727e373c8be2aa4852 WHIRLPOOL 11173cd39718d36412ce37ce93a7bb13b2de4b428a5e978481ab6075923b7b58dc46777088203168c82c0c498e393f48a3a25b103259a9c6fdb90ab52b9aa133
+MISC metadata.xml 868 SHA256 441a71d7c82dc4ecb1dace7804da5fa1e4e8ba684b5360a2391ce370db0e94cb SHA512 a287f9ee4a019c1b242444e2ed8ea7d59fc0b44d002f925e332b28e70efe0478f00899e32f79226b98889db60bcad31b86512a291b1d5543859e05711ffbf7c9 WHIRLPOOL 3f54a53192fce214dd12e36aa10aea94a0acad6ac5446ca53305346750994ddf221ab12b4aa579f5e8a0a462ac1546939da635f77bf00cee0cf55bd4607745b2
diff --git a/dev-lang/cilk/cilk-5.4.6-r1.ebuild b/dev-lang/cilk/cilk-5.4.6-r1.ebuild
new file mode 100644
index 000000000000..80297e33e8b2
--- /dev/null
+++ b/dev-lang/cilk/cilk-5.4.6-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit flag-o-matic autotools eutils
+
+DESCRIPTION="Language for multithreaded parallel programming based on ANSI C"
+HOMEPAGE="http://supertech.csail.mit.edu/cilk"
+SRC_URI="http://supertech.csail.mit.edu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples static-libs"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-autotools.patch
+ eautoreconf
+}
+
+src_configure() {
+ append-cppflags -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200809L
+ replace-flags -O[2-9] -O1
+ econf --with-perfctr=no $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc NEWS README THANKS
+ use doc && dodoc doc/manual.pdf
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/dev-lang/cilk/cilk-5.4.6-r2.ebuild b/dev-lang/cilk/cilk-5.4.6-r2.ebuild
new file mode 100644
index 000000000000..d0d1a60b22df
--- /dev/null
+++ b/dev-lang/cilk/cilk-5.4.6-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools flag-o-matic
+
+DESCRIPTION="Language for multithreaded parallel programming based on ANSI C"
+HOMEPAGE="http://supertech.csail.mit.edu/cilk"
+SRC_URI="http://supertech.csail.mit.edu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples static-libs"
+
+PATCHES=(
+ "${FILESDIR}/${P}-autotools.patch"
+)
+
+src_prepare() {
+ # fix #571060 by restoring pre-GCC5 inline semantics
+ append-cflags -std=gnu89
+ append-cppflags -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200809L
+ replace-flags -O[2-9] -O1
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-perfctr=no \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc NEWS README THANKS
+ use doc && dodoc doc/manual.pdf
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/dev-lang/cilk/files/cilk-5.4.6-autotools.patch b/dev-lang/cilk/files/cilk-5.4.6-autotools.patch
new file mode 100644
index 000000000000..9f2d62b90410
--- /dev/null
+++ b/dev-lang/cilk/files/cilk-5.4.6-autotools.patch
@@ -0,0 +1,81 @@
+diff -Nur cilk-5.4.6.orig/cilk2c/Makefile.am cilk-5.4.6/cilk2c/Makefile.am
+--- cilk-5.4.6.orig/cilk2c/Makefile.am 2012-11-12 21:18:50.374020109 -0800
++++ cilk-5.4.6/cilk2c/Makefile.am 2012-11-12 21:19:09.667111443 -0800
+@@ -1,4 +1,6 @@
+-pkglib_PROGRAMS = cilk2c
++pkglibexec_PROGRAMS = cilk2c
++
++BUILT_SOURCES = ANSI-C.c ANSI-C.h
+
+ cilk2c_SOURCES = analyze.c ast.c complex-types.c constexpr.c \
+ container.c conversions.c dataflow.c elide.c initializer.c list.c \
+diff -Nur cilk-5.4.6.orig/configure.ac cilk-5.4.6/configure.ac
+--- cilk-5.4.6.orig/configure.ac 2012-11-12 21:18:50.371020111 -0800
++++ cilk-5.4.6/configure.ac 2012-11-12 21:19:09.668111459 -0800
+@@ -1,8 +1,8 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT
+ AC_CONFIG_SRCDIR([config.h.in])
+-AM_CONFIG_HEADER([config.h runtime/cilk-sysdep.h])
+-AC_PREREQ(2.53)
++AC_CONFIG_HEADERS([config.h runtime/cilk-sysdep.h])
++AC_PREREQ(2.68)
+ AM_INIT_AUTOMAKE(cilk, 5.4.6)
+ AC_CANONICAL_HOST
+
+@@ -20,7 +20,7 @@
+
+ dnl Checks for required programs.
+ if test "$GCC" != "yes"; then
+- AC_ERROR("I cannot find gcc. gcc is required for Cilk to work.")
++ AC_MSG_ERROR("I cannot find gcc. gcc is required for Cilk to work.")
+ fi
+
+ dnl Checks for libraries.
+diff -Nur cilk-5.4.6.orig/examples/Makefile.am cilk-5.4.6/examples/Makefile.am
+--- cilk-5.4.6.orig/examples/Makefile.am 2012-11-12 21:18:50.370020112 -0800
++++ cilk-5.4.6/examples/Makefile.am 2012-11-12 21:20:06.347380163 -0800
+@@ -5,13 +5,13 @@
+ NPROC = 4
+ PROGFLAGS = --nproc $(NPROC) --yield
+
+-CILKFLAGS=@CFLAGS@
++CILKFLAGS=-O2
+ CILKCOMPILE = $(CILK) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CILKFLAGS) $(CILKFLAGS)
+ CILKLD = $(CILK)
+ CILKLINK = $(CILKLD) $(AM_CILKFLAGS) $(CILKFLAGS) $(PERFCTR_LIBS) $(LDFLAGS) -o $@
+ LINK=$(CILKLINK)
+
+-noinst_PROGRAMS=hello fib fib-serial testall ck magic knapsack queens \
++check_PROGRAMS=hello fib fib-serial testall ck magic knapsack queens \
+ cilksort fft test-locks bucket cholesky game nfib kalah matmul lu plu \
+ heat test-errno strassen rectmul spacemul \
+ test-void-func \
+@@ -58,7 +58,7 @@
+ EXTRA_DIST = knapsack-example1.input knapsack-example2.input \
+ knapsack-example3.input
+
+-check: hello testall fft fib lu matmul cilksort heat test-locks test-errno
++check-local: hello testall fft fib lu matmul cilksort heat test-locks test-errno
+ @echo "Runnig Cilk tests. This will take a while."
+ ./hello $(PROGFLAGS)
+ ./test-void-func $(PROGFLAGS)
+diff -Nur cilk-5.4.6.orig/runtime/Makefile.am cilk-5.4.6/runtime/Makefile.am
+--- cilk-5.4.6.orig/runtime/Makefile.am 2012-11-12 21:18:50.375020110 -0800
++++ cilk-5.4.6/runtime/Makefile.am 2012-11-12 21:19:09.668111459 -0800
+@@ -1,5 +1,5 @@
+ lib_LTLIBRARIES = libcilk.la libcilk.g.la libcilk.p.la libcilk.g.p.la
+-pkglib_LIBRARIES = libcilkrt0.a libcilkrt0g.a libcilkrt0p.a libcilkrt0gp.a
++lib_LIBRARIES = libcilkrt0.a libcilkrt0g.a libcilkrt0p.a libcilkrt0gp.a
+
+ CILK_HFILES = cilk-cilk2c.h cilk.h cilk-lib.h cilk-lib.cilkh \
+ gcc-builtin.h cilk-cilk2c-pre.h
+@@ -8,7 +8,7 @@
+ cmdline.c internal-malloc.c timing.c invoke-main.c malloc.c debug.c \
+ workers.c mutex.c
+
+-pkginclude_HEADERS = $(CILK_HFILES) cilk-conf.h cilk-sysdep.h
++include_HEADERS = $(CILK_HFILES) cilk-conf.h cilk-sysdep.h
+
+ CILK_SRC = cilk-internal.h $(CILK_CFILES) $(CILK_HFILES)
+ COMMON_LINK_FLAGS = -version-info 1:3:0 @PTHREAD_LIBS@
diff --git a/dev-lang/cilk/metadata.xml b/dev-lang/cilk/metadata.xml
new file mode 100644
index 000000000000..f57da6f6b282
--- /dev/null
+++ b/dev-lang/cilk/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@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+</maintainer>
+<longdescription lang="en">
+ Cilk is a language for multithreaded parallel programming based on
+ ANSI C. Cilk is especially effective for exploiting dynamic, highly
+ asynchronous parallelism, which can be difficult to write in data-parallel or
+ message-passing style. Cilk provides an effective platform for
+ programming dense and sparse numerical algorithms, such as matrix
+ factorization and N-body simulations. Cilk is algorithmic, in that
+ the runtime system employs a scheduler that allows the performance
+ of programs to be estimated accurately based on abstract complexity
+ measures.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/cll1h/Manifest b/dev-lang/cll1h/Manifest
new file mode 100644
index 000000000000..957e5d8bb525
--- /dev/null
+++ b/dev-lang/cll1h/Manifest
@@ -0,0 +1,5 @@
+DIST cll1h-0.6.tar.gz 6569 SHA256 3f3e964d7b2e2779c13e6f08f1ca9fe97b9b8a698dcf26eea9e2f16246adf6dc SHA512 19b2716519d169d6c090c64c60db318008ac807723d73420d29b75d8b5cf74d56b2b68177483a861ab659efe24cdc1b6e1f17a9fd3c373490bcb1e755ba784b2 WHIRLPOOL 851f920e221eea0dd7e9eea011646f2bdac5dcb23367c8747a075904d5ec7fb095077a287f6a8866c375f66a0194bb3d5f2cfde3a6399272f72c9ca9344448ea
+EBUILD cll1h-0.6-r1.ebuild 572 SHA256 fae4e202244f4d97e320ef14886402fdb646dd3eff1db9a1249d986d68021f73 SHA512 b80a843bd0de5c9a395f2e82f63b8ed21048803ec1d3d7acb5cdb016c245987c63dd06c006fbd771500307e2be2885c1ed6268c0f04a184de00f5a193d301d92 WHIRLPOOL f8812aa3ddf1b2a0758e30a140a9bf0124a88476aa7a987475d092bef6c61d78d4935e8d5698b6b27fc6d8bb9bbae19e4c119c04ff74db82f2f930fdc34c0e57
+MISC ChangeLog 2518 SHA256 046cc0ead06a8902395aef2aec3fa33814e4f9190043d6e3cdc424c2bf4094b4 SHA512 65f6cf5f1251a7674cc013254b1387b01a1d7e2af83a95fd7b9c29b8e271425f5b1afd235ed47e639148b21a201e79fd6887f4ab5a86b464b097e985910b1ca5 WHIRLPOOL c410c91db8f25c927141f304d26737e659534b01f72c477acb473d60710a0ed47939d2f8e7e02a921fc663fa6b95f9e08596124e0e9d8aa91c932a06afa832d0
+MISC ChangeLog-2015 1536 SHA256 57046a530cb13db99e26784f79afec479cd2ea28426f3fd756727e7a06d4db4c SHA512 a22c2483a2ef08c225b34afbdd6e44236faafd812051694545db562f6a367d16f68b8f6091cf368aa60d607bd500bc958c4e7a6f05181c88ee45dda624be3bb8 WHIRLPOOL d367d8069f92cf446fd88d2bd13944e63992b52bc578bd5bdab1ca4e6b0b85db846416bb7b61f21c3200637d38a809b0219d8e40b2536b030272e652e3e83f2f
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/dev-lang/cll1h/cll1h-0.6-r1.ebuild b/dev-lang/cll1h/cll1h-0.6-r1.ebuild
new file mode 100644
index 000000000000..df6c69f02eeb
--- /dev/null
+++ b/dev-lang/cll1h/cll1h-0.6-r1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="C<<1 programming language system"
+HOMEPAGE="http://gpl.arachne.cz/"
+SRC_URI="http://gpl.arachne.cz/download/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+DEPEND=""
+RDEPEND="sys-devel/gcc"
+
+src_install() {
+ insinto /usr/include
+ doins cll1.h
+ dodoc cll1.txt
+ docinto examples
+ dodoc demos/*.c
+ docompress -x /usr/share/doc/"${PF}"/examples
+}
diff --git a/dev-lang/cll1h/metadata.xml b/dev-lang/cll1h/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/dev-lang/cll1h/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/dev-lang/clojure/Manifest b/dev-lang/clojure/Manifest
new file mode 100644
index 000000000000..124162266209
--- /dev/null
+++ b/dev-lang/clojure/Manifest
@@ -0,0 +1,11 @@
+DIST clojure-1.5.1.tar.gz 540021 SHA256 ee6cc9360e3545a35cdd6a9ae48b5f4034ef2eb2aaa19721df976078952a805b SHA512 8bc4b7098ec11a3cd4d077f32607c5d23118d5f84b88af69b2051c4dd5b17f28f092b77206fba87e23f1163d2d0f7a2c37b1b1ffa1bcfef3ad4c8f74695d71cd WHIRLPOOL e77d13a771903100a3fe6b0ade84375217c5b150498e727a7cef2d856a4004e640e0c95717fb67be6cae1fbab7611189a1f3999726f7bbec43968eef646dcb32
+DIST clojure-1.6.0.tar.gz 579154 SHA256 70b664b24bd8cc7bf0b5519cfa5fa98424eb3e23303fec04b24a03b8bc4f0b4a SHA512 52bf54d157dae77e71e53bac421daa1bca7ef55b837600c8b04751a545cbed0f04d3718543031d1e5b8ca43e2518d356082b9f8c029c2e318996450cfaee9c81 WHIRLPOOL b79b008773ad678e6418a719183c5b240ad0629d3a32384ec6e5979f0377ba2bd39768f27b71da815342bffbd8bdfa5b66cb24e90cf4f489273b33515f591509
+DIST clojure-1.7.0.tar.gz 614331 SHA256 51a950b5b67575869a52debbafe52967759757f2e302a0bd42fb56b0e9859a74 SHA512 243d3120fa1a0f559c1f6b4724d0f7ba72e6f6dd009d0849377087e890aa04dba7c119862001d0c543eb0e35ef5c13cc8967ad494ffa9522daa9f8b1dfc77ef1 WHIRLPOOL 6c002d736968bc5af91eb2f8f593ded5ac14582aeecac67d62a9125c1911986313fece4a19e946b742292df1673b787cc1506c7ff22abe3e534e433e1403e35b
+DIST clojure-1.8.0.tar.gz 627688 SHA256 9d2a9f29a59aadb2abcce27afaaacf3b33b5f2bbf7c2a7c82b3a1837ea81d9ed SHA512 fa5714397e679f77260db054bdc0891a311e7bd14bfceb2dd0494480fb9cf21fc74dd295e75070105ff0cdd50842390a748d8782397c549f51d85d18d54a1231 WHIRLPOOL efa4a24b5316686beb8343f42809381bee2ddebe67dbc8f7f27aaf5fb86baba5ca5f76e7096acc62e94d98cbd40434ad698324f29d667abb76be4d13756f0c87
+EBUILD clojure-1.5.1.ebuild 758 SHA256 b889b8d032b4c84af2fe3978e23a9ba54cb766a8aaf6f2ba5fb227c116c5e94e SHA512 c80ab80d610e27e668fb47692aaba0f469a99144cf28e4edd734451d6cb249feb4e9e2e9af948298f2c04e512358df1ed651d039f8a95c5642338371146758d3 WHIRLPOOL 75b27531b3360fd22f743067b0d18f7e4853fa41274fd1c6284833c4032aef913f338ecf00c00872ab017ac2119af9277f9d385cbf374512df52ecee7e2740fc
+EBUILD clojure-1.6.0.ebuild 773 SHA256 32644630a01ead0be300bab14484e0e82f478b2d76bcb5404aa8bce8c431bd6a SHA512 76c06a79f3b4776b6cb50c246282276f44d1e865dfaeaa0801ed1f9409af615202f81232584a43b921e1fc31ab0441d01ba880a89fa7a8b0190c93655fa9e8d9 WHIRLPOOL c9fdc8caf056f7d5090f2ed8ac833e3d598ffff95b204b55b0ef4879bc3c575e5e9cb51746937abc8c5931384e5fd776ad070cdb094f401cbd8ac6bc8af46c71
+EBUILD clojure-1.7.0.ebuild 789 SHA256 6fd3a9078567047e566cf224a85c9e2052975ace270ee6ab625627044052ad29 SHA512 7db43a64377e78439db3e5febe9a6b8daedadac6211eb62b9760bc7be2c790cad748035492744524e01e13ad3b3ad38650c7a45dd6018c85e0116eeccfaa8f62 WHIRLPOOL 6d27e80548387df4e796486a45132d20fd579578e93ad47a1aa9cf8594ff7e3611d8043edf30decb2d89f58402412e2e70d57e55f1794c082480e35f8ac3630f
+EBUILD clojure-1.8.0.ebuild 778 SHA256 60dd89d8459beb47affd6d41f3e23d9908e1d774f9255eeb5413031d9457fcaa SHA512 689665403990c0a49a22007ae3388c3462b33bc7daa16daa260ec18fa4d15fa0f084d57dfa09f1cb7c8425814f3c99b2b928b791c08a54d13316ce791d6d53eb WHIRLPOOL 6a92fd2a6242f26f19e506ba49a418088515499ce5c8581d9901a78e0c700d9b7e4926280f4599762837ab3f489ebe6e2fe60c2770abc401bac2ac7ed24e4f9c
+MISC ChangeLog 3361 SHA256 13ee8b8bfd07440d012211f8c0429f400baaacf53989ee1de75e6fa631aa2507 SHA512 bf060599b05d1730755e69a7100a01cd02b9c88d49081d2b1c1d179ffd568f6719c9a40e20a278d26f37718e9c361f4a899d6f43e4f4ffdc31e833ca9afc506d WHIRLPOOL 09fba632b7aff365695ca4293deb51b67e799f3ed7abff80a41a376c6f7aba592b26629b77e787676beb52ea4046cdbb1a0d52bc17a3a2c5e2f61df3e9d55855
+MISC ChangeLog-2015 2838 SHA256 0d5bd6290e1c246ed4052e3445dd2c6d627e9037b7a1de131a82edac85328129 SHA512 0bbdf5da0c5aa587c4ded530006c08eee1147bad44e8702ef67509092fb160ff8369042883f83789d9ff464b342d57bec9d1d739a0cb8eed6a7ad4e73469e3e6 WHIRLPOOL 1a9879354e28b0a9d79fba01b7e473de269b525ed8b3b77f6e834302335eded9c176feaaefc5fbabc082e0da91c75aafe0646b679bec566f7fefd7a7c4d0bfef
+MISC metadata.xml 342 SHA256 0d11b97b8fa89d38785213bf007e011abec56a940f3a4039553eef6351a5cda0 SHA512 addc1a4683562bf735ef2334972b58e065a4e344a8b65a25aa8b42e903db252609b1469e005bb653ee50ccf240d2c9841d036e3ef418e36387f98de042eeeb7c WHIRLPOOL 11217ace57d2f73493f4fd60edbe83bbd058fda4084febfd0d81fbe54f1aa35fb2bcbd72aa5d3f60736c8214421baf06e5fc392d7bd96db7707439a2bd91c92c
diff --git a/dev-lang/clojure/clojure-1.5.1.ebuild b/dev-lang/clojure/clojure-1.5.1.ebuild
new file mode 100644
index 000000000000..6ef287d8b158
--- /dev/null
+++ b/dev-lang/clojure/clojure-1.5.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+JAVA_PKG_IUSE="source test"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="Clojure is a dynamic programming language that targets the Java Virtual Machine"
+HOMEPAGE="http://clojure.org/"
+SRC_URI="https://github.com/clojure/clojure/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="EPL-1.0"
+SLOT="1.5"
+KEYWORDS="amd64 x86 ~x86-linux"
+IUSE=""
+RESTRICT="test" # patches welcome to fix the test
+
+RDEPEND=">=virtual/jre-1.5"
+DEPEND=">=virtual/jdk-1.5"
+
+S=${WORKDIR}/clojure-clojure-22c7e75
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar ${P/_/-}.jar
+ java-pkg_dolauncher ${PN}-${SLOT} --main clojure.main
+ dodoc changes.md readme.txt
+}
diff --git a/dev-lang/clojure/clojure-1.6.0.ebuild b/dev-lang/clojure/clojure-1.6.0.ebuild
new file mode 100644
index 000000000000..1dc8763876d3
--- /dev/null
+++ b/dev-lang/clojure/clojure-1.6.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+JAVA_PKG_IUSE="source test"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="Clojure is a dynamic programming language that targets the Java Virtual Machine"
+HOMEPAGE="http://clojure.org/"
+SRC_URI="https://github.com/clojure/clojure/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="EPL-1.0 Apache-2.0 BSD"
+SLOT="1.6"
+KEYWORDS="amd64 x86 ~x86-linux"
+IUSE=""
+RESTRICT="test" # patches welcome to fix the test
+
+RDEPEND=">=virtual/jre-1.6"
+DEPEND=">=virtual/jdk-1.6"
+
+S=${WORKDIR}/clojure-clojure-42ce994
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar ${P/_/-}.jar
+ java-pkg_dolauncher ${PN}-${SLOT} --main clojure.main
+ dodoc changes.md readme.txt
+}
diff --git a/dev-lang/clojure/clojure-1.7.0.ebuild b/dev-lang/clojure/clojure-1.7.0.ebuild
new file mode 100644
index 000000000000..31e5b8a5859d
--- /dev/null
+++ b/dev-lang/clojure/clojure-1.7.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+JAVA_PKG_IUSE="source test"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="Clojure is a dynamic programming language that targets the Java Virtual Machine"
+HOMEPAGE="http://clojure.org/"
+SRC_URI="https://github.com/clojure/clojure/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="EPL-1.0 Apache-2.0 BSD"
+SLOT="1.7"
+KEYWORDS="amd64 x86 ~x86-linux"
+IUSE=""
+RESTRICT="test" # patches welcome to fix the test
+
+RDEPEND=">=virtual/jre-1.6"
+DEPEND=">=virtual/jdk-1.6"
+
+S=${WORKDIR}/clojure-clojure-147f19e
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar ${P/_/-}.jar
+ java-pkg_dolauncher ${PN}-${SLOT} --main clojure.main
+ dodoc changes.md CONTRIBUTING.md readme.txt
+}
diff --git a/dev-lang/clojure/clojure-1.8.0.ebuild b/dev-lang/clojure/clojure-1.8.0.ebuild
new file mode 100644
index 000000000000..83c6eaa7788e
--- /dev/null
+++ b/dev-lang/clojure/clojure-1.8.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+JAVA_PKG_IUSE="source test"
+
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="A dynamic programming language that targets the Java Virtual Machine"
+HOMEPAGE="http://clojure.org/"
+SRC_URI="https://github.com/clojure/clojure/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="EPL-1.0 Apache-2.0 BSD"
+SLOT="1.8"
+KEYWORDS="amd64 x86 ~x86-linux"
+IUSE=""
+RESTRICT="test" # patches welcome to fix the test
+
+RDEPEND=">=virtual/jre-1.6"
+DEPEND=">=virtual/jdk-1.6"
+
+S=${WORKDIR}/clojure-clojure-49e5003
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_newjar ${P/_/-}.jar
+ java-pkg_dolauncher ${PN}-${SLOT} --main clojure.main
+ dodoc changes.md CONTRIBUTING.md readme.txt
+}
diff --git a/dev-lang/clojure/metadata.xml b/dev-lang/clojure/metadata.xml
new file mode 100644
index 000000000000..f6f0bdc9ef70
--- /dev/null
+++ b/dev-lang/clojure/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>mr_bones_@gentoo.org</email>
+ <name>Michael Sterrett</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">clojure/clojure</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/closure-compiler-bin/Manifest b/dev-lang/closure-compiler-bin/Manifest
new file mode 100644
index 000000000000..08a1bb72526c
--- /dev/null
+++ b/dev-lang/closure-compiler-bin/Manifest
@@ -0,0 +1,7 @@
+DIST closure-compiler-bin-20150126.tar.gz 5654460 SHA256 9b8eb3ada77a440f09b32807be492f7b71429e6677d2227866fb2b50d9c7574a SHA512 fe302299aa9f5e21c6db4ebb628b63b83a84faea57a533c52d5f1590617d7df1ab484a1f32a4f666ed23de12860e30cd2f43da33fa5ec7dbb27048d2905d537c WHIRLPOOL 5e4f532ddf90577a84613af18e9a81561090a3518dd994f0f3407fa0bc16c3d94f2934c4437519e14394353e43147b5a9677ee5d413b5f08c00136ef6e9f9471
+DIST closure-compiler-bin-20170218.tar.gz 6515448 SHA256 8d8d44e4fc69e82a53b763f6d9418854aeef5ac1af87866a27fd007feb52561b SHA512 4ddbb339615edb104ddcb84775b1da2f096d49dc921b70c5094a7b7afba25e40c1212bbc9f0e51ad643a3a72bfc46a301efcadd7909d09a77d0bb5e68e41bd81 WHIRLPOOL 4b562549870c2efd81095f91181def62f5390cec7d25569da63f1f4b4e0e4ba6e3b64c1e5259b68d68bd748df311274044298f3d4472e12e37f5bd6a53b42fef
+EBUILD closure-compiler-bin-20150126.ebuild 639 SHA256 b6764bcfb8016a0b0b077f86202e5ab4e5a476fdab9349a6e8a5fc0d296bae51 SHA512 b7b12eadc93f2889366428a028a3be9dc5fb5a0e1b2a85a2ba0c4f7bc0f92d17584cafb26291eb98c9ab5cec04019d44d4fa8434519811923b3cf082a63818b1 WHIRLPOOL 27d6a0a3ae5ab01de3811c1e2ffdd22102e101abd125bd537bf4491b1e9c8050a6bb6317ea13695ac48918b2f1b0400c18c7aea44d652c26b551e618549775d3
+EBUILD closure-compiler-bin-20170218.ebuild 648 SHA256 7ee620901cc4b9a7a6dd6611061ac0dcb66c6d4300b347dac6d74db2188a9092 SHA512 c8be5a5abe654036b7a8baed6d1856a35b94d7e13b5ca16de5a9b3028f4333451347331c5565af167da2c103f91ddd80a1551e818dfd2e33e8b3f6aa9e8d4cb9 WHIRLPOOL 39b126898800251558c21a2a5565658d5cc69f51ca5dc246a2bb66f93cc914eb00807f131fb346b021a8b76fc0ca560521bee9571ea1597e9c66c20e4efca90e
+MISC ChangeLog 3191 SHA256 d33a81330c9c9707bff08511e628d0dfe4379f362db869912ba7d96bca10dec1 SHA512 b8a4668c2bc8b8b50ce6b47b0278feedc43fa37fd71fcd643c52ef9e5b61a3e36ca61fccaf032b4e70b8d37725f600141999cf22c0e1fe33807eb5ca247efc8a WHIRLPOOL 8085bc99167233a5a6de2ce2f4a911649caa41fdac1be43b137cb093b9217d38f695cfabe5b716751eee03c0d31fafe86633de026002036492f67fb6055b0774
+MISC ChangeLog-2015 1247 SHA256 532d2a0d774bcc5cce7b31798f372a8084c70bf493f4fbf8322364ae43fe7ef1 SHA512 b86448e78e92a69cb6cdb18e8b4367f666b836413538d6390361d913d4046310ea310e72cd71369a294c192662db21bb32797324bfc191019f54325e8e97e68e WHIRLPOOL 00bb7adac4926b704012a2c744d0ae884f7306440a18ac51f9380bdf5ca8ddffceee258266d480343d9048723735accb936d30b2e3dc5d61dc9b49e03f0cb5aa
+MISC metadata.xml 444 SHA256 f0a5213f77fc8268c9ea4d252dbe93d8b10f39e7023b33ef6a38d5f6c6553d2b SHA512 6cf0a8a51e82601f5806b38a2cca855632acff369a6de2c6dcff1fb36ca6e7e073ff0295069b2ae859e22421ee4321aa4cb635bea0e2c1da558a562bc7916825 WHIRLPOOL 25d40488ff11609c8cbac42e16fd280bd7f761bdbc6dad66a52f694aa28e2988b9bcaf6ad134a4720d06387c6be903cac6f57a8d120454a1ede1652f3c46cc53
diff --git a/dev-lang/closure-compiler-bin/closure-compiler-bin-20150126.ebuild b/dev-lang/closure-compiler-bin/closure-compiler-bin-20150126.ebuild
new file mode 100644
index 000000000000..4db97caba630
--- /dev/null
+++ b/dev-lang/closure-compiler-bin/closure-compiler-bin-20150126.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit java-pkg-2
+
+DESCRIPTION="JavaScript optimizing compiler"
+HOMEPAGE="https://github.com/google/closure-compiler"
+SRC_URI="https://dl.google.com/closure-compiler/compiler-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=virtual/jre-1.6"
+
+S=${WORKDIR}
+
+src_install() {
+ java-pkg_jarinto /opt/${PN}-${SLOT}/lib
+ java-pkg_newjar compiler.jar ${PN}.jar
+ java-pkg_dolauncher \
+ ${PN%-bin} \
+ --jar /opt/${PN}-${SLOT}/lib/${PN}.jar \
+ -into /opt
+ dodoc README.md
+}
diff --git a/dev-lang/closure-compiler-bin/closure-compiler-bin-20170218.ebuild b/dev-lang/closure-compiler-bin/closure-compiler-bin-20170218.ebuild
new file mode 100644
index 000000000000..de842c3bfd89
--- /dev/null
+++ b/dev-lang/closure-compiler-bin/closure-compiler-bin-20170218.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit java-pkg-2
+
+DESCRIPTION="JavaScript optimizing compiler"
+HOMEPAGE="https://github.com/google/closure-compiler"
+SRC_URI="https://dl.google.com/closure-compiler/compiler-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=virtual/jre-1.6"
+
+S=${WORKDIR}
+
+src_install() {
+ java-pkg_jarinto /opt/${PN}-${SLOT}/lib
+ java-pkg_newjar ${PN%-bin}-v${PV}.jar ${PN}.jar
+ java-pkg_dolauncher \
+ ${PN%-bin} \
+ --jar /opt/${PN}-${SLOT}/lib/${PN}.jar \
+ -into /opt
+ dodoc README.md
+}
diff --git a/dev-lang/closure-compiler-bin/metadata.xml b/dev-lang/closure-compiler-bin/metadata.xml
new file mode 100644
index 000000000000..2b30008525b9
--- /dev/null
+++ b/dev-lang/closure-compiler-bin/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>vapier@gentoo.org</email>
+ <description>make whatever changes you want except for removal -- i need a compiler that avoids installing a jdk</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">google/closure-compiler</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/coffee-script/Manifest b/dev-lang/coffee-script/Manifest
new file mode 100644
index 000000000000..05b34ae0f957
--- /dev/null
+++ b/dev-lang/coffee-script/Manifest
@@ -0,0 +1,7 @@
+DIST coffee-script-1.12.5.tar.gz 1429494 SHA256 0dce24d8621bba443b2ec615a5a42e7d12ee332d4abb973606371cca7f628c0e SHA512 b83981508c99e52957786d66b6c93e65cea98386b247cddfd516146eb4edb7ccb49451cc976d683fc9127b1ed0ea0a4d54cc47be519af1bf9e8b3dd79159d591 WHIRLPOOL 20c6f6c0316d3dc65f4b226aee3142ee135acfbd8465deb4df9b3b9f44da213b0c3a22d722b945564818c3c888ff69a7d7cacfc4da3937130a14bc735e8d7d3b
+DIST coffee-script-1.9.3.tar.gz 810246 SHA256 8c8faeeee21ed3cdde727fcc08ed6062d9d0233679317f026160aee8bfa85060 SHA512 660826e27f842ed67ec6ef59f734087c95585e03b6b8c6d25c8ecfc567f3161f59034e730b61e5f806edaaa7ec6c805ad6d14902857aaf09cf6193b0fe14f506 WHIRLPOOL c99eab68344609b5352ee7b7f59ebb4e6c90d1454c3cf37ac8cb00b1add0637e2e56084864ae54cdeb494a6966a97e896bf95760e1e8dbe1b26c0fc75abd5a41
+EBUILD coffee-script-1.12.5.ebuild 1123 SHA256 65d7ebe2c532a0388b835fa73c6aeb760ef26d6ab2f7f1ce563f5b5a6e3cba59 SHA512 5b8f3f894b4f32291aac60ec57aa1d168c5ab5e92eef1fdb272d884a7c141f68ac0e981a0fcf1729849e7ee70ded18deb9811b166a4a4a4f90153358ab23f1e9 WHIRLPOOL f309085a25cf59b22129381968ddbdb0c4e4b03d670684323ce997a46f8fd99f1ebaf584ea01ce57228f850d8771b6e5b21f3884cd99fb64d149fa1175de445d
+EBUILD coffee-script-1.9.3-r1.ebuild 1279 SHA256 7e6c193b0b562b9819582259e60bcfbeb59affc9affb186527df2535ff0f81e0 SHA512 518b919a50760ba8f4b1e84f018ce19acdda3c55666cdd012e46490d96f2c6e0dab9662520afca347105c3555e81d0406b113b555ee27830499882850b6cf712 WHIRLPOOL 31737e52364f84fdcbc4b8f0d24352a4a5a34f28e9761eff1b9345bf6cfdefc26baffac057867fa97a83c60b73145dacf3e9a37db970a8a6139d52ee019bba81
+MISC ChangeLog 3260 SHA256 0b3bb885ace691eb5879541ae4fc75fda12c5c6f4b2b4afac312ff3c35d4e280 SHA512 c44f7bac8192b01b5f36ce9735dd06ad3e07329959de6c1f5a8141a571591d839f8f0902b13fb3334864dd19028ce062e8db29c3d6f08fd52cdb59f74a829f95 WHIRLPOOL f6c014d6503a2b85b8c712b310d5d1b69c9fbce73bee3c34094e43815f6ba62cdc9c428fe43e08083cb28228f21e98bc7fd9e516d0b158251129a66b0f52cfa2
+MISC ChangeLog-2015 643 SHA256 5eda3d5951a1434f324267dda178ecc04ea84b2fd09f007f2536b0db8c94fef2 SHA512 dd734804274716e285dfbdecc285b1c5148c4ac51c0392cf97ad69acd795866226022205813efc5ecde4ff2753dcf153c0f0752043abd623c023347afea1c6e4 WHIRLPOOL c7b4544184b6827f52633d1e9844bec26321c006560c667c93e12ad6d3bb1e42185e3383587f370d8376162699640ed7bfe74d47bbbdbbfe8109fe0219d79078
+MISC metadata.xml 343 SHA256 d1168491aaed71a083cf143d367239712cfe47ded88a90aa58e1e34c972d6c9a SHA512 36eec061eb724a7229933450185185c0ac781d1adc1da4a54b067ef34ab7d861cf336c3c7e4b2c7d12a6e1c9400d4bbb960c67a66afd854209a5268e8e3d19f7 WHIRLPOOL 0658d047c950ccdf2fadf86a5c3cb67ecb234c9269fddfc21fd187a7f6e66fb9ea474caf1b39d53bd8c161fc00c840675e76425a9c5ea9450572af06aea69925
diff --git a/dev-lang/coffee-script/coffee-script-1.12.5.ebuild b/dev-lang/coffee-script/coffee-script-1.12.5.ebuild
new file mode 100644
index 000000000000..e1b9a4e081a3
--- /dev/null
+++ b/dev-lang/coffee-script/coffee-script-1.12.5.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PN="coffeescript"
+
+DESCRIPTION="A little language that compiles into javascript"
+HOMEPAGE="http://coffeescript.org/"
+SRC_URI="https://github.com/jashkenas/${MY_PN}/archive/${PV}.tar.gz
+ -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+# This package has a test suite (that works), but it requires a number
+# of NodeJS/NPM packages that aren't in the tree.
+IUSE="doc examples"
+
+RDEPEND="net-libs/nodejs"
+
+src_install(){
+ local npm_module_dir="/usr/$(get_libdir)/node/${PN}"
+ insinto "${npm_module_dir}"
+ doins *.js package.json
+ doins -r lib
+ dodoc CONTRIBUTING.md README.md
+
+ use doc && dodoc -r documentation
+ use examples && dodoc -r examples
+
+ # The coffee and cake "binaries" use a relative path to find the lib
+ # directory, so we have to symlink them rather than use dobin().
+ exeinto "${npm_module_dir}/bin"
+ doexe bin/cake
+ doexe bin/coffee
+ dosym "${npm_module_dir}/bin/cake" "/usr/bin/cake"
+ dosym "${npm_module_dir}/bin/coffee" "/usr/bin/coffee"
+}
diff --git a/dev-lang/coffee-script/coffee-script-1.9.3-r1.ebuild b/dev-lang/coffee-script/coffee-script-1.9.3-r1.ebuild
new file mode 100644
index 000000000000..49e3c04aa16b
--- /dev/null
+++ b/dev-lang/coffee-script/coffee-script-1.9.3-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 multilib
+
+MY_PN="coffeescript"
+
+DESCRIPTION="A little language that compiles into javascript"
+HOMEPAGE="http://coffeescript.org/"
+
+# The tests are missing from the npm registry package, so use Github
+# instead.
+SRC_URI="https://github.com/jashkenas/${MY_PN}/archive/${PV}.tar.gz
+ -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+# This package has a test suite (that works), but it requires a number
+# of packages not in the tree. See thread "NPM / NodeJS project" on the
+# gentoo-dev archives for more info.
+IUSE="doc examples"
+
+RDEPEND="net-libs/nodejs"
+
+src_install(){
+ local npm_module_dir="/usr/$(get_libdir)/node/${PN}"
+ insinto "${npm_module_dir}"
+ doins *.js package.json
+ doins -r lib
+ dodoc CONTRIBUTING.md README.md
+
+ use doc && dodoc -r documentation
+ use examples && dodoc -r examples
+
+ # The coffee and cake "binaries" use a relative path to find the lib
+ # directory, so we have to symlink them rather than use dobin().
+ exeinto "${npm_module_dir}/bin"
+ doexe bin/cake
+ doexe bin/coffee
+ dosym "${npm_module_dir}/bin/cake" "/usr/bin/cake"
+ dosym "${npm_module_dir}/bin/coffee" "/usr/bin/coffee"
+}
diff --git a/dev-lang/coffee-script/metadata.xml b/dev-lang/coffee-script/metadata.xml
new file mode 100644
index 000000000000..ac79dcd15f6a
--- /dev/null
+++ b/dev-lang/coffee-script/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>mjo@gentoo.org</email>
+ <name>Michael Orlitzky</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">jashkenas/coffeescript</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/confluence/Manifest b/dev-lang/confluence/Manifest
new file mode 100644
index 000000000000..9904e98624b8
--- /dev/null
+++ b/dev-lang/confluence/Manifest
@@ -0,0 +1,5 @@
+DIST confluence-0.10.6.tar.gz 118762 SHA256 7ab76a4183dae9f2429df5cb07b0df293c50cd947e3c051a6784561e8d3b3273 SHA512 904ea553a917ac2aafc33464fe4175bca76c53c51c50819ea92326dd5a1451e98eca6a56db28b7041814e5e4cea61da618012087a79fa9ec670ca67fc0014d25 WHIRLPOOL 74ad34b66a5f38185b00ac955d10da9b81fdba6b6f9422182550eb039d82782bf168e82a8df738a2fa3f2d615fe36bf605feb5c0b0b3b92c9c67132c4d63fc4d
+EBUILD confluence-0.10.6.ebuild 1545 SHA256 fee7394c094a567127838f5f3324fae56a687fe51acc37fdde0dcdb400d0ef1e SHA512 62e5ce01609e0593cdb0ec45406f625d4290111bc0066f1cd7fb37036be2521b640816b4e41d79a2cad86b4c0de1360cf7ae3aae47b95e6968c384d66958c1d2 WHIRLPOOL b6713af2ffa421b2ebd555a17b9fa8bd0bd2d665b2a898a2b31a523508bb383edeba3930823832464e183572854c985dcbe40002f7fe56046d462bcb81be2820
+MISC ChangeLog 2438 SHA256 15f57248bc470482c9936310da08d9a244b291a9d2568e0a75cb1eb1c189b8a7 SHA512 dcf7aeaab7f1f7b4e7719b7edf4cb22efb97d191704aeaa45aa10a0d4e10dacf6709ced113c7191a414ab77ed793aab8ea3edfcaa4e19d23a46f1313ab6b7439 WHIRLPOOL 33a754fcb4daffe22098557c2bd7461fd05a9f6d64c28ec9908482cbdef396cb3eb211a5b74a824e1040b67a3efb1efd562ac3a4fc40f02aa45ac1d556eec542
+MISC ChangeLog-2015 1773 SHA256 0e1dc0a590034805e7a878188dc7ffbeb11ff8167f78d58f682ec6715f2d1e06 SHA512 91cb2f36cfe1f40751e1f4762ebfbc895440c5afaf6367276f577053ab83ee7383a9b9cc35c16ac2d7d1651d8f17b64b6bb57472b45d5fdd7a6a6320e51c3596 WHIRLPOOL d327ead0fd9c75571cca4b81998149fb663fae6b79789d1992b19d31bd4a7334f6f79c1ce37ef9548770a5828c74e9aefd5de4b73acfdac3e67f5f622e4d1e97
+MISC metadata.xml 243 SHA256 5e9b58b0b795266f973d066675839499e3a56d7d932d702404a4b91ded8eb26c SHA512 1c5b4b2163017e496999d1f87e5c9c5ac6c11b2e9187450ccfb3df258f34e54d278972f04ee0e8429476c6f87e091a869ac2a28c6e8c8e6d20678c3e74061449 WHIRLPOOL 085df2e84901cbe563c7c1d30d04c229547f15f8ee26ac61d44d07c3f6999f2bbfa4cf309963172fb507cce5450d27598b762c3ccab92351601965c3afc05e3a
diff --git a/dev-lang/confluence/confluence-0.10.6.ebuild b/dev-lang/confluence/confluence-0.10.6.ebuild
new file mode 100644
index 000000000000..2743ff5f6152
--- /dev/null
+++ b/dev-lang/confluence/confluence-0.10.6.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="Functional programming language for reactive system design"
+HOMEPAGE="http://www.funhdl.org/wiki/doku.php?id=confluence"
+SRC_URI="http://www.funhdl.org/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha ~amd64 ia64 ~ppc ~sparc x86"
+IUSE="+ocamlopt"
+
+# min version so we are sure we always have ocamlopt in IUSE
+RDEPEND=">=dev-lang/ocaml-3.10[ocamlopt?]"
+DEPEND="${RDEPEND}
+ sys-apps/sed"
+
+src_prepare() {
+ # Install non binary stuff in share...
+ sed -i -e "s:lib/confluence:share/confluence:" Makefile || die "failed to sed the makefile"
+ sed -i -e "s:lib/confluence:share/confluence:" src/cfeval/cf.ml || die "failed to sed ml files"
+ sed -i -e "s:lib/confluence:share/confluence:" src/cfeval/cfParserUtil.ml || die "failed to sed ml files"
+ if ! use ocamlopt; then
+ sed -i -e "s:cmxa:cma:" src/Makefile || die "failed to disable ocamlopt support"
+ sed -i -e "s:cmx:cmo:" src/Makefile || die "failed to disable ocamlopt support"
+ fi
+}
+
+src_compile() {
+ if use ocamlopt; then
+ emake -j1 PREFIX="${D}/usr" OCAMLLIB=`ocamlc -where` || die "failed to build"
+ else
+ emake -j1 OCAMLOPT="ocamlc" OCAMLC="ocamlc" PREFIX="${D}/usr" OCAMLLIB=`ocamlc -where` || die "failed to build"
+ fi
+}
+
+src_install() {
+ emake -j1 PREFIX="${D}/usr" OCAMLLIB=`ocamlc -where` install || die "install failed"
+ echo "CF_LIB=/usr/share/confluence" > "${T}/99${PN}"
+ doenvd "${T}/99${PN}"
+ dodoc NEWS || die
+}
diff --git a/dev-lang/confluence/metadata.xml b/dev-lang/confluence/metadata.xml
new file mode 100644
index 000000000000..ffac4d7ebc01
--- /dev/null
+++ b/dev-lang/confluence/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>ml@gentoo.org</email>
+ <name>Gentoo ML Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest
new file mode 100644
index 000000000000..214286423517
--- /dev/null
+++ b/dev-lang/crystal/Manifest
@@ -0,0 +1,22 @@
+AUX crystal-0.20.5-LDFLAGS.patch 566 SHA256 c21fe26fe47e1535966148493485c221ace209bcfdf0c261ffdcbacd4dd95476 SHA512 e4f136eed1c4d6508eaa9fb0dbc7ce451b058e63fde53ff8c90396afab3ee27d06af64c162459bbe5dc5e5915a7ae8271879a4f146cf7335442edd589da92ce3 WHIRLPOOL 8d9cca0a5a03aab8668ad190820a6e93d480ed9d2371added7875e335c3053626194519fa3801e933c067d4d8b143db184f689681fa16ff09213c811b633dafd
+AUX crystal-0.20.5-verbose.patch 496 SHA256 c454ff921250e0c4482f2bbfe0a5bba152cf8e1217e15ebeda5200c268fd1365 SHA512 eb230fa98ff0b19b0e3b90b5ff76b30869df53241d36123c470fbb58bfab89cc046c39258e36b31d12592ad9a7fe8a76e91669303224ecd1f43713bcdbef1064 WHIRLPOOL 788a3f0df2aeaa3e65fe9906ba3e92bbb3ce2fddaed70e87548725d7cca5fee5b218051f2c5d587de16c7a1c084ff021558689eb55e1fbc6199e8e4a79aef0e0
+AUX crystal-0.22.0-blocking-stdio-hack.patch 564 SHA256 89c7d66010627980a695bf4daa0422c7f162fa1e105d89c3296d7d7c61c939e0 SHA512 51df3a464efc7b34db970854577d89027177179cb4e72fdf74b6c9ae754749e30c93155bb18a5daf22db78b0f8985ec341092a95435f8de19800c33bca2f983e WHIRLPOOL 49434307301fcd492522b27ca1c16fd97e60bd3e82170e276c7a728e34f91c269f7b43b9aa63fe0ddf6d5e7f765b6e076f25f9f9334051a9eb32ccab143b330d
+AUX crystal-0.23.0-verbose-LDFLAGS.patch 653 SHA256 52e9789b4a9215e3790e444f1c4b23c833636224fa3021e0fc990f46627e924d SHA512 76494f1dcd97665f787fac76f2b94ef8428259133f13b52cf21c6e5b816ab7697a96f90dad0dc658de6373c6df28b72809cce5656d4b8356a6b3eca73f23856a WHIRLPOOL 32f863b12501ff36333431568c7438442ea12b1c1c7ab511cc6a57a3cc91954d1bb394833b033458a366424c92e06cb4ea0c0162cf49b937f2c118a9da604a3e
+AUX crystal-0.23.1-llvm-5.patch 35030 SHA256 3aeecf8a2bd4397bc9817ac42e58722677247505904e8c5b376c419839536d96 SHA512 027ea2ad7d0af9736c59c770295490341509a1aec442bd1a859e33d3f783adf328edd9cd886f6645b45aab67084f41d55fac15263b2db9183aa4db93e1a528e4 WHIRLPOOL 8efd6a4c25a077a67f10ce264bf064ea81aee013287116cb22a1f2c16a244aa8ecb7790ee10a209dc5b71ee1c1b9f7fb891a44d908dea80f836bd7f7574c3322
+DIST crystal-0.21.1-1-linux-i686.tar.gz 18825516 SHA256 8ab875309aa71d4501995e834850d40538fb66dd9890024ed812777f83085f48 SHA512 790043db666d7f65a3cc9e68511eb8fa03c352d2ca044bb38995ca4ab37b731bf612bf36d6efecd7a1763b22930c67315d0ae3b2e087c1a40ac209564492b5b9 WHIRLPOOL 642e4a6ec71cb33042c1dc0da11cd5e231b58f46afc77aa754bc0fa7d8d5104c4c0625b214d4bd48ad62ef6ad6eaeb33ba3e6040ebabb4a37f5fb20f399ae063
+DIST crystal-0.21.1-1-linux-x86_64.tar.gz 18930207 SHA256 e8a7489aba888cc0deec61e9bda5dd27ab600edb102afc17fa11582b90960875 SHA512 ed7860c93e25546e8df311851b6b9a3abf44e6046cf4cb3208555db80d63afc0ce45fdfdb1833f67f2e62f9a6b2d015ba5674d9273d572de15d7515aa481ae1f WHIRLPOOL c70cad45911e5ac4fd62ad42d13507280feccfbae46e682eb5eec81ec49de67e49f7384ad7d127a2d8624c4a1b4a425aded4a2f3a0b6b59025b31f0415864e95
+DIST crystal-0.21.1.tar.gz 1586701 SHA256 eb93de3b388641fd2a09a2d10ab9fe40a58148d888fc48e4583a86ee1ddb1085 SHA512 1deaf696b715efee841b0a07a1dca9e5fad31896a7fbfe8ed69a3fb2dc72cc71c38d003c660ab61c4ab3dcb9e0e2687e714a78ada55b51b42da0e0a0411c2208 WHIRLPOOL 1eaacc4d50b1f5cc0237f9413f54d8cd12837edc348a287951d1cb6a03f3ce29130407ccb9a462dab72f04c369eccf595231127c6aae4c716a8c9f92da36290e
+DIST crystal-0.22.0-1-linux-i686.tar.gz 18884966 SHA256 c084846d3f9e0c3cfcba6a79fe4e0cf6c6cb6801826a969460ecf2a47abd0fe9 SHA512 b307cc7f91b6d9f1e9a852c96e3d50b54bb5d32fefeb0ed8543c000783d51335ff60b9b4f684fbeb249acd54c1f55aa79ff2d36e2b95d5871aca58090bd03740 WHIRLPOOL fc98c770b754920f93cddb50b3edd4c43096ca605f2c12e93a23c3a0be5c93c5fa89b5cfa8ae1528ed20af63e1733419825af03702f0ffd5eb457bc4c766ad2d
+DIST crystal-0.22.0-1-linux-x86_64.tar.gz 18980187 SHA256 789d7b844886133428248605113ede9174c6ea4ba47d96a13f0efd1565b5810d SHA512 466aabf4f875278f5afb3238011e784928dbb234ea58ba1a3a649fca94481804c118639739134a370b5052dce6b17601a5c9d86162264934beb030d5f64f4203 WHIRLPOOL b2ece8a95c9036eebaf62a2d55f11b5010a35149649c56e916153b5596bc8cdb7f62a57ac98d44d553227e56c06fb7cd0a0d7f4637220d7ed94819c93e30f874
+DIST crystal-0.22.0.tar.gz 1597215 SHA256 5b9f11d9710ca9bd971a5afb94d369fd8dfaee103d7edf1c9fbebb2f21898547 SHA512 62d484b0c204c7213fc6eb38e59c730f6ba11d30d7b1027dcc5ae2f12a88808cd57628e21619875943714337bf181a8ae6739608c7435fdf18224950151aad21 WHIRLPOOL 6810d08a6284a365b27c86071c5943b072fb0a842157909715bc9de392d584e2b73b190f034dddd47f49b2a47cf730b5530e7d612800175e5b1f0b2dc0b59df0
+DIST crystal-0.23.0-1-linux-i686.tar.gz 18498501 SHA256 0a758770e6cb277bc5ed38fb6edafbf820b99527b65d6a44fd9f3a4c4743b70f SHA512 8745114c4824d2859c569ed1bd1057d6d649d57b10d41d22c17627f623704eb98ec2e3ab2bf06622de624906f53e053975a6b9d852aeaafeae4f43585609de28 WHIRLPOOL 5601fa0fc8d7e3ce2ecfea534135437645bb982a009e4c00349a7b9eb1fdcf193f648d6decbf90b41732d08fd1eb9ba92f4945de97f4138092cdc1efc80f1b92
+DIST crystal-0.23.0-1-linux-x86_64.tar.gz 18729061 SHA256 1d0348e1df3c56f9c29a3a76254c074846389fe5bed659c2cc1051bab83e1a5a SHA512 6a4e427b4ab3c3be6efcfaee5c1a19eff04eaf00db949d1e1ba8f29c3277affe96a7aba4273d93fd05251453d5b5b937aa792bc448ff2f6d6aa7f2b17d175f75 WHIRLPOOL cf9056733e0eea87cf58b7c488c28942a79020a3a5b38ff88eb9f9b04e61678201d647a5821282b4d0c4bb330ca8aced7520c22b19693f5e39533875666fda8e
+DIST crystal-0.23.0.tar.gz 1637983 SHA256 9b65904bb55100994a3b8022b9c553e5aa78979f459c8b10aa64053a65e5d517 SHA512 41ae9391d9183f8bdbffc02350d3aadc22c9c76a4476d55a4f8ec4c4acee80495601077a49e4f6135a80a937767fe39a28044fb6b5c070b05d2ee562fab65bfd WHIRLPOOL fe06c040268a89b1c0cf22fb46e6a938517a41644a7247f83f3a6981b988a7d8fbbc1d2bef019437c1796f148957cf7496a07b5b4e6c9acc881a3f4c06dd2eef
+DIST crystal-0.23.1.tar.gz 1646650 SHA256 8cf1b9a4eab29fca2f779ea186ae18f7ce444ce189c621925fa1a0c61dd5ff55 SHA512 06ee0d45cc79cc343d04c346e9cd47b6e4ebc79bf21833662f268f9604f7d2080f7696824e1959de341539f801ae8f898fe1d7b18e4c75378d4eb191878668d5 WHIRLPOOL 944d35f0bfe0d567fd51567775c33671895ede8596222a94e89efe349461432565aae4f0cb7483fb696e0a685c25764ac4bcfc16971dd1f2db33c510f1a04059
+EBUILD crystal-0.21.1.ebuild 2023 SHA256 0efc380a4e536036532453fa2a21f38c9b7ec686d62632ccf98f728f22a163ce SHA512 7225390b611096c66b5ee3bdcae5908d9132c2d19aa9477182363540ea1e9f48daa881bb2c09ab3848619f396723d7b58efa6b704c86075425b7b004ce2a5c33 WHIRLPOOL 0d1f1a5fd5afd500d8f92815e5d44794cfffb46a83bdbabf46782993b8506a07124b75dfe4fcc460a78db675e22cc3e12f15ac777d92ebf483043a77f9f3d1e6
+EBUILD crystal-0.22.0.ebuild 2162 SHA256 105dcb445442b561d74ffffb3e047cef3b007463a6939845f6f536a6c0e65a5a SHA512 81e39676ac8c06d2716cc4539dd6737c9a4a7edad876c43d03cc07f08ec3294f9dc8953b6058dbcca9f6287d48b37a67cc07275dd8ea766a58d4a7bd62d8640d WHIRLPOOL a2657df009678b4f525a22c6696bb7ca33a3fcaed3086a5f69a8a18369afbf357b10b4082d24a9afdf4db095b784ac233b7e94261d58d387f66bf3fd83eb82a7
+EBUILD crystal-0.23.0-r1.ebuild 2223 SHA256 58bdc570fc179ebb434f74af08b0b1f2667094685a528760c53cf0f2ac4dd9f3 SHA512 34ce0ace57f2f0d32bef8298fcfda6744aaae5170d6d581de30a7aaf74162c26e7acae5bd5439fc86e1c72f7098025adbbf478c4ab8e784056dcb1ed539d0105 WHIRLPOOL 5eddbab07f0aa028bf8f498cca56f834b7312f6791028e4b2c80c906fd938769e5d39888ee61fd758eec291547e0f15139d322feca18c1158c7979d4ffa44c59
+EBUILD crystal-0.23.0.ebuild 2164 SHA256 1386bfa7b323bb1ac9ccfbd39a1d3ba060a5cfc225f9fe0ea72b18da0535afcd SHA512 6572ba6343b27eda778e1125a6588a2009ac376fc6152bad5d7c546ea8a9226dbe2a6b2d3817bbf8e052149466a269a6e824a0e9176ae5e54323742ef941aa22 WHIRLPOOL 3bd454f40e8eff67d74757e18906d2be5795d27e5dd3bfb7a4d7ceb58f45e95cbe88c298f0f31f31652d652b952a28e0dabce28767d43264ff293aa4f1e80233
+EBUILD crystal-0.23.1.ebuild 2264 SHA256 23912dfa677c14d9df97b31e72144abea31f668204a6557ea505e31fe776273d SHA512 63235c8606674a010e09c5e39333bc9f9d668b071d261d9c399b038f466234bd0cbc4b047dcfa68136a0afcc5869e3b62b7117286df0e6294a5d813e65639293 WHIRLPOOL 21bf0927a67165d4c71b99372b90ac5fa5e4c35324e5b9e503e3ddd09316eed72865fc72d5311180d01c0fa82175f76145ba04ac2822e384847d01c2eb564bad
+MISC ChangeLog 4531 SHA256 54946148fedb0df6d9a124ae8dfa80044f3e43fb47250ccb66e82f03e5446c31 SHA512 fd212beb49ad92a4e9ae424f91ffb8668e447e453b184b5b7e4d5d2e40d248f6ffd9c63dcca4e164f8056e7151a210517da14da7ca625bd0496ac5dcd4a6ea0b WHIRLPOOL 1af2d8d91607892b5af7f6da40b7d71bb22353dc380756fc4a7a771cf74449a17c94449a09dcd38587eeae2cf8301ac43e8484368731c9394f75acd784619787
+MISC metadata.xml 1217 SHA256 883ddaf00ce61e22e169eaebb5e74c90f02ae767db01c94bef30ba8d6284fa0a SHA512 ab6182218a9b597cb7d2ed45eb6204fe30b1567e288e897ca1e2fe78433da260a24f1f79b988fe7d8ace37c7f6c0da7ad4789bc79e15775be44b645d485738bd WHIRLPOOL 790a71b6b1139c547698216a4f47565e61ed6abe4397173fa44a0003b6217e285b4eb57cec6de18d2358d1ea991ad4050154ee45df7924a1315c911418d171e9
diff --git a/dev-lang/crystal/crystal-0.21.1.ebuild b/dev-lang/crystal/crystal-0.21.1.ebuild
new file mode 100644
index 000000000000..19dbdc212a50
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.21.1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multiprocessing toolchain-funcs
+
+BV=0.21.1-1
+BV_AMD64=${BV}-linux-x86_64
+BV_X86=${BV}-linux-i686
+
+DESCRIPTION="The Crystal Programming Language"
+HOMEPAGE="https://crystal-lang.org"
+SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
+ amd64? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_AMD64}.tar.gz )
+ x86? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_X86}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc debug examples +xml +yaml"
+
+# dev-libs/boehm-gc[static-libs] dependency problem, check the issue: https://github.com/manastech/crystal/issues/1382
+DEPEND="
+ >=sys-devel/llvm-3.9.0
+ dev-libs/boehm-gc[static-libs,threads]
+ dev-libs/libatomic_ops
+ dev-libs/libevent
+ dev-libs/libpcre
+ sys-libs/libunwind
+ dev-libs/pcl
+ dev-libs/gmp:0
+"
+RDEPEND="${DEPEND}
+ xml? ( dev-libs/libxml2 )
+ yaml? ( dev-libs/libyaml )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.20.5-verbose.patch
+ "${FILESDIR}"/${PN}-0.20.5-LDFLAGS.patch
+)
+
+src_compile() {
+ emake \
+ $(usex debug "" release=1) \
+ stats=1 \
+ threads=$(makeopts_jobs) \
+ verbose=1 \
+ \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ \
+ PATH="${WORKDIR}"/${PN}-${BV}/bin:"${PATH}" \
+ CRYSTAL_PATH=src \
+ CRYSTAL_CONFIG_VERSION=${PV} \
+ CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
+ use doc && emake doc
+}
+
+src_test() {
+ emake spec \
+ $(usex debug "" release=1) \
+ stats=1 \
+ threads=$(makeopts_jobs) \
+ verbose=1 \
+ \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ \
+ CRYSTAL_PATH=src \
+ CRYSTAL_CONFIG_VERSION=${PV}
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/crystal
+ doins -r src/.
+ dobin .build/crystal
+
+ insinto /usr/share/zsh/site-functions
+ newins etc/completion.zsh _crystal
+
+ use examples && dodoc -r samples
+
+ if use doc ; then
+ docinto api
+ dodoc -r doc/.
+ fi
+}
diff --git a/dev-lang/crystal/crystal-0.22.0.ebuild b/dev-lang/crystal/crystal-0.22.0.ebuild
new file mode 100644
index 000000000000..534a8852b6f7
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.22.0.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multiprocessing toolchain-funcs
+
+BV=0.22.0-1
+BV_AMD64=${BV}-linux-x86_64
+BV_X86=${BV}-linux-i686
+
+DESCRIPTION="The Crystal Programming Language"
+HOMEPAGE="https://crystal-lang.org"
+SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
+ amd64? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_AMD64}.tar.gz )
+ x86? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_X86}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc debug examples blocking-stdio-hack +xml +yaml"
+
+# dev-libs/boehm-gc[static-libs] dependency problem, check the issue: https://github.com/manastech/crystal/issues/1382
+DEPEND="
+ >=sys-devel/llvm-3.9.0
+ dev-libs/boehm-gc[static-libs,threads]
+ dev-libs/libatomic_ops
+ dev-libs/libevent
+ dev-libs/libpcre
+ sys-libs/libunwind
+ dev-libs/pcl
+ dev-libs/gmp:0
+"
+RDEPEND="${DEPEND}
+ xml? ( dev-libs/libxml2 )
+ yaml? ( dev-libs/libyaml )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.20.5-verbose.patch
+ "${FILESDIR}"/${PN}-0.20.5-LDFLAGS.patch
+)
+
+src_prepare() {
+ default
+
+ use blocking-stdio-hack && eapply "${FILESDIR}"/"${PN}"-0.22.0-blocking-stdio-hack.patch
+}
+
+src_compile() {
+ emake \
+ $(usex debug "" release=1) \
+ stats=1 \
+ threads=$(makeopts_jobs) \
+ verbose=1 \
+ \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ \
+ PATH="${WORKDIR}"/${PN}-${BV}/bin:"${PATH}" \
+ CRYSTAL_PATH=src \
+ CRYSTAL_CONFIG_VERSION=${PV} \
+ CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
+ use doc && emake doc
+}
+
+src_test() {
+ emake spec \
+ $(usex debug "" release=1) \
+ stats=1 \
+ threads=$(makeopts_jobs) \
+ verbose=1 \
+ \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ \
+ CRYSTAL_PATH=src \
+ CRYSTAL_CONFIG_VERSION=${PV}
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/crystal
+ doins -r src/.
+ dobin .build/crystal
+
+ insinto /usr/share/zsh/site-functions
+ newins etc/completion.zsh _crystal
+
+ use examples && dodoc -r samples
+
+ if use doc ; then
+ docinto api
+ dodoc -r doc/.
+ fi
+}
diff --git a/dev-lang/crystal/crystal-0.23.0-r1.ebuild b/dev-lang/crystal/crystal-0.23.0-r1.ebuild
new file mode 100644
index 000000000000..b526f8026565
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.23.0-r1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 multiprocessing toolchain-funcs
+
+BV=0.23.0-1
+BV_AMD64=${BV}-linux-x86_64
+BV_X86=${BV}-linux-i686
+
+DESCRIPTION="The Crystal Programming Language"
+HOMEPAGE="https://crystal-lang.org"
+SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
+ amd64? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_AMD64}.tar.gz )
+ x86? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_X86}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc debug examples blocking-stdio-hack +xml +yaml"
+
+# dev-libs/boehm-gc[static-libs] dependency problem, check the issue: https://github.com/manastech/crystal/issues/1382
+DEPEND="
+ >=sys-devel/llvm-3.9.0
+ dev-libs/boehm-gc[static-libs,threads]
+ dev-libs/libatomic_ops
+ dev-libs/libevent
+ dev-libs/libpcre
+ sys-libs/libunwind
+ dev-libs/pcl
+ dev-libs/gmp:0
+"
+RDEPEND="${DEPEND}
+ xml? ( dev-libs/libxml2 )
+ yaml? ( dev-libs/libyaml )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.23.0-verbose-LDFLAGS.patch
+)
+
+src_prepare() {
+ default
+
+ use blocking-stdio-hack && eapply "${FILESDIR}"/"${PN}"-0.22.0-blocking-stdio-hack.patch
+}
+
+src_compile() {
+ emake \
+ $(usex debug "" release=1) \
+ progress=true \
+ stats=1 \
+ threads=$(makeopts_jobs) \
+ verbose=1 \
+ \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ \
+ PATH="${WORKDIR}"/${PN}-${BV}/bin:"${PATH}" \
+ CRYSTAL_PATH=src \
+ CRYSTAL_CONFIG_VERSION=${PV} \
+ CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
+ use doc && emake doc
+}
+
+src_test() {
+ emake spec \
+ $(usex debug "" release=1) \
+ progress=true \
+ stats=1 \
+ threads=$(makeopts_jobs) \
+ verbose=1 \
+ \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ \
+ CRYSTAL_PATH=src \
+ CRYSTAL_CONFIG_VERSION=${PV}
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/crystal
+ doins -r src/.
+ dobin .build/crystal
+
+ insinto /usr/share/zsh/site-functions
+ newins etc/completion.zsh _crystal
+
+ use examples && dodoc -r samples
+
+ if use doc ; then
+ docinto api
+ dodoc -r doc/.
+ fi
+
+ newbashcomp etc/completion.bash ${PN}
+}
diff --git a/dev-lang/crystal/crystal-0.23.0.ebuild b/dev-lang/crystal/crystal-0.23.0.ebuild
new file mode 100644
index 000000000000..5df6f0b64406
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.23.0.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multiprocessing toolchain-funcs
+
+BV=0.23.0-1
+BV_AMD64=${BV}-linux-x86_64
+BV_X86=${BV}-linux-i686
+
+DESCRIPTION="The Crystal Programming Language"
+HOMEPAGE="https://crystal-lang.org"
+SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
+ amd64? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_AMD64}.tar.gz )
+ x86? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_X86}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc debug examples blocking-stdio-hack +xml +yaml"
+
+# dev-libs/boehm-gc[static-libs] dependency problem, check the issue: https://github.com/manastech/crystal/issues/1382
+DEPEND="
+ >=sys-devel/llvm-3.9.0
+ dev-libs/boehm-gc[static-libs,threads]
+ dev-libs/libatomic_ops
+ dev-libs/libevent
+ dev-libs/libpcre
+ sys-libs/libunwind
+ dev-libs/pcl
+ dev-libs/gmp:0
+"
+RDEPEND="${DEPEND}
+ xml? ( dev-libs/libxml2 )
+ yaml? ( dev-libs/libyaml )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.23.0-verbose-LDFLAGS.patch
+)
+
+src_prepare() {
+ default
+
+ use blocking-stdio-hack && eapply "${FILESDIR}"/"${PN}"-0.22.0-blocking-stdio-hack.patch
+}
+
+src_compile() {
+ emake \
+ $(usex debug "" release=1) \
+ progress=true \
+ stats=1 \
+ threads=$(makeopts_jobs) \
+ verbose=1 \
+ \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ \
+ PATH="${WORKDIR}"/${PN}-${BV}/bin:"${PATH}" \
+ CRYSTAL_PATH=src \
+ CRYSTAL_CONFIG_VERSION=${PV} \
+ CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
+ use doc && emake doc
+}
+
+src_test() {
+ emake spec \
+ $(usex debug "" release=1) \
+ progress=true \
+ stats=1 \
+ threads=$(makeopts_jobs) \
+ verbose=1 \
+ \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ \
+ CRYSTAL_PATH=src \
+ CRYSTAL_CONFIG_VERSION=${PV}
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/crystal
+ doins -r src/.
+ dobin .build/crystal
+
+ insinto /usr/share/zsh/site-functions
+ newins etc/completion.zsh _crystal
+
+ use examples && dodoc -r samples
+
+ if use doc ; then
+ docinto api
+ dodoc -r doc/.
+ fi
+}
diff --git a/dev-lang/crystal/crystal-0.23.1.ebuild b/dev-lang/crystal/crystal-0.23.1.ebuild
new file mode 100644
index 000000000000..6bf8e74cc817
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.23.1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 multiprocessing toolchain-funcs
+
+BV=0.23.0-1
+BV_AMD64=${BV}-linux-x86_64
+BV_X86=${BV}-linux-i686
+
+DESCRIPTION="The Crystal Programming Language"
+HOMEPAGE="https://crystal-lang.org"
+SRC_URI="https://github.com/crystal-lang/crystal/archive/${PV}.tar.gz -> ${P}.tar.gz
+ amd64? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_AMD64}.tar.gz )
+ x86? ( https://github.com/crystal-lang/crystal/releases/download/${PV}/crystal-${BV_X86}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc debug examples blocking-stdio-hack +xml +yaml"
+
+# dev-libs/boehm-gc[static-libs] dependency problem, check the issue: https://github.com/manastech/crystal/issues/1382
+DEPEND="
+ >=sys-devel/llvm-3.9.0
+ dev-libs/boehm-gc[static-libs,threads]
+ dev-libs/libatomic_ops
+ dev-libs/libevent
+ dev-libs/libpcre
+ sys-libs/libunwind
+ dev-libs/pcl
+ dev-libs/gmp:0
+"
+RDEPEND="${DEPEND}
+ xml? ( dev-libs/libxml2 )
+ yaml? ( dev-libs/libyaml )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.23.0-verbose-LDFLAGS.patch
+ "${FILESDIR}"/${PN}-0.23.1-llvm-5.patch
+)
+
+src_prepare() {
+ default
+
+ use blocking-stdio-hack && eapply "${FILESDIR}"/"${PN}"-0.22.0-blocking-stdio-hack.patch
+}
+
+src_compile() {
+ emake \
+ $(usex debug "" release=1) \
+ progress=true \
+ stats=1 \
+ threads=$(makeopts_jobs) \
+ verbose=1 \
+ \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ \
+ PATH="${WORKDIR}"/${PN}-${BV}/bin:"${PATH}" \
+ CRYSTAL_PATH=src \
+ CRYSTAL_CONFIG_VERSION=${PV} \
+ CRYSTAL_CONFIG_PATH="lib:${EPREFIX}/usr/$(get_libdir)/crystal"
+ use doc && emake doc
+}
+
+src_test() {
+ emake spec \
+ $(usex debug "" release=1) \
+ progress=true \
+ stats=1 \
+ threads=$(makeopts_jobs) \
+ verbose=1 \
+ \
+ CC=$(tc-getCC) \
+ CXX=$(tc-getCXX) \
+ AR=$(tc-getAR) \
+ \
+ CRYSTAL_PATH=src \
+ CRYSTAL_CONFIG_VERSION=${PV}
+}
+
+src_install() {
+ insinto /usr/$(get_libdir)/crystal
+ doins -r src/.
+ dobin .build/crystal
+
+ insinto /usr/share/zsh/site-functions
+ newins etc/completion.zsh _crystal
+
+ use examples && dodoc -r samples
+
+ if use doc ; then
+ docinto api
+ dodoc -r doc/.
+ fi
+
+ newbashcomp etc/completion.bash ${PN}
+}
diff --git a/dev-lang/crystal/files/crystal-0.20.5-LDFLAGS.patch b/dev-lang/crystal/files/crystal-0.20.5-LDFLAGS.patch
new file mode 100644
index 000000000000..42970a84a7c0
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.20.5-LDFLAGS.patch
@@ -0,0 +1,9 @@
+diff --git a/Makefile b/Makefile
+index fa71479..d316bbc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -24,3 +24,3 @@ SOURCES := $(shell find src -name '*.cr')
+ SPEC_SOURCES := $(shell find spec -name '*.cr')
+-FLAGS := $(if $(release),--release )$(if $(stats),--stats )$(if $(threads),--threads $(threads) )$(if $(debug),-d )$(if $(verbose),--verbose )
++FLAGS := $(if $(release),--release )$(if $(stats),--stats )$(if $(threads),--threads $(threads) )$(if $(debug),-d )$(if $(verbose),--verbose )$(if $(LDFLAGS),--link-flags="$(LDFLAGS)" )
+ VERBOSE := $(if $(verbose),-v )
diff --git a/dev-lang/crystal/files/crystal-0.20.5-verbose.patch b/dev-lang/crystal/files/crystal-0.20.5-verbose.patch
new file mode 100644
index 000000000000..6a0a301b5c02
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.20.5-verbose.patch
@@ -0,0 +1,9 @@
+diff --git a/Makefile b/Makefile
+index 1f53d40..fa71479 100644
+--- a/Makefile
++++ b/Makefile
+@@ -24,3 +24,3 @@ SOURCES := $(shell find src -name '*.cr')
+ SPEC_SOURCES := $(shell find spec -name '*.cr')
+-FLAGS := $(if $(release),--release )$(if $(stats),--stats )$(if $(threads),--threads $(threads) )$(if $(debug),-d )
++FLAGS := $(if $(release),--release )$(if $(stats),--stats )$(if $(threads),--threads $(threads) )$(if $(debug),-d )$(if $(verbose),--verbose )
+ VERBOSE := $(if $(verbose),-v )
diff --git a/dev-lang/crystal/files/crystal-0.22.0-blocking-stdio-hack.patch b/dev-lang/crystal/files/crystal-0.22.0-blocking-stdio-hack.patch
new file mode 100644
index 000000000000..07b7dba7be65
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.22.0-blocking-stdio-hack.patch
@@ -0,0 +1,20 @@
+Workaround tty corruption in crystal.
+
+Patch restores blocking mode of file desriptors
+in exchange of potential runtime deadlocks
+when dealing with stdio.
+
+Reported-by: Renich Bon Ciric
+Bug: https://github.com/crystal-lang/crystal/issues/2065
+Bug: https://bugs.gentoo.org/616256
+diff --git a/src/compiler/crystal/stdio.cr b/src/compiler/crystal/stdio.cr
+new file mode 100644
+index 000000000..e65f65089
+--- /dev/null
++++ b/src/compiler/crystal/stdio.cr
+@@ -0,0 +1,5 @@
++module Crystal
++ STDIN.blocking = true
++ STDOUT.blocking=true
++ STDERR.blocking = true
++end
diff --git a/dev-lang/crystal/files/crystal-0.23.0-verbose-LDFLAGS.patch b/dev-lang/crystal/files/crystal-0.23.0-verbose-LDFLAGS.patch
new file mode 100644
index 000000000000..35eace15dae0
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.23.0-verbose-LDFLAGS.patch
@@ -0,0 +1,9 @@
+diff --git a/Makefile b/Makefile
+index eff69e5..5c0c024 100644
+--- a/Makefile
++++ b/Makefile
+@@ -28,3 +28,3 @@ SOURCES := $(shell find src -name '*.cr')
+ SPEC_SOURCES := $(shell find spec -name '*.cr')
+-FLAGS := $(if $(release),--release )$(if $(stats),--stats )$(if $(progress),--progress )$(if $(threads),--threads $(threads) )$(if $(debug),-d )
++FLAGS := $(if $(release),--release )$(if $(stats),--stats )$(if $(progress),--progress )$(if $(threads),--threads $(threads) )$(if $(debug),-d )$(if $(verbose),--verbose )$(if $(LDFLAGS),--link-flags="$(LDFLAGS)" )
+ SPEC_FLAGS := $(if $(verbose),-v )$(if $(junit_output),--junit_output $(junit_output) )
diff --git a/dev-lang/crystal/files/crystal-0.23.1-llvm-5.patch b/dev-lang/crystal/files/crystal-0.23.1-llvm-5.patch
new file mode 100644
index 000000000000..bbfd922149eb
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.23.1-llvm-5.patch
@@ -0,0 +1,837 @@
+https://bugs.gentoo.org/630634
+diff --git a/.gitignore b/.gitignore
+index 9a883edfd..5f852d930 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -12,5 +12,6 @@ all_spec
+ /tmp
+ /doc/
+ /src/llvm/ext/llvm_ext.o
++/src/llvm/ext/llvm_ext.dwo
+ /src/ext/*.o
+ /src/ext/libcrystal.a
+diff --git a/Makefile b/Makefile
+index a5dc0d7e3..14a21bb86 100644
+--- a/Makefile
++++ b/Makefile
+@@ -37,8 +37,6 @@ LLVM_CONFIG_FINDER := \
+ (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.9*) command -v llvm-config;; *) false;; esac)) || \
+ command -v llvm-config-3.8 || command -v llvm-config38 || \
+ (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.8*) command -v llvm-config;; *) false;; esac)) || \
+- command -v llvm-config-3.6 || command -v llvm-config36 || \
+- command -v llvm-config-3.5 || command -v llvm-config35 || \
+ command -v llvm-config
+ LLVM_CONFIG := $(shell $(LLVM_CONFIG_FINDER))
+ LLVM_EXT_DIR = src/llvm/ext
+diff --git a/src/compiler/crystal/compiler.cr b/src/compiler/crystal/compiler.cr
+index a2bed9a95..afc7976e3 100644
+--- a/src/compiler/crystal/compiler.cr
++++ b/src/compiler/crystal/compiler.cr
+@@ -447,9 +447,6 @@ module Crystal
+
+ protected def optimize(llvm_mod)
+ fun_pass_manager = llvm_mod.new_function_pass_manager
+- {% if LibLLVM::IS_35 || LibLLVM::IS_36 %}
+- fun_pass_manager.add_target_data target_machine.data_layout
+- {% end %}
+ pass_manager_builder.populate fun_pass_manager
+ fun_pass_manager.run llvm_mod
+ module_pass_manager.run llvm_mod
+@@ -460,9 +457,6 @@ module Crystal
+ private def module_pass_manager
+ @module_pass_manager ||= begin
+ mod_pass_manager = LLVM::ModulePassManager.new
+- {% if LibLLVM::IS_35 || LibLLVM::IS_36 %}
+- mod_pass_manager.add_target_data target_machine.data_layout
+- {% end %}
+ pass_manager_builder.populate mod_pass_manager
+ mod_pass_manager
+ end
+@@ -554,54 +548,29 @@ module Crystal
+ can_reuse_previous_compilation =
+ !compiler.emit && !@bc_flags_changed && File.exists?(bc_name) && File.exists?(object_name)
+
+- {% if LibLLVM::IS_35 %}
+- # In LLVM 3.5 we can't write a bitcode to memory,
+- # so instead we write it to another file
+- bc_name_new = self.bc_name_new
+- llvm_mod.write_bitcode_to_file(bc_name_new)
+-
+- if can_reuse_previous_compilation
+- if FileUtils.cmp(bc_name, bc_name_new)
+- # If the user cancelled a previous compilation it might be that
+- # the .o file is empty
+- if File.size(object_name) > 0
+- File.delete bc_name_new
+- must_compile = false
+- end
+- end
+- end
++ memory_buffer = llvm_mod.write_bitcode_to_memory_buffer
+
+- if must_compile
+- # Create/overwrite the .bc file (for next compilations)
+- File.rename(bc_name_new, bc_name)
+- compiler.optimize llvm_mod if compiler.release?
+- compiler.target_machine.emit_obj_to_file llvm_mod, object_name
+- end
+- {% else %}
+- memory_buffer = llvm_mod.write_bitcode_to_memory_buffer
+-
+- if can_reuse_previous_compilation
+- memory_io = IO::Memory.new(memory_buffer.to_slice)
+- changed = File.open(bc_name) { |bc_file| !FileUtils.cmp(bc_file, memory_io) }
+-
+- # If the user cancelled a previous compilation
+- # it might be that the .o file is empty
+- if !changed && File.size(object_name) > 0
+- must_compile = false
+- memory_buffer.dispose
+- memory_buffer = nil
+- else
+- # We need to compile, so we'll write the memory buffer to file
+- end
+- end
++ if can_reuse_previous_compilation
++ memory_io = IO::Memory.new(memory_buffer.to_slice)
++ changed = File.open(bc_name) { |bc_file| !FileUtils.cmp(bc_file, memory_io) }
+
+- # If there's a memory buffer, it means we must create a .o from it
+- if memory_buffer
+- # Create the .bc file (for next compilations)
+- File.write(bc_name, memory_buffer.to_slice)
++ # If the user cancelled a previous compilation
++ # it might be that the .o file is empty
++ if !changed && File.size(object_name) > 0
++ must_compile = false
+ memory_buffer.dispose
++ memory_buffer = nil
++ else
++ # We need to compile, so we'll write the memory buffer to file
+ end
+- {% end %}
++ end
++
++ # If there's a memory buffer, it means we must create a .o from it
++ if memory_buffer
++ # Create the .bc file (for next compilations)
++ File.write(bc_name, memory_buffer.to_slice)
++ memory_buffer.dispose
++ end
+
+ if must_compile
+ compiler.optimize llvm_mod if compiler.release?
+diff --git a/src/llvm.cr b/src/llvm.cr
+index 44a03c272..f9b31cf4b 100644
+--- a/src/llvm.cr
++++ b/src/llvm.cr
+@@ -94,11 +94,5 @@ module LLVM
+ string
+ end
+
+- {% if LibLLVM::IS_35 %}
+- DEBUG_METADATA_VERSION = 1
+- {% elsif LibLLVM::IS_36 %}
+- DEBUG_METADATA_VERSION = 2
+- {% else %}
+- DEBUG_METADATA_VERSION = 3
+- {% end %}
++ DEBUG_METADATA_VERSION = 3
+ end
+diff --git a/src/llvm/context.cr b/src/llvm/context.cr
+index 8485eedf1..7d66a4365 100644
+--- a/src/llvm/context.cr
++++ b/src/llvm/context.cr
+@@ -9,9 +9,9 @@ class LLVM::Context
+ end
+
+ def new_module(name : String) : Module
+- {% if LibLLVM::IS_38 || LibLLVM::IS_36 || LibLLVM::IS_35 %}
++ {% if LibLLVM::IS_38 %}
+ Module.new(LibLLVM.module_create_with_name_in_context(name, self), name, self)
+- {% else %}
++ {% else %} # LLVM >= 3.9
+ Module.new(LibLLVM.module_create_with_name_in_context(name, self), self)
+ {% end %}
+ end
+@@ -104,9 +104,9 @@ class LLVM::Context
+ if ret != 0 && msg
+ raise LLVM.string_and_dispose(msg)
+ end
+- {% if LibLLVM::IS_38 || LibLLVM::IS_36 || LibLLVM::IS_35 %}
++ {% if LibLLVM::IS_38 %}
+ Module.new(mod, "unknown", self)
+- {% else %}
++ {% else %} # LLVM >= 3.9
+ Module.new(mod, self)
+ {% end %}
+ end
+diff --git a/src/llvm/di_builder.cr b/src/llvm/di_builder.cr
+index b8c0fd628..79571d2c0 100644
+--- a/src/llvm/di_builder.cr
++++ b/src/llvm/di_builder.cr
+@@ -31,16 +31,8 @@ struct LLVM::DIBuilder
+
+ def create_function(scope, name, linkage_name, file, line, composite_type, is_local_to_unit, is_definition,
+ scope_line, flags, is_optimized, func)
+- {% if LibLLVM::IS_36 || LibLLVM::IS_35 %}
+- LibLLVMExt.di_builder_create_function(self, scope, name, linkage_name, file, line, composite_type,
+- is_local_to_unit ? 1 : 0,
+- is_definition ? 1 : 0,
+- scope_line, flags,
+- is_optimized ? 1 : 0, func)
+- {% else %}
+- LibLLVMExt.di_builder_create_function(self, scope, name, linkage_name, file, line, composite_type,
+- is_local_to_unit, is_definition, scope_line, flags, is_optimized, func)
+- {% end %}
++ LibLLVMExt.di_builder_create_function(self, scope, name, linkage_name, file, line, composite_type,
++ is_local_to_unit, is_definition, scope_line, flags, is_optimized, func)
+ end
+
+ def create_auto_variable(scope, name, file, line, type, align_in_bits)
+@@ -87,19 +79,11 @@ struct LLVM::DIBuilder
+ end
+
+ def create_replaceable_composite_type(scope, name, file, line, context : Context)
+- {% if LibLLVM::IS_35 || LibLLVM::IS_36 %}
+- LibLLVMExt.temporary_md_node(context, nil, 0).as(LibLLVMExt::Metadata)
+- {% else %}
+- LibLLVMExt.di_builder_create_replaceable_composite_type(self, scope, name, file, line)
+- {% end %}
++ LibLLVMExt.di_builder_create_replaceable_composite_type(self, scope, name, file, line)
+ end
+
+ def replace_temporary(from, to)
+- {% if LibLLVM::IS_35 || LibLLVM::IS_36 %}
+- LibLLVMExt.metadata_replace_all_uses_with(from, to)
+- {% else %}
+- LibLLVMExt.di_builder_replace_temporary(self, from, to)
+- {% end %}
++ LibLLVMExt.di_builder_replace_temporary(self, from, to)
+ end
+
+ def end
+diff --git a/src/llvm/ext/llvm_ext.cc b/src/llvm/ext/llvm_ext.cc
+index d13446160..3dbdd4220 100644
+--- a/src/llvm/ext/llvm_ext.cc
++++ b/src/llvm/ext/llvm_ext.cc
+@@ -18,35 +18,22 @@ using namespace llvm;
+ #define LLVM_VERSION_LE(major, minor) \
+ (LLVM_VERSION_MAJOR < (major) || LLVM_VERSION_MAJOR == (major) && LLVM_VERSION_MINOR <= (minor))
+
++#if LLVM_VERSION_LE(4, 0)
+ typedef struct LLVMOpaqueDIBuilder *LLVMDIBuilderRef;
+ DEFINE_SIMPLE_CONVERSION_FUNCTIONS(DIBuilder, LLVMDIBuilderRef)
+
+-#if LLVM_VERSION_EQ(3, 5)
+-typedef LLVMValueRef LLVMMetadataRef;
+-typedef Value Metadata;
+-#define DIBuilderRef LLVMDIBuilderRef
+-
+-#else /* LLVM != 3.5 */
+ typedef struct LLVMOpaqueMetadata *LLVMMetadataRef;
+ DEFINE_ISA_CONVERSION_FUNCTIONS(Metadata, LLVMMetadataRef)
+ inline Metadata **unwrap(LLVMMetadataRef *Vals) {
+ return reinterpret_cast<Metadata **>(Vals);
+ }
+-#endif /* LLVM == 3.5 */
+-
+-#if LLVM_VERSION_LE(3, 6)
+-template <typename T> T unwrapDIptr(LLVMMetadataRef v) {
+- return v ? T(unwrap<MDNode>(v)) : T();
+-}
+-#define DIBuilderRef LLVMDIBuilderRef
++#endif
+
+-#else /* LLVM > 3.6 */
+ typedef DIBuilder *DIBuilderRef;
+ #define DIArray DINodeArray
+ template <typename T> T *unwrapDIptr(LLVMMetadataRef v) {
+ return (T *)(v ? unwrap<MDNode>(v) : NULL);
+ }
+-#endif /* LLVM <= 3.6 */
+
+ #if LLVM_VERSION_LE(3, 6)
+ #define OperandBundleDef void
+@@ -66,13 +53,7 @@ void LLVMDIBuilderFinalize(LLVMDIBuilderRef dref) { unwrap(dref)->finalize(); }
+
+ LLVMMetadataRef LLVMDIBuilderCreateFile(DIBuilderRef Dref, const char *File,
+ const char *Dir) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+- DIFile F = D->createFile(File, Dir);
+- return wrap(F);
+-#else
+ return wrap(Dref->createFile(File, Dir));
+-#endif
+ }
+
+ LLVMMetadataRef LLVMDIBuilderCreateCompileUnit(DIBuilderRef Dref, unsigned Lang,
+@@ -82,20 +63,13 @@ LLVMMetadataRef LLVMDIBuilderCreateCompileUnit(DIBuilderRef Dref, unsigned Lang,
+ int Optimized,
+ const char *Flags,
+ unsigned RuntimeVersion) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+- DICompileUnit CU = D->createCompileUnit(Lang, File, Dir, Producer, Optimized,
+- Flags, RuntimeVersion);
+- return wrap(CU);
+-#else
+-# if LLVM_VERSION_LE(3, 9)
++#if LLVM_VERSION_LE(3, 9)
+ return wrap(Dref->createCompileUnit(Lang, File, Dir, Producer, Optimized,
+ Flags, RuntimeVersion));
+-# else
++#else
+ DIFile *F = Dref->createFile(File, Dir);
+ return wrap(Dref->createCompileUnit(Lang, F, Producer, Optimized,
+ Flags, RuntimeVersion));
+-# endif
+ #endif
+ }
+
+@@ -111,19 +85,11 @@ LLVMMetadataRef LLVMDIBuilderCreateFunction(
+ #endif
+ bool IsOptimized,
+ LLVMValueRef Func) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+- DISubprogram Sub = D->createFunction(
+- unwrapDI<DIDescriptor>(Scope), Name, LinkageName, unwrapDI<DIFile>(File),
+- Line, unwrapDI<DICompositeType>(CompositeType), IsLocalToUnit,
+- IsDefinition, ScopeLine, Flags, IsOptimized, unwrap<Function>(Func));
+-#else
+ DISubprogram *Sub = Dref->createFunction(
+ unwrapDI<DIScope>(Scope), Name, LinkageName, unwrapDI<DIFile>(File), Line,
+ unwrapDI<DISubroutineType>(CompositeType), IsLocalToUnit, IsDefinition,
+ ScopeLine, Flags, IsOptimized);
+ unwrap<Function>(Func)->setSubprogram(Sub);
+-#endif
+ return wrap(Sub);
+ }
+
+@@ -132,18 +98,8 @@ LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock(DIBuilderRef Dref,
+ LLVMMetadataRef File,
+ unsigned Line,
+ unsigned Column) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+-# if LLVM_VERSION_EQ(3, 5)
+- DILexicalBlock LB = D->createLexicalBlock(unwrapDI<DIDescriptor>(Scope), unwrapDI<DIFile>(File), Line, Column, 0);
+-# else /* LLVM <= 3.6 && LLVM != 3.5 */
+- DILexicalBlock LB = D->createLexicalBlock(unwrapDI<DIDescriptor>(Scope), unwrapDI<DIFile>(File), Line, Column);
+-# endif
+- return wrap(LB);
+-#else /* LLVM > 3.6 */
+ return wrap(Dref->createLexicalBlock(unwrapDI<DIDescriptor>(Scope),
+ unwrapDI<DIFile>(File), Line, Column));
+-#endif /* LLVM <= 3.6 */
+ }
+
+ LLVMMetadataRef LLVMDIBuilderCreateBasicType(DIBuilderRef Dref,
+@@ -151,71 +107,34 @@ LLVMMetadataRef LLVMDIBuilderCreateBasicType(DIBuilderRef Dref,
+ uint64_t SizeInBits,
+ uint64_t AlignInBits,
+ unsigned Encoding) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+- DIBasicType T = D->createBasicType(Name, SizeInBits, AlignInBits, Encoding);
+- return wrap(T);
+-#else
+-# if LLVM_VERSION_LE(3, 9)
++#if LLVM_VERSION_LE(3, 9)
+ return wrap(Dref->createBasicType(Name, SizeInBits, AlignInBits, Encoding));
+-# else
++#else
+ return wrap(Dref->createBasicType(Name, SizeInBits, Encoding));
+-# endif
+ #endif
+ }
+
+ LLVMMetadataRef LLVMDIBuilderGetOrCreateTypeArray(DIBuilderRef Dref,
+ LLVMMetadataRef *Data,
+ unsigned Length) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+-# if LLVM_VERSION_EQ(3, 5)
+- Value **DataValue = unwrap(Data);
+- ArrayRef<Value *> Elements(DataValue, Length);
+- DIArray A = D->getOrCreateArray(Elements);
+-# else /* LLVM <= 3.6 && LLVM != 3.5 */
+- Metadata **DataValue = unwrap(Data);
+- ArrayRef<Metadata *> Elements(DataValue, Length);
+- DITypeArray A = D->getOrCreateTypeArray(Elements);
+-# endif
+- return wrap(A);
+-#else /* LLVM > 3.6 */
+ Metadata **DataValue = unwrap(Data);
+ return wrap(
+ Dref->getOrCreateTypeArray(ArrayRef<Metadata *>(DataValue, Length))
+ .get());
+-#endif /* LLVM <= 3.6 */
+ }
+
+ LLVMMetadataRef LLVMDIBuilderGetOrCreateArray(DIBuilderRef Dref,
+ LLVMMetadataRef *Data,
+ unsigned Length) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+- ArrayRef<Metadata *> elements(unwrap(Data), Length);
+- DIArray a = D->getOrCreateArray(elements);
+-
+- return wrap(a);
+-#else
+ Metadata **DataValue = unwrap(Data);
+ return wrap(
+ Dref->getOrCreateArray(ArrayRef<Metadata *>(DataValue, Length)).get());
+-#endif
+ }
+
+ LLVMMetadataRef
+ LLVMDIBuilderCreateSubroutineType(DIBuilderRef Dref, LLVMMetadataRef File,
+ LLVMMetadataRef ParameterTypes) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+-# if LLVM_VERSION_EQ(3, 5)
+- DICompositeType CT = D->createSubroutineType(unwrapDI<DIFile>(File), unwrapDI<DIArray>(ParameterTypes));
+-# else /* LLVM <= 3.6 && LLVM != 3.5 */
+- DICompositeType CT = D->createSubroutineType(unwrapDI<DIFile>(File), unwrapDI<DITypeArray>(ParameterTypes));
+-# endif
+-#else /* LLVM > 3.6 */
+ DISubroutineType *CT = Dref->createSubroutineType(DITypeRefArray(unwrap<MDTuple>(ParameterTypes)));
+-#endif /* LLVM <= 3.6 */
+ return wrap(CT);
+ }
+
+@@ -229,21 +148,14 @@ LLVMMetadataRef LLVMDIBuilderCreateAutoVariable(
+ DINode::DIFlags Flags,
+ #endif
+ uint32_t AlignInBits) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+- DIVariable V = D->createLocalVariable(
+- llvm::dwarf::DW_TAG_auto_variable, unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), Line,
+- unwrapDI<DIType>(Ty), AlwaysPreserve, Flags, 0);
+-#else
+-# if LLVM_VERSION_LE(3, 9)
++#if LLVM_VERSION_LE(3, 9)
+ DILocalVariable *V = Dref->createAutoVariable(
+ unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), Line,
+ unwrapDI<DIType>(Ty), AlwaysPreserve, Flags);
+-# else
++#else
+ DILocalVariable *V = Dref->createAutoVariable(
+ unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), Line,
+ unwrapDI<DIType>(Ty), AlwaysPreserve, Flags, AlignInBits);
+-# endif
+ #endif
+ return wrap(V);
+ }
+@@ -258,18 +170,10 @@ LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
+ DINode::DIFlags Flags
+ #endif
+ ) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+- DIVariable V = D->createLocalVariable(
+- llvm::dwarf::DW_TAG_arg_variable, unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), Line,
+- unwrapDI<DIType>(Ty), AlwaysPreserve, Flags, ArgNo);
+- return wrap(V);
+-#else
+ DILocalVariable *V = Dref->createParameterVariable
+ (unwrapDI<DIDescriptor>(Scope), Name, ArgNo, unwrapDI<DIFile>(File), Line,
+ unwrapDI<DIType>(Ty), AlwaysPreserve, Flags);
+ return wrap(V);
+-#endif
+ }
+
+ LLVMValueRef LLVMDIBuilderInsertDeclareAtEnd(DIBuilderRef Dref,
+@@ -278,46 +182,17 @@ LLVMValueRef LLVMDIBuilderInsertDeclareAtEnd(DIBuilderRef Dref,
+ LLVMMetadataRef Expr,
+ LLVMValueRef DL,
+ LLVMBasicBlockRef Block) {
+-#if LLVM_VERSION_EQ(3, 5)
+- DIBuilder *D = unwrap(Dref);
+- Instruction *Instr =
+- D->insertDeclare(unwrap(Storage), unwrapDI<DIVariable>(VarInfo),
+- unwrap(Block));
+- Instr->setDebugLoc(DebugLoc::getFromDILocation(cast<MDNode>(DL)));
+-#endif
+-
+-#if LLVM_VERSION_EQ(3, 6)
+- DIBuilder *D = unwrap(Dref);
+- Instruction *Instr =
+- D->insertDeclare(unwrap(Storage), unwrapDI<DIVariable>(VarInfo),
+- unwrapDI<DIExpression>(Expr), unwrap(Block));
+- Instr->setDebugLoc(DebugLoc::getFromDILocation(cast<MDNode>(unwrap<MetadataAsValue>(DL)->getMetadata())));
+-#endif
+-
+-#if LLVM_VERSION_GE(3, 7)
+ Instruction *Instr =
+ Dref->insertDeclare(unwrap(Storage), unwrap<DILocalVariable>(VarInfo),
+ unwrapDI<DIExpression>(Expr),
+ DebugLoc(cast<MDNode>(unwrap<MetadataAsValue>(DL)->getMetadata())),
+ unwrap(Block));
+-#endif
+-
+ return wrap(Instr);
+ }
+
+ LLVMMetadataRef LLVMDIBuilderCreateExpression(DIBuilderRef Dref, int64_t *Addr,
+ size_t Length) {
+-#if LLVM_VERSION_LE(3, 6)
+-# if LLVM_VERSION_EQ(3, 5)
+- return nullptr;
+-# else /* LLVM <= 3.6 && LLVM != 3.5 */
+- DIBuilder *D = unwrap(Dref);
+- DIExpression Expr = D->createExpression(ArrayRef<int64_t>(Addr, Length));
+- return wrap(Expr);
+-# endif
+-#else /* LLVM > 3.6 */
+ return wrap(Dref->createExpression(ArrayRef<int64_t>(Addr, Length)));
+-#endif
+ }
+
+ LLVMMetadataRef LLVMDIBuilderCreateEnumerationType(
+@@ -325,30 +200,16 @@ LLVMMetadataRef LLVMDIBuilderCreateEnumerationType(
+ LLVMMetadataRef File, unsigned LineNumber, uint64_t SizeInBits,
+ uint64_t AlignInBits, LLVMMetadataRef Elements,
+ LLVMMetadataRef UnderlyingType) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+- DICompositeType enumType = D->createEnumerationType(
+- unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), LineNumber,
+- SizeInBits, AlignInBits, unwrapDI<DIArray>(Elements),
+- unwrapDI<DIType>(UnderlyingType));
+-#else
+ DICompositeType *enumType = Dref->createEnumerationType(
+ unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), LineNumber,
+ SizeInBits, AlignInBits, DINodeArray(unwrapDI<MDTuple>(Elements)),
+ unwrapDI<DIType>(UnderlyingType));
+-#endif
+ return wrap(enumType);
+ }
+
+ LLVMMetadataRef LLVMDIBuilderCreateEnumerator(DIBuilderRef Dref,
+ const char *Name, int64_t Value) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+- DIEnumerator e = D->createEnumerator(Name, Value);
+- return wrap(e);
+-#else
+ DIEnumerator *e = Dref->createEnumerator(Name, Value);
+-#endif
+ return wrap(e);
+ }
+
+@@ -367,22 +228,13 @@ LLVMDIBuilderCreateStructType(DIBuilderRef Dref,
+ #endif
+ LLVMMetadataRef DerivedFrom,
+ LLVMMetadataRef Elements) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+- DICompositeType CT = D->createStructType(
+- unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), Line,
+- SizeInBits, AlignInBits, Flags, unwrapDI<DIType>(DerivedFrom),
+- unwrapDI<DIArray>(Elements));
+-#else
+ DICompositeType *CT = Dref->createStructType(
+ unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), Line,
+ SizeInBits, AlignInBits, Flags, unwrapDI<DIType>(DerivedFrom),
+ DINodeArray(unwrapDI<MDTuple>(Elements)));
+-#endif
+ return wrap(CT);
+ }
+
+-#if LLVM_VERSION_GE(3, 8)
+ LLVMMetadataRef
+ LLVMDIBuilderCreateReplaceableCompositeType(DIBuilderRef Dref,
+ LLVMMetadataRef Scope,
+@@ -409,7 +261,6 @@ LLVMDIBuilderReplaceTemporary(DIBuilderRef Dref,
+ llvm::TempMDNode fwd_decl(Node);
+ Dref->replaceTemporary(std::move(fwd_decl), Type);
+ }
+-#endif
+
+ LLVMMetadataRef
+ LLVMDIBuilderCreateMemberType(DIBuilderRef Dref, LLVMMetadataRef Scope,
+@@ -422,16 +273,9 @@ LLVMDIBuilderCreateMemberType(DIBuilderRef Dref, LLVMMetadataRef Scope,
+ DINode::DIFlags Flags,
+ #endif
+ LLVMMetadataRef Ty) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+- DIDerivedType DT = D->createMemberType(
+- unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), Line,
+- SizeInBits, AlignInBits, OffsetInBits, Flags, unwrapDI<DIType>(Ty));
+-#else
+ DIDerivedType *DT = Dref->createMemberType(
+ unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), Line,
+ SizeInBits, AlignInBits, OffsetInBits, Flags, unwrapDI<DIType>(Ty));
+-#endif
+ return wrap(DT);
+ }
+
+@@ -440,39 +284,24 @@ LLVMMetadataRef LLVMDIBuilderCreatePointerType(DIBuilderRef Dref,
+ uint64_t SizeInBits,
+ uint64_t AlignInBits,
+ const char *Name) {
+-#if LLVM_VERSION_LE(3, 6)
+- DIBuilder *D = unwrap(Dref);
+- DIDerivedType T = D->createPointerType(unwrapDI<DIType>(PointeeType),
+- SizeInBits, AlignInBits, Name);
+-#else
+ DIDerivedType *T = Dref->createPointerType(unwrapDI<DIType>(PointeeType),
+- SizeInBits, AlignInBits, Name);
++ SizeInBits, AlignInBits,
++#if LLVM_VERSION_GE(5, 0)
++ None,
+ #endif
++ Name);
+ return wrap(T);
+ }
+
+ LLVMMetadataRef LLVMTemporaryMDNode(LLVMContextRef C, LLVMMetadataRef *MDs,
+ unsigned Count) {
+-#if LLVM_VERSION_LE(3, 6)
+- return wrap(MDNode::getTemporary(*unwrap(C),
+- ArrayRef<Metadata *>(unwrap(MDs), Count)));
+-#else
+ return wrap(MDTuple::getTemporary(*unwrap(C),
+ ArrayRef<Metadata *>(unwrap(MDs), Count))
+ .release());
+-#endif
+ }
+
+ void LLVMMetadataReplaceAllUsesWith(LLVMMetadataRef MD, LLVMMetadataRef New) {
+-#if LLVM_VERSION_LE(3, 6)
+-# if LLVM_VERSION_EQ(3, 5)
+ auto *Node = unwrap<MDNode>(MD);
+-# else /* LLVM <= 3.6 && LLVM != 3.5 */
+- auto *Node = unwrap<MDNodeFwdDecl>(MD);
+-# endif
+-#else /* LLVM > 3.6 */
+- auto *Node = unwrap<MDNode>(MD);
+-#endif
+ Node->replaceAllUsesWith(unwrap<MDNode>(New));
+ MDNode::deleteTemporary(Node);
+ }
+diff --git a/src/llvm/function_pass_manager.cr b/src/llvm/function_pass_manager.cr
+index 979cb9c97..834d72a20 100644
+--- a/src/llvm/function_pass_manager.cr
++++ b/src/llvm/function_pass_manager.cr
+@@ -2,12 +2,6 @@ class LLVM::FunctionPassManager
+ def initialize(@unwrap : LibLLVM::PassManagerRef)
+ end
+
+- {% if LibLLVM::IS_35 || LibLLVM::IS_36 %}
+- def add_target_data(target_data)
+- LibLLVM.add_target_data target_data, self
+- end
+- {% end %}
+-
+ def run(mod : Module)
+ changed = false
+ run do |runner|
+diff --git a/src/llvm/lib_llvm.cr b/src/llvm/lib_llvm.cr
+index e2c7a9445..5a0b67cdd 100644
+--- a/src/llvm/lib_llvm.cr
++++ b/src/llvm/lib_llvm.cr
+@@ -6,8 +6,6 @@ lib LibLLVM
+ (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.9*) command -v llvm-config;; *) false;; esac)) || \
+ command -v llvm-config-3.8 || command -v llvm-config38 || \
+ (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.8*) command -v llvm-config;; *) false;; esac)) || \
+- command -v llvm-config-3.6 || command -v llvm-config36 || \
+- command -v llvm-config-3.5 || command -v llvm-config35 || \
+ command -v llvm-config
+ `.chomp.stringify
+ }}
+@@ -32,8 +30,6 @@ end
+ IS_40 = {{LibLLVM::VERSION.starts_with?("4.0")}}
+ IS_39 = {{LibLLVM::VERSION.starts_with?("3.9")}}
+ IS_38 = {{LibLLVM::VERSION.starts_with?("3.8")}}
+- IS_36 = {{LibLLVM::VERSION.starts_with?("3.6")}}
+- IS_35 = {{LibLLVM::VERSION.starts_with?("3.5")}}
+ end
+ {% end %}
+
+@@ -283,9 +279,7 @@ lib LibLLVM
+ fun set_alignment = LLVMSetAlignment(value : ValueRef, bytes : UInt32)
+ fun get_return_type = LLVMGetReturnType(TypeRef) : TypeRef
+
+- {% unless LibLLVM::IS_35 %}
+- fun write_bitcode_to_memory_buffer = LLVMWriteBitcodeToMemoryBuffer(mod : ModuleRef) : MemoryBufferRef
+- {% end %}
++ fun write_bitcode_to_memory_buffer = LLVMWriteBitcodeToMemoryBuffer(mod : ModuleRef) : MemoryBufferRef
+
+ fun dispose_memory_buffer = LLVMDisposeMemoryBuffer(buf : MemoryBufferRef) : Void
+ fun get_buffer_start = LLVMGetBufferStart(buf : MemoryBufferRef) : UInt8*
+@@ -293,26 +287,22 @@ lib LibLLVM
+
+ fun write_bitcode_to_fd = LLVMWriteBitcodeToFD(mod : ModuleRef, fd : LibC::Int, should_close : LibC::Int, unbuffered : LibC::Int) : LibC::Int
+
+- {% if LibLLVM::IS_36 || LibLLVM::IS_35 %}
+- fun add_target_data = LLVMAddTargetData(td : TargetDataRef, pm : PassManagerRef)
+- {% end %}
+-
+- {% if LibLLVM::IS_38 || LibLLVM::IS_36 || LibLLVM::IS_35 %}
++ {% if LibLLVM::IS_38 %}
+ fun copy_string_rep_of_target_data = LLVMCopyStringRepOfTargetData(data : TargetDataRef) : UInt8*
+ fun get_target_machine_data = LLVMGetTargetMachineData(t : TargetMachineRef) : TargetDataRef
+ fun set_data_layout = LLVMSetDataLayout(mod : ModuleRef, data : UInt8*)
+- {% else %}
++ {% else %} # LLVM >= 3.9
+ fun create_target_data_layout = LLVMCreateTargetDataLayout(t : TargetMachineRef) : TargetDataRef
+ fun set_module_data_layout = LLVMSetModuleDataLayout(mod : ModuleRef, data : TargetDataRef)
+ {% end %}
+
+- {% if LibLLVM::IS_38 || LibLLVM::IS_36 || LibLLVM::IS_35 %}
++ {% if LibLLVM::IS_38 %}
+ fun add_attribute = LLVMAddAttribute(arg : ValueRef, attr : LLVM::Attribute)
+ fun add_instr_attribute = LLVMAddInstrAttribute(instr : ValueRef, index : UInt32, attr : LLVM::Attribute)
+ fun add_function_attr = LLVMAddFunctionAttr(fn : ValueRef, pa : LLVM::Attribute)
+ fun get_function_attr = LLVMGetFunctionAttr(fn : ValueRef) : LLVM::Attribute
+ fun get_attribute = LLVMGetAttribute(arg : ValueRef) : LLVM::Attribute
+- {% else %}
++ {% else %} # LLVM >= 3.9
+ type AttributeRef = Void*
+ alias AttributeIndex = UInt
+
+diff --git a/src/llvm/lib_llvm_ext.cr b/src/llvm/lib_llvm_ext.cr
+index 84c65cccb..953567eb8 100644
+--- a/src/llvm/lib_llvm_ext.cr
++++ b/src/llvm/lib_llvm_ext.cr
+@@ -13,19 +13,11 @@ lib LibLLVMExt
+ fun create_di_builder = LLVMNewDIBuilder(LibLLVM::ModuleRef) : DIBuilder
+ fun di_builder_finalize = LLVMDIBuilderFinalize(DIBuilder)
+
+- {% if LibLLVM::IS_36 || LibLLVM::IS_35 %}
+- fun di_builder_create_function = LLVMDIBuilderCreateFunction(
+- builder : DIBuilder, scope : Metadata, name : Char*,
+- linkage_name : Char*, file : Metadata, line : UInt,
+- composite_type : Metadata, is_local_to_unit : Int, is_definition : Int,
+- scope_line : UInt, flags : LLVM::DIFlags, is_optimized : Int, func : LibLLVM::ValueRef) : Metadata
+- {% else %}
+- fun di_builder_create_function = LLVMDIBuilderCreateFunction(
+- builder : DIBuilder, scope : Metadata, name : Char*,
+- linkage_name : Char*, file : Metadata, line : UInt,
+- composite_type : Metadata, is_local_to_unit : Bool, is_definition : Bool,
+- scope_line : UInt, flags : LLVM::DIFlags, is_optimized : Bool, func : LibLLVM::ValueRef) : Metadata
+- {% end %}
++ fun di_builder_create_function = LLVMDIBuilderCreateFunction(
++ builder : DIBuilder, scope : Metadata, name : Char*,
++ linkage_name : Char*, file : Metadata, line : UInt,
++ composite_type : Metadata, is_local_to_unit : Bool, is_definition : Bool,
++ scope_line : UInt, flags : LLVM::DIFlags, is_optimized : Bool, func : LibLLVM::ValueRef) : Metadata
+
+ fun di_builder_create_file = LLVMDIBuilderCreateFile(builder : DIBuilder, file : Char*, dir : Char*) : Metadata
+ fun di_builder_create_compile_unit = LLVMDIBuilderCreateCompileUnit(builder : DIBuilder,
+@@ -94,17 +86,12 @@ lib LibLLVMExt
+ align_in_bits : UInt64,
+ name : Char*) : Metadata
+
+- {% if LibLLVM::IS_35 || LibLLVM::IS_36 %}
+- fun temporary_md_node = LLVMTemporaryMDNode(context : LibLLVM::ContextRef, mds : Metadata*, count : UInt) : Metadata
+- fun metadata_replace_all_uses_with = LLVMMetadataReplaceAllUsesWith(Metadata, Metadata)
+- {% else %}
+- fun di_builder_create_replaceable_composite_type = LLVMDIBuilderCreateReplaceableCompositeType(builder : DIBuilder,
+- scope : Metadata,
+- name : Char*,
+- file : Metadata,
+- line : UInt) : Metadata
+- fun di_builder_replace_temporary = LLVMDIBuilderReplaceTemporary(builder : DIBuilder, from : Metadata, to : Metadata)
+- {% end %}
++ fun di_builder_create_replaceable_composite_type = LLVMDIBuilderCreateReplaceableCompositeType(builder : DIBuilder,
++ scope : Metadata,
++ name : Char*,
++ file : Metadata,
++ line : UInt) : Metadata
++ fun di_builder_replace_temporary = LLVMDIBuilderReplaceTemporary(builder : DIBuilder, from : Metadata, to : Metadata)
+
+ fun set_current_debug_location = LLVMSetCurrentDebugLocation2(LibLLVM::BuilderRef, Int, Int, Metadata, Metadata)
+
+diff --git a/src/llvm/module.cr b/src/llvm/module.cr
+index cb71e3b21..c15a56e77 100644
+--- a/src/llvm/module.cr
++++ b/src/llvm/module.cr
+@@ -6,7 +6,7 @@ class LLVM::Module
+
+ getter context : Context
+
+- {% if LibLLVM::IS_38 || LibLLVM::IS_36 || LibLLVM::IS_35 %}
++ {% if LibLLVM::IS_38 %}
+ def initialize(@unwrap : LibLLVM::ModuleRef, @name : String, @context : Context)
+ @owned = false
+ end
+@@ -14,7 +14,7 @@ class LLVM::Module
+ def name : String
+ @name
+ end
+- {% else %}
++ {% else %} # LLVM >= 3.9
+ def initialize(@unwrap : LibLLVM::ModuleRef, @context : Context)
+ @owned = false
+ end
+@@ -34,9 +34,9 @@ class LLVM::Module
+ end
+
+ def data_layout=(data : TargetData)
+- {% if LibLLVM::IS_38 || LibLLVM::IS_36 || LibLLVM::IS_35 %}
++ {% if LibLLVM::IS_38 %}
+ LibLLVM.set_data_layout(self, data.to_data_layout_string)
+- {% else %}
++ {% else %} # LLVM >= 3.9
+ LibLLVM.set_module_data_layout(self, data)
+ {% end %}
+ end
+@@ -57,11 +57,9 @@ class LLVM::Module
+ LibLLVM.write_bitcode_to_file self, filename
+ end
+
+- {% unless LibLLVM::IS_35 %}
+- def write_bitcode_to_memory_buffer
+- MemoryBuffer.new(LibLLVM.write_bitcode_to_memory_buffer self)
+- end
+- {% end %}
++ def write_bitcode_to_memory_buffer
++ MemoryBuffer.new(LibLLVM.write_bitcode_to_memory_buffer self)
++ end
+
+ def write_bitcode_to_fd(fd : Int, should_close = false, buffered = false)
+ LibLLVM.write_bitcode_to_fd(self, fd, should_close ? 1 : 0, buffered ? 1 : 0)
+diff --git a/src/llvm/module_pass_manager.cr b/src/llvm/module_pass_manager.cr
+index 10bfa60bd..519227809 100644
+--- a/src/llvm/module_pass_manager.cr
++++ b/src/llvm/module_pass_manager.cr
+@@ -3,12 +3,6 @@ class LLVM::ModulePassManager
+ @unwrap = LibLLVM.pass_manager_create
+ end
+
+- {% if LibLLVM::IS_35 || LibLLVM::IS_36 %}
+- def add_target_data(target_data)
+- LibLLVM.add_target_data target_data, self
+- end
+- {% end %}
+-
+ def run(mod)
+ LibLLVM.run_pass_manager(self, mod) != 0
+ end
+diff --git a/src/llvm/target_machine.cr b/src/llvm/target_machine.cr
+index e4bb081e9..42e44abe2 100644
+--- a/src/llvm/target_machine.cr
++++ b/src/llvm/target_machine.cr
+@@ -9,9 +9,9 @@ class LLVM::TargetMachine
+
+ def data_layout
+ @layout ||= begin
+- layout = {% if LibLLVM::IS_38 || LibLLVM::IS_36 || LibLLVM::IS_35 %}
++ layout = {% if LibLLVM::IS_38 %}
+ LibLLVM.get_target_machine_data(self)
+- {% else %}
++ {% else %} # LLVM >= 3.9
+ LibLLVM.create_target_data_layout(self)
+ {% end %}
+ layout ? TargetData.new(layout) : raise "Missing layout for #{self}"
+--
+2.14.1
+
diff --git a/dev-lang/crystal/metadata.xml b/dev-lang/crystal/metadata.xml
new file mode 100644
index 000000000000..8c0dacece652
--- /dev/null
+++ b/dev-lang/crystal/metadata.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>longlene@gmail.com</email>
+ <name>Lixiao Chen</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ Crystal is a programming language that resembles Ruby but compiles to
+ native code and tries to be much more efficient, at the cost of
+ disallowing certain dynamic aspects of Ruby.
+ </longdescription>
+ <use>
+ <flag name="debug">
+ Build each module as a separate object file. Speeds build up.
+ </flag>
+ <flag name="blocking-stdio-hack">
+ Keep STDIO file descriptors in blocking mode.
+ </flag>
+ <flag name="yaml">
+ Use the <pkg>dev-libs/libyaml</pkg> library to enable Crystal yaml
+ module
+ </flag>
+ <flag name="xml">
+ Use the <pkg>dev-libs/libxml2</pkg> library to enable Crystal xml
+ module
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">manastech/crystal</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/duktape/Manifest b/dev-lang/duktape/Manifest
new file mode 100644
index 000000000000..48b778bef012
--- /dev/null
+++ b/dev-lang/duktape/Manifest
@@ -0,0 +1,6 @@
+AUX duktape.pc 218 SHA256 73ff0146fe8447f4f468a127b3628f7deaa0f787ec776d915c7fe397c1909a5d SHA512 0f4b4e20ea9b348ed8b69623ed4fa09c20a2a951ef4f281b6313961c4aa085be9fc511a948d67713a7d2d9dede984761d5409b25e09da1db10698eb615f7c6fb WHIRLPOOL 870065143ad18e8b382c8d92289ff174d46f4a9b85700b135ffc0fee2aad05058cd9ea88b463e219208f09f95dad6dc1dc5f5df8e4316b0870693fae184f3617
+DIST duktape-2.1.0.tar.xz 1024608 SHA256 e02364cd72077e34e204b8375c8bd7c461eb13cb623c7dc1a74d253d84b1446b SHA512 9ec399a801a66f55c4c45a6011ea70fa86be302f07739325389a22189dd2026d52dc887a70d110496c9959c8680db8b878ffd2cc3c83e38269444e8726cfce5a WHIRLPOOL e7274339da65f90e952d0becea5c32f5b74a2091831b33ba8ad41745f66d9b6e34708afcde97dcb8483deab8624709149cd61026e1232914a4ef03083a255963
+DIST duktape-2.1.1.tar.xz 1024568 SHA256 6a58e5e8d8c7e3e638cd6e5b91be3bcaa4c89778d3892054a36052ae043dd11e SHA512 51e5146b083b460f005ce93e369aebf9981e33a3e888f3e91fd175b7f018a93981e8f6f9ff9bbd865ad30f1424fcb21c18334450050909cda5f74caf11b25479 WHIRLPOOL 9d15f1b8884d179873e8ea7fb69c93bf71875e3a776b9d83f568fb1418fc46ad44ccea0597f38046c9ce1b4db0a7d60a8a2eefff08f9a25a5827d3de7cf7251a
+EBUILD duktape-2.1.0.ebuild 981 SHA256 ddf092eff1ff6d41297fc060dfa6ff486b62bf6c73e5ad7c6020f414baa2f83d SHA512 6d8bdb857de247fad2bee557c7df1fd6422dde70c36313a0ee5efa99ff9fff129b21d944c1a7ba372dd73c9da13013e75483bb08558d3e356679d2722809aba6 WHIRLPOOL a39cfa60639a1bf1113a7d7402006d1e0f88a9f10bf346146fe50de8024e8b1888756047456e1b1a15612231693885cbd11312a53e3a58ddb226efd782f5f602
+EBUILD duktape-2.1.1.ebuild 981 SHA256 ddf092eff1ff6d41297fc060dfa6ff486b62bf6c73e5ad7c6020f414baa2f83d SHA512 6d8bdb857de247fad2bee557c7df1fd6422dde70c36313a0ee5efa99ff9fff129b21d944c1a7ba372dd73c9da13013e75483bb08558d3e356679d2722809aba6 WHIRLPOOL a39cfa60639a1bf1113a7d7402006d1e0f88a9f10bf346146fe50de8024e8b1888756047456e1b1a15612231693885cbd11312a53e3a58ddb226efd782f5f602
+MISC metadata.xml 477 SHA256 d692164e627738ea572e1f075bb8f863bee1e9aee732b72e5bf77563cd91b02a SHA512 72024950f8fdb4c54f48cafd73d139c52230108fa9ba032c72a2bc847ec2d760d280879b17fb032ee22e147a4b9dcab5281e69985a157711a9d03c75c55a06c5 WHIRLPOOL 569523913210a9142e7f8595c72f8f8d58ae0ba14554e3893cda9d48ff2aa1178cd33b0b95696d7a18b8137b0bd3202a977d5ac6ecc57c44d06bd529505af49b
diff --git a/dev-lang/duktape/duktape-2.1.0.ebuild b/dev-lang/duktape/duktape-2.1.0.ebuild
new file mode 100644
index 000000000000..976fa042698a
--- /dev/null
+++ b/dev-lang/duktape/duktape-2.1.0.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Embeddable Javascript engine"
+HOMEPAGE="http://duktape.org"
+SRC_URI="http://duktape.org/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ eapply_user
+
+ # Set install path
+ sed -i "s#INSTALL_PREFIX=/usr/local#INSTALL_PREFIX=${D::-1}/usr#" \
+ Makefile.sharedlibrary || die "failed to set install path"
+
+ # Edit pkgconfig
+ sed "s#VERSION#${PV}#" "${FILESDIR}/${PN}.pc" > "${S}/${PN}.pc" || die
+ sed -i "s#LIBDIR#$(get_libdir)#" "${S}/${PN}.pc" || die
+
+ # Set lib folder
+ sed -i "s#(INSTALL_PREFIX)/lib#(INSTALL_PREFIX)/$(get_libdir)#" \
+ Makefile.sharedlibrary || die
+
+ mv Makefile.sharedlibrary Makefile || die "failed to rename makefile"
+}
+
+src_install() {
+ dodir /usr/$(get_libdir)
+ dodir /usr/include
+ emake install
+
+ insinto /usr/$(get_libdir)/pkgconfig/
+ doins "${S}/${PN}.pc"
+}
diff --git a/dev-lang/duktape/duktape-2.1.1.ebuild b/dev-lang/duktape/duktape-2.1.1.ebuild
new file mode 100644
index 000000000000..976fa042698a
--- /dev/null
+++ b/dev-lang/duktape/duktape-2.1.1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Embeddable Javascript engine"
+HOMEPAGE="http://duktape.org"
+SRC_URI="http://duktape.org/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ eapply_user
+
+ # Set install path
+ sed -i "s#INSTALL_PREFIX=/usr/local#INSTALL_PREFIX=${D::-1}/usr#" \
+ Makefile.sharedlibrary || die "failed to set install path"
+
+ # Edit pkgconfig
+ sed "s#VERSION#${PV}#" "${FILESDIR}/${PN}.pc" > "${S}/${PN}.pc" || die
+ sed -i "s#LIBDIR#$(get_libdir)#" "${S}/${PN}.pc" || die
+
+ # Set lib folder
+ sed -i "s#(INSTALL_PREFIX)/lib#(INSTALL_PREFIX)/$(get_libdir)#" \
+ Makefile.sharedlibrary || die
+
+ mv Makefile.sharedlibrary Makefile || die "failed to rename makefile"
+}
+
+src_install() {
+ dodir /usr/$(get_libdir)
+ dodir /usr/include
+ emake install
+
+ insinto /usr/$(get_libdir)/pkgconfig/
+ doins "${S}/${PN}.pc"
+}
diff --git a/dev-lang/duktape/files/duktape.pc b/dev-lang/duktape/files/duktape.pc
new file mode 100644
index 000000000000..56eff91ada9e
--- /dev/null
+++ b/dev-lang/duktape/files/duktape.pc
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/LIBDIR
+includedir=${prefix}/include
+
+Name: duktape
+Description: Embeddable Javascript engine
+Version: VERSION
+Libs: -L${libdir} -lduktape
+Cflags: -I${includedir}
diff --git a/dev-lang/duktape/metadata.xml b/dev-lang/duktape/metadata.xml
new file mode 100644
index 000000000000..2e39a897251e
--- /dev/null
+++ b/dev-lang/duktape/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>thev00d00@gentoo.org</email>
+ <name>Ian Whyman</name>
+ </maintainer>
+ <longdescription>
+ Duktape is an embeddable Javascript engine, with a focus on portability and compact footprint.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">svaarala/duktape</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/ekopath/Manifest b/dev-lang/ekopath/Manifest
new file mode 100644
index 000000000000..1699107b6e4f
--- /dev/null
+++ b/dev-lang/ekopath/Manifest
@@ -0,0 +1,18 @@
+DIST ekopath-2015-12-13-installer.run 57231316 SHA256 85a3fc7df59373bfef32bf9388fd77c19d7c780dc5e9e52e1e8664f0139a9ac6 SHA512 9454f263c921d26f521e374eb2f346f1e257bf58daf2ce5e54ce1a2cced7291bd9b5ece08cd4da441498f66bcd6a01a45309d4463fe65ea5d094b21612a8d3f8 WHIRLPOOL 3157ed63da3d87912163af2e8927a332640b2682289234b25b5f7b75a698490dc2cf8e0d5f51d82eb0b072654f15040c6b94f94e3cf7a428b793a575d6f71ed0
+DIST ekopath-2016-04-09-installer.run 57165340 SHA256 ccdfe4aca6063d8cf885b3878b0ab12505aa765db081f4a0278e392f883dee46 SHA512 cdb8647d36ea8ca411cc2378d87c0a2edf34c834206905350a6cdde5ae0ed14f56f716ebb7ad28129b634088f94e0304c1cef3df1beaac38c3ccc87d5387dce0 WHIRLPOOL 299ac5494f17dc680a794f4cda3417e232c2fe6768df2ee5ba48356be0d929f7ed821b32b5e179c9fd0334081bcca61dddac577b6b8a63201723b1172f94a005
+DIST ekopath-2016-04-28-installer.run 57174533 SHA256 92a0d516fff57849ac88f6fe22e112184f5102cdf0f159324243dc49e7e248ac SHA512 9bb8f22bc3644b5bbfe0dcf768345fd9050d030ee2c9aba315004a5b2f2d95adbc8c613aa41e698f3fde7da235534ecb1b03f489ad2cbbec19b65abfe3ff0967 WHIRLPOOL c64a5578e789c1412da12053d7550689cdd1bb9a330c93b3d00c6b67c3bf7cd9fbcc9a558d2defc7a9ebb9e13c8be038c6c37d067bcf10bd70b29528b201db6c
+DIST ekopath-2016-06-29-installer.run 43660235 SHA256 995712b47430ad4ea6b9474040dbb214e2352b654f82b3f8b1697241038b54dc SHA512 3a1d339e398fcb6330b1329eeb5b5c03082a4cad0a42f39160cc80327f62691b9d429b9fe81fa7b4987eb9d8b0c2b03776c1ad2646bfca2fa033bab68da87069 WHIRLPOOL f6fcf54c5230ea16054feac0a48bdd95f49939cb2cc6081d8af8f785b2ff99e82dc9dedb3bd85c53137f4eed39a8d9b57b971595e6ef748e00afc54977861542
+DIST ekopath-2016-10-20-installer.run 69526937 SHA256 f541d4ce4e4023fb879a667e5ca2f24be55fdc4b618f0776aa01f1fd01f8b7f5 SHA512 020093eb1cc65cd8b2b73ef0e7b5364e029f46ace8893facd343a7ce9eecc2e8f2c1de83c64886e2881ba78677413d89a17d0967e41a41ca2a5a08325bc499b4 WHIRLPOOL 51b80fa7d9275ca64eefda6a90db283ecaa5f33b10c188b7dbe14b48b5e6f50352cd18652dc2fe36c87c386c99c8e40bca68b2084466f3d5146af52a6af0af0b
+EBUILD ekopath-6.0.619_p20151213-r1.ebuild 1549 SHA256 064b605060cdf3275e14c8475e2aced85d86b7dfac1e365f46953d71a0b8a195 SHA512 bd46880567fdbee13a8cc0f3d52ee1206e36c6249743e45293dcbd9597140c2efc1e8a09e63c8182e109c2d4079da9dfba0cd7b4cc2475e56b96a48a51ca0a31 WHIRLPOOL 3b1bc81e78137b8f51d5ccdd3b1790d2de0ce16f3ead766e9c6366598642451a9f710c66b502d3a0c1c7326c2020c2815820345d28e9a8db99a919d7fbe95203
+EBUILD ekopath-6.0.619_p20151213-r100.ebuild 1831 SHA256 8fdeeec3745764d1e116d34633247cd543219375d2a81d1d3ddb9a68b00b444b SHA512 756561d0a46906eecd5bad3490a6c310b7b4e85ea1aad811111c631977f1d7a3f7c9ececbcf75d4c42f3bd89c62e69e94492eb421a697c0131afdaf3693c76aa WHIRLPOOL 908c327728d452b2eb1f08ec684fd027b05e056d6bd51099b62fb6d8da4c8a04e09bc815566808388b19b1ff2def54d5c2f5eda681843396d2eaeb86d895e478
+EBUILD ekopath-6.0.756_p20160409-r1.ebuild 1549 SHA256 064b605060cdf3275e14c8475e2aced85d86b7dfac1e365f46953d71a0b8a195 SHA512 bd46880567fdbee13a8cc0f3d52ee1206e36c6249743e45293dcbd9597140c2efc1e8a09e63c8182e109c2d4079da9dfba0cd7b4cc2475e56b96a48a51ca0a31 WHIRLPOOL 3b1bc81e78137b8f51d5ccdd3b1790d2de0ce16f3ead766e9c6366598642451a9f710c66b502d3a0c1c7326c2020c2815820345d28e9a8db99a919d7fbe95203
+EBUILD ekopath-6.0.756_p20160409-r100.ebuild 1831 SHA256 8fdeeec3745764d1e116d34633247cd543219375d2a81d1d3ddb9a68b00b444b SHA512 756561d0a46906eecd5bad3490a6c310b7b4e85ea1aad811111c631977f1d7a3f7c9ececbcf75d4c42f3bd89c62e69e94492eb421a697c0131afdaf3693c76aa WHIRLPOOL 908c327728d452b2eb1f08ec684fd027b05e056d6bd51099b62fb6d8da4c8a04e09bc815566808388b19b1ff2def54d5c2f5eda681843396d2eaeb86d895e478
+EBUILD ekopath-6.0.779_p20160428-r1.ebuild 1549 SHA256 064b605060cdf3275e14c8475e2aced85d86b7dfac1e365f46953d71a0b8a195 SHA512 bd46880567fdbee13a8cc0f3d52ee1206e36c6249743e45293dcbd9597140c2efc1e8a09e63c8182e109c2d4079da9dfba0cd7b4cc2475e56b96a48a51ca0a31 WHIRLPOOL 3b1bc81e78137b8f51d5ccdd3b1790d2de0ce16f3ead766e9c6366598642451a9f710c66b502d3a0c1c7326c2020c2815820345d28e9a8db99a919d7fbe95203
+EBUILD ekopath-6.0.779_p20160428-r100.ebuild 1831 SHA256 8fdeeec3745764d1e116d34633247cd543219375d2a81d1d3ddb9a68b00b444b SHA512 756561d0a46906eecd5bad3490a6c310b7b4e85ea1aad811111c631977f1d7a3f7c9ececbcf75d4c42f3bd89c62e69e94492eb421a697c0131afdaf3693c76aa WHIRLPOOL 908c327728d452b2eb1f08ec684fd027b05e056d6bd51099b62fb6d8da4c8a04e09bc815566808388b19b1ff2def54d5c2f5eda681843396d2eaeb86d895e478
+EBUILD ekopath-6.0.855_p20160629-r1.ebuild 1549 SHA256 064b605060cdf3275e14c8475e2aced85d86b7dfac1e365f46953d71a0b8a195 SHA512 bd46880567fdbee13a8cc0f3d52ee1206e36c6249743e45293dcbd9597140c2efc1e8a09e63c8182e109c2d4079da9dfba0cd7b4cc2475e56b96a48a51ca0a31 WHIRLPOOL 3b1bc81e78137b8f51d5ccdd3b1790d2de0ce16f3ead766e9c6366598642451a9f710c66b502d3a0c1c7326c2020c2815820345d28e9a8db99a919d7fbe95203
+EBUILD ekopath-6.0.855_p20160629-r100.ebuild 1831 SHA256 8fdeeec3745764d1e116d34633247cd543219375d2a81d1d3ddb9a68b00b444b SHA512 756561d0a46906eecd5bad3490a6c310b7b4e85ea1aad811111c631977f1d7a3f7c9ececbcf75d4c42f3bd89c62e69e94492eb421a697c0131afdaf3693c76aa WHIRLPOOL 908c327728d452b2eb1f08ec684fd027b05e056d6bd51099b62fb6d8da4c8a04e09bc815566808388b19b1ff2def54d5c2f5eda681843396d2eaeb86d895e478
+EBUILD ekopath-6.0.967_p20161020-r1.ebuild 1813 SHA256 0265ec3c55d0ecba6c9c2b01ecc5033c3d1b2c32f28ee2fa8541ee48ea0fe97a SHA512 7806946243eaa27876e93ca9e603f1ac9ca92b22e06b85dec7821d2723e0c6909080c5c4a04866af2407ddcadfe2fadc9e073311fdc58ca0559258432ad2bdb6 WHIRLPOOL fb9f57cf7376ee33f662cad67504616d34bea45b390f79a7fab8cbba6ac8e98d4501d59c3078598239b27a396ab1a9270502cd6bc3a82563ef690314737175c7
+EBUILD ekopath-6.0.967_p20161020-r100.ebuild 2095 SHA256 f5d405c39df870137fe70689cbac08b375a399bcb77ca60d728df50058a1191c SHA512 0f0df66a7b993a8685e932d49504cbef461c3d67b890348c4b2042b40bda043fa2b101b48ddfab47e068c58121e78512b7de11d2e1f61131f2543c2349e003b1 WHIRLPOOL 2192adef9e12e3d178cf1ab57d7218e0bd5a3c2879bcd4ad4417603248d28ef74216179ef72c6df66703414cfacbc8f4487ca41adbb539badb5844847857d74e
+MISC ChangeLog 10477 SHA256 ec1e25038b97b8a031dd932fe1f1068f2ab1d7ceaf09fd29ce7939b482df3cce SHA512 f6f880b69591581db819556ea8c5ad1fa9d17dd55c5b85a82518361a2cdbd62d88d5ddaf93912564b2f193c52b8d2cd364be502d755e58ab8a6796ea9ea459ed WHIRLPOOL 99c999a0ffa8d857e4be35be45c0803d494faec009bf2763fbd3b370156ebd547fb05bd90f570fa84adde09873d9b4a4d83d6fcb4c6ff23d4e00e3fc14d66828
+MISC ChangeLog-2015 7406 SHA256 da2d42340c50b77184475f9662d8553106a8889144c3a394403f1a1238be7dc8 SHA512 c2bb87c7fe44add16365385eafa0d817b294125e4c624ee655380da2d918283e3458122b0b070eca8c280f12b049301553fcb4e368e6597cb1341d17c46a0753 WHIRLPOOL c177e2324ec2828502e7953fc6069d1a62949630591193b3d0616ae874daaf5f96cde9f21162773680ecb16f671aae559665b8ed4624387a2c11f2edc9eb1e40
+MISC metadata.xml 958 SHA256 137be8a3547094ddda298c9f6a8469692c0022335bba46dec6ef8f875e3d3871 SHA512 50dce60dc35312b6e91298d9ccdf288a98a8f2282b313e96680d2787b2c06d93c95d8b0e97f2fb52a97735f18610c7963998dda93ade3702e81b5136b1339a84 WHIRLPOOL a20f161efc442e1b2368f4c30b7947e178d2c3dcf86462df09682de6c005d833a2b63fe0e7b151a61f9696c225e36e3666a32a106abca4c089b8bf6a9b4f3fd4
diff --git a/dev-lang/ekopath/ekopath-6.0.619_p20151213-r1.ebuild b/dev-lang/ekopath/ekopath-6.0.619_p20151213-r1.ebuild
new file mode 100644
index 000000000000..48ab3c05679d
--- /dev/null
+++ b/dev-lang/ekopath/ekopath-6.0.619_p20151213-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils versionator
+
+MY_PV=$(get_version_component_range 1-3)
+MY_P=${PN}-${MY_PV}
+DATE=$(get_version_component_range 4)
+DATE=${DATE#p}
+DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
+INSTALLER=${PN}-${DATE}-installer.run
+
+DESCRIPTION="PathScale EKOPath Compiler Suite"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
+
+LICENSE="all-rights-reserved"
+SLOT="${MY_PV}"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="!!app-arch/rpm"
+RDEPEND="!dev-lang/ekopath:0/${MY_PV}"
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="opt/${MY_P}/*"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
+ chmod +x "${S}/${INSTALLER}" || die
+}
+
+src_install() {
+ # EI_PAX marking is obsolete and PT_PAX breaks the binary.
+ # We must use XT_PAX to run the installer.
+ if [[ ${PAX_MARKINGS} == "XT" ]]; then
+ pax-mark m "${INSTALLER}"
+ fi
+
+ ./"${INSTALLER}" \
+ --prefix "${ED%/}/opt/${MY_P}" \
+ --mode unattended || die
+
+ if [[ ! -d ${ED%/}/opt/${MY_P}/lib/${MY_PV} ]]; then
+ local guess
+ cd "${ED%/}/opt/${MY_P}/lib" && guess=( * )
+
+ if [[ ${guess[@]} ]]; then
+ die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
+ else
+ die "No libdir installed"
+ fi
+ fi
+ [[ -x ${ED%}/opt/${MY_P}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
+
+ rm -r "${ED}/opt/${MY_P}"/uninstall* || die
+}
diff --git a/dev-lang/ekopath/ekopath-6.0.619_p20151213-r100.ebuild b/dev-lang/ekopath/ekopath-6.0.619_p20151213-r100.ebuild
new file mode 100644
index 000000000000..3b7217706e58
--- /dev/null
+++ b/dev-lang/ekopath/ekopath-6.0.619_p20151213-r100.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils versionator
+
+MY_PV=$(get_version_component_range 1-3)
+MY_P=${PN}-${MY_PV}
+DATE=$(get_version_component_range 4)
+DATE=${DATE#p}
+DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
+INSTALLER=${PN}-${DATE}-installer.run
+
+DESCRIPTION="PathScale EKOPath Compiler Suite"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
+
+LICENSE="all-rights-reserved"
+SLOT="0/${MY_PV}"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="!!app-arch/rpm"
+RDEPEND="!dev-lang/ekopath:${MY_PV}"
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="opt/${MY_P}/*"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
+ chmod +x "${S}/${INSTALLER}" || die
+}
+
+src_configure() {
+ cat > 99${PN} <<-EOF || die
+ PATH=${EROOT%/}/opt/${PN}/bin
+ ROOTPATH=${EROOT%/}/opt/${PN}/bin
+ LDPATH=${EROOT%/}/opt/${PN}/lib:${EROOT%/}/opt/${PN}/lib/${MY_PV}/x8664/64
+ MANPATH=${EROOT%/}/opt/${PN}/docs/man
+ EOF
+}
+
+src_install() {
+ # EI_PAX marking is obsolete and PT_PAX breaks the binary.
+ # We must use XT_PAX to run the installer.
+ if [[ ${PAX_MARKINGS} == "XT" ]]; then
+ pax-mark m "${INSTALLER}"
+ fi
+
+ ./"${INSTALLER}" \
+ --prefix "${ED%/}/opt/${MY_P}" \
+ --mode unattended || die
+
+ if [[ ! -d ${ED%/}/opt/${MY_P}/lib/${MY_PV} ]]; then
+ local guess
+ cd "${ED%/}/opt/${MY_P}/lib" && guess=( * )
+
+ if [[ ${guess[@]} ]]; then
+ die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
+ else
+ die "No libdir installed"
+ fi
+ fi
+ [[ -x ${ED%}/opt/${MY_P}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
+
+ rm -r "${ED}/opt/${MY_P}"/uninstall* || die
+ dosym ${MY_P} /opt/${PN}
+ doenvd 99${PN}
+}
diff --git a/dev-lang/ekopath/ekopath-6.0.756_p20160409-r1.ebuild b/dev-lang/ekopath/ekopath-6.0.756_p20160409-r1.ebuild
new file mode 100644
index 000000000000..48ab3c05679d
--- /dev/null
+++ b/dev-lang/ekopath/ekopath-6.0.756_p20160409-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils versionator
+
+MY_PV=$(get_version_component_range 1-3)
+MY_P=${PN}-${MY_PV}
+DATE=$(get_version_component_range 4)
+DATE=${DATE#p}
+DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
+INSTALLER=${PN}-${DATE}-installer.run
+
+DESCRIPTION="PathScale EKOPath Compiler Suite"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
+
+LICENSE="all-rights-reserved"
+SLOT="${MY_PV}"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="!!app-arch/rpm"
+RDEPEND="!dev-lang/ekopath:0/${MY_PV}"
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="opt/${MY_P}/*"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
+ chmod +x "${S}/${INSTALLER}" || die
+}
+
+src_install() {
+ # EI_PAX marking is obsolete and PT_PAX breaks the binary.
+ # We must use XT_PAX to run the installer.
+ if [[ ${PAX_MARKINGS} == "XT" ]]; then
+ pax-mark m "${INSTALLER}"
+ fi
+
+ ./"${INSTALLER}" \
+ --prefix "${ED%/}/opt/${MY_P}" \
+ --mode unattended || die
+
+ if [[ ! -d ${ED%/}/opt/${MY_P}/lib/${MY_PV} ]]; then
+ local guess
+ cd "${ED%/}/opt/${MY_P}/lib" && guess=( * )
+
+ if [[ ${guess[@]} ]]; then
+ die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
+ else
+ die "No libdir installed"
+ fi
+ fi
+ [[ -x ${ED%}/opt/${MY_P}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
+
+ rm -r "${ED}/opt/${MY_P}"/uninstall* || die
+}
diff --git a/dev-lang/ekopath/ekopath-6.0.756_p20160409-r100.ebuild b/dev-lang/ekopath/ekopath-6.0.756_p20160409-r100.ebuild
new file mode 100644
index 000000000000..3b7217706e58
--- /dev/null
+++ b/dev-lang/ekopath/ekopath-6.0.756_p20160409-r100.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils versionator
+
+MY_PV=$(get_version_component_range 1-3)
+MY_P=${PN}-${MY_PV}
+DATE=$(get_version_component_range 4)
+DATE=${DATE#p}
+DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
+INSTALLER=${PN}-${DATE}-installer.run
+
+DESCRIPTION="PathScale EKOPath Compiler Suite"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
+
+LICENSE="all-rights-reserved"
+SLOT="0/${MY_PV}"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="!!app-arch/rpm"
+RDEPEND="!dev-lang/ekopath:${MY_PV}"
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="opt/${MY_P}/*"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
+ chmod +x "${S}/${INSTALLER}" || die
+}
+
+src_configure() {
+ cat > 99${PN} <<-EOF || die
+ PATH=${EROOT%/}/opt/${PN}/bin
+ ROOTPATH=${EROOT%/}/opt/${PN}/bin
+ LDPATH=${EROOT%/}/opt/${PN}/lib:${EROOT%/}/opt/${PN}/lib/${MY_PV}/x8664/64
+ MANPATH=${EROOT%/}/opt/${PN}/docs/man
+ EOF
+}
+
+src_install() {
+ # EI_PAX marking is obsolete and PT_PAX breaks the binary.
+ # We must use XT_PAX to run the installer.
+ if [[ ${PAX_MARKINGS} == "XT" ]]; then
+ pax-mark m "${INSTALLER}"
+ fi
+
+ ./"${INSTALLER}" \
+ --prefix "${ED%/}/opt/${MY_P}" \
+ --mode unattended || die
+
+ if [[ ! -d ${ED%/}/opt/${MY_P}/lib/${MY_PV} ]]; then
+ local guess
+ cd "${ED%/}/opt/${MY_P}/lib" && guess=( * )
+
+ if [[ ${guess[@]} ]]; then
+ die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
+ else
+ die "No libdir installed"
+ fi
+ fi
+ [[ -x ${ED%}/opt/${MY_P}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
+
+ rm -r "${ED}/opt/${MY_P}"/uninstall* || die
+ dosym ${MY_P} /opt/${PN}
+ doenvd 99${PN}
+}
diff --git a/dev-lang/ekopath/ekopath-6.0.779_p20160428-r1.ebuild b/dev-lang/ekopath/ekopath-6.0.779_p20160428-r1.ebuild
new file mode 100644
index 000000000000..48ab3c05679d
--- /dev/null
+++ b/dev-lang/ekopath/ekopath-6.0.779_p20160428-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils versionator
+
+MY_PV=$(get_version_component_range 1-3)
+MY_P=${PN}-${MY_PV}
+DATE=$(get_version_component_range 4)
+DATE=${DATE#p}
+DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
+INSTALLER=${PN}-${DATE}-installer.run
+
+DESCRIPTION="PathScale EKOPath Compiler Suite"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
+
+LICENSE="all-rights-reserved"
+SLOT="${MY_PV}"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="!!app-arch/rpm"
+RDEPEND="!dev-lang/ekopath:0/${MY_PV}"
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="opt/${MY_P}/*"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
+ chmod +x "${S}/${INSTALLER}" || die
+}
+
+src_install() {
+ # EI_PAX marking is obsolete and PT_PAX breaks the binary.
+ # We must use XT_PAX to run the installer.
+ if [[ ${PAX_MARKINGS} == "XT" ]]; then
+ pax-mark m "${INSTALLER}"
+ fi
+
+ ./"${INSTALLER}" \
+ --prefix "${ED%/}/opt/${MY_P}" \
+ --mode unattended || die
+
+ if [[ ! -d ${ED%/}/opt/${MY_P}/lib/${MY_PV} ]]; then
+ local guess
+ cd "${ED%/}/opt/${MY_P}/lib" && guess=( * )
+
+ if [[ ${guess[@]} ]]; then
+ die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
+ else
+ die "No libdir installed"
+ fi
+ fi
+ [[ -x ${ED%}/opt/${MY_P}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
+
+ rm -r "${ED}/opt/${MY_P}"/uninstall* || die
+}
diff --git a/dev-lang/ekopath/ekopath-6.0.779_p20160428-r100.ebuild b/dev-lang/ekopath/ekopath-6.0.779_p20160428-r100.ebuild
new file mode 100644
index 000000000000..3b7217706e58
--- /dev/null
+++ b/dev-lang/ekopath/ekopath-6.0.779_p20160428-r100.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils versionator
+
+MY_PV=$(get_version_component_range 1-3)
+MY_P=${PN}-${MY_PV}
+DATE=$(get_version_component_range 4)
+DATE=${DATE#p}
+DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
+INSTALLER=${PN}-${DATE}-installer.run
+
+DESCRIPTION="PathScale EKOPath Compiler Suite"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
+
+LICENSE="all-rights-reserved"
+SLOT="0/${MY_PV}"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="!!app-arch/rpm"
+RDEPEND="!dev-lang/ekopath:${MY_PV}"
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="opt/${MY_P}/*"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
+ chmod +x "${S}/${INSTALLER}" || die
+}
+
+src_configure() {
+ cat > 99${PN} <<-EOF || die
+ PATH=${EROOT%/}/opt/${PN}/bin
+ ROOTPATH=${EROOT%/}/opt/${PN}/bin
+ LDPATH=${EROOT%/}/opt/${PN}/lib:${EROOT%/}/opt/${PN}/lib/${MY_PV}/x8664/64
+ MANPATH=${EROOT%/}/opt/${PN}/docs/man
+ EOF
+}
+
+src_install() {
+ # EI_PAX marking is obsolete and PT_PAX breaks the binary.
+ # We must use XT_PAX to run the installer.
+ if [[ ${PAX_MARKINGS} == "XT" ]]; then
+ pax-mark m "${INSTALLER}"
+ fi
+
+ ./"${INSTALLER}" \
+ --prefix "${ED%/}/opt/${MY_P}" \
+ --mode unattended || die
+
+ if [[ ! -d ${ED%/}/opt/${MY_P}/lib/${MY_PV} ]]; then
+ local guess
+ cd "${ED%/}/opt/${MY_P}/lib" && guess=( * )
+
+ if [[ ${guess[@]} ]]; then
+ die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
+ else
+ die "No libdir installed"
+ fi
+ fi
+ [[ -x ${ED%}/opt/${MY_P}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
+
+ rm -r "${ED}/opt/${MY_P}"/uninstall* || die
+ dosym ${MY_P} /opt/${PN}
+ doenvd 99${PN}
+}
diff --git a/dev-lang/ekopath/ekopath-6.0.855_p20160629-r1.ebuild b/dev-lang/ekopath/ekopath-6.0.855_p20160629-r1.ebuild
new file mode 100644
index 000000000000..48ab3c05679d
--- /dev/null
+++ b/dev-lang/ekopath/ekopath-6.0.855_p20160629-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils versionator
+
+MY_PV=$(get_version_component_range 1-3)
+MY_P=${PN}-${MY_PV}
+DATE=$(get_version_component_range 4)
+DATE=${DATE#p}
+DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
+INSTALLER=${PN}-${DATE}-installer.run
+
+DESCRIPTION="PathScale EKOPath Compiler Suite"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
+
+LICENSE="all-rights-reserved"
+SLOT="${MY_PV}"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="!!app-arch/rpm"
+RDEPEND="!dev-lang/ekopath:0/${MY_PV}"
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="opt/${MY_P}/*"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
+ chmod +x "${S}/${INSTALLER}" || die
+}
+
+src_install() {
+ # EI_PAX marking is obsolete and PT_PAX breaks the binary.
+ # We must use XT_PAX to run the installer.
+ if [[ ${PAX_MARKINGS} == "XT" ]]; then
+ pax-mark m "${INSTALLER}"
+ fi
+
+ ./"${INSTALLER}" \
+ --prefix "${ED%/}/opt/${MY_P}" \
+ --mode unattended || die
+
+ if [[ ! -d ${ED%/}/opt/${MY_P}/lib/${MY_PV} ]]; then
+ local guess
+ cd "${ED%/}/opt/${MY_P}/lib" && guess=( * )
+
+ if [[ ${guess[@]} ]]; then
+ die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
+ else
+ die "No libdir installed"
+ fi
+ fi
+ [[ -x ${ED%}/opt/${MY_P}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
+
+ rm -r "${ED}/opt/${MY_P}"/uninstall* || die
+}
diff --git a/dev-lang/ekopath/ekopath-6.0.855_p20160629-r100.ebuild b/dev-lang/ekopath/ekopath-6.0.855_p20160629-r100.ebuild
new file mode 100644
index 000000000000..3b7217706e58
--- /dev/null
+++ b/dev-lang/ekopath/ekopath-6.0.855_p20160629-r100.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils versionator
+
+MY_PV=$(get_version_component_range 1-3)
+MY_P=${PN}-${MY_PV}
+DATE=$(get_version_component_range 4)
+DATE=${DATE#p}
+DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
+INSTALLER=${PN}-${DATE}-installer.run
+
+DESCRIPTION="PathScale EKOPath Compiler Suite"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
+
+LICENSE="all-rights-reserved"
+SLOT="0/${MY_PV}"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="!!app-arch/rpm"
+RDEPEND="!dev-lang/ekopath:${MY_PV}"
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="opt/${MY_P}/*"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
+ chmod +x "${S}/${INSTALLER}" || die
+}
+
+src_configure() {
+ cat > 99${PN} <<-EOF || die
+ PATH=${EROOT%/}/opt/${PN}/bin
+ ROOTPATH=${EROOT%/}/opt/${PN}/bin
+ LDPATH=${EROOT%/}/opt/${PN}/lib:${EROOT%/}/opt/${PN}/lib/${MY_PV}/x8664/64
+ MANPATH=${EROOT%/}/opt/${PN}/docs/man
+ EOF
+}
+
+src_install() {
+ # EI_PAX marking is obsolete and PT_PAX breaks the binary.
+ # We must use XT_PAX to run the installer.
+ if [[ ${PAX_MARKINGS} == "XT" ]]; then
+ pax-mark m "${INSTALLER}"
+ fi
+
+ ./"${INSTALLER}" \
+ --prefix "${ED%/}/opt/${MY_P}" \
+ --mode unattended || die
+
+ if [[ ! -d ${ED%/}/opt/${MY_P}/lib/${MY_PV} ]]; then
+ local guess
+ cd "${ED%/}/opt/${MY_P}/lib" && guess=( * )
+
+ if [[ ${guess[@]} ]]; then
+ die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
+ else
+ die "No libdir installed"
+ fi
+ fi
+ [[ -x ${ED%}/opt/${MY_P}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
+
+ rm -r "${ED}/opt/${MY_P}"/uninstall* || die
+ dosym ${MY_P} /opt/${PN}
+ doenvd 99${PN}
+}
diff --git a/dev-lang/ekopath/ekopath-6.0.967_p20161020-r1.ebuild b/dev-lang/ekopath/ekopath-6.0.967_p20161020-r1.ebuild
new file mode 100644
index 000000000000..bdae51d041b5
--- /dev/null
+++ b/dev-lang/ekopath/ekopath-6.0.967_p20161020-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils versionator
+
+MY_PV=$(get_version_component_range 1-3)
+MY_P=${PN}-${MY_PV}
+DATE=$(get_version_component_range 4)
+DATE=${DATE#p}
+DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
+INSTALLER=${PN}-${DATE}-installer.run
+
+DESCRIPTION="PathScale EKOPath Compiler Suite"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
+
+LICENSE="all-rights-reserved"
+SLOT="${MY_PV}"
+KEYWORDS="~amd64"
+IUSE="mpich openmpi openmpi2"
+
+DEPEND="!!app-arch/rpm"
+RDEPEND="!dev-lang/ekopath:0/${MY_PV}"
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="opt/${MY_P}/*"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
+ chmod +x "${S}/${INSTALLER}" || die
+}
+
+src_install() {
+ # EI_PAX marking is obsolete and PT_PAX breaks the binary.
+ # We must use XT_PAX to run the installer.
+ if [[ ${PAX_MARKINGS} == "XT" ]]; then
+ pax-mark m "${INSTALLER}"
+ fi
+
+ ./"${INSTALLER}" \
+ --prefix "${ED%/}/opt/${MY_P}" \
+ --mode unattended || die
+
+ if [[ ! -d ${ED%/}/opt/${MY_P}/lib/${MY_PV} ]]; then
+ local guess
+ cd "${ED%/}/opt/${MY_P}/lib" && guess=( * )
+
+ if [[ ${guess[@]} ]]; then
+ die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
+ else
+ die "No libdir installed"
+ fi
+ fi
+ [[ -x ${ED%}/opt/${MY_P}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
+
+ rm -r "${ED}/opt/${MY_P}"/uninstall* || die
+
+ # cleanup
+ if ! use mpich; then
+ rm -r "${ED}/opt/${MY_P}/mpi/mpich" || die
+ fi
+ if ! use openmpi; then
+ rm -r "${ED}/opt/${MY_P}/mpi"/openmpi-1.* || die
+ fi
+ if ! use openmpi2; then
+ rm -r "${ED}/opt/${MY_P}/mpi"/openmpi-2.* || die
+ fi
+}
diff --git a/dev-lang/ekopath/ekopath-6.0.967_p20161020-r100.ebuild b/dev-lang/ekopath/ekopath-6.0.967_p20161020-r100.ebuild
new file mode 100644
index 000000000000..24410725ed47
--- /dev/null
+++ b/dev-lang/ekopath/ekopath-6.0.967_p20161020-r100.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils versionator
+
+MY_PV=$(get_version_component_range 1-3)
+MY_P=${PN}-${MY_PV}
+DATE=$(get_version_component_range 4)
+DATE=${DATE#p}
+DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
+INSTALLER=${PN}-${DATE}-installer.run
+
+DESCRIPTION="PathScale EKOPath Compiler Suite"
+HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
+SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
+
+LICENSE="all-rights-reserved"
+SLOT="0/${MY_PV}"
+KEYWORDS="~amd64"
+IUSE="mpich openmpi openmpi2"
+
+DEPEND="!!app-arch/rpm"
+RDEPEND="!dev-lang/ekopath:${MY_PV}"
+
+RESTRICT="bindist mirror"
+
+QA_PREBUILT="opt/${MY_P}/*"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
+ chmod +x "${S}/${INSTALLER}" || die
+}
+
+src_configure() {
+ cat > 99${PN} <<-EOF || die
+ PATH=${EROOT%/}/opt/${PN}/bin
+ ROOTPATH=${EROOT%/}/opt/${PN}/bin
+ LDPATH=${EROOT%/}/opt/${PN}/lib:${EROOT%/}/opt/${PN}/lib/${MY_PV}/x8664/64
+ MANPATH=${EROOT%/}/opt/${PN}/docs/man
+ EOF
+}
+
+src_install() {
+ # EI_PAX marking is obsolete and PT_PAX breaks the binary.
+ # We must use XT_PAX to run the installer.
+ if [[ ${PAX_MARKINGS} == "XT" ]]; then
+ pax-mark m "${INSTALLER}"
+ fi
+
+ ./"${INSTALLER}" \
+ --prefix "${ED%/}/opt/${MY_P}" \
+ --mode unattended || die
+
+ if [[ ! -d ${ED%/}/opt/${MY_P}/lib/${MY_PV} ]]; then
+ local guess
+ cd "${ED%/}/opt/${MY_P}/lib" && guess=( * )
+
+ if [[ ${guess[@]} ]]; then
+ die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
+ else
+ die "No libdir installed"
+ fi
+ fi
+ [[ -x ${ED%}/opt/${MY_P}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
+
+ rm -r "${ED}/opt/${MY_P}"/uninstall* || die
+ dosym ${MY_P} /opt/${PN}
+ doenvd 99${PN}
+
+ # cleanup
+ if ! use mpich; then
+ rm -r "${ED}/opt/${MY_P}/mpi/mpich" || die
+ fi
+ if ! use openmpi; then
+ rm -r "${ED}/opt/${MY_P}/mpi"/openmpi-1.* || die
+ fi
+ if ! use openmpi2; then
+ rm -r "${ED}/opt/${MY_P}/mpi"/openmpi-2.* || die
+ fi
+}
diff --git a/dev-lang/ekopath/metadata.xml b/dev-lang/ekopath/metadata.xml
new file mode 100644
index 000000000000..6e99353915e5
--- /dev/null
+++ b/dev-lang/ekopath/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>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ <description>Co-maintainer</description>
+</maintainer>
+<maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+</maintainer>
+<use>
+ <flag name='openmpi'>Include pre-built OpenMPI 1.x libraries</flag>
+ <flag name='openmpi2'>Include pre-built OpenMPI 2.x libraries</flag>
+ <flag name='mpich'>Include pre-built MPICH libraries</flag>
+</use>
+<longdescription>
+ The PathScale EKOPath Compiler Suite offers programmers a rich set of tools and
+ one of the world's most sophisticated optimization infrastructures to maximize
+ program performance on any Intel 64 or AMD64 platform supporting Intel MMX,
+ SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AMD SSE4A and AVX.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/elixir/Manifest b/dev-lang/elixir/Manifest
new file mode 100644
index 000000000000..a97e3f04a03c
--- /dev/null
+++ b/dev-lang/elixir/Manifest
@@ -0,0 +1,13 @@
+DIST elixir-1.3.0.tar.gz 1744231 SHA256 66cb8448dd60397cad11ba554c2613f732192c9026468cff55e8347a5ae4004a SHA512 cde88fc780b5e90955459e9da9ba37f3cd442b7015e3432daf0551778df8d9aeeefe4d6c238144d2f0ca16b166d305f299a906155a7991b3fdeee1d337001bab WHIRLPOOL 4c4645a2da46c6900cb2a4bcdbb2c994f828294d618f6108a3f854feb04fdd41b1856068a3796ff41a5128d07a71651db67c688dd2b5194ba538cadce47d0b97
+DIST elixir-1.4.4.tar.gz 1828694 SHA256 2d9d5faee079949f780c8f6a1ccba015d64ecf859ed87384ae4239d69be60142 SHA512 e339a27e1b31c7783077fc336703c30066d18af990c26741508caa16f15d33d71c56ca7884ed27d046b310db5e051adc428fc51535abecb06992225c6d2d274d WHIRLPOOL 71564643d228d870b76d8e556b01253f8c30193f6d222427ac8e7aa04caa00f2cf24e8792b4a1e75afd1a1ef365afed5fd3f943313ed0cc66a97c065a4760d16
+DIST elixir-1.4.5.tar.gz 1829098 SHA256 bef1a0ea7a36539eed4b104ec26a82e46940959345ed66509ec6cc3d987bada0 SHA512 3fe659a739ded54bfc7d05a96acf3061c860e44cfd7700651d138c7e21997c5703cc62d2bd3b7a258b27064bb222dfdcdc01e4d017451f522f9658a039073611 WHIRLPOOL c9e59b2de0756aecab11c480e60278ba8d87ae1bec74e8db47b5780a0c417858596c00c7f790a2bfa4c15f4d53e76918660e976b23a320a512a6b2f6652b295f
+DIST elixir-1.5.0.tar.gz 1944255 SHA256 0857550097d0bf078a218f7663372f5c9a899847d73399f05ca9fa9087edf462 SHA512 8323eacf14cae4c01566b2958642f16b80b3a83a97bc870b0fb464c5880c5d04f05fb5cdd3470d6c3cdc3890d17ca67d17face9d6ef23c3e7d608cb743e67c49 WHIRLPOOL 5ea9cab89f08354bb29acdfd71e8a606194be48ebaa852b7d35b99adbe69bd47da53d78e9ab6d70dd41e175c49a7d80c612187b732dd23f6bb92334bfe60307f
+DIST elixir-1.5.1.tar.gz 1945765 SHA256 9a903dc71800c6ce8f4f4b84a1e4849e3433e68243958fd6413a144857b61f6a SHA512 92895e5a688b5a906656c0fe974ca28a25b35c7ea9cdb3739290cf8f6ce5e4bdc61ca96309e8d87d6d73607f8f5eb22ce4385da10954582136a02f4b15b3cbc1 WHIRLPOOL d7d587033cf32ee8ea7167cbad7c3482cc843a7ea3a7b353eb144f8162d24569a327a24d49b0196e913e2d276993f7a5d794e6d520f363d7a1684d07447b8949
+EBUILD elixir-1.3.0-r1.ebuild 610 SHA256 12b8b8269d46ca4c34bf0c06d88c7ae7211e5ecb8899b6f032fc4b59acd4c9ca SHA512 17c8068a7ac20a001171041fff35ebfe2b2b3491df2cae76d770247dc9dff2ca43b7008dbacca4736105f032cfae1f138ccc2f71e40a18f034ba16bd835d769e WHIRLPOOL b11836d8779664053604a897945d5f25b1698b0158e7e765c313decd74fcd198658eafdce991cf2b264bd46a7dda9ffc88bbab0a66e43fd438d64cc49b61a231
+EBUILD elixir-1.4.4.ebuild 613 SHA256 e0fec370d457726cb84996bce79309d9ce822a8c3066ca63a03f6ddf20653ad5 SHA512 2b1c5a2238279be2ddf24cb2c9b74be9bb075c2d1da6bbb1ca7ac2c8c996057b89ea92611856c0e68fcead4310d1eb67ae04b4cbac53a68fed90fe11ab02bf76 WHIRLPOOL 6e5e105edeff6d712a5abc2f595ac52abb6c917dac26dd5224e53064c5a16bede43c70f4f572925740d6812cda2e3295a7f83da25e9f55a0a9e9ec1fbbdcbab8
+EBUILD elixir-1.4.5.ebuild 610 SHA256 2619980708dbbe918407e6d6790ea20e3ada2dfef16e1b8eda9c135c14f42d76 SHA512 a05d132efcde374b0772b17a92cd13ffb78ab4a8d72c4b33c9cee3ab1312df0d1c7621627042895594ab563f75161f55f0382a348867254be4b3706440f77c17 WHIRLPOOL 6445235a95c70c39b7aee383a900c832d61e9505950fd7ced1507081664aeb61aeeb703b0ba59797cec53e68ecceaacad55ea46117396f07015c542ebcca06d1
+EBUILD elixir-1.5.0.ebuild 674 SHA256 4b0dac8b48415518ea3868c13b2d3cb91c1be381f3d6e0b199ce0b18d9de09ea SHA512 626d46ea82a7062e754923847bed2512ac86cfd0cc50fc825c3a4b307055fe027b172353bd319965a397621c960d297c806bb7cd99dcd45a874e54cbd0eb37a9 WHIRLPOOL 436f1f7c95966ba0158f48c3a2d434f653b7b20a96cdee11e0d8620ecb6ea6ce728027ddc75ace62c6bb171f3e1fc23db879bdb7f81ca4799951cd6089720e08
+EBUILD elixir-1.5.1.ebuild 650 SHA256 d38f343e9ec1082c72d5fc6f18a4f2e96e3f635e1f5ba4cd178dc0053a3208be SHA512 56ce6f6ac4e9ead557327f04e60bc18508135855e81e4cb3ea7144653ea9b8027680f5d4ac396dd93f7a905f905e58ff4c51d9640c7860420bfc2a1d7c129138 WHIRLPOOL 0762eeca1121201447aa5a92a65b6c3c03ae90c9b50c1dd307fa4b8131b8bd80bcfefae5bb00beba721fd559b59d8a80543696e8de0863c0e85c3c8ba6b4f843
+MISC ChangeLog 7068 SHA256 84686d1641a91c9f08c67873bcbe3967237228c9862f7fdf851d4f8bdfe7463a SHA512 0aed5572bbf0dca73f6a4c9eccace406429f861611d910f90d38c74072b98904b03a9b3a932a59aee215e456d828b1d0fd5439c2169dc8b4e8143852a97221ed WHIRLPOOL 03e5d51e94800827417e13c6635fc58cb7bdddcf3f2228d565ed9ed728d66826d64092d890bb5ae89f002a60d301f96f55feda26b07ba4c345f4c9e551327458
+MISC ChangeLog-2015 3828 SHA256 005405612cc57d68afa6a0c08197634df436fb599ade0cfec4dec0a3b5db52e3 SHA512 87d65a936e1a371328eb03d104864156638bbdd0ca1d911849e1e31506a37c3723ae07d07ab59680a311f1350ddf4f243c81a4d87ab3cb358ae013da3b71dcba WHIRLPOOL 91a56e0fd7437cbd3ad187238572b651de6618c16c59efa4194affcc46bc6fd6270814eff5336cfe60f13c41cd36d5084ede20fe6eeede413b50963bbb4d5f75
+MISC metadata.xml 790 SHA256 1d0ffd3dabb38d0533d55274495d49522155b0fcf03d07a24f79167ec744aa1a SHA512 e96737086e81fac63d37ec20b0f932b538f7548984e8378c2b1746c173afc84644f35215b75ab39ac24338fe9dacda94614c5f50291b483d38133bb1cf46e970 WHIRLPOOL 23b2252514f8ec6c59e3de570e7bfd61787fa1a7910e52c0dcd396bfdc2c1439dd800df881057d0f6b56a20c1ce239ffa2261405161f51db03987a1debf24e54
diff --git a/dev-lang/elixir/elixir-1.3.0-r1.ebuild b/dev-lang/elixir/elixir-1.3.0-r1.ebuild
new file mode 100644
index 000000000000..0f3a94fcf73e
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.3.0-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="https://elixir-lang.org"
+SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 ErlPL-1.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ia64 ppc ~sparc x86"
+IUSE=""
+
+DEPEND="=dev-lang/erlang-18*[ssl]"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CODE_OF_CONDUCT.md
+}
diff --git a/dev-lang/elixir/elixir-1.4.4.ebuild b/dev-lang/elixir/elixir-1.4.4.ebuild
new file mode 100644
index 000000000000..e3d2d5c993eb
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.4.4.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="https://elixir-lang.org"
+SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 ErlPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-18[ssl]"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CODE_OF_CONDUCT.md
+}
diff --git a/dev-lang/elixir/elixir-1.4.5.ebuild b/dev-lang/elixir/elixir-1.4.5.ebuild
new file mode 100644
index 000000000000..a00a4c6afd24
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.4.5.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="https://elixir-lang.org"
+SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 ErlPL-1.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ia64 ppc ~sparc x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-18[ssl]"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CODE_OF_CONDUCT.md
+}
diff --git a/dev-lang/elixir/elixir-1.5.0.ebuild b/dev-lang/elixir/elixir-1.5.0.ebuild
new file mode 100644
index 000000000000..4888caa3ce69
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.5.0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="https://elixir-lang.org"
+SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 ErlPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-18[ssl]"
+RDEPEND="${DEPEND}"
+
+RESTRICT=test # a few tests fail. erlang version dependent?
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CODE_OF_CONDUCT.md
+}
diff --git a/dev-lang/elixir/elixir-1.5.1.ebuild b/dev-lang/elixir/elixir-1.5.1.ebuild
new file mode 100644
index 000000000000..a08ea4e9f6a9
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.5.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="https://elixir-lang.org"
+SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 ErlPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/erlang-18[ssl]"
+RDEPEND="${DEPEND}"
+
+RESTRICT=test # needs debug symbols
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="/usr" install
+ dodoc README.md CHANGELOG.md CODE_OF_CONDUCT.md
+}
diff --git a/dev-lang/elixir/metadata.xml b/dev-lang/elixir/metadata.xml
new file mode 100644
index 000000000000..9dafb5f88ae3
--- /dev/null
+++ b/dev-lang/elixir/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>styx.mp@gmail.com</email>
+ <name>Mikhail</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>
+ https://github.com/elixir-lang/elixir/issues
+ </bugs-to>
+ <changelog>
+ https://github.com/elixir-lang/elixir/blob/master/CHANGELOG.md
+ </changelog>
+ <doc lang="en">
+ http://elixir-lang.org/docs.html
+ </doc>
+ <remote-id type="github">
+ elixir-lang/elixir
+ </remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/epic/Manifest b/dev-lang/epic/Manifest
new file mode 100644
index 000000000000..904bc1fcd630
--- /dev/null
+++ b/dev-lang/epic/Manifest
@@ -0,0 +1,6 @@
+AUX epic-0.9.3.3-respect-user-cflags.patch 324 SHA256 8f5c725bac29b6bf3ec0bad7a00ea6d3036a11f4b2fe7f79d3d7f6243173cab4 SHA512 cb0ca719cd357a88aee3f449877b17a831eff064564f2c27cc2254c61bc4cc41dc2e9746d7c88a56bc70b3132534bf74da2d43e79a3f47ad1ae3e9b489248fba WHIRLPOOL d7e24d7fbfc98d82c241ddca10de6f0ab7ceaf982cf9302ad40ec986ae256bcef23649163506672be3414a988b988ee2666f92a1df1f98144a73e6f916cbe7ef
+DIST epic-0.9.3.3.tar.gz 87163 SHA256 559844322f0f3c6d511d70e1a3166175f4aea084ea0e109b161b4d1d4296e82a SHA512 f957eb5402eebad9d52f0d38cf552c00ff5df9caffce97961e761e7c91ed33dee520cb0255f6547db1c05ed6dda7a3e4833d375a5fc0ebe7e94502736a49c566 WHIRLPOOL be19a826d292f490c618659ba8c482cc74cf2239c1585a1d26b62265623858daeb79bdb65b14ede58d0d695a9a0c7f5397d6c3b94c0e5c9326e3b9cc0533096d
+EBUILD epic-0.9.3.3-r1.ebuild 975 SHA256 d41a0821d468a07152e1928d7b5a52683e0b6d2fb834d30250a15dcf2bd68b7e SHA512 4d3c263d8aa543608e932f17f8e5b0ea66c8316e58fe52a43a66c80a6dc2c91d200a537201bb6f733c272b6db649f32331ba8e767dc860fb6f2f836aaedcd38f WHIRLPOOL 8d189f1e8ea3975761ef7e80339beb41dd9dc484682588620ad600fc75e9eed73cd56271907106dae1bd6b0043e467986855230b430a57e8c0d3bf9ec126fa76
+MISC ChangeLog 3460 SHA256 9c6627e1de65a143e6037cf0733307613be63ac434bff6a49742b50d2d7f32b1 SHA512 c3947dcac29678a12f20b3823eca88fa12b30ffbf59c961e13302de313912b62b0ea2a1ab06bc7866815e123225dbfd63f3bfc58696e77119866fe6e902031ab WHIRLPOOL f6edcdffa269b43530c7c1e99454a6fdd3001f3ae430e65a7a9737ce83a6e388d12ea3d5141c5efb671cc074817a161c13e56bca9479d7fd8f945579ea928007
+MISC ChangeLog-2015 1279 SHA256 ef9519a12ff77c7e9fbf564a375c9cbfae66fdfad9acc6d0d9cc119539e5f218 SHA512 547e1d5a083c94129352b55ed12c6d58fe2ac2c0b30c0b2082bc379a1cfe182be7858b88daf2dcbc47111f0b53640d56f4e9f7399b38afdc48fe9ebc7abb8f5a WHIRLPOOL 2b9705b715d70b3148635ea01800b7aa4ff7bf158b98d85a266ff604355c5745247df7e7a4d37813294cc72b80183658d89b85b91c36e04e62a2d7353d083967
+MISC metadata.xml 680 SHA256 6a6f67c8fe5c444c0ed0188eaa294a8ad0edd27418f3ab841bd4f2f5713364af SHA512 076fbcf53fdd99a52631c4671e21a65d7d430a13fb58b50fd193db180afd7987ff0591aff19e0672f2bf31c3e1ee1be8e532daf62093030db1a8d11267a321a5 WHIRLPOOL f8c3869387a85cabeaf990a8c01c13f9aeb6d4d25663ad2e1f214de248bef25264cf5d4efb84986880c4317e50f64c0d837f08fc98fdee2f42a3ccf268873d48
diff --git a/dev-lang/epic/epic-0.9.3.3-r1.ebuild b/dev-lang/epic/epic-0.9.3.3-r1.ebuild
new file mode 100644
index 000000000000..f7458b8b9a84
--- /dev/null
+++ b/dev-lang/epic/epic-0.9.3.3-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# ebuild generated by hackport 0.4.5.9999
+
+CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="Compiler for a simple functional language"
+HOMEPAGE="http://www.dcs.st-and.ac.uk/~eb/epic.php"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-haskell/cabal:=[profile?]
+ dev-haskell/mtl:=[profile?]
+ >=dev-libs/boehm-gc-7.0:0=[threads]
+ dev-libs/gmp:0=
+ >=dev-lang/ghc-7.4.1:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.8.0.4
+ dev-haskell/happy
+"
+# Bug #438422, upstream at https://github.com/edwinb/EpiVM/issues/5.
+PATCHES=("${FILESDIR}"/${PN}-0.9.3.3-respect-user-cflags.patch)
+
+src_prepare() {
+ default
+
+ # to disambiguare with net-irc/epic4, bug #432436
+ cabal_chdeps \
+ 'Executable epic' 'Executable epic-epivm'
+}
diff --git a/dev-lang/epic/files/epic-0.9.3.3-respect-user-cflags.patch b/dev-lang/epic/files/epic-0.9.3.3-respect-user-cflags.patch
new file mode 100644
index 000000000000..eedfd253afec
--- /dev/null
+++ b/dev-lang/epic/files/epic-0.9.3.3-respect-user-cflags.patch
@@ -0,0 +1,13 @@
+diff --git a/evm/Makefile b/evm/Makefile
+index 7e6c5ff..f40f1a4 100644
+--- a/evm/Makefile
++++ b/evm/Makefile
+@@ -1,6 +1,7 @@
+ CC = gcc
+ #CFLAGS = -Wall -g -DUSE_BOEHM
+-CFLAGS = -Wall -O3 -DUSE_BOEHM
++CFLAGS ?= -Wall -O3
++CFLAGS += -DUSE_BOEHM
+ OBJS = closure.o stdfuns.o emalloc.o sparks.o
+ INSTALLDIR = ${PREFIX}/lib/evm
+
diff --git a/dev-lang/epic/metadata.xml b/dev-lang/epic/metadata.xml
new file mode 100644
index 000000000000..cd7cd0be0f78
--- /dev/null
+++ b/dev-lang/epic/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>haskell@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ Epic is a simple functional language which compiles to
+ reasonably efficient C code, using the Boehm-Demers-Weiser
+ garbage collector (&lt;http://www.hpl.hp.com/personal/Hans_Boehm/gc/&gt;).
+ It is intended as a compiler back end, and is currently used
+ as a back end for Epigram (&lt;http://www.e-pig.org&gt;) and Idris
+ (&lt;http://idris-lang.org/&gt;).
+ It can be invoked either as a library or an application.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest
new file mode 100644
index 000000000000..30ea811eecd5
--- /dev/null
+++ b/dev-lang/erlang/Manifest
@@ -0,0 +1,23 @@
+AUX 18.2.1-wx3.0.patch 3849 SHA256 b0e1d2ed833feb0f308060c2a451fcd58fceb68c9c63432fab38ae4cd0264ee2 SHA512 33d8b67542266ae224ffb2bc86fbf36fff6737252810cfb445662ecc418fb30b0b00cbddd2f706ca836f1a8809c505e61edfe221d29dbe91c78c371bff6cec15 WHIRLPOOL 114786cd2505aa37eabe2ad1821e8ba88df09c8bcde17bd6d6fc966def48b8c4c688c6600020017a993ce6aa864172ada6ae7ba3fb953a6959bcd2fee29dc272
+AUX 50erlang-gentoo.el 134 SHA256 97e1da82cae31a554134d7370739520e4c67b2544e5a13f887651a62e710b4d4 SHA512 7a862e0ef1e96e88a484e80aeb92eb4465c7e8661efb0291c28abc13225eb3aa69442fe29417f5ad0d264e54399d645d9cd4713bc9869b48e87a91e50b9b2473 WHIRLPOOL 6080f0f76c90f2e5f4577e8a6fc6dd046fc671078eda215c5bd33138aad61c2f2dfc585372966b65fcca24a46df0921a3fd2c4af02c68ef02f2fff443336c702
+AUX epmd.init 407 SHA256 fdd497f5bd350368286c07c291b9144a174cec0712e9622713ccb664dcb57f2a SHA512 9a9d1c0d512e31254170a601edb3a023c1f0abfa9c02656ea86cc04f38bfd4b3bffa131cef2c20ee81d3f62073036b0dcaa399736be7d413fcfa48e4001a5304 WHIRLPOOL 671f673712abbf91171006ddb12f9eb68bc0b8569f4c472a6aee0c837ac790deb4df6f04914e9a2c778fcf2b69188b793f6083aeebdf549c7dc70ea89dca4f7c
+AUX epmd.service 138 SHA256 689a50cfe05cf644f62b2308920f8ed7f602e1de94d53a67f5fd37eb0249ef17 SHA512 405740f8f9cd55d4ecd7420748399ab3f374b7cb09e53605f44ba49d0af86b70e4a1baf1fde05a703fb90c8a83dbcdd5cfbbf09185e9d7b58ff9612aefc2dd28 WHIRLPOOL 7d4eb5c5290c8026bdc915210b2273cffd429ea1162cc0ad77f67661a2a660794b9518290c2437cb999abef8051275d6fd30b3dae8b98cf52c65f5c210d3c61b
+DIST otp_doc_html_18.3.tar.gz 34285271 SHA256 8fd6980fd05367735779a487df107ace7c53733f52fbe56de7ca7844a355676f SHA512 0ac429f67ca9ae7f235cda72eb0f4e5b0b43ae90b70c706aeea08be0ad88968677ccc80eb1ba006e90c9f024de586ffd91741d4cef4d614d1dfac51b407d2659 WHIRLPOOL 7d64c2ec433b4bc2da4c56290ad6d21b85d15f72fe9b78654955d27e65b26e1b929d0c9b7d5f60c25c1f16db8d22e36c2ad6ca2a75044707ccd1eea1197fa15d
+DIST otp_doc_html_19.1.tar.gz 34624316 SHA256 76c89aee1ac69b5107114b0065189101e3f42d53e929d8ef8f08b5c586f15930 SHA512 2c6448af0be4bf35427950aca82eac3aac7554575ba07a8ba8942c27e1eb668461fde00604c3be28fbaca8a1e28ee4861608e33a9c79bc951bb695f99b1c1ac8 WHIRLPOOL 5c344246b32f21abc5ad8403c136263a6f9f5f2664b8027ad7f574e1b7cfa9b127f7863547550114b889daba363c19936cf7a0199a0bf5b4da8ac23c02dd24d0
+DIST otp_doc_html_19.3.tar.gz 35818689 SHA256 dc3e3a82d1aba7f0deac1ddb81b7d6f8dee9a75e1d42b90c677a2b645f19a00c SHA512 a70d2c470fa1dc0594b20af73ba36ccb7702b4192960e6fc0296738175215a43450f9bf558637f7f5e40757f7a15dcf4f1ae8a88515e211cd3c0fae45c5e1858 WHIRLPOOL 468cd8b9761fbcaa8892405f451c53bf1014067022966384db96520855366afcfb09aa9ddf1390931da2288c0620b909588637c9c4501f753413752b293a9cbe
+DIST otp_doc_html_20.0.tar.gz 33948386 SHA256 1ab25110b148ce263d6e68cd5a3b912299b6066cfcd9d2fce416a4e9b7d2543a SHA512 a183943a3a2636489cfdf3e7ede8dc4233db84a271b4b8bd655b57b4abac597b797f035d77087be72e823638898d202e08c53decb565fc10f2e444dcc6da8628 WHIRLPOOL 953bf75da7f6aa46e26e4fb6f12d22834d2a41a43e5449e3bbefbe7359f67b7a0affbb0dd6dbfebdecae9294f080a69c0637741ddcf5dbcd0db488ab5a6ddd1a
+DIST otp_doc_man_18.3.tar.gz 1395166 SHA256 978be100e9016874921b3ad1a65ee46b7b6a1e597b8db2ec4b5ef436d4c9ecc2 SHA512 d45d72d7ee7492e081dd5fac1a4d1cea93fe5f5287900be13c92e1c1802f7ec77573eeb4d271497154b9e0723c393700f35982ceedbe29be6cb759a0ebe83325 WHIRLPOOL 03b57a87573630a2826dd5e9a597ab0bb67daa73e4b2b733982b6ce4a3cf6a32c5ad17cb3ba3fc0a29248c867b1ba303098c7f61c0cfe42636621aa8a370790f
+DIST otp_doc_man_19.1.tar.gz 1405580 SHA256 7200e9e5b3a229a6b3838046e1b3e64afc869265539d49d0e4853212f19c0c79 SHA512 4ee35feeff70419ff5500e00dc17e34fdea8be21342d41cf1e255b84a1826b51057046be543ee1052153ae8c8cd215f4720cecae7d9fe1576cbd681dcf4b2334 WHIRLPOOL e94333be9d1d9239d1dc6e9bbcc6930b148eda8d8a73e3d21896e498c331c062ea1541d8fa03a2d0dd6f21510874f5aa6062b22a3738c85d1b18a30b09fb5482
+DIST otp_doc_man_19.3.tar.gz 1410781 SHA256 f8192ffdd7367083c055695eeddf198155da43dcc221aed1d870d1e3871dd95c SHA512 675a0d2d5972660a60de17c832e630f646f942d23815427eb0dec3a5ca1c44ed8fe35a9c30f8b608dedfd10f6fb1e47e958ea6e32e296b6f6809b1844b4da9a1 WHIRLPOOL b7fb4954a46670c672eec02df8713fe68eeb4c15fa8c56e37c802f384bafeb77d88b257ebd1f8f7a0e35e3020853211b9f46ecb01fbe16c19254a3cd992c0fc1
+DIST otp_doc_man_20.0.tar.gz 1430939 SHA256 b7f1542a94a170f8791f5d80a85706f9e8838924ea65d4301032d0c0cfb845cc SHA512 8f3c9b39c5574c239fe4f8d220884667d9d8b8231e923da8caebedc2cfd4db61a3b71a45788c3d63ae4cecc11884df9143e164c544356145977010f31c388e99 WHIRLPOOL 16b1c1448cdd3a35b340f66131a41af88e679e2e5e5383f5586f4cd386462f4a306512a068bbac8020209d6f72ef2ac57db07e4075b1d48bd0dcc0b3dfd9657a
+DIST otp_src_18.3.tar.gz 68292101 SHA256 fdab8129a1cb935db09f1832e3a7d511a4aeb2b9bb3602ca6a7ccb9730d5c9c3 SHA512 f4a69bb14743d9f913d7060cfb6426f7c54693d07ed439506ede5160a0ba5a79a81cf08a56aaa02c68b3377cd22fed66a0fbeb216378330d7ad5c6348ed82014 WHIRLPOOL 493fe8f803194647ab0c113d8f67f5f97636321618296969d9da0396cc9b083b6deffd42638fe3e3eb0b63c4ff996fb4b2c4559c6039add94f7dad62205b815b
+DIST otp_src_19.1.tar.gz 68103074 SHA256 fed4cbbc1ee5cc8efc2b8f14c3db97bfde1de967703f5f9a95f8ab6852737e23 SHA512 bd1c243393c867c91768367613aedb40d56889add149390c81f22e022e76b716d6e9a4d5db7e6477ceb1216c26c18c962abdfd8215a87420758f5ef2063b9714 WHIRLPOOL 3422ad4ab48916f79bcfd2b4550059f88e4e55340a9eb298a9039f07f899e6430eb2fd346bf52931acc2a03e86f3fc5571e9e577fce83bd2040c6cb37fb5348f
+DIST otp_src_19.3.tar.gz 68510871 SHA256 fe4a00651db39b8542b04530a48d24b2f2e7e0b77cbe93d728c9f05325bdfe83 SHA512 6920eab6e1681a76ab44bdd0eeb9b012e601191f91ca06edf1f63ba2e261c555d6f8dddf7025b2e9c3c6459bd63ff78659010ec33967fb1952840fb451ec2de6 WHIRLPOOL ae5b65001872dc855e45a7fbadef278a373935b66819342f4d222055043e1e1ad8974356468e2b1821b36246f5cd621c06cb2e287abab290d6891ea6cd8b698a
+DIST otp_src_20.0.tar.gz 87346046 SHA256 fe80e1e14a2772901be717694bb30ac4e9a07eee0cc7a28988724cbd21476811 SHA512 f73ea74fd149392c72925ea163eafe62ed4470405c61d1c7e557c4f3c94546b4385b073d5d53017f1f5422bdf203ea346fa3d672f49bca4cceec26c51de68951 WHIRLPOOL df800cc5dd9a79a32ebb14376ced74482cbfd85bb4e6d3af7c7b70f32c7080b1c3dee08d9769fa1e296b248c05e3aebb5a3b486f7f6f6f3e1e36486fd3044b56
+EBUILD erlang-18.3.ebuild 4581 SHA256 315eed7d26dda5b5e3e9c0389c6010a63ff494e954026f333fea7ed39a7e38ec SHA512 2b69e383d488e92fb7ba6d7f5dcd3bc520c5130b814e76a3dc90d11fac68c719d497239fe8168c53d6699ad573b5e18e1517161677c97ac54c281ce5a777e7ee WHIRLPOOL 835af1f27e6144d0cebcac90bb2335171beac524d7cf4d63539ee17f4e4d5b9f1e4a164958bd9522465cf6ac826b5e60c3a5d7d6d6a5c33677e1988d6d83e6b9
+EBUILD erlang-19.1.ebuild 4476 SHA256 0bd8e460d5e27d4f6fbf5a2750bcbbe3fb51027e34b6a74892539c767d5e42ea SHA512 55b08029725e407bb7ec9f0d4a9a3d35be9660ec9924a53bdce74359e837801096b26f79e69e5ec6188cbf63f84afc8aba0214c63c59472ea36ccab5d8104ca4 WHIRLPOOL 9a1433747145fb3d3e3d563aec4e7801fd174f4eb26df80b82bbbbf7c88f4dcb5b78a47f6d2b39a2d9a36254ad4e2f25be0554f6dfb5db48c569ec921c658888
+EBUILD erlang-19.3.ebuild 4532 SHA256 3b7175b62a4f081c12922160e03a02ab553d81a64fa3aeedb6c60531a187c9be SHA512 5cd44a540844afe0ec27cf3a6632f12d3ea5bb4a793cb6c148e80a33c9b38fe41022d02ad6a9d74fef2dd2602d5e46789013e899c13b90f96797332badcbef0e WHIRLPOOL dbbf3795beec0d10cd3d13267ab2370a9724b2fb9f70516923184a03e25087a462b09cc35e0f0d171d95e745ee1a8032ef7ecf99553f0ae913a94cf739b79fe5
+EBUILD erlang-20.0.ebuild 4532 SHA256 3b7175b62a4f081c12922160e03a02ab553d81a64fa3aeedb6c60531a187c9be SHA512 5cd44a540844afe0ec27cf3a6632f12d3ea5bb4a793cb6c148e80a33c9b38fe41022d02ad6a9d74fef2dd2602d5e46789013e899c13b90f96797332badcbef0e WHIRLPOOL dbbf3795beec0d10cd3d13267ab2370a9724b2fb9f70516923184a03e25087a462b09cc35e0f0d171d95e745ee1a8032ef7ecf99553f0ae913a94cf739b79fe5
+MISC ChangeLog 6939 SHA256 b53b63e91b559d7d54089facf45163140f393c1eec45f68e49ea2c425dd3e392 SHA512 dcf45a4d02ef5a9705ea67ce7c843adeb5dbef927cb5a03f4143e45ec49f6f302a65ec6050a8bd4ff9850841e1984b47d082f280b06264531058f2abd20481e5 WHIRLPOOL 0106b9728d365040debe47f0237b279492ef606bcfc28aca8795c4a92a15412beacb65c31c23ebae1e307387191ccf89390b6dcc3eef8cd6656879637506554c
+MISC ChangeLog-2015 42199 SHA256 a9beab51a32c9af7307a3954d3ff27d3716ec4809ed8944df3f696110474994f SHA512 bd29ac327f61d9c50230bd83c54c38e3dbe5c520af3a4a21315459927281e99e637cdb6e9e59e167e0da6745917d93320f4e831e893c99d562773225f8ebe8db WHIRLPOOL 5a5861a5200a9c521b6feca878f760d95f12af1d49f1e4ba8a9f331e0fb308ede81f58bd0b01802abef5b697a4e42216ee0fb4aa2e6093a375a3d2df476e6b96
+MISC metadata.xml 758 SHA256 fbfd5a67e7b069b54ac80a82d9250107ad27d150ebc0f38ca4b97936dabc8807 SHA512 b430d16cc736f7a1e8ab9b08c3e79885fe860bce973908a22c5835291582431507746bb5ec3ffc7fe219380e04c5b9b2ac2602997b413548b66785c90c0b71fd WHIRLPOOL ddfdf8b93b774471a15e1770583cb1909db816bee57e886973cd6b6bd2e4852f44f49159ff5ab6fa4164b2a42ea109af48f433a020de22a1a0c574d75831dc13
diff --git a/dev-lang/erlang/erlang-18.3.ebuild b/dev-lang/erlang/erlang-18.3.ebuild
new file mode 100644
index 000000000000..d8c4f8c00680
--- /dev/null
+++ b/dev-lang/erlang/erlang-18.3.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+WX_GTK_VER="3.0"
+
+inherit autotools elisp-common eutils java-pkg-opt-2 multilib systemd versionator wxwidgets
+
+# NOTE: If you need symlinks for binaries please tell maintainers or
+# open up a bug to let it be created.
+
+DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
+HOMEPAGE="http://www.erlang.org/"
+SRC_URI="http://www.erlang.org/download/otp_src_${PV}.tar.gz
+ http://erlang.org/download/otp_doc_man_${PV}.tar.gz
+ doc? ( http://erlang.org/download/otp_doc_html_${PV}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~arm64 ~ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="compat-ethread doc emacs halfword hipe java kpoll libressl odbc smp sctp ssl systemd tk wxwidgets"
+
+RDEPEND="
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.7d:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ emacs? ( virtual/emacs )
+ java? ( >=virtual/jdk-1.2:* )
+ odbc? ( dev-db/unixODBC )
+ systemd? ( sys-apps/systemd )"
+DEPEND="${RDEPEND}
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] virtual/glu )
+ sctp? ( net-misc/lksctp-tools )
+ tk? ( dev-lang/tk )"
+
+S="${WORKDIR}/otp_src_${PV}"
+
+SITEFILE=50${PN}-gentoo.el
+
+pkg_setup() {
+ if use halfword ; then
+ use amd64 || die "halfword support is limited to amd64"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/18.2.1-wx3.0.patch
+
+ use odbc || sed -i 's: odbc : :' lib/Makefile
+
+ # bug 263129, don't ignore LDFLAGS, reported upstream
+ sed -e 's:LDFLAGS = \$(DED_LDFLAGS):LDFLAGS += \$(DED_LDFLAGS):' -i "${S}"/lib/megaco/src/flex/Makefile.in
+
+ # don't ignore LDFLAGS, reported upstream
+ sed -e 's:LDFLAGS = \$(ODBC_LIB) \$(EI_LDFLAGS):LDFLAGS += \$(ODBC_LIB) \$(EI_LDFLAGS):' -i "${S}"/lib/odbc/c_src/Makefile.in
+
+ if ! use wxwidgets; then
+ sed -i 's: wx : :' lib/Makefile
+ rm -rf lib/wx
+ fi
+
+ # Nasty workaround, reported upstream
+ cp "${S}"/lib/configure.in.src "${S}"/lib/configure.in
+
+ # bug 383697
+ sed -i '1i#define OF(x) x' erts/emulator/drivers/common/gzio.c
+
+ cd erts && mv configure.in configure.ac && eautoreconf
+}
+
+src_configure() {
+ use wxwidgets && need-wxwidgets unicode
+ use java || export JAVAC=false
+
+ econf \
+ --enable-threads \
+ $(use_enable sctp) \
+ $(use_enable systemd) \
+ $(use_enable halfword halfword-emulator) \
+ $(use_enable hipe) \
+ $(use_with ssl ssl "${EPREFIX}"/usr) \
+ $(use_enable ssl dynamic-ssl-lib) \
+ $(use_enable kpoll kernel-poll) \
+ $(use_enable smp smp-support) \
+ $(use compat-ethread && echo "--enable-ethread-pre-pentium4-compatibility") \
+ $(use x64-macos && echo "--enable-darwin-64bit")
+}
+
+src_compile() {
+ use java || export JAVAC=false
+ emake
+
+ if use emacs ; then
+ pushd lib/tools/emacs
+ elisp-compile *.el
+ popd
+ fi
+}
+
+extract_version() {
+ sed -n -e "/^$2 = \(.*\)$/s::\1:p" "${S}/$1/vsn.mk"
+}
+
+src_install() {
+ local ERL_LIBDIR=/usr/$(get_libdir)/erlang
+ local ERL_INTERFACE_VER=$(extract_version lib/erl_interface EI_VSN)
+ local ERL_ERTS_VER=$(extract_version erts VSN)
+
+ emake INSTALL_PREFIX="${D}" install
+ dodoc AUTHORS README.md
+
+ dosym "${ERL_LIBDIR}/bin/erl" /usr/bin/erl
+ dosym "${ERL_LIBDIR}/bin/erlc" /usr/bin/erlc
+ dosym "${ERL_LIBDIR}/bin/escript" /usr/bin/escript
+ dosym \
+ "${ERL_LIBDIR}/lib/erl_interface-${ERL_INTERFACE_VER}/bin/erl_call" \
+ /usr/bin/erl_call
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam
+ use smp && dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp
+
+ ## Clean up the no longer needed files
+ rm "${ED}/${ERL_LIBDIR}/Install"
+
+ for i in "${WORKDIR}"/man/man* ; do
+ dodir "${ERL_LIBDIR}/${i##${WORKDIR}}"
+ done
+ for file in "${WORKDIR}"/man/man*/*.[1-9]; do
+ # doman sucks so we can't use it
+ cp ${file} "${ED}/${ERL_LIBDIR}"/man/man${file##*.}/
+ done
+ # extend MANPATH, so the normal man command can find it
+ # see bug 189639
+ dodir /etc/env.d/
+ echo "MANPATH=\"${EPREFIX}${ERL_LIBDIR}/man\"" > "${ED}/etc/env.d/90erlang"
+
+ if use doc ; then
+ dohtml -A README,erl,hrl,c,h,kwc,info -r \
+ "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-*
+ fi
+
+ if use emacs ; then
+ pushd "${S}"
+ elisp-install erlang lib/tools/emacs/*.{el,elc}
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
+ "${FILESDIR}"/${SITEFILE} > "${T}"/${SITEFILE}
+ elisp-site-file-install "${T}"/${SITEFILE}
+ popd
+ fi
+
+ newinitd "${FILESDIR}"/epmd.init epmd
+ systemd_dounit "${FILESDIR}"/epmd.service
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/erlang/erlang-19.1.ebuild b/dev-lang/erlang/erlang-19.1.ebuild
new file mode 100644
index 000000000000..8200f15eccd0
--- /dev/null
+++ b/dev-lang/erlang/erlang-19.1.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+WX_GTK_VER="3.0"
+
+inherit autotools elisp-common eutils java-pkg-opt-2 multilib systemd versionator wxwidgets
+
+# NOTE: If you need symlinks for binaries please tell maintainers or
+# open up a bug to let it be created.
+
+DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
+HOMEPAGE="http://www.erlang.org/"
+SRC_URI="http://www.erlang.org/download/otp_src_${PV}.tar.gz
+ http://erlang.org/download/otp_doc_man_${PV}.tar.gz
+ doc? ( http://erlang.org/download/otp_doc_html_${PV}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~arm64 ~ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="compat-ethread dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk wxwidgets"
+
+RDEPEND="
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.7d:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ emacs? ( virtual/emacs )
+ java? ( >=virtual/jdk-1.2:* )
+ odbc? ( dev-db/unixODBC )
+ systemd? ( sys-apps/systemd )"
+DEPEND="${RDEPEND}
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] virtual/glu )
+ sctp? ( net-misc/lksctp-tools )
+ tk? ( dev-lang/tk )"
+
+S="${WORKDIR}/otp_src_${PV}"
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ epatch "${FILESDIR}"/18.2.1-wx3.0.patch
+
+ use odbc || sed -i 's: odbc : :' lib/Makefile
+
+ # bug 263129, don't ignore LDFLAGS, reported upstream
+ sed -e 's:LDFLAGS = \$(DED_LDFLAGS):LDFLAGS += \$(DED_LDFLAGS):' -i "${S}"/lib/megaco/src/flex/Makefile.in
+
+ # don't ignore LDFLAGS, reported upstream
+ sed -e 's:LDFLAGS = \$(ODBC_LIB) \$(EI_LDFLAGS):LDFLAGS += \$(ODBC_LIB) \$(EI_LDFLAGS):' -i "${S}"/lib/odbc/c_src/Makefile.in
+
+ if ! use wxwidgets; then
+ sed -i 's: wx : :' lib/Makefile
+ rm -rf lib/wx
+ fi
+
+ # Nasty workaround, reported upstream
+ cp "${S}"/lib/configure.in.src "${S}"/lib/configure.in
+
+ # bug 383697
+ sed -i '1i#define OF(x) x' erts/emulator/drivers/common/gzio.c
+
+ cd erts && mv configure.in configure.ac && eautoreconf
+}
+
+src_configure() {
+ use wxwidgets && need-wxwidgets unicode
+ use java || export JAVAC=false
+
+ econf \
+ --enable-threads \
+ $(use_enable sctp) \
+ $(use_enable systemd) \
+ $(use_enable hipe) \
+ $(use_with ssl ssl "${EPREFIX}"/usr) \
+ $(use_enable ssl dynamic-ssl-lib) \
+ $(use_enable kpoll kernel-poll) \
+ $(use_enable smp smp-support) \
+ $(use compat-ethread && echo "--enable-ethread-pre-pentium4-compatibility") \
+ $(use x64-macos && echo "--enable-darwin-64bit") \
+ $(use_enable dirty-schedulers)
+}
+
+src_compile() {
+ use java || export JAVAC=false
+ emake
+
+ if use emacs ; then
+ pushd lib/tools/emacs
+ elisp-compile *.el
+ popd
+ fi
+}
+
+extract_version() {
+ sed -n -e "/^$2 = \(.*\)$/s::\1:p" "${S}/$1/vsn.mk"
+}
+
+src_install() {
+ local ERL_LIBDIR=/usr/$(get_libdir)/erlang
+ local ERL_INTERFACE_VER=$(extract_version lib/erl_interface EI_VSN)
+ local ERL_ERTS_VER=$(extract_version erts VSN)
+
+ emake INSTALL_PREFIX="${D}" install
+ dodoc AUTHORS README.md
+
+ dosym "${ERL_LIBDIR}/bin/erl" /usr/bin/erl
+ dosym "${ERL_LIBDIR}/bin/erlc" /usr/bin/erlc
+ dosym "${ERL_LIBDIR}/bin/escript" /usr/bin/escript
+ dosym \
+ "${ERL_LIBDIR}/lib/erl_interface-${ERL_INTERFACE_VER}/bin/erl_call" \
+ /usr/bin/erl_call
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam
+ use smp && dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp
+
+ ## Clean up the no longer needed files
+ rm "${ED}/${ERL_LIBDIR}/Install"
+
+ for i in "${WORKDIR}"/man/man* ; do
+ dodir "${ERL_LIBDIR}/${i##${WORKDIR}}"
+ done
+ for file in "${WORKDIR}"/man/man*/*.[1-9]; do
+ # doman sucks so we can't use it
+ cp ${file} "${ED}/${ERL_LIBDIR}"/man/man${file##*.}/
+ done
+ # extend MANPATH, so the normal man command can find it
+ # see bug 189639
+ dodir /etc/env.d/
+ echo "MANPATH=\"${EPREFIX}${ERL_LIBDIR}/man\"" > "${ED}/etc/env.d/90erlang"
+
+ if use doc ; then
+ dohtml -A README,erl,hrl,c,h,kwc,info -r \
+ "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-*
+ fi
+
+ if use emacs ; then
+ pushd "${S}"
+ elisp-install erlang lib/tools/emacs/*.{el,elc}
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
+ "${FILESDIR}"/${SITEFILE} > "${T}"/${SITEFILE}
+ elisp-site-file-install "${T}"/${SITEFILE}
+ popd
+ fi
+
+ newinitd "${FILESDIR}"/epmd.init epmd
+ systemd_dounit "${FILESDIR}"/epmd.service
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/erlang/erlang-19.3.ebuild b/dev-lang/erlang/erlang-19.3.ebuild
new file mode 100644
index 000000000000..0e605a39add6
--- /dev/null
+++ b/dev-lang/erlang/erlang-19.3.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+WX_GTK_VER="3.0"
+
+inherit autotools elisp-common eutils java-pkg-opt-2 multilib systemd versionator wxwidgets
+
+# NOTE: If you need symlinks for binaries please tell maintainers or
+# open up a bug to let it be created.
+
+DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
+HOMEPAGE="http://www.erlang.org/"
+SRC_URI="http://www.erlang.org/download/otp_src_${PV}.tar.gz
+ http://erlang.org/download/otp_doc_man_${PV}.tar.gz
+ doc? ( http://erlang.org/download/otp_doc_html_${PV}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+
+IUSE="compat-ethread dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk wxwidgets"
+REQUIRED_USE="dirty-schedulers? ( smp )" #621610
+
+RDEPEND="
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.7d:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ emacs? ( virtual/emacs )
+ java? ( >=virtual/jdk-1.2:* )
+ odbc? ( dev-db/unixODBC )
+ systemd? ( sys-apps/systemd )"
+DEPEND="${RDEPEND}
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] virtual/glu )
+ sctp? ( net-misc/lksctp-tools )
+ tk? ( dev-lang/tk )"
+
+S="${WORKDIR}/otp_src_${PV}"
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ epatch "${FILESDIR}"/18.2.1-wx3.0.patch
+
+ use odbc || sed -i 's: odbc : :' lib/Makefile
+
+ # bug 263129, don't ignore LDFLAGS, reported upstream
+ sed -e 's:LDFLAGS = \$(DED_LDFLAGS):LDFLAGS += \$(DED_LDFLAGS):' -i "${S}"/lib/megaco/src/flex/Makefile.in
+
+ # don't ignore LDFLAGS, reported upstream
+ sed -e 's:LDFLAGS = \$(ODBC_LIB) \$(EI_LDFLAGS):LDFLAGS += \$(ODBC_LIB) \$(EI_LDFLAGS):' -i "${S}"/lib/odbc/c_src/Makefile.in
+
+ if ! use wxwidgets; then
+ sed -i 's: wx : :' lib/Makefile
+ rm -rf lib/wx
+ fi
+
+ # Nasty workaround, reported upstream
+ cp "${S}"/lib/configure.in.src "${S}"/lib/configure.in
+
+ # bug 383697
+ sed -i '1i#define OF(x) x' erts/emulator/drivers/common/gzio.c
+
+ cd erts && mv configure.in configure.ac && eautoreconf
+}
+
+src_configure() {
+ use wxwidgets && need-wxwidgets unicode
+ use java || export JAVAC=false
+
+ econf \
+ --enable-threads \
+ $(use_enable sctp) \
+ $(use_enable systemd) \
+ $(use_enable hipe) \
+ $(use_with ssl ssl "${EPREFIX}"/usr) \
+ $(use_enable ssl dynamic-ssl-lib) \
+ $(use_enable kpoll kernel-poll) \
+ $(use_enable smp smp-support) \
+ $(use compat-ethread && echo "--enable-ethread-pre-pentium4-compatibility") \
+ $(use x64-macos && echo "--enable-darwin-64bit") \
+ $(use_enable dirty-schedulers)
+}
+
+src_compile() {
+ use java || export JAVAC=false
+ emake
+
+ if use emacs ; then
+ pushd lib/tools/emacs
+ elisp-compile *.el
+ popd
+ fi
+}
+
+extract_version() {
+ sed -n -e "/^$2 = \(.*\)$/s::\1:p" "${S}/$1/vsn.mk"
+}
+
+src_install() {
+ local ERL_LIBDIR=/usr/$(get_libdir)/erlang
+ local ERL_INTERFACE_VER=$(extract_version lib/erl_interface EI_VSN)
+ local ERL_ERTS_VER=$(extract_version erts VSN)
+
+ emake INSTALL_PREFIX="${D}" install
+ dodoc AUTHORS README.md
+
+ dosym "${ERL_LIBDIR}/bin/erl" /usr/bin/erl
+ dosym "${ERL_LIBDIR}/bin/erlc" /usr/bin/erlc
+ dosym "${ERL_LIBDIR}/bin/escript" /usr/bin/escript
+ dosym \
+ "${ERL_LIBDIR}/lib/erl_interface-${ERL_INTERFACE_VER}/bin/erl_call" \
+ /usr/bin/erl_call
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam
+ use smp && dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp
+
+ ## Clean up the no longer needed files
+ rm "${ED}/${ERL_LIBDIR}/Install"
+
+ for i in "${WORKDIR}"/man/man* ; do
+ dodir "${ERL_LIBDIR}/${i##${WORKDIR}}"
+ done
+ for file in "${WORKDIR}"/man/man*/*.[1-9]; do
+ # doman sucks so we can't use it
+ cp ${file} "${ED}/${ERL_LIBDIR}"/man/man${file##*.}/
+ done
+ # extend MANPATH, so the normal man command can find it
+ # see bug 189639
+ dodir /etc/env.d/
+ echo "MANPATH=\"${EPREFIX}${ERL_LIBDIR}/man\"" > "${ED}/etc/env.d/90erlang"
+
+ if use doc ; then
+ dohtml -A README,erl,hrl,c,h,kwc,info -r \
+ "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-*
+ fi
+
+ if use emacs ; then
+ pushd "${S}"
+ elisp-install erlang lib/tools/emacs/*.{el,elc}
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
+ "${FILESDIR}"/${SITEFILE} > "${T}"/${SITEFILE}
+ elisp-site-file-install "${T}"/${SITEFILE}
+ popd
+ fi
+
+ newinitd "${FILESDIR}"/epmd.init epmd
+ systemd_dounit "${FILESDIR}"/epmd.service
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/erlang/erlang-20.0.ebuild b/dev-lang/erlang/erlang-20.0.ebuild
new file mode 100644
index 000000000000..0e605a39add6
--- /dev/null
+++ b/dev-lang/erlang/erlang-20.0.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+WX_GTK_VER="3.0"
+
+inherit autotools elisp-common eutils java-pkg-opt-2 multilib systemd versionator wxwidgets
+
+# NOTE: If you need symlinks for binaries please tell maintainers or
+# open up a bug to let it be created.
+
+DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
+HOMEPAGE="http://www.erlang.org/"
+SRC_URI="http://www.erlang.org/download/otp_src_${PV}.tar.gz
+ http://erlang.org/download/otp_doc_man_${PV}.tar.gz
+ doc? ( http://erlang.org/download/otp_doc_html_${PV}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+
+IUSE="compat-ethread dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk wxwidgets"
+REQUIRED_USE="dirty-schedulers? ( smp )" #621610
+
+RDEPEND="
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.7d:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ emacs? ( virtual/emacs )
+ java? ( >=virtual/jdk-1.2:* )
+ odbc? ( dev-db/unixODBC )
+ systemd? ( sys-apps/systemd )"
+DEPEND="${RDEPEND}
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] virtual/glu )
+ sctp? ( net-misc/lksctp-tools )
+ tk? ( dev-lang/tk )"
+
+S="${WORKDIR}/otp_src_${PV}"
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ epatch "${FILESDIR}"/18.2.1-wx3.0.patch
+
+ use odbc || sed -i 's: odbc : :' lib/Makefile
+
+ # bug 263129, don't ignore LDFLAGS, reported upstream
+ sed -e 's:LDFLAGS = \$(DED_LDFLAGS):LDFLAGS += \$(DED_LDFLAGS):' -i "${S}"/lib/megaco/src/flex/Makefile.in
+
+ # don't ignore LDFLAGS, reported upstream
+ sed -e 's:LDFLAGS = \$(ODBC_LIB) \$(EI_LDFLAGS):LDFLAGS += \$(ODBC_LIB) \$(EI_LDFLAGS):' -i "${S}"/lib/odbc/c_src/Makefile.in
+
+ if ! use wxwidgets; then
+ sed -i 's: wx : :' lib/Makefile
+ rm -rf lib/wx
+ fi
+
+ # Nasty workaround, reported upstream
+ cp "${S}"/lib/configure.in.src "${S}"/lib/configure.in
+
+ # bug 383697
+ sed -i '1i#define OF(x) x' erts/emulator/drivers/common/gzio.c
+
+ cd erts && mv configure.in configure.ac && eautoreconf
+}
+
+src_configure() {
+ use wxwidgets && need-wxwidgets unicode
+ use java || export JAVAC=false
+
+ econf \
+ --enable-threads \
+ $(use_enable sctp) \
+ $(use_enable systemd) \
+ $(use_enable hipe) \
+ $(use_with ssl ssl "${EPREFIX}"/usr) \
+ $(use_enable ssl dynamic-ssl-lib) \
+ $(use_enable kpoll kernel-poll) \
+ $(use_enable smp smp-support) \
+ $(use compat-ethread && echo "--enable-ethread-pre-pentium4-compatibility") \
+ $(use x64-macos && echo "--enable-darwin-64bit") \
+ $(use_enable dirty-schedulers)
+}
+
+src_compile() {
+ use java || export JAVAC=false
+ emake
+
+ if use emacs ; then
+ pushd lib/tools/emacs
+ elisp-compile *.el
+ popd
+ fi
+}
+
+extract_version() {
+ sed -n -e "/^$2 = \(.*\)$/s::\1:p" "${S}/$1/vsn.mk"
+}
+
+src_install() {
+ local ERL_LIBDIR=/usr/$(get_libdir)/erlang
+ local ERL_INTERFACE_VER=$(extract_version lib/erl_interface EI_VSN)
+ local ERL_ERTS_VER=$(extract_version erts VSN)
+
+ emake INSTALL_PREFIX="${D}" install
+ dodoc AUTHORS README.md
+
+ dosym "${ERL_LIBDIR}/bin/erl" /usr/bin/erl
+ dosym "${ERL_LIBDIR}/bin/erlc" /usr/bin/erlc
+ dosym "${ERL_LIBDIR}/bin/escript" /usr/bin/escript
+ dosym \
+ "${ERL_LIBDIR}/lib/erl_interface-${ERL_INTERFACE_VER}/bin/erl_call" \
+ /usr/bin/erl_call
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam
+ use smp && dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp
+
+ ## Clean up the no longer needed files
+ rm "${ED}/${ERL_LIBDIR}/Install"
+
+ for i in "${WORKDIR}"/man/man* ; do
+ dodir "${ERL_LIBDIR}/${i##${WORKDIR}}"
+ done
+ for file in "${WORKDIR}"/man/man*/*.[1-9]; do
+ # doman sucks so we can't use it
+ cp ${file} "${ED}/${ERL_LIBDIR}"/man/man${file##*.}/
+ done
+ # extend MANPATH, so the normal man command can find it
+ # see bug 189639
+ dodir /etc/env.d/
+ echo "MANPATH=\"${EPREFIX}${ERL_LIBDIR}/man\"" > "${ED}/etc/env.d/90erlang"
+
+ if use doc ; then
+ dohtml -A README,erl,hrl,c,h,kwc,info -r \
+ "${WORKDIR}"/doc "${WORKDIR}"/lib "${WORKDIR}"/erts-*
+ fi
+
+ if use emacs ; then
+ pushd "${S}"
+ elisp-install erlang lib/tools/emacs/*.{el,elc}
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
+ "${FILESDIR}"/${SITEFILE} > "${T}"/${SITEFILE}
+ elisp-site-file-install "${T}"/${SITEFILE}
+ popd
+ fi
+
+ newinitd "${FILESDIR}"/epmd.init epmd
+ systemd_dounit "${FILESDIR}"/epmd.service
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/erlang/files/18.2.1-wx3.0.patch b/dev-lang/erlang/files/18.2.1-wx3.0.patch
new file mode 100644
index 000000000000..aada0d9eaa1e
--- /dev/null
+++ b/dev-lang/erlang/files/18.2.1-wx3.0.patch
@@ -0,0 +1,113 @@
+Description: Fix constants for wxwidgets3.0
+ The values of wx constants can change between stable release series (and
+ some have between 2.8 and 3.0), but erlang seems to hardcode these values.
+Author: Olly Betts <olly@survex.com>
+Bug-Debian: https://bugs.debian.org/766790
+Forwarded: no
+Last-Update: 2014-11-25
+
+--- a/lib/wx/include/wx.hrl
++++ b/lib/wx/include/wx.hrl
+@@ -767,7 +767,7 @@
+ % From "checkbox.h"
+ -define(wxCHK_ALLOW_3RD_STATE_FOR_USER, 8192).
+ -define(wxCHK_3STATE, 4096).
+--define(wxCHK_2STATE, 0).
++-define(wxCHK_2STATE, 16384).
+ % From "checkbox.h": wxCheckBoxState
+ -define(wxCHK_UNCHECKED, 0).
+ -define(wxCHK_CHECKED, 1).
+@@ -1014,10 +1014,10 @@
+ -define(wxSIZE_AUTO_WIDTH, 1).
+ -define(wxSETUP, 131072).
+ -define(wxMORE, 65536).
+--define(wxHELP, 32768).
+--define(wxRESET, 16384).
+--define(wxBACKWARD, 8192).
+--define(wxFORWARD, 4096).
++-define(wxHELP, 4096).
++-define(wxRESET, 32768).
++-define(wxBACKWARD, 16384).
++-define(wxFORWARD, 8192).
+ -define(wxICON_MASK, (16#00000100 bor 16#00000200 bor 16#00000400 bor 16#00000800)).
+ -define(wxICON_ASTERISK, ?wxICON_INFORMATION).
+ -define(wxICON_STOP, ?wxICON_HAND).
+@@ -1049,8 +1049,8 @@
+ -define(wxTC_TOP, 0).
+ -define(wxTC_FIXEDWIDTH, 32).
+ -define(wxTC_RIGHTJUSTIFY, 16).
+--define(wxSP_WRAP, 8192).
+--define(wxSP_ARROW_KEYS, 4096).
++-define(wxSP_WRAP, 32768).
++-define(wxSP_ARROW_KEYS, 16384).
+ -define(wxSP_VERTICAL, ?wxVERTICAL).
+ -define(wxSP_HORIZONTAL, ?wxHORIZONTAL).
+ -define(wxSB_VERTICAL, ?wxVERTICAL).
+@@ -1071,8 +1071,8 @@
+ -define(wxCB_SIMPLE, 4).
+ -define(wxLB_INT_HEIGHT, 2048).
+ -define(wxLB_HSCROLL, ?wxHSCROLL).
+--define(wxLB_ALWAYS_SB, 1024).
+--define(wxLB_NEEDED_SB, 512).
++-define(wxLB_ALWAYS_SB, 512).
++-define(wxLB_NEEDED_SB, 0).
+ -define(wxLB_OWNERDRAW, 256).
+ -define(wxLB_EXTENDED, 128).
+ -define(wxLB_MULTIPLE, 64).
+@@ -1548,7 +1548,7 @@
+ -define(wxUPDATE_UI_FROMIDLE, 2).
+ % From "dialog.h"
+ -define(wxDEFAULT_DIALOG_STYLE, (?wxCAPTION bor ?wxSYSTEM_MENU bor ?wxCLOSE_BOX)).
+--define(wxDIALOG_NO_PARENT, 1).
++-define(wxDIALOG_NO_PARENT, 32).
+ % From "dirctrlg.h"
+ -define(wxDIRCTRL_DIR_ONLY, 16).
+ -define(wxDIRCTRL_SELECT_FIRST, 32).
+@@ -3728,7 +3728,7 @@
+ -define(wxSTC_KEY_LEFT, 302).
+ -define(wxSTC_KEY_UP, 301).
+ -define(wxSTC_KEY_DOWN, 300).
+--define(wxSTC_MODEVENTMASKALL, 8191).
++-define(wxSTC_MODEVENTMASKALL, 1048575).
+ -define(wxSTC_MULTILINEUNDOREDO, 4096).
+ -define(wxSTC_MOD_BEFOREDELETE, 2048).
+ -define(wxSTC_MOD_BEFOREINSERT, 1024).
+@@ -3810,7 +3810,7 @@
+ -define(wxSTC_INDIC_TT, 2).
+ -define(wxSTC_INDIC_SQUIGGLE, 1).
+ -define(wxSTC_INDIC_PLAIN, 0).
+--define(wxSTC_INDIC_MAX, 7).
++-define(wxSTC_INDIC_MAX, 31).
+ -define(wxSTC_CASE_LOWER, 2).
+ -define(wxSTC_CASE_UPPER, 1).
+ -define(wxSTC_CASE_MIXED, 0).
+@@ -3835,7 +3835,7 @@
+ -define(wxSTC_CHARSET_BALTIC, 186).
+ -define(wxSTC_CHARSET_DEFAULT, 1).
+ -define(wxSTC_CHARSET_ANSI, 0).
+--define(wxSTC_STYLE_MAX, 127).
++-define(wxSTC_STYLE_MAX, 255).
+ -define(wxSTC_STYLE_LASTPREDEFINED, 39).
+ -define(wxSTC_STYLE_CALLTIP, 38).
+ -define(wxSTC_STYLE_INDENTGUIDE, 37).
+@@ -3934,9 +3934,9 @@
+ -define(wxTE_PROCESS_TAB, 64).
+ -define(wxTE_MULTILINE, 32).
+ -define(wxTE_READONLY, 16).
+--define(wxTE_AUTO_SCROLL, 8).
++-define(wxTE_AUTO_SCROLL, 0).
+ -define(wxTE_NO_VSCROLL, 2).
+--define(wxHAS_TEXT_WINDOW_STREAM, 0).
++-define(wxHAS_TEXT_WINDOW_STREAM, 1).
+ % From "textctrl.h": wxTextAttrAlignment
+ -define(wxTEXT_ALIGNMENT_DEFAULT, 0).
+ -define(wxTEXT_ALIGNMENT_LEFT, 1).
+@@ -3986,7 +3986,7 @@
+ -define(wxDEFAULT_FRAME_STYLE, (?wxSYSTEM_MENU bor ?wxRESIZE_BORDER bor ?wxMINIMIZE_BOX bor ?wxMAXIMIZE_BOX bor ?wxCLOSE_BOX bor ?wxCAPTION bor ?wxCLIP_CHILDREN)).
+ -define(wxRESIZE_BORDER, 64).
+ -define(wxTINY_CAPTION_VERT, 128).
+--define(wxTINY_CAPTION_HORIZ, 256).
++-define(wxTINY_CAPTION_HORIZ, 128).
+ -define(wxMAXIMIZE_BOX, 512).
+ -define(wxMINIMIZE_BOX, 1024).
+ -define(wxSYSTEM_MENU, 2048).
diff --git a/dev-lang/erlang/files/50erlang-gentoo.el b/dev-lang/erlang/files/50erlang-gentoo.el
new file mode 100644
index 000000000000..db1ae7636f1d
--- /dev/null
+++ b/dev-lang/erlang/files/50erlang-gentoo.el
@@ -0,0 +1,5 @@
+;;; erlang site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(require 'erlang-start)
+(setq erlang-root-dir "/usr/share")
diff --git a/dev-lang/erlang/files/epmd.init b/dev-lang/erlang/files/epmd.init
new file mode 100644
index 000000000000..9b3b9e2ad72c
--- /dev/null
+++ b/dev-lang/erlang/files/epmd.init
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the Erlang Public License 1.1
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Erlang Port Mapper Daemon"
+ start-stop-daemon --start --quiet --user nobody --group nobody --exec /usr/bin/epmd -- -daemon
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Erlang Port Mapper Daemon"
+ /usr/bin/epmd -kill >/dev/null
+ eend $?
+}
diff --git a/dev-lang/erlang/files/epmd.service b/dev-lang/erlang/files/epmd.service
new file mode 100644
index 000000000000..57382ff36a40
--- /dev/null
+++ b/dev-lang/erlang/files/epmd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Erlang Portmapper Daemon
+Wants=network.target
+
+[Service]
+ExecStart=/usr/bin/epmd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-lang/erlang/metadata.xml b/dev-lang/erlang/metadata.xml
new file mode 100644
index 000000000000..d4a1337a2e12
--- /dev/null
+++ b/dev-lang/erlang/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-needed -->
+ <use>
+ <flag name="hipe">HIgh Performance Erlang extension</flag>
+ <flag name="halfword">Enable halfword emulator</flag>
+ <flag name="kpoll">Enable kernel polling support</flag>
+ <flag name="compat-ethread">Enable compatibility with pre-pentium 4 CPUs in the ethread library.</flag>
+ <flag name="dirty-schedulers">Enable dirty schedulers</flag>
+ </use>
+<longdescription>
+Erlang is a programming language designed at the Ericsson
+Computer Science Laboratory. Open-source Erlang is being
+released to help encourage the spread of Erlang outside
+Ericsson.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/esco/Manifest b/dev-lang/esco/Manifest
new file mode 100644
index 000000000000..9b8429fdc2ad
--- /dev/null
+++ b/dev-lang/esco/Manifest
@@ -0,0 +1,5 @@
+DIST esco-src-0.512.tar.gz 382056 SHA256 646e88b3ff16346e41061c6cd33c37cb5e2e7d3b2b2b8604f6931fe1723935d1 SHA512 4d02af7097abbd6770a891065ea9d7d3f9acdd9c7c9164f726dba2385db48993e7fe9baa4fc57aac2d998544788416700933d473f1e9467c9f94e240f80ccf97 WHIRLPOOL 91cfdfe44756bf3b5328b8dc42d746dc33487c3565f6e172396d27e9ea5377f6e4f8fb2b6e8b28d89da8343fd437c39174c7d92daeb0157c815da64e101042c7
+EBUILD esco-0.512.ebuild 598 SHA256 c38ef7353ac13d1a7a3075d93398aae331d5217edcd0b7b9bfcd2139462726d4 SHA512 5b77b714b5a17e47fe6a8d900b1088008516522e23bdb1008b204b91928470dd160cd7144a2d6cb535b0e3ffee6f24946c3b22b1b76de006bf739855768b3b28 WHIRLPOOL dca054c1acf16d8c49a6f44dee78b83b705d0f9d5cb7183c46b9cac8ef8325db13a758bd719c657ed0730b251cbbca0e47196badad91c29cf058f705aad3e6eb
+MISC ChangeLog 2319 SHA256 02d4f22cbbe16a1d018c3e76a34df7fd49957cb7e131f0b34c733aeb18ba77bc SHA512 fb30e47e6f81840e3545be08678b14f38a7d09c1822f61e0e4f7c83a67997695d1f13366d757b76d9e09febc916b073e8415350e19b8004f8299b247239972e2 WHIRLPOOL 39508c0380f1e7a9f28551c2f075fda6a0f06595dbdf14c9aa33205e33cd27ca4800cc4c6779d2906fd842be831079557e022476e0dd198308e8fbd03bf406db
+MISC ChangeLog-2015 444 SHA256 3ef74774e6cf7197106751aaa9271e7b5332e1fd40cae61c9c0af038227b5de1 SHA512 1da60b2349c829194964d5261189887645d9a4c8bfa4ec4ce4659361754ba19e09fcd1242b94392452185fba78f16d5b4e66a9d9e2c076cef564abe9e2a3303d WHIRLPOOL abb5eb79f440770723969b2901bde528774871b062badfb8a449ff65f7e5477e07f77e3ec2f6f3bb71a1022d727393bdb6b2be31284c097b54dbbcd31c30680b
+MISC metadata.xml 321 SHA256 571a30716903bb84793d7329a345b12a5f2be9557cd059cdde8f346d4d6e938a SHA512 a7ec9ce4d818aee3ea976eba970b21b3e06bf2aaf577d8653c6a18b6a1ec586d00c413858e9acb00fa17b57a26a622b04f3ddbbae8298054350828a713936264 WHIRLPOOL 40bce765b4808900b01a7b47b945a354ab2c37bd4191a78dfe0435c192c94d4601a507b492ed9a99c7e61f15b4d5be8b7bd14a4876ece41b46738bab6e2a4736
diff --git a/dev-lang/esco/esco-0.512.ebuild b/dev-lang/esco/esco-0.512.ebuild
new file mode 100644
index 000000000000..98743c402a65
--- /dev/null
+++ b/dev-lang/esco/esco-0.512.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PN="${PN}-src"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Combine interpreter of esoteric languages"
+HOMEPAGE="http://esco.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="gmp l10n_ru"
+
+DEPEND="gmp? ( dev-libs/gmp:0 )"
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS ChangeLog README TODO docs/basics.txt )
+
+src_configure() {
+ econf $(use_with gmp)
+}
+
+src_install() {
+ default
+ use l10n_ru && dodoc docs/README_RU.utf8
+}
diff --git a/dev-lang/esco/metadata.xml b/dev-lang/esco/metadata.xml
new file mode 100644
index 000000000000..af98e87ab5b2
--- /dev/null
+++ b/dev-lang/esco/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>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">esco</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/execline/Manifest b/dev-lang/execline/Manifest
new file mode 100644
index 000000000000..81f44e0a3cea
--- /dev/null
+++ b/dev-lang/execline/Manifest
@@ -0,0 +1,17 @@
+DIST execline-2.1.1.0.tar.gz 75967 SHA256 9e1a9b95772b64bd623c1ddea6200909cca0eb659893ac47857848928eaff7dc SHA512 250fe449b39a198193f1431b249b342f3c6c499fea12779a55d0e27aec2095285bbf9dc2a48d84eebdf9f540ecf5e67ef39393243ca0fadfc764d2cc95ac0b6b WHIRLPOOL ce92f6d7786e5f1efcfb5298b1fa8a561957c6b9f542ace49b815e69f98da4f88adcd339f7210d61d7ae1298573cd9bc31c22c6f7b3c8ac30f44986c88241f32
+DIST execline-2.1.4.5.tar.gz 80203 SHA256 ab4451d4992a5d7fb2ae34cffe4d0806e4902bf9aa27ee3b75617aa35379356f SHA512 15a76c73afe98142b9f466edb442cad06ee69f0f0e15ad6a325c37f3878b4c5863b5cece67bd169e84b465a0f7f4f38f87fa88b2aa96fe40a20ebc3575a1ceb9 WHIRLPOOL 1df5b72f02c95d3fd24ff7c46b3cd7aff89186bfe6bb27df815f5bb06a12886e57b3fe67ff18d2d387dccb107eb8acf0b09124eafe47a9857e636d240e1051e8
+DIST execline-2.1.5.0.tar.gz 80932 SHA256 8a3605a6db73183baa376bf2130e8b7eb75a5b5347c7f9144e520fe86bcb1142 SHA512 43ebff73e279dcffda686a372bded80e12be4b66b6c2fde69f17810aa0b52214d23da8581002adfcb5a40437e335594b8e44c698d0295d8c172fbc2c0a93aeed WHIRLPOOL 8b0d3b28d28e7c18515600dd866c0ade5f99ba97ded37102e58f2d613d2e60f1d9de1d1327f0c5331bd8f346e9b808dafbfbd8e7003a01983904f6576ae90575
+DIST execline-2.2.0.0.tar.gz 82860 SHA256 93bd744f2e3ad204cb89f147efdc6ca4e622f9c6bfc9895e0b2cb8b0480029de SHA512 0174bd46c231684f78b7ea2f6f85776b9edf780d1ae928fcaf0eda3ade46fa60666c17af4480fd37179461b622a069221386f229c777fd214b5abe70e7f58a19 WHIRLPOOL 6e39ceca7a867e5fc6d7fee16e78df2a5602b15924c411766089719afd81b198c7e816b54634dd2f322048c0230f9009392f01264eacba96924fe1af8888625f
+DIST execline-2.3.0.0.tar.gz 81704 SHA256 a0ec43b8feba299cc1e5c65b1978ed76571afa595bc53165373e29a57468f425 SHA512 d8bd3420366d2e81e8bcbd644f235fc50e32a83d8e25989cf12f4b4c03bf553e0c356311ef185f98e03887ad65fd75a12ec4746ac832e72aeb023016d91f36c1 WHIRLPOOL b1b278c5623bae97a9e232bbdee2ff21a5cfb8dbd33bc53547620d876a4e0649543bee3de1e0c33b20442f26faeb2089e5325d0b7891e7d568a2ccff7629eb38
+DIST execline-2.3.0.1.tar.gz 82620 SHA256 2bf65aaaf808718952e05c2221b4e9472271e53ebd915c8d1d49a3e992583bf4 SHA512 be72bff29055655275e2da0ed831034158300ff39184822966e35ff9a6c2dea4f7e5fc5e79bda40be91a791cb99ee9accc7cbdeccef3c4489bf2253e0a107365 WHIRLPOOL 52d57761012f90408a0cbb55168b0971941a2727dd40c0c41df0ca1066c15683e246172e2c608f880eaf6c7ba4b2802eaee2f103f3dc2eca5a9d8612bb24f87c
+DIST execline-2.3.0.2.tar.gz 82378 SHA256 c11650651a7230bd5687945a7698b2da3fe13c3c0eb15e296bb91769d4775f45 SHA512 0ec20bd0695bbf1aef9db6725c7d58ca95044401412ba85a22274d21aa37a5f51455739d403f929870dfcd4b59dcea474e0290a42e6a7dfe4136ef066b36e208 WHIRLPOOL 89c4cb3f258bb32c86b266dc7102e1992d80152f5a47382b218f2cd316815c6aaddebd9e716f884c13e6b83430145212aa39224b59768ac3e385402f008ccbb4
+EBUILD execline-2.1.1.0.ebuild 1213 SHA256 4225bbb9d02078b3984a9ac3fcfe311692fe02f12ecb575c7ba31e249b89ae38 SHA512 788d3961de599828e7acc2159422780edd0c8cf5c0d98aa280d2c4f52eb796b3979dfd9e820ef81007b1c0f7a6252e5805b11c9fbeba5c11b9acc862f4b80bbf WHIRLPOOL 8ac40d4a5dcd62c741e6ca4fba05c9e798335e3620f0b63104be7b38e3a33236d5b3fae1f5540697df9bf5572610f02cb6b57688f6f14a9e45988569e215d58c
+EBUILD execline-2.1.4.5.ebuild 1215 SHA256 f821f376163f5f1f27294b46e5a497899bcce618d7757033d15059d06d73f263 SHA512 f0f12b52d7cf28e0bd66304d02d9bbf506b706a167ef33d0cdc27ad42c680114ba6cd977cb6bc61334ce7f685e4c4aca7b990b3b68567b5b86a85a12291688b3 WHIRLPOOL dea7e81d926fa00b20a652730a7905440d8476e424b292d55ab3c00c76db62be5681be8ba445e57cb33030a5ae193a8145542bb1b9c6d1e27e61f92612e59987
+EBUILD execline-2.1.5.0.ebuild 1187 SHA256 27361b8e59d1c33100a1e87b25a829def82733cefa04e5e88cbf12ac2ff5cb28 SHA512 911509c3bc3b9e41ddfc677596e2b533581ac66368ac2fef35ea66ffac0083a82583bcdc5c961f0ec19d0e9d4a5209e44da366c554ca765e0347b7a84eb30295 WHIRLPOOL 8c189b0fef81e734ea2a3ff93ff379221f682d5a7fbda10b10a6b8c07ed42445ffb99d7a787d3f2e0acc6a468cdc9332442c859075b1ab996687edd2c82f0e04
+EBUILD execline-2.2.0.0.ebuild 1154 SHA256 f98eb94ab6958b3737b1af2e98d40da53180de344ce5a10d0cb3a06d11f7c0c7 SHA512 59f8bd7ed0611bd0cc35b12ba1ae653b043b2d22378c3f950511ba28210a27ed916db55cd4c31ad61ca6deeb7d376e08d944bd5f66ac92ade8e5087aa97248fa WHIRLPOOL ac347f1582c3727a0c2250db531a92338cf7c812af1103335c29f0e148f65fb1125eaa8e1b057d3b3e7d894558c9c93f9f15b42fdee106b09e39894830a39d8c
+EBUILD execline-2.3.0.0.ebuild 1161 SHA256 8fc9b0661290abb56ea493bc3a3ede76e60aab0a503b4347cdd38ad0fa4099ab SHA512 ed73a581294fbd0ea958fae27f6423ef1918e3e8699c4452ea0cba49f744f1a57e279dfe36ab9590fd0f4068f71909b779c901ca5e2d81837bbe8679861c45d8 WHIRLPOOL 2debf81cfa42e6d85e320278ecedc0ec40f1608ef97aabde689225dc60c953114e1d569901e98f4002f0fe4baf2291ad92ffac35a1fe5aa7187adb9b76980bf1
+EBUILD execline-2.3.0.1.ebuild 1300 SHA256 6485bce52eaa787180da89c3ec7cfbe7206172770f78a726df420e8986c4b6a0 SHA512 7cbe278511bc0d735866f6c131cf820781917ddf32d42c431a893ec2f540825be7293b6876b805a81f75e7df00d999dee576cdb62580d4ac9455ab7bc949ee80 WHIRLPOOL bb16c5574d23833cbcf1d8b6a1c640e394f4aea1f5b8a986ad16be9c822da3cf8bde27581c944ab83e7b1dcc92ae0d0f5b663b3ddfe3465af02fbba0a8531fc1
+EBUILD execline-2.3.0.2.ebuild 1300 SHA256 b0a1e39fe5da3f69a60b2b3fc239a2e3274c39441881fce253650084380fafec SHA512 5b924360e07c3dcf103bebeb02787a7eb18711e020ac9b0b9a0e083edb07c8cb7ee269de6e5f947a4df6d8a372889639c0e434fd8e103b208f666add76e64be1 WHIRLPOOL f0fc0126e78275bd6a96b2a1a202cfaf916d718956b300276df6dca06617454b83541fe542123a6600cf4f9aa6788d55923201703d99c72f89ede41940c5e46c
+MISC ChangeLog 2759 SHA256 806a6e0cba755977db2684730e4567d27247683b35ff3c4bc82603294c6c8c10 SHA512 f3378a6758fb0a3e975524f3112ff48804a6259a002d0867b328ba5588cb88b74f463f50eaf6d8f5aa1316411c15d82cf6b64bb0a64b4403c0ca71c95d418806 WHIRLPOOL b91463fead952cc6c30d84dc4e9bcadf9b166fb89d373d97943408a7880b004d8a97c6e72c5c36b8194f0ba829d720c5876cc19c8121561fb7b2bd44f43c7991
+MISC ChangeLog-2015 1144 SHA256 27f4928eec208e529ec78acd889a7021d15cfa978453962cf85fdc380e3a6dc4 SHA512 0e21ea5678664ef72f2385cd85233a6bccbdee2af8c2929a35fd80bccac4dd989fab0e79ba49c112d6a7cd3ded130caa696916d4a57913af02ce70357c919f7e WHIRLPOOL 25d9fc34c406f45e5fab845991fea05a537c63caa703472595da73fe2f3eb7645dca0967dbef215f7a79ba4902837d48114a75e0350ed91985ae79111874322c
+MISC metadata.xml 478 SHA256 a26880ad1be6d77452952f54794b83a2acb3baf1b5c898acb8fdb69420affe1f SHA512 ed6d5e5d2c23cd9e6a6a1ab64db1ffb2b1517e41dc06878918ef907454440c8e84cb8f91acb517bcd45fa1ebc0b990b1089ac3e2158baf1b128ff05efc2c71d0 WHIRLPOOL 82a011823dd640c67b0cbd23e226f70fb2dc47ace8d68a629c4db9f90c159d8cbf4eeaeb20c18a387295bdbb8ae808deba25faeb5137fce54d40d559e9575d95
diff --git a/dev-lang/execline/execline-2.1.1.0.ebuild b/dev-lang/execline/execline-2.1.1.0.ebuild
new file mode 100644
index 000000000000..fecff914bdda
--- /dev/null
+++ b/dev-lang/execline/execline-2.1.1.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2013-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="a non-interactive scripting language similar to SH"
+HOMEPAGE="http://www.skarnet.org/software/execline/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-4.0
+ static? ( >=dev-libs/skalibs-2.3.1.0[static-libs] )
+ !static? ( >=dev-libs/skalibs-2.3.1.0 )
+"
+RDEPEND="!static? ( >=dev-libs/skalibs-2.3.1.0 )"
+
+src_prepare() {
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable static allstatic) \
+ $(use_enable !static shared) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
+
+src_compile()
+{
+ emake DESTDIR="${D}"
+}
+
+src_install()
+{
+ default
+ dohtml -r doc/*
+}
diff --git a/dev-lang/execline/execline-2.1.4.5.ebuild b/dev-lang/execline/execline-2.1.4.5.ebuild
new file mode 100644
index 000000000000..93dd5dc3e644
--- /dev/null
+++ b/dev-lang/execline/execline-2.1.4.5.ebuild
@@ -0,0 +1,54 @@
+# Copyright 2013-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="a non-interactive scripting language similar to SH"
+HOMEPAGE="http://www.skarnet.org/software/execline/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-4.0
+ static? ( >=dev-libs/skalibs-2.3.8.3[static-libs] )
+ !static? ( >=dev-libs/skalibs-2.3.8.3 )
+"
+RDEPEND="!static? ( >=dev-libs/skalibs-2.3.8.3 )"
+
+src_prepare() {
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable static allstatic) \
+ $(use_enable !static shared) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
+
+src_compile()
+{
+ emake DESTDIR="${D}"
+}
+
+src_install()
+{
+ default
+ dohtml -r doc/*
+}
diff --git a/dev-lang/execline/execline-2.1.5.0.ebuild b/dev-lang/execline/execline-2.1.5.0.ebuild
new file mode 100644
index 000000000000..e8b3d02af5cc
--- /dev/null
+++ b/dev-lang/execline/execline-2.1.5.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 2013-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="a non-interactive scripting language similar to SH"
+HOMEPAGE="http://www.skarnet.org/software/execline/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-4.0
+ static? ( >=dev-libs/skalibs-2.3.10.0[static-libs] )
+ !static? ( >=dev-libs/skalibs-2.3.10.0 )
+"
+RDEPEND="!static? ( >=dev-libs/skalibs-2.3.10.0 )"
+
+HTML_DOCS="doc/."
+
+src_prepare() {
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s~tryldflag LDFLAGS_AUTO -Wl,--hash-style=both~:~" "${S}/configure" || die
+ eapply_user
+}
+
+src_configure()
+{
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable static allstatic) \
+ $(use_enable !static shared) \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --datadir=/etc \
+ --sysdepdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs
+}
+
+src_compile()
+{
+ emake DESTDIR="${D}"
+}
diff --git a/dev-lang/execline/execline-2.2.0.0.ebuild b/dev-lang/execline/execline-2.2.0.0.ebuild
new file mode 100644
index 000000000000..8ed0cb1e2b19
--- /dev/null
+++ b/dev-lang/execline/execline-2.2.0.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="a non-interactive scripting language"
+HOMEPAGE="http://www.skarnet.org/software/execline/"
+SRC_URI="http://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.4.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.4.0.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.4.0.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/dev-lang/execline/execline-2.3.0.0.ebuild b/dev-lang/execline/execline-2.3.0.0.ebuild
new file mode 100644
index 000000000000..d51613ed4f02
--- /dev/null
+++ b/dev-lang/execline/execline-2.3.0.0.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="a non-interactive scripting language"
+HOMEPAGE="https://www.skarnet.org/software/execline/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.5.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.5.0.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.5.0.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/dev-lang/execline/execline-2.3.0.1.ebuild b/dev-lang/execline/execline-2.3.0.1.ebuild
new file mode 100644
index 000000000000..2557917d4c32
--- /dev/null
+++ b/dev-lang/execline/execline-2.3.0.1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="a non-interactive scripting language"
+HOMEPAGE="https://www.skarnet.org/software/execline/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.5.1.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.5.1.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.5.1.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+
+ # configure overrides gentoo's -fstack-protector default
+ sed -i "/^tryflag CFLAGS_AUTO -fno-stack-protector$/d" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/dev-lang/execline/execline-2.3.0.2.ebuild b/dev-lang/execline/execline-2.3.0.2.ebuild
new file mode 100644
index 000000000000..5cb4ef2598ae
--- /dev/null
+++ b/dev-lang/execline/execline-2.3.0.2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit versionator
+
+DESCRIPTION="a non-interactive scripting language"
+HOMEPAGE="https://www.skarnet.org/software/execline/"
+SRC_URI="https://www.skarnet.org/software/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(get_version_component_range 1-2)"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="static static-libs"
+
+DEPEND=">=sys-devel/make-3.81
+ static? (
+ >=dev-libs/skalibs-2.6.0.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.6.0.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.6.0.0:=
+ )
+"
+
+HTML_DOCS="doc/*"
+
+src_prepare() {
+ default
+
+ # Remove QA warning about LDFLAGS addition
+ sed -i "s/tryldflag LDFLAGS_AUTO -Wl,--hash-style=both/:/" "${S}/configure" || die
+
+ # configure overrides gentoo's -fstack-protector default
+ sed -i "/^tryflag CFLAGS_AUTO -fno-stack-protector$/d" "${S}/configure" || die
+}
+
+src_configure() {
+ econf \
+ --bindir=/bin \
+ --dynlibdir=/$(get_libdir) \
+ --libdir=/usr/$(get_libdir)/${PN} \
+ --with-dynlib=/$(get_libdir) \
+ --with-lib=/usr/$(get_libdir)/skalibs \
+ --with-sysdeps=/usr/$(get_libdir)/skalibs \
+ $(use_enable !static shared) \
+ $(use_enable static allstatic) \
+ $(use_enable static static-libc) \
+ $(use_enable static-libs static)
+}
diff --git a/dev-lang/execline/metadata.xml b/dev-lang/execline/metadata.xml
new file mode 100644
index 000000000000..a297f89a0795
--- /dev/null
+++ b/dev-lang/execline/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>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <longdescription lang="en">
+ Execline is a non-interactive scripting language similar to sh.
+ According to the home page, the syntax is far mor logical and
+ predictable than sh, and has no security issues.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/f2c/Manifest b/dev-lang/f2c/Manifest
new file mode 100644
index 000000000000..88a8414f6a70
--- /dev/null
+++ b/dev-lang/f2c/Manifest
@@ -0,0 +1,8 @@
+DIST f2c-20060507.tar.bz2 186677 SHA256 5d1f7579139bc474bdc5455a0d1726cab30f09f2c13c9110bdf3813066b10e2a SHA512 d0c9019b65a8ad2fd769ada596646a1cd9b682dcc8afa2cd99081376d967fbe959186a38d74570ab4bcce7622c58c8c10042948fa56e0a7080b12111c2b99b1e WHIRLPOOL a88b3e4aec80a064168ac640b6370fa5afc3d1584d6507abf53aefc471ef438aa4fded4e0cbe30d64c68324c93e97ec1f10097851f4850c55a3266bdd3ee34fc
+DIST f2c_20100827-1.debian.tar.gz 15659 SHA256 1597878d24b4261094f67853b681db1be53dce5a320052d52e5203de765bd2dd SHA512 784d3f1a74311a933b54103d36dd18eb879bef1816ea82e8d93ef5a0eb7582d4ddde3a2b764d15b78194bab4cdf940480089e8b920002134af66cdf095708535 WHIRLPOOL e71139315c318c160bddd2c76486d88b0429a7e8b8f67dd2e9d6f259e2b83ce6351a95b683d7caa95d31ca64c8421d07ff90d69ec7f974d62013653f8c6beb09
+DIST f2c_20100827.orig.tar.gz 417930 SHA256 d3d1bbf814e3f6d7adf4fb86d092997dbb4994899e85b9f436920b79f0ea55b9 SHA512 2c28d8c06e53b569816e7982725133d46e9b145a84ec51771f4cca2409098f894648ebe5b8089a1ddd8468be62394b0edb5985e50baeea8129e4f507236d6c0d WHIRLPOOL c19022a3b9d269d69e3e4f507a6675f632fc2ef29da825099083aaa71f6b547a61f1ff229c1ecf5b201a98d697f8226719a305c0bdb3684db10e19b3e8c6339d
+EBUILD f2c-20060507.ebuild 735 SHA256 6d578a338c3b2bcabd56bd31438c72b9d184f13e8fc8a9ae12b9da8e74297795 SHA512 4e453d835cfc79eff055678c4f266648737f4c42649b4f59dbce691598198f730eeca30be066f6e4ad8ef9c73af865143362224a806ac7118f2653d4cde3906c WHIRLPOOL 65fbfc6e757319f8e1b0f50d5166ed05c757598b833929c0634f77ef705ecf0c92139174b4ed8855896eebe410bcb34de62cef8f93f9814110172eb55f849107
+EBUILD f2c-20100827.ebuild 1171 SHA256 3f622bd0522df3ea632a77187c61d50e348e9eb10e952a177fb7b56c2bc2ff42 SHA512 332f261f4284a191ec7a1b83e000c0c7660767d8c4ccdd264603ede7c210dfc2fe4dbb14e115cdb0e41b6212812c8bc5e76c2f32ab01aef18a7b0da61320062f WHIRLPOOL fb1919abc3617d42683ef02f5734d6957bf51fefb5c9a98e5581ead2e63b4475a76d3212bbb296839eb79fa5ebf1027eb4e1377b3cad2ab33dc775ba2524a1eb
+MISC ChangeLog 2471 SHA256 77fc36f133bea806b388118d65e678552cde17c793aa6cee7161e8b2b611835a SHA512 eb7ae52f31b69244ad5eceea6fba5d9299a1db77e41def78e72b20777c76768723cd4d74a2f15924e35fd5f6194cf0ac08275d6315a17183cce1672dce755ce8 WHIRLPOOL f5ac997681da1237e487b3c0ff15fb041427e5aab64e4827cfc8251d0cb79165afbf102407af1b1f3496cecd29395b7f98f7d9b6d940e587bc15c7f44c196107
+MISC ChangeLog-2015 3672 SHA256 f982817a17607bdcc40295a61c1a8e84e5f5860ff1c5370529a67da41d303362 SHA512 ed468fab6f064b7ba1f57514bde8f4b6726c833270644093836d7f6bad24809abb009d005ed09c082d9b062a2b122001df4a11094d44acf0c64ad4c3dc6ab828 WHIRLPOOL 187430656ad0e4e2423e12f942b78de3fb739525d657b0c2771dd5048fe45fafb2da3e9152ceeca79a7422436cacfe92f8ebca6c0a0c759616776cd9d14de84e
+MISC metadata.xml 724 SHA256 712517c3b1d4631900e3babda25d6dec9f585fc845e43d844c433b1555ee590c SHA512 a49ac7d6c8a8ea8f0778707e43ee2eebf1d3070b4e7fd80b91ee6237b0bf9e256cad5795b32d09926e1b498d6daa7dd8c282d19a4feaca433c4f666c95ec6394 WHIRLPOOL 92ea79b071cf684aa5473e8d7ec7d934d8e972f6646154d7637c8ddef214144bdc882ee546fde8e9cbea1f62a9b9a9a28e9eb639ddff787c9e791c2722b94c13
diff --git a/dev-lang/f2c/f2c-20060507.ebuild b/dev-lang/f2c/f2c-20060507.ebuild
new file mode 100644
index 000000000000..59603fcccffb
--- /dev/null
+++ b/dev-lang/f2c/f2c-20060507.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Fortran to C converter"
+HOMEPAGE="http://www.netlib.org/f2c"
+#SRC_URI="ftp://netlib.bell-labs.com/netlib/f2c/src.tar"
+# To create, download src.tar, ungzip everything inside, then tar.bz2 the whole
+# thing.
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="dev-libs/libf2c"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/src"
+
+src_compile() {
+ emake \
+ -f makefile.u \
+ CC=$(tc-getCC) \
+ CFLAGS="${CFLAGS}" \
+ || die "make failed"
+}
+
+src_install() {
+ mv -f f2c.1t f2c.1
+ doman f2c.1
+ dobin f2c
+ dodoc README Notice
+}
diff --git a/dev-lang/f2c/f2c-20100827.ebuild b/dev-lang/f2c/f2c-20100827.ebuild
new file mode 100644
index 000000000000..0b14e397a542
--- /dev/null
+++ b/dev-lang/f2c/f2c-20100827.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DEB_PV=20100827
+DEB_PR=1
+DEB_P=${PN}_${DEB_PV}
+
+DESCRIPTION="Fortran to C converter"
+HOMEPAGE="http://www.netlib.org/f2c"
+SRC_URI="
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${DEB_P}.orig.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${DEB_P}-${DEB_PR}.debian.tar.gz"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+RDEPEND="dev-libs/libf2c"
+DEPEND=""
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ # selective list of patches from debian
+ epatch \
+ "${WORKDIR}"/debian/patches/0000-prequilt-tweaks.patch \
+ "${WORKDIR}"/debian/patches/0002-prototype-rmdir.patch \
+ "${WORKDIR}"/debian/patches/0003-struct-init-braces.patch \
+ "${WORKDIR}"/debian/patches/0004-man-dash-hyphen-slash.patch
+ sed -i -e '/^CC/d' -e '/^CFLAGS/d' src/makefile.u || die
+ tc-export CC
+}
+
+src_compile() {
+ emake -C src -f makefile.u
+}
+
+src_install() {
+ doman f2c.1
+ use doc && dodoc f2c.pdf
+ newdoc "${WORKDIR}"/debian/changelog debian.changelog
+ cd src
+ dobin f2c
+ dodoc README Notice
+}
diff --git a/dev-lang/f2c/metadata.xml b/dev-lang/f2c/metadata.xml
new file mode 100644
index 000000000000..1e43be760193
--- /dev/null
+++ b/dev-lang/f2c/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@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ F2C compiles FORTRAN 77 sources by converting to C/C++ sources and
+ compiling the later with gcc. The resulting binaries depend on the
+ libf2c runtime library.
+</longdescription>
+ <longdescription lang="de">
+ F2C kompiliert FORTRAN 77 Quellcode durch Konvertierung in C/C++
+ Quellcode und deren anschließendes Kompilieren mit Hilfe von gcc. Die
+ produzierten Binärdateien benötigen die Laufzeitbibliothek libf2c.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/ferite/Manifest b/dev-lang/ferite/Manifest
new file mode 100644
index 000000000000..928ed7b5dd34
--- /dev/null
+++ b/dev-lang/ferite/Manifest
@@ -0,0 +1,6 @@
+AUX ferite-pcre.patch 1356 SHA256 2148733692418cf7ede3896846b7e99d5d3b4c56bcb65ce9131e16994e2c9023 SHA512 e867c4b2fc993963bdf17d992d3dd007f636c85b0c13388480cec0f0ff70b6596274c19cd46b0e3ee11064f607b381f7f76888819ef6fb3bdd0804b07b5087fc WHIRLPOOL d15c4c31eebfe57adbf56ccdd71ec5a2afe7f9225f557e18463d43dc985e5f7e3a3403d5f81cde83490042192134292f94e087050b27fee50f21d6ef4717452d
+DIST ferite-1.1.17.tar.gz 2174774 SHA256 d407f3db45482e17f41820fb029cf8b06e6104699b8d7340f3946f57d3f4e690 SHA512 475983b865fba492661e59b7470b7e46889f29ed8ba829b112354963fafcbed6ab4d4677579337c1c4ed730c6fe02897743f56edae335ceda6277da975d1098f WHIRLPOOL d563849e7b1ebe19657f319ecf970ad4987d10c28c29729da2868b10b7466159f5210e8bb7c065b8fccb7314ebc764dc8dbe97484c138c70ec066ecd12ebb005
+EBUILD ferite-1.1.17-r1.ebuild 2419 SHA256 ae4ee24c64499bf4bd83f4361f68f489d800ae066aef0a92b620eebc04226d0a SHA512 bf2c5f4bda036da71a796a15d4b5a2f035fcf90a81800bc3241b55b86b52a6bdba659bff62a257c75e4d8a9499c1c8cae40523623db32299649b56b7de0bef7a WHIRLPOOL 2455efaf6a20f7868263c0179be569e56ed5accae0a672d55cfbd117e7b41fb2d1b8f4b00e09f5c72e307095670f068ac6fbe5ec0f4246f810777bfeb51449bb
+MISC ChangeLog 2553 SHA256 0a7aae8f3092327e6d5bedbf06e04ef5d2212b747bef5023a46056b8beb6541a SHA512 dd86351eff691b2590a9370497a47dec7369c75b1ac3d8eeb26947395059fa7623fa7025d57a9ca3f2a6bc76b64ded6c24a9681dcac1cdc04cc756d2109a7211 WHIRLPOOL 673378aba50ef105d3b9b081769d703e890599330c28769d618e2a31b04f8bd89e74bee49e293ecf993638ecd5be7de7bfe6c1bd8af62fb27092540b6b482fe4
+MISC ChangeLog-2015 4438 SHA256 61d6055eedfd8439d5dce49f488cb33aa184c1b0a9cd4ac2e213c6477c98f07a SHA512 4ebdf0b177e97336885aac056903d82671e90f1bd4901568221c3b79b1fdb271e73c629880e49cd459242fa92eebc9e31f36a2d0061d7482c5994bce0ab9818d WHIRLPOOL dd4c2743bce8cb4f20b5aa33567f77467677be071179991a9bef7923a8c09cc9ec406c8a0dfaf2ca006cc9d3f08af36fc8317ed2478025cb723eb457745e5220
+MISC metadata.xml 243 SHA256 be0540ef92c61b280de18eeff3f5a7a8e2f2e50789c8d63adb139c43641bfe22 SHA512 e3315331fae1a640778867a807694dc624ac88e4dbae2546780534a629d65d054cc6e376245fd31432d663775121cf07d74b2f1cd65d9d2d9cf9137d6598897a WHIRLPOOL b008f1ab60c9aa8de440c17a616e47acb505bda704d341bde8a9e5b64f54dd3f28067862340fc54cf61051f9f4b118a7184f051fe30e0b4268b977b3fd24dfc3
diff --git a/dev-lang/ferite/ferite-1.1.17-r1.ebuild b/dev-lang/ferite/ferite-1.1.17-r1.ebuild
new file mode 100644
index 000000000000..37886bbe0a6e
--- /dev/null
+++ b/dev-lang/ferite/ferite-1.1.17-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools eutils multilib
+
+DESCRIPTION="A clean, lightweight, object oriented scripting language"
+HOMEPAGE="http://www.ferite.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="1"
+KEYWORDS="~alpha amd64 ppc -sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+DEPEND="
+ >=dev-libs/libpcre-5
+ dev-libs/libxml2"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/ferite-pcre.patch
+
+ # use docsdir variable, install to DESTDIR
+ sed \
+ -e '/docsdir =/!s:$(prefix)/share/doc/ferite:$(DESTDIR)$(docsdir):' \
+ -i docs/Makefile.am || die
+
+ # Install docs to /usr/share/doc/${PF}, not .../${PN}
+ sed \
+ -e "s:doc/ferite:doc/${PF}:" \
+ -i Makefile.am \
+ docs/Makefile.am \
+ scripts/test/Makefile.am \
+ scripts/test/rmi/Makefile.am || die
+
+ # Don't override the user's LDFLAGS
+ sed \
+ -e 's:_LDFLAGS = :&$(AM_LDFLAGS) :' \
+ -e '/^LDFLAGS/s:^:AM_:' \
+ -i modules/*/Makefile.am \
+ libs/{aphex,triton}/src/Makefile.am \
+ src/Makefile.am || die
+
+ # Only build/install shared libs for modules (can't use static anyway)
+ sed -i -e '/_LDFLAGS/s:-module:& -shared:' modules/*/Makefile.am || die
+
+ # use LIBADD to ensure proper deps (fix parallel build)
+ sed \
+ -e '/^stream_la_LDFLAGS/s:-L\. -lferitestream::' \
+ -e '/^stream_la_LIBADD/s:$:libferitestream.la:' \
+ -i modules/stream/Makefile.am || die
+
+ # Make sure we install in $(get_libdir), not lib
+ sed -i -e "s|\$prefix/lib|\$prefix/$(get_libdir)|g" configure.ac || die
+
+ # We copy feritedoc to ${T} in src_install, then patch it in-situ
+ # note that this doesn't actually work right, currently - it still tries
+ # to pull from / instead of ${D}, and I can't figure out how to fix that
+ sed -i -e 's:$(prefix)/bin/:${T}/:' docs/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --libdir="${EPREFIX}/usr/$(get_libdir)"
+}
+
+src_install() {
+ cp tools/doc/feritedoc "${T}" || die
+ sed -i -e '/^prefix/s:prefix:${T}:g' "${T}"/feritedoc || die
+ sed -i -e '/^$prefix/s:$prefix/bin/ferite:'"${ED}"'usr/bin/ferite:' "${T}"/feritedoc || die
+ sed -i -e 's:$library_path $library_path:${S}/tools/doc ${S}/tools/doc:' "${T}"/feritedoc || die
+ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}${ED}usr/lib"
+ emake DESTDIR="${D}" LIBDIR="${EPREFIX}"/usr/$(get_libdir) install
+ prune_libtool_files
+}
diff --git a/dev-lang/ferite/files/ferite-pcre.patch b/dev-lang/ferite/files/ferite-pcre.patch
new file mode 100644
index 000000000000..1e2e19ce4811
--- /dev/null
+++ b/dev-lang/ferite/files/ferite-pcre.patch
@@ -0,0 +1,26 @@
+diff -pruN ferite-1.1.17.orig/modules/regexp/regexp.fec ferite-1.1.17/modules/regexp/regexp.fec
+--- ferite-1.1.17.orig/modules/regexp/regexp.fec 2009-07-15 19:21:34.000000000 +0200
++++ ferite-1.1.17/modules/regexp/regexp.fec 2013-02-01 02:33:40.438849775 +0100
+@@ -427,7 +427,8 @@ class Regexp {
+ }
+
+ /* get the number of subparts */
+- captured_str_cnt = pcre_info( rgx->compiled_re, NULL, NULL ) + 1;
++ pcre_fullinfo( rgx->compiled_re, NULL, PCRE_INFO_CAPTURECOUNT, &captured_str_cnt );
++ captured_str_cnt++;
+ /* create an offset array */
+ size_offsets = (int)(captured_str_cnt * 3);
+ offsets = (int *)fmalloc(size_offsets * sizeof(int));
+diff -pruN ferite-1.1.17.orig/modules/regexp/regexp_Regexp.c ferite-1.1.17/modules/regexp/regexp_Regexp.c
+--- ferite-1.1.17.orig/modules/regexp/regexp_Regexp.c 2009-07-17 08:59:19.000000000 +0200
++++ ferite-1.1.17/modules/regexp/regexp_Regexp.c 2013-02-01 02:33:16.647875845 +0100
+@@ -88,7 +88,8 @@ FE_NATIVE_FUNCTION( ferite_regexp_Regexp
+ }
+
+ /* get the number of subparts */
+- captured_str_cnt = pcre_info( rgx->compiled_re, NULL, NULL ) + 1;
++ pcre_fullinfo( rgx->compiled_re, NULL, PCRE_INFO_CAPTURECOUNT, &captured_str_cnt );
++ captured_str_cnt++;
+ /* create an offset array */
+ size_offsets = (int)(captured_str_cnt * 3);
+ offsets = (int *)fmalloc(size_offsets * sizeof(int));
diff --git a/dev-lang/ferite/metadata.xml b/dev-lang/ferite/metadata.xml
new file mode 100644
index 000000000000..e00696046401
--- /dev/null
+++ b/dev-lang/ferite/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-needed -->
+ <upstream>
+ <remote-id type="sourceforge">ferite</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/fpc/Manifest b/dev-lang/fpc/Manifest
new file mode 100644
index 000000000000..49e028240f84
--- /dev/null
+++ b/dev-lang/fpc/Manifest
@@ -0,0 +1,27 @@
+DIST fpc-2.6.2.sparc-linux.tar 33843200 SHA256 3a1918c7076e4984f8c085d0dde672907f730940214c5abca2d9513051d1cd79 SHA512 9f6ba30680bd51ccb6b627935ce2cc10dfa8671f621d5ef7d7e047b036c48934829e165c3f9bbac61bbccda8b679ee132fc26e41c4f9b66cf30966481eb81f09 WHIRLPOOL c754e925761d99bc0ad5185d19ee2f0db83a5c5bafca26051efccfeef4db5f3f29464542127d27b950a0cef6463f5333eec7dea260fd386fab74ec5ef26facf6
+DIST fpc-2.6.4-doc-html.tar.gz 4864530 SHA256 bdfa09ff5d362bc39262fa33f8f4365a4767871df17095b3cbf83582c60d0e3b SHA512 c76b15c3c9c47d687bb4760753f605a169c7e76b8b8478dc4e557d0a172f9e7ce7abb24fc1512f7eaa305807a1f4cb0a1305bb02e983f932b02aa9683026e54d WHIRLPOOL a24a99cc5a0450f377a3235b5d9d697a431e93a9825263869ee5d861dd91a3f3f18ca899beec01a8180e60da24769fb2e85c52c8be307e8fd5497dc3fc01aac9
+DIST fpc-2.6.4-fpctoc.htx.bz2 125626 SHA256 2718b88921370cadee365849224b0edbb3a2a0d4e3f2c9767f4631d246ce5050 SHA512 12fdc2755adfabbda74257b058e00072e5e11925b8e62cf7959b2acab90b3e226b8f51544a127f88fc3cd473ba9794e6c9da4e73c04ced2a0d41994b520cd33d WHIRLPOOL 73279b563c683fdb8c25546b9c3f8438a464ca6499f38e30bab2ab452c943802035753bd8c442fd17f12b02cffe79d29c2d242b38d37ab33e46553376a791331
+DIST fpc-2.6.4.arm-linux.tar 38440960 SHA256 cf0aa330a60327865125e74063ef9e62648f26ce8431fba548204e94c9da3fdc SHA512 3a11ebed39f37021201cac8a7e435d7ef3b1110d6893de7faf33651ff9b5a9aa13b6b529b0011132850386048483a55754ed8b1dba7de2e7ba9b2e881e7f0203 WHIRLPOOL 67e19376a6d5a1a5d374397e2af4d311cde5e2a06e9de31302a5c0f87ae9647c1510ab73216b4e9ab2cab0fd93050662154254cf89cc6a5c365dfad45a67ba04
+DIST fpc-2.6.4.i386-linux.tar 47718400 SHA256 3ca6271d18f9b4f48b4bd6e9500045cd18964aea62abede9cf9f130f3c72e602 SHA512 2c1c33c80553d8a331f4fb35e1b136ab195de9fa03ab566b218a265a64cc75447a697a34472fa9cceeedf1e3acd664fada2cd36d60b319ea43eed7e1f9e57615 WHIRLPOOL 4f2fa5b569907dcec030e4501670b7b2d4b13da429c9ef0900de64cda95820d05a03b290b4487ee86751264647d4218fa3d583f1054f8fb7fc9f39993c740ddb
+DIST fpc-2.6.4.powerpc-linux.tar 48220160 SHA256 c1af7e353b7ac40fdd542fbcb6fbfb0cc8f8c68bc0c89e14d3aeeac4c86ed752 SHA512 a78b416a6dd59a10ad50c3549956f15fae5962b64d43be1f1d605befd035732cf860146970dcb410080f9ceb2af1a4f798434fceb11be550cb87d41c72be1810 WHIRLPOOL 4a1d285c682b31f8cdd4cd6c317bd3ad26f88894117c9de71bb982e7ba6aab5fe21075687d4b141d01ef0362c00ea7b3b665d2fd2913e5bafdb6331f049588c3
+DIST fpc-2.6.4.powerpc64-linux.tar 53975040 SHA256 20a0b4ef0810afe826c4dbf7003f72f5968c3b7caa581e3202f29e38c075fa29 SHA512 0e978f68e339f12e2c53c8641c4f0918604b6b970949159dd20c49d65dabb5253d338d180da144eea3c6102a0110c401d03efbd634885220a320fce5fc686b16 WHIRLPOOL 65c3c496a32f86372db1eb7dc81dd413b0c813313fc6acf3d09c90d37c7c923b4c03420c9043b25dc054072bcbec4b8cb1255bd2e95ad1b966001d09d7031982
+DIST fpc-2.6.4.source.tar.gz 29904088 SHA256 c16f2e6e0274c7afc0f1d2dded22d0fec98fe329b1d5b2f011af1655f3a1cc29 SHA512 653968786b40c69c3703f67cddfe7c501686cc8b3524a045498c247dc36b66a6619e9cdb5bb5ca002fb700ddc0b653f2a4298e92527df46fc09c8a69e8e9c3a5 WHIRLPOOL 73fa37e002c1674dee097955b6e199df4bd2a25e0149121810593378b9083660bf1e3eda7398b07d9e97a5a6bdbffe41018d2e40d4b86915076f097422dae417
+DIST fpc-2.6.4.x86_64-linux.tar 50350080 SHA256 196c386f927d772c447fb4c84f61b29133891d14261f0ed3aa773c2f9dda3b39 SHA512 3a993d1f978353a1d68d8ce2cd62748a875b0d0589ed8daf71ebba545b51879b09173e26245e02ac327b5d64932153a7695975c02f3f266642b4ef68e8ff48dc WHIRLPOOL eba5dde2fa6614ebc1e3969a7a8524c779cdb7a3ebdb8855872669387488d5606f0c482cc8e9f8ac9db33203edbb5e0fc01c26c61d3179cd67479167705ecc2a
+DIST fpc-3.0.0-doc-html.tar.gz 5253600 SHA256 0e2f2d873750602f1ec21d879e710deec3cfc9cc015dd2694fd2e6b01f697111 SHA512 8a6fb405330eb5d4faa6bc892c7cd8b757b2e7b437e3ce19d85d5b98f702df936e1111e0ba9aac24099d20f6366a3bc8c674e087adbd463e62c2b5c615136486 WHIRLPOOL 0336fc2bfcb129e8c8bac25b85fc696cf516d08d5114df85a8b9f81c57850c66d357c169c453304edeb0c55f358d3c0dd5d3cfe6400e8b378aeb5ea57eccd41e
+DIST fpc-3.0.0.i386-linux.tar 44892160 SHA256 b3bc31c7650bea785ca44bd6e5a8d685bf2dad3ae6cd34f73e5dffa05f0b6e40 SHA512 6d409aaa3827018f27813d7965f2d820e36b725ad8ec3257b89688b0bbf722b41e44ab99495050422b91db71323a081bd60c68f3919d04f17b1922264ec10e13 WHIRLPOOL a3bce4937215a706b9ad2d14a1a96e0fd02b792524b36e3455b0dea40ee3ec404fb2cd8677f2488325a85ad52c95cb9143481a00a44010f70636c73de3cf0292
+DIST fpc-3.0.0.source.tar.gz 38311370 SHA256 46354862cefab8011bcfe3bc2942c435f96a8958b245c42e10283ec3e44be2dd SHA512 18b91a10320b0c52d0486aa241dbfeb5777eebe040f393f9b3661e8ab27a338b5a8d84c9461d40c6d11b362af2deb014f7c3fc273fc11fee1fc9badf19e18b88 WHIRLPOOL 08d4dad14255fcedab822d189abcd74d80b9e0596489277dced626dfcfda8a8768d035061c080a54ce2e977e0a0074204809359a4bb8c254a0316126427510c3
+DIST fpc-3.0.0.x86_64-linux.tar 46571520 SHA256 c952a6f1fc9a32da7a3f77c309e64fa1b536516e4fae16ff58ac10d5ece85dd4 SHA512 26502cf1dfd2bb83fe860e41cb064ccc5b971d112bf05f95e92089ea71bf0e3aafe659ef4cfc4967dd62271b5ecd3468fedf63dc351944b9e8cb52d662d4a3bb WHIRLPOOL 8d99e813da5c04b7160b42d87b759890af286903db982df9ad2e61b8e11f54f92994dd6b038252541ee46d8edd9ec217281ef3dfd9e34e8357023dde6b55500a
+DIST fpc-3.0.2-doc-html.tar.gz 5534720 SHA256 844b7f804526d27c7902d230357f4feee6724ac5ff5d9e8f4ec18db3a0fb9537 SHA512 1334e0bd5fbcc5d06513c9f9b1cd99b9a79782cca6224761d18ea314ba88da79517fac46c7135316f00bbaefd779080406f1b9e6c33ffb1e7b228f0c11618669 WHIRLPOOL 6bf46987f267079077a0334a816924ab17b093212f0814e68623a479c03b3efa60904c2e96a064870373af2aa6dd81336211e696466b050ea3399efbb8c4699b
+DIST fpc-3.0.2.i386-linux.tar 55019520 SHA256 2ddb0a27a7c38b5679bd818ae138e15820a2caaa1bc059d935e7e9fa643ff5ef SHA512 adeba89838eceec899edf54a7655a57551319c59eda9f437aa0b6a76bcce1d3cce691a69f40a9fa57ad5c9064abf514c07b879cf40e87cf55c6e10768deb1b7d WHIRLPOOL 6ce242565ef453d7f01ab11af95c82c360531d08a5dbecc3ce6df443b73e30a1294f958bc6f4a682ed773be7edafabd787ce00c5e20c6173952fd4b567d4e1d2
+DIST fpc-3.0.2.source.tar.gz 39841597 SHA256 67fccddf5da992356f4e90d836444750ce9363608c7db8e38c077f710fcb6258 SHA512 8b2540af910c31c96c4bf6bc546f7824b2acd9509fea76b5884370d8ebecd836c167a6ef98fac46b16278027cc15aa6a9f63fb72919e3a103408dc16416e43ae WHIRLPOOL 629d735593da7ecc39033493fe4524079976ab5b2109014d88ab75dc231c512cb1baadde27b1c393b1562627c9ad5101f6f37106f4fde6cbbb21aca9311f4adc
+DIST fpc-3.0.2.x86_64-linux.tar 57190400 SHA256 b5b27fdbc31b1d05b6a898f3c192d8a5083050562b29c19eb9eb018ba4482bd8 SHA512 fac103f3bf7fad5af9a435831f456c5dd7b546729f56c4b51b2a6dedceea27b331edf48024b4ec7993e50432332e8404ae63d64913d793e787756413c8d95417 WHIRLPOOL d8888928b6e5c7c39ad8e16b9eae5871581e86d6dcc588b2dafcef8c936d341b21019d69c436968b0a29942b527ce3f0bb2ec5166b961046ac1833efa6efae47
+DIST fpcbuild-2.6.4.tar.gz 55604643 SHA256 8d9c3bcfa469d9b37c05663e2775d179809e4b3443604fac7d21aa64c9a56daa SHA512 7c48fb48a3742ffe533a8a172758071c0a1129ffac09231e6969aa1d31bac346dc764598b6ae78dc9d25585a788f6ed4f2b4c39502774d4d3620f09185b807de WHIRLPOOL d2cb72917031f6ffaeb66c2e1e4f0bc18050da2437241da9e6655af4f62aa3e05c7f7c89ba88ba3f96ee20571c3e0d733bebab7a9c2e3f04aa2f0208bb1dc7f9
+DIST fpcbuild-3.0.0.tar.gz 66934428 SHA256 d5913b1d5d3d13190ae7ee72c305d5da49ac2ddc1b375b814751ef09ae5c80ec SHA512 d010cdc2dd2d4c6efe67cf005d0babb00c2a8ae70942c8b838bb690153ad72e52c0d7198eded7bbde8c77e64d28b2d7f5a220fdcd6117e5991cd11a24369d1f1 WHIRLPOOL 1b0d68b0b1f9f9825a21774269a02eb6144932af1e132932b88bc10d0d234a20b8b441b2281abf50c919e4dd8e20e97a4467b7a6498d2d13a887167f44999e76
+DIST fpcbuild-3.0.2.tar.gz 68407379 SHA256 f261ed0a361f190169fff428d65b707df1507df317fc0ed101b0e63596541b75 SHA512 dfa4865d8166b7903914ac101e48bae9761671a77e37cbfd54c2ee8eb6b2ba0e5f3ac4b55867a2ead79499dbae68cc785db531385c5b77d533945c644a2f6fe6 WHIRLPOOL 27568e7dc9d4ee3a8c30dbf68f4cd03a4fa23ddd7ede67253d3da897b48aa2fcd0a537e68432058c8cc030af18c42649e04a4a60b1a58d08b539da09e5fb9dfa
+EBUILD fpc-2.6.4.ebuild 4822 SHA256 1bd56a51a465b1c7444fa108fc3691155823f995e8b0c72536179d84117f2251 SHA512 c9f972c77e85c2ed949e4c3093e2710a093cdb78f29dc3ff6108e320aa38a5c2184f0b81f1f264486ccb48462d672bf313af124c02fd7774fa6098522c5a3d66 WHIRLPOOL 9ed79d4b96c98899825b5acd8d2105b11405431dbf51b37087d9e49c9208b6507e9878487dd60094e1fad59a17e94d17aa24c85152cac6ef501ddc819ddf2e68
+EBUILD fpc-3.0.0.ebuild 4228 SHA256 4e2a1bad75a6b5a22fe679ebc9a7eb6bce1f8391f4b2b4e36329eb75a0d40ef6 SHA512 557e48b626a1845231584e19aa55dd935c889630663416f29f133520bf5e1ae22504c8213eee86dc61d42a676a711b686aca9865100a440295654986f2d6dd5b WHIRLPOOL 5b9da01589d57ad5e7af484ac90491a161330ebdeb5fcb7329f4e674c40fca2bc2e1316c45afbcd394e9732ed221ce7b5cdd7138db2dce19a833d9469df27d65
+EBUILD fpc-3.0.2-r1.ebuild 4464 SHA256 e3103982ae05cf1da70bc39d924f91d63fb631dbb6c79312e44f4c49f2b14218 SHA512 7ee63fa4801074005b248a192f0905e8d146ab06cc43b797460dce60c1418aac4ac1600bb055c428766c36ee1f28db3ab18ea45ca1313684f2a275ec86b20fa5 WHIRLPOOL 1e5cf82ef414b42090beb8403183cd9b533fd6c0b1ece22e5f35d93dfbeb15bbceeaa41e84d98b84a789e0327711f5005da13a2581ed6198923d512020a21abb
+EBUILD fpc-3.0.2.ebuild 4251 SHA256 4c1a2d508f1575bcf7a0543f1aa2667b656ee53952b4862ffe7f1310516936d1 SHA512 b791aaaf9af69e00559de87f48f3c358ff3772dff3fdabc94c02b57d84265ad5df19b069ccb25a2cf58ef68408668f6720480ca697911f9faf1fd45b7687eef6 WHIRLPOOL cd6255f355ad0aa9c49f1dbbe0a3e5c3c7720d1a18ec4f4a35d5c09374b22df6ee42f74b7efbd21023252537520fe78b3d110bbb6fc42bb34e8f9f57253a997c
+MISC ChangeLog 2961 SHA256 9af9ff2ca7681521126d727c633bf80a3044dc043e5f8ff2ffbd504ef620e49a SHA512 59ecb69f25ed22137f0114ba63019759236deab28a8725bbe0752ceafc6f2e00f7ff9f24bdb12ce26349eba3bef6947e7cae39185e68a7165be305877b11e2e2 WHIRLPOOL b13a5ca94e84ffa00fd7e83a17259c63a3d9e5de577004cc3c79d746406fb8cdfbf45f8fd64e81f74faa2d653b61369501646d55e3e2c8ff715766cd874e14d7
+MISC ChangeLog-2015 9613 SHA256 d49081f703912de7bbe3f5957165af90b9c2d9b39747c80031be6f7d971acca0 SHA512 2c9a0c3fa20a3b2be63695cb69f4ea17df2f354ddc460fd69134e1f0ddc6ebeb8b1081cf6aea3929df11787c887bd4c81f1a7e681c9247946eb52ae198f7a3c4 WHIRLPOOL 4c271e7ad58c5cbaae136a1fa1f9c39976432c011defbe60341d44ef253cef1e4e989867a9a735756b4773ea519e1e4527705aa4bc2d26c329d45375b205fcc4
+MISC metadata.xml 385 SHA256 5ba51aea2e0ff1b88dc58583748b547703cdd4ce8b444a1daed73e198a2bfd4c SHA512 1d1ec643e71bbaf3f38dd0f817aeba74f8871071a429b203b3b3397b114ef09e89cb5f166a08e7027e834f4f2ef6ad26049063a2d633ecbd65754945d0be1c46 WHIRLPOOL fd2e25df41c1eb0b88277664c3db423a6e5bec5583c1507eda674eeb13a11ccd4a5a0a9f0a93e4014c807a914d20a063a9c48b8859c8977f5498b341c633dcbc
diff --git a/dev-lang/fpc/fpc-2.6.4.ebuild b/dev-lang/fpc/fpc-2.6.4.ebuild
new file mode 100644
index 000000000000..08d31db8fecf
--- /dev/null
+++ b/dev-lang/fpc/fpc-2.6.4.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+HOMEPAGE="https://www.freepascal.org/"
+DESCRIPTION="Free Pascal Compiler"
+SRC_URI="mirror://sourceforge/freepascal/fpcbuild-${PV}.tar.gz
+ mirror://sourceforge/freepascal/fpc-${PV}.source.tar.gz
+ amd64? ( mirror://sourceforge/freepascal/${P}.x86_64-linux.tar )
+ arm? ( mirror://sourceforge/freepascal/${P}.arm-linux.tar )
+ ppc? ( mirror://sourceforge/freepascal/${P}.powerpc-linux.tar )
+ ppc64? ( mirror://sourceforge/freepascal/${P}.powerpc64-linux.tar )
+ sparc? ( mirror://sourceforge/freepascal/${PN}-2.6.2.sparc-linux.tar )
+ x86? ( mirror://sourceforge/freepascal/${P}.i386-linux.tar )
+ doc? ( mirror://sourceforge/freepascal/Documentation/${PV}/doc-html.tar.gz -> ${P}-doc-html.tar.gz
+ https://dev.gentoo.org/~radhermit/distfiles/${P}-fpctoc.htx.bz2 )"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+KEYWORDS="amd64 ~arm ppc x86"
+IUSE="doc ide source"
+
+RDEPEND="ide? ( !dev-lang/fpc-ide )"
+
+RESTRICT="strip" #269221
+
+S=${WORKDIR}/fpcbuild-${PV}/fpcsrc
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ # Bug 475210
+ if $(tc-getLD) --version | grep -q "GNU gold"; then
+ eerror "fpc does not function correctly when built with the gold linker."
+ eerror "Please select the bfd linker with binutils-config."
+ die "GNU gold detected"
+ fi
+ fi
+}
+
+src_unpack() {
+ case ${ARCH} in
+ amd64) FPC_ARCH="x86_64" PV_BIN=${PV} ;;
+ arm) FPC_ARCH="arm" PV_BIN=${PV} ;;
+ ppc) FPC_ARCH="powerpc" PV_BIN=${PV} ;;
+ ppc64) FPC_ARCH="powerpc64" PV_BIN=${PV} ;;
+ sparc) FPC_ARCH="sparc" PV_BIN=2.6.2 ;;
+ x86) FPC_ARCH="i386" PV_BIN=${PV} ;;
+ *) die "This ebuild doesn't support ${ARCH}." ;;
+ esac
+
+ unpack ${A}
+
+ tar -xf ${PN}-${PV_BIN}.${FPC_ARCH}-linux/binary.${FPC_ARCH}-linux.tar || die "Unpacking binary.${FPC_ARCH}-linux.tar failed!"
+ tar -xzf base.${FPC_ARCH}-linux.tar.gz || die "Unpacking base.${FPC_ARCH}-linux.tar.gz failed!"
+}
+
+src_prepare() {
+ find "${WORKDIR}" -name Makefile -exec sed -i -e 's/ -Xs / /g' {} + || die
+
+ # let the pkg manager compress man files
+ sed -i '/find man.* gzip /d' "${WORKDIR}"/fpcbuild-${PV}/install/man/Makefile || die
+}
+
+set_pp() {
+ case ${ARCH} in
+ amd64) FPC_ARCH="x64" ;;
+ arm) FPC_ARCH="arm" ;;
+ ppc) FPC_ARCH="ppc" ;;
+ ppc64) FPC_ARCH="ppc64" ;;
+ sparc) FPC_ARCH="sparc" ;;
+ x86) FPC_ARCH="386" ;;
+ *) die "This ebuild doesn't support ${ARCH}." ;;
+ esac
+
+ case ${1} in
+ bootstrap) pp="${WORKDIR}"/lib/fpc/${PV_BIN}/ppc${FPC_ARCH} ;;
+ new) pp="${S}"/compiler/ppc${FPC_ARCH} ;;
+ *) die "set_pp: unknown argument: ${1}" ;;
+ esac
+}
+
+src_compile() {
+ local pp
+
+ # Using the bootstrap compiler.
+ set_pp bootstrap
+
+ emake -j1 PP="${pp}" compiler_cycle AS="$(tc-getAS)"
+
+ # Save new compiler from cleaning...
+ cp "${S}"/compiler/ppc${FPC_ARCH} "${S}"/ppc${FPC_ARCH}.new || die
+
+ # ...rebuild with current version...
+ emake -j1 PP="${S}"/ppc${FPC_ARCH}.new AS="$(tc-getAS)" compiler_cycle
+
+ # ..and clean up afterwards
+ rm "${S}"/ppc${FPC_ARCH}.new || die
+
+ # Using the new compiler.
+ set_pp new
+
+ emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl_clean
+
+ emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl packages_all utils
+
+ if use ide ; then
+ cd "${S}"/ide || die
+ emake -j1 PP="${pp}" AS="$(tc-getAS)"
+ fi
+}
+
+src_install() {
+ local pp
+ set_pp new
+
+ set -- PP="${pp}" FPCMAKE="${S}/utils/fpcm/fpcmake" \
+ INSTALL_PREFIX="${D}"/usr \
+ INSTALL_DOCDIR="${D}"/usr/share/doc/${PF} \
+ INSTALL_MANDIR="${D}"/usr/share/man \
+ INSTALL_SOURCEDIR="${D}"/usr/lib/fpc/${PV}/source
+
+ emake -j1 "$@" compiler_install rtl_install packages_install utils_install
+
+ dosym ../lib/fpc/${PV}/ppc${FPC_ARCH} /usr/bin/ppc${FPC_ARCH}
+
+ cd "${S}"/../install/doc || die
+ emake -j1 "$@" installdoc
+
+ cd "${S}"/../install/man || die
+ emake -j1 "$@" installman
+
+ if use doc ; then
+ cd "${S}"/../../doc || die
+ dodoc -r *
+ newdoc "${WORKDIR}"/${P}-fpctoc.htx fpctoc.htx
+ docompress -x /usr/share/doc/${PF}/fpctoc.htx
+ fi
+
+ if use ide ; then
+ cd "${S}"/ide
+ emake -j1 "$@" install
+ fi
+
+ if use source ; then
+ cd "${S}" || die
+ shift
+ emake -j1 PP="${D}"/usr/bin/ppc${FPC_ARCH} "$@" sourceinstall
+ find "${D}"/usr/lib/fpc/${PV}/source -name '*.o' -exec rm {} \;
+ fi
+
+ "${D}"/usr/lib/fpc/${PV}/samplecfg "${D}"/usr/lib/fpc/${PV} "${D}"/etc || die
+
+ sed -i "s:${D}::g" "${D}"/etc/fpc.cfg || die
+
+ if use ide ; then
+ sed -e "s:${D}::g" \
+ -i "${D}"/etc/fppkg.cfg \
+ -i "${D}"/etc/fppkg/* \
+ -i "${D}"/usr/lib/fpc/${PV}/ide/text/fp*.cfg \
+ || die
+ fi
+
+ rm -r "${D}"/usr/lib/fpc/lexyacc || die
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] && use ide; then
+ einfo "To read the documentation in the fpc IDE, enable the doc USE flag"
+ einfo "and add /usr/share/doc/${PF}/fpctoc.htx to the Help Files list."
+ fi
+}
diff --git a/dev-lang/fpc/fpc-3.0.0.ebuild b/dev-lang/fpc/fpc-3.0.0.ebuild
new file mode 100644
index 000000000000..8e703c097ba0
--- /dev/null
+++ b/dev-lang/fpc/fpc-3.0.0.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+HOMEPAGE="https://www.freepascal.org/"
+DESCRIPTION="Free Pascal Compiler"
+SRC_URI="mirror://sourceforge/freepascal/fpcbuild-${PV}.tar.gz
+ mirror://sourceforge/freepascal/fpc-${PV}.source.tar.gz
+ amd64? ( mirror://sourceforge/freepascal/${P}.x86_64-linux.tar )
+ x86? ( mirror://sourceforge/freepascal/${P}.i386-linux.tar )
+ doc? ( mirror://sourceforge/freepascal/Documentation/${PV}/doc-html.tar.gz -> ${P}-doc-html.tar.gz )"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc ide source"
+
+RDEPEND="ide? ( !dev-lang/fpc-ide )"
+
+RESTRICT="strip" #269221
+
+S=${WORKDIR}/fpcbuild-${PV}/fpcsrc
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ # Bug 475210
+ if $(tc-getLD) --version | grep -q "GNU gold"; then
+ eerror "fpc does not function correctly when built with the gold linker."
+ eerror "Please select the bfd linker with binutils-config."
+ die "GNU gold detected"
+ fi
+ fi
+}
+
+src_unpack() {
+ case ${ARCH} in
+ amd64) FPC_ARCH="x86_64" PV_BIN=${PV} ;;
+ x86) FPC_ARCH="i386" PV_BIN=${PV} ;;
+ *) die "This ebuild doesn't support ${ARCH}." ;;
+ esac
+
+ unpack ${A}
+
+ tar -xf ${PN}-${PV_BIN}.${FPC_ARCH}-linux/binary.${FPC_ARCH}-linux.tar || die "Unpacking binary.${FPC_ARCH}-linux.tar failed!"
+ tar -xzf base.${FPC_ARCH}-linux.tar.gz || die "Unpacking base.${FPC_ARCH}-linux.tar.gz failed!"
+}
+
+src_prepare() {
+ find "${WORKDIR}" -name Makefile -exec sed -i -e 's/ -Xs / /g' {} + || die
+
+ # let the pkg manager compress man files
+ sed -i '/find man.* gzip /d' "${WORKDIR}"/fpcbuild-${PV}/install/man/Makefile || die
+}
+
+set_pp() {
+ case ${ARCH} in
+ amd64) FPC_ARCH="x64" FPC_PARCH="x86_64" ;;
+ x86) FPC_ARCH="386" FPC_PARCH="i386" ;;
+ *) die "This ebuild doesn't support ${ARCH}." ;;
+ esac
+
+ case ${1} in
+ bootstrap) pp="${WORKDIR}"/lib/fpc/${PV_BIN}/ppc${FPC_ARCH} ;;
+ new) pp="${S}"/compiler/ppc${FPC_ARCH} ;;
+ *) die "set_pp: unknown argument: ${1}" ;;
+ esac
+}
+
+src_compile() {
+ local pp
+
+ # Using the bootstrap compiler.
+ set_pp bootstrap
+
+ emake -j1 PP="${pp}" compiler_cycle AS="$(tc-getAS)"
+
+ # Save new compiler from cleaning...
+ cp "${S}"/compiler/ppc${FPC_ARCH} "${S}"/ppc${FPC_ARCH}.new || die
+
+ # ...rebuild with current version...
+ emake -j1 PP="${S}"/ppc${FPC_ARCH}.new AS="$(tc-getAS)" compiler_cycle
+
+ # ..and clean up afterwards
+ rm "${S}"/ppc${FPC_ARCH}.new || die
+
+ # Using the new compiler.
+ set_pp new
+
+ emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl_clean
+
+ emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl packages_all utils
+
+ if use ide ; then
+ cd "${S}"/ide || die
+ emake -j1 PP="${pp}" AS="$(tc-getAS)"
+ fi
+}
+
+src_install() {
+ local pp
+ set_pp new
+
+ #fpcbuild-3.0.0/utils/fpcm/fpcmake
+ #${WORKDIR}/${PN}build-${PV}/utils/fpcm/fpcmake"
+ #fpcbuild-3.0.0/fpcsrc/utils/fpcm/bin/x86_64-linux/fpcmake
+ set -- PP="${pp}" FPCMAKE="${S}/utils/fpcm/bin/${FPC_PARCH}-linux/fpcmake" \
+ INSTALL_PREFIX="${D}"/usr \
+ INSTALL_DOCDIR="${D}"/usr/share/doc/${PF} \
+ INSTALL_MANDIR="${D}"/usr/share/man \
+ INSTALL_SOURCEDIR="${D}"/usr/lib/fpc/${PV}/source
+
+ emake -j1 "$@" compiler_install rtl_install packages_install utils_install
+
+ dosym ../lib/fpc/${PV}/ppc${FPC_ARCH} /usr/bin/ppc${FPC_ARCH}
+
+ cd "${S}"/../install/doc || die
+ emake -j1 "$@" installdoc
+
+ cd "${S}"/../install/man || die
+ emake -j1 "$@" installman
+
+ if use doc ; then
+ cd "${S}"/../../doc || die
+ dodoc -r *
+ fi
+
+ if use ide ; then
+ cd "${S}"/ide
+ emake -j1 "$@" install
+ fi
+
+ if use source ; then
+ cd "${S}" || die
+ shift
+ emake -j1 PP="${D}"/usr/bin/ppc${FPC_ARCH} "$@" sourceinstall
+ find "${D}"/usr/lib/fpc/${PV}/source -name '*.o' -exec rm {} \;
+ fi
+
+ "${D}"/usr/lib/fpc/${PV}/samplecfg "${D}"/usr/lib/fpc/${PV} "${D}"/etc || die
+
+ sed -i "s:${D}::g" "${D}"/etc/fpc.cfg || die
+
+ if use ide ; then
+ sed -e "s:${D}::g" \
+ -i "${D}"/etc/fppkg.cfg \
+ -i "${D}"/etc/fppkg/* \
+ -i "${D}"/usr/lib/fpc/${PV}/ide/text/fp*.cfg \
+ || die
+ fi
+
+ rm -r "${D}"/usr/lib/fpc/lexyacc || die
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] && use ide; then
+ einfo "To read the documentation in the fpc IDE, enable the doc USE flag"
+ fi
+}
diff --git a/dev-lang/fpc/fpc-3.0.2-r1.ebuild b/dev-lang/fpc/fpc-3.0.2-r1.ebuild
new file mode 100644
index 000000000000..38a17395ed74
--- /dev/null
+++ b/dev-lang/fpc/fpc-3.0.2-r1.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit prefix toolchain-funcs
+
+HOMEPAGE="https://www.freepascal.org/"
+DESCRIPTION="Free Pascal Compiler"
+SRC_URI="mirror://sourceforge/freepascal/fpcbuild-${PV}.tar.gz
+ mirror://sourceforge/freepascal/fpc-${PV}.source.tar.gz
+ amd64? ( mirror://sourceforge/freepascal/${P}.x86_64-linux.tar )
+ x86? ( mirror://sourceforge/freepascal/${P}.i386-linux.tar )
+ doc? ( mirror://sourceforge/freepascal/Documentation/${PV}/doc-html.tar.gz -> ${P}-doc-html.tar.gz )"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc ide source"
+
+RDEPEND="ide? ( !dev-lang/fpc-ide )"
+
+RESTRICT="strip" #269221
+
+S=${WORKDIR}/fpcbuild-${PV}/fpcsrc
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ # Bug 475210
+ if $(tc-getLD) --version | grep -q "GNU gold"; then
+ eerror "fpc does not function correctly when built with the gold linker."
+ eerror "Please select the bfd linker with binutils-config."
+ die "GNU gold detected"
+ fi
+ fi
+}
+
+src_unpack() {
+ case ${ARCH} in
+ amd64) FPC_ARCH="x86_64" PV_BIN=${PV} ;;
+ x86) FPC_ARCH="i386" PV_BIN=${PV} ;;
+ *) die "This ebuild doesn't support ${ARCH}." ;;
+ esac
+
+ unpack ${A}
+
+ tar -xf ${PN}-${PV_BIN}.${FPC_ARCH}-linux/binary.${FPC_ARCH}-linux.tar || die "Unpacking binary.${FPC_ARCH}-linux.tar failed!"
+ tar -xzf base.${FPC_ARCH}-linux.tar.gz || die "Unpacking base.${FPC_ARCH}-linux.tar.gz failed!"
+}
+
+src_prepare() {
+ find "${WORKDIR}" -name Makefile -exec sed -i -e 's/ -Xs / /g' {} + || die
+
+ # let the pkg manager compress man files
+ sed -i '/find man.* gzip /d' "${WORKDIR}"/fpcbuild-${PV}/install/man/Makefile || die
+
+ # make the compiled binary check for fpc.cfg under the prefixed /etc/ path
+ hprefixify "${WORKDIR}"/fpcbuild-${PV}/fpcsrc/compiler/options.pas
+}
+
+set_pp() {
+ case ${ARCH} in
+ amd64) FPC_ARCH="x64" FPC_PARCH="x86_64" ;;
+ x86) FPC_ARCH="386" FPC_PARCH="i386" ;;
+ *) die "This ebuild doesn't support ${ARCH}." ;;
+ esac
+
+ case ${1} in
+ bootstrap) pp="${WORKDIR}"/lib/fpc/${PV_BIN}/ppc${FPC_ARCH} ;;
+ new) pp="${S}"/compiler/ppc${FPC_ARCH} ;;
+ *) die "set_pp: unknown argument: ${1}" ;;
+ esac
+}
+
+src_compile() {
+ local pp
+
+ # Using the bootstrap compiler.
+ set_pp bootstrap
+
+ emake -j1 PP="${pp}" compiler_cycle AS="$(tc-getAS)"
+
+ # Save new compiler from cleaning...
+ cp "${S}"/compiler/ppc${FPC_ARCH} "${S}"/ppc${FPC_ARCH}.new || die
+
+ # ...rebuild with current version...
+ emake -j1 PP="${S}"/ppc${FPC_ARCH}.new AS="$(tc-getAS)" compiler_cycle
+
+ # ..and clean up afterwards
+ rm "${S}"/ppc${FPC_ARCH}.new || die
+
+ # Using the new compiler.
+ set_pp new
+
+ emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl_clean
+
+ emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl packages_all utils
+
+ if use ide ; then
+ cd "${S}"/ide || die
+ emake -j1 PP="${pp}" AS="$(tc-getAS)"
+ fi
+}
+
+src_install() {
+ local pp
+ set_pp new
+
+ #fpcbuild-3.0.0/utils/fpcm/fpcmake
+ #${WORKDIR}/${PN}build-${PV}/utils/fpcm/fpcmake"
+ #fpcbuild-3.0.0/fpcsrc/utils/fpcm/bin/x86_64-linux/fpcmake
+ set -- PP="${pp}" FPCMAKE="${S}/utils/fpcm/bin/${FPC_PARCH}-linux/fpcmake" \
+ INSTALL_PREFIX="${ED}"/usr \
+ INSTALL_DOCDIR="${ED}"/usr/share/doc/${PF} \
+ INSTALL_MANDIR="${ED}"/usr/share/man \
+ INSTALL_SOURCEDIR="${ED}"/usr/lib/fpc/${PV}/source
+
+ emake -j1 "$@" compiler_install rtl_install packages_install utils_install
+
+ dosym ../lib/fpc/${PV}/ppc${FPC_ARCH} /usr/bin/ppc${FPC_ARCH}
+
+ cd "${S}"/../install/doc || die
+ emake -j1 "$@" installdoc
+
+ cd "${S}"/../install/man || die
+ emake -j1 "$@" installman
+
+ if use doc ; then
+ cd "${S}"/../../doc || die
+ dodoc -r *
+ fi
+
+ if use ide ; then
+ cd "${S}"/ide || die
+ emake -j1 "$@" install
+ fi
+
+ if use source ; then
+ cd "${S}" || die
+ shift
+ emake -j1 PP="${ED}"/usr/bin/ppc${FPC_ARCH} "$@" sourceinstall
+ find "${ED}"/usr/lib/fpc/${PV}/source -name '*.o' -exec rm {} \;
+ fi
+
+ "${ED}"/usr/lib/fpc/${PV}/samplecfg "${ED}"/usr/lib/fpc/${PV} "${ED}"/etc || die
+
+ # set correct (prefixed) path for e.g. unit files
+ sed -i "s:${ED}:${EPREFIX}:g" "${ED}"/etc/fpc.cfg || die
+
+ if use ide ; then
+ sed -e "s:${ED}::g" \
+ -i "${ED}"/etc/fppkg.cfg \
+ -i "${ED}"/etc/fppkg/* \
+ -i "${ED}"/usr/lib/fpc/${PV}/ide/text/fp*.cfg \
+ || die
+ fi
+
+ rm -r "${ED}"/usr/lib/fpc/lexyacc || die
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] && use ide; then
+ einfo "To read the documentation in the fpc IDE, enable the doc USE flag"
+ fi
+}
diff --git a/dev-lang/fpc/fpc-3.0.2.ebuild b/dev-lang/fpc/fpc-3.0.2.ebuild
new file mode 100644
index 000000000000..f8ea1b5b8b4c
--- /dev/null
+++ b/dev-lang/fpc/fpc-3.0.2.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+HOMEPAGE="https://www.freepascal.org/"
+DESCRIPTION="Free Pascal Compiler"
+SRC_URI="mirror://sourceforge/freepascal/fpcbuild-${PV}.tar.gz
+ mirror://sourceforge/freepascal/fpc-${PV}.source.tar.gz
+ amd64? ( mirror://sourceforge/freepascal/${P}.x86_64-linux.tar )
+ x86? ( mirror://sourceforge/freepascal/${P}.i386-linux.tar )
+ doc? ( mirror://sourceforge/freepascal/Documentation/${PV}/doc-html.tar.gz -> ${P}-doc-html.tar.gz )"
+
+SLOT="0"
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc ide source"
+
+RDEPEND="ide? ( !dev-lang/fpc-ide )"
+
+RESTRICT="strip" #269221
+
+S=${WORKDIR}/fpcbuild-${PV}/fpcsrc
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ # Bug 475210
+ if $(tc-getLD) --version | grep -q "GNU gold"; then
+ eerror "fpc does not function correctly when built with the gold linker."
+ eerror "Please select the bfd linker with binutils-config."
+ die "GNU gold detected"
+ fi
+ fi
+}
+
+src_unpack() {
+ case ${ARCH} in
+ amd64) FPC_ARCH="x86_64" PV_BIN=${PV} ;;
+ x86) FPC_ARCH="i386" PV_BIN=${PV} ;;
+ *) die "This ebuild doesn't support ${ARCH}." ;;
+ esac
+
+ unpack ${A}
+
+ tar -xf ${PN}-${PV_BIN}.${FPC_ARCH}-linux/binary.${FPC_ARCH}-linux.tar || die "Unpacking binary.${FPC_ARCH}-linux.tar failed!"
+ tar -xzf base.${FPC_ARCH}-linux.tar.gz || die "Unpacking base.${FPC_ARCH}-linux.tar.gz failed!"
+}
+
+src_prepare() {
+ find "${WORKDIR}" -name Makefile -exec sed -i -e 's/ -Xs / /g' {} + || die
+
+ # let the pkg manager compress man files
+ sed -i '/find man.* gzip /d' "${WORKDIR}"/fpcbuild-${PV}/install/man/Makefile || die
+}
+
+set_pp() {
+ case ${ARCH} in
+ amd64) FPC_ARCH="x64" FPC_PARCH="x86_64" ;;
+ x86) FPC_ARCH="386" FPC_PARCH="i386" ;;
+ *) die "This ebuild doesn't support ${ARCH}." ;;
+ esac
+
+ case ${1} in
+ bootstrap) pp="${WORKDIR}"/lib/fpc/${PV_BIN}/ppc${FPC_ARCH} ;;
+ new) pp="${S}"/compiler/ppc${FPC_ARCH} ;;
+ *) die "set_pp: unknown argument: ${1}" ;;
+ esac
+}
+
+src_compile() {
+ local pp
+
+ # Using the bootstrap compiler.
+ set_pp bootstrap
+
+ emake -j1 PP="${pp}" compiler_cycle AS="$(tc-getAS)"
+
+ # Save new compiler from cleaning...
+ cp "${S}"/compiler/ppc${FPC_ARCH} "${S}"/ppc${FPC_ARCH}.new || die
+
+ # ...rebuild with current version...
+ emake -j1 PP="${S}"/ppc${FPC_ARCH}.new AS="$(tc-getAS)" compiler_cycle
+
+ # ..and clean up afterwards
+ rm "${S}"/ppc${FPC_ARCH}.new || die
+
+ # Using the new compiler.
+ set_pp new
+
+ emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl_clean
+
+ emake -j1 PP="${pp}" AS="$(tc-getAS)" rtl packages_all utils
+
+ if use ide ; then
+ cd "${S}"/ide || die
+ emake -j1 PP="${pp}" AS="$(tc-getAS)"
+ fi
+}
+
+src_install() {
+ local pp
+ set_pp new
+
+ #fpcbuild-3.0.0/utils/fpcm/fpcmake
+ #${WORKDIR}/${PN}build-${PV}/utils/fpcm/fpcmake"
+ #fpcbuild-3.0.0/fpcsrc/utils/fpcm/bin/x86_64-linux/fpcmake
+ set -- PP="${pp}" FPCMAKE="${S}/utils/fpcm/bin/${FPC_PARCH}-linux/fpcmake" \
+ INSTALL_PREFIX="${ED}"/usr \
+ INSTALL_DOCDIR="${ED}"/usr/share/doc/${PF} \
+ INSTALL_MANDIR="${ED}"/usr/share/man \
+ INSTALL_SOURCEDIR="${ED}"/usr/lib/fpc/${PV}/source
+
+ emake -j1 "$@" compiler_install rtl_install packages_install utils_install
+
+ dosym ../lib/fpc/${PV}/ppc${FPC_ARCH} /usr/bin/ppc${FPC_ARCH}
+
+ cd "${S}"/../install/doc || die
+ emake -j1 "$@" installdoc
+
+ cd "${S}"/../install/man || die
+ emake -j1 "$@" installman
+
+ if use doc ; then
+ cd "${S}"/../../doc || die
+ dodoc -r *
+ fi
+
+ if use ide ; then
+ cd "${S}"/ide || die
+ emake -j1 "$@" install
+ fi
+
+ if use source ; then
+ cd "${S}" || die
+ shift
+ emake -j1 PP="${ED}"/usr/bin/ppc${FPC_ARCH} "$@" sourceinstall
+ find "${ED}"/usr/lib/fpc/${PV}/source -name '*.o' -exec rm {} \;
+ fi
+
+ "${ED}"/usr/lib/fpc/${PV}/samplecfg "${ED}"/usr/lib/fpc/${PV} "${ED}"/etc || die
+
+ sed -i "s:${ED}::g" "${ED}"/etc/fpc.cfg || die
+
+ if use ide ; then
+ sed -e "s:${ED}::g" \
+ -i "${ED}"/etc/fppkg.cfg \
+ -i "${ED}"/etc/fppkg/* \
+ -i "${ED}"/usr/lib/fpc/${PV}/ide/text/fp*.cfg \
+ || die
+ fi
+
+ rm -r "${ED}"/usr/lib/fpc/lexyacc || die
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] && use ide; then
+ einfo "To read the documentation in the fpc IDE, enable the doc USE flag"
+ fi
+}
diff --git a/dev-lang/fpc/metadata.xml b/dev-lang/fpc/metadata.xml
new file mode 100644
index 000000000000..f42de96b8d5a
--- /dev/null
+++ b/dev-lang/fpc/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>amynka@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="ide">Build and install the Free Pascal Compiler IDE</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">freepascal</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/fsharp/Manifest b/dev-lang/fsharp/Manifest
new file mode 100644
index 000000000000..e8c36983426c
--- /dev/null
+++ b/dev-lang/fsharp/Manifest
@@ -0,0 +1,7 @@
+DIST fsharp-4.0.1.20.tar.gz 37326450 SHA256 380fe581d1ad99e32c8dc5974c764d90681f31dcbb1c67eb43870f524a9d0209 SHA512 040ee6668b4ca1c05f23d50750e3391cedd877bbc640e166362ba90e511e7175cff9d31d5998d11496bdd868d52b3fb3912fae62c56be0e1acb5806b2580d5b0 WHIRLPOOL d12732b7961931d4a804a4b0a793367509ca9882b61faede3fec9468654a8c30abb40c2ccb09bab6544a12bc07afd9dc69e8f2d3c10dc02d487ae2a89a59e5fa
+DIST fsharp-4.1.18.tar.gz 41632884 SHA256 bb342d7ba0900486949ef271ae6db948a3cc9428859e8988ead9daaf73526379 SHA512 5271b0de7d82789eeb4151485f1285769be491a4271d6a926b09ae80e076b1726f1ab11f118f97e6331fc4fbc0124ae5f65295e505dd36c272e522f30910b68c WHIRLPOOL e1ea3ce943e9405d5dce9abba2e84145c89da5279f4f3d65b0fd2162751023c646265117ccff40adca07659c511156262d0c46d80f0c4346c9e851cbcb121033
+EBUILD fsharp-4.0.1.20.ebuild 539 SHA256 fd3d01e26787e311b441d5bc9ca131c1979fa93f86b0b7c8e2ea00f700b01e75 SHA512 fa6aa1576ecb1e54687eda29e275639992a3971b592878acd507e9bf18b9b9f856f04f9ea13c06458cd9026669dc650da8b23c056afdfaf14ce5f1c0eae80634 WHIRLPOOL 4577facb62ffde5a4b2e36867d52807f2c077f681ad5cc2a53498d33435745c728471c9a87d5fd2bb540cfbff11720abc094d85405872b9cf6b5c5e2cc697f1e
+EBUILD fsharp-4.1.18.ebuild 825 SHA256 92b9e7d9615f81d3377267843ba9ae005a900d70210f8290045af71dddafeb95 SHA512 1aa062c19da9d79562a63af6847b7179db63569abc7b41ccd75ef1e1c6197619cbbad065899dea2b29ee67e155030ad5ea21bf6701acdcda0a78f5c5c13dc15b WHIRLPOOL 6a8ad4991bae9c75a4cfbb278cf0bf7c63da762c0fecd15cd98dd791a131dd0f3d7815408deb11ff1c2f4b8905eb78cf318bbb96c236c1f5cb718c866aea14e0
+MISC ChangeLog 4165 SHA256 c1d5c940b3a6c213452e683ff87eda1d5f41ff035b526233f1d418fa08a057b2 SHA512 1631a6d40e45b33b363428017655d7e5a8d92eefdbc9941526091a61df6ab2c4a30f761b546b0ebadbf027d4930c7c102f8e7f1416610bca2e19025fcb69e0af WHIRLPOOL 0af39aa73dbf90c3bf5acf8e1a3bcc08b1307e6cd1dcc3d76fba7082be020116c38c6128696c854241c90bfee687cce7474275c5c331a6954eec184fad2a3c31
+MISC ChangeLog-2015 1962 SHA256 fd56f08f44a7ddd3a4710e083645223427e8759bc088f7bdd6afa059a5b9bb00 SHA512 c25e3f7b43b306d9988240c26b03a92d3539dfbf591344d32698e7117cab57a0e15fe949516aea1f3fcb4d5af1c979d7a5fdc8221dc1476e83e773379a2b0478 WHIRLPOOL 1bff08621ac0e156df654ba65c9726e028e43287b69494389b8b14d2553ab45e9fefa792c3a96a4610815280b999cd708ed7429a67dcdd352331a3bed718931e
+MISC metadata.xml 579 SHA256 158e7fc45a2784bce6d79a2dd504710d42aa5c99d0b28a82c11b05ee3de9a165 SHA512 86902f0336f0d57f3d2cce92a2780d12f62a85c5030d1164061af1b3c44746289acbeb7d5a3d8d87efe75be0e766e196fb541dab6e89a5e190f4009342cf8789 WHIRLPOOL ee934a30384ffd96dab67c54bd64b105cc655015e06a3b32dc1094d2339c62f7fee12f8826bf9365359f73e7e4486d50a104bd10cb98de700e8e8368d7795d2e
diff --git a/dev-lang/fsharp/fsharp-4.0.1.20.ebuild b/dev-lang/fsharp/fsharp-4.0.1.20.ebuild
new file mode 100644
index 000000000000..d49e1a69304a
--- /dev/null
+++ b/dev-lang/fsharp/fsharp-4.0.1.20.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils mono-env
+
+DESCRIPTION="The F# Compiler"
+HOMEPAGE="https://github.com/fsharp/fsharp"
+SRC_URI="https://github.com/fsharp/fsharp/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+MAKEOPTS+=" -j1" #nowarn
+DEPEND=">=dev-lang/mono-3"
+RDEPEND="${DEPEND}"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+src_install() {
+ autotools-utils_src_install
+}
diff --git a/dev-lang/fsharp/fsharp-4.1.18.ebuild b/dev-lang/fsharp/fsharp-4.1.18.ebuild
new file mode 100644
index 000000000000..74d64abc9af7
--- /dev/null
+++ b/dev-lang/fsharp/fsharp-4.1.18.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+
+inherit autotools-utils mono-env
+
+DESCRIPTION="The F# Compiler"
+HOMEPAGE="https://github.com/fsharp/fsharp"
+SRC_URI="https://github.com/fsharp/fsharp/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+MAKEOPTS+=" -j1" #nowarn
+DEPEND=">=dev-lang/mono-3"
+RDEPEND="${DEPEND}"
+
+AUTOTOOLS_IN_SOURCE_BUILD=1
+
+# try to sync certificates
+# deprecated way: mozroots --import --sync --machine
+pkg_setup() {
+ #this is horrible, I know
+ addwrite "/usr/share/.mono/keypairs"
+ addwrite "/etc/ssl/certs/ca-certificates.crt"
+ addwrite "/etc/mono/registry"
+ cert-sync /etc/ssl/certs/ca-certificates.crt
+}
+
+src_install() {
+ autotools-utils_src_install
+}
diff --git a/dev-lang/fsharp/metadata.xml b/dev-lang/fsharp/metadata.xml
new file mode 100644
index 000000000000..eaa63a6d2041
--- /dev/null
+++ b/dev-lang/fsharp/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>dotnet@gentoo.org</email>
+ <name>Gentoo Dotnet Project</name>
+ </maintainer>
+ <longdescription>
+ Mono/.NET open-source, strongly typed, multi-paradigm programming language encompassing functional, imperative and object-oriented programming techniques. Most often used as a cross-platform CLI language.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">fsharp/fsharp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/gdl/Manifest b/dev-lang/gdl/Manifest
new file mode 100644
index 000000000000..ac503ea9b222
--- /dev/null
+++ b/dev-lang/gdl/Manifest
@@ -0,0 +1,15 @@
+AUX 0.9.2-include.patch 314 SHA256 6f9c9aaac6f9ee526c1cdd5eb107bfa28eecefa9f4a7f947e5f80cf6bb7591c7 SHA512 3dc426de776f004b9c9840f37af0002907036b6f9d370535c51a2ed6916156d34d640214bec2dba58c9553917c16b996b61194bf15bb3e1c6f2b6f81edb13a4c WHIRLPOOL f56a8f64ca50578f12b66b40687b074a37731c5e08422a4d30e9b96ae4e4cd3ee07e2672fb06ad14b1a37a197b915a9e09992ad56b20cb3b16e673160e042124
+AUX 0.9.5-antlr.patch 3059 SHA256 ab44e0e5274c6e38fa1d37141b2c3426373ff97d3897e4e6f2cd0a191f0affe0 SHA512 2d8d47162fc0179319b728041421a72c965657023e396285de5ec2849b667e21117a587c771b88eb84c54f983747cb1635b7bfb0955762af1912efa88128593c WHIRLPOOL c0d183397164e37e038b97d7cd8f0a5096d120b2e5c0839afeac720d1e0516ea4a159f12cecf01ecd94a753c162aed5d590ef061341e121e1ec2e1ffdb46efcc
+AUX 0.9.5-png.patch 489 SHA256 4c582ca1bcb7ec85d71d6f43f1c56f3d3635ef404f1ccab3e745a6cc7c77054d SHA512 6a7b09286fb62ad18b57434804260a6155c1f4739d72a9ed440c6efe1d682b126a297885d092fbf0cb1e2809a663cb9c7755507c807613199b317f981df7cfc1 WHIRLPOOL c47297b93144f16d7a5c11af1752d3634e2188a4043e1576c74154e6c38962c2169f574a5f16d2d2851ce479db4e591161ee77e8e0ea55c90853c2d216f46258
+AUX 0.9.6-disable-tests-hanging-under-xvfb-run.patch 1884 SHA256 7e1a46e0656b2d2701affd1d294af7333596e81d46b4f9b3ad1dcc1c2e913747 SHA512 00e97be57c6e278814d9bab8f41c294475f5bae3dad682d288814cec153b27adf1f45257851620dfdb450a184f39b621d5d8fa0c407c612e06c8639454c8f5f7 WHIRLPOOL 917e833b735c80886b1b0e0711be7de2729cd4fe07bb81a1cbe8abaeb667fac4a18b18bbae8ca26bf9382f4eae85a469764c71a5635d5b3d7ec3953ee9399ae9
+AUX 0.9.6-fix-file-move.patch 639 SHA256 278ce36bb65029a02ab3d30792c86c6f16b515414e97282f9fae75c94f143b4d SHA512 761266807892aca4d9e8031ddf75b8066d364efc63c624151f6929ac74ee0d43dd4e7e189ba754bbb6d2b134f390f67fc919b33f0402ef8a221801ff678fb78a WHIRLPOOL e076bab4a68672196c8790c147b94d7de8d6087135b8e7712be718d71f5ac79ca67ebe90ef7de0708231af7a2f38d0776c7008dacda5bed1e1d9d2b4916f68b1
+AUX 0.9.6-fix-python-function-call.patch 987 SHA256 92a3bd3c9d87a86ed28bfce1dd74ac62680292d8f32d45e48d8867d8de23cb93 SHA512 f75c8bee4dbbbdff6fbfe5fa5d41cdfda2acbfd4806e3233fb4d6b499680ea9e9653461a1f6686bf44738fa26fe49d22e14e6bf0e857fd9713655e9763103680 WHIRLPOOL c672de3cdd8a3de08a42bed4c8159f67e3dfa2d632adaa6800487f8c1fd83349e36b306d2536545cc0d6639a5e38dee959c6fd64400feaecaae35e6e6e9f07c7
+AUX 0.9.6-formats.patch 4241 SHA256 690ea48759f694ad2e9483be2f0526cfc3ffb80ab5b6e6923c63f608b70f8781 SHA512 7f947b0a13d7a1f56df311ced9673cf9b85a77f351164a4162d386a35a5022ae4f914216a2d801b0a8a7e52341318d498e480cba1f9959b08500753150a6da07 WHIRLPOOL 8f85c9fda7d58aa509273b962cf24a99ee442af81de62c03d182a66e07934ccf62afb09366ed5b699d730825740d4d912fa91a25f775e01eeef663da5beb658e
+AUX 0.9.6-fun-fix.patch 2064 SHA256 91014df47132eeada8df941e7514722f875b0bf2280a1909bcaf88184b08f73e SHA512 e3bafb4803541442c39f35370cedf3e2a2dd4502f2011c72ff92eb9f1f846362e560da69ac60914c71fc0c759e186368cae644b6eff9baa78c057cee70d08bd9 WHIRLPOOL c8553c2fee7c38b158fd8e0348cd96e35c518d00d71d586f770f793d6c3afd877f203b8686d522c0ca6ae99351ff2cc9c95faca645f8918397bbf48fb780b36a
+AUX 0.9.6-gcc6.patch 1255 SHA256 39745105c5de809da23fb78c28f0b78b07f9c784f44c70e61cd6df8482d85dfb SHA512 870231a918cd2d114ac31973bbd2c53733c3e64811c48eadf88c78f82a353aecf4d604e28dfa3a532efb3b0480e5d7209e8fad1fef793212027e89f53608c619 WHIRLPOOL f98df0c21daa99b1aeb592918a77bf7de2cc6212f5d0dffce842d924c9f15d1d2d268c850f439fdd10991cee5d50ac37b11558bebdd41d2d9f17331b137ccafa
+AUX 0.9.6-python-use-path-and-startup.patch 682 SHA256 dc0b9d3173b76608c8f2b28757dddb5ca63831390538e569ae57f2e71e9881fd SHA512 f6e20eadb6acfd3805d5f41bba8d90e9dba5230211577e0b47217638b97745dd921c657dad7adf935abeeb9316989554858976d915f14b79dc2082eb132f9418 WHIRLPOOL 00287abe47c9913398d4d8b5e7ddbcc2bdeac1f030ac22f26d3ce4336f08df78d4b99a6977ec700e4de636513fa18ec1a68e5a2f1f26ffb00c9b4c9f9f5331d9
+DIST gdl-0.9.6v2.tgz 1777167 SHA256 cfb005ee1d9c843b26cc474618225ce68a1f0bfaeddcd45bf63a0a8fb62eedb4 SHA512 a816ee2e3822af380a1131a6138263c33560db7286cd699b864da305a1103d5afc881a1cd3574d2e243bfb7e65e759e46322c5e55c66ec15620d9c514565c2c5 WHIRLPOOL 1437816b807b8414b423c777ad0a3af4088a885548526741a5cf31f2ad802087efc52d1db6555d3a09c9e94baec526443e55182b6a1088f58d2843d8ffb47df6
+EBUILD gdl-0.9.6-r2.ebuild 4144 SHA256 86c28c053e9bb59ef661f018fe4e525685538266f61f7e23c25e8cf2a56ddaac SHA512 11936edb8d2c9e3ad3ae4ac558297e377acab2616d0af61ebf1d862034aa7ad0f1c776cc295bd61e5df7f1a0339bf70a5daeb1a19b6996407b609b6b7d994b44 WHIRLPOOL 51d7f111fcce7a01b062ec3b91d5f5658cbd4ccafe69d3d29f7e89321c96af9eb7543cca85a5079c59615d080b04a0c120e04b77ede574405c645922b76ba928
+MISC ChangeLog 5294 SHA256 f2157f1753af2d7c87411ed2e3d51db46510656ac7256a9521b998f378b9270c SHA512 d99bde1c5fa2130a7aa1e0160826c8bd506fa3551aca4faad19c7cb699f14a33a117c8771c24306f640c7b74410832f23d5c91a8ea008625be2501b02f2043ea WHIRLPOOL 4ec39738bf23dbdf6d056ba6245e551daf4625556a26e40f90d7b3c14e1e61f621874ff4ef0e447f00a6a905d3c1274736daec4f1dd5cf5870fe45dc66ee15e7
+MISC ChangeLog-2015 10904 SHA256 0d69fc1c9e1bfccf5dd4404814cb0da35f3d1943e8b7fafb130376f4f55bf685 SHA512 60eaf82492a0e89b560271af0f6a7d7999fad9a96c0d8a2bd939219e3ae59ea1328abd44f0b8163964df37954a8907f854da70344d160a65f15032d2ffe95671 WHIRLPOOL f2c08f87d925f6661f5dedf75172b9c0a2bfd2623f8bb607de62ab085bff47e8386fd8e3f3f5e8d0072a1bb7c5f1448edf9a9c9c0f5dca772c08599f8a25804c
+MISC metadata.xml 1136 SHA256 552f6f864bf099b6c836a25deed05ee38aabd4869f0d9a0e868fd93b597d0009 SHA512 6fa45b8c596eef33f08e5c706a78364e59c32fc0cf6237d2ae870fbf696099708f9af708b00a9b0b08cbe211879a0e5fca84b7b9a7385e66e1f39277a0d2f7af WHIRLPOOL 4e380fb4b6778002e8623a597f85e06182c7f4d4d5098007e60bcc2ac356dff2051542b74cecc0dc1f45cd2fb14bfbe522d2905b2e72d9451ee0d628130baf9e
diff --git a/dev-lang/gdl/files/0.9.2-include.patch b/dev-lang/gdl/files/0.9.2-include.patch
new file mode 100644
index 000000000000..49613da16e21
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.2-include.patch
@@ -0,0 +1,10 @@
+--- gdl-0.9.2.orig/src/cformat.g 2010-07-25 17:59:19.000000000 +0100
++++ gdl-0.9.2/src/cformat.g 2012-06-21 16:34:12.000000000 +0100
+@@ -16,6 +16,7 @@
+ ***************************************************************************/
+
+ header "pre_include_cpp" {
++#include <cstdlib>
+ #include "includefirst.hpp"
+ }
+
diff --git a/dev-lang/gdl/files/0.9.5-antlr.patch b/dev-lang/gdl/files/0.9.5-antlr.patch
new file mode 100644
index 000000000000..f5b627ab444e
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.5-antlr.patch
@@ -0,0 +1,91 @@
+ CMakeLists.txt | 14 +++++++++++---
+ CMakeModules/FindANTLR.cmake | 11 +++++++++++
+ src/CMakeLists.txt | 18 +++++++++++-------
+ 3 files changed, 33 insertions(+), 10 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 407e39a..c4b3278 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -111,6 +111,8 @@ set(SZIPDIR "" CACHE PATH "GDL: Specify the SZip directory tree")
+
+ set(GDL_DATA_DIR "/share/gnudatalanguage" CACHE PATH "GDL: data directory relative to CMAKE_INSTALL_PREFIX")
+
++set(BUNDLED_ANTLR OFF CACHE BOOL "Use bundled ANTLR grammar ?")
++set(ANTLRDIR "" CACHE PATH "Specify the system ANTLR directory tree")
+
+ # check for 64-bit OS
+ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
+@@ -174,9 +176,15 @@ check_library_exists(m nexttoward "" HAVE_NEXTTOWARD)
+ # mpi
+ check_include_file(mpi.h HAVE_MPI_H)
+
+-# SA: whithout it compilation of antlr fails if there's a conflicting
+-# version of antlr in system-wide directories
+-include_directories(src)
++if(BUNDLED_ANTLR)
++ # SA: whithout it compilation of antlr fails if there's a conflicting
++ # version of antlr in system-wide directories
++ include_directories(src)
++else(BUNDLED_ANTLR)
++ find_package(ANTLR QUIET)
++ set(LIBRARIES ${LIBRARIES} ${ANTLR_LIBRARIES})
++ include_directories(${ANTLR_INCLUDE_DIR})
++endif(BUNDLED_ANTLR)
+
+ if(WIN32 AND NOT CYGWIN)
+ # For Win32 find Pdcureses instead of (N)Curses
+diff --git a/CMakeModules/FindANTLR.cmake b/CMakeModules/FindANTLR.cmake
+new file mode 100644
+index 0000000..b61cc5b
+--- /dev/null
++++ b/CMakeModules/FindANTLR.cmake
+@@ -0,0 +1,11 @@
++
++
++find_library(ANTLR_LIBRARIES NAMES antlr)
++find_path(ANTLR_INCLUDE_DIR NAMES antlr/ANTLRUtil.hpp)
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(ANTLR DEFAULT_MSG ANTLR_LIBRARIES ANTLR_INCLUDE_DIR)
++
++mark_as_advanced(
++ANTLR_LIBRARIES
++ANTLR_INCLUDE_DIR
++)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 1f7ffec..776a1fd 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -262,9 +262,8 @@ widget.cpp
+ widget.hpp
+ )
+
+-add_subdirectory(antlr)
+
+-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/antlr ${CMAKE_BINARY_DIR})
++include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR})
+ link_directories(${LINK_DIRECTORIES})
+
+ if(PYTHON_MODULE) #libgdl
+@@ -275,11 +274,16 @@ else(PYTHON_MODULE) #gdl
+ add_executable(gdl ${SOURCES})
+ endif(PYTHON_MODULE)
+
+-add_dependencies(gdl antlr) # be sure that antlr is built before gdl
+-target_link_libraries(gdl antlr) # link antlr against gdl
+-if (MINGW)
+-target_link_libraries(gdl ws2_32)
+-endif (MINGW)
++if(BUNDLED_ANTLR)
++ add_subdirectory(antlr)
++ include_directories(${CMAKE_SOURCE_DIR}/src/antlr)
++ add_dependencies(gdl antlr) # be sure that antlr is built before gdl
++ target_link_libraries(gdl antlr) # link antlr against gdl
++ if (MINGW)
++ target_link_libraries(gdl ws2_32)
++ endif (MINGW)
++endif(BUNDLED_ANTLR)
++
+ target_link_libraries(gdl ${LIBRARIES})
+ add_definitions(-DHAVE_CONFIG_H)
+
diff --git a/dev-lang/gdl/files/0.9.5-png.patch b/dev-lang/gdl/files/0.9.5-png.patch
new file mode 100644
index 000000000000..1140fcc9ac75
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.5-png.patch
@@ -0,0 +1,15 @@
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 407e39a..f24a087 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -270,7 +270,6 @@ if(PNGLIB)
+ set(USE_PNGLIB ${PNG_FOUND})
+ if(PNG_FOUND)
+ set(LIBRARIES ${LIBRARIES} ${PNG_LIBRARIES})
+- set(LINK_DIRECTORIES ${LINK_DIRECTORIES} ${PNG_LIBRARY_DIRS})
+ include_directories(${PNG_INCLUDE_DIRS})
+ else(PNG_FOUND)
+ message(FATAL_ERROR "libpng is required but was not found.\n"
diff --git a/dev-lang/gdl/files/0.9.6-disable-tests-hanging-under-xvfb-run.patch b/dev-lang/gdl/files/0.9.6-disable-tests-hanging-under-xvfb-run.patch
new file mode 100644
index 000000000000..6ce92aff0ab7
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-disable-tests-hanging-under-xvfb-run.patch
@@ -0,0 +1,80 @@
+Description: Disable tests which work fine with local X but hang under xvfb-run
+Author: Axel Beckert <abe@debian.org>
+Last-Update: 2014-10-10
+
+--- a/testsuite/Makefile.am
++++ b/testsuite/Makefile.am
+@@ -18,7 +18,6 @@
+ test_bug_2876372.pro \
+ test_bug_2892631.pro \
+ test_bug_2949487.pro \
+- test_bug_2974380.pro \
+ test_bug_3033108.pro \
+ test_bug_3054361.pro \
+ test_bug_3055720.pro \
+@@ -43,7 +42,6 @@
+ test_bug_3152899.pro \
+ test_bug_3189072.pro \
+ test_bug_3199465.pro \
+- test_bug_3275334.pro \
+ test_bug_3285659.pro \
+ test_bug_3286031.pro \
+ test_bug_3288652.pro \
+@@ -74,16 +72,12 @@
+ test_ce.pro \
+ test_clip.pro \
+ test_common.pro \
+- test_congrid.pro \
+ test_constants.pro \
+ test_convert_coord.pro \
+ test_correlate.pro \
+ test_deriv.pro \
+- test_device.pro \
+ test_dicom.pro \
+ test_erfinv.pro \
+- test_execute.pro \
+- test_extra_keywords.pro \
+ test_fft.pro \
+ test_fft_dim.pro \
+ test_fft_leak.pro \
+@@ -122,7 +116,6 @@
+ test_memory.pro \
+ test_message.pro \
+ test_modulo.pro \
+- test_moment.pro \
+ test_mpfit.pro \
+ test_multiroots.pro \
+ test_nans_in_sort_and_median.pro \
+@@ -130,10 +123,8 @@
+ test_netcdf.pro \
+ test_null.pro \
+ test_obj_new.pro \
+- test_plot_oo.pro \
+ test_plotting_ranges.pro \
+ test_pmulti.pro \
+- test_pmulti_basic.pro \
+ test_postscript.pro \
+ test_product.pro \
+ test_ps_decomposed.pro \
+@@ -144,7 +135,6 @@
+ test_python_module_2.pro \
+ test_qromb.pro \
+ test_qromo.pro \
+- test_random.pro \
+ test_readf.pro \
+ test_reads.pro \
+ test_rebin.pro \
+@@ -167,13 +157,11 @@
+ test_suite.pro \
+ test_systime.pro \
+ test_trisol.pro \
+- test_tv.pro \
+ test_typename.pro \
+ test_url.pro \
+ test_voigt.pro \
+ test_wait.pro \
+ test_wavelet.pro \
+- test_window_background.pro \
+ test_where.pro \
+ test_zeropoly.pro \
+ test_zip.pro \
diff --git a/dev-lang/gdl/files/0.9.6-fix-file-move.patch b/dev-lang/gdl/files/0.9.6-fix-file-move.patch
new file mode 100644
index 000000000000..31d4f066f49c
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-fix-file-move.patch
@@ -0,0 +1,14 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Remove trailing slash at the end of dir when moving files specified by wildcard
+Forwarded: https://sourceforge.net/p/gnudatalanguage/patches/97/
+--- a/src/pro/file_move.pro
++++ b/src/pro/file_move.pro
+@@ -31,7 +31,7 @@
+ res=FILE_SEARCH(dir, FILE_BASENAME(source[ii]), /fully)
+
+ for jj=0,N_ELEMENTS(res)-1 do begin
+- if(FILE_DIRNAME(res[jj], /MARK_DIRECTORY) eq dir) then flist=[flist, res[jj]] ;
++ if(FILE_DIRNAME(res[jj]) eq dir) then flist=[flist, res[jj]] ;
+ ;print, 'dir ', dir, ' res ', FILE_DIRNAME(res[jj])
+ endfor
+
diff --git a/dev-lang/gdl/files/0.9.6-fix-python-function-call.patch b/dev-lang/gdl/files/0.9.6-fix-python-function-call.patch
new file mode 100644
index 000000000000..fe90774e5c7b
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-fix-python-function-call.patch
@@ -0,0 +1,30 @@
+Author: Ole Streicher <olebole@debian.org>
+Bug: https://sourceforge.net/p/gnudatalanguage/bugs/377
+Bug: https://sourceforge.net/p/gnudatalanguage/bugs/679
+Forwarded: https://sourceforge.net/p/gnudatalanguage/patches/91
+ https://sourceforge.net/p/gnudatalanguage/patches/92
+Description: Fix Python calling GDL functions
+ * user defined functions crash
+ * data arrays of 64 bit element size are not completely converted to Python
+--- a/src/pythongdl.cpp
++++ b/src/pythongdl.cpp
+@@ -329,7 +329,7 @@
+ }
+ }
+
+- sub = proList[ proIx];
++ sub = funList[ proIx];
+ }
+ }
+ else
+--- a/src/topython.cpp
++++ b/src/topython.cpp
+@@ -67,7 +67,7 @@
+ // TODO: free the memory: PyArray_Free(PyObject* op, void* ptr) ?
+ throw GDLException("Failed to convert array to python.");
+ }
+- memcpy(PyArray_DATA(ret), DataAddr(), this->N_Elements() * sizeof(Sp::t));
++ memcpy(PyArray_DATA(ret), DataAddr(), this->N_Elements() * Data_<Sp>::Sizeof());
+ return ret;
+ }
+
diff --git a/dev-lang/gdl/files/0.9.6-formats.patch b/dev-lang/gdl/files/0.9.6-formats.patch
new file mode 100644
index 000000000000..105fa9cb8eff
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-formats.patch
@@ -0,0 +1,111 @@
+diff -up gdl-0.9.6/testsuite/test_formats.pro.formats gdl-0.9.6/testsuite/test_formats.pro
+--- gdl-0.9.6/testsuite/test_formats.pro.formats 2015-09-06 13:15:01.000000000 -0600
++++ gdl-0.9.6/testsuite/test_formats.pro 2016-01-12 14:26:18.811283030 -0700
+@@ -13,6 +13,10 @@
+ ; is OK for negative input, wrong for positive one !!
+ ; -- extra "\ ^J" added in GDL between the Re/Im parts for (D)Complex
+ ;
++; Changes:
++; 2016-01612 : AC various changes for better managing paths,
++; expecially for Cmake automatic tests !
++;
+ ; md5sum of current version of "formats.idl" (-1 et 12 ...)
+ ; 5d1cfbc31312a833f62033e297f986a2 formats.idl
+ ;
+@@ -53,7 +57,10 @@ end
+ pro GENERATE_FORMATS_FILE, nb_cases, verbose=verbose, test=test
+ ;
+ filename='formats.'+GDL_IDL_FL()
+-;
++if FILE_TEST(filename) then begin
++ FILE_MOVE, filename, filename+'_old', /overwrite
++ MESSAGE,/cont, 'Copy of old file <<'+filename+'_old'+'>> done.'
++endif
+ ; value to be write : one negative, one positive
+ ;
+ struct_neg = {BYTE:-1b,short:-1us,ushort:-1us, $
+@@ -104,17 +111,53 @@ soft=GDL_IDL_FL(/verbose)
+ ;
+ GENERATE_FORMATS_FILE, nb_cases, verbose=verbose
+ ;
+-if (soft NE 'idl') AND ~FILE_TEST("formats.idl") then MESSAGE, "missing reference file <<formats.idl>>"
++; locating then read back the reference idl.xdr:
++;
++; we need to add the current dir. into the path because new file(s)
++; are writtent in it. Do we have a simple way to check whether a dir
++; is already in !PATH ?
++;
++CD, current=current
++new_path=!path+PATH_SEP(/SEARCH_PATH)+current
++list_of_dirs=STRSPLIT(new_path, PATH_SEP(/SEARCH_PATH), /EXTRACT)
++;
++; only this reference file is mandatory !
++;
++filename='formats.idl'
++file_fmt_idl=FILE_SEARCH(list_of_dirs+PATH_SEP()+filename)
++;
++if (soft NE 'idl') AND (STRLEN(file_fmt_idl) EQ 0) then begin
++ MESSAGE, 'reference file <<'+filename+'>> not found in the !PATH', /continue
++ if KEYWORD_SET(no_exit) OR KEYWORD_SET(test) then STOP
++ EXIT, status=1
++endif
++if N_ELEMENTS(file_fmt_idl) GT 1 then print, 'multiple reference file <<'+filename+'>> found !'
++file_fmt_idl=file_fmt_idl[0]
++;
++filename='formats.gdl'
++file_fmt_gdl=FILE_SEARCH(list_of_dirs+PATH_SEP()+filename)
++if N_ELEMENTS(file_fmt_gdl) GT 1 then begin
++ print, 'multiple reference file <<'+filename+'>> found ! First used !!'
++ print, TRANSPOSE(file_fmt_gdl)
++ file_fmt_gdl=file_fmt_gdl[0]
++endif
++;
++filename='formats.fl'
++file_fmt_fl=FILE_SEARCH(list_of_dirs+PATH_SEP()+filename)
++if N_ELEMENTS(file_fmt_fl) GT 1 then begin
++ print, 'multiple reference file <<'+filename+'>> found !'
++ print, TRANSPOSE(file_fmt_fl)
++ file_fmt_fl=file_fmt_fl[0]
++endif
+ ;
+ if (soft EQ 'idl') then begin
+- if ~FILE_TEST("formats.gdl") then MESSAGE, /cont, "missing file <<formats.gdl>>"
+- if ~FILE_TEST("formats.fl") then MESSAGE, /cont, "missing file <<formats.fl>>"
+- if ~FILE_TEST("formats.gdl") AND ~FILE_TEST("formats.fl") then begin
+- MESSAGE, /cont, "No useful file found for comparison. Just Reference file written."
+- endif
+- if FILE_TEST("formats.gdl") then soft='gdl' else begin
+- if FILE_TEST("formats.fl") then soft='fl'
+- endelse
++ soft=''
++ if ~FILE_TEST(file_fmt_fl) then MESSAGE, /cont, "missing file <<formats.fl>>" else soft='fl'
++ if ~FILE_TEST(file_fmt_gdl) then MESSAGE, /cont, "missing file <<formats.gdl>>" else soft='gdl'
++ if (soft EQ '') then begin
++ MESSAGE, /cont, "No useful file found for comparison. Just Reference file written."
++ return
++ endif
+ endif
+ ;
+ ; reading back the 2 files : one created ("formats.gdl" or
+@@ -123,9 +166,10 @@ endif
+ print, "Files to be compared : formats.idl, formats."+soft
+ ;
+ GET_LUN, lun1
+-OPENR, lun1, "formats.idl"
++OPENR, lun1, file_fmt_idl
+ GET_LUN, lun2
+-OPENR, lun2, "formats."+soft
++if (soft EQ 'gdl') then OPENR, lun2, file_fmt_gdl
++if (soft EQ 'fl') then OPENR, lun2, file_fmt_fl
+ ;
+ ref=STRING("")
+ val=STRING("")
+@@ -155,7 +199,7 @@ CLOSE, lun1, lun2
+ FREE_LUN, lun1, lun2
+ ;
+ if (nb_errors GT 0) then begin
+- MESSAGE, /continue, 'Using a "diff formats.idl formats.gdl" in a shell'
++ MESSAGE, /continue, 'Using a "diff formats.idl formats.{gdl|fl}" in a shell'
+ MESSAGE, /continue, 'should help to debug !'
+ endif
+ ;
diff --git a/dev-lang/gdl/files/0.9.6-fun-fix.patch b/dev-lang/gdl/files/0.9.6-fun-fix.patch
new file mode 100644
index 000000000000..a3a4118ceb0a
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-fun-fix.patch
@@ -0,0 +1,56 @@
+Author: Vitaliy Tomin <highwaystar@users.sf.net>
+Description: Fix direct calling of direct function calls from Python
+Bug: https://sourceforge.net/p/gnudatalanguage/bugs/678
+--- a/src/pythongdl.cpp
++++ b/src/pythongdl.cpp
+@@ -392,25 +392,31 @@
+
+ BaseGDL* retValGDL = NULL;
+ Guard<BaseGDL> retValGDL_guard;
+- if( functionCall)
+- {
+- if( libCall)
+- retValGDL = static_cast<DLibFun*>(static_cast<EnvT*>(e)->
+- GetPro())->Fun()( static_cast<EnvT*>(e));
+- else
+- retValGDL = interpreter->call_fun(static_cast<DSubUD*>
+- (static_cast<EnvUDT*>(e)
+- ->GetPro())->GetTree());
+- retValGDL_guard.Reset( retValGDL);
+- }
+- else
+- {
+- if( libCall)
+- static_cast<DLibPro*>(e->GetPro())->Pro()(static_cast<EnvT*>(e)); // throws
+- else
+- interpreter->call_pro(static_cast<DSubUD*>
+- (e->GetPro())->GetTree()); //throws
+- }
++
++ if (functionCall) {
++ DLibFun* sub_fun_chk = dynamic_cast<DLibFun *>(static_cast<EnvT *>(e)->GetPro());
++ if (sub_fun_chk) {
++ //handle direct call function first
++ if (sub_fun_chk->DirectCall()) {
++ BaseGDL* directCallParameter = e->GetParDefined(0);
++ retValGDL = static_cast<DLibFunDirect*>(sub_fun_chk)->FunDirect()(directCallParameter, true /*isReference*/);
++ }
++ } else if (libCall)
++ retValGDL = static_cast<DLibFun *>(static_cast<EnvT *>(e)->GetPro())
++ ->Fun()(static_cast<EnvT *>(e));
++ else
++ retValGDL = interpreter->call_fun(
++ static_cast<DSubUD *>(static_cast<EnvUDT *>(e)->GetPro())
++ ->GetTree());
++ retValGDL_guard.Reset(retValGDL);
++ } else {
++ if (libCall)
++ static_cast<DLibPro *>(e->GetPro())
++ ->Pro()(static_cast<EnvT *>(e)); // throws
++ else
++ interpreter->call_pro(
++ static_cast<DSubUD *>(e->GetPro())->GetTree()); // throws
++ }
+
+ // copy back args and keywords
+ success = CopyArgToPython( parRef, kwRef, *e, argTuple, kwDict);
diff --git a/dev-lang/gdl/files/0.9.6-gcc6.patch b/dev-lang/gdl/files/0.9.6-gcc6.patch
new file mode 100644
index 000000000000..e017255b0bef
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-gcc6.patch
@@ -0,0 +1,31 @@
+diff -up gdl-0.9.6/src/specializations.hpp.gcc6 gdl-0.9.6/src/specializations.hpp
+--- gdl-0.9.6/src/specializations.hpp.gcc6 2015-08-24 15:26:47.000000000 -0600
++++ gdl-0.9.6/src/specializations.hpp 2016-03-03 16:30:46.694379312 -0700
+@@ -534,16 +534,6 @@ void Data_<SpDString>::MinMax( DLong* mi
+
+ // default_io.cpp
+ template<>
+-std::istream& operator>>(std::istream& i, Data_<SpDFloat>& data_);
+-template<>
+-std::istream& operator>>(std::istream& i, Data_<SpDDouble>& data_);
+-template<>
+-std::istream& operator>>(std::istream& i, Data_<SpDComplex>& data_);
+-template<>
+-std::istream& operator>>(std::istream& i, Data_<SpDComplexDbl>& data_);
+-template<>
+-std::istream& operator>>(std::istream& is, Data_<SpDString>& data_);
+-template<>
+ std::ostream& Data_<SpDLong>::ToStream(std::ostream& o, SizeT w, SizeT* actPosPtr);
+ template<>
+ std::ostream& Data_<SpDULong>::ToStream(std::ostream& o, SizeT w, SizeT* actPosPtr);
+--- gdl-0.9.6/src/typedefs.hpp.gcc6 2014/08/09 15:33:29 1.76
++++ gdl-0.9.6/src/typedefs.hpp 2016/02/04 22:48:46 1.77
+@@ -235,7 +235,7 @@
+
+ Guard& operator=( Guard& r)
+ {
+- if( &r == this) return;
++ if( &r == this) return *this;
+ delete guarded;
+ guarded = r.guarded;
+ r.guarded = NULL;
diff --git a/dev-lang/gdl/files/0.9.6-python-use-path-and-startup.patch b/dev-lang/gdl/files/0.9.6-python-use-path-and-startup.patch
new file mode 100644
index 000000000000..a76cd8cb6275
--- /dev/null
+++ b/dev-lang/gdl/files/0.9.6-python-use-path-and-startup.patch
@@ -0,0 +1,20 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Initialize GDL path if one is defined
+Forwarded: https://sourceforge.net/p/gnudatalanguage/patches/93/
+--- a/src/pythongdl.cpp
++++ b/src/pythongdl.cpp
+@@ -537,6 +537,14 @@
+ // instantiate the interpreter (creates $MAIN$ environment)
+ interpreter = new DInterpreter();
+
++ string gdlPath=GetEnvString("GDL_PATH");
++ if( gdlPath == "") gdlPath=GetEnvString("IDL_PATH");
++ if( gdlPath == "")
++ {
++ gdlPath = "+" GDLDATADIR "/lib";
++ }
++ SysVar::SetGDLPath( gdlPath);
++
+ PyObject* m = Py_InitModule("GDL", GDLMethods);
+
+ gdlError = PyErr_NewException((char*)"GDL.error", NULL, NULL);
diff --git a/dev-lang/gdl/gdl-0.9.6-r2.ebuild b/dev-lang/gdl/gdl-0.9.6-r2.ebuild
new file mode 100644
index 000000000000..04689db30c0d
--- /dev/null
+++ b/dev-lang/gdl/gdl-0.9.6-r2.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils python-r1 wxwidgets toolchain-funcs virtualx
+
+DESCRIPTION="GNU Data Language"
+HOMEPAGE="http://gnudatalanguage.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gnudatalanguage/${P}v2.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="+eigen fftw graphicsmagick grib gshhs hdf hdf5 +imagemagick netcdf openmp
+ png proj postscript python static-libs udunits wxwidgets"
+
+RDEPEND="
+ dev-cpp/antlr-cpp:2=
+ sci-libs/gsl:0=
+ sci-libs/plplot:0=[-dynamic]
+ sys-libs/ncurses:0=
+ sys-libs/readline:0=
+ sys-libs/zlib:0=
+ x11-libs/libX11:0=
+ fftw? ( sci-libs/fftw:3.0= )
+ grib? ( sci-libs/grib_api:0= )
+ gshhs? ( sci-geosciences/gshhs-data sci-geosciences/gshhs:0= )
+ hdf? ( sci-libs/hdf:0= )
+ hdf5? ( sci-libs/hdf5:0= )
+ imagemagick? (
+ !graphicsmagick? ( media-gfx/imagemagick:=[cxx] )
+ graphicsmagick? ( media-gfx/graphicsmagick:=[cxx] )
+ )
+ netcdf? ( sci-libs/netcdf )
+ proj? ( sci-libs/proj )
+ postscript? ( dev-libs/pslib )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ )
+ udunits? ( sci-libs/udunits )
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
+DEPEND="${RDEPEND}
+ dev-java/antlr:0[java(+),script(+)]
+ virtual/pkgconfig
+ eigen? ( dev-cpp/eigen:3 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=(
+ "${FILESDIR}"/0.9.2-include.patch
+ "${FILESDIR}"/0.9.5-antlr.patch
+ "${FILESDIR}"/0.9.5-png.patch
+ "${FILESDIR}"/0.9.6-fix-file-move.patch
+ "${FILESDIR}"/0.9.6-fix-python-function-call.patch
+ "${FILESDIR}"/0.9.6-fun-fix.patch
+ "${FILESDIR}"/0.9.6-python-use-path-and-startup.patch
+ "${FILESDIR}"/0.9.6-disable-tests-hanging-under-xvfb-run.patch
+ "${FILESDIR}"/0.9.6-gcc6.patch
+ "${FILESDIR}"/0.9.6-formats.patch
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+ use wxwidgets && need-wxwidgets unicode
+ use hdf5 && has_version sci-libs/hdf5[mpi] && export CXX=mpicxx
+
+ # make sure antlr includes are from system and rebuild the sources with it
+ # https://sourceforge.net/tracker/?func=detail&atid=618685&aid=3465878&group_id=97659
+ rm -r src/antlr || die
+ einfo "Regenerating grammar"
+ pushd src >/dev/null || die
+ local i
+ for i in *.g; do
+ antlr ${i} || die
+ done
+ popd >/dev/null || die
+
+ # gentoo: avoid install files in datadir directory
+ # and manually install them in src_install
+ sed -e '/AUTHORS/d' -i CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ # MPI is still very buggy
+ # x11=off does not compile
+ local mycmakeargs=(
+ -DMPICH=OFF
+ -DBUNDLED_ANTLR=OFF
+ -DX11=ON
+ -DEIGEN3="$(usex eigen)"
+ -DFFTW="$(usex fftw)"
+ -DGRIB="$(usex grib)"
+ -DGSHHS="$(usex gshhs)"
+ -DHDF="$(usex hdf)"
+ -DHDF5="$(usex hdf5)"
+ -DLIBPROJ4="$(usex proj)"
+ -DNETCDF="$(usex netcdf)"
+ -DOPENMP="$(usex openmp)"
+ -DPNGLIB="$(usex png)"
+ -DPSLIB="$(usex postscript)"
+ -DUDUNITS="$(usex udunits)"
+ -DWXWIDGETS="$(usex wxwidgets)"
+ )
+
+ if use imagemagick; then
+ if use graphicsmagick; then
+ mycmakeargs+=( -DGRAPHICSMAGICK=ON -DMAGICK=OFF )
+ else
+ mycmakeargs+=( -DGRAPHICSMAGICK=OFF -DMAGICK=ON )
+ fi
+ else
+ mycmakeargs+=( -DGRAPHICSMAGICK=OFF -DMAGICK=OFF )
+ fi
+
+ configuration() {
+ mycmakeargs+=( $@ )
+ cmake-utils_src_configure
+ }
+ configuration -DPYTHON_MODULE=OFF -DPYTHON=OFF
+ use python && python_foreach_impl configuration -DPYTHON_MODULE=ON -DPYTHON=ON
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ use python && python_foreach_impl cmake-utils_src_make
+}
+
+src_test() {
+ # there is check target instead of the ctest to define some LDPATH
+ virtx emake -C "${BUILD_DIR}" check
+}
+
+src_install() {
+ cmake-utils_src_install
+ if use python; then
+ installation() {
+ mv src/libgdl.so GDL.so || die
+ python_domodule GDL.so
+ }
+ python_foreach_impl run_in_build_dir installation
+ dodoc PYTHON.txt
+ fi
+ #dodoc AUTHORS README
+ echo "GDL_PATH=\"+${EPREFIX}/usr/share/gnudatalanguage\"" > 50gdl || die
+ doenvd 50gdl
+}
diff --git a/dev-lang/gdl/metadata.xml b/dev-lang/gdl/metadata.xml
new file mode 100644
index 000000000000..7831d55c1928
--- /dev/null
+++ b/dev-lang/gdl/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@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ A free IDL (Interactive Data Language) compatible incremental compiler
+ (ie. runs IDL programs). IDL is a registered trademark of ITT Visual
+ Information Solutions.
+</longdescription>
+ <use>
+ <flag name="eigen">Build matrix manipulation with <pkg>dev-cpp/eigen</pkg></flag>
+ <flag name="hdf">Add support for the Hierarchical Data Format v.4</flag>
+ <flag name="gshhs">Add support for projection adn continent maps with <pkg>sci-geosciences/gshhs-data</pkg></flag>
+ <flag name="grib">Add support for the meteorological GRIB format with <pkg>sci-libs/grib_api</pkg></flag>
+ <flag name="proj">Add support for <pkg>sci-libs/proj</pkg> (geographic projections)</flag>
+ <flag name="udunits">Add support for manipulating units of physical quantities</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">gnudatalanguage</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/gforth/Manifest b/dev-lang/gforth/Manifest
new file mode 100644
index 000000000000..904962cfdbc3
--- /dev/null
+++ b/dev-lang/gforth/Manifest
@@ -0,0 +1,7 @@
+AUX 50gforth-gentoo.el 200 SHA256 235051d92cd39a0d327246d60555bd8a8386b5b20276aa35fe8bd34565b691f6 SHA512 4bb26614777a8147d3bc869ee5db4ebbb594aaf7456c315e077a982dbb9f972cd15ddb977515036ca07594995b623cba35daade1abfcd3a2cdddac7ffbdf4027 WHIRLPOOL c73a72cbc3e7647a18d5482010334c5b776581de86195e94a817d6412ea878e20e5a278821f55c102e895e8ec829d193dda3668a11730fede26132ec056456c9
+AUX gforth-0.7.0-make-elc.patch 437 SHA256 3e21997d7410dbf48580cef032082e2a06e8e61e225944433cdae0e8974fd342 SHA512 d4d2c0eefe6ecc0fdc8c58147262324292c905e3cafb360a5d7c4e6eac92798ec416fffae21834f9d29c1e9117a500891285e6a0ff5405346d4a5e63c10f1bce WHIRLPOOL e70b24b6318591acfab0c175ae72464472ad20f15151c351de80f531780290f371e981d3c1daaefcc704460e6a02b94533f8699f4358c6b25d27528c3e6111cc
+DIST gforth-0.7.3.tar.gz 2523433 SHA256 2f62f2233bf022c23d01c920b1556aa13eab168e3236b13352ac5e9f18542bb0 SHA512 f034234acfb0fc727f28b564432219a100b916c6df4b847794a55b2fc3b8ed8714eca6de0df67c7c427b7c2bb4dd00f65cfd34e6eb60181e41ab84fea30304e4 WHIRLPOOL e16e1dfcccc1f02855da9f53407feaeca66fbe64586373aa4e8916c6b9f1dbbd023e4cd7908c8e943d0700c094dbd5e387f6c0b92492bf4e1ecc23692cc63932
+EBUILD gforth-0.7.3.ebuild 1355 SHA256 d435344c01445efeed7a7348ea325eed60f7070ac73581d0f108929b7225808f SHA512 763698e2782d17063eb6f417e0a599d6912c52f18adaadd32d06effd2df8bb8a5f79d657ceca6f7e00a5ed8682cc5345b5986eb3c77288bdb4c1621d22db2921 WHIRLPOOL e5f9761ef0dfc26a261fc50704fdbd94e4927550ae4f297f052dfe3ad07ccd1f85a0c27f8b35582faf3eff151fdb5fa9cf807dc37fc228bed77b99475d4dc035
+MISC ChangeLog 3040 SHA256 df81876683415e3cdc1293fd2149e6689e97f40c2dbcee6e0580cf1812c5a6c2 SHA512 d0649a284a4a96b9402f6941767396d8189fab0c3c012f5fb151159fe4dd32c84df0aedfcb074e820b2377e7afd73c4b81d6dbaaf9a998e56f32ecab9a49e102 WHIRLPOOL b2ace218648b0b92f12e35537a874e10e474f4d838867a4a06b56a05d07e71ab363ae719a3cac8a30e736c0902446c2e86685704646c2ff30f9ad1bca9693a74
+MISC ChangeLog-2015 5865 SHA256 15f1044b88ab5549b7c9f48cf3f7b778e8014890a0046439a97471a056537cc5 SHA512 5891e0e3d41da26f8309cbf5ab04e24e5588bb73def431c8d2bb069052de88994f6aa0184c3440da825355cdb285fbc1968a012ad997cf027056dc26d1cad045 WHIRLPOOL af0d900a2914694887df50e364fd5e5e29dfa8a2769ca26466f36a22b367304dcfb6ec17bac2da09a4758ad82c12e09d4100e5b729de27498eb165c6e8ad318b
+MISC metadata.xml 251 SHA256 90d6112ae9e256cc0e1e136cbc0f06790773deb619f29ffb87301cddd9b96750 SHA512 cc2bd3977894946ee4ea5b739cc3998bcd6017b9e7a52aa501409d0988954339a9a22fe751d0a5e967ddac9225d9b23f20b4fb1e2c62ee91d1d23c383d9776dd WHIRLPOOL 7fb42bdc9d6347bdf289087e631f6d6e7cf683679af236bf343f2d1e3213e999372123a46d339bcc559dfd0af8e41d75a56a76b60d67ef936bdc973ebfff1bf0
diff --git a/dev-lang/gforth/files/50gforth-gentoo.el b/dev-lang/gforth/files/50gforth-gentoo.el
new file mode 100644
index 000000000000..b2be92698bbb
--- /dev/null
+++ b/dev-lang/gforth/files/50gforth-gentoo.el
@@ -0,0 +1,7 @@
+
+;;; gforth site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+
+(autoload 'forth-mode "gforth" "Autoload for `forth-mode'." t)
+(autoload 'run-forth "gforth" "Autoload for `run-forth'." t)
diff --git a/dev-lang/gforth/files/gforth-0.7.0-make-elc.patch b/dev-lang/gforth/files/gforth-0.7.0-make-elc.patch
new file mode 100644
index 000000000000..fa558407c258
--- /dev/null
+++ b/dev-lang/gforth/files/gforth-0.7.0-make-elc.patch
@@ -0,0 +1,14 @@
+--- gforth-0.7.0-orig/Makefile.in
++++ gforth-0.7.0/Makefile.in
+@@ -430,7 +430,10 @@
+
+ ENGINES_FAST = gforth-fast$(OPT)$(EC)$(EXE) #gforth-native$(OPT)$(EC)$(EXE)
+
+-GEN = $(ENGINES) $(ENGINES_FAST) gforth.elc
++GEN = $(ENGINES) $(ENGINES_FAST)
++ifneq ($(emacssitelispdir), no)
++GEN += gforth.elc
++endif
+
+ # things that need a working forth system to be generated
+ FORTH_GEN_ENGINE=engine/prim.i engine/prim_lab.i engine/prim_names.i \
diff --git a/dev-lang/gforth/gforth-0.7.3.ebuild b/dev-lang/gforth/gforth-0.7.3.ebuild
new file mode 100644
index 000000000000..bcb4ec21a59f
--- /dev/null
+++ b/dev-lang/gforth/gforth-0.7.3.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit elisp-common eutils
+
+DESCRIPTION="GNU Forth is a fast and portable implementation of the ANSI Forth language"
+HOMEPAGE="https://www.gnu.org/software/gforth"
+SRC_URI="mirror://gnu/gforth/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris"
+IUSE="emacs"
+
+DEPEND="dev-libs/ffcall
+ emacs? ( virtual/emacs )"
+RDEPEND="${DEPEND}"
+
+SITEFILE="50${PN}-gentoo.el"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-0.7.0-make-elc.patch"
+ epatch_user
+}
+
+src_configure() {
+ # May want to add a USE flag for --enable-force-cdiv, if necessary
+ # At this point I do not know when that is appropriate, and I don't
+ # want to add an ebuild-specific USE flag without understanding.
+ econf \
+ --without-check \
+ $(use emacs || echo "--without-lispdir")
+}
+
+src_compile() {
+ # Parallel make breaks here
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc AUTHORS BUGS ChangeLog NEWS* README* ToDo doc/glossaries.doc doc/*.ps
+
+ if use emacs; then
+ elisp-install ${PN} gforth.el gforth.elc
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/gforth/metadata.xml b/dev-lang/gforth/metadata.xml
new file mode 100644
index 000000000000..c5298995d2d4
--- /dev/null
+++ b/dev-lang/gforth/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>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
new file mode 100644
index 000000000000..aca5828dc470
--- /dev/null
+++ b/dev-lang/ghc/Manifest
@@ -0,0 +1,71 @@
+AUX ghc-7.0.4-CHOST-prefix.patch 272 SHA256 83942dfcbe1968c7f5e0ae09e4d84d77d85778839814fca1689e168cad3a4f66 SHA512 e969478289c9bb99e24ce73acc8da866e2d2944405849fe10308999a386c57c2058037e142ab8c6548f1f4e01b7722efe4af9fa6c375f0988ff5a023bd2a96dc WHIRLPOOL a8ea4c41a895fab20c7db9bddec330d2a9192785d5a0b488dee622a8a739d37c187d5585f57d98c78379a1dea21dea7cf8f0c3a58dd1c44de2fcbdc11f732427
+AUX ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch 2648 SHA256 5a071e103187750f4945a66855558d908c08b6f1add70b9de0a28161e0f8fafd SHA512 ea2c9cd8fde754803950e29b2eea113227ca5504c58392847090e13640bdfa6b39ef714eff985947aa27e66c2506ef2a2867696f68a7ff34418a7fbf49765d48 WHIRLPOOL 2b45342e670df1a170a53246cdd5bb2de0692c2864154d8565515d122eb97c40a6eaa0d36c5c3c3776f1b9b8064e074257a326f12826572b1651f03038fda579
+AUX ghc-7.10.3-hardfloat.patch 747 SHA256 338d86fa83460da1ec0504616509626022fe3930360dfd883edf4820a0dc8a7d SHA512 a9a186ff62236d63b4b841bcfb1da1a902b3f300eb7d768c5316b5d636190d58fc71177f2d1670df261d0b681b104621f98cfdd76b30a0fb6917525874759264 WHIRLPOOL 2b4753ea0962b4c7407e81b01f1c2c6e3bd7a0020535c21fd2d81853c0be77d5673fd7e0810ffd28c20a5f82294c4a57cec4bf8e9438587cab5fc06c4155068a
+AUX ghc-7.10.3-relnotes.patch 1584 SHA256 c0d9cf98b61f7326db6aff5b2c48826b99c0bab8ea2a48eacf818fc626f985c8 SHA512 20d61d9f73bd0efa39c920897bdb18b69cff453f5ab24193aa3f7fafa70a9aa346ab4402604f81471f989c2401ca28d901fb85b8862577790559a35cfa3d3f05 WHIRLPOOL 29133ebe027e6cfce91556f9b907cbb014af8bb282049efbc660f7e3028df1fc977a08d7919d7f69945f534ec82f75a4714dee5fe3d32374a49fdbb08450e8e4
+AUX ghc-7.6.3-preserve-inplace-xattr.patch 495 SHA256 45e04a186e594ef4b550541fa43f9ed5ed7f83974ecac954f952279499de3c5b SHA512 98504e3b72446607deb520521c4abdd15e41e4ff69ad64e2ad13faca396bd7c7784b92c2bc7b5d8190668da480d5b1dd886f5e47e2e192d76b7fbbd58a42d44b WHIRLPOOL 3d634c6279d91df16653ede2b87edc4ac89256d34793abd6eac1bae7ec3e7986d87894ce88ac7a350b131d0e32fba3bed96af225329cb049126d708239965df0
+AUX ghc-7.8.1_rc1-libbfd.patch 2771 SHA256 d3d27bc0d161df7b9c7c64aca0138f04f0a2317f1e7194d549a8865848026071 SHA512 e232596342675769c6bf97686aff0fa7a8991e1edd3bf607068482cd0d0c9f9a9500e5b15f176a2025732474c9e547c0bae603d373c81b374c96787d46bbfa4a WHIRLPOOL 1fff73527c348a9561583f36e232cbb15c8e681b5b2ba81b786783ec5486db6c31b1d445201d9e56701a32d1210d5d2b47fa4b48e1688913b0c0111a080cbb57
+AUX ghc-7.8.2-cgen-constify.patch 1173 SHA256 604738d87e786b8b52e8e5a7059213fd7231f7998e76e125a0a0962e18931653 SHA512 3e1bca7d7f9062d231c45a6765485291871df833da31b0a5573bb04639791c554dd5c0d8fe33bab05455fe06d3f36fe81dd1db6d3819c739284a3af5c4ec8fb0 WHIRLPOOL c246ef43917caff35d85b80f3231de54fa5ff703cf6ebf3a6822406ec2b28e5b650736bc7688e4823fa16d40c700ca3db615c346435e79db89b7f1e09f472fc8
+AUX ghc-7.8.3-linker-warn.patch 1317 SHA256 0beacf4d6a43784fc77b95c5b8d0dd752261ba442501e72177b59e1a628242eb SHA512 3b0ece4a6536ef43f15e97e723d036401dcf41d47c15e29dd8fe30c9f1563894102922617982db7b6c7cf3ed8aea64458b540ef92ffe690ff72994b1246834c9 WHIRLPOOL 0e17c8d0d675b330f4bdea3ab60d6b17ac68eb4421fb8cd919d5924c269be3761335c2712270800e84c1d1d43918e9a53b49233c67a7f7fd85d3962c2f429667
+AUX ghc-7.8.3-pic-sparc.patch 1007 SHA256 71a77d9d43c76a5bb712bbd4bc00892058f51944157684b00758219e379cb2e7 SHA512 d3d81142a1e606c85c22127e2fbb26ceaeb2116435bf0bbc3743273577f04991e28c38a375a78b3f633a9b0e25f10951146d1f322e0ad7972089c1e5d977d16b WHIRLPOOL aebaa832e59ff50bbfb5447f89b9df0394167228bdab3da15399f9604cdfef5252bbc647c001af0b8b5753b34e5b554304e21f5cab7e65a30e8891e00045c000
+AUX ghc-7.8.3-ppc32-fPIC.patch 14549 SHA256 413638aeec8e7cf35495f163e584d459870ea001e74360c546419e801eb36b57 SHA512 aa6f13e04a52e7f25db456c02031b63c01b71adf41262361b36ca97aec18965f618ebba73494b4283ad3c0224f15d5c80dbd43076553e604d86a07baf7fa86db WHIRLPOOL 98b008bf28280b878446f3aab83176334c4dc27c759d408eff2a6a52e84d8d7f002f3cb15be8022e6c8ebdb3d364067db0738a9ca96c4159c213eaa925ea63e6
+AUX ghc-7.8.3-prim-lm.patch 444 SHA256 c147880c5c9f784cd731749589009a777317bd32b80b63f508730854025fcb7e SHA512 6979e002589a54c870c70eee8357dad4feb55b4e5102350cc09a466145677dacaa1bab5ebe4818cf0d3cd8ab50ee0ec2ab642ab0fb3fd34f4a266e5e90f9f389 WHIRLPOOL e33b43f42fa5e408d7879822c5081c89688cb924fadea32bb3c7ba426661c6b345e2051aac29e5f73ec2c7eafd63ae87413b4d52228e7e345308f5f816e1117a
+AUX ghc-7.8.4-gold.patch 1025 SHA256 632b044022c6ec60038164274250a34a3aaee9bd419e6f53ffe17d22ac145f06 SHA512 3087084d8b6a202496fc7ac71fadde06f7d1622d0e3f44f1b52fd04f1451d690f54b6bd8ee0da85663d252c6110340402bd1864f746117e59ce7b02e0247ec94 WHIRLPOOL 725031bcfaadd54b426600915ca4ef7a8815b6882ba0c723acf3a93c3a804282ea30c188954b4c4e1d869f4b9769f79b0db19718946279b256fc8ef5ecaf33db
+AUX ghc-7.8.4-ia64-CLOSUREs.patch 2243 SHA256 557841c6a05d7148235aa2290d19e0e7927de2451182dce04a7a83493eb8ac27 SHA512 9981d13f294fe0a28d1cabfd4db98bfb18110c6adb390f509667e3166a931c7d9f7b4b0079dfb1a22c174556944fef62f0e67ec855a9c3bccc5b54b0d0952c09 WHIRLPOOL c8d8f52e9c063106cb972e402966be8095c7a2761126cdc7dfe5e2584ab5d3e5fa11fae64db7b15fabdbd161123f1db4d5477f5653557ba22273cfce8da2ba3b
+AUX ghc-8.0.1-limit-jN.patch 1896 SHA256 f5077b57004c686cb5666d83915ea86048380e78143a3e463d7fd76a283341f6 SHA512 5eb69e0d5f87e326da82f018f0466a62e307f3acec47d991c7735ddf828c98c836dbff5d8164a4dfd08829b36a9d573828b9553fe89d65f5ac6be6c0190a110a WHIRLPOOL 83cc97e022b7c1620069d35a74e45efab341f4c84a8341b78779145573412f419f13050f46542a05afd3a0b6b70fb27ad91d0280816d667fedd779c7ce859d0d
+AUX ghc-8.0.1-par-g0-on-A32.patch 2276 SHA256 abcff6d7f711844570a5517cf056c1cb24719efdf3b0e403d58ff68f3de1a286 SHA512 0aab32a6f289c2a4e83bea2479c04cbd226f3399b5cb4a8a596ed756769a1b29bbbad261d7006c28ab56faa48c1c02e9e52cd35a7bba56ccc87f49ac1d17b0a5 WHIRLPOOL 215c3d2e7fdc621a221bd8cf147eb42d37913326fb9bbbce3bb34cb9f486ae78232c4073b5f8d7b473a43a3cd19e810afd197561b630463d0af26b54058a6f39
+AUX ghc-8.0.1-ww-args-limit.patch 5212 SHA256 529b30607e3622094a7227c47178a195dca04c337d46abbc23cd46d5dd555178 SHA512 5b3e34f52406649dca1cb3079565cfd068872387956dda296902c2e1ae8a092be0e70a1fc1d96f0e578fef0b82ff48b655d35a1e21911484f04d34809b295428 WHIRLPOOL 36b23f528bc4f3feb9bb6dac27f0572e0f7caf0315e314038adc53e8349a33bd6595e31dec66b09929ffbfb730d063f30250f7d42435a1ad9db8a75936f2578e
+AUX ghc-8.0.1_rc1-cgen-constify.patch 1185 SHA256 617f4a6e56f78ad97eed991809f78b296d12776df0c37bc6bbd6592d51cf203f SHA512 338c887a643b31ce6df2cbc28df03d1b98f48ae6b66afd0440cde7fafdc8ee51520f18c7f026645c3c995f106f78f451733b80abcdf8d4e4c3e9fcbcea597394 WHIRLPOOL 62fd7d6a171b62bdea4ca0ea5e952b586c72878f6f7cfda5d5077e3c92af15b86e9648387b357f4932303119f1bfda2486515747a77a2698c2bd3f524d14df63
+AUX ghc-8.0.2-O2-unreg.patch 1203 SHA256 e983a8df34cc49c705e8370c8a144162d62f3c9b6f969f5b660766b570eb56c8 SHA512 0d0252bb7c49cce2a38fb81673e6f6a6aad16728f66be6287f5a765064ebe5e5fa43f30f247fecaadc7fdd07af416522e5eb28656b3220ff3832ef8164c94019 WHIRLPOOL cf669382ed9a4b0a056e017a3317d61352980ce9588ca757a2076b8ed76fc8569ffc72f1ad1548ce72f1bbd1c7394cbbb00a552cc6c1b6c698bdaaf1579603fb
+AUX ghc-8.0.2-libffi-alpha.patch 2133 SHA256 29350d23998fd56b2260f2b2ef384bc57b70f6f328cd611b1b732970d722f3e3 SHA512 77964b82be47219d709ed4b79ac255c4762986decadef2d65d6643cb2d1b6cb0f3210cce1bd46bc16b6e6c51a4aabc73c5bc5e1bdaa8797a5f23033194f91a4a WHIRLPOOL ac8d54f233efb5bbd56fc61864c6a259c39bb93da7d9cb54d6054d3b4ca46c6f18689424f235074cef68868310abc7b56e98b407a2cae6eac6980218e83f275b
+AUX ghc-8.0.2_rc2-old-sphinx.patch 434 SHA256 4daa2d14789575304ac23284459c940034d19f15fc3ce09247369a81f7a32fec SHA512 fc8fd8d40c70a77a3aecfbdb0993bee9ef1582402b7220ed3066e1c6d4bc480c5b569cab44b58b3c54d1e68f506dc5b86ff87518d744a5a846d4de6cb1093db2 WHIRLPOOL fff4ab6612290088c5704a549fd0614e5e401ee9cd4f9483c6b782e8ee3d0e3ca8fd1528d1248cbd7280d76966e61d326e008d43ec96fba820fc53cda1a0ce87
+AUX ghc-8.2.1-darwin.patch 910 SHA256 020f390b635abfdf57bc5c3eb5c7c85d9ce0cf68d4bacf3d180ffd4f35fbe9ae SHA512 0177fda8717d9158a99d96853feb1bf40ff13df8f5c5669c7c48f33accf69d6ddb05876776cda66705e85ee56c5ecff8f81722d8e748b6c2ed6b9bf611e42a2c WHIRLPOOL 140b21eac0a40dc14bc7bcc65b3d084da2151d526e5ae87e34dd6780d2bce8b552aa3c17059b4307f8cf92d34c68298fb461cec5f2e3b49b65663a4922cc3e26
+AUX ghc-8.2.1_rc1-cgen-constify.patch 14371 SHA256 37e9c601eb146c4b53babd51a1a3522bd83cacb29d87ae6a877dbaf7d187f041 SHA512 8715c2f7c497eeefffd13b578ff718f36ec22bfe397501f685db0c781c614ebaa1178a9ca7550a722876d1cf9ace39aaa44493ecb934a828fa5010471672acfa WHIRLPOOL bdeecf23589066073a7d8686bcd21969b9aaf58d1475e8ed6ca58af5745a1b4c63b2f0df45af647d7d2d58e5eac167af9a7bf28113f7f5629585a14c0df047a8
+AUX ghc-8.2.1_rc1-ghci-cross.patch 2828 SHA256 85693e0ad4f0541529b56a48b48cccd1943a9cec690d36853065e35ed769636b SHA512 55e8f2e6bf69ff26976005e0b89c400df9facda5eb974f7340af89625361adce48371616a5d292dafbd4d98cbfbc0b656d36749f2e16918b275a0469ed88cea2 WHIRLPOOL 6c7865bdfd73c549e6712ddd3c5b2817df2a2213631413438c11f9637ee9c94498034f7cd4921a98032ee3224e8ad6be167d9a018ad101ac18feca7c6f42d1f0
+AUX ghc-8.2.1_rc1-hp2ps-cross.patch 3865 SHA256 837fd46648995e0e5162ce1c36aa542313ace11f7ba07435b250edbe7ca4273c SHA512 d2ed48701216f5c03567e61c207e32d6218009380941275c690edd8eb0197728e7e3c0edb00d512792dc2041a958de82ceef393e96d3324b690157162e28d29a WHIRLPOOL 09fec6cd2f5ce000e91f010a73c033c35242ebf874869769e55e711c08eec64a64ffa8532ab01e1cdde259b734a42716ddced4e27bae9010c62517e05f2b5923
+AUX ghc-8.2.1_rc1-stage2-cross.patch 2986 SHA256 d5f270b368768e4ef6e01c91312be60b8fd539f32e9dd502045d8dc75b0c9101 SHA512 7dcae0f9ff090e521befc9aa593a674ae9175ec07ebab91bc5a72097be509a89de12bf7c959870b12219074919eef115096b74f78e7cef00360aea32126ec8fa WHIRLPOOL 5456fc314e6cc10b030d2025fcfdf309157408f961cdbd6a59e902198a656fce3b7272f98f0d87792c9901d0fb7fa498a6efd844a7efb83a6fec1a4d77c4a0ba
+AUX ghc-8.2.1_rc1-staged-cross.patch 1605 SHA256 ee1630d6eb89fecae9a835e515dea330c094ccd7f7b1c4920cbaec69a9c2aac1 SHA512 d9005f0310002f87972b0db8484b714d15664209b41eb84ce26950c4a19e854203e9b78e959755ec65a2a50a73bbce4999b39a3ad4da844cfe65098e65171450 WHIRLPOOL e6922cf0802839def8a03c92c5337cac8a83798d54245971e105a23e26ad8905d4b48a0dde37aebc1e5adbd0aa89062d817c895c62b27bfa4bd37530844b5023
+AUX ghc-8.2.1_rc1-unphased-cross.patch 1066 SHA256 6d6a40828b9769104666f584e3a29cf5d81a5d65c323fe4294f3d53f8a8d0d8c SHA512 24b9b864e984cf3e34c2a23e0ba24a7f2c961dc590c6bb8e6461afeee7bc4a6361e5bbccf17754486c81136b60e12ae7e9ed06f485ef2f178084bcb2caa5edd9 WHIRLPOOL b91d00c94b1f8b7d531e324192092452ea0ce28553730c965b17c9f1438f2a0b47ea84ffbf1bc1e597d1ae295eae930cf37dfd6a3bae5971236e7aaef7c16eb2
+AUX ghc-8.2.1_rc1-win32-cross-1.patch 4535 SHA256 7875c0955531181ca0ad479e676838b2c3d4bc0ffef54d68e676723fe3e355e6 SHA512 16e8be604af1e856bcec0603caa9d4fa66d5e4773a68fecaf4a57f509cd241cc7fb37fb9705d253e28d871ce2afc942e940ca171b45d41715acae5ef6e0fde8b WHIRLPOOL e735a2852542c9ef23c9c664cbd230b1c4e6f73c28bd0bc5acbaccdd9a647f0dfea11d48f81f218106e544c780313fa2691e496b81d981d71ed523ad38e4d42f
+AUX ghc-8.2.1_rc1-win32-cross-2-hack.patch 6231 SHA256 828c281ceffd86bae491600d1fd4dbd54220b1f423e304bd2cf14c78e922e67c SHA512 8617c1346ba7aa2b41ee01feaa47f2ca477353f9b825be48c5d3505a134e0a80b613efc6cb92e7fbd3fe062e77450e197c826151a42c0c77177fc6ef8e65287f WHIRLPOOL c5ecf31cc31196f015378ef13339130c5d57266ff1678313ed399c847dd9215f2dd6f3c6c7d49be00f079d692261b179a3c087f3ede41362d05716b4fea1423f
+AUX ghc-8.2.1_rc2-O2-unreg.patch 1199 SHA256 1c097453ad6d10786f035543eb2f3489ba8c36affee77e1bb2de5c8f1dcef91e SHA512 708f68234f3678af3d41e7a50f9b914030536aad081b1a09a6169b12ed61ffd9db207a03f8f73d1761a93c5f2a21e92cdc23475501f96cac3bf98b046f3a6dba WHIRLPOOL 1d9c12897c4bf5ba2d3a4b53a912e8aa0b542b01d1c24a86e09bfa54838bd5b3437c9df21bed5cddef606a2cdd433bb7d1589031ea0f39b781d2bea42ab1afb3
+AUX ghc-8.2.1_rc3-any-vendor.patch 1288 SHA256 836e6635ba4c656891f94265598da2871389f7270141e27e7c39e921386c63d5 SHA512 934d6d91a434ef1ec8fbeb8b13f7a20b0654a97df05d10e8d4f577567b5a0498eed484261bc1348926e112c6d4429304f74f10e4ba819120cf5840e9dd2d8329 WHIRLPOOL bbcfaac7910aa1234f4c31b3af763eed9aa1d0f7d44cd46ddc03bcfdfa826e807c6c26fb33b3d528c6bf3105b864715796b941ba4a372639938452e06dda5d63
+AUX ghc-8.2.1_rc3-stginit-data.patch 1179 SHA256 ef5472a60d2c5bc971ade2fa99d8e6a08bbf5dcead7b4df6463c8ba903e08598 SHA512 351b78bce46699c63ba9e02103eda0e80eeb92cba9b364049a11e61bfec3f0bbd9317a4d221b51ea29e42e6735ea4d5e3a6357d0180dc91647b11ccbe5f885e4 WHIRLPOOL 7dd03356400d6380824be327802247d7f55a04ba9e7aa871aef51eb3478b47be55c215a762f16ed6aef4081d92879f9735ffa02f0722fed0da7c1ee1c1da8414
+AUX ghc-bash-completion 6496 SHA256 82a862bea2c9248e06fcf74d307de07b05a55f9eb95f412762bd02e53fece822 SHA512 ede79ccf23555f60f48297d29bd98e3ccfd67d2cf27462153e00beb930398cb497e34ba8316e91df44c577ed11fdbe5606f7c6a2777e35d5e783590e49ccfeb5 WHIRLPOOL 271dc4159ac500beb53981259e4b154b1f96e2909bb7cc43b7364f4fd4f86ce65df04611a46043c14079f699226195a002532fbb1e4ec01715e07e8469f9a7a4
+DIST binary-0.7.6.1.tar.gz 47086 SHA256 8f85cafc15be660757878a665d024ce595d4422fead174e20a501c9ec8f81067 SHA512 655daa93a52b845a85d440810452933d7bc3398ad1b51e1e955b2d19a0a32679325a0d1751ad50d252531e493528262e14dab32af4b9a515855fe7f64e0730b2 WHIRLPOOL 6853eb2c817e8ae792226c6c7764ce495833f965c3d503fe7e39c0502019d12f7bd46309b72dfdb276c7dbce8c004cb59fdea4936d69ede0a7c8b487acda2702
+DIST ghc-7.10.3-src.tar.bz2 13281867 SHA256 3e29a56a74ed6a74d3ee2a6db9389f2462837da46ca6dce9d2965f9c152f0c15 SHA512 97a8282d8a75399c78d85d6faab7ac253a993dc69f1840358572f1878b8fd1a527c28801e5823c8200b5690e268e4a0c00941945ada13790852c75a83b612c17 WHIRLPOOL 04af6ea2738a1cc9e266efbb0e1b41b70d4cd915b48ca1265fade62b1c56cd51056fd1a82fc14cebc19a0c16782609a991c1a181ebe59574f1a10b4f26ad830d
+DIST ghc-7.8.4-ia64-CLOSUREs-regenerated.patch.gz 13268 SHA256 3bdff22e654aee6f942d43edf1bf6cf70404c0152c4fcf89276f10d2c4c5b4b9 SHA512 a655713e06324b56f0041edf70837487e296d28e6f3ee35fe116b9938765aaf3469d25e92645e0940655ed3607dff27d3826fe0f995c84e81b51bfc956816e7d WHIRLPOOL d2cb53bdc6debc0278d554168ea3ab22b0fd8314adac81444637278a92d21b766280fedfb4b7d1b4540c7381c7962dec6b13a799ab2fee4d456fe2875d5c6a5b
+DIST ghc-7.8.4-src.tar.bz2 10600755 SHA256 59e3bd514a1820cc1c03e1808282205c0b8518369acae12645ceaf839e6f114b SHA512 079a53891d8ebd8d9b88da96170e60981608a619f8282e4b7948f35244e99bd87277649ac7fcebc227a61a4d21960db8d5e5b9e92f2c69c82d8d68d7fd0a41d3 WHIRLPOOL a9be7641adbd237ed6e0f644c312e655e98be9566097aee5e2c0022e8756d5b2236e42dd86d76c638a001b5ca3f67307e89ec0cd003a92cd112a5d6d3e3d8467
+DIST ghc-8.0.2-src.tar.xz 10687760 SHA256 11625453e1d0686b3fa6739988f70ecac836cadc30b9f0c8b49ef9091d6118b1 SHA512 58ea3853cd93b556ecdc4abd0be079b2621171b8491f59004ea4e036a4cba4470aaafe6591b942e0a50a64bdc47540e01fe6900212a1ef7087850112d9bfc5ef WHIRLPOOL 5ffd94f797c32c87d9d818acbb1a41f2c140d6f1da169854aab6eece7a41499b55fc573f9a4fbcccf09dcfc92e460d8c91be5efd8650837e8bfba009b04261b1
+DIST ghc-8.2.1-src.tar.xz 10736016 SHA256 cfc2d496708dacea3ea7dde4c6a4b921b97a7f550ee2acea44cfa535840593f0 SHA512 d9aa2aa7f9414db8f4e51d6c275694b46df515e68331a1a2b6018256333a2c63ebd877b75ee90407ecce5be672ec9afc6bebd62aadbf8ae06b94f1760d1736be WHIRLPOOL ecbdf8e3f330ef329fab21865c5f063763a2320e03063aeb8777f6c4769a86b33504c0548df9c6ce859028277851e6e7482b7c3b62986c6186745f894e7567d9
+DIST ghc-bin-7.10.3-alpha.tbz2 183558856 SHA256 780ac45b9b38fb40f08eeb7dae741649ac19dce2271df4bc764cac9be6c5c225 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230 WHIRLPOOL f488ecc945c6100ba86b9ae25eb6a472693556be0205a6c8634f2c235e779fe17b391ced7fec5d89c0c6c3d21583fe9f9b80bf628f3307890becf3f3ffb57a96
+DIST ghc-bin-7.10.3-amd64.tbz2 112040431 SHA256 c3c71aff288f7de2785d1c3d54f0fd636144eb3dcb590bdda087b0775203e517 SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558 WHIRLPOOL c2497a9565abf7d37e7928f508f7bf7241dd529aa252da708517f9f067e3d016341b7a73cac34888b99c9b84a8d01fd9e8d76f2b332d53e0d708b078f20ee807
+DIST ghc-bin-7.10.3-ia64.tbz2 238680956 SHA256 0da9b5966f0920341f4cf041b814817e1ed06060e8a491481ab19a68153767db SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5 WHIRLPOOL 9e059a953607b6477ea7c27bf55175d838c6aa3c57fcf92f13fa6112e9e728037073047be300a5a757395d759d30545546cb46816ec879a2d31c3c0a78868e42
+DIST ghc-bin-7.10.3-ppc.tbz2 125832171 SHA256 67817636f5b91e04ecf94972c0bfe8e4e95efde82c4e23495b869da750409822 SHA512 4eb111e3686656a83515f59d4ace8bc28806dcabfcee5201ce29aee38b8efcefaaf70c50bee55202c2d2abbfbf231a6b41df8b13199332c53055adb1754a3191 WHIRLPOOL 8ec420bebf60b059c10ff0985993def7d1f40919d82e94b845b918f9ca146c8dd087f2abe9c2c7744e0f53acb75a752f8f7f6b72dabc04752dac22045302db2f
+DIST ghc-bin-7.10.3-ppc64.tbz2 142469712 SHA256 c8fa2ea861d4c5373f7f67fd3a29db4e48593d669c8616c2f349592af7e4846f SHA512 eb59d3abc8b10010311d59df9473c5ea649eb0dd7f9ad41a1929a540a0ef8c20abaccd68254f8abab037fb1fc94d824f474e18e4316b8f2a7a954d0645a2a2a4 WHIRLPOOL 14ccfbcf818a80f1daf39b44dc7562304af925e548407ce0deecd2d4593f4e138da38cfe63d4e5b8b0303c0237c678c27eaac4331288ee9b9dcbcf8be7390f74
+DIST ghc-bin-7.10.3-sparc.tbz2 163105069 SHA256 b9ef4179d87f4a56e9a786b28b0674f817118c73784b0dce283affadab296875 SHA512 d467a42487378d7dee311eb33aa1c151f5c16a6e7a4ab5bd8177df229f474adf19da3e1ca1064943a40abafcab6852b0589dd34413da82b33a03ede1ac17bf5d WHIRLPOOL 26ecb662f1d0eae524388008c24b3d25f954668aba781e997afd934c10b379b32e3376bc3a1232b066de84d3e1d1ad838dcef667b0f7606d0ac52acd7ef78a72
+DIST ghc-bin-7.10.3-x86.tbz2 113877175 SHA256 a06d54e7256292123b49c4d429761794b53d2440d2efeb98bcfe79920c65b044 SHA512 75096fe9106d975c15e646b0a559c544621fd02791f491bce54926efabf0e55b97150069ddfa7a9f02cc30bb6975d3d3121a82207a9f67b8dda5ebfe17ec4744 WHIRLPOOL 63fea83be14ae317f313251b7c952c974a8e4f9671d78d1b3ef77c3ab317d2194faddc8d71431c5e1fc42215abed1842913f2f40ba383288784e984c47cd27f0
+DIST ghc-bin-7.8.4-alpha.tbz2 210691009 SHA256 23c9e5ef97b444fa87d3b9509a7b2b7b68c526ca4139739dd60c08fb1279d48a SHA512 f08230de82f0c4112da9d0b48227ca74d5d0b4a84046d746b023557b7aeeb9678f5ac037fe89a863178df4b9036e5c5c63182d14dfbb42c772011de883e3966f WHIRLPOOL d624b4d5eac8aa68f389b81e68d7fa2ea960c9b9c5fabb27ddf4da5140c18fd0ee9080725fb645e2c532bb0a01ade32da2cf6aac08707f9d89a94ea9752b8e72
+DIST ghc-bin-7.8.4-amd64.tbz2 100573133 SHA256 bd9d144c08caa0ff345ada8d7eed7592531b8f8b9ef2f94d0b9a42fd747440aa SHA512 e4416d6dae3c644f74bafb3aecf1a123f985427aba32d0e0c43143a137d64a9220fc5947cd9bde8a3bc44555ae71184fc06a3f7df7976aadd065ad5681b90954 WHIRLPOOL ab0bd6219d68e08cb473cf2f3f15538d65940f28e84f026361032c3a6bc09f7820faf67629e915f27c2afda7de41fa9c6010a1b5cd487df0936d968c7e58a3a4
+DIST ghc-bin-7.8.4-ia64.tbz2 222789275 SHA256 8bbbc11ba64d08bad691593afafc4c6a7cf078b10cf33cb8508bf0a0b3ccf523 SHA512 2d8b89e399cbe9bfeae29cf3ceea736bfaa65ea21483fa2ee95d9814e122fcfbb67ce22ad8175493fab088e9a9d0139610c67e9d5c8b4f797b5e14846df32b6e WHIRLPOOL 181d48bbb53d181c8febf63ddae620bec1a6c212a5b5bf938228689df2ff45ba68d7d4a99ebb1b68aa516d5633be41125321e3f8fdef6e5f0cd1e4a7f9b8774c
+DIST ghc-bin-7.8.4-ppc.tbz2 112803496 SHA256 a47e0fb17137878af1e7b5a166046bee20d456d49da6ba8cde990173f4b3be8d SHA512 9581f55a088e53edcc969960e45c9ad7227d71198ce2d241a4a066a138450a879287e55e7d2210e86143670539711387e36c7f60660c4422dc1b4122278fe4a0 WHIRLPOOL 4904414cbfafdb48f0539b071fe80568da74beb174948ee426da5c22acf1d0c35ade89d2e160ddd109d2fbc0a508459a8e249f3b732b88735070b9522b417108
+DIST ghc-bin-7.8.4-ppc64.tbz2 129284515 SHA256 1e8a350af39d1db1e58a74c9bc4a4c57765eceb33e5b32751fb31340b9ff02ff SHA512 53974e15c26cf6b62d8f838607abd209ec57cf0f45fcc48b90ad62736f5e4e7ff263dcd326ae03d8d5557a22eb9730e5eb8ae4eda55e52dd3d973bc73c84935e WHIRLPOOL adaaa92323d319f6576423ac41678f7d263f36e0e30d89fc14ee89104b006772c26d7b408be7f85225d1bddaf5f15ebdcbb7136f5c8bf7bda4bb0938eefbe6c2
+DIST ghc-bin-7.8.4-sparc.tbz2 147340595 SHA256 1cde749ce3c47016c5c7a7179423d0aa2b174ddae4af0392ae3b7f57b098ec0c SHA512 ee5f0b2f1cf2693a0f2be9df71ef61b52bc2327225d40b8be955c1584b9901ffc6aaab63c1e46bf9bb352633b605c98378f8fd3e6cd71aef1c089007e4110217 WHIRLPOOL 27d55a016ffb49852553f920c29929c3bdf383e28b4b806ceb9ffc8b46a59b438801101402e498b069aa6eb56870b70a00ba7b1f4098f3fd8d8ddf1b20caa626
+DIST ghc-bin-7.8.4-x86.tbz2 102312459 SHA256 4c53148836e5a1ba55b8db5bb7c3eb915103e0955fb503b2facdc5a72f12a974 SHA512 cabc5bd6d8760ce4120e7053f6c1dffca7d161ba454b6201087760096c037c932e3ff8c82e53346c8278855bf0cff1c2f5fb8046242ca4d8307355b060a9556e WHIRLPOOL 0171d67dc1b63381a491e1577a783eb0e8f53cb579ba96a9b4fdf6685d494d78eb2be780f77ff33422d3b7c320ed102d9b48f6e954f8fee5532982575001a4a5
+DIST ghc-bin-8.0.2-alpha.tbz2 234361847 SHA256 fbf8f0662cd2ed7f8c233bbc176fcbc050f90dd627acf0729626d6d96798baf8 SHA512 c8b588feeab85f7b8fd60e2e8bf755d46790d4882d2ecf6b2c8b8e02c62a11b7e6453bf0cfbc646bfbf24310fdc775337f3957ba5783675a271b68f0af2e9070 WHIRLPOOL fbd9cdbab00daad446f0110c2bb989189248ecd4ef504f57c874caf2845f863d4800940ee69c328b8dfa5eb4adf57698a16c1b2921cba149485bb4df206fe8a0
+DIST ghc-bin-8.0.2-amd64.tbz2 131007452 SHA256 d68b0682de40ff42b7f91ebd113d774cf5145cb9609c689e31cb1eaea75ee355 SHA512 d960c40966e392d5497f694f0b47df4a6ec22ad1b4a607437c8af7c33dfbf122ccefb525d807716539af57c31660378e52fc495dd0a1d0fc3bccaef3578be177 WHIRLPOOL af5703c3df66f61b82746d784d6c937ce490944f387354b90846bcda9dbb02ee226abe6715d227be34677890fd0e6865d046c10a24d1309e9b6d8875398d501b
+DIST ghc-bin-8.0.2-arm64.tbz2 191332951 SHA256 eb016875bb7bed6a03c72f142d05e2c4992526d4b5c674810fff723240b62b28 SHA512 b9cabfda8fc6e851ba99f53274c1a63c5a6a365311a9203f1247ecf90ab843dd94960ad44c4e67032f4690f07d67bfd8bdfbe59f857d6c63344430539e2082fc WHIRLPOOL e70f703acddf5e1778533ff221aa6dd0149e0381dfee352be66d72996bd67752bf17fc550dd27c7cf0a34e2f81995126b6edcb1f9c39f3e281a8bbd9f99a0735
+DIST ghc-bin-8.0.2-ia64.tbz2 250237654 SHA256 f3e74db697900d031c4d405310c3bf3f40f663c5029b51039358914f835b8287 SHA512 e8cb381de12ccc0a7b513683deb5de555fecea22a735d09b073b0199ab4124305bbd8a093b4710b827513d33fd4224007e7bd210b146508eb183be7dfd283a26 WHIRLPOOL 284d780f6d3f7b786209ef5cbf844df37b3cda89ad4c2c7e6ffbe8bd4f890f512f4fbfef28373a40f91f0644ef4fb0ce49a3425cac9431bdaa1bb90e3aa810ec
+DIST ghc-bin-8.0.2-ppc.tbz2 144760090 SHA256 a261dd97df396296d1a94c311c757040f74284b812634d97734557915d0a44ca SHA512 bc6bf8998064ffc1692c3bb83c44d1787760a3f4a1e6b79dedaefda5fe32b9052049a60f0ddd3c0b0bd24a722fb35e310e0189b3511721ff89d4d02b3d7c14bb WHIRLPOOL b070acb230dccc2faed66002f4384c8c9b17ce58655b5861766582558a66236136b1d02ab6226c7de5c74960c7d2d37c3c0069e38dfa980730043f623df4baa6
+DIST ghc-bin-8.0.2-ppc64.tbz2 117432068 SHA256 f2eb278c4d40d92233767d48149ec96a6c6097159ec846a984152c99a559803a SHA512 0eaff0557b68649a15bbeb2019f46fa9e9e7b8a916aa210ab56888090a5b887d20d818e7987177bc6a8e7fde503de560026e6bb55fe39679b8b1ee13c6b7c4f9 WHIRLPOOL 8a4ba955183cb7c94ecb59f62eab18a4ee75aa422d3c6e7172d347112b8445dccf86c718fcd84d3271dcb1f35fee0451fece184840403a02f7ed8bb39785075e
+DIST ghc-bin-8.0.2-x86.tbz2 133372061 SHA256 5e56bff6831a9c151d5d6f82db49b21d33bea05f05cdf74fca5adc423d546711 SHA512 020ce0e597e2907550c080f1bb0f863dbf83d5d45df2b3f44173506475bc4ef5423c5a060fdacd87614c3ec398ad94c2dcab9cff0376a54a2c54c2eb1e2f657d WHIRLPOOL 221eae08caff5c2157fae7df901c94d6d1393be3ab0526bb9d8a80d4304af4c4a420fcc2fe62926bf01c3bb02f161f1eb61c7eb47d3c6801cfacb25c1a33e983
+DIST ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 96157437 SHA256 2a05584fd51a4e9040a3611a0687d814b62b28c5ccd4102b00cf8bbfecadeec9 SHA512 e891e76557fa61853e28829b8bedc4a6abb92954f90cc1ebcf22a13cc137556bbe9262e7398b7e1aedbabeb997916b008bf1561a52f16a569f3d58ea9404f41e WHIRLPOOL c955dbc501b6c3effe08a91ba8b6584e74b224427c56232744c4ddedad72039e2cdb2f3ea1193e6ae2e7fd8a46a947cf7a835399c81f5dd5568c3ce1ad8a5adc
+DIST ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 97490496 SHA256 b67f4f7518a4e2ec5cfc0434dde0365cbfe37c4c7e164e9e8e38199bb6f083cd SHA512 52630a185d0eab56bce0469a612a54109895bfee041ec362ced59a9b35ba3b9c185e86bc7dbf0a5939081d3626baa19fbb3306e36d1857530248a7b9bfc100bb WHIRLPOOL 7998e0c351bd6943bd351909f5e9af0146a3e08f04141fc54807ebea994e4bbcec44247c885865eaa5af8786dfb514eed4fffc35ffaabe81f2d7f8a856ed10d9
+DIST hoopl-3.10.2.0.tar.gz 241940 SHA256 6740814c774e51815e8260ae1b4ac8af6ab69f02e112904450f689c4792f1121 SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a WHIRLPOOL 761e7440d2bc32b594ab55ea967c5b075bb638b2fdba6606beaf9c31a90e20031e914146828004b3d11203668210a6994be9fabc3b0ebb428d516b57cae9ee68
+DIST transformers-0.4.3.0.tar.gz 28632 SHA256 b3d0a797e815ca50d411e20c02f781efe7751308007d880af7f0b5c4365c3a9d SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780 WHIRLPOOL 89591781926b1d025056dedcfc5de61705056c1e3a8eba72f2e89789e78d2ed4d8909f84d6560dfc66bc0b360f98cb3dc3835f3a05c2325f747498373c88aa4b
+EBUILD ghc-7.10.3.ebuild 22300 SHA256 354bad8f2eab34406be6b39e1c079566cb3ce6fef7d1df8d9aeee9fbab396ee5 SHA512 99f2a4a831f75341b63526d00f243a7284dbd7cc35a4875efd3f014cab30cf3dc48bcc428cb1eb6e1562c7a2a06f34be3b64b65bc21cb65e84c65461d65c300d WHIRLPOOL 35304b2a7a5f5f3cc8cf883ece80f7b85b061c0f9e092cfc6cba1198a1fab38fc3ad55d57c893389f922a24491c27b52ebddb849ff29f00b6ff07500ecfbf82a
+EBUILD ghc-7.8.4.ebuild 20466 SHA256 af321e3a26f242d6b7f93d9811493fb3832f176e4043471922b198a2b5681f9a SHA512 d9eca875ad4bbccade1ebb31b83f10e57c9cf84577a3b25f86a9869af8555813db48d028df76c9c47d624ae461f1b6c32369b18ca4c39c889333ad19fb37f1ac WHIRLPOOL 7584b84e45012c2ecf0091e5dc7d4390d200fd8a1de24b3e38d23a7b37196cbe13fef95a460085722929c60aece924f2943d0a53d2f1caba69cb1e389960ca90
+EBUILD ghc-8.0.2.ebuild 22010 SHA256 a7229d35ae1d56672aa1dd8c9a0cdf59cba141e0c55e44b9227fdf98a6f67471 SHA512 cb77220223b8a00457d17c9dd7d8ff2e4221bc26382067d3dd0049ed13f65dad12fae69ee99fb2077dc003baaad42b605c5c448d366c9f251fd091a699c8381e WHIRLPOOL 561e46af6efda37c0b8cd6644dba6dbdfc486593df63ab82d1974aa90a9e4a4a68ef8b5badcebb7a404b924bb1bc34f1dba39d880f67a9cefdaeacc88ca20624
+EBUILD ghc-8.2.1.ebuild 25345 SHA256 06f270d334f53cf8da7df363b08f2caac39f50810a54f67610682a9b612f491f SHA512 deab1abb757ecba2113be9cdb82d9ce7ee7ee1094c4ce6d8f0c0bac8c8d5bd2dd584e8dd07d667afcf682fa304f4a23273c8331dc010de6c6c25bda6f0da68a8 WHIRLPOOL dcfc8cceeaa3b5bf06d8f4c2c02ebee3d65f684c0aad39fc7c2d6b2368093e2d48db1eff81028db68b645ea1070bc158f9746b3589046d3d9d87090bf9cdd257
+MISC ChangeLog 6712 SHA256 edb50720c9aabde7fe6a43923903005fdc456d6e7553ec352b9a5e1d4a6a2671 SHA512 dfd4cb4838bc5c9e829f130df499f33782650cb5315cbdd84025677d4b428d4c301dbb32374de69cea95e62e15070659b774d97aaaee0e306217ee11d459b872 WHIRLPOOL 02c53782c7f98222bf6c5496f8795648460890ee1a51108a324c3a6bc0b6b7d014b3ffbf4050507fb477218ee5517397713c9b45d9b1a06b202897423711993e
+MISC ChangeLog-2015 52851 SHA256 feddaa2305430f9f381bc36281fc3c3b3a4c0a60ce00f6de9a00bf9bf6b1ff62 SHA512 db3d92c600335d49cdbe77cfa0863c9ca025359dff8e58b2d792598e95edb03ab5dbbf2399a54ea5fec96b2d72d5c5b33d0447cf8409c73722e575a178d41970 WHIRLPOOL 650bb4225e167a478586daa1d1305f17fcb84306c512974b93d1f0ae1b859056233955ee5b0563405221093ffa3ac948565422228d7ef9967d12124b9fd6d8a6
+MISC metadata.xml 577 SHA256 c015496208354e95808fac7ec7b8f5a8383e7a3065bd33bf8e95e8e070abd918 SHA512 7484ae45b530169fd0cf616af4f87bb0d551aadb7784dbde24ff4a63f7346cf0c94550240a7d22599cfb04a72ef4ec984edc325ce7e0b787709681ef10193873 WHIRLPOOL 56d0df6aead35b637669b54eb3c401b8dee2d0189d92dfc764182cf9785b4eaf2c5cfddce5115de6be2e48e1ba87f87f7b59cd91043767f52b4a70e50652fe39
diff --git a/dev-lang/ghc/files/ghc-7.0.4-CHOST-prefix.patch b/dev-lang/ghc/files/ghc-7.0.4-CHOST-prefix.patch
new file mode 100644
index 000000000000..682c573c90a6
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.0.4-CHOST-prefix.patch
@@ -0,0 +1,17 @@
+Strip versioning components from *HOST for Darwin and Solaris
+
+--- aclocal.m4
++++ aclocal.m4
+@@ -1358,6 +1358,12 @@
+ freebsd*)
+ $2="freebsd"
+ ;;
++ darwin*)
++ $2="darwin"
++ ;;
++ solaris2.*)
++ $2="solaris2"
++ ;;
+ *)
+ echo "Unknown OS $1"
+ exit 1
diff --git a/dev-lang/ghc/files/ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch b/dev-lang/ghc/files/ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch
new file mode 100644
index 000000000000..60db34b8b362
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch
@@ -0,0 +1,78 @@
+--- ghc-7.10.0.20150316-orig/compiler/utils/Pair.hs 2015-03-10 05:43:13.000000000 +1100
++++ ghc-7.10.0.20150316/compiler/utils/Pair.hs 2015-03-17 09:50:48.491115080 +1100
+@@ -15,6 +15,8 @@
+ import Data.Foldable
+ import Data.Monoid
+ import Data.Traversable
++#else
++import Control.Applicative ((<$>))
+ #endif
+
+ data Pair a = Pair { pFst :: a, pSnd :: a }
+--- ghc-7.10.0.20150316-orig/compiler/types/Coercion.hs 2015-03-10 05:43:13.000000000 +1100
++++ ghc-7.10.0.20150316/compiler/types/Coercion.hs 2015-03-17 10:11:21.636047380 +1100
+@@ -104,6 +104,8 @@
+ #if __GLASGOW_HASKELL__ < 709
+ import Control.Applicative hiding ( empty )
+ import Data.Traversable (traverse, sequenceA)
++#else
++import Control.Applicative ((<$>))
+ #endif
+ import FastString
+ import ListSetOps
+--- ghc-7.10.0.20150316-orig/compiler/typecheck/TcEvidence.hs 2015-03-14 08:48:57.000000000 +1100
++++ ghc-7.10.0.20150316/compiler/typecheck/TcEvidence.hs 2015-03-17 10:26:03.251433371 +1100
+@@ -50,6 +50,8 @@
+ #if __GLASGOW_HASKELL__ < 709
+ import Control.Applicative
+ import Data.Traversable (traverse, sequenceA)
++#else
++import Control.Applicative ((<$>))
+ #endif
+ import qualified Data.Data as Data
+ import Outputable
+--- ghc-7.10.0.20150316-orig/compiler/hsSyn/HsBinds.hs 2015-03-10 05:43:13.000000000 +1100
++++ ghc-7.10.0.20150316/compiler/hsSyn/HsBinds.hs 2015-03-17 10:42:21.459519033 +1100
+@@ -47,6 +47,8 @@
+ import Data.Traversable ( Traversable(..) )
+ import Data.Monoid ( mappend )
+ import Control.Applicative hiding (empty)
++#else
++import Control.Applicative ((<$>))
+ #endif
+
+ {-
+--- ghc-7.10.0.20150316-orig/compiler/parser/RdrHsSyn.hs 2015-03-10 05:43:13.000000000 +1100
++++ ghc-7.10.0.20150316/compiler/parser/RdrHsSyn.hs 2015-03-17 11:17:48.950929542 +1100
+@@ -91,9 +91,7 @@
+ import Util
+ import ApiAnnotation
+
+-#if __GLASGOW_HASKELL__ < 709
+ import Control.Applicative ((<$>))
+-#endif
+ import Control.Monad
+
+ import Text.ParserCombinators.ReadP as ReadP
+--- ghc-7.10.0.20150316-orig/compiler/typecheck/TcGenDeriv.hs 2015-03-14 08:48:57.000000000 +1100
++++ ghc-7.10.0.20150316/compiler/typecheck/TcGenDeriv.hs 2015-03-17 11:30:39.106508173 +1100
+@@ -59,6 +59,8 @@
+ import Var
+ #if __GLASGOW_HASKELL__ < 709
+ import MonadUtils
++#else
++import Control.Applicative ((<$>))
+ #endif
+ import Outputable
+ import Lexeme
+--- ghc-7.10.0.20150316-orig/compiler/vectorise/Vectorise/Exp.hs 2015-03-10 05:43:13.000000000 +1100
++++ ghc-7.10.0.20150316/compiler/vectorise/Vectorise/Exp.hs 2015-03-17 11:46:41.829481669 +1100
+@@ -46,6 +46,8 @@
+ import Util
+ #if __GLASGOW_HASKELL__ < 709
+ import MonadUtils
++#else
++import Control.Applicative ((<$>))
+ #endif
+
+ import Control.Monad
diff --git a/dev-lang/ghc/files/ghc-7.10.3-hardfloat.patch b/dev-lang/ghc/files/ghc-7.10.3-hardfloat.patch
new file mode 100644
index 000000000000..106d07aa31c8
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.10.3-hardfloat.patch
@@ -0,0 +1,26 @@
+commit 5cc08ebf2f346992a0abd4440252165c90b5ec05
+Author: Sergei Trofimovich <siarheit@google.com>
+Date: Sat Jun 20 12:23:00 2015 +0100
+
+ Recognise 'hardhloat' as a valid vendor in a host tuple
+
+ Observed on a tuple armv7a-hardfloat-linux-gnueabi:
+ > Unknown vendor hardfloat
+
+ Reported-by: Sergey Alirzaev
+ Signed-off-by: Sergei Trofimovich <siarheit@google.com>
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 590edb0..958622c 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -1966,6 +1966,9 @@ AC_DEFUN([GHC_CONVERT_VENDOR],[
+ softfloat) # like armv5tel-softfloat-linux-gnueabi
+ $2="unknown"
+ ;;
++ hardfloat) # like armv7a-hardfloat-linux-gnueabi
++ $2="unknown"
++ ;;
+ *)
+ #pass thru by default
+ $2="$1"
diff --git a/dev-lang/ghc/files/ghc-7.10.3-relnotes.patch b/dev-lang/ghc/files/ghc-7.10.3-relnotes.patch
new file mode 100644
index 000000000000..675037946e75
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.10.3-relnotes.patch
@@ -0,0 +1,45 @@
+diff --git a/ANNOUNCE b/ANNOUNCE
+index 7812eba..0018b37 100644
+--- a/ANNOUNCE
++++ b/ANNOUNCE
+@@ -1,6 +1,6 @@
+
+ ==============================================================
+- The (Interactive) Glasgow Haskell Compiler -- version 7.10.2
++ The (Interactive) Glasgow Haskell Compiler -- version 7.10.3
+ ==============================================================
+
+ The GHC Team is pleased to announce a new minor release of GHC. This is a
+@@ -29,7 +29,7 @@ bug-fix release and contains a number of important fixes,
+ A more thorough list of the changes in the release can be found in the release
+ notes,
+
+- http://haskell.org/ghc/docs/7.10.2/html/users_guide/release-7-10-2.html
++ http://haskell.org/ghc/docs/7.10.3/html/users_guide/release-7-10-3.html
+
+
+ How to get it
+diff --git a/docs/users_guide/intro.xml b/docs/users_guide/intro.xml
+index 3292334..fb7116e 100644
+--- a/docs/users_guide/intro.xml
++++ b/docs/users_guide/intro.xml
+@@ -309,6 +309,7 @@
+
+ &relnotes1;
+ &relnotes2;
++&relnotes3;
+
+ </chapter>
+
+diff --git a/docs/users_guide/ug-ent.xml.in b/docs/users_guide/ug-ent.xml.in
+index b696aad..3629e93 100644
+--- a/docs/users_guide/ug-ent.xml.in
++++ b/docs/users_guide/ug-ent.xml.in
+@@ -5,6 +5,7 @@
+ <!ENTITY intro SYSTEM "intro.xml" >
+ <!ENTITY relnotes1 SYSTEM "7.10.1-notes.xml" >
+ <!ENTITY relnotes2 SYSTEM "7.10.2-notes.xml" >
++<!ENTITY relnotes3 SYSTEM "7.10.3-notes.xml" >
+ <!ENTITY using SYSTEM "using.xml" >
+ <!ENTITY code-gens SYSTEM "codegens.xml" >
+ <!ENTITY runtime SYSTEM "runtime_control.xml" >
diff --git a/dev-lang/ghc/files/ghc-7.6.3-preserve-inplace-xattr.patch b/dev-lang/ghc/files/ghc-7.6.3-preserve-inplace-xattr.patch
new file mode 100644
index 000000000000..08410fa0cd9b
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.6.3-preserve-inplace-xattr.patch
@@ -0,0 +1,14 @@
+On hardened 'cp' drops out XT-pax parking.
+perfinion suggested using 'install', where portage
+might have a chance to save our marking.
+
+Reported-by: Jay Yang
+Gentoo-bug: https://bugs.gentoo.org/518734
+diff --git a/rules/build-prog.mk b/rules/build-prog.mk
+index 399369e..2ee9cd5 100644
+--- a/rules/build-prog.mk
++++ b/rules/build-prog.mk
+@@ -288,3 +288,3 @@ endif
+ $$($1_$2_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG_INPLACE) | $$$$(dir $$$$@)/.
+- "$$(CP)" -p $$< $$@
++ $$(INSTALL) -m 755 $$< $$@
diff --git a/dev-lang/ghc/files/ghc-7.8.1_rc1-libbfd.patch b/dev-lang/ghc/files/ghc-7.8.1_rc1-libbfd.patch
new file mode 100644
index 000000000000..d01cb49affbd
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.8.1_rc1-libbfd.patch
@@ -0,0 +1,81 @@
+commit bb5953484579968c984d074ca1af5d21e1c9e7a0
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Mon Feb 10 12:45:58 2014 +0300
+
+ rts: unrust 'libbfd' debug symbols parser
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+diff --git a/configure.ac b/configure.ac
+index e7fbc7f..e47979c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -801,7 +801,8 @@ fi
+ dnl ** check whether this machine has BFD and libiberty installed (used for debugging)
+ dnl the order of these tests matters: bfd needs libiberty
+ AC_CHECK_LIB(iberty, xmalloc)
+-AC_CHECK_LIB(bfd, bfd_uncompress_section_contents)
++dnl 'bfd_init' is a rare non-macro in libbfd
++AC_CHECK_LIB(bfd, bfd_init)
+
+ dnl ################################################################
+ dnl Check for libraries
+diff --git a/rts/Printer.c b/rts/Printer.c
+index ca9ca49..ce02b02 100644
+--- a/rts/Printer.c
++++ b/rts/Printer.c
+@@ -48,6 +48,9 @@ void printPtr( StgPtr p )
+ raw = lookupGHCName(p);
+ if (raw != NULL) {
+ printZcoded(raw);
++ /* it can be just a C symbol, like 'stg_returnToStackTop' */
++ debugBelch("<%s>", raw);
++ debugBelch("[%p]", p);
+ } else {
+ debugBelch("%p", p);
+ }
+@@ -794,7 +797,7 @@ static void printZcoded( const char *raw )
+ disabling this for now.
+ */
+ #ifdef USING_LIBBFD
+-
++#include "../mk/config.h" /* silly BFD's requirement */
+ #include <bfd.h>
+
+ /* Fairly ad-hoc piece of code that seems to filter out a lot of
+@@ -863,7 +866,10 @@ extern void DEBUG_LoadSymbols( char *name )
+ for( i = 0; i != number_of_symbols; ++i ) {
+ symbol_info info;
+ bfd_get_symbol_info(abfd,symbol_table[i],&info);
+- /*debugBelch("\t%c\t0x%x \t%s\n",info.type,(nat)info.value,info.name); */
++ if (0)
++ {
++ debugBelch("\t%c\t0x%x \t%s\n",info.type,(nat)info.value,info.name);
++ }
+ if (isReal(info.type, info.name)) {
+ num_real_syms += 1;
+ }
+diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c
+index aa7306f..5bdef94 100644
+--- a/rts/RtsStartup.c
++++ b/rts/RtsStartup.c
+@@ -19,6 +19,7 @@
+ #include "RtsFlags.h"
+ #include "RtsUtils.h"
+ #include "Prelude.h"
++#include "Printer.h" /* DEBUG_LoadSymbols */
+ #include "Schedule.h" /* initScheduler */
+ #include "Stats.h" /* initStats */
+ #include "STM.h" /* initSTM */
+@@ -162,6 +163,11 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
+ rts_config.rts_opts_enabled, rts_config.rts_opts, rts_config.rts_hs_main);
+ }
+
++#ifdef DEBUG
++ /* load debugging symbols */
++ DEBUG_LoadSymbols((*argv)[0]);
++#endif /* DEBUG */
++
+ /* Initialise the stats department, phase 1 */
+ initStats1();
+
diff --git a/dev-lang/ghc/files/ghc-7.8.2-cgen-constify.patch b/dev-lang/ghc/files/ghc-7.8.2-cgen-constify.patch
new file mode 100644
index 000000000000..efdd54fbf3fb
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.8.2-cgen-constify.patch
@@ -0,0 +1,34 @@
+commit b0cf3ab7a69b878a4335d21a347b56e4b0ca0b7b
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Mon Apr 14 19:06:24 2014 +0300
+
+ compiler/cmm/PprC.hs: constify local string literals
+
+ Consider one-line module
+ module B (v) where v = "hello"
+ in -fvia-C mode it generates code like
+ static char gibberish_str[] = "hello";
+
+ It uselessly eats data section (precious resource on ia64!).
+ The patch switches genrator to emit:
+ static const char gibberish_str[] = "hello";
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
+index 2398981..fdb578d 100644
+--- a/compiler/cmm/PprC.hs
++++ b/compiler/cmm/PprC.hs
+@@ -112,6 +112,12 @@ pprTop (CmmProc infos clbl _ graph) =
+
+ -- We only handle (a) arrays of word-sized things and (b) strings.
+
++pprTop (CmmData ReadOnlyData (Statics lbl [CmmString str])) =
++ hcat [
++ pprLocalness lbl, ptext (sLit "const char "), ppr lbl,
++ ptext (sLit "[] = "), pprStringInCStyle str, semi
++ ]
++
+ pprTop (CmmData _section (Statics lbl [CmmString str])) =
+ hcat [
+ pprLocalness lbl, ptext (sLit "char "), ppr lbl,
diff --git a/dev-lang/ghc/files/ghc-7.8.3-linker-warn.patch b/dev-lang/ghc/files/ghc-7.8.3-linker-warn.patch
new file mode 100644
index 000000000000..c8570c06940b
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.8.3-linker-warn.patch
@@ -0,0 +1,35 @@
+commit 326046739801a380c5457ef4c87bce8fb95497ba
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sun Aug 10 22:12:28 2014 +0300
+
+ systools info: fix warning about C compiler (message said about linker)
+
+ Summary: Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+ Test Plan: build-tested
+
+ Reviewers: austin
+
+ Reviewed By: austin
+
+ Subscribers: phaskell, simonmar, relrod, ezyang, carter
+
+ Differential Revision: https://phabricator.haskell.org/D132
+
+diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs
+index 1c1c52c..72fa19b 100644
+--- a/compiler/main/SysTools.lhs
++++ b/compiler/main/SysTools.lhs
+@@ -809,10 +809,10 @@ getCompilerInfo' dflags = do
+ )
+ (\err -> do
+ debugTraceMsg dflags 2
+- (text "Error (figuring out compiler information):" <+>
++ (text "Error (figuring out C compiler information):" <+>
+ text (show err))
+ errorMsg dflags $ hang (text "Warning:") 9 $
+- text "Couldn't figure out linker information!" $$
++ text "Couldn't figure out C compiler information!" $$
+ text "Make sure you're using GNU gcc, or clang"
+ return UnknownCC)
+ return info
diff --git a/dev-lang/ghc/files/ghc-7.8.3-pic-sparc.patch b/dev-lang/ghc/files/ghc-7.8.3-pic-sparc.patch
new file mode 100644
index 000000000000..16a552fdd4be
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.8.3-pic-sparc.patch
@@ -0,0 +1,31 @@
+commit 78863edbb0751f5c9694ea10c6132a87cfd0ee10
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Wed Aug 27 22:20:33 2014 +0300
+
+ Revert "disable shared libs on sparc (linux/solaris) (fixes #8857)"
+
+ This reverts commit 623883f1ed0ee11cc925c4590fb09565403fd231.
+
+ The commit a93ab43ab5f40cadbedea2f6342b93c245e91434
+ driver: pass '-fPIC' option to assembler as well
+ fixes shared libraries on sparc at least on linux.
+
+ Properly fixes Issue #8857
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+diff --git a/mk/config.mk.in b/mk/config.mk.in
+index c210cd3..392237f 100644
+--- a/mk/config.mk.in
++++ b/mk/config.mk.in
+@@ -97,9 +97,7 @@ endif
+ # Some platforms don't support shared libraries
+ NoSharedLibsPlatformList = powerpc-unknown-linux \
+ x86_64-unknown-mingw32 \
+- i386-unknown-mingw32 \
+- sparc-sun-solaris2 \
+- sparc-unknown-linux
++ i386-unknown-mingw32
+
+ ifeq "$(SOLARIS_BROKEN_SHLD)" "YES"
+ NoSharedLibsPlatformList += i386-unknown-solaris2
diff --git a/dev-lang/ghc/files/ghc-7.8.3-ppc32-fPIC.patch b/dev-lang/ghc/files/ghc-7.8.3-ppc32-fPIC.patch
new file mode 100644
index 000000000000..434be8b1bdad
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.8.3-ppc32-fPIC.patch
@@ -0,0 +1,351 @@
+commit fa31e8f4a0f853848d96549a429083941877bf8d
+Author: Sergei Trofimovich <siarheit@google.com>
+Date: Sun Dec 14 14:30:12 2014 +0000
+
+ powerpc: fix and enable shared libraries by default on linux
+
+ Summary:
+ And fix things all the way down to it. Namely:
+ - remove 'r30' from free registers, it's an .LCTOC1 register
+ for gcc. generated .plt stubs expect it to be initialised.
+ - fix PicBase computation, which originally forgot to use 'tmp'
+ reg in 'initializePicBase_ppc.fetchPC'
+ - mark 'ForeighTarget's as implicitly using 'PicBase' register
+ (see comment for details)
+ - add 64-bit MO_Sub and test on alloclimit3/4 regtests
+ - fix dynamic label offsets to match with .LCTOC1 offset
+
+ Signed-off-by: Sergei Trofimovich <siarheit@google.com>
+
+ Test Plan: validate passes equal amount of vanilla/dyn tests
+
+ Reviewers: simonmar, erikd, austin
+
+ Reviewed By: erikd, austin
+
+ Subscribers: carter, thomie
+
+ Differential Revision: https://phabricator.haskell.org/D560
+
+ GHC Trac Issues: #8024, #9831
+
+diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
+index 0f2c0ae..37b8ada 100644
+--- a/compiler/cmm/CLabel.hs
++++ b/compiler/cmm/CLabel.hs
+@@ -1170,7 +1170,8 @@ pprDynamicLinkerAsmLabel platform dllInfo lbl
+ else if osElfTarget (platformOS platform)
+ then if platformArch platform == ArchPPC
+ then case dllInfo of
+- CodeStub -> ppr lbl <> text "@plt"
++ CodeStub -> -- See Note [.LCTOC1 in PPC PIC code]
++ ppr lbl <> text "+32768@plt"
+ SymbolPtr -> text ".LC_" <> ppr lbl
+ _ -> panic "pprDynamicLinkerAsmLabel"
+ else if platformArch platform == ArchX86_64
+diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs
+index 9b5c080..6326a8b 100644
+--- a/compiler/nativeGen/PIC.hs
++++ b/compiler/nativeGen/PIC.hs
+@@ -54,7 +54,6 @@ import qualified X86.Instr as X86
+
+ import Platform
+ import Instruction
+-import Size
+ import Reg
+ import NCGMonad
+
+@@ -468,11 +467,8 @@ pprGotDeclaration dflags ArchX86 OSDarwin
+ pprGotDeclaration _ _ OSDarwin
+ = empty
+
+--- pprGotDeclaration
++-- Emit GOT declaration
+ -- Output whatever needs to be output once per .s file.
+--- The .LCTOC1 label is defined to point 32768 bytes into the table,
+--- to make the most of the PPC's 16-bit displacements.
+--- Only needed for PIC.
+ pprGotDeclaration dflags arch os
+ | osElfTarget os
+ , arch /= ArchPPC_64
+@@ -482,6 +478,7 @@ pprGotDeclaration dflags arch os
+ | osElfTarget os
+ , arch /= ArchPPC_64
+ = vcat [
++ -- See Note [.LCTOC1 in PPC PIC code]
+ ptext (sLit ".section \".got2\",\"aw\""),
+ ptext (sLit ".LCTOC1 = .+32768") ]
+
+@@ -688,12 +685,7 @@ pprImportedSymbol _ _ _
+
+
+ -- Get a pointer to our own fake GOT, which is defined on a per-module basis.
+--- This is exactly how GCC does it, and it's quite horrible:
+--- We first fetch the address of a local label (mkPicBaseLabel).
+--- Then we add a 16-bit offset to that to get the address of a .long that we
+--- define in .text space right next to the proc. This .long literal contains
+--- the (32-bit) offset from our local label to our global offset table
+--- (.LCTOC1 aka gotOffLabel).
++-- This is exactly how GCC does it in linux.
+
+ initializePicBase_ppc
+ :: Arch -> OS -> Reg
+@@ -704,18 +696,9 @@ initializePicBase_ppc ArchPPC os picReg
+ (CmmProc info lab live (ListGraph blocks) : statics)
+ | osElfTarget os
+ = do
+- dflags <- getDynFlags
+- gotOffLabel <- getNewLabelNat
+- tmp <- getNewRegNat $ intSize (wordWidth dflags)
+ let
+- gotOffset = CmmData Text $ Statics gotOffLabel [
+- CmmStaticLit (CmmLabelDiffOff gotLabel
+- mkPicBaseLabel
+- 0)
+- ]
+- offsetToOffset
+- = PPC.ImmConstantDiff
+- (PPC.ImmCLbl gotOffLabel)
++ gotOffset = PPC.ImmConstantDiff
++ (PPC.ImmCLbl gotLabel)
+ (PPC.ImmCLbl mkPicBaseLabel)
+
+ blocks' = case blocks of
+@@ -726,15 +709,23 @@ initializePicBase_ppc ArchPPC os picReg
+ | bID `mapMember` info = fetchPC b
+ | otherwise = b
+
++ -- GCC does PIC prologs thusly:
++ -- bcl 20,31,.L1
++ -- .L1:
++ -- mflr 30
++ -- addis 30,30,.LCTOC1-.L1@ha
++ -- addi 30,30,.LCTOC1-.L1@l
++ -- TODO: below we use it over temporary register,
++ -- it can and should be optimised by picking
++ -- correct PIC reg.
+ fetchPC (BasicBlock bID insns) =
+ BasicBlock bID (PPC.FETCHPC picReg
+- : PPC.ADDIS tmp picReg (PPC.HI offsetToOffset)
+- : PPC.LD PPC.archWordSize tmp
+- (PPC.AddrRegImm tmp (PPC.LO offsetToOffset))
+- : PPC.ADD picReg picReg (PPC.RIReg picReg)
++ : PPC.ADDIS picReg picReg (PPC.HA gotOffset)
++ : PPC.ADDI picReg picReg (PPC.LO gotOffset)
++ : PPC.MR PPC.r30 picReg
+ : insns)
+
+- return (CmmProc info lab live (ListGraph blocks') : gotOffset : statics)
++ return (CmmProc info lab live (ListGraph blocks') : statics)
+
+
+ initializePicBase_ppc ArchPPC OSDarwin picReg
+diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs
+index ddf483a..c1c4a74 100644
+--- a/compiler/nativeGen/PPC/CodeGen.hs
++++ b/compiler/nativeGen/PPC/CodeGen.hs
+@@ -54,7 +54,7 @@ import Outputable
+ import Unique
+ import DynFlags
+
+-import Control.Monad ( mapAndUnzipM )
++import Control.Monad ( mapAndUnzipM, when )
+ import Data.Bits
+ import Data.Word
+
+@@ -355,6 +355,19 @@ iselExpr64 (CmmMachOp (MO_Add _) [e1,e2]) = do
+ ADDE rhi r1hi r2hi ]
+ return (ChildCode64 code rlo)
+
++iselExpr64 (CmmMachOp (MO_Sub _) [e1,e2]) = do
++ ChildCode64 code1 r1lo <- iselExpr64 e1
++ ChildCode64 code2 r2lo <- iselExpr64 e2
++ (rlo,rhi) <- getNewRegPairNat II32
++ let
++ r1hi = getHiVRegFromLo r1lo
++ r2hi = getHiVRegFromLo r2lo
++ code = code1 `appOL`
++ code2 `appOL`
++ toOL [ SUBFC rlo r2lo r1lo,
++ SUBFE rhi r2hi r1hi ]
++ return (ChildCode64 code rlo)
++
+ iselExpr64 (CmmMachOp (MO_UU_Conv W32 W64) [expr]) = do
+ (expr_reg,expr_code) <- getSomeReg expr
+ (rlo, rhi) <- getNewRegPairNat II32
+@@ -918,8 +931,12 @@ genCCall' dflags gcp target dest_regs args0
+ (toOL []) []
+
+ (labelOrExpr, reduceToFF32) <- case target of
+- ForeignTarget (CmmLit (CmmLabel lbl)) _ -> return (Left lbl, False)
+- ForeignTarget expr _ -> return (Right expr, False)
++ ForeignTarget (CmmLit (CmmLabel lbl)) _ -> do
++ uses_pic_base_implicitly
++ return (Left lbl, False)
++ ForeignTarget expr _ -> do
++ uses_pic_base_implicitly
++ return (Right expr, False)
+ PrimTarget mop -> outOfLineMachOp mop
+
+ let codeBefore = move_sp_down finalStack `appOL` passArgumentsCode
+@@ -940,6 +957,13 @@ genCCall' dflags gcp target dest_regs args0
+ where
+ platform = targetPlatform dflags
+
++ uses_pic_base_implicitly = do
++ -- See Note [implicit register in PPC PIC code]
++ -- on why we claim to use PIC register here
++ when (gopt Opt_PIC dflags) $ do
++ _ <- getPicBaseNat archWordSize
++ return ()
++
+ initialStackOffset = case gcp of
+ GCPDarwin -> 24
+ GCPLinux -> 8
+@@ -1431,3 +1455,21 @@ coerceFP2Int _ toRep x = do
+ -- read low word of value (high word is undefined)
+ LD II32 dst (spRel dflags 3)]
+ return (Any (intSize toRep) code')
++
++-- Note [.LCTOC1 in PPC PIC code]
++-- The .LCTOC1 label is defined to point 32768 bytes into the GOT table
++-- to make the most of the PPC's 16-bit displacements.
++-- As 16-bit signed offset is used (usually via addi/lwz instructions)
++-- first element will have '-32768' offset against .LCTOC1.
++
++-- Note [implicit register in PPC PIC code]
++-- PPC generates calls by labels in assembly
++-- in form of:
++-- bl puts+32768@plt
++-- in this form it's not seen directly (by GHC NCG)
++-- that r30 (PicBaseReg) is used,
++-- but r30 is a required part of PLT code setup:
++-- puts+32768@plt:
++-- lwz r11,-30484(r30) ; offset in .LCTOC1
++-- mtctr r11
++-- bctr
+diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs
+index f5b9506..b7081f9 100644
+--- a/compiler/nativeGen/PPC/Instr.hs
++++ b/compiler/nativeGen/PPC/Instr.hs
+@@ -205,8 +205,11 @@ data Instr
+ | ADD Reg Reg RI -- dst, src1, src2
+ | ADDC Reg Reg Reg -- (carrying) dst, src1, src2
+ | ADDE Reg Reg Reg -- (extend) dst, src1, src2
++ | ADDI Reg Reg Imm -- Add Immediate dst, src1, src2
+ | ADDIS Reg Reg Imm -- Add Immediate Shifted dst, src1, src2
+ | SUBF Reg Reg Reg -- dst, src1, src2 ; dst = src2 - src1
++ | SUBFC Reg Reg Reg -- (carrying) dst, src1, src2 ; dst = src2 - src1
++ | SUBFE Reg Reg Reg -- (extend) dst, src1, src2 ; dst = src2 - src1
+ | MULLW Reg Reg RI
+ | DIVW Reg Reg Reg
+ | DIVWU Reg Reg Reg
+@@ -284,8 +287,11 @@ ppc_regUsageOfInstr platform instr
+ ADD reg1 reg2 ri -> usage (reg2 : regRI ri, [reg1])
+ ADDC reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
+ ADDE reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
++ ADDI reg1 reg2 _ -> usage ([reg2], [reg1])
+ ADDIS reg1 reg2 _ -> usage ([reg2], [reg1])
+ SUBF reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
++ SUBFC reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
++ SUBFE reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
+ MULLW reg1 reg2 ri -> usage (reg2 : regRI ri, [reg1])
+ DIVW reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
+ DIVWU reg1 reg2 reg3 -> usage ([reg2,reg3], [reg1])
+@@ -358,8 +364,11 @@ ppc_patchRegsOfInstr instr env
+ ADD reg1 reg2 ri -> ADD (env reg1) (env reg2) (fixRI ri)
+ ADDC reg1 reg2 reg3 -> ADDC (env reg1) (env reg2) (env reg3)
+ ADDE reg1 reg2 reg3 -> ADDE (env reg1) (env reg2) (env reg3)
++ ADDI reg1 reg2 imm -> ADDI (env reg1) (env reg2) imm
+ ADDIS reg1 reg2 imm -> ADDIS (env reg1) (env reg2) imm
+ SUBF reg1 reg2 reg3 -> SUBF (env reg1) (env reg2) (env reg3)
++ SUBFC reg1 reg2 reg3 -> SUBFC (env reg1) (env reg2) (env reg3)
++ SUBFE reg1 reg2 reg3 -> SUBFE (env reg1) (env reg2) (env reg3)
+ MULLW reg1 reg2 ri -> MULLW (env reg1) (env reg2) (fixRI ri)
+ DIVW reg1 reg2 reg3 -> DIVW (env reg1) (env reg2) (env reg3)
+ DIVWU reg1 reg2 reg3 -> DIVWU (env reg1) (env reg2) (env reg3)
+diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
+index 6851769..f59d51f 100644
+--- a/compiler/nativeGen/PPC/Ppr.hs
++++ b/compiler/nativeGen/PPC/Ppr.hs
+@@ -525,6 +525,16 @@ pprInstr (BCTRL _) = hcat [
+ ptext (sLit "bctrl")
+ ]
+ pprInstr (ADD reg1 reg2 ri) = pprLogic (sLit "add") reg1 reg2 ri
++pprInstr (ADDI reg1 reg2 imm) = hcat [
++ char '\t',
++ ptext (sLit "addi"),
++ char '\t',
++ pprReg reg1,
++ ptext (sLit ", "),
++ pprReg reg2,
++ ptext (sLit ", "),
++ pprImm imm
++ ]
+ pprInstr (ADDIS reg1 reg2 imm) = hcat [
+ char '\t',
+ ptext (sLit "addis"),
+@@ -539,6 +549,8 @@ pprInstr (ADDIS reg1 reg2 imm) = hcat [
+ pprInstr (ADDC reg1 reg2 reg3) = pprLogic (sLit "addc") reg1 reg2 (RIReg reg3)
+ pprInstr (ADDE reg1 reg2 reg3) = pprLogic (sLit "adde") reg1 reg2 (RIReg reg3)
+ pprInstr (SUBF reg1 reg2 reg3) = pprLogic (sLit "subf") reg1 reg2 (RIReg reg3)
++pprInstr (SUBFC reg1 reg2 reg3) = pprLogic (sLit "subfc") reg1 reg2 (RIReg reg3)
++pprInstr (SUBFE reg1 reg2 reg3) = pprLogic (sLit "subfe") reg1 reg2 (RIReg reg3)
+ pprInstr (MULLW reg1 reg2 ri@(RIReg _)) = pprLogic (sLit "mullw") reg1 reg2 ri
+ pprInstr (MULLW reg1 reg2 ri@(RIImm _)) = pprLogic (sLit "mull") reg1 reg2 ri
+ pprInstr (DIVW reg1 reg2 reg3) = pprLogic (sLit "divw") reg1 reg2 (RIReg reg3)
+diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs
+index 0f636bf..69e69c0 100644
+--- a/compiler/nativeGen/PPC/Regs.hs
++++ b/compiler/nativeGen/PPC/Regs.hs
+@@ -37,7 +37,8 @@ module PPC.Regs (
+ fits16Bits,
+ makeImmediate,
+ fReg,
+- sp, r3, r4, r27, r28, f1, f20, f21,
++ sp, r3, r4, r27, r28, r30,
++ f1, f20, f21,
+
+ allocatableRegs
+
+@@ -295,12 +296,13 @@ point registers.
+ fReg :: Int -> RegNo
+ fReg x = (32 + x)
+
+-sp, r3, r4, r27, r28, f1, f20, f21 :: Reg
++sp, r3, r4, r27, r28, r30, f1, f20, f21 :: Reg
+ sp = regSingle 1
+ r3 = regSingle 3
+ r4 = regSingle 4
+ r27 = regSingle 27
+ r28 = regSingle 28
++r30 = regSingle 30
+ f1 = regSingle $ fReg 1
+ f20 = regSingle $ fReg 20
+ f21 = regSingle $ fReg 21
+diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs
+index 9916e0e..1d46a01 100644
+--- a/includes/CodeGen.Platform.hs
++++ b/includes/CodeGen.Platform.hs
+@@ -881,6 +881,8 @@ freeReg 1 = fastBool False -- The Stack Pointer
+ # if !MACHREGS_darwin
+ -- most non-darwin powerpc OSes use r2 as a TOC pointer or something like that
+ freeReg 2 = fastBool False
++-- at least linux in -fPIC relies on r30 in PLT stubs
++freeReg 30 = fastBool False
+ # endif
+ # ifdef REG_Base
+ freeReg REG_Base = fastBool False
+diff --git a/mk/config.mk.in b/mk/config.mk.in
+index 0f5820f..8f134bc 100644
+--- a/mk/config.mk.in
++++ b/mk/config.mk.in
+@@ -95,7 +95,7 @@ TargetElf = YES
+ endif
+
+ # Some platforms don't support shared libraries
+-NoSharedLibsPlatformList = powerpc-unknown-linux \
++NoSharedLibsPlatformList = \
+ x86_64-unknown-mingw32 \
+ i386-unknown-mingw32
+
diff --git a/dev-lang/ghc/files/ghc-7.8.3-prim-lm.patch b/dev-lang/ghc/files/ghc-7.8.3-prim-lm.patch
new file mode 100644
index 000000000000..3ef2313fcec1
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.8.3-prim-lm.patch
@@ -0,0 +1,12 @@
+Fix underlinking on ghc-prim.
+Fixes ghc-stage2 crahs on hardened toolchain.
+Reported-by: aranea
+diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal
+index ffb32af..0431380 100644
+--- a/libraries/ghc-prim/ghc-prim.cabal
++++ b/libraries/ghc-prim/ghc-prim.cabal
+@@ -68,0 +68,4 @@ Library
++
++ -- ghc 'sin' (and other) primops generate 'libm' calls,
++ -- but ghc itself does not add '-lm'
++ extra-libraries: m
diff --git a/dev-lang/ghc/files/ghc-7.8.4-gold.patch b/dev-lang/ghc/files/ghc-7.8.4-gold.patch
new file mode 100644
index 000000000000..a8e9b1e6c857
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.8.4-gold.patch
@@ -0,0 +1,27 @@
+Gentoo-bug: https://bugs.gentoo.org/536426
+Reported-by: Eric Siegel
+commit 021b7978d14799bae779907faf7490cfd21b3f46
+Author: Austin Seipp <austin@well-typed.com>
+Date: Sun Jul 20 10:13:15 2014 -0500
+
+ driver: use absolute paths in ld scripts (#7452)
+
+ Patch contributed by slowmo.
+
+ Signed-off-by: Austin Seipp <austin@well-typed.com>
+
+diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
+index 11427e2..49126fe 100644
+--- a/compiler/main/DriverPipeline.hs
++++ b/compiler/main/DriverPipeline.hs
+@@ -2166,7 +2166,9 @@ joinObjectFiles dflags o_files output_fn = do
+ if ldIsGnuLd
+ then do
+ script <- newTempName dflags "ldscript"
+- writeFile script $ "INPUT(" ++ unwords o_files ++ ")"
++ cwd <- getCurrentDirectory
++ let o_files_abs = map (cwd </>) o_files
++ writeFile script $ "INPUT(" ++ unwords o_files_abs ++ ")"
+ ld_r [SysTools.FileOption "" script] ccInfo
+ else if sLdSupportsFilelist mySettings
+ then do
diff --git a/dev-lang/ghc/files/ghc-7.8.4-ia64-CLOSUREs.patch b/dev-lang/ghc/files/ghc-7.8.4-ia64-CLOSUREs.patch
new file mode 100644
index 000000000000..9d50792bcf45
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-7.8.4-ia64-CLOSUREs.patch
@@ -0,0 +1,66 @@
+From b677ba51cf8131a6f6ddcdfee8dd2a8c4c2b4ac7 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <siarheit@google.com>
+Date: Sat, 17 Jan 2015 14:27:13 +0000
+Subject: [PATCH 1/3] CMM: add a mechanism to import C data labels
+
+Fixes threaded runtime on ia64.
+sm_mutex there was not referenced correctly.
+
+Signed-off-by: Sergei Trofimovich <siarheit@google.com>
+---
+ compiler/cmm/CmmParse.y | 4 ++++
+ rts/Exception.cmm | 2 +-
+ rts/PrimOps.cmm | 6 +++---
+ 3 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/compiler/cmm/CmmParse.y.source b/compiler/cmm/CmmParse.y.source
+index 6b51e51..fd9489b 100644
+--- a/compiler/cmm/CmmParse.y.source
++++ b/compiler/cmm/CmmParse.y.source
+@@ -575,6 +575,10 @@ importName
+ : NAME
+ { ($1, mkForeignLabel $1 Nothing ForeignLabelInExternalPackage IsFunction) }
+
++ -- as previous 'NAME', but 'IsData'
++ | 'CLOSURE' NAME
++ { ($2, mkForeignLabel $2 Nothing ForeignLabelInExternalPackage IsData) }
++
+ -- A label imported with an explicit packageId.
+ | STRING NAME
+ { ($2, mkCmmCodeLabel (fsToPackageKey (mkFastString $1)) $2) }
+diff --git a/rts/Exception.cmm b/rts/Exception.cmm
+index 5007ef3..8d19c14 100644
+--- a/rts/Exception.cmm
++++ b/rts/Exception.cmm
+@@ -13,7 +13,7 @@
+ #include "Cmm.h"
+ #include "RaiseAsync.h"
+
+-import ghczmprim_GHCziTypes_True_closure;
++import CLOSURE ghczmprim_GHCziTypes_True_closure;
+
+ /* -----------------------------------------------------------------------------
+ Exception Primitives
+diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
+index 3e8612c..2e6ca46 100644
+--- a/rts/PrimOps.cmm
++++ b/rts/PrimOps.cmm
+@@ -28,12 +28,12 @@
+ import pthread_mutex_lock;
+ import pthread_mutex_unlock;
+ #endif
+-import base_ControlziExceptionziBase_nestedAtomically_closure;
++import CLOSURE base_ControlziExceptionziBase_nestedAtomically_closure;
+ import EnterCriticalSection;
+ import LeaveCriticalSection;
+-import ghczmprim_GHCziTypes_False_closure;
++import CLOSURE ghczmprim_GHCziTypes_False_closure;
+ #if defined(USE_MINIINTERPRETER) || !defined(mingw32_HOST_OS)
+-import sm_mutex;
++import CLOSURE sm_mutex;
+ #endif
+
+ /*-----------------------------------------------------------------------------
+--
+2.2.1
+
diff --git a/dev-lang/ghc/files/ghc-8.0.1-limit-jN.patch b/dev-lang/ghc/files/ghc-8.0.1-limit-jN.patch
new file mode 100644
index 000000000000..dc5410da3020
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.0.1-limit-jN.patch
@@ -0,0 +1,50 @@
+commit 501e05bb1b8974fc8b6c9eee86c87c367e87a211
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Tue Aug 30 12:10:47 2016 +0100
+
+ GhcMake: limit Capability count to CPU count in parallel mode
+
+ In Trac #9221 one of problems using high --jobs=<N>
+ is amount of mutator (or GC) threads we crate.
+
+ We use userspace spinning-and-yielding (see ACQUIRE_SPIN_LOCK)
+ to acess work stealing queues. In case of
+ N-worker-threads > N-CPUs fraction of time when
+ thread holding spin lock gets descheduled by kernel
+ increases. That causes other threads to waste CPU time
+ before giving up CPU.
+
+ Signed-off-by: Sergei Trofimovich <siarheit@google.com>
+
+ Test Plan:
+ ghc --make -j8 and -j80 have comparable sys time
+ on a 8-core system.
+
+ Reviewers: austin, gintas, bgamari, simonmar
+
+ Reviewed By: bgamari, simonmar
+
+ Subscribers: thomie
+
+ Differential Revision: https://phabricator.haskell.org/D2482
+
+ GHC Trac Issues: #9221
+
+diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
+index 9dc43cd..905df63 100644
+--- a/compiler/main/GhcMake.hs
++++ b/compiler/main/GhcMake.hs
+@@ -761,7 +761,12 @@ parUpsweep n_jobs old_hpt stable_mods cleanup sccs = do
+
+ let updNumCapabilities = liftIO $ do
+ n_capabilities <- getNumCapabilities
+- unless (n_capabilities /= 1) $ setNumCapabilities n_jobs
++ n_cpus <- getNumProcessors
++ -- Setting number of capabilities more than
++ -- CPU count usually leads to high userspace
++ -- lock contention. Trac #9221
++ let n_caps = min n_jobs n_cpus
++ unless (n_capabilities /= 1) $ setNumCapabilities n_caps
+ return n_capabilities
+ -- Reset the number of capabilities once the upsweep ends.
+ let resetNumCapabilities orig_n = liftIO $ setNumCapabilities orig_n
diff --git a/dev-lang/ghc/files/ghc-8.0.1-par-g0-on-A32.patch b/dev-lang/ghc/files/ghc-8.0.1-par-g0-on-A32.patch
new file mode 100644
index 000000000000..b46e57301782
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.0.1-par-g0-on-A32.patch
@@ -0,0 +1,65 @@
+commit bdfc5375f219d6def81effda4e57cb56d01fc917
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Tue Aug 30 12:10:54 2016 +0100
+
+ rts: enable parallel GC scan of large (32M+) allocation area
+
+ Parallel GC does not scan large allocation area (-A)
+ effectively as it does not do work stealing from nursery
+ by default.
+
+ That leads to large imbalance when only one of threads
+ overflows allocation area: most of GC threads finish
+ quickly (as there is not much to collect) and sit idle
+ waiting while single GC thread finishes scan of single
+ allocation area for that thread.
+
+ The patch enables work stealing for (equivalent of -qb0)
+ allocation area of -A32M or higher.
+
+ Tested on a highlighting-kate package from Trac #9221
+
+ On 8-core machine the difference is around 5% faster
+ of wall-clock time. On 24-core VM the speedup is 20%.
+
+ Signed-off-by: Sergei Trofimovich <siarheit@google.com>
+
+ Test Plan: measured wall time and GC parallelism on highlighting-kate build
+
+ Reviewers: austin, bgamari, erikd, simonmar
+
+ Reviewed By: bgamari, simonmar
+
+ Subscribers: thomie
+
+ Differential Revision: https://phabricator.haskell.org/D2483
+
+ GHC Trac Issues: #9221
+
+diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
+index fda33f0..7a719b9 100644
+--- a/rts/RtsFlags.c
++++ b/rts/RtsFlags.c
+@@ -237,1 +237,1 @@ void initRtsFlagsDefaults(void)
+- RtsFlags.ParFlags.parGcLoadBalancingGen = 1;
++ RtsFlags.ParFlags.parGcLoadBalancingGen = ~0u; /* auto, based on -A */
+@@ -1398,2 +1390,19 @@ static void normaliseRtsOpts (void)
+ }
+
++#ifdef THREADED_RTS
++ if (RtsFlags.ParFlags.parGcLoadBalancingGen == ~0u) {
++ StgWord alloc_area_bytes
++ = RtsFlags.GcFlags.minAllocAreaSize * BLOCK_SIZE;
++
++ // If allocation area is larger that CPU cache
++ // we can finish scanning quicker doing work-stealing
++ // scan. Trac #9221
++ // 32M looks big enough not to fit into L2 cache
++ // of popular modern CPUs.
++ if (alloc_area_bytes >= 32 * 1024 * 1024) {
++ RtsFlags.ParFlags.parGcLoadBalancingGen = 0;
++ } else {
++ RtsFlags.ParFlags.parGcLoadBalancingGen = 1;
++ }
++ }
++#endif
diff --git a/dev-lang/ghc/files/ghc-8.0.1-ww-args-limit.patch b/dev-lang/ghc/files/ghc-8.0.1-ww-args-limit.patch
new file mode 100644
index 000000000000..4752f4482678
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.0.1-ww-args-limit.patch
@@ -0,0 +1,127 @@
+commit 5efbf0d243984444cf352ad6f0d147e226c64498
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu Sep 1 17:34:58 2016 +0100
+
+ restore -fmax-worker-args handling (Trac #11565)
+
+ maxWorkerArgs handling was accidentally lost 3 years ago
+ in a major update of demand analysis
+ commit 0831a12ea2fc73c33652eeec1adc79fa19700578
+
+ Old regression is noticeable as:
+ - code bloat (requires stack reshuffling)
+ - compilation slowdown (more code to optimise/generate)
+ - and increased heap usage (DynFlags unboxing/reboxing?)
+
+ On a simple compile benchmark this change causes heap
+ allocation drop from 70G don to 67G (ghc perf build).
+
+ Signed-off-by: Sergei Trofimovich <siarheit@google.com>
+
+ Reviewers: simonpj, ezyang, goldfire, austin, bgamari
+
+ Reviewed By: simonpj, ezyang
+
+ Subscribers: thomie
+
+ Differential Revision: https://phabricator.haskell.org/D2503
+
+ GHC Trac Issues: #11565
+
+diff --git a/compiler/specialise/SpecConstr.hs b/compiler/specialise/SpecConstr.hs
+index 10d5614..7166f57 100644
+--- a/compiler/specialise/SpecConstr.hs
++++ b/compiler/specialise/SpecConstr.hs
+@@ -29,7 +29,7 @@ import CoreFVs ( exprsFreeVarsList )
+ import CoreMonad
+ import Literal ( litIsLifted )
+ import HscTypes ( ModGuts(..) )
+-import WwLib ( mkWorkerArgs )
++import WwLib ( isWorkerSmallEnough, mkWorkerArgs )
+ import DataCon
+ import Coercion hiding( substCo )
+ import Rules
+@@ -1533,10 +1533,14 @@ specialise env bind_calls (RI { ri_fn = fn, ri_lam_bndrs = arg_bndrs
+
+ | Just all_calls <- lookupVarEnv bind_calls fn
+ = -- pprTrace "specialise entry {" (ppr fn <+> ppr (length all_calls)) $
+- do { (boring_call, pats) <- callsToPats env specs arg_occs all_calls
+-
++ do { (boring_call, all_pats) <- callsToPats env specs arg_occs all_calls
+ -- Bale out if too many specialisations
+- ; let n_pats = length pats
++ ; let pats = filter (is_small_enough . fst) all_pats
++ is_small_enough vars = isWorkerSmallEnough (sc_dflags env) vars
++ -- We are about to construct w/w pair in 'spec_one'.
++ -- Omit specialisation leading to high arity workers.
++ -- See Note [Limit w/w arity]
++ n_pats = length pats
+ spec_count' = n_pats + spec_count
+ ; case sc_count env of
+ Just max | not (sc_force env) && spec_count' > max
+diff --git a/compiler/stranal/WwLib.hs b/compiler/stranal/WwLib.hs
+index 09bc204..d9460d9 100644
+--- a/compiler/stranal/WwLib.hs
++++ b/compiler/stranal/WwLib.hs
+@@ -8,6 +8,7 @@
+
+ module WwLib ( mkWwBodies, mkWWstr, mkWorkerArgs
+ , deepSplitProductType_maybe, findTypeShape
++ , isWorkerSmallEnough
+ ) where
+
+ #include "HsVersions.h"
+@@ -144,7 +145,8 @@ mkWwBodies dflags fam_envs fun_ty demands res_info one_shots
+ wrapper_body = wrap_fn_args . wrap_fn_cpr . wrap_fn_str . applyToVars work_call_args . Var
+ worker_body = mkLams work_lam_args. work_fn_str . work_fn_cpr . work_fn_args
+
+- ; if useful1 && not (only_one_void_argument) || useful2
++ ; if isWorkerSmallEnough dflags work_args
++ && (useful1 && not only_one_void_argument || useful2)
+ then return (Just (worker_args_dmds, wrapper_body, worker_body))
+ else return Nothing
+ }
+@@ -165,6 +167,12 @@ mkWwBodies dflags fam_envs fun_ty demands res_info one_shots
+ | otherwise
+ = False
+
++-- See Note [Limit w/w arity]
++isWorkerSmallEnough :: DynFlags -> [Var] -> Bool
++isWorkerSmallEnough dflags vars = count isId vars <= maxWorkerArgs dflags
++ -- We count only Free variables (isId) to skip Type, Kind
++ -- variables which have no runtime representation.
++
+ {-
+ Note [Always do CPR w/w]
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+@@ -178,6 +186,30 @@ a disaster, because then the enclosing function might say it has the CPR
+ property, but now doesn't and there a cascade of disaster. A good example
+ is Trac #5920.
+
++Note [Limit w/w arity]
++~~~~~~~~~~~~~~~~~~~~~~~~
++Guard against high worker arity as it generates a lot of stack traffic.
++A simplified example is Trac #11565#comment:6
++
++Current strategy is very simple: don't perform w/w transformation at all
++if the result produces a wrapper with arity higher than -fmax-worker-args=.
++
++It is a bit all or nothing, consider
++
++ f (x,y) (a,b,c,d,e ... , z) = rhs
++
++Currently we will remove all w/w ness entirely. But actually we could
++w/w on the (x,y) pair... it's the huge product that is the problem.
++
++Could we instead refrain from w/w on an arg-by-arg basis? Yes, that'd
++solve f. But we can get a lot of args from deeply-nested products:
++
++ g (a, (b, (c, (d, ...)))) = rhs
++
++This is harder to spot on an arg-by-arg basis. Previously mkWwStr was
++given some "fuel" saying how many arguments it could add; when we ran
++out of fuel it would stop w/wing.
++Still not very clever because it had a left-right bias.
+
+ ************************************************************************
+ * *
diff --git a/dev-lang/ghc/files/ghc-8.0.1_rc1-cgen-constify.patch b/dev-lang/ghc/files/ghc-8.0.1_rc1-cgen-constify.patch
new file mode 100644
index 000000000000..877a5827e4ea
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.0.1_rc1-cgen-constify.patch
@@ -0,0 +1,34 @@
+commit b0cf3ab7a69b878a4335d21a347b56e4b0ca0b7b
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Mon Apr 14 19:06:24 2014 +0300
+
+ compiler/cmm/PprC.hs: constify local string literals
+
+ Consider one-line module
+ module B (v) where v = "hello"
+ in -fvia-C mode it generates code like
+ static char gibberish_str[] = "hello";
+
+ It uselessly eats data section (precious resource on ia64!).
+ The patch switches genrator to emit:
+ static const char gibberish_str[] = "hello";
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
+index 2398981..fdb578d 100644
+--- a/compiler/cmm/PprC.hs
++++ b/compiler/cmm/PprC.hs
+@@ -112,6 +112,12 @@ pprTop (CmmProc infos clbl _ graph) =
+
+ -- We only handle (a) arrays of word-sized things and (b) strings.
+
++pprTop (CmmData (Section ReadOnlyData _) (Statics lbl [CmmString str])) =
++ hcat [
++ pprLocalness lbl, ptext (sLit "const char "), ppr lbl,
++ ptext (sLit "[] = "), pprStringInCStyle str, semi
++ ]
++
+ pprTop (CmmData _section (Statics lbl [CmmString str])) =
+ hcat [
+ pprLocalness lbl, ptext (sLit "char "), ppr lbl,
diff --git a/dev-lang/ghc/files/ghc-8.0.2-O2-unreg.patch b/dev-lang/ghc/files/ghc-8.0.2-O2-unreg.patch
new file mode 100644
index 000000000000..b64d65b80a05
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.0.2-O2-unreg.patch
@@ -0,0 +1,35 @@
+ghc -O2 generates too large C files for unregisterised compiler.
+On ia64 it causes DynFlags to compile for 60 minutes (then assembler
+crashes).
+
+To decrease C code inflation we don't use -O2 in UNREG mode.
+diff --git a/mk/config.mk.in b/mk/config.mk.in
+index bfaaa66..d8f93b3 100644
+--- a/mk/config.mk.in
++++ b/mk/config.mk.in
+@@ -72,11 +72,2 @@ GhcStage3HcOpts=-O2
+
+-# Disable -O2 optimization. Otherwise amount of generated C code
+-# makes things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.lhs')
+-# and sometimes not compile at all (powerpc64 overflows something
+-# on 'compiler/hsSyn/HsExpr.lhs').
+-ifeq "$(GhcUnregisterised)" "YES"
+-GhcStage1HcOpts=
+-GhcStage2HcOpts=
+-GhcStage3HcOpts=
+-endif
+
+@@ -894 +885,13 @@ CURSES_INCLUDE_DIRS = @CURSES_INCLUDE_DIRS@
+ CURSES_LIB_DIRS = @CURSES_LIB_DIRS@
++
++# Disable -O2 optimization. Otherwise amount of generated C code
++# makes things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.lhs')
++# and sometimes not compile at all (powerpc64 overflows something
++# on 'compiler/hsSyn/HsExpr.lhs').
++ifeq "$(GhcUnregisterised)" "YES"
++GhcStage1HcOpts=
++GhcStage2HcOpts=
++GhcStage3HcOpts=
++
++GhcLibHcOpts=
++endif
diff --git a/dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch b/dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch
new file mode 100644
index 000000000000..166f7fe42991
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.0.2-libffi-alpha.patch
@@ -0,0 +1,57 @@
+commit 2c220c4b053c8efb2098ee20910084a42a0b2dcd
+Author: Sergei Trofimovich <siarheit@google.com>
+Date: Sun Jan 29 11:59:36 2017 +0000
+
+ libffi: fix build COMPLEX build failure on alpha
+
+ libtool: compile: alpha-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude \
+ -I../src -I. -I../include -Iinclude -I../src -Wall -w -mieee -D_REENTRANT -fno-stack-protector \
+ -w -MT src/alpha/osf.lo -MMD -MP -MF src/alpha/.deps/osf.Tpo \
+ -c ../src/alpha/osf.S -fPIC -DPIC -o src/alpha/.libs/osf.o
+
+ ../src/alpha/osf.S:298:2: error: #error "osf.S out of sync with ffi.h"
+ #error "osf.S out of sync with ffi.h"
+ ^
+
+ Signed-off-by: Sergei Trofimovich <siarheit@google.com>
+
+diff --git a/libffi/ghc.mk b/libffi/ghc.mk
+index 7c5bc9e1b3..4297ed449e 100644
+--- a/libffi/ghc.mk
++++ b/libffi/ghc.mk
+@@ -63,6 +63,9 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP)
+ # will use cygwin symbolic links which cannot be read by mingw gcc.
+ chmod +x libffi/ln
+
++ # fix libffi build failure on alpha
++ ( cd libffi/build && "$(PATCH_CMD)" -p0 < ../libffi.3.2.1-complex_alpha.diff; )
++
+ # We need to use -MMD rather than -MD, as otherwise we get paths
+ # like c:/... in the dependency files on Windows, and the extra
+ # colons break make
+diff --git a/libffi/libffi.3.2.1-complex_alpha.diff b/libffi/libffi.3.2.1-complex_alpha.diff
+new file mode 100644
+index 0000000000..0d6e0bc290
+--- /dev/null
++++ b/libffi/libffi.3.2.1-complex_alpha.diff
+@@ -0,0 +1,20 @@
++--- src/alpha/osf.S.orig 2015-01-16 10:46:15.000000000 +0100
+++++ src/alpha/osf.S 2015-01-16 10:46:24.000000000 +0100
++@@ -279,6 +279,7 @@
++ .gprel32 $load_64 # FFI_TYPE_SINT64
++ .gprel32 $load_none # FFI_TYPE_STRUCT
++ .gprel32 $load_64 # FFI_TYPE_POINTER
+++ .gprel32 $load_none # FFI_TYPE_COMPLEX
++
++ /* Assert that the table above is in sync with ffi.h. */
++
++@@ -294,7 +295,8 @@
++ || FFI_TYPE_SINT64 != 12 \
++ || FFI_TYPE_STRUCT != 13 \
++ || FFI_TYPE_POINTER != 14 \
++- || FFI_TYPE_LAST != 14
+++ || FFI_TYPE_COMPLEX != 15 \
+++ || FFI_TYPE_LAST != 15
++ #error "osf.S out of sync with ffi.h"
++ #endif
++
diff --git a/dev-lang/ghc/files/ghc-8.0.2_rc2-old-sphinx.patch b/dev-lang/ghc/files/ghc-8.0.2_rc2-old-sphinx.patch
new file mode 100644
index 000000000000..a4d49d3ef808
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.0.2_rc2-old-sphinx.patch
@@ -0,0 +1,12 @@
+diff --git a/docs/users_guide/profiling.rst b/docs/users_guide/profiling.rst
+index 4d0bb3a..f980f72 100644
+--- a/docs/users_guide/profiling.rst
++++ b/docs/users_guide/profiling.rst
+@@ -435,7 +435,2 @@ To generate a heap profile from your program:
+
+-For example, here is a heap profile produced for the ``sphere`` program
+-from GHC's ``nofib`` benchmark suite,
+-
+-.. image:: images/prof_scc.*
+-
+ You might also want to take a look at
diff --git a/dev-lang/ghc/files/ghc-8.2.1-darwin.patch b/dev-lang/ghc/files/ghc-8.2.1-darwin.patch
new file mode 100644
index 000000000000..53fedc4e4402
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.2.1-darwin.patch
@@ -0,0 +1,31 @@
+From d39a3409acd3c40fb018ec1c114f15d3ecef6ef9 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu, 1 Jun 2017 22:30:05 +0100
+Subject: [PATCH] aclocal.m4: add support for versioned darwin triplets
+
+The change adds support for 'darwin*' OS:
+ $ ./configure --target=aarch64-apple-darwin14
+
+Reported-by: jp_rider
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ aclocal.m4 | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 7ad9c36453..437974a0c7 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -1906,6 +1906,9 @@ AC_DEFUN([GHC_CONVERT_OS],[
+ aix*) # e.g. powerpc-ibm-aix7.1.3.0
+ $3="aix"
+ ;;
++ darwin*) # e.g. aarch64-apple-darwin14
++ $3="darwin"
++ ;;
+ freebsd*) # like i686-gentoo-freebsd7
+ # i686-gentoo-freebsd8
+ # i686-gentoo-freebsd8.2
+--
+2.14.1
+
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-cgen-constify.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-cgen-constify.patch
new file mode 100644
index 000000000000..2e1ef932b454
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.2.1_rc1-cgen-constify.patch
@@ -0,0 +1,378 @@
+From 7e00046772e053c63ac93630a60b0f396e32a2d7 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sun, 16 Apr 2017 10:43:38 +0100
+Subject: [PATCH] compiler/cmm/PprC.hs: constify labels in .rodata
+
+Summary:
+Consider one-line module
+ module B (v) where v = "hello"
+in -fvia-C mode it generates code like
+ static char gibberish_str[] = "hello";
+
+It resides in data section (precious resource on ia64!).
+The patch switches genrator to emit:
+ static const char gibberish_str[] = "hello";
+
+Other types if symbols that gained 'const' qualifier are:
+
+- info tables (from haskell and CMM)
+- static reference tables (from haskell and CMM)
+
+Cleanups along the way:
+
+- fixed info tables defined in .cmm to reside in .rodata
+- split out closure declaration into 'IC_' / 'EC_'
+- added label declaration (based on label type) right before
+ each label definition (based on section type) so that C
+ compiler could check if declaration and definition matches
+ at definition site.
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+Test Plan: ran testsuite on unregisterised x86_64 compiler
+
+Reviewers: simonmar, ezyang, austin, bgamari, erikd
+
+Subscribers: rwbarton, thomie
+
+GHC Trac Issues: #8996
+
+Differential Revision: https://phabricator.haskell.org/D3481
+---
+ compiler/cmm/CLabel.hs | 24 ++++++++++++++
+ compiler/cmm/Cmm.hs | 13 ++++++++
+ compiler/cmm/CmmInfo.hs | 2 +-
+ compiler/cmm/PprC.hs | 62 +++++++++++++++++++++++-------------
+ compiler/llvmGen/LlvmCodeGen/Data.hs | 12 -------
+ includes/Stg.h | 22 +++++++++----
+ includes/rts/storage/InfoTables.h | 2 +-
+ includes/stg/MiscClosures.h | 14 ++++----
+ 8 files changed, 102 insertions(+), 49 deletions(-)
+
+diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
+index 3ba4f7647a..62c8037e9c 100644
+--- a/compiler/cmm/CLabel.hs
++++ b/compiler/cmm/CLabel.hs
+@@ -89,6 +89,8 @@ module CLabel (
+ foreignLabelStdcallInfo,
+ isBytesLabel,
+ isForeignLabel,
++ isSomeRODataLabel,
++ isStaticClosureLabel,
+ mkCCLabel, mkCCSLabel,
+
+ DynamicLinkerLabelInfo(..),
+@@ -575,6 +577,28 @@ isForeignLabel :: CLabel -> Bool
+ isForeignLabel (ForeignLabel _ _ _ _) = True
+ isForeignLabel _lbl = False
+
++-- | Whether label is a static closure label (can come from haskell or cmm)
++isStaticClosureLabel :: CLabel -> Bool
++-- Closure defined in haskell (.hs)
++isStaticClosureLabel (IdLabel _ _ Closure) = True
++-- Closure defined in cmm
++isStaticClosureLabel (CmmLabel _ _ CmmClosure) = True
++isStaticClosureLabel _lbl = False
++
++-- | Whether label is a .rodata label
++isSomeRODataLabel :: CLabel -> Bool
++-- info table defined in haskell (.hs)
++isSomeRODataLabel (IdLabel _ _ ClosureTable) = True
++isSomeRODataLabel (IdLabel _ _ ConInfoTable) = True
++isSomeRODataLabel (IdLabel _ _ InfoTable) = True
++isSomeRODataLabel (IdLabel _ _ LocalInfoTable) = True
++-- static reference tables defined in haskell (.hs)
++isSomeRODataLabel (IdLabel _ _ SRT) = True
++isSomeRODataLabel (SRTLabel _) = True
++-- info table defined in cmm (.cmm)
++isSomeRODataLabel (CmmLabel _ _ CmmInfo) = True
++isSomeRODataLabel _lbl = False
++
+ -- | Get the label size field from a ForeignLabel
+ foreignLabelStdcallInfo :: CLabel -> Maybe Int
+ foreignLabelStdcallInfo (ForeignLabel _ info _ _) = info
+diff --git a/compiler/cmm/Cmm.hs b/compiler/cmm/Cmm.hs
+index d2ee531686..bab20f3fdd 100644
+--- a/compiler/cmm/Cmm.hs
++++ b/compiler/cmm/Cmm.hs
+@@ -9,6 +9,7 @@ module Cmm (
+ CmmBlock,
+ RawCmmDecl, RawCmmGroup,
+ Section(..), SectionType(..), CmmStatics(..), CmmStatic(..),
++ isSecConstant,
+
+ -- ** Blocks containing lists
+ GenBasicBlock(..), blockId,
+@@ -167,6 +168,18 @@ data SectionType
+ | OtherSection String
+ deriving (Show)
+
++-- | Should a data in this section be considered constant
++isSecConstant :: Section -> Bool
++isSecConstant (Section t _) = case t of
++ Text -> True
++ ReadOnlyData -> True
++ RelocatableReadOnlyData -> True
++ ReadOnlyData16 -> True
++ CString -> True
++ Data -> False
++ UninitialisedData -> False
++ (OtherSection _) -> False
++
+ data Section = Section SectionType CLabel
+
+ data CmmStatic
+diff --git a/compiler/cmm/CmmInfo.hs b/compiler/cmm/CmmInfo.hs
+index b5e800a977..35e3a1888d 100644
+--- a/compiler/cmm/CmmInfo.hs
++++ b/compiler/cmm/CmmInfo.hs
+@@ -133,7 +133,7 @@ mkInfoTable dflags proc@(CmmProc infos entry_lbl live blocks)
+ --
+ return (top_decls ++
+ [CmmProc mapEmpty entry_lbl live blocks,
+- mkDataLits (Section Data info_lbl) info_lbl
++ mkRODataLits info_lbl
+ (CmmLabel entry_lbl : rel_std_info ++ rel_extra_bits)])
+
+ --
+diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
+index 56de94079f..21ed6f6516 100644
+--- a/compiler/cmm/PprC.hs
++++ b/compiler/cmm/PprC.hs
+@@ -83,12 +83,13 @@ pprC tops = vcat $ intersperse blankLine $ map pprTop tops
+ -- top level procs
+ --
+ pprTop :: RawCmmDecl -> SDoc
+-pprTop (CmmProc infos clbl _ graph) =
++pprTop (CmmProc infos clbl _in_live_regs graph) =
+
+ (case mapLookup (g_entry graph) infos of
+ Nothing -> empty
+- Just (Statics info_clbl info_dat) -> pprDataExterns info_dat $$
+- pprWordArray info_clbl info_dat) $$
++ Just (Statics info_clbl info_dat) ->
++ pprDataExterns info_dat $$
++ pprWordArray info_is_in_rodata info_clbl info_dat) $$
+ (vcat [
+ blankLine,
+ extern_decls,
+@@ -99,6 +100,8 @@ pprTop (CmmProc infos clbl _ graph) =
+ rbrace ]
+ )
+ where
++ -- info tables are always in .rodata
++ info_is_in_rodata = True
+ blocks = toBlockListEntryFirst graph
+ (temp_decls, extern_decls) = pprTempAndExternDecls blocks
+
+@@ -107,21 +110,23 @@ pprTop (CmmProc infos clbl _ graph) =
+
+ -- We only handle (a) arrays of word-sized things and (b) strings.
+
+-pprTop (CmmData _section (Statics lbl [CmmString str])) =
++pprTop (CmmData section (Statics lbl [CmmString str])) =
++ pprExternDecl lbl $$
+ hcat [
+- pprLocalness lbl, text "char ", ppr lbl,
++ pprLocalness lbl, pprConstness (isSecConstant section), text "char ", ppr lbl,
+ text "[] = ", pprStringInCStyle str, semi
+ ]
+
+-pprTop (CmmData _section (Statics lbl [CmmUninitialised size])) =
++pprTop (CmmData section (Statics lbl [CmmUninitialised size])) =
++ pprExternDecl lbl $$
+ hcat [
+- pprLocalness lbl, text "char ", ppr lbl,
++ pprLocalness lbl, pprConstness (isSecConstant section), text "char ", ppr lbl,
+ brackets (int size), semi
+ ]
+
+-pprTop (CmmData _section (Statics lbl lits)) =
++pprTop (CmmData section (Statics lbl lits)) =
+ pprDataExterns lits $$
+- pprWordArray lbl lits
++ pprWordArray (isSecConstant section) lbl lits
+
+ -- --------------------------------------------------------------------------
+ -- BasicBlocks are self-contained entities: they always end in a jump.
+@@ -141,10 +146,12 @@ pprBBlock block =
+ -- Info tables. Just arrays of words.
+ -- See codeGen/ClosureInfo, and nativeGen/PprMach
+
+-pprWordArray :: CLabel -> [CmmStatic] -> SDoc
+-pprWordArray lbl ds
++pprWordArray :: Bool -> CLabel -> [CmmStatic] -> SDoc
++pprWordArray is_ro lbl ds
+ = sdocWithDynFlags $ \dflags ->
+- hcat [ pprLocalness lbl, text "StgWord"
++ -- TODO: align closures only
++ pprExternDecl lbl $$
++ hcat [ pprLocalness lbl, pprConstness is_ro, text "StgWord"
+ , space, ppr lbl, text "[]"
+ -- See Note [StgWord alignment]
+ , pprAlignment (wordWidth dflags)
+@@ -180,6 +187,10 @@ pprLocalness :: CLabel -> SDoc
+ pprLocalness lbl | not $ externallyVisibleCLabel lbl = text "static "
+ | otherwise = empty
+
++pprConstness :: Bool -> SDoc
++pprConstness is_ro | is_ro = text "const "
++ | otherwise = empty
++
+ -- --------------------------------------------------------------------------
+ -- Statements.
+ --
+@@ -984,31 +995,38 @@ is_cishCC JavaScriptCallConv = False
+ pprTempAndExternDecls :: [CmmBlock] -> (SDoc{-temps-}, SDoc{-externs-})
+ pprTempAndExternDecls stmts
+ = (pprUFM (getUniqSet temps) (vcat . map pprTempDecl),
+- vcat (map (pprExternDecl False{-ToDo-}) (Map.keys lbls)))
++ vcat (map pprExternDecl (Map.keys lbls)))
+ where (temps, lbls) = runTE (mapM_ te_BB stmts)
+
+ pprDataExterns :: [CmmStatic] -> SDoc
+ pprDataExterns statics
+- = vcat (map (pprExternDecl False{-ToDo-}) (Map.keys lbls))
++ = vcat (map pprExternDecl (Map.keys lbls))
+ where (_, lbls) = runTE (mapM_ te_Static statics)
+
+ pprTempDecl :: LocalReg -> SDoc
+ pprTempDecl l@(LocalReg _ rep)
+ = hcat [ machRepCType rep, space, pprLocalReg l, semi ]
+
+-pprExternDecl :: Bool -> CLabel -> SDoc
+-pprExternDecl _in_srt lbl
++pprExternDecl :: CLabel -> SDoc
++pprExternDecl lbl
+ -- do not print anything for "known external" things
+ | not (needsCDecl lbl) = empty
+ | Just sz <- foreignLabelStdcallInfo lbl = stdcall_decl sz
+ | otherwise =
+- hcat [ visibility, label_type lbl,
+- lparen, ppr lbl, text ");" ]
++ hcat [ visibility, label_type lbl , lparen, ppr lbl, text ");"
++ -- occasionally useful to see label type
++ -- , text "/* ", pprDebugCLabel lbl, text " */"
++ ]
+ where
+- label_type lbl | isBytesLabel lbl = text "B_"
+- | isForeignLabel lbl && isCFunctionLabel lbl = text "FF_"
+- | isCFunctionLabel lbl = text "F_"
+- | otherwise = text "I_"
++ label_type lbl | isBytesLabel lbl = text "B_"
++ | isForeignLabel lbl && isCFunctionLabel lbl
++ = text "FF_"
++ | isCFunctionLabel lbl = text "F_"
++ | isStaticClosureLabel lbl = text "C_"
++ -- generic .rodata labels
++ | isSomeRODataLabel lbl = text "RO_"
++ -- generic .data labels (common case)
++ | otherwise = text "RW_"
+
+ visibility
+ | externallyVisibleCLabel lbl = char 'E'
+diff --git a/compiler/llvmGen/LlvmCodeGen/Data.hs b/compiler/llvmGen/LlvmCodeGen/Data.hs
+index 9bb5a75bda..adb86d312d 100644
+--- a/compiler/llvmGen/LlvmCodeGen/Data.hs
++++ b/compiler/llvmGen/LlvmCodeGen/Data.hs
+@@ -56,18 +56,6 @@ genLlvmData (sec, Statics lbl xs) = do
+
+ return ([globDef], [tyAlias])
+
+--- | Should a data in this section be considered constant
+-isSecConstant :: Section -> Bool
+-isSecConstant (Section t _) = case t of
+- Text -> True
+- ReadOnlyData -> True
+- RelocatableReadOnlyData -> True
+- ReadOnlyData16 -> True
+- CString -> True
+- Data -> False
+- UninitialisedData -> False
+- (OtherSection _) -> False
+-
+ -- | Format the section type part of a Cmm Section
+ llvmSectionType :: Platform -> SectionType -> FastString
+ llvmSectionType p t = case t of
+diff --git a/includes/Stg.h b/includes/Stg.h
+index 619984d8e5..b1b3190307 100644
+--- a/includes/Stg.h
++++ b/includes/Stg.h
+@@ -223,13 +223,23 @@ typedef StgInt I_;
+ typedef StgWord StgWordArray[];
+ typedef StgFunPtr F_;
+
+-#define EB_(X) extern char X[]
+-#define IB_(X) static char X[]
+-#define EI_(X) extern StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
+-#define II_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
++/* byte arrays (and strings): */
++#define EB_(X) extern const char X[]
++#define IB_(X) static const char X[]
++/* static (non-heap) closures (requires alignment for pointer tagging): */
++#define EC_(X) extern StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
++#define IC_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
++/* writable data (does not require alignment): */
++#define ERW_(X) extern StgWordArray (X)
++#define IRW_(X) static StgWordArray (X)
++/* read-only data (does not require alignment): */
++#define ERO_(X) extern const StgWordArray (X)
++#define IRO_(X) static const StgWordArray (X)
++/* stg-native functions: */
+ #define IF_(f) static StgFunPtr GNUC3_ATTRIBUTE(used) f(void)
+-#define FN_(f) StgFunPtr f(void)
+-#define EF_(f) StgFunPtr f(void) /* External Cmm functions */
++#define FN_(f) StgFunPtr f(void)
++#define EF_(f) StgFunPtr f(void) /* External Cmm functions */
++/* foreign functions: */
+ #define EFF_(f) void f() /* See Note [External function prototypes] */
+
+ /* Note [External function prototypes] See Trac #8965, #11395
+diff --git a/includes/rts/storage/InfoTables.h b/includes/rts/storage/InfoTables.h
+index 307aac371c..163f1d1c87 100644
+--- a/includes/rts/storage/InfoTables.h
++++ b/includes/rts/storage/InfoTables.h
+@@ -266,7 +266,7 @@ typedef struct {
+ } StgFunInfoTable;
+
+ // canned bitmap for each arg type, indexed by constants in FunTypes.h
+-extern StgWord stg_arg_bitmaps[];
++extern const StgWord stg_arg_bitmaps[];
+
+ /* -----------------------------------------------------------------------------
+ Return info tables
+diff --git a/includes/stg/MiscClosures.h b/includes/stg/MiscClosures.h
+index 9d907ab3ba..b604f1c42b 100644
+--- a/includes/stg/MiscClosures.h
++++ b/includes/stg/MiscClosures.h
+@@ -21,10 +21,10 @@
+ #define STGMISCCLOSURES_H
+
+ #if IN_STG_CODE
+-# define RTS_RET_INFO(i) extern W_(i)[]
+-# define RTS_FUN_INFO(i) extern W_(i)[]
+-# define RTS_THUNK_INFO(i) extern W_(i)[]
+-# define RTS_INFO(i) extern W_(i)[]
++# define RTS_RET_INFO(i) extern const W_(i)[]
++# define RTS_FUN_INFO(i) extern const W_(i)[]
++# define RTS_THUNK_INFO(i) extern const W_(i)[]
++# define RTS_INFO(i) extern const W_(i)[]
+ # define RTS_CLOSURE(i) extern W_(i)[]
+ # define RTS_FUN_DECL(f) extern DLL_IMPORT_RTS StgFunPtr f(void)
+ #else
+@@ -489,9 +489,9 @@ extern StgWord RTS_VAR(sched_mutex);
+
+ // Apply.cmm
+ // canned bitmap for each arg type
+-extern StgWord stg_arg_bitmaps[];
+-extern StgWord stg_ap_stack_entries[];
+-extern StgWord stg_stack_save_entries[];
++extern const StgWord stg_arg_bitmaps[];
++extern const StgWord stg_ap_stack_entries[];
++extern const StgWord stg_stack_save_entries[];
+
+ // Storage.c
+ extern unsigned int RTS_VAR(g0);
+--
+2.12.2
+
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-ghci-cross.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-ghci-cross.patch
new file mode 100644
index 000000000000..dbba18e85c7f
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.2.1_rc1-ghci-cross.patch
@@ -0,0 +1,60 @@
+commit 732b3dbbff194eb8650c75afd79d892801afa0dc
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu Apr 6 22:48:13 2017 +0100
+
+ add $(CrossCompilePrefix) to 'runghc' and 'ghci'
+
+ When Stage1Only=YES install mode is used one of rare tools
+ that lack $(CrossCompilePrefix) prefix are 'runghc' and 'ghci'.
+
+ This causes file collisions when multiple GHC crosscompilers
+ are installed in system.
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+diff --git a/driver/ghci/ghc.mk b/driver/ghci/ghc.mk
+index 41d1f15c17..0f31884080 100644
+--- a/driver/ghci/ghc.mk
++++ b/driver/ghci/ghc.mk
+@@ -16,16 +16,16 @@ ifneq "$(Windows_Host)" "YES"
+ install: install_driver_ghci
+
+ .PHONY: install_driver_ghci
+-install_driver_ghci: WRAPPER=$(DESTDIR)$(bindir)/ghci-$(ProjectVersion)
++install_driver_ghci: WRAPPER=$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghci-$(ProjectVersion)
+ install_driver_ghci:
+ $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
+ $(call removeFiles, "$(WRAPPER)")
+ $(CREATE_SCRIPT) "$(WRAPPER)"
+ echo '#!$(SHELL)' >> "$(WRAPPER)"
+- echo 'exec "$(bindir)/ghc-$(ProjectVersion)" --interactive "$$@"' >> "$(WRAPPER)"
++ echo 'exec "$(bindir)/$(CrossCompilePrefix)ghc-$(ProjectVersion)" --interactive "$$@"' >> "$(WRAPPER)"
+ $(EXECUTABLE_FILE) "$(WRAPPER)"
+- $(call removeFiles,"$(DESTDIR)$(bindir)/ghci")
+- $(LN_S) ghci-$(ProjectVersion) "$(DESTDIR)$(bindir)/ghci"
++ $(call removeFiles,"$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghci")
++ $(LN_S) $(CrossCompilePrefix)ghci-$(ProjectVersion) "$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghci"
+
+ else # Windows_Host...
+
+diff --git a/utils/runghc/ghc.mk b/utils/runghc/ghc.mk
+index 9169ca21bd..50b11a612e 100644
+--- a/utils/runghc/ghc.mk
++++ b/utils/runghc/ghc.mk
+@@ -34,11 +34,11 @@ install: install_runhaskell
+ .PHONY: install_runhaskell
+ ifeq "$(Windows_Host)" "YES"
+ install_runhaskell: install_bins
+- "$(CP)" $(DESTDIR)$(bindir)/runghc$(exeext1) $(DESTDIR)$(bindir)/runhaskell$(exeext1)
++ "$(CP)" $(DESTDIR)$(bindir)/$(CrossCompilePrefix)runghc$(exeext1) $(DESTDIR)$(bindir)/$(CrossCompilePrefix)runhaskell$(exeext1)
+ else
+ install_runhaskell:
+- $(call removeFiles,"$(DESTDIR)$(bindir)/runhaskell")
+- $(LN_S) runghc "$(DESTDIR)$(bindir)/runhaskell"
+- $(call removeFiles,"$(DESTDIR)$(bindir)/runghc")
+- $(LN_S) runghc-$(ProjectVersion) "$(DESTDIR)$(bindir)/runghc"
++ $(call removeFiles,"$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runhaskell")
++ $(LN_S) $(CrossCompilePrefix)runghc "$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runhaskell"
++ $(call removeFiles,"$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runghc")
++ $(LN_S) $(CrossCompilePrefix)runghc-$(ProjectVersion) "$(DESTDIR)$(bindir)/$(CrossCompilePrefix)runghc"
+ endif
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-hp2ps-cross.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-hp2ps-cross.patch
new file mode 100644
index 000000000000..26382b3cf44c
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.2.1_rc1-hp2ps-cross.patch
@@ -0,0 +1,104 @@
+commit ff84d052850b637b03bbb98cf05202e44886257d
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sat Apr 8 10:02:34 2017 +0100
+
+ cross-build 'unlit' and 'hp2ps' for stage2 install
+
+ In navive build case it does not matter much if we build
+ 'unlit' and 'hp2ps' tools with ghc-stage0 or ghc-stage1:
+ both GHCs are native compilers and both tools are written
+ in C (have no haskell code).
+
+ But in cross-case the difference is substantial:
+ In Stag1Only=YES case we need to install native tools built
+ by ghc-stage0/${host}-cc.
+ In Stag1Only=NO case we need to install cross-built tools
+ built by ghc-stage1/${target}-cc.
+
+ Before this change GHC did not have a rule to build cross-built
+ 'unlit' and 'hp2ps'.
+
+ The change adds cross-built 'unlit' and 'hp2ps' as 'dist-install'
+ targets.
+
+ 'inplace/lib/bin/unlit.bin' target is unchanged and still contains
+ native binary.
+
+ As a result this change allows cross-building and packaging whole
+ GHC for target platform!
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+diff --git a/utils/hp2ps/ghc.mk b/utils/hp2ps/ghc.mk
+index f6e01ec6c1..21ce87dcfa 100644
+--- a/utils/hp2ps/ghc.mk
++++ b/utils/hp2ps/ghc.mk
+@@ -10,6 +10,7 @@
+ #
+ # -----------------------------------------------------------------------------
+
++# stage0
+ utils/hp2ps_dist_C_SRCS = AreaBelow.c Curves.c Error.c Main.c \
+ Reorder.c TopTwenty.c AuxFile.c Deviation.c \
+ HpFile.c Marks.c Scale.c TraceElement.c \
+@@ -17,11 +18,27 @@ utils/hp2ps_dist_C_SRCS = AreaBelow.c Curves.c Error.c Main.c \
+ Utilities.c
+ utils/hp2ps_dist_EXTRA_LIBRARIES = m
+ utils/hp2ps_dist_PROGNAME = hp2ps
+-utils/hp2ps_dist_INSTALL = YES
+ utils/hp2ps_dist_INSTALL_INPLACE = YES
+ utils/hp2ps_dist_SHELL_WRAPPER = YES
+ utils/hp2ps_dist_INSTALL_SHELL_WRAPPER_NAME = hp2ps
+
+ utils/hp2ps_CC_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS))
+
++# stage 1
++utils/hp2ps_dist-install_C_SRCS = $(utils/hp2ps_dist_C_SRCS)
++utils/hp2ps_dist-install_EXTRA_LIBRARIES = $(utils/hp2ps_dist_EXTRA_LIBRARIES)
++utils/hp2ps_dist-install_PROGNAME = $(utils/hp2ps_dist_PROGNAME)
++utils/hp2ps_dist-install_INSTALL_INPLACE = NO
++utils/hp2ps_dist-install_SHELL_WRAPPER = YES
++utils/hp2ps_dist-install_INSTALL_SHELL_WRAPPER_NAME = $(utils/hp2ps_dist_INSTALL_SHELL_WRAPPER_NAME)
++
++ifeq "$(Stage1Only)" "YES"
++utils/hp2ps_dist_INSTALL = YES
++utils/hp2ps_dist-install_INSTALL = NO
++else
++utils/hp2ps_dist_INSTALL = NO
++utils/hp2ps_dist-install_INSTALL = YES
++endif
++
+ $(eval $(call build-prog,utils/hp2ps,dist,0))
++$(eval $(call build-prog,utils/hp2ps,dist-install,1))
+diff --git a/utils/unlit/ghc.mk b/utils/unlit/ghc.mk
+index e947989b5e..8911f4e856 100644
+--- a/utils/unlit/ghc.mk
++++ b/utils/unlit/ghc.mk
+@@ -10,11 +10,25 @@
+ #
+ # -----------------------------------------------------------------------------
+
++# built by ghc-stage0
+ utils/unlit_dist_C_SRCS = unlit.c
+ utils/unlit_dist_PROGNAME = unlit
+ utils/unlit_dist_TOPDIR = YES
+-utils/unlit_dist_INSTALL = YES
+ utils/unlit_dist_INSTALL_INPLACE = YES
+
+-$(eval $(call build-prog,utils/unlit,dist,0))
++# built by ghc-stage1
++utils/unlit_dist-install_C_SRCS = $(utils/unlit_dist_C_SRCS)
++utils/unlit_dist-install_PROGNAME = $(utils/unlit_dist_PROGNAME)
++utils/unlit_dist-install_TOPDIR = $(utils/unlit_dist_TOPDIR)
++utils/unlit_dist-install_INSTALL_INPLACE = NO
++
++ifeq "$(Stage1Only)" "YES"
++utils/unlit_dist_INSTALL = YES
++utils/unlit_dist-install_INSTALL = NO
++else
++utils/unlit_dist_INSTALL = NO
++utils/unlit_dist-install_INSTALL = YES
++endif
+
++$(eval $(call build-prog,utils/unlit,dist,0))
++$(eval $(call build-prog,utils/unlit,dist-install,1))
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-stage2-cross.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-stage2-cross.patch
new file mode 100644
index 000000000000..1439d722fef4
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.2.1_rc1-stage2-cross.patch
@@ -0,0 +1,81 @@
+commit 54895c90440cb81f18657537b91f2aa35bd54173
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Fri Apr 7 10:08:58 2017 +0100
+
+ fix 'make install' for cross-stage2
+
+ When cross-built GHC is being installed one of
+ latest steps is to register installed libraries
+ with 'ghc-pkg'.
+
+ GHC uses freshly installed 'ghc-pkg' and 'ghc-stage2'
+ for that.
+
+ Tested as:
+ ./configure --target=aarch64-unknown-linux-gnu
+ make install DESTDIR=$(pwd)/__s2 STRIP_CMD=:
+
+ Before the change install failed on ghc-pkg execution phase:
+
+ ".../ghc-cross/__s2/usr/local/lib/ghc-8.3.20170406/bin/ghc-pkg" \
+ --force \
+ --global-package-db \
+ ".../ghc-cross/__s2/usr/local/lib/ghc-8.3.20170406/package.conf.d" \
+ update rts/dist/package.conf.install
+ /bin/sh: .../ghc-cross/__s2/usr/local/lib/ghc-8.3.20170406/bin/ghc-pkg: \
+ No such file or directory
+
+ To avoid breakage we use 'ghc' and 'ghc-pkg' built by stage0.
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+ Test Plan: run 'make install' on stage2 crosscompiler
+
+ Reviewers: rwbarton, austin, bgamari
+
+ Subscribers: thomie, snowleopard
+
+ Differential Revision: https://phabricator.haskell.org/D3432
+
+diff --git a/ghc.mk b/ghc.mk
+index caa6c38fbb..8971f25981 100644
+--- a/ghc.mk
++++ b/ghc.mk
+@@ -962,6 +962,12 @@ endif
+
+ INSTALLED_PACKAGE_CONF=$(DESTDIR)$(topdir)/package.conf.d
+
++ifeq "$(CrossCompiling)" "YES"
++# when installing ghc-stage2 we can't run target's
++# 'ghc-pkg' and 'ghc-stage2' but those are needed for registration.
++INSTALLED_GHC_REAL=$(TOP)/inplace/bin/ghc-stage1
++INSTALLED_GHC_PKG_REAL=$(TOP)/$(ghc-pkg_DIST_BINARY)
++else # CrossCompiling
+ # Install packages in the right order, so that ghc-pkg doesn't complain.
+ # Also, install ghc-pkg first.
+ ifeq "$(Windows_Host)" "NO"
+@@ -971,6 +977,7 @@ else
+ INSTALLED_GHC_REAL=$(DESTDIR)$(bindir)/ghc.exe
+ INSTALLED_GHC_PKG_REAL=$(DESTDIR)$(bindir)/ghc-pkg.exe
+ endif
++endif # CrossCompiling
+
+ # Set the INSTALL_DISTDIR_p for each package; compiler is special
+ $(foreach p,$(filter-out compiler,$(INSTALL_PACKAGES)),\
+diff --git a/utils/ghc-pkg/ghc.mk b/utils/ghc-pkg/ghc.mk
+index 002c8122f2..4d5ef4e108 100644
+--- a/utils/ghc-pkg/ghc.mk
++++ b/utils/ghc-pkg/ghc.mk
+@@ -49,6 +49,12 @@ utils/ghc-pkg_dist_PROGNAME = ghc-pkg
+ utils/ghc-pkg_dist_SHELL_WRAPPER = YES
+ utils/ghc-pkg_dist_INSTALL_INPLACE = YES
+
++# When cross-built ghc-stage2 is installed 'make install' needs to call
++# native ghc-pkg (not the cross-built one) to register installed packages
++# 'ghc-pkg_DIST_BINARY' variable only refer to native binary.
++ghc-pkg_DIST_BINARY_NAME = ghc-pkg$(exeext0)
++ghc-pkg_DIST_BINARY = utils/ghc-pkg/dist/build/tmp/$(ghc-pkg_DIST_BINARY_NAME)
++
+ # See Note [Stage1Only vs stage=1] in mk/config.mk.in.
+ ifeq "$(Stage1Only)" "YES"
+ # Install the copy of ghc-pkg from the dist directory when running 'make
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-staged-cross.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-staged-cross.patch
new file mode 100644
index 000000000000..7e4ea7a9f610
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.2.1_rc1-staged-cross.patch
@@ -0,0 +1,43 @@
+commit f2685df3b10e13f142736f28835e9064334bc143
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Wed Apr 5 22:31:37 2017 +0100
+
+ avoid $(CrossCompilerPrefix) for stage2 install
+
+ Suppose we are crossbuilding ghc (when ghc-stage2
+ is a normal compiler for $target):
+
+ For this case 'make install' should install unprefixed
+ stage2 'ghc' and not '$(CorssCompilePrefix)-ghc'.
+
+ That way cross-built ghc is installable and
+ usable on target as if it would be built natively
+ on a target.
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+diff --git a/mk/config.mk.in b/mk/config.mk.in
+index 4d5d82aa80..5e274bb71f 100644
+--- a/mk/config.mk.in
++++ b/mk/config.mk.in
+@@ -530,7 +530,7 @@ SUPPORTS_THIS_UNIT_ID = @SUPPORTS_THIS_UNIT_ID@
+ # needs to know which gcc you're using in order to perform its tests.
+
+ GccVersion = @GccVersion@
+-CrossCompilePrefix = @CrossCompilePrefix@
++
+ # TargetPlatformFull retains the string passed to configure so we have it in
+ # the necessary format to pass to libffi's configure.
+ TargetPlatformFull = @TargetPlatformFull@
+@@ -567,6 +567,11 @@ CrossCompiling = @CrossCompiling@
+ # See Note [Stage1Only vs stage=1]
+ Stage1Only = NO
+
++# Installed tools prefix:
++# we add prefix to crosscompiler GHC only (ghc-stage1),
++# not cross-built GHC (not ghc-stage2).
++CrossCompilePrefix = $(if $(filter YES,$(Stage1Only)),@CrossCompilePrefix@,)
++
+ # Install stage 2 by default, or stage 1 in the cross compiler
+ # case. Can be changed to 3
+ INSTALL_GHC_STAGE= $(if $(filter YES,$(Stage1Only)),1,2)
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-unphased-cross.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-unphased-cross.patch
new file mode 100644
index 000000000000..a5528956de14
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.2.1_rc1-unphased-cross.patch
@@ -0,0 +1,30 @@
+commit 6ff98b962db15d18eb1d082fe344cef692ecef8e
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu Apr 6 08:55:56 2017 +0100
+
+ config.mk.in: remove phase=0 hack for CrossCompilePrefix
+
+ $(CrossCompilePrefix) is used only in 'make install'
+ target filenames in $(DESTDIR). None of inplace (or boot)
+ files contain $(CrossCompilePrefix).
+
+ Thus we don't need to worry about phases.
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+diff --git a/mk/config.mk.in b/mk/config.mk.in
+index 4e61eea821..4d5d82aa80 100644
+--- a/mk/config.mk.in
++++ b/mk/config.mk.in
+@@ -530,11 +530,7 @@ SUPPORTS_THIS_UNIT_ID = @SUPPORTS_THIS_UNIT_ID@
+ # needs to know which gcc you're using in order to perform its tests.
+
+ GccVersion = @GccVersion@
+-ifeq "$(phase)" "0"
+-CrossCompilePrefix =
+-else
+ CrossCompilePrefix = @CrossCompilePrefix@
+-endif
+ # TargetPlatformFull retains the string passed to configure so we have it in
+ # the necessary format to pass to libffi's configure.
+ TargetPlatformFull = @TargetPlatformFull@
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-win32-cross-1.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-win32-cross-1.patch
new file mode 100644
index 000000000000..79751e1ecbda
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.2.1_rc1-win32-cross-1.patch
@@ -0,0 +1,124 @@
+commit a691f6a7a191a268380805481d8e63134764a4a1
+Author: Sergei Trofimovich <slyfox@inbox.ru>
+Date: Sat Apr 29 22:02:24 2017 +0100
+
+ add basic cross-compilation support (#87)
+
+ * fix include case: s/#include <Lmcons.h>/#include <lmcons.h>
+
+ Noticed when cross-compiling win32 on linux to i686-w64-mingw32-gcc.
+ i686-w64-mingw32 provides all headers in lowercase.
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+ * Pen.hsc: don't use c99-style comments in enum declarations
+
+ Ths change workarounds hsc2hs bug in cross-compile mode:
+ https://ghc.haskell.org/trac/ghc/ticket/13619
+
+ To reproduce the build failure it's enough to run
+ $ cabal configure --hsc2hs-options='--cross-safe --cross-compile'
+ $ cabal build --hsc2hs-options='--cross-safe --cross-compile'
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+ * SimpleMAPI.hsc: don't use #ifdef in enum declarations
+
+ This change workarounds hsc2hs bug in cross-compile mode:
+ https://ghc.haskell.org/trac/ghc/ticket/13620
+
+ To reproduce the build failure it's enough to run
+ $ cabal configure --hsc2hs-options='--cross-safe --cross-compile'
+ $ cabal build --hsc2hs-options='--cross-safe --cross-compile'
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+diff --git a/Graphics/Win32/GDI/Pen.hsc b/Graphics/Win32/GDI/Pen.hsc
+index c880170..8d8df5d 100644
+--- a/Graphics/Win32/GDI/Pen.hsc
++++ b/Graphics/Win32/GDI/Pen.hsc
+@@ -56,7 +56,7 @@ foreign import WINDOWS_CCONV unsafe "windows.h DeleteObject"
+
+ type PenStyle = INT
+
+-#{enum PenStyle, // Pick one of these
++#{enum PenStyle,
+ , pS_SOLID = PS_SOLID // default
+ , pS_DASH = PS_DASH // -------
+ , pS_DOT = PS_DOT // .......
+@@ -69,14 +69,14 @@ type PenStyle = INT
+ , pS_STYLE_MASK = PS_STYLE_MASK // all the above
+ }
+
+-#{enum PenStyle , // "or" with one of these
++#{enum PenStyle,
+ , pS_ENDCAP_ROUND = PS_ENDCAP_ROUND // default
+ , pS_ENDCAP_SQUARE = PS_ENDCAP_SQUARE
+ , pS_ENDCAP_FLAT = PS_ENDCAP_FLAT
+ , pS_ENDCAP_MASK = PS_ENDCAP_MASK // all the above
+ }
+
+-#{enum PenStyle, // "or" with one of these
++#{enum PenStyle,
+ , pS_JOIN_ROUND = PS_JOIN_ROUND // default
+ , pS_JOIN_BEVEL = PS_JOIN_BEVEL
+ , pS_JOIN_MITER = PS_JOIN_MITER
+@@ -87,7 +87,7 @@ If PS_JOIN_MASK is not defined with your GNU Windows32 header files,
+ you'll have to define it.
+ -}
+
+-#{enum PenStyle, // "or" with one of these
++#{enum PenStyle,
+ , pS_COSMETIC = PS_COSMETIC // default
+ , pS_GEOMETRIC = PS_GEOMETRIC
+ , pS_TYPE_MASK = PS_TYPE_MASK // all the above
+diff --git a/System/Win32/Info/Computer.hsc b/System/Win32/Info/Computer.hsc
+index bb2eb72..65ae8dc 100644
+--- a/System/Win32/Info/Computer.hsc
++++ b/System/Win32/Info/Computer.hsc
+@@ -65,7 +65,7 @@ import System.Win32.Utils ( tryWithoutNull )
+ import System.Win32.Word ( DWORD, LPDWORD )
+
+ #include <windows.h>
+-#include <Lmcons.h>
++#include <lmcons.h>
+ #include "alignment.h"
+ ##include "windows_cconv.h"
+
+diff --git a/System/Win32/SimpleMAPI.hsc b/System/Win32/SimpleMAPI.hsc
+index 9727cfc..5ebf06b 100644
+--- a/System/Win32/SimpleMAPI.hsc
++++ b/System/Win32/SimpleMAPI.hsc
+@@ -53,12 +53,6 @@ type MapiFlag = ULONG
+ , mAPI_LOGON_UI = MAPI_LOGON_UI
+ , mAPI_NEW_SESSION = MAPI_NEW_SESSION
+ , mAPI_FORCE_DOWNLOAD = MAPI_FORCE_DOWNLOAD
+-#ifdef MAPI_LOGOFF_SHARED
+- , mAPI_LOGOFF_SHARED = MAPI_LOGOFF_SHARED
+-#endif
+-#ifdef MAPI_LOGOFF_UI
+- , mAPI_LOGOFF_UI = MAPI_LOGOFF_UI
+-#endif
+ , mAPI_DIALOG = MAPI_DIALOG
+ , mAPI_UNREAD_ONLY = MAPI_UNREAD_ONLY
+ , mAPI_LONG_MSGID = MAPI_LONG_MSGID
+@@ -74,6 +68,19 @@ type MapiFlag = ULONG
+ , mAPI_RECEIPT_REQUESTED = MAPI_RECEIPT_REQUESTED
+ , mAPI_SENT = MAPI_SENT
+ }
++-- Have to define enum values outside previous declaration due to
++-- hsc2hs bug in --cross-compile mode:
++-- https://ghc.haskell.org/trac/ghc/ticket/13620
++#ifdef MAPI_LOGOFF_SHARED
++#{enum MapiFlag,
++ , mAPI_LOGOFF_SHARED = MAPI_LOGOFF_SHARED
++}
++#endif
++#ifdef MAPI_LOGOFF_UI
++#{enum MapiFlag,
++ , mAPI_LOGOFF_UI = MAPI_LOGOFF_UI
++}
++#endif
+
+ mapiErrors :: [(ULONG,String)]
+ mapiErrors =
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc1-win32-cross-2-hack.patch b/dev-lang/ghc/files/ghc-8.2.1_rc1-win32-cross-2-hack.patch
new file mode 100644
index 000000000000..6fdcf2d1278f
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.2.1_rc1-win32-cross-2-hack.patch
@@ -0,0 +1,144 @@
+hsc2hs can't detect values at compile-time if those are
+declared as pointers: https://github.com/haskell/win32/issues/88
+
+This patch is a huge hack: we encode absolute vaues from <windows.h>
+diff --git a/Graphics/Win32/GDI/Types.hsc b/Graphics/Win32/GDI/Types.hsc
+index c363530..8643cee 100644
+--- a/Graphics/Win32/GDI/Types.hsc
++++ b/Graphics/Win32/GDI/Types.hsc
+@@ -216,10 +216,10 @@ type HWND = HANDLE
+ type MbHWND = Maybe HWND
+
+ #{enum HWND, castUINTPtrToPtr
+- , hWND_BOTTOM = (UINT_PTR)HWND_BOTTOM
+- , hWND_NOTOPMOST = (UINT_PTR)HWND_NOTOPMOST
+- , hWND_TOP = (UINT_PTR)HWND_TOP
+- , hWND_TOPMOST = (UINT_PTR)HWND_TOPMOST
++ , hWND_BOTTOM = (UINT_PTR)(INT_PTR)(1)
++ , hWND_NOTOPMOST = (UINT_PTR)(INT_PTR)(-2)
++ , hWND_TOP = (UINT_PTR)(INT_PTR)(0)
++ , hWND_TOPMOST = (UINT_PTR)(INT_PTR)(-1)
+ }
+
+ type HMENU = HANDLE
+diff --git a/Graphics/Win32/Misc.hsc b/Graphics/Win32/Misc.hsc
+index 1248b5a..c791a20 100644
+--- a/Graphics/Win32/Misc.hsc
++++ b/Graphics/Win32/Misc.hsc
+@@ -67,23 +67,23 @@ foreign import WINDOWS_CCONV unsafe "windows.h LoadIconW"
+ c_LoadIcon :: HINSTANCE -> Icon -> IO HICON
+
+ #{enum Cursor, castUINTPtrToPtr
+- , iDC_ARROW = (UINT_PTR)IDC_ARROW
+- , iDC_IBEAM = (UINT_PTR)IDC_IBEAM
+- , iDC_WAIT = (UINT_PTR)IDC_WAIT
+- , iDC_CROSS = (UINT_PTR)IDC_CROSS
+- , iDC_UPARROW = (UINT_PTR)IDC_UPARROW
+- , iDC_SIZENWSE = (UINT_PTR)IDC_SIZENWSE
+- , iDC_SIZENESW = (UINT_PTR)IDC_SIZENESW
+- , iDC_SIZEWE = (UINT_PTR)IDC_SIZEWE
+- , iDC_SIZENS = (UINT_PTR)IDC_SIZENS
++ , iDC_ARROW = (UINT_PTR)(32512)
++ , iDC_IBEAM = (UINT_PTR)(32513)
++ , iDC_WAIT = (UINT_PTR)(32514)
++ , iDC_CROSS = (UINT_PTR)(32515)
++ , iDC_UPARROW = (UINT_PTR)(32516)
++ , iDC_SIZENWSE = (UINT_PTR)(32642)
++ , iDC_SIZENESW = (UINT_PTR)(32643)
++ , iDC_SIZEWE = (UINT_PTR)(32644)
++ , iDC_SIZENS = (UINT_PTR)(32645)
+ }
+
+ #{enum Icon, castUINTPtrToPtr
+- , iDI_APPLICATION = (UINT_PTR)IDI_APPLICATION
+- , iDI_HAND = (UINT_PTR)IDI_HAND
+- , iDI_QUESTION = (UINT_PTR)IDI_QUESTION
+- , iDI_EXCLAMATION = (UINT_PTR)IDI_EXCLAMATION
+- , iDI_ASTERISK = (UINT_PTR)IDI_ASTERISK
++ , iDI_APPLICATION = (UINT_PTR)(32512)
++ , iDI_HAND = (UINT_PTR)(32513)
++ , iDI_QUESTION = (UINT_PTR)(32514)
++ , iDI_EXCLAMATION = (UINT_PTR)(32515)
++ , iDI_ASTERISK = (UINT_PTR)(32516)
+ }
+
+ ----------------------------------------------------------------
+diff --git a/Graphics/Win32/Resource.hsc b/Graphics/Win32/Resource.hsc
+index e8ad565..ca58fa2 100644
+--- a/Graphics/Win32/Resource.hsc
++++ b/Graphics/Win32/Resource.hsc
+@@ -61,23 +61,23 @@ foreign import WINDOWS_CCONV unsafe "windows.h EndUpdateResourceW"
+ type ResourceType = LPCTSTR
+
+ #{enum ResourceType, castUINTPtrToPtr
+- , rT_ACCELERATOR = (UINT_PTR)RT_ACCELERATOR // Accelerator table
+- , rT_ANICURSOR = (UINT_PTR)RT_ANICURSOR // Animated cursor
+- , rT_ANIICON = (UINT_PTR)RT_ANIICON // Animated icon
+- , rT_BITMAP = (UINT_PTR)RT_BITMAP // Bitmap resource
+- , rT_CURSOR = (UINT_PTR)RT_CURSOR // Hardware-dependent cursor resource
+- , rT_DIALOG = (UINT_PTR)RT_DIALOG // Dialog box
+- , rT_FONT = (UINT_PTR)RT_FONT // Font resource
+- , rT_FONTDIR = (UINT_PTR)RT_FONTDIR // Font directory resource
+- , rT_GROUP_CURSOR = (UINT_PTR)RT_GROUP_CURSOR // Hardware-independent cursor resource
+- , rT_GROUP_ICON = (UINT_PTR)RT_GROUP_ICON // Hardware-independent icon resource
+- , rT_HTML = (UINT_PTR)RT_HTML // HTML document
+- , rT_ICON = (UINT_PTR)RT_ICON // Hardware-dependent icon resource
+- , rT_MENU = (UINT_PTR)RT_MENU // Menu resource
+- , rT_MESSAGETABLE = (UINT_PTR)RT_MESSAGETABLE // Message-table entry
+- , rT_RCDATA = (UINT_PTR)RT_RCDATA // Application-defined resource (raw data)
+- , rT_STRING = (UINT_PTR)RT_STRING // String-table entry
+- , rT_VERSION = (UINT_PTR)RT_VERSION // Version resource
++ , rT_ACCELERATOR = (UINT_PTR)(9)
++ , rT_ANICURSOR = (UINT_PTR)(21)
++ , rT_ANIICON = (UINT_PTR)(22)
++ , rT_BITMAP = (UINT_PTR)(2)
++ , rT_CURSOR = (UINT_PTR)(1)
++ , rT_DIALOG = (UINT_PTR)(5)
++ , rT_FONT = (UINT_PTR)(8)
++ , rT_FONTDIR = (UINT_PTR)(7)
++ , rT_GROUP_CURSOR = (UINT_PTR)(1 + DIFFERENCE)
++ , rT_GROUP_ICON = (UINT_PTR)(3 + DIFFERENCE)
++ , rT_HTML = (UINT_PTR)(23)
++ , rT_ICON = (UINT_PTR)(3)
++ , rT_MENU = (UINT_PTR)(4)
++ , rT_MESSAGETABLE = (UINT_PTR)(11)
++ , rT_RCDATA = (UINT_PTR)(10)
++ , rT_STRING = (UINT_PTR)(6)
++ , rT_VERSION = (UINT_PTR)(16)
+ }
+
+ findResource :: HMODULE -> String -> ResourceType -> IO HRSRC
+diff --git a/Graphics/Win32/Window/PostMessage.hsc b/Graphics/Win32/Window/PostMessage.hsc
+index 7f4c9f0..609f3f6 100644
+--- a/Graphics/Win32/Window/PostMessage.hsc
++++ b/Graphics/Win32/Window/PostMessage.hsc
+@@ -41,7 +41,7 @@ foreign import WINDOWS_CCONV "windows.h PostThreadMessageW"
+ c_PostThreadMessage :: DWORD -> WindowMessage -> WPARAM -> LPARAM -> IO BOOL
+
+ #{enum HWND, castUINTPtrToPtr
+- , hWND_BROADCAST = (UINT_PTR)HWND_BROADCAST
++ , hWND_BROADCAST = (UINT_PTR)(0xffff)
+ }
+
+ foreign import WINDOWS_CCONV "windows.h InSendMessage"
+diff --git a/System/Win32/Registry.hsc b/System/Win32/Registry.hsc
+index afbb011..c7edfc1 100644
+--- a/System/Win32/Registry.hsc
++++ b/System/Win32/Registry.hsc
+@@ -80,11 +80,11 @@ import System.Win32.Types (castUINTPtrToPtr, failUnlessSuccessOr, maybePtr)
+ #include <windows.h>
+
+ #{enum HKEY, (unsafePerformIO . newForeignHANDLE . castUINTPtrToPtr)
+- , hKEY_CLASSES_ROOT = (UINT_PTR)HKEY_CLASSES_ROOT
+- , hKEY_CURRENT_CONFIG = (UINT_PTR)HKEY_CURRENT_CONFIG
+- , hKEY_CURRENT_USER = (UINT_PTR)HKEY_CURRENT_USER
+- , hKEY_LOCAL_MACHINE = (UINT_PTR)HKEY_LOCAL_MACHINE
+- , hKEY_USERS = (UINT_PTR)HKEY_USERS
++ , hKEY_CLASSES_ROOT = (UINT_PTR)(0x80000000)
++ , hKEY_CURRENT_CONFIG = (UINT_PTR)(0x80000005)
++ , hKEY_CURRENT_USER = (UINT_PTR)(0x80000001)
++ , hKEY_LOCAL_MACHINE = (UINT_PTR)(0x80000002)
++ , hKEY_USERS = (UINT_PTR)(0x80000003)
+ }
+ -- , PKEYERFORMANCE_DATA NT only
+ -- , HKEY_DYN_DATA 95/98 only
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc2-O2-unreg.patch b/dev-lang/ghc/files/ghc-8.2.1_rc2-O2-unreg.patch
new file mode 100644
index 000000000000..00f9ca4fdff9
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.2.1_rc2-O2-unreg.patch
@@ -0,0 +1,35 @@
+ghc -O2 generates too large C files for unregisterised compiler.
+On ia64 it causes DynFlags to compile for 60 minutes (then assembler
+crashes).
+
+To decrease C code inflation we don't use -O2 in UNREG mode.
+diff --git a/mk/config.mk.in b/mk/config.mk.in
+index 4e61eea..15a56e9 100644
+--- a/mk/config.mk.in
++++ b/mk/config.mk.in
+@@ -72,11 +72,2 @@ GhcStage3HcOpts=-O2
+
+-# Disable -O2 optimization. Otherwise amount of generated C code
+-# makes things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.hs')
+-# and sometimes not compile at all (powerpc64 overflows something
+-# on 'compiler/hsSyn/HsExpr.hs').
+-ifeq "$(GhcUnregisterised)" "YES"
+-GhcStage1HcOpts=
+-GhcStage2HcOpts=
+-GhcStage3HcOpts=
+-endif
+
+@@ -904 +895,13 @@ CURSES_INCLUDE_DIRS = @CURSES_INCLUDE_DIRS@
+ CURSES_LIB_DIRS = @CURSES_LIB_DIRS@
++
++# Disable -O2 optimization. Otherwise amount of generated C code
++# makes things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.hs')
++# and sometimes not compile at all (powerpc64 overflows something
++# on 'compiler/hsSyn/HsExpr.hs').
++ifeq "$(GhcUnregisterised)" "YES"
++GhcStage1HcOpts=
++GhcStage2HcOpts=
++GhcStage3HcOpts=
++
++GhcLibHcOpts=
++endif
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc3-any-vendor.patch b/dev-lang/ghc/files/ghc-8.2.1_rc3-any-vendor.patch
new file mode 100644
index 000000000000..b55e37a8bf94
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.2.1_rc3-any-vendor.patch
@@ -0,0 +1,44 @@
+From c2303dff95aa174021a1950656fdf9a1cf983959 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sat, 8 Jul 2017 09:47:12 +0100
+Subject: [PATCH] aclocal.m4: allow arbitrary <vendor> string in toolchain
+ triplets
+
+Canonical triplets have a form of
+ <arch>-<vendor>-<os>[-<abi>]
+
+Checking for vendor is almost never correct as it's an
+arbitrary string.
+
+It's useful to have multiple "vendors" to denote
+otherwise the same (WRT <arch>, <os>, <abi>) target:
+ --target=x86_64-pc-linux-gnu
+ --target=x86_64-unknown-linux-gnu
+ --target=x86_64-ghc80-linux-gnu
+ --target=x86_64-ghchead-linux-gnu
+
+Do not fail unknown vendors. Only emit a warning.
+Ideally configure checks should never use "vendor".
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ aclocal.m4 | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 001f813dfc..1d9c09b0cd 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -230,8 +230,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS],
+ dec|none|unknown|hp|apple|next|sun|sgi|ibm|montavista|portbld)
+ ;;
+ *)
+- echo "Unknown vendor [$]1"
+- exit 1
++ AC_MSG_WARN([Unknown vendor [$]1])
+ ;;
+ esac
+ }
+--
+2.13.3
+
diff --git a/dev-lang/ghc/files/ghc-8.2.1_rc3-stginit-data.patch b/dev-lang/ghc/files/ghc-8.2.1_rc3-stginit-data.patch
new file mode 100644
index 000000000000..81e751d778c8
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.2.1_rc3-stginit-data.patch
@@ -0,0 +1,27 @@
+Fix label type for __stginit_* labels: those are .data labels, not .text
+
+Noticed when was building --enable-unregisterised build for x86_64:
+
+/tmp/ghc22931_0/ghc_3.hc:5:9: error:
+ error: '__stginit_ghczmprim_GHCziTypes' redeclared as different kind of symbol
+ StgWord __stginit_ghczmprim_GHCziTypes[]__attribute__((aligned(8)))= {
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ |
+5 | StgWord __stginit_ghczmprim_GHCziTypes[]__attribute__((aligned(8)))= {
+ | ^
+
+In file included from /tmp/ghc22931_0/ghc_3.hc:3:0: error:
+
+/tmp/ghc22931_0/ghc_3.hc:4:5: error:
+ note: previous declaration of '__stginit_ghczmprim_GHCziTypes' was here
+ EF_(__stginit_ghczmprim_GHCziTypes);
+ ^
+diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
+index 77a889a..05d71ab 100644
+--- a/compiler/cmm/CLabel.hs
++++ b/compiler/cmm/CLabel.hs
+@@ -956,3 +956,3 @@ labelType (CaseLabel _ CaseReturnInfo) = DataLabel
+ labelType (CaseLabel _ _) = CodeLabel
+-labelType (PlainModuleInitLabel _) = CodeLabel
++labelType (PlainModuleInitLabel _) = DataLabel
+ labelType (SRTLabel _) = DataLabel
diff --git a/dev-lang/ghc/files/ghc-bash-completion b/dev-lang/ghc/files/ghc-bash-completion
new file mode 100644
index 000000000000..0ee2149cd81b
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-bash-completion
@@ -0,0 +1,218 @@
+# ghc-pkg command line completion for bash
+#
+# Copyright 2006-2007 Lennart Kolmodin <kolmodin@dtek.chalmers.se>
+
+_ghc-pkg-get-ghc-pkg()
+{
+ echo ghc-pkg
+}
+
+_ghc-pkg-pkg-fields()
+{
+ # usage: _ghc-pkg-pkg-fields pkg-id
+ #
+ # list all fields of the pkg-id
+
+ # same fields for all packages but different in different versions of
+ # ghc-pkg? this can probably be done better/faster
+
+ if [[ -z "$1" ]]; then
+ echo "usage: _ghc-pkg-pkg-fields pkg-id"
+ return 1
+ fi
+
+ local fields
+
+ fields="$( $(_ghc-pkg-get-ghc-pkg) describe $1 )"
+
+ #if [[ fields != *"cannot find package"* ]]; then
+ echo "$fields" | grep ".*:.*" | sed "s/^\(.*\):.*\$/\1/"
+ #fi
+}
+
+_ghc-pkg-pkg-ids()
+{
+ # usage: _ghc-pkg-pkg-ids
+ #
+ # simply lists all package ids known by ghc-pkg.
+ $(_ghc-pkg-get-ghc-pkg) list --simple-output
+}
+
+_ghc-pkg-pkgs()
+{
+ # usage: _ghc-pkg-pkgs [include-pkgs] [include-ids]
+ #
+ # with optional parameter include-pkgs it will list all packages known
+ # to ghc-pkg.
+ # with optional parameter include-ids it will list all package-ids known
+ # to ghc-pkg.
+ local pkgs
+ local result
+ pkgs=( $( _ghc-pkg-pkg-ids ) )
+ result=( )
+
+ local withPkgs="no" withIds="no"
+ while [[ -n "$1" ]]; do
+ case "$1" in
+ include-pkgs)
+ withPkgs="yes" ;;
+ include-ids)
+ withIds="yes" ;;
+ *)
+ echo "unknown parameter '$1' to _ghc-pkg-pkgs"
+ return 1 ;;
+ esac
+ shift
+ done
+
+ # user must supply either include-pkgs, include-ids or both
+ if [[ $withPkgs != "yes" && $withIds != "yes" ]]; then
+ echo "usage: _ghc-pkg-pkgs [include-pkgs] [include-ids]"
+ return 1
+ fi
+
+ # find all packages if the user requested them
+ if [[ $withPkgs == "yes" ]]; then
+ # O(n^2) algorithm to exclude duplicates
+ for p in ${pkgs[*]}; do
+ p="${p//-[0-9.]*/}"
+ for existing in ${result[*]}; do
+ if [[ "$existing" == "$p" ]]; then
+ continue 2
+ fi
+ done
+ result=( "${result[@]}" "${p}" )
+ done
+ fi
+
+ # include all pkg-ids if requested
+ if [[ $withIds == "yes" ]]; then
+ result=( "${result[@]}" "${pkgs[@]}" )
+ fi
+
+ # we are finished, echo the result
+ echo "${result[*]}"
+
+ # happy ending
+ return 0
+}
+
+_ghc-pkg()
+{
+ local cur
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ COMPREPLY=()
+
+ local actions flags
+ actions='register update unregister expose hide list latest describe field'
+ dbflags="--user \
+ --global \
+ -f --package-conf= \
+ --global-conf="
+ registerflags="--force \
+ -g --auto-ghci-libs \
+ -D --define-name="
+ listflags="--simple-output"
+ flags="$dbflags \
+ $registerflags \
+ $listflags \
+ -? --help \
+ -V --version"
+
+ # if it's the users first word; complete it and return
+ if (($COMP_CWORD == 1)); then
+ COMPREPLY=( $( compgen -W "$actions $flags" -- $cur ) )
+ return 0
+ fi
+
+ # now we know we have at least one word written
+
+ local action="unknown" \
+ prev numwords \
+ cword act
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ numwords=${#COMP_WORDS[@]}
+
+ # find the action with O(n*m) algorithm
+ # where n = ${#COMP_WORDS[*]}
+ # m = number of actions
+ for cword in ${COMP_WORDS[*]}; do
+ for act in $actions; do
+ if [[ "$cword" == "$act" ]]; then
+ action=$cword
+ fi
+ done
+ done
+
+ case $action in
+ register|update)
+ # we want to complete both flags and paths, how?
+ # we do it by checking if the user has started to write a flag
+ # or a path, and then decide what to complete.
+ # that is, to complete a flag, the user must start to write a '-'
+ if [[ "$cur" == -* ]]; then
+ # (we assume) it's the start of a flag
+ # set COMPREPLY to flags relevant to these actions
+ COMPREPLY=( $( compgen -W "$dbflags $registerflags" -- $cur ) )
+ fi
+ ;;
+ unregister|expose|hide|list|describe)
+ # all these actions can be completed with exactly one argument,
+ # a pkg-id.
+ COMPREPLY=( $( compgen -W "$dbflags" -- $cur ) )
+
+ # add special flags for some actions
+ if [[ "$action" == "list" ]]; then
+ COMPREPLY+=( $( compgen -W "$listflags" -- $cur ) )
+ fi
+
+ COMPREPLY+=( $( compgen -W "$( _ghc-pkg-pkgs include-ids )" -- $cur ) )
+ ;;
+ latest)
+ # complete only packages, not package ids
+ COMPREPLY=( $( compgen -W "$( _ghc-pkg-pkgs include-pkgs )" -- $cur ) )
+ ;;
+ field)
+ # we should always complete on the flags...
+ COMPREPLY=( $( compgen -W "$dbflags" -- $cur ) )
+
+ # then, we should either complete the package name or the field
+ # lets find out which one
+
+ # find the number of words in COMP_WORDS before COMP_CWORD that
+ # isn't flags. it should be 2 or 3 for us to complete it,
+ # exactly 2 if we should complete the package name
+ # exactly 3 if we should complete the field name
+ # otherwise, don't do any additional completion except the
+ # flags
+
+ # count the number of non flags up till the current word
+ local numnonflags=0 lastword i
+ for (( i=0 ; $i < $COMP_CWORD ; i++ )); do
+ if [[ ${COMP_WORDS[$i]} != -* ]]; then
+ lastword=${COMP_WORDS[$i]}
+ numnonflags=$(( ++numnonflags ))
+ fi
+ done
+
+ case $numnonflags in
+ 2)
+ # complete on pkg-ids
+ COMPREPLY+=( $( compgen -W "$( _ghc-pkg-pkgs include-ids )" -- $cur ) ) ;;
+ 3)
+ # complete on fields
+ COMPREPLY+=( $( compgen -W "$( _ghc-pkg-pkg-fields $lastword )" -- $cur ) ) ;;
+ esac
+ ;;
+ *)
+ # unknown action, not yet given by the user
+ # return all possible completions
+ COMPREPLY=( $( compgen -W "$actions $flags" -- $cur ) )
+ ;;
+ esac
+}
+
+complete -F _ghc-pkg -o default ghc-pkg
+
+# vim: set ft=sh tw=80 sw=4 et :
diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild
new file mode 100644
index 000000000000..4afb2420ef3e
--- /dev/null
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -0,0 +1,686 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+#
+# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib pax-utils toolchain-funcs versionator prefix
+
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+# sorted!
+arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PVR}-amd64.tbz2 )"
+arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
+arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
+arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PVR}-x86.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+ case "${ARCH}" in
+ alpha) return 0 ;;
+ #arm)
+ # ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
+ # return 0
+ #;;
+ amd64) return 0 ;;
+ ia64) return 0 ;;
+ ppc) return 0 ;;
+ ppc64) return 0 ;;
+ sparc) return 0 ;;
+ x86) return 0 ;;
+ *) return 1 ;;
+ esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=7.10.2.20151030 # uncomment only for -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+ # "hackage-name hackage-version"
+ "binary 0.7.6.1"
+ "hoopl 3.10.2.0"
+ "transformers 0.4.3.0"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~alpha amd64 ~ia64 ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
+IUSE="doc ghcbootstrap ghcmakebinary +gmp"
+IUSE+=" binary"
+IUSE+=" elibc_glibc" # system stuff
+
+RDEPEND="
+ >=dev-lang/perl-5.6.1
+ >=dev-libs/gmp-5:=
+ sys-libs/ncurses:0=[unicode]
+ !ghcmakebinary? ( virtual/libffi:= )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+ !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+ sys-libs/ncurses:5/5
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ >=dev-libs/libxslt-1.1.2 )
+ !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+# returns tool prefix for crosscompiler.
+# Example:
+# CTARGET=armv7a-unknown-linux-gnueabi
+# CHOST=x86_64-pc-linux-gnu
+# "armv7a-unknown-linux-gnueabi-"
+# CTARGET=${CHOST}
+# ""
+# Used in tools and library prefix:
+# "${ED}"/usr/bin/$(cross)haddock
+# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+ if is_crosscompile; then
+ echo "${CTARGET}-"
+ else
+ echo ""
+ fi
+}
+
+append-ghc-cflags() {
+ local persistent compile assemble link
+ local flag ghcflag
+
+ for flag in $*; do
+ case ${flag} in
+ persistent) persistent="yes";;
+ compile) compile="yes";;
+ assemble) assemble="yes";;
+ link) link="yes";;
+ *)
+ [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ ;;
+ esac
+ done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+ local pn=$1 pv=$2
+ local p=${pn}-${pv}
+ local f
+
+ einfo "Bumping ${pn} up to ${pv}"
+
+ for f in ghc.mk GNUmakefile; do
+ mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+ done
+ mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+ mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+ local p pn pv
+ for p in "${BUMP_LIBRARIES[@]}"; do
+ set -- $p
+ pn=$1 pv=$2
+
+ SRC_URI+=" mirror://hackage/package/${pn}/${pn}-${pv}.tar.gz"
+ done
+}
+
+update_SRC_URI
+
+bump_libs() {
+ local p pn pv
+ for p in "${BUMP_LIBRARIES[@]}"; do
+ set -- $p
+ pn=$1 pv=$2
+
+ bump_lib "${pn}" "${pv}"
+ done
+}
+
+ghc_setup_cflags() {
+ if is_crosscompile; then
+ export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+ export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+ einfo "Crosscompiling mode:"
+ einfo " CHOST: ${CHOST}"
+ einfo " CTARGET: ${CTARGET}"
+ einfo " CFLAGS: ${CFLAGS}"
+ einfo " LDFLAGS: ${LDFLAGS}"
+ einfo " prefix: $(cross)"
+ return
+ fi
+ # We need to be very careful with the CFLAGS we ask ghc to pass through to
+ # gcc. There are plenty of flags which will make gcc produce output that
+ # breaks ghc in various ways. The main ones we want to pass through are
+ # -mcpu / -march flags. These are important for arches like alpha & sparc.
+ # We also use these CFLAGS for building the C parts of ghc, ie the rts.
+ strip-flags
+ strip-unsupported-flags
+
+ # Cmm can't parse line numbers #482086
+ replace-flags -ggdb[3-9] -ggdb2
+
+ GHC_FLAGS=""
+ GHC_PERSISTENT_FLAGS=""
+ for flag in ${CFLAGS}; do
+ case ${flag} in
+
+ # Ignore extra optimisation (ghc passes -O to gcc anyway)
+ # -O2 and above break on too many systems
+ -O*) ;;
+
+ # Arch and ABI flags are what we're really after
+ -m*) append-ghc-cflags compile assemble ${flag};;
+
+ # Sometimes it's handy to see backtrace of RTS
+ # to get an idea what happens there
+ -g*) append-ghc-cflags compile ${flag};;
+
+ # Ignore all other flags, including all -f* flags
+ esac
+ done
+
+ for flag in ${LDFLAGS}; do
+ append-ghc-cflags link ${flag}
+ done
+
+ # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
+ # are not built with fPIC, bug #606666
+ gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+ tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
+ # gcc-6.3 has support for -no-pie upstream, but spelling differs from
+ # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
+ # hardened users try '-pie' in USE=ghcbootstrap mode.
+ append-ghc-cflags compile link -no-pie
+ fi
+ gcc-specs-ssp && append-ghc-cflags persistent compile -fno-stack-protector
+
+ # prevent from failind building unregisterised ghc:
+ # http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+ use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+ # fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
+ # currently ghc fails to build haddock
+ # http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
+ use ia64 && append-ghc-cflags persistent compile -G0
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+ local from=$1
+ local to=$2
+ shift 2
+ local file=
+ for file in "$@"
+ do
+ sed -i -e "s|$from|$to|g" \
+ "$file" || die "path relocation failed for '$file'"
+ done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+ local to=$1
+
+ # libdir for prebuilt binary and for current system may mismatch
+ # It does for prefix installation for example: bug #476998
+ local bin_ghc_prefix=${WORKDIR}/usr
+ local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+ local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+ # backup original script to use it later after relocation
+ local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
+ cp "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+ if [[ ${bin_libdir} != $(get_libdir) ]]; then
+ einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+ # moving the dir itself is not strictly needed
+ # but then USE=binary would result in installing
+ # in '${bin_libdir}'
+ mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+ relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)hsc2hs" \
+ "${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
+ fi
+
+ # Relocate from /usr to ${EPREFIX}/usr
+ relocate_path "/usr" "${to}/usr" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)hsc2hs" \
+ "${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
+ "${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
+
+ # this one we will use to regenerate cache
+ # so it should point to current tree location
+ relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+ if use prefix; then
+ # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
+ # TODO: add the same for darwin's CHOST and it's DYLD_
+ local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
+ sed -i -e '2i'"$new_ldpath" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)hsc2hs" \
+ "${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
+ "$gp_back" \
+ || die "Adding LD_LIBRARY_PATH for wrappers failed"
+ hprefixify "${bin_libpath}"/${PN}*/settings
+ fi
+
+ # regenerate the binary package cache
+ "$gp_back" recache || die "failed to update cache after relocation"
+ rm "$gp_back"
+}
+
+pkg_setup() {
+ # quiet portage about prebuilt binaries
+ use binary && QA_PREBUILT="*"
+
+ [[ ${MERGE_TYPE} == binary ]] && return
+
+ if use ghcbootstrap; then
+ ewarn "You requested ghc bootstrapping, this is usually only used"
+ ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+ [[ -z $(type -P ghc) ]] && \
+ die "Could not find a ghc to bootstrap with."
+ else
+ if ! yet_binary; then
+ eerror "Please try emerging with USE=ghcbootstrap and report build"
+ eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+ die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+ fi
+ fi
+}
+
+src_unpack() {
+ # Create the ${S} dir if we're using the binary version
+ use binary && mkdir "${S}"
+
+ # the Solaris and Darwin binaries from ghc (maeder) need to be
+ # unpacked separately, so prevent them from being unpacked
+ local ONLYA=${A}
+ case ${CHOST} in
+ *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.bz2 ;;
+ esac
+ unpack ${ONLYA}
+
+ if [[ -d "${S}"/libraries/dph ]]; then
+ # Sometimes dph libs get accidentally shipped with ghc
+ # but they are not installed unless user requests it.
+ # We never install them.
+ elog "Removing 'libraries/dph'"
+ rm -rf "${S}"/libraries/dph
+ fi
+}
+
+src_prepare() {
+ ghc_setup_cflags
+
+ if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+ # Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+ # See bug #313635.
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}"
+
+ # allow hardened users use vanilla binary to bootstrap ghc
+ # ghci uses mmap with rwx protection at it implements dynamic
+ # linking on it's own (bug #299709)
+ pax-mark -m "${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/bin/ghc"
+ fi
+
+ if use binary; then
+ if use prefix; then
+ relocate_ghc "${EPREFIX}"
+ fi
+
+ # Move unpacked files to the expected place
+ mv "${WORKDIR}/usr" "${S}"
+ else
+ if ! use ghcbootstrap; then
+ case ${CHOST} in
+ *-darwin* | *-solaris*)
+ # UPDATE ME for ghc-7
+ mkdir "${WORKDIR}"/ghc-bin-installer || die
+ pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+ use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+ use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+ use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+ use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+ popd > /dev/null
+
+ pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+ # fix the binaries so they run, on Solaris we need an
+ # LD_LIBRARY_PATH which has our prefix libdirs, on
+ # Darwin we need to replace the frameworks with our libs
+ # from the prefix fix before installation, because some
+ # of the tools are actually used during configure/make
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+ elif [[ ${CHOST} == *-darwin* ]] ; then
+ local readline_framework=GNUreadline.framework/GNUreadline
+ local gmp_framework=/opt/local/lib/libgmp.10.dylib
+ local ncurses_file=/opt/local/lib/libncurses.5.dylib
+ for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+ install_name_tool -change \
+ ${readline_framework} \
+ "${EPREFIX}"/lib/libreadline.dylib \
+ ${binary} || die
+ install_name_tool -change \
+ ${gmp_framework} \
+ "${EPREFIX}"/usr/lib/libgmp.dylib \
+ ${binary} || die
+ install_name_tool -change \
+ ${ncurses_file} \
+ "${EPREFIX}"/usr/lib/libncurses.dylib \
+ ${binary} || die
+ done
+ # we don't do frameworks!
+ sed -i \
+ -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+ -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+ rts/package.conf.in || die
+ fi
+
+ # it is autoconf, but we really don't want to give it too
+ # much arguments, in fact we do the make in-place anyway
+ ./configure --prefix="${WORKDIR}"/usr || die
+ make install || die
+ popd > /dev/null
+ ;;
+ *)
+ relocate_ghc "${WORKDIR}"
+ ;;
+ esac
+ fi
+
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+ "${S}/ghc/ghc.wrapper"
+
+ cd "${S}" # otherwise epatch will break
+
+ epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+
+ epatch "${FILESDIR}"/${PN}-7.8.2-cgen-constify.patch
+ epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+ epatch "${FILESDIR}"/${PN}-7.10.1-rc3-ghc-7.10-bootstrap.patch
+ epatch "${FILESDIR}"/${PN}-7.10.3-relnotes.patch
+ epatch "${FILESDIR}"/${PN}-7.10.3-hardfloat.patch
+
+ # Since ${S}/packages does not include base, etc. add them to gen_contents_index
+ sed -e 's@\(for REPO in .*\)@\1 base integer-gmp integer-gmp2 integer-simple template-haskell@' \
+ -i libraries/gen_contents_index || die
+
+ if use prefix; then
+ # Make configure find docbook-xsl-stylesheets from Prefix
+ sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
+ -i utils/haddock/doc/configure.ac || die
+ fi
+
+ bump_libs
+
+ # as we have changed the build system
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ if ! use binary; then
+ # initialize build.mk
+ echo '# Gentoo changes' > mk/build.mk
+
+ # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+ echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
+ echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
+
+ # We also need to use the GHC_FLAGS flags when building ghc itself
+ echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+ echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+ echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+
+ # We can't depend on haddock except when bootstrapping when we
+ # must build docs and include them into the binary .tbz2 package
+ # app-text/dblatex is not in portage, can not build PDF or PS
+ echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
+ echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
+ if use doc; then
+ echo "BUILD_DOCBOOK_HTML = YES" >> mk/build.mk
+ else
+ echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
+ fi
+
+ # this controls presence on 'xhtml' and 'haddock' in final install
+ echo "HADDOCK_DOCS = YES" >> mk/build.mk
+
+ # allows overriding build flavours for libraries:
+ # v - vanilla (static libs)
+ # p - profiled
+ # dyn - shared libraries
+ # example: GHC_LIBRARY_WAYS="v dyn"
+ if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+ echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+ fi
+
+ # Get ghc from the unpacked binary .tbz2
+ # except when bootstrapping we just pick ghc up off the path
+ if ! use ghcbootstrap; then
+ export PATH="${WORKDIR}/usr/bin:${PATH}"
+ fi
+
+ if use gmp; then
+ echo "INTEGER_LIBRARY=integer-gmp2" >> mk/build.mk
+ else
+ echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
+ fi
+
+ # don't strip anything. Very useful when stage2 SIGSEGVs on you
+ echo "STRIP_CMD = :" >> mk/build.mk
+
+ local econf_args=()
+
+ # GHC embeds 'gcc' it was built by and uses it later.
+ # Don't allow things like ccache or versioned binary slip.
+ # We use stable thing across gcc upgrades.
+ is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
+
+ if use ghcmakebinary; then
+ # When building booting libary we are trying to
+ # bundle or restrict most of external depends
+ # with unstable ABI:
+ # - embed libffi (default GHC behaviour)
+ # - disable ncurses support for ghci (via haskeline)
+ # https://bugs.gentoo.org/557478
+ # - disable ncurses support for ghc-pkg
+ echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+ echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+ else
+ econf_args+=(--with-system-libffi)
+ econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+ fi
+
+ elog "Final mk/build.mk:"
+ cat mk/build.mk || die
+
+ econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
+
+ if [[ ${PV} == *9999* ]]; then
+ GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+ GHC_P=${PN}-${GHC_PV}
+ fi
+ fi # ! use binary
+}
+
+src_compile() {
+ if ! use binary; then
+ # 1. build compiler binary first
+ emake ghc/stage2/build/tmp/ghc-stage2
+ # 2. pax-mark (bug #516430)
+ pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+ # 3. and then all the rest
+ emake all
+ fi # ! use binary
+}
+
+src_install() {
+ if use binary; then
+ use prefix && mkdir -p "${ED}"
+ mv "${S}/usr" "${ED}"
+ else
+
+ emake -j1 install DESTDIR="${D}"
+ dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
+
+ # rename ghc-shipped files to avoid collision
+ # of external packages. Motivating example:
+ # user had installed:
+ # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+ # dev-haskell/transformers-0.4.2.0
+ # then user tried to update to
+ # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+ # this will lead to single .conf file collision.
+ local shipped_conf renamed_conf
+ local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+ for shipped_conf in "${package_confdir}"/*.conf; do
+ # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+ renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+ mv "${shipped_conf}" "${renamed_conf}" || die
+ done
+
+ # remove link, but leave 'haddock-${GHC_P}'
+ rm -f "${ED}"/usr/bin/$(cross)haddock
+
+ if [[ ! -f "${S}/VERSION" ]]; then
+ echo "${GHC_PV}" > "${S}/VERSION" \
+ || die "Could not create file ${S}/VERSION"
+ fi
+ if ! is_crosscompile; then
+ newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+ newbashcomp utils/completion/ghc.bash ghc
+ fi
+ fi
+
+ # path to the package.cache
+ local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+ PKGCACHE="${package_confdir}"/package.cache
+ # copy the package.conf.d, including timestamp, save it so we can help
+ # users that have a broken package.conf.d
+ cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+ # copy the package.conf, including timestamp, save it so we later can put it
+ # back before uninstalling, or when upgrading.
+ cp -p "${PKGCACHE}"{,.shipped} \
+ || die "failed to copy package.conf.d/package.cache"
+}
+
+pkg_preinst() {
+ # have we got an earlier version of ghc installed?
+ if has_version "<${CATEGORY}/${PF}"; then
+ haskell_updater_warn="1"
+ fi
+}
+
+pkg_postinst() {
+ ghc-reregister
+
+ # path to the package.cache
+ PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+ # give the cache a new timestamp, it must be as recent as
+ # the package.conf.d directory.
+ touch "${PKGCACHE}"
+
+ if [[ "${haskell_updater_warn}" == "1" ]]; then
+ ewarn
+ ewarn "\e[1;31m************************************************************************\e[0m"
+ ewarn
+ ewarn "You have just upgraded from an older version of GHC."
+ ewarn "You may have to run"
+ ewarn " 'haskell-updater'"
+ ewarn "to rebuild all ghc-based Haskell libraries."
+ ewarn
+ ewarn "\e[1;31m************************************************************************\e[0m"
+ ewarn
+ fi
+}
+
+pkg_prerm() {
+ PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+ rm -rf "${PKGCACHE}"
+
+ cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+ ghc-package_pkg_postrm
+}
diff --git a/dev-lang/ghc/ghc-7.8.4.ebuild b/dev-lang/ghc/ghc-7.8.4.ebuild
new file mode 100644
index 000000000000..16a49986a1cb
--- /dev/null
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -0,0 +1,616 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+#
+# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib pax-utils toolchain-funcs versionator
+
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+# sorted!
+arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
+arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
+arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
+arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+ case "${ARCH}" in
+ alpha) return 0 ;;
+ #arm)
+ # ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
+ # return 0
+ #;;
+ amd64) return 0 ;;
+ ia64) return 0 ;;
+ ppc) return 0 ;;
+ ppc64) return 0 ;;
+ sparc) return 0 ;;
+ x86) return 0 ;;
+ *) return 1 ;;
+ esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=7.8.3.20141119 # uncomment only for -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/${P}-ia64-CLOSUREs-regenerated.patch.gz"
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
+IUSE="doc ghcbootstrap ghcmakebinary +gmp"
+IUSE+=" binary"
+IUSE+=" elibc_glibc" # system stuff
+
+RDEPEND="
+ >=dev-lang/perl-5.6.1
+ >=dev-libs/gmp-5:=
+ sys-libs/ncurses:0=[unicode]
+ !ghcmakebinary? ( virtual/libffi:= )
+"
+
+PREBUILT_BINARY_DEPENDS="
+ !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+ sys-libs/ncurses:5/5
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+DEPEND="${RDEPEND}
+ ghcbootstrap? (
+ doc? ( app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ >=dev-libs/libxslt-1.1.2 ) )
+ !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+append-ghc-cflags() {
+ local persistent compile assemble link
+ local flag ghcflag
+
+ for flag in $*; do
+ case ${flag} in
+ persistent) persistent="yes";;
+ compile) compile="yes";;
+ assemble) assemble="yes";;
+ link) link="yes";;
+ *)
+ [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ ;;
+ esac
+ done
+}
+
+ghc_setup_cflags() {
+ if is_crosscompile; then
+ export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+ export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+ einfo "Crosscompiling mode:"
+ einfo " CHOST: ${CHOST}"
+ einfo " CTARGET: ${CTARGET}"
+ einfo " CFLAGS: ${CFLAGS}"
+ einfo " LDFLAGS: ${LDFLAGS}"
+ return
+ fi
+ # We need to be very careful with the CFLAGS we ask ghc to pass through to
+ # gcc. There are plenty of flags which will make gcc produce output that
+ # breaks ghc in various ways. The main ones we want to pass through are
+ # -mcpu / -march flags. These are important for arches like alpha & sparc.
+ # We also use these CFLAGS for building the C parts of ghc, ie the rts.
+ strip-flags
+ strip-unsupported-flags
+
+ # Cmm can't parse line numbers #482086
+ replace-flags -ggdb[3-9] -ggdb2
+
+ GHC_FLAGS=""
+ GHC_PERSISTENT_FLAGS=""
+ for flag in ${CFLAGS}; do
+ case ${flag} in
+
+ # Ignore extra optimisation (ghc passes -O to gcc anyway)
+ # -O2 and above break on too many systems
+ -O*) ;;
+
+ # Arch and ABI flags are what we're really after
+ -m*) append-ghc-cflags compile assemble ${flag};;
+
+ # Sometimes it's handy to see backtrace of RTS
+ # to get an idea what happens there
+ -g*) append-ghc-cflags compile ${flag};;
+
+ # Ignore all other flags, including all -f* flags
+ esac
+ done
+
+ for flag in ${LDFLAGS}; do
+ append-ghc-cflags link ${flag}
+ done
+
+ # hardened-gcc needs to be disabled, because the mangler doesn't accept
+ # its output.
+ gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+ gcc-specs-ssp && append-ghc-cflags persistent compile -fno-stack-protector
+
+ # prevent from failind building unregisterised ghc:
+ # http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+ use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+ # fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
+ # currently ghc fails to build haddock
+ # http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
+ use ia64 && append-ghc-cflags persistent compile -G0
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+ local from=$1
+ local to=$2
+ shift 2
+ local file=
+ for file in "$@"
+ do
+ sed -i -e "s|$from|$to|g" \
+ "$file" || die "path relocation failed for '$file'"
+ done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+ local to=$1
+
+ # libdir for prebuilt binary and for current system may mismatch
+ # It does for prefix installation for example: bug #476998
+ local bin_ghc_prefix=${WORKDIR}/usr
+ local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+ local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+ # backup original script to use it later after relocation
+ local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
+ cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+ if [[ ${bin_libdir} != $(get_libdir) ]]; then
+ einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+ # moving the dir itself is not strictly needed
+ # but then USE=binary would result in installing
+ # in '${bin_libdir}'
+ mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+ relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+ fi
+
+ # Relocate from /usr to ${EPREFIX}/usr
+ relocate_path "/usr" "${to}/usr" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+
+ # this one we will use to regenerate cache
+ # so it should point to current tree location
+ relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+ if use prefix; then
+ # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
+ # TODO: add the same for darwin's CHOST and it's DYLD_
+ local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
+ sed -i -e '2i'"$new_ldpath" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ || die "Adding LD_LIBRARY_PATH for wrappers failed"
+ fi
+
+ # regenerate the binary package cache
+ "$gp_back" recache || die "failed to update cache after relocation"
+ rm "$gp_back"
+}
+
+pkg_setup() {
+ # quiet portage about prebuilt binaries
+ use binary && QA_PREBUILT="*"
+
+ [[ ${MERGE_TYPE} == binary ]] && return
+
+ if use ghcbootstrap; then
+ ewarn "You requested ghc bootstrapping, this is usually only used"
+ ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+ [[ -z $(type -P ghc) ]] && \
+ die "Could not find a ghc to bootstrap with."
+ else
+ if ! yet_binary; then
+ eerror "Please try emerging with USE=ghcbootstrap and report build"
+ eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+ die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+ fi
+ fi
+}
+
+src_unpack() {
+ # Create the ${S} dir if we're using the binary version
+ use binary && mkdir "${S}"
+
+ # the Solaris and Darwin binaries from ghc (maeder) need to be
+ # unpacked separately, so prevent them from being unpacked
+ local ONLYA=${A}
+ case ${CHOST} in
+ *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.bz2 ;;
+ esac
+ unpack ${ONLYA}
+
+ if [[ -d "${S}"/libraries/dph ]]; then
+ # Sometimes dph libs get accidentally shipped with ghc
+ # but they are not installed unless user requests it.
+ # We never install them.
+ elog "Removing 'libraries/dph'"
+ rm -rf "${S}"/libraries/dph
+ fi
+}
+
+src_prepare() {
+ ghc_setup_cflags
+
+ if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+ # Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+ # See bug #313635.
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}"
+
+ # allow hardened users use vanilla binary to bootstrap ghc
+ # ghci uses mmap with rwx protection at it implements dynamic
+ # linking on it's own (bug #299709)
+ pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
+ fi
+
+ if use binary; then
+ if use prefix; then
+ relocate_ghc "${EPREFIX}"
+ fi
+
+ # Move unpacked files to the expected place
+ mv "${WORKDIR}/usr" "${S}"
+ else
+ if ! use ghcbootstrap; then
+ case ${CHOST} in
+ *-darwin* | *-solaris*)
+ # UPDATE ME for ghc-7
+ mkdir "${WORKDIR}"/ghc-bin-installer || die
+ pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+ use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+ use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+ use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+ use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+ popd > /dev/null
+
+ pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+ # fix the binaries so they run, on Solaris we need an
+ # LD_LIBRARY_PATH which has our prefix libdirs, on
+ # Darwin we need to replace the frameworks with our libs
+ # from the prefix fix before installation, because some
+ # of the tools are actually used during configure/make
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+ elif [[ ${CHOST} == *-darwin* ]] ; then
+ local readline_framework=GNUreadline.framework/GNUreadline
+ local gmp_framework=/opt/local/lib/libgmp.10.dylib
+ local ncurses_file=/opt/local/lib/libncurses.5.dylib
+ for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+ install_name_tool -change \
+ ${readline_framework} \
+ "${EPREFIX}"/lib/libreadline.dylib \
+ ${binary} || die
+ install_name_tool -change \
+ ${gmp_framework} \
+ "${EPREFIX}"/usr/lib/libgmp.dylib \
+ ${binary} || die
+ install_name_tool -change \
+ ${ncurses_file} \
+ "${EPREFIX}"/usr/lib/libncurses.dylib \
+ ${binary} || die
+ done
+ # we don't do frameworks!
+ sed -i \
+ -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+ -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+ rts/package.conf.in || die
+ fi
+
+ # it is autoconf, but we really don't want to give it too
+ # much arguments, in fact we do the make in-place anyway
+ ./configure --prefix="${WORKDIR}"/usr || die
+ make install || die
+ popd > /dev/null
+ ;;
+ *)
+ relocate_ghc "${WORKDIR}"
+ ;;
+ esac
+ fi
+
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+ "${S}/ghc/ghc.wrapper"
+
+ cd "${S}" # otherwise epatch will break
+
+ epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+
+ epatch "${FILESDIR}"/${PN}-7.8.1_rc1-libbfd.patch
+
+ epatch "${FILESDIR}"/${PN}-7.8.2-cgen-constify.patch
+ epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+ # bug 518734
+ epatch "${FILESDIR}"/${PN}-7.6.3-preserve-inplace-xattr.patch
+ # fix threaded runtime on ia64
+ epatch "${FILESDIR}"/${PN}-7.8.4-ia64-CLOSUREs.patch
+ epatch "${WORKDIR}"/${PN}-7.8.4-ia64-CLOSUREs-regenerated.patch
+
+ # upstream backports
+ epatch "${FILESDIR}"/${PN}-7.8.3-linker-warn.patch
+ epatch "${FILESDIR}"/${PN}-7.8.3-pic-sparc.patch
+ epatch "${FILESDIR}"/${PN}-7.8.3-ppc32-fPIC.patch
+ epatch "${FILESDIR}"/${PN}-7.8.4-gold.patch
+
+ if use prefix; then
+ # Make configure find docbook-xsl-stylesheets from Prefix
+ sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
+ -i utils/haddock/doc/configure.ac || die
+ fi
+
+ # as we have changed the build system
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ if ! use binary; then
+ # initialize build.mk
+ echo '# Gentoo changes' > mk/build.mk
+
+ # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+ echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
+ echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
+
+ # We also need to use the GHC_FLAGS flags when building ghc itself
+ echo "SRC_HC_OPTS+=${GHC_FLAGS}" >> mk/build.mk
+ echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+ echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+
+ # We can't depend on haddock except when bootstrapping when we
+ # must build docs and include them into the binary .tbz2 package
+ # app-text/dblatex is not in portage, can not build PDF or PS
+ if use ghcbootstrap && use doc; then
+ echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
+ echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
+ echo "BUILD_DOCBOOK_HTML = YES" >> mk/build.mk
+ echo "HADDOCK_DOCS = YES" >> mk/build.mk
+ else
+ echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
+ echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
+ echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
+ echo "HADDOCK_DOCS = NO" >> mk/build.mk
+ fi
+
+ # allows overriding build flavours for libraries:
+ # v - vanilla (static libs)
+ # p - profiled
+ # dyn - shared libraries
+ # example: GHC_LIBRARY_WAYS="v dyn"
+ if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+ echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+ fi
+
+ # Get ghc from the unpacked binary .tbz2
+ # except when bootstrapping we just pick ghc up off the path
+ if ! use ghcbootstrap; then
+ export PATH="${WORKDIR}/usr/bin:${PATH}"
+ fi
+
+ if use gmp; then
+ echo "INTEGER_LIBRARY=integer-gmp" >> mk/build.mk
+ else
+ echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
+ fi
+
+ # don't strip anything. Very useful when stage2 SIGSEGVs on you
+ echo "STRIP_CMD = :" >> mk/build.mk
+
+ local econf_args=()
+
+ # GHC embeds 'gcc' it was built by and uses it later.
+ # Don't allow things like ccache or versioned binary slip.
+ # We use stable thing across gcc upgrades.
+ is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
+
+ if ! use ghcmakebinary; then
+ econf_args+=(--with-system-libffi)
+ econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+ fi
+
+ econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
+
+ if [[ ${PV} == *9999* ]]; then
+ GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+ GHC_P=${PN}-${GHC_PV}
+ fi
+ GHC_TPF="$(grep 'S\[\"TargetPlatformFull\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+ fi # ! use binary
+}
+
+src_compile() {
+ if ! use binary; then
+ # 1. build compiler binary first
+ emake ghc/stage2/build/tmp/ghc-stage2
+ # 2. pax-mark (bug #516430)
+ pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+ # 3. and then all the rest
+ emake all
+ fi # ! use binary
+}
+
+src_install() {
+ if use binary; then
+ use prefix && mkdir -p "${ED}"
+ mv "${S}/usr" "${ED}"
+
+ # Remove the docs if not requested
+ if ! use doc; then
+ rm -rf "${ED}/usr/share/doc/${P}/*/" \
+ "${ED}/usr/share/doc/${P}/*.html" \
+ || die "could not remove docs (P vs PF revision mismatch?)"
+ fi
+ else
+ # We only build docs if we were bootstrapping, otherwise
+ # we copy them out of the unpacked binary .tbz2
+ if use doc && ! use ghcbootstrap; then
+ mkdir -p "${ED}/usr/share/doc"
+ mv "${WORKDIR}/usr/share/doc/${P}" "${ED}/usr/share/doc" \
+ || die "failed to copy docs"
+ else
+ dodoc "${S}/distrib/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION"
+ fi
+
+ emake -j1 install DESTDIR="${D}"
+
+ # remove link, but leave 'haddock-${GHC_P}'
+ rm -f "${ED}"/usr/bin/haddock
+
+ if [[ ! -f "${S}/VERSION" ]]; then
+ echo "${GHC_PV}" > "${S}/VERSION" \
+ || die "Could not create file ${S}/VERSION"
+ fi
+ newbashcomp "${FILESDIR}/ghc-bash-completion" ghc-pkg
+
+ fi
+
+ # path to the package.cache
+ local package_confdir="${ED}/usr/$(get_libdir)/${GHC_P}/package.conf.d"
+ PKGCACHE="${package_confdir}"/package.cache
+ # copy the package.conf.d, including timestamp, save it so we can help
+ # users that have a broken package.conf.d
+ cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+ # copy the package.conf, including timestamp, save it so we later can put it
+ # back before uninstalling, or when upgrading.
+ cp -p "${PKGCACHE}"{,.shipped} \
+ || die "failed to copy package.conf.d/package.cache"
+}
+
+pkg_preinst() {
+ # have we got an earlier version of ghc installed?
+ if has_version "<${CATEGORY}/${PF}"; then
+ haskell_updater_warn="1"
+ fi
+}
+
+pkg_postinst() {
+ ghc-reregister
+
+ # path to the package.cache
+ PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
+
+ # give the cache a new timestamp, it must be as recent as
+ # the package.conf.d directory.
+ touch "${PKGCACHE}"
+
+ if [[ "${haskell_updater_warn}" == "1" ]]; then
+ ewarn
+ ewarn "\e[1;31m************************************************************************\e[0m"
+ ewarn
+ ewarn "You have just upgraded from an older version of GHC."
+ ewarn "You may have to run"
+ ewarn " 'haskell-updater --upgrade'"
+ ewarn "to rebuild all ghc-based Haskell libraries."
+ ewarn
+ ewarn "\e[1;31m************************************************************************\e[0m"
+ ewarn
+ fi
+}
+
+pkg_prerm() {
+ # Be very careful here... Call order when upgrading is (according to PMS):
+ # * src_install for new package
+ # * pkg_preinst for new package
+ # * pkg_postinst for new package
+ # * pkg_prerm for the package being replaced
+ # * pkg_postrm for the package being replaced
+ # so you'll actually be touching the new packages files, not the one you
+ # uninstall, due to that or installation directory ${GHC_P} will be the same for
+ # both packages.
+
+ # Call order for reinstalling is (according to PMS):
+ # * src_install
+ # * pkg_preinst
+ # * pkg_prerm for the package being replaced
+ # * pkg_postrm for the package being replaced
+ # * pkg_postinst
+
+ # Overwrite the modified package.cache with a copy of the
+ # original one, so that it will be removed during uninstall.
+
+ PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
+ rm -rf "${PKGCACHE}"
+
+ cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+ ghc-package_pkg_postrm
+}
diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild
new file mode 100644
index 000000000000..c2b48ae466f3
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -0,0 +1,681 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+#
+# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib pax-utils toolchain-funcs versionator prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+# sorted!
+arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries arm64? ( http://code.haskell.org/~slyfox/ghc-arm64/ghc-bin-${PV}-arm64.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
+arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
+arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+ case "${ARCH}" in
+ alpha) return 0 ;;
+ arm64) return 0 ;;
+ #arm)
+ # ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
+ # return 0
+ #;;
+ amd64) return 0 ;;
+ ia64) return 0 ;;
+ ppc) return 0 ;;
+ ppc64) return 0 ;;
+ #sparc) return 0 ;;
+ x86) return 0 ;;
+ *) return 1 ;;
+ esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=8.0.1.20161213 # uncomment only for -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+ # "hackage-name hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+KEYWORDS="~alpha amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc ghcbootstrap ghcmakebinary +gmp +profile"
+IUSE+=" binary"
+
+RDEPEND="
+ >=dev-lang/perl-5.6.1
+ dev-libs/gmp:0=
+ sys-libs/ncurses:0=[unicode]
+ !ghcmakebinary? ( virtual/libffi:= )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+ !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+ sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ dev-python/sphinx
+ >=dev-libs/libxslt-1.1.2 )
+ !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+# returns tool prefix for crosscompiler.
+# Example:
+# CTARGET=armv7a-unknown-linux-gnueabi
+# CHOST=x86_64-pc-linux-gnu
+# "armv7a-unknown-linux-gnueabi-"
+# CTARGET=${CHOST}
+# ""
+# Used in tools and library prefix:
+# "${ED}"/usr/bin/$(cross)haddock
+# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+ if is_crosscompile; then
+ echo "${CTARGET}-"
+ else
+ echo ""
+ fi
+}
+
+append-ghc-cflags() {
+ local persistent compile assemble link
+ local flag ghcflag
+
+ for flag in $*; do
+ case ${flag} in
+ persistent) persistent="yes";;
+ compile) compile="yes";;
+ assemble) assemble="yes";;
+ link) link="yes";;
+ *)
+ [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ ;;
+ esac
+ done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+ local pn=$1 pv=$2
+ local p=${pn}-${pv}
+ local f
+
+ einfo "Bumping ${pn} up to ${pv}"
+
+ for f in ghc.mk GNUmakefile; do
+ mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+ done
+ mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+ mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+ local p pn pv
+ for p in "${BUMP_LIBRARIES[@]}"; do
+ set -- $p
+ pn=$1 pv=$2
+
+ SRC_URI+=" mirror://hackage/package/${pn}/${pn}-${pv}.tar.gz"
+ done
+}
+
+update_SRC_URI
+
+bump_libs() {
+ local p pn pv
+ for p in "${BUMP_LIBRARIES[@]}"; do
+ set -- $p
+ pn=$1 pv=$2
+
+ bump_lib "${pn}" "${pv}"
+ done
+}
+
+ghc_setup_cflags() {
+ if is_crosscompile; then
+ export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+ export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+ einfo "Crosscompiling mode:"
+ einfo " CHOST: ${CHOST}"
+ einfo " CTARGET: ${CTARGET}"
+ einfo " CFLAGS: ${CFLAGS}"
+ einfo " LDFLAGS: ${LDFLAGS}"
+ einfo " prefix: $(cross)"
+ return
+ fi
+ # We need to be very careful with the CFLAGS we ask ghc to pass through to
+ # gcc. There are plenty of flags which will make gcc produce output that
+ # breaks ghc in various ways. The main ones we want to pass through are
+ # -mcpu / -march flags. These are important for arches like alpha & sparc.
+ # We also use these CFLAGS for building the C parts of ghc, ie the rts.
+ strip-flags
+ strip-unsupported-flags
+
+ # Cmm can't parse line numbers #482086
+ replace-flags -ggdb[3-9] -ggdb2
+
+ GHC_FLAGS=""
+ GHC_PERSISTENT_FLAGS=""
+ for flag in ${CFLAGS}; do
+ case ${flag} in
+
+ # Ignore extra optimisation (ghc passes -O to gcc anyway)
+ # -O2 and above break on too many systems
+ -O*) ;;
+
+ # Arch and ABI flags are what we're really after
+ -m*) append-ghc-cflags compile assemble ${flag};;
+
+ # Sometimes it's handy to see backtrace of RTS
+ # to get an idea what happens there
+ -g*) append-ghc-cflags compile ${flag};;
+
+ # Ignore all other flags, including all -f* flags
+ esac
+ done
+
+ for flag in ${LDFLAGS}; do
+ append-ghc-cflags link ${flag}
+ done
+
+ # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
+ # are not built with fPIC, bug #606666
+ gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+ tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
+ # gcc-6.3 has support for -no-pie upstream, but spelling differs from
+ # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
+ # hardened users try '-pie' in USE=ghcbootstrap mode.
+ append-ghc-cflags compile link -no-pie
+ fi
+
+ # prevent from failind building unregisterised ghc:
+ # http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+ use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+ local from=$1
+ local to=$2
+ shift 2
+ local file=
+ for file in "$@"
+ do
+ sed -i -e "s|$from|$to|g" \
+ "$file" || die "path relocation failed for '$file'"
+ done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+ local to=$1
+
+ # libdir for prebuilt binary and for current system may mismatch
+ # It does for prefix installation for example: bug #476998
+ local bin_ghc_prefix=${WORKDIR}/usr
+ local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+ local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+ # backup original script to use it later after relocation
+ local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
+ cp "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+ if [[ ${bin_libdir} != $(get_libdir) ]]; then
+ einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+ # moving the dir itself is not strictly needed
+ # but then USE=binary would result in installing
+ # in '${bin_libdir}'
+ mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+ relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)hsc2hs" \
+ "${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
+ fi
+
+ # Relocate from /usr to ${EPREFIX}/usr
+ relocate_path "/usr" "${to}/usr" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)hsc2hs" \
+ "${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
+ "${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/"*
+
+ # this one we will use to regenerate cache
+ # so it should point to current tree location
+ relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+ if use prefix; then
+ # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
+ # TODO: add the same for darwin's CHOST and it's DYLD_
+ local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
+ sed -i -e '2i'"$new_ldpath" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/$(cross)hsc2hs" \
+ "${WORKDIR}/usr/bin/$(cross)runghc-${GHC_PV}" \
+ "$gp_back" \
+ || die "Adding LD_LIBRARY_PATH for wrappers failed"
+ hprefixify "${bin_libpath}"/${PN}*/settings
+ fi
+
+ # regenerate the binary package cache
+ "$gp_back" recache || die "failed to update cache after relocation"
+ rm "$gp_back"
+}
+
+ghc-check-reqs() {
+ # These are pessimistic values (slightly bigger than worst-case)
+ # Worst case is UNREG USE=profile ia64. See bug #611866 for some
+ # numbers on various arches.
+ CHECKREQS_DISK_BUILD=8G
+ CHECKREQS_DISK_USR=2G
+ # USE=binary roughly takes
+ use binary && CHECKREQS_DISK_BUILD=4G
+
+ "$@"
+}
+
+pkg_pretend() {
+ ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ ghc-check-reqs check-reqs_pkg_setup
+
+ # quiet portage about prebuilt binaries
+ use binary && QA_PREBUILT="*"
+
+ [[ ${MERGE_TYPE} == binary ]] && return
+
+ if use ghcbootstrap; then
+ ewarn "You requested ghc bootstrapping, this is usually only used"
+ ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+ [[ -z $(type -P ghc) ]] && \
+ die "Could not find a ghc to bootstrap with."
+ else
+ if ! yet_binary; then
+ eerror "Please try emerging with USE=ghcbootstrap and report build"
+ eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+ die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+ fi
+ fi
+}
+
+src_unpack() {
+ # Create the ${S} dir if we're using the binary version
+ use binary && mkdir "${S}"
+
+ # the Solaris and Darwin binaries from ghc (maeder) need to be
+ # unpacked separately, so prevent them from being unpacked
+ local ONLYA=${A}
+ case ${CHOST} in
+ *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
+ esac
+ unpack ${ONLYA}
+}
+
+src_prepare() {
+ ghc_setup_cflags
+
+ if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+ # Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+ # See bug #313635.
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+ "${WORKDIR}/usr/bin/$(cross)ghc-${GHC_PV}"
+
+ # allow hardened users use vanilla binary to bootstrap ghc
+ # ghci uses mmap with rwx protection at it implements dynamic
+ # linking on it's own (bug #299709)
+ pax-mark -m "${WORKDIR}/usr/$(get_libdir)/$(cross)${GHC_P}/bin/ghc"
+ fi
+
+ if use binary; then
+ if use prefix; then
+ relocate_ghc "${EPREFIX}"
+ fi
+
+ # Move unpacked files to the expected place
+ mv "${WORKDIR}/usr" "${S}"
+ else
+ if ! use ghcbootstrap; then
+ case ${CHOST} in
+ *-darwin* | *-solaris*)
+ # UPDATE ME for ghc-7
+ mkdir "${WORKDIR}"/ghc-bin-installer || die
+ pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+ use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+ use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+ use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+ use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+ popd > /dev/null
+
+ pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+ # fix the binaries so they run, on Solaris we need an
+ # LD_LIBRARY_PATH which has our prefix libdirs, on
+ # Darwin we need to replace the frameworks with our libs
+ # from the prefix fix before installation, because some
+ # of the tools are actually used during configure/make
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+ elif [[ ${CHOST} == *-darwin* ]] ; then
+ local readline_framework=GNUreadline.framework/GNUreadline
+ local gmp_framework=/opt/local/lib/libgmp.10.dylib
+ local ncurses_file=/opt/local/lib/libncurses.5.dylib
+ for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+ install_name_tool -change \
+ ${readline_framework} \
+ "${EPREFIX}"/lib/libreadline.dylib \
+ ${binary} || die
+ install_name_tool -change \
+ ${gmp_framework} \
+ "${EPREFIX}"/usr/lib/libgmp.dylib \
+ ${binary} || die
+ install_name_tool -change \
+ ${ncurses_file} \
+ "${EPREFIX}"/usr/lib/libncurses.dylib \
+ ${binary} || die
+ done
+ # we don't do frameworks!
+ sed -i \
+ -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+ -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+ rts/package.conf.in || die
+ fi
+
+ # it is autoconf, but we really don't want to give it too
+ # much arguments, in fact we do the make in-place anyway
+ ./configure --prefix="${WORKDIR}"/usr || die
+ make install || die
+ popd > /dev/null
+ ;;
+ *)
+ relocate_ghc "${WORKDIR}"
+ ;;
+ esac
+ fi
+
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+ "${S}/ghc/ghc.wrapper"
+
+ cd "${S}" # otherwise epatch will break
+
+ epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+
+ epatch "${FILESDIR}"/${PN}-8.0.1_rc1-cgen-constify.patch
+ epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+
+ epatch "${FILESDIR}"/${PN}-8.0.1-limit-jN.patch
+ epatch "${FILESDIR}"/${PN}-8.0.1-ww-args-limit.patch
+ epatch "${FILESDIR}"/${PN}-8.0.1-par-g0-on-A32.patch
+ epatch "${FILESDIR}"/${PN}-8.0.2_rc2-old-sphinx.patch
+ epatch "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
+ epatch "${FILESDIR}"/${PN}-8.0.2-O2-unreg.patch
+
+ bump_libs
+
+ # as we have changed the build system
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ if ! use binary; then
+ # initialize build.mk
+ echo '# Gentoo changes' > mk/build.mk
+
+ # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+ echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
+ echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
+
+ # We also need to use the GHC_FLAGS flags when building ghc itself
+ echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+ echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+ echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+ # Speed up initial Cabal bootstrap
+ echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+ # We can't depend on haddock except when bootstrapping when we
+ # must build docs and include them into the binary .tbz2 package
+ # app-text/dblatex is not in portage, can not build PDF or PS
+ echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
+ echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+ echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+ # this controls presence on 'xhtml' and 'haddock' in final install
+ echo "HADDOCK_DOCS = YES" >> mk/build.mk
+
+ # allows overriding build flavours for libraries:
+ # v - vanilla (static libs)
+ # p - profiled
+ # dyn - shared libraries
+ # example: GHC_LIBRARY_WAYS="v dyn"
+ if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+ echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+ fi
+ echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+ # Get ghc from the unpacked binary .tbz2
+ # except when bootstrapping we just pick ghc up off the path
+ if ! use ghcbootstrap; then
+ export PATH="${WORKDIR}/usr/bin:${PATH}"
+ fi
+
+ echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+ # don't strip anything. Very useful when stage2 SIGSEGVs on you
+ echo "STRIP_CMD = :" >> mk/build.mk
+
+ local econf_args=()
+
+ # GHC embeds 'gcc' it was built by and uses it later.
+ # Don't allow things like ccache or versioned binary slip.
+ # We use stable thing across gcc upgrades.
+ is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
+
+ if use ghcmakebinary; then
+ # When building booting libary we are trying to
+ # bundle or restrict most of external depends
+ # with unstable ABI:
+ # - embed libffi (default GHC behaviour)
+ # - disable ncurses support for ghci (via haskeline)
+ # https://bugs.gentoo.org/557478
+ # - disable ncurses support for ghc-pkg
+ echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+ echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+ else
+ econf_args+=(--with-system-libffi)
+ econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+ fi
+
+ elog "Final mk/build.mk:"
+ cat mk/build.mk || die
+
+ econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
+
+ if [[ ${PV} == *9999* ]]; then
+ GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+ GHC_P=${PN}-${GHC_PV}
+ fi
+ fi # ! use binary
+}
+
+src_compile() {
+ if ! use binary; then
+ # 1. build/pax-mark compiler binary first
+ emake ghc/stage2/build/tmp/ghc-stage2
+ pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+ # 2. build/pax-mark haddock using ghc-stage2
+ emake utils/haddock/dist/build/tmp/haddock
+ pax-mark -m utils/haddock/dist/build/tmp/haddock
+ # 3. and then all the rest
+ emake all
+ fi # ! use binary
+}
+
+src_install() {
+ if use binary; then
+ use prefix && mkdir -p "${ED}"
+ mv "${S}/usr" "${ED}"
+ else
+
+ emake -j1 install DESTDIR="${D}"
+ dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
+
+ # rename ghc-shipped files to avoid collision
+ # of external packages. Motivating example:
+ # user had installed:
+ # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+ # dev-haskell/transformers-0.4.2.0
+ # then user tried to update to
+ # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+ # this will lead to single .conf file collision.
+ local shipped_conf renamed_conf
+ local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+ for shipped_conf in "${package_confdir}"/*.conf; do
+ # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+ renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+ mv "${shipped_conf}" "${renamed_conf}" || die
+ done
+
+ # remove link, but leave 'haddock-${GHC_P}'
+ rm -f "${ED}"/usr/bin/$(cross)haddock
+
+ if [[ ! -f "${S}/VERSION" ]]; then
+ echo "${GHC_PV}" > "${S}/VERSION" \
+ || die "Could not create file ${S}/VERSION"
+ fi
+ if ! is_crosscompile; then
+ newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+ newbashcomp utils/completion/ghc.bash ghc
+ fi
+ fi
+
+ # path to the package.cache
+ local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+ PKGCACHE="${package_confdir}"/package.cache
+ # copy the package.conf.d, including timestamp, save it so we can help
+ # users that have a broken package.conf.d
+ cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+ # copy the package.conf, including timestamp, save it so we later can put it
+ # back before uninstalling, or when upgrading.
+ cp -p "${PKGCACHE}"{,.shipped} \
+ || die "failed to copy package.conf.d/package.cache"
+}
+
+pkg_preinst() {
+ # have we got an earlier version of ghc installed?
+ if has_version "<${CATEGORY}/${PF}"; then
+ haskell_updater_warn="1"
+ fi
+}
+
+pkg_postinst() {
+ ghc-reregister
+
+ # path to the package.cache
+ PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+ # give the cache a new timestamp, it must be as recent as
+ # the package.conf.d directory.
+ touch "${PKGCACHE}"
+
+ if [[ "${haskell_updater_warn}" == "1" ]]; then
+ ewarn
+ ewarn "\e[1;31m************************************************************************\e[0m"
+ ewarn
+ ewarn "You have just upgraded from an older version of GHC."
+ ewarn "You may have to run"
+ ewarn " 'haskell-updater'"
+ ewarn "to rebuild all ghc-based Haskell libraries."
+ ewarn
+ ewarn "\e[1;31m************************************************************************\e[0m"
+ ewarn
+ fi
+}
+
+pkg_prerm() {
+ PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+ rm -rf "${PKGCACHE}"
+
+ cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+ ghc-package_pkg_postrm
+}
diff --git a/dev-lang/ghc/ghc-8.2.1.ebuild b/dev-lang/ghc/ghc-8.2.1.ebuild
new file mode 100644
index 000000000000..66a642bf9292
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.2.1.ebuild
@@ -0,0 +1,765 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# to make make a crosscompiler use crossdev and symlink ghc tree into
+# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} = ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
+inherit multilib pax-utils toolchain-funcs versionator prefix
+inherit check-reqs
+DESCRIPTION="The Glasgow Haskell Compiler"
+HOMEPAGE="http://www.haskell.org/ghc/"
+
+# we don't have any binaries yet
+arch_binaries=""
+
+# sorted!
+#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( http://code.haskell.org/~slyfox/ghc-arm64/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
+
+# 0 - yet
+yet_binary() {
+ case "${ARCH}" in
+ #alpha) return 0 ;;
+ #arm64) return 0 ;;
+ #arm) return 0 ;;
+ amd64) return 0 ;;
+ #ia64) return 0 ;;
+ #ppc) return 0 ;;
+ #ppc64) return 0 ;;
+ #sparc) return 0 ;;
+ x86) return 0 ;;
+ *) return 1 ;;
+ esac
+}
+
+GHC_PV=${PV}
+#GHC_PV=8.2.0.20170704 # uncomment only for -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
+S="${WORKDIR}"/${GHC_P}
+
+[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
+
+BUMP_LIBRARIES=(
+ # "hackage-name hackage-version"
+)
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+#KEYWORDS="~alpha ~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc ghcbootstrap ghcmakebinary +gmp profile"
+IUSE+=" binary"
+
+RDEPEND="
+ >=dev-lang/perl-5.6.1
+ dev-libs/gmp:0=
+ sys-libs/ncurses:0=[unicode]
+ !ghcmakebinary? ( virtual/libffi:= )
+"
+
+# This set of dependencies is needed to run
+# prebuilt ghc. We specifically avoid ncurses
+# dependency with:
+# utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING
+PREBUILT_BINARY_DEPENDS="
+ !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) )
+"
+# This set of dependencies is needed to install
+# ghc[binary] in system. terminfo package is linked
+# against ncurses.
+PREBUILT_BINARY_RDEPENDS="${PREBUILT_BINARY_DEPENDS}
+ sys-libs/ncurses:0/6
+"
+
+RDEPEND+="binary? ( ${PREBUILT_BINARY_RDEPENDS} )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xml-dtd:4.5
+ app-text/docbook-xsl-stylesheets
+ dev-python/sphinx
+ >=dev-libs/libxslt-1.1.2 )
+ !ghcbootstrap? ( ${PREBUILT_BINARY_DEPENDS} )"
+
+PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
+
+REQUIRED_USE="?? ( ghcbootstrap binary )"
+
+# haskell libraries built with cabal in configure mode, #515354
+QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+is_native() {
+ [[ ${CHOST} == ${CBUILD} ]] && [[ ${CHOST} == ${CTARGET} ]]
+}
+
+# returns tool prefix for crosscompiler.
+# Example:
+# CTARGET=armv7a-unknown-linux-gnueabi
+# CHOST=x86_64-pc-linux-gnu
+# "armv7a-unknown-linux-gnueabi-"
+# CTARGET=${CHOST}
+# ""
+# Used in tools and library prefix:
+# "${ED}"/usr/bin/$(cross)haddock
+# "${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+
+cross() {
+ if is_crosscompile; then
+ echo "${CTARGET}-"
+ else
+ echo ""
+ fi
+}
+
+append-ghc-cflags() {
+ local persistent compile assemble link
+ local flag ghcflag
+
+ for flag in $*; do
+ case ${flag} in
+ persistent) persistent="yes";;
+ compile) compile="yes";;
+ assemble) assemble="yes";;
+ link) link="yes";;
+ *)
+ [[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ [[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ [[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
+ [[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
+ ;;
+ esac
+ done
+}
+
+# $1 - lib name (under libraries/)
+# $2 - lib version
+# example: bump_lib "transformers" "0.4.2.0"
+bump_lib() {
+ local pn=$1 pv=$2
+ local p=${pn}-${pv}
+ local f
+
+ einfo "Bumping ${pn} up to ${pv}"
+
+ for f in ghc.mk GNUmakefile; do
+ mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
+ done
+ mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
+ mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
+}
+
+update_SRC_URI() {
+ local p pn pv
+ for p in "${BUMP_LIBRARIES[@]}"; do
+ set -- $p
+ pn=$1 pv=$2
+
+ SRC_URI+=" mirror://hackage/package/${pn}/${pn}-${pv}.tar.gz"
+ done
+}
+
+update_SRC_URI
+
+bump_libs() {
+ local p pn pv
+ for p in "${BUMP_LIBRARIES[@]}"; do
+ set -- $p
+ pn=$1 pv=$2
+
+ bump_lib "${pn}" "${pv}"
+ done
+}
+
+ghc_setup_cflags() {
+ # TODO: plumb CFLAGS and BUILD_CFLAGS to respective CONF_CC_OPTS_STAGE<N>
+ if ! is_native; then
+ export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
+ export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
+ einfo "Crosscompiling mode:"
+ einfo " CHOST: ${CHOST}"
+ einfo " CTARGET: ${CTARGET}"
+ einfo " CFLAGS: ${CFLAGS}"
+ einfo " LDFLAGS: ${LDFLAGS}"
+ einfo " prefix: $(cross)"
+ return
+ fi
+ # We need to be very careful with the CFLAGS we ask ghc to pass through to
+ # gcc. There are plenty of flags which will make gcc produce output that
+ # breaks ghc in various ways. The main ones we want to pass through are
+ # -mcpu / -march flags. These are important for arches like alpha & sparc.
+ # We also use these CFLAGS for building the C parts of ghc, ie the rts.
+ strip-flags
+ strip-unsupported-flags
+
+ # Cmm can't parse line numbers #482086
+ replace-flags -ggdb[3-9] -ggdb2
+
+ GHC_FLAGS=""
+ GHC_PERSISTENT_FLAGS=""
+ for flag in ${CFLAGS}; do
+ case ${flag} in
+
+ # Ignore extra optimisation (ghc passes -O to gcc anyway)
+ # -O2 and above break on too many systems
+ -O*) ;;
+
+ # Arch and ABI flags are what we're really after
+ -m*) append-ghc-cflags compile assemble ${flag};;
+
+ # Sometimes it's handy to see backtrace of RTS
+ # to get an idea what happens there
+ -g*) append-ghc-cflags compile ${flag};;
+
+ # Ignore all other flags, including all -f* flags
+ esac
+ done
+
+ for flag in ${LDFLAGS}; do
+ append-ghc-cflags link ${flag}
+ done
+
+ # GHC uses ${CBUILD}-gcc, ${CHOST}-gcc and ${CTARGET}-gcc at a single build.
+ # Skip any gentoo-specific tweaks for cross-case to avoid passing unsupported
+ # options to gcc.
+ if is_native; then
+ # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries
+ # are not built with fPIC, bug #606666
+ gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
+ tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then
+ # gcc-6.3 has support for -no-pie upstream, but spelling differs from
+ # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow
+ # hardened users try '-pie' in USE=ghcbootstrap mode.
+ append-ghc-cflags compile link -no-pie
+ fi
+
+ # prevent from failing to build unregisterised ghc:
+ # http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
+ use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
+ fi
+}
+
+# substitutes string $1 to $2 in files $3 $4 ...
+relocate_path() {
+ local from=$1
+ local to=$2
+ shift 2
+ local file=
+ for file in "$@"
+ do
+ sed -i -e "s|$from|$to|g" \
+ "$file" || die "path relocation failed for '$file'"
+ done
+}
+
+# changes hardcoded ghc paths and updates package index
+# $1 - new absolute root path
+relocate_ghc() {
+ local to=$1
+
+ # libdir for prebuilt binary and for current system may mismatch
+ # It does for prefix installation for example: bug #476998
+ local bin_ghc_prefix=${WORKDIR}/usr
+ local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
+ local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
+
+ # backup original script to use it later after relocation
+ local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
+ cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
+
+ if [[ ${bin_libdir} != $(get_libdir) ]]; then
+ einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
+ # moving the dir itself is not strictly needed
+ # but then USE=binary would result in installing
+ # in '${bin_libdir}'
+ mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
+
+ relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "$gp_back" \
+ "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+ fi
+
+ # Relocate from /usr to ${EPREFIX}/usr
+ relocate_path "/usr" "${to}/usr" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
+
+ # this one we will use to regenerate cache
+ # so it should point to current tree location
+ relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
+
+ if use prefix; then
+ # and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
+ # TODO: add the same for darwin's CHOST and it's DYLD_
+ local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
+ sed -i -e '2i'"$new_ldpath" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hsc2hs" \
+ "${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
+ "$gp_back" \
+ || die "Adding LD_LIBRARY_PATH for wrappers failed"
+ hprefixify "${bin_libpath}"/${PN}*/settings
+ fi
+
+ # regenerate the binary package cache
+ "$gp_back" recache || die "failed to update cache after relocation"
+ rm "$gp_back"
+}
+
+ghc-check-reqs() {
+ # These are pessimistic values (slightly bigger than worst-case)
+ # Worst case is UNREG USE=profile ia64. See bug #611866 for some
+ # numbers on various arches.
+ CHECKREQS_DISK_BUILD=8G
+ CHECKREQS_DISK_USR=2G
+ # USE=binary roughly takes
+ use binary && CHECKREQS_DISK_BUILD=4G
+
+ "$@"
+}
+
+pkg_pretend() {
+ ghc-check-reqs check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ ghc-check-reqs check-reqs_pkg_setup
+
+ # quiet portage about prebuilt binaries
+ use binary && QA_PREBUILT="*"
+
+ [[ ${MERGE_TYPE} == binary ]] && return
+
+ if use ghcbootstrap; then
+ ewarn "You requested ghc bootstrapping, this is usually only used"
+ ewarn "by Gentoo developers to make binary .tbz2 packages."
+
+ [[ -z $(type -P ghc) ]] && \
+ die "Could not find a ghc to bootstrap with."
+ else
+ if ! yet_binary; then
+ eerror "Please try emerging with USE=ghcbootstrap and report build"
+ eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
+ die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
+ fi
+ fi
+}
+
+src_unpack() {
+ # Create the ${S} dir if we're using the binary version
+ use binary && mkdir "${S}"
+
+ # the Solaris and Darwin binaries from ghc (maeder) need to be
+ # unpacked separately, so prevent them from being unpacked
+ local ONLYA=${A}
+ case ${CHOST} in
+ *-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.xz ;;
+ esac
+ unpack ${ONLYA}
+}
+
+src_prepare() {
+ ghc_setup_cflags
+
+ if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
+ # Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
+ # See bug #313635.
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+ "${WORKDIR}/usr/bin/ghc-${GHC_PV}"
+
+ # allow hardened users use vanilla binary to bootstrap ghc
+ # ghci uses mmap with rwx protection at it implements dynamic
+ # linking on it's own (bug #299709)
+ pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
+ fi
+
+ if use binary; then
+ if use prefix; then
+ relocate_ghc "${EPREFIX}"
+ fi
+
+ # Move unpacked files to the expected place
+ mv "${WORKDIR}/usr" "${S}"
+ else
+ if ! use ghcbootstrap; then
+ case ${CHOST} in
+ *-darwin* | *-solaris*)
+ # UPDATE ME for ghc-7
+ mkdir "${WORKDIR}"/ghc-bin-installer || die
+ pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
+ use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
+ use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
+ use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
+ use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
+ popd > /dev/null
+
+ pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
+ # fix the binaries so they run, on Solaris we need an
+ # LD_LIBRARY_PATH which has our prefix libdirs, on
+ # Darwin we need to replace the frameworks with our libs
+ # from the prefix fix before installation, because some
+ # of the tools are actually used during configure/make
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
+ elif [[ ${CHOST} == *-darwin* ]] ; then
+ local readline_framework=GNUreadline.framework/GNUreadline
+ local gmp_framework=/opt/local/lib/libgmp.10.dylib
+ local ncurses_file=/opt/local/lib/libncurses.5.dylib
+ for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
+ install_name_tool -change \
+ ${readline_framework} \
+ "${EPREFIX}"/lib/libreadline.dylib \
+ ${binary} || die
+ install_name_tool -change \
+ ${gmp_framework} \
+ "${EPREFIX}"/usr/lib/libgmp.dylib \
+ ${binary} || die
+ install_name_tool -change \
+ ${ncurses_file} \
+ "${EPREFIX}"/usr/lib/libncurses.dylib \
+ ${binary} || die
+ done
+ # we don't do frameworks!
+ sed -i \
+ -e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
+ -e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
+ rts/package.conf.in || die
+ fi
+
+ # it is autoconf, but we really don't want to give it too
+ # much arguments, in fact we do the make in-place anyway
+ ./configure --prefix="${WORKDIR}"/usr || die
+ make install || die
+ popd > /dev/null
+ ;;
+ *)
+ relocate_ghc "${WORKDIR}"
+ ;;
+ esac
+ fi
+
+ sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
+ "${S}/ghc/ghc.wrapper"
+
+ cd "${S}" # otherwise epatch will break
+
+ epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+ epatch "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+
+ epatch "${FILESDIR}"/${PN}-8.2.1_rc1-cgen-constify.patch
+ epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+
+ epatch "${FILESDIR}"/${PN}-8.2.1_rc2-O2-unreg.patch
+
+ # a bunch of crosscompiler patches
+ epatch "${FILESDIR}"/${PN}-8.2.1_rc1-unphased-cross.patch
+ epatch "${FILESDIR}"/${PN}-8.2.1_rc1-staged-cross.patch
+ epatch "${FILESDIR}"/${PN}-8.2.1_rc1-ghci-cross.patch
+ epatch "${FILESDIR}"/${PN}-8.2.1_rc1-stage2-cross.patch
+ epatch "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+ epatch "${FILESDIR}"/${PN}-8.2.1_rc3-any-vendor.patch
+ epatch "${FILESDIR}"/${PN}-8.2.1_rc3-stginit-data.patch
+
+ # needs a new libffi release
+ epatch "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
+
+ # mingw32 target
+ pushd "${S}/libraries/Win32"
+ epatch "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-1.patch # upstreamed, waits for merge to -HEAD
+ epatch "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+ popd
+
+ bump_libs
+
+ # as we have changed the build system
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ if ! use binary; then
+ # initialize build.mk
+ echo '# Gentoo changes' > mk/build.mk
+
+ # Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
+ echo "docdir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+ echo "htmldir = ${EPREFIX}/usr/share/doc/$(cross)${P}" >> mk/build.mk
+
+ # We also need to use the GHC_FLAGS flags when building ghc itself
+ echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
+ echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
+ echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
+ # Speed up initial Cabal bootstrap
+ echo "utils/ghc-cabal_dist_EXTRA_HC_OPTS+=$(ghc-make-args)" >> mk/build.mk
+
+ # We can't depend on haddock except when bootstrapping when we
+ # must build docs and include them into the binary .tbz2 package
+ # app-text/dblatex is not in portage, can not build PDF or PS
+ echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk
+ echo "BUILD_SPHINX_HTML = $(usex doc YES NO)" >> mk/build.mk
+ echo "BUILD_MAN = $(usex doc YES NO)" >> mk/build.mk
+
+ # this controls presence on 'xhtml' and 'haddock' in final install
+ echo "HADDOCK_DOCS = YES" >> mk/build.mk
+
+ # not used outside of ghc's test
+ if [[ -n ${GHC_BUILD_DPH} ]]; then
+ echo "BUILD_DPH = YES" >> mk/build.mk
+ else
+ echo "BUILD_DPH = NO" >> mk/build.mk
+ fi
+
+ # Any non-native build has to skip as it needs
+ # target haddock binary to be runnabine.
+ if ! is_native; then
+ # disable docs generation as it requires running stage2
+ echo "HADDOCK_DOCS=NO" >> mk/build.mk
+ echo "BUILD_SPHINX_HTML=NO" >> mk/build.mk
+ echo "BUILD_SPHINX_PDF=NO" >> mk/build.mk
+ fi
+
+ if is_crosscompile; then
+ # Install ghc-stage1 crosscompiler instead of
+ # ghc-stage2 cross-built compiler.
+ echo "Stage1Only=YES" >> mk/build.mk
+ fi
+
+ # allows overriding build flavours for libraries:
+ # v - vanilla (static libs)
+ # p - profiled
+ # dyn - shared libraries
+ # example: GHC_LIBRARY_WAYS="v dyn"
+ if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
+ echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
+ fi
+ echo "BUILD_PROF_LIBS = $(usex profile YES NO)" >> mk/build.mk
+
+ # Get ghc from the unpacked binary .tbz2
+ # except when bootstrapping we just pick ghc up off the path
+ if ! use ghcbootstrap; then
+ export PATH="${WORKDIR}/usr/bin:${PATH}"
+ fi
+
+ echo "INTEGER_LIBRARY = $(usex gmp integer-gmp integer-simple)" >> mk/build.mk
+
+ # don't strip anything. Very useful when stage2 SIGSEGVs on you
+ echo "STRIP_CMD = :" >> mk/build.mk
+
+ local econf_args=()
+
+ # GHC embeds toolchain it was built by and uses it later.
+ # Don't allow things like ccache or versioned binary slip.
+ # We use stable thing across gcc upgrades.
+ # User can use EXTRA_ECONF=CC=... to override this default.
+ econf_args+=(
+ AR=${CTARGET}-ar
+ CC=${CTARGET}-gcc
+ LD=${CTARGET}-ld
+ # these should be inferred by GHC but ghc defaults
+ # to using bundled tools on windows.
+ Windres=${CTARGET}-windres
+ DllWrap=${CTARGET}-dllwrap
+ )
+ if [[ ${CTARGET} == arm* ]] ; then
+ # ld.bfd-2.28 does not work for ghc. Force ld.gold
+ # instead. This should be removed once gentoo gets
+ # a fix for R_ARM_COPY bug: https://sourceware.org/PR16177
+ econf_args+=(LD=${CTARGET}-ld.gold)
+ fi
+
+ if [[ ${CBUILD} != ${CHOST} ]]; then
+ # GHC bug: ghc claims not to support cross-building.
+ # It does, but does not distinct --host= value
+ # for stage1 and stage2 compiler.
+ econf_args+=(--host=${CBUILD})
+ fi
+
+ if use ghcmakebinary; then
+ # When building booting libary we are trying to
+ # bundle or restrict most of external depends
+ # with unstable ABI:
+ # - embed libffi (default GHC behaviour)
+ # - disable ncurses support for ghci (via haskeline)
+ # https://bugs.gentoo.org/557478
+ # - disable ncurses support for ghc-pkg
+ echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
+ echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
+ elif is_native; then
+ # using ${GTARGET}'s libffi is not supported yet:
+ # GHC embeds full path for ffi includes without /usr/${CTARGET} account.
+ econf_args+=(--with-system-libffi)
+ econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
+ fi
+
+ einfo "Final mk/build.mk:"
+ cat mk/build.mk || die
+
+ econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
+
+ if [[ ${PV} == *9999* ]]; then
+ GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
+ GHC_P=${PN}-${GHC_PV}
+ fi
+ fi # ! use binary
+}
+
+src_compile() {
+ if ! use binary; then
+ # Stage1Only crosscompiler does not build stage2
+ if ! is_crosscompile; then
+ # 1. build/pax-mark compiler binary first
+ emake ghc/stage2/build/tmp/ghc-stage2
+ # 2. pax-mark (bug #516430)
+ pax-mark -m ghc/stage2/build/tmp/ghc-stage2
+ # 2. build/pax-mark haddock using ghc-stage2
+ if is_native; then
+ # non-native build does not build haddock
+ # due to HADDOCK_DOCS=NO, but it could.
+ emake utils/haddock/dist/build/tmp/haddock
+ pax-mark -m utils/haddock/dist/build/tmp/haddock
+ fi
+ fi
+ # 3. and then all the rest
+ emake all
+ fi # ! use binary
+}
+
+src_install() {
+ if use binary; then
+ use prefix && mkdir -p "${ED}"
+ mv "${S}/usr" "${ED}"
+ else
+ [[ -f VERSION ]] || emake VERSION
+
+ # -j1 due to a rare race in install script:
+ # make --no-print-directory -f ghc.mk phase=final install
+ # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 755 \
+ # -d "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404/include"
+ # /usr/lib/portage/python3.4/ebuild-helpers/xattr/install -c -m 644 utils/hsc2hs/template-hsc.h \
+ # "/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404"
+ # /usr/bin/install: cannot create regular file \
+ # '/tmp/portage-tmpdir/portage/cross-armv7a-unknown-linux-gnueabi/ghc-9999/image/usr/lib64/armv7a-unknown-linux-gnueabi-ghc-8.3.20170404': No such file or directory
+ emake -j1 install DESTDIR="${D}"
+
+ # Skip for cross-targets as they all share target location:
+ # /usr/share/doc/ghc-9999/
+ if ! is_crosscompile; then
+ dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
+ fi
+
+ # rename ghc-shipped files to avoid collision
+ # of external packages. Motivating example:
+ # user had installed:
+ # dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
+ # dev-haskell/transformers-0.4.2.0
+ # then user tried to update to
+ # dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
+ # this will lead to single .conf file collision.
+ local shipped_conf renamed_conf
+ local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+ for shipped_conf in "${package_confdir}"/*.conf; do
+ # rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
+ renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
+ mv "${shipped_conf}" "${renamed_conf}" || die
+ done
+
+ # remove link, but leave 'haddock-${GHC_P}'
+ rm -f "${ED}"/usr/bin/$(cross)haddock
+
+ if ! is_crosscompile; then
+ newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
+ newbashcomp utils/completion/ghc.bash ghc
+ fi
+ fi
+
+ # path to the package.cache
+ local package_confdir="${ED}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d"
+ PKGCACHE="${package_confdir}"/package.cache
+ # copy the package.conf.d, including timestamp, save it so we can help
+ # users that have a broken package.conf.d
+ cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
+
+ # copy the package.conf, including timestamp, save it so we later can put it
+ # back before uninstalling, or when upgrading.
+ cp -p "${PKGCACHE}"{,.shipped} \
+ || die "failed to copy package.conf.d/package.cache"
+}
+
+pkg_preinst() {
+ # have we got an earlier version of ghc installed?
+ if has_version "<${CATEGORY}/${PF}"; then
+ haskell_updater_warn="1"
+ fi
+}
+
+pkg_postinst() {
+ ghc-reregister
+
+ # path to the package.cache
+ PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+
+ # give the cache a new timestamp, it must be as recent as
+ # the package.conf.d directory.
+ touch "${PKGCACHE}"
+
+ if [[ "${haskell_updater_warn}" == "1" ]]; then
+ ewarn
+ ewarn "\e[1;31m************************************************************************\e[0m"
+ ewarn
+ ewarn "You have just upgraded from an older version of GHC."
+ ewarn "You may have to run"
+ ewarn " 'haskell-updater'"
+ ewarn "to rebuild all ghc-based Haskell libraries."
+ ewarn
+ ewarn "\e[1;31m************************************************************************\e[0m"
+ ewarn
+ fi
+}
+
+pkg_prerm() {
+ PKGCACHE="${EROOT}/usr/$(get_libdir)/$(cross)${GHC_P}/package.conf.d/package.cache"
+ rm -rf "${PKGCACHE}"
+
+ cp -p "${PKGCACHE}"{.shipped,}
+}
+
+pkg_postrm() {
+ ghc-package_pkg_postrm
+}
diff --git a/dev-lang/ghc/metadata.xml b/dev-lang/ghc/metadata.xml
new file mode 100644
index 000000000000..521a174394e8
--- /dev/null
+++ b/dev-lang/ghc/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="project">
+ <email>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </maintainer>
+ <use>
+ <flag name="binary">Install the binary version directly, rather than using it to build the source version.</flag>
+ <flag name="ghcbootstrap">Bootstrap from an existing GHC installation.</flag>
+ <flag name="ghcmakebinary">Build with less runtime depends (bundle libffi for building bootstrap binaries).</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/gnat-gpl/Manifest b/dev-lang/gnat-gpl/Manifest
new file mode 100644
index 000000000000..1f89994164b6
--- /dev/null
+++ b/dev-lang/gnat-gpl/Manifest
@@ -0,0 +1,27 @@
+AUX awk/fixlafiles.awk-no_gcc_la 8473 SHA256 4a89173240d6cdc9cab174bf024e2c8028545f8bc734be519e0f83265e954319 SHA512 eacc3a19252d2f729d7afcff4c20ceecfcc212bb041e07fb5a98b5224a4a9ac4c1f5ebb1be6058033f2e38a1da7eef5d8a8c9a349f7073e2b2e339566e0cf9fc WHIRLPOOL 616201542fe2413e45c6adffab9f0e7584a488075d8a288bb171fd27972f2a74e3422193e1b16f76773582e5013cbd3c5beb32f88d9160e43d787cdf248197ac
+AUX c89 412 SHA256 29ad5dd697135c2892067e780447894dc1cd071708157e46d21773ab99c5022c SHA512 71d33a147339d8d70a62aa22a95d3e70e445d8435d6ac05893f7da19ae851b89bea851f6ce213fbd22470f13572ae13b83cf02f0621333f07d7b0c68a79b7924 WHIRLPOOL d9707a2be8da7a709b54fcb1154cfa05e479f8c3bdd6173822ee1f1bc265b2a0d04741c0685bfb0db68e1e4297fb032d2f8ff94da88014575d947054474d8295
+AUX c99 446 SHA256 057b348cf5be9b4fb9db99a4549f6433c89d21e5f91dc5e46b0b4dc6b70432f5 SHA512 bf3b0eb1125d5e89b433954fcbf805cd86dec5a6eeb23df685ebf3ff83a610573f2ffcec65d893244c845936a73918387cba026710c65c854b2c94a78b007989 WHIRLPOOL b888038b96615c7a0363555b407a3de2c1f17e34428fa16dfbf56fcf68875d6bcdecbc61b545d7f71842ff1909a3ffeff17165fa7f56b48f95adae22f5f8bff1
+AUX fix_libtool_files.sh 1521 SHA256 3b39299e79f51a97c50aead633f690f8f0b34a24fe94b89d5331dccd57bd2dc5 SHA512 9ad874b70c5133b055a1afac0449934c3fb92ed348c41f8762580ee27477748df7e208e254687dc7dd2b0432c35d183cb0e561a332cfa5f85885f1922ffd5996 WHIRLPOOL 78649c3f8dd1e89dd24c4ca4188cc019fbb3bf1b5665cf306a441a647855043dec37fad733cbe5e7cac6329d4c7bb5274ba73e141fa3853b56693399ef1efaef
+AUX gcc-configure-LANG.patch 2052 SHA256 63de6d2dcfe14f21d147abeb1390405b9220c03f8e968f482d4b4c1cf279c88b SHA512 a694c7ac2f45cc657097ff5b0cf1356ac88a9c06035c9ba15167e9d444844d0d8a478eb1b9b62195dd063774f79697b9148b9cdb6c261640b472c291061b2129 WHIRLPOOL 3cc1ec912fb192ff1058de5b93e49a994ba30d1501a932290dd5b3df1cd783875621cda56edeb41894cd5fa10c04917e693a40a60be8d742ddd7992bf5d8afeb
+AUX gcc-configure-texinfo.patch 337 SHA256 74b73a7ecec2d88889876b4db480cd173632f49d5396bb8e5b3c93673f9b5b98 SHA512 a15fba8bf2ff02bdeca54d6f186bfa08c1079c6a8ba0a3beef154483ce5c1b8c497e7ffeec32371968f0037e0ff8384609eb0c367d0155a4e5a7eef8aad084d5 WHIRLPOOL 39d008aad06f7621e4e5db15f5e85a59e583b43f8d247029bd4944466bb60a9795bda157d185c45c329294078e282703a243aad5c468d90c77665dd6336870d4
+AUX gcc-spec-env-r1.patch 3148 SHA256 da0a6442eb42bce58cbdc7858b110a2e65fc5bd5b4b780b9b491033de6e302fa SHA512 ecae71577543772cfe1711f1b4a8815c0b5d706ebd01edacd1f07586637d4805e25771f970a6e6d1bb696d4b1b5ef3e0036088a96a9f6beff7ddaee704175d16 WHIRLPOOL 3535605998eabccdee71ba396ed5cefbb8b0a8cb073101f6444c7d01233f3b3904c1b29f4daf0a3417c68de8dbd62a0b7dc367cacfcbfa0c4ee1b69b7df8c6fb
+AUX gnat-gpl-2016-gentoo.patch 2811 SHA256 fb29461b45d5a4804b65e074db9c5dc6719b6fc886d6b196c6fe1bff090e93b5 SHA512 ba147b3cb4374eb3c8fe530b92a5ffa564170d8df26dc455a48dae3ec92ca0fee9525cb67229855b34c8b8d48a985a083f7ea70ec2b4d13f652296f04c03e4a0 WHIRLPOOL f226c0e10d9f67c9fbd23a4f272eb52d3a721a49cf2afe2966444d1ff74dedc899fb5eecf9163f5b174366bd258f1ce666e64fbb822fe8b8058b496a80e3c0f9
+AUX gnat-gpl-2017-gentoo.patch 1271 SHA256 7ac86f73f10367d0edc12ea845a9e5ffd4db3d8f95387ce9736151276cfba876 SHA512 a5bacdc4fc4911f8e2b325ed10c8b03d3d992462756192255e1a365f914359fd9b3b50104722761ad5007fae2f62d9bb0258262304e47b4d38e5a7ea27392b85 WHIRLPOOL 3e2a555586a822083bcfcd5132541aa580a3a8f44ac9171415c8ca05f1925be5f5dc2728b38935fdba106844d04078beabfb26cb2d26149f3117853f9f885145
+DIST ecj-4.5.jar 1470676 SHA256 98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781 SHA512 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e WHIRLPOOL db54206cfd5eba935e707b8d36ebac40f3c4ed3c1f06ede794288cbdd9c7da9d90c0898e8c98b383af276ea4c1b40c861ebd9e1fc1dce712946184321339d3ad
+DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 SHA256 f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2 SHA512 779ecb0a064d2138b54569c8ae501975b8a6b72e5a3acbf8597619a8db77ee42ef9b0e62608d5192a15e4393e7dfc009bb50b994782236faa744b2c46b5fe517 WHIRLPOOL 8a1e45aad9d306cb19de93c63b5854a97e629d90852feb6861dcfca042b6257705304fc13ad65655a4cb227d36b83fc6063648c94f270821574ee0e85307094e
+DIST gcc-4.9-gpl-2016-src.tar.gz 76361760 SHA256 285bc949c689e5f2ea8c036c599080bd7cd51ac7b5eeffb645a0f685e1e091ab SHA512 da1e26b4dbbe0ec634eab4e64d1cdb2632300c24f0885bc72fb57edba6ce29ab92b04eaedd8f8077ea623f1ef1428f53616e8c8d6630328d9790d968b60c67cf WHIRLPOOL d16a49baa883b15e88c6f6b771be1a1a8b461c44c395f937b25d5e61efab2b3698bfa242dc14241907ee00802fc2d2c28b55f171d66287e706cf11c3efba6f58
+DIST gcc-4.9.4-patches-1.0.tar.bz2 22266 SHA256 1a394abb77c75e2212896ad3a62ae1f6bfd3660b1c176c608298733c740a00e4 SHA512 cc2407221f858bad38b57d31f635314f91794293695e23d255685d8bec20b9db19c7dc76bbf5e8184c2ba0ccb530958b09bae4d8a402ca27cadf463f46bfb995 WHIRLPOOL c74e5273c718020b591911d589d8eff5e366c902c479e566f966577efcbf424b19669a54843b2ddd60c51c81fd2851bc86aec1c647482b4789a518f01dd62561
+DIST gcc-4.9.4-piepatches-v0.6.4.tar.bz2 14414 SHA256 c67b56f04c653e6a19e36abed8391f8b6bed426bfcfc907237cc37f02dbb5015 SHA512 243fa272ea0e49f700a76508bab3e03bbb353bcb930581b2f87f9a47df5cd3880e29f20b71612b21190adc463849e1e6ac2a38a49c0002b562d93d436f538285 WHIRLPOOL 1e5959441210af6f690398efab96444ab11d136238a9428912e8441eaf0509fe6db359a8aca92a446fce0c75777385475af73b20165a8593f9969e3a25fd0b0f
+DIST gcc-4.9.4-uclibc-patches-1.0.tar.bz2 2618 SHA256 95f290d0b68114d835515afc424d6096476a45665671784aa71a7a506296e465 SHA512 5a1f44caa9261f4947101379628143869b31dec67fa28605e8e1f3894d4b7120c3f68ba6deb59da7a74fa906e27ab32cd3767761837dc3dfebc37865d349d6db WHIRLPOOL e46b08737cfdc235bfb80117e0389f3969167adf59bcba2a0a1094a20eab2b62f0c952dac44781e43957cb1507cd4e80f37bd8aecbc55dbda6382d93b3a4cf94
+DIST gcc-4.9.4.tar.bz2 90097606 SHA256 6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092 SHA512 93abb78e16277454f41a8e9810f41f66c0fdffdc539a762ff6b67d3037f78db971378683fd2ebf707d1d51c059fad2161fe42d110c330027f40214b7db0f3efe WHIRLPOOL e20045126c21a3edea1fa4a2185ec2bc5feec77ddf967ab9d1e8c33322ad4eafe013bfcaab1ed4e35971d3b70ef373ea3585ebb089c9bbf91bbfca1f1da71236
+DIST gcc-6-gpl-2017-src.tar.gz 88045488 SHA256 6a45ffc4096772aeb8d7cf673dde8cfb6ae270855fb4ee4b325fe88c61cce90e SHA512 bf8f786b5ad28a6b7d184fb5263424b7ed62154e308e259b61c24a577efdae56939fbaabc1fc53a0f467702c1e6d8598dc6e489ce074724799130a793cfb146e WHIRLPOOL 8ca2ca993a606b4b0e9182809aca9ece2afa4e49f7510a1fca6e73faa78e8c05c4eaeca605a295dd8851ef57d584c2197dd93ad08f4a7a1b5de117187c5f50aa
+DIST gcc-6.3.0-patches-1.0.tar.bz2 7596 SHA256 6c880468ffa4ad2b324fd18c762dbdf10646089c8ab865c228e166f99a0e049c SHA512 8fc96086bd3da3726687ee9d180d3b5d0a7d5814141d44eac8eb01566a783ec780c8fb8f55f75d6e9c9006b2e407e20cdb5835d541b0b66a47dd60642861734c WHIRLPOOL b1bce94d6134db6c9aff4298c6c7af003e39d0411aa40cd027d2c7d6a256971c81fb557e85b25f1107e9a474cb7d772c3bc62a7a4ab7ff7fca5eeae5b2ca0c94
+DIST gcc-6.3.0.tar.bz2 99903185 SHA256 f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f SHA512 234dd9b1bdc9a9c6e352216a7ef4ccadc6c07f156006a59759c5e0e6a69f0abcdc14630eff11e3826dd6ba5933a8faa43043f3d1d62df6bd5ab1e82862f9bf78 WHIRLPOOL e79a2d6ad199396b6efd835c1129d049a367174ea33dd3b6247d72461f117c2dd81e5a66f3dd6427ce500e768d3a4453efd0debcb56966d00c7df79d05d54b7d
+DIST gcc-interface-4.9-gpl-2016-src.tar.gz 339037 SHA256 56d7a90c80ff33aa99960b959b281567fd2d9692db78fc07b2827d2905780e20 SHA512 507df314d1890c228c19f458bd51197377deaaa2d6082fe1e71b62b683252ee5fba4adfe2386246e14618b1c77288e0dcb5bf501e2daaca249b6299462c2f6bd WHIRLPOOL e889172210928849cb704562ed2b229748a6779842ebaa29d77dd282a0dee9509b70483bbfe25e0e2137eba00dbb4fedb4ebabfa7639bda25791c52176c50215
+DIST gcc-interface-6-gpl-2017-src.tar.gz 347016 SHA256 dbc4f1cae33fb82d21284af5ea05746e7240f0c9a9a6313c1b69a75ba7a903e2 SHA512 5833303fce5bf812ccbc71f3d3726c0cb877937d75327edb15097c0b7dba58024a52688392906695ab92fb4e5d7a6623671eac9a05d17937dc0270bafcde920a WHIRLPOOL d3e51c9ff876c11c9a15235d8fa7e0d52d36b3e27dc2f2cdaf956511b26d481b25fee25ee7d741c3dcc0334c5f6ce5ec1517d1aac5e1b626dba40d5a1f4299a7
+DIST gnat-gpl-2014-x86_64-linux-bin.tar.gz 236253400 SHA256 8063a8c94df556991474af0f6b479868db7fcea0118f49bc7606db36faeab733 SHA512 5e40a251baac3d0ace78352956ca21a7d294d902d344a9ed7a8d376e900468c283721ebfb773adfedbf4d623ace02536505c0147815a0c1908933ad611ea085e WHIRLPOOL 7287a0cf19ea770dfce492c216850eeaa95edd1846ce813fb44542a5681afc9bacb710ad6bc41cb43d56087d08bb93d525808274ee36f45e66a7ca9da39907b2
+DIST gnat-gpl-2016-src.tar.gz 8857249 SHA256 b23780ab981e3b981c668b79b066ce56bab62a950b83f10c60a2bd5ac0fcb6d5 SHA512 4a5cb58ede5b4ae2887e64f0f2e12e0e06470d320796f06d02f7ddd932ff0d3b40e6d3e98a81138fff6906548a55153c2a186ff4a6e3d23b9dbe01ca582da1f8 WHIRLPOOL b0a7c7ba0de0cc5ca439bba7ed94f597004343b5cecb0b3be76e332e8d90a3e5265dbfee421b1d117f13031082636f364de3f989689562a824dd27a567dd8bd0
+DIST gnat-gpl-2017-src.tar.gz 8783473 SHA256 91c9733fb8f8ca4c42fbcab3bc8a54fc83083126f6e6b630c9a36f3654537c29 SHA512 ae7314a2241107ed4d962dce08306eeb34c5f11e26183935bbb1ccf3a5eb011d6457c1b6fcded93dd0ee9ba31d791971ebe2a5a5a0ae04ff80d87a670325a098 WHIRLPOOL cf98ed36553ddfb54502f10898016017e387920bea074395c3a84047c2ec707734a9299de8c5f2f1931a53e04c24e67f8ab017437fbee7b7a658a6c0bca46e35
+EBUILD gnat-gpl-2016.ebuild 5391 SHA256 2bc49d974cd2ee40fe559879501eaa0c10baeb0b7e772841e5af94ab678ddb0c SHA512 2d30b7cc8b317acc0e371ecbdb0c181c4d8ac18713ee183b2d92be79e1a513a667732417bc0e535e0cc344a00a2bafe47d1c20fd271aa8e55b3422b2e98f7f3e WHIRLPOOL dba91e1132ffed0b9fe6e5ea09d620cb218b2ac6d70b5cb1ff8faccbd5326fe83f3061f849206d510551d1fe95fd47ad5e58fa3081997be424d30a44377f7d71
+EBUILD gnat-gpl-2017.ebuild 4781 SHA256 d8c663ab49f1376ea1aafea2b7443089a754bf964deef3f867c67d7d78fe7979 SHA512 53a1067987480d55264ae95d54d9dfaaf0783d0f971b2b2ce3c6fb9fb6e062255b068c6b515f88f18a28e34540681d871978778bc1136d922639ff98b24b8315 WHIRLPOOL 0a592ade339d4b8e8511bde33162c54adf0d446c0399fffafeafda7f8fe885ba618a224352ca202776150a06ae942b622dad0f30aa401921ed2e9dcc8facd7eb
+MISC metadata.xml 1960 SHA256 e89966798d686642e6452627f8f9c5a924524c35e57141ab0acd961ff8b0c771 SHA512 04f14bcdd96ae4f6e285abfd07de89828eb989ce779aa59decf689920a179d859ffe809d7960e9c3599c2f6fff6ab2aafbb54458da07fa91841c61e0dfca47ab WHIRLPOOL b45fdd92bf46b667af11fe863387fed2ea95545983b60e66e2f831bfd4e3581d892f94161a6991741b2c5075e4ba4f3e60fe1a068f701b84b22d15048858a731
diff --git a/dev-lang/gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la b/dev-lang/gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la
new file mode 100644
index 000000000000..066c8d21681f
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/awk/fixlafiles.awk-no_gcc_la
@@ -0,0 +1,334 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+#
+# Helper functions
+#
+function printn(string) {
+ printf("%s", string)
+}
+function einfo(string) {
+ printf(" \033[32;01m*\033[0m %s\n", string)
+}
+function einfon(string) {
+ printf(" \033[32;01m*\033[0m %s", string)
+}
+function ewarn(string) {
+ printf(" \033[33;01m*\033[0m %s\n", string)
+}
+function ewarnn(string) {
+ printf(" \033[33;01m*\033[0m %s", string)
+}
+function eerror(string) {
+ printf(" \033[31;01m*\033[0m %s\n", string)
+}
+
+#
+# assert(condition, errmsg)
+# assert that a condition is true. Otherwise exit.
+#
+function assert(condition, string) {
+ if (! condition) {
+ printf("%s:%d: assertion failed: %s\n",
+ FILENAME, FNR, string) > "/dev/stderr"
+ _assert_exit = 1
+ exit 1
+ }
+}
+
+#
+# system(command, return)
+# wrapper that normalizes return codes ...
+#
+function dosystem(command, ret) {
+ ret = 0
+ ret = system(command)
+ if (ret == 0)
+ return 1
+ else
+ return 0
+}
+
+#
+# parse_ld_conf(config_file)
+#
+function parse_ld_conf(conf, pipe, ldsoconf_data, CHILD, y) {
+ pipe = "cd /etc; cat " conf " | sort 2>/dev/null"
+ while(((pipe) | getline ldsoconf_data) > 0) {
+ if (ldsoconf_data ~ /^[[:space:]]*#/)
+ continue
+ if (ldsoconf_data == "")
+ continue
+
+ # Handle the "include" keyword
+ if (ldsoconf_data ~ /^include /) {
+ sub(/^include /, "", ldsoconf_data)
+ parse_ld_conf(ldsoconf_data)
+ continue
+ }
+
+ # Remove any trailing comments
+ sub(/#.*$/, "", ldsoconf_data)
+ # Remove any trailing spaces
+ sub(/[[:space:]]+$/, "", ldsoconf_data)
+ # Eat duplicate slashes
+ sub(/\/\//, "/", ldsoconf_data)
+ # Prune trailing /
+ sub(/\/$/, "", ldsoconf_data)
+
+ #
+ # Drop the directory if its a child directory of
+ # one that was already added ...
+ # For example, if we have:
+ # /usr/lib /usr/libexec /usr/lib/mozilla /usr/lib/nss
+ # We really just want to save /usr/lib /usr/libexec
+ #
+ CHILD = 0
+ for (y in DIRLIST) {
+ if (ldsoconf_data ~ "^" DIRLIST[y] "(/|$)") {
+ CHILD = 1
+ break
+ }
+ }
+ if (CHILD) continue
+
+ DIRLIST[++LIBCOUNT] = ldsoconf_data
+ }
+ close(pipe)
+}
+
+BEGIN {
+ #
+ # Get our variables from environment
+ #
+ OLDVER = ENVIRON["OLDVER"]
+ OLDCHOST = ENVIRON["OLDCHOST"]
+
+ if (OLDVER == "") {
+ eerror("Could not get OLDVER!");
+ exit 1
+ }
+
+ # Setup some sane defaults
+ LIBCOUNT = 2
+ HAVE_GCC34 = 0
+ DIRLIST[1] = "/lib"
+ DIRLIST[2] = "/usr/lib"
+
+ #
+ # Walk /etc/ld.so.conf to discover all our library paths
+ #
+ parse_ld_conf("/etc/ld.so.conf")
+
+ #
+ # Get line from gcc's output containing CHOST
+ #
+ pipe = "gcc -print-file-name=libgcc.a 2>/dev/null"
+ if ((!((pipe) | getline TMP_CHOST)) || (TMP_CHOST == "")) {
+ close(pipe)
+
+ # If we fail to get the CHOST, see if we can get the CHOST
+ # portage thinks we are using ...
+ pipe = "/usr/bin/portageq envvar 'CHOST'"
+ assert(((pipe) | getline CHOST), "(" pipe ") | getline CHOST")
+ } else {
+ # Check pre gcc-3.4.x versions
+ CHOST = gensub("^.+lib/gcc-lib/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST)
+
+ if (CHOST == TMP_CHOST || CHOST == "") {
+ # Check gcc-3.4.x or later
+ CHOST = gensub("^.+lib/gcc/([^/]+)/[0-9]+.+$", "\\1", 1, TMP_CHOST);
+
+ if (CHOST == TMP_CHOST || CHOST == "")
+ CHOST = ""
+ else
+ HAVE_GCC34 = 1
+ }
+ }
+ close(pipe)
+
+ if (CHOST == "") {
+ eerror("Could not get gcc's CHOST!")
+ exit 1
+ }
+
+ if (OLDCHOST != "")
+ if (OLDCHOST == CHOST)
+ OLDCHOST = ""
+
+ GCCLIBPREFIX_OLD = "/usr/lib/gcc-lib/"
+ GCCLIBPREFIX_NEW = "/usr/lib/gcc/"
+
+ if (HAVE_GCC34)
+ GCCLIBPREFIX = GCCLIBPREFIX_NEW
+ else
+ GCCLIBPREFIX = GCCLIBPREFIX_OLD
+
+ GCCLIB = GCCLIBPREFIX CHOST
+
+ if (OLDCHOST != "") {
+ OLDGCCLIB1 = GCCLIBPREFIX_OLD OLDCHOST
+ OLDGCCLIB2 = GCCLIBPREFIX_NEW OLDCHOST
+ }
+
+ # Get current gcc's version
+ pipe = "gcc -dumpversion"
+ assert(((pipe) | getline NEWVER), "(" pipe ") | getline NEWVER)")
+ close(pipe)
+
+ if (NEWVER == "") {
+ eerror("Could not get gcc's version!")
+ exit 1
+ }
+
+ # Nothing to do ?
+ # NB: Do not check for (OLDVER == NEWVER) anymore, as we might need to
+ # replace libstdc++.la ....
+ if ((OLDVER == "") && (OLDCHOST == ""))
+ exit 0
+
+ #
+ # Ok, now let's scan for the .la files and actually fix them up
+ #
+ for (x = 1; x <= LIBCOUNT; x++) {
+ # Do nothing if the target dir is gcc's internal library path
+ if (DIRLIST[x] ~ GCCLIBPREFIX_OLD ||
+ DIRLIST[x] ~ GCCLIBPREFIX_NEW)
+ continue
+
+ einfo(" [" x "/" LIBCOUNT "] Scanning " DIRLIST[x] " ...")
+
+ pipe = "find " DIRLIST[x] "/ -name '*.la' 2>/dev/null"
+ while (((pipe) | getline la_files) > 0) {
+
+ # Do nothing if the .la file is located in gcc's internal lib path
+ if (la_files ~ GCCLIBPREFIX_OLD ||
+ la_files ~ GCCLIBPREFIX_NEW)
+ continue
+
+ CHANGED = 0
+ CHOST_CHANGED = 0
+
+ # See if we need to fix the .la file
+ while ((getline la_data < (la_files)) > 0) {
+ if (OLDCHOST != "") {
+ if ((gsub(OLDGCCLIB1 "[/[:space:]]+",
+ GCCLIB, la_data) > 0) ||
+ (gsub(OLDGCCLIB2 "[/[:space:]]+",
+ GCCLIB, la_data) > 0)) {
+ CHANGED = 1
+ CHOST_CHANGED = 1
+ }
+ }
+ if (OLDVER != NEWVER) {
+ if ((gsub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "[/[:space:]]*",
+ GCCLIB "/" NEWVER, la_data) > 0) ||
+ (gsub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "[/[:space:]]*",
+ GCCLIB "/" NEWVER, la_data) > 0))
+ CHANGED = 1
+ }
+ # We now check if we have libstdc++.la, as we remove the
+ # libtool linker scripts for gcc ...
+ # We do this last, as we only match the new paths
+ if (gsub(GCCLIB "/" NEWVER "/libstdc\\+\\+\\.la",
+ "-lstdc++", la_data) > 0)
+ CHANGED = 1
+ }
+ close(la_files)
+
+ # Do the actual changes in a second loop, as we can then
+ # verify that CHOST_CHANGED among things is correct ...
+ if (CHANGED) {
+ ewarnn(" FIXING: " la_files " ...[")
+
+ # Clear the temp file (removing rather than '>foo' is better
+ # out of a security point of view?)
+ dosystem("rm -f " la_files ".new")
+
+ while ((getline la_data < (la_files)) > 0) {
+ if (OLDCHOST != "") {
+ tmpstr = gensub(OLDGCCLIB1 "([/[:space:]]+)",
+ GCCLIB "\\1", "g", la_data)
+ tmpstr = gensub(OLDGCCLIB2 "([/[:space:]]+)",
+ GCCLIB "\\1", "g", tmpstr)
+
+ if (la_data != tmpstr) {
+ printn("c")
+ la_data = tmpstr
+ }
+
+ if (CHOST_CHANGED > 0) {
+ # We try to be careful about CHOST changes outside
+ # the gcc library path (meaning we cannot match it
+ # via /GCCLIBPREFIX CHOST/) ...
+
+ # Catch:
+ #
+ # dependency_libs=' -L/usr/CHOST/{bin,lib}'
+ #
+ gsub("-L/usr/" OLDCHOST "/",
+ "-L/usr/" CHOST "/", la_data)
+ # Catch:
+ #
+ # dependency_libs=' -L/usr/lib/gcc-lib/CHOST/VER/../../../../CHOST/lib'
+ #
+ la_data = gensub("(" GCCLIB "/[^[:space:]]+)/" OLDCHOST "/",
+ "\\1/" CHOST "/", "g", la_data)
+ }
+ }
+
+ if (OLDVER != NEWVER) {
+ # Catch:
+ #
+ # dependency_libs=' -L/usr/lib/gcc/CHOST/VER'
+ #
+ tmpstr = gensub(GCCLIBPREFIX_OLD CHOST "/" OLDVER "([/[:space:]]+)",
+ GCCLIB "/" NEWVER "\\1", "g", la_data)
+ tmpstr = gensub(GCCLIBPREFIX_NEW CHOST "/" OLDVER "([/[:space:]]+)",
+ GCCLIB "/" NEWVER "\\1", "g", tmpstr)
+
+ if (la_data != tmpstr) {
+ # Catch:
+ #
+ # dependency_libs=' -L/usr/lib/gcc-lib/../../CHOST/lib'
+ #
+ # in cases where we have gcc34
+ tmpstr = gensub(GCCLIBPREFIX_OLD "(../../" CHOST "/lib)",
+ GCCLIBPREFIX "\\1", "g", tmpstr)
+ tmpstr = gensub(GCCLIBPREFIX_NEW "(../../" CHOST "/lib)",
+ GCCLIBPREFIX "\\1", "g", tmpstr)
+ printn("v")
+ la_data = tmpstr
+ }
+ }
+
+ # We now check if we have libstdc++.la, as we remove the
+ # libtool linker scripts for gcc and any referencese in any
+ # libtool linker scripts.
+ # We do this last, as we only match the new paths
+ tmpstr = gensub(GCCLIB "/" NEWVER "/libstdc\\+\\+\\.la",
+ "-lstdc++", "g", la_data);
+ if (la_data != tmpstr) {
+ printn("l")
+ la_data = tmpstr
+ }
+
+ print la_data >> (la_files ".new")
+ }
+
+ if (CHANGED)
+ print "]"
+
+ close(la_files)
+ close(la_files ".new")
+
+ assert(dosystem("mv -f " la_files ".new " la_files),
+ "dosystem(\"mv -f " la_files ".new " la_files "\")")
+ }
+ }
+
+ close(pipe)
+ }
+}
+
+# vim:ts=4
diff --git a/dev-lang/gnat-gpl/files/c89 b/dev-lang/gnat-gpl/files/c89
new file mode 100644
index 000000000000..cee0325f50f1
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/c89
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+# Call the appropriate C compiler with options to accept ANSI/ISO C
+# The following options are the same (as of gcc-2.95):
+# -ansi
+# -std=c89
+# -std=iso9899:1990
+
+for i; do
+ case "$i" in
+ -ansi|-std=c89|-std=iso9899:1990)
+ ;;
+ -std=*)
+ echo >&2 "`basename $0` called with non ANSI/ISO C90 option $i"
+ exit 1
+ ;;
+ esac
+done
+
+exec gcc -std=c89 -pedantic -U_FORTIFY_SOURCE "$@"
diff --git a/dev-lang/gnat-gpl/files/c99 b/dev-lang/gnat-gpl/files/c99
new file mode 100644
index 000000000000..c9542095e385
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/c99
@@ -0,0 +1,21 @@
+#! /bin/sh
+
+# Call the appropriate C compiler with options to accept ANSI/ISO C
+# The following options are the same (as of gcc-3.3):
+# -std=c99
+# -std=c9x
+# -std=iso9899:1999
+# -std=iso9899:199x
+
+for i; do
+ case "$i" in
+ -std=c9[9x]|-std=iso9899:199[9x])
+ ;;
+ -ansi|-std=*)
+ echo >&2 "`basename $0` called with non ANSI/ISO C99 option $i"
+ exit 1
+ ;;
+ esac
+done
+
+exec gcc -std=c99 -pedantic -U_FORTIFY_SOURCE ${1+"$@"}
diff --git a/dev-lang/gnat-gpl/files/fix_libtool_files.sh b/dev-lang/gnat-gpl/files/fix_libtool_files.sh
new file mode 100644
index 000000000000..28f9beb36bac
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/fix_libtool_files.sh
@@ -0,0 +1,66 @@
+#!/bin/sh
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+usage() {
+cat << "USAGE_END"
+Usage: fix_libtool_files.sh <old-gcc-version> [--oldarch <old-CHOST>]
+
+ Where <old-gcc-version> is the version number of the
+ previous gcc version. For example, if you updated to
+ gcc-3.2.1, and you had gcc-3.2 installed, run:
+
+ # fix_libtool_files.sh 3.2
+
+ If you updated to gcc-3.2.3, and the old CHOST was i586-pc-linux-gnu
+ but you now have CHOST as i686-pc-linux-gnu, run:
+
+ # fix_libtool_files.sh 3.2 --oldarch i586-pc-linux-gnu
+
+ Note that if only the CHOST and not the version changed, you can run
+ it with the current version and the '--oldarch <old-CHOST>' arguments,
+ and it will do the expected:
+
+ # fix_libtool_files.sh `gcc -dumpversion` --oldarch i586-pc-linux-gnu
+
+USAGE_END
+ exit 1
+}
+
+case $2 in
+--oldarch) [ $# -ne 3 ] && usage ;;
+*) [ $# -ne 1 ] && usage ;;
+esac
+
+ARGV1=$1
+ARGV2=$2
+ARGV3=$3
+
+. /etc/profile || exit 1
+
+if [ ${EUID:-0} -ne 0 ] ; then
+ echo "${0##*/}: Must be root."
+ exit 1
+fi
+
+# make sure the files come out sane
+umask 0022
+
+OLDCHOST=
+[ "${ARGV2}" = "--oldarch" ] && OLDCHOST=${ARGV3}
+
+AWKDIR="/usr/share/gcc-data"
+
+if [ ! -r "${AWKDIR}/fixlafiles.awk" ] ; then
+ echo "${0##*/}: ${AWKDIR}/fixlafiles.awk does not exist!"
+ exit 1
+fi
+
+OLDVER=${ARGV1}
+
+export OLDVER OLDCHOST
+
+echo "Scanning libtool files for hardcoded gcc library paths..."
+exec gawk -f "${AWKDIR}/fixlafiles.awk"
+
+# vim:ts=4
diff --git a/dev-lang/gnat-gpl/files/gcc-configure-LANG.patch b/dev-lang/gnat-gpl/files/gcc-configure-LANG.patch
new file mode 100644
index 000000000000..d1b1b0353662
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/gcc-configure-LANG.patch
@@ -0,0 +1,64 @@
+The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
+option parsing, it may break.
+
+http://bugs.gentoo.org/103483
+
+--- configure
++++ configure
+@@ -54,6 +54,19 @@
+ infodir='${prefix}/info'
+ mandir='${prefix}/man'
+
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
++ eval $as_var=C; export $as_var
++ else
++ unset $as_var
++ fi
++done
++
+ # Initialize some other variables.
+ subdirs=
+ MFLAGS= MAKEFLAGS=
+@@ -452,16 +463,6 @@
+ esac
+ done
+
+-# NLS nuisances.
+-# Only set these to C if already set. These must not be set unconditionally
+-# because not all systems understand e.g. LANG=C (notably SCO).
+-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+-# Non-C LC_CTYPE values break the ctype check.
+-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+-
+ # confdefs.h avoids OS command line length limits that DEFS can exceed.
+ rm -rf conftest* confdefs.h
+ # AIX cpp loses on an empty file, so make sure it contains at least a newline.
+@@ -1850,6 +1850,19 @@
+ # Compiler output produced by configure, useful for debugging
+ # configure, is in ./config.log if it exists.
+
++# NLS nuisances.
++for as_var in \
++ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
++ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
++ LC_TELEPHONE LC_TIME
++do
++ if (set +x; test -z "`(eval \$as_var=C; export \$as_var) 2>&1`"); then
++ eval \$as_var=C; export \$as_var
++ else
++ unset \$as_var
++ fi
++done
++
+ ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+ for ac_option
+ do
diff --git a/dev-lang/gnat-gpl/files/gcc-configure-texinfo.patch b/dev-lang/gnat-gpl/files/gcc-configure-texinfo.patch
new file mode 100644
index 000000000000..ddc098ddbd58
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/gcc-configure-texinfo.patch
@@ -0,0 +1,16 @@
+Chances are quite good that the installed makeinfo is sufficient.
+So ignore false positives where the makeinfo installed is so new
+that it violates the cheesy version grep.
+
+http://bugs.gentoo.org/198182
+
+--- configure
++++ configure
+@@ -3573,6 +3573,6 @@
+ :
+ else
+- MAKEINFO="$MISSING makeinfo"
++ :
+ fi
+ ;;
+
diff --git a/dev-lang/gnat-gpl/files/gcc-spec-env-r1.patch b/dev-lang/gnat-gpl/files/gcc-spec-env-r1.patch
new file mode 100644
index 000000000000..a58926836e4e
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/gcc-spec-env-r1.patch
@@ -0,0 +1,87 @@
+2013-08-22 Magnus Granberg <zorry@gentoo.org>
+
+ * gcc/gcc.c (main): Add support for external spec file via the GCC_SPECS env var
+ and move the process of the user specifed specs.
+
+ This allows us to easily control pie/ssp defaults with gcc-config profiles.
+ Original patch by Rob Holland
+ Extended to support multiple entries separated by ':' by Kevin F. Quinn
+ Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
+ Modified to process the GCC_SPECS env var befor DRIVER_SELF_SPECS by Magnus Granberg
+
+--- gcc-4.8-20130210/gcc/gcc.c 2013-02-05 16:55:31.000000000 +0100
++++ gcc-4.8-20130210-work/gcc/gcc.c 2013-07-26 02:32:14.625089864 +0200
+@@ -6427,6 +6428,48 @@ main (int argc, char **argv)
+ do_option_spec (option_default_specs[i].name,
+ option_default_specs[i].spec);
+
++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32))
++ /* Add specs listed in GCC_SPECS. Note; in the process of separating
++ * each spec listed, the string is overwritten at token boundaries
++ * (':') with '\0', an effect of strtok_r().
++ */
++ specs_file = getenv ("GCC_SPECS");
++ if (specs_file && (strlen(specs_file) > 0))
++ {
++ char *spec, *saveptr;
++ for (spec=strtok_r(specs_file,":",&saveptr);
++ spec!=NULL;
++ spec=strtok_r(NULL,":",&saveptr))
++ {
++ struct user_specs *user = (struct user_specs *)
++ xmalloc (sizeof (struct user_specs));
++ user->next = (struct user_specs *) 0;
++ user->filename = spec;
++ if (user_specs_tail)
++ user_specs_tail->next = user;
++ else
++ user_specs_head = user;
++ user_specs_tail = user;
++ }
++ }
++#endif
++ /* Process any user specified specs in the order given on the command
++ * line. */
++ for (uptr = user_specs_head; uptr; uptr = uptr->next)
++ {
++ char *filename = find_a_file (&startfile_prefixes, uptr->filename,
++ R_OK, true);
++ read_specs (filename ? filename : uptr->filename, false, true);
++ }
++ /* Process any user self specs. */
++ {
++ struct spec_list *sl;
++ for (sl = specs; sl; sl = sl->next)
++ if (sl->name_len == sizeof "self_spec" - 1
++ && !strcmp (sl->name, "self_spec"))
++ do_self_spec (*sl->ptr_spec);
++ }
++
+ /* Process DRIVER_SELF_SPECS, adding any new options to the end
+ of the command line. */
+
+@@ -6535,24 +6578,6 @@ main (int argc, char **argv)
+ PREFIX_PRIORITY_LAST, 0, 1);
+ }
+
+- /* Process any user specified specs in the order given on the command
+- line. */
+- for (uptr = user_specs_head; uptr; uptr = uptr->next)
+- {
+- char *filename = find_a_file (&startfile_prefixes, uptr->filename,
+- R_OK, true);
+- read_specs (filename ? filename : uptr->filename, false, true);
+- }
+-
+- /* Process any user self specs. */
+- {
+- struct spec_list *sl;
+- for (sl = specs; sl; sl = sl->next)
+- if (sl->name_len == sizeof "self_spec" - 1
+- && !strcmp (sl->name, "self_spec"))
+- do_self_spec (*sl->ptr_spec);
+- }
+-
+ if (compare_debug)
+ {
+ enum save_temps save;
diff --git a/dev-lang/gnat-gpl/files/gnat-gpl-2016-gentoo.patch b/dev-lang/gnat-gpl/files/gnat-gpl-2016-gentoo.patch
new file mode 100644
index 000000000000..ba037507aff3
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/gnat-gpl-2016-gentoo.patch
@@ -0,0 +1,57 @@
+--- patch/09_all_default-ssp.patch.old 2017-01-08 16:14:09.377755019 +0100
++++ patch/09_all_default-ssp.patch 2017-01-08 16:15:48.792764201 +0100
+@@ -78,14 +78,14 @@
+ optimizing. The default value is 32.
+ --- a/gcc/cp/lang-specs.h
+ +++ b/gcc/cp/lang-specs.h
+-@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3. If not see
++@@ -46,7 +46,7 @@
+ %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\
+ cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\
+ %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\
+ - %(cc1_options) %2\
+ + %(cc1_options) %(ssp_default) %2\
+- %{!fsyntax-only:%{!fdump-ada-spec*:-o %g.s %{!o*:--output-pch=%i.gch}\
+- %W{o*:--output-pch=%*}}%V}}}}",
++ %{!fsyntax-only:-o %g.s %{!fdump-ada-spec*:%{!fdump-xref*:%{!o*:--output-pch=%i.gch}\
++ %W{o*:--output-pch=%*}}}%V}}}}",
+ CPLUSPLUS_CPP_SPEC, 0, 0},
+ @@ -57,11 +57,11 @@ along with GCC; see the file COPYING3. If not see
+ %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\
+@@ -151,14 +151,14 @@
+ /* This contains cpp options which are not passed when the preprocessor
+ output will be used by another program. */
+ @@ -1015,9 +1024,9 @@ static const struct compiler default_compilers[] =
+- %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
++ %{save-temps*|fdump-scos|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
+ %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\
+ cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \
+ - %(cc1_options)}\
+ + %(cc1_options) %(ssp_default)}\
+- %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\
+-- cc1 %(cpp_unique_options) %(cc1_options)}}}\
+-+ cc1 %(cpp_unique_options) %(cc1_options) %(ssp_default)}}}\
++ %{!save-temps*:%{!fdump-scos:%{!traditional-cpp:%{!no-integrated-cpp:\
++- cc1 %(cpp_unique_options) %(cc1_options)}}}}\
+++ cc1 %(cpp_unique_options) %(cc1_options) %(ssp_default)}}}}\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1},
+ {"-",
+ "%{!E:%e-E or -x required when input is from standard input}\
+--- gcc-4.9-gpl-2016-src/gcc/ada/osint.adb.old 2017-03-10 21:58:02.600710156 +0100
++++ gcc-4.9-gpl-2016-src/gcc/ada/osint.adb 2017-03-10 21:59:38.033983293 +0100
+@@ -2229,14 +2229,11 @@
+ for J in Start_Of_Prefix .. Name_Len - Prog'Length + 1 loop
+ if Name_Buffer (J .. J + Prog'Length - 1) = Prog then
+ End_Of_Prefix := J - 1;
++ Start_Of_Suffix := J + Prog'Length;
+ exit;
+ end if;
+ end loop;
+
+- if End_Of_Prefix > 1 then
+- Start_Of_Suffix := End_Of_Prefix + Prog'Length + 1;
+- end if;
+-
+ -- Create the new program name
+
+ return new String'
diff --git a/dev-lang/gnat-gpl/files/gnat-gpl-2017-gentoo.patch b/dev-lang/gnat-gpl/files/gnat-gpl-2017-gentoo.patch
new file mode 100644
index 000000000000..442e1ad76577
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/gnat-gpl-2017-gentoo.patch
@@ -0,0 +1,32 @@
+--- patch/13_all_default-ssp-fix.patch.old 2017-06-14 11:29:28.997183865 +0200
++++ patch/13_all_default-ssp-fix.patch 2017-06-14 12:24:15.042271863 +0200
+@@ -39,9 +39,9 @@
+ %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
+ %{fsyntax-only:-o %j} %{-param*}\
+ + %{nostdlib:-nostdlib}\
+- %{coverage:-fprofile-arcs -ftest-coverage}";
++ %{coverage:-fprofile-arcs -ftest-coverage}\
++ %{fdump-scos:-fpreserve-decisions-generic}";
+
+- static const char *asm_options =
+ --- a/gcc/params.def 2016-03-30 09:47:40.000000000 +0200
+ +++ b/gcc/params.def 2016-09-19 12:56:58.443179039 +0200
+ @@ -673,7 +673,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT,
+--- gcc-6-gpl-2017-src/gcc/ada/osint.adb.old 2017-03-10 21:58:02.600710156 +0100
++++ gcc-6-gpl-2017-src/gcc/ada/osint.adb 2017-03-10 21:59:38.033983293 +0100
+@@ -2229,14 +2229,11 @@
+ for J in Start_Of_Prefix .. Name_Len - Prog'Length + 1 loop
+ if Name_Buffer (J .. J + Prog'Length - 1) = Prog then
+ End_Of_Prefix := J - 1;
++ Start_Of_Suffix := J + Prog'Length;
+ exit;
+ end if;
+ end loop;
+
+- if End_Of_Prefix > 1 then
+- Start_Of_Suffix := End_Of_Prefix + Prog'Length + 1;
+- end if;
+-
+ -- Create the new program name
+
+ return new String'
diff --git a/dev-lang/gnat-gpl/gnat-gpl-2016.ebuild b/dev-lang/gnat-gpl/gnat-gpl-2016.ebuild
new file mode 100644
index 000000000000..89ff9031378a
--- /dev/null
+++ b/dev-lang/gnat-gpl/gnat-gpl-2016.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PATCH_VER="1.0"
+UCLIBC_VER="1.0"
+
+# Hardened gcc 4 stuff
+PIE_VER="0.6.4"
+SPECS_VER="0.2.0"
+SPECS_GCC_VER="4.4.3"
+# arch/libc configurations known to be stable with {PIE,SSP}-by-default
+PIE_GLIBC_STABLE="x86 amd64 mips ppc ppc64 arm ia64"
+PIE_UCLIBC_STABLE="x86 arm amd64 mips ppc ppc64"
+SSP_STABLE="amd64 x86 mips ppc ppc64 arm"
+# uclibc need tls and nptl support for SSP support
+# uclibc need to be >= 0.9.33
+SSP_UCLIBC_STABLE="x86 amd64 mips ppc ppc64 arm"
+#end Hardened stuff
+
+TOOLCHAIN_GCC_PV=4.9.4
+
+inherit eutils toolchain-funcs toolchain
+
+REL=4.9
+MYP=gcc-${REL}-gpl-${PV}-src
+
+DESCRIPTION="GNAT Ada Compiler - GPL version"
+HOMEPAGE="http://libre.adacore.com/"
+SRC_URI+="
+ http://mirrors.cdn.adacore.com/art/57399304c7a447658e0aff7f
+ -> ${P}-src.tar.gz
+ http://mirrors.cdn.adacore.com/art/573992d4c7a447658d00e1db
+ -> ${MYP}.tar.gz
+ http://mirrors.cdn.adacore.com/art/57399232c7a447658e0aff7d
+ -> gcc-interface-${REL}-gpl-${PV}-src.tar.gz
+ bootstrap? ( http://mirrors.cdn.adacore.com/art/564b3ebec8e196b040fbe66c ->
+ gnat-gpl-2014-x86_64-linux-bin.tar.gz )"
+
+LICENSE+=" GPL-2 GPL-3"
+SLOT="${TOOLCHAIN_GCC_PV}"
+KEYWORDS="~amd64"
+IUSE="bootstrap"
+
+RDEPEND="!sys-devel/gcc:${TOOLCHAIN_GCC_PV}"
+DEPEND="${RDEPEND}
+ elibc_glibc? ( >=sys-libs/glibc-2.8 )
+ >=sys-devel/binutils-2.20"
+
+S="${WORKDIR}"/${MYP}
+
+FSFGCC=gcc-${TOOLCHAIN_GCC_PV}
+
+pkg_setup() {
+ if use bootstrap; then
+ GCC="${WORKDIR}"/gnat-gpl-2014-x86_64-linux-bin/bin/gcc
+ else
+ GCC=${ADA:-$(tc-getCC)}
+ fi
+ CC=${GCC}
+ local base=$(basename ${GCC})
+ CXX="${base/gcc/g++}"
+ GNATMAKE="${base/gcc/gnatmake}"
+ GNATBIND="${base/gcc/gnatbind}"
+ if [[ ${base} != ${GCC} ]] ; then
+ local path=$(dirname ${GCC})
+ GNATMAKE="${path}/${GNATMAKE}"
+ GNATBIND="${path}/${GNATBIND}"
+ CXX="${path}/${CXX}"
+ fi
+ if ! use bootstrap && [[ -z "$(type ${GNATMAKE} 2>/dev/null)" ]] ; then
+ eerror "You need a gcc compiler that provides the Ada Compiler:"
+ eerror "1) use gcc-config to select the right compiler or"
+ eerror "2) set the bootstrap use flag"
+ die "ada compiler not available"
+ fi
+}
+
+src_unpack() {
+ GCC_A_FAKEIT="${P}-src.tar.gz
+ ${MYP}.tar.gz
+ ${FSFGCC}.tar.bz2
+ gcc-interface-${REL}-gpl-${PV}-src.tar.gz"
+ if use bootstrap; then
+ GCC_A_FAKEIT="${GCC_A_FAKEIT} gnat-gpl-2014-x86_64-linux-bin.tar.gz"
+ fi
+
+ toolchain_src_unpack
+ if use bootstrap; then
+ rm gnat-gpl-2014-x86_64-linux-bin/libexec/gcc/x86_64-pc-linux-gnu/4.7.4/ld || die
+ fi
+}
+
+src_prepare() {
+ mv ../gnat-gpl-${PV}-src/src/ada gcc/ || die
+ mv ../gcc-interface-${REL}-gpl-${PV}-src gcc/ada/gcc-interface || die
+
+ sed -i \
+ -e "s:gnatmake:${GNATMAKE}:g" \
+ gcc/ada/Make-generated.in || die "sed failed"
+
+ sed -i \
+ -e "/xoscons/s:gnatmake:${GNATMAKE}:g" \
+ gcc/ada/gcc-interface/Makefile.in || die "sed failed"
+
+ mv ../${FSFGCC}/gcc/doc/gcc.info gcc/doc/ || die
+ mv ../${FSFGCC}/libjava . || die
+ rm -r ../${FSFGCC} || die
+
+ cd ..
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ rm patch/10_all_default-fortify-source.patch
+ rm piepatch/34_all_gcc48_config_i386.patch
+ cd -
+
+ if has_version '<sys-libs/glibc-2.12' ; then
+ ewarn "Your host glibc is too old; disabling automatic fortify."
+ ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315"
+ EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
+ fi
+
+ toolchain_src_prepare
+
+ use vanilla && return 0
+ #Use -r1 for newer piepatchet that use DRIVER_SELF_SPECS for the hardened specs.
+ [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env-r1.patch
+}
+
+src_configure() {
+ local trueGCC_BRANCH_VER=${GCC_BRANCH_VER}
+ GCC_BRANCH_VER=$(gcc-version)
+ downgrade_arch_flags
+ GCC_BRANCH_VER=${trueGCC_BRANCH_VER}
+ toolchain_src_configure \
+ --enable-languages=ada \
+ --disable-libada \
+ CC=${GCC} \
+ GNATBIND=${GNATBIND} \
+ GNATMAKE=yes
+}
+
+src_compile() {
+ unset ADAFLAGS
+ toolchain_src_compile
+ gcc_do_make "-C gcc gnatlib-shared"
+ ln -s gcc ../build/prev-gcc || die
+ ln -s x86_64-pc-linux-gnu ../build/prev-x86_64-pc-linux-gnu || die
+ gcc_do_make "-C gcc gnattools"
+}
+
+src_install() {
+ toolchain_src_install
+ cd "${D}"${BINPATH}
+ for x in gnat*; do
+ # For some reason, g77 gets made instead of ${CTARGET}-g77...
+ # this should take care of that
+ if [[ -f ${x} ]] ; then
+ # In case they're hardlinks, clear out the target first
+ # otherwise the mv below will complain.
+ rm -f ${CTARGET}-${x}
+ mv ${x} ${CTARGET}-${x}
+ fi
+
+ if [[ -f ${CTARGET}-${x} ]] ; then
+ if ! is_crosscompile ; then
+ ln -sf ${CTARGET}-${x} ${x}
+ dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
+ /usr/bin/${x}-${GCC_CONFIG_VER}
+ fi
+ # Create versioned symlinks
+ dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
+ /usr/bin/${CTARGET}-${x}-${GCC_CONFIG_VER}
+ fi
+
+ if [[ -f ${CTARGET}-${x}-${GCC_CONFIG_VER} ]] ; then
+ rm -f ${CTARGET}-${x}-${GCC_CONFIG_VER}
+ ln -sf ${CTARGET}-${x} ${CTARGET}-${x}-${GCC_CONFIG_VER}
+ fi
+ done
+}
+
+pkg_postinst () {
+ toolchain_pkg_postinst
+ einfo "This provide the GNAT compiler with gcc for ada/c/c++ and more"
+ einfo "Set the ADA variables to gcc-${TOOLCHAIN_GCC_PV} in your make.conf"
+ einfo "Even if the c/c++ compilers are using almost the same patched"
+ einfo "source as the sys-devel/gcc package its use is not extensively"
+ einfo "tested, and not supported for updating your system, except for ada"
+ einfo "related packages"
+}
diff --git a/dev-lang/gnat-gpl/gnat-gpl-2017.ebuild b/dev-lang/gnat-gpl/gnat-gpl-2017.ebuild
new file mode 100644
index 000000000000..50234668a010
--- /dev/null
+++ b/dev-lang/gnat-gpl/gnat-gpl-2017.ebuild
@@ -0,0 +1,176 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PATCH_VER="1.0"
+
+TOOLCHAIN_GCC_PV=6.3.0
+
+inherit eutils toolchain-funcs toolchain
+
+REL=6
+MYP=gcc-${REL}-gpl-${PV}-src
+
+DESCRIPTION="GNAT Ada Compiler - GPL version"
+HOMEPAGE="http://libre.adacore.com/"
+SRC_URI+="
+ http://mirrors.cdn.adacore.com/art/591adbb4c7a4473fcc4532a3
+ -> ${P}-src.tar.gz
+ http://mirrors.cdn.adacore.com/art/591adb65c7a4473fcbb153ac
+ -> ${MYP}.tar.gz
+ http://mirrors.cdn.adacore.com/art/591adbc5c7a4473fcbb153ae
+ -> gcc-interface-${REL}-gpl-${PV}-src.tar.gz
+ bootstrap? (
+ http://mirrors.cdn.adacore.com/art/564b3ebec8e196b040fbe66c ->
+ gnat-gpl-2014-x86_64-linux-bin.tar.gz
+ )"
+
+LICENSE+=" GPL-2 GPL-3"
+SLOT="${TOOLCHAIN_GCC_PV}"
+KEYWORDS="~amd64"
+IUSE="bootstrap"
+
+RDEPEND="!sys-devel/gcc:${TOOLCHAIN_GCC_PV}"
+DEPEND="${RDEPEND}
+ elibc_glibc? ( >=sys-libs/glibc-2.13 )
+ >=sys-devel/binutils-2.20"
+
+S="${WORKDIR}"/${MYP}
+PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )"
+FSFGCC=gcc-${TOOLCHAIN_GCC_PV}
+
+pkg_setup() {
+ toolchain_pkg_setup
+ if use bootstrap; then
+ GCC="${WORKDIR}"/gnat-gpl-2014-x86_64-linux-bin/bin/gcc
+ else
+ GCC=${ADA:-$(tc-getCC)}
+ fi
+
+ gnatbase=$(basename ${GCC})
+ gnatpath=$(dirname ${GCC})
+
+ GNATMAKE=${gnatbase/gcc/gnatmake}
+ if [[ ${gnatpath} != "." ]] ; then
+ GNATMAKE="${gnatpath}/${GNATMAKE}"
+ fi
+
+ if ! use bootstrap && [[ -z "$(type ${GNATMAKE} 2>/dev/null)" ]] ; then
+ eerror "You need a gcc compiler that provides the Ada Compiler:"
+ eerror "1) use gcc-config to select the right compiler or"
+ eerror "2) set the bootstrap use flag"
+ die "ada compiler not available"
+ fi
+}
+
+src_unpack() {
+ GCC_A_FAKEIT="
+ ${P}-src.tar.gz
+ ${MYP}.tar.gz
+ gcc-interface-${REL}-gpl-${PV}-src.tar.gz"
+ if use bootstrap; then
+ GCC_A_FAKEIT="${GCC_A_FAKEIT} gnat-gpl-2014-x86_64-linux-bin.tar.gz"
+ fi
+
+ toolchain_src_unpack
+ if use bootstrap; then
+ rm gnat-gpl-2014-x86_64-linux-bin/libexec/gcc/x86_64-pc-linux-gnu/4.7.4/ld || die
+ fi
+}
+
+src_prepare() {
+ CC=${GCC}
+ CXX="${gnatbase/gcc/g++}"
+ GNATBIND="${gnatbase/gcc/gnatbind}"
+ GNATLINK="${gnatbase/gcc/gnatlink}"
+ GNATLS="${gnatbase/gcc/gnatls}"
+ if [[ ${gnatpath} != "." ]] ; then
+ CXX="${gnatpath}/${CXX}"
+ GNATBIND="${gnatpath}/${GNATBIND}"
+ GNATLINK="${gnatpath}/${GNATLINK}"
+ GNATLS="${gnatpath}/${GNATLS}"
+ fi
+ mkdir bin || die
+ ln -s $(which ${GCC}) bin/gcc || die
+ ln -s $(which ${CXX}) bin/g++ || die
+ ln -s $(which ${GNATMAKE}) bin/gnatmake || die
+ ln -s $(which ${GNATBIND}) bin/gnatbind || die
+ ln -s $(which ${GNATLINK}) bin/gnatlink || die
+ ln -s $(which ${GNATLS}) bin/gnatls || die
+
+ echo ${TOOLCHAIN_GCC_PV} > gcc/BASE-VER
+
+ cd ..
+ mv gnat-gpl-${PV}-src/src/ada ${MYP}/gcc/ || die
+ mv gcc-interface-${REL}-gpl-${PV}-src ${MYP}/gcc/ada/gcc-interface || die
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ cd -
+ sed -i \
+ -e 's:$(P) ::g' \
+ gcc/ada/gcc-interface/Makefile.in \
+ || die "sed failed"
+ toolchain_src_prepare
+}
+
+src_configure() {
+ export PATH=${PWD}/bin:${PATH}
+ local trueGCC_BRANCH_VER=${GCC_BRANCH_VER}
+ GCC_BRANCH_VER=$(gcc-version)
+ downgrade_arch_flags
+ GCC_BRANCH_VER=${trueGCC_BRANCH_VER}
+ toolchain_src_configure \
+ --enable-languages=ada \
+ --disable-libada
+}
+
+src_compile() {
+ unset ADAFLAGS
+ toolchain_src_compile
+ gcc_do_make "-C gcc gnatlib-shared"
+ ln -s gcc ../build/prev-gcc || die
+ ln -s x86_64-pc-linux-gnu ../build/prev-x86_64-pc-linux-gnu || die
+ gcc_do_make "-C gcc gnattools"
+}
+
+src_install() {
+ toolchain_src_install
+ cd "${D}"${BINPATH}
+ for x in gnat*; do
+ # For some reason, g77 gets made instead of ${CTARGET}-g77...
+ # this should take care of that
+ if [[ -f ${x} ]] ; then
+ # In case they're hardlinks, clear out the target first
+ # otherwise the mv below will complain.
+ rm -f ${CTARGET}-${x}
+ mv ${x} ${CTARGET}-${x}
+ fi
+
+ if [[ -f ${CTARGET}-${x} ]] ; then
+ if ! is_crosscompile ; then
+ ln -sf ${CTARGET}-${x} ${x}
+ dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
+ /usr/bin/${x}-${GCC_CONFIG_VER}
+ fi
+ # Create versioned symlinks
+ dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
+ /usr/bin/${CTARGET}-${x}-${GCC_CONFIG_VER}
+ fi
+
+ if [[ -f ${CTARGET}-${x}-${GCC_CONFIG_VER} ]] ; then
+ rm -f ${CTARGET}-${x}-${GCC_CONFIG_VER}
+ ln -sf ${CTARGET}-${x} ${CTARGET}-${x}-${GCC_CONFIG_VER}
+ fi
+ done
+}
+
+pkg_postinst () {
+ toolchain_pkg_postinst
+ einfo "This provide the GNAT compiler with gcc for ada/c/c++ and more"
+ einfo "Set the ADA variables to ${CTARGET}-gcc-${TOOLCHAIN_GCC_PV} in"
+ einfo "your make.conf"
+ einfo "Even if the c/c++ compilers are using almost the same patched"
+ einfo "source as the sys-devel/gcc package its use is not extensively"
+ einfo "tested, and not supported for updating your system, except for ada"
+ einfo "related packages"
+}
diff --git a/dev-lang/gnat-gpl/metadata.xml b/dev-lang/gnat-gpl/metadata.xml
new file mode 100644
index 000000000000..5018efb098ac
--- /dev/null
+++ b/dev-lang/gnat-gpl/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <use>
+ <flag name="awt">Useful only when building GCJ, this enables Abstract
+ Window Toolkit (AWT) peer support on top of GTK+</flag>
+ <flag name="cilk">Support the Cilk Plus language (C/C++ based languages for parallel programming)</flag>
+ <flag name="fixed-point">Enable fixed-point arithmetic support for MIPS
+ targets in gcc (Warning: significantly increases compile time!)
+ </flag>
+ <flag name="go">Build the GCC Go language frontend.</flag>
+ <flag name="graphite">Add support for the framework for loop
+ optimizations based on a polyhedral intermediate representation</flag>
+ <flag name="mpx">Enable support for Intel Memory Protection Extensions (MPX)</flag>
+ <flag name="libssp">Build SSP support into a dedicated library rather
+ than use the code in the C library (DO NOT ENABLE THIS IF YOU DON'T
+ KNOW WHAT IT DOES)</flag>
+ <flag name="nopie">Disable PIE support (NOT FOR GENERAL USE)</flag>
+ <flag name="nossp">Disable SSP support (NOT FOR GENERAL USE)</flag>
+ <flag name="objc">Build support for the Objective C code language
+ </flag>
+ <flag name="objc++">Build support for the Objective C++ language</flag>
+ <flag name="objc-gc">Build support for the Objective C code language
+ Garbage Collector</flag>
+ <flag name="pgo">Build GCC using Profile Guided Optimization (PGO)</flag>
+ <flag name="regression-test">Run the testsuite and install the results
+ (requires FEATURES=test)</flag>
+ <flag name="sanitize">Build support for various sanitizer functions (ASAN/TSAN/etc...)</flag>
+ <flag name="ssp">Build packages with stack smashing protector on by default</flag>
+ <flag name="vtv">Build support for virtual table verification (a C++ hardening feature)</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/gnu-smalltalk/Manifest b/dev-lang/gnu-smalltalk/Manifest
new file mode 100644
index 000000000000..be0a38ee95fb
--- /dev/null
+++ b/dev-lang/gnu-smalltalk/Manifest
@@ -0,0 +1,7 @@
+AUX 50gnu-smalltalk-gentoo.el 268 SHA256 acfa1581fd8871a0a7ab610afbf678ecbfbe1b2c7b844316b96aebf43dd5b141 SHA512 0341a9a35c17987ab7b93badf1b7ebf31b5a38df66d372d6a26eb49f5a9fec881e1886024a1b5ffa87cafb37aaef483201bb10827c121c782e4f554961bb9c41 WHIRLPOOL a1b1589288688191d2b3988662967557b04f3ffe02dc8cebcf35ff4c7290589792f6832a22e79dca8a77ff8aee1d489cb3d3c73cbffc8d5d2b6a91206649515f
+AUX gnu-smalltalk-3.2_use-result.patch 725 SHA256 61b0245337e60951af85b5e0102da47cc1852ed2a1f9338b072426a492fd7ed8 SHA512 df13803c96bea2887a04631a0aa37e58f18aed83b628d1d696aaa6033ca623920714f80badeb0ef678cf984b27a8a7f72b9ddcd97f770ddd870cc0dfbaa10f74 WHIRLPOOL 00701895ca074ac73b4d74b3b1296fc93e71d637c6de35d5f65cd8a41a66ca638dd3726d019ca7394ae746096bcfae9c2e1ec14e7090545589f8079d6d662334
+DIST smalltalk-3.2.5.tar.gz 5779293 SHA256 06e574e818ec49f0555d948ae53b1453d8c1df59ef597dad911a4fd1ffba1cce SHA512 385e5fba2acb8870759e5178282210c09c45685d0cf776bc50f4ed10c9afacf9164547ba8099ea3ed9a92a2a253aa9c2b011a7a9f2dff47ea9cfdf3b42029ebc WHIRLPOOL 3c7f1bd451eae1372d06196e1dc8408a83d8a717e67f09be4b6172d0243bca71a11d298ac9e5946a2599c6322b2ef7c204fd54d41c818151661c04af4aa89f08
+EBUILD gnu-smalltalk-3.2.5.ebuild 1835 SHA256 8991989855c47b56c4ba30489183a55e017abce429ad5e0c1b6bd6c7953a9071 SHA512 18650b26f6e492600b0bf89d0837d9e5d8a969617efde75f66e3fdea56653793e777f0ec1389ae4c3959b847c9a54483b4181dc768a1f7c43a5387118eb5b29f WHIRLPOOL edddbece5f053c6340eb3d5861484513c73f7756d9600431285157e552c1c41d77ed77b5b276445d0a51bd49421b7f9eb49c2063f1489d3acc0878c7bff6b0c5
+MISC ChangeLog 3010 SHA256 41cf772b495cfef9b8b21f6f4ef2d5954025dfb1021b520b09e1d63108bf2a84 SHA512 b38b25189a69603d91b5b4981d23b97f32dd7d5e83c4173a1fed5b27e32ab7f2b014c808e7a245d7706b167ffab2a8c56e9923c2a29d3f6fb32448d8f3635b2e WHIRLPOOL b5776c5d54b029e91f9ad6af0ec58b5328f1f672d241cab10bcc2883d063d498b60c19b2df5c832b78ecbceb1ee0bea3a6be611581118640c6664d2330c793d4
+MISC ChangeLog-2015 9059 SHA256 c9e1fa089bb925823926c10446860c395fd219a73abfec69fa1ef0071affef3f SHA512 a4c5deb273e2a8d981542a837094ebd831323355f04ed1e075d270bf888a29aa4efa047de8e63e5edd127a2eaebfa98142da35ff9ad115c15f4124dfd69ac1d9 WHIRLPOOL 7520e1a7473347ca9977f6857915858c06cafec50aa24081118b9d8f80cd92cb891dc8d957f2556a4900693e301d82e6d66dabd8ef409978f4247aa8a00c1502
+MISC metadata.xml 552 SHA256 7bc76b0b8968ace8fb16c906ffeca43451241a5fc6e50ebebad8cde707acc686 SHA512 7f57e9330d1087032023e2d1b6f01bcea7e2c8126bfe93375b9f1f469eed40deb72680cb4897edaeca6b3650213bf1c2f1fcc47f195c4efd645eaeeec0d86885 WHIRLPOOL c7063fd40c0392bb2aa7b6c42f0623aecbe362e2a07ac805070b943a2e8caace10aed3dd2218e89eee21b891c8237b540508a0a47f8918bcd5346d367aec0fec
diff --git a/dev-lang/gnu-smalltalk/files/50gnu-smalltalk-gentoo.el b/dev-lang/gnu-smalltalk/files/50gnu-smalltalk-gentoo.el
new file mode 100644
index 000000000000..e9e18d43bb3c
--- /dev/null
+++ b/dev-lang/gnu-smalltalk/files/50gnu-smalltalk-gentoo.el
@@ -0,0 +1,7 @@
+
+;;; gnu-smalltalk site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'smalltalk-mode "smalltalk-mode" "Autoload for smalltalk-mode" t)
+(autoload 'gst "gst-mode" "Autoload for gst" t)
+(add-to-list 'auto-mode-alist '("\\.st\\'" . smalltalk-mode))
diff --git a/dev-lang/gnu-smalltalk/files/gnu-smalltalk-3.2_use-result.patch b/dev-lang/gnu-smalltalk/files/gnu-smalltalk-3.2_use-result.patch
new file mode 100644
index 000000000000..b9f9eb67c75f
--- /dev/null
+++ b/dev-lang/gnu-smalltalk/files/gnu-smalltalk-3.2_use-result.patch
@@ -0,0 +1,16 @@
+--- config.h.in 2013-04-07 22:52:21.000000000 -0700
++++ config.h.in 2016-06-20 16:46:46.560891256 -0700
+@@ -879,6 +879,13 @@
+ #define below would cause a syntax error. */
+ #undef _UINT64_T
+
++/* Kludgey fix for Gentoo bug #492710, caused by improper use of the Tcl API.
++ * Upstream should be using Tcl_SetObjResult, Tcl_GetObjResult, and/or
++ * Tcl_GetStringResult. This is the simplest way for us to fix it, and should
++ * be removed as soon as GST uses the Tcl interface correctly.
++ */
++#define USE_INTERP_RESULT 1
++
+ /* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
diff --git a/dev-lang/gnu-smalltalk/gnu-smalltalk-3.2.5.ebuild b/dev-lang/gnu-smalltalk/gnu-smalltalk-3.2.5.ebuild
new file mode 100644
index 000000000000..6fe332837688
--- /dev/null
+++ b/dev-lang/gnu-smalltalk/gnu-smalltalk-3.2.5.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit elisp-common flag-o-matic eutils multilib
+
+DESCRIPTION="GNU Smalltalk"
+HOMEPAGE="http://smalltalk.gnu.org"
+SRC_URI="mirror://gnu/smalltalk/smalltalk-${PV}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="tk readline emacs gtk gmp"
+
+DEPEND="app-arch/zip
+ sys-libs/gdbm
+ sys-apps/debianutils
+ dev-libs/libsigsegv
+ virtual/libffi
+ emacs? ( virtual/emacs )
+ readline? ( sys-libs/readline )
+ tk? ( dev-lang/tk )
+ gtk? ( =x11-libs/gtk+-2* )
+ gmp? ( dev-libs/gmp )"
+RDEPEND=""
+
+S="${WORKDIR}/smalltalk-${PV}"
+
+SITEFILE=50gnu-smalltalk-gentoo.el
+
+src_prepare() {
+ # fix misuse of the Tcl API, bug 492710
+ epatch "${FILESDIR}"/${PN}-3.2_use-result.patch
+ default
+}
+
+src_configure() {
+ replace-flags '-O3' '-O2'
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --with-system-libsigsegv \
+ --with-system-libffi \
+ --with-system-libltdl \
+ $(use_with emacs emacs) \
+ $(use_with readline readline) \
+ $(use_with gmp gmp) \
+ $(use_with tk tcl /usr/$(get_libdir)) \
+ $(use_with tk tk /usr/$(get_libdir)) \
+ $(use_enable gtk gtk)
+}
+
+src_compile() {
+ emake || die "emake failed"
+ use emacs && elisp-compile *.el
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS COPYING* ChangeLog NEWS README THANKS TODO
+ if use emacs; then
+ elisp-install "${PN}" *.el *.elc
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+ fperms 0444 /usr/share/smalltalk/packages.xml
+ # Fix QA notice complaining about dangling symlink.
+ # There's probably a better way to do this but I couldn't find it.
+ pushd "${D}"/usr/share/man/man1
+ rm gst-reload.1
+ ln -s $(find . -name "gst-load*") gst-reload.1
+ popd
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/gnu-smalltalk/metadata.xml b/dev-lang/gnu-smalltalk/metadata.xml
new file mode 100644
index 000000000000..c2284a39df7e
--- /dev/null
+++ b/dev-lang/gnu-smalltalk/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>pchrist@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ GNU Smalltalk is a free implementation of the Smalltalk-80
+ language which runs on most versions on Unix and, in general,
+ everywhere you can find a POSIX-compliance library. An uncommon
+ feature of it is that it is well-versed to scripting tasks and
+ headless processing.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/gnuprologjava/Manifest b/dev-lang/gnuprologjava/Manifest
new file mode 100644
index 000000000000..7fd394eefeb9
--- /dev/null
+++ b/dev-lang/gnuprologjava/Manifest
@@ -0,0 +1,5 @@
+AUX gnuprologjava-0.2.6-manual.patch 414 SHA256 e49035930265f71a8da1ced91ca633cd1b991bda6cfe2e174c4cf55381d5c797 SHA512 419b509abae773e5ac3f2d79328bb4014776cc7c6390b8afa2d3d7242afec41e92d22830ed1be3c15f3d007c9fa08b303b553d883b18e1bde1fe9af09a0c7644 WHIRLPOOL 5246c1f42c50b219b487e9ff45c4d28a464a09c69c0a432cf431c2ddf483046db59a07389b628fd840fbbe7cd47117ea0c3c741b075af4a0e2c02268ff5e2ab2
+DIST gnuprologjava-0.2.6-src.zip 477058 SHA256 cfc6e5b6a9da9fc865df03293c657253283e7cafdae6024f4863866a23f78198 SHA512 b175c74e754a7176f5fc38ea2215809bb9d60ec5b8852f99a48a72a0bdb316b33b7195ff5c85398bb63aa2e522d12dfc75e2ff3af9f89ff44448d2f73357f0a4 WHIRLPOOL 2f9a72077b4af37ab4f2c0cf305f16a1e11540faba02e14aa09346a27fb2463c19cb3259cd93139f12e749afeb0e6c44f406567b4a671c21b56d8a075e78aa0f
+EBUILD gnuprologjava-0.2.6.ebuild 838 SHA256 b9c2f118f2929d3aa089d29b56af9cde2cb0daf7cdedc67a85c65ba24598a068 SHA512 f74d26baa10ad05b53fe3af7c63e3b6749bce9d23e28d2dcc1ac001784e3c4782b965abf1603e21a42a95d575c547aaea6d2e5e2ac4e8b86e3db71efc7efb3cf WHIRLPOOL a652aa2517c80c77641887fbd92412ceb386b5126ed084336e1c1b7b0890aafa86fde97f00cecf1b1304191711b7616899c9771df66e278fe2785606fa2bca97
+MISC ChangeLog 361 SHA256 a790709bb7e4394c90f091079029844a7c816c191307805cad9eb989a4e546b4 SHA512 710b9f1009a8e6b8f9d07902b0bc4e9dae6db58f05fbfc7f443397a95539eaf559bb297a03165eb97a89ca1508b72f06a5d19f7d2352a36da6e925ab11e411b2 WHIRLPOOL d2023a83ac6a3100895d261a34aa447a22bcdc0993a0b85b7a2c588bf96255f049f24d401fe3519bb8d62a05548075139e30c19705218bd7318f13b45fe98d3e
+MISC metadata.xml 236 SHA256 c7fee7a3c12781805b151438049c445031a7b7031f7f46869144430034dae0c7 SHA512 e776224736bd575412c7b5b799f649c6b2947a70e6a9aea580063d9da7d09a8144e5ebaf7ac3ef131d578486cf05dec814dce11b2aeb884cded3be3cab70fcec WHIRLPOOL 7173f7ab9ba51d9d11c9039b22bb96b429171319fc41cd20b4773cd4c5135d18add75769d2f5f450831d48e59e3b4a31488d0b00d655d4e03e97550677197bce
diff --git a/dev-lang/gnuprologjava/files/gnuprologjava-0.2.6-manual.patch b/dev-lang/gnuprologjava/files/gnuprologjava-0.2.6-manual.patch
new file mode 100644
index 000000000000..e6c1c09e8b13
--- /dev/null
+++ b/dev-lang/gnuprologjava/files/gnuprologjava-0.2.6-manual.patch
@@ -0,0 +1,11 @@
+--- gnuprologjava.orig/docs/manual.texinfo 2011-01-06 13:07:12.000000000 +0100
++++ gnuprologjava/docs/manual.texinfo 2016-10-27 17:25:09.265632090 +0200
+@@ -36,7 +36,7 @@
+ @titlepage
+ @title GNU Prolog for Java
+ @subtitle for version @value{VERSION}, @value{UPDATED}
+-@author Daniel Thomas (@email{info-gnuprolog@gnu.org})
++@author Daniel Thomas (@email{info-gnuprolog@@gnu.org})
+ @insertcopying
+ @end titlepage
+
diff --git a/dev-lang/gnuprologjava/gnuprologjava-0.2.6.ebuild b/dev-lang/gnuprologjava/gnuprologjava-0.2.6.ebuild
new file mode 100644
index 000000000000..c94727fc1877
--- /dev/null
+++ b/dev-lang/gnuprologjava/gnuprologjava-0.2.6.ebuild
@@ -0,0 +1,44 @@
+# Copyright 2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="GNU Prolog for Java is an implementation of ISO Prolog as a Java library"
+HOMEPAGE="http://www.gnu.org/software/gnuprologjava"
+SRC_URI="mirror://gnu/gnuprologjava/${P}-src.zip"
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND=">=virtual/jdk-1.6:="
+DEPEND="${RDEPEND}
+ dev-java/ant-core"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-manual.patch
+}
+
+src_compile() {
+ eant jar
+ if use doc ; then
+ eant doc
+ fi
+ mv build/${P}.jar build/${PN}.jar || die
+}
+
+src_install() {
+ java-pkg_dojar build/${PN}.jar
+
+ if use doc ; then
+ java-pkg_dohtml -r build/api || die
+ java-pkg_dohtml -r build/manual || die
+ fi
+
+ dodoc NEWS.txt docs/readme.txt
+}
diff --git a/dev-lang/gnuprologjava/metadata.xml b/dev-lang/gnuprologjava/metadata.xml
new file mode 100644
index 000000000000..96eff3ea40c0
--- /dev/null
+++ b/dev-lang/gnuprologjava/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>prolog@gentoo.org</email>
+ <name>Prolog</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
new file mode 100644
index 000000000000..9f4ebd3716ce
--- /dev/null
+++ b/dev-lang/go/Manifest
@@ -0,0 +1,21 @@
+DIST go-darwin-amd64-bootstrap-1.8.tbz 55053831 SHA256 1058dc305ad7b44b124d3d3eb2c579011b6c489a498e3313e4d0d089045ef3f7 SHA512 4cc24d44c84c94feafab021c0977fcea2aca8f191c6395e38fff68154b1e64efc3f94331c3e36c7b69901af58e9d53545c682f0a742d36b2d230508bd69777c4 WHIRLPOOL 52696cbe1129683e0cb0467b239723d29304d7f003317be6ce301118397166844489edaa7a15bf38e11dc205b50fafc326f4f35e2ed0d89e2fcb2701a6509838
+DIST go-freebsd-386-bootstrap-1.8.tbz 53739013 SHA256 1e4afbb11aaa32d3de70fe3e407e519f100f09de3ac4f881d8410fc1345e13f9 SHA512 c92f849b2d92401657412cccc589042b2747e55b2f4813d674c5bc91c3f535ee60f8ed7b8cbf1320e216d22a16dade8b78bb8071982895901f2b3c304e38f478 WHIRLPOOL 80d973b0c0b8c2eb363ef171ee6f51d17d82997f3f1d192a68d4a18eea2413876b453dc5f673a827e781d2f2cb009b6fd91796599217435e7f0969cdece71698
+DIST go-freebsd-amd64-bootstrap-1.8.tbz 55103927 SHA256 4a6291e9044bc3e284943873b4a4868ee94515e1fb00416cabb9b19d6e8a40e7 SHA512 c7d50731ff41147295ef5f3233aa1404081b47e786a300e1d0e4db8348e56bd73fe5f169fe8b807ffa37a53683e3aef16ebb6e877d802b86ff1a3d5d3a6f44cb WHIRLPOOL e2c02a9ffcd82125de64c48abe4158a3bf352a02dea4b5ce34b345cb078fa97cf5cc65f874f454b9fb7776faa499cc16d9c50d035206c3172251a3ab365c9384
+DIST go-linux-386-bootstrap-1.8.tbz 53843745 SHA256 da2172a6aa7593bbdae43d714989b5fd728e3a722cab9ccb599b5d159240152f SHA512 b456f7572d04c805a6fc756647c050460f76e5404dba41963c861c92f1600e9fedafe181a1f69132518065737a88edb4b183ec8c3ca24bc8df31279117e92606 WHIRLPOOL 8ae15f8963a842067f79a10741bed30e9b3b6d2bfeacb453dd4eae79ffdd86e214f361fba90b64013e0ce87238f151d985350ea2d7d1d82f7fc464a03ca25bb2
+DIST go-linux-amd64-bootstrap-1.8.tbz 55399105 SHA256 b21c5846d2837de48286c65026a2ce6bdd03fcc6bec5ba29861080a2d228999b SHA512 89d68cfe0e6ce4be690cf52a4a02b17ef2cae3538b057d4690bfd6e93727bcdc1cbc17cba3403e652bb95bffd25d44bdd4efd0014d1d2f019838bde925139f57 WHIRLPOOL 21f70e16e10c49f4b6462cc35329015588ae337045c9fc61a49fa985d03aa194f4be55cd146fd23060226162102789258e54ed3534726d470adf43cac84df586
+DIST go-linux-arm-bootstrap-1.8.tbz 53948103 SHA256 86593294a84d3085583cf3293df62ca82a119bfe560ff649e1af8b1b0e45ee79 SHA512 98ff0dbdb2aca9e54ea5327c9d31ce389e434a887015ef8555a8e85223a9998075c5013045275fb995a877a8d247704a21d726d46df7097adc0c4aa03af4cd68 WHIRLPOOL ba62849e86cf0f905f75affb4748d1c4cf9b0421bad5c726556d96a6e8f4bca0790b097b9b2a4145eb8e0a95458f589a6f14de586f22ca1969d279f8e7271959
+DIST go-linux-arm64-bootstrap-1.8.tbz 51947002 SHA256 773305a44482d4d4c5a9be5c5997b40772c6efe4a38bdd2750612463b7786a88 SHA512 adfbe62c5594c267707078bf8afb94a793dfba004c04a1a60f96d023d96c2fc4a6a422dee93a0f3487b1f2e1e117c7c6c607b62126dd5535686aaed88f6659d9 WHIRLPOOL b3af3c442d801b26b530a315d3aed17c2650064eb156c2fcb8da7f6597aa05eda5c425c6c14e881cce7b89ef83e9d6dc8480f789d2db2186a78ae95fbcb13520
+DIST go-linux-ppc64-bootstrap-1.8.tbz 52315782 SHA256 19eb3674c07a17dacec9620bc5ddcffa0264adf606e4c0d640c9f31644777ab3 SHA512 0aa32ac1514055ed9140b8c8330cbdbadfd9da6ad00b60d49b0685473be21e0b6510c31394678e32048f2f38d06a0d575f453c555614664eaef2bf5be6c91734 WHIRLPOOL 2363ce812af9c1dec331801477e979ef82a66d0ca92ac92f56fcb3bb264d96acdb6bfcd397d2c7b81cdc616a69571afa4343a0c64ebfc8ec7d6f8aab0ae4ece1
+DIST go-linux-ppc64le-bootstrap-1.8.tbz 52211575 SHA256 4e05b8830a473756cfee3fc27a17e09b38ccfca4e2335a485b41d3fb9c342066 SHA512 6931d999dd0ee1ff44c4cec48acb27af061f57f87aa74802dcebab78553b46bc8ac732f07fe91e5074dbdd32c55b707994875934bfb12bb4276d71eb1d06c4ba WHIRLPOOL cdc392fc51b7bfdd28e1c29bffce88139b9447261c9dbffefb3910b9c7406505bd250309618bd6a8430dcfcecc9155f8d5fe94f9e848cc2e721776ba34c22c3a
+DIST go-linux-s390x-bootstrap-1.8.tbz 57124869 SHA256 70bb859e80268b3421587d85189a807b14449b8c5e7b23606b87dfab54189634 SHA512 d429cae870d66217ab2e07c74209d3031d97baa4f899b4d70ae6283a1a5b1434b037904c4cfca0b2bc798d5ba0b358c3739e000eccbc74809baf564c5686df5a WHIRLPOOL d0475efcbc2c1cbb3c6db452dbeb2a5fe709fa56b65eba2fbbcce2296b6a04ba89b9e33579d6eab192cd63b45ad78a0d7afd458229e4b252e80bd2db260abf11
+DIST go-solaris-amd64-bootstrap-1.8.tbz 54926326 SHA256 83053f333d56d72ddbe9a8f293f8afeff31739806d49ebaa144811a5438b17bc SHA512 52b849e5b9a940e10de7ba3df0ebdf6e1c5d631de9581d936c9edf8f38e6bb3314acbc2b2d5202b0528fde2a359d52bc0c6f39acf9b1b614725e4b4a947ed10d WHIRLPOOL 2d58085d88fa612a7dfb087df33d2c5ee6b6d4c0b0c0363d5dcef014a6e3e9703816e8a111d1348e1e1a4ebcdde58694a869a27ae42e0deec154529f1a794991
+DIST go1.8.3.src.tar.gz 15345996 SHA256 5f5dea2447e7dcfdc50fa6b94c512e58bfba5673c039259fd843f68829d99fa6 SHA512 c6e67dd9e3acdf2aa776d920f91f3fb1802d624ba5d51e06b2c7c6b71bcfaf91f4024f7a442cecde69175c589f7f1163f0ae86d887e15ddde710e53ce0961284 WHIRLPOOL 918a13b5323c77093428890ac4759daa3f40bd9379df0b862f9ba0fcf7f0f99eb83e37294dec25329a792573b97ddccb417a43dc8cccbd41bf17df6b01ea77f2
+DIST go1.9.1.src.tar.gz 16377700 SHA256 a84afc9dc7d64fe0fa84d4d735e2ece23831a22117b50dafc75c1484f1cb550e SHA512 3c5d11089a54c61acd1a4fad9618ddb2058cc783a54564407ee50e37c864deaadfd5effeab623080c136a599096f448aae091ef41d0afca1abfcdb98adf4a793 WHIRLPOOL 1cdfddfbe2b432a783d821bf6caf6615868de7eeb71667fd38d77a115b87c0d5321d6928f271bbe7edd6e05d56f5a0e05b6fceeec5dd025673c0a0ad9224ad3e
+DIST go1.9.src.tar.gz 16377363 SHA256 a4ab229028ed167ba1986825751463605264e44868362ca8e7accc8be057e993 SHA512 70c4b892b6883fb21fc1a547a2b8d174df8c7aca282a3906e3816b4442b16c5da578b69c19443122a4a45e66fc95d170528d826b70932af09f4afd2a46615d74 WHIRLPOOL ffd7c37ac49ac55546f0712cdfae9eda83c6cbc10a6b495b021d7a5076bac1063f0a322622692f1b67142a995da2de7e297a43727502331788adac43163848a2
+EBUILD go-1.8.3.ebuild 5581 SHA256 0f93c5167e263e8029621377972b4be9f94187d325d459bda30268935bff3b8d SHA512 f45cfc64b0671b7089cf6e802b4963598e3c47b338ebf8ee6f741ddc4979ba1fe3306d7ef02e7625af2b4b8c4108e8b6ec8f820a2ba75560d04a4c37960d4997 WHIRLPOOL 086b7c4b0ac20a17822d704451f258966921103a297d8038a71183895c6fb645a18edaaaf0d90c34ed0c0b7fcc74d069cfdb62d5d530b71d5967a2b7ddc59ae8
+EBUILD go-1.9.1.ebuild 5582 SHA256 d7d2060ce3c8857867703011c39e7d2b2d8dc5de12fa0982479955ac8179ded8 SHA512 aa97dca1ecf9e7463dbe7b94f48ccd132a839f87997615d6a1f61ea1827cbb75e653a356b2a3ceab6901dc54cfd24b42c18dc2cd07c75df0254f012704b0ff59 WHIRLPOOL 84e1f30529e3d68ccc516198caca9096b96b148acc86b25e2fd10a0d2900cf84468f87c5dccb184a465a17c424a90b60a83c35ee160078bf4c15def846c63f43
+EBUILD go-1.9.ebuild 5583 SHA256 ed61ef48faff64b18806aa7a2e485f2b350dda25aa28d5c7c412f9e3aadb87c1 SHA512 635afcc0254342631b895b867785d390cad7a671e2dafb2e6a7d9e8c73cd1c951b6b5b1781f6e6b805f7ecba0784c66f574848823c24517a3c8aa1679867dbd8 WHIRLPOOL 9a57db77f411080d78763191fca1b3aec435127e5f752b47e596f3f2ac9e593070073aad9f620ad5395739bceebd3051de2024c543c9abf9390c8c834826c3c2
+EBUILD go-9999.ebuild 5584 SHA256 3854f126a7b2d76ed3dfde8cff697d6c033d6d60e063b07239485a5410666504 SHA512 9b009525bda054f8451d1a202a7dfd7087de6e9d57633f7a8c9c74bdae6407e420237a0c80c58e5650c5beb9c01cef29052ec8e182129f23d2cbcbbdf2efbed7 WHIRLPOOL dcb1f48b08de50e1ba456c81676bc0c8b2817d73faaa5ce188d9508bb1376833d754cd3391f254fd353ca6100f8fdee5e18d20e0d6b223a7b09790d1e50f9ab0
+MISC ChangeLog 15550 SHA256 1e804542720fb0000c4ae8ed1d840415527ec25a16f77aafd7eceeefbe446377 SHA512 3e8c4083b1a7ee877c55283f3463aaec0144d090b5ffc5be7258a29de69d88ae3ecd2fe69f4ff118667796d8a79235870d47855f033d7e67e1da78fc466df638 WHIRLPOOL 8d80ee3abbf55b198e82d911983ed5155da45e72d2b4d2aa39f71837857c61a02797e5a3b9b776f2f93af5ad81babc8e2d5fc7e9a7405d07b069755333479b9f
+MISC ChangeLog-2015 9934 SHA256 5c5375109d9de6edbdf782c355e7f28a8ac4c97d84ca4257a65f12d112fd6a9b SHA512 879f50097cd760b2e96c8ad06ff092f51797181a241361c4897b48abffbad8224331a1bcc614d525e548f7001d3ad664a103ba557a819f0d1cb3c23d67b4019c WHIRLPOOL f11ad28c4f0e811ba70c3b6a8314622d7ab4b064151cb94e62f461fc24c9e62c821571ee771578a20da18ea143d06518a5835f9deedea2a3098a5e83bd6eb5be
+MISC metadata.xml 538 SHA256 5afbcc62774498f7df0ca1428b7c8eb3ebfcd4942de653e6e1a4708d41c87fb5 SHA512 514a441a522218fdca543a22370e965a2bfc1f1f2c37e77431143329bb3d3f4f53e99ad5d7f7d7c61877f77387a777f7b4f339b9a3e45322d01d39d3d0ea1309 WHIRLPOOL 2263738f89d878ca10080ceed843b90ed35abdf86916e2f83f324150219064a42fa3bf3fe0c5a12e76d0ef403776f679b599775af74e8cda243d96f0f7793965
diff --git a/dev-lang/go/go-1.8.3.ebuild b/dev-lang/go/go-1.8.3.ebuild
new file mode 100644
index 000000000000..6b538a0be4e7
--- /dev/null
+++ b/dev-lang/go/go-1.8.3.ebuild
@@ -0,0 +1,227 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+
+MY_PV=${PV/_/}
+
+inherit toolchain-funcs
+
+BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
+BOOTSTRAP_VERSION="bootstrap-1.8"
+BOOTSTRAP_URI="
+amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz )
+arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz )
+arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz )
+ppc64? (
+ ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz
+ ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz
+)
+s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz )
+x86? ( ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz )
+amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz )
+x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz )
+x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz )
+x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz )
+"
+
+case ${PV} in
+*9999*)
+ EGIT_REPO_URI="https://github.com/golang/go.git"
+ inherit git-r3
+ ;;
+*)
+ SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
+ S="${WORKDIR}"/go
+ case ${PV} in
+ *_beta*|*_rc*) ;;
+ *)
+ KEYWORDS="-* amd64 arm ~arm64 ~ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris"
+ # The upstream tests fail under portage but pass if the build is
+ # run according to their documentation [1].
+ # I am restricting the tests on released versions until this is
+ # solved.
+ # [1] https://golang.org/issues/18442
+ RESTRICT="test"
+ ;;
+ esac
+esac
+SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )"
+
+DESCRIPTION="A concurrent garbage collected and typesafe programming language"
+HOMEPAGE="https://golang.org"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+IUSE="gccgo"
+
+DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
+RDEPEND="!<dev-go/go-tools-0_pre20150902"
+
+# These test data objects have writable/executable stacks.
+QA_EXECSTACK="
+ usr/lib/go/src/debug/elf/testdata/*.obj
+ usr/lib/go/src/go/internal/gccgoimporter/testdata/unicode.gox
+ usr/lib/go/src/go/internal/gccgoimporter/testdata/time.gox
+ "
+
+# Do not complain about CFLAGS, etc, since Go doesn't use them.
+QA_FLAGS_IGNORED='.*'
+
+REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
+
+# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
+QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
+
+# Do not strip this package. Stripping is unsupported upstream and may
+# fail.
+RESTRICT+=" strip"
+
+DOCS=(
+AUTHORS
+CONTRIBUTING.md
+CONTRIBUTORS
+PATENTS
+README.md
+)
+
+go_arch()
+{
+ # By chance most portage arch names match Go
+ local portage_arch=$(tc-arch $@)
+ case "${portage_arch}" in
+ x86) echo 386;;
+ x64-*) echo amd64;;
+ ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
+ s390) echo s390x ;;
+ *) echo "${portage_arch}";;
+ esac
+}
+
+go_arm()
+{
+ case "${1:-${CHOST}}" in
+ armv5*) echo 5;;
+ armv6*) echo 6;;
+ armv7*) echo 7;;
+ *)
+ die "unknown GOARM for ${1:-${CHOST}}"
+ ;;
+ esac
+}
+
+go_os()
+{
+ case "${1:-${CHOST}}" in
+ *-linux*) echo linux;;
+ *-darwin*) echo darwin;;
+ *-freebsd*) echo freebsd;;
+ *-netbsd*) echo netbsd;;
+ *-openbsd*) echo openbsd;;
+ *-solaris*) echo solaris;;
+ *-cygwin*|*-interix*|*-winnt*)
+ echo windows
+ ;;
+ *)
+ die "unknown GOOS for ${1:-${CHOST}}"
+ ;;
+ esac
+}
+
+go_tuple()
+{
+ echo "$(go_os $@)_$(go_arch $@)"
+}
+
+go_cross_compile()
+{
+ [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
+}
+
+pkg_pretend()
+{
+ # make.bash does not understand cross-compiling a cross-compiler
+ if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
+ die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
+ fi
+}
+
+src_unpack()
+{
+ if [[ ${PV} = 9999 ]]; then
+ git-r3_src_unpack
+ fi
+ default
+}
+
+src_compile()
+{
+ export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap
+ if use gccgo; then
+ mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
+ local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version)
+ [[ -x ${go_binary} ]] || go_binary=$(
+ find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) |
+ sort -V | tail -n1)
+ [[ -x ${go_binary} ]] ||
+ die "go-$(gcc-major-version): command not found"
+ ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
+ fi
+ export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
+ export GOROOT="$(pwd)"
+ export GOBIN="${GOROOT}/bin"
+
+ # Go's build script does not use BUILD/HOST/TARGET consistently. :(
+ export GOHOSTARCH=$(go_arch ${CBUILD})
+ export GOHOSTOS=$(go_os ${CBUILD})
+ export CC=$(tc-getBUILD_CC)
+
+ export GOARCH=$(go_arch)
+ export GOOS=$(go_os)
+ export CC_FOR_TARGET=$(tc-getCC)
+ export CXX_FOR_TARGET=$(tc-getCXX)
+ if [[ ${ARCH} == arm ]]; then
+ export GOARM=$(go_arm)
+ fi
+ einfo "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}"
+
+ cd src
+ ./make.bash || die "build failed"
+}
+
+src_test()
+{
+ go_cross_compile && return 0
+
+ cd src
+ PATH="${GOBIN}:${PATH}" \
+ ./run.bash -no-rebuild || die "tests failed"
+}
+
+src_install()
+{
+ local bin_path f x
+
+ dodir /usr/lib/go
+
+ # There is a known issue which requires the source tree to be installed [1].
+ # Once this is fixed, we can consider using the doc use flag to control
+ # installing the doc and src directories.
+ # [1] https://golang.org/issue/2775
+ #
+ # deliberately use cp to retain permissions
+ cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
+ if go_cross_compile; then
+ bin_path="bin/$(go_tuple)"
+ else
+ bin_path=bin
+ fi
+ for x in ${bin_path}/*; do
+ f=${x##*/}
+ dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
+ done
+ einstalldocs
+}
diff --git a/dev-lang/go/go-1.9.1.ebuild b/dev-lang/go/go-1.9.1.ebuild
new file mode 100644
index 000000000000..ba6f541436c8
--- /dev/null
+++ b/dev-lang/go/go-1.9.1.ebuild
@@ -0,0 +1,227 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+
+MY_PV=${PV/_/}
+
+inherit toolchain-funcs
+
+BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
+BOOTSTRAP_VERSION="bootstrap-1.8"
+BOOTSTRAP_URI="
+amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz )
+arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz )
+arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz )
+ppc64? (
+ ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz
+ ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz
+)
+s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz )
+x86? ( ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz )
+amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz )
+x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz )
+x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz )
+x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz )
+"
+
+case ${PV} in
+*9999*)
+ EGIT_REPO_URI="https://github.com/golang/go.git"
+ inherit git-r3
+ ;;
+*)
+ SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
+ S="${WORKDIR}"/go
+ case ${PV} in
+ *_beta*|*_rc*) ;;
+ *)
+ KEYWORDS="-* amd64 ~arm ~arm64 ~ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris"
+ # The upstream tests fail under portage but pass if the build is
+ # run according to their documentation [1].
+ # I am restricting the tests on released versions until this is
+ # solved.
+ # [1] https://golang.org/issues/18442
+ RESTRICT="test"
+ ;;
+ esac
+esac
+SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )"
+
+DESCRIPTION="A concurrent garbage collected and typesafe programming language"
+HOMEPAGE="https://golang.org"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+IUSE="gccgo"
+
+DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
+RDEPEND="!<dev-go/go-tools-0_pre20150902"
+
+# These test data objects have writable/executable stacks.
+QA_EXECSTACK="
+ usr/lib/go/src/debug/elf/testdata/*.obj
+ usr/lib/go/src/go/internal/gccgoimporter/testdata/unicode.gox
+ usr/lib/go/src/go/internal/gccgoimporter/testdata/time.gox
+ "
+
+# Do not complain about CFLAGS, etc, since Go doesn't use them.
+QA_FLAGS_IGNORED='.*'
+
+REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
+
+# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
+QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
+
+# Do not strip this package. Stripping is unsupported upstream and may
+# fail.
+RESTRICT+=" strip"
+
+DOCS=(
+AUTHORS
+CONTRIBUTING.md
+CONTRIBUTORS
+PATENTS
+README.md
+)
+
+go_arch()
+{
+ # By chance most portage arch names match Go
+ local portage_arch=$(tc-arch $@)
+ case "${portage_arch}" in
+ x86) echo 386;;
+ x64-*) echo amd64;;
+ ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
+ s390) echo s390x ;;
+ *) echo "${portage_arch}";;
+ esac
+}
+
+go_arm()
+{
+ case "${1:-${CHOST}}" in
+ armv5*) echo 5;;
+ armv6*) echo 6;;
+ armv7*) echo 7;;
+ *)
+ die "unknown GOARM for ${1:-${CHOST}}"
+ ;;
+ esac
+}
+
+go_os()
+{
+ case "${1:-${CHOST}}" in
+ *-linux*) echo linux;;
+ *-darwin*) echo darwin;;
+ *-freebsd*) echo freebsd;;
+ *-netbsd*) echo netbsd;;
+ *-openbsd*) echo openbsd;;
+ *-solaris*) echo solaris;;
+ *-cygwin*|*-interix*|*-winnt*)
+ echo windows
+ ;;
+ *)
+ die "unknown GOOS for ${1:-${CHOST}}"
+ ;;
+ esac
+}
+
+go_tuple()
+{
+ echo "$(go_os $@)_$(go_arch $@)"
+}
+
+go_cross_compile()
+{
+ [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
+}
+
+pkg_pretend()
+{
+ # make.bash does not understand cross-compiling a cross-compiler
+ if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
+ die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
+ fi
+}
+
+src_unpack()
+{
+ if [[ ${PV} = 9999 ]]; then
+ git-r3_src_unpack
+ fi
+ default
+}
+
+src_compile()
+{
+ export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap
+ if use gccgo; then
+ mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
+ local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version)
+ [[ -x ${go_binary} ]] || go_binary=$(
+ find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) |
+ sort -V | tail -n1)
+ [[ -x ${go_binary} ]] ||
+ die "go-$(gcc-major-version): command not found"
+ ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
+ fi
+ export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
+ export GOROOT="$(pwd)"
+ export GOBIN="${GOROOT}/bin"
+
+ # Go's build script does not use BUILD/HOST/TARGET consistently. :(
+ export GOHOSTARCH=$(go_arch ${CBUILD})
+ export GOHOSTOS=$(go_os ${CBUILD})
+ export CC=$(tc-getBUILD_CC)
+
+ export GOARCH=$(go_arch)
+ export GOOS=$(go_os)
+ export CC_FOR_TARGET=$(tc-getCC)
+ export CXX_FOR_TARGET=$(tc-getCXX)
+ if [[ ${ARCH} == arm ]]; then
+ export GOARM=$(go_arm)
+ fi
+ einfo "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}"
+
+ cd src
+ ./make.bash || die "build failed"
+}
+
+src_test()
+{
+ go_cross_compile && return 0
+
+ cd src
+ PATH="${GOBIN}:${PATH}" \
+ ./run.bash -no-rebuild || die "tests failed"
+}
+
+src_install()
+{
+ local bin_path f x
+
+ dodir /usr/lib/go
+
+ # There is a known issue which requires the source tree to be installed [1].
+ # Once this is fixed, we can consider using the doc use flag to control
+ # installing the doc and src directories.
+ # [1] https://golang.org/issue/2775
+ #
+ # deliberately use cp to retain permissions
+ cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
+ if go_cross_compile; then
+ bin_path="bin/$(go_tuple)"
+ else
+ bin_path=bin
+ fi
+ for x in ${bin_path}/*; do
+ f=${x##*/}
+ dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
+ done
+ einstalldocs
+}
diff --git a/dev-lang/go/go-1.9.ebuild b/dev-lang/go/go-1.9.ebuild
new file mode 100644
index 000000000000..b22bdb390153
--- /dev/null
+++ b/dev-lang/go/go-1.9.ebuild
@@ -0,0 +1,227 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+
+MY_PV=${PV/_/}
+
+inherit toolchain-funcs
+
+BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
+BOOTSTRAP_VERSION="bootstrap-1.8"
+BOOTSTRAP_URI="
+amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz )
+arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz )
+arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz )
+ppc64? (
+ ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz
+ ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz
+)
+s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz )
+x86? ( ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz )
+amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz )
+x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz )
+x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz )
+x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz )
+"
+
+case ${PV} in
+*9999*)
+ EGIT_REPO_URI="https://github.com/golang/go.git"
+ inherit git-r3
+ ;;
+*)
+ SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
+ S="${WORKDIR}"/go
+ case ${PV} in
+ *_beta*|*_rc*) ;;
+ *)
+ KEYWORDS="-* amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris"
+ # The upstream tests fail under portage but pass if the build is
+ # run according to their documentation [1].
+ # I am restricting the tests on released versions until this is
+ # solved.
+ # [1] https://golang.org/issues/18442
+ RESTRICT="test"
+ ;;
+ esac
+esac
+SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )"
+
+DESCRIPTION="A concurrent garbage collected and typesafe programming language"
+HOMEPAGE="https://golang.org"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+IUSE="gccgo"
+
+DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
+RDEPEND="!<dev-go/go-tools-0_pre20150902"
+
+# These test data objects have writable/executable stacks.
+QA_EXECSTACK="
+ usr/lib/go/src/debug/elf/testdata/*.obj
+ usr/lib/go/src/go/internal/gccgoimporter/testdata/unicode.gox
+ usr/lib/go/src/go/internal/gccgoimporter/testdata/time.gox
+ "
+
+# Do not complain about CFLAGS, etc, since Go doesn't use them.
+QA_FLAGS_IGNORED='.*'
+
+REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
+
+# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
+QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
+
+# Do not strip this package. Stripping is unsupported upstream and may
+# fail.
+RESTRICT+=" strip"
+
+DOCS=(
+AUTHORS
+CONTRIBUTING.md
+CONTRIBUTORS
+PATENTS
+README.md
+)
+
+go_arch()
+{
+ # By chance most portage arch names match Go
+ local portage_arch=$(tc-arch $@)
+ case "${portage_arch}" in
+ x86) echo 386;;
+ x64-*) echo amd64;;
+ ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
+ s390) echo s390x ;;
+ *) echo "${portage_arch}";;
+ esac
+}
+
+go_arm()
+{
+ case "${1:-${CHOST}}" in
+ armv5*) echo 5;;
+ armv6*) echo 6;;
+ armv7*) echo 7;;
+ *)
+ die "unknown GOARM for ${1:-${CHOST}}"
+ ;;
+ esac
+}
+
+go_os()
+{
+ case "${1:-${CHOST}}" in
+ *-linux*) echo linux;;
+ *-darwin*) echo darwin;;
+ *-freebsd*) echo freebsd;;
+ *-netbsd*) echo netbsd;;
+ *-openbsd*) echo openbsd;;
+ *-solaris*) echo solaris;;
+ *-cygwin*|*-interix*|*-winnt*)
+ echo windows
+ ;;
+ *)
+ die "unknown GOOS for ${1:-${CHOST}}"
+ ;;
+ esac
+}
+
+go_tuple()
+{
+ echo "$(go_os $@)_$(go_arch $@)"
+}
+
+go_cross_compile()
+{
+ [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
+}
+
+pkg_pretend()
+{
+ # make.bash does not understand cross-compiling a cross-compiler
+ if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
+ die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
+ fi
+}
+
+src_unpack()
+{
+ if [[ ${PV} = 9999 ]]; then
+ git-r3_src_unpack
+ fi
+ default
+}
+
+src_compile()
+{
+ export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap
+ if use gccgo; then
+ mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
+ local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version)
+ [[ -x ${go_binary} ]] || go_binary=$(
+ find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) |
+ sort -V | tail -n1)
+ [[ -x ${go_binary} ]] ||
+ die "go-$(gcc-major-version): command not found"
+ ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
+ fi
+ export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
+ export GOROOT="$(pwd)"
+ export GOBIN="${GOROOT}/bin"
+
+ # Go's build script does not use BUILD/HOST/TARGET consistently. :(
+ export GOHOSTARCH=$(go_arch ${CBUILD})
+ export GOHOSTOS=$(go_os ${CBUILD})
+ export CC=$(tc-getBUILD_CC)
+
+ export GOARCH=$(go_arch)
+ export GOOS=$(go_os)
+ export CC_FOR_TARGET=$(tc-getCC)
+ export CXX_FOR_TARGET=$(tc-getCXX)
+ if [[ ${ARCH} == arm ]]; then
+ export GOARM=$(go_arm)
+ fi
+ einfo "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}"
+
+ cd src
+ ./make.bash || die "build failed"
+}
+
+src_test()
+{
+ go_cross_compile && return 0
+
+ cd src
+ PATH="${GOBIN}:${PATH}" \
+ ./run.bash -no-rebuild || die "tests failed"
+}
+
+src_install()
+{
+ local bin_path f x
+
+ dodir /usr/lib/go
+
+ # There is a known issue which requires the source tree to be installed [1].
+ # Once this is fixed, we can consider using the doc use flag to control
+ # installing the doc and src directories.
+ # [1] https://golang.org/issue/2775
+ #
+ # deliberately use cp to retain permissions
+ cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
+ if go_cross_compile; then
+ bin_path="bin/$(go_tuple)"
+ else
+ bin_path=bin
+ fi
+ for x in ${bin_path}/*; do
+ f=${x##*/}
+ dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
+ done
+ einstalldocs
+}
diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild
new file mode 100644
index 000000000000..2ac936f0164a
--- /dev/null
+++ b/dev-lang/go/go-9999.ebuild
@@ -0,0 +1,227 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+
+MY_PV=${PV/_/}
+
+inherit toolchain-funcs
+
+BOOTSTRAP_DIST="https://dev.gentoo.org/~williamh/dist"
+BOOTSTRAP_VERSION="bootstrap-1.8"
+BOOTSTRAP_URI="
+amd64? ( ${BOOTSTRAP_DIST}/go-linux-amd64-${BOOTSTRAP_VERSION}.tbz )
+arm? ( ${BOOTSTRAP_DIST}/go-linux-arm-${BOOTSTRAP_VERSION}.tbz )
+arm64? ( ${BOOTSTRAP_DIST}/go-linux-arm64-${BOOTSTRAP_VERSION}.tbz )
+ppc64? (
+ ${BOOTSTRAP_DIST}/go-linux-ppc64-${BOOTSTRAP_VERSION}.tbz
+ ${BOOTSTRAP_DIST}/go-linux-ppc64le-${BOOTSTRAP_VERSION}.tbz
+)
+s390? ( ${BOOTSTRAP_DIST}/go-linux-s390x-${BOOTSTRAP_VERSION}.tbz )
+x86? ( ${BOOTSTRAP_DIST}/go-linux-386-${BOOTSTRAP_VERSION}.tbz )
+amd64-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-amd64-${BOOTSTRAP_VERSION}.tbz )
+x86-fbsd? ( ${BOOTSTRAP_DIST}/go-freebsd-386-${BOOTSTRAP_VERSION}.tbz )
+x64-macos? ( ${BOOTSTRAP_DIST}/go-darwin-amd64-${BOOTSTRAP_VERSION}.tbz )
+x64-solaris? ( ${BOOTSTRAP_DIST}/go-solaris-amd64-${BOOTSTRAP_VERSION}.tbz )
+"
+
+case ${PV} in
+*9999*)
+ EGIT_REPO_URI="https://github.com/golang/go.git"
+ inherit git-r3
+ ;;
+*)
+ SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
+ S="${WORKDIR}"/go
+ case ${PV} in
+ *_beta*|*_rc*) ;;
+ *)
+ KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris"
+ # The upstream tests fail under portage but pass if the build is
+ # run according to their documentation [1].
+ # I am restricting the tests on released versions until this is
+ # solved.
+ # [1] https://golang.org/issues/18442
+ RESTRICT="test"
+ ;;
+ esac
+esac
+SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )"
+
+DESCRIPTION="A concurrent garbage collected and typesafe programming language"
+HOMEPAGE="https://golang.org"
+
+LICENSE="BSD"
+SLOT="0/${PV}"
+IUSE="gccgo"
+
+DEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
+RDEPEND="!<dev-go/go-tools-0_pre20150902"
+
+# These test data objects have writable/executable stacks.
+QA_EXECSTACK="
+ usr/lib/go/src/debug/elf/testdata/*.obj
+ usr/lib/go/src/go/internal/gccgoimporter/testdata/unicode.gox
+ usr/lib/go/src/go/internal/gccgoimporter/testdata/time.gox
+ "
+
+# Do not complain about CFLAGS, etc, since Go doesn't use them.
+QA_FLAGS_IGNORED='.*'
+
+REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
+
+# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
+QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
+
+# Do not strip this package. Stripping is unsupported upstream and may
+# fail.
+RESTRICT+=" strip"
+
+DOCS=(
+AUTHORS
+CONTRIBUTING.md
+CONTRIBUTORS
+PATENTS
+README.md
+)
+
+go_arch()
+{
+ # By chance most portage arch names match Go
+ local portage_arch=$(tc-arch $@)
+ case "${portage_arch}" in
+ x86) echo 386;;
+ x64-*) echo amd64;;
+ ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
+ s390) echo s390x ;;
+ *) echo "${portage_arch}";;
+ esac
+}
+
+go_arm()
+{
+ case "${1:-${CHOST}}" in
+ armv5*) echo 5;;
+ armv6*) echo 6;;
+ armv7*) echo 7;;
+ *)
+ die "unknown GOARM for ${1:-${CHOST}}"
+ ;;
+ esac
+}
+
+go_os()
+{
+ case "${1:-${CHOST}}" in
+ *-linux*) echo linux;;
+ *-darwin*) echo darwin;;
+ *-freebsd*) echo freebsd;;
+ *-netbsd*) echo netbsd;;
+ *-openbsd*) echo openbsd;;
+ *-solaris*) echo solaris;;
+ *-cygwin*|*-interix*|*-winnt*)
+ echo windows
+ ;;
+ *)
+ die "unknown GOOS for ${1:-${CHOST}}"
+ ;;
+ esac
+}
+
+go_tuple()
+{
+ echo "$(go_os $@)_$(go_arch $@)"
+}
+
+go_cross_compile()
+{
+ [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
+}
+
+pkg_pretend()
+{
+ # make.bash does not understand cross-compiling a cross-compiler
+ if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
+ die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
+ fi
+}
+
+src_unpack()
+{
+ if [[ ${PV} = 9999 ]]; then
+ git-r3_src_unpack
+ fi
+ default
+}
+
+src_compile()
+{
+ export GOROOT_BOOTSTRAP="${WORKDIR}"/go-$(go_os)-$(go_arch)-bootstrap
+ if use gccgo; then
+ mkdir -p "${GOROOT_BOOTSTRAP}/bin" || die
+ local go_binary=$(gcc-config --get-bin-path)/go-$(gcc-major-version)
+ [[ -x ${go_binary} ]] || go_binary=$(
+ find "${EPREFIX}"/usr/${CHOST}/gcc-bin/*/go-$(gcc-major-version) |
+ sort -V | tail -n1)
+ [[ -x ${go_binary} ]] ||
+ die "go-$(gcc-major-version): command not found"
+ ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
+ fi
+ export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
+ export GOROOT="$(pwd)"
+ export GOBIN="${GOROOT}/bin"
+
+ # Go's build script does not use BUILD/HOST/TARGET consistently. :(
+ export GOHOSTARCH=$(go_arch ${CBUILD})
+ export GOHOSTOS=$(go_os ${CBUILD})
+ export CC=$(tc-getBUILD_CC)
+
+ export GOARCH=$(go_arch)
+ export GOOS=$(go_os)
+ export CC_FOR_TARGET=$(tc-getCC)
+ export CXX_FOR_TARGET=$(tc-getCXX)
+ if [[ ${ARCH} == arm ]]; then
+ export GOARM=$(go_arm)
+ fi
+ einfo "GOROOT_BOOTSTRAP is ${GOROOT_BOOTSTRAP}"
+
+ cd src
+ ./make.bash || die "build failed"
+}
+
+src_test()
+{
+ go_cross_compile && return 0
+
+ cd src
+ PATH="${GOBIN}:${PATH}" \
+ ./run.bash -no-rebuild || die "tests failed"
+}
+
+src_install()
+{
+ local bin_path f x
+
+ dodir /usr/lib/go
+
+ # There is a known issue which requires the source tree to be installed [1].
+ # Once this is fixed, we can consider using the doc use flag to control
+ # installing the doc and src directories.
+ # [1] https://golang.org/issue/2775
+ #
+ # deliberately use cp to retain permissions
+ cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
+ if go_cross_compile; then
+ bin_path="bin/$(go_tuple)"
+ else
+ bin_path=bin
+ fi
+ for x in ${bin_path}/*; do
+ f=${x##*/}
+ dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
+ done
+ einstalldocs
+}
diff --git a/dev-lang/go/metadata.xml b/dev-lang/go/metadata.xml
new file mode 100644
index 000000000000..f981de1f10bc
--- /dev/null
+++ b/dev-lang/go/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>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+ </maintainer>
+ <longdescription lang="en">
+ Go is a new systems programming language developped at google by
+ Rob Pike. It has garbage collection, coroutines, communication
+ channels and a clean syntax.
+ </longdescription>
+ <use>
+ <flag name="gccgo">Enable bootstrapping using gccgo</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/gprolog/Manifest b/dev-lang/gprolog/Manifest
new file mode 100644
index 000000000000..057dd4167581
--- /dev/null
+++ b/dev-lang/gprolog/Manifest
@@ -0,0 +1,10 @@
+AUX gprolog-1.4.4-ldflags.patch 2015 SHA256 37df811f95e28be72d4516c152a8b9cb1ef0061312b364abfcddaaa67d92dfef SHA512 6b2c7efc33a17bb69ac14b807a54a67a4327071616c40296c60d8b25abe6231dd673138cd383ee4e232b53fe02fdf06c1a391ec3dd67dc2002ae39d40f37e7ef WHIRLPOOL 9877772df3906591bacabfe5f6645304054a187b7d3d42bef9fe437851810443350b1ef82e19ae676df8adb64839018e59bf1949ca6c052e4a0cebb2b1dbf73a
+AUX gprolog-1.4.4-links.patch 562 SHA256 84a46f510413150f809e7ad176294465f0ee53a6f8faaf9eba74a3f07145d610 SHA512 ab3e41c8c55035ca466062b7a5184f23c32a568a41714add6577c0f2e573fe72e05b3aa69427406d05d88c4cb171148a0fd9d084b69d34657dfbf573513a1128 WHIRLPOOL 7a0a548b4c105fe6a6c7aa9c34d8a3567f03c8cdaa14491f09485cc6c6c8d511a12e37ec0431ab22f0c4fcff90c7cb2155df27643c007f0a588cc460874c5369
+AUX gprolog-1.4.4-nodocs.patch 1191 SHA256 4e342653326b061b5c0943f4396e2df78af8d39e2265408acb515465d665605c SHA512 c0dd7f705adaadbd5aa0bf164717928b5de52b507b2e6e9b8e07bcc99f43f8d010f8d7283a76f429d70b1024ae2db47fe01cef911857a5ad0d7c6693c2da1a28 WHIRLPOOL 14b711c5e76dc685a205dcfdf71ba7afe70a24813cbca8d996539c587ac126d2bdedf9fa494a3629ba12c3a49ddca2d61f94ab1823aeb487382956c7a81b2722
+AUX gprolog-1.4.4-pic-code.patch 568 SHA256 92d37326b3140348f9a7f86896d4c20e88ce293d873231866eb7c029fec23dae SHA512 190f693751b307f5390c5a2fde7e2a8ac6e9be6fa66ded5161b3b94a9db2a0789ed3a10b7aa8e00104473dc01a081889db9f7deddde6f94dfaa447804cde286d WHIRLPOOL affa2805869537dc5502bed9926d8bca9b74df40a6c26fec41182d9415625f63d6ac7fcd4a5a49a24f649c947a579a142cc9352443fbb6e8aa945c4371e7b18d
+AUX gprolog-1.4.4-txt-file.patch 652 SHA256 a767cb72469d85bcfed3cf0a81e702b38a6b9ffec83af0e8bebbc1133dd7bd55 SHA512 658014da6b6e75555e9fbe4c55769de2401ebac627634d0046fb14e10e51e8f8915509bc482f6f1254c63d6fa47199757b31f94db6271dc4fdc8f02e2e0c59cc WHIRLPOOL 8e654f0dddfed62f55688dd48144c1f718a1bf52c009628dd143814e3f8ddab545a6240374f6b689957dc21085c5f17d729082fbdff5878b2c7e8e486f07b79c
+DIST gprolog-1.4.4.tar.gz 3538152 SHA256 18c0e9644b33afd4dd3cdf29f94c099ad820d65e0c99da5495b1ae43b4f2b18e SHA512 b6227a06794d31162f2c790a025f7372a6676c1891a76e880d2152aeab6322d3341aeab85e11d9be6d97ff1c69801bee73fa3ea6b0659af61f55990a455dc212 WHIRLPOOL cdcdd60a7ebd045fa9bad2692430577477fc3a42eca3c86b31ce6c7c26c1b7c9e9c6d60273b33d0ceaec85bab08cc30d482c9ff740ed1ca0fce37a4b2c0a191d
+EBUILD gprolog-1.4.4.ebuild 1557 SHA256 be40c48d24b65974d34a9e4c9e284cf596198404add8e38e19150ae92ec7b272 SHA512 30f9edfe26b273f9d23609450761aef70c2d50e4a894fb87cd7ab773087fd410d99c7f489bbb554db656308e7e76fca36c40cb289013d7ee132188086d46a6c7 WHIRLPOOL dfa1da61e8e301484af4e6d77e4680027a9cf4c88d1d17483ef0907cd43c228c8ba40e93f44171af0aa1808faaaa11d7443f3746f0127b2bd4382e99ab4c1af8
+MISC ChangeLog 2573 SHA256 23670f42a57773f937a11bfae8879002ae2b1702a8f8e3d9a46c01d6558c11b9 SHA512 3ae2f7c2ab96d2d2b19716b8e11a883a7358a5f1848acabaae0ee76d7d06be5bd0b7285ff50faaaa1d962390b7b611922f1eb393bf3f1ebcb98a1ca32ea83333 WHIRLPOOL a83a801281ae4ca3348131b05e44bfa07aa0164da5f4afedaa6025e7ab28fc3d777d495e1ed1df67227fdefbf8c9b12741c999997c67b64ea0f346bf53c1d86b
+MISC ChangeLog-2015 10981 SHA256 c494bff64652a85a50a5ec71d33511fab911887a08cec461410adf017ee19818 SHA512 a63b1ba275edd9a17634f49f5eabb0c08f3a48eb51e1d4732bffb12e8039e5a27d28e1a0ba9dcd6d2f72749c2478cdeb30941e7fd2ed4e25599a817caeaa7875 WHIRLPOOL 6cbeeda7b112f1a3510e04b3aaf412ceea39acce98624548310f1aa0a68846107642390fb2d81b3e0ed4176807380a08540877ff9b5a9ad01d73936180ba6890
+MISC metadata.xml 236 SHA256 c7fee7a3c12781805b151438049c445031a7b7031f7f46869144430034dae0c7 SHA512 e776224736bd575412c7b5b799f649c6b2947a70e6a9aea580063d9da7d09a8144e5ebaf7ac3ef131d578486cf05dec814dce11b2aeb884cded3be3cab70fcec WHIRLPOOL 7173f7ab9ba51d9d11c9039b22bb96b429171319fc41cd20b4773cd4c5135d18add75769d2f5f450831d48e59e3b4a31488d0b00d655d4e03e97550677197bce
diff --git a/dev-lang/gprolog/files/gprolog-1.4.4-ldflags.patch b/dev-lang/gprolog/files/gprolog-1.4.4-ldflags.patch
new file mode 100644
index 000000000000..21f256bf71cb
--- /dev/null
+++ b/dev-lang/gprolog/files/gprolog-1.4.4-ldflags.patch
@@ -0,0 +1,40 @@
+diff -ur gprolog-1.4.4.orig/src/Ma2Asm/Makefile.in gprolog-1.4.4/src/Ma2Asm/Makefile.in
+--- gprolog-1.4.4.orig/src/Ma2Asm/Makefile.in 2013-04-15 09:24:11.000000000 +0200
++++ gprolog-1.4.4/src/Ma2Asm/Makefile.in 2013-05-15 16:59:59.000000000 +0200
+@@ -19,7 +19,7 @@
+
+ ma2asm@EXE_SUFFIX@: ma2asm@OBJ_SUFFIX@ ma_parser@OBJ_SUFFIX@ \
+ ma2asm_inst@OBJ_SUFFIX@ ma2asm_inst.c
+- $(CC) $(CFLAGS) @CC_EXE_NAME_OPT@ma2asm@EXE_SUFFIX@ ma2asm@OBJ_SUFFIX@ ma2asm_inst@OBJ_SUFFIX@ ma_parser@OBJ_SUFFIX@
++ $(CC) $(LDFLAGS) @CC_EXE_NAME_OPT@ma2asm@EXE_SUFFIX@ ma2asm@OBJ_SUFFIX@ ma2asm_inst@OBJ_SUFFIX@ ma_parser@OBJ_SUFFIX@
+
+
+ clean:
+diff -ur gprolog-1.4.4.orig/src/TopComp/Makefile.in gprolog-1.4.4/src/TopComp/Makefile.in
+--- gprolog-1.4.4.orig/src/TopComp/Makefile.in 2013-04-15 09:24:12.000000000 +0200
++++ gprolog-1.4.4/src/TopComp/Makefile.in 2013-05-15 16:59:59.000000000 +0200
+@@ -15,10 +15,10 @@
+
+ $(GPLC)@EXE_SUFFIX@: top_comp.c copying.c ../EnginePl/wam_regs.h \
+ ../EnginePl/gp_config.h ../EnginePl/machine1.c decode_hexa.c copying.c prolog_path.c
+- $(CC) $(CFLAGS) @CC_EXE_NAME_OPT@$(GPLC)@EXE_SUFFIX@ top_comp.c $(LDLIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) @CC_EXE_NAME_OPT@$(GPLC)@EXE_SUFFIX@ top_comp.c $(LDLIBS)
+
+ $(HEXGPLC)@EXE_SUFFIX@: hexfilter.c decode_hexa.c
+- $(CC) $(CFLAGS) @CC_EXE_NAME_OPT@$(HEXGPLC)@EXE_SUFFIX@ hexfilter.c
++ $(CC) $(LDFLAGS) $(CFLAGS) @CC_EXE_NAME_OPT@$(HEXGPLC)@EXE_SUFFIX@ hexfilter.c
+
+
+
+diff -ur gprolog-1.4.4.orig/src/Wam2Ma/Makefile.in gprolog-1.4.4/src/Wam2Ma/Makefile.in
+--- gprolog-1.4.4.orig/src/Wam2Ma/Makefile.in 2013-04-15 09:24:11.000000000 +0200
++++ gprolog-1.4.4/src/Wam2Ma/Makefile.in 2013-05-15 16:59:59.000000000 +0200
+@@ -12,7 +12,7 @@
+ $(CC) $(CFLAGS) -c wam2ma.c
+
+ wam2ma@EXE_SUFFIX@: wam2ma@OBJ_SUFFIX@ wam_parser@OBJ_SUFFIX@
+- $(CC) $(CFLAGS) @CC_EXE_NAME_OPT@wam2ma@EXE_SUFFIX@ wam2ma@OBJ_SUFFIX@ wam_parser@OBJ_SUFFIX@
++ $(CC) $(LDFLAGS) @CC_EXE_NAME_OPT@wam2ma@EXE_SUFFIX@ wam2ma@OBJ_SUFFIX@ wam_parser@OBJ_SUFFIX@
+
+
+ clean:
diff --git a/dev-lang/gprolog/files/gprolog-1.4.4-links.patch b/dev-lang/gprolog/files/gprolog-1.4.4-links.patch
new file mode 100644
index 000000000000..25044ac9fc36
--- /dev/null
+++ b/dev-lang/gprolog/files/gprolog-1.4.4-links.patch
@@ -0,0 +1,16 @@
+diff -ur gprolog-1.4.4.orig/src/Makefile.in gprolog-1.4.4/src/Makefile.in
+--- gprolog-1.4.4.orig/src/Makefile.in 2013-04-23 16:56:44.000000000 +0200
++++ gprolog-1.4.4/src/Makefile.in 2013-05-15 17:00:58.000000000 +0200
+@@ -81,10 +81,10 @@
+
+ # --- Links --- #
+
+-install-links: uninstall-links
++install-links:
+ if test $(LINKS_DIR) != none; then \
+ ./mkinstalldirs $(LINKS_DIR); \
+- (cd $(LINKS_DIR) ; $(LN_S) $(INSTALL_DIR)/bin/* .); \
++ (cd $(LINKS_DIR); for i in $(BIN_FILES); do $(LN_S) $(INSTALL_DIR)/bin/$$i .; done); \
+ fi
+
+ uninstall-links:
diff --git a/dev-lang/gprolog/files/gprolog-1.4.4-nodocs.patch b/dev-lang/gprolog/files/gprolog-1.4.4-nodocs.patch
new file mode 100644
index 000000000000..f5246e0302ad
--- /dev/null
+++ b/dev-lang/gprolog/files/gprolog-1.4.4-nodocs.patch
@@ -0,0 +1,30 @@
+diff -ur gprolog-1.4.4.orig/src/Makefile.in gprolog-1.4.4/src/Makefile.in
+--- gprolog-1.4.4.orig/src/Makefile.in 2013-04-23 16:56:44.000000000 +0200
++++ gprolog-1.4.4/src/Makefile.in 2013-05-15 17:01:25.000000000 +0200
+@@ -97,7 +97,7 @@
+ # --- Documentation --- #
+
+ install-doc:
+- if test $(DOC_DIR) != none; then \
++ if test $(DOC_DIR) != $(DESTDIR)none; then \
+ ./mkinstalldirs $(DOC_DIR); \
+ (F=`cd ../doc; echo $(DOC_FILES)`; \
+ for i in $$F; do $(INSTALL_DATA) ../doc/$$i $(DOC_DIR); done); \
+@@ -113,7 +113,7 @@
+ # --- HTML --- #
+
+ install-html:
+- if test $(HTML_DIR) != none; then \
++ if test $(HTML_DIR) != $(DESTDIR)none; then \
+ ./mkinstalldirs $(HTML_DIR); \
+ (F=`cd ../doc/html_node; echo $(HTML_FILES)`; \
+ for i in $$F; do $(INSTALL_DATA) ../doc/html_node/$$i $(HTML_DIR); done); \
+@@ -129,7 +129,7 @@
+ # --- Examples --- #
+
+ install-examples:
+- if test $(EXAMPLES_DIR) != none; then \
++ if test $(EXAMPLES_DIR) != $(DESTDIR)none; then \
+ ./mkinstalldirs $(EXAMPLES_DIR)/ExamplesPl; \
+ (F=`cd ../examples/ExamplesPl; echo $(EXPL_FILES)`; \
+ for i in $$F; do $(INSTALL_DATA) ../examples/ExamplesPl/$$i $(EXAMPLES_DIR)/ExamplesPl; done); \
diff --git a/dev-lang/gprolog/files/gprolog-1.4.4-pic-code.patch b/dev-lang/gprolog/files/gprolog-1.4.4-pic-code.patch
new file mode 100644
index 000000000000..a85aea0746eb
--- /dev/null
+++ b/dev-lang/gprolog/files/gprolog-1.4.4-pic-code.patch
@@ -0,0 +1,12 @@
+diff -ur gprolog-1.4.4.orig/src/Ma2Asm/x86_64_any.c gprolog-1.4.4/src/Ma2Asm/x86_64_any.c
+--- gprolog-1.4.4.orig/src/Ma2Asm/x86_64_any.c 2013-04-22 13:52:16.000000000 +0200
++++ gprolog-1.4.4/src/Ma2Asm/x86_64_any.c 2017-07-19 17:27:37.057124771 +0200
+@@ -204,7 +204,7 @@
+ strcpy(asm_reg_cp, Off_Reg_Bank(MAP_OFFSET_CP));
+ #endif
+
+-#ifdef M_x86_64_darwin
++#if defined(M_x86_64_darwin) || defined(M_x86_64_linux)
+ pic_code = 1; /* NB: on darwin everything is PIC code */
+ #elif defined(_WIN32)
+ pic_code = 0; /* NB: on MinGW nothing is needed for PIC code */
diff --git a/dev-lang/gprolog/files/gprolog-1.4.4-txt-file.patch b/dev-lang/gprolog/files/gprolog-1.4.4-txt-file.patch
new file mode 100644
index 000000000000..adeb4428b582
--- /dev/null
+++ b/dev-lang/gprolog/files/gprolog-1.4.4-txt-file.patch
@@ -0,0 +1,11 @@
+diff -ur gprolog-1.4.4.orig/src/Makefile.in gprolog-1.4.4/src/Makefile.in
+--- gprolog-1.4.4.orig/src/Makefile.in 2013-04-23 16:56:44.000000000 +0200
++++ gprolog-1.4.4/src/Makefile.in 2013-05-15 17:01:48.000000000 +0200
+@@ -60,7 +60,6 @@
+ install-system:
+ ./mkinstalldirs $(INSTALL_DIR) $(INSTALL_DIR)/bin \
+ $(INSTALL_DIR)/include $(INSTALL_DIR)/lib
+- for i in $(TXT_FILES); do $(INSTALL_DATA) ../$$i $(INSTALL_DIR); done
+ for i in $(BIN_FILES); do $(INSTALL_PROGRAM) */$$i $(INSTALL_DIR)/bin; done
+ for i in $(OBJ_FILES); do $(INSTALL_DATA) */$$i $(INSTALL_DIR)/lib; done
+ for i in $(LIB_FILES); do $(INSTALL_DATA) */$$i $(INSTALL_DIR)/lib; done
diff --git a/dev-lang/gprolog/gprolog-1.4.4.ebuild b/dev-lang/gprolog/gprolog-1.4.4.ebuild
new file mode 100644
index 000000000000..4d915c78666d
--- /dev/null
+++ b/dev-lang/gprolog/gprolog-1.4.4.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils flag-o-matic multilib
+
+DESCRIPTION="A native Prolog compiler with constraint solving over finite domains (FD)"
+HOMEPAGE="http://www.gprolog.org/"
+SRC_URI="mirror://gnu/gprolog/${P}.tar.gz"
+S="${WORKDIR}"/${P}
+
+LICENSE="GPL-2 LGPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE="debug doc examples"
+
+DEPEND=""
+RDEPEND=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ldflags.patch
+ epatch "${FILESDIR}"/${P}-pic-code.patch
+ epatch "${FILESDIR}"/${P}-links.patch
+ epatch "${FILESDIR}"/${P}-nodocs.patch
+ epatch "${FILESDIR}"/${P}-txt-file.patch
+}
+
+src_configure() {
+ CFLAGS_MACHINE="`get-flag -march` `get-flag -mcpu` `get-flag -mtune`"
+
+ append-flags -fno-strict-aliasing
+ use debug && append-flags -DDEBUG
+
+ cd "${S}"/src
+ econf \
+ CFLAGS_MACHINE="${CFLAGS_MACHINE}" \
+ --with-c-flags="${CFLAGS}" \
+ --with-install-dir="${EPREFIX}"/usr/$(get_libdir)/${P} \
+ --with-links-dir="${EPREFIX}"/usr/bin \
+ $(use_with doc doc-dir ${EPREFIX}/usr/share/doc/${PF}) \
+ $(use_with doc html-dir ${EPREFIX}/usr/share/doc/${PF}/html) \
+ $(use_with examples examples-dir ${EPREFIX}/usr/share/doc/${PF}/examples)
+}
+
+src_compile() {
+ cd "${S}"/src
+ # gprolog is compiled using gplc which cannot be run in parallel
+ emake -j1
+}
+
+src_test() {
+ cd "${S}"/src
+ emake -j1 check
+}
+
+src_install() {
+ cd "${S}"/src
+ emake DESTDIR="${D}" install
+
+ cd "${S}"
+ dodoc ChangeLog NEWS PROBLEMS README VERSION
+}
diff --git a/dev-lang/gprolog/metadata.xml b/dev-lang/gprolog/metadata.xml
new file mode 100644
index 000000000000..96eff3ea40c0
--- /dev/null
+++ b/dev-lang/gprolog/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>prolog@gentoo.org</email>
+ <name>Prolog</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-lang/gwydion-dylan-bin/Manifest b/dev-lang/gwydion-dylan-bin/Manifest
new file mode 100644
index 000000000000..fa95ff3d70df
--- /dev/null
+++ b/dev-lang/gwydion-dylan-bin/Manifest
@@ -0,0 +1,6 @@
+AUX 20gwydion-dylan-bin 195 SHA256 9871cb1ddf67064f6b6159f949425dc37826d6026a7cf5b073e5837880cdd33a SHA512 28c3921fab8d8aec4de4ba902609c4500fb8f60a7b9ac6791ad7f139a2ad4fe991680cdeaa485fc7b7a5791cfa516559ef3d53d21fe9085c72cdf4421557e9af WHIRLPOOL 5ab0bf047058171b1fb43efc4ec5c714f455b5bf933addfb024aa2788072870bae7a5e420caf6b3c7e9cb2f3aab91b367df5c5bd31ef7e7e30764a311c867035
+DIST gwydion-dylan-bin-2.4.0-x86.tbz2 5846864 SHA256 2767f0bfa127eb57cc8cd52fa0446e43ec71d2bfc584a7d39b03c12f8c3ca0db SHA512 878c68f922fd02a2f5d6a64d94706d878502c143a02e34dc325e68f3881fcbea2a71a81f000ee0d40d494f6e7cf3f4aeef5208ea2efb62b24e6b7afdf7d87070 WHIRLPOOL 765f89606bd1b99cd40836a6dd42c844888a50f239ab0c94acdc001c7e3a465be218b6ca51efbe3d7db6c7ac67fce34036c547d74529d01fc7888d7270d01d43
+EBUILD gwydion-dylan-bin-2.4.0-r1.ebuild 542 SHA256 f8db750fec64f09a44effb74ae849c9733e35bb05746e2a1f98912d227d2daee SHA512 689ff7b3ef1496c5a20c9e0cbb966d0cb67d550f98bc59ea355cd152a75410f81547d8a41092af853c7d0a69e99e1e817d4dfd4e51382e73952a4b461bc7bbdd WHIRLPOOL faf87738052448af6227bd154bad36779647d601028fe27523f96f37305fac7995782cbdcebf8aa7211638caf02e59a2f42870c418085806e53c792ca83306cb
+MISC ChangeLog 2981 SHA256 f7854fa5fdb6a602b17627711bd1cbed9ffe7383b54aea2e2a8bd4290da6858c SHA512 9665769edbf25afcffaff511649eae3c43c46084cdd2d3c8499eadf0be47d566a36fde56f58c0104501ae274d7be1fec0afcaec23204561f3d8ca7924d63c0bb WHIRLPOOL e8afb7e5ded65bc3a45b4b893527072f481c324bc54668e73057f779b4992ee2019f9dab44b7a273903d59a1bdd381486433005d5cbe5743898bfd4827010452
+MISC ChangeLog-2015 1150 SHA256 66f28f6cac11c6b79b17a923e8ad149b91a765be34e907274dcf8b15533017ca SHA512 4c6c652c8167ec92a239976a04475749b9867555bb148b701ea3744566b892f68309f17d0aea18a64700c62a4f411f6db0db1dfd0ac87ceaf87f455fdf446689 WHIRLPOOL 4161895ac07966bc0a89de675652277b018c7bd4b29475a1a39a73b460b627010c225e94d0e0a9497384e361cb573b37179d04110e2fdb0a837b4f55025e63ac
+MISC metadata.xml 746 SHA256 5aa2b96bb15799e3014995e49b25444cd226720efabb39c434374c1e42aa6c45 SHA512 8c778a1e2b36af09213a4af64de7a301ac043f4e6e3c51825619ff52acf46f0f585f01db4280383e1366d35031bb9c90b0db12b7338fa1ef6843f3b2bca05fa1 WHIRLPOOL 7afb8406b029939db364e9e58d71b9994682f98f10079927171fa84d23e7ddf873ff9546ed6cad302c8ba5e224d506a856a5a83bceff5ec40ecbc10e03df8481
diff --git a/dev-lang/gwydion-dylan-bin/files/20gwydion-dylan-bin b/dev-lang/gwydion-dylan-bin/files/20gwydion-dylan-bin
new file mode 100644
index 000000000000..a5563a220b71
--- /dev/null
+++ b/dev-lang/gwydion-dylan-bin/files/20gwydion-dylan-bin
@@ -0,0 +1,4 @@
+PATH="/opt/gwydion-dylan/:/opt/gwydion-dylan/bin"
+ROOTPATH="/opt/gwydion-dylan/:/opt/gwydion-dylan/bin"
+LDPATH="/opt/gwydion-dylan/lib/dylan/2.4.0/x86-linux-gcc33/"
+DYLANDIR="/opt/gwydion-dylan"
diff --git a/dev-lang/gwydion-dylan-bin/gwydion-dylan-bin-2.4.0-r1.ebuild b/dev-lang/gwydion-dylan-bin/gwydion-dylan-bin-2.4.0-r1.ebuild
new file mode 100644
index 000000000000..86e053fdc2ea
--- /dev/null
+++ b/dev-lang/gwydion-dylan-bin/gwydion-dylan-bin-2.4.0-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="The Dylan Programming Language Compiler"
+HOMEPAGE="http://www.gwydiondylan.org/"
+SRC_URI="x86? ( mirror://gentoo/${P}-x86.tbz2 )"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+RESTRICT="strip"
+LOC="/opt/gwydion-dylan"
+
+DEPEND=""
+RDEPEND=">=dev-libs/boehm-gc-6.4"
+
+S="${WORKDIR}"
+
+src_compile() {
+ mkdir -p "./${LOC}"
+ mv usr/* "./${LOC}"
+}
+
+src_install() {
+ cp -pr * "${D}"
+ doenvd "${FILESDIR}/20gwydion-dylan-bin"
+}
diff --git a/dev-lang/gwydion-dylan-bin/metadata.xml b/dev-lang/gwydion-dylan-bin/metadata.xml
new file mode 100644
index 000000000000..5f0c3835eb34
--- /dev/null
+++ b/dev-lang/gwydion-dylan-bin/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-needed -->
+<longdescription lang="en">
+Dylan is an advanced, object-oriented, dynamic language which supports the rapid
+development of programs. When needed, the programmer can later optimize [his or
+her] programs for more efficient execution by supplying type information to the
+compiler. Nearly all entities in Dylan (including functions, classes, and basic
+data types such as integers) are first class objects. Additionally Dylan
+supports multiple inheritance, polymorphism, multiple dispatch, keyword
+arguments, object introspection, and many other advanced features.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/helium/Manifest b/dev-lang/helium/Manifest
new file mode 100644
index 000000000000..b7f8e49abd06
--- /dev/null
+++ b/dev-lang/helium/Manifest
@@ -0,0 +1,11 @@
+AUX helium-1.6-respect-cflags-ldflags-nostrip.patch 1847 SHA256 333b77e13e38d7639e79251d32346c9f1857d2b6585ec2c85ec2b325c13ca34e SHA512 cd3f176f618cc32bb4feb1b693e9b281e388897380172c85645b478d6be79b164e57754b5c7cb58bc55b956644323900bb6bca5bfa74b28857a69f9eeeb52635 WHIRLPOOL 406de1a3a23c089e9bc4936f487522c9df81eab741ec5cb52c2885e295398984d5a734993fc4665de4faedd1d853810de798ed4811547ada34fe171c5067e813
+AUX helium-1.8.1-ghc-7.10.patch 2459 SHA256 99ec8923844a6a95a3001c7f89160024ff89f5845d7d0cfa88ed6c48c3dc6fee SHA512 fd63893965fefce259d01a464e95ee081dd1d46d36a2ae2901b541e14fc5a5eca9f44fb96de58775e0ca2d4b758d40bfb4f6acc746f6a8c98e3c552c04513531 WHIRLPOOL 9e8cbde8d32d3ca02bda77309576a807b067a67ebba8c1aea70d9ad87004765dec3670c369702e95528c20840f663310e06b24522d534e5007fce7e4b8f50cf2
+AUX helium-wrapper-1.6 549 SHA256 32fd3f3e349cb23f19b467d27180ef5af20fb538b17ba6fd95ed1743670d703a SHA512 254fc560106914ca992ff6318f6a69c3a284f54791eed55ec1a332123b09a6fc840f66caf3af977fcb3a9ee0019e825819d22e26747f40a3c11eb5f8fbf382f6 WHIRLPOOL ff1e149136427991fe7d5ea226004bbb2bcb4a72757678478388d5b0f5af06db75472dc479ecf33812d4d3478bb1f6a53adf52e0f8b5f211d2380b62e51da1a0
+DIST helium-1.6-ghc.patch.bz2 34579 SHA256 da463fe2a27689ec702eaf7c687446272f983845228cbb45d0fa91e1542cd7ab SHA512 ac86750a98d3c87cb00e8777ad0e5a838df9d87ebdd8540d1c5a297a8488c810acbecf4d665ef7754da0f99729785f48fb77d24fc09f3c963fe972e06dc952c8 WHIRLPOOL 516bba56183eeeede84d3974c725024d90df92f280692ba921cea627044fe95dc2fd93eb20aea94f3476569a68a7ea6fc4141274e3f5d38abd5637fe85a86e93
+DIST helium-1.6-src.tar.gz 960254 SHA256 a93632d031a16c0ea516f4fa7ce63acd0950543c74265e22abd0993856a0a053 SHA512 f102c5a4f669cb0b7fecdf3efdf9dacf0cddb97e9bf5cbdebd0801169802dbfefbe3de08d3f36c1c66a3839a3b080e241840f5135eea40860a91157815026a95 WHIRLPOOL c1f76f87e37d8bcf41a8c919ee5306dc9067a09af55b7bbd66363d14865eddf010d04d5fb9e01a15c71b2bcd6fea44cfb0399758e79aad905d72f879aec80a50
+DIST helium-1.8.1.tar.gz 774509 SHA256 b2c0c29c31f495c4d4ab55bec3cfa84dba19efc3cdf2e699bcc350ee0a44936f SHA512 4523d7323251354ea9f4fd0f6f5a112659119bef2fc0c790bb139cdcdf25e7f740ae4c7d584d0c93aabc3baaace8be49931808c59ad9133b81a64ae115e0f9b9 WHIRLPOOL 97de6fe8a2a0923300ebb7b9536f27144b7a0ae263ad36eae85c7bbc939cf1a37349e7485682d6f4f0e3171811b8e58bd11bb1268f0c9f7330dc72d21198ed6a
+EBUILD helium-1.6.ebuild 3767 SHA256 7d079f64fcb6b06ebe51d7e41ea6c93b91db76a68847f5b83f1ffb006e8c1a03 SHA512 364896529dde2998b28d8d21d62c80c04a688f55939c36281b356647c456051478a198754d3ae8091cbab3edb2995a08b6b92391795252a8111582dad063ce95 WHIRLPOOL 874becaf0dbb64b2e73e240fd015d355f416bd68f1d1e4ac47b2f98699faeb6abd80b67cff7ff7daa3a04c2ecfdf4e0732347d2d46816e3f72f269b5ac19dd42
+EBUILD helium-1.8.1.ebuild 858 SHA256 ac4c75ebdc59d517371ae5ef74a4fd6a192a601edb6fb35e3b637aa216b4af41 SHA512 68990388e9f231d1cc5d8b26af8f89acd59b47883a414eac31d2a6f8b22d98422a05cdcc5e9c333001e0fbd04748668096287ef8e0077b0427f7229896184aea WHIRLPOOL 3b534bd3da86c9e9a7421e1fe38566eba5b45c25410187824c364cf3f4b838835ec0cc5d31cf418b4f7e71dd232befe17790c43bd9fc37c6004a757dd07db1ae
+MISC ChangeLog 2757 SHA256 f7d0b835c6f3a1ff19b15da0272e7d7625ea6172aaf04b6e0dc5ebd0e9a19ab6 SHA512 03d12cb09fb79d5919a8e5f69be7fd85b10eeb24da28b0d5bb485cdbadc244834fff9d034de34f46def9d62768e5735ab3958b8fcdfb7b80749ae85c3ac26c6b WHIRLPOOL 7f596eb73f2463fe0a6674191f688ffac47503ce316303c9276953c7e14272468a08643714714bbe32578fcacb28f642981623c7884b0ed8261829e566c47c0a
+MISC ChangeLog-2015 4411 SHA256 c9964acdfa13168ddd32214d926b211a496d7da4a7f56af1cad2f9374e5c59a7 SHA512 e1b0de1248ef1a30557fdfa046dc76fb9c3904bcabc6e45fabe2fd8e7aa66655acb489ac0c46fd5b30ae380f5d9ed9bf98fc19dbf0552d78a9d158f929da9303 WHIRLPOOL d81f2b6bede7936cf454f08e89fb4c37873abf9b2997b2e0ac1477802028f6ea664fa6121a7fe53b5d0d06d65931e28236557c6316ce4bcb42349f1f84a8a1b4
+MISC metadata.xml 249 SHA256 42d7c7dd941e18315af7fac3764608244765e6ff2ef268e05606543f7c1d2356 SHA512 ce055b41ff1c10209e88579fe21ce16550be7e9b21f87724564f06430aa6f478974f186a10c8ff7e92398f534c09109aeed57eae1c6d2b56b5c99ebfb64a0015 WHIRLPOOL d7559dc58d8f1945ae7523fee4bf65454c971fa788032e0a767f2b6a6366db3ad86e21ab6a46412db18549ecf39575a6f21b94a421f839b0efe47a7b5200648a
diff --git a/dev-lang/helium/files/helium-1.6-respect-cflags-ldflags-nostrip.patch b/dev-lang/helium/files/helium-1.6-respect-cflags-ldflags-nostrip.patch
new file mode 100644
index 000000000000..6c035ad3b8fc
--- /dev/null
+++ b/dev-lang/helium/files/helium-1.6-respect-cflags-ldflags-nostrip.patch
@@ -0,0 +1,59 @@
+Original report: https://bugs.gentoo.org/attachment.cgi?id=244509
+
+The patch is not ideal as lvm/src/configure runs
+compiler tests without those flags enabled, but
+they are broken anyways.
+
+Added CFLAGS, LDFLAGS, remover STRIP call in C part of lvm.
+diff --git a/lvm/src/configure b/lvm/src/configure
+index 9aa1a1d..2789828 100755
+--- a/helium-1.6/lvm/src/configure
++++ b/helium-1.6/lvm/src/configure
+@@ -647,7 +647,7 @@ fi
+ echo "CC=$ccomp" >> makefile
+ echo "LINK=$link" >> makefile
+ echo "STRIP=$strip" >> makefile
+-echo "LINKOPTS=$cclinkopts" >> makefile
++echo "LINKOPTS=$cclinkopts \$(LDFLAGS)" >> makefile
+ echo "EXE=$exe" >> makefile
+ echo "DLL=$dll" >> makefile
+ echo "CP=cp" >> makefile
+@@ -662,7 +662,7 @@ case "$config" in
+ echo "CONFIGPATH=../config" >> makefile;;
+ esac
+
+-echo "CCOPTS=$cccompopts -I\$(CONFIGPATH)" >> makefile
++echo "CCOPTS=$cccompopts -I\$(CONFIGPATH) \$(CFLAGS)" >> makefile
+
+ rm -f tst$exe hasgot.c *.obj
+
+diff --git a/lvm/src/lib/makefile b/lvm/src/lib/makefile
+index d9a0004..78cce0f 100644
+--- a/helium-1.6/lvm/src/lib/makefile
++++ b/helium-1.6/lvm/src/lib/makefile
+@@ -55,7 +55,6 @@ OBJS = $(SRCS:.hs=.o)
+ # The main target
+ $(MAIN)$(EXE): $(OBJS)
+ $(HC) -o $@ $(HC_OPTS) $(OBJS)
+- $(STRIP) $@
+
+ common/ghc/Special.hi: common/ghc/Special.hs
+ $(HC) -c $< -cpp -fglasgow-exts $(HC_OPTS)
+diff --git a/lvm/src/runtime/makefile b/lvm/src/runtime/makefile
+index 310a7b6..bde3550 100644
+--- a/helium-1.6/lvm/src/runtime/makefile
++++ b/helium-1.6/lvm/src/runtime/makefile
+@@ -47,11 +47,10 @@ OBJS = $(SRCS:.c=.o)
+
+
+ #lvmrun$(EXE): $(OBJS)
+-# $(LINK) -o $@ $(LINKOPT) $(OBJS) -g
++# $(LINK) -o $@ $(OBJS) -g $(LINKOPT)
+
+ lvmrun$(EXE): $(OBJS)
+- $(LINK) -o $@ $(LINKOPT) $(OBJS)
+- $(STRIP) $@
++ $(LINK) -o $@ $(OBJS) $(LINKOPT)
+
+ core/evaluator.o: core/evaluator.c
+ $(CC) -o $@ -c $< $(CCOPT_FAST)
diff --git a/dev-lang/helium/files/helium-1.8.1-ghc-7.10.patch b/dev-lang/helium/files/helium-1.8.1-ghc-7.10.patch
new file mode 100644
index 000000000000..43af33ecac89
--- /dev/null
+++ b/dev-lang/helium/files/helium-1.8.1-ghc-7.10.patch
@@ -0,0 +1,55 @@
+diff --git a/src/Helium/Parser/LexerMonad.hs b/src/Helium/Parser/LexerMonad.hs
+index 75ac077..af35093 100644
+--- a/src/Helium/Parser/LexerMonad.hs
++++ b/src/Helium/Parser/LexerMonad.hs
+@@ -20,2 +20,4 @@ import Helium.Parser.LexerMessage
+ import Text.ParserCombinators.Parsec.Pos
++import Control.Applicative
++import Control.Monad
+
+@@ -47,2 +49,9 @@ returnLM x = LM (\_ pos brackets -> Right (x, [], pos, brackets))
+
++instance Functor LexerMonad where
++ fmap = liftM
++
++instance Applicative LexerMonad where
++ pure = return
++ (<*>) = ap -- defined in Control.Monad
++
+ instance Monad LexerMonad where
+diff --git a/src/Helium/StaticAnalysis/Heuristics/OnlyResultHeuristics.hs b/src/Helium/StaticAnalysis/Heuristics/OnlyResultHeuristics.hs
+index 880ac0b..90574f0 100644
+--- a/src/Helium/StaticAnalysis/Heuristics/OnlyResultHeuristics.hs
++++ b/src/Helium/StaticAnalysis/Heuristics/OnlyResultHeuristics.hs
+@@ -1 +1,2 @@
++{-# LANGUAGE FlexibleContexts #-}
+ {-| Module : OnlyResultHeuristics
+diff --git a/src/Helium/StaticAnalysis/Heuristics/RepairHeuristics.hs b/src/Helium/StaticAnalysis/Heuristics/RepairHeuristics.hs
+index 89e43f2..251406f 100644
+--- a/src/Helium/StaticAnalysis/Heuristics/RepairHeuristics.hs
++++ b/src/Helium/StaticAnalysis/Heuristics/RepairHeuristics.hs
+@@ -1 +1,2 @@
++{-# LANGUAGE FlexibleContexts #-}
+ {-| Module : RepairHeuristics
+diff --git a/src/Helium/StaticAnalysis/Heuristics/TieBreakerHeuristics.hs b/src/Helium/StaticAnalysis/Heuristics/TieBreakerHeuristics.hs
+index d0b01a3..ba7ca19 100644
+--- a/src/Helium/StaticAnalysis/Heuristics/TieBreakerHeuristics.hs
++++ b/src/Helium/StaticAnalysis/Heuristics/TieBreakerHeuristics.hs
+@@ -1 +1,2 @@
++{-# LANGUAGE FlexibleContexts #-}
+ {-| Module : TieBreakerHeuristics
+diff --git a/src/Helium/StaticAnalysis/Heuristics/UnifierHeuristics.hs b/src/Helium/StaticAnalysis/Heuristics/UnifierHeuristics.hs
+index c2e91f5..493c882 100644
+--- a/src/Helium/StaticAnalysis/Heuristics/UnifierHeuristics.hs
++++ b/src/Helium/StaticAnalysis/Heuristics/UnifierHeuristics.hs
+@@ -1 +1,2 @@
++{-# LANGUAGE FlexibleContexts #-}
+ {-| Module : UnifierHeuristics
+diff --git a/src/Helium/Syntax/UHA_Pretty.hs b/src/Helium/Syntax/UHA_Pretty.hs
+index af970dc..ee42a48 100644
+--- a/src/Helium/Syntax/UHA_Pretty.hs
++++ b/src/Helium/Syntax/UHA_Pretty.hs
+@@ -17,2 +17,3 @@ import Control.Monad.Identity (Identity)
+ import qualified Control.Monad.Identity
++import Prelude hiding ((<$>))
+
diff --git a/dev-lang/helium/files/helium-wrapper-1.6 b/dev-lang/helium/files/helium-wrapper-1.6
new file mode 100644
index 000000000000..926e18cc6171
--- /dev/null
+++ b/dev-lang/helium/files/helium-wrapper-1.6
@@ -0,0 +1,31 @@
+#! /bin/sh
+
+BINNAME_LONG="$(basename $0)"
+BINNAME="${BINNAME_LONG%-tc}"
+
+if [ -n "${HELIUM_TEMP}" ]; then
+ TEMP="${HELIUM_TEMP}";
+else
+ TEMP="/tmp/helium-${USER}"
+ if ! [ -d "${TEMP}" ]; then
+ mkdir ${TEMP};
+ fi;
+fi
+
+# if [ "${BINNAME_LONG}" = "${BINNAME}" ]; then
+# HELIUM_LIBS="/usr/lib/helium/lib/simple";
+# else
+HELIUM_LIBS="/usr/lib/helium/lib";
+# fi
+
+if [ -z "${LVMPATH}" ]; then
+ LVMPATH=".:${HELIUM_LIBS}";
+else
+ LVMPATH="${LVMPATH}:${HELIUM_LIBS}";
+fi
+export LVMPATH
+export TEMP
+
+PROGCALL="/usr/lib/helium/bin/${BINNAME}"
+
+${PROGCALL} $*
diff --git a/dev-lang/helium/helium-1.6.ebuild b/dev-lang/helium/helium-1.6.ebuild
new file mode 100644
index 000000000000..fcf75d263bbf
--- /dev/null
+++ b/dev-lang/helium/helium-1.6.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit autotools eutils
+
+DESCRIPTION="Helium (for learning Haskell)"
+HOMEPAGE="http://www.cs.uu.nl/helium"
+SRC_URI="http://www.cs.uu.nl/helium/distr/${P}-src.tar.gz
+ mirror://gentoo/${P}-ghc.patch.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+# compilation breaks on amd64, suspect lvm doesn't work properly
+KEYWORDS="-amd64 ~ppc -sparc ~x86"
+IUSE="readline"
+
+DEPEND=">=dev-lang/ghc-6.8
+ dev-haskell/mtl
+ dev-haskell/parsec
+ readline? ( dev-haskell/readline )"
+RDEPEND="dev-libs/gmp
+ readline? ( sys-libs/readline )"
+
+src_unpack() {
+ unpack ${A}
+ epatch "${P}-ghc.patch"
+ epatch "${FILESDIR}/helium-1.6-respect-cflags-ldflags-nostrip.patch"
+
+ # split base only
+ sed -e 's/^GHCFLAGS =.*$/& -package containers/' \
+ -i "${S}/helium/src/Makefile.in"
+
+ # file has non-ASCII syms and it's pulled to ghc for dependency generaton
+ # ghc w/UTF-8 dislikes it:
+ sed -e 's/\xCA//g' \
+ -i "${S}/helium/src/Makefile.in"
+
+ # mangle evil 'rec' to 'rec_'. It's not very accurate, but less,
+ # than manually patching ~250 occurences. (ghc-6.10+ has rec as reserved word)
+ local bad_file
+
+ for bad_file in Top/src/Top/Types/Unification.hs \
+ Top/src/Top/Types/Quantification.hs \
+ Top/src/Top/Types/Primitive.hs \
+ Top/src/Top/Solver/PartitionCombinator.hs \
+ Top/src/Top/Repair/Repair.hs \
+ Top/src/Top/Ordering/Tree.hs \
+ Top/src/Top/Implementation/TypeGraph/Standard.hs \
+ Top/src/Top/Implementation/TypeGraph/Path.hs \
+ Top/src/Top/Implementation/TypeGraph/EquivalenceGroup.hs \
+ Top/src/Top/Implementation/TypeGraph/Basics.hs \
+ Top/src/Top/Implementation/TypeGraph/ApplyHeuristics.hs \
+ lvm/src/lib/lvm/LvmRead.hs \
+ lvm/src/lib/core/CoreNoShadow.hs \
+ helium/src/utils/LoggerEnabled.hs \
+ helium/src/staticanalysis/miscellaneous/TypesToAlignedDocs.hs \
+ helium/src/staticanalysis/miscellaneous/TypeConversion.hs \
+ helium/src/staticanalysis/inferencers/TypeInferencing.hs \
+ helium/src/staticanalysis/heuristics/RepairSystem.hs \
+ helium/src/staticanalysis/heuristics/RepairHeuristics.hs \
+ helium/src/staticanalysis/heuristics/ListOfHeuristics.hs \
+ helium/src/staticanalysis/directives/TS_PatternMatching.ag
+ do
+ # take all symbols from exactly this source. This set is not universal,
+ # but it aims to catch (same) lexeme separators on the left and on the right
+ sed -e 's/\([^a-zA-Z_0-9"]\|^\)rec\([^a-zA-Z_0-9"]\|$\)/\1rec_\2/g' \
+ -i "${S}/$bad_file"
+ done
+
+ # cabal is their friend (oneOf became polymorphic and breaks the test)
+ sed -e 's/Text.ParserCombinators.Parsec/&.Pos/g' \
+ -e 's/oneOf/newPos/g' \
+ -i "${S}/helium/configure.in"
+
+ cd "${S}/helium"
+ eautoreconf
+}
+
+src_compile() {
+ # helium consists of two components that have to be set up separately,
+ # lvm and the main compiler. both build systems are slightly strange.
+ # lvm uses a completely non-standard build system:
+ # the ./configure of lvm is not the usual autotools configure
+
+ cd "${S}/lvm/src" && ./configure || die "lvm configure failed"
+ echo "STRIP=echo" >> config/makefile || die "lvm postconfigure failed"
+ myconf="$(use_enable readline) --without-strip --without-upx --without-ag"
+ cd "${S}/helium" && econf --prefix="/usr/lib" ${myconf} || die "econf failed"
+ cd "${S}/helium/src" && make depend || die "make depend failed"
+
+ emake -j1 || die "make failed"
+}
+
+src_install() {
+ cd helium/src || die "cannot cd to helium/src"
+ make install bindir="/usr/lib/helium/bin" DESTDIR="${D}" || die "make install failed"
+
+ # create wrappers
+ newbin "${FILESDIR}/helium-wrapper-${PV}" helium-wrapper
+
+ dosym /usr/bin/helium-wrapper /usr/bin/texthint
+ dosym /usr/bin/helium-wrapper /usr/bin/helium
+ dosym /usr/bin/helium-wrapper /usr/bin/lvmrun
+}
diff --git a/dev-lang/helium/helium-1.8.1.ebuild b/dev-lang/helium/helium-1.8.1.ebuild
new file mode 100644
index 000000000000..5228a742d89f
--- /dev/null
+++ b/dev-lang/helium/helium-1.8.1.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.4.5.9999
+
+CABAL_FEATURES="bin lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+DESCRIPTION="The Helium Compiler"
+HOMEPAGE="http://www.cs.uu.nl/wiki/bin/view/Helium/WebHome"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-haskell/lvmlib-1.1:=[profile?]
+ dev-haskell/mtl:=[profile?]
+ dev-haskell/network:=[profile?]
+ dev-haskell/parsec:=[profile?]
+ >=dev-haskell/top-1.7:=[profile?]
+ dev-haskell/transformers:=[profile?]
+ dev-haskell/wl-pprint:=[profile?]
+ >=dev-lang/ghc-7.4.1:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.10.1.0
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.8.1-ghc-7.10.patch
+}
diff --git a/dev-lang/helium/metadata.xml b/dev-lang/helium/metadata.xml
new file mode 100644
index 000000000000..b7878815d80d
--- /dev/null
+++ b/dev-lang/helium/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>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/hy/Manifest b/dev-lang/hy/Manifest
new file mode 100644
index 000000000000..fcd2d1c38e41
--- /dev/null
+++ b/dev-lang/hy/Manifest
@@ -0,0 +1,15 @@
+DIST hy-0.10.0.tar.gz 340981 SHA256 524c9f2a2e0e789fe8896e9c7bea16c9f42e99d5b662080ec95e94de564523b9 SHA512 4f994289a00f16ed9c914fe8f37332d1bea9ddf3d2f42c30793da1030983d66d368d4bf75853dd76be14e440fca72aa3cccd3ddb5544e1db2b892a543bb1093b WHIRLPOOL 063ab5cf8e4f687a6bbbed9728e38e6ede0d1d7aa08e761175132428120ba31ed5ac39eaed9321b61b4a0f6a208cb69af6dc187c85d6de0139e1ff59f8d0153e
+DIST hy-0.10.1.tar.gz 348807 SHA256 16247c2f776147a46cd6c3beed329836c8a7a98e7ccb4b1cc660fced9688e02c SHA512 d96a5857fc6985fe044a152b276572f7943d3c579cf54daa675ec5d3e5d44836c151eb58f8e5cea8811f3bcb32b724fb24f8d61dc9ba917972673630e9cff7dc WHIRLPOOL 72e73cf008379de0e7f734f9a2687c70143fbb11bbb377c131e22eabaad355a88ea034e2b659c9bd1fa168eabfd0b8a802d779ced84b99ea5adb0718339f54a1
+DIST hy-0.11.1.tar.gz 358882 SHA256 8d53dd3d37dd15040b4e6fa514d480f88c935855c37ca9f4a4c0d0ed989aceaa SHA512 c3bb39e41bba306a529051aa214350dd51118bce956670b9688ecbd08d8e85c23efd4eae06977bab7f3a50f8cca1626d7a6442de6b59972fe1d91bdb791aa836 WHIRLPOOL 0dcebdd8e87470784603a92ae52bbccb6b84ad138fed5ec7bcb947ebc9d2042a43181805694cdad324f7691fae15758dc91bbc6d50f91b3541d95c9ec904ac80
+DIST hy-0.12.0.tar.gz 379282 SHA256 b747477292319e72d09b2b9e84191d1bb46910b4a74a49745aac32b1334bafa4 SHA512 fcad30640aad329c8a8c66167e01f96eddad95fd0d23ce8bf641ed96865c0a7610e8792bc94343edaa36a9a643e72ff946e491e55ca429f6a14a55bd05631470 WHIRLPOOL 4eea576675348bfece5ccdb89359c37d054b57b0824d55111a17aa179f791bddfe67d1d44e096224829d8db8afec8bf4af052701f5623faf8b4339f3035539f7
+DIST hy-0.12.1.tar.gz 379361 SHA256 a1cb381ff3241fa1d70aff38b8f0eca0e9153a370710d3e2e0fd973ce855fe2e SHA512 8b1c957b37aa46baf7ac2a20d7ea4321824ee13e08146edcfdd7eb727151aa34036f9d696687df06e6fa48550bd91d6ad3484bab47da8ea3b154363c48e66980 WHIRLPOOL 872363a61cc84ee9b677fee699982564cc5f2bf11c5e94d6aa1a66b0d3148a50460d65845e80b28afd1bf9460c44d55adcc3a4619a42770590440337b63d4c20
+DIST hy-0.13.0.tar.gz 383197 SHA256 c776ce4ff7ad3f38b00391ac2c172e60443ef8fa36879593a5df912ae60d283a SHA512 a1138c73584f5dc839d8085aaef24da6450789a0d466cea61ecb3740f865ee2aadc52dde3e5c76d945f16fb88c5fdfa4fd9bbcf35cdcd3fc2337fd1f13548b54 WHIRLPOOL 3640a48a49f47c85a814421cb904f3b1c6622eac38cbe06eb5c53e501bff3445588e43524190795f287fe1ee508ca31fa6021965c18e2c915c7cf1b1ff680a1c
+EBUILD hy-0.10.0.ebuild 807 SHA256 b5544aa3845dcb0d6693da1bbc3ac394eeeb3d265dd0b2611b1f8eec19c46274 SHA512 19341e28a59212b19ac3713773b2f0111b85302b581a0068dbcc433500935f9d8f7289011e4e03211c8fd7ca047aff210236b01be3877f0a4a9c08143b48bc9f WHIRLPOOL d546fb51d5eb7692c1d1a32ace8c2255ef6c9a44b924e5f7911ebbd606c10d18294059f96236a7cfd81fb6bc5163b281e499badae256ff8dd55cf4a93d6250f5
+EBUILD hy-0.10.1.ebuild 817 SHA256 4eecbe843afa8b0aa341034fe7a12f34ea89c5ea3b6c0bc38623f061a07e69ea SHA512 673d7dea190c41d50c68e396da6c9c336e5c879c1271aeeac195d9ca5f99d61b04f2fd0c57097283727f2b9318d08f859774de273916249feb89bdd1511f69a3 WHIRLPOOL 0cddd2a36dad93322e95b81f2323a96e6bf840989d8d8b600a579df3c19ff299b2539de704fb3622412101e3f260ccd73e4905f44f8b72ddce9f166cc551a653
+EBUILD hy-0.11.1.ebuild 1074 SHA256 0ece38615c5c5cce59c8a3895cf4d813ef4a559a4bd7e78126f9403c6032bee0 SHA512 31ef5c2a2a4b95b2ffa8d42a89ee3cc43bf460bdef00e3d33d264bff824fb04579764363a2b549f27792f556dcfdcbbebb0b261b6d3d08a533ac121bb6995aaf WHIRLPOOL c2731254b48045f5508c3527a47ee2eb9f1b6549bf0b9178297958961630646d2e87f796505615a70fffa91eb71d9f16cf2aa0059a96cb14c6bedbcc675c5903
+EBUILD hy-0.12.0.ebuild 1074 SHA256 f4a059631ac0fd7272276f7ecc64d765b027076c7a4cc9d78348397f1f7bef8a SHA512 d949bb55f82f616ee272dbd82e03699c2b382916728b42b10c91a67aa986a0b116a3ec6b231d840271576c1a753d5e8235da377c9e5723db612255a98e90b832 WHIRLPOOL a7f465c6fe6f11f54a6c4c213175063f2560a4219a8f1451c8b2d448f0162edc9a32ae4a03d549bae9fa80a67f75eec0f39c0401f68af341abb0e16a526b04a4
+EBUILD hy-0.12.1.ebuild 1080 SHA256 b63463531a9bcb7392039838c32b69503999f34e12a7dccaee9a3e1828c3959e SHA512 241fae912c048907fccf4a9321a082df4f2c379ecddb64f7747862cefea9a2ca6f65175d585e9720630877c8399583d2f2c42ca44a87ae1bcf5152a81ef28df1 WHIRLPOOL 66d224b646426b394875236099d768fca933f4ec209d2d9b91905b5bb5134c103839be6ca6e620d357f13b62217fa8f689142f77d614eca5d7d69de8557a8882
+EBUILD hy-0.13.0.ebuild 1036 SHA256 b5a7f009647f7a6fabb25f89321891831ded50b7cad33c42a959ecd9ee9f0d8d SHA512 9c2605a00ec3ccbdcb6d5a5fde924f9a72b386d126469e38434c2eaccc9791b48a19cb92c2e84b32eadf6d99225d59aacbdc8c809643120fac61fbd85b89a35c WHIRLPOOL 5783128f54ed829ff3658a5fad91a20f35fd96e7da5c891c3c114bce41e7226abcb172810cdf0287c105ee3cad49505137609cea5fae7eb71fe716d81872520e
+MISC ChangeLog 3049 SHA256 5f69c9686d486b968272c7a0275c71458fdb113edf4af51ace9405b46ecbda3a SHA512 bc2ecef7cad281f631b6fae0557b6cb6d1853103303a49dd6747643116890551daf59b07a8854cb5290c6044201941a14623cd1965febc64cff71c6cb8cfac4c WHIRLPOOL f477e4e2b7935e69ea1dee4173212440ad9e85bd8c51898a68d44d26c84afb3faae5fe977dacaa3dda8b01fa8edd5d493345cf8156955b33eb630979940e5471
+MISC ChangeLog-2015 1146 SHA256 414490382243819d76b26b0612a70319aa43c72781d3a6d87313aa2e3eaa9494 SHA512 0a372f8fc2f4a279694582d52f35c1e397842a6b4572727153ab1c3277a80dc3163cde3b5686426e7323b5c66b89529c44a9466bdfc0eb6168c84f6eb719b712 WHIRLPOOL 1a1358b4f843b00eea7f21370e602b73a8379e66b0d963e0dcd1638d5d4bad6bed7a74057d2998a8fc60a3ca7d03d08ebb9de0b4f392633fb1fc3400cc32bd82
+MISC metadata.xml 331 SHA256 af50e24fd0d072e301597fcba46fcfed0e18ea460f55c2a254edb52068972e6c SHA512 97afa7992933d5088e939afd4005e188fd2979ccf7fc21561561b14e1eecfee61e867288c21b4a396fc5ca4926fd3d62c9d8c5be217b9392a5208371fa3aa719 WHIRLPOOL b9fb49fb1adbb50d15a0181c2dff57a0b80eee8cc063467082c8d120a2ad63d5ac5cbcbf9d017c7957b560b0d026361cc4cd6dcf9260873ebc28313dffa657a1
diff --git a/dev-lang/hy/hy-0.10.0.ebuild b/dev-lang/hy/hy-0.10.0.ebuild
new file mode 100644
index 000000000000..e3622a1fec2c
--- /dev/null
+++ b/dev-lang/hy/hy-0.10.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+RESTRICT="test" # needs some pointy sticks. Seriously.
+PYTHON_COMPAT=(python2_7)
+
+inherit distutils-r1
+DESCRIPTION="A LISP dialect running in python"
+HOMEPAGE="http://hylang.org/"
+SRC_URI="https://github.com/hylang/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="dev-python/flake8[${PYTHON_USEDEP}]
+ >=dev-python/rply-0.7.0[${PYTHON_USEDEP}]
+ dev-python/astor[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ test? ( dev-python/tox[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/coverage[${PYTHON_USEDEP}]
+ )"
+
+python_test() {
+ nosetests || die "Tests failed under ${EPYTHON}"
+}
diff --git a/dev-lang/hy/hy-0.10.1.ebuild b/dev-lang/hy/hy-0.10.1.ebuild
new file mode 100644
index 000000000000..8db7f55d0185
--- /dev/null
+++ b/dev-lang/hy/hy-0.10.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+RESTRICT="test" # needs some pointy sticks. Seriously.
+PYTHON_COMPAT=(python2_7 python3_4)
+
+inherit distutils-r1
+DESCRIPTION="A LISP dialect running in python"
+HOMEPAGE="http://hylang.org/"
+SRC_URI="https://github.com/hylang/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="dev-python/flake8[${PYTHON_USEDEP}]
+ >=dev-python/rply-0.7.0[${PYTHON_USEDEP}]
+ dev-python/astor[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ test? ( dev-python/tox[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/coverage[${PYTHON_USEDEP}]
+ )"
+
+python_test() {
+ nosetests || die "Tests failed under ${EPYTHON}"
+}
diff --git a/dev-lang/hy/hy-0.11.1.ebuild b/dev-lang/hy/hy-0.11.1.ebuild
new file mode 100644
index 000000000000..409b60389bf9
--- /dev/null
+++ b/dev-lang/hy/hy-0.11.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+RESTRICT="test" # needs some pointy sticks. Seriously.
+PYTHON_COMPAT=(python{2_7,3_4,3_5})
+
+inherit distutils-r1 eutils
+DESCRIPTION="A LISP dialect running in python"
+HOMEPAGE="http://hylang.org/"
+SRC_URI="https://github.com/hylang/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="test doc examples"
+
+RDEPEND="dev-python/flake8[${PYTHON_USEDEP}]
+ >=dev-python/rply-0.7.0[${PYTHON_USEDEP}]
+ >=dev-python/astor-0.5[${PYTHON_USEDEP}]
+ dev-python/clint[${PYTHON_USEDEP}]
+ "
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/tox[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/coverage[${PYTHON_USEDEP}]
+ )"
+src_prepare() {
+ use examples && EXAMPLES=( eg/. )
+ use doc && HTML_DOCS=( docs/_build/html/. )
+}
+
+python_compile_all() {
+ use doc && emake docs
+}
+
+python_test() {
+ nosetests || die "Tests failed under ${EPYTHON}"
+}
diff --git a/dev-lang/hy/hy-0.12.0.ebuild b/dev-lang/hy/hy-0.12.0.ebuild
new file mode 100644
index 000000000000..bc27ab71eb3c
--- /dev/null
+++ b/dev-lang/hy/hy-0.12.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+RESTRICT="test" # needs some pointy sticks. Seriously.
+PYTHON_COMPAT=(python{2_7,3_4,3_5})
+
+inherit distutils-r1 eutils
+DESCRIPTION="A LISP dialect running in python"
+HOMEPAGE="http://hylang.org/"
+SRC_URI="https://github.com/hylang/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="test doc examples"
+
+RDEPEND="dev-python/flake8[${PYTHON_USEDEP}]
+ >=dev-python/rply-0.7.0[${PYTHON_USEDEP}]
+ >=dev-python/astor-0.5[${PYTHON_USEDEP}]
+ dev-python/clint[${PYTHON_USEDEP}]
+ "
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/tox[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/coverage[${PYTHON_USEDEP}]
+ )"
+src_prepare() {
+ use examples && EXAMPLES=( eg/. )
+ use doc && HTML_DOCS=( docs/_build/html/. )
+}
+
+python_compile_all() {
+ use doc && emake docs
+}
+
+python_test() {
+ nosetests || die "Tests failed under ${EPYTHON}"
+}
diff --git a/dev-lang/hy/hy-0.12.1.ebuild b/dev-lang/hy/hy-0.12.1.ebuild
new file mode 100644
index 000000000000..63fcce06bf62
--- /dev/null
+++ b/dev-lang/hy/hy-0.12.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+RESTRICT="test" # needs some pointy sticks. Seriously.
+PYTHON_COMPAT=(python{2_7,3_4,3_5})
+
+inherit distutils-r1 eutils
+DESCRIPTION="A LISP dialect running in python"
+HOMEPAGE="http://hylang.org/"
+SRC_URI="https://github.com/hylang/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="test doc examples"
+
+RDEPEND="dev-python/flake8[${PYTHON_USEDEP}]
+ >=dev-python/rply-0.7.0[${PYTHON_USEDEP}]
+ >=dev-python/astor-0.5[${PYTHON_USEDEP}]
+ >=dev-python/clint-0.4[${PYTHON_USEDEP}]
+ "
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/tox[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/coverage[${PYTHON_USEDEP}]
+ )"
+src_prepare() {
+ use examples && EXAMPLES=( eg/. )
+ use doc && HTML_DOCS=( docs/_build/html/. )
+}
+
+python_compile_all() {
+ use doc && emake docs
+}
+
+python_test() {
+ nosetests || die "Tests failed under ${EPYTHON}"
+}
diff --git a/dev-lang/hy/hy-0.13.0.ebuild b/dev-lang/hy/hy-0.13.0.ebuild
new file mode 100644
index 000000000000..f42227b60a04
--- /dev/null
+++ b/dev-lang/hy/hy-0.13.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+RESTRICT="test" # needs some pointy sticks. Seriously.
+PYTHON_COMPAT=(python{2_7,3_4,3_5})
+
+inherit distutils-r1 eutils
+DESCRIPTION="A LISP dialect running in python"
+HOMEPAGE="http://hylang.org/"
+SRC_URI="https://github.com/hylang/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="MIT"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE="test doc"
+
+RDEPEND="dev-python/flake8[${PYTHON_USEDEP}]
+ >=dev-python/rply-0.7.0[${PYTHON_USEDEP}]
+ >=dev-python/astor-0.5[${PYTHON_USEDEP}]
+ >=dev-python/clint-0.4[${PYTHON_USEDEP}]
+ "
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/tox[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/coverage[${PYTHON_USEDEP}]
+ )"
+src_prepare() {
+ use doc && HTML_DOCS=( docs/_build/html/. )
+}
+
+python_compile_all() {
+ use doc && emake docs
+}
+
+python_test() {
+ nosetests || die "Tests failed under ${EPYTHON}"
+}
diff --git a/dev-lang/hy/metadata.xml b/dev-lang/hy/metadata.xml
new file mode 100644
index 000000000000..c3656b2c2e2a
--- /dev/null
+++ b/dev-lang/hy/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">hylang/hy</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/icc/Manifest b/dev-lang/icc/Manifest
new file mode 100644
index 000000000000..4eeffe809d23
--- /dev/null
+++ b/dev-lang/icc/Manifest
@@ -0,0 +1,11 @@
+DIST parallel_studio_xe_2013_sp1_update3.tgz 3448198789 SHA256 cd332d1ab5241f7609ca6fefa905b50ec8d706e93870860af1ee9e9e5fd6cc1c SHA512 6308a812c3eb2bd4549b756aa16fdeeb9337131e56bd203876a6763298c776858629a6d17148cdd5275f6781471e826a00a0181b72abcdd7d991196eb4798025 WHIRLPOOL 5407f994b0b26323a4e6540e3eafedf05f4dd900af8ebf778911bf156656057ac0bc394f0a3791b8f4e9aedac681827c5432ddd070692e0fbedbd2f152eda04b
+DIST parallel_studio_xe_2013_update4.tgz 2184817121 SHA256 55d549fc34f7a9eb96951c7be3216b68f9f960edfdc0997cf8dcffe5c78d66c8 SHA512 84ea227fdca2c427996b0c4d17a0bad6c289a6fbfc267c19f54ebee875e11e6e8d14bb3103599e3b89331c34a153b0a63a5ca8c12f4619420f78f8c4b0c2da96 WHIRLPOOL 6bedfdbcad7f0d7ad4681d51ad865db247d5f264f5fa33e7136fc64c5e83eee30bb2611f39bd7f31b790432e314a7dbea755297ae3fd2b90ccecb7beffb20d79
+DIST parallel_studio_xe_2013_update4_ia32.tgz 1220177902 SHA256 5bd75b2747f4b787b8128a83914b060d156ecdc41236f4100363b7ab4f9f6859 SHA512 968db307e08cd31450200abd41ade1f2b2855f4b5cb19911d03c1cd357cab11cbba814db354452496fcf66fc3fad1423b24f428bd4db07402f12bd63e4d34247 WHIRLPOOL f2b03ebb78960718a15fc69be814eeb7996fdd7575720f4b09cb915086cc757fea188ef5ceb7e37ed00c995e11ae544d8bd55aba8ab2d12530e26b3d23362f3e
+DIST parallel_studio_xe_2013_update4_intel64.tgz 1520767493 SHA256 31383f357b9b7d9c76e727e63427387d9ee42358f5b5df75a0d8766cd318a11d SHA512 497ad8f3473e1d11cdd31dff340a8e6ec1f012e731def084b2072146b5d11db906f85ace53b2223c3fbef949222f73f36783fd697eb7809464f4403c0ac8744a WHIRLPOOL d08447f27aee0f088797968d541fe98e3813a1daf5b87024d37493663238594c3e4e75a8d9636a4059191782f5eae9065d45b7ad2c27e1f73fc74eb110ad399f
+DIST parallel_studio_xe_2015_update6.tgz 4190044333 SHA256 e604ed2bb45d227b151dd2898f3edd93526d58d1db1cb9d6b6f614907864f392 SHA512 a9896289db8e820f02c330702ff1e954af11af5f9bbc0e5623a001b3a8c33a2bcb8660ac8b0e569994a3682bfd263bf119dbe6a43fb343139adbeaaaa13f8a81 WHIRLPOOL 997c96d0d9d6c603f8659a5ece91aa55b9a7bf5b428065ac55a0fa3d5577dab7fcc61157a983eb355832dc7c201fde4e5fcc9ff7bcb4d8b656847c2c1092b1dd
+EBUILD icc-13.1.5.192.ebuild 756 SHA256 84018073e813235cd79d925a4abc0531fc36a39c6513b34048978d82b0540684 SHA512 a1b04c5ddc373a2442437b17e12a54ba3d10a34848b69c09d9279f746753f0df14cf9fac8fc57e530f9ca0fd9ef1b7cda127805ad5ccc0d4e37c243581f8ebeb WHIRLPOOL 9f85ea5d095a6f765d043486c09ec5939b2de25e64883e7be47b20046d7afd13eba43f5778ec1858f65c1819619bb961349bda071a5308a9f404ff1337bf71e6
+EBUILD icc-14.0.3.174.ebuild 784 SHA256 c781d9a40dfaeb748c8b3ddb6cc86b5cb0b72ff7979845ccddebb5c38a17fcf6 SHA512 4a96d89f531cd125fd1232ed2d3d48420a68a16667f12b4fcd3f5c11984b5714016355be524689bedd04ea07df005a6f00487e0b1b63a50739be304d247b4171 WHIRLPOOL dcba792bbbd198431ed69686edcdd5eaea97f7b260eb23eabf06c776a0fb26f4594d9f7724dd0ad267cbfef888cd3cbb2923be82b8e75fcaa0d4a9f7448aa4c1
+EBUILD icc-15.0.6.233.ebuild 798 SHA256 92672df3857d2b5c8ac869cf3401e58f9922631987795604b87ba2e407ce35dc SHA512 725df4774fe74f7439194c62a90175495b746e53f381da89318d039a29c120b6e5a2da8d86f695940ed7dabdb060d8969666feba0972a3ade8b879092f59d9b3 WHIRLPOOL 6b842d2d32ff6f4fec82cc71fec56c44cbae680ad0358bddb863b9da2ba60104a2e563fa4ba9b5950c4ab70a175ef884893ff31a010f6b37140eb05115e41eae
+MISC ChangeLog 4077 SHA256 081435883f46f0cd418d7aab4eb51f890fcef0ad2beaa97b2e8ae88a77ad7f9b SHA512 ef8ba143957a7841eba399f4802cc37cd486e50e79bb423f7b5bf97bebb928dad6b1fb5e6e87fa7fd44dba4ac9f2a63210e1031147e89cc8ad814a5c800e5b0b WHIRLPOOL a6c838c52f8adb4a262cd45bd3c6be43cc4c5f68ae8d3429b7c4c6e1de62fd716aaa30cb9b993af7ff6e7601a6a90d96d6a10e8ffceebcd0884edf9780e7217b
+MISC ChangeLog-2015 19794 SHA256 6a6dc16b178a596ee341e13c565e0e19b009ae32720b9db780ba63537993ccb1 SHA512 eb34c2d5e5a8323bbbad6a2033cf0e79670e6f31191e7e20223f584a563bf8039ad9baac374b34a7d27437eb85871508ab7be965c68e17f3e18b454061fc3968 WHIRLPOOL acfba600337338f3527e0e813f649fc9deb6e631e60803f6dcc23844851171d735bbfe0143faa344a45937232de773666f8d0930a8dd41c3c326d1bb60e634aa
+MISC metadata.xml 727 SHA256 33eceda189e711c559c875243691668936f5bd3948f9de455b011ad23499575b SHA512 0c10f059eb58b9042a4e9d4d5d4c4ff92289cadb41cac59aef21d369cbfef9bc872a74a73f089b10417c9a59aac2d2fd9e8bc8f83e70a8d7168db55b1b085b33 WHIRLPOOL 8b3035c827cba402f7cf0805ae25a22ed33aca4645ce3e156521cc129f6a927853e2d08f39c0aa13dca85100e97e8693974c220cda58fbdfd18fdb700ee99917
diff --git a/dev-lang/icc/icc-13.1.5.192.ebuild b/dev-lang/icc/icc-13.1.5.192.ebuild
new file mode 100644
index 000000000000..5abb6c4a24fe
--- /dev/null
+++ b/dev-lang/icc/icc-13.1.5.192.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3266
+INTEL_DPV=2013_update4
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_ja]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/icc/icc-14.0.3.174.ebuild b/dev-lang/icc/icc-14.0.3.174.ebuild
new file mode 100644
index 000000000000..caffde47dfeb
--- /dev/null
+++ b/dev-lang/icc/icc-14.0.3.174.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=4220
+INTEL_DPV=2013_sp1_update3
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_ja]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/icc/icc-15.0.6.233.ebuild b/dev-lang/icc/icc-15.0.6.233.ebuild
new file mode 100644
index 000000000000..334b4b692b04
--- /dev/null
+++ b/dev-lang/icc/icc-15.0.6.233.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=8470
+INTEL_DPV=2015_update6
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++ Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_ja]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerproc compilerproc-devel"
+INTEL_DAT_RPMS="compilerproc-common compilerproc-vars"
+
+CHECKREQS_DISK_BUILD=325M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/icc/metadata.xml b/dev-lang/icc/metadata.xml
new file mode 100644
index 000000000000..4a2545b283af
--- /dev/null
+++ b/dev-lang/icc/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@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The Intel® C++ Compiler is a full featured C/C++ compiler for Intel
+ based architectures. The compiler supports multi-threading, automatic
+ processor dispatch, vectorization, auto-parallelization, OpenMP, data
+ prefetching, loop unrolling. The package comes with extensive
+ documentation. The product can be installed as a non-commercial as
+ well. License, terms of qualifications can be found on the web site.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/icon/Manifest b/dev-lang/icon/Manifest
new file mode 100644
index 000000000000..6a6598dc32db
--- /dev/null
+++ b/dev-lang/icon/Manifest
@@ -0,0 +1,14 @@
+AUX icon-9.4.3-flags.patch 1783 SHA256 d70b68b5e213fa997af00ad020d4f207f8ecc625afb7d3c1508161d2dedc4848 SHA512 9e10b192380db2e5f4c0334e8e2f5eb5fc570f577ced720c4f7208239fbd942e287bd78ceb0e6deeb6a90072d6674e81f2f675946267235b126042c6cf572c6d WHIRLPOOL 8cc9ab4828279cd0f534d8101eed24c7e9afe94b734fcf1c20ebe0af1848942ce84b3621c8149b6a56dbe9124463aa660c0eade9a255860cc652a2f2f988ae8c
+AUX icon-9.5.0-flags.patch 2148 SHA256 f88abdd831b2fb23a5624396c9378df3816402567209d7073d588313084d6102 SHA512 7e34497ec1784f9e380884ada65f11eaed8e97e230d43474766f6097d82d964e85c3065ab75a9b15053431827cdc87f7ab37f5db9d2ac342d4ff537239506266 WHIRLPOOL a231946dbc3a4ba7ed19cd919468b6412981b45d519ea77ff6aa5e5cf0efdce208c3c08ca3636d0a168f13819f90d4d395ebf17b50f598b5e8cf6488c64165f8
+AUX icon-9.5.1-flags.patch 2148 SHA256 366db67c0af19778745d27b459f81636bb53166855236533b7fb20f4d0f6aa36 SHA512 28b201a1347167b028187d6d35cb50450cf6a13b48fbf65a616683fb6c5d3373d9ba9e64c3d6fe397e858388c88a52ab330a00dc5e4ca087567089e8cdd3c897 WHIRLPOOL 0b9213a6b7a4b86ff0c5c3ab9ab9d5abf4c6b0a0acb2066c174f5f9fcf6d40634ec5d03ab00c065c1bb0af5906a906a9faa4867017f4ef017d3ba6e8e64f0cdb
+AUX tests-943.patch 3643 SHA256 78222584fab1d1906baceca5cc950deb3458493cdc553f7f00def395af174900 SHA512 449042b9cbcff8cdc64f85131062d29fe3a6397fb0bed5dcaee57cb967d4d09a57fdd01b33b3a2a4c2ff5e7dbb69d3dd9d7d0b3efc90f160ddb761834fb7968b WHIRLPOOL 6b12578a6d1da517892a0f33d03f3fc1f4a21bcdcbd143d8a790a9caca9b6cc943c934f3a92beee0209d70c9e3387a11bd62ce76054fc2e567e008dafeaafe11
+DIST icon-v950src.tgz 3115766 SHA256 ceb558bcf5b2edc3252b2d1d4ed640d2a218196f73d299b052f1e0c50e9b1557 SHA512 32f01ca65863525d92846b505ea61f6fbad5a11991d0476c5e79647459dee12746b4448f8d32f2766c198b6713587e48eb0f7f2a942ce42a929f080a85039fa3 WHIRLPOOL 641db3d8d6cc384772649cd0a80884ea9bbb7027df772b19ea6216f164bc589ffc1331cc80447483455e05f54405ed18af0ce69d9d48d4ea7d42ff1b341811c0
+DIST icon-v951src.tgz 3133040 SHA256 062a680862b1c10c21789c0c7c7687c970a720186918d5ed1f7aad9fdc6fa9b9 SHA512 032dc9cfa57af5af2eb84b2116d0537124b5efb87b7cf744ecace2ccf49e461d5be5f91df99d85e8a988520d144fe4ecf06a6e78f7fff997b78afa95355449ad WHIRLPOOL b79ba827a94b71982ad6df4eb1d3218fc4b44bd7331e611616da3544202ed1bd5ea607a6934496b3267b24bf9096cacbf303f4ab949a06e44a43dd8c81e55704
+DIST icon.v943src.tgz 3218627 SHA256 d6b6dc508922251748c4ceefbc3a96b54a9f488e260f9f517b5e08dc21615bff SHA512 9f89c7f1aaea1caea586aeb1ef74346a0f258c26ae74581a9ce7b59c2b590eb79316bdb9530b70d9af59ad06e6c444eec92016d0e5b015f4d467bde0baac2695 WHIRLPOOL e776f088ed6a4db10f9defc11a71187cdef4c6ca50b89f80c035b2981c650999cc27bebeab57b99b495653d42af2e34ea5827d6744d4b8f265c7d1883e864437
+EBUILD icon-9.4.3-r5.ebuild 2782 SHA256 53172ad7a72f6ba9bb861d72020692cbbe05263f72ea448d2bf73bb0e66d6484 SHA512 f88697cdf5848121514f9646356ecc045ad8b111676997592488b6396c0c0cc433509b5177584fa275b8a33a3a0e5cbe553cdf0b6ab7d9965cdeb210b93e65d0 WHIRLPOOL 971bfa277978e537fab91baef303db9d3c6a582bce87ae1bbcee0b28379779f478f2e73cce2b5c3f872eacab941faf644c2d667e1e4200d9c04bff511b879c08
+EBUILD icon-9.5.0-r1.ebuild 2641 SHA256 b51a573ab2576705f95a40fcf850dacab27066110d4afd4398b851f3795feeb8 SHA512 2b3033947d33ebb2af7e2f946d5e40906513584fddd1f1a60f821513cd16b588bcb40e5cc06f52707428601c80be5276c58a99d7c5f481231790c0a3a73ee1fd WHIRLPOOL 2ac1e91e73373112f35351bb51bb2ce445715ca07118dbe711c2f5f4f1843788959fa5e716460ff3761969f35b48020390dc2c9aedc1c81916c0b8f8e268a84b
+EBUILD icon-9.5.0.ebuild 2568 SHA256 b048f6bab80dc97ca30cc72c4bf47aced94128137e1fa043c4e9dca62244c580 SHA512 cbc24b452baf9266886d6697b46c2243f9b40114fc45251e4841ec69e754c90d6b2b6b8e8e7f8e1479b3f95aaf9847b8ce86840cb9075591aa75355d2c34df6a WHIRLPOOL fa29a0c3ad084b663c97f560c28fe3aedfaffd5570d9cb148c16c78ce53ca2f58a9ff80f3a4b85f85afeb448ef581fd8808c813766144f96d5a6d90e96fd225f
+EBUILD icon-9.5.1.ebuild 2636 SHA256 b28cdabb1a5bebc632dc767e76c84001098aae2f1f0891fce411594d8965f310 SHA512 7bf879a32fa6c163ba4b554b54afc7c4b33374ca7e1686b07f3d13460cb1af00e3d2064acd14b14e746b95d0eaa5cb5520509d4053bfe1a139ba99f89002101d WHIRLPOOL 871274855080d54bb545ada123ad5d409d2fe04b02de0d6d9acf01bd82e0037dbb81f0952b77bfb49be3f056c763ed5882b1b8528015df70b007dc16a8e99326
+MISC ChangeLog 3652 SHA256 5e5eb54fd8da7cfe4a6c608a1be22ae03d13a9c1aad388e5be8f851a8278ab6b SHA512 167b45a2527188995bf14db9dee342d5fc4cf5618270a1677be1e5fdeb7c753c56979628a77271763d6322554bbd9161c086643c6889bcf1c29e6b97504f0ea8 WHIRLPOOL ef7a46aeca19cfafae8521d60cf32d1697ba31ae10a713a201ae82bbe258b36f9f5b0b922b7ebfe064ece5176accee03590b7ca1d92650f2c7c3039ff8d74d23
+MISC ChangeLog-2015 8054 SHA256 1432468cd2d9600358649115c7e9bad70859b60415a336d206da16819baf7c56 SHA512 9b348c2a31debceaaa81a4bcae2598c5838796c5ccdd9961ec18818b14a48c636f276a116d5b8a6262533964fb1c211c7711959b8afe09ffae6fa431df1d0fd6 WHIRLPOOL e2c80121357dd3ad1e2a6e708e6629bf98b2b0dfc0e06ee5aede7e82287391fb11307288e8bace7117f680318d89f746363f8ce4bd2be7dd68c7030f1bc62795
+MISC metadata.xml 544 SHA256 cf3f55ae529cc16c077fc6d056e7d3da7ffb18bfcc667ee2415692c9c6e8e84b SHA512 dd6f662282058a7ac56054371222f02a448d331a06c4ae583c6b43668b99a4d5280ab270e59c14f04978459af171152ba9806d96304e25a3ea5e2016d9acae15 WHIRLPOOL cee4596ffb78161262b5521144b80d87948189ea4a2f87d45cc3b93d35a94822ea0a30c11fdd841941eb1bc18e51b07f1a5534abdc32fe127f97fbef0a6a1d6e
diff --git a/dev-lang/icon/files/icon-9.4.3-flags.patch b/dev-lang/icon/files/icon-9.4.3-flags.patch
new file mode 100644
index 000000000000..cdb5adcd1b4e
--- /dev/null
+++ b/dev-lang/icon/files/icon-9.4.3-flags.patch
@@ -0,0 +1,62 @@
+--- icon.v943src/ipl/cfuncs/Makefile
++++ icon.v943src/ipl/cfuncs/Makefile
+@@ -25,7 +25,7 @@
+ # library
+
+ $(FUNCLIB): $(FUNCS) mklib.sh
+- CC="$(CC)" CFLAGS="$(CFLAGS)" sh mklib.sh $(FUNCLIB) $(FUNCS)
++ CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" sh mklib.sh $(FUNCLIB) $(FUNCS)
+ $(FUNCS): icall.h
+
+
+--- icon.v943src/ipl/cfuncs/mklib.sh
++++ icon.v943src/ipl/cfuncs/mklib.sh
+@@ -11,7 +11,7 @@
+ set -x
+ case "$SYS" in
+ Linux*|*BSD*|GNU*)
+- gcc -shared -o $LIBNAME -fPIC "$@";;
++ $CC -shared -o $LIBNAME $CFLAGS $LDFLAGS -fPIC "$@";;
+ Darwin*)
+ cc -bundle -undefined suppress -flat_namespace -o $LIBNAME "$@";;
+ SunOS*)
+--- icon.v943src/src/common/Makefile
++++ icon.v943src/src/common/Makefile
+@@ -8,7 +8,7 @@
+ common: doincl $(OBJS) gpxmaybe
+
+ doincl: doincl.c ../h/arch.h
+- $(CC) $(CFLAGS) -o doincl doincl.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o doincl doincl.c
+ -./doincl -o ../../bin/rt.h ../h/rt.h
+
+ patchstr: patchstr.c
+@@ -29,7 +29,7 @@
+ ../h/typedefs.h ../h/mproto.h ../h/cpuconf.h
+
+ ../h/arch.h: infer.c
+- $(CC) $(CFLAGS) -o infer infer.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o infer infer.c
+ ./infer >../h/arch.h
+
+ identify.o: ../h/version.h
+@@ -46,7 +46,7 @@
+
+ # for rswitch, $(CFLAGS) is deliberately omitted (-O may cause problems)
+ rswitch.o: ../h/define.h ../h/arch.h $(RSW)
+- $(CC) -c $(RSW)
++ $(CC) $(CFLAGS) -O0 -c $(RSW)
+
+
+ # The following section is needed if changes are made to the Icon grammar,
+--- icon.v943src/src/runtime/Makefile
++++ icon.v943src/src/runtime/Makefile
+@@ -39,7 +39,7 @@
+
+ iconx: $(OBJS)
+ cd ../common; $(MAKE)
+- $(CC) $(RLINK) -o iconx $(OBJS) $(XL) $(RLIBS) $(TL)
++ $(CC) $(LDFLAGS) $(RLINK) -o iconx $(OBJS) $(XL) $(RLIBS) $(TL)
+ cp iconx ../../bin
+ strip $(SFLAGS) ../../bin/iconx$(EXE)
+
diff --git a/dev-lang/icon/files/icon-9.5.0-flags.patch b/dev-lang/icon/files/icon-9.5.0-flags.patch
new file mode 100644
index 000000000000..33fa9485c206
--- /dev/null
+++ b/dev-lang/icon/files/icon-9.5.0-flags.patch
@@ -0,0 +1,75 @@
+--- icon-v950src/ipl/cfuncs/Makefile
++++ icon-v950src/ipl/cfuncs/Makefile
+@@ -25,7 +25,7 @@
+ # library
+
+ $(FUNCLIB): $(FUNCS) mklib.sh
+- CC="$(CC)" CFLAGS="$(CFLAGS)" BIN="../../bin" \
++ CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" BIN="../../bin" \
+ sh mklib.sh $(FUNCLIB) $(FUNCS)
+ $(FUNCS): icall.h
+
+--- icon-v950src/ipl/cfuncs/mklib.sh
++++ icon-v950src/ipl/cfuncs/mklib.sh
+@@ -12,7 +12,7 @@
+ set -x
+ case "$SYS" in
+ Linux*|*BSD*|GNU*)
+- $CC -shared -o $LIBNAME -fPIC "$@";;
++ $CC -shared -o $LIBNAME $CFLAGS $LDFLAGS -fPIC "$@";;
+ CYGWIN*)
+ # move the win32 import library for iconx.exe callbacks
+ # created when iconx.exe was built
+--- icon-v950src/ipl/packs/loadfunc/Makefile
++++ icon-v950src/ipl/packs/loadfunc/Makefile
+@@ -28,7 +28,7 @@
+ echo '$$define FUNCLIB "./$(FUNCLIB)"' >libnames.icn
+
+ $(FUNCLIB): $(FUNCS)
+- CC="$(CC)" CFLAGS="$(CFLAGS)" BIN="../../../bin" \
++ CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" BIN="../../../bin" \
+ sh $(MKLIB) $(FUNCLIB) $(FUNCS)
+
+
+--- icon-v950src/src/common/Makefile
++++ icon-v950src/src/common/Makefile
+@@ -8,7 +8,7 @@
+ common: $(OBJS) gpxmaybe
+
+ patchstr: patchstr.c
+- $(CC) $(CFLAGS) -o patchstr patchstr.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o patchstr patchstr.c
+
+ gpxmaybe:
+ -if [ "x$(XL)" != "x" ]; then $(MAKE) $(GDIR); fi
+@@ -25,7 +25,7 @@
+ ../h/typedefs.h ../h/mproto.h ../h/cpuconf.h
+
+ ../h/arch.h: infer.c
+- $(CC) $(CFLAGS) -o infer infer.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o infer infer.c
+ ./infer >../h/arch.h
+
+ identify.o: ../h/version.h
+--- icon-v950src/src/rtt/Makefile
++++ icon-v950src/src/rtt/Makefile
+@@ -22,7 +22,7 @@
+
+
+ rtt: $(OBJ)
+- $(CC) $(LDFLAGS) -o rtt $(OBJ)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o rtt $(OBJ)
+
+ library: $(OBJ)
+ rm -rf rtt.a
+--- icon-v950src/src/runtime/Makefile
++++ icon-v950src/src/runtime/Makefile
+@@ -30,7 +30,7 @@
+
+ iconx: $(COBJS) $(XOBJS)
+ cd ../common; $(MAKE)
+- $(CC) $(RLINK) -o iconx $(XOBJS) $(COBJS) $(XL) $(RLIBS) $(TLIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(RLINK) -o iconx $(XOBJS) $(COBJS) $(XL) $(RLIBS) $(TLIBS)
+ cp iconx ../../bin
+ strip $(SFLAGS) ../../bin/iconx$(EXE)
+
diff --git a/dev-lang/icon/files/icon-9.5.1-flags.patch b/dev-lang/icon/files/icon-9.5.1-flags.patch
new file mode 100644
index 000000000000..ff659b28bbc2
--- /dev/null
+++ b/dev-lang/icon/files/icon-9.5.1-flags.patch
@@ -0,0 +1,75 @@
+--- icon-v951src/ipl/cfuncs/Makefile
++++ icon-v951src/ipl/cfuncs/Makefile
+@@ -25,7 +25,7 @@
+ # library
+
+ $(FUNCLIB): $(FUNCS) mklib.sh
+- CC="$(CC)" CFLAGS="$(CFLAGS)" BIN="../../bin" \
++ CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" BIN="../../bin" \
+ sh mklib.sh $(FUNCLIB) $(FUNCS)
+ $(FUNCS): icall.h
+
+--- icon-v951src/ipl/cfuncs/mklib.sh
++++ icon-v951src/ipl/cfuncs/mklib.sh
+@@ -12,7 +12,7 @@
+ set -x
+ case "$SYS" in
+ Linux*|*BSD*|GNU*)
+- $CC -shared -o $LIBNAME -fPIC "$@";;
++ $CC -shared -o $LIBNAME $CFLAGS $LDFLAGS -fPIC "$@";;
+ CYGWIN*)
+ # move the win32 import library for iconx.exe callbacks
+ # created when iconx.exe was built
+--- icon-v951src/ipl/packs/loadfunc/Makefile
++++ icon-v951src/ipl/packs/loadfunc/Makefile
+@@ -28,7 +28,7 @@
+ echo '$$define FUNCLIB "./$(FUNCLIB)"' >libnames.icn
+
+ $(FUNCLIB): $(FUNCS)
+- CC="$(CC)" CFLAGS="$(CFLAGS)" BIN="../../../bin" \
++ CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" BIN="../../../bin" \
+ sh $(MKLIB) $(FUNCLIB) $(FUNCS)
+
+
+--- icon-v951src/src/common/Makefile
++++ icon-v951src/src/common/Makefile
+@@ -8,7 +8,7 @@
+ common: $(OBJS) gpxmaybe
+
+ patchstr: patchstr.c
+- $(CC) $(CFLAGS) -o patchstr patchstr.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o patchstr patchstr.c
+
+ gpxmaybe:
+ -if [ "x$(XL)" != "x" ]; then $(MAKE) $(GDIR); fi
+@@ -25,7 +25,7 @@
+ ../h/typedefs.h ../h/mproto.h ../h/cpuconf.h
+
+ ../h/arch.h: infer.c
+- $(CC) $(CFLAGS) -o infer infer.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o infer infer.c
+ ./infer >../h/arch.h
+
+ identify.o: ../h/version.h
+--- icon-v951src/src/rtt/Makefile
++++ icon-v951src/src/rtt/Makefile
+@@ -22,7 +22,7 @@
+
+
+ rtt: $(OBJ)
+- $(CC) $(LDFLAGS) -o rtt $(OBJ)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o rtt $(OBJ)
+
+ library: $(OBJ)
+ rm -rf rtt.a
+--- icon-v951src/src/runtime/Makefile
++++ icon-v951src/src/runtime/Makefile
+@@ -30,7 +30,7 @@
+
+ iconx: $(COBJS) $(XOBJS)
+ cd ../common; $(MAKE)
+- $(CC) $(RLINK) -o iconx $(XOBJS) $(COBJS) $(XL) $(RLIBS) $(TLIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(RLINK) -o iconx $(XOBJS) $(COBJS) $(XL) $(RLIBS) $(TLIBS)
+ cp iconx ../../bin
+ strip $(SFLAGS) ../../bin/iconx$(EXE)
+
diff --git a/dev-lang/icon/files/tests-943.patch b/dev-lang/icon/files/tests-943.patch
new file mode 100644
index 000000000000..75108cab1936
--- /dev/null
+++ b/dev-lang/icon/files/tests-943.patch
@@ -0,0 +1,113 @@
+diff -uprN icon.v943src_base/tests/general/io.icn icon.v943src/tests/general/io.icn
+--- icon.v943src_base/tests/general/io.icn 2002-03-11 14:21:18.000000000 -0700
++++ icon.v943src/tests/general/io.icn 2006-04-01 10:35:14.590948251 -0700
+@@ -6,7 +6,7 @@ procedure main()
+ local L, f, m, n, t1, t2
+
+ L := [&input, &output, &errout,
+- m := open("/etc/motd") | stop("no /etc/motd"),
++ m := open("/etc/gentoo-release") | stop("no /etc/gentoo-release"),
+ n := open("/dev/null", "w") | stop("no /dev/null")]
+ L := sort(L)
+ every f := !L do
+@@ -21,10 +21,10 @@ procedure main()
+ every write(!&input) \ 2
+
+ write()
+- write("flush /etc/motd: ", image(flush(m)) | "FAILED")
+- write("close /etc/motd: ", image(close(m)) | "FAILED")
+- write("close /etc/motd: ", image(close(m)) | "FAILED")
+- write("flush /etc/motd: ", image(flush(m)) | "FAILED")
++ write("flush /etc/gentoo-release: ", image(flush(m)) | "FAILED")
++ write("close /etc/gentoo-release: ", image(close(m)) | "FAILED")
++ write("close /etc/gentoo-release: ", image(close(m)) | "FAILED")
++ write("flush /etc/gentoo-release: ", image(flush(m)) | "FAILED")
+
+ write()
+ write("flush /dev/null: ", image(flush(n)) | "FAILED")
+diff -uprN icon.v943src_base/tests/general/io.std icon.v943src/tests/general/io.std
+--- icon.v943src_base/tests/general/io.std 2002-03-11 14:21:18.000000000 -0700
++++ icon.v943src/tests/general/io.std 2006-04-01 10:35:31.071362086 -0700
+@@ -2,7 +2,7 @@ file: &errout
+ file: &input
+ file: &output
+ file: file(/dev/null)
+-file: file(/etc/motd)
++file: file(/etc/gentoo-release)
+
+ aaa
+ bbbb
+@@ -13,10 +13,10 @@ ffffffff
+ ggggggggg
+ hhhhhhhhhh
+
+-flush /etc/motd: file(/etc/motd)
+-close /etc/motd: file(/etc/motd)
+-close /etc/motd: file(/etc/motd)
+-flush /etc/motd: file(/etc/motd)
++flush /etc/gentoo-release: file(/etc/gentoo-release)
++close /etc/gentoo-release: file(/etc/gentoo-release)
++close /etc/gentoo-release: file(/etc/gentoo-release)
++flush /etc/gentoo-release: file(/etc/gentoo-release)
+
+ flush /dev/null: file(/dev/null)
+ close /dev/null: file(/dev/null)
+@@ -109,7 +109,7 @@ file(sed 's/^/=()= /' io.icn)
+ > =()= local L, f, m, n, t1, t2
+ > =()=
+ > =()= L := [&input, &output, &errout,
+-> =()= m := open("/etc/motd") | stop("no /etc/motd"),
++> =()= m := open("/etc/gentoo-release") | stop("no /etc/gentoo-release"),
+ > =()= n := open("/dev/null", "w") | stop("no /dev/null")]
+
+ file(ls io.i?n io.d?t io.s?d)
+diff -uprN icon.v943src_base/tests/general/kwds.std icon.v943src/tests/general/kwds.std
+--- icon.v943src_base/tests/general/kwds.std 2002-07-10 18:29:28.000000000 -0600
++++ icon.v943src/tests/general/kwds.std 2006-04-01 10:35:37.103317654 -0700
+@@ -20,8 +20,10 @@
+ &features: ASCII
+ &features: co-expressions
+ &features: environment variables
++ &features: event monitoring
+ &features: keyboard functions
+ &features: large integers
++ &features: multiple programs
+ &features: pipes
+ &features: system function
+ &input: &input
+diff -uprN icon.v943src_base/tests/general/nargs.std icon.v943src/tests/general/nargs.std
+--- icon.v943src_base/tests/general/nargs.std 2001-12-06 15:54:01.000000000 -0700
++++ icon.v943src/tests/general/nargs.std 2006-04-01 10:35:43.282223496 -0700
+@@ -15,7 +15,7 @@
+ 1 delay
+ 2 delete
+ -2 detab
+- 2 display
++ 3 display
+ 1 dtor
+ -2 entab
+ 0 errorclear
+@@ -43,12 +43,12 @@
+ 4 match
+ 2 member
+ 1 move
+- 1 name
++ 2 name
+ 1 numeric
+ 1 ord
+ 1 pop
+ 1 pos
+- 2 proc
++ 3 proc
+ 1 pull
+ -2 push
+ -2 put
+@@ -79,7 +79,7 @@
+ 2 trim
+ 1 type
+ 4 upto
+- 1 variable
++ 3 variable
+ 1 where
+ -1 write
+ -1 writes
diff --git a/dev-lang/icon/icon-9.4.3-r5.ebuild b/dev-lang/icon/icon-9.4.3-r5.ebuild
new file mode 100644
index 000000000000..505439eaf287
--- /dev/null
+++ b/dev-lang/icon/icon-9.4.3-r5.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_PV=${PV//./}
+SRC_URI="http://www.cs.arizona.edu/icon/ftp/packages/unix/icon.v${MY_PV}src.tgz"
+HOMEPAGE="http://www.cs.arizona.edu/icon/"
+DESCRIPTION="very high level language"
+
+LICENSE="public-domain HPND"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
+IUSE="X iplsrc"
+
+S="${WORKDIR}/icon.v${MY_PV}src"
+
+DEPEND="X? ( x11-proto/xextproto
+ x11-proto/xproto
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-libs/libXt )
+ sys-devel/gcc"
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}"/${P}-flags.patch
+
+ # Patch the tests so that they do not fail
+ # The following files in tests/standard are patched..
+ # io.icn - change /etc/motd to /etc/gentoo-release
+ # io.std - change /etc/motd to /etc/gentoo-release
+ # kwds.std - add two lines for the two new added keywords
+ # nargs.std - a couple of functions picked up additional parameters
+ epatch "${FILESDIR}/tests-${MY_PV}.patch"
+
+ # do not prestrip files
+ find "${S}"/src -name 'Makefile' | xargs sed -i -e "/strip/d" || die
+}
+
+src_compile() {
+ # select the right compile target. Note there are many platforms
+ # available
+ local mytarget;
+ if [[ ${CHOST} == *-darwin* ]]; then
+ mytarget="macintosh"
+ else
+ mytarget="linux"
+ fi
+
+ if use X; then
+ emake X-Configure name=${mytarget} -j1 || die
+ else
+ emake Configure name=${mytarget} -j1 || die
+ fi
+
+ echo "#define MultiThread 1" >> src/h/define.h
+ echo "#define EventMon 1" >> src/h/define.h
+ echo "#define Eve 1" >> src/h/define.h
+
+ append-flags $(test-flags -fno-strict-aliasing -fwrapv)
+
+ emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "Make Failed"
+}
+
+src_test() {
+ make Samples || die "Samples failed"
+ make Test || die "Test failed"
+}
+
+src_install() {
+ dodir /usr
+ dodir /usr/bin
+ dodir /usr/$(get_libdir)
+
+ make Install dest="${D}/usr/$(get_libdir)/icon" || die "Make install failed"
+ dosym ../$(get_libdir)/icon/bin/icont /usr/bin/icont
+ dosym ../$(get_libdir)/icon/bin/iconx /usr/bin/iconx
+ dosym ../$(get_libdir)/icon/bin/icon /usr/bin/icon
+ dosym ../$(get_libdir)/icon/bin/vib /usr/bin/vib
+
+ cd "${S}/man/man1"
+ doman icont.1
+ doman icon.1
+ rm -rf "${D}"/usr/$(get_libdir)/icon/man
+
+ cd "${S}/doc"
+ dodoc *.txt *.sed ../README
+ # dohtml ignores all anything except .html files, no use here
+ mkdir -p "${D}"/usr/share/doc/${PF}/html
+ cp -dpR *.htm *.gif *.jpg *.css "${D}"/usr/share/doc/${PF}/html
+ rm -rf "${D}"/usr/$(get_libdir)/icon/{doc,README}
+
+ # optional Icon Programming Library
+ if use iplsrc; then
+ cd "${S}"
+ dodir /usr/$(get_libdir)/icon/ipl
+ rm ipl/BuildBin
+ rm ipl/BuildExe
+ rm ipl/CheckAll
+ rm ipl/Makefile
+ insinto /usr/$(get_libdir)/icon
+ doins -r ipl
+ fi
+}
diff --git a/dev-lang/icon/icon-9.5.0-r1.ebuild b/dev-lang/icon/icon-9.5.0-r1.ebuild
new file mode 100644
index 000000000000..efe230344715
--- /dev/null
+++ b/dev-lang/icon/icon-9.5.0-r1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_PV=${PV//./}
+SRC_URI="http://www.cs.arizona.edu/icon/ftp/packages/unix/icon-v${MY_PV}src.tgz"
+HOMEPAGE="http://www.cs.arizona.edu/icon/"
+DESCRIPTION="very high level language"
+
+LICENSE="public-domain HPND"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="X iplsrc"
+
+S="${WORKDIR}/icon-v${MY_PV}src"
+
+DEPEND="X? ( x11-proto/xextproto
+ x11-proto/xproto
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-libs/libXt )
+ || ( sys-devel/gcc sys-devel/gcc-apple )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-flags.patch
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ # do not prestrip files
+ find "${S}"/src -name 'Makefile' | xargs sed -i -e "/strip/d" || die
+}
+
+src_configure() {
+ # select the right compile target. Note there are many platforms
+ # available
+ local mytarget;
+ if [[ ${CHOST} == *-darwin* ]]; then
+ mytarget="macintosh"
+ else
+ mytarget="linux"
+ fi
+
+ if use X; then
+ emake X-Configure name=${mytarget} -j1 || die
+ else
+ emake Configure name=${mytarget} -j1 || die
+ fi
+
+ # sanitise the Makedefs file generated by Configure
+ sed -i \
+ -e 's:-L/usr/X11R6/lib64::g' \
+ -e 's:-L/usr/X11R6/lib::g' \
+ -e 's:-I/usr/X11R6/include::g' \
+ Makedefs || die "sed of Makedefs failed"
+
+ append-flags $(test-flags -fno-strict-aliasing -fwrapv)
+}
+
+src_compile() {
+ emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_test() {
+ make Samples || die "Samples failed"
+ make Test || die "Test failed"
+}
+
+src_install() {
+ dodir /usr
+ dodir /usr/bin
+ dodir /usr/$(get_libdir)
+
+ make Install dest="${ED}/usr/$(get_libdir)/icon" || die "Make install failed"
+ dosym ../$(get_libdir)/icon/bin/icont /usr/bin/icont
+ dosym ../$(get_libdir)/icon/bin/iconx /usr/bin/iconx
+ dosym ../$(get_libdir)/icon/bin/icon /usr/bin/icon
+ dosym ../$(get_libdir)/icon/bin/vib /usr/bin/vib
+
+ cd "${S}/man/man1" || die
+ doman "${PN}"t.1
+ doman "${PN}".1
+ rm -rf "${ED}"/usr/$(get_libdir)/${PN}/man || die
+
+ cd "${S}/doc" || die
+ dodoc *.txt *.sed ../README
+ # dohtml ignores all anything except .html files, no use here
+ mkdir -p "${ED}"/usr/share/doc/${PF}/html
+ cp -dpR *.htm *.gif *.jpg *.css "${ED}"/usr/share/doc/${PF}/html || die
+ rm -rf "${ED}"/usr/$(get_libdir)/icon/{doc,README} || die
+
+ # optional Icon Programming Library
+ if use iplsrc; then
+ cd "${S}" || die
+ dodir /usr/$(get_libdir)/icon/ipl
+ rm -fv ipl/{BuildBin,BuildExe,CheckAll,Makefile} || die
+ insinto /usr/$(get_libdir)/icon
+ doins -r ipl
+ fi
+}
diff --git a/dev-lang/icon/icon-9.5.0.ebuild b/dev-lang/icon/icon-9.5.0.ebuild
new file mode 100644
index 000000000000..9fdaf86bac87
--- /dev/null
+++ b/dev-lang/icon/icon-9.5.0.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_PV=${PV//./}
+SRC_URI="http://www.cs.arizona.edu/icon/ftp/packages/unix/icon-v${MY_PV}src.tgz"
+HOMEPAGE="http://www.cs.arizona.edu/icon/"
+DESCRIPTION="very high level language"
+
+LICENSE="public-domain HPND"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="X iplsrc"
+
+S="${WORKDIR}/icon-v${MY_PV}src"
+
+DEPEND="X? ( x11-proto/xextproto
+ x11-proto/xproto
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-libs/libXt )
+ || ( sys-devel/gcc sys-devel/gcc-apple )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-flags.patch
+
+ # do not prestrip files
+ find "${S}"/src -name 'Makefile' | xargs sed -i -e "/strip/d" || die
+}
+
+src_configure() {
+ # select the right compile target. Note there are many platforms
+ # available
+ local mytarget;
+ if [[ ${CHOST} == *-darwin* ]]; then
+ mytarget="macintosh"
+ else
+ mytarget="linux"
+ fi
+
+ if use X; then
+ emake X-Configure name=${mytarget} -j1 || die
+ else
+ emake Configure name=${mytarget} -j1 || die
+ fi
+
+ # sanitise the Makedefs file generated by Configure
+ sed -i \
+ -e 's:-L/usr/X11R6/lib64::g' \
+ -e 's:-L/usr/X11R6/lib::g' \
+ -e 's:-I/usr/X11R6/include::g' \
+ Makedefs || die "sed of Makedefs failed"
+
+ append-flags $(test-flags -fno-strict-aliasing -fwrapv)
+}
+
+src_compile() {
+ emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_test() {
+ make Samples || die "Samples failed"
+ make Test || die "Test failed"
+}
+
+src_install() {
+ dodir /usr
+ dodir /usr/bin
+ dodir /usr/$(get_libdir)
+
+ make Install dest="${ED}/usr/$(get_libdir)/icon" || die "Make install failed"
+ dosym ../$(get_libdir)/icon/bin/icont /usr/bin/icont
+ dosym ../$(get_libdir)/icon/bin/iconx /usr/bin/iconx
+ dosym ../$(get_libdir)/icon/bin/icon /usr/bin/icon
+ dosym ../$(get_libdir)/icon/bin/vib /usr/bin/vib
+
+ cd "${S}/man/man1"
+ doman icont.1
+ doman icon.1
+ rm -rf "${ED}"/usr/$(get_libdir)/icon/man
+
+ cd "${S}/doc"
+ dodoc *.txt *.sed ../README
+ # dohtml ignores all anything except .html files, no use here
+ mkdir -p "${ED}"/usr/share/doc/${PF}/html
+ cp -dpR *.htm *.gif *.jpg *.css "${ED}"/usr/share/doc/${PF}/html
+ rm -rf "${ED}"/usr/$(get_libdir)/icon/{doc,README}
+
+ # optional Icon Programming Library
+ if use iplsrc; then
+ cd "${S}"
+ dodir /usr/$(get_libdir)/icon/ipl
+ rm ipl/BuildBin
+ rm ipl/BuildExe
+ rm ipl/CheckAll
+ rm ipl/Makefile
+ insinto /usr/$(get_libdir)/icon
+ doins -r ipl
+ fi
+}
diff --git a/dev-lang/icon/icon-9.5.1.ebuild b/dev-lang/icon/icon-9.5.1.ebuild
new file mode 100644
index 000000000000..1f8a07a1b373
--- /dev/null
+++ b/dev-lang/icon/icon-9.5.1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+MY_PV=${PV//./}
+SRC_URI="http://www.cs.arizona.edu/icon/ftp/packages/unix/icon-v${MY_PV}src.tgz"
+HOMEPAGE="http://www.cs.arizona.edu/icon/"
+DESCRIPTION="very high level language"
+
+LICENSE="public-domain HPND"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="X iplsrc"
+
+S="${WORKDIR}/icon-v${MY_PV}src"
+
+DEPEND="X? ( x11-proto/xextproto
+ x11-proto/xproto
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-libs/libXt )
+ || ( sys-devel/gcc sys-devel/gcc-apple )"
+
+PATCHES=( "${FILESDIR}"/${P}-flags.patch )
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ # do not prestrip files
+ find "${S}"/src -name 'Makefile' | xargs sed -i -e "/strip/d" || die
+}
+
+src_configure() {
+ # select the right compile target. Note there are many platforms
+ # available
+ local mytarget;
+ if [[ ${CHOST} == *-darwin* ]]; then
+ mytarget="macintosh"
+ else
+ mytarget="linux"
+ fi
+
+ if use X; then
+ emake X-Configure name=${mytarget} -j1 || die
+ else
+ emake Configure name=${mytarget} -j1 || die
+ fi
+
+ # sanitise the Makedefs file generated by Configure
+ sed -i \
+ -e 's:-L/usr/X11R6/lib64::g' \
+ -e 's:-L/usr/X11R6/lib::g' \
+ -e 's:-I/usr/X11R6/include::g' \
+ Makedefs || die "sed of Makedefs failed"
+
+ append-flags $(test-flags -fno-strict-aliasing -fwrapv)
+}
+
+src_compile() {
+ emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_test() {
+ make Samples || die "Samples failed"
+ make Test || die "Test failed"
+}
+
+src_install() {
+ dodir /usr
+ dodir /usr/bin
+ dodir /usr/$(get_libdir)
+
+ make Install dest="${ED}/usr/$(get_libdir)/icon" || die "Make install failed"
+ dosym ../$(get_libdir)/icon/bin/icont /usr/bin/icont
+ dosym ../$(get_libdir)/icon/bin/iconx /usr/bin/iconx
+ dosym ../$(get_libdir)/icon/bin/icon /usr/bin/icon
+ dosym ../$(get_libdir)/icon/bin/vib /usr/bin/vib
+
+ cd "${S}/man/man1" || die
+ doman "${PN}"t.1
+ doman "${PN}".1
+ rm -rf "${ED}"/usr/$(get_libdir)/${PN}/man || die
+
+ cd "${S}/doc" || die
+ dodoc *.txt *.sed ../README
+ # dohtml ignores all anything except .html files, no use here
+ mkdir -p "${ED}"/usr/share/doc/${PF}/html
+ cp -dpR *.htm *.gif *.jpg *.css "${ED}"/usr/share/doc/${PF}/html || die
+ rm -rf "${ED}"/usr/$(get_libdir)/icon/{doc,README} || die
+
+ # optional Icon Programming Library
+ if use iplsrc; then
+ cd "${S}" || die
+ dodir /usr/$(get_libdir)/icon/ipl
+ rm -fv ipl/{BuildBin,BuildExe,CheckAll,Makefile} || die
+ insinto /usr/$(get_libdir)/icon
+ doins -r ipl
+ fi
+}
diff --git a/dev-lang/icon/metadata.xml b/dev-lang/icon/metadata.xml
new file mode 100644
index 000000000000..a50948a598ab
--- /dev/null
+++ b/dev-lang/icon/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>cwills@witznd.net</email>
+ <name>Cheyenne Wills</name>
+ <description>Proxied maintainer; set to assignee in all bugs</description>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Gentoo Proxy Maintainers Project</name>
+ </maintainer>
+ <use>
+ <flag name="iplsrc">install the icon programming library source</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/idb/Manifest b/dev-lang/idb/Manifest
new file mode 100644
index 000000000000..1a129ec1a747
--- /dev/null
+++ b/dev-lang/idb/Manifest
@@ -0,0 +1,9 @@
+DIST parallel_studio_xe_2013_sp1_update3.tgz 3448198789 SHA256 cd332d1ab5241f7609ca6fefa905b50ec8d706e93870860af1ee9e9e5fd6cc1c SHA512 6308a812c3eb2bd4549b756aa16fdeeb9337131e56bd203876a6763298c776858629a6d17148cdd5275f6781471e826a00a0181b72abcdd7d991196eb4798025 WHIRLPOOL 5407f994b0b26323a4e6540e3eafedf05f4dd900af8ebf778911bf156656057ac0bc394f0a3791b8f4e9aedac681827c5432ddd070692e0fbedbd2f152eda04b
+DIST parallel_studio_xe_2013_update4.tgz 2184817121 SHA256 55d549fc34f7a9eb96951c7be3216b68f9f960edfdc0997cf8dcffe5c78d66c8 SHA512 84ea227fdca2c427996b0c4d17a0bad6c289a6fbfc267c19f54ebee875e11e6e8d14bb3103599e3b89331c34a153b0a63a5ca8c12f4619420f78f8c4b0c2da96 WHIRLPOOL 6bedfdbcad7f0d7ad4681d51ad865db247d5f264f5fa33e7136fc64c5e83eee30bb2611f39bd7f31b790432e314a7dbea755297ae3fd2b90ccecb7beffb20d79
+DIST parallel_studio_xe_2013_update4_ia32.tgz 1220177902 SHA256 5bd75b2747f4b787b8128a83914b060d156ecdc41236f4100363b7ab4f9f6859 SHA512 968db307e08cd31450200abd41ade1f2b2855f4b5cb19911d03c1cd357cab11cbba814db354452496fcf66fc3fad1423b24f428bd4db07402f12bd63e4d34247 WHIRLPOOL f2b03ebb78960718a15fc69be814eeb7996fdd7575720f4b09cb915086cc757fea188ef5ceb7e37ed00c995e11ae544d8bd55aba8ab2d12530e26b3d23362f3e
+DIST parallel_studio_xe_2013_update4_intel64.tgz 1520767493 SHA256 31383f357b9b7d9c76e727e63427387d9ee42358f5b5df75a0d8766cd318a11d SHA512 497ad8f3473e1d11cdd31dff340a8e6ec1f012e731def084b2072146b5d11db906f85ace53b2223c3fbef949222f73f36783fd697eb7809464f4403c0ac8744a WHIRLPOOL d08447f27aee0f088797968d541fe98e3813a1daf5b87024d37493663238594c3e4e75a8d9636a4059191782f5eae9065d45b7ad2c27e1f73fc74eb110ad399f
+EBUILD idb-13.0.5.192.ebuild 685 SHA256 e0ef17b6ef26db548ecf622bed4a86943af6d295236924962e13546d287a80f0 SHA512 6432a1a67242169b8f83d63310b71059e20b2e4666b2c39be6b99bb8da76acf9ae648a3ddbb72699a19a961cdd06424bc121934af140485629d09baf2531cc44 WHIRLPOOL fdeb4fac247c24042b61227299984a9709d07b805938c5684cf791b68da4533ffbadaff97cd8ae9465a92f6bf33669b035f741a2184b69f33c74dfe7565c926c
+EBUILD idb-14.0.3.174.ebuild 780 SHA256 48a90c7e20286f60b9770154d7e3d1e01cf34c989dcd2d96942f08803da3f930 SHA512 c242304113fac6daad639eeabc35c6dee94cb589df7e79153f9126e4d689445c4dc67c004e965d4977327da4424c11528547d618aa99c435a24475d3340fea49 WHIRLPOOL 45f995fdaaba953f78d1d4b3847dd58f03d1a969676f535098d7e9803573971b4385ee6267cd571751d2e330ca58e7b4e4641d9392e04402e9b3f10824f4a204
+MISC ChangeLog 3706 SHA256 f8d622cb6ee22ef25a4cdcf7f9597ac545de56aab6725b378768d5f736967062 SHA512 923b60ca5d5eb9937405522ead12f74da96487e063a989784237d40a74b61b114b6e046cb2115fdaaf6834dd493d6cdb6209069c125e286210a8904b87b0b627 WHIRLPOOL d502674e8933f7fbd5cff3002fa0bad32a83206ccf9cc78e7d13dc8e780244dd0d41ad9d4abc96e8cfb805a68923137190daa867ce7724cca2c6964326c6d530
+MISC ChangeLog-2015 4811 SHA256 7dd0ae2b0da077d1ab2117effab214248a438246d722cd8bfeae43d959d5242c SHA512 e719fb5bc1f28e9f7646e709b42f5a796d3aef57f4758d3b5ade703a649fe3b7a11084213cc0e97e5ec82cf0eb513f1f82876f669f7dd9055c8c693dcd213e5c WHIRLPOOL 70338d1ff9afd69a4cc4cecbf2f4177d163979d72f8a1dbb686358ffeedae9aee871e90b0e70c6e62e748d493159e46d6b0a40a2b5143564c75f365cacc341fe
+MISC metadata.xml 807 SHA256 866aa55ce0cb93060eb6203dfe5836e9dc351b4f3dbbf88b569b0c43dd593300 SHA512 2abd027e8401aef13ec51490d099215e06a4214de47589a001eba63f0ffd4344cb89939af952af4b7958f99f0fea43ad2451859d1e4fcbc234e033a6ef3c3f30 WHIRLPOOL 2847d63e955bc37963f6b4fa19061067c80b17bd57516429c9e305dc46aec57b755e73645485f2704e5a3859ec497e9749afa32ca03a7aabfd473b9f229389a9
diff --git a/dev-lang/idb/idb-13.0.5.192.ebuild b/dev-lang/idb/idb-13.0.5.192.ebuild
new file mode 100644
index 000000000000..fc93f2631cd2
--- /dev/null
+++ b/dev-lang/idb/idb-13.0.5.192.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3266
+INTEL_DPV=2013_update4
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel C/C++/FORTRAN debugger"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE=""
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND=">=dev-libs/intel-common-13.1[compiler]"
+RDEPEND="${DEPEND}
+ virtual/jre"
+
+INTEL_BIN_RPMS="idb"
+INTEL_DAT_RPMS="idb-common idbcdt"
+
+CHECKREQS_DISK_BUILD=475M
+
+src_prepare() {
+ sed \
+ -e "/^INSTALLDIR/s:=.*:=${INTEL_SDP_EDIR}:g" \
+ -i ${INTEL_SDP_DIR}/bin/intel*/idb || die
+}
diff --git a/dev-lang/idb/idb-14.0.3.174.ebuild b/dev-lang/idb/idb-14.0.3.174.ebuild
new file mode 100644
index 000000000000..3451d9823d02
--- /dev/null
+++ b/dev-lang/idb/idb-14.0.3.174.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=4220
+INTEL_DPV=2013_sp1_update3
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+_INTEL_PV1=14
+
+DESCRIPTION="Intel C/C++/FORTRAN debugger"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE=""
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND=">=dev-libs/intel-common-13.1[compiler]"
+RDEPEND="${DEPEND}
+ virtual/jre"
+
+INTEL_BIN_RPMS="idb"
+INTEL_DAT_RPMS="idb-common idbcdt"
+
+CHECKREQS_DISK_BUILD=475M
+
+pkg_setup() {
+ _INTEL_PV1=13 intel-sdp_pkg_setup
+}
+
+src_prepare() {
+ sed \
+ -e "/^INSTALLDIR/s:=.*:=${INTEL_SDP_EDIR}:g" \
+ -i ${INTEL_SDP_DIR}/bin/intel*/idb || die
+}
diff --git a/dev-lang/idb/metadata.xml b/dev-lang/idb/metadata.xml
new file mode 100644
index 000000000000..8b41cedf75a1
--- /dev/null
+++ b/dev-lang/idb/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@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The Intel® Debugger is a command line debugger for Intel based
+ architectures. It is well suited with the Intel C++ or Intel FORTRAN
+ compilers. It also comes also with a graphical interface and extensive
+ documentation. The package is bundled in either compiler tar ball, and
+ has been split to produce this one.
+ The product can be installed as a non-commercial as
+ well. License, terms of qualifications can be found on the web
+ site and follow the one received in the Intel compilers.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/ifc/Manifest b/dev-lang/ifc/Manifest
new file mode 100644
index 000000000000..c9c4fe8debf5
--- /dev/null
+++ b/dev-lang/ifc/Manifest
@@ -0,0 +1,11 @@
+DIST parallel_studio_xe_2013_sp1_update3.tgz 3448198789 SHA256 cd332d1ab5241f7609ca6fefa905b50ec8d706e93870860af1ee9e9e5fd6cc1c SHA512 6308a812c3eb2bd4549b756aa16fdeeb9337131e56bd203876a6763298c776858629a6d17148cdd5275f6781471e826a00a0181b72abcdd7d991196eb4798025 WHIRLPOOL 5407f994b0b26323a4e6540e3eafedf05f4dd900af8ebf778911bf156656057ac0bc394f0a3791b8f4e9aedac681827c5432ddd070692e0fbedbd2f152eda04b
+DIST parallel_studio_xe_2013_update4.tgz 2184817121 SHA256 55d549fc34f7a9eb96951c7be3216b68f9f960edfdc0997cf8dcffe5c78d66c8 SHA512 84ea227fdca2c427996b0c4d17a0bad6c289a6fbfc267c19f54ebee875e11e6e8d14bb3103599e3b89331c34a153b0a63a5ca8c12f4619420f78f8c4b0c2da96 WHIRLPOOL 6bedfdbcad7f0d7ad4681d51ad865db247d5f264f5fa33e7136fc64c5e83eee30bb2611f39bd7f31b790432e314a7dbea755297ae3fd2b90ccecb7beffb20d79
+DIST parallel_studio_xe_2013_update4_ia32.tgz 1220177902 SHA256 5bd75b2747f4b787b8128a83914b060d156ecdc41236f4100363b7ab4f9f6859 SHA512 968db307e08cd31450200abd41ade1f2b2855f4b5cb19911d03c1cd357cab11cbba814db354452496fcf66fc3fad1423b24f428bd4db07402f12bd63e4d34247 WHIRLPOOL f2b03ebb78960718a15fc69be814eeb7996fdd7575720f4b09cb915086cc757fea188ef5ceb7e37ed00c995e11ae544d8bd55aba8ab2d12530e26b3d23362f3e
+DIST parallel_studio_xe_2013_update4_intel64.tgz 1520767493 SHA256 31383f357b9b7d9c76e727e63427387d9ee42358f5b5df75a0d8766cd318a11d SHA512 497ad8f3473e1d11cdd31dff340a8e6ec1f012e731def084b2072146b5d11db906f85ace53b2223c3fbef949222f73f36783fd697eb7809464f4403c0ac8744a WHIRLPOOL d08447f27aee0f088797968d541fe98e3813a1daf5b87024d37493663238594c3e4e75a8d9636a4059191782f5eae9065d45b7ad2c27e1f73fc74eb110ad399f
+DIST parallel_studio_xe_2015_update6.tgz 4190044333 SHA256 e604ed2bb45d227b151dd2898f3edd93526d58d1db1cb9d6b6f614907864f392 SHA512 a9896289db8e820f02c330702ff1e954af11af5f9bbc0e5623a001b3a8c33a2bcb8660ac8b0e569994a3682bfd263bf119dbe6a43fb343139adbeaaaa13f8a81 WHIRLPOOL 997c96d0d9d6c603f8659a5ece91aa55b9a7bf5b428065ac55a0fa3d5577dab7fcc61157a983eb355832dc7c201fde4e5fcc9ff7bcb4d8b656847c2c1092b1dd
+EBUILD ifc-13.1.5.192.ebuild 758 SHA256 7ebe3b7c5c095870e86bc97bcd9896b80cbd83f956ba0a74252959b41dec90d4 SHA512 c0ea5fcdc95bd904d485f54ca9b5c35e9d193d5dd0e7c0dde41ad17cd96b45913988f41a1059fbcfe292773254b2e766563d9087636312e3519df76f2777783e WHIRLPOOL 987a73e548ab0379fb3cafac12a25e86a97f1b807f2e0ab1be1911b9b09d1c458fac54ff916cab781393144c23495e32ee1b8a057f7b58f6394543bc3c1c6a79
+EBUILD ifc-14.0.3.174.ebuild 786 SHA256 5912a648c1047c898c150979ce8569865eaae7d97ff897898dea51520b36b043 SHA512 deef3fb655cbb9c34ab6a18e9702d5ffd06599ff486717f673113f9e3630469c91a9003694db8dea5b425d0d5a7f2ab1d831311c5be3ad51abc7d657012bd92b WHIRLPOOL 671688992e5993bd441d94fcf51b6e252ad0f7c38cf110f9e72964706c6e334ca0626959fb35b570b4442618e8c5cc9ce574ab5531d13cf69f0d36e12736a261
+EBUILD ifc-15.0.6.233.ebuild 801 SHA256 c3c9281cddbbe2673ca50fe690d123af19dec6388176ad3586c1a9fe0738a481 SHA512 1d9bdf333e30e8ea3b641b85aa5bdf1f33113ce321644ccc4b9d2148e01f2c2322c8e2c343077545c1292212bda02bd57a0f7492ef4d1e1514334ec5b428ec9a WHIRLPOOL ed2198f608ee31f87df69143d9a9f42207a46e2f4f7749c4c99285cfa40dbe54971480ffe5797672f73b22116ec1c9eb8e950573097d096c8dccd08afcadd0d7
+MISC ChangeLog 3844 SHA256 d3adc820a47a9cb8661bae961363f64d909939ea112dd9aabb85a769cdd5faf6 SHA512 fc48d0d471315c43cec34a56d1b548ca54f5dabdd28597d88cd934aeb3375378f078467434bdc2c6d46e12a66ef5f6f2817737d170c5b59cbed3a7848200730b WHIRLPOOL 0064a55a8f61a30d1bb182c61b68d2b89e255ca72ce52f638132f60047d173d79b7adda26823a127af66674b90b843b95c6bc7551c73738651683140b1a6fae4
+MISC ChangeLog-2015 9947 SHA256 00e1dac5fc5241480b3905a65e130405776bbc22a916a3a180adc63ce26321c2 SHA512 e93b50ad54ec060560634d8de97f98f02b54a03a06b254091a97c844e9f5c7c3acf03d57b3b19c66ad3eee59275e8d080218fe76b7f1b392d32648db511cdd0e WHIRLPOOL b6ff3c3c9b0903756dd11f8ba26e2a8148e5ccb85e1d2bc36efc93436018fbc94b3fba3ff8bd8dfa47ed27e9e0d92de2e23da1463ac58e4022fc577b9e39bfb8
+MISC metadata.xml 774 SHA256 0c4554c57ef200b19d99b9dcff1307525a9e08aac2ac44b452731aed17a30682 SHA512 14c7de3984226a6b32fd1e7d913d21cdff0a233e00f5f7502cfa6778b7a347beb1a505c8b92905c30a73e6e7ffe18a2b79169d8939858784894dd7ebcec4a553 WHIRLPOOL 1485e762ae8ea6579d8fedbda30785ebe9e6c144dc871d46675460acc99cb5e77150907df97904f24007cc346b40556df2092375d531e9c3e0c6384d6b0d490e
diff --git a/dev-lang/ifc/ifc-13.1.5.192.ebuild b/dev-lang/ifc/ifc-13.1.5.192.ebuild
new file mode 100644
index 000000000000..7ff5dd0df06d
--- /dev/null
+++ b/dev-lang/ifc/ifc-13.1.5.192.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=3266
+INTEL_DPV=2013_update4
+INTEL_SUBDIR=composerxe
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_jp]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/ifc/ifc-14.0.3.174.ebuild b/dev-lang/ifc/ifc-14.0.3.174.ebuild
new file mode 100644
index 000000000000..2fb00bb8a9b9
--- /dev/null
+++ b/dev-lang/ifc/ifc-14.0.3.174.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=4220
+INTEL_DPV=2013_sp1_update3
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_jp]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+ intel-sdp_src_install
+}
diff --git a/dev-lang/ifc/ifc-15.0.6.233.ebuild b/dev-lang/ifc/ifc-15.0.6.233.ebuild
new file mode 100644
index 000000000000..818272839d41
--- /dev/null
+++ b/dev-lang/ifc/ifc-15.0.6.233.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+INTEL_DPN=parallel_studio_xe
+INTEL_DID=8470
+INTEL_DPV=2015_update6
+INTEL_SUBDIR=composerxe
+INTEL_SINGLE_ARCH=false
+
+inherit intel-sdp
+
+DESCRIPTION="Intel FORTRAN Compiler"
+HOMEPAGE="http://software.intel.com/en-us/articles/intel-composer-xe/"
+
+IUSE="linguas_ja"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="!dev-lang/ifc[linguas_jp]"
+RDEPEND="${DEPEND}
+ ~dev-libs/intel-common-${PV}[compiler,multilib=]"
+
+INTEL_BIN_RPMS="compilerprof compilerprof-devel"
+INTEL_DAT_RPMS="compilerprof-common compilerprof-vars"
+
+CHECKREQS_DISK_BUILD=375M
+
+src_install() {
+ if ! use linguas_ja; then
+ find "${S}" -type d -name ja_JP -exec rm -rf '{}' + || die
+ fi
+
+ intel-sdp_src_install
+}
diff --git a/dev-lang/ifc/metadata.xml b/dev-lang/ifc/metadata.xml
new file mode 100644
index 000000000000..b545fb9baa3e
--- /dev/null
+++ b/dev-lang/ifc/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">
+ The Intel® Fortran Compiler is a full featured FORTRAN 77/95 and
+ substantial FORTRAN 2003 compiler for Intel based architectures. The
+ compiler supports multi-threading with automatic processor dispatch,
+ vectorization, auto-parallelization, OpenMP, data prefetching, loop
+ unrolling. The package comes with extensive documentation.
+ The product can be installed as a non-commercial as well. License,
+ terms of qualifications can be found on the web site.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/inform/Manifest b/dev-lang/inform/Manifest
new file mode 100644
index 000000000000..311b4f6778c6
--- /dev/null
+++ b/dev-lang/inform/Manifest
@@ -0,0 +1,5 @@
+DIST inform-6.33.1-b2.tar.gz 1822648 SHA256 5e260d5114507b8294ab74f2dac35d5681fa294629a842d57811d04fa5833f8c SHA512 12cc10b7dae4118600a4d19d0aa44c3a7c93dfc8aa17bd56df7b9237f21df0ae99db6840eefaa5b11ff346369c6f6f2f128167b3479c8f540c29e3e36666c368 WHIRLPOOL e96bae2f9570ef91aacfd72ff26102f02d7b3bbcca4b345bb67c37627accfbebcac09e4cf05642a1b1832cb2f3369b32f193ad4d36c1ac1dc1de00fa578f9915
+EBUILD inform-6.33.1_p2.ebuild 716 SHA256 4e5eb6469778285f03698798cf5e4435f4e4a7c2f547f839d7238887477bc140 SHA512 1da71e2e8498c3e89c7764c4f5c7d6ac11ff4220f907bf51ffb89ed839b530889c90f97dede5871afb63b03a491df534f0e35eddaad7a4fd4e6dcea9dbb31640 WHIRLPOOL 6d1c0a579f477cd16fcd3ab03a8da243013fb577b20e8c2212f2172a316b30fd71085bd1a8f8b8413cb6148553820334dc6fb5fe6fe5b82a3107325e0c01e70c
+MISC ChangeLog 2432 SHA256 bbe9442e80d07f9e5e69087d9ddeffc135da81b584c62a0346b9406abe8d068d SHA512 53a12c39289625363ea4c5e8ae3896f698e507bb0be1ebb210cb47ee613d724c64cd12bab30ee802a504fc2de2e6d1aac9c472f335f2bc099a9cdf1e3b9e7e73 WHIRLPOOL c71c9665b90eb16a70dbe80d61d98f8cfbcc60d449a2851d83e04e24f7344ac59eeb7bd49763e9ea9319eb90114123eaf38b4a9a595e67fc545c1d1d5d427520
+MISC ChangeLog-2015 2777 SHA256 9b7982857ca013c6b5d328ab7508e7a716002fc52389c84877a9cf03837258fe SHA512 79a7164ed2cfd37c7edc71b540abc0725927bd9466f028f75f2287808cacf07f2536e55eabb4ebd6a17e57f678b134b927362da485502aace68580bf7101aba0 WHIRLPOOL cebf5541ec8a650038c7d5901ffe14786ac552f23f0627cdcbdecf829d522e053c1de46bb331fe0441a749c12d167adac01ac7f0eb69a895e751704520a6f8bb
+MISC metadata.xml 2554 SHA256 82279d22ad66950267ed50675270108747573296fbd7269b44c39f4f9b5d884e SHA512 a2183b870f6b667c1c630a8bca8f71405e53e350f862d34ce5763f25ee9c713879de9510a39c7fd62a50854f544967ffb0e19f30399c2d341a1f023c42856bc5 WHIRLPOOL b8460aebffc6bc73a59f639889d53018360ea245c0e62e8352d25483ab63143a7222d7b2a593b27349ec67080a25e06fcab3df11fe8182e8876571ad7be3ecc5
diff --git a/dev-lang/inform/inform-6.33.1_p2.ebuild b/dev-lang/inform/inform-6.33.1_p2.ebuild
new file mode 100644
index 000000000000..939c464d7591
--- /dev/null
+++ b/dev-lang/inform/inform-6.33.1_p2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+MY_P=${P/_p/-b}
+DESCRIPTION="design system for interactive fiction"
+HOMEPAGE="http://www.inform-fiction.org/"
+SRC_URI="http://mirror.ifarchive.org/if-archive/infocom/compilers/inform6/source/${MY_P}.tar.gz"
+
+LICENSE="Artistic-2 Inform"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="emacs"
+PDEPEND="emacs? ( app-emacs/inform-mode )"
+
+S=${WORKDIR}/${MY_P}
+
+src_install() {
+ default
+ dodoc VERSION
+ docinto tutorial
+ dodoc tutor/README tutor/*.inf
+ mv "${ED}"/usr/share/${PN}/manual "${ED}"/usr/share/doc/${PF}/html
+ rmdir "${ED}"/usr/share/inform/{include,module}
+}
diff --git a/dev-lang/inform/metadata.xml b/dev-lang/inform/metadata.xml
new file mode 100644
index 000000000000..42730dae3fb8
--- /dev/null
+++ b/dev-lang/inform/metadata.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <longdescription>
+A Design System for Interactive Fiction
+
+Just as film might be called a form of literature which needs technology to be
+read (a cinema projector or a television set) and to be written (a camera),
+interactive fiction is read with the aid of a computer. On this analogy, Inform
+is a piece of software enabling any modern computer to be used as the camera, or
+the film studio, to create works of interactive fiction. To read the resulting
+works, you and your audience need only a simpler piece of software called an
+interpreter.
+
+In this genre of fiction, the computer describes a world and the player types
+instructions like touch the mirror for the protagonist character to follow; the
+computer responds by describing the result, and so on until a story is told.
+
+Interactive fiction emerged from the old-style "adventure game" (c.1975) and
+tends to be a playful genre, which must sometimes be teased out as though it were
+a cryptic crossword puzzle. But this doesn't prevent it from being an artistic
+medium, which has attracted (for instance) the former U.S. Poet Laureate, Robert
+Pinsky, and the novelists Thomas M. Disch and Michael Crichton. An interactive
+fiction is not a child's puzzle-book, with a maze on one page and a rebus on the
+next, but nor is it a novel. Neither pure interaction nor pure fiction, it lies
+in a strange and still largely unexplored land in between.
+
+Since its invention (by Graham Nelson in 1993), Inform has been used to design
+some hundreds of works of interactive fiction, in eight languages, reviewed in
+periodicals ranging in specialisation from XYZZYnews to The New York Times. It
+accounts for around ten thousand postings per year to Internet newsgroups.
+Commercially, Inform has been used as a multimedia games prototyping tool.
+Academically, it has turned up in syllabuses and seminars from computer science
+to theoretical architecture, and appears in books such as Cybertext: Perspectives
+on Ergodic Literature (E. J. Aarseth, Johns Hopkins Press, 1997). Having started
+as a revival of the then-disused Infocom adventure game format, the Z-Machine,
+Inform came full circle when it produced Infocom's only text game of the 1990s:
+Zork: The Undiscovered Underground, by Mike Berlyn and Marc Blank.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/interprolog/Manifest b/dev-lang/interprolog/Manifest
new file mode 100644
index 000000000000..fecaeb17cbad
--- /dev/null
+++ b/dev-lang/interprolog/Manifest
@@ -0,0 +1,7 @@
+AUX build.xml 1461 SHA256 9e2be8a8900274c5f99ce683762c94d1fbc5a2b69a524f72faccf8537b6dbf4d SHA512 0e469d954d69db940fdf1893257f20d15d1009148d3979755edd448bc1cda9425df5169f6ddba3e37b8eaccd25f3fbb7bfeb3c58a572111be2474e1850a32cb6 WHIRLPOOL 3e615c3bef71dbf5a84e0ae698124f72de5d196c57536507146dfb87fb796e53194a189ba8cfcaae9aef95b2a43042b41cf14c15b56ec6e462a6001d1b825bf6
+AUX interprolog-2.1.2-java1.4.patch 1341 SHA256 64e0097816a2a288db96ce0ffd62735ce9425362627dee3bea5ab921193e702d SHA512 cfd4a637e4d86172547448801c92decfa3f10fa7d02e007c42d8415901d742ecbdf1fca1e4034c7069885a06824f1577bc64f2454a2c31877af68e74ad3aa0d2 WHIRLPOOL ea5ec310b67aa9729b1ce2ad96b91da22adcd767419da091a757651a9a3fea437b86ae80a6e1235f4f28dd493af5c463925f806a7f37ec01bd073a1f255d7843
+DIST interprolog212.zip 1066931 SHA256 cf5b463576a51624703300a3966f1d3619d1ccd1011b59950b7b37365de8f182 SHA512 e3d8b216f7e76d5d95ad9d27a96720075575fd717c89ddf9403376a72e18d56fd68afa2b1e6e70da55b99cd84043a16695ff37a59ec3366115cd4c36ed1ff50c WHIRLPOOL 1aa842d432bb1bd6834c9961dd65c16354d3e37087df49758cea26b9d6917f49149a957a2f97cdf03f53418d5c5ff0f8b6f7f62cc786f90c36cc90e14d474032
+EBUILD interprolog-2.1.2.ebuild 1172 SHA256 aad748e41e5461b0614dd3a4e8bc068015053f236f045b312141ce43fe082c3e SHA512 65a4ca3fcf3f910ea1435690d28105aa1140f86b4d74674922b71176e29ece7d898bd9b0f540fbe05a7be7f76eb573ce75da4c4065b4bf96d2234a4b381adef8 WHIRLPOOL c3fbae6555a006e902e3a238ae8b75d4c00ae43339861b43488e2f069882f6c859d31acde26644e576e952aec1649f6b8f3bd7672dc5483a3996c95051089e05
+MISC ChangeLog 2641 SHA256 b05e80c35440c6603f37a684a818835fd08226dfb37dfe3ac507c2d4cb3a14f7 SHA512 c9d0d742330254f4215ff877f42e55a2d21f3609d3890bb8684b41fe94c222e98c4ff6c94294963b547c85e859f345c1190a2f32ea877a62ee252c224f510fdc WHIRLPOOL 1570dbc1fd2874a3f59542b464c133264a11b63a5a6553f5fd1dfc12187ad741db31fb7af3ef97bfd3361ae78830d112b65ba1ae2398fe33a0867504caff8e10
+MISC ChangeLog-2015 738 SHA256 1beb4a530a9ea05a40381a2a1fd9045d0248161d420c03b163541cd452be7c04 SHA512 307cce71464ba778381ece75e8e997fa9b6980c6cc59161a8d0207ca467a988a6f192e8efe8f5778fd0904886c27ec9d08e898bfb35e6e455d0b206dc0dbba42 WHIRLPOOL 87e7e9414db489225ed9ab3d06e0032faf08f94bead932fb36534d161e5d9f9ccff828b8fa0e291759efc1567fe1e63831dc409d122ed86184e73440ff2de332
+MISC metadata.xml 236 SHA256 c7fee7a3c12781805b151438049c445031a7b7031f7f46869144430034dae0c7 SHA512 e776224736bd575412c7b5b799f649c6b2947a70e6a9aea580063d9da7d09a8144e5ebaf7ac3ef131d578486cf05dec814dce11b2aeb884cded3be3cab70fcec WHIRLPOOL 7173f7ab9ba51d9d11c9039b22bb96b429171319fc41cd20b4773cd4c5135d18add75769d2f5f450831d48e59e3b4a31488d0b00d655d4e03e97550677197bce
diff --git a/dev-lang/interprolog/files/build.xml b/dev-lang/interprolog/files/build.xml
new file mode 100644
index 000000000000..a24536d8936d
--- /dev/null
+++ b/dev-lang/interprolog/files/build.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" ?><project default="jar" name="interprolog">
+
+ <!-- some properties -->
+ <property name="src.dir" value="src"/>
+ <property name="build.dir" value="build"/>
+ <property name="docs.dir" value="docs"/>
+ <property name="dist.dir" value="dist"/>
+ <property name="jarfile" value="${ant.project.name}.jar"/>
+ <property file="build.properties"/>
+
+ <!-- init -->
+ <target name="init">
+ <tstamp/>
+ <mkdir dir="${dist.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${docs.dir}"/>
+ </target>
+
+ <!-- compile everything -->
+ <target depends="init" name="compile">
+ <javac classpath="${gentoo.classpath}" deprecation="on" destdir="${build.dir}" encoding="ISO-8859-1" source="1.4" srcdir="${src.dir}" target="1.4"/>
+ <copy todir="${build.dir}">
+ <fileset dir="${src.dir}">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- build the jar file -->
+ <target depends="compile" name="jar">
+ <jar basedir="${build.dir}" jarfile="${dist.dir}/${jarfile}"/>
+ </target>
+
+ <!-- generate javadocs -->
+ <target depends="init" name="javadoc">
+ <javadoc classpath="${gentoo.classpath}" author="true" destdir="${docs.dir}" encoding="ISO-8859-1" packagenames="com.*" source="1.4" sourcepath="${src.dir}" use="true" version="true" windowtitle="${ant.project.name} API"/>
+ </target>
+
+ <!-- clean up -->
+ <target name="clean">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ <delete dir="${docs.dir}"/>
+ </target>
+</project>
diff --git a/dev-lang/interprolog/files/interprolog-2.1.2-java1.4.patch b/dev-lang/interprolog/files/interprolog-2.1.2-java1.4.patch
new file mode 100644
index 000000000000..614b2f2a1ed0
--- /dev/null
+++ b/dev-lang/interprolog/files/interprolog-2.1.2-java1.4.patch
@@ -0,0 +1,24 @@
+diff -ur interprolog212.orig/com/declarativa/interprolog/examples/SudokuWindow.java interprolog212/com/declarativa/interprolog/examples/SudokuWindow.java
+--- interprolog212.orig/com/declarativa/interprolog/examples/SudokuWindow.java 2005-10-20 15:14:12.000000000 +1300
++++ interprolog212/com/declarativa/interprolog/examples/SudokuWindow.java 2007-02-02 21:56:22.000000000 +1300
+@@ -34,7 +34,7 @@
+ JTable board = new SudokuBoard(model);
+
+ getContentPane().add(BorderLayout.CENTER,board);
+- pack(); show();
++ pack(); setVisible(true);
+ }
+
+ /** An ObjectExamplePair illustrating how to pass around a matrix of basic type values */
+diff -ur interprolog212.orig/com/declarativa/interprolog/gui/ListenerWindow.java interprolog212/com/declarativa/interprolog/gui/ListenerWindow.java
+--- interprolog212.orig/com/declarativa/interprolog/gui/ListenerWindow.java 2005-09-15 17:57:44.000000000 +1200
++++ interprolog212/com/declarativa/interprolog/gui/ListenerWindow.java 2007-02-02 21:57:42.000000000 +1300
+@@ -344,7 +344,7 @@
+ void load_dynFile(){
+ String nome,directorio; File filetoreconsult=null;
+ FileDialog d = new FileDialog(this,"load_dyn file...");
+- d.show();
++ d.setVisible(true);
+ nome = d.getFile(); directorio = d.getDirectory();
+ if (nome!=null) {
+ filetoreconsult = new File(directorio,nome);
diff --git a/dev-lang/interprolog/interprolog-2.1.2.ebuild b/dev-lang/interprolog/interprolog-2.1.2.ebuild
new file mode 100644
index 000000000000..999c9d4094ae
--- /dev/null
+++ b/dev-lang/interprolog/interprolog-2.1.2.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils java-pkg-2 java-ant-2 versionator
+
+MY_PV="$(delete_all_version_separators)"
+MY_P="${PN}${MY_PV}"
+
+DESCRIPTION="InterProlog is a Java front-end and enhancement for Prolog"
+HOMEPAGE="http://www.declarativa.com/interprolog/"
+SRC_URI="http://www.declarativa.com/interprolog/interprolog212.zip"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND=">=virtual/jdk-1.4
+ app-arch/unzip
+ dev-java/ant-core
+ =dev-java/junit-3.8*"
+
+RDEPEND=">=virtual/jdk-1.4
+ =dev-java/junit-3.8*
+ || (
+ dev-lang/xsb
+ dev-lang/swi-prolog
+ dev-lang/yap )"
+
+S="${WORKDIR}"/${MY_P}
+
+EANT_GENTOO_CLASSPATH="junit"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-java1.4.patch
+
+ cp "${FILESDIR}"/build.xml "${S}"
+ mkdir "${S}"/src
+ mv "${S}"/com "${S}"/src
+ rm interprolog.jar junit.jar
+}
+
+src_compile() {
+ java-pkg_jar-from junit
+ eant jar $(use_doc)
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+
+ if use doc ; then
+ java-pkg_dohtml -r docs/*
+ dohtml INSTALL.htm faq.htm prologAPI.htm
+ dohtml -r images
+ dodoc PaperEPIA01.doc
+ fi
+}
diff --git a/dev-lang/interprolog/metadata.xml b/dev-lang/interprolog/metadata.xml
new file mode 100644
index 000000000000..96eff3ea40c0
--- /dev/null
+++ b/dev-lang/interprolog/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>prolog@gentoo.org</email>
+ <name>Prolog</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-lang/ispc/Manifest b/dev-lang/ispc/Manifest
new file mode 100644
index 000000000000..14b72f1e47df
--- /dev/null
+++ b/dev-lang/ispc/Manifest
@@ -0,0 +1,6 @@
+DIST ispc-1.9.1.tar.gz 19276043 SHA256 c52910a007f1b0c732dd1cb981e7c22f3b9b575f0b097a49f4e43fc7a3e7e976 SHA512 4acd9e99dadba684829235a267e15ca8ff4cf33c4cadaa2983006bcb2c2f45fce49e8b11963f4bce78c256aaf8ece0583cf6cb729c6bc75af32b7fa4238ca743 WHIRLPOOL 3eabea7e671ba4383f517b05c47409ec11dabc822e56ec2d909a6bb37f5d56ac7bb94be6b3059edb8ad7bc036d7bebe5061772c4fd0650f1e7c04f4d2ce12cdf
+EBUILD ispc-1.9.1.ebuild 1100 SHA256 b26bb9f64fe289a83bd11638c15cb9a7ff627a8eeefc24156c5294f6bba69a66 SHA512 0539b86b64f45a7e52ed4a72006cadd3f9eb32ab40ad9b5394f7598923769d716a67ca11c39c637eed677d619cc67c6297ee667c783eb5dba7c95cecfb43e359 WHIRLPOOL aa98506ffc4f15a0f4407e4dc974c43a818a7dbcb9a353ce070bbfda1ab8e893134ebc2ce7ba3f3ed9624bcf7e40a277fa2fdd86fc36f28e4023357b7077899a
+EBUILD ispc-9999.ebuild 1043 SHA256 8b6e995c5971f2bd17ac977058867252ceac31539d16c7a9d915cffa9beb1c5c SHA512 ccc8ae855a867c2cd214cbe1e2ca233b1e198924413d8c552aecaae825534a9beb9be21e41d988bcd7d20360eae320d47fe1d929c01b7c0e80edf7d2790fbde1 WHIRLPOOL 16e7cbaffbc42b7716aa7e00eec1b211ab23e906fade11e28f1a8e616b495ff5077fadb2a390f12409a70f9212d1de3c2521768535392a7abfd590aa58a9a092
+MISC ChangeLog 4293 SHA256 12c7257a5113aa3ff47595b121bf07596ca311d00762a8ab4188a0a8fc4d3db7 SHA512 540891641aade6920c9a3bfd90a90e5dc2369579d2d8d28c0c5d382929f4c197145ded52710a2a2111721b9bff265ec944a2e64fdfbf9070cf97ac9851228c6d WHIRLPOOL 391c4b2d31abd068c4918f4db946d3718973317c0128c617d195fa4d89cc30de0653143fe6ecc74e3418f5c9a0fa790706fa52242607dd3e35f065c993d22ae9
+MISC ChangeLog-2015 3040 SHA256 3320918a818038f09538a4bd4fa1d3c3ac99c2f84125d065ea601ee9a642c40f SHA512 6be8cfd3299cdf6644d7b2d78113426ffb96da7c9a1889be8422ff1c078b31582e8d04337d397171b961f5689299ba62c8392501138358319fb0b538a4702402 WHIRLPOOL 8b1d542d7cb6a6304e69aa709b5de1e6e2fb933119d2d74cd23b8006b0a5f1c71268d5474c8b7719f0ab8496eb78f530eedd8822c172a96df2fd467fb666fd7d
+MISC metadata.xml 327 SHA256 bf8c91fef9ab3de9a331a344d846ff458fd1e8489907f5a2257f5e9f1c220b76 SHA512 94078b0d77481ac78255fc9fbceec4e204b7fa20da59f103d163eb22f33fb78d0dd2ae039157666f6e80eee81922a6e89acc2ddf89d29275ff19ce5e9391ca83 WHIRLPOOL 8a12cad5a5491d7bc5313053237f87e265bf99d35df1d330fd50bf01f57706b05e4cf9462defbf2bb60b692b35a006695d09081ff07f5521b67a01fd24389b7a
diff --git a/dev-lang/ispc/ispc-1.9.1.ebuild b/dev-lang/ispc/ispc-1.9.1.ebuild
new file mode 100644
index 000000000000..72e2ab831c83
--- /dev/null
+++ b/dev-lang/ispc/ispc-1.9.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit toolchain-funcs python-any-r1
+
+DESCRIPTION="Intel SPMD Program Compiler"
+HOMEPAGE="https://ispc.github.com/"
+
+if [[ ${PV} = *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/ispc/ispc.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="BSD BSD-2 UoI-NCSA"
+SLOT="0"
+IUSE="examples"
+
+RDEPEND="
+ >=sys-devel/clang-3.0:0
+ >=sys-devel/llvm-3.0:0
+ "
+DEPEND="
+ ${RDEPEND}
+ ${PYTHON_DEPS}
+ sys-devel/bison
+ sys-devel/flex
+ "
+
+src_compile() {
+ #make all slient commands ("@") verbose and remove -Werror (ispc/ispc#1295)
+ sed -e '/^\t@/s/@//' -e 's/-Werror//' -i Makefile || die
+ emake LDFLAGS="${LDFLAGS}" OPT="${CXXFLAGS}" CXX="$(tc-getCXX)" CPP="$(tc-getCPP)"
+}
+
+src_install() {
+ dobin ispc
+ dodoc README.rst
+
+ if use examples; then
+ insinto "/usr/share/doc/${PF}/examples"
+ docompress -x "/usr/share/doc/${PF}/examples"
+ doins -r examples/*
+ fi
+}
diff --git a/dev-lang/ispc/ispc-9999.ebuild b/dev-lang/ispc/ispc-9999.ebuild
new file mode 100644
index 000000000000..9960e29ff26f
--- /dev/null
+++ b/dev-lang/ispc/ispc-9999.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit toolchain-funcs python-any-r1
+
+DESCRIPTION="Intel SPMD Program Compiler"
+HOMEPAGE="https://ispc.github.com/"
+
+if [[ ${PV} = *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/ispc/ispc.git"
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="BSD BSD-2 UoI-NCSA"
+SLOT="0"
+IUSE="examples"
+
+RDEPEND="
+ >=sys-devel/clang-3.0:*
+ >=sys-devel/llvm-3.0:*
+ "
+DEPEND="
+ ${RDEPEND}
+ ${PYTHON_DEPS}
+ sys-devel/bison
+ sys-devel/flex
+ "
+
+src_compile() {
+ sed -i '/^\t@/s/@//' Makefile || die #make all slient commands ("@") verbose
+ emake LDFLAGS="${LDFLAGS}" OPT="${CXXFLAGS}" CXX="$(tc-getCXX)" CPP="$(tc-getCPP)"
+}
+
+src_install() {
+ dobin ispc
+ dodoc README.rst
+
+ if use examples; then
+ insinto "/usr/share/doc/${PF}/examples"
+ docompress -x "/usr/share/doc/${PF}/examples"
+ doins -r examples/*
+ fi
+}
diff --git a/dev-lang/ispc/metadata.xml b/dev-lang/ispc/metadata.xml
new file mode 100644
index 000000000000..c214c07655f0
--- /dev/null
+++ b/dev-lang/ispc/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>junghans@gentoo.org</email>
+ <name>Christoph Junghans</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ispc/ispc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/j/Manifest b/dev-lang/j/Manifest
new file mode 100644
index 000000000000..045bde643752
--- /dev/null
+++ b/dev-lang/j/Manifest
@@ -0,0 +1,5 @@
+DIST j701_b_source.tar.gz 808367 SHA256 da3332589ed6fd01c15991991c9b45da2b0391b3bd110692e98798c6faa5b2be SHA512 f7ac035883098918ba4baa374a856a281a94adb83e7fb4828ef95d1a24aedc648b23593cc6ef6932e6ac546b0ba8215a8018265a3cb39c5008053c5ab7f74d57 WHIRLPOOL a8cc104419d5e26853d769d7d20b156b5da4ad5cbd50551ddac3e4789bc2819991664e504ede6f3f8a90c9aa1b6a7f5c8a61d903b68acc512773f60c53d5fbdf
+EBUILD j-701-r2.ebuild 1088 SHA256 e6053873e01d104746dca5f2f75136186e6994dfaa2de967f95bd4e50647cbd5 SHA512 342139c62f3c5cc4a3bf16261c63ba99bad54f9f5913c57057e2078d6b772a8326f872ded368b28409417344452db773036e7909cb1c6f58687cf2150432041d WHIRLPOOL c899ea04952138b46d85de0f74ca96cfde70eb54bb741aeecbb997fe034ce297adf5fafebeef5310e7240bcf856676d9c9f08fcf57cae32b64f3daf24ce556c3
+MISC ChangeLog 2160 SHA256 37298a841c067c1e37ec2d7c6b5f4d8e915c3a19987832742cb6d58833e38652 SHA512 92b97765360b515952535ac1aee9aa5f04a891957dc5a6aba820b2acaafd9f7d13938aea7be9c6beb5a32e8adb8e837fdbe4f9f2a8f82232c51322ce5ead197d WHIRLPOOL 71930bcf5b942ef57bac925b23ff95969e87e9fcd96824bd0d15ba848dae3ba75a5532ea54ce6cae1ace23d1e6ddb9582fcb818ba3098b8cb3f0feabd6d16f00
+MISC ChangeLog-2015 652 SHA256 b0464969cf6f85552ae2e2eed45a5988bc559932e729a192582f124977c32c36 SHA512 053fc2279df1bbd42975c8a2c240daf78a3760dd30ef8945f362415f2fa7d40e4ed1626804c62dea69a4a2eefe0b721b5e142d4844a25a81265704cb1cb8b0b7 WHIRLPOOL d9b9ea44d8e0693dbf3f1c4fcb1e4ec8b73a843bc86fafddae0ed6be5079402e83e7124649a268635c54e4407d62acef4fd502e944b8736fc26ef0f184fe0c34
+MISC metadata.xml 247 SHA256 0deec0776f26fb762fdf7711f4589b14f52a2456436ef557eec62a2cf2fb2bb7 SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7 WHIRLPOOL a135fa622e99d3dcdb432bc6b3c366076b3d86b4bfd9a76c852d781b8e9152541c7e7a2c7c6d6a3c4d2200dce792847a08166aaf7c17c22b6299dfe868234dec
diff --git a/dev-lang/j/j-701-r2.ebuild b/dev-lang/j/j-701-r2.ebuild
new file mode 100644
index 000000000000..c701ac272b5e
--- /dev/null
+++ b/dev-lang/j/j-701-r2.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+DESCRIPTION="Modern, high-level, general-purpose, high-performance programming language"
+HOMEPAGE="http://jsoftware.com"
+SRC_URI="http://www.jsoftware.com/download/${PN}${PV}_b_source.tar.gz"
+
+inherit eutils
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/jgplsrc"
+
+src_prepare() {
+ sed -i -e 's:make libj >& make.txt:make libj:' bin/build_libj || die
+ sed -i -e 's:W1,soname:Wl,-soname:' bin/jconfig || die
+ if use amd64; then
+ sed -i -e 's/bits=32/bits=64/' bin/jconfig || die
+ fi
+}
+
+src_compile() {
+ bin/jconfig || die
+ bin/build_defs || die
+ bin/build_libj || die
+ bin/build_jconsole || die
+}
+
+src_install() {
+ # since this appears to use hardcoded relative paths
+ # there's no sane way to put it in the normal filesystem hierarchy
+ mkdir -p "${D}/opt/j"
+ cp -r j/* "${D}/opt/j" || die
+ mkdir -p "${D}/usr/bin"
+ echo -e "#!/bin/sh\n/opt/j/bin/jconsole" > "${D}/usr/bin/jc" || die
+ chmod +x "${D}/usr/bin/jc"
+}
diff --git a/dev-lang/j/metadata.xml b/dev-lang/j/metadata.xml
new file mode 100644
index 000000000000..40aa45df2b01
--- /dev/null
+++ b/dev-lang/j/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/dev-lang/jimtcl/Manifest b/dev-lang/jimtcl/Manifest
new file mode 100644
index 000000000000..255a438e61c0
--- /dev/null
+++ b/dev-lang/jimtcl/Manifest
@@ -0,0 +1,16 @@
+AUX jimtcl-0.75-bootstrap.patch 585 SHA256 ee126511c2f0167bcb741c4e881e63ac3c3fa9a2d27eb46ce452142015f9c1a4 SHA512 fe82d393a1a46e3db4567287717af4c1813205945459702ebc3a9423395994a9fa2a337a5569241f4aada4176ce8abd65f88081112a1e2def9a4b5eb237cb647 WHIRLPOOL e98984d69c16d9e853c28ba6ea16957f6c6e08cad8f2408348bcfe4b23a9597b02a0a11b32fda939d5f0341b01f257f8633e92a5333bbdd65c589cbe71a9685b
+DIST jimtcl-0.70_pre20110317.tar.gz 691917 SHA256 28998a03321ef64d23376057c1a3dfb0f2f552ddce19df54d1d1277d3487f70d SHA512 138000c97bf7f8c0c5d81cd98861684d382579ace0cb1f7b96f71dde721ca627bf4d7beeed2bc8528077da26353a41ee9bcdbabd44bd732082c42ad6c7f91c65 WHIRLPOOL f1bc3336e49fb8229d41ed289070fac9ac515c4a4ed314a3d166a59244c57860ad628dd2016ded75ca8ec780c68a7b664e3030df86e06e5534d2fb6eda8d2b51
+DIST jimtcl-0.73.zip 2286098 SHA256 3d7348ad7f853dd58ab3c05d5404ababde083eef95debca6c7cee2da047214d0 SHA512 9d99eff13292ed1db95ca673be88b14c87e9ce1e28d3fab0b08e0ca0473765fa2e8e305fd5f67768d94ae47cc3e0bc3d0cec8ba4a54ad3d5c1359ee8e2d36f81 WHIRLPOOL 8bb83acad304dc73abfeee8718713bcc5a613cfbc3f875d6c31d70778822b88cf0f415b038262125236884853d9c977bf7ff134fb166e2b83124f452d7b6cd29
+DIST jimtcl-0.74.zip 2304607 SHA256 72def814ce1bf6359568d87df4c27af313f606e9a043900e4f4b04c77c66dd8c SHA512 6c7a1d45c15ac533aa35adaf5099712ca4ef456280121610a6621d5abb94505e93b165d36bb8ae4c27733118e2590774051c716f4c6bcb9bddca4d937d770a7b WHIRLPOOL 14ee7066b9913d84dc8773cf86a6f7d15b30cbf2c21434bec3bf7672e4931c13f60b403771023b5dbb87ca3b87f4305045e595e5adbb4037e8028db5c72af30a
+DIST jimtcl-0.75.zip 2319459 SHA256 1e8c25166d32e19068d1f94cb36613b9776bee9e2393e77acbd985cc6ab49924 SHA512 f2ba7a3e97de0c49813594e8238fdbb4db426f0974e3441312bccc773984304bf5621d45a117f9e7bec1d2120b8797102a2ec38caf329fd3b42ba708e66fd84a WHIRLPOOL 636fd4f5449e7bf5f1530cd915e4da561ce8809dda8bd070be4efb4e436d4ff9d5c46228eaa473b0396457c7646e8d5b7b886a5ba964d8a1b5cfc67bb4b3cc0f
+DIST jimtcl-0.76.zip 2326715 SHA256 288babe4a4f2f4445113873001a28abc0b0b3a69f0acb7d0fa5da7405e4f3a17 SHA512 50763ea897fb5393083749cdd9e57a3f3d2d6dbebc40ee6371b1b86ebfc2f515e9775cd2acd6627f0f81b54bd72cd8c74be5aa9d0dbefc7c16372887e07f6ea4 WHIRLPOOL 54c739d29547a2149ccbf8f5a9c310d39a411f56392e332055aea275dfd6d66ca09f417fb9201983441027274c0ae0e3fe58f84ad58fa75b9b6e8e51578c3403
+EBUILD jimtcl-0.70_pre20110317.ebuild 908 SHA256 d991fa4e149d69bb5b95b9faa8469f2a2856a73702ee3b51a85ec99ae18628e3 SHA512 9e6840ad39bda0cdfc9027466f8fc16896b55dd6bbb1b2f7a94b06787c239416efb5dcbaf657ab2c7b0b3d1cd7b534d675f748a46269d07e78039fd2f1c46f44 WHIRLPOOL 81ee2ef05bac31ee072e25a6a8ea0f5999440a59c6857c3ee761df48caa6ad49741a3c7833967d1a49391f6fa21a8e6d4ca305c66c74815582cb048c087ac574
+EBUILD jimtcl-0.73.ebuild 923 SHA256 bff7df0218c181e0c9e0675d4235d436035e2be3e76e676ca4f9ec5c1b4d7266 SHA512 1a3910166f49fda853bb5d116df969c64be37d36ca7a1e3c00b013e6b32effb34267aaf716382bf36728e73fdf1bf726cf5722fd881fd8f7d6163483cfaa8402 WHIRLPOOL 2fa3a46e2be13d9230e4d4abb76c2bb26919f512f94ea2fdbe8e7257e08a75590bef21ba6d9d9cdc0ed4428939cff0a1fda3924ad5fecfdccae947b8891531a3
+EBUILD jimtcl-0.74-r1.ebuild 1032 SHA256 6b7132373a697ebe31efab0567007c73bb3de9c37111479353d508c23615e921 SHA512 5f3ed029375213dea3a396736af2bb835e730250097d0010b284062be58e13a1578979d10e2cc1fb795891936790f38dbec22e167ce5e682e44cba8e9fcfa3c9 WHIRLPOOL 28401a37406d953d8a18962a62424c31dd9ec5b00f1e6aab362737789ef0226ebca8eec3c7cad294d4a4f5fe991e908d70ed9450efa106e3f5e09a8d77ae0cbe
+EBUILD jimtcl-0.75-r1.ebuild 1569 SHA256 38e4ae7d8e6397075b16b5e94b28e3edb4d44e7f37de82b92cb1d591ecbc13b3 SHA512 e60ad25ea590ad971d7e0848907f368918ad45dca8425f0d51f95047268f27157c49c1763eb984223392c90c3430851e366e68ebbfe47b21d547a91fb0f1633d WHIRLPOOL a090e213bbf1abe840454bb7464a829048e9862eebf95e91bdb7ce081d5a559b8ff47a46d77fd105ed64851cd38d8f58ae77880f7731e82e822923159db05fb1
+EBUILD jimtcl-0.75.ebuild 1038 SHA256 5f926349c029d8053ecac589a7f01181a5635db4cfa389c6e45ef97c4315dbc0 SHA512 35e7fa6d3eb9d05c6e5ac2eb2d8e5dfff7fd09fbe2c17f614c35702afb3b6fb7eb0ecba559ee7d9b50ca6424e0e02064e5d54fff51f535c4ab0f85f07b4592c9 WHIRLPOOL 6b8b71c851c92fb92cd888049271ad23116291923143bbf2cf71597f6f415fa9dde1cb00276842d0e03c7709d0d29eb88f1c73a2415b8739876415c50a463128
+EBUILD jimtcl-0.76.ebuild 1566 SHA256 50cc80bd7736f0a773026a3bc2ed4562d7a2e6a90e41faa62d644360ca42924c SHA512 d8f220bfa57e731ccaae01ab06b37d72c2df6fcc3382f0ddfee11bde71c6d368eb9eed474bd97277f5a81666629e4d519548cea4740d19cf71eab1593add07c9 WHIRLPOOL d2da06fbd324de4bea21aebd35d102775366c09eaa60f0c8f154765407f11d3a6fb121fd4d9f898ff948f6594858594eabfb23cf2051e0db385166adb5c31902
+EBUILD jimtcl-9999.ebuild 1569 SHA256 38e4ae7d8e6397075b16b5e94b28e3edb4d44e7f37de82b92cb1d591ecbc13b3 SHA512 e60ad25ea590ad971d7e0848907f368918ad45dca8425f0d51f95047268f27157c49c1763eb984223392c90c3430851e366e68ebbfe47b21d547a91fb0f1633d WHIRLPOOL a090e213bbf1abe840454bb7464a829048e9862eebf95e91bdb7ce081d5a559b8ff47a46d77fd105ed64851cd38d8f58ae77880f7731e82e822923159db05fb1
+MISC ChangeLog 2571 SHA256 e4f982b19a6bec7acbf263df25e406fa43a384065d865f279d88bccb3899ac8a SHA512 d29645f503c270c52ae8a14f0e668355cf1c0b9c121d1e8439faecd55c73d3a5c934c0a48bea7d7e66b0d7c78da9b112602ff96fd3c7ebc82f33b577907d0565 WHIRLPOOL eccda5d23356a40662b34c8623e22ef5f3c87e425c41024e213cf4276aa9a059cba6b0659dae12aabc83d04f9d64ae21db973fca36120d02e4d86df192469853
+MISC ChangeLog-2015 3135 SHA256 211bfbbbfbdfda6531bf5fe8c8522706d6b24a5d0277c77a76a8c705b08b59f1 SHA512 63599338892d7d8228cd11b87642d9a7503342a60102b3c89db1f0db2fac1d7004de6bf9b208aa27bded6a2726cc6991cb4b73b6a0cf41b45512077dc898edfa WHIRLPOOL 79ddc0f1af5f2751e964cd78ee6cc9c7edafdb55aa840fa4fd4892909a93614bbc6ba344f2c9c52fbd671b697a34d422feb998dcdf47b43c4b0d3ef13233a85f
+MISC metadata.xml 339 SHA256 768865c8c16f716eb50077809aa55fcb9c37344791cfe35fe80f0310c982f6c7 SHA512 84a6a6b15c451483e0f07742ba07af92678738a7e7e272090fc1786fdfe9c18565a62949c344c4383b905edcdf7db45808d0bf0a2e56a43df08795c9e6e81183 WHIRLPOOL 4266d38866ab0828faae4975f672e562bbe1562289c31c7c089e23662806f53790e2ea7edccf7d6e6dd6571e637e2e23aafc246cf49807dfb97d706e6aef4eb4
diff --git a/dev-lang/jimtcl/files/jimtcl-0.75-bootstrap.patch b/dev-lang/jimtcl/files/jimtcl-0.75-bootstrap.patch
new file mode 100644
index 000000000000..60850e0b6d0b
--- /dev/null
+++ b/dev-lang/jimtcl/files/jimtcl-0.75-bootstrap.patch
@@ -0,0 +1,15 @@
+always do a bootstrap w/local jimsh0 to avoid requiring tcl or jimtcl
+to be installed first. the bootstrap prog is small too.
+
+--- a/autosetup/find-tclsh
++++ b/autosetup/find-tclsh
+@@ -4,9 +4,6 @@
+ d=`dirname "$0"`
+ { "$d/jimsh0" "$d/test-tclsh"; } 2>/dev/null && exit 0
+ PATH="$PATH:$d"; export PATH
+-for tclsh in jimsh tclsh tclsh8.5 tclsh8.6; do
+- { $tclsh "$d/test-tclsh"; } 2>/dev/null && exit 0
+-done
+ echo 1>&2 "No installed jimsh or tclsh, building local bootstrap jimsh0"
+ for cc in ${CC_FOR_BUILD:-cc} gcc; do
+ { $cc -o "$d/jimsh0" "$d/jimsh0.c"; } 2>/dev/null || continue
diff --git a/dev-lang/jimtcl/jimtcl-0.70_pre20110317.ebuild b/dev-lang/jimtcl/jimtcl-0.70_pre20110317.ebuild
new file mode 100644
index 000000000000..fe34db13742e
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-0.70_pre20110317.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.berlios.de/"
+SRC_URI="https://dev.gentoo.org/~hwoarang/distfiles/${P}.tar.gz"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+src_configure() {
+ ! use static-libs && myconf=--with-jim-shared
+ econf ${myconf} \
+ --with-jim-ext=nvp
+}
+
+src_compile() {
+ emake all docs || die
+}
+
+src_install() {
+ dobin jimsh || die "dobin failed"
+ use static-libs && {
+ dolib.a libjim.a || die "dolib failed"
+ } || {
+ dolib.so libjim.so || die "dolib failed"
+ }
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-nvp.h jim-signal.h
+ doins jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO || die "dodoc failed"
+ dohtml Tcl.html || die "dohtml failed"
+}
diff --git a/dev-lang/jimtcl/jimtcl-0.73.ebuild b/dev-lang/jimtcl/jimtcl-0.73.ebuild
new file mode 100644
index 000000000000..cb1758884343
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-0.73.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.tcl.tk"
+SRC_URI="https://github.com/msteveb/jimtcl/zipball/0.73 -> ${P}.zip"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 m68k s390 sh x86"
+IUSE="doc static-libs"
+DEPEND="doc? ( app-text/asciidoc )
+ app-arch/unzip"
+
+GIT_HASH="5b8ea68"
+S="${WORKDIR}"/msteveb-${PN}-${GIT_HASH}
+
+src_configure() {
+ ! use static-libs && myconf=--with-jim-shared
+ econf ${myconf}
+}
+
+src_compile() {
+ emake all
+ use doc && emake docs
+}
+
+src_install() {
+ dobin jimsh
+ use static-libs && {
+ dolib.a libjim.a
+ } || {
+ dolib.so libjim.so
+ }
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h
+ doins jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO
+ use doc && dohtml Tcl.html
+}
diff --git a/dev-lang/jimtcl/jimtcl-0.74-r1.ebuild b/dev-lang/jimtcl/jimtcl-0.74-r1.ebuild
new file mode 100644
index 000000000000..56008de46ce6
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-0.74-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit multilib
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.tcl.tk"
+SRC_URI="https://github.com/msteveb/jimtcl/zipball/${PV} -> ${P}.zip"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~s390 ~sh ~x86"
+IUSE="doc static-libs"
+DEPEND="doc? ( app-text/asciidoc )
+ app-arch/unzip"
+
+GIT_HASH="9a3562c"
+S="${WORKDIR}"/msteveb-${PN}-${GIT_HASH}
+
+src_configure() {
+ ! use static-libs && myconf=--with-jim-shared
+ econf ${myconf}
+}
+
+src_compile() {
+ emake all
+ use doc && emake docs
+}
+
+src_install() {
+ dobin jimsh
+ use static-libs && {
+ dolib.a libjim.a
+ } || {
+ dolib.so libjim.so.${PV}
+ dosym /usr/$(get_libdir)/libjim.so.${PV} \
+ /usr/$(get_libdir)/libjim.so
+ }
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h
+ doins jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO
+ use doc && dohtml Tcl.html
+}
diff --git a/dev-lang/jimtcl/jimtcl-0.75-r1.ebuild b/dev-lang/jimtcl/jimtcl-0.75-r1.ebuild
new file mode 100644
index 000000000000..d05b5040644f
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-0.75-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit multiprocessing eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://repo.or.cz/r/jimtcl.git"
+ inherit git-2
+else
+ inherit vcs-snapshot
+ SRC_URI="https://github.com/msteveb/jimtcl/zipball/${PV} -> ${P}.zip"
+ KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~mips ~s390 ~sh ~x86"
+fi
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.tcl.tk/"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="doc? ( app-text/asciidoc )
+ app-arch/unzip"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+ else
+ default
+ cd "${WORKDIR}"/msteveb-jimtcl-*
+ S=${PWD}
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.75-bootstrap.patch
+}
+
+src_configure() {
+ multijob_init
+ CCACHE=None multijob_child_init econf --with-jim-shared
+ if use static-libs ; then
+ # The build does not support doing both simultaneously.
+ mkdir static-libs
+ cd static-libs
+ CCACHE=None ECONF_SOURCE=${S} multijob_child_init econf
+ fi
+ multijob_finish
+}
+
+src_compile() {
+ # Must build static-libs first.
+ use static-libs && emake -C static-libs libjim.a
+ emake all
+ use doc && emake docs
+}
+
+src_install() {
+ dobin jimsh
+ use static-libs && dolib.a static-libs/libjim.a
+ ln -sf libjim.so.* libjim.so
+ dolib.so libjim.so*
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h \
+ jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO
+ use doc && dohtml Tcl.html
+}
diff --git a/dev-lang/jimtcl/jimtcl-0.75.ebuild b/dev-lang/jimtcl/jimtcl-0.75.ebuild
new file mode 100644
index 000000000000..59a5c92d1924
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-0.75.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit multilib
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.tcl.tk"
+SRC_URI="https://github.com/msteveb/jimtcl/zipball/${PV} -> ${P}.zip"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~mips ~s390 ~sh ~x86"
+IUSE="doc static-libs"
+DEPEND="doc? ( app-text/asciidoc )
+ app-arch/unzip"
+
+GIT_HASH="cffd1a5"
+S="${WORKDIR}"/msteveb-${PN}-${GIT_HASH}
+
+src_configure() {
+ ! use static-libs && myconf=--with-jim-shared
+ econf ${myconf}
+}
+
+src_compile() {
+ emake all
+ use doc && emake docs
+}
+
+src_install() {
+ dobin jimsh
+ use static-libs && {
+ dolib.a libjim.a
+ } || {
+ dolib.so libjim.so.${PV}
+ dosym /usr/$(get_libdir)/libjim.so.${PV} \
+ /usr/$(get_libdir)/libjim.so
+ }
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h
+ doins jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO
+ use doc && dohtml Tcl.html
+}
diff --git a/dev-lang/jimtcl/jimtcl-0.76.ebuild b/dev-lang/jimtcl/jimtcl-0.76.ebuild
new file mode 100644
index 000000000000..a82e24c9b204
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-0.76.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit multiprocessing eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://repo.or.cz/r/jimtcl.git"
+ inherit git-2
+else
+ inherit vcs-snapshot
+ SRC_URI="https://github.com/msteveb/jimtcl/zipball/${PV} -> ${P}.zip"
+ KEYWORDS="amd64 arm ~arm64 ~m68k ~mips ~s390 ~sh x86"
+fi
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.tcl.tk/"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="doc? ( app-text/asciidoc )
+ app-arch/unzip"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+ else
+ default
+ cd "${WORKDIR}"/msteveb-jimtcl-*
+ S=${PWD}
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.75-bootstrap.patch
+}
+
+src_configure() {
+ multijob_init
+ CCACHE=None multijob_child_init econf --with-jim-shared
+ if use static-libs ; then
+ # The build does not support doing both simultaneously.
+ mkdir static-libs
+ cd static-libs
+ CCACHE=None ECONF_SOURCE=${S} multijob_child_init econf
+ fi
+ multijob_finish
+}
+
+src_compile() {
+ # Must build static-libs first.
+ use static-libs && emake -C static-libs libjim.a
+ emake all
+ use doc && emake docs
+}
+
+src_install() {
+ dobin jimsh
+ use static-libs && dolib.a static-libs/libjim.a
+ ln -sf libjim.so.* libjim.so
+ dolib.so libjim.so*
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h \
+ jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO
+ use doc && dohtml Tcl.html
+}
diff --git a/dev-lang/jimtcl/jimtcl-9999.ebuild b/dev-lang/jimtcl/jimtcl-9999.ebuild
new file mode 100644
index 000000000000..d05b5040644f
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-9999.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit multiprocessing eutils
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="http://repo.or.cz/r/jimtcl.git"
+ inherit git-2
+else
+ inherit vcs-snapshot
+ SRC_URI="https://github.com/msteveb/jimtcl/zipball/${PV} -> ${P}.zip"
+ KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~mips ~s390 ~sh ~x86"
+fi
+
+DESCRIPTION="Small footprint implementation of Tcl programming language"
+HOMEPAGE="http://jim.tcl.tk/"
+
+LICENSE="LGPL-2"
+SLOT="0"
+IUSE="doc static-libs"
+
+RDEPEND=""
+DEPEND="doc? ( app-text/asciidoc )
+ app-arch/unzip"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-2_src_unpack
+ else
+ default
+ cd "${WORKDIR}"/msteveb-jimtcl-*
+ S=${PWD}
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.75-bootstrap.patch
+}
+
+src_configure() {
+ multijob_init
+ CCACHE=None multijob_child_init econf --with-jim-shared
+ if use static-libs ; then
+ # The build does not support doing both simultaneously.
+ mkdir static-libs
+ cd static-libs
+ CCACHE=None ECONF_SOURCE=${S} multijob_child_init econf
+ fi
+ multijob_finish
+}
+
+src_compile() {
+ # Must build static-libs first.
+ use static-libs && emake -C static-libs libjim.a
+ emake all
+ use doc && emake docs
+}
+
+src_install() {
+ dobin jimsh
+ use static-libs && dolib.a static-libs/libjim.a
+ ln -sf libjim.so.* libjim.so
+ dolib.so libjim.so*
+ insinto /usr/include
+ doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h \
+ jim-win32compat.h jim-eventloop.h jim-config.h
+ dodoc AUTHORS README TODO
+ use doc && dohtml Tcl.html
+}
diff --git a/dev-lang/jimtcl/metadata.xml b/dev-lang/jimtcl/metadata.xml
new file mode 100644
index 000000000000..7c5abccdbad6
--- /dev/null
+++ b/dev-lang/jimtcl/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>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">msteveb/jimtcl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/julia/Manifest b/dev-lang/julia/Manifest
new file mode 100644
index 000000000000..daeda8b42af3
--- /dev/null
+++ b/dev-lang/julia/Manifest
@@ -0,0 +1,14 @@
+AUX 63julia-gentoo.el 94 SHA256 20445070d924ecc8adbd242c032bcb7ef080898f8bca5533356be459d8f151f8 SHA512 03bcee53dc4064e9bee51ffeffd5de78cb6ae6acdbfb145933ee687a31684ced2ca39cb8d6c4543c638c18b1da52accfcca8b05bde71847dddfdb8923ceef99c WHIRLPOOL 57fe5f96d8b45f343b0245cca9623415eddbb61961ba495336cb209d3d8184169e0e4c424954633fb8b0a330107b449b47bcce0949a3b186b79c3cf5e6187349
+AUX julia-0.5.0-fix_build_system.patch 3154 SHA256 b5a763bf923f0d3e721f890324b1356009da329594e2cfd2b24ac683640c36df SHA512 3a01a6f5a29215c5f67bf8cf73856a8b2a7e82c0a0fb969beb82c73f4600bccdca25b885efaab0f72d5aaf4758fed1931d8ba99d6513c8ea8b48fd8101a641b4 WHIRLPOOL 034e7006dd5c0bb5789f9435a576fb4332437cd45715cc5a3c5e5f3ffe20319db328f359cf017b9802a7c8e11603c8066f634f343d63d066240dd143a390acc6
+AUX julia-0.6.0-fix_build_system.patch 3221 SHA256 a917c61acccaaf343dd375a91fbfd69ac33d05ce18a6bb377e72b0ac940fb5f1 SHA512 5cca475d1fb4864bd26326eb3a6da0338fc473de26057848ae3c15f49c0a3b338c7d4d26ce906307d7f6fac2ca08c8df8551fc3a33b7d86dfe859dae52e50e67 WHIRLPOOL 20aa478e9f988257a6ccb6024409c0f77a16033f901413690e71ef0f8f55fa8b25840c39846a16b77a2d605b68ccc3cf22367ca4f06f7c6786c11d8816483eda
+AUX julia-9999-fix_build_system.patch 2562 SHA256 d716c7c853149f61b15f149b42774f23cf79823897e006c8ee9f5187099dba5a SHA512 cdf084881f70890f523690eaae3e059ed09688156851dbf0c19878e8d6b76aee8a7144a9d604087c61c5db30634db530dfeba943ad170003439c8696715f677d WHIRLPOOL 5970636cf61d7626868e11bbe950b63421d405d5c6808699503d0cf4b26b852fef87685891fab4a9cb39392fb1a56ded895a002274e972f20a23c44f90301f27
+DIST julia-0.5.0-bundled.tar.gz 3461547 SHA256 3f4887fc2c0112666eb28b99f86bd8f7bd50615325e03135c546127885d46fbf SHA512 f8df589edf7d6b0e1e6553583c81d26fd256a79cacd79fbdd0ea1a9eea46b2466e3cbf055b5b7aa2d5c08318a5c35b9c09a30ac46a48689cc5c7245954b615c8 WHIRLPOOL b0137b2ed55aef7dc2c1a8693043ce63305bd2bbb5c2f959b2752fdb68189a506b027b467bfc0bb443fa4202f3735dd9410a257adec08302dfcaa0c9e4bfed98
+DIST julia-0.5.0.tar.gz 6326490 SHA256 bb62a14806e58f079ecd4941d4a18d1f1c1d89ab33c826d3a58a2244e364112e SHA512 6d76c5050da5050cd541c8407c35c8ecd60ad2ba61c4defcc5c084aaeb09e82ffed09be79a3453000bdf88efe56039948335bab21c8389389ffb8b29806568de WHIRLPOOL 7f0066cc7fa912fe7ce5b6bf43449d828b0b9dcf2ab57df6c13a0df17ee53351c6deb30e7b998dc00ff53c548074d79ed6288bc79507afebc4fd827b3e3c032f
+DIST julia-0.6.0-bundled.tar.gz 2097663 SHA256 2c5505baa76649c35b239aeed20a238427cad76ed4c93bc538f672a1f1ea18dd SHA512 50581da3628930b2d1b89d226f3551fa7b18ca23c322b7e93d1227cc0c3428f255a6087f9859ff2c592014407d53238e01a3847a727a87287fb8c7f679b022d1 WHIRLPOOL 6c07396cebd4799c66e1dc403185b330d5dd9816786d84de5a995782571ce31ceb249d46811540a1d7f87377a9db25b45572f148af4107feaef79b2aec13e89f
+DIST julia-0.6.0.tar.gz 5565427 SHA256 1c62bfce8075acf2b5b02355520a61210690324eceb021030681459d18a3a665 SHA512 da21b35eb2c682c0fb8720974a76759c51fe993f10e6af5ca4864fc7f0bb6c90d880b706eb798476c7228bae2db19ff0825add6a2abde2961f16a93a3050cb69 WHIRLPOOL 7bc1bb82d4ee112d258473d1200b99dfd1a48ae59d9a9b700e60484c6007e45aed3a6bc42b5ecf7d3eae2c61cab166a1086c8c16f5039abd073571cb83fde4a9
+EBUILD julia-0.5.0-r3.ebuild 4608 SHA256 68b4b9b7fa126118f9239a91c22d20106cc77ac8a7c41f56b77cec80099f86aa SHA512 f6aeb2ff72221fe598f3d0a71bc4abaaabbce232be76e321d6047a685e8b03d880697db9c7f924e0e857d021bd56305c1c51fdeaeb30e2fc8db4bffaf06bd9a5 WHIRLPOOL ab2125ba0662de485cbb73877b9208509f3525f91967ebf94ad94a1b6c9dec33399bf90d0365e7501ecc4ed8d22ecb1ff1f1684d04ef6059dfc2bfd26d716a5e
+EBUILD julia-0.6.0-r1.ebuild 4932 SHA256 03cef68ad27c3f762865f63be77de5cc6d52a2d945529afbc17db80678b8b41b SHA512 3b267af2d4098d97ea37cbd1f1bccb0d852fbd34402762c43d8653ba5af63035cc8082163a0e415dc629cec5636d04fa2f8e6a2e40661d341efe3576232113b5 WHIRLPOOL 734f1c50afc3d9613c50bd3adee44442c1d9498a18a395388ce5cbf64b798294ab91fc0064b70253ea5303fcae308d4dd8ce011f07821f4bfce455dd791e1c30
+EBUILD julia-9999.ebuild 3955 SHA256 25429f46dada75328675ea9c8376fa91fd3244b00e2803c64e24503bf81a4fa8 SHA512 4dd26a2c52b1e18247ac2b88e73e0be7d0e35551a60adaa146d1609bcc0f6b07a34c8c32a17718b2bfa28c492359469f94bf6b9459c3385716f16d10de35078b WHIRLPOOL 3f65c07a297e9cd05d86e93a4134df02a93d85f5b9d78feb9571664fb75f68de6054561161e16e4777c93699e793e8131dd7e63f8ca77eb28cc00d8d86cd96f7
+MISC ChangeLog 5211 SHA256 eefdbc43cc1a8d6cb36876f1565f348694dd13f30cb284a1fd49315abbebb17e SHA512 b0b71290e8c3bd81916ae7cb668c44022e05d37bfa2726e79dc8157984f005e7bd9688da578b512e7cda9c57c911e554e7667ff8820d30f5c441cd03319b1b5b WHIRLPOOL 55222ff71c0b4bd03158a3153f384676cb2ba4f3518bbc865b9aac42ef9ef07bcd134380e88cd0b971f3b3c9b4b69a153119f734c1f215dc92f22070777fcff8
+MISC ChangeLog-2015 2685 SHA256 0affb3e0cc478072c2b9c94aa1f02be5ce786fa165adc7be104cc2729e1910c3 SHA512 5c1c815a4a97101b85f2e17e6a6a3175c469216afd00906b01e0161893d710cf249ef5685b3abc8dede1003a39e5da348a62b61bcfa2710641532b17fb741973 WHIRLPOOL a1aba60d257e1bd160fc75ef7b0c5a9c4d1b1bc8efe4838ae7c78ca1ec4c42d69c86a11afed280cee13c163844fa609e28da38136a3104b03d1413cb3c202166
+MISC metadata.xml 1177 SHA256 cf9abf0eae417f8fd199260af3fd5ec01f47e210237ad2fbbdfb867813485c3f SHA512 1ed4c6477da40c7a79ee1f9efe1a33eb0ea61ee150a5a50b0c0e0241b0177541d7953d4043d159036f68d116aa41fa9413caa01b36c688fcdfb874e6627f234d WHIRLPOOL 7e418748fbc3a89670725bc9c716e9151870da4debb2b89e8d53e18a360ca4cf0522ba74cf348c343364a9c1a059ea0efd46d07b7d0d5c149731d9dd22423cde
diff --git a/dev-lang/julia/files/63julia-gentoo.el b/dev-lang/julia/files/63julia-gentoo.el
new file mode 100644
index 000000000000..6b60749020ca
--- /dev/null
+++ b/dev-lang/julia/files/63julia-gentoo.el
@@ -0,0 +1,2 @@
+(add-to-list 'load-path "@SITELISP@")
+(add-to-list 'auto-mode-alist '("\\.jl$" . julia-mode))
diff --git a/dev-lang/julia/files/julia-0.5.0-fix_build_system.patch b/dev-lang/julia/files/julia-0.5.0-fix_build_system.patch
new file mode 100644
index 000000000000..e54b9a48fbbf
--- /dev/null
+++ b/dev-lang/julia/files/julia-0.5.0-fix_build_system.patch
@@ -0,0 +1,85 @@
+diff --git a/Make.inc b/Make.inc
+index 651c9df..ff01872 100644
+--- a/Make.inc
++++ b/Make.inc
+@@ -389,7 +389,7 @@ ifneq ($(OS), WINNT)
+ JCXXFLAGS += -pedantic
+ endif
+ DEBUGFLAGS := -O0 -ggdb2 -DJL_DEBUG_BUILD -fstack-protector-all
+-SHIPFLAGS := -O3 -ggdb2 -falign-functions
++SHIPFLAGS := GENTOOCFLAGS
+ endif
+
+ ifeq ($(USECLANG),1)
+@@ -400,7 +400,7 @@ JCFLAGS := -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
+ JCPPFLAGS := -fasynchronous-unwind-tables
+ JCXXFLAGS := -pipe $(fPIC) -fno-rtti -pedantic
+ DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all
+-SHIPFLAGS := -O3 -g
++SHIPFLAGS := GENTOOCFLAGS
+ ifeq ($(OS), Darwin)
+ ifeq ($(USE_LIBCPP), 1)
+ CC += -stdlib=libc++ -mmacosx-version-min=10.7
+@@ -427,7 +427,7 @@ JCFLAGS := -std=gnu11 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
+ JCPPFLAGS :=
+ JCXXFLAGS := -pipe $(fPIC) -fno-rtti
+ DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all
+-SHIPFLAGS := -O3 -g -falign-functions
++SHIPFLAGS := GENTOOCFLAGS
+ endif
+
+ ifeq ($(USECCACHE), 1)
+diff --git a/doc/Makefile b/doc/Makefile
+index 0749d73..f4d49ec 100644
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -62,7 +62,7 @@ help:
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+ clean:
+- -rm -rf _build/*
++ @echo "Do not clean doc/_build/html. Just use it..."
+
+ cleanall: clean
+
+diff --git a/src/Makefile b/src/Makefile
+index d7ec864..61d2470 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -66,20 +66,8 @@ HEADERS := $(addprefix $(SRCDIR)/,julia.h julia_threads.h julia_internal.h optio
+
+ # In LLVM < 3.4, --ldflags includes both options and libraries, so use it both before and after --libs
+ # In LLVM >= 3.4, --ldflags has only options, and --system-libs has the libraries.
+-ifneq ($(USE_LLVM_SHLIB),1)
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) $(shell $(LLVM_CONFIG_HOST) --libs $(LLVM_LIBS)) $(shell $(LLVM_CONFIG_HOST) --ldflags) $(shell $(LLVM_CONFIG_HOST) --system-libs 2> /dev/null)
+-else
+-ifeq ($(LLVM_USE_CMAKE),1)
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM
+-else
+-ifeq ($(OS),WINNT)
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(LLVM_VER_SHORT)
+-else
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(shell $(LLVM_CONFIG_HOST) --version)
+-endif # OS == WINNT
+-endif # LLVM_USE_CMAKE == 1
++LLVMLINK = $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --libs) $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --system-libs)
+ FLAGS += -DLLVM_SHLIB
+-endif # USE_LLVM_SHLIB == 1
+
+ COMMON_LIBS := -L$(build_shlibdir) -L$(build_libdir) $(LIBUV) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(LLVMLINK) $(OSLIBS)
+ DEBUG_LIBS := $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp-debug.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport-debug.a $(COMMON_LIBS)
+--- a/deps/tools/jldownload
++++ b/deps/tools/jldownload
+@@ -5,9 +5,9 @@
+
+ CACHE_HOST=https://cache.julialang.org
+
+-WGET=$(which wget 2>/dev/null)
+-CURL=$(which curl 2>/dev/null)
+-FETCH=$(which fetch 2>/dev/null)
++WGET=/bin/true
++CURL=/bin/true
++FETCH=/bin/true
+
+ TIMEOUT=15 # seconds
+ WGET_OPTS="--no-check-certificate --tries=1 --timeout=$TIMEOUT"
diff --git a/dev-lang/julia/files/julia-0.6.0-fix_build_system.patch b/dev-lang/julia/files/julia-0.6.0-fix_build_system.patch
new file mode 100644
index 000000000000..6f8041617751
--- /dev/null
+++ b/dev-lang/julia/files/julia-0.6.0-fix_build_system.patch
@@ -0,0 +1,87 @@
+diff --git a/Make.inc b/Make.inc
+index e30c150..e6fdbb2 100644
+--- a/Make.inc
++++ b/Make.inc
+@@ -399,7 +399,7 @@ ifneq ($(OS), WINNT)
+ JCXXFLAGS += -pedantic
+ endif
+ DEBUGFLAGS := -O0 -ggdb2 -DJL_DEBUG_BUILD -fstack-protector-all
+-SHIPFLAGS := -O3 -ggdb2 -falign-functions
++SHIPFLAGS := GENTOOCFLAGS
+ endif
+
+ ifeq ($(USECLANG),1)
+@@ -410,7 +410,7 @@ JCFLAGS := -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
+ JCPPFLAGS := -fasynchronous-unwind-tables
+ JCXXFLAGS := -pipe $(fPIC) -fno-rtti -pedantic
+ DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all
+-SHIPFLAGS := -O3 -g
++SHIPFLAGS := GENTOOCFLAGS
+ ifeq ($(OS), Darwin)
+ ifeq ($(USE_LIBCPP), 1)
+ MACOSX_VERSION_MIN := 10.8
+@@ -439,7 +439,7 @@ JCFLAGS := -std=gnu11 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
+ JCPPFLAGS :=
+ JCXXFLAGS := -pipe $(fPIC) -fno-rtti
+ DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all
+-SHIPFLAGS := -O3 -g -falign-functions
++SHIPFLAGS := GENTOOCFLAGS
+ endif
+
+ ifeq ($(USECCACHE), 1)
+diff --git a/deps/tools/jldownload b/deps/tools/jldownload
+index ab4fd69..e2c2408 100755
+--- a/deps/tools/jldownload
++++ b/deps/tools/jldownload
+@@ -5,9 +5,9 @@
+
+ CACHE_HOST=https://cache.julialang.org
+
+-WGET=$(which wget 2>/dev/null)
+-CURL=$(which curl 2>/dev/null)
+-FETCH=$(which fetch 2>/dev/null)
++WGET=/bin/true
++CURL=/bin/true
++FETCH=/bin/true
+
+ TIMEOUT=15 # seconds
+ WGET_OPTS="--no-check-certificate --tries=1 --timeout=$TIMEOUT"
+diff --git a/doc/Makefile b/doc/Makefile
+index 743804d..e06dde0 100644
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -25,7 +25,7 @@ deps: UnicodeData.txt
+ $(JLCHECKSUM) UnicodeData.txt
+
+ clean:
+- -rm -rf _build/* deps/* docbuild.log UnicodeData.txt
++ @echo "Do not clean doc/_build/html. Just use it..."
+
+ cleanall: clean
+
+diff --git a/src/Makefile b/src/Makefile
+index f71f53d..7cdd23f 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -85,20 +85,8 @@ PUBLIC_HEADER_TARGETS := $(addprefix $(build_includedir)/julia/,$(notdir $(PUBLI
+
+ # In LLVM < 3.4, --ldflags includes both options and libraries, so use it both before and after --libs
+ # In LLVM >= 3.4, --ldflags has only options, and --system-libs has the libraries.
+-ifneq ($(USE_LLVM_SHLIB),1)
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) $(shell $(LLVM_CONFIG_HOST) --libs $(LLVM_LIBS)) $(shell $(LLVM_CONFIG_HOST) --ldflags) $(shell $(LLVM_CONFIG_HOST) --system-libs 2> /dev/null)
+-else
+-ifeq ($(LLVM_USE_CMAKE),1)
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM
+-else
+-ifeq ($(OS),WINNT)
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(LLVM_VER_SHORT)
+-else
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(shell $(LLVM_CONFIG_HOST) --version)
+-endif # OS == WINNT
+-endif # LLVM_USE_CMAKE == 1
++LLVMLINK = $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --libs) $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --system-libs)
+ FLAGS += -DLLVM_SHLIB
+-endif # USE_LLVM_SHLIB == 1
+
+ COMMON_LIBS := -L$(build_shlibdir) -L$(build_libdir) $(LIBUV) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(LLVMLINK) $(OSLIBS)
+ DEBUG_LIBS := $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp-debug.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport-debug.a $(COMMON_LIBS)
diff --git a/dev-lang/julia/files/julia-9999-fix_build_system.patch b/dev-lang/julia/files/julia-9999-fix_build_system.patch
new file mode 100644
index 000000000000..d7866f46b3e0
--- /dev/null
+++ b/dev-lang/julia/files/julia-9999-fix_build_system.patch
@@ -0,0 +1,64 @@
+diff --git a/Make.inc b/Make.inc
+index e77681669..bc17c6fd0 100644
+--- a/Make.inc
++++ b/Make.inc
+@@ -399,7 +399,7 @@ ifneq ($(OS), WINNT)
+ JCXXFLAGS += -pedantic
+ endif
+ DEBUGFLAGS := -O0 -ggdb2 -DJL_DEBUG_BUILD -fstack-protector-all
+-SHIPFLAGS := -O3 -ggdb2 -falign-functions
++SHIPFLAGS := GENTOOCFLAGS
+ endif
+
+ ifeq ($(USECLANG),1)
+@@ -410,7 +410,7 @@ JCFLAGS := -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
+ JCPPFLAGS := -fasynchronous-unwind-tables
+ JCXXFLAGS := -pipe $(fPIC) -fno-rtti -pedantic
+ DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all
+-SHIPFLAGS := -O3 -g
++SHIPFLAGS := GENTOOCFLAGS
+ ifeq ($(OS), Darwin)
+ ifeq ($(USE_LIBCPP), 1)
+ MACOSX_VERSION_MIN := 10.8
+@@ -439,7 +439,7 @@ JCFLAGS := -std=gnu11 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
+ JCPPFLAGS :=
+ JCXXFLAGS := -pipe $(fPIC) -fno-rtti
+ DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector-all
+-SHIPFLAGS := -O3 -g -falign-functions
++SHIPFLAGS := GENTOOCFLAGS
+ endif
+
+ ifeq ($(USECCACHE), 1)
+diff --git a/doc/Makefile b/doc/Makefile
+index 743804d8b..e06dde030 100644
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -25,7 +25,7 @@ deps: UnicodeData.txt
+ $(JLCHECKSUM) UnicodeData.txt
+
+ clean:
+- -rm -rf _build/* deps/* docbuild.log UnicodeData.txt
++ @echo "Do not clean doc/_build/html. Just use it..."
+
+ cleanall: clean
+
+diff --git a/src/Makefile b/src/Makefile
+index d3ff98900..9c4d889b4 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -87,14 +87,7 @@ PUBLIC_HEADERS += $(LIBUV_INC)/uv*
+ endif
+ PUBLIC_HEADER_TARGETS := $(addprefix $(build_includedir)/julia/,$(notdir $(PUBLIC_HEADERS)))
+
+-# In LLVM < 3.4, --ldflags includes both options and libraries, so use it both before and after --libs
+-# In LLVM >= 3.4, --ldflags has only options, and --system-libs has the libraries.
+-ifneq ($(USE_LLVM_SHLIB),1)
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) $(shell $(LLVM_CONFIG_HOST) --libs $(LLVM_LIBS)) $(shell $(LLVM_CONFIG_HOST) --ldflags) $(shell $(LLVM_CONFIG_HOST) --system-libs 2> /dev/null)
+-else
+-LLVMLINK += $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM
+-FLAGS += -DLLVM_SHLIB
+-endif # USE_LLVM_SHLIB == 1
++LLVMLINK = $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --libs) $(call exec,$(LLVM_CONFIG) --ldflags) $(call exec,$(LLVM_CONFIG) --system-libs)
+
+ COMMON_LIBS := -L$(build_shlibdir) -L$(build_libdir) $(LIBUV) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(LLVMLINK) $(OSLIBS)
+ DEBUG_LIBS := $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp-debug.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport-debug.a $(COMMON_LIBS)
diff --git a/dev-lang/julia/julia-0.5.0-r3.ebuild b/dev-lang/julia/julia-0.5.0-r3.ebuild
new file mode 100644
index 000000000000..4c4fc298ecfe
--- /dev/null
+++ b/dev-lang/julia/julia-0.5.0-r3.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+RESTRICT="test"
+
+inherit elisp-common eutils multilib pax-utils toolchain-funcs
+
+DESCRIPTION="High-performance programming language for technical computing"
+HOMEPAGE="https://julialang.org/"
+SRC_URI="
+ https://github.com/JuliaLang/${PN}/releases/download/v${PV}/${P}.tar.gz
+ https://dev.gentoo.org/~tamiko/distfiles/${P}-bundled.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="emacs"
+
+RDEPEND="
+ dev-lang/R:0=
+ dev-libs/double-conversion:0=
+ dev-libs/gmp:0=
+ <dev-libs/libgit2-0.25:0=
+ dev-libs/mpfr:0=
+ dev-libs/openspecfun
+ sci-libs/arpack:0=
+ sci-libs/camd:0=
+ sci-libs/cholmod:0=
+ sci-libs/fftw:3.0=[threads]
+ sci-libs/openlibm:0=
+ sci-libs/spqr:0=
+ sci-libs/umfpack:0=
+ sci-mathematics/glpk:0=
+ >=sys-devel/llvm-3.9:0=
+ >=sys-libs/libunwind-1.1:7=
+ sys-libs/readline:0=
+ sys-libs/zlib:0=
+ >=virtual/blas-3.6
+ virtual/lapack
+ emacs? ( app-emacs/ess )"
+
+DEPEND="${RDEPEND}
+ dev-util/patchelf
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.5.0-fix_build_system.patch
+)
+
+src_prepare() {
+ mkdir deps/srccache || die
+ mv "${WORKDIR}"/bundled/* deps/srccache || die
+ rmdir "${WORKDIR}"/bundled || die
+
+ epatch "${PATCHES[@]}"
+
+ eapply_user
+
+ # Sledgehammer:
+ # - prevent fetching of bundled stuff in compile and install phase
+ # - respect CFLAGS
+ # - respect EPREFIX and Gentoo specific paths
+ # - fix BLAS and LAPACK link interface
+
+ sed -i \
+ -e 's|$(JLDOWNLOAD)|${EPREFIX}/bin/true|' \
+ -e 's|git submodule|${EPREFIX}/bin/true|g' \
+ -e "s|GENTOOCFLAGS|${CFLAGS}|g" \
+ -e "s|/usr/include|${EPREFIX%/}/usr/include|g" \
+ deps/Makefile || die
+
+ local libblas="$($(tc-getPKG_CONFIG) --libs-only-l blas)"
+ libblas="${libblas%% *}"
+ libblas="lib${libblas#-l}"
+ local liblapack="$($(tc-getPKG_CONFIG) --libs-only-l lapack)"
+ liblapack="${liblapack%% *}"
+ liblapack="lib${liblapack#-l}"
+
+ sed -i \
+ -e "s|\(JULIA_EXECUTABLE = \)\(\$(JULIAHOME)/julia\)|\1 LD_LIBRARY_PATH=\$(BUILD)/$(get_libdir) \2|" \
+ -e "s|GENTOOCFLAGS|${CFLAGS}|g" \
+ -e "s|LIBDIR = lib|LIBDIR = $(get_libdir)|" \
+ -e "s|/usr/lib|${EPREFIX}/usr/$(get_libdir)|" \
+ -e "s|/usr/include|${EPREFIX}/usr/include|" \
+ -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|" \
+ -e "s|^JULIA_COMMIT = .*|JULIA_COMMIT = v${PV}|" \
+ -e "s|-lblas|$($(tc-getPKG_CONFIG) --libs blas)|" \
+ -e "s|= libblas|= ${libblas}|" \
+ -e "s|-llapack|$($(tc-getPKG_CONFIG) --libs lapack)|" \
+ -e "s|= liblapack|= ${liblapack}|" \
+ Make.inc || die
+
+ sed -i \
+ -e "s|,lib)|,$(get_libdir))|g" \
+ -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|g" \
+ Makefile || die
+
+ sed -i \
+ -e "s|ar -rcs|$(tc-getAR) -rcs|g" \
+ src/Makefile || die
+}
+
+src_configure() {
+ # julia does not play well with the system versions of
+ # dsfmt, libuv, pcre2 and utf8proc
+ cat <<-EOF > Make.user
+ USE_SYSTEM_DSFMT=0
+ USE_SYSTEM_LIBUV=0
+ USE_SYSTEM_PCRE=0
+ USE_SYSTEM_RMATH=0
+ USE_SYSTEM_UTF8PROC=0
+ USE_LLVM_SHLIB=1
+ USE_SYSTEM_ARPACK=1
+ USE_SYSTEM_BLAS=1
+ USE_SYSTEM_FFTW=1
+ USE_SYSTEM_GMP=1
+ USE_SYSTEM_GRISU=1
+ USE_SYSTEM_LAPACK=1
+ USE_SYSTEM_LIBGIT2=1
+ USE_SYSTEM_LIBM=1
+ USE_SYSTEM_LIBUNWIND=1
+ USE_SYSTEM_LLVM=1
+ USE_SYSTEM_MPFR=1
+ USE_SYSTEM_OPENLIBM=1
+ USE_SYSTEM_OPENSPECFUN=1
+ USE_SYSTEM_PATCHELF=1
+ USE_SYSTEM_READLINE=1
+ USE_SYSTEM_SUITESPARSE=1
+ USE_SYSTEM_ZLIB=1
+ VERBOSE=1
+ libdir="${EROOT}/usr/$(get_libdir)"
+ EOF
+
+}
+
+src_compile() {
+
+ # Julia accesses /proc/self/mem on Linux
+ addpredict /proc/self/mem
+
+ emake cleanall
+ emake julia-release \
+ prefix="/usr" DESTDIR="${D}" CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+ pax-mark m $(file usr/bin/julia-* | awk -F : '/ELF/ {print $1}')
+ emake
+ use emacs && elisp-compile contrib/julia-mode.el
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ emake install \
+ prefix="/usr" DESTDIR="${D}" CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+ cat > 99julia <<-EOF
+ LDPATH=${EROOT%/}/usr/$(get_libdir)/julia
+ EOF
+ doenvd 99julia
+
+ if use emacs; then
+ elisp-install "${PN}" contrib/julia-mode.el
+ elisp-site-file-install "${FILESDIR}"/63julia-gentoo.el
+ fi
+ dodoc README.md
+
+ mv "${ED}"/usr/etc/julia "${ED}"/etc || die
+ rmdir "${ED}"/usr/etc || die
+ rmdir "${ED}"/usr/libexec || die
+ mv "${ED}"/usr/share/doc/julia/{examples,html} \
+ "${ED}"/usr/share/doc/${PF} || die
+ rmdir "${ED}"/usr/share/doc/julia || die
+ if [[ $(get_libdir) != lib ]]; then
+ mkdir -p "${ED}"/usr/$(get_libdir) || die
+ mv "${ED}"/usr/lib/julia "${ED}"/usr/$(get_libdir)/julia || die
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/julia/julia-0.6.0-r1.ebuild b/dev-lang/julia/julia-0.6.0-r1.ebuild
new file mode 100644
index 000000000000..c9b00deb022e
--- /dev/null
+++ b/dev-lang/julia/julia-0.6.0-r1.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+RESTRICT="test"
+
+inherit eutils multilib pax-utils toolchain-funcs
+
+DESCRIPTION="High-performance programming language for technical computing"
+HOMEPAGE="https://julialang.org/"
+SRC_URI="
+ https://github.com/JuliaLang/${PN}/releases/download/v${PV}/${P}.tar.gz
+ https://dev.gentoo.org/~tamiko/distfiles/${P}-bundled.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ dev-libs/double-conversion:0=
+ dev-libs/gmp:0=
+ <dev-libs/libgit2-0.25:0=
+ dev-libs/mpfr:0=
+ dev-libs/openspecfun
+ sci-libs/arpack:0=
+ sci-libs/camd:0=
+ sci-libs/cholmod:0=
+ sci-libs/fftw:3.0=[threads]
+ sci-libs/openlibm:0=
+ sci-libs/spqr:0=
+ >=dev-libs/libpcre2-10.23:0=[jit]
+ sci-libs/umfpack:0=
+ sci-mathematics/glpk:0=
+ sys-devel/llvm:4=
+ >=sys-libs/libunwind-1.1:7=
+ <sys-libs/libunwind-1.2.1
+ sys-libs/readline:0=
+ sys-libs/zlib:0=
+ >=virtual/blas-3.6
+ virtual/lapack"
+
+DEPEND="${RDEPEND}
+ dev-vcs/git
+ dev-util/patchelf
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix_build_system.patch
+)
+
+src_prepare() {
+ mv "${WORKDIR}"/bundled/UnicodeData.txt doc || die
+ mkdir deps/srccache || die
+ mv "${WORKDIR}"/bundled/* deps/srccache || die
+ rmdir "${WORKDIR}"/bundled || die
+
+ default
+
+ # Sledgehammer:
+ # - prevent fetching of bundled stuff in compile and install phase
+ # - respect CFLAGS
+ # - respect EPREFIX and Gentoo specific paths
+ # - fix BLAS and LAPACK link interface
+
+ sed -i \
+ -e 's|$(JLDOWNLOAD)|${EPREFIX}/bin/true|' \
+ -e 's|git submodule|${EPREFIX}/bin/true|g' \
+ -e "s|GENTOOCFLAGS|${CFLAGS}|g" \
+ -e "s|/usr/include|${EPREFIX%/}/usr/include|g" \
+ deps/Makefile || die
+
+ local libblas="$($(tc-getPKG_CONFIG) --libs-only-l blas)"
+ libblas="${libblas%% *}"
+ libblas="lib${libblas#-l}"
+ local liblapack="$($(tc-getPKG_CONFIG) --libs-only-l lapack)"
+ liblapack="${liblapack%% *}"
+ liblapack="lib${liblapack#-l}"
+
+ sed -i \
+ -e "s|\(JULIA_EXECUTABLE = \)\(\$(JULIAHOME)/julia\)|\1 LD_LIBRARY_PATH=\$(BUILD)/$(get_libdir) \2|" \
+ -e "s|GENTOOCFLAGS|${CFLAGS}|g" \
+ -e "s|LIBDIR = lib|LIBDIR = $(get_libdir)|" \
+ -e "s|/usr/lib|${EPREFIX}/usr/$(get_libdir)|" \
+ -e "s|/usr/include|${EPREFIX}/usr/include|" \
+ -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|" \
+ -e "s|^JULIA_COMMIT = .*|JULIA_COMMIT = v${PV}|" \
+ -e "s|-lblas|$($(tc-getPKG_CONFIG) --libs blas)|" \
+ -e "s|= libblas|= ${libblas}|" \
+ -e "s|-llapack|$($(tc-getPKG_CONFIG) --libs lapack)|" \
+ -e "s|= liblapack|= ${liblapack}|" \
+ Make.inc || die
+
+ sed -i \
+ -e "s|,lib)|,$(get_libdir))|g" \
+ -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|g" \
+ Makefile || die
+
+ sed -i \
+ -e "s|ar -rcs|$(tc-getAR) -rcs|g" \
+ src/Makefile || die
+
+ # disable doc install starting git fetching
+ sed -i -e 's~install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index.html~install: $(build_depsbindir)/stringreplace~' Makefile || die
+}
+
+src_configure() {
+ # julia does not play well with the system versions of dsfmt, libuv,
+ # and utf8proc
+
+ # USE_SYSTEM_LIBM=0 implies using external openlibm
+ cat <<-EOF > Make.user
+ USE_SYSTEM_DSFMT=0
+ USE_SYSTEM_LIBUV=0
+ USE_SYSTEM_PCRE=1
+ USE_SYSTEM_RMATH=0
+ USE_SYSTEM_UTF8PROC=0
+ USE_LLVM_SHLIB=1
+ USE_SYSTEM_ARPACK=1
+ USE_SYSTEM_BLAS=1
+ USE_SYSTEM_FFTW=1
+ USE_SYSTEM_GMP=1
+ USE_SYSTEM_GRISU=1
+ USE_SYSTEM_LAPACK=1
+ USE_SYSTEM_LIBGIT2=1
+ USE_SYSTEM_LIBM=0
+ USE_SYSTEM_LIBUNWIND=1
+ USE_SYSTEM_LLVM=1
+ USE_SYSTEM_MPFR=1
+ USE_SYSTEM_OPENLIBM=1
+ USE_SYSTEM_OPENSPECFUN=1
+ USE_SYSTEM_PATCHELF=1
+ USE_SYSTEM_READLINE=1
+ USE_SYSTEM_SUITESPARSE=1
+ USE_SYSTEM_ZLIB=1
+ VERBOSE=1
+ libdir="${EROOT}/usr/$(get_libdir)"
+ EOF
+
+}
+
+src_compile() {
+
+ # Julia accesses /proc/self/mem on Linux
+ addpredict /proc/self/mem
+
+ emake cleanall
+ emake VERBOSE=1 julia-release \
+ prefix="/usr" DESTDIR="${D}" CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+ pax-mark m $(file usr/bin/julia-* | awk -F : '/ELF/ {print $1}')
+ emake
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ # Julia is special. It tries to find a valid git repository (that would
+ # normally be cloned during compilation/installation). Just make it
+ # happy...
+ git init && \
+ git config --local user.email "whatyoudoing@example.com" && \
+ git config --local user.name "Whyyyyyy" && \
+ git commit -a --allow-empty -m "initial" || die "git failed"
+
+ emake install \
+ prefix="/usr" DESTDIR="${D}" CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+ cat > 99julia <<-EOF
+ LDPATH=${EROOT%/}/usr/$(get_libdir)/julia
+ EOF
+ doenvd 99julia
+
+ dodoc README.md
+
+ mv "${ED}"/usr/etc/julia "${ED}"/etc || die
+ rmdir "${ED}"/usr/etc || die
+ mv "${ED}"/usr/share/doc/julia/{examples,html} \
+ "${ED}"/usr/share/doc/${PF} || die
+ rmdir "${ED}"/usr/share/doc/julia || die
+ if [[ $(get_libdir) != lib ]]; then
+ mkdir -p "${ED}"/usr/$(get_libdir) || die
+ mv "${ED}"/usr/lib/julia "${ED}"/usr/$(get_libdir)/julia || die
+ fi
+}
diff --git a/dev-lang/julia/julia-9999.ebuild b/dev-lang/julia/julia-9999.ebuild
new file mode 100644
index 000000000000..fd0c49b3d426
--- /dev/null
+++ b/dev-lang/julia/julia-9999.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+RESTRICT="test"
+
+inherit git-r3 elisp-common eutils multilib pax-utils toolchain-funcs
+
+DESCRIPTION="High-performance programming language for technical computing"
+HOMEPAGE="https://julialang.org/"
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/JuliaLang/julia.git"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="
+ dev-libs/double-conversion:0=
+ dev-libs/gmp:0=
+ dev-libs/libgit2:0=
+ dev-libs/mpfr:0=
+ dev-libs/openspecfun
+ sci-libs/arpack:0=
+ sci-libs/camd:0=
+ sci-libs/cholmod:0=
+ sci-libs/fftw:3.0=[threads]
+ sci-libs/openlibm:0=
+ sci-libs/spqr:0=
+ >=dev-libs/libpcre2-10.23:0=[jit]
+ sci-libs/umfpack:0=
+ sci-mathematics/glpk:0=
+ >=sys-devel/llvm-4.0.0:=
+ >=sys-libs/libunwind-1.1:7=
+ sys-libs/readline:0=
+ sys-libs/zlib:0=
+ >=virtual/blas-3.6
+ virtual/lapack"
+
+DEPEND="${RDEPEND}
+ dev-util/patchelf
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-9999-fix_build_system.patch
+)
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+
+ eapply_user
+
+ # Sledgehammer:
+ # - respect CFLAGS
+ # - respect EPREFIX and Gentoo specific paths
+ # - fix BLAS and LAPACK link interface
+
+ sed -i \
+ -e "s|GENTOOCFLAGS|${CFLAGS}|g" \
+ -e "s|/usr/include|${EPREFIX%/}/usr/include|g" \
+ deps/Makefile || die
+
+ local libblas="$($(tc-getPKG_CONFIG) --libs-only-l blas)"
+ libblas="${libblas%% *}"
+ libblas="lib${libblas#-l}"
+ local liblapack="$($(tc-getPKG_CONFIG) --libs-only-l lapack)"
+ liblapack="${liblapack%% *}"
+ liblapack="lib${liblapack#-l}"
+
+ sed -i \
+ -e "s|\(JULIA_EXECUTABLE = \)\(\$(JULIAHOME)/julia\)|\1 LD_LIBRARY_PATH=\$(BUILD)/$(get_libdir) \2|" \
+ -e "s|GENTOOCFLAGS|${CFLAGS}|g" \
+ -e "s|LIBDIR = lib|LIBDIR = $(get_libdir)|" \
+ -e "s|/usr/lib|${EPREFIX}/usr/$(get_libdir)|" \
+ -e "s|/usr/include|${EPREFIX}/usr/include|" \
+ -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|" \
+ -e "s|^JULIA_COMMIT = .*|JULIA_COMMIT = v${PV}|" \
+ -e "s|-lblas|$($(tc-getPKG_CONFIG) --libs blas)|" \
+ -e "s|= libblas|= ${libblas}|" \
+ -e "s|-llapack|$($(tc-getPKG_CONFIG) --libs lapack)|" \
+ -e "s|= liblapack|= ${liblapack}|" \
+ Make.inc || die
+
+ sed -i \
+ -e "s|,lib)|,$(get_libdir))|g" \
+ -e "s|\$(BUILD)/lib|\$(BUILD)/$(get_libdir)|g" \
+ Makefile || die
+
+ sed -i \
+ -e "s|ar -rcs|$(tc-getAR) -rcs|g" \
+ src/Makefile || die
+}
+
+src_configure() {
+ # julia does not play well with the system versions of dsfmt, libuv,
+ # and utf8proc
+
+ # USE_SYSTEM_LIBM=0 implies using external openlibm
+ cat <<-EOF > Make.user
+ USE_SYSTEM_DSFMT=0
+ USE_SYSTEM_LIBUV=0
+ USE_SYSTEM_PCRE=1
+ USE_SYSTEM_RMATH=0
+ USE_SYSTEM_UTF8PROC=0
+ USE_LLVM_SHLIB=1
+ USE_SYSTEM_ARPACK=1
+ USE_SYSTEM_BLAS=1
+ USE_SYSTEM_FFTW=1
+ USE_SYSTEM_GMP=1
+ USE_SYSTEM_GRISU=1
+ USE_SYSTEM_LAPACK=1
+ USE_SYSTEM_LIBGIT2=1
+ USE_SYSTEM_LIBM=0
+ USE_SYSTEM_LIBUNWIND=1
+ USE_SYSTEM_LLVM=1
+ USE_SYSTEM_MPFR=1
+ USE_SYSTEM_OPENLIBM=1
+ USE_SYSTEM_OPENSPECFUN=1
+ USE_SYSTEM_PATCHELF=1
+ USE_SYSTEM_READLINE=1
+ USE_SYSTEM_SUITESPARSE=1
+ USE_SYSTEM_ZLIB=1
+ VERBOSE=1
+ libdir="${EROOT}/usr/$(get_libdir)"
+ EOF
+
+}
+
+src_compile() {
+
+ # Julia accesses /proc/self/mem on Linux
+ addpredict /proc/self/mem
+
+ emake cleanall
+ emake VERBOSE=1 julia-release \
+ prefix="/usr" DESTDIR="${D}" CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+ pax-mark m $(file usr/bin/julia-* | awk -F : '/ELF/ {print $1}')
+ emake
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ emake install \
+ prefix="/usr" DESTDIR="${D}" CC="$(tc-getCC)" CXX="$(tc-getCXX)"
+ cat > 99julia <<-EOF
+ LDPATH=${EROOT%/}/usr/$(get_libdir)/julia
+ EOF
+ doenvd 99julia
+
+ dodoc README.md
+
+ mv "${ED}"/usr/etc/julia "${ED}"/etc || die
+ rmdir "${ED}"/usr/etc || die
+ mv "${ED}"/usr/share/doc/julia/{examples,html} \
+ "${ED}"/usr/share/doc/${PF} || die
+ rmdir "${ED}"/usr/share/doc/julia || die
+ if [[ $(get_libdir) != lib ]]; then
+ mkdir -p "${ED}"/usr/$(get_libdir) || die
+ mv "${ED}"/usr/lib/julia "${ED}"/usr/$(get_libdir)/julia || die
+ fi
+}
diff --git a/dev-lang/julia/metadata.xml b/dev-lang/julia/metadata.xml
new file mode 100644
index 000000000000..15cc66a9d03c
--- /dev/null
+++ b/dev-lang/julia/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="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Julia is a high-level, high-performance dynamic programming language for
+ technical computing, with syntax that is familiar to users of other
+ technical computing environments. It provides a sophisticated
+ compiler, distributed parallel execution, numerical accuracy, and an
+ extensive mathematical function library. The library, mostly written
+ in Julia itself, also integrates mature, best-of-breed C and Fortran
+ libraries for linear algebra, random number generation, FFTs, and
+ string processing. Julia programs are organized around defining
+ functions, and overloading them for different combinations of
+ argument types (which can also be user-defined).
+</longdescription>
+ <upstream>
+ <remote-id type="github">JuliaLang/julia</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/jwasm/Manifest b/dev-lang/jwasm/Manifest
new file mode 100644
index 000000000000..0cab26ed8bd1
--- /dev/null
+++ b/dev-lang/jwasm/Manifest
@@ -0,0 +1,6 @@
+AUX jwasm-2.11-types-test.patch 1761 SHA256 aec5aab1ffe275da2a4c6c825ca1372934a6046d673405fe420b306dbfe6189e SHA512 0a4f3e613c8e724939ce9e23f8f4ce10ca89bf6c1579929719b3ccad62ac66cceecc3f8799c20c2875b7d4dcc7390bf0e4ca64aa08aab0b39bd7a4ab381b150b WHIRLPOOL b835c0122306bf35559d0b4d74472c1e4717e89933abd4d9742f4d588519d2616fcdb5d1ae22bcf235cd231135ec1bfdbd294dbd60d61fc74ddf1528c2cc93a6
+DIST JWasm211as.zip 1004993 SHA256 6c7b8b4bc576a4e9d50a452f1b3117bb67e6043c34ac971f3cb250d2c2a55ae4 SHA512 3e48e09955ccf8e641b36f54c93c3f36b275a0e662013a17dfd1f52a3e2872eff54be869596d0e72bdb2cc7e59c8fd1dee13477bf89a59bba4b212959cff9006 WHIRLPOOL 2b2bfd100b86dc749e77a0c99d77adf355a76ffbb0fee5464dd57e506c9178338368a3be7240c46a78c66f573ce25c8d7e1d0a4bedd388268b2932af7c5efd85
+EBUILD jwasm-2.11a.ebuild 810 SHA256 791ee8b1dbf50b94f9aee17252dc17588117da1c7c60517b2a03b86a64d0ab17 SHA512 074c5966954c12ce0faf29133f8b3d1a442b1ae889eaae16ef3dcc88716f900773dafac87949b129c7a0a05cdc7bed6a90b333293ce0fd15483aa39f5375993b WHIRLPOOL 7537178c7dfc49c30a65dc584097756c647b7ddac85d5ab5d9aeb5e634785cc870f3273dc8481b9c57b745ee394ad84b92abf93d30c7d267d48af2e748147ba2
+MISC ChangeLog 2538 SHA256 07528c4c7d1a212b9e06fe99ec75bf69bcd3116520eb3439c92983aace33fb3f SHA512 6f44007127294fa2e8ff53a904c1c3e011e013ea105b148271f28a033c9b7432260665c2135822ca3a5a72e910f7907fff757646748d979ba6b1aa9a0fe44451 WHIRLPOOL 4f92f928f07db8a617c6515465f212e45edde5e93276dc86b7978fcc60c0e64e23096ef1c3f540784f787680ca4e8f05c1420b393321cda97ecd0bb9073f3b7e
+MISC ChangeLog-2015 927 SHA256 63dcea6efd6cbdc3fc6277f52f137e3a37eb8a2edf25bf4e1ec934ea7a15dc99 SHA512 4a150958968072d5b87058218b7cc56a9f813cfd3d2dcd4b4f109f5378d3cf2692a7c7fbf2fb96cea9c3d8b246a8c62be93867236898c4854f76b80c1f2c5ce4 WHIRLPOOL d96aa9203519bd2c072583e98bd1854d25cbdbb7951c93db72b54c5ded20075f7a90f3e30cf995e8d1a6dbf6c44f2e9c4eb86450dcaf5bc9baa278c7af21e1b2
+MISC metadata.xml 374 SHA256 47f12455f71eac0ee9ea6bf6b460e0e1538959b6d3b139483d4bff3deafd767e SHA512 49b5ffdd4290e014be34ad29b840053768a876ad60e58130224df77e44f87082b6c153d5dbb4c4d7116aa530222effdb95808711c0e9865720500632f7e7d895 WHIRLPOOL cb0631b6853ae18c5be721b21a01a924429c1cc27e91c0dd7252e95a2cb1084cb79be05605cb28e404ed8a5d056f83324cd94156e7f9b919b315b0f24b23ae08
diff --git a/dev-lang/jwasm/files/jwasm-2.11-types-test.patch b/dev-lang/jwasm/files/jwasm-2.11-types-test.patch
new file mode 100644
index 000000000000..047d1d005510
--- /dev/null
+++ b/dev-lang/jwasm/files/jwasm-2.11-types-test.patch
@@ -0,0 +1,58 @@
+From b19339d4356efbd9b49f73e67ed7c09b9dad4b75 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu, 16 May 2013 12:24:17 +0300
+Subject: [PATCH 1/2] types: add sanity tests for used sizes
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ GccUnix.mak | 2 +-
+ checks.c | 26 ++++++++++++++++++++++++++
+ 2 files changed, 27 insertions(+), 1 deletion(-)
+ create mode 100644 checks.c
+
+diff --git a/gccmod.inc b/gccmod.inc
+index 70f388a..86cb2bf 100644
+--- a/gccmod.inc
++++ b/gccmod.inc
+@@ -6,6 +6,7 @@ $(OUTD)/atofloat.o \
+ $(OUTD)/backptch.o \
+ $(OUTD)/bin.o \
+ $(OUTD)/branch.o \
++$(OUTD)/checks.o \
+ $(OUTD)/cmdline.o \
+ $(OUTD)/codegen.o \
+ $(OUTD)/coff.o \
+diff --git a/checks.c b/checks.c
+new file mode 100644
+index 0000000..af8630f
+--- /dev/null
++++ b/checks.c
+@@ -0,0 +1,26 @@
++/****************************************************************************
++*
++* This code is Public Domain.
++*
++* ========================================================================
++*
++* Description: make sure "inttype.h" filelds are of the desired size.
++*
++****************************************************************************/
++
++#include "inttype.h"
++
++/* fails to compile if type sizes are of unexpected size */
++static void validate_inttype_sizes()
++{
++/* try to create */
++#define T_IS_SIZE(__type, __expected_size, __test_name) \
++ char __test_name[2 * (sizeof (__type) == (__expected_size)) - 1];
++
++ T_IS_SIZE(uint_8, 1, size_of_uint_8_must_be_1_byte);
++ T_IS_SIZE(uint_16, 2, size_of_uint_16_must_be_2_bytes);
++ T_IS_SIZE(uint_32, 4, size_of_uint_32_must_be_4_bytes);
++ T_IS_SIZE(uint_64, 8, size_of_uint_64_must_be_8_bytes);
++
++#undef T_IS_SIZE
++}
+--
+1.8.2.1
diff --git a/dev-lang/jwasm/jwasm-2.11a.ebuild b/dev-lang/jwasm/jwasm-2.11a.ebuild
new file mode 100644
index 000000000000..0eab110f0fbb
--- /dev/null
+++ b/dev-lang/jwasm/jwasm-2.11a.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs versionator
+
+# 2.10 -> 210s
+MY_PN=JWasm
+MY_PV="$(delete_version_separator 1)s"
+MY_P="${MY_PN}${MY_PV}"
+
+DESCRIPTION="MASM-compatible TASM-similar assembler (fork of Wasm)"
+HOMEPAGE="https://sourceforge.net/projects/jwasm/"
+SRC_URI="mirror://sourceforge/${PN}/JWasm%20Source%20Code/${MY_P}.zip"
+LICENSE="Watcom-1.0"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND=""
+DEPEND=""
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.11-types-test.patch
+ # don't strip binary
+ sed -i GccUnix.mak -e 's/ -s / /g' || die
+}
+
+src_compile() {
+ emake -f GccUnix.mak CC="$(tc-getCC) ${CFLAGS} ${LDFLAGS}"
+}
+
+src_install() {
+ dobin GccUnixR/jwasm
+ dodoc *.txt Doc/*.txt
+}
diff --git a/dev-lang/jwasm/metadata.xml b/dev-lang/jwasm/metadata.xml
new file mode 100644
index 000000000000..d8af4656c230
--- /dev/null
+++ b/dev-lang/jwasm/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>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ <description>Primary Maintainer</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">jwasm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/lazarus/Manifest b/dev-lang/lazarus/Manifest
new file mode 100644
index 000000000000..7f9579a67658
--- /dev/null
+++ b/dev-lang/lazarus/Manifest
@@ -0,0 +1,10 @@
+AUX lazarus-0.9.26-fpcsrc.patch 407 SHA256 bff38dbaf47dd07bf91ae12c7babe0a9254dcb9ad360829649ac2df056e88730 SHA512 823d9ba2041f97c39d8ea5f49cb02f68d8c98da95d0a479cc65a638365e2adafd1c5645fa6846720af18198834958f37b0cc0d92f38023ccdaf40ec8dc848f64 WHIRLPOOL e5f01b4302346f662b79121bffc25f215b238495a3340c75408cfdf4d4edec2987da859efc539fc27b15e5c4d2caa02a4e567c5482ba7344c68a6eaf1f6ccbb3
+DIST lazarus-1.0.12-0.tar.gz 47687878 SHA256 542ddd60f4a404d7020ed6962a545db910a1490588a70a26ed60a2b05b80177e SHA512 2a106c4bff2135ace815f789057f25fea1902edc972503e883547d7cc6d50b585ae54676cba734cce616064864ce535b3a4fcd7892763d15aafdf262dbe24293 WHIRLPOOL 6e0178d91dceef67c8419955f8e206223c76292acedabcf4370a47d3590d6ad2cfb0902e714deba0051e77199e7988f6c4f16358209dc0b0b9c496fb804153f0
+DIST lazarus-1.6.2-0.tar.gz 55949169 SHA256 eae73ac1d50456d191e13601ea5c333a8816732f6fcd0b849c3685da869cc1ef SHA512 9fb428ac5b38c0c37f909aaf06a43343f3231e9209318faf565cc08ac498c0dfb136a2f6266d437f93b5cf81e6281d747a234fef399fc6d2cb044b13397562d9 WHIRLPOOL 62917479986e85d68af5c73c77a5d1b05262f48bfab08f23b6ef8144ae04bb6b4d6935446a3d9cb582a404452eae024f947680550591ed70f0ae3bf0babbfe99
+DIST lazarus-1.6.4-0.tar.gz 57180961 SHA256 336654c5ad32244e64a56511108965b6b8eb25fe5882f61b2c15a24d8435a5e2 SHA512 d7d498483ef9e1eebd0d8ca2325d1984cb1297837ebe2f9547e67f26fc049c2168e2feeac739b8403c08a8251040e9161c962d25951545384ffbdbb076fda2aa WHIRLPOOL a90f086568a309b162432aeaf436e8ef89f89690fa66d53d4257e6e98fed0a7f0e9ac2732b2e33b6b3de09b66ce5a5c24ea45074383be9f73d8a89e2abea8721
+EBUILD lazarus-1.0.12.ebuild 2357 SHA256 3e06ed6a69c434ffc5910e4590b64f44999125b0796378b5c15442c2afd0aa8a SHA512 f66c42ee743bbac9c1feb639f8677c8a9882d8718ce4fafc8659c976d6283598c8ea9432bb1bea286128e46741172c944ec796037c5b1d6f9aef886ea2e38561 WHIRLPOOL da9c5ef68ce83834a3e857c4955a127f86eb58842e261c5ac5fda9c08ba25899d9a85ec8c5f6956efc4183f091fd62b36d29fc7d348e4e3e9f8cdf90baf854d1
+EBUILD lazarus-1.6.2.ebuild 2342 SHA256 90cac0035cfbfa9cef71b490305209414e9b831e0d795f2c2ec2af06bb2536bf SHA512 1c71ca087ba0e922b534962b9e375849ba976e9d9f61a5823861cb245a8a833148789551e28b08d7f4d17cb2d728872faecdbb269d25d9527f001e3050a34267 WHIRLPOOL 10b5981a4bcaed0547d474a541dc08040ae36bdbc330658ceca1e32bd8e7c7101d528ea3079d7743d5a79ce981d4eedefa134678592419f6867ac5d8be6c3542
+EBUILD lazarus-1.6.4.ebuild 2342 SHA256 28963d697d6778de03d01314c5099cd02ab7615f41573137a78907267a43cf5e SHA512 348abd222125bf2449cd434312209aaf758ca7f0dbd65a66b985e7afc7851ec71494631c0f2f86e39557a26e949c95afe99327cf0b48a363d6eeee26fbf4a294 WHIRLPOOL 1851eb77bc7643e4194e8479352cf8a6a40d8a8d71fd94c0d5960d418f79720e53df35bab456bd2bcc766258a0c787434faf913879816ce6d22e6582bc578218
+MISC ChangeLog 3707 SHA256 5ec44a2f2c3b3da72973df1619904d647006a3be1da23b765b30a0caa16f00fe SHA512 785a88e208273026fdb2b2f7fc11d5164a87e124a9263590006e72994c19473ccbc87a469648aba78afd1c1fbaf0d4d5c8534149692038b21245efe9692d9a57 WHIRLPOOL ce2466d5fdbdd7b4d03c4c5a587407e30475aa4523ea39258d36e73742dba78ff93a3b9e1a7df5363eb3be7dfcf1c8534f9feff3571cb604b8f6ff11e4cce5a0
+MISC ChangeLog-2015 7709 SHA256 e4af59177ce343d0bf769b870bd0c4bee81d6705548d1c0ee179f9212cf450c8 SHA512 b30ab0835d3c667c96e56c9278afe9eeddf04d9b77aef532bf2837c0c2e4b802c465ce1be1af1774ea019b86f4293a285f65430ca5d2c2e97dcc78f6340dd4db WHIRLPOOL 6d9cde999b6b02d4670ba4fecd546acf1736f183e1b592de2e91c40915de7f2a2c0743104f7fc5ff75a547ed2d88e3bd2c6ad2510557e4a273fa81ca62dafc37
+MISC metadata.xml 536 SHA256 a12edd8a77f1d1ebbce3b95db4983074d4631b07898d92f0dc7a5977e0054c4b SHA512 3e4bd8a7e43f44bf6ce15d0a0e6813b02535d4679b26408366b09772259492937f831b1f739dd9dfa3aa83ab1227b441a33fcb3ad475354d09f3c452d4ab6551 WHIRLPOOL 36eff5f5ad46d675ace46a9e05cf053e6f7445c4dca83dd614b01a5473ffb17f9f8cbdedf0249fd22db8168ac3b03cfb14f6ffc8e02c2f46295808c1d338286a
diff --git a/dev-lang/lazarus/files/lazarus-0.9.26-fpcsrc.patch b/dev-lang/lazarus/files/lazarus-0.9.26-fpcsrc.patch
new file mode 100644
index 000000000000..8f9aee3fa42a
--- /dev/null
+++ b/dev-lang/lazarus/files/lazarus-0.9.26-fpcsrc.patch
@@ -0,0 +1,13 @@
+--- lazarus/ide/include/unix/lazbaseconf.inc
++++ lazarus/ide/include/unix/lazbaseconf.inc
+@@ -24,8 +24,9 @@
+ }
+
+ const
+- DefaultFPCSrcDirs: array[1..15] of string = (
++ DefaultFPCSrcDirs: array[1..16] of string = (
+ // search first for sources with right version
++ '/usr/lib/fpc/$(FPCVer)/source',
+ '/usr/share/fpcsrc/$(FPCVer)',
+ // then search for global paths
+ '/usr/share/fpcsrc',
diff --git a/dev-lang/lazarus/lazarus-1.0.12.ebuild b/dev-lang/lazarus/lazarus-1.0.12.ebuild
new file mode 100644
index 000000000000..a085f4b3cce5
--- /dev/null
+++ b/dev-lang/lazarus/lazarus-1.0.12.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+RESTRICT="strip" #269221
+
+FPCVER="2.6.0"
+
+SLOT="0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND.
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+KEYWORDS="amd64 ppc x86"
+DESCRIPTION="Lazarus IDE is a feature rich visual programming environment emulating Delphi"
+HOMEPAGE="https://www.lazarus-ide.org/"
+IUSE="minimal"
+SRC_URI="https://downloads.sourceforge.net/project/${PN}/Lazarus%20Zip%20_%20GZip/Lazarus%20${PV}/${PN}-${PV}-0.tar.gz"
+
+DEPEND=">=dev-lang/fpc-${FPCVER}[source]
+ net-misc/rsync
+ x11-libs/gtk+:2"
+RDEPEND="${DEPEND}
+ !=gnome-base/librsvg-2.16.1"
+DEPEND="${DEPEND}
+ >=sys-devel/binutils-2.19.1-r1"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.26-fpcsrc.patch
+
+ # Use default configuration (minus stripping) unless specifically requested otherwise
+ if ! test ${PPC_CONFIG_PATH+set} ; then
+ local FPCVER=$(fpc -iV)
+ export PPC_CONFIG_PATH="${WORKDIR}"
+ sed -e 's/^FPBIN=/#&/' /usr/lib/fpc/${FPCVER}/samplecfg |
+ sh -s /usr/lib/fpc/${FPCVER} "${PPC_CONFIG_PATH}" || die
+ #sed -i -e '/^-Xs/d' "${PPC_CONFIG_PATH}"/fpc.cfg || die
+ fi
+}
+
+src_compile() {
+ LCL_PLATFORM=gtk2 emake \
+ $(usex minimal "" "bigide") \
+ -j1
+}
+
+src_install() {
+ diropts -m0755
+ dodir /usr/share
+ # Using rsync to avoid unnecessary copies and cleaning...
+ # Note: *.o and *.ppu are needed
+ rsync -a \
+ --exclude="CVS" --exclude=".cvsignore" \
+ --exclude="*.ppw" --exclude="*.ppl" \
+ --exclude="*.ow" --exclude="*.a"\
+ --exclude="*.rst" --exclude=".#*" \
+ --exclude="*.~*" --exclude="*.bak" \
+ --exclude="*.orig" --exclude="*.rej" \
+ --exclude=".xvpics" --exclude="*.compiled" \
+ --exclude="killme*" --exclude=".gdb_hist*" \
+ --exclude="debian" --exclude="COPYING*" \
+ --exclude="*.app" \
+ "${S}" "${ED%/}"/usr/share \
+ || die "Unable to copy files!"
+
+ dosym ../share/lazarus/startlazarus /usr/bin/startlazarus
+ dosym ../share/lazarus/startlazarus /usr/bin/lazarus
+ dosym ../share/lazarus/lazbuild /usr/bin/lazbuild
+ use minimal || dosym ../share/lazarus/components/chmhelp/lhelp/lhelp /usr/bin/lhelp
+ dosym ../lazarus/images/ide_icon48x48.png /usr/share/pixmaps/lazarus.png
+
+ make_desktop_entry startlazarus "Lazarus IDE" "lazarus" || die "Failed making desktop entry!"
+}
diff --git a/dev-lang/lazarus/lazarus-1.6.2.ebuild b/dev-lang/lazarus/lazarus-1.6.2.ebuild
new file mode 100644
index 000000000000..790c466f17c9
--- /dev/null
+++ b/dev-lang/lazarus/lazarus-1.6.2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+FPCVER="3.0.0"
+
+DESCRIPTION="Lazarus IDE is a feature rich visual programming environment emulating Delphi"
+HOMEPAGE="https://www.lazarus-ide.org/"
+SRC_URI="https://sourceforge.net/projects/${PN}/files/Lazarus%20Zip%20_%20GZip/Lazarus%201.6.2/${P}-0.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+SLOT="0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND.
+KEYWORDS="~amd64 ~x86"
+IUSE="minimal"
+
+DEPEND=">=dev-lang/fpc-${FPCVER}[source]
+ net-misc/rsync
+ x11-libs/gtk+:2
+ >=sys-devel/binutils-2.19.1-r1:="
+RDEPEND="${DEPEND}
+ !=gnome-base/librsvg-2.16.1"
+
+RESTRICT="strip" #269221
+
+S=${WORKDIR}/${PN}
+
+PATCHES=( "${FILESDIR}"/${PN}-0.9.26-fpcsrc.patch )
+
+src_prepare() {
+ default
+ # Use default configuration (minus stripping) unless specifically requested otherwise
+ if ! test ${PPC_CONFIG_PATH+set} ; then
+ local FPCVER=$(fpc -iV)
+ export PPC_CONFIG_PATH="${WORKDIR}"
+ sed -e 's/^FPBIN=/#&/' /usr/lib/fpc/${FPCVER}/samplecfg |
+ sh -s /usr/lib/fpc/${FPCVER} "${PPC_CONFIG_PATH}" || die
+ #sed -i -e '/^-Xs/d' "${PPC_CONFIG_PATH}"/fpc.cfg || die
+ fi
+}
+
+src_compile() {
+ LCL_PLATFORM=gtk2 emake \
+ $(usex minimal "" "bigide") \
+ -j1
+}
+
+src_install() {
+ diropts -m0755
+ dodir /usr/share
+ # Using rsync to avoid unnecessary copies and cleaning...
+ # Note: *.o and *.ppu are needed
+ rsync -a \
+ --exclude="CVS" --exclude=".cvsignore" \
+ --exclude="*.ppw" --exclude="*.ppl" \
+ --exclude="*.ow" --exclude="*.a"\
+ --exclude="*.rst" --exclude=".#*" \
+ --exclude="*.~*" --exclude="*.bak" \
+ --exclude="*.orig" --exclude="*.rej" \
+ --exclude=".xvpics" --exclude="*.compiled" \
+ --exclude="killme*" --exclude=".gdb_hist*" \
+ --exclude="debian" --exclude="COPYING*" \
+ --exclude="*.app" \
+ "${S}" "${ED%/}"/usr/share \
+ || die "Unable to copy files!"
+
+ dosym ../share/lazarus/startlazarus /usr/bin/startlazarus
+ dosym ../share/lazarus/startlazarus /usr/bin/lazarus
+ dosym ../share/lazarus/lazbuild /usr/bin/lazbuild
+ use minimal || dosym ../share/lazarus/components/chmhelp/lhelp/lhelp /usr/bin/lhelp
+ dosym ../lazarus/images/ide_icon48x48.png /usr/share/pixmaps/lazarus.png
+
+ make_desktop_entry startlazarus "Lazarus IDE" "lazarus" || die "Failed making desktop entry!"
+}
diff --git a/dev-lang/lazarus/lazarus-1.6.4.ebuild b/dev-lang/lazarus/lazarus-1.6.4.ebuild
new file mode 100644
index 000000000000..efe6c7dbbbf6
--- /dev/null
+++ b/dev-lang/lazarus/lazarus-1.6.4.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+FPCVER="3.0.0"
+
+DESCRIPTION="Lazarus IDE is a feature rich visual programming environment emulating Delphi"
+HOMEPAGE="https://www.lazarus-ide.org/"
+SRC_URI="https://sourceforge.net/projects/${PN}/files/Lazarus%20Zip%20_%20GZip/Lazarus%20${PV}/${P}-0.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1-with-linking-exception"
+SLOT="0" # Note: Slotting Lazarus needs slotting fpc, see DEPEND.
+KEYWORDS="~amd64 ~x86"
+IUSE="minimal"
+
+DEPEND=">=dev-lang/fpc-${FPCVER}[source]
+ net-misc/rsync
+ x11-libs/gtk+:2
+ >=sys-devel/binutils-2.19.1-r1:="
+RDEPEND="${DEPEND}
+ !=gnome-base/librsvg-2.16.1"
+
+RESTRICT="strip" #269221
+
+S=${WORKDIR}/${PN}
+
+PATCHES=( "${FILESDIR}"/${PN}-0.9.26-fpcsrc.patch )
+
+src_prepare() {
+ default
+ # Use default configuration (minus stripping) unless specifically requested otherwise
+ if ! test ${PPC_CONFIG_PATH+set} ; then
+ local FPCVER=$(fpc -iV)
+ export PPC_CONFIG_PATH="${WORKDIR}"
+ sed -e 's/^FPBIN=/#&/' /usr/lib/fpc/${FPCVER}/samplecfg |
+ sh -s /usr/lib/fpc/${FPCVER} "${PPC_CONFIG_PATH}" || die
+ #sed -i -e '/^-Xs/d' "${PPC_CONFIG_PATH}"/fpc.cfg || die
+ fi
+}
+
+src_compile() {
+ LCL_PLATFORM=gtk2 emake \
+ $(usex minimal "" "bigide") \
+ -j1
+}
+
+src_install() {
+ diropts -m0755
+ dodir /usr/share
+ # Using rsync to avoid unnecessary copies and cleaning...
+ # Note: *.o and *.ppu are needed
+ rsync -a \
+ --exclude="CVS" --exclude=".cvsignore" \
+ --exclude="*.ppw" --exclude="*.ppl" \
+ --exclude="*.ow" --exclude="*.a"\
+ --exclude="*.rst" --exclude=".#*" \
+ --exclude="*.~*" --exclude="*.bak" \
+ --exclude="*.orig" --exclude="*.rej" \
+ --exclude=".xvpics" --exclude="*.compiled" \
+ --exclude="killme*" --exclude=".gdb_hist*" \
+ --exclude="debian" --exclude="COPYING*" \
+ --exclude="*.app" \
+ "${S}" "${ED%/}"/usr/share \
+ || die "Unable to copy files!"
+
+ dosym ../share/lazarus/startlazarus /usr/bin/startlazarus
+ dosym ../share/lazarus/startlazarus /usr/bin/lazarus
+ dosym ../share/lazarus/lazbuild /usr/bin/lazbuild
+ use minimal || dosym ../share/lazarus/components/chmhelp/lhelp/lhelp /usr/bin/lhelp
+ dosym ../lazarus/images/ide_icon48x48.png /usr/share/pixmaps/lazarus.png
+
+ make_desktop_entry startlazarus "Lazarus IDE" "lazarus" || die "Failed making desktop entry!"
+}
diff --git a/dev-lang/lazarus/metadata.xml b/dev-lang/lazarus/metadata.xml
new file mode 100644
index 000000000000..0b781a1689e0
--- /dev/null
+++ b/dev-lang/lazarus/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription lang="en">
+ A Borland Delphi lookalike for linux.
+ Uses the free pascal compiler.
+ </longdescription>
+ <maintainer type="person">
+ <email>amynka@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="minimal">Don't build extra packages from the
+ bigide component</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">downloads</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/lfe/Manifest b/dev-lang/lfe/Manifest
new file mode 100644
index 000000000000..19a36e7cc19b
--- /dev/null
+++ b/dev-lang/lfe/Manifest
@@ -0,0 +1,11 @@
+DIST lfe-0.10.1.zip 296228 SHA256 05de4cd5a15ea37e505049c5d7e9c75fbb61ce1bcabec39d762df3dbeda7d814 SHA512 94719b42ecf6dc5505ea649df00b255b1e901d6104426192f34692e2f7bc85940b96b39fd1bfa00577b63c17e10d8fd51d3de743c02d8ac2263abe2fb47d4498 WHIRLPOOL a3c4420421afd45bf6a0908a3a0f42319a094d4d186636eebe5f58b4f2d11192c0a7cbc6eee7dbc1aa48f326fed8c1869932e4d277c41387f790006675f4985d
+DIST lfe-0.7a.zip 216133 SHA256 bb7df590c71f04f9d1a14bb027e457036e6e2a938d71ad0ce02ea6da1188d03f SHA512 f8e8dd080142aed77109deed7627bcd6c9a90d4bddcc2207b5e3ffa0e744c889ac4890d18040e7bde239e1c69c6251819723637a8b9ad9c0cce01787c6e0e1b0 WHIRLPOOL 61b9f3dad007c2bded22ae61f871cbd83afa5e6e338fcc22eaf08e2ef19315e43941c006a60f8e2a2b1d030e16328487c95ffcc440768f7921b25564e480a523
+DIST lfe-1.0.zip 303894 SHA256 1f3d9fe22bbaa1c5df50ba03595a0aa764e708f6eb52bcb5557a69426ca60114 SHA512 752ac6b142db95f63ba88ee92de28f846f3a7ccd605eea0da73da24ed0b7b4f0a06fb48697ea6064ccc28dda225ecd01843386085629b6b5465b09df66722bce WHIRLPOOL f4ca4ae467a2e534597e5f211c5f0758de27dc9a5613976ac3c86a22071ea8305c03f0dda17f9d2c61af3e45ca57152bd6b566289b8d25c3dcbe4a8e3bf25f08
+DIST lfe-1.1.1.zip 386864 SHA256 6ab0581f3a61541a7afb507a3cfe1506b688c8a88890239dad25cb93823aec30 SHA512 8660716a73126615bd0cde161a780cc49ba57718afd820dbe891da5e1d9ec2f52cc1864159dcedba1c674ccfef42b9662ec8e0bbfe82c10798527ae0979b8f8e WHIRLPOOL 1930da778ec2c03ddc0033664d5a30ba2c000bffe68416775348466150aba8c5ad275b0a62a3520d436999e7f57a0a4b04bacb00d372f24e3b18ea52980b3d0b
+EBUILD lfe-0.10.1.ebuild 754 SHA256 9d9a36fce4cc875e716e361502ca4499f1f6d686e2ec2aee6bdfd21edb3b0919 SHA512 977c9a701d8b36467684803cbbe13c3fb5997dea92c5de7e432da52af43e6fcf6cfb755ef61f5e5991ea9d4e3668ad7d1af2f114997658f231ce375c043c1340 WHIRLPOOL cbe0925710f4f645eb7ae90c6bf9cda1ef1640278ce492dac4195bb2d511d658c7c9550e39a1e70e38bbd5b691c2361efb37934d869a7b69024fc670ec16c255
+EBUILD lfe-0.7.ebuild 647 SHA256 1bed391d71239230f6abb7af573000cf1f5811f0c9db6c0becce7a3c7dbc8d96 SHA512 4c55bd5dbea59bd98e544b89f10ac3676ce6d95b088a45b845e59d4487900f780adf8805e4e57c7322297337d4fb7f2fc454bd7b7e1f76caa99868067f1393de WHIRLPOOL 7a26da8bf4a3ef30edb2c9fd7703106339714e04863d858ec2d9675a06c5444ee344ad4d7df8a436b68e42f700495e6f77e78a0bce246de44546f6ededc46301
+EBUILD lfe-1.0.ebuild 754 SHA256 7a62c8b01aa2b2d901d6f335a18a59df7a539a792ab0c49dbc9db44edac43ecf SHA512 77a131455692ceefb6310ace009525eeac0469f8105b16885e1a7a6bb8af2386104391774d44ce23d2d6ee9aa6635a882a1fe9ceaecc00da4ee312e3061e3741 WHIRLPOOL 1accb87640522595c0aab05ae14358c5d6cc871ff746733a9b10b03d11c6887df75e8165277e0aa22972e9144939bab10c46d37be681d027bdeee839f130dd68
+EBUILD lfe-1.1.1.ebuild 754 SHA256 7a62c8b01aa2b2d901d6f335a18a59df7a539a792ab0c49dbc9db44edac43ecf SHA512 77a131455692ceefb6310ace009525eeac0469f8105b16885e1a7a6bb8af2386104391774d44ce23d2d6ee9aa6635a882a1fe9ceaecc00da4ee312e3061e3741 WHIRLPOOL 1accb87640522595c0aab05ae14358c5d6cc871ff746733a9b10b03d11c6887df75e8165277e0aa22972e9144939bab10c46d37be681d027bdeee839f130dd68
+MISC ChangeLog 2596 SHA256 db0d00d1a9194fba1263c461b913a21c4177b98a45a9f7db840a57fe1288c370 SHA512 f850594570d2add781ba1c022517b61d9b482ebf02d6f665def63c7c9e80832c22dac1b806c038632b5849f7c7d220da59e4397543c4bde3f2b18303a1b83b10 WHIRLPOOL 66c58a732aae135638cccba4ce9b0dd76b5b491ea1aadfa26b257eb262b433cae8e36d8e8175fba0b6cab36e4a6b3d12e68bca2e03161bee576e82cfeac73011
+MISC ChangeLog-2015 438 SHA256 611a213c9a2fcb154a2e1f9f20138392cf14dcf57def0cc3f2ba9fda03ce80d3 SHA512 7bb93531e2bbb3a05591b9cacaca6aa6e9f25cebc8521b48f4ce3736fe51d604695d93b9277a5871ffe0095441c0bc38ec4eed4871db77cbbc4bdd3d004d5111 WHIRLPOOL a24cce99a0629ad8041ddaa03a97d131697d03563633c46f1366c459404691f2543e5cb6a483d4fceb36b96b64df363b7294b6bb23d04f601cdd76d642afd6d0
+MISC metadata.xml 334 SHA256 5c05720d6616d097793829d572525b9fdcb3ba7b74c50897124eab230ad733e1 SHA512 ef130013e56ca5d9df4312b106383b5d3d8d889f767ea24125e1a9ab11f555cab661c73ad190c7c0b4d7afd10a1e6d3569282233b4da4a76c7fbf1fc6052c8be WHIRLPOOL 071b99f06023e0b8ff62f1cd572ca5f80bca6e7e3690a8d85acad6625e17ddc4a16ab2ed7975d34474f217fb8eacd8b3607a249cdf4a1e96031788535260c33e
diff --git a/dev-lang/lfe/lfe-0.10.1.ebuild b/dev-lang/lfe/lfe-0.10.1.ebuild
new file mode 100644
index 000000000000..f4254db02323
--- /dev/null
+++ b/dev-lang/lfe/lfe-0.10.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Lisp-flavoured Erlang"
+HOMEPAGE="http://lfe.github.io/"
+SRC_URI="https://github.com/rvirding/lfe/archive/v${PV}.zip -> ${P}.zip"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/erlang"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ export PATH="${S}/bin:$PATH"
+}
+
+src_compile() {
+ emake compile -j1
+}
+
+src_install() {
+ dobin bin/lfe
+ dobin bin/lfec
+ dobin bin/lfescript
+ dodir /usr/$(get_libdir)/erlang/lib/lfe/ebin/
+ dodir /usr/$(get_libdir)/erlang/lib/lfe/emacs/
+ cp -R "${S}/ebin" "${D}/usr/$(get_libdir)/erlang/lib/lfe/"
+ cp -R "${S}/emacs" "${D}/usr/$(get_libdir)/erlang/lib/lfe/"
+}
diff --git a/dev-lang/lfe/lfe-0.7.ebuild b/dev-lang/lfe/lfe-0.7.ebuild
new file mode 100644
index 000000000000..6982d4eefd2d
--- /dev/null
+++ b/dev-lang/lfe/lfe-0.7.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Lisp-flavoured Erlang"
+HOMEPAGE="http://lfe.github.io/"
+SRC_URI="https://github.com/rvirding/lfe/archive/v0.7a.zip -> ${P}a.zip"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/erlang"
+DEPEND="${RDEPEND}"
+
+#eh?
+S=${WORKDIR}/${P}a
+
+src_prepare() {
+ sed -i -e 's/cp -pPR $(INCDIR) $(INSTALLDIR); \\/echo " "; \\/' Makefile || die
+}
+
+src_install() {
+ ERL_LIBS="${D}/usr/$(get_libdir)/erlang/lib/" make install DESTDIR="${D}"
+ mkdir -p "${D}"/usr/bin
+ cp lfe "${D}"/usr/bin
+}
diff --git a/dev-lang/lfe/lfe-1.0.ebuild b/dev-lang/lfe/lfe-1.0.ebuild
new file mode 100644
index 000000000000..bfb8337090ea
--- /dev/null
+++ b/dev-lang/lfe/lfe-1.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Lisp-flavoured Erlang"
+HOMEPAGE="http://lfe.github.io/"
+SRC_URI="https://github.com/rvirding/lfe/archive/v${PV}.zip -> ${P}.zip"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/erlang"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ export PATH="${S}/bin:$PATH"
+}
+
+src_compile() {
+ emake compile -j1
+}
+
+src_install() {
+ dobin bin/lfe
+ dobin bin/lfec
+ dobin bin/lfescript
+ dodir /usr/$(get_libdir)/erlang/lib/lfe/ebin/
+ dodir /usr/$(get_libdir)/erlang/lib/lfe/emacs/
+ cp -R "${S}/ebin" "${D}/usr/$(get_libdir)/erlang/lib/lfe/"
+ cp -R "${S}/emacs" "${D}/usr/$(get_libdir)/erlang/lib/lfe/"
+}
diff --git a/dev-lang/lfe/lfe-1.1.1.ebuild b/dev-lang/lfe/lfe-1.1.1.ebuild
new file mode 100644
index 000000000000..bfb8337090ea
--- /dev/null
+++ b/dev-lang/lfe/lfe-1.1.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib
+
+DESCRIPTION="Lisp-flavoured Erlang"
+HOMEPAGE="http://lfe.github.io/"
+SRC_URI="https://github.com/rvirding/lfe/archive/v${PV}.zip -> ${P}.zip"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/erlang"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ export PATH="${S}/bin:$PATH"
+}
+
+src_compile() {
+ emake compile -j1
+}
+
+src_install() {
+ dobin bin/lfe
+ dobin bin/lfec
+ dobin bin/lfescript
+ dodir /usr/$(get_libdir)/erlang/lib/lfe/ebin/
+ dodir /usr/$(get_libdir)/erlang/lib/lfe/emacs/
+ cp -R "${S}/ebin" "${D}/usr/$(get_libdir)/erlang/lib/lfe/"
+ cp -R "${S}/emacs" "${D}/usr/$(get_libdir)/erlang/lib/lfe/"
+}
diff --git a/dev-lang/lfe/metadata.xml b/dev-lang/lfe/metadata.xml
new file mode 100644
index 000000000000..afa3a329e3ad
--- /dev/null
+++ b/dev-lang/lfe/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">rvirding/lfe</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/lisaac/Manifest b/dev-lang/lisaac/Manifest
new file mode 100644
index 000000000000..f92cdda89803
--- /dev/null
+++ b/dev-lang/lisaac/Manifest
@@ -0,0 +1,7 @@
+AUX 50lisaac-gentoo.el 205 SHA256 3187c2b42127a6b0effa280e8847942eb33ea07e8ecdffe5a2c0d6e1090505eb SHA512 8ecf7496211067e2a2ffd5458036e7b3964e6528064855905d830e98553d9c190a08fcd0df941625eb8dcfe1f762042186420f00feebcf054d9a499c5cf2d080 WHIRLPOOL 486b3b2b1101722d43b03e8df1bb53afc73d213813bbd4c263dffa473cc422788b8b1bc70824c82c0fcc4658e8cd80f747f9603a7c9ceb32398419bbcf5aefa8
+AUX lisaac-0.13.1-makefile.patch 1003 SHA256 f50e141f8f8884ba3187b74d216115c09acf71d058967b256e7c9f10f96c7883 SHA512 4b363a4791468b98e864b641c08886d8070b9c959fdd5fda68ea0c0fa8c8caf0fe80ef7afe99598579c8a7b18222c3846334b6fa6d9c2b3e6fec9fcda6170d6e WHIRLPOOL 1ba3b486cebfb281834e3648878fb98b7aa5264f5fbf8c1f225d236f8daa60944ebdb3c2e69a34edabe11b8f58a16c7d06a4f7767f6bf328d2d8bf3e900bc8d6
+DIST lisaac-0.13.1.tar.gz 2141871 SHA256 dc3ffe65e3be3f4ee4b77d3f362c22556afa842575f1b4dcf0951cf36f82f993 SHA512 079137d17fae09d57430d6576e9b2c149ca31ba47c0899513bfc447488ba2b0e3432fff8db4f6b141301798e23472738791cd99900c73a463d92397179a44aa9 WHIRLPOOL 6c878d53c341702439544a9267c19b93007b5cb83979ee448d95a38c090eef6fd4d0764dfd0beda9ec05e150ea68394b859b902991d76cb276d7f70a21a4464a
+EBUILD lisaac-0.13.1-r2.ebuild 1639 SHA256 51e3711f87b5048297aa0ddd3eaf3db8dbb24d5dd2654befe360ea534d0a256e SHA512 654ea816e74a0f355b42b90b4114fbe7b477568960e522419804c7fe6a5bcf57e4294cea2ec86af382b651c3e01bcf237be823dc1d3fcd9fb913f77e0f611f07 WHIRLPOOL 387827bfa29a8e54f35967036bd9c2dae1b4d70d7c469ba1147c8d15aef9b04615bf160033286aed2b1e7b77edbbf13b523fc6316b50e7b82374fc96afc0516f
+MISC ChangeLog 2593 SHA256 701c6944eb33f22d96ba50623d750e7703f6279124e86a9be541cb5d0325cdff SHA512 a35b08e1f75f1e97dde65e2ac7333ebcd5f49f47c42fabb9861ffcf5d466ee8d15473d9a9dee6ee4402c9d573f4c304516cf1fa40f36aa92ab0e86c253647424 WHIRLPOOL 7070e6189a1c78227e52995be9e1e19a958269058156292c6dd53dd707d2963652f10d3b80fdb18f1f2d605db10bc9bc71b07df3ba3c27d202feb84b5dd52305
+MISC ChangeLog-2015 1555 SHA256 80b17d908d7513f373cb937d24e2194d31122f627e4e02a92ea9e190d7434dc5 SHA512 b30ffe332192d91faa02adb298626e9078ef8242640a1a11634f7b64387e09ead4d273d8b2b3f83ddece6bdd92f7a8a3be771d57468c9d896137a6b8df704adc WHIRLPOOL d02d54b06ab0643b8be1a809e78fcc80164ac5a3f99e741aba890d855919725478403783ab9981ac14f72f4b42fbb037eccf5ace71185699cdead368e7dc1136
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/dev-lang/lisaac/files/50lisaac-gentoo.el b/dev-lang/lisaac/files/50lisaac-gentoo.el
new file mode 100644
index 000000000000..5d9af1ae4206
--- /dev/null
+++ b/dev-lang/lisaac/files/50lisaac-gentoo.el
@@ -0,0 +1,4 @@
+;;; lisaac site-lisp configuration
+(add-to-list 'load-path "@SITELISP@")
+(add-to-list 'auto-mode-alist '("\\.li\\'" . lisaac-mode))
+(autoload 'lisaac-mode "lisaac-mode" "Major mode for Lisaac Programs" t)
diff --git a/dev-lang/lisaac/files/lisaac-0.13.1-makefile.patch b/dev-lang/lisaac/files/lisaac-0.13.1-makefile.patch
new file mode 100644
index 000000000000..bd690f467dd4
--- /dev/null
+++ b/dev-lang/lisaac/files/lisaac-0.13.1-makefile.patch
@@ -0,0 +1,33 @@
+ Makefile | 11 +++++------
+ 1 files changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 76e6403..9875e36 100644
+--- a/Makefile
++++ b/Makefile
+@@ -59,20 +59,19 @@ EXAMPLE=/examples
+ HTML=/html
+ BIN=/usr/bin
+ MAN=/usr/share/man/man1
+-DOC=/usr/share/doc/lisaac
++DOC=${DOC:=/usr/share/doc/lisaac}
+ DESTDIR=
+-CC=gcc
+-CFLAGS=-O2
++CC ?=gcc
+
+ all: bin/lisaac.c bin/shorter.c
+ @echo "#define LISAAC_DIRECTORY \"$(DESTDIR)$(LIB)\"" > bin/path.h
+- $(CC) $(CFLAGS) bin/lisaac.c -o bin/lisaac
+- $(CC) $(CFLAGS) bin/shorter.c -o bin/shorter
++ $(CC) $(CFLAGS) $(LDFLAGS) bin/lisaac.c -o bin/lisaac
++ $(CC) $(CFLAGS) $(LDFLAGS) bin/shorter.c -o bin/shorter
+
+ interactive_userland: install_lisaac.c
+ @echo - Lisaac compiler installation For Unix / Linux / Windows -
+ @echo Please wait...
+- $(CC) $(CFLAGS) install_lisaac.c -o install_lisaac
++ $(CC) $(CFLAGS) $(LDFLAGS) install_lisaac.c -o install_lisaac
+ @echo - please run ./install_lisaac to finish the installation
+
+ install:
diff --git a/dev-lang/lisaac/lisaac-0.13.1-r2.ebuild b/dev-lang/lisaac/lisaac-0.13.1-r2.ebuild
new file mode 100644
index 000000000000..23b6ba0b556e
--- /dev/null
+++ b/dev-lang/lisaac/lisaac-0.13.1-r2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+inherit versionator elisp-common eutils
+
+DESCRIPTION="Lisaac is an object prototype based language"
+HOMEPAGE="http://isaacproject.u-strasbg.fr/li.html"
+SRC_URI="http://isaacproject.u-strasbg.fr/download/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="vim-syntax emacs examples"
+
+DEPEND="vim-syntax? ( app-editors/vim )
+ emacs? ( virtual/emacs )"
+
+RDEPEND="${DEPEND}"
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare(){
+ epatch "${FILESDIR}/${P}-makefile.patch"
+ rm lib/number/essai
+}
+
+src_compile(){
+ emake CC="$(tc-getCC)"
+
+ if use emacs; then
+ elisp-compile editor/emacs/lisaac-mode.el \
+ || die "compiling emacs component failed."
+ fi
+}
+
+src_install(){
+ emake DESTDIR="${D}" DOC="/usr/share/doc/${PF}" install
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax/
+ doins editor/vim/syntax/lisaac.vim
+ insinto /usr/share/vim/vimfiles/indent/
+ doins editor/vim/indent/lisaac.vim
+ fi
+
+ if use emacs; then
+ elisp-install ${PN} editor/emacs/*.{el,elc} \
+ || die "installing emacs coponent failed."
+ elisp-site-file-install "${FILESDIR}"/${SITEFILE} \
+ || die "installing emacs site file failed"
+ fi
+
+ if use examples; then
+ dodir /usr/share/${PN}/
+ cp -r example "${ED}"/usr/share/${PN}/examples
+ fi
+}
+
+pkg_postinst(){
+ if use vim-syntax; then
+ elog "Add the following line to your vimrc if you want"
+ elog "to enable the lisaac support :"
+ elog
+ elog "au BufNewFile,BufRead *.li setf lisaac"
+ fi
+
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm(){
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/lisaac/metadata.xml b/dev-lang/lisaac/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/dev-lang/lisaac/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/dev-lang/logtalk/Manifest b/dev-lang/logtalk/Manifest
new file mode 100644
index 000000000000..98bb49454b1d
--- /dev/null
+++ b/dev-lang/logtalk/Manifest
@@ -0,0 +1,15 @@
+AUX logtalk-3.00.0-no-user-docs.patch 1711 SHA256 4193847f9668ac005267f15d4959bae364ce3059b117a534e86d1de763ce1221 SHA512 6e3b0ac3857955796b27e0f427cdea8d4bb0ab9be18a8423b383087eaa6ae2999a6b92fec57d3e303b62e621821db866ec4aacdf0e6b6205d44b9b233bcc4ab3 WHIRLPOOL be264ef5e37d9faee9379c60a1807cf34368d73b68431ded03491b22a4abf03a0aef8418c684554caf577f76be95bbc2591a2a5af7efc212705ae0d1abb3ba72
+AUX logtalk-3.03.0-no-user-docs.patch 1711 SHA256 bb2becb713f45ace4aa4760e3802d33c4f9b15968566b7e1fd0b733f5288c946 SHA512 a159086a0b78ff853fbc98fde8be8a2962c5b91377daf9ae2b9f0a9aea5aca234d3c734e81bae660bbdbd4ef41ee1548817855181c09e705ec4b78ec26d683d2 WHIRLPOOL d1da851018264d467c7a184ed09996c9bd1a77d2715d4c4166eb26b18529434b8b274e7237473dc6f4046498c596cd5b3903c0d20e78b6b47d075fb14ae02d7a
+AUX logtalk-3.07.0-no-user-docs.patch 1711 SHA256 bb2becb713f45ace4aa4760e3802d33c4f9b15968566b7e1fd0b733f5288c946 SHA512 a159086a0b78ff853fbc98fde8be8a2962c5b91377daf9ae2b9f0a9aea5aca234d3c734e81bae660bbdbd4ef41ee1548817855181c09e705ec4b78ec26d683d2 WHIRLPOOL d1da851018264d467c7a184ed09996c9bd1a77d2715d4c4166eb26b18529434b8b274e7237473dc6f4046498c596cd5b3903c0d20e78b6b47d075fb14ae02d7a
+AUX logtalk-3.11.2-portage.patch 1128 SHA256 108a640df54e3e91f6e503e015ce1743d49ad2fb35af9427b3a4fe997f7d1098 SHA512 2b85afedc87697fefa85e204a7691ddfd68c52822db45f3654b267f4e06231bfc9d468041e5d074b6ee9884d501957417c8facf897cdf0cd8eba0e04b3461f8e WHIRLPOOL 0219dd11acde538713d298d938d577fbdb3438bb03810ac9f4acf823c347473378e152031c5871e26eacfaaae848c5e7a80db4a6b5cd43877dc17408786bc0c3
+DIST logtalk-3.00.0.tar.bz2 1886297 SHA256 7462eaf8fd7fa865f8cccbb449a97981fbcb109a21536e2420f205b3b4b814b2 SHA512 bb4ecc709e71eee9a9a532bfcef764095e581189f3e17c9c0f2d80ceeaa4dd993d7da087b07e27f4a377a40d7a798378591d89ab6c801c7a26c1b1d646c7b76c WHIRLPOOL 21c3c9fc99e89173d3e0c109ca435847c2c735e17abca70e0f0c7646a3f8a8927e00aeb075386beec4e406faeb1ec7bc9ea7ec014933e5657c7c1d5c4d52099d
+DIST logtalk-3.03.0.tar.bz2 1997131 SHA256 db48ee13f119a3956e87c2fabceddc03e008391dd1542f5e07909b3840bb0534 SHA512 8445b0dda78ce0a7a0fe380b03d061271eb924df34c8f035c96a949b177c99234e2998c65f18c55be04c7d661c94473448eb2dc79a586dbc346ab07887f0e98a WHIRLPOOL 37faa40c55c0c60dc9111fc323554fdf1747f9c3c328799fcdf73d765311a8b2af6faeab2b2523736425647a38b0c8ebce155f438efec052acc82c2c5dd8dd19
+DIST logtalk-3.07.0.tar.bz2 2114396 SHA256 2f9a3f0861914bf38abfda3aec309e9779dfaaaf7214f7ada627a124eae87275 SHA512 1b26c4f49dee469d6f3a4ae15dd0c429b2b79a407aca9f518af6d1f19f682b6c72dd76c6ed3da38555353219f832efce6f0fb54a4a946cae2fccfa78c67c5757 WHIRLPOOL 972d6d9875af7b5c644d5cf608a2154338988c3fbd8032e7e5ebcf2b6289b8ef56c753dcda7478942fe7d6db7ae9e1779234185c2f4c1913d57b140a86448dd6
+DIST logtalk-3.11.2.tar.bz2 3122034 SHA256 4cccb40516194b1d461a72d1756c2ecb7eb7b38399586c1fd6893ceee774ad81 SHA512 5c48a4c2165c8b4bfe3047d7dc42f3210a72488fbc2e7349a93ae17ed3590cdd4ff22417f153f163c76605ffc30a5bc8fad2bd91099edf68e675b1d94fb7662b WHIRLPOOL e484d308ae75144bdfa009b45af20059df1baf428989c20260fd7304581586050897671621bc96378ec883885f9406efccb1f4de3444bed7fbe94c360f8c80f4
+EBUILD logtalk-3.00.0.ebuild 4015 SHA256 22c224aaa1c577bd1e0ab75b1652e9ab3fc3cbf201517ece2b1c34ba64ca8c01 SHA512 f9c3ea40e5700b934128c051d087fd79898993dd2bdfe92263929ad3f248b172946490d40bf47279da9e79fb91131dd10e3f05fc9f04816125a0a1aeb1abacf1 WHIRLPOOL b0eac0a69356848e33b93caaa6ab2f383a886ad2416b3eaa4b4b4326824167b264ae15e7271c8e3425866d059861854f2fdcba5dabbe2a752e3c5d3ec3ba15f8
+EBUILD logtalk-3.03.0.ebuild 4014 SHA256 62d007df16fe00779559b7acee1570abce0df844eaa94f1c1d26ffda91b7a82d SHA512 7a6243473dcdeb715358c9615c3dd7a3db041a1b9c4c3fd7e6517c58f7948d1df4340964b67f4c25a38587f8b77010826ccd1e2a2223e3d75431bf2b8a8fe452 WHIRLPOOL 985a586766ca873ca4ed6147c1ad31a471908343d895bd8b753ae600cb6c1b779184847c196b9eb65b5975579e7520ac41c7c38e84205f0a68a28cac0e60c88c
+EBUILD logtalk-3.07.0.ebuild 3939 SHA256 156e3ca9cd5b89a3e167e7f553cc9ff333c7b7250f51ed9676ebccf59c704018 SHA512 c8d2b9e8e8f991d2fff6e7a990ba2c5ceccdfab0d37faffca697e96851b857b9f627544cb383d4e5a90d8dc1c11c441df7fc1fcdf6ea10c8ee2a8891ca49d0a4 WHIRLPOOL 1b48563e8b826a974ada8beb7815393f73766f8f2ebba4468c750772f6bf203ed5e3357e10a221a25b8b629b447836483d1d9b271d62cecb1d839e47cd53e9e1
+EBUILD logtalk-3.11.2.ebuild 3877 SHA256 2d7cfb2ce0f6ced528602b666fea5b06287d06d47d6401c3a8a662d3ed643133 SHA512 ea9fe18937f59e79b5fcf4c046115baf15e3c0f89183d212175086ed2fcb1e7f5247d8ecba94c396bb39bec0835fb9827935d255fa77843775861ec62d99cc51 WHIRLPOOL 92420eb98f1e16a93bd4a39f68f9cd6599e1afb82732a78f1b549eb8167d93f9db6eb1f4653c604847d1651a75010efe6f125beec761935f04867c079345724a
+MISC ChangeLog 3471 SHA256 cb38d466674b422de74f90e3b38568d95d142b5e240dda3c59c5f2495d973b73 SHA512 2fee1e7dec3fb509115d3c7eff8187ed0ac3e86b8500ed696beabbe25f34a40933bef36f40e09cb99762afadf27aa88338c106eee479eb24650285121ff4cd59 WHIRLPOOL 18e6f4ad1d14164a1ddaef734877d583b1d724b4574d56ef3f7532ea51bed820c7614aa260155317aaaf9a0060aad762fbf66ee86f788f149f4b791cb521b13f
+MISC ChangeLog-2015 2179 SHA256 0c93dea2b6242353da0ecf674ed83dbf0711f07dee805b8a893779b4310d7dd0 SHA512 be7be722adc8078b13cfcd358816219860da37558daf3ff35d571ce2400b66114fae89ba6697295b1c2c55b1f768ad09fea940181bbddedf46fd2d1aa231bde4 WHIRLPOOL 3e171b7d9a2ada0464232126735efb2f14bd4b4b88f35c1bb01848d11da997d57bb6edc4f1a020a6903895d7395aa4d0fba07f916f33e8176de5383a45e090df
+MISC metadata.xml 404 SHA256 e9fff3cc0b2b693696165ca8befdbc92c55672d90657e50c8a1d31bdfe152c6a SHA512 1faeefef2f7670809936eb73c4e9e4e18f44ee6e5851cc7386e996768ab88dbfa7c24801daa2cf4edca8646427eec1c871136540d71b7e0b0add3d00c78691ed WHIRLPOOL 035ac52f49bf8d27ce363832cb583793d0097ec8680780fbcebd6712435c38817457e8a130e42026153c997adb4e0fa0bb6610d485507cc8ebfdaf6c71aaadaa
diff --git a/dev-lang/logtalk/files/logtalk-3.00.0-no-user-docs.patch b/dev-lang/logtalk/files/logtalk-3.00.0-no-user-docs.patch
new file mode 100644
index 000000000000..d25f19347d66
--- /dev/null
+++ b/dev-lang/logtalk/files/logtalk-3.00.0-no-user-docs.patch
@@ -0,0 +1,34 @@
+--- logtalk-3.00.0.orig/scripts/logtalk_user_setup.sh 2015-01-08 14:04:03.000000000 +0100
++++ logtalk-3.00.0/scripts/logtalk_user_setup.sh 2015-01-08 14:05:05.000000000 +0100
+@@ -114,14 +114,12 @@
+
+ echo "Copying Logtalk files and directories..."
+ mkdir -p "$LOGTALKUSER"/contributions
+-mkdir -p "$LOGTALKUSER"/docs
+ mkdir -p "$LOGTALKUSER"/examples
+ mkdir -p "$LOGTALKUSER"/library
+ mkdir -p "$LOGTALKUSER"/scratch
+ mkdir -p "$LOGTALKUSER"/tests
+ mkdir -p "$LOGTALKUSER"/tools
+ cp -RL "$LOGTALKHOME"/contributions "$LOGTALKUSER"/
+-cp -RL "$LOGTALKHOME"/docs "$LOGTALKUSER"/
+ cp -RL "$LOGTALKHOME"/examples "$LOGTALKUSER"/
+ cp -RL "$LOGTALKHOME"/library "$LOGTALKUSER"/
+ cp -RL "$LOGTALKHOME"/scratch "$LOGTALKUSER"/
+@@ -135,16 +133,7 @@
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/lgt2*
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/logtalk.dtd
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/logtalk.xsd
+-ln -sf "$LOGTALKHOME"/BIBLIOGRAPHY.bib "$LOGTALKUSER"/BIBLIOGRAPHY.bib
+-ln -sf "$LOGTALKHOME"/CUSTOMIZE.md "$LOGTALKUSER"/CUSTOMIZE.md
+-ln -sf "$LOGTALKHOME"/INSTALL.md "$LOGTALKUSER"/INSTALL.md
+-ln -sf "$LOGTALKHOME"/LICENSE.txt "$LOGTALKUSER"/LICENSE.txt
+-ln -sf "$LOGTALKHOME"/QUICK_START.md "$LOGTALKUSER"/QUICK_START.md
+-ln -sf "$LOGTALKHOME"/README.md "$LOGTALKUSER"/README.md
+-ln -sf "$LOGTALKHOME"/RELEASE_NOTES.md "$LOGTALKUSER"/RELEASE_NOTES.md
+-ln -sf "$LOGTALKHOME"/UPGRADING.md "$LOGTALKUSER"/UPGRADING.md
+ ln -sf "$LOGTALKHOME"/adapters "$LOGTALKUSER"/adapters
+-ln -sf "$LOGTALKHOME"/manuals "$LOGTALKUSER"/manuals
+ ln -sf "$LOGTALKHOME"/paths "$LOGTALKUSER"/paths
+ ln -sf "$LOGTALKHOME"/coding "$LOGTALKUSER"/coding
+ ln -sf "$LOGTALKHOME"/tools/lgtdoc/xml/lgt2html.sh "$LOGTALKUSER"/tools/lgtdoc/xml/lgt2html
diff --git a/dev-lang/logtalk/files/logtalk-3.03.0-no-user-docs.patch b/dev-lang/logtalk/files/logtalk-3.03.0-no-user-docs.patch
new file mode 100644
index 000000000000..b28fd4852b04
--- /dev/null
+++ b/dev-lang/logtalk/files/logtalk-3.03.0-no-user-docs.patch
@@ -0,0 +1,34 @@
+--- logtalk-3.03.0.orig/scripts/logtalk_user_setup.sh 2016-02-16 22:09:02.000000000 +0100
++++ logtalk-3.03.0/scripts/logtalk_user_setup.sh 2016-02-20 09:49:34.000000000 +0100
+@@ -110,14 +110,12 @@
+
+ echo "Copying Logtalk files and directories..."
+ mkdir -p "$LOGTALKUSER"/contributions
+-mkdir -p "$LOGTALKUSER"/docs
+ mkdir -p "$LOGTALKUSER"/examples
+ mkdir -p "$LOGTALKUSER"/library
+ mkdir -p "$LOGTALKUSER"/scratch
+ mkdir -p "$LOGTALKUSER"/tests
+ mkdir -p "$LOGTALKUSER"/tools
+ cp -RL "$LOGTALKHOME"/contributions "$LOGTALKUSER"/
+-cp -RL "$LOGTALKHOME"/docs "$LOGTALKUSER"/
+ cp -RL "$LOGTALKHOME"/examples "$LOGTALKUSER"/
+ cp -RL "$LOGTALKHOME"/library "$LOGTALKUSER"/
+ cp -RL "$LOGTALKHOME"/scratch "$LOGTALKUSER"/
+@@ -131,16 +129,7 @@
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/lgt2*
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/logtalk.dtd
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/logtalk.xsd
+-ln -sf "$LOGTALKHOME"/BIBLIOGRAPHY.bib "$LOGTALKUSER"/BIBLIOGRAPHY.bib
+-ln -sf "$LOGTALKHOME"/CUSTOMIZE.md "$LOGTALKUSER"/CUSTOMIZE.md
+-ln -sf "$LOGTALKHOME"/INSTALL.md "$LOGTALKUSER"/INSTALL.md
+-ln -sf "$LOGTALKHOME"/LICENSE.txt "$LOGTALKUSER"/LICENSE.txt
+-ln -sf "$LOGTALKHOME"/QUICK_START.md "$LOGTALKUSER"/QUICK_START.md
+-ln -sf "$LOGTALKHOME"/README.md "$LOGTALKUSER"/README.md
+-ln -sf "$LOGTALKHOME"/RELEASE_NOTES.md "$LOGTALKUSER"/RELEASE_NOTES.md
+-ln -sf "$LOGTALKHOME"/UPGRADING.md "$LOGTALKUSER"/UPGRADING.md
+ ln -sf "$LOGTALKHOME"/adapters "$LOGTALKUSER"/adapters
+-ln -sf "$LOGTALKHOME"/manuals "$LOGTALKUSER"/manuals
+ ln -sf "$LOGTALKHOME"/paths "$LOGTALKUSER"/paths
+ ln -sf "$LOGTALKHOME"/coding "$LOGTALKUSER"/coding
+ ln -sf "$LOGTALKHOME"/tools/lgtdoc/xml/lgt2html.sh "$LOGTALKUSER"/tools/lgtdoc/xml/lgt2html
diff --git a/dev-lang/logtalk/files/logtalk-3.07.0-no-user-docs.patch b/dev-lang/logtalk/files/logtalk-3.07.0-no-user-docs.patch
new file mode 100644
index 000000000000..b28fd4852b04
--- /dev/null
+++ b/dev-lang/logtalk/files/logtalk-3.07.0-no-user-docs.patch
@@ -0,0 +1,34 @@
+--- logtalk-3.03.0.orig/scripts/logtalk_user_setup.sh 2016-02-16 22:09:02.000000000 +0100
++++ logtalk-3.03.0/scripts/logtalk_user_setup.sh 2016-02-20 09:49:34.000000000 +0100
+@@ -110,14 +110,12 @@
+
+ echo "Copying Logtalk files and directories..."
+ mkdir -p "$LOGTALKUSER"/contributions
+-mkdir -p "$LOGTALKUSER"/docs
+ mkdir -p "$LOGTALKUSER"/examples
+ mkdir -p "$LOGTALKUSER"/library
+ mkdir -p "$LOGTALKUSER"/scratch
+ mkdir -p "$LOGTALKUSER"/tests
+ mkdir -p "$LOGTALKUSER"/tools
+ cp -RL "$LOGTALKHOME"/contributions "$LOGTALKUSER"/
+-cp -RL "$LOGTALKHOME"/docs "$LOGTALKUSER"/
+ cp -RL "$LOGTALKHOME"/examples "$LOGTALKUSER"/
+ cp -RL "$LOGTALKHOME"/library "$LOGTALKUSER"/
+ cp -RL "$LOGTALKHOME"/scratch "$LOGTALKUSER"/
+@@ -131,16 +129,7 @@
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/lgt2*
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/logtalk.dtd
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/logtalk.xsd
+-ln -sf "$LOGTALKHOME"/BIBLIOGRAPHY.bib "$LOGTALKUSER"/BIBLIOGRAPHY.bib
+-ln -sf "$LOGTALKHOME"/CUSTOMIZE.md "$LOGTALKUSER"/CUSTOMIZE.md
+-ln -sf "$LOGTALKHOME"/INSTALL.md "$LOGTALKUSER"/INSTALL.md
+-ln -sf "$LOGTALKHOME"/LICENSE.txt "$LOGTALKUSER"/LICENSE.txt
+-ln -sf "$LOGTALKHOME"/QUICK_START.md "$LOGTALKUSER"/QUICK_START.md
+-ln -sf "$LOGTALKHOME"/README.md "$LOGTALKUSER"/README.md
+-ln -sf "$LOGTALKHOME"/RELEASE_NOTES.md "$LOGTALKUSER"/RELEASE_NOTES.md
+-ln -sf "$LOGTALKHOME"/UPGRADING.md "$LOGTALKUSER"/UPGRADING.md
+ ln -sf "$LOGTALKHOME"/adapters "$LOGTALKUSER"/adapters
+-ln -sf "$LOGTALKHOME"/manuals "$LOGTALKUSER"/manuals
+ ln -sf "$LOGTALKHOME"/paths "$LOGTALKUSER"/paths
+ ln -sf "$LOGTALKHOME"/coding "$LOGTALKUSER"/coding
+ ln -sf "$LOGTALKHOME"/tools/lgtdoc/xml/lgt2html.sh "$LOGTALKUSER"/tools/lgtdoc/xml/lgt2html
diff --git a/dev-lang/logtalk/files/logtalk-3.11.2-portage.patch b/dev-lang/logtalk/files/logtalk-3.11.2-portage.patch
new file mode 100644
index 000000000000..bbe75385a92e
--- /dev/null
+++ b/dev-lang/logtalk/files/logtalk-3.11.2-portage.patch
@@ -0,0 +1,18 @@
+diff -urN logtalk-3.11.2.orig/scripts/logtalk_user_setup.sh logtalk-3.11.2/scripts/logtalk_user_setup.sh
+--- logtalk-3.11.2.orig/scripts/logtalk_user_setup.sh 2017-08-28 10:13:52.000000000 +0200
++++ logtalk-3.11.2/scripts/logtalk_user_setup.sh 2017-09-24 14:47:36.815968990 +0200
+@@ -130,14 +130,6 @@
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/lgt2*
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/logtalk.dtd
+ rm -f "$LOGTALKUSER"/tools/lgtdoc/xml/logtalk.xsd
+-ln -sf "$LOGTALKHOME"/BIBLIOGRAPHY.bib "$LOGTALKUSER"/BIBLIOGRAPHY.bib
+-ln -sf "$LOGTALKHOME"/CUSTOMIZE.md "$LOGTALKUSER"/CUSTOMIZE.md
+-ln -sf "$LOGTALKHOME"/INSTALL.md "$LOGTALKUSER"/INSTALL.md
+-ln -sf "$LOGTALKHOME"/LICENSE.txt "$LOGTALKUSER"/LICENSE.txt
+-ln -sf "$LOGTALKHOME"/QUICK_START.md "$LOGTALKUSER"/QUICK_START.md
+-ln -sf "$LOGTALKHOME"/README.md "$LOGTALKUSER"/README.md
+-ln -sf "$LOGTALKHOME"/RELEASE_NOTES.md "$LOGTALKUSER"/RELEASE_NOTES.md
+-ln -sf "$LOGTALKHOME"/UPGRADING.md "$LOGTALKUSER"/UPGRADING.md
+ ln -sf "$LOGTALKHOME"/adapters "$LOGTALKUSER"/adapters
+ ln -sf "$LOGTALKHOME"/manuals "$LOGTALKUSER"/manuals
+ ln -sf "$LOGTALKHOME"/paths "$LOGTALKUSER"/paths
diff --git a/dev-lang/logtalk/logtalk-3.00.0.ebuild b/dev-lang/logtalk/logtalk-3.00.0.ebuild
new file mode 100644
index 000000000000..18801007a6b0
--- /dev/null
+++ b/dev-lang/logtalk/logtalk-3.00.0.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fdo-mime
+
+DESCRIPTION="Open source object-oriented logic programming language"
+HOMEPAGE="http://logtalk.org"
+SRC_URI="http://logtalk.org/files/${P}.tar.bz2"
+LICENSE="logtalk"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc fop xslt"
+
+DEPEND=""
+RDEPEND="
+ xslt? ( dev-libs/libxslt )
+ fop? ( dev-java/fop )
+ ${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-user-docs.patch
+}
+
+src_install() {
+ # Look at scripts/install.sh for upstream installation process.
+ # Install logtalk base
+ mv scripts/logtalk_user_setup.sh integration/
+ mkdir -p "${D}/usr/share/${P}"
+ cp -r adapters coding contributions core examples integration \
+ library paths scratch tests tools VERSION.txt \
+ loader-sample.lgt settings-sample.lgt tester-sample.lgt \
+ "${D}/usr/share/${P}" \
+ || die "Failed to install files"
+
+ # Install mime file, the database will be updated later
+ insinto /usr/share/mime/packages
+ doins scripts/freedesktop/logtalk.xml
+
+ # Install documentation
+ dodoc ACKNOWLEDGMENTS.md BIBLIOGRAPHY.bib CUSTOMIZE.md \
+ INSTALL.md LICENSE.txt QUICK_START.md README.md \
+ RELEASE_NOTES.md UPGRADING.md VERSION.txt
+ if use doc ; then
+ dohtml -r docs/* \
+ || die "Failed to install html core documentation"
+ dohtml -r manuals/* \
+ || die "Failed to install html manual"
+ fi
+
+ rm -f man/man1/logtalk_backend_select.1
+ rm -f man/man1/logtalk_version_select.1
+ doman man/man1/*.1 || die "Failed to install man pages"
+
+ # Integration symlinks
+ dosym /usr/share/${P}/integration/logtalk_user_setup.sh \
+ /usr/bin/logtalk_user_setup
+ dosym /usr/share/${P}/integration/bplgt.sh \
+ /usr/bin/bplgt
+ dosym /usr/share/${P}/integration/cxlgt.sh \
+ /usr/bin/cxlgt
+ dosym /usr/share/${P}/integration/eclipselgt.sh \
+ /usr/bin/eclipselgt
+ dosym /usr/share/${P}/integration/gplgt.sh \
+ /usr/bin/gplgt
+ dosym /usr/share/${P}/integration/lplgt.sh \
+ /usr/bin/lplgt
+ dosym /usr/share/${P}/integration/qplgt.sh \
+ /usr/bin/qplgt
+ dosym /usr/share/${P}/integration/quintuslgt.sh \
+ /usr/bin/quintuslgt
+ dosym /usr/share/${P}/integration/sicstuslgt.sh \
+ /usr/bin/sicstuslgt
+ dosym /usr/share/${P}/integration/swilgt.sh \
+ /usr/bin/swilgt
+ dosym /usr/share/${P}/integration/xsblgt.sh \
+ /usr/bin/xsblgt
+ dosym /usr/share/${P}/integration/xsbmtlgt.sh \
+ /usr/bin/xsbmtlgt
+ dosym /usr/share/${P}/integration/yaplgt.sh \
+ /usr/bin/yaplgt
+
+ dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2xml.sh \
+ /usr/bin/lgt2xml
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2html.sh \
+ /usr/bin/lgt2html
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2txt.sh \
+ /usr/bin/lgt2txt
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2md.sh \
+ /usr/bin/lgt2md
+ use fop && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2pdf.sh \
+ /usr/bin/lgt2pdf
+
+ # Install environment files
+ echo "LOGTALKHOME=/usr/share/${P}" > 99logtalk
+ doenvd 99logtalk
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+
+ ewarn "Before running logtalk, users should execute"
+ ewarn "logtalk_user_setup *once*."
+ ewarn ""
+ ewarn "The following integration scripts are installed"
+ ewarn "for running logtalk with selected Prolog compilers:"
+ ewarn "B-Prolog: /usr/bin/bplgt"
+ ewarn "CxProlog: /usr/bin/cxlgt"
+ ewarn "ECLiPSe: /usr/bin/eclipselgt"
+ ewarn "GNU Prolog: /usr/bin/gplgt"
+ ewarn "Lean Prolog: /usr/bin/lplgt"
+ ewarn "Qu-Prolog: /usr/bin/qplgt"
+ ewarn "Quintus Prolog: /usr/bin/quintuslgt"
+ ewarn "SICStus Prolog: /usr/bin/sicstuslgt"
+ ewarn "SWI Prolog: /usr/bin/swilgt"
+ ewarn "XSB: /usr/bin/xsblgt"
+ ewarn "XSB MT: /usr/bin/xsbmtlgt"
+ ewarn "YAP: /usr/bin/yaplgt"
+ ewarn ""
+
+ ewarn "The environment has been set up to make the above"
+ ewarn "integration scripts find files automatically for logtalk."
+ ewarn "Please run 'etc-update && source /etc/profile' to update"
+ ewarn "the environment now, otherwise it will be updated at next"
+ ewarn "login."
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/dev-lang/logtalk/logtalk-3.03.0.ebuild b/dev-lang/logtalk/logtalk-3.03.0.ebuild
new file mode 100644
index 000000000000..dae592f640b3
--- /dev/null
+++ b/dev-lang/logtalk/logtalk-3.03.0.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fdo-mime
+
+DESCRIPTION="Open source object-oriented logic programming language"
+HOMEPAGE="http://logtalk.org"
+SRC_URI="http://logtalk.org/files/${P}.tar.bz2"
+LICENSE="logtalk"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc fop xslt"
+
+DEPEND=""
+RDEPEND="
+ xslt? ( dev-libs/libxslt )
+ fop? ( dev-java/fop )
+ ${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-user-docs.patch
+}
+
+src_install() {
+ # Look at scripts/install.sh for upstream installation process.
+ # Install logtalk base
+ mv scripts/logtalk_user_setup.sh integration/
+ mkdir -p "${D}/usr/share/${P}"
+ cp -r adapters coding contributions core examples integration \
+ library paths scratch tests tools VERSION.txt \
+ loader-sample.lgt settings-sample.lgt tester-sample.lgt \
+ "${D}/usr/share/${P}" \
+ || die "Failed to install files"
+
+ # Install mime file, the database will be updated later
+ insinto /usr/share/mime/packages
+ doins scripts/freedesktop/logtalk.xml
+
+ # Install documentation
+ dodoc ACKNOWLEDGMENTS.md BIBLIOGRAPHY.bib CUSTOMIZE.md \
+ INSTALL.md LICENSE.txt QUICK_START.md README.md \
+ RELEASE_NOTES.md UPGRADING.md VERSION.txt
+ if use doc ; then
+ dohtml -r docs/* \
+ || die "Failed to install html core documentation"
+ dohtml -r manuals/* \
+ || die "Failed to install html manual"
+ fi
+
+ rm -f man/man1/logtalk_backend_select.1
+ rm -f man/man1/logtalk_version_select.1
+ doman man/man1/*.1 || die "Failed to install man pages"
+
+ # Integration symlinks
+ dosym /usr/share/${P}/integration/logtalk_user_setup.sh \
+ /usr/bin/logtalk_user_setup
+ dosym /usr/share/${P}/integration/bplgt.sh \
+ /usr/bin/bplgt
+ dosym /usr/share/${P}/integration/cxlgt.sh \
+ /usr/bin/cxlgt
+ dosym /usr/share/${P}/integration/eclipselgt.sh \
+ /usr/bin/eclipselgt
+ dosym /usr/share/${P}/integration/gplgt.sh \
+ /usr/bin/gplgt
+ dosym /usr/share/${P}/integration/lplgt.sh \
+ /usr/bin/lplgt
+ dosym /usr/share/${P}/integration/qplgt.sh \
+ /usr/bin/qplgt
+ dosym /usr/share/${P}/integration/quintuslgt.sh \
+ /usr/bin/quintuslgt
+ dosym /usr/share/${P}/integration/sicstuslgt.sh \
+ /usr/bin/sicstuslgt
+ dosym /usr/share/${P}/integration/swilgt.sh \
+ /usr/bin/swilgt
+ dosym /usr/share/${P}/integration/xsblgt.sh \
+ /usr/bin/xsblgt
+ dosym /usr/share/${P}/integration/xsbmtlgt.sh \
+ /usr/bin/xsbmtlgt
+ dosym /usr/share/${P}/integration/yaplgt.sh \
+ /usr/bin/yaplgt
+
+ dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2xml.sh \
+ /usr/bin/lgt2xml
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2html.sh \
+ /usr/bin/lgt2html
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2txt.sh \
+ /usr/bin/lgt2txt
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2md.sh \
+ /usr/bin/lgt2md
+ use fop && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2pdf.sh \
+ /usr/bin/lgt2pdf
+
+ # Install environment files
+ echo "LOGTALKHOME=/usr/share/${P}" > 99logtalk
+ doenvd 99logtalk
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+
+ ewarn "Before running logtalk, users should execute"
+ ewarn "logtalk_user_setup *once*"
+ ewarn ""
+ ewarn "The following integration scripts are installed"
+ ewarn "for running logtalk with selected Prolog compilers:"
+ ewarn "B-Prolog: /usr/bin/bplgt"
+ ewarn "CxProlog: /usr/bin/cxlgt"
+ ewarn "ECLiPSe: /usr/bin/eclipselgt"
+ ewarn "GNU Prolog: /usr/bin/gplgt"
+ ewarn "Lean Prolog: /usr/bin/lplgt"
+ ewarn "Qu-Prolog: /usr/bin/qplgt"
+ ewarn "Quintus Prolog: /usr/bin/quintuslgt"
+ ewarn "SICStus Prolog: /usr/bin/sicstuslgt"
+ ewarn "SWI Prolog: /usr/bin/swilgt"
+ ewarn "XSB: /usr/bin/xsblgt"
+ ewarn "XSB MT: /usr/bin/xsbmtlgt"
+ ewarn "YAP: /usr/bin/yaplgt"
+ ewarn ""
+
+ ewarn "The environment has been set up to make the above"
+ ewarn "integration scripts find files automatically for logtalk."
+ ewarn "Please run 'etc-update && source /etc/profile' to update"
+ ewarn "the environment now, otherwise it will be updated at next"
+ ewarn "login."
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/dev-lang/logtalk/logtalk-3.07.0.ebuild b/dev-lang/logtalk/logtalk-3.07.0.ebuild
new file mode 100644
index 000000000000..cb0cc659b75b
--- /dev/null
+++ b/dev-lang/logtalk/logtalk-3.07.0.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fdo-mime
+
+DESCRIPTION="Open source object-oriented logic programming language"
+HOMEPAGE="http://logtalk.org"
+SRC_URI="http://logtalk.org/files/${P}.tar.bz2"
+LICENSE="Apache-2.0"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc fop xslt"
+
+DEPEND=""
+RDEPEND="
+ xslt? ( dev-libs/libxslt )
+ fop? ( dev-java/fop )
+ ${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-user-docs.patch
+}
+
+src_install() {
+ # Look at scripts/install.sh for upstream installation process.
+ # Install logtalk base
+ mv scripts/logtalk_user_setup.sh integration/
+ mkdir -p "${D}/usr/share/${P}"
+ cp -r adapters coding contributions core examples integration \
+ library paths scratch tests tools VERSION.txt \
+ loader-sample.lgt settings-sample.lgt tester-sample.lgt \
+ tests-sample.lgt \
+ "${D}/usr/share/${P}" \
+ || die "Failed to install files"
+
+ # Install mime file, the database will be updated later
+ insinto /usr/share/mime/packages
+ doins scripts/freedesktop/logtalk.xml
+
+ # Install documentation
+ dodoc ACKNOWLEDGMENTS.md BIBLIOGRAPHY.bib CUSTOMIZE.md \
+ INSTALL.md LICENSE.txt QUICK_START.md README.md \
+ RELEASE_NOTES.md UPGRADING.md VERSION.txt
+ if use doc ; then
+ dohtml -r docs/* \
+ || die "Failed to install html core documentation"
+ dohtml -r manuals/* \
+ || die "Failed to install html manual"
+ fi
+
+ rm -f man/man1/logtalk_backend_select.1
+ rm -f man/man1/logtalk_version_select.1
+ doman man/man1/*.1 || die "Failed to install man pages"
+
+ # Integration symlinks
+ dosym /usr/share/${P}/integration/logtalk_user_setup.sh \
+ /usr/bin/logtalk_user_setup
+ dosym /usr/share/${P}/integration/bplgt.sh \
+ /usr/bin/bplgt
+ dosym /usr/share/${P}/integration/cxlgt.sh \
+ /usr/bin/cxlgt
+ dosym /usr/share/${P}/integration/eclipselgt.sh \
+ /usr/bin/eclipselgt
+ dosym /usr/share/${P}/integration/gplgt.sh \
+ /usr/bin/gplgt
+ dosym /usr/share/${P}/integration/lplgt.sh \
+ /usr/bin/lplgt
+ dosym /usr/share/${P}/integration/qplgt.sh \
+ /usr/bin/qplgt
+ dosym /usr/share/${P}/integration/quintuslgt.sh \
+ /usr/bin/quintuslgt
+ dosym /usr/share/${P}/integration/sicstuslgt.sh \
+ /usr/bin/sicstuslgt
+ dosym /usr/share/${P}/integration/swilgt.sh \
+ /usr/bin/swilgt
+ dosym /usr/share/${P}/integration/xsblgt.sh \
+ /usr/bin/xsblgt
+ dosym /usr/share/${P}/integration/xsbmtlgt.sh \
+ /usr/bin/xsbmtlgt
+ dosym /usr/share/${P}/integration/yaplgt.sh \
+ /usr/bin/yaplgt
+
+ dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2xml.sh \
+ /usr/bin/lgt2xml
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2html.sh \
+ /usr/bin/lgt2html
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2txt.sh \
+ /usr/bin/lgt2txt
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2md.sh \
+ /usr/bin/lgt2md
+ use fop && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2pdf.sh \
+ /usr/bin/lgt2pdf
+
+ # Install environment files
+ echo "LOGTALKHOME=/usr/share/${P}" > 99logtalk
+ doenvd 99logtalk
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+
+ ewarn "The following integration scripts are installed"
+ ewarn "for running logtalk with selected Prolog compilers:"
+ ewarn "B-Prolog: /usr/bin/bplgt"
+ ewarn "CxProlog: /usr/bin/cxlgt"
+ ewarn "ECLiPSe: /usr/bin/eclipselgt"
+ ewarn "GNU Prolog: /usr/bin/gplgt"
+ ewarn "Lean Prolog: /usr/bin/lplgt"
+ ewarn "Qu-Prolog: /usr/bin/qplgt"
+ ewarn "Quintus Prolog: /usr/bin/quintuslgt"
+ ewarn "SICStus Prolog: /usr/bin/sicstuslgt"
+ ewarn "SWI Prolog: /usr/bin/swilgt"
+ ewarn "XSB: /usr/bin/xsblgt"
+ ewarn "XSB MT: /usr/bin/xsbmtlgt"
+ ewarn "YAP: /usr/bin/yaplgt"
+ ewarn ""
+
+ ewarn "The environment has been set up to make the above"
+ ewarn "integration scripts find files automatically for logtalk."
+ ewarn "Please run 'etc-update && source /etc/profile' to update"
+ ewarn "the environment now, otherwise it will be updated at next"
+ ewarn "login."
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/dev-lang/logtalk/logtalk-3.11.2.ebuild b/dev-lang/logtalk/logtalk-3.11.2.ebuild
new file mode 100644
index 000000000000..4469d4c34937
--- /dev/null
+++ b/dev-lang/logtalk/logtalk-3.11.2.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils fdo-mime
+
+DESCRIPTION="Open source object-oriented logic programming language"
+HOMEPAGE="http://logtalk.org"
+SRC_URI="http://logtalk.org/files/${P}.tar.bz2"
+LICENSE="Apache-2.0"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="fop xslt"
+
+DEPEND=""
+RDEPEND="${DEPEND}
+ xslt? ( dev-libs/libxslt )
+ fop? ( dev-java/fop )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-portage.patch
+}
+
+src_install() {
+ # Look at scripts/install.sh for upstream installation process.
+ # Install logtalk base
+ mv scripts/logtalk_user_setup.sh integration/
+ mkdir -p "${D}/usr/share/${P}"
+ cp -r adapters coding contributions core docs examples integration \
+ library manuals paths scratch tests tools VERSION.txt \
+ loader-sample.lgt settings-sample.lgt tester-sample.lgt \
+ tests-sample.lgt \
+ "${D}/usr/share/${P}" \
+ || die "Failed to install files"
+
+ # Install mime file, the database will be updated later
+ insinto /usr/share/mime/packages
+ doins scripts/freedesktop/logtalk.xml
+
+ # Install documentation
+ dodoc ACKNOWLEDGMENTS.md BIBLIOGRAPHY.bib CUSTOMIZE.md \
+ INSTALL.md LICENSE.txt QUICK_START.md README.md \
+ RELEASE_NOTES.md UPGRADING.md VERSION.txt
+
+ rm -f man/man1/logtalk_backend_select.1
+ rm -f man/man1/logtalk_version_select.1
+ doman man/man1/*.1 || die "Failed to install man pages"
+
+ # Integration symlinks
+ dosym /usr/share/${P}/integration/logtalk_user_setup.sh \
+ /usr/bin/logtalk_user_setup
+ dosym /usr/share/${P}/integration/bplgt.sh \
+ /usr/bin/bplgt
+ dosym /usr/share/${P}/integration/cxlgt.sh \
+ /usr/bin/cxlgt
+ dosym /usr/share/${P}/integration/eclipselgt.sh \
+ /usr/bin/eclipselgt
+ dosym /usr/share/${P}/integration/gplgt.sh \
+ /usr/bin/gplgt
+ dosym /usr/share/${P}/integration/jiplgt.sh \
+ /usr/bin/jiplgt
+ dosym /usr/share/${P}/integration/lplgt.sh \
+ /usr/bin/lplgt
+ dosym /usr/share/${P}/integration/qplgt.sh \
+ /usr/bin/qplgt
+ dosym /usr/share/${P}/integration/quintuslgt.sh \
+ /usr/bin/quintuslgt
+ dosym /usr/share/${P}/integration/sicstuslgt.sh \
+ /usr/bin/sicstuslgt
+ dosym /usr/share/${P}/integration/swilgt.sh \
+ /usr/bin/swilgt
+ dosym /usr/share/${P}/integration/xsblgt.sh \
+ /usr/bin/xsblgt
+ dosym /usr/share/${P}/integration/xsbmtlgt.sh \
+ /usr/bin/xsbmtlgt
+ dosym /usr/share/${P}/integration/yaplgt.sh \
+ /usr/bin/yaplgt
+
+ dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2xml.sh \
+ /usr/bin/lgt2xml
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2html.sh \
+ /usr/bin/lgt2html
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2txt.sh \
+ /usr/bin/lgt2txt
+ use xslt && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2md.sh \
+ /usr/bin/lgt2md
+ use fop && dosym /usr/share/${P}/tools/lgtdoc/xml/lgt2pdf.sh \
+ /usr/bin/lgt2pdf
+
+ # Install environment files
+ echo "LOGTALKHOME=/usr/share/${P}" > 99logtalk
+ doenvd 99logtalk
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+
+ ewarn "The following integration scripts are installed"
+ ewarn "for running logtalk with selected Prolog compilers:"
+ ewarn "B-Prolog: /usr/bin/bplgt"
+ ewarn "CxProlog: /usr/bin/cxlgt"
+ ewarn "ECLiPSe: /usr/bin/eclipselgt"
+ ewarn "GNU Prolog: /usr/bin/gplgt"
+ ewarn "JIProlog: /usr/bin/jiplgt"
+ ewarn "Lean Prolog: /usr/bin/lplgt"
+ ewarn "Qu-Prolog: /usr/bin/qplgt"
+ ewarn "Quintus Prolog: /usr/bin/quintuslgt"
+ ewarn "SICStus Prolog: /usr/bin/sicstuslgt"
+ ewarn "SWI Prolog: /usr/bin/swilgt"
+ ewarn "XSB: /usr/bin/xsblgt"
+ ewarn "XSB MT: /usr/bin/xsbmtlgt"
+ ewarn "YAP: /usr/bin/yaplgt"
+ ewarn ""
+
+ ewarn "The environment has been set up to make the above"
+ ewarn "integration scripts find files automatically for logtalk."
+ ewarn "Please run 'etc-update && source /etc/profile' to update"
+ ewarn "the environment now, otherwise it will be updated at next"
+ ewarn "login."
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/dev-lang/logtalk/metadata.xml b/dev-lang/logtalk/metadata.xml
new file mode 100644
index 000000000000..7adf5e18089a
--- /dev/null
+++ b/dev-lang/logtalk/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>prolog@gentoo.org</email>
+ <name>Prolog</name>
+</maintainer>
+<use>
+ <flag name="xslt">Support for generating html documentation using xslt</flag>
+ <flag name="fop">Support for generating pdf documentation using fop</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest
new file mode 100644
index 000000000000..0147ede94533
--- /dev/null
+++ b/dev-lang/lua/Manifest
@@ -0,0 +1,37 @@
+AUX 5.1.4/01_all_boolean_expression.upstream.patch 1064 SHA256 9506fa6932454abe735b9d620ca0b322b4e2eb03b38a5d3d717823508110620e SHA512 b8d92c22059a50e7af0bc6fcc5773cda018628929c970650c963e2ad551cf758f503fe97de6542629d3b61ab2779970db811a1c7f7b7a2849a7632a4ec07b566 WHIRLPOOL 883a622142e9ded2d5fc7e6de282b53616ba4b1574eb00298d36f5865b981f7aac4920343826c1d8271798ee441989f95c378a42837f7aebe8c6cf1af5cc16d1
+AUX 5.1.4/02_all_table.upstream.patch 643 SHA256 e55930ccbfadf384b2b981da3454b0dfd8544ffcb29e10ad07c7404142447b09 SHA512 fe362cb51516ea010eba28d15946641ef08e49e08d8a98b0fafcb86a4eb45311f8379efb67e82dbdd83533763000b59b438b0339c784c00ecbe85266f610c9e6 WHIRLPOOL 4168c3b636b488c9cec46dfb52e3d6dc6f75a7ad93540305163b762aa7c2d428b5352a40b50217819f3422675e2c277295e9aaaf8c6cfb50b98a7d9a2aa9d1a9
+AUX 5.1.4/03_all_debug_getfenv.upstream.patch 232 SHA256 a6aa45a96ba44f04fd516851fc4188d89ad0c6d2b927d3be9faf84808c4a138d SHA512 226437b7943e914e402ac386bf8d78fe4d1584a581df2911d500a46b445aeb8c9ce5224aff2b063d1e45b56770facabc69548081f11342de212041404e8415b6 WHIRLPOOL dd2de9942456a4d5487714f6095153a7221b4befb93060c2e12cb1695da282ad221c3e2c2de1e242fa6877c686c9c64a75a2b766f33724f6546d9410b9153039
+AUX 5.1.4/04_all_gc_performance.upstream.patch 414 SHA256 cba9899e1f940b21c1a25f65279004ee64d78a4c48db3501677c106266bc23dd SHA512 e706bd69a4c471a105d50a1d97cce8a055aa532b5840cfa76f407d12d8169cac1ef077b77c75a9b9579d0480256c0d3cc6a89eba5a4027fe70494da4b6d546e8 WHIRLPOOL 316afd42bd2a00379bf18271a31d003b683af548c0123cd064a10bf2fcf0e07e0e5e6b06e469cd17413ec64da34d71ae96d18c490f10ee6889727e07f9b6cf9e
+AUX 5.1.4/05_all_string_format.upstream.patch 651 SHA256 4365eb9f4b5c4831f81e1a98f2252e3cf5522a18794e936057ae521edf9512e9 SHA512 4820764c9a832d7707b0710fc3f16a58958d23a3b2bf04875a71973a7aee65426a5c009298cf5f4d6333dc2e722f55a77b926a2cc14687927d777409a8e1ecd7 WHIRLPOOL 5d8b6c02ba93336d3793ca640add4e513e086ceb82d6062e7b7a8226503c3f998f7db67e73173826d061ac069a1b1dc3c7ff1fc5273235a4aae93cba7c7e1b32
+AUX 5.1.4/06_all_io_read.upstream.patch 319 SHA256 b363334e16edda78f1fc183f63751d8aef876e327e716468ab3f54c641f72f7c SHA512 0fba978b95c9d0ff65fd8d05ebaabd75a65922360739c4df4c0a2c8412ad60f37d7ac2ad7413ca203b481b2818d7a446495a2b6f2f45c17815c5e0c8108f1a6b WHIRLPOOL 941f10b1b8e978a2fe3108d66b62037ab2447e15bbf20046888507d5bebdd8d9a9df51368975a3a946795611b7b57774e014b9baf405126ed9939d5dee566ae7
+AUX 5.1.4/07_all_boolean_expression.upstream.patch 679 SHA256 40567e96231919a350ba460abc911d5105edacd630bcacb40ce987c3c9cb666b SHA512 1175e695cdb4f7e8ba8421a89016d40b28be165bbdb758317b7514fdd89fec51ac00a2b3d6e0a03abd76bbf98634a7ebf5b52cefbf3a3866457b84487e0efcb5 WHIRLPOOL 433495b19aa4a8609696b27c5e8cab7470680ddb15a99233cccc1c2bfea703f9688c5e358db2117bf4e625a55532aa656064abd08c83e07b26d0133f388ef1d2
+AUX 5.1.4/08_all_metatable.upstream.patch 379 SHA256 6ead3599283478a7dec288620beaf58357253154a580a80f93f1b14607a44c7f SHA512 064d8a6e23cc5a1eb099b15e554ebe24bf29a677cd4a4885977b66d1de19d84a716e348380b784b3ec3ea4cfbd5d90d91936af231f3851dea9965c646be8e792 WHIRLPOOL 68c32e36d298895b255505365de5e86fbf675764aca3984d4172271e6801199645b565c79c165d015e6411bb014e9402959e2066041e3d08b655e51f7b5e5f60
+AUX 5.1.4/09_all_prototype_collection.upstream.patch 459 SHA256 643a4a61f8812c274e3a24f5b73a4257cf4185900913deab34a06243b72f9350 SHA512 4fd573d9346e09dcbe65fc9e3a9147dc586f728db95f62d1b731b39f442b08c21d74562ceafdbd39ecad4091afda2996b582c9e9a758d4e08d1f5f9a330fe47d WHIRLPOOL 0b89ee123dfd02cc0d85565d999fa7f339208670784bfedf8de05e881c3a27435888d3e1d593b559e800df49382525795ce8bd9b1227894ee80b5f018e9f4ae9
+AUX 5.2.0/01_all_memory_hoarding.upstream.patch 1639 SHA256 1794d833097afb18c6ec4e0ed06a6a03b58dfcc4a56f0fb37b2c9fbc03754531 SHA512 c1e0d0db9899539ade393ddfe7f5b9493576227cc4e29ad6623c869d1e91b0d28061f85e5cf9fc36bb70b5e53aad5d9c8848982ccfbba2cf4a6019fd260eed8f WHIRLPOOL dbae41c0799e3cf0b72d328224042da5ea29987fb5fe8df85f8cb65fee4a321186959ce5293b6881a08d7e841475d8b65cce46acf524765f1d76286054fa630c
+AUX 5.2.0/02_all_hex_number_handling.upstream.patch 938 SHA256 608bf0ccbfc1a0b86e974bd56b0abc836eba7bb5eff412cd4288e3d0ff692e88 SHA512 950c05767fd2fb39cef253323544fe079e88443047f63b495ff7639c980fd410db0f5769fa7a19134db819b1fc0b252e5f34d48fa6c1352874f734586cc2d41e WHIRLPOOL 4662bc06437b2e5225f6ff0c2d10e17f88351732403a6760bbed9aea2b300a1fe530ba8e295e1d870ab2c4252a1bfa387d1c0e10fe059eb14c82dac5d87b7318
+AUX configure.in 66 SHA256 1b4477324c94c0793df2117e80bd325bb2cc1cf6be16658151b272d4aca023c6 SHA512 b61041151ad4be2bb4a62f6659850fcf4179553103c421694ce739b84a57408fc59d09f5ad3f6dd8513be78ffa472689dc729031e3ef42b99f11ecc8e0053ffc WHIRLPOOL 152f63a1a8fc222fb6fe11b3e196a91b3791fcfd1249e9682323f4de12dd4d550668480b45d68855b540831c3e1c483639b65c67dbf25bc6594041999eeede46
+AUX lua-5.1-make-r1.patch 2229 SHA256 bf691afd2480a496bfa9b2c46fcbb396e7034ea58e94399788e05ab7872ae46f SHA512 cd24e228b0d7f2abcb5afe045fc824811c9db9dc684f9e33f0de0e7215e18e6eae51fd86c5910a338a810679d46727944950fced42636e0484d9c3f08fa07fdd WHIRLPOOL fe780fb12a45c7c8a702ce71e6dfad83f45d9a23c16428d4216464019d065010a1015e786fee6830db0f424d9bfffb4214cca3fa16f7dffc33945d04960ef5b6
+AUX lua-5.1-make-r2.patch 3071 SHA256 ebf496443f6171e3f285a666b2ced5d68c03be05fd01dc17373cd65228637b07 SHA512 a5384262e033943fe0088ca14d854d1e3767f8e266d09ba1bb15caf5f3f4bf6285ed1e37dad100f931195bce0eca5a862bf52ab664482aaba6ccd905b6ca8ecd WHIRLPOOL 8e0035c3634177fe4104a71d2490919bcfca6db360002cf1c48f808a3ee902e52e0091e6b23da1e64c79032481b18a1a3450ee3dd91a98dc9a0ce447a317b2a0
+AUX lua-5.1-make_static-r1.patch 644 SHA256 077f5da55b9b354b8b901d8a769c92aad104d79ba0a6acee0096c9a5d94b259a SHA512 8cb1de7281839ebb492979f71b65c9ff6bbbde413c88323be6b77d7b7d26eb2034c541a883fd7cfab0694293732f3ac46dba33620d7df30c45059560b8d6503d WHIRLPOOL 9874b62e02b38bb1b935cba4b2a07e6b181c30bc2efc907478d2d48b98634718727ab5417825cfafd222090447ff900a09f1a71228756bc3b5f761576204bf74
+AUX lua-5.1-module_paths.patch 1078 SHA256 1115b6aa00eb4e918156ae70c763534bd2f603ba888da75e4908c19c2ac3e5f7 SHA512 123b115389d01d383af8698d2ed66c75bb7c3e2d33de57b8539ae56a9478930a0a72fa5657e78cc1c5b6bef00d07ec3a51e19ec0e419647e84eb158fb5c4795a WHIRLPOOL 08ee01e2758274e66096caba4a06f258a8fe1cdfba01623d075efae5502ebd706bcd1e689cede736d63e8f9582e64d11e9e0c9df903d55d400cd5bfa7163b55e
+AUX lua-5.1-readline.patch 360 SHA256 1f0f90eb8103e338f1188cc884c0c59cc6afd023828c11d86b8145b2a8d1efc2 SHA512 a99154258419dc2e582804eae97517687e5b8b5f731dc91722193d1ff470b8522af6ff4e7142c9258afe4734cd52e6987d3c2108ac52b1487a262f1e89f2f332 WHIRLPOOL 6523ca31a979d3af78346479da5b70d60a1880ed78715eb68373f4a21bb9e5a6afe3ee341f7d872f3ca9ecb02ae04826be6790565f288952657e3a92254730f6
+AUX lua-5.1.4-deprecated.patch 1417 SHA256 8d4d3c35d9cfb65f6caa360c09d1fa0c5dc1ee0de3389c1e73602fef86cd0e9f SHA512 5b82058ece2cde2a720f9cdae727be0a68895438f90e24f2e37adb1cd79cf637ce20bb283918e44f4f561aa87a9b4f19d3305d71537671f61438962d48970f39 WHIRLPOOL 34fad887d3a1eb1eedb4ba73852bd976c9397fbacc294adf31862684e1b957512c5a23ca54b2c5f0adebf9ce70b4d7e23103c3cbd0a1efda54a88e9fbb46a8e2
+AUX lua-5.1.4-test.patch 340 SHA256 cdbb06f6fc5e75512c912360e1efc12e1e62ac7079972ff1c9c9273898bf9e31 SHA512 720135cc9d4c224717c2718b5709b43a1d66340fbdc3826037db672ef92014b6145f50263198d7641525194e6f9f9fdf16b78bdc6fb832dd7d13a89f06af67d9 WHIRLPOOL ff625882f25d9b638031f29498ee0de3b92b353c48c381160294156e500c6b9735ddb5c09a0739243c0cceb40bcd234bd4bd3faab41b0b8c7f91c3f5c42889b4
+AUX lua-5.1.5-fix_vararg_calls.patch 470 SHA256 756ae7101590329d6b17e1d3bd1bde990317a31864f4804d78a49525fe0e554b SHA512 630e8537bd80771fecc4c8216ec96e243654bd0b7bd006b6867baca4effab90bab4a922951661d4fc3ac2700c3bd7c0c40227b9eeee7dd5a87c07a6382055b04 WHIRLPOOL f3e426eafad9284d5723893bfa18627c02c31caa309c022aa6f1c3a329ab7905fa7da24aa740fdf8eb0ed3f3ef19cedb88ac53be59f5bc5261cc4935dd9dc54c
+AUX lua-5.2-make-r1.patch 2442 SHA256 8447577f843eab7c6173431e97e9bec554f9cfdfe692294c2cce8ff5916f5329 SHA512 e51b6fd7c77906a918f3987379e134d7423cc9683efdf6cdd2992b187ab0fed99732523b0f2819816a8789e4ed176c6f62774237f036e09e0c9d56582e0c3be0 WHIRLPOOL 7e94f2221f2f708ef340c177bee0402d60e1b484d860a7400424ad050f2461fbb817358a30f95db66e85cae5403eb572bfff59280f175ea6dfb27d1aa82f2fd4
+AUX lua-5.3-make-r1.patch 2854 SHA256 9a0f7bfbf13a7c4ab2bc2d2cd85ac4a0650addd31cc53b3a56569f5dddf1d168 SHA512 80c2930bbd204551545cdd6793ec8dcd7d753fffc29710786b3662dde13b1af3a9825c95118e23bc98149f316f12f008223b675df929a244ef29c8a2a773560a WHIRLPOOL 2f470f6d5452d4a7f38b0f8bc1ee2c3c28dd40b1e720e83cc90c12eb40138232ef2521b60926ea8b158fcf402f4c7b2ad08f9eef41335e447add57cb6fcb938c
+AUX lua.pc 658 SHA256 ff7ae80c41698f27f4d1168c4cb2931d7b232e66528d9a2b0939723f4bb00145 SHA512 cb476ea6dd004a9aa0094cfc219d1888c5f578b44968a960acf1f2f32783a8e4d770bb033fb1ab4851f225188bbdd434b5d239718cae2c2c35f5b5f124a722ca WHIRLPOOL 6decd114e5edb6a5e4b17df8758f163a35f063b8e8a57c26bc2ada01145c1cc50d69a3146013e2edecb856c3c3220ed5f775f3b95cefb7655e5e7349bf988cb9
+DIST lua-5.1.5.tar.gz 221213 SHA256 2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333 SHA512 0142fefcbd13afcd9b201403592aa60620011cc8e8559d4d2db2f92739d18186860989f48caa45830ff4f99bfc7483287fd3ff3a16d4dec928e2767ce4d542a9 WHIRLPOOL 9dac93b73b9ad1ef6c69e0aa11fb53d5efe89274b65c55a1ac30bab23e8a255851b0e44306db54212b1d481e658cecd38e5ff22a25e1fa974858b7b03fb45b75
+DIST lua-5.2.3.tar.gz 251195 SHA256 13c2fb97961381f7d06d5b5cea55b743c163800896fd5c5e2356201d3619002d SHA512 264bb7c8db2f190ef0ca38584ec81999ab588f54e03119c5214c40bb8925b0eb407fac483a03e40cc8a220f6748ddff7d3a7392da3803418276b0d263b866449 WHIRLPOOL d278a1e38416bcf7f82eb3e7fd5fb423e60ccb69e9d57a937070516ff8be2d19a98bbfdaf37ec6fd6fb3ef2d625900977ca0cb47e46cb0ede5ebd5d37a9454ef
+DIST lua-5.3.3.tar.gz 294290 SHA256 5113c06884f7de453ce57702abaac1d618307f33f6789fa870e87a59d772aca2 SHA512 7b8122ed48ea2a9faa47d1b69b4a5b1523bb7be67e78f252bb4339bf75e957a88c5405156e22b4b63ccf607a5407bf017a4cee1ce12b1aa5262047655960a3cc WHIRLPOOL e9d58093327e3c67e167dad9952796f1f2f0dbfa4f165c0ec5a8808a6a73d3b25e564797a2804d408bdaeb7229e7684f907491137d4521119ba918ce87c781bc
+EBUILD lua-5.1.5-r100.ebuild 3770 SHA256 2ecbd6a8b5bc34175bb78f864b6b91a353ea901592810605997ac0ba8028ec17 SHA512 7b2c09578708f6c25dfeb4059bf134e428545e760b20f73e4ef61f01179ce211c351c49386d8771bd91f7ff418be9ba67e17aacccaedf1da182758dde2488aad WHIRLPOOL baaa5aab2c1aacc294a813bc187f753c2aee2978d564d4cd5c9a30e13b63fe88f45dcf3b11886fe2eb820041d5f340e5ab56d1b80598c972d9e80765e2d39ce3
+EBUILD lua-5.1.5-r101.ebuild 4031 SHA256 de9f0fd05953811c424dafd1077fe7f32a61bec4ef0bc5f809c8f30f1cfeb285 SHA512 aa8f1c4164ac498eed8c3279f2ef9d5538d583f0228c287c39a03d5cc01718a1b4adfb8c1af25368e533fcb7a105213933d577d9a82a5524deced0bb21bbcc6c WHIRLPOOL 7f14cb6042d75b961288b6fb1558b03b5582a81e4c8f64d3dbe3f6d228373bb03e5c56e51adb81bf4042c36175aeffc833f7be182640eff885b527967d963a00
+EBUILD lua-5.1.5-r4.ebuild 3665 SHA256 a0ad92d0d7e96df3d554924f1c59111f740d0e2797f02bb3fb27252972e0480c SHA512 bd9d21b1e6183634f9a005a38a8f70c51bc6edc178741991e4dccd49e4ff817ea63227d1a4d6bea65b179c9f7b17d4b0173a380331d8f2534f2f6adfee1686e8 WHIRLPOOL 6481dbf7242a3ab9a650f744904a47c010dbc6df2a49ae5c5c007b28c2ed6186ccec09d4e109bb3ebfaf58bd2479fffc301615c0cc41fc89d3954c310a4d594c
+EBUILD lua-5.2.3-r1.ebuild 3793 SHA256 8f36e8317317d6a3f9a66928968ecd63cced9700eb1671fc65bfb336f7fd2ba2 SHA512 aa3f363a71a82211a86c922bffec1704d8caa7be3fe04f8329c6c6c7e54e34a79328e707f8ad2128d787767f6030c9e1446ff93a4f950512f5bfed19cad9e334 WHIRLPOOL 2e2933c223d46301dcafabca105259af90d43aa85465802721af2193eabd61593a58dbda84b4f0710800ddea72842eff8fb9396fd00911196f56b56b1fe16faa
+EBUILD lua-5.2.3-r2.ebuild 4054 SHA256 fd752d94a3b8e78969869e4ccd81f120b706209ed20b93979a048e085a1667b4 SHA512 528881025ed6424c8174e7e066cfcd4e9a143a15b23041937dad8f17ac0206a49fbdf5804310e0cca98399f19719aeda013df01a6e15a91668e07be1180f8122 WHIRLPOOL 5b033c6070f263a7e1d36d83f1a0438b55c6bd4742a53e48ff46dbf00ba32085cb872f4674c522ac39a7bf80a7e8055707977a240c4bf66d0aee8b84bdbf5419
+EBUILD lua-5.2.3.ebuild 3279 SHA256 906ebad11d1cfabef6029647631fd5a400591c81d4eca30a58187232409f405c SHA512 cb851d092a833f29903fdf8f3f4acd6a2147b74d95504a9fe6e352e86de42c2d47739fda6552a8fa5aa849e3f68e9829921fb86a25f2009b1320ba767a4f768e WHIRLPOOL ed7ac1c1b15ed25c508d2ac12dc8fb04a6327c56eee407f3248adab8e4a4a753eade00af1391b952769d1f7eab2b85d80445511e66d51fae1a4612ee27d9b3ad
+EBUILD lua-5.3.3-r1.ebuild 4066 SHA256 8c19e02b82ab2179dba5d2fad2c3d10b43008a2176fbfdf22cda513a0a17018c SHA512 faaf2465de1617b0a6a9bf243e1329a6fc56fdf05e205df3c62366a95989453e2d65066644e315d7b4736ac032f9271bab107a33bf04397b38d22ff65f4bc540 WHIRLPOOL c8079229b48c46f29f6dbc5e734de666967ce18860c0ff42676d6e66c72ed32cbefcd01fba315f8f122e0599360d36fdfdba4ad222d6ff8577825d6d90e29b99
+EBUILD lua-5.3.3.ebuild 3805 SHA256 fe5d3e4bb3b8c43049745f38b347fcbd21f56bfccc18f255883630427dcc62eb SHA512 c911d5a741c7c68264bb447a3912a64fa928feff1fc0a4f3f5dd9643baeaf83b4ad2a9f005e0abe3cb098a437b5e07f676687826bb171faf88ba2f3225825d3c WHIRLPOOL 9c9b86aa0c7608eb9e1fbb40831163e4a2bb602266e534cecd7a7db7a306f490aa8924a1553bf3b63f2e9e92ea25e94512f68706d283c305d3598e55e7d5b5b8
+MISC ChangeLog 5822 SHA256 875067367d5b40477fd3828125fd88f816575bc7e702c07a5f3ef759bbb125ff SHA512 337dd1463ac728d8e5cb78b5920b4a02ff0e36d1b1e47dfe77586eb70a278db210b1612fc22cf6be0965daecacf4ce9c5b000ad0317ec94a0f69b11490dc9e60 WHIRLPOOL 1e59833a1451bc11f85aef662a90c90a72a16983431b5c67cba198fe9615ff5bd57d72b5acdc1a2a85c5ae2e0774b3225e266cc4f094e418b48640a91c9d7921
+MISC ChangeLog-2015 29535 SHA256 0d94a00dea04a7564b09f3d936cdf13fe556ba1126e1afc432df8edbf6fa404d SHA512 031cc926755a1654f3926d9c5e3b6e01a61c857f03050b418d5aee49d8192b58f4244cbae109dd45cb3d8c43aa42532cbf257df34bd2f7cc701e0c1cd6af008e WHIRLPOOL 3802188a9573e160c30507dac06bc830aa211edc238c56ad165ddc815fd827e5fd4bce9305bb2199646f24fdb56ee13006d84667e7b7fafaab4d745ae61c1efe
+MISC metadata.xml 451 SHA256 ce78308ac05d5727fab17ee88c47a5815584c09fb449d279a74d38ae5e98304c SHA512 ee674307c2a1daeeba3e9da078e440648ed379422801989007c15c4c8233e905b14f8e4fae66ae2804a5b39b0676e4cca9ff21fb8985874bccfef15b9dd918a9 WHIRLPOOL e15b2682053b142b73dd06e5558601b72515b5d5df8cc2433210825ab03f2b1e7e884d6c5e1ddd1e3e055bf9bb42d68b4a7994a2310e04b0595ab1706f19c413
diff --git a/dev-lang/lua/files/5.1.4/01_all_boolean_expression.upstream.patch b/dev-lang/lua/files/5.1.4/01_all_boolean_expression.upstream.patch
new file mode 100644
index 000000000000..f04eb85075a2
--- /dev/null
+++ b/dev-lang/lua/files/5.1.4/01_all_boolean_expression.upstream.patch
@@ -0,0 +1,48 @@
+--- lua-5.1.4.orig/src/lcode.c 2007/12/28 15:32:23 2.25.1.3
++++ lua-5.1.4/src/lcode.c 2009/06/15 14:07:34
+@@ -544,15 +544,18 @@
+ pc = NO_JUMP; /* always true; do nothing */
+ break;
+ }
+- case VFALSE: {
+- pc = luaK_jump(fs); /* always jump */
+- break;
+- }
+ case VJMP: {
+ invertjump(fs, e);
+ pc = e->u.s.info;
+ break;
+ }
++ case VFALSE: {
++ if (!hasjumps(e)) {
++ pc = luaK_jump(fs); /* always jump */
++ break;
++ }
++ /* else go through */
++ }
+ default: {
+ pc = jumponcond(fs, e, 0);
+ break;
+@@ -572,14 +575,17 @@
+ pc = NO_JUMP; /* always false; do nothing */
+ break;
+ }
+- case VTRUE: {
+- pc = luaK_jump(fs); /* always jump */
+- break;
+- }
+ case VJMP: {
+ pc = e->u.s.info;
+ break;
+ }
++ case VTRUE: {
++ if (!hasjumps(e)) {
++ pc = luaK_jump(fs); /* always jump */
++ break;
++ }
++ /* else go through */
++ }
+ default: {
+ pc = jumponcond(fs, e, 1);
+ break;
+
diff --git a/dev-lang/lua/files/5.1.4/02_all_table.upstream.patch b/dev-lang/lua/files/5.1.4/02_all_table.upstream.patch
new file mode 100644
index 000000000000..9ffc1bb28843
--- /dev/null
+++ b/dev-lang/lua/files/5.1.4/02_all_table.upstream.patch
@@ -0,0 +1,22 @@
+--- lua-5.1.4.orig/src/lvm.c 2007/12/28 15:32:23 2.63.1.3
++++ lua-5.1.4/src/lvm.c 2009/07/01 20:36:59
+@@ -133,6 +133,7 @@
+
+ void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) {
+ int loop;
++ TValue temp;
+ for (loop = 0; loop < MAXTAGLOOP; loop++) {
+ const TValue *tm;
+ if (ttistable(t)) { /* `t' is a table? */
+@@ -152,7 +153,9 @@
+ callTM(L, tm, t, key, val);
+ return;
+ }
+- t = tm; /* else repeat with `tm' */
++ /* else repeat with `tm' */
++ setobj(L, &temp, tm); /* avoid pointing inside table (may rehash) */
++ t = &temp;
+ }
+ luaG_runerror(L, "loop in settable");
+ }
+
diff --git a/dev-lang/lua/files/5.1.4/03_all_debug_getfenv.upstream.patch b/dev-lang/lua/files/5.1.4/03_all_debug_getfenv.upstream.patch
new file mode 100644
index 000000000000..fce4d47db8f4
--- /dev/null
+++ b/dev-lang/lua/files/5.1.4/03_all_debug_getfenv.upstream.patch
@@ -0,0 +1,10 @@
+--- lua-5.1.4.orig/src/ldblib.c 2007/12/28 15:32:23 2.63.1.3
++++ lua-5.1.4/src/ldblib.c 2010/02/23 12:36:59
+@@ -45,6 +45,7 @@
+
+
+ static int db_getfenv (lua_State *L) {
++ luaL_checkany(L, 1);
+ lua_getfenv(L, 1);
+ return 1;
+ }
diff --git a/dev-lang/lua/files/5.1.4/04_all_gc_performance.upstream.patch b/dev-lang/lua/files/5.1.4/04_all_gc_performance.upstream.patch
new file mode 100644
index 000000000000..3c78525b0b2f
--- /dev/null
+++ b/dev-lang/lua/files/5.1.4/04_all_gc_performance.upstream.patch
@@ -0,0 +1,14 @@
+--- lua-5.1.4.orig/src/llex.c 2007/12/28 15:32:23 2.63.1.3
++++ lua-5.1.4/src/llex.c 2010/02/23 12:36:59
+@@ -118,8 +118,10 @@
+ lua_State *L = ls->L;
+ TString *ts = luaS_newlstr(L, str, l);
+ TValue *o = luaH_setstr(L, ls->fs->h, ts); /* entry for `str' */
+- if (ttisnil(o))
++ if (ttisnil(o)) {
+ setbvalue(o, 1); /* make sure `str' will not be collected */
++ luaC_checkGC(L);
++ }
+ return ts;
+ }
+
diff --git a/dev-lang/lua/files/5.1.4/05_all_string_format.upstream.patch b/dev-lang/lua/files/5.1.4/05_all_string_format.upstream.patch
new file mode 100644
index 000000000000..5127507df9f6
--- /dev/null
+++ b/dev-lang/lua/files/5.1.4/05_all_string_format.upstream.patch
@@ -0,0 +1,21 @@
+--- lua-5.1.4.orig/src/lstrlib.c 2008/07/11 17:27:21 1.132.1.4
++++ lua-5.1.4/src/lstrlib.c 2010/05/14 15:12:53
+@@ -754,6 +754,7 @@
+
+
+ static int str_format (lua_State *L) {
++ int top = lua_gettop(L);
+ int arg = 1;
+ size_t sfl;
+ const char *strfrmt = luaL_checklstring(L, arg, &sfl);
+@@ -768,7 +769,8 @@
+ else { /* format item */
+ char form[MAX_FORMAT]; /* to store the format (`%...') */
+ char buff[MAX_ITEM]; /* to store the formatted item */
+- arg++;
++ if (++arg > top)
++ luaL_argerror(L, arg, "no value");
+ strfrmt = scanformat(L, strfrmt, form);
+ switch (*strfrmt++) {
+ case 'c': {
+
diff --git a/dev-lang/lua/files/5.1.4/06_all_io_read.upstream.patch b/dev-lang/lua/files/5.1.4/06_all_io_read.upstream.patch
new file mode 100644
index 000000000000..94634c591404
--- /dev/null
+++ b/dev-lang/lua/files/5.1.4/06_all_io_read.upstream.patch
@@ -0,0 +1,15 @@
+--- lua-5.1.4.orig/src/liolib.c 2008/01/18 17:47:43 2.73.1.3
++++ lua-5.1.4/src/liolib.c 2010/05/14 15:29:29
+@@ -276,7 +276,10 @@
+ lua_pushnumber(L, d);
+ return 1;
+ }
+- else return 0; /* read fails */
++ else {
++ lua_pushnil(L); /* "result" to be removed */
++ return 0; /* read fails */
++ }
+ }
+
+
+
diff --git a/dev-lang/lua/files/5.1.4/07_all_boolean_expression.upstream.patch b/dev-lang/lua/files/5.1.4/07_all_boolean_expression.upstream.patch
new file mode 100644
index 000000000000..956e966817d4
--- /dev/null
+++ b/dev-lang/lua/files/5.1.4/07_all_boolean_expression.upstream.patch
@@ -0,0 +1,30 @@
+--- lua-5.1.4.orig/src/lcode.c 2007/12/28 15:32:23 2.25.1.3
++++ lua-5.1.4/src/lcode.c 2009/06/15 14:07:34
+@@ -549,13 +549,6 @@
+ pc = e->u.s.info;
+ break;
+ }
+- case VFALSE: {
+- if (!hasjumps(e)) {
+- pc = luaK_jump(fs); /* always jump */
+- break;
+- }
+- /* else go through */
+- }
+ default: {
+ pc = jumponcond(fs, e, 0);
+ break;
+@@ -579,13 +572,6 @@
+ pc = e->u.s.info;
+ break;
+ }
+- case VTRUE: {
+- if (!hasjumps(e)) {
+- pc = luaK_jump(fs); /* always jump */
+- break;
+- }
+- /* else go through */
+- }
+ default: {
+ pc = jumponcond(fs, e, 1);
+ break;
diff --git a/dev-lang/lua/files/5.1.4/08_all_metatable.upstream.patch b/dev-lang/lua/files/5.1.4/08_all_metatable.upstream.patch
new file mode 100644
index 000000000000..b74bafbebe41
--- /dev/null
+++ b/dev-lang/lua/files/5.1.4/08_all_metatable.upstream.patch
@@ -0,0 +1,10 @@
+--- lua-5.1.4.orig/src/lvm.c 2009/07/01 21:10:33 2.63.1.4
++++ lua-5.1.4/src/lvm.c 2011/08/17 20:36:28
+@@ -142,6 +142,7 @@
+ if (!ttisnil(oldval) || /* result is no nil? */
+ (tm = fasttm(L, h->metatable, TM_NEWINDEX)) == NULL) { /* or no TM? */
+ setobj2t(L, oldval, val);
++ h->flags = 0;
+ luaC_barriert(L, h, val);
+ return;
+ }
diff --git a/dev-lang/lua/files/5.1.4/09_all_prototype_collection.upstream.patch b/dev-lang/lua/files/5.1.4/09_all_prototype_collection.upstream.patch
new file mode 100644
index 000000000000..000f78ccc7da
--- /dev/null
+++ b/dev-lang/lua/files/5.1.4/09_all_prototype_collection.upstream.patch
@@ -0,0 +1,13 @@
+--- lua-5.1.4.orig/src/lparser.c 2007/12/28 15:32:23 2.42.1.3
++++ lua-5.1.4/src/lparser.c 2011/10/17 13:10:43
+@@ -374,9 +374,9 @@
+ lua_assert(luaG_checkcode(f));
+ lua_assert(fs->bl == NULL);
+ ls->fs = fs->prev;
+- L->top -= 2; /* remove table and prototype from the stack */
+ /* last token read was anchored in defunct function; must reanchor it */
+ if (fs) anchor_token(ls);
++ L->top -= 2; /* remove table and prototype from the stack */
+ }
+
+
diff --git a/dev-lang/lua/files/5.2.0/01_all_memory_hoarding.upstream.patch b/dev-lang/lua/files/5.2.0/01_all_memory_hoarding.upstream.patch
new file mode 100644
index 000000000000..9fda24ad6609
--- /dev/null
+++ b/dev-lang/lua/files/5.2.0/01_all_memory_hoarding.upstream.patch
@@ -0,0 +1,49 @@
+--- lua-5.2.0.orig/src/ldblib.c 2007/12/28 15:32:23 2.25.1.3
++++ lua-5.2.0/src/ldblib.c 2009/06/15 14:07:34
+@@ -253,14 +253,15 @@
+ }
+
+
+-#define gethooktable(L) luaL_getsubtable(L, LUA_REGISTRYINDEX, HOOKKEY);
++#define gethooktable(L) luaL_getsubtable(L, LUA_REGISTRYINDEX, HOOKKEY)
+
+
+ static void hookf (lua_State *L, lua_Debug *ar) {
+ static const char *const hooknames[] =
+ {"call", "return", "line", "count", "tail call"};
+ gethooktable(L);
+- lua_rawgetp(L, -1, L);
++ lua_pushthread(L);
++ lua_rawget(L, -2);
+ if (lua_isfunction(L, -1)) {
+ lua_pushstring(L, hooknames[(int)ar->event]);
+ if (ar->currentline >= 0)
+@@ -306,10 +307,15 @@
+ count = luaL_optint(L, arg+3, 0);
+ func = hookf; mask = makemask(smask, count);
+ }
+- gethooktable(L);
++ if (gethooktable(L) == 0) { /* creating hook table? */
++ lua_pushstring(L, "k");
++ lua_setfield(L, -2, "__mode"); /** hooktable.__mode = "k" */
++ lua_pushvalue(L, -1);
++ lua_setmetatable(L, -2); /* setmetatable(hooktable) = hooktable */
++ }
++ lua_pushthread(L1); lua_xmove(L1, L, 1);
+ lua_pushvalue(L, arg+1);
+- lua_rawsetp(L, -2, L1); /* set new hook */
+- lua_pop(L, 1); /* remove hook table */
++ lua_rawset(L, -3); /* set new hook */
+ lua_sethook(L1, func, mask, count); /* set hooks */
+ return 0;
+ }
+@@ -325,7 +331,8 @@
+ lua_pushliteral(L, "external hook");
+ else {
+ gethooktable(L);
+- lua_rawgetp(L, -1, L1); /* get hook */
++ lua_pushthread(L1); lua_xmove(L1, L, 1);
++ lua_rawget(L, -2); /* get hook */
+ lua_remove(L, -2); /* remove hook table */
+ }
+ lua_pushstring(L, unmakemask(mask, buff));
diff --git a/dev-lang/lua/files/5.2.0/02_all_hex_number_handling.upstream.patch b/dev-lang/lua/files/5.2.0/02_all_hex_number_handling.upstream.patch
new file mode 100644
index 000000000000..26519e378e68
--- /dev/null
+++ b/dev-lang/lua/files/5.2.0/02_all_hex_number_handling.upstream.patch
@@ -0,0 +1,26 @@
+--- lua-5.2.0.orig/src/llex.c 2007/12/28 15:32:23 2.25.1.3
++++ lua-5.2.0/src/llex.c 2009/06/15 14:07:34
+@@ -223,12 +223,19 @@
+
+ /* LUA_NUMBER */
+ static void read_numeral (LexState *ls, SemInfo *seminfo) {
++ const char *expo = "Ee";
++ int first = ls->current;
+ lua_assert(lisdigit(ls->current));
+- do {
+- save_and_next(ls);
+- if (check_next(ls, "EePp")) /* exponent part? */
++ save_and_next(ls);
++ if (first == '0' && check_next(ls, "Xx")) /* hexadecimal? */
++ expo = "Pp";
++ for (;;) {
++ if (check_next(ls, expo)) /* exponent part? */
+ check_next(ls, "+-"); /* optional exponent sign */
+- } while (lislalnum(ls->current) || ls->current == '.');
++ if (lisxdigit(ls->current) || ls->current == '.')
++ save_and_next(ls);
++ else break;
++ }
+ save(ls, '\0');
+ buffreplace(ls, '.', ls->decpoint); /* follow locale for decimal point */
+ if (!buff2d(ls->buff, &seminfo->r)) /* format error? */
diff --git a/dev-lang/lua/files/configure.in b/dev-lang/lua/files/configure.in
new file mode 100644
index 000000000000..e4ba8164bbb5
--- /dev/null
+++ b/dev-lang/lua/files/configure.in
@@ -0,0 +1,5 @@
+top_buildir=.
+
+AC_INIT(src/luaconf.h)
+AC_PROG_LIBTOOL
+AC_OUTPUT()
diff --git a/dev-lang/lua/files/lua-5.1-make-r1.patch b/dev-lang/lua/files/lua-5.1-make-r1.patch
new file mode 100644
index 000000000000..8eecbdd40268
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.1-make-r1.patch
@@ -0,0 +1,66 @@
+--- lua-5.1.1.orig/Makefile 2006-06-02 12:53:38.000000000 +0200
++++ lua-5.1.1/Makefile 2006-11-16 02:16:53.000000000 +0100
+@@ -127,3 +127,21 @@
+ .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho newer
+
+ # (end of Makefile)
++
++# Use libtool for binary installs, etc.
++
++export V
++export LIBTOOL = libtool --quiet --tag=CC
++# See libtool manual about how to set this
++
++gentoo_clean:
++ cd src; $(MAKE) $@
++
++gentoo_test: gentoo_linux
++ test/lua.static test/hello.lua
++
++gentoo_install:
++ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)
++ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua luac $(INSTALL_BIN)
++ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua.la $(INSTALL_LIB)
+--- lua-5.1.1.orig/src/Makefile 2006-03-22 01:41:49.000000000 +0100
++++ lua-5.1.1/src/Makefile 2006-11-16 02:10:27.000000000 +0100
+@@ -54,1 +54,1 @@
+-$(LUA_T): $(LUA_O) $(LUA_A)
++origin$(LUA_T): $(LUA_O) $(LUA_A)
+@@ -57,1 +57,1 @@
+-$(LUAC_T): $(LUAC_O) $(LUA_A)
++origin$(LUAC_T): $(LUAC_O) $(LUA_A)
+@@ -176,3 +176,33 @@
+ ltm.h lzio.h lmem.h lopcodes.h lundump.h
+
+ # (end of Makefile)
++
++export LIBTOOL = libtool --quiet --tag=CC
++export LIB_VERSION = 6:1:1
++
++# The following rules use libtool for compiling and linking in order to
++# provide shared library support.
++
++LIB_NAME = liblua.la
++LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo)
++
++%.lo %.o: %.c
++ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
++
++$(LIB_NAME): $(LIB_OBJS)
++ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \
++ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS)
++
++$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
++
++lua_test: $(LUA_O:.o=.lo) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -static -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
++
++$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME)
++
++gentoo_clean:
++ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua luac
++
++gentoo_all: $(LIB_NAME) $(LUA_T) lua_test $(LUAC_T)
diff --git a/dev-lang/lua/files/lua-5.1-make-r2.patch b/dev-lang/lua/files/lua-5.1-make-r2.patch
new file mode 100644
index 000000000000..2905a62d0f9e
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.1-make-r2.patch
@@ -0,0 +1,97 @@
+diff -ru lua-5.1.5.orig/Makefile lua-5.1.5/Makefile
+--- lua-5.1.5.orig/Makefile 2014-04-15 17:43:34.845435031 +0200
++++ lua-5.1.5/Makefile 2014-04-15 19:05:08.669304987 +0200
+@@ -11,7 +11,7 @@
+ # so take care if INSTALL_TOP is not an absolute path.
+ INSTALL_TOP= /usr/local
+ INSTALL_BIN= $(INSTALL_TOP)/bin
+-INSTALL_INC= $(INSTALL_TOP)/include
++INSTALL_INC= $(INSTALL_TOP)/include/lua$V
+ INSTALL_LIB= $(INSTALL_TOP)/lib
+ INSTALL_MAN= $(INSTALL_TOP)/man/man1
+ #
+@@ -126,3 +126,21 @@
+ .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho
+
+ # (end of Makefile)
++
++# Use libtool for binary installs, etc.
++
++export V
++export LIBTOOL = libtool --quiet --tag=CC
++# See libtool manual about how to set this
++
++gentoo_clean:
++ cd src; $(MAKE) $@
++
++gentoo_test: gentoo_linux
++ test/lua.static test/hello.lua
++
++gentoo_install:
++ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)
++ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua$V luac$V $(INSTALL_BIN)
++ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua$V.la $(INSTALL_LIB)
+diff -ru lua-5.1.5.orig/src/Makefile lua-5.1.5/src/Makefile
+--- lua-5.1.5.orig/src/Makefile 2014-04-15 17:43:34.844435031 +0200
++++ lua-5.1.5/src/Makefile 2014-04-15 18:07:21.427397122 +0200
+@@ -29,10 +29,10 @@
+ LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \
+ lstrlib.o loadlib.o linit.o
+
+-LUA_T= lua
++LUA_T= lua$V
+ LUA_O= lua.o
+
+-LUAC_T= luac
++LUAC_T= luac$V
+ LUAC_O= luac.o print.o
+
+ ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
+@@ -51,10 +51,10 @@
+ $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files
+ $(RANLIB) $@
+
+-$(LUA_T): $(LUA_O) $(LUA_A)
++origin$(LUA_T): $(LUA_O) $(LUA_A)
+ $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
+
+-$(LUAC_T): $(LUAC_O) $(LUA_A)
++origin$(LUAC_T): $(LUAC_O) $(LUA_A)
+ $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
+
+ clean:
+@@ -180,3 +180,33 @@
+ ltm.h lzio.h lmem.h lopcodes.h lundump.h
+
+ # (end of Makefile)
++
++export LIBTOOL = libtool --tag=CC
++export LIB_VERSION = 5:1:5
++
++# The following rules use libtool for compiling and linking in order to
++# provide shared library support.
++
++LIB_NAME = liblua$V.la
++LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo)
++
++%.lo %.o: %.c
++ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
++
++$(LIB_NAME): $(LIB_OBJS)
++ $(LIBTOOL) --mode=link $(CC) -version-info 0:0:0 \
++ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS)
++
++$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
++
++lua_test: $(LUA_O:.o=.lo) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -static -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
++
++$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME)
++
++gentoo_clean:
++ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua$V luac$V
++
++gentoo_all: $(LIB_NAME) $(LUA_T) lua_test $(LUAC_T)
diff --git a/dev-lang/lua/files/lua-5.1-make_static-r1.patch b/dev-lang/lua/files/lua-5.1-make_static-r1.patch
new file mode 100644
index 000000000000..e5fdc3a6bfa1
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.1-make_static-r1.patch
@@ -0,0 +1,12 @@
+diff -ru lua-5.1.1.orig/src/Makefile lua-5.1.1/src/Makefile
+--- lua-5.1.1.orig/src/Makefile 2006-11-21 07:19:31 +0000
++++ lua-5.1.1/src/Makefile 2006-11-21 07:19:52 +0000
+@@ -196,7 +196,7 @@
+ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS)
+
+ $(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME)
+- $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
++ $(LIBTOOL) --mode=link $(CC) -static -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
+
+ $(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME)
+ $(LIBTOOL) --mode=link $(CC) -static -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME)
diff --git a/dev-lang/lua/files/lua-5.1-module_paths.patch b/dev-lang/lua/files/lua-5.1-module_paths.patch
new file mode 100644
index 000000000000..29ac4c3bf4bd
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.1-module_paths.patch
@@ -0,0 +1,30 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## src_luaconf.h.dpatch by John V. Belmonte <jbelmonte@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Set Lua's default PATH and CPATH.
+
+@DPATCH@
+diff -urNad trunk~/src/luaconf.h trunk/src/luaconf.h
+--- trunk~/src/luaconf.h 2006-02-10 12:44:06.000000000 -0500
++++ trunk/src/luaconf.h 2006-02-17 21:32:55.000000000 -0500
+@@ -83,13 +83,17 @@
+
+ #else
+ #define LUA_ROOT "/usr/local/"
++#define LUA_ROOT2 "/usr/"
+ #define LUA_LDIR LUA_ROOT "share/lua/5.1/"
++#define LUA_LDIR2 LUA_ROOT2 "share/lua/5.1/"
+ #define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
++#define LUA_CDIR2 LUA_ROOT2 "lib/lua/5.1/"
+ #define LUA_PATH_DEFAULT \
+ "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
+- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua"
++ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \
++ LUA_LDIR2"?.lua;" LUA_LDIR2"?/init.lua"
+ #define LUA_CPATH_DEFAULT \
+- "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so"
++ "./?.so;" LUA_CDIR"?.so;" LUA_CDIR2"?.so;" LUA_CDIR"loadall.so"
+ #endif
+
+
diff --git a/dev-lang/lua/files/lua-5.1-readline.patch b/dev-lang/lua/files/lua-5.1-readline.patch
new file mode 100644
index 000000000000..f144861efb6b
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.1-readline.patch
@@ -0,0 +1,10 @@
+--- lua-5.1.1.orig/src/luaconf.h 2006-04-10 20:27:23.000000000 +0200
++++ lua-5.1.1/src/luaconf.h 2006-11-15 14:53:07.000000000 +0100
+@@ -36,7 +36,6 @@
+ #if defined(LUA_USE_LINUX)
+ #define LUA_USE_POSIX
+ #define LUA_USE_DLOPEN /* needs an extra library: -ldl */
+-#define LUA_USE_READLINE /* needs some extra libraries */
+ #endif
+
+ #if defined(LUA_USE_MACOSX)
diff --git a/dev-lang/lua/files/lua-5.1.4-deprecated.patch b/dev-lang/lua/files/lua-5.1.4-deprecated.patch
new file mode 100644
index 000000000000..a88a991d053e
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.1.4-deprecated.patch
@@ -0,0 +1,46 @@
+diff -rdu lua-5.1.3.orig/src/luaconf.h lua-5.1.3/src/luaconf.h
+--- lua-5.1.3.orig/src/luaconf.h 2008-02-12 17:00:03.000000000 +0000
++++ lua-5.1.3/src/luaconf.h 2008-02-12 17:07:55.000000000 +0000
+@@ -340,14 +340,14 @@
+ ** CHANGE it to undefined as soon as your programs use only '...' to
+ ** access vararg parameters (instead of the old 'arg' table).
+ */
+-#define LUA_COMPAT_VARARG
++#undef LUA_COMPAT_VARARG
+
+ /*
+ @@ LUA_COMPAT_MOD controls compatibility with old math.mod function.
+ ** CHANGE it to undefined as soon as your programs use 'math.fmod' or
+ ** the new '%' operator instead of 'math.mod'.
+ */
+-#define LUA_COMPAT_MOD
++#undef LUA_COMPAT_MOD
+
+ /*
+ @@ LUA_COMPAT_LSTR controls compatibility with old long string nesting
+@@ -355,14 +355,14 @@
+ ** CHANGE it to 2 if you want the old behaviour, or undefine it to turn
+ ** off the advisory error when nesting [[...]].
+ */
+-#define LUA_COMPAT_LSTR 1
++#undef LUA_COMPAT_LSTR
+
+ /*
+ @@ LUA_COMPAT_GFIND controls compatibility with old 'string.gfind' name.
+ ** CHANGE it to undefined as soon as you rename 'string.gfind' to
+ ** 'string.gmatch'.
+ */
+-#define LUA_COMPAT_GFIND
++#undef LUA_COMPAT_GFIND
+
+ /*
+ @@ LUA_COMPAT_OPENLIB controls compatibility with old 'luaL_openlib'
+@@ -370,7 +370,7 @@
+ ** CHANGE it to undefined as soon as you replace to 'luaL_register'
+ ** your uses of 'luaL_openlib'
+ */
+-#define LUA_COMPAT_OPENLIB
++#undef LUA_COMPAT_OPENLIB
+
+
+
diff --git a/dev-lang/lua/files/lua-5.1.4-test.patch b/dev-lang/lua/files/lua-5.1.4-test.patch
new file mode 100644
index 000000000000..99b4ad648cc7
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.1.4-test.patch
@@ -0,0 +1,11 @@
+--- test/sieve.lua~ 2002-10-31 03:52:58.000000000 +0100
++++ test/sieve.lua 2008-02-20 17:44:22.468281121 +0100
+@@ -14,7 +14,7 @@
+ while 1 do
+ local n = g()
+ if n == nil then return end
+- if math.mod(n, p) ~= 0 then coroutine.yield(n) end
++ if math.fmod(n, p) ~= 0 then coroutine.yield(n) end
+ end
+ end)
+ end
diff --git a/dev-lang/lua/files/lua-5.1.5-fix_vararg_calls.patch b/dev-lang/lua/files/lua-5.1.5-fix_vararg_calls.patch
new file mode 100644
index 000000000000..cec818203360
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.1.5-fix_vararg_calls.patch
@@ -0,0 +1,12 @@
+diff -uNr lua-5.1.5.orig/src/ldo.c lua-5.1.5/src/ldo.c
+--- lua-5.1.5.orig/src/ldo.c 2016-11-28 20:04:13.177047928 +0100
++++ lua-5.1.5/src/ldo.c 2016-11-28 20:07:15.170432525 +0100
+@@ -274,7 +274,7 @@
+ CallInfo *ci;
+ StkId st, base;
+ Proto *p = cl->p;
+- luaD_checkstack(L, p->maxstacksize);
++ luaD_checkstack(L, p->maxstacksize + p->numparams);
+ func = restorestack(L, funcr);
+ if (!p->is_vararg) { /* no varargs? */
+ base = func + 1;
diff --git a/dev-lang/lua/files/lua-5.2-make-r1.patch b/dev-lang/lua/files/lua-5.2-make-r1.patch
new file mode 100644
index 000000000000..a0624af9cc33
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.2-make-r1.patch
@@ -0,0 +1,75 @@
+--- lua-5.1.1.orig/Makefile 2006-06-02 12:53:38.000000000 +0200
++++ lua-5.1.1/Makefile 2006-11-16 02:16:53.000000000 +0100
+@@ -11,7 +11,7 @@
+ # so take care if INSTALL_TOP is not an absolute path.
+ INSTALL_TOP= /usr/local
+ INSTALL_BIN= $(INSTALL_TOP)/bin
+-INSTALL_INC= $(INSTALL_TOP)/include
++INSTALL_INC= $(INSTALL_TOP)/include/lua$V
+ INSTALL_LIB= $(INSTALL_TOP)/lib
+ INSTALL_MAN= $(INSTALL_TOP)/man/man1
+ #
+@@ -127,3 +127,18 @@
+ .PHONY: all $(PLATS) clean install local none dummy echo pecho lecho newer
+
+ # (end of Makefile)
++
++# Use libtool for binary installs, etc.
++
++export V
++export LIBTOOL = $(EROOT)usr/bin/libtool --quiet --tag=CC
++# See libtool manual about how to set this
++
++gentoo_clean:
++ cd src; $(MAKE) $@
++
++gentoo_install:
++ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)
++ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua$V luac$V $(INSTALL_BIN)
++ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua$V.la $(INSTALL_LIB)
+--- lua-5.1.1.orig/src/Makefile 2006-03-22 01:41:49.000000000 +0100
++++ lua-5.1.1/src/Makefile 2006-11-16 02:10:27.000000000 +0100
+@@ -39,1 +39,1 @@
+-LUA_T= lua
++LUA_T= lua$V
+@@ -42,1 +42,1 @@
+-LUAC_T= luac
++LUAC_T= luac$V
+@@ -54,1 +54,1 @@
+-$(LUA_T): $(LUA_O) $(LUA_A)
++origin$(LUA_T): $(LUA_O) $(LUA_A)
+@@ -57,1 +57,1 @@
+-$(LUAC_T): $(LUAC_O) $(LUA_A)
++origin$(LUAC_T): $(LUAC_O) $(LUA_A)
+@@ -185,3 +185,30 @@
+ lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \
+ lzio.h
+
++
++export LIBTOOL = $(EROOT)usr/bin/libtool --quiet --tag=CC
++export LIB_VERSION = 6:1:1
++
++# The following rules use libtool for compiling and linking in order to
++# provide shared library support.
++
++LIB_NAME = liblua$V.la
++LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo)
++
++%.lo %.o: %.c
++ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
++
++$(LIB_NAME): $(LIB_OBJS)
++ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \
++ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS)
++
++$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
++
++$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME)
++
++gentoo_clean:
++ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua$V luac$V
++
++gentoo_all: $(LIB_NAME) $(LUA_T) $(LUAC_T)
diff --git a/dev-lang/lua/files/lua-5.3-make-r1.patch b/dev-lang/lua/files/lua-5.3-make-r1.patch
new file mode 100644
index 000000000000..b9e9051462c4
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.3-make-r1.patch
@@ -0,0 +1,91 @@
+diff -uNr lua-5.3.3.orig/Makefile lua-5.3.3/Makefile
+--- lua-5.3.3.orig/Makefile 2016-12-04 22:29:54.839135901 +0100
++++ lua-5.3.3/Makefile 2016-12-04 22:31:14.235851109 +0100
+@@ -12,7 +12,7 @@
+ # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
+ INSTALL_TOP= /usr/local
+ INSTALL_BIN= $(INSTALL_TOP)/bin
+-INSTALL_INC= $(INSTALL_TOP)/include
++INSTALL_INC= $(INSTALL_TOP)/include/lua$V
+ INSTALL_LIB= $(INSTALL_TOP)/lib
+ INSTALL_MAN= $(INSTALL_TOP)/man/man1
+ INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
+@@ -112,3 +112,18 @@
+ .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho
+
+ # (end of Makefile)
++
++# Use libtool for binary installs, etc.
++
++export V
++export LIBTOOL = $(EROOT)usr/bin/libtool --quiet --tag=CC
++# See libtool manual about how to set this
++
++gentoo_clean:
++ cd src; $(MAKE) $@
++
++gentoo_install:
++ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB)
++ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) lua$V luac$V $(INSTALL_BIN)
++ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) liblua$V.la $(INSTALL_LIB)
+diff -uNr lua-5.3.3.orig/src/Makefile lua-5.3.3/src/Makefile
+--- lua-5.3.3.orig/src/Makefile 2016-12-04 22:29:54.840135910 +0100
++++ lua-5.3.3/src/Makefile 2016-12-04 22:34:55.980848068 +0100
+@@ -36,10 +36,10 @@
+ lmathlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o loadlib.o linit.o
+ BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
+
+-LUA_T= lua
++LUA_T= lua$V
+ LUA_O= lua.o
+
+-LUAC_T= luac
++LUAC_T= luac$V
+ LUAC_O= luac.o
+
+ ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
+@@ -59,10 +59,10 @@
+ $(AR) $@ $(BASE_O)
+ $(RANLIB) $@
+
+-$(LUA_T): $(LUA_O) $(LUA_A)
++origin$(LUA_T): $(LUA_O) $(LUA_A)
+ $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
+
+-$(LUAC_T): $(LUAC_O) $(LUA_A)
++origin$(LUAC_T): $(LUAC_O) $(LUA_A)
+ $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
+
+ clean:
+@@ -195,3 +195,30 @@
+ lobject.h ltm.h lzio.h
+
+ # (end of Makefile)
++
++export LIBTOOL = $(EROOT)usr/bin/libtool --quiet --tag=CC
++export LIB_VERSION = 6:1:1
++
++# The following rules use libtool for compiling and linking in order to
++# provide shared library support.
++
++LIB_NAME = liblua$V.la
++LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo)
++
++%.lo %.o: %.c
++ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
++
++$(LIB_NAME): $(LIB_OBJS)
++ $(LIBTOOL) --mode=link $(CC) -version-info $(LIB_VERSION) \
++ -rpath $(RPATH) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS)
++
++$(LUA_T): $(LUA_O:.o=.lo) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -export-dynamic $(LDFLAGS) -o $@ $(LUA_O:.o=.lo) $(LIB_NAME) $(LUA_LIBS)
++
++$(LUAC_T): $(LUAC_O:.o=.lo) $(LIB_NAME)
++ $(LIBTOOL) --mode=link $(CC) -static $(LDFLAGS) -o $@ $(LUAC_O:.o=.lo) $(LIB_NAME)
++
++gentoo_clean:
++ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) lua$V luac$V
++
++gentoo_all: $(LIB_NAME) $(LUA_T) $(LUAC_T)
diff --git a/dev-lang/lua/files/lua.pc b/dev-lang/lua/files/lua.pc
new file mode 100644
index 000000000000..e53971852c10
--- /dev/null
+++ b/dev-lang/lua/files/lua.pc
@@ -0,0 +1,31 @@
+# lua.pc -- pkg-config data for Lua
+
+# vars from install Makefile
+
+# grep '^V=' ../Makefile
+V= 5.1
+# grep '^R=' ../Makefile
+R= 5.1.4
+
+# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
+prefix= /usr
+INSTALL_BIN= ${prefix}/bin
+INSTALL_INC= ${prefix}/include
+INSTALL_LIB= ${prefix}/,lib,
+INSTALL_MAN= ${prefix}/man/man1
+INSTALL_LMOD= ${prefix}/share/lua/${V}
+INSTALL_CMOD= ${prefix}/,lib,/lua/${V}
+
+# canonical vars
+exec_prefix=${prefix}
+libdir=${exec_prefix}/,lib,
+includedir=${prefix}/include
+
+Name: Lua
+Description: An Extensible Extension Language
+Version: ${R}
+Requires:
+Libs: -L${libdir} -llua -lm
+Cflags: -I${includedir}
+
+# (end of lua.pc)
diff --git a/dev-lang/lua/lua-5.1.5-r100.ebuild b/dev-lang/lua/lua-5.1.5-r100.ebuild
new file mode 100644
index 000000000000..a14eb65c7d8e
--- /dev/null
+++ b/dev-lang/lua/lua-5.1.5-r100.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib multilib-minimal portability toolchain-funcs versionator
+
+DESCRIPTION="A powerful light-weight programming language designed for extending applications"
+HOMEPAGE="http://www.lua.org/"
+SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="5.1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+deprecated emacs readline static"
+
+RDEPEND="readline? ( >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}] )
+ app-eselect/eselect-lua
+ !dev-lang/lua:0"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+PDEPEND="emacs? ( app-emacs/lua-mode )"
+
+SAN_SLOT="${SLOT//.}"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/lua${SLOT}/luaconf.h
+)
+
+src_prepare() {
+ local PATCH_PV=$(get_version_component_range 1-2)
+
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r2.patch
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
+
+ # use glibtool on Darwin (versus Apple libtool)
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e '/LIBTOOL = /s:libtool:glibtool:' \
+ Makefile src/Makefile || die
+ fi
+
+ #EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
+
+ # correct lua versioning
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:5:1/' src/Makefile
+
+ sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
+
+ if ! use deprecated ; then
+ # patches from 5.1.4 still apply
+ epatch "${FILESDIR}"/${PN}-5.1.4-deprecated.patch
+ epatch "${FILESDIR}"/${PN}-5.1.4-test.patch
+ fi
+
+ if ! use readline ; then
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-readline.patch
+ fi
+
+ # Using dynamic linked lua is not recommended for performance
+ # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
+ # Mainly, this is of concern if your arch is poor with GPRs, like x86
+ # Note that this only affects the interpreter binary (named lua), not the lua
+ # compiler (built statically) nor the lua libraries (both shared and static
+ # are installed)
+ if use static ; then
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static-r1.patch
+ fi
+
+ # custom Makefiles
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # We want packages to find our things...
+ sed -i \
+ -e 's:/usr/local:'${EPREFIX}'/usr:' \
+ -e "s:\([/\"]\)\<lib\>:\1$(get_libdir):g" \
+ etc/lua.pc src/luaconf.h || die
+}
+
+multilib_src_compile() {
+ tc-export CC
+ myflags=
+ # what to link to liblua
+ liblibs="-lm"
+ liblibs="${liblibs} $(dlopen_lib)"
+
+ # what to link to the executables
+ mylibs=
+ if use readline; then
+ mylibs="-lreadline"
+ fi
+
+ cd src
+ emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${CFLAGS}" \
+ RPATH="${EPREFIX}/usr/$(get_libdir)/" \
+ LUA_LIBS="${mylibs}" \
+ LIB_LIBS="${liblibs}" \
+ V=$(get_version_component_range 1-2) \
+ gentoo_all
+
+ mv lua_test ../test/lua.static
+}
+
+multilib_src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${SLOT} gentoo_install
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ newins etc/lua.pc lua${SLOT}.pc
+}
+
+multilib_src_install_all() {
+ dodoc HISTORY README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ doicon etc/lua.ico
+
+ newman doc/lua.1 lua${SLOT}.1
+ newman doc/luac.1 luac${SLOT}.1
+}
+
+multilib_src_test() {
+ local positive="bisect cf echo env factorial fib fibfor hello printf sieve
+ sort trace-calls trace-globals"
+ local negative="readonly"
+ local test
+
+ cd "${BUILD_DIR}" || die
+ for test in ${positive}; do
+ test/lua.static test/${test}.lua || die "test $test failed"
+ done
+
+ for test in ${negative}; do
+ test/lua.static test/${test}.lua && die "test $test failed"
+ done
+}
diff --git a/dev-lang/lua/lua-5.1.5-r101.ebuild b/dev-lang/lua/lua-5.1.5-r101.ebuild
new file mode 100644
index 000000000000..1be902b9441c
--- /dev/null
+++ b/dev-lang/lua/lua-5.1.5-r101.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib multilib-minimal portability toolchain-funcs versionator
+
+DESCRIPTION="A powerful light-weight programming language designed for extending applications"
+HOMEPAGE="http://www.lua.org/"
+SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="5.1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+deprecated emacs readline static"
+
+RDEPEND="readline? ( >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}] )
+ app-eselect/eselect-lua
+ !dev-lang/lua:0"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+PDEPEND="emacs? ( app-emacs/lua-mode )"
+
+SAN_SLOT="${SLOT//.}"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/lua${SLOT}/luaconf.h
+)
+
+src_prepare() {
+ local PATCH_PV=$(get_version_component_range 1-2)
+
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r2.patch
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
+
+ # use glibtool on Darwin (versus Apple libtool)
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e '/LIBTOOL = /s:libtool:glibtool:' \
+ Makefile src/Makefile || die
+ fi
+
+ #EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
+
+ # correct lua versioning
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:5:1/' src/Makefile
+
+ sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
+
+ if ! use deprecated ; then
+ # patches from 5.1.4 still apply
+ epatch "${FILESDIR}"/${PN}-5.1.4-deprecated.patch
+ epatch "${FILESDIR}"/${PN}-5.1.4-test.patch
+ fi
+
+ if ! use readline ; then
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-readline.patch
+ fi
+
+ # Using dynamic linked lua is not recommended for performance
+ # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
+ # Mainly, this is of concern if your arch is poor with GPRs, like x86
+ # Note that this only affects the interpreter binary (named lua), not the lua
+ # compiler (built statically) nor the lua libraries (both shared and static
+ # are installed)
+ if use static ; then
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static-r1.patch
+ fi
+
+ # custom Makefiles
+ multilib_copy_sources
+
+ # A slotted Lua uses different directories for headers & names for
+ # libraries, and pkgconfig should reflect that.
+ sed -r -i \
+ -e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \
+ -e "/^Cflags:/s,((-I..includedir.)($| )),\2/lua${SLOT}\3," \
+ "${S}"/etc/lua.pc
+}
+
+multilib_src_configure() {
+ # We want packages to find our things...
+ sed -i \
+ -e 's:/usr/local:'${EPREFIX}'/usr:' \
+ -e "s:\([/\"]\)\<lib\>:\1$(get_libdir):g" \
+ etc/lua.pc src/luaconf.h || die
+}
+
+multilib_src_compile() {
+ tc-export CC
+ myflags=
+ # what to link to liblua
+ liblibs="-lm"
+ liblibs="${liblibs} $(dlopen_lib)"
+
+ # what to link to the executables
+ mylibs=
+ if use readline; then
+ mylibs="-lreadline"
+ fi
+
+ cd src
+ emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${CFLAGS}" \
+ RPATH="${EPREFIX}/usr/$(get_libdir)/" \
+ LUA_LIBS="${mylibs}" \
+ LIB_LIBS="${liblibs}" \
+ V=$(get_version_component_range 1-2) \
+ gentoo_all
+
+ mv lua_test ../test/lua.static
+}
+
+multilib_src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${SLOT} gentoo_install
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ newins etc/lua.pc lua${SLOT}.pc
+}
+
+multilib_src_install_all() {
+ dodoc HISTORY README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ doicon etc/lua.ico
+
+ newman doc/lua.1 lua${SLOT}.1
+ newman doc/luac.1 luac${SLOT}.1
+}
+
+multilib_src_test() {
+ local positive="bisect cf echo env factorial fib fibfor hello printf sieve
+ sort trace-calls trace-globals"
+ local negative="readonly"
+ local test
+
+ cd "${BUILD_DIR}" || die
+ for test in ${positive}; do
+ test/lua.static test/${test}.lua || die "test $test failed"
+ done
+
+ for test in ${negative}; do
+ test/lua.static test/${test}.lua && die "test $test failed"
+ done
+}
diff --git a/dev-lang/lua/lua-5.1.5-r4.ebuild b/dev-lang/lua/lua-5.1.5-r4.ebuild
new file mode 100644
index 000000000000..4271b4c26e2a
--- /dev/null
+++ b/dev-lang/lua/lua-5.1.5-r4.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 multilib multilib-minimal portability toolchain-funcs versionator
+
+DESCRIPTION="A powerful light-weight programming language designed for extending applications"
+HOMEPAGE="http://www.lua.org/"
+SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+deprecated emacs readline static"
+
+RDEPEND="readline? ( >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+PDEPEND="emacs? ( app-emacs/lua-mode )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/luaconf.h
+)
+
+src_prepare() {
+ local PATCH_PV=$(get_version_component_range 1-2)
+
+ epatch "${FILESDIR}/${P}-fix_vararg_calls.patch"
+
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-module_paths.patch
+
+ # use glibtool on Darwin (versus Apple libtool)
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e '/LIBTOOL = /s:libtool:glibtool:' \
+ Makefile src/Makefile || die
+ fi
+
+ #EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
+
+ # correct lua versioning
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\16:5:1/' src/Makefile || die
+
+ sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
+
+ if ! use deprecated ; then
+ # patches from 5.1.4 still apply
+ epatch "${FILESDIR}"/${PN}-5.1.4-deprecated.patch
+ epatch "${FILESDIR}"/${PN}-5.1.4-test.patch
+ fi
+
+ if ! use readline ; then
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-readline.patch
+ fi
+
+ # Using dynamic linked lua is not recommended for performance
+ # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
+ # Mainly, this is of concern if your arch is poor with GPRs, like x86
+ # Note that this only affects the interpreter binary (named lua), not the lua
+ # compiler (built statically) nor the lua libraries (both shared and static
+ # are installed)
+ if use static ; then
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make_static-r1.patch
+ fi
+
+ # custom Makefiles
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # We want packages to find our things...
+ sed -i \
+ -e 's:/usr/local:'${EPREFIX}'/usr:' \
+ -e "s:\([/\"]\)\<lib\>:\1$(get_libdir):g" \
+ etc/lua.pc src/luaconf.h || die
+}
+
+multilib_src_compile() {
+ tc-export CC
+ myflags=
+ # what to link to liblua
+ liblibs="-lm"
+ liblibs="${liblibs} $(dlopen_lib)"
+
+ # what to link to the executables
+ mylibs=
+ if use readline; then
+ mylibs="-lreadline"
+ fi
+
+ cd src
+ emake CC="${CC}" CFLAGS="-DLUA_USE_LINUX ${CFLAGS}" \
+ RPATH="${EPREFIX}/usr/$(get_libdir)/" \
+ LUA_LIBS="${mylibs}" \
+ LIB_LIBS="${liblibs}" \
+ V=${PV} \
+ gentoo_all
+
+ mv lua_test ../test/lua.static
+}
+
+multilib_src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${PV} gentoo_install
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins etc/lua.pc
+}
+
+multilib_src_install_all() {
+ dodoc HISTORY README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ doicon etc/lua.ico
+
+ doman doc/lua.1 doc/luac.1
+}
+
+multilib_src_test() {
+ local positive="bisect cf echo env factorial fib fibfor hello printf sieve
+ sort trace-calls trace-globals"
+ local negative="readonly"
+ local test
+
+ cd "${BUILD_DIR}" || die
+ for test in ${positive}; do
+ test/lua.static test/${test}.lua || die "test $test failed"
+ done
+
+ for test in ${negative}; do
+ test/lua.static test/${test}.lua && die "test $test failed"
+ done
+}
diff --git a/dev-lang/lua/lua-5.2.3-r1.ebuild b/dev-lang/lua/lua-5.2.3-r1.ebuild
new file mode 100644
index 000000000000..a02bb4bc6d9c
--- /dev/null
+++ b/dev-lang/lua/lua-5.2.3-r1.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 autotools multilib multilib-minimal portability toolchain-funcs versionator
+
+DESCRIPTION="A powerful light-weight programming language designed for extending applications"
+HOMEPAGE="http://www.lua.org/"
+SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="5.2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+deprecated emacs readline static"
+
+RDEPEND="readline? ( sys-libs/readline:0= )
+ app-eselect/eselect-lua
+ !dev-lang/lua:0"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+PDEPEND="emacs? ( app-emacs/lua-mode )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/lua${SLOT}/luaconf.h
+)
+
+src_prepare() {
+ local PATCH_PV=$(get_version_component_range 1-2)
+
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
+
+ # use glibtool on Darwin (versus Apple libtool)
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
+ Makefile src/Makefile || die
+ fi
+
+ [ -d "${FILESDIR}/${PV}" ] && \
+ EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
+
+ # correct lua versioning
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
+
+ sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
+
+ if ! use readline ; then
+ sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h || die
+ fi
+
+ # Using dynamic linked lua is not recommended for performance
+ # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
+ # Mainly, this is of concern if your arch is poor with GPRs, like x86
+ # Note that this only affects the interpreter binary (named lua), not the lua
+ # compiler (built statically) nor the lua libraries (both shared and static
+ # are installed)
+ if use static ; then
+ sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die
+ fi
+
+ # upstream does not use libtool, but we do (see bug #336167)
+ cp "${FILESDIR}/configure.in" "${S}"/ || die
+ eautoreconf
+
+ # custom Makefiles
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ sed -i \
+ -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
+ -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
+ src/luaconf.h \
+ || die "failed patching luaconf.h"
+
+ econf
+}
+
+multilib_src_compile() {
+ tc-export CC
+
+ # what to link to liblua
+ liblibs="-lm"
+ liblibs="${liblibs} $(dlopen_lib)"
+
+ # what to link to the executables
+ mylibs=
+ use readline && mylibs="-lreadline"
+
+ cd src
+
+ local myCFLAGS=""
+ use deprecated && myCFLAGS="-DLUA_COMPAT_ALL"
+
+ case "${CHOST}" in
+ *-mingw*) : ;;
+ *) myCFLAGS+=" -DLUA_USE_LINUX" ;;
+ esac
+
+ emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
+ SYSLDFLAGS="${LDFLAGS}" \
+ RPATH="${EPREFIX}/usr/$(get_libdir)/" \
+ LUA_LIBS="${mylibs}" \
+ LIB_LIBS="${liblibs}" \
+ V=$(get_version_component_range 1-2) \
+ gentoo_all
+}
+
+multilib_src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${SLOT} gentoo_install
+
+ # We want packages to find our things...
+ cp "${FILESDIR}/lua.pc" "${WORKDIR}"
+ sed -i \
+ -e "s:^prefix= :prefix= ${EPREFIX}:" \
+ -e "s:^V=.*:V= ${PATCH_PV}:" \
+ -e "s:^R=.*:R= ${PV}:" \
+ -e "s:/,lib,:/$(get_libdir):g" \
+ "${WORKDIR}/lua.pc"
+
+ insinto "/usr/$(get_libdir)/pkgconfig"
+ newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
+}
+
+multilib_src_install_all() {
+ dodoc README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ newman doc/lua.1 lua${SLOT}.1
+ newman doc/luac.1 luac${SLOT}.1
+}
+
+# Makefile contains a dummy target that doesn't do tests
+# but causes issues with slotted lua (bug #510360)
+src_test() { :; }
diff --git a/dev-lang/lua/lua-5.2.3-r2.ebuild b/dev-lang/lua/lua-5.2.3-r2.ebuild
new file mode 100644
index 000000000000..e904f6ab9dae
--- /dev/null
+++ b/dev-lang/lua/lua-5.2.3-r2.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils autotools multilib multilib-minimal portability toolchain-funcs versionator
+
+DESCRIPTION="A powerful light-weight programming language designed for extending applications"
+HOMEPAGE="http://www.lua.org/"
+SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="5.2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+deprecated emacs readline static"
+
+RDEPEND="readline? ( sys-libs/readline:0= )
+ app-eselect/eselect-lua
+ !dev-lang/lua:0"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+PDEPEND="emacs? ( app-emacs/lua-mode )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/lua${SLOT}/luaconf.h
+)
+
+src_prepare() {
+ local PATCH_PV=$(get_version_component_range 1-2)
+
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
+
+ # use glibtool on Darwin (versus Apple libtool)
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
+ Makefile src/Makefile || die
+ fi
+
+ [ -d "${FILESDIR}/${PV}" ] && \
+ EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
+
+ # correct lua versioning
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
+
+ sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
+
+ if ! use readline ; then
+ sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h || die
+ fi
+
+ # Using dynamic linked lua is not recommended for performance
+ # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
+ # Mainly, this is of concern if your arch is poor with GPRs, like x86
+ # Note that this only affects the interpreter binary (named lua), not the lua
+ # compiler (built statically) nor the lua libraries (both shared and static
+ # are installed)
+ if use static ; then
+ sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die
+ fi
+
+ # upstream does not use libtool, but we do (see bug #336167)
+ cp "${FILESDIR}/configure.in" "${S}"/ || die
+ eautoreconf
+
+ # custom Makefiles
+ multilib_copy_sources
+
+ # A slotted Lua uses different directories for headers & names for
+ # libraries, and pkgconfig should reflect that.
+ sed -r -i \
+ -e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \
+ -e "/^Cflags:/s,((-I..includedir.)($| )),\2/lua${SLOT}\3," \
+ "${S}"/etc/lua.pc
+}
+
+multilib_src_configure() {
+ sed -i \
+ -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
+ -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
+ src/luaconf.h \
+ || die "failed patching luaconf.h"
+
+ econf
+}
+
+multilib_src_compile() {
+ tc-export CC
+
+ # what to link to liblua
+ liblibs="-lm"
+ liblibs="${liblibs} $(dlopen_lib)"
+
+ # what to link to the executables
+ mylibs=
+ use readline && mylibs="-lreadline"
+
+ cd src
+
+ local myCFLAGS=""
+ use deprecated && myCFLAGS="-DLUA_COMPAT_ALL"
+
+ case "${CHOST}" in
+ *-mingw*) : ;;
+ *) myCFLAGS+=" -DLUA_USE_LINUX" ;;
+ esac
+
+ emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
+ SYSLDFLAGS="${LDFLAGS}" \
+ RPATH="${EPREFIX}/usr/$(get_libdir)/" \
+ LUA_LIBS="${mylibs}" \
+ LIB_LIBS="${liblibs}" \
+ V=$(get_version_component_range 1-2) \
+ gentoo_all
+}
+
+multilib_src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${SLOT} gentoo_install
+
+ # We want packages to find our things...
+ cp "${FILESDIR}/lua.pc" "${WORKDIR}"
+ sed -i \
+ -e "s:^prefix= :prefix= ${EPREFIX}:" \
+ -e "s:^V=.*:V= ${PATCH_PV}:" \
+ -e "s:^R=.*:R= ${PV}:" \
+ -e "s:/,lib,:/$(get_libdir):g" \
+ "${WORKDIR}/lua.pc"
+
+ insinto "/usr/$(get_libdir)/pkgconfig"
+ newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
+}
+
+multilib_src_install_all() {
+ dodoc README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ newman doc/lua.1 lua${SLOT}.1
+ newman doc/luac.1 luac${SLOT}.1
+}
+
+# Makefile contains a dummy target that doesn't do tests
+# but causes issues with slotted lua (bug #510360)
+src_test() { :; }
diff --git a/dev-lang/lua/lua-5.2.3.ebuild b/dev-lang/lua/lua-5.2.3.ebuild
new file mode 100644
index 000000000000..9be8e7d8be85
--- /dev/null
+++ b/dev-lang/lua/lua-5.2.3.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils autotools multilib portability toolchain-funcs versionator
+
+DESCRIPTION="A powerful light-weight programming language designed for extending applications"
+HOMEPAGE="http://www.lua.org/"
+SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="5.2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="+deprecated emacs readline static"
+
+RDEPEND="readline? ( sys-libs/readline:0= )
+ app-eselect/eselect-lua
+ !dev-lang/lua:0"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+PDEPEND="emacs? ( app-emacs/lua-mode )"
+
+src_prepare() {
+ local PATCH_PV=$(get_version_component_range 1-2)
+
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
+
+ [ -d "${FILESDIR}/${PV}" ] && \
+ EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
+
+ sed -i \
+ -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
+ -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
+ src/luaconf.h \
+ || die "failed patching luaconf.h"
+
+ # correct lua versioning
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile
+
+ sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html
+
+ if ! use readline ; then
+ sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h
+ fi
+
+ # Using dynamic linked lua is not recommended for performance
+ # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
+ # Mainly, this is of concern if your arch is poor with GPRs, like x86
+ # Note that this only affects the interpreter binary (named lua), not the lua
+ # compiler (built statically) nor the lua libraries (both shared and static
+ # are installed)
+ if use static ; then
+ sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile
+ fi
+
+ # upstream does not use libtool, but we do (see bug #336167)
+ cp "${FILESDIR}/configure.in" "${S}"
+ eautoreconf
+}
+
+src_compile() {
+ tc-export CC
+
+ # what to link to liblua
+ liblibs="-lm"
+ liblibs="${liblibs} $(dlopen_lib)"
+
+ # what to link to the executables
+ mylibs=
+ use readline && mylibs="-lreadline"
+
+ cd src
+
+ local myCFLAGS=""
+ use deprecated && myCFLAGS="-DLUA_COMPAT_ALL"
+
+ case "${CHOST}" in
+ *-mingw*) : ;;
+ *) myCFLAGS+=" -DLUA_USE_LINUX" ;;
+ esac
+
+ emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
+ SYSLDFLAGS="${LDFLAGS}" \
+ RPATH="${EPREFIX}/usr/$(get_libdir)/" \
+ LUA_LIBS="${mylibs}" \
+ LIB_LIBS="${liblibs}" \
+ V=$(get_version_component_range 1-2) \
+ gentoo_all || die "emake failed"
+}
+
+src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${SLOT} gentoo_install \
+ || die "emake install gentoo_install failed"
+
+ dodoc README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ newman doc/lua.1 lua${SLOT}.1
+ newman doc/luac.1 luac${SLOT}.1
+
+ # We want packages to find our things...
+ cp "${FILESDIR}/lua.pc" "${WORKDIR}"
+ sed -i \
+ -e "s:^V=.*:V= ${PATCH_PV}:" \
+ -e "s:^R=.*:R= ${PV}:" \
+ -e "s:/,lib,:/$(get_libdir):g" \
+ "${WORKDIR}/lua.pc"
+
+ insinto "/usr/$(get_libdir)/pkgconfig"
+ newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
+}
+
+# Makefile contains a dummy target that doesn't do tests
+# but causes issues with slotted lua (bug #510360)
+src_test() { :; }
diff --git a/dev-lang/lua/lua-5.3.3-r1.ebuild b/dev-lang/lua/lua-5.3.3-r1.ebuild
new file mode 100644
index 000000000000..b40fa29353fb
--- /dev/null
+++ b/dev-lang/lua/lua-5.3.3-r1.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils autotools multilib multilib-minimal portability toolchain-funcs versionator
+
+DESCRIPTION="A powerful light-weight programming language designed for extending applications"
+HOMEPAGE="http://www.lua.org/"
+SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="5.3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+deprecated emacs readline static"
+
+RDEPEND="readline? ( sys-libs/readline:0= )
+ app-eselect/eselect-lua
+ !dev-lang/lua:0"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+PDEPEND="emacs? ( app-emacs/lua-mode )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/lua${SLOT}/luaconf.h
+)
+
+src_prepare() {
+ local PATCH_PV=$(get_version_component_range 1-2)
+
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
+
+ # use glibtool on Darwin (versus Apple libtool)
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
+ Makefile src/Makefile || die
+ fi
+
+ [ -d "${FILESDIR}/${PV}" ] && \
+ EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
+
+ # correct lua versioning
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
+
+ sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
+
+ if ! use readline ; then
+ sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h || die
+ fi
+
+ # Using dynamic linked lua is not recommended for performance
+ # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
+ # Mainly, this is of concern if your arch is poor with GPRs, like x86
+ # Note that this only affects the interpreter binary (named lua), not the lua
+ # compiler (built statically) nor the lua libraries (both shared and static
+ # are installed)
+ if use static ; then
+ sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die
+ fi
+
+ # upstream does not use libtool, but we do (see bug #336167)
+ cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
+ eautoreconf
+
+ # custom Makefiles
+ multilib_copy_sources
+
+ # A slotted Lua uses different directories for headers & names for
+ # libraries, and pkgconfig should reflect that.
+ sed -r -i \
+ -e "/^Libs:/s,((-llua)($| )),\2${SLOT}\3," \
+ -e "/^Cflags:/s,((-I..includedir.)($| )),\2/lua${SLOT}\3," \
+ "${S}"/etc/lua.pc
+}
+
+multilib_src_configure() {
+ sed -i \
+ -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
+ -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
+ src/luaconf.h \
+ || die "failed patching luaconf.h"
+
+ econf
+}
+
+multilib_src_compile() {
+ tc-export CC
+
+ # what to link to liblua
+ liblibs="-lm"
+ liblibs="${liblibs} $(dlopen_lib)"
+
+ # what to link to the executables
+ mylibs=
+ use readline && mylibs="-lreadline"
+
+ cd src
+
+ local myCFLAGS=""
+ use deprecated && myCFLAGS="-DLUA_COMPAT_ALL"
+
+ case "${CHOST}" in
+ *-mingw*) : ;;
+ *) myCFLAGS+=" -DLUA_USE_LINUX" ;;
+ esac
+
+ emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
+ SYSLDFLAGS="${LDFLAGS}" \
+ RPATH="${EPREFIX}/usr/$(get_libdir)/" \
+ LUA_LIBS="${mylibs}" \
+ LIB_LIBS="${liblibs}" \
+ V=$(get_version_component_range 1-2) \
+ gentoo_all
+}
+
+multilib_src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${SLOT} gentoo_install
+
+ # We want packages to find our things...
+ cp "${FILESDIR}/lua.pc" "${WORKDIR}"
+ sed -i \
+ -e "s:^prefix= :prefix= ${EPREFIX}:" \
+ -e "s:^V=.*:V= ${PATCH_PV}:" \
+ -e "s:^R=.*:R= ${PV}:" \
+ -e "s:/,lib,:/$(get_libdir):g" \
+ "${WORKDIR}/lua.pc"
+
+ insinto "/usr/$(get_libdir)/pkgconfig"
+ newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
+}
+
+multilib_src_install_all() {
+ dodoc README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ newman doc/lua.1 lua${SLOT}.1
+ newman doc/luac.1 luac${SLOT}.1
+}
+
+# Makefile contains a dummy target that doesn't do tests
+# but causes issues with slotted lua (bug #510360)
+src_test() { :; }
diff --git a/dev-lang/lua/lua-5.3.3.ebuild b/dev-lang/lua/lua-5.3.3.ebuild
new file mode 100644
index 000000000000..4a80bd757fcb
--- /dev/null
+++ b/dev-lang/lua/lua-5.3.3.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 autotools multilib multilib-minimal portability toolchain-funcs versionator
+
+DESCRIPTION="A powerful light-weight programming language designed for extending applications"
+HOMEPAGE="http://www.lua.org/"
+SRC_URI="http://www.lua.org/ftp/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="5.3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+deprecated emacs readline static"
+
+RDEPEND="readline? ( sys-libs/readline:0= )
+ app-eselect/eselect-lua
+ !dev-lang/lua:0"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+PDEPEND="emacs? ( app-emacs/lua-mode )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/lua${SLOT}/luaconf.h
+)
+
+src_prepare() {
+ local PATCH_PV=$(get_version_component_range 1-2)
+
+ epatch "${FILESDIR}"/${PN}-${PATCH_PV}-make-r1.patch
+
+ # use glibtool on Darwin (versus Apple libtool)
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ sed -i -e '/LIBTOOL = /s:/libtool:/glibtool:' \
+ Makefile src/Makefile || die
+ fi
+
+ [ -d "${FILESDIR}/${PV}" ] && \
+ EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="upstream.patch" epatch
+
+ # correct lua versioning
+ sed -i -e 's/\(LIB_VERSION = \)6:1:1/\10:0:0/' src/Makefile || die
+
+ sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html || die
+
+ if ! use readline ; then
+ sed -i -e '/#define LUA_USE_READLINE/d' src/luaconf.h || die
+ fi
+
+ # Using dynamic linked lua is not recommended for performance
+ # reasons. http://article.gmane.org/gmane.comp.lang.lua.general/18519
+ # Mainly, this is of concern if your arch is poor with GPRs, like x86
+ # Note that this only affects the interpreter binary (named lua), not the lua
+ # compiler (built statically) nor the lua libraries (both shared and static
+ # are installed)
+ if use static ; then
+ sed -i -e 's:\(-export-dynamic\):-static \1:' src/Makefile || die
+ fi
+
+ # upstream does not use libtool, but we do (see bug #336167)
+ cp "${FILESDIR}/configure.in" "${S}/configure.ac" || die
+ eautoreconf
+
+ # custom Makefiles
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ sed -i \
+ -e 's:\(define LUA_ROOT\s*\).*:\1"'${EPREFIX}'/usr/":' \
+ -e "s:\(define LUA_CDIR\s*LUA_ROOT \"\)lib:\1$(get_libdir):" \
+ src/luaconf.h \
+ || die "failed patching luaconf.h"
+
+ econf
+}
+
+multilib_src_compile() {
+ tc-export CC
+
+ # what to link to liblua
+ liblibs="-lm"
+ liblibs="${liblibs} $(dlopen_lib)"
+
+ # what to link to the executables
+ mylibs=
+ use readline && mylibs="-lreadline"
+
+ cd src
+
+ local myCFLAGS=""
+ use deprecated && myCFLAGS="-DLUA_COMPAT_ALL"
+
+ case "${CHOST}" in
+ *-mingw*) : ;;
+ *) myCFLAGS+=" -DLUA_USE_LINUX" ;;
+ esac
+
+ emake CC="${CC}" CFLAGS="${myCFLAGS} ${CFLAGS}" \
+ SYSLDFLAGS="${LDFLAGS}" \
+ RPATH="${EPREFIX}/usr/$(get_libdir)/" \
+ LUA_LIBS="${mylibs}" \
+ LIB_LIBS="${liblibs}" \
+ V=$(get_version_component_range 1-2) \
+ gentoo_all
+}
+
+multilib_src_install() {
+ emake INSTALL_TOP="${ED}/usr" INSTALL_LIB="${ED}/usr/$(get_libdir)" \
+ V=${SLOT} gentoo_install
+
+ # We want packages to find our things...
+ cp "${FILESDIR}/lua.pc" "${WORKDIR}"
+ sed -i \
+ -e "s:^prefix= :prefix= ${EPREFIX}:" \
+ -e "s:^V=.*:V= ${PATCH_PV}:" \
+ -e "s:^R=.*:R= ${PV}:" \
+ -e "s:/,lib,:/$(get_libdir):g" \
+ "${WORKDIR}/lua.pc"
+
+ insinto "/usr/$(get_libdir)/pkgconfig"
+ newins "${WORKDIR}/lua.pc" "lua${SLOT}.pc"
+}
+
+multilib_src_install_all() {
+ dodoc README
+ dohtml doc/*.html doc/*.png doc/*.css doc/*.gif
+
+ newman doc/lua.1 lua${SLOT}.1
+ newman doc/luac.1 luac${SLOT}.1
+}
+
+# Makefile contains a dummy target that doesn't do tests
+# but causes issues with slotted lua (bug #510360)
+src_test() { :; }
diff --git a/dev-lang/lua/metadata.xml b/dev-lang/lua/metadata.xml
new file mode 100644
index 000000000000..0e7b568c3899
--- /dev/null
+++ b/dev-lang/lua/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>rafaelmartins@gentoo.org</email>
+ <name>Rafael G. Martins</name>
+</maintainer>
+<maintainer type="person">
+ <email>williamh@gentoo.org</email>
+ <name>William Hubbs</name>
+</maintainer>
+<use><flag name="deprecated">make deprecated data structures/routines available</flag></use>
+</pkgmetadata>
diff --git a/dev-lang/luajit/Manifest b/dev-lang/luajit/Manifest
new file mode 100644
index 000000000000..1446a5ceb8cd
--- /dev/null
+++ b/dev-lang/luajit/Manifest
@@ -0,0 +1,12 @@
+DIST LuaJIT-1.1.6.tar.gz 364447 SHA256 c3dee987635540f64ebe834aa6c8ef17e0c0b8248324ee20953f50c98be2dd8a SHA512 5b08d0409bed23b3efd05d50007819c0023323fb0f921256fd33902b434221ebaa5ff4568813863ba3220271f7fd54720479ab8161b09d26ef5873030431592a WHIRLPOOL 6fa2504ccbeeb07434bf251b609df4a2834924da97c8efd5b5ca23a1d7215ca469b22fdd0aa166612606bc791a55b3ce150c6c1f2c3fae3598b0d1f4a75b2955
+DIST LuaJIT-2.0.2.tar.gz 843031 SHA256 c05202974a5890e777b181908ac237625b499aece026654d7cc33607e3f46c38 SHA512 c1afea13ec61a59f37d1f61fc50bcac47208d9d4f0a80689b74e901ad2b34294b6c89a0b4eef54b43f3d2db411660da61b191b0bbfba4ba2f97743a9ee4484e3 WHIRLPOOL cb6e8ee6c5ac2293ca5d5452cda34769d3229e2d4681c0ce3c164659c2d2d781f8474e243747b197c10b3abc116e4145df6f5293317f1db871865f38ecd2b6cd
+DIST LuaJIT-2.0.3.tar.gz 844927 SHA256 55be6cb2d101ed38acca32c5b1f99ae345904b365b642203194c585d27bebd79 SHA512 7b3e3de22ac3602299b5918b60801e45a3278e547a15c16fdae7359538d4ada27ba664935d5f97c7409f330c2f8efeaae9ea03415f5e9d5a9d81e022cd5d36e0 WHIRLPOOL 1ba759b85048cfd57ebc02cfce477e9ddb327e7d27acd78f93fb2debfbf010a96e7b127324ebf6b81b1f35132f5a0a3a56ffca64fe0e66cba80c28b1cb49b433
+DIST LuaJIT-2.0.4.tar.gz 847615 SHA256 620fa4eb12375021bef6e4f237cbd2dd5d49e56beb414bee052c746beef1807d SHA512 a72957bd85d8f457269e78bf08c19b28c5707df5d19920d61918f8a6913f55913ce13037fb9a6463c04cefde0c6644739f390e09d656e4bbc2c236927aa3f8f9 WHIRLPOOL 0d2b7d3dbede1e42afd820fb8b327f643282efd1549ae7288da82ed157ef34ac2ec6bee481ae3d02abdebb6528e42c12c4d6fa8e26774f1b59e17d3998e9f4c2
+EBUILD luajit-1.1.6.ebuild 1295 SHA256 0bea7bb3f8de1508b80b4c5f77e3021217f5fbbc3d6992fb9677d374b2415245 SHA512 9106294b241d6ee166797a9ddec19d76375e74463e26c3dff4200a576b0378eed7b0fa3678d9ae7b8ffa8ab74395e870fb580d2ea1f875be371b0efec5e3021f WHIRLPOOL e9c4c43ef15e9875e75ffd6e9de23840c526ca46bdefcaaf2b9c543f55ef0b21590f6003d181e0af7a50cd9d9199a8c7497ee512903c53f304611a40e0206360
+EBUILD luajit-2.0.2.ebuild 1701 SHA256 8b7e580fd8d6a6c28ada6f45adee0c2bea8412e5b5f6972d25badae1edbcc82b SHA512 b414dbdb569c6121c21b68ff3f0c411d126ca82edff21df5b6640cc55f0c9b9a8edee7975d2bd7bc2d68d0073c7f06e390587884ed82e4827935025406e8df64 WHIRLPOOL af9764e22028e0ed734f5bdd892db1cc8fb2f83e76b3baeb719fb65e1b6e3d21396055811e90f607bfd83b14d055d6a899d7c30511e5bb5dbed9ea1cf9596ccd
+EBUILD luajit-2.0.3-r1.ebuild 1359 SHA256 2c4fe5ba928e810dc51a89d751115c3965a2d2069ec44220123ee33b767989d7 SHA512 4d49cd2b1666c56ad86f63b20660846cc0d2b85bb430177adee0a059f09ee9337f979f04f27262eb8e54081dca2bbade2a13969dfed30f4a7ddde77c14a284d4 WHIRLPOOL 98264a567da4fc54bb5f5bb8fffbde668438c9249686b987f1c2ae48c5cbe89c194148ae7aac62d4a8ace7ed7b1a9888f4f5844d5be087acd0ae557e77a4111c
+EBUILD luajit-2.0.3.ebuild 1704 SHA256 e7be722bfe3237395653f57cb2cab3fb9175bba7b08b9009be00bb1f7cf58d95 SHA512 dde1467f89f2feac5123d2f63f1e305925fdca04f09fb4725cf5e0da3ff29ad0ce894fadce71fb1937a5954f14017000cf20175ba639c520cc868a7800577528 WHIRLPOOL 343ae6b3c027de7bc8aa710bdb959e041755d5676cdda39df570bf7e27bd368feea136eea09ab57871e0b464f50d3c9e417581d9b78233c1408b38cfe9588ab1
+EBUILD luajit-2.0.4.ebuild 1358 SHA256 7336336ebaf6fd79732b697f252b39aecf951103247644603306ba051420027a SHA512 94f00d88a15725f285061b6d2f5be4d565bfa004776115f7625bfe6aa60ac08c7dd5797b1766de4a225e35938771f297d592f7a230ffc2bf948084bc4ed4631c WHIRLPOOL 9e3967c57595e24d7c89eeedbf7f71638ff20fccce42d84c6868661f2615085105afad3d793d01079a55f79f6d3616ae82616009b9e0156e31007aa674cd9103
+MISC ChangeLog 3635 SHA256 1f5cf6d9b3a4fdfbdd63d9f016c2d70527ee840c788c4475985c3fc7d75fdefc SHA512 c252d119909ae4cf829092e49967e7d24d9246f96213a7b3caa3e16fe6a63d5c0af613615c4261ad458a6497f5c435682b0a574e11807fedabef6cf7666d15cf WHIRLPOOL 4a3cbbaa5dd76883e00fb86903a4c1bb7af062e8d37c149b0baed8404e4086695c6e12e6fc32026ad9ab278ae1b5adb85d3e3b5bef008d8c0f15d730cc5644cb
+MISC ChangeLog-2015 4681 SHA256 1ab587d0179243aa37c0adbbd8502b6de0a705b1d62ed4481ab576926f9d8f75 SHA512 f1b92e920a24363113d4b2ee3dc4cf82e990fb174b8e527944af1eb0615a159315cd14337a634644c03eee7e9dd04f95a032b838686dfad55f6336c7a9fda993 WHIRLPOOL e0e7a8bf4da61867eeda236daef8b8b94633d16ed8c1daaf30c558534e3ad04a049b003a0188d63178ab6e8f4b40a59b0cb2d0813aa95b2ada650af9030abaf2
+MISC metadata.xml 552 SHA256 36a2af1d1cba63ae23c2c37e6fdc2223fcfe047283e97030d92980af84eedcc0 SHA512 9d6ef1cb9acf52db52ec192bc51cbab6a7aa198dbf108ed76b25b0e258491b2f8d5ec0981c538546cc96de490c8c1ac852e337ef09ab5898ad4f2c48f5670f07 WHIRLPOOL a3533aeea392687267b00c4465e9bcf0d3184a184884737f2a640be7de200571ae8d895d5557ac9f917d8d7487734bb6d6005cda5d9971cc61654d80a7b898a1
diff --git a/dev-lang/luajit/luajit-1.1.6.ebuild b/dev-lang/luajit/luajit-1.1.6.ebuild
new file mode 100644
index 000000000000..880ea2361374
--- /dev/null
+++ b/dev-lang/luajit/luajit-1.1.6.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit pax-utils
+
+MY_P="LuaJIT-${PV}"
+
+DESCRIPTION="A Just-In-Time Compiler for the Lua programming language"
+HOMEPAGE="http://luajit.org/"
+SRC_URI="http://luajit.org/download/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="1"
+KEYWORDS="~amd64 ~x86"
+IUSE="readline"
+
+DEPEND="readline? ( sys-libs/readline )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare(){
+ # fixing prefix
+ sed -i -e "s#/usr/local#${D}/usr#" Makefile \
+ || die "failed to fix prefix in Makefile"
+ sed -i -e 's#/usr/local/#/usr/#' src/luaconf.h \
+ || die "failed to fix prefix in luaconf.h"
+
+ # forcing the use of our CFLAGS
+ sed -i -e "s/\$(MYCFLAGS)/\$(MYCFLAGS) ${CFLAGS}/" src/Makefile \
+ || die "failed to force the use of the CFLAGS from the user"
+}
+
+src_compile(){
+ if use readline; then
+ emake linux_rl || die "emake failed."
+ else
+ emake linux || die "emake failed."
+ fi
+}
+
+src_install(){
+ einstall
+
+ # removing empty dir that was supposed to have the man pages.
+ # dev-lang/luajit:1 doesn't install man pages.
+ rm -rf "${D}usr/man"
+
+ mv "${D}usr/bin/luajit" "${D}usr/bin/luajit-${PV}" || die "mv failed!"
+ pax-mark m "${D}usr/bin/luajit-${PV}"
+ dosym "luajit-${PV}" "/usr/bin/luajit-${SLOT}"
+}
diff --git a/dev-lang/luajit/luajit-2.0.2.ebuild b/dev-lang/luajit/luajit-2.0.2.ebuild
new file mode 100644
index 000000000000..1fbe283b77f7
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.0.2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib pax-utils versionator toolchain-funcs
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_P="LuaJIT-${MY_PV}"
+if [[ $(get_version_component_range 4) != "" ]]; then
+ HOTFIX="v${PV}"
+ HOTFIX="${HOTFIX/_p/_hotfix}.patch"
+fi
+
+DESCRIPTION="Just-In-Time Compiler for the Lua programming language"
+HOMEPAGE="http://luajit.org/"
+SRC_URI="http://luajit.org/download/${MY_P}.tar.gz
+ ${HOTFIX:+http://luajit.org/download/${HOTFIX}}"
+
+LICENSE="MIT"
+# this should probably be pkgmoved to 2.0 for sake of consistency.
+SLOT="2"
+KEYWORDS="amd64 arm ~ppc x86 ~amd64-linux ~x86-linux"
+IUSE="lua52compat"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare(){
+ if [[ -n ${HOTFIX} ]]; then
+ epatch "${DISTDIR}/${HOTFIX}"
+ fi
+ sed -i "s,PREFIX= /usr/local,PREFIX= ${EPREFIX}/usr," Makefile || die 'sed failed.'
+ sed -i "s,/lib,/$(get_libdir)," etc/${PN}.pc || die 'sed2 failed.'
+}
+
+src_compile() {
+ emake \
+ Q= \
+ PREFIX="${EPREFIX}/usr" \
+ DESTDIR="${D}" \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ STATIC_CC="$(tc-getCC)" \
+ DYNAMIC_CC="$(tc-getCC) -fPIC" \
+ TARGET_LD="$(tc-getCC)" \
+ TARGET_AR="$(tc-getAR) rcus" \
+ TARGET_STRIP="true" \
+ INSTALL_LIB="${ED%/}/usr/$(get_libdir)" \
+ XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")"
+}
+
+src_install(){
+ emake install \
+ DESTDIR="${D}" \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ STATIC_CC="$(tc-getCC)" \
+ DYNAMIC_CC="$(tc-getCC) -fPIC" \
+ TARGET_LD="$(tc-getCC)" \
+ TARGET_AR="$(tc-getAR) rcus" \
+ TARGET_STRIP="true" \
+ INSTALL_LIB="${ED%/}/usr/$(get_libdir)"
+
+ pax-mark m "${ED}usr/bin/luajit-${MY_PV}"
+
+ cd "${S}"/doc
+ dohtml -r *
+}
diff --git a/dev-lang/luajit/luajit-2.0.3-r1.ebuild b/dev-lang/luajit/luajit-2.0.3-r1.ebuild
new file mode 100644
index 000000000000..fbf13232e26f
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.0.3-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib pax-utils versionator toolchain-funcs
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_P="LuaJIT-${MY_PV}"
+if [[ -n $(get_version_component_range 4) ]]; then
+ HOTFIX="v${PV}"
+ HOTFIX="${HOTFIX/_p/_hotfix}.patch"
+fi
+
+DESCRIPTION="Just-In-Time Compiler for the Lua programming language"
+HOMEPAGE="http://luajit.org/"
+SRC_URI="http://luajit.org/download/${MY_P}.tar.gz
+ ${HOTFIX:+http://luajit.org/download/${HOTFIX}}"
+
+LICENSE="MIT"
+# this should probably be pkgmoved to 2.0 for sake of consistency.
+SLOT="2"
+KEYWORDS="amd64 arm ~ppc x86 ~amd64-linux ~x86-linux"
+IUSE="lua52compat"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare(){
+ if [[ -n ${HOTFIX} ]]; then
+ epatch "${DISTDIR}/${HOTFIX}"
+ fi
+}
+
+_emake() {
+ emake \
+ Q= \
+ PREFIX="${EPREFIX}/usr" \
+ MULTILIB="$(get_libdir)" \
+ DESTDIR="${D}" \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ STATIC_CC="$(tc-getCC)" \
+ DYNAMIC_CC="$(tc-getCC) -fPIC" \
+ TARGET_LD="$(tc-getCC)" \
+ TARGET_AR="$(tc-getAR) rcus" \
+ TARGET_STRIP="true" \
+ INSTALL_LIB="${ED%/}/usr/$(get_libdir)" \
+ "$@"
+}
+
+src_compile() {
+ _emake XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")"
+}
+
+src_install(){
+ _emake install
+
+ pax-mark m "${ED}usr/bin/luajit-${MY_PV}"
+
+ cd "${S}"/doc
+ dohtml -r *
+}
diff --git a/dev-lang/luajit/luajit-2.0.3.ebuild b/dev-lang/luajit/luajit-2.0.3.ebuild
new file mode 100644
index 000000000000..90bc553cf931
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.0.3.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib pax-utils versionator toolchain-funcs
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_P="LuaJIT-${MY_PV}"
+if [[ $(get_version_component_range 4) != "" ]]; then
+ HOTFIX="v${PV}"
+ HOTFIX="${HOTFIX/_p/_hotfix}.patch"
+fi
+
+DESCRIPTION="Just-In-Time Compiler for the Lua programming language"
+HOMEPAGE="http://luajit.org/"
+SRC_URI="http://luajit.org/download/${MY_P}.tar.gz
+ ${HOTFIX:+http://luajit.org/download/${HOTFIX}}"
+
+LICENSE="MIT"
+# this should probably be pkgmoved to 2.0 for sake of consistency.
+SLOT="2"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="lua52compat"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare(){
+ if [[ -n ${HOTFIX} ]]; then
+ epatch "${DISTDIR}/${HOTFIX}"
+ fi
+ sed -i "s,PREFIX= /usr/local,PREFIX= ${EPREFIX}/usr," Makefile || die 'sed failed.'
+ sed -i "s,/lib,/$(get_libdir)," etc/${PN}.pc || die 'sed2 failed.'
+}
+
+src_compile() {
+ emake \
+ Q= \
+ PREFIX="${EPREFIX}/usr" \
+ DESTDIR="${D}" \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ STATIC_CC="$(tc-getCC)" \
+ DYNAMIC_CC="$(tc-getCC) -fPIC" \
+ TARGET_LD="$(tc-getCC)" \
+ TARGET_AR="$(tc-getAR) rcus" \
+ TARGET_STRIP="true" \
+ INSTALL_LIB="${ED%/}/usr/$(get_libdir)" \
+ XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")"
+}
+
+src_install(){
+ emake install \
+ DESTDIR="${D}" \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ STATIC_CC="$(tc-getCC)" \
+ DYNAMIC_CC="$(tc-getCC) -fPIC" \
+ TARGET_LD="$(tc-getCC)" \
+ TARGET_AR="$(tc-getAR) rcus" \
+ TARGET_STRIP="true" \
+ INSTALL_LIB="${ED%/}/usr/$(get_libdir)"
+
+ pax-mark m "${ED}usr/bin/luajit-${MY_PV}"
+
+ cd "${S}"/doc
+ dohtml -r *
+}
diff --git a/dev-lang/luajit/luajit-2.0.4.ebuild b/dev-lang/luajit/luajit-2.0.4.ebuild
new file mode 100644
index 000000000000..22e97b99a50f
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.0.4.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib pax-utils versionator toolchain-funcs
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_P="LuaJIT-${MY_PV}"
+if [[ -n $(get_version_component_range 4) ]]; then
+ HOTFIX="v${PV}"
+ HOTFIX="${HOTFIX/_p/_hotfix}.patch"
+fi
+
+DESCRIPTION="Just-In-Time Compiler for the Lua programming language"
+HOMEPAGE="http://luajit.org/"
+SRC_URI="http://luajit.org/download/${MY_P}.tar.gz
+ ${HOTFIX:+http://luajit.org/download/${HOTFIX}}"
+
+LICENSE="MIT"
+# this should probably be pkgmoved to 2.0 for sake of consistency.
+SLOT="2"
+KEYWORDS="amd64 arm ppc x86 ~amd64-linux ~x86-linux"
+IUSE="lua52compat"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare(){
+ if [[ -n ${HOTFIX} ]]; then
+ epatch "${DISTDIR}/${HOTFIX}"
+ fi
+}
+
+_emake() {
+ emake \
+ Q= \
+ PREFIX="${EPREFIX}/usr" \
+ MULTILIB="$(get_libdir)" \
+ DESTDIR="${D}" \
+ HOST_CC="$(tc-getBUILD_CC)" \
+ STATIC_CC="$(tc-getCC)" \
+ DYNAMIC_CC="$(tc-getCC) -fPIC" \
+ TARGET_LD="$(tc-getCC)" \
+ TARGET_AR="$(tc-getAR) rcus" \
+ TARGET_STRIP="true" \
+ INSTALL_LIB="${ED%/}/usr/$(get_libdir)" \
+ "$@"
+}
+
+src_compile() {
+ _emake XCFLAGS="$(usex lua52compat "-DLUAJIT_ENABLE_LUA52COMPAT" "")"
+}
+
+src_install(){
+ _emake install
+
+ pax-mark m "${ED}usr/bin/luajit-${MY_PV}"
+
+ cd "${S}"/doc
+ dohtml -r *
+}
diff --git a/dev-lang/luajit/metadata.xml b/dev-lang/luajit/metadata.xml
new file mode 100644
index 000000000000..c5b9059c538c
--- /dev/null
+++ b/dev-lang/luajit/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>rafaelmartins@gentoo.org</email>
+ <name>Rafael G. Martins</name>
+ </maintainer>
+ <use>
+ <flag name="lua52compat">
+ Enable some upwards-compatible features
+ from Lua 5.2 that are unlikely to break existing code.
+ </flag>
+ </use>
+ <longdescription lang="en">
+ LuaJIT is a Just-In-Time Compiler for the Lua programming language.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/maude/Manifest b/dev-lang/maude/Manifest
new file mode 100644
index 000000000000..f226ed94b426
--- /dev/null
+++ b/dev-lang/maude/Manifest
@@ -0,0 +1,9 @@
+AUX maude-2.5.0-prll.patch 627 SHA256 216ac931b326e50f6811df16b5e6c79933c6cc810d90bd355664311219662e90 SHA512 640dc2d784b3010af41ea7c186f27ef71d96efa26ab68b9371a990c442ca4d33d7925cf9c2a096487c1d7bc38e920333a71d969aa683ee2231d3ce954a9ff1e4 WHIRLPOOL b7f6893336b7e20f52616824539cf791c57307185f6942c16f0b5598208d08911bf8b08a7f77662a35a7fd2441a7cbbe2e9bf7fc0aa565723d9a2e5a9823d38e
+AUX maude-2.6-search-datadir.patch 1124 SHA256 1c73351f0bae74ec63eb420df34af050a8594c755ac5ed63b8980624db3c7d35 SHA512 3bdaa49e6312d965c753450c5fec39c1175e6a5a57c570bce56f10d6bf3a56027fc8eb17c3d899aa752d4094eae4bbc7d1eec0022adc656894beef759c151cc5 WHIRLPOOL 6aff037a2a8eb481a146b0cb941c7c82cb9c91ab219c1b30921b4855ce4554d7b40b62d50670dbeb6d62c223f79d16f99ecbe560f8ef4bdd5beb92058318912d
+AUX maude-2.7-bison-parse-param.patch 1027 SHA256 f9cb3cbbdbf560cc2b73a6357f17c180fa4291f211cb8da3e98e0d459747a09d SHA512 553c1e96fd72687025b71d04c476d853e0e2c8bab48f91f98ce1cb515562d27b7bbcb4e20ffb56c2dc3c7ee9cdbfe7c2da1d6d609b4bba34823c0637375f012c WHIRLPOOL 87849f2a8ad1cac2dc997a380079a915673334b0336576be113879bfbf8bb030e72c9786d2b38a06912a980f1b9773754bf9148532f318070ab8d88b200ee0db
+DIST Maude-2.7.tar.gz 1663708 SHA256 f5da81556c3180aee6a9cf4cef2f0b9bb2ff3b7fcc7bb103cb4ac3f5770b2b89 SHA512 eb5225a7ec75df5f79d1e9c0d78c33427c0cf07bea83dae9e559d6d4cfc85fb03985596daf0c9c8794b34859510482f93b855254c1a3c650ee7520a3530a2070 WHIRLPOOL 252b51f303e7d5d22226bbfa96e8a62bd94bccc92403f40fce990ce6d0e3e57305b9f823ef3cf5f43f4386a4ce326032c7c17e47a0a4ad8bf86538e2e1435fa3
+DIST maude-2.6-extras.tar.xz 3157004 SHA256 64cd72026c345ff1c1edeca64f9a9fce8067e6df5eccdaeee4bfe7a0f07d3102 SHA512 0533f0f226057d2668052f360245f296d36129ec242ff0bfa91fada9db5bc347d276d3468c86fbac92f019f3a2f152c7cb4e58a7f1265c1fb5a8b1b496fac5cd WHIRLPOOL 7a5ea0bf49132ecb3b88f26432c8aedb7ce2f9632f4e9cbb5fa08ab36b65c9a165d58e4a880e8ea97eff91280e28fb01e224a61539b73b898f3e9b4cba34ce44
+EBUILD maude-2.7.ebuild 1317 SHA256 2082830f47063257d5e994e27ad670c01c4884a12d95fe51eaca3fee15b29f83 SHA512 6c3d4efa0212d2a933d25f07d200cbe26ce9245d20b0af5707562b517ae9da3c4cbd4692d05ca1a65ff40d95dab35faf81892a0b8b5a056e1ab00f5bb383d838 WHIRLPOOL cff3d0628a11b1fb41023b3e71ab26745dabba4b0caf392488ce1c66d613add5b881e4442433694314b92c4cc33a68a3720d617c4268a3e9942366c1156d0d84
+MISC ChangeLog 3143 SHA256 7275d679ddb67090119e584bdd360fd2b57dd0864ec35ac8e1ce60e1376a49ba SHA512 3c3a3b6818def65be8e146407c955966055b96d74022e1b1f08c3fa213cb76729f6b729ed6970df069025d29265778f1f39cb71e662c1872159c0e76c9719347 WHIRLPOOL f2ea726a260551dbc18df3b7dd255e67db7d5d288a3ae1acf79d11ecce556468e104dd5e029add018df16750646e6984d76c898e48e0c71e24aa789711fe9f88
+MISC ChangeLog-2015 3206 SHA256 c99fb6f34d4d742f8f26b7d9154a3a233294d51d8c08af12c2278896b634d6ec SHA512 5af419ac889aef43b1c764ffbbc3d26d177cded2db0bf5de321fabcb935fcac195368380fb01c31b3a55dd7d97d77943b9097b0fa07822072d8e8838d24877b8 WHIRLPOOL ab63ecd18463f81cc88dae7713a1fd530c5171abc2c246c1fea1a599e70501e2c9c889ce395d90b2485e75cc6bd0893dfda110c41c240727153b8576ef02cb33
+MISC metadata.xml 702 SHA256 d2d1d8e28d9d14b09ab494926362be4008993cf030be00540daa8e6afebae161 SHA512 51984557a4f5a933e4fa14a49466574846310c0e4439ecc5b2b8ac4b61c8809dd3d01327807662c587eb7af9332f4fd3994d60364de1c70e07d63d01d97daa3c WHIRLPOOL 2f938a5d5d1f8ccba915293e5bb4a46d7efc1e1a359ed984239d4b7414393ff78cd159dceab93d825169888441c654b2e40268cd908b4f0388713a887f2e1c5c
diff --git a/dev-lang/maude/files/maude-2.5.0-prll.patch b/dev-lang/maude/files/maude-2.5.0-prll.patch
new file mode 100644
index 000000000000..5499af3eb764
--- /dev/null
+++ b/dev-lang/maude/files/maude-2.5.0-prll.patch
@@ -0,0 +1,24 @@
+diff --git a/src/Mixfix/Makefile.am b/src/Mixfix/Makefile.am
+index d811631..295f0c6 100644
+--- a/src/Mixfix/Makefile.am
++++ b/src/Mixfix/Makefile.am
+@@ -72,7 +72,7 @@ libmixfix_a_SOURCES = \
+ EXTRA_libmixfix_a_SOURCES = \
+ compiler.cc
+
+-BUILT_SOURCES = surface.yy surface.cc surface.h lexer.cc
++BUILT_SOURCES = surface.cc lexer.cc
+ CLEANFILES = surface.yy surface.cc surface.h lexer.cc
+
+ surface.yy: \
+@@ -87,7 +87,9 @@ surface.yy: \
+ $(srcdir)/bottom.yy \
+ > surface.yy
+
+-surface.cc surface.h: surface.yy
++surface.h: surface.yy
++
++surface.cc: surface.h
+ $(BISON) -dv surface.yy -o surface.c
+ mv surface.c surface.cc
+
diff --git a/dev-lang/maude/files/maude-2.6-search-datadir.patch b/dev-lang/maude/files/maude-2.6-search-datadir.patch
new file mode 100644
index 000000000000..f5522eda2a05
--- /dev/null
+++ b/dev-lang/maude/files/maude-2.6-search-datadir.patch
@@ -0,0 +1,37 @@
+Have maude search in datadir for its files.
+--- a/src/Main/main.cc
++++ b/src/Main/main.cc
+@@ -263,6 +263,11 @@
+ {
+ if (directoryManager.searchPath(MAUDE_LIB, directory, fileName, R_OK))
+ return true;
++ if (directoryManager.checkAccess(DATADIR, fileName, R_OK))
++ {
++ directory = DATADIR;
++ return true;
++ }
+ if (!(executableDirectory.empty()) &&
+ directoryManager.checkAccess(executableDirectory, fileName, R_OK))
+ {
+--- a/src/Mixfix/global.cc
++++ b/src/Mixfix/global.cc
+@@ -83,6 +83,9 @@
+ return true;
+ if (directoryManager.searchPath(MAUDE_LIB, directory, fileName, R_OK, ext))
+ return true;
++ directory = DATADIR;
++ if (directoryManager.checkAccess(directory, fileName, R_OK, ext))
++ return true;
+ if (!(executableDirectory.empty()) &&
+ directoryManager.checkAccess(executableDirectory, fileName, R_OK, ext))
+ {
+--- a/src/Mixfix/global.hh
++++ b/src/Mixfix/global.hh
+@@ -36,6 +36,7 @@
+
+ #define PRELUDE_NAME "prelude.maude"
+ #define MAUDE_LIB "MAUDE_LIB"
++#define DATADIR "/usr/share/maude"
+
+ bool
+ findPrelude(string& directory, string& fileName);
diff --git a/dev-lang/maude/files/maude-2.7-bison-parse-param.patch b/dev-lang/maude/files/maude-2.7-bison-parse-param.patch
new file mode 100644
index 000000000000..2aa77f01c4e8
--- /dev/null
+++ b/dev-lang/maude/files/maude-2.7-bison-parse-param.patch
@@ -0,0 +1,39 @@
+Author: Jakub Wilk <jwilk@debian.org>
+Last-Update: Tue, 20 May 2014 13:35:26 +0200
+Bug-Debian: http://bugs.debian.org/733407
+Description: this is quick and dirty patch to use %parse-param instead
+ of deprecated YYPARSE_PARAM (and eventually removed in Bison 3.0).
+ %parse-param was added in bison 1.875, over a decade ago, so no
+ Build-Depends adjustments are needed. :-)
+
+--- a/src/Mixfix/top.yy
++++ b/src/Mixfix/top.yy
+@@ -24,6 +24,8 @@
+ // Parser for Maude surface syntax.
+ //
+
++%parse-param {void* YYPARSE_PARAM}
++
+ %{
+ #include <string>
+ #include <stack>
+@@ -91,7 +93,7 @@ SyntaxContainer* oldSyntaxContainer = 0;
+ Int64 number;
+ Int64 number2;
+
+-static void yyerror(char *s);
++static void yyerror(void *, char *s);
+
+ void cleanUpModuleExpression();
+ void cleanUpParser();
+--- a/src/Mixfix/bottom.yy
++++ b/src/Mixfix/bottom.yy
+@@ -23,7 +23,7 @@
+ %%
+
+ static void
+-yyerror(char *s)
++yyerror(void *, char *s)
+ {
+ if (!(UserLevelRewritingContext::interrupted()))
+ IssueWarning(LineNumber(lineNumber) << ": " << s);
diff --git a/dev-lang/maude/maude-2.7.ebuild b/dev-lang/maude/maude-2.7.ebuild
new file mode 100644
index 000000000000..c871a47748f1
--- /dev/null
+++ b/dev-lang/maude/maude-2.7.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="High-level specification language for equational and logic programming"
+HOMEPAGE="http://maude.cs.uiuc.edu/"
+SRC_URI="
+ http://maude.cs.illinois.edu/w/images/2/2d/${P^}.tar.gz
+ https://dev.gentoo.org/~jlec/distfiles/${PN}-2.6-extras.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples"
+
+RDEPEND="
+ dev-libs/gmp:0=[cxx]
+ dev-libs/libsigsegv
+ dev-libs/libtecla
+ sci-libs/buddy"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+S="${WORKDIR}/${P^}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.5.0-prll.patch"
+ "${FILESDIR}/${PN}-2.6-search-datadir.patch"
+ "${FILESDIR}/${PN}-2.7-bison-parse-param.patch"
+)
+
+src_prepare() {
+ default
+ sed -i -e "s:/usr:${EPREFIX}/usr:g" src/Mixfix/global.hh || die
+ eautoreconf
+}
+
+src_install() {
+ default
+
+ # install data and full maude
+ insinto /usr/share/${PN}
+ doins -r src/Main/*.maude
+ doins "${WORKDIR}"/${PN}-2.6-extras/full-maude.maude
+
+ # install docs and examples
+ use doc && dodoc -r "${WORKDIR}"/${PN}-2.6-extras/pdfs/.
+ if use examples; then
+ docinto examples
+ dodoc -r "${WORKDIR}"/${PN}-2.6-extras/{manual,primer}-examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-lang/maude/metadata.xml b/dev-lang/maude/metadata.xml
new file mode 100644
index 000000000000..87cb557f086f
--- /dev/null
+++ b/dev-lang/maude/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@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+</maintainer>
+<longdescription>
+ Maude is a high-performance reflective language and system supporting
+ both equational and rewriting logic specification and programming for a
+ wide range of applications. Maude has been influenced in important ways
+ by the OBJ3 language, which can be regarded as an equational logic
+ sublanguage. Besides supporting equational specification and
+ programming, Maude also supports rewriting logic computation.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/mercury-extras/Manifest b/dev-lang/mercury-extras/Manifest
new file mode 100644
index 000000000000..6bcb092993a5
--- /dev/null
+++ b/dev-lang/mercury-extras/Manifest
@@ -0,0 +1,12 @@
+DIST mercury-extras-13.05.2-gentoo-patchset-3.tar.gz 3538 SHA256 96a041d185778befa98c98b232041738878666a33bd695dbc7d1e2ab9eccca41 SHA512 c151f876768c6b6ab7b46b4e2501569586249f5e185e534ebb5817206ac0844cd081ccae86a26ef85f27eab9d851017393c837728bd194520a549a0a60f738ef WHIRLPOOL 3b8eccd3252027a99a700240a45be2a1dc650055e65a4699ee3f93b8aca39da9057787e576c3e76a48a9134f25cff2c3e7a9ab88c1fc25a6eb2580d1f38ddb42
+DIST mercury-extras-14.01-gentoo-patchset-1.tar.gz 3856 SHA256 2ea27bc699998834298dab3f9c1179681ac528b32f005493cd5027d0dbe52fbc SHA512 c584efd4c7af54d2e8d5af0a63acced118f356527a2bf692262e37366e1018247aac8c1bb8f700f08f8f0a2c95d979e215e3c949ec1dc2994ab40048eb5b253c WHIRLPOOL 4b5169eb5cdd70caa350e562c276a59bfe9eca5fc3d66d10a3e10b6b653d0a41dd18409c1d26a66a20d1cecf31282408fcbf2d3e5321f16a57f095dd4907165f
+DIST mercury-extras-14.01.1-gentoo-patchset-0.tar.gz 3688 SHA256 4aa4d2f1e1b7637b8df0dfba1ac6e46bf0314c06645ed3197452c615e84d6b66 SHA512 02781ca23e72920c932067f7270d06e45909728133588c181b94f7b7580f841b4b0f1dd523e0c100350b191e5b28a7d1f10ad51fdffe2dcb02ff78cd5a906e3b WHIRLPOOL 834923a00ea98ae4d28cfd451e5d6e0638adac99c92a85d173210b87e357cc8419a3a80cf6f11242ce548b3c4b3658841da226600df73821b57c4192766e0cc3
+DIST mercury-srcdist-13.05.2.tar.gz 53847394 SHA256 8491cf419b996a315bf8664154dd91aed940274ded98e3aded733dbe1939f95f SHA512 2298804d3a04bca6be4bd3046643c7c0d0b22c447423017869cd9bf3a4fb6ec9fd29b5d8e1a386d5d52d07be5cad73608f1fcacf46732a7add93a01dcd199c08 WHIRLPOOL 2a81bebfd4b97b9bb1b0e174025e6050149c8e5f812cd97cbdc41818faa18c15f9494925f1f320682087cc45264bc00db07bef6862afef12317f77cc169a7f86
+DIST mercury-srcdist-14.01.1.tar.gz 52658945 SHA256 98f7cbde7a7425365400feef3e69f1d6a848b25dc56ba959050523d546c4e88b SHA512 a128ef0fd4955abadea32019ec59297ffe32537415f32e9e948cbc1c3439bb40eb09de77569690fb18dd7d6969a2b1141b3ae5baeb87f2627eaa65ad93add92c WHIRLPOOL 7b859eb5c7c1194d63c0aeeeeac3686c57436100b5618ae31a901119a33443363acb80a908a15dfdfa8b61fd9ccb4e552cbb972a3cc735b7a768ee7c9b1b6091
+DIST mercury-srcdist-14.01.tar.gz 52683989 SHA256 4446b7b4eafd35540495ef90ce93b71cb88efa2d744628aee80f76a694aefcc1 SHA512 77f61df64fc150e08f191860f285b97d11a71a52eabc95f660b3c90d88f8ee71d1227f7ab4b8be78be9d4aa3d62a260a874020023e4795da4cfd2e6fefa9965f WHIRLPOOL a7123063590e39ae15222eb59a2c3681ae37bea211967c857eb8725090d342f0aba7a55446529f8608afb9895746581943527b1b3c313c5cbb96f638a3377404
+EBUILD mercury-extras-13.05.2.ebuild 4700 SHA256 87e3a8a1c17d542f0e55812a1a8935e5ce7d28be989c63a0e391b90eddacb1a5 SHA512 df9663114548982f6f3453e8e1550712faa09093de7a2f24db4102ad4ac0856e2510cdb1f2841d6cec03f98311b0c170e0818507b7b7d7cd6b9e8dc22d13a33f WHIRLPOOL 53451b9f0d6cd3d2d76f7b45748496527325adae99065ede4529c3cc46ef2eac6c2c0cf38734b623a386d6370035dba4f204d86251ec21a254cd81d9a17699a7
+EBUILD mercury-extras-14.01.1.ebuild 4598 SHA256 d01f67b21b2d7ad00c464242924787320d613f5377e9502228a65df7b8650a8c SHA512 6e3a8990ede65e71cfa12c900b190f112e203b3f27b83895d8935666e4c67b2256d75ff6032bb2f8cda765991a371552eda291610a5603d3365be08cbf5241dd WHIRLPOOL 228855ec48dafaeb1c4c9f76454fa1aef35a2bdd3d08c61ecf72c922264f3bb43755a2fbab19a6aefcb16b8d90892be95f97ad7eaadd380696117462b05bdc1e
+EBUILD mercury-extras-14.01.ebuild 4582 SHA256 71daf72be4dd8c2c77f7e124cef1a908d3675a5b13adbb0f16fb3c8af81b9cab SHA512 4f9d352fe306c95f3cf22acfcd9ac6623c51d4575140452cca095eebdf52271bf3061da52c735ad0d00d943792f332711de46b67773a26bab1e2d1c44813723a WHIRLPOOL 100b4284e483b2a7c845fd56bec792464ae54dcaa6315fc1e947d32c37d2939fee1e5ed3c2451b4b41017a9f12184aa900b7edbbf15c9452da0b72a69f921879
+MISC ChangeLog 2615 SHA256 d4fb74ae94b7f4882ce737bce5fd1de790efde37950b6aa5aab6253716a63e79 SHA512 00b6576c42904b50196204e1e80bb37ad9f57338d34a8318a3bc7da619750f9bdecb065f33c2af92310c32d60d2e98dad539a3776ecd60359de2ccc9c983a99f WHIRLPOOL 9a6024d18b19f054f895ea5a167af0c70fcd31113a92ab4aff9709e3c818c56e0893bc4dfacef98fa3edfad72e24c02f246a859a8e4805ece446bf01231c4963
+MISC ChangeLog-2015 29656 SHA256 b2eb66e81713a348a6a39fbe3f42910dfba899b183c616201526e4d4e8760658 SHA512 c38add40078ccb93755c55234277bfb5a2c3a3e89b7b386ff58fb502433e190dd9827245111c3e317f5fa5d271456db7bc7f7c546af0286332708996b8060fac WHIRLPOOL 0070baf5d90e6c6965689bba408ffe87379f2d663f9e5dccdddddd04b2555f999f7638dc5da550d192261904df29225d451ccac47e15890fe99d123f95795b9d
+MISC metadata.xml 240 SHA256 9f29aeb8bcf21ea7557e7dfa496635c23e7ec764c7cfa0056e6ea3097c872d1c SHA512 7cd99ce62ca4f9307fa7dfdbfd0ff9d8ff7485c58cd08cd684065aca4b570f8655587425f6a240453a9e86452de41f26f8b82aa81c023764d0beb47daa1b15d3 WHIRLPOOL 38fdadd29270b880b2e31e022ab3f5d3b7c1c340097575662735fc48a7b7d290a33f5485d86cab077c0480f2beb7f2bcb172579bb27bc672a5c0885fce869cfc
diff --git a/dev-lang/mercury-extras/mercury-extras-13.05.2.ebuild b/dev-lang/mercury-extras/mercury-extras-13.05.2.ebuild
new file mode 100644
index 000000000000..a3abc55dadf1
--- /dev/null
+++ b/dev-lang/mercury-extras/mercury-extras-13.05.2.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit eutils multilib
+
+PATCHSET_VER="3"
+MY_P=mercury-srcdist-${PV}
+
+DESCRIPTION="Additional libraries and tools that are not part of the Mercury standard library"
+HOMEPAGE="http://www.mercurylang.org/index.html"
+SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE="X cairo examples glut iodbc ncurses odbc opengl ssl tcl tk xml"
+
+RDEPEND="~dev-lang/mercury-${PV}
+ cairo? ( >=x11-libs/cairo-1.10.0 )
+ glut? ( media-libs/freeglut )
+ odbc? ( dev-db/unixODBC )
+ iodbc? ( !odbc? ( dev-db/libiodbc ) )
+ ncurses? ( sys-libs/ncurses )
+ opengl? (
+ virtual/opengl
+ virtual/glu
+ )
+ tcl? ( tk? (
+ dev-lang/tcl:0
+ dev-lang/tk:0
+ x11-libs/libX11
+ x11-libs/libXmu
+ )
+ )"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_P}/extras
+
+src_prepare() {
+ cd "${WORKDIR}"
+
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+
+ if use odbc; then
+ epatch "${WORKDIR}"/${PV}-odbc/${P}-odbc.patch
+ elif use iodbc; then
+ epatch "${WORKDIR}"/${PV}-odbc/${P}-iodbc.patch
+ fi
+
+ cd "${S}"
+ sed -i -e "s:references:references solver_types/library:" \
+ -e "s:windows_installer_generator::" \
+ Mmakefile || die "sed default packages failed"
+
+ if use cairo; then
+ sed -i -e "s:lex[ \t]*\\\\:graphics/mercury_cairo lex \\\\:" Mmakefile \
+ || die "sed cairo failed"
+ fi
+
+ if use glut; then
+ sed -i -e "s:lex[ \t]*\\\\:graphics/mercury_glut lex \\\\:" Mmakefile \
+ || die "sed glut failed"
+ fi
+
+ if use opengl; then
+ sed -i -e "s:lex[ \t]*\\\\:graphics/mercury_opengl lex \\\\:" Mmakefile \
+ || die "sed opengl failed"
+ fi
+
+ if use tcl && use tk; then
+ sed -i -e "s:lex[ \t]*\\\\:graphics/mercury_tcltk lex \\\\:" Mmakefile \
+ || die "sed tcltk failed"
+ fi
+
+ if use odbc || use iodbc; then
+ sed -i -e "s:moose:moose odbc:" Mmakefile \
+ || die "sed odbc failed"
+ fi
+
+ if use ncurses; then
+ sed -i -e "s:complex_numbers:complex_numbers curs curses:" Mmakefile \
+ || die "sed ncurses failed"
+ fi
+
+ if ! use xml; then
+ sed -i -e "s:xml::" Mmakefile \
+ || die "sed xml failed"
+ fi
+
+ sed -i -e "s:@libdir@:$(get_libdir):" \
+ dynamic_linking/Mmakefile \
+ || die "sed libdir failed"
+
+ # disable broken packages
+ sed -i -e "s:references::" Mmakefile \
+ || die "sed broken packages failed"
+}
+
+src_compile() {
+ # Mercury dependency generation must be run single-threaded
+ mmake \
+ -j1 depend || die "mmake depend failed"
+
+ # Compiling Mercury submodules is not thread-safe
+ mmake -j1 \
+ EXTRA_MLFLAGS=--no-strip \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
+ || die "mmake failed"
+}
+
+src_install() {
+ # Compiling Mercury submodules is not thread-safe
+ mmake -j1 \
+ EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
+ INSTALL_PREFIX="${D}"/usr \
+ install || die "mmake install failed"
+
+ find "${D}"/usr/$(get_libdir)/mercury -type l | xargs rm
+
+ cd "${S}"
+ if use examples; then
+ insinto /usr/share/doc/${PF}/samples/base64
+ doins base64/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/complex_numbers
+ doins complex_numbers/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/dynamic_linking
+ doins dynamic_linking/hello.m || die
+
+ insinto /usr/share/doc/${PF}/samples/error
+ doins error/* || die
+
+ insinto /usr/share/doc/${PF}/samples/fixed
+ doins fixed/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/gator
+ doins -r gator/* || die
+
+ insinto /usr/share/doc/${PF}/samples/lex
+ doins lex/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/log4m
+ doins log4m/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/monte
+ doins monte/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/moose
+ doins moose/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/net
+ doins net/*.m || die
+
+ if use ncurses; then
+ insinto /usr/share/doc/${PF}/samples/curs
+ doins curs/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/curses
+ doins curses/sample/* || die
+ fi
+
+ if use X; then
+ insinto /usr/share/doc/${PF}/samples/graphics
+ doins graphics/easyx/samples/*.m || die
+ fi
+
+ if use glut && use opengl; then
+ insinto /usr/share/doc/${PF}/samples/graphics
+ doins graphics/samples/calc/* || die
+ doins graphics/samples/gears/* || die
+ doins graphics/samples/maze/* || die
+ doins graphics/samples/pent/* || die
+ fi
+
+ if use opengl && use tcl && use tk; then
+ insinto /usr/share/doc/${PF}/samples/graphics
+ doins graphics/samples/pent/*.m || die
+ fi
+
+ if use ssl; then
+ insinto /usr/share/doc/${PF}/samples/mopenssl
+ doins mopenssl/*.m || die
+ fi
+
+ ecvs_clean
+ fi
+
+ dodoc README || die
+}
diff --git a/dev-lang/mercury-extras/mercury-extras-14.01.1.ebuild b/dev-lang/mercury-extras/mercury-extras-14.01.1.ebuild
new file mode 100644
index 000000000000..0fb9ffe07f2b
--- /dev/null
+++ b/dev-lang/mercury-extras/mercury-extras-14.01.1.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib
+
+PATCHSET_VER="0"
+MY_P=mercury-srcdist-${PV}
+
+DESCRIPTION="Additional libraries and tools that are not part of the Mercury standard library"
+HOMEPAGE="http://www.mercurylang.org/index.html"
+SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="X cairo examples glut iodbc ncurses odbc opengl ssl tcl tk xml"
+
+RDEPEND="~dev-lang/mercury-${PV}
+ cairo? ( >=x11-libs/cairo-1.10.0 )
+ glut? ( media-libs/freeglut )
+ odbc? ( dev-db/unixODBC )
+ iodbc? ( !odbc? ( dev-db/libiodbc ) )
+ ncurses? ( sys-libs/ncurses:= )
+ opengl? (
+ virtual/opengl
+ virtual/glu
+ )
+ tcl? ( tk? (
+ dev-lang/tcl:0
+ dev-lang/tk:0
+ x11-libs/libX11
+ x11-libs/libXmu
+ )
+ )"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_P}/extras
+
+mercury_pkgs()
+{
+ echo "base64
+ cgi
+ complex_numbers
+ dynamic_linking
+ error
+ fixed
+ lex
+ moose
+ posix
+ solver_types/library
+ $(use ncurses && echo curs curses)
+ $(use glut && echo graphics/mercury_glut)
+ $(use opengl && echo graphics/mercury_opengl)
+ $(use tcl && use tk && echo graphics/mercury_tcltk)
+ $(use odbc && echo odbc || use iodbc && echo odbc)
+ $(has_version dev-lang/mercury[trail] && echo references)
+ $(usev xml)"
+}
+
+src_prepare() {
+ cd "${WORKDIR}"
+
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ cd "${S}"
+ if use odbc; then
+ cp odbc/Mmakefile.odbc odbc/Mmakefile
+ elif use iodbc; then
+ cp odbc/Mmakefile.iodbc odbc/Mmakefile
+ fi
+}
+
+src_compile() {
+ local MERCURY_PKGS="$(mercury_pkgs)"
+
+ # Mercury dependency generation must be run single-threaded
+ mmake -j1 \
+ SUBDIRS="${MERCURY_PKGS}" \
+ depend || die "mmake depend failed"
+
+ # Compiling Mercury submodules is not thread-safe
+ mmake -j1 \
+ SUBDIRS="${MERCURY_PKGS}" \
+ EXTRA_MLFLAGS=--no-strip \
+ EXTRA_CFLAGS="${CFLAGS}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
+ || die "mmake failed"
+
+ if use cairo; then
+ cd "${S}"/graphics/mercury_cairo
+ mmc --make libmercury_cairo \
+ || die "mmc --make libmercury_cairo failed"
+ fi
+}
+
+src_install() {
+ local MERCURY_PKGS="$(mercury_pkgs)"
+
+ # Compiling Mercury submodules is not thread-safe
+ mmake -j1 \
+ SUBDIRS="${MERCURY_PKGS}" \
+ EXTRA_MLFLAGS=--no-strip \
+ EXTRA_CFLAGS="${CFLAGS}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
+ DESTDIR="${D}" \
+ INSTALL_PREFIX="${D}"/usr \
+ install || die "mmake install failed"
+
+ if use cairo; then
+ cd "${S}"/graphics/mercury_cairo
+ INSTALL_PREFIX="${D}"/usr \
+ mmc --make libmercury_cairo.install \
+ || die "mmc --make libmercury_cairo.install failed"
+ fi
+
+ find "${D}"/usr/$(get_libdir)/mercury -type l | xargs rm
+
+ cd "${S}"
+ if use examples; then
+ insinto /usr/share/doc/${PF}/samples/base64
+ doins base64/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/complex_numbers
+ doins complex_numbers/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/dynamic_linking
+ doins dynamic_linking/hello.m || die
+
+ insinto /usr/share/doc/${PF}/samples/error
+ doins error/* || die
+
+ insinto /usr/share/doc/${PF}/samples/fixed
+ doins fixed/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/gator
+ doins -r gator/* || die
+
+ insinto /usr/share/doc/${PF}/samples/lex
+ doins lex/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/log4m
+ doins log4m/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/monte
+ doins monte/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/moose
+ doins moose/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/net
+ doins net/*.m || die
+
+ if use ncurses; then
+ insinto /usr/share/doc/${PF}/samples/curs
+ doins curs/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/curses
+ doins curses/sample/* || die
+ fi
+
+ if use X; then
+ insinto /usr/share/doc/${PF}/samples/graphics
+ doins graphics/easyx/samples/*.m || die
+ fi
+
+ if use glut && use opengl; then
+ insinto /usr/share/doc/${PF}/samples/graphics
+ doins graphics/samples/calc/* || die
+ doins graphics/samples/gears/* || die
+ doins graphics/samples/maze/* || die
+ doins graphics/samples/pent/* || die
+ fi
+
+ if use opengl && use tcl && use tk; then
+ insinto /usr/share/doc/${PF}/samples/graphics
+ doins graphics/samples/pent/*.m || die
+ fi
+
+ if use ssl; then
+ insinto /usr/share/doc/${PF}/samples/mopenssl
+ doins mopenssl/*.m || die
+ fi
+
+ ecvs_clean
+ fi
+
+ dodoc README || die
+}
diff --git a/dev-lang/mercury-extras/mercury-extras-14.01.ebuild b/dev-lang/mercury-extras/mercury-extras-14.01.ebuild
new file mode 100644
index 000000000000..e6be7669abd1
--- /dev/null
+++ b/dev-lang/mercury-extras/mercury-extras-14.01.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib
+
+PATCHSET_VER="1"
+MY_P=mercury-srcdist-${PV}
+
+DESCRIPTION="Additional libraries and tools that are not part of the Mercury standard library"
+HOMEPAGE="http://www.mercurylang.org/index.html"
+SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="X cairo examples glut iodbc ncurses odbc opengl ssl tcl tk xml"
+
+RDEPEND="~dev-lang/mercury-${PV}
+ cairo? ( >=x11-libs/cairo-1.10.0 )
+ glut? ( media-libs/freeglut )
+ odbc? ( dev-db/unixODBC )
+ iodbc? ( !odbc? ( dev-db/libiodbc ) )
+ ncurses? ( sys-libs/ncurses:= )
+ opengl? (
+ virtual/opengl
+ virtual/glu
+ )
+ tcl? ( tk? (
+ dev-lang/tcl:0
+ dev-lang/tk:0
+ x11-libs/libX11
+ x11-libs/libXmu
+ )
+ )"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/${MY_P}/extras
+
+mercury_pkgs()
+{
+ echo "base64
+ cgi
+ complex_numbers
+ dynamic_linking
+ error
+ fixed
+ lex
+ moose
+ posix
+ solver_types/library
+ $(use ncurses && echo curs curses)
+ $(use glut && echo graphics/mercury_glut)
+ $(use opengl && echo graphics/mercury_opengl)
+ $(use tcl && use tk && echo graphics/mercury_tcltk)
+ $(use odbc && echo odbc || use iodbc && echo odbc)
+ $(has_version dev-lang/mercury[-minimal] && echo references)
+ $(usev xml)"
+}
+
+src_prepare() {
+ cd "${WORKDIR}"
+
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ cd "${S}"
+ if use odbc; then
+ cp odbc/Mmakefile.odbc odbc/Mmakefile
+ elif use iodbc; then
+ cp odbc/Mmakefile.iodbc odbc/Mmakefile
+ fi
+}
+
+src_compile() {
+ local MERCURY_PKGS="$(mercury_pkgs)"
+
+ # Mercury dependency generation must be run single-threaded
+ mmake -j1 \
+ SUBDIRS="${MERCURY_PKGS}" \
+ depend || die "mmake depend failed"
+
+ # Compiling Mercury submodules is not thread-safe
+ mmake -j1 \
+ SUBDIRS="${MERCURY_PKGS}" \
+ EXTRA_MLFLAGS=--no-strip \
+ EXTRA_CFLAGS="${CFLAGS}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
+ || die "mmake failed"
+
+ if use cairo; then
+ cd "${S}"/graphics/mercury_cairo
+ mmc --make libmercury_cairo \
+ || die "mmc --make libmercury_cairo failed"
+ fi
+}
+
+src_install() {
+ local MERCURY_PKGS="$(mercury_pkgs)"
+
+ # Compiling Mercury submodules is not thread-safe
+ mmake -j1 \
+ SUBDIRS="${MERCURY_PKGS}" \
+ EXTRA_MLFLAGS=--no-strip \
+ EXTRA_CFLAGS="${CFLAGS}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ EXTRA_LD_LIBFLAGS="${LDFLAGS}" \
+ INSTALL_PREFIX="${D}"/usr \
+ install || die "mmake install failed"
+
+ if use cairo; then
+ cd "${S}"/graphics/mercury_cairo
+ INSTALL_PREFIX="${D}"/usr \
+ mmc --make libmercury_cairo.install \
+ || die "mmc --make libmercury_cairo.install failed"
+ fi
+
+ find "${D}"/usr/$(get_libdir)/mercury -type l | xargs rm
+
+ cd "${S}"
+ if use examples; then
+ insinto /usr/share/doc/${PF}/samples/base64
+ doins base64/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/complex_numbers
+ doins complex_numbers/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/dynamic_linking
+ doins dynamic_linking/hello.m || die
+
+ insinto /usr/share/doc/${PF}/samples/error
+ doins error/* || die
+
+ insinto /usr/share/doc/${PF}/samples/fixed
+ doins fixed/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/gator
+ doins -r gator/* || die
+
+ insinto /usr/share/doc/${PF}/samples/lex
+ doins lex/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/log4m
+ doins log4m/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/monte
+ doins monte/*.m || die
+
+ insinto /usr/share/doc/${PF}/samples/moose
+ doins moose/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/net
+ doins net/*.m || die
+
+ if use ncurses; then
+ insinto /usr/share/doc/${PF}/samples/curs
+ doins curs/samples/* || die
+
+ insinto /usr/share/doc/${PF}/samples/curses
+ doins curses/sample/* || die
+ fi
+
+ if use X; then
+ insinto /usr/share/doc/${PF}/samples/graphics
+ doins graphics/easyx/samples/*.m || die
+ fi
+
+ if use glut && use opengl; then
+ insinto /usr/share/doc/${PF}/samples/graphics
+ doins graphics/samples/calc/* || die
+ doins graphics/samples/gears/* || die
+ doins graphics/samples/maze/* || die
+ doins graphics/samples/pent/* || die
+ fi
+
+ if use opengl && use tcl && use tk; then
+ insinto /usr/share/doc/${PF}/samples/graphics
+ doins graphics/samples/pent/*.m || die
+ fi
+
+ if use ssl; then
+ insinto /usr/share/doc/${PF}/samples/mopenssl
+ doins mopenssl/*.m || die
+ fi
+
+ ecvs_clean
+ fi
+
+ dodoc README || die
+}
diff --git a/dev-lang/mercury-extras/metadata.xml b/dev-lang/mercury-extras/metadata.xml
new file mode 100644
index 000000000000..c301cedb922a
--- /dev/null
+++ b/dev-lang/mercury-extras/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>keri@gentoo.org</email>
+ <name>Keri Harris</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-lang/mercury/Manifest b/dev-lang/mercury/Manifest
new file mode 100644
index 000000000000..17b782d7d79d
--- /dev/null
+++ b/dev-lang/mercury/Manifest
@@ -0,0 +1,13 @@
+AUX 50mercury-gentoo.el 130 SHA256 802dbbd82d775bba22bb750668e0a8462960d9e8b28e3731171cded00783d6f4 SHA512 e790f1b396f63bf36e57160d588b1377d3f889156446a7d26a6edd3f7175ee8ac5b8972ee4d0b6045b5442ae750341b5e06adc42f094fd6d08f2b519f4432071 WHIRLPOOL 60cf8dec8392b8d1245b72be2effec7910ca47a2a9db2e42ab1d47f194e20b04daa2e0f0cb6d5f68f9d6498d2ffa9e0e4332c286529e2924a7b8fa8567baafc5
+DIST mercury-13.05.2-gentoo-patchset-1.tar.gz 5622 SHA256 5a6559c207c0161beef2eb3bce6f890eadab7dd8fbc5909dc720085498c51777 SHA512 387956a120b2bbb7da1913e89cf33e7bdb8f205fe207701a33d19ccb667d1ae73a342955642120822448621bdba349ab628290d78fdef35c08b9ccbadda4177f WHIRLPOOL 9da5ec0cc6dba6f0ed98c77583213852bc94014c584eae22705c282cbdc137ee30efd83401f8e28c6320a4909c9abbc6d0cf8e79e953c2ce4cfd504156267c82
+DIST mercury-14.01-gentoo-patchset-0.tar.gz 5728 SHA256 43fc8145e784b9e09561fd2b7268cfd37151b134203785b9256b4b7fd87e3d13 SHA512 f1e375ac192e478a82863aa7b8e28c1044a490c41bb63f7842b16b12b7cfa9c85938eacad4c3eacf348aafd42dfaa0dea5324b734d0d2a7454e3e9334369658e WHIRLPOOL eaad62d89285404518e3dca7f98065eea5aaa2f8b46d8ff0f01a0a6b6f886db51800faab81b4e1cd89cd61b771d65562a75f28c399aef053e730d7975ac8f8b6
+DIST mercury-14.01.1-gentoo-patchset-1.tar.gz 4397 SHA256 734ff72c9172f21e9299b553b1d4768515009db66fda183ef2f16e9edb7ff77f SHA512 6b4908e620d60c1745e311ac95336a008656c16a426b697c68cd417ba7eef8f9664f4c7b46e410fc33cfbc4655b8a2ff6ab48fdd979c6197b585c58a6e0346dd WHIRLPOOL 132fd89972c3628fa50862a6d6e134fc8d896f09e6d9241e65157e83ad1ddcdfdcc5d3ba74795e8ba98a771954311d6b0be6512528a3e5fc437e7446bad33447
+DIST mercury-srcdist-13.05.2.tar.gz 53847394 SHA256 8491cf419b996a315bf8664154dd91aed940274ded98e3aded733dbe1939f95f SHA512 2298804d3a04bca6be4bd3046643c7c0d0b22c447423017869cd9bf3a4fb6ec9fd29b5d8e1a386d5d52d07be5cad73608f1fcacf46732a7add93a01dcd199c08 WHIRLPOOL 2a81bebfd4b97b9bb1b0e174025e6050149c8e5f812cd97cbdc41818faa18c15f9494925f1f320682087cc45264bc00db07bef6862afef12317f77cc169a7f86
+DIST mercury-srcdist-14.01.1.tar.gz 52658945 SHA256 98f7cbde7a7425365400feef3e69f1d6a848b25dc56ba959050523d546c4e88b SHA512 a128ef0fd4955abadea32019ec59297ffe32537415f32e9e948cbc1c3439bb40eb09de77569690fb18dd7d6969a2b1141b3ae5baeb87f2627eaa65ad93add92c WHIRLPOOL 7b859eb5c7c1194d63c0aeeeeac3686c57436100b5618ae31a901119a33443363acb80a908a15dfdfa8b61fd9ccb4e552cbb972a3cc735b7a768ee7c9b1b6091
+DIST mercury-srcdist-14.01.tar.gz 52683989 SHA256 4446b7b4eafd35540495ef90ce93b71cb88efa2d744628aee80f76a694aefcc1 SHA512 77f61df64fc150e08f191860f285b97d11a71a52eabc95f660b3c90d88f8ee71d1227f7ab4b8be78be9d4aa3d62a260a874020023e4795da4cfd2e6fefa9965f WHIRLPOOL a7123063590e39ae15222eb59a2c3681ae37bea211967c857eb8725090d342f0aba7a55446529f8608afb9895746581943527b1b3c313c5cbb96f638a3377404
+EBUILD mercury-13.05.2.ebuild 5136 SHA256 efa491dcb89166a524ebc83e92d824e5f35598b1a780b8532a7f30681484ca40 SHA512 50f0616352d68d71bdfd58a5e4fd4ad2c3e99f53489efa4bc48d761498f56bee0932eef5d4265e5ad1efd89262f9ee70438c0d9edb6ea58e8faa933876e52024 WHIRLPOOL 5211b51a18d73ab0f4d5c630aa9dd2fbabe5b8f15455ff8fb9f49059d45158f0738e57184d4a07a859cdf2658ac1dd9bf60b9c45740c9aefe3eb81e1861d6e9b
+EBUILD mercury-14.01.1.ebuild 5090 SHA256 bace56a940da02b66c45cfeb105e628d5694b59e697f75eb306f5aa130ec060c SHA512 3dcf27d20dd81ecd903594ddff6522c3af9737cd2f3d251e0ccc9f039dae38677982806d583f9e8145a9bb8df14574ad51916f2a92fbe6cc4c907927925b7995 WHIRLPOOL 7d6bfe405682240b5eaca67d359ca1093181c4c2e0f273a1881f3f1c0c9021fa19d312145155cc679d487adf3abccce37207efb6ff087bdee8d08636349761d9
+EBUILD mercury-14.01.ebuild 5210 SHA256 ffe77709c3336518e0b05fa3c8dbe035d39e1bbda81659cd98b474748eadb718 SHA512 8e90bbece1e04951b1db5df6e8c0a6250e516544a9083c15de4ddbf12084d2313cb7475d5136a73562f476df7363b55233ef879eacf0279bfdedd569a1b4e6a2 WHIRLPOOL 9cc0797df6fcb00a8f4dd752adfae12f239823a83d6de937d7df6576b40b1f3239781b4e2c69c807ff96f6dfb761219774e34dd5a4c9465e858177c1e37dabfb
+MISC ChangeLog 2905 SHA256 9b4f798026b2551131acf6f821c586327bbfc1393a0f1d3c193d5cc9b89362f4 SHA512 1639cbd3bf42102c81636f04e7592f73455faf19b34419609d634769f77010d938420ea67493837ada61b2cb1a285156942998bf212a8c651c3d328a97e392bb WHIRLPOOL 8a84824d97d22bb848e8ee73099ed8e89f50c4313e38698ffff9f74ed94b3fd9c8e9d67218d83d22e49f180b73c4c48df51266c6c6751279df1cb6b1f242a957
+MISC ChangeLog-2015 32039 SHA256 3b33aa9a7deab04f05981f124bf035ef0e4f774aa92f436a4b0436facd408dab SHA512 4b4792e019e39341a8c8a029fb67a724e1cf27731df49f3fd89c1e29896fa4d5d5e6cc854ab08598849b8c211930474ce3f8306138e75453f2343729a51a7ff9 WHIRLPOOL c8acb5745f7330cb6ce2b0ccecb66381f8c3173c494f81d5945e4b384000ae04874d6d3f60c11ac38aab874d0b412924df7808f9d3dbdb1df09d946fa3e28445
+MISC metadata.xml 384 SHA256 768be4a6e164e168a27526e1aedd6aabfefaca567eb60e7397e64fc6963bc168 SHA512 c90a7a81ab16bac0af4bb9dd3f47cfb3987e0c3aebe08bb7ac6125baf7c619269318bd2c7a45e4213184544d981c920cace23ccb61fbb60c0872db77a10e3ecf WHIRLPOOL 3dd97108e175ef7e4a9840e15a9ac83956974351a33321b655a8174cd96c6ad4fd13e7571a546c2622419c88a079ed4a23a71e5b90920746aa1f7995404a15bf
diff --git a/dev-lang/mercury/files/50mercury-gentoo.el b/dev-lang/mercury/files/50mercury-gentoo.el
new file mode 100644
index 000000000000..2ab3ddbc59f1
--- /dev/null
+++ b/dev-lang/mercury/files/50mercury-gentoo.el
@@ -0,0 +1,5 @@
+
+;;; mercury site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'mdb "gud" "Invoke the Mercury debugger" t)
diff --git a/dev-lang/mercury/mercury-13.05.2.ebuild b/dev-lang/mercury/mercury-13.05.2.ebuild
new file mode 100644
index 000000000000..b0836202a1bf
--- /dev/null
+++ b/dev-lang/mercury/mercury-13.05.2.ebuild
@@ -0,0 +1,198 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib xdg-utils
+
+PATCHSET_VER="1"
+MY_P=${PN}-srcdist-${PV}
+
+DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language"
+HOMEPAGE="http://www.mercurylang.org/index.html"
+SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE="debug emacs erlang examples java minimal readline threads"
+
+DEPEND="!dev-libs/mpatrol
+ !dev-util/mono-debugger
+ readline? ( sys-libs/readline )
+ erlang? ( dev-lang/erlang )
+ java? ( >=virtual/jdk-1.5 )"
+
+RDEPEND="${DEPEND}
+ emacs? ( virtual/emacs )"
+
+S="${WORKDIR}"/${MY_P}
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ cd "${WORKDIR}" || die
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+
+ sed -i -e "s/@libdir@/$(get_libdir)/" \
+ "${S}"/scripts/Mmake.vars.in \
+ || die "sed libdir failed"
+
+ cd "${S}" || die
+ eautoconf
+
+ xdg_environment_reset
+}
+
+src_configure() {
+ strip-flags
+
+ local myconf
+ myconf="--libdir=/usr/$(get_libdir) \
+ --disable-deep-profiler \
+ --disable-dotnet-grades \
+ --without-hwloc \
+ $(use_enable erlang erlang-grade) \
+ $(use_enable java java-grade) \
+ $(use_enable debug debug-grades) \
+ $(use_enable threads par-grades) \
+ $(use_enable !minimal most-grades) \
+ $(use_with readline)"
+
+ econf ${myconf}
+}
+
+src_compile() {
+ # Build Mercury using base llds grade
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \
+ EXTRA_LDFLAGS='${LDFLAGS}' \
+ EXTRA_LD_LIBFLAGS='${LDFLAGS}'" \
+ || die "emake failed"
+
+ # We can now patch .m Mercury compiler files since we
+ # have just built mercury_compiler.
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}-mmc
+
+ sed -i -e "s/@libdir@/$(get_libdir)/" \
+ "${S}"/compiler/file_util.m \
+ "${S}"/compiler/make.program_target.m \
+ || die "sed libdir failed"
+
+ # Rebuild Mercury compiler using the just built mercury_compiler
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \
+ EXTRA_LDFLAGS='${LDFLAGS}' \
+ EXTRA_LD_LIBFLAGS='${LDFLAGS}'" \
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \
+ compiler || die "emake compiler failed"
+
+ # The default Mercury grade may not be the same as the grade used to
+ # compile the llds base grade. Since src_test() is run before
+ # src_install() we compile the default grade now
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \
+ EXTRA_LDFLAGS='${LDFLAGS}' \
+ EXTRA_LD_LIBFLAGS='${LDFLAGS}'" \
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \
+ default_grade || die "emake default_grade failed"
+}
+
+src_test() {
+ TEST_GRADE=`scripts/ml --print-grade`
+ if [ -d "${S}"/install_grade_dir.${TEST_GRADE} ] ; then
+ TWS="${S}"/install_grade_dir.${TEST_GRADE}
+ cp runtime/mer_rt.init "${TWS}"/runtime/
+ cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/
+ cp browser/mer_browser.init "${TWS}"/browser/
+ else
+ TWS="${S}"
+ fi
+
+ cd "${S}"/tests || die
+ sed -e "s:@WORKSPACE@:${TWS}:" < WS_FLAGS.ws > WS_FLAGS \
+ || die "sed WORKSPACE failed"
+
+ # Mercury tests must be run in C locale since Mercury output is
+ # compared to hard-coded warnings/errors
+ LC_ALL="C" \
+ PATH="${TWS}"/scripts:"${TWS}"/util:"${S}"/slice:"${PATH}" \
+ TERM="" \
+ WORKSPACE="${TWS}" \
+ WORKSPACE_FLAGS=yes \
+ MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \
+ MMAKE_DIR="${TWS}"/scripts \
+ MERCURY_SUPPRESS_STACK_TRACE=yes \
+ GRADE=${TEST_GRADE} \
+ MERCURY_ALL_LOCAL_C_INCL_DIRS=" -I${TWS}/boehm_gc/include \
+ -I${TWS}/runtime \
+ -I${TWS}/library" \
+ mmake || die "mmake test failed"
+}
+
+src_install() {
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \
+ EXTRA_LDFLAGS='${LDFLAGS}' \
+ EXTRA_LD_LIBFLAGS='${LDFLAGS}'" \
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \
+ INSTALL_PREFIX="${D}"/usr \
+ INSTALL_MAN_DIR="${D}"/usr/share/man \
+ INSTALL_INFO_DIR="${D}"/usr/share/info \
+ INSTALL_HTML_DIR="${D}"/usr/share/doc/${PF}/html \
+ INSTALL_ELISP_DIR="${D}/${SITELISP}"/${PN} \
+ install || die "emake install failed"
+
+ if use emacs; then
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
+ || die "elisp-site-file-install failed"
+ fi
+
+ dodoc \
+ BUGS HISTORY LIMITATIONS NEWS README README.Linux \
+ README.Linux-Alpha README.Linux-m68k README.Linux-PPC \
+ RELEASE_NOTES TODO VERSION WORK_IN_PROGRESS || die
+
+ if use erlang; then
+ dodoc README.Erlang || die
+ fi
+
+ if use java; then
+ dodoc README.Java || die
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/samples
+ doins samples/{*.m,README,Mmakefile} || die
+ doins -r samples/c_interface \
+ samples/diff \
+ samples/muz \
+ samples/rot13 \
+ samples/solutions \
+ samples/solver_types || die
+
+ if use java; then
+ doins -r samples/java_interface || die
+ fi
+
+ ecvs_clean "${D}"/usr/share/doc/${PF}/samples
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/mercury/mercury-14.01.1.ebuild b/dev-lang/mercury/mercury-14.01.1.ebuild
new file mode 100644
index 000000000000..8bc496d6371a
--- /dev/null
+++ b/dev-lang/mercury/mercury-14.01.1.ebuild
@@ -0,0 +1,201 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib xdg-utils
+
+PATCHSET_VER="1"
+MY_P=${PN}-srcdist-${PV}
+
+DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language"
+HOMEPAGE="http://www.mercurylang.org/index.html"
+SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug emacs erlang examples java mono profile readline threads trail"
+
+DEPEND="!dev-libs/mpatrol
+ !dev-util/mono-debugger
+ readline? ( sys-libs/readline:= )
+ erlang? ( dev-lang/erlang )
+ java? ( >=virtual/jdk-1.6:= )
+ mono? ( dev-lang/mono )"
+
+RDEPEND="${DEPEND}
+ emacs? ( virtual/emacs )"
+
+S="${WORKDIR}"/${MY_P}
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ cd "${WORKDIR}" || die
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ sed -i -e "s/@libdir@/$(get_libdir)/" \
+ "${S}"/scripts/Mmake.vars.in \
+ || die "sed libdir failed"
+
+ cd "${S}" || die
+ eautoconf
+
+ xdg_environment_reset
+}
+
+src_configure() {
+ strip-flags
+
+ local myconf
+ myconf="--libdir=/usr/$(get_libdir) \
+ $(use_enable mono csharp-grade) \
+ $(use_enable erlang erlang-grade) \
+ $(use_enable java java-grade) \
+ $(use_enable debug debug-grades) \
+ $(use_enable profile prof-grades) \
+ $(use_enable threads par-grades) \
+ $(use_enable trail trail-grades) \
+ $(use_with readline)"
+
+ econf ${myconf}
+}
+
+src_compile() {
+ # Prepare mmake flags
+ echo "EXTRA_CFLAGS = ${CFLAGS}" >> Mmake.params
+ echo "EXTRA_LDFLAGS = ${LDFLAGS}" >> Mmake.params
+ echo "EXTRA_MLFLAGS = --no-strip" >> Mmake.params
+
+ # Build Mercury using bootstrap grade
+ emake \
+ PARALLEL="${MAKEOPTS}" \
+ || die "emake failed"
+
+ # We can now patch .m Mercury compiler files since we
+ # have just built mercury_compiler.
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV}-mmc ]] ; then
+ epatch "${WORKDIR}"/${PV}-mmc
+ fi
+
+ sed -i -e "s/@libdir@/$(get_libdir)/" \
+ "${S}"/compiler/file_util.m \
+ "${S}"/compiler/make.program_target.m \
+ || die "sed libdir failed"
+
+ # Rebuild Mercury compiler using the just built mercury_compiler
+ emake \
+ PARALLEL="${MAKEOPTS}" \
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \
+ compiler || die "emake compiler failed"
+
+ # The default Mercury grade may not be the same as the bootstrap
+ # grade. Since src_test() is run before src_install() we compile
+ # the default grade now
+ emake \
+ PARALLEL="${MAKEOPTS}" \
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \
+ default_grade || die "emake default_grade failed"
+}
+
+src_test() {
+ TEST_GRADE=$(scripts/ml --print-grade)
+ if [ -d "${S}"/install_grade_dir.${TEST_GRADE} ] ; then
+ TWS="${S}"/install_grade_dir.${TEST_GRADE}
+ cp runtime/mer_rt.init "${TWS}"/runtime/
+ cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/
+ cp browser/mer_browser.init "${TWS}"/browser/
+ else
+ TWS="${S}"
+ fi
+
+ cd "${S}"/tests || die
+ sed -e "s:@WORKSPACE@:${TWS}:" \
+ < WS_FLAGS.ws \
+ > WS_FLAGS \
+ || die "sed WORKSPACE failed"
+ sed -e "s:@WORKSPACE@:${TWS}:" \
+ < .mgnuc_copts.ws \
+ > .mgnuc_copts \
+ || die "sed WORKSPACE failed"
+ find . -mindepth 1 -type d -exec cp .mgnuc_opts {} \;
+ find . -mindepth 1 -type d -exec cp .mgnuc_copts {} \;
+
+ # Mercury tests must be run in C locale since Mercury output is
+ # compared to hard-coded warnings/errors
+ LC_ALL="C" \
+ PATH="${TWS}"/scripts:"${TWS}"/util:"${S}"/slice:"${PATH}" \
+ TERM="" \
+ WORKSPACE="${TWS}" \
+ WORKSPACE_FLAGS=yes \
+ MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \
+ MMAKE_DIR="${TWS}"/scripts \
+ MERCURY_SUPPRESS_STACK_TRACE=yes \
+ GRADE=${TEST_GRADE} \
+ mmake || die "mmake test failed"
+}
+
+src_install() {
+ emake \
+ PARALLEL="${MAKEOPTS}" \
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \
+ DESTDIR="${D}" \
+ INSTALL_PREFIX="${D}"/usr \
+ INSTALL_MAN_DIR="${D}"/usr/share/man \
+ INSTALL_INFO_DIR="${D}"/usr/share/info \
+ INSTALL_HTML_DIR="${D}"/usr/share/doc/${PF}/html \
+ INSTALL_ELISP_DIR="${D}/${SITELISP}"/${PN} \
+ install || die "emake install failed"
+
+ if use emacs; then
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
+ || die "elisp-site-file-install failed"
+ fi
+
+ dodoc \
+ BUGS HISTORY LIMITATIONS NEWS README README.Linux \
+ README.Linux-Alpha README.Linux-m68k README.Linux-PPC \
+ RELEASE_NOTES TODO VERSION WORK_IN_PROGRESS || die
+
+ if use erlang; then
+ dodoc README.Erlang || die
+ fi
+
+ if use java; then
+ dodoc README.Java || die
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/samples
+ doins samples/{*.m,README,Mmakefile} || die
+ doins -r samples/c_interface \
+ samples/diff \
+ samples/muz \
+ samples/rot13 \
+ samples/solutions \
+ samples/solver_types || die
+
+ if use java; then
+ doins -r samples/java_interface || die
+ fi
+
+ ecvs_clean "${D}"/usr/share/doc/${PF}/samples
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/mercury/mercury-14.01.ebuild b/dev-lang/mercury/mercury-14.01.ebuild
new file mode 100644
index 000000000000..9dd9a6bf182c
--- /dev/null
+++ b/dev-lang/mercury/mercury-14.01.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools elisp-common eutils flag-o-matic java-pkg-opt-2 multilib xdg-utils
+
+PATCHSET_VER="0"
+MY_P=${PN}-srcdist-${PV}
+
+DESCRIPTION="Mercury is a modern general-purpose logic/functional programming language"
+HOMEPAGE="http://www.mercurylang.org/index.html"
+SRC_URI="http://dl.mercurylang.org/release/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug emacs erlang examples java minimal readline threads"
+
+DEPEND="!dev-libs/mpatrol
+ !dev-util/mono-debugger
+ readline? ( sys-libs/readline:= )
+ erlang? ( dev-lang/erlang )
+ java? ( >=virtual/jdk-1.6:= )"
+
+RDEPEND="${DEPEND}
+ emacs? ( virtual/emacs )"
+
+S="${WORKDIR}"/${MY_P}
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ cd "${WORKDIR}" || die
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ sed -i -e "s/@libdir@/$(get_libdir)/" \
+ "${S}"/scripts/Mmake.vars.in \
+ || die "sed libdir failed"
+
+ cd "${S}" || die
+ eautoconf
+
+ xdg_environment_reset
+}
+
+src_configure() {
+ strip-flags
+
+ local myconf
+ myconf="--libdir=/usr/$(get_libdir) \
+ --disable-deep-profiler \
+ --disable-dotnet-grades \
+ --without-hwloc \
+ $(use_enable erlang erlang-grade) \
+ $(use_enable java java-grade) \
+ $(use_enable debug debug-grades) \
+ $(use_enable threads par-grades) \
+ $(use_enable !minimal most-grades) \
+ $(use_with readline)"
+
+ econf ${myconf}
+}
+
+src_compile() {
+ # Build Mercury using base llds grade
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \
+ EXTRA_CFLAGS='${CFLAGS}' \
+ EXTRA_LDFLAGS='${LDFLAGS}'" \
+ || die "emake failed"
+
+ # We can now patch .m Mercury compiler files since we
+ # have just built mercury_compiler.
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV}-mmc ]] ; then
+ epatch "${WORKDIR}"/${PV}-mmc
+ fi
+
+ sed -i -e "s/@libdir@/$(get_libdir)/" \
+ "${S}"/compiler/file_util.m \
+ "${S}"/compiler/make.program_target.m \
+ || die "sed libdir failed"
+
+ # Rebuild Mercury compiler using the just built mercury_compiler
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \
+ EXTRA_CFLAGS='${CFLAGS}' \
+ EXTRA_LDFLAGS='${LDFLAGS}'" \
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \
+ compiler || die "emake compiler failed"
+
+ # The default Mercury grade may not be the same as the grade used to
+ # compile the llds base grade. Since src_test() is run before
+ # src_install() we compile the default grade now
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \
+ EXTRA_CFLAGS='${CFLAGS}' \
+ EXTRA_LDFLAGS='${LDFLAGS}'" \
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \
+ default_grade || die "emake default_grade failed"
+}
+
+src_test() {
+ TEST_GRADE=`scripts/ml --print-grade`
+ if [ -d "${S}"/install_grade_dir.${TEST_GRADE} ] ; then
+ TWS="${S}"/install_grade_dir.${TEST_GRADE}
+ cp runtime/mer_rt.init "${TWS}"/runtime/
+ cp mdbcomp/mer_mdbcomp.init "${TWS}"/mdbcomp/
+ cp browser/mer_browser.init "${TWS}"/browser/
+ else
+ TWS="${S}"
+ fi
+
+ cd "${S}"/tests || die
+ sed -e "s:@WORKSPACE@:${TWS}:" < WS_FLAGS.ws > WS_FLAGS \
+ || die "sed WORKSPACE failed"
+
+ # Mercury tests must be run in C locale since Mercury output is
+ # compared to hard-coded warnings/errors
+ LC_ALL="C" \
+ PATH="${TWS}"/scripts:"${TWS}"/util:"${S}"/slice:"${PATH}" \
+ TERM="" \
+ WORKSPACE="${TWS}" \
+ WORKSPACE_FLAGS=yes \
+ MERCURY_COMPILER="${TWS}"/compiler/mercury_compile \
+ MMAKE_DIR="${TWS}"/scripts \
+ MERCURY_SUPPRESS_STACK_TRACE=yes \
+ GRADE=${TEST_GRADE} \
+ MERCURY_ALL_LOCAL_C_INCL_DIRS=" -I${TWS}/boehm_gc/include \
+ -I${TWS}/runtime \
+ -I${TWS}/library" \
+ mmake || die "mmake test failed"
+}
+
+src_install() {
+ emake \
+ PARALLEL=${MAKEOPTS} \
+ MMAKEFLAGS="EXTRA_MLFLAGS=--no-strip \
+ EXTRA_CFLAGS='${CFLAGS}' \
+ EXTRA_LDFLAGS='${LDFLAGS}'" \
+ MERCURY_COMPILER="${S}"/compiler/mercury_compile \
+ INSTALL_PREFIX="${D}"/usr \
+ INSTALL_MAN_DIR="${D}"/usr/share/man \
+ INSTALL_INFO_DIR="${D}"/usr/share/info \
+ INSTALL_HTML_DIR="${D}"/usr/share/doc/${PF}/html \
+ INSTALL_ELISP_DIR="${D}/${SITELISP}"/${PN} \
+ install || die "emake install failed"
+
+ if use emacs; then
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" \
+ || die "elisp-site-file-install failed"
+ fi
+
+ dodoc \
+ BUGS HISTORY LIMITATIONS NEWS README README.Linux \
+ README.Linux-Alpha README.Linux-m68k README.Linux-PPC \
+ RELEASE_NOTES TODO VERSION WORK_IN_PROGRESS || die
+
+ if use erlang; then
+ dodoc README.Erlang || die
+ fi
+
+ if use java; then
+ dodoc README.Java || die
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/samples
+ doins samples/{*.m,README,Mmakefile} || die
+ doins -r samples/c_interface \
+ samples/diff \
+ samples/muz \
+ samples/rot13 \
+ samples/solutions \
+ samples/solver_types || die
+
+ if use java; then
+ doins -r samples/java_interface || die
+ fi
+
+ ecvs_clean "${D}"/usr/share/doc/${PF}/samples
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/mercury/metadata.xml b/dev-lang/mercury/metadata.xml
new file mode 100644
index 000000000000..9ecd0bc6506f
--- /dev/null
+++ b/dev-lang/mercury/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>keri@gentoo.org</email>
+ <name>Keri Harris</name>
+ </maintainer>
+ <use>
+ <flag name="erlang">Support Mercury Erlang grade</flag>
+ <flag name="trail">Support Mercury trail grades</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/metadata.xml b/dev-lang/metadata.xml
new file mode 100644
index 000000000000..e19c9e95cee0
--- /dev/null
+++ b/dev-lang/metadata.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The dev-lang category contains various programming language
+ implementations and related tools.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie dev-lang enthält verschiedene Programmiersprachen
+ und die damit verbundenen Werkzeuge.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría dev-lang contiene varias implementaciones de lenguajes de
+ programación y sus respectivas herramientas.
+ </longdescription>
+ <longdescription lang="ja">
+ dev-langカテゴリーには様々なプログラミング言語の実行環境とそれに関連した
+ ツールが含まれます。
+ </longdescription>
+ <longdescription lang="nl">
+ De dev-lang categorie bevat implementaties van verschillende programmeertalen
+ en gerelateerde hulpmiddelen.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm dev-lang chứa các phiên bản cài đặt các ngôn ngữ
+ lập trình khác nhau và các công cụ liên quan.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria dev-lang contiene varie implementazioni di linguaggi di programmazione e utilità correlate.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria dev-lang contém várias implementações de linguagens
+ de programação e ferramentas relacionadas.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria dev-lang zawiera różne implementacje języków programowania i
+ związane z nimi narzędzia.
+ </longdescription>
+</catmetadata>
+
diff --git a/dev-lang/mlton/Manifest b/dev-lang/mlton/Manifest
new file mode 100644
index 000000000000..dee51e077f8e
--- /dev/null
+++ b/dev-lang/mlton/Manifest
@@ -0,0 +1,10 @@
+AUX mlton-20070826-no-execmem.patch 1236 SHA256 4ca68021fed935628d22fa17cbaf09b9ccbd2b9306070959afe49989d12e0ecb SHA512 d6f323bc181656fbdfdf25e0472e7e13e93b565f3ba64ea9cc81fbcb6c935580c1811f783035a5b1c45be082a38f157610666276aad9fb36d3fdb009fe7ce1c9 WHIRLPOOL c0b2cc4a40779a80bdf33101a2770ec70941a42c28dfd9334c5058407ba4c376be51124f901bdd81c63446aa3d14394ca9b9a82454c55a94efc8d7da3d268e9c
+AUX mlton-20130715-no-PIE.patch 2399 SHA256 ff642bd7e39925e12f74ba2f119f5019dbab52f0cf7778d5c0784bb74ccd1685 SHA512 ef0d675acfcbe05c1f810da2b9d684b4412a0f283e6025930c13d80912036ffc650972664f5a4fdd955e4c78c3564c751c1ba9bf279f738eca96801eeb57f0b2 WHIRLPOOL 7f635c6460ad5c82128d3511620c851e8d63cfd41090cedfa8fc72127b23efecdfc9bfd58776123686e093fd0aebd64eaddf17e40d340b3c99ed25bc7f1053b2
+AUX mlton-20130715-split-make-for-pax-mark.patch 556 SHA256 76bfe366c53a26b287732d0d5280dda7cd52e6fdb0bf044db44bde1d08e8b389 SHA512 9d334c930abe38f222bdd16c7dbdb0b1e0a70955aa8832fd441c9443c53f9d66c3ec49c06f59de501c014a66c6265a6df64269e0534c0ffdae0115718febb694 WHIRLPOOL 5641dca7b67f000105325644dedfb31cea53e4dd181096ac98b68640863eedff40fc0c091f1ca39f9c488e59bcf78d42b0b6d83a39374fcec54097f0fda3c6f9
+DIST mlton-20130715-1.amd64-linux.tgz 19512324 SHA256 f6f912009b0946b73af88ff5f3e713b6be63b871696e2697ccf1564b56e7d03b SHA512 ac41cf8b2afbba80ed25908b1842348eac1507b2aada103648171db1482358c4176b01d9266dfee053b20fc224653ec58ee9d3265672c02fa3774b7562a319bf WHIRLPOOL 50d265fbfabba1c9ed840a3393bf80f3b86a094a2a4ca5be323fc369bffcc3f5763a7ea3574b0f64be551396d9dea7365d1263629d8b14ef5fefad203544bfbe
+DIST mlton-20130715-1.x86-linux.tgz 18065793 SHA256 92d89627cf760c56d0e9727f328b006341bf5be283fc7d616a6276c26d95b2cf SHA512 13a996952df27420f05f8290920055231156c8982c1cf3c31259d73e0c534258e2aad91596e51809719ffb0b74652aa052d296000f2ab99462714d4ef9a41859 WHIRLPOOL a010aca6ae07c1e824b1fbfabc9c00eca270422783715ed644b864916f604f77115d87130ab5c77f6163d1f24793aee4ca33cf425bde2b680563c03756ba44ec
+DIST mlton-20130715.src.tgz 25606142 SHA256 215857ad11d44f8d94c27f75e74017aa44b2c9703304bcec9e38c20433143d6c SHA512 db273de47dc0059e830332b559918567f5153a0518e067ba71927e3705157f1984d6f6202201cef25aaef29d1a71a637e9a1cb30951e94dbfae4ab1a5e5d40d1 WHIRLPOOL 0c899b0cb17251ca345b73764a86e160ea5bdde5d35f5eb36b1f72202c87dcc251cfb19563744ad7cfe2e10eb76963df79dca023801f858441d5c745046df5be
+EBUILD mlton-20130715.ebuild 3994 SHA256 21bf747f2e3778364da44424972503f1fbf019e7c6185e2dda6485a52f476de2 SHA512 69d008b0d4522f331f071513b6ff67bf26e9fca0b4522d229a9d81ad52740670c64455f3cc1bcbefcd99f1c477cb8b39465ad1bb72e729c96c57d2adbc6d126d WHIRLPOOL 2859fafd63dfa06734e9d680fe7916953e554762667a317b7fddd13e44d3d32d224631a4d374392235188841e2e5c5613768eaba38db763f4eb45903fa3217f5
+MISC ChangeLog 2560 SHA256 46565b17ca88db333fb16695af56ceb32425873d7f3c2c4c4adbe7e8a62a127c SHA512 32078188f131bea32df470d7b0df597813ddc7feeecd11019c908bcf91f68124f41d0075f464d9e2da0875ec62da3da1532067a703646fb0646eaac4c9243cdf WHIRLPOOL 79812221ec595fea18c62c1aa318aa6fb2765a7d0ae501926ee790fadc9a09fd5ba8bf847a0fc638e3a2d151907b395c8cc841cfbffff443079b88815486cc93
+MISC ChangeLog-2015 2913 SHA256 a86d3d9d54f5b3cd43db04aa7d5a418b6eb47405e893331a1df34f4a13378331 SHA512 6eb36363485c97166dbdb36123ee67ca91a504e0e08608eed5d74e4f9c5352db1b910d267c5efdd98227f75bdc4ccdcadf432659ccf88c069caa47393cd0d602 WHIRLPOOL 037517449328cfeec5f1d95aa02ceb8682fdaea7046e94f2df0a946b47cafc0e54737cc2c4f85eda01bbc622273e46b6ce0603fcdd261308cb02865a21542ddf
+MISC metadata.xml 453 SHA256 c6ae217f4bae63f2cbfa252f4877e4dd2c0684be368ff962c6212e648e329d31 SHA512 019258148a954fbe475be30cf130a48fdcae1789dfadf478fc7f9724fcd2e6a1962485f2ccfa30b023af6b04ee69947007a805b66ebdab7b4180fc235197fdd1 WHIRLPOOL 4e014b78f6be192adbaafdf641ced2a5d4380dd16ec643379be58a56fc1cb3c27821bd341a4c652d68af19ffe64ad43d4863e3e2e76eb60689f9a2dde2d5c51b
diff --git a/dev-lang/mlton/files/mlton-20070826-no-execmem.patch b/dev-lang/mlton/files/mlton-20070826-no-execmem.patch
new file mode 100644
index 000000000000..f4d4bdf540bf
--- /dev/null
+++ b/dev-lang/mlton/files/mlton-20070826-no-execmem.patch
@@ -0,0 +1,29 @@
+From 544930de3b1c754fa8803169902a63bce7cc02ba Mon Sep 17 00:00:00 2001
+From: Adam Goode <adam@spicenitz.org>
+Date: Wed, 6 Feb 2008 20:17:51 -0500
+Subject: [PATCH] Remove PROT_EXEC from mprotect
+
+It looks like mprotect is used here as part of signal handling.
+There doesn't seems to be a reason to have the area of memory
+marked as executable. In fact, on Fedora 9, this causes MLton
+compiled binaries (including MLton itself) to fail.
+---
+ runtime/platform/mmap-protect.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/runtime/platform/mmap-protect.c b/runtime/platform/mmap-protect.c
+index f0dea49..df42215 100644
+--- a/runtime/platform/mmap-protect.c
++++ b/runtime/platform/mmap-protect.c
+@@ -7,7 +7,7 @@ void *GC_mmapAnon_safe_protect (void *start, size_t length,
+ if (mprotect (low, dead_low, PROT_NONE))
+ diee ("mprotect failed");
+ result = (void*)((pointer)low + dead_low);
+- if (mprotect (result, length, PROT_READ | PROT_WRITE | PROT_EXEC))
++ if (mprotect (result, length, PROT_READ | PROT_WRITE))
+ diee ("mprotect failed");
+ high = (void*)((pointer)result + length);
+ if (mprotect (high, dead_high, PROT_NONE))
+--
+1.5.4
+
diff --git a/dev-lang/mlton/files/mlton-20130715-no-PIE.patch b/dev-lang/mlton/files/mlton-20130715-no-PIE.patch
new file mode 100644
index 000000000000..a059b1598bec
--- /dev/null
+++ b/dev-lang/mlton/files/mlton-20130715-no-PIE.patch
@@ -0,0 +1,66 @@
+--- mlton-20130715-orig/bin/upgrade-basis 2013-07-16 05:59:09.000000000 +1000
++++ mlton-20130715/bin/upgrade-basis 2013-12-17 18:17:24.165889500 +1100
+@@ -28,7 +28,7 @@
+ tmp="$$.sml"
+
+ echo "val () = print \"I work\"" >"$tmp"
+-if ! mlton "$tmp" 1>&2; then
++if ! mlton -link-opt -fno-PIE "$tmp" 1>&2; then
+ die "Error: cannot upgrade basis because the compiler doesn't work"
+ fi
+
+--- mlton-20130715-orig/mlton/Makefile 2013-07-16 05:59:09.000000000 +1000
++++ mlton-20130715/mlton/Makefile 2013-12-17 23:35:06.137421195 +1100
+@@ -106,7 +106,7 @@
+ rm -f control/version.sml
+ $(MAKE) control/version.sml
+ @echo 'Compiling mlton (takes a while)'
+- mlton $(FLAGS) $(FILE)
++ mlton $(FLAGS) -link-opt -fno-PIE $(FILE)
+
+ .PHONY: def-use
+ def-use: mlton.def-use
+--- mlton-20130715-orig/mllex/Makefile 2013-07-16 05:59:09.000000000 +1000
++++ mlton-20130715/mllex/Makefile 2013-12-18 07:03:29.592171611 +1100
+@@ -21,7 +21,7 @@
+
+ $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
+ @echo 'Compiling $(NAME)'
+- "$(MLTON)" $(FLAGS) $(NAME).mlb
++ "$(MLTON)" $(FLAGS) -link-opt -fno-PIE $(NAME).mlb
+
+ html/index.html: $(TEX_FILES)
+ mkdir -p html
+--- mlton-20130715-orig/mlnlffigen/Makefile 2013-07-16 05:59:09.000000000 +1000
++++ mlton-20130715/mlnlffigen/Makefile 2013-12-18 11:55:33.590660407 +1100
+@@ -22,7 +22,7 @@
+
+ $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
+ @echo 'Compiling $(NAME)'
+- $(MLTON) $(FLAGS) $(NAME).mlb
++ $(MLTON) $(FLAGS) -link-opt -fno-PIE $(NAME).mlb
+
+ .PHONY: clean
+ clean:
+--- mlton-20130715-orig/mlprof/Makefile 2013-07-16 05:59:09.000000000 +1000
++++ mlton-20130715/mlprof/Makefile 2013-12-20 14:02:50.292677796 +1100
+@@ -21,7 +21,7 @@
+
+ $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
+ @echo 'Compiling $(NAME)'
+- $(MLTON) $(FLAGS) $(NAME).mlb
++ $(MLTON) $(FLAGS) -link-opt -fno-PIE $(NAME).mlb
+
+ .PHONY: clean
+ clean:
+--- mlton-20130715-orig/mlyacc/Makefile 2013-07-16 05:59:09.000000000 +1000
++++ mlton-20130715/mlyacc/Makefile 2013-12-20 15:01:26.567775876 +1100
+@@ -41,7 +41,7 @@
+
+ $(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
+ @echo 'Compiling $(NAME)'
+- "$(MLTON)" $(FLAGS) $(NAME).mlb
++ "$(MLTON)" $(FLAGS) -link-opt -fno-PIE $(NAME).mlb
+
+ src/yacc.lex.sml: src/yacc.lex
+ rm -f src/yacc.lex.sml && \
diff --git a/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch b/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch
new file mode 100644
index 000000000000..3286d44e3522
--- /dev/null
+++ b/dev-lang/mlton/files/mlton-20130715-split-make-for-pax-mark.patch
@@ -0,0 +1,11 @@
+--- mlton-20130715-orig/Makefile 2013-07-16 05:59:09.000000000 +1000
++++ mlton-20130715/Makefile 2013-12-27 13:29:35.259563131 +1100
+@@ -58,7 +58,7 @@
+
+ .PHONY: all-no-docs
+ all-no-docs:
+- $(MAKE) dirs runtime compiler basis-no-check script mlbpathmap constants libraries tools
++ $(MAKE) basis-no-check script mlbpathmap constants libraries tools
+ # Remove $(AOUT) so that the $(MAKE) compiler below will remake MLton.
+ # We also want to re-run the just-built tools (mllex and mlyacc)
+ # because they may be better than those that were used for the first
diff --git a/dev-lang/mlton/metadata.xml b/dev-lang/mlton/metadata.xml
new file mode 100644
index 000000000000..6a46dc0bbde8
--- /dev/null
+++ b/dev-lang/mlton/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>ml@gentoo.org</email>
+ <name>Gentoo ML Project</name>
+ </maintainer>
+ <use>
+ <flag name="binary">install a binary version (need to do this once to bootstrap, until smlnj is supported)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">mlton</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/mlton/mlton-20130715.ebuild b/dev-lang/mlton/mlton-20130715.ebuild
new file mode 100644
index 000000000000..8fc9db5dee2a
--- /dev/null
+++ b/dev-lang/mlton/mlton-20130715.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit check-reqs eutils pax-utils
+
+DESCRIPTION="Standard ML optimizing compiler and libraries"
+BASE_URI="mirror://sourceforge/${PN}"
+SRC_URI="!binary? ( ${BASE_URI}/${P}.src.tgz )
+ binary? ( amd64? ( ${BASE_URI}/${P}-1.amd64-linux.tgz )
+ x86? ( ${BASE_URI}/${P}-1.x86-linux.tgz ) )"
+
+HOMEPAGE="http://www.mlton.org"
+
+LICENSE="HPND MIT"
+SLOT="0/${PV}"
+# there is support for ppc64 and ia64, but no
+# binaries are provided and there is no native
+# code generation for these platforms
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="binary doc"
+
+DEPEND="dev-libs/gmp
+ doc? ( virtual/latex-base )"
+RDEPEND="dev-libs/gmp"
+
+QA_PRESTRIPPED="binary? (
+ usr/bin/mlnlffigen
+ usr/bin/mllex
+ usr/bin/mlprof
+ usr/bin/mlyacc
+ usr/lib/mlton/mlton-compile
+)"
+
+# The resident set size of mlton-compile is 10GB on amd64
+CHECKREQS_MEMORY="4G"
+
+pkg_pretend() {
+ if use !binary; then
+ check-reqs_pkg_pretend
+ fi
+}
+
+src_unpack() {
+ if use !binary; then
+ unpack ${A}
+ else
+ mkdir -p "${S}" || die "Could not create ${S} directory"
+ pushd "${S}" || die "Could not cd to ${S}"
+ unpack ${A}
+ popd
+ fi
+}
+
+src_prepare() {
+ if use !binary; then
+ # The patch removing executable permissions from mmap'd memory regions is not upstreamed:
+ # http://pkgs.fedoraproject.org/cgit/mlton.git/tree/mlton-20070826-no-execmem.patch
+ epatch "${FILESDIR}/${PN}-20070826-no-execmem.patch"
+ # PIE in hardened requires executables to be linked with -fPIC. mlton by default tries
+ # to link executables against the non PIC objects in libmlton.a. We may be bootstrapping
+ # with an old mlton install, if we tried to patch it (to link with libmlton-pic.a) we would
+ # need a patched binary.
+ # http://mlton.org/MLtonWorld says Executables that save and load worlds are incompatible
+ # with address space layout randomization (ASLR) of the executable.
+ epatch "${FILESDIR}/${PN}-20130715-no-PIE.patch"
+ # Remove dirs runtime compiler from all-no-docs to avoid repeating these steps.
+ # As we need to pax-mark the mlton-compiler executable.
+ epatch "${FILESDIR}/${PN}-20130715-split-make-for-pax-mark.patch"
+ fi
+}
+
+src_compile() {
+ if use !binary; then
+ has_version dev-lang/mlton || die "emerge with binary use flag first"
+
+ # Fix location in which to install man pages
+ sed -i 's@^MAN_PREFIX_EXTRA :=.*@MAN_PREFIX_EXTRA := /share@' \
+ Makefile || die 'sed Makefile failed'
+
+ emake -j1 dirs runtime compiler CFLAGS="${CFLAGS}" || die
+ pax-mark m "${S}/mlton/mlton-compile"
+ pax-mark m "${S}/build/lib/mlton-compile"
+
+ # Does not support parallel make
+ emake -j1 all-no-docs CFLAGS="${CFLAGS}" || die
+ if use doc; then
+ export VARTEXFONTS="${T}/fonts"
+ emake docs || die "failed to create documentation"
+ fi
+ fi
+}
+
+src_install() {
+ if use binary; then
+ # Fix location in which to install man pages
+ mv "${S}/usr/man" "${S}/usr/share" || die "mv man failed"
+ pax-mark m "${S}/usr/lib/mlton/mlton-compile"
+ pax-mark m "${S}/usr/bin/mllex"
+ pax-mark m "${S}/usr/bin/mlyacc"
+ mv "${S}/usr" "${D}" || die "mv failed"
+ else
+ emake DESTDIR="${D}" install-no-docs || die
+ if use doc; then emake DESTDIR="${D}" TDOC="${D}"/usr/share/doc/${P} install-docs || die; fi
+ fi
+}
+
+pkg_postinst() {
+ # There are PIC objects in libmlton-pic.a. -link-opt -lmlton-pic does not help as mlton
+ # specifies -lmlton before -lmlton-pic. It appears that it would be necessary to patch mlton
+ # to convince mlton to use the lib*-pic.a libraries when linking an executable.
+ ewarn 'PIE in Gentoo hardened requires executables to be linked with -fPIC. mlton by default links'
+ ewarn 'executables against the non PIC objects in libmlton.a. http://mlton.org/MLtonWorld notes:'
+ ewarn 'Executables that save and load worlds are incompatible with address space layout'
+ ewarn 'randomization (ASLR) of the executable.'
+ ewarn 'To suppress the generation of position-independent executables.'
+ ewarn '-link-opt -fno-PIE'
+}
diff --git a/dev-lang/mmix/Manifest b/dev-lang/mmix/Manifest
new file mode 100644
index 000000000000..40959bb89cfc
--- /dev/null
+++ b/dev-lang/mmix/Manifest
@@ -0,0 +1,9 @@
+AUX mmix-20110420-makefile.patch 1636 SHA256 cbf3151c4e2467a4de16e201379379747bb26ad39eeac08a981be3218f39f597 SHA512 e5cd4944847c00ad7c6b3a87fa6f9a242f7f0b13c31f82e80c49b3b9ec07d7c0106669dce2868705dca073774826c5acc6f8ea1464c1a5c739145f1c2b28eb10 WHIRLPOOL 2569eca73f44807adc34dbbacc6a25710725ba4fe159412ac9faded2fc731b4670179f0695110aceb405a880e3a03094801206d69036f53b052031c9e21b51a6
+AUX mmix-20131017-format-security.patch 2256 SHA256 f15d530ca058e782584aca9c87e45fcd61ac29b797e2104e78b2eb965f894a91 SHA512 e77cdf3d196356cc0cb09f322cc979e4c603592c8f9421764d6830df27fe627958badbd6726021f97bc42a0d9551e4d3b39ca7b1d677b44a543ffcc04028eaea WHIRLPOOL bad2a92a49896c181cb102780b4abcb47be3e0e7db806124b8ebac83170a3607ca47bd9fddb4b9557641b4df2a4b32751a473a3fc0ee432afc80731b6c44ea2d
+DIST mmix-20131017.tgz 308016 SHA256 aa64c4b9dc3cf51f07b330791f8ce542b0ae8a1132e098fa95a19b31350050b4 SHA512 e816b1ee9205b9f4a2e25ff183c48736ea66e63721a49f0b574850c5872ae85a6e847d802a01b5aa120ac969638d5d05e9b3135512d9362a4d672564f1228922 WHIRLPOOL e93f29e0a640e219ee2ded0034cbf300e9f6deed2bf9ed04081406cdfaaa952e0b3566525b86e35dfb480288e0ceef1744fefdc533ad0126952603cd698bbb6a
+DIST mmix-20160804.tgz 308410 SHA256 fad8e64fddf2d75cbcd5080616b47e11a2d292a428cdb0c12e579be680ecdee9 SHA512 35c518227a4ee40d0aa3be02eda2ab8b2a27696fa789f5007a978419d07b3deebb7f391895e63e3556aeb38dc1ded3bddf2b860125ebf8f7848375e90dc7af75 WHIRLPOOL 177cc9d3b2426a554628b5487fd7ff9b8098a9292c2f2a14087df526b1af22c4388fa0e812486affd4d07f11ce386a9426ab4729f39b3821a97008e46396a5bd
+EBUILD mmix-20131017.ebuild 952 SHA256 11e848e19babce91643df295ceeac1d7839165f001a1f3d416a8e1ee028eaf8f SHA512 49cb5925ac5225a562cb2f257ff38ab8082a9ad6244eebd9a8a2613bebff04c20fb9d92d21d7204f6fccabd508cc25a9cf70f374fb58bf04cb8c11c54f4ed52b WHIRLPOOL 36643e2115f92977d876cbe199b4ab91233aea55557904610b4b14aa875f5db72b8ab3d3a15ab135268a07a94af117ab49c2ea60de70091e5bc9e239dd578b3d
+EBUILD mmix-20160804.ebuild 932 SHA256 510cea8fcbbb6e24edbf6a560cba42e9455365ff546baf288212795a3606819c SHA512 629b719ef51a2f7668944a8ff6a03e97c3bb7d5df0f068cdf70bd198f6036fff71356970a28cfd80c8651b570a8af835a01930792b51043921d8e5e1404c2e1d WHIRLPOOL 84cc10eb792dbb43a74ba63317b099267e56f8d691f5dcc59bae2f33efc7e2873e22584e473b7e23fbe1cb86b6831d9ae34b0db941d142323601da551f9efcca
+MISC ChangeLog 2567 SHA256 bbb90c71d68b8a04a22f0994e58206e67440b51135f078adaee69f00f8cfdc76 SHA512 b6947afb604b056a45723adf62ce8c722bf38829c52482bc47f91387c218b7d08491c38949f3a9b84f0391f21780b68eafdccd53796ffe1dc3311c172130cad1 WHIRLPOOL b26655e2899dd77eaabfe0c386d2935e701674bda0e61a05c0587a3c1e2c4cdf34e776ac32fd35337a8d553d82f61241ebab4f4b120d2389c72c52a498bec1b2
+MISC ChangeLog-2015 4541 SHA256 0e91811bf44904ccc7dee5888e89c5f1697d5d8d84f79006d2378cfc5e162529 SHA512 f4bbd5698cc558e5ff01ba79de496255a1dfe9e62043acc4e91719773410d2dbc9a42bce61a2d3f93eb5f59f4c58fc2766acd6c495b7b904f03e5d34951c2862 WHIRLPOOL c57ac0077e5bf3de5f1516cdb69e8ca2be3d477b6ccb5453201497d6e169490e927c3435913292eec4a1a5354b06afec6408f7983e6d966abeb3858b6f22a150
+MISC metadata.xml 247 SHA256 f1adf54c8aec51a1afeed01c002e66e0c1edb4591eeee91459c946b07306d837 SHA512 44f366af35524b7fc87b2eb6c7241918d2afc9b30f1a28289d803ed0125e9099588a2bd99a75e34e3c70fde30765050e62ef5b47975e2a1860dd7a560709459d WHIRLPOOL d3c757d70e13f4e8814aac9d2fd635212d99b38bd5c2a35bc8e309dd5e85e42c6a3334fefbed33711ac5ac94262bef6c1310103febe3f9f6744f8f75b9c8df21
diff --git a/dev-lang/mmix/files/mmix-20110420-makefile.patch b/dev-lang/mmix/files/mmix-20110420-makefile.patch
new file mode 100644
index 000000000000..14107ed915a9
--- /dev/null
+++ b/dev-lang/mmix/files/mmix-20110420-makefile.patch
@@ -0,0 +1,71 @@
+--- a/Makefile
++++ b/Makefile
+@@ -27,23 +27,23 @@
+ if test -r $*.ch; then cweave $*.w $*.ch; else cweave $*.w; fi
+
+ .w.o:
+- make $*.c
+- make $*.o
++ $(MAKE) $*.c
++ $(MAKE) $*.o
+
+ .w:
+- make $*.c
+- make $*
++ $(MAKE) $*.c
++ $(MAKE) $*
+
+ .w.dvi:
+- make $*.tex
+- make $*.dvi
++ $(MAKE) $*.tex
++ $(MAKE) $*.dvi
+
+ .w.ps:
+- make $*.dvi
+- make $*.ps
++ $(MAKE) $*.dvi
++ $(MAKE) $*.ps
+
+ .w.pdf:
+- make $*.tex
++ $(MAKE) $*.tex
+ case "$(PDFTEX)" in \
+ dvipdfm ) tex "\let\pdf+ \input $*"; dvipdfm $* ;; \
+ pdftex ) pdftex $* ;; \
+@@ -73,27 +73,26 @@
+ clean:
+ rm -f *~ *.o *.c *.h *.tex *.log *.dvi *.toc *.idx *.scn *.ps core
+
+-mmix-pipe.o: mmix-pipe.c abstime
++abstime.h: abstime
+ ./abstime > abstime.h
++
++mmix-pipe.o: mmix-pipe.c abstime abstime.h
+ $(CC) $(CFLAGS) -c mmix-pipe.c
+- rm abstime.h
+
+ mmix-config.o: mmix-pipe.o
+
+ mmmix: mmix-arith.o mmix-pipe.o mmix-config.o mmix-mem.o mmix-io.o mmmix.c
+- $(CC) $(CFLAGS) mmmix.c \
++ $(CC) $(CFLAGS) $(LDFLAGS) mmmix.c \
+ mmix-arith.o mmix-pipe.o mmix-config.o mmix-mem.o mmix-io.o -o mmmix
+
+ mmixal: mmix-arith.o mmixal.c
+- $(CC) $(CFLAGS) mmixal.c mmix-arith.o -o mmixal
++ $(CC) $(CFLAGS) $(LDFLAGS) mmixal.c mmix-arith.o -o mmixal
+
+-mmix: mmix-arith.o mmix-io.o mmix-sim.c abstime
+- ./abstime > abstime.h
+- $(CC) $(CFLAGS) mmix-sim.c mmix-arith.o mmix-io.o -o mmix
+- rm abstime.h
++mmix: mmix-arith.o mmix-io.o mmix-sim.c abstime abstime.h
++ $(CC) $(CFLAGS) $(LDFLAGS) mmix-sim.c mmix-arith.o mmix-io.o -o mmix
+
+ mmotype: mmotype.c
+- $(CC) $(CFLAGS) mmotype.c -o mmotype
++ $(CC) $(CFLAGS) $(LDFLAGS) mmotype.c -o mmotype
+
+ tarfile: $(ALL)
+ tar cvf /tmp/mmix.tar $(ALL)
diff --git a/dev-lang/mmix/files/mmix-20131017-format-security.patch b/dev-lang/mmix/files/mmix-20131017-format-security.patch
new file mode 100644
index 000000000000..3824765317b9
--- /dev/null
+++ b/dev-lang/mmix/files/mmix-20131017-format-security.patch
@@ -0,0 +1,59 @@
+diff --git a/mmix-pipe.w b/mmix-pipe.w
+index b7f4536..a1a9a48 100644
+--- a/mmix-pipe.w
++++ b/mmix-pipe.w
+@@ -1883,7 +1883,7 @@ static void print_specnode_id(a)
+ octa a;
+ {
+ if (a.h==sign_bit) {
+- if (a.l<32) printf(special_name[a.l]);
++ if (a.l<32) fputs(special_name[a.l], stdout);
+ else if (a.l<256) printf("g[%d]",a.l);
+ else printf("l[%d]",a.l-256);
+ }@+else if (a.h!=(tetra)-1) {
+diff --git a/mmix-sim.w b/mmix-sim.w
+index cb6995c..176f60c 100644
+--- a/mmix-sim.w
++++ b/mmix-sim.w
+@@ -2832,7 +2832,7 @@ void trace_print(o)
+ case hex: fputc('#',stdout);@+print_hex(o);@+return;
+ case zhex: printf("%08x%08x",o.h,o.l);@+return;
+ case floating: print_float(o);@+return;
+- case handle:@+if (o.h==0 && o.l<3) printf(stream_name[o.l]);
++ case handle:@+if (o.h==0 && o.l<3) fputs(stream_name[o.l], stdout);
+ else print_int(o);@+return;
+ }
+ }
+@@ -2843,9 +2843,9 @@ case ')': fputc(right_paren[round_mode],stdout);@+break;
+ case 't':@+if (x.l) printf(" Yes, -> #"),print_hex(inst_ptr);
+ else printf(" No");@+break;
+ case 'g':@+if (!good) printf(" (bad guess)");@+break;
+-case 's': printf(special_name[zz]);@+break;
++case 's': fputs(special_name[zz], stdout);@+break;
+ case '?': p++;@+if (z.l) printf("%c%d",*p,z.l);@+break;
+-case 'l': printf(lhs);@+break;
++case 'l': fputs(lhs, stdout);@+break;
+ case 'r': p=switchable_string;@+break;
+
+ @ @d rhs &switchable_string[1]
+@@ -2984,9 +2984,9 @@ void scan_option(arg,usage)
+ fprintf(stderr,
+ "Usage: %s <options> progfile command line-args...\n",myself);
+ @.Usage: ...@>
+- for (k=0;usage_help[k][0];k++) fprintf(stderr,usage_help[k]);
++ for (k=0;usage_help[k][0];k++) fputs(usage_help[k], stderr);
+ exit(-1);
+- }@+else@+ for (k=0;usage_help[k][1]!='b';k++) printf(usage_help[k]);
++ }@+else@+ for (k=0;usage_help[k][1]!='b';k++) fputs(usage_help[k], stdout);
+ return;
+ }
+ }
+@@ -3090,7 +3090,7 @@ void catchint(n)
+ printf("Eh? Sorry, I don't understand `%s'. (Type h for help)\n",
+ command_buf);
+ goto interact;
+- case 'h':@+ for (k=0;interactive_help[k][0];k++) printf(interactive_help[k]);
++ case 'h':@+ for (k=0;interactive_help[k][0];k++) fputs(interactive_help[k], stdout);
+ goto interact;
+ }
+ check_syntax:@+ if (*p!='\n') {
diff --git a/dev-lang/mmix/metadata.xml b/dev-lang/mmix/metadata.xml
new file mode 100644
index 000000000000..5f92e9ec0673
--- /dev/null
+++ b/dev-lang/mmix/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>tamiko@gentoo.org</email>
+ <name>Matthias Maier</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/mmix/mmix-20131017.ebuild b/dev-lang/mmix/mmix-20131017.ebuild
new file mode 100644
index 000000000000..1befedcfe99a
--- /dev/null
+++ b/dev-lang/mmix/mmix-20131017.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Donald Knuth's MMIX Assembler and Simulator"
+HOMEPAGE="http://www-cs-faculty.stanford.edu/~knuth/mmix.html http://mmix.cs.hm.edu"
+SRC_URI="http://mmix.cs.hm.edu/src/${P}.tgz"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/tex-base
+ doc? ( || ( dev-texlive/texlive-plaingeneric dev-texlive/texlive-genericrecommended ) )"
+RDEPEND=""
+
+SLOT="0"
+LICENSE="${PN}"
+KEYWORDS="amd64 x86"
+IUSE="doc"
+
+S="${WORKDIR}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-20110420-makefile.patch
+ epatch "${FILESDIR}"/${PN}-20131017-format-security.patch
+}
+
+src_compile() {
+ emake all \
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)"
+
+ if use doc ; then
+ emake doc
+ fi
+}
+
+src_install () {
+ dobin ${PN} ${PN}al m${PN} mmotype abstime
+ dodoc README ${PN}.1
+
+ if use doc ; then
+ insinto /usr/share/doc/${PF}
+ doins *.ps
+ fi
+}
diff --git a/dev-lang/mmix/mmix-20160804.ebuild b/dev-lang/mmix/mmix-20160804.ebuild
new file mode 100644
index 000000000000..9efd826d7dca
--- /dev/null
+++ b/dev-lang/mmix/mmix-20160804.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Donald Knuth's MMIX Assembler and Simulator"
+HOMEPAGE="http://www-cs-faculty.stanford.edu/~knuth/mmix.html http://mmix.cs.hm.edu"
+SRC_URI="http://mmix.cs.hm.edu/src/${P}.tgz"
+
+RESTRICT="mirror"
+
+DEPEND="virtual/tex-base
+ doc? ( || ( dev-texlive/texlive-plaingeneric dev-texlive/texlive-genericrecommended ) )"
+RDEPEND=""
+
+SLOT="0"
+LICENSE="${PN}"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+S="${WORKDIR}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-20110420-makefile.patch
+ "${FILESDIR}"/${PN}-20131017-format-security.patch
+)
+
+src_compile() {
+ emake all \
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)"
+
+ if use doc ; then
+ emake doc
+ fi
+}
+
+src_install () {
+ dobin ${PN} ${PN}al m${PN} mmotype abstime
+ dodoc README ${PN}.1
+
+ if use doc ; then
+ insinto /usr/share/doc/${PF}
+ doins *.ps
+ fi
+}
diff --git a/dev-lang/moarvm/Manifest b/dev-lang/moarvm/Manifest
new file mode 100644
index 000000000000..c19f5dd31683
--- /dev/null
+++ b/dev-lang/moarvm/Manifest
@@ -0,0 +1,10 @@
+DIST MoarVM-2017.07.tar.gz 4396077 SHA256 21c6c85464bcc012af4fa3ed5fe2a54262439f197c5141cfc71f57e2841ba67a SHA512 675633bdc97e30eb6a7a2208338b7124215a92ed1a129076b0e59f9f2f0996b903120e3aa2a915a370c637d6529fdccef0bbcc31ce91c1485df60f9ce7e9e689 WHIRLPOOL 83b38aae50904680c58970f51bb33aa2b112a0cb8b92f04900085083e3e12c0905829107759782531b301714283dfdb044508133b02e4d4a5f271d6bd5eca6bc
+DIST MoarVM-2017.08.1.tar.gz 4440494 SHA256 ce032fcbd3ff195825cb0c52c8844b611e63c54a57854602236e3a2a570fa643 SHA512 52331993b59fdad8d30161f3e95e8bfcf16c69e452f8fa32492fa551d225ed7eb9e0ac015049e40d119e8e7958c529b966f34a0175ae686000264eb02478a749 WHIRLPOOL 72ce60a47eea7e9588b0da3d4cc9c6bb070686f1ff8524f0f157e9a93cd2531c876457f9e23c599069a0cb6dd45e9d6f528bde437ebbf634e3dbe4b15207b94a
+DIST MoarVM-2017.09.1.tar.gz 4579930 SHA256 1c09b70a6b454abb48baaa9432e90c33002983cdb96328418f1be1a572e11f47 SHA512 c7b675a3894a2b58d15eefb52519b6b7e4519561525b6095327ab7621e29c3ea3c077c625bd48123cd514b4e32d2e7cbdb3861319d3e32de134d7f8475540fee WHIRLPOOL fa7e78cc0430a84395b4ffbd56adffda3220a6982e0ffc565f0357ad72b158e216ddfa1e9fe7e7c1e70c6eeff12d6d944b30112b468942ec7523bb940e9e642f
+EBUILD moarvm-2017.07.ebuild 1475 SHA256 7aec782a22af39771c5c712c0d09ab803d34a9e5a62ee4ba8094786c57aeae57 SHA512 76b99f341f78085656bc196d97ca66ff170b590f6e7e06fab95ef02244d393b6083a217463bffdf389682b823ca7af684b9bba2fcabfd1632901639beab8763f WHIRLPOOL 3c3a4bf74544bcc13766600347e435c85be2ae7e5e875047aec4d2aacf2a4efb3f28179b3bf8afadb6e9ce43a4382463a88cf415d5d366450296cb82d785afd0
+EBUILD moarvm-2017.08.1.ebuild 1426 SHA256 8e5b204c44c3dda50c1533757d55a0cb2987f412070571a5c2afce6fbeb62979 SHA512 cf0f2f323900463ad479168d743d0a3a2a71615fad66cee346fb8d2db5246cdcb0db1397cbdf5abfdec6677bdc032b0842c2dec9f144cf36e8619b0232644fd9 WHIRLPOOL 87722c4528a4a1f8198c4c10838dabcafcc629d92aa12f8455e5f0a7ef0e5d80f63f64d69752e0352a9b76469a74f049b11e8877192c712acf90d95632079df1
+EBUILD moarvm-2017.09.1.ebuild 1364 SHA256 322c7002f2138eaa599d328fafbeffeef67c6432f599bf8f62dc304d2c8d2370 SHA512 87012068940d3d746c3dfbe42bcda9c32d61ead0016bd0edcbe14aa1ae58e5f7365ec5a5690e4f2a5863635e3566eed986b2aa751ac6c8e3434b629df92cd044 WHIRLPOOL a6cf719fa4bc7557d10b042fd88ca7005c0bdcf79189eb9d43903b0ba2a546d347892ef13510e9190a14bf66ba667692a2d93dc857c163c99d3aa1f415d846f9
+EBUILD moarvm-9999.ebuild 1475 SHA256 7aec782a22af39771c5c712c0d09ab803d34a9e5a62ee4ba8094786c57aeae57 SHA512 76b99f341f78085656bc196d97ca66ff170b590f6e7e06fab95ef02244d393b6083a217463bffdf389682b823ca7af684b9bba2fcabfd1632901639beab8763f WHIRLPOOL 3c3a4bf74544bcc13766600347e435c85be2ae7e5e875047aec4d2aacf2a4efb3f28179b3bf8afadb6e9ce43a4382463a88cf415d5d366450296cb82d785afd0
+MISC ChangeLog 6921 SHA256 e2b30048966639138c517398a0c714521c8eefd737993c7ff7b3dfdba9b97da0 SHA512 42e01406c8379d65ec686ad0e7942fab96df3d36d8de96de7d6f2c9cd5a803ed3b9b15f3b22394cce0605fe2d5783c23199dce8dce284ae4454b53b96e5d02c1 WHIRLPOOL 54f852fbb17192681795fce561bb7145434d135a937eb45722811c616454e7057315a5f7be0ca0e3354f274e30b94ddc2b75e8e7b07072a84d8efb475c837824
+MISC ChangeLog-2015 4400 SHA256 6e59f19096f30a6f33646aa8f9a1ef2ff10d978efab06fd3994a927c0b2bf6d6 SHA512 bd1c48512d42279de6a9d130cba987640b8aec313e688bfc69ab08fcdba879f0b655e51c21a0e8696399151ccdd6a74783d73aab4e732104d78bc0bab6e2f62c WHIRLPOOL d0b61997f7a901cc94d23bd1dc5de49e591313f58856f4e5ab9349646b6d70013d8e0b39e4c07d84d9f9c215d06e7eba7f9c553ced6ce458cc8d9b6c01c51b84
+MISC metadata.xml 1033 SHA256 442aa873e3c5c17bfcdcc95c04ac60ecff8a9ac74923f691ca8ac79ca0ff01b9 SHA512 a0b21dacbdbf3d269e575ca18127e9d512bf2f23f71dcc8ba8b1e4f54c1274a5e37c1e3c609e78e11fdab7100523cc11420e20d088f531794c7f3f96a42432ac WHIRLPOOL 9e49b476813bc4baf61147cfaf3c6332255c0272b659dbab3f331db61075365d61e50e0f6a3df83cf83d7ed7f81078616b3d241e2bef1c426632dbdfe4db0af4
diff --git a/dev-lang/moarvm/metadata.xml b/dev-lang/moarvm/metadata.xml
new file mode 100644
index 000000000000..e251f6873231
--- /dev/null
+++ b/dev-lang/moarvm/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="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>tomboy64@sina.cn</email>
+ <name>Matthew Brewer</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>perl@gentoo.org</email>
+ <name>Gentoo Perl Project</name>
+ </maintainer>
+ <use>
+ <flag name="asan">Enable clang's Address Sanitizer functionality. Expect longer compile time.</flag>
+ <flag name="clang">Use clang compiler instead of GCC</flag>
+ <flag name="jit">Enable Just-In-Time-Compiler. Has no effect except on AMD64 and Darwin.</flag>
+ <flag name="optimize">Enable optimization via CFLAGS</flag>
+ <flag name="ubsan">Enable clang's Undefined Behavior Sanitizer functionality. Expect longer compile time.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">MoarVM/MoarVM</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/moarvm/moarvm-2017.07.ebuild b/dev-lang/moarvm/moarvm-2017.07.ebuild
new file mode 100644
index 000000000000..f119a7ae28bc
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2017.07.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+MY_PN="MoarVM"
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
+ inherit git-r3
+ KEYWORDS=""
+ S="${WORKDIR}/${P}"
+else
+ SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${MY_PN}-${PV}"
+fi
+
+DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
+HOMEPAGE="http://moarvm.org"
+LICENSE="Artistic-2"
+SLOT="0"
+IUSE="asan clang debug doc +jit static-libs optimize ubsan"
+
+RDEPEND="dev-libs/libatomic_ops
+ >=dev-libs/libtommath-1.0
+ dev-libs/libuv
+ jit? ( dev-lang/lua:0[deprecated]
+ dev-lua/LuaBitOp )
+ virtual/libffi"
+DEPEND="${RDEPEND}
+ clang? ( >=sys-devel/clang-3.1 )
+ dev-lang/perl"
+
+DOCS=( CREDITS README.markdown )
+
+# Tests are conducted via nqp
+RESTRICT=test
+
+src_configure() {
+ use doc && DOCS+=( docs/* )
+ local myconfigargs=(
+ "--prefix=/usr"
+ "--has-libtommath"
+ "--has-libuv"
+ "--has-libatomic_ops"
+ "--has-libffi"
+ "--libdir=$(get_libdir)"
+ "--compiler=$(usex clang clang gcc)"
+ "$(usex asan --asan)"
+ "$(usex debug --debug --no-debug)"
+ "$(usex jit --lua=/usr/bin/lua --no-jit)"
+ "$(usex optimize --optimize= --no-optimize)"
+ "$(usex static-libs --static)"
+ "$(usex ubsan --ubsan)"
+ )
+ use optimize && filter-flags '-O*'
+
+ perl Configure.pl "${myconfigargs[@]}" || die
+}
diff --git a/dev-lang/moarvm/moarvm-2017.08.1.ebuild b/dev-lang/moarvm/moarvm-2017.08.1.ebuild
new file mode 100644
index 000000000000..295d13af2f47
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2017.08.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+MY_PN="MoarVM"
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
+ inherit git-r3
+ KEYWORDS=""
+ S="${WORKDIR}/${P}"
+else
+ SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${MY_PN}-${PV}"
+fi
+
+DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
+HOMEPAGE="http://moarvm.org"
+LICENSE="Artistic-2"
+SLOT="0"
+IUSE="asan clang debug doc +jit static-libs optimize ubsan"
+
+RDEPEND="dev-libs/libatomic_ops
+ dev-libs/libuv
+ jit? ( dev-lang/lua:0[deprecated]
+ dev-lua/LuaBitOp )
+ virtual/libffi"
+DEPEND="${RDEPEND}
+ clang? ( >=sys-devel/clang-3.1 )
+ dev-lang/perl"
+
+DOCS=( CREDITS README.markdown )
+
+# Tests are conducted via nqp
+RESTRICT=test
+
+src_configure() {
+ use doc && DOCS+=( docs/* )
+ local myconfigargs=(
+ "--prefix=/usr"
+ "--has-libuv"
+ "--has-libatomic_ops"
+ "--has-libffi"
+ "--libdir=$(get_libdir)"
+ "--compiler=$(usex clang clang gcc)"
+ "$(usex asan --asan)"
+ "$(usex debug --debug --no-debug)"
+ "$(usex jit --lua=/usr/bin/lua --no-jit)"
+ "$(usex optimize --optimize= --no-optimize)"
+ "$(usex static-libs --static)"
+ "$(usex ubsan --ubsan)"
+ )
+ use optimize && filter-flags '-O*'
+
+ perl Configure.pl "${myconfigargs[@]}" || die
+}
diff --git a/dev-lang/moarvm/moarvm-2017.09.1.ebuild b/dev-lang/moarvm/moarvm-2017.09.1.ebuild
new file mode 100644
index 000000000000..9925813bdcb7
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2017.09.1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+MY_PN="MoarVM"
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
+ inherit git-r3
+ KEYWORDS=""
+ S="${WORKDIR}/${P}"
+else
+ SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${MY_PN}-${PV}"
+fi
+
+DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
+HOMEPAGE="http://moarvm.org"
+LICENSE="Artistic-2"
+SLOT="0"
+IUSE="asan clang debug doc +jit static-libs optimize ubsan"
+
+RDEPEND="dev-libs/libatomic_ops
+ dev-libs/libuv
+ dev-lang/lua:0[deprecated]
+ dev-lua/LuaBitOp
+ virtual/libffi"
+DEPEND="${RDEPEND}
+ clang? ( >=sys-devel/clang-3.1 )
+ dev-lang/perl"
+
+DOCS=( CREDITS README.markdown )
+
+# Tests are conducted via nqp
+RESTRICT=test
+
+src_configure() {
+ use doc && DOCS+=( docs/* )
+ local myconfigargs=(
+ "--prefix=/usr"
+ "--has-libuv"
+ "--has-libatomic_ops"
+ "--has-libffi"
+ "--libdir=$(get_libdir)"
+ "--compiler=$(usex clang clang gcc)"
+ "$(usex asan --asan)"
+ "$(usex debug --debug --no-debug)"
+ "$(usex optimize --optimize= --no-optimize)"
+ "$(usex static-libs --static)"
+ "$(usex ubsan --ubsan)"
+ )
+ use optimize && filter-flags '-O*'
+
+ perl Configure.pl "${myconfigargs[@]}" || die
+}
diff --git a/dev-lang/moarvm/moarvm-9999.ebuild b/dev-lang/moarvm/moarvm-9999.ebuild
new file mode 100644
index 000000000000..f119a7ae28bc
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-9999.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+MY_PN="MoarVM"
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
+ inherit git-r3
+ KEYWORDS=""
+ S="${WORKDIR}/${P}"
+else
+ SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/${MY_PN}-${PV}"
+fi
+
+DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
+HOMEPAGE="http://moarvm.org"
+LICENSE="Artistic-2"
+SLOT="0"
+IUSE="asan clang debug doc +jit static-libs optimize ubsan"
+
+RDEPEND="dev-libs/libatomic_ops
+ >=dev-libs/libtommath-1.0
+ dev-libs/libuv
+ jit? ( dev-lang/lua:0[deprecated]
+ dev-lua/LuaBitOp )
+ virtual/libffi"
+DEPEND="${RDEPEND}
+ clang? ( >=sys-devel/clang-3.1 )
+ dev-lang/perl"
+
+DOCS=( CREDITS README.markdown )
+
+# Tests are conducted via nqp
+RESTRICT=test
+
+src_configure() {
+ use doc && DOCS+=( docs/* )
+ local myconfigargs=(
+ "--prefix=/usr"
+ "--has-libtommath"
+ "--has-libuv"
+ "--has-libatomic_ops"
+ "--has-libffi"
+ "--libdir=$(get_libdir)"
+ "--compiler=$(usex clang clang gcc)"
+ "$(usex asan --asan)"
+ "$(usex debug --debug --no-debug)"
+ "$(usex jit --lua=/usr/bin/lua --no-jit)"
+ "$(usex optimize --optimize= --no-optimize)"
+ "$(usex static-libs --static)"
+ "$(usex ubsan --ubsan)"
+ )
+ use optimize && filter-flags '-O*'
+
+ perl Configure.pl "${myconfigargs[@]}" || die
+}
diff --git a/dev-lang/mono-basic/Manifest b/dev-lang/mono-basic/Manifest
new file mode 100644
index 000000000000..c553bcbc7100
--- /dev/null
+++ b/dev-lang/mono-basic/Manifest
@@ -0,0 +1,5 @@
+DIST mono-basic-2.10.tar.bz2 1902672 SHA256 1cd87b634d4d862527c548bb827542d11a607569005df0123678e381ad12b186 SHA512 93d661053a14b1ef91c8e416aa7caf545b902d7ca58566516a463ce8115f96325b0afb1a7b52af37dd0eae022009cdabf742f42396da79464def127d86b06b6f WHIRLPOOL 26faae7f03a2c84221d529e1d63e8528a3e3b00ceca56e29b356c95e8255f92fbafae7d5815a91e82a93bf8b0c46ece01a308ef5cd75323a1d988b37173741c9
+EBUILD mono-basic-2.10.ebuild 351 SHA256 ad92f7dfc82b62bcd50c36c54c27725768f803727b67df08673248a5846aed23 SHA512 744f8b0f33485abc23acff1a7a7563ce30394ba0deda39e2a2ce21f9d4d1157a53ce8404c4425195b08d0cd22cf857a340396a54bf33cb35ae84206359c9d868 WHIRLPOOL d6a97ecfb856ca8ad6183ecfac0eabd2807c4ace42856d4d9e60ec2719e5fcead6706ac31aa5b95d0a9e28aecab8487cfc59ed16450ff55547c466b31ad68eb0
+MISC ChangeLog 2827 SHA256 ae59532e213c920c3a1f1bbbbe1c4ad244aaed0ce4f31c0bc53f5d9d0ce562dd SHA512 7f7208efbe169f2b5030d94cca3382881586a18596c8385483862a8ec42bf936603bb6ddc70526d16ef36d8b9f677265870a9f08aa3b704e7367d7efeb590861 WHIRLPOOL d8fd4ab1d46721fc35c356cfdf9990f13492faa7507385d1d1530260e0077ba5405d244d17f0878f5edacbc08656fd68402d48014565f60fbc6b2115f3ffe4e8
+MISC ChangeLog-2015 5852 SHA256 69f07932ff340262cb4ae68aafc292c0053dc84177763e1d46a6adedfb216ba9 SHA512 606a3b30fbd80d15b5250bc1b4a854c5fe13424a4d958a449f891cc37e19e5b587a523e4cf42772abd20292f6438aaa5517039d2a9f17a4fbeee3e1a6decb3fb WHIRLPOOL d92ff0cdf4bda100c2ed394ac3ae260ed7621c1b046855c5a7040ee59d70a13908d0cb80c099593178aba54bdd453002bd699be16c315af1f2aff7664ba67c36
+MISC metadata.xml 345 SHA256 e5f200bb53267e2afeb78f7568cab74239aa6bb643cf4baf986477d06f43e4ed SHA512 20c39fcd715331772c9857be66b894983c688f63231f3739a4672cd7231e3c90c8751e6e77858b8b2d4928733eb893e8c501e2a250b7e5a62ca7cdce8294c530 WHIRLPOOL c5bc1bfd2973ecac3dc4aa0bc5e9596f4e5452e7e02d89414f57e5cf878e812edfbfb75fa35d562b1a132ad028cfc46db86b1e51a644216088f104217319ef3c
diff --git a/dev-lang/mono-basic/metadata.xml b/dev-lang/mono-basic/metadata.xml
new file mode 100644
index 000000000000..ef2ebc49ae47
--- /dev/null
+++ b/dev-lang/mono-basic/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>dotnet@gentoo.org</email>
+ <name>Gentoo Dotnet Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ Visual Basic .NET compiler and runtime
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/mono-basic/mono-basic-2.10.ebuild b/dev-lang/mono-basic/mono-basic-2.10.ebuild
new file mode 100644
index 000000000000..61477d55115a
--- /dev/null
+++ b/dev-lang/mono-basic/mono-basic-2.10.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit go-mono mono multilib
+
+DESCRIPTION="Visual Basic .NET Runtime and Class Libraries"
+HOMEPAGE="http://www.mono-project.com/VisualBasic.NET_support"
+
+LICENSE="LGPL-2 MIT"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RESTRICT="test"
diff --git a/dev-lang/mono/Manifest b/dev-lang/mono/Manifest
new file mode 100644
index 000000000000..f191071badc8
--- /dev/null
+++ b/dev-lang/mono/Manifest
@@ -0,0 +1,22 @@
+AUX mono-2.10.2-threads-access.patch 1156 SHA256 3f2f91068abb16edc655006262cc19156a28594111aef97f5ff4d98125a1b87d SHA512 13977ecea07c5624c69f4a49d6b5ad008dd9c0f098acecb3b7952690a09365a461cdedfebc2198931598d250ddcd3e644e811ba404fd2105b3520d611b2e66a8 WHIRLPOOL 014cff46017c73b030da8586abfbf1c4b42939a7821823592255714b529ddcfc01c635915fb28eb1392f85ae6c915eaf1b81c144e642ac214b6ca08fea03d3bb
+AUX mono-2.10.9-CVE-2012-3382.patch 564 SHA256 69d3cdff15e2e210c18a92c458699fa07ac51bca6eeff9ef779f225d9215bd85 SHA512 044293dcea8c31046e6d771a3e15863fad152bc52dd1eb2cd010d581e5b695c42b09e6582eccc6d5b3e800263bacf61e70f731b1bf6145249ec682d830b855db WHIRLPOOL 53c59f790f39fd98d526a4ac921a4a17c0b421fafbc126cfef173ad91515e261eda6631254b56a3f8175789c79f5b4069425e7fd33e97da5b34bf305c7ce902a
+AUX mono-2.10.9-CVE-2012-3543.patch 6960 SHA256 36784262f565e00277c0afac96d92ea1a84ca374c770bf795ff6e509708f8d49 SHA512 853c8c998f205e8862d4cbcb4979aeb557a8a2722b5586a1ba5975a9ef6c92ea280421a38dc4f75c9ecb0bb12dbd6fb0b416a18b1a42f5ab852722e60ffad730 WHIRLPOOL 9f1fc2fa45c952fb697a8e888cfc35b1bf10354380cf74ae808a6c94c03b1414e32ac3c42a48e457d6ce0282c469d171cec715c48a08378a5a4b56b5ea66865d
+AUX mono-2.10.9-CVE-2012-3543_2.patch 1569 SHA256 0f5a3e6ab55fa6a0bf969ea196ee328f727b20a272da90b7a6d8151730fe5cc7 SHA512 e574e8224d00c7636198c1c374163efca724b2b1058378080687b6d8d7f83d72d27b8db510af03eac9ac185a09eeed0467d59e2d1ca40f7cfa255b43c2a5a45a WHIRLPOOL 2c8437843894ad545c966af2a4e900808a0c31f7995efe518c0c0d1a93fe0367ebf2891d78aeebc142b8c5494cb0fa9118337317efdca564ce1ea4c6c693da13
+AUX mono-4.8.0.371-makedev.patch 900 SHA256 1021717a431dea6494afbb02199fbee6228ec1271a839ace7c9d57d630f0b29b SHA512 afdcb69c2de195bcc6d0a47cc5bad6b6679de6d1c8f0577f8a2f5716610f131e71a327540ba7e23353f35dfe7c552f16b98c9e88c3ecf91f2225a68a6d034971 WHIRLPOOL 48150468547120d6c4c8afd462fd1c0fbbc5d45c37c92710acc7f3a0db6978129a8b871a9b870c6624de48a0b9b06fc43311a353863631bf5189fa33215b5324
+AUX mono-4.8.0.371-x86_32.patch 1033 SHA256 503402793aac188b3bd20f3f497cf41fb1f7d716a7b44b5cd967d089a48e0bc8 SHA512 f12ffda9eddb8fbd51844a6cc7bd3d4d147a97ddde9e4a4435051da88eb72603303ba7d21124747ab23033eacb70ae75ee8e96bc5887d898cc21ac1904c36aab WHIRLPOOL 97d710f84089e342af72841d1f6b0db9eeb60d28105e7a982930e85f8db2f6c3b270c279c6d915ebc719228675ac4cd4a442d80d7148be41726dc4e04a0f353b
+DIST mono-2.10.9.tar.bz2 34038017 SHA256 541038cd4edd4a1c485638d49697d45015ef7483bcb21bb6165e4d7eb770c9a5 SHA512 426881873e7f9aaf01e1306bed7b3ac220082ca40dce91fa4f4f331944e8d91453b3cdcc4918882ab039ed694ae8819eeb787edf6a2ad42cc661614076725c01 WHIRLPOOL 93f54fbbf032fb60467fd4317630588d349c3dfb50158bad478bd3e2650fd3e8f12d45be372873b57626d4ac48f798646c3650590bbf731dc2f005ee618b8548
+DIST mono-4.4.1.0.tar.bz2 85897587 SHA256 165e7686b5cbb1ab671b4cb2069207999c3d70044002190b6ec84bb1fdf62b4a SHA512 d9b6c57c2d9327ea551083b81a2e6cc222ded9a04862056b0dfded1c5df56efbfc4960097df034595012231fe50d172174ab7b3e3f2d8c4c6953ab2106b1cb6a WHIRLPOOL 99f16622c6d1902a7efff41d55d114ed214979c1d902a5dcbc257c180a1e68ed519beb5383db2358096e3f8425483983565c8f438552de36ffabe4bfad3f5fbd
+DIST mono-4.6.1.5.tar.bz2 83174665 SHA256 3871ee72bdfc2ea5d636ffff22cf49ae6bac7c4a4f3d687214dd8ac236bbf7c3 SHA512 1d0c1ec2930ecea3faf1be572bc045300ef4a90d3fe7519f2a9c797be79298c61528d83baa5a24a57143a35be80f78297196556c33cd0f345d9907a973fe625a WHIRLPOOL 9ccfdfa68f2d9a75440c71fb22af988165608299d7aaeecac77fc783412cba4524a423b166a540d2381c98c58e3f7e40ada91381d45f67693e1f69e462bbb1d9
+DIST mono-4.8.0.425.tar.bz2 87955541 SHA256 0d81ba0ef69fbfa2ac8206c9e7a0ad996c193c06c897bab36c5dcc4a40b50a7d SHA512 7bab64adbebc277d3fc10301fa6af6cd64ea0836e2d74dfdd9b59684d9402689f9a4e397f3d36f519c7a892c14dcf8f8867d40a5119891874dfd10f9bbce2ac4 WHIRLPOOL fcb095e83880bdbbce6978af68c5997f1f345046307e3ea4d53413b257dca7953b947c90e073e15991ec043483982bfcf28d29c350e392e534c865b74fff8a89
+DIST mono-4.8.0.495.tar.bz2 87540431 SHA256 7ba62e6f42559d58dc447a19fc1cb2a9c7977d6c6e21e1e335f73917dea120cb SHA512 0052b7b04ae25e7cb5970d742369b74c83a10c6c82da591e8d26ad9e13e8b2590a1cde27ca99e43aebc622c7a2a590b9e6c7ce519ac4185b0b6cf7134527cc9d WHIRLPOOL 54c7101dbb2b886d9798e16cbf0e84898f9d4a96786d9f52f76a9872f99ac1b39d1f6109abcfc70897163bab3e5b3478ecb77ef217953118badc537e8e474e5e
+DIST mono-4.8.0.524.tar.bz2 87392723 SHA256 ca02614cfc9fe65e310631cd611d7b07d1ff205ce193006d4be0f9919c26bdcf SHA512 eb77b768a4a26e6a2a872f4845769cdc83f01af3377ecd6d932437d2a1b54bfd1ce727563906146195a54997b4b624fb75449a6f0bcfe818cbc4e6544841bf2b WHIRLPOOL 143232c15b99e702de5774a0ffbcf6f3ee85338b55e8f0cc7de2afe6053e7de62cccd3cc27163213e492851c13cdfbe0e244a4f8f0824e4786c658a2a81ac477
+EBUILD mono-2.10.9-r2.ebuild 7372 SHA256 049b46e660c9363af04f416a56fca5399f9b0853658b1821bc57049bb8f1022f SHA512 e4b9f11f99343cefb489b818e777a0d948687513ffeca34083cb96af1cb83d08f2ee12af61f8e53eebbea24490c561f64dbae66d139ed67645ed13370dcc0f26 WHIRLPOOL a6be5a9f8af1cd26a65fb14cc8be0ee16920610255a857fcd5b44796313f780b6883db4fcfe82d1bb6aa304d0646e5b2a31217573b5bd4912ec7ba9c4a4dc3bb
+EBUILD mono-4.4.1.0.ebuild 3363 SHA256 81f5344d6697e1afd5aad4293e7ef576e8ac0a6c73f1b3b9ee3d3250abac02a0 SHA512 478620383d1d8e6cd52c46cc2bed0ca8101f42f037454814f4c829e1a0ed52650e47a93f8449d4335b0be52c75c4590725ef58a96e20374b12651f38e7fea88d WHIRLPOOL 98b47826117e967401b2ea34fae07be5aca5a01082febdd3fecd35e31c99979258e6624968e31d309264c6bd455abd6287ebd131e0f128d2fdb40601f3f80b1c
+EBUILD mono-4.6.1.5-r1.ebuild 3506 SHA256 0055b48c4820ed5eccffee2f7706120871f431b7cf0c2fa05d5416efacbdea4a SHA512 453e1c30b2eb4edd3d7c3aa2e769cb31efff63f75ffde986b95ce14c7bffea7c005af16d8b4d9559c58a20ef200c2a4d2989fe5c65718a30b200f844af26688e WHIRLPOOL 90daecc6f06c21bdb9600dc44e6f3dcb8e073a56a72e7332b84e3d52402f4648c3545d2fb32533036a5218a8b45e45f777f574694855986d90a8fccc83eb86c1
+EBUILD mono-4.6.1.5.ebuild 3366 SHA256 909e4827560fda16a562e354c1bff2af653b7bab4b70c43cceda79a3f65005ac SHA512 7b40fd4fb50a705a521d8d4738da1c656dde3eb8f6593bd26c27491a65cb59fcd6034b3e8202c23ffc6b82369c790d91d337c3d5a4cb1b2a4bea9a8135f3b91f WHIRLPOOL 62711691e73b3a8300cd09808614e8ef3e88e56f38c28bb5b00163151d2b28b1b087d764973b2fc6347497df6b15b9136495862180aa901a63ce08a9b59e1c51
+EBUILD mono-4.8.0.425.ebuild 3039 SHA256 a0d9794bd607c6d5e2fe1c6810ede453f99cdebcdeca918da69b5ac5512efdfd SHA512 73c27f8263657fd2075a938756c79372eb1044a645a4b651cc4e469e8131e5108c2c46ea8ccc17c8d662121f2fcac75fe3c1ebc6fdfa273278c615b0ede4379c WHIRLPOOL ad0f796e34c65a6d3673958696b42caba0c2725f7bff45d74b356ecc9236c824f1ba8e6da4a35acea24880d098588a04136622d6e705221dbda6b5d3d5ca947a
+EBUILD mono-4.8.0.495.ebuild 3039 SHA256 a0d9794bd607c6d5e2fe1c6810ede453f99cdebcdeca918da69b5ac5512efdfd SHA512 73c27f8263657fd2075a938756c79372eb1044a645a4b651cc4e469e8131e5108c2c46ea8ccc17c8d662121f2fcac75fe3c1ebc6fdfa273278c615b0ede4379c WHIRLPOOL ad0f796e34c65a6d3673958696b42caba0c2725f7bff45d74b356ecc9236c824f1ba8e6da4a35acea24880d098588a04136622d6e705221dbda6b5d3d5ca947a
+EBUILD mono-4.8.0.524.ebuild 3046 SHA256 ec8fd1534f304e376f49e4c1c90f82298bcc3881097d02cae53d706c02b5fa31 SHA512 057f1b024ff6a9747a5bf00a9e1ec6ff9acb81fbbeb46ddca2158cfaf98283c9a89ca99fb5e62fff2d7027591148947bdf7881e4dcde154a9307339d65f6020b WHIRLPOOL cea71f12013e071040a28a5a3affb9a4f4a775b88827c64ae74ac951a19f573d99b947b553fca0917ef858ca829946a5520b3b619c412e03b74c5d49d20ae3f4
+MISC ChangeLog 12677 SHA256 d034abd38421dab966603cd985899ecd9516b8fbda6f913f243165b88760b36a SHA512 4b20f9d8b095b4f9f1d3c87176ecead030114a986b9e58b7ffc75a1ee5e71afa7a50f74f93aec7a5abe16708d18dab88746d0dd7dbc6d820c9cdc1aebdc6127b WHIRLPOOL f858ed5e84220f240bb99b904df6dfbeaa663dac37f06667b9be9877439ab49cfb7e1c823e7f9efbc31738f0fd150604b11248502519e8cd8eca775c6d9dacd0
+MISC ChangeLog-2015 52096 SHA256 ccf206c864bd20b2496ea7701715d5339aba1ece26e3ab626e5eae7627c65403 SHA512 4523f645c1fdfc5646060436500eabfa16b5c708fd5c997621a3256683fe51c12b8d3851c3d93e6456f3d52e0a91e9d3a3ad6b6e983325f411faeece133a829a WHIRLPOOL 20049953e12cad3024ac5915dcfbd6f656600b920d60349e8d0c921ef0fdcd845ed39925748c50df89f0073f057b7a3b1117fe405ffa0dc815e174032f690f7d
+MISC metadata.xml 507 SHA256 9d113683d7a883d50166e0d28df4d26bd3bdd78097c1ec76329187d15321b0a1 SHA512 e072a1abbf66276b0d139c3e918593010312c2059a0c6feba7b324689cdf90efe28bef0286ad9888125acfdd1fed2dee3e05e79a0aeb7f9ec1809bd128cf8a20 WHIRLPOOL fa321f42a4471c645450e57b0464e4bf8968ebfe91346cac703098e8f5eb62f51d7abb4c346acf5816cf96b5b03b5dc72914e113dbd801c86276600cc3931130
diff --git a/dev-lang/mono/files/mono-2.10.2-threads-access.patch b/dev-lang/mono/files/mono-2.10.2-threads-access.patch
new file mode 100644
index 000000000000..d677b0113e2d
--- /dev/null
+++ b/dev-lang/mono/files/mono-2.10.2-threads-access.patch
@@ -0,0 +1,40 @@
+From 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 Mon Sep 17 00:00:00 2001
+From: Sebastien Pouliot <sebastien@ximian.com>
+Date: Wed, 6 Apr 2011 13:24:31 -0400
+Subject: [PATCH] Fix access to freed members of a dead thread
+
+* threads.c: Fix access to freed members of a dead thread. Found
+and fixed by Rodrigo Kumpera <rkumpera@novell.com>
+Ref: CVE-2011-0992
+---
+ mono/metadata/threads.c | 11 ++++++++---
+ 1 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c
+index 3fe4e93..a7a721d 100644
+--- a/mono/metadata/threads.c
++++ b/mono/metadata/threads.c
+@@ -1036,12 +1036,17 @@ void ves_icall_System_Threading_InternalThread_Thread_free_internal (MonoInterna
+ CloseHandle (thread);
+
+ if (this->synch_cs) {
+- DeleteCriticalSection (this->synch_cs);
+- g_free (this->synch_cs);
++ CRITICAL_SECTION *synch_cs = this->synch_cs;
+ this->synch_cs = NULL;
++ DeleteCriticalSection (synch_cs);
++ g_free (synch_cs);
+ }
+
+- g_free (this->name);
++ if (this->name) {
++ void *name = this->name;
++ this->name = NULL;
++ g_free (name);
++ }
+ }
+
+ static void mono_thread_start (MonoThread *thread)
+--
+1.7.5.4
+
diff --git a/dev-lang/mono/files/mono-2.10.9-CVE-2012-3382.patch b/dev-lang/mono/files/mono-2.10.9-CVE-2012-3382.patch
new file mode 100644
index 000000000000..434adf283d99
--- /dev/null
+++ b/dev-lang/mono/files/mono-2.10.9-CVE-2012-3382.patch
@@ -0,0 +1,13 @@
+diff --git a/mcs/class/System.Web/System.Web/HttpForbiddenHandler.cs b/mcs/class/System.Web/System.Web/HttpForbiddenHandler.cs
+index af5ddf4..7e87d48 100644
+--- a/mcs/class/System.Web/System.Web/HttpForbiddenHandler.cs
++++ b/mcs/class/System.Web/System.Web/HttpForbiddenHandler.cs
+@@ -42,7 +42,7 @@ public void ProcessRequest (HttpContext context)
+
+ throw new HttpException (403,
+ "This type of page is not served.",
+- req != null ? req.Path : null,
++ req != null ? HttpUtility.HtmlEncode (req.Path) : null,
+ description);
+ }
+
diff --git a/dev-lang/mono/files/mono-2.10.9-CVE-2012-3543.patch b/dev-lang/mono/files/mono-2.10.9-CVE-2012-3543.patch
new file mode 100644
index 000000000000..307e10fb3ee6
--- /dev/null
+++ b/dev-lang/mono/files/mono-2.10.9-CVE-2012-3543.patch
@@ -0,0 +1,196 @@
+From 04245de5c480db5dff5983467f7a8606f1321ed6 Mon Sep 17 00:00:00 2001
+From: Marek Habersack <grendel@twistedcode.net>
+Date: Tue, 24 Jul 2012 18:49:34 -0400
+Subject: [PATCH] Fix for Novell bug #739119
+
+---
+ .../System.Web.Util/SecureHashCodeProvider.cs | 131 ++++++++++++++++++++
+ mcs/class/System.Web/System.Web.dll.sources | 1 +
+ mcs/class/System.Web/System.Web/WebROCollection.cs | 5 +-
+ 3 files changed, 136 insertions(+), 1 deletion(-)
+ create mode 100644 mcs/class/System.Web/System.Web.Util/SecureHashCodeProvider.cs
+
+diff --git a/mcs/class/System.Web/System.Web.Util/SecureHashCodeProvider.cs b/mcs/class/System.Web/System.Web.Util/SecureHashCodeProvider.cs
+new file mode 100644
+index 0000000..165022c
+--- /dev/null
++++ b/mcs/class/System.Web/System.Web.Util/SecureHashCodeProvider.cs
+@@ -0,0 +1,131 @@
++//
++// System.Collections.SecureHashCodeProvider.cs
++//
++// Authors:
++// Sergey Chaban (serge@wildwestsoftware.com)
++// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
++// Sebastien Pouliot <sebastien@ximian.com>
++//
++// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
++// Copyright 2012 Xamarin, Inc (http://xamarin.com)
++//
++// Permission is hereby granted, free of charge, to any person obtaining
++// a copy of this software and associated documentation files (the
++// "Software"), to deal in the Software without restriction, including
++// without limitation the rights to use, copy, modify, merge, publish,
++// distribute, sublicense, and/or sell copies of the Software, and to
++// permit persons to whom the Software is furnished to do so, subject to
++// the following conditions:
++//
++// The above copyright notice and this permission notice shall be
++// included in all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++using System;
++using System.Collections;
++using System.Globalization;
++
++namespace System.Web.Util
++{
++ class SecureHashCodeProvider : IHashCodeProvider
++ {
++ static readonly SecureHashCodeProvider singletonInvariant = new SecureHashCodeProvider (CultureInfo.InvariantCulture);
++ static SecureHashCodeProvider singleton;
++ static readonly object sync = new object ();
++ static readonly int seed;
++
++ TextInfo m_text; // must match MS name for serialization
++
++ public static SecureHashCodeProvider Default {
++ get {
++ lock (sync) {
++ if (singleton == null) {
++ singleton = new SecureHashCodeProvider ();
++ } else if (singleton.m_text == null) {
++ if (!AreEqual (CultureInfo.CurrentCulture, CultureInfo.InvariantCulture))
++ singleton = new SecureHashCodeProvider ();
++ } else if (!AreEqual (singleton.m_text, CultureInfo.CurrentCulture)) {
++ singleton = new SecureHashCodeProvider ();
++ }
++ return singleton;
++ }
++ }
++ }
++
++ public static SecureHashCodeProvider DefaultInvariant {
++ get { return singletonInvariant; }
++ }
++
++ static SecureHashCodeProvider ()
++ {
++ // It should be enough to fend off the attack described in
++ // https://bugzilla.novell.com/show_bug.cgi?id=739119
++ // In order to predict value of the seed, the attacker would have to know the exact time when
++ // the server process started and since it's a remote attack, this is next to impossible.
++ // Using milliseconds instead of ticks here would make it easier for the attackers since there
++ // would only be as many as 1000 possible values
++ seed = (int)DateTime.UtcNow.Ticks;
++ }
++
++ // Public instance constructor
++ public SecureHashCodeProvider ()
++ {
++ CultureInfo culture = CultureInfo.CurrentCulture;
++ if (!AreEqual (culture, CultureInfo.InvariantCulture))
++ m_text = CultureInfo.CurrentCulture.TextInfo;
++ }
++
++ public SecureHashCodeProvider (CultureInfo culture)
++ {
++ if (culture == null)
++ throw new ArgumentNullException ("culture");
++ if (!AreEqual (culture, CultureInfo.InvariantCulture))
++ m_text = culture.TextInfo;
++ }
++
++ static bool AreEqual (CultureInfo a, CultureInfo b)
++ {
++ return a.LCID == b.LCID;
++ }
++
++ static bool AreEqual (TextInfo info, CultureInfo culture)
++ {
++ return info.LCID == culture.LCID;
++ }
++
++ public int GetHashCode (object obj)
++ {
++ if (obj == null)
++ throw new ArgumentNullException ("obj");
++
++ string str = obj as string;
++
++ if (str == null)
++ return obj.GetHashCode ();
++
++ int h = seed;
++ char c;
++
++ if ((m_text != null) && !AreEqual (m_text, CultureInfo.InvariantCulture)) {
++ str = m_text.ToLower (str);
++ for (int i = 0; i < str.Length; i++) {
++ c = str [i];
++ h = h * 31 + c;
++ }
++ } else {
++ for (int i = 0; i < str.Length; i++) {
++ c = Char.ToLower (str [i], CultureInfo.InvariantCulture);
++ h = h * 31 + c;
++ }
++ }
++ return h;
++ }
++ }
++}
+diff --git a/mcs/class/System.Web/System.Web.dll.sources b/mcs/class/System.Web/System.Web.dll.sources
+index ca7745a..aa41fca 100644
+--- a/mcs/class/System.Web/System.Web.dll.sources
++++ b/mcs/class/System.Web/System.Web.dll.sources
+@@ -1174,6 +1174,7 @@ System.Web.Util/IWebPropertyAccessor.cs
+ System.Web.Util/MachineKeySectionUtils.cs
+ System.Web.Util/RuntimeHelpers.cs
+ System.Web.Util/SearchPattern.cs
++System.Web.Util/SecureHashCodeProvider.cs
+ System.Web.Util/SerializationHelper.cs
+ System.Web.Util/StrUtils.cs
+ System.Web.Util/TimeUtil.cs
+diff --git a/mcs/class/System.Web/System.Web/WebROCollection.cs b/mcs/class/System.Web/System.Web/WebROCollection.cs
+index ddb2e30..e1b98df 100644
+--- a/mcs/class/System.Web/System.Web/WebROCollection.cs
++++ b/mcs/class/System.Web/System.Web/WebROCollection.cs
+@@ -5,6 +5,7 @@
+ // Gonzalo Paniagua Javier (gonzalo@novell.com)
+ //
+ // (c) 2005-2009 Novell, Inc. (http://www.novell.com)
++// Copyright 2012 Xamarin, Inc (http://xamarin.com)
+ //
+ //
+ // Permission is hereby granted, free of charge, to any person obtaining
+@@ -26,8 +27,10 @@
+ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ //
++using System.Collections;
+ using System.Collections.Specialized;
+ using System.Text;
++using System.Web.Util;
+
+ namespace System.Web
+ {
+@@ -36,7 +39,7 @@ class WebROCollection : NameValueCollection
+ bool got_id;
+ int id;
+
+- public WebROCollection () : base (StringComparer.OrdinalIgnoreCase) { }
++ public WebROCollection () : base (SecureHashCodeProvider.DefaultInvariant, CaseInsensitiveComparer.DefaultInvariant) { }
+ public bool GotID {
+ get { return got_id; }
+ }
+--
+1.7.10
+
diff --git a/dev-lang/mono/files/mono-2.10.9-CVE-2012-3543_2.patch b/dev-lang/mono/files/mono-2.10.9-CVE-2012-3543_2.patch
new file mode 100644
index 000000000000..6ab3e077b689
--- /dev/null
+++ b/dev-lang/mono/files/mono-2.10.9-CVE-2012-3543_2.patch
@@ -0,0 +1,34 @@
+From 049bb49f1c5b650166de2a266bc1879c5def0190 Mon Sep 17 00:00:00 2001
+From: Marek Habersack <grendel@twistedcode.net>
+Date: Wed, 25 Jul 2012 08:42:09 -0400
+Subject: [PATCH] Update to fix for Novell bug #739119
+
+---
+ mcs/class/System.Web/System.Web.UI/Page.cs | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mcs/class/System.Web/System.Web.UI/Page.cs b/mcs/class/System.Web/System.Web.UI/Page.cs
+index 989af7e..b2316a4 100644
+--- a/mcs/class/System.Web/System.Web.UI/Page.cs
++++ b/mcs/class/System.Web/System.Web.UI/Page.cs
+@@ -1175,7 +1175,7 @@ internal void OnFormPostRender (HtmlTextWriter writer, string formUniqueID)
+
+ void ProcessPostData (NameValueCollection data, bool second)
+ {
+- NameValueCollection requestValues = _requestValueCollection == null ? new NameValueCollection () : _requestValueCollection;
++ NameValueCollection requestValues = _requestValueCollection == null ? new NameValueCollection (SecureHashCodeProvider.DefaultInvariant, CaseInsensitiveComparer.DefaultInvariant) : _requestValueCollection;
+
+ if (data != null && data.Count > 0) {
+ var used = new Dictionary <string, string> (StringComparer.Ordinal);
+@@ -1210,7 +1210,7 @@ void ProcessPostData (NameValueCollection data, bool second)
+
+ } else if (!second) {
+ if (secondPostData == null)
+- secondPostData = new NameValueCollection ();
++ secondPostData = new NameValueCollection (SecureHashCodeProvider.DefaultInvariant, CaseInsensitiveComparer.DefaultInvariant);
+ secondPostData.Add (id, data [id]);
+ }
+ }
+--
+1.7.10
+
diff --git a/dev-lang/mono/files/mono-4.8.0.371-makedev.patch b/dev-lang/mono/files/mono-4.8.0.371-makedev.patch
new file mode 100644
index 000000000000..7a4a44b3e72d
--- /dev/null
+++ b/dev-lang/mono/files/mono-4.8.0.371-makedev.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/575232
+diff --git a/configure.ac b/configure.ac
+index fa5977b..2832c69 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -416,6 +416,10 @@ AC_HEADER_STDC
+ AC_LIBTOOL_WIN32_DLL
+ # This causes monodis to not link correctly
+ #AC_DISABLE_FAST_INSTALL
++
++#lookup makedev() header
++AC_HEADER_MAJOR
++
+ AM_PROG_LIBTOOL
+ # Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
+ DOLT
+diff --git a/mono/io-layer/processes.c b/mono/io-layer/processes.c
+index 53c271a..7ff8d03 100644
+--- a/mono/io-layer/processes.c
++++ b/mono/io-layer/processes.c
+@@ -45,6 +45,13 @@
+ #include <utime.h>
+ #endif
+
++/* makedev() macro */
++#ifdef MAJOR_IN_MKDEV
++#include <sys/mkdev.h>
++#elif defined MAJOR_IN_SYSMACROS
++#include <sys/sysmacros.h>
++#endif
++
+ /* sys/resource.h (for rusage) is required when using osx 10.3 (but not 10.4) */
+ #ifdef __APPLE__
+ #include <TargetConditionals.h>
diff --git a/dev-lang/mono/files/mono-4.8.0.371-x86_32.patch b/dev-lang/mono/files/mono-4.8.0.371-x86_32.patch
new file mode 100644
index 000000000000..063ea634fa4c
--- /dev/null
+++ b/dev-lang/mono/files/mono-4.8.0.371-x86_32.patch
@@ -0,0 +1,27 @@
+Native toolchain can default to different ABI (amd64 in bug case).
+Set target to i386.
+https://bugs.gentoo.org/600664
+diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c
+index a1c359f..beaaf76 100644
+--- a/mono/mini/aot-compiler.c
++++ b/mono/mini/aot-compiler.c
+@@ -9842,7 +9842,9 @@ compile_asm (MonoAotCompile *acfg)
+ const char *tool_prefix = acfg->aot_opts.tool_prefix ? acfg->aot_opts.tool_prefix : "";
+ char *ld_flags = acfg->aot_opts.ld_flags ? acfg->aot_opts.ld_flags : g_strdup("");
+
+-#if defined(TARGET_AMD64) && !defined(TARGET_MACH)
++#if defined(TARGET_X86) && !defined(TARGET_MACH)
++#define AS_OPTIONS "--32"
++#elif defined(TARGET_AMD64) && !defined(TARGET_MACH)
+ #define AS_OPTIONS "--64"
+ #elif defined(TARGET_POWERPC64)
+ #define AS_OPTIONS "-a64 -mppc64"
+@@ -9886,6 +9888,8 @@ compile_asm (MonoAotCompile *acfg)
+ #define LD_OPTIONS "--shared"
+ #elif defined(TARGET_POWERPC64)
+ #define LD_OPTIONS "-m elf64ppc"
++#elif defined(TARGET_X86)
++#define LD_OPTIONS "-m elf_i386"
+ #endif
+
+ #ifndef LD_OPTIONS
diff --git a/dev-lang/mono/metadata.xml b/dev-lang/mono/metadata.xml
new file mode 100644
index 000000000000..537ed12badec
--- /dev/null
+++ b/dev-lang/mono/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>dotnet@gentoo.org</email>
+ <name>Gentoo Dotnet Project</name>
+</maintainer>
+<use>
+ <flag name="pax_kernel">Enable if the user plans to run the package under a pax enabled hardened kernel</flag>
+ <flag name="xen">Make mono generate code that is considerably faster on xen VMs but slightly slower on for normal systems.</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-lang/mono/mono-2.10.9-r2.ebuild b/dev-lang/mono/mono-2.10.9-r2.ebuild
new file mode 100644
index 000000000000..f9dbcaeb5f44
--- /dev/null
+++ b/dev-lang/mono/mono-2.10.9-r2.ebuild
@@ -0,0 +1,265 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit linux-info mono eutils flag-o-matic multilib go-mono pax-utils
+
+DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
+HOMEPAGE="http://www.mono-project.com/Main_Page"
+
+LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 x86"
+
+IUSE="minimal pax_kernel xen"
+
+#Bash requirement is for += operator
+COMMONDEPEND="!dev-util/monodoc
+ !minimal? ( =dev-dotnet/libgdiplus-${GO_MONO_REL_PV}* )
+ ia64? ( sys-libs/libunwind )"
+RDEPEND="${COMMONDEPEND}
+ || ( www-client/links www-client/lynx )"
+
+DEPEND="${COMMONDEPEND}
+ sys-devel/bc
+ virtual/yacc
+ >=app-shells/bash-3.2
+ pax_kernel? ( sys-apps/elfix )"
+
+MAKEOPTS="${MAKEOPTS} -j1"
+
+RESTRICT="test"
+
+pkg_setup() {
+ if use kernel_linux
+ then
+ get_version
+ if linux_config_exists
+ then
+ if linux_chkconfig_present SYSVIPC
+ then
+ einfo "CONFIG_SYSVIPC is set, looking good."
+ else
+ eerror "If CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling."
+ eerror "See https://bugs.gentoo.org/261869 for more info."
+ eerror "Please set CONFIG_SYSVIPC in your kernel .config if build fails."
+ fi
+ else
+ ewarn "Was unable to determine your kernel .config"
+ ewarn "Please note that if CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling."
+ ewarn "See https://bugs.gentoo.org/261869 for more info."
+ fi
+ fi
+ PATCHES=( "${FILESDIR}/${PN}-2.10.2-threads-access.patch"
+ "${FILESDIR}/${PN}-2.10.9-CVE-2012-3382.patch"
+ "${FILESDIR}/${PN}-2.10.9-CVE-2012-3543.patch"
+ "${FILESDIR}/${PN}-2.10.9-CVE-2012-3543_2.patch" )
+}
+
+src_prepare() {
+ go-mono_src_prepare
+
+ # we need to sed in the paxctl-ng -mr in the runtime/mono-wrapper.in so it doesn't
+ # get killed in the build process when MPROTECT is enabled. #286280
+ # RANDMMAP kills the build process to #347365
+ # use paxmark.sh to get PT/XT logic #532244
+ if use pax_kernel ; then
+ ewarn "We are disabling MPROTECT on the mono binary."
+ sed '/exec "/ i\paxmark.sh -mr "$r/@mono_runtime@"' -i "${S}"/runtime/mono-wrapper.in || die "Failed to sed mono-wrapper.in"
+ fi
+}
+
+src_configure() {
+ # mono's build system is finiky, strip the flags
+ strip-flags
+
+ # Remove this at your own peril. Mono will barf in unexpected ways.
+ append-flags -fno-strict-aliasing
+
+ # NOTE: We need the static libs for now so mono-debugger works.
+ # See https://bugs.gentoo.org/show_bug.cgi?id=256264 for details
+ #
+ # --without-moonlight since www-plugins/moonlight is not the only one
+ # using mono: https://bugzilla.novell.com/show_bug.cgi?id=641005#c3
+ #
+ # --with-profile4 needs to be always enabled since it's used by default
+ # and, otherwise, problems like bug #340641 appear.
+ #
+ # sgen fails on ppc, bug #359515
+
+ local myconf=""
+ use ppc && myconf="${myconf} --with-sgen=no"
+ go-mono_src_configure \
+ --enable-static \
+ --disable-quiet-build \
+ --without-moonlight \
+ --with-libgdiplus=$(use minimal && printf "no" || printf "installed" ) \
+ $(use_with xen xen_opt) \
+ --without-ikvm-native \
+ --with-jit \
+ --disable-dtrace \
+ --with-profile4 \
+ ${myconf}
+}
+
+src_test() {
+ echo ">>> Test phase [check]: ${CATEGORY}/${PF}"
+
+ export MONO_REGISTRY_PATH="${T}/registry"
+ export XDG_DATA_HOME="${T}/data"
+ export MONO_SHARED_DIR="${T}/shared"
+ export XDG_CONFIG_HOME="${T}/config"
+ export HOME="${T}/home"
+
+ emake -j1 check
+}
+
+src_install() {
+ go-mono_src_install
+
+ # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
+ # mono.spec and http://www.mail-archive.com/mono-devel-list@lists.ximian.com/msg24870.html
+ # for reference.
+ rm -f "${ED}"/usr/$(get_libdir)/mono/2.0/mscorlib.dll.so
+ rm -f "${ED}"/usr/$(get_libdir)/mono/2.0/mcs.exe.so
+}
+
+#THINK!!!! Before touching postrm and postinst
+#Reference phase order:
+#pkg_preinst
+#pkg_prerm
+#pkg_postrm
+#pkg_postinst
+
+pkg_preinst() {
+ local symlink
+ local NUNIT_DIR="/usr/$(get_libdir)/mono/nunit"
+ local pv_atom
+ if [[ "$(readlink "${ROOT}"/${NUNIT_DIR})" == *"mono-nunit"* ]]
+ then
+ for pv_atom in 2.2{,-r1,-r2,-r3,-r4} '2.4_pre*' '2.4_rc*' 2.4
+ do
+ if has_version "=dev-lang/mono-${pv_atom}"
+ then
+ einfo "If you just received a file collision warning message,"
+ einfo "be advised that this is a known problem, which will now be fixed:"
+ ebegin "Found broken symlinks created by $(best_version dev-lang/mono), fixing"
+ for symlink in \
+ "${ROOT}/${NUNIT_DIR}" \
+ "${ROOT}/usr/$(get_libdir)/pkgconfig/nunit.pc" \
+ "${ROOT}/usr/bin/nunit-console" \
+ "${ROOT}/usr/bin/nunit-console2"
+ do
+ if [[ -L "${symlink}" ]]
+ then
+ rm -f "${symlink}" &> /dev/null
+ fi
+ done
+ eend 0
+ break
+ fi
+ done
+ fi
+}
+
+#pkg_postinst() {
+# elog "PLEASE TAKE NOTE!"
+# elog ""
+# elog "Some of the namespaces supported by Mono require extra packages to be installed."
+# elog "Below is a list of namespaces and the corresponding package you must install:"
+# elog ""
+# elog ">=x11-libs/cairo-1.6.4"
+# elog " Mono.Cairo"
+# elog "Also read:"
+# elog "http://www.mono-project.com/Mono.Cairo"
+# elog ""
+# elog ">=dev-db/firebird-2.0.4.13130.1"
+# elog " FirebirdSql.Data.Firebird"
+# elog "Also read:"
+# elog "http://www.mono-project.com/Firebird_Interbase"
+# elog ""
+# elog "dev-db/sqlite:3"
+# elog " Mono.Data.Sqlite"
+# elog "Also read:"
+# elog "http://www.mono-project.com/SQLite"
+# elog ""
+# elog ">=dev-db/oracle-instantclient-basic-10.2"
+# elog " System.Data.OracleClient"
+# elog "Also read:"
+# elog "http://www.mono-project.com/Oracle"
+# elog ""
+# elog "Mono also has support for packages that are not included in portage:"
+# elog ""
+# elog "No ebuild available:"
+# elog " IBM.Data.DB2"
+# elog "Also read: http://www.mono-project.com/IBM_DB2"
+# elog ""
+# elog "No ebuild needed:"
+# elog " Mono.Data.SybaseClient"
+# elog "Also read: http://www.mono-project.com/Sybase"
+#}
+
+# NOTICE: THE COPYRIGHT FILES IN THE TARBALL ARE UNCLEAR!
+# WHENEVER YOU THINK SOMETHING IS GPL-2+, IT'S ONLY GPL-2
+# UNLESS MIGUEL DE ICAZA HIMSELF SAYS OTHERWISE.
+
+# mono
+# The code we use is LGPL, but contributions must be made under the MIT/X11
+# license, so Novell can serve its paying customers. Exception is mono/man.
+# LICENSE="LGPL-2.1"
+
+ # mono/man
+ # LICENSE="MIT"
+
+# mcs/mcs
+# mcs/gmcs
+# LICENSE="GPL-2 MIT"
+
+# tests
+# LICENSE="MIT"
+
+# mcs/class
+# Except the listed exceptions:
+# LICENSE="MIT"
+
+ # mcs/class/ByteFX.Data
+ # mcs/class/Npgsql
+ # LICENSE="LGPL-2.1"
+
+ # mcs/class/FirebirdSql.Data.Firebird
+ # LICENSE="IDPL"
+
+ # mcs/class/ICSharpCode.SharpZipLib
+ # LICENSE="GPL-2-with-linking-exception"
+
+ # mcs/class/MicrosoftAjaxLibrary
+ # LICENSE="Ms-Pl"
+
+ # mcs/class/Microsoft.JScript/Microsoft.JScript/TokenStream.cs
+ # mcs/class/Microsoft.JScript/Microsoft.JScript/Token.cs
+ # mcs/class/Microsoft.JScript/Microsoft.JScript/Parser.cs
+ # mcs/class/Microsoft.JScript/Microsoft.JScript/Decompiler.cs
+ # LICENSE="|| ( NPL-1.1 GPL-2 )"
+
+# mcs/jay
+# LICENSE="BSD-4"
+
+# mcs/tools
+# Except the listed exceptions:
+# LICENSE="MIT"
+
+ # mcs/tools/mdoc/Mono.Documentation/monodocs2html.cs
+ # LICENSE="GPL-2"
+
+ # mcs/tools/sqlsharp/SqlSharpCli.cs
+ # LICENSE="GPL-2"
+
+ # mcs/tools/csharp/repl.cs
+ # LICENSE="|| ( MIT GPL-2 )"
+
+ # mcs/tools/mono-win32-setup.nsi
+ # LICENSE="GPL-2"
+
+# samples
+# LICENSE="MIT"
diff --git a/dev-lang/mono/mono-4.4.1.0.ebuild b/dev-lang/mono/mono-4.4.1.0.ebuild
new file mode 100644
index 000000000000..328ec0684726
--- /dev/null
+++ b/dev-lang/mono/mono-4.4.1.0.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils linux-info mono-env flag-o-matic pax-utils versionator multilib-minimal
+
+DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
+HOMEPAGE="http://www.mono-project.com/Main_Page"
+SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
+SLOT="0"
+
+KEYWORDS="amd64 ppc ~ppc64 x86 ~amd64-linux"
+
+IUSE="nls minimal pax_kernel xen doc"
+
+COMMONDEPEND="
+ !minimal? ( >=dev-dotnet/libgdiplus-2.10 )
+ ia64? ( sys-libs/libunwind )
+ nls? ( sys-devel/gettext )
+"
+RDEPEND="${COMMONDEPEND}
+ || ( www-client/links www-client/lynx )
+"
+DEPEND="${COMMONDEPEND}
+ sys-devel/bc
+ virtual/yacc
+ pax_kernel? ( sys-apps/elfix )
+ !dev-lang/mono-basic
+"
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+pkg_pretend() {
+ # https://github.com/gentoo/gentoo/blob/f200e625bda8de696a28338318c9005b69e34710/eclass/linux-info.eclass#L686
+ # If CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling.
+ # See http://bugs.gentoo.org/261869 for more info."
+ CONFIG_CHECK="SYSVIPC"
+ use kernel_linux && check_extra_config
+}
+
+pkg_setup() {
+ linux-info_pkg_setup
+ mono-env_pkg_setup
+}
+
+src_prepare() {
+ # we need to sed in the paxctl-ng -mr in the runtime/mono-wrapper.in so it don't
+ # get killed in the build proces when MPROTECT is enable. #286280
+ # RANDMMAP kill the build proces to #347365
+ # use paxmark.sh to get PT/XT logic #532244
+ if use pax_kernel ; then
+ ewarn "We are disabling MPROTECT on the mono binary."
+
+ # issue 9 : https://github.com/Heather/gentoo-dotnet/issues/9
+ sed '/exec "/ i\paxmark.sh -mr "$r/@mono_runtime@"' -i "${S}"/runtime/mono-wrapper.in || die "Failed to sed mono-wrapper.in"
+ fi
+
+ # mono build system can fail otherwise
+ strip-flags
+
+ # Fix VB targets
+ # http://osdir.com/ml/general/2015-05/msg20808.html
+ #eapply "${FILESDIR}/add_missing_vb_portable_targets.patch"
+
+ # Fix build when sgen disabled
+ # https://bugzilla.xamarin.com/show_bug.cgi?id=32015
+ #eapply "${FILESDIR}/${PN}-4.0.2.5-fix-mono-dis-makefile-am-when-without-sgen.patch"
+
+ # TODO: update patch
+ # Fix atomic_add_i4 support for 32-bit ppc
+ # https://github.com/mono/mono/compare/f967c79926900343f399c75624deedaba460e544^...8f379f0c8f98493180b508b9e68b9aa76c0c5bdf
+ #epatch "${FILESDIR}/${PN}-4.0.2.5-fix-ppc-atomic-add-i4.patch"
+
+ # TODO: update patch
+ #epatch "${FILESDIR}/systemweb3.patch"
+ #epatch "${FILESDIR}/fix-for-GitExtensions-issue-2710-another-resolution.patch"
+ #epatch "${FILESDIR}/fix-for-bug36724.patch"
+
+ default
+ #eapply_user
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --disable-silent-rules
+ $(use_with xen xen_opt)
+ --without-ikvm-native
+ --disable-dtrace
+ $(use_with doc mcs-docs)
+ $(use_enable nls)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+ cd mcs/tests || die
+ emake check
+}
+
+multilib_src_install() {
+ default_src_install
+
+ # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
+ # mono.spec and http://www.mail-archive.com/mono-devel-list@lists.ximian.com/msg24870.html
+ # for reference.
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mscorlib.dll.so || die
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so || die
+}
diff --git a/dev-lang/mono/mono-4.6.1.5-r1.ebuild b/dev-lang/mono/mono-4.6.1.5-r1.ebuild
new file mode 100644
index 000000000000..d6fef0101972
--- /dev/null
+++ b/dev-lang/mono/mono-4.6.1.5-r1.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils linux-info mono-env flag-o-matic pax-utils versionator multilib-minimal
+
+DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
+HOMEPAGE="http://www.mono-project.com/Main_Page"
+SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
+SLOT="0"
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux"
+
+IUSE="nls minimal pax_kernel xen doc"
+
+COMMONDEPEND="
+ !minimal? ( >=dev-dotnet/libgdiplus-2.10 )
+ ia64? ( sys-libs/libunwind )
+ nls? ( sys-devel/gettext )
+"
+RDEPEND="${COMMONDEPEND}
+ || ( www-client/links www-client/lynx )
+"
+DEPEND="${COMMONDEPEND}
+ sys-devel/bc
+ virtual/yacc
+ pax_kernel? ( sys-apps/elfix )
+ !dev-lang/mono-basic
+"
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+pkg_pretend() {
+ linux-info_pkg_setup
+ if use kernel_linux; then
+ if linux_config_exists; then
+ linux_chkconfig_builtin SYSVIPC || die "SYSVIPC not enabled in the kernel"
+ else
+ # https://github.com/gentoo/gentoo/blob/f200e625bda8de696a28338318c9005b69e34710/eclass/linux-info.eclass#L686
+ ewarn "kernel config not found"
+ ewarn "If CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling."
+ ewarn "See http://bugs.gentoo.org/261869 for more info."
+ fi
+ fi
+}
+
+pkg_setup() {
+ mono-env_pkg_setup
+}
+
+src_prepare() {
+ # we need to sed in the paxctl-ng -mr in the runtime/mono-wrapper.in so it don't
+ # get killed in the build proces when MPROTECT is enable. #286280
+ # RANDMMAP kill the build proces to #347365
+ # use paxmark.sh to get PT/XT logic #532244
+ if use pax_kernel ; then
+ ewarn "We are disabling MPROTECT on the mono binary."
+
+ # issue 9 : https://github.com/Heather/gentoo-dotnet/issues/9
+ sed '/exec "/ i\paxmark.sh -mr "$r/@mono_runtime@"' -i "${S}"/runtime/mono-wrapper.in || die "Failed to sed mono-wrapper.in"
+ fi
+
+ # mono build system can fail otherwise
+ strip-flags
+
+ # Fix VB targets
+ # http://osdir.com/ml/general/2015-05/msg20808.html
+ #eapply "${FILESDIR}/add_missing_vb_portable_targets.patch"
+
+ # Fix build when sgen disabled
+ # https://bugzilla.xamarin.com/show_bug.cgi?id=32015
+ #eapply "${FILESDIR}/${PN}-4.0.2.5-fix-mono-dis-makefile-am-when-without-sgen.patch"
+
+ # TODO: update patch
+ # Fix atomic_add_i4 support for 32-bit ppc
+ # https://github.com/mono/mono/compare/f967c79926900343f399c75624deedaba460e544^...8f379f0c8f98493180b508b9e68b9aa76c0c5bdf
+ #epatch "${FILESDIR}/${PN}-4.0.2.5-fix-ppc-atomic-add-i4.patch"
+
+ # TODO: update patch
+ #epatch "${FILESDIR}/systemweb3.patch"
+ #epatch "${FILESDIR}/fix-for-GitExtensions-issue-2710-another-resolution.patch"
+ #epatch "${FILESDIR}/fix-for-bug36724.patch"
+
+ default
+ #eapply_user
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --disable-silent-rules
+ $(use_with xen xen_opt)
+ --without-ikvm-native
+ --disable-dtrace
+ $(use_with doc mcs-docs)
+ $(use_enable nls)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+ cd mcs/tests || die
+ emake check
+}
+
+multilib_src_install() {
+ default_src_install
+
+ # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
+ # mono.spec and http://www.mail-archive.com/mono-devel-list@lists.ximian.com/msg24870.html
+ # for reference.
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mscorlib.dll.so || die
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so || die
+}
diff --git a/dev-lang/mono/mono-4.6.1.5.ebuild b/dev-lang/mono/mono-4.6.1.5.ebuild
new file mode 100644
index 000000000000..d43556908284
--- /dev/null
+++ b/dev-lang/mono/mono-4.6.1.5.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils linux-info mono-env flag-o-matic pax-utils versionator multilib-minimal
+
+DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
+HOMEPAGE="http://www.mono-project.com/Main_Page"
+SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
+SLOT="0"
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux"
+
+IUSE="nls minimal pax_kernel xen doc"
+
+COMMONDEPEND="
+ !minimal? ( >=dev-dotnet/libgdiplus-2.10 )
+ ia64? ( sys-libs/libunwind )
+ nls? ( sys-devel/gettext )
+"
+RDEPEND="${COMMONDEPEND}
+ || ( www-client/links www-client/lynx )
+"
+DEPEND="${COMMONDEPEND}
+ sys-devel/bc
+ virtual/yacc
+ pax_kernel? ( sys-apps/elfix )
+ !dev-lang/mono-basic
+"
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+pkg_pretend() {
+ # https://github.com/gentoo/gentoo/blob/f200e625bda8de696a28338318c9005b69e34710/eclass/linux-info.eclass#L686
+ # If CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling.
+ # See http://bugs.gentoo.org/261869 for more info."
+ CONFIG_CHECK="SYSVIPC"
+ use kernel_linux && check_extra_config
+}
+
+pkg_setup() {
+ linux-info_pkg_setup
+ mono-env_pkg_setup
+}
+
+src_prepare() {
+ # we need to sed in the paxctl-ng -mr in the runtime/mono-wrapper.in so it don't
+ # get killed in the build proces when MPROTECT is enable. #286280
+ # RANDMMAP kill the build proces to #347365
+ # use paxmark.sh to get PT/XT logic #532244
+ if use pax_kernel ; then
+ ewarn "We are disabling MPROTECT on the mono binary."
+
+ # issue 9 : https://github.com/Heather/gentoo-dotnet/issues/9
+ sed '/exec "/ i\paxmark.sh -mr "$r/@mono_runtime@"' -i "${S}"/runtime/mono-wrapper.in || die "Failed to sed mono-wrapper.in"
+ fi
+
+ # mono build system can fail otherwise
+ strip-flags
+
+ # Fix VB targets
+ # http://osdir.com/ml/general/2015-05/msg20808.html
+ #eapply "${FILESDIR}/add_missing_vb_portable_targets.patch"
+
+ # Fix build when sgen disabled
+ # https://bugzilla.xamarin.com/show_bug.cgi?id=32015
+ #eapply "${FILESDIR}/${PN}-4.0.2.5-fix-mono-dis-makefile-am-when-without-sgen.patch"
+
+ # TODO: update patch
+ # Fix atomic_add_i4 support for 32-bit ppc
+ # https://github.com/mono/mono/compare/f967c79926900343f399c75624deedaba460e544^...8f379f0c8f98493180b508b9e68b9aa76c0c5bdf
+ #epatch "${FILESDIR}/${PN}-4.0.2.5-fix-ppc-atomic-add-i4.patch"
+
+ # TODO: update patch
+ #epatch "${FILESDIR}/systemweb3.patch"
+ #epatch "${FILESDIR}/fix-for-GitExtensions-issue-2710-another-resolution.patch"
+ #epatch "${FILESDIR}/fix-for-bug36724.patch"
+
+ default
+ #eapply_user
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --disable-silent-rules
+ $(use_with xen xen_opt)
+ --without-ikvm-native
+ --disable-dtrace
+ $(use_with doc mcs-docs)
+ $(use_enable nls)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+ cd mcs/tests || die
+ emake check
+}
+
+multilib_src_install() {
+ default_src_install
+
+ # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
+ # mono.spec and http://www.mail-archive.com/mono-devel-list@lists.ximian.com/msg24870.html
+ # for reference.
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mscorlib.dll.so || die
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so || die
+}
diff --git a/dev-lang/mono/mono-4.8.0.425.ebuild b/dev-lang/mono/mono-4.8.0.425.ebuild
new file mode 100644
index 000000000000..712f239c13c0
--- /dev/null
+++ b/dev-lang/mono/mono-4.8.0.425.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils linux-info mono-env flag-o-matic pax-utils versionator multilib-minimal
+
+DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
+HOMEPAGE="http://www.mono-project.com/Main_Page"
+SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
+SLOT="0"
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux"
+
+IUSE="nls minimal pax_kernel xen doc"
+
+COMMONDEPEND="
+ !minimal? ( >=dev-dotnet/libgdiplus-2.10 )
+ ia64? ( sys-libs/libunwind )
+ nls? ( sys-devel/gettext )
+"
+RDEPEND="${COMMONDEPEND}
+ || ( www-client/links www-client/lynx )
+"
+DEPEND="${COMMONDEPEND}
+ sys-devel/bc
+ virtual/yacc
+ pax_kernel? ( sys-apps/elfix )
+ dev-util/cmake
+ !dev-lang/mono-basic
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.8.0.371-makedev.patch
+ "${FILESDIR}"/${PN}-4.8.0.371-x86_32.patch
+)
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+pkg_pretend() {
+ linux-info_pkg_setup
+ if use kernel_linux; then
+ if linux_config_exists; then
+ linux_chkconfig_builtin SYSVIPC || die "SYSVIPC not enabled in the kernel"
+ else
+ # https://github.com/gentoo/gentoo/blob/f200e625bda8de696a28338318c9005b69e34710/eclass/linux-info.eclass#L686
+ ewarn "kernel config not found"
+ ewarn "If CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling."
+ ewarn "See http://bugs.gentoo.org/261869 for more info."
+ fi
+ fi
+}
+
+pkg_setup() {
+ mono-env_pkg_setup
+}
+
+src_prepare() {
+ # we need to sed in the paxctl-ng -mr in the runtime/mono-wrapper.in so it don't
+ # get killed in the build proces when MPROTECT is enable. #286280
+ # RANDMMAP kill the build proces to #347365
+ # use paxmark.sh to get PT/XT logic #532244
+ if use pax_kernel ; then
+ ewarn "We are disabling MPROTECT on the mono binary."
+
+ # issue 9 : https://github.com/Heather/gentoo-dotnet/issues/9
+ sed '/exec "/ i\paxmark.sh -mr "$r/@mono_runtime@"' -i "${S}"/runtime/mono-wrapper.in || die "Failed to sed mono-wrapper.in"
+ fi
+
+ # mono build system can fail otherwise
+ strip-flags
+
+ #TODO: resolve problem with newer binutils
+ #bug: https://bugs.gentoo.org/show_bug.cgi?id=600664
+ #append-flags -fPIC
+
+ default
+ # PATCHES contains configure.ac patch
+ eautoreconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --disable-silent-rules
+ $(use_with xen xen_opt)
+ --without-ikvm-native
+ --disable-dtrace
+ $(use_with doc mcs-docs)
+ $(use_enable nls)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+ cd mcs/tests || die
+ emake check
+}
+
+multilib_src_install() {
+ default_src_install
+
+ # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
+ # mono.spec and http://www.mail-archive.com/mono-devel-list@lists.ximian.com/msg24870.html
+ # for reference.
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mscorlib.dll.so || die
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so || die
+}
diff --git a/dev-lang/mono/mono-4.8.0.495.ebuild b/dev-lang/mono/mono-4.8.0.495.ebuild
new file mode 100644
index 000000000000..712f239c13c0
--- /dev/null
+++ b/dev-lang/mono/mono-4.8.0.495.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils linux-info mono-env flag-o-matic pax-utils versionator multilib-minimal
+
+DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
+HOMEPAGE="http://www.mono-project.com/Main_Page"
+SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
+SLOT="0"
+
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux"
+
+IUSE="nls minimal pax_kernel xen doc"
+
+COMMONDEPEND="
+ !minimal? ( >=dev-dotnet/libgdiplus-2.10 )
+ ia64? ( sys-libs/libunwind )
+ nls? ( sys-devel/gettext )
+"
+RDEPEND="${COMMONDEPEND}
+ || ( www-client/links www-client/lynx )
+"
+DEPEND="${COMMONDEPEND}
+ sys-devel/bc
+ virtual/yacc
+ pax_kernel? ( sys-apps/elfix )
+ dev-util/cmake
+ !dev-lang/mono-basic
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.8.0.371-makedev.patch
+ "${FILESDIR}"/${PN}-4.8.0.371-x86_32.patch
+)
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+pkg_pretend() {
+ linux-info_pkg_setup
+ if use kernel_linux; then
+ if linux_config_exists; then
+ linux_chkconfig_builtin SYSVIPC || die "SYSVIPC not enabled in the kernel"
+ else
+ # https://github.com/gentoo/gentoo/blob/f200e625bda8de696a28338318c9005b69e34710/eclass/linux-info.eclass#L686
+ ewarn "kernel config not found"
+ ewarn "If CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling."
+ ewarn "See http://bugs.gentoo.org/261869 for more info."
+ fi
+ fi
+}
+
+pkg_setup() {
+ mono-env_pkg_setup
+}
+
+src_prepare() {
+ # we need to sed in the paxctl-ng -mr in the runtime/mono-wrapper.in so it don't
+ # get killed in the build proces when MPROTECT is enable. #286280
+ # RANDMMAP kill the build proces to #347365
+ # use paxmark.sh to get PT/XT logic #532244
+ if use pax_kernel ; then
+ ewarn "We are disabling MPROTECT on the mono binary."
+
+ # issue 9 : https://github.com/Heather/gentoo-dotnet/issues/9
+ sed '/exec "/ i\paxmark.sh -mr "$r/@mono_runtime@"' -i "${S}"/runtime/mono-wrapper.in || die "Failed to sed mono-wrapper.in"
+ fi
+
+ # mono build system can fail otherwise
+ strip-flags
+
+ #TODO: resolve problem with newer binutils
+ #bug: https://bugs.gentoo.org/show_bug.cgi?id=600664
+ #append-flags -fPIC
+
+ default
+ # PATCHES contains configure.ac patch
+ eautoreconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --disable-silent-rules
+ $(use_with xen xen_opt)
+ --without-ikvm-native
+ --disable-dtrace
+ $(use_with doc mcs-docs)
+ $(use_enable nls)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+ cd mcs/tests || die
+ emake check
+}
+
+multilib_src_install() {
+ default_src_install
+
+ # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
+ # mono.spec and http://www.mail-archive.com/mono-devel-list@lists.ximian.com/msg24870.html
+ # for reference.
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mscorlib.dll.so || die
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so || die
+}
diff --git a/dev-lang/mono/mono-4.8.0.524.ebuild b/dev-lang/mono/mono-4.8.0.524.ebuild
new file mode 100644
index 000000000000..ea9bd74a3b43
--- /dev/null
+++ b/dev-lang/mono/mono-4.8.0.524.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils linux-info mono-env flag-o-matic pax-utils versionator multilib-minimal
+
+DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
+HOMEPAGE="http://www.mono-project.com/Main_Page"
+SRC_URI="http://download.mono-project.com/sources/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
+SLOT="0"
+
+KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux"
+
+IUSE="nls minimal pax_kernel xen doc"
+
+COMMONDEPEND="
+ !minimal? ( >=dev-dotnet/libgdiplus-2.10 )
+ ia64? ( sys-libs/libunwind )
+ nls? ( sys-devel/gettext )
+"
+RDEPEND="${COMMONDEPEND}
+ || ( www-client/links www-client/lynx )
+"
+DEPEND="${COMMONDEPEND}
+ sys-devel/bc
+ virtual/yacc
+ pax_kernel? ( sys-apps/elfix )
+ dev-util/cmake
+ !dev-lang/mono-basic
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.8.0.371-makedev.patch
+ "${FILESDIR}"/${PN}-4.8.0.371-x86_32.patch
+)
+
+S="${WORKDIR}/${PN}-$(get_version_component_range 1-3)"
+
+pkg_pretend() {
+ linux-info_pkg_setup
+ if use kernel_linux; then
+ if linux_config_exists; then
+ linux_chkconfig_builtin SYSVIPC || die "SYSVIPC not enabled in the kernel"
+ else
+ # https://github.com/gentoo/gentoo/blob/f200e625bda8de696a28338318c9005b69e34710/eclass/linux-info.eclass#L686
+ ewarn "kernel config not found"
+ ewarn "If CONFIG_SYSVIPC is not set in your kernel .config, mono will hang while compiling."
+ ewarn "See http://bugs.gentoo.org/261869 for more info."
+ fi
+ fi
+}
+
+pkg_setup() {
+ mono-env_pkg_setup
+}
+
+src_prepare() {
+ # we need to sed in the paxctl-ng -mr in the runtime/mono-wrapper.in so it don't
+ # get killed in the build proces when MPROTECT is enable. #286280
+ # RANDMMAP kill the build proces to #347365
+ # use paxmark.sh to get PT/XT logic #532244
+ if use pax_kernel ; then
+ ewarn "We are disabling MPROTECT on the mono binary."
+
+ # issue 9 : https://github.com/Heather/gentoo-dotnet/issues/9
+ sed '/exec "/ i\paxmark.sh -mr "$r/@mono_runtime@"' -i "${S}"/runtime/mono-wrapper.in || die "Failed to sed mono-wrapper.in"
+ fi
+
+ # mono build system can fail otherwise
+ strip-flags
+
+ #TODO: resolve problem with newer binutils
+ #bug: https://bugs.gentoo.org/show_bug.cgi?id=600664
+ #append-flags -fPIC
+
+ default
+ # PATCHES contains configure.ac patch
+ eautoreconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --disable-silent-rules
+ $(use_with xen xen_opt)
+ --without-ikvm-native
+ --disable-dtrace
+ $(use_with doc mcs-docs)
+ $(use_enable nls)
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+multilib_src_test() {
+ cd mcs/tests || die
+ emake check
+}
+
+multilib_src_install() {
+ default_src_install
+
+ # Remove files not respecting LDFLAGS and that we are not supposed to provide, see Fedora
+ # mono.spec and http://www.mail-archive.com/mono-devel-list@lists.ximian.com/msg24870.html
+ # for reference.
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mscorlib.dll.so || die
+ rm -f "${ED}"/usr/lib/mono/{2.0,4.5}/mcs.exe.so || die
+}
diff --git a/dev-lang/mozart-stdlib/Manifest b/dev-lang/mozart-stdlib/Manifest
new file mode 100644
index 000000000000..40d1567d7aef
--- /dev/null
+++ b/dev-lang/mozart-stdlib/Manifest
@@ -0,0 +1,7 @@
+AUX mozart-stdlib-1.4.0-docroot.patch 770 SHA256 7f4b504a61e0b2df92bc6aa134d0b0ac544f15aeab10d8541df6417a26a88c3c SHA512 5d506dedb42194083afe56c3a22f3653fef1616f69956c8e11de3aa592d29e95d45de507cc630007c0c29970d21b7dbc12bb34b74f33ada255578054d9dbe731 WHIRLPOOL c12e3ac32f38f0f7cc01872c75b1d5eb2175fde55b9ed5f5adda66856cc59c188044baa4311ece8f5d6684a6d8fe7e375034306aac04652d54081f15649aeb7b
+AUX mozart-stdlib-1.4.0-ozload.patch 719 SHA256 c8feef6d8ed8e2e6ab66647f4a1b80b5a1787732fa51f869a728a7e1c838e5a6 SHA512 08ad85533a6aaa846c3fcb3839f319890084d32d39439b2aa432cbcc39e1483201abed0716d3d2eff4d3d5c03ca1916dc6ffec6882110b625cdc549626b262b2 WHIRLPOOL 2883e8476493bc474eb9e9d10beaa27f4c52ff61c2bb4aa76aed36e5975dba8b216687792294cc200a104dd7fd90bfffb8a8c65b8fb667e79bfe1e099bc063f3
+DIST mozart-1.4.0.20080704-std.tar.gz 1305359 SHA256 c94ca56d68aeb506e1454e14aaf6f3347005060e054cde5f82d62ed5e58cff39 SHA512 5b9d9811d739c3533b7f1fa98757d842b506d58a3fd5d89ee2c1d9c036b3130f152da05b19036c8c1609057e361d71b106a728afea47140ebab3b4fc82441aed WHIRLPOOL 8b7034d1d721533e2c563839e6345edce56a413d1e929639454c4720119ec8d89a320f45302cabf778fcb64e4c9fa3c2d6c7a2b0ab7955675a6494562a2098e5
+EBUILD mozart-stdlib-1.4.0-r1.ebuild 895 SHA256 8d60a78ddef50675bfeba00b81a9a21e302ce868d77d20880c79a848889853ca SHA512 d9e3a4e41c20822e227143cdf9fce9160f669aded0be38464431760bdce3decf58494bc4c0f95960b92aeeebfd9cd153e690eec1c0d7bd6ff3f70e8c86418ff2 WHIRLPOOL 2edd71bfeecc3a4c06e02c78f171bea040eefc7391ff3ce9717f5c4e4f9bb79b438856af40029fd9d9c4a46617e16b80275455f4ea5478621ee9c76abcac4e8b
+MISC ChangeLog 2721 SHA256 607489fb5fc83bba3c5aba1791cc2aa01d1d432318a13494730ca6960fe72056 SHA512 39868a0434c812f36c61ea8c93ac7b4c8a392c1b98c91aa13e0bea8f4d01941bc3902ebf08f22e66451d2db9558f8ce5b9b61ecb7e56cb0cf6713bc4456f3cdc WHIRLPOOL af5b53a8ccc1f6a4c7dee130311f2a64756c54b163ae715b0971f2696c80d995d195e4669b8d70c8345004ad88fe2c764ab249326481dabf15b2a298eda40bf6
+MISC ChangeLog-2015 2664 SHA256 01650b5e58e188fa6247e839a18db0b66140b8276f2f785951c96638b8d1e81c SHA512 e326d9ed87ef7d768ea38906adf5c5f0deef22e8e35b5790ff19e3c70c2ea90df87f294ac1b31520ab0c635d2e9c748704ae94937400d590d0ef0269501a1d05 WHIRLPOOL da3d70d033e44a3e9a3a5a4e451409523c120bce1498cbfeff550ec91e1c0acced57e9cdb7803fe77794aa59196fd4590de0a04287cdbb4e9b7b881c69a8c5de
+MISC metadata.xml 240 SHA256 9f29aeb8bcf21ea7557e7dfa496635c23e7ec764c7cfa0056e6ea3097c872d1c SHA512 7cd99ce62ca4f9307fa7dfdbfd0ff9d8ff7485c58cd08cd684065aca4b570f8655587425f6a240453a9e86452de41f26f8b82aa81c023764d0beb47daa1b15d3 WHIRLPOOL 38fdadd29270b880b2e31e022ab3f5d3b7c1c340097575662735fc48a7b7d290a33f5485d86cab077c0480f2beb7f2bcb172579bb27bc672a5c0885fce869cfc
diff --git a/dev-lang/mozart-stdlib/files/mozart-stdlib-1.4.0-docroot.patch b/dev-lang/mozart-stdlib/files/mozart-stdlib-1.4.0-docroot.patch
new file mode 100644
index 000000000000..f4102a47b272
--- /dev/null
+++ b/dev-lang/mozart-stdlib/files/mozart-stdlib-1.4.0-docroot.patch
@@ -0,0 +1,13 @@
+--- mozart-1.4.0.20080704-std.orig/Makefile.in 2004-05-19 02:22:05.000000000 +1200
++++ mozart-1.4.0.20080704-std/Makefile.in 2010-11-20 13:33:30.000000000 +1300
+@@ -25,8 +25,8 @@
+ cd ozmake && $(MAKE) ozmake.ozf
+
+ install: all
+- $(OZENGINE) ozmake/ozmake.ozf --prefix=$(CYG_PREFIX) --srcdir=$(CYG_SRCDIR) --install --nosavedb
+- $(OZENGINE) ozmake/ozmake.ozf --prefix=$(CYG_PREFIX) --srcdir=$(CYG_SRCDIR)/ozmake --builddir=$(CYG_BUILDDIR_OZMAKE) --install --nosavedb
++ $(OZENGINE) ozmake/ozmake.ozf --prefix=$(CYG_PREFIX) --srcdir=$(CYG_SRCDIR) --docroot=$(DOCROOT) --install --nosavedb
++ $(OZENGINE) ozmake/ozmake.ozf --prefix=$(CYG_PREFIX) --srcdir=$(CYG_SRCDIR)/ozmake --builddir=$(CYG_BUILDDIR_OZMAKE) --docroot=$(DOCROOT) --install --nosavedb
+
+ export CLEANDIR
+
diff --git a/dev-lang/mozart-stdlib/files/mozart-stdlib-1.4.0-ozload.patch b/dev-lang/mozart-stdlib/files/mozart-stdlib-1.4.0-ozload.patch
new file mode 100644
index 000000000000..6cdc6153f6e3
--- /dev/null
+++ b/dev-lang/mozart-stdlib/files/mozart-stdlib-1.4.0-ozload.patch
@@ -0,0 +1,13 @@
+--- mozart-1.4.0.20080704-std.orig/ozmake/Makefile.in 2004-04-01 00:52:55.000000000 +1200
++++ mozart-1.4.0.20080704-std/ozmake/Makefile.in 2008-07-06 19:56:25.000000000 +1200
+@@ -37,8 +37,8 @@
+
+ # these additional 2 lines makes it possible to build in a directory
+ # different from the source directory
+-OZLOAD = prefix=$(CYGSRCDIR)=$(CYGBUILDDIR)$(OZLOADSEP)root=$(CYGBUILDDIR)$(OZLOADSEP)root=$(CYGSRCDIR)$(OZLOADSEP)cache=~/.oz/cache$(OZLOADSEP)cache=$(OZHOME)/cache
+-export OZLOAD
++#OZLOAD = prefix=$(CYGSRCDIR)=$(CYGBUILDDIR)$(OZLOADSEP)root=$(CYGBUILDDIR)$(OZLOADSEP)root=$(CYGSRCDIR)$(OZLOADSEP)cache=~/.oz/cache$(OZLOADSEP)cache=$(OZHOME)/cache
++#export OZLOAD
+
+ XSLTPROC = @VAR_XSLTPROC@
+ LYNX = @VAR_LYNX@
diff --git a/dev-lang/mozart-stdlib/metadata.xml b/dev-lang/mozart-stdlib/metadata.xml
new file mode 100644
index 000000000000..c301cedb922a
--- /dev/null
+++ b/dev-lang/mozart-stdlib/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>keri@gentoo.org</email>
+ <name>Keri Harris</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-lang/mozart-stdlib/mozart-stdlib-1.4.0-r1.ebuild b/dev-lang/mozart-stdlib/mozart-stdlib-1.4.0-r1.ebuild
new file mode 100644
index 000000000000..53c6e040555f
--- /dev/null
+++ b/dev-lang/mozart-stdlib/mozart-stdlib-1.4.0-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="2"
+
+inherit eutils
+
+MY_P="mozart-${PV}.20080704-std"
+
+DESCRIPTION="The Mozart Standard Library"
+HOMEPAGE="http://www.mozart-oz.org/"
+SRC_URI="http://www.mozart-oz.org/download/mozart-ftp/store/1.4.0-2008-07-02-tar/mozart-1.4.0.20080704-std.tar.gz"
+LICENSE="Mozart"
+
+SLOT="0"
+KEYWORDS="-amd64 ppc -ppc64 x86"
+IUSE=""
+
+DEPEND="dev-lang/mozart"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ozload.patch
+ epatch "${FILESDIR}"/${P}-docroot.patch
+}
+
+src_install() {
+ emake \
+ PREFIX="${D}"/usr/lib/mozart \
+ DOCROOT="${D}"/usr/share/doc/${PF} \
+ install || die "emake install failed"
+
+ dosym /usr/lib/mozart/bin/ozmake /usr/bin/ozmake || die
+
+ doman ozmake/ozmake.1 || die
+ docinto mozart-ozmake
+ dodoc ozmake/{DESIGN,NOTES,README} || die
+}
diff --git a/dev-lang/mozart/Manifest b/dev-lang/mozart/Manifest
new file mode 100644
index 000000000000..d760a7898538
--- /dev/null
+++ b/dev-lang/mozart/Manifest
@@ -0,0 +1,8 @@
+AUX 50mozart-gentoo.el 482 SHA256 0e008cf41eb34bf0d679215c08aeb6b8beb5c1466f62a1af490525e07bad8731 SHA512 d9319273051e3d485e35af29710a3df1b7bd66f47ec7ee60cf37af364ec2dbe42d6507ed573d39577479a6c58ba2f15c52052b32d37371ea0b5aebf39bd46bbf WHIRLPOOL 6272f02f761bac06079d1fedb80d48c72466d85cbe38238e78b6c199bd3915d63e6cee30e66c45611e9d19f15e5617a8be259539041052bcae8eb551b664986a
+DIST mozart-1.4.0-gentoo-patchset-5.tar.gz 24700 SHA256 7ab555ea5345d6a2d5b89b4112fde11ef5be9e9bc9c05b1d84bb54d1f115993b SHA512 99db9bf62682fd306c4b665d99ab3b48a787c26230d5e8db2e3564684eff2e41ac0c6bb6a612afa0446555dcb1e419ae7ef1dbfec4c918d769d51dafeeee8462 WHIRLPOOL ef7c2974bc8ec03823c1432f56be6349991774a221bd1f278adf733e08b6d5cfe763d23d984f502070ab2afce7d7c805a15d073c0c1e302647d9d63cde126b43
+DIST mozart-1.4.0.20080704-doc.tar.gz 4085020 SHA256 68c52cb7379504a5142af37459c89884355fb9cc020f585d7778e7d4b1f0cd9e SHA512 25f8f4b603ae7f4ef054a79a2baa4e10074f8a95f762b75fd88480526fb073b5b4874c269d116a960017a9e7ef989dd9f41853b0ff76e08b2cad2de2090c2eb4 WHIRLPOOL 1f05b48d9ad41006576a66fa5062116bb60bc02438a119ddfe334ff0da02fe8505dee8254db20ca2d02e713e02f8327188ded4b957ee7fec5b965375fe39d5c0
+DIST mozart-1.4.0.20080704-src.tar.gz 11848201 SHA256 5da73d80b5aa7fa42edca64159a1a076323f090e5c548f3747f94d0afc60b223 SHA512 f1114662c8c603cc2ac530d4ea1d22a0581f6e1b4d5cb57ccf899b8051ea48dbcf2fa2b62173359a754367a5456a7cb121a208d6a246248207599b0470525229 WHIRLPOOL e96ff3688025cffb0c78f050f02421872f2119498943b5ebf5786e0886a13f264e0f637c6a41869b6e79ee10c6ed03c8dc55fe1775c5cf66d60fc9f5d09db742
+EBUILD mozart-1.4.0-r3.ebuild 2910 SHA256 102357bb9ca8374b41414ba5d6db597384d47e2d4e2d212e4cf2f26433a1d679 SHA512 1bd1922a512239d1c5e031c6f003d1c862cfba77c27f40ca36b081856f2d3a415e0c91edd8bad4a52649a88cf4a098cd81e00e4f2b5648b4b8d27f77d76d4df3 WHIRLPOOL 270e2aa6198aa02a336c211ea9fef376a92ed466602e3f0e86b039855acd12e6d2e4a49f5cfb4107da98fd5096950bc56661f73232bacad83a31f7c6cd5172a9
+MISC ChangeLog 2807 SHA256 f1081ce12fce289e10e09cbff7ebb2dfdebcbc624eeef39db50c148d00003125 SHA512 1290d4dcf43d56d089e73e99fb66e33ce6f9971fbc955b53ba21983f8eddf2c4b6ab1bf4bf32945a0ceafd90836f30f1f8963f2b97655850ba59fec970aec1a6 WHIRLPOOL 03bce6735e1813da20017eef57af9a5a310c4f8f3636f8ed26fc984d31448ac1c15e8304414a444db551753d3a94c03909ed75aa6c0861d676cde81e5ff41be7
+MISC ChangeLog-2015 7104 SHA256 a8f5fbb1d8921d836f05da85e377b035b43b5e5331bcc00e16d799c5ce0d7398 SHA512 ca7ae6f1a58f7841e5cfb8c4d686ac5808449a45a47c796cf4e1ab548ccc7c8b2b5bb59eeedb034eaedf2ca7a30d6cebf1ce6e1671ac5cb2583cdf474ef88ef2 WHIRLPOOL 774366d32701f518ed37e14ee35e4f1c55f3bfd130b316bc4a264e1701b3ff62d47136f72a6c44499e7a51fce6e2461ac555a8a7af3b3593e9972a4a73df18f2
+MISC metadata.xml 248 SHA256 561bc06d0db413f90cf0553a3388b8753a8b7212b2cbbcb1b7d328197b83b072 SHA512 b296da55efb17a1040203bc1f5f3bfa8160711fdb72f0543739e6efe48b75427c082eb6c405d99b3256e8d536d3d29f71fdd0fd8d281cb9a9967060ea467a034 WHIRLPOOL 0208f6d47db0314c4cf08223c89be826900936b93f305bc5d99066d81b0e245f6d0e0c71720968bc602a97f006b378922123dc6087819809b38b5d97fcc7640c
diff --git a/dev-lang/mozart/files/50mozart-gentoo.el b/dev-lang/mozart/files/50mozart-gentoo.el
new file mode 100644
index 000000000000..64f65c54a682
--- /dev/null
+++ b/dev-lang/mozart/files/50mozart-gentoo.el
@@ -0,0 +1,11 @@
+
+;;; mozart site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'oz-mode "oz" "Major mode for editing Oz code." t)
+(autoload 'oz-gump-mode "oz"
+ "Major mode for editing Oz code with embedded Gump specifications." t)
+(autoload 'ozm-mode "mozart" "Major mode for displaying Oz machine code." t)
+(add-to-list 'auto-mode-alist '("\\.oz$" . oz-mode))
+(add-to-list 'auto-mode-alist '("\\.ozg$" . oz-gump-mode))
+(add-to-list 'auto-mode-alist '("\\.ozm$" . ozm-mode))
diff --git a/dev-lang/mozart/metadata.xml b/dev-lang/mozart/metadata.xml
new file mode 100644
index 000000000000..61b1b5e42a27
--- /dev/null
+++ b/dev-lang/mozart/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>keri@gentoo.org</email>
+ <name>Keri Harris</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/mozart/mozart-1.4.0-r3.ebuild b/dev-lang/mozart/mozart-1.4.0-r3.ebuild
new file mode 100644
index 000000000000..5c828c75cabd
--- /dev/null
+++ b/dev-lang/mozart/mozart-1.4.0-r3.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit elisp-common eutils
+
+PATCHSET_VER="5"
+MY_P="mozart-${PV}.20080704"
+
+DESCRIPTION="Advanced development platform for intelligent, distributed applications"
+HOMEPAGE="http://www.mozart-oz.org/"
+SRC_URI="
+ http://www.mozart-oz.org/download/mozart-ftp/store/1.4.0-2008-07-02-tar/mozart-1.4.0.20080704-src.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz
+ doc? ( http://www.mozart-oz.org/download/mozart-ftp/store/1.4.0-2008-07-02-tar/mozart-1.4.0.20080704-doc.tar.gz )"
+
+SLOT="0"
+LICENSE="Mozart"
+KEYWORDS="-amd64 ppc -ppc64 x86"
+IUSE="doc emacs examples gdbm static tcl threads tk"
+
+RDEPEND="
+ dev-lang/perl
+ dev-libs/gmp:0=
+ sys-libs/zlib
+ emacs? ( virtual/emacs )
+ gdbm? ( sys-libs/gdbm )
+ tcl? (
+ tk? (
+ dev-lang/tk:0=
+ dev-lang/tcl:0=
+ )
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+SITEFILE=50${PN}-gentoo.el
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+}
+
+src_configure() {
+ local myconf="\
+ --without-global-oz \
+ --enable-opt=none"
+
+ if use tcl && use tk ; then
+ myconf="${myconf} --enable-wish"
+ else
+ myconf="${myconf} --disable-wish"
+ fi
+
+ econf \
+ ${myconf} \
+ --disable-doc \
+ --enable-contrib \
+ --disable-contrib-micq \
+ $(use_enable doc contrib-doc) \
+ $(use_enable gdbm contrib-gdbm) \
+ $(use_enable tk contrib-tk) \
+ $(use_enable emacs compile-elisp) \
+ $(use_enable static link-static) \
+ $(use_enable threads threaded)
+}
+
+src_compile() {
+ emake bootstrap
+}
+
+src_test() {
+ # Mozart tests must be run single-threaded
+ cd "${S}"/share/test || die
+ emake -j1 boot-oztest
+ emake -j1 boot-check
+}
+
+src_install() {
+ emake \
+ PREFIX="${D}"/usr/lib/mozart \
+ ELISPDIR="${D}${SITELISP}/${PN}" \
+ install
+
+ dosym /usr/lib/mozart/bin/convertTextPickle /usr/bin/convertTextPickle
+ dosym /usr/lib/mozart/bin/oldpickle2text /usr/bin/oldpickle2text
+ dosym /usr/lib/mozart/bin/ozc /usr/bin/ozc
+ dosym /usr/lib/mozart/bin/ozd /usr/bin/ozd
+ dosym /usr/lib/mozart/bin/ozengine /usr/bin/ozengine
+ dosym /usr/lib/mozart/bin/ozl /usr/bin/ozl
+ dosym /usr/lib/mozart/bin/ozplatform /usr/bin/ozplatform
+ dosym /usr/lib/mozart/bin/oztool /usr/bin/oztool
+ dosym /usr/lib/mozart/bin/pickle2text /usr/bin/pickle2text
+ dosym /usr/lib/mozart/bin/text2pickle /usr/bin/text2pickle
+
+ if use emacs; then
+ dosym /usr/lib/mozart/bin/oz /usr/bin/oz
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+
+ dodoc "${S}"/README
+ use doc && dohtml -r "${WORKDIR}"/mozart/doc/*
+
+ if use examples; then
+ cd "${S}"/share || die
+ insinto /usr/share/doc/${PF}
+ doins -r examples demo
+ rm -rf $(find "${ED}"/usr/share/doc/${PF}/examples \
+ -name Makefile -o -name Makefile.in) || die
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/mujs/Manifest b/dev-lang/mujs/Manifest
new file mode 100644
index 000000000000..b9f9ad70dbeb
--- /dev/null
+++ b/dev-lang/mujs/Manifest
@@ -0,0 +1,9 @@
+AUX mujs-0_p20150202-Makefile.patch 593 SHA256 d58c6104b39d2bbd808a1252500d7361a7074f2384d1f73fa08cf72091f359fb SHA512 2c6c0b0ba8dc757a1ae57fbfe5ea56970e07177b45e7d7aa7ed41896ead5b0d4200003897f9c837fc97e96bdc2fd51229fd2629e8780194ad12f86940591878e WHIRLPOOL 0707ce90c91fe3d062722607aa13e98d12cb7a9e5564b48eee38d8ad643b5066499e2398ea5ed8f425fbbb857569ef11cd99f099c22e9155421e77c8f5bbc4e4
+AUX mujs-1.0.1-gentoo.patch 788 SHA256 a0c053a3acf6667bd6cf10da60f9f7c186755a190c3ab56f3362a53e79073d52 SHA512 b7409ff5aa9e5e38d3d9b7a3805699847a043ee83d46520d2b2ac011ac0a66588126a5c6761e919f9f9c7c510ff5d62d7c22c97739b52e611f5b89a911f52169 WHIRLPOOL c8abdee6e6b827f037128bca57778a60a2eba05c51ce610ba4089e23226d6b117b482913f841c751dedf6488623e5872bb3fa1cf105551b0604325897212841a
+DIST mujs-0_p20161202.tar.gz 105413 SHA256 45754e225357d7707905e14a8709057b8089fb3977fad8611f220aececb5507c SHA512 90dd1bce44740715a6f642bdb376be230c4a03c7970c2026479cf014a080b98b56a2131ca7ef8bf9c05b91285fe7dcc21dd4ca83879750351d57088408a62cbc WHIRLPOOL 5450af5567c19903a1548103b0b4a6d0f8cf83a68f3c377be0dd455cea8cf287dbd821db144c03a8322f0064f535a4540aeb234939b3e56c32efd1090624ccaa
+DIST mujs-1.0.1.tar.gz 116948 SHA256 7b8d99a07176922f8adb34b1713641abec3330b8c1292bbfaa9caf013bc331b9 SHA512 46cbc45735dbf173d7fa5839e3b511730e4d42933c2286d170767659649ea88c2a3dcc74fb986d1eedb1d4fec8fcaaba146805cc9d0ef7da98bb5a9ce0c80a96 WHIRLPOOL c79288615081aeb9ad174c3778ad4ad615e9a50738016122779497a9b16a2723c7dba675832653cc29be2fe9747ecc83d9bd1c32970776fb4ca28b7297709ba8
+EBUILD mujs-0_p20161202.ebuild 824 SHA256 90d55323651068ee2eddff21646cf5d9c497a823c1978bc5164f7d993f56d7ef SHA512 15f9ad4f8bfa67ba51cf2429a8d985974fd39af83ddc53c238acfa5293b055a116c7de6c91271a975d7b044b6c5cd6c1bb645db5d3400b4399f9f96f7b4cd401 WHIRLPOOL 58680dfa6689d8591016f71a2fbcb0466271e5cdd01cae1ad90dd19bb94691a08cb22bb63c542e9df12fa5ab07c141941cd8c1a2077c0b18168ed31e1b8ab575
+EBUILD mujs-1.0.1-r1.ebuild 1103 SHA256 7a08e1335b1bf4e973a29d26c43e4d66b0b04eebf0f67e2a1053f3ce9aa371df SHA512 98525a0a8fea64b8a223b88f082cdf8634e5eca55e51c5c792c6ff3407408e83c69d9d1b9f6bc6e36002bf33b7ce21fe927938c93fac1a925902e643336841e5 WHIRLPOOL b24f4972df3514c0b31b1a523d9760c04dabee00e93251501cf4e7ceaea718553be15b3987f6aac4bd4eef7f30cff26f1f3e5630b80902cbdec46c9289b0e4af
+MISC ChangeLog 3071 SHA256 64dd666a231b7449d781a3c1e1054a9cc9354469f4c04188ecbdbdf8b6c4c7ca SHA512 ce5eebb6830d1785e59ae2c50e5119cdc2d2ad86dbfa6b672d259dffef0f999e4a393687bf6ecb466997209991a5a0d578258e2b4a4bc7a275ab384652a0c259 WHIRLPOOL f3e3e228c2800f93c49c3fb7d7befc4edde56397c6e9a8447325e56952696f35ae1224d6d742cdfd03f7a938f2c6c544eb61e1f6a2e393e3fe5ca33ff747520a
+MISC ChangeLog-2015 588 SHA256 f22e340bcfb55fe096d920a7b8bd30514742ee6019445c49fcca4739b68832f0 SHA512 31156225e38ba91361e74112ff69aa747a9b2556973bdb4a8086a6a1cdaec9ae80d04d3ddba20b6ec4eecbbf2ce3b3cdce336406c021450b5bbcaeec01d13407 WHIRLPOOL 8ef1c83b522c34b0f6cffe437bee86b03b667e2e86edd4553f77d715aa137b8e908bc47e2a0bf7a7715464e425d3b22523669f476acf7304c8b88b058a9cfbc4
+MISC metadata.xml 237 SHA256 ffb571839c57797d282263369646d2bba2662601a45f7bb3251bb97f716554a6 SHA512 ae2360aa6b1b00c67e0acea4935c02b64585b9a15e126fec9d5d99637021c542c0a495e5116205f3da287def46fa5b19cb1a7f3042c12c5f7a78d66d92fcb03f WHIRLPOOL 60d6da846c983457e038ea5ba3c0bf48f939c9586610985a14cac9772fd1d45d781a643abc16482f232f3028e44fe99fe1a382deaebf6589602fc244a4460e3f
diff --git a/dev-lang/mujs/files/mujs-0_p20150202-Makefile.patch b/dev-lang/mujs/files/mujs-0_p20150202-Makefile.patch
new file mode 100644
index 000000000000..4dca385e3792
--- /dev/null
+++ b/dev-lang/mujs/files/mujs-0_p20150202-Makefile.patch
@@ -0,0 +1,28 @@
+--- mujs-0_p20150202/Makefile
++++ mujs-0_p20150202/Makefile
+@@ -2,23 +2,17 @@
+ HDRS := $(wildcard js*.h mujs.h utf.h regex.h)
+ OBJS := $(SRCS:%.c=build/%.o)
+
+-prefix ?= /usr/local
++prefix ?= /usr
+ bindir ?= $(prefix)/bin
+ incdir ?= $(prefix)/include
+ libdir ?= $(prefix)/lib
+
+-CFLAGS := -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter
++CFLAGS += -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter
+
+ ifeq "$(CC)" "clang"
+ CFLAGS += -Wunreachable-code
+ endif
+
+-ifeq "$(build)" "debug"
+-CFLAGS += -g
+-else
+-CFLAGS += -O2
+-endif
+-
+ default: build build/mujs build/mujsone
+
+ debug:
diff --git a/dev-lang/mujs/files/mujs-1.0.1-gentoo.patch b/dev-lang/mujs/files/mujs-1.0.1-gentoo.patch
new file mode 100644
index 000000000000..c6c7977ac75d
--- /dev/null
+++ b/dev-lang/mujs/files/mujs-1.0.1-gentoo.patch
@@ -0,0 +1,37 @@
+--- a/Makefile
++++ b/Makefile
+@@ -2,7 +2,7 @@
+
+ build ?= release
+
+-prefix ?= /usr/local
++prefix ?= /usr
+ bindir ?= $(prefix)/bin
+ incdir ?= $(prefix)/include
+ libdir ?= $(prefix)/lib
+@@ -11,7 +11,7 @@
+
+ # Compiler flags for various configurations:
+
+-CFLAGS := -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter
++CFLAGS += -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter
+
+ ifeq "$(CC)" "clang"
+ CFLAGS += -Wunreachable-code
+@@ -22,16 +22,6 @@
+ LDFLAGS += -Wl,--gc-sections
+ endif
+
+-ifeq "$(build)" "debug"
+-CFLAGS += -g
+-else ifeq "$(build)" "sanitize"
+-CFLAGS += -pipe -g -fsanitize=address -fno-omit-frame-pointer
+-LDFLAGS += -fsanitize=address
+-else
+-CFLAGS += -Os
+-LDFLAGS += -Wl,-s
+-endif
+-
+ # You shouldn't need to edit anything below here.
+
+ OUT := build/$(build)
diff --git a/dev-lang/mujs/metadata.xml b/dev-lang/mujs/metadata.xml
new file mode 100644
index 000000000000..a535b8852829
--- /dev/null
+++ b/dev-lang/mujs/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>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-lang/mujs/mujs-0_p20161202.ebuild b/dev-lang/mujs/mujs-0_p20161202.ebuild
new file mode 100644
index 000000000000..711c77f09503
--- /dev/null
+++ b/dev-lang/mujs/mujs-0_p20161202.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs vcs-snapshot
+
+DESCRIPTION="lightweight Javascript interpreter"
+HOMEPAGE="http://mujs.com/"
+SRC_URI="http://git.ghostscript.com/?p=mujs.git;a=snapshot;h=fd003eceda531e13fbdd1aeb6e9c73156496e569;sf=tgz -> ${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0_p20150202-Makefile.patch"
+ # workaround for linkage of app-text/mupdf-1.7a
+ # TODO: generate a shared library and IUSE=static-libs
+)
+
+src_prepare() {
+ default
+ append-cflags -fPIC
+ tc-export CC
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+}
diff --git a/dev-lang/mujs/mujs-1.0.1-r1.ebuild b/dev-lang/mujs/mujs-1.0.1-r1.ebuild
new file mode 100644
index 000000000000..d0a2333dcf41
--- /dev/null
+++ b/dev-lang/mujs/mujs-1.0.1-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="lightweight Javascript interpreter"
+HOMEPAGE="http://mujs.com/"
+SRC_URI="http://git.ghostscript.com/?p=mujs.git;a=snapshot;h=4792d16f17b15a1eca3c2a9c856dc13fda1d23c5;sf=tgz -> ${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="static-libs"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.0.1-gentoo.patch
+)
+S=${WORKDIR}/${PN}-4792d16
+
+src_prepare() {
+ default
+ append-cflags -fPIC -Wl,-soname=lib${PN}.so.${PV}
+ tc-export CC
+}
+
+src_compile() {
+ emake VERSION=${PV} shared
+}
+
+src_install() {
+ emake \
+ DESTDIR="${ED}" \
+ VERSION=${PV} \
+ libdir="/usr/$(get_libdir)" \
+ install-shared \
+ $(usex static-libs install-static '')
+
+ mv -v "${D}"/usr/$(get_libdir)/lib${PN}.so{,.${PV}} || die
+ dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so || die
+ dosym lib${PN}.so.${PV} /usr/$(get_libdir)/lib${PN}.so.${PV:0:1} || die
+}
diff --git a/dev-lang/nasm/Manifest b/dev-lang/nasm/Manifest
new file mode 100644
index 000000000000..d0484bb4927e
--- /dev/null
+++ b/dev-lang/nasm/Manifest
@@ -0,0 +1,10 @@
+AUX nasm-2.13.01-fix-docdir.patch 5536 SHA256 886cc7ca0b0bb8652c82f5ce3a6de8792f118b28fa839bea4d3e0ccf75355537 SHA512 22bbfac66b75451345a1f3d19816ecc35397c9b95f16f7dffdf8dbde9055bb035880f5cb081686c42ce3f448e250a29c9440775aad929a7e36c1325e6bbc88d7 WHIRLPOOL b2da2a063fe835c0c75e1d58bb6b3c90afa00cbc2417edb942df6cc90701f95edf8b0f4bce982a21806aca671e2a50273448e83be3faf15b02b4004c2a4cca32
+DIST nasm-2.11.08.tar.xz 764872 SHA256 c99467c7072211c550d147640d8a1a0aa4d636d4d8cf849f3bf4317d900a1f7f SHA512 f7caf42d0fe1b850de13180a1f363e34a6d44a02696312dd8f12f4116ad1c1f3d01e6606c3a79fb881e76fc70d20894d85b333c84a75d60265ff9551f7b8cde4 WHIRLPOOL d13f342d59aedf2510347f847a2f5fb276a3bdb9e7b8c5cac6ac4e204a03ea31e477adc19facbf68f939245aae72971b232f1a0fc461ef554458f8956403c623
+DIST nasm-2.12.01.tar.xz 780112 SHA256 9dbba1ce620512e435ba57e69e811fe8e07d04359e47e0a0b5e94a5dd8367489 SHA512 c016b2b26f2ef00fe8de673dc7b2effa55ddd23d1f15145380c2767a2cd4a5c60c77732faebcd5868b325f780c0bf76a5e0c49eb6189609b21e2493d2af9347c WHIRLPOOL 4659275043c947461a03450efe184a425019aa99b30607c33b1dd302dd02091a9f1dfaf80382c4466b7df295bc09add6ad9587e3050ea4567a4605f956e1bcdd
+DIST nasm-2.13.01.tar.xz 800244 SHA256 aa0213008f0433ecbe07bb628506a5c4be8079be20fc3532a5031fd639db9a5e SHA512 6561a2efb3ffea77a1a8cd364edf1ecedb2c14e1902469d7c59d743f25ca612529113d1099818abbe0a9f2592f12604f1810855bbdf8dc9de3648094a83529ae WHIRLPOOL dfc7018acfb51cdd3988da6abd157a29d72fdcd233862de4eb09debd65560280a0d7a7aa8f76f0e0c546861272d533f57d3dacd52add16a894dbc026a913d1c5
+EBUILD nasm-2.11.08.ebuild 823 SHA256 dbbaff01dfbed8747b8e12f00dd2d4882c381a230a7ba6a7191670d12b9959b3 SHA512 d91efdd2f128087650e692210f2f6b50caae8b1364d255854b1592d0cd2e411859d66e2ed2d698de8e4550e8b0c306d73261fa23d344b4b472b241d5928f4ff5 WHIRLPOOL 80a5cce837ba2ea31fbcc8534fab815cd39ed465da2237bec1ca505b8022e85e9dff0192bd593d757f98f84a8023597722f0560b47658b5f3fa05ce47171e584
+EBUILD nasm-2.12.01.ebuild 826 SHA256 12ea2c411ee54729685aea58991ac05da520d2ddd63f5afae10719f031da76ac SHA512 011a6594157b7bd2df8203dd523edf2bd9159e8c606ba0e59a9ebf75a127c0b6c32be00e95f989b274714ab4cdef881b36e9151d475aac7c882806045333671f WHIRLPOOL 5bc7fa797029347a5018d19500a3634ae33c367b65e24129da5c4d7f1335550cb63925ae5518c92dc13cb033bfdc20c77f067bfdfa897eb0604ba87d6b029fb7
+EBUILD nasm-2.13.01.ebuild 807 SHA256 233c71bba2d735be6812925cb64a0d7ed0e7f135f32de41b82279bca3f8add08 SHA512 d25c8d7c6d70982c4140e7ed906d08e1ba6e7c300ea0dd686bc748bcb040a00f217cf837ab11bb65357ec8b32de836ba7fc81d10b4152f8dda13c81e8bb52598 WHIRLPOOL a46eead45d09f2b341c966abe22bb896a97ba4911e1aa06216ad5dafd597002fb0350f21821e994bc10818b995db2c19dff9343658e68ff7d4fff406b4db67f7
+MISC ChangeLog 3607 SHA256 4fc4a23d8f54d5fdee13f0ca83d4a99cc08e33bbdcc31d50281b526208345637 SHA512 9dd7abd0e3d1d2005430fdd264c61bd6f8e7e4bfebf9d2d420f8ad66147836b845f557f270a839f70d769a445486b0597a4207d5d56683acd23f03e0ea4caae0 WHIRLPOOL b9fa8b2f314fef762ad10a0390a72355713a5f1443a7a5cd4556f4efb3ef1cb8618fda78e6b87a6041211771d2377b324f1087e569a47e55bed6b47aaa1175c8
+MISC ChangeLog-2015 16260 SHA256 463417428e7292fe03116c42f47f71a0e4f7c3c2b3f6fe14766c78d95f583c74 SHA512 f281c9f702d3e48bb354310867731065e3cc53f4ef9e757c3d3b4d372ab840f33535358a2c5534846a70c355ac3f08c86c1db0e0e7c30ad06c1707aae7710ebf WHIRLPOOL b8d892c078ec19dd57fbefe585872d82f7be65ab906564f3c9719c2ec6e115dac6f26cad33e3ff0521f45eb4d32d7597283638a0f5f7794b9ccfcdc2b62ad7fd
+MISC metadata.xml 870 SHA256 7cff6c25e006b869e6229a3a6ac109d7f37aa7c24a39dfe2bbfeef57528e3623 SHA512 17b926c02760e286ff9ae9b11982560cfecf1c2ad46839ad36956b7e00ad76967dc296ac2457fb617a905b6a338b16b95aebc132a233537e3663340825b5b2d6 WHIRLPOOL db1b0dd7d74afbab6a81bf614b00b5d52e097a1e0d4674093e06e95021133e3c9303c79c46c83f7e13726bb773c8b920f5311015daace8a9dd5c6c76924e4fbe
diff --git a/dev-lang/nasm/files/nasm-2.13.01-fix-docdir.patch b/dev-lang/nasm/files/nasm-2.13.01-fix-docdir.patch
new file mode 100644
index 000000000000..aaedc404a208
--- /dev/null
+++ b/dev-lang/nasm/files/nasm-2.13.01-fix-docdir.patch
@@ -0,0 +1,177 @@
+From 1c369c46fd2cceeb6abe46b89fc539960a6c0c88 Mon Sep 17 00:00:00 2001
+From: David Seifert <soap@gentoo.org>
+Date: Sat, 1 Jul 2017 19:42:50 -0700
+Subject: [PATCH] Make buildsystem respect GNU conventions
+
+* CPPFLAGS is a user variable and should be respected
+ when compiling .c files. Think of -D_FORTIFY_SOURCE=2.
+* Pass ALL_CFLAGS when linking too. This is recommended
+ for certain edge cases (-flto)
+* Use DESTDIR instead of INSTALLROOT for staging dir
+ Every other build system (Automake, CMake, Meson) uses
+ DESTDIR. This integrates better into distro and other
+ build systems that have standard hooks for DESTDIR.
+* $(MAKE) -C <dir> is better than cd'ing into a <dir>
+* Use Autoconf's ${docdir} and ${htmldir} for installing
+ the documentation. This makes handling documentation
+ easier and respects user choice.
+---
+ Makefile.in | 41 +++++++++++++++++++++--------------------
+ doc/Makefile.in | 13 ++++++++-----
+ 2 files changed, 29 insertions(+), 25 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index a48d980..e7f01e4 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -20,6 +20,7 @@ datarootdir = @datarootdir@
+
+ CC = @CC@
+ CFLAGS = @CFLAGS@
++CPPFLAGS = @CPPFLAGS@
+ BUILD_CFLAGS = $(CFLAGS) @DEFS@
+ INTERNAL_CFLAGS = -I$(srcdir) -I$(objdir) \
+ -I$(srcdir)/include -I$(objdir)/include \
+@@ -72,13 +73,13 @@ endif
+ .PHONY: manpages nsis
+
+ .c.$(O):
+- $(CC) -c $(ALL_CFLAGS) -o $@ $<
++ $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
+
+ .c.s:
+- $(CC) -S $(ALL_CFLAGS) -o $@ $<
++ $(CC) -S $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
+
+ .c.i:
+- $(CC) -E $(ALL_CFLAGS) -o $@ $<
++ $(CC) -E $(CPPFLAGS) $(ALL_CFLAGS) -o $@ $<
+
+ .txt.xml:
+ $(ASCIIDOC) -b docbook -d manpage -o $@ $<
+@@ -88,7 +89,7 @@ endif
+
+ # This rule is only used for rdoff, to allow common rules
+ .$(O)$(X):
+- $(CC) $(LDFLAGS) -o $@ $< $(RDFLIB) $(NASMLIB) $(LIBS)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $< $(RDFLIB) $(NASMLIB) $(LIBS)
+
+ #-- Begin File Lists --#
+ NASM = asm/nasm.$(O)
+@@ -152,10 +153,10 @@ $(NASMLIB): $(LIBOBJ)
+ $(RANLIB) $(NASMLIB)
+
+ nasm$(X): $(NASM) $(NASMLIB)
+- $(CC) $(LDFLAGS) -o nasm$(X) $(NASM) $(NASMLIB) $(LIBS)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o nasm$(X) $(NASM) $(NASMLIB) $(LIBS)
+
+ ndisasm$(X): $(NDISASM) $(NASMLIB)
+- $(CC) $(LDFLAGS) -o ndisasm$(X) $(NDISASM) $(NASMLIB) $(LIBS)
++ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o ndisasm$(X) $(NDISASM) $(NASMLIB) $(LIBS)
+
+ #-- Begin Generated File Rules --#
+
+@@ -335,12 +336,12 @@ nsis: nsis/nasm.nsi nsis/arch.nsh nsis/version.nsh
+ manpages: nasm.1 ndisasm.1
+
+ install: nasm$(X) ndisasm$(X)
+- $(MKDIR) -p $(INSTALLROOT)$(bindir)
+- $(INSTALL_PROGRAM) nasm$(X) $(INSTALLROOT)$(bindir)/nasm$(X)
+- $(INSTALL_PROGRAM) ndisasm$(X) $(INSTALLROOT)$(bindir)/ndisasm$(X)
+- $(MKDIR) -p $(INSTALLROOT)$(mandir)/man1
+- $(INSTALL_DATA) $(srcdir)/nasm.1 $(INSTALLROOT)$(mandir)/man1/nasm.1
+- $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(INSTALLROOT)$(mandir)/man1/ndisasm.1
++ $(MKDIR) -p $(DESTDIR)$(bindir)
++ $(INSTALL_PROGRAM) nasm$(X) $(DESTDIR)$(bindir)/nasm$(X)
++ $(INSTALL_PROGRAM) ndisasm$(X) $(DESTDIR)$(bindir)/ndisasm$(X)
++ $(MKDIR) -p $(DESTDIR)$(mandir)/man1
++ $(INSTALL_DATA) $(srcdir)/nasm.1 $(DESTDIR)$(mandir)/man1/nasm.1
++ $(INSTALL_DATA) $(srcdir)/ndisasm.1 $(DESTDIR)$(mandir)/man1/ndisasm.1
+
+ clean:
+ for d in . $(SUBDIRS) $(XSUBDIRS); do \
+@@ -364,7 +365,7 @@ distclean: clean
+
+ cleaner: clean
+ $(RM_F) $(PERLREQ) *.1 nasm.spec
+- cd doc && $(MAKE) clean
++ $(MAKE) -C doc clean
+
+ spotless: distclean cleaner
+ $(RM_F) doc/Makefile
+@@ -386,23 +387,23 @@ cscope:
+ cscope -b -f cscope.out
+
+ rdf_install install_rdf install_rdoff:
+- $(MKDIR) -p $(INSTALLROOT)$(bindir)
++ $(MKDIR) -p $(DESTDIR)$(bindir)
+ for f in $(RDFPROGS); do \
+- $(INSTALL_PROGRAM) "$$f" '$(INSTALLROOT)$(bindir)'/ ; \
++ $(INSTALL_PROGRAM) "$$f" '$(DESTDIR)$(bindir)'/ ; \
+ done
+- cd '$(INSTALLROOT)$(bindir)' && \
++ cd '$(DESTDIR)$(bindir)' && \
+ for f in $(RDF2BINLINKS); do \
+ bn=`basename "$$f"` && $(RM_F) "$$bn" && \
+ $(LN_S) rdf2bin$(X) "$$bn" ; \
+ done
+- $(MKDIR) -p $(INSTALLROOT)$(mandir)/man1
+- $(INSTALL_DATA) $(srcdir)/rdoff/*.1 $(INSTALLROOT)$(mandir)/man1/
++ $(MKDIR) -p $(DESTDIR)$(mandir)/man1
++ $(INSTALL_DATA) $(srcdir)/rdoff/*.1 $(DESTDIR)$(mandir)/man1/
+
+ doc:
+- cd doc && $(MAKE) all
++ $(MAKE) -C doc all
+
+ doc_install install_doc:
+- cd doc && $(MAKE) install
++ $(MAKE) -C doc install
+
+ everything: all manpages doc rdf
+
+diff --git a/doc/Makefile.in b/doc/Makefile.in
+index 2ddfd1e..261a791 100644
+--- a/doc/Makefile.in
++++ b/doc/Makefile.in
+@@ -9,7 +9,8 @@ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ bindir = @bindir@
+ mandir = @mandir@
+-docdir = $(prefix)/doc/nasm
++docdir = @docdir@
++htmldir = @htmldir@
+ infodir = @infodir@
+ datarootdir = @datarootdir@
+
+@@ -21,6 +22,7 @@ PERL = perl -I$(srcdir)
+
+ PDFOPT = @PDFOPT@
+
++MKDIR = mkdir
+ RM_F = rm -f
+ RM_RF = rm -rf
+ CP_F = cp -f
+@@ -41,7 +43,7 @@ inslist.src: inslist.pl ../x86/insns.dat
+
+ .PHONY: html
+ html: $(HTMLAUX)
+- mkdir -p html
++ $(MKDIR) -p html
+ for f in $(HTMLAUX); do $(CP_UF) "$(srcdir)/$$f" html/; done
+ $(MAKE) html/nasmdoc0.html
+
+@@ -81,6 +83,7 @@ spotless: clean
+ -$(RM_F) *.hlp nasmdoc.txt *.inf *.pdf *.dvi
+
+ install: all
+- mkdir -p $(INSTALLROOT)$(docdir)/html
+- $(INSTALL_DATA) html/* $(INSTALLROOT)$(docdir)/html
+- $(INSTALL_DATA) nasmdoc.pdf nasmdoc.txt $(INSTALLROOT)$(docdir)
++ $(MKDIR) -p $(DESTDIR)$(htmldir)
++ $(INSTALL_DATA) html/* $(DESTDIR)$(htmldir)
++ $(MKDIR) -p $(DESTDIR)$(docdir)
++ $(INSTALL_DATA) nasmdoc.pdf nasmdoc.txt $(DESTDIR)$(docdir)
+--
+2.13.2
+
diff --git a/dev-lang/nasm/metadata.xml b/dev-lang/nasm/metadata.xml
new file mode 100644
index 000000000000..5f522331eb91
--- /dev/null
+++ b/dev-lang/nasm/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mr_bones_@gentoo.org</email>
+ <name>Michael Sterrett</name>
+ </maintainer>
+ <longdescription>
+The Netwide Assembler, NASM, is an 80x86 assembler designed for portability
+and modularity. It supports a range of object file formats, including Linux
+and NetBSD/FreeBSD a.out, ELF, COFF, Microsoft 16-bit OBJ and Win32. It
+will also output plain binary files. Its syntax is designed to be simple
+and easy to understand, similar to Intel's but less complex. It supports
+Pentium, P6, MMX, 3DNow!, SSE and SSE2 opcodes, and has macro capability.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">nasm</remote-id>
+ <bugs-to>https://bugzilla.nasm.us/</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/nasm/nasm-2.11.08.ebuild b/dev-lang/nasm/nasm-2.11.08.ebuild
new file mode 100644
index 000000000000..8c9e4ab9d6f8
--- /dev/null
+++ b/dev-lang/nasm/nasm-2.11.08.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit flag-o-matic
+
+DESCRIPTION="groovy little assembler"
+HOMEPAGE="http://nasm.sourceforge.net/"
+SRC_URI="http://www.nasm.us/pub/nasm/releasebuilds/${PV/_}/${P/_}.tar.xz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="doc"
+
+DEPEND="dev-lang/perl
+ doc? ( app-text/ghostscript-gpl sys-apps/texinfo )"
+RDEPEND=""
+
+S=${WORKDIR}/${P/_}
+
+src_configure() {
+ strip-flags
+ econf
+}
+
+src_compile() {
+ emake nasmlib.o
+ emake all
+ use doc && emake doc
+}
+
+src_install() {
+ emake INSTALLROOT="${D}" install install_rdf
+ dodoc AUTHORS CHANGES ChangeLog README TODO
+ if use doc ; then
+ doinfo doc/info/*
+ dohtml doc/html/*
+ dodoc doc/nasmdoc.*
+ fi
+}
diff --git a/dev-lang/nasm/nasm-2.12.01.ebuild b/dev-lang/nasm/nasm-2.12.01.ebuild
new file mode 100644
index 000000000000..5d34b024847a
--- /dev/null
+++ b/dev-lang/nasm/nasm-2.12.01.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit flag-o-matic
+
+DESCRIPTION="groovy little assembler"
+HOMEPAGE="http://www.nasm.us/"
+SRC_URI="http://www.nasm.us/pub/nasm/releasebuilds/${PV/_}/${P/_}.tar.xz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="doc"
+
+DEPEND="dev-lang/perl
+ doc? ( app-text/ghostscript-gpl sys-apps/texinfo )"
+RDEPEND=""
+
+S=${WORKDIR}/${P/_}
+
+src_configure() {
+ strip-flags
+ econf
+}
+
+src_compile() {
+ emake nasmlib.o
+ emake all
+ use doc && emake doc
+}
+
+src_install() {
+ emake INSTALLROOT="${D}" install install_rdf
+ dodoc AUTHORS CHANGES ChangeLog README TODO
+ if use doc ; then
+ doinfo doc/info/*
+ dohtml doc/html/*
+ dodoc doc/nasmdoc.*
+ fi
+}
diff --git a/dev-lang/nasm/nasm-2.13.01.ebuild b/dev-lang/nasm/nasm-2.13.01.ebuild
new file mode 100644
index 000000000000..6fc9f52cb0a1
--- /dev/null
+++ b/dev-lang/nasm/nasm-2.13.01.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+DESCRIPTION="groovy little assembler"
+HOMEPAGE="http://www.nasm.us/"
+SRC_URI="http://www.nasm.us/pub/nasm/releasebuilds/${PV/_}/${P/_}.tar.xz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="doc"
+
+DEPEND="
+ dev-lang/perl
+ doc? (
+ app-text/ghostscript-gpl
+ dev-perl/Font-TTF
+ dev-perl/Sort-Versions
+ media-fonts/clearsans
+ virtual/perl-File-Spec
+ )
+"
+
+S=${WORKDIR}/${P/_}
+PATCHES=( "${FILESDIR}"/${PN}-2.13.01-fix-docdir.patch )
+
+src_configure() {
+ strip-flags
+ default
+}
+
+src_compile() {
+ default
+ use doc && emake doc
+}
+
+src_install() {
+ default
+ emake DESTDIR="${D}" install_rdf $(usex doc install_doc '')
+}
diff --git a/dev-lang/nim/Manifest b/dev-lang/nim/Manifest
new file mode 100644
index 000000000000..936104182b4f
--- /dev/null
+++ b/dev-lang/nim/Manifest
@@ -0,0 +1,8 @@
+DIST nim-0.16.0.tar.xz 2907076 SHA256 9e199823be47cba55e62dd6982f02cf0aad732f369799fec42a4d8c2265c5167 SHA512 6be1c00328b7e5bdaa9070e1cd0e3c6e1883c5bc1e44e9c574785f9bce93697f05753f598cf6fdaa6c5a66f08c2ad6f7afb8f6650fc3b1c8e461eb0cf80baabd WHIRLPOOL 425454faab87c0144712c50a114f9fc05dd2676b8d85b1de1cb7569403d60a557c41990ca03bfa04156289e49f1d2e6906a5b798341f642cea9c325546b38e41
+DIST nim-0.17.0.tar.xz 25079320 SHA256 36e18dd9384f6c67e6d0199b871b43e774a0af30532698184d6f5a9cc9ac7a9b SHA512 90d709b39746fac5582b9df69d3eb9e3b7a39563a98f7a3002f00716b936e4e0d2be47d8b877878318692e6e2b85c08077dfcc20d9059573a1967402c244894b WHIRLPOOL 5c934a10e7c67a11964436ba3fe332320a6cc9fff15f93ce71e844024e48f77e6a809212882338ac6b3024bb15d2b0314068b643c251c65dfa258bb6daa52599
+DIST nim-0.17.2.tar.xz 4083084 SHA256 aaff1b5023fc4a5708f1d7d9fd8e2a29f1a7f58bf496532ff1e9d7e7c7ec82bd SHA512 7b4ed1eb1e9067ce72b76b95c43ec74eb38f04611776c174ba6a697254a9253fed61258712fb938f15e662bb3b0d36138194fc8fa89bbcb4d22888263e5e2880 WHIRLPOOL c48b1447c38978675e4e3ac3698ab3ab585242776ef3781b03d125d4379786076c2e06d4687b2f155a707510c4634017fc320a42a113c11e25b75258b9f1bc1b
+EBUILD nim-0.16.0.ebuild 1175 SHA256 d9d37552d7353611a68ed07b6adf4b0ca4f1a449a4968871cc1c1675bfcd6b5d SHA512 c5c45529851e97f6420dc7e29486303c4902e0e95f9523d931252bca6dfa4f3c8b3a23b34fc64988d2474f677ad3b4d707cc1a8c71f591aa29343d5e7b414127 WHIRLPOOL e2e74370eae162bf06b8ea5f1cf68218ac181f0f18127d5856de8d5cde4a15a9f0831776bc29fafce9cf67d68d07a94932e48534aa88bfe44558a08077a8dcec
+EBUILD nim-0.17.0.ebuild 1144 SHA256 b0d8d7d444a30c7139a52ee08b619d1c770633d780843014b20c6fe7cf57e954 SHA512 a9ccbf0dd0e1dc43fa7a1756d8400478cf70bf94e7a7b7a5a9c595543f541fd3fdaa563af5b2093cc5c2de32747658820bef7420924db94f5f9255890723fa7a WHIRLPOOL 81c7c3e6b24506af716dade03e95f665fd1be7ccc14ee58fd5bb9282b2bfa8a0bebab22f28aeb3d911de0dbece8d71998c50f1a0515ef3680edec405bddae0c3
+EBUILD nim-0.17.2.ebuild 1218 SHA256 2c5dac0faadafeacf500f6b2538b4610a2db7372ee25fdad35e67d3a0e1263dd SHA512 46a1415b2006687fa07f6f8c0352d7dcaca7886ec2924a05b881976b8bcbed85a8473ff33dc52f7d26aac0803fd329a82dda4cf12b5ef93ea85b88de29c433ac WHIRLPOOL 1de440a2097ecf55ae6e74989097a0183e4881bfbe022204287c9b33543f3e1bf06f5bb5472714253be1253d86acd9d488cf22d07200bb996087367d4105390b
+MISC ChangeLog 1510 SHA256 cc88b565ede15b62f45109328734057bc6ddfd530b9dfd4397c131e2827a1ce7 SHA512 65cc3d84403f6672fbb607186e796952f534c677bfa83bf7b0f23a8d163270a000a24f7608a53fa2faeb4f08e116f4809068615500f74d820c093481d307414f WHIRLPOOL 3183ddcffe955e177f6eb0db6772536d5005b8159215706a28792078fafe04848fa16c45edfdafd47245a03214fedc748ad3d30a41ba76736930874ab350d9d8
+MISC metadata.xml 328 SHA256 110942af57f721784c3129b5e046355911d5719317c9cd116fa50c946b49b5f5 SHA512 bf02bc0a8c25d6e157b7ab1ef87c2eac3241d42bc4cf0632a159dcb5d429051018848be81d0cbce228124660ced8694f5de48d64fe10bc7ff5b536b7e7579e49 WHIRLPOOL af5d8781cd4df0734cfa581467f61f4b6c28eb21fde84e54744220ea9a0cc5b9930689b007b57a0cb2bfa9b37fd647fd20b358d5e21416ee49ff61dda79023b0
diff --git a/dev-lang/nim/metadata.xml b/dev-lang/nim/metadata.xml
new file mode 100644
index 000000000000..b7796e3694d8
--- /dev/null
+++ b/dev-lang/nim/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>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">nim-lang/Nim</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/nim/nim-0.16.0.ebuild b/dev-lang/nim/nim-0.16.0.ebuild
new file mode 100644
index 000000000000..6f4bf09dcfa8
--- /dev/null
+++ b/dev-lang/nim/nim-0.16.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_PN=Nim
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="compiled, garbage-collected systems programming language"
+HOMEPAGE="https://nim-lang.org/"
+SRC_URI="https://nim-lang.org/download/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc +readline test"
+
+DEPEND="
+ readline? ( sys-libs/readline:0= )
+"
+RDEPEND="${DEPEND}"
+
+nim_use_enable() {
+ [[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>"
+ use $1 && echo "-d:$2"
+}
+
+src_compile() {
+ ./build.sh || die "build.sh failed"
+
+ ./bin/nim c koch || die "csources nim failed"
+ ./koch boot -d:release $(nim_use_enable readline useGnuReadline) || die "koch boot failed"
+
+ if use doc; then
+ PATH="./bin:$PATH" ./koch web || die "koch web failed"
+ fi
+}
+
+src_test() {
+ PATH="./bin:$PATH" ./koch test || die "test suite failed"
+}
+
+src_install() {
+ ./koch install "${D}/usr" || die "koch install failed"
+ rm -r "${D}/usr/nim/doc" || die "failed to remove 'doc'"
+
+ dodir /usr/bin
+ dosym ../nim/bin/nim /usr/bin/nim
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ dodoc doc/*.html
+ fi
+}
diff --git a/dev-lang/nim/nim-0.17.0.ebuild b/dev-lang/nim/nim-0.17.0.ebuild
new file mode 100644
index 000000000000..be6d8989a30b
--- /dev/null
+++ b/dev-lang/nim/nim-0.17.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="compiled, garbage-collected systems programming language"
+HOMEPAGE="https://nim-lang.org/"
+SRC_URI="https://nim-lang.org/download/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc +readline test"
+
+DEPEND="
+ readline? ( sys-libs/readline:0= )
+"
+RDEPEND="${DEPEND}"
+
+nim_use_enable() {
+ [[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>"
+ use $1 && echo "-d:$2"
+}
+
+src_compile() {
+ ./build.sh || die "build.sh failed"
+
+ ./bin/nim c koch || die "csources nim failed"
+ ./koch boot -d:release $(nim_use_enable readline useGnuReadline) || die "koch boot failed"
+
+ if use doc; then
+ PATH="./bin:$PATH" ./koch web || die "koch web failed"
+ fi
+}
+
+src_test() {
+ PATH="./bin:$PATH" ./koch test || die "test suite failed"
+}
+
+src_install() {
+ ./koch install "${D}/usr" || die "koch install failed"
+ rm -r "${D}/usr/nim/doc" || die "failed to remove 'doc'"
+
+ dodir /usr/bin
+ dosym ../nim/bin/nim /usr/bin/nim
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ dodoc doc/*.html
+ fi
+}
diff --git a/dev-lang/nim/nim-0.17.2.ebuild b/dev-lang/nim/nim-0.17.2.ebuild
new file mode 100644
index 000000000000..f26909ecc79b
--- /dev/null
+++ b/dev-lang/nim/nim-0.17.2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1
+
+DESCRIPTION="compiled, garbage-collected systems programming language"
+HOMEPAGE="https://nim-lang.org/"
+SRC_URI="https://nim-lang.org/download/${P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="doc +readline test"
+
+DEPEND="
+ readline? ( sys-libs/readline:0= )
+"
+RDEPEND="${DEPEND}"
+
+nim_use_enable() {
+ [[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>"
+ use $1 && echo "-d:$2"
+}
+
+src_compile() {
+ ./build.sh || die "build.sh failed"
+
+ ./bin/nim c koch || die "csources nim failed"
+ ./koch boot -d:release $(nim_use_enable readline useGnuReadline) || die "koch boot failed"
+
+ if use doc; then
+ PATH="./bin:$PATH" ./koch web || die "koch web failed"
+ fi
+}
+
+src_test() {
+ PATH="./bin:$PATH" ./koch test || die "test suite failed"
+}
+
+src_install() {
+ ./koch install "${D}/usr" || die "koch install failed"
+ rm -r "${D}/usr/nim/doc" || die "failed to remove 'doc'"
+
+ dodir /usr/bin
+ dosym ../nim/bin/nim /usr/bin/nim
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ dodoc doc/*.html
+ fi
+
+ newbashcomp tools/nim.bash-completion ${PN}
+}
diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest
new file mode 100644
index 000000000000..d08319a8e994
--- /dev/null
+++ b/dev-lang/nqp/Manifest
@@ -0,0 +1,10 @@
+DIST nqp-2017.07.tar.gz 3713517 SHA256 31fefc7fa02441b45ff0ca465b58a8b391522b7090965a85323134aa17cb1166 SHA512 55ef0827c6e013b898d8a5034d2568e787bb89b510234cd58239f13c9f8f9ff24bb3790838aeade79fe09d721c2d2384c94bc4714b24f3d602a9b4a0dbcdcafc WHIRLPOOL 71ee1e98810b32a8fe5220fb0efd5d99c393bbf1b1fd13898cf21c7ba82d5815a9136cc6965077cb58a8777c040f4578b3a50fb180b01e190d8f9f6b82366bae
+DIST nqp-2017.08.tar.gz 3718841 SHA256 70e202096c1ca12ccaec700633807e64c21a395ca45a581c762f3a1d417fa76a SHA512 b86e58f1465ca0baaafd3424739b3ad0da8b5b764e53afa36d77c5058015a66d6180c97e56adfa8de2892e28669b3bcc688d16009669ad995170ca6e68c8b486 WHIRLPOOL c3c737d76099d22047860b97926f4af7202d2b1e4783d926a88fd9f914d0c0d0eeb65829f7c4d0d7af4e541b7c09a380f2db9a3c87889b6f2ed06a44aaa8d365
+DIST nqp-2017.09.tar.gz 3724208 SHA256 ac6e1d2cdd8239cb2636c62ee6500e9bb346c63d4934c4dca125bc714cc023c0 SHA512 a932f6d5ea24ad1857339cd5d7314f75b5bb08628df63e180c3675e0e5a8d04fe12add1cf2d04c55e0454bc4c0e5e59cfd57f793c242dfa2459f06ae8a2097cb WHIRLPOOL c015a9b6a82d07fbae86dd1195ddf5e82faecdbed83fa939f02e8a2f9748d5b6cf1e6156792a43ce40b14f58c74c9ad7190f8c319a846aee7e3bb61fb9daf73f
+EBUILD nqp-2017.07.ebuild 3607 SHA256 d896af5d47538495967b575d9c710c45c976b344fa6e6b0c0081393c6ea7197d SHA512 a2e2a0e191fed3ebd86c256e70c67cdb6cf037120e7b2395beaba0db55dac14f7bf830002abf32cdc71403f243f71deb345d2b921ce61302a5151e89477afcfe WHIRLPOOL 0d251bc9d837ddff70006c5ee95ddf27a992d8a1e121d40f815414a317a72129efbd75fd2e2be4173c4455f85594e21f70358257c96185af25081f6ec0234226
+EBUILD nqp-2017.08.ebuild 3611 SHA256 bd1ee4d585699191e23c1e6b4658c60ccb35bd75cb1fbac9a4354f1762298045 SHA512 42f9651aa22042a571e77c13c9e5b46402cc4ff7cc71579daca171cecee7c7250eab476825693a5921e1edd66f44987b9bc096e046e570037ab2144fceab01b3 WHIRLPOOL 68296a59d785d711b997f7662ef98b545ecaf83ebb9c3c7a6fac6e4bf5f2531d8b98831a0d39d2df4d4a5bf79bb1541e7af254a268c2122b22306695efc1f823
+EBUILD nqp-2017.09.ebuild 3611 SHA256 256e13cec1aeadf59563d109f51a3c9508de39850b5b541f2fa5f952c28efe03 SHA512 8271504114f3dca61e290006077957063d624b8a967c0c67a8b32fb28e217e5ccc895f1d63d4a95fc10e491962b86fd70ba7a420643a988788da2f30bb032edc WHIRLPOOL e2d64dc0f0a25066e281d2d5f3b5c16ca93fb37461a8e74ea3c1b6ca719f03b1ffb807667c512db83f8e4ea3bafe8159dd6a7a02f4503ae379338869abb4f198
+EBUILD nqp-9999.ebuild 3607 SHA256 5d76fd34ae1be01876de55014dd84e64eaa908c6512cc7abcd7fc694a803cd59 SHA512 c0be49582eb04c3a80b4a9191ee121018adb177fbd379083231c9157eb8fb051d447f0e1c5a05214f40d52c30fabedb7d2a72dfca7625239822f1a6119dba68e WHIRLPOOL 2eb311416f57549c8f1bae2d9a161a69fb1981ab1b0c369c263af3ca85513759c553983a2da1c852f1c8d0b06791bd9e5936099b2e509d7fc49e5ede825b3674
+MISC ChangeLog 6805 SHA256 24f5fd858a027e5c0d66c8070fb1190cb0c176bef6f5c7a9ef2567e92ad3e00b SHA512 c166f8ce55decf53ef46911b6fe2661368d6dbbfbc6c0b70e39e8c8b99f4bd764492f1eb2a7351362eda72b7307363a94d5f845d598f1b4b9285e6abe365405c WHIRLPOOL cd0b51b56c54e6190790a0123640270cc1f3b9fcea6dd757b3501df473aaa71b468ddc1ce9fccb6f2ed2cbf8face53ce6055fa6d7c3e2d606a041c424c7d979d
+MISC ChangeLog-2015 9081 SHA256 971953bf554c81aa3f83c29ba1ed70485b940ec6fa1179c13f12a3fdef70dd0c SHA512 865cdb4d3fe65c7d17cfc4e29c003d344bff9fa67743ca173522e379274bbcaa0391f7471b1b8ab334466e9048773bf7bf5fab476007d9c627b9eaf51159faa9 WHIRLPOOL 5246d66fd1ed3eb57da242dbdf0c8367835dee1188325387c6b90dd5d1d2eacf381eb53f71b5764f8aa677c7f043793b6a2f04e7111aa744d60aa2ad8c96ec87
+MISC metadata.xml 747 SHA256 122e055c7b4b35866f3a284e4e63a5109a3a383d203745634911fb839330dcac SHA512 b86ede9a0dc7587f24308ceb470666aeabf7cd96f2da4afe05195a2b74c1836826ddf269a6ed00f0bfb190c9b241a4d500940afa9060913b8f724989b20a68e2 WHIRLPOOL 6e98882b51b1624677e243cb275a24abb2aa63642d6a32cb9ad74b28ab57e89e4e5674cae4ae7f40114a5a4a0cd0ece53285ca56e96eaa7ea1caa7bfc3793f51
diff --git a/dev-lang/nqp/metadata.xml b/dev-lang/nqp/metadata.xml
new file mode 100644
index 000000000000..7d0e9d2c9d1f
--- /dev/null
+++ b/dev-lang/nqp/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="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>tomboy64@sina.cn</email>
+ <name>Matthew Brewer</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>perl@gentoo.org</email>
+ <name>Gentoo Perl Project</name>
+ </maintainer>
+ <use>
+ <flag name="clang">Toggle usage of the clang compiler in conjunction with MoarVM</flag>
+ <flag name="moar">Build the MoarVM backend (experimental/broken)</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">perl6/nqp</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/nqp/nqp-2017.07.ebuild b/dev-lang/nqp/nqp-2017.07.ebuild
new file mode 100644
index 000000000000..e2dfdc734d8e
--- /dev/null
+++ b/dev-lang/nqp/nqp-2017.07.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit java-pkg-opt-2 multibuild
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/perl6/${PN}.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
+ inherit vcs-snapshot
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
+HOMEPAGE="http://rakudo.org/"
+
+LICENSE="Artistic-2"
+SLOT="0"
+IUSE="doc clang java +moar test"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="java? (
+ dev-java/asm:4
+ dev-java/jline:0
+ dev-java/jna:4
+ )
+ moar? ( ~dev-lang/moarvm-${PV}[clang=] )"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.7 )"
+DEPEND="${CDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.7 )
+ dev-lang/perl"
+
+pkg_pretend() {
+ if has_version dev-lang/rakudo || has_version dev-lang/nqp; then
+ ewarn "NQP is known to fail compilation/installation with Rakudo and/or NQP"
+ ewarn "already being installed. So if it fails, try uninstalling both"
+ ewarn "dev-lang/nqp and dev-lang/rakudo, then do a new installation."
+ ewarn "(see Bug #584394)"
+ fi
+}
+
+java_prepare() {
+ # Don't clean stage0 jars.
+ einfo "Cleaning upstream jars"
+ java-pkg_clean 3rdparty/
+
+ # Don't use jars we just deleted.
+ sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \
+ src/vm/jvm/runners/nqp-j || die
+}
+
+src_prepare() {
+ MULTIBUILD_VARIANTS=()
+ use moar && MULTIBUILD_VARIANTS+=( moar )
+ use java && MULTIBUILD_VARIANTS+=( jvm )
+
+ multibuild_copy_sources
+
+ # This will pull in conditional java_prepare
+ default
+}
+
+nqp_configure() {
+ pushd "${BUILD_DIR}" > /dev/null || die
+ local myconfargs=(
+ "--backend=${MULTIBUILD_VARIANT}"
+ "--prefix=/usr" )
+
+ perl Configure.pl "${myconfargs[@]}" || die
+ popd || die
+}
+
+nqp_compile() {
+ if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \
+ JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
+ elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}"
+ fi
+}
+
+nqp_test() {
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ test
+}
+
+nqp_install() {
+ # This is the actual reason we need multibuild.eclass.
+ # We need to distinguish the install procedure for MoarVM and JVM backends.
+ case "${MULTIBUILD_VARIANT}" in
+ moar)
+ emake \
+ DESTDIR="${ED}" \
+ -C "${BUILD_DIR}" \
+ install
+ ;;
+ jvm)
+ pushd "${BUILD_DIR}" > /dev/null || die
+ # Set JAVA_PKG_JARDEST early.
+ java-pkg_init_paths_
+
+ # Upstream sets the classpath to this location. Perhaps it's
+ # used to locate the additional libraries?
+ java-pkg_addcp "${JAVA_PKG_JARDEST}"
+
+ insinto "${JAVA_PKG_JARDEST}"
+ local jar
+
+ for jar in *.jar; do
+ if has ${jar} ${PN}.jar ${PN}-runtime.jar; then
+ # jars for NQP itself.
+ java-pkg_dojar ${jar}
+ else
+ # jars used by NQP.
+ doins ${jar}
+ fi
+ done
+
+ # Upstream uses -Xbootclasspath/a, which is faster due to lack
+ # of verification, but gjl isn't flexible enough yet. :(
+ java-pkg_dolauncher ${PN}-j --main ${PN}
+ dosym ${PN}-j /usr/bin/${PN}
+ dobin tools/jvm/eval-client.pl
+ popd > /dev/null || die
+ ;;
+ *)
+ die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}."
+ ;;
+ esac
+}
+
+src_configure() {
+ multibuild_foreach_variant nqp_configure
+}
+
+src_compile() {
+ multibuild_foreach_variant nqp_compile
+}
+
+src_test() {
+ multibuild_foreach_variant nqp_test
+}
+
+src_install() {
+ multibuild_foreach_variant nqp_install
+
+ dodoc CREDITS README.pod
+ use doc && dodoc -r docs/*
+}
diff --git a/dev-lang/nqp/nqp-2017.08.ebuild b/dev-lang/nqp/nqp-2017.08.ebuild
new file mode 100644
index 000000000000..1bf3d499cb6a
--- /dev/null
+++ b/dev-lang/nqp/nqp-2017.08.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit java-pkg-opt-2 multibuild
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/perl6/${PN}.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
+ inherit vcs-snapshot
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
+HOMEPAGE="http://rakudo.org/"
+
+LICENSE="Artistic-2"
+SLOT="0"
+IUSE="doc clang java +moar test"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="java? (
+ dev-java/asm:4
+ dev-java/jline:0
+ dev-java/jna:4
+ )
+ moar? ( ~dev-lang/moarvm-2017.08.1[clang=] )"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.7 )"
+DEPEND="${CDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.7 )
+ dev-lang/perl"
+
+pkg_pretend() {
+ if has_version dev-lang/rakudo || has_version dev-lang/nqp; then
+ ewarn "NQP is known to fail compilation/installation with Rakudo and/or NQP"
+ ewarn "already being installed. So if it fails, try uninstalling both"
+ ewarn "dev-lang/nqp and dev-lang/rakudo, then do a new installation."
+ ewarn "(see Bug #584394)"
+ fi
+}
+
+java_prepare() {
+ # Don't clean stage0 jars.
+ einfo "Cleaning upstream jars"
+ java-pkg_clean 3rdparty/
+
+ # Don't use jars we just deleted.
+ sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \
+ src/vm/jvm/runners/nqp-j || die
+}
+
+src_prepare() {
+ MULTIBUILD_VARIANTS=()
+ use moar && MULTIBUILD_VARIANTS+=( moar )
+ use java && MULTIBUILD_VARIANTS+=( jvm )
+
+ multibuild_copy_sources
+
+ # This will pull in conditional java_prepare
+ default
+}
+
+nqp_configure() {
+ pushd "${BUILD_DIR}" > /dev/null || die
+ local myconfargs=(
+ "--backend=${MULTIBUILD_VARIANT}"
+ "--prefix=/usr" )
+
+ perl Configure.pl "${myconfargs[@]}" || die
+ popd || die
+}
+
+nqp_compile() {
+ if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \
+ JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
+ elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}"
+ fi
+}
+
+nqp_test() {
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ test
+}
+
+nqp_install() {
+ # This is the actual reason we need multibuild.eclass.
+ # We need to distinguish the install procedure for MoarVM and JVM backends.
+ case "${MULTIBUILD_VARIANT}" in
+ moar)
+ emake \
+ DESTDIR="${ED}" \
+ -C "${BUILD_DIR}" \
+ install
+ ;;
+ jvm)
+ pushd "${BUILD_DIR}" > /dev/null || die
+ # Set JAVA_PKG_JARDEST early.
+ java-pkg_init_paths_
+
+ # Upstream sets the classpath to this location. Perhaps it's
+ # used to locate the additional libraries?
+ java-pkg_addcp "${JAVA_PKG_JARDEST}"
+
+ insinto "${JAVA_PKG_JARDEST}"
+ local jar
+
+ for jar in *.jar; do
+ if has ${jar} ${PN}.jar ${PN}-runtime.jar; then
+ # jars for NQP itself.
+ java-pkg_dojar ${jar}
+ else
+ # jars used by NQP.
+ doins ${jar}
+ fi
+ done
+
+ # Upstream uses -Xbootclasspath/a, which is faster due to lack
+ # of verification, but gjl isn't flexible enough yet. :(
+ java-pkg_dolauncher ${PN}-j --main ${PN}
+ dosym ${PN}-j /usr/bin/${PN}
+ dobin tools/jvm/eval-client.pl
+ popd > /dev/null || die
+ ;;
+ *)
+ die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}."
+ ;;
+ esac
+}
+
+src_configure() {
+ multibuild_foreach_variant nqp_configure
+}
+
+src_compile() {
+ multibuild_foreach_variant nqp_compile
+}
+
+src_test() {
+ multibuild_foreach_variant nqp_test
+}
+
+src_install() {
+ multibuild_foreach_variant nqp_install
+
+ dodoc CREDITS README.pod
+ use doc && dodoc -r docs/*
+}
diff --git a/dev-lang/nqp/nqp-2017.09.ebuild b/dev-lang/nqp/nqp-2017.09.ebuild
new file mode 100644
index 000000000000..f171bb707fb9
--- /dev/null
+++ b/dev-lang/nqp/nqp-2017.09.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit java-pkg-opt-2 multibuild
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/perl6/${PN}.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
+ inherit vcs-snapshot
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
+HOMEPAGE="http://rakudo.org/"
+
+LICENSE="Artistic-2"
+SLOT="0"
+IUSE="doc clang java +moar test"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="java? (
+ dev-java/asm:4
+ dev-java/jline:0
+ dev-java/jna:4
+ )
+ moar? ( ~dev-lang/moarvm-2017.09.1[clang=] )"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.7 )"
+DEPEND="${CDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.7 )
+ dev-lang/perl"
+
+pkg_pretend() {
+ if has_version dev-lang/rakudo || has_version dev-lang/nqp; then
+ ewarn "NQP is known to fail compilation/installation with Rakudo and/or NQP"
+ ewarn "already being installed. So if it fails, try uninstalling both"
+ ewarn "dev-lang/nqp and dev-lang/rakudo, then do a new installation."
+ ewarn "(see Bug #584394)"
+ fi
+}
+
+java_prepare() {
+ # Don't clean stage0 jars.
+ einfo "Cleaning upstream jars"
+ java-pkg_clean 3rdparty/
+
+ # Don't use jars we just deleted.
+ sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \
+ src/vm/jvm/runners/nqp-j || die
+}
+
+src_prepare() {
+ MULTIBUILD_VARIANTS=()
+ use moar && MULTIBUILD_VARIANTS+=( moar )
+ use java && MULTIBUILD_VARIANTS+=( jvm )
+
+ multibuild_copy_sources
+
+ # This will pull in conditional java_prepare
+ default
+}
+
+nqp_configure() {
+ pushd "${BUILD_DIR}" > /dev/null || die
+ local myconfargs=(
+ "--backend=${MULTIBUILD_VARIANT}"
+ "--prefix=/usr" )
+
+ perl Configure.pl "${myconfargs[@]}" || die
+ popd || die
+}
+
+nqp_compile() {
+ if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \
+ JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
+ elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}"
+ fi
+}
+
+nqp_test() {
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ test
+}
+
+nqp_install() {
+ # This is the actual reason we need multibuild.eclass.
+ # We need to distinguish the install procedure for MoarVM and JVM backends.
+ case "${MULTIBUILD_VARIANT}" in
+ moar)
+ emake \
+ DESTDIR="${ED}" \
+ -C "${BUILD_DIR}" \
+ install
+ ;;
+ jvm)
+ pushd "${BUILD_DIR}" > /dev/null || die
+ # Set JAVA_PKG_JARDEST early.
+ java-pkg_init_paths_
+
+ # Upstream sets the classpath to this location. Perhaps it's
+ # used to locate the additional libraries?
+ java-pkg_addcp "${JAVA_PKG_JARDEST}"
+
+ insinto "${JAVA_PKG_JARDEST}"
+ local jar
+
+ for jar in *.jar; do
+ if has ${jar} ${PN}.jar ${PN}-runtime.jar; then
+ # jars for NQP itself.
+ java-pkg_dojar ${jar}
+ else
+ # jars used by NQP.
+ doins ${jar}
+ fi
+ done
+
+ # Upstream uses -Xbootclasspath/a, which is faster due to lack
+ # of verification, but gjl isn't flexible enough yet. :(
+ java-pkg_dolauncher ${PN}-j --main ${PN}
+ dosym ${PN}-j /usr/bin/${PN}
+ dobin tools/jvm/eval-client.pl
+ popd > /dev/null || die
+ ;;
+ *)
+ die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}."
+ ;;
+ esac
+}
+
+src_configure() {
+ multibuild_foreach_variant nqp_configure
+}
+
+src_compile() {
+ multibuild_foreach_variant nqp_compile
+}
+
+src_test() {
+ multibuild_foreach_variant nqp_test
+}
+
+src_install() {
+ multibuild_foreach_variant nqp_install
+
+ dodoc CREDITS README.pod
+ use doc && dodoc -r docs/*
+}
diff --git a/dev-lang/nqp/nqp-9999.ebuild b/dev-lang/nqp/nqp-9999.ebuild
new file mode 100644
index 000000000000..5361a230c0c4
--- /dev/null
+++ b/dev-lang/nqp/nqp-9999.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit java-pkg-opt-2 multibuild
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/perl6/${PN}.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
+ inherit vcs-snapshot
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
+HOMEPAGE="http://rakudo.org/"
+
+LICENSE="Artistic-2"
+SLOT="0"
+IUSE="doc clang java +moar test"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="java? (
+ dev-java/asm:4
+ dev-java/jline:0
+ dev-java/jna:4
+ )
+ moar? ( ~dev-lang/moarvm-${PV}[clang=] )"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.7 )"
+DEPEND="${CDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.7 )
+ dev-lang/perl"
+
+pkg_pretend() {
+ if has_version dev-lang/rakudo || has_version dev-lang/nqp; then
+ ewarn "NQP is known to fail compilation/installation with Rakudo and/or NQP"
+ ewarn "already being installed. So if it fails, try uninstalling both"
+ ewarn "dev-lang/nqp and dev-lang/rakudo, then do a new installation."
+ ewarn "(see Bug #584394)"
+ fi
+}
+
+java_prepare() {
+ # Don't clean stage0 jars.
+ einfo "Cleaning upstream jars"
+ java-pkg_clean 3rdparty/
+
+ # Don't use jars we just deleted.
+ sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \
+ src/vm/jvm/runners/nqp-j || die
+}
+
+src_prepare() {
+ MULTIBUILD_VARIANTS=()
+ use moar && MULTIBUILD_VARIANTS+=( moar )
+ use java && MULTIBUILD_VARIANTS+=( jvm )
+
+ multibuild_copy_sources
+
+ # This will pull in conditional java_prepare
+ default
+}
+
+nqp_configure() {
+ pushd "${BUILD_DIR}" > /dev/null || die
+ local myconfargs=(
+ "--backend=${MULTIBUILD_VARIANT}"
+ "--prefix=/usr" )
+
+ perl Configure.pl "${myconfargs[@]}" || die
+ popd || die
+}
+
+nqp_compile() {
+ if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \
+ JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
+ elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then
+ emake -j1 \
+ -C "${BUILD_DIR}"
+ fi
+}
+
+nqp_test() {
+ emake -j1 \
+ -C "${BUILD_DIR}" \
+ test
+}
+
+nqp_install() {
+ # This is the actual reason we need multibuild.eclass.
+ # We need to distinguish the install procedure for MoarVM and JVM backends.
+ case "${MULTIBUILD_VARIANT}" in
+ moar)
+ emake \
+ DESTDIR="${ED}" \
+ -C "${BUILD_DIR}" \
+ install
+ ;;
+ jvm)
+ pushd "${BUILD_DIR}" > /dev/null || die
+ # Set JAVA_PKG_JARDEST early.
+ java-pkg_init_paths_
+
+ # Upstream sets the classpath to this location. Perhaps it's
+ # used to locate the additional libraries?
+ java-pkg_addcp "${JAVA_PKG_JARDEST}"
+
+ insinto "${JAVA_PKG_JARDEST}"
+ local jar
+
+ for jar in *.jar; do
+ if has ${jar} ${PN}.jar ${PN}-runtime.jar; then
+ # jars for NQP itself.
+ java-pkg_dojar ${jar}
+ else
+ # jars used by NQP.
+ doins ${jar}
+ fi
+ done
+
+ # Upstream uses -Xbootclasspath/a, which is faster due to lack
+ # of verification, but gjl isn't flexible enough yet. :(
+ java-pkg_dolauncher ${PN}-j --main ${PN}
+ dosym ${PN}-j /usr/bin/${PN}
+ dobin tools/jvm/eval-client.pl
+ popd > /dev/null || die
+ ;;
+ *)
+ die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}."
+ ;;
+ esac
+}
+
+src_configure() {
+ multibuild_foreach_variant nqp_configure
+}
+
+src_compile() {
+ multibuild_foreach_variant nqp_compile
+}
+
+src_test() {
+ multibuild_foreach_variant nqp_test
+}
+
+src_install() {
+ multibuild_foreach_variant nqp_install
+
+ dodoc CREDITS README.pod
+ use doc && dodoc -r docs/*
+}
diff --git a/dev-lang/nwcc/Manifest b/dev-lang/nwcc/Manifest
new file mode 100644
index 000000000000..45f9690b7924
--- /dev/null
+++ b/dev-lang/nwcc/Manifest
@@ -0,0 +1,7 @@
+DIST nwcc_0.8.2.tar.gz 948656 SHA256 e274626d79b98a5d869fb7edc6264957c37addce80dc028346769e73c62f9d96 SHA512 b399baf16a41ae3782343521fc65b8e94bf76dc0a29719a3addc33881bd0d9dd68170f0e7eb2c79aaafa3ced254fac15847883a38d4a5956280fa5fed10d24e0 WHIRLPOOL da2c47fdf130ff5ad7105345a16b540529adee8e3d3a9669c08db48f17da5a0fefc1aabac8c98625731c725cf9cc9e2627a0a9a393951aff6d70cb859335b7ee
+DIST nwcc_0.8.3.tar.gz 954946 SHA256 e64b16c663f2f845d6436342722d29a5e32d03602971de2d521281a18188b065 SHA512 f6af50bd18e13070b512bfac6659f49d10d3ad65ea2c4c5ca3f199c8b87540ec145c7dbbe97272f48903ca1c8afaf58c146ec763c851da0b352d5980746f94f6 WHIRLPOOL 623ef09dfd161542c45e8f5cba275be218094b6d702c46fb15aac37397ab6ec53ae5f0160620ea8e27a6f45b6ee15cefe2b3a4541624dbf7cd1aabda0284deab
+EBUILD nwcc-0.8.2.ebuild 519 SHA256 c789220f28193d026912acec6eb6e98cb45c04852b60673707eae0fcf9a20e3c SHA512 05d71f5d22bbe575e71dc79dd2645acc6adea014528522a5eedd13c89d1518d7be985cdf62fd9d43b087618658b840cfc228e2e3cc4e49259f5e623e76a0fd9e WHIRLPOOL bdd294cfd6c1d913feee1dea267dc599bbf81eff842f75e4ee7d451f6bb3f35d74a40a77d7027a2bf51a5accfa69a43ad3f15634209d58465e8a569983d6176f
+EBUILD nwcc-0.8.3.ebuild 519 SHA256 46a8de9a736b71199ac21c9c878ce6ef21ff5b4f17ecdb6dc8fa387d6288cf2d SHA512 7679de83f3a7ab1b639f4e9df2a33d4d99e9c3b3302c4dc477188c246c694f62e66144442971d49a84cfa47fcb2bb416f39a611255ad4805f4626cadda9952ff WHIRLPOOL fd3481611daa057cdef2da30ba602a241b0eaaeb2a80c418cdf257c10852fa64d3be66106f337cda07558903b6df17f226b5bf3c21718ecd267dbaa7e0810f13
+MISC ChangeLog 2853 SHA256 fcc14f3b6b69ddf0ac0afe7fc7b042e1a023f79d2412abfc27e4fa233b01e0cf SHA512 f21fae1af459c1522c5eba1facf7b6ab5d670bb58660aa476e5412b0d33845f71798769b29c20f270d29549e6ed903bfea5b5d4dc6e15c7655479672e8735aa8 WHIRLPOOL 220de3fc59415814f305c180f88f772a39b6b4ea767242e7bb58f4888325074d8616ec50cfececfb3a3f956b030f62a5ac26237444525ef53cc6b929b8ed476b
+MISC ChangeLog-2015 345 SHA256 22153c18509e95adde0d074b376f733a491e01ed6f7dba601c3602031f2d4872 SHA512 a0081dc674cf093c1390f74aa75403331173376d3ce84935ac64eb5a75b8abf31acbea47ff1008fb3bfe335ff07f935deeedaf6ce07fa823f6351de6bc95c662 WHIRLPOOL 85a84422fc3b9b0233c999af97e8a558fce172767b654dfdbe4116fbcca879df73a8a9ab2b47dfad10422a3edc01bd8e90a80ec49b4cc0f7690177b266d29834
+MISC metadata.xml 321 SHA256 3b68f716975dd32e2d29f04c033dfc8304a277651f7df4c2e31d773c948e1634 SHA512 ceb01fe0e057df4185588d4700fec480de1f44de27effe07ae1cd4a414667a6da2bf4586f17afa5601ecb6083d43753664b0a08fd4354a65a0ce55a23b620123 WHIRLPOOL d28fd2f0e5b3063c0cabf14521b0f9519b62b1e71fafc6b5e68d747b86b7a70a9a700fc2288d761ecf55f6d2c1dd36e507c7ecc868b21b9879bcef5bf0237b0b
diff --git a/dev-lang/nwcc/metadata.xml b/dev-lang/nwcc/metadata.xml
new file mode 100644
index 000000000000..8eb223c5161b
--- /dev/null
+++ b/dev-lang/nwcc/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="sourceforge">nwcc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/nwcc/nwcc-0.8.2.ebuild b/dev-lang/nwcc/nwcc-0.8.2.ebuild
new file mode 100644
index 000000000000..10d2f3f3d7db
--- /dev/null
+++ b/dev-lang/nwcc/nwcc-0.8.2.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P="${PN}_${PV}"
+
+DESCRIPTION="Nils Weller's C Compiler"
+HOMEPAGE="http://nwcc.sourceforge.net/index.html"
+SRC_URI="http://downloads.sourceforge.net/project/${PN}/${PN}/nwcc%200.8.2/${MY_P}.tar.gz"
+SLOT="0"
+LICENSE="BSD-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ # custom hackery hack
+ ABI="" ./configure --installprefix=/usr || die
+}
diff --git a/dev-lang/nwcc/nwcc-0.8.3.ebuild b/dev-lang/nwcc/nwcc-0.8.3.ebuild
new file mode 100644
index 000000000000..7cbc0ca287aa
--- /dev/null
+++ b/dev-lang/nwcc/nwcc-0.8.3.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P="${PN}_${PV}"
+
+DESCRIPTION="Nils Weller's C Compiler"
+HOMEPAGE="http://nwcc.sourceforge.net/index.html"
+SRC_URI="http://downloads.sourceforge.net/project/${PN}/${PN}/nwcc%200.8.3/${MY_P}.tar.gz"
+SLOT="0"
+LICENSE="BSD-2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ # custom hackery hack
+ ABI="" ./configure --installprefix=/usr || die
+}
diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest
new file mode 100644
index 000000000000..3993fa95e4f5
--- /dev/null
+++ b/dev-lang/ocaml/Manifest
@@ -0,0 +1,14 @@
+AUX ocaml-rebuild.sh 1120 SHA256 893320630726c58ea3b501ef16913c150c50ea9d6cd38ecd26fa0679597d3a7c SHA512 05a3e81e95533135d9895091c21621c73ae82851abd4889d64f035979eb25f8d90b60f469d7ef5e789fd1a4adffd6bbe255e6708c14c24a04f8a423507d19a40 WHIRLPOOL 11eec7641f2bced1593f21e3b4d9bc1d6156082e8e23d4abc2cfd05294dccd13a9bf5c102b60c0dcca0b565f6edbf8e7364d3236d57db18dcdd520fe05d379a6
+AUX ocaml.conf 177 SHA256 b7f7ad0ff15bec096dcb87265d87f9b0ce8f946d4a2676dd7638ca0e14bb05c1 SHA512 4f0a48b8101b77d568d8d0a852f2a21fd46b7947c5d3f975ee4cd8a9c37c993d689cf5fb53b54a6b2740cb865051dc50c74c0c373eb697fca800ca143d401aa4 WHIRLPOOL d25c9ac2a565a5384c7f645be433faac192e4c41f55a08d74e99ec022ce06132a560070bb4771b261c6f023d3aec72fddb47279d5ab2cfe8cc93c70c97ff16d5
+DIST ocaml-4.04.2.tar.gz 4061873 SHA256 6277a477956fc7b76f28af9941dce2984d0df809a0361093eb2e28234bf9c8ed SHA512 8b6a0319307cbb7451594d2f7c63851299d3e7d6ae7879e7525373304f9fd5a9b01d503ecd313a12a3cae24a4a7cb909f7aeebbb70efaa5277137189ea4558cb WHIRLPOOL b8b4fe7b86525686765cb02f221e6a75c06466cb172348474a18163648f7269bd29ca2bea4dcb890ce6fef86b91743139bfaa4e4fbda53d288d696b8572c5639
+DIST ocaml-4.05.0.tar.gz 4431750 SHA256 e5d8a6f629020c580473d8afcfcb06c3966d01929f7b734f41dc0c737cd8ea3f SHA512 9a060ae4b741e1687277403e5bdb8f6eda2e2ebf6c45f7c0149b66ea1213cb26d13febfbb3f11c12543e244cfdd053b786b09c4145e2348e5d89a7206f7de225 WHIRLPOOL 75531b9f1f229aab9813b665908bd3df10abe4648c7362584f19e3faeceecadea8fa7bda14dc17466d98d3aac9dc1ce9ca8b40de3434d861060f461c4f972845
+DIST ocaml-4.06.0-beta1.tar.gz 4558889 SHA256 d46ecd2f69782760241f56744bc41f1286d8864e38f8efb15341573577d37435 SHA512 c7ec8468bae99cd5d7b3a44ef856c3b000e60004c9acc590fd0eb0ef4acbc59a79ddee35c765171b3c58f6c1b2663194d6b0d08d668aec418f056a265dd49012 WHIRLPOOL 37b200dd7adf19acc60224b8e8dd51ef146187e00d796a25685b19717fd8d1644bb6c7a80961654db5bff44d4ab9e182c36e4b959b2888cf30718527559fb29f
+DIST ocaml-patches-10.tar.bz2 943 SHA256 4fbd5ca4ed1755f8a37d8c101342552a4f60c8c0b651e46a703b8da8a9451894 SHA512 fe39066c25267f2ff828e6746bcda5f5b1e40e22a063d83268cfcc2fcda28dbd7e714751466491385d054ba2eadff2d0a4c407d5fe5db2f98931bdde612f07e9 WHIRLPOOL 752bfc72838654b8448bb0d5516f10eba77eb399fb71953bbad129db206567340f29b8d8568c2ec728e3fe17ccb858fd161ee3d451570d9447c9f63f5d7ac582
+DIST ocaml-patches-8.tar.bz2 1803 SHA256 bce7ea483842f6e201cdf3de266928b39b5b45322315010291ed28f811720525 SHA512 fc477fbb5bdec60a3c4d3dfa110119bb579560ac0e0e57e30e076da72643bda6359c06fd3745fd3436c5d611dbbd888ec2921e9d1920f4929df633c35a797411 WHIRLPOOL ae73b5377744add3afce012b5745fafd70c0f92f75cd6cf91560e0f2ba359a91f7276afed13db145c307be9fdf79c339c2c69be6946565354c68d701fa61a4be
+DIST ocaml-patches-9.tar.bz2 1700 SHA256 1709c257536e9a8fdd25bfa651c4fb1aaff4c97596dbaa70eb4d4afc7020ae92 SHA512 cc19f9104fac69aecc5effa8cb772342e1fb61cdcd38ba0176efe04cf3d710b1c56d5178748f3bd29099af91fa684da432a8ef8d42de76dbd1b6954a255ea6c0 WHIRLPOOL 185406937ff0fdbfba3eed0e2e4267efac5aff1a15fc3cc5ea4434a57bf4a790bd21a801613d768328f3ab5046a0c85a0b73681c6711c348d0d0755a723c4857
+EBUILD ocaml-4.04.2.ebuild 3525 SHA256 34864087bd68836e6b980412904b17209961a9826cad6de135f60e176bdea9a1 SHA512 5de6fdb7e790131930308d9200a8a9d4403007a1f80430e1d80b4fc97bcf270a533c9a91413266721a4cbc83ba798b831cfe2c2ab6aa698b83a1e127c5e46795 WHIRLPOOL 9f09ab532546e9e032e88047d1795f67a4991152f3845623fa55da7fbcdff0bccdf6fce948696d63a053e107be9068e130a75d1caa7086c6ade63d80a7b504c2
+EBUILD ocaml-4.05.0.ebuild 3683 SHA256 626573c53b07fd1bf44db62403ae3cab709489563de2a78ef71158edc3f8a7f5 SHA512 21c549fd5c02f4850d7f240f386bab8e16e884909d61ff34261cc9faed4e883af766229910ac4baf5e261c4c4a11a33af85f34d29c9681161d892bed79bb859c WHIRLPOOL 8a8874ee33fb81a4873d4c77174eb69fe0b7f8388db2177e396e82658d179ba9edcaceac97d93dc8490dd5e8c351248ce454373f624d905f2d03d025bfe0322d
+EBUILD ocaml-4.06.0_beta1.ebuild 3617 SHA256 d57d16a1ddea24dc76f3a8b1ca02666f7ab52de47f815f5cbe1db1210aaebeef SHA512 203a07d771e228cf4a6f37380f43d3f92d8972e427aef417d3536e05e5e0be9377bb2877caf39121870de71423f9c962cd70269d8198175ca9d333c3fc484a7d WHIRLPOOL b116c36d643f0d0344021b6dc6dd6a5c9463c43249f8712786cfc13aaa43c3356303080c0dd015cfde537c2351b77fb28b75ce303525d837ded5bda20e48e062
+MISC ChangeLog 6950 SHA256 a6352b62089b1248b5e36ea1ed99af19b481ef6b2da7767135959785249ec140 SHA512 b016154abe9904f90f893f38f949691afc5b92fba081bfc8cd58b211b84a0f4e0b8b7253919fd3ebe69ebe97f8c3b477fe26466a55cf1f12f34b3314bf9ce9f3 WHIRLPOOL af739a72c399cdc31e19f12aa6db8e3b3dfbf1d2df310c5a7876e0664467fe7ffee068b0255e14c5cd01c1c71688700835b1b42129c9fea4be95d824cbc46dbd
+MISC ChangeLog-2015 35188 SHA256 85b9f07747d3a242acec77142ea296133a59bb9d79261d6960cf1e407a1ee2e0 SHA512 3658b2c40895f5dd5b2a74f01aa27bac1416ac2abfbfaff9176331cfe6aff3a4a81e62e222c85a5bc9f36779ca2dfda24c64fbc9e530cbfb64a0f1d221954852 WHIRLPOOL 1108b78932d6ecdc15624297ef6165168956587db4cd0c804e63554daede6be88f76860c76bc8de78131c0d10b9c344406de1eb93205765f08aa7644e4dfaea3
+MISC metadata.xml 684 SHA256 1f995f5ba1ee7b37d07d64c88f3d22b5e06cad97df407b28d3f061c766e06b0a SHA512 9b01c74d5b46a1342840bdc6a90dab0943a0072ae5c65d9edf902ab04b6f911600e8aee4c8b89e3b35a7f4e018a13eecda59c4df64e03a05ebeeb2ebededf58c WHIRLPOOL a53011ea2e5c5ba285612854a045e3901709ef30c351390b4523e3fbab88ead8f1b8a9c584bbddcb379b7a8e47fef505c2597a7a0e5427334d87badad9037388
diff --git a/dev-lang/ocaml/files/ocaml-rebuild.sh b/dev-lang/ocaml/files/ocaml-rebuild.sh
new file mode 100644
index 000000000000..7dd14a4eb7d2
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml-rebuild.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+# run like this: ocaml-rebuild.sh [-h | -f] [emerge_options]
+
+emerge=/usr/bin/emerge
+
+if [ "$1" = "-h" ]
+then
+ echo "usage: ocaml-rebuild.sh [-h | -f(orce)] [emerge_options]"
+ echo "With -f, the packages will first be unmerged and then emerged"
+ echo "with the given options to ensuree correct dependancy analysis."
+ echo "Otherwise emerge is run with the --pretend flag and the given"
+ echo "options."
+ echo "It is recommended to keep the list of rebuilt packages printed"
+ echo "in pretend mode in case something go wrong"
+ exit 1
+fi
+
+if [ "$1" = "-f" ]
+then
+ pretend=0
+ shift
+else
+ pretend=1
+fi
+
+depends=`find /var/db/pkg -name DEPEND -exec grep -l 'dev-lang/ocaml\\|dev-ml/findlib' {} \;`
+
+for dep in $depends
+do
+ dir=`dirname $dep`
+ pkg=`basename $dir`
+ category=`cat $dir/CATEGORY`
+ slot=`cat $dir/SLOT`
+
+ tobuild=">=$category/$pkg:$slot $tobuild"
+ tobuildstr="\">=$category/$pkg:$slot\" $tobuildstr"
+done
+
+if [ "$tobuild" = "" ] ; then
+ echo "Nothing to do!"
+ exit 0
+fi
+
+echo Building $tobuildstr
+
+if [ $pretend -eq 1 ]
+then
+ $emerge --pretend $@ $tobuild
+else
+ $emerge --oneshot $@ $tobuild
+fi
diff --git a/dev-lang/ocaml/files/ocaml.conf b/dev-lang/ocaml/files/ocaml.conf
new file mode 100644
index 000000000000..083b8cef960b
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml.conf
@@ -0,0 +1,5 @@
+# Rebuild all ocaml modules (must be rebuilt after each ocaml upgrade)
+[ocaml-rebuild]
+class = portage.sets.dbapi.OwnerSet
+files = /usr/lib/ocaml
+exclude-files = /usr/bin/ocaml
diff --git a/dev-lang/ocaml/metadata.xml b/dev-lang/ocaml/metadata.xml
new file mode 100644
index 000000000000..720c6c5d8b36
--- /dev/null
+++ b/dev-lang/ocaml/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>ml@gentoo.org</email>
+ <name>Gentoo ML Project</name>
+</maintainer>
+ <use>
+ <flag name="flambda">Enables the Flambda optimizer: A new intermediate representation (introduced in ocaml 4.03) in the depths of the compiler designed to allow for better inlining.</flag>
+ <flag name="spacetime">Enables the Spacetime memory profiler. See https://caml.inria.fr/pub/docs/manual-ocaml/spacetime.html for more information.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">ocaml/ocaml</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/ocaml/ocaml-4.04.2.ebuild b/dev-lang/ocaml/ocaml-4.04.2.ebuild
new file mode 100644
index 000000000000..cf9890317ecb
--- /dev/null
+++ b/dev-lang/ocaml/ocaml-4.04.2.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit flag-o-matic eutils multilib versionator toolchain-funcs
+
+PATCHLEVEL="8"
+MY_P="${P/_/-}"
+DESCRIPTION="Type-inferring functional programming language descended from the ML family"
+HOMEPAGE="http://www.ocaml.org/"
+SRC_URI="https://github.com/ocaml/ocaml/archive/${PV/_/+}.tar.gz -> ${MY_P}.tar.gz
+ mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
+
+LICENSE="QPL-1.0 LGPL-2"
+# Everytime ocaml is updated to a new version, everything ocaml must be rebuilt,
+# so here we go with the subslot.
+SLOT="0/${PV}"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="emacs flambda latex ncurses +ocamlopt X xemacs"
+
+RDEPEND="
+ sys-libs/binutils-libs:=
+ ncurses? ( sys-libs/ncurses:0= )
+ X? ( x11-libs/libX11 x11-proto/xproto )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PDEPEND="emacs? ( app-emacs/ocaml-mode )
+ xemacs? ( app-xemacs/ocaml )"
+
+S="${WORKDIR}/${MY_P}"
+pkg_setup() {
+ # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
+ # results in relocations if gcc wants to create a PIE executable
+ if gcc-specs-pie ; then
+ append-ldflags -nopie
+ ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
+ ewarn "We have appended -nopie to ocaml build options"
+ ewarn "because linking an executable with pie while the objects are not pic will not work"
+ fi
+}
+
+src_prepare() {
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+}
+
+src_configure() {
+ export LC_ALL=C
+ local myconf=""
+
+ # Causes build failures because it builds some programs with -pg,
+ # bug #270920
+ filter-flags -fomit-frame-pointer
+ # Bug #285993
+ filter-mfpmath sse
+
+ # -ggdb3 & co makes it behave weirdly, breaks sexplib
+ replace-flags -ggdb* -ggdb
+
+ # It doesn't compile on alpha without this LDFLAGS
+ use alpha && append-ldflags "-Wl,--no-relax"
+
+ use ncurses || myconf="${myconf} -no-curses"
+ use X || myconf="${myconf} -no-graph"
+ use flambda && myconf="${myconf} -flambda"
+
+ # ocaml uses a home-brewn configure script, preventing it to use econf.
+ RAW_LDFLAGS="$(raw-ldflags)" ./configure \
+ --prefix "${EPREFIX}"/usr \
+ --bindir "${EPREFIX}"/usr/bin \
+ --target-bindir "${EPREFIX}"/usr/bin \
+ --libdir "${EPREFIX}"/usr/$(get_libdir)/ocaml \
+ --mandir "${EPREFIX}"/usr/share/man \
+ -target "${CHOST}" \
+ -host "${CBUILD}" \
+ -cc "$(tc-getCC)" \
+ -as "$(tc-getAS)" \
+ -aspp "$(tc-getCC) -c" \
+ -partialld "$(tc-getLD) -r" \
+ --with-pthread ${myconf} || die "configure failed!"
+
+ # http://caml.inria.fr/mantis/view.php?id=4698
+ export CCLINKFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+ emake world
+
+ # Native code generation can be disabled now
+ if use ocamlopt ; then
+ # bug #279968
+ emake opt
+ emake opt.opt
+ fi
+}
+
+src_test() {
+ if use ocamlopt ; then
+ emake -j1 tests
+ else
+ ewarn "${PN} testsuite requires ocamlopt useflag"
+ fi
+}
+
+src_install() {
+ emake BINDIR="${ED}"/usr/bin \
+ LIBDIR="${ED}"/usr/$(get_libdir)/ocaml \
+ MANDIR="${ED}"/usr/share/man \
+ install
+
+ # Symlink the headers to the right place
+ dodir /usr/include
+ dosym /usr/$(get_libdir)/ocaml/caml /usr/include/caml
+
+ dodoc Changes README.adoc
+
+ # Create and envd entry for latex input files
+ if use latex ; then
+ echo "TEXINPUTS=${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:" > "${T}"/99ocamldoc
+ doenvd "${T}"/99ocamldoc
+ fi
+
+ # Install ocaml-rebuild portage set
+ insinto /usr/share/portage/config/sets
+ doins "${FILESDIR}/ocaml.conf"
+}
diff --git a/dev-lang/ocaml/ocaml-4.05.0.ebuild b/dev-lang/ocaml/ocaml-4.05.0.ebuild
new file mode 100644
index 000000000000..a7d4ff33ac53
--- /dev/null
+++ b/dev-lang/ocaml/ocaml-4.05.0.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit flag-o-matic eutils multilib versionator toolchain-funcs
+
+PATCHLEVEL="9"
+MY_P="${P/_/-}"
+DESCRIPTION="Type-inferring functional programming language descended from the ML family"
+HOMEPAGE="http://www.ocaml.org/"
+SRC_URI="https://github.com/ocaml/ocaml/archive/${PV/_/+}.tar.gz -> ${MY_P}.tar.gz
+ mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
+
+LICENSE="QPL-1.0 LGPL-2"
+# Everytime ocaml is updated to a new version, everything ocaml must be rebuilt,
+# so here we go with the subslot.
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="emacs flambda latex ncurses +ocamlopt spacetime X xemacs"
+
+RDEPEND="
+ sys-libs/binutils-libs:=
+ ncurses? ( sys-libs/ncurses:0= )
+ spacetime? ( sys-libs/libunwind:= )
+ X? ( x11-libs/libX11 x11-proto/xproto )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PDEPEND="emacs? ( app-emacs/ocaml-mode )
+ xemacs? ( app-xemacs/ocaml )"
+
+S="${WORKDIR}/${MY_P}"
+pkg_setup() {
+ # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
+ # results in relocations if gcc wants to create a PIE executable
+ if gcc-specs-pie ; then
+ append-ldflags -nopie
+ ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
+ ewarn "We have appended -nopie to ocaml build options"
+ ewarn "because linking an executable with pie while the objects are not pic will not work"
+ fi
+}
+
+src_prepare() {
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+}
+
+src_configure() {
+ export LC_ALL=C
+ local myconf=""
+
+ # Causes build failures because it builds some programs with -pg,
+ # bug #270920
+ filter-flags -fomit-frame-pointer
+ # Bug #285993
+ filter-mfpmath sse
+
+ # -ggdb3 & co makes it behave weirdly, breaks sexplib
+ replace-flags -ggdb* -ggdb
+
+ # It doesn't compile on alpha without this LDFLAGS
+ use alpha && append-ldflags "-Wl,--no-relax"
+
+ use ncurses || myconf="${myconf} -no-curses"
+ use X || myconf="${myconf} -no-graph"
+ use flambda && myconf="${myconf} -flambda"
+ use spacetime && myconf="${myconf} -spacetime"
+
+ # ocaml uses a home-brewn configure script, preventing it to use econf.
+ RAW_LDFLAGS="$(raw-ldflags)" ./configure \
+ --prefix "${EPREFIX}"/usr \
+ --bindir "${EPREFIX}"/usr/bin \
+ --target-bindir "${EPREFIX}"/usr/bin \
+ --libdir "${EPREFIX}"/usr/$(get_libdir)/ocaml \
+ --mandir "${EPREFIX}"/usr/share/man \
+ -target "${CHOST}" \
+ -host "${CBUILD}" \
+ -cc "$(tc-getCC)" \
+ -as "$(tc-getAS)" \
+ -aspp "$(tc-getCC) -c" \
+ -partialld "$(tc-getLD) -r" \
+ --with-pthread ${myconf} || die "configure failed!"
+
+ # http://caml.inria.fr/mantis/view.php?id=4698
+ export CCLINKFLAGS="${LDFLAGS}"
+}
+
+src_compile() {
+ emake world
+
+ # Native code generation can be disabled now
+ if use ocamlopt ; then
+ # bug #279968
+ emake opt
+ emake -j1 opt.opt
+ fi
+}
+
+src_test() {
+ if use ocamlopt ; then
+ emake -j1 tests
+ else
+ ewarn "${PN} testsuite requires ocamlopt useflag"
+ fi
+}
+
+src_install() {
+ emake BINDIR="${ED}"/usr/bin \
+ LIBDIR="${ED}"/usr/$(get_libdir)/ocaml \
+ MANDIR="${ED}"/usr/share/man \
+ install
+
+ # Symlink the headers to the right place
+ dodir /usr/include
+ dosym /usr/$(get_libdir)/ocaml/caml /usr/include/caml
+
+ dodoc Changes README.adoc
+
+ # Create and envd entry for latex input files
+ if use latex ; then
+ echo "TEXINPUTS=${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:" > "${T}"/99ocamldoc
+ doenvd "${T}"/99ocamldoc
+ fi
+
+ # Install ocaml-rebuild portage set
+ insinto /usr/share/portage/config/sets
+ doins "${FILESDIR}/ocaml.conf"
+}
diff --git a/dev-lang/ocaml/ocaml-4.06.0_beta1.ebuild b/dev-lang/ocaml/ocaml-4.06.0_beta1.ebuild
new file mode 100644
index 000000000000..0c6b2bbfed86
--- /dev/null
+++ b/dev-lang/ocaml/ocaml-4.06.0_beta1.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit flag-o-matic eutils multilib versionator toolchain-funcs
+
+PATCHLEVEL="10"
+MY_P="${P/_/-}"
+DESCRIPTION="Type-inferring functional programming language descended from the ML family"
+HOMEPAGE="http://www.ocaml.org/"
+SRC_URI="https://github.com/ocaml/ocaml/archive/${PV/_/+}.tar.gz -> ${MY_P}.tar.gz
+ mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
+
+LICENSE="QPL-1.0 LGPL-2"
+# Everytime ocaml is updated to a new version, everything ocaml must be rebuilt,
+# so here we go with the subslot.
+SLOT="0/${PV}"
+# still in beta
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="emacs flambda latex ncurses +ocamlopt spacetime X xemacs"
+
+RDEPEND="
+ sys-libs/binutils-libs:=
+ ncurses? ( sys-libs/ncurses:0= )
+ spacetime? ( sys-libs/libunwind:= )
+ X? ( x11-libs/libX11 x11-proto/xproto )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PDEPEND="emacs? ( app-emacs/ocaml-mode )
+ xemacs? ( app-xemacs/ocaml )"
+
+S="${WORKDIR}/${MY_P}"
+pkg_setup() {
+ # dev-lang/ocaml creates its own objects but calls gcc for linking, which will
+ # results in relocations if gcc wants to create a PIE executable
+ if gcc-specs-pie ; then
+ append-ldflags -nopie
+ ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
+ ewarn "We have appended -nopie to ocaml build options"
+ ewarn "because linking an executable with pie while the objects are not pic will not work"
+ fi
+}
+
+src_prepare() {
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+}
+
+src_configure() {
+ export LC_ALL=C
+ local myconf=""
+
+ # Causes build failures because it builds some programs with -pg,
+ # bug #270920
+ filter-flags -fomit-frame-pointer
+ # Bug #285993
+ filter-mfpmath sse
+
+ # -ggdb3 & co makes it behave weirdly, breaks sexplib
+ replace-flags -ggdb* -ggdb
+
+ # It doesn't compile on alpha without this LDFLAGS
+ use alpha && append-ldflags "-Wl,--no-relax"
+
+ use ncurses || myconf="${myconf} -no-curses"
+ use X || myconf="${myconf} -no-graph"
+ use flambda && myconf="${myconf} -flambda"
+ use spacetime && myconf="${myconf} -spacetime"
+
+ # ocaml uses a home-brewn configure script, preventing it to use econf.
+ RAW_LDFLAGS="$(raw-ldflags)" ./configure \
+ --prefix "${EPREFIX}"/usr \
+ --bindir "${EPREFIX}"/usr/bin \
+ --target-bindir "${EPREFIX}"/usr/bin \
+ --libdir "${EPREFIX}"/usr/$(get_libdir)/ocaml \
+ --mandir "${EPREFIX}"/usr/share/man \
+ -target "${CHOST}" \
+ -host "${CBUILD}" \
+ -cc "$(tc-getCC)" \
+ -as "$(tc-getAS)" \
+ -aspp "$(tc-getCC) -c" \
+ -partialld "$(tc-getLD) -r" \
+ --with-pthread ${myconf} || die "configure failed!"
+}
+
+src_compile() {
+ emake world
+
+ # Native code generation can be disabled now
+ if use ocamlopt ; then
+ # bug #279968
+ emake opt
+ emake -j1 opt.opt
+ fi
+}
+
+src_test() {
+ if use ocamlopt ; then
+ emake -j1 tests
+ else
+ ewarn "${PN} testsuite requires ocamlopt useflag"
+ fi
+}
+
+src_install() {
+ emake BINDIR="${ED}"/usr/bin \
+ LIBDIR="${ED}"/usr/$(get_libdir)/ocaml \
+ MANDIR="${ED}"/usr/share/man \
+ install
+
+ # Symlink the headers to the right place
+ dodir /usr/include
+ dosym ../$(get_libdir)/ocaml/caml /usr/include/caml
+
+ dodoc Changes README.adoc
+
+ # Create and envd entry for latex input files
+ if use latex ; then
+ echo "TEXINPUTS=${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:" > "${T}"/99ocamldoc
+ doenvd "${T}"/99ocamldoc
+ fi
+
+ # Install ocaml-rebuild portage set
+ insinto /usr/share/portage/config/sets
+ doins "${FILESDIR}/ocaml.conf"
+}
diff --git a/dev-lang/open-cobol/Manifest b/dev-lang/open-cobol/Manifest
new file mode 100644
index 000000000000..d17fb810568b
--- /dev/null
+++ b/dev-lang/open-cobol/Manifest
@@ -0,0 +1,5 @@
+DIST open-cobol-1.1.tar.gz 1007791 SHA256 6ae7c02eb8622c4ad55097990e9b1688a151254407943f246631d02655aec320 SHA512 eb06cec456425ba5f4a091ae4ac0bfd14f38549bc147c606a022804f602102df6dbf0d399614f0eda49d50dee17eef55087748853a8cc8bdd1248f94fd09110c WHIRLPOOL 2c1331ddd218007434af9f7d39bb10a4a2e21165549f991d9de3e8af92a16157f9c9ede5d64ec2746e64d4c46d661472950326c0a634fe10c5edbf9169dd574d
+EBUILD open-cobol-1.1.ebuild 756 SHA256 5b136e1c46208208d850737fd23226faefc7657d03c028d457b71db7dffbe3b3 SHA512 92f1d9c7153c6ed237e67a3cc82358e2e2db703ad50d7e6b87c7fabf0432d9b06212acce06a5b5cf8db8922ccba796d44e77ab4932cec9eba6be7a9ab64d9aab WHIRLPOOL 0936a0e28bedb28a92e1abe139f7ceddfff9021fa043b0f22887dd420e45e5dd5e93e8779ee53e8f7b5c890a3112e7795bf4678353e6fa905a102e9b8b7fe11f
+MISC ChangeLog 2181 SHA256 0c6adba7818722240a7956c953d61306a0cfb116f5182d6dafc9762fdd16c542 SHA512 e191b2e00be17439f9b799f17cda88f44eb58a3c3caa0a3025d5fbdf22a58a97d026a93510e8bc455fd1d7a8f49c92b262bb7435bf958dd8bf3d94af53287876 WHIRLPOOL 888d08c475e856fd0bf10c74fb90fa62e6e31d526c7e00f6c081edc6c6f064ac159247ab5e93c7830477c9122be1e5b36690d9ec3cff00c653ce8461bd018138
+MISC ChangeLog-2015 2060 SHA256 ed0493416c4620a0a242207516ee9fef70584f620e876b1c8113adb3f8b8713a SHA512 5b417a956666433699b138ce829d7170f0c3cb6c3424cb6a92f684f192580410740413fc8c576fb7d29c0da26cad8a13caaf718b6fde13d29eec3dc14f45a5ea WHIRLPOOL 58358d2589f48bae8e31ab2f08615d6b51ea2d66ddf6eef468dab108f3a411f9a1acd906cf953f795003f6e9d90104f81ae562448664ded8039ab028e86ff078
+MISC metadata.xml 327 SHA256 1d2a8be0f79f0cf003103f3d5a36b43669a5b5ea0603372a8e335054b8a8927e SHA512 955b474d83164c7c8f0259d0b644b2c2805112bd57415f6618f0c96bc87551c5bd1adb9c3de9d571e7f1cb1090c7c96b4197f82fc55ce61a28d273b67bccc518 WHIRLPOOL 25e8c2ab034ed3e9f9b9a22ebae809831adf80a29b4154b60454a44b5ff39cce6d608257467dc7a468356c8cd443cd0de76c31b7d670bf77f9b20e2512e99524
diff --git a/dev-lang/open-cobol/metadata.xml b/dev-lang/open-cobol/metadata.xml
new file mode 100644
index 000000000000..9264d5aa4508
--- /dev/null
+++ b/dev-lang/open-cobol/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="sourceforge">open-cobol</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/open-cobol/open-cobol-1.1.ebuild b/dev-lang/open-cobol/open-cobol-1.1.ebuild
new file mode 100644
index 000000000000..d3cf41c69b00
--- /dev/null
+++ b/dev-lang/open-cobol/open-cobol-1.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+DESCRIPTION="an open-source COBOL compiler"
+HOMEPAGE="http://www.opencobol.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="berkdb nls readline"
+
+RDEPEND="dev-libs/gmp
+ berkdb? ( =sys-libs/db-4* )
+ sys-libs/ncurses
+ readline? ( sys-libs/readline )"
+DEPEND="${RDEPEND}
+ sys-devel/libtool"
+
+src_compile() {
+ econf \
+ $(use_with berkdb db) \
+ $(use_enable nls) \
+ $(use_with readline) || die "econf failed."
+ emake || die "emake failed."
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/dev-lang/opendylan-bin/Manifest b/dev-lang/opendylan-bin/Manifest
new file mode 100644
index 000000000000..9a8ebd8be377
--- /dev/null
+++ b/dev-lang/opendylan-bin/Manifest
@@ -0,0 +1,18 @@
+DIST opendylan-2011.1-x86-linux.tar.bz2 31908698 SHA256 f2cd16cbb1b0494154d66ed2363af11dd2ce605a9ef7bbe06ca0241e8f77757c SHA512 345d97d71e34fd7cd923c9f53b65cb33d7edab4f2d946fd7cf9430df63cafc361ff854d444edde9d40c94bc16a3899979a34346a9ca60b9fd20e2745ff27a33b WHIRLPOOL f36fb1f7978a3d39fdca1a2ac3d51b8c19ee6adb440fbcd4282e653347d70a68bc644bb4ca06820381dd7ab83ebf1da42b91e1cd82439d239a87ed84afb14693
+DIST opendylan-2011.1-x86_64-linux.tar.bz2 36493244 SHA256 22b5299234bca0495f15185518fd3edff6bafa140d7b45f8cdeb93125ad547f2 SHA512 4241df29a762c73262ab7856aa2e7dc1b302719cf96de3a5d4878e5d7c5e15308d89b5c82d6379fb48b6badad03027427c013f27c690b6d8a372628ce81cda91 WHIRLPOOL aa4d7f9849fa782a0a7592cabb393001ed450f1f7e15ab53e47e5bbab3b40a8d51fca7aff99d792b89dfc954dcf9d4ddf1a16e9a64fc6034483762b79eab4dbd
+DIST opendylan-2012.1-x86-linux.tar.bz2 32874377 SHA256 cc7d1461c8a21f2329bce7c88bb7e8be68dde454fe35d0a14ad3d00aa2296301 SHA512 3ba1744e3dc62ab8ede681f7317ebfb3ec80bb35dd10f8c0f24fe2f77abb86157a939a69f7585a88f82233563388014cc2a686d8e2cd15c73d314d496356cb69 WHIRLPOOL 434233ded2aa1d01d888bd0336b919835ca5db4be4df62c80665dc6dd88551534c7c88c9d95bf598c2579c47b84cbcf3fa2beea7eac717e544dfc0457f505213
+DIST opendylan-2012.1-x86_64-linux.tar.bz2 47535071 SHA256 b4f1d0484f20d1d566c8a16cf214cc7cf84516db9e4f3e61b5ba648fe3f6aab7 SHA512 53b36b9ec1eff40bb9572f8a9118d18ba6674798c053678abf326d947a9e8d5dc51e2d89e9fa9dc58dd61f0c83e5d3cab4acec2af2968edbe196b8c7fe9599dc WHIRLPOOL 4f6bbbb4c05bd191b5e6ea4a3b9c1757d2497bf4ec05b2943aa02069f2f9ed2380e4a9adfcfcacd5db0bf6e2512ad4b12c2b54d8cd40aae5d02b1b5c429de8cc
+DIST opendylan-2013.1-x86-linux.tar.bz2 32974920 SHA256 994208c5fb1043a540a27a7eba06882c9c38514ec963ef9452a4f4be57d6f863 SHA512 a3b78c2c78cb0fe73a7a7d3bf13c28d9a44d451ace6c5fc9c18e67a1ed04afbb1dab1a2679279bec4fe4de7d68afc6e8fba051de5b9f26b472ee42393ed1547d WHIRLPOOL d2c2f57521287d6f19d248343b33c718b93058b5a944081c8bd3dbd6d6e4e7106e50f9429c383473ffe1a78384444b551e5ac1bb7d8dec94e739f594b1982722
+DIST opendylan-2013.1-x86_64-linux.tar.bz2 47675706 SHA256 15e211b2b88ef38849c7c9960ffaf76d7918226a3e2acf1f8bcc1de81bdec1c4 SHA512 f60dc7ee49f382375843d5887956541362461350acbd75f2e3af82887ef1bc2a5373f8db5cf0838aa627223036eb36558d3484b03f7128abbab030fc3cc717f5 WHIRLPOOL 856e8c691f7f72bc2132cd01a3a5959ba7401ea1be411baf7aa665650c6bc5d40b14f77cbdb54706098d37d5d366f201891703af943dd51e4b5299ebd146240a
+DIST opendylan-2013.2-x86-linux.tar.bz2 32953359 SHA256 055b1138decc8cd8caab444b7591c6994d0da9471d65660dcf5233ba368cc130 SHA512 e54ac273e6ca257df260efea9b680a99b53c01521b01afc6612902becc3e5a119dd3b0872124c098444d1a00ae1b436f186999ef04bf4efca484ebd9c70be346 WHIRLPOOL cf41be20aee359c86662651c3ebc88f111baa98c3aada0401376fd21f58efae0b77b67e370c334999140b8aebbe19b6b23b245b2b5ba95a93c8c8de141388aa3
+DIST opendylan-2013.2-x86_64-linux.tar.bz2 48471480 SHA256 f03c2a22d17370faffc9610d3e6b7d41d2e705619fe0918aceff5438f8caab0c SHA512 cac4205e47bee41dfa99cf059897025a60942fb0e73c970f26fffba7c77ceebcd789e0acb110ad636d6b8ebac947632e9d28e8d0887e4d4b7be2bc2791c1eeac WHIRLPOOL f256fa4fc4f97c23c03b3f4722ea92536c294f6985f1bb05e60aaf551feeca2a548539814be63495bfc6a12bc1a29206970333e6804844a9b0f7480355733cdd
+DIST opendylan-2014.1-x86-linux.tar.bz2 42086000 SHA256 8afe5af7257f5628aff56db28dd0e50b772de7da53768c7f8f669d8502c10f42 SHA512 8411db8cf56b6b4dad11d29ab49f3d9d21d93b05af2c45a5fee0cea1a56eb471b40cb6cbd622f1db995284c499a1c5a5b7d509e31ae6f4f4afe1595a2f4aab79 WHIRLPOOL ffb05dfa1c266188e0ca913731232d233d1978cdcc45a7e2b9d79f6ec5124cca751fefb8fb102d6d927bc22103afbc960d35fe5951d20a4ee0eb50252ddc74cb
+DIST opendylan-2014.1-x86_64-linux.tar.bz2 49625384 SHA256 8b4a0de4c0c957b2adbe4ec3ca29a65c7cbb539aa16db74933e8f681638d0bf4 SHA512 4d88ab8c6916e82465d846b32a86da0ec654d40a2a1310a7b05897d9bfa325c839713f46f62081b968793b3713a61cb74158c405cb724fa5fdf4c97596e1c6bf WHIRLPOOL 1a5a689bd8988ba748605769f4d510eeff040336890424441d163fb8a5da72836ad49fc8230e70fca3d63b8d3a714a38bd90bf2f36d8f2785e48d6383efc27f2
+EBUILD opendylan-bin-2011.1.ebuild 925 SHA256 db1a60a767920e1015e57c4d5cb1fb4a596baf33cd76552370ba60bf592940ac SHA512 ef1a8d3e8b9f1c2770acfb11fd7e5d6a8d5b97ebc7c047d400ddcd764c2d86027207a2cb344439640f2771759af7a2c34f66e380c3824b8220f74ed9cb79d3e8 WHIRLPOOL d6158f28816e9b9b32598d888cad271056f032bf4ebbfcc5425da1b09b98b7c318bdc0cd95c095dddeb041336804de1ad1c8fc2d43afda5b69b680904413f356
+EBUILD opendylan-bin-2012.1.ebuild 925 SHA256 81d10877941429bf53248e88abf0b9b50d20efc3f0163e6b3cfea51678f0adb9 SHA512 fb972d581895674c933403419295ec008fa551c795e9136d4d9d30cc654f1913e4319268c7529a7f644b7fa4ee94f704a391e333bffc306737a7dc5ac4369b56 WHIRLPOOL 1d9cf53c2731e5e95df392e29df16ffd8f9420d42df8df1b14046947378e343b8da73a80a18c3e83ee72a5c1ac3ebde69a4f07867c846efa55404553fb65c02c
+EBUILD opendylan-bin-2013.1.ebuild 925 SHA256 46b7c53d2a96a3859369b24bb9ae5862fb736878d79317627101024d1eb9d36e SHA512 6ba9ae76742c7697b511e321017f9f5158b53fcad24adca463f7ad9b59800a44a63e84997dc16a4c9db511f26c72a7274a4ad1554c0cd580ceb1e0c6bbdd3052 WHIRLPOOL 8d82bcee1040cf14c40b1b6098fb22dcd9e2059e4c0fb956cd63632b84bac2304799c1593eb9dfbb03bab2d132a09b72b5d73523043d5fd73bf5e94300d0eb55
+EBUILD opendylan-bin-2013.2.ebuild 925 SHA256 864b2f6251b8bfc01f1815b3f28ba53e47137919b5ab324a49a0828beeadb837 SHA512 30bc2d6c021dff7decab1579c4635d51064fa1fd283aa5d1c6d464dcadc3f0d5f513300982e74a63571f3298040c67b0ac959cd4bd9a414889119eb1017712cf WHIRLPOOL 97b714385d2be27e5973b7700a01921335790ed5556db5245bf5074ff87e1762dab61475ef0b9c71833e3a9eeef830fee9eb42ba21bbdbdfdafc2826fdb990ff
+EBUILD opendylan-bin-2014.1.ebuild 924 SHA256 f4dedb0531ce112b21c40707cc5e066f34a765b8c3014dcf85a8b235187fa14e SHA512 2f0d27d786105b6245888678b736e46823d4faad969ba6d966462a5d2004acb0242f034c80addf33b22f4b04b6ad0dd3c3eedae48d0b98ad2bdf45767c7d5c5f WHIRLPOOL abac6857c672dbb96a1acef19985e1f7d12ef4d70b4369e97142cdda62a3010a286bfc624cdf3d5d54a3c4454140d41c51c59e6524845b3e303f53ae44d626dd
+MISC ChangeLog 2464 SHA256 715b4308aa983002a628341e914a4fe738830be910ccd6e7da16d973349cd5a4 SHA512 98c1c7f3e4b795593b33c8cfe259d37ad442cd3e96971c5ba14ab4e433370c047fa69879b93834e6d677514e9341e8f5bc1f56a4664efe9216b7c614fdf03ff3 WHIRLPOOL 741dd826f4e4104ab15302abfeeacedecb48bd53555b2305ba7c5ee4ff8caf4e4f9c3706773a5316deb8e3a6e489c7030fa38b7875573b54bbf82cc67c06ce09
+MISC ChangeLog-2015 1213 SHA256 3d2a4c6c185c7afceb620a1e7bd2d9ed5eed72e2718f27fc6056beddb67e09a1 SHA512 808f0a68b08b2e5d741855f96fd8bc127a55d7e06007682767f4459188b65faa502e2ef98fada1614520519acfcc3ef4cce93dcbf40190d9ae2951d3dfaad918 WHIRLPOOL 4fa5ced77bd3abfb7e1154485e23a94faae975e325e747e031c6ba72b0542f02711a1ef8fb9d7f426f49993f221a29a79d65698909f44025fb7744981e98f256
+MISC metadata.xml 247 SHA256 0deec0776f26fb762fdf7711f4589b14f52a2456436ef557eec62a2cf2fb2bb7 SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7 WHIRLPOOL a135fa622e99d3dcdb432bc6b3c366076b3d86b4bfd9a76c852d781b8e9152541c7e7a2c7c6d6a3c4d2200dce792847a08166aaf7c17c22b6299dfe868234dec
diff --git a/dev-lang/opendylan-bin/metadata.xml b/dev-lang/opendylan-bin/metadata.xml
new file mode 100644
index 000000000000..40aa45df2b01
--- /dev/null
+++ b/dev-lang/opendylan-bin/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/dev-lang/opendylan-bin/opendylan-bin-2011.1.ebuild b/dev-lang/opendylan-bin/opendylan-bin-2011.1.ebuild
new file mode 100644
index 000000000000..52221783337d
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2011.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=4
+
+DESCRIPTION="OpenDylan language runtime environment (prebuilt)"
+
+MY_PN="opendylan"
+MY_P="${MY_PN}-${PV}"
+HOMEPAGE="http://opendylan.org"
+SRC_URI="amd64? ( http://opendylan.org/downloads/${MY_PN}/${PV}/${MY_P}-x86_64-linux.tar.bz2 )
+ x86? ( http://opendylan.org/downloads/${MY_PN}/${PV}/${MY_P}-x86-linux.tar.bz2 )"
+LICENSE="Opendylan"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+
+IUSE=""
+
+DEPEND="dev-libs/boehm-gc"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # this is a precompiled tarball
+ mkdir -p "${D}/opt/${MY_P}"
+ cp -ar "${S}"/* "${D}/opt/${MY_P}" || die "Failed to copy stuff"
+ mkdir -p "${D}/etc/env.d/opendylan"
+ echo "export PATH=/opt/opendylan-2011.1/bin:\$PATH" > "${D}/etc/env.d/opendylan/99-opendylan-bin" || die "Failed to add env settings"
+}
diff --git a/dev-lang/opendylan-bin/opendylan-bin-2012.1.ebuild b/dev-lang/opendylan-bin/opendylan-bin-2012.1.ebuild
new file mode 100644
index 000000000000..00dc28298ce0
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2012.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=4
+
+DESCRIPTION="OpenDylan language runtime environment (prebuilt)"
+
+MY_PN="opendylan"
+MY_P="${MY_PN}-${PV}"
+HOMEPAGE="http://opendylan.org"
+SRC_URI="amd64? ( http://opendylan.org/downloads/${MY_PN}/${PV}/${MY_P}-x86_64-linux.tar.bz2 )
+ x86? ( http://opendylan.org/downloads/${MY_PN}/${PV}/${MY_P}-x86-linux.tar.bz2 )"
+LICENSE="Opendylan"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+
+IUSE=""
+
+DEPEND="dev-libs/boehm-gc"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # this is a precompiled tarball
+ mkdir -p "${D}/opt/${MY_P}"
+ cp -ar "${S}"/* "${D}/opt/${MY_P}" || die "Failed to copy stuff"
+ mkdir -p "${D}/etc/env.d/opendylan"
+ echo "export PATH=/opt/opendylan-2012.1/bin:\$PATH" > "${D}/etc/env.d/opendylan/99-opendylan-bin" || die "Failed to add env settings"
+}
diff --git a/dev-lang/opendylan-bin/opendylan-bin-2013.1.ebuild b/dev-lang/opendylan-bin/opendylan-bin-2013.1.ebuild
new file mode 100644
index 000000000000..697693feb7ff
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2013.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=4
+
+DESCRIPTION="OpenDylan language runtime environment (prebuilt)"
+
+MY_PN="opendylan"
+MY_P="${MY_PN}-${PV}"
+HOMEPAGE="http://opendylan.org"
+SRC_URI="amd64? ( http://opendylan.org/downloads/${MY_PN}/${PV}/${MY_P}-x86_64-linux.tar.bz2 )
+ x86? ( http://opendylan.org/downloads/${MY_PN}/${PV}/${MY_P}-x86-linux.tar.bz2 )"
+LICENSE="Opendylan"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+
+IUSE=""
+
+DEPEND="dev-libs/boehm-gc"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # this is a precompiled tarball
+ mkdir -p "${D}/opt/${MY_P}"
+ cp -ar "${S}"/* "${D}/opt/${MY_P}" || die "Failed to copy stuff"
+ mkdir -p "${D}/etc/env.d/opendylan"
+ echo "export PATH=/opt/opendylan-2013.1/bin:\$PATH" > "${D}/etc/env.d/opendylan/99-opendylan-bin" || die "Failed to add env settings"
+}
diff --git a/dev-lang/opendylan-bin/opendylan-bin-2013.2.ebuild b/dev-lang/opendylan-bin/opendylan-bin-2013.2.ebuild
new file mode 100644
index 000000000000..38fbff4231c5
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2013.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=4
+
+DESCRIPTION="OpenDylan language runtime environment (prebuilt)"
+
+MY_PN="opendylan"
+MY_P="${MY_PN}-${PV}"
+HOMEPAGE="http://opendylan.org"
+SRC_URI="amd64? ( http://opendylan.org/downloads/${MY_PN}/${PV}/${MY_P}-x86_64-linux.tar.bz2 )
+ x86? ( http://opendylan.org/downloads/${MY_PN}/${PV}/${MY_P}-x86-linux.tar.bz2 )"
+LICENSE="Opendylan"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+
+IUSE=""
+
+DEPEND="dev-libs/boehm-gc"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # this is a precompiled tarball
+ mkdir -p "${D}/opt/${MY_P}"
+ cp -ar "${S}"/* "${D}/opt/${MY_P}" || die "Failed to copy stuff"
+ mkdir -p "${D}/etc/env.d/opendylan"
+ echo "export PATH=/opt/opendylan-2013.2/bin:\$PATH" > "${D}/etc/env.d/opendylan/99-opendylan-bin" || die "Failed to add env settings"
+}
diff --git a/dev-lang/opendylan-bin/opendylan-bin-2014.1.ebuild b/dev-lang/opendylan-bin/opendylan-bin-2014.1.ebuild
new file mode 100644
index 000000000000..9a3824c9d788
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2014.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=5
+
+DESCRIPTION="OpenDylan language runtime environment (prebuilt)"
+
+MY_PN="opendylan"
+MY_P="${MY_PN}-${PV}"
+HOMEPAGE="http://opendylan.org"
+SRC_URI="amd64? ( http://opendylan.org/downloads/${MY_PN}/${PV}/${MY_P}-x86_64-linux.tar.bz2 )
+ x86? ( http://opendylan.org/downloads/${MY_PN}/${PV}/${MY_P}-x86-linux.tar.bz2 )"
+LICENSE="Opendylan"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+
+IUSE=""
+
+DEPEND="dev-libs/boehm-gc"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # this is a precompiled tarball
+ mkdir -p "${D}/opt/${MY_P}"
+ cp -ar "${S}"/* "${D}/opt/${MY_P}" || die "Failed to copy stuff"
+ mkdir -p "${D}/etc/env.d/opendylan"
+ echo "export PATH=/opt/opendylan-${PV}/bin:\$PATH" > "${D}/etc/env.d/opendylan/99-opendylan-bin" || die "Failed to add env settings"
+}
diff --git a/dev-lang/opendylan/Manifest b/dev-lang/opendylan/Manifest
new file mode 100644
index 000000000000..d2b89bd9e360
--- /dev/null
+++ b/dev-lang/opendylan/Manifest
@@ -0,0 +1,10 @@
+DIST opendylan-2013.1-sources.tar.bz2 8441356 SHA256 69cb884d2d07a96a6793ec0f782566924e40aa8660256ddf94f0703c96f1edf5 SHA512 f5168bb9a4d2bcd372667406f2f07ed5972f3e773a5766c5f74421d6ffd10901a43cf9d6604ad2ae14d80f1b84e856f4fdca3e1546a87053939f470005a87a2f WHIRLPOOL ed6a4804c29399e65f3fbc2785f5909f3a649521de798452fb2e5ba34542806fc628383257d9198fa8338d8407c90be321d790ceffa0ee896c6ce0ceb347c528
+DIST opendylan-2013.2-sources.tar.bz2 9174284 SHA256 0bac4ca80d25f33a5bb06ebd8f0f1bf1fa6ae0000a8c0748bb5799e65986028d SHA512 f846a1d80f78b887815d2f2983314dbf6b5f424164dba9bc6ac456b40f31ab02aeb073a447df8f02b3fad6bcf6401a889abaac400d58db8e0adebcdd4e177a4d WHIRLPOOL ac6554e51b7e67af4adb13f34c8973a789816008ce071bac564dcc907e7f92e8b74d48d351023c2b80e36ec04e4018227b6dcde4f0e172a4a5debe81708589ac
+DIST opendylan-2014.1-sources.tar.bz2 8232321 SHA256 2dab54287fe32905307e160ffd3cf7c6ca31f43b0121ba363d93f1c0f34f4417 SHA512 576616cad0eb6ff8606a394834ad325858a5f45a8427adb0eefc9ebf883ab1522ec66dff6e591a367390d49f53acd160becad62679edc610ccfe63c9a3795cfc WHIRLPOOL f85e65646b32f2363991bba1f8f99121ff4bd1e8cdbe0647029c3b36dcde5ca14431a7fad3f9399692af68037c89668a59eec5fc9998fe566b1f12c5d9274488
+EBUILD opendylan-2013.1-r1.ebuild 3137 SHA256 79408e8fa7237de07df99f791277bca9325005f237807babffe45ff9c16d3214 SHA512 7fca5e3bbb560eb081dc25f544aed7e0e9d738c5bd119a6da94863293c8a49308dd06b8cc0f1ccca0cd618c22f337890fa09b2ca69e52b74d22b4307e0d17993 WHIRLPOOL 2882e40c491ddaae4588e5908e4e6465e432df390af33ad29d494b478a2bdbce48de1e00b8e28c4055c00b5275bb273ce9e941f4d2519d7ff8912c4dece4f057
+EBUILD opendylan-2013.2.ebuild 3356 SHA256 6c440dab72d2760b268e17dd461b35a9274a5b9e24862ebcc42e08d88ff70021 SHA512 a5c466c6dbdf558aa1c6338aefea0577df457f1c77a6996c100831c3eafdbd1f170da56ddf05bb6d0a152b57ae881d7df488c03328383e13227adcf2facd2301 WHIRLPOOL e00f5b132950da9eb3f666986cde4190e819f9193f90aa375e1770d471a873747d2692e1207275beb88a9fd8199047cb07c6c026c2d2ecf7646745e3f1edc813
+EBUILD opendylan-2014.1.ebuild 3239 SHA256 e03e5720095cfea9b28387644ef19c35d8e942054e37fb75e346a9bb69a8ec2f SHA512 c227c5614ee3d2f2887c1b2be228607452029ccf849f7418e50912a0b3707042a6980905b592f78f4f46f3cb391f63a275a26ae7ee3ed24299dacb8d97318ad0 WHIRLPOOL 94cb032e58b53669e993538e2682863ab2e7bf2d8aa46ed80dc684c304f2de4a7f78001a25203c7b8bf4ba593adef3de77424e7dfb55d440876f444276762777
+EBUILD opendylan-9999.ebuild 1762 SHA256 fea39d084893b3512dada5e74eb08f95c2d3243b4737a4bbabe0adbcfb1ae599 SHA512 bf1e28bf4a971db459a20e4e5bbedd1dd6ecc4a9f2af20d33295cc4c3ffe8cf54db84cadbc473cb2003951db2a3319c6ffc192a642fccf44b23296a2527e380f WHIRLPOOL d514cff23a36515d3140525ef4eff087f820455c2862d8ae782816ad5e394c63ec55856340c8d829527a778584bb74f5a8d4d497727cbe0fdb39999221234f9b
+MISC ChangeLog 2362 SHA256 537c166e382ee83ec50e59c79d183022a89d550d78f5dd67c82455b808ba1838 SHA512 c8c63569419b4612860e12bc555762c4754ae68d960baa031d9aa49d5fa4f98c373a3d51c6c952f2c22487149d9a2112ea3956f8dbdb801464f439aa4d8b4e35 WHIRLPOOL 99a249660d7b234c5823c879d5a6abd0d14ac7392ec0bc5c32a11165ef089378d68cca1d0526fa077ed4e31edd34b9719453804aff3842eda7938d45a6378a65
+MISC ChangeLog-2015 2842 SHA256 42aab4f62b3d48403383bda6accbd104703b9efee1e80cb672ce559c91ce6801 SHA512 cf1bedf06cdf0caef380c959562cf07fe079ae4759d57a96e87b24c0810b148bda310a6aabd9f4f4a435c09f35e1e8a6d65df50c69f4588a9f1aec62c29ae074 WHIRLPOOL 69aad5e31e0bb4d3238216682c5779a9d4039a6d39045fc7f3fe3432da04f7f07803c3ede2e39d2898f32d3fec721105e970e9639c8cddcf6e63945d73baf8ba
+MISC metadata.xml 247 SHA256 0deec0776f26fb762fdf7711f4589b14f52a2456436ef557eec62a2cf2fb2bb7 SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7 WHIRLPOOL a135fa622e99d3dcdb432bc6b3c366076b3d86b4bfd9a76c852d781b8e9152541c7e7a2c7c6d6a3c4d2200dce792847a08166aaf7c17c22b6299dfe868234dec
diff --git a/dev-lang/opendylan/metadata.xml b/dev-lang/opendylan/metadata.xml
new file mode 100644
index 000000000000..40aa45df2b01
--- /dev/null
+++ b/dev-lang/opendylan/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/dev-lang/opendylan/opendylan-2013.1-r1.ebuild b/dev-lang/opendylan/opendylan-2013.1-r1.ebuild
new file mode 100644
index 000000000000..17d8593892b9
--- /dev/null
+++ b/dev-lang/opendylan/opendylan-2013.1-r1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=4
+
+inherit autotools
+
+RESTRICT="test"
+
+DESCRIPTION="OpenDylan language runtime environment"
+
+HOMEPAGE="http://opendylan.org"
+SRC_URI="http://opendylan.org/downloads/${PN}/${PV}/${P}-sources.tar.bz2"
+
+LICENSE="Opendylan"
+SLOT="0"
+
+# not tested on x86
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+# the boehm-gc check is "wrong" and reported upstream
+# but for now static-libs useflag is needed
+DEPEND="app-arch/unzip
+ dev-libs/boehm-gc
+ dev-lang/perl
+ dev-perl/XML-Parser
+ || ( dev-lang/opendylan-bin dev-lang/opendylan )
+ x86? ( <dev-libs/mps-1.108 )"
+RDEPEND="${DEPEND}"
+
+# on x86 there's a dependency on mps, but the build system is a bit ... hmm ...
+# let's give it more of a chance to survive then
+NAUGHTY_FILES=(
+ sources/lib/run-time/collector.c.malloc
+ sources/lib/run-time/collector.c
+ sources/lib/run-time/pentium-win32/buffalo-collector.c
+ sources/lib/run-time/pentium-win32/heap-stats.c
+ sources/lib/run-time/heap-utils.h
+ )
+
+NAUGHTY_HEADERS=(
+ mps.h
+ mpscmv.h
+ mpscamc.h
+ mpsavm.h
+ )
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ mkdir -p build-aux
+ elibtoolize && eaclocal || die "Fail"
+ automake --foreign --add-missing # this one dies wrongfully
+ eautoconf || die "Fail"
+ # mps headers, included wrong
+ if use x86; then
+ for i in ${NAUGHTY_FILES[@]}; do
+ for header in ${NAUGHTY_HEADERS[@]}; do
+ sed -i -e "s:\"${header}\":<${header}>:" $i
+ done
+ done
+ fi
+}
+
+src_configure() {
+ if has_version =dev-lang/opendylan-bin-2013.1; then
+ PATH=/opt/opendylan-2013.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2012.1; then
+ PATH=/opt/opendylan-2012.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2011.1; then
+ PATH=/opt/opendylan-2011.1/bin/:$PATH
+ else
+ PATH=/opt/opendylan/bin:$PATH
+ fi
+ if use amd64; then
+ econf --prefix=/opt/opendylan || die
+ else
+ econf --prefix=/opt/opendylan --with-mps=/usr/include/mps/ || die
+ fi
+ if use x86; then
+ # Includedir, pointing at something wrong
+ sed -i -e 's:-I$(MPS)/code:-I$(MPS):' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps path"
+ sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mmdw.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
+ sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mpsplan.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
+ sed -i -e 's~$(MPS_LIB)/mpsplan.a~/usr/lib/mpsplan.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
+ sed -i -e 's~$(MPS_LIB)/mmdw.a~/usr/lib/mmdw.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
+ fi
+}
+
+src_compile() {
+ ulimit -s 32000 # this is naughty build system
+ emake -j1 3-stage-bootstrap || die
+}
+
+src_install() {
+ ulimit -s 32000 # this is naughty build system
+ # because of Makefile weirdness it rebuilds quite a bit here
+ # upstream has been notified
+ emake -j1 DESTDIR="${D}" install
+ mkdir -p "${D}/etc/env.d/opendylan/"
+ echo "export PATH=/opt/opendylan/bin:\$PATH" > "${D}/etc/env.d/opendylan/99-opendylan" || die "Failed to add env settings"
+}
diff --git a/dev-lang/opendylan/opendylan-2013.2.ebuild b/dev-lang/opendylan/opendylan-2013.2.ebuild
new file mode 100644
index 000000000000..6b110c128e26
--- /dev/null
+++ b/dev-lang/opendylan/opendylan-2013.2.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=4
+
+inherit autotools toolchain-funcs
+
+RESTRICT="test"
+
+DESCRIPTION="OpenDylan language runtime environment"
+
+HOMEPAGE="http://opendylan.org"
+SRC_URI="http://opendylan.org/downloads/${PN}/${PV}/${P}-sources.tar.bz2"
+
+LICENSE="Opendylan"
+SLOT="0"
+
+# not tested on x86
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+# the boehm-gc check is "wrong" and reported upstream
+# but for now static-libs useflag is needed
+DEPEND="app-arch/unzip
+ dev-libs/boehm-gc[threads]
+ dev-lang/perl
+ dev-perl/XML-Parser
+ || ( dev-lang/opendylan-bin dev-lang/opendylan )
+ x86? ( <dev-libs/mps-1.108 )"
+RDEPEND="${DEPEND}"
+
+# on x86 there's a dependency on mps, but the build system is a bit ... hmm ...
+# let's give it more of a chance to survive then
+NAUGHTY_FILES=(
+ sources/lib/run-time/collector.c.malloc
+ sources/lib/run-time/collector.c
+ sources/lib/run-time/pentium-win32/buffalo-collector.c
+ sources/lib/run-time/pentium-win32/heap-stats.c
+ sources/lib/run-time/heap-utils.h
+ )
+
+NAUGHTY_HEADERS=(
+ mps.h
+ mpscmv.h
+ mpscamc.h
+ mpsavm.h
+ )
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ # configure autodetects clang and prefers it, #527108
+ sed -i -e 's/clang//' configure.ac || die
+ mkdir -p build-aux
+ elibtoolize && eaclocal || die "Fail"
+ automake --foreign --add-missing # this one dies wrongfully
+ eautoconf || die "Fail"
+ # mps headers, included wrong
+ if use x86; then
+ for i in ${NAUGHTY_FILES[@]}; do
+ for header in ${NAUGHTY_HEADERS[@]}; do
+ sed -i -e "s:\"${header}\":<${header}>:" $i
+ done
+ done
+ fi
+}
+
+src_configure() {
+ if has_version =dev-lang/opendylan-bin-2013.2; then
+ PATH=/opt/opendylan-2013.2/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2013.1; then
+ PATH=/opt/opendylan-2013.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2012.1; then
+ PATH=/opt/opendylan-2012.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2011.1; then
+ PATH=/opt/opendylan-2011.1/bin/:$PATH
+ else
+ PATH=/opt/opendylan/bin:$PATH
+ fi
+
+ if use amd64; then
+ econf --prefix=/opt/opendylan || die
+ else
+ econf --prefix=/opt/opendylan --with-mps=/usr/include/mps/ || die
+ fi
+ if use x86; then
+ # Includedir, pointing at something wrong
+ sed -i -e 's:-I$(MPS)/code:-I$(MPS):' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps path"
+ sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mmdw.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
+ sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mpsplan.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
+ sed -i -e 's~$(MPS_LIB)/mpsplan.a~/usr/lib/mpsplan.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
+ sed -i -e 's~$(MPS_LIB)/mmdw.a~/usr/lib/mmdw.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
+ fi
+}
+
+src_compile() {
+ ulimit -s 32000 # this is naughty build system
+ emake -j1 3-stage-bootstrap || die
+}
+
+src_install() {
+ ulimit -s 32000 # this is naughty build system
+ # because of Makefile weirdness it rebuilds quite a bit here
+ # upstream has been notified
+ emake -j1 DESTDIR="${D}" install
+ mkdir -p "${D}/etc/env.d/opendylan/"
+ echo "export PATH=/opt/opendylan/bin:\$PATH" > "${D}/etc/env.d/opendylan/99-opendylan" || die "Failed to add env settings"
+}
diff --git a/dev-lang/opendylan/opendylan-2014.1.ebuild b/dev-lang/opendylan/opendylan-2014.1.ebuild
new file mode 100644
index 000000000000..b00e21ea38fb
--- /dev/null
+++ b/dev-lang/opendylan/opendylan-2014.1.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=4
+
+inherit autotools toolchain-funcs
+
+RESTRICT="test"
+
+DESCRIPTION="OpenDylan language runtime environment"
+
+HOMEPAGE="http://opendylan.org"
+SRC_URI="http://opendylan.org/downloads/${PN}/${PV}/${P}-sources.tar.bz2"
+
+LICENSE="Opendylan"
+SLOT="0"
+
+# not tested on x86
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+# the boehm-gc check is "wrong" and reported upstream
+# but for now static-libs useflag is needed
+DEPEND="app-arch/unzip
+ dev-libs/boehm-gc[threads]
+ dev-lang/perl
+ dev-perl/XML-Parser
+ || ( dev-lang/opendylan-bin dev-lang/opendylan )
+ x86? ( <dev-libs/mps-1.108 )"
+RDEPEND="${DEPEND}"
+
+# on x86 there's a dependency on mps, but the build system is a bit ... hmm ...
+# let's give it more of a chance to survive then
+NAUGHTY_FILES=(
+ sources/lib/run-time/collector.c.malloc
+ sources/lib/run-time/collector.c
+ sources/lib/run-time/pentium-win32/buffalo-collector.c
+ sources/lib/run-time/pentium-win32/heap-stats.c
+ sources/lib/run-time/heap-utils.h
+ )
+
+NAUGHTY_HEADERS=(
+ mps.h
+ mpscmv.h
+ mpscamc.h
+ mpsavm.h
+ )
+
+src_prepare() {
+ # configure autodetects clang and prefers it, #527108
+ sed -i -e 's/clang//' configure.ac || die
+ mkdir -p build-aux
+ elibtoolize && eaclocal || die "Fail"
+ automake --foreign --add-missing # this one dies wrongfully
+ eautoconf || die "Fail"
+ # mps headers, included wrong
+ if use x86; then
+ for i in ${NAUGHTY_FILES[@]}; do
+ for header in ${NAUGHTY_HEADERS[@]}; do
+ sed -i -e "s:\"${header}\":<${header}>:" $i
+ done
+ done
+ fi
+}
+
+src_configure() {
+ if has_version =dev-lang/opendylan-bin-2014.1; then
+ PATH=/opt/opendylan-2014.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2013.2; then
+ PATH=/opt/opendylan-2013.2/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2013.1; then
+ PATH=/opt/opendylan-2013.1/bin/:$PATH
+ else
+ PATH=/opt/opendylan/bin:$PATH
+ fi
+
+ if use amd64; then
+ econf --prefix=/opt/opendylan || die
+ else
+ econf --prefix=/opt/opendylan --with-mps=/usr/include/mps/ || die
+ fi
+ if use x86; then
+ # Includedir, pointing at something wrong
+ sed -i -e 's:-I$(MPS)/code:-I$(MPS):' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps path"
+ sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mmdw.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
+ sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mpsplan.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
+ sed -i -e 's~$(MPS_LIB)/mpsplan.a~/usr/lib/mpsplan.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
+ sed -i -e 's~$(MPS_LIB)/mmdw.a~/usr/lib/mmdw.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
+ fi
+}
+
+src_compile() {
+ ulimit -s 32000 # this is naughty build system
+ emake -j1 3-stage-bootstrap || die
+}
+
+src_install() {
+ ulimit -s 32000 # this is naughty build system
+ # because of Makefile weirdness it rebuilds quite a bit here
+ # upstream has been notified
+ emake -j1 DESTDIR="${D}" install
+ mkdir -p "${D}/etc/env.d/opendylan/"
+ echo "export PATH=/opt/opendylan/bin:\$PATH" > "${D}/etc/env.d/opendylan/99-opendylan" || die "Failed to add env settings"
+}
diff --git a/dev-lang/opendylan/opendylan-9999.ebuild b/dev-lang/opendylan/opendylan-9999.ebuild
new file mode 100644
index 000000000000..d97d8c1cbba9
--- /dev/null
+++ b/dev-lang/opendylan/opendylan-9999.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=4
+
+inherit autotools git-2
+
+RESTRICT="test"
+
+DESCRIPTION="OpenDylan language runtime environment"
+
+HOMEPAGE="http://opendylan.org"
+EGIT_HAS_SUBMODULES="1"
+EGIT_REPO_URI="https://github.com/dylan-lang/opendylan.git"
+
+LICENSE="Opendylan"
+SLOT="0"
+
+IUSE=""
+
+DEPEND="dev-libs/boehm-gc[threads]
+ dev-lang/perl
+ dev-perl/XML-Parser
+ || ( dev-lang/opendylan-bin dev-lang/opendylan )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ mkdir -p build-aux
+ elibtoolize && eaclocal || die "Fail"
+ automake --foreign --add-missing # this one dies wrongfully
+ eautoconf || die "Fail"
+
+ # quick hack
+ sed -i -e 's:/usr/local:/usr:' admin/builds/fdmake.pl || die
+}
+
+src_configure() {
+ if has_version =dev-lang/opendylan-bin-2014.1; then
+ PATH=/opt/opendylan-2014.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2013.2; then
+ PATH=/opt/opendylan-2013.2/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2013.1; then
+ PATH=/opt/opendylan-2013.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2012.1; then
+ PATH=/opt/opendylan-2012.1/bin/:$PATH
+ elif has_version =dev-lang/opendylan-bin-2011.1; then
+ PATH=/opt/opendylan-2011.1/bin/:$PATH
+ else
+ PATH=/opt/opendylan/bin/:$PATH
+ fi
+ econf --prefix=/opt/opendylan || die
+}
+
+src_compile() {
+ ulimit -s 32000 # this is naughty build system
+ emake -j1 || die
+}
+
+src_install() {
+ ulimit -s 32000 # this is naughty build system
+ # because of Makefile weirdness it rebuilds quite a bit here
+ # upstream has been notified
+ emake -j1 DESTDIR="${D}" install
+ mkdir -p "${D}/etc/env.d/opendylan/"
+ echo "export PATH=/opt/opendylan/bin:\$PATH" > "${D}/etc/env.d/opendylan/opendylan" || die "Failed to add env settings"
+}
diff --git a/dev-lang/orc/Manifest b/dev-lang/orc/Manifest
new file mode 100644
index 000000000000..ba4e4c1d9d34
--- /dev/null
+++ b/dev-lang/orc/Manifest
@@ -0,0 +1,7 @@
+DIST orc-0.4.26.tar.xz 465768 SHA256 7d52fa80ef84988359c3434e1eea302d077a08987abdde6905678ebcad4fa649 SHA512 c0b02d4f00b7cc45c5952a4db4f63629bbcbc4d338bbe69fd2743198f2b346bf437742a7a8e1d308f765caf1b43f7fab75add7ebf69897bc0e335a169eef7326 WHIRLPOOL 019891cc9272315666b9b68eb439002192d676794bb7b8b490353991b152a6deadb5171bf46b0e4894c2372b77935e2578b9a0221e6172a8ccfa6f7966983c8c
+DIST orc-0.4.27.tar.xz 465116 SHA256 51e53e58fc8158e5986a1f1a49a6d970c5b16493841cf7b9de2c2bde7ce36b93 SHA512 5ca0b4553e370ea7c95acfc8248d9d568dafc9577041d47f52c7d0945456c534e18e0e80d28df9301d6deac1ea4f8ea6a51ca373b32927c8724846d8ec1f73e8 WHIRLPOOL 6f39e17e22c2b2f515f6081432e670fc04df81f5ebd3a1da7009eef2ca69476b91c767fdae3086bb4ff9ece52668eadd2332026dc0d457f62f870d3d9b7b10af
+EBUILD orc-0.4.26-r1.ebuild 1832 SHA256 18083d0245d00cb636299488611c0245dd63134c1bbbeadc8d6968a0bf538fca SHA512 3a66189a789f995069dc8869fb33846306f4a0e5ff3419bae1e921c26b1187615e17ca6c6f4647eed8e4fc0ab4f5e03a6df0a3dfe762a9090aa409912cfe4497 WHIRLPOOL df7636091dd920da8a913d073861db0d32ae967c1783f512b40aa32ca29f8dbba0cf80e378dd5a2bd64a29b2827567f095b484748e6cc226c2ce5aeb15c6a77b
+EBUILD orc-0.4.27.ebuild 1837 SHA256 b16a436e5b2ba9be805e1bfdabbdfdb76896d286a417ad45cd270536ac7ee706 SHA512 18a3fadc0391cac84045d2e12b5a419813c655abc2f307eee6481584bad309d34edd168e2985e0a5c557bcf95aaa3d9c8f39c176d6767465688c75f97564e24e WHIRLPOOL 56f2f7326e617b0963ffb7de359fd62b1a4af787ad1cf72c9a0f09b9f0e3f73b7434b45e74a02c55530c8b6f1b22c35785f94acfa77efef23fb7b4bce73a619a
+MISC ChangeLog 6599 SHA256 b7bb8d0ab7ea85c55b3d7b604206fc1ee984803b0eb9bea3297dff020d5364c8 SHA512 4616cf1ef6f86c1b63b11be69f28ece29599dbf926d15c1dff85d7ac6e485c4c38690a528e9ed1188c203d44f9ba6eb347b89939b644c56ea320442ee993e6f2 WHIRLPOOL c3d349fc974efccf86cf2daab1a5f4145190c7fff172af829eb03af69afe03875db06022edd8f86d1fa37736b11e895d2d3ec0f4125899576458378eed207d30
+MISC ChangeLog-2015 7513 SHA256 20c923d910ddd2cd06438c3800fa6e74e9a822d0b30f5ddf721ab19fe79a038a SHA512 249d1757e4ce2571718b044bf9f517b76675503fa67ab72140b9d3c6dfe1428a9bc86fc5ee4acc8cb540d6dda69d5a820c6ca126ba023af548f88772b7cc16c4 WHIRLPOOL 5ccca341698ac644675b09aca4a3e33bb15af7f19a22a2bf6a09a6112da0a474bcfc64441eefc49eb4c660e17e4010b10a8a3b1220c24ca8a41b93609a9e6ec0
+MISC metadata.xml 354 SHA256 aef8d46e9f5a25a0382464e1cf4e0c0b9b0ad40a6aa03f60d3ea8125b4988cef SHA512 4f17c4c3faa3f2c5feaefe4727b3500360f7cc5486c794e9a34608c3e437b4e2cc266bc9e0e2b3824952a8da62421fda59e9bc5140ee88898f8f7bdde402762f WHIRLPOOL b25b9556b593f69aa57a7f510a2980054bfceb1068fc01a6f9599b71120fdb4b68698e2e6e4d3a4d0c2081fddab5065679a977147a14334ff8d6208715e15195
diff --git a/dev-lang/orc/metadata.xml b/dev-lang/orc/metadata.xml
new file mode 100644
index 000000000000..2ac858de72bb
--- /dev/null
+++ b/dev-lang/orc/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>gstreamer@gentoo.org</email>
+ <name>GStreamer package maintainers</name>
+</maintainer>
+<use>
+ <flag name="pax_kernel">Apply patch needed for pax enabled kernels.</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-lang/orc/orc-0.4.26-r1.ebuild b/dev-lang/orc/orc-0.4.26-r1.ebuild
new file mode 100644
index 000000000000..abf52976ec57
--- /dev/null
+++ b/dev-lang/orc/orc-0.4.26-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils flag-o-matic multilib-minimal pax-utils
+
+DESCRIPTION="The Oil Runtime Compiler, a just-in-time compiler for array operations"
+HOMEPAGE="https://gstreamer.freedesktop.org/"
+SRC_URI="https://gstreamer.freedesktop.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="BSD BSD-2"
+SLOT="0"
+KEYWORDS="amd64 arm ~arm64 hppa ppc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="examples pax_kernel static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ >=dev-util/gtk-doc-am-1.12
+"
+
+src_prepare() {
+ default
+
+ # Do not build examples
+ sed -e '/SUBDIRS/ s:examples::' \
+ -i Makefile.am Makefile.in || die
+}
+
+multilib_src_configure() {
+ # any optimisation on PPC/Darwin yields in a complaint from the assembler
+ # Parameter error: r0 not allowed for parameter %lu (code as 0 not r0)
+ # the same for Intel/Darwin, although the error message there is different
+ # but along the same lines
+ [[ ${CHOST} == *-darwin* ]] && filter-flags -O*
+
+ # FIXME: handle backends per arch ?
+ ECONF_SOURCE="${S}" econf \
+ --disable-gtk-doc \
+ --enable-backend=all \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ prune_libtool_files --all
+
+ if use pax_kernel; then
+ pax-mark m "${ED}"usr/bin/orc-bugreport
+ pax-mark m "${ED}"usr/bin/orcc
+ pax-mark m "${ED}"usr/$(get_libdir)/liborc*.so*
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/{*.c,*.orc}
+ fi
+}
+
+pkg_postinst() {
+ if use pax_kernel; then
+ ewarn "Please run \"revdep-pax\" after installation".
+ ewarn "It's provided by sys-apps/elfix."
+ fi
+}
diff --git a/dev-lang/orc/orc-0.4.27.ebuild b/dev-lang/orc/orc-0.4.27.ebuild
new file mode 100644
index 000000000000..537d29d59cfe
--- /dev/null
+++ b/dev-lang/orc/orc-0.4.27.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils flag-o-matic multilib-minimal pax-utils
+
+DESCRIPTION="The Oil Runtime Compiler, a just-in-time compiler for array operations"
+HOMEPAGE="https://gstreamer.freedesktop.org/"
+SRC_URI="https://gstreamer.freedesktop.org/src/${PN}/${P}.tar.xz"
+
+LICENSE="BSD BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="examples pax_kernel static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ >=dev-util/gtk-doc-am-1.12
+"
+
+src_prepare() {
+ default
+
+ # Do not build examples
+ sed -e '/SUBDIRS/ s:examples::' \
+ -i Makefile.am Makefile.in || die
+}
+
+multilib_src_configure() {
+ # any optimisation on PPC/Darwin yields in a complaint from the assembler
+ # Parameter error: r0 not allowed for parameter %lu (code as 0 not r0)
+ # the same for Intel/Darwin, although the error message there is different
+ # but along the same lines
+ [[ ${CHOST} == *-darwin* ]] && filter-flags -O*
+
+ # FIXME: handle backends per arch ?
+ ECONF_SOURCE="${S}" econf \
+ --disable-gtk-doc \
+ --enable-backend=all \
+ $(use_enable static-libs static)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+ prune_libtool_files --all
+
+ if use pax_kernel; then
+ pax-mark m "${ED}"usr/bin/orc-bugreport
+ pax-mark m "${ED}"usr/bin/orcc
+ pax-mark m "${ED}"usr/$(get_libdir)/liborc*.so*
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/{*.c,*.orc}
+ fi
+}
+
+pkg_postinst() {
+ if use pax_kernel; then
+ ewarn "Please run \"revdep-pax\" after installation".
+ ewarn "It's provided by sys-apps/elfix."
+ fi
+}
diff --git a/dev-lang/parrot/Manifest b/dev-lang/parrot/Manifest
new file mode 100644
index 000000000000..afbfbc4b4569
--- /dev/null
+++ b/dev-lang/parrot/Manifest
@@ -0,0 +1,11 @@
+DIST parrot-7.1.0.tar.gz 4688341 SHA256 fe2cac1f5b811f36d6de7454ef1ff394ad66474f203813e5369b4dc68305964b SHA512 b7d261e82934aa84b3d93b2e68b3eb0f13dea684665ca2448a0e2139aa6676c1ff2da1a8056332a7f2538bee6158953be5bceed0ac8a9b277827ec7bcba46cb8 WHIRLPOOL 8083787f8779664e4ec7b3426b3e103dff9a22dfb18051e7617b6738b44156e1084f1691ce02e5869abba4d6455628c30631a9b5c86bc90779e6d2051e85d87b
+DIST parrot-7.11.0.tar.gz 4703987 SHA256 02c7bb4ce1f7b1643e57393bf58536a15c3c2edfa0d70870cf5aa4e38988a72e SHA512 6f321a7d92b43413bc8cf2d2a03378e27de49573968471ad833232f90f0b61eae81626a80be94d84a783153c5beca3ba57c31fcc861b8b3c6cd33cd2d433a19a WHIRLPOOL 726099fe77580aee4cd5d6fe40510b8b1802c734182da1266aa0e22bba09d9974585732b66a0a3741235c72f724f06e67942d9a6485883229d718fc05f391851
+DIST parrot-7.5.0.tar.gz 4693149 SHA256 71c25d2eb0798f1fc1c0890f6e4aed9d5f2a6e4e248456b3502f7721758267fe SHA512 6c009dec6bdb9f419b20f3bb6c103b16018b27b2ed0094f13c957f66d9735cfc126c15f787d4ce577cd0c6492d61264c35c23d50ab29517b65f00df7c4b4d619 WHIRLPOOL 7c0da3ad36d92cdae3d89de5f0938a4744c87301d8d0e76fec9bf7421dda7459ab083e112867702cfb6cfee3f308c856e5d7dcb547b35d27754d23e98dff8c3c
+DIST parrot-8.1.0.tar.gz 4700495 SHA256 35850eaea19953d85640a1edeb12da879a94df0812b448dabe9bedc6cf86673a SHA512 f5c4ffeb22a8f4949081ba9d98e3129eb067f6f0ed139248ca1d521570ccbada5dfa69ca2e390868a00ed275780552a5cd06eb271ff14ff753bf8375b7c658c2 WHIRLPOOL 1b0b5f0c658047b7db89edeecb5e72eae868c59e55668e68d0c51dfb758345f0fe9418185af095b334266cfb8ee224231f687e06693eab30e2fd6cc0b0763ca3
+EBUILD parrot-7.1.0.ebuild 2344 SHA256 05c02f687f325fd2a675a5d8c6472a24564fb80ed981d877114f02608acb2c7d SHA512 1cb703ee015f94462940036a88313e57213bf08c7b9f58822daa674aa4f8c772b7a7fae29e89d8006fb563dcce96843a4e3758a09dc963c34dab1eee2ef1b80d WHIRLPOOL ec3fade4acfde1885624957d92caaaa7ceb6c53d881198cc94f2eb24614f83e0471ca8a0ddc4d08ddcb1df5e273102657a570080edc867a8ac49064747cc0844
+EBUILD parrot-7.11.0.ebuild 2345 SHA256 9e3c499983e24df20e831afabede0e73c6fb2dd9d2cf3be0654b828d4a1beb3a SHA512 d2ffb1d58e4901e6da667154f8f295b8ddf234a07974c51f044d69cbf82ed37456e9e51a9327c2cab742eda6260af3890c23ed9b349606d87260a1d3e7b62d33 WHIRLPOOL 6114b6c47dad522954c476877c04a33c5bf5c62531eb33b8a5f6327cff51507fe8740b3a235f87af444262bfa9566b0de686009d75f3ebeea414a6c1c6a2e465
+EBUILD parrot-7.5.0.ebuild 2345 SHA256 9e3c499983e24df20e831afabede0e73c6fb2dd9d2cf3be0654b828d4a1beb3a SHA512 d2ffb1d58e4901e6da667154f8f295b8ddf234a07974c51f044d69cbf82ed37456e9e51a9327c2cab742eda6260af3890c23ed9b349606d87260a1d3e7b62d33 WHIRLPOOL 6114b6c47dad522954c476877c04a33c5bf5c62531eb33b8a5f6327cff51507fe8740b3a235f87af444262bfa9566b0de686009d75f3ebeea414a6c1c6a2e465
+EBUILD parrot-8.1.0.ebuild 2345 SHA256 9e3c499983e24df20e831afabede0e73c6fb2dd9d2cf3be0654b828d4a1beb3a SHA512 d2ffb1d58e4901e6da667154f8f295b8ddf234a07974c51f044d69cbf82ed37456e9e51a9327c2cab742eda6260af3890c23ed9b349606d87260a1d3e7b62d33 WHIRLPOOL 6114b6c47dad522954c476877c04a33c5bf5c62531eb33b8a5f6327cff51507fe8740b3a235f87af444262bfa9566b0de686009d75f3ebeea414a6c1c6a2e465
+MISC ChangeLog 3041 SHA256 4672ecd76f277f6bc7788dbdf17c33b3b76a1d86a7de9354653a73637392a042 SHA512 54a58cf9ad8db449246166a19bb71c3f9a09341090ac1dfbd22e2e31f5934264d7e4f58b908ba62b9076f82c7597015c8a58e62988acd4df08ef32b29f97e610 WHIRLPOOL 634776f103c32d4abf95b001b89d83beb0cacce2bcfd9fa585c06d979f5adb75cef06c4b27957ef6bf7c595bc0f08629113915bd58293616f2b4c06b55183001
+MISC ChangeLog-2015 13624 SHA256 8107c24611d4c72966fde2d310719f94ef208799b56aa481870cba26b82bc0d6 SHA512 84efa20109691f4b537dc68ad014df2f68fb366c77357082eb7624d7e1d6065aea9ecd0fb96bacb2c516e4df703329fd7616df34e5c68e4ea72d7b69e8dfbc5d WHIRLPOOL 1c631f089367abf981284db6e86ec1d3e768ac96cebe844d41c8426956102b39f203fed5286b8ddfaaf845ea1551ac841318e0e50846fdbeea36906794a567b3
+MISC metadata.xml 247 SHA256 27f3a316ecc7f285838d28af09f1d1b76398615a5aaee404214aa9b1fb61a7fd SHA512 9bd9ddeb07e0644027c9a1dca33f0704de6062bc6b17333adde82a177991f35265f90e1b623e3a6288fedd729597921f48e4fda17fb8d402b1b2f3fc73c6d693 WHIRLPOOL 9a6451451b71a7b374696d841572b5d2dca769ec6bda12f582659e77274cabb0b9fed82e107a870cb9025e566b4b13cc51049c98068e137ce8c7739dacd649c3
diff --git a/dev-lang/parrot/metadata.xml b/dev-lang/parrot/metadata.xml
new file mode 100644
index 000000000000..7faa8dfe9af4
--- /dev/null
+++ b/dev-lang/parrot/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>perl@gentoo.org</email>
+ <name>Gentoo Perl Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-lang/parrot/parrot-7.1.0.ebuild b/dev-lang/parrot/parrot-7.1.0.ebuild
new file mode 100644
index 000000000000..21858f8b882d
--- /dev/null
+++ b/dev-lang/parrot/parrot-7.1.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib
+
+# weird failures
+RESTRICT="test"
+
+DESCRIPTION="Virtual machine designed to compile and execute bytecode for dynamic languages"
+HOMEPAGE="http://www.parrot.org/"
+SRC_URI="ftp://ftp.parrot.org/pub/parrot/releases/all/${PV}/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="opengl nls doc examples gdbm gmp ssl +unicode pcre"
+
+RDEPEND="sys-libs/readline
+ dev-libs/libffi
+ opengl? ( media-libs/freeglut )
+ nls? ( sys-devel/gettext )
+ unicode? ( >=dev-libs/icu-2.6:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3-r1 )
+ gmp? ( >=dev-libs/gmp-4.1.4 )
+ ssl? ( dev-libs/openssl )
+ pcre? ( dev-libs/libpcre )
+ doc? ( dev-perl/JSON )"
+
+DEPEND="dev-lang/perl[doc?]
+ ${RDEPEND}"
+
+src_configure() {
+ myconf="--disable-rpath"
+ use unicode || myconf+=" --without-icu"
+ use ssl || myconf+=" --without-crypto"
+ use gdbm || myconf+=" --without-gdbm"
+ use nls || myconf+=" --without-gettext"
+ use gmp || myconf+=" --without-gmp"
+ use opengl || myconf+=" --without-opengl"
+ use pcre || myconf+=" --without-pcre"
+
+ perl Configure.pl \
+ --ccflags="${CFLAGS}" \
+ --linkflags="${LDFLAGS}" \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --sysconfdir="${EPREFIX}"/etc \
+ --sharedstatedir="${EPREFIX}"/var/lib/parrot \
+ $myconf || die
+}
+
+src_compile() {
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"${S}"/blib/lib
+ # occasionally dies in parallel make
+ emake -j1 || die
+ if use doc ; then
+ emake -j1 html || die
+ fi
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake -j1 install-dev DESTDIR="${D}" DOC_DIR="${EPREFIX}/usr/share/doc/${PF}" || die
+ dodoc CREDITS DONORS.pod PBC_COMPAT PLATFORMS RESPONSIBLE_PARTIES TODO || die
+ dosym /usr/bin/parrot-ops2c /usr/bin/ops2c || die
+ if use examples; then
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r examples/* || die
+ fi
+ if use doc; then
+ insinto "/usr/share/doc/${PF}/editor"
+ doins -r editor || die
+ cd docs/html
+ dohtml -r developer.html DONORS.pod.html index.html ops.html parrotbug.html pdds.html \
+ pmc.html tools.html docs src tools || die
+ fi
+}
diff --git a/dev-lang/parrot/parrot-7.11.0.ebuild b/dev-lang/parrot/parrot-7.11.0.ebuild
new file mode 100644
index 000000000000..e81e39db8695
--- /dev/null
+++ b/dev-lang/parrot/parrot-7.11.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib
+
+# weird failures
+RESTRICT="test"
+
+DESCRIPTION="Virtual machine designed to compile and execute bytecode for dynamic languages"
+HOMEPAGE="http://www.parrot.org/"
+SRC_URI="ftp://ftp.parrot.org/pub/parrot/releases/all/${PV}/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="opengl nls doc examples gdbm +gmp ssl +unicode pcre"
+
+RDEPEND="sys-libs/readline
+ dev-libs/libffi
+ opengl? ( media-libs/freeglut )
+ nls? ( sys-devel/gettext )
+ unicode? ( >=dev-libs/icu-2.6:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3-r1 )
+ gmp? ( >=dev-libs/gmp-4.1.4 )
+ ssl? ( dev-libs/openssl )
+ pcre? ( dev-libs/libpcre )
+ doc? ( dev-perl/JSON )"
+
+DEPEND="dev-lang/perl[doc?]
+ ${RDEPEND}"
+
+src_configure() {
+ myconf="--disable-rpath"
+ use unicode || myconf+=" --without-icu"
+ use ssl || myconf+=" --without-crypto"
+ use gdbm || myconf+=" --without-gdbm"
+ use nls || myconf+=" --without-gettext"
+ use gmp || myconf+=" --without-gmp"
+ use opengl || myconf+=" --without-opengl"
+ use pcre || myconf+=" --without-pcre"
+
+ perl Configure.pl \
+ --ccflags="${CFLAGS}" \
+ --linkflags="${LDFLAGS}" \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --sysconfdir="${EPREFIX}"/etc \
+ --sharedstatedir="${EPREFIX}"/var/lib/parrot \
+ $myconf || die
+}
+
+src_compile() {
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"${S}"/blib/lib
+ # occasionally dies in parallel make
+ emake -j1 || die
+ if use doc ; then
+ emake -j1 html || die
+ fi
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake -j1 install-dev DESTDIR="${D}" DOC_DIR="${EPREFIX}/usr/share/doc/${PF}" || die
+ dodoc CREDITS DONORS.pod PBC_COMPAT PLATFORMS RESPONSIBLE_PARTIES TODO || die
+ dosym /usr/bin/parrot-ops2c /usr/bin/ops2c || die
+ if use examples; then
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r examples/* || die
+ fi
+ if use doc; then
+ insinto "/usr/share/doc/${PF}/editor"
+ doins -r editor || die
+ cd docs/html
+ dohtml -r developer.html DONORS.pod.html index.html ops.html parrotbug.html pdds.html \
+ pmc.html tools.html docs src tools || die
+ fi
+}
diff --git a/dev-lang/parrot/parrot-7.5.0.ebuild b/dev-lang/parrot/parrot-7.5.0.ebuild
new file mode 100644
index 000000000000..e81e39db8695
--- /dev/null
+++ b/dev-lang/parrot/parrot-7.5.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib
+
+# weird failures
+RESTRICT="test"
+
+DESCRIPTION="Virtual machine designed to compile and execute bytecode for dynamic languages"
+HOMEPAGE="http://www.parrot.org/"
+SRC_URI="ftp://ftp.parrot.org/pub/parrot/releases/all/${PV}/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="opengl nls doc examples gdbm +gmp ssl +unicode pcre"
+
+RDEPEND="sys-libs/readline
+ dev-libs/libffi
+ opengl? ( media-libs/freeglut )
+ nls? ( sys-devel/gettext )
+ unicode? ( >=dev-libs/icu-2.6:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3-r1 )
+ gmp? ( >=dev-libs/gmp-4.1.4 )
+ ssl? ( dev-libs/openssl )
+ pcre? ( dev-libs/libpcre )
+ doc? ( dev-perl/JSON )"
+
+DEPEND="dev-lang/perl[doc?]
+ ${RDEPEND}"
+
+src_configure() {
+ myconf="--disable-rpath"
+ use unicode || myconf+=" --without-icu"
+ use ssl || myconf+=" --without-crypto"
+ use gdbm || myconf+=" --without-gdbm"
+ use nls || myconf+=" --without-gettext"
+ use gmp || myconf+=" --without-gmp"
+ use opengl || myconf+=" --without-opengl"
+ use pcre || myconf+=" --without-pcre"
+
+ perl Configure.pl \
+ --ccflags="${CFLAGS}" \
+ --linkflags="${LDFLAGS}" \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --sysconfdir="${EPREFIX}"/etc \
+ --sharedstatedir="${EPREFIX}"/var/lib/parrot \
+ $myconf || die
+}
+
+src_compile() {
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"${S}"/blib/lib
+ # occasionally dies in parallel make
+ emake -j1 || die
+ if use doc ; then
+ emake -j1 html || die
+ fi
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake -j1 install-dev DESTDIR="${D}" DOC_DIR="${EPREFIX}/usr/share/doc/${PF}" || die
+ dodoc CREDITS DONORS.pod PBC_COMPAT PLATFORMS RESPONSIBLE_PARTIES TODO || die
+ dosym /usr/bin/parrot-ops2c /usr/bin/ops2c || die
+ if use examples; then
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r examples/* || die
+ fi
+ if use doc; then
+ insinto "/usr/share/doc/${PF}/editor"
+ doins -r editor || die
+ cd docs/html
+ dohtml -r developer.html DONORS.pod.html index.html ops.html parrotbug.html pdds.html \
+ pmc.html tools.html docs src tools || die
+ fi
+}
diff --git a/dev-lang/parrot/parrot-8.1.0.ebuild b/dev-lang/parrot/parrot-8.1.0.ebuild
new file mode 100644
index 000000000000..e81e39db8695
--- /dev/null
+++ b/dev-lang/parrot/parrot-8.1.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib
+
+# weird failures
+RESTRICT="test"
+
+DESCRIPTION="Virtual machine designed to compile and execute bytecode for dynamic languages"
+HOMEPAGE="http://www.parrot.org/"
+SRC_URI="ftp://ftp.parrot.org/pub/parrot/releases/all/${PV}/${P}.tar.gz"
+
+LICENSE="Artistic-2"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="opengl nls doc examples gdbm +gmp ssl +unicode pcre"
+
+RDEPEND="sys-libs/readline
+ dev-libs/libffi
+ opengl? ( media-libs/freeglut )
+ nls? ( sys-devel/gettext )
+ unicode? ( >=dev-libs/icu-2.6:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3-r1 )
+ gmp? ( >=dev-libs/gmp-4.1.4 )
+ ssl? ( dev-libs/openssl )
+ pcre? ( dev-libs/libpcre )
+ doc? ( dev-perl/JSON )"
+
+DEPEND="dev-lang/perl[doc?]
+ ${RDEPEND}"
+
+src_configure() {
+ myconf="--disable-rpath"
+ use unicode || myconf+=" --without-icu"
+ use ssl || myconf+=" --without-crypto"
+ use gdbm || myconf+=" --without-gdbm"
+ use nls || myconf+=" --without-gettext"
+ use gmp || myconf+=" --without-gmp"
+ use opengl || myconf+=" --without-opengl"
+ use pcre || myconf+=" --without-pcre"
+
+ perl Configure.pl \
+ --ccflags="${CFLAGS}" \
+ --linkflags="${LDFLAGS}" \
+ --prefix="${EPREFIX}"/usr \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --mandir="${EPREFIX}"/usr/share/man \
+ --sysconfdir="${EPREFIX}"/etc \
+ --sharedstatedir="${EPREFIX}"/var/lib/parrot \
+ $myconf || die
+}
+
+src_compile() {
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"${S}"/blib/lib
+ # occasionally dies in parallel make
+ emake -j1 || die
+ if use doc ; then
+ emake -j1 html || die
+ fi
+}
+
+src_test() {
+ emake -j1 test || die
+}
+
+src_install() {
+ emake -j1 install-dev DESTDIR="${D}" DOC_DIR="${EPREFIX}/usr/share/doc/${PF}" || die
+ dodoc CREDITS DONORS.pod PBC_COMPAT PLATFORMS RESPONSIBLE_PARTIES TODO || die
+ dosym /usr/bin/parrot-ops2c /usr/bin/ops2c || die
+ if use examples; then
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r examples/* || die
+ fi
+ if use doc; then
+ insinto "/usr/share/doc/${PF}/editor"
+ doins -r editor || die
+ cd docs/html
+ dohtml -r developer.html DONORS.pod.html index.html ops.html parrotbug.html pdds.html \
+ pmc.html tools.html docs src tools || die
+ fi
+}
diff --git a/dev-lang/pasm/Manifest b/dev-lang/pasm/Manifest
new file mode 100644
index 000000000000..735df6d3160f
--- /dev/null
+++ b/dev-lang/pasm/Manifest
@@ -0,0 +1,6 @@
+AUX pasm-1.7-ppc.patch 901 SHA256 a1899ef32fde4b2750c9818a4cc827b5adb79751e794169234e88aca5197f9c7 SHA512 685af1b74e3c3136aab30292ce6dd8fa412a1f214da23426e7ecb7fef728faf50f9dda58cadda97004b386f1244d47cde094dd09ad97c0e68de8484667c73457 WHIRLPOOL 72cacc1993ac4c4474d994a630744dd09a5a93b333a05147d071e54e4141dd4d8467163bb77435cde4586522beb2cfc9e06678013f2d538bae9461dde033a3f7
+DIST pasm.tar.gz 82136 SHA256 c8e11cccdf70e02f6bcb2edd76606bd6b745904a0858350ab739a8ea372adacd SHA512 313e4ad694704ad59619c46353c53ef9bd5529b6c9faee5cc6124dd0175f7b5a87268d2c26045f0639a0002311828b227915f30e697f8adedcd4256774674283 WHIRLPOOL 01631ddbf1c4c34487ee0558b149b5fee8b7c179ca23a764a0d6cda091d116d9488aa94e54f8d6992c78545da93972576c4611f60a7f87aa32d26a25a0d9cddd
+EBUILD pasm-1.7.ebuild 654 SHA256 403b389ab8099348d9e9399220372e67d6cf0d8c0eca8faa152175a574f9ad4a SHA512 f9c3ea8966ca341959aae88695dfdcd687227b636d0d6e40aaa0a36578e057145afc9ac4ce8f6381f4f735909967d24c871f75d269442f0f21521b6624b9fa97 WHIRLPOOL e0a48294053e3b7275cffe389a330b8e49727afe7c0a7662f9d6396a9aea1cdc7870c8eff8d101f37b8374eb461fc7981b4ef7e2c101408145680e71b091c9b6
+MISC ChangeLog 2536 SHA256 f6f1be7a9db09ff5aed8ac8cf4799d19d1e8ea944819077657dc01bbd9d9c1bc SHA512 28d320af198ee3ccfc0fcb10cbab96fed9af7112bf501bf81fcc5f48223d815634a0e3599e9081e9bb13172087e49c1ca6b06fa2357fedb9fbdddb2960f6edc8 WHIRLPOOL 9544153d9ef962bce447ec48a4ba2505ed8a30fe195e8f499217b7ee1302772aa90255e83560a8ebcf9cd9b3d7f32c1203e35aa1d7b86671b38e7245164b5a49
+MISC ChangeLog-2015 1089 SHA256 e8794a1a2b95e0943f2de8b8da4f346daf097cb45d94b82f40d58bcc5b29e4af SHA512 c4d3f109861b15c29620f9b7dbe14ae3b78114ff7141b53109ea254a5a43be0ac4629985f3cf5d1c812625c3a1a7ca6f49110e2585db371001a12e74960e5a50 WHIRLPOOL 6c817e42ebe7e7b41b7617debeae7bbbfada5dd43b7c0ed8aee8ac7ff073790d72138fcce8f0b83c7511b1d309d30017bde28c19ecef29d8e75a9d04146451d4
+MISC metadata.xml 614 SHA256 c0328c24316642afd1a98320c2a9fddf7f0400fa9bf856f2758ca770fb3c5d3d SHA512 fd8449a228746b428cddb71477efdc421fba98b60ef72e1459c790a2df9f5898163a7e4fee2e9950d176f6dbe65525d41fb676e66a004d0427886dec878095e0 WHIRLPOOL 9d1e33776fc3fd58ccd9136dc38fb49923fe38313d30f3dae65b79759bce6dee0b843d331420ca4f1df32cc4ac7572fd8d38639cb12faf53692336b6a96d423e
diff --git a/dev-lang/pasm/files/pasm-1.7-ppc.patch b/dev-lang/pasm/files/pasm-1.7-ppc.patch
new file mode 100644
index 000000000000..24ff8056b937
--- /dev/null
+++ b/dev-lang/pasm/files/pasm-1.7-ppc.patch
@@ -0,0 +1,29 @@
+diff -Naur pasm-1.6c.orig/Makefile pasm-1.6c/Makefile
+--- pasm-1.6c.orig/Makefile 2001-05-14 18:06:01.000000000 +0200
++++ pasm-1.6c/Makefile 2004-02-28 16:19:21.000000000 +0100
+@@ -14,9 +14,9 @@
+
+ # Unix
+ CC = gcc
+-COPTS = -O2 -fomit-frame-pointer -DIrix53 -DOFMT_DEFAULT=OFMT_ELF
++COPTS = $(CFLAGS) -DLinuxPPC -DOFMT_DEFAULT=OFMT_ELF
+ CLIBS = -lm
+-DIR = Irix5.3
++DIR = LinuxPPC
+
+
+ PPCobj = $(DIR)/main.o $(DIR)/support.o $(DIR)/pass.o $(DIR)/eval.o \
+diff -Naur pasm-1.6c.orig/ppcasm.h pasm-1.6c/ppcasm.h
+--- pasm-1.6c.orig/ppcasm.h 2003-11-01 13:49:29.000000000 +0100
++++ pasm-1.6c/ppcasm.h 2004-02-28 16:16:38.000000000 +0100
+@@ -162,6 +162,10 @@
+ #define MACHINE "Linux/Alpha"
+ #define LITTLEENDIAN
+ #define TYPES64BIT
++#elif defined (LinuxPPC)
++#define MACHINE "Linux/PPC"
++#define BIGENDIAN
++#define STDTYPES
+ #elif defined (Wintel) /* jab */
+ #define MACHINE "Wintel"
+ #define LITTLEENDIAN
diff --git a/dev-lang/pasm/metadata.xml b/dev-lang/pasm/metadata.xml
new file mode 100644
index 000000000000..da6813c4e7fc
--- /dev/null
+++ b/dev-lang/pasm/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-needed -->
+ <longdescription>
+ pasm is a portable assembler for processors of the PowerPC family,
+ written completely in ANSI-C. All PPC standard instructions, AltiVec
+ instructions, all 32-bit extended mnemonics and most of the 64-bit
+ extended mnemonics are supported. pasm knows about nearly 50 directives.
+ Among them are directives for macros, conditional assembly,
+ include files, base-relative addressing (small data), etc..
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/pasm/pasm-1.7.ebuild b/dev-lang/pasm/pasm-1.7.ebuild
new file mode 100644
index 000000000000..f5ccf5f9f865
--- /dev/null
+++ b/dev-lang/pasm/pasm-1.7.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+DESCRIPTION="A portable assembler for processors of the PowerPC family"
+SRC_URI="http://devnull.owl.de/~frank/${PN}.tar.gz"
+HOMEPAGE="http://sun.hasenbraten.de/~frank/projects/"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="~ppc ~ppc-macos"
+
+src_unpack() {
+ mkdir -p "${S}"/LinuxPPC
+ cd "${S}"
+ unpack ${A}
+ epatch "${FILESDIR}/${P}-ppc.patch"
+}
+
+src_compile() {
+ emake || die "Compilation failed"
+}
+
+src_install () {
+ dobin pasm || die "Failed to install pasm binary"
+ dodoc pasm.doc || die "Failed to install pasm documentation"
+}
diff --git a/dev-lang/pcc/Manifest b/dev-lang/pcc/Manifest
new file mode 100644
index 000000000000..31ec75bd38ab
--- /dev/null
+++ b/dev-lang/pcc/Manifest
@@ -0,0 +1,7 @@
+AUX pcc-1.1.0-multiarch.patch 377 SHA256 8586e0523d0623919ce54edb0ea3e96e7c777cff70541d9dfd2637d81b2c40b6 SHA512 117f4a574f7d86a5d39b88927d56843c900aee539b07639072965f8c0b30120b5900dab3c7fa8d421c9dd6ea539fa0f5b55fd34be506652185f034d071f34195 WHIRLPOOL 96a8ee414e46a7166d321f91951a498e94d22ee4c84210fa52193c477cc492a9ed2b13ca090729b4ecb64f802c85ceec0bc9521cfd848661bdae35a06e1ba2b6
+DIST pcc-1.1.0.tgz 848427 SHA256 d9e3fed84c767dcddefb6b1f854d5da8921f3f65d8bd02997743412f41474d64 SHA512 5bd2b59fbb323016d215023ce77793ae66766e8e8192b44bf0707ee444658022e1645669c13eea8c81bc55c161eea3b0271d6b3098b8a7d51ce67eb86c7527b4 WHIRLPOOL 4701a9129c39cd3079016a6d545c2cc57895799d1756e37514000d049c10ad84a6f99395af22c9f83dd2905a678ac7cbd55079ac583f7c72675b54b2ddcccd24
+EBUILD pcc-1.1.0-r1.ebuild 852 SHA256 6d4c4aa8bfb75fbe65dbfaa622dd5f4437cd1ee121fcf2a57d6680c3f3406933 SHA512 ee0ede178a5aee0f0fc7678ebc9e06e372cb6c04e5bf5e1393bb58a2202959533ba3b146111c960ea9143dc72bdffc896c831f9cd1058187e7c7b41417b22e51 WHIRLPOOL a37c68874329a69f0a039bfef0bd4d1b4186bf2ffecde64aee54cdef6567eb0b44eb7f67b441152e370068050e36777970873fbf7f51dc4d1eac87c062c100de
+EBUILD pcc-9999.ebuild 949 SHA256 8628d8a8afff30a5b996eed6ace47290e6006651830c2e682eac7dd35d5fa1bb SHA512 165eb427eb7705862c0b2178866f6615859cf4b1ad72c5bac9605eb1e6d84d38a316a65a073e1496363242dbc4bc61a42b1cccc520fbbae241f088e33f1a8ed4 WHIRLPOOL 539bed2fae62e09907beb388fa516766ca7ea98aae1ea9da46f37c3dd20624ce8afd4ce85f1f008d9ee7e5471b6def536530e69a18d180733eadaec32cf71696
+MISC ChangeLog 2248 SHA256 b7d15d20ae85bed7d7b2909ba5affb6dc5e6eab5f41da0847fa85f50ecda31eb SHA512 3c00fab837a0e4230ecc91153fbc34462157594bdf4afa48fd1059e8229564bf97ef525cd318c473fd5ad9974d3f4c9c09c6c44387d9cda3ea4d341ee6ccaeae WHIRLPOOL 2061562f795e82f1b4a21c023e57aab0935c52698063ebc62cef844a22e9a2cf72446333df72f3a789c912f3eac850ed5fc00d90aa40094d11a30a2d157b302c
+MISC ChangeLog-2015 2315 SHA256 efd91b9bcc928e1f15375d1ed74cc6584aed729f9a9b5370cd8a19e0abf8bdaa SHA512 0a682f287da6f74df5c7e918a1d5704952f64fc7bf000ce09086e651db4135aabd9c1aa3fb8195dea9ee0a60b18ceaac451a014b5adadf33506e5b52674c4b8e WHIRLPOOL 265b60ed2b3b37ccd0d8fcd4d0d41fcabb1ba71ce3bd0c3f96a6e40d2a5e4080e79293dd6abdc96c850bd1c4ccbebdd7fe706e5eab5079364206af1a4fd25c2f
+MISC metadata.xml 247 SHA256 0deec0776f26fb762fdf7711f4589b14f52a2456436ef557eec62a2cf2fb2bb7 SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7 WHIRLPOOL a135fa622e99d3dcdb432bc6b3c366076b3d86b4bfd9a76c852d781b8e9152541c7e7a2c7c6d6a3c4d2200dce792847a08166aaf7c17c22b6299dfe868234dec
diff --git a/dev-lang/pcc/files/pcc-1.1.0-multiarch.patch b/dev-lang/pcc/files/pcc-1.1.0-multiarch.patch
new file mode 100644
index 000000000000..8420908e9f9d
--- /dev/null
+++ b/dev-lang/pcc/files/pcc-1.1.0-multiarch.patch
@@ -0,0 +1,11 @@
+--- cc/cc/cc.c 2014-12-06 09:52:55.000000000 +0000
++++ cc/cc/cc.c.new 2015-03-09 09:22:25.569376330 +0000
+@@ -206,7 +206,7 @@
+ #define PCCLIBDIR NULL
+ #endif
+ #ifndef DEFLIBDIRS /* default library search paths */
+-#ifdef MULTIARCH_PATH
++#ifndef MULTIARCH_PATH
+ #define DEFLIBDIRS { "/usr/lib/", 0 }
+ #else
+ #define DEFLIBDIRS { "/usr/lib/", "/usr/lib/" MULTIARCH_PATH "/", 0 }
diff --git a/dev-lang/pcc/metadata.xml b/dev-lang/pcc/metadata.xml
new file mode 100644
index 000000000000..40aa45df2b01
--- /dev/null
+++ b/dev-lang/pcc/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/dev-lang/pcc/pcc-1.1.0-r1.ebuild b/dev-lang/pcc/pcc-1.1.0-r1.ebuild
new file mode 100644
index 000000000000..afadb70bb38a
--- /dev/null
+++ b/dev-lang/pcc/pcc-1.1.0-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils versionator autotools
+
+DESCRIPTION="pcc portable c compiler"
+HOMEPAGE="http://pcc.ludd.ltu.se"
+
+SRC_URI="ftp://pcc.ludd.ltu.se/pub/pcc-releases/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~amd64-fbsd"
+IUSE=""
+DEPEND=">=dev-libs/pcc-libs-${PV}"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -e 's/AC_CHECK_PROG(strip,strip,yes,no)//' configure.ac || die "Failed to fix configure.ac"
+ sed -i -e 's/AC_SUBST(strip)//' configure.ac || die "Failed to fix configure.ac more"
+ eautoreconf
+ epatch "${FILESDIR}/${P}-multiarch.patch" || die
+}
+
+src_configure() {
+ econf --disable-stripping
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+}
diff --git a/dev-lang/pcc/pcc-9999.ebuild b/dev-lang/pcc/pcc-9999.ebuild
new file mode 100644
index 000000000000..75783d00b0af
--- /dev/null
+++ b/dev-lang/pcc/pcc-9999.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils versionator autotools
+
+DESCRIPTION="pcc portable c compiler"
+HOMEPAGE="http://pcc.ludd.ltu.se"
+
+if [[ ${PV} = 9999 ]]; then
+ inherit cvs
+ ECVS_SERVER="pcc.ludd.ltu.se:/cvsroot"
+ ECVS_MODULE="${PN}"
+ KEYWORDS=""
+ S="${WORKDIR}/${PN}"
+else
+ SRC_URI="ftp://pcc.ludd.ltu.se/pub/pcc-releases/${P}.tgz"
+ KEYWORDS="~x86 ~amd64 ~amd64-fbsd"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE=""
+DEPEND=">=dev-libs/pcc-libs-${PV}"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -e 's/AC_CHECK_PROG(strip,strip,yes,no)//' configure.ac || die "Failed to fix configure.ac"
+ sed -i -e 's/AC_SUBST(strip)//' configure.ac || die "Failed to fix configure.ac more"
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-stripping
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+}
diff --git a/dev-lang/perl/Manifest b/dev-lang/perl/Manifest
new file mode 100644
index 000000000000..93a417bd9905
--- /dev/null
+++ b/dev-lang/perl/Manifest
@@ -0,0 +1,26 @@
+DIST perl-5.24.1-patches-3.tar.xz 24012 SHA256 b8f8164c1fb34c5db82d9f16c5330cdb2d56e283562dd2d684c2abc26e58bf83 SHA512 1af59b80fca8317fe8df171eba6fcc0830c65f94ad7f73bac611877afdd6e5dfe9ce7c67205a860703fcf6c5b87ba14a0163196e1b833a20562525d06b26b6f3 WHIRLPOOL 9d1f7d3050f544d04e413e1c6c4a8cc6bc593a8250dbf45fb166cf92060ea8bb8e4b09bb73a686cce8101395a04c853842588c1c223c903c5b74cedaf68c5d18
+DIST perl-5.24.1.tar.xz 11569284 SHA256 03a77bac4505c270f1890ece75afc7d4b555090b41aa41ea478747e23b2afb3f SHA512 9429608eb4d7f6a01b5a7df8601e0757acdf3e6d5af960d5cf710f8e4fd20ffe082bb42eedc2cd079d5173e48cf5574d55477e1c51f7f53b32fb5d1b89f6db8c WHIRLPOOL 26d401f03af54ba61ea8e761f483f3d374737660fa4beaa3bd77951c0f920f88f9e47f327754c32d4c3c49557882a2a531b9eebef420ad6155d62423f7753406
+DIST perl-5.24.2-patches-1.tar.xz 24012 SHA256 51b1dd61f4907da053558c6aa80de303230ee3348b6c4e7d6b149ee0a7c3e54e SHA512 3576dbce373a17de2de436b6bd33378c9bca899dab71b7448e3c2d1df5ed3d63ea19ad0e0406526b9a75b416585e0da0c32e653e6f76474fbcd66672094d7aaf WHIRLPOOL 2668b0d4ea7c0b4bbddc1c26c2187dc4d9b19d449bde91b522a7f500bcdec2d25ec59110001b9560fc610f9deacdfd8bcbdb2ce979e5ad09c9055c1f78820902
+DIST perl-5.24.2.tar.xz 11570420 SHA256 b25dd465ef32edf853078eb540b26243db0a3b5e1b1cc84393703d9564be67c0 SHA512 d7bb66e23064aba426fe3f7264d065f0926957675b0bba51fe2ddb623561ffcdb7657d9f27d78920a583a21bdee01a7ace37aae6d42c02d32403bd1347ad8df8 WHIRLPOOL 51e2fd19bff64c6d7bd8f40372089d14cc783c3ae17d6788361b3363a497a8e44688e490422b6c327b886eddf2ff0f2aa261c4c0aa76ecfac08ceb62f8d344d4
+DIST perl-5.24.3-patches-1.tar.xz 24016 SHA256 8dc42e629d50ea7193c890cfcd85abaed32db74507b8862c060bf93f5ea82ef4 SHA512 5feddaa14b66c6c5f926a3bee96e2849d829141ee7a6d74cfec68128785fcb8de38e13cfd229c420a9fe6c3a1db4a4bdd52a91aa72726233570f61c73d31f9fd WHIRLPOOL ffe2e5a530683a36d6d546eff0ac13b4b5014365574abe0cc90be9f73219ec3f5bcd3a9c3fa9a5744682d293e9f3a40e9b0bff0a389cf60d00b2b7f7f8fd32f2
+DIST perl-5.24.3.tar.xz 11574740 SHA256 03fe3e4ea39d2a4982703572599a80f3d5f368a1359ed89746ea1d8bec6cfbba SHA512 139c92c0ea0ee7bd5912ad52cc275e0732ceb0865d8b67c301e1fc5a96ae126a26432b4450a2bbc7fe65b8e1dd8adde92ea2cc91ee39cb13ec3c5096e8f787ec WHIRLPOOL 5c8f9234047ccb448373a1dde403d35a4c8f6e320537fad6b011c3650b6e5f8e7a300fc3567a5bd7cbc308266f2db5adcbd8f74b04c87855b058275c74e08bab
+DIST perl-5.25.11-patches-1.tar.xz 16776 SHA256 43dda2f9a20b44442d25caa733ba94acb0c48b26e8201b3f8fa3d2be24a6667e SHA512 ee340824746d3b626b41c76bfa901543869fb9560ef75ff6d338df017e5528e33c344a91ce7cbe9f2fa9e813bf61bbe9eb290433baceb05b832110e746ce9036 WHIRLPOOL 98681898039e1bcc3e9a33498a8b7b8b3f24cc4c49396b33dfd04a853c329323ad47081d64da61ba2880fbd3505e10ffe90367dffa8005bda86c4f114b283934
+DIST perl-5.26.0.tar.xz 11961692 SHA256 9bf2e3d0d72aad77865c3bdbc20d3b576d769c5c255c4ceb30fdb9335266bf55 SHA512 cd5af6495fe4c46c0d5d0f51d4015b54daa221f08a5fb48899c247cb57c2ba85cffb97e6d258d0f931504828bb23e175d899f311c73805d924d1042058ac42e4 WHIRLPOOL 9b87a1fd5371871c747351440e40f5d1345b8bf6ac5810b9ef239e58947fe0c243583fdac6888f0450bdca437b6031cc5281a4e045d5014642ef2dc671e24e47
+DIST perl-5.26.1-RC1.tar.xz 11923212 SHA256 3c52c1092a66ee7c809af53076e1f407e43f52962272d0fd2e95bfb6c70df111 SHA512 036151303704e8d91db8cc22a9c8972499babca112d46f570e4f921fdad1b73919f6d038973896ff3d55b079080c4682609b3f73b962999bc5f5425b7b877084 WHIRLPOOL 99ae7d69509fcd85486beff976f79da03216e2ef1b241080b3d65bbacc343b8fb577082e111f5fd5214c42dd704465efdb2622558ed76fefa1315fe0dec40d3f
+DIST perl-5.26.1.tar.xz 11922848 SHA256 fe8208133e73e47afc3251c08d2c21c5a60160165a8ab8b669c43a420e4ec680 SHA512 13faa7bcd7ed8c490c37e9032c115af06c9b8152b75f8062409dd72d263d1314480e8a9a883490de1b448b2e6d53b6a87d108e2eceb17de2524d5857c6a7d300 WHIRLPOOL 5126e3727ff4b7bd5cc3b0dce4a4a6f1d4c2601af318161981e66407850a08d8731cdb5554af00cd4889978c7564d85f900e526584ebbab0fee6d97b2aebc6d3
+DIST perl-5.27.1-patches-1.tar.xz 16444 SHA256 98e3c57398a3476ff809b98c7a17e52424842ca41499b3ee84b73d90c633ec62 SHA512 c70e033619e1caecb5e5d70e36094bb105f0387a383f7091c763b87ad9f31121c036446e337d44565ce66c9977870c951f2fbd61d34ac1633c18ac9d0b489a13 WHIRLPOOL d211c1b5b3358e8142dd6c6ec9b324db49d1097a0f717168a299e22872d7ff3f9066dace7ac1de935117849445de15f6c3b0afd14afa2750c69d388b83c464d9
+DIST perl-5.27.4.tar.xz 11977216 SHA256 a9ade3ec7e605bee6990bf0eb4502da8bd62fa2d4f70b2c4407a15aa7e12543c SHA512 92c170a195da61d306faa8699682f69469e6e04188972ca608f4125122556d0839558cea3b3812b8e70114e9ae566bb58b22d277f66ff837d938bade02f04636 WHIRLPOOL fa156cddd72d9f3811450fea6c4378421021ed73f367dfc123cbfe4d1144e65d257a30d751ffed86ae787f05bf8f0c75d6167618ce480f70e615eb1da23acb81
+DIST perl-cross-1.1.4.tar.gz 94623 SHA256 c840a327d5464ca271cac40d52e2d199330875527bf1003c28a6e550fb7bcc57 SHA512 3bfc108245f0c05b7d45c317eb28c2eb70aba528dfe8a39bc99d6e49b4751f5dca4f4ac661484bfc7528c3e28fcdbd8994c36daa49c25516618fec1f58116d79 WHIRLPOOL c4a150cf15d067cd58db63dae01bbe810808888477f9a2bfcd8557b2eeee097bbf93509bb9128feef84e8a2913724a82de0accc3b9c5d65207ee9dcd2989fe51
+DIST perl-cross-1.1.5.tar.gz 95122 SHA256 0e719e75983b16c7726c2c9462f9498bb1fc4ad38c9f2513a65f3dd34e3decb3 SHA512 344ae0ff3ab8a2ce3fdb0de10972164c8cc14abd9c5c9bf55029bc8a6c2e62b3f9dda88892b1d8d0e30b76f94d42feea1dd5e5c55631f9eb53d1443285e2e3d1 WHIRLPOOL b194d4986511e3483921b11bd264586f1e185df8cd33e408b7f5702403b6dc9e20d0245a60e47e8ee03db8002effccdde48ab7ad1087a9f35ec703b558f699cc
+DIST perl-cross-1.1.6.tar.gz 96075 SHA256 2b3b88f54d85beb438bd2dddd948e2d89461db5ab6253f01b3c2c9ae3ddc30b4 SHA512 4d46ad55093d90da4b0589552d14390efdc6604532ad2b4a3b20a79c69ef3b3cfe0e171b439dfa464bbee2e1fbd92606af6e6584d9355a8476e5b4ada8733653 WHIRLPOOL 78254d35c462758c6fdcc7a0a30668919d2fc0034947900e8e7575deee4932d9659486fa32b938c5ca14332aef99bdf0ec198b301cc8cfb1225a322c8516192c
+EBUILD perl-5.24.1-r2.ebuild 17089 SHA256 81c1cce8e4c80c26fa7d176380ec0174265a9f35871d6e0d586dd246eaac7df1 SHA512 2b05056724d99216e116b8fce6fb7f935bce683454a004b85131a815a770d327d67dd762e5111396a34ad0d219a4b42fbb4108d8f52f17fbfd2aa34284ea963d WHIRLPOOL 4a025854d65d5a5a58728b17d53ab9fd18fc490d69d61a71d7ccfe63b97caa9893c0aa99740a1aadb06f88d6f739d881a38c664df913ee7f1b6febffa843b7ea
+EBUILD perl-5.24.2.ebuild 17084 SHA256 e81935c7bfe52f0e636e8ec290bb76b9da326d3ee401cfcf52574b0c9f4c6e93 SHA512 148573132f49a2f46853e3fe171b6d07a72dc50c3b80d2d5c54b7c87833089b366dd0137637160e053f26dfc39dd4b3564d08e0a3891a6822950688cd1844aa8 WHIRLPOOL 2afce33fb37ce2517cbeec1b29688300516c185ed5bc4da9ae7af9eff44ad976b8c1fe713e21eabe1bd7bea69ffcf21fbcb115aa2ef76ffb2877540346d5a7b9
+EBUILD perl-5.24.3.ebuild 17090 SHA256 9702a0e4cf79ff99d86476f0164dba25c228511be1f74f27bb6a657c59d151c2 SHA512 3cf008b07364f174c87934f7562fd24fbb5a377a93b2fa56675aa907da3d3fcdf492dc67963e65919bbf7d9474fbc7c54d7e21749bcb93468f0ecebcd6dcc61a WHIRLPOOL 21934671f2f6187a4d334715867d78f667b50cb9b28b3d6c6f7475cddafbaddb45a8e9e794147ac6df129a0f09af16ddad149d29d52b8c7d0af20fe73418caf3
+EBUILD perl-5.26.0.ebuild 17993 SHA256 73c71a10fa481c983b3dc4d81bd3db8ed957901c3aac10e39064ec664015c2c1 SHA512 3a9d54c89c428ba1033228287a466e5ab4b3e4b3c8207885491c3f04d8608074609e18fff913def5eeead0a100a3b7ee1569b5c5b318c8f959bb36578eed1f4a WHIRLPOOL 02e2d21535e5f8e55b952c725398cb3ddcae7759a5b17ee953eceadf11ec77d04a67ed6948cbf23612e0c3d0fac84be42de6b6ec711fef982a09ee0944f1fda3
+EBUILD perl-5.26.1.ebuild 19098 SHA256 811513417da13eb2e6a97704613d76b9fca7334060fe1f02b07ae6a3e11a82bd SHA512 f047690dd9e5f13cfbc191ce167aecffb4303243f62fc19282d7df1105e7ae517bcd1138c3e8d97801f47848e69d4d7da001a9369933bdc97b87038e118b3c23 WHIRLPOOL 0a6290202fcaa27b41ebbcfcde7c0dcc1206c280ebd98c3cb422fb76de96c8347465cb6bea44315a64f8dc5b15d85fcbf39ec38ed0fa02b5194710fef145f636
+EBUILD perl-5.26.9999.ebuild 19091 SHA256 d3247c5a665fdbb0179a16ff7311dba774c1d2659b3345ceae1025547bc565ec SHA512 f80dd5bc6d871be23a31762bb25b18241fea7555667514a39a65b6794433a3b7dec6ac49e6bee47dfcdf493bb8c2c0a0323c23b7c04b37a416bb0d4261c3fffe WHIRLPOOL b7eba172af0109bcbfa1c497345f71438e9df4a9109071ac957c3e7f5bd3a5732a5e0daf33ad8700c71ff8411ab6254535c2b34a71ec60ef3d576fe05b63b9e1
+EBUILD perl-5.28.9999.ebuild 19081 SHA256 f60c49d992d0025f10cf5bfb80e4a21de61f32cf43533e56b8836298df9006a8 SHA512 89209d2e86c80224eb093e604b8db207281345aa994c1a0938753e9a5355c82a29f893c7267b4f664389b8f255d64d0ed2bfbec0a4683c66b307e0890edb9ff9 WHIRLPOOL 2187332344f4f1f8f45811072ea0151ea6ea588e0c7202cc01f7afd3acfe4bcc9f50c9033d79eb2c9f4f88a17e43c47e2ec188ae417fd813161e6fbe4e98898e
+MISC ChangeLog 13780 SHA256 57a0f6f6bc7a816ca621af65126c42eb0fe19891e9cfe8ea0eb664607ea4749e SHA512 8bd6e0673b863e40e4f3309461049c95c261c95ffaafdf7bf9a8b801f29017994f152fa0dc5eb3f09b85be832e356a9c08ed1171f7e617a5597e6456ee9d11dd WHIRLPOOL 1bdf46f12430a2a84e66841a4b38e03bacc8f0649e38ba11d7ec23504ef254012c1dc9e1ef333b98619a6dcba6c183640f7b18080831cf37f425fd63d6810eee
+MISC ChangeLog-2014 86908 SHA256 36afb5e482f7c0faf3cb0491c694758752f81a8037fafbf69f33f82a535463dc SHA512 87a6b79f868b97ef1f1430d9616f4f47bc526add8eab73a40065f865a1097bc393001b3457cbfcf876a51cf710fd7d67183932fccdd0a658b9ae8c8cb2e30b52 WHIRLPOOL 536b71f37a08710b083d6df5ecf231ebb6debfaae56f12a5f78b46bf2c419b74eb9f53e35fda4f11c9c95a0a9089c3558b08f575f2c8137fa8fbcf4b19ed098f
+MISC ChangeLog-2015 3505 SHA256 ee4e406b267916f82010b5d51d78814d3ab074cfc720fc0a61e9fcadf45508bc SHA512 6b19ce6be009f9982f2b2d10f7afbc20d7ea46b43b33d906b4a6755df80fb95e0d4175999d8e47986b11d4346bed24b4465374fd3a783e693805df8b72142efd WHIRLPOOL 319a86c0471fcbbbaadebda3a219bc564c0134704a680c21ad0e28c1bba3cc591ffe7c4e331326accc97d1e1869481aa592c56a0b89ee9ae63be12086df172d7
+MISC metadata.xml 430 SHA256 a9fb7b8da2c7f374e3eb2bda0ae1071dc430876a321e3db4202a20bbb890f609 SHA512 ca4c43e2016b7df707894713465700a90d2b8551b57fc4d660cff75edb1e8cc2456f9ae10431839ad6738f290d4f5911fae360eaa1d4670859d855de3d568583 WHIRLPOOL 38ea595a31a2192e99cb10b301ff793b915257ab7259383780292a01df0a5cfd04183f69b42cb326921f744293e0085412e3733da277efbec43f9d419381fe00
diff --git a/dev-lang/perl/metadata.xml b/dev-lang/perl/metadata.xml
new file mode 100644
index 000000000000..0edcddc60b41
--- /dev/null
+++ b/dev-lang/perl/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>perl@gentoo.org</email>
+ <name>Gentoo Perl Project</name>
+ </maintainer>
+ <use>
+ <flag name="ithreads">Enable Perl threads, has some compatibility problems</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">arsv/perl-cross</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/perl/perl-5.24.1-r2.ebuild b/dev-lang/perl/perl-5.24.1-r2.ebuild
new file mode 100644
index 000000000000..1250d4c71259
--- /dev/null
+++ b/dev-lang/perl/perl-5.24.1-r2.ebuild
@@ -0,0 +1,563 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
+
+PATCH_VER=3
+CROSS_VER=1.1.4
+
+PERL_OLDVERSEN="5.24.0"
+MODULE_AUTHOR=SHAY
+
+SHORT_PV="${PV%.*}"
+MY_P="perl-${PV/_rc/-RC}"
+MY_PV="${PV%_rc*}"
+
+DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
+
+SRC_URI="
+ mirror://cpan/src/5.0/${MY_P}.tar.xz
+ mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MY_P}.tar.xz
+ https://github.com/gentoo-perl/perl-patchset/releases/download/${MY_P}-patches-${PATCH_VER}/${MY_P}-patches-${PATCH_VER}.tar.xz
+ mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.xz
+ https://dev.gentoo.org/~kentnl/distfiles/${MY_P}-patches-${PATCH_VER}.tar.xz
+ https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
+"
+HOMEPAGE="http://www.perl.org/"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0/${SHORT_PV}"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="berkdb debug doc gdbm ithreads"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3 )
+ app-arch/bzip2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
+"
+PDEPEND="
+ >=app-admin/perl-cleaner-2.5
+ >=virtual/perl-File-Path-2.130.0
+ >=virtual/perl-File-Temp-0.230.400-r2
+ >=virtual/perl-Data-Dumper-2.154.0
+ virtual/perl-Test-Harness
+"
+# bug 390719, bug 523624, bug 620304
+# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
+
+S="${WORKDIR}/${MY_P}"
+
+dual_scripts() {
+ src_remove_dual perl-core/Archive-Tar 2.40.100_rc ptar ptardiff ptargrep
+ src_remove_dual perl-core/CPAN 2.110.100_rc cpan
+ src_remove_dual perl-core/Digest-SHA 5.950.100_rc shasum
+ src_remove_dual perl-core/Encode 2.800.100_rc enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 7.100.200_rc instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.310.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.69.1_rc zipdetails
+ src_remove_dual perl-core/JSON-PP 2.273.0.100_rc json_pp
+ src_remove_dual perl-core/Module-CoreList 5.201.701.142.400_rc corelist
+ src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
+ src_remove_dual perl-core/Pod-Perldoc 3.250.300_rc perldoc
+ src_remove_dual perl-core/Test-Harness 3.360.100_rc prove
+ src_remove_dual perl-core/podlators 4.70.0 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 4.70.0 /usr/share/man/man1/perlpodstyle.1
+}
+
+check_rebuild() {
+ # Fresh install
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ return 0;
+ # Major Upgrade
+ # doesn't matter if there's multiple copies, it still needs a rebuild
+ # if the string is anything other than "5.CURRENTMAJOR"
+ elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
+ echo ""
+ ewarn "UPDATE THE PERL MODULES:"
+ ewarn "After updating dev-lang/perl the installed Perl modules"
+ ewarn "have to be re-installed. In most cases, this is done automatically"
+ ewarn "by the package manager, but subsequent steps are still recommended"
+ ewarn "to ensure system consistency."
+ ewarn
+ ewarn "You should start with a depclean to remove any unused perl dependencies"
+ ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
+ ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
+ ewarn "Recommended: emerge --depclean -va"
+ ewarn
+ ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
+ ewarn "remaining rebuilds portage may have missed."
+ ewarn "Use: perl-cleaner --all"
+ return 0;
+
+ # Reinstall w/ USE Change
+ elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
+ ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
+ ( use debug && ! has_version dev-lang/perl[debug] ) || \
+ ( ! use debug && has_version dev-lang/perl[debug] ) ; then
+ echo ""
+ ewarn "TOGGLED USE-FLAGS WARNING:"
+ ewarn "You changed one of the use-flags ithreads or debug."
+ ewarn "You must rebuild all perl-modules installed."
+ ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
+ fi
+}
+
+pkg_setup() {
+ case ${CHOST} in
+ *-freebsd*) osname="freebsd" ;;
+ *-dragonfly*) osname="dragonfly" ;;
+ *-netbsd*) osname="netbsd" ;;
+ *-openbsd*) osname="openbsd" ;;
+ *-darwin*) osname="darwin" ;;
+ *-interix*) osname="interix" ;;
+ *-aix*) osname="aix" ;;
+ *-cygwin*) osname="cygwin" ;;
+ *) osname="linux" ;;
+ esac
+
+ myarch="${CHOST%%-*}-${osname}"
+ if use debug ; then
+ myarch+="-debug"
+ fi
+ if use ithreads ; then
+ mythreading="-multi"
+ myarch+="-thread"
+ fi
+
+ LIBPERL="libperl$(get_libname ${MY_PV} )"
+ PRIV_LIB="/usr/$(get_libdir)/perl5/${MY_PV}"
+ ARCH_LIB="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
+ SITE_LIB="/usr/local/$(get_libdir)/perl5/${MY_PV}"
+ SITE_ARCH="/usr/local/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
+ VENDOR_LIB="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}"
+ VENDOR_ARCH="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}/${myarch}${mythreading}"
+
+ dual_scripts
+}
+
+src_remove_dual_file() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ alternatives_auto_makesym "${i}" "${i}-[0-9]*"
+ done
+ ;;
+ setup)
+ for i in "$@" ; do
+ if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
+ has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
+ break
+ fi
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i}{,-${ver}-${P}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual_man() {
+ local i pkg ver ff
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
+ ff=${ff##*${i#${i%.[0-9]}}}
+ alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ for i in "$@" ; do
+ src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
+ src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
+ done
+}
+
+src_prepare_update_patchlevel_h() {
+ # Copied and modified from debian:
+ # Copyright 2011 Niko Tyni
+ # This program is free software; you can redistribute it and/or modify
+ # it under the same terms as Perl itself.
+ local patchdir="${WORKDIR}/patches"
+ local prefix
+ local patchoutput="patchlevel-gentoo.h"
+
+ [[ -f ${patchdir}/series ]] || return 0
+
+while read patch
+do
+ patchname=$(echo $patch | sed 's/\.diff$//')
+ < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e '
+
+ # massage the patch headers
+ s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend;
+ s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend;
+ s|^Bug-Gentoo: ||; tprepend;
+ s/^\(Subject\|Description\): //; tappend;
+ s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend;
+
+ # post-process at the end of input
+ $ { x;
+ # include the version number in the patchlevel.h description (if available)
+ s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/;
+
+ # escape any backslashes and double quotes
+ s|\\|\\\\|g; s|"|\\"|g;
+
+ # add a prefix
+ s|^|\t,"'"$prefix$patchname"' - |;
+ # newlines away
+ s/\n/ /g; s/ */ /g;
+ # add a suffix
+ s/ *$/"/; p
+ };
+ # stop all processing
+ d;
+ # label: append to the hold space
+ :append H; d;
+ # label: prepend to the hold space
+ :prepend x; H; d;
+ '
+done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}"
+echo "${patchoutput}" >> "${S}/MANIFEST"
+}
+
+src_prepare() {
+ local patch
+ EPATCH_OPTS+=" -p1"
+ einfo "Applying patches from ${MY_P}-${PATCH_VER} ..."
+ while read patch ; do
+ EPATCH_SINGLE_MSG=" ${patch} ..."
+ epatch "${WORKDIR}"/patches/${patch}
+ done < "${WORKDIR}"/patches/series
+
+ src_prepare_update_patchlevel_h
+
+ if tc-is-cross-compiler; then
+ cp -a ../perl-cross-${CROSS_VER}/* . || die
+
+ sed -i \
+ -e 's/(15 + $CLEANUP)/(13 + $CLEANUP)/' \
+ cnf/diffs/perl5-${PV}/makemaker-test.patch || die
+
+ sed -i \
+ -e 's/MakeMaker\.pm .*/MakeMaker.pm bf9174c70a0e50ff2fee4552c7df89b37d292da1/' \
+ -e 's/MM_Unix\.pm .*/MM_Unix.pm b0ec308fe2d7dcfcef5732880db0fae1f4ea80fa/' \
+ cnf/diffs/perl5-${PV}/customized.patch || die
+
+ sed -i \
+ -e 's|^lib/unicore/CombiningClass.pl pod/perluniprops.pod:|lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM)|' \
+ Makefile || die
+
+ # bug 604072
+ MAKEOPTS+=" -j1"
+ export MAKEOPTS
+ fi
+
+ if ! tc-is-static-only ; then
+ ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
+ ln -s ${LIBPERL} libperl$(get_libname ) || die
+ fi
+
+ if use gdbm; then
+ sed -i "s:INC => .*:INC => \"-I${EROOT}usr/include/gdbm\":g" \
+ ext/NDBM_File/Makefile.PL || die
+ fi
+
+ default
+}
+
+myconf() {
+ # the myconf array is declared in src_configure
+ myconf=( "${myconf[@]}" "$@" )
+}
+
+src_configure() {
+ declare -a myconf
+
+ export LC_ALL="C"
+ [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
+
+ # some arches and -O do not mix :)
+ use ppc && replace-flags -O? -O1
+
+ # Perl has problems compiling with -Os in your flags with glibc
+ use elibc_uclibc || replace-flags "-Os" "-O2"
+
+ # This flag makes compiling crash in interesting ways
+ filter-flags "-malign-double"
+
+ # Fixes bug #97645
+ use ppc && filter-flags "-mpowerpc-gpopt"
+
+ # Fixes bug #143895 on gcc-4.1.1
+ filter-flags "-fsched2-use-superblocks"
+
+ use sparc && myconf -Ud_longdbl
+
+ export BUILD_BZIP2=0
+ export BZIP2_INCLUDE=${EROOT}/usr/include
+ export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
+
+ export BUILD_ZLIB=False
+ export ZLIB_INCLUDE=${EROOT}/usr/include
+ export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
+
+ # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
+ myndbm='U'
+ mygdbm='U'
+ mydb='U'
+ if use gdbm ; then
+ mygdbm='D'
+ if use berkdb ; then
+ myndbm='D'
+ fi
+ fi
+ if use berkdb ; then
+ mydb='D'
+ has_version '=sys-libs/db-1*' && myndbm='D'
+ fi
+
+ myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
+
+ if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
+ ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
+ myconf -Ui_db -Ui_ndbm
+ fi
+
+ use ithreads && myconf -Dusethreads
+
+ if use debug ; then
+ append-cflags "-g"
+ myconf -DDEBUGGING
+ elif [[ ${CFLAGS} == *-g* ]] ; then
+ myconf -DDEBUGGING=-g
+ else
+ myconf -DDEBUGGING=none
+ fi
+
+ if [[ -n ${PERL_OLDVERSEN} ]] ; then
+ local inclist=$(for v in ${PERL_OLDVERSEN}; do echo -n "${v}/${myarch}${mythreading} ${v} "; done )
+ myconf -Dinc_version_list="${inclist}"
+ fi
+
+ [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
+
+ # Make sure we can do the final link #523730, need to set deployment
+ # target to override hardcoded 10.3 which breaks on modern OSX
+ [[ ${CHOST} == *-darwin* ]] && \
+ myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
+
+ # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
+ # Prefix itself we don't do multilib either, so make sure perl can find
+ # something compatible.
+ if use prefix ; then
+ # Set a hook to check for each detected library whether it actually works.
+ export libscheck="
+ ( echo 'main(){}' > '${T}'/conftest.c &&
+ $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
+ ) || xxx=/dev/null"
+
+ # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
+ local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
+ myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
+ elif [[ $(get_libdir) != "lib" ]] ; then
+ # We need to use " and not ', as the written config.sh use ' ...
+ myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
+ fi
+
+ # don't try building ODBM, bug #354453
+ disabled_extensions="ODBM_File"
+
+ if ! use gdbm ; then
+ # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
+ disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
+ fi
+
+ myconf -Dnoextensions="${disabled_extensions}"
+
+ [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
+ # allow fiddling via EXTRA_ECONF, bug 558070
+ eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
+
+ myconf \
+ -Duseshrplib \
+ -Darchname="${myarch}" \
+ -Dcc="$(tc-getCC)" \
+ -Doptimize="${CFLAGS}" \
+ -Dldflags="${LDFLAGS}" \
+ -Dprefix="${EPREFIX}"'/usr' \
+ -Dsiteprefix="${EPREFIX}"'/usr/local' \
+ -Dvendorprefix="${EPREFIX}"'/usr' \
+ -Dscriptdir="${EPREFIX}"'/usr/bin' \
+ -Dprivlib="${EPREFIX}${PRIV_LIB}" \
+ -Darchlib="${EPREFIX}${ARCH_LIB}" \
+ -Dsitelib="${EPREFIX}${SITE_LIB}" \
+ -Dsitearch="${EPREFIX}${SITE_ARCH}" \
+ -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
+ -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
+ -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
+ -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
+ -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dman1ext='1' \
+ -Dman3ext='3pm' \
+ -Dlibperl="${LIBPERL}" \
+ -Dlocincpth="${EPREFIX}"'/usr/include ' \
+ -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
+ -Duselargefiles \
+ -Dd_semctl_semun \
+ -Dcf_by='Gentoo' \
+ -Dmyhostname='localhost' \
+ -Dperladmin='root@localhost' \
+ -Ud_csh \
+ -Dsh="${EPREFIX}"/bin/sh \
+ -Dtargetsh="${EPREFIX}"/bin/sh \
+ -Uusenm \
+ "${myconf[@]}" \
+ "${EXTRA_ECONF[@]}"
+
+ if tc-is-cross-compiler; then
+ ./configure \
+ --target="${CHOST}" \
+ --build="${CBUILD}" \
+ -Dinstallprefix='' \
+ -Dinstallusrbinperl='undef' \
+ -Dusevendorprefix='define' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ else
+ sh Configure \
+ -des \
+ -Dinstallprefix="${EPREFIX}"'/usr' \
+ -Dinstallusrbinperl='n' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ fi
+}
+
+src_test() {
+ export NO_GENTOO_NETWORK_TESTS=1;
+ if [[ ${EUID} == 0 ]] ; then
+ ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
+ return 0
+ fi
+ use elibc_uclibc && export MAKEOPTS+=" -j1"
+ TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
+}
+
+src_install() {
+ local i
+ local coredir="${ARCH_LIB}/CORE"
+
+ emake DESTDIR="${D}" install
+
+ rm -f "${ED}/usr/bin/perl${MY_PV}"
+ ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
+
+ if ! tc-is-static-only ; then
+ dolib.so "${ED}"${coredir}/${LIBPERL}
+ rm -f "${ED}"${coredir}/${LIBPERL}
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
+ fi
+
+ rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
+
+ # This removes ${D} from Config.pm
+ for i in $(find "${D}" -iname "Config.pm" ) ; do
+ einfo "Removing ${D} from ${i}..."
+ sed -i -e "s:${D}::" "${i}" || die "Sed failed"
+ done
+
+ dodoc Changes* README AUTHORS
+
+ if use doc ; then
+ # HTML Documentation
+ # We expect errors, warnings, and such with the following.
+
+ dodir /usr/share/doc/${PF}/html
+ LD_LIBRARY_PATH=. ./perl installhtml \
+ --podroot='.' \
+ --podpath='lib:ext:pod:vms' \
+ --recurse \
+ --htmldir="${ED}/usr/share/doc/${PF}/html"
+ fi
+
+ [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
+
+ dual_scripts
+}
+
+pkg_preinst() {
+ check_rebuild
+}
+
+pkg_postinst() {
+ dual_scripts
+
+ if [[ "${ROOT}" = "/" ]] ; then
+ local INC DIR file
+ INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
+ einfo "Removing old .ph files"
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
+ rm -f "${file}"
+ einfo "<< ${file}"
+ done
+ fi
+ done
+ # Silently remove the now empty dirs
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
+ fi
+ done
+
+ fi
+}
+
+pkg_postrm(){
+ dual_scripts
+}
diff --git a/dev-lang/perl/perl-5.24.2.ebuild b/dev-lang/perl/perl-5.24.2.ebuild
new file mode 100644
index 000000000000..1bcccde79f5b
--- /dev/null
+++ b/dev-lang/perl/perl-5.24.2.ebuild
@@ -0,0 +1,564 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
+
+PATCH_VER=1
+CROSS_VER=1.1.6
+PATCH_BASE="perl-5.24.2-patches-${PATCH_VER}"
+
+PERL_OLDVERSEN="5.24.1 5.24.0"
+DIST_AUTHOR=SHAY
+
+SHORT_PV="${PV%.*}"
+MY_P="perl-${PV/_rc/-RC}"
+MY_PV="${PV%_rc*}"
+
+DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
+
+SRC_URI="
+ mirror://cpan/src/5.0/${MY_P}.tar.xz
+ mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
+ https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
+ mirror://gentoo/${PATCH_BASE}.tar.xz
+ https://dev.gentoo.org/~kentnl/distfiles/${PATCH_BASE}.tar.xz
+ https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
+"
+HOMEPAGE="http://www.perl.org/"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0/${SHORT_PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="berkdb debug doc gdbm ithreads"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3 )
+ app-arch/bzip2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
+"
+PDEPEND="
+ >=app-admin/perl-cleaner-2.5
+ >=virtual/perl-File-Path-2.130.0
+ >=virtual/perl-File-Temp-0.230.400-r2
+ >=virtual/perl-Data-Dumper-2.154.0
+ virtual/perl-Test-Harness
+"
+# bug 390719, bug 523624, bug 620304
+# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
+
+S="${WORKDIR}/${MY_P}"
+
+dual_scripts() {
+ src_remove_dual perl-core/Archive-Tar 2.40.100_rc ptar ptardiff ptargrep
+ src_remove_dual perl-core/CPAN 2.110.100_rc cpan
+ src_remove_dual perl-core/Digest-SHA 5.950.100_rc shasum
+ src_remove_dual perl-core/Encode 2.800.100_rc enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 7.100.200_rc instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.310.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.69.1_rc zipdetails
+ src_remove_dual perl-core/JSON-PP 2.273.0.100_rc json_pp
+ src_remove_dual perl-core/Module-CoreList 5.201.707.152.400_rc corelist
+ src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
+ src_remove_dual perl-core/Pod-Perldoc 3.250.300_rc perldoc
+ src_remove_dual perl-core/Test-Harness 3.360.100_rc prove
+ src_remove_dual perl-core/podlators 4.70.0 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 4.70.0 /usr/share/man/man1/perlpodstyle.1
+}
+
+check_rebuild() {
+ # Fresh install
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ return 0;
+ # Major Upgrade
+ # doesn't matter if there's multiple copies, it still needs a rebuild
+ # if the string is anything other than "5.CURRENTMAJOR"
+ elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
+ echo ""
+ ewarn "UPDATE THE PERL MODULES:"
+ ewarn "After updating dev-lang/perl the installed Perl modules"
+ ewarn "have to be re-installed. In most cases, this is done automatically"
+ ewarn "by the package manager, but subsequent steps are still recommended"
+ ewarn "to ensure system consistency."
+ ewarn
+ ewarn "You should start with a depclean to remove any unused perl dependencies"
+ ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
+ ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
+ ewarn "Recommended: emerge --depclean -va"
+ ewarn
+ ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
+ ewarn "remaining rebuilds portage may have missed."
+ ewarn "Use: perl-cleaner --all"
+ return 0;
+
+ # Reinstall w/ USE Change
+ elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
+ ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
+ ( use debug && ! has_version dev-lang/perl[debug] ) || \
+ ( ! use debug && has_version dev-lang/perl[debug] ) ; then
+ echo ""
+ ewarn "TOGGLED USE-FLAGS WARNING:"
+ ewarn "You changed one of the use-flags ithreads or debug."
+ ewarn "You must rebuild all perl-modules installed."
+ ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
+ fi
+}
+
+pkg_setup() {
+ case ${CHOST} in
+ *-freebsd*) osname="freebsd" ;;
+ *-dragonfly*) osname="dragonfly" ;;
+ *-netbsd*) osname="netbsd" ;;
+ *-openbsd*) osname="openbsd" ;;
+ *-darwin*) osname="darwin" ;;
+ *-interix*) osname="interix" ;;
+ *-aix*) osname="aix" ;;
+ *-cygwin*) osname="cygwin" ;;
+ *) osname="linux" ;;
+ esac
+
+ myarch="${CHOST%%-*}-${osname}"
+ if use debug ; then
+ myarch+="-debug"
+ fi
+ if use ithreads ; then
+ mythreading="-multi"
+ myarch+="-thread"
+ fi
+
+ LIBPERL="libperl$(get_libname ${MY_PV} )"
+ PRIV_LIB="/usr/$(get_libdir)/perl5/${MY_PV}"
+ ARCH_LIB="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
+ SITE_LIB="/usr/local/$(get_libdir)/perl5/${MY_PV}"
+ SITE_ARCH="/usr/local/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
+ VENDOR_LIB="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}"
+ VENDOR_ARCH="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}/${myarch}${mythreading}"
+
+ dual_scripts
+}
+
+src_remove_dual_file() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ alternatives_auto_makesym "${i}" "${i}-[0-9]*"
+ done
+ ;;
+ setup)
+ for i in "$@" ; do
+ if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
+ has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
+ break
+ fi
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i}{,-${ver}-${P}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual_man() {
+ local i pkg ver ff
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
+ ff=${ff##*${i#${i%.[0-9]}}}
+ alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ for i in "$@" ; do
+ src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
+ src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
+ done
+}
+
+src_prepare_update_patchlevel_h() {
+ # Copied and modified from debian:
+ # Copyright 2011 Niko Tyni
+ # This program is free software; you can redistribute it and/or modify
+ # it under the same terms as Perl itself.
+ local patchdir="${WORKDIR}/patches"
+ local prefix
+ local patchoutput="patchlevel-gentoo.h"
+
+ [[ -f ${patchdir}/series ]] || return 0
+
+while read patch
+do
+ patchname=$(echo $patch | sed 's/\.diff$//')
+ < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e '
+
+ # massage the patch headers
+ s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend;
+ s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend;
+ s|^Bug-Gentoo: ||; tprepend;
+ s/^\(Subject\|Description\): //; tappend;
+ s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend;
+
+ # post-process at the end of input
+ $ { x;
+ # include the version number in the patchlevel.h description (if available)
+ s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/;
+
+ # escape any backslashes and double quotes
+ s|\\|\\\\|g; s|"|\\"|g;
+
+ # add a prefix
+ s|^|\t,"'"$prefix$patchname"' - |;
+ # newlines away
+ s/\n/ /g; s/ */ /g;
+ # add a suffix
+ s/ *$/"/; p
+ };
+ # stop all processing
+ d;
+ # label: append to the hold space
+ :append H; d;
+ # label: prepend to the hold space
+ :prepend x; H; d;
+ '
+done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}"
+echo "${patchoutput}" >> "${S}/MANIFEST"
+}
+
+src_prepare() {
+ local patch
+ EPATCH_OPTS+=" -p1"
+ einfo "Applying patches from ${MY_P}-${PATCH_VER} ..."
+ while read patch ; do
+ EPATCH_SINGLE_MSG=" ${patch} ..."
+ epatch "${WORKDIR}"/patches/${patch}
+ done < "${WORKDIR}"/patches/series
+
+ src_prepare_update_patchlevel_h
+
+ if tc-is-cross-compiler; then
+ cp -a ../perl-cross-${CROSS_VER}/* . || die
+
+ sed -i \
+ -e 's/(15 + $CLEANUP)/(13 + $CLEANUP)/' \
+ cnf/diffs/perl5-${PV}/makemaker-test.patch || die
+
+ sed -i \
+ -e 's/MakeMaker\.pm .*/MakeMaker.pm bf9174c70a0e50ff2fee4552c7df89b37d292da1/' \
+ -e 's/MM_Unix\.pm .*/MM_Unix.pm b0ec308fe2d7dcfcef5732880db0fae1f4ea80fa/' \
+ cnf/diffs/perl5-${PV}/customized.patch || die
+
+ sed -i \
+ -e 's|^lib/unicore/CombiningClass.pl pod/perluniprops.pod:|lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM)|' \
+ Makefile || die
+
+ # bug 604072
+ MAKEOPTS+=" -j1"
+ export MAKEOPTS
+ fi
+
+ if ! tc-is-static-only ; then
+ ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
+ ln -s ${LIBPERL} libperl$(get_libname ) || die
+ fi
+
+ if use gdbm; then
+ sed -i "s:INC => .*:INC => \"-I${EROOT}usr/include/gdbm\":g" \
+ ext/NDBM_File/Makefile.PL || die
+ fi
+
+ default
+}
+
+myconf() {
+ # the myconf array is declared in src_configure
+ myconf=( "${myconf[@]}" "$@" )
+}
+
+src_configure() {
+ declare -a myconf
+
+ export LC_ALL="C"
+ [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
+
+ # some arches and -O do not mix :)
+ use ppc && replace-flags -O? -O1
+
+ # Perl has problems compiling with -Os in your flags with glibc
+ use elibc_uclibc || replace-flags "-Os" "-O2"
+
+ # This flag makes compiling crash in interesting ways
+ filter-flags "-malign-double"
+
+ # Fixes bug #97645
+ use ppc && filter-flags "-mpowerpc-gpopt"
+
+ # Fixes bug #143895 on gcc-4.1.1
+ filter-flags "-fsched2-use-superblocks"
+
+ use sparc && myconf -Ud_longdbl
+
+ export BUILD_BZIP2=0
+ export BZIP2_INCLUDE=${EROOT}/usr/include
+ export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
+
+ export BUILD_ZLIB=False
+ export ZLIB_INCLUDE=${EROOT}/usr/include
+ export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
+
+ # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
+ myndbm='U'
+ mygdbm='U'
+ mydb='U'
+ if use gdbm ; then
+ mygdbm='D'
+ if use berkdb ; then
+ myndbm='D'
+ fi
+ fi
+ if use berkdb ; then
+ mydb='D'
+ has_version '=sys-libs/db-1*' && myndbm='D'
+ fi
+
+ myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
+
+ if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
+ ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
+ myconf -Ui_db -Ui_ndbm
+ fi
+
+ use ithreads && myconf -Dusethreads
+
+ if use debug ; then
+ append-cflags "-g"
+ myconf -DDEBUGGING
+ elif [[ ${CFLAGS} == *-g* ]] ; then
+ myconf -DDEBUGGING=-g
+ else
+ myconf -DDEBUGGING=none
+ fi
+
+ if [[ -n ${PERL_OLDVERSEN} ]] ; then
+ local inclist=$(for v in ${PERL_OLDVERSEN}; do echo -n "${v}/${myarch}${mythreading} ${v} "; done )
+ myconf -Dinc_version_list="${inclist}"
+ fi
+
+ [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
+
+ # Make sure we can do the final link #523730, need to set deployment
+ # target to override hardcoded 10.3 which breaks on modern OSX
+ [[ ${CHOST} == *-darwin* ]] && \
+ myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
+
+ # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
+ # Prefix itself we don't do multilib either, so make sure perl can find
+ # something compatible.
+ if use prefix ; then
+ # Set a hook to check for each detected library whether it actually works.
+ export libscheck="
+ ( echo 'main(){}' > '${T}'/conftest.c &&
+ $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
+ ) || xxx=/dev/null"
+
+ # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
+ local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
+ myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
+ elif [[ $(get_libdir) != "lib" ]] ; then
+ # We need to use " and not ', as the written config.sh use ' ...
+ myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
+ fi
+
+ # don't try building ODBM, bug #354453
+ disabled_extensions="ODBM_File"
+
+ if ! use gdbm ; then
+ # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
+ disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
+ fi
+
+ myconf -Dnoextensions="${disabled_extensions}"
+
+ [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
+ # allow fiddling via EXTRA_ECONF, bug 558070
+ eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
+
+ myconf \
+ -Duseshrplib \
+ -Darchname="${myarch}" \
+ -Dcc="$(tc-getCC)" \
+ -Doptimize="${CFLAGS}" \
+ -Dldflags="${LDFLAGS}" \
+ -Dprefix="${EPREFIX}"'/usr' \
+ -Dsiteprefix="${EPREFIX}"'/usr/local' \
+ -Dvendorprefix="${EPREFIX}"'/usr' \
+ -Dscriptdir="${EPREFIX}"'/usr/bin' \
+ -Dprivlib="${EPREFIX}${PRIV_LIB}" \
+ -Darchlib="${EPREFIX}${ARCH_LIB}" \
+ -Dsitelib="${EPREFIX}${SITE_LIB}" \
+ -Dsitearch="${EPREFIX}${SITE_ARCH}" \
+ -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
+ -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
+ -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
+ -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
+ -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dman1ext='1' \
+ -Dman3ext='3pm' \
+ -Dlibperl="${LIBPERL}" \
+ -Dlocincpth="${EPREFIX}"'/usr/include ' \
+ -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
+ -Duselargefiles \
+ -Dd_semctl_semun \
+ -Dcf_by='Gentoo' \
+ -Dmyhostname='localhost' \
+ -Dperladmin='root@localhost' \
+ -Ud_csh \
+ -Dsh="${EPREFIX}"/bin/sh \
+ -Dtargetsh="${EPREFIX}"/bin/sh \
+ -Uusenm \
+ "${myconf[@]}" \
+ "${EXTRA_ECONF[@]}"
+
+ if tc-is-cross-compiler; then
+ ./configure \
+ --target="${CHOST}" \
+ --build="${CBUILD}" \
+ -Dinstallprefix='' \
+ -Dinstallusrbinperl='undef' \
+ -Dusevendorprefix='define' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ else
+ sh Configure \
+ -des \
+ -Dinstallprefix="${EPREFIX}"'/usr' \
+ -Dinstallusrbinperl='n' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ fi
+}
+
+src_test() {
+ export NO_GENTOO_NETWORK_TESTS=1;
+ if [[ ${EUID} == 0 ]] ; then
+ ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
+ return 0
+ fi
+ use elibc_uclibc && export MAKEOPTS+=" -j1"
+ TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
+}
+
+src_install() {
+ local i
+ local coredir="${ARCH_LIB}/CORE"
+
+ emake DESTDIR="${D}" install
+
+ rm -f "${ED}/usr/bin/perl${MY_PV}"
+ ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
+
+ if ! tc-is-static-only ; then
+ dolib.so "${ED}"${coredir}/${LIBPERL}
+ rm -f "${ED}"${coredir}/${LIBPERL}
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
+ fi
+
+ rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
+
+ # This removes ${D} from Config.pm
+ for i in $(find "${D}" -iname "Config.pm" ) ; do
+ einfo "Removing ${D} from ${i}..."
+ sed -i -e "s:${D}::" "${i}" || die "Sed failed"
+ done
+
+ dodoc Changes* README AUTHORS
+
+ if use doc ; then
+ # HTML Documentation
+ # We expect errors, warnings, and such with the following.
+
+ dodir /usr/share/doc/${PF}/html
+ LD_LIBRARY_PATH=. ./perl installhtml \
+ --podroot='.' \
+ --podpath='lib:ext:pod:vms' \
+ --recurse \
+ --htmldir="${ED}/usr/share/doc/${PF}/html"
+ fi
+
+ [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
+
+ dual_scripts
+}
+
+pkg_preinst() {
+ check_rebuild
+}
+
+pkg_postinst() {
+ dual_scripts
+
+ if [[ "${ROOT}" = "/" ]] ; then
+ local INC DIR file
+ INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
+ einfo "Removing old .ph files"
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
+ rm -f "${file}"
+ einfo "<< ${file}"
+ done
+ fi
+ done
+ # Silently remove the now empty dirs
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
+ fi
+ done
+
+ fi
+}
+
+pkg_postrm(){
+ dual_scripts
+}
diff --git a/dev-lang/perl/perl-5.24.3.ebuild b/dev-lang/perl/perl-5.24.3.ebuild
new file mode 100644
index 000000000000..c25272fc0c4e
--- /dev/null
+++ b/dev-lang/perl/perl-5.24.3.ebuild
@@ -0,0 +1,564 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
+
+PATCH_VER=1
+CROSS_VER=1.1.6
+PATCH_BASE="perl-5.24.3-patches-${PATCH_VER}"
+
+PERL_OLDVERSEN="5.24.2 5.24.1 5.24.0"
+DIST_AUTHOR=SHAY
+
+SHORT_PV="${PV%.*}"
+MY_P="perl-${PV/_rc/-RC}"
+MY_PV="${PV%_rc*}"
+
+DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
+
+SRC_URI="
+ mirror://cpan/src/5.0/${MY_P}.tar.xz
+ mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
+ https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
+ mirror://gentoo/${PATCH_BASE}.tar.xz
+ https://dev.gentoo.org/~kentnl/distfiles/${PATCH_BASE}.tar.xz
+ https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
+"
+HOMEPAGE="http://www.perl.org/"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0/${SHORT_PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="berkdb debug doc gdbm ithreads"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3 )
+ app-arch/bzip2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
+"
+PDEPEND="
+ >=app-admin/perl-cleaner-2.5
+ >=virtual/perl-File-Path-2.130.0
+ >=virtual/perl-File-Temp-0.230.400-r2
+ >=virtual/perl-Data-Dumper-2.154.0
+ virtual/perl-Test-Harness
+"
+# bug 390719, bug 523624, bug 620304
+# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
+
+S="${WORKDIR}/${MY_P}"
+
+dual_scripts() {
+ src_remove_dual perl-core/Archive-Tar 2.40.100_rc ptar ptardiff ptargrep
+ src_remove_dual perl-core/CPAN 2.110.100_rc cpan
+ src_remove_dual perl-core/Digest-SHA 5.950.100_rc shasum
+ src_remove_dual perl-core/Encode 2.800.100_rc enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 7.100.200_rc instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.310.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.69.1_rc zipdetails
+ src_remove_dual perl-core/JSON-PP 2.273.0.100_rc json_pp
+ src_remove_dual perl-core/Module-CoreList 5.201.709.222.400_rc corelist
+ src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
+ src_remove_dual perl-core/Pod-Perldoc 3.250.300_rc perldoc
+ src_remove_dual perl-core/Test-Harness 3.360.100_rc prove
+ src_remove_dual perl-core/podlators 4.70.0 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 4.70.0 /usr/share/man/man1/perlpodstyle.1
+}
+
+check_rebuild() {
+ # Fresh install
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ return 0;
+ # Major Upgrade
+ # doesn't matter if there's multiple copies, it still needs a rebuild
+ # if the string is anything other than "5.CURRENTMAJOR"
+ elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
+ echo ""
+ ewarn "UPDATE THE PERL MODULES:"
+ ewarn "After updating dev-lang/perl the installed Perl modules"
+ ewarn "have to be re-installed. In most cases, this is done automatically"
+ ewarn "by the package manager, but subsequent steps are still recommended"
+ ewarn "to ensure system consistency."
+ ewarn
+ ewarn "You should start with a depclean to remove any unused perl dependencies"
+ ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
+ ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
+ ewarn "Recommended: emerge --depclean -va"
+ ewarn
+ ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
+ ewarn "remaining rebuilds portage may have missed."
+ ewarn "Use: perl-cleaner --all"
+ return 0;
+
+ # Reinstall w/ USE Change
+ elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
+ ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
+ ( use debug && ! has_version dev-lang/perl[debug] ) || \
+ ( ! use debug && has_version dev-lang/perl[debug] ) ; then
+ echo ""
+ ewarn "TOGGLED USE-FLAGS WARNING:"
+ ewarn "You changed one of the use-flags ithreads or debug."
+ ewarn "You must rebuild all perl-modules installed."
+ ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
+ fi
+}
+
+pkg_setup() {
+ case ${CHOST} in
+ *-freebsd*) osname="freebsd" ;;
+ *-dragonfly*) osname="dragonfly" ;;
+ *-netbsd*) osname="netbsd" ;;
+ *-openbsd*) osname="openbsd" ;;
+ *-darwin*) osname="darwin" ;;
+ *-interix*) osname="interix" ;;
+ *-aix*) osname="aix" ;;
+ *-cygwin*) osname="cygwin" ;;
+ *) osname="linux" ;;
+ esac
+
+ myarch="${CHOST%%-*}-${osname}"
+ if use debug ; then
+ myarch+="-debug"
+ fi
+ if use ithreads ; then
+ mythreading="-multi"
+ myarch+="-thread"
+ fi
+
+ LIBPERL="libperl$(get_libname ${MY_PV} )"
+ PRIV_LIB="/usr/$(get_libdir)/perl5/${MY_PV}"
+ ARCH_LIB="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
+ SITE_LIB="/usr/local/$(get_libdir)/perl5/${MY_PV}"
+ SITE_ARCH="/usr/local/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
+ VENDOR_LIB="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}"
+ VENDOR_ARCH="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}/${myarch}${mythreading}"
+
+ dual_scripts
+}
+
+src_remove_dual_file() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ alternatives_auto_makesym "${i}" "${i}-[0-9]*"
+ done
+ ;;
+ setup)
+ for i in "$@" ; do
+ if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
+ has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
+ break
+ fi
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i}{,-${ver}-${P}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual_man() {
+ local i pkg ver ff
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
+ ff=${ff##*${i#${i%.[0-9]}}}
+ alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ for i in "$@" ; do
+ src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
+ src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
+ done
+}
+
+src_prepare_update_patchlevel_h() {
+ # Copied and modified from debian:
+ # Copyright 2011 Niko Tyni
+ # This program is free software; you can redistribute it and/or modify
+ # it under the same terms as Perl itself.
+ local patchdir="${WORKDIR}/patches"
+ local prefix
+ local patchoutput="patchlevel-gentoo.h"
+
+ [[ -f ${patchdir}/series ]] || return 0
+
+while read patch
+do
+ patchname=$(echo $patch | sed 's/\.diff$//')
+ < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e '
+
+ # massage the patch headers
+ s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend;
+ s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend;
+ s|^Bug-Gentoo: ||; tprepend;
+ s/^\(Subject\|Description\): //; tappend;
+ s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend;
+
+ # post-process at the end of input
+ $ { x;
+ # include the version number in the patchlevel.h description (if available)
+ s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/;
+
+ # escape any backslashes and double quotes
+ s|\\|\\\\|g; s|"|\\"|g;
+
+ # add a prefix
+ s|^|\t,"'"$prefix$patchname"' - |;
+ # newlines away
+ s/\n/ /g; s/ */ /g;
+ # add a suffix
+ s/ *$/"/; p
+ };
+ # stop all processing
+ d;
+ # label: append to the hold space
+ :append H; d;
+ # label: prepend to the hold space
+ :prepend x; H; d;
+ '
+done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}"
+echo "${patchoutput}" >> "${S}/MANIFEST"
+}
+
+src_prepare() {
+ local patch
+ EPATCH_OPTS+=" -p1"
+ einfo "Applying patches from ${MY_P}-${PATCH_VER} ..."
+ while read patch ; do
+ EPATCH_SINGLE_MSG=" ${patch} ..."
+ epatch "${WORKDIR}"/patches/${patch}
+ done < "${WORKDIR}"/patches/series
+
+ src_prepare_update_patchlevel_h
+
+ if tc-is-cross-compiler; then
+ cp -a ../perl-cross-${CROSS_VER}/* . || die
+
+ sed -i \
+ -e 's/(15 + $CLEANUP)/(13 + $CLEANUP)/' \
+ cnf/diffs/perl5-${PV}/makemaker-test.patch || die
+
+ sed -i \
+ -e 's/MakeMaker\.pm .*/MakeMaker.pm bf9174c70a0e50ff2fee4552c7df89b37d292da1/' \
+ -e 's/MM_Unix\.pm .*/MM_Unix.pm b0ec308fe2d7dcfcef5732880db0fae1f4ea80fa/' \
+ cnf/diffs/perl5-${PV}/customized.patch || die
+
+ sed -i \
+ -e 's|^lib/unicore/CombiningClass.pl pod/perluniprops.pod:|lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM)|' \
+ Makefile || die
+
+ # bug 604072
+ MAKEOPTS+=" -j1"
+ export MAKEOPTS
+ fi
+
+ if ! tc-is-static-only ; then
+ ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
+ ln -s ${LIBPERL} libperl$(get_libname ) || die
+ fi
+
+ if use gdbm; then
+ sed -i "s:INC => .*:INC => \"-I${EROOT}usr/include/gdbm\":g" \
+ ext/NDBM_File/Makefile.PL || die
+ fi
+
+ default
+}
+
+myconf() {
+ # the myconf array is declared in src_configure
+ myconf=( "${myconf[@]}" "$@" )
+}
+
+src_configure() {
+ declare -a myconf
+
+ export LC_ALL="C"
+ [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
+
+ # some arches and -O do not mix :)
+ use ppc && replace-flags -O? -O1
+
+ # Perl has problems compiling with -Os in your flags with glibc
+ use elibc_uclibc || replace-flags "-Os" "-O2"
+
+ # This flag makes compiling crash in interesting ways
+ filter-flags "-malign-double"
+
+ # Fixes bug #97645
+ use ppc && filter-flags "-mpowerpc-gpopt"
+
+ # Fixes bug #143895 on gcc-4.1.1
+ filter-flags "-fsched2-use-superblocks"
+
+ use sparc && myconf -Ud_longdbl
+
+ export BUILD_BZIP2=0
+ export BZIP2_INCLUDE=${EROOT}/usr/include
+ export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
+
+ export BUILD_ZLIB=False
+ export ZLIB_INCLUDE=${EROOT}/usr/include
+ export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
+
+ # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
+ myndbm='U'
+ mygdbm='U'
+ mydb='U'
+ if use gdbm ; then
+ mygdbm='D'
+ if use berkdb ; then
+ myndbm='D'
+ fi
+ fi
+ if use berkdb ; then
+ mydb='D'
+ has_version '=sys-libs/db-1*' && myndbm='D'
+ fi
+
+ myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
+
+ if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
+ ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
+ myconf -Ui_db -Ui_ndbm
+ fi
+
+ use ithreads && myconf -Dusethreads
+
+ if use debug ; then
+ append-cflags "-g"
+ myconf -DDEBUGGING
+ elif [[ ${CFLAGS} == *-g* ]] ; then
+ myconf -DDEBUGGING=-g
+ else
+ myconf -DDEBUGGING=none
+ fi
+
+ if [[ -n ${PERL_OLDVERSEN} ]] ; then
+ local inclist=$(for v in ${PERL_OLDVERSEN}; do echo -n "${v}/${myarch}${mythreading} ${v} "; done )
+ myconf -Dinc_version_list="${inclist}"
+ fi
+
+ [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
+
+ # Make sure we can do the final link #523730, need to set deployment
+ # target to override hardcoded 10.3 which breaks on modern OSX
+ [[ ${CHOST} == *-darwin* ]] && \
+ myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
+
+ # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
+ # Prefix itself we don't do multilib either, so make sure perl can find
+ # something compatible.
+ if use prefix ; then
+ # Set a hook to check for each detected library whether it actually works.
+ export libscheck="
+ ( echo 'main(){}' > '${T}'/conftest.c &&
+ $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
+ ) || xxx=/dev/null"
+
+ # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
+ local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
+ myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
+ elif [[ $(get_libdir) != "lib" ]] ; then
+ # We need to use " and not ', as the written config.sh use ' ...
+ myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
+ fi
+
+ # don't try building ODBM, bug #354453
+ disabled_extensions="ODBM_File"
+
+ if ! use gdbm ; then
+ # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
+ disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
+ fi
+
+ myconf -Dnoextensions="${disabled_extensions}"
+
+ [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
+ # allow fiddling via EXTRA_ECONF, bug 558070
+ eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
+
+ myconf \
+ -Duseshrplib \
+ -Darchname="${myarch}" \
+ -Dcc="$(tc-getCC)" \
+ -Doptimize="${CFLAGS}" \
+ -Dldflags="${LDFLAGS}" \
+ -Dprefix="${EPREFIX}"'/usr' \
+ -Dsiteprefix="${EPREFIX}"'/usr/local' \
+ -Dvendorprefix="${EPREFIX}"'/usr' \
+ -Dscriptdir="${EPREFIX}"'/usr/bin' \
+ -Dprivlib="${EPREFIX}${PRIV_LIB}" \
+ -Darchlib="${EPREFIX}${ARCH_LIB}" \
+ -Dsitelib="${EPREFIX}${SITE_LIB}" \
+ -Dsitearch="${EPREFIX}${SITE_ARCH}" \
+ -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
+ -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
+ -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
+ -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
+ -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dman1ext='1' \
+ -Dman3ext='3pm' \
+ -Dlibperl="${LIBPERL}" \
+ -Dlocincpth="${EPREFIX}"'/usr/include ' \
+ -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
+ -Duselargefiles \
+ -Dd_semctl_semun \
+ -Dcf_by='Gentoo' \
+ -Dmyhostname='localhost' \
+ -Dperladmin='root@localhost' \
+ -Ud_csh \
+ -Dsh="${EPREFIX}"/bin/sh \
+ -Dtargetsh="${EPREFIX}"/bin/sh \
+ -Uusenm \
+ "${myconf[@]}" \
+ "${EXTRA_ECONF[@]}"
+
+ if tc-is-cross-compiler; then
+ ./configure \
+ --target="${CHOST}" \
+ --build="${CBUILD}" \
+ -Dinstallprefix='' \
+ -Dinstallusrbinperl='undef' \
+ -Dusevendorprefix='define' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ else
+ sh Configure \
+ -des \
+ -Dinstallprefix="${EPREFIX}"'/usr' \
+ -Dinstallusrbinperl='n' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ fi
+}
+
+src_test() {
+ export NO_GENTOO_NETWORK_TESTS=1;
+ if [[ ${EUID} == 0 ]] ; then
+ ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
+ return 0
+ fi
+ use elibc_uclibc && export MAKEOPTS+=" -j1"
+ TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
+}
+
+src_install() {
+ local i
+ local coredir="${ARCH_LIB}/CORE"
+
+ emake DESTDIR="${D}" install
+
+ rm -f "${ED}/usr/bin/perl${MY_PV}"
+ ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
+
+ if ! tc-is-static-only ; then
+ dolib.so "${ED}"${coredir}/${LIBPERL}
+ rm -f "${ED}"${coredir}/${LIBPERL}
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
+ fi
+
+ rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
+
+ # This removes ${D} from Config.pm
+ for i in $(find "${D}" -iname "Config.pm" ) ; do
+ einfo "Removing ${D} from ${i}..."
+ sed -i -e "s:${D}::" "${i}" || die "Sed failed"
+ done
+
+ dodoc Changes* README AUTHORS
+
+ if use doc ; then
+ # HTML Documentation
+ # We expect errors, warnings, and such with the following.
+
+ dodir /usr/share/doc/${PF}/html
+ LD_LIBRARY_PATH=. ./perl installhtml \
+ --podroot='.' \
+ --podpath='lib:ext:pod:vms' \
+ --recurse \
+ --htmldir="${ED}/usr/share/doc/${PF}/html"
+ fi
+
+ [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
+
+ dual_scripts
+}
+
+pkg_preinst() {
+ check_rebuild
+}
+
+pkg_postinst() {
+ dual_scripts
+
+ if [[ "${ROOT}" = "/" ]] ; then
+ local INC DIR file
+ INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
+ einfo "Removing old .ph files"
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
+ rm -f "${file}"
+ einfo "<< ${file}"
+ done
+ fi
+ done
+ # Silently remove the now empty dirs
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
+ fi
+ done
+
+ fi
+}
+
+pkg_postrm(){
+ dual_scripts
+}
diff --git a/dev-lang/perl/perl-5.26.0.ebuild b/dev-lang/perl/perl-5.26.0.ebuild
new file mode 100644
index 000000000000..31f557b650c7
--- /dev/null
+++ b/dev-lang/perl/perl-5.26.0.ebuild
@@ -0,0 +1,596 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
+
+PATCH_VER=1
+CROSS_VER=1.1.5
+PATCH_BASE="perl-5.25.11-patches-${PATCH_VER}"
+
+DIST_AUTHOR=XSAWYERX
+
+# Greatest first, don't include yourself
+# Devel point-releases are not ABI-intercompatible, but stable point releases are
+# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
+PERL_BIN_OLDVERSEN=""
+# Don't add more -RC values, its historical bungling
+PERL_OLDVERSEN="5.26.0-RC1 5.25.12 5.25.11 5.24.2 5.24.1 5.24.0 5.22.3 5.22.2 5.22.1 5.22.0"
+if [[ "${PV##*.}" == "9999" ]]; then
+ DIST_VERSION=5.26.0
+else
+ DIST_VERSION="${PV/_rc/-RC}"
+fi
+SHORT_PV="${DIST_VERSION%.*}"
+# Even numbered major versions are ABI intercompatible
+# Odd numbered major versions are not
+if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
+ SUBSLOT="${DIST_VERSION%-RC*}"
+else
+ SUBSLOT="${DIST_VERSION%.*}"
+fi
+# Used only in tar paths
+MY_P="perl-${DIST_VERSION}"
+# Used in library paths
+MY_PV="${DIST_VERSION%-RC*}"
+
+DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
+
+SRC_URI="
+ mirror://cpan/src/5.0/${MY_P}.tar.xz
+ mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
+ https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
+ mirror://gentoo/${PATCH_BASE}.tar.xz
+ https://dev.gentoo.org/~kentnl/distfiles/${PATCH_BASE}.tar.xz
+ https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
+"
+HOMEPAGE="http://www.perl.org/"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0/${SUBSLOT}"
+
+if [[ "${PV##*.}" != "9999" ]]; then
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="berkdb debug doc gdbm ithreads"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3 )
+ app-arch/bzip2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
+"
+PDEPEND="
+ >=app-admin/perl-cleaner-2.5
+ >=virtual/perl-File-Temp-0.230.400-r2
+ >=virtual/perl-File-Path-2.130.0
+ >=virtual/perl-Data-Dumper-2.154.0
+ virtual/perl-Test-Harness
+"
+# bug 390719, bug 523624, bug 620304
+# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
+
+S="${WORKDIR}/${MY_P}"
+
+dual_scripts() {
+ src_remove_dual perl-core/Archive-Tar 2.240.0 ptar ptardiff ptargrep
+ src_remove_dual perl-core/CPAN 2.180.0 cpan
+ src_remove_dual perl-core/Digest-SHA 5.960.0 shasum
+ src_remove_dual perl-core/Encode 2.880.0 enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 7.240.0 instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.340.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.74.0 zipdetails
+ src_remove_dual perl-core/JSON-PP 2.274.0.200_rc json_pp
+ src_remove_dual perl-core/Module-CoreList 5.201.705.300 corelist
+ src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
+ src_remove_dual perl-core/Pod-Perldoc 3.280.0 perldoc
+ src_remove_dual perl-core/Test-Harness 3.380.0 prove
+ src_remove_dual perl-core/podlators 4.90.0 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 4.90.0 /usr/share/man/man1/perlpodstyle.1
+}
+
+check_rebuild() {
+ # Fresh install
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ return 0;
+ # Major Upgrade
+ # doesn't matter if there's multiple copies, it still needs a rebuild
+ # if the string is anything other than "5.CURRENTMAJOR"
+ elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
+ echo ""
+ ewarn "UPDATE THE PERL MODULES:"
+ ewarn "After updating dev-lang/perl the installed Perl modules"
+ ewarn "have to be re-installed. In most cases, this is done automatically"
+ ewarn "by the package manager, but subsequent steps are still recommended"
+ ewarn "to ensure system consistency."
+ ewarn
+ ewarn "You should start with a depclean to remove any unused perl dependencies"
+ ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
+ ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
+ ewarn "Recommended: emerge --depclean -va"
+ ewarn
+ ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
+ ewarn "remaining rebuilds portage may have missed."
+ ewarn "Use: perl-cleaner --all"
+ return 0;
+
+ # Reinstall w/ USE Change
+ elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
+ ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
+ ( use debug && ! has_version dev-lang/perl[debug] ) || \
+ ( ! use debug && has_version dev-lang/perl[debug] ) ; then
+ echo ""
+ ewarn "TOGGLED USE-FLAGS WARNING:"
+ ewarn "You changed one of the use-flags ithreads or debug."
+ ewarn "You must rebuild all perl-modules installed."
+ ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
+ fi
+}
+
+pkg_setup() {
+ case ${CHOST} in
+ *-freebsd*) osname="freebsd" ;;
+ *-dragonfly*) osname="dragonfly" ;;
+ *-netbsd*) osname="netbsd" ;;
+ *-openbsd*) osname="openbsd" ;;
+ *-darwin*) osname="darwin" ;;
+ *-interix*) osname="interix" ;;
+ *-aix*) osname="aix" ;;
+ *-cygwin*) osname="cygwin" ;;
+ *) osname="linux" ;;
+ esac
+
+ myarch="${CHOST%%-*}-${osname}"
+ if use debug ; then
+ myarch+="-debug"
+ fi
+ if use ithreads ; then
+ mythreading="-multi"
+ myarch+="-thread"
+ fi
+
+ LIBPERL="libperl$(get_libname ${MY_PV} )"
+ PRIV_LIB="/usr/$(get_libdir)/perl5/${MY_PV}"
+ ARCH_LIB="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
+ SITE_LIB="/usr/local/$(get_libdir)/perl5/${MY_PV}"
+ SITE_ARCH="/usr/local/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
+ VENDOR_LIB="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}"
+ VENDOR_ARCH="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}/${myarch}${mythreading}"
+
+ dual_scripts
+}
+
+src_remove_dual_file() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ alternatives_auto_makesym "${i}" "${i}-[0-9]*"
+ done
+ ;;
+ setup)
+ for i in "$@" ; do
+ if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
+ has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
+ break
+ fi
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i}{,-${ver}-${P}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual_man() {
+ local i pkg ver ff
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
+ ff=${ff##*${i#${i%.[0-9]}}}
+ alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ for i in "$@" ; do
+ src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
+ src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
+ done
+}
+
+src_prepare_update_patchlevel_h() {
+ # Copied and modified from debian:
+ # Copyright 2011 Niko Tyni
+ # This program is free software; you can redistribute it and/or modify
+ # it under the same terms as Perl itself.
+ local patchdir="${WORKDIR}/patches"
+ local prefix
+ local patchoutput="patchlevel-gentoo.h"
+
+ [[ -f ${patchdir}/series ]] || return 0
+
+while read patch
+do
+ patchname=$(echo $patch | sed 's/\.diff$//')
+ < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e '
+
+ # massage the patch headers
+ s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend;
+ s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend;
+ s|^Bug-Gentoo: ||; tprepend;
+ s/^\(Subject\|Description\): //; tappend;
+ s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend;
+
+ # post-process at the end of input
+ $ { x;
+ # include the version number in the patchlevel.h description (if available)
+ s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/;
+
+ # escape any backslashes and double quotes
+ s|\\|\\\\|g; s|"|\\"|g;
+
+ # add a prefix
+ s|^|\t,"'"$prefix$patchname"' - |;
+ # newlines away
+ s/\n/ /g; s/ */ /g;
+ # add a suffix
+ s/ *$/"/; p
+ };
+ # stop all processing
+ d;
+ # label: append to the hold space
+ :append H; d;
+ # label: prepend to the hold space
+ :prepend x; H; d;
+ '
+done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}"
+echo "${patchoutput}" >> "${S}/MANIFEST"
+}
+
+src_prepare_perlcross() {
+ cp -a ../perl-cross-${CROSS_VER}/* . || die
+
+ sed -i \
+ -e 's/(15 + $CLEANUP)/(13 + $CLEANUP)/' \
+ cnf/diffs/perl5-${PV}/makemaker-test.patch || die
+
+ sed -i \
+ -e 's/MakeMaker\.pm .*/MakeMaker.pm bf9174c70a0e50ff2fee4552c7df89b37d292da1/' \
+ -e 's/MM_Unix\.pm .*/MM_Unix.pm b0ec308fe2d7dcfcef5732880db0fae1f4ea80fa/' \
+ cnf/diffs/perl5-${PV}/customized.patch || die
+
+ sed -i \
+ -e 's|^lib/unicore/CombiningClass.pl pod/perluniprops.pod:|lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM)|' \
+ Makefile || die
+
+ # bug 604072
+ MAKEOPTS+=" -j1"
+ export MAKEOPTS
+}
+src_prepare_dynamic() {
+ ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
+ ln -s ${LIBPERL} libperl$(get_libname ) || die
+}
+
+src_prepare() {
+ local patch
+ EPATCH_OPTS+=" -p1"
+ einfo "Applying patches from ${PATCH_BASE} ..."
+ while read patch ; do
+ EPATCH_SINGLE_MSG=" ${patch} ..."
+ epatch "${WORKDIR}"/patches/${patch}
+ done < "${WORKDIR}"/patches/series
+
+ src_prepare_update_patchlevel_h
+
+ tc-is-cross-compiler && src_prepare_perlcross
+
+ tc-is-static-only || src_prepare_dynamic
+
+ if use gdbm; then
+ sed -i "s:INC => .*:INC => \"-I${EROOT}usr/include/gdbm\":g" \
+ ext/NDBM_File/Makefile.PL || die
+ fi
+
+ default
+}
+
+myconf() {
+ # the myconf array is declared in src_configure
+ myconf=( "${myconf[@]}" "$@" )
+}
+
+src_configure() {
+ declare -a myconf
+
+ export LC_ALL="C"
+ [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
+
+ # some arches and -O do not mix :)
+ use ppc && replace-flags -O? -O1
+
+ # Perl has problems compiling with -Os in your flags with glibc
+ use elibc_uclibc || replace-flags "-Os" "-O2"
+
+ # This flag makes compiling crash in interesting ways
+ filter-flags "-malign-double"
+
+ # Fixes bug #97645
+ use ppc && filter-flags "-mpowerpc-gpopt"
+
+ # Fixes bug #143895 on gcc-4.1.1
+ filter-flags "-fsched2-use-superblocks"
+
+ use sparc && myconf -Ud_longdbl
+
+ export BUILD_BZIP2=0
+ export BZIP2_INCLUDE=${EROOT}/usr/include
+ export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
+
+ export BUILD_ZLIB=False
+ export ZLIB_INCLUDE=${EROOT}/usr/include
+ export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
+
+ # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
+ myndbm='U'
+ mygdbm='U'
+ mydb='U'
+ if use gdbm ; then
+ mygdbm='D'
+ if use berkdb ; then
+ myndbm='D'
+ fi
+ fi
+ if use berkdb ; then
+ mydb='D'
+ has_version '=sys-libs/db-1*' && myndbm='D'
+ fi
+
+ myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
+
+ if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
+ ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
+ myconf -Ui_db -Ui_ndbm
+ fi
+
+ use ithreads && myconf -Dusethreads
+
+ if use debug ; then
+ append-cflags "-g"
+ myconf -DDEBUGGING
+ elif [[ ${CFLAGS} == *-g* ]] ; then
+ myconf -DDEBUGGING=-g
+ else
+ myconf -DDEBUGGING=none
+ fi
+
+ if [[ -n ${PERL_OLDVERSEN} ]] ; then
+ local inclist=$(
+ for v in ${PERL_OLDVERSEN}; do
+ has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} ";
+ echo -n "${v} ";
+ done )
+ myconf -Dinc_version_list="${inclist}"
+ fi
+
+ [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
+
+ # Make sure we can do the final link #523730, need to set deployment
+ # target to override hardcoded 10.3 which breaks on modern OSX
+ [[ ${CHOST} == *-darwin* ]] && \
+ myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
+
+ # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
+ # Prefix itself we don't do multilib either, so make sure perl can find
+ # something compatible.
+ if use prefix ; then
+ # Set a hook to check for each detected library whether it actually works.
+ export libscheck="
+ ( echo 'main(){}' > '${T}'/conftest.c &&
+ $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
+ ) || xxx=/dev/null"
+
+ # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
+ local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
+ myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
+ elif [[ $(get_libdir) != "lib" ]] ; then
+ # We need to use " and not ', as the written config.sh use ' ...
+ myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
+ fi
+
+ # don't try building ODBM, bug #354453
+ disabled_extensions="ODBM_File"
+
+ if ! use gdbm ; then
+ # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
+ disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
+ fi
+
+ myconf -Dnoextensions="${disabled_extensions}"
+
+ [[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
+
+ [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
+ # allow fiddling via EXTRA_ECONF, bug 558070
+ eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
+
+ myconf \
+ -Duseshrplib \
+ -Darchname="${myarch}" \
+ -Dcc="$(tc-getCC)" \
+ -Doptimize="${CFLAGS}" \
+ -Dldflags="${LDFLAGS}" \
+ -Dprefix="${EPREFIX}"'/usr' \
+ -Dsiteprefix="${EPREFIX}"'/usr/local' \
+ -Dvendorprefix="${EPREFIX}"'/usr' \
+ -Dscriptdir="${EPREFIX}"'/usr/bin' \
+ -Dprivlib="${EPREFIX}${PRIV_LIB}" \
+ -Darchlib="${EPREFIX}${ARCH_LIB}" \
+ -Dsitelib="${EPREFIX}${SITE_LIB}" \
+ -Dsitearch="${EPREFIX}${SITE_ARCH}" \
+ -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
+ -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
+ -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
+ -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
+ -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dman1ext='1' \
+ -Dman3ext='3pm' \
+ -Dlibperl="${LIBPERL}" \
+ -Dlocincpth="${EPREFIX}"'/usr/include ' \
+ -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
+ -Duselargefiles \
+ -Dd_semctl_semun \
+ -Dcf_by='Gentoo' \
+ -Dmyhostname='localhost' \
+ -Dperladmin='root@localhost' \
+ -Ud_csh \
+ -Dsh="${EPREFIX}"/bin/sh \
+ -Dtargetsh="${EPREFIX}"/bin/sh \
+ -Uusenm \
+ "${myconf[@]}" \
+ "${EXTRA_ECONF[@]}"
+
+ if tc-is-cross-compiler; then
+ ./configure \
+ --target="${CHOST}" \
+ --build="${CBUILD}" \
+ -Dinstallprefix='' \
+ -Dinstallusrbinperl='undef' \
+ -Dusevendorprefix='define' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ else
+ sh Configure \
+ -des \
+ -Dinstallprefix="${EPREFIX}"'/usr' \
+ -Dinstallusrbinperl='n' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ fi
+}
+
+src_test() {
+ export NO_GENTOO_NETWORK_TESTS=1;
+ if [[ ${EUID} == 0 ]] ; then
+ ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
+ return 0
+ fi
+ use elibc_uclibc && export MAKEOPTS+=" -j1"
+ TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
+}
+
+src_install() {
+ local i
+ local coredir="${ARCH_LIB}/CORE"
+
+ emake DESTDIR="${D}" install
+
+ rm -f "${ED}/usr/bin/perl${MY_PV}"
+ ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
+
+ if ! tc-is-static-only ; then
+ dolib.so "${ED}"${coredir}/${LIBPERL}
+ rm -f "${ED}"${coredir}/${LIBPERL}
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
+ fi
+
+ rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
+
+ # This removes ${D} from Config.pm
+ for i in $(find "${D}" -iname "Config.pm" ) ; do
+ einfo "Removing ${D} from ${i}..."
+ sed -i -e "s:${D}::" "${i}" || die "Sed failed"
+ done
+
+ dodoc Changes* README AUTHORS
+
+ if use doc ; then
+ # HTML Documentation
+ # We expect errors, warnings, and such with the following.
+
+ dodir /usr/share/doc/${PF}/html
+ LD_LIBRARY_PATH=. ./perl installhtml \
+ --podroot='.' \
+ --podpath='lib:ext:pod:vms' \
+ --recurse \
+ --htmldir="${ED}/usr/share/doc/${PF}/html"
+ fi
+
+ [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
+
+ dual_scripts
+}
+
+pkg_preinst() {
+ check_rebuild
+}
+
+pkg_postinst() {
+ dual_scripts
+
+ if [[ "${ROOT}" = "/" ]] ; then
+ local INC DIR file
+ INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
+ einfo "Removing old .ph files"
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
+ rm -f "${file}"
+ einfo "<< ${file}"
+ done
+ fi
+ done
+ # Silently remove the now empty dirs
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
+ fi
+ done
+
+ fi
+}
+
+pkg_postrm(){
+ dual_scripts
+}
diff --git a/dev-lang/perl/perl-5.26.1.ebuild b/dev-lang/perl/perl-5.26.1.ebuild
new file mode 100644
index 000000000000..cb9cb10d6f99
--- /dev/null
+++ b/dev-lang/perl/perl-5.26.1.ebuild
@@ -0,0 +1,623 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
+
+PATCH_VER=1
+CROSS_VER=1.1.6
+PATCH_BASE="perl-5.25.11-patches-${PATCH_VER}"
+
+DIST_AUTHOR=SHAY
+
+# Greatest first, don't include yourself
+# Devel point-releases are not ABI-intercompatible, but stable point releases are
+# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
+PERL_BIN_OLDVERSEN="5.26.0"
+if [[ "${PV##*.}" == "9999" ]]; then
+ DIST_VERSION=5.26.1-RC1
+else
+ DIST_VERSION="${PV/_rc/-RC}"
+fi
+SHORT_PV="${DIST_VERSION%.*}"
+# Even numbered major versions are ABI intercompatible
+# Odd numbered major versions are not
+if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
+ SUBSLOT="${DIST_VERSION%-RC*}"
+else
+ SUBSLOT="${DIST_VERSION%.*}"
+fi
+# Used only in tar paths
+MY_P="perl-${DIST_VERSION}"
+# Used in library paths
+MY_PV="${DIST_VERSION%-RC*}"
+
+DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
+
+SRC_URI="
+ mirror://cpan/src/5.0/${MY_P}.tar.xz
+ mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
+ https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
+ mirror://gentoo/${PATCH_BASE}.tar.xz
+ https://dev.gentoo.org/~kentnl/distfiles/${PATCH_BASE}.tar.xz
+ https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
+"
+HOMEPAGE="http://www.perl.org/"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0/${SUBSLOT}"
+
+if [[ "${PV##*.}" != "9999" ]]; then
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="berkdb debug doc gdbm ithreads"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3 )
+ app-arch/bzip2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
+"
+PDEPEND="
+ >=app-admin/perl-cleaner-2.5
+ >=virtual/perl-File-Temp-0.230.400-r2
+ >=virtual/perl-Data-Dumper-2.154.0
+ virtual/perl-Test-Harness
+"
+# bug 390719, bug 523624
+# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
+
+S="${WORKDIR}/${MY_P}"
+
+dual_scripts() {
+ src_remove_dual perl-core/Archive-Tar 2.240.0 ptar ptardiff ptargrep
+ src_remove_dual perl-core/CPAN 2.180.0 cpan
+ src_remove_dual perl-core/Digest-SHA 5.960.0 shasum
+ src_remove_dual perl-core/Encode 2.880.0 enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 7.240.0 instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.340.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.74.0 zipdetails
+ src_remove_dual perl-core/JSON-PP 2.274.0.200_rc json_pp
+ src_remove_dual perl-core/Module-CoreList 5.201.709.222.600_rc corelist
+ src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
+ src_remove_dual perl-core/Pod-Perldoc 3.280.0 perldoc
+ src_remove_dual perl-core/Test-Harness 3.380.0 prove
+ src_remove_dual perl-core/podlators 4.90.0 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 4.90.0 /usr/share/man/man1/perlpodstyle.1
+}
+
+check_rebuild() {
+ # Fresh install
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ return 0;
+ # Major Upgrade
+ # doesn't matter if there's multiple copies, it still needs a rebuild
+ # if the string is anything other than "5.CURRENTMAJOR"
+ elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
+ echo ""
+ ewarn "UPDATE THE PERL MODULES:"
+ ewarn "After updating dev-lang/perl the installed Perl modules"
+ ewarn "have to be re-installed. In most cases, this is done automatically"
+ ewarn "by the package manager, but subsequent steps are still recommended"
+ ewarn "to ensure system consistency."
+ ewarn
+ ewarn "You should start with a depclean to remove any unused perl dependencies"
+ ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
+ ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
+ ewarn "Recommended: emerge --depclean -va"
+ ewarn
+ ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
+ ewarn "remaining rebuilds portage may have missed."
+ ewarn "Use: perl-cleaner --all"
+ return 0;
+
+ # Reinstall w/ USE Change
+ elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
+ ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
+ ( use debug && ! has_version dev-lang/perl[debug] ) || \
+ ( ! use debug && has_version dev-lang/perl[debug] ) ; then
+ echo ""
+ ewarn "TOGGLED USE-FLAGS WARNING:"
+ ewarn "You changed one of the use-flags ithreads or debug."
+ ewarn "You must rebuild all perl-modules installed."
+ ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
+ fi
+}
+
+pkg_setup() {
+ case ${CHOST} in
+ *-freebsd*) osname="freebsd" ;;
+ *-dragonfly*) osname="dragonfly" ;;
+ *-netbsd*) osname="netbsd" ;;
+ *-openbsd*) osname="openbsd" ;;
+ *-darwin*) osname="darwin" ;;
+ *-interix*) osname="interix" ;;
+ *-aix*) osname="aix" ;;
+ *-cygwin*) osname="cygwin" ;;
+ *) osname="linux" ;;
+ esac
+
+ myarch="${CHOST%%-*}-${osname}"
+ if use debug ; then
+ myarch+="-debug"
+ fi
+ if use ithreads ; then
+ mythreading="-multi"
+ myarch+="-thread"
+ fi
+
+ PRIV_BASE="/usr/$(get_libdir)/perl5"
+ SITE_BASE="/usr/local/$(get_libdir)/perl5"
+ VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
+
+ LIBPERL="libperl$(get_libname ${MY_PV} )"
+ PRIV_LIB="${PRIV_BASE}/${MY_PV}"
+ ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
+ SITE_LIB="${SITE_BASE}/${MY_PV}"
+ SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
+ VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
+ VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
+
+ dual_scripts
+}
+
+src_remove_dual_file() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ alternatives_auto_makesym "${i}" "${i}-[0-9]*"
+ done
+ ;;
+ setup)
+ for i in "$@" ; do
+ if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
+ has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
+ break
+ fi
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i}{,-${ver}-${P}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual_man() {
+ local i pkg ver ff
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
+ ff=${ff##*${i#${i%.[0-9]}}}
+ alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ for i in "$@" ; do
+ src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
+ src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
+ done
+}
+
+src_prepare_update_patchlevel_h() {
+ # Copied and modified from debian:
+ # Copyright 2011 Niko Tyni
+ # This program is free software; you can redistribute it and/or modify
+ # it under the same terms as Perl itself.
+ local patchdir="${WORKDIR}/patches"
+ local prefix
+ local patchoutput="patchlevel-gentoo.h"
+
+ [[ -f ${patchdir}/series ]] || return 0
+
+while read patch
+do
+ patchname=$(echo $patch | sed 's/\.diff$//')
+ < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e '
+
+ # massage the patch headers
+ s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend;
+ s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend;
+ s|^Bug-Gentoo: ||; tprepend;
+ s/^\(Subject\|Description\): //; tappend;
+ s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend;
+
+ # post-process at the end of input
+ $ { x;
+ # include the version number in the patchlevel.h description (if available)
+ s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/;
+
+ # escape any backslashes and double quotes
+ s|\\|\\\\|g; s|"|\\"|g;
+
+ # add a prefix
+ s|^|\t,"'"$prefix$patchname"' - |;
+ # newlines away
+ s/\n/ /g; s/ */ /g;
+ # add a suffix
+ s/ *$/"/; p
+ };
+ # stop all processing
+ d;
+ # label: append to the hold space
+ :append H; d;
+ # label: prepend to the hold space
+ :prepend x; H; d;
+ '
+done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}"
+echo "${patchoutput}" >> "${S}/MANIFEST"
+}
+
+src_prepare_perlcross() {
+ cp -a ../perl-cross-${CROSS_VER}/* . || die
+
+ sed -i \
+ -e 's/(15 + $CLEANUP)/(13 + $CLEANUP)/' \
+ cnf/diffs/perl5-${PV}/makemaker-test.patch || die
+
+ sed -i \
+ -e 's/MakeMaker\.pm .*/MakeMaker.pm bf9174c70a0e50ff2fee4552c7df89b37d292da1/' \
+ -e 's/MM_Unix\.pm .*/MM_Unix.pm b0ec308fe2d7dcfcef5732880db0fae1f4ea80fa/' \
+ cnf/diffs/perl5-${PV}/customized.patch || die
+
+ sed -i \
+ -e 's|^lib/unicore/CombiningClass.pl pod/perluniprops.pod:|lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM)|' \
+ Makefile || die
+
+ # bug 604072
+ MAKEOPTS+=" -j1"
+ export MAKEOPTS
+}
+src_prepare_dynamic() {
+ ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
+ ln -s ${LIBPERL} libperl$(get_libname ) || die
+}
+
+src_prepare() {
+ local patch
+ EPATCH_OPTS+=" -p1"
+ einfo "Applying patches from ${PATCH_BASE} ..."
+ while read patch ; do
+ EPATCH_SINGLE_MSG=" ${patch} ..."
+ epatch "${WORKDIR}"/patches/${patch}
+ done < "${WORKDIR}"/patches/series
+
+ src_prepare_update_patchlevel_h
+
+ tc-is-cross-compiler && src_prepare_perlcross
+
+ tc-is-static-only || src_prepare_dynamic
+
+ if use gdbm; then
+ sed -i "s:INC => .*:INC => \"-I${EROOT}usr/include/gdbm\":g" \
+ ext/NDBM_File/Makefile.PL || die
+ fi
+
+ default
+}
+
+myconf() {
+ # the myconf array is declared in src_configure
+ myconf=( "${myconf[@]}" "$@" )
+}
+
+src_configure() {
+ declare -a myconf
+
+ export LC_ALL="C"
+ [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
+
+ # some arches and -O do not mix :)
+ use ppc && replace-flags -O? -O1
+
+ # Perl has problems compiling with -Os in your flags with glibc
+ use elibc_uclibc || replace-flags "-Os" "-O2"
+
+ # This flag makes compiling crash in interesting ways
+ filter-flags "-malign-double"
+
+ # Fixes bug #97645
+ use ppc && filter-flags "-mpowerpc-gpopt"
+
+ # Fixes bug #143895 on gcc-4.1.1
+ filter-flags "-fsched2-use-superblocks"
+
+ use sparc && myconf -Ud_longdbl
+
+ export BUILD_BZIP2=0
+ export BZIP2_INCLUDE=${EROOT}/usr/include
+ export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
+
+ export BUILD_ZLIB=False
+ export ZLIB_INCLUDE=${EROOT}/usr/include
+ export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
+
+ # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
+ myndbm='U'
+ mygdbm='U'
+ mydb='U'
+ if use gdbm ; then
+ mygdbm='D'
+ if use berkdb ; then
+ myndbm='D'
+ fi
+ fi
+ if use berkdb ; then
+ mydb='D'
+ has_version '=sys-libs/db-1*' && myndbm='D'
+ fi
+
+ myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
+
+ if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
+ ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
+ myconf -Ui_db -Ui_ndbm
+ fi
+
+ use ithreads && myconf -Dusethreads
+
+ if use debug ; then
+ append-cflags "-g"
+ myconf -DDEBUGGING
+ elif [[ ${CFLAGS} == *-g* ]] ; then
+ myconf -DDEBUGGING=-g
+ else
+ myconf -DDEBUGGING=none
+ fi
+
+ # Autodiscover all old version directories, some of them will even be newer
+ # if you downgrade
+ if [[ -z ${PERL_OLDVERSEN} ]]; then
+ PERL_OLDVERSEN="$(
+ find "${EROOT%/}${PRIV_BASE}" "${EROOT%/}${SITE_BASE}" "${EROOT%/}${VENDOR_BASE}" \
+ -maxdepth 1 -mindepth 1 -type d -regex '.*/5[.][0-9]+[.][0-9]+$' \
+ -printf "%f " 2>/dev/null )"
+ fi
+ # Fixup versions, removing self match, fixing order and dupes
+ PERL_OLDVERSEN="$(
+ echo "${PERL_OLDVERSEN}" |\
+ tr " " "\n" |\
+ grep -vF "${DIST_VERSION%-RC}" |\
+ sort -u -nr -t'.' -k1,1 -k2,2 -k3,3
+ )"
+
+ # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
+ if [[ -n "${PERL_OLDVERSEN// }" ]]; then
+ local inclist="$(
+ for v in ${PERL_OLDVERSEN}; do
+ has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} ";
+ echo -n "${v} ";
+ done )"
+ einfo "This version of perl may partially support modules previously"
+ einfo "installed in any of the following paths:"
+ for incpath in ${inclist}; do
+ [[ -e "${EROOT%/}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${VENDOR_BASE}/${incpath}"
+ [[ -e "${EROOT%/}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROO%/T}${PRIV_BASE}/${incpath}"
+ [[ -e "${EROOT%/}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${SITE_BASE}/${incpath}"
+ done
+ einfo "This is a temporary measure and you should aim to cleanup these paths"
+ einfo "via world updates and perl-cleaner"
+ myconf -Dinc_version_list="${inclist}"
+ fi
+
+ [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
+
+ # Make sure we can do the final link #523730, need to set deployment
+ # target to override hardcoded 10.3 which breaks on modern OSX
+ [[ ${CHOST} == *-darwin* ]] && \
+ myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
+
+ # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
+ # Prefix itself we don't do multilib either, so make sure perl can find
+ # something compatible.
+ if use prefix ; then
+ # Set a hook to check for each detected library whether it actually works.
+ export libscheck="
+ ( echo 'main(){}' > '${T}'/conftest.c &&
+ $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
+ ) || xxx=/dev/null"
+
+ # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
+ local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
+ myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
+ elif [[ $(get_libdir) != "lib" ]] ; then
+ # We need to use " and not ', as the written config.sh use ' ...
+ myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
+ fi
+
+ # don't try building ODBM, bug #354453
+ disabled_extensions="ODBM_File"
+
+ if ! use gdbm ; then
+ # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
+ disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
+ fi
+
+ myconf -Dnoextensions="${disabled_extensions}"
+
+ [[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
+
+ [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
+ # allow fiddling via EXTRA_ECONF, bug 558070
+ eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
+
+ myconf \
+ -Duseshrplib \
+ -Darchname="${myarch}" \
+ -Dcc="$(tc-getCC)" \
+ -Doptimize="${CFLAGS}" \
+ -Dldflags="${LDFLAGS}" \
+ -Dprefix="${EPREFIX}"'/usr' \
+ -Dsiteprefix="${EPREFIX}"'/usr/local' \
+ -Dvendorprefix="${EPREFIX}"'/usr' \
+ -Dscriptdir="${EPREFIX}"'/usr/bin' \
+ -Dprivlib="${EPREFIX}${PRIV_LIB}" \
+ -Darchlib="${EPREFIX}${ARCH_LIB}" \
+ -Dsitelib="${EPREFIX}${SITE_LIB}" \
+ -Dsitearch="${EPREFIX}${SITE_ARCH}" \
+ -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
+ -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
+ -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
+ -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
+ -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dman1ext='1' \
+ -Dman3ext='3pm' \
+ -Dlibperl="${LIBPERL}" \
+ -Dlocincpth="${EPREFIX}"'/usr/include ' \
+ -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
+ -Duselargefiles \
+ -Dd_semctl_semun \
+ -Dcf_by='Gentoo' \
+ -Dmyhostname='localhost' \
+ -Dperladmin='root@localhost' \
+ -Ud_csh \
+ -Dsh="${EPREFIX}"/bin/sh \
+ -Dtargetsh="${EPREFIX}"/bin/sh \
+ -Uusenm \
+ "${myconf[@]}" \
+ "${EXTRA_ECONF[@]}"
+
+ if tc-is-cross-compiler; then
+ ./configure \
+ --target="${CHOST}" \
+ --build="${CBUILD}" \
+ -Dinstallprefix='' \
+ -Dinstallusrbinperl='undef' \
+ -Dusevendorprefix='define' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ else
+ sh Configure \
+ -des \
+ -Dinstallprefix="${EPREFIX}"'/usr' \
+ -Dinstallusrbinperl='n' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ fi
+}
+
+src_test() {
+ export NO_GENTOO_NETWORK_TESTS=1;
+ if [[ ${EUID} == 0 ]] ; then
+ ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
+ return 0
+ fi
+ use elibc_uclibc && export MAKEOPTS+=" -j1"
+ TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
+}
+
+src_install() {
+ local i
+ local coredir="${ARCH_LIB}/CORE"
+
+ emake DESTDIR="${D}" install
+
+ rm -f "${ED}/usr/bin/perl${MY_PV}"
+ ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
+
+ if ! tc-is-static-only ; then
+ dolib.so "${ED}"${coredir}/${LIBPERL}
+ rm -f "${ED}"${coredir}/${LIBPERL}
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
+ fi
+
+ rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
+
+ # This removes ${D} from Config.pm
+ for i in $(find "${D}" -iname "Config.pm" ) ; do
+ einfo "Removing ${D} from ${i}..."
+ sed -i -e "s:${D}::" "${i}" || die "Sed failed"
+ done
+
+ dodoc Changes* README AUTHORS
+
+ if use doc ; then
+ # HTML Documentation
+ # We expect errors, warnings, and such with the following.
+
+ dodir /usr/share/doc/${PF}/html
+ LD_LIBRARY_PATH=. ./perl installhtml \
+ --podroot='.' \
+ --podpath='lib:ext:pod:vms' \
+ --recurse \
+ --htmldir="${ED}/usr/share/doc/${PF}/html"
+ fi
+
+ [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
+
+ dual_scripts
+}
+
+pkg_preinst() {
+ check_rebuild
+}
+
+pkg_postinst() {
+ dual_scripts
+
+ if [[ "${ROOT}" = "/" ]] ; then
+ local INC DIR file
+ INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
+ einfo "Removing old .ph files"
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
+ rm -f "${file}"
+ einfo "<< ${file}"
+ done
+ fi
+ done
+ # Silently remove the now empty dirs
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
+ fi
+ done
+
+ fi
+}
+
+pkg_postrm(){
+ dual_scripts
+}
diff --git a/dev-lang/perl/perl-5.26.9999.ebuild b/dev-lang/perl/perl-5.26.9999.ebuild
new file mode 100644
index 000000000000..4ca2f53d0a04
--- /dev/null
+++ b/dev-lang/perl/perl-5.26.9999.ebuild
@@ -0,0 +1,623 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
+
+PATCH_VER=1
+CROSS_VER=1.1.6
+PATCH_BASE="perl-5.25.11-patches-${PATCH_VER}"
+
+DIST_AUTHOR=SHAY
+
+# Greatest first, don't include yourself
+# Devel point-releases are not ABI-intercompatible, but stable point releases are
+# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
+PERL_BIN_OLDVERSEN="5.26.0"
+if [[ "${PV##*.}" == "9999" ]]; then
+ DIST_VERSION=5.26.1-RC1
+else
+ DIST_VERSION="${PV/_rc/-RC}"
+fi
+SHORT_PV="${DIST_VERSION%.*}"
+# Even numbered major versions are ABI intercompatible
+# Odd numbered major versions are not
+if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
+ SUBSLOT="${DIST_VERSION%-RC*}"
+else
+ SUBSLOT="${DIST_VERSION%.*}"
+fi
+# Used only in tar paths
+MY_P="perl-${DIST_VERSION}"
+# Used in library paths
+MY_PV="${DIST_VERSION%-RC*}"
+
+DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
+
+SRC_URI="
+ mirror://cpan/src/5.0/${MY_P}.tar.xz
+ mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
+ https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
+ mirror://gentoo/${PATCH_BASE}.tar.xz
+ https://dev.gentoo.org/~kentnl/distfiles/${PATCH_BASE}.tar.xz
+ https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
+"
+HOMEPAGE="http://www.perl.org/"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0/${SUBSLOT}"
+
+if [[ "${PV##*.}" != "9999" ]]; then
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="berkdb debug doc gdbm ithreads"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3 )
+ app-arch/bzip2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
+"
+PDEPEND="
+ >=app-admin/perl-cleaner-2.5
+ >=virtual/perl-File-Temp-0.230.400-r2
+ >=virtual/perl-Data-Dumper-2.154.0
+ virtual/perl-Test-Harness
+"
+# bug 390719, bug 523624
+# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
+
+S="${WORKDIR}/${MY_P}"
+
+dual_scripts() {
+ src_remove_dual perl-core/Archive-Tar 2.240.0 ptar ptardiff ptargrep
+ src_remove_dual perl-core/CPAN 2.180.0 cpan
+ src_remove_dual perl-core/Digest-SHA 5.960.0 shasum
+ src_remove_dual perl-core/Encode 2.880.0 enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 7.240.0 instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.340.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.74.0 zipdetails
+ src_remove_dual perl-core/JSON-PP 2.274.0.200_rc json_pp
+ src_remove_dual perl-core/Module-CoreList 5.201.709.220 corelist
+ src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
+ src_remove_dual perl-core/Pod-Perldoc 3.280.0 perldoc
+ src_remove_dual perl-core/Test-Harness 3.380.0 prove
+ src_remove_dual perl-core/podlators 4.90.0 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 4.90.0 /usr/share/man/man1/perlpodstyle.1
+}
+
+check_rebuild() {
+ # Fresh install
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ return 0;
+ # Major Upgrade
+ # doesn't matter if there's multiple copies, it still needs a rebuild
+ # if the string is anything other than "5.CURRENTMAJOR"
+ elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
+ echo ""
+ ewarn "UPDATE THE PERL MODULES:"
+ ewarn "After updating dev-lang/perl the installed Perl modules"
+ ewarn "have to be re-installed. In most cases, this is done automatically"
+ ewarn "by the package manager, but subsequent steps are still recommended"
+ ewarn "to ensure system consistency."
+ ewarn
+ ewarn "You should start with a depclean to remove any unused perl dependencies"
+ ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
+ ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
+ ewarn "Recommended: emerge --depclean -va"
+ ewarn
+ ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
+ ewarn "remaining rebuilds portage may have missed."
+ ewarn "Use: perl-cleaner --all"
+ return 0;
+
+ # Reinstall w/ USE Change
+ elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
+ ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
+ ( use debug && ! has_version dev-lang/perl[debug] ) || \
+ ( ! use debug && has_version dev-lang/perl[debug] ) ; then
+ echo ""
+ ewarn "TOGGLED USE-FLAGS WARNING:"
+ ewarn "You changed one of the use-flags ithreads or debug."
+ ewarn "You must rebuild all perl-modules installed."
+ ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
+ fi
+}
+
+pkg_setup() {
+ case ${CHOST} in
+ *-freebsd*) osname="freebsd" ;;
+ *-dragonfly*) osname="dragonfly" ;;
+ *-netbsd*) osname="netbsd" ;;
+ *-openbsd*) osname="openbsd" ;;
+ *-darwin*) osname="darwin" ;;
+ *-interix*) osname="interix" ;;
+ *-aix*) osname="aix" ;;
+ *-cygwin*) osname="cygwin" ;;
+ *) osname="linux" ;;
+ esac
+
+ myarch="${CHOST%%-*}-${osname}"
+ if use debug ; then
+ myarch+="-debug"
+ fi
+ if use ithreads ; then
+ mythreading="-multi"
+ myarch+="-thread"
+ fi
+
+ PRIV_BASE="/usr/$(get_libdir)/perl5"
+ SITE_BASE="/usr/local/$(get_libdir)/perl5"
+ VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
+
+ LIBPERL="libperl$(get_libname ${MY_PV} )"
+ PRIV_LIB="${PRIV_BASE}/${MY_PV}"
+ ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
+ SITE_LIB="${SITE_BASE}/${MY_PV}"
+ SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
+ VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
+ VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
+
+ dual_scripts
+}
+
+src_remove_dual_file() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ alternatives_auto_makesym "${i}" "${i}-[0-9]*"
+ done
+ ;;
+ setup)
+ for i in "$@" ; do
+ if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
+ has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
+ break
+ fi
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i}{,-${ver}-${P}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual_man() {
+ local i pkg ver ff
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
+ ff=${ff##*${i#${i%.[0-9]}}}
+ alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ for i in "$@" ; do
+ src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
+ src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
+ done
+}
+
+src_prepare_update_patchlevel_h() {
+ # Copied and modified from debian:
+ # Copyright 2011 Niko Tyni
+ # This program is free software; you can redistribute it and/or modify
+ # it under the same terms as Perl itself.
+ local patchdir="${WORKDIR}/patches"
+ local prefix
+ local patchoutput="patchlevel-gentoo.h"
+
+ [[ -f ${patchdir}/series ]] || return 0
+
+while read patch
+do
+ patchname=$(echo $patch | sed 's/\.diff$//')
+ < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e '
+
+ # massage the patch headers
+ s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend;
+ s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend;
+ s|^Bug-Gentoo: ||; tprepend;
+ s/^\(Subject\|Description\): //; tappend;
+ s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend;
+
+ # post-process at the end of input
+ $ { x;
+ # include the version number in the patchlevel.h description (if available)
+ s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/;
+
+ # escape any backslashes and double quotes
+ s|\\|\\\\|g; s|"|\\"|g;
+
+ # add a prefix
+ s|^|\t,"'"$prefix$patchname"' - |;
+ # newlines away
+ s/\n/ /g; s/ */ /g;
+ # add a suffix
+ s/ *$/"/; p
+ };
+ # stop all processing
+ d;
+ # label: append to the hold space
+ :append H; d;
+ # label: prepend to the hold space
+ :prepend x; H; d;
+ '
+done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}"
+echo "${patchoutput}" >> "${S}/MANIFEST"
+}
+
+src_prepare_perlcross() {
+ cp -a ../perl-cross-${CROSS_VER}/* . || die
+
+ sed -i \
+ -e 's/(15 + $CLEANUP)/(13 + $CLEANUP)/' \
+ cnf/diffs/perl5-${PV}/makemaker-test.patch || die
+
+ sed -i \
+ -e 's/MakeMaker\.pm .*/MakeMaker.pm bf9174c70a0e50ff2fee4552c7df89b37d292da1/' \
+ -e 's/MM_Unix\.pm .*/MM_Unix.pm b0ec308fe2d7dcfcef5732880db0fae1f4ea80fa/' \
+ cnf/diffs/perl5-${PV}/customized.patch || die
+
+ sed -i \
+ -e 's|^lib/unicore/CombiningClass.pl pod/perluniprops.pod:|lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM)|' \
+ Makefile || die
+
+ # bug 604072
+ MAKEOPTS+=" -j1"
+ export MAKEOPTS
+}
+src_prepare_dynamic() {
+ ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
+ ln -s ${LIBPERL} libperl$(get_libname ) || die
+}
+
+src_prepare() {
+ local patch
+ EPATCH_OPTS+=" -p1"
+ einfo "Applying patches from ${PATCH_BASE} ..."
+ while read patch ; do
+ EPATCH_SINGLE_MSG=" ${patch} ..."
+ epatch "${WORKDIR}"/patches/${patch}
+ done < "${WORKDIR}"/patches/series
+
+ src_prepare_update_patchlevel_h
+
+ tc-is-cross-compiler && src_prepare_perlcross
+
+ tc-is-static-only || src_prepare_dynamic
+
+ if use gdbm; then
+ sed -i "s:INC => .*:INC => \"-I${EROOT}usr/include/gdbm\":g" \
+ ext/NDBM_File/Makefile.PL || die
+ fi
+
+ default
+}
+
+myconf() {
+ # the myconf array is declared in src_configure
+ myconf=( "${myconf[@]}" "$@" )
+}
+
+src_configure() {
+ declare -a myconf
+
+ export LC_ALL="C"
+ [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
+
+ # some arches and -O do not mix :)
+ use ppc && replace-flags -O? -O1
+
+ # Perl has problems compiling with -Os in your flags with glibc
+ use elibc_uclibc || replace-flags "-Os" "-O2"
+
+ # This flag makes compiling crash in interesting ways
+ filter-flags "-malign-double"
+
+ # Fixes bug #97645
+ use ppc && filter-flags "-mpowerpc-gpopt"
+
+ # Fixes bug #143895 on gcc-4.1.1
+ filter-flags "-fsched2-use-superblocks"
+
+ use sparc && myconf -Ud_longdbl
+
+ export BUILD_BZIP2=0
+ export BZIP2_INCLUDE=${EROOT}/usr/include
+ export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
+
+ export BUILD_ZLIB=False
+ export ZLIB_INCLUDE=${EROOT}/usr/include
+ export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
+
+ # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
+ myndbm='U'
+ mygdbm='U'
+ mydb='U'
+ if use gdbm ; then
+ mygdbm='D'
+ if use berkdb ; then
+ myndbm='D'
+ fi
+ fi
+ if use berkdb ; then
+ mydb='D'
+ has_version '=sys-libs/db-1*' && myndbm='D'
+ fi
+
+ myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
+
+ if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
+ ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
+ myconf -Ui_db -Ui_ndbm
+ fi
+
+ use ithreads && myconf -Dusethreads
+
+ if use debug ; then
+ append-cflags "-g"
+ myconf -DDEBUGGING
+ elif [[ ${CFLAGS} == *-g* ]] ; then
+ myconf -DDEBUGGING=-g
+ else
+ myconf -DDEBUGGING=none
+ fi
+
+ # Autodiscover all old version directories, some of them will even be newer
+ # if you downgrade
+ if [[ -z ${PERL_OLDVERSEN} ]]; then
+ PERL_OLDVERSEN="$(
+ find "${EROOT%/}${PRIV_BASE}" "${EROOT%/}${SITE_BASE}" "${EROOT%/}${VENDOR_BASE}" \
+ -maxdepth 1 -mindepth 1 -type d -regex '.*/5[.][0-9]+[.][0-9]+$' \
+ -printf "%f " 2>/dev/null )"
+ fi
+ # Fixup versions, removing self match, fixing order and dupes
+ PERL_OLDVERSEN="$(
+ echo "${PERL_OLDVERSEN}" |\
+ tr " " "\n" |\
+ grep -vF "${DIST_VERSION%-RC}" |\
+ sort -u -nr -t'.' -k1,1 -k2,2 -k3,3
+ )"
+
+ # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
+ if [[ -n "${PERL_OLDVERSEN// }" ]]; then
+ local inclist="$(
+ for v in ${PERL_OLDVERSEN}; do
+ has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} ";
+ echo -n "${v} ";
+ done )"
+ einfo "This version of perl may partially support modules previously"
+ einfo "installed in any of the following paths:"
+ for incpath in ${inclist}; do
+ [[ -e "${EROOT%/}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${VENDOR_BASE}/${incpath}"
+ [[ -e "${EROOT%/}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROO%/T}${PRIV_BASE}/${incpath}"
+ [[ -e "${EROOT%/}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${SITE_BASE}/${incpath}"
+ done
+ einfo "This is a temporary measure and you should aim to cleanup these paths"
+ einfo "via world updates and perl-cleaner"
+ myconf -Dinc_version_list="${inclist}"
+ fi
+
+ [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
+
+ # Make sure we can do the final link #523730, need to set deployment
+ # target to override hardcoded 10.3 which breaks on modern OSX
+ [[ ${CHOST} == *-darwin* ]] && \
+ myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
+
+ # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
+ # Prefix itself we don't do multilib either, so make sure perl can find
+ # something compatible.
+ if use prefix ; then
+ # Set a hook to check for each detected library whether it actually works.
+ export libscheck="
+ ( echo 'main(){}' > '${T}'/conftest.c &&
+ $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
+ ) || xxx=/dev/null"
+
+ # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
+ local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
+ myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
+ elif [[ $(get_libdir) != "lib" ]] ; then
+ # We need to use " and not ', as the written config.sh use ' ...
+ myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
+ fi
+
+ # don't try building ODBM, bug #354453
+ disabled_extensions="ODBM_File"
+
+ if ! use gdbm ; then
+ # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
+ disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
+ fi
+
+ myconf -Dnoextensions="${disabled_extensions}"
+
+ [[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
+
+ [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
+ # allow fiddling via EXTRA_ECONF, bug 558070
+ eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
+
+ myconf \
+ -Duseshrplib \
+ -Darchname="${myarch}" \
+ -Dcc="$(tc-getCC)" \
+ -Doptimize="${CFLAGS}" \
+ -Dldflags="${LDFLAGS}" \
+ -Dprefix="${EPREFIX}"'/usr' \
+ -Dsiteprefix="${EPREFIX}"'/usr/local' \
+ -Dvendorprefix="${EPREFIX}"'/usr' \
+ -Dscriptdir="${EPREFIX}"'/usr/bin' \
+ -Dprivlib="${EPREFIX}${PRIV_LIB}" \
+ -Darchlib="${EPREFIX}${ARCH_LIB}" \
+ -Dsitelib="${EPREFIX}${SITE_LIB}" \
+ -Dsitearch="${EPREFIX}${SITE_ARCH}" \
+ -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
+ -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
+ -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
+ -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
+ -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dman1ext='1' \
+ -Dman3ext='3pm' \
+ -Dlibperl="${LIBPERL}" \
+ -Dlocincpth="${EPREFIX}"'/usr/include ' \
+ -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
+ -Duselargefiles \
+ -Dd_semctl_semun \
+ -Dcf_by='Gentoo' \
+ -Dmyhostname='localhost' \
+ -Dperladmin='root@localhost' \
+ -Ud_csh \
+ -Dsh="${EPREFIX}"/bin/sh \
+ -Dtargetsh="${EPREFIX}"/bin/sh \
+ -Uusenm \
+ "${myconf[@]}" \
+ "${EXTRA_ECONF[@]}"
+
+ if tc-is-cross-compiler; then
+ ./configure \
+ --target="${CHOST}" \
+ --build="${CBUILD}" \
+ -Dinstallprefix='' \
+ -Dinstallusrbinperl='undef' \
+ -Dusevendorprefix='define' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ else
+ sh Configure \
+ -des \
+ -Dinstallprefix="${EPREFIX}"'/usr' \
+ -Dinstallusrbinperl='n' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ fi
+}
+
+src_test() {
+ export NO_GENTOO_NETWORK_TESTS=1;
+ if [[ ${EUID} == 0 ]] ; then
+ ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
+ return 0
+ fi
+ use elibc_uclibc && export MAKEOPTS+=" -j1"
+ TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
+}
+
+src_install() {
+ local i
+ local coredir="${ARCH_LIB}/CORE"
+
+ emake DESTDIR="${D}" install
+
+ rm -f "${ED}/usr/bin/perl${MY_PV}"
+ ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
+
+ if ! tc-is-static-only ; then
+ dolib.so "${ED}"${coredir}/${LIBPERL}
+ rm -f "${ED}"${coredir}/${LIBPERL}
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
+ fi
+
+ rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
+
+ # This removes ${D} from Config.pm
+ for i in $(find "${D}" -iname "Config.pm" ) ; do
+ einfo "Removing ${D} from ${i}..."
+ sed -i -e "s:${D}::" "${i}" || die "Sed failed"
+ done
+
+ dodoc Changes* README AUTHORS
+
+ if use doc ; then
+ # HTML Documentation
+ # We expect errors, warnings, and such with the following.
+
+ dodir /usr/share/doc/${PF}/html
+ LD_LIBRARY_PATH=. ./perl installhtml \
+ --podroot='.' \
+ --podpath='lib:ext:pod:vms' \
+ --recurse \
+ --htmldir="${ED}/usr/share/doc/${PF}/html"
+ fi
+
+ [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
+
+ dual_scripts
+}
+
+pkg_preinst() {
+ check_rebuild
+}
+
+pkg_postinst() {
+ dual_scripts
+
+ if [[ "${ROOT}" = "/" ]] ; then
+ local INC DIR file
+ INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
+ einfo "Removing old .ph files"
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
+ rm -f "${file}"
+ einfo "<< ${file}"
+ done
+ fi
+ done
+ # Silently remove the now empty dirs
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
+ fi
+ done
+
+ fi
+}
+
+pkg_postrm(){
+ dual_scripts
+}
diff --git a/dev-lang/perl/perl-5.28.9999.ebuild b/dev-lang/perl/perl-5.28.9999.ebuild
new file mode 100644
index 000000000000..7f73c3a4939a
--- /dev/null
+++ b/dev-lang/perl/perl-5.28.9999.ebuild
@@ -0,0 +1,623 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils alternatives flag-o-matic toolchain-funcs multilib multiprocessing
+
+PATCH_VER=1
+CROSS_VER=1.1.6
+PATCH_BASE="perl-5.27.1-patches-${PATCH_VER}"
+
+DIST_AUTHOR=GENEHACK
+
+# Greatest first, don't include yourself
+# Devel point-releases are not ABI-intercompatible, but stable point releases are
+# BIN_OLDVERSEN is contains only C-ABI-intercompatible versions
+PERL_BIN_OLDVERSEN=""
+if [[ "${PV##*.}" == "9999" ]]; then
+ DIST_VERSION=5.27.4
+else
+ DIST_VERSION="${PV/_rc/-RC}"
+fi
+SHORT_PV="${DIST_VERSION%.*}"
+# Even numbered major versions are ABI intercompatible
+# Odd numbered major versions are not
+if [[ $(( ${SHORT_PV#*.} % 2 )) == 1 ]]; then
+ SUBSLOT="${DIST_VERSION%-RC*}"
+else
+ SUBSLOT="${DIST_VERSION%.*}"
+fi
+# Used only in tar paths
+MY_P="perl-${DIST_VERSION}"
+# Used in library paths
+MY_PV="${DIST_VERSION%-RC*}"
+
+DESCRIPTION="Larry Wall's Practical Extraction and Report Language"
+
+SRC_URI="
+ mirror://cpan/src/5.0/${MY_P}.tar.xz
+ mirror://cpan/authors/id/${DIST_AUTHOR:0:1}/${DIST_AUTHOR:0:2}/${DIST_AUTHOR}/${MY_P}.tar.xz
+ https://github.com/gentoo-perl/perl-patchset/releases/download/${PATCH_BASE}/${PATCH_BASE}.tar.xz
+ mirror://gentoo/${PATCH_BASE}.tar.xz
+ https://dev.gentoo.org/~kentnl/distfiles/${PATCH_BASE}.tar.xz
+ https://github.com/arsv/perl-cross/releases/download/${CROSS_VER}/perl-cross-${CROSS_VER}.tar.gz
+"
+HOMEPAGE="http://www.perl.org/"
+
+LICENSE="|| ( Artistic GPL-1+ )"
+SLOT="0/${SUBSLOT}"
+
+if [[ "${PV##*.}" != "9999" ]]; then
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+IUSE="berkdb debug doc gdbm ithreads"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( >=sys-libs/gdbm-1.8.3 )
+ app-arch/bzip2
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
+"
+PDEPEND="
+ >=app-admin/perl-cleaner-2.5
+ >=virtual/perl-File-Temp-0.230.400-r2
+ >=virtual/perl-Data-Dumper-2.154.0
+ virtual/perl-Test-Harness
+"
+# bug 390719, bug 523624
+# virtual/perl-Test-Harness is here for the bundled ExtUtils::MakeMaker
+
+S="${WORKDIR}/${MY_P}"
+
+dual_scripts() {
+ src_remove_dual perl-core/Archive-Tar 2.260.0 ptar ptardiff ptargrep
+ src_remove_dual perl-core/CPAN 2.180.0 cpan
+ src_remove_dual perl-core/Digest-SHA 5.960.0 shasum
+ src_remove_dual perl-core/Encode 2.920.0 enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 7.300.0 instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.350.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.74.0 zipdetails
+ src_remove_dual perl-core/JSON-PP 2.940.0 json_pp
+ src_remove_dual perl-core/Module-CoreList 5.201.709.200 corelist
+ src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
+ src_remove_dual perl-core/Pod-Perldoc 3.280.0 perldoc
+ src_remove_dual perl-core/Test-Harness 3.390.0 prove
+ src_remove_dual perl-core/podlators 4.90.0 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 4.90.0 /usr/share/man/man1/perlpodstyle.1
+}
+
+check_rebuild() {
+ # Fresh install
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ return 0;
+ # Major Upgrade
+ # doesn't matter if there's multiple copies, it still needs a rebuild
+ # if the string is anything other than "5.CURRENTMAJOR"
+ elif [[ "${REPLACING_VERSIONS%.*}" != "${PV%.*}" ]]; then
+ echo ""
+ ewarn "UPDATE THE PERL MODULES:"
+ ewarn "After updating dev-lang/perl the installed Perl modules"
+ ewarn "have to be re-installed. In most cases, this is done automatically"
+ ewarn "by the package manager, but subsequent steps are still recommended"
+ ewarn "to ensure system consistency."
+ ewarn
+ ewarn "You should start with a depclean to remove any unused perl dependencies"
+ ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
+ ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
+ ewarn "Recommended: emerge --depclean -va"
+ ewarn
+ ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
+ ewarn "remaining rebuilds portage may have missed."
+ ewarn "Use: perl-cleaner --all"
+ return 0;
+
+ # Reinstall w/ USE Change
+ elif ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
+ ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
+ ( use debug && ! has_version dev-lang/perl[debug] ) || \
+ ( ! use debug && has_version dev-lang/perl[debug] ) ; then
+ echo ""
+ ewarn "TOGGLED USE-FLAGS WARNING:"
+ ewarn "You changed one of the use-flags ithreads or debug."
+ ewarn "You must rebuild all perl-modules installed."
+ ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"
+ fi
+}
+
+pkg_setup() {
+ case ${CHOST} in
+ *-freebsd*) osname="freebsd" ;;
+ *-dragonfly*) osname="dragonfly" ;;
+ *-netbsd*) osname="netbsd" ;;
+ *-openbsd*) osname="openbsd" ;;
+ *-darwin*) osname="darwin" ;;
+ *-interix*) osname="interix" ;;
+ *-aix*) osname="aix" ;;
+ *-cygwin*) osname="cygwin" ;;
+ *) osname="linux" ;;
+ esac
+
+ myarch="${CHOST%%-*}-${osname}"
+ if use debug ; then
+ myarch+="-debug"
+ fi
+ if use ithreads ; then
+ mythreading="-multi"
+ myarch+="-thread"
+ fi
+
+ PRIV_BASE="/usr/$(get_libdir)/perl5"
+ SITE_BASE="/usr/local/$(get_libdir)/perl5"
+ VENDOR_BASE="/usr/$(get_libdir)/perl5/vendor_perl"
+
+ LIBPERL="libperl$(get_libname ${MY_PV} )"
+ PRIV_LIB="${PRIV_BASE}/${MY_PV}"
+ ARCH_LIB="${PRIV_BASE}/${MY_PV}/${myarch}${mythreading}"
+ SITE_LIB="${SITE_BASE}/${MY_PV}"
+ SITE_ARCH="${SITE_BASE}/${MY_PV}/${myarch}${mythreading}"
+ VENDOR_LIB="${VENDOR_BASE}/${MY_PV}"
+ VENDOR_ARCH="${VENDOR_BASE}/${MY_PV}/${myarch}${mythreading}"
+
+ dual_scripts
+}
+
+src_remove_dual_file() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ alternatives_auto_makesym "${i}" "${i}-[0-9]*"
+ done
+ ;;
+ setup)
+ for i in "$@" ; do
+ if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
+ has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
+ break
+ fi
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i}{,-${ver}-${P}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual_man() {
+ local i pkg ver ff
+ pkg="$1"
+ ver="$2"
+ shift 2
+ case "${EBUILD_PHASE:-none}" in
+ postinst|postrm)
+ for i in "$@" ; do
+ ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
+ ff=${ff##*${i#${i%.[0-9]}}}
+ alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
+ done
+ ;;
+ install)
+ for i in "$@" ; do
+ if ! [[ -f "${ED}"${i} ]] ; then
+ ewarn "${i} does not exist!"
+ continue
+ fi
+ mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
+ done
+ ;;
+ esac
+}
+
+src_remove_dual() {
+ local i pkg ver
+ pkg="$1"
+ ver="$2"
+ shift 2
+ for i in "$@" ; do
+ src_remove_dual_file "${pkg}" "${ver}" "/usr/bin/${i}"
+ src_remove_dual_man "${pkg}" "${ver}" "/usr/share/man/man1/${i}.1"
+ done
+}
+
+src_prepare_update_patchlevel_h() {
+ # Copied and modified from debian:
+ # Copyright 2011 Niko Tyni
+ # This program is free software; you can redistribute it and/or modify
+ # it under the same terms as Perl itself.
+ local patchdir="${WORKDIR}/patches"
+ local prefix
+ local patchoutput="patchlevel-gentoo.h"
+
+ [[ -f ${patchdir}/series ]] || return 0
+
+while read patch
+do
+ patchname=$(echo $patch | sed 's/\.diff$//')
+ < $patchdir/$patch sed -e '/^Subject:/ { N; s/\n / / }' | sed -n -e '
+
+ # massage the patch headers
+ s|^Bug: .*https\?://rt\.perl\.org/.*id=\(.*\).*|[perl #\1]|; tprepend;
+ s|^Bug: .*https\?://rt\.cpan\.org/.*id=\(.*\).*|[rt.cpan.org #\1]|; tprepend;
+ s|^Bug-Gentoo: ||; tprepend;
+ s/^\(Subject\|Description\): //; tappend;
+ s|^Origin: .*http://perl5\.git\.perl\.org/perl\.git/commit\(diff\)\?/\(.......\).*|[\2]|; tprepend;
+
+ # post-process at the end of input
+ $ { x;
+ # include the version number in the patchlevel.h description (if available)
+ s/List packaged patches/&'" for ${PF}(#${PATCH_VER})"'/;
+
+ # escape any backslashes and double quotes
+ s|\\|\\\\|g; s|"|\\"|g;
+
+ # add a prefix
+ s|^|\t,"'"$prefix$patchname"' - |;
+ # newlines away
+ s/\n/ /g; s/ */ /g;
+ # add a suffix
+ s/ *$/"/; p
+ };
+ # stop all processing
+ d;
+ # label: append to the hold space
+ :append H; d;
+ # label: prepend to the hold space
+ :prepend x; H; d;
+ '
+done < "${WORKDIR}"/patches/series > "${S}/${patchoutput}"
+echo "${patchoutput}" >> "${S}/MANIFEST"
+}
+
+src_prepare_perlcross() {
+ cp -a ../perl-cross-${CROSS_VER}/* . || die
+
+ sed -i \
+ -e 's/(15 + $CLEANUP)/(13 + $CLEANUP)/' \
+ cnf/diffs/perl5-${PV}/makemaker-test.patch || die
+
+ sed -i \
+ -e 's/MakeMaker\.pm .*/MakeMaker.pm bf9174c70a0e50ff2fee4552c7df89b37d292da1/' \
+ -e 's/MM_Unix\.pm .*/MM_Unix.pm b0ec308fe2d7dcfcef5732880db0fae1f4ea80fa/' \
+ cnf/diffs/perl5-${PV}/customized.patch || die
+
+ sed -i \
+ -e 's|^lib/unicore/CombiningClass.pl pod/perluniprops.pod:|lib/unicore/CombiningClass.pl pod/perluniprops.pod: $(CONFIGPM)|' \
+ Makefile || die
+
+ # bug 604072
+ MAKEOPTS+=" -j1"
+ export MAKEOPTS
+}
+src_prepare_dynamic() {
+ ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
+ ln -s ${LIBPERL} libperl$(get_libname ) || die
+}
+
+src_prepare() {
+ local patch
+ EPATCH_OPTS+=" -p1"
+ einfo "Applying patches from ${PATCH_BASE} ..."
+ while read patch ; do
+ EPATCH_SINGLE_MSG=" ${patch} ..."
+ epatch "${WORKDIR}"/patches/${patch}
+ done < "${WORKDIR}"/patches/series
+
+ src_prepare_update_patchlevel_h
+
+ tc-is-cross-compiler && src_prepare_perlcross
+
+ tc-is-static-only || src_prepare_dynamic
+
+ if use gdbm; then
+ sed -i "s:INC => .*:INC => \"-I${EROOT}usr/include/gdbm\":g" \
+ ext/NDBM_File/Makefile.PL || die
+ fi
+
+ default
+}
+
+myconf() {
+ # the myconf array is declared in src_configure
+ myconf=( "${myconf[@]}" "$@" )
+}
+
+src_configure() {
+ declare -a myconf
+
+ export LC_ALL="C"
+ [[ ${COLUMNS:-1} -ge 1 ]] || unset COLUMNS # bug #394091
+
+ # some arches and -O do not mix :)
+ use ppc && replace-flags -O? -O1
+
+ # Perl has problems compiling with -Os in your flags with glibc
+ use elibc_uclibc || replace-flags "-Os" "-O2"
+
+ # This flag makes compiling crash in interesting ways
+ filter-flags "-malign-double"
+
+ # Fixes bug #97645
+ use ppc && filter-flags "-mpowerpc-gpopt"
+
+ # Fixes bug #143895 on gcc-4.1.1
+ filter-flags "-fsched2-use-superblocks"
+
+ use sparc && myconf -Ud_longdbl
+
+ export BUILD_BZIP2=0
+ export BZIP2_INCLUDE=${EROOT}/usr/include
+ export BZIP2_LIB=${EROOT}/usr/$(get_libdir)
+
+ export BUILD_ZLIB=False
+ export ZLIB_INCLUDE=${EROOT}/usr/include
+ export ZLIB_LIB=${EROOT}/usr/$(get_libdir)
+
+ # allow either gdbm to provide ndbm (in <gdbm/ndbm.h>) or db1
+ myndbm='U'
+ mygdbm='U'
+ mydb='U'
+ if use gdbm ; then
+ mygdbm='D'
+ if use berkdb ; then
+ myndbm='D'
+ fi
+ fi
+ if use berkdb ; then
+ mydb='D'
+ has_version '=sys-libs/db-1*' && myndbm='D'
+ fi
+
+ myconf "-${myndbm}i_ndbm" "-${mygdbm}i_gdbm" "-${mydb}i_db"
+
+ if use alpha && [[ "$(tc-getCC)" = "ccc" ]] ; then
+ ewarn "Perl will not be built with berkdb support, use gcc if you needed it..."
+ myconf -Ui_db -Ui_ndbm
+ fi
+
+ use ithreads && myconf -Dusethreads
+
+ if use debug ; then
+ append-cflags "-g"
+ myconf -DDEBUGGING
+ elif [[ ${CFLAGS} == *-g* ]] ; then
+ myconf -DDEBUGGING=-g
+ else
+ myconf -DDEBUGGING=none
+ fi
+
+ # Autodiscover all old version directories, some of them will even be newer
+ # if you downgrade
+ if [[ -z ${PERL_OLDVERSEN} ]]; then
+ PERL_OLDVERSEN="$(
+ find "${EROOT%/}${PRIV_BASE}" "${EROOT%/}${SITE_BASE}" "${EROOT%/}${VENDOR_BASE}" \
+ -maxdepth 1 -mindepth 1 -type d -regex '.*/5[.][0-9]+[.][0-9]+$' \
+ -printf "%f " 2>/dev/null )"
+ fi
+ # Fixup versions, removing self match, fixing order and dupes
+ PERL_OLDVERSEN="$(
+ echo "${PERL_OLDVERSEN}" |\
+ tr " " "\n" |\
+ grep -vF "${DIST_VERSION%-RC}" |\
+ sort -u -nr -t'.' -k1,1 -k2,2 -k3,3
+ )"
+
+ # Experts who want a "Pure" install can set PERL_OLDVERSEN to an empty string
+ if [[ -n "${PERL_OLDVERSEN// }" ]]; then
+ local inclist="$(
+ for v in ${PERL_OLDVERSEN}; do
+ has "${v}" ${PERL_BIN_OLDVERSEN} && echo -n "${v}/${myarch}${mythreading} ";
+ echo -n "${v} ";
+ done )"
+ einfo "This version of perl may partially support modules previously"
+ einfo "installed in any of the following paths:"
+ for incpath in ${inclist}; do
+ [[ -e "${EROOT%/}${VENDOR_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${VENDOR_BASE}/${incpath}"
+ [[ -e "${EROOT%/}${PRIV_BASE}/${incpath}" ]] && einfo " ${EROO%/T}${PRIV_BASE}/${incpath}"
+ [[ -e "${EROOT%/}${SITE_BASE}/${incpath}" ]] && einfo " ${EROOT%/}${SITE_BASE}/${incpath}"
+ done
+ einfo "This is a temporary measure and you should aim to cleanup these paths"
+ einfo "via world updates and perl-cleaner"
+ myconf -Dinc_version_list="${inclist}"
+ fi
+
+ [[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
+
+ # Make sure we can do the final link #523730, need to set deployment
+ # target to override hardcoded 10.3 which breaks on modern OSX
+ [[ ${CHOST} == *-darwin* ]] && \
+ myconf "-Dld=env MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} $(tc-getCC)"
+
+ # Prefix: the host system needs not to follow Gentoo multilib stuff, and in
+ # Prefix itself we don't do multilib either, so make sure perl can find
+ # something compatible.
+ if use prefix ; then
+ # Set a hook to check for each detected library whether it actually works.
+ export libscheck="
+ ( echo 'main(){}' > '${T}'/conftest.c &&
+ $(tc-getCC) -o '${T}'/conftest '${T}'/conftest.c -l\$thislib >/dev/null 2>/dev/null
+ ) || xxx=/dev/null"
+
+ # Use all host paths that might contain useful stuff, the hook above will filter out bad choices.
+ local paths="/lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib"
+ myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
+ elif [[ $(get_libdir) != "lib" ]] ; then
+ # We need to use " and not ', as the written config.sh use ' ...
+ myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
+ fi
+
+ # don't try building ODBM, bug #354453
+ disabled_extensions="ODBM_File"
+
+ if ! use gdbm ; then
+ # workaround for bug #157774: don't try building GDBM related stuff with USE="-gdbm"
+ disabled_extensions="${disabled_extensions} GDBM_File NDBM_File"
+ fi
+
+ myconf -Dnoextensions="${disabled_extensions}"
+
+ [[ "${PV##*.}" == "9999" ]] && myconf -Dusedevel -Uversiononly
+
+ [[ -n "${EXTRA_ECONF}" ]] && ewarn During Perl build, EXTRA_ECONF=${EXTRA_ECONF}
+ # allow fiddling via EXTRA_ECONF, bug 558070
+ eval "local -a EXTRA_ECONF=(${EXTRA_ECONF})"
+
+ myconf \
+ -Duseshrplib \
+ -Darchname="${myarch}" \
+ -Dcc="$(tc-getCC)" \
+ -Doptimize="${CFLAGS}" \
+ -Dldflags="${LDFLAGS}" \
+ -Dprefix="${EPREFIX}"'/usr' \
+ -Dsiteprefix="${EPREFIX}"'/usr/local' \
+ -Dvendorprefix="${EPREFIX}"'/usr' \
+ -Dscriptdir="${EPREFIX}"'/usr/bin' \
+ -Dprivlib="${EPREFIX}${PRIV_LIB}" \
+ -Darchlib="${EPREFIX}${ARCH_LIB}" \
+ -Dsitelib="${EPREFIX}${SITE_LIB}" \
+ -Dsitearch="${EPREFIX}${SITE_ARCH}" \
+ -Dvendorlib="${EPREFIX}${VENDOR_LIB}" \
+ -Dvendorarch="${EPREFIX}${VENDOR_ARCH}" \
+ -Dman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dsiteman1dir="${EPREFIX}"/usr/local/man/man1 \
+ -Dsiteman3dir="${EPREFIX}"/usr/local/man/man3 \
+ -Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
+ -Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
+ -Dman1ext='1' \
+ -Dman3ext='3pm' \
+ -Dlibperl="${LIBPERL}" \
+ -Dlocincpth="${EPREFIX}"'/usr/include ' \
+ -Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
+ -Duselargefiles \
+ -Dd_semctl_semun \
+ -Dcf_by='Gentoo' \
+ -Dmyhostname='localhost' \
+ -Dperladmin='root@localhost' \
+ -Ud_csh \
+ -Dsh="${EPREFIX}"/bin/sh \
+ -Dtargetsh="${EPREFIX}"/bin/sh \
+ -Uusenm \
+ "${myconf[@]}" \
+ "${EXTRA_ECONF[@]}"
+
+ if tc-is-cross-compiler; then
+ ./configure \
+ --target="${CHOST}" \
+ --build="${CBUILD}" \
+ -Dinstallprefix='' \
+ -Dinstallusrbinperl='undef' \
+ -Dusevendorprefix='define' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ else
+ sh Configure \
+ -des \
+ -Dinstallprefix="${EPREFIX}"'/usr' \
+ -Dinstallusrbinperl='n' \
+ "${myconf[@]}" \
+ || die "Unable to configure"
+ fi
+}
+
+src_test() {
+ export NO_GENTOO_NETWORK_TESTS=1;
+ if [[ ${EUID} == 0 ]] ; then
+ ewarn "Test fails with a sandbox error (#328793) if run as root. Skipping tests..."
+ return 0
+ fi
+ use elibc_uclibc && export MAKEOPTS+=" -j1"
+ TEST_JOBS="$(makeopts_jobs)" make test_harness || die "test failed"
+}
+
+src_install() {
+ local i
+ local coredir="${ARCH_LIB}/CORE"
+
+ emake DESTDIR="${D}" install
+
+ rm -f "${ED}/usr/bin/perl${MY_PV}"
+ ln -s perl "${ED}"/usr/bin/perl${MY_PV} || die
+
+ if ! tc-is-static-only ; then
+ dolib.so "${ED}"${coredir}/${LIBPERL}
+ rm -f "${ED}"${coredir}/${LIBPERL}
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
+ ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
+ fi
+
+ rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
+
+ # This removes ${D} from Config.pm
+ for i in $(find "${D}" -iname "Config.pm" ) ; do
+ einfo "Removing ${D} from ${i}..."
+ sed -i -e "s:${D}::" "${i}" || die "Sed failed"
+ done
+
+ dodoc Changes* README AUTHORS
+
+ if use doc ; then
+ # HTML Documentation
+ # We expect errors, warnings, and such with the following.
+
+ dodir /usr/share/doc/${PF}/html
+ LD_LIBRARY_PATH=. ./perl installhtml \
+ --podroot='.' \
+ --podpath='lib:ext:pod:vms' \
+ --recurse \
+ --htmldir="${ED}/usr/share/doc/${PF}/html"
+ fi
+
+ [[ -d ${ED}/usr/local ]] && rm -r "${ED}"/usr/local
+
+ dual_scripts
+}
+
+pkg_preinst() {
+ check_rebuild
+}
+
+pkg_postinst() {
+ dual_scripts
+
+ if [[ "${ROOT}" = "/" ]] ; then
+ local INC DIR file
+ INC=$(perl -e 'for $line (@INC) { next if $line eq "."; next if $line =~ m/'${SHORT_PV}'|etc|local|perl$/; print "$line\n" }')
+ einfo "Removing old .ph files"
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ for file in $(find "${DIR}" -name "*.ph" -type f ) ; do
+ rm -f "${file}"
+ einfo "<< ${file}"
+ done
+ fi
+ done
+ # Silently remove the now empty dirs
+ for DIR in ${INC} ; do
+ if [[ -d "${DIR}" ]] ; then
+ find "${DIR}" -depth -type d -print0 | xargs -0 -r rmdir &> /dev/null
+ fi
+ done
+
+ fi
+}
+
+pkg_postrm(){
+ dual_scripts
+}
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
new file mode 100644
index 000000000000..88a2d4bf0c9d
--- /dev/null
+++ b/dev-lang/php/Manifest
@@ -0,0 +1,22 @@
+AUX 20php5-envd 145 SHA256 efaae9e6ae5f7010e073c2ab6d8a9dda009f0707c7d7b0c027e142c94f7041a4 SHA512 581aa86479e3cd584ee1bc6dc6d4a135fe8ec343fe5519566d728d81f7018cfb23658bd0c0368951d380982c75adbb4f45acf3c146868aaf4e4ec8e9f2fad1ce WHIRLPOOL b9cfe0e80ba437bbc6008223c268bdafcde306ba8083dce96815804f3e1ec0937706e0db091149785a0076a6c6eaab8f7dff28578b706e84b4bb4e67850a4ecd
+AUX php-5.6-no-bison-warnings.patch 1428 SHA256 c7a91229d19a2a08db750f440ca4e8a50667feca53daff46cace3b665a1c7e7d SHA512 8f751c638c833d535e022434cd8ace5c175703bf61dfab7bea3e52d9419700e2b85c4cca40da9ab6056e8fd9c0bc1fab55810bb1193bed14ce0a50ce653fe62b WHIRLPOOL 9583f77b0a385b405d3466c49a17f74352c57620fdd6e99f5d113b1ccec43b775ad16a0e0e1d918d9389e8983aa85ccc86d257bbf32a0d17ae3565a8d1ff33fc
+AUX php-fpm_at-simple.service 316 SHA256 c11d3bb213993ad27642abf2fb13ab8d9bd3fd8ffb6c863ca0baa057555a2fa6 SHA512 7367a3f8d3874f8e0c76f331ba613a0250db02f60ad9f87affaf448dcb5bc34bcecb91d88f415764a12b24b46ae3d1b738a002af9f77a4b707e916e83a0021fd WHIRLPOOL bf78a0e1bc22525de1bfa6896ceeb39932f4a1507820667f5216af10f8de205436a82abefe55d4776d911de99070e6f6ed3dacc1708288323d8ad789dab57fb9
+AUX php-fpm_at.service 317 SHA256 6bbbbd7b6501305c17b7290bb2a83b0ebe492d421adaac8f394e387ed52e0d25 SHA512 27982f9e2d958bfa75c89c7d3531e48d17fc388b1cdcbc8e09051b236b1184ee2baabdfcc567c19d9fcd067d4b3b86f171015616d8da42fccdabd89432d865e8 WHIRLPOOL c101ad8eb7446a6fcb3dba6ec6caae12bd6c0a9d251e222c392abb37314fbc252321bdc7db1696480050ce543a154b7257e503d3065d9e238d1c5c76a74d65ff
+DIST php-5.6.31.tar.xz 12461268 SHA256 c464af61240a9b7729fabe0314cdbdd5a000a4f0c9bd201f89f8628732fe4ae4 SHA512 b5d3bc306167c851460036aa21194a2f74a50a26aa5c46159394bddbff94e4a418b557d68d5e1315672b3571b13a231ef7810d5346f57c0094acfe29c2e70495 WHIRLPOOL 2cd74a9cfe82b9363b4fbad37b13a8f7cc9571d2493a95b52cdaeeafe2d04255a29b31792dce2db0c41696539ed6b203446a2a6a8ea0319d82066fe9622bfcb9
+DIST php-7.0.23.tar.xz 11953100 SHA256 8e526e3551a58e00c8055fa4a72804aa1bd3ee1c0411b25bf1504cc4992609df SHA512 62201592fca88fb1c302badf7e73e5d417e9a062300e0d32fdfcb346d300cd86bf957b880a73795037a332fe148b64589bb15204bdd6b0ddcbbddc5a12e6d042 WHIRLPOOL 5d6131b5d7701b01c1aa849c6b5e3b133b4276999354eccecf847675552eb0be79a68cd0a10595c64bda2594489d3699868b4ed9a1fe3c5cdcc4fda45be32493
+DIST php-7.0.24.tar.xz 11959232 SHA256 4dba7aa365193c9229f89f1975fad4c01135d29922a338ffb4a27e840d6f1c98 SHA512 7ae7795ff89924adc5f989bcf438a372684c7fc041ec10db96369f12faaeb90a23e7a7b5253f2a1022059f7464e6c11ee46a164a7f873b0b44a5317c3a3a49e7 WHIRLPOOL c5d8cdc684738610f520df0f46042625cfa0a5530e84e4c813493f755f03656f8ba71de630769f6381b9b729feb161b06eae7d44dcf21f79bec67fd5b9c23c26
+DIST php-7.1.10.tar.xz 12166036 SHA256 2b8efa771a2ead0bb3ae67b530ca505b5b286adc873cca9ce97a6e1d6815c50b SHA512 64f03d7a8928283e2f4f0958168610780553765ac20cf558cd6452ba4474461e74366c41b9bfdaf08b25195ca9c0059a94b77f06d8de3512d251cb2a84113d30 WHIRLPOOL 9ec9b6a93e95f23b15c8816de0384b62297ae06cec9b4c8cabeef8ecbefcd7c14b751c7310fa13a1326028a61c4f7206b5c0ce3388e0b40e44fffa0de6129721
+DIST php-7.1.9.tar.xz 12157172 SHA256 ec9ca348dd51f19a84dc5d33acfff1fba1f977300604bdac08ed46ae2c281e8c SHA512 feefaae7edda115c9c10d6a07a9d897343ca972e4e5ec327f383cb28f204ac10956653fc120f0474901e59f32f105dc1a7afe64d49a3ea8bf486377837618013 WHIRLPOOL 5179ca1adddb099a3d8dccc009a96202f6d69edeea3126a5f861498475f36413f0a17a6a501b1b0eadba3acfb4ff262a8a5a7ee324043f03d74e857d1dc7c6a8
+DIST php-7.2.0RC2.tar.xz 12051048 SHA256 0406366fcd5be4ee5e76e3c6a4279e04f93a1827a44d27c4f57fbed9e01cd281 SHA512 aa7e3632381677db995a72dcf0276a3be0d40c32138743a225d8e41e791a6fe00859e27ed7699be90e3843d3eb4da90af6a31aab65dc790c402863d09f409a48 WHIRLPOOL fc8c39b8b4a6184fa8e460dd91b0afbb62c5321effd5c5227eb276adb46857acf05e0fa5749279b0f26fe2c08d9f8001f0132507ab778dd1f7df7237da74b623
+DIST php-7.2.0RC3.tar.xz 11973876 SHA256 abe0a237f94837854f2cfd9c7dc99fbca2c817ae1d6194a514f29b463db36853 SHA512 a33e72e458e7e9fef59db5c147da9efdbd6d2987610216d99fd6c8bb25927153573614bdf3ca3b4e3278c5e6657fbd30665e3a895448afb0d6951af65e8e5b55 WHIRLPOOL 128ff4e663dfca3ad60c7ba2fa789a394a607ae6e93bb1e2b371972179c5fcecf13504cab0f6ec20bbf08c4040a6bfba8388bed9f60ddbc226dd9b9c241e555f
+EBUILD php-5.6.31.ebuild 22491 SHA256 7eb270d7f56f0c3e6ab6bb2df8d7c9d96928dc898e2c90fb46760e0201a6b858 SHA512 589cc6f6a7a9321b1c8dc3aad2766260ddb026748c88e5bcfb097e786e66809c74506391157290e5693523f211150e5e5ef80ed7e3d49e09c750c3da2b115dd6 WHIRLPOOL 328641a0ec7e8a273dcb09584ce03a61b0c06b97459d39ec30252f45e3b79448026043129afd8aba354bb2e04a027fc6a049e8cdf230f1220c5520c868582a32
+EBUILD php-7.0.23.ebuild 21544 SHA256 db72c83e1ceebbd5a0aed067ef82bcea57a071d97605f1730556d98eb484cd02 SHA512 39980f3bb7ab572abde353959e1c0b6eb2f1d8dc1ff35c6cd9ae86abd19437d4fcd8aabb12680f028a4973f2ef93e8eeceb0e8c678803d895979027930d62f14 WHIRLPOOL f1eb20ccc67608952d7c55e1957885bc612f5b4f9b3e796d3d4262925465a077e74bd062f9af7a514a8e4e8f702cb368e18e70fc9542c9ea8b081f1492f4109e
+EBUILD php-7.0.24.ebuild 21553 SHA256 593148d92b4a046e9c386448bba422fffda6236c0469a7df1221c734bcba9dfb SHA512 ada7473b6a62fb16ae5521cf37e241a322504230a4704f7689d3046fb62023359a73bdbd459f152ba8204a0b063020d7b8850823a336f12beb7d93e48d40d7f2 WHIRLPOOL 4c7b98a6d32444ed28321cabb0917572c297a45f88bb8bf4b6e058b631e40e4be6fb7a29a503152d06d3623cc7c3873d7957ab5191178badf0500cb1861bf498
+EBUILD php-7.1.10.ebuild 21434 SHA256 00abe4a22847589288fbc8d29de8023dc2e8f26d99dbc51e2ffa9741f24f6b09 SHA512 6ddb45c70d32eda82ae6b171033178f7de61152f71c293b6bf625c8fd6c46cbd39505d6c7590ce3c1d9f0a5e7eb56deb0a89d155d48cdad42785835b93e5ea38 WHIRLPOOL 8f91816fe9249e0b0f2649c9d8db43ff2849ec4b7f3249eb7605f3407488c1231e0aea760a136f2bb0c3fbac036fa3fc67d708fcfe44dd6eb9aac4175b271ae7
+EBUILD php-7.1.9.ebuild 21434 SHA256 00abe4a22847589288fbc8d29de8023dc2e8f26d99dbc51e2ffa9741f24f6b09 SHA512 6ddb45c70d32eda82ae6b171033178f7de61152f71c293b6bf625c8fd6c46cbd39505d6c7590ce3c1d9f0a5e7eb56deb0a89d155d48cdad42785835b93e5ea38 WHIRLPOOL 8f91816fe9249e0b0f2649c9d8db43ff2849ec4b7f3249eb7605f3407488c1231e0aea760a136f2bb0c3fbac036fa3fc67d708fcfe44dd6eb9aac4175b271ae7
+EBUILD php-7.2.0_rc2.ebuild 22005 SHA256 18e9efb4ca41b4b276b184edca8d9b96552f88696358e2303d9d079d4560f59a SHA512 9d97d88cf5ecedbaf342df5b0de77c511abeed84c7ae7ef7954613f2973837993511a2f5626161f6e6c874ba958d30e2dc94f179b4a635e54e533ebc1b710ec0 WHIRLPOOL 6989a8ae080ea2a1e44a3dfd8c850bb086297d38c7a301d6f0ae9989acfaf2b4a6795b3694c59206781b7ddb6bc693864ac2c6281c74c63a68c62329e973701f
+EBUILD php-7.2.0_rc3.ebuild 22002 SHA256 b5bbf7d10a4e8f11a3120c85da080920c875d584cf8055d536b742e0e8e61d39 SHA512 167325c9697beca190fe83a23e1d683ea3e42750f8b537c572de3829e8c157a9b2e3a015965e29905086bf2cdb4642a47709983c2fc27b810048f18030c020c2 WHIRLPOOL 9dd5f5fe0d8ae518f7220a31a26832309c4405c843d0b30abf2319323bdb0596bb458868da67a9871928e1e5274618659520b3c3bd5ed785a6916168d026ce8e
+MISC ChangeLog 69520 SHA256 e57a249703e1b70ac99f6762ce37b0499e73067ad5b5c80f1ec1ca1d4043713f SHA512 3b425f7863e0835a8542aa70ff910cf46e65124d62e78912de313a6e04b82cb6954a8590a00b12099a6e114c0ea1f4f64baa1a533ed2e9eb4f5b30a281592889 WHIRLPOOL b50c0f02494945d674a64111493ba4bcbb0aa47b1a3229308b612e756020ac051f506228ce7671e50cdf8d8a75ad785d6b6c3eb6f38d8cea12a4aa7f6498b998
+MISC ChangeLog-2012 108488 SHA256 c2eea36502d34eadc7995d546f78aaa553ba07beeb51ea738715ad7f2e51b08d SHA512 eb25224993eff1ea42ea133302991a3ffad3adda0bc524cfa4fae49574230a8e65b35b08750d780c11cc9c152435fadbf2c416241fac28dcbb025e060e96cd7a WHIRLPOOL 82f627853fa961f3f3707fb2c8757acbc8fc644e89121d78703b40ff0f668aa7d0f1aa26c77f8f503e4f6da22ed865e4cb7c02d5d112c89488b12aa6b0d80568
+MISC ChangeLog-2015 48694 SHA256 0dc57defe0e591303069f037d3dfb54d74cec2d2ab35504b8d43200910dfa056 SHA512 2e71df8e73b0db5c70c817e235f2b7998d07dc73c64affddc7d21e062a3bce0de8e5537239536619be8f8bf6163065a06082a26d34e90d22fe2bd5de1cdd5e3e WHIRLPOOL 5e90f2584f49e8a0be2fe0f611ee2d451d755f0c75aaab8bbed2083d9b5d42074685d0f8d6c4bf3a2ff098f0a845d89b9435ab8cab0cfc56aecb44ddf9e92d14
+MISC metadata.xml 2439 SHA256 2fde8a7861cef670d410d101ce41a0db0877b53e3cf67d6d807c747d3839160d SHA512 5d0221b77317e021231a2c1ae1dc407dca0e7ad144f5648d9d1abf98434689d375b04c9c45795e38517ca3c3d6077acbe4ff79f3551b20adaeb06325e363ebee WHIRLPOOL 92d82cabdef2095fcbc0ccf39df993855aca959f0dcd77dbff92bb1d67963c7039c763d71d3472e0c882eb27674c0028852aec05b24cae38464d3a0ef7d5e2fc
diff --git a/dev-lang/php/files/20php5-envd b/dev-lang/php/files/20php5-envd
new file mode 100644
index 000000000000..f6033ae517c7
--- /dev/null
+++ b/dev-lang/php/files/20php5-envd
@@ -0,0 +1,2 @@
+MANPATH="/usr/lib/php5/man/"
+CONFIG_PROTECT_MASK="/etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/"
diff --git a/dev-lang/php/files/php-5.6-no-bison-warnings.patch b/dev-lang/php/files/php-5.6-no-bison-warnings.patch
new file mode 100644
index 000000000000..18966599596f
--- /dev/null
+++ b/dev-lang/php/files/php-5.6-no-bison-warnings.patch
@@ -0,0 +1,42 @@
+From d3466a04345b31dfc62d94fe994b40321a6418ec Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Thu, 29 Sep 2016 15:43:06 -0400
+Subject: [PATCH 1/1] Zend/acinclude.m4: don't warn about >=bison-3.0.1
+ versions.
+
+The PHP configure script will emit a warning if it thinks your bison
+version is insufficient:
+
+ WARNING: This bison version is not supported for regeneration of
+ the Zend/PHP parsers (found: 3.0, min: 204, excluded: 3.0).
+
+However, there is an error in the test that causes it to treat all
+3.0.x versions as if they were 3.0. The result is that users get
+warned about a perfectly acceptable version of bison.
+
+This patch is meant only for Gentoo, where we can require a working
+version of bison (something newer than 3.0.1). Having done so, this
+patch removes the check and the WARNING.
+
+Gentoo-Bug: 593278
+PHP-Bug: 69055
+---
+ Zend/acinclude.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Zend/acinclude.m4 b/Zend/acinclude.m4
+index 7fa8c99..9d6cb1d 100644
+--- a/Zend/acinclude.m4
++++ b/Zend/acinclude.m4
+@@ -9,7 +9,7 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[
+ # non-working versions, e.g. "3.0 3.2";
+ # remove "none" when introducing the first incompatible bison version an
+ # separate any following additions by spaces
+- bison_version_exclude="3.0"
++ bison_version_exclude=""
+
+ # for standalone build of Zend Engine
+ test -z "$SED" && SED=sed
+--
+2.7.3
+
diff --git a/dev-lang/php/files/php-fpm_at-simple.service b/dev-lang/php/files/php-fpm_at-simple.service
new file mode 100644
index 000000000000..5f0482e8c263
--- /dev/null
+++ b/dev-lang/php/files/php-fpm_at-simple.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=The PHP FastCGI Process Manager
+After=network.target
+
+[Service]
+Type=simple
+PIDFile=/run/php-fpm/php-fpm-%I.pid
+ExecStart=/usr/libexec/php-fpm-launcher php%I -y /etc/php/fpm-php%I/php-fpm.conf --nodaemonize
+ExecReload=/bin/kill -USR2 $MAINPID
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-lang/php/files/php-fpm_at.service b/dev-lang/php/files/php-fpm_at.service
new file mode 100644
index 000000000000..152c1abe0438
--- /dev/null
+++ b/dev-lang/php/files/php-fpm_at.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=The PHP FastCGI Process Manager
+After=network.target
+
+[Service]
+Type=notify
+PIDFile=/run/php-fpm/php-fpm-%I.pid
+ExecStart=/usr/libexec/php-fpm-launcher php%I -y /etc/php/fpm-php%I/php-fpm.conf --nodaemonize
+ExecReload=/bin/kill -USR2 $MAINPID
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/dev-lang/php/metadata.xml b/dev-lang/php/metadata.xml
new file mode 100644
index 000000000000..efe0a57aaa9d
--- /dev/null
+++ b/dev-lang/php/metadata.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>php-bugs@gentoo.org</email>
+ <name>PHP</name>
+ </maintainer>
+ <use>
+ <flag name="argon2">Enable password hashing algorithm from <pkg>app-crypt/argon2</pkg></flag>
+ <flag name="cli">Enable CLI SAPI</flag>
+ <flag name="coverage">
+ Include gcov symbols for test coverage and lcov reports. Only
+ useful for extension developers, and requires GCC.
+ </flag>
+ <flag name="embed">Enable embed SAPI </flag>
+ <flag name="enchant">Add supports Enchant spelling library. </flag>
+ <flag name="fileinfo"> Add fileinfo extension support</flag>
+ <flag name="filter">Add filter extension support</flag>
+ <flag name="fpm">Enable the FastCGI Process Manager SAPI</flag>
+ <flag name="gd">Adds support for gd (bundled with PHP)</flag>
+ <flag name="hash">Enable the hash extension</flag>
+ <flag name="json">Enable JSON support</flag>
+ <flag name="ldap-sasl">Add SASL support for the PHP LDAP extension</flag>
+ <flag name="libmysqlclient">
+ Use libmyslclient driver for mysql, mysqli, PDO_Mysql (not recommended)
+ </flag>
+ <flag name="lmdb">Enable support for <pkg>dev-db/lmdb</pkg> db backend</flag>
+ <flag name="intl">
+ Enables the intl extension for extended internalization support
+ </flag>
+ <flag name="opcache">
+ Enables built-in opcode cache, replacing pecl-apc et al.
+ </flag>
+ <flag name="pdo">Enable the bundled PDO extensions</flag>
+ <flag name="phar">
+ Enables the phar extension to provide phar archive support
+ </flag>
+ <flag name="phpdbg">
+ Enable the PHP Debug Command Line SAPI (like gdb for php)
+ </flag>
+ <flag name="sodium">Enable support for crypto through libsodium</flag>
+ <flag name="tokyocabinet">
+ Enable support for <pkg>dev-db/tokyocabinet</pkg> db backend</flag>
+ <flag name="xmlreader">Enable XMLReader support</flag>
+ <flag name="xmlwriter">Enable XMLWriter support</flag>
+ <flag name="xslt">Enable the XSL extension</flag>
+ <flag name="vpx">Enable webp support for GD in php-5.x</flag>
+ <flag name="webp">Enable webp support for GD in php-7.x</flag>
+ <flag name="zip">Enable ZIP file support</flag>
+ <flag name="zip-encryption">Enable ZIP file encryption from <pkg>dev-libs/libzip</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/php/php-5.6.31.ebuild b/dev-lang/php/php-5.6.31.ebuild
new file mode 100644
index 000000000000..99350669e42b
--- /dev/null
+++ b/dev-lang/php/php-5.6.31.ebuild
@@ -0,0 +1,771 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic versionator systemd
+
+DESCRIPTION="The PHP language runtime engine"
+HOMEPAGE="http://php.net/"
+SRC_URI="http://php.net/distributions/${P}.tar.xz"
+
+LICENSE="PHP-3.01
+ BSD
+ Zend-2.0
+ bcmath? ( LGPL-2.1+ )
+ fpm? ( BSD-2 )
+ gd? ( gd )
+ unicode? ( BSD-2 LGPL-2.1 )"
+
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
+ coverage crypt +ctype curl debug
+ enchant exif +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
+ mhash mssql mysql libmysqlclient mysqli nls
+ oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
+ readline recode selinux +session sharedmem
+ +simplexml snmp soap sockets spell sqlite ssl
+ sybase-ct sysvipc systemd tidy +tokenizer truetype unicode vpx wddx
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
+
+# The supported (that is, autodetected) versions of BDB are listed in
+# the ./configure script. Other versions *work*, but we need to stick to
+# the ones that can be detected to avoid a repeat of bug #564824.
+COMMON_DEPEND="
+ >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ acl? ( sys-apps/acl )
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( || ( sys-libs/db:5.3
+ sys-libs/db:5.1
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5 ) )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ coverage? ( dev-util/lcov )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( dev-libs/gmp:0 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[kerberos=,ssl=] )
+ intl? ( dev-libs/icu:= )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ libmysqlclient? (
+ mysql? ( virtual/libmysqlclient:= )
+ mysqli? ( virtual/libmysqlclient:= )
+ )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql:* )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline:0= )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl )
+ )
+ sybase-ct? ( dev-db/freetds )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ >=media-libs/t1lib-5.0.0
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma:= )
+ vpx? ( media-libs/libvpx )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ virtual/mta
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ >=sys-devel/bison-3.0.1
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
+REQUIRED_USE="
+ || ( cli cgi fpm apache2 embed )
+ cli? ( ^^ ( readline libedit ) )
+ truetype? ( gd )
+ vpx? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ recode? ( !imap !mysql !mysqli !libmysqlclient )
+ libmysqlclient? ( || (
+ mysql
+ mysqli
+ pdo
+ ) )
+
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ sharedmem? ( !threads )
+"
+
+PHP_MV="$(get_major_version)"
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ # Always install the production INI file, bug 611214.
+ local phpinisrc="php.ini-production-${phpsapi}"
+ cp php.ini-production "${phpinisrc}" || die
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
+ -i "${phpinisrc}" || die
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" php.ini
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ if use opcache; then
+ elog "Adding opcache to $PHP_EXT_INI_DIR"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
+ "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
+ dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
+ "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
+ fi
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "fpm" ]] ; then
+ einfo "Installing FPM config file php-fpm.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ doins sapi/fpm/php-fpm.conf
+ fi
+
+ dodoc php.ini-{development,production}
+}
+
+php_set_ini_dir() {
+ PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/php-${SLOT}-no-bison-warnings.patch"
+
+ # Change PHP branding
+ # Get the alpha/beta/rc version
+ sed -re "s|^(PHP_EXTRA_VERSION=\").*(\")|\1-pl${PR/r/}-gentoo\2|g" \
+ -i configure.in || die "Unable to change PHP branding"
+
+ # Patch PHP to show Gentoo as the server platform
+ sed -e 's/PHP_UNAME=`uname -a | xargs`/PHP_UNAME=`uname -s -n -r -v | xargs`/g' \
+ -i configure.in || die "Failed to fix server platform name"
+
+ # Prevent PHP from activating the Apache config,
+ # as we will do that ourselves
+ sed -i \
+ -e "s,-i -a -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ -e "s,-i -A -n php${PHP_MV},-i -n php${PHP_MV},g" \
+ configure sapi/apache2filter/config.m4 sapi/apache2handler/config.m4 \
+ || die
+
+ # Patch PHP to support heimdal instead of mit-krb5
+ if has_version "app-crypt/heimdal" ; then
+ sed -e 's|gssapi_krb5|gssapi|g' -i acinclude.m4 \
+ || die "Failed to fix heimdal libname"
+ sed -e 's|PHP_ADD_LIBRARY(k5crypto, 1, $1)||g' -i acinclude.m4 \
+ || die "Failed to fix heimdal crypt library reference"
+ fi
+
+ eapply_user
+
+ # Force rebuilding aclocal.m4
+ rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare"
+ eautoreconf
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # http://bugs.php.net/bug.php?id=48795, bug #343481
+ sed -i -e '/BUILD_CGI="\\$(CC)/s/CC/CXX/' configure || die
+ fi
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
+ # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
+ local our_conf=(
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}/man"
+ --infodir="${PHP_DESTDIR}/info"
+ --libdir="${PHP_DESTDIR}/lib"
+ --with-libdir="$(get_libdir)"
+ --localstatedir="${EPREFIX}/var"
+ --without-pear
+ $(use_enable threads maintainer-zts)
+ )
+
+ our_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_enable bcmath bcmath)
+ $(use_with bzip2 bz2 "${EPREFIX}/usr")
+ $(use_enable calendar calendar)
+ $(use_enable coverage gcov)
+ $(use_enable ctype ctype)
+ $(use_with curl curl "${EPREFIX}/usr")
+ $(use_enable xml dom)
+ $(use_with enchant enchant "${EPREFIX}/usr")
+ $(use_enable exif exif)
+ $(use_enable fileinfo fileinfo)
+ $(use_enable filter filter)
+ $(use_enable ftp ftp)
+ $(use_with nls gettext "${EPREFIX}/usr")
+ $(use_with gmp gmp "${EPREFIX}/usr")
+ $(use_enable hash hash)
+ $(use_with mhash mhash "${EPREFIX}/usr")
+ $(use_with iconv iconv \
+ $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}/usr"))
+ $(use_enable intl intl)
+ $(use_enable ipv6 ipv6)
+ $(use_enable json json)
+ $(use_with kerberos kerberos "${EPREFIX}/usr")
+ $(use_enable xml libxml)
+ $(use_with xml libxml-dir "${EPREFIX}/usr")
+ $(use_enable unicode mbstring)
+ $(use_with crypt mcrypt "${EPREFIX}/usr")
+ $(use_with mssql mssql "${EPREFIX}/usr")
+ $(use_with unicode onig "${EPREFIX}/usr")
+ $(use_with ssl openssl "${EPREFIX}/usr")
+ $(use_with ssl openssl-dir "${EPREFIX}/usr")
+ $(use_enable pcntl pcntl)
+ $(use_enable phar phar)
+ $(use_enable pdo pdo)
+ $(use_enable opcache opcache)
+ $(use_with postgres pgsql "${EPREFIX}/usr")
+ $(use_enable posix posix)
+ $(use_with spell pspell "${EPREFIX}/usr")
+ $(use_with recode recode "${EPREFIX}/usr")
+ $(use_enable simplexml simplexml)
+ $(use_enable sharedmem shmop)
+ $(use_with snmp snmp "${EPREFIX}/usr")
+ $(use_enable soap soap)
+ $(use_enable sockets sockets)
+ $(use_with sqlite sqlite3 "${EPREFIX}/usr")
+ $(use_with sybase-ct sybase-ct "${EPREFIX}/usr")
+ $(use_enable sysvipc sysvmsg)
+ $(use_enable sysvipc sysvsem)
+ $(use_enable sysvipc sysvshm)
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}/usr")
+ $(use_enable tokenizer tokenizer)
+ $(use_enable wddx wddx)
+ $(use_enable xml xml)
+ $(use_enable xmlreader xmlreader)
+ $(use_enable xmlwriter xmlwriter)
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}/usr")
+ $(use_enable zip zip)
+ $(use_with zlib zlib "${EPREFIX}/usr")
+ $(use_enable debug debug)
+ )
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ our_conf+=( "--enable-dba${shared}" )
+ fi
+
+ # DBA drivers support
+ our_conf+=(
+ $(use_with cdb cdb)
+ $(use_with berkdb db4 "${EPREFIX}/usr")
+ $(use_enable flatfile flatfile)
+ $(use_with gdbm gdbm "${EPREFIX}/usr")
+ $(use_enable inifile inifile)
+ $(use_with qdbm qdbm "${EPREFIX}/usr")
+ )
+
+ # Support for the GD graphics library
+ our_conf+=(
+ $(use_with truetype freetype-dir "${EPREFIX}/usr")
+ $(use_with truetype t1lib "${EPREFIX}/usr")
+ $(use_enable cjk gd-jis-conv)
+ $(use_with gd jpeg-dir "${EPREFIX}/usr")
+ $(use_with gd png-dir "${EPREFIX}/usr")
+ $(use_with xpm xpm-dir "${EPREFIX}/usr")
+ $(use_with vpx vpx-dir "${EPREFIX}/usr")
+ )
+ # enable gd last, so configure can pick up the previous settings
+ our_conf+=( $(use_with gd gd) )
+
+ # IMAP support
+ if use imap ; then
+ our_conf+=(
+ $(use_with imap imap "${EPREFIX}/usr")
+ $(use_with ssl imap-ssl "${EPREFIX}/usr")
+ )
+ fi
+
+ # Interbase/firebird support
+ our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
+
+ # LDAP support
+ if use ldap ; then
+ our_conf+=(
+ $(use_with ldap ldap "${EPREFIX}/usr")
+ $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
+ )
+ fi
+
+ # MySQL support
+ local mysqllib="mysqlnd"
+ local mysqlilib="mysqlnd"
+ use libmysqlclient && mysqllib="${EPREFIX}/usr"
+ use libmysqlclient && mysqlilib="${EPREFIX}/usr/bin/mysql_config"
+
+ our_conf+=( $(use_with mysql mysql "${mysqllib}") )
+ our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
+
+ local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ if use mysql || use mysqli ; then
+ our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
+ fi
+
+ # ODBC support
+ our_conf+=(
+ $(use_with odbc unixODBC "${EPREFIX}/usr")
+ $(use_with iodbc iodbc "${EPREFIX}/usr")
+ )
+
+ # Oracle support
+ our_conf+=( $(use_with oci8-instant-client oci8) )
+
+ # PDO support
+ if use pdo ; then
+ our_conf+=(
+ $(use_with mssql pdo-dblib)
+ $(use_with mysql pdo-mysql "${mysqllib}")
+ $(use_with postgres pdo-pgsql)
+ $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
+ $(use_with firebird pdo-firebird "${EPREFIX}/usr")
+ $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
+ $(use_with oci8-instant-client pdo-oci)
+ )
+ fi
+
+ # readline/libedit support
+ our_conf+=(
+ $(use_with readline readline "${EPREFIX}/usr")
+ $(use_with libedit libedit "${EPREFIX}/usr")
+ )
+
+ # Session support
+ if use session ; then
+ our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
+ else
+ our_conf+=( $(use_enable session session) )
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ our_conf+=( --with-pic )
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ our_conf+=(
+ --with-pcre-regex="${EPREFIX}/usr"
+ --with-pcre-dir="${EPREFIX}/usr"
+ )
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # Cache the ./configure test results between SAPIs.
+ our_conf+=( --cache-file="${T}/config.cache" )
+
+ # Support user-passed configuration parameters
+ our_conf+=( ${EXTRA_ECONF:-} )
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ mkdir -p "${WORKDIR}/sapis-build" || die
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ # The BUILD_DIR variable is used to determine where to output
+ # the files that autotools creates. This was all originally
+ # based on the autotools-utils eclass.
+ BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
+ cp -a "${S}" "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local sapi_conf=(
+ --with-config-file-path="${PHP_INI_DIR}"
+ --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
+ )
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( "--enable-${sapi}" )
+ else
+ sapi_conf+=( "--disable-${sapi}" )
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
+ else
+ sapi_conf+=( --without-apxs2 )
+ fi
+ ;;
+ esac
+ done
+
+ # Construct the $myeconfargs array by concatenating $our_conf
+ # (the common args) and $sapi_conf (the SAPI-specific args).
+ local myeconfargs=( "${our_conf[@]}" )
+ myeconfargs+=( "${sapi_conf[@]}" )
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+ econf "${myeconfargs[@]}"
+ popd > /dev/null || die
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || \
+ die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi" || die
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs
+
+ local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir "/usr/share/php${PHP_MV}"
+
+ local sapi="", file=""
+ local sapi_list=""
+
+ for sapi in ${SAPIS}; do
+ if use "${sapi}" ; then
+ einfo "Installing SAPI: ${sapi}"
+ cd "${WORKDIR}/sapis-build/${sapi}" || die
+
+ if [[ "${sapi}" == "apache2" ]] ; then
+ # We're specifically not using emake install-sapi as libtool
+ # may cause unnecessary relink failures (see bug #351266)
+ insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
+ newins ".libs/libphp5$(get_libname)" \
+ "libphp${PHP_MV}$(get_libname)"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ local dest="${PHP_DESTDIR#${EPREFIX}}"
+ into "${dest}"
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ fpm)
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+ source="libs/libphp${PHP_MV}$(get_libname)"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}"
+ else
+ dobin "${source}"
+ local name="$(basename ${source})"
+ dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
+ fi
+ fi
+
+ php_install_ini "${sapi}"
+
+ # construct correct SAPI string for php-config
+ # thanks to ferringb for the bash voodoo
+ if [[ "${sapi}" == "apache2" ]]; then
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ else
+ sapi_list="${sapi_list:+${sapi_list} }${sapi}"
+ fi
+ fi
+ done
+
+ # Installing opcache module
+ if use opcache ; then
+ into "${PHP_DESTDIR#${EPREFIX}}"
+ dolib.so "modules/opcache$(get_libname)"
+ fi
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+ sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
+
+ if use fpm ; then
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/php-fpm_at.service" \
+ "php-fpm@${SLOT}.service"
+ else
+ systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
+ "php-fpm@${SLOT}.service"
+ fi
+ fi
+}
+
+src_test() {
+ echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
+ if [[ ! -x "${PHP_BIN}" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis/cgi/php-cgi"
+ fi
+
+ REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
+ "session.save_path=${T}" \
+ "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
+ "session.save_path=${T}"
+
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
+ done
+
+ local failed="$(find -name '*.out')"
+ if [[ ${failed} != "" ]] ; then
+ ewarn "The following test cases failed unexpectedly:"
+ for name in ${failed}; do
+ ewarn " ${name/.out/}"
+ done
+ else
+ einfo "No unexpected test failures, all fine"
+ fi
+
+ if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
+ local passed=""
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ [[ -f "${name}.diff" ]] && continue
+ passed="${passed} ${name}"
+ done
+ if [[ ${passed} != "" ]] ; then
+ einfo "The following test cases passed unexpectedly:"
+ for name in ${passed}; do
+ ewarn " ${passed}"
+ done
+ else
+ einfo "None of the known-to-fail tests passed, all fine"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ elog
+ elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
+ elog "your apache2 command. OpenRC users can append that string to"
+ elog "APACHE2_OPTS in /etc/conf.d/apache2."
+ elog
+ elog "The apache module configuration file 70_mod_php.conf is"
+ elog "provided (and maintained) by eselect-php."
+ elog
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT} || die
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ # Remove dead symlinks for SAPIs that were just disabled. For
+ # example, if the user has the cgi SAPI enabled, then he has an
+ # eselect-php symlink for it. If he later reinstalls PHP with
+ # USE="-cgi", that symlink will break. This call to eselect is
+ # supposed to remove that dead link per bug 572436.
+ eselect php cleanup || die
+
+ if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
+ elog "To build extensions for this version of PHP, you will need to"
+ elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
+ elog
+ fi
+
+ # Warn about the removal of PHP_INI_VERSION if the user has it set.
+ if [[ -n "${PHP_INI_VERSION}" ]]; then
+ ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
+ ewarn 'remove it from your configuration at your convenience. See'
+ ewarn
+ ewarn ' https://bugs.gentoo.org/611214'
+ ewarn
+ ewarn 'for more information.'
+ fi
+
+ elog "For details on how version slotting works, please see"
+ elog "the wiki:"
+ elog
+ elog " https://wiki.gentoo.org/wiki/PHP"
+ elog
+}
+
+pkg_postrm() {
+ # This serves two purposes. First, if we have just removed the last
+ # installed version of PHP, then this will remove any dead symlinks
+ # belonging to eselect-php. Second, if a user upgrades slots from
+ # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
+ # his existing symlinks to point to the new 7.0 installation. The
+ # latter is bug 432962.
+ #
+ # Note: the eselect-php package may not be installed at this point,
+ # so we can't die() if this command fails.
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-7.0.23.ebuild b/dev-lang/php/php-7.0.23.ebuild
new file mode 100644
index 000000000000..547d2e86efc6
--- /dev/null
+++ b/dev-lang/php/php-7.0.23.ebuild
@@ -0,0 +1,739 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic versionator systemd
+
+DESCRIPTION="The PHP language runtime engine"
+HOMEPAGE="http://php.net/"
+SRC_URI="http://php.net/distributions/${P}.tar.xz"
+
+LICENSE="PHP-3.01
+ BSD
+ Zend-2.0
+ bcmath? ( LGPL-2.1+ )
+ fpm? ( BSD-2 )
+ gd? ( gd )
+ unicode? ( BSD-2 LGPL-2.1 )"
+
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2 phpdbg"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
+ coverage crypt +ctype curl debug
+ enchant exif +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
+ mhash mssql mysql mysqli nls
+ oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
+ readline recode selinux +session sharedmem
+ +simplexml snmp soap sockets spell sqlite ssl
+ sysvipc systemd tidy +tokenizer truetype unicode wddx webp
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
+
+# The supported (that is, autodetected) versions of BDB are listed in
+# the ./configure script. Other versions *work*, but we need to stick to
+# the ones that can be detected to avoid a repeat of bug #564824.
+COMMON_DEPEND="
+ >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ acl? ( sys-apps/acl )
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( || ( sys-libs/db:5.3
+ sys-libs/db:5.1
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5 ) )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ coverage? ( dev-util/lcov )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( dev-libs/gmp:0 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[kerberos=,ssl=] )
+ intl? ( dev-libs/icu:= )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql:* )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline:0= )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma:= )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ webp? ( media-libs/libwebp )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ virtual/mta
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ >=sys-devel/bison-3.0.1
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
+REQUIRED_USE="
+ || ( cli cgi fpm apache2 embed phpdbg )
+ cli? ( ^^ ( readline libedit ) )
+ truetype? ( gd )
+ webp? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysqli !mysql )
+ sharedmem? ( !threads )
+ mysql? ( || ( mysqli pdo ) )
+"
+
+PHP_MV="$(get_major_version)"
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ # Always install the production INI file, bug 611214.
+ local phpinisrc="php.ini-production-${phpsapi}"
+ cp php.ini-production "${phpinisrc}" || die
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
+ -i "${phpinisrc}" || die
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" php.ini
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ if use opcache; then
+ elog "Adding opcache to $PHP_EXT_INI_DIR"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
+ "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
+ dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
+ "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
+ fi
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "fpm" ]] ; then
+ einfo "Installing FPM config files php-fpm.conf and www.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ doins sapi/fpm/php-fpm.conf
+ insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
+ doins sapi/fpm/www.conf
+ fi
+
+ dodoc php.ini-{development,production}
+}
+
+php_set_ini_dir() {
+ PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
+
+src_prepare() {
+ default
+
+ # In php-7.x, the FPM pool configuration files have been split off
+ # of the main config. By default the pool config files go in
+ # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
+ # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
+ # we'll install the pool configuration file "www.conf" there.
+ php_set_ini_dir fpm
+ sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
+ sapi/fpm/php-fpm.conf.in \
+ || die 'failed to move the include directory in php-fpm.conf'
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
+ # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
+ local our_conf=(
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}/man"
+ --infodir="${PHP_DESTDIR}/info"
+ --libdir="${PHP_DESTDIR}/lib"
+ --with-libdir="$(get_libdir)"
+ --localstatedir="${EPREFIX}/var"
+ --without-pear
+ $(use_enable threads maintainer-zts)
+ )
+
+ our_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_enable bcmath bcmath)
+ $(use_with bzip2 bz2 "${EPREFIX}/usr")
+ $(use_enable calendar calendar)
+ $(use_enable coverage gcov)
+ $(use_enable ctype ctype)
+ $(use_with curl curl "${EPREFIX}/usr")
+ $(use_enable xml dom)
+ $(use_with enchant enchant "${EPREFIX}/usr")
+ $(use_enable exif exif)
+ $(use_enable fileinfo fileinfo)
+ $(use_enable filter filter)
+ $(use_enable ftp ftp)
+ $(use_with nls gettext "${EPREFIX}/usr")
+ $(use_with gmp gmp "${EPREFIX}/usr")
+ $(use_enable hash hash)
+ $(use_with mhash mhash "${EPREFIX}/usr")
+ $(use_with iconv iconv \
+ $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}/usr"))
+ $(use_enable intl intl)
+ $(use_enable ipv6 ipv6)
+ $(use_enable json json)
+ $(use_with kerberos kerberos "${EPREFIX}/usr")
+ $(use_enable xml libxml)
+ $(use_with xml libxml-dir "${EPREFIX}/usr")
+ $(use_enable unicode mbstring)
+ $(use_with crypt mcrypt "${EPREFIX}/usr")
+ $(use_with unicode onig "${EPREFIX}/usr")
+ $(use_with ssl openssl "${EPREFIX}/usr")
+ $(use_with ssl openssl-dir "${EPREFIX}/usr")
+ $(use_enable pcntl pcntl)
+ $(use_enable phar phar)
+ $(use_enable pdo pdo)
+ $(use_enable opcache opcache)
+ $(use_with postgres pgsql "${EPREFIX}/usr")
+ $(use_enable posix posix)
+ $(use_with spell pspell "${EPREFIX}/usr")
+ $(use_with recode recode "${EPREFIX}/usr")
+ $(use_enable simplexml simplexml)
+ $(use_enable sharedmem shmop)
+ $(use_with snmp snmp "${EPREFIX}/usr")
+ $(use_enable soap soap)
+ $(use_enable sockets sockets)
+ $(use_with sqlite sqlite3 "${EPREFIX}/usr")
+ $(use_enable sysvipc sysvmsg)
+ $(use_enable sysvipc sysvsem)
+ $(use_enable sysvipc sysvshm)
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}/usr")
+ $(use_enable tokenizer tokenizer)
+ $(use_enable wddx wddx)
+ $(use_enable xml xml)
+ $(use_enable xmlreader xmlreader)
+ $(use_enable xmlwriter xmlwriter)
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}/usr")
+ $(use_enable zip zip)
+ $(use_with zlib zlib "${EPREFIX}/usr")
+ $(use_enable debug debug)
+ )
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ our_conf+=( "--enable-dba${shared}" )
+ fi
+
+ # DBA drivers support
+ our_conf+=(
+ $(use_with cdb cdb)
+ $(use_with berkdb db4 "${EPREFIX}/usr")
+ $(use_enable flatfile flatfile)
+ $(use_with gdbm gdbm "${EPREFIX}/usr")
+ $(use_enable inifile inifile)
+ $(use_with qdbm qdbm "${EPREFIX}/usr")
+ )
+
+ # Support for the GD graphics library
+ our_conf+=(
+ $(use_with truetype freetype-dir "${EPREFIX}/usr")
+ $(use_enable cjk gd-jis-conv)
+ $(use_with gd jpeg-dir "${EPREFIX}/usr")
+ $(use_with gd png-dir "${EPREFIX}/usr")
+ $(use_with xpm xpm-dir "${EPREFIX}/usr")
+ )
+ if use webp; then
+ our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
+ fi
+ # enable gd last, so configure can pick up the previous settings
+ our_conf+=( $(use_with gd gd) )
+
+ # IMAP support
+ if use imap ; then
+ our_conf+=(
+ $(use_with imap imap "${EPREFIX}/usr")
+ $(use_with ssl imap-ssl "${EPREFIX}/usr")
+ )
+ fi
+
+ # Interbase/firebird support
+ our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
+
+ # LDAP support
+ if use ldap ; then
+ our_conf+=(
+ $(use_with ldap ldap "${EPREFIX}/usr")
+ $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
+ )
+ fi
+
+ # MySQL support
+ local mysqllib="mysqlnd"
+ local mysqlilib="mysqlnd"
+
+ our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
+
+ local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ if use mysql || use mysqli ; then
+ our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
+ fi
+
+ # ODBC support
+ our_conf+=(
+ $(use_with odbc unixODBC "${EPREFIX}/usr")
+ $(use_with iodbc iodbc "${EPREFIX}/usr")
+ )
+
+ # Oracle support
+ our_conf+=( $(use_with oci8-instant-client oci8) )
+
+ # PDO support
+ if use pdo ; then
+ our_conf+=(
+ $(use_with mssql pdo-dblib "${EPREFIX}/usr")
+ $(use_with mysql pdo-mysql "${mysqllib}")
+ $(use_with postgres pdo-pgsql)
+ $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
+ $(use_with firebird pdo-firebird "${EPREFIX}/usr")
+ $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
+ $(use_with oci8-instant-client pdo-oci)
+ )
+ fi
+
+ # readline/libedit support
+ our_conf+=(
+ $(use_with readline readline "${EPREFIX}/usr")
+ $(use_with libedit libedit "${EPREFIX}/usr")
+ )
+
+ # Session support
+ if use session ; then
+ our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
+ else
+ our_conf+=( $(use_enable session session) )
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ our_conf+=( --with-pic )
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ our_conf+=(
+ --with-pcre-regex="${EPREFIX}/usr"
+ --with-pcre-dir="${EPREFIX}/usr"
+ )
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # Cache the ./configure test results between SAPIs.
+ our_conf+=( --cache-file="${T}/config.cache" )
+
+ # Support user-passed configuration parameters
+ our_conf+=( ${EXTRA_ECONF:-} )
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ mkdir -p "${WORKDIR}/sapis-build" || die
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ # The BUILD_DIR variable is used to determine where to output
+ # the files that autotools creates. This was all originally
+ # based on the autotools-utils eclass.
+ BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
+ cp -a "${S}" "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local sapi_conf=(
+ --with-config-file-path="${PHP_INI_DIR}"
+ --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
+ )
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm|phpdbg)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( "--enable-${sapi}" )
+ else
+ sapi_conf+=( "--disable-${sapi}" )
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
+ else
+ sapi_conf+=( --without-apxs2 )
+ fi
+ ;;
+ esac
+ done
+
+ # Construct the $myeconfargs array by concatenating $our_conf
+ # (the common args) and $sapi_conf (the SAPI-specific args).
+ local myeconfargs=( "${our_conf[@]}" )
+ myeconfargs+=( "${sapi_conf[@]}" )
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+ econf "${myeconfargs[@]}"
+ popd > /dev/null || die
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || \
+ die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi" || die
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs
+
+ local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir "/usr/share/php${PHP_MV}"
+
+ local sapi="", file=""
+ local sapi_list=""
+
+ for sapi in ${SAPIS}; do
+ if use "${sapi}" ; then
+ einfo "Installing SAPI: ${sapi}"
+ cd "${WORKDIR}/sapis-build/${sapi}" || die
+
+ if [[ "${sapi}" == "apache2" ]] ; then
+ # We're specifically not using emake install-sapi as libtool
+ # may cause unnecessary relink failures (see bug #351266)
+ insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
+ newins ".libs/libphp${PHP_MV}$(get_libname)" \
+ "libphp${PHP_MV}$(get_libname)"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ local dest="${PHP_DESTDIR#${EPREFIX}}"
+ into "${dest}"
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ fpm)
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+ source="libs/libphp${PHP_MV}$(get_libname)"
+ ;;
+ phpdbg)
+ source="sapi/phpdbg/phpdbg"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}"
+ else
+ dobin "${source}"
+ local name="$(basename ${source})"
+ dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
+ fi
+ fi
+
+ php_install_ini "${sapi}"
+
+ # construct correct SAPI string for php-config
+ # thanks to ferringb for the bash voodoo
+ if [[ "${sapi}" == "apache2" ]]; then
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ else
+ sapi_list="${sapi_list:+${sapi_list} }${sapi}"
+ fi
+ fi
+ done
+
+ # Installing opcache module
+ if use opcache ; then
+ into "${PHP_DESTDIR#${EPREFIX}}"
+ dolib.so "modules/opcache$(get_libname)"
+ fi
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+ sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
+
+ if use fpm ; then
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/php-fpm_at.service" \
+ "php-fpm@${SLOT}.service"
+ else
+ systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
+ "php-fpm@${SLOT}.service"
+ fi
+ fi
+}
+
+src_test() {
+ echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
+ if [[ ! -x "${PHP_BIN}" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
+ export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
+ fi
+
+ REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
+ "session.save_path=${T}" \
+ "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
+ "session.save_path=${T}"
+
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
+ done
+
+ local failed="$(find -name '*.out')"
+ if [[ ${failed} != "" ]] ; then
+ ewarn "The following test cases failed unexpectedly:"
+ for name in ${failed}; do
+ ewarn " ${name/.out/}"
+ done
+ else
+ einfo "No unexpected test failures, all fine"
+ fi
+
+ if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
+ local passed=""
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ [[ -f "${name}.diff" ]] && continue
+ passed="${passed} ${name}"
+ done
+ if [[ ${passed} != "" ]] ; then
+ einfo "The following test cases passed unexpectedly:"
+ for name in ${passed}; do
+ ewarn " ${passed}"
+ done
+ else
+ einfo "None of the known-to-fail tests passed, all fine"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ elog
+ elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
+ elog "your apache2 command. OpenRC users can append that string to"
+ elog "APACHE2_OPTS in /etc/conf.d/apache2."
+ elog
+ elog "The apache module configuration file 70_mod_php.conf is"
+ elog "provided (and maintained) by eselect-php."
+ elog
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT} || die
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ # Remove dead symlinks for SAPIs that were just disabled. For
+ # example, if the user has the cgi SAPI enabled, then he has an
+ # eselect-php symlink for it. If he later reinstalls PHP with
+ # USE="-cgi", that symlink will break. This call to eselect is
+ # supposed to remove that dead link per bug 572436.
+ eselect php cleanup || die
+
+ if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
+ elog "To build extensions for this version of PHP, you will need to"
+ elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
+ elog
+ fi
+
+ # Warn about the removal of PHP_INI_VERSION if the user has it set.
+ if [[ -n "${PHP_INI_VERSION}" ]]; then
+ ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
+ ewarn 'remove it from your configuration at your convenience. See'
+ ewarn
+ ewarn ' https://bugs.gentoo.org/611214'
+ ewarn
+ ewarn 'for more information.'
+ fi
+
+ elog "For details on how version slotting works, please see"
+ elog "the wiki:"
+ elog
+ elog " https://wiki.gentoo.org/wiki/PHP"
+ elog
+}
+
+pkg_postrm() {
+ # This serves two purposes. First, if we have just removed the last
+ # installed version of PHP, then this will remove any dead symlinks
+ # belonging to eselect-php. Second, if a user upgrades slots from
+ # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
+ # his existing symlinks to point to the new 7.0 installation. The
+ # latter is bug 432962.
+ #
+ # Note: the eselect-php package may not be installed at this point,
+ # so we can't die() if this command fails.
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-7.0.24.ebuild b/dev-lang/php/php-7.0.24.ebuild
new file mode 100644
index 000000000000..8201c7b7d40c
--- /dev/null
+++ b/dev-lang/php/php-7.0.24.ebuild
@@ -0,0 +1,739 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic versionator systemd
+
+DESCRIPTION="The PHP language runtime engine"
+HOMEPAGE="http://php.net/"
+SRC_URI="http://php.net/distributions/${P}.tar.xz"
+
+LICENSE="PHP-3.01
+ BSD
+ Zend-2.0
+ bcmath? ( LGPL-2.1+ )
+ fpm? ( BSD-2 )
+ gd? ( gd )
+ unicode? ( BSD-2 LGPL-2.1 )"
+
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2 phpdbg"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
+ coverage crypt +ctype curl debug
+ enchant exif +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
+ mhash mssql mysql mysqli nls
+ oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
+ readline recode selinux +session sharedmem
+ +simplexml snmp soap sockets spell sqlite ssl
+ sysvipc systemd tidy +tokenizer truetype unicode wddx webp
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
+
+# The supported (that is, autodetected) versions of BDB are listed in
+# the ./configure script. Other versions *work*, but we need to stick to
+# the ones that can be detected to avoid a repeat of bug #564824.
+COMMON_DEPEND="
+ >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ acl? ( sys-apps/acl )
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( || ( sys-libs/db:5.3
+ sys-libs/db:5.1
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5 ) )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ coverage? ( dev-util/lcov )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ exif? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( dev-libs/gmp:0 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[kerberos=,ssl=] )
+ intl? ( dev-libs/icu:= )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql:* )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline:0= )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ )
+ unicode? ( dev-libs/oniguruma:= )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ webp? ( media-libs/libwebp )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? (
+ x11-libs/libXpm
+ virtual/jpeg:0
+ media-libs/libpng:0= sys-libs/zlib
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ virtual/mta
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ >=sys-devel/bison-3.0.1
+ sys-devel/flex
+ >=sys-devel/m4-1.4.3
+ >=sys-devel/libtool-1.5.18"
+
+# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
+REQUIRED_USE="
+ || ( cli cgi fpm apache2 embed phpdbg )
+ cli? ( ^^ ( readline libedit ) )
+ truetype? ( gd )
+ webp? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysqli !mysql )
+ sharedmem? ( !threads )
+ mysql? ( || ( mysqli pdo ) )
+"
+
+PHP_MV="$(get_major_version)"
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ # Always install the production INI file, bug 611214.
+ local phpinisrc="php.ini-production-${phpsapi}"
+ cp php.ini-production "${phpinisrc}" || die
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
+ -i "${phpinisrc}" || die
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" php.ini
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ if use opcache; then
+ elog "Adding opcache to $PHP_EXT_INI_DIR"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
+ "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
+ dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
+ "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
+ fi
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "fpm" ]] ; then
+ einfo "Installing FPM config files php-fpm.conf and www.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ doins sapi/fpm/php-fpm.conf
+ insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
+ doins sapi/fpm/www.conf
+ fi
+
+ dodoc php.ini-{development,production}
+}
+
+php_set_ini_dir() {
+ PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
+
+src_prepare() {
+ default
+
+ # In php-7.x, the FPM pool configuration files have been split off
+ # of the main config. By default the pool config files go in
+ # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
+ # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
+ # we'll install the pool configuration file "www.conf" there.
+ php_set_ini_dir fpm
+ sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
+ sapi/fpm/php-fpm.conf.in \
+ || die 'failed to move the include directory in php-fpm.conf'
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
+ # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
+ local our_conf=(
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}/man"
+ --infodir="${PHP_DESTDIR}/info"
+ --libdir="${PHP_DESTDIR}/lib"
+ --with-libdir="$(get_libdir)"
+ --localstatedir="${EPREFIX}/var"
+ --without-pear
+ $(use_enable threads maintainer-zts)
+ )
+
+ our_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_enable bcmath bcmath)
+ $(use_with bzip2 bz2 "${EPREFIX}/usr")
+ $(use_enable calendar calendar)
+ $(use_enable coverage gcov)
+ $(use_enable ctype ctype)
+ $(use_with curl curl "${EPREFIX}/usr")
+ $(use_enable xml dom)
+ $(use_with enchant enchant "${EPREFIX}/usr")
+ $(use_enable exif exif)
+ $(use_enable fileinfo fileinfo)
+ $(use_enable filter filter)
+ $(use_enable ftp ftp)
+ $(use_with nls gettext "${EPREFIX}/usr")
+ $(use_with gmp gmp "${EPREFIX}/usr")
+ $(use_enable hash hash)
+ $(use_with mhash mhash "${EPREFIX}/usr")
+ $(use_with iconv iconv \
+ $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}/usr"))
+ $(use_enable intl intl)
+ $(use_enable ipv6 ipv6)
+ $(use_enable json json)
+ $(use_with kerberos kerberos "${EPREFIX}/usr")
+ $(use_enable xml libxml)
+ $(use_with xml libxml-dir "${EPREFIX}/usr")
+ $(use_enable unicode mbstring)
+ $(use_with crypt mcrypt "${EPREFIX}/usr")
+ $(use_with unicode onig "${EPREFIX}/usr")
+ $(use_with ssl openssl "${EPREFIX}/usr")
+ $(use_with ssl openssl-dir "${EPREFIX}/usr")
+ $(use_enable pcntl pcntl)
+ $(use_enable phar phar)
+ $(use_enable pdo pdo)
+ $(use_enable opcache opcache)
+ $(use_with postgres pgsql "${EPREFIX}/usr")
+ $(use_enable posix posix)
+ $(use_with spell pspell "${EPREFIX}/usr")
+ $(use_with recode recode "${EPREFIX}/usr")
+ $(use_enable simplexml simplexml)
+ $(use_enable sharedmem shmop)
+ $(use_with snmp snmp "${EPREFIX}/usr")
+ $(use_enable soap soap)
+ $(use_enable sockets sockets)
+ $(use_with sqlite sqlite3 "${EPREFIX}/usr")
+ $(use_enable sysvipc sysvmsg)
+ $(use_enable sysvipc sysvsem)
+ $(use_enable sysvipc sysvshm)
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}/usr")
+ $(use_enable tokenizer tokenizer)
+ $(use_enable wddx wddx)
+ $(use_enable xml xml)
+ $(use_enable xmlreader xmlreader)
+ $(use_enable xmlwriter xmlwriter)
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}/usr")
+ $(use_enable zip zip)
+ $(use_with zlib zlib "${EPREFIX}/usr")
+ $(use_enable debug debug)
+ )
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ our_conf+=( "--enable-dba${shared}" )
+ fi
+
+ # DBA drivers support
+ our_conf+=(
+ $(use_with cdb cdb)
+ $(use_with berkdb db4 "${EPREFIX}/usr")
+ $(use_enable flatfile flatfile)
+ $(use_with gdbm gdbm "${EPREFIX}/usr")
+ $(use_enable inifile inifile)
+ $(use_with qdbm qdbm "${EPREFIX}/usr")
+ )
+
+ # Support for the GD graphics library
+ our_conf+=(
+ $(use_with truetype freetype-dir "${EPREFIX}/usr")
+ $(use_enable cjk gd-jis-conv)
+ $(use_with gd jpeg-dir "${EPREFIX}/usr")
+ $(use_with gd png-dir "${EPREFIX}/usr")
+ $(use_with xpm xpm-dir "${EPREFIX}/usr")
+ )
+ if use webp; then
+ our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
+ fi
+ # enable gd last, so configure can pick up the previous settings
+ our_conf+=( $(use_with gd gd) )
+
+ # IMAP support
+ if use imap ; then
+ our_conf+=(
+ $(use_with imap imap "${EPREFIX}/usr")
+ $(use_with ssl imap-ssl "${EPREFIX}/usr")
+ )
+ fi
+
+ # Interbase/firebird support
+ our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
+
+ # LDAP support
+ if use ldap ; then
+ our_conf+=(
+ $(use_with ldap ldap "${EPREFIX}/usr")
+ $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
+ )
+ fi
+
+ # MySQL support
+ local mysqllib="mysqlnd"
+ local mysqlilib="mysqlnd"
+
+ our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
+
+ local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ if use mysql || use mysqli ; then
+ our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
+ fi
+
+ # ODBC support
+ our_conf+=(
+ $(use_with odbc unixODBC "${EPREFIX}/usr")
+ $(use_with iodbc iodbc "${EPREFIX}/usr")
+ )
+
+ # Oracle support
+ our_conf+=( $(use_with oci8-instant-client oci8) )
+
+ # PDO support
+ if use pdo ; then
+ our_conf+=(
+ $(use_with mssql pdo-dblib "${EPREFIX}/usr")
+ $(use_with mysql pdo-mysql "${mysqllib}")
+ $(use_with postgres pdo-pgsql)
+ $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
+ $(use_with firebird pdo-firebird "${EPREFIX}/usr")
+ $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
+ $(use_with oci8-instant-client pdo-oci)
+ )
+ fi
+
+ # readline/libedit support
+ our_conf+=(
+ $(use_with readline readline "${EPREFIX}/usr")
+ $(use_with libedit libedit "${EPREFIX}/usr")
+ )
+
+ # Session support
+ if use session ; then
+ our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
+ else
+ our_conf+=( $(use_enable session session) )
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ our_conf+=( --with-pic )
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ our_conf+=(
+ --with-pcre-regex="${EPREFIX}/usr"
+ --with-pcre-dir="${EPREFIX}/usr"
+ )
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # Cache the ./configure test results between SAPIs.
+ our_conf+=( --cache-file="${T}/config.cache" )
+
+ # Support user-passed configuration parameters
+ our_conf+=( ${EXTRA_ECONF:-} )
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ mkdir -p "${WORKDIR}/sapis-build" || die
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ # The BUILD_DIR variable is used to determine where to output
+ # the files that autotools creates. This was all originally
+ # based on the autotools-utils eclass.
+ BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
+ cp -a "${S}" "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local sapi_conf=(
+ --with-config-file-path="${PHP_INI_DIR}"
+ --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
+ )
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm|phpdbg)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( "--enable-${sapi}" )
+ else
+ sapi_conf+=( "--disable-${sapi}" )
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
+ else
+ sapi_conf+=( --without-apxs2 )
+ fi
+ ;;
+ esac
+ done
+
+ # Construct the $myeconfargs array by concatenating $our_conf
+ # (the common args) and $sapi_conf (the SAPI-specific args).
+ local myeconfargs=( "${our_conf[@]}" )
+ myeconfargs+=( "${sapi_conf[@]}" )
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+ econf "${myeconfargs[@]}"
+ popd > /dev/null || die
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || \
+ die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi" || die
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs
+
+ local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir "/usr/share/php${PHP_MV}"
+
+ local sapi="", file=""
+ local sapi_list=""
+
+ for sapi in ${SAPIS}; do
+ if use "${sapi}" ; then
+ einfo "Installing SAPI: ${sapi}"
+ cd "${WORKDIR}/sapis-build/${sapi}" || die
+
+ if [[ "${sapi}" == "apache2" ]] ; then
+ # We're specifically not using emake install-sapi as libtool
+ # may cause unnecessary relink failures (see bug #351266)
+ insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
+ newins ".libs/libphp${PHP_MV}$(get_libname)" \
+ "libphp${PHP_MV}$(get_libname)"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ local dest="${PHP_DESTDIR#${EPREFIX}}"
+ into "${dest}"
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ fpm)
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+ source="libs/libphp${PHP_MV}$(get_libname)"
+ ;;
+ phpdbg)
+ source="sapi/phpdbg/phpdbg"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}"
+ else
+ dobin "${source}"
+ local name="$(basename ${source})"
+ dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
+ fi
+ fi
+
+ php_install_ini "${sapi}"
+
+ # construct correct SAPI string for php-config
+ # thanks to ferringb for the bash voodoo
+ if [[ "${sapi}" == "apache2" ]]; then
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ else
+ sapi_list="${sapi_list:+${sapi_list} }${sapi}"
+ fi
+ fi
+ done
+
+ # Installing opcache module
+ if use opcache ; then
+ into "${PHP_DESTDIR#${EPREFIX}}"
+ dolib.so "modules/opcache$(get_libname)"
+ fi
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+ sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
+
+ if use fpm ; then
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/php-fpm_at.service" \
+ "php-fpm@${SLOT}.service"
+ else
+ systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
+ "php-fpm@${SLOT}.service"
+ fi
+ fi
+}
+
+src_test() {
+ echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
+ if [[ ! -x "${PHP_BIN}" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
+ export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
+ fi
+
+ REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
+ "session.save_path=${T}" \
+ "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
+ "session.save_path=${T}"
+
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
+ done
+
+ local failed="$(find -name '*.out')"
+ if [[ ${failed} != "" ]] ; then
+ ewarn "The following test cases failed unexpectedly:"
+ for name in ${failed}; do
+ ewarn " ${name/.out/}"
+ done
+ else
+ einfo "No unexpected test failures, all fine"
+ fi
+
+ if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
+ local passed=""
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ [[ -f "${name}.diff" ]] && continue
+ passed="${passed} ${name}"
+ done
+ if [[ ${passed} != "" ]] ; then
+ einfo "The following test cases passed unexpectedly:"
+ for name in ${passed}; do
+ ewarn " ${passed}"
+ done
+ else
+ einfo "None of the known-to-fail tests passed, all fine"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ elog
+ elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
+ elog "your apache2 command. OpenRC users can append that string to"
+ elog "APACHE2_OPTS in /etc/conf.d/apache2."
+ elog
+ elog "The apache module configuration file 70_mod_php.conf is"
+ elog "provided (and maintained) by eselect-php."
+ elog
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT} || die
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ # Remove dead symlinks for SAPIs that were just disabled. For
+ # example, if the user has the cgi SAPI enabled, then he has an
+ # eselect-php symlink for it. If he later reinstalls PHP with
+ # USE="-cgi", that symlink will break. This call to eselect is
+ # supposed to remove that dead link per bug 572436.
+ eselect php cleanup || die
+
+ if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
+ elog "To build extensions for this version of PHP, you will need to"
+ elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
+ elog
+ fi
+
+ # Warn about the removal of PHP_INI_VERSION if the user has it set.
+ if [[ -n "${PHP_INI_VERSION}" ]]; then
+ ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
+ ewarn 'remove it from your configuration at your convenience. See'
+ ewarn
+ ewarn ' https://bugs.gentoo.org/611214'
+ ewarn
+ ewarn 'for more information.'
+ fi
+
+ elog "For details on how version slotting works, please see"
+ elog "the wiki:"
+ elog
+ elog " https://wiki.gentoo.org/wiki/PHP"
+ elog
+}
+
+pkg_postrm() {
+ # This serves two purposes. First, if we have just removed the last
+ # installed version of PHP, then this will remove any dead symlinks
+ # belonging to eselect-php. Second, if a user upgrades slots from
+ # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
+ # his existing symlinks to point to the new 7.0 installation. The
+ # latter is bug 432962.
+ #
+ # Note: the eselect-php package may not be installed at this point,
+ # so we can't die() if this command fails.
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-7.1.10.ebuild b/dev-lang/php/php-7.1.10.ebuild
new file mode 100644
index 000000000000..054f5bdb63e5
--- /dev/null
+++ b/dev-lang/php/php-7.1.10.ebuild
@@ -0,0 +1,721 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic versionator systemd
+
+DESCRIPTION="The PHP language runtime engine"
+HOMEPAGE="http://php.net/"
+SRC_URI="http://php.net/distributions/${P}.tar.xz"
+
+LICENSE="PHP-3.01
+ BSD
+ Zend-2.0
+ bcmath? ( LGPL-2.1+ )
+ fpm? ( BSD-2 )
+ gd? ( gd )
+ unicode? ( BSD-2 LGPL-2.1 )"
+
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2 phpdbg"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
+ coverage crypt +ctype curl debug
+ enchant exif +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
+ mhash mssql mysql mysqli nls
+ oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
+ readline recode selinux +session sharedmem
+ +simplexml snmp soap sockets spell sqlite ssl
+ sysvipc systemd test tidy +tokenizer truetype unicode wddx webp
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
+
+# The supported (that is, autodetected) versions of BDB are listed in
+# the ./configure script. Other versions *work*, but we need to stick to
+# the ones that can be detected to avoid a repeat of bug #564824.
+COMMON_DEPEND="
+ >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ acl? ( sys-apps/acl )
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( || ( sys-libs/db:5.3
+ sys-libs/db:5.1
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5 ) )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ coverage? ( dev-util/lcov )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( dev-libs/gmp:0 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[kerberos=,ssl=] )
+ intl? ( dev-libs/icu:= )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql:* )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline:0= )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
+ truetype? ( =media-libs/freetype-2* )
+ unicode? ( dev-libs/oniguruma:= )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ webp? ( media-libs/libwebp )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? ( x11-libs/libXpm )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ virtual/mta
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+# Bison isn't actually needed when building from a release tarball
+# However, the configure script will warn if it's absent or if you
+# have an incompatible version installed. See bug 593278.
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ >=sys-devel/bison-3.0.1"
+
+# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
+REQUIRED_USE="
+ || ( cli cgi fpm apache2 embed phpdbg )
+ cli? ( ^^ ( readline libedit ) )
+ truetype? ( gd )
+ webp? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysqli !mysql )
+ sharedmem? ( !threads )
+ mysql? ( || ( mysqli pdo ) )
+"
+
+PHP_MV="$(get_major_version)"
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ # Always install the production INI file, bug 611214.
+ local phpinisrc="php.ini-production-${phpsapi}"
+ cp php.ini-production "${phpinisrc}" || die
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
+ -i "${phpinisrc}" || die
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" php.ini
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ if use opcache; then
+ elog "Adding opcache to $PHP_EXT_INI_DIR"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
+ "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
+ dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
+ "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
+ fi
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "fpm" ]] ; then
+ einfo "Installing FPM config files php-fpm.conf and www.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ doins sapi/fpm/php-fpm.conf
+ insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
+ doins sapi/fpm/www.conf
+ fi
+
+ dodoc php.ini-{development,production}
+}
+
+php_set_ini_dir() {
+ PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
+
+src_prepare() {
+ default
+
+ # In php-7.x, the FPM pool configuration files have been split off
+ # of the main config. By default the pool config files go in
+ # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
+ # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
+ # we'll install the pool configuration file "www.conf" there.
+ php_set_ini_dir fpm
+ sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
+ sapi/fpm/php-fpm.conf.in \
+ || die 'failed to move the include directory in php-fpm.conf'
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
+ # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
+ local our_conf=(
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}/man"
+ --infodir="${PHP_DESTDIR}/info"
+ --libdir="${PHP_DESTDIR}/lib"
+ --with-libdir="$(get_libdir)"
+ --localstatedir="${EPREFIX}/var"
+ --without-pear
+ $(use_enable threads maintainer-zts)
+ )
+
+ our_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_enable bcmath bcmath)
+ $(use_with bzip2 bz2 "${EPREFIX}/usr")
+ $(use_enable calendar calendar)
+ $(use_enable coverage gcov)
+ $(use_enable ctype ctype)
+ $(use_with curl curl "${EPREFIX}/usr")
+ $(use_enable xml dom)
+ $(use_with enchant enchant "${EPREFIX}/usr")
+ $(use_enable exif exif)
+ $(use_enable fileinfo fileinfo)
+ $(use_enable filter filter)
+ $(use_enable ftp ftp)
+ $(use_with nls gettext "${EPREFIX}/usr")
+ $(use_with gmp gmp "${EPREFIX}/usr")
+ $(use_enable hash hash)
+ $(use_with mhash mhash "${EPREFIX}/usr")
+ $(use_with iconv iconv \
+ $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}/usr"))
+ $(use_enable intl intl)
+ $(use_enable ipv6 ipv6)
+ $(use_enable json json)
+ $(use_with kerberos kerberos "${EPREFIX}/usr")
+ $(use_enable xml libxml)
+ $(use_with xml libxml-dir "${EPREFIX}/usr")
+ $(use_enable unicode mbstring)
+ $(use_with crypt mcrypt "${EPREFIX}/usr")
+ $(use_with unicode onig "${EPREFIX}/usr")
+ $(use_with ssl openssl "${EPREFIX}/usr")
+ $(use_with ssl openssl-dir "${EPREFIX}/usr")
+ $(use_enable pcntl pcntl)
+ $(use_enable phar phar)
+ $(use_enable pdo pdo)
+ $(use_enable opcache opcache)
+ $(use_with postgres pgsql "${EPREFIX}/usr")
+ $(use_enable posix posix)
+ $(use_with spell pspell "${EPREFIX}/usr")
+ $(use_with recode recode "${EPREFIX}/usr")
+ $(use_enable simplexml simplexml)
+ $(use_enable sharedmem shmop)
+ $(use_with snmp snmp "${EPREFIX}/usr")
+ $(use_enable soap soap)
+ $(use_enable sockets sockets)
+ $(use_with sqlite sqlite3 "${EPREFIX}/usr")
+ $(use_enable sysvipc sysvmsg)
+ $(use_enable sysvipc sysvsem)
+ $(use_enable sysvipc sysvshm)
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}/usr")
+ $(use_enable tokenizer tokenizer)
+ $(use_enable wddx wddx)
+ $(use_enable xml xml)
+ $(use_enable xmlreader xmlreader)
+ $(use_enable xmlwriter xmlwriter)
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}/usr")
+ $(use_enable zip zip)
+ $(use_with zlib zlib "${EPREFIX}/usr")
+ $(use_enable debug debug)
+ )
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ our_conf+=( "--enable-dba${shared}" )
+ fi
+
+ # DBA drivers support
+ our_conf+=(
+ $(use_with cdb cdb)
+ $(use_with berkdb db4 "${EPREFIX}/usr")
+ $(use_enable flatfile flatfile)
+ $(use_with gdbm gdbm "${EPREFIX}/usr")
+ $(use_enable inifile inifile)
+ $(use_with qdbm qdbm "${EPREFIX}/usr")
+ )
+
+ # Support for the GD graphics library
+ our_conf+=(
+ $(use_with truetype freetype-dir "${EPREFIX}/usr")
+ $(use_enable cjk gd-jis-conv)
+ $(use_with gd jpeg-dir "${EPREFIX}/usr")
+ $(use_with gd png-dir "${EPREFIX}/usr")
+ $(use_with xpm xpm-dir "${EPREFIX}/usr")
+ )
+ if use webp; then
+ our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
+ fi
+ # enable gd last, so configure can pick up the previous settings
+ our_conf+=( $(use_with gd gd) )
+
+ # IMAP support
+ if use imap ; then
+ our_conf+=(
+ $(use_with imap imap "${EPREFIX}/usr")
+ $(use_with ssl imap-ssl "${EPREFIX}/usr")
+ )
+ fi
+
+ # Interbase/firebird support
+ our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
+
+ # LDAP support
+ if use ldap ; then
+ our_conf+=(
+ $(use_with ldap ldap "${EPREFIX}/usr")
+ $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
+ )
+ fi
+
+ # MySQL support
+ local mysqllib="mysqlnd"
+ local mysqlilib="mysqlnd"
+
+ our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
+
+ local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ if use mysql || use mysqli ; then
+ our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
+ fi
+
+ # ODBC support
+ our_conf+=(
+ $(use_with odbc unixODBC "${EPREFIX}/usr")
+ $(use_with iodbc iodbc "${EPREFIX}/usr")
+ )
+
+ # Oracle support
+ our_conf+=( $(use_with oci8-instant-client oci8) )
+
+ # PDO support
+ if use pdo ; then
+ our_conf+=(
+ $(use_with mssql pdo-dblib "${EPREFIX}/usr")
+ $(use_with mysql pdo-mysql "${mysqllib}")
+ $(use_with postgres pdo-pgsql)
+ $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
+ $(use_with firebird pdo-firebird "${EPREFIX}/usr")
+ $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
+ $(use_with oci8-instant-client pdo-oci)
+ )
+ fi
+
+ # readline/libedit support
+ our_conf+=(
+ $(use_with readline readline "${EPREFIX}/usr")
+ $(use_with libedit libedit "${EPREFIX}/usr")
+ )
+
+ # Session support
+ if use session ; then
+ our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
+ else
+ our_conf+=( $(use_enable session session) )
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ our_conf+=( --with-pic )
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ our_conf+=(
+ --with-pcre-regex="${EPREFIX}/usr"
+ --with-pcre-dir="${EPREFIX}/usr"
+ )
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # Cache the ./configure test results between SAPIs.
+ our_conf+=( --cache-file="${T}/config.cache" )
+
+ # Support user-passed configuration parameters
+ our_conf+=( ${EXTRA_ECONF:-} )
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ mkdir -p "${WORKDIR}/sapis-build" || die
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ # The BUILD_DIR variable is used to determine where to output
+ # the files that autotools creates. This was all originally
+ # based on the autotools-utils eclass.
+ BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
+ cp -a "${S}" "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local sapi_conf=(
+ --with-config-file-path="${PHP_INI_DIR}"
+ --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
+ )
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm|phpdbg)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( "--enable-${sapi}" )
+ else
+ sapi_conf+=( "--disable-${sapi}" )
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
+ else
+ sapi_conf+=( --without-apxs2 )
+ fi
+ ;;
+ esac
+ done
+
+ # Construct the $myeconfargs array by concatenating $our_conf
+ # (the common args) and $sapi_conf (the SAPI-specific args).
+ local myeconfargs=( "${our_conf[@]}" )
+ myeconfargs+=( "${sapi_conf[@]}" )
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+ econf "${myeconfargs[@]}"
+ popd > /dev/null || die
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || \
+ die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi" || die
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs
+
+ local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir "/usr/share/php${PHP_MV}"
+
+ local sapi="", file=""
+ local sapi_list=""
+
+ for sapi in ${SAPIS}; do
+ if use "${sapi}" ; then
+ einfo "Installing SAPI: ${sapi}"
+ cd "${WORKDIR}/sapis-build/${sapi}" || die
+
+ if [[ "${sapi}" == "apache2" ]] ; then
+ # We're specifically not using emake install-sapi as libtool
+ # may cause unnecessary relink failures (see bug #351266)
+ insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
+ newins ".libs/libphp${PHP_MV}$(get_libname)" \
+ "libphp${PHP_MV}$(get_libname)"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ local dest="${PHP_DESTDIR#${EPREFIX}}"
+ into "${dest}"
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ fpm)
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+ source="libs/libphp${PHP_MV}$(get_libname)"
+ ;;
+ phpdbg)
+ source="sapi/phpdbg/phpdbg"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}"
+ else
+ dobin "${source}"
+ local name="$(basename ${source})"
+ dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
+ fi
+ fi
+
+ php_install_ini "${sapi}"
+
+ # construct correct SAPI string for php-config
+ # thanks to ferringb for the bash voodoo
+ if [[ "${sapi}" == "apache2" ]]; then
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ else
+ sapi_list="${sapi_list:+${sapi_list} }${sapi}"
+ fi
+ fi
+ done
+
+ # Installing opcache module
+ if use opcache ; then
+ into "${PHP_DESTDIR#${EPREFIX}}"
+ dolib.so "modules/opcache$(get_libname)"
+ fi
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+ sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
+
+ if use fpm ; then
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/php-fpm_at.service" \
+ "php-fpm@${SLOT}.service"
+ else
+ systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
+ "php-fpm@${SLOT}.service"
+ fi
+ fi
+}
+
+src_test() {
+ echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
+ if [[ ! -x "${PHP_BIN}" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
+ export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
+ fi
+
+ REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
+ "session.save_path=${T}" \
+ "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
+ "session.save_path=${T}"
+
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
+ done
+
+ local failed="$(find -name '*.out')"
+ if [[ ${failed} != "" ]] ; then
+ ewarn "The following test cases failed unexpectedly:"
+ for name in ${failed}; do
+ ewarn " ${name/.out/}"
+ done
+ else
+ einfo "No unexpected test failures, all fine"
+ fi
+
+ if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
+ local passed=""
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ [[ -f "${name}.diff" ]] && continue
+ passed="${passed} ${name}"
+ done
+ if [[ ${passed} != "" ]] ; then
+ einfo "The following test cases passed unexpectedly:"
+ for name in ${passed}; do
+ ewarn " ${passed}"
+ done
+ else
+ einfo "None of the known-to-fail tests passed, all fine"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ elog
+ elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
+ elog "your apache2 command. OpenRC users can append that string to"
+ elog "APACHE2_OPTS in /etc/conf.d/apache2."
+ elog
+ elog "The apache module configuration file 70_mod_php.conf is"
+ elog "provided (and maintained) by eselect-php."
+ elog
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT} || die
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ # Remove dead symlinks for SAPIs that were just disabled. For
+ # example, if the user has the cgi SAPI enabled, then he has an
+ # eselect-php symlink for it. If he later reinstalls PHP with
+ # USE="-cgi", that symlink will break. This call to eselect is
+ # supposed to remove that dead link per bug 572436.
+ eselect php cleanup || die
+
+ if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
+ elog "To build extensions for this version of PHP, you will need to"
+ elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
+ elog
+ fi
+
+ # Warn about the removal of PHP_INI_VERSION if the user has it set.
+ if [[ -n "${PHP_INI_VERSION}" ]]; then
+ ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
+ ewarn 'remove it from your configuration at your convenience. See'
+ ewarn
+ ewarn ' https://bugs.gentoo.org/611214'
+ ewarn
+ ewarn 'for more information.'
+ fi
+
+ elog "For details on how version slotting works, please see"
+ elog "the wiki:"
+ elog
+ elog " https://wiki.gentoo.org/wiki/PHP"
+ elog
+}
+
+pkg_postrm() {
+ # This serves two purposes. First, if we have just removed the last
+ # installed version of PHP, then this will remove any dead symlinks
+ # belonging to eselect-php. Second, if a user upgrades slots from
+ # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
+ # his existing symlinks to point to the new 7.0 installation. The
+ # latter is bug 432962.
+ #
+ # Note: the eselect-php package may not be installed at this point,
+ # so we can't die() if this command fails.
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-7.1.9.ebuild b/dev-lang/php/php-7.1.9.ebuild
new file mode 100644
index 000000000000..054f5bdb63e5
--- /dev/null
+++ b/dev-lang/php/php-7.1.9.ebuild
@@ -0,0 +1,721 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic versionator systemd
+
+DESCRIPTION="The PHP language runtime engine"
+HOMEPAGE="http://php.net/"
+SRC_URI="http://php.net/distributions/${P}.tar.xz"
+
+LICENSE="PHP-3.01
+ BSD
+ Zend-2.0
+ bcmath? ( LGPL-2.1+ )
+ fpm? ( BSD-2 )
+ gd? ( gd )
+ unicode? ( BSD-2 LGPL-2.1 )"
+
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2 phpdbg"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk
+ coverage crypt +ctype curl debug
+ enchant exif +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl
+ mhash mssql mysql mysqli nls
+ oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
+ readline recode selinux +session sharedmem
+ +simplexml snmp soap sockets spell sqlite ssl
+ sysvipc systemd test tidy +tokenizer truetype unicode wddx webp
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib"
+
+# The supported (that is, autodetected) versions of BDB are listed in
+# the ./configure script. Other versions *work*, but we need to stick to
+# the ones that can be detected to avoid a repeat of bug #564824.
+COMMON_DEPEND="
+ >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ acl? ( sys-apps/acl )
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ berkdb? ( || ( sys-libs/db:5.3
+ sys-libs/db:5.1
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5 ) )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ coverage? ( dev-util/lcov )
+ crypt? ( >=dev-libs/libmcrypt-2.4 )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( dev-libs/gmp:0 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[kerberos=,ssl=] )
+ intl? ( dev-libs/icu:= )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ mssql? ( dev-db/freetds[mssql] )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql:* )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline:0= )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
+ truetype? ( =media-libs/freetype-2* )
+ unicode? ( dev-libs/oniguruma:= )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ webp? ( media-libs/libwebp )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? ( x11-libs/libXpm )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zlib? ( sys-libs/zlib )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ virtual/mta
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+# Bison isn't actually needed when building from a release tarball
+# However, the configure script will warn if it's absent or if you
+# have an incompatible version installed. See bug 593278.
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ >=sys-devel/bison-3.0.1"
+
+# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
+REQUIRED_USE="
+ || ( cli cgi fpm apache2 embed phpdbg )
+ cli? ( ^^ ( readline libedit ) )
+ truetype? ( gd )
+ webp? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysqli !mysql )
+ sharedmem? ( !threads )
+ mysql? ( || ( mysqli pdo ) )
+"
+
+PHP_MV="$(get_major_version)"
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ # Always install the production INI file, bug 611214.
+ local phpinisrc="php.ini-production-${phpsapi}"
+ cp php.ini-production "${phpinisrc}" || die
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
+ -i "${phpinisrc}" || die
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" php.ini
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ if use opcache; then
+ elog "Adding opcache to $PHP_EXT_INI_DIR"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
+ "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
+ dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
+ "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
+ fi
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "fpm" ]] ; then
+ einfo "Installing FPM config files php-fpm.conf and www.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ doins sapi/fpm/php-fpm.conf
+ insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
+ doins sapi/fpm/www.conf
+ fi
+
+ dodoc php.ini-{development,production}
+}
+
+php_set_ini_dir() {
+ PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
+
+src_prepare() {
+ default
+
+ # In php-7.x, the FPM pool configuration files have been split off
+ # of the main config. By default the pool config files go in
+ # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
+ # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
+ # we'll install the pool configuration file "www.conf" there.
+ php_set_ini_dir fpm
+ sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
+ sapi/fpm/php-fpm.conf.in \
+ || die 'failed to move the include directory in php-fpm.conf'
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
+ # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
+ local our_conf=(
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}/man"
+ --infodir="${PHP_DESTDIR}/info"
+ --libdir="${PHP_DESTDIR}/lib"
+ --with-libdir="$(get_libdir)"
+ --localstatedir="${EPREFIX}/var"
+ --without-pear
+ $(use_enable threads maintainer-zts)
+ )
+
+ our_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_enable bcmath bcmath)
+ $(use_with bzip2 bz2 "${EPREFIX}/usr")
+ $(use_enable calendar calendar)
+ $(use_enable coverage gcov)
+ $(use_enable ctype ctype)
+ $(use_with curl curl "${EPREFIX}/usr")
+ $(use_enable xml dom)
+ $(use_with enchant enchant "${EPREFIX}/usr")
+ $(use_enable exif exif)
+ $(use_enable fileinfo fileinfo)
+ $(use_enable filter filter)
+ $(use_enable ftp ftp)
+ $(use_with nls gettext "${EPREFIX}/usr")
+ $(use_with gmp gmp "${EPREFIX}/usr")
+ $(use_enable hash hash)
+ $(use_with mhash mhash "${EPREFIX}/usr")
+ $(use_with iconv iconv \
+ $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}/usr"))
+ $(use_enable intl intl)
+ $(use_enable ipv6 ipv6)
+ $(use_enable json json)
+ $(use_with kerberos kerberos "${EPREFIX}/usr")
+ $(use_enable xml libxml)
+ $(use_with xml libxml-dir "${EPREFIX}/usr")
+ $(use_enable unicode mbstring)
+ $(use_with crypt mcrypt "${EPREFIX}/usr")
+ $(use_with unicode onig "${EPREFIX}/usr")
+ $(use_with ssl openssl "${EPREFIX}/usr")
+ $(use_with ssl openssl-dir "${EPREFIX}/usr")
+ $(use_enable pcntl pcntl)
+ $(use_enable phar phar)
+ $(use_enable pdo pdo)
+ $(use_enable opcache opcache)
+ $(use_with postgres pgsql "${EPREFIX}/usr")
+ $(use_enable posix posix)
+ $(use_with spell pspell "${EPREFIX}/usr")
+ $(use_with recode recode "${EPREFIX}/usr")
+ $(use_enable simplexml simplexml)
+ $(use_enable sharedmem shmop)
+ $(use_with snmp snmp "${EPREFIX}/usr")
+ $(use_enable soap soap)
+ $(use_enable sockets sockets)
+ $(use_with sqlite sqlite3 "${EPREFIX}/usr")
+ $(use_enable sysvipc sysvmsg)
+ $(use_enable sysvipc sysvsem)
+ $(use_enable sysvipc sysvshm)
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}/usr")
+ $(use_enable tokenizer tokenizer)
+ $(use_enable wddx wddx)
+ $(use_enable xml xml)
+ $(use_enable xmlreader xmlreader)
+ $(use_enable xmlwriter xmlwriter)
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}/usr")
+ $(use_enable zip zip)
+ $(use_with zlib zlib "${EPREFIX}/usr")
+ $(use_enable debug debug)
+ )
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm ; then
+ our_conf+=( "--enable-dba${shared}" )
+ fi
+
+ # DBA drivers support
+ our_conf+=(
+ $(use_with cdb cdb)
+ $(use_with berkdb db4 "${EPREFIX}/usr")
+ $(use_enable flatfile flatfile)
+ $(use_with gdbm gdbm "${EPREFIX}/usr")
+ $(use_enable inifile inifile)
+ $(use_with qdbm qdbm "${EPREFIX}/usr")
+ )
+
+ # Support for the GD graphics library
+ our_conf+=(
+ $(use_with truetype freetype-dir "${EPREFIX}/usr")
+ $(use_enable cjk gd-jis-conv)
+ $(use_with gd jpeg-dir "${EPREFIX}/usr")
+ $(use_with gd png-dir "${EPREFIX}/usr")
+ $(use_with xpm xpm-dir "${EPREFIX}/usr")
+ )
+ if use webp; then
+ our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
+ fi
+ # enable gd last, so configure can pick up the previous settings
+ our_conf+=( $(use_with gd gd) )
+
+ # IMAP support
+ if use imap ; then
+ our_conf+=(
+ $(use_with imap imap "${EPREFIX}/usr")
+ $(use_with ssl imap-ssl "${EPREFIX}/usr")
+ )
+ fi
+
+ # Interbase/firebird support
+ our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
+
+ # LDAP support
+ if use ldap ; then
+ our_conf+=(
+ $(use_with ldap ldap "${EPREFIX}/usr")
+ $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
+ )
+ fi
+
+ # MySQL support
+ local mysqllib="mysqlnd"
+ local mysqlilib="mysqlnd"
+
+ our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
+
+ local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ if use mysql || use mysqli ; then
+ our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
+ fi
+
+ # ODBC support
+ our_conf+=(
+ $(use_with odbc unixODBC "${EPREFIX}/usr")
+ $(use_with iodbc iodbc "${EPREFIX}/usr")
+ )
+
+ # Oracle support
+ our_conf+=( $(use_with oci8-instant-client oci8) )
+
+ # PDO support
+ if use pdo ; then
+ our_conf+=(
+ $(use_with mssql pdo-dblib "${EPREFIX}/usr")
+ $(use_with mysql pdo-mysql "${mysqllib}")
+ $(use_with postgres pdo-pgsql)
+ $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
+ $(use_with firebird pdo-firebird "${EPREFIX}/usr")
+ $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
+ $(use_with oci8-instant-client pdo-oci)
+ )
+ fi
+
+ # readline/libedit support
+ our_conf+=(
+ $(use_with readline readline "${EPREFIX}/usr")
+ $(use_with libedit libedit "${EPREFIX}/usr")
+ )
+
+ # Session support
+ if use session ; then
+ our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
+ else
+ our_conf+=( $(use_enable session session) )
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ our_conf+=( --with-pic )
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ our_conf+=(
+ --with-pcre-regex="${EPREFIX}/usr"
+ --with-pcre-dir="${EPREFIX}/usr"
+ )
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # Cache the ./configure test results between SAPIs.
+ our_conf+=( --cache-file="${T}/config.cache" )
+
+ # Support user-passed configuration parameters
+ our_conf+=( ${EXTRA_ECONF:-} )
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ mkdir -p "${WORKDIR}/sapis-build" || die
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ # The BUILD_DIR variable is used to determine where to output
+ # the files that autotools creates. This was all originally
+ # based on the autotools-utils eclass.
+ BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
+ cp -a "${S}" "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local sapi_conf=(
+ --with-config-file-path="${PHP_INI_DIR}"
+ --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
+ )
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm|phpdbg)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( "--enable-${sapi}" )
+ else
+ sapi_conf+=( "--disable-${sapi}" )
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
+ else
+ sapi_conf+=( --without-apxs2 )
+ fi
+ ;;
+ esac
+ done
+
+ # Construct the $myeconfargs array by concatenating $our_conf
+ # (the common args) and $sapi_conf (the SAPI-specific args).
+ local myeconfargs=( "${our_conf[@]}" )
+ myeconfargs+=( "${sapi_conf[@]}" )
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+ econf "${myeconfargs[@]}"
+ popd > /dev/null || die
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || \
+ die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi" || die
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs
+
+ local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir "/usr/share/php${PHP_MV}"
+
+ local sapi="", file=""
+ local sapi_list=""
+
+ for sapi in ${SAPIS}; do
+ if use "${sapi}" ; then
+ einfo "Installing SAPI: ${sapi}"
+ cd "${WORKDIR}/sapis-build/${sapi}" || die
+
+ if [[ "${sapi}" == "apache2" ]] ; then
+ # We're specifically not using emake install-sapi as libtool
+ # may cause unnecessary relink failures (see bug #351266)
+ insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
+ newins ".libs/libphp${PHP_MV}$(get_libname)" \
+ "libphp${PHP_MV}$(get_libname)"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ local dest="${PHP_DESTDIR#${EPREFIX}}"
+ into "${dest}"
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ fpm)
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+ source="libs/libphp${PHP_MV}$(get_libname)"
+ ;;
+ phpdbg)
+ source="sapi/phpdbg/phpdbg"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}"
+ else
+ dobin "${source}"
+ local name="$(basename ${source})"
+ dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
+ fi
+ fi
+
+ php_install_ini "${sapi}"
+
+ # construct correct SAPI string for php-config
+ # thanks to ferringb for the bash voodoo
+ if [[ "${sapi}" == "apache2" ]]; then
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ else
+ sapi_list="${sapi_list:+${sapi_list} }${sapi}"
+ fi
+ fi
+ done
+
+ # Installing opcache module
+ if use opcache ; then
+ into "${PHP_DESTDIR#${EPREFIX}}"
+ dolib.so "modules/opcache$(get_libname)"
+ fi
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+ sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
+
+ if use fpm ; then
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/php-fpm_at.service" \
+ "php-fpm@${SLOT}.service"
+ else
+ systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
+ "php-fpm@${SLOT}.service"
+ fi
+ fi
+}
+
+src_test() {
+ echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
+ if [[ ! -x "${PHP_BIN}" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
+ export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
+ fi
+
+ REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
+ "session.save_path=${T}" \
+ "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
+ "session.save_path=${T}"
+
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
+ done
+
+ local failed="$(find -name '*.out')"
+ if [[ ${failed} != "" ]] ; then
+ ewarn "The following test cases failed unexpectedly:"
+ for name in ${failed}; do
+ ewarn " ${name/.out/}"
+ done
+ else
+ einfo "No unexpected test failures, all fine"
+ fi
+
+ if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
+ local passed=""
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ [[ -f "${name}.diff" ]] && continue
+ passed="${passed} ${name}"
+ done
+ if [[ ${passed} != "" ]] ; then
+ einfo "The following test cases passed unexpectedly:"
+ for name in ${passed}; do
+ ewarn " ${passed}"
+ done
+ else
+ einfo "None of the known-to-fail tests passed, all fine"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ elog
+ elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
+ elog "your apache2 command. OpenRC users can append that string to"
+ elog "APACHE2_OPTS in /etc/conf.d/apache2."
+ elog
+ elog "The apache module configuration file 70_mod_php.conf is"
+ elog "provided (and maintained) by eselect-php."
+ elog
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT} || die
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ # Remove dead symlinks for SAPIs that were just disabled. For
+ # example, if the user has the cgi SAPI enabled, then he has an
+ # eselect-php symlink for it. If he later reinstalls PHP with
+ # USE="-cgi", that symlink will break. This call to eselect is
+ # supposed to remove that dead link per bug 572436.
+ eselect php cleanup || die
+
+ if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
+ elog "To build extensions for this version of PHP, you will need to"
+ elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
+ elog
+ fi
+
+ # Warn about the removal of PHP_INI_VERSION if the user has it set.
+ if [[ -n "${PHP_INI_VERSION}" ]]; then
+ ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
+ ewarn 'remove it from your configuration at your convenience. See'
+ ewarn
+ ewarn ' https://bugs.gentoo.org/611214'
+ ewarn
+ ewarn 'for more information.'
+ fi
+
+ elog "For details on how version slotting works, please see"
+ elog "the wiki:"
+ elog
+ elog " https://wiki.gentoo.org/wiki/PHP"
+ elog
+}
+
+pkg_postrm() {
+ # This serves two purposes. First, if we have just removed the last
+ # installed version of PHP, then this will remove any dead symlinks
+ # belonging to eselect-php. Second, if a user upgrades slots from
+ # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
+ # his existing symlinks to point to the new 7.0 installation. The
+ # latter is bug 432962.
+ #
+ # Note: the eselect-php package may not be installed at this point,
+ # so we can't die() if this command fails.
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-7.2.0_rc2.ebuild b/dev-lang/php/php-7.2.0_rc2.ebuild
new file mode 100644
index 000000000000..a71b39c0e0b1
--- /dev/null
+++ b/dev-lang/php/php-7.2.0_rc2.ebuild
@@ -0,0 +1,734 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic versionator systemd
+
+DESCRIPTION="The PHP language runtime engine"
+HOMEPAGE="http://php.net/"
+SRC_URI="https://downloads.php.net/~pollita/php-7.2.0RC2.tar.xz"
+
+LICENSE="PHP-3.01
+ BSD
+ Zend-2.0
+ bcmath? ( LGPL-2.1+ )
+ fpm? ( BSD-2 )
+ gd? ( gd )
+ unicode? ( BSD-2 LGPL-2.1 )"
+
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+S="${WORKDIR}/php-7.2.0RC2"
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2 phpdbg"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
+ coverage +ctype curl debug
+ enchant exif +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
+ mhash mssql mysql mysqli nls
+ oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
+ readline recode selinux +session sharedmem
+ +simplexml snmp soap sockets sodium spell sqlite ssl
+ sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
+
+# The supported (that is, autodetected) versions of BDB are listed in
+# the ./configure script. Other versions *work*, but we need to stick to
+# the ones that can be detected to avoid a repeat of bug #564824.
+COMMON_DEPEND="
+ >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ acl? ( sys-apps/acl )
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ argon2? ( app-crypt/argon2 )
+ berkdb? ( || ( sys-libs/db:5.3
+ sys-libs/db:5.1
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5 ) )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ coverage? ( dev-util/lcov )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( dev-libs/gmp:0 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[kerberos=,ssl=] )
+ intl? ( dev-libs/icu:= )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ lmdb? ( dev-db/lmdb:= )
+ mssql? ( dev-db/freetds[mssql] )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql:* )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline:0= )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ sodium? ( dev-libs/libsodium:= )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
+ tokyocabinet? ( dev-db/tokyocabinet )
+ truetype? ( =media-libs/freetype-2* )
+ unicode? ( dev-libs/oniguruma:= )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ webp? ( media-libs/libwebp )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? ( x11-libs/libXpm )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
+ zlib? ( sys-libs/zlib )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ virtual/mta
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+# Bison isn't actually needed when building from a release tarball
+# However, the configure script will warn if it's absent or if you
+# have an incompatible version installed. See bug 593278.
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ >=sys-devel/bison-3.0.1"
+
+# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
+REQUIRED_USE="
+ || ( cli cgi fpm apache2 embed phpdbg )
+ cli? ( ^^ ( readline libedit ) )
+ truetype? ( gd )
+ webp? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysqli !mysql )
+ sharedmem? ( !threads )
+ mysql? ( || ( mysqli pdo ) )
+ zip-encryption? ( zip )
+"
+
+PHP_MV="$(get_major_version)"
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ # Always install the production INI file, bug 611214.
+ local phpinisrc="php.ini-production-${phpsapi}"
+ cp php.ini-production "${phpinisrc}" || die
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
+ -i "${phpinisrc}" || die
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" php.ini
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ if use opcache; then
+ elog "Adding opcache to $PHP_EXT_INI_DIR"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
+ "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
+ dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
+ "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
+ fi
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "fpm" ]] ; then
+ einfo "Installing FPM config files php-fpm.conf and www.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ doins sapi/fpm/php-fpm.conf
+ insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
+ doins sapi/fpm/www.conf
+ fi
+
+ dodoc php.ini-{development,production}
+}
+
+php_set_ini_dir() {
+ PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
+
+src_prepare() {
+ default
+
+ # In php-7.x, the FPM pool configuration files have been split off
+ # of the main config. By default the pool config files go in
+ # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
+ # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
+ # we'll install the pool configuration file "www.conf" there.
+ php_set_ini_dir fpm
+ sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
+ sapi/fpm/php-fpm.conf.in \
+ || die 'failed to move the include directory in php-fpm.conf'
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
+ # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
+ local our_conf=(
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}/man"
+ --infodir="${PHP_DESTDIR}/info"
+ --libdir="${PHP_DESTDIR}/lib"
+ --with-libdir="$(get_libdir)"
+ --localstatedir="${EPREFIX}/var"
+ --without-pear
+ $(use_enable threads maintainer-zts)
+ )
+
+ our_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with argon2 password-argon2 "${EPREFIX}/usr")
+ $(use_enable bcmath bcmath)
+ $(use_with bzip2 bz2 "${EPREFIX}/usr")
+ $(use_enable calendar calendar)
+ $(use_enable coverage gcov)
+ $(use_enable ctype ctype)
+ $(use_with curl curl "${EPREFIX}/usr")
+ $(use_enable xml dom)
+ $(use_with enchant enchant "${EPREFIX}/usr")
+ $(use_enable exif exif)
+ $(use_enable fileinfo fileinfo)
+ $(use_enable filter filter)
+ $(use_enable ftp ftp)
+ $(use_with nls gettext "${EPREFIX}/usr")
+ $(use_with gmp gmp "${EPREFIX}/usr")
+ $(use_enable hash hash)
+ $(use_with mhash mhash "${EPREFIX}/usr")
+ $(use_with iconv iconv \
+ $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}/usr"))
+ $(use_enable intl intl)
+ $(use_enable ipv6 ipv6)
+ $(use_enable json json)
+ $(use_with kerberos kerberos "${EPREFIX}/usr")
+ $(use_enable xml libxml)
+ $(use_with xml libxml-dir "${EPREFIX}/usr")
+ $(use_enable unicode mbstring)
+ $(use_with unicode onig "${EPREFIX}/usr")
+ $(use_with ssl openssl "${EPREFIX}/usr")
+ $(use_with ssl openssl-dir "${EPREFIX}/usr")
+ $(use_enable pcntl pcntl)
+ $(use_enable phar phar)
+ $(use_enable pdo pdo)
+ $(use_enable opcache opcache)
+ $(use_with postgres pgsql "${EPREFIX}/usr")
+ $(use_enable posix posix)
+ $(use_with spell pspell "${EPREFIX}/usr")
+ $(use_with recode recode "${EPREFIX}/usr")
+ $(use_enable simplexml simplexml)
+ $(use_enable sharedmem shmop)
+ $(use_with snmp snmp "${EPREFIX}/usr")
+ $(use_enable soap soap)
+ $(use_enable sockets sockets)
+ $(use_with sodium sodium "${EPREFIX}/usr")
+ $(use_with sqlite sqlite3 "${EPREFIX}/usr")
+ $(use_enable sysvipc sysvmsg)
+ $(use_enable sysvipc sysvsem)
+ $(use_enable sysvipc sysvshm)
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}/usr")
+ $(use_enable tokenizer tokenizer)
+ $(use_enable wddx wddx)
+ $(use_enable xml xml)
+ $(use_enable xmlreader xmlreader)
+ $(use_enable xmlwriter xmlwriter)
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}/usr")
+ $(use_enable zip zip)
+ $(use_with zip-encryption libzip "${EPREFIX}/usr")
+ $(use_with zlib zlib "${EPREFIX}/usr")
+ $(use_enable debug debug)
+ )
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm || use lmdb || use tokyocabinet ; then
+ our_conf+=( "--enable-dba${shared}" )
+ fi
+
+ # DBA drivers support
+ our_conf+=(
+ $(use_with cdb cdb)
+ $(use_with berkdb db4 "${EPREFIX}/usr")
+ $(use_enable flatfile flatfile)
+ $(use_with gdbm gdbm "${EPREFIX}/usr")
+ $(use_enable inifile inifile)
+ $(use_with qdbm qdbm "${EPREFIX}/usr")
+ $(use_with lmdb lmdb "${EPREFIX}/usr")
+ )
+
+ # Support for the GD graphics library
+ our_conf+=(
+ $(use_with truetype freetype-dir "${EPREFIX}/usr")
+ $(use_enable cjk gd-jis-conv)
+ $(use_with gd jpeg-dir "${EPREFIX}/usr")
+ $(use_with gd png-dir "${EPREFIX}/usr")
+ $(use_with xpm xpm-dir "${EPREFIX}/usr")
+ )
+ if use webp; then
+ our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
+ fi
+ # enable gd last, so configure can pick up the previous settings
+ our_conf+=( $(use_with gd gd) )
+
+ # IMAP support
+ if use imap ; then
+ our_conf+=(
+ $(use_with imap imap "${EPREFIX}/usr")
+ $(use_with ssl imap-ssl "${EPREFIX}/usr")
+ )
+ fi
+
+ # Interbase/firebird support
+ our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
+
+ # LDAP support
+ if use ldap ; then
+ our_conf+=(
+ $(use_with ldap ldap "${EPREFIX}/usr")
+ $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
+ )
+ fi
+
+ # MySQL support
+ local mysqllib="mysqlnd"
+ local mysqlilib="mysqlnd"
+
+ our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
+
+ local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ if use mysql || use mysqli ; then
+ our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
+ fi
+
+ # ODBC support
+ our_conf+=(
+ $(use_with odbc unixODBC "${EPREFIX}/usr")
+ $(use_with iodbc iodbc "${EPREFIX}/usr")
+ )
+
+ # Oracle support
+ our_conf+=( $(use_with oci8-instant-client oci8) )
+
+ # PDO support
+ if use pdo ; then
+ our_conf+=(
+ $(use_with mssql pdo-dblib "${EPREFIX}/usr")
+ $(use_with mysql pdo-mysql "${mysqllib}")
+ $(use_with postgres pdo-pgsql)
+ $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
+ $(use_with firebird pdo-firebird "${EPREFIX}/usr")
+ $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
+ $(use_with oci8-instant-client pdo-oci)
+ )
+ fi
+
+ # readline/libedit support
+ our_conf+=(
+ $(use_with readline readline "${EPREFIX}/usr")
+ $(use_with libedit libedit "${EPREFIX}/usr")
+ )
+
+ # Session support
+ if use session ; then
+ our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
+ else
+ our_conf+=( $(use_enable session session) )
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ our_conf+=( --with-pic )
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ # --with-pcre-valgrind cannot be enabled with system pcre
+ # Many arches don't support pcre-jit
+ our_conf+=(
+ --with-pcre-regex="${EPREFIX}/usr"
+ --with-pcre-dir="${EPREFIX}/usr"
+ --without-pcre-valgrind
+ --without-pcre-jit
+ )
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # Cache the ./configure test results between SAPIs.
+ our_conf+=( --cache-file="${T}/config.cache" )
+
+ # Support user-passed configuration parameters
+ our_conf+=( ${EXTRA_ECONF:-} )
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ mkdir -p "${WORKDIR}/sapis-build" || die
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ # The BUILD_DIR variable is used to determine where to output
+ # the files that autotools creates. This was all originally
+ # based on the autotools-utils eclass.
+ BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
+ cp -a "${S}" "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local sapi_conf=(
+ --with-config-file-path="${PHP_INI_DIR}"
+ --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
+ )
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm|phpdbg)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( "--enable-${sapi}" )
+ else
+ sapi_conf+=( "--disable-${sapi}" )
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
+ else
+ sapi_conf+=( --without-apxs2 )
+ fi
+ ;;
+ esac
+ done
+
+ # Construct the $myeconfargs array by concatenating $our_conf
+ # (the common args) and $sapi_conf (the SAPI-specific args).
+ local myeconfargs=( "${our_conf[@]}" )
+ myeconfargs+=( "${sapi_conf[@]}" )
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+ econf "${myeconfargs[@]}"
+ popd > /dev/null || die
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || \
+ die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi" || die
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs
+
+ local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir "/usr/share/php${PHP_MV}"
+
+ local sapi="", file=""
+ local sapi_list=""
+
+ for sapi in ${SAPIS}; do
+ if use "${sapi}" ; then
+ einfo "Installing SAPI: ${sapi}"
+ cd "${WORKDIR}/sapis-build/${sapi}" || die
+
+ if [[ "${sapi}" == "apache2" ]] ; then
+ # We're specifically not using emake install-sapi as libtool
+ # may cause unnecessary relink failures (see bug #351266)
+ insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
+ newins ".libs/libphp${PHP_MV}$(get_libname)" \
+ "libphp${PHP_MV}$(get_libname)"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ local dest="${PHP_DESTDIR#${EPREFIX}}"
+ into "${dest}"
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ fpm)
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+ source="libs/libphp${PHP_MV}$(get_libname)"
+ ;;
+ phpdbg)
+ source="sapi/phpdbg/phpdbg"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}"
+ else
+ dobin "${source}"
+ local name="$(basename ${source})"
+ dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
+ fi
+ fi
+
+ php_install_ini "${sapi}"
+
+ # construct correct SAPI string for php-config
+ # thanks to ferringb for the bash voodoo
+ if [[ "${sapi}" == "apache2" ]]; then
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ else
+ sapi_list="${sapi_list:+${sapi_list} }${sapi}"
+ fi
+ fi
+ done
+
+ # Installing opcache module
+ if use opcache ; then
+ into "${PHP_DESTDIR#${EPREFIX}}"
+ dolib.so "modules/opcache$(get_libname)"
+ fi
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+ sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
+
+ if use fpm ; then
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/php-fpm_at.service" \
+ "php-fpm@${SLOT}.service"
+ else
+ systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
+ "php-fpm@${SLOT}.service"
+ fi
+ fi
+}
+
+src_test() {
+ echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
+ if [[ ! -x "${PHP_BIN}" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
+ export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
+ fi
+
+ REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
+ "session.save_path=${T}" \
+ "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
+ "session.save_path=${T}"
+
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
+ done
+
+ local failed="$(find -name '*.out')"
+ if [[ ${failed} != "" ]] ; then
+ ewarn "The following test cases failed unexpectedly:"
+ for name in ${failed}; do
+ ewarn " ${name/.out/}"
+ done
+ else
+ einfo "No unexpected test failures, all fine"
+ fi
+
+ if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
+ local passed=""
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ [[ -f "${name}.diff" ]] && continue
+ passed="${passed} ${name}"
+ done
+ if [[ ${passed} != "" ]] ; then
+ einfo "The following test cases passed unexpectedly:"
+ for name in ${passed}; do
+ ewarn " ${passed}"
+ done
+ else
+ einfo "None of the known-to-fail tests passed, all fine"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ elog
+ elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
+ elog "your apache2 command. OpenRC users can append that string to"
+ elog "APACHE2_OPTS in /etc/conf.d/apache2."
+ elog
+ elog "The apache module configuration file 70_mod_php.conf is"
+ elog "provided (and maintained) by eselect-php."
+ elog
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT} || die
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ # Remove dead symlinks for SAPIs that were just disabled. For
+ # example, if the user has the cgi SAPI enabled, then he has an
+ # eselect-php symlink for it. If he later reinstalls PHP with
+ # USE="-cgi", that symlink will break. This call to eselect is
+ # supposed to remove that dead link per bug 572436.
+ eselect php cleanup || die
+
+ if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
+ elog "To build extensions for this version of PHP, you will need to"
+ elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
+ elog
+ fi
+
+ # Warn about the removal of PHP_INI_VERSION if the user has it set.
+ if [[ -n "${PHP_INI_VERSION}" ]]; then
+ ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
+ ewarn 'remove it from your configuration at your convenience. See'
+ ewarn
+ ewarn ' https://bugs.gentoo.org/611214'
+ ewarn
+ ewarn 'for more information.'
+ fi
+
+ elog "For details on how version slotting works, please see"
+ elog "the wiki:"
+ elog
+ elog " https://wiki.gentoo.org/wiki/PHP"
+ elog
+}
+
+pkg_postrm() {
+ # This serves two purposes. First, if we have just removed the last
+ # installed version of PHP, then this will remove any dead symlinks
+ # belonging to eselect-php. Second, if a user upgrades slots from
+ # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
+ # his existing symlinks to point to the new 7.0 installation. The
+ # latter is bug 432962.
+ #
+ # Note: the eselect-php package may not be installed at this point,
+ # so we can't die() if this command fails.
+ eselect php cleanup
+}
diff --git a/dev-lang/php/php-7.2.0_rc3.ebuild b/dev-lang/php/php-7.2.0_rc3.ebuild
new file mode 100644
index 000000000000..6df349856b30
--- /dev/null
+++ b/dev-lang/php/php-7.2.0_rc3.ebuild
@@ -0,0 +1,734 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic versionator systemd
+
+DESCRIPTION="The PHP language runtime engine"
+HOMEPAGE="http://php.net/"
+SRC_URI="https://downloads.php.net/~remi/php-7.2.0RC3.tar.xz"
+
+LICENSE="PHP-3.01
+ BSD
+ Zend-2.0
+ bcmath? ( LGPL-2.1+ )
+ fpm? ( BSD-2 )
+ gd? ( gd )
+ unicode? ( BSD-2 LGPL-2.1 )"
+
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+S="${WORKDIR}/php-7.2.0RC3"
+# We can build the following SAPIs in the given order
+SAPIS="embed cli cgi fpm apache2 phpdbg"
+
+# SAPIs and SAPI-specific USE flags (cli SAPI is default on):
+IUSE="${IUSE}
+ ${SAPIS/cli/+cli}
+ threads"
+
+IUSE="${IUSE} acl argon2 bcmath berkdb bzip2 calendar cdb cjk
+ coverage +ctype curl debug
+ enchant exif +fileinfo +filter firebird
+ flatfile ftp gd gdbm gmp +hash +iconv imap inifile
+ intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl lmdb
+ mhash mssql mysql mysqli nls
+ oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm
+ readline recode selinux +session sharedmem
+ +simplexml snmp soap sockets sodium spell sqlite ssl
+ sysvipc systemd test tidy +tokenizer tokyocabinet truetype unicode wddx webp
+ +xml xmlreader xmlwriter xmlrpc xpm xslt zip zip-encryption zlib"
+
+# The supported (that is, autodetected) versions of BDB are listed in
+# the ./configure script. Other versions *work*, but we need to stick to
+# the ones that can be detected to avoid a repeat of bug #564824.
+COMMON_DEPEND="
+ >=app-eselect/eselect-php-0.9.1[apache2?,fpm?]
+ >=dev-libs/libpcre-8.32[unicode]
+ acl? ( sys-apps/acl )
+ apache2? ( || ( >=www-servers/apache-2.4[apache2_modules_unixd,threads=]
+ <www-servers/apache-2.4[threads=] ) )
+ argon2? ( app-crypt/argon2 )
+ berkdb? ( || ( sys-libs/db:5.3
+ sys-libs/db:5.1
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5 ) )
+ bzip2? ( app-arch/bzip2 )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ coverage? ( dev-util/lcov )
+ curl? ( >=net-misc/curl-7.10.5 )
+ enchant? ( app-text/enchant )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib )
+ gdbm? ( >=sys-libs/gdbm-1.8.0 )
+ gmp? ( dev-libs/gmp:0 )
+ iconv? ( virtual/libiconv )
+ imap? ( virtual/imap-c-client[kerberos=,ssl=] )
+ intl? ( dev-libs/icu:= )
+ iodbc? ( dev-db/libiodbc )
+ kerberos? ( virtual/krb5 )
+ ldap? ( >=net-nds/openldap-1.2.11 )
+ ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 )
+ libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) )
+ lmdb? ( dev-db/lmdb:= )
+ mssql? ( dev-db/freetds[mssql] )
+ nls? ( sys-devel/gettext )
+ oci8-instant-client? ( dev-db/oracle-instantclient-basic )
+ odbc? ( >=dev-db/unixODBC-1.8.13 )
+ postgres? ( dev-db/postgresql:* )
+ qdbm? ( dev-db/qdbm )
+ readline? ( sys-libs/readline:0= )
+ recode? ( app-text/recode )
+ sharedmem? ( dev-libs/mm )
+ simplexml? ( >=dev-libs/libxml2-2.6.8 )
+ snmp? ( >=net-analyzer/net-snmp-5.2 )
+ soap? ( >=dev-libs/libxml2-2.6.8 )
+ sodium? ( dev-libs/libsodium:= )
+ spell? ( >=app-text/aspell-0.50 )
+ sqlite? ( >=dev-db/sqlite-3.7.6.3 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) )
+ tokyocabinet? ( dev-db/tokyocabinet )
+ truetype? ( =media-libs/freetype-2* )
+ unicode? ( dev-libs/oniguruma:= )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ webp? ( media-libs/libwebp )
+ xml? ( >=dev-libs/libxml2-2.6.8 )
+ xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv )
+ xmlreader? ( >=dev-libs/libxml2-2.6.8 )
+ xmlwriter? ( >=dev-libs/libxml2-2.6.8 )
+ xpm? ( x11-libs/libXpm )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib )
+ zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
+ zlib? ( sys-libs/zlib )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ virtual/mta
+ fpm? (
+ selinux? ( sec-policy/selinux-phpfpm )
+ systemd? ( sys-apps/systemd ) )"
+
+# Bison isn't actually needed when building from a release tarball
+# However, the configure script will warn if it's absent or if you
+# have an incompatible version installed. See bug 593278.
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ >=sys-devel/bison-3.0.1"
+
+# Without USE=readline or libedit, the interactive "php -a" CLI will hang.
+REQUIRED_USE="
+ || ( cli cgi fpm apache2 embed phpdbg )
+ cli? ( ^^ ( readline libedit ) )
+ truetype? ( gd )
+ webp? ( gd )
+ cjk? ( gd )
+ exif? ( gd )
+ xpm? ( gd )
+ gd? ( zlib )
+ simplexml? ( xml )
+ soap? ( xml )
+ wddx? ( xml )
+ xmlrpc? ( || ( xml iconv ) )
+ xmlreader? ( xml )
+ xslt? ( xml )
+ ldap-sasl? ( ldap )
+ mhash? ( hash )
+ phar? ( hash )
+ qdbm? ( !gdbm )
+ readline? ( !libedit )
+ recode? ( !imap !mysqli !mysql )
+ sharedmem? ( !threads )
+ mysql? ( || ( mysqli pdo ) )
+ zip-encryption? ( zip )
+"
+
+PHP_MV="$(get_major_version)"
+
+php_install_ini() {
+ local phpsapi="${1}"
+
+ # work out where we are installing the ini file
+ php_set_ini_dir "${phpsapi}"
+
+ # Always install the production INI file, bug 611214.
+ local phpinisrc="php.ini-production-${phpsapi}"
+ cp php.ini-production "${phpinisrc}" || die
+
+ # default to /tmp for save_path, bug #282768
+ sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die
+
+ # Set the extension dir
+ sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \
+ -i "${phpinisrc}" || die
+
+ # Set the include path to point to where we want to find PEAR packages
+ sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die
+
+ dodir "${PHP_INI_DIR#${EPREFIX}}"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ newins "${phpinisrc}" php.ini
+
+ elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}"
+ elog
+
+ dodir "${PHP_EXT_INI_DIR#${EPREFIX}}"
+ dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}"
+
+ if use opcache; then
+ elog "Adding opcache to $PHP_EXT_INI_DIR"
+ echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \
+ "${D}/${PHP_EXT_INI_DIR}"/opcache.ini
+ dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \
+ "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini"
+ fi
+
+ # SAPI-specific handling
+ if [[ "${sapi}" == "fpm" ]] ; then
+ einfo "Installing FPM config files php-fpm.conf and www.conf"
+ insinto "${PHP_INI_DIR#${EPREFIX}}"
+ doins sapi/fpm/php-fpm.conf
+ insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d"
+ doins sapi/fpm/www.conf
+ fi
+
+ dodoc php.ini-{development,production}
+}
+
+php_set_ini_dir() {
+ PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}"
+ PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext"
+ PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active"
+}
+
+src_prepare() {
+ default
+
+ # In php-7.x, the FPM pool configuration files have been split off
+ # of the main config. By default the pool config files go in
+ # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the
+ # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later
+ # we'll install the pool configuration file "www.conf" there.
+ php_set_ini_dir fpm
+ sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \
+ sapi/fpm/php-fpm.conf.in \
+ || die 'failed to move the include directory in php-fpm.conf'
+}
+
+src_configure() {
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}"
+
+ # The php-fpm config file wants localstatedir to be ${EPREFIX}/var
+ # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002.
+ local our_conf=(
+ --prefix="${PHP_DESTDIR}"
+ --mandir="${PHP_DESTDIR}/man"
+ --infodir="${PHP_DESTDIR}/info"
+ --libdir="${PHP_DESTDIR}/lib"
+ --with-libdir="$(get_libdir)"
+ --localstatedir="${EPREFIX}/var"
+ --without-pear
+ $(use_enable threads maintainer-zts)
+ )
+
+ our_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with argon2 password-argon2 "${EPREFIX}/usr")
+ $(use_enable bcmath bcmath)
+ $(use_with bzip2 bz2 "${EPREFIX}/usr")
+ $(use_enable calendar calendar)
+ $(use_enable coverage gcov)
+ $(use_enable ctype ctype)
+ $(use_with curl curl "${EPREFIX}/usr")
+ $(use_enable xml dom)
+ $(use_with enchant enchant "${EPREFIX}/usr")
+ $(use_enable exif exif)
+ $(use_enable fileinfo fileinfo)
+ $(use_enable filter filter)
+ $(use_enable ftp ftp)
+ $(use_with nls gettext "${EPREFIX}/usr")
+ $(use_with gmp gmp "${EPREFIX}/usr")
+ $(use_enable hash hash)
+ $(use_with mhash mhash "${EPREFIX}/usr")
+ $(use_with iconv iconv \
+ $(use elibc_glibc || use elibc_musl || echo "${EPREFIX}/usr"))
+ $(use_enable intl intl)
+ $(use_enable ipv6 ipv6)
+ $(use_enable json json)
+ $(use_with kerberos kerberos "${EPREFIX}/usr")
+ $(use_enable xml libxml)
+ $(use_with xml libxml-dir "${EPREFIX}/usr")
+ $(use_enable unicode mbstring)
+ $(use_with unicode onig "${EPREFIX}/usr")
+ $(use_with ssl openssl "${EPREFIX}/usr")
+ $(use_with ssl openssl-dir "${EPREFIX}/usr")
+ $(use_enable pcntl pcntl)
+ $(use_enable phar phar)
+ $(use_enable pdo pdo)
+ $(use_enable opcache opcache)
+ $(use_with postgres pgsql "${EPREFIX}/usr")
+ $(use_enable posix posix)
+ $(use_with spell pspell "${EPREFIX}/usr")
+ $(use_with recode recode "${EPREFIX}/usr")
+ $(use_enable simplexml simplexml)
+ $(use_enable sharedmem shmop)
+ $(use_with snmp snmp "${EPREFIX}/usr")
+ $(use_enable soap soap)
+ $(use_enable sockets sockets)
+ $(use_with sodium sodium "${EPREFIX}/usr")
+ $(use_with sqlite sqlite3 "${EPREFIX}/usr")
+ $(use_enable sysvipc sysvmsg)
+ $(use_enable sysvipc sysvsem)
+ $(use_enable sysvipc sysvshm)
+ $(use_with systemd fpm-systemd)
+ $(use_with tidy tidy "${EPREFIX}/usr")
+ $(use_enable tokenizer tokenizer)
+ $(use_enable wddx wddx)
+ $(use_enable xml xml)
+ $(use_enable xmlreader xmlreader)
+ $(use_enable xmlwriter xmlwriter)
+ $(use_with xmlrpc xmlrpc)
+ $(use_with xslt xsl "${EPREFIX}/usr")
+ $(use_enable zip zip)
+ $(use_with zip-encryption libzip "${EPREFIX}/usr")
+ $(use_with zlib zlib "${EPREFIX}/usr")
+ $(use_enable debug debug)
+ )
+
+ # DBA support
+ if use cdb || use berkdb || use flatfile || use gdbm || use inifile \
+ || use qdbm || use lmdb || use tokyocabinet ; then
+ our_conf+=( "--enable-dba${shared}" )
+ fi
+
+ # DBA drivers support
+ our_conf+=(
+ $(use_with cdb cdb)
+ $(use_with berkdb db4 "${EPREFIX}/usr")
+ $(use_enable flatfile flatfile)
+ $(use_with gdbm gdbm "${EPREFIX}/usr")
+ $(use_enable inifile inifile)
+ $(use_with qdbm qdbm "${EPREFIX}/usr")
+ $(use_with lmdb lmdb "${EPREFIX}/usr")
+ )
+
+ # Support for the GD graphics library
+ our_conf+=(
+ $(use_with truetype freetype-dir "${EPREFIX}/usr")
+ $(use_enable cjk gd-jis-conv)
+ $(use_with gd jpeg-dir "${EPREFIX}/usr")
+ $(use_with gd png-dir "${EPREFIX}/usr")
+ $(use_with xpm xpm-dir "${EPREFIX}/usr")
+ )
+ if use webp; then
+ our_conf+=( --with-webp-dir="${EPREFIX}/usr" )
+ fi
+ # enable gd last, so configure can pick up the previous settings
+ our_conf+=( $(use_with gd gd) )
+
+ # IMAP support
+ if use imap ; then
+ our_conf+=(
+ $(use_with imap imap "${EPREFIX}/usr")
+ $(use_with ssl imap-ssl "${EPREFIX}/usr")
+ )
+ fi
+
+ # Interbase/firebird support
+ our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") )
+
+ # LDAP support
+ if use ldap ; then
+ our_conf+=(
+ $(use_with ldap ldap "${EPREFIX}/usr")
+ $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr")
+ )
+ fi
+
+ # MySQL support
+ local mysqllib="mysqlnd"
+ local mysqlilib="mysqlnd"
+
+ our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") )
+
+ local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ if use mysql || use mysqli ; then
+ our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") )
+ fi
+
+ # ODBC support
+ our_conf+=(
+ $(use_with odbc unixODBC "${EPREFIX}/usr")
+ $(use_with iodbc iodbc "${EPREFIX}/usr")
+ )
+
+ # Oracle support
+ our_conf+=( $(use_with oci8-instant-client oci8) )
+
+ # PDO support
+ if use pdo ; then
+ our_conf+=(
+ $(use_with mssql pdo-dblib "${EPREFIX}/usr")
+ $(use_with mysql pdo-mysql "${mysqllib}")
+ $(use_with postgres pdo-pgsql)
+ $(use_with sqlite pdo-sqlite "${EPREFIX}/usr")
+ $(use_with firebird pdo-firebird "${EPREFIX}/usr")
+ $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr")
+ $(use_with oci8-instant-client pdo-oci)
+ )
+ fi
+
+ # readline/libedit support
+ our_conf+=(
+ $(use_with readline readline "${EPREFIX}/usr")
+ $(use_with libedit libedit "${EPREFIX}/usr")
+ )
+
+ # Session support
+ if use session ; then
+ our_conf+=( $(use_with sharedmem mm "${EPREFIX}/usr") )
+ else
+ our_conf+=( $(use_enable session session) )
+ fi
+
+ # Use pic for shared modules such as apache2's mod_php
+ our_conf+=( --with-pic )
+
+ # we use the system copy of pcre
+ # --with-pcre-regex affects ext/pcre
+ # --with-pcre-dir affects ext/filter and ext/zip
+ # --with-pcre-valgrind cannot be enabled with system pcre
+ # Many arches don't support pcre-jit
+ our_conf+=(
+ --with-pcre-regex="${EPREFIX}/usr"
+ --with-pcre-dir="${EPREFIX}/usr"
+ --without-pcre-valgrind
+ --without-pcre-jit
+ )
+
+ # Catch CFLAGS problems
+ # Fixes bug #14067.
+ # Changed order to run it in reverse for bug #32022 and #12021.
+ replace-cpu-flags "k6*" "i586"
+
+ # Cache the ./configure test results between SAPIs.
+ our_conf+=( --cache-file="${T}/config.cache" )
+
+ # Support user-passed configuration parameters
+ our_conf+=( ${EXTRA_ECONF:-} )
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+
+ mkdir -p "${WORKDIR}/sapis-build" || die
+ for one_sapi in $SAPIS ; do
+ use "${one_sapi}" || continue
+ php_set_ini_dir "${one_sapi}"
+
+ # The BUILD_DIR variable is used to determine where to output
+ # the files that autotools creates. This was all originally
+ # based on the autotools-utils eclass.
+ BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}"
+ cp -a "${S}" "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local sapi_conf=(
+ --with-config-file-path="${PHP_INI_DIR}"
+ --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}"
+ )
+
+ for sapi in $SAPIS ; do
+ case "$sapi" in
+ cli|cgi|embed|fpm|phpdbg)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( "--enable-${sapi}" )
+ else
+ sapi_conf+=( "--disable-${sapi}" )
+ fi
+ ;;
+
+ apache2)
+ if [[ "${one_sapi}" == "${sapi}" ]] ; then
+ sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" )
+ else
+ sapi_conf+=( --without-apxs2 )
+ fi
+ ;;
+ esac
+ done
+
+ # Construct the $myeconfargs array by concatenating $our_conf
+ # (the common args) and $sapi_conf (the SAPI-specific args).
+ local myeconfargs=( "${our_conf[@]}" )
+ myeconfargs+=( "${sapi_conf[@]}" )
+
+ pushd "${BUILD_DIR}" > /dev/null || die
+ econf "${myeconfargs[@]}"
+ popd > /dev/null || die
+ done
+}
+
+src_compile() {
+ # snmp seems to run during src_compile, too (bug #324739)
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/mib_indexes
+
+ for sapi in ${SAPIS} ; do
+ if use "${sapi}"; then
+ cd "${WORKDIR}/sapis-build/$sapi" || \
+ die "Failed to change dir to ${WORKDIR}/sapis-build/$1"
+ emake
+ fi
+ done
+}
+
+src_install() {
+ # see bug #324739 for what happens when we don't have that
+ addpredict /usr/share/snmp/mibs/.index
+
+ # grab the first SAPI that got built and install common files from there
+ local first_sapi=""
+ for sapi in $SAPIS ; do
+ if use $sapi ; then
+ first_sapi=$sapi
+ break
+ fi
+ done
+
+ # Makefile forgets to create this before trying to write to it...
+ dodir "${PHP_DESTDIR#${EPREFIX}}/bin"
+
+ # Install php environment (without any sapis)
+ cd "${WORKDIR}/sapis-build/$first_sapi" || die
+ emake INSTALL_ROOT="${D}" \
+ install-build install-headers install-programs
+
+ local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)"
+
+ # Create the directory where we'll put version-specific php scripts
+ keepdir "/usr/share/php${PHP_MV}"
+
+ local sapi="", file=""
+ local sapi_list=""
+
+ for sapi in ${SAPIS}; do
+ if use "${sapi}" ; then
+ einfo "Installing SAPI: ${sapi}"
+ cd "${WORKDIR}/sapis-build/${sapi}" || die
+
+ if [[ "${sapi}" == "apache2" ]] ; then
+ # We're specifically not using emake install-sapi as libtool
+ # may cause unnecessary relink failures (see bug #351266)
+ insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/"
+ newins ".libs/libphp${PHP_MV}$(get_libname)" \
+ "libphp${PHP_MV}$(get_libname)"
+ keepdir "/usr/$(get_libdir)/apache2/modules"
+ else
+ # needed each time, php_install_ini would reset it
+ local dest="${PHP_DESTDIR#${EPREFIX}}"
+ into "${dest}"
+ case "$sapi" in
+ cli)
+ source="sapi/cli/php"
+ ;;
+ cgi)
+ source="sapi/cgi/php-cgi"
+ ;;
+ fpm)
+ source="sapi/fpm/php-fpm"
+ ;;
+ embed)
+ source="libs/libphp${PHP_MV}$(get_libname)"
+ ;;
+ phpdbg)
+ source="sapi/phpdbg/phpdbg"
+ ;;
+ *)
+ die "unhandled sapi in src_install"
+ ;;
+ esac
+
+ if [[ "${source}" == *"$(get_libname)" ]]; then
+ dolib.so "${source}"
+ else
+ dobin "${source}"
+ local name="$(basename ${source})"
+ dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}"
+ fi
+ fi
+
+ php_install_ini "${sapi}"
+
+ # construct correct SAPI string for php-config
+ # thanks to ferringb for the bash voodoo
+ if [[ "${sapi}" == "apache2" ]]; then
+ sapi_list="${sapi_list:+${sapi_list} }apache2handler"
+ else
+ sapi_list="${sapi_list:+${sapi_list} }${sapi}"
+ fi
+ fi
+ done
+
+ # Installing opcache module
+ if use opcache ; then
+ into "${PHP_DESTDIR#${EPREFIX}}"
+ dolib.so "modules/opcache$(get_libname)"
+ fi
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+ sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die
+
+ # set php-config variable correctly (bug #278439)
+ sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
+ "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die
+
+ if use fpm ; then
+ if use systemd; then
+ systemd_newunit "${FILESDIR}/php-fpm_at.service" \
+ "php-fpm@${SLOT}.service"
+ else
+ systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \
+ "php-fpm@${SLOT}.service"
+ fi
+ fi
+}
+
+src_test() {
+ echo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php"
+ if [[ ! -x "${PHP_BIN}" ]] ; then
+ ewarn "Test phase requires USE=cli, skipping"
+ return
+ else
+ export TEST_PHP_EXECUTABLE="${PHP_BIN}"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then
+ export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
+ fi
+
+ if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
+ export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
+ fi
+
+ REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \
+ "session.save_path=${T}" \
+ "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \
+ "session.save_path=${T}"
+
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ mv "${name}.out" "${name}.out.orig" 2>/dev/null || die
+ done
+
+ local failed="$(find -name '*.out')"
+ if [[ ${failed} != "" ]] ; then
+ ewarn "The following test cases failed unexpectedly:"
+ for name in ${failed}; do
+ ewarn " ${name/.out/}"
+ done
+ else
+ einfo "No unexpected test failures, all fine"
+ fi
+
+ if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then
+ local passed=""
+ for name in ${EXPECTED_TEST_FAILURES}; do
+ [[ -f "${name}.diff" ]] && continue
+ passed="${passed} ${name}"
+ done
+ if [[ ${passed} != "" ]] ; then
+ einfo "The following test cases passed unexpectedly:"
+ for name in ${passed}; do
+ ewarn " ${passed}"
+ done
+ else
+ einfo "None of the known-to-fail tests passed, all fine"
+ fi
+ fi
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ elog
+ elog "To enable PHP in apache, you will need to add \"-D PHP\" to"
+ elog "your apache2 command. OpenRC users can append that string to"
+ elog "APACHE2_OPTS in /etc/conf.d/apache2."
+ elog
+ elog "The apache module configuration file 70_mod_php.conf is"
+ elog "provided (and maintained) by eselect-php."
+ elog
+ fi
+
+ # Create the symlinks for php
+ for m in ${SAPIS}; do
+ [[ ${m} == 'embed' ]] && continue;
+ if use $m ; then
+ local ci=$(eselect php show $m)
+ if [[ -z $ci ]]; then
+ eselect php set $m php${SLOT} || die
+ einfo "Switched ${m} to use php:${SLOT}"
+ einfo
+ elif [[ $ci != "php${SLOT}" ]] ; then
+ elog "To switch $m to use php:${SLOT}, run"
+ elog " eselect php set $m php${SLOT}"
+ elog
+ fi
+ fi
+ done
+
+ # Remove dead symlinks for SAPIs that were just disabled. For
+ # example, if the user has the cgi SAPI enabled, then he has an
+ # eselect-php symlink for it. If he later reinstalls PHP with
+ # USE="-cgi", that symlink will break. This call to eselect is
+ # supposed to remove that dead link per bug 572436.
+ eselect php cleanup || die
+
+ if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then
+ elog "To build extensions for this version of PHP, you will need to"
+ elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable."
+ elog
+ fi
+
+ # Warn about the removal of PHP_INI_VERSION if the user has it set.
+ if [[ -n "${PHP_INI_VERSION}" ]]; then
+ ewarn 'The PHP_INI_VERSION variable has been phased out. You may'
+ ewarn 'remove it from your configuration at your convenience. See'
+ ewarn
+ ewarn ' https://bugs.gentoo.org/611214'
+ ewarn
+ ewarn 'for more information.'
+ fi
+
+ elog "For details on how version slotting works, please see"
+ elog "the wiki:"
+ elog
+ elog " https://wiki.gentoo.org/wiki/PHP"
+ elog
+}
+
+pkg_postrm() {
+ # This serves two purposes. First, if we have just removed the last
+ # installed version of PHP, then this will remove any dead symlinks
+ # belonging to eselect-php. Second, if a user upgrades slots from
+ # (say) 5.6 to 7.0 and depcleans the old slot, then this will update
+ # his existing symlinks to point to the new 7.0 installation. The
+ # latter is bug 432962.
+ #
+ # Note: the eselect-php package may not be installed at this point,
+ # so we can't die() if this command fails.
+ eselect php cleanup
+}
diff --git a/dev-lang/polyml/Manifest b/dev-lang/polyml/Manifest
new file mode 100644
index 000000000000..6486db358498
--- /dev/null
+++ b/dev-lang/polyml/Manifest
@@ -0,0 +1,24 @@
+AUX polyml-5.4.1-asm.patch 1026 SHA256 9879c43c7e82e53ff6d15b838b159df3336b791c46e9f80a38f21c4180500bed SHA512 bf19cedff74b11feba72c0ba2f5a9b6ee8169b5bb1b783d3559640070025ca0e7627d751bc703c41d812025d6909cba56101e49f0199f2aee310bc95ca4f2d6d WHIRLPOOL 4e0fda223b89b12801b06be970c98b8c0caece7bc8fb6994e8cebfe8ebf25d1efc8fec0311b360c5665f45279b0bd72ada9199041ad2245ecf4849118ef034ca
+AUX polyml-5.4.1-configure.patch 459 SHA256 89e712f53a08386505d8a503f23d6e29310ae1b1ce39e3acaa024ab47ab3b20d SHA512 4e3a5e6651c8b6b9cb018f72f100755eee0265ad7dd0ba57030b7bce95670ff35e7191661be469b59206266f5eb51042d98504601311629bc2e83ed36a0cef8f WHIRLPOOL fa3b63cc9ecb46fe099d9a3e7ce050018c7384c269ceb9359dd9f5bfc02dc36317e79acad6dd728758a89486ac0020b00733ddadd43ced831576961f6708289c
+AUX polyml-5.5.0-asm.patch 351 SHA256 2cf50de0e1401e84c30558f141d781bce8aabeea06ae1790d8d273d5a2f66c32 SHA512 92a14615483aaac76e708ae19fccab132f80223ebaad7a390482af164335199a7d2e52be8726cc96d7971efae73a9cdf0284ec96f014af606edce2024d5b3996 WHIRLPOOL 6f4be3a701cc23c03a0b21055633f6ab2bf55c5f8f1ae29ba78bd7d09c3e56d98c268e0b16f1b0a62abcd4d6b10d4cbd5bba2e7b8e0d51876d2d4e089c95c926
+AUX polyml-5.5.0-configure.patch 4658 SHA256 97a22b91138bba455e846cc3bfc7eb4db2ef851e5165513d9ca1a93bda5991d7 SHA512 d4a8ee5d41469d958d7f61a6608c5d4bd50e5497fadcd5333b2a94cd253c65d27f493bd743574eb3ccab37a39fdb2182e25106443f1855b30be1a70c9d450cc6 WHIRLPOOL 0ec51689a392a9d85bba2617af34704dc119ba0d3a9e9b969061b1609b568a4898dbb4ceb561c8a5ae1aaadb181ea2e94e0f25e2161be1dc7b8b46a9350b621c
+AUX polyml-5.5.0-x-it-basis.patch 562 SHA256 114c8b973ec601a616700c5301d09aa74da90a2a1e62cf9e697e1d856dc4bfe3 SHA512 ed5864b7ce5767133a47d914b5b439177e5c841669870292f90a73edee2e505aff6883b9a80baf0036d87bf728038ffa4609f9bacde4a704bfca291aa9cf50a4 WHIRLPOOL d2cdd33be477faa4d1e66c4a033390505bc7e7a47376c977a6e8d563353fabf10afdbda26801d66e91c22ba650bbfc713118e3f68ce4ccbc595bfdd67028bdfb
+AUX polyml-5.5.1-inputN-return-for-zero-chars.patch 1476 SHA256 9e70b70856a9a6a52cefcc4de9cc289bf4f6ed336db94805d9209a31cc42d11f SHA512 998e9eb09a3b35bbbb6a9748e0b19c423f2204ccfb3f5a6de3173ca91f67d523884743f382052c22d14655310265ef7f8259e5104c61f9ab2b9a52f7257a011f WHIRLPOOL 4cab45f4358d91fc42232cf2fbfa194cf982f5587c5139fc17f9722a09a60926d386a9d9b93108076b97ea5556331b9f6fc27f6b78c83ae2af4418b78db1b51e
+AUX polyml-5.5.1-optimize-closure.patch 6695 SHA256 d8afd738322172af863966b831a486a1de233028cd84cee5d9f0d09247828b62 SHA512 7cf1c66114058c8b3c9ceed3a84fe9a99f0cf063cce3364be79c7402353e8e29c5082cfedef16a32f38cb4275b0b3622db88cf7746115d1c43c483635a46f147 WHIRLPOOL 17ae6543b16275309133fa0c29208d38fd1dfa6637a1b21a81efcb3f4944c21a145a610df8ed6976d78636834293983eeb4b5234e9c4fab2fe62b5a55282306e
+AUX polyml-5.5.2-r1952-check_for_negative_sized_array.patch 548 SHA256 b65ba50d7184a5f94cc2d841de82180218711b4b312442d51bb5fa87c447bea1 SHA512 d979c6542a2a983ab1b536e8b983d4d0a154f4f5e00f3d4161dd38f965f63ea5bd339785904690928a715ec43cb2a296f535ff6af1da522b096ffae0bba759a4 WHIRLPOOL adf5310406e02e3d258fa6148a1a5e4a7c5097aa330c9c1a046b64f5ef8a2b5a1c50d300e3f97e938557a8a89dabd98f11e85431e1c9fb30b6381bbf97413c7a
+AUX polyml-5.5.2-r1954_Fix_segfault_in_FFI_when_malloc_runs_out_of_memory.patch 4089 SHA256 a2f08bc8f5708df1fbb1b91170f43d35b9d6d69b7b7f44ca9ee67e4b747b5d5f SHA512 8b4f174ace31a839ea592402c10068af62f03227a43a663ea17ea5eefecf52472fc6a3437cd99f1593de7d575af57ae4b8156756695623c7db0f9e726e5f21a6 WHIRLPOOL be034af4b9e9f594895ce0cebccd6a8e9cc262a5e2b0c44f45496a57a9c6159385a86c35acccd8e258cd78c61d258ebaaf14c7ed466ff61e0c4450a334334a8f
+AUX polyml-5.5.2-r2007_Ensure_the_large_object_cache_pointer_is_cleared.patch 1247 SHA256 9e5a5c254b84ac272fa15ce09494ac61c817d47499c3729bfdf65290cada489b SHA512 ac2d1baff1c8d743ee783ac81f31df12cc4598874dd5a9a7855cd06fb179af2c64bc02a87d85a72238f19c805128143693839bd0a58d9a4002bc75fae985303b WHIRLPOOL a2f044c74b9b8898130436c9e59510321af9a71e24287f78f353b8efaa72c0854c456607fa92c44625f980a3f32ec60f543ae1e6fb1c3fabf4000689d699f1dd
+AUX polyml-5.5.2-r2009_Initialise_the_largeObjectCache_fully_in_the_constructor.patch 951 SHA256 9612b28a09e7097440962ba9b59678fefcc0ab85a80fd6436484028682a015f3 SHA512 644e90f26ef80aa8e945257eafa4da1ee2da9d353db40b5c6e367d032f41db4a6589a2527bce9d84d45794d88d31edaeb3cea53d57b4421bf209f6c07be69cf0 WHIRLPOOL d82c663331d7e72ace67a3c20edbab4dd2672dd04e0adaa26e47d953f2357cc4654dfb96a5145579d7485f7b0075647c7614952b6b8d3be9adaf1caaad2ba36c
+DIST polyml-5.6.tar.gz 6066166 SHA256 20d7b98ae56fe030c64054dbe0644e9dc02bae781caa8994184ea65a94a0a615 SHA512 cd4f25c225831dec512f7136dfda4ba31abd6939d9e8e0cacdb6d48212488b56ba5969c76e76fcbfcfa83d015a67d9cf62457286086f3c2b3f7914a7939d7b59 WHIRLPOOL a50042ed5cd309ca2b148cfb33a98681803b79c80f8efde1ad2b39cabdfb6dd85da6a66dd21f92f603d3be9685008e3fd4f5303eadd24d8cec493acead29acc3
+DIST polyml.5.4.1.tar.gz 6107319 SHA256 514d1d07be487b783d4dfa29dbd550b3396640579ce135a9eb5a61f08e7f9cac SHA512 4a7b404ed648b5a9fd9d52917214688d15f4f9a5f4570ba13b52a8304bde1cc4b534f539ffc3c9554283816ae130e4c898a179d776df6d3220fba9743a19b175 WHIRLPOOL 048db0b2210d699c0a86940daaafd24bfc81debae412f7e7dcad2585cd5514253f6c47e0006277ef00b640ab971a031d74e64c78c4abcc09712fa9e8593d1720
+DIST polyml.5.5.1.tar.gz 5465794 SHA256 cf8009dabc8b5d308d92e201dcd01f17ce14289d30caa8021a87365f4b8e209a SHA512 283954c8bf5599d83ea69916b827b1acae7137fe4add67537026092da2e6f1a89d71d3a394dbba599bbe9e967ded1446f39f4d81afb90301532db6be949f7a6f WHIRLPOOL 5bfeb8dcedcfe9b0a925ed089abc246d70d1269631ee46e9c78b123d461afb80e68640d6c08d77f47e69b0c244e9c7a27750dd7350741911e007f9dbcb2e7f76
+DIST polyml.5.5.2.tar.gz 5599140 SHA256 73fd2be89f7e3ff0567e27ef525ef788775d9f963d6db54069cb34d53040a682 SHA512 248c2a38c4691898bc1243a041f4683bf227d9c8a98c6c3545af2a8a3249ed5ed96f33f90cb2dede8809b42f33c0557650147302cfe046a5fba965ccd93cbc5b WHIRLPOOL d8dae553b6d4effef80b4303ea8fdbb95f8470790ab7ff49e62ae2a47d70d9d0b11b2113caa28302c029049041bd0286ba06a2153b5266b88a6c26eb1714abf7
+DIST polyml.5.5.tar.gz 5504389 SHA256 2b20e597e6fe43df1b0ed01e78e410c6b51d0ac7911833e91d94fcc9eb05d831 SHA512 4725c2e4a786b8c63bc6fc1cadad0de818ed935014d51040af43defa07b03ba7bedb2185bfb2e39a0db7284479e79e698b31ec7fe8463c306b668de1eda69b89 WHIRLPOOL 166c7d0037dff771251c95e17d86a6208d926a5adbbac0188426dfe09b7cdbab1b620919068a722f34377fbc59966145ebd1cba5dcb0664943cc82c10d3b5688
+EBUILD polyml-5.4.1.ebuild 881 SHA256 ec25b16ff380ce8b87e07b2f75e5dd1a9fec105272e09e784d4028aa14f1f4cc SHA512 ba04f994d7650f1c95a11efae7d6c1462996359c8eaaeed87514ad4e330a0805db8e3f045458e8478bda8de335aaf1e09ddbaf711598e8ae7b371788312631c1 WHIRLPOOL 084a12b88b10e7c0440c15b1bd22d8413bea6506fed55aab4dfdbaf34813fcbe0f9d7f2dd54a0f12cf82b62182f404b70843d2ac61b6dec2aae3f869c82c5aeb
+EBUILD polyml-5.5.0.ebuild 1120 SHA256 dd8d4cb2c68a2dc52b25dc80bfd89f5fd3ef027c0472e93c8c40959afe664315 SHA512 28331b4280dc7e46a61b83f51f4abf12e9302247f7c38ff122b68f31b53be4b7c93c0ce2f9e0b850a1baf919124b3762f48604e42e437526ba421f5fe7251946 WHIRLPOOL efad3432c4f029297141433e3f0c032f5ea745e5d8c44781e2f2b00786497e719ccd7cf150f3a60f2f6e210ce835a759c4a263ff6fca331e03d58faa77dc4162
+EBUILD polyml-5.5.1.ebuild 1805 SHA256 ce180e4e523a3ac97938cd4e5be068c4fa90de37f29eb9e653406df815e94bd2 SHA512 da0057b1a59f8ae20be68e6ee4735b8ee5d737e3b7a6ba5ca0ac414a04bb7f869a95b5149dee00f9a1b1989d1cd3f6f444f9ba6db2bf77cf2ddcc2cbcd7ae088 WHIRLPOOL 1362d570e91b9e0b7b5f8a1b8fef50d0749ee841b5a5911c33a35542a9730585510413122f44cf558f81dd5b0fe81a40aba29a602472a46bfb3e0b36f85e30fb
+EBUILD polyml-5.5.2.ebuild 1962 SHA256 e148166ce0560d1d39084843d48a938d5a05655992c6457166d375bd578e9c2f SHA512 49ac070096e8401b028ebb2b66141d85520349192f74666050941d0be984974c5797c93ebd9410e233cbb6a9fe700f454f0ea86688250c9f1de6015f8c00dead WHIRLPOOL 7ca6bb31e7629fe0d572468e97bc3421d280ad669d9df6f1ca5b17d44a09916406b5cb5759178e8369a0529609db8a85b180f081f0ad09c45f16b761a5880947
+EBUILD polyml-5.6.ebuild 1102 SHA256 ee6d84a049b04ab418524787b91733ef02f3a6c3703565d1ac9f71250f57cdf0 SHA512 90a5a0083b803d9c8c353d5609c7274ae736d203d3515e506dfb5ca68c5237135807de4527d83528ed81d55bcb734a0dab2a262b0de00ad354d60772ef9eb424 WHIRLPOOL 48696da3fd0a39d30e71da55ba90b61550aff0608596ef491d19bd3255246cf1f133dd0fe088f2b2740302c7f9c52b3e56c077e8510433c765c8382986cb46f9
+MISC ChangeLog 3751 SHA256 319413f9f6c3e1e7c4ce8515ff6557d3b3407d60d0982c196fdb95b2c009d6ab SHA512 18409236273a9773c5cff99d29e84795f4d8066630d9251d4e2c6cc3ed749365581fc5f926bd79ef1e66c67f3cfdc7a86587599b7d3eb0692e53daab6ccfb0dc WHIRLPOOL e44e9df9bc8cda9e632dd656cd84bea88f6ff807666669238a03d0b073fdad801f0e2c35ebf49d13a4694a376b79d4cd5209e8a5ddca6bced0940d0b2c7e291b
+MISC ChangeLog-2015 3467 SHA256 e234d6a82bafcf318ab6bf7cce265924c9c974509ac66df2f84f498ddaa1a837 SHA512 219f020da6115415d7dbd9c076bcf25e9809a99168cdd336916e193c8412b70b681f03504e64bf33900afad95f936ba6cd5841c2eb3b5711a1fb83d795316e1b WHIRLPOOL 92517471801ceb4e0083bb4990da61729f7bdf3fcf8e30acf1528c3e1203f368d641eba1cd3e8c0e292e5a4c7987e5df8673f4f126e59f04d8187ab2c26e6d6e
+MISC metadata.xml 562 SHA256 8483763f59bcbe26be3a367c52bc0afecccb5a00aed904e08aee44cee0c1373e SHA512 d6cd496acc03dbcca4b50f5cc49bec9818764dc2aca36ab83eb4b82102fda5c562d8a73eb83e400eb254bb2c7db1a1a68453cfbe655d780ed67a149712a74038 WHIRLPOOL c4b1f477e08c3808cd8cc4b59cba859e77cea7a4535d6834a01ecf675773bc9f9ee8dc875d106dd1652fab82613c7b1799a6f5474a6ea42eded601b1d2d8a20a
diff --git a/dev-lang/polyml/files/polyml-5.4.1-asm.patch b/dev-lang/polyml/files/polyml-5.4.1-asm.patch
new file mode 100644
index 000000000000..af8bd8d49149
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.4.1-asm.patch
@@ -0,0 +1,28 @@
+--- polyml.5.4.1-orig/libpolyml/x86asm.asm 2011-07-13 00:06:49.000000000 +1000
++++ polyml.5.4.1/libpolyml/x86asm.asm 2012-01-08 16:00:09.740684843 +1100
+@@ -2714,4 +2714,7 @@
+
+
+ ENDIF
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+ END
+--- polyml.5.4.1-orig/libpolyml/power_assembly.S 2010-04-09 01:49:20.000000000 +1000
++++ polyml.5.4.1/libpolyml/power_assembly.S 2012-01-08 15:46:35.006200143 +1100
+@@ -1735,3 +1735,6 @@
+ dd Mask_assign_byte /* 254 */
+ dd Mask_assign_word /* 255 */
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+--- polyml.5.4.1-orig/libpolyml/sparc_assembly.S 2010-08-13 01:01:36.000000000 +1000
++++ polyml.5.4.1/libpolyml/sparc_assembly.S 2012-01-08 15:46:12.516642791 +1100
+@@ -1498,3 +1498,6 @@
+ .long Mask_assign_byte /* 254 */
+ .long Mask_assign_word /* 255 */
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
diff --git a/dev-lang/polyml/files/polyml-5.4.1-configure.patch b/dev-lang/polyml/files/polyml-5.4.1-configure.patch
new file mode 100644
index 000000000000..aaaed02f8e16
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.4.1-configure.patch
@@ -0,0 +1,11 @@
+--- polyml.5.4.1-orig/configure.ac 2010-09-03 21:22:40.000000000 +1000
++++ polyml.5.4.1/configure.ac 2012-01-09 22:44:04.153668402 +1100
+@@ -321,7 +321,7 @@
+ AC_ARG_WITH([portable],
+ [AS_HELP_STRING([--with-portable],
+ [Build the portable interpreter version of Poly/ML instead of native @<:@default=no@:>@])], [
+- ac_cv_with_portable=yes], [
++ ac_cv_with_portable="$withval"], [
+ ac_cv_with_portable=no])
+
+ case "${host_cpu}" in
diff --git a/dev-lang/polyml/files/polyml-5.5.0-asm.patch b/dev-lang/polyml/files/polyml-5.5.0-asm.patch
new file mode 100644
index 000000000000..cffa627b9f32
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.5.0-asm.patch
@@ -0,0 +1,10 @@
+--- polyml.5.5-orig/libpolyml/x86asm.asm 2012-05-03 21:07:59.000000000 +1000
++++ polyml.5.5/libpolyml/x86asm.asm 2012-09-19 17:41:51.767737295 +1000
+@@ -3003,4 +3003,7 @@
+ dd Mask_assign_byte ;# 254
+ dd Mask_assign_word ;# 255
+
++#if defined(__linux__) && defined(__ELF__)
++.section .note.GNU-stack,"",%progbits
++#endif
+ END
diff --git a/dev-lang/polyml/files/polyml-5.5.0-configure.patch b/dev-lang/polyml/files/polyml-5.5.0-configure.patch
new file mode 100644
index 000000000000..1a2e114e6503
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.5.0-configure.patch
@@ -0,0 +1,138 @@
+Index: polyml/configure
+===================================================================
+--- polyml/configure (revision 1599)
++++ polyml/configure (revision 1600)
+@@ -20870,10 +20870,8 @@
+ # Check whether --with-portable was given.
+ if test "${with_portable+set}" = set; then :
+ withval=$with_portable;
+- ac_cv_with_portable=yes
+ else
+-
+- ac_cv_with_portable=no
++ with_portable=check
+ fi
+
+
+@@ -20894,36 +20892,46 @@
+
+ $as_echo "#define HOSTARCHITECTURE_SPARC 1" >>confdefs.h
+
+- ac_cv_with_portable=yes
++ polyarch=interpret
+ ;;
+ power* | ppc*)
+
+ $as_echo "#define HOSTARCHITECTURE_PPC 1" >>confdefs.h
+
+- ac_cv_with_portable=yes
++ polyarch=interpret
+ ;;
+ arm*)
+
+ $as_echo "#define HOSTARCHITECTURE_ARM 1" >>confdefs.h
+
+- ac_cv_with_portable=yes
++ polyarch=interpret
+ ;;
+ ia64*)
+
+ $as_echo "#define HOSTARCHITECTURE_IA64 1" >>confdefs.h
+
+- ac_cv_with_portable=yes
++ polyarch=interpret
+ ;;
+ *) as_fn_error $? "Poly/ML is not supported for this architecture" "$LINENO" 5 ;;
+ esac
+
+-# If we have explicitly set --with-portable or we are on a machine without
+-# a code-generator set to use the interpreter.
+-if test "$ac_cv_with_portable" = "yes"; then
++# If we explicitly asked to use the interpreter set the architecture to interpreted.
++if test "x$with_portable" = "xyes" ; then
++ polyarch=interpret
++fi
+
++# If we asked not to use the interpreter check we have native code support.
++if test "x$with_portable" = "xno" ; then
++ if test "x$polyarch" = "xinterpret" ; then
++ as_fn_error $? "--without-portable was given but native code is not supported on this platform" "$LINENO" 5
++ fi
++fi
++
++# Set the define if this is the interpreter. This is no longer actually used.
++if test "x$polyarch" = "xinterpret" ; then
++
+ $as_echo "#define INTERPRETED 1" >>confdefs.h
+
+- polyarch=interpret
+ fi
+
+ # Put this test at the end where it's less likely to be missed.
+Index: polyml/configure.ac
+===================================================================
+--- polyml/configure.ac (revision 1599)
++++ polyml/configure.ac (revision 1600)
+@@ -368,10 +368,10 @@
+ # Test the --with-portable option to build the interpreter even if
+ # we have a code-generator.
+ AC_ARG_WITH([portable],
+- [AS_HELP_STRING([--with-portable],
+- [Build the portable interpreter version of Poly/ML instead of native @<:@default=no@:>@])], [
+- ac_cv_with_portable=yes], [
+- ac_cv_with_portable=no])
++ [AS_HELP_STRING([--with-portable],
++ [Build the portable interpreter version of Poly/ML instead of native @<:@default=no@:>@])],
++ [],
++ [with_portable=check])
+
+ case "${host_cpu}" in
+ i[[3456]]86*)
+@@ -384,28 +384,39 @@
+ ;;
+ sparc*)
+ AC_DEFINE([HOSTARCHITECTURE_SPARC], [1], [Define if the host is a Sparc (32 bit)])
+- ac_cv_with_portable=yes
++ polyarch=interpret
+ ;;
+ power* | ppc*)
+ AC_DEFINE([HOSTARCHITECTURE_PPC], [1], [Define if the host is a Power PC (32 bit)])
+- ac_cv_with_portable=yes
++ polyarch=interpret
+ ;;
+ arm*)
+ AC_DEFINE([HOSTARCHITECTURE_ARM], [1], [Define if the host is an ARM (32 bit)])
+- ac_cv_with_portable=yes
++ polyarch=interpret
+ ;;
+ ia64*)
+ AC_DEFINE([HOSTARCHITECTURE_IA64], [1], [Define if the host is Itanium])
+- ac_cv_with_portable=yes
++ polyarch=interpret
+ ;;
+ *) AC_MSG_ERROR([Poly/ML is not supported for this architecture]) ;;
+ esac
+
+-# If we have explicitly set --with-portable or we are on a machine without
+-# a code-generator set to use the interpreter.
+-if test "$ac_cv_with_portable" = "yes"; then
++# If we explicitly asked to use the interpreter set the architecture to interpreted.
++if test "x$with_portable" = "xyes" ; then
++ polyarch=interpret
++fi
++
++# If we asked not to use the interpreter check we have native code support.
++if test "x$with_portable" = "xno" ; then
++ if test "x$polyarch" = "xinterpret" ; then
++ AC_MSG_ERROR(
++ [--without-portable was given but native code is not supported on this platform])
++ fi
++fi
++
++# Set the define if this is the interpreter. This is no longer actually used.
++if test "x$polyarch" = "xinterpret" ; then
+ AC_DEFINE([INTERPRETED], [1], [Define if using the interpreter] )
+- polyarch=interpret
+ fi
+
+ # Put this test at the end where it's less likely to be missed.
diff --git a/dev-lang/polyml/files/polyml-5.5.0-x-it-basis.patch b/dev-lang/polyml/files/polyml-5.5.0-x-it-basis.patch
new file mode 100644
index 000000000000..2f6ce7b864bd
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.5.0-x-it-basis.patch
@@ -0,0 +1,21 @@
+Index: polyml/mlsource/extra/XWindows/ml_bind.ML
+===================================================================
+--- polyml/mlsource/extra/XWindows/ml_bind.ML (revision 1600)
++++ polyml/mlsource/extra/XWindows/ml_bind.ML (revision 1601)
+@@ -2437,7 +2437,7 @@
+
+ exception XWindows = XWindows.XWindows;
+
+-let
++local
+ open XWindows;
+
+ fun printRect _ _ (r:XRectangle) =
+@@ -2447,6 +2447,6 @@
+ PolyML.PrettyString ("Rect " ^ PolyML.makestring R)
+ end;
+ in
+- PolyML.addPrettyPrinter printRect
++ val () = PolyML.addPrettyPrinter printRect
+ end;
+
diff --git a/dev-lang/polyml/files/polyml-5.5.1-inputN-return-for-zero-chars.patch b/dev-lang/polyml/files/polyml-5.5.1-inputN-return-for-zero-chars.patch
new file mode 100644
index 000000000000..8f5b02ee9084
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.5.1-inputN-return-for-zero-chars.patch
@@ -0,0 +1,33 @@
+https://sourceforge.net/p/polyml/code/1875/
+Required for sci-mathematics/isabelle-2013.2
+
+------------------------------------------------------------------------
+r1875 | dcjm | 2013-10-30 10:49:05 -0600 (Wed, 30 Oct 2013) | 1 line
+
+Backport commit 1874 from trunk. This fixes TextIO.inputN and StreamIO.inputN so they return immediately if the request is for zero characters.
+Index: polyml/basis/BasicStreamIO.sml
+===================================================================
+--- polyml/basis/BasicStreamIO.sml (revision 1851)
++++ polyml/basis/BasicStreamIO.sml (working copy)
+@@ -213,6 +213,8 @@
+ fun inputN (f, n) =
+ if n < 0
+ then raise Size
++ else if n = 0 (* Defined to return the empty vector and f *)
++ then (emptyVec, f)
+ else
+ let
+ val (vecs, f') = inputNList (f, n)
+Index: polyml/basis/TextIO.sml
+===================================================================
+--- polyml/basis/TextIO.sml (revision 1851)
++++ polyml/basis/TextIO.sml (working copy)
+@@ -597,6 +597,8 @@
+ | inputN' n (ref(Direct(strm as {buffer, bufp, buflimit, ...}))) =
+ if n < 0 orelse n > CharVector.maxLen
+ then raise Size
++ else if n = 0
++ then "" (* Return the empty string without blocking *)
+ else if !buflimit = 0
+ then (* Last read returned end-of-file. Clear the EOF state once
+ we return this empty string. *)
diff --git a/dev-lang/polyml/files/polyml-5.5.1-optimize-closure.patch b/dev-lang/polyml/files/polyml-5.5.1-optimize-closure.patch
new file mode 100644
index 000000000000..5b33203d69e1
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.5.1-optimize-closure.patch
@@ -0,0 +1,141 @@
+https://sourceforge.net/p/polyml/code/1869/
+Required for sci-mathematics/isabelle-2013.2
+
+------------------------------------------------------------------------
+r1869 | dcjm | 2013-10-11 05:59:58 -0600 (Fri, 11 Oct 2013) | 1 line
+
+Back-port commits 1855 and 1867 from trunk. These fix two optimiser bugs. Includes the regression tests.
+
+Index: polyml/mlsource/MLCompiler/CodeTree/CODETREE_OPTIMISER.sml
+===================================================================
+--- polyml/mlsource/MLCompiler/CodeTree/CODETREE_OPTIMISER.sml (revision 1851)
++++ polyml/mlsource/MLCompiler/CodeTree/CODETREE_OPTIMISER.sml (working copy)
+@@ -645,8 +645,9 @@
+ (thisDec :: decs, thisArg @ args, LoadLocal newAddr :: mapList)
+ end
+
+- | mapPattern(ArgPattCurry(currying, ArgPattTuple{allConst=false, filter, ...}) :: patts, n, m) =
+- (* It's a function that returns a tuple. *)
++ | mapPattern(ArgPattCurry(currying as [_], ArgPattTuple{allConst=false, filter, ...}) :: patts, n, m) =
++ (* It's a function that returns a tuple. The function must not be curried because
++ otherwise it returns a function not a tuple. *)
+ let
+ val (thisDec, thisArg, thisMap) =
+ transformFunctionArgument(currying, [LoadArgument m], [LoadArgument n], SOME filter)
+@@ -657,7 +658,7 @@
+
+ | mapPattern(ArgPattCurry(currying as firstArgSet :: _, _) :: patts, n, m) =
+ (* Transform it if it's curried or if there is a tuple in the first arg. *)
+- if List.length currying >= 2 orelse
++ if (*List.length currying >= 2 orelse *) (* This transformation is unsafe. *)
+ List.exists(fn ArgPattTuple{allConst=false, ...} => true | _ => false) firstArgSet
+ then
+ let
+@@ -685,6 +686,13 @@
+
+ and transformFunctionArgument(argumentArgs, loadPack, loadThisArg, filterOpt) =
+ let
++ (* Disable the transformation of curried arguments for the moment.
++ This is unsafe. See Test146. The problem is that this transformation
++ is only safe if the function is applied immediately to all the arguments.
++ However the usage information is propagated so that if the result of
++ the first application is bound to a variable and then that variable is
++ applied it still appears as curried. *)
++ val argumentArgs = [hd argumentArgs]
+ (* We have a function that takes a series of curried argument.
+ Change that so that the function takes a list of arguments. *)
+ val newAddr = ! localCounter before localCounter := ! localCounter + 1
+@@ -1214,9 +1222,11 @@
+ let
+ fun checkArg (ArgPattTuple{allConst=false, ...}) = true
+ (* Function has at least one tupled arg. *)
+- | checkArg (ArgPattCurry(_, ArgPattTuple{allConst=false, ...})) = true
+- (* Function has an arg that is a function that returns a tuple. *)
+- | checkArg (ArgPattCurry(_ :: _ :: _, _)) = true
++ | checkArg (ArgPattCurry([_], ArgPattTuple{allConst=false, ...})) = true
++ (* Function has an arg that is a function that returns a tuple.
++ It must not be curried otherwise it returns a function not a tuple. *)
++ (* This transformation is unsafe. See comment in transformFunctionArgument above. *)
++ (*| checkArg (ArgPattCurry(_ :: _ :: _, _)) = true *)
+ (* Function has an arg that is a curried function. *)
+ | checkArg (ArgPattCurry(firstArgSet :: _, _)) =
+ (* Function has an arg that is a function that
+Index: polyml/Tests/Succeed/Test146.ML
+===================================================================
+--- polyml/Tests/Succeed/Test146.ML (revision 0)
++++ polyml/Tests/Succeed/Test146.ML (revision 1875)
+@@ -0,0 +1,24 @@
++(* Bug in transformation of arguments which are curried functions. It is not
++ safe to transform "f" in the argument to "bar". Although it is curried
++ the application to the first argument "()" is not immediately followed
++ by the application to the second. *)
++
++local
++ val r = ref 0
++in
++ (* Foo should be called exactly once *)
++ fun foo () = (r:= !r+1; fn i => i)
++
++ fun checkOnce () = if !r = 1 then () else raise Fail "bad"
++end;
++
++fun bar f = let val r = f() in (r 1; r 2; List.map r [1, 2, 3]) end;
++
++bar foo;
++
++checkOnce();
++
++exception A and B and C;
++fun rA () = raise A and rB () = raise B;
++fun h (f, g) = let val a = f() in g(); a () end;
++h(rA, rB) handle A => ();
+
+Property changes on: polyml/Tests/Succeed/Test146.ML
+___________________________________________________________________
+Added: svn:eol-style
+## -0,0 +1 ##
++native
+\ No newline at end of property
+Index: polyml/Tests/Succeed/Test147.ML
+===================================================================
+--- polyml/Tests/Succeed/Test147.ML (revision 0)
++++ polyml/Tests/Succeed/Test147.ML (revision 1875)
+@@ -0,0 +1,31 @@
++(* Bug in optimiser transformation. A function argument that returns a tuple
++ can be transformed to take a container but only if it is not curried. *)
++
++(* Cut down example from Isabelle that caused an internal error exception. *)
++
++fun one _ [] = raise Fail "bad"
++ | one pred (x :: xs) =
++ if pred x then (x, xs) else raise Fail "bad";
++
++fun foo (scan, f) xs = let val (x, y) = scan xs in (f x, y) end;
++
++fun bar (scan1, scan2) xs =
++ let
++ val (x, ys) = scan1 xs;
++ val (y, zs) = scan2 x ys;
++ in ((x, y), zs) end;
++
++fun bub (scan1, scan2) = foo(bar(scan1, (fn _ => scan2)), op ^);
++
++val qqq: string list -> string * int = bub(one (fn _ => raise Match), (foo((fn _ => raise Match), String.concat)));
++
++(* Further example - This caused a segfault. *)
++
++PolyML.Compiler.maxInlineSize := 1;
++fun f g = let val (x,y) = g 1 2 in x+y end;
++
++fun r (x, y, z) = fn _ => (x, y+z);
++
++val h: int-> int*int = r (4,5,6);
++
++f (fn _ => h);
+
+Property changes on: polyml/Tests/Succeed/Test147.ML
+___________________________________________________________________
+Added: svn:eol-style
+## -0,0 +1 ##
++native
+\ No newline at end of property
diff --git a/dev-lang/polyml/files/polyml-5.5.2-r1952-check_for_negative_sized_array.patch b/dev-lang/polyml/files/polyml-5.5.2-r1952-check_for_negative_sized_array.patch
new file mode 100644
index 000000000000..1451d2df8d84
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.5.2-r1952-check_for_negative_sized_array.patch
@@ -0,0 +1,13 @@
+Index: polyml/basis/Array.sml
+===================================================================
+--- polyml/basis/Array.sml (revision 1951)
++++ polyml/basis/Array.sml (revision 1952)
+@@ -129,7 +129,7 @@
+
+ fun array(len, a) =
+ let
+- val () = if len >= maxLen then raise General.Size else ()
++ val () = if len < 0 orelse len >= maxLen then raise General.Size else ()
+ val vec = System_alloc(len+1, 0wx40, RunCall.unsafeCast a)
+ in
+ System_setw(vec, 0, RunCall.unsafeCast len);
diff --git a/dev-lang/polyml/files/polyml-5.5.2-r1954_Fix_segfault_in_FFI_when_malloc_runs_out_of_memory.patch b/dev-lang/polyml/files/polyml-5.5.2-r1954_Fix_segfault_in_FFI_when_malloc_runs_out_of_memory.patch
new file mode 100644
index 000000000000..783577026f67
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.5.2-r1954_Fix_segfault_in_FFI_when_malloc_runs_out_of_memory.patch
@@ -0,0 +1,112 @@
+Index: polyml/libpolyml/foreign.cpp
+===================================================================
+--- polyml/libpolyml/foreign.cpp (revision 1953)
++++ polyml/libpolyml/foreign.cpp (revision 1954)
+@@ -4,7 +4,7 @@
+
+ Copyright (c) 2000-7
+ Cambridge University Technical Services Limited
+- Further development Copyright David C.J. Matthews 2008-2011.
++ Further development Copyright David C.J. Matthews 2008-2014.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+@@ -251,6 +251,10 @@
+
+ static Volatile *vols;
+ static PLock volLock; // Mutex to protect vols.
++// TODO: There is a theoretical risk of deadlock if any ML allocation is made while this
++// lock is held. An allocation can result in a GC which requires all threads to release
++// ML memory but another thread could block waiting for the mutex.
++// N.B. raising an exception involves an allocation.
+
+ #define FIRST_VOL 0
+
+@@ -268,24 +272,8 @@
+ static unsigned callBackEntries = 0;
+ static PLock callbackTableLock; // Mutex to protect table.
+
+-
+ /**********************************************************************
+ *
+- * Malloc / Free Wrappers
+- *
+- **********************************************************************/
+-
+-static POLYUNSIGNED malloc_count = 0;
+-#if 0
+-#define Vmalloc(where,size) {where = malloc(size); printf("malloc: %p,%d\n",where,size); fflush(stdout); malloc_count++;}
+-#else
+-#define Vmalloc(where,size) {where = malloc(size); malloc_count++;}
+-#endif
+-#define Vfree(p) { free(p); malloc_count--;}
+-
+-
+-/**********************************************************************
+- *
+ * Volatile Allocation
+ *
+ **********************************************************************/
+@@ -349,8 +337,12 @@
+ PLocker plocker(&volLock);
+ Handle res = vol_alloc(taskData);
+ trace(("size= %" POLYUFMT "\n",size));
+- Vmalloc( C_POINTER(UNVOLHANDLE(res)), size );
++ void *p = malloc(size);
++ if (p == 0)
++ RAISE_EXN("Insufficient memory");
++ C_POINTER(UNVOLHANDLE(res)) = p;
+ OWN_C_SPACE(UNVOLHANDLE(res)) = true;
++
+ return res;
+ }
+
+@@ -685,7 +677,7 @@
+ {
+ // Can now free this.
+ trace(("Freeing malloc space of <%" POLYUFMT ">\n",from));
+- Vfree(vols[from].C_pointer);
++ free(vols[from].C_pointer);
+ vols[from].C_pointer = 0;
+ vols[from].Own_C_space = false;
+ }
+@@ -702,7 +694,6 @@
+ }
+ }
+ next_vol = to;
+- info(("unfreed mallocs=<%" POLYUFMT "> next_vol=<%" POLYUFMT ">\n", malloc_count, next_vol));
+
+ /* Callback table. Added DCJM 12/4/04. We always process these as strong references.
+ For the time being at any rate we treat these as permanent entries so that once a
+@@ -910,8 +901,9 @@
+ RAISE_EXN("libffi error: ffi_prep_cif failed");
+
+ // malloc memory for the result
+- void *result;
+- Vmalloc(result, result_type->size);
++ void *result = malloc(result_type->size);
++ if (result == 0)
++ RAISE_EXN("Insufficient memory to allocate space for result");
+
+ processes->ThreadReleaseMLMemory(taskData);
+ ffi_call(&cif, sym, result, arg_values);
+@@ -1580,6 +1572,9 @@
+
+ unsigned num_args = length_list(argTypeList->Word());
+ ffi_type **arg_types = (ffi_type**)malloc(num_args * sizeof(ffi_type*));
++ if (arg_types == 0)
++ RAISE_EXN("Insufficient memory to allocate space for arguments");
++
+ PolyWord p = argTypeList->Word();
+ for (POLYUNSIGNED i=0; i<num_args; i++,p=Tail(p))
+ arg_types[i] = ctypeToFfiType(taskData, Head(p));
+@@ -1587,6 +1582,9 @@
+
+ // The cif needs to be on the heap so that it is available in the callback.
+ ffi_cif *cif = (ffi_cif *)malloc(sizeof(ffi_cif));
++ if (cif == 0)
++ RAISE_EXN("Insufficient memory to allocate space for cif");
++
+ if (ffi_prep_cif(cif, abi, num_args, result_type, arg_types) != FFI_OK)
+ RAISE_EXN("libffi error: ffi_prep_cif failed");
+
diff --git a/dev-lang/polyml/files/polyml-5.5.2-r2007_Ensure_the_large_object_cache_pointer_is_cleared.patch b/dev-lang/polyml/files/polyml-5.5.2-r2007_Ensure_the_large_object_cache_pointer_is_cleared.patch
new file mode 100644
index 000000000000..36c82947f37b
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.5.2-r2007_Ensure_the_large_object_cache_pointer_is_cleared.patch
@@ -0,0 +1,27 @@
+Index: polyml/libpolyml/gc_mark_phase.cpp
+===================================================================
+--- polyml/libpolyml/gc_mark_phase.cpp (revision 2006)
++++ polyml/libpolyml/gc_mark_phase.cpp (revision 2007)
+@@ -130,13 +130,6 @@
+ if (locPtr == LARGECACHE_SIZE) locPtr = 0;
+ largeObjectCache[locPtr].base = obj;
+ largeObjectCache[locPtr].current = currentPtr;
+- // To try to narrow down a bug that results in the ASSERT failing,
+- // add these extra checks.
+- POLYUNSIGNED lengthWord = obj->LengthWord();
+- ASSERT (OBJ_IS_LENGTH(lengthWord));
+- POLYUNSIGNED length = OBJ_OBJECT_LENGTH(lengthWord);
+- ASSERT(length == originalLength);
+- ASSERT(currentPtr > (PolyWord*)obj && currentPtr < ((PolyWord*)obj)+length);
+ }
+ }
+ else StackOverflow(obj);
+@@ -579,6 +572,8 @@
+ ASSERT(nInUse == 0);
+ MTGCProcessMarkPointers *marker = &markStacks[0];
+ marker->active = true;
++ marker->locPtr = 0;
++ marker->largeObjectCache[0].base = 0;
+ nInUse = 1;
+
+ // Scan the permanent mutable areas.
diff --git a/dev-lang/polyml/files/polyml-5.5.2-r2009_Initialise_the_largeObjectCache_fully_in_the_constructor.patch b/dev-lang/polyml/files/polyml-5.5.2-r2009_Initialise_the_largeObjectCache_fully_in_the_constructor.patch
new file mode 100644
index 000000000000..0629f12f72ca
--- /dev/null
+++ b/dev-lang/polyml/files/polyml-5.5.2-r2009_Initialise_the_largeObjectCache_fully_in_the_constructor.patch
@@ -0,0 +1,21 @@
+Index: polyml/libpolyml/gc_mark_phase.cpp
+===================================================================
+--- polyml/libpolyml/gc_mark_phase.cpp (revision 2008)
++++ polyml/libpolyml/gc_mark_phase.cpp (revision 2009)
+@@ -176,6 +176,16 @@
+ // Clear the mark stack
+ for (unsigned i = 0; i < MARK_STACK_SIZE; i++)
+ markStack[i] = 0;
++ // Clear the large object cache. Actually only largeObjectCache[0].base
++ // needs to be set to zero and for the objects allocated on the heap it is
++ // cleared before each GC in either MarkRoots or MarkPointersTask.
++ // The remianing case is the RescanMarked sub-class which is allocated on the stack
++ // but it doesn't hurt to clear it in all cases.
++ for (unsigned j = 0; j < LARGECACHE_SIZE; j++)
++ {
++ largeObjectCache[locPtr].base = 0;
++ largeObjectCache[locPtr].current = 0;
++ }
+ }
+
+ // Called when the stack has overflowed. We need to include this
diff --git a/dev-lang/polyml/metadata.xml b/dev-lang/polyml/metadata.xml
new file mode 100644
index 000000000000..e5460b6ae6dc
--- /dev/null
+++ b/dev-lang/polyml/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>ml@gentoo.org</email>
+ <name>Gentoo ML Project</name>
+ </maintainer>
+ <longdescription lang="en">
+Poly/ML is a full implementation of Standard ML available as open-source.
+</longdescription>
+ <use>
+ <flag name="portable">Build the portable interpreter version of Poly/ML
+ instead of native.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">polyml</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/polyml/polyml-5.4.1.ebuild b/dev-lang/polyml/polyml-5.4.1.ebuild
new file mode 100644
index 000000000000..291dc04c0507
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.4.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit base autotools
+
+MY_P=${PN}.${PV}
+
+DESCRIPTION="Poly/ML is a full implementation of Standard ML"
+HOMEPAGE="http://www.polyml.org"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="X elibc_glibc +gmp portable test +threads"
+
+RDEPEND="X? ( x11-libs/motif:0 )
+ gmp? ( >=dev-libs/gmp-5 )
+ elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=("${FILESDIR}/${PN}-5.4.1-configure.patch"
+ "${FILESDIR}/${PN}-5.4.1-asm.patch")
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with X x) \
+ $(use_with gmp) \
+ $(use_with portable) \
+ $(use_with threads)
+}
+
+src_test() {
+ emake tests || die "tests failed"
+}
diff --git a/dev-lang/polyml/polyml-5.5.0.ebuild b/dev-lang/polyml/polyml-5.5.0.ebuild
new file mode 100644
index 000000000000..c8799c914844
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.5.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit base autotools versionator
+
+# Although the download is called 5.5, after building it poly -v says
+# it is 5.5.0.
+MY_PV=$(get_version_component_range "1-2" "${PV}")
+MY_P="${PN}.${MY_PV}"
+
+DESCRIPTION="Poly/ML is a full implementation of Standard ML"
+HOMEPAGE="http://www.polyml.org"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="X elibc_glibc +gmp portable test +threads"
+
+RDEPEND="X? ( x11-libs/motif:0 )
+ gmp? ( >=dev-libs/gmp-5 )
+ elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )
+ virtual/libffi"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=("${FILESDIR}/${PN}-5.5.0-configure.patch"
+ "${FILESDIR}/${PN}-5.5.0-x-it-basis.patch"
+ "${FILESDIR}/${PN}-5.5.0-asm.patch")
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-system-libffi \
+ $(use_with X x) \
+ $(use_with gmp) \
+ $(use_with portable) \
+ $(use_with threads)
+}
+
+src_test() {
+ emake tests || die "tests failed"
+}
diff --git a/dev-lang/polyml/polyml-5.5.1.ebuild b/dev-lang/polyml/polyml-5.5.1.ebuild
new file mode 100644
index 000000000000..675e79082702
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.5.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit base autotools pax-utils
+
+MY_P="${PN}.${PV}"
+
+DESCRIPTION="Poly/ML is a full implementation of Standard ML"
+HOMEPAGE="http://www.polyml.org"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="X elibc_glibc +gmp portable test +threads"
+
+RDEPEND="X? ( x11-libs/motif:0 )
+ gmp? ( >=dev-libs/gmp-5 )
+ elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )
+ virtual/libffi"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ # Bug 256679 - patch the assembler code. The remaining executable stacks in ./.libs/poly
+ # comes from the polyml generated ./polyexport.o file.
+ "${FILESDIR}/${PN}-5.5.0-asm.patch"
+ # https://sourceforge.net/p/polyml/code/1875/ for isabelle-2013.2
+ "${FILESDIR}/${PN}-5.5.1-inputN-return-for-zero-chars.patch"
+ # https://sourceforge.net/p/polyml/code/1869/
+ # Adds Test146.ML that fails, applying it anyway as it is required by
+ # sci-mathematics/isabelle-2013.2
+ "${FILESDIR}/${PN}-5.5.1-optimize-closure.patch"
+)
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+ if [ -f "${S}/Tests/Succeed/Test146.ML" ]; then
+ mv "${S}/Tests/Succeed/Test146.ML" "${S}/Tests/Succeed/Test146.ML.disable-test-as-it-fails"
+ fi
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ --disable-static \
+ --with-system-libffi \
+ $(use_with X x) \
+ $(use_with gmp) \
+ $(use_with portable) \
+ $(use_with threads)
+}
+
+src_compile() {
+ # Bug 453146 - dev-lang/polyml-5.5.0: fails to build (pax kernel?)
+ pushd libpolyml || die "Could not cd to libpolyml"
+ emake
+ popd
+ emake polyimport
+ pax-mark m "${S}/.libs/polyimport"
+ emake
+ pax-mark m "${S}/.libs/poly"
+}
+
+src_test() {
+ emake tests || die "tests failed"
+}
diff --git a/dev-lang/polyml/polyml-5.5.2.ebuild b/dev-lang/polyml/polyml-5.5.2.ebuild
new file mode 100644
index 000000000000..85e846f17afc
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.5.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit base autotools pax-utils
+
+MY_P="${PN}.${PV}"
+
+DESCRIPTION="Poly/ML is a full implementation of Standard ML"
+HOMEPAGE="http://www.polyml.org"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="X elibc_glibc +gmp portable test +threads"
+
+RDEPEND="X? ( x11-libs/motif:0 )
+ gmp? ( >=dev-libs/gmp-5 )
+ elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )
+ virtual/libffi"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ # Bug 256679 - patch the assembler code. The remaining executable stacks in ./.libs/poly
+ # comes from the polyml generated ./polyexport.o file.
+ "${FILESDIR}/${PN}-5.5.0-asm.patch"
+ # Patches from https://sourceforge.net/p/polyml/code/HEAD/tree/fixes-5.5.2
+ # which are required to build and run sci-mathematics/isabelle-2015
+ "${FILESDIR}/${PN}-5.5.2-r1952-check_for_negative_sized_array.patch"
+ "${FILESDIR}/${PN}-5.5.2-r1954_Fix_segfault_in_FFI_when_malloc_runs_out_of_memory.patch"
+ "${FILESDIR}/${PN}-5.5.2-r2007_Ensure_the_large_object_cache_pointer_is_cleared.patch"
+ "${FILESDIR}/${PN}-5.5.2-r2009_Initialise_the_largeObjectCache_fully_in_the_constructor.patch"
+)
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+ if [ -f "${S}/Tests/Succeed/Test146.ML" ]; then
+ mv "${S}/Tests/Succeed/Test146.ML" "${S}/Tests/Succeed/Test146.ML.disable-test-as-it-fails"
+ fi
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ --disable-static \
+ --with-system-libffi \
+ $(use_with X x) \
+ $(use_with gmp) \
+ $(use_with portable) \
+ $(use_with threads)
+}
+
+src_compile() {
+ # Bug 453146 - dev-lang/polyml-5.5.0: fails to build (pax kernel?)
+ pushd libpolyml || die "Could not cd to libpolyml"
+ emake
+ popd
+ emake polyimport
+ pax-mark m "${S}/.libs/polyimport"
+ emake
+ pax-mark m "${S}/.libs/poly"
+}
+
+src_test() {
+ emake tests || die "tests failed"
+}
diff --git a/dev-lang/polyml/polyml-5.6.ebuild b/dev-lang/polyml/polyml-5.6.ebuild
new file mode 100644
index 000000000000..96e7f5c91558
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.6.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools pax-utils
+
+DESCRIPTION="Poly/ML is a full implementation of Standard ML"
+HOMEPAGE="http://www.polyml.org"
+SRC_URI="https://codeload.github.com/polyml/polyml/tar.gz/v${PV} -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="X elibc_glibc +gmp portable test +threads"
+
+RDEPEND="X? ( x11-libs/motif:0 )
+ gmp? ( >=dev-libs/gmp-5 )
+ elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )
+ virtual/libffi"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ --disable-static \
+ --with-system-libffi \
+ $(use_with X x) \
+ $(use_with gmp) \
+ $(use_with portable) \
+ $(use_with threads)
+}
+
+src_compile() {
+ # Bug 453146 - dev-lang/polyml-5.5.0: fails to build (pax kernel?)
+ pushd libpolyml || die "Could not cd to libpolyml"
+ emake
+ popd
+ emake polyimport
+ pax-mark m "${S}/.libs/polyimport"
+ emake
+ pax-mark m "${S}/.libs/poly"
+}
+
+src_test() {
+ emake tests || die "tests failed"
+}
diff --git a/dev-lang/python-exec/Manifest b/dev-lang/python-exec/Manifest
new file mode 100644
index 000000000000..09707aa75692
--- /dev/null
+++ b/dev-lang/python-exec/Manifest
@@ -0,0 +1,8 @@
+DIST python-exec-2.4.4.tar.bz2 86945 SHA256 cdc780764bce79047ab047160156c5dc3bf5728d9c59cf1ed904fdf12638d60b SHA512 26b76960430dc3b2b79aab5e8a72498144d4e78bed5291fe9361afe081f0e8d70049a74ec29384cb0fc199f76c23499324d2eddcaea521ef33d88e61b1b674f9 WHIRLPOOL 791fd9732179d17bf5cd981956759e7c25e1e1dcbaf6fdfb05cf4fed8d4f44490740aaa5b4d38335a72128f8fdea0f6ab2e34c331a2b7f6b0897aa7eaa1f0c48
+DIST python-exec-2.4.5.tar.bz2 87137 SHA256 8649def42af569cc65598da6af49e554351dc138ccc8a96198c2a425494a8559 SHA512 8c1a520c565afa775cad0e8b88248b688814664e588f683fc2b2c039ee0494b168ebd3cd1042b8b7fe2583f287cf55b22ea0585bfb43efe2f8450d809cde0b21 WHIRLPOOL 5de79c34c31eee131799524a8ad19262a1455d59ee4db0cc99468820fe142c864f10999834734b70a6d6868ead97e2d389e83dc1679248e862b02b332a177954
+EBUILD python-exec-2.4.4.ebuild 4284 SHA256 1f74e6ee68b4a077564c588457cece0100803ea3446917e20d4ca03fd3772368 SHA512 9f7072a4f9b504ebc6cbabf3c18ad06df8c01ae1e8d09139661d339b4f35bc0b3616407a2cdc5266a1c85ccf8abb83c8a8d44ccb0c5c28ad0865df4e15afbfcf WHIRLPOOL 9f150ffe9a3d1d2e2224afee0de20b772c2809e0f66d0b84ae0f2784312803ba3c0f905fd5478f2c63a6797bf27b0e5ff19d7b4df30be68731fb8749eecd9e57
+EBUILD python-exec-2.4.5.ebuild 4455 SHA256 52e489943cb6d5f516885a0e19a8ba5d5d10f17d461bd2714ab21f40421943fb SHA512 7f6f031bd2ce8a19ef5eebb155454615ea305a40b938f28ef7ab12bb0c6dc77fd65b8c705c9d1236bf5bb316b205b34c582b21fbb78a9e386139cdd8c07f1115 WHIRLPOOL 0057cfc81aefbfd36855a494c0dd32e568190d7eb4cfc143f503ff312447c713cfc8d08d284b6cf2debd638fbc930f8e02567e97ae106866b960113f18be1b27
+EBUILD python-exec-9999.ebuild 4606 SHA256 6ba168825172b9521595ce8611b17522d642d429107e984a80ffbdc6e06a05f0 SHA512 c68c4cc31b5f4f634ef6adb6e97c487f71600fd5c8e2d6d60a01f025351b9c231835a57221aea6b287f0e8e00669b7af958a0cd4e435459827e204cd312b6acd WHIRLPOOL e6d60ce0d78205e62e034971cc73902a6b248422667d3604823c0e0c8823158324e7e585913ae818b701cd4112e129513ef9ca95c39850099fd917e75a522ba2
+MISC ChangeLog 10720 SHA256 3d82f9b81fc855db286b1fc912731759c811815c348046491edef317e22d29e4 SHA512 6eed75de98c71ac6e81eae8607405efb133472936ec613a2ba70ead54eda3839a8b4b50dbca78325cfa9d0c2fe4b5a0de791dd19d1ac0349787b0865f6cd0715 WHIRLPOOL 636aab31ec2d766cb177b25734dd245e30262870e1837ea8eabcb71dfb02e6a89a3bc54ed03e6a3b6cc83df8ae9ec8721a266f9945cfdc227ee36e3a1811e422
+MISC ChangeLog-2015 3848 SHA256 5f99d4b5e2ae61ae1330ac7a10f56d3fae902ef2a2a52de9b07383197c57e71f SHA512 e516a7461f0d8008c7554858bb9d490db05768d90c5f237a6ca9e8c4a0902bc9205f389c7dab410ed0a48689dd774012487340954eb9c19873fa0b2608d871e2 WHIRLPOOL c6551fd2ced06008adf39300cf22953fd13129cd4291b3f9c49d12bda3bc809daf010997de7b7a643fadfeafe7324e869975a1a42aa7c6450465377ab1117fb3
+MISC metadata.xml 589 SHA256 660e6a1fef663b8ef01d7c0217188290f54dd6d4a998360ef7a482b092eacb8d SHA512 2ac0223af0a2cf95d2b18ef415eadb325af0094e4ec361a414b0d68b203dc1c937d3d680af96bdad1e8a48cb5786683bdbbd451f47a0f3a777c075e1690ccf7a WHIRLPOOL 10e2730bfbb957988893646314968b19feb9f7efacf0a3dd5aea2c8163074dfe6da4786c8984140193b76eaec36b6ee4b9eee184892d97596379b6381fb59c3d
diff --git a/dev-lang/python-exec/metadata.xml b/dev-lang/python-exec/metadata.xml
new file mode 100644
index 000000000000..ef39a52d06f8
--- /dev/null
+++ b/dev-lang/python-exec/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>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <maintainer status="active">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <bugs-to>https://github.com/mgorny/python-exec/issues/</bugs-to>
+ <remote-id type="bitbucket">mgorny/python-exec</remote-id>
+ <remote-id type="github">mgorny/python-exec</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/python-exec/python-exec-2.4.4.ebuild b/dev-lang/python-exec/python-exec-2.4.4.ebuild
new file mode 100644
index 000000000000..96c08a46bfb0
--- /dev/null
+++ b/dev-lang/python-exec/python-exec-2.4.4.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# Kids, don't do this at home!
+inherit python-utils-r1
+PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" )
+
+# Inherited purely to have PYTHON_TARGET flags which will satisfy USE
+# dependencies and trigger necessary rebuilds.
+inherit python-r1
+
+DESCRIPTION="Python script wrapper"
+HOMEPAGE="https://github.com/mgorny/python-exec/"
+SRC_URI="https://github.com/mgorny/${PN}/releases/download/${P}/${P}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="2"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+# eselect-python because of /usr/bin/python* collisions and new config
+# python versions because of missing $scriptdir/python* symlinks
+RDEPEND="
+ !<app-eselect/eselect-python-20160206
+ !<dev-lang/python-2.7.10-r4:2.7
+ !<dev-lang/python-3.3.5-r4:3.3
+ !<dev-lang/python-3.4.3-r4:3.4
+ !<dev-lang/python-3.5.0-r3:3.5"
+
+src_configure() {
+ local pyimpls=() i EPYTHON
+ for i in "${PYTHON_COMPAT[@]}"; do
+ python_export "${i}" EPYTHON
+ pyimpls+=( "${EPYTHON}" )
+ done
+
+ local myconf=(
+ --with-python-impls="${pyimpls[*]}"
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+
+ # Prepare and own the template
+ sed -n -e '/^#/p' config/python-exec.conf.example \
+ > "${T}"/python-exec.conf || die
+ insinto /etc/python-exec
+ doins "${T}"/python-exec.conf
+
+ local f
+ for f in python{,2,3}; do
+ # symlink the C wrapper for python to avoid shebang recursion
+ # bug #568974
+ dosym python-exec2c /usr/bin/"${f}"
+ done
+ for f in python{,2,3}-config 2to3 idle pydoc pyvenv; do
+ # those are python scripts (except for new python-configs)
+ # so symlink them via the python wrapper
+ dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}"
+ done
+}
+
+pkg_preinst() {
+ if [[ -e ${EROOT}etc/python-exec/python-exec.conf ]]; then
+ # preserve current configuration
+ cp "${EROOT}"etc/python-exec/python-exec.conf \
+ "${ED}"etc/python-exec/python-exec.conf || die
+ else
+ # preserve previous Python version preference
+ local py old_pythons=()
+ local config_base=${EROOT}etc/env.d/python
+
+ # start with the 'global' preference (2 vs 3)
+ if [[ -f ${config_base}/config ]]; then
+ old_pythons+=( "$(<${config_base}/config)" )
+ fi
+
+ # then try specific py3 selection
+ for py in 3; do
+ local target=
+
+ if [[ -f ${config_base}/python${py} ]]; then
+ # try the newer config files
+ target=$(<${config_base}/python${py})
+ elif [[ -L ${EROOT}/usr/bin/python${py} ]]; then
+ # check the older symlink format
+ target=$(readlink "${EROOT}/usr/bin/python${py}")
+
+ # check if it's actually old eselect symlink
+ [[ ${target} == python?.? ]] || target=
+ fi
+
+ # add the extra target if found and != global
+ if [[ ${target} && ${old_pythons[0]} != ${target} ]]; then
+ old_pythons+=( "${target}" )
+ fi
+ done
+
+ if [[ ${old_pythons[@]} ]]; then
+ elog "You seem to have just upgraded into the new version of python-exec"
+ elog "that uses python-exec.conf for configuration. The ebuild has attempted"
+ elog "to convert your previous configuration to the new format, resulting"
+ elog "in the following preferences (most preferred version first):"
+ elog
+ for py in "${old_pythons[@]}"; do
+ elog " ${py}"
+ done
+ elog
+ elog "Those interpreters will be preferred when running Python scripts or"
+ elog "calling wrapped Python executables (python, python2, pydoc...)."
+ elog "If none of the preferred interpreters are supported, python-exec will"
+ elog "fall back to the newest supported Python version."
+ elog
+ elog "Please note that due to the ambiguous character of the old settings,"
+ elog "you may want to modify the preference list yourself. In order to do so,"
+ elog "open the following file in your favorite editor:"
+ elog
+ elog " ${EROOT}etc/python-exec/python-exec.conf"
+ elog
+ elog "For more information on the new configuration format, please read"
+ elog "the comment on top of the installed configuration file."
+
+ local IFS=$'\n'
+ echo "${old_pythons[*]}" \
+ >> "${ED}"etc/python-exec/python-exec.conf || die
+ fi
+ fi
+}
diff --git a/dev-lang/python-exec/python-exec-2.4.5.ebuild b/dev-lang/python-exec/python-exec-2.4.5.ebuild
new file mode 100644
index 000000000000..9867c4cbd7e5
--- /dev/null
+++ b/dev-lang/python-exec/python-exec-2.4.5.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+# Kids, don't do this at home!
+inherit python-utils-r1
+PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" )
+
+# Inherited purely to have PYTHON_TARGET flags which will satisfy USE
+# dependencies and trigger necessary rebuilds.
+inherit python-r1
+
+DESCRIPTION="Python script wrapper"
+HOMEPAGE="https://github.com/mgorny/python-exec/"
+SRC_URI="https://github.com/mgorny/${PN}/releases/download/${P}/${P}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+# eselect-python because of /usr/bin/python* collisions and new config
+# python versions because of missing $scriptdir/python* symlinks
+RDEPEND="
+ !<app-eselect/eselect-python-20160206
+ !<dev-lang/python-2.7.10-r4:2.7
+ !<dev-lang/python-3.3.5-r4:3.3
+ !<dev-lang/python-3.4.3-r4:3.4
+ !<dev-lang/python-3.5.0-r3:3.5"
+
+src_configure() {
+ local pyimpls=() i EPYTHON
+ for i in "${PYTHON_COMPAT[@]}"; do
+ python_export "${i}" EPYTHON
+ pyimpls+=( "${EPYTHON}" )
+ done
+
+ local myconf=(
+ --with-fallback-path="${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin"
+ --with-python-impls="${pyimpls[*]}"
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+
+ # Prepare and own the template
+ sed -n -e '/^#/p' config/python-exec.conf.example \
+ > "${T}"/python-exec.conf || die
+ insinto /etc/python-exec
+ doins "${T}"/python-exec.conf
+
+ local f
+ for f in python{,2,3}; do
+ # symlink the C wrapper for python to avoid shebang recursion
+ # bug #568974
+ dosym python-exec2c /usr/bin/"${f}"
+ done
+ for f in python{,2,3}-config 2to3 idle pydoc pyvenv; do
+ # those are python scripts (except for new python-configs)
+ # so symlink them via the python wrapper
+ dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}"
+ done
+}
+
+pkg_preinst() {
+ if [[ -e ${EROOT}etc/python-exec/python-exec.conf ]]; then
+ # preserve current configuration
+ cp "${EROOT}"etc/python-exec/python-exec.conf \
+ "${ED}"etc/python-exec/python-exec.conf || die
+ else
+ # preserve previous Python version preference
+ local py old_pythons=()
+ local config_base=${EROOT}etc/env.d/python
+
+ # start with the 'global' preference (2 vs 3)
+ if [[ -f ${config_base}/config ]]; then
+ old_pythons+=( "$(<${config_base}/config)" )
+ fi
+
+ # then try specific py3 selection
+ for py in 3; do
+ local target=
+
+ if [[ -f ${config_base}/python${py} ]]; then
+ # try the newer config files
+ target=$(<${config_base}/python${py})
+ elif [[ -L ${EROOT}/usr/bin/python${py} ]]; then
+ # check the older symlink format
+ target=$(readlink "${EROOT}/usr/bin/python${py}")
+
+ # check if it's actually old eselect symlink
+ [[ ${target} == python?.? ]] || target=
+ fi
+
+ # add the extra target if found and != global
+ if [[ ${target} && ${old_pythons[0]} != ${target} ]]; then
+ old_pythons+=( "${target}" )
+ fi
+ done
+
+ if [[ ${old_pythons[@]} ]]; then
+ elog "You seem to have just upgraded into the new version of python-exec"
+ elog "that uses python-exec.conf for configuration. The ebuild has attempted"
+ elog "to convert your previous configuration to the new format, resulting"
+ elog "in the following preferences (most preferred version first):"
+ elog
+ for py in "${old_pythons[@]}"; do
+ elog " ${py}"
+ done
+ elog
+ elog "Those interpreters will be preferred when running Python scripts or"
+ elog "calling wrapped Python executables (python, python2, pydoc...)."
+ elog "If none of the preferred interpreters are supported, python-exec will"
+ elog "fall back to the newest supported Python version."
+ elog
+ elog "Please note that due to the ambiguous character of the old settings,"
+ elog "you may want to modify the preference list yourself. In order to do so,"
+ elog "open the following file in your favorite editor:"
+ elog
+ elog " ${EROOT}etc/python-exec/python-exec.conf"
+ elog
+ elog "For more information on the new configuration format, please read"
+ elog "the comment on top of the installed configuration file."
+
+ local IFS=$'\n'
+ echo "${old_pythons[*]}" \
+ >> "${ED}"etc/python-exec/python-exec.conf || die
+ fi
+ fi
+}
diff --git a/dev-lang/python-exec/python-exec-9999.ebuild b/dev-lang/python-exec/python-exec-9999.ebuild
new file mode 100644
index 000000000000..98708bc4bed2
--- /dev/null
+++ b/dev-lang/python-exec/python-exec-9999.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+#if LIVE
+EGIT_REPO_URI="https://github.com/mgorny/${PN}.git"
+
+inherit autotools git-r3
+#endif
+
+# Kids, don't do this at home!
+inherit python-utils-r1
+PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" )
+
+# Inherited purely to have PYTHON_TARGET flags which will satisfy USE
+# dependencies and trigger necessary rebuilds.
+inherit python-r1
+
+DESCRIPTION="Python script wrapper"
+HOMEPAGE="https://github.com/mgorny/python-exec/"
+SRC_URI="https://github.com/mgorny/${PN}/releases/download/${P}/${P}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+# eselect-python because of /usr/bin/python* collisions and new config
+# python versions because of missing $scriptdir/python* symlinks
+RDEPEND="
+ !<app-eselect/eselect-python-20160206
+ !<dev-lang/python-2.7.10-r4:2.7
+ !<dev-lang/python-3.3.5-r4:3.3
+ !<dev-lang/python-3.4.3-r4:3.4
+ !<dev-lang/python-3.5.0-r3:3.5"
+
+#if LIVE
+KEYWORDS=
+SRC_URI=
+
+src_prepare() {
+ eautoreconf
+}
+#endif
+
+src_configure() {
+ local pyimpls=() i EPYTHON
+ for i in "${PYTHON_COMPAT[@]}"; do
+ python_export "${i}" EPYTHON
+ pyimpls+=( "${EPYTHON}" )
+ done
+
+ local myconf=(
+ --with-fallback-path="${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin"
+ --with-python-impls="${pyimpls[*]}"
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ default
+
+ # Prepare and own the template
+ sed -n -e '/^#/p' config/python-exec.conf.example \
+ > "${T}"/python-exec.conf || die
+ insinto /etc/python-exec
+ doins "${T}"/python-exec.conf
+
+ local f
+ for f in python{,2,3}; do
+ # symlink the C wrapper for python to avoid shebang recursion
+ # bug #568974
+ dosym python-exec2c /usr/bin/"${f}"
+ done
+ for f in python{,2,3}-config 2to3 idle pydoc pyvenv; do
+ # those are python scripts (except for new python-configs)
+ # so symlink them via the python wrapper
+ dosym ../lib/python-exec/python-exec2 /usr/bin/"${f}"
+ done
+}
+
+pkg_preinst() {
+ if [[ -e ${EROOT}etc/python-exec/python-exec.conf ]]; then
+ # preserve current configuration
+ cp "${EROOT}"etc/python-exec/python-exec.conf \
+ "${ED}"etc/python-exec/python-exec.conf || die
+ else
+ # preserve previous Python version preference
+ local py old_pythons=()
+ local config_base=${EROOT}etc/env.d/python
+
+ # start with the 'global' preference (2 vs 3)
+ if [[ -f ${config_base}/config ]]; then
+ old_pythons+=( "$(<${config_base}/config)" )
+ fi
+
+ # then try specific py3 selection
+ for py in 3; do
+ local target=
+
+ if [[ -f ${config_base}/python${py} ]]; then
+ # try the newer config files
+ target=$(<${config_base}/python${py})
+ elif [[ -L ${EROOT}/usr/bin/python${py} ]]; then
+ # check the older symlink format
+ target=$(readlink "${EROOT}/usr/bin/python${py}")
+
+ # check if it's actually old eselect symlink
+ [[ ${target} == python?.? ]] || target=
+ fi
+
+ # add the extra target if found and != global
+ if [[ ${target} && ${old_pythons[0]} != ${target} ]]; then
+ old_pythons+=( "${target}" )
+ fi
+ done
+
+ if [[ ${old_pythons[@]} ]]; then
+ elog "You seem to have just upgraded into the new version of python-exec"
+ elog "that uses python-exec.conf for configuration. The ebuild has attempted"
+ elog "to convert your previous configuration to the new format, resulting"
+ elog "in the following preferences (most preferred version first):"
+ elog
+ for py in "${old_pythons[@]}"; do
+ elog " ${py}"
+ done
+ elog
+ elog "Those interpreters will be preferred when running Python scripts or"
+ elog "calling wrapped Python executables (python, python2, pydoc...)."
+ elog "If none of the preferred interpreters are supported, python-exec will"
+ elog "fall back to the newest supported Python version."
+ elog
+ elog "Please note that due to the ambiguous character of the old settings,"
+ elog "you may want to modify the preference list yourself. In order to do so,"
+ elog "open the following file in your favorite editor:"
+ elog
+ elog " ${EROOT}etc/python-exec/python-exec.conf"
+ elog
+ elog "For more information on the new configuration format, please read"
+ elog "the comment on top of the installed configuration file."
+
+ local IFS=$'\n'
+ echo "${old_pythons[*]}" \
+ >> "${ED}"etc/python-exec/python-exec.conf || die
+ fi
+ fi
+}
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
new file mode 100644
index 000000000000..dcb23547abb2
--- /dev/null
+++ b/dev-lang/python/Manifest
@@ -0,0 +1,42 @@
+AUX 3.6-blake2.patch 1335 SHA256 4e862d64326e775289b75cdd82301b38c5f1b568e4441f9496e50682c95656fc SHA512 f8f9b4424df36f58354c24b7eb571c63a7bb49a1d2fd5399562ab28371eb3a80ed829c7e4fc19f5b3d9955a83a46d09a63819e4da0dafdef0a5a3f6b1e679d71 WHIRLPOOL e5e2d43f2b3f3ed23cd1251325700b22a2a6081bd769b48b5f260240cacc5309e418e4c39f35464c3d2100b39543f5a738bf9549cd5bc4b647b6956bb66c742f
+AUX 3.6.1-test_socket-AEAD.patch 3501 SHA256 7fcb14190cfb840c76fb2085ac3dfbd5c71cfaceda2d94f8a624ee3e85e87ccf SHA512 7c813ea3c9eb45f50164b58fd4908e6ccf48eba7d027f252a2c13dab09662a52c4d950c4c7583d50a8752848f52e0854e6974d8c2ebbb38a38fedaa97878bc28 WHIRLPOOL d65f5deda806637b51007aa5ae1ab4f628611bfa0fe8fbe39cc2dd8aeb7235c69f9e4a91fee8629edaf7ff18d97e525bafcf5435353fa2fabbaf342cbd4e9054
+AUX pydoc.conf 169 SHA256 d6da332ae6d37f5539d8fc8411884a6c251b3769953e884463a622c751aee9a9 SHA512 30d0776a4004cd641e6f283658c3c24915a21ea15fe40e506ff2c3a5f95936aa00c9490b04ab25f29e9b7ac65cd88fd54ca0b08e000e73820b13c7c57c0bf5b2 WHIRLPOOL 672dc72d60180affe13e069094a50476eaeb22a00344accb78d338cad7eaf1b995e8a0595e109cb52a317f41554b5f9cc9e88811b3e63dbd7e30538ae677376b
+AUX pydoc.init 600 SHA256 433a5cafa48afced9c37e245e4574d143255535d7eec08be68e11d3aaea00df5 SHA512 9e71ad53486b6882a8441b24225c602195ee33d29dd1b60df27febbc6b752e79929be356152a489f893dcfb11f9c066b999787bc27a8ac61062c86e67a69e87a WHIRLPOOL c75ab03c5b8c37e5723c77f67b998931c0a096ee77a5886288aacdce1e0d59947d351be5d525bec8b812c1dc4fc5247120d69a92c32e7b4b68ba94c4c016f09c
+AUX python-2.7.10-cross-compile-warn-test.patch 775 SHA256 d5574b08e9ba7612971565c7a8e9881e4a0a07c63e79c2ca056a51ed1cf2badd SHA512 652941239541f6139ee3580ec0ea5240baf07ae1afb786f76a69b1d748de1f4dda2740a95c28866e9b0b59023410f8a1e86507642595991c0d90d187519cb758 WHIRLPOOL 95c9c404e9788fdbd7a202b7ff6df4010b6c035b097c20d6183919320a794bede013c938a6806365f9bdabd73917576f6ef0a07b20dd4d168fdc294facbfdccf
+AUX python-2.7.10-system-libffi.patch 1232 SHA256 d119def22ac8b15da95486981d9ddb2b19199dfeeed364de223c6321d592cdc9 SHA512 3c888638180edc81b98a869478085de63741668ea62bdb919a60708fd64cb394e60f44a3730e2ccf3e41d1d61b72b469242fe2ccd20dc61bc2064b3e759c52bd WHIRLPOOL bf69573ae6b804d44338a64c727f4b4ebde60964b89d546f4ca45d6d03619d84c69c88cc4e72975514c24cd9be31ee7fd9c3ea3cda9bce6384fa5a10cf28b2bd
+AUX python-2.7.5-nonfatal-compileall.patch 750 SHA256 3f5a137602f1b3f0522f561c168a740f0080b29c2c888cb3a8dbbcc4407c2d9e SHA512 d2e93e2a6fcd55d516df0ddaca31af97faed677ea6b4be282eb99e7864f8a7399b5ca11139844a4b3c264832183483b0f4c8c9865c05de0e8520e6d2c8f1dbc6 WHIRLPOOL ab576e3a4e67f881d6d5c705503230ace125fe94d907d7f69bb573dd492070b8b34078a2b1205f315eb45244fbae8855c0f15ce35158f1d356f1bd4acf83b3c2
+AUX python-2.7.9-ncurses-pkg-config.patch 305 SHA256 0464ec04985c642b40d53cb8f816abf18702aeae97cb52ec73541694317180c7 SHA512 2c18b5041a7a2f306dd4d0d6695bd851ca14c9107b2e3e856ec094bc53c7cc407b49e1f4813ee9e753b3ad2d4f6edda943a66bb1e6c895ab956a5f84d30646c6 WHIRLPOOL 774e2707a0c6ace106df30c0d4915527fb0ac7584cd0f1e12bbdb29d584c3b38c770d8fe8999d0166e94deab561cbed0c8ad09c27fcd83ed27045dfdede89a5a
+AUX python-3.4.3-ncurses-pkg-config.patch 302 SHA256 43e704d8dc96606d96c5eee82ecb53798d6586f591b4ee54d08137e962705101 SHA512 9e2bc2af0077d6282d9512b172d80ee294c47a6d41855474eed641afa8139ce4667a64c4676f5b2e40a90278b780a46e998d1096422ed0fe1d83b973dc455dc2 WHIRLPOOL 321452dd6f443609fddd4da7f5fb0c8897e99f9f4eea77eafc81ca14a9a4995818ea5e1400e44d9531c2b5d9491326c64d838b262b9e1b4814ec47f564a069ef
+AUX python-3.4.5-cross.patch 494 SHA256 d658fa5c080c5a466668f53c7f0a42cd7d33fc3dcb2318d1d9b4733d423514f8 SHA512 66c387fa873d9aec0aa7ba2d2c6468c315dd44e96434ce6519f79de5ad820928b1b926b0a2e3a94c73d919b8f2d80c3e71964dc6870d2c7e05844a9e3b1866b8 WHIRLPOOL 81f4d23f8d1d2b07219efc3ea1527d9edcb21d8b97dd5fd8a72aec620dfa4701b6df3db9cdaa4e812f11591c95acae8b9d89370562063928c1e8acfa2309800b
+AUX python-3.5-distutils-OO-build.patch 3667 SHA256 fc552ecaee8f2b10d96f51d60ad88d13a2593b086f54e8f8fc12766976fc5021 SHA512 5e25d46a7d11b16a7183aaecf82f914506fae552aaaa3d69aca6445c131dff39d4cf13588fa109ce16d41e43355539bee8390a2c454f3696df5a06edb6a5ca77 WHIRLPOOL 9aa810ab40c195a3f62d23439e9b2c49c0873cde6b54f934c54a59756eb4fcaceb30d7692d95f1c65691e8a7c4909b90a910f54cc04d50c859985576fe25c41c
+DIST Python-2.7.12.tar.xz 12390820 SHA256 d7837121dd5652a05fef807c361909d255d173280c4e1a4ded94d73d80a1f978 SHA512 6ddbbce47cc49597433d98ca05c2f62f07ed1070807b645602a8e9e9b996adc6fa66fa20a33cd7d23d4e7e925e25071d7301d288149fbe4e8c5f06d5438dda1f WHIRLPOOL fe4224f4c3dc8dc5c49005051da0069922c86f39880a0072c09fac422e1913d924ac695e22be11603a961329dd8c17b1cf7696b31b62ef93398e42745a6446d6
+DIST Python-2.7.13.tar.xz 12495628 SHA256 35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731 SHA512 f37c9a28ce129d01e63c84d7db627a06402854578f62d17927334ea21ede318e04bbf66e890e3f47c85333e6b19f6e5581fb3f3e27efd24be27017d1b6529c4b WHIRLPOOL 6bb6ad867c856bcaea97d5ad85882d990f5c8169a2450685cb77645f674bead83970c67a6a689ce0807856e366f320a0230250d2239f005f2a64cc32505507a5
+DIST Python-2.7.14.tar.xz 12576112 SHA256 71ffb26e09e78650e424929b2b457b9c912ac216576e6bd9e7d204ed03296a66 SHA512 78310b0be6388ffa15f29a80afb9ab3c03a572cb094e9da00cfe391afadb51696e41f592eb658d6a31a2f422fdac8a55214a382cbb8cfb43d4a127d5b35ea7f9 WHIRLPOOL c604d747daa874de926abb8ec142a7824f2706b79fd828aa189895ba0e7d4df044b9be58d49ab70a245e9e7abd5da4340abe54fa0ff9eab32a4dee7db7ee9d29
+DIST Python-3.4.5.tar.xz 14516820 SHA256 ee64b1c8a47461009abf25252332d29a4e587cb4f0c1c96aa793a3732e9d898a SHA512 b548a5338d141b3086dea372fa2cc245ba5350ee9f0d1304ef6222dc45380b66d380b092e547d54206d56ca68563b95036f445f97f72bb0ef1d48f81a74a3d4c WHIRLPOOL 43e0aed0177d46148964447b4fb24475c4c736afb2ba84ec393fbf55db3da3f192308f9c8f236deaa7a608dac56946ee7755970fadaa82bf406c910a05f36883
+DIST Python-3.4.6.tar.xz 14473592 SHA256 f13428bbe6aa9e3b9b6499502dc488c26096349ed7a21f7a0c1db90911115f40 SHA512 f6785cf6a99a8a27823baefe59cc20e34cbec01bb444c8600e7f49b5437159d5137f9d80fce26e219846d71bfe98f68bc6f0c87719a34db0050a4eaca95959ac WHIRLPOOL d76c18cd247a953ff836cea1ead6f9fb71637938f8bdc91376f06841069944863ac3f6fa536fd0102279e828149c3280b48a48c8d0eaca70df2941a3f38a18ed
+DIST Python-3.5.3.tar.xz 15213396 SHA256 eefe2ad6575855423ab630f5b51a8ef6e5556f774584c06beab4926f930ddbb0 SHA512 bbcc20e315c63dbc8901d7e7bfa29d4dbdad9335720757d8d679730319fd1d9fcfdb55cf62d620c9b052134170f162c28d653a8af60923185b8932524d827864 WHIRLPOOL 8aecc4dd97342d23b61cbef686f8324d4e9ee970e40745f88027bca63cf144cfa454e4d88ac52d508126c26f1ddb18617d0ff37f036438f08842998ed9e06066
+DIST Python-3.5.4.tar.xz 15332320 SHA256 94d93bfabb3b109f8a10365a325f920f9ec98c6e2380bf228f9700a14054c84c SHA512 dbbe2740ee1cce5404b7b6436a9b3887e15f415a1006efa22014ec7e5b1e48c43eed0ff98f6f5b365c527b8d2525be4ce72bbe404ce71c0835529fcd6f0267ff WHIRLPOOL 63bca2b7b6f5da024c30f84d7e4152a37232e3b277fc5ec58ede9a1da57a44e31bb5f2e5ee33874328526f8d7fdd05dc12df5c69fb827394d5b57907671d3dd3
+DIST Python-3.6.1.tar.xz 16872064 SHA256 a01810ddfcec216bcdb357a84bfaafdfaa0ca42bbdaa4cb7ff74f5a9961e4041 SHA512 8605fb7019386fec227d4b06d06f00ae500a8a89df289bfe6141bb56196c75483a60cc0ee553930742b31cefce68add5ccf226e0f27b7b915f5026d597e1ac29 WHIRLPOOL 94309888496431e974463c42375df5eb067321687d47e81efebd36aac322d44bb76f274c0595c7e9de2ea35ead594d0b261e1be2ec31914a812e654c71fff105
+DIST Python-3.6.3.tar.xz 16974296 SHA256 cda7d967c9a4bfa52337cdf551bcc5cff026b6ac50a8834e568ce4a794ca81da SHA512 32f24a3adcb7880003c7ecdc5e53e838e774adda76b308961d8215e28db630b2fa2828097817924c76afa4212b2df3362eb64d4e10f37c0147f512ec5aa8662b WHIRLPOOL cdd04d265568d577e97ce921bef63e78c493f05426adcc8bc2bb1e5dbf02e35c3a4361ff467b7021e917e5056cd12d75cb038e5977093649881f8c2c5aabcc28
+DIST python-gentoo-patches-2.7.12-0.tar.xz 13576 SHA256 cd842eec7202df57c153adc1fbb81e70b26ef651f8e9346e065d8577b93f343b SHA512 8bf530fca15c47fa5d9bc958e433b35943a12c98e4172806a45aa60dc85ec92f8ab6ffcd90f752dc5bf8ffc711414894c15820c4b6ef72dbcedc2808119fb1f6 WHIRLPOOL 54b8ca6a4371d460dadccfdffcc096c12930d58714eef95117a658d7a1337ea89c45c69553b5b993017211faaa0f8d670e09a8452e53c0fb176be3e908524ee6
+DIST python-gentoo-patches-2.7.13-0.tar.xz 13292 SHA256 271835eb36125d09cc5e904ef23a5263acd8e5f513202a8d4f8a9a0f64fc80a8 SHA512 d70f6baba1a465a752c515e33dfdee2a5cc75400fadfb8ea0bd1e82d50089abdf02d7726c697850dc47de2054aa494bbdc08de2673c260b54e609f29dab259ad WHIRLPOOL 6a6d8b099fa814839bf5b3455b3889205c649ef522b35c3a501831d63d0e916d7747b83ac9b8991f8f8c34b328478d84cf7a12a32161ce0fec37204f9c019e2d
+DIST python-gentoo-patches-2.7.14-0.tar.xz 13428 SHA256 3567feeb8f0c66161efaea1922bbfe4e71f6051533ef5f54a74b6ccf9e0359b6 SHA512 6da5b52065752b54e9215d0f0809c75167dc3690d0e94fa21dd7595626925bc5c1dd065d31b3bd696d7087f3986de145d3a335a29eb7bd77442637a7ec2863c1 WHIRLPOOL ab77023ac66def132d1dce72f98add3108fd7be303ef5b167a2374df3a94949c75f089dcfdd84ed05a5eb813d6c22cfecd0de03b5819817a20b04f30030f5f6d
+DIST python-gentoo-patches-3.4.5-0.tar.xz 12044 SHA256 84ee7630670a1dac4bbbc55fabf5f99b5b29007de4f140ad956e93d2e7aba8fa SHA512 108a4845667ecdf4001fcbeffab0cfbbac87439a449a7351428b0f3e2f159e3848ee0c0dfa45c9fba893b9f9584b33722fc8bb0bd7485a1d0909c3a35ede6ed8 WHIRLPOOL f0248faa0b4ce5679e37381bba90f8a4d361a49db792787bffc06a54a4bc82fea4d53255120f10e6dbf51b99e12417fc1b469be9624e73508fa3a212a38e7352
+DIST python-gentoo-patches-3.4.6-0.tar.xz 11728 SHA256 93e7c8487deefc36c612403fb6c82e495c46846a1952f9ed85f82af41840be4a SHA512 41c22dc8f1db8800fc0b97eed2b27bf1873e5de1369bd4aecf7a7a91e609a78e45a4b56fc89d575317f33a7704c0c1cad1494e8a993415a198f256e8338f49ab WHIRLPOOL 851945e7ccea985a88bcbd71bc404bc34c27a0e335386e9ed15fa9876aab3285ff559936fb2dcadf7ac0594a7cb03ac3a9e4135b67b350c5fdf33e9a44ca0654
+DIST python-gentoo-patches-3.5.3-0.tar.xz 11740 SHA256 34e83921697c31a5470afc09b8601b4f54466ac75b3b8ed3ed71af218af10d1c SHA512 16357e49573ea6abe6f106327c0f733312653c68726c4c3f0d1ec21df6d22bc69e512a28131b3a81eb2261e32376811a839b16604e72c7fb5abb7a692840228d WHIRLPOOL 99d3eb0a132f674b998e467a5d89e73d26cf547613034938ad255ccad9d34852b6b18a3da39659c8164b196788bdc90bf2e8ebc5c8c0c4f6fb6fc45fcdd406f5
+DIST python-gentoo-patches-3.5.4-0.tar.xz 11704 SHA256 30c9dbcd5c11ed025b9d8dd201da84c5b9f9756f9b6ba77ccaebc6b79a91e320 SHA512 d395a87695f700598026038d6929ea5038abd7d494294037a4dfa02d5262203dbbaa6ae258a5a7f35ff5542f6266dcf69cc0b9c3df2a047cd2f6699a87e182ec WHIRLPOOL 2191dc89805c1bc11d125005a5c5dd0e5fe635eb0a3d6698bef8b55f54741edc3b3e2588bb21f5eda517963489c15296cd5fd265c8a548d78be6093698e6b002
+DIST python-gentoo-patches-3.6.0-0.tar.xz 10680 SHA256 ecf78d292f2fef1116b41c3884f492d41ea716a14f0a21755ba2f8d76aefe1a7 SHA512 f340643cf338c693ce315fab705ba888040a2989b0887686d43886319419245c24bb46ebb71cea422644f1f3beaf64289b773e72db3377187bf11a83f9313a90 WHIRLPOOL 4a4d12ea0dbb03b5d2730db40b5aebe4c1c937cfe63341c775431dc06a3b60552b9390fdf9b7fff5e50024a93d11b269ef80a95afcf308327943f7003dd4c379
+DIST python-gentoo-patches-3.6.2-0.tar.xz 10744 SHA256 56729f9848557c52361c71404e5583368f6a0e93b5b6c2e643b59cb079e253d9 SHA512 2aac1700c541202aa4f43bff4cb521b996d52ab350133318abaddb43f4b6e20548f37de472ace8024ef325ebf63fdfff0d43f8aa1f717d3c56f974b7aa1764e3 WHIRLPOOL 90d1f12bee812f350ca0330a97290ce0d5c5fa9ccd816441944f042ef561d9023f4b79239f6d559f38a486fea458e48bf11d33d5bd6fa605875b686a2a845bd1
+EBUILD python-2.7.12.ebuild 10750 SHA256 097322c05e8ce3e749f15eded01b7dbcc8b198995dae192d702b86ca95e488fa SHA512 31b6427107ceaa3309b29bba84819f2e1695b5911904de0138767be78a0ee7f02234d5956b1802259ebdbbc726c6ac7de0c11ffddcecd913c2607696528430db WHIRLPOOL 4a4b7420478cdc1738bc2150f3133eddb5a0ef338de33dcbcfad3f92fac354e1adb4ec12d8f32a6015c19e63d8270880a4befeab53ebccccc4714be79755cbd3
+EBUILD python-2.7.13.ebuild 10760 SHA256 737b7816424813dc152da2026473b3b7d0d9f37afce12f635b5617129b18e202 SHA512 03ab6787b81dbe52268e75971242230263db1cb6e5d6c01f9b4e96b917d4faeedd77e087a6b7e05682b0c08a9c840fd91ffc3523bc207f14c432910e2c1cfa88 WHIRLPOOL e375c651b9b7cba5914be1e88c3201fa6acf316a765822aeb577d7009bacb19c9de7b25f4a8f2aed57be00e92015d8b5f7ba2383bb896b8d406093e91cc67955
+EBUILD python-2.7.14.ebuild 10760 SHA256 5c3a40aa1102d2c8f1ba14700ff13065eed95d91835f4fd7688fd51e5bfb9e30 SHA512 84bfda31b4b6a43bad20afe889fa75b93df793f96a2bc13759355bf1d3f99b056546b98796300d549d9a34de4f54d1c6bf335fac2d4027fb94a79d9643792d66 WHIRLPOOL 4f87307352f5fab3b47a306bd0b9317437f09d2e7d9e689ecfe4896e5333144e3d6803007a560a9be79ea54414e059cff24f8c1fd16ff98315aebdf9d23054df
+EBUILD python-3.4.5.ebuild 10493 SHA256 5e4fd02ad09f1ef78176f8f897a81d65a3a375c4bdd47bf220663d97996c53e1 SHA512 77559e269f8995fc93ea68824931c07b4be566ffd4775d4d30afd48e66a5fb34191d252ad5426c6cd2fcfa3c5176f50faf370b416ded6b8f2ea3957947d69448 WHIRLPOOL f8b532976b40049a5d139f060d614f6ea7d63b3a93e6d701826fb9ce724d4a9f37f14e8695ac5493e3addfc772c94ac682caf4ff13c71f6cc0a569cb9a950349
+EBUILD python-3.4.6.ebuild 10506 SHA256 62bef130a04d9a236da5daed8815af7cf4029ef69b62b41509b550b332d2b3c3 SHA512 aa7fd91eb9f7ded16cca1704dd69c7f99ec047cf98b5f2f6d40440d3774c784fa325f0e23d293d7aa9c3cc1d2da1c4bda673e87df207511e430892cac79336b7 WHIRLPOOL 26da088583376ea9977a89fb03409a8a1692f39dcc9b2bdcf1a7a7f5545d51850461f2ab46ea045b2722e35a41e91b4b795160aaaf4b3090ad1665409708ca14
+EBUILD python-3.5.3.ebuild 10616 SHA256 845df029dde963bc6c775456a99228d3dc68274e2fc2f02db821476a61a4ec29 SHA512 5f1126b0c265bed49c154e93be42c7e9f9fa2f9f1dccec36a66563ebc04dcdd7fb1e13c97dce7abc6e8645cbb3d9a46bddf0e6c11ce02d1d6ed1ed22c7622f04 WHIRLPOOL c66db283c54d200f7e603dc2694d34d433ac98f49fd081f1eada45848d841797f5ce4dd2a614653169eeb6e5f8eec02e5bacc052eb238477815f3cdb92fd7af1
+EBUILD python-3.5.4.ebuild 10616 SHA256 550dbb155008d6f261ae983275c97ada1602ffbba9b647e94a3c17b22322ac8c SHA512 71bd2471c429ffb24b733b30796faca1c71d90ff715fb74f8e65aa4c8647fc38900841f069362a50794938d2a055f9eac79b1e348ed5ffaa1dee9e486a4ac783 WHIRLPOOL d1f40206887f33e98a15e098dbacfa59ed50e21e825c7d5d7c0154ba630dee04ae08ece50a152dcc7f008bce7ea5bb756432b84b4699bc7ea4bb269bdc28491f
+EBUILD python-3.6.1-r1.ebuild 10099 SHA256 1ff374b0563ce797b936cb46169fb900023eb159f0508309fc8d1fe92165e714 SHA512 a3c0cd7ed326371124d5dbf28e53123200d7455e69d7b0d455ed5bb7a6229d5fc84f68f0307f7a1ac776770f7e920ee15e0ecba074aadc2f1f53a306efbafedd WHIRLPOOL b66f8ee06fe6f7516cd2f0008b524143cb81da424999cbfc7ee15670737969c1f28d8b782b612f6ae5fe7cb461b167fed4397424d40cc7c4403425a42145f44a
+EBUILD python-3.6.3.ebuild 10048 SHA256 65923d2c2bf9e3ac0059fc2d2c8b5ca85746f6d286ea71e887ad78da4cc068a0 SHA512 7ad64bef5a87331cf9e85e0c6713953632b80ad377cc9fadb278fd615a4cd2bfd0ade8ef812fca2c64fd42eb0e2f05f344b9c3503de6b13ac30c99ef125da041 WHIRLPOOL 583c1e37f9192788f1b7739e3b244dad9acf917f3579e87eb9740bda9f2c5adf1570bd28043dff2cbb9925ec48e6bfa080354a890af53af8ee9b01ae1352c5f7
+MISC ChangeLog 26323 SHA256 942a60afe8ad4d69f054645a4220ad8dc2eae24225f3c25acb6f71dead64fb82 SHA512 77a389f32babcce473a772076c963471c07c5c6dd6587d6df9c8a24384076b384ffcc3483848a08fa34032e61845bdfc17ddd2e15073cc68a66db8563470fc76 WHIRLPOOL 89485d421006e31d992195eb23af7cf0ddb37788550741b8f38a5fef97d003b59802f55c950128c06404d777a5dbf7a87e01eabe6554e19c17ada4bb713c696b
+MISC ChangeLog-2011 100599 SHA256 23129cb47321b2a6b1cb9323f1815d0cd11d6f30c3893908ed51575c270a0cc8 SHA512 4181ba9d965139ba58218da5b960c87b7a611b27606a1ab1ce1b4c3c9255b4e0e2947307cbfffc531f0f8b6b545ee11e083fcb29dc7b2b7ba31c6bb40b8ab128 WHIRLPOOL 4ceebb6a6ed58b906d3a7331795748ac6e4fe2e1401bcccae9024a8e81e2c444aebc5fec610398cfe6002354ad3b10487484598da5091867874727f07e239c56
+MISC ChangeLog-2015 40926 SHA256 f5d1dfa6038a588334062ea3e00e9ef9647ef13c7d667a0288a0cec4958aaa85 SHA512 36477f494cfe71e85401b97f1bf5035ebe255e4995886b74a2d535c9d77ca287d324adf239a3213e3be010793835d88f3f513b869bbeee57feb3cb2737549530 WHIRLPOOL b80dc69c8fa4666dbeb71e13c801ed332fbb80141076dc31e1e5b91f34531727f9b2004bee04b2415ad709c77e0be23318e96f4a7219c05dec79f99c22ffc853
+MISC metadata.xml 738 SHA256 beed28468aa4bb66e15e519f9816d94ee0f6a2e9a9e058cda3e6b7f2574b8465 SHA512 f938683740658db5d8eb363bf0eb88a81aab75b7a9e4c5e33bca73722c3b1a8b879151bda58099d67c5596a7dd5d487f15b0f7327918e35ac997e15feaf89847 WHIRLPOOL 0dbb9ae204b4bf8451b35ab170cd9d339a4fcc29f36000220fb148dddcf7c2c1515d41cccd4b759bda3dc8b88545ce1e99f3abff77564905e7dc50131b987dcf
diff --git a/dev-lang/python/files/3.6-blake2.patch b/dev-lang/python/files/3.6-blake2.patch
new file mode 100644
index 000000000000..48ee58559524
--- /dev/null
+++ b/dev-lang/python/files/3.6-blake2.patch
@@ -0,0 +1,37 @@
+From 2e7c906c085a01ea8175a19e1e143257abc8f566 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sun, 30 Jul 2017 11:17:39 -0400
+Subject: [PATCH] blake2: remove commented code
+
+The nested comments cause a build failure.
+
+Bug: https://bugs.gentoo.org/608586
+---
+ Modules/_blake2/impl/blake2s-load-xop.h | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+diff --git a/Modules/_blake2/impl/blake2s-load-xop.h b/Modules/_blake2/impl/blake2s-load-xop.h
+index a3b5d65e2d..7e76c399c6 100644
+--- a/Modules/_blake2/impl/blake2s-load-xop.h
++++ b/Modules/_blake2/impl/blake2s-load-xop.h
+@@ -18,17 +18,6 @@
+
+ #define TOB(x) ((x)*4*0x01010101 + 0x03020100) /* ..or not TOB */
+
+-/* Basic VPPERM emulation, for testing purposes */
+-/*static __m128i _mm_perm_epi8(const __m128i src1, const __m128i src2, const __m128i sel)
+-{
+- const __m128i sixteen = _mm_set1_epi8(16);
+- const __m128i t0 = _mm_shuffle_epi8(src1, sel);
+- const __m128i s1 = _mm_shuffle_epi8(src2, _mm_sub_epi8(sel, sixteen));
+- const __m128i mask = _mm_or_si128(_mm_cmpeq_epi8(sel, sixteen),
+- _mm_cmpgt_epi8(sel, sixteen)); /* (>=16) = 0xff : 00 */
+- return _mm_blendv_epi8(t0, s1, mask);
+-}*/
+-
+ #define LOAD_MSG_0_1(buf) \
+ buf = _mm_perm_epi8(m0, m1, _mm_set_epi32(TOB(6),TOB(4),TOB(2),TOB(0)) );
+
+--
+2.13.3
+
diff --git a/dev-lang/python/files/3.6.1-test_socket-AEAD.patch b/dev-lang/python/files/3.6.1-test_socket-AEAD.patch
new file mode 100644
index 000000000000..426e3371441c
--- /dev/null
+++ b/dev-lang/python/files/3.6.1-test_socket-AEAD.patch
@@ -0,0 +1,75 @@
+From 4ac01f0ff3e3c9c02f5cc8c55f2fbe4639808f5e Mon Sep 17 00:00:00 2001
+From: Mariatta <Mariatta@users.noreply.github.com>
+Date: Thu, 16 Mar 2017 20:58:42 -0700
+Subject: [PATCH] update test_socket AEAD test for kernel 4.9 and up (GH-133)
+ (GH-548)
+
+(cherry picked from commit 9764c151c51480a7ca6042b1ccd69be2620ff360)
+---
+ Lib/test/test_socket.py | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
+index 5315d475df..1508f20c9f 100644
+--- a/Lib/test/test_socket.py
++++ b/Lib/test/test_socket.py
+@@ -5479,7 +5479,7 @@ class LinuxKernelCryptoAPI(unittest.TestCase):
+ self.assertEqual(len(dec), msglen * multiplier)
+ self.assertEqual(dec, msg * multiplier)
+
+- @support.requires_linux_version(4, 3) # see test_aes_cbc
++ @support.requires_linux_version(4, 9) # see issue29324
+ def test_aead_aes_gcm(self):
+ key = bytes.fromhex('c939cc13397c1d37de6ae0e1cb7c423c')
+ iv = bytes.fromhex('b3d8cc017cbb89b39e0f67e2')
+@@ -5502,8 +5502,7 @@ class LinuxKernelCryptoAPI(unittest.TestCase):
+ op.sendmsg_afalg(op=socket.ALG_OP_ENCRYPT, iv=iv,
+ assoclen=assoclen, flags=socket.MSG_MORE)
+ op.sendall(assoc, socket.MSG_MORE)
+- op.sendall(plain, socket.MSG_MORE)
+- op.sendall(b'\x00' * taglen)
++ op.sendall(plain)
+ res = op.recv(assoclen + len(plain) + taglen)
+ self.assertEqual(expected_ct, res[assoclen:-taglen])
+ self.assertEqual(expected_tag, res[-taglen:])
+@@ -5511,7 +5510,7 @@ class LinuxKernelCryptoAPI(unittest.TestCase):
+ # now with msg
+ op, _ = algo.accept()
+ with op:
+- msg = assoc + plain + b'\x00' * taglen
++ msg = assoc + plain
+ op.sendmsg_afalg([msg], op=socket.ALG_OP_ENCRYPT, iv=iv,
+ assoclen=assoclen)
+ res = op.recv(assoclen + len(plain) + taglen)
+@@ -5522,7 +5521,7 @@ class LinuxKernelCryptoAPI(unittest.TestCase):
+ pack_uint32 = struct.Struct('I').pack
+ op, _ = algo.accept()
+ with op:
+- msg = assoc + plain + b'\x00' * taglen
++ msg = assoc + plain
+ op.sendmsg(
+ [msg],
+ ([socket.SOL_ALG, socket.ALG_SET_OP, pack_uint32(socket.ALG_OP_ENCRYPT)],
+@@ -5530,7 +5529,7 @@ class LinuxKernelCryptoAPI(unittest.TestCase):
+ [socket.SOL_ALG, socket.ALG_SET_AEAD_ASSOCLEN, pack_uint32(assoclen)],
+ )
+ )
+- res = op.recv(len(msg))
++ res = op.recv(len(msg) + taglen)
+ self.assertEqual(expected_ct, res[assoclen:-taglen])
+ self.assertEqual(expected_tag, res[-taglen:])
+
+@@ -5540,8 +5539,8 @@ class LinuxKernelCryptoAPI(unittest.TestCase):
+ msg = assoc + expected_ct + expected_tag
+ op.sendmsg_afalg([msg], op=socket.ALG_OP_DECRYPT, iv=iv,
+ assoclen=assoclen)
+- res = op.recv(len(msg))
+- self.assertEqual(plain, res[assoclen:-taglen])
++ res = op.recv(len(msg) - taglen)
++ self.assertEqual(plain, res[assoclen:])
+
+ @support.requires_linux_version(4, 3) # see test_aes_cbc
+ def test_drbg_pr_sha256(self):
+--
+2.12.2
+
diff --git a/dev-lang/python/files/pydoc.conf b/dev-lang/python/files/pydoc.conf
new file mode 100644
index 000000000000..3c6920cc96c4
--- /dev/null
+++ b/dev-lang/python/files/pydoc.conf
@@ -0,0 +1,6 @@
+# /etc/init.d/pydoc.conf
+
+# This file contains the configuration for pydoc's internal webserver.
+
+# Default port for Python's pydoc server.
+@PYDOC_PORT_VARIABLE@="7464"
diff --git a/dev-lang/python/files/pydoc.init b/dev-lang/python/files/pydoc.init
new file mode 100644
index 000000000000..f8e05636da4e
--- /dev/null
+++ b/dev-lang/python/files/pydoc.init
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public Licence v2
+
+start() {
+ local pydoc_port="${@PYDOC_PORT_VARIABLE@-${PYDOC_PORT}}"
+
+ if [ -z "${pydoc_port}" ]; then
+ eerror "Port not set"
+ return 1
+ fi
+
+ ebegin "Starting pydoc server on port ${pydoc_port}"
+ start-stop-daemon --start --background --make-pidfile \
+ --pidfile /var/run/@PYDOC@.pid \
+ --exec /usr/bin/@PYDOC@ -- -p "${pydoc_port}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pydoc server"
+ start-stop-daemon --stop --quiet --pidfile /var/run/@PYDOC@.pid
+ eend $?
+}
diff --git a/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch b/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch
new file mode 100644
index 000000000000..38433de925ed
--- /dev/null
+++ b/dev-lang/python/files/python-2.7.10-cross-compile-warn-test.patch
@@ -0,0 +1,24 @@
+https://bugs.python.org/issue25397
+
+improve the cross-compile tests to be more focused
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -1339,7 +1339,7 @@ if test "$GCC" = "yes"
+ then
+ AC_MSG_CHECKING(whether gcc supports ParseTuple __format__)
+ save_CFLAGS=$CFLAGS
+- CFLAGS="$CFLAGS -Werror -Wformat"
++ CFLAGS="$CFLAGS -Werror=format"
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]])
+ ],[
+@@ -4458,7 +4458,7 @@ then
+ [ac_cv_have_long_long_format="cross -- assuming no"
+ if test x$GCC = xyes; then
+ save_CFLAGS=$CFLAGS
+- CFLAGS="$CFLAGS -Werror -Wformat"
++ CFLAGS="$CFLAGS -Werror=format"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdio.h>
+ #include <stddef.h>
diff --git a/dev-lang/python/files/python-2.7.10-system-libffi.patch b/dev-lang/python/files/python-2.7.10-system-libffi.patch
new file mode 100644
index 000000000000..0b49b794bd8d
--- /dev/null
+++ b/dev-lang/python/files/python-2.7.10-system-libffi.patch
@@ -0,0 +1,36 @@
+make sure we respect the system libffi setting in our build config.
+the compiler probing is fragile and can break in some situations.
+
+--- a/setup.py
++++ b/setup.py
+@@ -2069,7 +2069,7 @@ class PyBuildExt(build_ext):
+ return True
+
+ def detect_ctypes(self, inc_dirs, lib_dirs):
+- self.use_system_libffi = False
++ self.use_system_libffi = ('--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"))
+ include_dirs = []
+ extra_compile_args = []
+ extra_link_args = []
+@@ -2113,7 +2113,7 @@ class PyBuildExt(build_ext):
+ sources=['_ctypes/_ctypes_test.c'])
+ self.extensions.extend([ext, ext_test])
+
+- if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):
++ if not self.use_system_libffi:
+ return
+
+ if host_platform == 'darwin':
+@@ -2141,10 +2141,10 @@ class PyBuildExt(build_ext):
+ ffi_lib = lib_name
+ break
+
+- if ffi_inc and ffi_lib:
++ if ffi_inc:
+ ext.include_dirs.extend(ffi_inc)
++ if ffi_lib:
+ ext.libraries.append(ffi_lib)
+- self.use_system_libffi = True
+
+
+ class PyBuildInstall(install):
diff --git a/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch b/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch
new file mode 100644
index 000000000000..a762dfb10882
--- /dev/null
+++ b/dev-lang/python/files/python-2.7.5-nonfatal-compileall.patch
@@ -0,0 +1,18 @@
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1000,12 +1000,12 @@
+ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
+ $(DESTDIR)$(LIBDEST)/distutils/tests ; \
+ fi
+- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
+- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
++ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
diff --git a/dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch b/dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch
new file mode 100644
index 000000000000..38ce6f78b91b
--- /dev/null
+++ b/dev-lang/python/files/python-2.7.9-ncurses-pkg-config.patch
@@ -0,0 +1,13 @@
+do not hardcode /usr/include paths
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -4316,7 +4316,7 @@ fi
+
+ # first curses configure check
+ ac_save_cppflags="$CPPFLAGS"
+-CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
++CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
+
+ AC_CHECK_HEADERS(curses.h ncurses.h)
+
diff --git a/dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch b/dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch
new file mode 100644
index 000000000000..8bfad1142789
--- /dev/null
+++ b/dev-lang/python/files/python-3.4.3-ncurses-pkg-config.patch
@@ -0,0 +1,13 @@
+do not hardcode /usr/include paths
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -4402,7 +4402,7 @@ fi
+
+ # first curses header check
+ ac_save_cppflags="$CPPFLAGS"
+-CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
++CPPFLAGS="$CPPFLAGS `$PKG_CONFIG --cflags ncursesw`"
+
+ AC_CHECK_HEADERS(curses.h ncurses.h)
+
diff --git a/dev-lang/python/files/python-3.4.5-cross.patch b/dev-lang/python/files/python-3.4.5-cross.patch
new file mode 100644
index 000000000000..7a016ffbd488
--- /dev/null
+++ b/dev-lang/python/files/python-3.4.5-cross.patch
@@ -0,0 +1,11 @@
+--- a/Lib/distutils/command/build_ext.py
++++ b/Lib/distutils/command/build_ext.py
+@@ -729,7 +729,7 @@
+ if sysconfig.get_config_var('Py_ENABLE_SHARED'):
+ pythonlib = 'python{}.{}{}'.format(
+ sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff,
+- sys.abiflags)
++ sysconfig.get_config_var('ABIFLAGS'))
+ return ext.libraries + [pythonlib]
+ else:
+ return ext.libraries
diff --git a/dev-lang/python/files/python-3.5-distutils-OO-build.patch b/dev-lang/python/files/python-3.5-distutils-OO-build.patch
new file mode 100644
index 000000000000..8af8c30c76fe
--- /dev/null
+++ b/dev-lang/python/files/python-3.5-distutils-OO-build.patch
@@ -0,0 +1,80 @@
+From 90507018442f9adabb586fd3d0a0206b9c2f2f50 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 5 Jun 2016 08:18:01 +0200
+Subject: [PATCH] distutils: make -OO enable both opt-1 and opt-2 optimization
+
+Bug: http://bugs.python.org/issue27226
+Bug: https://bugs.gentoo.org/585060
+---
+ Lib/distutils/command/build_py.py | 8 ++++----
+ Lib/distutils/command/install_lib.py | 12 ++++++------
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py
+index cf0ca57..838d4e4 100644
+--- a/Lib/distutils/command/build_py.py
++++ b/Lib/distutils/command/build_py.py
+@@ -315,9 +315,9 @@ class build_py (Command):
+ if self.compile:
+ outputs.append(importlib.util.cache_from_source(
+ filename, optimization=''))
+- if self.optimize > 0:
++ for opt in range(1, self.optimize + 1):
+ outputs.append(importlib.util.cache_from_source(
+- filename, optimization=self.optimize))
++ filename, optimization=opt))
+
+ outputs += [
+ os.path.join(build_dir, filename)
+@@ -387,8 +387,8 @@ class build_py (Command):
+ if self.compile:
+ byte_compile(files, optimize=0,
+ force=self.force, prefix=prefix, dry_run=self.dry_run)
+- if self.optimize > 0:
+- byte_compile(files, optimize=self.optimize,
++ for opt in range(1, self.optimize + 1):
++ byte_compile(files, optimize=opt,
+ force=self.force, prefix=prefix, dry_run=self.dry_run)
+
+ class build_py_2to3(build_py, Mixin2to3):
+diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py
+index 6154cf0..049b662 100644
+--- a/Lib/distutils/command/install_lib.py
++++ b/Lib/distutils/command/install_lib.py
+@@ -24,8 +24,8 @@ class install_lib(Command):
+ # 2) compile .pyc only (--compile --no-optimize; default)
+ # 3) compile .pyc and "opt-1" .pyc (--compile --optimize)
+ # 4) compile "opt-1" .pyc only (--no-compile --optimize)
+- # 5) compile .pyc and "opt-2" .pyc (--compile --optimize-more)
+- # 6) compile "opt-2" .pyc only (--no-compile --optimize-more)
++ # 5) compile .pyc, "opt-1" and "opt-2" .pyc (--compile --optimize-more)
++ # 6) compile "opt-1" and "opt-2" .pyc (--no-compile --optimize-more)
+ #
+ # The UI for this is two options, 'compile' and 'optimize'.
+ # 'compile' is strictly boolean, and only decides whether to
+@@ -132,8 +132,8 @@ class install_lib(Command):
+ byte_compile(files, optimize=0,
+ force=self.force, prefix=install_root,
+ dry_run=self.dry_run)
+- if self.optimize > 0:
+- byte_compile(files, optimize=self.optimize,
++ for opt in range(1, self.optimize + 1):
++ byte_compile(files, optimize=opt,
+ force=self.force, prefix=install_root,
+ verbose=self.verbose, dry_run=self.dry_run)
+
+@@ -167,9 +167,9 @@ class install_lib(Command):
+ if self.compile:
+ bytecode_files.append(importlib.util.cache_from_source(
+ py_file, optimization=''))
+- if self.optimize > 0:
++ for opt in range(1, self.optimize + 1):
+ bytecode_files.append(importlib.util.cache_from_source(
+- py_file, optimization=self.optimize))
++ py_file, optimization=opt))
+
+ return bytecode_files
+
+--
+2.8.3
+
diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml
new file mode 100644
index 000000000000..6a4ebd8b872c
--- /dev/null
+++ b/dev-lang/python/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="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+</maintainer>
+<use>
+ <flag name="threads">Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag>
+ <flag name="wide-unicode">Enable wide Unicode implementation which uses 4-byte Unicode characters. Switching of this USE flag changes ABI of Python and requires reinstallation of many Python modules. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag>
+ <flag name="wininst">Install Windows executables required to create an executable installer for MS Windows.</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-lang/python/python-2.7.12.ebuild b/dev-lang/python/python-2.7.12.ebuild
new file mode 100644
index 000000000000..f7f4c18b11fa
--- /dev/null
+++ b/dev-lang/python/python-2.7.12.ebuild
@@ -0,0 +1,365 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="2.7.12-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="2.7"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
+
+# Do not add a dependency on dev-lang/python to this ebuild.
+# If you need to apply a patch which requires python for bootstrapping, please
+# run the bootstrap code on your dev box and include the results in the
+# patchset. See bug 447752.
+
+RDEPEND="app-arch/bzip2:0=
+ >=sys-libs/zlib-1.1.3:0=
+ virtual/libffi
+ virtual/libintl
+ berkdb? ( || (
+ sys-libs/db:5.3
+ sys-libs/db:5.2
+ sys-libs/db:5.1
+ sys-libs/db:5.0
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5
+ sys-libs/db:4.4
+ sys-libs/db:4.3
+ sys-libs/db:4.2
+ ) )
+ gdbm? ( sys-libs/gdbm:0=[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2:0=
+ readline? ( >=sys-libs/readline-4.1:0= )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ tk? (
+ >=dev-lang/tcl-8.0:0=
+ >=dev-lang/tk-8.0:0=
+ dev-tcltk/blt:0=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1 )
+ !!<sys-apps/portage-2.1.9"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/autoconf-2.65
+ !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )
+ doc? ( dev-python/python-docs:${SLOT} )"
+PDEPEND=">=app-eselect/eselect-python-20140125-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if use berkdb; then
+ ewarn "'bsddb' module is out-of-date and no longer maintained inside"
+ ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally"
+ ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module"
+ ewarn "is provided by dev-python/bsddb3."
+ else
+ if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then
+ ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"
+ ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
+ ewarn "You might need to migrate your databases."
+ fi
+ fi
+}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -r Modules/expat || die
+ rm -r Modules/_ctypes/libffi* || die
+ rm -r Modules/zlib || die
+
+ if tc-is-cross-compiler; then
+ local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
+ fi
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+
+ # Fix for cross-compiling.
+ epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch"
+ epatch "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch"
+ epatch "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch"
+ epatch "${FILESDIR}/python-2.7.10-system-libffi.patch"
+
+ epatch_user
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ Lib/distutils/command/install.py \
+ Lib/distutils/sysconfig.py \
+ Lib/site.py \
+ Lib/sysconfig.py \
+ Lib/test/test_site.py \
+ Makefile.pre.in \
+ Modules/Setup.dist \
+ Modules/getpath.c \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ eautoreconf
+}
+
+src_configure() {
+ # dbm module can be linked against berkdb or gdbm.
+ # Defaults to gdbm when both are enabled, #204343.
+ local disable
+ use berkdb || use gdbm || disable+=" dbm"
+ use berkdb || disable+=" _bsddb"
+ use gdbm || disable+=" gdbm"
+ use ncurses || disable+=" _curses _curses_panel"
+ use readline || disable+=" readline"
+ use sqlite || disable+=" _sqlite3"
+ use ssl || export PYTHON_DISABLE_SSL="1"
+ use tk || disable+=" _tkinter"
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
+ export PYTHON_DISABLE_MODULES="${disable}"
+
+ if ! use xml; then
+ ewarn "You have configured Python without XML support."
+ ewarn "This is NOT a recommended configuration as you"
+ ewarn "may face problems parsing any XML documents."
+ fi
+
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+ fi
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ if tc-is-cross-compiler; then
+ # Force some tests that try to poke fs paths.
+ export ac_cv_file__dev_ptc=no
+ export ac_cv_file__dev_ptmx=yes
+ fi
+
+ # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile.
+ tc-export CXX
+ # The configure script fails to use pkg-config correctly.
+ # http://bugs.python.org/issue15506
+ export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
+
+ # Set LDFLAGS so we link modules with -lpython2.7 correctly.
+ # Needed on FreeBSD unless Python 2.7 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ local dbmliborder
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+ if use berkdb; then
+ dbmliborder+="${dbmliborder:+:}bdb"
+ fi
+
+ BUILD_DIR="${WORKDIR}/${CHOST}"
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ ECONF_SOURCE="${S}" OPT="" \
+ econf \
+ --with-fpectl \
+ --enable-shared \
+ $(use_enable ipv6) \
+ $(use_with threads) \
+ $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \
+ --infodir='${prefix}/share/info' \
+ --mandir='${prefix}/share/man' \
+ --with-computed-gotos \
+ --with-dbmliborder="${dbmliborder}" \
+ --with-libc="" \
+ --enable-loadable-sqlite-extensions \
+ --with-system-expat \
+ --with-system-ffi \
+ --without-ensurepip
+
+ if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
+ eerror "configure has detected that the sem_open function is broken."
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
+ die "Broken sem_open function (bug 496328)"
+ fi
+}
+
+src_compile() {
+ # Avoid invoking pgen for cross-compiles.
+ touch Include/graminit.h Python/graminit.c
+
+ cd "${BUILD_DIR}" || die
+ emake
+
+ # Work around bug 329499. See also bug 413751 and 457194.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E python
+ else
+ pax-mark m python
+ fi
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ cd "${BUILD_DIR}" || die
+
+ # Skip failing tests.
+ local skipped_tests="distutils gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # Daylight saving time problem
+ # https://bugs.python.org/issue22067
+ # https://bugs.gentoo.org/610628
+ local -x TZ=UTC
+
+ # Rerun failed tests in verbose mode (regrtest -w).
+ emake test EXTRATESTOPTS="-w" < /dev/tty
+ local result="$?"
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'"
+ elog "and run the tests separately."
+
+ if [[ "${result}" -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
+
+ cd "${BUILD_DIR}" || die
+ emake DESTDIR="${D}" altinstall
+
+ sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed"
+
+ # Fix collisions between different slots of Python.
+ mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}"
+ mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}"
+ mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}"
+ rm -f "${ED}usr/bin/smtpd.py"
+
+ use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} || die
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+ use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die
+ use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test}
+
+ use threads || rm -r "${libdir}/multiprocessing" || die
+ use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die
+
+ dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r "${S}"/Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
+
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT}
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT}
+ sed \
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
+ -e "s:@PYDOC@:pydoc${SLOT}:" \
+ -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
+
+ # for python-exec
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ else
+ vars=( PYTHON "${vars[@]}" )
+ fi
+
+ python_export "python${SLOT}" "${vars[@]}"
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${SLOT%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/python${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ ln -s "../../../bin/python${SLOT}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+ # 2to3, pydoc, pyvenv
+ ln -s "../../../bin/2to3-${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/idle" || die
+ fi
+}
+
+eselect_python_update() {
+ if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
+ eselect python update
+ fi
+
+ if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
+ eselect python update --python${PV%%.*}
+ fi
+}
+
+pkg_postinst() {
+ eselect_python_update
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-2.7.13.ebuild b/dev-lang/python/python-2.7.13.ebuild
new file mode 100644
index 000000000000..18e0186ada11
--- /dev/null
+++ b/dev-lang/python/python-2.7.13.ebuild
@@ -0,0 +1,365 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="2.7.13-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="2.7"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
+
+# Do not add a dependency on dev-lang/python to this ebuild.
+# If you need to apply a patch which requires python for bootstrapping, please
+# run the bootstrap code on your dev box and include the results in the
+# patchset. See bug 447752.
+
+RDEPEND="app-arch/bzip2:0=
+ >=sys-libs/zlib-1.1.3:0=
+ virtual/libffi
+ virtual/libintl
+ berkdb? ( || (
+ sys-libs/db:5.3
+ sys-libs/db:5.2
+ sys-libs/db:5.1
+ sys-libs/db:5.0
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5
+ sys-libs/db:4.4
+ sys-libs/db:4.3
+ sys-libs/db:4.2
+ ) )
+ gdbm? ( sys-libs/gdbm:0=[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2:0=
+ readline? ( >=sys-libs/readline-4.1:0= )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ tk? (
+ >=dev-lang/tcl-8.0:0=
+ >=dev-lang/tk-8.0:0=
+ dev-tcltk/blt:0=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1 )
+ !!<sys-apps/portage-2.1.9"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/autoconf-2.65
+ !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )
+ doc? ( dev-python/python-docs:${SLOT} )"
+PDEPEND=">=app-eselect/eselect-python-20140125-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if use berkdb; then
+ ewarn "'bsddb' module is out-of-date and no longer maintained inside"
+ ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally"
+ ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module"
+ ewarn "is provided by dev-python/bsddb3."
+ else
+ if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then
+ ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"
+ ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
+ ewarn "You might need to migrate your databases."
+ fi
+ fi
+}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -r Modules/expat || die
+ rm -r Modules/_ctypes/libffi* || die
+ rm -r Modules/zlib || die
+
+ if tc-is-cross-compiler; then
+ local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
+ fi
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+
+ # Fix for cross-compiling.
+ epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch"
+ epatch "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch"
+ epatch "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch"
+ epatch "${FILESDIR}/python-2.7.10-system-libffi.patch"
+
+ epatch_user
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ Lib/distutils/command/install.py \
+ Lib/distutils/sysconfig.py \
+ Lib/site.py \
+ Lib/sysconfig.py \
+ Lib/test/test_site.py \
+ Makefile.pre.in \
+ Modules/Setup.dist \
+ Modules/getpath.c \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ eautoreconf
+}
+
+src_configure() {
+ # dbm module can be linked against berkdb or gdbm.
+ # Defaults to gdbm when both are enabled, #204343.
+ local disable
+ use berkdb || use gdbm || disable+=" dbm"
+ use berkdb || disable+=" _bsddb"
+ use gdbm || disable+=" gdbm"
+ use ncurses || disable+=" _curses _curses_panel"
+ use readline || disable+=" readline"
+ use sqlite || disable+=" _sqlite3"
+ use ssl || export PYTHON_DISABLE_SSL="1"
+ use tk || disable+=" _tkinter"
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
+ export PYTHON_DISABLE_MODULES="${disable}"
+
+ if ! use xml; then
+ ewarn "You have configured Python without XML support."
+ ewarn "This is NOT a recommended configuration as you"
+ ewarn "may face problems parsing any XML documents."
+ fi
+
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+ fi
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ if tc-is-cross-compiler; then
+ # Force some tests that try to poke fs paths.
+ export ac_cv_file__dev_ptc=no
+ export ac_cv_file__dev_ptmx=yes
+ fi
+
+ # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile.
+ tc-export CXX
+ # The configure script fails to use pkg-config correctly.
+ # http://bugs.python.org/issue15506
+ export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
+
+ # Set LDFLAGS so we link modules with -lpython2.7 correctly.
+ # Needed on FreeBSD unless Python 2.7 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ local dbmliborder
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+ if use berkdb; then
+ dbmliborder+="${dbmliborder:+:}bdb"
+ fi
+
+ BUILD_DIR="${WORKDIR}/${CHOST}"
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ ECONF_SOURCE="${S}" OPT="" \
+ econf \
+ --with-fpectl \
+ --enable-shared \
+ $(use_enable ipv6) \
+ $(use_with threads) \
+ $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \
+ --infodir='${prefix}/share/info' \
+ --mandir='${prefix}/share/man' \
+ --with-computed-gotos \
+ --with-dbmliborder="${dbmliborder}" \
+ --with-libc="" \
+ --enable-loadable-sqlite-extensions \
+ --with-system-expat \
+ --with-system-ffi \
+ --without-ensurepip
+
+ if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
+ eerror "configure has detected that the sem_open function is broken."
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
+ die "Broken sem_open function (bug 496328)"
+ fi
+}
+
+src_compile() {
+ # Avoid invoking pgen for cross-compiles.
+ touch Include/graminit.h Python/graminit.c
+
+ cd "${BUILD_DIR}" || die
+ emake
+
+ # Work around bug 329499. See also bug 413751 and 457194.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E python
+ else
+ pax-mark m python
+ fi
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ cd "${BUILD_DIR}" || die
+
+ # Skip failing tests.
+ local skipped_tests="distutils gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # Daylight saving time problem
+ # https://bugs.python.org/issue22067
+ # https://bugs.gentoo.org/610628
+ local -x TZ=UTC
+
+ # Rerun failed tests in verbose mode (regrtest -w).
+ emake test EXTRATESTOPTS="-w" < /dev/tty
+ local result="$?"
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'"
+ elog "and run the tests separately."
+
+ if [[ "${result}" -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
+
+ cd "${BUILD_DIR}" || die
+ emake DESTDIR="${D}" altinstall
+
+ sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed"
+
+ # Fix collisions between different slots of Python.
+ mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}"
+ mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}"
+ mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}"
+ rm -f "${ED}usr/bin/smtpd.py"
+
+ use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+ use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die
+ use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test}
+
+ use threads || rm -r "${libdir}/multiprocessing" || die
+ use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die
+
+ dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r "${S}"/Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
+
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT}
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT}
+ sed \
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
+ -e "s:@PYDOC@:pydoc${SLOT}:" \
+ -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
+
+ # for python-exec
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ else
+ vars=( PYTHON "${vars[@]}" )
+ fi
+
+ python_export "python${SLOT}" "${vars[@]}"
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${SLOT%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/python${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ ln -s "../../../bin/python${SLOT}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+ # 2to3, pydoc, pyvenv
+ ln -s "../../../bin/2to3-${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/idle" || die
+ fi
+}
+
+eselect_python_update() {
+ if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
+ eselect python update
+ fi
+
+ if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
+ eselect python update --python${PV%%.*}
+ fi
+}
+
+pkg_postinst() {
+ eselect_python_update
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-2.7.14.ebuild b/dev-lang/python/python-2.7.14.ebuild
new file mode 100644
index 000000000000..935f0216254f
--- /dev/null
+++ b/dev-lang/python/python-2.7.14.ebuild
@@ -0,0 +1,365 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="2.7.14-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="2.7"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml"
+
+# Do not add a dependency on dev-lang/python to this ebuild.
+# If you need to apply a patch which requires python for bootstrapping, please
+# run the bootstrap code on your dev box and include the results in the
+# patchset. See bug 447752.
+
+RDEPEND="app-arch/bzip2:0=
+ >=sys-libs/zlib-1.1.3:0=
+ virtual/libffi
+ virtual/libintl
+ berkdb? ( || (
+ sys-libs/db:5.3
+ sys-libs/db:5.2
+ sys-libs/db:5.1
+ sys-libs/db:5.0
+ sys-libs/db:4.8
+ sys-libs/db:4.7
+ sys-libs/db:4.6
+ sys-libs/db:4.5
+ sys-libs/db:4.4
+ sys-libs/db:4.3
+ sys-libs/db:4.2
+ ) )
+ gdbm? ( sys-libs/gdbm:0=[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2:0=
+ readline? ( >=sys-libs/readline-4.1:0= )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ tk? (
+ >=dev-lang/tcl-8.0:0=
+ >=dev-lang/tk-8.0:0=
+ dev-tcltk/blt:0=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1 )
+ !!<sys-apps/portage-2.1.9"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/autoconf-2.65
+ !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )
+ doc? ( dev-python/python-docs:${SLOT} )"
+PDEPEND=">=app-eselect/eselect-python-20140125-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if use berkdb; then
+ ewarn "'bsddb' module is out-of-date and no longer maintained inside"
+ ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally"
+ ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module"
+ ewarn "is provided by dev-python/bsddb3."
+ else
+ if has_version "=${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"; then
+ ewarn "You are migrating from =${CATEGORY}/${PN}-${PV%%.*}*[berkdb]"
+ ewarn "to =${CATEGORY}/${PN}-${PV%%.*}*[-berkdb]."
+ ewarn "You might need to migrate your databases."
+ fi
+ fi
+}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -r Modules/expat || die
+ rm -r Modules/_ctypes/libffi* || die
+ rm -r Modules/zlib || die
+
+ if tc-is-cross-compiler; then
+ local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
+ fi
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+
+ # Fix for cross-compiling.
+ epatch "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch"
+ epatch "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch"
+ epatch "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch"
+ epatch "${FILESDIR}/python-2.7.10-system-libffi.patch"
+
+ epatch_user
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ Lib/distutils/command/install.py \
+ Lib/distutils/sysconfig.py \
+ Lib/site.py \
+ Lib/sysconfig.py \
+ Lib/test/test_site.py \
+ Makefile.pre.in \
+ Modules/Setup.dist \
+ Modules/getpath.c \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ eautoreconf
+}
+
+src_configure() {
+ # dbm module can be linked against berkdb or gdbm.
+ # Defaults to gdbm when both are enabled, #204343.
+ local disable
+ use berkdb || use gdbm || disable+=" dbm"
+ use berkdb || disable+=" _bsddb"
+ use gdbm || disable+=" gdbm"
+ use ncurses || disable+=" _curses _curses_panel"
+ use readline || disable+=" readline"
+ use sqlite || disable+=" _sqlite3"
+ use ssl || export PYTHON_DISABLE_SSL="1"
+ use tk || disable+=" _tkinter"
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
+ export PYTHON_DISABLE_MODULES="${disable}"
+
+ if ! use xml; then
+ ewarn "You have configured Python without XML support."
+ ewarn "This is NOT a recommended configuration as you"
+ ewarn "may face problems parsing any XML documents."
+ fi
+
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+ fi
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ if tc-is-cross-compiler; then
+ # Force some tests that try to poke fs paths.
+ export ac_cv_file__dev_ptc=no
+ export ac_cv_file__dev_ptmx=yes
+ fi
+
+ # Export CXX so it ends up in /usr/lib/python2.X/config/Makefile.
+ tc-export CXX
+ # The configure script fails to use pkg-config correctly.
+ # http://bugs.python.org/issue15506
+ export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
+
+ # Set LDFLAGS so we link modules with -lpython2.7 correctly.
+ # Needed on FreeBSD unless Python 2.7 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ local dbmliborder
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+ if use berkdb; then
+ dbmliborder+="${dbmliborder:+:}bdb"
+ fi
+
+ BUILD_DIR="${WORKDIR}/${CHOST}"
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ ECONF_SOURCE="${S}" OPT="" \
+ econf \
+ --with-fpectl \
+ --enable-shared \
+ $(use_enable ipv6) \
+ $(use_with threads) \
+ $(use wide-unicode && echo "--enable-unicode=ucs4" || echo "--enable-unicode=ucs2") \
+ --infodir='${prefix}/share/info' \
+ --mandir='${prefix}/share/man' \
+ --with-computed-gotos \
+ --with-dbmliborder="${dbmliborder}" \
+ --with-libc="" \
+ --enable-loadable-sqlite-extensions \
+ --with-system-expat \
+ --with-system-ffi \
+ --without-ensurepip
+
+ if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
+ eerror "configure has detected that the sem_open function is broken."
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
+ die "Broken sem_open function (bug 496328)"
+ fi
+}
+
+src_compile() {
+ # Avoid invoking pgen for cross-compiles.
+ touch Include/graminit.h Python/graminit.c
+
+ cd "${BUILD_DIR}" || die
+ emake
+
+ # Work around bug 329499. See also bug 413751 and 457194.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E python
+ else
+ pax-mark m python
+ fi
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ cd "${BUILD_DIR}" || die
+
+ # Skip failing tests.
+ local skipped_tests="distutils gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ # Daylight saving time problem
+ # https://bugs.python.org/issue22067
+ # https://bugs.gentoo.org/610628
+ local -x TZ=UTC
+
+ # Rerun failed tests in verbose mode (regrtest -w).
+ emake test EXTRATESTOPTS="-w" < /dev/tty
+ local result="$?"
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/$(get_libdir)/python${SLOT}/test'"
+ elog "and run the tests separately."
+
+ if [[ "${result}" -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/$(get_libdir)/python${SLOT}
+
+ cd "${BUILD_DIR}" || die
+ emake DESTDIR="${D}" altinstall
+
+ sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed"
+
+ # Fix collisions between different slots of Python.
+ mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}"
+ mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}"
+ mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}"
+ rm -f "${ED}usr/bin/smtpd.py"
+
+ use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+ use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die
+ use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test}
+
+ use threads || rm -r "${libdir}/multiprocessing" || die
+ use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die
+
+ dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins -r "${S}"/Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
+
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT}
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT}
+ sed \
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \
+ -e "s:@PYDOC@:pydoc${SLOT}:" \
+ -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed"
+
+ # for python-exec
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ else
+ vars=( PYTHON "${vars[@]}" )
+ fi
+
+ python_export "python${SLOT}" "${vars[@]}"
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${SLOT%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/python${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ ln -s "../../../bin/python${SLOT}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+ # 2to3, pydoc, pyvenv
+ ln -s "../../../bin/2to3-${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${SLOT}" \
+ "${D}${PYTHON_SCRIPTDIR}/idle" || die
+ fi
+}
+
+eselect_python_update() {
+ if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
+ eselect python update
+ fi
+
+ if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
+ eselect python update --python${PV%%.*}
+ fi
+}
+
+pkg_postinst() {
+ eselect_python_update
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-3.4.5.ebuild b/dev-lang/python/python-3.4.5.ebuild
new file mode 100644
index 000000000000..5586215492b1
--- /dev/null
+++ b/dev-lang/python/python-3.4.5.ebuild
@@ -0,0 +1,356 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
+
+MY_P="Python-${PV/_/}"
+PATCHSET_VERSION="3.4.5-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.4/3.4m"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml"
+
+# Do not add a dependency on dev-lang/python to this ebuild.
+# If you need to apply a patch which requires python for bootstrapping, please
+# run the bootstrap code on your dev box and include the results in the
+# patchset. See bug 447752.
+
+RDEPEND="app-arch/bzip2:0=
+ app-arch/xz-utils:0=
+ >=sys-libs/zlib-1.1.3:0=
+ virtual/libffi
+ virtual/libintl
+ gdbm? ( sys-libs/gdbm:0=[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2:0=
+ readline? ( >=sys-libs/readline-4.1:0= )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ tk? (
+ >=dev-lang/tcl-8.0:0=
+ >=dev-lang/tk-8.0:0=
+ dev-tcltk/blt:0=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1:0= )
+ !!<sys-apps/sandbox-2.6-r1"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/autoconf-2.65
+ !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+PDEPEND=">=app-eselect/eselect-python-20140125-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+PYVER=${SLOT%/*}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -fr Modules/expat
+ rm -fr Modules/_ctypes/libffi*
+ rm -fr Modules/zlib
+
+ if tc-is-cross-compiler; then
+ # Invokes BUILDPYTHON, which is built for the host arch
+ local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
+ fi
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+ epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch"
+ epatch "${FILESDIR}/${PN}-3.4.5-cross.patch"
+
+ epatch_user
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ configure.ac \
+ Lib/distutils/command/install.py \
+ Lib/distutils/sysconfig.py \
+ Lib/site.py \
+ Lib/sysconfig.py \
+ Lib/test/test_site.py \
+ Makefile.pre.in \
+ Modules/Setup.dist \
+ Modules/getpath.c \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ eautoreconf
+}
+
+src_configure() {
+ local disable
+ use gdbm || disable+=" gdbm"
+ use ncurses || disable+=" _curses _curses_panel"
+ use readline || disable+=" readline"
+ use sqlite || disable+=" _sqlite3"
+ use ssl || export PYTHON_DISABLE_SSL="1"
+ use tk || disable+=" _tkinter"
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
+ export PYTHON_DISABLE_MODULES="${disable}"
+
+ if ! use xml; then
+ ewarn "You have configured Python without XML support."
+ ewarn "This is NOT a recommended configuration as you"
+ ewarn "may face problems parsing any XML documents."
+ fi
+
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+ fi
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
+ tc-export CXX
+
+ # The configure script fails to use pkg-config correctly.
+ # http://bugs.python.org/issue15506
+ export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
+
+ # Set LDFLAGS so we link modules with -lpython3.2 correctly.
+ # Needed on FreeBSD unless Python 3.2 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ local dbmliborder
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+
+ BUILD_DIR="${WORKDIR}/${CHOST}"
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ ECONF_SOURCE="${S}" OPT="" \
+ econf \
+ --with-fpectl \
+ --enable-shared \
+ $(use_enable ipv6) \
+ $(use_with threads) \
+ --infodir='${prefix}/share/info' \
+ --mandir='${prefix}/share/man' \
+ --with-computed-gotos \
+ --with-dbmliborder="${dbmliborder}" \
+ --with-libc="" \
+ --enable-loadable-sqlite-extensions \
+ --with-system-expat \
+ --with-system-ffi \
+ --without-ensurepip
+
+ if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
+ eerror "configure has detected that the sem_open function is broken."
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
+ die "Broken sem_open function (bug 496328)"
+ fi
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+
+ # Avoid invoking pgen for cross-compiles.
+ touch Include/graminit.h Python/graminit.c || die
+
+ cd "${BUILD_DIR}" || die
+
+ emake CPPFLAGS= CFLAGS= LDFLAGS=
+
+ # Work around bug 329499. See also bug 413751 and 457194.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E python
+ else
+ pax-mark m python
+ fi
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ cd "${BUILD_DIR}" || die
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ local -x PYTHONDONTWRITEBYTECODE=
+ emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local result=$?
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
+ elog "and run the tests separately."
+
+ if [[ ${result} -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
+
+ cd "${BUILD_DIR}" || die
+
+ emake DESTDIR="${D}" altinstall
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
+
+ # Fix collisions between different slots of Python.
+ rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+
+ # Cheap hack to get version with ABIFLAGS
+ local abiver=$(cd "${ED}usr/include"; echo python*)
+ if [[ ${abiver} != python${PYVER} ]]; then
+ # Replace python3.X with a symlink to python3.Xm
+ rm "${ED}usr/bin/python${PYVER}" || die
+ dosym "${abiver}" "/usr/bin/python${PYVER}"
+ # Create python3.X-config symlink
+ dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+ # Create python-3.5m.pc symlink
+ dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
+ fi
+
+ use elibc_uclibc && rm -fr "${libdir}/test"
+ use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
+
+ use threads || rm -fr "${libdir}/multiprocessing"
+ use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe
+
+ dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
+ doins -r "${S}"/Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
+
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
+ sed \
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
+ -e "s:@PYDOC@:pydoc${PYVER}:" \
+ -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
+
+ # for python-exec
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ else
+ vars=( PYTHON "${vars[@]}" )
+ fi
+
+ python_export "python${PYVER}" "${vars[@]}"
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${PYVER%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/${abiver}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ # note: we need to create a wrapper rather than symlinking it due
+ # to some random dirname(argv[0]) magic performed by python-config
+ cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
+ #!/bin/sh
+ exec "${abiver}-config" "\${@}"
+ EOF
+ chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+ # 2to3, pydoc, pyvenv
+ ln -s "../../../bin/2to3-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+ ln -s "../../../bin/pyvenv-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/idle" || die
+ fi
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
+ python_updater_warning="1"
+ fi
+}
+
+eselect_python_update() {
+ if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
+ eselect python update
+ fi
+
+ if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
+ eselect python update --python${PV%%.*}
+ fi
+}
+
+pkg_postinst() {
+ eselect_python_update
+
+ if [[ "${python_updater_warning}" == "1" ]]; then
+ ewarn "You have just upgraded from an older version of Python."
+ ewarn
+ ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-3.4.6.ebuild b/dev-lang/python/python-3.4.6.ebuild
new file mode 100644
index 000000000000..f5d3c43753b3
--- /dev/null
+++ b/dev-lang/python/python-3.4.6.ebuild
@@ -0,0 +1,356 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing
+
+MY_P="Python-${PV/_/}"
+PATCHSET_VERSION="3.4.6-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.4/3.4m"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml"
+
+# Do not add a dependency on dev-lang/python to this ebuild.
+# If you need to apply a patch which requires python for bootstrapping, please
+# run the bootstrap code on your dev box and include the results in the
+# patchset. See bug 447752.
+
+RDEPEND="app-arch/bzip2:0=
+ app-arch/xz-utils:0=
+ >=sys-libs/zlib-1.1.3:0=
+ virtual/libffi
+ virtual/libintl
+ gdbm? ( sys-libs/gdbm:0=[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2:0=
+ readline? ( >=sys-libs/readline-4.1:0= )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ tk? (
+ >=dev-lang/tcl-8.0:0=
+ >=dev-lang/tk-8.0:0=
+ dev-tcltk/blt:0=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1:0= )
+ !!<sys-apps/sandbox-2.6-r1"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/autoconf-2.65
+ !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+PDEPEND=">=app-eselect/eselect-python-20140125-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+PYVER=${SLOT%/*}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -fr Modules/expat
+ rm -fr Modules/_ctypes/libffi*
+ rm -fr Modules/zlib
+
+ if tc-is-cross-compiler; then
+ # Invokes BUILDPYTHON, which is built for the host arch
+ local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
+ fi
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+ epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch"
+ epatch "${FILESDIR}/${PN}-3.4.5-cross.patch"
+
+ epatch_user
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ configure.ac \
+ Lib/distutils/command/install.py \
+ Lib/distutils/sysconfig.py \
+ Lib/site.py \
+ Lib/sysconfig.py \
+ Lib/test/test_site.py \
+ Makefile.pre.in \
+ Modules/Setup.dist \
+ Modules/getpath.c \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ eautoreconf
+}
+
+src_configure() {
+ local disable
+ use gdbm || disable+=" gdbm"
+ use ncurses || disable+=" _curses _curses_panel"
+ use readline || disable+=" readline"
+ use sqlite || disable+=" _sqlite3"
+ use ssl || export PYTHON_DISABLE_SSL="1"
+ use tk || disable+=" _tkinter"
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
+ export PYTHON_DISABLE_MODULES="${disable}"
+
+ if ! use xml; then
+ ewarn "You have configured Python without XML support."
+ ewarn "This is NOT a recommended configuration as you"
+ ewarn "may face problems parsing any XML documents."
+ fi
+
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+ fi
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
+ tc-export CXX
+
+ # The configure script fails to use pkg-config correctly.
+ # http://bugs.python.org/issue15506
+ export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
+
+ # Set LDFLAGS so we link modules with -lpython3.2 correctly.
+ # Needed on FreeBSD unless Python 3.2 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ local dbmliborder
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+
+ BUILD_DIR="${WORKDIR}/${CHOST}"
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ ECONF_SOURCE="${S}" OPT="" \
+ econf \
+ --with-fpectl \
+ --enable-shared \
+ $(use_enable ipv6) \
+ $(use_with threads) \
+ --infodir='${prefix}/share/info' \
+ --mandir='${prefix}/share/man' \
+ --with-computed-gotos \
+ --with-dbmliborder="${dbmliborder}" \
+ --with-libc="" \
+ --enable-loadable-sqlite-extensions \
+ --with-system-expat \
+ --with-system-ffi \
+ --without-ensurepip
+
+ if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
+ eerror "configure has detected that the sem_open function is broken."
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
+ die "Broken sem_open function (bug 496328)"
+ fi
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+
+ # Avoid invoking pgen for cross-compiles.
+ touch Include/graminit.h Python/graminit.c || die
+
+ cd "${BUILD_DIR}" || die
+
+ emake CPPFLAGS= CFLAGS= LDFLAGS=
+
+ # Work around bug 329499. See also bug 413751 and 457194.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E python
+ else
+ pax-mark m python
+ fi
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ cd "${BUILD_DIR}" || die
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ local -x PYTHONDONTWRITEBYTECODE=
+ emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local result=$?
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
+ elog "and run the tests separately."
+
+ if [[ ${result} -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
+
+ cd "${BUILD_DIR}" || die
+
+ emake DESTDIR="${D}" altinstall
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
+
+ # Fix collisions between different slots of Python.
+ rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+
+ # Cheap hack to get version with ABIFLAGS
+ local abiver=$(cd "${ED}usr/include"; echo python*)
+ if [[ ${abiver} != python${PYVER} ]]; then
+ # Replace python3.X with a symlink to python3.Xm
+ rm "${ED}usr/bin/python${PYVER}" || die
+ dosym "${abiver}" "/usr/bin/python${PYVER}"
+ # Create python3.X-config symlink
+ dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+ # Create python-3.5m.pc symlink
+ dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
+ fi
+
+ use elibc_uclibc && rm -fr "${libdir}/test"
+ use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
+
+ use threads || rm -fr "${libdir}/multiprocessing"
+ use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe
+
+ dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
+ doins -r "${S}"/Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
+
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
+ sed \
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
+ -e "s:@PYDOC@:pydoc${PYVER}:" \
+ -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
+
+ # for python-exec
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ else
+ vars=( PYTHON "${vars[@]}" )
+ fi
+
+ python_export "python${PYVER}" "${vars[@]}"
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${PYVER%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/${abiver}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ # note: we need to create a wrapper rather than symlinking it due
+ # to some random dirname(argv[0]) magic performed by python-config
+ cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
+ #!/bin/sh
+ exec "${abiver}-config" "\${@}"
+ EOF
+ chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+ # 2to3, pydoc, pyvenv
+ ln -s "../../../bin/2to3-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+ ln -s "../../../bin/pyvenv-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/idle" || die
+ fi
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
+ python_updater_warning="1"
+ fi
+}
+
+eselect_python_update() {
+ if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
+ eselect python update
+ fi
+
+ if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
+ eselect python update --python${PV%%.*}
+ fi
+}
+
+pkg_postinst() {
+ eselect_python_update
+
+ if [[ "${python_updater_warning}" == "1" ]]; then
+ ewarn "You have just upgraded from an older version of Python."
+ ewarn
+ ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-3.5.3.ebuild b/dev-lang/python/python-3.5.3.ebuild
new file mode 100644
index 000000000000..8d1cd2820111
--- /dev/null
+++ b/dev-lang/python/python-3.5.3.ebuild
@@ -0,0 +1,362 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
+
+MY_P="Python-${PV/_/}"
+PATCHSET_VERSION="3.5.3-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.5/3.5m"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml"
+
+# Do not add a dependency on dev-lang/python to this ebuild.
+# If you need to apply a patch which requires python for bootstrapping, please
+# run the bootstrap code on your dev box and include the results in the
+# patchset. See bug 447752.
+
+RDEPEND="app-arch/bzip2:0=
+ app-arch/xz-utils:0=
+ >=sys-libs/zlib-1.1.3:0=
+ virtual/libffi
+ virtual/libintl
+ gdbm? ( sys-libs/gdbm:0=[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2:0=
+ readline? ( >=sys-libs/readline-4.1:0= )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ tk? (
+ >=dev-lang/tcl-8.0:0=
+ >=dev-lang/tk-8.0:0=
+ dev-tcltk/blt:0=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1:0= )
+ !!<sys-apps/sandbox-2.6-r1"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+PDEPEND=">=app-eselect/eselect-python-20140125-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+PYVER=${SLOT%/*}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -fr Modules/expat
+ rm -fr Modules/_ctypes/libffi*
+ rm -fr Modules/zlib
+
+ if tc-is-cross-compiler; then
+ # Invokes BUILDPYTHON, which is built for the host arch
+ local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
+ fi
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+ epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch"
+ epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
+
+ epatch_user
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ configure.ac \
+ Lib/distutils/command/install.py \
+ Lib/distutils/sysconfig.py \
+ Lib/site.py \
+ Lib/sysconfig.py \
+ Lib/test/test_site.py \
+ Makefile.pre.in \
+ Modules/getpath.c \
+ Modules/Setup.dist \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ eautoreconf
+}
+
+src_configure() {
+ local disable
+ use gdbm || disable+=" gdbm"
+ use ncurses || disable+=" _curses _curses_panel"
+ use readline || disable+=" readline"
+ use sqlite || disable+=" _sqlite3"
+ use ssl || export PYTHON_DISABLE_SSL="1"
+ use tk || disable+=" _tkinter"
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
+ export PYTHON_DISABLE_MODULES="${disable}"
+
+ if ! use xml; then
+ ewarn "You have configured Python without XML support."
+ ewarn "This is NOT a recommended configuration as you"
+ ewarn "may face problems parsing any XML documents."
+ fi
+
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+ fi
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
+ tc-export CXX
+
+ # The configure script fails to use pkg-config correctly.
+ # http://bugs.python.org/issue15506
+ export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
+
+ # Set LDFLAGS so we link modules with -lpython3.2 correctly.
+ # Needed on FreeBSD unless Python 3.2 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ local dbmliborder
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+
+ BUILD_DIR="${WORKDIR}/${CHOST}"
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local myeconfargs=(
+ --with-fpectl
+ --enable-shared
+ $(use_enable ipv6)
+ $(use_with threads)
+ --infodir='${prefix}/share/info'
+ --mandir='${prefix}/share/man'
+ --with-computed-gotos
+ --with-dbmliborder="${dbmliborder}"
+ --with-libc=
+ --enable-loadable-sqlite-extensions
+ --without-ensurepip
+ --with-system-expat
+ --with-system-ffi
+ )
+
+ ECONF_SOURCE="${S}" OPT="" econf "${myeconfargs[@]}"
+
+ if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
+ eerror "configure has detected that the sem_open function is broken."
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
+ die "Broken sem_open function (bug 496328)"
+ fi
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+
+ cd "${BUILD_DIR}" || die
+
+ emake CPPFLAGS= CFLAGS= LDFLAGS=
+
+ # Work around bug 329499. See also bug 413751 and 457194.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E python
+ else
+ pax-mark m python
+ fi
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ cd "${BUILD_DIR}" || die
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ local -x PYTHONDONTWRITEBYTECODE=
+ emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local result=$?
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
+ elog "and run the tests separately."
+
+ if [[ ${result} -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
+
+ cd "${BUILD_DIR}" || die
+
+ emake DESTDIR="${D}" altinstall
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
+
+ # Fix collisions between different slots of Python.
+ rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+
+ # Cheap hack to get version with ABIFLAGS
+ local abiver=$(cd "${ED}usr/include"; echo python*)
+ if [[ ${abiver} != python${PYVER} ]]; then
+ # Replace python3.X with a symlink to python3.Xm
+ rm "${ED}usr/bin/python${PYVER}" || die
+ dosym "${abiver}" "/usr/bin/python${PYVER}"
+ # Create python3.X-config symlink
+ dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+ # Create python-3.5m.pc symlink
+ dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
+ fi
+
+ # python seems to get rebuilt in src_install (bug 569908)
+ # Work around it for now.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E "${ED}usr/bin/${abiver}"
+ else
+ pax-mark m "${ED}usr/bin/${abiver}"
+ fi
+
+ use elibc_uclibc && rm -fr "${libdir}/test"
+ use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
+
+ use threads || rm -fr "${libdir}/multiprocessing"
+ use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe
+
+ dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
+ doins -r "${S}"/Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
+
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
+ sed \
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
+ -e "s:@PYDOC@:pydoc${PYVER}:" \
+ -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
+
+ # for python-exec
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ else
+ vars=( PYTHON "${vars[@]}" )
+ fi
+
+ python_export "python${PYVER}" "${vars[@]}"
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${PYVER%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/${abiver}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ # note: we need to create a wrapper rather than symlinking it due
+ # to some random dirname(argv[0]) magic performed by python-config
+ cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
+ #!/bin/sh
+ exec "${abiver}-config" "\${@}"
+ EOF
+ chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+ # 2to3, pydoc, pyvenv
+ ln -s "../../../bin/2to3-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+ ln -s "../../../bin/pyvenv-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/idle" || die
+ fi
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
+ python_updater_warning="1"
+ fi
+}
+
+eselect_python_update() {
+ if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
+ eselect python update
+ fi
+
+ if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
+ eselect python update --python${PV%%.*}
+ fi
+}
+
+pkg_postinst() {
+ eselect_python_update
+
+ if [[ "${python_updater_warning}" == "1" ]]; then
+ ewarn "You have just upgraded from an older version of Python."
+ ewarn
+ ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-3.5.4.ebuild b/dev-lang/python/python-3.5.4.ebuild
new file mode 100644
index 000000000000..de48bc67184a
--- /dev/null
+++ b/dev-lang/python/python-3.5.4.ebuild
@@ -0,0 +1,362 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
+
+MY_P="Python-${PV/_/}"
+PATCHSET_VERSION="3.5.4-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+SRC_URI="https://www.python.org/ftp/python/${PV%_rc*}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.5/3.5m"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml"
+
+# Do not add a dependency on dev-lang/python to this ebuild.
+# If you need to apply a patch which requires python for bootstrapping, please
+# run the bootstrap code on your dev box and include the results in the
+# patchset. See bug 447752.
+
+RDEPEND="app-arch/bzip2:0=
+ app-arch/xz-utils:0=
+ >=sys-libs/zlib-1.1.3:0=
+ virtual/libffi
+ virtual/libintl
+ gdbm? ( sys-libs/gdbm:0=[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2:0=
+ readline? ( >=sys-libs/readline-4.1:0= )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ tk? (
+ >=dev-lang/tcl-8.0:0=
+ >=dev-lang/tk-8.0:0=
+ dev-tcltk/blt:0=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1:0= )
+ !!<sys-apps/sandbox-2.6-r1"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+PDEPEND=">=app-eselect/eselect-python-20140125-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+PYVER=${SLOT%/*}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -fr Modules/expat
+ rm -fr Modules/_ctypes/libffi*
+ rm -fr Modules/zlib
+
+ if tc-is-cross-compiler; then
+ # Invokes BUILDPYTHON, which is built for the host arch
+ local EPATCH_EXCLUDE="*_regenerate_platform-specific_modules.patch"
+ fi
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+ epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch"
+ epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
+
+ epatch_user
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ configure.ac \
+ Lib/distutils/command/install.py \
+ Lib/distutils/sysconfig.py \
+ Lib/site.py \
+ Lib/sysconfig.py \
+ Lib/test/test_site.py \
+ Makefile.pre.in \
+ Modules/getpath.c \
+ Modules/Setup.dist \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ eautoreconf
+}
+
+src_configure() {
+ local disable
+ use gdbm || disable+=" gdbm"
+ use ncurses || disable+=" _curses _curses_panel"
+ use readline || disable+=" readline"
+ use sqlite || disable+=" _sqlite3"
+ use ssl || export PYTHON_DISABLE_SSL="1"
+ use tk || disable+=" _tkinter"
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
+ export PYTHON_DISABLE_MODULES="${disable}"
+
+ if ! use xml; then
+ ewarn "You have configured Python without XML support."
+ ewarn "This is NOT a recommended configuration as you"
+ ewarn "may face problems parsing any XML documents."
+ fi
+
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+ fi
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
+ tc-export CXX
+
+ # The configure script fails to use pkg-config correctly.
+ # http://bugs.python.org/issue15506
+ export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
+
+ # Set LDFLAGS so we link modules with -lpython3.2 correctly.
+ # Needed on FreeBSD unless Python 3.2 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ local dbmliborder
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+
+ BUILD_DIR="${WORKDIR}/${CHOST}"
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local myeconfargs=(
+ --with-fpectl
+ --enable-shared
+ $(use_enable ipv6)
+ $(use_with threads)
+ --infodir='${prefix}/share/info'
+ --mandir='${prefix}/share/man'
+ --with-computed-gotos
+ --with-dbmliborder="${dbmliborder}"
+ --with-libc=
+ --enable-loadable-sqlite-extensions
+ --without-ensurepip
+ --with-system-expat
+ --with-system-ffi
+ )
+
+ ECONF_SOURCE="${S}" OPT="" econf "${myeconfargs[@]}"
+
+ if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
+ eerror "configure has detected that the sem_open function is broken."
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
+ die "Broken sem_open function (bug 496328)"
+ fi
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+
+ cd "${BUILD_DIR}" || die
+
+ emake CPPFLAGS= CFLAGS= LDFLAGS=
+
+ # Work around bug 329499. See also bug 413751 and 457194.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E python
+ else
+ pax-mark m python
+ fi
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ cd "${BUILD_DIR}" || die
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ local -x PYTHONDONTWRITEBYTECODE=
+ emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local result=$?
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
+ elog "and run the tests separately."
+
+ if [[ ${result} -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
+
+ cd "${BUILD_DIR}" || die
+
+ emake DESTDIR="${D}" altinstall
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
+
+ # Fix collisions between different slots of Python.
+ rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+
+ # Cheap hack to get version with ABIFLAGS
+ local abiver=$(cd "${ED}usr/include"; echo python*)
+ if [[ ${abiver} != python${PYVER} ]]; then
+ # Replace python3.X with a symlink to python3.Xm
+ rm "${ED}usr/bin/python${PYVER}" || die
+ dosym "${abiver}" "/usr/bin/python${PYVER}"
+ # Create python3.X-config symlink
+ dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+ # Create python-3.5m.pc symlink
+ dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
+ fi
+
+ # python seems to get rebuilt in src_install (bug 569908)
+ # Work around it for now.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E "${ED}usr/bin/${abiver}"
+ else
+ pax-mark m "${ED}usr/bin/${abiver}"
+ fi
+
+ use elibc_uclibc && rm -fr "${libdir}/test"
+ use sqlite || rm -fr "${libdir}/"{sqlite3,test/test_sqlite*}
+ use tk || rm -fr "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*}
+
+ use threads || rm -fr "${libdir}/multiprocessing"
+ use wininst || rm -f "${libdir}/distutils/command/"wininst-*.exe
+
+ dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
+ doins -r "${S}"/Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
+
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
+ sed \
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
+ -e "s:@PYDOC@:pydoc${PYVER}:" \
+ -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
+
+ # for python-exec
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ else
+ vars=( PYTHON "${vars[@]}" )
+ fi
+
+ python_export "python${PYVER}" "${vars[@]}"
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${PYVER%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/${abiver}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ # note: we need to create a wrapper rather than symlinking it due
+ # to some random dirname(argv[0]) magic performed by python-config
+ cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
+ #!/bin/sh
+ exec "${abiver}-config" "\${@}"
+ EOF
+ chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+ # 2to3, pydoc, pyvenv
+ ln -s "../../../bin/2to3-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+ ln -s "../../../bin/pyvenv-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/idle" || die
+ fi
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
+ python_updater_warning="1"
+ fi
+}
+
+eselect_python_update() {
+ if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
+ eselect python update
+ fi
+
+ if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
+ eselect python update --python${PV%%.*}
+ fi
+}
+
+pkg_postinst() {
+ eselect_python_update
+
+ if [[ "${python_updater_warning}" == "1" ]]; then
+ ewarn "You have just upgraded from an older version of Python."
+ ewarn
+ ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-3.6.1-r1.ebuild b/dev-lang/python/python-3.6.1-r1.ebuild
new file mode 100644
index 000000000000..ef6e62034cdc
--- /dev/null
+++ b/dev-lang/python/python-3.6.1-r1.ebuild
@@ -0,0 +1,343 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="3.6.0-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.6/3.6m"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml"
+
+# Do not add a dependency on dev-lang/python to this ebuild.
+# If you need to apply a patch which requires python for bootstrapping, please
+# run the bootstrap code on your dev box and include the results in the
+# patchset. See bug 447752.
+
+RDEPEND="app-arch/bzip2:0=
+ app-arch/xz-utils:0=
+ >=sys-libs/zlib-1.1.3:0=
+ virtual/libffi
+ virtual/libintl
+ gdbm? ( sys-libs/gdbm:0=[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2:0=
+ readline? ( >=sys-libs/readline-4.1:0= )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ tk? (
+ >=dev-lang/tcl-8.0:0=
+ >=dev-lang/tk-8.0:0=
+ dev-tcltk/blt:0=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1:0= )
+ !!<sys-apps/sandbox-2.6-r1"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+PDEPEND=">=app-eselect/eselect-python-20140125-r1"
+
+S="${WORKDIR}/${MY_P}"
+PYVER=${SLOT%/*}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -fr Modules/expat
+ rm -fr Modules/_ctypes/libffi*
+ rm -fr Modules/zlib
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+ epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
+ epatch "${FILESDIR}/3.6.1-test_socket-AEAD.patch"
+ epatch "${FILESDIR}/3.6-blake2.patch"
+
+ epatch_user
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ Lib/distutils/command/install.py \
+ Lib/distutils/sysconfig.py \
+ Lib/site.py \
+ Lib/sysconfig.py \
+ Lib/test/test_site.py \
+ Makefile.pre.in \
+ Modules/Setup.dist \
+ Modules/getpath.c \
+ configure.ac \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ eautoreconf
+}
+
+src_configure() {
+ local disable
+ use gdbm || disable+=" gdbm"
+ use ncurses || disable+=" _curses _curses_panel"
+ use readline || disable+=" readline"
+ use sqlite || disable+=" _sqlite3"
+ use ssl || export PYTHON_DISABLE_SSL="1"
+ use tk || disable+=" _tkinter"
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
+ export PYTHON_DISABLE_MODULES="${disable}"
+
+ if ! use xml; then
+ ewarn "You have configured Python without XML support."
+ ewarn "This is NOT a recommended configuration as you"
+ ewarn "may face problems parsing any XML documents."
+ fi
+
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+ fi
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
+ tc-export CXX
+
+ # Set LDFLAGS so we link modules with -lpython3.2 correctly.
+ # Needed on FreeBSD unless Python 3.2 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ local dbmliborder
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+
+ local myeconfargs=(
+ --with-fpectl
+ --enable-shared
+ $(use_enable ipv6)
+ $(use_with threads)
+ --infodir='${prefix}/share/info'
+ --mandir='${prefix}/share/man'
+ --with-computed-gotos
+ --with-dbmliborder="${dbmliborder}"
+ --with-libc=
+ --enable-loadable-sqlite-extensions
+ --without-ensurepip
+ --with-system-expat
+ --with-system-ffi
+ )
+
+ OPT="" econf "${myeconfargs[@]}"
+
+ if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
+ eerror "configure has detected that the sem_open function is broken."
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
+ die "Broken sem_open function (bug 496328)"
+ fi
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+
+ emake CPPFLAGS= CFLAGS= LDFLAGS=
+
+ # Work around bug 329499. See also bug 413751 and 457194.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E python
+ else
+ pax-mark m python
+ fi
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ local -x PYTHONDONTWRITEBYTECODE=
+
+ emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local result=$?
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
+ elog "and run the tests separately."
+
+ if [[ ${result} -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
+
+ emake DESTDIR="${D}" altinstall
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
+
+ # Fix collisions between different slots of Python.
+ rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+
+ # Cheap hack to get version with ABIFLAGS
+ local abiver=$(cd "${ED}usr/include"; echo python*)
+ if [[ ${abiver} != python${PYVER} ]]; then
+ # Replace python3.X with a symlink to python3.Xm
+ rm "${ED}usr/bin/python${PYVER}" || die
+ dosym "${abiver}" "/usr/bin/python${PYVER}"
+ # Create python3.X-config symlink
+ dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+ # Create python-3.5m.pc symlink
+ dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
+ fi
+
+ # python seems to get rebuilt in src_install (bug 569908)
+ # Work around it for now.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E "${ED}usr/bin/${abiver}"
+ else
+ pax-mark m "${ED}usr/bin/${abiver}"
+ fi
+
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+ use tk || rm -r "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
+
+ use threads || rm -r "${libdir}/multiprocessing" || die
+ use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
+
+ dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
+ doins -r "${S}"/Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
+
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
+ sed \
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
+ -e "s:@PYDOC@:pydoc${PYVER}:" \
+ -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
+
+ # for python-exec
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ else
+ vars=( PYTHON "${vars[@]}" )
+ fi
+
+ python_export "python${PYVER}" "${vars[@]}"
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${PYVER%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/${abiver}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ # note: we need to create a wrapper rather than symlinking it due
+ # to some random dirname(argv[0]) magic performed by python-config
+ cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
+ #!/bin/sh
+ exec "${abiver}-config" "\${@}"
+ EOF
+ chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+ # 2to3, pydoc, pyvenv
+ ln -s "../../../bin/2to3-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+ ln -s "../../../bin/pyvenv-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/idle" || die
+ fi
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
+ python_updater_warning="1"
+ fi
+}
+
+eselect_python_update() {
+ if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
+ eselect python update
+ fi
+
+ if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
+ eselect python update --python${PV%%.*}
+ fi
+}
+
+pkg_postinst() {
+ eselect_python_update
+
+ if [[ "${python_updater_warning}" == "1" ]]; then
+ ewarn "You have just upgraded from an older version of Python."
+ ewarn
+ ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/python/python-3.6.3.ebuild b/dev-lang/python/python-3.6.3.ebuild
new file mode 100644
index 000000000000..fa67a439bfa2
--- /dev/null
+++ b/dev-lang/python/python-3.6.3.ebuild
@@ -0,0 +1,342 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+WANT_LIBTOOL="none"
+
+inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="3.6.2-0"
+
+DESCRIPTION="An interpreted, interactive, object-oriented programming language"
+HOMEPAGE="https://www.python.org/"
+SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz"
+
+LICENSE="PSF-2"
+SLOT="3.6/3.6m"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
+IUSE="build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml"
+
+# Do not add a dependency on dev-lang/python to this ebuild.
+# If you need to apply a patch which requires python for bootstrapping, please
+# run the bootstrap code on your dev box and include the results in the
+# patchset. See bug 447752.
+
+RDEPEND="app-arch/bzip2:0=
+ app-arch/xz-utils:0=
+ >=sys-libs/zlib-1.1.3:0=
+ virtual/libffi
+ virtual/libintl
+ gdbm? ( sys-libs/gdbm:0=[berkdb] )
+ ncurses? (
+ >=sys-libs/ncurses-5.2:0=
+ readline? ( >=sys-libs/readline-4.1:0= )
+ )
+ sqlite? ( >=dev-db/sqlite-3.3.8:3= )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ tk? (
+ >=dev-lang/tcl-8.0:0=
+ >=dev-lang/tk-8.0:0=
+ dev-tcltk/blt:0=
+ dev-tcltk/tix
+ )
+ xml? ( >=dev-libs/expat-2.1:0= )
+ !!<sys-apps/sandbox-2.6-r1"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ !sys-devel/gcc[libffi(-)]"
+RDEPEND+=" !build? ( app-misc/mime-types )"
+PDEPEND=">=app-eselect/eselect-python-20140125-r1"
+
+S="${WORKDIR}/${MY_P}"
+PYVER=${SLOT%/*}
+
+src_prepare() {
+ # Ensure that internal copies of expat, libffi and zlib are not used.
+ rm -fr Modules/expat
+ rm -fr Modules/_ctypes/libffi*
+ rm -fr Modules/zlib
+
+ EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches"
+ epatch "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
+ epatch "${FILESDIR}/3.6-blake2.patch"
+
+ epatch_user
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ Lib/distutils/command/install.py \
+ Lib/distutils/sysconfig.py \
+ Lib/site.py \
+ Lib/sysconfig.py \
+ Lib/test/test_site.py \
+ Makefile.pre.in \
+ Modules/Setup.dist \
+ Modules/getpath.c \
+ configure.ac \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ eautoreconf
+}
+
+src_configure() {
+ local disable
+ use gdbm || disable+=" gdbm"
+ use ncurses || disable+=" _curses _curses_panel"
+ use readline || disable+=" readline"
+ use sqlite || disable+=" _sqlite3"
+ use ssl || export PYTHON_DISABLE_SSL="1"
+ use tk || disable+=" _tkinter"
+ use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
+ export PYTHON_DISABLE_MODULES="${disable}"
+
+ if ! use xml; then
+ ewarn "You have configured Python without XML support."
+ ewarn "This is NOT a recommended configuration as you"
+ ewarn "may face problems parsing any XML documents."
+ fi
+
+ if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
+ einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
+ fi
+
+ if [[ "$(gcc-major-version)" -ge 4 ]]; then
+ append-flags -fwrapv
+ fi
+
+ filter-flags -malign-double
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=50309
+ if is-flagq -O3; then
+ is-flagq -fstack-protector-all && replace-flags -O3 -O2
+ use hardened && replace-flags -O3 -O2
+ fi
+
+ # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
+ tc-export CXX
+
+ # Set LDFLAGS so we link modules with -lpython3.2 correctly.
+ # Needed on FreeBSD unless Python 3.2 is already installed.
+ # Please query BSD team before removing this!
+ append-ldflags "-L."
+
+ local dbmliborder
+ if use gdbm; then
+ dbmliborder+="${dbmliborder:+:}gdbm"
+ fi
+
+ local myeconfargs=(
+ --with-fpectl
+ --enable-shared
+ $(use_enable ipv6)
+ $(use_with threads)
+ --infodir='${prefix}/share/info'
+ --mandir='${prefix}/share/man'
+ --with-computed-gotos
+ --with-dbmliborder="${dbmliborder}"
+ --with-libc=
+ --enable-loadable-sqlite-extensions
+ --without-ensurepip
+ --with-system-expat
+ --with-system-ffi
+ )
+
+ OPT="" econf "${myeconfargs[@]}"
+
+ if use threads && grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
+ eerror "configure has detected that the sem_open function is broken."
+ eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
+ die "Broken sem_open function (bug 496328)"
+ fi
+}
+
+src_compile() {
+ # Ensure sed works as expected
+ # https://bugs.gentoo.org/594768
+ local -x LC_ALL=C
+
+ emake CPPFLAGS= CFLAGS= LDFLAGS=
+
+ # Work around bug 329499. See also bug 413751 and 457194.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E python
+ else
+ pax-mark m python
+ fi
+}
+
+src_test() {
+ # Tests will not work when cross compiling.
+ if tc-is-cross-compiler; then
+ elog "Disabling tests due to crosscompiling."
+ return
+ fi
+
+ # Skip failing tests.
+ local skipped_tests="gdb"
+
+ for test in ${skipped_tests}; do
+ mv "${S}"/Lib/test/test_${test}.py "${T}"
+ done
+
+ local -x PYTHONDONTWRITEBYTECODE=
+
+ emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
+ local result=$?
+
+ for test in ${skipped_tests}; do
+ mv "${T}/test_${test}.py" "${S}"/Lib/test
+ done
+
+ elog "The following tests have been skipped:"
+ for test in ${skipped_tests}; do
+ elog "test_${test}.py"
+ done
+
+ elog "If you would like to run them, you may:"
+ elog "cd '${EPREFIX}/usr/$(get_libdir)/python${PYVER}/test'"
+ elog "and run the tests separately."
+
+ if [[ ${result} -ne 0 ]]; then
+ die "emake test failed"
+ fi
+}
+
+src_install() {
+ local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
+
+ emake DESTDIR="${D}" altinstall
+
+ sed \
+ -e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
+ -e "s/\(PY_LDFLAGS=\).*/\1/" \
+ -i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
+
+ # Fix collisions between different slots of Python.
+ rm -f "${ED}usr/$(get_libdir)/libpython3.so"
+
+ # Cheap hack to get version with ABIFLAGS
+ local abiver=$(cd "${ED}usr/include"; echo python*)
+ if [[ ${abiver} != python${PYVER} ]]; then
+ # Replace python3.X with a symlink to python3.Xm
+ rm "${ED}usr/bin/python${PYVER}" || die
+ dosym "${abiver}" "/usr/bin/python${PYVER}"
+ # Create python3.X-config symlink
+ dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
+ # Create python-3.5m.pc symlink
+ dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
+ fi
+
+ # python seems to get rebuilt in src_install (bug 569908)
+ # Work around it for now.
+ if has_version dev-libs/libffi[pax_kernel]; then
+ pax-mark E "${ED}usr/bin/${abiver}"
+ else
+ pax-mark m "${ED}usr/bin/${abiver}"
+ fi
+
+ use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
+ use tk || rm -r "${ED}usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
+
+ use threads || rm -r "${libdir}/multiprocessing" || die
+ use wininst || rm "${libdir}/distutils/command/"wininst-*.exe || die
+
+ dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS}
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ find "${S}"/Tools -name __pycache__ -print0 | xargs -0 rm -fr
+ doins -r "${S}"/Tools
+ fi
+ insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
+ local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
+ emake --no-print-directory -s -f - 2>/dev/null)
+ newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
+
+ newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
+ newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
+ sed \
+ -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
+ -e "s:@PYDOC@:pydoc${PYVER}:" \
+ -i "${ED}etc/conf.d/pydoc-${PYVER}" "${ED}etc/init.d/pydoc-${PYVER}" || die "sed failed"
+
+ # for python-exec
+ local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR )
+
+ # if not using a cross-compiler, use the fresh binary
+ if ! tc-is-cross-compiler; then
+ local -x PYTHON=./python
+ local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}.
+ else
+ vars=( PYTHON "${vars[@]}" )
+ fi
+
+ python_export "python${PYVER}" "${vars[@]}"
+ echo "EPYTHON='${EPYTHON}'" > epython.py || die
+ python_domodule epython.py
+
+ # python-exec wrapping support
+ local pymajor=${PYVER%.*}
+ mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die
+ # python and pythonX
+ ln -s "../../../bin/${abiver}" \
+ "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die
+ ln -s "python${pymajor}" \
+ "${D}${PYTHON_SCRIPTDIR}/python" || die
+ # python-config and pythonX-config
+ # note: we need to create a wrapper rather than symlinking it due
+ # to some random dirname(argv[0]) magic performed by python-config
+ cat > "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" <<-EOF || die
+ #!/bin/sh
+ exec "${abiver}-config" "\${@}"
+ EOF
+ chmod +x "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die
+ ln -s "python${pymajor}-config" \
+ "${D}${PYTHON_SCRIPTDIR}/python-config" || die
+ # 2to3, pydoc, pyvenv
+ ln -s "../../../bin/2to3-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/2to3" || die
+ ln -s "../../../bin/pydoc${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pydoc" || die
+ ln -s "../../../bin/pyvenv-${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/pyvenv" || die
+ # idle
+ if use tk; then
+ ln -s "../../../bin/idle${PYVER}" \
+ "${D}${PYTHON_SCRIPTDIR}/idle" || die
+ fi
+}
+
+pkg_preinst() {
+ if has_version "<${CATEGORY}/${PN}-${PYVER}" && ! has_version ">=${CATEGORY}/${PN}-${PYVER}_alpha"; then
+ python_updater_warning="1"
+ fi
+}
+
+eselect_python_update() {
+ if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then
+ eselect python update
+ fi
+
+ if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then
+ eselect python update --python${PV%%.*}
+ fi
+}
+
+pkg_postinst() {
+ eselect_python_update
+
+ if [[ "${python_updater_warning}" == "1" ]]; then
+ ewarn "You have just upgraded from an older version of Python."
+ ewarn
+ ewarn "Please adjust PYTHON_TARGETS (if so desired), and run emerge with the --newuse or --changed-use option to rebuild packages installing python modules."
+ fi
+}
+
+pkg_postrm() {
+ eselect_python_update
+}
diff --git a/dev-lang/qu-prolog/Manifest b/dev-lang/qu-prolog/Manifest
new file mode 100644
index 000000000000..72466f303f6e
--- /dev/null
+++ b/dev-lang/qu-prolog/Manifest
@@ -0,0 +1,23 @@
+AUX qu-prolog-10.0-associated-item.patch 335 SHA256 27a6f727de28056bf8987ce013cd68fb461d7ad5748d3ce775ab0e04d56be625 SHA512 3b4cefaecacb1e1fb8df8804f198563e99ee69b2ffbdc421e56fb34faeb5ed1a87809b4acf917999ac5e25982e522c8b08775cf9bcf1c01675a77521d372913f WHIRLPOOL 683a51ad7f07b0898a477878cd568e445e77078cbe388586ec59547aeacae075b728394a36b1b2f6799cd6f7c96149e1e889fd51e526414787b292439acc3ed6
+AUX qu-prolog-10.0-configure.patch 518 SHA256 484b5fe687c16f5c701210869ff4c3d8c5240dfff3f9ff85e272a40ba022f499 SHA512 85e484b8086054166740dd757b95547179afa5c199c240b43dcef531aeedd812f4fcb35003a888708c90db5d7bb1ffd22cf9bef1fd31f339ec0894ddde365cd9 WHIRLPOOL 2de644b28673497e8717a239146ba54c57a1217f3f177abf5bc384f7de20adb324b63edd8843f6177abcb30a06b15860589af1981a9e9c4ec662fcfb2a724519
+AUX qu-prolog-10.0-gcc6.patch 906 SHA256 61201c18cad61ed803fd2635a12e0334f3a7c970fc512ee63a1c2a6325504e71 SHA512 bbf5a1d5749964bc5c0e8e530de3729bf1666e541f908ddc66debc696a6b6b4dc55373ef788348f02e33aa58afa5a350f7be866bfb1e4c31c917f334e9dc9ca6 WHIRLPOOL ce1a55eeef54338743bb40f725b251a3600d93f015d3a271a4a3333f7ae5f2fd4fc1498e4519bde3f5de948ea1d5a84f4e208e77e429172bef60fe0d888b4ac2
+AUX qu-prolog-9.1-cerr-ptr.patch 1379 SHA256 dd9ac54f97e84d256f044d7e2f8d5c7470d8e39ab472fd7f55c6007f996234c9 SHA512 b46bdef26c3bbdddb0ed3d463f7a75cbef644c80c78ecfe45ac1cc23771f9a70fa1217480f12f57ee2fcf28afdef1e7a6c9b23e0521c12d3cf151d0ff648f396 WHIRLPOOL 6ca724634ad4244eeba07c489640b245adef2640a919ad304d8501c9f51a2ee67aeca89de049a59b026f77e340cbbbe839d433e8d31d24cd5ba77cc9cf0b5f30
+AUX qu-prolog-9.1-cflags.patch 1089 SHA256 67b6cc6c4009b4bfd8578d5006d5d0fc1b6f7a50368ce078a4a97610a559521b SHA512 5502c6923d8f32e10fbc4dfb49ad3d34cde3e3f7fc68165b121a27c51934edd8cd963066d8cd15323a67854861f51508a5450a1a47867d857989b881a29d8ed9 WHIRLPOOL f51043fe57cc2ef83ece4cdda8dfc80ab14fef1a9a1b222c4b482d7c7a7502719d517164f87f561bd5962b58599ef0cfad60e6b6ed2d222b60b5fd3e300cc46c
+AUX qu-prolog-9.1-gcc.patch 1020 SHA256 b312300d23742dbfacbda0d09c5f8d8bdcd89a510c363db23d707e63bc5a5261 SHA512 6f7e56f060330df6863df22c409be6b8ad7deab5dd9ebd9173d33170d8eedf6367b9a624dd270d46dc45c1699c6c37c218093494cdba9559dab795d8da6f15d5 WHIRLPOOL ca2cbd6ce428731da1e74875337386c66a4238251e9da3f204c3c00e339354fea0c97d728541118da19c3534908ee73051236b52b90902556a7d04c1b4c06584
+AUX qu-prolog-9.1-portage.patch 910 SHA256 d1565bd511cec886a6858db156957388029854c28338bb3d76e494e0ef9c5a95 SHA512 90ab22c9a75254b4370905cf64cebdcb64f7130c2edc07cf3c79562352a9d07e839b24ebbca623587b22ab1cb19b97ae62bc2f5f068ef6380ac2cfc45ec29b8e WHIRLPOOL 4f59b3b3d6394b7645d13f8e9582a6f07ab85e71f2afa2b8bcdd50a0cafc9895c026a7803e6ded82fc31b7fd17aaeefd846b987b718c5e71a51f633f69b8fb84
+AUX qu-prolog-9.5-cflags.patch 1089 SHA256 c9b9ee740757def5833633194c8dead0994fe2b576dfd8aee28ce3e9e040d38f SHA512 cbe5681801f04cbbbd3502bcd5e471e13726e7d33453c7922ab63203db736c83acdf0a5e5325c9c9371d9a994e20d721e9a3d9eb118d5bbd8d762ba0bd52b81c WHIRLPOOL 2d027fd06c399a09a55f41924b23ec729b43d6b52c093d3d001b6b14cf3fbd6c8ad2ae6bb5b8d98da92ed9362179e55d81c10c2e75a05b20745a1bd4724243f7
+AUX qu-prolog-9.5-portage.patch 910 SHA256 bfd9bc50dd813f4be7ebcd1c21715775a874daeb1c76bfe7fe4797de369da44e SHA512 1a77a834c82fbee6b81f114535b22a9b135e0db017a03f3cbd874b166dbc86c6de61dae464ab0e70d00ee11dbce42ab7c0affee98ae895c75ac52af94820d980 WHIRLPOOL 577b0c74ec8564d1ed6166a81965541cbbca2ec0ae5d49ef197ec7b45914b754f3de691a6db10ffd99184b4580304979c07b97b632aef9201f59b56266c832df
+DIST qp10.0.tar.gz 1521469 SHA256 f3968e0ea5f9da80475b8298cbac0c70d3684fb8e68ddc0961a2d8c739aa9f07 SHA512 491ef9cc01f0d34163d47163b3103dcbd52cc5672f64057b898c2d234384ac2e3b64b4e59a1795765ff92de4c97ebdb11a82d394213685c387e4dd7d598c5c60 WHIRLPOOL 675a46d6ce428456e1055b8192c84e488ea1b6a3715f9f3e267d9df0637e304982f933e6078e5912c025eceb02dc79c08bd6744d181269b210ff3233ce69fa37
+DIST qp9.1.tar.gz 1460679 SHA256 1f3052f2700d537b33207943a3ade48b2b3aa5cd01cafc0475bcf26c645bc9af SHA512 44590be9d1ecec97fa6c82b657e9ecc3778f833644055ee87c9a6a36996663d139ffd7b583d72f8ac317648e0f22ccbc2a1da9c3a5eabd23381c668e5d073cbb WHIRLPOOL 37ec4e25c2284b267f72c016b4ea1e542d735c9da5f6532d1f6b439af2b91422ddc251d31e1a17b6366ee6af0e754acdbf8a0c44ef03f46a2515f14b1259b732
+DIST qp9.5.tar.gz 1537445 SHA256 7e4b9883fad00b16c919620033da48482b2eccc875b37f8170d674ce9f72aee2 SHA512 7a79090a6e3f0263e38cf5e5724a5c35c63c8cca2842fa8c07f9ff84011ef7ac9a22b195713aeb626a787c9391c612f3fea0ff38c084634a2f62258feb3eb6e2 WHIRLPOOL 3f589998f3480925fa3ad3c54f1f0ba4122cfa12c48d9bf1269e92a0fdf52d1823cd8dae8851e36d2c97ec2f869da10ff6ee7f2663b752d1d396e1b5a95ca982
+DIST qp9.6.tar.gz 1539483 SHA256 631ab73af271279d583c5ecf19e5542dd8dff097179e3bb34ac2624aeb029f7a SHA512 a15d3f2254d9ed9a2032f7e2902363f2ed2dbf0a7ba67a89aae79202d38954a195e93725aa828d19d50d7a891d8cea4f0d23af66ffd55984738db9b612467cd8 WHIRLPOOL 3dcc746da3283044267abd7aa00795b1bff79bffd206c1bf227087281d94f2dc4a390a5ccd85933641aea150313b2f62e0e9fbe491ef4fafa73e4fdd9b35d7d1
+DIST qp9.7.tar.gz 1539804 SHA256 9b77c97e0cb981669cf27df0f68875ba44958e67cc82ac71a4f5d2665b96708b SHA512 20a7a00eab2ec489489f95d78eb4dc8edf71d99fae2f23807158ca78d0bbd1b66d03460f0e06f91ac4ecafd9aab2bbdd109368ba8d3cc2c8452e17c634035c19 WHIRLPOOL 20a790902848790cfedefc6434eda01bb4b0ed2cfdf26c7d1a7914cef9916d161fcd397001a7f5a0aadf2d710112446bd99103f161ef22ad7b3567b45b33ac6d
+EBUILD qu-prolog-10.0.ebuild 1998 SHA256 3258396cb34058083e430e9be93bee94ae3949996df95f847344329ffe9d63aa SHA512 0df66e1f943662396070621cac0adbf8cd2f6e9109b5e1c231281708eead667da180e04a022dc8329bae408ec4862fa7a239c3478c0120d75d4dab66c59cd2cf WHIRLPOOL eddad8d2920cc866a6cfab192e0c2a4177602a39fac286cb272c9237acc9b29ace8b01e966f0b5434b43e625f697c02ce79c30e21edb43663504fcc8f3a9cfcd
+EBUILD qu-prolog-9.1-r1.ebuild 1930 SHA256 795140602a6b33def04f5d883ad46fd20ca0ed692b87501b0ee1e8b731502ad1 SHA512 30aaf2dd17655cc0b54467c51ec3603c753ec25de8c2f54b054f081dd67d3aa1df31bc5cc4135a5ccaf435a0c3b0dcc11756b29c8145e62a1bd17508dcb8c4eb WHIRLPOOL 8049fc87b6bb1cc999fcc5404d3629b5e1ec36bf061ed2c162cc24b2423499bac78ccb760456214b97f4d7f3999ea21ebad9457c2c495442166b6275283cb07b
+EBUILD qu-prolog-9.1.ebuild 2141 SHA256 6fec08cf89fdf190008f8b4d10014808125dae1371f6a4715bd9e2c30df4976c SHA512 bb4b3339c7c7201e9c263b4558904dc840ecbde25fecf9c93416f9fcdd503cfcc88253d589718ca5a78cb2ba174b50223f4afbadd2fd98f6be5b28364482b4bf WHIRLPOOL 9c77b9144220526f00b913bb5c0bc989a7830b0d5c4a4c7f8b38b457ece75591e8ba059b6e9f46b56847dac6509cacbb15e4ccb4050af9e0415981efa5ece9c9
+EBUILD qu-prolog-9.5.ebuild 1859 SHA256 754a40912a3f95d4c62b8a82a2e1fef3264cfee82404e2d054e63d16e3d1dedc SHA512 c0d40d94d70b6cdad89e12d2336a4b76c2aa17b5f7a117172a23ebb25080ad9159519b45e28af8574f8849b17820a3cdee431d89e8d1e673527998c7527e2bcc WHIRLPOOL caa6e93a4a9560797a44018ba2069a11617c3304ea3905f558f1db6bc6381d16770e10d89a6485c7af16ea6d7f69d70116b53dced7f93fea5d35625c7f025cbd
+EBUILD qu-prolog-9.6.ebuild 1831 SHA256 85b9a1097d36f45f99687596042735a0332432a5b27a825dcc1976185fc826e2 SHA512 51cf334a9d7bb652d5d55b680c06e65c5de3e0a0c2d3596d3d7719f410455fed42e40fc201f150cba7652cffb7143b1cb106d2dcaaa467b7f61e85df4b0f5033 WHIRLPOOL b5a4de9cde72335c791d8c8b24fe43e5ab3b589374ec2dc9b74df52b3cf6a48c9043390546562e9e6b6823fec352ab8ea7ca77a9a15ea7610b63eb2a1e4a2dd9
+EBUILD qu-prolog-9.7.ebuild 1831 SHA256 85b9a1097d36f45f99687596042735a0332432a5b27a825dcc1976185fc826e2 SHA512 51cf334a9d7bb652d5d55b680c06e65c5de3e0a0c2d3596d3d7719f410455fed42e40fc201f150cba7652cffb7143b1cb106d2dcaaa467b7f61e85df4b0f5033 WHIRLPOOL b5a4de9cde72335c791d8c8b24fe43e5ab3b589374ec2dc9b74df52b3cf6a48c9043390546562e9e6b6823fec352ab8ea7ca77a9a15ea7610b63eb2a1e4a2dd9
+MISC ChangeLog 3560 SHA256 2543cd91b2a23c903faed2a714837582c2bb2367ca07c28015aede51e83efad7 SHA512 4b315c4ed15b8a7e27b5afe2c7ac24874f74e3cc7c2353c617fac419443e1a62f5dee1433c10a89a45206a714fc4911740533cf07eca38f6cb14551448e5fe07 WHIRLPOOL 3223722677a8856fe5f2665b69f35643144be05909b191237e7d6da74b1df6200f3ad1baffca8e6b4c903e5b1aa6dddf38b530ac3fac5e71a7159df3db7be593
+MISC ChangeLog-2015 14668 SHA256 8e01daf09706375c12bb8225bc467341a3ab9a3c652831931e8a3d438e4f1dcd SHA512 c456535f83cb3894d985fc19fbd58fd92de15d59c2ce69c2c181f2b682080158d25eb196f453b19755972fa1e22b6a629e6c835eb6c1cd50e54ec2483df94a8d WHIRLPOOL 4c31ec8f07e838080a018830601c3a3c8f80eaf95b639982d2ca0c78e1052d62f93327d7ae12577cfe8afa01e0908b1ce640c09593b4fe50302f749eba259f43
+MISC metadata.xml 347 SHA256 24b0c949839c0d29cad8fdbb160eb7ec3f1f1ade8307795a3ce0ba3d48a19d86 SHA512 7a7bb3ccaa42fa120c3702d963719d5fdfcf0a413685cad98bd34a515a4cc83a213a71e7f3b6b0ce67947fa347229caecf699879192f0d930c9c6577e0ce59cc WHIRLPOOL cd38ec1759e73478bf05d5b00af1606d861f668254cbc6f11f686c75b9a4834865fc2cd3f7a83e0222055bacd9b34073aead1dfc31a71c0bc129b9da11f4df14
diff --git a/dev-lang/qu-prolog/files/qu-prolog-10.0-associated-item.patch b/dev-lang/qu-prolog/files/qu-prolog-10.0-associated-item.patch
new file mode 100644
index 000000000000..d5e992d51c26
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-10.0-associated-item.patch
@@ -0,0 +1,11 @@
+--- qp10.0.orig/src/objects.h 2016-06-07 02:54:35.000000000 +0200
++++ qp10.0/src/objects.h 2016-10-03 18:26:49.924782008 +0200
+@@ -1210,7 +1210,7 @@
+ << this->getName() << "\" ";
+
+ #ifndef WIN32
+- switch (hasAssociatedItem())
++ switch (tag & AssociatedMask)
+ {
+ case AssociatedNone:
+ std::cerr << "(no info)";
diff --git a/dev-lang/qu-prolog/files/qu-prolog-10.0-configure.patch b/dev-lang/qu-prolog/files/qu-prolog-10.0-configure.patch
new file mode 100644
index 000000000000..b3c109613912
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-10.0-configure.patch
@@ -0,0 +1,21 @@
+--- qp10.0.orig/configure 2016-06-07 02:54:42.000000000 +0200
++++ qp10.0/configure 2016-10-03 18:30:22.360786524 +0200
+@@ -2256,12 +2256,16 @@
+ #
+ # Check for addtional command line options.
+ #
+-DEBUGGING=" -DNDEBUG "
+ # Check whether --enable-debug was given.
+ if test "${enable_debug+set}" = set; then :
+- enableval=$enable_debug; DEBUGGING=
++ enableval=$enable_debug;
+ fi
+
++if test "$enable_debug" = yes; then
++ DEBUGGING=
++else
++ DEBUGGING=" -DNDEBUG "
++fi
+
+
+ # Single versus multiple thread configuraation.
diff --git a/dev-lang/qu-prolog/files/qu-prolog-10.0-gcc6.patch b/dev-lang/qu-prolog/files/qu-prolog-10.0-gcc6.patch
new file mode 100644
index 000000000000..626a15b5de99
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-10.0-gcc6.patch
@@ -0,0 +1,38 @@
+--- qp10.0/src/io_qp.h.old 2016-10-12 02:50:04.343499674 -0400
++++ qp10.0/src/io_qp.h 2016-10-12 02:50:10.605264154 -0400
+@@ -662,7 +662,7 @@
+
+ bool seekp(streampos pos, ios::seekdir d = ios::beg)
+ {
+- return stream->seekp(pos, d);
++ return !stream->seekp(pos, d).fail();
+ }
+
+ bool put(char ch)
+@@ -736,7 +736,7 @@
+
+ bool seekp(streampos pos, ios::seekdir d = ios::beg)
+ {
+- return stream.seekp(pos, d);
++ return !stream.seekp(pos, d).fail();
+ }
+
+ bool put(char ch)
+@@ -816,7 +816,7 @@
+
+ bool seekp(streampos pos, ios::seekdir d = ios::beg)
+ {
+- return stream.seekp(pos, d);
++ return !stream.seekp(pos, d).fail();
+ }
+
+ bool put(char ch);
+@@ -876,7 +876,7 @@
+
+ bool seekp(streampos pos, ios::seekdir d = ios::beg)
+ {
+- return stream.seekp(pos, d);
++ return !stream.seekp(pos, d).fail();
+ }
+
+ bool put(char ch);
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.1-cerr-ptr.patch b/dev-lang/qu-prolog/files/qu-prolog-9.1-cerr-ptr.patch
new file mode 100644
index 000000000000..1fde09843e66
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.1-cerr-ptr.patch
@@ -0,0 +1,40 @@
+diff -ur qp9.1.orig/src/gc.cc qp9.1/src/gc.cc
+--- qp9.1.orig/src/gc.cc 2011-08-23 11:17:44.000000000 +1200
++++ qp9.1/src/gc.cc 2011-11-20 07:14:14.000000000 +1300
+@@ -152,7 +152,7 @@
+ {
+ cerr << size << endl;
+ heapobject* ptr = reinterpret_cast<heapobject*>(term);
+- cerr << hex << (u_int)(ptr) << " : " << *ptr << " " << *(ptr+1) << dec << endl;
++ cerr << hex << (wordptr)(ptr) << " : " << *ptr << " " << *(ptr+1) << dec << endl;
+ return false;
+ }
+ return true;
+diff -ur qp9.1.orig/src/objects.h qp9.1/src/objects.h
+--- qp9.1.orig/src/objects.h 2011-08-23 11:17:44.000000000 +1200
++++ qp9.1/src/objects.h 2011-11-20 07:14:14.000000000 +1300
+@@ -1242,18 +1242,12 @@
+ << this->getName() << "\" ";
+
+ #ifndef WIN32
+- switch (hasAssociatedItem())
+- {
+- case AssociatedNone:
+- std::cerr << "(no info)";
+- break;
+- case AssociatedInteger:
+- std::cerr << "int: " << getAssociatedInteger();
+- break;
+- case AssociatedAtom:
+- std::cerr << "atom: [" << std::hex << (wordptr) getAssociatedAtom() << std::dec << "]";
+- break;
+- }
++ if (hasAssociatedInteger())
++ std::cerr << "int: " << getAssociatedInteger();
++ else if (hasAssociatedAtom())
++ std::cerr << "atom: [" << std::hex << (wordptr) getAssociatedAtom() << std::dec << "]";
++ else
++ std::cerr << "(no info)";
+ #endif
+ }
+ #endif
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.1-cflags.patch b/dev-lang/qu-prolog/files/qu-prolog-9.1-cflags.patch
new file mode 100644
index 000000000000..f53eb067b1fd
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.1-cflags.patch
@@ -0,0 +1,34 @@
+diff -ur qp9.1.orig/Makefile.in qp9.1/Makefile.in
+--- qp9.1.orig/Makefile.in 2011-08-23 11:17:54.000000000 +1200
++++ qp9.1/Makefile.in 2012-01-14 12:57:16.000000000 +1300
+@@ -23,7 +23,7 @@
+
+ export PROLOG = prolog
+
+-
++export CXX=@CXX@
+
+ .PHONY: all
+ all: objects
+diff -ur qp9.1.orig/src/Makefile.in qp9.1/src/Makefile.in
+--- qp9.1.orig/src/Makefile.in 2011-08-23 11:17:54.000000000 +1200
++++ qp9.1/src/Makefile.in 2012-01-14 12:48:33.000000000 +1300
+@@ -40,7 +40,7 @@
+
+ #export DEBUGGING=
+
+-export CXXFLAGS = @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 $(OPTIMISATION) @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
++#export CXXFLAGS = @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 $(OPTIMISATION) @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
+ export QACXXFLAGS = -Wall -D_GNU_SOURCE=1 @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
+
+ .PHONY: all
+@@ -79,6 +79,9 @@
+
+ # Targets
+
++.cc.o:
++ $(CXX) $(CXXFLAGS) @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized -c $<
++
+ .PHONY: commands
+ commands: $(GENERATED) $(LIBRARIES) $(BIG_LIBRARY)
+ @$(MAKE) $(ALL_COMMANDS)
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.1-gcc.patch b/dev-lang/qu-prolog/files/qu-prolog-9.1-gcc.patch
new file mode 100644
index 000000000000..82d5bc7f7ebb
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.1-gcc.patch
@@ -0,0 +1,33 @@
+diff -ur qp9.1.orig/src/pile.h qp9.1/src/pile.h
+--- qp9.1.orig/src/pile.h 2011-08-23 01:17:44.000000000 +0200
++++ qp9.1/src/pile.h 2013-01-09 12:07:44.000000000 +0100
+@@ -75,7 +75,7 @@
+ //
+ // Push a StoredType onto the pile.
+ //
+- void push(const StoredType s){ pushElement(s); }
++ void push(const StoredType s){ this->pushElement(s); }
+
+ //
+ // Pop a StoredType off the pile.
+@@ -85,7 +85,7 @@
+ //
+ // Pop n entries of StoredType off the pile.
+ //
+- void popNEntries(word32 n) { setTopOfStack(this->getTopOfStack() - n); }
++ void popNEntries(word32 n) { this->setTopOfStack(this->getTopOfStack() - n); }
+
+ //
+ // Check whether the pile is empty or not.
+diff -ur qp9.1.orig/src/system_support.cc qp9.1/src/system_support.cc
+--- qp9.1.orig/src/system_support.cc 2011-08-23 01:17:44.000000000 +0200
++++ qp9.1/src/system_support.cc 2013-01-09 12:07:16.000000000 +0100
+@@ -61,6 +61,8 @@
+ #include <iostream>
+ #ifdef WIN32
+ #include <direct.h>
++#else
++#include <unistd.h>
+ #endif //WIN32
+
+ using namespace std;
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.1-portage.patch b/dev-lang/qu-prolog/files/qu-prolog-9.1-portage.patch
new file mode 100644
index 000000000000..4a1aa23607ac
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.1-portage.patch
@@ -0,0 +1,32 @@
+diff -ur qp9.1.orig/bin/qc.in qp9.1/bin/qc.in
+--- qp9.1.orig/bin/qc.in 2011-08-23 11:17:28.000000000 +1200
++++ qp9.1/bin/qc.in 2011-11-20 07:16:18.000000000 +1300
+@@ -27,13 +27,13 @@
+
+ ##############################
+
+-preprocess='@QPHOME@/bin/qppp'
+-expand='@QPHOME@/bin/qg'
+-qpcompile='@QPHOME@/bin/qc1'
++preprocess='qppp'
++expand='qg'
++qpcompile='qc1'
+ compversion='qup'
+-assemble='@QPHOME@/bin/qa'
+-link='@QPHOME@/bin/ql'
+-execute='@QPHOME@/bin/qem'
++assemble='qa'
++link='ql'
++execute='qem'
+ libqofiles="@QPHOME@/prolog/compiler/*.qo @QPHOME@/prolog/library/*.qo"
+
+ ##############################
+diff -ur qp9.1.orig/prolog/Makefile.in qp9.1/prolog/Makefile.in
+--- qp9.1.orig/prolog/Makefile.in 2006-04-06 16:01:45.000000000 +1200
++++ qp9.1/prolog/Makefile.in 2011-11-20 07:16:18.000000000 +1300
+@@ -1,3 +1,5 @@
++PATH:=$(PATH):@QPHOME@/bin
++
+ .DEFAULT:
+ @$(MAKE) -C compiler $@
+ @$(MAKE) -C library $@
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.5-cflags.patch b/dev-lang/qu-prolog/files/qu-prolog-9.5-cflags.patch
new file mode 100644
index 000000000000..5bcce94d9b6b
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.5-cflags.patch
@@ -0,0 +1,34 @@
+diff -ur qp9.5.orig/Makefile.in qp9.5/Makefile.in
+--- qp9.5.orig/Makefile.in 2014-11-17 06:46:22.000000000 +0100
++++ qp9.5/Makefile.in 2015-05-03 11:29:52.000000000 +0200
+@@ -23,7 +23,7 @@
+
+ export PROLOG = prolog
+
+-
++export CXX=@CXX@
+
+ .PHONY: all
+ all: objects
+diff -ur qp9.5.orig/src/Makefile.in qp9.5/src/Makefile.in
+--- qp9.5.orig/src/Makefile.in 2014-11-17 06:46:22.000000000 +0100
++++ qp9.5/src/Makefile.in 2015-05-03 11:29:52.000000000 +0200
+@@ -40,7 +40,7 @@
+
+ #export DEBUGGING=
+
+-export CXXFLAGS = @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 $(OPTIMISATION) @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
++#export CXXFLAGS = @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 $(OPTIMISATION) @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
+ export QACXXFLAGS = -Wall -D_GNU_SOURCE=1 @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
+
+ .PHONY: all
+@@ -79,6 +79,9 @@
+
+ # Targets
+
++.cc.o:
++ $(CXX) $(CXXFLAGS) @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized -c $<
++
+ .PHONY: commands
+ commands: $(GENERATED) $(LIBRARIES) $(BIG_LIBRARY)
+ @$(MAKE) $(ALL_COMMANDS)
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.5-portage.patch b/dev-lang/qu-prolog/files/qu-prolog-9.5-portage.patch
new file mode 100644
index 000000000000..55dc08ffe474
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.5-portage.patch
@@ -0,0 +1,32 @@
+diff -ur qp9.5.orig/bin/qc.in qp9.5/bin/qc.in
+--- qp9.5.orig/bin/qc.in 2014-11-17 06:45:59.000000000 +0100
++++ qp9.5/bin/qc.in 2015-05-03 11:31:54.000000000 +0200
+@@ -27,13 +27,13 @@
+
+ ##############################
+
+-preprocess='@QPHOME@/bin/qppp'
+-expand='@QPHOME@/bin/qg'
+-qpcompile='@QPHOME@/bin/qc1'
++preprocess='qppp'
++expand='qg'
++qpcompile='qc1'
+ compversion='qup'
+-assemble='@QPHOME@/bin/qa'
+-link='@QPHOME@/bin/ql'
+-execute='@QPHOME@/bin/qem'
++assemble='qa'
++link='ql'
++execute='qem'
+ libqofiles="@QPHOME@/prolog/compiler/*.qo @QPHOME@/prolog/library/*.qo"
+
+ ##############################
+diff -ur qp9.5.orig/prolog/Makefile.in qp9.5/prolog/Makefile.in
+--- qp9.5.orig/prolog/Makefile.in 2006-04-06 06:01:45.000000000 +0200
++++ qp9.5/prolog/Makefile.in 2015-05-03 11:31:54.000000000 +0200
+@@ -1,3 +1,5 @@
++PATH:=$(PATH):@QPHOME@/bin
++
+ .DEFAULT:
+ @$(MAKE) -C compiler $@
+ @$(MAKE) -C library $@
diff --git a/dev-lang/qu-prolog/metadata.xml b/dev-lang/qu-prolog/metadata.xml
new file mode 100644
index 000000000000..8f04a5fdaa28
--- /dev/null
+++ b/dev-lang/qu-prolog/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>prolog@gentoo.org</email>
+ <name>Prolog</name>
+ </maintainer>
+ <use>
+ <flag name="pedro">Pedro subscription/notification communications system</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/qu-prolog/qu-prolog-10.0.ebuild b/dev-lang/qu-prolog/qu-prolog-10.0.ebuild
new file mode 100644
index 000000000000..a32be5b617f3
--- /dev/null
+++ b/dev-lang/qu-prolog/qu-prolog-10.0.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib qmake-utils
+
+MY_P=qp${PV}
+
+DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
+HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
+SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug doc examples pedro qt4 readline threads"
+
+RDEPEND="
+ !dev-util/mpatch
+ !dev-util/rej
+ !games-rpg/kqlives
+ qt4? ( dev-qt/qtgui:4 )
+ pedro? ( net-misc/pedro )
+ readline? ( app-misc/rlwrap )"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-configure.patch
+ epatch "${FILESDIR}"/${P}-associated-item.patch
+ epatch "${FILESDIR}"/${P}-gcc6.patch
+}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable debug) \
+ $(use_enable threads multiple-threads)
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ eqmake4 xqp.pro
+ fi
+}
+
+src_compile() {
+ emake OPTIMISATION="${CXXFLAGS}"
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ emake
+ fi
+}
+
+src_install() {
+ sed \
+ -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
+ -i bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
+
+ dobin bin/{qc,qecat,qp,kq}
+
+ into /usr/$(get_libdir)/${PN}
+ dobin bin/{qa,qc1.qup,qdeal,qem,qg,ql,qppp}
+
+ use qt4 && dobin src/xqp/xqp
+
+ insinto /usr/$(get_libdir)/${PN}/bin
+ doins bin/rl_commands
+ doins bin/{qc1.qup,qecat,qg,qp}.qx
+
+ insinto /usr/$(get_libdir)/${PN}/library
+ doins prolog/library/*.qo
+
+ insinto /usr/$(get_libdir)/${PN}/compiler
+ doins prolog/compiler/*.qo
+
+ doman doc/man/man1/*.1
+
+ dodoc README
+
+ if use doc ; then
+ docinto reference-manual
+ dodoc doc/manual/*.html
+ docinto user-guide
+ dodoc doc/user/main.pdf
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.ql
+ docinto examples
+ newdoc examples/README README.examples
+ fi
+}
diff --git a/dev-lang/qu-prolog/qu-prolog-9.1-r1.ebuild b/dev-lang/qu-prolog/qu-prolog-9.1-r1.ebuild
new file mode 100644
index 000000000000..3b0035ad4775
--- /dev/null
+++ b/dev-lang/qu-prolog/qu-prolog-9.1-r1.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib qmake-utils
+
+MY_P=qp${PV}
+
+DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
+HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
+SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
+
+LICENSE="Qu-Prolog GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc examples pedro qt4 readline threads"
+
+RDEPEND="
+ !dev-util/mpatch
+ !dev-util/rej
+ qt4? ( dev-qt/qtgui:4 )
+ pedro? ( net-misc/pedro )
+ readline? ( app-misc/rlwrap )"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-portage.patch \
+ "${FILESDIR}"/${P}-cflags.patch \
+ "${FILESDIR}"/${P}-cerr-ptr.patch \
+ "${FILESDIR}"/${P}-gcc.patch
+}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable debug) \
+ $(use_enable threads multiple-threads)
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ eqmake4 xqp.pro
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ emake
+ fi
+}
+
+src_install() {
+ sed \
+ -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
+ -i bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
+
+ dobin bin/{qa,qdeal,qem,ql,qc,qc1.qup,qecat,qg,qp,qppp,kq}
+
+ use qt4 && dobin src/xqp/xqp
+
+ insinto /usr/$(get_libdir)/${PN}/bin
+ doins bin/rl_commands
+ doins bin/{qc1.qup,qecat,qg,qp}.qx
+
+ insinto /usr/$(get_libdir)/${PN}/library
+ doins prolog/library/*.qo
+
+ insinto /usr/$(get_libdir)/${PN}/compiler
+ doins prolog/compiler/*.qo
+
+ doman doc/man/man1/*.1
+
+ dodoc README
+
+ if use doc ; then
+ docinto reference-manual
+ dodoc doc/manual/*.html
+ docinto user-guide
+ dodoc doc/user/main.pdf
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.ql
+ docinto examples
+ newdoc examples/README README.examples
+ fi
+}
diff --git a/dev-lang/qu-prolog/qu-prolog-9.1.ebuild b/dev-lang/qu-prolog/qu-prolog-9.1.ebuild
new file mode 100644
index 000000000000..cf59aef3bbe6
--- /dev/null
+++ b/dev-lang/qu-prolog/qu-prolog-9.1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit eutils multilib qmake-utils
+
+MY_P=qp${PV}
+
+DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
+HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
+SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
+
+LICENSE="Qu-Prolog GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug doc examples pedro qt4 readline threads"
+
+RDEPEND="
+ !dev-util/mpatch
+ !dev-util/rej
+ qt4? ( dev-qt/qtgui:4 )
+ pedro? ( net-misc/pedro )
+ readline? ( app-misc/rlwrap )"
+
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-portage.patch \
+ "${FILESDIR}"/${P}-cflags.patch \
+ "${FILESDIR}"/${P}-cerr-ptr.patch \
+ "${FILESDIR}"/${P}-gcc.patch
+}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable debug) \
+ $(use_enable threads multiple-threads)
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ eqmake4 xqp.pro
+ fi
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ emake || die "emake xqp failed"
+ fi
+}
+
+src_install() {
+ sed -i -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
+ bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
+
+ dobin bin/qa bin/qdeal bin/qem bin/ql || die
+ dobin bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp bin/qppp || die
+ dobin bin/kq || die
+
+ if use qt4; then
+ dobin src/xqp/xqp || die
+ fi
+
+ insinto /usr/$(get_libdir)/${PN}/bin
+ doins bin/rl_commands
+ doins bin/qc1.qup.qx \
+ bin/qecat.qx \
+ bin/qg.qx \
+ bin/qp.qx || die
+
+ insinto /usr/$(get_libdir)/${PN}/library
+ doins prolog/library/*.qo || die
+
+ insinto /usr/$(get_libdir)/${PN}/compiler
+ doins prolog/compiler/*.qo || die
+
+ doman doc/man/man1/*.1 || die
+
+ dodoc README || die
+
+ if use doc ; then
+ docinto reference-manual
+ dodoc doc/manual/*.html || die
+ docinto user-guide
+ dodoc doc/user/main.pdf || die
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.ql || die
+ docinto examples
+ dodoc examples/README || die
+ fi
+}
diff --git a/dev-lang/qu-prolog/qu-prolog-9.5.ebuild b/dev-lang/qu-prolog/qu-prolog-9.5.ebuild
new file mode 100644
index 000000000000..b8b4cd271e0f
--- /dev/null
+++ b/dev-lang/qu-prolog/qu-prolog-9.5.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib qmake-utils
+
+MY_P=qp${PV}
+
+DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
+HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
+SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
+
+LICENSE="Qu-Prolog GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc examples pedro qt4 readline threads"
+
+RDEPEND="
+ !dev-util/mpatch
+ !dev-util/rej
+ qt4? ( dev-qt/qtgui:4 )
+ pedro? ( net-misc/pedro )
+ readline? ( app-misc/rlwrap )"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-portage.patch \
+ "${FILESDIR}"/${P}-cflags.patch
+}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable debug) \
+ $(use_enable threads multiple-threads)
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ eqmake4 xqp.pro
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ emake
+ fi
+}
+
+src_install() {
+ sed \
+ -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
+ -i bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
+
+ dobin bin/{qa,qdeal,qem,ql,qc,qc1.qup,qecat,qg,qp,qppp,kq}
+
+ use qt4 && dobin src/xqp/xqp
+
+ insinto /usr/$(get_libdir)/${PN}/bin
+ doins bin/rl_commands
+ doins bin/{qc1.qup,qecat,qg,qp}.qx
+
+ insinto /usr/$(get_libdir)/${PN}/library
+ doins prolog/library/*.qo
+
+ insinto /usr/$(get_libdir)/${PN}/compiler
+ doins prolog/compiler/*.qo
+
+ doman doc/man/man1/*.1
+
+ dodoc README
+
+ if use doc ; then
+ docinto reference-manual
+ dodoc doc/manual/*.html
+ docinto user-guide
+ dodoc doc/user/main.pdf
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.ql
+ docinto examples
+ newdoc examples/README README.examples
+ fi
+}
diff --git a/dev-lang/qu-prolog/qu-prolog-9.6.ebuild b/dev-lang/qu-prolog/qu-prolog-9.6.ebuild
new file mode 100644
index 000000000000..39c0124558d9
--- /dev/null
+++ b/dev-lang/qu-prolog/qu-prolog-9.6.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib qmake-utils
+
+MY_P=qp${PV}
+
+DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
+HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
+SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
+
+LICENSE="Qu-Prolog GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc examples pedro qt4 readline threads"
+
+RDEPEND="
+ !dev-util/mpatch
+ !dev-util/rej
+ qt4? ( dev-qt/qtgui:4 )
+ pedro? ( net-misc/pedro )
+ readline? ( app-misc/rlwrap )"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}"/${MY_P}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable debug) \
+ $(use_enable threads multiple-threads)
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ eqmake4 xqp.pro
+ fi
+}
+
+src_compile() {
+ emake OPTIMISATION="${CXXFLAGS}"
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ emake
+ fi
+}
+
+src_install() {
+ sed \
+ -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
+ -i bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
+
+ dobin bin/{qc,qecat,qp,kq}
+
+ into /usr/$(get_libdir)/${PN}
+ dobin bin/{qa,qc1.qup,qdeal,qem,qg,ql,qppp}
+
+ use qt4 && dobin src/xqp/xqp
+
+ insinto /usr/$(get_libdir)/${PN}/bin
+ doins bin/rl_commands
+ doins bin/{qc1.qup,qecat,qg,qp}.qx
+
+ insinto /usr/$(get_libdir)/${PN}/library
+ doins prolog/library/*.qo
+
+ insinto /usr/$(get_libdir)/${PN}/compiler
+ doins prolog/compiler/*.qo
+
+ doman doc/man/man1/*.1
+
+ dodoc README
+
+ if use doc ; then
+ docinto reference-manual
+ dodoc doc/manual/*.html
+ docinto user-guide
+ dodoc doc/user/main.pdf
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.ql
+ docinto examples
+ newdoc examples/README README.examples
+ fi
+}
diff --git a/dev-lang/qu-prolog/qu-prolog-9.7.ebuild b/dev-lang/qu-prolog/qu-prolog-9.7.ebuild
new file mode 100644
index 000000000000..39c0124558d9
--- /dev/null
+++ b/dev-lang/qu-prolog/qu-prolog-9.7.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multilib qmake-utils
+
+MY_P=qp${PV}
+
+DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
+HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
+SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
+
+LICENSE="Qu-Prolog GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc examples pedro qt4 readline threads"
+
+RDEPEND="
+ !dev-util/mpatch
+ !dev-util/rej
+ qt4? ( dev-qt/qtgui:4 )
+ pedro? ( net-misc/pedro )
+ readline? ( app-misc/rlwrap )"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}"/${MY_P}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable debug) \
+ $(use_enable threads multiple-threads)
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ eqmake4 xqp.pro
+ fi
+}
+
+src_compile() {
+ emake OPTIMISATION="${CXXFLAGS}"
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ emake
+ fi
+}
+
+src_install() {
+ sed \
+ -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
+ -i bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
+
+ dobin bin/{qc,qecat,qp,kq}
+
+ into /usr/$(get_libdir)/${PN}
+ dobin bin/{qa,qc1.qup,qdeal,qem,qg,ql,qppp}
+
+ use qt4 && dobin src/xqp/xqp
+
+ insinto /usr/$(get_libdir)/${PN}/bin
+ doins bin/rl_commands
+ doins bin/{qc1.qup,qecat,qg,qp}.qx
+
+ insinto /usr/$(get_libdir)/${PN}/library
+ doins prolog/library/*.qo
+
+ insinto /usr/$(get_libdir)/${PN}/compiler
+ doins prolog/compiler/*.qo
+
+ doman doc/man/man1/*.1
+
+ dodoc README
+
+ if use doc ; then
+ docinto reference-manual
+ dodoc doc/manual/*.html
+ docinto user-guide
+ dodoc doc/user/main.pdf
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.ql
+ docinto examples
+ newdoc examples/README README.examples
+ fi
+}
diff --git a/dev-lang/rakudo/Manifest b/dev-lang/rakudo/Manifest
new file mode 100644
index 000000000000..b316a7778b84
--- /dev/null
+++ b/dev-lang/rakudo/Manifest
@@ -0,0 +1,11 @@
+AUX rakudo-2016.04-jna-lib.patch 970 SHA256 3700ede81d4ed7b5662d506ee81d232a93e322f3644e611060154db49b470323 SHA512 3e76c33e08911fc9105fc8e6f046a8af133ec956aad1537653ee335f0068d4428a9c8be45af45ed3eccae58f1be38579614bac278deb00ea143829e6d98d38c6 WHIRLPOOL 184f5c756b828a869b45502fb61bffaa15dd04fc88041a5f114b01ac59dd97ac4c1525eb6f816793e24d5dabed28b76589dcbe82e65b1aedaa88614dd86b8174
+DIST rakudo-2017.07.tar.gz 2984621 SHA256 a1d55c2bfef84c32739535e0638e87496ececf4c97a74796f97fa97edb51edea SHA512 a80fba71bce8a6537962c5728ef1b54c6bfd275b9a4b7caacc6497f12a826b293a3a2bf8c412b21e91bb29bd3a325d9da17ecd8abb0ba2ffd4b8eecf0297d39f WHIRLPOOL 6c45f3e323bae859b00a2c97d37e40e0fe1e97daf359a692de8a9fd176899805ced1b5ebc98f57f471efca9ce35061b191b85132d7945c0bd39859cf9fbe2e4b
+DIST rakudo-2017.08.tar.gz 2992885 SHA256 bd18bcb41e0174f3ea4a857da9e599a11d68c21535fd0bee52885ada4a3b32b5 SHA512 61091f1181bc1d95433650ecc8ee318cf7ef4ee1a67d492020654e8abd5095368d8a0e3d20647f336de5864eba5f8ef4cf1ce54d09763cf79cc1b7c5c457a300 WHIRLPOOL 4862b5b40a14754c7ef995fabe8ce4451f85836c4dfb8135e92cc0f9a8523db967c0b7a92f55c510f0c5d2f054d74fb57aa6bbd524eef2e53c6e973ada43bef6
+DIST rakudo-2017.09.tar.gz 3006759 SHA256 c20be0429428a5987d8b1957554f56bc02fbd6e903bb24a8b10e9ad99d7fef08 SHA512 6ae257430436586a519cc411771c5a19c3bf6aefcb5b02cd1751184ccd8f2fe860ce33c53421ff1fd48a598f27532932a1754407fb0f6a1861da0808c5876b9b WHIRLPOOL 3d526ca03815f66686c63092a8e74af37f64d30f9e2cdd60ddf261480248846f73355c93346b485a70b7c4c1d1b986948dadae3783591fecd434b0225f03ec8d
+EBUILD rakudo-2017.07.ebuild 1616 SHA256 60fea916e8e956f1a87c5874308311e401009e7beeb8ea0cb41b4e2321a0d142 SHA512 74d525ad581cc02093f6a21123b841a1cd3cfe23f176e40cbcf161e5ceefdc81791fcbbeaab3041380b882a430e5c65cc339a64b6c6d117e726137e61f683e78 WHIRLPOOL ff3947e7b50b0d7e48f7e233713a2975f0dbdf86b8ab57007c918d610315c404fa47122e02090198737217808f69e222510f2af2caa0f69f79d2a6c1e241840a
+EBUILD rakudo-2017.08.ebuild 1616 SHA256 60fea916e8e956f1a87c5874308311e401009e7beeb8ea0cb41b4e2321a0d142 SHA512 74d525ad581cc02093f6a21123b841a1cd3cfe23f176e40cbcf161e5ceefdc81791fcbbeaab3041380b882a430e5c65cc339a64b6c6d117e726137e61f683e78 WHIRLPOOL ff3947e7b50b0d7e48f7e233713a2975f0dbdf86b8ab57007c918d610315c404fa47122e02090198737217808f69e222510f2af2caa0f69f79d2a6c1e241840a
+EBUILD rakudo-2017.09.ebuild 1616 SHA256 60fea916e8e956f1a87c5874308311e401009e7beeb8ea0cb41b4e2321a0d142 SHA512 74d525ad581cc02093f6a21123b841a1cd3cfe23f176e40cbcf161e5ceefdc81791fcbbeaab3041380b882a430e5c65cc339a64b6c6d117e726137e61f683e78 WHIRLPOOL ff3947e7b50b0d7e48f7e233713a2975f0dbdf86b8ab57007c918d610315c404fa47122e02090198737217808f69e222510f2af2caa0f69f79d2a6c1e241840a
+EBUILD rakudo-9999.ebuild 1714 SHA256 9a97b176c402e338c47f64baffe9dbae095f7929f39245d81e7a668db2117f5e SHA512 06451f51ced45674984aada066a94a268bafdb858172330a041b47196c2caae91af4263cee68171f34a8f89933f59b5517d54c456ff24a2b7e76b61e238bf56d WHIRLPOOL 88129094f4888b9bcc0c47a46af7b4fa22aba563339c7ea19c2fe19fcd0c6606b2101d1aac3325fd79fea43f721454d0554ebbcbadeecd2fd2e1380a64691502
+MISC ChangeLog 7779 SHA256 49ed3c3bcb9d94137fd729c11cd1b3f82baac3b5edac5ab717c59d1ba2b4b1e7 SHA512 072435ff251446c97a585cc22578a40f440453122cf98998bd5ef333c5d1d4dc6cd8d3f3aa63063d890c40186d02622e5cfb636d0beeaa74c2f6562cd47022b4 WHIRLPOOL 317d540f1f845610193802db9f9b1abee13eeed679e67ecab5a2e408d6716847f679df395b1fe0dcd094c77620024de45db8a9edf62efaf5294ba5bdaedbcba0
+MISC ChangeLog-2015 11105 SHA256 14cfecf1d8fb52e762394fe58c152186a96a43c8218bcdce3a2fd24e183dfefc SHA512 7b667a5cd7ce5f4620739f0289fced88434e7848518c1476ad7c66e946fc8645e613a468c0cbba03acc207465cb97601286897372d28d4dc53ac500fbe8d05e1 WHIRLPOOL de461c09858e8f30de8bffdeb94535479d73acac62370ade62e5ad50346cd72feec0a3bfc3ee9a12ed655111738ef22f6e2cf7f21980c5c35beca6045fb1f658
+MISC metadata.xml 626 SHA256 6029b332677a6b74b730d8fee6795939a936eab3b7ffc5bb6fad80068f368cd0 SHA512 8ab071e74418a4782cf11c870bda3dda2656c0e1961e05edcde9776f4ad1eb18a07af9f2dc3fdfd5970f3d51f63bd342956c0afbfb79ccdd7f6e9d30403824b8 WHIRLPOOL f60ec21238cd377e03c6eabbc279570448182f49be60881ac6d260aa94d9a434fa6b4eb9efbb32469fe180e079c3f36948f112292b0614ce86db4ec14aa31374
diff --git a/dev-lang/rakudo/files/rakudo-2016.04-jna-lib.patch b/dev-lang/rakudo/files/rakudo-2016.04-jna-lib.patch
new file mode 100644
index 000000000000..3f4532f0d154
--- /dev/null
+++ b/dev-lang/rakudo/files/rakudo-2016.04-jna-lib.patch
@@ -0,0 +1,21 @@
+Upstream uses -Xbootclasspath, which prevents us from using
+LD_LIBRARY_PATH, thefore we need to set jna.boot.library.path.
+See http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4285197.
+
+Chewi
+2016/05/15
+
+diff -Naur rakudo-2016.04.orig/tools/build/create-jvm-runner.pl rakudo-2016.04/tools/build/create-jvm-runner.pl
+--- rakudo-2016.04.orig/tools/build/create-jvm-runner.pl 2015-12-25 19:23:19.000000000 +0000
++++ rakudo-2016.04/tools/build/create-jvm-runner.pl 2016-05-15 11:30:37.488085661 +0100
+@@ -60,7 +60,10 @@
+ }
+
+ my $classpath = join($cpsep, ($jardir, $libdir, $nqplibdir));
++my $jna_lib = `java-config --query LIBRARY_PATH --package jna-4`;
++chomp $jna_lib;
+ my $jopts = '-noverify -Xms100m -Xbootclasspath/a:' . $perl6jars
++ . ' -Djna.boot.library.path=' . $jna_lib
+ . ' -cp ' . ($^O eq 'MSWin32' ? '"%CLASSPATH%";' : '$CLASSPATH:') . $classpath
+ . ' -Dperl6.prefix=' . $prefix
+ . ' -Djna.library.path=' . $sharedir
diff --git a/dev-lang/rakudo/metadata.xml b/dev-lang/rakudo/metadata.xml
new file mode 100644
index 000000000000..4d1883d315c7
--- /dev/null
+++ b/dev-lang/rakudo/metadata.xml
@@ -0,0 +1,20 @@
+<?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>
+ <maintainer type="person">
+ <email>tomboy64@sina.cn</email>
+ <name>Matthew Brewer</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>perl@gentoo.org</email>
+ <name>Gentoo Perl Project</name>
+ </maintainer>
+ <use>
+ <flag name="clang">Use Clang to compile the MoarVM backend</flag>
+ <flag name="moar">Use the MoarVM as backend</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/rakudo/rakudo-2017.07.ebuild b/dev-lang/rakudo/rakudo-2017.07.ebuild
new file mode 100644
index 000000000000..0916271bb833
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2017.07.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit java-pkg-opt-2
+
+DESCRIPTION="A compiler for the Perl 6 programming language"
+HOMEPAGE="http://rakudo.org"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/rakudo/${PN}.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://rakudo.perl6.org/downloads/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="Artistic-2"
+SLOT="0"
+# TODO: add USE="javascript" once that's usable in nqp
+IUSE="clang java +moar test"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="~dev-lang/nqp-${PV}:${SLOT}=[java?,moar?,clang=]"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.7 )"
+DEPEND="${CDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.7 )
+ >=dev-lang/perl-5.10"
+
+pkg_pretend() {
+ if has_version dev-lang/rakudo; then
+ ewarn "Rakudo is known to fail compilation/installation with Rakudo"
+ ewarn "already being installed. So if it fails, try unmerging dev-lang/rakudo,"
+ ewarn "then do a new installation."
+ ewarn "(see Bug #584394)"
+ fi
+}
+
+src_configure() {
+ local backends
+ use moar && backends+="moar,"
+ use java && backends+="jvm"
+
+ local myargs=(
+ "--prefix=/usr"
+ "--sysroot=/"
+ "--sdkroot=/"
+ "--backends=${backends}"
+ )
+
+ perl Configure.pl "${myargs[@]}" || die
+
+ if use java; then
+ NQP=$(java-pkg_getjars --with-dependencies nqp)
+ fi
+}
+
+src_compile() {
+ emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}" install
+}
+
+src_test() {
+ RAKUDO_PRECOMP_PREFIX=$(mktemp -d) default
+}
diff --git a/dev-lang/rakudo/rakudo-2017.08.ebuild b/dev-lang/rakudo/rakudo-2017.08.ebuild
new file mode 100644
index 000000000000..0916271bb833
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2017.08.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit java-pkg-opt-2
+
+DESCRIPTION="A compiler for the Perl 6 programming language"
+HOMEPAGE="http://rakudo.org"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/rakudo/${PN}.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://rakudo.perl6.org/downloads/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="Artistic-2"
+SLOT="0"
+# TODO: add USE="javascript" once that's usable in nqp
+IUSE="clang java +moar test"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="~dev-lang/nqp-${PV}:${SLOT}=[java?,moar?,clang=]"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.7 )"
+DEPEND="${CDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.7 )
+ >=dev-lang/perl-5.10"
+
+pkg_pretend() {
+ if has_version dev-lang/rakudo; then
+ ewarn "Rakudo is known to fail compilation/installation with Rakudo"
+ ewarn "already being installed. So if it fails, try unmerging dev-lang/rakudo,"
+ ewarn "then do a new installation."
+ ewarn "(see Bug #584394)"
+ fi
+}
+
+src_configure() {
+ local backends
+ use moar && backends+="moar,"
+ use java && backends+="jvm"
+
+ local myargs=(
+ "--prefix=/usr"
+ "--sysroot=/"
+ "--sdkroot=/"
+ "--backends=${backends}"
+ )
+
+ perl Configure.pl "${myargs[@]}" || die
+
+ if use java; then
+ NQP=$(java-pkg_getjars --with-dependencies nqp)
+ fi
+}
+
+src_compile() {
+ emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}" install
+}
+
+src_test() {
+ RAKUDO_PRECOMP_PREFIX=$(mktemp -d) default
+}
diff --git a/dev-lang/rakudo/rakudo-2017.09.ebuild b/dev-lang/rakudo/rakudo-2017.09.ebuild
new file mode 100644
index 000000000000..0916271bb833
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2017.09.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit java-pkg-opt-2
+
+DESCRIPTION="A compiler for the Perl 6 programming language"
+HOMEPAGE="http://rakudo.org"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/rakudo/${PN}.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://rakudo.perl6.org/downloads/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="Artistic-2"
+SLOT="0"
+# TODO: add USE="javascript" once that's usable in nqp
+IUSE="clang java +moar test"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="~dev-lang/nqp-${PV}:${SLOT}=[java?,moar?,clang=]"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.7 )"
+DEPEND="${CDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.7 )
+ >=dev-lang/perl-5.10"
+
+pkg_pretend() {
+ if has_version dev-lang/rakudo; then
+ ewarn "Rakudo is known to fail compilation/installation with Rakudo"
+ ewarn "already being installed. So if it fails, try unmerging dev-lang/rakudo,"
+ ewarn "then do a new installation."
+ ewarn "(see Bug #584394)"
+ fi
+}
+
+src_configure() {
+ local backends
+ use moar && backends+="moar,"
+ use java && backends+="jvm"
+
+ local myargs=(
+ "--prefix=/usr"
+ "--sysroot=/"
+ "--sdkroot=/"
+ "--backends=${backends}"
+ )
+
+ perl Configure.pl "${myargs[@]}" || die
+
+ if use java; then
+ NQP=$(java-pkg_getjars --with-dependencies nqp)
+ fi
+}
+
+src_compile() {
+ emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}" install
+}
+
+src_test() {
+ RAKUDO_PRECOMP_PREFIX=$(mktemp -d) default
+}
diff --git a/dev-lang/rakudo/rakudo-9999.ebuild b/dev-lang/rakudo/rakudo-9999.ebuild
new file mode 100644
index 000000000000..22cc6ec22582
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-9999.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit java-pkg-opt-2
+
+DESCRIPTION="A compiler for the Perl 6 programming language"
+HOMEPAGE="http://rakudo.org"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="https://github.com/rakudo/${PN}.git"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="${HOMEPAGE}/downloads/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="Artistic-2"
+SLOT="0"
+# TODO: add USE="javascript" once that's usable in nqp
+IUSE="clang java +moar test"
+REQUIRED_USE="|| ( java moar )"
+
+CDEPEND="~dev-lang/nqp-${PV}:${SLOT}=[java?,moar?,clang=]"
+RDEPEND="${CDEPEND}
+ java? ( >=virtual/jre-1.7 )"
+DEPEND="${CDEPEND}
+ clang? ( sys-devel/clang )
+ java? ( >=virtual/jdk-1.7 )
+ >=dev-lang/perl-5.10"
+
+PATCHES=( "${FILESDIR}/${PN}-2016.04-jna-lib.patch" )
+
+pkg_pretend() {
+ if has_version dev-lang/rakudo; then
+ ewarn "Rakudo is known to fail compilation/installation with Rakudo"
+ ewarn "already being installed. So if it fails, try unmerging dev-lang/rakudo,"
+ ewarn "then do a new installation."
+ ewarn "(see Bug #584394)"
+ fi
+}
+
+src_prepare() {
+ epatch "${PATCHES[@]}"
+ epatch_user
+}
+
+src_configure() {
+ local backends
+ use moar && backends+="moar,"
+ use java && backends+="jvm"
+
+ local myargs=(
+ "--prefix=/usr"
+ "--sysroot=/"
+ "--sdkroot=/"
+ "--backends=${backends}"
+ )
+
+ perl Configure.pl "${myargs[@]}" || die
+
+ if use java; then
+ NQP=$(java-pkg_getjars --with-dependencies nqp)
+ fi
+}
+
+src_compile() {
+ emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" NQP_JARS="${NQP}" BLD_NQP_JARS="${NQP}" install
+}
+
+src_test() {
+ RAKUDO_PRECOMP_PREFIX=$(mktemp -d) default
+}
diff --git a/dev-lang/rebol-bin/Manifest b/dev-lang/rebol-bin/Manifest
new file mode 100644
index 000000000000..7aeb86ca0825
--- /dev/null
+++ b/dev-lang/rebol-bin/Manifest
@@ -0,0 +1,8 @@
+DIST r3-a111-4-4.tar.gz 269516 SHA256 421c84f86b4649eaccaffe69c3a2b1bd856929e63711eea81da49d10bcdc05a4 SHA512 060b01197c242ceda20fe84228a5ae7d2a329eac04549ad5e0f368bc91baea515143e541ed9815a14aba9b3d571a22ff0d643716dc21452d5aeeb7678938455e WHIRLPOOL e3bb2de479e3620a6209c7e7dd245b9725422f7eb8bd3fc1db588d28dd605f2f19e5bf9f3ceec0a9f9978e360f02d59f6b781ed5f633eca17ea1656eae8292cb
+DIST r3-g25033f8 553424 SHA256 9a7ae292bbecdd4fcc6246035c837668b5cb1725375ec5534774612496f305b9 SHA512 8376e0d6e708777539f9639d5c78120aa02e7364d269435bec6ef6b0527e8321e0135ea1cb005246cb7e3387cf5c941864933e21c21fb3f0e322f5c8ea118ec3 WHIRLPOOL 613f7343c9fc0c5e176ef1e3051a4e3721856483fa23ec6d5fec344382355ddc7dd7226a0facf430bd25c268efa32f9074598206c22314e6bcb20ef72cd66017
+DIST r3-linux-x64-gbf237fc 563560 SHA256 3ddb6e7d90fda9623676f7bc0dfc28e373e047e9c73c7c8df77b314aec34a832 SHA512 e984a10c59aa66a081dd8aee8ad7376cc50c600211167468b8fb9b461481b7e8df50b974de931d5c6ce31df3f70dd108f9e890daeb759da525ea81ebf9c5dc35 WHIRLPOOL 1a1274294194ddd9d9235b4876038e3f2a286e1f932cb40793b778f63012429ebcb353f978f116dbb45079c494e50e8cdfca3f6a980a27ce479111bc7e5c5856
+EBUILD rebol-bin-3_pre111.ebuild 571 SHA256 8e70d914ca3116dd8cf59b8f7824215abf7308b9ff7d4f1dd8e2610248a311a4 SHA512 8bd63b6082ce4244ff09a8bad9ae6dca744a6d2ccfb01dabba84d27fdc7c34cee11b3457e6421954ea2361b366404fd205d169914c48c2440c156ffc14af54c3 WHIRLPOOL 44dd226cb09cc02067a12f2a5acf220790b3ad3b3bdbfabd9a4c5a59b838cdd5df11e48919c2c1dc8e5daf9c36bb4242ad560669452f33e689cc1d1b2349c982
+EBUILD rebol-bin-3_pre20140304.ebuild 753 SHA256 86653d4905a9205786e172ccc1c0c99654a8dadcd44822f95a8a04b1b00bdd52 SHA512 e919b116a7ea7527f309b753854a8be92f6980acdb38b3c872292ffe5caabdfd7864614d43241532f26d9c54b5d31ad34c4e61e0e745a98bea2772da9eb2040b WHIRLPOOL b6f8ff3d8a980b9e32c19da4de378a79866dcc18e4fe70c6ae055e3e8e437583186ab2b31cb383018eddb40d7917093e0b85a1258623983cfc96d1747b4dc3c4
+MISC ChangeLog 2635 SHA256 bea1fd4be6a3fe1690e29ca35af7ed84f5e1b123d0f8c19f63f861cdac61f852 SHA512 e0373387f43dc4ac5c82cfd777ddb5db2a45c2cd62a9545aa929cb8ade30cd2ec02f61b7c692905ac7ce4788dc702d2f2249d1b2a70247b0876233a2b931b9cd WHIRLPOOL 6f4d50c9895ed382d89c0c2314ecc5a570b78409bdd1758e77cd40aab705e28a3fa50527c57763b6cd7def697d9ae727ee5545dce7e57ccf3219a930b2936ce1
+MISC ChangeLog-2015 508 SHA256 ee57384872577e13f8d034e6df2da188352b91cd4fa222785a7635926f7afc66 SHA512 239b307084937abb632875c2aea4f60a0e029d99549e0cee528d390e57635bd73fe662b760d25ad1fadced9366d423f2def25f153139be8d107845813df494bb WHIRLPOOL edac2a96ff9540b669a8c464c101f029ceb4afe683611a415532214f78a632f85ddaafcc25c2e1d69de472bd45378d13e1350bbf593fb9e9621d611d9733b7ab
+MISC metadata.xml 359 SHA256 52362b882011c54cf7a85b3c529777a0ddf173cedcca5d78f3cd61bca23f6118 SHA512 d8984bf44ff0235c70fbac99e0ecdd93fad402258de3c659a9707ce6c40ac22c05027f6d2dfaed90b3dd19a0ebc5f8d281ea35fad84aa46d6f5c4cb1c64e8dce WHIRLPOOL e83e6c052448c5410ff91e9f6a3e5db37b016a78026a91b258a5c2c92c15b2fe342248d84ff07ae6665467e2906ab7d379301437ea638fd8da89ac531d0ffe1a
diff --git a/dev-lang/rebol-bin/metadata.xml b/dev-lang/rebol-bin/metadata.xml
new file mode 100644
index 000000000000..63a5751de4a5
--- /dev/null
+++ b/dev-lang/rebol-bin/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>
+ <maintainer type="person">
+ <email>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/rebol-bin/rebol-bin-3_pre111.ebuild b/dev-lang/rebol-bin/rebol-bin-3_pre111.ebuild
new file mode 100644
index 000000000000..c74fb7672c18
--- /dev/null
+++ b/dev-lang/rebol-bin/rebol-bin-3_pre111.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+DESCRIPTION="Relative Expression-Based Object Language"
+HOMEPAGE="http://rebol.com"
+
+MY_PR=${PVR/3_pre/}
+SRC_URI="http://www.rebol.com/r3/downloads/r3-a${MY_PR}-4-4.tar.gz"
+
+inherit eutils
+
+# sourcecode uses this license:
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+QA_PRESTRIPPED="opt/rebol/r3"
+
+S=${WORKDIR}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ mkdir -p "${D}/opt/rebol/"
+ cp "${S}/r3" "${D}/opt/rebol/" || die "Failed to install"
+}
diff --git a/dev-lang/rebol-bin/rebol-bin-3_pre20140304.ebuild b/dev-lang/rebol-bin/rebol-bin-3_pre20140304.ebuild
new file mode 100644
index 000000000000..82c8f60d931b
--- /dev/null
+++ b/dev-lang/rebol-bin/rebol-bin-3_pre20140304.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+DESCRIPTION="Relative Expression-Based Object Language"
+HOMEPAGE="http://rebol.com"
+
+# download links are from
+# http://rebolsource.net/
+# amd64 is of experimental build
+git_commit=25033f8
+SRC_URI="
+ amd64? ( http://rebolsource.net/downloads/experimental/r3-linux-x64-gbf237fc )
+ x86? ( http://rebolsource.net/downloads/linux-x86/r3-g${git_commit} )
+"
+
+# sourcecode uses this license:
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+QA_PREBUILT="opt/rebol/r3"
+
+S=${WORKDIR}
+
+src_unpack() {
+ mkdir -p "${S}"
+ cp "${DISTDIR}/${A}" "${S}"/r3 || die
+}
+
+src_compile() {
+ :
+}
+
+src_install() {
+ exeinto /opt/rebol
+ doexe r3
+}
diff --git a/dev-lang/rebol/Manifest b/dev-lang/rebol/Manifest
new file mode 100644
index 000000000000..08d14b3efd13
--- /dev/null
+++ b/dev-lang/rebol/Manifest
@@ -0,0 +1,4 @@
+EBUILD rebol-9999.ebuild 822 SHA256 a21afc29faac13860ade35f0557f932cac1bd382090259a9bf7bbd6906a41471 SHA512 890c9f050175070afd9154566858397e4958eb37593fc5e2bb18dc95a372a68c20c2987dd49ed8b65b2eb22febcb0dc0b2e9df0282cd4108d0f7aa03138f6377 WHIRLPOOL 1b5f306e1bde852b8e3c8710ddbba31ba62d9685654486497377abf7921753d71f747293b9de77ee5152f849fcfed4c06c06e1d1da6a432f5164d51681dceca8
+MISC ChangeLog 2168 SHA256 f25959ce5fbba85db9ae3f1798492a46110afb35c54a9038f2cea33b908dc5ac SHA512 4cfb2fb2cc8ffb32f6b275bb17d31e8cb218ed9fa3aced1061b9687a9ed0a97169e74bc8da30737e302c1941cd1b0fff6489cb7d6fc5ba5e1a2c947c5272a9f7 WHIRLPOOL 0bd985ae89702b909b91c028f011c97eb1e99d6d441c6f11f812e8e349090408c757e15b60bb47554246442e9dfc7ecf098a04e344df98da9da54ba3e4b78a0a
+MISC ChangeLog-2015 472 SHA256 4cff2557fe212a6bc8396f75bbed7ac34b86a95ea9afd243241d9c0ef18c5c05 SHA512 c9d1149af181268486deba4ec9612ca10aed2313d9651c7b1a6390719a08f13a2c7443faa92b71d7eb883359430a3a81aa31660894bd72295b51700fc12b0725 WHIRLPOOL bb6e57777363b388cdd952d9608a84d7838787b31226863520e4361fbcbf9010810009e43923badee57d69767b9e3a25911fae99386082e71206c4d527944a53
+MISC metadata.xml 247 SHA256 0deec0776f26fb762fdf7711f4589b14f52a2456436ef557eec62a2cf2fb2bb7 SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7 WHIRLPOOL a135fa622e99d3dcdb432bc6b3c366076b3d86b4bfd9a76c852d781b8e9152541c7e7a2c7c6d6a3c4d2200dce792847a08166aaf7c17c22b6299dfe868234dec
diff --git a/dev-lang/rebol/metadata.xml b/dev-lang/rebol/metadata.xml
new file mode 100644
index 000000000000..40aa45df2b01
--- /dev/null
+++ b/dev-lang/rebol/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/dev-lang/rebol/rebol-9999.ebuild b/dev-lang/rebol/rebol-9999.ebuild
new file mode 100644
index 000000000000..61a797190ae6
--- /dev/null
+++ b/dev-lang/rebol/rebol-9999.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+DESCRIPTION="Relative Expression-Based Object Language"
+HOMEPAGE="http://rebol.com"
+
+MY_PR=${PVR/3_pre/}
+EGIT_REPO_URI="https://github.com/rebol/r3.git"
+
+inherit eutils git-2
+
+LICENSE="Apache-2.0"
+SLOT="0"
+#KEYWORDS="~amd64 ~x86"
+# live ebuild
+KEYWORDS=""
+IUSE=""
+
+# usual bootstrap problems
+DEPEND="|| ( dev-lang/rebol dev-lang/rebol-bin )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -e 's/$(STRIP) r3//' make/makefile || die
+}
+
+src_compile() {
+ cd make
+ # silly build system. Prefer prebuilt for now
+ [[ -f /opt/rebol/r3 ]] && cp /opt/rebol/r3 ./r3-make || cp /usr/bin/r3 ./r3-make
+ make prep || die
+ make || die
+}
+
+src_install() {
+ mkdir -p "${D}/usr/bin"
+ cp "${S}/make/r3" "${D}/usr/bin/r3" || die
+}
diff --git a/dev-lang/regina-rexx/Manifest b/dev-lang/regina-rexx/Manifest
new file mode 100644
index 000000000000..28246763bd51
--- /dev/null
+++ b/dev-lang/regina-rexx/Manifest
@@ -0,0 +1,6 @@
+AUX rxstack-r1 268 SHA256 a0b23789d0d579b49dc26ab987c3c8ab122e0c4ab6ef5fa51909cc6c80e83437 SHA512 823cc12df4986919b3177590b9da73c76474012361ff41eb93a04376df2efb3445b27da8931b9fdc5d960f5231a34ddaa7724d35d139eb2a1e340b025dfc460c WHIRLPOOL aec7c8b84dfd6dba7e101eb90b3194fed7c67ed09dff7c54f29a440db40f9743ffd26890e9431e1daa8c30a253981bbfe495159d160bc183209342b9e521670c
+DIST Regina-REXX-3.9.1.tar.gz 1358458 SHA256 5d13df26987e27f25e7779a2efa87a5775213beeda449a9efac59b57a5d5f3ee SHA512 679d146d68598ccca28c4e66a12ab898d5bfb77e2e5d64ce5ffc9159b982dcda419815a83b05e5dfbe3acea84f8f59955726a6466defefe1ac24646c46609677 WHIRLPOOL f46e60eb15b290cf8ad0488eae1a4073155051d8be18a7118020937e81de91b4758b08e48f897be0e19dd382f99755b51d9c81368b7d894d2aa373b152921cdc
+EBUILD regina-rexx-3.9.1-r1.ebuild 884 SHA256 c6bc3b1793bd3a8482cfde736493dc4b2b3a6465209a57c86fe622bcef9affe9 SHA512 417bdd8eaf99ffd150ca25ccc4e4b367e0bf35a675e249ed29f5c9fada2137c95687dc33e396be744154d2d8836abdf35f755469d8508047af25e7d56119a46c WHIRLPOOL bb403da379e460515d076c86e9c5143fbe29c0ae91f5fa099008de8e7468da08c196b2deffd76d256bec087c6bb116b0e7cf4ac11b0731e36791aaae3ec3babd
+MISC ChangeLog 3691 SHA256 42978870c306d3a4f4d38a891afce2a0a0852f58f04180fd0f9e41961aa43f12 SHA512 383d0def9e920bb879c4149f17222462b0b6887f0b5ec17133d6f92e63fe2cd558e765ddd58f61a749bfbf56c0e951d60a9ab83854215b52884525e6cad94cab WHIRLPOOL 326a9348e5d4b3108a3461511b8809dd5fb6c717d68298bcc7719d9b4f2763cfba37f9e5a917de0116195238db93f18ea73e78ca690c3bb2c297b875227f5db1
+MISC ChangeLog-2015 5470 SHA256 9d784e9dd18a52669ad7c06df4b0527c72459ed9d02c12e12d0073d4c12ddae7 SHA512 506eae7b34a004c33d79e81bf280326c8d445a75213bf6b2a574bf4042423d9005cb103597c10d52d5e1d943cf190e5fc1c975dd51be114071cc485d65ec828e WHIRLPOOL 3578639396c5c8636519c07452624c902b4b6562404fd03623834e211f9a99a8a7baa41bd622f3164e725ba83bbf8716510a5e8b4685f3f162cfaad82c74ca14
+MISC metadata.xml 625 SHA256 54e6b00f221bb10a86fd736fada12a7059578c2a14f5187f0a18bb7fa487ef9f SHA512 d9b86c179a75ec8c467bd8f1a49bac2dae98be9cf6f0c5013164fd1713c95fe286f34fd736b5b868711a91980761a80356ffaec1cabf5d61bf5a6027dbdcbe8f WHIRLPOOL 4fe71512e5253467a9411314daf00708f1eebd155f38d6ecf00ca4a0f39218238a86be14ad024e52261595b428db6d3b1e17535051e70ccc9afbad109a76f550
diff --git a/dev-lang/regina-rexx/files/rxstack-r1 b/dev-lang/regina-rexx/files/rxstack-r1
new file mode 100644
index 000000000000..668af5ec0a46
--- /dev/null
+++ b/dev-lang/regina-rexx/files/rxstack-r1
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+
+start() {
+ ebegin "Starting Regina stack"
+ start-stop-daemon --start --pidfile /var/run/rxstack.pid \
+ --exec /usr/bin/rxstack -- -d
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Regina stack"
+ start-stop-daemon --stop --exec /usr/bin/rxstack
+ eend $?
+}
diff --git a/dev-lang/regina-rexx/metadata.xml b/dev-lang/regina-rexx/metadata.xml
new file mode 100644
index 000000000000..66f8c4898e64
--- /dev/null
+++ b/dev-lang/regina-rexx/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-needed -->
+ <longdescription lang="en">
+ Regina is a Rexx interpreter. Rexx is a programming language that was
+ designed to be easy to use for inexperienced programmers yet powerful
+ enough for experienced users. It is also a language ideally suited as a
+ macro language for other applications.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">regina-rexx</remote-id>
+ <bugs-to>https://sourceforge.net/tracker/?group_id=28102</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/regina-rexx/regina-rexx-3.9.1-r1.ebuild b/dev-lang/regina-rexx/regina-rexx-3.9.1-r1.ebuild
new file mode 100644
index 000000000000..a6e6fd89af4f
--- /dev/null
+++ b/dev-lang/regina-rexx/regina-rexx-3.9.1-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="Portable Rexx interpreter"
+HOMEPAGE="http://regina-rexx.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/Regina-REXX-${PV}.tar.gz"
+
+LICENSE="LGPL-2.1 MPL-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+S=${WORKDIR}/Regina-REXX-${PV}
+
+MAKEOPTS+=" -j1"
+
+DOCS=( BUGS HACKERS.txt README.Unix README_SAFE TODO )
+
+src_prepare() {
+ sed -e 's/CFLAGS=/UPSTREAM_CFLAGS=/' -i common/incdebug.m4 || die
+
+ eautoconf
+ tc-export CC #don't move it as tc-getCC
+}
+
+src_compile() {
+ emake LIBEXE="$(tc-getAR)"
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/rxstack-r1 rxstack
+}
+
+pkg_postinst() {
+ elog "You may want to run"
+ elog
+ elog "\trc-update add rxstack default"
+ elog
+ elog "to enable Rexx queues (optional)."
+}
diff --git a/dev-lang/rubinius/Manifest b/dev-lang/rubinius/Manifest
new file mode 100644
index 000000000000..772da2701f5f
--- /dev/null
+++ b/dev-lang/rubinius/Manifest
@@ -0,0 +1,6 @@
+AUX auto_gem.rb 159 SHA256 fe1efe24cd0ba36c55449e9623cd0be394980f37d12468624dad7ffdef72f4dc SHA512 e42e790013d20335ca5319803518102593408d077f22c95dcb08969c69d3a81e49e47cd002715bf760bfcd9a29304002354d8add42fd2415fb10a0a2a323d64c WHIRLPOOL 55931d6c7fa64cd95bb477a9239d058ec6c772e27712d4379372b4d2517dcaa5c15dcde63255065d80ddbd68476abe85ed0507cbfc4fda564c5cee5bd748e82b
+DIST rubinius-3.43.tar.bz2 13013106 SHA256 2c573257518774e464036515cc7283bc934a41566599afe94612c605844481ad SHA512 80ca70f1aeea2f48e9f4bbd9dc646e0fdabf266cde879fd6acb46bcc38140a2738fddf7d63fa72c386f0411046f457af02deb1162b249c7942bdc0e4a8138023 WHIRLPOOL 63f53a69a16772cfaa560cb5c8ed21dafe5b2eae221948be56f34b4a4755f878f3f9ff5ae7d181479770c1e9ca9c9be48a521d5e9465d1dc15c0641aca803d34
+EBUILD rubinius-3.43.ebuild 2284 SHA256 d3662416d4d4f67674b40bfb483c8bac3a9f32e046b20ab5961d1b03aa703f60 SHA512 8a743e44dd2bde7c1f9aa57adee3bfc98deb9900a79246468285c5db93e5c0a91f413b66c3ea3dac55684f9b749c001568c26cd4636cbb386146c4f3ce05bbdd WHIRLPOOL 2fb17c0f7c7652f547b5d8ea069bf9551b33a49d82eef263af6bab13e2e6c212340af81767557e020413e236446aa66a947881b623559bcef5d1ec6af09b0691
+MISC ChangeLog 2914 SHA256 5c15be2a748b00930eabbe472dbbd7d060e2ac7f5db99b10c3edfc54a986c06c SHA512 0e8237d8155191524218e18448c30f5489b04e29a16a4a383aeea24a51cd9f7e5ae1555230a4e6430d7281bb43101bc1c7df06e7e3fe458a262acb5b7d9a7c7a WHIRLPOOL 2ad17569ac8f559f178ba3d2919410e3475f3b634c4c595bb489dc3b4d622f3647abd8b647823456340c32cfc493941fea26e78210885c77f1b2cdcb1fe9a214
+MISC ChangeLog-2015 3104 SHA256 339d971cd8929e867b506d60d35a103514e5f4a966d8460299fe705d42a3e03b SHA512 4de7c68f4c7c920413bc08bf62f76889463e943e9a2fea28dde6272959605c658dff008deffa765bf958c70e4b188d8ba994bcd946fab6a632edb3b04668a556 WHIRLPOOL dfcaafcaefeb947b266ea7e1b3c935451cd21e8f28407109ebb2293c4c3de33e4daab0032abf75f1da7b3cb77a2510d8dc2a64c35ebc2c026be46c41ba9115f5
+MISC metadata.xml 396 SHA256 41833f2acc0273831bff801d52593481c90be41f371e202e9945fbe5ae5b845d SHA512 06c9d83bb3c68390daa769bd5052fd086f39f7f6ce0cfb2e733f18bf88650efecdf9679a237578aed9f419f5a9538d9f67bec9ef8118c4ad42600a3945ad241f WHIRLPOOL 927fc1c26d31126a269a310b77762450287d7dfe8d80c2aca995197f0e97e9cc8c547e16b487a8d3cd10a110baae6efe70aa71bed273f6d18a0cbda04c81fb9e
diff --git a/dev-lang/rubinius/files/auto_gem.rb b/dev-lang/rubinius/files/auto_gem.rb
new file mode 100644
index 000000000000..5c4f540a92df
--- /dev/null
+++ b/dev-lang/rubinius/files/auto_gem.rb
@@ -0,0 +1,7 @@
+# This file is installed by Gentoo's rubygems package.
+# It's intended to help automate the loading of rubygems
+
+begin
+require 'rubygems'
+rescue LoadError
+end
diff --git a/dev-lang/rubinius/metadata.xml b/dev-lang/rubinius/metadata.xml
new file mode 100644
index 000000000000..3d967b6d9f40
--- /dev/null
+++ b/dev-lang/rubinius/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="project">
+ <email>ruby@gentoo.org</email>
+ <name>Gentoo Ruby Project</name>
+ </maintainer>
+ <use>
+ <flag name="llvm">
+ Build with llvm. Currently the package only builds against old versions of llvm.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/rubinius/rubinius-3.43.ebuild b/dev-lang/rubinius/rubinius-3.43.ebuild
new file mode 100644
index 000000000000..216369dfed8e
--- /dev/null
+++ b/dev-lang/rubinius/rubinius-3.43.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils flag-o-matic multilib versionator
+
+DESCRIPTION="A re-implementation of the Ruby VM designed for speed"
+HOMEPAGE="http://rubini.us"
+SRC_URI="https://rubinius-releases-rubinius-com.s3.amazonaws.com/${P}.tar.bz2"
+
+LICENSE="BSD"
+KEYWORDS="~amd64"
+SLOT="0"
+IUSE="+llvm"
+
+RDEPEND="
+ llvm? ( >=sys-devel/llvm-3.6 )
+ dev-libs/openssl:0
+ sys-libs/ncurses
+ sys-libs/readline:0
+ dev-libs/libyaml
+ virtual/libffi
+ sys-libs/zlib
+"
+
+DEPEND="${RDEPEND}
+ =dev-ruby/rake-10*
+ dev-ruby/bundler
+"
+
+pkg_setup() {
+ unset RUBYOPT
+}
+
+src_prepare() {
+ # src_test will wait until all processes are reaped, so tune down
+ # the long sleep process a bit.
+ sed -i -e 's/sleep 1000/sleep 300/' spec/ruby/core/io/popen_spec.rb || die
+
+ # Avoid specs that cannot work in the portage context
+ rm -f spec/ruby/core/argf/read_nonblock_spec.rb || die
+
+ # Drop error CFLAGS per Gentoo policy.
+ sed -i -e '/Werror/ s:^:#:' rakelib/blueprint.rb || die
+
+ bundle --local || die
+}
+
+src_configure() {
+ conf=""
+ if ! use llvm ; then
+ conf+="--disable-llvm "
+ fi
+
+ #Rubinius uses a non-autoconf ./configure script which balks at econf
+ INSTALL="${EPREFIX}/usr/bin/install -c" ./configure \
+ --prefix /usr/$(get_libdir) \
+ --mandir /usr/share/man \
+ --without-rpath \
+ --with-vendor-zlib \
+ ${conf} \
+ || die "Configure failed"
+}
+
+src_compile() {
+ RBXOPT="-Xsystem.log=syslog" rake build || die "Compilation failed"
+}
+
+src_test() {
+ rake spec || die "Tests failed"
+ einfo "Waiting for forked processes to die"
+}
+
+src_install() {
+ # The install phase tries to determine if there are relevant
+ addpredict /usr/local/lib64/ruby
+
+ local minor_version=$(get_version_component_range 1-2)
+ local librbx="usr/$(get_libdir)/rubinius"
+
+ RBXOPT="-Xsystem.log=syslog" DESTDIR="${D}" rake install || die "Installation failed"
+
+ dosym /${librbx}/bin/rbx /usr/bin/rbx || die "Couldn't make rbx symlink"
+
+ insinto /${librbx}/${minor_version}/site
+ doins "${FILESDIR}/auto_gem.rb" || die "Couldn't install rbx auto_gem.rb"
+ RBXOPT="-Xsystem.log=syslog" RBX_RUNTIME="${S}/runtime" RBX_LIB="${S}/lib" bin/rbx compile "${D}/${librbx}/${minor_version}/site/auto_gem.rb" || die "Couldn't bytecompile auto_gem.rb"
+}
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest
new file mode 100644
index 000000000000..58a2eec17003
--- /dev/null
+++ b/dev-lang/ruby/Manifest
@@ -0,0 +1,13 @@
+DIST ruby-2.2.8.tar.xz 10520648 SHA256 37eafc15037396c26870f6a6c5bcd0658d14b46cd5e191a3b56d89dd22d561b0 SHA512 e21004bee537f0c706f4ac9526507b414ddb6a8d721e8fad8d7fe88992a4f048eb5eb79f8d8b8af2a8b331dcfa74b560490218a1acb3532c2cdb4fb4909da3c9 WHIRLPOOL a5b2f7a6c5131376980cf4d2a5f2d7a8a440effed588214c295fb4b83483d84310ba6bfbb96ee904384831eda47f0b1c0263d5190ca41db95df272428144cad1
+DIST ruby-2.3.5.tar.xz 11437868 SHA256 7d3a7dabb190c2da06c963063342ca9a214bcd26f2158e904f0ec059b065ffda SHA512 c55e3b71241f505b6bbad78b3bd40235064faae3443ca14b77b6356556caed6a0d055dc2e2cd7ebdb5290ab908e06d2b7d68f72469af5017eda4b29664b0d889 WHIRLPOOL 2f7d0d7fbf12441e8d312c6c34cb06bf663a975ab3602fa385d44fb42c9b68ddfe8518ad28aead7f164afc9d6c0b825ade16c9205625bb46a738103b744b1f48
+DIST ruby-2.4.2.tar.xz 10046412 SHA256 748a8980d30141bd1a4124e11745bb105b436fb1890826e0d2b9ea31af27f735 SHA512 c1d42272fb0d94b693452e703b0ea4942bf59cbd4b08ba83bf039f54be97ebc88511632413da0164970b4cf97bc302bccb88aab48edfa8fa147498e7ee741595 WHIRLPOOL 4117f18e7901700d2cf603ed60cbe9b59ca65359ec359a7616b2cf90c76c25117afe864a8a7b55e7dc52c93377c541a8b497f1b281cdccade97aafa5ca363a5b
+DIST ruby-patches-2.2.8.tar.bz2 5764 SHA256 5c44fc38cb25d7dbdd8bef0fae49b5fc2f4f42da4e5b4b871655fd5e68faddbe SHA512 296387ec7f2ff82ad55f147d8f9568de544403d286ad24bb60aca916215d7ff6e1d6aca5a31c00a1999504989cda2bbd3260cae96c18ba73f9ffdcfd6b2695bd WHIRLPOOL 28889531d98b1bb96ceaa059f7fc641cc3db16eda0e3ad4cea031127c71897613d73cc3c8926dfd9ec978be79ca1201e7c90056ddcbec58d3e842c8af9a52389
+DIST ruby-patches-2.3.5.tar.bz2 3593 SHA256 0bdc378a9e3ea6ec1579cc99a3c8b983b492e49b9fc1e9432595d66d3a8013ae SHA512 eacb7f6787b36c7d848453b29152190a164ebc6882ab509eeb6584e49af4b66a665c4baff4ecf75e5831ae54d47dbc651d6f048918f3327500c429f1f419ed94 WHIRLPOOL 7f236988663c1082a988b836bf558b5c042c09257cdbad6931474ece7f19be2d37dfe559292182dfc6a9966f6aa3fd2bbbf0f3630bd792f84f61fd135cf7bcbe
+DIST ruby-patches-2.4.2.tar.bz2 3443 SHA256 621e92c4c14cec458100adf74e122df76663be4f75fc4ea86423a9ac6755ea3e SHA512 fb8349c67c72caf10ec12c4b5410194b4df24345446c2e3b6c6176d00727bfe803f4a905ef094a2d52315b6f4c3ce74fb8fbaa2fdf5efe46e6ccb24bf8418b17 WHIRLPOOL 306a16b49037a669398fb9c1b7c2b5484860d8749bf4c12d0e5eec02e3a7f7760b48b4a3cd709e0fa2b54f3d8dddff36d7eeb8d53d2d647d59e099b0299b8ed1
+EBUILD ruby-2.2.8.ebuild 6915 SHA256 94f503d6ffd56752f19f7dadf2024b464bd9efe2d8ed2b4de37921a6ec0c84a2 SHA512 1c5b87f6ab1f5431a2b19a8faa5a0c65aa6c175c8834ffef038537b30976bb5345ea1ffe590dc7c39cb131c10c1642fda0126d8aa0d1e8cced7291085ee2672a WHIRLPOOL ae9f7608d04b263c09163e868cdb1a8b5fac21b33c9bb3b48e8e282754035118b8c9a87de9750efd054c0711a7fb8a1619540e952d4a1c0cd051d3cdf8344d9d
+EBUILD ruby-2.3.5.ebuild 6877 SHA256 606085306f6c2856331405a0f57a2936ed7b7f802628c552e3bbf310623c5991 SHA512 d2f77cccffdf41b8facd9a70d59e7bd61dd7fb25fc43691cde8561b4f1fac78fa7a45ea444c330de1f3fa8ab96a6bf5f741215baf5021b033642b5d53246b9be WHIRLPOOL e23292910b935ae5da21ca462d4051248c5194e96132b124b5f3318a3c60bb26791931bcf2e7c762a7ca22ca644f2243b3a7629f3bfd9d36e83bf305b07b4131
+EBUILD ruby-2.4.2.ebuild 6978 SHA256 9f4d3b867a2baaef2cab06e96ebf294146c168f2d6b7d9e509d3e7319e069905 SHA512 eb98eebcc132410ffe3f13230d11de593f3b9d41887472d9878d17f8983e492031581a23af8d9b6aa200573f2b60cc23b9922525714c7e78ef5dc1a841fc4ae8 WHIRLPOOL efa06520bbd459ea2317a6fe4563d20a3ad9279e4efe0005b8da1e7a13226f5b0ef29b2a916ca1536da4c5dd1272338b1bc862c4ce15bbf937c994fb61196d7f
+MISC ChangeLog 14020 SHA256 f0339e6fd4cb9ef4a7b472031ac3c3ae21f60d574fa5db2e4e48577e73e53b7e SHA512 d7d9bc849624e4814b0b277924715d53479dbf15b087bec68ebca20c447ce9515993509efbc33d5f65c19268072d4f68ba2b7879ab91d1c12bd349445bdf3aa1 WHIRLPOOL 9c64ffb6004a17afcc4ea207698c233079026eef065cc7495de0f10af7a6ae62015b47be6e4a828a7d1d45d917be5b148fb6376a9deb9fe938048a58380fddb7
+MISC ChangeLog-2014 104250 SHA256 6587f8f101dc832a9f0c01b77a9d448b6a7b1c3c7befd1368e297bbe3dc41f1c SHA512 89ffec2164a619bbb418ecf43ecb0893a3f6a4846ff1ac403980e68d85efa7d502fa2f7338c80f8fcf12b56a1ed791c7d6d1bfc607f80fa88c1a88c3c6f93a85 WHIRLPOOL 47ced91b8df722e42d33773a243f89e57ca49f8942418d19321a1ed041fd9dabad747ff640fbb1f0de73220c23cd37778eedc44a14b8883b8220ee512089a823
+MISC ChangeLog-2015 5007 SHA256 daa966ac5d4e337b5ba0b9742196ad1e754936c4babb08c63443005cff904077 SHA512 2cc4ebfe1d1c0837d843d03ed7846b002bb89121c5849e1ceff9350b49a85933d397c45e356a567dcb3a7c36d1bd97002ab7d0f4a531bb9f8d0422b941ddc590 WHIRLPOOL 1324dfcd1444b05fd102f64e16678b7300ed8549e4e10a213c7cfab0692e7846ac4772624f6b5c787589908f1d5c884b443542a02f392c29d8532c84842e20f3
+MISC metadata.xml 977 SHA256 fc9d7cc6e682821e89141cdfcb007bc889c6cc522f662631e28dc280935a6624 SHA512 274ff4d66139d0e4fb91f339b834e77938e51508e712a5005fbb67e6b16fa04879cbb30ad6ee61cd60b16f01b6e311deee461dbb15ffcd1d9b45119484295750 WHIRLPOOL 44dbd829673c75af5459d1e440aa53be46e8ebc95d91faf0af31b9ad8608dac920d9dc13c11ca24af1646a31d0c5fa6800669fa7ba34c709814dffde226b4418
diff --git a/dev-lang/ruby/metadata.xml b/dev-lang/ruby/metadata.xml
new file mode 100644
index 000000000000..249178be816f
--- /dev/null
+++ b/dev-lang/ruby/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>ruby@gentoo.org</email>
+ <name>Gentoo Ruby Project</name>
+ </maintainer>
+ <use>
+ <flag name="rubytests">
+ Install ruby tests that can only be run after ruby is installed
+ </flag>
+ <flag name="readline">
+ Use the <pkg>sys-libs/readline</pkg> library to provide the
+ readline extension, used for instance by the irb tool. This flag
+ is meaningful only if the libedit USE flag is disabled.
+
+ If neither libedit nor readline USE flags are enabled, the
+ readline extension will not be built (and irb will lose line
+ editing functionality).
+ </flag>
+ <flag name="rdoc">
+ Install <pkg>dev-ruby/rdoc</pkg> after installing Ruby.
+ </flag>
+ <flag name="jemalloc">
+ Use <pkg>dev-libs/jemalloc</pkg> for memory allocation.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/ruby/ruby-2.2.8.ebuild b/dev-lang/ruby/ruby-2.2.8.ebuild
new file mode 100644
index 000000000000..638d3aefb1ce
--- /dev/null
+++ b/dev-lang/ruby/ruby-2.2.8.ebuild
@@ -0,0 +1,245 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+#PATCHSET=1
+
+inherit autotools eutils flag-o-matic multilib versionator
+
+MY_P="${PN}-$(get_version_component_range 1-3)"
+S=${WORKDIR}/${MY_P}
+
+SLOT=$(get_version_component_range 1-2)
+MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
+RUBYVERSION=2.2.0
+
+if [[ -n ${PATCHSET} ]]; then
+ if [[ ${PVR} == ${PV} ]]; then
+ PATCHSET="${PV}-r0.${PATCHSET}"
+ else
+ PATCHSET="${PVR}.${PATCHSET}"
+ fi
+else
+ PATCHSET="${PVR}"
+fi
+
+DESCRIPTION="An object-oriented scripting language"
+HOMEPAGE="http://www.ruby-lang.org/"
+SRC_URI="mirror://ruby/2.2/${MY_P}.tar.xz
+ https://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
+
+LICENSE="|| ( Ruby-BSD BSD-2 )"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl tk xemacs ncurses +readline"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( sys-libs/gdbm )
+ jemalloc? ( dev-libs/jemalloc )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl )
+ )
+ socks5? ( >=net-proxy/dante-1.1.13 )
+ tk? (
+ dev-lang/tcl:0=[threads]
+ dev-lang/tk:0=[threads]
+ )
+ ncurses? ( sys-libs/ncurses:0= )
+ readline? ( sys-libs/readline:0= )
+ dev-libs/libyaml
+ virtual/libffi
+ sys-libs/zlib
+ >=app-eselect/eselect-ruby-20141227
+ !<dev-ruby/rdoc-3.9.4
+ !<dev-ruby/rubygems-1.8.10-r1"
+
+DEPEND="${RDEPEND}"
+
+BUNDLED_GEMS="
+ >=dev-ruby/minitest-5.4.3[ruby_targets_ruby22]
+ >=dev-ruby/power_assert-0.2.2[ruby_targets_ruby22]
+ >=dev-ruby/test-unit-3.0.8[ruby_targets_ruby22]
+"
+
+PDEPEND="
+ ${BUNDLED_GEMS}
+ virtual/rubygems[ruby_targets_ruby22]
+ >=dev-ruby/json-1.8.1[ruby_targets_ruby22]
+ >=dev-ruby/rake-0.9.6[ruby_targets_ruby22]
+ rdoc? ( >=dev-ruby/rdoc-4.0.1[ruby_targets_ruby22] )
+ xemacs? ( app-xemacs/ruby-modes )"
+
+src_prepare() {
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}/patches"
+
+ # We can no longer unbundle all of rake because rubygems now depends
+ # on this. We leave the actual rake code around to bootstrap
+ # rubygems, but remove the bits that would cause a file collision.
+ einfo "Unbundling gems..."
+ cd "$S"
+ rm -rf \
+ {bin,lib}/rake lib/rake.rb man/rake.1 \
+ bin/gem || die "removal failed"
+ # Remove bundled gems that we will install via PDEPEND, bug
+ # 539700. Use explicit version numbers to ensure rm fails when they
+ # change so we can update dependencies accordingly.
+ rm gems/{minitest-5.4.3,power_assert-0.2.2,test-unit-3.0.8}.gem || die
+
+ # Fix a hardcoded lib path in configure script
+ sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
+ configure.in || die "sed failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ local modules= myconf=
+
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413.
+ filter-flags -fomit-frame-pointer
+ # In many places aliasing rules are broken; play it safe
+ # as it's risky with newer compilers to leave it as it is.
+ append-flags -fno-strict-aliasing
+ # SuperH needs this
+ use sh && append-flags -mieee
+
+ # Socks support via dante
+ if use socks5 ; then
+ # Socks support can't be disabled as long as SOCKS_SERVER is
+ # set and socks library is present, so need to unset
+ # SOCKS_SERVER in that case.
+ unset SOCKS_SERVER
+ fi
+
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000)
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
+ fi
+
+ # ipv6 hack, bug 168939. Needs --enable-ipv6.
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
+
+ # Determine which modules *not* to build depending in the USE flags.
+ if ! use readline ; then
+ modules="${modules},readline"
+ fi
+ if ! use berkdb ; then
+ modules="${modules},dbm"
+ fi
+ if ! use gdbm ; then
+ modules="${modules},gdbm"
+ fi
+ if ! use ssl ; then
+ modules="${modules},openssl"
+ fi
+ if ! use ncurses ; then
+ modules="${modules},curses"
+ fi
+ if ! use tk ; then
+ modules="${modules},tk"
+ fi
+
+ # Provide an empty LIBPATHENV because we disable rpath but we do not
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
+ # #564272
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
+ --program-suffix=${MY_SUFFIX} \
+ --with-soname=ruby${MY_SUFFIX} \
+ --docdir=${EPREFIX}/usr/share/doc/${P} \
+ --enable-shared \
+ --enable-pthread \
+ --disable-rpath \
+ --with-out-ext="${modules}" \
+ $(use_with jemalloc jemalloc) \
+ $(use_enable socks5 socks) \
+ $(use_enable doc install-doc) \
+ --enable-ipv6 \
+ $(use_enable debug) \
+ ${myconf} \
+ --enable-option-checking=no \
+ || die "econf failed"
+}
+
+src_compile() {
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_test() {
+ emake -j1 V=1 test || die "make test failed"
+
+ elog "Ruby's make test has been run. Ruby also ships with a make check"
+ elog "that cannot be run until after ruby has been installed."
+ elog
+ if use rubytests; then
+ elog "You have enabled rubytests, so they will be installed to"
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
+ elog "than root, and you must place them into a writeable directory."
+ elog "Then call: "
+ elog
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
+ else
+ elog "Enable the rubytests USE flag to install the make check tests"
+ fi
+}
+
+src_install() {
+ # Remove the remaining bundled gems. We do this late in the process
+ # since they are used during the build to e.g. create the
+ # documentation.
+ rm -rf ext/json || die
+
+ # Ruby is involved in the install process, we don't want interference here.
+ unset RUBYOPT
+
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
+
+ LD_LIBRARY_PATH="${S}:${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+ RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
+ for d in $(find "${S}/ext" -type d) ; do
+ RUBYLIB="${RUBYLIB}:$d"
+ done
+ export LD_LIBRARY_PATH RUBYLIB
+
+ emake V=1 DESTDIR="${D}" install || die "make install failed"
+
+ # Remove installed rubygems copy
+ rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
+ rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
+ rm -rf "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
+
+ if use doc; then
+ make DESTDIR="${D}" install-doc || die "make install-doc failed"
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r sample
+ fi
+
+ dodoc ChangeLog NEWS doc/NEWS* README* || die
+
+ if use rubytests; then
+ pushd test
+ insinto /usr/share/${PN}-${SLOT}/test
+ doins -r .
+ popd
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
+ eselect ruby set ruby${MY_SUFFIX}
+ fi
+
+ elog
+ elog "To switch between available Ruby profiles, execute as root:"
+ elog "\teselect ruby set ruby(19|20|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
diff --git a/dev-lang/ruby/ruby-2.3.5.ebuild b/dev-lang/ruby/ruby-2.3.5.ebuild
new file mode 100644
index 000000000000..26c5cd73704e
--- /dev/null
+++ b/dev-lang/ruby/ruby-2.3.5.ebuild
@@ -0,0 +1,242 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+#PATCHSET=1
+
+inherit autotools eutils flag-o-matic multilib versionator
+
+MY_P="${PN}-$(get_version_component_range 1-3)"
+S=${WORKDIR}/${MY_P}
+
+SLOT=$(get_version_component_range 1-2)
+MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
+RUBYVERSION=2.3.0
+
+if [[ -n ${PATCHSET} ]]; then
+ if [[ ${PVR} == ${PV} ]]; then
+ PATCHSET="${PV}-r0.${PATCHSET}"
+ else
+ PATCHSET="${PVR}.${PATCHSET}"
+ fi
+else
+ PATCHSET="${PVR}"
+fi
+
+DESCRIPTION="An object-oriented scripting language"
+HOMEPAGE="https://www.ruby-lang.org/"
+SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~flameeyes/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
+
+LICENSE="|| ( Ruby-BSD BSD-2 )"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl tk xemacs ncurses +readline"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( sys-libs/gdbm )
+ jemalloc? ( dev-libs/jemalloc )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl )
+ )
+ socks5? ( >=net-proxy/dante-1.1.13 )
+ tk? (
+ dev-lang/tcl:0=[threads]
+ dev-lang/tk:0=[threads]
+ )
+ ncurses? ( sys-libs/ncurses:0= )
+ readline? ( sys-libs/readline:0= )
+ dev-libs/libyaml
+ virtual/libffi
+ sys-libs/zlib
+ >=app-eselect/eselect-ruby-20151229
+ !<dev-ruby/rdoc-3.9.4
+ !<dev-ruby/rubygems-1.8.10-r1"
+
+DEPEND="${RDEPEND}"
+
+BUNDLED_GEMS="
+ >=dev-ruby/did_you_mean-1.0.0:1[ruby_targets_ruby23]
+ >=dev-ruby/minitest-5.8.3[ruby_targets_ruby23]
+ >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby23]
+ >=dev-ruby/power_assert-0.2.6[ruby_targets_ruby23]
+ >=dev-ruby/rake-10.4.2[ruby_targets_ruby23]
+ >=dev-ruby/test-unit-3.1.5[ruby_targets_ruby23]
+"
+
+PDEPEND="
+ ${BUNDLED_GEMS}
+ virtual/rubygems[ruby_targets_ruby23]
+ >=dev-ruby/json-1.8.3[ruby_targets_ruby23]
+ rdoc? ( >=dev-ruby/rdoc-4.2.1[ruby_targets_ruby23] )
+ xemacs? ( app-xemacs/ruby-modes )"
+
+src_prepare() {
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}/patches"
+
+ einfo "Unbundling gems..."
+ cd "$S"
+ # Remove bundled gems that we will install via PDEPEND, bug
+ # 539700. Use explicit version numbers to ensure rm fails when they
+ # change so we can update dependencies accordingly.
+ rm -f gems/{did_you_mean-1.0.0,minitest-5.8.3,net-telnet-0.1.1,power_assert-0.2.6,rake-10.4.2,test-unit-3.1.5}.gem || die
+
+ # Fix a hardcoded lib path in configure script
+ sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
+ configure.in || die "sed failed"
+
+ eautoreconf
+}
+
+src_configure() {
+ local modules= myconf=
+
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413.
+ filter-flags -fomit-frame-pointer
+ # In many places aliasing rules are broken; play it safe
+ # as it's risky with newer compilers to leave it as it is.
+ append-flags -fno-strict-aliasing
+ # SuperH needs this
+ use sh && append-flags -mieee
+
+ # Socks support via dante
+ if use socks5 ; then
+ # Socks support can't be disabled as long as SOCKS_SERVER is
+ # set and socks library is present, so need to unset
+ # SOCKS_SERVER in that case.
+ unset SOCKS_SERVER
+ fi
+
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000)
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
+ fi
+
+ # ipv6 hack, bug 168939. Needs --enable-ipv6.
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
+
+ # Determine which modules *not* to build depending in the USE flags.
+ if ! use readline ; then
+ modules="${modules},readline"
+ fi
+ if ! use berkdb ; then
+ modules="${modules},dbm"
+ fi
+ if ! use gdbm ; then
+ modules="${modules},gdbm"
+ fi
+ if ! use ssl ; then
+ modules="${modules},openssl"
+ fi
+ if ! use ncurses ; then
+ modules="${modules},curses"
+ fi
+ if ! use tk ; then
+ modules="${modules},tk"
+ fi
+
+ # Provide an empty LIBPATHENV because we disable rpath but we do not
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
+ # #564272
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
+ --program-suffix=${MY_SUFFIX} \
+ --with-soname=ruby${MY_SUFFIX} \
+ --docdir=${EPREFIX}/usr/share/doc/${P} \
+ --enable-shared \
+ --enable-pthread \
+ --disable-rpath \
+ --with-out-ext="${modules}" \
+ $(use_with jemalloc jemalloc) \
+ $(use_enable socks5 socks) \
+ $(use_enable doc install-doc) \
+ --enable-ipv6 \
+ $(use_enable debug) \
+ ${myconf} \
+ --enable-option-checking=no \
+ || die "econf failed"
+}
+
+src_compile() {
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_test() {
+ emake -j1 V=1 test || die "make test failed"
+
+ elog "Ruby's make test has been run. Ruby also ships with a make check"
+ elog "that cannot be run until after ruby has been installed."
+ elog
+ if use rubytests; then
+ elog "You have enabled rubytests, so they will be installed to"
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
+ elog "than root, and you must place them into a writeable directory."
+ elog "Then call: "
+ elog
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
+ else
+ elog "Enable the rubytests USE flag to install the make check tests"
+ fi
+}
+
+src_install() {
+ # Remove the remaining bundled gems. We do this late in the process
+ # since they are used during the build to e.g. create the
+ # documentation.
+ rm -rf ext/json || die
+
+ # Ruby is involved in the install process, we don't want interference here.
+ unset RUBYOPT
+
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
+
+ LD_LIBRARY_PATH="${S}:${D}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+ RUBYLIB="${S}:${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
+ for d in $(find "${S}/ext" -type d) ; do
+ RUBYLIB="${RUBYLIB}:$d"
+ done
+ export LD_LIBRARY_PATH RUBYLIB
+
+ emake V=1 DESTDIR="${D}" install || die "make install failed"
+
+ # Remove installed rubygems and rdoc copy
+ rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
+ rm -rf "${D}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
+ rm -rf "${D}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
+ rm -rf "${D}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
+
+ if use doc; then
+ make DESTDIR="${D}" install-doc || die "make install-doc failed"
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r sample
+ fi
+
+ dodoc ChangeLog NEWS doc/NEWS* README* || die
+
+ if use rubytests; then
+ pushd test
+ insinto /usr/share/${PN}-${SLOT}/test
+ doins -r .
+ popd
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${ROOT}"usr/bin/ruby) ]] ; then
+ eselect ruby set ruby${MY_SUFFIX}
+ fi
+
+ elog
+ elog "To switch between available Ruby profiles, execute as root:"
+ elog "\teselect ruby set ruby(19|20|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
diff --git a/dev-lang/ruby/ruby-2.4.2.ebuild b/dev-lang/ruby/ruby-2.4.2.ebuild
new file mode 100644
index 000000000000..40680044bd28
--- /dev/null
+++ b/dev-lang/ruby/ruby-2.4.2.ebuild
@@ -0,0 +1,243 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+#PATCHSET=1
+
+inherit autotools eutils flag-o-matic multilib versionator
+
+MY_P="${PN}-$(get_version_component_range 1-3)"
+S=${WORKDIR}/${MY_P}
+
+SLOT=$(get_version_component_range 1-2)
+MY_SUFFIX=$(delete_version_separator 1 ${SLOT})
+RUBYVERSION=${SLOT}.0
+
+if [[ -n ${PATCHSET} ]]; then
+ if [[ ${PVR} == ${PV} ]]; then
+ PATCHSET="${PV}-r0.${PATCHSET}"
+ else
+ PATCHSET="${PVR}.${PATCHSET}"
+ fi
+else
+ PATCHSET="${PVR}"
+fi
+
+DESCRIPTION="An object-oriented scripting language"
+HOMEPAGE="http://www.ruby-lang.org/"
+SRC_URI="mirror://ruby/${SLOT}/${MY_P}.tar.xz
+ https://dev.gentoo.org/~graaff/ruby-team/${PN}-patches-${PATCHSET}.tar.bz2"
+
+LICENSE="|| ( Ruby-BSD BSD-2 )"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl static-libs tk xemacs"
+
+RDEPEND="
+ berkdb? ( sys-libs/db:= )
+ gdbm? ( sys-libs/gdbm )
+ jemalloc? ( dev-libs/jemalloc )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl )
+ )
+ socks5? ( >=net-proxy/dante-1.1.13 )
+ tk? (
+ dev-lang/tcl:0=[threads]
+ dev-lang/tk:0=[threads]
+ )
+ dev-libs/libyaml
+ virtual/libffi
+ sys-libs/zlib
+ >=app-eselect/eselect-ruby-20161226
+ !<dev-ruby/rdoc-3.9.4
+ !<dev-ruby/rubygems-1.8.10-r1"
+
+DEPEND="${RDEPEND}"
+
+BUNDLED_GEMS="
+ >=dev-ruby/did_you_mean-1.1.0:2.4[ruby_targets_ruby24]
+ >=dev-ruby/minitest-5.10.1[ruby_targets_ruby24]
+ >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby24]
+ >=dev-ruby/power_assert-0.4.1[ruby_targets_ruby24]
+ >=dev-ruby/rake-12.0.0[ruby_targets_ruby24]
+ >=dev-ruby/test-unit-3.2.3[ruby_targets_ruby24]
+ >=dev-ruby/xmlrpc-0.2.1[ruby_targets_ruby24]
+"
+
+PDEPEND="
+ ${BUNDLED_GEMS}
+ virtual/rubygems[ruby_targets_ruby24]
+ >=dev-ruby/json-2.0.2[ruby_targets_ruby24]
+ rdoc? ( >=dev-ruby/rdoc-5.1.0[ruby_targets_ruby24] )
+ xemacs? ( app-xemacs/ruby-modes )"
+
+src_prepare() {
+ EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" \
+ epatch "${WORKDIR}/patches"
+
+ einfo "Unbundling gems..."
+ cd "$S"
+ # Remove bundled gems that we will install via PDEPEND, bug
+ # 539700. Use explicit version numbers to ensure rm fails when they
+ # change so we can update dependencies accordingly.
+ rm -f gems/{did_you_mean-1.1.0,minitest-5.10.1,net-telnet-0.1.1,power_assert-0.4.1,rake-12.0.0,test-unit-3.2.3,xmlrpc-0.2.1}.gem || die
+
+ einfo "Removing bundled libraries..."
+ rm -fr ext/fiddle/libffi-3.2.1 || die
+
+ # Fix a hardcoded lib path in configure script
+ sed -i -e "s:\(RUBY_LIB_PREFIX=\"\${prefix}/\)lib:\1$(get_libdir):" \
+ configure.in || die "sed failed"
+
+ eapply_user
+
+ eautoreconf
+}
+
+src_configure() {
+ local modules= myconf=
+
+ # -fomit-frame-pointer makes ruby segfault, see bug #150413.
+ filter-flags -fomit-frame-pointer
+ # In many places aliasing rules are broken; play it safe
+ # as it's risky with newer compilers to leave it as it is.
+ append-flags -fno-strict-aliasing
+ # SuperH needs this
+ use sh && append-flags -mieee
+
+ # Socks support via dante
+ if use socks5 ; then
+ # Socks support can't be disabled as long as SOCKS_SERVER is
+ # set and socks library is present, so need to unset
+ # SOCKS_SERVER in that case.
+ unset SOCKS_SERVER
+ fi
+
+ # Increase GC_MALLOC_LIMIT if set (default is 8000000)
+ if [ -n "${RUBY_GC_MALLOC_LIMIT}" ] ; then
+ append-flags "-DGC_MALLOC_LIMIT=${RUBY_GC_MALLOC_LIMIT}"
+ fi
+
+ # ipv6 hack, bug 168939. Needs --enable-ipv6.
+ use ipv6 || myconf="${myconf} --with-lookup-order-hack=INET"
+
+ # Determine which modules *not* to build depending in the USE flags.
+ if ! use berkdb ; then
+ modules="${modules},dbm"
+ fi
+ if ! use gdbm ; then
+ modules="${modules},gdbm"
+ fi
+ if ! use ssl ; then
+ modules="${modules},openssl"
+ fi
+ if ! use tk ; then
+ modules="${modules},tk"
+ fi
+
+ # Provide an empty LIBPATHENV because we disable rpath but we do not
+ # need LD_LIBRARY_PATH by default since that breaks USE=multitarget
+ # #564272
+ INSTALL="${EPREFIX}/usr/bin/install -c" LIBPATHENV="" econf \
+ --program-suffix=${MY_SUFFIX} \
+ --with-soname=ruby${MY_SUFFIX} \
+ --docdir=${EPREFIX}/usr/share/doc/${P} \
+ --enable-shared \
+ --enable-pthread \
+ --disable-rpath \
+ --with-out-ext="${modules}" \
+ $(use_with jemalloc jemalloc) \
+ $(use_enable socks5 socks) \
+ $(use_enable doc install-doc) \
+ --enable-ipv6 \
+ $(use_enable static-libs static) \
+ $(use_enable static-libs install-static-library) \
+ $(use_with static-libs static-linked-ext) \
+ $(use_enable debug) \
+ ${myconf} \
+ --enable-option-checking=no \
+ || die "econf failed"
+}
+
+src_compile() {
+ emake V=1 EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
+}
+
+src_test() {
+ emake -j1 V=1 test || die "make test failed"
+
+ elog "Ruby's make test has been run. Ruby also ships with a make check"
+ elog "that cannot be run until after ruby has been installed."
+ elog
+ if use rubytests; then
+ elog "You have enabled rubytests, so they will be installed to"
+ elog "/usr/share/${PN}-${SLOT}/test. To run them you must be a user other"
+ elog "than root, and you must place them into a writeable directory."
+ elog "Then call: "
+ elog
+ elog "ruby${MY_SUFFIX} -C /location/of/tests runner.rb"
+ else
+ elog "Enable the rubytests USE flag to install the make check tests"
+ fi
+}
+
+src_install() {
+ # Remove the remaining bundled gems. We do this late in the process
+ # since they are used during the build to e.g. create the
+ # documentation.
+ rm -rf ext/json || die
+
+ # Ruby is involved in the install process, we don't want interference here.
+ unset RUBYOPT
+
+ local MINIRUBY=$(echo -e 'include Makefile\ngetminiruby:\n\t@echo $(MINIRUBY)'|make -f - getminiruby)
+
+ LD_LIBRARY_PATH="${S}:${ED}/usr/$(get_libdir)${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
+ RUBYLIB="${S}:${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"
+ for d in $(find "${S}/ext" -type d) ; do
+ RUBYLIB="${RUBYLIB}:$d"
+ done
+ export LD_LIBRARY_PATH RUBYLIB
+
+ emake V=1 DESTDIR="${D}" install || die "make install failed"
+
+ # Remove installed rubygems and rdoc copy
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}/rubygems" || die "rm rubygems failed"
+ rm -rf "${ED}/usr/bin/"gem"${MY_SUFFIX}" || die "rm rdoc bins failed"
+ rm -rf "${ED}/usr/$(get_libdir)/ruby/${RUBYVERSION}"/rdoc* || die "rm rdoc failed"
+ rm -rf "${ED}/usr/bin/"{ri,rdoc}"${MY_SUFFIX}" || die "rm rdoc bins failed"
+
+ if use doc; then
+ make DESTDIR="${D}" install-doc || die "make install-doc failed"
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r sample
+ fi
+
+ dodoc ChangeLog NEWS doc/NEWS* README* || die
+
+ if use rubytests; then
+ pushd test
+ insinto /usr/share/${PN}-${SLOT}/test
+ doins -r .
+ popd
+ fi
+}
+
+pkg_postinst() {
+ if [[ ! -n $(readlink "${EROOT}"usr/bin/ruby) ]] ; then
+ eselect ruby set ruby${MY_SUFFIX}
+ fi
+
+ elog
+ elog "To switch between available Ruby profiles, execute as root:"
+ elog "\teselect ruby set ruby(19|20|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
new file mode 100644
index 000000000000..3376e71001ea
--- /dev/null
+++ b/dev-lang/rust-bin/Manifest
@@ -0,0 +1,24 @@
+DIST rust-1.12.1-i686-unknown-linux-gnu.tar.gz 123818795 SHA256 ede9b9d14d1ddbc29975d1ead73fcf2758719b4b371363afe1c32eb8d6e96bb3 SHA512 8393bd91652ebe2a3a6decdd53bcb388d308a8867736ea68f75c2d073a0356583d90f74ce0af6105bd867ab03feed02af17422f25cf3bbf0601d59062aa1c70a WHIRLPOOL 20fab3b60d94e5e75c086ed86bde745c1a915347f4c0af16d3289c57d6cb4396656e1fd93a52d61ea2425c0e37d7c89c5d7a62ea424cd54f5ef2b4eaf5443e97
+DIST rust-1.12.1-x86_64-unknown-linux-gnu.tar.gz 120844880 SHA256 9e546aec13e389429ba2d86c8f4e67eba5af146c979e4faa16ffb40ddaf9984c SHA512 888ad195b9d4b8d1d7ccaffd460e6fe0f6003461a6818937b4b6f80a92462eb96095888729188421f21e6bd0e21fa558a7ea81327b78eab5c3b70807c5069492 WHIRLPOOL 309c0dfbf25a20bf8a48609d83212e29d409b21f51fcc228b2f83242df1486cd65a9fb884e5b3737fbc90db0a59e6b155528b445412466a84988a77b3999bcdc
+DIST rust-1.13.0-i686-unknown-linux-gnu.tar.gz 94614521 SHA256 239734113f6750d31085c7a08c260d492991cc1ef10817b6d44154515f3f9439 SHA512 acea228b6c17cddfc6b1db1ab7d9e71ef852e7137bd992eaef69fa051f9d6f1b449d91b3f0984c3c64de274f246b5c37f9dc9cd5457d797be01beb3357d3c557 WHIRLPOOL 893c733313da95041d40d689a9f871ead8462b77c6062623c24e97f8ddd97ff8a7f58ed2c7595631752469018e850cd0db52949ad25365fb460489613e554a29
+DIST rust-1.13.0-x86_64-unknown-linux-gnu.tar.gz 91007029 SHA256 95f4c372b1b81ac1038161e87e932dd7ab875d25c167a861c3949b0f6a65516d SHA512 b5d217aef6e20ed159506d2b46df2003de09c212794725693bc09fa4bcd7e527fed23969e62121591601749ec161de4d90b2c261807f83e2c0114727659b4f6e WHIRLPOOL 60d9cc1c365e44b554211b47fe89dd076d04a96f876574d2eecff9416aa43f3233470acb1607406d7298d40769900a6b9cda93645e2b1eeeca9fe8067442b607
+DIST rust-1.14.0-i686-unknown-linux-gnu.tar.gz 126452488 SHA256 8d5c75728b44468216f99651dfae9d60ae0696a77105dd2b02942d75f3256840 SHA512 2e1cd7cb1c9a1c147fcfe16f5eac3876b88a5a04bc1a6d2386756181986046b8636c317fb76834ca75aec99f0bcf9e5ce760eacf74b4b9811210db4a59fdb66f WHIRLPOOL 9f2a6a0462b9494566c5be7475ca15280b35229756789e3dda01ba7eefe5ae3eab6c804fd7183641890efa16aa22ff0e9153ef6c8b8379f76d0c44b98027a483
+DIST rust-1.14.0-x86_64-unknown-linux-gnu.tar.gz 122820395 SHA256 c71325cfea1b6f0bdc5189fa4c50ff96f828096ff3f7b5056367f9685d6a4d04 SHA512 6ec7155a2ac95718d1c28ffada0d365ca46cca7b1879b4533a662a4e63140fd2a70a9647a4b4d57e12d0d20dd46b7aba18365db0ed0cfd870b0a0394d4266b8c WHIRLPOOL f6c1c67806974cd39e68e2c111803a9ba7e858a93bfb8c8939747d253f119ae6667a21e3cba385015f27f9395fb2982d2a0c26f423b5d784fdc395e680da803b
+DIST rust-1.15.0-i686-unknown-linux-gnu.tar.gz 103875063 SHA256 3cff0c621a9c58dfaf29d2d08655030ea90cfbd009e71a04e073d67e5177b372 SHA512 92886d873a1d5407839cf3ff6480fb6c68ab3ee16c8e30a5bc221551a9e588405bec6f1382841ce81d8895c6e9a77650f5da56ccc2c8dc0490019210083786e7 WHIRLPOOL 20ab15e7284aee26262c0a583e1f0224f007bfba749253007d8bda6f276a43353c9c9f2d3690ca7f4d110fa2f565341e217090f670b38c06cd5a56c3581a0904
+DIST rust-1.15.0-x86_64-unknown-linux-gnu.tar.gz 101145605 SHA256 576fcced49744af5ea438afc4411395530426b0a3d4839c5205f646f15850663 SHA512 0f582e540241ca9cc9e36face8c28061d1e2814acba7480ab818b15fc0db98519d28aa9649c6cbb5ccea95c28c2e0927268b76cbfe7178b136e56cbcc6b25aaf WHIRLPOOL e031a9556df365780baa5ed7bd51ebb22b0166be38bd17aa2d23c09f97095cf3d1aae647fbd90940ec959e09ba8bd696fb95c4aecc41cdf43a5dae8ca45c22c5
+DIST rust-1.15.1-i686-unknown-linux-gnu.tar.gz 103889253 SHA256 a93436b969d19a6576aac5264ff5b58cbbdf3514f15c34146a274c2586f7e052 SHA512 13d602842e7a2ef360c80d3ec84ecd5d6c742ea6dad642394a2a57b28554a7758905b37daaf2bcc549428c5f9383307270f8508e8685748b906fc2b9230bc4ad WHIRLPOOL 3b1487e049eb6d12ad269894f0547461d0e20e018c3e8903203cc9cabf178617058d643870f0f6bfa1f01947602d3fdafbd39c3d410b2dd53aaf1624730fbe0d
+DIST rust-1.15.1-x86_64-unknown-linux-gnu.tar.gz 101140146 SHA256 b1e7c818a3cc8b010932f0efc1cf0ede7471958310f808d543b6e32d2ec748e7 SHA512 e089c455b1a7507aeed4652f05c0672c4e996e708c46f4405191f4b3a9d08403cab27f1a5a63f865d9a8f099f6ca980d2d2eef37aaa5e7e5bd751a3224e88b84 WHIRLPOOL 8983a5135bb34a6f54c8f015e8a02c2d9bd9c126589659b68fa57a8de928524af5a427b950f944d68ea80264e8acb54810c548b18910036ede080c1c8371a081
+DIST rust-1.16.0-i686-unknown-linux-gnu.tar.gz 106129219 SHA256 b5859161ebb182d3b75fa14a5741e5de87b088146fb0ef4a30f3b2439c6179c5 SHA512 7a780a107d98c6a8883f95dbb5a5ec95bad52fb1e735afba29b47411b450d464cbc8dfe73d35de1eb18b9a1f9ea727daa1ca9d3042e2a98c67ad570d328e139d WHIRLPOOL e7cbcfdb984a76ce8c7885cde6380582f75205ec498db904ccbaf7fac891caf7d1ef377c67e40265cdd998ad420d6cc55cf2a989abb167da0285d24319a36bd6
+DIST rust-1.16.0-x86_64-unknown-linux-gnu.tar.gz 103142459 SHA256 48621912c242753ba37cad5145df375eeba41c81079df46f93ffb4896542e8fd SHA512 f3d381c0e47e0af02eb116376422c3e48295c2854c6ad8c03d4c13e662f3cc1fdddf25923f7b3ef358c5cf670ed67d75e2197162434a81d5f9499e6e0e2d1054 WHIRLPOOL db9547a3b92471d5f46b431fc6c66d12cb2bcda22d548993904a03485f729b4a0f91813dbf2a5b3f46c9aeb0ca39332db1f95454cabb9f0684e4142fe3bfdcf3
+DIST rust-1.19.0-i686-unknown-linux-gnu.tar.gz 143010900 SHA256 657b78f3c1a1b4412e12f7278e20cc318022fa276a58f0d38a0d15b515e39713 SHA512 a41bc6b576e04e4ced66c69524eedca6528b8a559c4877408be590d48ce4c77f6157f9adbc9e87e209f3e2d21ae105305195dbbfbf519f8df88a1615b49b3b0e WHIRLPOOL 1e6bbae9eb6d0ea7418acb64b7fa49fb1abfc15cf320e4ff27f538bfe721883d5e7acde63854998851870bb6491b5b1babd99e83de8ebee67864b852d54043c1
+DIST rust-1.19.0-x86_64-unknown-linux-gnu.tar.gz 151087058 SHA256 30ff67884464d32f6bbbde4387e7557db98868e87fb2afbb77c9b7716e3bff09 SHA512 fc98ad7728a72c9bc93505458f7558405cc6a608eb19aa6c609e0155e7c081123f116cf023d19af2f0cd9cb81b8e1bbe69efd88f7bb61cca2d258d5fa2ed6bba WHIRLPOOL 51a5e1534e8d0fcab7bb5d5f2b247251b333dd565c320441a76d7004acb9b808e8c13169b1d8a99d5639f9e4311d938731396a3d1ea263d2d52ce8889e247e22
+EBUILD rust-bin-1.12.1.ebuild 2644 SHA256 7936b97b15d30166f7230d0ba25bc7761173cbbf8256d4796ccf5972915abd32 SHA512 75267bee27ae591c2d6443fbf768b19e8476f81e1f93ff2a780b816aee3d77e4a080f769ee0d5439867aa4a61c7957f6f42ace080d5e9c1b91673f36c892fab1 WHIRLPOOL e15c54bb5f62e38957c199d53ceb8c610895f15742808bfa202950bbb874c35bfb510bab6abbf2d2f0a7352051f3bef83ec141f9d0bf069896db8ce4597c8a56
+EBUILD rust-bin-1.13.0.ebuild 2644 SHA256 7936b97b15d30166f7230d0ba25bc7761173cbbf8256d4796ccf5972915abd32 SHA512 75267bee27ae591c2d6443fbf768b19e8476f81e1f93ff2a780b816aee3d77e4a080f769ee0d5439867aa4a61c7957f6f42ace080d5e9c1b91673f36c892fab1 WHIRLPOOL e15c54bb5f62e38957c199d53ceb8c610895f15742808bfa202950bbb874c35bfb510bab6abbf2d2f0a7352051f3bef83ec141f9d0bf069896db8ce4597c8a56
+EBUILD rust-bin-1.14.0.ebuild 2644 SHA256 7936b97b15d30166f7230d0ba25bc7761173cbbf8256d4796ccf5972915abd32 SHA512 75267bee27ae591c2d6443fbf768b19e8476f81e1f93ff2a780b816aee3d77e4a080f769ee0d5439867aa4a61c7957f6f42ace080d5e9c1b91673f36c892fab1 WHIRLPOOL e15c54bb5f62e38957c199d53ceb8c610895f15742808bfa202950bbb874c35bfb510bab6abbf2d2f0a7352051f3bef83ec141f9d0bf069896db8ce4597c8a56
+EBUILD rust-bin-1.15.0.ebuild 2644 SHA256 26dfb5ef9e888e17e28d6dbaf1cfdb21e219c7a4c37e639d887da11cb41bc044 SHA512 d742a0b69ccdcee54ea71366ea219210d93441d10ed0c1463f4be99a3e67e696a046989194382102d5738117b3ac46e9602d4423cc10251f9657a10180e39ff0 WHIRLPOOL 08f3bd769197e935b394281d3d8050966ed0575be6b3579acb33ad2554779068167f274c4b1f6f35dffbacd2ed1470ac36e08c20bed1954c09251be3a487c5af
+EBUILD rust-bin-1.15.1.ebuild 2644 SHA256 26dfb5ef9e888e17e28d6dbaf1cfdb21e219c7a4c37e639d887da11cb41bc044 SHA512 d742a0b69ccdcee54ea71366ea219210d93441d10ed0c1463f4be99a3e67e696a046989194382102d5738117b3ac46e9602d4423cc10251f9657a10180e39ff0 WHIRLPOOL 08f3bd769197e935b394281d3d8050966ed0575be6b3579acb33ad2554779068167f274c4b1f6f35dffbacd2ed1470ac36e08c20bed1954c09251be3a487c5af
+EBUILD rust-bin-1.16.0.ebuild 2644 SHA256 26dfb5ef9e888e17e28d6dbaf1cfdb21e219c7a4c37e639d887da11cb41bc044 SHA512 d742a0b69ccdcee54ea71366ea219210d93441d10ed0c1463f4be99a3e67e696a046989194382102d5738117b3ac46e9602d4423cc10251f9657a10180e39ff0 WHIRLPOOL 08f3bd769197e935b394281d3d8050966ed0575be6b3579acb33ad2554779068167f274c4b1f6f35dffbacd2ed1470ac36e08c20bed1954c09251be3a487c5af
+EBUILD rust-bin-1.19.0.ebuild 2644 SHA256 26dfb5ef9e888e17e28d6dbaf1cfdb21e219c7a4c37e639d887da11cb41bc044 SHA512 d742a0b69ccdcee54ea71366ea219210d93441d10ed0c1463f4be99a3e67e696a046989194382102d5738117b3ac46e9602d4423cc10251f9657a10180e39ff0 WHIRLPOOL 08f3bd769197e935b394281d3d8050966ed0575be6b3579acb33ad2554779068167f274c4b1f6f35dffbacd2ed1470ac36e08c20bed1954c09251be3a487c5af
+MISC ChangeLog 4639 SHA256 a3bb73b60f7d8101bd21efae69ceb7b57d4c5796474db81a3c3640df4da2baec SHA512 e7adf7d7ee907abc4b05aa6c095cc2c29f292bd75fb7a750e456f67c3918e2baed32520e3266daf03405800d539289b6bad7fc6771c065df12eef52544b6f750 WHIRLPOOL b9347ce7b211a3e0896a6821eaabe32889c092e26d74578b4c679d062671e1de0d5e52bccbe00f1b57c0650d32fbcba345cd16a8053c7e99731a78a3d664ee47
+MISC ChangeLog-2015 2038 SHA256 e4068a0c931902bcf38fb040938d9641d403223b6a21eb42db2baa82a097dcce SHA512 7fb709111dac852fbb2cb64d04f49280a27adb02e9fa701f513287a6f390888d796bb661563dd6c4616e15a820fcd63166828090adc0ce90f67db3e8e3a7591d WHIRLPOOL 877f5260ebcb89f7e51021e940248a071210a32fd92d0d759a5d9b64b0e3a5304391f82aae2e420e25edf794df503f7e65294a7924e0d2f6861bb06414c8b67c
+MISC metadata.xml 250 SHA256 791cc3130f3775c2ecce04665a072774ca677894442ba0b5caeb913ad290553a SHA512 659ffa5a36819a0534e5c614275998a130d02260924fa03d43b667f38672041b6740fb9c1efbc74d3f900ee4d3c14280aefa93d0c99fa27c1159683956f2c8f0 WHIRLPOOL 174506445a0238b85bc144591a00c9842ff2c105728acff2b37c38153d64aedb63b4d6525d30ef7676d1f232bab4adfb7f64a2b4ff3d4c6f3f1ab4c5e73c02db
diff --git a/dev-lang/rust-bin/metadata.xml b/dev-lang/rust-bin/metadata.xml
new file mode 100644
index 000000000000..85cf4eb92057
--- /dev/null
+++ b/dev-lang/rust-bin/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>rust@gentoo.org</email>
+ <name>Rust Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/rust-bin/rust-bin-1.12.1.ebuild b/dev-lang/rust-bin/rust-bin-1.12.1.ebuild
new file mode 100644
index 000000000000..dbba3ec82295
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.12.1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils bash-completion-r1
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+SRC_URI="amd64? ( http://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.gz )
+ x86? ( http://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.gz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+"
+RDEPEND="${DEPEND}"
+
+QA_PREBUILT="
+ opt/${P}/bin/rustc-bin-${PV}
+ opt/${P}/bin/rustdoc-bin-${PV}
+ opt/${P}/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.so
+"
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+ use x86 && postfix=i686-unknown-linux-gnu
+ mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die
+}
+
+src_install() {
+ local std=$(grep 'std' ./components)
+ local components="rustc,${std}"
+ use doc && components="${components},rust-docs"
+ ./install.sh \
+ --components="${components}" \
+ --disable-verify \
+ --prefix="${D}/opt/${P}" \
+ --mandir="${D}/usr/share/${P}/man" \
+ --disable-ldconfig \
+ || die
+
+ local rustc=rustc-bin-${PV}
+ local rustdoc=rustdoc-bin-${PV}
+ local rustgdb=rust-gdb-bin-${PV}
+
+ mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
+ mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
+ mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
+
+ dosym "/opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
+ dosym "/opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
+ dosym "/opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/opt/${P}/lib"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/dev-lang/rust-bin/rust-bin-1.13.0.ebuild b/dev-lang/rust-bin/rust-bin-1.13.0.ebuild
new file mode 100644
index 000000000000..dbba3ec82295
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.13.0.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils bash-completion-r1
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+SRC_URI="amd64? ( http://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.gz )
+ x86? ( http://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.gz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+"
+RDEPEND="${DEPEND}"
+
+QA_PREBUILT="
+ opt/${P}/bin/rustc-bin-${PV}
+ opt/${P}/bin/rustdoc-bin-${PV}
+ opt/${P}/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.so
+"
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+ use x86 && postfix=i686-unknown-linux-gnu
+ mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die
+}
+
+src_install() {
+ local std=$(grep 'std' ./components)
+ local components="rustc,${std}"
+ use doc && components="${components},rust-docs"
+ ./install.sh \
+ --components="${components}" \
+ --disable-verify \
+ --prefix="${D}/opt/${P}" \
+ --mandir="${D}/usr/share/${P}/man" \
+ --disable-ldconfig \
+ || die
+
+ local rustc=rustc-bin-${PV}
+ local rustdoc=rustdoc-bin-${PV}
+ local rustgdb=rust-gdb-bin-${PV}
+
+ mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
+ mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
+ mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
+
+ dosym "/opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
+ dosym "/opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
+ dosym "/opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/opt/${P}/lib"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/dev-lang/rust-bin/rust-bin-1.14.0.ebuild b/dev-lang/rust-bin/rust-bin-1.14.0.ebuild
new file mode 100644
index 000000000000..dbba3ec82295
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.14.0.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils bash-completion-r1
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+SRC_URI="amd64? ( http://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.gz )
+ x86? ( http://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.gz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+"
+RDEPEND="${DEPEND}"
+
+QA_PREBUILT="
+ opt/${P}/bin/rustc-bin-${PV}
+ opt/${P}/bin/rustdoc-bin-${PV}
+ opt/${P}/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.so
+"
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+ use x86 && postfix=i686-unknown-linux-gnu
+ mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die
+}
+
+src_install() {
+ local std=$(grep 'std' ./components)
+ local components="rustc,${std}"
+ use doc && components="${components},rust-docs"
+ ./install.sh \
+ --components="${components}" \
+ --disable-verify \
+ --prefix="${D}/opt/${P}" \
+ --mandir="${D}/usr/share/${P}/man" \
+ --disable-ldconfig \
+ || die
+
+ local rustc=rustc-bin-${PV}
+ local rustdoc=rustdoc-bin-${PV}
+ local rustgdb=rust-gdb-bin-${PV}
+
+ mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
+ mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
+ mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
+
+ dosym "/opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
+ dosym "/opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
+ dosym "/opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/opt/${P}/lib"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/dev-lang/rust-bin/rust-bin-1.15.0.ebuild b/dev-lang/rust-bin/rust-bin-1.15.0.ebuild
new file mode 100644
index 000000000000..319576f891af
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.15.0.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils bash-completion-r1
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+SRC_URI="amd64? ( http://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.gz )
+ x86? ( http://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.gz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+"
+RDEPEND="${DEPEND}"
+
+QA_PREBUILT="
+ opt/${P}/bin/rustc-bin-${PV}
+ opt/${P}/bin/rustdoc-bin-${PV}
+ opt/${P}/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.so
+"
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+ use x86 && postfix=i686-unknown-linux-gnu
+ mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die
+}
+
+src_install() {
+ local std=$(grep 'std' ./components)
+ local components="rustc,${std}"
+ use doc && components="${components},rust-docs"
+ ./install.sh \
+ --components="${components}" \
+ --disable-verify \
+ --prefix="${D}/opt/${P}" \
+ --mandir="${D}/usr/share/${P}/man" \
+ --disable-ldconfig \
+ || die
+
+ local rustc=rustc-bin-${PV}
+ local rustdoc=rustdoc-bin-${PV}
+ local rustgdb=rust-gdb-bin-${PV}
+
+ mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
+ mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
+ mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
+
+ dosym "/opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
+ dosym "/opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
+ dosym "/opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/opt/${P}/lib"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/dev-lang/rust-bin/rust-bin-1.15.1.ebuild b/dev-lang/rust-bin/rust-bin-1.15.1.ebuild
new file mode 100644
index 000000000000..319576f891af
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.15.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 eutils bash-completion-r1
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+SRC_URI="amd64? ( http://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.gz )
+ x86? ( http://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.gz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+"
+RDEPEND="${DEPEND}"
+
+QA_PREBUILT="
+ opt/${P}/bin/rustc-bin-${PV}
+ opt/${P}/bin/rustdoc-bin-${PV}
+ opt/${P}/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.so
+"
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+ use x86 && postfix=i686-unknown-linux-gnu
+ mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die
+}
+
+src_install() {
+ local std=$(grep 'std' ./components)
+ local components="rustc,${std}"
+ use doc && components="${components},rust-docs"
+ ./install.sh \
+ --components="${components}" \
+ --disable-verify \
+ --prefix="${D}/opt/${P}" \
+ --mandir="${D}/usr/share/${P}/man" \
+ --disable-ldconfig \
+ || die
+
+ local rustc=rustc-bin-${PV}
+ local rustdoc=rustdoc-bin-${PV}
+ local rustgdb=rust-gdb-bin-${PV}
+
+ mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
+ mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
+ mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
+
+ dosym "/opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
+ dosym "/opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
+ dosym "/opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/opt/${P}/lib"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/dev-lang/rust-bin/rust-bin-1.16.0.ebuild b/dev-lang/rust-bin/rust-bin-1.16.0.ebuild
new file mode 100644
index 000000000000..319576f891af
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.16.0.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils bash-completion-r1
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+SRC_URI="amd64? ( http://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.gz )
+ x86? ( http://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.gz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+"
+RDEPEND="${DEPEND}"
+
+QA_PREBUILT="
+ opt/${P}/bin/rustc-bin-${PV}
+ opt/${P}/bin/rustdoc-bin-${PV}
+ opt/${P}/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.so
+"
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+ use x86 && postfix=i686-unknown-linux-gnu
+ mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die
+}
+
+src_install() {
+ local std=$(grep 'std' ./components)
+ local components="rustc,${std}"
+ use doc && components="${components},rust-docs"
+ ./install.sh \
+ --components="${components}" \
+ --disable-verify \
+ --prefix="${D}/opt/${P}" \
+ --mandir="${D}/usr/share/${P}/man" \
+ --disable-ldconfig \
+ || die
+
+ local rustc=rustc-bin-${PV}
+ local rustdoc=rustdoc-bin-${PV}
+ local rustgdb=rust-gdb-bin-${PV}
+
+ mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
+ mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
+ mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
+
+ dosym "/opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
+ dosym "/opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
+ dosym "/opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/opt/${P}/lib"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/dev-lang/rust-bin/rust-bin-1.19.0.ebuild b/dev-lang/rust-bin/rust-bin-1.19.0.ebuild
new file mode 100644
index 000000000000..319576f891af
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.19.0.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils bash-completion-r1
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+SRC_URI="amd64? ( http://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.gz )
+ x86? ( http://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.gz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+"
+RDEPEND="${DEPEND}"
+
+QA_PREBUILT="
+ opt/${P}/bin/rustc-bin-${PV}
+ opt/${P}/bin/rustdoc-bin-${PV}
+ opt/${P}/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.so
+"
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+ use x86 && postfix=i686-unknown-linux-gnu
+ mv "${WORKDIR}/${MY_P}-${postfix}" "${S}" || die
+}
+
+src_install() {
+ local std=$(grep 'std' ./components)
+ local components="rustc,${std}"
+ use doc && components="${components},rust-docs"
+ ./install.sh \
+ --components="${components}" \
+ --disable-verify \
+ --prefix="${D}/opt/${P}" \
+ --mandir="${D}/usr/share/${P}/man" \
+ --disable-ldconfig \
+ || die
+
+ local rustc=rustc-bin-${PV}
+ local rustdoc=rustdoc-bin-${PV}
+ local rustgdb=rust-gdb-bin-${PV}
+
+ mv "${D}/opt/${P}/bin/rustc" "${D}/opt/${P}/bin/${rustc}" || die
+ mv "${D}/opt/${P}/bin/rustdoc" "${D}/opt/${P}/bin/${rustdoc}" || die
+ mv "${D}/opt/${P}/bin/rust-gdb" "${D}/opt/${P}/bin/${rustgdb}" || die
+
+ dosym "/opt/${P}/bin/${rustc}" "/usr/bin/${rustc}"
+ dosym "/opt/${P}/bin/${rustdoc}" "/usr/bin/${rustdoc}"
+ dosym "/opt/${P}/bin/${rustgdb}" "/usr/bin/${rustgdb}"
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/opt/${P}/lib"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV},"
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
new file mode 100644
index 000000000000..279a4c409126
--- /dev/null
+++ b/dev-lang/rust/Manifest
@@ -0,0 +1,19 @@
+DIST cargo-0.19.0-i686-unknown-linux-gnu.tar.gz 5068212 SHA256 30ffc32615626b746cbdd2c34d79b3de8ae9889ae56ab33feed9c3a1b9c170fc SHA512 bfe5df682eb566c91995b8c00b5e8edb5d2c3410d1baa5be2ede2e39260b653d34b7723c6c3e8f07d8102ffab50b13e62f9f2d816dad8fba9f39b7bec984181e WHIRLPOOL 3a2c9f36470f611dbd4d8e48c94b401d584b25208abafa1a1073eca33009185e37d92a3f59200027bcfb82bb50acbf5acf4aa87649360afaba7d380bdfcffff0
+DIST cargo-0.19.0-x86_64-unknown-linux-gnu.tar.gz 5133993 SHA256 24d5e01b09ba0fb15c4b7ef4f527aca874ce2e0cebc3850fdc2535ac7e25b205 SHA512 6fedb8f83d70dc4fb93a29d400577a5578ceed1448f4e85e8a9509b98b037a125532ebfb6a7e6bc9411501ea74774d2c47ac7e2bcb7ac82baeb925abc46609e8 WHIRLPOOL eb76664d0ac08389beb9feae5f6d603b6846cb3d21f015e97bf702789afa7cedd4cd1fb04594d48af8840dece0bc9c44c74fb84390c5b24dcb5061567b59737f
+DIST rust-std-1.18.0-i686-unknown-linux-gnu.tar.gz 66316236 SHA256 3b93c7b856b98f61ec0f640bc96373f4762484ab3340866902c8c96933bcf10b SHA512 0649743437f15d80f7fe08ae32177b36e2a89e87db8062433cfa6d0f62fe7e8fdbc109a025c02dc110d8abdf4b74ddfe80ba8fb895992b0f5ac6a880bbbdf051 WHIRLPOOL 668f41c1fc96083c974b62ce831c254b8707fc7a452e55927ed77943548b829ff8164618ed5bec29f766366af8682e4d91edd9cd0d615bacc9d47c610f8bb87e
+DIST rust-std-1.18.0-x86_64-unknown-linux-gnu.tar.gz 75723132 SHA256 4a66150781e224412ebd9dd6d643ad65ecc5668a7754e4a12e115be6ce7bf527 SHA512 98f50016cf6f7c89f90830e1c9f41b5413adf2eaa5e2874ca117ffe84ee59fe77cb461ca3601ee65c5c5c884eb42e22509a94c00544527c727f2e3d6d0adb530 WHIRLPOOL 0c08c956be2252f25098d2007a5d57d4e74b3ef9fba47a0b3e291db9575cf41986d89a8b24f6966f73c830b52d2a481a6248deec9a6502baf3fa5b79afe2c342
+DIST rustc-1.14.0-i686-unknown-linux-gnu.tar.gz 51391277 SHA256 52b7df5025c302d82f0572fbdc74309334bad36e796c4a2fdf934abe2e5e23ac SHA512 4a951439d8c001b8ff2f6aa2f505e23130209494026fdacea019aef05bebb2f0d3404df047ccedbe9f4140cb5163404db22a5b0977752c495fc45f739d1252fb WHIRLPOOL 881f1a042568d55a3826f629ddd04642dbbfa3a7f423bb3c1d4e1d4e73fa31fe34c708b718b5d44cdd34cc71f99243de98f1478d880ff5804375bbc33ff4766e
+DIST rustc-1.14.0-x86_64-unknown-linux-gnu.tar.gz 49370951 SHA256 0eeec4211aa872f24c220200a0c2b095bbfc9c0f737c1c5df2555967c8f36787 SHA512 da33a8c509d3a554bed3173f8cdd6fc3639646e5b12eae80654d83290160227238c6f9ff9c0247d63a90f48eeafc8dc31a4a02575ba43fa6d5f75ae58a347c32 WHIRLPOOL a5aa3eb98b0b6b080057a4c5ffb00996904d3a6bb660297a984205f85e9fd6932f9e9c6c4d4fe60a8ca16a216304ab6e504a45b75b876408a8f3450f29872332
+DIST rustc-1.15.1-i686-unknown-linux-gnu.tar.gz 39314075 SHA256 a833304f99071600c72ecd868c1c7bd5ce49d1102332637a8eb7adb942f349ab SHA512 138a4a893a70860650da1636f734977c215e32b1f9b15b957bfc31575d2662ea6c2c65a130bd13647ec1f2366fe0deb26a94ea09aaec7cbda8e466fa295a0c42 WHIRLPOOL 175e1c7ae1352b955c4e9fc3ea2175e91fe9037e356898fc7dc61ce55f5932db6cf4efac834cecc95b6c90c411b57f0ddb398e9b1f3af843a77f1fd84d52c36b
+DIST rustc-1.15.1-src.tar.gz 28100203 SHA256 2e7daad418a830b45b977cd7ecf181b65f30f73df63ff36e124ea5fe5d1af327 SHA512 10d533b17cf7f92b9dff14b399b5dd0ac8b68284eea072c85ede78a4e4c2c4fce8c781777124c64798057aceb6444535e02e067fd67ba3633c3e828fb4d2d339 WHIRLPOOL 8b80298cd0a8c3ae0f7ad11052e2dd0bd48b589a95e4bbda4db32ac62d52f9252fe783d46b00484550099b99c3871bd577f8ef54ed45c20b477f9742220497fa
+DIST rustc-1.15.1-x86_64-unknown-linux-gnu.tar.gz 37650863 SHA256 33ff44672b731fc71145974ce84194a1a9bafe6da3a74fd1e7543f12467f8894 SHA512 97f2fd905b1c2c9ee1fb9a9604a931154aa928692e6334af5a60f1853e49246b13af26afb6342f085cf77e624f23e90c409f05b81983408cf0538ba1401ef7cb WHIRLPOOL 92d4659712a3c8c5908f2abff4f582233a2b5aea2256213376f4830aaddb8470257e49d9f65503e7d82845648a898fd980afb070c39c37feaf8d489fdd9e238e
+DIST rustc-1.16.0-src.tar.gz 28470372 SHA256 f966b31eb1cd9bd2df817c391a338eeb5b9253ae0a19bf8a11960c560f96e8b4 SHA512 096b1b7406be9bc61161bb7cdd2061f2bc2174c161a31f4ed6ceecf7fc379f315fc2f7cb9f6c134ea4f8519c27bf6e5a3f712cf1e56d5785831d8c8374eb0ba5 WHIRLPOOL a59a19b63d64fd98d4f488e465c7a89ca034eaddb3ef6272fe3ab6c3e411afb7ca3b34926201815ce208a5de78dc9e9018caa1d05b71d1cbc80912d46eb8b074
+DIST rustc-1.18.0-i686-unknown-linux-gnu.tar.gz 47281118 SHA256 0cb9bb95373cee8ba26e8f517c46f8c58a29e22f2c7c08a4d152306c6ffc7115 SHA512 e270a314fb326fb226226741a5a15f237846ffb7ae6e0ab349f56328f5b3557d8b3dfdcfbc168f3ed4d9875806434537ce7bd5fb97b2c3078f7d03fd6ce65d2d WHIRLPOOL 598aaa0c8ded68fdddd28f827b07e3841355e1ff67aed20d31cc7728fc351a95e8c521661487905fba0689c0513b5f3baf31ed34cfae5f396731a5e72da2067b
+DIST rustc-1.18.0-x86_64-unknown-linux-gnu.tar.gz 45281645 SHA256 f2a34e20166ccf6eda4de46a9efb02821df5c3f34667e2988284a8eaee408113 SHA512 7d8865a43b979150c3dc3abaa852921f46bebb54659bb0f14bc9b82b367f94ec031da4d03242cb6aae8bd11167402b9e166a14aa3c4a141413be54e9a685af31 WHIRLPOOL 0dc7b498701e3d40b3242e7860b6b5b6ccdd437d0e1d0a6c492fd6b7fa539800b6722e2da124b8ba9568beccc34e83cab080045f41450a4fb5a123c99f6136fb
+DIST rustc-1.19.0-src.tar.gz 50108626 SHA256 15231f5053fb72ad82be91f5abfd6aa60cb7898c5089e4f1ac5910a731090c51 SHA512 080a8625fc15bc4fc17ab910bdcc0d9a88ce8922f1a3eb241d0f956b5799e4db6df45ebabb5497295c198be08686e5a94dff65569582fc6a5ecb9200cfee5c24 WHIRLPOOL 1dabcc0966a2e69f6c8105e39b82f31bc1c64803318c3a82f63f82afbc67e566d6969568678e86079e1fb515f73feb23d981920c232d836d297abf58010612fe
+EBUILD rust-1.15.1.ebuild 3984 SHA256 b1d1e31eea488eddf2ab37af72eb21e5b278293ff6fc3c256c17a7ec8f147299 SHA512 a6b14e295a562308f5d9bfa2e5087c5ede31c93a99cc41b37fcabca42042ed958384660e51486372127d2262feb1071e3ffd386c974d86ad7647eb9c0ef8648d WHIRLPOOL 4ebd8a878dad27318a208b30dd3a043b3840fce4bfa8f6a858e7b39da59ab5da775374fec25ebaf970088a7cda378c407407f0bc5d0d589371ab9233a41d0c69
+EBUILD rust-1.16.0.ebuild 3840 SHA256 8712a23144f80395cc8eb99dd30c0dbd66548c0af8c2f81dc7a9f17c2b2f08f5 SHA512 8c661074f6a53f6d8397d712c8236dfc34f18c386e699a1ab1db9a9eceba9e776c09c733ad615a1897916f1268c46e58a56c5f80cd2efe787fca5f8fdc8591e4 WHIRLPOOL 54b73f98c30d4d8422843078968a1bd90c8bff5c48196e3992766b4361c2ffa0cf4bf70c8fe1297b4eb330e227e967d696fd4725e97cad4a7e2c5426d6e9de60
+EBUILD rust-1.19.0.ebuild 4145 SHA256 e79d0b976253503ee5e15564e51e980b5cc42ea3439825931c46c0f96f6d1c2d SHA512 0da72a60a704d7215a3dea336e780c81473253ea3ccbfc41c1cef4cf2b2f86a791a41f42356a8958088d6522e6c3a917cfa196d14556feef5f56667b92012739 WHIRLPOOL 05d27b8378525c15b72cd11b6dea534255a0ff0f63eeb6ebc1de3326b5e49f864583c0fb8ded325e521393b7e5805d8cac724fadf9ac77350caac6c6a95e9b3b
+MISC ChangeLog 10556 SHA256 d137f1eb60479332b21c359d506d2856d91a27b458de4c38e57be3b7997cb7bb SHA512 c9eb6d623969559659065ad69efb5f9c1199587c740f9b73b29157f68c68a284bf0c3aacd7456122ce102d41ae4cbb7a19f2e634f7477c65a4a2a0d1640969d2 WHIRLPOOL b3036acdb63d7c405187e9ae8400808c267541ec0dbd0cb4196d5277e11e842103cc6dab096d9f3995ba30e2c2a1a65a5be29b1268851030ad7f23401f1bdac6
+MISC ChangeLog-2015 4442 SHA256 37cc85223ed117da5749eb4956c1efd3015e46284d062a10e8421b5797b1619e SHA512 66f9e94329c2c31c8e0a3941796d140590e65610fdca987bee5ac0861506eebc3152bdef0f2f2dac9e84767a4eb3c666c2b92a3c1e1bb78c02a317a29651e236 WHIRLPOOL 917d74c777f82241eb57f6afbab6ea95e928fedf661d61fd2f46e79c242ad1c6db73b8ef9f33b3521f04cb60e08ba794a18f23659d004a5849eb08caf67d64f4
+MISC metadata.xml 578 SHA256 14c70fbe484d7251138113abc717dd7e9a995768f692829335ab95faa682e1ac SHA512 c2e4e7f1bbb0227493875a1ff9e55f870313b615a7234f716984366760dccc5b5186a2a03591533769958c3a70f8a973d5d22111cfe29849e835f5b0a400c26d WHIRLPOOL 3d204fe92188b93d46809f8f9e6a50fc5066299d3fec1c515c28acd118b131ee9503789089486c7a4e63c35743bd9b6992b88b08cf5f31a4a43ff18d72b5f77e
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
new file mode 100644
index 000000000000..6d0b35dc8f72
--- /dev/null
+++ b/dev-lang/rust/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>rust@gentoo.org</email>
+ <name>Rust Project</name>
+ </maintainer>
+ <use>
+ <flag name="clang">Use <pkg>sys-devel/clang</pkg> for building</flag>
+ <flag name="libcxx">Use <pkg>sys-libs/libcxx</pkg> as standard
+ library when building with <pkg>sys-devel/clang</pkg></flag>
+ <flag name="system-llvm">Use system <pkg>sys-devel/llvm</pkg> in
+ place of the bundled one</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/rust/rust-1.15.1.ebuild b/dev-lang/rust/rust-1.15.1.ebuild
new file mode 100644
index 000000000000..5d7f76787c57
--- /dev/null
+++ b/dev-lang/rust/rust-1.15.1.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-any-r1 versionator toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.gz"
+ KEYWORDS=""
+else
+ ABI_VER="$(get_version_component_range 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+CARGO_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).0"
+RUST_STAGE0_amd64="rustc-${STAGE0_VERSION}-x86_64-unknown-linux-gnu"
+RUST_STAGE0_x86="rustc-${STAGE0_VERSION}-i686-unknown-linux-gnu"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.gz
+ amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.gz )
+ x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.gz )
+"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clang debug doc libcxx +system-llvm"
+REQUIRED_USE="libcxx? ( clang )"
+
+RDEPEND="libcxx? ( sys-libs/libcxx )
+ system-llvm? ( >=sys-devel/llvm-3.8.1-r2:0
+ <sys-devel/llvm-3.10.0:0 )
+"
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ >=dev-lang/perl-5.0
+ clang? ( sys-devel/clang )
+"
+
+PDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ >=dev-util/cargo-${CARGO_VERSION}"
+
+S="${WORKDIR}/${MY_P}-src"
+
+src_prepare() {
+ find mk -name '*.mk' -exec \
+ sed -i -e "s/-Werror / /g" {} \; || die
+
+ default
+}
+
+src_configure() {
+ export CFG_DISABLE_LDCONFIG="notempty"
+
+ local stagename="RUST_STAGE0_${ARCH}"
+ local stage0="${!stagename}"
+
+ "${ECONF_SOURCE:-.}"/configure \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)/${P}" \
+ --mandir="${EPREFIX}/usr/share/${P}/man" \
+ --release-channel=${SLOT%%/*} \
+ --disable-manage-submodules \
+ --disable-rustbuild \
+ --default-linker=$(tc-getBUILD_CC) \
+ --default-ar=$(tc-getBUILD_AR) \
+ --python=${EPYTHON} \
+ --disable-rpath \
+ --enable-local-rust \
+ --local-rust-root="${WORKDIR}/${stage0}/rustc" \
+ $(use_enable clang) \
+ $(use_enable debug) \
+ $(use_enable debug llvm-assertions) \
+ $(use_enable !debug optimize) \
+ $(use_enable !debug optimize-cxx) \
+ $(use_enable !debug optimize-llvm) \
+ $(use_enable !debug optimize-tests) \
+ $(use_enable doc docs) \
+ $(use_enable libcxx libcpp) \
+ $(usex system-llvm "--llvm-root=${EPREFIX}/usr" " ") \
+ || die
+}
+
+src_compile() {
+ emake VERBOSE=1
+}
+
+src_install() {
+ unset SUDO_USER
+
+ default
+
+ mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
+ mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
+ mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
+
+ dodoc COPYRIGHT
+
+ dodir "/usr/share/doc/rust-${PV}/"
+ mv "${D}/usr/share/doc/rust"/* "${D}/usr/share/doc/rust-${PV}/" || die
+ rmdir "${D}/usr/share/doc/rust/" || die
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/$(get_libdir)/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-${PV}."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/dev-lang/rust/rust-1.16.0.ebuild b/dev-lang/rust/rust-1.16.0.ebuild
new file mode 100644
index 000000000000..e13e960aba12
--- /dev/null
+++ b/dev-lang/rust/rust-1.16.0.ebuild
@@ -0,0 +1,149 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-any-r1 versionator toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.gz"
+ KEYWORDS=""
+else
+ ABI_VER="$(get_version_component_range 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+CARGO_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).1"
+RUST_STAGE0_amd64="rustc-${STAGE0_VERSION}-x86_64-unknown-linux-gnu"
+RUST_STAGE0_x86="rustc-${STAGE0_VERSION}-i686-unknown-linux-gnu"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.gz
+ amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.gz )
+ x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.gz )
+"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clang debug doc libcxx"
+REQUIRED_USE="libcxx? ( clang )"
+
+RDEPEND="libcxx? ( sys-libs/libcxx )"
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ >=dev-lang/perl-5.0
+ clang? ( sys-devel/clang )
+"
+
+PDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ >=dev-util/cargo-${CARGO_VERSION}"
+
+S="${WORKDIR}/${MY_P}-src"
+
+src_prepare() {
+ find mk -name '*.mk' -exec \
+ sed -i -e "s/-Werror / /g" {} \; || die
+
+ default
+}
+
+src_configure() {
+ export CFG_DISABLE_LDCONFIG="notempty"
+
+ local stagename="RUST_STAGE0_${ARCH}"
+ local stage0="${!stagename}"
+
+ "${ECONF_SOURCE:-.}"/configure \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)/${P}" \
+ --mandir="${EPREFIX}/usr/share/${P}/man" \
+ --release-channel=${SLOT%%/*} \
+ --disable-manage-submodules \
+ --disable-rustbuild \
+ --default-linker=$(tc-getBUILD_CC) \
+ --default-ar=$(tc-getBUILD_AR) \
+ --python=${EPYTHON} \
+ --disable-rpath \
+ --enable-local-rust \
+ --local-rust-root="${WORKDIR}/${stage0}/rustc" \
+ $(use_enable clang) \
+ $(use_enable debug) \
+ $(use_enable debug llvm-assertions) \
+ $(use_enable !debug optimize) \
+ $(use_enable !debug optimize-cxx) \
+ $(use_enable !debug optimize-llvm) \
+ $(use_enable !debug optimize-tests) \
+ $(use_enable doc docs) \
+ $(use_enable libcxx libcpp) \
+ || die
+}
+
+src_compile() {
+ emake VERBOSE=1
+}
+
+src_install() {
+ unset SUDO_USER
+
+ default
+
+ mv "${D}/usr/bin/rustc" "${D}/usr/bin/rustc-${PV}" || die
+ mv "${D}/usr/bin/rustdoc" "${D}/usr/bin/rustdoc-${PV}" || die
+ mv "${D}/usr/bin/rust-gdb" "${D}/usr/bin/rust-gdb-${PV}" || die
+
+ dodoc COPYRIGHT
+
+ dodir "/usr/share/doc/rust-${PV}/"
+ mv "${D}/usr/share/doc/rust"/* "${D}/usr/share/doc/rust-${PV}/" || die
+ rmdir "${D}/usr/share/doc/rust/" || die
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/$(get_libdir)/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-${PV}."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/dev-lang/rust/rust-1.19.0.ebuild b/dev-lang/rust/rust-1.19.0.ebuild
new file mode 100644
index 000000000000..402db0937fa3
--- /dev/null
+++ b/dev-lang/rust/rust-1.19.0.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-any-r1 versionator toolchain-funcs
+
+if [[ ${PV} = *beta* ]]; then
+ betaver=${PV//*beta}
+ BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
+ MY_P="rustc-beta"
+ SLOT="beta/${PV}"
+ SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.gz"
+ KEYWORDS=""
+else
+ ABI_VER="$(get_version_component_range 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+if [[ ${ARCH} = "amd64" ]]; then
+ TRIPLE="x86_64-unknown-linux-gnu"
+else
+ TRIPLE="i686-unknown-linux-gnu"
+fi
+
+CARGO_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).0"
+STAGE0_VERSION_CARGO="0.$(($(get_version_component_range 2))).0"
+BOOTSTRAP_DATE="2017-06-08" # found in src/stage0.txt
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="http://www.rust-lang.org/"
+
+SRC_URI="amd64? (
+ https://static.rust-lang.org/dist/rustc-${STAGE0_VERSION}-x86_64-unknown-linux-gnu.tar.gz
+ https://static.rust-lang.org/dist/rust-std-${STAGE0_VERSION}-x86_64-unknown-linux-gnu.tar.gz
+ https://static.rust-lang.org/dist/cargo-${STAGE0_VERSION_CARGO}-x86_64-unknown-linux-gnu.tar.gz
+ )
+ x86? (
+ https://static.rust-lang.org/dist/rustc-${STAGE0_VERSION}-i686-unknown-linux-gnu.tar.gz
+ https://static.rust-lang.org/dist/rust-std-${STAGE0_VERSION}-i686-unknown-linux-gnu.tar.gz
+ https://static.rust-lang.org/dist/cargo-${STAGE0_VERSION_CARGO}-i686-unknown-linux-gnu.tar.gz
+ )
+ https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="clang debug doc libcxx"
+REQUIRED_USE="libcxx? ( clang )"
+
+RDEPEND="libcxx? ( sys-libs/libcxx )"
+
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ >=dev-lang/perl-5.0
+ clang? ( sys-devel/clang )
+ >=dev-util/cmake-3.4.3
+"
+
+PDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ >=dev-util/cargo-${CARGO_VERSION}"
+
+S="${WORKDIR}/rustc-${PV}-src"
+
+src_unpack() {
+ unpack ${A##* }
+}
+
+src_configure() {
+ echo "No configure step for rust"
+}
+
+src_compile() {
+ local stage0="rust-${STAGE0_VERSION}-${TRIPLE}"
+ if use debug ; then
+ local optimized="false";
+ local debug="true";
+ else
+ local optimized="true";
+ local debug="false";
+ fi
+
+ cat <<- EOF > config.toml
+ [llvm]
+ optimize = ${optimized}
+ assertions = ${debug}
+ [build]
+ docs = false
+ submodules = false
+ python = "${EPYTHON}"
+ vendor = true
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)/${P}"
+ mandir = "share/${P}/man"
+ docdir = "share/${P}/doc"
+ [rust]
+ optimize = ${optimized}
+ default-linker = "$(tc-getBUILD_CC)"
+ default-ar = "$(tc-getBUILD_AR)"
+ channel = "${SLOT%%/*}"
+ rpath = false
+ optimize-tests = ${optimized}
+ EOF
+
+ local cache_dir="build/cache/${BOOTSTRAP_DATE}"
+ mkdir -p ${cache_dir}
+ for i in ${A}; do
+ cp "${DISTDIR}/${i}" $cache_dir/
+ done
+ ${EPYTHON} x.py build || die
+}
+
+src_install() {
+ default
+
+ local obj="build/${TRIPLE}/stage2"
+ dobin "${obj}/bin/rustc" "${obj}/bin/rustdoc"
+ dobin src/etc/rust-gdb src/etc/rust-lldb
+ insinto "/usr/$(get_libdir)"
+ doins -r "${obj}/lib/"*
+ dodoc COPYRIGHT
+ doman man/*
+
+ cat <<-EOF > "${T}"/50${P}
+ LDPATH="/usr/$(get_libdir)/${P}"
+ MANPATH="/usr/share/${P}/man"
+ EOF
+ doenvd "${T}"/50${P}
+
+ cat <<-EOF > "${T}/provider-${P}"
+ /usr/bin/rustdoc
+ /usr/bin/rust-gdb
+ EOF
+ dodir /etc/env.d/rust
+ insinto /etc/env.d/rust
+ doins "${T}/provider-${P}"
+}
+
+pkg_postinst() {
+ eselect rust update --if-unset
+
+ elog "Rust installs a helper script for calling GDB now,"
+ elog "for your convenience it is installed under /usr/bin/rust-gdb-${PV}."
+
+ if has_version app-editors/emacs || has_version app-editors/emacs-vcs; then
+ elog "install app-emacs/rust-mode to get emacs support for rust."
+ fi
+
+ if has_version app-editors/gvim || has_version app-editors/vim; then
+ elog "install app-vim/rust-vim to get vim support for rust."
+ fi
+
+ if has_version 'app-shells/zsh'; then
+ elog "install app-shells/rust-zshcomp to get zsh completion for rust."
+ fi
+}
+
+pkg_postrm() {
+ eselect rust unset --if-invalid
+}
diff --git a/dev-lang/scala-bin/Manifest b/dev-lang/scala-bin/Manifest
new file mode 100644
index 000000000000..49154cf85862
--- /dev/null
+++ b/dev-lang/scala-bin/Manifest
@@ -0,0 +1,5 @@
+DIST scala-2.11.8.tgz 28678231 SHA256 87fc86a19d9725edb5fd9866c5ee9424cdb2cd86b767f1bb7d47313e8e391ace SHA512 c00a0eaa4317c3ffbdbbd9c817f06c5262f0549f22bd7f1886cc22643e34e8909648bbfb58f3a63c453baf045381a52128ff0b18b7a39274ef03aad7daea9fdf WHIRLPOOL dfdd640218b0fa39acb4ba3bb0b43fc82b24b6f5442ab4bca1140b90022dccfd222d9d05c8b790184735e6d254e5d7a06b06f066b7d6ec74166c010298723069
+EBUILD scala-bin-2.11.8.ebuild 1864 SHA256 d44d17bb16ac02f2fe8a3a7449957b83301aa3ba249d5e8a7f2698cca693a94d SHA512 fc54a02207389b0fb008314ce6d1c1fda15bd14d5b02f8618e2e78039dd1951e3e89dfbd5eb9fbb69a9f283c6ed24f5578e96b058a864f15bbe4ba17609f8711 WHIRLPOOL 25be46d9033901d3f9f0f01397e22e7b194ff30d268a2f36b7a70c4ae94e0397327469d9327efd9d0835d5880fc2d8642f32cd202bf3be9dde1c62a75c926c0c
+MISC ChangeLog 3071 SHA256 37d4f28294a0583651790396069347d6683b4139ac255adb0935a4a22767a76e SHA512 e93a173b39ead89f4beee63df39258f0a703ce65a10b5e4b2d47eb4981a531ec0ee162d4bdadb139c2662ad35449ab318f3aefe9a39ec6defbd9c7a3113aebf1 WHIRLPOOL 47c3796835ba1078414778fdcdcc15502393e73f94d6b1d5d0f458645ef9effde928c987ffc3aa466cf906594f51d7d9548775004baad36445c5d09de6f5fd5b
+MISC ChangeLog-2015 4360 SHA256 004a688ccacafd76d96e516ec3d63b51f01129c0e664da17eee76deb8e6b89ba SHA512 aa3c794bf0b1d2f30282c609d643d4e081a94e43681303500bff13b37e039413e81a9dd3073cca9426b751c416d2782b535e16ac364e8fc4a2c42178fd77d9a4 WHIRLPOOL 6ed63348775728fc2fa08dd39666ab48e35304c87e9310a24ff8755b66d6fcd040f11d27eb8a0819b536721b79095842b102e2b78a157f469dc346cb505323a0
+MISC metadata.xml 322 SHA256 727c779dca55d509b83a5be15ae2ff5bea642fffce4bf5dd67de3c1e97db93fe SHA512 31b070b2d770ffd3345949cc9ef12f660631660b312f64a2e5b657205ead2dc40da0245312fd7d10e8c78ca3853f325c105c70bd85ae9a8e76bf5c24c2dfeda0 WHIRLPOOL 05cc5145a18ad1b691af536da9ded411bc79c5002e9f7f3c38dbd340e3149c7ccb0b064c5f7adc7929b8553249839be4a5fe8999ac2b574daca56379ad2cea51
diff --git a/dev-lang/scala-bin/metadata.xml b/dev-lang/scala-bin/metadata.xml
new file mode 100644
index 000000000000..5352e92a2dc2
--- /dev/null
+++ b/dev-lang/scala-bin/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>monsieurp@gentoo.org</email>
+ </maintainer>
+<maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/scala-bin/scala-bin-2.11.8.ebuild b/dev-lang/scala-bin/scala-bin-2.11.8.ebuild
new file mode 100644
index 000000000000..6cd3aef956b3
--- /dev/null
+++ b/dev-lang/scala-bin/scala-bin-2.11.8.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+EAPI=6
+
+JAVA_PKG_IUSE="doc"
+
+inherit java-pkg-2
+
+MY_PN="${PN%-*}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://scala.epfl.ch/"
+SRC_URI="http://downloads.lightbend.com/${MY_PN}/${PV}/${MY_P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc"
+
+RDEPEND="
+ >=virtual/jre-1.6
+ !dev-lang/scala"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ default
+ ebegin 'Cleaning .bat files'
+ rm -f bin/*.bat || die
+ eend $?
+
+ ebegin 'Patching SCALA_HOME variable in bin/ directory'
+ local f
+ for f in bin/*; do
+ sed -i -e 's#\(SCALA_HOME\)=.*#\1=/usr/share/scala-bin#' $f || die
+ done
+ eend $?
+}
+
+src_compile() {
+ :;
+}
+
+src_install() {
+ ebegin 'Installing bin scripts'
+ dobin bin/*
+ eend $?
+
+ ebegin 'Installing jar files'
+ cd lib/ || die
+
+ # Unversion those libs
+ java-pkg_newjar scala-continuations-library_*.jar scala-continuations-library.jar
+ java-pkg_newjar akka-actor_*.jar akka-actor.jar
+ java-pkg_newjar config-*.jar config.jar
+ java-pkg_newjar scala-actors-2.11.0.jar scala-actors.jar
+ java-pkg_newjar scala-actors-migration_*.jar scala-actors-migration.jar
+ java-pkg_newjar scala-swing_*.jar scala-swing.jar
+ java-pkg_newjar scala-parser-combinators_*.jar scala-parser-combinators.jar
+ java-pkg_newjar scala-xml_*.jar scala-xml.jar
+ java-pkg_newjar jline-*.jar jline.jar
+ java-pkg_newjar scala-continuations-plugin_*.jar scala-continuations-plugin.jar
+ java-pkg_newjar scalap-*.jar scalap.jar
+
+ # Install these the usual way
+ java-pkg_dojar scala-compiler.jar
+ java-pkg_dojar scala-library.jar
+ java-pkg_dojar scala-reflect.jar
+
+ eend $?
+
+ cd ../ || die
+
+ ebegin 'Installing man pages'
+ doman man/man1/*.1
+ eend $?
+
+ if use doc; then
+ ebegin 'Installing documentation'
+ java-pkg_dohtml -r doc/tools
+ eend $?
+ fi
+}
diff --git a/dev-lang/scala/Manifest b/dev-lang/scala/Manifest
new file mode 100644
index 000000000000..6dbbdb77ab96
--- /dev/null
+++ b/dev-lang/scala/Manifest
@@ -0,0 +1,331 @@
+AUX scala-2.10.2-jdk-1.7-swing-SI-7455.patch 6539 SHA256 161aa9289a46e95a5ef0b596de0b20967cacebce7e27818af2fe384b0cc358e9 SHA512 b2ff90b7bbd45658b503b4b01a380e1f4f99481db3e94e28651862fd48dac6b7e9adcad3244d1cac632a2a8cc55c9616b0b6fd04d7c0b8e0eb3796f67a8c55df WHIRLPOOL aac8cafc94920f8099db3d9339e51d74bfff3f6ecff245c822eef3f8e19e7078158a3c9dec44e818e69fdcdc121f81f0d7e42a25043455c4c59480f07d94f057
+AUX scala-2.10.2-jdk-1.7-swing.patch 11030 SHA256 8a02334c59bfa6ee7edb216dcb2c2010089653e42df8688d97f9bacacbe0e1c3 SHA512 15f2812c204d5ec8b3f3e24356b26118beb00f7a593d976c21725bfc285f257fbd2d8913580d0b758307c3f50763e4f62027de6ad9a3dd4798722e23d0ccec69 WHIRLPOOL 08109cb10f232a2ca86a896d0efaeb08fc5fc85a68487086426c103816a951ff94e6109fbf87f7d6c99772653d167ef4260c640a9e74f2e3bd8daa76b7ea7b46
+AUX scala-2.10.2-maven-deps.patch 3846 SHA256 15a42a970d139ba488c796cf90e6c7b667900a863001676e000747e67fd9bad4 SHA512 91008b42462b4ca2449c83770982cec757e7bd1cb21e1c736f68fa10e52185015aa2985c1442b7808789cbf8652f6547fbc4f07f4ac7b7b8374248ce8e48e8dd WHIRLPOOL 9ad9f710d00f508eebbd2cea9537791a2a1870d53dd6d5721ede966f3e3f4de1756317f08e7d6d880fe1288b41039b1c5609972b79a6e714c143d63f0d133dab
+AUX scala-2.10.2-no-git.patch 919 SHA256 898ef449dc536e1809d1f16870398eb43fc947b51c8cbb6ef99273da6dc8d933 SHA512 7d5be40d7f97bc2c15bd59fb64178e06b3b0be3f88906cd2d821bbb14d6141c03a5da2f3454fd1d02872bcf7ef8582be83cf413a2368ec51336a13b2cd2f4b70 WHIRLPOOL 7a1d69a6c298cf29b274981263f12c0a4ba8be1957b49602e0d56de7af090accc0660c498c9dc6f905214716a5b92a563768fa34e900cf620c230c513283e46e
+AUX scala-2.10.3-no-git.patch 919 SHA256 fb3c9e50302647b198271d5a3185db17e618ae36e47a44ddd6a3e9f31608a671 SHA512 fe7e76871142666ea23ac7d0788f318ba707cb300771b74cc00409d71b602c3dae75bb5a2ddcd5919093f63695fd05d2780b51dc8b2a3240128d2d1c0feb0502 WHIRLPOOL 0008fbef4320f6121a8ad20d6abae3d42b435d91e6f4af289cbe458b2c1d34c061c8e65359d48f8645e0dc27aa5d69b3091aad03e0e14c6a38ffddc83f8a32a2
+AUX scala-2.10.4-no-git.patch 919 SHA256 3d4cf54bde5def9f990e8bafe98a1992e40059b415d682f0d264bcad26a07ad1 SHA512 78a8b85f2151a96b66f7e9d872b40e6d103b55f1372cb5090e5f2c1edae508e434ac7ac9111f2eebd63f0aab41b36d1209ee7ba5deb8c41644184d3c12ebf9e2 WHIRLPOOL 702c1eb5701a997d1b28481caeda2bf7f128cd15cea536cb6cfdcca835850ed96aa9555ef040b926fe40ac6062c0e849fa08219f3db79938c4a4d6f55a61aa5b
+AUX scala-2.10.6-no-git.patch 919 SHA256 e3f3e3e1fdc64200a6e5b2057f4258af0a999dbca7ba1ca0d3f680b726a43d3e SHA512 c0d91463dab1a857ed3e25f9af4a4165c54753550d457b93612595a9ef47d6ca8a4787a44aa529691d1425b9344d77c62381be0954112f53d965dc7882cc748d WHIRLPOOL 2a296b87fcf734deb6aeaedba2784c68b92d4a5cdddfa03722cb04877cdf6d7c3d97044b3d412419e90fbc90e6033fe81b4783785906606387d69781b399b649
+AUX scala-2.11.1-no-git.patch 919 SHA256 27b64c79ab589788562fdb83ffdeef8a39eb7d96d7b163f72609833b05239a91 SHA512 b2ef4da42d192c95a1974ed0caba52b6530c7f77de35cd817520ced906ec72d578ff68212add7cc0f7ded6b2486b03aa0e5f52c094f326cfc017ecc1d97116be WHIRLPOOL ec6e2cce830b12ddfbafe3ff2202e63d79a70b8234f80acfca209b3493df3c23b794c5c0b4f18f6f05a116e7328a7d097d61c3626d7d84d962d03d1709077f33
+AUX scala-2.11.11-no-git.patch 919 SHA256 0f6a302e157c4841d867b76bb4a732222603ed274d5df2e2a286388360bfbee5 SHA512 e6ccbd8ce6ee719e52ed16ef0d344223e93476277f7a131abf8841e82e9660a4fde992cace80f2a0ad5897eaee2920f9b1fbe1a2798b4c25973095018110f4b7 WHIRLPOOL 941c7cd50828e0a115cca6bdd18333473debaa0b62ec3fe6289cae08d26dead30636c4d8d31894c1184e21efd446caf6d51e8fe21fb8f4a31aed0727e61b16a2
+AUX scala-2.11.2-no-git.patch 919 SHA256 d3bb0cd3b00759646409a0f44bb780239c388c062de0c2a08f9858062302c0ee SHA512 26e590dedbedfc072b2613f1445835f5c3d215b5102fcbca8bebfff4908897a6f0e70f014b6597083586453cba6ff7d63e4d12abb25d5ca53002c551fe62c9e4 WHIRLPOOL 7dde4efe4f4cc643878f8b0d38cc48a40c67e8fa5709f2f6bf4b901cd06b745be30ae9115bed30b12639c24b83bcb787ff39ed75d06ebb2e655f289d445b7b03
+AUX scala-2.11.4-no-git.patch 919 SHA256 24f8910545fe42fa68a361e944e72ab899d632ef01f16954266e1d50c57a4494 SHA512 91f3f506309066940a72bceef9e091f12231dbbe013ac19c368c97b8ade604552fe3f61d14658d6ace461afee453da1c71dd94dd0209c7627353323615478917 WHIRLPOOL 7b9be0a05f784cada3322878e684a9c20dfca247ff780af5a81dcad77c39c769f272128ace8abe0523b364b6ea14ad1280a1f55816da0b00f9557a5445f668c3
+AUX scala-2.11.6-no-git.patch 919 SHA256 60b2a3174d79c774758727bee829486045879a8d1cf094f8618239e586c37940 SHA512 876c7300d9a439517af4d5ee918d2034635668c851ea279b9a14a91e87bf2f8264617de6791fcdb33a55a37215960d9398f869e102f42e029cb49c78568a6d67 WHIRLPOOL 8654203940eff9bfd89ef7a192e091d2931fc4332030bdb23b5356742bdd72877f579f5cc3d01eb8763d3702dac6949ffc02f4a599c428004d808cb6e688c9a2
+AUX scala-2.11.7-no-git.patch 919 SHA256 b7960d99d303291f6476932b1037a072247deaf067fbc6d916f033d24909244d SHA512 a83d5eef2d48baefc9ec7f0f8f5ead99d52498b8d52f4f650f465bb57e87b1a2ee0eeeabd4f47f6e8405e927a7880124c5c7dbe309bff4375aea3c3d6875c844 WHIRLPOOL 0d20578805e572236457bcce29f3098082170b732cf6afeb2aa3b990eccd757501934f88561b64c864fa057d1d367a62ed4f0ca18460ff8b64fa380cea1c3742
+AUX scala-2.11.8-no-git.patch 919 SHA256 0f6a302e157c4841d867b76bb4a732222603ed274d5df2e2a286388360bfbee5 SHA512 e6ccbd8ce6ee719e52ed16ef0d344223e93476277f7a131abf8841e82e9660a4fde992cace80f2a0ad5897eaee2920f9b1fbe1a2798b4c25973095018110f4b7 WHIRLPOOL 941c7cd50828e0a115cca6bdd18333473debaa0b62ec3fe6289cae08d26dead30636c4d8d31894c1184e21efd446caf6d51e8fe21fb8f4a31aed0727e61b16a2
+AUX scala-2.12.1-no-git.patch 1226 SHA256 aa7329ed90f5c5a6e8825ba8102f5663ce5896209d5078438bffedfa370aab56 SHA512 e01c99f14e07feb2f7195d1126ba055951b629633f5de6acd9a99305917e5f159d805a68a37e003abb9c96197d7570da13cb88612a384cd5cd6b4302b0825d1a WHIRLPOOL c836365aef5c725c0c96a66db2b9687c6bec54ff351770dc86dc03f52b087a5df37fedf218006a44864e66f51a2a093d6e8507789b3ed768d871a0456fe56eae
+AUX scala-2.12.1-runner-script.patch 1367 SHA256 60d880faaec45c945e594ed2bccf16ba80a194d4b463bcee7453e4ee451ebec4 SHA512 3eb730457f6100b0117c0c7a70d95421fa0a911780d5da02af38abc4ae8747939f9827593695c302914ee6362a0d3d548e54400e807ca450f25158f484fcb3b6 WHIRLPOOL bcc08e1f0106b577ccd2b3dc7efe614b94a6e4ae3ffef200e60e0aa0cae7ecfdf012ff5b207a367aef6085739b393c14a60256d7beae57d6ab037b30406c7639
+AUX scala-2.12.2-no-git.patch 1059 SHA256 0798fc1cb547a7918a6db03d38ba0eef655563c76902e73755932e4b69cb0b8c SHA512 db6515c0f0282e236ad1600b33059e382e2a35617b2f116b86895c4c439430ee7227274ca34c843a1f6a1de932b4e3db7e03b6da060cbff1f0895dd7000f16b2 WHIRLPOOL 6f01a69205382017ffd09f196957131e2c90c32715eca4f5432a516f65ad651f0eb3db1835c420e34d0f78063aa1b1e3363ac14371327898ccf450c9e443e745
+AUX scala-2.9.2-java7.patch 9250 SHA256 a51edce6c6c96549559792faaf201245b5b6724d66269bca44e64e0bb912b87c SHA512 5e038663166e5702bedc9c93aa4b6461c5efefac1a5896c231510864e646c04998a818854a06a476ca98517e67b30db619b24a45031adda6230b1446fc461d13 WHIRLPOOL c1f14d93dcfa88c77b0b057c84f4072bf4737796609ca553cbda001a56f52ca07022394ca41716d80d59174be09cdd88da2b3eb726c00c6c35d91c9cffaed233
+DIST annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST fjbg.jar 130039 SHA256 a5acb5ca309b764a72e436fc770103277f4151233519b9ce7074f8000d259d6b SHA512 68f0bf76337fb243b9ca901eab985cfeb897d79d07ba81aaae516c890bbfb600a370c1e1df505275a12c723212fd88b5a03e97c73013d912be1be860d214e5ea WHIRLPOOL c4390956a00fad5a16018d5d4747e8585ba707339738b3e0c304a7093c4c8fd11111349377951916cee78c312735e823ee5e4ced19a1f568598e8fd553952426
+DIST forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST jline.jar 164623 SHA256 813f2bc34a096cc7780c6946acf401c82e739cf9d5359edf414f74662137d3b1 SHA512 2d97f0d1bc1df67423f54102f8b360a6dba0bfac67ba12673e781d9461485a6124cf985cbab96283af7b366a8fb53e526aa667ccec466aae7002d5030f2e1369 WHIRLPOOL a7c848acf502c2247d0a9c83fa45295e5ede7487ac2129e50d4bd05a0271050b274cd25af24fb4215dc20283ca7df750618b31fea8973fffa125a3fb37f33bf3
+DIST jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST msil.jar 298973 SHA256 5b9e6dc2f4dd79644a1480b7cb4db053d73fc5d0e41015b95f15ec4dacf2da0a SHA512 1e9be7bfea639cffd638c78b4368f599753e8bd4df8f9b3c192b72c2860d6f96002c94fcf751e9c6cdacfead1ae3bd851d61395ce83c49d66f801284bd2046dd WHIRLPOOL 3828f08bb47f038d3f6e52c0d077cdecd06195de3d29b326833f47a6713bbab644ddcd20b8d39aa814d25637dae31adc1d0f0aec6f489857d7b115aeab29a301
+DIST nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST plugins.jar 4181 SHA256 13313e0c3a42bb401377ab4f228e3c81db482c8f33295c6a1d021fc3c9727871 SHA512 d44427df9acf4611acb492b6268b65f63a8be2d47ef29598bf5d242f702af57f0ee2eff52378b8371755d5ddf58c79d48b18a6a056ee9fee5091e478ce5ec1a2 WHIRLPOOL b2e846b5965ea7f04844b4c49e3fcc2f5b3f0e31669a662557bd36a113dd94372bae55d46f1986e03099c6f51217bf10986e5e265874854ba479c36d041a1e41
+DIST push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.10.2-gentoo-binary.tar.bz2 42071067 SHA256 0e47e9585c67971f319782fe81214fd7babfbc8cfb28108f5dc3f12d16bb0f35 SHA512 e207c4b12f5c89e24d48c37a3342280bf93447c053ae2bc58a5b389439633d332eaa444119d73967e23bedd36b0f4349d6d075469e7cefa1d2f7dce32dfb6af7 WHIRLPOOL 52bdd96fc742904bc222a3944adf33898b3a07b28868ee598852554b00f677294522332eecd293fb8c62dc6800a0264ddb9167b36054a37040323277de5d884a
+DIST scala-2.10.2-maven-deps.tar.gz 12324758 SHA256 0880b9f2ab27e2e5afa315bcfd84a5fa7348f0b0d6e4184ad2793862df939676 SHA512 4ddf0b76724609940fe732335b3b34ea41405bbf39d91312b4db3b79d5682c0ef98020b7e0dabf098acc94d782300e47c7b80ae1f6f1b82f4358de859086575f WHIRLPOOL 8d13459a2026b9e304d649aa93abab200648ab3f54d1b870572d2a0a4526b7fc7c5febd2e2e65d7d032404036a8db2d2cb46a88cd41474735e569008359e13b4
+DIST scala-2.10.2.tar.gz 5526015 SHA256 c0b7e41924a2673e8cdf8af364e5c3249f7c52a5f931693301493ed71cc7ef32 SHA512 61be047c50f5919c1ba3e4f665a1a1f4c6f7fcf5061f94816e385b97fdec139e381cc2a3df720b3679c3056cbc5baa6d4f8cf1e53923c5b5cad37f522557dc85 WHIRLPOOL 8bf09843bc824941ae4be7875515c4c03f68fa865f1b56180bedef0c9b8e8328badc091d4eff655df3cf7729a39f117e9f129f4b7eb388cb27361d8bc611857f
+DIST scala-2.10.3-gentoo-binary.tar.bz2 45352632 SHA256 f9ecad6bf7c59496233ad080c9b11cd75ca28e324e368c0551665837cc10e2d6 SHA512 1e61748e68d32c88cc1e6812514a37f15894220d0256237bf82897dfc9f5f0b2d0d9c4f6536e49daf62f72113d4e43635d2abd93d848ab828a0e67e2a5c6ef68 WHIRLPOOL 9f2717d926622a0cf4bf61aa140dca6d1c8a95dc397b16b32e00ce2979b8bd2347608ce4eb3a30e1721b852b50a85358f564e8718994a2957914efd06420a37a
+DIST scala-2.10.3-maven-deps-2.tar.gz 6614692 SHA256 32e8d5a71dcf6432bb4554a0f346561eea621c567d154a7820d7b4f532a6b194 SHA512 50010e79656b60fb28501f255634e28ba4fb3a65c7790fc5db4651460921310e0e469e08cad38295afe9a58a39c8af7bb6c0c2e800096fbcdd3055534f17ebb4 WHIRLPOOL a9866879f25bc3d765f2905d6321298d71abcb98b7f3d65f951ac2dcc4cfa0e7dbec4872fe928049239e251a91fd637d3cfad2782d0dc59d215bf0d295407a4c
+DIST scala-2.10.3-maven-deps.tar.gz 5715856 SHA256 1fdabc22fdef4ddd7ed31dbedf97e216cdd11d27d702475f30d0b459da8f22f8 SHA512 c05555d07777e0c325aadfcec1cd10381cdc95945acc262925992918fcc321e51a20454dd19b4111b1fdcc14bd32e34ba5fe853e45e9b4467771186242a85335 WHIRLPOOL 11773fc2862fa0a27b4ad204dafd4723b478552f1557180b316932edc3657d3e68b1f8ce12a9bfbedf55598c656a196850586fbe7998fb2a28f4fd58cf5d1c55
+DIST scala-2.10.3.tar.gz 5570015 SHA256 4cd9c67d73fb98942b78982bcfc8f4da8522e3fb3dc3210dfb7f60f749389d29 SHA512 b78d8d6a759b3de8010093dfc4104a86b0084fc466bd739ea12a7b015aef07a09e6793c4d0bb146904faf1a0cf6f60e6ea68843aef6616b7dc682a3f3e89e528 WHIRLPOOL 41caa0c54363c116c023f60699fe9074abea646acd4dcaa24336a8925d3f04ef1443a4ed397c90e966374d99097663315c47bc9088725276c91986bd4a99f45a
+DIST scala-2.10.4-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.10.4-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.10.4-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.10.4-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.10.4-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.10.4-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.10.4-fjbg.jar 130039 SHA256 a5acb5ca309b764a72e436fc770103277f4151233519b9ce7074f8000d259d6b SHA512 68f0bf76337fb243b9ca901eab985cfeb897d79d07ba81aaae516c890bbfb600a370c1e1df505275a12c723212fd88b5a03e97c73013d912be1be860d214e5ea WHIRLPOOL c4390956a00fad5a16018d5d4747e8585ba707339738b3e0c304a7093c4c8fd11111349377951916cee78c312735e823ee5e4ced19a1f568598e8fd553952426
+DIST scala-2.10.4-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.10.4-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.10.4-gentoo-binary.tar.bz2 59680465 SHA256 4225042bfe9c066c05c4d70383c27f48994f0e9733c5b3c4d4b970fe3e5f8c62 SHA512 ab4199652395215557bcb1d424227604e86bcd2278d556ca9f9130a534f70be39a74a36dfbeacf5125fd6ad9044770bb8c0cf068cca46d100c7e880df1c0d479 WHIRLPOOL 43a99bac419e2d23f01159becc546c633a25137eee033c2057486652ecfa6f98151f2fd60fa73e8e87bbece562c837da2340b3957037fa23c13bfeb1af28e91d
+DIST scala-2.10.4-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.10.4-jline.jar 164623 SHA256 813f2bc34a096cc7780c6946acf401c82e739cf9d5359edf414f74662137d3b1 SHA512 2d97f0d1bc1df67423f54102f8b360a6dba0bfac67ba12673e781d9461485a6124cf985cbab96283af7b366a8fb53e526aa667ccec466aae7002d5030f2e1369 WHIRLPOOL a7c848acf502c2247d0a9c83fa45295e5ede7487ac2129e50d4bd05a0271050b274cd25af24fb4215dc20283ca7df750618b31fea8973fffa125a3fb37f33bf3
+DIST scala-2.10.4-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.10.4-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.10.4-maven-deps.tar.gz 35071635 SHA256 906e515af637444bcf31110ff56ac34278dc433f6438a97f3f3e3fa080130cef SHA512 724eea3b041b78975c27578bc285dedb0b472801c34406496adfaaf58d4a058eeff17ad19377e3a092844a23ae0a5a9aeb9787689109ee2cc4df33e7f2f049b4 WHIRLPOOL 5a85030f77c88b74a457da0b56577a563a1385f26d08114032681923005cc16dd59f77295aadac4dd1b5d1c83098539600a7857a59bb5da48096595d733d3993
+DIST scala-2.10.4-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.10.4-msil.jar 298973 SHA256 5b9e6dc2f4dd79644a1480b7cb4db053d73fc5d0e41015b95f15ec4dacf2da0a SHA512 1e9be7bfea639cffd638c78b4368f599753e8bd4df8f9b3c192b72c2860d6f96002c94fcf751e9c6cdacfead1ae3bd851d61395ce83c49d66f801284bd2046dd WHIRLPOOL 3828f08bb47f038d3f6e52c0d077cdecd06195de3d29b326833f47a6713bbab644ddcd20b8d39aa814d25637dae31adc1d0f0aec6f489857d7b115aeab29a301
+DIST scala-2.10.4-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.10.4-plugins.jar 4179 SHA256 929863f42c87921e203665006e8b3dd9a1cce7733c9441ab9b82c891729b8372 SHA512 d55b72473f124443673693f5df8f7692558d87e6ef352d649eda5a706297fe7a9d47580b1d80db5119529cce5467e0aa211bc6c56c236de26bd51de36963e5cb WHIRLPOOL 7ce16b8db4eee26716342e682fa4d0e968c18c941a75efd87d102df35b38f9e9d40a51e3ae16fa55c954842e69a1f2a19e02a21643b5e36b866f70560cfb36e2
+DIST scala-2.10.4-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.10.4-scala-compiler-src.jar 2462738 SHA256 ca43298237583dfd362ab4d773ef0f791a075d9187ecf30cc8ee4f4b7ae12e76 SHA512 a71eab8ada2fd23aa1408577dc3bde28847484643618a752ab68bbe5c8a4ef19ad852ace6f44c8e66668e6b6098de8b0cb3eb8d0c4674ed332562463b43a8a38 WHIRLPOOL 8cc711357fe2b393c1e28a3ebd0249fb633c1135c6c4d8819c6ab14081c9fbbb4c1e0a6b84eb9a5711c9874814e54676905da90a1d8d6c5e28213e189bb0f37b
+DIST scala-2.10.4-scala-compiler.jar 15095501 SHA256 dbad9d1e0e300c62945d8d8aa21ebfa614e1f7b1c8378550b0314aa006be21c0 SHA512 98588884da2a01af5df9898f5d3055cbf5fa04af7d5f87bd6076dbfca329a7f2fa5645fa87cc14720204e00dc540971f8c44b2233fd4706db0df00ce8978349f WHIRLPOOL 311db7bc73ac1584403b12ea8c712a4b6a0450c502328ac26d7d9e051db4f5dd185dfc1c7c8304d32991c374fc2ed3c89cf8cfd61759f9049e1b5e55f4a7c54c
+DIST scala-2.10.4-scala-library-src.jar 1378653 SHA256 4a347825a0856a14803ec2c9cc205e192f19f15e417d334f4d22276d898d0dfd SHA512 06b0944c53b145c71239ec5aa90a78fbdee8130508f02d6cecd4c6c5e26878f19751471ba5d54c80e8d1380645787512c6e7566471675f0c9e3f0c29e38b4ff7 WHIRLPOOL 27fcbc2e52d52b30a8d0f1d68caaf8fb0f201d1509609aa361aaae412f0ceb6d95e6c3c4210b60027eae1ebb406ba3bdad770a2b087145572255b452bf0028bc
+DIST scala-2.10.4-scala-library.jar 7113040 SHA256 66057366dc9c541d0fadb7f64a4e06f7c5c86a90b289d724e7db0153b7e92c2c SHA512 af8a57145c8bcac6f72abade3b21f066ae082c7ab858c3a7b0641240fb99fe24bac3c224b7b1418c47c852793cecc7e8f5838e0cf6ae2b78ee538839cebdffeb WHIRLPOOL 29cffc4e84730549ed25384411e1a9341f56d348800d1bbc04958d88071e0c36b7290969b8f9d6ea865d9c82fbb76b1727cf66b81e420950c7ad356f2bd02aea
+DIST scala-2.10.4-scala-reflect-src.jar 467879 SHA256 45846f176eba3e072282b597fbea58977e1ac08d7161571e2601a86adbff4e35 SHA512 c172be4d0ec724be4f62cbcaf848a71c99cffc706fcaa5b46fe2970088ba9a8f406d42728f64a0dfdef1cbe18e313b8be8142d68b9b3d7a592dec5e1fd7366b6 WHIRLPOOL 876bd9e3186d76d351e128cf990789459b51bca1ad6e4f51aa397d1941311ed51a1048188a4b94bd8709551c0cb3ab3985d3a1534594bb840082d0b555496d7c
+DIST scala-2.10.4-scala-reflect.jar 3307596 SHA256 910b58279250371e034859227fb5d9015297eb6bf607f9d3ec0836a822c1fff0 SHA512 466c55b8ce98e48f851c446b986388351ac4b0fb2b0cf6888d56fe2a4af1f5f3916e78f3fdea395ee18ef0a5128bc6b0d4cdcdce8f5b0f2fcc30c2bdbd41eb40 WHIRLPOOL 73a42b7b557bf29d14511f798e22f1ba8039e7c41bb165d9a4be7c66d393fa63c2836239fca56158eb2c5dd07567b1febb18d9f4f514de48e0c6ec5d155a46a2
+DIST scala-2.10.4-scalacheck.jar 763570 SHA256 96814bea5818186086473da5c657191d03145649eee0c300abec9c3380fdd418 SHA512 5383e80dbcb11cb3fba033bd6a0e8c220ec3dd6fc153062b9d44d346ff17bea014a8c7a412af85ff487a34011cdc2042191c4c4ad66ea44eb7eba139a0b358d4 WHIRLPOOL d6276010ce4d1bcc647e1d7673cc18f645ac92abf03c4aa5be03735853a33692763883fcd8e325d36b2a18cca758d6f1636294b182f247da1094c82476f36b58
+DIST scala-2.10.4-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.10.4.tar.gz 5510555 SHA256 d67ed8747bcdf5a598688d027be418790b59158c5dee5b46f51a88b067da59f3 SHA512 1d26d78d120377ba376b507ea484c245bfa289d55b6838211e8e7d2ca38fc7e6d6375e9467bad528d9d51a9eff9c766fbaf452a851e88f156295d89827514e26 WHIRLPOOL 0997c7c1489fa5438c54ffc4d44d32bdb4b6868455903448a6d9c5f9a3ee43fb1cd68ce00ecacacdaf667214cce6840054f3204647af391e48ae05dc5422ab3e
+DIST scala-2.10.6-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.10.6-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.10.6-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.10.6-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.10.6-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.10.6-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.10.6-fjbg.jar 130039 SHA256 a5acb5ca309b764a72e436fc770103277f4151233519b9ce7074f8000d259d6b SHA512 68f0bf76337fb243b9ca901eab985cfeb897d79d07ba81aaae516c890bbfb600a370c1e1df505275a12c723212fd88b5a03e97c73013d912be1be860d214e5ea WHIRLPOOL c4390956a00fad5a16018d5d4747e8585ba707339738b3e0c304a7093c4c8fd11111349377951916cee78c312735e823ee5e4ced19a1f568598e8fd553952426
+DIST scala-2.10.6-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.10.6-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.10.6-gentoo-binary.tar.bz2 59801146 SHA256 baa2a14984cb36406d777aa79a78035abb54e9b45b48fdf4adc7eb29c6ec192d SHA512 59d8d1129f74c6f1e9d5b664f8cd50209d8071da9b48be1990b288cc46038a6b420e46dc5b3ed1e60865966e6f5c82215249930f86e44208fa9b2d04742fe4c9 WHIRLPOOL aa6cd24b156f6a1d0cae635f5b7002680d998cff5ded0279adf2423760563327fef6d5cbab14c16d5bb3715382ec1cc3c2bef579b276c3bd1d456e8b44a331f3
+DIST scala-2.10.6-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.10.6-jline.jar 164623 SHA256 813f2bc34a096cc7780c6946acf401c82e739cf9d5359edf414f74662137d3b1 SHA512 2d97f0d1bc1df67423f54102f8b360a6dba0bfac67ba12673e781d9461485a6124cf985cbab96283af7b366a8fb53e526aa667ccec466aae7002d5030f2e1369 WHIRLPOOL a7c848acf502c2247d0a9c83fa45295e5ede7487ac2129e50d4bd05a0271050b274cd25af24fb4215dc20283ca7df750618b31fea8973fffa125a3fb37f33bf3
+DIST scala-2.10.6-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.10.6-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.10.6-maven-deps.tar.gz 35062417 SHA256 0405fb8251807e5d62048f9186e2f1aa8ec35bb469e5ba6179bf64ce0af10269 SHA512 7b0947ab9506308c6ef637af51eca2c3beb819d786c19c7fe0e840f6271c51d8a88a4220e1ac0f79fc492ff9d05ff9e362a3b5c185653b2fcb3ea101c937eebd WHIRLPOOL d4aeae97fdccb8a89c9e40493aca6d0dd8c3e77c711de6c5bdf234575c13d82dea830ca18e0568a89fd635ccda23cf53398dd97b6ac62feea6eb1430a5f280fb
+DIST scala-2.10.6-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.10.6-msil.jar 298973 SHA256 5b9e6dc2f4dd79644a1480b7cb4db053d73fc5d0e41015b95f15ec4dacf2da0a SHA512 1e9be7bfea639cffd638c78b4368f599753e8bd4df8f9b3c192b72c2860d6f96002c94fcf751e9c6cdacfead1ae3bd851d61395ce83c49d66f801284bd2046dd WHIRLPOOL 3828f08bb47f038d3f6e52c0d077cdecd06195de3d29b326833f47a6713bbab644ddcd20b8d39aa814d25637dae31adc1d0f0aec6f489857d7b115aeab29a301
+DIST scala-2.10.6-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.10.6-plugins.jar 4181 SHA256 13313e0c3a42bb401377ab4f228e3c81db482c8f33295c6a1d021fc3c9727871 SHA512 d44427df9acf4611acb492b6268b65f63a8be2d47ef29598bf5d242f702af57f0ee2eff52378b8371755d5ddf58c79d48b18a6a056ee9fee5091e478ce5ec1a2 WHIRLPOOL b2e846b5965ea7f04844b4c49e3fcc2f5b3f0e31669a662557bd36a113dd94372bae55d46f1986e03099c6f51217bf10986e5e265874854ba479c36d041a1e41
+DIST scala-2.10.6-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.10.6-scala-compiler-src.jar 2462738 SHA256 ca43298237583dfd362ab4d773ef0f791a075d9187ecf30cc8ee4f4b7ae12e76 SHA512 a71eab8ada2fd23aa1408577dc3bde28847484643618a752ab68bbe5c8a4ef19ad852ace6f44c8e66668e6b6098de8b0cb3eb8d0c4674ed332562463b43a8a38 WHIRLPOOL 8cc711357fe2b393c1e28a3ebd0249fb633c1135c6c4d8819c6ab14081c9fbbb4c1e0a6b84eb9a5711c9874814e54676905da90a1d8d6c5e28213e189bb0f37b
+DIST scala-2.10.6-scala-compiler.jar 15095501 SHA256 dbad9d1e0e300c62945d8d8aa21ebfa614e1f7b1c8378550b0314aa006be21c0 SHA512 98588884da2a01af5df9898f5d3055cbf5fa04af7d5f87bd6076dbfca329a7f2fa5645fa87cc14720204e00dc540971f8c44b2233fd4706db0df00ce8978349f WHIRLPOOL 311db7bc73ac1584403b12ea8c712a4b6a0450c502328ac26d7d9e051db4f5dd185dfc1c7c8304d32991c374fc2ed3c89cf8cfd61759f9049e1b5e55f4a7c54c
+DIST scala-2.10.6-scala-library-src.jar 1378653 SHA256 4a347825a0856a14803ec2c9cc205e192f19f15e417d334f4d22276d898d0dfd SHA512 06b0944c53b145c71239ec5aa90a78fbdee8130508f02d6cecd4c6c5e26878f19751471ba5d54c80e8d1380645787512c6e7566471675f0c9e3f0c29e38b4ff7 WHIRLPOOL 27fcbc2e52d52b30a8d0f1d68caaf8fb0f201d1509609aa361aaae412f0ceb6d95e6c3c4210b60027eae1ebb406ba3bdad770a2b087145572255b452bf0028bc
+DIST scala-2.10.6-scala-library.jar 7113040 SHA256 66057366dc9c541d0fadb7f64a4e06f7c5c86a90b289d724e7db0153b7e92c2c SHA512 af8a57145c8bcac6f72abade3b21f066ae082c7ab858c3a7b0641240fb99fe24bac3c224b7b1418c47c852793cecc7e8f5838e0cf6ae2b78ee538839cebdffeb WHIRLPOOL 29cffc4e84730549ed25384411e1a9341f56d348800d1bbc04958d88071e0c36b7290969b8f9d6ea865d9c82fbb76b1727cf66b81e420950c7ad356f2bd02aea
+DIST scala-2.10.6-scala-reflect-src.jar 467879 SHA256 45846f176eba3e072282b597fbea58977e1ac08d7161571e2601a86adbff4e35 SHA512 c172be4d0ec724be4f62cbcaf848a71c99cffc706fcaa5b46fe2970088ba9a8f406d42728f64a0dfdef1cbe18e313b8be8142d68b9b3d7a592dec5e1fd7366b6 WHIRLPOOL 876bd9e3186d76d351e128cf990789459b51bca1ad6e4f51aa397d1941311ed51a1048188a4b94bd8709551c0cb3ab3985d3a1534594bb840082d0b555496d7c
+DIST scala-2.10.6-scala-reflect.jar 3307596 SHA256 910b58279250371e034859227fb5d9015297eb6bf607f9d3ec0836a822c1fff0 SHA512 466c55b8ce98e48f851c446b986388351ac4b0fb2b0cf6888d56fe2a4af1f5f3916e78f3fdea395ee18ef0a5128bc6b0d4cdcdce8f5b0f2fcc30c2bdbd41eb40 WHIRLPOOL 73a42b7b557bf29d14511f798e22f1ba8039e7c41bb165d9a4be7c66d393fa63c2836239fca56158eb2c5dd07567b1febb18d9f4f514de48e0c6ec5d155a46a2
+DIST scala-2.10.6-scalacheck.jar 763570 SHA256 96814bea5818186086473da5c657191d03145649eee0c300abec9c3380fdd418 SHA512 5383e80dbcb11cb3fba033bd6a0e8c220ec3dd6fc153062b9d44d346ff17bea014a8c7a412af85ff487a34011cdc2042191c4c4ad66ea44eb7eba139a0b358d4 WHIRLPOOL d6276010ce4d1bcc647e1d7673cc18f645ac92abf03c4aa5be03735853a33692763883fcd8e325d36b2a18cca758d6f1636294b182f247da1094c82476f36b58
+DIST scala-2.10.6-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.10.6.tar.gz 5527120 SHA256 06d7467ff628ebac615c5e60af155e0b4cbbf4c31d10c03a45e9615d5b1e0420 SHA512 d993ebfee84c4e4c220e15059992d8cb3807baff8df99535b5bd20f54d29ddd1f701bbf20ed286a96f08554591ffbe0d93d514513456bd32659c3ee9b15f343b WHIRLPOOL d206f0ede824c26b1d4d1f6447b63b9fbb95acea37e1911a49b77a2c7ff944330ad1e6df508a6e0642b6009f0a2da04c9d86dacf3aca4856bb75c2616f7733cd
+DIST scala-2.11.1-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.11.1-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.11.1-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.11.1-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.11.1-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.11.1-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.11.1-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.11.1-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.11.1-gentoo-binary.tar.bz2 29582640 SHA256 d8238e2be80b1f95c488909b81aa9614ffd03ade9145e67e3fe0260fa4e2df93 SHA512 c03b92a15ee080a7049ffa8502d73caff6495f30bbbc0cee7975530cd15c767c4b1c4e189aede0a67bd575c0be2de5c19e907a85aee0b8cf9f76fa41ad45e8d8 WHIRLPOOL 11b4c94bc11d2f766d5198a54e687508a2587486608aadb3b84d0e5ebe7cc5c912b95290ef5b5d78c074093e2f20bb87b74d3365cd10322ff89e28b0a67482ed
+DIST scala-2.11.1-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.11.1-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.11.1-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.11.1-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.11.1-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.11.1-maven-deps.tar.gz 77191352 SHA256 7d0690ae465806fa01249cf4b04cd75485593db68c5751d681daadd4f29b44e9 SHA512 2e25beaaa669001aad0c3365a1ade7715ce28cbeb7cee6b082cde14f572740ac9950c8c94eb0b8f5ac2def37228e34d707087b8e822ed3aafc03bce38923d6dc WHIRLPOOL 7d409c86b201a3edc14201e0c458e9e23d4a3f0c0139e6aec0ca81bed67cf49c64a625fbd2f8a1d79778336c4f1f372f1029cc99d2b871302f8be120817fde9b
+DIST scala-2.11.1-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.11.1-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.11.1-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.11.1-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.11.1.tar.gz 5633076 SHA256 868a009c89a331ec05914faa204f865d09f2b7b35eabdb41e7f43e8734e0abf5 SHA512 bde7a8fae9fa570df392a70aa06f901bc4987703fadf1e7ad9f090f3b3c9a2ff1bbe055a401b0d851193b5ddcd8b0536c4916f79ae4c63b74c31695de6e651b2 WHIRLPOOL 4f153b829efe7e3435bab5fca27a0e52c94aa8f50f2078cee082575bb8f7677b4e0a70c49a92060c3509cc009f3586ff592c2b332a4c78bb57bcb9973328e6d1
+DIST scala-2.11.11-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.11.11-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.11.11-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.11.11-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.11.11-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.11.11-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.11.11-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.11.11-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.11.11-gentoo-binary.tar.bz2 31842222 SHA256 fdd72db43e12c60cf2174d57235442ef91dadeb1256628fc3b571ad7c20d933c SHA512 0325dad506d71397dff36d741834f57267b07d1f5f65f8e5e21124754c0dc73ec4613cbb48f6c11383ab8c277f1bea1af5338f1af74e5c5d19ed06ca5f4c6829 WHIRLPOOL 2ef01bd9856eb2b56e8f148a47f46f0dcc61ac9f5cc34294e87797cf5a2cd9d917301baedaf561c4ebf9832f8b8da2b9d58a1a63b10566ea930aaf46546df0c5
+DIST scala-2.11.11-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.11.11-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.11.11-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.11.11-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.11.11-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.11.11-maven-deps.tar.gz 94530315 SHA256 544769138ab3a99c302f4f59d466bbb00f3c2da32dcbc285cb0c35efc5ba6a5a SHA512 b716d5d2a79960bae47dbb96a350027e908b9d5b62a0806e6b6f9905374f3e9cbb06c8865a3a2aa96399b4fc2fa1db949729cbb560e70af31225be151375f1ff WHIRLPOOL 0d97cfdd437297a41fe4c4991b081dff9aa21576cd87d350cee52ad1bb22702ec4c3b4ac396739b523012d5441496a037b6334a49608335f25d2bfb830e669c8
+DIST scala-2.11.11-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.11.11-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.11.11-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.11.11-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.11.11.tar.gz 6556573 SHA256 f97bccddbc53fc4da027fda3d2e6ad3d7776ec7ce56adad0ddb505266e1689e1 SHA512 c4e8ca544ea86c3e381a7b3d9120b13574cab92d73ff56aa10955afffe64c62ea11cd44abddd75984bc0ac58e8257b00357618cf9377e6690351db269657608c WHIRLPOOL 4cad89bd5e997363435b6a5f6baac6b30baff6f0c2db23f008541371e265b3074ede91384566c9ff5d742c839a15c9f8a6484c37d8161db1fc3fecc0ef78fbbb
+DIST scala-2.11.2-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.11.2-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.11.2-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.11.2-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.11.2-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.11.2-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.11.2-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.11.2-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.11.2-gentoo-binary.tar.bz2 28586286 SHA256 71938d4d07ed5f44164330b37de31052fda9e728d60fb450fd57f41f9184c38d SHA512 39a859394f1918daf0ad91d26a56554e591906a5b4d2385060fb08d8799a4efe95bd23e0f98502297ae0f2b16a8a7deaf583d68c5478fefa1f84d5677ca09226 WHIRLPOOL 9b4670b51ab0b475e317965298f1ee7f2ec411ae0a34faf287ffcf7b8119d962f800faa82628ea457c109e515f92edea991641177e6a7b46f7c9101cabc476f7
+DIST scala-2.11.2-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.11.2-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.11.2-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.11.2-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.11.2-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.11.2-maven-deps.tar.gz 84139566 SHA256 9006434636902fdd9cddbec38f0d81e017191998ee1eb1ddfb1792db1cbabc24 SHA512 54b888af964a5e2731fad20481253150d60859a5243c72873e09799dac665f315e1449d89f86cb311582085d34d7c1c661dee41f64084efb943feef8d4036602 WHIRLPOOL 352a93e287f2e9f9f1e2e55024f29541f4d82de5e9406c40362324c633e3a5b26257c801a0e37f77a56f6487eb2ac3478112389402ac762fb08af1f03dcbe2d3
+DIST scala-2.11.2-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.11.2-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.11.2-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.11.2-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.11.2.tar.gz 5679601 SHA256 a99201ce1da62976f2442fdb3570235cae329bad5c772868c094edfd5c8dc64d SHA512 c3ca34fbb2733295d9b28089ca136461042978e86e00d86eb2a64c8a8fa207ec99aa33238eda21fe48bcba9e21caeec0fdaa63ceb263dcd9ccef936e23a95c7f WHIRLPOOL ebc9e2c39f6172447a5a36f62063d86c1be6a2e35fea13152ef7dd3d486ec1f05518af6fa933fd6a1f9f7f89440800ab1f25645d26357a681fa675268cee6f3f
+DIST scala-2.11.4-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.11.4-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.11.4-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.11.4-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.11.4-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.11.4-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.11.4-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.11.4-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.11.4-gentoo-binary.tar.bz2 28642636 SHA256 92c72e0b505aa8a21b0ad07d4789310892ec377a5deba48d407a75edd3ac788a SHA512 0923f4d7a184fa04239066a4eee10bc989de637c7d5926f0bee8620ef1b46edcc5fff999a23d6754b809c03996d61ce0e4ade0dd046700a20fd1b52c53ca074a WHIRLPOOL c08385d81b7efd4e880564aa6d49641337de56db44bea549dd0b1aee162d6e5e651c0d7772a289600b22f3abdc7b6941d41f9773dc6c90e01e98fa314f69348b
+DIST scala-2.11.4-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.11.4-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.11.4-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.11.4-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.11.4-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.11.4-maven-deps.tar.gz 89732002 SHA256 4b0d6fdc6bb9cac88c7f4fc10f70e24e36473e748f2ba9499d0567676f535852 SHA512 d1f99158337789513eac7be25ee3f19272c3975babfe49c2f7876b2d51082bfa1c5bd4b4bd1aef0cac0c6701a9e62b96c15c593c94f04e3226f4aa34cd114052 WHIRLPOOL bfe8c4d6dd7b74d873c1a754fd881672df462217192223fa7f489e4b325b8b6f00758f057a379a9d786a1e812855478103bd51305e4faa34aaaa03b0b5f7f1a0
+DIST scala-2.11.4-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.11.4-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.11.4-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.11.4-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.11.4.tar.gz 5789309 SHA256 3c9af3b0cf7528f2ceacb316c3e96eee8c63d2e635a8143c8dbb8d5206a5a834 SHA512 e7646ed8d40eca6d91757d257e9301836bdc6676dfe5bbb4b059af7a08496fbc99d243f3f087e507d026a9c41e2452ecf72ea5e4e1babbb7119065d8bc710056 WHIRLPOOL ab8f272054a6d2776e4857f705d4de7ffded979e1628e7a290d28bd3cb8451aa72defc53e31e1eaa7e72f55b0f72fd5469226d1c35cb583b6bc2dd7fb0ff2e84
+DIST scala-2.11.6-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.11.6-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.11.6-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.11.6-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.11.6-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.11.6-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.11.6-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.11.6-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.11.6-gentoo-binary.tar.bz2 29875070 SHA256 a334a9ba5d6bb2ffceec5e92cad18a46725d3f2ad07c6137145e1b660cf8466f SHA512 fcdb8c44221f9a7e8260b16b0d069f5ffa45f8ce404f0a49b2ba76349cef7e7e5a0aa3bd8a3f4eecf8a1af5d2037c9d6582cdde38e1e8218f09196d0561d5226 WHIRLPOOL 2e846c52cbba1890a881d65e704de949a67cd3ed00bbfe1b7554ec73dd8e6896d97a21a0f9438096335de7939cfb29feed60d74db00c20c40ab75450d1b4bd47
+DIST scala-2.11.6-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.11.6-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.11.6-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.11.6-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.11.6-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.11.6-maven-deps.tar.gz 87558817 SHA256 864e3c0833dddaed75dd023de8f31225b36dc607765c50cae64d3b7fd4e3098f SHA512 ad271b4efbe137aa5bbc22bc138719fdd9f89119113dcb35f14bc45cea3382cb33c35bb973fca0d2607c6bb89abbfe69bb4ab1f35f65ad6b7b9a67b7dba63523 WHIRLPOOL 6751aeafa9d02e77291bf05bb0a0d78702ebe3ecfb39399a571bf2f799769b2523b192b6efdb1e07b76f793fb13553e1c50ee2df1b5b59c7cea6926b46d3268b
+DIST scala-2.11.6-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.11.6-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.11.6-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.11.6-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.11.6.tar.gz 5901947 SHA256 0ccf26576dacd2792af09a146a43a15b25201d47891f83c3dc8f9a04c79e88b1 SHA512 57e2a06c8f66e9e51cbfc998a90931a6bd6ab65b574077c8a2541b300d1c86c18bc48bf708060745a71517ae56fa8ad4032c254b3537cd66bc6fe4c328cb4a57 WHIRLPOOL 25d66716880c07cd03de1f1a2278140722268d7de499f1dbe33fec70f787f65a5f92496ba5d5115cee84c6870af0f4dc884270077a98430e7867b4ca57b899af
+DIST scala-2.11.7-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.11.7-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.11.7-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.11.7-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.11.7-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.11.7-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.11.7-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.11.7-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.11.7-gentoo-binary.tar.bz2 31603236 SHA256 6a9d55a0e43483421550e1dd0fb939b4105340eca4e5ae196d17fb175cc45456 SHA512 13ea3ebe69fea9e450587494ac0de20f28477442e10dae0306b13cc9dcdf375f897a3988a0dca6db102a6ba2744debb8552cd6704150e049bf6f15cc1c00899c WHIRLPOOL 72fbf5afb24fc879ac3a93bd3c5ef1f321b0e16166eef72eff65844a088b9ab421b01906b78f064c05649daf25813d7e2023f6f297bfb27b3335f3108474d6b7
+DIST scala-2.11.7-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.11.7-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.11.7-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.11.7-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.11.7-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.11.7-maven-deps.tar.gz 88535058 SHA256 57fbc3abab609b5129f51058f527e7c8211b4cc062d7d54442ddf0e4c87f0382 SHA512 745b981b80fddca1768c1eb4579b60888b82e1d1e5c4f3b48f4e5815c2f45f8bc7e2e2cae842dfe6d5187f3987b39e3fcd3c0d0e42173931822c6fb95edcfb5c WHIRLPOOL 26b9e58a871f0de483dfb6ef73d60447df8623da3268556f35ba6df73c6f51b835158ea5697bed459df3d78b824dccf07d30bb48d4bfd5ba9167484aeacd6791
+DIST scala-2.11.7-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.11.7-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.11.7-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.11.7-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.11.7.tar.gz 6443003 SHA256 1679ee604bc4e881b0d325e164c39c02dcfa711d53cd3115f5a6c9676c5915ef SHA512 f74614a303bdc28068b212e9fe4aa499db4a5a9ff87bf1af93d6b3598784edd3f2e37cedbdbc20c9aa507965845b4b511bfc786ff82f31dbc3365af796062611 WHIRLPOOL d7ebd8b9a6c34d90d7b7dd62d79406ff2776ed65037e93cd20c0ce2f954e3380896b67ee88813abe322303ebb7894070c68b1045ce71923ae26e876f1fa57a88
+DIST scala-2.11.8-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.11.8-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.11.8-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.11.8-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.11.8-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.11.8-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.11.8-forkjoin.jar 60850 SHA256 4007ca649f037ed5ecc87c74529f499b75ed1a0f3f78e8f82cd97a71f5d2d5c7 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f WHIRLPOOL 9d561c9872c140e266efefb1c1afe76a2754eda32357718d048ff0896d6a2d14f168e1e2eddfcb37bbd0ac07fb7a7079b63e0f512946a7e30ff62883ee8bfd84
+DIST scala-2.11.8-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.11.8-gentoo-binary.tar.bz2 31834867 SHA256 537fb52c1b6774da603a18ca3e6a9f95f694e432f63dedcc84e3ea3e318022fd SHA512 297345128685b53d011ee67a5c89900748714a6f63d590c567cedaf85e7e27bcea5b9313707f35290a17b831ef521772907ecb41ce1d3a3b0086b24ecd431266 WHIRLPOOL 6fa0df19036f77a36bde1ad21b48c5d50b33943b328ab463c66af6e1e07c820c6fb5e2acde2f704d33b0bc26e5a4de93a975f42a1d8deadb51c6b331bd81441d
+DIST scala-2.11.8-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.11.8-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.11.8-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.11.8-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.11.8-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.11.8-maven-deps.tar.gz 89482897 SHA256 36ee9ce8dd111d8dae2cd94b208510abb3db5cb0a1046c1c1eb4decb5516d24e SHA512 22f77f4d28c68fb81e5152404f6e3ff2e2b6e05a19e4d63ca79c6736e158550f6490ff7e7fe42aa557d8f28f35d2f1cbd54686559a25aee261f328caf5f98aa0 WHIRLPOOL 29b471969209c7ad1d777bf896861e6a08901f105b723edb2782b7e0cb083d63853ae32f9b23c0a872e76a06de5ab8810e306c487d5bf5ed501679b8fd1f289c
+DIST scala-2.11.8-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.11.8-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.11.8-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.11.8-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.11.8.tar.gz 6505558 SHA256 4f11273b4b3c771019253b2c09102245d063a7abeb65c7b1c4519bd57605edcf SHA512 f084eb88a78b2c74bad38086bcbcac7fdc98640059188c266f24f8f7b58e74a7b29e3b5fe52816bcad5a132d873863b0307679b5b9e67264ac2c7cb5b696a4e0 WHIRLPOOL 31f0f54a538f4723af43a8b013c38f3e244aa4d25a6435a9ec522550560caef94ccff4b8367f72b2835a9482b6322fe77895ccb56cf3b475ef824ce770d83779
+DIST scala-2.12.1-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.12.1-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.12.1-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.12.1-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.12.1-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.12.1-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.12.1-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.12.1-gentoo-binary.tar.xz 77449456 SHA256 8748c35b70551aef7f82331c669096f23cf9e597df7bbaa05bfe09b39c18eb50 SHA512 46744a330d5fe5fd359a6c7a87bd79e0141c6f84f9ce19163ac8658e8947ca682c6e253e8f561e9a4ac077e0d308bc0aa65586026bc5986b1682ae0151d91bc9 WHIRLPOOL 6bba602a5469f7b57f533485404ddb33e4830ac14526b9f0c811abe3f16516805f10886f091be47c4ce25ca440b826ceaf97d5501f2732ec151b85dad3d51c49
+DIST scala-2.12.1-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.12.1-ivy2-deps.tar.xz 62890720 SHA256 67acf8f5eaffd28c0cd8a4b20d6469a0e8b4815f2740c7e7e09b1dfe8d2de469 SHA512 f8d88e88e53d793e0b89a57ad19598ee02eb6322e2e1f9397a5d4b52ab2929c009d4aa84366a8a9dec864cb0c61f2316c16826190b06322539fa29ddef2b475d WHIRLPOOL 0a2cef083a99b6467f7fe6804eeda814f02ff92dc8cdca62d482ad73c89d454469a323ba8ff0b351a6273213f44582a7aefe44c2c0be523b445a16eccdb4c4ab
+DIST scala-2.12.1-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.12.1-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.12.1-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.12.1-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.12.1-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.12.1-sbt-deps.tar.xz 34840036 SHA256 ad798fcacf2f0111e992c39c2758de2f60893d6d0f8d31cb5899e427694a7ccc SHA512 818168cccf57bcd3afb35583354eae736f551e11265427f3a62f84376659ea1b2bf892ad8c2be27b1a570b7b0f8f8f106b5d45c747fac6c776826bb2a1ac72b9 WHIRLPOOL 2ed5e83cb8fd35a33c270a01d70d567f1fdcccf9a542dc5c55d3d7fecdfd8fe4b6f387315a5c536b71b0f1e7849f0a1f4ac980963f86efca811a4161a9063ab5
+DIST scala-2.12.1-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.12.1.tar.gz 6280352 SHA256 edff94803a632139c132d23b103e0482317d3ecf1c745721501365b28eb02c90 SHA512 e62755c5d5aabbdf5ae5dc57d4b8b2152199b1066a003787e8e1e9da261d4b3ab4f53106dafaf68f62031df1dd41626db55b5de1cc3a504f6c44ab271c58aff0 WHIRLPOOL df53373b4125b2fb8d456e7a9a43a0ceed7c6bd177dcc58583d38fe6f26daccf4b083b461c42ab247b16082237e060f79831160c5f03220f5c1a921f460cf8b5
+DIST scala-2.12.2-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.12.2-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.12.2-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.12.2-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.12.2-code.jar 683 SHA256 4a03a08954e6b912a469b5e0db898247ea3ebc25b641f328e80f19163a0d908a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767 WHIRLPOOL 06e44b713306b3bdb7e878db1598546b45857091eb457c0fdba738d5f8c4de726920532e5cdf10260002c69299bd2756df52f407373053c5883e961899624d85
+DIST scala-2.12.2-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.12.2-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.12.2-gentoo-binary.tar.xz 77464308 SHA256 e06926b2e8bcd410fd7f71307fde57cc39712741c5dc692f29e9bff2c51058c0 SHA512 ef8952c06e1a89269dafb387b4d512edd54655317c06adc9dcd8270d8eb426362a6bc2a265910f3405362f062eb04a53550b8a6992781d5bb76701f24843ad64 WHIRLPOOL 37692e955d0ce92209f348a2ba61e64248732ec98e353c22de7cb217e48d5463c7c1b3192dd2de79af9ae7fdd58d7803d1ecf0afa420ae4588137bad112850b1
+DIST scala-2.12.2-instrumented.jar 31725 SHA256 8a424c8bd5805ec429a9477cbd0f44bf65a2b79b720d438bfd347dba8da06484 SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39 WHIRLPOOL 5ef8ee89b3fa66bf5025fd1b5db65d4d628b3452ba8530e3c3b1dd530fb5286fe3acee2cf56de09148cf2d37968626708690cc03da202cf3d58159cfd56fe8bc
+DIST scala-2.12.2-ivy2-deps.tar.xz 66113576 SHA256 f6096eb904103e51dc6462f93b76654a366df47612267ee85ed4d681e274f905 SHA512 d51961bd5cce27b3b98c21112e097efb43b5eae47fb215c315f6ae38ab15c6e6b8521c6b0dffcaa087741001b6d60aba946dfd765b6eab572e41092fa22839cc WHIRLPOOL 5a777eabef3737827b6870f2e9fdf302c0856b359ecca9a3c2036d5ba20c06b8ff5d0043b55d52b6ed04a3b4ad4e154e4a70e76670604c9d0cdb50d8801c14f2
+DIST scala-2.12.2-jsoup-1.3.1.jar 133835 SHA256 5695a4351412dbb21cfc9f09a31d66df5da94bd9bf2777325ff22916bbb32cb0 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d WHIRLPOOL 5b8ecbd677722e59642b630257748260dad0ad2e04b78b4472022729554d3984805dc02214cc983cacb76b0a526b062937074d3122a804e97e3e772e8c2e003c
+DIST scala-2.12.2-macro210.jar 2065 SHA256 c0796c2defec3dcf2f786945fbdced0448a958bb68eaef71efcf5c14184f28ff SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0 WHIRLPOOL 33b843583c02bd25db09df595026822f4e81d6a80c2cce3a7099dfb77dda80f595e5392e843c786a63b8d430d8acf53c20bc669ec1272b0f58c52cb0b67408b5
+DIST scala-2.12.2-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.12.2-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.12.2-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.12.2-sbt-deps.tar.xz 34841660 SHA256 018d9cab7712afeea9bf3fee5306224e4b8edba638afee850495ae3c94532982 SHA512 642bc1c2f94f7890548cc5b730cce4a4c214603c53eefaf12fbd709163feafbd319165a738fc4d3c349ae60ba276bc23333949b01835a2e7e7b767fa21baf96a WHIRLPOOL cfed944a585cddac3e5328c96e4f5facb2dcc3022a87c83cfd7525392da461039d7b9b1c732ff66c43a0bab1b0672a5a019cfce3ca37a7fdb798cea4af4948e1
+DIST scala-2.12.2-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.12.2.tar.gz 5935417 SHA256 822ef9c8077765cf558c1bbc88e957ccae77402ca02f432053f4f3bf4f91a2b1 SHA512 ab450e94fa79a9a0af238567b17537b12f23627eb066b84cd996a88422ec34ee8d26e09eca0416d49daccadaeb016ad6419d8022d471065389a26b024f2049b1 WHIRLPOOL 02a48ac6fb5d4befc3d91aef0b18d3729b7eadf52cfde11231432fa25c0e9fd60185a4d3d0e2095aed61e25a49c1f763a8922af65f5fbe5ff2960164da7f3fcb
+DIST scala-2.9.3-annotations.jar 2242 SHA256 f2d057a006bba4253d069795284a7610f1c837af6a80c0057736099962e24bcc SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd WHIRLPOOL 51fa0efc5dd14cf8364e9639375511fc3e716bd520a193e6c17a2fe3f02eebd1529eb98fd3b382a6386baa5b779ebd0327e8f141aee172d11d9548d9921c58e1
+DIST scala-2.9.3-ant-contrib.jar 224277 SHA256 be33a69818310b5c55e41dc11d48cd895f5f129da4b0d28c2f4c6c3e1cbcf3fc SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83 WHIRLPOOL aa713cc04b10c46adbbb8a5904e3fb34c6e32b67bb9a5f1a89768ceab8c31b977875c84434bc03c5b42105a4019f55cc10d806b0345c365a309e93d3f02e0a10
+DIST scala-2.9.3-ant-dotnet-1.0.jar 57795 SHA256 40c18fcfb8c28e4ee82e53f72a3257db43bcba01e16ebd5a4550fc419edf30c1 SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867 WHIRLPOOL 18aa33fe259bd52e2f37b903be39d462e8622ff744f990fc92871eaa4fe10ff69cd25b2c968cc353b3c5138cd3fffd755715aef6bb16c57b0b72e7e5fd1975e1
+DIST scala-2.9.3-ant.jar 1506140 SHA256 0251dbb938740ace07a53675113eee753ba389db65aebc814b175af50321620e SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c WHIRLPOOL 1b2b7e0289cb16f5131a9c0b1b6eb1279011e7af79fc470dd6dc2047afc7fa99bdeec6d9db4f46adb83f6110593118d0909a4b1fa6b01dc56890bf6d2785373b
+DIST scala-2.9.3-enums.jar 1372 SHA256 95c53606c7113333ef95b4efbd3ae08af715ca49f71845a5d33150e6b7e9a072 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc WHIRLPOOL 30b26ba56a36272cf5973d3a89850cb3f5bff6c45a7a6bbd6ccf4ff342720bba89dfc0cdbe10058b770b7e73093ea948e574d5e081c36ab866f3bea9f0e14f95
+DIST scala-2.9.3-fjbg.jar 130721 SHA256 bb13e449a369966b8d9d423aa31a4f0b628316e3c97e01e557978f7d6cf105f4 SHA512 2e063d805452b060d638a4fa2fa1e636fa66c387dfad1d1bba9a58914111ff3534b447f7d4514cc6299c9233f568d97e5b69f0ab370aaba8e3a5255ab11cff63 WHIRLPOOL 89cf71f08232e33bfe49b80f64f7f1a6aa5221ce53d884f06c3e622e70737e76f5847abe21ca0c137259f14327e4f08bae7a3c30130a41a36bc00b57c9719e87
+DIST scala-2.9.3-forkjoin.jar 47215 SHA256 c655d86013a72e5878ccd3110f176ff549a5a62d609f29b7bdd623334e8db01d SHA512 c1cf920eeca924aaa6189b52719ff567967c696817fa75a28daea916c1f808f13c5402143c33fd6b21352ac41e38e2823ca56d4a949af047889eb6a6aae4b649 WHIRLPOOL 9cc002ea16cdde5ca4fa5aadc4359a416fe5aa07599c694ac99e4dbe4e9f3f438e6a3899157420a7cd74438ebff63a9d3721e4dd1f73fbda6143d633bc309645
+DIST scala-2.9.3-genericNest.jar 1136 SHA256 c2c23341eec9fb379b57d7bf1156fedb3e2b9f97d2d5729fbfc7d766fd390faa SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6 WHIRLPOOL 61b2d9f840fc0ed86a8207cf353a2f7b9bf8523d31b4e8f74eb21ecac1a405ed04c5a4a8e78a13d64b2dd186a7ec3885cd5e2514ad572e600e5744c3f15f74c5
+DIST scala-2.9.3-gentoo-binary.tar.bz2 34391262 SHA256 5510aa9170e60cb8f179be6dbcab872c20b23a199ffa20db3f21a5cc054ef13e SHA512 06beccc78f0d2bc4860cf429fd4af2781ae9ffa763af77068a00de5cb08b351eb92b2c7c17732a7ff4a52fca9cf699127ba3e331aceceb7c54d5c8b9f0c65021 WHIRLPOOL 5413692e3e54f6fab333ec2916a9863588bb06fce46f06af9c47a9d359f82a15834b1beef776f0f750a46ba0683ec871c723cae3799f8997a981075e377a0bef
+DIST scala-2.9.3-gnujaxp.jar 231445 SHA256 65e6146fbab44e1640d8a0da588dfdbb9c185853e70d8b8c0da6949937b6af8a SHA512 d632760bde6a761ae840a8cbde1f3b27da7a005408504085b5cfb6edd3e54b99924562ff464be55f2b89cf9617d9ec22d96625f71a805398d4125d3ab5ed7ea6 WHIRLPOOL d56a54dd3395a543e2a705342c1faf41e67aa8ac81a3fe9eddd3fbe42adf4af80d43ffe3a22a24c08468d756a7618a082b694981e1f29c443ff15638175742c7
+DIST scala-2.9.3-instrumented.jar 24221 SHA256 23a2118d0efc1f99e3f833340765cc28f09b8f24de18b064ea034813fb8cb51e SHA512 dbba981bc5cc6c336a9076d7baf9b868381b8d8472e043d5d2b28621faf0cf69a252815c949eac643f18041c485cea12d05ca3638c2d57020ea713180e34050b WHIRLPOOL 25193c7b18d8879388ef060048350498613aa50397f3bd62d99cc9a0e088b11b0170c311babd9a9661bd096482a7cc052ce785ee416fa8362ceaf5ead5cf43c9
+DIST scala-2.9.3-jline.jar 158705 SHA256 e8b020b08e68b0f0adf37a28fc5cce02270d8ab1f754d482732982a5f91a9918 SHA512 8776d2ed8725674a681dd27416847ea466013faf5120011169f7991d88be11431869fe9f26a91d10893544c116d00874a1ab6f639c6bdcdf58575a00e98b5aaa WHIRLPOOL 3e84b0e0edb32ed0797a6d59aea7042954b017e9348f7dbbe7c74e9acd92b62633b574e4c37ad59f4280357c29f4d4bd54db4fd13981842b4dd3a583bc12ca5b
+DIST scala-2.9.3-jsr166_and_extra.jar 728574 SHA256 e33a59e291bae8dbd2b37c6a4d5eae459a313db3a588f42c59ac5fd8edf6e13b SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306 WHIRLPOOL ef8414d7862736cf072ff60fff5008f38dadcf826364cf21929fdfca7d331872d8097e6a6907dd500ef5d5a68964d8c2ed9ebeedf6470dc25ede269c1a8172b5
+DIST scala-2.9.3-maven-ant-tasks-2.1.1.jar 1314262 SHA256 b8891b4a90aca2793ad385ab57216f51c4879c6ab7e927354f407b46510cab51 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68 WHIRLPOOL 73c44ea6aba4a3c697f64d08475b4c17bdc929ac9f320a25714fbe7cdc2939ad334deb7a90eb6c950cce8ba402d19bc2615a104788bafed7d247b997d3146743
+DIST scala-2.9.3-methvsfield.jar 609 SHA256 730b33d098319d969760f2250dc6924c9f85f94a8a2eb2b2a025dcf05378d9c6 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71 WHIRLPOOL d5362d5fc2795ff0671f386429840bb4f84173f9308e34c2b0eb585fb7cacbd308ab87c42f2fd407597abc4f010e8ffde600dd30addcd63c2d71c2d5f22f1582
+DIST scala-2.9.3-midpapi10.jar 364901 SHA256 5c52910612714d5a0d090f1a1ad0dc9f9c77bfdc25fde8b84d9388bbcf42126b SHA512 5b2c9d4b2732c6eb74804e20f0e4315700ee18fa769a1bd9028ba0d742d71578e433dc0625ebd37c842e8f8f952c02c6f0d93a3e0c4b73e1c9d4fbf132839780 WHIRLPOOL 0d07e058b276c1f6db6405cea01a803e15999c198755cf778c63ecfb45223ca04faf4b88749be6bcdf7c4be45af2d1d7f3b072121b8a549543bf72daf28e5f91
+DIST scala-2.9.3-msil.jar 299354 SHA256 6be6c31b441205bcd9083a306803e99b459b215f939e412196ac10606e613bb4 SHA512 d09885a71b0010c0b08a15b625ce92dafe37e542e0e6413b88759d443e7bd6aedd4a0656d71ec262c54004ced38c4587e1ab2344db251b542c79d10c60e8e931 WHIRLPOOL e81b3cbd8403d78395f82ddba092bc54a5f5616dc8ecb6215e1e25c3cff7ed22fc73c4a19668f911b4954b1ddd00b9bbe0ec1addb7d1a1cd77aa460fb72a6ce8
+DIST scala-2.9.3-nest.jar 2920 SHA256 3c7cf1a1b9fe9ad2abf3bfcedaa17a976c72f4bccb0e0c7dbcf7ecf27bc20aa5 SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38 WHIRLPOOL 1d73b612946a6a226841d3e0ad8cb3ebb06997c70e94feb1f9236e4e58a93c429cc7cdecaa4175fd5b78920253bcc157f798593b6a8eacb873b3d9a51284be34
+DIST scala-2.9.3-plugins.jar 4181 SHA256 13313e0c3a42bb401377ab4f228e3c81db482c8f33295c6a1d021fc3c9727871 SHA512 d44427df9acf4611acb492b6268b65f63a8be2d47ef29598bf5d242f702af57f0ee2eff52378b8371755d5ddf58c79d48b18a6a056ee9fee5091e478ce5ec1a2 WHIRLPOOL b2e846b5965ea7f04844b4c49e3fcc2f5b3f0e31669a662557bd36a113dd94372bae55d46f1986e03099c6f51217bf10986e5e265874854ba479c36d041a1e41
+DIST scala-2.9.3-push.jar 8886289 SHA256 58eb2b8c501bbff0e78074a058e3fc160012a80952c1cc96ed301d8a08d7e98d SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a WHIRLPOOL 8fa6522a0fd9939f4ffd443b55e7a5adbb93a9dc5cbad569ccecd6be77ecd259eadbdb16c2c7eab6d9f175fbf33746faf9c41cf4d1050e7f576b86119301e126
+DIST scala-2.9.3-scala-compiler.jar 11422560 SHA256 d574e8ebb7df50149f1d59d422bf555343e641be08a4f3953b836d2203a6d251 SHA512 37be543367ce402faf8145afbda579ada62c985103cba9aef8e0458c24af3a3ecbb307fc8f6c228f0e134df167a50ecbf67f30b00e03029afdcb527569d6da0d WHIRLPOOL ca03ef48b2b1b251e33337cdfac5c3d37f6e127f366d1d5432aae11fdb94cf0f855c17b87147f6c8d116d9ce0653c419289acfdd8783afb42d4882b58ebdf2a0
+DIST scala-2.9.3-scala-library-src.jar 1306388 SHA256 eda04ef8f04bd3f1fd676de51cad77874a88cdf49d867593a0d9a320c4cff523 SHA512 0d7f452e4c81ae7fdb236aac4261c876e73728b31e033fb5f055a4ede9b8b407d66f9c42e1d3b999b9cbb28300b9b49e475743f645dbb246a40d095dc5dd8f6b WHIRLPOOL 2080282277c3ceff176a5a9f5f815457ae9404fc1e0b38a087888ddf2510a2e5faaac0a596fa1e642b7c0e937b05ae109de2be19b112867766a2ca9870a01761
+DIST scala-2.9.3-scala-library.jar 9925007 SHA256 fd1302b17372f85a553f670145d15c5ac349b676518ecd739a467b467d40da60 SHA512 8cce84864aeb701143b20d27e0819bfa6bc3e2193aff7197ec8a16796c23a20a169c9ce57bea01ccd5a1c32066e6d4033d23dd7f3b26634a34881c0eab523c30 WHIRLPOOL 4250fa13103d89d6c43e6e0d75bea3e6d55d68658acee5f2569c1894cce68862faea5d2a9aa228c05a77021f1a966261ea3daf762c3b50df2d54fb5b60273176
+DIST scala-2.9.3-scalacheck.jar 746629 SHA256 342a299d74fed72353b75f1265d7252c0f8d57939fc09c1b966a73f4bf07289e SHA512 d7f4eceefb271215a4fa240b40d38261607bab8a30afd7459e6d7eb561146aaad0e746bddb6ff4d25233908fe0c95947558f850b81c223d6066f22095f30dd2e WHIRLPOOL 85088b00f1292891a9e8d6d9e4778d978398c7128500a7fc2d8cbd9e206f31e2c6df367fdc784730b47c2bc265dd7c77649dab9f3482b3ed4c7953f9bd74cb13
+DIST scala-2.9.3-scalatest.jar 1827900 SHA256 43869b4171972901bce5a89b1ba8b8474c7e75538321dcdfb41e37d089edbac8 SHA512 2d77d1239d544d572660d8b2a8355bf7a03137a3d05d41b5f2ab214edab05ef038d3e05082d5adafe16b6cda41440c075f49a130c3c7ff053c6d8844000d2f2b WHIRLPOOL 68d804ab21f3caa0e459d8d8b1c926b6f69140cb64a96b72d95605f9f04845510cd47b369b3d73d5e944912fa2f0d06cfb02c75f89087d8f27effbdfa4d9ccd1
+DIST scala-2.9.3-vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+DIST scala-2.9.3.tar.gz 3973977 SHA256 5736497f84d375804eb6351a5e9db7cf8dad0861a5d4294fc7e8f741c840573e SHA512 896b04ffc5579f1f2a081c677da5c11bf163b89696d061e7c7404fbb684640dd78f7d88bdef89822dad6dfb20717d4b84da239a84c4b65bbdf84a604e1577e76 WHIRLPOOL 4812e6e844c169f187eb7802ec65f0d9b72efa62765f8113d351a2cdd8ab6ee7d8234b9def8643d91e80d04b4049d8793aec7d794af7e2845813488308d44614
+DIST scala-compiler-src.jar 2462738 SHA256 ca43298237583dfd362ab4d773ef0f791a075d9187ecf30cc8ee4f4b7ae12e76 SHA512 a71eab8ada2fd23aa1408577dc3bde28847484643618a752ab68bbe5c8a4ef19ad852ace6f44c8e66668e6b6098de8b0cb3eb8d0c4674ed332562463b43a8a38 WHIRLPOOL 8cc711357fe2b393c1e28a3ebd0249fb633c1135c6c4d8819c6ab14081c9fbbb4c1e0a6b84eb9a5711c9874814e54676905da90a1d8d6c5e28213e189bb0f37b
+DIST scala-compiler.jar 15095501 SHA256 dbad9d1e0e300c62945d8d8aa21ebfa614e1f7b1c8378550b0314aa006be21c0 SHA512 98588884da2a01af5df9898f5d3055cbf5fa04af7d5f87bd6076dbfca329a7f2fa5645fa87cc14720204e00dc540971f8c44b2233fd4706db0df00ce8978349f WHIRLPOOL 311db7bc73ac1584403b12ea8c712a4b6a0450c502328ac26d7d9e051db4f5dd185dfc1c7c8304d32991c374fc2ed3c89cf8cfd61759f9049e1b5e55f4a7c54c
+DIST scala-library-src.jar 1378653 SHA256 4a347825a0856a14803ec2c9cc205e192f19f15e417d334f4d22276d898d0dfd SHA512 06b0944c53b145c71239ec5aa90a78fbdee8130508f02d6cecd4c6c5e26878f19751471ba5d54c80e8d1380645787512c6e7566471675f0c9e3f0c29e38b4ff7 WHIRLPOOL 27fcbc2e52d52b30a8d0f1d68caaf8fb0f201d1509609aa361aaae412f0ceb6d95e6c3c4210b60027eae1ebb406ba3bdad770a2b087145572255b452bf0028bc
+DIST scala-library.jar 7113040 SHA256 66057366dc9c541d0fadb7f64a4e06f7c5c86a90b289d724e7db0153b7e92c2c SHA512 af8a57145c8bcac6f72abade3b21f066ae082c7ab858c3a7b0641240fb99fe24bac3c224b7b1418c47c852793cecc7e8f5838e0cf6ae2b78ee538839cebdffeb WHIRLPOOL 29cffc4e84730549ed25384411e1a9341f56d348800d1bbc04958d88071e0c36b7290969b8f9d6ea865d9c82fbb76b1727cf66b81e420950c7ad356f2bd02aea
+DIST scala-reflect-src.jar 467879 SHA256 45846f176eba3e072282b597fbea58977e1ac08d7161571e2601a86adbff4e35 SHA512 c172be4d0ec724be4f62cbcaf848a71c99cffc706fcaa5b46fe2970088ba9a8f406d42728f64a0dfdef1cbe18e313b8be8142d68b9b3d7a592dec5e1fd7366b6 WHIRLPOOL 876bd9e3186d76d351e128cf990789459b51bca1ad6e4f51aa397d1941311ed51a1048188a4b94bd8709551c0cb3ab3985d3a1534594bb840082d0b555496d7c
+DIST scala-reflect.jar 3307596 SHA256 910b58279250371e034859227fb5d9015297eb6bf607f9d3ec0836a822c1fff0 SHA512 466c55b8ce98e48f851c446b986388351ac4b0fb2b0cf6888d56fe2a4af1f5f3916e78f3fdea395ee18ef0a5128bc6b0d4cdcdce8f5b0f2fcc30c2bdbd41eb40 WHIRLPOOL 73a42b7b557bf29d14511f798e22f1ba8039e7c41bb165d9a4be7c66d393fa63c2836239fca56158eb2c5dd07567b1febb18d9f4f514de48e0c6ec5d155a46a2
+DIST scalacheck.jar 763570 SHA256 96814bea5818186086473da5c657191d03145649eee0c300abec9c3380fdd418 SHA512 5383e80dbcb11cb3fba033bd6a0e8c220ec3dd6fc153062b9d44d346ff17bea014a8c7a412af85ff487a34011cdc2042191c4c4ad66ea44eb7eba139a0b358d4 WHIRLPOOL d6276010ce4d1bcc647e1d7673cc18f645ac92abf03c4aa5be03735853a33692763883fcd8e325d36b2a18cca758d6f1636294b182f247da1094c82476f36b58
+DIST scalatest.jar 1827900 SHA256 43869b4171972901bce5a89b1ba8b8474c7e75538321dcdfb41e37d089edbac8 SHA512 2d77d1239d544d572660d8b2a8355bf7a03137a3d05d41b5f2ab214edab05ef038d3e05082d5adafe16b6cda41440c075f49a130c3c7ff053c6d8844000d2f2b WHIRLPOOL 68d804ab21f3caa0e459d8d8b1c926b6f69140cb64a96b72d95605f9f04845510cd47b369b3d73d5e944912fa2f0d06cfb02c75f89087d8f27effbdfa4d9ccd1
+DIST vizant.jar 15910 SHA256 a54e19093725d0d085544553246e48607c1e6ab65575ae0ff721b788118461d6 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390 WHIRLPOOL 1b957b8b850f79309c3577a2dcac52a620fa54f810f242a02c52bbcee1cc9c5818785baa7db8e2b82b850bcb56b528c4dd07cdfad2f991c0025293ca02c0dc99
+EBUILD scala-2.10.2-r3.ebuild 8539 SHA256 c49f6b5be008e2d5b1b3916a28465f7994d3848b2808b7c8150e78389c26b426 SHA512 55c0a16d28ee2d3c265d11562db3d510204273ab841eaa0ec5a9053b2672b7d6ce8b917fa42b63b97b9475f539cc53602708d256c604ad276ebffd2ea502f9ed WHIRLPOOL 91fbdb40ac906668f6076e7fa75b5fe3d73a1d44f73068abdb69e14dc658b5a07e9b67b49a4d6d0cf89ae4ac66b090864e2d6778a201f5e9742a34e7ab8a2639
+EBUILD scala-2.10.3-r2.ebuild 8374 SHA256 1c6847fc667eb51141ebd8e816b505a11cf541f616914c0b2d19fd00d3a79969 SHA512 ecaba6d5e9bbc543d250a08e6a1dec4a40511c26b85bdf1e64a277cf87e2b565cc54776094f38242695747250f35591ec67e3e9a7bee9fbe7252cedbd06425cb WHIRLPOOL d9fe00ef46c2ff3b4604bd20364fa69beeb131853e41948afcc0825b0dc3ee7c01171d05da1295cd9e78b75e344cc34a67fa109c97ffdbee052e4e597bd16469
+EBUILD scala-2.10.4-r2.ebuild 8969 SHA256 6487dd864c9794545c06862b0c41e14387cce664ffb3f28f3316186cf3cf74be SHA512 f40c3321f366b7aad4d5474d7dd1f9d59384c957abe804245ab62530845099388fe09172ce8ba624a913bcd9c02a29475f77f89277ef249b228435e23f6aa2e5 WHIRLPOOL 389c4e156c1684203a0a3ee53c364f14633d1c389ae771d69b0b7acda8ae172b43af4a912b875c01861b8be25f3eb199317b99c0d65badd94aec542da39bb78f
+EBUILD scala-2.10.6.ebuild 8967 SHA256 1f074c6eb64a03a62eb9b5bb4ad37b698b06630f3cf7c6db4e90d4ce93df05bb SHA512 bdf1ac5b1fb3c0b59f122f3df14835c9da692cde3fda3cfca23955224dfea4e5125bdc68ad0dac6334e19db5eced392b3950c7d1a319085045791882a56f8fd7 WHIRLPOOL a886bf979ec20d7020c56c4d0e617ce739cafdae317241ad54797cf09311aceb0b61190de1b7fd58b43a4efa2b72a3604f48b962a0b9d87197a13406fbe771e7
+EBUILD scala-2.11.1-r2.ebuild 7600 SHA256 3537b341286ca93ef0cc978bf7b0acac61ee2d81009706c23eabc1b6fc5d4c9f SHA512 79ed5258001cddc3abadd0ccde67f4c3dcfb03aa1d129e528799de4cae528037b251c8c7023de62af6d71771ae8e7f92b30a008d1169d5d14aaa842f4ec42cf5 WHIRLPOOL d8ff20803bcce0dfec0e2f0d7af01c38752a6c5183e368a1ac4277004608ae3474ddbc47b4e61cd29a4a923582cba5ff63697573562cd2c20eebc3e2ce52e410
+EBUILD scala-2.11.11.ebuild 7828 SHA256 1d9518ea82a591ece6ad78e9d1617699a5a9002914dbf5e831e0b7fb351d2629 SHA512 45e40934245da2d635ade9340e38c0998de039e5fdb4102ff65b344320bad84d8e2c7f81b737cd5fd986c3d3b53ddc62a38948deff8857a51afb449f515bf2ee WHIRLPOOL 253ea4d3eba6b1323d897dc994fe1033dbef3390efc5d116e3f518bead22984be1a903ce5ac46f1e412c110306fc3153721614704d811216e91a4144436c1e14
+EBUILD scala-2.11.2-r2.ebuild 7685 SHA256 134adf85077efd3ce98f43800be882fcbd345d5923b765bc4e67d41d99d0d5b1 SHA512 64d0ff156d537895167e431aff3d6a9a94f4f4ff6ce2eadbaa6bed3b3c3cd845c94f2b77af1b93be3535a7646748f649fba06fc1eca119a7a0c31c7a5669b601 WHIRLPOOL ab882190aea08595e1928c40372ca99c5bbd79d5515e33b8769a0b3c0863209fd58cbefed81c95b10ebeda58577876b82046bc08c48aa4db5a117b9be59c7d87
+EBUILD scala-2.11.4-r1.ebuild 7665 SHA256 b61a44967e892821bd7090453730ccaf729d04186f4f6e6f8809eac40aa011c7 SHA512 1257ed685a65cbe18e12547610b47408fef8992812b51656c5f15815dff99e4a7090672afbbd698a023301fe3f82ef3c1b542607171ba2da61f754c56d07e317 WHIRLPOOL a5542a9a5016a9c7fdab9f2f7237d8b61bc8aa32c562384c282fc42c5a2b86fb4b297c08409031c744eb03fa71925a0ede93678ec50071837a2b9100d7a842dd
+EBUILD scala-2.11.4-r2.ebuild 7649 SHA256 5efcd322df452d0971dd697c1c5daef1a0608136d835fea221bc097164c9b1a1 SHA512 c5e997c5941f2f05af8aa1dd45997005923d538d968f9d8df9a360093aec33311bbe3b4caaa2652a7e4773bb5761f332aa74422956af44b0a50b2fc8461669fc WHIRLPOOL 03fab01de54c6ab96791653d1ba0a205e8ec13cc0eeaf529bd7a0473d1db2c285a49504029318a0f8310d0f8a4c604bf81d5648129d8531a2b4dfabe7c8f03ba
+EBUILD scala-2.11.6-r1.ebuild 7649 SHA256 32461c071801fd71cf15e7bcec31ac6f496701d7fff7c9d8553e4a610924ee7a SHA512 2344fda30695aec8267fb02c28c1196a3f60dffbfb5f6f8810b6cf63440bf49bb563c45a29a1ab02addf962c12e9b6d484b7a4b88c3593ee83940cf6e9b131de WHIRLPOOL 09cbc98b35a3a9cc07a072c4dc36f51a4b54aa4e4b862b1fb1c5f118d4ff6c9f445c36ffee60f54bba235538f180fff1aabd673370df94f4c7f6b09b73558793
+EBUILD scala-2.11.7-r1.ebuild 7839 SHA256 72a0e2feed18e3a77a3301541e65284176390901db85bef2f88d701bd282423c SHA512 8521b2a35ad3bed0756317fd5d75931899d13610267013e15bd4288cb007fe1e6c9cbb1d300924c497d4bee300a6a0cc7e384e8c718f3bf48b6eb079e7bf93cd WHIRLPOOL 32d8728e2dd13a8b034513084cd5836fc2f64cd28c48ef7c7aa356488980ff9c6f3051bb811239496fb3344716c5c347bd1d6b7fc33460920467309a2ac1ac4a
+EBUILD scala-2.11.8.ebuild 7839 SHA256 36bc4a27dfe8c2d8e68280931aa543b1674e132ea918fa9d323f85635547ae27 SHA512 3f934239ffb49faeb807fdc1a60a3e94997011879faa00a0f142494c6cf4d3352979f630c39956e9c7fecf6c6cbe9e5288e3d70460bc0b7ff039a063c3fed269 WHIRLPOOL e4c83f7b9cce6a3d18f2689d76f0fc6234fb2fb2dc4eeba7643d8402fb98b2583170048c4e375994ce3d85cbeebaf59b84b43e3060614b6ac70bd2b1ae45bc8e
+EBUILD scala-2.12.1.ebuild 7348 SHA256 46fc4851a8cb16c4fc54fa02d1daf2166a8117bc505c27c536158c6861e602b1 SHA512 7791ef4c03afba70dc92eb5d145931056145238b698b6fd4aed1328d9e153f15b196410014144e8c46dd211666e777ab4a91794102d6d04782cbdac7c1780c05 WHIRLPOOL ef45844478a8057ff4eb3b815907a0200edd13e0e1b8576e664b3de94c6c36f7c08124685f659591a44cba62671002709417b7f0732fd4c4c58f8dd8cf359de1
+EBUILD scala-2.12.2.ebuild 7260 SHA256 09aad73cfa31e437ed03ad25ae8854278f752a1bf9d29b83258dfb33acb79034 SHA512 014927e26a8f4d4a2b906fb1b920784ea0c627cfdedb72b528898c097498ccd65f6681f5314912c9feaee1ed56ff54ac6876938a56dfd076c8c48159b0d185f6 WHIRLPOOL b48ef101858db88d5a461fc340f71d7b7da373805b21420b8c5ef50b7d84bf949c05c1b12abe2a4b253637d20f62bac7ded8d0eacb9aa2799d1cbfa38f059305
+EBUILD scala-2.9.3.ebuild 8593 SHA256 e500e6621a2ee6d04992c95c2e9ea3885b520aed9bb0cb1eb27c6fe0ff171c3e SHA512 cd6da61a88fa8b11cce4f105df755830f43cfe51520c9f848af2059bf00c0b11016dbc2282b965b7242accef7d44a9d383780ca3082e5ed49928d76d879d9c98 WHIRLPOOL bd0bcf777cae5b04370d6b791a981bbe5a24e4688664ba25359cffee924b4744edadf7b9d6a616f9dc82e1b19f4d1e455f6952ca03667145a44b0fc0c6fcd4f5
+MISC ChangeLog 6120 SHA256 3e98f824f30ef01564e8ce5110244b4a1a5bac17ee095df230f0110f6bbfe957 SHA512 2634b79c48634f73688f5ea1b400d5091aba72d8a38b7fc5f71b47d6195ece48239a727664d60b44f120f5096b974d59df618055889949b104012181eac6dc46 WHIRLPOOL efdf221a9d363de35cb62b873ee8283cfa57cd2ad497ab946db9ed4bf68d57a5c19c0f2a5b344caf0d39f55d630ef631a4bef1776d24beaf264f83d8b677d275
+MISC ChangeLog-2015 11548 SHA256 bc528415fa2004fc10ff9716086279125ad03e5a73f82b3cf911e36c70c24e16 SHA512 6f1ecc363795e33f7301c6689e966b5761fbfb7e998f439bc5dd58976bd2c353513f6e588dcb7d7fcff6f79d83eb4a6e082b9704c73a90058536017ceee70b6e WHIRLPOOL a9f5846c514c57bada7c885f9d1b7f5bb301a305b9d721902c6be3ecc8c62bca2fa26ac05610b333a1621db47632ad882922c60e8b6ae7fc627a86af35bb961a
+MISC metadata.xml 478 SHA256 4e01bae8b52cdec13422442c3ada9808ca3fd39040f4d7b3f65e003710f94284 SHA512 cca0d7d9cb94bfaad3f93382456248626e83ed8358798ff4b11c600cadee3b88b28b89e914fe5d42c16e170969ded1b35efd1af61953476347f620b9a973d718 WHIRLPOOL ada7f68837a7d2c33989fe3ad054514d8963041e1b19f1b0aea95bc9b535be74481a9328e16a02b584cf7b8295286f69774b1ae42a9db6975ba5159a73f59802
diff --git a/dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing-SI-7455.patch b/dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing-SI-7455.patch
new file mode 100644
index 000000000000..964b323d9b30
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing-SI-7455.patch
@@ -0,0 +1,165 @@
+commit f3f1064c90371449949892f30de91cc1f2662c55
+Merge: 0b7dddb 050b4c9
+Author: Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com>
+Date: Sat Jul 27 22:39:44 2013 -0700
+
+ Merge pull request #2750 from retronym/ticket/7455-2.10.x
+
+ SI-7455 Drop dummy param for synthetic access constructor
+
+commit 050b4c951c838699c2fe30cbf01b63942c63a299
+Author: Jason Zaugg <jzaugg@gmail.com>
+Date: Wed Jul 17 15:52:48 2013 +1000
+
+ SI-7455 Drop dummy param for synthetic access constructor
+
+ Java synthesizes public constructors in private classes to
+ allow access from inner classes. The signature of
+ that synthetic constructor (known as a "access constructor")
+ has a dummy parameter appended to avoid overloading clashes.
+ javac chooses the type "Enclosing$1" for the dummy parameter
+ (called the "access constructor tag") which is either an
+ existing anonymous class or a synthesized class for this purpose.
+
+ In OpenJDK, this transformation is performed in:
+
+ langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java
+
+ (Incidentally, scalac would just emits a byte-code public
+ constructor in this situation, rather than a private constructor /
+ access constructor pair.)
+
+ Scala parses the signature of the access contructor, and drops
+ the $outer parameter, but retains the dummy parameter. This causes
+ havoc when it tries to parse the bytecode for that anonymous class;
+ the class file parser doesn't have the enclosing type parameters
+ of Vector in scope and crash ensues.
+
+ In any case, we shouldn't allow user code to see that constructor;
+ it should only be called from within its own compilation unit.
+
+ This commit drops the dummy parameter from access constructor
+ signatures in class file parsing.
+
+diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+index da11754..4e5204f 100644
+--- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
++++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+@@ -626,7 +626,7 @@ abstract class ClassfileParser {
+ sawPrivateConstructor = true
+ in.skip(2); skipAttributes()
+ } else {
+- if ((sflags & PRIVATE) != 0L && global.settings.optimise.value) {
++ if ((sflags & PRIVATE) != 0L && global.settings.optimise.value) { // TODO this should be !optimize, no? See c4181f656d.
+ in.skip(4); skipAttributes()
+ } else {
+ val name = pool.getName(in.nextChar)
+@@ -636,7 +636,7 @@ abstract class ClassfileParser {
+ info match {
+ case MethodType(params, restpe) =>
+ // if this is a non-static inner class, remove the explicit outer parameter
+- val newParams = innerClasses getEntry currentClass match {
++ val paramsNoOuter = innerClasses getEntry currentClass match {
+ case Some(entry) if !isScalaRaw && !isStatic(entry.jflags) =>
+ /* About `clazz.owner.isPackage` below: SI-5957
+ * For every nested java class A$B, there are two symbols in the scala compiler.
+@@ -650,6 +650,15 @@ abstract class ClassfileParser {
+ case _ =>
+ params
+ }
++ val newParams = paramsNoOuter match {
++ case (init :+ tail) if (jflags & JAVA_ACC_SYNTHETIC) != 0L =>
++ // SI-7455 strip trailing dummy argument ("access constructor tag") from synthetic constructors which
++ // are added when an inner class needs to access a private constructor.
++ init
++ case _ =>
++ paramsNoOuter
++ }
++
+ info = MethodType(newParams, clazz.tpe)
+ }
+ sym.setInfo(info)
+diff --git a/test/files/run/t7455.check b/test/files/run/t7455.check
+new file mode 100644
+index 0000000..0eb9342
+--- /dev/null
++++ b/test/files/run/t7455.check
+@@ -0,0 +1,4 @@
++private[package <empty>] def <init>(x$1: String): Outer[E]
++private[package <empty>] def <init>(): Outer$PrivateInner
++private[package <empty>] def <init>(): Outer$PrivateStaticInner
++private[package <empty>] def <init>(x$2: String): Outer$PublicInner
+diff --git a/test/files/run/t7455/Outer.java b/test/files/run/t7455/Outer.java
+new file mode 100644
+index 0000000..10c97a9
+--- /dev/null
++++ b/test/files/run/t7455/Outer.java
+@@ -0,0 +1,31 @@
++public class Outer<E> {
++ public void elements() {
++ new C<E>() {
++ };
++ }
++
++ private Outer(String a) {}
++
++ static class SubSelf extends Outer<String> {
++ public SubSelf() { super(""); }
++ }
++
++ private class PrivateInner {
++ }
++ class SubPrivateInner extends PrivateInner {
++ }
++
++ private class PublicInner {
++ private PublicInner(String a) {}
++ }
++ class SubPublicInner extends PublicInner {
++ public SubPublicInner() { super(""); }
++ }
++
++ private static class PrivateStaticInner {
++ }
++ public static class SubPrivateStaticInner extends PrivateStaticInner {
++ }
++}
++
++class C<E> {}
+diff --git a/test/files/run/t7455/Test.scala b/test/files/run/t7455/Test.scala
+new file mode 100644
+index 0000000..b23a724
+--- /dev/null
++++ b/test/files/run/t7455/Test.scala
+@@ -0,0 +1,30 @@
++import scala.tools.partest._
++
++// javac adds dummy parameters of type Outer$1 to synthetic access constructors
++// This test shows that we strip them from the signatures. If we don't, we trigger
++// parsing of Outer$1 which can fail if it references type parameters of the Outer.
++//
++// OLD OUTPUT:
++// private[package <empty>] def <init>(x$2: Outer$1): Outer$PrivateInner
++// error: error while loading Outer$1, class file 't7455-run.obj/Outer$1.class' is broken
++// (class java.util.NoSuchElementException/key not found: E)
++// ...
++object Test extends DirectTest {
++ override def code = ""
++
++ def show {
++ val classpath = List(sys.props("partest.lib"), testOutput.path) mkString sys.props("path.separator")
++ val compiler = newCompiler("-cp", classpath, "-d", testOutput.path)
++ import compiler._, definitions._
++ new compiler.Run
++
++ for {
++ name <- Seq("Outer", "Outer$PrivateInner", "Outer$PrivateStaticInner", "Outer$PublicInner")
++ clazz = compiler.rootMirror.staticClass(name)
++ constr <- clazz.info.member(nme.CONSTRUCTOR).alternatives
++ } {
++ println(constr.defString)
++ fullyInitializeSymbol(constr)
++ }
++ }
++}
+
diff --git a/dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing.patch b/dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing.patch
new file mode 100644
index 000000000000..a9614f3db2b3
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.2-jdk-1.7-swing.patch
@@ -0,0 +1,236 @@
+--- scala-2.10.2-orig/build.xml 2013-05-31 00:44:27.000000000 +1000
++++ scala-2.10.2/build.xml 2013-08-20 20:41:23.335756000 +1000
+@@ -343,6 +343,8 @@
+ <echo level="warning"> You are using JDK7 for this build.
+ While this will be able to build most of Scala, it will not build the Swing project.
+ You will be unable to create a distribution.
++ ^ The above is a message from the scala 2.10.2 release, the Gentoo
++ ebuild applies patches for jdk 1.7 swing.
+ </echo>
+ </then></if>
+
+@@ -1153,7 +1155,7 @@
+ <target name="quick.partest" depends="quick.scalap, quick.comp, asm.done">
+ <staged-build with="locker" stage="quick" project="partest" version="partest"/> </target>
+
+- <target name="quick.swing" depends="quick.actors, quick.lib" if="has.java6">
++ <target name="quick.swing" depends="quick.actors, quick.lib">
+ <staged-build with="locker" stage="quick" project="swing"/> </target>
+
+ <target name="quick.plugins" depends="quick.comp">
+@@ -1204,7 +1206,7 @@
+ <staged-pack project="library"/></target>
+
+ <target name="pack.actors" depends="quick.lib"> <staged-pack project="actors"/> </target>
+- <target name="pack.swing" if="has.java6" depends="quick.swing"> <staged-pack project="swing"/> </target>
++ <target name="pack.swing" depends="quick.swing"> <staged-pack project="swing"/> </target>
+ <target name="pack.reflect" depends="quick.reflect"> <staged-pack project="reflect"/> </target>
+
+ <target name="pack.comp" depends="quick.comp, asm.done">
+@@ -1351,9 +1353,7 @@
+ <make-plugin-bundle name="continuations" version="${osgi.version.number}" />
+ <touch file="${build-osgi.dir}/bundles.complete" verbose="no"/>
+
+- <if><isset property="has.java6"/><then>
+- <make-bundle name="scala-swing" version="${osgi.version.number}"/></then>
+- </if>
++ <make-bundle name="scala-swing" version="${osgi.version.number}"/>
+ <stopwatch name="osgi.bundle.timer" action="total"/></then>
+ </if>
+ </target>
+--- scala-2.10.2-orig/src/swing/scala/swing/ComboBox.scala 2013-05-31 00:44:27.000000000 +1000
++++ scala-2.10.2/src/swing/scala/swing/ComboBox.scala 2013-08-20 20:26:48.334061000 +1000
+@@ -9,7 +9,7 @@
+ package scala.swing
+
+ import event._
+-import javax.swing.{JList, JComponent, JComboBox, JTextField, ComboBoxModel, AbstractListModel, ListCellRenderer}
++import javax.swing.{ JComponent, JComboBox, JTextField, ComboBoxModel, AbstractListModel, ListCellRenderer }
+ import java.awt.event.ActionListener
+
+ object ComboBox {
+@@ -118,10 +118,10 @@
+ implicit def floatEditor(c: ComboBox[Float]): Editor[Float] = new BuiltInEditor(c)(s => s.toFloat, s => s.toString)
+ implicit def doubleEditor(c: ComboBox[Double]): Editor[Double] = new BuiltInEditor(c)(s => s.toDouble, s => s.toString)
+
+- def newConstantModel[A](items: Seq[A]): ComboBoxModel = {
+- new AbstractListModel with ComboBoxModel {
++ def newConstantModel[A](items: Seq[A]): ComboBoxModel[A] = {
++ new AbstractListModel[A] with ComboBoxModel[A] {
+ private var selected: A = if (items.isEmpty) null.asInstanceOf[A] else items(0)
+- def getSelectedItem: AnyRef = selected.asInstanceOf[AnyRef]
++ def getSelectedItem = selected.asInstanceOf[AnyRef]
+ def setSelectedItem(a: Any) {
+ if ((selected != null && selected != a) ||
+ selected == null && a != null) {
+@@ -129,7 +129,7 @@
+ fireContentsChanged(this, -1, -1)
+ }
+ }
+- def getElementAt(n: Int) = items(n).asInstanceOf[AnyRef]
++ def getElementAt(n: Int) = items(n).asInstanceOf[A]
+ def getSize = items.size
+ }
+ }
+@@ -157,7 +157,7 @@
+ * @see javax.swing.JComboBox
+ */
+ class ComboBox[A](items: Seq[A]) extends Component with Publisher {
+- override lazy val peer: JComboBox = new JComboBox(ComboBox.newConstantModel(items)) with SuperMixin
++ override lazy val peer: JComboBox[A] = new JComboBox(ComboBox.newConstantModel(items)) with SuperMixin
+
+ object selection extends Publisher {
+ def index: Int = peer.getSelectedIndex
+@@ -182,7 +182,8 @@
+ * of the component to its own defaults _after_ the renderer has been
+ * configured. That's Swing's principle of most suprise.
+ */
+- def renderer: ListView.Renderer[A] = ListView.Renderer.wrap(peer.getRenderer)
++ def renderer: ListView.Renderer[A] = ListView.Renderer.wrap[A](peer.getRenderer.asInstanceOf[ListCellRenderer[A]])
++ // def renderer: ListView.Renderer[A] = ListView.Renderer.wrap(peer.getRenderer)
+ def renderer_=(r: ListView.Renderer[A]) { peer.setRenderer(r.peer) }
+
+ /* XXX: currently not safe to expose:
+@@ -201,8 +202,8 @@
+ peer.setEditor(editor(this).comboBoxPeer)
+ }
+
+- def prototypeDisplayValue: Option[A] = toOption[A](peer.getPrototypeDisplayValue)
++ def prototypeDisplayValue: Option[A] = Option(peer.getPrototypeDisplayValue)
+ def prototypeDisplayValue_=(v: Option[A]) {
+- peer.setPrototypeDisplayValue((v map toAnyRef).orNull)
++ peer.setPrototypeDisplayValue((v map toAnyRef).orNull.asInstanceOf[A])
+ }
+ }
+--- scala-2.10.2-orig/src/swing/scala/swing/ListView.scala 2013-05-31 00:44:27.000000000 +1000
++++ scala-2.10.2/src/swing/scala/swing/ListView.scala 2013-08-20 20:26:48.334716000 +1000
+@@ -24,21 +24,21 @@
+ val MultiInterval = Value(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
+ }
+
+- def wrap[A](c: JList) = new ListView[A] {
++ def wrap[A](c: JList[A]) = new ListView[A] {
+ override lazy val peer = c
+ }
+
+ object Renderer {
+- def wrap[A](r: ListCellRenderer): Renderer[A] = new Wrapped[A](r)
++ def wrap[A](r: ListCellRenderer[A]): Renderer[A] = new Wrapped[A](r)
+
+ /**
+ * Wrapper for <code>javax.swing.ListCellRenderer<code>s
+ */
+- class Wrapped[A](override val peer: ListCellRenderer) extends Renderer[A] {
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int) = {
++ class Wrapped[A](override val peer: ListCellRenderer[A]) extends Renderer[A] {
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int) = {
+ Component.wrap(peer.getListCellRendererComponent(list.peer, a, index, isSelected, focused).asInstanceOf[JComponent])
++ }
+ }
+- }
+
+ /**
+ * Returns a renderer for items of type <code>A</code>. The given function
+@@ -55,8 +55,8 @@
+ * </code>
+ */
+ def apply[A,B](f: A => B)(implicit renderer: Renderer[B]): Renderer[A] = new Renderer[A] {
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component =
+- renderer.componentFor(list, isSelected, focused, f(a), index)
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component =
++ renderer.componentFor(list.asInstanceOf[ListView[_ <: B]], isSelected, focused, f(a), index)
+ }
+ }
+
+@@ -69,11 +69,11 @@
+ * @see javax.swing.ListCellRenderer
+ */
+ abstract class Renderer[-A] {
+- def peer: ListCellRenderer = new ListCellRenderer {
+- def getListCellRendererComponent(list: JList, a: Any, index: Int, isSelected: Boolean, focused: Boolean) =
+- componentFor(ListView.wrap[A](list), isSelected, focused, a.asInstanceOf[A], index).peer
++ def peer: ListCellRenderer[_ >: A] = new ListCellRenderer[A] {
++ def getListCellRendererComponent(list: JList[_ <: A], a: A, index: Int, isSelected: Boolean, focused: Boolean) =
++ componentFor(ListView.wrap[A](list.asInstanceOf[JList[A]]), isSelected, focused, a, index).peer
+ }
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component
+ }
+
+ /**
+@@ -110,7 +110,7 @@
+ /**
+ * Configures the component before returning it.
+ */
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component = {
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component = {
+ preConfigure(list, isSelected, focused, a, index)
+ configure(list, isSelected, focused, a, index)
+ component
+@@ -123,10 +123,10 @@
+ * that renders the string returned from an item's <code>toString</code>.
+ */
+ implicit object GenericRenderer extends Renderer[Any] {
+- override lazy val peer: ListCellRenderer = new DefaultListCellRenderer
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: Any, index: Int): Component = {
+- val c = peer.getListCellRendererComponent(list.peer, a, index, isSelected, focused).asInstanceOf[JComponent]
+- Component.wrap(c)
++ override lazy val peer: ListCellRenderer[Any] = (new DefaultListCellRenderer).asInstanceOf[ListCellRenderer[Any]]
++ def componentFor(list: ListView[_ <: Any], isSelected: Boolean, focused: Boolean, a: Any, index: Int): Component = {
++ val c = peer.getListCellRendererComponent(list.peer, a, index, isSelected, focused)
++ Component.wrap(c.asInstanceOf[JComponent])
+ }
+ }
+ }
+@@ -142,34 +142,34 @@
+ */
+ class ListView[A] extends Component {
+ import ListView._
+- override lazy val peer: JList = new JList with SuperMixin
++ override lazy val peer: JList[A] = new JList[A] with SuperMixin
+
+ def this(items: Seq[A]) = {
+ this()
+ listData = items
+ }
+
+- protected class ModelWrapper(val items: Seq[A]) extends AbstractListModel {
+- def getElementAt(n: Int) = items(n).asInstanceOf[AnyRef]
++ protected class ModelWrapper[A](val items: Seq[A]) extends AbstractListModel[A] {
++ def getElementAt(n: Int) = items(n)
+ def getSize = items.size
+ }
+
+ def listData: Seq[A] = peer.getModel match {
+- case model: ModelWrapper => model.items
+- case model @ _ => new Seq[A] { selfSeq =>
++ case model: ModelWrapper[a] => model.items
++ case model => new Seq[A] { selfSeq =>
+ def length = model.getSize
+ def iterator = new Iterator[A] {
+ var idx = 0
+ def next = { idx += 1; apply(idx-1) }
+ def hasNext = idx < selfSeq.length
+ }
+- def apply(n: Int) = model.getElementAt(n).asInstanceOf[A]
++ def apply(n: Int): A = model.getElementAt(n)
+ }
+ }
+
+ def listData_=(items: Seq[A]) {
+- peer.setModel(new AbstractListModel {
+- def getElementAt(n: Int) = items(n).asInstanceOf[AnyRef]
++ peer.setModel(new AbstractListModel[A] {
++ def getElementAt(n: Int) = items(n)
+ def getSize = items.size
+ })
+ }
+@@ -216,7 +216,7 @@
+ def adjusting = peer.getSelectionModel.getValueIsAdjusting
+ }
+
+- def renderer: ListView.Renderer[A] = ListView.Renderer.wrap(peer.getCellRenderer)
++ def renderer: ListView.Renderer[A] = ListView.Renderer.wrap[A](peer.getCellRenderer.asInstanceOf[ListCellRenderer[A]])
+ def renderer_=(r: ListView.Renderer[A]) { peer.setCellRenderer(r.peer) }
+
+ def fixedCellWidth = peer.getFixedCellWidth
diff --git a/dev-lang/scala/files/scala-2.10.2-maven-deps.patch b/dev-lang/scala/files/scala-2.10.2-maven-deps.patch
new file mode 100644
index 000000000000..133a2a4f7576
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.2-maven-deps.patch
@@ -0,0 +1,70 @@
+--- scala-2.10.2-orig/build.xml 2013-05-31 00:44:27.000000000 +1000
++++ scala-2.10.2/build.xml 2013-08-30 22:48:11.727055000 +1000
+@@ -202,30 +202,19 @@
+ on repeated use of artifact:dependencies
+ -->
+ <if><not><isset property="maven-deps-done"></isset></not><then>
+- <mkdir dir="${user.home}/.m2/repository"/>
+- <!-- This task has an issue where if the user directory does not exist, so we create it above. UGH. -->
+- <artifact:dependencies pathId="extra.tasks.classpath" filesetId="extra.tasks.fileset">
+- <dependency groupId="biz.aQute" artifactId="bnd" version="1.50.0"/>
+- </artifact:dependencies>
++ <path id="extra.tasks.classpath">
++ <pathelement path="BNDLIB_CLASSPATH"></pathelement>
++ </path>
+
+ <!-- Pax runner -->
+- <property name="pax.exam.version" value="2.5.0"/>
+- <artifact:dependencies pathId="pax.exam.classpath" filesetId="pax.exam.fileset">
+- <dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-container-native" version="${pax.exam.version}"/>
+- <dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-junit4" version="${pax.exam.version}"/>
+- <dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-link-assembly" version="${pax.exam.version}"/>
+- <dependency groupId="org.ops4j.pax.url" artifactId="pax-url-aether" version="1.4.0"/>
+- <dependency groupId="org.ops4j.pax.swissbox" artifactId="pax-swissbox-framework" version="1.5.1"/>
+- <dependency groupId="ch.qos.logback" artifactId="logback-core" version="0.9.20"/>
+- <dependency groupId="ch.qos.logback" artifactId="logback-classic" version="0.9.20"/>
+- <dependency groupId="junit" artifactId="junit" version="4.10"/>
+- <dependency groupId="org.apache.felix" artifactId="org.apache.felix.framework" version="3.2.2"/>
+- </artifact:dependencies>
+-
+- <artifact:dependencies pathId="partest.extras.classpath" filesetId="partest.extras.fileset" versionsId="partest.extras.versions">
+- <dependency groupId="com.googlecode.java-diff-utils" artifactId="diffutils" version="1.3.0"/>
+- </artifact:dependencies>
+-
++ <path id="pax.exam.classpath">
++ <pathelement path="PAX_RUNNER_CLASSPATH"></pathelement>
++ </path>
++
++ <path id="partest.extras.classpath">
++ <pathelement path="DIFFUTILS_CLASSPATH"></pathelement>
++ </path>
++ <property name="partest.extras.versions" value="1.3.0"></property>
+ <!-- BND support -->
+ <typedef resource="aQute/bnd/ant/taskdef.properties" classpathref="extra.tasks.classpath" />
+
+@@ -1247,10 +1236,8 @@
+ <!-- depend on quick.done so quick.bin is run when pack.done is -->
+ <target name="pack.done" depends="quick.done, pack.bin">
+ <!-- copy dependencies to build/pack/lib, it only takes a second so don't bother with uptodate checks -->
+- <copy todir="${build-pack.dir}/lib">
+- <resources refid="partest.extras.fileset"/>
+- <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper"
+- from="${partest.extras.versions}" to="flatten"/>
++ <copy todir="${build-pack.dir}/lib" flatten="true">
++ <path><path refid="partest.extras.classpath"/></path>
+ </copy>
+
+ <taskdef resource="scala/tools/ant/antlib.xml" classpathref="pack.compiler.path"/>
+@@ -1769,10 +1756,8 @@
+ </fileset>
+ </copy>
+
+- <copy todir="${dist.dir}/lib">
+- <resources refid="partest.extras.fileset"/>
+- <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper"
+- from="${partest.extras.versions}" to="flatten"/>
++ <copy todir="${dist.dir}/lib" flatten="true">
++ <path><path refid="partest.extras.classpath"/></path>
+ </copy>
+
+ <mkdir dir="${dist.dir}/bin"/>
diff --git a/dev-lang/scala/files/scala-2.10.2-no-git.patch b/dev-lang/scala/files/scala-2.10.2-no-git.patch
new file mode 100644
index 000000000000..f1b83173036b
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.2-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.10.2-orig/tools/get-scala-commit-date 2013-05-31 00:44:27.000000000 +1000
++++ scala-2.10.2/tools/get-scala-commit-date 2013-08-20 20:26:34.859699000 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2013-05-31"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.10.2-orig/tools/get-scala-commit-sha 2013-05-31 00:44:27.000000000 +1000
++++ scala-2.10.2/tools/get-scala-commit-sha 2013-08-20 20:26:34.860152000 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="60d462ef6e0dba5f9a7c4cc81255fcb9fba7939a"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.10.3-no-git.patch b/dev-lang/scala/files/scala-2.10.3-no-git.patch
new file mode 100644
index 000000000000..8309cef7e3d2
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.3-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.10.3-orig/tools/get-scala-commit-date 2013-09-23 23:00:37.000000000 +1000
++++ scala-2.10.3/tools/get-scala-commit-date 2014-02-09 14:14:29.132553839 +1100
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2013-09-23"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.10.3-orig/tools/get-scala-commit-sha 2013-09-23 23:00:37.000000000 +1000
++++ scala-2.10.3/tools/get-scala-commit-sha 2014-02-09 14:08:46.878352444 +1100
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="e2fec6b28dfd73482945ffab85d9b582d0cb9f17"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.10.4-no-git.patch b/dev-lang/scala/files/scala-2.10.4-no-git.patch
new file mode 100644
index 000000000000..2efc8119015c
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.4-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.10.4-orig/tools/get-scala-commit-date 2014-02-10 04:00:20.000000000 +1100
++++ scala-2.10.4/tools/get-scala-commit-date 2014-07-05 18:19:38.054864707 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2014-02-10"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.10.4-orig/tools/get-scala-commit-sha 2014-02-10 04:00:20.000000000 +1100
++++ scala-2.10.4/tools/get-scala-commit-sha 2014-07-05 18:20:27.799470430 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="b66a39653b9bccab72036ba58fec5fd7d596d313"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.10.6-no-git.patch b/dev-lang/scala/files/scala-2.10.6-no-git.patch
new file mode 100644
index 000000000000..259ef787cf7c
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.6-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.10.6-orig/tools/get-scala-commit-date 2015-09-18 18:50:36.000000000 +1000
++++ scala-2.10.6/tools/get-scala-commit-date 2016-01-29 18:53:09.874767271 +1100
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2015-09-18"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.10.6-orig/tools/get-scala-commit-sha 2015-09-18 18:50:36.000000000 +1000
++++ scala-2.10.6/tools/get-scala-commit-sha 2016-01-29 18:53:44.097767230 +1100
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="bda53196ebbeb1369c70f3d1ec066796c06a6409"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.11.1-no-git.patch b/dev-lang/scala/files/scala-2.11.1-no-git.patch
new file mode 100644
index 000000000000..fbec47cd6c69
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.1-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.11.1-orig/tools/get-scala-commit-date 2014-05-19 21:01:18.000000000 +1000
++++ scala-2.11.1/tools/get-scala-commit-date 2014-07-06 16:47:04.772397561 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2014-05-19"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.11.1-orig/tools/get-scala-commit-sha 2014-05-19 21:01:18.000000000 +1000
++++ scala-2.11.1/tools/get-scala-commit-sha 2014-07-06 16:47:25.704741601 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="1e1defd99c4b8874c517daf877b583a81e056c15"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.11.11-no-git.patch b/dev-lang/scala/files/scala-2.11.11-no-git.patch
new file mode 100644
index 000000000000..b1012626c525
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.11-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.11.8-orig/tools/get-scala-commit-date 2016-03-04 21:57:12.000000000 +1100
++++ scala-2.11.8/tools/get-scala-commit-date 2016-09-16 10:29:09.215240534 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2016-03-04"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.11.8-orig/tools/get-scala-commit-sha 2016-03-04 21:57:12.000000000 +1100
++++ scala-2.11.8/tools/get-scala-commit-sha 2016-09-16 10:29:45.566119137 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="1706a37eb84ec252aea77bccebad3e48448534ad"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.11.2-no-git.patch b/dev-lang/scala/files/scala-2.11.2-no-git.patch
new file mode 100644
index 000000000000..87dbb8e4c8e3
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.2-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.11.2-orig/tools/get-scala-commit-date 2014-07-21 17:50:18.000000000 +1000
++++ scala-2.11.2/tools/get-scala-commit-date 2014-10-04 18:33:48.729779264 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2014-07-21"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.11.2-orig/tools/get-scala-commit-sha 2014-07-21 17:50:18.000000000 +1000
++++ scala-2.11.2/tools/get-scala-commit-sha 2014-10-04 18:34:32.541990564 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="73fb460c1cd20ee97556ec0867d17efaa795d129"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.11.4-no-git.patch b/dev-lang/scala/files/scala-2.11.4-no-git.patch
new file mode 100644
index 000000000000..275c140a2a10
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.4-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.11.4-orig/tools/get-scala-commit-date 2014-10-23 20:06:36.000000000 +1100
++++ scala-2.11.4/tools/get-scala-commit-date 2014-11-26 21:54:26.064081533 +1100
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2014-10-23"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.11.4-orig/tools/get-scala-commit-sha 2014-10-23 20:06:36.000000000 +1100
++++ scala-2.11.4/tools/get-scala-commit-sha 2014-11-26 21:55:12.248629566 +1100
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="d783face36a464498c4832acb059a61192dfb105"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.11.6-no-git.patch b/dev-lang/scala/files/scala-2.11.6-no-git.patch
new file mode 100644
index 000000000000..231632a3b177
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.6-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.11.6-orig/tools/get-scala-commit-date 2015-02-25 12:22:22.000000000 +1100
++++ scala-2.11.6/tools/get-scala-commit-date 2015-04-17 20:32:27.899791213 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2015-02-25"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.11.6-orig/tools/get-scala-commit-sha 2015-02-25 12:22:22.000000000 +1100
++++ scala-2.11.6/tools/get-scala-commit-sha 2015-04-17 20:32:03.655808474 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="092690e7bf71bb22e6e57afb7ea7f67fdfe31a0a"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.11.7-no-git.patch b/dev-lang/scala/files/scala-2.11.7-no-git.patch
new file mode 100644
index 000000000000..ea337b23849b
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.7-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.11.7-orig/tools/get-scala-commit-date 2015-06-23 04:27:36.000000000 +1000
++++ scala-2.11.7/tools/get-scala-commit-date 2015-07-04 11:53:24.696520666 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2015-06-23"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.11.7-orig/tools/get-scala-commit-sha 2015-06-23 04:27:36.000000000 +1000
++++ scala-2.11.7/tools/get-scala-commit-sha 2015-07-04 11:51:15.598526730 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="1fbce4612c21a4d0c553ea489b4765494828c09f"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.11.8-no-git.patch b/dev-lang/scala/files/scala-2.11.8-no-git.patch
new file mode 100644
index 000000000000..b1012626c525
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.8-no-git.patch
@@ -0,0 +1,24 @@
+--- scala-2.11.8-orig/tools/get-scala-commit-date 2016-03-04 21:57:12.000000000 +1100
++++ scala-2.11.8/tools/get-scala-commit-date 2016-09-16 10:29:09.215240534 +1000
+@@ -10,8 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+-lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
++lastcommitdate="2016-03-04"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.11.8-orig/tools/get-scala-commit-sha 2016-03-04 21:57:12.000000000 +1100
++++ scala-2.11.8/tools/get-scala-commit-sha 2016-09-16 10:29:45.566119137 +1000
+@@ -12,7 +12,7 @@
+
+ # printf %016s is not portable for 0-padding, has to be a digit.
+ # so we're stuck disassembling it.
+-hash=$(git log -1 --format="%H" HEAD)
++hash="1706a37eb84ec252aea77bccebad3e48448534ad"
+ hash=${hash#g}
+ hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.12.1-no-git.patch b/dev-lang/scala/files/scala-2.12.1-no-git.patch
new file mode 100644
index 000000000000..f5439e35aadc
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.12.1-no-git.patch
@@ -0,0 +1,37 @@
+--- scala-2.12.1-orig/tools/get-scala-commit-date 2016-12-05 20:45:09.000000000 +1100
++++ scala-2.12.1/tools/get-scala-commit-date 2016-12-27 16:41:41.695942033 +1100
+@@ -10,13 +10,8 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
+- lastcommitdate=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 1)
+- lastcommithours=$(git log --format="%ci" HEAD | head -n 1 | cut -d ' ' -f 2)
+-else
+- lastcommitdate=$(date +%Y-%m-%d)
+- lastcommithours=$(date +%H:%M:%S)
+-fi
++lastcommitdate="2016-12-05"
++lastcommithours="00:00:00"
+
+ # 20120324
+ echo "${lastcommitdate//-/}-${lastcommithours//:/}"
+--- scala-2.12.1-orig/tools/get-scala-commit-sha 2016-12-05 20:45:09.000000000 +1100
++++ scala-2.12.1/tools/get-scala-commit-sha 2016-12-27 16:44:07.393422207 +1100
+@@ -10,13 +10,7 @@
+
+ [[ $# -eq 0 ]] || cd "$1"
+
+-if git rev-parse --is-inside-work-tree > /dev/null 2>&1; then
+- # printf %016s is not portable for 0-padding, has to be a digit.
+- # so we're stuck disassembling it.
+- hash=$(git log -1 --format="%H" HEAD)
+- hash=${hash#g}
+- hash=${hash:0:10}
+-else
+- hash="unknown"
+-fi
++hash="2787b47396013a44072fa7321482103b66fbccd3"
++hash=${hash#g}
++hash=${hash:0:10}
+ echo "$hash"
diff --git a/dev-lang/scala/files/scala-2.12.1-runner-script.patch b/dev-lang/scala/files/scala-2.12.1-runner-script.patch
new file mode 100644
index 000000000000..9115a9810f67
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.12.1-runner-script.patch
@@ -0,0 +1,22 @@
+--- scala-2.12.1-orig/src/compiler/scala/tools/ant/templates/tool-unix.tmpl 2016-12-05 20:45:09.000000000 +1100
++++ scala-2.12.1/src/compiler/scala/tools/ant/templates/tool-unix.tmpl 2016-12-28 11:46:29.120052198 +1100
+@@ -197,14 +197,11 @@
+ # to java to suppress "." from materializing.
+ if [[ "$usebootcp" == "true" ]]; then
+ classpath_args=("-Xbootclasspath/a:$TOOL_CLASSPATH" -classpath "\"\"")
+- # Note that the version numbers go 1.7, 1.8, 9, 10, ...
+- java_release="$(cat $JAVA_HOME/release | grep JAVA_VERSION)"
+- if [[ ! "$java_release" =~ JAVA_VERSION=\"1\. ]]; then
+- # Java 9 removed sun.boot.class.path, and the supposed replacement to at least see
+- # the appended boot classpath (jdk.boot.class.path.append) is not visible.
+- # So we have to pass a custom system property that PathResolver will find.
+- classpath_args+=("-Dscala.boot.class.path=$TOOL_CLASSPATH")
+- fi
++ # Java 9 removed sun.boot.class.path, and the supposed replacement to at least see
++ # the appended boot classpath (jdk.boot.class.path.append) is not visible.
++ # So we have to pass a custom system property that PathResolver will find.
++ # We do this for all JVM versions, rather than getting into the business of JVM version detection.
++ classpath_args+=("-Dscala.boot.class.path=$TOOL_CLASSPATH")
+ else
+ classpath_args=(-classpath "$TOOL_CLASSPATH")
+ fi
diff --git a/dev-lang/scala/files/scala-2.12.2-no-git.patch b/dev-lang/scala/files/scala-2.12.2-no-git.patch
new file mode 100644
index 000000000000..1c09bf6ba866
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.12.2-no-git.patch
@@ -0,0 +1,23 @@
+--- scala-2.12.2-orig/project/VersionUtil.scala 2017-04-13 02:16:08.000000000 +1000
++++ scala-2.12.2/project/VersionUtil.scala 2017-05-04 23:45:50.715285243 +1000
+@@ -80,18 +80,8 @@
+
+ val (dateObj, sha) = {
+ try {
+- // Use JGit to get the commit date and SHA
+- import org.eclipse.jgit.storage.file.FileRepositoryBuilder
+- import org.eclipse.jgit.revwalk.RevWalk
+- val db = new FileRepositoryBuilder().findGitDir.build
+- val head = db.resolve("HEAD")
+- if(head eq null) {
+- log.info("No git HEAD commit found -- Using current date and 'unknown' SHA")
+- (new Date, "unknown")
+- } else {
+- val commit = new RevWalk(db).parseCommit(head)
+- (new Date(commit.getCommitTime.toLong * 1000L), commit.getName.substring(0, 7))
+- }
++ val commit = "21d12e9f5ec1ffe023f509848911476c1552d06f"
++ (new Date, commit.substring(0, 7))
+ } catch { case ex: Exception =>
+ log.error("Could not determine commit date + SHA: "+ex)
+ log.trace(ex)
diff --git a/dev-lang/scala/files/scala-2.9.2-java7.patch b/dev-lang/scala/files/scala-2.9.2-java7.patch
new file mode 100644
index 000000000000..1cf8c8befe64
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.9.2-java7.patch
@@ -0,0 +1,198 @@
+diff -Nru scala-2.9.2-sources/src/swing/scala/swing/ComboBox.scala scala-2.9.2-sources-gil/src/swing/scala/swing/ComboBox.scala
+--- scala-2.9.2-sources/src/swing/scala/swing/ComboBox.scala 2012-03-18 17:09:24.000000000 +0100
++++ scala-2.9.2-sources-gil/src/swing/scala/swing/ComboBox.scala 2012-11-23 17:09:08.353124190 +0100
+@@ -11,7 +11,7 @@
+ package scala.swing
+
+ import event._
+-import javax.swing.{JList, JComponent, JComboBox, JTextField, ComboBoxModel, AbstractListModel, ListCellRenderer}
++import javax.swing.{ JComponent, JComboBox, JTextField, ComboBoxModel, AbstractListModel, ListCellRenderer }
+ import java.awt.event.ActionListener
+
+ object ComboBox {
+@@ -120,10 +120,10 @@
+ implicit def floatEditor(c: ComboBox[Float]): Editor[Float] = new BuiltInEditor(c)(s => s.toFloat, s => s.toString)
+ implicit def doubleEditor(c: ComboBox[Double]): Editor[Double] = new BuiltInEditor(c)(s => s.toDouble, s => s.toString)
+
+- def newConstantModel[A](items: Seq[A]): ComboBoxModel = {
+- new AbstractListModel with ComboBoxModel {
++ def newConstantModel[A](items: Seq[A]): ComboBoxModel[A] = {
++ new AbstractListModel[A] with ComboBoxModel[A] {
+ private var selected: A = if (items.isEmpty) null.asInstanceOf[A] else items(0)
+- def getSelectedItem: AnyRef = selected.asInstanceOf[AnyRef]
++ def getSelectedItem = selected.asInstanceOf[AnyRef]
+ def setSelectedItem(a: Any) {
+ if ((selected != null && selected != a) ||
+ selected == null && a != null) {
+@@ -131,7 +131,7 @@
+ fireContentsChanged(this, -1, -1)
+ }
+ }
+- def getElementAt(n: Int) = items(n).asInstanceOf[AnyRef]
++ def getElementAt(n: Int) = items(n).asInstanceOf[A]
+ def getSize = items.size
+ }
+ }
+@@ -159,7 +159,7 @@
+ * @see javax.swing.JComboBox
+ */
+ class ComboBox[A](items: Seq[A]) extends Component with Publisher {
+- override lazy val peer: JComboBox = new JComboBox(ComboBox.newConstantModel(items)) with SuperMixin
++ override lazy val peer: JComboBox[A] = new JComboBox(ComboBox.newConstantModel(items)) with SuperMixin
+
+ object selection extends Publisher {
+ def index: Int = peer.getSelectedIndex
+@@ -184,7 +184,8 @@
+ * of the component to its own defaults _after_ the renderer has been
+ * configured. That's Swing's principle of most suprise.
+ */
+- def renderer: ListView.Renderer[A] = ListView.Renderer.wrap(peer.getRenderer)
++ def renderer: ListView.Renderer[A] = ListView.Renderer.wrap[A](peer.getRenderer.asInstanceOf[ListCellRenderer[A]])
++ // def renderer: ListView.Renderer[A] = ListView.Renderer.wrap(peer.getRenderer)
+ def renderer_=(r: ListView.Renderer[A]) { peer.setRenderer(r.peer) }
+
+ /* XXX: currently not safe to expose:
+@@ -203,8 +204,8 @@
+ peer.setEditor(editor(this).comboBoxPeer)
+ }
+
+- def prototypeDisplayValue: Option[A] = toOption[A](peer.getPrototypeDisplayValue)
++ def prototypeDisplayValue: Option[A] = Option(peer.getPrototypeDisplayValue)
+ def prototypeDisplayValue_=(v: Option[A]) {
+- peer.setPrototypeDisplayValue(v map toAnyRef orNull)
++ peer.setPrototypeDisplayValue((v map toAnyRef).orNull.asInstanceOf[A])
+ }
+ }
+diff -Nru scala-2.9.2-sources/src/swing/scala/swing/ListView.scala scala-2.9.2-sources-gil/src/swing/scala/swing/ListView.scala
+--- scala-2.9.2-sources/src/swing/scala/swing/ListView.scala 2012-03-18 17:09:26.000000000 +0100
++++ scala-2.9.2-sources-gil/src/swing/scala/swing/ListView.scala 2012-11-23 17:20:45.704030454 +0100
+@@ -24,21 +24,21 @@
+ val MultiInterval = Value(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
+ }
+
+- def wrap[A](c: JList) = new ListView[A] {
++ def wrap[A](c: JList[A]) = new ListView[A] {
+ override lazy val peer = c
+ }
+
+ object Renderer {
+- def wrap[A](r: ListCellRenderer): Renderer[A] = new Wrapped[A](r)
++ def wrap[A](r: ListCellRenderer[A]): Renderer[A] = new Wrapped[A](r)
+
+ /**
+ * Wrapper for <code>javax.swing.ListCellRenderer<code>s
+ */
+- class Wrapped[A](override val peer: ListCellRenderer) extends Renderer[A] {
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int) = {
++ class Wrapped[A](override val peer: ListCellRenderer[A]) extends Renderer[A] {
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int) = {
+ Component.wrap(peer.getListCellRendererComponent(list.peer, a, index, isSelected, focused).asInstanceOf[JComponent])
++ }
+ }
+- }
+
+ /**
+ * Returns a renderer for items of type <code>A</code>. The given function
+@@ -55,8 +55,8 @@
+ * </code>
+ */
+ def apply[A,B](f: A => B)(implicit renderer: Renderer[B]): Renderer[A] = new Renderer[A] {
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component =
+- renderer.componentFor(list, isSelected, focused, f(a), index)
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component =
++ renderer.componentFor(list.asInstanceOf[ListView[_ <: B]], isSelected, focused, f(a), index)
+ }
+ }
+
+@@ -69,11 +69,11 @@
+ * @see javax.swing.ListCellRenderer
+ */
+ abstract class Renderer[-A] {
+- def peer: ListCellRenderer = new ListCellRenderer {
+- def getListCellRendererComponent(list: JList, a: Any, index: Int, isSelected: Boolean, focused: Boolean) =
+- componentFor(ListView.wrap[A](list), isSelected, focused, a.asInstanceOf[A], index).peer
++ def peer: ListCellRenderer[_ >: A] = new ListCellRenderer[A] {
++ def getListCellRendererComponent(list: JList[_ <: A], a: A, index: Int, isSelected: Boolean, focused: Boolean) =
++ componentFor(ListView.wrap[A](list.asInstanceOf[JList[A]]), isSelected, focused, a, index).peer
+ }
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component
+ }
+
+ /**
+@@ -110,7 +110,7 @@
+ /**
+ * Configures the component before returning it.
+ */
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component = {
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component = {
+ preConfigure(list, isSelected, focused, a, index)
+ configure(list, isSelected, focused, a, index)
+ component
+@@ -123,10 +123,10 @@
+ * that renders the string returned from an item's <code>toString</code>.
+ */
+ implicit object GenericRenderer extends Renderer[Any] {
+- override lazy val peer: ListCellRenderer = new DefaultListCellRenderer
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: Any, index: Int): Component = {
+- val c = peer.getListCellRendererComponent(list.peer, a, index, isSelected, focused).asInstanceOf[JComponent]
+- Component.wrap(c)
++ override lazy val peer: ListCellRenderer[Any] = (new DefaultListCellRenderer).asInstanceOf[ListCellRenderer[Any]]
++ def componentFor(list: ListView[_ <: Any], isSelected: Boolean, focused: Boolean, a: Any, index: Int): Component = {
++ val c = peer.getListCellRendererComponent(list.peer, a, index, isSelected, focused)
++ Component.wrap(c.asInstanceOf[JComponent])
+ }
+ }
+ }
+@@ -142,34 +142,34 @@
+ */
+ class ListView[A] extends Component {
+ import ListView._
+- override lazy val peer: JList = new JList with SuperMixin
++ override lazy val peer: JList[A] = new JList[A] with SuperMixin
+
+ def this(items: Seq[A]) = {
+ this()
+ listData = items
+ }
+
+- protected class ModelWrapper(val items: Seq[A]) extends AbstractListModel {
+- def getElementAt(n: Int) = items(n).asInstanceOf[AnyRef]
++ protected class ModelWrapper[A](val items: Seq[A]) extends AbstractListModel[A] {
++ def getElementAt(n: Int) = items(n)
+ def getSize = items.size
+ }
+
+ def listData: Seq[A] = peer.getModel match {
+- case model: ModelWrapper => model.items
+- case model @ _ => new Seq[A] { selfSeq =>
++ case model: ModelWrapper[a] => model.items
++ case model => new Seq[A] { selfSeq =>
+ def length = model.getSize
+ def iterator = new Iterator[A] {
+ var idx = 0
+ def next = { idx += 1; apply(idx-1) }
+ def hasNext = idx < selfSeq.length
+ }
+- def apply(n: Int) = model.getElementAt(n).asInstanceOf[A]
++ def apply(n: Int): A = model.getElementAt(n)
+ }
+ }
+
+ def listData_=(items: Seq[A]) {
+- peer.setModel(new AbstractListModel {
+- def getElementAt(n: Int) = items(n).asInstanceOf[AnyRef]
++ peer.setModel(new AbstractListModel[A] {
++ def getElementAt(n: Int) = items(n)
+ def getSize = items.size
+ })
+ }
+@@ -227,7 +227,7 @@
+ def adjusting = peer.getSelectionModel.getValueIsAdjusting
+ }
+
+- def renderer: ListView.Renderer[A] = ListView.Renderer.wrap(peer.getCellRenderer)
++ def renderer: ListView.Renderer[A] = ListView.Renderer.wrap[A](peer.getCellRenderer.asInstanceOf[ListCellRenderer[A]])
+ def renderer_=(r: ListView.Renderer[A]) { peer.setCellRenderer(r.peer) }
+
+ def fixedCellWidth = peer.getFixedCellWidth
diff --git a/dev-lang/scala/metadata.xml b/dev-lang/scala/metadata.xml
new file mode 100644
index 000000000000..c9aa3c0473c0
--- /dev/null
+++ b/dev-lang/scala/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>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+ <use>
+ <flag name="binary">Install from (Gentoo-compiled) binary instead of building from sources. Set this when you run out of memory during build.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">scala/scala</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/scala/scala-2.10.2-r3.ebuild b/dev-lang/scala/scala-2.10.2-r3.ebuild
new file mode 100644
index 000000000000..819b19c36886
--- /dev/null
+++ b/dev-lang/scala/scala-2.10.2-r3.ebuild
@@ -0,0 +1,253 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc examples source"
+WANT_ANT_TASKS="ant-nodeps"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.6" USE="doc examples source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# fix dist/latest link.
+# tar -cjf $DISTDIR/scala-$PN-gentoo-binary.tar.bz2 ${MY_P}/dists ${MY_P}/docs/TODO
+
+# in the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI.
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=(${BURI}/8bdac1cdd60b73ff7e12fd2b556355fa10343e2d/lib/scala-library-src.jar \
+ ${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar \
+ ${BURI}/d48cb950ceded82a5e0ffae8ef2c68d0923ed00c/lib/msil.jar \
+ ${BURI}/d229f4c91ea8ab1a81559b5803efd9b0b1632f0b/lib/scala-reflect-src.jar \
+ ${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar \
+ ${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar \
+ ${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar \
+ ${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar \
+ ${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar \
+ ${BURI}/cfa3ee21f76cd5c115bd3bc070a3b401587bafb5/lib/scala-compiler-src.jar \
+ ${BURI}/1e0e39fae15b42e85998740511ec5a3830e26243/lib/scala-library.jar \
+ ${BURI}/8acc87f222210b4a5eb2675477602fc1759e7684/lib/fjbg.jar \
+ ${BURI}/288f47dbe1002653e030fd25ca500b9ffe1ebd64/lib/scala-reflect.jar \
+ ${BURI}/a5261e70728c1847639e2b47d953441d0b217bcb/lib/jline.jar \
+ ${BURI}/d54b99f215d4d42b3f0b3489fbb1081270700992/lib/scala-compiler.jar \
+ ${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar \
+ ${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar \
+ ${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar \
+ ${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar \
+ ${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar \
+ ${BURI}/b6f4dbb29f0c2ec1eba682414f60d52fea84f703/test/files/lib/scalacheck.jar \
+ ${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar \
+ ${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar \
+ ${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( https://dev.gentoo.org/~tomwij/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/bndlib:0
+ dev-java/hawtjni-runtime:0
+ dev-java/junit:4"
+
+DEPEND="${COMMON_DEP}
+ =virtual/jdk-1.7*
+ !binary? (
+ dev-java/ant-contrib:0
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.7
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ if use binary ; then
+ mkdir -p "${S}" || die
+ cd "${S}" || die
+ fi
+
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,bndlib,hawtjni-runtime,junit-4
+
+ if ! use binary; then
+ local j
+ for j in "${JURI[@]}"
+ do
+ cp -p "${DISTDIR}/${j##*/}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${PN}-2.10.2-no-git.patch"
+ if has_version ">=virtual/jdk-1.7.0"; then
+ # This patch bumped to 2.10.2: http://pkgs.fedoraproject.org/cgit/scala.git/tree/scala-2.10.0-java7.patch
+ epatch "${FILESDIR}/${PN}-2.10.2-jdk-1.7-swing.patch"
+ fi
+ # https://issues.scala-lang.org/browse/SI-7455
+ epatch "${FILESDIR}/${PN}-2.10.2-jdk-1.7-swing-SI-7455.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. comment out applying the maven-deps patch and all the stuff here up to and including the sed of build.xml
+ # 3. try emerge scala, it will likely download more stuff in src_compile to ${WORKDIR}/.m2
+ # 4. tar up the stuff in ${WORKDIR}/.m2 and change the ${P}-maven-deps.tar.gz in SRC_URI to point to it.
+ # 5. uncomment the maven-deps patch apply and all the stuff up to and including the sed of build.xml
+ # 6. the hash in ${P}-no-git.patch should be updated by searching for hash matching the scala release
+ # tag, so that the source code hyper-links in the scala documentation will point to the correct version of
+ # the source code.
+ # Bug 482192
+ epatch "${FILESDIR}/${PN}-2.10.2-maven-deps.patch"
+ # we have $(java-config -p bndlib) in portage, but not bnd.
+ local bnd_classpath=""
+ for i in $(find "${WORKDIR}/.m2/repository/biz/aQute/bnd" -type f -name *.jar -print)
+ do
+ if [ -z "${bnd_classpath}" ]
+ then
+ bnd_classpath="${i}"
+ else
+ bnd_classpath="${bnd_classpath}:${i}"
+ fi
+ done
+ bnd_classpath="${bnd_classpath}:$(java-config -p bndlib)"
+
+ # pax runner appears to only be used in the tests
+ local paxrunner_classpath=""
+ for i in $(find "${WORKDIR}/.m2/repository/org/ops4j/" -type f -name *.jar -print)
+ do
+ if [ -z "${paxrunner_classpath}" ]
+ then
+ paxrunner_classpath="${i}"
+ else
+ paxrunner_classpath="${paxrunner_classpath}:${i}"
+ fi
+ done
+ paxrunner_classpath="${paxrunner_classpath}:$(java-config -p junit-4)"
+
+ # DiffUtils does not appear to be in portage. It is placed in ${partest.extras.classpath} and
+ # copied to ${build-pack.dir}/lib in ${PN}-2.10.2-maven-deps.patch.
+ local diffutils_classpath=""
+ for i in $(find "${WORKDIR}/.m2/repository/com/googlecode/java-diff-utils" -type f -name *.jar -print)
+ do
+ if [ -z "${diffutils_classpath}" ]
+ then
+ diffutils_classpath="${i}"
+ else
+ diffutils_classpath="${diffutils_classpath}:${i}"
+ fi
+ done
+
+ sed -e "s@BNDLIB_CLASSPATH@${bnd_classpath}@" \
+ -e "s@PAX_RUNNER_CLASSPATH@${paxrunner_classpath}@" \
+ -e "s@DIFFUTILS_CLASSPATH@${diffutils_classpath}@" \
+ -i "${S}/build.xml" \
+ || die "could not sed classpaths in build.xml"
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Djava6.home=${JAVA_HOME} \
+ -Duser.home="${WORKDIR}" build-opt
+ eant dist.done
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ cd dists/latest || die
+
+ local SCALADIR="/usr/share/${PN}-${SV}"
+
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+
+ #sources are .scala so no use for java-pkg_dosrc
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins src/*-src.jar
+ fi
+
+ java-pkg_dojar lib/*.jar
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+
+ #docs and examples are not contained in the binary tgz anymore
+ if ! use binary; then
+ local docdir="doc/${PN}-devel-docs"
+ dodoc doc/README ../../docs/TODO
+ if use doc; then
+ java-pkg_dojavadoc "${docdir}/api"
+ dohtml -r "${docdir}/tools"
+ fi
+
+ use examples && java-pkg_doexamples "${docdir}/examples"
+ fi
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "/usr/share/${PN}-${SV}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+}
diff --git a/dev-lang/scala/scala-2.10.3-r2.ebuild b/dev-lang/scala/scala-2.10.3-r2.ebuild
new file mode 100644
index 000000000000..4318fb95cf71
--- /dev/null
+++ b/dev-lang/scala/scala-2.10.3-r2.ebuild
@@ -0,0 +1,224 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc examples source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.6" USE="doc examples source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# fix dist/latest link.
+# tar -cjf $DISTDIR/scala-$PN-gentoo-binary.tar.bz2 ${MY_P}/dists ${MY_P}/docs/TODO
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=( \
+ ${BURI}/8b6ba65c8146217333f0762087fe2340d572e832/docs/examples/plugintemplate/lib/scalatest.jar \
+ ${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar \
+ ${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar \
+ ${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar \
+ ${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar \
+ ${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar \
+ ${BURI}/8acc87f222210b4a5eb2675477602fc1759e7684/lib/fjbg.jar \
+ ${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar \
+ ${BURI}/a5261e70728c1847639e2b47d953441d0b217bcb/lib/jline.jar \
+ ${BURI}/d48cb950ceded82a5e0ffae8ef2c68d0923ed00c/lib/msil.jar \
+ ${BURI}/cfa3ee21f76cd5c115bd3bc070a3b401587bafb5/lib/scala-compiler-src.jar \
+ ${BURI}/d54b99f215d4d42b3f0b3489fbb1081270700992/lib/scala-compiler.jar \
+ ${BURI}/8bdac1cdd60b73ff7e12fd2b556355fa10343e2d/lib/scala-library-src.jar \
+ ${BURI}/1e0e39fae15b42e85998740511ec5a3830e26243/lib/scala-library.jar \
+ ${BURI}/d229f4c91ea8ab1a81559b5803efd9b0b1632f0b/lib/scala-reflect-src.jar
+ ${BURI}/288f47dbe1002653e030fd25ca500b9ffe1ebd64/lib/scala-reflect.jar \
+ ${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar \
+ ${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar \
+ ${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar \
+ ${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar \
+ ${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar \
+ ${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar \
+ ${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar \
+ ${BURI}/b6f4dbb29f0c2ec1eba682414f60d52fea84f703/test/files/lib/scalacheck.jar \
+ ${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar \
+ ${BURI}/f174c50c4363c492362a05c72dd45b0da18fdcd8/test/pending/neg/plugin-after-terminal/lib/plugins.jar \
+ ${BURI}/d7b100ad483484b598b7cd643424bd2e33898a0d/test/pending/neg/plugin-before-parser/lib/plugins.jar \
+ ${BURI}/7e6be9e33a87194e7061f94f6be115619f91ada2/test/pending/neg/plugin-cyclic-dependency/lib/plugins.jar \
+ ${BURI}/2bda582b574287429ad5ee2e1d9a3effc88b0a5f/test/pending/neg/plugin-multiple-rafter/lib/plugins.jar \
+ ${BURI}/af91fd67ccef349e7f8ea662615e17796a339485/test/pending/neg/plugin-rafter-before-1/lib/plugins.jar \
+ ${BURI}/8cccde4914da2058dca893783c231cda23855603/test/pending/neg/plugin-rightafter-terminal/lib/plugins.jar \
+ ${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar \
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+ https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps-2.tar.gz
+)
+binary? ( https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ =virtual/jdk-1.7*
+ !binary? (
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.7
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ if use binary ; then
+ mkdir -p "${S}" || die
+ cd "${S}" || die
+ fi
+
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local j
+ for j in "${JURI[@]}"
+ do
+ cp -p "${DISTDIR}/${j##*/}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ if java-pkg_is-vm-version-ge "1.7" ; then
+ # This patch bumped to 2.10.2: http://pkgs.fedoraproject.org/cgit/scala.git/tree/scala-2.10.0-java7.patch
+ epatch "${FILESDIR}/${PN}-2.10.2-jdk-1.7-swing.patch"
+ sed -e "s@above is a message from the scala 2.10.2 release@above is a message from the scala ${PV} release@" \
+ -i "${S}/build.xml" \
+ || die "Could not correct scala version message"
+ fi
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
+ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
+ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
+ -i "${S}/build.xml" \
+ || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
+
+ # Remove this test as it fails.
+ # [partest] testing: [...]/files/run/parserJavaIdent.scala [FAILED]
+ rm -f test/files/run/parserJavaIdent.scala
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Djava6.home=${JAVA_HOME} \
+ -Duser.home="${WORKDIR}" build-opt
+ eant dist.done
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ cd dists/latest || die
+
+ local SCALADIR="/usr/share/${PN}-${SV}"
+
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+
+ #sources are .scala so no use for java-pkg_dosrc
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins src/*-src.jar
+ fi
+
+ java-pkg_dojar lib/*.jar
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+
+ local docdir="doc/${PN}-devel-docs"
+ dodoc doc/README ../../docs/TODO
+ if use doc; then
+ java-pkg_dojavadoc "${docdir}/api"
+ dohtml -r "${docdir}/tools"
+ fi
+
+ use examples && java-pkg_doexamples "${docdir}/examples"
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "/usr/share/${PN}-${SV}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+}
diff --git a/dev-lang/scala/scala-2.10.4-r2.ebuild b/dev-lang/scala/scala-2.10.4-r2.ebuild
new file mode 100644
index 000000000000..34d9c84c03c8
--- /dev/null
+++ b/dev-lang/scala/scala-2.10.4-r2.ebuild
@@ -0,0 +1,223 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.6" USE="doc source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# fix dist/latest link.
+# tar -cjf $DISTDIR/scala-$PN-gentoo-binary.tar.bz2 ${MY_P}/dists ${MY_P}/docs/README ${MY_P}/docs/TODO ${MY_P}/build/scaladoc
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=( \
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar" \
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar" \
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar" \
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar" \
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar" \
+ "${BURI}/8acc87f222210b4a5eb2675477602fc1759e7684/lib/fjbg.jar -> ${P}-fjbg.jar" \
+ "${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> ${P}-forkjoin.jar" \
+ "${BURI}/a5261e70728c1847639e2b47d953441d0b217bcb/lib/jline.jar -> ${P}-jline.jar" \
+ "${BURI}/d48cb950ceded82a5e0ffae8ef2c68d0923ed00c/lib/msil.jar -> ${P}-msil.jar" \
+ "${BURI}/cfa3ee21f76cd5c115bd3bc070a3b401587bafb5/lib/scala-compiler-src.jar -> ${P}-scala-compiler-src.jar" \
+ "${BURI}/d54b99f215d4d42b3f0b3489fbb1081270700992/lib/scala-compiler.jar -> ${P}-scala-compiler.jar" \
+ "${BURI}/8bdac1cdd60b73ff7e12fd2b556355fa10343e2d/lib/scala-library-src.jar -> ${P}-scala-library-src.jar" \
+ "${BURI}/1e0e39fae15b42e85998740511ec5a3830e26243/lib/scala-library.jar -> ${P}-scala-library.jar" \
+ "${BURI}/d229f4c91ea8ab1a81559b5803efd9b0b1632f0b/lib/scala-reflect-src.jar -> ${P}-scala-reflect-src.jar" \
+ "${BURI}/288f47dbe1002653e030fd25ca500b9ffe1ebd64/lib/scala-reflect.jar -> ${P}-scala-reflect.jar" \
+ "${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.jar" \
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar" \
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar" \
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar" \
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar" \
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar" \
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar" \
+ "${BURI}/b6f4dbb29f0c2ec1eba682414f60d52fea84f703/test/files/lib/scalacheck.jar -> ${P}-scalacheck.jar" \
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar" \
+ "${BURI}/f174c50c4363c492362a05c72dd45b0da18fdcd8/test/pending/neg/plugin-after-terminal/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/d7b100ad483484b598b7cd643424bd2e33898a0d/test/pending/neg/plugin-before-parser/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/7e6be9e33a87194e7061f94f6be115619f91ada2/test/pending/neg/plugin-cyclic-dependency/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/2bda582b574287429ad5ee2e1d9a3effc88b0a5f/test/pending/neg/plugin-multiple-rafter/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/af91fd67ccef349e7f8ea662615e17796a339485/test/pending/neg/plugin-rafter-before-1/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/8cccde4914da2058dca893783c231cda23855603/test/pending/neg/plugin-rightafter-terminal/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.jar" \
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ =virtual/jdk-1.7*
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ =virtual/jdk-1.7*
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.7
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ if java-pkg_is-vm-version-ge "1.7" ; then
+ # This patch bumped to 2.10.2: http://pkgs.fedoraproject.org/cgit/scala.git/tree/scala-2.10.0-java7.patch
+ epatch "${FILESDIR}/${PN}-2.10.2-jdk-1.7-swing.patch"
+ sed -e "s@above is a message from the scala 2.10.2 release@above is a message from the scala ${PV} release@" \
+ -i "${S}/build.xml" \
+ || die "Could not correct scala version message"
+ fi
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
+ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
+ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
+ -i "${S}/build.xml" \
+ || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
+ # Remove this test as it fails.
+ # [partest] testing: [...]/files/run/parserJavaIdent.scala [FAILED]
+ rm -f test/files/run/parserJavaIdent.scala
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Djava6.home=${JAVA_HOME} \
+ -Duser.home="${WORKDIR}" build-opt
+ eant dist.done
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ pushd dists/latest || die
+
+ local SCALADIR="/usr/share/${PN}-${SV}"
+
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+
+ #sources are .scala so no use for java-pkg_dosrc
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins src/*-src.jar
+ fi
+
+ java-pkg_dojar lib/*.jar
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "/usr/share/${PN}-${SV}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+
+ popd
+ local docdir="build/scaladoc"
+ dodoc docs/README docs/TODO
+ if use doc; then
+ dohtml -r "${docdir}"
+ fi
+}
diff --git a/dev-lang/scala/scala-2.10.6.ebuild b/dev-lang/scala/scala-2.10.6.ebuild
new file mode 100644
index 000000000000..35b0806eeb1c
--- /dev/null
+++ b/dev-lang/scala/scala-2.10.6.ebuild
@@ -0,0 +1,223 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.6" USE="doc source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# fix dist/latest link.
+# tar -cjf $DISTDIR/scala-$PN-gentoo-binary.tar.bz2 ${MY_P}/dists ${MY_P}/docs/README ${MY_P}/docs/TODO ${MY_P}/build/scaladoc
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=( \
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar" \
+ "${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.jar" \
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar" \
+ "${BURI}/1e0e39fae15b42e85998740511ec5a3830e26243/lib/scala-library.jar -> ${P}-scala-library.jar" \
+ "${BURI}/288f47dbe1002653e030fd25ca500b9ffe1ebd64/lib/scala-reflect.jar -> ${P}-scala-reflect.jar" \
+ "${BURI}/2bda582b574287429ad5ee2e1d9a3effc88b0a5f/test/pending/neg/plugin-multiple-rafter/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar" \
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar" \
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar" \
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar" \
+ "${BURI}/7e6be9e33a87194e7061f94f6be115619f91ada2/test/pending/neg/plugin-cyclic-dependency/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/8acc87f222210b4a5eb2675477602fc1759e7684/lib/fjbg.jar -> ${P}-fjbg.jar" \
+ "${BURI}/8bdac1cdd60b73ff7e12fd2b556355fa10343e2d/lib/scala-library-src.jar -> ${P}-scala-library-src.jar" \
+ "${BURI}/8cccde4914da2058dca893783c231cda23855603/test/pending/neg/plugin-rightafter-terminal/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar" \
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar" \
+ "${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.jar" \
+ "${BURI}/a5261e70728c1847639e2b47d953441d0b217bcb/lib/jline.jar -> ${P}-jline.jar" \
+ "${BURI}/af91fd67ccef349e7f8ea662615e17796a339485/test/pending/neg/plugin-rafter-before-1/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar" \
+ "${BURI}/b6f4dbb29f0c2ec1eba682414f60d52fea84f703/test/files/lib/scalacheck.jar -> ${P}-scalacheck.jar" \
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar" \
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar" \
+ "${BURI}/cfa3ee21f76cd5c115bd3bc070a3b401587bafb5/lib/scala-compiler-src.jar -> ${P}-scala-compiler-src.jar" \
+ "${BURI}/d229f4c91ea8ab1a81559b5803efd9b0b1632f0b/lib/scala-reflect-src.jar -> ${P}-scala-reflect-src.jar" \
+ "${BURI}/d48cb950ceded82a5e0ffae8ef2c68d0923ed00c/lib/msil.jar -> ${P}-msil.jar" \
+ "${BURI}/d54b99f215d4d42b3f0b3489fbb1081270700992/lib/scala-compiler.jar -> ${P}-scala-compiler.jar" \
+ "${BURI}/d7b100ad483484b598b7cd643424bd2e33898a0d/test/pending/neg/plugin-before-parser/lib/plugins.jar -> ${P}-plugins.jar" \
+ "${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> ${P}-forkjoin.jar" \
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar" \
+ "${BURI}/f174c50c4363c492362a05c72dd45b0da18fdcd8/test/pending/neg/plugin-after-terminal/lib/plugins.jar -> ${P}-plugins.jar"
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ =virtual/jdk-1.7*
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ =virtual/jdk-1.7*
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.7
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ if java-pkg_is-vm-version-ge "1.7" ; then
+ # This patch bumped to 2.10.2: http://pkgs.fedoraproject.org/cgit/scala.git/tree/scala-2.10.0-java7.patch
+ epatch "${FILESDIR}/${PN}-2.10.2-jdk-1.7-swing.patch"
+ sed -e "s@above is a message from the scala 2.10.2 release@above is a message from the scala ${PV} release@" \
+ -i "${S}/build.xml" \
+ || die "Could not correct scala version message"
+ fi
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
+ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
+ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
+ -i "${S}/build.xml" \
+ || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
+ # Remove this test as it fails.
+ # [partest] testing: [...]/files/run/parserJavaIdent.scala [FAILED]
+ rm -f test/files/run/parserJavaIdent.scala
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Djava6.home=${JAVA_HOME} \
+ -Duser.home="${WORKDIR}" build-opt
+ eant dist.done
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ pushd dists/latest || die
+
+ local SCALADIR="/usr/share/${PN}-${SV}"
+
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+
+ #sources are .scala so no use for java-pkg_dosrc
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins src/*-src.jar
+ fi
+
+ java-pkg_dojar lib/*.jar
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "/usr/share/${PN}-${SV}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+
+ popd
+ local docdir="build/scaladoc"
+ dodoc docs/README docs/TODO
+ if use doc; then
+ dohtml -r "${docdir}"
+ fi
+}
diff --git a/dev-lang/scala/scala-2.11.1-r2.ebuild b/dev-lang/scala/scala-2.11.1-r2.ebuild
new file mode 100644
index 000000000000..790709d5036d
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.1-r2.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.6" USE="doc source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# tar -cjf scala-2.11.1-gentoo-binary.tar.bz2 scala-2.11.1/build/pack/bin \
+# scala-2.11.1/build/pack/lib/ scala-2.11.1/build/pack/man \
+# scala-2.11.1/src/actors/ scala-2.11.1/src/forkjoin/ \
+# scala-2.11.1/src/library scala-2.11.1/src/library-aux/ \
+# scala-2.11.1/src/reflect/ scala-2.11.1/docs/TODO \
+# scala-2.11.1/doc/README scala-2.11.1/build/scaladoc/compiler
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=( \
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar" \
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar" \
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar" \
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar" \
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar" \
+ "${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> ${P}-forkjoin.jar" \
+ "${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.jar" \
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar" \
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar" \
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar" \
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar" \
+ "${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar" \
+ "${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar" \
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar" \
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar" \
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar" \
+ "${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.jar" \
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.7
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
+ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
+ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
+ -i "${S}/build.xml" \
+ || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ fastdist-opt
+ if use doc; then
+ # The separate build for doc is to workaround this problem that occurs
+ # with one "fastdist docscomp" build (still fails with MaxPermSize=384M)
+ # java.lang.OutOfMemoryError: PermGen space
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docscomp
+ fi
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ pushd build/pack || die
+ local SCALADIR="/usr/share/${PN}-${SV}"
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+ dodir "${SCALADIR}/lib"
+ insinto "${SCALADIR}/lib"
+ pushd lib || die
+ for j in *.jar; do
+ local i="$(echo "${j}" | sed -e "s@[_-][0-9.-]*\.jar@.jar@")"
+ newins "${j}" "${i}"
+ java-pkg_regjar "${ED}${SCALADIR}/lib/${i}"
+ done
+ popd
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+ popd
+
+ #sources are .scala so no use for java-pkg_dosrc
+ pushd src || die
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins -r actors forkjoin library library-aux reflect
+ fi
+ popd
+
+ local docdir="build/scaladoc/compiler"
+ dodoc docs/TODO doc/README
+ if use doc; then
+ dohtml -r "${docdir}"
+ fi
+}
diff --git a/dev-lang/scala/scala-2.11.11.ebuild b/dev-lang/scala/scala-2.11.11.ebuild
new file mode 100644
index 000000000000..d0bce664a497
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.11.ebuild
@@ -0,0 +1,224 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.7" USE="doc source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# tar -cjf scala-2.11.8-gentoo-binary.tar.bz2 scala-2.11.8/build/pack/bin \
+# scala-2.11.8/build/pack/lib/ scala-2.11.8/build/pack/man \
+# scala-2.11.8/src/actors/ scala-2.11.8/src/forkjoin/ \
+# scala-2.11.8/src/library scala-2.11.8/src/library-aux/ \
+# scala-2.11.8/src/reflect/ scala-2.11.8/docs/TODO \
+# scala-2.11.8/doc/README scala-2.11.8/build/scaladoc/compiler
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=(
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar"
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar"
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar"
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar"
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar"
+ "${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> ${P}-forkjoin.jar"
+ "${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.jar"
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar"
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar"
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar"
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar"
+ "${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar"
+ "${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar"
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar"
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar"
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar"
+ "${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.jar"
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="
+ !binary?
+ ( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ https://dev.gentoo.org/~patrick/${P}-maven-deps.tar.gz
+ )
+ binary? ( https://dev.gentoo.org/~patrick/${P}-gentoo-binary.tar.bz2 )
+"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.7
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1536M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
+ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
+ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
+ -i "${S}/build.xml" \
+ || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
+ sed -e 's@-Xmx1024M@-Xmx1536M@' \
+ -e 's@-XX:MaxPermSize=128M@-XX:MaxPermSize=256M@' \
+ -i "${S}/test/partest" \
+ || die "Could not change increase memory size in ${S}/test/partest"
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ fastdist-opt
+ if use doc; then
+ # The separate build for doc is to workaround this problem that occurs
+ # with one "fastdist docscomp" build (still fails with MaxPermSize=384M)
+ # java.lang.OutOfMemoryError: PermGen space
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docscomp
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docs
+ fi
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ pushd build/pack || die
+ local SCALADIR="/usr/share/${PN}-${SV}"
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+ dodir "${SCALADIR}/lib"
+ insinto "${SCALADIR}/lib"
+ pushd lib || die
+ for j in *.jar; do
+ local i="$(echo "${j}" | sed -e "s@[_-][0-9.-]*\.jar@.jar@")"
+ newins "${j}" "${i}"
+ java-pkg_regjar "${ED}${SCALADIR}/lib/${i}"
+ done
+ popd
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+ popd
+
+ #sources are .scala so no use for java-pkg_dosrc
+ pushd src || die
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins -r actors forkjoin library library-aux reflect
+ fi
+ popd
+
+ local docdir="build/scaladoc"
+ dodoc docs/TODO doc/README
+ if use doc; then
+ dohtml -r "${docdir}"/{compiler,library}
+ fi
+}
diff --git a/dev-lang/scala/scala-2.11.2-r2.ebuild b/dev-lang/scala/scala-2.11.2-r2.ebuild
new file mode 100644
index 000000000000..ffdaa3e3ca82
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.2-r2.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.7" USE="doc source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# tar -cjf scala-2.11.2-gentoo-binary.tar.bz2 scala-2.11.2/build/pack/bin \
+# scala-2.11.2/build/pack/lib/ scala-2.11.2/build/pack/man \
+# scala-2.11.2/src/actors/ scala-2.11.2/src/forkjoin/ \
+# scala-2.11.2/src/library scala-2.11.2/src/library-aux/ \
+# scala-2.11.2/src/reflect/ scala-2.11.2/docs/TODO \
+# scala-2.11.2/doc/README scala-2.11.2/build/scaladoc/compiler
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=( \
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar" \
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar" \
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar" \
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar" \
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar" \
+ "${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> ${P}-forkjoin.jar" \
+ "${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.jar" \
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar" \
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar" \
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar" \
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar" \
+ "${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar" \
+ "${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar" \
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar" \
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar" \
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar" \
+ "${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.jar" \
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.7
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
+ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
+ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
+ -i "${S}/build.xml" \
+ || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ fastdist-opt
+ if use doc; then
+ # The separate build for doc is to workaround this problem that occurs
+ # with one "fastdist docscomp" build (still fails with MaxPermSize=384M)
+ # java.lang.OutOfMemoryError: PermGen space
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docscomp
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docs
+ fi
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ pushd build/pack || die
+ local SCALADIR="/usr/share/${PN}-${SV}"
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+ dodir "${SCALADIR}/lib"
+ insinto "${SCALADIR}/lib"
+ pushd lib || die
+ for j in *.jar; do
+ local i="$(echo "${j}" | sed -e "s@[_-][0-9.-]*\.jar@.jar@")"
+ newins "${j}" "${i}"
+ java-pkg_regjar "${ED}${SCALADIR}/lib/${i}"
+ done
+ popd
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+ popd
+
+ #sources are .scala so no use for java-pkg_dosrc
+ pushd src || die
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins -r actors forkjoin library library-aux reflect
+ fi
+ popd
+
+ local docdir="build/scaladoc"
+ dodoc docs/TODO doc/README
+ if use doc; then
+ dohtml -r "${docdir}"/{compiler,library}
+ fi
+}
diff --git a/dev-lang/scala/scala-2.11.4-r1.ebuild b/dev-lang/scala/scala-2.11.4-r1.ebuild
new file mode 100644
index 000000000000..067a60efc007
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.4-r1.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.7" USE="doc source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# tar -cjf scala-2.11.4-gentoo-binary.tar.bz2 scala-2.11.4/build/pack/bin \
+# scala-2.11.4/build/pack/lib/ scala-2.11.4/build/pack/man \
+# scala-2.11.4/src/actors/ scala-2.11.4/src/forkjoin/ \
+# scala-2.11.4/src/library scala-2.11.4/src/library-aux/ \
+# scala-2.11.4/src/reflect/ scala-2.11.4/docs/TODO \
+# scala-2.11.4/doc/README scala-2.11.4/build/scaladoc/compiler
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=(
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar"
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar"
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar"
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar"
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar"
+ "${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> ${P}-forkjoin.jar"
+ "${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.jar"
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar"
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar"
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar"
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar"
+ "${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar"
+ "${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar"
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar"
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar"
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar"
+ "${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.jar"
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ || ( =virtual/jdk-1.6* =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.6
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
+ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
+ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
+ -i "${S}/build.xml" \
+ || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ fastdist-opt
+ if use doc; then
+ # The separate build for doc is to workaround this problem that occurs
+ # with one "fastdist docscomp" build (still fails with MaxPermSize=384M)
+ # java.lang.OutOfMemoryError: PermGen space
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docscomp
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docs
+ fi
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ pushd build/pack || die
+ local SCALADIR="/usr/share/${PN}-${SV}"
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+ dodir "${SCALADIR}/lib"
+ insinto "${SCALADIR}/lib"
+ pushd lib || die
+ for j in *.jar; do
+ local i="$(echo "${j}" | sed -e "s@[_-][0-9.-]*\.jar@.jar@")"
+ newins "${j}" "${i}"
+ java-pkg_regjar "${ED}${SCALADIR}/lib/${i}"
+ done
+ popd
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+ popd
+
+ #sources are .scala so no use for java-pkg_dosrc
+ pushd src || die
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins -r actors forkjoin library library-aux reflect
+ fi
+ popd
+
+ local docdir="build/scaladoc"
+ dodoc docs/TODO doc/README
+ if use doc; then
+ dohtml -r "${docdir}"/{compiler,library}
+ fi
+}
diff --git a/dev-lang/scala/scala-2.11.4-r2.ebuild b/dev-lang/scala/scala-2.11.4-r2.ebuild
new file mode 100644
index 000000000000..2ce90ddd329c
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.4-r2.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.7" USE="doc source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# tar -cjf scala-2.11.4-gentoo-binary.tar.bz2 scala-2.11.4/build/pack/bin \
+# scala-2.11.4/build/pack/lib/ scala-2.11.4/build/pack/man \
+# scala-2.11.4/src/actors/ scala-2.11.4/src/forkjoin/ \
+# scala-2.11.4/src/library scala-2.11.4/src/library-aux/ \
+# scala-2.11.4/src/reflect/ scala-2.11.4/docs/TODO \
+# scala-2.11.4/doc/README scala-2.11.4/build/scaladoc/compiler
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=(
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar"
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar"
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar"
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar"
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar"
+ "${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> ${P}-forkjoin.jar"
+ "${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.jar"
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar"
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar"
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar"
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar"
+ "${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar"
+ "${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar"
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar"
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar"
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar"
+ "${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.jar"
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.7
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
+ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
+ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
+ -i "${S}/build.xml" \
+ || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ fastdist-opt
+ if use doc; then
+ # The separate build for doc is to workaround this problem that occurs
+ # with one "fastdist docscomp" build (still fails with MaxPermSize=384M)
+ # java.lang.OutOfMemoryError: PermGen space
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docscomp
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docs
+ fi
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ pushd build/pack || die
+ local SCALADIR="/usr/share/${PN}-${SV}"
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+ dodir "${SCALADIR}/lib"
+ insinto "${SCALADIR}/lib"
+ pushd lib || die
+ for j in *.jar; do
+ local i="$(echo "${j}" | sed -e "s@[_-][0-9.-]*\.jar@.jar@")"
+ newins "${j}" "${i}"
+ java-pkg_regjar "${ED}${SCALADIR}/lib/${i}"
+ done
+ popd
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+ popd
+
+ #sources are .scala so no use for java-pkg_dosrc
+ pushd src || die
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins -r actors forkjoin library library-aux reflect
+ fi
+ popd
+
+ local docdir="build/scaladoc"
+ dodoc docs/TODO doc/README
+ if use doc; then
+ dohtml -r "${docdir}"/{compiler,library}
+ fi
+}
diff --git a/dev-lang/scala/scala-2.11.6-r1.ebuild b/dev-lang/scala/scala-2.11.6-r1.ebuild
new file mode 100644
index 000000000000..16f6ccbb8cfe
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.6-r1.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.7" USE="doc source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# tar -cjf scala-2.11.6-gentoo-binary.tar.bz2 scala-2.11.6/build/pack/bin \
+# scala-2.11.6/build/pack/lib/ scala-2.11.6/build/pack/man \
+# scala-2.11.6/src/actors/ scala-2.11.6/src/forkjoin/ \
+# scala-2.11.6/src/library scala-2.11.6/src/library-aux/ \
+# scala-2.11.6/src/reflect/ scala-2.11.6/docs/TODO \
+# scala-2.11.6/doc/README scala-2.11.6/build/scaladoc/compiler
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=(
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar"
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar"
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar"
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar"
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar"
+ "${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> ${P}-forkjoin.jar"
+ "${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.jar"
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar"
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar"
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar"
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar"
+ "${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar"
+ "${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar"
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar"
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar"
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar"
+ "${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.jar"
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.7
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1532M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
+ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
+ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
+ -i "${S}/build.xml" \
+ || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ fastdist-opt
+ if use doc; then
+ # The separate build for doc is to workaround this problem that occurs
+ # with one "fastdist docscomp" build (still fails with MaxPermSize=384M)
+ # java.lang.OutOfMemoryError: PermGen space
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docscomp
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docs
+ fi
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ pushd build/pack || die
+ local SCALADIR="/usr/share/${PN}-${SV}"
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+ dodir "${SCALADIR}/lib"
+ insinto "${SCALADIR}/lib"
+ pushd lib || die
+ for j in *.jar; do
+ local i="$(echo "${j}" | sed -e "s@[_-][0-9.-]*\.jar@.jar@")"
+ newins "${j}" "${i}"
+ java-pkg_regjar "${ED}${SCALADIR}/lib/${i}"
+ done
+ popd
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+ popd
+
+ #sources are .scala so no use for java-pkg_dosrc
+ pushd src || die
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins -r actors forkjoin library library-aux reflect
+ fi
+ popd
+
+ local docdir="build/scaladoc"
+ dodoc docs/TODO doc/README
+ if use doc; then
+ dohtml -r "${docdir}"/{compiler,library}
+ fi
+}
diff --git a/dev-lang/scala/scala-2.11.7-r1.ebuild b/dev-lang/scala/scala-2.11.7-r1.ebuild
new file mode 100644
index 000000000000..a0adcc1965c3
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.7-r1.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.7" USE="doc source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# tar -cjf scala-2.11.7-gentoo-binary.tar.bz2 scala-2.11.7/build/pack/bin \
+# scala-2.11.7/build/pack/lib/ scala-2.11.7/build/pack/man \
+# scala-2.11.7/src/actors/ scala-2.11.7/src/forkjoin/ \
+# scala-2.11.7/src/library scala-2.11.7/src/library-aux/ \
+# scala-2.11.7/src/reflect/ scala-2.11.7/docs/TODO \
+# scala-2.11.7/doc/README scala-2.11.7/build/scaladoc/compiler
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=(
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar"
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar"
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar"
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar"
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar"
+ "${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> ${P}-forkjoin.jar"
+ "${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.jar"
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar"
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar"
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar"
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar"
+ "${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar"
+ "${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar"
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar"
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar"
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar"
+ "${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.jar"
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.7
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1536M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
+ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
+ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
+ -i "${S}/build.xml" \
+ || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
+ sed -e 's@-Xmx1024M@-Xmx1536M@' \
+ -e 's@-XX:MaxPermSize=128M@-XX:MaxPermSize=256M@' \
+ -i "${S}/test/partest" \
+ || die "Could not change increase memory size in ${S}/test/partest"
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ fastdist-opt
+ if use doc; then
+ # The separate build for doc is to workaround this problem that occurs
+ # with one "fastdist docscomp" build (still fails with MaxPermSize=384M)
+ # java.lang.OutOfMemoryError: PermGen space
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docscomp
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docs
+ fi
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ pushd build/pack || die
+ local SCALADIR="/usr/share/${PN}-${SV}"
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+ dodir "${SCALADIR}/lib"
+ insinto "${SCALADIR}/lib"
+ pushd lib || die
+ for j in *.jar; do
+ local i="$(echo "${j}" | sed -e "s@[_-][0-9.-]*\.jar@.jar@")"
+ newins "${j}" "${i}"
+ java-pkg_regjar "${ED}${SCALADIR}/lib/${i}"
+ done
+ popd
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+ popd
+
+ #sources are .scala so no use for java-pkg_dosrc
+ pushd src || die
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins -r actors forkjoin library library-aux reflect
+ fi
+ popd
+
+ local docdir="build/scaladoc"
+ dodoc docs/TODO doc/README
+ if use doc; then
+ dohtml -r "${docdir}"/{compiler,library}
+ fi
+}
diff --git a/dev-lang/scala/scala-2.11.8.ebuild b/dev-lang/scala/scala-2.11.8.ebuild
new file mode 100644
index 000000000000..140be797d660
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.8.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.7" USE="doc source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# tar -cjf scala-2.11.8-gentoo-binary.tar.bz2 scala-2.11.8/build/pack/bin \
+# scala-2.11.8/build/pack/lib/ scala-2.11.8/build/pack/man \
+# scala-2.11.8/src/actors/ scala-2.11.8/src/forkjoin/ \
+# scala-2.11.8/src/library scala-2.11.8/src/library-aux/ \
+# scala-2.11.8/src/reflect/ scala-2.11.8/docs/TODO \
+# scala-2.11.8/doc/README scala-2.11.8/build/scaladoc/compiler
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=(
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar"
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar"
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar"
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar"
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar"
+ "${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> ${P}-forkjoin.jar"
+ "${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.jar"
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar"
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar"
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar"
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar"
+ "${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar"
+ "${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar"
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar"
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar"
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar"
+ "${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.jar"
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+ https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz
+)
+binary? ( https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.7
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1536M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \
+ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \
+ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \
+ -i "${S}/build.xml" \
+ || die "Could not change location of .m2 maven download directory in ${S}/build.xml"
+ sed -e 's@-Xmx1024M@-Xmx1536M@' \
+ -e 's@-XX:MaxPermSize=128M@-XX:MaxPermSize=256M@' \
+ -i "${S}/test/partest" \
+ || die "Could not change increase memory size in ${S}/test/partest"
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ fastdist-opt
+ if use doc; then
+ # The separate build for doc is to workaround this problem that occurs
+ # with one "fastdist docscomp" build (still fails with MaxPermSize=384M)
+ # java.lang.OutOfMemoryError: PermGen space
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docscomp
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docs
+ fi
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ pushd build/pack || die
+ local SCALADIR="/usr/share/${PN}-${SV}"
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+ dodir "${SCALADIR}/lib"
+ insinto "${SCALADIR}/lib"
+ pushd lib || die
+ for j in *.jar; do
+ local i="$(echo "${j}" | sed -e "s@[_-][0-9.-]*\.jar@.jar@")"
+ newins "${j}" "${i}"
+ java-pkg_regjar "${ED}${SCALADIR}/lib/${i}"
+ done
+ popd
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+ popd
+
+ #sources are .scala so no use for java-pkg_dosrc
+ pushd src || die
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins -r actors forkjoin library library-aux reflect
+ fi
+ popd
+
+ local docdir="build/scaladoc"
+ dodoc docs/TODO doc/README
+ if use doc; then
+ dohtml -r "${docdir}"/{compiler,library}
+ fi
+}
diff --git a/dev-lang/scala/scala-2.12.1.ebuild b/dev-lang/scala/scala-2.12.1.ebuild
new file mode 100644
index 000000000000..38b815fd3f62
--- /dev/null
+++ b/dev-lang/scala/scala-2.12.1.ebuild
@@ -0,0 +1,213 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils check-reqs java-pkg-2 versionator
+
+SV="$(get_version_component_range 1-2)"
+
+# Note: to bump scala, some things to try are:
+# 1. update all the sha1s in JURI
+# 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.gz
+# and https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.gz from
+# SRC_URI
+# 3. try emerge scala. Check if it downloads more stuff in src_compile to
+# ${WORKDIR}/.ivy2 or ${WORKDIR}/.sbt or /root/.ivy2 or /root/.sbt
+# 4. tar up all the .ivy2 and .sbt junk into ${P}-ivy2-deps.tar.xz and
+# ${P}-sbt-deps.tar.xz and add them to SRC_URI:
+# XZ_OPT=-9 tar --owner=portage --group=portage \
+# -cJf /usr/portage/distfiles/${P}-ivy2-deps.tar.xz .ivy2/cache
+# XZ_OPT=-9 tar --owner=portage --group=portage \
+# -cJf /usr/portage/distfiles/${P}-sbt-deps.tar.xz .sbt
+
+# creating the binary:
+# FEATURES="noclean -test" USE="doc source" emerge dev-lang/scala
+# cd $WORDKIR
+# XZ_OPT=-9 tar --owner=portage --group=portage \
+# -cJf /usr/portage/distfiles/${P}-gentoo-binary.tar.xz .ivy2/local \
+# ${P}/build/pack/bin ${P}/build/quick/classes/scala-dist/man/man1 \
+# ${P}/src/library ${P}/src/library-aux ${P}/src/reflect ${P}/doc/README \
+# ${P}/build/scaladoc
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=(
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar"
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar"
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar"
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar"
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar"
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar"
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar"
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar"
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar"
+ "${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar"
+ "${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar"
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar"
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar"
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar"
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="
+ !binary? (
+ https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.xz
+ https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.xz
+ ${JURI[@]} )
+ binary? (
+ https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.xz )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ =virtual/jdk-1.8*
+ >=dev-java/sbt-0.13.13
+ media-gfx/graphviz
+ )
+ binary? (
+ >=virtual/jdk-1.8
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.8
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+CHECKREQS_MEMORY="1536M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+src_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ eapply "${FILESDIR}/${P}-no-git.patch"
+
+ # https://issues.scala-lang.org/browse/SI-10098
+ eapply "${FILESDIR}/${PN}-2.12.1-runner-script.patch"
+
+ local SBT_PVR="$(java-config --query=PVR --package=sbt)"
+ sed -e "s@sbt.version=0.13.11@sbt.version=${SBT_PVR}@" \
+ -i "${S}/project/build.properties" \
+ || die "Could not set sbt.version=${SBT_PVR} in project/build.properties"
+
+ cat <<- EOF > "${S}/sbt"
+ #!/bin/bash
+ gjl_package=sbt
+ gjl_jar="sbt-launch.jar"
+ gjl_java_args="-Dsbt.version=0.13.13 -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -Duser.home="${WORKDIR}""
+ source /usr/share/java-config-2/launcher/launcher.bash
+ EOF
+ chmod u+x "${S}/sbt" || die
+
+ sed -e 's@-Xmx1024M@-Xmx1536M@' \
+ -e 's@-XX:MaxPermSize=128M@-XX:MaxPermSize=256M@' \
+ -i "${S}/test/partest" \
+ || die "Could not change increase memory size in ${S}/test/partest"
+ fi
+
+ default
+}
+
+src_compile() {
+ if ! use binary; then
+ export PATH="${EROOT}usr/share/scala-${SV}/bin:${WORKDIR}/${L_P}:${PATH}"
+ einfo "=== scala compile ..."
+ "${S}"/sbt -Dsbt.log.noformat=true compile || die "sbt compile failed"
+ einfo "=== sbt publishLocal with jdk $(java-pkg_get-vm-version) ..."
+ "${S}"/sbt -Dsbt.log.noformat=true publishLocal \
+ || die "sbt publishLocal failed"
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ "${S}"/sbt -Dsbt.log.noformat=true test || die "sbt test failed"
+}
+
+src_install() {
+ pushd build/pack || die
+ local SCALADIR="/usr/share/${PN}-${SV}"
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+ popd || die
+ java-pkg_dojar $(find "${WORKDIR}"/.ivy2/local -name \*.jar -print)
+
+ pushd build/quick/classes/scala-dist/man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd || die
+
+ #sources are .scala so no use for java-pkg_dosrc
+ pushd src || die
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins -r library library-aux reflect
+ fi
+ popd || die
+
+ local DOCS=( "doc/README" )
+ local HTML_DOCS=( "build/scaladoc" )
+ einstalldocs
+}
diff --git a/dev-lang/scala/scala-2.12.2.ebuild b/dev-lang/scala/scala-2.12.2.ebuild
new file mode 100644
index 000000000000..4670aac74258
--- /dev/null
+++ b/dev-lang/scala/scala-2.12.2.ebuild
@@ -0,0 +1,214 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit eutils check-reqs java-pkg-2 versionator
+
+SV="$(get_version_component_range 1-2)"
+
+# Note: to bump scala, some things to try are:
+# 1. update all the sha1s in JURI
+# 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.gz
+# and https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.gz from
+# SRC_URI
+# 3. try emerge scala. Check if it downloads more stuff in src_compile to
+# ${WORKDIR}/.ivy2 or ${WORKDIR}/.sbt or /root/.ivy2 or /root/.sbt
+# 4. tar up all the .ivy2 and .sbt junk into ${P}-ivy2-deps.tar.xz and
+# ${P}-sbt-deps.tar.xz and add them to SRC_URI:
+# XZ_OPT=-9 tar --owner=portage --group=portage \
+# -cJf /usr/portage/distfiles/${P}-ivy2-deps.tar.xz .ivy2/cache
+# XZ_OPT=-9 tar --owner=portage --group=portage \
+# -cJf /usr/portage/distfiles/${P}-sbt-deps.tar.xz .sbt
+
+# creating the binary:
+# FEATURES="noclean -test" USE="doc source" emerge dev-lang/scala
+# cd $WORDKIR
+# XZ_OPT=-9 tar --owner=portage --group=portage \
+# -cJf /usr/portage/distfiles/${P}-gentoo-binary.tar.xz .ivy2/local \
+# ${P}/build/pack/bin ${P}/build/quick/classes/scala-dist/man/man1 \
+# ${P}/src/library ${P}/src/library-aux ${P}/src/reflect ${P}/doc/README \
+# ${P}/build/scaladoc
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=(
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar"
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar"
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar"
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar"
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar"
+ "${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> ${P}-code.jar"
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar"
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar"
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar"
+ "${BURI}/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> ${P}-jsoup-1.3.1.jar"
+ "${BURI}/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> ${P}-macro210.jar"
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar"
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar"
+ "${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar"
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="
+ !binary? (
+ https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.xz
+ https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.xz
+ ${JURI[@]} )
+ binary? (
+ https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.xz )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ =virtual/jdk-1.8*
+ >=dev-java/sbt-0.13.13
+ media-gfx/graphviz
+ )
+ binary? (
+ >=virtual/jdk-1.8
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.8
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+CHECKREQS_MEMORY="1536M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+src_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ eapply "${FILESDIR}/${P}-no-git.patch"
+
+ local SBT_PVR="$(java-config --query=PVR --package=sbt)"
+ sed -e "s@sbt.version=0.13.11@sbt.version=${SBT_PVR}@" \
+ -i "${S}/project/build.properties" \
+ || die "Could not set sbt.version=${SBT_PVR} in project/build.properties"
+
+ cat <<- EOF > "${S}/sbt"
+ #!/bin/bash
+ gjl_package=sbt
+ gjl_jar="sbt-launch.jar"
+ gjl_java_args="-Dsbt.version=0.13.13 -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -Duser.home="${WORKDIR}""
+ source /usr/share/java-config-2/launcher/launcher.bash
+ EOF
+ chmod u+x "${S}/sbt" || die
+
+ sed -e 's@-Xmx1024M@-Xmx1536M@' \
+ -i "${S}/build.sbt" \
+ || die "Could not change increase memory size in ${S}/build.sbt"
+ fi
+
+ default
+}
+
+src_compile() {
+ if ! use binary; then
+ export PATH="${EROOT}usr/share/scala-${SV}/bin:${WORKDIR}/${L_P}:${PATH}"
+ einfo "=== scala compile ..."
+ "${S}"/sbt -Dsbt.log.noformat=true compile || die "sbt compile failed"
+ einfo "=== sbt publishLocal with jdk $(java-pkg_get-vm-version) ..."
+ "${S}"/sbt -Dsbt.log.noformat=true publishLocal \
+ || die "sbt publishLocal failed"
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ if ! use binary; then
+ "${S}"/sbt -Dsbt.log.noformat=true test || die "sbt test failed"
+ else
+ einfo "Skipping tests, USE=binary is set."
+ fi
+}
+
+src_install() {
+ pushd build/pack || die
+ local SCALADIR="/usr/share/${PN}-${SV}"
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+ popd || die
+ java-pkg_dojar $(find "${WORKDIR}"/.ivy2/local -name \*.jar -print)
+
+ pushd build/quick/classes/scala-dist/man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd || die
+
+ #sources are .scala so no use for java-pkg_dosrc
+ pushd src || die
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins -r library library-aux reflect
+ fi
+ popd || die
+
+ local DOCS=( "doc/README" )
+ local HTML_DOCS=( "build/scaladoc" )
+ einstalldocs
+}
diff --git a/dev-lang/scala/scala-2.9.3.ebuild b/dev-lang/scala/scala-2.9.3.ebuild
new file mode 100644
index 000000000000..a284c1a1da17
--- /dev/null
+++ b/dev-lang/scala/scala-2.9.3.ebuild
@@ -0,0 +1,226 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+JAVA_ANT_DISABLE_ANT_CORE_DEP="yes"
+EANT_TEST_TARGET="test.suite"
+
+inherit eutils check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${PN}-sources-${PV}"
+SV="$(get_version_component_range 1-2)"
+
+# creating the binary:
+# JAVA_PKG_FORCE_VM="$available-1.7" USE="doc source" ebuild scala-*.ebuild compile
+# cd $WORDKIR
+# tar -cjf scala-2.9.3-gentoo-binary.tar.bz2 scala-2.9.3/dists \
+# scala-2.9.3//docs/TODO
+
+# In the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands
+# to search for .desired.sha1 files, which contain sha1 hashes that are appended
+# to ${BURI} along with the subdirectory and filename to form the list of jar files
+# listed in SRC_URI. The output of this find command can be hacked into the desired format:
+# find . -name \*.desired.sha1 -exec sed -e 's@\([0-9a-f]*\).*@\1@' {} \; -print
+# After editing it into the desired format: sort -t / -k 3 file
+
+BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap"
+
+declare -a JURI=(
+ "${BURI}/8b6ba65c8146217333f0762087fe2340d572e832/docs/examples/plugintemplate/lib/scalatest.jar -> ${P}-scalatest.jar"
+ "${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> ${P}-ant.jar"
+ "${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> ${P}-ant-dotnet-1.0.jar"
+ "${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> ${P}-ant-contrib.jar"
+ "${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> ${P}-maven-ant-tasks-2.1.1.jar"
+ "${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> ${P}-vizant.jar"
+ "${BURI}/12c479a33ee283599fdb7aa91d6a1df0197a52cf/lib/forkjoin.jar -> ${P}-forkjoin.jar"
+ "${BURI}/bd8e22a955eeb82671c5fdb8a7a14bc7f25e9eb1/lib/fjbg.jar -> ${P}-fjbg.jar"
+ "${BURI}/545b37930819a1196705e582a232abfeb252cc8d/lib/jline.jar -> ${P}-jline.jar"
+ "${BURI}/6597e6f74113e952a4233c451c973f5ac7f2b705/lib/midpapi10.jar -> ${P}-midpapi10.jar"
+ "${BURI}/58f64cd00399c724e7d526e5bdcbce3e2b79f78b/lib/msil.jar -> ${P}-msil.jar"
+ "${BURI}/5f31fab985a3efc21229297810c625b0a2593757/lib/scala-compiler.jar -> ${P}-scala-compiler.jar"
+ "${BURI}/c52dbed261e4870a504cef24518484b335a38067/lib/scala-library.jar -> ${P}-scala-library.jar"
+ "${BURI}/364c3b992bdebeac9fafb187e1acbece45644de7/lib/scala-library-src.jar -> ${P}-scala-library-src.jar"
+ "${BURI}/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> ${P}-jsr166_and_extra.jar"
+ "${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> ${P}-annotations.jar"
+ "${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> ${P}-enums.jar"
+ "${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> ${P}-genericNest.jar"
+ "${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> ${P}-methvsfield.jar"
+ "${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> ${P}-nest.jar"
+ "${BURI}/77dca656258fe983ec64461860ab1ca0f7e2fd65/test/files/lib/scalacheck.jar -> ${P}-scalacheck.jar"
+ "${BURI}/2546f965f6718b000c4e6ef73559c11084177bd8/test/files/speclib/instrumented.jar -> ${P}-instrumented.jar"
+ "${BURI}/f174c50c4363c492362a05c72dd45b0da18fdcd8/test/pending/neg/plugin-after-terminal/lib/plugins.jar -> ${P}-plugins.jar"
+ "${BURI}/d7b100ad483484b598b7cd643424bd2e33898a0d/test/pending/neg/plugin-before-parser/lib/plugins.jar -> ${P}-plugins.jar"
+ "${BURI}/7e6be9e33a87194e7061f94f6be115619f91ada2/test/pending/neg/plugin-cyclic-dependency/lib/plugins.jar -> ${P}-plugins.jar"
+ "${BURI}/2bda582b574287429ad5ee2e1d9a3effc88b0a5f/test/pending/neg/plugin-multiple-rafter/lib/plugins.jar -> ${P}-plugins.jar"
+ "${BURI}/af91fd67ccef349e7f8ea662615e17796a339485/test/pending/neg/plugin-rafter-before-1/lib/plugins.jar -> ${P}-plugins.jar"
+ "${BURI}/8cccde4914da2058dca893783c231cda23855603/test/pending/neg/plugin-rightafter-terminal/lib/plugins.jar -> ${P}-plugins.jar"
+ "${BURI}/ee000286d00c5209d5644462c1cfea87fc8b1342/test/pending/pos/t1380/gnujaxp.jar -> ${P}-gnujaxp.jar"
+ "${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> ${P}-push.jar"
+)
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="!binary?
+( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ ${JURI[@]}
+)
+binary? ( https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.bz2 )"
+
+LICENSE="BSD"
+SLOT="${SV}/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
+
+IUSE="binary emacs examples"
+
+COMMON_DEP="dev-java/ant-core:0
+ dev-java/hawtjni-runtime:0"
+
+DEPEND="${COMMON_DEP}
+ !binary? (
+ =virtual/jdk-1.7*
+ dev-java/ant-core:0
+ dev-java/ant-contrib:0
+ dev-java/ant-nodeps:0
+ media-gfx/graphviz
+ )
+ binary? (
+ || ( =virtual/jdk-1.7* =virtual/jdk-1.8* )
+ )
+ app-arch/xz-utils:0"
+
+RDEPEND="${COMMON_DEP}
+ >=virtual/jre-1.7
+ app-eselect/eselect-scala
+ !dev-lang/scala-bin:0"
+
+PDEPEND="emacs? ( app-emacs/scala-mode:0 )"
+
+S="${WORKDIR}/${P}"
+
+CHECKREQS_MEMORY="1536M"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ if ! use binary; then
+ debug-print "Checking for sufficient physical RAM"
+
+ ewarn "This package can fail to build with memory allocation errors in some cases."
+ ewarn "If you are unable to build from sources, please try USE=binary"
+ ewarn "for this package. See bug #181390 for more information."
+
+ check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ # Unpack tar files only.
+ for f in ${A} ; do
+ [[ ${f} == *".tar."* ]] && unpack ${f}
+ done
+}
+
+java_prepare() {
+ java-pkg_getjars ant-core,hawtjni-runtime
+
+ if ! use binary; then
+ local a
+ for a in "${JURI[@]}"
+ do
+ echo "${a}"
+ local g="${a/* -> /}"
+ echo "${g}"
+ local j="${a/ -> */}"
+ echo "${j}"
+ cp -p "${DISTDIR}/${g}" "${S}/${j#${BURI}/*/}" || die
+ done
+ epatch "${FILESDIR}/${PN}-2.9.2-java7.patch"
+ # gentoo patch (by gienah) to stop it calling git log in the build
+ epatch "${FILESDIR}/${P}-no-git.patch"
+ # Note: to bump scala, some things to try are:
+ # 1. update all the sha1s in JURI
+ # 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz from SRC_URI
+ # 3. try emerge scala. Check if it downloads more stuff in src_compile to ${WORKDIR}/.m2
+ # or /var/tmp/portage/.m2 or /root/.m2
+ # 4. tar up all the .m2 junk into ${P}-maven-deps.tar.gz and add it to SRC_URI.
+ sed -e 's@-Xmx1024M@-Xmx1536M@' \
+ -e 's@-XX:MaxPermSize=128M@-XX:MaxPermSize=256M@' \
+ -i "${S}/test/partest" \
+ || die "Could not change increase memory size in ${S}/test/partest"
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ #unset ANT_OPTS as this is set in the build.xml
+ #sets -X type variables which might come back to bite me
+ unset ANT_OPTS
+
+ # reported in bugzilla that multiple launches use less resources
+ # https://bugs.gentoo.org/show_bug.cgi?id=282023
+ eant all.clean
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ fastdist-opt
+ if use doc; then
+ # The separate build for doc is to workaround this problem that occurs
+ # with one "fastdist docscomp" build (still fails with MaxPermSize=384M)
+ # java.lang.OutOfMemoryError: PermGen space
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docscomp
+ eant -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \
+ docs
+ fi
+ else
+ einfo "Skipping compilation, USE=binary is set."
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ cd dists/latest || die
+ local SCALADIR="/usr/share/${PN}-${SV}"
+ exeinto "${SCALADIR}/bin"
+ doexe $(find bin/ -type f ! -iname '*.bat')
+ dodir "${SCALADIR}/lib"
+ insinto "${SCALADIR}/lib"
+ pushd lib || die
+ for j in *.jar; do
+ local i="$(echo "${j}" | sed -e "s@[_-][0-9.-]*\.jar@.jar@")"
+ newins "${j}" "${i}"
+ java-pkg_regjar "${ED}${SCALADIR}/lib/${i}"
+ done
+ popd
+
+ dodir /usr/bin
+ for b in $(find bin/ -type f ! -iname '*.bat'); do
+ local _name=$(basename "${b}")
+ dosym "${SCALADIR}/bin/${_name}" "/usr/bin/${_name}-${SV}"
+ done
+
+ pushd man/man1 || die
+ for i in *.1; do
+ newman "${i}" "${i/./-${SV}.}"
+ done
+ popd
+
+ #sources are .scala so no use for java-pkg_dosrc
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins src/*-src.jar
+ fi
+
+ local docdir="doc/${PN}-devel-docs"
+ dodoc doc/README ../../docs/TODO || die
+ if use doc; then
+ java-pkg_dojavadoc "${docdir}/api"
+ dohtml -r "${docdir}/tools" || die
+ fi
+
+ use examples && java-pkg_doexamples "${docdir}/examples"
+}
diff --git a/dev-lang/smlnj/Manifest b/dev-lang/smlnj/Manifest
new file mode 100644
index 000000000000..a37976ee9c8c
--- /dev/null
+++ b/dev-lang/smlnj/Manifest
@@ -0,0 +1,26 @@
+DIST smlnj-110.75-MLRISC.tgz 1422655 SHA256 4daf94fb6bc8ff836a677616fa3aa6d001ad42829af20e662cbed8720b3e7237 SHA512 d1c9bacc135836bc83e5a0f99585d2c8007ecb2eaa9217489c9d5b2a845f82a48f3666b72ae59a016dca3b66bd56c9739461376e2ac628d01646182990e93c84 WHIRLPOOL aa00c3a8729a7ffd3bc96578b7491aa22c2438939cd4443cefcc396501ebc4d5a63d7dc74224e572dd2b9daab5b4dd584773f8c33cac308090eada9c4b598877
+DIST smlnj-110.75-boot.ppc-unix.tgz 5772853 SHA256 06d04c97e15d3bc7e1ae4ea15182bec1748302600fc9c13b77538aed2ccf0006 SHA512 cf34f084a7bca7c1d5c21fa9f356be0224ec886512a44f3dfea0cb9e1af9954662ae6e602250e9c834ccc6e1d3556ff1839a28505776038183b7b77bdb9d6dc7 WHIRLPOOL f1b1aeb8ffaa74dbf01e077426f8874b4e81799685fbbe5eef82c80c882528f06bf5cd4942fd14bd16e8a60abf98593672e4c68497e6a6ca4552c3026fad4ef1
+DIST smlnj-110.75-boot.sparc-unix.tgz 5900426 SHA256 24d4cae7879e0a0f7f5412cd8728b31aaee034f04c551f6c82a830e989d53460 SHA512 19f26bb68d94f03dc5bde68b36c4d6efbe9efd25fe089b3ce16f2ff2baa499af79d18ce2d834900bcf3e709f64c00cdacca149d0cf264fe86c23f93fb94dc1fa WHIRLPOOL 4b49cf4c102e53be1704f1bc58dbe6f7ef3c69637bd0398bdf1355bb0b620b447f73ee4b325739dd16c3b644e292009b6c19cd584f3a2b24a21170412a3a47f5
+DIST smlnj-110.75-boot.x86-unix.tgz 5848139 SHA256 99f986c12474d663984156df9784b2bc8578ce89927fe5c8ba9e68ac09b4469d SHA512 9d482b6546792936345ba54616e74550feb34a8629c547bd095b7f3d70724d8f652118ed41436a3d2f6a1965a81ad59417ae0021b45bf2e52fc4f338a3f5f051 WHIRLPOOL 2853806c10bc4f095a3e5b9f67dfd3cfc2b6e9db43156278c788938af013248599f118c4259901c35a3718a6c7459e0386727cd41aa02abfb5b481924ccd190c
+DIST smlnj-110.75-ckit.tgz 194523 SHA256 b5849f96b3cde1d8d33ba94e41c9093fc2f9f35db3499086c69a8552630f9477 SHA512 79cfb8442e5a95418404b94b82981d93cbbac67d70712814a49a53ef97360b8c7ba6ec13ad79b84182d1c6ddb613848041836a947c1ab4a45d822cc7e94f8403 WHIRLPOOL 2f01dc5e57457bb920bf19339705b8a7318f7c51dbb0d39e2ae19c2ee6ec911054d4781d3ed5a49b851311afb042c993efc01cf805603390ca4af7860c85ae2a
+DIST smlnj-110.75-cm.tgz 200429 SHA256 4604fac13f3810673233ab7b31649035256f78d0ad86b6a6b43f37ffc5ddb12b SHA512 52b05e0497f8dafd415e42522a42bed5a96b9fbfce09430c914d987cf4983386a3a89f9a8aa9e67163af1428e387cd11f85207f2250083eaf3363e176921aff6 WHIRLPOOL b9fe64a2de84914ffda392251111a700851d757a67c032e86d1e9002f62f5d910cd1a0bc1004353080f228d55191daf3fb443fc7e8dd0a12e4e803c1b9d52751
+DIST smlnj-110.75-cml.tgz 105902 SHA256 0bb3ae6feda0f2b4dc86a3e386462319761733c71aeff36aadcd625790d562c6 SHA512 22237c41a41c5b006ce80d57ef759a5825bf6156296f8755352dcda95c4650e5efd87c554959554bd42673996438a448cb5fab614ccdc7d9e2798a846bfcc2e5 WHIRLPOOL 9782f8c3e263ae50be46fe4d9793084c3d410a9495bf397f643f562cca97fbe7549f9fd611d7687ca7322c21c75f3d7fab15e8dc60b6bccf44faab8b1173affd
+DIST smlnj-110.75-compiler.tgz 816964 SHA256 c72c25fa9f844e085448ef07ec5c7f44ebaec44a4ecfbafab38e64193b49bf21 SHA512 ccbbeb2a7e7107c1406a14125d89bec86ebcf8478e8d01f61f1fb6d77d58040c2e85ef620d438321a7a4595d7f3662a275809b93db15c1320a38597130f6d39a WHIRLPOOL 13b63c138ae12b039fb796e3ff4080f613d1b2e9583228532773c15e0edc56004d9fae7e760c67a52a5ed6c7d867aa0ec46df0dea686d126b944dc6cebf2b0b8
+DIST smlnj-110.75-config.tgz 511117 SHA256 3c452eadc0da4eda4f1de1fe5c842eb42b88e1ea1fefe3212f82827052cfe1b0 SHA512 e1d5d2e169dbe799a64d983359e52acf326fae4f18c7c2444d94d792bd383365ac6a0c382dac3ed94ccbb8f8b29ba785517a6f94ee5f733b9a06ef0da85537a3 WHIRLPOOL c702578aaef2a2641424cc11c375bb7d62d7bb879ea42a8f6e2d6a3251be40b23cf909aeccb84015cac17e578d2c38de95f958b4d30f0cfa190e4075df558ea8
+DIST smlnj-110.75-eXene.tgz 703097 SHA256 f7fe66c65fbf2c32ec4a13b8600a86d9c6aa0acbd937cd27668036d6bc146908 SHA512 091fa935d731c4a07934a09a5b28c99bb1f79407ceeb3f68b4dd8877d0b29042f56afaa4f0d5a048ce0f203d185972622fefcc701f8359677e28d06953a861e8 WHIRLPOOL 5b860590aae60e6ba2441a577ab8e248cdd727e7b8751a3d12f9cc5077409c504dbc67480491e30066aa145ce92935b821e4eb4031b196ee1c4f5d30a5296532
+DIST smlnj-110.75-heap2asm.tgz 1315 SHA256 bca547875d99ae601a141b08319f716205b096560a13b3b7ec4298b25c4a742d SHA512 d2578a32c99ce5e81904eff7203df9550c4539be43a0a3252109fb2adc4862864c70c37ba89b2ebe68fdb21171430b4d13e44fc4860639ef960e81f01ac3749a WHIRLPOOL 30e5d82df273001766c617b1876b4801e9bd681d802cee5bb14c5eaa6f702fe505521380868b91956d08191134e615bccc5199c2fcdfa3574c4b96bd00636637
+DIST smlnj-110.75-ml-burg.tgz 36339 SHA256 d65e37281de97d3501356e6f5e842e3b247fb1a2f5580cc419d44d4f3f060e5f SHA512 a38a73c76e9b482cbec396cd445c058ef0db5e732900ee0597e52fd3af97acac5b78629af1e8e038b9cb9a403beed7524345c5e38f4a49b7602d73daee8fea2d WHIRLPOOL b5362de4a2a8f72472d773d5d15b9725118ac5a4f6235d652d33b55aac0fe227d132974ba24eab1b5e9f025cf853820a7543a1e051a7223dae657b991b5cd3ee
+DIST smlnj-110.75-ml-lex.tgz 33154 SHA256 307628841271f942df4db0d782e164f25a9fb07ce12b2083e4d6eef898c07266 SHA512 2840117c2891d09acb762cd7f161a15cd9351478a007d08c8d1c2be1e828b1175fb31f427e0a6eeb96cbadf7b92da1dda23b3ff3a7123c1c800892157fd58fa6 WHIRLPOOL 1358132f0bac81400886fa988e3f479d3d33dc89954dadc6e209ad16a740917d91a367df3b163d74900bdcad2ea1759ee6167370ece0ccfc8b836581cffafb2a
+DIST smlnj-110.75-ml-lpt.tgz 256313 SHA256 2a8138c219dd5f42970c1a8ed9fb1e00dcf45d450c5f129bfb184819c36a2c06 SHA512 b36b8250862d0d9eb6e4576ab47e20b535095c8ab7c1cae913f7e8748f7677cf89dce0061fabe56dbda0df3ae0311970adbb0bd96630aa638ea5652277d978b6 WHIRLPOOL 741372a65ac3ba42df836ab975dc087a8838e48c403eaeb5bd0a9576ff37d9ff0027205d74494fc0b032bdd1b8f8e3be0a94a14026b5cdea46a52fa63b84976f
+DIST smlnj-110.75-ml-yacc.tgz 99940 SHA256 bd9b35557c520af1251a19b096ec0106bc6c03b7ebab2cf1391649c5c6b222f3 SHA512 930dc545e49769a3d153753e19da1352fafea621f17d86881d5454d2d27f601e517fec09bd49ec732db4d311621e6cf8c26f714b095b9e07147bbe3b6ec885c2 WHIRLPOOL 410c0195b16584ebc113bf554bf4b6da7f4d2fdda0c1d19805b006e18d85ede572f0bd4e1dbbf4622d157915cadb0d69d7bb0aa5ca4718be196ecc53a8283606
+DIST smlnj-110.75-nlffi.tgz 74481 SHA256 0daea7803edb7e836d45676d00e8c2cef1439daff89eaccda608144d23ad82d6 SHA512 bfaa0e4ddc43d3695ef2be5cc74218435f6004b99a07ec585ec65158eaeb22ac7309ee9d584e880048655eb7110866ec25055fcc196b5d904510cf0c4c498eb5 WHIRLPOOL 0d6eddab0ee64aeb81143cc17c6f12df7e63af8548a62339960035fcc500d25b33c181e0c58817e04de5bc0be099bb13314daa5463957101b9ba87ff5101ad1d
+DIST smlnj-110.75-pgraph.tgz 5439 SHA256 71ccfbc78227dbc9ddac08bdc6c3bf01c7e1139ee84706a0e8572a0653c8b80f SHA512 cf8de19c5d3f258cc6fa145d837bf8e307e04577ab45e20861f53fc47612c2238cc5c1964ad3f1697dceb1d56b84c1d0d1e9ecd5da8dfb7ad24b1946b82691e8 WHIRLPOOL caef565f6abf5506f2ac2a660843e1b698294d8b96e855177992a1b69d89bfcf40e0c426e7dcf5fa7d8ba1e9a6524405b2cd813881f8bb554e619608986cd24c
+DIST smlnj-110.75-runtime.tgz 324054 SHA256 30fe442f42414908df3377a06c8e79af569ea13a43c9a7d3bbf052debbdec412 SHA512 65b05ceb31d719874c5b06ebaf4179c1e1b12da648635332eb4bdd5ffc5af86a00f7e8c45062d9f03e9a445f9eefe741c92f7ca207beecf31733a3a849902aaa WHIRLPOOL 27a0f5c318a4bcfd5514a711f2fcc17258514c8f4ec5b429273f13ea0bfbf8de304a15be6de6a91a7f33d923f86aeeb2a906ea0816e7f1a70d1f650164471541
+DIST smlnj-110.75-smlnj-c.tgz 10531 SHA256 a8645509f80fad32fa3e50cc26015b179952ba63d72a89c1f280a464a6585d76 SHA512 ada4f0055f4f3f49c05ad4b55edfbda6cc7534491c1d304d7f51977170a3f68f367e1cba6a75d145b2ba497ca25bbb793c84f0bc7eeea0ad9657eecd72f85b87 WHIRLPOOL 5fe6d0d9c6378377968f82650f2ccf3aaba4f1c88b4718256b03dcae622adf3bb74356975271ab7450d3d888cb734d3eee047abf33f5b6740d847f4cc32b1d03
+DIST smlnj-110.75-smlnj-lib.tgz 396628 SHA256 2f8196ce2f7509c0ac0a0a69107c1d681554d1c58ba1bee92ef833816341caed SHA512 47d20c09fbd0a6e59db429e02b55b6307f5c61a9166bfc839261a21267da6e4ca0f99aa1080b2a8556a6046818177ad61b854a2dac0248b17a2ef79eac4ad35d WHIRLPOOL 9236dad0c616d2f680d0fd8efdf7d1aafb4a69afa26a676f0d90680b7dae1c5099313873e1e44546493090d8f3a99db01d7d22847ea8be046f7f891a35a6db5c
+DIST smlnj-110.75-system.tgz 227376 SHA256 973f5ebd3b9823365b9dadbf370c0aa131df94d4d80ada660bb05a3010776a2e SHA512 ee6a941f269d51bdd48328c35ae642d6b5f35ef7e9516fef58fad7f6ac3b4a527678265eb7a8a9783eb5e483713fbade17cd6e204234fb9419ad430e42a536a4 WHIRLPOOL a8000d6f22a539922033e740f262b8bb0832d25fd1ba204aed53f4d979d7a2193a7b49b73187c9e4621407d43dd9aeec680b1c57780279fab81549dba29db8f1
+DIST smlnj-110.75-trace-debug-profile.tgz 3902 SHA256 e04a6740166d7f2da41923400fae3b9661d1e52dce4f64efff3a3780c9a6a43c SHA512 b2eed46e58f7b2dd6857debea4ae329dcc79946bd59a63747746d916b2dc29866d3e23a3accd678a981f2ebed0924d1fe1d03744000e877313abc33b144ec694 WHIRLPOOL a4d357c718259d076cad19174d2b4e5ae5949fe47314dca261cf16c5c37c788b5ab43c6f75ca2e37ada45ac67ac0d13df86a2c4cf2a1a4ad046912b0dc22d1c5
+EBUILD smlnj-110.75.ebuild 2560 SHA256 0627fb576653d2ecfb9b6de411791fd3a9c33a2f8bd963d74622809ece573ae4 SHA512 fd577e8aedbfcdf06eee98a8daca6962c6ee082354a484ef08f385cf3e7de7790f5d10ee427d162a0fc3d9e08a002a7abe208992b847994898fab826dca034d9 WHIRLPOOL a6c90094dbce831ab8856a9842112f10faa2558f40702906652f5b5f433c6a82c201f7d0d808e73d6abb19f65b69f7dadae8355b6458fe721e7789a136416e13
+MISC ChangeLog 2423 SHA256 156450590381616729c57a75ced99374820cda998a8fb53d6649ff30322284d3 SHA512 71c8af1fc4fe38942f9cc4fa90842af58bd9429daba91813da7865c0e223227a47e78c57bc18bee9c570b3944a88f65fada893e5b3327f9a1baee8b21c123e46 WHIRLPOOL 7c78aa068ccfa742284d4a9b478b1351a8c6df3af3b9a0d74e0809fc39902a6e426868e57b02ca69a360098247276369aa93f188af628c82b524294a6b5b4754
+MISC ChangeLog-2015 4613 SHA256 bfebaeba907817bb9dba0358d07e63beddf65b09a125970bd0d75515821fc9aa SHA512 b349ad94df1eb5643b2ce4a8df54f741db2594bd49eb8f3a16fc9506c62bcedc151363529d3f587ffe8519fcf1a0c0e8567384de4fd032359f4fa41e267cf74b WHIRLPOOL 0bcb12d7fafd3308c40350c1f4490bab4a8f7a9b7b99aad7df34aeacb03755b3be5ea795e13806074b2c101b3ce54ec29b73c9bf59d6c45b3af48f0311466383
+MISC metadata.xml 243 SHA256 5e9b58b0b795266f973d066675839499e3a56d7d932d702404a4b91ded8eb26c SHA512 1c5b4b2163017e496999d1f87e5c9c5ac6c11b2e9187450ccfb3df258f34e54d278972f04ee0e8429476c6f87e091a869ac2a28c6e8c8e6d20678c3e74061449 WHIRLPOOL 085df2e84901cbe563c7c1d30d04c229547f15f8ee26ac61d44d07c3f6999f2bbfa4cf309963172fb507cce5450d27598b762c3ccab92351601965c3afc05e3a
diff --git a/dev-lang/smlnj/metadata.xml b/dev-lang/smlnj/metadata.xml
new file mode 100644
index 000000000000..ffac4d7ebc01
--- /dev/null
+++ b/dev-lang/smlnj/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>ml@gentoo.org</email>
+ <name>Gentoo ML Project</name>
+</maintainer>
+</pkgmetadata>
diff --git a/dev-lang/smlnj/smlnj-110.75.ebuild b/dev-lang/smlnj/smlnj-110.75.ebuild
new file mode 100644
index 000000000000..5a4ca406ed7a
--- /dev/null
+++ b/dev-lang/smlnj/smlnj-110.75.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Standard ML of New Jersey compiler and libraries"
+HOMEPAGE="http://www.smlnj.org"
+
+BASE_URI="http://smlnj.cs.uchicago.edu/dist/working/${PV}"
+
+FILES="
+config.tgz
+
+cm.tgz
+compiler.tgz
+runtime.tgz
+system.tgz
+MLRISC.tgz
+smlnj-lib.tgz
+
+ckit.tgz
+nlffi.tgz
+
+cml.tgz
+eXene.tgz
+
+ml-lex.tgz
+ml-yacc.tgz
+ml-burg.tgz
+ml-lpt.tgz
+
+pgraph.tgz
+trace-debug-profile.tgz
+
+heap2asm.tgz
+
+smlnj-c.tgz
+"
+
+#use amd64 in 32-bit mode
+SRC_URI="amd64? ( ${BASE_URI}/boot.x86-unix.tgz -> ${P}-boot.x86-unix.tgz )
+ ppc? ( ${BASE_URI}/boot.ppc-unix.tgz -> ${P}-boot.ppc-unix.tgz )
+ sparc? ( ${BASE_URI}/boot.sparc-unix.tgz -> ${P}-boot.sparc-unix.tgz )
+ x86? ( ${BASE_URI}/boot.x86-unix.tgz -> ${P}-boot.x86-unix.tgz )"
+
+for file in ${FILES}; do
+ SRC_URI+=" ${BASE_URI}/${file} -> ${P}-${file} "
+done
+
+LICENSE="BSD"
+SLOT="0"
+
+#sparc support should be there but is untested
+KEYWORDS="-* ~amd64 ~ppc ~x86"
+IUSE=""
+
+S=${WORKDIR}
+
+src_unpack() {
+ mkdir -p "${S}"
+ for file in ${A}; do
+ [[ ${file} != ${P}-config.tgz ]] && cp "${DISTDIR}/${file}" "${S}/${file#${P}-}"
+ done
+
+# make sure we don't use the internet to download anything
+ unpack ${P}-config.tgz && rm config/*.bat
+ echo SRCARCHIVEURL=\"file:/${S}\" > "${S}"/config/srcarchiveurl
+}
+
+DIR=/usr
+
+src_prepare() {
+ # respect CC et al. (bug 243886)
+ mkdir base || die # without this unpacking runtime will fail
+ ./config/unpack "${S}" runtime || die
+ for file in mk.*; do
+ sed -e "/^AS/s:as:$(tc-getAS):" \
+ -e "/^CC/s:gcc:$(tc-getCC):" \
+ -e "/^CPP/s:gcc:$(tc-getCC):" \
+ -e "/^CFLAGS/{s:-O[0123s]:: ; s:=:= ${CFLAGS}:}" \
+ -i base/runtime/objs/${file}
+ done
+
+# # stash bin and lib somewhere (bug 248162)
+# sed -e "/@BINDIR@/s:\$BINDIR:${DIR}:" \
+# -e "/@LIBDIR@/s:\$LIBDIR:${DIR}/lib:" \
+# -i config/install.sh || die
+}
+
+src_compile() {
+ SMLNJ_HOME="${S}" ./config/install.sh || die "compilation failed"
+}
+
+src_install() {
+ mkdir -p "${D}"/${DIR} || die
+ mv bin lib "${D}"/${DIR} || die
+
+# for file in "${D}"/${DIR}/bin/*; do
+# dosym /${DIR}/bin/$(basename "${file}") /usr/bin/$(basename "${file}") || die
+# done
+
+# for file in $(find "${D}"/usr/lib/${PN}/bin/ -maxdepth 1 -type f ! -name ".*"); do
+# dosym /${DIR}/bin/$(basename "${file}") /usr/bin/$(basename "${file}") || die
+# done
+
+ for file in "${D}"/usr/bin/{*,.*}; do
+ [[ -f ${file} ]] && sed "2iSMLNJ_HOME=/usr" -i ${file}
+# [[ -f ${file} ]] && sed "s:${WORKDIR}:/usr:" -i ${file}
+ done
+}
diff --git a/dev-lang/snobol/Manifest b/dev-lang/snobol/Manifest
new file mode 100644
index 000000000000..daff416b9e41
--- /dev/null
+++ b/dev-lang/snobol/Manifest
@@ -0,0 +1,11 @@
+DIST snobol-0.99.4.tar.gz 388020 SHA256 f5ca03e4d2fe276d470c38bb6e75815949ff53853a3ee084c1b5e8b0090ec0df SHA512 4333c83302363ed47dd98318add93b584b67b8b38bdf01f9dd38981b7711978b5dbec71e9e4aa964e82a35700a927650d3abd3e3074651ab02a7021973af1a6c WHIRLPOOL 7b7722502b8040f0f0fb463e5458fbb5b6a7f402ed8e9935d7efcf16626a8ed39d771a77ec4f6a9d183fe2ed752f75c533006560c9b962ae10d3a6806fc7083e
+DIST snobol4-0.99.44.tar.gz 528205 SHA256 1018d8a7776b072972c0021ba7472baff632b63d8d535243c7cb277f89930d5c SHA512 46ffd03e4f392c7e7cb2a532b0ab6536750c57c78284bb02fa15a0a3a0166adb60779e068c3baf542d81cb01b7cd881d952ad4ecb9cf50a9c109e3b68e292720 WHIRLPOOL e48f35881e3e08effdd95a2e22974b68507cef0066bacb252c7787cecf4337c60fd330eb586ecdeaea33cf8e1034647e1ee5859812525f2e4a66ad77b19a539f
+DIST snobol4-1.1.tar.gz 677333 SHA256 53503e412953ddf31149cd36aa3cd7ce164c2a149e33309fe7c583be54c791ae SHA512 ae8482bc64f3d9020dc4d7e390296114e7498ef2764ebb69b6c4960d0c1b01daf4d77dff1aa583231a7f50d4c54f7f72cedc3e4744b03f4b2370fa6de837a3cc WHIRLPOOL 40730f2f8ec30a617636ad515f0f71b93638fa0bb9c3367ea562c8a74f37b411d7e7a865fbb7ce6b322c036d9d712e73bd609747e0524e6191b0cddfa453bbc9
+DIST snobol4-1.4.1.tar.gz 736837 SHA256 af346b9b8087ecc5432bc6d83c62b61a02e38ebd07d3b6f9477e1c0aef598d04 SHA512 5413af10018141e93f05c9ea637711bb3981f2b67557691d05dde8911178d90900f0fdef6c1d2416ebdda6afeeabd21b9e371b6711b2d093df629cc865fc61f9 WHIRLPOOL 9a82de95afff23d762e722220c0761694e2b807d1cb1564a075df955bfe2bbb049ea857d980ab0343284f15594ad9fde02b08e10fcd68fbaa024eeb786a5f5dc
+EBUILD snobol-0.99.4.ebuild 1103 SHA256 119b39c7c057a194d27147cfd370816c3c7213218e5c1b281eb5c12053e31b23 SHA512 62766693ddf26b30b7991cc12f1ff9efc03e1a82a8c5f95a15bb03d7f9d9ac4ccfc4b03802078e781ac5e34a8db4d3d016f5e2a5e770c3b81f2185fedd90ee02 WHIRLPOOL 21b65aab55cbeacfe2df4f31897ef49e46ba72241abcabf1186cd1e88f661f142c46a0a3c8d12da301d22c06c82d7c024455fe8ea07b8738cc15f1ce4fe0bc8c
+EBUILD snobol-0.99.44.ebuild 1314 SHA256 0385e5ea1c1d7b76970335396b68d673d1d5c4888a168e9911590a4d9c62d257 SHA512 af0778bd0e3dbd180f1ada5dc177527bef615dd91af7f8a4dbc0a82353b559c1fa7653418b6db598f11d348e5d58fa43c45004ed4c032d88fc36177d55b94e12 WHIRLPOOL 3f33c043ba3f0f0aa840e396bca7cd93d58fda7ab6ee6b376dcf85fa5b959fcbde1b81d0277acb8893a99c31c019c340102e088a282bfeab04d158f0bfad3051
+EBUILD snobol-1.1.ebuild 1418 SHA256 fafe570acd8537814b427ede107c7bf05482f11466c95b4a924f10f6bc0978b5 SHA512 f0ca27dd442231cb15fa95ea8d43ac0937afa8715defd4f6506de072b9a3a0ae74ffa3af8ddac7beebb6612775479a90f80fc045824a273e8b011ec57df8ca54 WHIRLPOOL ed2adf706790c5ef1946f9e27d7d07a05cf4dc04658208ebeaccdf4c9627e8bc0bb0b5c0c538ca3debe2b9d01425850088108d20308faf5bbf32323b026165b3
+EBUILD snobol-1.4.1.ebuild 1286 SHA256 573280cbf028901ff2ea6a94c567bc7d0899130971a96057c99b269fbcdd53a9 SHA512 f7da5f8ada4660b6d746cae936d959d26a0170d01a7791ffc68b3522ebd410eaa22aec5d20fee457726ffc4b11bba391d25ffb447558c0f5dbaa11708f632bac WHIRLPOOL ab1abebad359484906ae61d350f38aa5dce8cc5941cb02a06145313f85fe0c222cfbcde8f342d1571d141580e157b2f9e05d19efee3ace5fce495696c3d5b4f9
+MISC ChangeLog 2327 SHA256 3de385bd91faf810b8c0d4619b49148ae8c1258218995b94cd92f003ebd8246d SHA512 f45aa8fef89c7c522838c874988c205a5a3ea534079a3127bbb43581d17cb3b03a7f9f9cd388d20dec9ca8f461ca9078f5f30a638d5b54989ec714b61d0145fc WHIRLPOOL 74e85e5f69886f46ce46b0a7b36ac8bc6e8bb56ae30e4dc7930ae4c4d4531b6a4cd325ed382de46a0444e26a6b940dcf9e82e88291b5d198073d2b05240c5e5c
+MISC ChangeLog-2015 2237 SHA256 ad3d3210a6ca8664342102da6245312c3606047cc56aa9587b52b3a17b1c010c SHA512 f872a2be897103a645235b360154bbe17eeef6cff17d21f01b64bbb10fd6e36f5e0eccd2560226c818498071d788e12b7ba6e76c0eaeeb9f1e13375d11adb677 WHIRLPOOL 2cd6e2fc5f02444747b7dd8d1001a06151fe227b06776ad9a26930d830debe10674ff5816d1ecc07db32787f2e0cce22d332eaf36bce2c897f4948c028ac08ac
+MISC metadata.xml 268 SHA256 972faf76e6638f2159ef3c7dafdcfef26d582070e6f0064d9136d1c6b2bee905 SHA512 ffda1db3fd6ac952f41a970e2e496c6a9fd0b12ed11cdf363fd269c3b00f627c6e70421fd545aad61d69594af2e5f43d8ebc197232a39b596d012818fe758850 WHIRLPOOL 759c32dcdde671d2fda0269ee9326f6d0f0e44966f767ac7becc40e6efb5429237b683cb23867d76a8d13dde79fe257e090ef890761b20f9792172a90369296d
diff --git a/dev-lang/snobol/metadata.xml b/dev-lang/snobol/metadata.xml
new file mode 100644
index 000000000000..a4e0d354f696
--- /dev/null
+++ b/dev-lang/snobol/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>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/snobol/snobol-0.99.4.ebuild b/dev-lang/snobol/snobol-0.99.4.ebuild
new file mode 100644
index 000000000000..aa7a39c5fae3
--- /dev/null
+++ b/dev-lang/snobol/snobol-0.99.4.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="Phil Budne's port of Macro SNOBOL4 in C, for modern machines"
+HOMEPAGE="http://www.snobol4.org/csnobol4/"
+SRC_URI="mirror://snobol4/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND="sys-devel/gcc
+ sys-devel/m4"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ sed '/autoconf/s:autoconf:./autoconf:g' -i ${S}/configure
+ echo "OPT=${CFLAGS}" >${S}/local-config
+ echo "ADD_CPPFLAGS(-DUSE_STDARG_H)" >>${S}/local-config
+ echo "BINDEST=/usr/bin/snobol4" >>${S}/local-config
+ echo "MANDEST=/usr/share/man/man4/snobol4.1" >>${S}/local-config
+ echo "SNOLIB_DIR=/usr/lib/snobol4" >>${S}/local-config
+}
+
+src_compile() {
+ # WARNING
+ # The configure script is NOT what you expect
+ emake || die "emake failed"
+ emake doc/snobol4.1 || die "emake doc/snobol4.1 failed"
+}
+
+src_install() {
+ into /usr
+ newbin xsnobol4 snobol4
+ dodir /usr/lib/snobol4
+ insinto /usr/lib/snobol4
+ doins snolib.a snolib/bq.sno
+
+ doman doc/*.1
+ dohtml doc/*.html
+ rm doc/*.html
+ dodoc doc/*.ps doc/*.doc
+}
diff --git a/dev-lang/snobol/snobol-0.99.44.ebuild b/dev-lang/snobol/snobol-0.99.44.ebuild
new file mode 100644
index 000000000000..5866890a27f8
--- /dev/null
+++ b/dev-lang/snobol/snobol-0.99.44.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DESCRIPTION="Phil Budne's port of Macro SNOBOL4 in C, for modern machines"
+HOMEPAGE="http://www.snobol4.org/csnobol4/"
+#SRC_URI="mirror://snobol4/${P}.tar.gz"
+MY_PN="snobol4"
+MY_P="${MY_PN}-${PV}"
+SRC_URI="ftp://ftp.snobol4.org/snobol4/beta/${MY_P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND="sys-devel/gcc
+ sys-devel/m4"
+RDEPEND=""
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+ unpack ${A}
+ sed '/autoconf/s:autoconf:./autoconf:g' -i ${S}/configure
+ echo "ADD_OPT([${CFLAGS}])" >>${S}/local-config
+ echo "ADD_CPPFLAGS([-DUSE_STDARG_H])" >>${S}/local-config
+ echo "ADD_CPPFLAGS([-DHAVE_STDARG_H])" >>${S}/local-config
+ echo "BINDEST=/usr/bin/snobol4" >>${S}/local-config
+ echo "MANDEST=/usr/share/man/man4/snobol4.1" >>${S}/local-config
+ echo "SNOLIB_DIR=/usr/lib/snobol4" >>${S}/local-config
+}
+
+src_compile() {
+ # WARNING
+ # The configure script is NOT what you expect
+ emake || die "emake failed"
+ emake doc/snobol4.1 || die "emake doc/snobol4.1 failed"
+}
+
+src_install() {
+ into /usr
+ newbin xsnobol4 snobol4
+ dodir /usr/lib/snobol4
+ insinto /usr/lib/snobol4
+ doins snolib.a snolib/bq.sno
+
+ doman doc/*.1
+ dohtml doc/*.html
+ rm doc/*.html
+ dodoc doc/*.ps doc/*.doc doc/*.txt doc/*.pdf
+}
diff --git a/dev-lang/snobol/snobol-1.1.ebuild b/dev-lang/snobol/snobol-1.1.ebuild
new file mode 100644
index 000000000000..194e67486d81
--- /dev/null
+++ b/dev-lang/snobol/snobol-1.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="Phil Budne's port of Macro SNOBOL4 in C, for modern machines"
+HOMEPAGE="http://www.snobol4.org/csnobol4/"
+MY_PN="snobol4"
+MY_P="${MY_PN}-${PV}"
+#SRC_URI="ftp://ftp.snobol4.org/snobol4/${MY_P}.tar.gz ftp://ftp.ultimate.com/snobol/${MY_P}.tar.gz"
+SRC_URI="mirror://snobol4/${MY_P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+
+DEPEND="sys-devel/gcc
+ sys-devel/m4"
+RDEPEND=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ #export CFLAGS="-O0 -pipe"
+ sed -i.orig -e '/autoconf/s:autoconf:./autoconf:g' \
+ -e '/ADD_LDFLAGS/s/-ldb/-lndbm/' \
+ "${S}"/configure
+ echo "ADD_OPT([${CFLAGS}])" >>${S}/local-config
+ echo "ADD_CPPFLAGS([-DUSE_STDARG_H])" >>${S}/local-config
+ echo "ADD_CPPFLAGS([-DHAVE_STDARG_H])" >>${S}/local-config
+ echo "BINDEST=${EPREFIX}/usr/bin/snobol4" >>${S}/local-config
+ echo "MANDEST=${EPREFIX}/usr/share/man/man4/snobol4.1" >>${S}/local-config
+ echo "SNOLIB_DIR=${EPREFIX}/usr/lib/snobol4" >>${S}/local-config
+}
+
+src_configure() {
+ # WARNING
+ # The configure script is NOT what you expect
+ :
+}
+
+src_compile() {
+ emake
+ emake doc/snobol4.1
+}
+
+src_install() {
+ into /usr
+ newbin xsnobol4 snobol4
+ dodir /usr/lib/snobol4
+ insinto /usr/lib/snobol4
+ doins snolib.a snolib/bq.sno
+
+ doman doc/*.1
+ dohtml doc/*.html
+ rm doc/*.html
+ dodoc doc/*.ps doc/*.txt doc/*.pdf
+}
diff --git a/dev-lang/snobol/snobol-1.4.1.ebuild b/dev-lang/snobol/snobol-1.4.1.ebuild
new file mode 100644
index 000000000000..bf9f75eca7c8
--- /dev/null
+++ b/dev-lang/snobol/snobol-1.4.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P="${PN}4-${PV}"
+
+DESCRIPTION="Phil Budne's port of Macro SNOBOL4 in C, for modern machines"
+HOMEPAGE="http://www.snobol4.org/csnobol4/"
+SRC_URI="mirror://snobol4/${MY_P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND="
+ sys-devel/gcc
+ sys-devel/m4
+ sys-libs/gdbm[berkdb]
+"
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -e '/autoconf/s:autoconf:./autoconf:g' \
+ -i configure || die 'autoconf sed failed'
+ sed -e 's/$(INSTALL) -s/$(INSTALL)/' \
+ -i Makefile2.m4 || die 'strip sed failed'
+ echo "ADD_OPT([${CFLAGS}])" >>${S}/local-config
+ echo "ADD_CPPFLAGS([-DUSE_STDARG_H])" >>${S}/local-config
+ echo "ADD_CPPFLAGS([-DHAVE_STDARG_H])" >>${S}/local-config
+
+ # this cannot work and will cause funny sandbox violations
+ sed -i -e 's~/usr/bin/emerge info~~' timing || die "Failed to exorcise the sandbox violations"
+}
+
+src_configure() {
+ ./configure --prefix="${EPREFIX%/}/usr" \
+ --snolibdir="${EPREFIX%/}/usr/lib/snobol4" \
+ --mandir="${EPREFIX%/}/usr/share/man" \
+ --add-cflags="${CFLAGS}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ rm "${ED%/}"/usr/lib/snobol4/{load.txt,README}
+
+ dodoc doc/*txt
+
+ use doc && dohtml doc/*html
+}
diff --git a/dev-lang/solidity/Manifest b/dev-lang/solidity/Manifest
new file mode 100644
index 000000000000..50228bd01d94
--- /dev/null
+++ b/dev-lang/solidity/Manifest
@@ -0,0 +1,5 @@
+AUX solidity-0.4.2-commit_hash.txt 9 SHA256 605c300b7a7e77c2e4499d50de5ad072dce56f9583f15cf696b0547dd6ad6ae5 SHA512 766569e9ffb283e6efbb81dc546502df8b294a445713392ae9717a845a014f3170c29448d3d7256256b4e467c7c6ea9d9eba45c83ec68c7798a2c67d1cab3033 WHIRLPOOL 520252c80ac2d6f9ffde3d2495542f111f408b56b614d71b74232f67881cf8357c60cea06c7f000273aef9b69c4f616da4a43a7169fb854cee144a97f6f95be5
+DIST solidity-0.4.2.tar.gz 495039 SHA256 0dd176919cab5492aecb27d1d8de39182b5e880979d5082fca6d7a01ebce28f1 SHA512 2ef2e58775e22eefce867ee73dbab61f54def1edd95e089ec3a388b5aaba316c44fe18b92d45e070014b9df6e450b2b27fe78434f5db40f0476c505b2541572c WHIRLPOOL 541c2bd8d729bd9d1ef15739b539ca877b7c1f4e1ed9e9eda8ad7d3fd4c306001799727de14dae8fbf0092c31c9b0448c9ea7af92ca069ac24cf010f0a6c8ef6
+EBUILD solidity-0.4.2.ebuild 1007 SHA256 190f19aaa810219e55fd534d5b16693ffedb76dc023b222f27042e6e991f8f9a SHA512 ea71f3ab973e74861da839eaf9246e3d116b94849e5c90972a5073dc19b5ccbdcc013cae80d62fd35450601ce1dc5815d285587ec76b97f575bfad6f0aeeabcd WHIRLPOOL 83ae4c9367ad148a0696a37ee6341a0ce721db7982cb320259dc3f3fb71529ad25341b338d55d37944dbce32d48f82a9580e364f88399fbaae2e6c98837b1f2d
+MISC ChangeLog 608 SHA256 df195912e6324f813e724ed07cb55d743d69e508881f17d515d2a197df0c6688 SHA512 653d1aaea93f577aca33c4d102181885f8e6217c1b86a94e21955291d42d4dc704d218e9f093effe9424f17af9165700f9ff97ff7d9d3b686a8dec9481b8e77e WHIRLPOOL 0608048a5bf1c89dbb45430dd01077c388684f1e50f33617c6872e4522848b9fd10a5d292fdfbbf15903932bff0ae0e851c0d481dd165ce406c2832ec96ffe5b
+MISC metadata.xml 450 SHA256 73803951718b79fb7fc5a596a3dbe96b45ccadd6a55656d0c43e3ab3e11c448d SHA512 8de6f5dadccb7020d6fbbd17a3800dd9a44e4b19f484e38799fd00b240fbd2a4d213454eb7cec2d99ab8ea7834fe5a0d3f792c62420870e55986b2978af9789d WHIRLPOOL 8437d1c0024613efb9e407e52a3110761358369055e1fa72f3b36a1c4846bb093b8b4f129ce42dd75445bd5ac1558e289856d1f068d5d71a883e9c7c8cca6a51
diff --git a/dev-lang/solidity/files/solidity-0.4.2-commit_hash.txt b/dev-lang/solidity/files/solidity-0.4.2-commit_hash.txt
new file mode 100644
index 000000000000..fd2779b63759
--- /dev/null
+++ b/dev-lang/solidity/files/solidity-0.4.2-commit_hash.txt
@@ -0,0 +1 @@
+af6afb04
diff --git a/dev-lang/solidity/metadata.xml b/dev-lang/solidity/metadata.xml
new file mode 100644
index 000000000000..e0f4ff855bce
--- /dev/null
+++ b/dev-lang/solidity/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>mathy@vanvoorden.be</email>
+ <name>Mathy Vanvoorden</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ethereum/solidity</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/solidity/solidity-0.4.2.ebuild b/dev-lang/solidity/solidity-0.4.2.ebuild
new file mode 100644
index 000000000000..31af5a591f47
--- /dev/null
+++ b/dev-lang/solidity/solidity-0.4.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="The Solidity Contract-Oriented Programming Language"
+HOMEPAGE="https://github.com/ethereum/solidity"
+SRC_URI="https://github.com/ethereum/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/jsoncpp:=
+ dev-libs/boost:=
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default
+
+ # The build won't work without this file but it is missing from
+ # the release tarball.
+ #
+ # Reported upstream: https://github.com/ethereum/solidity/issues/1183
+
+ cp "${FILESDIR}"/${P}-commit_hash.txt "${S}"/commit_hash.txt || die "Could not copy commit hash"
+
+ # Without this file the build is marked as a developer version
+ # but it is missing from the release tarball.
+ #
+ # Reported upstream: https://github.com/ethereum/solidity/issues/1183
+
+ touch "${S}"/prerelease.txt || die "Could not mark as release version"
+}
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
new file mode 100644
index 000000000000..e46af97f7798
--- /dev/null
+++ b/dev-lang/spidermonkey/Manifest
@@ -0,0 +1,28 @@
+AUX spidermonkey-52-baseconfig.patch 963 SHA256 0984ee7f952bfe29888c8db436d1636130bf03b124480afdee0d6394da2a5248 SHA512 22870d6ee8a0a0b4359d78173aef0ade49063bfad495fd40815852684a1cdf17f9f50585e0d693eb712c2a2225ea43c4387cf454f3b9bd39e01899f3936775f1 WHIRLPOOL 428cac4e0d1cb232689401a868f51ea67137e83d5f7cc78d1ba11ec257b75704f7d139aec4fdf4ea0914305e260e074f2d9de656600b7d03f8c60387d6e59f3e
+AUX spidermonkey-perl-defined-array-check.patch 341 SHA256 b9a9158188875fb1f1d2a9f080ede82249ebe4ef02e9aa34b0b589a94cdff46c SHA512 5d178b68cf0744da874624da79cd31555bd882aed205e697a3f0bfc3cb91a149d74da79b7af5883ea5a23e1d1692753ebfda0d83e7a25ac000105849db5c1548 WHIRLPOOL 671a97451fcb9e626712db9bcc24718b468c04c577c817af962ccf6a17309905e91985a791025385917df16c199928ac40a06188b41e7366c14374ffebf912d6
+DIST js-1.7.0.tar.gz 1165607 SHA256 44363f0f3895800ee6010763eae90c0d15ed28e07d783bc7b3c607ce98d8668b SHA512 9d9fbd9c1dae969ca19ddb0f977ac56f3e0479ec393b859de252fcdd8b7fc325e80399073540884ed365ce56a3219be34c0db9300d5e50f32969660c90527e51 WHIRLPOOL 8044b306b3a1f0abed5ac8a6bf4f9ed70e1ebc6f83f44934a6306d9ed68cd73124f82e40430d764f158377031f5ee986595e58fdb52259ab6a3a8674eaf4eed1
+DIST js185-1.0.0.tar.gz 6164605 SHA256 5d12f7e1f5b4a99436685d97b9b7b75f094d33580227aa998c406bbae6f2a687 SHA512 2af7122a7c7007fd7b6668776fe1222515a810b3e43bbf0f76b8f94e1ef406ffd3fb5ccec393021b00274c05b38a77235bc8d6886994c56762fcaf0aa7cf6718 WHIRLPOOL 58b372713275874d3ae3c6b58c12c56bf8d17d024d591e321538bcdd8e615332e41655954368ce86b90e970209e3fd650c39d931000880f5ec22cb044b5d7a4e
+DIST mozjs-24.2.0.tar.bz2 15624530 SHA256 e62f3f331ddd90df1e238c09d61a505c516fe9fd8c5c95336611d191d18437d8 SHA512 49805e256f6fa797505c01b7596d5bb941ed7a2454862c52ed42ad48b5ae4540b777e77ed8da1b98c89f8622ed2c76052187983687008a4ff53594addb328df4 WHIRLPOOL ea74d19c79b1a0fe407e2803900c49c23e8b76444fb4e20995072c3c59427e8df1895df04f2f4de779a1c58cd1166dd97aeaf7564350832011efe89dbcf9583e
+DIST mozjs-38.2.1.rc0.tar.bz2 25012381 SHA256 01994c758174bc173bcf4960f05ecb4da21014f09641a63b2952bbf9eeaa8b5c SHA512 60262c7619cc418569aec81775a671105acbc5bf372273828868f2fbbbc4ea33f78380f7455710816bfcdae828fb4115a08234d599cb30d0db859fcba17f019d WHIRLPOOL b1661859dc41a61317a48a8ee34cab53a369f37067c6565db2c890c596411e51981e0e64f81c5f5bd2bc2ff943493d972b00a5984b99de6e07ce16c07f784cb7
+DIST mozjs-45.0.2.tar.bz2 97508152 SHA256 570530b1e551bf4a459d7cae875f33f99d5ef0c29ccc7742a1b6f588e5eadbee SHA512 84a3cf12e2603e00bcfe518a1a5000f53b21758c1c6b32a0410e63ab7db8d4452028195b0ba3e56144054b06e90f8e5195b4db94dba711f7c75d11da99c6c61d WHIRLPOOL dba2f7d4778f47f6476c3dd2e658a5b39ff9e571d4e71fe2508d58910a0989c24f892cbc7cc64aa7c94692cf947eb1a545fd0752bb5d8aace12c2dc96404c114
+DIST mozjs-52.4.0_pre20171003.tar.bz2 30588541 SHA256 12765b2d931fc171014b1e575afb776eebb81cd46cab55838c0f3943e3c51c6a SHA512 80e006ed7550b64dad7cf78335dd9f2d34f50ad486439887f0088eb3817242d24cf7c1d9325e2dcd4a01fd5c5f54d710873113b97fd914ccd961fa46a71653fa WHIRLPOOL 3468e0d2ad65c7b1132711af265054def0b74e2382d31b446b4225467fbf2318f771c1e961cf5eacb656f9db0158282d30383e06daf769a2270501d84c6ec05d
+DIST mozjs17.0.0.tar.gz 6778934 SHA256 321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba SHA512 39b68aeb9f712f146778d8b68ee795709a1372c8ab893a222af4eb34882427d6f5cf877e743d6cb2f1b4348c194d8f3774f00cb775b03515b34b49560b748be4 WHIRLPOOL 4df7b51577787194065162b09d2c3dda849c13fa901305f9925d4ca5d38bb7f8e2daa943099e003fb9d11f9264ae2d77ccf04e5eea11e3ddcb624b504b99d52f
+DIST spidermonkey-52.0-patches-0.tar.xz 5172 SHA256 20165c0fbf5d441cea6217a7a6dca8b8623b5dbba2496eb769aaef3ca93647bf SHA512 88ad640fb0efa4972f1b7782bd0abee1751b73914ee51faade93b25c4d8eec64e7693898842a406c49fc2ab43733404efeccb138afb64d2193b9a5eb612578e3 WHIRLPOOL bd9f264d54bfd14ad9f339229a29a66f873d2ae66fbbc55edd4ae80135f08c6cd4a5e9c5ab65254749ecbafb7c8fdaa5c5936275e263e53ce47ab606d143114c
+DIST spidermonkey-slot0-patches-01.tar.xz 10488 SHA256 7f0bf9921b9320046b9f06afaa1e0764aead72770ef0a3c29f4967aa20f9f7f9 SHA512 6c878ed0b50c052989a8b965fed845e9c672b691f4c4b1f98ee82e81a33880e1e6bf1dac8222d71322553282de602a88272dedebbcf50d27967fc172f0a8054a WHIRLPOOL 6a35cd027af0b7e730f8e563b9a2048bc8c7b8447889ae4b0cb719a12d48917c34b6e694c84e0e0c23a45b5f5d016580ceb97ac58527f705ffe2a59d56f15869
+DIST spidermonkey-slot17-patches-01.tar.xz 2748 SHA256 366ff6db042face813c7e2145184e750d7f8ec44c0e8725c0b53d6be0cc33e2b SHA512 21a90f85d156de3cca9811317507162a458f908bb447924fcfbf49b7bb70496b611ce7df90b90775316b8ceafda56692be3bf856b168b83ed40b8a5c668eed3f WHIRLPOOL bee9e8b46200a2f8b41d5fa208a18471758c7bc1c08c9621a46e54846f49fecb37325a8ada9c438119e4772554078870a5e3d4d76d9d6e13e2d13c287ed0834a
+DIST spidermonkey-slot24-patches-01.tar.xz 3444 SHA256 6a16001d665443c5e40c3237f6adc16589b26993e9d3c87577e6feabae42f7e0 SHA512 712250983f726eb2fe7ae243e9ca510b6e5b8fa0f221fe5120c2e2f75334f7e4b10b8ab172869d7333a120529dbc2a513c170533d5ad5af27a2643ce1384bbdb WHIRLPOOL ec895aabb0486b9eea41bbc005af552cadb587450af72de79a7d4a20f9258b589c63cf1f8b3afbba8244fe8b748937ebcbf572f1655a57e68c0d2b482cddd153
+DIST spidermonkey-slot38-patches-01.tar.xz 7472 SHA256 ff4b66116b18b376630efa0ced0c0ce8c3a636c43b75e34e904c87f8d4cd4f6a SHA512 953acee985d192c6d0f18f14c70fdda33a7c8f784c6833ca8b75495044b40a8b3f29b281c40dbfcda0c8570c111a3dd1717c2ef0ffd651c1b50d1f2bff1f6d09 WHIRLPOOL b41f21c2b7434332c8bff351af7e030a94db7044995f88df74d7efcf2d196f5ddba6293230b42f528ca22ea2d7fdd58d0da935bb90b155f7c83fc5b3f9645ef5
+DIST spidermonkey-slot45-patches-01.tar.xz 5092 SHA256 713e03f4c95908d93003fa1ca776823cccaf8fdc27db09ea59176edc318504dc SHA512 d52f038a7b4f7b410b5a1f94a55962adafc5906e7d85f605f3fe45ad49417c2b9d58d853a81b5d2395a2842c9780992d5a2c1a0e67aa77fb09f21aff9aeb0f7a WHIRLPOOL 9e4119af5a09f155a8f8781448364a9262ab2fb8d085a7235498f555ffa64eb054706ada3548ac40f76e686ed80e2777d39c565a631bf58b0c2e45f6195ce47b
+EBUILD spidermonkey-1.7.0-r3.ebuild 1543 SHA256 9063521f6e069bff96a1972c188e75a9e0795fd5e732235c1cfe44e4ec07c30a SHA512 f4d5449e687e611dec445ece6de0841185a18ab1df8a248bad47c884054859f8e73caf6c9fe8b7c67587ac84244dcd7dfec4a953b119132ebe36551b204a59a4 WHIRLPOOL 7f075dbbd8592cc37949eb1b75ad7b5015007c949ed533395aeda259da5b5ec6ddcf893e0135d85d3719e21b7471a672605faf254e1d83ee0fe5ad9526e43055
+EBUILD spidermonkey-1.8.5-r4.ebuild 4182 SHA256 553d7f01d595a2c1ede9f998850d3d1ab9e56a19506b1e4aaf11497d9d5d764e SHA512 1fd10dcdd72d10bad6f91ba4c45a3368e8f07d15d27f37433773d630f38a953bac3b88a4af12b6bf40efe12850f082684a449b82a76c9773587c6b81b2506c47 WHIRLPOOL e24913445fb072624a1fc995666d07d19ae70d7b1ad3aa8d32208241f2f145bfa003b7b651a0dcee6d81c5711ce0f8b702d5aa409ff80e93ea4b581400ee576a
+EBUILD spidermonkey-1.8.5-r6.ebuild 4380 SHA256 9be340ecd5e8abde01f944cbe594f3cbbc2b770c27db416c52de2729a3a47772 SHA512 7ccbd24ebece87dcee4f1311758ff246dbe6531fd64e479382298e5f78c51f3b2e114c807308a3e52894b9e67a0441bb768d7a0023a96071766f971f1f7bb972 WHIRLPOOL de2cd7291c3ac241a276a0febed5caa6373add3dc965eae7bf26c1dd8e925877bf132ccf2da2aea6aa9f2844d7abdfb534bc7d5d40a77c7b488759bba5eff890
+EBUILD spidermonkey-17.0.0-r4.ebuild 3546 SHA256 c2ac4c27422f2ec41ca901f13749a71ba8505e9f17dbd53c6c1c501271ea5b09 SHA512 bdb32474452a0d7b5ab681c27a46de05cb61bc89fac3aaa00e1289a35676bddd7de9e51eb02bed992535a82f75e1dec74c014e900787f356ea8ada58d5b066d0 WHIRLPOOL 686fe55521c472a69152b518ec3ffcacdb0aaf5cfaf7499ca68bf5d921f8d20b644fd7e6c0c512a3e33cc1761d26016f23d8b72d6104ba4802f9857765ccb0c9
+EBUILD spidermonkey-17.0.0-r5.ebuild 3567 SHA256 fb1492a9eccfa2ffffbf3ce96ba6b93e5a34e684a2df1d17d132cf44b72b2ef6 SHA512 548ec293a1d32986e5cdf72c5cdf68b38494600b8ca3fa6b21281fabf1a2fc5e7c9fa224c1b1e9c4d857f9c68c37041c9eb46e7dd11d31da69adae8fa6f562d2 WHIRLPOOL 63d0bc180866925fb5994e9d2543f319c9d5d2deb5aaedb8c226f853194298a44b5631d9976d99b5a564ba4f74ffccb4c1b7cc71a64523bcf16bd0736f46a2e6
+EBUILD spidermonkey-24.2.0-r3.ebuild 4015 SHA256 f27482f8101a3698168c06489012fea2817bf596810d4ca9ece007ae5a66bf8b SHA512 d715cf8f6ceb2139c14502ebe4c01a5a949fa59937737529dd9a5074444e1c25a2379018d740af2bb2cf99bbb3e35280bc88e68a44fa95d49d24e73f1843f003 WHIRLPOOL 2421fc40db3f21d7fc958b92e0f600bee4fa2daea0fd710fed284339cf8a191d15331b52ca5a20e6c5cd5c549a61c6e6538a70abf89ab25b6cd87e396671ad0f
+EBUILD spidermonkey-24.2.0-r4.ebuild 3994 SHA256 96b800b12661bf6dc91199974d16ef60b41695360b09e002166615f9a699cc80 SHA512 b229c12038ad8ba8b1afba0e194696b25476da8985a443a446dc841180653457337b7bae7769749efe6006c547e723069a3ef00507a5300dfecaa4cb30832371 WHIRLPOOL 45d8abd79819361b893f34f87d4d894ecea945a9053849580fb750b5eb1df11c5124a537fb291038641febb2ada594d310ff6b69fd3bffc274558c2d8591fc11
+EBUILD spidermonkey-38.2.1_rc0.ebuild 3814 SHA256 93db7bea9b303087714562b6fc4720ab6e4749c45e9311962581e62fb04f10f4 SHA512 48c711825885f17617ce60119b9421b8d4cefae43f95eb9b9be9363bdcdab7edd2196795e2b371e3b32ea4b2dc353f94b28cec58a6802f4951a821ebce386794 WHIRLPOOL da437527edc032efa52398c2c6ab89a93c58d17d0e9b587dd2b255f103694fe0009f9d1380a217d9639226d9da3216d8f0392451163eee2c77d87493d81d91b7
+EBUILD spidermonkey-45.0.2.ebuild 3905 SHA256 66063c7090222478796a6900f514f76d7d412c26f406c63c9781d01ebecf9976 SHA512 a9a39994674ecdf1a974fbcc20f8c94e1f1f168db4095ba8c21a9d2fd01a6dbd0a59c932419c6b5f6c42b9bd7cc8b2aeaeb81973663a44b23372ea331b65d5db WHIRLPOOL ecb3e2a37d411571c2887f6db428f00baa501c128a3c748a2f46dd35cac6a755452bc591cfbe511520b065ab10a0e16b18fd50f99d8ec85779ca772e7adab5bb
+EBUILD spidermonkey-52.4.0_pre20171003-r1.ebuild 3868 SHA256 c86c0bfb096cf57a287733d4f5f708e3ff6ab51a610341a53c7e2520452f7aed SHA512 5dcddaf5debdee01c4dab41b5088cf4f5375ba7c2f35f35c91f65dce0c3d1db74ce17955effc5002c8147e37fbb873b6a7d2242c0794ee98052e40e9c68b4f11 WHIRLPOOL bc0e7cd509197173849425bed16e450469a044ae4e136ad306c312f9d021bef7439a3a2d65da548b6505bd866cd7e13d6aea6c553d06cc3bb806d323912f3bd3
+MISC ChangeLog 7562 SHA256 4a84690770f3a251df3ae04cf7ccb0888269e5a8e8ae0ee06637d79a088d3d11 SHA512 b04375c3fa043f6b8012eabe99146c2b1c2a33bfc723be62e77766278c4068a7a901187fbf4b9c9f31b60f477131587f61b8aaf95e8141df4cd82ab82454c170 WHIRLPOOL 7dc6a642ebefb72c30e95beb6d01211d4c9b0d75beabfa9090f253639ccd8d13d48f8bf05fccc2b2d5bae1e3131fe988ea2edcbc60dc45b9669271555288d4ee
+MISC ChangeLog-2015 27026 SHA256 78c7ec27460f4e3a95a243d7c4e679942c24ce574e4336c7f078dff226ad1573 SHA512 c6db6fb86d874662d578eb156d069d2b6e49aeb30fda7287995f956afa93410e19d070cf67aeced6b68f9da1deac971ce88e3ecf381d4d52339bdf8d5fde9cbf WHIRLPOOL 03c8dbd90028d9ad6bf0c8cfe2994113ab2867d37833847c9f49f302541f6551d6a18f6cc3c55a0cdb6130d1640d446141fcbb7aabb4450ffbd5f976d06008ce
+MISC metadata.xml 906 SHA256 5295d39df0c447319bc969a138b0e2d2f2df00df4e2e91cbdfd0a4f2e057701a SHA512 a411a781913fe81801799d4d801645fd8029ee4fb727431589cb948f97464edd828b8d86969b2207880432db8e8e627fad829fd95394fa121bb0ae97ae8249b0 WHIRLPOOL 61251cf2dd68a770b03ec8cc5221b8a5588e34a8f5ac0128059c9eaf8035f563d7acd9d9a08dac4f5b1858950d73836e060a5f22ee529fc9842a8b59146b1491
diff --git a/dev-lang/spidermonkey/files/spidermonkey-52-baseconfig.patch b/dev-lang/spidermonkey/files/spidermonkey-52-baseconfig.patch
new file mode 100644
index 000000000000..ee52728fa952
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-52-baseconfig.patch
@@ -0,0 +1,22 @@
+Fix various paths to include MOZ_APP_VERSION
+
+This has been committed upstream but was not included in
+the 52.4.0 sources that spidermonkey was rolled from.
+
+--- a/config/baseconfig.mk 2017-10-03 14:00:45.000000000 -0400
++++ b/config/baseconfig.mk 2017-10-03 16:36:10.857663794 -0400
+@@ -2,10 +2,10 @@
+ # directly in python/mozbuild/mozbuild/base.py for gmake validation.
+ # We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending
+ # whether a normal build is happening or whether the check is running.
+-includedir := $(includedir)/$(MOZ_APP_NAME)
+-idldir = $(includedir)/idl/$(MOZ_APP_NAME)
+-installdir = $(libdir)/$(MOZ_APP_NAME)
+-sdkdir = $(libdir)/$(MOZ_APP_NAME)
++includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
++idldir = $(includedir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
++installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
++sdkdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+ ifeq (.,$(DEPTH))
+ DIST = dist
+ else
diff --git a/dev-lang/spidermonkey/files/spidermonkey-perl-defined-array-check.patch b/dev-lang/spidermonkey/files/spidermonkey-perl-defined-array-check.patch
new file mode 100644
index 000000000000..c3996ae82bb3
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-perl-defined-array-check.patch
@@ -0,0 +1,11 @@
+--- a/js/src/config/milestone.pl 2013-02-11 17:33:22.000000000 -0500
++++ b/js/src/config/milestone.pl 2015-07-15 10:44:31.676153600 -0400
+@@ -55,7 +55,7 @@
+ #
+ my $milestone = Moz::Milestone::getOfficialMilestone($MILESTONE_FILE);
+
+-if (defined(@TEMPLATE_FILE)) {
++if (@TEMPLATE_FILE) {
+ my $TFILE;
+
+ foreach $TFILE (@TEMPLATE_FILE) {
diff --git a/dev-lang/spidermonkey/metadata.xml b/dev-lang/spidermonkey/metadata.xml
new file mode 100644
index 000000000000..83c60ddc3f4d
--- /dev/null
+++ b/dev-lang/spidermonkey/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>mozilla@gentoo.org</email>
+ <name>Gentoo Mozilla Team</name>
+ </maintainer>
+ <longdescription lang="en">
+ Stand-alone JavaScript C++ library
+ </longdescription>
+ <use>
+ <flag name="custom-optimization">Build with user-specified compiler optimizations
+ (-Os, -O0, -O1, -O2, -O3) from CFLAGS (unsupported)</flag>
+ <flag name="debug">Enable assertions to allow for easier debugging of programs that link to spidermonkey -- note this will often crash software on regular end-user systems</flag>
+ <flag name="threadsafe">Build a threadsafe version of spidermonkey</flag>
+ <flag name="system-icu">Use the system-wide <pkg>dev-libs/icu</pkg> instead of bundled -- note, only takes effect when icu flag is enabled</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/spidermonkey/spidermonkey-1.7.0-r3.ebuild b/dev-lang/spidermonkey/spidermonkey-1.7.0-r3.ebuild
new file mode 100644
index 000000000000..e66d66acb107
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-1.7.0-r3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs multilib flag-o-matic
+
+MY_P="js-${PV}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+SRC_URI="http://archive.mozilla.org/pub/js/${MY_P}.tar.gz
+ https://dev.gentoo.org/~axs/distfiles/${PN}-slot0-patches-01.tar.xz
+ "
+
+LICENSE="NPL-1.1"
+SLOT="0/js"
+KEYWORDS="alpha amd64 ~arm ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="threadsafe unicode"
+
+S="${WORKDIR}/js/src"
+
+RDEPEND="threadsafe? ( dev-libs/nspr )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${WORKDIR}"/sm0/${PN}-1.5-build.patch \
+ "${WORKDIR}"/sm0/${PN}-1.6-header.patch \
+ "${WORKDIR}"/sm0/${P}-threadsafe.diff \
+ "${WORKDIR}"/sm0/${P}-ldflags.patch
+
+ # don't force owner for Prefix
+ sed -i -e '/^INSTALL :=/s/-g 0 -o root//' Makefile.ref || die
+
+ if [[ ${CHOST} == *-freebsd* ]]; then
+ # Don't try to be smart, this does not work in cross-compile anyway
+ ln -s "${S}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk"
+ fi
+}
+
+src_compile() {
+ use unicode && append-flags "-DJS_C_STRINGS_ARE_UTF8"
+ tc-export CC LD AR RANLIB
+ local threadsafe=""
+ use threadsafe && threadsafe="JS_THREADSAFE=1"
+ emake -j1 -f Makefile.ref LIBDIR="$(get_libdir)" ${threadsafe} \
+ XLDFLAGS="$(raw-ldflags)" HOST_LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ emake -f Makefile.ref install DESTDIR="${ED}" LIBDIR="$(get_libdir)"
+ dodoc ../jsd/README
+ dohtml README.html
+}
diff --git a/dev-lang/spidermonkey/spidermonkey-1.8.5-r4.ebuild b/dev-lang/spidermonkey/spidermonkey-1.8.5-r4.ebuild
new file mode 100644
index 000000000000..a5e340c26864
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-1.8.5-r4.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+WANT_AUTOCONF="2.1"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+inherit autotools eutils toolchain-funcs multilib python-any-r1 versionator pax-utils
+
+MY_PN="js"
+TARBALL_PV="$(replace_all_version_separators '' $(get_version_component_range 1-3))"
+MY_P="${MY_PN}-${PV}"
+TARBALL_P="${MY_PN}${TARBALL_PV}-1.0.0"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+SRC_URI="https://archive.mozilla.org/pub/js/${TARBALL_P}.tar.gz
+ https://dev.gentoo.org/~axs/distfiles/${PN}-slot0-patches-01.tar.xz"
+
+LICENSE="NPL-1.1"
+SLOT="0/mozjs185"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
+IUSE="debug minimal static-libs test"
+
+S="${WORKDIR}/${MY_P}"
+BUILDDIR="${S}/js/src"
+
+RDEPEND=">=dev-libs/nspr-4.7.0
+ sys-libs/readline:0=
+ x64-macos? ( dev-libs/jemalloc )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ app-arch/zip
+ virtual/pkgconfig"
+
+pkg_setup(){
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ export LC_ALL="C"
+ fi
+}
+
+src_prepare() {
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=628723#c43
+ epatch "${WORKDIR}"/sm0/${P}-fix-install-symlinks.patch
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=638056#c9
+ epatch "${WORKDIR}"/sm0/${P}-fix-ppc64.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=400727
+ # https://bugs.gentoo.org/show_bug.cgi?id=420471
+ epatch "${WORKDIR}"/sm0/${P}-arm_respect_cflags-3.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=438746
+ epatch "${WORKDIR}"/sm0/${PN}-1.8.7-freebsd-pthreads.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=441928
+ epatch "${WORKDIR}"/sm0/${PN}-1.8.5-perf_event-check.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=439260
+ epatch "${WORKDIR}"/sm0/${P}-symbol-versions.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=441934
+ epatch "${WORKDIR}"/sm0/${PN}-1.8.5-ia64-fix.patch
+ epatch "${WORKDIR}"/sm0/${PN}-1.8.5-ia64-static-strings.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=431560
+ epatch "${WORKDIR}"/sm0/${PN}-1.8.5-isfinite.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=552786
+ epatch "${FILESDIR}"/${PN}-perl-defined-array-check.patch
+
+ epatch_user
+
+ cd "${BUILDDIR}" || die
+ eautoconf
+}
+
+src_configure() {
+ cd "${BUILDDIR}" || die
+
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
+ LD="$(tc-getLD)" \
+ econf \
+ ${myopts} \
+ --enable-jemalloc \
+ --enable-readline \
+ --enable-threadsafe \
+ --with-system-nspr \
+ --disable-optimize \
+ --disable-profile-guided-optimization \
+ $(use_enable debug) \
+ $(use_enable static-libs static) \
+ $(use_enable test tests)
+}
+
+cross_make() {
+ emake \
+ CFLAGS="${BUILD_CFLAGS}" \
+ CXXFLAGS="${BUILD_CXXFLAGS}" \
+ AR="${BUILD_AR}" \
+ CC="${BUILD_CC}" \
+ CXX="${BUILD_CXX}" \
+ RANLIB="${BUILD_RANLIB}" \
+ "$@"
+}
+src_compile() {
+ cd "${BUILDDIR}" || die
+ if tc-is-cross-compiler; then
+ tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
+ cross_make jscpucfg host_jsoplengen host_jskwgen
+ cross_make -C config nsinstall
+ mv {,native-}jscpucfg || die
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -i \
+ -e 's@./jscpucfg@./native-jscpucfg@' \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ Makefile || die
+ sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die
+ rm -f config/host_nsinstall.o \
+ config/host_pathsub.o \
+ host_jskwgen.o \
+ host_jsoplengen.o || die
+ fi
+ emake
+}
+
+src_test() {
+ cd "${BUILDDIR}/jsapi-tests" || die
+ # for bug 415791
+ pax-mark mr jsapi-tests
+ emake check
+}
+
+src_install() {
+ cd "${BUILDDIR}" || die
+ emake DESTDIR="${D}" install
+ # bug 437520 , exclude js shell for small systems
+ if ! use minimal ; then
+ dobin shell/js
+ pax-mark m "${ED}/usr/bin/js"
+ fi
+ dodoc ../../README
+ dohtml README.html
+
+ if ! use static-libs; then
+ # We can't actually disable building of static libraries
+ # They're used by the tests and in a few other places
+ find "${D}" -iname '*.a' -delete || die
+ fi
+}
diff --git a/dev-lang/spidermonkey/spidermonkey-1.8.5-r6.ebuild b/dev-lang/spidermonkey/spidermonkey-1.8.5-r6.ebuild
new file mode 100644
index 000000000000..7cb19fe5087f
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-1.8.5-r6.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+WANT_AUTOCONF="2.1"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+inherit autotools eutils toolchain-funcs multilib python-any-r1 versionator pax-utils
+
+MY_PN="js"
+TARBALL_PV="$(replace_all_version_separators '' $(get_version_component_range 1-3))"
+MY_P="${MY_PN}-${PV}"
+TARBALL_P="${MY_PN}${TARBALL_PV}-1.0.0"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+SRC_URI="https://archive.mozilla.org/pub/js/${TARBALL_P}.tar.gz
+ https://dev.gentoo.org/~axs/distfiles/${PN}-slot0-patches-01.tar.xz
+ "
+
+LICENSE="NPL-1.1"
+SLOT="0/mozjs185"
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-macos"
+IUSE="debug minimal static-libs test"
+
+S="${WORKDIR}/${MY_P}"
+BUILDDIR="${S}/js/src"
+
+RDEPEND=">=dev-libs/nspr-4.7.0
+ sys-libs/readline:0=
+ x64-macos? ( dev-libs/jemalloc )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ app-arch/zip
+ virtual/pkgconfig"
+
+pkg_setup(){
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ export LC_ALL="C"
+ fi
+}
+
+src_prepare() {
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=628723#c43
+ epatch "${WORKDIR}"/sm0/${P}-fix-install-symlinks.patch
+ # https://bugzilla.mozilla.org/show_bug.cgi?id=638056#c9
+ epatch "${WORKDIR}"/sm0/${P}-fix-ppc64.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=400727
+ # https://bugs.gentoo.org/show_bug.cgi?id=420471
+ epatch "${WORKDIR}"/sm0/${P}-arm_respect_cflags-3.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=438746
+ epatch "${WORKDIR}"/sm0/${PN}-1.8.7-freebsd-pthreads.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=441928
+ epatch "${WORKDIR}"/sm0/${PN}-1.8.5-perf_event-check.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=439260
+ epatch "${WORKDIR}"/sm0/${P}-symbol-versions.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=441934
+ epatch "${WORKDIR}"/sm0/${PN}-1.8.5-ia64-fix.patch
+ epatch "${WORKDIR}"/sm0/${PN}-1.8.5-ia64-static-strings.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=431560
+ epatch "${WORKDIR}"/sm0/${PN}-1.8.5-isfinite.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=552786
+ epatch "${FILESDIR}"/${PN}-perl-defined-array-check.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=439558
+ epatch "${WORKDIR}"/sm0/${PN}-1.8.7-x32.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=582478
+ epatch "${WORKDIR}"/sm0/${PN}-1.8.5-gcc6.patch
+
+ epatch_user
+
+ cd "${BUILDDIR}" || die
+ eautoconf
+}
+
+src_configure() {
+ cd "${BUILDDIR}" || die
+
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
+ LD="$(tc-getLD)" \
+ econf \
+ ${myopts} \
+ --enable-jemalloc \
+ --enable-readline \
+ --enable-threadsafe \
+ --with-system-nspr \
+ --disable-optimize \
+ --disable-profile-guided-optimization \
+ $(use_enable debug) \
+ $(use_enable static-libs static) \
+ $(use_enable test tests)
+}
+
+cross_make() {
+ emake \
+ CFLAGS="${BUILD_CFLAGS}" \
+ CXXFLAGS="${BUILD_CXXFLAGS}" \
+ AR="${BUILD_AR}" \
+ CC="${BUILD_CC}" \
+ CXX="${BUILD_CXX}" \
+ RANLIB="${BUILD_RANLIB}" \
+ "$@"
+}
+src_compile() {
+ cd "${BUILDDIR}" || die
+ if tc-is-cross-compiler; then
+ tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
+ cross_make jscpucfg host_jsoplengen host_jskwgen
+ cross_make -C config nsinstall
+ mv {,native-}jscpucfg || die
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -i \
+ -e 's@./jscpucfg@./native-jscpucfg@' \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ Makefile || die
+ sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die
+ rm -f config/host_nsinstall.o \
+ config/host_pathsub.o \
+ host_jskwgen.o \
+ host_jsoplengen.o || die
+ fi
+ emake
+}
+
+src_test() {
+ cd "${BUILDDIR}/jsapi-tests" || die
+ # for bug 415791
+ pax-mark mr jsapi-tests
+ emake check
+}
+
+src_install() {
+ cd "${BUILDDIR}" || die
+ emake DESTDIR="${D}" install
+ # bug 437520 , exclude js shell for small systems
+ if ! use minimal ; then
+ dobin shell/js
+ pax-mark m "${ED}/usr/bin/js"
+ fi
+ dodoc ../../README
+ dohtml README.html
+
+ if ! use static-libs; then
+ # We can't actually disable building of static libraries
+ # They're used by the tests and in a few other places
+ find "${D}" -iname '*.a' -delete || die
+ fi
+}
diff --git a/dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild b/dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild
new file mode 100644
index 000000000000..06416bed5282
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-17.0.0-r4.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+WANT_AUTOCONF="2.1"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+inherit eutils toolchain-funcs multilib python-any-r1 versionator pax-utils
+
+MY_PN="mozjs"
+MY_P="${MY_PN}${PV}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+SRC_URI="http://archive.mozilla.org/pub/js/${MY_PN}${PV}.tar.gz
+ https://dev.gentoo.org/~axs/distfiles/${PN}-slot17-patches-01.tar.xz"
+
+LICENSE="NPL-1.1"
+SLOT="17"
+# "MIPS, MacroAssembler is not supported" wrt #491294 for -mips
+KEYWORDS="alpha amd64 arm -hppa ia64 -mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
+IUSE="debug jit minimal static-libs test"
+
+REQUIRED_USE="debug? ( jit )"
+RESTRICT="ia64? ( test )"
+
+S="${WORKDIR}/${MY_P}"
+BUILDDIR="${S}/js/src"
+
+RDEPEND=">=dev-libs/nspr-4.9.4
+ virtual/libffi
+ sys-libs/readline:0=
+ >=sys-libs/zlib-1.1.4"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ app-arch/zip
+ virtual/pkgconfig"
+
+pkg_setup(){
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ python-any-r1_pkg_setup
+ export LC_ALL="C"
+ fi
+}
+
+src_prepare() {
+ epatch "${WORKDIR}"/sm17/${PN}-${SLOT}-js-config-shebang.patch
+ epatch "${WORKDIR}"/sm17/${PN}-${SLOT}-ia64-mmap.patch
+ epatch "${WORKDIR}"/sm17/${PN}-17.0.0-fix-file-permissions.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=552786
+ epatch "${FILESDIR}"/${PN}-perl-defined-array-check.patch
+
+ # Remove obsolete jsuword bug #506160
+ sed -i -e '/jsuword/d' "${BUILDDIR}"/jsval.h ||die "sed failed"
+ epatch_user
+
+ if [[ ${CHOST} == *-freebsd* ]]; then
+ # Don't try to be smart, this does not work in cross-compile anyway
+ ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die
+ fi
+}
+
+src_configure() {
+ cd "${BUILDDIR}" || die
+
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
+ LD="$(tc-getLD)" \
+ econf \
+ ${myopts} \
+ --enable-jemalloc \
+ --enable-readline \
+ --enable-threadsafe \
+ --with-system-nspr \
+ --enable-system-ffi \
+ --enable-jemalloc \
+ $(use_enable debug) \
+ $(use_enable jit tracejit) \
+ $(use_enable jit methodjit) \
+ $(use_enable static-libs static) \
+ $(use_enable test tests)
+}
+
+cross_make() {
+ emake \
+ CFLAGS="${BUILD_CFLAGS}" \
+ CXXFLAGS="${BUILD_CXXFLAGS}" \
+ AR="${BUILD_AR}" \
+ CC="${BUILD_CC}" \
+ CXX="${BUILD_CXX}" \
+ RANLIB="${BUILD_RANLIB}" \
+ "$@"
+}
+src_compile() {
+ cd "${BUILDDIR}" || die
+ if tc-is-cross-compiler; then
+ tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
+ cross_make host_jsoplengen host_jskwgen
+ cross_make -C config nsinstall
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -i \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ Makefile || die
+ sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die
+ rm -f config/host_nsinstall.o \
+ config/host_pathsub.o \
+ host_jskwgen.o \
+ host_jsoplengen.o || die
+ fi
+ emake
+}
+
+src_test() {
+ cd "${BUILDDIR}/jsapi-tests" || die
+ emake check
+}
+
+src_install() {
+ cd "${BUILDDIR}" || die
+ emake DESTDIR="${D}" install
+
+ if ! use minimal; then
+ if use jit; then
+ pax-mark m "${ED}/usr/bin/js${SLOT}"
+ fi
+ else
+ rm -f "${ED}/usr/bin/js${SLOT}"
+ fi
+
+ if ! use static-libs; then
+ # We can't actually disable building of static libraries
+ # They're used by the tests and in a few other places
+ find "${D}" -iname '*.a' -delete || die
+ fi
+}
diff --git a/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild b/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild
new file mode 100644
index 000000000000..4bdd3449d2aa
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+WANT_AUTOCONF="2.1"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+inherit toolchain-funcs multilib python-any-r1 versionator pax-utils
+
+MY_PN="mozjs"
+MY_P="${MY_PN}${PV}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+SRC_URI="http://archive.mozilla.org/pub/js/${MY_PN}${PV}.tar.gz
+ https://dev.gentoo.org/~axs/distfiles/${PN}-slot17-patches-01.tar.xz"
+
+LICENSE="NPL-1.1"
+SLOT="17"
+# "MIPS, MacroAssembler is not supported" wrt #491294 for -mips
+KEYWORDS="~alpha ~amd64 ~arm -hppa ia64 -mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="debug jit minimal static-libs test"
+
+REQUIRED_USE="debug? ( jit )"
+RESTRICT="ia64? ( test )"
+
+S="${WORKDIR}/${MY_P}"
+BUILDDIR="${S}/js/src"
+
+RDEPEND=">=dev-libs/nspr-4.9.4
+ virtual/libffi
+ sys-libs/readline:0=
+ >=sys-libs/zlib-1.1.4"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ app-arch/zip
+ virtual/pkgconfig"
+
+pkg_setup(){
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ python-any-r1_pkg_setup
+ export LC_ALL="C"
+ fi
+}
+
+PATCHES=(
+ "${WORKDIR}"/sm17/${PN}-${SLOT}-js-config-shebang.patch
+ "${WORKDIR}"/sm17/${PN}-${SLOT}-ia64-mmap.patch
+ "${WORKDIR}"/sm17/${PN}-17.0.0-fix-file-permissions.patch
+ "${WORKDIR}"/sm17/${PN}-17-clang.patch
+ "${FILESDIR}"/${PN}-perl-defined-array-check.patch
+ "${WORKDIR}"/sm17/${PN}-17-fix_pointer_dereference.patch
+)
+
+src_prepare() {
+ default
+
+ # Remove obsolete jsuword bug #506160
+ sed -i -e '/jsuword/d' "${BUILDDIR}"/jsval.h || die "sed failed"
+
+ if [[ ${CHOST} == *-freebsd* ]]; then
+ # Don't try to be smart, this does not work in cross-compile anyway
+ ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die
+ fi
+}
+
+src_configure() {
+ cd "${BUILDDIR}" || die
+
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
+ LD="$(tc-getLD)" \
+ econf \
+ ${myopts} \
+ --enable-jemalloc \
+ --enable-readline \
+ --enable-threadsafe \
+ --with-system-nspr \
+ --enable-system-ffi \
+ --enable-jemalloc \
+ $(use_enable debug) \
+ $(use_enable jit tracejit) \
+ $(use_enable jit methodjit) \
+ $(use_enable static-libs static) \
+ $(use_enable test tests)
+}
+
+cross_make() {
+ emake \
+ CFLAGS="${BUILD_CFLAGS}" \
+ CXXFLAGS="${BUILD_CXXFLAGS}" \
+ AR="${BUILD_AR}" \
+ CC="${BUILD_CC}" \
+ CXX="${BUILD_CXX}" \
+ RANLIB="${BUILD_RANLIB}" \
+ "$@"
+}
+src_compile() {
+ cd "${BUILDDIR}" || die
+ if tc-is-cross-compiler; then
+ tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
+ cross_make host_jsoplengen host_jskwgen
+ cross_make -C config nsinstall
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -i \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ Makefile || die
+ sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die
+ rm -f config/host_nsinstall.o \
+ config/host_pathsub.o \
+ host_jskwgen.o \
+ host_jsoplengen.o || die
+ fi
+ emake
+}
+
+src_test() {
+ cd "${BUILDDIR}/jsapi-tests" || die
+ emake check
+}
+
+src_install() {
+ cd "${BUILDDIR}" || die
+ default
+
+ if ! use minimal; then
+ if use jit; then
+ pax-mark m "${ED}/usr/bin/js${SLOT}" || die
+ fi
+ else
+ rm -f "${ED}/usr/bin/js${SLOT}" || die
+ fi
+
+ if ! use static-libs; then
+ # We can't actually disable building of static libraries
+ # They're used by the tests and in a few other places
+ find "${D}" -iname '*.a' -delete || die
+ fi
+}
diff --git a/dev-lang/spidermonkey/spidermonkey-24.2.0-r3.ebuild b/dev-lang/spidermonkey/spidermonkey-24.2.0-r3.ebuild
new file mode 100644
index 000000000000..3d94feba95d4
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-24.2.0-r3.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+WANT_AUTOCONF="2.1"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+inherit autotools eutils toolchain-funcs multilib python-any-r1 versionator pax-utils
+
+MY_PN="mozjs"
+MY_P="${MY_PN}-${PV/_/.}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+SRC_URI="https://archive.mozilla.org/pub/js/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~axs/distfiles/${PN}-slot24-patches-01.tar.xz"
+
+LICENSE="NPL-1.1"
+SLOT="24"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
+IUSE="debug icu jit minimal static-libs +system-icu test"
+
+RESTRICT="ia64? ( test )"
+
+S="${WORKDIR}/${MY_P%.rc*}"
+BUILDDIR="${S}/js/src"
+
+RDEPEND=">=dev-libs/nspr-4.9.4
+ virtual/libffi
+ sys-libs/readline:0=
+ >=sys-libs/zlib-1.1.4
+ system-icu? ( >=dev-libs/icu-1.51:= )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ app-arch/zip
+ virtual/pkgconfig"
+
+pkg_setup(){
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ python-any-r1_pkg_setup
+ export LC_ALL="C"
+ fi
+}
+
+src_prepare() {
+ epatch "${WORKDIR}"/sm24/${PN}-${SLOT}-system-icu.patch
+ epatch "${WORKDIR}"/sm24/${PN}-24.2.0-fix-file-permissions.patch
+ epatch "${WORKDIR}"/sm24/${PN}-${SLOT}-upward-growing-stack.patch
+ # https://bugs.gentoo.org/show_bug.cgi?id=552786
+ epatch "${FILESDIR}"/${PN}-perl-defined-array-check.patch
+ epatch_user
+
+ if [[ ${CHOST} == *-freebsd* ]]; then
+ # Don't try to be smart, this does not work in cross-compile anyway
+ ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die
+ fi
+
+ cd "${BUILDDIR}" || die
+ eautoconf
+}
+
+src_configure() {
+ export SHELL=/bin/sh
+ cd "${BUILDDIR}" || die
+
+ local myopts=""
+ if use icu; then # make sure system-icu flag only affects icu-enabled build
+ myopts+="$(use_with system-icu)"
+ else
+ myopts+="--without-system-icu"
+ fi
+
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
+ LD="$(tc-getLD)" \
+ econf \
+ ${myopts} \
+ --enable-jemalloc \
+ --enable-readline \
+ --enable-threadsafe \
+ --with-system-nspr \
+ --enable-system-ffi \
+ --disable-optimize \
+ $(use_enable icu intl-api) \
+ $(use_enable debug) \
+ $(use_enable jit yarr-jit) \
+ $(use_enable jit ion) \
+ $(use_enable static-libs static) \
+ $(use_enable test tests)
+}
+
+cross_make() {
+ emake \
+ CFLAGS="${BUILD_CFLAGS}" \
+ CXXFLAGS="${BUILD_CXXFLAGS}" \
+ AR="${BUILD_AR}" \
+ CC="${BUILD_CC}" \
+ CXX="${BUILD_CXX}" \
+ RANLIB="${BUILD_RANLIB}" \
+ "$@"
+}
+src_compile() {
+ cd "${BUILDDIR}" || die
+ if tc-is-cross-compiler; then
+ tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS="" \
+ host_jsoplengen host_jskwgen
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" HOST_OPTIMIZE_FLAGS="" \
+ -C config nsinstall
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -i \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ Makefile || die
+ sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die
+ rm -f config/host_nsinstall.o \
+ config/host_pathsub.o \
+ host_jskwgen.o \
+ host_jsoplengen.o || die
+ fi
+ emake \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS=""
+}
+
+src_test() {
+ cd "${BUILDDIR}/jsapi-tests" || die
+ emake check
+}
+
+src_install() {
+ cd "${BUILDDIR}" || die
+ emake DESTDIR="${D}" install
+
+ if ! use minimal; then
+ if use jit; then
+ pax-mark m "${ED}/usr/bin/js${SLOT}"
+ fi
+ else
+ rm -f "${ED}/usr/bin/js${SLOT}"
+ fi
+
+ if ! use static-libs; then
+ # We can't actually disable building of static libraries
+ # They're used by the tests and in a few other places
+ find "${D}" -iname '*.a' -delete || die
+ fi
+}
diff --git a/dev-lang/spidermonkey/spidermonkey-24.2.0-r4.ebuild b/dev-lang/spidermonkey/spidermonkey-24.2.0-r4.ebuild
new file mode 100644
index 000000000000..ec3b7c3f33f1
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-24.2.0-r4.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WANT_AUTOCONF="2.1"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="threads"
+inherit autotools toolchain-funcs multilib python-any-r1 versionator pax-utils
+
+MY_PN="mozjs"
+MY_P="${MY_PN}-${PV/_/.}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+SRC_URI="https://archive.mozilla.org/pub/js/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~axs/distfiles/${PN}-slot24-patches-01.tar.xz"
+
+LICENSE="NPL-1.1"
+SLOT="24"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="debug icu jit minimal static-libs +system-icu test"
+
+RESTRICT="ia64? ( test )"
+
+S="${WORKDIR}/${MY_P%.rc*}"
+BUILDDIR="${S}/js/src"
+
+RDEPEND=">=dev-libs/nspr-4.9.4
+ virtual/libffi
+ sys-libs/readline:0=
+ >=sys-libs/zlib-1.1.4
+ system-icu? ( >=dev-libs/icu-1.51:= )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ app-arch/zip
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${WORKDIR}"/sm24/${PN}-${SLOT}-system-icu.patch
+ "${WORKDIR}"/sm24/${PN}-24.2.0-fix-file-permissions.patch
+ "${WORKDIR}"/sm24/${PN}-${SLOT}-upward-growing-stack.patch
+ "${FILESDIR}"/${PN}-perl-defined-array-check.patch
+ "${WORKDIR}"/sm24/${PN}-17-fix_pointer_dereference.patch
+)
+
+pkg_setup(){
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ python-any-r1_pkg_setup
+ export LC_ALL="C"
+ fi
+}
+
+src_prepare() {
+ default
+
+ if [[ ${CHOST} == *-freebsd* ]]; then
+ # Don't try to be smart, this does not work in cross-compile anyway
+ ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die
+ fi
+
+ cd "${BUILDDIR}" || die
+ eautoconf
+}
+
+src_configure() {
+ export SHELL=/bin/sh
+ cd "${BUILDDIR}" || die
+
+ local myopts=""
+ if use icu; then # make sure system-icu flag only affects icu-enabled build
+ myopts+="$(use_with system-icu)"
+ else
+ myopts+="--without-system-icu"
+ fi
+
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \
+ LD="$(tc-getLD)" \
+ econf \
+ ${myopts} \
+ --enable-jemalloc \
+ --enable-readline \
+ --enable-threadsafe \
+ --with-system-nspr \
+ --enable-system-ffi \
+ --disable-optimize \
+ $(use_enable icu intl-api) \
+ $(use_enable debug) \
+ $(use_enable jit yarr-jit) \
+ $(use_enable jit ion) \
+ $(use_enable static-libs static) \
+ $(use_enable test tests)
+}
+
+cross_make() {
+ emake \
+ CFLAGS="${BUILD_CFLAGS}" \
+ CXXFLAGS="${BUILD_CXXFLAGS}" \
+ AR="${BUILD_AR}" \
+ CC="${BUILD_CC}" \
+ CXX="${BUILD_CXX}" \
+ RANLIB="${BUILD_RANLIB}" \
+ "$@"
+}
+src_compile() {
+ cd "${BUILDDIR}" || die
+ if tc-is-cross-compiler; then
+ tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS="" \
+ host_jsoplengen host_jskwgen
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" HOST_OPTIMIZE_FLAGS="" \
+ -C config nsinstall
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -i \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ Makefile || die
+ sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die
+ rm -f config/host_nsinstall.o \
+ config/host_pathsub.o \
+ host_jskwgen.o \
+ host_jsoplengen.o || die
+ fi
+ emake \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS=""
+}
+
+src_test() {
+ cd "${BUILDDIR}/jsapi-tests" || die
+ emake check
+}
+
+src_install() {
+ cd "${BUILDDIR}" || die
+ default
+
+ if ! use minimal; then
+ if use jit; then
+ pax-mark m "${ED}/usr/bin/js${SLOT}" || die
+ fi
+ else
+ rm -f "${ED}/usr/bin/js${SLOT}" || die
+ fi
+
+ if ! use static-libs; then
+ # We can't actually disable building of static libraries
+ # They're used by the tests and in a few other places
+ find "${D}" -iname '*.a' -delete || die
+ fi
+}
diff --git a/dev-lang/spidermonkey/spidermonkey-38.2.1_rc0.ebuild b/dev-lang/spidermonkey/spidermonkey-38.2.1_rc0.ebuild
new file mode 100644
index 000000000000..c55476923b0c
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-38.2.1_rc0.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WANT_AUTOCONF="2.1"
+inherit autotools toolchain-funcs pax-utils mozcoreconf-v4
+
+MY_PN="mozjs"
+MY_P="${MY_PN}-${PV/_/.}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+SRC_URI="https://people.mozilla.org/~sstangl/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~axs/distfiles/${PN}-slot38-patches-01.tar.xz"
+
+LICENSE="NPL-1.1"
+SLOT="38"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="debug +jit minimal static-libs +system-icu test"
+
+RESTRICT="ia64? ( test )"
+
+#S="${WORKDIR}/${MY_P%.rc*}"
+S="${WORKDIR}/${MY_PN}-${SLOT}.0.0"
+BUILDDIR="${S}/js/src"
+
+RDEPEND=">=dev-libs/nspr-4.10.10
+ virtual/libffi
+ sys-libs/readline:0=
+ >=sys-libs/zlib-1.2.3
+ system-icu? ( >=dev-libs/icu-51.1:= )"
+DEPEND="${RDEPEND}"
+
+pkg_setup(){
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ moz_pkgsetup
+ fi
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/sm38/${PN}-38-jsapi-tests.patch \
+ "${WORKDIR}"/sm38/mozjs38-1269317.patch \
+ "${WORKDIR}"/sm38/mozjs38-fix-tracelogger.patch \
+ "${WORKDIR}"/sm38/mozjs38-copy-headers.patch \
+ "${WORKDIR}"/sm38/mozjs38-pkg-config-version.patch \
+ "${WORKDIR}"/sm38/mozilla_configure_regexp_esr38.patch
+
+ eapply_user
+
+ if [[ ${CHOST} == *-freebsd* ]]; then
+ # Don't try to be smart, this does not work in cross-compile anyway
+ ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die
+ fi
+
+ cd "${BUILDDIR}" || die
+ eautoconf
+}
+
+src_configure() {
+ export SHELL="${SHELL:-${EPREFIX%/}/bin/bash}"
+
+ cd "${BUILDDIR}" || die
+
+ econf \
+ --enable-jemalloc \
+ --enable-readline \
+ --enable-threadsafe \
+ --with-system-nspr \
+ --enable-system-ffi \
+ --disable-optimize \
+ --with-intl-api \
+ $(use_with system-icu) \
+ $(use_enable debug) \
+ $(use_enable jit yarr-jit) \
+ $(use_enable jit ion) \
+ $(use_enable static-libs static) \
+ $(use_enable test tests)
+}
+
+cross_make() {
+ emake \
+ CFLAGS="${BUILD_CFLAGS}" \
+ CXXFLAGS="${BUILD_CXXFLAGS}" \
+ AR="${BUILD_AR}" \
+ CC="${BUILD_CC}" \
+ CXX="${BUILD_CXX}" \
+ RANLIB="${BUILD_RANLIB}" \
+ "$@"
+}
+src_compile() {
+ cd "${BUILDDIR}" || die
+ if tc-is-cross-compiler; then
+ tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS="" \
+ host_jsoplengen host_jskwgen
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" HOST_OPTIMIZE_FLAGS="" \
+ -C config nsinstall
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -i \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ Makefile || die
+ sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die
+ rm -f config/host_nsinstall.o \
+ config/host_pathsub.o \
+ host_jskwgen.o \
+ host_jsoplengen.o || die
+ fi
+
+ MOZ_MAKE_FLAGS="${MAKEOPTS}"
+ emake \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS=""
+}
+
+src_test() {
+ cd "${BUILDDIR}/js/src/jsapi-tests" || die
+ ./jsapi-tests || die
+}
+
+src_install() {
+ cd "${BUILDDIR}" || die
+ emake DESTDIR="${D}" install
+
+ mv "${ED}"usr/bin/js-config{,${SLOT}} || die
+ mv "${ED}"usr/bin/js{,${SLOT}} || die
+ if ! use minimal; then
+ if use jit; then
+ pax-mark m "${ED}"usr/bin/js${SLOT}
+ fi
+ else
+ rm -f "${ED}"/usr/bin/js${SLOT}
+ fi
+
+ if ! use static-libs; then
+ # We can't actually disable building of static libraries
+ # They're used by the tests and in a few other places
+ find "${D}" -iname '*.a' -o -iname '*.ajs' -delete || die
+ fi
+}
diff --git a/dev-lang/spidermonkey/spidermonkey-45.0.2.ebuild b/dev-lang/spidermonkey/spidermonkey-45.0.2.ebuild
new file mode 100644
index 000000000000..2602ecc5e97c
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-45.0.2.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WANT_AUTOCONF="2.1"
+inherit autotools toolchain-funcs pax-utils mozcoreconf-v4
+
+MY_PN="mozjs"
+MY_P="${MY_PN}-${PV/_/.}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+SRC_URI="https://people.mozilla.org/~sfink/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~axs/distfiles/${PN}-slot45-patches-01.tar.xz"
+
+LICENSE="NPL-1.1"
+SLOT="45"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="debug +jit minimal static-libs +system-icu test"
+
+RESTRICT="ia64? ( test )"
+
+S="${WORKDIR}/${MY_P%.rc*}"
+BUILDDIR="${S}/js/src"
+
+RDEPEND=">=dev-libs/nspr-4.10.10
+ virtual/libffi
+ sys-libs/readline:0=
+ >=sys-libs/zlib-1.2.3
+ system-icu? ( >=dev-libs/icu-51.1:= )"
+DEPEND="${RDEPEND}"
+
+pkg_setup(){
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ moz_pkgsetup
+ fi
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/sm45/${PN}-38-jsapi-tests.patch \
+ "${WORKDIR}"/sm45/mozjs45-1266366.patch \
+ "${WORKDIR}"/sm45/mozjs38-pkg-config-version.patch \
+ "${WORKDIR}"/sm45/mozilla_configure_regexp_esr.patch \
+ "${WORKDIR}"/sm45/${PN}-${SLOT}-dont-symlink-non-objfiles.patch
+
+ # apply relevant (modified) patches from gentoo's firefox-45 patchset
+ eapply "${WORKDIR}"/sm45/ff45
+
+ eapply_user
+
+ if [[ ${CHOST} == *-freebsd* ]]; then
+ # Don't try to be smart, this does not work in cross-compile anyway
+ ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die
+ fi
+
+ cd "${BUILDDIR}" || die
+ eautoconf
+}
+
+src_configure() {
+ export SHELL="${SHELL:-${EPREFIX%/}/bin/bash}"
+ cd "${BUILDDIR}" || die
+
+ econf \
+ --enable-jemalloc \
+ --enable-readline \
+ --enable-threadsafe \
+ --with-system-nspr \
+ --enable-system-ffi \
+ --disable-optimize \
+ --with-intl-api \
+ $(use_with system-icu) \
+ $(use_enable debug) \
+ $(use_enable jit yarr-jit) \
+ $(use_enable jit ion) \
+ $(use_enable static-libs static) \
+ $(use_enable test tests)
+}
+
+cross_make() {
+ emake \
+ CFLAGS="${BUILD_CFLAGS}" \
+ CXXFLAGS="${BUILD_CXXFLAGS}" \
+ AR="${BUILD_AR}" \
+ CC="${BUILD_CC}" \
+ CXX="${BUILD_CXX}" \
+ RANLIB="${BUILD_RANLIB}" \
+ "$@"
+}
+src_compile() {
+ cd "${BUILDDIR}" || die
+ if tc-is-cross-compiler; then
+ tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS="" \
+ host_jsoplengen host_jskwgen
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" HOST_OPTIMIZE_FLAGS="" \
+ -C config nsinstall
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -i \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ Makefile || die
+ sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die
+ rm -f config/host_nsinstall.o \
+ config/host_pathsub.o \
+ host_jskwgen.o \
+ host_jsoplengen.o || die
+ fi
+
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" \
+ emake \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS=""
+}
+
+src_test() {
+ cd "${BUILDDIR}/js/src/jsapi-tests" || die
+ ./jsapi-tests || die
+}
+
+src_install() {
+ cd "${BUILDDIR}" || die
+ emake DESTDIR="${D}" install
+
+ # re-slot due to upstream stripping out most of the slotting
+ mv "${ED}"usr/bin/js-config{,${SLOT}} || die
+ mv "${ED}"usr/bin/js{,${SLOT}} || die
+ if ! use minimal; then
+ if use jit; then
+ pax-mark m "${ED}"usr/bin/js${SLOT}
+ fi
+ else
+ rm -f "${ED}"usr/bin/js${SLOT}
+ fi
+
+ if ! use static-libs; then
+ # We can't actually disable building of static libraries
+ # They're used by the tests and in a few other places
+ find "${D}" -iname '*.a' -o -iname '*.ajs' -delete || die
+ fi
+}
diff --git a/dev-lang/spidermonkey/spidermonkey-52.4.0_pre20171003-r1.ebuild b/dev-lang/spidermonkey/spidermonkey-52.4.0_pre20171003-r1.ebuild
new file mode 100644
index 000000000000..7c80ac01c86e
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-52.4.0_pre20171003-r1.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WANT_AUTOCONF="2.1"
+inherit autotools toolchain-funcs pax-utils mozcoreconf-v5
+
+MY_PN="mozjs"
+MY_P="${MY_PN}-${PV/_rc/.rc}"
+DESCRIPTION="Stand-alone JavaScript C++ library"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+#SRC_URI="https://people.mozilla.org/~sfink/${MY_P}.tar.bz2"
+SRC_URI="https://dev.gentoo.org/~axs/distfiles/${MY_P}.tar.bz2
+ https://dev.gentoo.org/~axs/distfiles/${PN}-52.0-patches-0.tar.xz"
+
+LICENSE="NPL-1.1"
+SLOT="52"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="debug +jit minimal +system-icu test"
+
+RESTRICT="ia64? ( test )"
+
+S="${WORKDIR}/${MY_P%.rc*}"
+S="${S%_pre*}"
+BUILDDIR="${S}/js/src"
+
+RDEPEND=">=dev-libs/nspr-4.13.1
+ virtual/libffi
+ sys-libs/readline:0=
+ >=sys-libs/zlib-1.2.3
+ system-icu? ( >=dev-libs/icu-58.1:= )"
+DEPEND="${RDEPEND}"
+
+pkg_setup(){
+ [[ ${MERGE_TYPE} == "binary" ]] || \
+ moz_pkgsetup
+}
+
+src_prepare() {
+ # remove patches integrated by upstream
+ rm -f "${WORKDIR}"/${PN}/0002-build-Add-major-version-to-make-parallel-installable.patch \
+ "${WORKDIR}"/${PN}/0005-headers-Fix-symbols-visibility.patch \
+ "${WORKDIR}"/${PN}/0007-build-Remove-unnecessary-NSPR-dependency.patch \
+ || die
+
+ eapply "${WORKDIR}/${PN}"
+ eapply "${FILESDIR}"/${PN}-52-baseconfig.patch
+
+ eapply_user
+
+ if [[ ${CHOST} == *-freebsd* ]]; then
+ # Don't try to be smart, this does not work in cross-compile anyway
+ ln -sfn "${BUILDDIR}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" || die
+ fi
+
+ cd "${BUILDDIR}" || die
+ eautoconf old-configure.in
+ eautoconf
+
+ # there is a default config.cache that messes everything up
+ rm -f "${BUILDDIR}"/config.cache || die
+}
+
+src_configure() {
+ cd "${BUILDDIR}" || die
+
+ econf \
+ --enable-jemalloc \
+ --enable-readline \
+ --with-system-nspr \
+ --disable-optimize \
+ --with-intl-api \
+ $(use_with system-icu) \
+ $(use_enable debug) \
+ $(use_enable jit ion) \
+ $(use_enable test tests) \
+ XARGS="/usr/bin/xargs" \
+ SHELL="${SHELL:-${EPREFIX}/bin/bash}" \
+ CC="${CC}" CXX="${CXX}" LD="${LD}" AR="${AR}" RANLIB="${RANLIB}"
+}
+
+cross_make() {
+ emake \
+ CFLAGS="${BUILD_CFLAGS}" \
+ CXXFLAGS="${BUILD_CXXFLAGS}" \
+ AR="${BUILD_AR}" \
+ CC="${BUILD_CC}" \
+ CXX="${BUILD_CXX}" \
+ RANLIB="${BUILD_RANLIB}" \
+ "$@"
+}
+src_compile() {
+ cd "${BUILDDIR}" || die
+ if tc-is-cross-compiler; then
+ tc-export_build_env BUILD_{AR,CC,CXX,RANLIB}
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS="" \
+ host_jsoplengen host_jskwgen
+ cross_make \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" HOST_OPTIMIZE_FLAGS="" \
+ -C config nsinstall
+ mv {,native-}host_jskwgen || die
+ mv {,native-}host_jsoplengen || die
+ mv config/{,native-}nsinstall || die
+ sed -i \
+ -e 's@./host_jskwgen@./native-host_jskwgen@' \
+ -e 's@./host_jsoplengen@./native-host_jsoplengen@' \
+ Makefile || die
+ sed -i -e 's@/nsinstall@/native-nsinstall@' config/config.mk || die
+ rm -f config/host_nsinstall.o \
+ config/host_pathsub.o \
+ host_jskwgen.o \
+ host_jsoplengen.o || die
+ fi
+
+ MOZ_MAKE_FLAGS="${MAKEOPTS}" \
+ emake \
+ MOZ_OPTIMIZE_FLAGS="" MOZ_DEBUG_FLAGS="" \
+ HOST_OPTIMIZE_FLAGS="" MODULE_OPTIMIZE_FLAGS="" \
+ MOZ_PGO_OPTIMIZE_FLAGS=""
+}
+
+src_test() {
+ cd "${BUILDDIR}/js/src/jsapi-tests" || die
+ ./jsapi-tests || die
+}
+
+src_install() {
+ cd "${BUILDDIR}" || die
+ emake DESTDIR="${D}" install
+
+ if ! use minimal; then
+ if use jit; then
+ pax-mark m "${ED}"usr/bin/js${SLOT}
+ fi
+ else
+ rm -f "${ED}"usr/bin/js${SLOT}
+ fi
+
+ # We can't actually disable building of static libraries
+ # They're used by the tests and in a few other places
+ find "${D}" -iname '*.a' -o -iname '*.ajs' -delete || die
+}
diff --git a/dev-lang/squirrel/Manifest b/dev-lang/squirrel/Manifest
new file mode 100644
index 000000000000..f009dd3f4948
--- /dev/null
+++ b/dev-lang/squirrel/Manifest
@@ -0,0 +1,11 @@
+AUX squirrel-2.2.4-autotools.patch 7721 SHA256 59e04a170ebbe0a6441ca6accaca7509151f42053f82eab4857e5954871869f5 SHA512 1e0993d3172a31c4c75631d28192f53a92113c75dc0ea4fb13db4a23bfbf3b5d8495fa2a51c5501c8fa939c2a5072fd6975b3b4e991bd48d8c5ade2862682f1b WHIRLPOOL 2cf465385a026fbaf73a682b4bc21f84ae3b23d1ebcff287d1bba6ad2b703f9e8607b9abaffac5c686a38056056595cbc2674c85d68c67139b042ef8f8c3eee0
+AUX squirrel-2.2.4-gcc47.patch 2371 SHA256 6d044f1235de65b44d5d9510fb591d645ea543eb28bf1a764601b4ac1772fe9d SHA512 65f96e53fc44f69b9e86fc74081a95388f8b06dbd908c6197d1cd481d8f7f86c9ca6ce20bf35c425f0aa65d0ff16517c197ff5ab4d1a97955566dc085ea7a39d WHIRLPOOL 62c72da61579850ccdecb1f157a972f03c161b04ae54f51b6a7808b83872d71a0b660a605e7b8823b96e197991e22bf4679fb45688f403913e0006a581d127d6
+AUX squirrel-2.2.4-stdint.h.patch 2081 SHA256 fc7faf678fee7d4d3ed6895dbe7d95ca955dbd2d6525b0792fb0b66c88aeb948 SHA512 9a1c4b5184b7534c0e0384bd6221e57f9c640ad7b8593139c89fbd12e74755a661f9d19f726251aef8b1b814d0dc5be49ead47c7ca1d73ea4128e602f8c6b159 WHIRLPOOL 48b888c25fafdc469261f9bc5070bed4c9fdf27ac9cec32818dbfe4674363be65655392b6218a29f9c8a20d7f1ee3fa08fa9fd02a6febcd16249f7c290be015f
+AUX squirrel-2.2.4-supertux-const.patch 1285 SHA256 0c33695d6704bd84fcecc2ec89885da2f05698c73f9f2b300131206ae700ef98 SHA512 a57bfd23b4ef024f827edfb7e07e2840e2e90bddafa0e6d52c2ab0a71554aa6cd80db35f974200fd603046053bfda187295be458d887ef016cae8ca1cb4373ff WHIRLPOOL c31895231317334d9f3f1d18f0cd7d524a09328c0795f3017c7c11c0e340dbe6f34ddb2db87ff10449f6b47c8f1c6b3ff5aa1ae992d4c4aca4142b013ce37a97
+DIST squirrel-3.1.tar.gz 175612 SHA256 51942b8638a97b673e34ecf3ca50304996fa99bbdbfa7fe93d9744e6769b2f95 SHA512 8aec059c801a8f6a1ddb9585cebd51457cfd43743cb0b03494e022fd47392e7b4b88e4703f184f4dcba2be8c0fb756e9b260e2f230e1bd92b37cdcb86d4f1141 WHIRLPOOL f1b7b1c96c0d0e8fd7f1c27f05684bacb803a33fd5dbe2bd767b955e2fd747c83a7ef666bc10f1b6ab7fa51fe6df46551dec947e77c862855fee3b7ad7289703
+DIST squirrel_2.2.4_stable.tar.gz 419567 SHA256 936ca05469ab19f16a730685ef4ad1ca5a3838195765d47935a4ba9052d8b2d4 SHA512 91fe260b362d682eb5d21334c0ffa532120550c1c49a40412ac87118bee5f045e79c260f42247bd2c897d33b7a593dd2bc2e5c8e78e219553682f8b6cd79201d WHIRLPOOL 7cc953f1bbfc8e228be9310eff714b682f0e77b5e1ae9bf0a5bb0ec1c9f53b873c9199bb0679b7b13759bbe54e96de674a9b42b90db3ddd2a3caa36bc067ab50
+EBUILD squirrel-2.2.4-r2.ebuild 1037 SHA256 94096efbc945eca42aab95cc335afe6dcc72a20fb43862f62dd7ae3e19f13898 SHA512 c5c04b45afb4453891869d43430f0867066c6c8ebbd2e8d823b6867d1745bd7c19fea0fe466fb805eb052d238f099b67d71af129d292356c6306cab0408b3381 WHIRLPOOL d29475a23a8a5bb560fbf9dad69c4376d8b3ce35ec9db07b117d0a06487a1c2ce55f45e0e2e9a3f5c5d775e7653466ee6ce87a2b49cf0cc5294f2ab7bc95a306
+EBUILD squirrel-3.1.ebuild 901 SHA256 7e9277f509f7a647dc2bf50af1281606c3ea18213c4ebafe668ead370bbb9bd8 SHA512 2e65c05bb5c46cf5aa46b158a9435882bf49bb85cdeb131d30b942d95afbaee96f2173ae3b430c3fa15d44edc2d6caad71ef9c6126be59510e9e1361629dc09c WHIRLPOOL 3c80f6e0066b06a6b3547d9c86d192bd166a494bd72315c66af7f41094c15af4cfc888fa82333311431033f40c14054e7e1e4925750032e6246fa02d57dcd0b1
+MISC ChangeLog 3246 SHA256 5fe46f5575157532e5bd95788c1a50b441945f04c10a04b67468d8f453fd6a56 SHA512 2fd4ec810340aa92c648d664a07f20df079148802fb2d7310c4326ff52eb1d16449eb9265e7687d1aaa08b770717136612f537696531181f51f8e9eb173d1598 WHIRLPOOL 86c1aeb5ef4304696bc0188bb1df25e5187185ae068be202c3ed899ee88b53a94f98ea260573a631b606e9e5852b2940f61f2a21b1c8ef212a2efa13285cb5f0
+MISC ChangeLog-2015 1730 SHA256 d79ebdfecfaa66b6bb4e63939ab6aa2da3657852177d9fa013c8aa046c220783 SHA512 b6d4328ee4ade0c026f97fc3c493da1e4c728820d86eddf10ae247b8d5670314c6cb103d436e8e065acdef26740e76bc81d130a5bdb9aed37cd775e3d08666cc WHIRLPOOL 8fedbd98c4cdaaefe5c29fe09b566409e20790b8d352d7247d49530ac2dd4df86149e3c75134e1f8399cb9d77751b3e363248aa85f258d02111c8b0fea2f8caf
+MISC metadata.xml 395 SHA256 5454d907c0b67aa2f61f32b2ed3b125cd5ca3c8fef1056bad330419c1a94534a SHA512 e7332967d7ada57304e4e9036a61fd27d9fac11dd62a3c4b3627515d4f69cea1b1182132388d480648c469e193fee85bf09220679eb180a9d10c57f78bcb48b4 WHIRLPOOL e5516e27d5e6f68b6289eae49bc150275a3df8458dd3c2f644feeca7914762c777508dabff81b2f99397497b8c40500e36ac6f794b4501df5cf6a12e5d35e4e9
diff --git a/dev-lang/squirrel/files/squirrel-2.2.4-autotools.patch b/dev-lang/squirrel/files/squirrel-2.2.4-autotools.patch
new file mode 100644
index 000000000000..e39ddedc9eb3
--- /dev/null
+++ b/dev-lang/squirrel/files/squirrel-2.2.4-autotools.patch
@@ -0,0 +1,302 @@
+Author: Nathan Phillip Brink <ohnobinki@ohnopublishing.net>
+Purpose: Makes squirrel buildable and installable using autotools, a buildsystem everybody is comfortable with.
+Source: http://ohnopub.net/hg/SQUIRREL2
+Generate with: hg diff -r 0 -r -1 -I '**Makefile*' -I configure.ac -I '**.in'
+
+diff -r d6d89bbc08e5 -r c89309f5be40 Makefile
+--- a/Makefile Thu Feb 11 15:08:35 2010 -0500
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,18 +0,0 @@
+-
+-SQUIRREL=.
+-MAKE=make
+-
+-sq32:
+- cd squirrel; $(MAKE)
+- cd sqstdlib; $(MAKE)
+- cd sq; $(MAKE)
+-
+-sqprof:
+- cd squirrel; $(MAKE) sqprof
+- cd sqstdlib; $(MAKE) sqprof
+- cd sq; $(MAKE) sqprof
+-
+-sq64:
+- cd squirrel; $(MAKE) sq64
+- cd sqstdlib; $(MAKE) sq64
+- cd sq; $(MAKE) sq64
+diff -r d6d89bbc08e5 -r c89309f5be40 Makefile.am
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/Makefile.am Sat Apr 10 11:25:40 2010 -0400
+@@ -0,0 +1,89 @@
++# autoreconf variables, recommended by libtoolize
++ACLOCAL_FLAGS = -I m4
++
++AM_CPPFLAGS = -I$(top_srcdir)/include
++
++# custom installation directories
++examplesdir = $(docdir)/examples
++pkgconfigdir = $(libdir)/pkgconfig
++
++# installed things
++if ENABLE_DOC
++dist_doc_DATA = doc/sqstdlib2.pdf \
++ doc/squirrel2.pdf
++endif
++if ENABLE_EXAMPLES
++dist_examples_DATA = samples/ackermann.nut \
++ samples/array.nut \
++ samples/class.nut \
++ samples/classattributes.nut \
++ samples/coroutines.nut \
++ samples/delegation.nut \
++ samples/fibonacci.nut \
++ samples/flow.nut \
++ samples/generators.nut \
++ samples/hello.nut \
++ samples/list.nut \
++ samples/loops.nut \
++ samples/matrix.nut \
++ samples/metamethods.nut \
++ samples/methcall.nut \
++ samples/tailstate.nut
++endif
++
++nodist_pkgconfig_DATA = libsqstdlib.pc \
++ libsquirrel.pc
++bin_PROGRAMS = sq/sq
++lib_LTLIBRARIES = libsquirrel.la \
++ libsqstdlib.la
++include_HEADERS = include/sqstdaux.h \
++ include/sqstdblob.h \
++ include/sqstdio.h \
++ include/sqstdmath.h \
++ include/sqstdstring.h \
++ include/sqstdsystem.h \
++ include/squirrel.h
++
++
++# sources for installed things
++
++libsqstdlib_la_SOURCES = sqstdlib/sqstdaux.cpp \
++ sqstdlib/sqstdblob.cpp sqstdlib/sqstdblobimpl.h \
++ sqstdlib/sqstdio.cpp \
++ sqstdlib/sqstdmath.cpp \
++ sqstdlib/sqstdrex.cpp \
++ sqstdlib/sqstdstream.cpp sqstdlib/sqstdstream.h \
++ sqstdlib/sqstdstring.cpp \
++ sqstdlib/sqstdsystem.cpp
++libsqstdlib_la_LDFLAGS = -version-info 0:0:0
++libsqstdlib_la_LIBADD = libsquirrel.la
++
++libsquirrel_la_SOURCES = squirrel/sqapi.cpp \
++ squirrel/sqarray.h \
++ squirrel/sqbaselib.cpp \
++ squirrel/sqclass.cpp squirrel/sqclass.h \
++ squirrel/sqclosure.h \
++ squirrel/sqcompiler.cpp squirrel/sqcompiler.h \
++ squirrel/sqdebug.cpp \
++ squirrel/sqfuncproto.h \
++ squirrel/sqfuncstate.cpp squirrel/sqfuncstate.h \
++ squirrel/sqlexer.cpp squirrel/sqlexer.h \
++ squirrel/sqmem.cpp \
++ squirrel/sqobject.cpp squirrel/sqobject.h \
++ squirrel/sqopcodes.h \
++ squirrel/sqpcheader.h \
++ squirrel/sqstate.cpp squirrel/sqstate.h \
++ squirrel/sqstring.h \
++ squirrel/sqtable.cpp squirrel/sqtable.h \
++ squirrel/squserdata.h \
++ squirrel/squtils.h \
++ squirrel/sqvm.cpp squirrel/sqvm.h
++libsquirrel_la_LDFLAGS = -version-info 0:0:0
++
++sq_sq_SOURCES = sq/sq.c
++sq_sq_LDADD = libsqstdlib.la
++
++EXTRA_DIST = COMPILE COPYRIGHT HISTORY README \
++ doc/sqstdlib2.chm doc/squirrel2.chm \
++ squirrel.dsw sq/sq.dsp squirrel/squirrel.dsp sqstdlib/sqstdlib.dsp \
++ etc/minimal.c etc/test.nut
+diff -r d6d89bbc08e5 -r c89309f5be40 configure.ac
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/configure.ac Sat Apr 10 11:25:40 2010 -0400
+@@ -0,0 +1,29 @@
++AC_INIT([squirrel],[2.2.4],[http://squirrel-lang.org/])
++
++# recommended by libtoolize:
++AC_CONFIG_MACRO_DIR([m4])
++
++AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
++
++AC_PROG_LIBTOOL
++AC_PROG_CC_C_O
++AC_PROG_CXX
++
++AC_ARG_ENABLE([doc],
++ [AS_HELP_STRING([--disable-doc], [Control whether or not the API docs (pdfs) are installed.])],
++ [enable_docs=$enableval],
++ [enable_docs=yes])
++AM_CONDITIONAL([ENABLE_DOC],
++ [test "x$enable_docs" = "xyes"])
++
++AC_ARG_ENABLE([examples],
++ [AS_HELP_STRING([--disable-exampels], [Control whether or not examples of libsquirrel use are installed.])],
++ [enable_examples=$enableval],
++ [enable_examples=yes])
++AM_CONDITIONAL([ENABLE_EXAMPLES],
++ [test "x$enable_examples" = "xyes"])
++
++AC_CONFIG_FILES([Makefile
++libsquirrel.pc
++libsqstdlib.pc])
++AC_OUTPUT
+diff -r d6d89bbc08e5 -r c89309f5be40 libsqstdlib.pc.in
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/libsqstdlib.pc.in Sat Apr 10 11:25:40 2010 -0400
+@@ -0,0 +1,14 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: @PACKAGE_NAME@
++Description: A library for libsquirrel users
++Version: @VERSION@
++URL: @PACKAGE_BUGREPORT@
++Libs: -L${libdir} -lsqstdlib
++# I don't like hard-coding this here, but it's an internal
++# dependency so it's justified.
++Libs.private: -lsquirrel
++Cflags: -I${includedir}
+diff -r d6d89bbc08e5 -r c89309f5be40 libsquirrel.pc.in
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/libsquirrel.pc.in Sat Apr 10 11:25:40 2010 -0400
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: @PACKAGE_NAME@
++Description: A dynamic scripting language for games
++Version: @VERSION@
++URL: @PACKAGE_BUGREPORT@
++Libs: -L${libdir} -lsquirrel
++Cflags: -I${includedir}
+diff -r d6d89bbc08e5 -r c89309f5be40 sq/Makefile
+--- a/sq/Makefile Thu Feb 11 15:08:35 2010 -0500
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,21 +0,0 @@
+-SQUIRREL= ..
+-
+-
+-OUT= $(SQUIRREL)/bin/sq
+-INCZ= -I$(SQUIRREL)/include -I. -I$(SQUIRREL)/sqlibs
+-LIBZ= -L$(SQUIRREL)/lib
+-LIB= -lsquirrel -lsqstdlib
+-
+-OBJS= sq.o
+-
+-SRCS= sq.c
+-
+-
+-sq32:
+- g++ -O2 -fno-rtti -o $(OUT) $(SRCS) $(INCZ) $(LIBZ) $(LIB)
+-
+-sqprof:
+- g++ -O2 -pg -fno-rtti -pie -gstabs -g3 -o $(OUT) $(SRCS) $(INCZ) $(LIBZ) $(LIB)
+-
+-sq64:
+- g++ -O2 -fno-rtti -D_SQ64 -o $(OUT) $(SRCS) $(INCZ) $(LIBZ) $(LIB)
+\ No newline at end of file
+diff -r d6d89bbc08e5 -r c89309f5be40 sqstdlib/Makefile
+--- a/sqstdlib/Makefile Thu Feb 11 15:08:35 2010 -0500
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,30 +0,0 @@
+-SQUIRREL= ..
+-
+-
+-OUT= $(SQUIRREL)/lib/libsqstdlib.a
+-INCZ= -I$(SQUIRREL)/include -I. -Iinclude
+-
+-SRCS= \
+- sqstdblob.cpp \
+- sqstdio.cpp \
+- sqstdstream.cpp \
+- sqstdmath.cpp \
+- sqstdsystem.cpp \
+- sqstdstring.cpp \
+- sqstdaux.cpp \
+- sqstdrex.cpp
+-
+-
+-sq32:
+- gcc -O2 -fno-rtti -Wall -c $(SRCS) $(INCZ)
+- ar rc $(OUT) *.o
+- rm *.o
+-
+-sqprof:
+- gcc -O2 -pg -fno-rtti -pie -gstabs -g3 -Wall -c $(SRCS) $(INCZ)
+- ar rc $(OUT) *.o
+- rm *.o
+-sq64:
+- gcc -O2 -D_SQ64 -fno-rtti -Wall -c $(SRCS) $(INCZ)
+- ar rc $(OUT) *.o
+- rm *.o
+diff -r d6d89bbc08e5 -r c89309f5be40 squirrel/Makefile
+--- a/squirrel/Makefile Thu Feb 11 15:08:35 2010 -0500
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,52 +0,0 @@
+-SQUIRREL= ..
+-
+-
+-OUT= $(SQUIRREL)/lib/libsquirrel.a
+-INCZ= -I$(SQUIRREL)/include -I. -Iinclude
+-DEFS=
+-LIB=
+-
+-OBJS= \
+- sqapi.o \
+- sqbaselib.o \
+- sqcompiler.o \
+- sqdebug.o \
+- sqlexer.o \
+- sqobject.o \
+- sqparser.o \
+- sqstate.o \
+- sqtable.o \
+- sqvm.o \
+- sqmem.o \
+- sqclass.o
+-
+-SRCS= \
+- sqapi.cpp \
+- sqbaselib.cpp \
+- sqfuncstate.cpp \
+- sqdebug.cpp \
+- sqlexer.cpp \
+- sqobject.cpp \
+- sqcompiler.cpp \
+- sqstate.cpp \
+- sqtable.cpp \
+- sqmem.cpp \
+- sqvm.cpp \
+- sqclass.cpp
+-
+-
+-
+-sq32:
+- gcc -O2 -fno-rtti -Wall -c $(SRCS) $(INCZ) $(DEFS)
+- ar rc $(OUT) *.o
+- rm *.o
+-
+-sqprof:
+- gcc -O2 -pg -fno-rtti -pie -gstabs -g3 -Wall -c $(SRCS) $(INCZ) $(DEFS)
+- ar rc $(OUT) *.o
+- rm *.o
+-
+-sq64:
+- gcc -O2 -D_SQ64 -fno-rtti -Wall -c $(SRCS) $(INCZ) $(DEFS)
+- ar rc $(OUT) *.o
+- rm *.o
diff --git a/dev-lang/squirrel/files/squirrel-2.2.4-gcc47.patch b/dev-lang/squirrel/files/squirrel-2.2.4-gcc47.patch
new file mode 100644
index 000000000000..032a4eb914a6
--- /dev/null
+++ b/dev-lang/squirrel/files/squirrel-2.2.4-gcc47.patch
@@ -0,0 +1,59 @@
+From fd2d422f16ca1134f3be8d693290e6b1c536bf71 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu, 7 Jun 2012 10:10:28 +0300
+Subject: [squirrel: PATCH] fix build breakage on gcc-4.7 and clang++
+
+gcc 4.7 got proper support for argument dependent lookup
+for builtin types:
+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46075
+
+It exposed old problem:
+> gcc -O2 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c sqapi.cpp sqbaselib.cpp sqfuncstate.cpp sqdebug.cpp \
+ sqlexer.cpp sqobject.cpp sqcompiler.cpp sqstate.cpp sqtable.cpp sqmem.cpp sqvm.cpp sqclass.cpp -I../include -I. -Iinclude
+ In file included from sqobject.h:5:0,
+ from sqpcheader.h:16,
+ from sqapi.cpp:4:
+ squtils.h: In instantiation of 'sqvector<T>::~sqvector() [with T = long long int]':
+ sqclosure.h:142:52: required from here
+ squtils.h:46:4: error: 'sq_vm_free' was not declared in this scope, and no declarations were found by argument-dependent
+ lookup at the point of instantiation [-fpermissive]
+ In file included from sqpcheader.h:17:0,
+ from sqapi.cpp:4:
+ sqstate.h:143:6: note: 'void sq_vm_free(void*, SQUnsignedInteger)' declared here, later in the translation unit
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ squirrel/sqstate.h | 3 ---
+ squirrel/squtils.h | 4 ++++
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/squirrel/sqstate.h b/squirrel/sqstate.h
+index 3ed3307..e931404 100755
+--- a/squirrel/sqstate.h
++++ b/squirrel/sqstate.h
+@@ -138,7 +138,4 @@ private:
+
+ bool CompileTypemask(SQIntVec &res,const SQChar *typemask);
+
+-void *sq_vm_malloc(SQUnsignedInteger size);
+-void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
+-void sq_vm_free(void *p,SQUnsignedInteger size);
+ #endif //_SQSTATE_H_
+diff --git a/squirrel/squtils.h b/squirrel/squtils.h
+index bff7d24..ac3aef9 100755
+--- a/squirrel/squtils.h
++++ b/squirrel/squtils.h
+@@ -10,6 +10,10 @@
+
+ #define sq_aligning(v) (((size_t)(v) + (SQ_ALIGNMENT-1)) & (~(SQ_ALIGNMENT-1)))
+
++
++void *sq_vm_malloc(SQUnsignedInteger size);
++void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
++void sq_vm_free(void *p,SQUnsignedInteger size);
+ //sqvector mini vector class, supports objects by value
+ template<typename T> class sqvector
+ {
+--
+1.7.8.6
+
diff --git a/dev-lang/squirrel/files/squirrel-2.2.4-stdint.h.patch b/dev-lang/squirrel/files/squirrel-2.2.4-stdint.h.patch
new file mode 100644
index 000000000000..911edcc79d34
--- /dev/null
+++ b/dev-lang/squirrel/files/squirrel-2.2.4-stdint.h.patch
@@ -0,0 +1,75 @@
+diff -r d6d89bbc08e5 -r 692b7872324b include/squirrel.h
+--- a/include/squirrel.h Thu Feb 11 15:08:35 2010 -0500
++++ b/include/squirrel.h Sat Feb 13 01:04:21 2010 -0500
+@@ -39,28 +39,22 @@
+ #define SQUIRREL_API extern
+ #endif
+
+-#if (defined(_WIN64) || defined(_LP64))
+-#define _SQ64
+-#endif
++/* Get uintptr_t from a non standard or standard location */
++#ifdef _MSC_VER
++#include <stddef.h>
+
+-#ifdef _SQ64
+-#ifdef _MSC_VER
+-typedef __int64 SQInteger;
+-typedef unsigned __int64 SQUnsignedInteger;
+-typedef unsigned __int64 SQHash; /*should be the same size of a pointer*/
+-#else
+-typedef long SQInteger;
+-typedef unsigned long SQUnsignedInteger;
+-typedef unsigned long SQHash; /*should be the same size of a pointer*/
+-#endif
+-typedef int SQInt32;
+-#else
+-typedef int SQInteger;
+-typedef int SQInt32; /*must be 32 bits(also on 64bits processors)*/
+-typedef unsigned int SQUnsignedInteger;
+-typedef unsigned int SQHash; /*should be the same size of a pointer*/
+-#endif
++typedef __int32 SQInt32;
++typedef __int64 SQInt64;
++#else /* _MSC_VER */
++#include <stdint.h>
+
++typedef int32_t SQInt32;
++typedef int64_t SQInt64;
++#endif /* _MSC_VER */
++
++typedef intptr_t SQInteger;
++typedef uintptr_t SQUnsignedInteger;
++typedef uintptr_t SQHash;
+
+ #ifdef SQUSEDOUBLE
+ typedef double SQFloat;
+@@ -68,12 +62,8 @@
+ typedef float SQFloat;
+ #endif
+
+-#if defined(SQUSEDOUBLE) && !defined(_SQ64)
+-#ifdef _MSC_VER
+-typedef __int64 SQRawObjectVal; //must be 64bits
+-#else
+-typedef long SQRawObjectVal; //must be 64bits
+-#endif
++#if defined(SQUSEDOUBLE)
++typedef SQInt64 SQRawObjectVal; /* must be 64 bits */
+ #define SQ_OBJECT_RAWINIT() { _unVal.raw = 0; }
+ #else
+ typedef SQUnsignedInteger SQRawObjectVal; //is 32 bits on 32 bits builds and 64 bits otherwise
+@@ -453,4 +443,13 @@
+ } /*extern "C"*/
+ #endif
+
++/*
++ Define for code which depends on squirrel to
++ determine bitiness. IMO, this should be discouraged.
++ --ohnobinki
++*/
++#if (defined(_WIN64) || defined(_LP64))
++#define _SQ64
++#endif
++
+ #endif /*_SQUIRREL_H_*/
diff --git a/dev-lang/squirrel/files/squirrel-2.2.4-supertux-const.patch b/dev-lang/squirrel/files/squirrel-2.2.4-supertux-const.patch
new file mode 100644
index 000000000000..e31eca5c1f96
--- /dev/null
+++ b/dev-lang/squirrel/files/squirrel-2.2.4-supertux-const.patch
@@ -0,0 +1,22 @@
+diff -r 3e8a1ff66c3c -r bd1cfd3e3cdd sqstdlib/sqstdstream.cpp
+--- a/sqstdlib/sqstdstream.cpp Fri Feb 12 20:35:23 2010 -0500
++++ b/sqstdlib/sqstdstream.cpp Fri Feb 12 23:58:35 2010 -0500
+@@ -277,7 +277,7 @@
+ sq_pop(v,1);
+ }
+
+-SQRESULT declare_stream(HSQUIRRELVM v,SQChar* name,SQUserPointer typetag,const SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals)
++SQRESULT declare_stream(HSQUIRRELVM v,const SQChar* name,SQUserPointer typetag,const SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals)
+ {
+ if(sq_gettype(v,-1) != OT_TABLE)
+ return sq_throwerror(v,_SC("table expected"));
+diff -r 3e8a1ff66c3c -r bd1cfd3e3cdd sqstdlib/sqstdstream.h
+--- a/sqstdlib/sqstdstream.h Fri Feb 12 20:35:23 2010 -0500
++++ b/sqstdlib/sqstdstream.h Fri Feb 12 23:58:35 2010 -0500
+@@ -14,5 +14,5 @@
+ SQInteger _stream_flush(HSQUIRRELVM v);
+
+ #define _DECL_STREAM_FUNC(name,nparams,typecheck) {_SC(#name),_stream_##name,nparams,typecheck}
+-SQRESULT declare_stream(HSQUIRRELVM v,SQChar* name,SQUserPointer typetag,const SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals);
++SQRESULT declare_stream(HSQUIRRELVM v,const SQChar* name,SQUserPointer typetag,const SQChar* reg_name,SQRegFunction *methods,SQRegFunction *globals);
+ #endif /*_SQSTD_STREAM_H_*/
diff --git a/dev-lang/squirrel/metadata.xml b/dev-lang/squirrel/metadata.xml
new file mode 100644
index 000000000000..cc06c944a210
--- /dev/null
+++ b/dev-lang/squirrel/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>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">squirrel</remote-id>
+ <remote-id type="github">albertodemichelis/squirrel</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/squirrel/squirrel-2.2.4-r2.ebuild b/dev-lang/squirrel/squirrel-2.2.4-r2.ebuild
new file mode 100644
index 000000000000..cf2c0636a257
--- /dev/null
+++ b/dev-lang/squirrel/squirrel-2.2.4-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=3
+
+inherit autotools eutils multilib
+
+MY_P="${PN}_${PV}_stable"
+DESCRIPTION="A interpreted language mainly used for games"
+HOMEPAGE="http://squirrel-lang.org/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}${PV:0:1}/${MY_P}/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc examples static-libs"
+
+# /usr/bin/sq conflicts
+RDEPEND="!app-text/ispell"
+
+S="${WORKDIR}/SQUIRREL${PV:0:1}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-autotools.patch
+ epatch "${FILESDIR}"/${P}-supertux-const.patch
+ epatch "${FILESDIR}"/${P}-stdint.h.patch
+ epatch "${FILESDIR}"/${P}-gcc47.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_enable doc) \
+ $(use_enable examples) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ if ! use static-libs; then
+ rm -v "${ED}"/usr/$(get_libdir)/*.la || die
+ fi
+
+ dodoc HISTORY README || die
+}
diff --git a/dev-lang/squirrel/squirrel-3.1.ebuild b/dev-lang/squirrel/squirrel-3.1.ebuild
new file mode 100644
index 000000000000..0b304c06c11b
--- /dev/null
+++ b/dev-lang/squirrel/squirrel-3.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="A interpreted language mainly used for games"
+HOMEPAGE="http://squirrel-lang.org/"
+SRC_URI="https://github.com/albertodemichelis/squirrel/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples static-libs"
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ local mycmakeargs=(
+ -DINSTALL_LIB_DIR="$(get_libdir)" \
+ -DINSTALL_INC_DIR=include
+ $(usex static-libs '' -DDISABLE_STATIC=YES)
+ # /usr/bin/sq is used by app-text/ispell
+ # /usr/lib/libsquirrel.so is used by app-shells/squirrelsh
+ -DLONG_OUTPUT_NAMES=YES
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ dodoc HISTORY
+
+ if use examples; then
+ docompress -x /usr/share/doc/${PF}/samples
+ dodoc -r samples
+ fi
+}
diff --git a/dev-lang/srf/Manifest b/dev-lang/srf/Manifest
new file mode 100644
index 000000000000..a9590ec01e09
--- /dev/null
+++ b/dev-lang/srf/Manifest
@@ -0,0 +1,6 @@
+DIST srf-1.0.tar.gz 222493 SHA256 f7c1bba0cf661e0a33432fafa658ccb6b060eefc29159326b790ba9fe5cbe554 SHA512 420f691a937fa30220cd436faaf75299991452fd5f026dcc7aaa767e276eb245cb8eb88d875911826b66abad62fa10326b694301b4372b91e4ac20bf32c78388 WHIRLPOOL 115ca53b6a8b8a2b6acafefa631caa77cc19e717eff88433503f9ba1499d7a169294ed09ec1acb8e28839e7a64172fc3e15319a33d2a1ad82e510123ca539c46
+EBUILD srf-1.0-r1.ebuild 620 SHA256 a33cc38c51224a3981346bb4e83f8d31f0108d9ed0c69631250333117ccb541f SHA512 f2b2d08dae73966b6d2e09ba121cdd5e3e8e9ca1bdf932467b3f81da1e5b57499fe4033c6e12ee4df9d216afe835a7bb663141f159fec1e4eae77e92a585c791 WHIRLPOOL 24a0787e4c458489b6ea7ada0caead2e8e1f93c98a56fbc5a7a8b7ca2e68013bf8c8c08400e65112a392ca36d7d124b9fa6b36dc2eadf584efad796d39d772cd
+EBUILD srf-1.0-r2.ebuild 622 SHA256 2948108be4f76b6fe121cccd191e0d89d146a8f657d42f89fddfb15745552b01 SHA512 55c1d574ea60d0bcb7a6b79d9e734c11b2ae0b3f62405266db98af196a43e82da2b77906736fe646ddc90466cab42df0385570e9b76fb53bb5c1ce782fa93261 WHIRLPOOL e2afe2d0de9458f51cd49056553341c3e2f509c91a4e7c4bc6866243aec509cb9734aac7824ebad0b5bfaad1c8a1d192eb87ffb2bb7c4089fa339c11bed76907
+MISC ChangeLog 2879 SHA256 695de343c617350ee5591207db30133e21e8a6f08680129b3ce4c77c16a6d1bc SHA512 332a250ceb922e833494f0cd18baa0175f79f96e04438ba6bc7907f441144a033ac391eb087095bddd0deefd3e37e3a70c1cd26e1ee38c5793fe76e494759c2c WHIRLPOOL aea04104d75840dcfac584af2beffa5c940ed43692d58f20d93ea8ee25f46e100d21d8b8059c6ff9c1f6ecd31194aea5e513e346619f30e5631a4210664f39da
+MISC ChangeLog-2015 1369 SHA256 8d571bc6ce9abead9e3ca1bf7948aa7b3573f8cfcf43a108fe4b209610f13007 SHA512 9d4026dd0f6a2897b636a1ba44dd17e7253332c6c93650741034a20e858405371ba3eb51ef4b1f7678bf2f0258e0d1f0093389681327bbd0f75799fb4dd94ac7 WHIRLPOOL 8006ec8aee111f962a815270f150e101a0cce22aa88f9bc8f783ea11e06fb68b5a35cd0f157829b4aecd2ae70cd2cfe8ad0a350f3b50963ea8381950091154f2
+MISC metadata.xml 418 SHA256 424d4313f6553912f32c3f6d3bb2bbdae436f4e143ffb5af04403d6a9924edb7 SHA512 16fea93364e4fbc9deadade67c2d2a69c45f53607315659b0c682497f8d01ce0f85a808e592cb3d67f521b5fa12f9b73b427d030923da4a735eb83baa80473b2 WHIRLPOOL 1062030b3142b76efed3d5f9d3577f214dabe303d2012f8797e08429798a282168bf5b708f91c29c9f84125dac87c9f310d78d4ff5e84c0a6e647b4c2d7d1711
diff --git a/dev-lang/srf/metadata.xml b/dev-lang/srf/metadata.xml
new file mode 100644
index 000000000000..d1565625819d
--- /dev/null
+++ b/dev-lang/srf/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<longdescription lang="en">
+srf (Simple Recursive Functions) interprets a very simple programming language
+similar to Stephen Kleene's recursive functions. You can use srf to help
+understand recursive functions, or Peano arithmetic.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-lang/srf/srf-1.0-r1.ebuild b/dev-lang/srf/srf-1.0-r1.ebuild
new file mode 100644
index 000000000000..62eaec12c790
--- /dev/null
+++ b/dev-lang/srf/srf-1.0-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="The Simple Recursive Functions programming language"
+HOMEPAGE="http://www.stratigery.com/srf.html"
+SRC_URI="http://www.stratigery.com/srf.html/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~x86-linux ~ppc-macos ~amd64"
+IUSE=""
+
+DEPEND="
+ sys-devel/flex
+ virtual/yacc"
+RDEPEND=""
+
+src_prepare() {
+ # Remove CVS directory Bug#371821
+ ecvs_clean
+}
+
+src_install() {
+ dobin srf rfunc/rfunc
+ doman srf.1
+ dohtml srf.html
+ dodoc README
+ docinto examples
+ dodoc examples/*
+}
diff --git a/dev-lang/srf/srf-1.0-r2.ebuild b/dev-lang/srf/srf-1.0-r2.ebuild
new file mode 100644
index 000000000000..fb64673fba2f
--- /dev/null
+++ b/dev-lang/srf/srf-1.0-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils
+
+DESCRIPTION="The Simple Recursive Functions programming language"
+HOMEPAGE="http://www.stratigery.com/srf.html"
+SRC_URI="http://www.stratigery.com/srf.html/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~x86-linux ~ppc-macos ~amd64"
+IUSE=""
+
+DEPEND="
+ sys-devel/flex
+ virtual/yacc"
+RDEPEND=""
+
+src_prepare() {
+ default
+ # Remove CVS directory Bug#371821
+ ecvs_clean
+}
+
+src_install() {
+ dobin srf rfunc/rfunc
+ doman srf.1
+ dodoc README srf.html
+
+ docinto examples
+ dodoc examples/*
+}
diff --git a/dev-lang/swi-prolog/Manifest b/dev-lang/swi-prolog/Manifest
new file mode 100644
index 000000000000..b9f56e4baa3f
--- /dev/null
+++ b/dev-lang/swi-prolog/Manifest
@@ -0,0 +1,30 @@
+DIST pl-6.6.6.tar.gz 14838653 SHA256 9f80bb274e2f31fd68b0acbe35982c012d5f8311dbe44ec1d8d04351a776996d SHA512 a850b0f6b283d34aa77d5e9d8a0053161fa534fa6d8935c7472362ff7b59ea6035de0658d9e38c317e2d92ed810370f2adc3e92b6346fc0ff392d18f1c8012a6 WHIRLPOOL 448d844fe45aee97ad2e37bea3f81dd5eb388e1dcb9f1c4dc54c18991aa91d481bff5b70174fb06edb06c1361759621a570a083fe36d62bffdf6028c49244b2a
+DIST swi-prolog-6.6.6-gentoo-patchset-0.tar.gz 1590 SHA256 2b240d15562603120e0314bb69bde50089326c11876b7a62106c05f9d48ace71 SHA512 807c7e897dd5b9eef14e063ea53c03047f3acb23174a70a613258adf7f85dc1f7637158fde70aab2e0f40de4bc6ac5e3548dd09dbe3745d916a388f43eb832eb WHIRLPOOL 0a0dbc361cfbe343c8b3562a2c0535905eb1443eea0783b14f96bda43c04e8db6264f476c07da766c6936dc6088e34059f799a3244717390644bf0f5ae83018e
+DIST swi-prolog-7.2.3-gentoo-patchset-1.tar.gz 1875 SHA256 c11e48122dc468f21e08da4a65f5a2daa9e0ddbc2e186bbd952626c95b29db04 SHA512 3506f4168d52f7d3539cd753c5153750df8c3239b78ffac1784c634b585d5fb0c825700e77abc9c1f467af71473ae1861eef629ebdf76b7c783d276c393f40fc WHIRLPOOL 8b70ab91592280d0634c6c897771696c0c63d30680044994cedf69f18cd4f386adf833998e64d4ad892cff97300b5bbfaa8dec8448ea04ebaba7e31f7e9c30d0
+DIST swi-prolog-7.4.2-gentoo-patchset-3.tar.gz 3256 SHA256 6d6a98be7e0c8f69b0c2fac213a0b690112d985fdc87752eb9010f442b35c792 SHA512 bc1b408e311d10ab59fa221bf5ef3d3cb1003a3edcdd13fd000cbc647117458e1f130e960cc37968481ccc2047529ca128159fac8e0ee75114022ed439905cce WHIRLPOOL b91b8d2a588acee744d104618aed27125988a6998e7bbb517744394b0348afe6b189285cee8c37b43372b25e7bf69efb96d304e7c8d4e3a86b8e3612430f1ada
+DIST swi-prolog-7.5.15-gentoo-patchset-2.tar.gz 2789 SHA256 55a853a8ed12b5df7b2bff921aa49f79d1192d177176fffffe4ec62c3ccede18 SHA512 8c0bdfcf2be99aacef221c4a66d9323fa64e207496b04bd454dd25e2b33c5dc629302e7a0c99baca8545923a302f9b38d24a26e356a247f82745b64d05785c63 WHIRLPOOL 9b54d62cffe2d80a82039617f1619bf8d96579d5a352bcae5a4e435e1c615bc63a372d4613f2acacf14b94a207292a025a7e56d9669e091835eede502d5b528f
+DIST swi-prolog-7.7.1-gentoo-patchset-0.tar.gz 1126 SHA256 1b9d5606c09815068ab3f1acef81dce1a42db382755932a5cef19ccd78b98d33 SHA512 e25d8e380a1f5c47958bea5756da9686b8325ace79ef5bfcd4b82cbeb04061b484ef284b10a3190e389df9c6e2f3c5dc61a01e2319cbd46b590823e9ed1de175 WHIRLPOOL 4504c40aa6dd085c40a5b5958186c2028a2fbe568886190e6763395071eff5675d041d91212f0eb6a3e62a6680fb69bc67f97ededbbd34b1864acecee8ef2223
+DIST swipl-7.2.3.tar.gz 16192142 SHA256 43657d51b7c5887bc2d2bced50a9822b86a08a6841399b8e76ee877f51d646b5 SHA512 da27a6b171d3b471401f1a91e86a4dbe98973d8a1db8c72aa27e452311d08b893b01a1de8f9f4dafcdac460774b4ea980050256d37284546941e1bdf84f8cd7b WHIRLPOOL de695c8e0317921dcc13898f7a3c88d1012e3f87f633cd25766ca5cb6637b29ca81b9245d015614089291a7d9abd0d8c7109ccae1df9297d78301d241cb258b3
+DIST swipl-7.4.1.tar.gz 16498678 SHA256 891e314e8f5d856ef71d8bbce5d255a18b0c8f227628748bb0e1e19473273cc1 SHA512 a3e49cc43aed05808901860fe302711d2850b23740a987d1071822d7b4888aca30a8b5f7c94e1e7191057a031f45adeedb0fbff9139d0294e6ec07032da6798d WHIRLPOOL 5605043173e6bbebed316504b3eb20a0ccc4891d25ae7a7eafc7de6eadef1688367a524e1d81fd0c1ff427e1ece39295555bbf7114deb6056b12b3c3ce2196ed
+DIST swipl-7.4.2.tar.gz 16496738 SHA256 7f17257da334bc1e7a35e9cf5cb8fca01d82f1ea406c7ace76e9062af8f0df8b SHA512 5b526d4f079e7a36184f871bb7341330bcadaeee2a69af981fbcad71ae76c77331b1f157174ac2b31d96e069dc530afa86c024de6709edd9dc8baee3b4ebffb3 WHIRLPOOL 2dad1a5e7ae3670b3a3965010d60420a27cb9623b35cdee83360f6f3a4fadc3dbf2a91fd3e7178b59c9b81723dfe6036fb968953218e7611179b52117a16cb19
+DIST swipl-7.5.13.tar.gz 16748371 SHA256 3680231e22ac1622c507652649e17ad07bc41ff08484f4e4f767ec04802c435c SHA512 a19037a6a9ffa06d3775d3669e51431b8f83ec37c2515955b0721bfa7dc4ab4661b740689f2aa74ee0bf0b0fff40b0d0a85453d3cfce3b0936082d719878ea23 WHIRLPOOL b81b30db11677992d0ef55c4619615a47c3576aab1e115c5fe78731d7675ba1d0c0223d540b693804720cbd4bfe9d2177069ce111f1981af5668001c6225c5ce
+DIST swipl-7.5.14.tar.gz 16743212 SHA256 2e83e96a0eace037da3f75fc44e9c8f4e3b2cf8fd3c27f8f05ff489276aec572 SHA512 f655b9adff90909398772f5612dfbf3a4e6c7ecb17b4c959a58547f30c67c861ad574cf044267280fd22a05503ead10c807d33f54f2cbf8af6ea19753c9b1d34 WHIRLPOOL 93451c566c39901a7c480bb8bc5eb1f53c3ae7adc5ee2e0281c8746b804dd4522a2cfb2e825122753ca212306798ab0659992f588ad8230b6262eeb84a0dd479
+DIST swipl-7.5.15.tar.gz 16757246 SHA256 aca07ce9c564e608586e7ae7b9a56c82ca5dd919cde1a1edf1121efa16bda568 SHA512 07344914726a5a1d3e9d6542c06be7c0937cbe3ac59b64025e068e513c99c66be991af9da0d4200364edec24c143295740c232621173039bffda2fbf379fbf33 WHIRLPOOL 5b0cc1b9cfb1f362d4145759a6f575c9bd606a717e33bd02c741321ce7303855bb472ea12ce058b02de0b96a3300807774c8697033403cf183dc9d67c6f95c88
+DIST swipl-7.6.0-rc1.tar.gz 16750608 SHA256 83f1e0038fc8c19bc90974a404bc4d696fa61976a1ce8b34a7aec672d21b88df SHA512 1cf61e4c8d92ed734e006a69f1ea025932cdd5b9d4efc3e9e1336347440dddc4ec9e4cabdf53892576f74c81ffdbc94dcfec605b7f7e42d6b2fd815e6f63a398 WHIRLPOOL 432812cfe1a921729c97e25ddf9e4112177df80bd77eda3aff81f47df7eddbeae658c221bcfa5c979f3d603e110b9928feecb6d16748e9703e3c2a4b4f5d7e4c
+DIST swipl-7.6.0-rc2.tar.gz 16752769 SHA256 df3677b24866fffad103cd252b5dbd00cf63a9daec7862a21f204aa048641644 SHA512 149f9a7106e19d848e53514fac5f553afc540b7eca7d4936ff9ebd79c616327d561081b10b8b7cb2075b9bedf691d0bd4ad843b209548715b1e928d14a73cc78 WHIRLPOOL 10ce442b72b6d20e7e6644d227f2343ae15c853fa213dbb99a1b7ab3378375eed8a7a4f7ccdaf412e02f8b2e291e475214ec7c601c255f19389a2aa0cbbeb2e8
+DIST swipl-7.7.0.tar.gz 16761831 SHA256 a1f603302fee12bfc390272ca76381401f5483c3a5521d391265404af58fdfcb SHA512 196e0c17cfaa9368a0032372cfc64e4b96f55048a4457c9ca28b1180b9277fba7811c2a72f410502f12544ca21751013b73002bf7c84cfb79ed0f909a871a24e WHIRLPOOL d2665b75a2bcb147b207bfc3b6c66be1344a7411420d8e016ae1e6e89f27f70325ef6b4804107a76f6d1714a961d5b689655037b0cb596efb8028fd85cc86a3e
+DIST swipl-7.7.1.tar.gz 16762129 SHA256 fda2c8b6b606ff199ea8a6f019008aa8272b7c349cb9312ccd5944153509503a SHA512 d95cc460c5eecf3d122c5e558266fd9203a0e8fe389ea1c83f08783e819bae04fe5e55f727ac6fffe89242dae7dc059fdabe09f1093915ba0e5675ee0e278de5 WHIRLPOOL 812eb2c5098f737b99cd063f156b11fed0151e59b949403620b498e2aa477dc08aa2fdd4da7669f2c7998cfbaabbfb0edb85f43aaeee32ae0b347880d577c4d2
+EBUILD swi-prolog-6.6.6.ebuild 2799 SHA256 f594618139b822a56033b10654c553dfeeae3d7dfba7eac055860f67417d6d02 SHA512 1d30fcb84653a0cdf7cf4f5a78898d5fb29f939095d19a21324a9587ee6ca98543ae16d564ff8880cdf99c6d5a091c2f0e5dc79074ceadc5a7cd3fe340609d22 WHIRLPOOL 4b867a595ab6e519a4d8229e6471d0ee0e9e2bac1f9cc7c6ee6687f739d88ae0b22b2d319caccf83d74e33df3968a979b3e4fca2284069df4f5fcdef57e764b0
+EBUILD swi-prolog-7.2.3-r1.ebuild 3170 SHA256 cf98b7ee946bdca39a5c90f07323639be06dfa9e82820fb8bdb52d7646ec8f0e SHA512 fe35661ef51094ddf0aff61659f33de5be0252216b94f45e658215146dd53379881f7077c20ace1ef67b70ad9d7128ccd26e122392a1100ab8db195c9324867a WHIRLPOOL 58740f846f074062b71920a99818f8cfd1b6ca3af28654f145cc9571b1a8bfbe0b07f67510d558a2f77beebbd140ac267ca817a0e086296e6dcc50c20a4aa557
+EBUILD swi-prolog-7.4.1.ebuild 3337 SHA256 9748d3f6cc0bbcba5f4d6f1574d54feb5e7414714bc80296a99fae85d3055f0e SHA512 d3b2fb20a92a39d5b4927cc4e2056a1ba3c66978467050817e84cfe46d795989d7d64721bb3b64a8b632dfa359e308d60db7b2c83efc2298c8318ef6314f08e9 WHIRLPOOL 5d9580b30a9192cfa6859fc88edbe5d85ae58a6a0e653f711575ef8a2b680592a5f14996b530480dd70e46be41c18ea286410c2b287bc1da42fec85e67b6daf2
+EBUILD swi-prolog-7.4.2.ebuild 3397 SHA256 5da2d58dd102b77437d2d6a0e40bc1873d2675eff97c0aca835a65be0c2cee2d SHA512 be5bfca5288f0ce152f11ed1a185317644cd2d93cf717d917924f76703a2baf13fae7dd8c4150e1f7de474c17c8b6f5bcff6f78fb0464162a222e376a0205844 WHIRLPOOL 041bff97de163fda6d547c359947ff487866350b8ce341b4a0bba817fd3d981729576ce99ed496481c804b51d7140a5c826851dda6aca9012d406d5990ed72d6
+EBUILD swi-prolog-7.5.13.ebuild 3336 SHA256 5a2788d78cfacd7b2f3a62c6a46cd661c51321195ebecc8e93b832224edc0b6e SHA512 03a82c309398b0daf4eb41f11118ad7c3352f419c5d630c6de211ad8e25a466a4b0cd77523de068af09df6482d76a76efc5c08e4c469f56125c3ce1bc201f5f8 WHIRLPOOL e065d9725a18f226d9d3c9d38c20d5926f281f849907c880113f0de3595f9a7fb913feec5770a1a8eb013676f69d2f5abb06073b8da5c75efff59f0ce1fa3d5c
+EBUILD swi-prolog-7.5.14.ebuild 3391 SHA256 f6d63116c907b1e9a785a71c3cbfcef23a120274bacb7e1c70304a3131e7d748 SHA512 0ff31376662be4aa72867e0f419ff3b9953eecc80912171fd0f5b415d467dadb996e1d12e8aa27224c1cf1eace75e18592c1ba57f1077400b4e1323f1f8e4b43 WHIRLPOOL 205ea479ff8faf0ac95a7c497a729bb5930c47f3b534b639365cd752fdc5f2d060e505b4b4f4ad63c7fd726769757acc11b4db3f96293541afa1ded34de6c3f8
+EBUILD swi-prolog-7.5.15.ebuild 3452 SHA256 726e440384a02302a2165e55c90123c8cf2863a39ddd8b72295fbf839a051983 SHA512 da0c9dee16a6bddd98bb8850086fa1562988398be3ca6698d249bdb85e6cebd1d491a1270f9cd1b16212ec36d0811e2cf0cbbb49ebbcc62840eb0cf2bbaf3bf6 WHIRLPOOL e45ba31f8fa7cd617af92bb3c4568d12ad28557fc10ec24a201ffb6292ca149d9f2b7bd896ed56f8dfe8371e85109e8f158648778e29904650d90aa34313ba02
+EBUILD swi-prolog-7.6.0_rc1.ebuild 3415 SHA256 bc63195c2d675210ec4a000603d0e62f66efaf311b11203f234a3fdb10e62827 SHA512 f2a8da35ab1a7b502b302b32a28be06f5ba13df635bf4e0198588bf3f567ef6d3c46ee8a0946f25718a0a4fe7e29ca219e984024be051ae5f3524e05d36cd4dd WHIRLPOOL 8b9c4f072fe69072c3329c84cc2bfb99eca4acdbe33498ab6d74b1c853d01efeb16808c266d00cd22a93e7198b7818a2bf862e9d0f154ed6b0747598f64191b6
+EBUILD swi-prolog-7.6.0_rc2.ebuild 3415 SHA256 bc63195c2d675210ec4a000603d0e62f66efaf311b11203f234a3fdb10e62827 SHA512 f2a8da35ab1a7b502b302b32a28be06f5ba13df635bf4e0198588bf3f567ef6d3c46ee8a0946f25718a0a4fe7e29ca219e984024be051ae5f3524e05d36cd4dd WHIRLPOOL 8b9c4f072fe69072c3329c84cc2bfb99eca4acdbe33498ab6d74b1c853d01efeb16808c266d00cd22a93e7198b7818a2bf862e9d0f154ed6b0747598f64191b6
+EBUILD swi-prolog-7.7.0.ebuild 3391 SHA256 867b36258068e852e79df64ca2ddece56f18148598c9d581f501d2c925990937 SHA512 43ae2aa636d09515efb8e25455b4ece4f3b5657a9d4deb651579843791014c04785c5279293f7fa04df39ba87d1e7b4eda786f4e455389cfed111c984a13dbc9 WHIRLPOOL d53639daca037ac83e9810f6a8731c9a87ece5f5e287fc8c290b094b4ae3aa1afc22b01508f4df8cadd2cf6da1cf965486508678e7dd570e710a47ed00447d0f
+EBUILD swi-prolog-7.7.1.ebuild 3452 SHA256 6514fcb8ca537da6e454ee07173d911571b14d6f94705cdfa5ab64514280b46c SHA512 1de74904c23296fcd42a40d783bfb22df400dbb2437d028cd02a554054ecbb68d3639e3ab217f72279fa16ee2f335b7fdc54ac01c1bb559b062fd803c3e4dcaf WHIRLPOOL e6f112350097b16a5b9b2dd0a01c6e95c8e1ac337c4ef306cce861246d3036771b516d51c9eeda163f80f6237b5832df66b957ec94d22c53801e44d067a0ae08
+MISC ChangeLog 11722 SHA256 5b3c22f0b82e2b283f55021f228e156042c82c5d18e919f5e0b6edb17d243fe3 SHA512 9d41448f7c02b830362c6564d831aef6b5df5cef2c1260dd853be50ef90a4f34149c4f654c99002d58e7bf41aa593d1fe84470f6c2a93ec2af5a337ddafadee3 WHIRLPOOL 15f5d24961cf8cff5d77a5fd5fe29c1f1b97151a399a16b71cc4ff4805230872f9b5a5d831de0e2b372ceb2a469f29f3fcf4b053acafc81ed9e0de36a5ac65fa
+MISC ChangeLog-2015 69903 SHA256 9e6f054c7a5e4f2f47dd02c5e5ad606160cd4a429b7417bc233c339dc1954e9a SHA512 c3b02af62e947a5ecc3432fe5f49fc6eb978d559ad69c73748159b404dff39aaae1a316a677e875f02b06b9d0e0efdd76d79ca1347b1af8625651b074bff4f00 WHIRLPOOL 2708af0202c442f27a40bb2977b7da02e0910f9ae1c60538f0eaf0bb166371b71787e1328655dc60cff56b47918fbd4df97269d870868b273c61f19ab3767ae3
+MISC metadata.xml 367 SHA256 fe062b0bbce11b0a9e72fcf6e0e1edc1dcbc328c83d500a7846aa1fe6197ea8f SHA512 bacbb17fc3518d3bf845d097d17dba772a745fd7343ab6e8c751a417a540c8c003f29b86c66374bee538d7a5d96ab95e67b1c619d47f80d0e332482daabee74a WHIRLPOOL 92af71bd473a9a0d79caa25d3938f777398a28891145af158c28c953f60f57e36a4a8d867b23cd9bb950fe47867e3af5fc4b513716124963cd9f9fc439d72675
diff --git a/dev-lang/swi-prolog/metadata.xml b/dev-lang/swi-prolog/metadata.xml
new file mode 100644
index 000000000000..83c5a19dc1d3
--- /dev/null
+++ b/dev-lang/swi-prolog/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>prolog@gentoo.org</email>
+ <name>Prolog</name>
+</maintainer>
+<use>
+ <flag name="archive">Use libarchive for extension packs</flag>
+ <flag name="uuid">Use ossp-uuid for UUID pack</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-lang/swi-prolog/swi-prolog-6.6.6.ebuild b/dev-lang/swi-prolog/swi-prolog-6.6.6.ebuild
new file mode 100644
index 000000000000..0969747fad20
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-6.6.6.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/stable/src/pl-${PV}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive debug doc +gmp hardened java minimal odbc +readline ssl static-libs test zlib X"
+
+RDEPEND="sys-libs/ncurses:=
+ archive? ( app-arch/libarchive )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline:= )
+ gmp? ( dev-libs/gmp:0 )
+ ssl? ( dev-libs/openssl:0 )
+ java? ( >=virtual/jdk-1.4:= )
+ X? (
+ virtual/jpeg:0
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/pl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable readline) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with odbc) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake check
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.2.3-r1.ebuild b/dev-lang/swi-prolog/swi-prolog-7.2.3-r1.ebuild
new file mode 100644
index 000000000000..5ff022070d03
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.2.3-r1.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="1"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/stable/src/swipl-${PV}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive debug doc +gmp hardened java libressl minimal odbc +readline ssl static-libs test uuid zlib X"
+
+RDEPEND="sys-libs/ncurses:=
+ archive? ( app-arch/libarchive )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline:= )
+ gmp? ( dev-libs/gmp:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ java? ( >=virtual/jdk-1.5:= )
+ uuid? ( dev-libs/ossp-uuid )
+ X? (
+ virtual/jpeg:0
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+
+ if ! use uuid; then
+ mv packages/clib/uuid.pl packages/clib/uuid.pl.unused || die
+ fi
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable readline) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with odbc) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake check
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.4.1.ebuild b/dev-lang/swi-prolog/swi-prolog-7.4.1.ebuild
new file mode 100644
index 000000000000..8c3294b16729
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.4.1.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/stable/src/swipl-${PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc readline ssl static-libs test uuid zlib X"
+
+RDEPEND="sys-libs/ncurses:=
+ archive? ( app-arch/libarchive )
+ berkdb? ( >=sys-libs/db-4:= )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline:= )
+ libedit? ( dev-libs/libedit )
+ gmp? ( dev-libs/gmp:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ java? ( >=virtual/jdk-1.5:= )
+ uuid? ( dev-libs/ossp-uuid )
+ X? (
+ virtual/jpeg:0
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ if ! use uuid; then
+ mv packages/clib/uuid.pl packages/clib/uuid.pl.unused || die
+ fi
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with berkdb bdb ) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with libedit) \
+ $(use_with odbc) \
+ $(use_with readline) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ unset DISPLAY
+ cd "${S}/packages" || die
+ emake \
+ USE_PUBLIC_NETWORK_TESTS=false \
+ USE_ODBC_TESTS=false \
+ check
+ ./report-failed || die
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README.md VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.4.2.ebuild b/dev-lang/swi-prolog/swi-prolog-7.4.2.ebuild
new file mode 100644
index 000000000000..9f055ae83b6b
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.4.2.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="3"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/stable/src/swipl-${PV}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc readline ssl static-libs test uuid zlib X"
+
+RDEPEND="sys-libs/ncurses:=
+ archive? ( app-arch/libarchive )
+ berkdb? ( >=sys-libs/db-4:= )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline:= )
+ libedit? ( dev-libs/libedit )
+ gmp? ( dev-libs/gmp:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ java? ( >=virtual/jdk-1.5:= )
+ uuid? ( dev-libs/ossp-uuid )
+ X? (
+ virtual/jpeg:0
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ if ! use uuid; then
+ mv packages/clib/uuid.pl packages/clib/uuid.pl.unused || die
+ fi
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with berkdb bdb ) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with libedit) \
+ $(use_with odbc) \
+ $(use_with readline) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ unset DISPLAY
+ cd "${S}/packages" || die
+ emake \
+ USE_PUBLIC_NETWORK_TESTS=false \
+ USE_ODBC_TESTS=false \
+ check
+ ./report-failed || die
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README.md VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.5.13.ebuild b/dev-lang/swi-prolog/swi-prolog-7.5.13.ebuild
new file mode 100644
index 000000000000..ece2fd907ab4
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.5.13.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc readline ssl static-libs test uuid zlib X"
+
+RDEPEND="sys-libs/ncurses:=
+ archive? ( app-arch/libarchive )
+ berkdb? ( >=sys-libs/db-4:= )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline:= )
+ libedit? ( dev-libs/libedit )
+ gmp? ( dev-libs/gmp:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ java? ( >=virtual/jdk-1.5:= )
+ uuid? ( dev-libs/ossp-uuid )
+ X? (
+ virtual/jpeg:0
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ if ! use uuid; then
+ mv packages/clib/uuid.pl packages/clib/uuid.pl.unused || die
+ fi
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with berkdb bdb ) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with libedit) \
+ $(use_with odbc) \
+ $(use_with readline) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ unset DISPLAY
+ cd "${S}/packages" || die
+ emake \
+ USE_PUBLIC_NETWORK_TESTS=false \
+ USE_ODBC_TESTS=false \
+ check
+ ./report-failed || die
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README.md VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.5.14.ebuild b/dev-lang/swi-prolog/swi-prolog-7.5.14.ebuild
new file mode 100644
index 000000000000..563575532e7f
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.5.14.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc pcre readline ssl static-libs test uuid zlib X"
+
+RDEPEND="sys-libs/ncurses:=
+ archive? ( app-arch/libarchive )
+ berkdb? ( >=sys-libs/db-4:= )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ pcre? ( dev-libs/libpcre )
+ readline? ( sys-libs/readline:= )
+ libedit? ( dev-libs/libedit )
+ gmp? ( dev-libs/gmp:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ java? ( >=virtual/jdk-1.5:= )
+ uuid? ( dev-libs/ossp-uuid )
+ X? (
+ virtual/jpeg:0
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ if ! use uuid; then
+ mv packages/clib/uuid.pl packages/clib/uuid.pl.unused || die
+ fi
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with berkdb bdb ) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with libedit) \
+ $(use_with pcre) \
+ $(use_with odbc) \
+ $(use_with readline) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ unset DISPLAY
+ cd "${S}/packages" || die
+ emake \
+ USE_PUBLIC_NETWORK_TESTS=false \
+ USE_ODBC_TESTS=false \
+ check
+ ./report-failed || die
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README.md VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.5.15.ebuild b/dev-lang/swi-prolog/swi-prolog-7.5.15.ebuild
new file mode 100644
index 000000000000..c4dd5b027870
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.5.15.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="2"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc pcre readline ssl static-libs test uuid zlib X"
+
+RDEPEND="sys-libs/ncurses:=
+ archive? ( app-arch/libarchive )
+ berkdb? ( >=sys-libs/db-4:= )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ pcre? ( dev-libs/libpcre )
+ readline? ( sys-libs/readline:= )
+ libedit? ( dev-libs/libedit )
+ gmp? ( dev-libs/gmp:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ java? ( >=virtual/jdk-1.5:= )
+ uuid? ( dev-libs/ossp-uuid )
+ X? (
+ virtual/jpeg:0
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ if ! use uuid; then
+ mv packages/clib/uuid.pl packages/clib/uuid.pl.unused || die
+ fi
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with berkdb bdb ) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with libedit) \
+ $(use_with pcre) \
+ $(use_with odbc) \
+ $(use_with readline) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ unset DISPLAY
+ cd "${S}/packages" || die
+ emake \
+ USE_PUBLIC_NETWORK_TESTS=false \
+ USE_ODBC_TESTS=false \
+ check
+ ./report-failed || die
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README.md VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.6.0_rc1.ebuild b/dev-lang/swi-prolog/swi-prolog-7.6.0_rc1.ebuild
new file mode 100644
index 000000000000..3e75dfdeeb3b
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.6.0_rc1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_PV=${PV/_/-}
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/stable/src/swipl-${MY_PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc pcre readline ssl static-libs test uuid zlib X"
+
+RDEPEND="sys-libs/ncurses:=
+ archive? ( app-arch/libarchive )
+ berkdb? ( >=sys-libs/db-4:= )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ pcre? ( dev-libs/libpcre )
+ readline? ( sys-libs/readline:= )
+ libedit? ( dev-libs/libedit )
+ gmp? ( dev-libs/gmp:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ java? ( >=virtual/jdk-1.7:= )
+ uuid? ( dev-libs/ossp-uuid )
+ X? (
+ virtual/jpeg:0
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${MY_PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ if ! use uuid; then
+ mv packages/clib/uuid.pl packages/clib/uuid.pl.unused || die
+ fi
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with berkdb bdb ) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with libedit) \
+ $(use_with pcre) \
+ $(use_with odbc) \
+ $(use_with readline) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ unset DISPLAY
+ cd "${S}/packages" || die
+ emake \
+ USE_PUBLIC_NETWORK_TESTS=false \
+ USE_ODBC_TESTS=false \
+ check
+ ./report-failed || die
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README.md VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.6.0_rc2.ebuild b/dev-lang/swi-prolog/swi-prolog-7.6.0_rc2.ebuild
new file mode 100644
index 000000000000..3e75dfdeeb3b
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.6.0_rc2.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_PV=${PV/_/-}
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/stable/src/swipl-${MY_PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc pcre readline ssl static-libs test uuid zlib X"
+
+RDEPEND="sys-libs/ncurses:=
+ archive? ( app-arch/libarchive )
+ berkdb? ( >=sys-libs/db-4:= )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ pcre? ( dev-libs/libpcre )
+ readline? ( sys-libs/readline:= )
+ libedit? ( dev-libs/libedit )
+ gmp? ( dev-libs/gmp:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ java? ( >=virtual/jdk-1.7:= )
+ uuid? ( dev-libs/ossp-uuid )
+ X? (
+ virtual/jpeg:0
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${MY_PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ if ! use uuid; then
+ mv packages/clib/uuid.pl packages/clib/uuid.pl.unused || die
+ fi
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with berkdb bdb ) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with libedit) \
+ $(use_with pcre) \
+ $(use_with odbc) \
+ $(use_with readline) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ unset DISPLAY
+ cd "${S}/packages" || die
+ emake \
+ USE_PUBLIC_NETWORK_TESTS=false \
+ USE_ODBC_TESTS=false \
+ check
+ ./report-failed || die
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README.md VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.7.0.ebuild b/dev-lang/swi-prolog/swi-prolog-7.7.0.ebuild
new file mode 100644
index 000000000000..7aba5bdec8ae
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.7.0.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc pcre readline ssl static-libs test uuid zlib X"
+
+RDEPEND="sys-libs/ncurses:=
+ archive? ( app-arch/libarchive )
+ berkdb? ( >=sys-libs/db-4:= )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ pcre? ( dev-libs/libpcre )
+ readline? ( sys-libs/readline:= )
+ libedit? ( dev-libs/libedit )
+ gmp? ( dev-libs/gmp:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ java? ( >=virtual/jdk-1.7:= )
+ uuid? ( dev-libs/ossp-uuid )
+ X? (
+ virtual/jpeg:0
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ if ! use uuid; then
+ mv packages/clib/uuid.pl packages/clib/uuid.pl.unused || die
+ fi
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with berkdb bdb ) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with libedit) \
+ $(use_with pcre) \
+ $(use_with odbc) \
+ $(use_with readline) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ unset DISPLAY
+ cd "${S}/packages" || die
+ emake \
+ USE_PUBLIC_NETWORK_TESTS=false \
+ USE_ODBC_TESTS=false \
+ check
+ ./report-failed || die
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README.md VERSION
+}
diff --git a/dev-lang/swi-prolog/swi-prolog-7.7.1.ebuild b/dev-lang/swi-prolog/swi-prolog-7.7.1.ebuild
new file mode 100644
index 000000000000..f035badb09bb
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.7.1.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="0"
+
+DESCRIPTION="free, small, and standard compliant Prolog compiler"
+HOMEPAGE="http://www.swi-prolog.org/"
+SRC_URI="http://www.swi-prolog.org/download/devel/src/swipl-${PV}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc pcre readline ssl static-libs test uuid zlib X"
+
+RDEPEND="sys-libs/ncurses:=
+ archive? ( app-arch/libarchive )
+ berkdb? ( >=sys-libs/db-4:= )
+ zlib? ( sys-libs/zlib )
+ odbc? ( dev-db/unixODBC )
+ pcre? ( dev-libs/libpcre )
+ readline? ( sys-libs/readline:= )
+ libedit? ( dev-libs/libedit )
+ gmp? ( dev-libs/gmp:0 )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ java? ( >=virtual/jdk-1.7:= )
+ uuid? ( dev-libs/ossp-uuid )
+ X? (
+ virtual/jpeg:0
+ x11-libs/libX11
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )
+ java? ( test? ( =dev-java/junit-3.8* ) )"
+
+S="${WORKDIR}/swipl-${PV}"
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ if ! use uuid; then
+ mv packages/clib/uuid.pl packages/clib/uuid.pl.unused || die
+ fi
+
+ # OSX/Intel ld doesn't like an archive without table of contents
+ sed -i -e 's/-cru/-scru/' packages/nlp/libstemmer_c/Makefile.pl || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ use ppc && append-flags -mno-altivec
+ use hardened && append-flags -fno-unit-at-a-time
+ use debug && append-flags -DO_DEBUG
+
+ # ARCH is used in the configure script to figure out host and target
+ # specific stuff
+ export ARCH=${CHOST}
+
+ export CC_FOR_BUILD=$(tc-getBUILD_CC)
+
+ cd "${S}"/src || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_enable gmp) \
+ $(use_enable static-libs static) \
+ --enable-shared \
+ --enable-custom-flags COFLAGS="${CFLAGS}"
+
+ if ! use minimal ; then
+ local jpltestconf
+ if use java && use test ; then
+ jpltestconf="--with-junit=$(java-config --classpath junit)"
+ fi
+
+ cd "${S}/packages" || die
+ econf \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with archive) \
+ $(use_with berkdb bdb ) \
+ $(use_with java jpl) \
+ ${jpltestconf} \
+ $(use_with libedit) \
+ $(use_with pcre) \
+ $(use_with odbc) \
+ $(use_with readline) \
+ $(use_with ssl) \
+ $(use_with X xpce) \
+ $(use_with zlib) \
+ COFLAGS='"${CFLAGS}"'
+ fi
+}
+
+src_compile() {
+ cd "${S}"/src || die
+ emake
+
+ if ! use minimal ; then
+ cd "${S}/packages" || die
+ emake
+ ./report-failed || die "Cannot report failed packages"
+ fi
+}
+
+src_test() {
+ cd "${S}/src" || die
+ emake check
+
+ if ! use minimal ; then
+ unset DISPLAY
+ cd "${S}/packages" || die
+ emake \
+ USE_PUBLIC_NETWORK_TESTS=false \
+ USE_ODBC_TESTS=false \
+ check
+ ./report-failed || die
+ fi
+}
+
+src_install() {
+ emake -C src DESTDIR="${D}" install
+
+ if ! use minimal ; then
+ emake -C packages DESTDIR="${D}" install
+ if use doc ; then
+ emake -C packages DESTDIR="${D}" html-install
+ fi
+ ./packages/report-failed || die "Cannot report failed packages"
+ fi
+
+ dodoc ReleaseNotes/relnotes-5.10 INSTALL README.md VERSION
+}
diff --git a/dev-lang/swig/Manifest b/dev-lang/swig/Manifest
new file mode 100644
index 000000000000..6065d4358939
--- /dev/null
+++ b/dev-lang/swig/Manifest
@@ -0,0 +1,19 @@
+DIST swig-1.3.40.tar.gz 4891020 SHA256 1945b3693bcda6777bd05fef1015a0ad1a4604cde4a4a0a368b61ccfd143ac09 SHA512 bd959d29cf2d61d12dd2c5764bbd11d8fb045827267f8633ab99515175e675554c709f43a8334ce74d77e71e737118962bc5ce8fd09d3b87070ecab1133cc9d7 WHIRLPOOL 48c71d1c88271e8b2be171b159c41150460bc79bba9d40ff224fad8c1498c94e6328c89f1c2e02e294c17b0174f1e7aeddbc39c2e341c85effbbf311e87f061c
+DIST swig-2.0.12.tar.gz 5312394 SHA256 65e13f22a60cecd7279c59882ff8ebe1ffe34078e85c602821a541817a4317f7 SHA512 7969cd8ce309ca46316fa4851b5cdd72122cb075cde8c17d74ee97969cd9555eff0d995f60bf17ff4090c83f66f6c66df2c61d9c06e2e30a2b36a4b8204c5890 WHIRLPOOL fdc0477d049c793267420769b0346283087bcf14d519d279bae15b5ffaff7c079fa6a6de3f18b74825f7ea0bce13913e591f7d48b396cd7eaf941fa57dfe925e
+DIST swig-2.0.9.tar.gz 5307341 SHA256 586954000d297fafd7e91d1ad31089cc7e249f658889d11a44605d3662569539 SHA512 9967eb2e1733c11ceb813bfa18c8c4187ba527d45de9b2ad962f287afba9cb0e1432b921670c5fe07ed31decc2e2785a16f42f69148a4e8a1959a9b66ce2e91f WHIRLPOOL 6649934f33d36b7bf9314a7f6582245217795b6e9c36eb02436ed769f8fb06a3a038af2380f444a1311aa353d3f29c4a3159765f873d09ed90980998e0752e81
+DIST swig-3.0.10.tar.gz 8029827 SHA256 2939aae39dec06095462f1b95ce1c958ac80d07b926e48871046d17c0094f44c SHA512 599883a08b673cb0975176084fa7a6f5c7e3f6ffa86e8ba600e9d81d80b9d7632668e61c8db519b4c800bdbddcdbf55b0f5ef49f6a80ceafaef864ffcaaa30c1 WHIRLPOOL bcdbc754d32c45e202cd55a73e7584240e3f073ec21116db88325558374d5477803d83308f467a469e50b8dcbc4fa2a5d5146d6d73fbd7d3abc0e879766b2b73
+DIST swig-3.0.11.tar.gz 8141827 SHA256 d9031d531d7418829a54d0d51c4ed9007016b213657ec70be44031951810566e SHA512 36771bd29fcec159d283f0f8d056937c6c913fec717f1f3b97a9b17fa27a8a85aa5f7b79bec3c46d70b625c36c26e9e856a4750cbd0872070ca18e9174842a52 WHIRLPOOL 49fac0b8ff0786671b2eb0d7c9955054ec2b17be07d1ce5c2ca063022d89c56e3598c3ce5133eac92eee4286f7ecfc52da6003993cd1bf6a7704162344ca31bd
+DIST swig-3.0.12.tar.gz 8149820 SHA256 7cf9f447ae7ed1c51722efc45e7f14418d15d7a1e143ac9f09a668999f4fc94d SHA512 5eaa2e06d8e4197fd02194051db1e518325dbb074a4c55a91099ad9c55193874f577764afc9029409a41bd520a95154095f26e33ef5add5c102bb2c1d98d33eb WHIRLPOOL 468d710807ca5052bb2dc0e9551cf4f7a41bddfa380b8ee30b175c99aa5656e71270dd900b4dda545b39fa22bd102623dde292b22a63d5c5fbe1521ed7bb30ee
+DIST swig-3.0.5.tar.gz 5873209 SHA256 9f4cb9e8f213f041853646f58fe5e8428d63250d05f5c943b6fa759c77322a3c SHA512 1cd9eaea1443d08ac0f9a80f9cb3d60121e888e30c9f00aaaf285d6afe8a5494a3be017a38092b879d332305911c177202cfccd2570cb61eb40554fcc573fd01 WHIRLPOOL 49dc145dbd24bbe0dd9d5baa82ab8e1b79b0cec14035038d22fd506010ce5185731876a157c811d2087f35360ce04aafed8c7beff7f7feaf246f964891395ea9
+DIST swig-3.0.8.tar.gz 7937213 SHA256 58a475dbbd4a4d7075e5fe86d4e54c9edde39847cdb96a3053d87cb64a23a453 SHA512 85605bd98bf2b56f5bfca23ae23d76d764d76a174b05836c8686825e912d6326c370e9cf2134c0bf4f425560be103b16bf9c9d075077f52e713a69082616e906 WHIRLPOOL 7b6e5b0339b5fd42992464ca16935d1e8447d46c2e561579eb99dda90755bc3ca88baeff8bb0c0dffe91b109dd9af0465a360fec2fd871bd5bfaef278229bbf9
+EBUILD swig-1.3.40-r2.ebuild 1282 SHA256 b2777a889a3977909775482519d52121812b54a6a8c62fff3d376d03cd95cf12 SHA512 cb928a5db62be2848a1869c1cd759257ae803f67bf7db7dff469bcce2e4129e4e5f5d22da4310bcf7db9f83abb367b0b945368ca074e565a0142a09934d41b1f WHIRLPOOL 07ba4c0095fb289e8d3d5262026fcaf27ff91055015eb950066d53e79da8f13cad35bae28402b6a22995ab16ae946438b66a5a3284cb882bb01c33e5835262c4
+EBUILD swig-2.0.12.ebuild 855 SHA256 6b73151ad07e347f30a1a7ee846ea09cc49b26f0dd47943f88240a101eb8ecb3 SHA512 c11a8d13d3959a3b045b7acb0f214419bda6076cd220929ae59b7a3f875d5baf9e20237b58bd285ffdc567c21b4b72250629bc15d80c9d3d4a61e17591155262 WHIRLPOOL 9f2119448c8f1135f25c41547e6c527601eac7c55457f5842baa84336ec138c4f080c87a367939f828c5328cd2f7f03cf621f482ef522c0cb08726b743f588ce
+EBUILD swig-2.0.9.ebuild 832 SHA256 76bb37f7930ca16a331fbafedda8113e11a22d8166340ed645cc546b2f970587 SHA512 1b15b0e0dbe983176c0c22a80adf37f682a68019df344c896ba3e62d91062a5a8c0c61ba7f03d324c9aa162bc668266cfce907e46c58525b38900a3a7905eec6 WHIRLPOOL 29dabb0af2f384a426dfa907772fa08c625c1e8365fe70cf1f77048d68c300c9d98c5b18b9daf2804f061b25aeda132abc12eadc9ce11d730816c1bd7a33c76d
+EBUILD swig-3.0.10.ebuild 855 SHA256 6b73151ad07e347f30a1a7ee846ea09cc49b26f0dd47943f88240a101eb8ecb3 SHA512 c11a8d13d3959a3b045b7acb0f214419bda6076cd220929ae59b7a3f875d5baf9e20237b58bd285ffdc567c21b4b72250629bc15d80c9d3d4a61e17591155262 WHIRLPOOL 9f2119448c8f1135f25c41547e6c527601eac7c55457f5842baa84336ec138c4f080c87a367939f828c5328cd2f7f03cf621f482ef522c0cb08726b743f588ce
+EBUILD swig-3.0.11.ebuild 868 SHA256 2123f109b4f6ebd0855afa838a4ae821b0101283881b2e2bab7d54ab9c3003cc SHA512 d6db4191ce798c23efc53bf9044ae22250a82e1cbf7c29becb008ebf65c6ebb18ad444f74a899240b3fea21141c73111abf45634b8d501ed415ea302f00d9df6 WHIRLPOOL 3c30511505f27db80a0708dca7f9f45ee981f05de00fdd07b44acceed5c21f1f8a4f329345967410a3b6b5f558c2d8125d0f4a87b82bb0ac08086807e0a2f8e6
+EBUILD swig-3.0.12.ebuild 859 SHA256 1c2a3e750fb4b0fa2958afd0db849f956a0a000566b7d1a7723f9efccac97acc SHA512 4b4bc22e3fb28182571034c26c2db421acf62c4f941ae9b0390859f37ee3cee1d0f21e4d60db106d0d929321820cfcc9a40f466e581a21d4ada7b34b8befae2b WHIRLPOOL c3dbf34ad555257aacebdabf68f45799aa82fb62f580ed68c260de8031bb2b5032007399b8bcffd0fd8da8b534c3b2060b42f5cbe60757c6ea963dffc11a97e3
+EBUILD swig-3.0.5.ebuild 846 SHA256 bb766ee3d2082b7f86af4e24013e7aefcc1d2168f6c87a32b1914e043f6cfa2c SHA512 260d9d4cc991f694c200b78747a43083602dd44597d658a12f181a3f2904518e190b4f38da35df340c88a427147154a921df6040ddcc49d87af2f502670e3fd0 WHIRLPOOL 1f6e30fdc8cab1a31bffe476e90a490eefb2cfbf6e530324e29faae22a0cae22cbf086a926e6b7f60095579f7d614003fe43d66363f14713dd441f281021b1da
+EBUILD swig-3.0.8.ebuild 846 SHA256 bb766ee3d2082b7f86af4e24013e7aefcc1d2168f6c87a32b1914e043f6cfa2c SHA512 260d9d4cc991f694c200b78747a43083602dd44597d658a12f181a3f2904518e190b4f38da35df340c88a427147154a921df6040ddcc49d87af2f502670e3fd0 WHIRLPOOL 1f6e30fdc8cab1a31bffe476e90a490eefb2cfbf6e530324e29faae22a0cae22cbf086a926e6b7f60095579f7d614003fe43d66363f14713dd441f281021b1da
+MISC ChangeLog 3980 SHA256 3c1cd22f0eedfb8a00a18ca6409876bb301777b6357654563137818b99dd0daf SHA512 a91569b6c91d02f5e345b64bd16c696d2fcbdcf92fac58a0c7dd78d71c3c4123f950b08c580243408c05f419fafc660b2a1a01e82dd810b9363ebc293ccfde56 WHIRLPOOL 8a7c6b25b67206d24db9302682654b7d53b672081b108c28433979404acc4a19f235d6acc6bbc61c3edd3cb61a8c945c5ad00ba0337cc7954b9e04432f8e9b03
+MISC ChangeLog-2015 28920 SHA256 da7ad25362af987b8c877edaf94f4a971babe5d0640c1202e7244a33886f7ded SHA512 94125d985291af23cb68ed804bdded5cea7c584733eb61806ba41b8fe8f66041d9b666edca5018ca3851c21a4308d15a4dd5d1c4c7ade6b59f8f1c8e4bdb3231 WHIRLPOOL 012d34b641f4320f02ad8daf41df9c169435daf9e08f73442635661553a43b2989fc7501051646b9d618d6718443f2a57ad190893de905294e3268d929dd387e
+MISC metadata.xml 1195 SHA256 123e33c417c72aa1d046d0e6fbce29a941bd5109d7aa8169a72b1fbb5eeba99a SHA512 1a350968dc8625b589ded2e6a977c4f14b6d532c42a6ae0c2230c480d92ebb6a0100e2eede576787f61e4cb3c60ac324db639f440134c9aaf3db38f5cbed2cbf WHIRLPOOL c20d3baa535bf29591140aa7b3c70da099cd8f8cf2b497ed765f2075271a99421b6e3b869ab2e4945013e7b5e2f96bcea7223d3f96f665048dce80a1477c9583
diff --git a/dev-lang/swig/metadata.xml b/dev-lang/swig/metadata.xml
new file mode 100644
index 000000000000..df28e41ee6f5
--- /dev/null
+++ b/dev-lang/swig/metadata.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>pchrist@gentoo.org</email>
+ <name>Panagiotis Christopoulos</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>radhermit@gentoo.org</email>
+ <name>Tim Harder</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>scheme@gentoo.org</email>
+ <name>Gentoo Scheme Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ SWIG is a software development tool that connects programs written in C and C++
+ with a variety of high-level programming languages. SWIG is used with different
+ types of languages including common scripting languages such as Perl, Python,
+ Tcl/Tk and Ruby. The list of supported languages also includes non-scripting
+ languages such as C#, Common Lisp (Allegro CL), Java, Modula-3 and OCAML. Also
+ several interpreted and compiled Scheme implementations (Chicken, Guile,
+ MzScheme) are supported.
+ </longdescription>
+ <use>
+ <flag name="ccache">build ccache-swig(a fast compiler cache)</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">swig</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/swig/swig-1.3.40-r2.ebuild b/dev-lang/swig/swig-1.3.40-r2.ebuild
new file mode 100644
index 000000000000..42df0a214d98
--- /dev/null
+++ b/dev-lang/swig/swig-1.3.40-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="3"
+DESCRIPTION="Simplified Wrapper and Interface Generator"
+HOMEPAGE="http://www.swig.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD BSD-2"
+SLOT="1"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ccache doc"
+RESTRICT="test"
+DEPEND=""
+RDEPEND=""
+
+src_prepare () {
+ rm -v aclocal.m4 || die "Unable to remove aclocal.m4"
+ ./autogen.sh || die "Autogen script failed"
+
+ # Use swig1.3 as binary instead of swig
+ sed -i -e 's:TARGET_NOEXE= swig:TARGET_NOEXE= swig1.3:' Makefile.in
+ sed -i -e 's:/swig@EXEEXT@:/swig1.3@EXEEXT@:g' Source/Makefile.{am,in}
+ sed -i -e "s:PACKAGE_NAME='ccache-swig':PACKAGE_NAME='ccache-swig1.3':" CCache/configure
+ mv CCache/ccache-swig.1 CCache/ccache-swig1.3.1
+}
+
+src_configure () {
+ econf \
+ $(use_enable ccache)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "target install failed"
+ dodoc ANNOUNCE CHANGES CHANGES.current FUTURE NEW README TODO || die "dodoc failed"
+ if use doc; then
+ dohtml -r Doc/{Devel,Manual} || die "Failed to install html documentation"
+ fi
+}
diff --git a/dev-lang/swig/swig-2.0.12.ebuild b/dev-lang/swig/swig-2.0.12.ebuild
new file mode 100644
index 000000000000..7fb32a4640b0
--- /dev/null
+++ b/dev-lang/swig/swig-2.0.12.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Simplified Wrapper and Interface Generator"
+HOMEPAGE="http://www.swig.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3+ BSD BSD-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ccache doc pcre"
+RESTRICT="test"
+
+DEPEND="pcre? ( dev-libs/libpcre )
+ ccache? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO )
+
+src_configure() {
+ econf \
+ $(use_enable ccache) \
+ $(use_with pcre)
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ dohtml -r Doc/{Devel,Manual}
+ fi
+}
diff --git a/dev-lang/swig/swig-2.0.9.ebuild b/dev-lang/swig/swig-2.0.9.ebuild
new file mode 100644
index 000000000000..e92d462ea6ec
--- /dev/null
+++ b/dev-lang/swig/swig-2.0.9.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+DESCRIPTION="Simplified Wrapper and Interface Generator"
+HOMEPAGE="http://www.swig.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3+ BSD BSD-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ccache doc pcre"
+RESTRICT="test"
+
+DEPEND="pcre? ( dev-libs/libpcre )
+ ccache? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO )
+
+src_configure() {
+ econf \
+ $(use_enable ccache) \
+ $(use_with pcre)
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ dohtml -r Doc/{Devel,Manual}
+ fi
+}
diff --git a/dev-lang/swig/swig-3.0.10.ebuild b/dev-lang/swig/swig-3.0.10.ebuild
new file mode 100644
index 000000000000..7fb32a4640b0
--- /dev/null
+++ b/dev-lang/swig/swig-3.0.10.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Simplified Wrapper and Interface Generator"
+HOMEPAGE="http://www.swig.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3+ BSD BSD-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ccache doc pcre"
+RESTRICT="test"
+
+DEPEND="pcre? ( dev-libs/libpcre )
+ ccache? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO )
+
+src_configure() {
+ econf \
+ $(use_enable ccache) \
+ $(use_with pcre)
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ dohtml -r Doc/{Devel,Manual}
+ fi
+}
diff --git a/dev-lang/swig/swig-3.0.11.ebuild b/dev-lang/swig/swig-3.0.11.ebuild
new file mode 100644
index 000000000000..8f1f44618399
--- /dev/null
+++ b/dev-lang/swig/swig-3.0.11.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Simplified Wrapper and Interface Generator"
+HOMEPAGE="http://www.swig.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3+ BSD BSD-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ccache doc pcre"
+RESTRICT="test"
+
+DEPEND="pcre? ( dev-libs/libpcre )
+ ccache? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO )
+
+src_configure() {
+ econf \
+ $(use_enable ccache) \
+ $(use_with pcre)
+}
+
+src_install() {
+ default
+
+ if use doc; then
+ docinto html
+ dodoc -r Doc/{Devel,Manual}
+ fi
+}
diff --git a/dev-lang/swig/swig-3.0.12.ebuild b/dev-lang/swig/swig-3.0.12.ebuild
new file mode 100644
index 000000000000..69e1326c644f
--- /dev/null
+++ b/dev-lang/swig/swig-3.0.12.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Simplified Wrapper and Interface Generator"
+HOMEPAGE="http://www.swig.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3+ BSD BSD-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ccache doc pcre"
+RESTRICT="test"
+
+DEPEND="pcre? ( dev-libs/libpcre )
+ ccache? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO )
+
+src_configure() {
+ econf \
+ $(use_enable ccache) \
+ $(use_with pcre)
+}
+
+src_install() {
+ default
+
+ if use doc; then
+ docinto html
+ dodoc -r Doc/{Devel,Manual}
+ fi
+}
diff --git a/dev-lang/swig/swig-3.0.5.ebuild b/dev-lang/swig/swig-3.0.5.ebuild
new file mode 100644
index 000000000000..b885cb095773
--- /dev/null
+++ b/dev-lang/swig/swig-3.0.5.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Simplified Wrapper and Interface Generator"
+HOMEPAGE="http://www.swig.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3+ BSD BSD-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ccache doc pcre"
+RESTRICT="test"
+
+DEPEND="pcre? ( dev-libs/libpcre )
+ ccache? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO )
+
+src_configure() {
+ econf \
+ $(use_enable ccache) \
+ $(use_with pcre)
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ dohtml -r Doc/{Devel,Manual}
+ fi
+}
diff --git a/dev-lang/swig/swig-3.0.8.ebuild b/dev-lang/swig/swig-3.0.8.ebuild
new file mode 100644
index 000000000000..b885cb095773
--- /dev/null
+++ b/dev-lang/swig/swig-3.0.8.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+DESCRIPTION="Simplified Wrapper and Interface Generator"
+HOMEPAGE="http://www.swig.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3+ BSD BSD-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ccache doc pcre"
+RESTRICT="test"
+
+DEPEND="pcre? ( dev-libs/libpcre )
+ ccache? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ANNOUNCE CHANGES CHANGES.current README TODO )
+
+src_configure() {
+ econf \
+ $(use_enable ccache) \
+ $(use_with pcre)
+}
+
+src_install() {
+ default
+
+ if use doc ; then
+ dohtml -r Doc/{Devel,Manual}
+ fi
+}
diff --git a/dev-lang/tcc/Manifest b/dev-lang/tcc/Manifest
new file mode 100644
index 000000000000..ff76efeefddf
--- /dev/null
+++ b/dev-lang/tcc/Manifest
@@ -0,0 +1,10 @@
+AUX clang.patch 667 SHA256 a982c29004a20dfd338425c74991659a4d866c706b8aacb7c5910c2eeaf33931 SHA512 aadbd3676b5333ae3b8a04c75117633ca8b08c5fa0f695b9f7ff7d3019ff06211c986d0a0986c7dc329621cc1a57e23d50924fd49cf1367490d962fcef4b4efe WHIRLPOOL 2cd35afc28d156b76e08b7a868bcd13b38bad40e3e34721e5d1b7cd8a6378a366d5f5b0a8617a3abeb4eeb5f49f543203c446d4d049830a57a62189c89264aca
+AUX linker.patch 441 SHA256 fdb05ecf72ec5bff8832e3be2c36e0519c426ee8800cca8e5c647bd499a58a95 SHA512 e19817d5f500bd95060efff3c984218800cbcabe01a88fb048b459cce8d67c435ff1d2130d7eedac55f5726bc0cc13dabe41c2535c2bc3c5fc0a21dc7128a965 WHIRLPOOL ca7e10d78a8714d9ec7134f0794371a14e8d14d0fcb78db6699019615570a6ade5af96dc852a188bbf86a6e3a16f9552c01dd74d5bf4569792b404d61b68fcb3
+DIST tcc-0.9.26.tar.bz2 525906 SHA256 521e701ae436c302545c3f973a9c9b7e2694769c71d9be10f70a2460705b6d71 SHA512 abdbe208498cf4865a2036b5426616f5888b9b0e8d5d2fda6d1dd4afab3386167f12eca87d8a5c4c9b7dc88620d983ddce3e874b7dfa9c21eceea29ffa635d53 WHIRLPOOL 62fc30f8a72f8f78ba4b7e3d8d11f5e5a920615dff0ff799a64fdb9611017a4d1537c10228f94250ac202dedcd05d0aa90a8565dc5956d5639b70a7e4fe1009c
+EBUILD tcc-0.9.26-r1.ebuild 1566 SHA256 e313d0b5207580c9424991223cf641cc9cf8b744941e7997b47a4e6ae667f9f3 SHA512 40d4489879464f4d380eb9433212dda09faf1e4c297f99a204715993253387a0a8d6f5d11911ccbc47542c914b4a0a4d9c971568bed627a21fdff85580216bc0 WHIRLPOOL 68bbb4b7fc7b1de3170f02399143d7821f7ac49e5a5fd873a5c23de4ba5910a40e88792ca9b4d47789e483ed2ce9eb5f9f1ee09a5c17cceaa7c62ad8f99d248f
+EBUILD tcc-0.9.26-r2.ebuild 1536 SHA256 7508a849278678ab8165c70c383f7e1313fb69fd7543d3d18b022545f3cb90cd SHA512 cdeffde7870d16177250e6f9901242e4242d037ec53e4a6a675f8e8bd68ea1af3989903b2daf793b58d024da407c5383b314ae0adba7a55387011767e0377f63 WHIRLPOOL cc822d32463ee04b13b3a3d82f9f61d143e815af9e22f89212acc24fa3f77c9c076167b6d0a13f9c005667cb0989bbb63b10b3f656bc640b72a7a2ee7a025ddc
+EBUILD tcc-0.9.26-r3.ebuild 1700 SHA256 90d82c547f91046fb099301b750cde92d5c048989cb8b539ae0f7371e2c72986 SHA512 58215a00f35d25b98b456229b284e0f6e3e910c490da28b005ca715f5542d6f9f59da720333e86b52e0e611502bbe1c911c9b7ec737b1853e3ca34d29f11fd68 WHIRLPOOL 8daa6536684a9f07a6ab9cc9e602404064068c310e90171649738adc4051767aa1401e17dcdae6600515dd76d7ce554f67333138302a71a0fc4afca4b8cda16b
+EBUILD tcc-9999.ebuild 1494 SHA256 3bc1480612bc69f17f0d495bae893123897ae04230a9e984a799a5736fc37cf3 SHA512 e8c8affcc1413860e0fb751de76603395326c489762ba1bdf3ece0a696e1121c4ea5ffcc72e49596f89fa249ba7cfdf45864573b5834b929198e694e7f234cd6 WHIRLPOOL 823d01946210782dd6a669d510f182edc70644bb5dbd7d4601feea74fbe855f7228c46f933a83c98538209210091af05e576739a3d309f96a5320eeacbbe9b8c
+MISC ChangeLog 3114 SHA256 b257217a28264aa58dbbd3a0b4e90379d0733d8fabd09b64fb382f04b8a9fdfb SHA512 6a3e0fb328663904178f7c6a139be4a9ce0b6588f5a64d3a9ce8396afd6a5e8f5798b84c88959ec158675e4aa34431c2a3abd2d5b59b51f330f15b5f395aa0b7 WHIRLPOOL 02f8ac8afbbe80c18f291682b3186756e68599f168e7ab0e005c08a863ca0f43bf688181dc82052c9b807c284f39cb76e1af1847f2d98bd14a51f873eee88ee5
+MISC ChangeLog-2015 6701 SHA256 2152a93f0f273cc1061e329a7e25550cab250137c8be14ee0ccc8539c4c8c4f6 SHA512 072bf4e9775e476560fe678678e4d224e3603674c84aba88bbac3a3425f818d5d931aca2397242beab979d25b4daf9e549d9b1b1213c66aeaad9c4148f46e0d9 WHIRLPOOL 4060aaf6c1d1ba4bda3c7136de7abfb77d66b503c521777ce115e96256945e1ad07afae5b5d470993f7ba081a2d57ce7c53c0859a08ddd7632246c449b918494
+MISC metadata.xml 316 SHA256 b9e4eabdaafc40d84d25a3bacbf93fd49f2b22ab5d1b78fee0a10bec6b31180d SHA512 87e93f1667a8b911d4f8e79d05ab06aca7933d347387157e9a1d5d79260f976e6e9df2c172656acf5e961afbbeae640868ba28ade4c6e73ed09e020f9bd14978 WHIRLPOOL 372dfbbd1ddee6f9e7002ab1ce2e234e7e05dc8f259994bacb6f1416302f7caa356092ae61fa83704eac1923fb2e36dad22dddb5a8a2c0c1d61f8341954bc852
diff --git a/dev-lang/tcc/files/clang.patch b/dev-lang/tcc/files/clang.patch
new file mode 100644
index 000000000000..8304470e3682
--- /dev/null
+++ b/dev-lang/tcc/files/clang.patch
@@ -0,0 +1,18 @@
+# Fixes the default linker options for portage
+# Upstream commit ba286136bf8e48c71ffd6c2fd9ce97e64a6eeeb1
+
+diff --git a/libtcc.c b/libtcc.c
+index 127806f..dc78643 100644
+--- a/libtcc.c
++++ b/libtcc.c
+@@ -1560,6 +1560,10 @@ static int tcc_set_linker(TCCState *s, const char *option)
+ } else
+ goto err;
+
++ } else if (link_option(option, "as-needed", &p)) {
++ ignoring = 1;
++ } else if (link_option(option, "O", &p)) {
++ ignoring = 1;
+ } else if (link_option(option, "rpath=", &p)) {
+ s->rpath = copy_linker_arg(p);
+ } else if (link_option(option, "section-alignment=", &p)) {
diff --git a/dev-lang/tcc/files/linker.patch b/dev-lang/tcc/files/linker.patch
new file mode 100644
index 000000000000..01cc72335fd8
--- /dev/null
+++ b/dev-lang/tcc/files/linker.patch
@@ -0,0 +1,18 @@
+# Fix compiling tcc with clang. Upstream commit 73ac39c317a20accaf3b25ba833deee0c2e2849f
+# Gentoo bug #502452
+diff --git a/lib/libtcc1.c b/lib/libtcc1.c
+index cf9babf..b46fb5d 100644
+--- a/lib/libtcc1.c
++++ b/lib/libtcc1.c
+@@ -647,6 +647,11 @@ struct __va_list_struct {
+ char *reg_save_area;
+ };
+
++#undef __va_start
++#undef __va_arg
++#undef __va_copy
++#undef __va_end
++
+ void *__va_start(void *fp)
+ {
+ struct __va_list_struct *ap =
diff --git a/dev-lang/tcc/metadata.xml b/dev-lang/tcc/metadata.xml
new file mode 100644
index 000000000000..56d7c4404e32
--- /dev/null
+++ b/dev-lang/tcc/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>wizardedit@gentoo.org</email>
+ <name>Austin English</name>
+ </maintainer>
+ <longdescription>
+ Tiny C compiler
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/tcc/tcc-0.9.26-r1.ebuild b/dev-lang/tcc/tcc-0.9.26-r1.ebuild
new file mode 100644
index 000000000000..4fbc6b2a7c0a
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.26-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A very small C compiler for ix86/amd64"
+HOMEPAGE="http://bellard.org/tcc/"
+SRC_URI="http://download.savannah.gnu.org/releases/tinycc/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-lang/perl" # doc generation
+# Both tendra and tinycc install /usr/bin/tcc
+RDEPEND="!dev-lang/tendra"
+IUSE="test"
+
+src_prepare() {
+ # Don't strip
+ sed -i -e 's|$(INSTALL) -s|$(INSTALL)|' Makefile || die
+
+ # Fix examples
+ sed -i -e '1{
+ i#! /usr/bin/tcc -run
+ /^#!/d
+ }' examples/ex*.c || die
+ sed -i -e '1s/$/ -lX11/' examples/ex4.c || die
+
+ # fix texi2html invocation
+ sed -i -e 's/-number//' Makefile || die
+ sed -i -e 's/--sections//' Makefile || die
+}
+
+src_configure() {
+ use test && unset CFLAGS LDFLAGS # Tests run with CC=tcc etc, they will fail hard otherwise
+ # better fixes welcome, it feels wrong to hack the env like this
+ # not autotools, so call configure directly
+ ./configure --cc="$(tc-getCC)" \
+ --bindir=/usr/bin \
+ --libdir=/usr/$(get_libdir) \
+ --tccdir=tcc \
+ --includedir=/usr/include \
+ --docdir=/usr/share/doc/${PF} \
+ --mandir=/usr/share/man
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc Changelog README TODO VERSION
+ #dohtml tcc-doc.html
+ exeinto /usr/share/doc/${PF}/examples
+ doexe examples/ex*.c
+}
+
+src_test() {
+ # this is using tcc bits that don't know as-needed etc.
+ TCCFLAGS="" emake test
+}
diff --git a/dev-lang/tcc/tcc-0.9.26-r2.ebuild b/dev-lang/tcc/tcc-0.9.26-r2.ebuild
new file mode 100644
index 000000000000..808555d46618
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.26-r2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A very small C compiler for ix86/amd64"
+HOMEPAGE="http://bellard.org/tcc/"
+SRC_URI="http://download.savannah.gnu.org/releases/tinycc/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+
+DEPEND="dev-lang/perl" # doc generation
+# Both tendra and tinycc install /usr/bin/tcc
+RDEPEND="!dev-lang/tendra"
+IUSE="test"
+
+src_prepare() {
+ # Don't strip
+ sed -i -e 's|$(INSTALL) -s|$(INSTALL)|' Makefile || die
+
+ # Fix examples
+ sed -i -e '1{
+ i#! /usr/bin/tcc -run
+ /^#!/d
+ }' examples/ex*.c || die
+ sed -i -e '1s/$/ -lX11/' examples/ex4.c || die
+
+ # fix texi2html invocation
+ sed -i -e 's/-number//' Makefile || die
+ sed -i -e 's/--sections//' Makefile || die
+}
+
+src_configure() {
+ use test && unset CFLAGS LDFLAGS # Tests run with CC=tcc etc, they will fail hard otherwise
+ # better fixes welcome, it feels wrong to hack the env like this
+ # not autotools, so call configure directly
+ ./configure --cc="$(tc-getCC)" \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc Changelog README TODO VERSION
+ #dohtml tcc-doc.html
+ exeinto /usr/share/doc/${PF}/examples
+ doexe examples/ex*.c
+}
+
+src_test() {
+ # this is using tcc bits that don't know as-needed etc.
+ TCCFLAGS="" emake test
+}
diff --git a/dev-lang/tcc/tcc-0.9.26-r3.ebuild b/dev-lang/tcc/tcc-0.9.26-r3.ebuild
new file mode 100644
index 000000000000..cd260028a260
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.26-r3.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit toolchain-funcs
+
+DESCRIPTION="A very small C compiler for ix86/amd64"
+HOMEPAGE="http://bellard.org/tcc/"
+SRC_URI="http://download.savannah.gnu.org/releases/tinycc/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+
+DEPEND="dev-lang/perl" # doc generation
+# Both tendra and tinycc install /usr/bin/tcc
+RDEPEND="!dev-lang/tendra"
+IUSE="test"
+
+src_prepare() {
+ # Don't strip
+ sed -i -e 's|$(INSTALL) -s|$(INSTALL)|' Makefile || die
+
+ # Fix examples
+ sed -i -e '1{
+ i#! /usr/bin/tcc -run
+ /^#!/d
+ }' examples/ex*.c || die
+ sed -i -e '1s/$/ -lX11/' examples/ex4.c || die
+
+ # Fix texi2html invocation
+ sed -i -e 's/-number//' Makefile || die
+ sed -i -e 's/--sections//' Makefile || die
+
+ # Fix compiling tcc with clang
+ eapply "${FILESDIR}"/clang.patch
+
+ # Allows using tcc as the system compiler for Gentoo
+ eapply "${FILESDIR}"/linker.patch
+
+ eapply_user
+}
+
+src_configure() {
+ use test && unset CFLAGS LDFLAGS # Tests run with CC=tcc etc, they will fail hard otherwise
+ # better fixes welcome, it feels wrong to hack the env like this
+ # not autotools, so call configure directly
+ ./configure --cc="$(tc-getCC)" \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc Changelog README TODO VERSION
+ #dohtml tcc-doc.html
+ exeinto /usr/share/doc/${PF}/examples
+ doexe examples/ex*.c
+}
+
+src_test() {
+ # this is using tcc bits that don't know as-needed etc.
+ TCCFLAGS="" emake test
+}
diff --git a/dev-lang/tcc/tcc-9999.ebuild b/dev-lang/tcc/tcc-9999.ebuild
new file mode 100644
index 000000000000..728ed94dbec7
--- /dev/null
+++ b/dev-lang/tcc/tcc-9999.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs git-r3
+
+DESCRIPTION="A very small C compiler for ix86/amd64"
+HOMEPAGE="http://bellard.org/tcc/"
+EGIT_REPO_URI="http://repo.or.cz/r/tinycc.git"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS=""
+
+DEPEND="dev-lang/perl" # doc generation
+# Both tendra and tinycc install /usr/bin/tcc
+RDEPEND="!dev-lang/tendra"
+IUSE="test"
+
+src_prepare() {
+ # Don't strip
+ sed -i -e 's|$(INSTALL) -s|$(INSTALL)|' Makefile || die
+
+ # Fix examples
+ sed -i -e '1{
+ i#! /usr/bin/tcc -run
+ /^#!/d
+ }' examples/ex*.c || die
+ sed -i -e '1s/$/ -lX11/' examples/ex4.c || die
+
+ # fix texi2html invocation
+ sed -i -e 's/-number//' Makefile || die
+ sed -i -e 's/--sections//' Makefile || die
+}
+
+src_configure() {
+ use test && unset CFLAGS LDFLAGS # Tests run with CC=tcc etc, they will fail hard otherwise
+ # better fixes welcome, it feels wrong to hack the env like this
+ # not autotools, so call configure directly
+ ./configure --cc="$(tc-getCC)" \
+ --prefix="${EPREFIX}/usr" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc Changelog README TODO VERSION
+ #dohtml tcc-doc.html
+ exeinto /usr/share/doc/${PF}/examples
+ doexe examples/ex*.c
+}
+
+src_test() {
+ # this is using tcc bits that don't know as-needed etc.
+ TCCFLAGS="" emake test
+}
diff --git a/dev-lang/tcl/Manifest b/dev-lang/tcl/Manifest
new file mode 100644
index 000000000000..43da04a0cd00
--- /dev/null
+++ b/dev-lang/tcl/Manifest
@@ -0,0 +1,15 @@
+AUX tcl-8.5.13-multilib.patch 419 SHA256 c4f48ee5e162635de90db5d0bcd123982fc0df2da01ab74cbfd97e0d30b5cddb SHA512 946a0274facb0dcefb2129beea14dd8b874558803f8da612c6c00d844270cd9c797089f8e5b21d4f11d206dcfb7bea92ab00b96ce7db4217efc18b82f197347c WHIRLPOOL edd7065d687a011f8eac0a4faaa76f44dd40522e901716c9521a3236b502312699d549a4b4b69c6a7cbf793dab4ef3292fcca9e125462fb150df31ec9a30e13b
+AUX tcl-8.5.14-conf.patch 518 SHA256 55c4bf1a8e21b9cfc749e4207293c6472f84145082beeecb7fa83f4c334c8f45 SHA512 564779732d4ad1253e4f6fbc760eabf67153e8978c29e434f7796c57a637932bf5d8308edb1e0951e391ec490ea00cd4360b19eae79fc840af02acd4ef03a021 WHIRLPOOL f3d4a9b5ae66a9defb9d0b209fe5b4bc43d7fae2aa3e366f0b54f763488d94a236f226cf445c03623f34793e8e2305a29906e14c4d0e3bda3e8ed27f9eefed9b
+AUX tcl-8.6.1-conf.patch 518 SHA256 55c4bf1a8e21b9cfc749e4207293c6472f84145082beeecb7fa83f4c334c8f45 SHA512 564779732d4ad1253e4f6fbc760eabf67153e8978c29e434f7796c57a637932bf5d8308edb1e0951e391ec490ea00cd4360b19eae79fc840af02acd4ef03a021 WHIRLPOOL f3d4a9b5ae66a9defb9d0b209fe5b4bc43d7fae2aa3e366f0b54f763488d94a236f226cf445c03623f34793e8e2305a29906e14c4d0e3bda3e8ed27f9eefed9b
+DIST tcl-core8.6.5-src.tar.gz 5846556 SHA256 10b6a0159e6bb458682b044726f544058a79ee2875644bd6755d2e69309fe963 SHA512 b726f7d3193ad92ba64911b8c724d5454c5a93d5f5e95462ec0a6d8ccbbdf20093888f66c83956d7631392ca805c1a80430f102c0a932de3ed55311101e0e09f WHIRLPOOL a4344efdf2d719678a3028044707331988e68bae827a252a735e33b29faab83cb6c3378fce8232b504b7474188611cc9c5aa43823f9fdb3e339bce4e3d798077
+DIST tcl-core8.6.6-src.tar.gz 5868427 SHA256 4afa002eac0216bfd05643135ee8c227bac533daf4cee6c38a37e053c4b64696 SHA512 469a0221ed16569b70986cdde261d0c0df3bf64c493b8d6fc8368eb14597f7c2f6a01f082a1c8f27eb720618956e053cc97fbb9aaf7bb29cc96781cdc8e9518c WHIRLPOOL bcbf8a82d8197bea2814652b84390fd7d3fbb6e520ff0af0db7b355406954ed958bd43ac15b47c3df43ba747a70b3f4ef17d4d6ec0fe52ea0f15856c7e22c015
+DIST tcl-core8.6.7-src.tar.gz 5875027 SHA256 8441fbbce7b7f94a0f53ecfbe5e0be58aa8bbb6eefeff7f43671d4e6d70289d1 SHA512 95c8c5bcb4fe604a77ca6ba9d49f9e90d156feaa9f3ab97661983f256ab54476b103ec8de01cd47231ed95e6df5e36d60514aed2ba5b8f3619cc5a3698ad3ee5 WHIRLPOOL 70f133cbfce4e1b6d17cf3ca04e6811ad20d6270e97aa644154084fdf4037aaee702979761c3c715d65111e40eac8ec1b82bc68b38013b18300ad221faa2dcac
+DIST tcl8.5.17-src.tar.gz 4546317 SHA256 4c7cd8f2e0900cb36dde899b3f9f4d5c471ee3c4f8304cf9ec71fd18cd5e98d6 SHA512 ad5ddb4cd6378fd6bbea8cd85ceb1cf90392b2e8c49fbfb3e4b35c81d3ae3e3f087697c41fcba8c8e06de1d9e7539397e26d58b864dc01ba65abe4ba4efa9568 WHIRLPOOL 7e97049eb3875bcdc33b2d8ab02b0932173916fbbdfbc7970dd3c3ed1fe520c15ed1d6106215a823b5fc6f5008f12f3ccd1525dd536ec239388e6bf459352ab6
+EBUILD tcl-8.5.17-r100.ebuild 2802 SHA256 cc2bbd4a2e3bfb3162f911b9567487f2e795f85f41f88ca1b646605c023590dc SHA512 420ec85568751542f09c87021d32860e604befa8f61ede6c65643c4e4470405a354c7710b5712fea05107855ffc39d79809094285d421264a6bea70041060e47 WHIRLPOOL 99add588814ad9a3a01f783d0816ab84e11b6435041b827711738d1ec39e5a31088bafcdf83f25aa63603e31d3acc97ef6b8b73de6989c30a899c29d93f4f378
+EBUILD tcl-8.5.17.ebuild 3718 SHA256 5b1026aa67d0fa29b5120e30ae8636b45337da944b2e8d0d14e34e729fb6f052 SHA512 56f53ac9a88f74d4662c8f12d0e7ab3339db67445a2475787945de042b8c60524961c8c1abaee9e49e4071cda1d547c2409f2862c23aa04924bc9694aa4b9efa WHIRLPOOL 90218d7297806c6f89443bf482b87c7762cff3fb22bd8e14fc330405fb4c57da9d18209840ea88241b1b3269cb057f88cacf291ad87989398f6b47c226ece006
+EBUILD tcl-8.6.5.ebuild 3973 SHA256 7ea30cd83e8bbc0761dbdee3f7a7e048b8b5b664515eda3180fbac1e520adc90 SHA512 5340248208cb6b2def5fd1f39293b074656a138ceb95be8e21f3add6e21db4f866c9eff506cf05f8bee40a61a0f6bc984950ec487af79b679f4910b660c8d8e2 WHIRLPOOL 8e98c0d71db4c863872071286cf592453fd8d9e12ee79ce46fd96a8897633e685be5c3d2c52698fa6a0b7dec1355d494ddeee6b1c5efb9564a21269a283b3559
+EBUILD tcl-8.6.6.ebuild 4064 SHA256 8e1bf68c5f4b661e83a66628234ef628d166110cfdbb36d2bd3255b18289f204 SHA512 6469f0b9bbb5d4a6e5cf4751b0e2e4ac022c7e66a258098ae330089a991264171c8e454cb1b48e8d103b47991acdc6d4177ed32b05e38a83e1a25ff3c1f56bab WHIRLPOOL 8cc31cf1641711f1b08e8f3daeeee5705737264bcaabf2c31e241d0bf6ec71f7ac1384bf06dad4134d827676f3002d7fc1fca82006b78b22e3719aa17e1f37ec
+EBUILD tcl-8.6.7.ebuild 3973 SHA256 7ea30cd83e8bbc0761dbdee3f7a7e048b8b5b664515eda3180fbac1e520adc90 SHA512 5340248208cb6b2def5fd1f39293b074656a138ceb95be8e21f3add6e21db4f866c9eff506cf05f8bee40a61a0f6bc984950ec487af79b679f4910b660c8d8e2 WHIRLPOOL 8e98c0d71db4c863872071286cf592453fd8d9e12ee79ce46fd96a8897633e685be5c3d2c52698fa6a0b7dec1355d494ddeee6b1c5efb9564a21269a283b3559
+MISC ChangeLog 4059 SHA256 c427effae3cb80618d42a1785c654c0a4626cba776225aaad7ffd2df89b9f67c SHA512 0b11543e2833a06b8af7a4ef9dffdec646a7524b6c3606d481f3c66c752e4d8894017ece893f196b8ad456d66f23e1662702081329a69a8ec73f506012f61e49 WHIRLPOOL 5727bfc6d8e7ecfc334428e2dc39f7578413c3e6ceeaf244efd9c4656d1bf466e710d421f65946844c31d901ad4a3c6d75d4dc1484ccacf87e7c8d94ef48f4a5
+MISC ChangeLog-2015 28803 SHA256 c5217f47726ecaca66e712b6020d28fbca7e7d22934b1370d3a3d60f096ae373 SHA512 53beff94ab7b104d711bdaac043073647beffdedcb7459b29e3f299f9c771e50cbf44e48041428424826a254bee36b09ac826b6ace4aa5a69a86861e30e4849a WHIRLPOOL 186d3b68fa9736d03f6613ba6b7d69f4278433560f6dae01203817ccfda8c98f00d1fa3baacb53df9d63f3c04a0b54d1b9dee8154b6fc84ff8d7d4773a1ce8af
+MISC metadata.xml 332 SHA256 51fe7c7a4bbc9cd624918f8c14774ef8fd72914093a45fbe23d6649b200284c4 SHA512 ed76dd850b8ead57d5a3ad7dedba2a1cf79482c188919eb13321b90e5a635b233aec30408a4df741ceb1aa9d68a00065e05a80589ff8c82f2577637d7cd721a6 WHIRLPOOL 79ecf39b6e9de2dd792fbebb1db9515f655c0ceae2a1e063fdb9da2116d2a716fcab0b875b3986de890f5551038d6a5f2c46bef554fa994567df18c4eb312b1d
diff --git a/dev-lang/tcl/files/tcl-8.5.13-multilib.patch b/dev-lang/tcl/files/tcl-8.5.13-multilib.patch
new file mode 100644
index 000000000000..de1580ce55bd
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.5.13-multilib.patch
@@ -0,0 +1,12 @@
+diff -Naur tcl8.5a6.orig/unix/configure.in tcl8.5a6/unix/configure.in
+--- tcl8.5a6.orig/unix/configure.in 2007-04-27 02:33:51.000000000 +0900
++++ tcl8.5a6/unix/configure.in 2007-05-16 10:27:25.000000000 +0900
+@@ -645,7 +645,7 @@
+
+ eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
+
+-TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
++TCL_LIBRARY='$(libdir)/tcl$(VERSION)'
+ PRIVATE_INCLUDE_DIR='$(includedir)'
+ HTML_DIR='$(DISTDIR)/html'
+
diff --git a/dev-lang/tcl/files/tcl-8.5.14-conf.patch b/dev-lang/tcl/files/tcl-8.5.14-conf.patch
new file mode 100644
index 000000000000..be303e9f3ef8
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.5.14-conf.patch
@@ -0,0 +1,11 @@
+--- tcl8.5.0/unix/tcl.m4.conf 2007-12-20 10:48:05.000000000 +0100
++++ tcl8.5.0/unix/tcl.m4 2007-12-20 10:48:52.000000000 +0100
+@@ -1427,7 +1427,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ # get rid of the warnings.
+ #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+
+- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
++ SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS} -fPIC -Wl,-soname,${@}'
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
diff --git a/dev-lang/tcl/files/tcl-8.6.1-conf.patch b/dev-lang/tcl/files/tcl-8.6.1-conf.patch
new file mode 100644
index 000000000000..be303e9f3ef8
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.6.1-conf.patch
@@ -0,0 +1,11 @@
+--- tcl8.5.0/unix/tcl.m4.conf 2007-12-20 10:48:05.000000000 +0100
++++ tcl8.5.0/unix/tcl.m4 2007-12-20 10:48:52.000000000 +0100
+@@ -1427,7 +1427,7 @@ dnl AC_CHECK_TOOL(AR, ar)
+ # get rid of the warnings.
+ #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+
+- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
++ SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS} -fPIC -Wl,-soname,${@}'
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
diff --git a/dev-lang/tcl/metadata.xml b/dev-lang/tcl/metadata.xml
new file mode 100644
index 000000000000..dfa25ac81dad
--- /dev/null
+++ b/dev-lang/tcl/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>tcltk@gentoo.org</email>
+ <description>TCL/TK Herd.</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tcl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/tcl/tcl-8.5.17-r100.ebuild b/dev-lang/tcl/tcl-8.5.17-r100.ebuild
new file mode 100644
index 000000000000..c72da88c4c70
--- /dev/null
+++ b/dev-lang/tcl/tcl-8.5.17-r100.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# this ebuild is only for the libtcl8.5.so SONAME for ABI compat
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib toolchain-funcs versionator multilib-minimal
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tool Command Language"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="8.5"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+IUSE="debug threads"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ !=dev-lang/tcl-8.5*:0"
+DEPEND="${RDEPEND}
+ "
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+DOCS=()
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ # Bug 125971
+ epatch "${FILESDIR}"/${PN}-8.5.14-conf.patch
+
+ # workaround stack check issues, bug #280934
+ use hppa && append-cflags "-DTCL_NO_STACK_CHECK=1"
+
+ tc-export CC
+
+ sed \
+ -e '/chmod/s:555:755:g' \
+ -i Makefile.in || die
+
+ eautoconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # We went ahead and deleted the whole compat/ subdir which means
+ # the configure tests to detect broken versions need to pass (else
+ # we'll fail to build). This comes up when cross-compiling, but
+ # might as well get a minor configure speed up normally.
+ export ac_cv_func_memcmp_working="yes"
+ export tcl_cv_str{str,toul,tod}_unbroken="ok"
+ export tcl_cv_strtod_buggy="no"
+
+ econf \
+ $(use_enable threads) \
+ $(use_enable debug symbols)
+}
+
+multilib_src_install() {
+ dolib.so libtcl8.5.so
+ dolib.a libtclstub8.5.a
+
+ #short version number
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ # fix the tclConfig.sh to eliminate refs to the build directory
+ # and drop unnecessary -L inclusion to default system libdir
+
+ sed \
+ -e "/^TCL_BUILD_LIB_SPEC=/s:-L$(pwd) *::g" \
+ -e "/^TCL_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TCL_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tcl${v1}/include:g" \
+ -e "/^TCL_BUILD_STUB_LIB_SPEC=/s:-L$(pwd) *::g" \
+ -e "/^TCL_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TCL_BUILD_STUB_LIB_PATH=/s:$(pwd):${EPREFIX}/usr/${mylibdir}:g" \
+ -e "/^TCL_LIB_FILE=/s:'libtcl${v1}..TCL_DBGX..so':\"libtcl${v1}\$\{TCL_DBGX\}.so\":g" \
+ -i tclConfig.sh || die
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
+ sed \
+ -e "/^TCL_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+ -e "/^TCL_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+ -i tclConfig.sh || die
+ fi
+
+ insinto /usr/${mylibdir}/tcl${v1}
+ doins tclConfig.sh
+}
diff --git a/dev-lang/tcl/tcl-8.5.17.ebuild b/dev-lang/tcl/tcl-8.5.17.ebuild
new file mode 100644
index 000000000000..25fa0a2a349c
--- /dev/null
+++ b/dev-lang/tcl/tcl-8.5.17.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib toolchain-funcs versionator multilib-minimal
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tool Command Language"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0/8.5"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+IUSE="debug threads"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ # Bug 125971
+ epatch "${FILESDIR}"/${PN}-8.5.14-conf.patch
+
+ # workaround stack check issues, bug #280934
+ use hppa && append-cflags "-DTCL_NO_STACK_CHECK=1"
+
+ tc-export CC
+
+ sed \
+ -e '/chmod/s:555:755:g' \
+ -i Makefile.in || die
+
+ eautoconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # We went ahead and deleted the whole compat/ subdir which means
+ # the configure tests to detect broken versions need to pass (else
+ # we'll fail to build). This comes up when cross-compiling, but
+ # might as well get a minor configure speed up normally.
+ export ac_cv_func_memcmp_working="yes"
+ export tcl_cv_str{str,toul,tod}_unbroken="ok"
+ export tcl_cv_strtod_buggy="no"
+
+ econf \
+ $(use_enable threads) \
+ $(use_enable debug symbols)
+}
+
+multilib_src_install() {
+ #short version number
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ S= default
+
+ # fix the tclConfig.sh to eliminate refs to the build directory
+ # and drop unnecessary -L inclusion to default system libdir
+
+ sed \
+ -e "/^TCL_BUILD_LIB_SPEC=/s:-L$(pwd) *::g" \
+ -e "/^TCL_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TCL_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tcl${v1}/include:g" \
+ -e "/^TCL_BUILD_STUB_LIB_SPEC=/s:-L$(pwd) *::g" \
+ -e "/^TCL_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TCL_BUILD_STUB_LIB_PATH=/s:$(pwd):${EPREFIX}/usr/${mylibdir}:g" \
+ -e "/^TCL_LIB_FILE=/s:'libtcl${v1}..TCL_DBGX..so':\"libtcl${v1}\$\{TCL_DBGX\}.so\":g" \
+ -i "${ED}"/usr/${mylibdir}/tclConfig.sh || die
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
+ sed \
+ -e "/^TCL_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+ -e "/^TCL_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+ -i "${ED}"/usr/${mylibdir}/tclConfig.sh || die
+ fi
+
+ # install private headers
+ insinto /usr/${mylibdir}/tcl${v1}/include/unix
+ doins *.h
+ insinto /usr/${mylibdir}/tcl${v1}/include/generic
+ doins "${SPARENT}"/generic/*.h
+ rm -f "${ED}"/usr/${mylibdir}/tcl${v1}/include/generic/{tcl,tclDecls,tclPlatDecls}.h || die
+
+ # install symlink for libraries
+ dosym libtcl${v1}$(get_libname) /usr/${mylibdir}/libtcl$(get_libname)
+ dosym libtclstub${v1}.a /usr/${mylibdir}/libtclstub.a
+
+ if multilib_is_native_abi; then
+ dosym tclsh${v1} /usr/bin/tclsh
+ dodoc "${SPARENT}"/{ChangeLog*,README,changes}
+ fi
+}
+
+pkg_postinst() {
+ for version in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 8.5 ${version}; then
+ echo
+ ewarn "You're upgrading from <${P}, you must recompile the other"
+ ewarn "packages on your system that link with tcl after the upgrade"
+ ewarn "completes. To perform this action, please run revdep-rebuild"
+ ewarn "in package app-portage/gentoolkit."
+ ewarn "If you have dev-lang/tk and dev-tcltk/tclx installed you should"
+ ewarn "upgrade them before this recompilation, too,"
+ echo
+ fi
+ done
+}
diff --git a/dev-lang/tcl/tcl-8.6.5.ebuild b/dev-lang/tcl/tcl-8.6.5.ebuild
new file mode 100644
index 000000000000..cb2f7e308894
--- /dev/null
+++ b/dev-lang/tcl/tcl-8.6.5.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="Tool Command Language"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${PN}-core${PV}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0/8.6"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+IUSE="debug +threads"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ # Bug 125971
+ "${FILESDIR}"/${PN}-8.6.1-conf.patch
+)
+
+src_prepare() {
+ find \
+ "${SPARENT}"/compat/* \
+ "${SPARENT}"/doc/try.n \
+ -delete || die
+
+ pushd "${SPARENT}" &>/dev/null || die
+ default
+ popd &>/dev/null || die
+
+ # workaround stack check issues, bug #280934
+ use hppa && append-cflags "-DTCL_NO_STACK_CHECK=1"
+
+ tc-export CC
+
+ sed \
+ -e '/chmod/s:555:755:g' \
+ -i Makefile.in || die
+
+ sed \
+ -e 's:-O[2s]\?::g' \
+ -i tcl.m4 || die
+
+ mv configure.{in,ac} || die
+
+ eautoconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # We went ahead and deleted the whole compat/ subdir which means
+ # the configure tests to detect broken versions need to pass (else
+ # we'll fail to build). This comes up when cross-compiling, but
+ # might as well get a minor configure speed up normally.
+ export ac_cv_func_memcmp_working="yes"
+ export tcl_cv_str{str,toul,tod}_unbroken="ok"
+ export tcl_cv_strtod_buggy="no"
+
+ econf \
+ $(use_enable threads) \
+ $(use_enable debug symbols)
+}
+
+multilib_src_install() {
+ #short version number
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ S= default
+ # fix the tclConfig.sh to eliminate refs to the build directory
+ # and drop unnecessary -L inclusion to default system libdir
+
+ sed \
+ -e "/^TCL_BUILD_LIB_SPEC=/s:-L$(pwd) *::g" \
+ -e "/^TCL_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TCL_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tcl${v1}/include:g" \
+ -e "/^TCL_BUILD_STUB_LIB_SPEC=/s:-L$(pwd) *::g" \
+ -e "/^TCL_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TCL_BUILD_STUB_LIB_PATH=/s:$(pwd):${EPREFIX}/usr/${mylibdir}:g" \
+ -e "/^TCL_LIB_FILE=/s:'libtcl${v1}..TCL_DBGX..so':\"libtcl${v1}\$\{TCL_DBGX\}.so\":g" \
+ -i "${ED}"/usr/${mylibdir}/tclConfig.sh || die
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
+ sed \
+ -e "/^TCL_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+ -e "/^TCL_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+ -i "${ED}"/usr/${mylibdir}/tclConfig.sh || die
+ fi
+
+ # install private headers
+ insinto /usr/${mylibdir}/tcl${v1}/include/unix
+ doins *.h
+ insinto /usr/${mylibdir}/tcl${v1}/include/generic
+ doins "${SPARENT}"/generic/*.h
+ rm -f "${ED}"/usr/${mylibdir}/tcl${v1}/include/generic/{tcl,tclDecls,tclPlatDecls}.h || die
+
+ # install symlink for libraries
+ dosym libtcl${v1}$(get_libname) /usr/${mylibdir}/libtcl$(get_libname)
+ dosym libtclstub${v1}.a /usr/${mylibdir}/libtclstub.a
+
+ if multilib_is_native_abi; then
+ dosym tclsh${v1} /usr/bin/tclsh
+ dodoc "${SPARENT}"/{ChangeLog*,README,changes}
+ fi
+}
+
+pkg_postinst() {
+ for version in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 8.6 ${version}; then
+ echo
+ ewarn "You're upgrading from <${P}, you must recompile the other"
+ ewarn "packages on your system that link with tcl after the upgrade"
+ ewarn "completes. To perform this action, please run revdep-rebuild"
+ ewarn "in package app-portage/gentoolkit."
+ ewarn "If you have dev-lang/tk and dev-tcltk/tclx installed you should"
+ ewarn "upgrade them before this recompilation, too,"
+ echo
+ fi
+ done
+}
diff --git a/dev-lang/tcl/tcl-8.6.6.ebuild b/dev-lang/tcl/tcl-8.6.6.ebuild
new file mode 100644
index 000000000000..9ff899c98ac4
--- /dev/null
+++ b/dev-lang/tcl/tcl-8.6.6.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="Tool Command Language"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${PN}-core${PV}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0/8.6"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+IUSE="debug +threads"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+# Bug 629680: need to disable testing since network-sandbox creates false negatives
+RESTRICT="test"
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ # Bug 125971
+ "${FILESDIR}"/${PN}-8.6.1-conf.patch
+)
+
+src_prepare() {
+ find \
+ "${SPARENT}"/compat/* \
+ "${SPARENT}"/doc/try.n \
+ -delete || die
+
+ pushd "${SPARENT}" &>/dev/null || die
+ default
+ popd &>/dev/null || die
+
+ # workaround stack check issues, bug #280934
+ use hppa && append-cflags "-DTCL_NO_STACK_CHECK=1"
+
+ tc-export CC
+
+ sed \
+ -e '/chmod/s:555:755:g' \
+ -i Makefile.in || die
+
+ sed \
+ -e 's:-O[2s]\?::g' \
+ -i tcl.m4 || die
+
+ mv configure.{in,ac} || die
+
+ eautoconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # We went ahead and deleted the whole compat/ subdir which means
+ # the configure tests to detect broken versions need to pass (else
+ # we'll fail to build). This comes up when cross-compiling, but
+ # might as well get a minor configure speed up normally.
+ export ac_cv_func_memcmp_working="yes"
+ export tcl_cv_str{str,toul,tod}_unbroken="ok"
+ export tcl_cv_strtod_buggy="no"
+
+ econf \
+ $(use_enable threads) \
+ $(use_enable debug symbols)
+}
+
+multilib_src_install() {
+ #short version number
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ S= default
+ # fix the tclConfig.sh to eliminate refs to the build directory
+ # and drop unnecessary -L inclusion to default system libdir
+
+ sed \
+ -e "/^TCL_BUILD_LIB_SPEC=/s:-L$(pwd) *::g" \
+ -e "/^TCL_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TCL_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tcl${v1}/include:g" \
+ -e "/^TCL_BUILD_STUB_LIB_SPEC=/s:-L$(pwd) *::g" \
+ -e "/^TCL_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TCL_BUILD_STUB_LIB_PATH=/s:$(pwd):${EPREFIX}/usr/${mylibdir}:g" \
+ -e "/^TCL_LIB_FILE=/s:'libtcl${v1}..TCL_DBGX..so':\"libtcl${v1}\$\{TCL_DBGX\}.so\":g" \
+ -i "${ED}"/usr/${mylibdir}/tclConfig.sh || die
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
+ sed \
+ -e "/^TCL_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+ -e "/^TCL_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+ -i "${ED}"/usr/${mylibdir}/tclConfig.sh || die
+ fi
+
+ # install private headers
+ insinto /usr/${mylibdir}/tcl${v1}/include/unix
+ doins *.h
+ insinto /usr/${mylibdir}/tcl${v1}/include/generic
+ doins "${SPARENT}"/generic/*.h
+ rm -f "${ED}"/usr/${mylibdir}/tcl${v1}/include/generic/{tcl,tclDecls,tclPlatDecls}.h || die
+
+ # install symlink for libraries
+ dosym libtcl${v1}$(get_libname) /usr/${mylibdir}/libtcl$(get_libname)
+ dosym libtclstub${v1}.a /usr/${mylibdir}/libtclstub.a
+
+ if multilib_is_native_abi; then
+ dosym tclsh${v1} /usr/bin/tclsh
+ dodoc "${SPARENT}"/{ChangeLog*,README,changes}
+ fi
+}
+
+pkg_postinst() {
+ for version in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 8.6 ${version}; then
+ echo
+ ewarn "You're upgrading from <${P}, you must recompile the other"
+ ewarn "packages on your system that link with tcl after the upgrade"
+ ewarn "completes. To perform this action, please run revdep-rebuild"
+ ewarn "in package app-portage/gentoolkit."
+ ewarn "If you have dev-lang/tk and dev-tcltk/tclx installed you should"
+ ewarn "upgrade them before this recompilation, too,"
+ echo
+ fi
+ done
+}
diff --git a/dev-lang/tcl/tcl-8.6.7.ebuild b/dev-lang/tcl/tcl-8.6.7.ebuild
new file mode 100644
index 000000000000..cb2f7e308894
--- /dev/null
+++ b/dev-lang/tcl/tcl-8.6.7.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+MY_P="${PN}${PV}"
+
+DESCRIPTION="Tool Command Language"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${PN}-core${PV}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0/8.6"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x86-solaris"
+IUSE="debug +threads"
+
+RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ # Bug 125971
+ "${FILESDIR}"/${PN}-8.6.1-conf.patch
+)
+
+src_prepare() {
+ find \
+ "${SPARENT}"/compat/* \
+ "${SPARENT}"/doc/try.n \
+ -delete || die
+
+ pushd "${SPARENT}" &>/dev/null || die
+ default
+ popd &>/dev/null || die
+
+ # workaround stack check issues, bug #280934
+ use hppa && append-cflags "-DTCL_NO_STACK_CHECK=1"
+
+ tc-export CC
+
+ sed \
+ -e '/chmod/s:555:755:g' \
+ -i Makefile.in || die
+
+ sed \
+ -e 's:-O[2s]\?::g' \
+ -i tcl.m4 || die
+
+ mv configure.{in,ac} || die
+
+ eautoconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ # We went ahead and deleted the whole compat/ subdir which means
+ # the configure tests to detect broken versions need to pass (else
+ # we'll fail to build). This comes up when cross-compiling, but
+ # might as well get a minor configure speed up normally.
+ export ac_cv_func_memcmp_working="yes"
+ export tcl_cv_str{str,toul,tod}_unbroken="ok"
+ export tcl_cv_strtod_buggy="no"
+
+ econf \
+ $(use_enable threads) \
+ $(use_enable debug symbols)
+}
+
+multilib_src_install() {
+ #short version number
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ S= default
+ # fix the tclConfig.sh to eliminate refs to the build directory
+ # and drop unnecessary -L inclusion to default system libdir
+
+ sed \
+ -e "/^TCL_BUILD_LIB_SPEC=/s:-L$(pwd) *::g" \
+ -e "/^TCL_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TCL_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tcl${v1}/include:g" \
+ -e "/^TCL_BUILD_STUB_LIB_SPEC=/s:-L$(pwd) *::g" \
+ -e "/^TCL_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TCL_BUILD_STUB_LIB_PATH=/s:$(pwd):${EPREFIX}/usr/${mylibdir}:g" \
+ -e "/^TCL_LIB_FILE=/s:'libtcl${v1}..TCL_DBGX..so':\"libtcl${v1}\$\{TCL_DBGX\}.so\":g" \
+ -i "${ED}"/usr/${mylibdir}/tclConfig.sh || die
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
+ sed \
+ -e "/^TCL_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+ -e "/^TCL_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+ -i "${ED}"/usr/${mylibdir}/tclConfig.sh || die
+ fi
+
+ # install private headers
+ insinto /usr/${mylibdir}/tcl${v1}/include/unix
+ doins *.h
+ insinto /usr/${mylibdir}/tcl${v1}/include/generic
+ doins "${SPARENT}"/generic/*.h
+ rm -f "${ED}"/usr/${mylibdir}/tcl${v1}/include/generic/{tcl,tclDecls,tclPlatDecls}.h || die
+
+ # install symlink for libraries
+ dosym libtcl${v1}$(get_libname) /usr/${mylibdir}/libtcl$(get_libname)
+ dosym libtclstub${v1}.a /usr/${mylibdir}/libtclstub.a
+
+ if multilib_is_native_abi; then
+ dosym tclsh${v1} /usr/bin/tclsh
+ dodoc "${SPARENT}"/{ChangeLog*,README,changes}
+ fi
+}
+
+pkg_postinst() {
+ for version in ${REPLACING_VERSIONS}; do
+ if ! version_is_at_least 8.6 ${version}; then
+ echo
+ ewarn "You're upgrading from <${P}, you must recompile the other"
+ ewarn "packages on your system that link with tcl after the upgrade"
+ ewarn "completes. To perform this action, please run revdep-rebuild"
+ ewarn "in package app-portage/gentoolkit."
+ ewarn "If you have dev-lang/tk and dev-tcltk/tclx installed you should"
+ ewarn "upgrade them before this recompilation, too,"
+ echo
+ fi
+ done
+}
diff --git a/dev-lang/teyjus/Manifest b/dev-lang/teyjus/Manifest
new file mode 100644
index 000000000000..6ee6b896d57e
--- /dev/null
+++ b/dev-lang/teyjus/Manifest
@@ -0,0 +1,9 @@
+AUX 50teyjus-gentoo.el 74 SHA256 d2a70d0637f5ddfd4dbd2ab84ee513b4b90bd92f2f2e58e5e67394588cf0cd8d SHA512 febf91bf3393d91cf1ecdd38b1b9f2e62f7bf8ca8de79e6a006238a82b909d46d7e0e4c92bf8ead39b5142710f548a8829b4e9473340225ecad9fa46b0972f35 WHIRLPOOL d873b1e80ec2ec4b8dede40e782aac4696dc8d3c873f72683d6121160c2cfde8bbac6fc1516bacc3c7e1ad71f32ca2f253634b7c0af6ab8655ec4b4aac47c701
+AUX teyjus-2.0.2-flags.patch 375 SHA256 51cceb47ef18f19824d6a33673d00eee36ecf1ff5f476dbfe7eb2126f4297548 SHA512 9ef27bab05ac1cb0c64ae7141984dcf74e0b7bb9bbc223b78ce649d720ee110416e639bc49b28a12a30fe8a75cae9f346f6a1b8763a14c40a0f7e20125089eb0 WHIRLPOOL 56a16715b3553c8fe0ef3668213a4fba21272860896eb881f58e265be17362a8614ccca6b2d6517328611cd2c4d90ab7d1b1a10962b0149e73328fe092f7df18
+DIST teyjus-2.1.tar.gz 723763 SHA256 c9883a6e5a351dcc0ec5139824953434539e6b730476e171567b878ddee5230d SHA512 1f71d19502f4f4da00f635d2c3d4e141403182d65f039e0d43660edf84c5fcd900e7225ac92dc5bdbe0c8379c4e2ce6e27879af504fcfafddf2695a0c8a13379 WHIRLPOOL c02fba5be6325300c01b9c06878917c62f71aafe822bd26693c2bd8da56f5314b41c65aaf4d045c525434f9453a8bb831bc25629acec96474f2c59988fe6fad3
+DIST teyjus-source-2.0-b2.tar.gz 465815 SHA256 f589fb460d7095a6e674b7a6413772c41b98654c38602c3e8c477a976da99052 SHA512 071a25cd5341f7562f07dcaae1f87c35eb394ddab94a5160826c7fb2d9a51efea909b41947205503ebcc58df04388baf9eaf9f5a614186701940da29db1c1b29 WHIRLPOOL 0dfd8128d194ef5d6cf4fdf6d75c4c654ab834af6c090f595b2defd91645cc0fca4ae4a8483c7a77b4a7e8dae5b3c31069bf85d240538db2f88df69d6f7f42d0
+EBUILD teyjus-2.0.2.ebuild 3027 SHA256 ae9582129cea692ea329100f76a61000f7a0972d6a1b00d4867bab88a72beb13 SHA512 85c11036d4fd3027fbea2136f6b3ac8faad53049bbef75ed2b448ef55e27e8b59bbee2e321b8f374b7de5602a810eeb4b3429fc97a71851a4447e8a4b23b7735 WHIRLPOOL a7f9b9eabbe3cea4e2202d768a2fb3499454650781ee383d45dfd770b910657da4c71b1edf13aed30f8bdd427d09ca3511758330f871a833f916a5f010c3db00
+EBUILD teyjus-2.1.ebuild 2897 SHA256 f696f8e0c4356315c50e7e49d9aa243c894ade0146501199018fba1a7eebc267 SHA512 8f33c998b725169d57808b0a69578a20ffd8f54192a55d8f25761b6a38ea18b9ba96c1d7775447ba17ee245a5f1376476474dbf4e5ac5afd493c530e81f19ea7 WHIRLPOOL 9a2e5d7a1bee5b414f5d095645f27da7df79598c4e97631cc917a801d0522274a76caa321d61cbb202739914523aa8809c9a5fc1ee93722222daa51a5707332b
+MISC ChangeLog 2790 SHA256 06cddbdae566ae0b74e335985c67dccf3d7b30e7f059e2133b65fa0c1c24ed60 SHA512 834d6b79054cc0d6c98874883e0dbf6e0300f9983c766d0d764103e09d70c9dc1f1d286a07add98b4be1914326e61924b62ee7d143cdd3c7da8d8ce8dd33b939 WHIRLPOOL 163b6bb0ab1e8d4a1658826deedf2b5c96f284c31d2a4fa1555ea09479a47a337ef114d8a81d199cdba4c290692ef41cb7e8c9fc09b424e70b88a3b6969b737c
+MISC ChangeLog-2015 818 SHA256 5f023cf560e000662c558ec612826909a14a7ece6761a022b9197bd6c4549a2e SHA512 8c3e8af1ba40fe5fdfbc27ccb70f82f01e33e24fa9fb4379311530d7afcccbfb2f962cec25803ccb662a7c8737dedd73c42646d003a96dafa7db215fec66b92c WHIRLPOOL f6e1de2ba8068dc586c103a2296b06afda02e3b4ace2acae93334346aeb1d6454d9f32b711074a24bf4913bfe0675f269c0930263393a60a98f24317d9a4efe1
+MISC metadata.xml 1653 SHA256 2d3d41d5fdeaa5da9bed50e7750011cf9f2eac25b6b00db0f358c02ea3bfba3f SHA512 5b82a25d9ef5e24c4c9bbd633b7de98f92ce79ae041c3056df6dd0471824c98884d1ef608352431c34aecdaa79736c7f163762206adb9207eeebca2886f5aa1b WHIRLPOOL 84921cf5ba1c7fd42d9f0841f46fcb1a256caff00baac8207bf38f956e9e1fa76ed8e36bf075acb3c3ed28f309a6a4938a20cc6a6cba2abbd2bc21afc5997f04
diff --git a/dev-lang/teyjus/files/50teyjus-gentoo.el b/dev-lang/teyjus/files/50teyjus-gentoo.el
new file mode 100644
index 000000000000..7e05cdec7aec
--- /dev/null
+++ b/dev-lang/teyjus/files/50teyjus-gentoo.el
@@ -0,0 +1,3 @@
+;;; teyjus site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
diff --git a/dev-lang/teyjus/files/teyjus-2.0.2-flags.patch b/dev-lang/teyjus/files/teyjus-2.0.2-flags.patch
new file mode 100644
index 000000000000..dcccd25f9fe4
--- /dev/null
+++ b/dev-lang/teyjus/files/teyjus-2.0.2-flags.patch
@@ -0,0 +1,14 @@
+--- teyjus-orig/source/OMakefile 2008-11-17 07:52:31.000000000 +1100
++++ teyjus/source/OMakefile 2012-12-12 21:24:24.318557107 +1100
+@@ -19,7 +19,10 @@
+ #
+
+ OCAMLINCLUDES += $(CMP) $(DIS) $(SIM) $(LOD)
+-CFLAGS += -g
++CFLAGS +=
++LDFLAGS +=
++OCAMLFLAGS += -g
++OCAML_LINK_FLAGS +=
+
+ ############################################################
+ # Compilation files
diff --git a/dev-lang/teyjus/metadata.xml b/dev-lang/teyjus/metadata.xml
new file mode 100644
index 000000000000..472f7ac2b56a
--- /dev/null
+++ b/dev-lang/teyjus/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>gienah@gentoo.org</email>
+ <name>Mark Wright</name>
+ </maintainer>
+ <longdescription lang="en">
+The Teyjus system is an efficient implementation of the higher-order
+logic programming language Lambda Prolog. The main strength of Lambda
+Prolog, a language developed by Dale Miller and Gopalan Nadathur, is
+the support it offers for what is known as lambda tree syntax, a new
+and effective way to view the structure of complex syntactic objects
+such as types, formulas, proofs and programs. Lambda Prolog provides
+this support by using lambda terms as data representation devices and
+by including primitives for probing such terms in logically meaningful
+ways. The new features present in the language raise several
+implementation challenges that have been addressed in collaborative
+work between Nadathur and his students and colleagues. The name
+"Teyjus" actually stands both for a project and for a class of
+compiler and virtual machine based realizations of Lambda Prolog
+arising from the research carried out within this project. Underlying
+the most recent version of the Teyjus system is a new and
+significantly improved virtual machine that has been designed by
+Xiaochu Qi as part of her doctoral dissertation work at the University
+of Minnesota. This virtual machine extensively exploits a special form
+of higher-order unification known as pattern unification.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">teyjus/teyjus</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/teyjus/teyjus-2.0.2.ebuild b/dev-lang/teyjus/teyjus-2.0.2.ebuild
new file mode 100644
index 000000000000..41a6ffe77a02
--- /dev/null
+++ b/dev-lang/teyjus/teyjus-2.0.2.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit elisp-common multilib versionator
+
+MY_PN="${PN}-source"
+MY_P=$(version_format_string '${MY_PN}-$1.$2-b$3')
+
+DESCRIPTION="Higher-order logic programming language Lambda Prolog"
+HOMEPAGE="http://teyjus.cs.umn.edu/"
+SRC_URI="https://teyjus.googlecode.com/files/${MY_P}.tar.gz"
+
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-3"
+IUSE="emacs examples +ocamlopt"
+
+RDEPEND=">=sys-devel/binutils-2.17:*
+ >=sys-devel/gcc-2.95.3:*
+ >=dev-lang/ocaml-3.10[ocamlopt?]
+ emacs? ( virtual/emacs )"
+DEPEND="${RDEPEND}
+ dev-util/omake"
+
+S=${WORKDIR}/${PN}
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ default
+ eapply "${FILESDIR}/${PN}-2.0.2-flags.patch"
+ local cflags=""
+ for i in ${CFLAGS}
+ do
+ cflags="${cflags} -ccopt ${i}"
+ done
+ local lflags=""
+ for i in ${LDFLAGS}
+ do
+ lflags="${lflags} -cclib ${i}"
+ done
+ sed -e "s@CFLAGS +=@CFLAGS += ${CFLAGS}@" \
+ -e "s@LDFLAGS +=@LDFLAGS += ${LDFLAGS}@" \
+ -e "s@OCAMLFLAGS +=@OCAMLFLAGS +=${cflags}${lflags}@" \
+ -i "${S}/source/OMakefile" \
+ || die "Could not set flags in ${S}/teyjus/source/OMakefile"
+ if has_version ">=dev-lang/ocaml-4.03.0"; then
+ # bug 591368
+ pushd "${S}/source" || die
+ sed -e 's@$(FNT)/ccode_stubs@$(FNT)/ccode_stubs_c@' \
+ -e 's@\(FNT_ML_TO_C\[\] =\)@\1\n $(FNT)/ccode_stubs@' \
+ -i OMakefile || die
+ cd "${S}/source/front" || die
+ mv ccode_stubs.mli ccode_stubs.ml || die
+ mv ccode_stubs.c ccode_stubs_c.c || die
+ popd || die
+ fi
+}
+
+src_compile() {
+ addpredict "/usr/$(get_libdir)/omake/Pervasives.omc"
+ addpredict "/usr/$(get_libdir)/omake/build/C.omc"
+ addpredict "/usr/$(get_libdir)/omake/build/Common.omc"
+ addpredict "/usr/$(get_libdir)/omake/configure/Configure.omc"
+ addpredict "/usr/$(get_libdir)/omake/build/OCaml.omc"
+ omake --verbose all || die "omake all failed"
+ if use emacs ; then
+ pushd "${S}/emacs" || die "Could change directory to emacs"
+ elisp-compile *.el || die "emacs elisp compile failed"
+ popd
+ fi
+}
+
+ins_example_dir() {
+ dodir "/usr/share/${PN}/examples/${1}"
+ insinto "/usr/share/${PN}/examples/${1}"
+ cd "${S}/examples/${1}"
+ doins *
+}
+
+src_install() {
+ newbin source/tjcc.opt tjcc
+ newbin source/tjdepend.opt tjdepend
+ newbin source/tjdis.opt tjdis
+ newbin source/tjlink.opt tjlink
+ newbin source/tjsim.opt tjsim
+ dodoc README
+ if use emacs ; then
+ elisp-install ${PN} emacs/*.{el,elc}
+ cp "${FILESDIR}"/${SITEFILE} "${S}"
+ sed -e 's@/usr/bin/tjcc@'${EPREFIX}/usr/bin/tjcc'@' -i ${SITEFILE} \
+ || die "Could not set tjcc executable path in emacs site file"
+ elisp-site-file-install ${SITEFILE}
+ fi
+ if use examples; then
+ ins_example_dir "handbook/logic"
+ ins_example_dir "handbook/progs"
+ ins_example_dir "misc"
+ ins_example_dir "ndprover"
+ ins_example_dir "pcf"
+ fi
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ ewarn "For teyjus emacs, add this line to ~/.emacs"
+ ewarn ""
+ ewarn "(require 'teyjus)"
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/teyjus/teyjus-2.1.ebuild b/dev-lang/teyjus/teyjus-2.1.ebuild
new file mode 100644
index 000000000000..051d659806b0
--- /dev/null
+++ b/dev-lang/teyjus/teyjus-2.1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit elisp-common multilib versionator
+
+DESCRIPTION="Higher-order logic programming language Lambda Prolog"
+HOMEPAGE="http://teyjus.cs.umn.edu/"
+SRC_URI="https://github.com/teyjus/teyjus/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+LICENSE="GPL-3"
+IUSE="emacs examples +ocamlopt"
+
+RDEPEND=">=sys-devel/binutils-2.17:*
+ >=sys-devel/gcc-2.95.3:*
+ >=dev-lang/ocaml-3.10[ocamlopt?]
+ emacs? ( virtual/emacs )"
+DEPEND="${RDEPEND}
+ dev-util/omake"
+
+SITEFILE=50${PN}-gentoo.el
+
+src_prepare() {
+ default
+ local cflags=""
+ for i in ${CFLAGS}
+ do
+ cflags="${cflags} -ccopt ${i}"
+ done
+ local lflags=""
+ for i in ${LDFLAGS}
+ do
+ lflags="${lflags} -cclib ${i}"
+ done
+ sed -e "s@\(OCAMLFLAGS= -w -A\)@\1 ${cflags}${lflags}@" \
+ -e "s@\(CFLAGS +=\) -g@\1 ${CFLAGS}\nLDFLAGS += ${LDFLAGS}@" \
+ -i "${S}/source/OMakefile" \
+ || die "Could not set flags in ${S}/teyjus/source/OMakefile"
+ if has_version ">=dev-lang/ocaml-4.03.0"; then
+ # bug 591368
+ pushd "${S}/source" || die
+ sed -e 's@$(FNT)/ccode_stubs@$(FNT)/ccode_stubs_c@' \
+ -e 's@\(FNT_ML_TO_C\[\] =\)@\1\n $(FNT)/ccode_stubs@' \
+ -i OMakefile || die
+ cd "${S}/source/front" || die
+ mv ccode_stubs.mli ccode_stubs.ml || die
+ mv ccode_stubs.c ccode_stubs_c.c || die
+ popd || die
+ fi
+}
+
+src_compile() {
+ addpredict "/usr/$(get_libdir)/omake/Pervasives.omc"
+ addpredict "/usr/$(get_libdir)/omake/build/C.omc"
+ addpredict "/usr/$(get_libdir)/omake/build/Common.omc"
+ addpredict "/usr/$(get_libdir)/omake/configure/Configure.omc"
+ addpredict "/usr/$(get_libdir)/omake/build/OCaml.omc"
+ omake --verbose all || die "omake all failed"
+ if use emacs ; then
+ pushd "${S}/emacs" || die "Could change directory to emacs"
+ elisp-compile *.el || die "emacs elisp compile failed"
+ popd
+ fi
+}
+
+ins_example_dir() {
+ dodir "/usr/share/${PN}/examples/${1}"
+ insinto "/usr/share/${PN}/examples/${1}"
+ cd "${S}/examples/${1}"
+ doins *
+}
+
+src_install() {
+ newbin source/tjcc.opt tjcc
+ newbin source/tjdepend.opt tjdepend
+ newbin source/tjdis.opt tjdis
+ newbin source/tjlink.opt tjlink
+ newbin source/tjsim.opt tjsim
+ dodoc README.md QUICKSTART
+ if use emacs ; then
+ elisp-install ${PN} emacs/*.{el,elc}
+ cp "${FILESDIR}"/${SITEFILE} "${S}"
+ sed -e 's@/usr/bin/tjcc@'${EPREFIX}/usr/bin/tjcc'@' -i ${SITEFILE} \
+ || die "Could not set tjcc executable path in emacs site file"
+ elisp-site-file-install ${SITEFILE}
+ fi
+ if use examples; then
+ ins_example_dir "handbook/logic"
+ ins_example_dir "handbook/progs"
+ ins_example_dir "misc"
+ ins_example_dir "ndprover"
+ ins_example_dir "pcf"
+ fi
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ ewarn "For teyjus emacs, add this line to ~/.emacs"
+ ewarn ""
+ ewarn "(require 'teyjus)"
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-lang/tinycobol/Manifest b/dev-lang/tinycobol/Manifest
new file mode 100644
index 000000000000..22fdd686d45e
--- /dev/null
+++ b/dev-lang/tinycobol/Manifest
@@ -0,0 +1,6 @@
+AUX tinycobol-0.65.9.patch 4367 SHA256 a00056fbcd5fe3ef997baa339d17552e263b31844779fe63834b408ef93977a7 SHA512 b2f990abdab590ed1acf41ed0a6ab2816c9217bb0d707cbb9628f3fb44be0cb3f11bc910739ab83051aab23357a83e44fe012c730a1a788665f6355005a9755c WHIRLPOOL a51d69b8f378ad1c530d5e98e5d9a4126d3e66c40a84a5b38b814cddbf359d7c00e062b918a31cd677fe1a8de065f3b0f6dc83665a9a2b531c13a6fddce7a368
+DIST tinycobol-0.65.9.tar.bz2 872989 SHA256 a5e431ae7e08cf0be921da302b3c19910a8066c78202cb21ee5ba5603db806e2 SHA512 4c6ae224ac68017994c78d80f6b452c90076f320a97b9d7b29b83d403f30211f7487f001bf769ca87693a9b9950c11434ba805e4abd85b50ebe75051f74a5394 WHIRLPOOL 40eccb0f0038ff972545bb66940b64b4f8d526a16b3e802f1d2bcb11d80fc3b1345c83fef26841038176723ede65e9e5809c288973764cced113e4c83f129f92
+EBUILD tinycobol-0.65.9.ebuild 988 SHA256 a85e99be00a85c80272a8e80ae2172e80fa0fcf9f39aeaaef2b9a5a37e02bc01 SHA512 e865aa9212ea700cbe765acc32b2621db7e66b04ddf02f4d85e61fa307039ab9a56b554347abdba52764d9c8b410cdd51288c06cdb87047b857ea4df74f413a1 WHIRLPOOL 6a0754e26abf957d7df316a6fcf8867d542e52b3cb2d7847fa1fef1ab72723874f48dbd037aa57a37f5e8b2c14cdf88c862b416615e624089cb6db6dc10a5cef
+MISC ChangeLog 2561 SHA256 d315ec552c11b033610e846215c80a2bff5700141b9b97d07fbc40a2e3b31b0d SHA512 9903c00037c0d5bf325d3f9dbe8f7f47be28c84ec76b5c628c1d7dfe46a8236928db2d05c76f924dbcfb942f132d1fa0ef9218e51e9dd936e427ec077bfed364 WHIRLPOOL a4b0e35f82033980b4478e244344006ad12c547bfd4bdb3a9e616e89f58ddc831908c890754c8e1b2a5a968e634c761bb2bd363dcb45cb4664a0a030778c1a22
+MISC ChangeLog-2015 3591 SHA256 2aad9c69b6af7d844248eafe5b1c23eed7f700876c3fba7c2c6fb319732d4d89 SHA512 7bcb8202326926ce751010944f0ee6ab1029c33176f78b7058cddacd176bb59c89283949875b564166b64d9ff13393f7889ff3c59f6253a5faea32747e66c784 WHIRLPOOL dc73bdbaa3fe484b700b663b61d1deb83e53b8bbda436ef3fd6ff8314d79868d868453da4ec15c3ffaac06e391e84b86d18375576c7dbdd1623abcac0b1fb000
+MISC metadata.xml 247 SHA256 c9478d1f509365d15f27e7672569b87f820da23c8034af89c4585d36738dbf80 SHA512 2649cac2764f9196000ccca028398ee0db1f992d8e2b35a3368a84a5e01f9b9fc95d5a2c8f05d57784e873a3b53b457a7520673353e8999d0d8892315c6385c1 WHIRLPOOL b34dba69e111f8b7dad74c8d13020bd0542f2608df2cb36f2b9cdc25d54d11729395cd6e6a2d3e2342a76e4d24b29b8b3032175a45e7a43e2ebbe5a20ffc8f17
diff --git a/dev-lang/tinycobol/files/tinycobol-0.65.9.patch b/dev-lang/tinycobol/files/tinycobol-0.65.9.patch
new file mode 100644
index 000000000000..4046b0249e1f
--- /dev/null
+++ b/dev-lang/tinycobol/files/tinycobol-0.65.9.patch
@@ -0,0 +1,140 @@
+diff -Nru tinycobol-0.65.9/Makefile.in tinycobol-0.65.9.new/Makefile.in
+--- tinycobol-0.65.9/Makefile.in 2010-01-13 05:42:49.000000000 +0100
++++ tinycobol-0.65.9.new/Makefile.in 2010-01-23 22:46:18.000000000 +0100
+@@ -44,7 +44,7 @@
+ all:
+ @for i in ${subdirs}; do \
+ echo Making all in $$i ; \
+- (cd $$i; ${MAKE} all) ; \
++ (cd $$i; ${MAKE} all) || exit ; \
+ done
+
+ install: all
+Files tinycobol-0.65.9/cobrun/.Makefile.in.swp and tinycobol-0.65.9.new/cobrun/.Makefile.in.swp differ
+diff -Nru tinycobol-0.65.9/cobrun/Makefile.in tinycobol-0.65.9.new/cobrun/Makefile.in
+--- tinycobol-0.65.9/cobrun/Makefile.in 2010-01-13 05:42:49.000000000 +0100
++++ tinycobol-0.65.9.new/cobrun/Makefile.in 2010-01-23 22:40:07.000000000 +0100
+@@ -11,12 +11,12 @@
+ datarootdir = ${prefix}/share
+ pkgdatadir = ${datarootdir}/htcobol
+ #tcob_docdir=@tcob_docdir@
+-tcob_docdir=${prefix}/doc/@tcob_docdir@
++tcob_docdir=${prefix}/share/doc/@tcob_docdir@
+
+ INSTALL=@INSTALL@
+ INSTALL_DATA=@INSTALL_DATA@
+ INSTALL_DIR=$(INSTALL) -d -m 755
+-INSTALL_PROGRAM=$(INSTALL) -s -m 755
++INSTALL_PROGRAM=$(INSTALL) -m 755
+
+ INSTRC=@tcob_default@
+
+@@ -36,7 +36,7 @@
+ LIBS1=@tcob_ld_args_defaults@
+ LIBS2=-L../lib -lhtcobol @tcob_ld_args_defaults@
+ LDFLAGS=@LDFLAGS@
+-CCXFLAGS=${INCLUDES} -Wall
++CCXFLAGS=${CFLAGS} ${INCLUDES} -Wall
+
+ SRC01 = htcobrun.c
+
+diff -Nru tinycobol-0.65.9/compiler/Makefile.in tinycobol-0.65.9.new/compiler/Makefile.in
+--- tinycobol-0.65.9/compiler/Makefile.in 2010-01-13 05:42:49.000000000 +0100
++++ tinycobol-0.65.9.new/compiler/Makefile.in 2010-01-23 22:45:27.000000000 +0100
+@@ -14,12 +14,12 @@
+ datarootdir = ${prefix}/share
+ pkgdatadir = ${datarootdir}/htcobol
+ #tcob_docdir=@tcob_docdir@
+-tcob_docdir=${prefix}/doc/@tcob_docdir@
++tcob_docdir=${prefix}/share/doc/@tcob_docdir@
+
+ INSTALL=@INSTALL@
+ INSTALL_DATA=@INSTALL_DATA@
+ INSTALL_DIR=$(INSTALL) -d -m 755
+-INSTALL_PROGRAM=$(INSTALL) -s -m 755
++INSTALL_PROGRAM=$(INSTALL) -m 755
+
+ RM= rm -f
+ MKDIR=mkdir -p
+@@ -39,7 +39,7 @@
+ # -DDEBUG_COMPILER -DDEBUG_SCANNER
+ #
+ INCLUDES=@INCLUDES@
+-CCXFLAGS=${INCLUDES} @CCXFLAGS@ -Wall
++CCXFLAGS=${INCLUDES} ${CFLAGS} @CCXFLAGS@ -Wall
+ #CCXFLAGS=${INCLUDES} @CCXFLAGS@ -Wall -pedantic -Wno-long-long
+ #CCXFLAGS1=${INCLUDES} @CCXFLAGS@
+ CCXFLAGS1=${INCLUDES}
+@@ -82,14 +82,16 @@
+
+ scanner: htcobol.tab.c scan.c pp_parser.tab.c pp_scanner.c
+
+-scan.c: scan.l
++scan.c: scan.l htcobol.tab.c
+ $(LEX) -o$@ $<
+
+-htcobol.tab.c: htcobol.y scan.c
++htcobol.tab.c: htcobol.y
+ $(YACC) -dv -b htcobol $<
+
+ #htcobgen.o: htcoboly.h htcobol.c
+
++reswords.o: htcobol.tab.c reswords.c
++
+ htcobol.o: htcoboly.h
+ $(CCX) $(CCXFLAGS) -c htcobol.c
+
+diff -Nru tinycobol-0.65.9/info/Makefile.in tinycobol-0.65.9.new/info/Makefile.in
+--- tinycobol-0.65.9/info/Makefile.in 2010-01-13 05:42:49.000000000 +0100
++++ tinycobol-0.65.9.new/info/Makefile.in 2010-01-23 22:42:59.000000000 +0100
+@@ -16,15 +16,15 @@
+ #datadir = ${datarootdir}
+ datarootdir = ${prefix}/share
+ pkgdatadir = ${datarootdir}/htcobol
+-mandir = $(prefix)/man/man1
++mandir = $(prefix)/share/man/man1
+
+ #tcob_docdir=@tcob_docdir@
+-tcob_docdir=${prefix}/doc/@tcob_docdir@
++tcob_docdir=${prefix}/share/doc/@tcob_docdir@
+
+ INSTALL=@INSTALL@
+ INSTALL_DATA=@INSTALL_DATA@
+ INSTALL_DIR=$(INSTALL) -d -m 755
+-INSTALL_PROGRAM=$(INSTALL) -s -m 755
++INSTALL_PROGRAM=$(INSTALL) -m 755
+
+ #mandir=@mandir@
+ #docdir=@docdir@
+diff -Nru tinycobol-0.65.9/lib/Makefile.in tinycobol-0.65.9.new/lib/Makefile.in
+--- tinycobol-0.65.9/lib/Makefile.in 2010-01-13 05:42:49.000000000 +0100
++++ tinycobol-0.65.9.new/lib/Makefile.in 2010-01-23 22:44:03.000000000 +0100
+@@ -9,7 +9,7 @@
+ datarootdir = ${prefix}/share
+ pkgdatadir = ${datarootdir}/htcobol
+ #tcob_docdir=@tcob_docdir@
+-tcob_docdir=${prefix}/doc/@tcob_docdir@
++tcob_docdir=${prefix}/share/doc/@tcob_docdir@
+ lib_dir=${exec_prefix}/lib
+
+ INSTRC=@tcob_default@
+@@ -19,7 +19,7 @@
+ INSTALL=@INSTALL@
+ INSTALL_DATA=@INSTALL_DATA@
+ INSTALL_DIR=$(INSTALL) -d -m 755
+-INSTALL_PROGRAM=$(INSTALL) -s -m 755
++INSTALL_PROGRAM=$(INSTALL) -m 755
+
+ RANLIB=@RANLIB@
+ AR=@AR@
+@@ -37,8 +37,8 @@
+ INCLUDES=@INCLUDES@
+ LIBS=@tcob_ld_args_defaults@
+ LDFLAGS=@LDFLAGS@
+-CCXFLAGS=${INCLUDES} @CCXFLAGS@ -Wall
+-CCXFLAGS1=${INCLUDES} @CCXFLAGS@ -Wall -fPIC -DPIC
++CCXFLAGS=${INCLUDES} ${CFLAGS} @CCXFLAGS@ -Wall
++CCXFLAGS1=${INCLUDES} ${CFLAGS} @CCXFLAGS@ -Wall -fPIC -DPIC
+ ACXFLAGS=@ACXFLAGS@
+
+ #
diff --git a/dev-lang/tinycobol/metadata.xml b/dev-lang/tinycobol/metadata.xml
new file mode 100644
index 000000000000..929c96f25579
--- /dev/null
+++ b/dev-lang/tinycobol/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-needed -->
+ <upstream>
+ <remote-id type="sourceforge">tiny-cobol</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/tinycobol/tinycobol-0.65.9.ebuild b/dev-lang/tinycobol/tinycobol-0.65.9.ebuild
new file mode 100644
index 000000000000..4dfaef5a718e
--- /dev/null
+++ b/dev-lang/tinycobol/tinycobol-0.65.9.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+
+DESCRIPTION="COBOL for linux"
+HOMEPAGE="http://tiny-cobol.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tiny-cobol/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="ppc x86"
+
+RDEPEND=">=dev-libs/glib-2.0
+ sys-libs/db
+ dev-db/vbisam"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}.patch"
+}
+
+src_compile() {
+ econf || die
+ emake CC="$(tc-getCC)" || die "make failed"
+}
+
+src_install() {
+ dodir /usr/bin
+ dodir /usr/share/man/man1
+ dodir /usr/lib
+ dodir /usr/share/htcobol
+ dodir /usr/share/doc
+ emake DESTDIR="${D}" cobdir_docdir="/usr/share/doc/htcobol-${PV}" \
+ pkgdatadir="/usr/share/htcobol/" install
+ cd lib
+ emake DESTDIR="${D}" pkgdatadir="/usr/share/htcobol/" install \
+ install-shared-libs install-static-libs
+ rm -rf "${D}/usr/man" # empty dir, see bug #315401
+}
diff --git a/dev-lang/tk/Manifest b/dev-lang/tk/Manifest
new file mode 100644
index 000000000000..621c945e629a
--- /dev/null
+++ b/dev-lang/tk/Manifest
@@ -0,0 +1,18 @@
+AUX tk-8.4.15-aqua.patch 303 SHA256 9b3a30bc189b6256803d47857f5da6afc816c4938f9d9493da8336843de28d6d SHA512 3bacde8a286c901781862fffdec2891da6a199dff80ff74d68e0a508be3a75e7230c81577af58b75b14a7ba5546db907ac476ef1168d12357113ba5c6d7a01ba WHIRLPOOL 3119897021c5ba88ec1b89adc0b11da94d4a469672605abbc51d2bb422f51ae5158065941e2250c33e9385afed678cc415f1f064da89bf62f2859cd55aa2b6e5
+AUX tk-8.5.11-fedora-xft.patch 681 SHA256 8f98eae5de3f97b2f6d168bb98e2efc500c2e99d93d64c28fd70cec3b499a1b1 SHA512 14564e0d761187895a34d16f9f618514af76cac2ad51969d9eff4fafba44ad376c6adc0e27238c09ca708102d745a2965f7d2dc3c2f35acf4973199f0f9b40ef WHIRLPOOL 35bb1e9956514195a93ae117a784363dc9712e5bea7e6942f38d53573fedfc7d1a7dc008381e899182c7b14f14b3c74e336aba8014a1a9baec28559f5c43650b
+AUX tk-8.5.13-multilib.patch 453 SHA256 66b2006a93c1ae13bb1ff9c3f21297b2bfe48a1593c29661d41bd606b1443bfb SHA512 3fccbdea43b13977e04026f9db5a11c2be7d19062a9a008a09ece8e78f78983f79c1ea023562decd1e0a4fc0184045f2ea78da466bb9682f8a9bd214f5c2f4b1 WHIRLPOOL 11b76947b228aca61bbe06de29007251a2377184af4086f987019c92138d88a34e52ced02c3d41aa296cd406ac91f082d3502d993a3d015f46028af406c88416
+AUX tk-8.5.14-conf.patch 569 SHA256 25281a376faebdd61c74d550a9860bdc475e649469a6a8862e5b796b17beb539 SHA512 31b53c31253df219d860fc9d067c53379bca571e799a2064e33fb1d9c3f228a001654438eeb5bad5315a6589e7b46f902d87cd54a52d4ed68c0d1d08f24ad544 WHIRLPOOL 5b1929d902bbe5b7d0754700aa5af52ee429ce7a414ec69f711978ba301aacedacbfbb6a3b9e07f7af57774382db0fcf8b0c57fd2b196aa23545c8f4ce7cb81f
+DIST tcl8.5.17-src.tar.gz 4546317 SHA256 4c7cd8f2e0900cb36dde899b3f9f4d5c471ee3c4f8304cf9ec71fd18cd5e98d6 SHA512 ad5ddb4cd6378fd6bbea8cd85ceb1cf90392b2e8c49fbfb3e4b35c81d3ae3e3f087697c41fcba8c8e06de1d9e7539397e26d58b864dc01ba65abe4ba4efa9568 WHIRLPOOL 7e97049eb3875bcdc33b2d8ab02b0932173916fbbdfbc7970dd3c3ed1fe520c15ed1d6106215a823b5fc6f5008f12f3ccd1525dd536ec239388e6bf459352ab6
+DIST tk8.5.17-src.tar.gz 4095985 SHA256 b517914d076fba047c4bbc02f7dd7f0b0b06d1931826ae440129162d8bba92d3 SHA512 ddadc738c2567e35d1257b59212c8a0eb70a1bf041d986bc6df3b841b51d934d79a0ef389c928223a64516a92cae3357b2c789edca9c8a626ff4c1cf320c4f4f WHIRLPOOL 431ad2d190755b997b07c8a59046c7f15a7be39cb8b162daccae8eca4c4b6e97a52d5823e7e566380935abefad347d18a28fc3a7e78892b6186ebcefce726fd3
+DIST tk8.6.5-src.tar.gz 4417393 SHA256 fbbd93541b4cd467841208643b4014c4543a54c3597586727f0ab128220d7946 SHA512 9acf2ef993a566a7cdd1efe21dc896b09125c65d86df53ab5a78542b21d3f031e9f9d72b81738705636c268b5ce72934c483eb087d5c0114f913c9075db9a3b1 WHIRLPOOL 8f0e789d05f05778f0f383a6cbabd6e2225401ab0ce68bd408ab747408b7f83e4f47ef7041ee23231dbfd5dafa74d8f498922104b3e38283dcf1ab83e7cb2dfd
+DIST tk8.6.6-src.tar.gz 4273737 SHA256 d62c371a71b4744ed830e3c21d27968c31dba74dd2c45f36b9b071e6d88eb19d SHA512 223c72ab5a6f6040928c56843598b878efafab44ed4152a38e68aa2800f2c181adc50a8bf23279b7d446493eec43854920e8b649b6a34ecdf31ecc07ccc74044 WHIRLPOOL 65b8395fdefad62ff6d9323fa7857fadad49867e34e3f641909c2e71d883f34f7b1491f9b3abbaf66409bc195bebda8f1e8caee5f002e4e25026fcc8315cd9d6
+DIST tk8.6.7-src.tar.gz 4282972 SHA256 061de2a354f9b7c7d04de3984c90c9bc6dd3a1b8377bb45509f1ad8a8d6337aa SHA512 adf35991b20878d18a6940cb3d24d821586828537edf6d20f9223f2989d317adbcbb5360f3226014d96fe44e7ec06cfdf434309438c90a09878345b7106c7dd9 WHIRLPOOL 912f530f37813d016cedfbda79ae05fb329e67263f26825a3912965c7579fbe5882ec3311589819489a3d6716f658732540419cac10843d4db46ca4c3f193aa1
+EBUILD tk-8.5.17-r100.ebuild 2159 SHA256 6bc1798cbcd8260dacc0692b5842eae5dbdb41a38a622b8c774509529731f9c7 SHA512 a1d379530b776345d992d465c6fb18cf91bf791e5f3d91f1dffd2c230f9ba1eba3874b04713c539c88e61584c4339ecbf37a7274a7c76294bc8396bba340563a WHIRLPOOL b5645d97f84acf866a4da207270b36444e228571aa6de75d4d7bce8a7ca5ff67b3a65f7c749acda5cd3598a77292535da17ca4e4b0ed3cdaf89bf88708873acc
+EBUILD tk-8.5.17.ebuild 3503 SHA256 2b8f4793b2fcf26c8c187a95dbe3a3b632b3409563bebff4cd0b332da85d9559 SHA512 0a7ffa7243af2c8174625dc1fbc4b727f5383d6e72353e0a9b7098f33bd21e7c4592e551a23227471d2ff497a979d6e4236cceb45c5b883bcdfc2fa3eed87512 WHIRLPOOL 3db37561832ed0282c1939de971907ad032534bba497f77394007e14077dce09aabbb436360cc901daaeada84adca9ae8516e49bc7cd217b7b9028fb24092ddf
+EBUILD tk-8.6.5-r1.ebuild 4124 SHA256 7b31adbb2fcf5ef35029b59a9ab1042e1cf498ebc567df154b3152c47ee96b41 SHA512 a5984c8534e38cfc9c1a00186f926c8b814ff7bec50ea067671796099bcebba71b54eaa55ebcfdd5f8649aca9a8755727225bc6dc312dd6df45e8410c9cb52af WHIRLPOOL 5c251a14660153bcc881c178b87e6053491b5af971e6d82a109ecb14cbacb778555b83fcc08630adcd68b311bc4ab2df6b9b5ad9a9f18f36e1bc61bcd79db902
+EBUILD tk-8.6.5.ebuild 4025 SHA256 ba8ebbd684070b842945895a6cb3e0f6f95d22b15b0998e34de50af50d01ed23 SHA512 a22886ba707ab890aedd75593db3630f81c66b77083dd2d1bc7815d5a0d56891525464c6af56345e8b976d14ebefd6716a7a98eacfb130cab3a34657c1406461 WHIRLPOOL 5c61c411e77b1f07df5a7849dcc1f8f24f1e44ecd220e47be038f6b60638619783e5a7a854859146da8286777070b59fab5b0e2bcc2b6fb544b68041e1f23f02
+EBUILD tk-8.6.6.ebuild 4122 SHA256 6b9de012d158a5ac9274b238e587904d89f75ca169f9697350eff7a904573ace SHA512 467771543877c3d4abf029014d3b4c30d3f9415f195bdbfe06a57247bb560f35701f80888c8fe850f3bbf373e7892f746922d301abdf91c0215027bae66de78b WHIRLPOOL f9f1aca57e233525e229ba38d18ba4be45dfb043547963ee5a80ff9a1afd0a3eef62270491cd72c8466ceebebd54ee59dd3254c6ea9ccf48eaa123808d261a78
+EBUILD tk-8.6.7.ebuild 4131 SHA256 87cf3550060b48963466ea00e1c399ce292e100c945de742b7d3b75e681d9109 SHA512 97bed391380a7c0a2ffc56d2c042b37f7b025a0636f57c942c9f4ac27fa7bab2a2f7335e8b8f920f3f46fde40f265fb3ebd94dc844a7c81b5fd240ed0cf43ac5 WHIRLPOOL a95c970851c55ba2af8991fbd5ea41cd38cc6d9e962c8d0d5b4bfc932f83cd520627e9e5947866de57279b586781baaa91a48b4b483b4804cc524005aa080fe9
+MISC ChangeLog 4377 SHA256 0815dadedc291cd955d9544093bd3c8e64805a2b1fde5f53eff83ba26d7a5e69 SHA512 1627935aafdf21e47f8fe53937c2bd22ec7f2a9cfdab7ce83746ea91ef4a510e971f331937057dd593d91dd78e7b4fbb5cd7dbef022e72dca6b5ea3d422ad102 WHIRLPOOL 12b78f5e8331674ecfd101c096bed88a97635ad80fc41f411aeb595e1aea57ea488fa70240021700dcc780ccba49f74cff69bb4d24dc0af3bc0885408046cecc
+MISC ChangeLog-2015 29987 SHA256 2a888a2dc75726baa3435d6accfc64c5cde991df20eb46546aa84bbcbe3b0653 SHA512 7681cd8c20aa9e9f4827946797699b20fe0ecd585e206eccffc2f19e8613924c5a753098490c9a22e82d76daff3ce711217355b8c27e4f21f73b47bdf344181c WHIRLPOOL 721cba1419d4a9db3ea5ae5fab3e0361a5a076aa02c80234dc2b8739b9b8d8d9c77317a54e910d2191b63b01d517b9c1b152a0f510bccaf1b16fb3c7d7af79e6
+MISC metadata.xml 326 SHA256 06b47a6bce70778ed4faa71031de53c1ae7d5a7b23cb3f080391a5d82d791b1e SHA512 0a3bc9dd4103f252027e5df1f1bec25c54b8e595c3161cf2e2e3dc083d9613c1cf7f810bae2eea1e4687d87195091d84c16ceac683d7bb508bd38ad565b5ba7d WHIRLPOOL 82bdd8d51cf35e10e4c573955788193f1ec3e2c038e2163544d34361d88d4c99638f70bc417f6918cd13363b7ab3804b718c930e3c3453cfd2c55fc0aae311e5
diff --git a/dev-lang/tk/files/tk-8.4.15-aqua.patch b/dev-lang/tk/files/tk-8.4.15-aqua.patch
new file mode 100644
index 000000000000..39c23168377e
--- /dev/null
+++ b/dev-lang/tk/files/tk-8.4.15-aqua.patch
@@ -0,0 +1,11 @@
+--- a/unix/Makefile.in
++++ b/unix/Makefile.in
+@@ -468,7 +468,7 @@
+
+ AQUA_HDRS = $(MAC_OSX_DIR)/tkMacOSX.h $(GENERIC_DIR)/tkIntXlibDecls.h
+
+-AQUA_XLIB_HDRS = $(XLIB_DIR)/X11/*.h $(XLIB_DIR)/xbytes.h
++AQUA_XLIB_HDRS =
+
+ AQUA_PRIVATE_HDRS = $(MAC_OSX_DIR)/tkMacOSXPort.h $(MAC_OSX_DIR)/tkMacOSXInt.h
+
diff --git a/dev-lang/tk/files/tk-8.5.11-fedora-xft.patch b/dev-lang/tk/files/tk-8.5.11-fedora-xft.patch
new file mode 100644
index 000000000000..67640db085f1
--- /dev/null
+++ b/dev-lang/tk/files/tk-8.5.11-fedora-xft.patch
@@ -0,0 +1,13 @@
+--- tk8.5.9/unix/configure.in.old 2010-09-02 20:12:14.000000000 +0200
++++ tk8.5.9/unix/configure.in 2011-02-17 13:32:22.719116636 +0100
+@@ -530,8 +530,8 @@
+ XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no"
+ if test "$found_xft" = "no" ; then
+ found_xft=yes
+- XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || found_xft="no"
+- XFT_LIBS=`pkg-config --libs xft 2>/dev/null` || found_xft="no"
++ XFT_CFLAGS=`pkg-config --cflags xft freetype2 2>/dev/null` || found_xft="no"
++ XFT_LIBS=`pkg-config --libs xft freetype2 2>/dev/null` || found_xft="no"
+ fi
+ AC_MSG_RESULT([$found_xft])
+ dnl make sure that compiling against Xft header file doesn't bomb
diff --git a/dev-lang/tk/files/tk-8.5.13-multilib.patch b/dev-lang/tk/files/tk-8.5.13-multilib.patch
new file mode 100644
index 000000000000..db3d8cc00817
--- /dev/null
+++ b/dev-lang/tk/files/tk-8.5.13-multilib.patch
@@ -0,0 +1,12 @@
+diff -Naur tk8.4.11.orig/unix/configure.in tk8.4.11/unix/configure.in
+--- tk8.4.11.orig/unix/configure.in 2005-06-30 01:43:10.000000000 +0900
++++ tk8.4.11/unix/configure.in 2005-07-02 23:22:16.000000000 +0900
+@@ -393,7 +393,7 @@
+ TCL_STUB_FLAGS="-DUSE_TCL_STUBS"
+ fi
+
+-TK_LIBRARY='$(prefix)/lib/tk$(VERSION)'
++TK_LIBRARY='$(libdir)/tk$(VERSION)'
+ PRIVATE_INCLUDE_DIR='$(includedir)'
+ HTML_DIR='$(DISTDIR)/html'
+ TK_PKG_DIR='tk$(VERSION)$(TK_DBGX)'
diff --git a/dev-lang/tk/files/tk-8.5.14-conf.patch b/dev-lang/tk/files/tk-8.5.14-conf.patch
new file mode 100644
index 000000000000..553f93f9b7dc
--- /dev/null
+++ b/dev-lang/tk/files/tk-8.5.14-conf.patch
@@ -0,0 +1,16 @@
+ unix/tcl.m4 | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/unix/tcl.m4 b/unix/tcl.m4
+index 3974753..9c36eb5 100644
+--- a/unix/tcl.m4
++++ b/unix/tcl.m4
+@@ -1420,7 +1420,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
+ # get rid of the warnings.
+ #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+
+- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
++ SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS} -Wl,-soname,${@}'
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
diff --git a/dev-lang/tk/metadata.xml b/dev-lang/tk/metadata.xml
new file mode 100644
index 000000000000..ec2fb390faa4
--- /dev/null
+++ b/dev-lang/tk/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>tcltk@gentoo.org</email>
+ <name>Gentoo Tcltk Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tcl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/tk/tk-8.5.17-r100.ebuild b/dev-lang/tk/tk-8.5.17-r100.ebuild
new file mode 100644
index 000000000000..74b8c11c8361
--- /dev/null
+++ b/dev-lang/tk/tk-8.5.17-r100.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib prefix toolchain-funcs versionator virtualx
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tk Widget Set"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="
+ mirror://sourceforge/tcl/${MY_P}-src.tar.gz
+ mirror://sourceforge/tcl/${MY_P//tk/tcl}-src.tar.gz
+ "
+
+LICENSE="tcltk"
+SLOT="8.5"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug threads truetype aqua xscreensaver"
+
+RDEPEND="
+ !aqua? (
+ media-libs/fontconfig
+ media-libs/freetype:2
+ x11-libs/libX11
+ x11-libs/libXt
+ truetype? ( x11-libs/libXft )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ )
+ ~dev-lang/tcl-${PV}:8.5=
+ !=dev-lang/tk-8.5:0"
+DEPEND="${RDEPEND}
+ !aqua? ( x11-proto/xproto )"
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+DOCS=()
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-8.5.11-fedora-xft.patch \
+ "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ epatch "${FILESDIR}"/${PN}-8.4.15-aqua.patch
+ eprefixify Makefile.in
+
+ # Bug 125971
+ epatch "${FILESDIR}"/${PN}-8.5.14-conf.patch
+
+ # Make sure we use the right pkg-config, and link against fontconfig
+ # (since the code base uses Fc* functions).
+ sed \
+ -e 's/FT_New_Face/XftFontOpen/g' \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ -e 's:xft freetype2:xft freetype2 fontconfig:' \
+ -i configure.in || die
+ rm -f configure || die
+
+ append-cppflags \
+ -I"${WORKDIR}/${MY_P//tk/tcl}/generic" \
+ -I"${WORKDIR}/${MY_P//tk/tcl}/unix"
+
+ sed \
+ -e '/chmod/s:555:755:g' \
+ -i Makefile.in || die
+
+ tc-export CC
+
+ eautoconf
+}
+
+src_configure() {
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ econf \
+ --with-tcl="${EPREFIX}/usr/${mylibdir}/tcl${v1}" \
+ $(use_enable threads) \
+ $(use_enable aqua) \
+ $(use_enable truetype xft) \
+ $(use_enable xscreensaver xss) \
+ $(use_enable debug symbols)
+}
+
+src_test() {
+ Xemake test
+}
+
+src_install() {
+ dolib.so libtk8.5.so
+}
diff --git a/dev-lang/tk/tk-8.5.17.ebuild b/dev-lang/tk/tk-8.5.17.ebuild
new file mode 100644
index 000000000000..c02680975894
--- /dev/null
+++ b/dev-lang/tk/tk-8.5.17.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils multilib prefix toolchain-funcs versionator virtualx
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tk Widget Set"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0/8.5"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug threads truetype aqua xscreensaver"
+
+RDEPEND="
+ !aqua? (
+ media-libs/fontconfig
+ media-libs/freetype:2
+ x11-libs/libX11
+ x11-libs/libXt
+ truetype? ( x11-libs/libXft )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ )
+ ~dev-lang/tcl-${PV}:0="
+DEPEND="${RDEPEND}
+ !aqua? ( x11-proto/xproto )"
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-8.5.11-fedora-xft.patch \
+ "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ epatch "${FILESDIR}"/${PN}-8.4.15-aqua.patch
+ eprefixify Makefile.in
+
+ # Bug 125971
+ epatch "${FILESDIR}"/${PN}-8.5.14-conf.patch
+
+ # Make sure we use the right pkg-config, and link against fontconfig
+ # (since the code base uses Fc* functions).
+ sed \
+ -e 's/FT_New_Face/XftFontOpen/g' \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ -e 's:xft freetype2:xft freetype2 fontconfig:' \
+ -i configure.in || die
+ rm -f configure || die
+
+ sed \
+ -e '/chmod/s:555:755:g' \
+ -i Makefile.in || die
+
+ tc-export CC
+
+ eautoconf
+}
+
+src_configure() {
+ local mylibdir=$(get_libdir)
+
+ econf \
+ --with-tcl="${EPREFIX}/usr/${mylibdir}" \
+ $(use_enable threads) \
+ $(use_enable aqua) \
+ $(use_enable truetype xft) \
+ $(use_enable xscreensaver xss) \
+ $(use_enable debug symbols)
+}
+
+src_test() {
+ Xemake test
+}
+
+src_install() {
+ #short version number
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ S= default
+
+ # normalize $S path, bug #280766 (pkgcore)
+ local nS="$(cd "${S}"; pwd)"
+
+ # fix the tkConfig.sh to eliminate refs to the build directory
+ # and drop unnecessary -L inclusion to default system libdir
+
+ sed \
+ -e "/^TK_BUILD_LIB_SPEC=/s:-L${SPARENT}.*unix *::g" \
+ -e "/^TK_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tk${v1}/include:g" \
+ -e "/^TK_BUILD_STUB_LIB_SPEC=/s:-L${SPARENT}.*unix *::g" \
+ -e "/^TK_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_BUILD_STUB_LIB_PATH=/s:${SPARENT}.*unix:${EPREFIX}/usr/${mylibdir}:g" \
+ -e "/^TK_LIB_FILE=/s:'libtk${v1}..TK_DBGX..so':\"libk${v1}\$\{TK_DBGX\}.so\":g" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
+ sed \
+ -e "/^TK_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+ -e "/^TK_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ fi
+
+ # install private headers
+ insinto /usr/${mylibdir}/tk${v1}/include/unix
+ doins "${S}"/*.h
+ insinto /usr/${mylibdir}/tk${v1}/include/generic
+ doins "${SPARENT}"/generic/*.h
+ rm -f "${ED}"/usr/${mylibdir}/tk${v1}/include/generic/{tk,tkDecls,tkPlatDecls}.h || die
+
+ # install symlink for libraries
+ dosym libtk${v1}$(get_libname) /usr/${mylibdir}/libtk$(get_libname)
+ dosym libtkstub${v1}.a /usr/${mylibdir}/libtkstub.a
+
+ dosym wish${v1} /usr/bin/wish
+
+ dodoc "${SPARENT}"/{ChangeLog*,README,changes}
+}
diff --git a/dev-lang/tk/tk-8.6.5-r1.ebuild b/dev-lang/tk/tk-8.6.5-r1.ebuild
new file mode 100644
index 000000000000..58f59da86c2f
--- /dev/null
+++ b/dev-lang/tk/tk-8.6.5-r1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils multilib multilib-minimal prefix toolchain-funcs versionator virtualx
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tk Widget Set"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0/8.6"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug +threads truetype aqua xscreensaver"
+
+RDEPEND="
+ !aqua? (
+ >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
+ truetype? ( >=x11-libs/libXft-2.3.1-r1[${MULTILIB_USEDEP}] )
+ xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[${MULTILIB_USEDEP}] )
+ )
+ ~dev-lang/tcl-${PV}:0=[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ !aqua? ( >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}] )"
+
+# Not bumped to 8.6
+#RESTRICT=test
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.5.11-fedora-xft.patch \
+ "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ "${FILESDIR}"/${PN}-8.4.15-aqua.patch
+
+ # Bug 125971
+ "${FILESDIR}"/${PN}-8.5.14-conf.patch
+)
+
+src_prepare() {
+ find \
+ "${SPARENT}"/compat/* \
+ -delete || die
+
+ pushd "${SPARENT}" &>/dev/null || die
+ default
+ popd &>/dev/null || die
+ eprefixify Makefile.in
+
+ # Make sure we use the right pkg-config, and link against fontconfig
+ # (since the code base uses Fc* functions).
+ sed \
+ -e 's/FT_New_Face/XftFontOpen/g' \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ -e 's:xft freetype2:xft freetype2 fontconfig:' \
+ -i configure.in || die
+ rm configure || die
+
+ tc-export CC
+
+ sed \
+ -e '/chmod/s:555:755:g' \
+ -i Makefile.in || die
+
+ sed \
+ -e 's:-O[2s]\?::g' \
+ -i tcl.m4 || die
+
+ mv configure.{in,ac} || die
+
+ eautoconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ if tc-is-cross-compiler ; then
+ export ac_cv_func_strtod=yes
+ export tcl_cv_strtod_buggy=1
+ fi
+
+ local mylibdir=$(get_libdir)
+
+ econf \
+ --with-tcl="${EPREFIX}/usr/${mylibdir}" \
+ $(use_enable threads) \
+ $(use_enable aqua) \
+ $(use_enable truetype xft) \
+ $(use_enable xscreensaver xss) \
+ $(use_enable debug symbols)
+}
+
+multilib_src_test() {
+ virtx emake test
+}
+
+multilib_src_install() {
+ #short version number
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ S= default
+
+ # normalize $S path, bug #280766 (pkgcore)
+ local nS="$(cd "${S}"; pwd)"
+
+ # fix the tkConfig.sh to eliminate refs to the build directory
+ # and drop unnecessary -L inclusion to default system libdir
+
+ sed \
+ -e "/^TK_BUILD_LIB_SPEC=/s:-L${S}-\w*\.\w* ::g" \
+ -e "/^TK_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tk${v1}/include:g" \
+ -e "/^TK_BUILD_STUB_LIB_SPEC=/s:-L${S}-\w*\.\w* *::g" \
+ -e "/^TK_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_BUILD_STUB_LIB_PATH=/s:${S}-\w*\.\w*:${EPREFIX}/usr/${mylibdir}:g" \
+ -e "/^TK_LIB_FILE=/s:'libtk${v1}..TK_DBGX..so':\"libk${v1}\$\{TK_DBGX\}.so\":g" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
+ sed \
+ -e "/^TK_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+ -e "/^TK_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ fi
+
+ # install private headers
+ insinto /usr/${mylibdir}/tk${v1}/include/unix
+ doins "${S}"/*.h
+ insinto /usr/${mylibdir}/tk${v1}/include/generic
+ doins "${SPARENT}"/generic/*.h
+ rm -f "${ED}"/usr/${mylibdir}/tk${v1}/include/generic/{tk,tkDecls,tkPlatDecls}.h || die
+
+ # install symlink for libraries
+ dosym libtk${v1}$(get_libname) /usr/${mylibdir}/libtk$(get_libname)
+ dosym libtkstub${v1}.a /usr/${mylibdir}/libtkstub.a
+
+ if multilib_is_native_abi; then
+ dosym wish${v1} /usr/bin/wish
+ dodoc "${SPARENT}"/{ChangeLog*,README,changes}
+ fi
+}
diff --git a/dev-lang/tk/tk-8.6.5.ebuild b/dev-lang/tk/tk-8.6.5.ebuild
new file mode 100644
index 000000000000..6364158a803e
--- /dev/null
+++ b/dev-lang/tk/tk-8.6.5.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils multilib multilib-minimal prefix toolchain-funcs versionator virtualx
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tk Widget Set"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0/8.6"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug +threads truetype aqua xscreensaver"
+
+RDEPEND="
+ !aqua? (
+ >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
+ truetype? ( >=x11-libs/libXft-2.3.1-r1[${MULTILIB_USEDEP}] )
+ xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[${MULTILIB_USEDEP}] )
+ )
+ ~dev-lang/tcl-${PV}:0=[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ !aqua? ( >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}] )"
+
+# Not bumped to 8.6
+#RESTRICT=test
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.5.11-fedora-xft.patch \
+ "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ "${FILESDIR}"/${PN}-8.4.15-aqua.patch
+
+ # Bug 125971
+ "${FILESDIR}"/${PN}-8.5.14-conf.patch
+)
+
+src_prepare() {
+ find \
+ "${SPARENT}"/compat/* \
+ -delete || die
+
+ pushd "${SPARENT}" &>/dev/null || die
+ default
+ popd &>/dev/null || die
+ eprefixify Makefile.in
+
+ # Make sure we use the right pkg-config, and link against fontconfig
+ # (since the code base uses Fc* functions).
+ sed \
+ -e 's/FT_New_Face/XftFontOpen/g' \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ -e 's:xft freetype2:xft freetype2 fontconfig:' \
+ -i configure.in || die
+ rm configure || die
+
+ tc-export CC
+
+ sed \
+ -e '/chmod/s:555:755:g' \
+ -i Makefile.in || die
+
+ sed \
+ -e 's:-O[2s]\?::g' \
+ -i tcl.m4 || die
+
+ mv configure.{in,ac} || die
+
+ eautoconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local mylibdir=$(get_libdir)
+
+ econf \
+ --with-tcl="${EPREFIX}/usr/${mylibdir}" \
+ $(use_enable threads) \
+ $(use_enable aqua) \
+ $(use_enable truetype xft) \
+ $(use_enable xscreensaver xss) \
+ $(use_enable debug symbols)
+}
+
+multilib_src_test() {
+ virtx emake test
+}
+
+multilib_src_install() {
+ #short version number
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ S= default
+
+ # normalize $S path, bug #280766 (pkgcore)
+ local nS="$(cd "${S}"; pwd)"
+
+ # fix the tkConfig.sh to eliminate refs to the build directory
+ # and drop unnecessary -L inclusion to default system libdir
+
+ sed \
+ -e "/^TK_BUILD_LIB_SPEC=/s:-L${S}-\w*\.\w* ::g" \
+ -e "/^TK_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tk${v1}/include:g" \
+ -e "/^TK_BUILD_STUB_LIB_SPEC=/s:-L${S}-\w*\.\w* *::g" \
+ -e "/^TK_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_BUILD_STUB_LIB_PATH=/s:${S}-\w*\.\w*:${EPREFIX}/usr/${mylibdir}:g" \
+ -e "/^TK_LIB_FILE=/s:'libtk${v1}..TK_DBGX..so':\"libk${v1}\$\{TK_DBGX\}.so\":g" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
+ sed \
+ -e "/^TK_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+ -e "/^TK_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ fi
+
+ # install private headers
+ insinto /usr/${mylibdir}/tk${v1}/include/unix
+ doins "${S}"/*.h
+ insinto /usr/${mylibdir}/tk${v1}/include/generic
+ doins "${SPARENT}"/generic/*.h
+ rm -f "${ED}"/usr/${mylibdir}/tk${v1}/include/generic/{tk,tkDecls,tkPlatDecls}.h || die
+
+ # install symlink for libraries
+ dosym libtk${v1}$(get_libname) /usr/${mylibdir}/libtk$(get_libname)
+ dosym libtkstub${v1}.a /usr/${mylibdir}/libtkstub.a
+
+ if multilib_is_native_abi; then
+ dosym wish${v1} /usr/bin/wish
+ dodoc "${SPARENT}"/{ChangeLog*,README,changes}
+ fi
+}
diff --git a/dev-lang/tk/tk-8.6.6.ebuild b/dev-lang/tk/tk-8.6.6.ebuild
new file mode 100644
index 000000000000..be33b1d36f4d
--- /dev/null
+++ b/dev-lang/tk/tk-8.6.6.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils multilib multilib-minimal prefix toolchain-funcs versionator virtualx
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tk Widget Set"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0/8.6"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug +threads truetype aqua xscreensaver"
+
+RDEPEND="
+ !aqua? (
+ >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
+ truetype? ( >=x11-libs/libXft-2.3.1-r1[${MULTILIB_USEDEP}] )
+ xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[${MULTILIB_USEDEP}] )
+ )
+ ~dev-lang/tcl-${PV}:0=[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ !aqua? ( >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}] )"
+
+# Not bumped to 8.6
+#RESTRICT=test
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.5.11-fedora-xft.patch \
+ "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ "${FILESDIR}"/${PN}-8.4.15-aqua.patch
+
+ # Bug 125971
+ "${FILESDIR}"/${PN}-8.5.14-conf.patch
+)
+
+src_prepare() {
+ find \
+ "${SPARENT}"/compat/* \
+ -delete || die
+
+ pushd "${SPARENT}" &>/dev/null || die
+ default
+ popd &>/dev/null || die
+ eprefixify Makefile.in
+
+ # Make sure we use the right pkg-config, and link against fontconfig
+ # (since the code base uses Fc* functions).
+ sed \
+ -e 's/FT_New_Face/XftFontOpen/g' \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ -e 's:xft freetype2:xft freetype2 fontconfig:' \
+ -i configure.in || die
+ rm configure || die
+
+ tc-export CC
+
+ sed \
+ -e '/chmod/s:555:755:g' \
+ -i Makefile.in || die
+
+ sed \
+ -e 's:-O[2s]\?::g' \
+ -i tcl.m4 || die
+
+ mv configure.{in,ac} || die
+
+ eautoconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ if tc-is-cross-compiler ; then
+ export ac_cv_func_strtod=yes
+ export tcl_cv_strtod_buggy=1
+ fi
+
+ local mylibdir=$(get_libdir)
+
+ econf \
+ --with-tcl="${EPREFIX}/usr/${mylibdir}" \
+ $(use_enable threads) \
+ $(use_enable aqua) \
+ $(use_enable truetype xft) \
+ $(use_enable xscreensaver xss) \
+ $(use_enable debug symbols)
+}
+
+multilib_src_test() {
+ virtx emake test
+}
+
+multilib_src_install() {
+ #short version number
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ S= default
+
+ # normalize $S path, bug #280766 (pkgcore)
+ local nS="$(cd "${S}"; pwd)"
+
+ # fix the tkConfig.sh to eliminate refs to the build directory
+ # and drop unnecessary -L inclusion to default system libdir
+
+ sed \
+ -e "/^TK_BUILD_LIB_SPEC=/s:-L${S}-\w*\.\w* ::g" \
+ -e "/^TK_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tk${v1}/include:g" \
+ -e "/^TK_BUILD_STUB_LIB_SPEC=/s:-L${S}-\w*\.\w* *::g" \
+ -e "/^TK_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_BUILD_STUB_LIB_PATH=/s:${S}-\w*\.\w*:${EPREFIX}/usr/${mylibdir}:g" \
+ -e "/^TK_LIB_FILE=/s:'libtk${v1}..TK_DBGX..so':\"libk${v1}\$\{TK_DBGX\}.so\":g" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
+ sed \
+ -e "/^TK_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+ -e "/^TK_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ fi
+
+ # install private headers
+ insinto /usr/${mylibdir}/tk${v1}/include/unix
+ doins "${S}"/*.h
+ insinto /usr/${mylibdir}/tk${v1}/include/generic
+ doins "${SPARENT}"/generic/*.h
+ rm -f "${ED}"/usr/${mylibdir}/tk${v1}/include/generic/{tk,tkDecls,tkPlatDecls}.h || die
+
+ # install symlink for libraries
+ dosym libtk${v1}$(get_libname) /usr/${mylibdir}/libtk$(get_libname)
+ dosym libtkstub${v1}.a /usr/${mylibdir}/libtkstub.a
+
+ if multilib_is_native_abi; then
+ dosym wish${v1} /usr/bin/wish
+ dodoc "${SPARENT}"/{ChangeLog*,README,changes}
+ fi
+}
diff --git a/dev-lang/tk/tk-8.6.7.ebuild b/dev-lang/tk/tk-8.6.7.ebuild
new file mode 100644
index 000000000000..fa1e159eccd6
--- /dev/null
+++ b/dev-lang/tk/tk-8.6.7.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils multilib multilib-minimal prefix toolchain-funcs versionator virtualx
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tk Widget Set"
+HOMEPAGE="http://www.tcl.tk/"
+SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
+
+LICENSE="tcltk"
+SLOT="0/8.6"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug +threads truetype aqua xscreensaver"
+
+RDEPEND="
+ !aqua? (
+ >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
+ truetype? ( >=x11-libs/libXft-2.3.1-r1[${MULTILIB_USEDEP}] )
+ xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[${MULTILIB_USEDEP}] )
+ )
+ ~dev-lang/tcl-${PV}:0=[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+ !aqua? ( >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}] )"
+
+# Not bumped to 8.6
+#RESTRICT=test
+
+SPARENT="${WORKDIR}/${MY_P}"
+S="${SPARENT}"/unix
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.5.11-fedora-xft.patch \
+ "${FILESDIR}"/${PN}-8.5.13-multilib.patch
+
+ "${FILESDIR}"/${PN}-8.4.15-aqua.patch
+
+ # Bug 125971
+ "${FILESDIR}"/${PN}-8.5.14-conf.patch
+)
+
+src_prepare() {
+ find \
+ "${SPARENT}"/compat/* \
+ -delete || die
+
+ pushd "${SPARENT}" &>/dev/null || die
+ default
+ popd &>/dev/null || die
+ eprefixify Makefile.in
+
+ # Make sure we use the right pkg-config, and link against fontconfig
+ # (since the code base uses Fc* functions).
+ sed \
+ -e 's/FT_New_Face/XftFontOpen/g' \
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+ -e 's:xft freetype2:xft freetype2 fontconfig:' \
+ -i configure.in || die
+ rm configure || die
+
+ tc-export CC
+
+ sed \
+ -e '/chmod/s:555:755:g' \
+ -i Makefile.in || die
+
+ sed \
+ -e 's:-O[2s]\?::g' \
+ -i tcl.m4 || die
+
+ mv configure.{in,ac} || die
+
+ eautoconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ if tc-is-cross-compiler ; then
+ export ac_cv_func_strtod=yes
+ export tcl_cv_strtod_buggy=1
+ fi
+
+ local mylibdir=$(get_libdir)
+
+ econf \
+ --with-tcl="${EPREFIX}/usr/${mylibdir}" \
+ $(use_enable threads) \
+ $(use_enable aqua) \
+ $(use_enable truetype xft) \
+ $(use_enable xscreensaver xss) \
+ $(use_enable debug symbols)
+}
+
+multilib_src_test() {
+ virtx emake test
+}
+
+multilib_src_install() {
+ #short version number
+ local v1=$(get_version_component_range 1-2)
+ local mylibdir=$(get_libdir)
+
+ S= default
+
+ # normalize $S path, bug #280766 (pkgcore)
+ local nS="$(cd "${S}"; pwd)"
+
+ # fix the tkConfig.sh to eliminate refs to the build directory
+ # and drop unnecessary -L inclusion to default system libdir
+
+ sed \
+ -e "/^TK_BUILD_LIB_SPEC=/s:-L${S}-\w*\.\w* ::g" \
+ -e "/^TK_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tk${v1}/include:g" \
+ -e "/^TK_BUILD_STUB_LIB_SPEC=/s:-L${S}-\w*\.\w* *::g" \
+ -e "/^TK_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+ -e "/^TK_BUILD_STUB_LIB_PATH=/s:${S}-\w*\.\w*:${EPREFIX}/usr/${mylibdir}:g" \
+ -e "/^TK_LIB_FILE=/s:'libtk${v1}..TK_DBGX..so':\"libk${v1}\$\{TK_DBGX\}.so\":g" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
+ sed \
+ -e "/^TK_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+ -e "/^TK_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+ fi
+
+ # install private headers
+ insinto /usr/${mylibdir}/tk${v1}/include/unix
+ doins "${S}"/*.h
+ insinto /usr/${mylibdir}/tk${v1}/include/generic
+ doins "${SPARENT}"/generic/*.h
+ rm -f "${ED}"/usr/${mylibdir}/tk${v1}/include/generic/{tk,tkDecls,tkPlatDecls}.h || die
+
+ # install symlink for libraries
+ dosym libtk${v1}$(get_libname) /usr/${mylibdir}/libtk$(get_libname)
+ dosym libtkstub${v1}.a /usr/${mylibdir}/libtkstub.a
+
+ if multilib_is_native_abi; then
+ dosym wish${v1} /usr/bin/wish
+ dodoc "${SPARENT}"/{ChangeLog*,README,changes}
+ fi
+}
diff --git a/dev-lang/tuprolog/Manifest b/dev-lang/tuprolog/Manifest
new file mode 100644
index 000000000000..81b5342238d7
--- /dev/null
+++ b/dev-lang/tuprolog/Manifest
@@ -0,0 +1,20 @@
+AUX build-2.9.2.xml 2863 SHA256 ac05d993ead76ddf70d50abf95f276f447ba202500b6f221a7d9ba26c24671ac SHA512 ca4dd0b76ae5a503a07f4c660f8715ff38b1c8e582de52928dad040f42a5fb7a9c774e039d9b7ca4b310b29241da6ab6b43115d741ed6dfbcc8538e384a05673 WHIRLPOOL 1548933f6fe31b00aac4f0cf5a3139e45f1a75cf0016689c463db5f878e698cdf65655c1e4a986d32da62c73071eee09156b9c08e4fb452f2041f88e91326494
+AUX build-3.0.0.xml 2863 SHA256 ac05d993ead76ddf70d50abf95f276f447ba202500b6f221a7d9ba26c24671ac SHA512 ca4dd0b76ae5a503a07f4c660f8715ff38b1c8e582de52928dad040f42a5fb7a9c774e039d9b7ca4b310b29241da6ab6b43115d741ed6dfbcc8538e384a05673 WHIRLPOOL 1548933f6fe31b00aac4f0cf5a3139e45f1a75cf0016689c463db5f878e698cdf65655c1e4a986d32da62c73071eee09156b9c08e4fb452f2041f88e91326494
+AUX build-3.0.1.xml 2968 SHA256 44940aaf7bca9256c7e145b30bb5da2a4cb0e3ecb05ef63603d89fdc2830d608 SHA512 4e65ba93141f8c47b2be9f534b05be3c4fa33428df73a23148b8f0f675f617071ad6c14c8aaa1f1ed6de03832f3e26b0b065b2f67834199244fbe55b398f0f20 WHIRLPOOL 6c4cf3c756c2421a8949383b21758fcaa6b244a258e1d71b1d18c5b2b54d9e8d820603626af7b09b1067ff1619cfd35befc6023560e93ad0bb7395b86de611e6
+AUX tuprolog-2.9.2-no-dynamic-object-test.patch 758 SHA256 ef4ee97993fe8c0dd19e16ac7aacf84dcd6ac5003e25415dfe89da1ca3521a31 SHA512 bbaef70b751fe049680826fb82dc46a339f88d7b8062df0865fddb15de2c991939e7e2fae0f889db0c72d802790287487f442316ad6c9e7fa7276b30083b7365 WHIRLPOOL cc35dc699e538c46b9ae195ff0df73525585d3c062e2c1e3041174519262ff5476b325cd6b1ddcbc2ba7c5b45fbbe4e6ccbb4289968d0c599f0a1f410ac88eac
+AUX tuprolog-2.9.2-no-ikvm.patch 3929 SHA256 a3f74a551dd9710ab1069d8d1f3dcbfd39b8fc52777b45100094e9e06c4f6d8b SHA512 a90b55f74841271a6ae9f4143203a9920adee9f7ab32c814d41f8830b7310919fcf035361f87fcd1ba7f7f0f0efe0c0a29ddff704c0d4d14ed2a41b4f7574a74 WHIRLPOOL 54d57bbf90a708d2118728e698be70513724fde6163e718bfe4c0ae52777eadccb7fa34319814efdbc9fcee3516c0e69b37b68276d52c6ccb2d6309cdc24dfbf
+AUX tuprolog-3.0.0-no-dynamic-object-test.patch 752 SHA256 59daafbedde091f2816784195e9f05ade0cce27c0148cac1c42f2eda3be61a18 SHA512 e4797de5d857ddf9dddd4b0b5b73fd99f5b00915d2494661f115ff6da887d73840efb28d596ae7bb650cc0ef46b24381ed1688ca9d57a8ef554b6a878d8ae580 WHIRLPOOL 6d5f2b8f123332bf8249422531d0eccf38e12c21c3893e080406da4bbaf723dd716ec1b6ae1354aec871593564a7fc1436a1e303bb740b2eaae1c0a45e7ae6a1
+AUX tuprolog-3.0.0-no-ikvm.patch 4830 SHA256 e1b7362f26615907d9516470b89e9f15cded29ec57ff465c6eb96777d8c95d43 SHA512 4ac1b351b3ea3b2f441bdfed6f44ad561d37dcc0f7b41c0cd4919f8dd84e352b24939f0904f6696c3077556eb97b323a45ddd12a10ac866467c5e90e7e2e9500 WHIRLPOOL 1ab551880c4678852e2503d86f90e39338f28ae8cf0bf37344100b141c50b6aae21d36bbf4584b14674bae6c243ac4230b96689c820c70eb3d7d07207c4c840e
+AUX tuprolog-3.0.0-oolibrary-unit-test.patch 628 SHA256 ec7d1f903cfd9501a33202153f0e6666e5ba790124c16ee1fe126b6e3fd945d9 SHA512 b898f0d12c458df065d9d1d750e30d8625065f29a9fa3eb1e4def26c8b5e2637cf184d3c2a9ba64a305a7888915ecca891598b746fc30aa410ef88562eab2c13 WHIRLPOOL abd70b7ff864d985aca9e01c9b01ce787fe1023c9db2856d704ef2b3d8d1d6d4823d3ff3306d296518a8ffa82e77636b4bbe97103043a1ceaf3cf6372660a156
+AUX tuprolog-3.0.1-no-ikvm.patch 4844 SHA256 9715ac30c299a91b06edf0891ef1bf8e57cd8ad622e1c9d1c8f5b43df002536c SHA512 c018d9028a9a4aea6c36057ac2d8b46d41da4961570fff491521c7b6bb816653db54a9e2a1049bd037aede7fa00262089f3787cad4a1e10836aa4f7442c727cd WHIRLPOOL 25ac97ca57c587493ede3c1765798f9b562ac882de9cf3d881b1edebf151bec25cc2d419568961b2a54eaaa10d80d146fc09a841b2a88c2fdab7f98f0534c633
+AUX tuprolog-3.0.1-oolibrary-unit-test.patch 762 SHA256 c6e89f6d19db6ce82397cdb92edda9ea343a407d34875c91ffdc1ccdbedfe9e5 SHA512 54e3e9ef7ecc5ff27e687067a057e0c66f37e4d5f268d670210df89435333f7e303e640e12a4afd3c7906e3c52cd2de2466dc81b6cd2113aeb2ee0c7b5ad7a88 WHIRLPOOL 870d373c7fb63d82d2d540104b2f6cd7ef7548a2d96bf913fdb6b14a6ba1fa795e8432338ff4808229af3a6395ced7b8f87f8da245243bbacca9ba7adf4e931e
+AUX tuprolog-3.1.0-no-ikvm.patch 4862 SHA256 0edaab0b8a7b7c35002136f82ee7adf02e3471ee5726875843f8f71c05474b80 SHA512 ceb45121b4bec54cdd26683ce1e7a63baea9d5c899cd5993d51cbaf8fdbc4b9138f926e164e1dd96eafb2af6b2112c44bf15b1f79c6b9096ac028e02c2dab1a0 WHIRLPOOL b9a0d5c38daa7c0f800634f77549eb4d757261feb8cf657cb3546106edf62432aaefcd7f18b4c5a47e5f1eab192fdf311022684b9e2349098d340aa31a3daaff
+DIST tuprolog-2.9.2.tar.gz 6262268 SHA256 4205dff584b492e10f214c71ce7bc0e81297a915156ca1e10cfac8b34c8c0a6e SHA512 831c7390fe33fc57cb01d4b1d61485ac5df1aa8ebf386d5aae5c5d32f7677d46aa5aa6cc0eb1d3bb79989a54f8484ad8b97754b7f75fc21af6116ae170a28316 WHIRLPOOL 18dceea5e95be3e60b10fa8692970e61d9b16b2f518ac342de271ac7c6cb8313e8e9ca359fb93753d43a2c09780e47f212776ce560f9c2fefdb21d44f3316c77
+DIST tuprolog-3.0.1.tar.gz 6326591 SHA256 e4ed2689dd5496175cddcfe299b442d92d580d778a0fd9a4c7beededa20dfbb7 SHA512 56fa96f717b5c8e56fd2979f2953744964d844e5abf215456e31309d3d92bde142f9bff55e6442b6de55f219c7f143a275ccf89359ff2f2944459bbc94770afa WHIRLPOOL 81d8421242ce8308418b7c40b7db6554cdbd92a4966aef4d73c414b675fca9148f5fce52ec2ef2a0c62025eda1c790013fb1b6bd20ac53a16f7be3fc61149004
+DIST tuprolog-3.1.0.tar.gz 7201383 SHA256 be2ecf38acb74e35cd19e507cb15e698fe5a9bd6373487a668fccbe38628bba2 SHA512 1093e29a79964cb3991326da14f020cdc8ff64f2444c84dbb6b22aa5c4ecbf48f74dbc26af0af949ccc31020573ce5908684af794db4654fb475efa697a82cbf WHIRLPOOL 6aac4962fa499efbc95d6e86b654b6a0f5cfbec8cd569f6525006fd0255a08e0bcd7f3826b5c3070fe524e3d752f7aaa6434a1851d61d140597d604ae8e65a07
+EBUILD tuprolog-2.9.2.ebuild 1277 SHA256 24f24d54dffe858967d02a21e300c1ebc5dcfb677e97fe25c47b71a4273300a2 SHA512 e54de1e3cc8dbace872cf4f06bb07318c63e9cedbda8569d0e3e76aee013af2cd94ff606fae66e95074dc55776564ca53c76ea5366343993eb737208b243e20d WHIRLPOOL b65ef1784e5721919dd60a02331a8b47133af150ade4f290ba5acf8b19f7c309fce8e24e8208de2cd68002d920b3e6235578fb53a98b843e73ae4fad4b9d8f19
+EBUILD tuprolog-3.0.1.ebuild 1325 SHA256 1842c9f3dd80a3a955b9da4e84b68ca4935782cafc31c0613f938140eb130fab SHA512 65c6d6117900555181ccad3bdf6a13dbff505ff47e6c925b3020589043ff7c3bf6a60c17abc5433a2c8a378662c1d575962220f591e80f8d44e5a1ae907d8053 WHIRLPOOL 53b08f0641a37c059228446dacd98a5858ff8b531fef361944a190e67143f6775f0a79c94ed64a0924ad6ee7b7dd1f0f982029022e6f7a35dfd303c590a99be3
+EBUILD tuprolog-3.1.0.ebuild 1272 SHA256 bca2b5945291a0aa6c046fe4e2a76126abe449544d8c2bcbc8665533bbc6a838 SHA512 bdaf84e58746284867230509ae2e97351e328f8dbc053aa36f45b009160a4e3b15667b6a3265e8d7a7b9c32cd5bbce35a038014fc0580196dfe004a2129014fa WHIRLPOOL 90017e4b1bca896501ea628a1bf4e8c58aa5a44387ec498d52f5edb61e812ec1dbd64b6f9a26711072b2f15b04ca2180d76f80aefba5842ebfe79c654634c99f
+MISC ChangeLog 5111 SHA256 3c0f71707331282a931e86238c72eb5f548b4073174349cf9c27b113ad02acb0 SHA512 de0491cca934dc955ddd4be2eada426ff1c942f19d018d3e929abf492716682492cc0864c8ccf83901d8ad8ac7d5f70c46f5abbdd9be72599f2045167b8ac1e1 WHIRLPOOL 33ef683baf272c21c474b254df7f9d9f854009bc35abc99566b07641708a197c436db4c7f778c0ddf6732faf71eea6f0a997fa5abab91d0ef5edda7b5d5562fe
+MISC ChangeLog-2015 7704 SHA256 ac099edb4c980cb81ab895e1f6715d48cbf525d93705b6fa3b5848bd82882306 SHA512 0bb646521b12040d795ad30f7b74bbc6e38cd7c1e495965fef5ddd951b21351255feb1d3b3adfe87b271e69d92a26e9e7b360ccd4b389bb3cc331f1c12678d5c WHIRLPOOL 2b8cff10deba01bb1ed05ed9d428733e143834e234821a97beb2c64d61006749cc138a80890bbfcba3cb799882a69832eebb318b53c3760abf15f2f57f847672
+MISC metadata.xml 318 SHA256 97061d967a3562a713a4e95455e8e272026dea67d98fdf17a9d7ed34bce40611 SHA512 6a43476b9ed9a343488c8a80908e8b4fcb96c75d9a3e6b6c05c22d8ffb87f5c8df8a3cfd2db5297f60236d6740ab0770e68e1acb4c457398a280df9dc4c266a9 WHIRLPOOL fc6d9a13b5fea0ee6f4ee379521680bddeda3f48ba0a0db488a23e4c60a2e514f64607d1e041993111c90f0bc478d1e321f29b116b6fdcb2760e54ad16dc3b9d
diff --git a/dev-lang/tuprolog/files/build-2.9.2.xml b/dev-lang/tuprolog/files/build-2.9.2.xml
new file mode 100644
index 000000000000..823c2371d1fd
--- /dev/null
+++ b/dev-lang/tuprolog/files/build-2.9.2.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" ?><project default="jar" name="tuprolog">
+
+ <!-- some properties -->
+ <property name="src.dir" value="src"/>
+ <property name="build.dir" value="build"/>
+ <property name="docs.dir" value="docs"/>
+ <property name="dist.dir" value="dist"/>
+ <property name="test.dir" value="test"/>
+ <property name="test.build.dir" value="test.build"/>
+ <property name="jarfile" value="${ant.project.name}.jar"/>
+ <property file="build.properties"/>
+
+ <path id="compile.classpath">
+ <fileset dir="lib" includes="*.jar"/>
+ <pathelement path="${gentoo.classpath}"/>
+ </path>
+
+ <!-- init -->
+ <target name="init">
+ <tstamp/>
+ <mkdir dir="${dist.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${docs.dir}"/>
+ <mkdir dir="${test.build.dir}"/>
+ </target>
+
+ <!-- compile everything -->
+ <target depends="init" name="compile">
+ <javac deprecation="off"
+ destdir="${build.dir}"
+ encoding="ISO-8859-1"
+ srcdir="${src.dir}"
+ target="1.7">
+ <classpath>
+ <path refid="compile.classpath"/>
+ </classpath>
+ </javac>
+ <copy todir="${build.dir}">
+ <fileset dir="${src.dir}">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- build the jar file -->
+ <target depends="compile" name="jar">
+ <jar basedir="${build.dir}" jarfile="${dist.dir}/${jarfile}"/>
+ <jar basedir="${build.dir}" jarfile="${dist.dir}/2p.jar">
+ <manifest>
+ <attribute name="Main-Class" value="alice.tuprologx.ide.GUILauncher"/>
+ <attribute name="Class-Path" value="."/>
+ </manifest>
+ <zipgroupfileset dir="lib" includes="*.jar"/>
+ </jar>
+ </target>
+
+ <!-- generate javadocs -->
+ <target depends="init" name="javadoc">
+ <javadoc
+ author="false"
+ destdir="${docs.dir}"
+ encoding="ISO-8859-1"
+ breakiterator="yes"
+ packagenames="alice.*"
+ sourcepath="${src.dir}"
+ use="true"
+ version="true"
+ verbose="no"
+ windowtitle="${ant.project.name} API">
+ <classpath>
+ <path refid="compile.classpath"/>
+ </classpath>
+ </javadoc>
+ </target>
+
+ <!-- clean up -->
+ <target name="clean">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ <delete dir="${docs.dir}"/>
+ <delete dir="${test.build.dir}"/>
+ </target>
+
+ <!-- run testsuite -->
+ <target name="test">
+ <path id="dist.classpath">
+ <fileset dir="${dist.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+ <javac classpathref="dist.classpath"
+ deprecation="off"
+ destdir="${test.build.dir}"
+ encoding="ISO-8859-1"
+ srcdir="${test.dir}/unit"
+ target="1.7"/>
+ <junit haltonfailure="on" showoutput="no" printsummary="yes">
+ <classpath>
+ <path refid="dist.classpath"/>
+ <pathelement path="${test.build.dir}"/>
+ </classpath>
+ <formatter type="xml"/>
+ <batchtest todir="${test.build.dir}">
+ <fileset dir="${test.build.dir}">
+ <include name="**/*TestCase.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+</project>
diff --git a/dev-lang/tuprolog/files/build-3.0.0.xml b/dev-lang/tuprolog/files/build-3.0.0.xml
new file mode 100644
index 000000000000..823c2371d1fd
--- /dev/null
+++ b/dev-lang/tuprolog/files/build-3.0.0.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" ?><project default="jar" name="tuprolog">
+
+ <!-- some properties -->
+ <property name="src.dir" value="src"/>
+ <property name="build.dir" value="build"/>
+ <property name="docs.dir" value="docs"/>
+ <property name="dist.dir" value="dist"/>
+ <property name="test.dir" value="test"/>
+ <property name="test.build.dir" value="test.build"/>
+ <property name="jarfile" value="${ant.project.name}.jar"/>
+ <property file="build.properties"/>
+
+ <path id="compile.classpath">
+ <fileset dir="lib" includes="*.jar"/>
+ <pathelement path="${gentoo.classpath}"/>
+ </path>
+
+ <!-- init -->
+ <target name="init">
+ <tstamp/>
+ <mkdir dir="${dist.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${docs.dir}"/>
+ <mkdir dir="${test.build.dir}"/>
+ </target>
+
+ <!-- compile everything -->
+ <target depends="init" name="compile">
+ <javac deprecation="off"
+ destdir="${build.dir}"
+ encoding="ISO-8859-1"
+ srcdir="${src.dir}"
+ target="1.7">
+ <classpath>
+ <path refid="compile.classpath"/>
+ </classpath>
+ </javac>
+ <copy todir="${build.dir}">
+ <fileset dir="${src.dir}">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- build the jar file -->
+ <target depends="compile" name="jar">
+ <jar basedir="${build.dir}" jarfile="${dist.dir}/${jarfile}"/>
+ <jar basedir="${build.dir}" jarfile="${dist.dir}/2p.jar">
+ <manifest>
+ <attribute name="Main-Class" value="alice.tuprologx.ide.GUILauncher"/>
+ <attribute name="Class-Path" value="."/>
+ </manifest>
+ <zipgroupfileset dir="lib" includes="*.jar"/>
+ </jar>
+ </target>
+
+ <!-- generate javadocs -->
+ <target depends="init" name="javadoc">
+ <javadoc
+ author="false"
+ destdir="${docs.dir}"
+ encoding="ISO-8859-1"
+ breakiterator="yes"
+ packagenames="alice.*"
+ sourcepath="${src.dir}"
+ use="true"
+ version="true"
+ verbose="no"
+ windowtitle="${ant.project.name} API">
+ <classpath>
+ <path refid="compile.classpath"/>
+ </classpath>
+ </javadoc>
+ </target>
+
+ <!-- clean up -->
+ <target name="clean">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ <delete dir="${docs.dir}"/>
+ <delete dir="${test.build.dir}"/>
+ </target>
+
+ <!-- run testsuite -->
+ <target name="test">
+ <path id="dist.classpath">
+ <fileset dir="${dist.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+ <javac classpathref="dist.classpath"
+ deprecation="off"
+ destdir="${test.build.dir}"
+ encoding="ISO-8859-1"
+ srcdir="${test.dir}/unit"
+ target="1.7"/>
+ <junit haltonfailure="on" showoutput="no" printsummary="yes">
+ <classpath>
+ <path refid="dist.classpath"/>
+ <pathelement path="${test.build.dir}"/>
+ </classpath>
+ <formatter type="xml"/>
+ <batchtest todir="${test.build.dir}">
+ <fileset dir="${test.build.dir}">
+ <include name="**/*TestCase.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+</project>
diff --git a/dev-lang/tuprolog/files/build-3.0.1.xml b/dev-lang/tuprolog/files/build-3.0.1.xml
new file mode 100644
index 000000000000..3b6f5818eaa6
--- /dev/null
+++ b/dev-lang/tuprolog/files/build-3.0.1.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" ?><project default="jar" name="tuprolog">
+
+ <!-- some properties -->
+ <property name="src.dir" value="src"/>
+ <property name="build.dir" value="build"/>
+ <property name="docs.dir" value="docs"/>
+ <property name="dist.dir" value="dist"/>
+ <property name="test.dir" value="test"/>
+ <property name="test.build.dir" value="test.build"/>
+ <property name="jarfile" value="${ant.project.name}.jar"/>
+ <property file="build.properties"/>
+
+ <path id="compile.classpath">
+ <fileset dir="lib" includes="*.jar"/>
+ <pathelement path="${gentoo.classpath}"/>
+ </path>
+
+ <!-- init -->
+ <target name="init">
+ <tstamp/>
+ <mkdir dir="${dist.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${docs.dir}"/>
+ <mkdir dir="${test.build.dir}"/>
+ </target>
+
+ <!-- compile everything -->
+ <target depends="init" name="compile">
+ <javac deprecation="off"
+ destdir="${build.dir}"
+ encoding="ISO-8859-1"
+ srcdir="${src.dir}"
+ source="1.8"
+ target="1.8">
+ <classpath>
+ <path refid="compile.classpath"/>
+ </classpath>
+ </javac>
+ <copy todir="${build.dir}">
+ <fileset dir="${src.dir}">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- build the jar file -->
+ <target depends="compile" name="jar">
+ <jar basedir="${build.dir}" jarfile="${dist.dir}/${jarfile}"/>
+ <jar basedir="${build.dir}" jarfile="${dist.dir}/2p.jar">
+ <manifest>
+ <attribute name="Main-Class" value="alice.tuprologx.ide.GUILauncher"/>
+ <attribute name="Class-Path" value="."/>
+ </manifest>
+ <zipgroupfileset dir="lib" includes="*.jar"/>
+ </jar>
+ </target>
+
+ <!-- generate javadocs -->
+ <target depends="init" name="javadoc">
+ <javadoc
+ author="false"
+ destdir="${docs.dir}"
+ encoding="ISO-8859-1"
+ breakiterator="yes"
+ packagenames="alice.*"
+ sourcepath="${src.dir}"
+ use="true"
+ version="true"
+ verbose="no"
+ windowtitle="${ant.project.name} API">
+ <classpath>
+ <path refid="compile.classpath"/>
+ </classpath>
+ </javadoc>
+ </target>
+
+ <!-- clean up -->
+ <target name="clean">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ <delete dir="${docs.dir}"/>
+ <delete dir="${test.build.dir}"/>
+ </target>
+
+ <!-- run testsuite -->
+ <target name="test">
+ <path id="dist.classpath">
+ <fileset dir="${dist.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+ <javac classpathref="dist.classpath"
+ deprecation="off"
+ destdir="${test.build.dir}"
+ encoding="ISO-8859-1"
+ srcdir="${test.dir}/unit"
+ source="1.8"
+ target="1.8"/>
+ <junit fork="yes" failureproperty="test.failed" printsummary="yes">
+ <classpath>
+ <path refid="dist.classpath"/>
+ <pathelement path="${test.build.dir}"/>
+ </classpath>
+ <formatter type="xml"/>
+ <test name="alice.tuprolog.TuPrologTestSuite" todir="${test.build.dir}"/>
+ <test name="alice.tuprolog.ExceptionsTestSuite" todir="${test.build.dir}"/>
+ </junit>
+ <fail message="Test failure(s) detected" if="test.failed" />
+ </target>
+</project>
diff --git a/dev-lang/tuprolog/files/tuprolog-2.9.2-no-dynamic-object-test.patch b/dev-lang/tuprolog/files/tuprolog-2.9.2-no-dynamic-object-test.patch
new file mode 100644
index 000000000000..0416258e9e14
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-2.9.2-no-dynamic-object-test.patch
@@ -0,0 +1,20 @@
+--- tuprolog-2.9.2.orig/test/unit/alice/tuprolog/JavaLibraryTestCase.java 2015-02-27 14:02:49.000000000 +0100
++++ tuprolog-2.9.2/test/unit/alice/tuprolog/JavaLibraryTestCase.java 2016-02-17 15:24:47.000000000 +0100
+@@ -39,7 +39,7 @@
+ SolveInfo goal = engine.solve(new Struct("demo", t));
+ assertFalse(goal.isSuccess());
+ }
+-
++/*
+ public void testDynamicObjectsRetrival() throws PrologException {
+ Prolog engine = new Prolog();
+ JavaLibrary lib = (JavaLibrary) engine.getLibrary("alice.tuprolog.lib.JavaLibrary");
+@@ -53,7 +53,7 @@
+ TestCounter counter = (TestCounter) lib.getRegisteredDynamicObject(id);
+ assertEquals(2, counter.getValue());
+ }
+-
++*/
+
+ public void test_java_object() throws PrologException, IOException
+ {
diff --git a/dev-lang/tuprolog/files/tuprolog-2.9.2-no-ikvm.patch b/dev-lang/tuprolog/files/tuprolog-2.9.2-no-ikvm.patch
new file mode 100644
index 000000000000..d94dc66bbac5
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-2.9.2-no-ikvm.patch
@@ -0,0 +1,116 @@
+diff -urN tuprolog-2.9.0.orig/src/alice/tuprolog/LibraryManager.java tuprolog-2.9.0/src/alice/tuprolog/LibraryManager.java
+--- tuprolog-2.9.0.orig/src/alice/tuprolog/LibraryManager.java 2014-09-29 18:14:21.000000000 +0200
++++ tuprolog-2.9.0/src/alice/tuprolog/LibraryManager.java 2015-01-11 14:48:57.000000000 +0100
+@@ -9,11 +9,11 @@
+ import java.net.URL;
+ import java.net.URLClassLoader;
+ import java.util.*;
+-import cli.System.Reflection.Assembly;
++//import cli.System.Reflection.Assembly;
+
+ import alice.tuprolog.event.LibraryEvent;
+ import alice.tuprolog.event.WarningEvent;
+-import alice.util.AssemblyCustomClassLoader;
++//import alice.util.AssemblyCustomClassLoader;
+
+ /**
+ * @author Alex Benini
+@@ -179,31 +179,7 @@
+ } else
+ // .NET
+ {
+- Assembly asm = null;
+- boolean classFound = false;
+- className = "cli."
+- + className.substring(0, className.indexOf(","))
+- .trim();
+- for (int i = 0; i < paths.length; i++)
+- {
+- try
+- {
+- asm = Assembly.LoadFrom(paths[i]);
+- loader = new AssemblyCustomClassLoader(asm, urls);
+- lib = (Library) Class.forName(className, true, loader).newInstance();
+- if (lib != null)
+- {
+- classFound = true;
+- break;
+- }
+- } catch (Exception e)
+- {
+- e.printStackTrace();
+- continue;
+- }
+- }
+- if (!classFound)
+- throw new InvalidLibraryException(className, -1, -1);
++ throw new InvalidLibraryException(className, -1, -1);
+ }
+ }
+
+@@ -462,4 +438,4 @@
+ return optimizedDirectory;
+ }
+
+-}
+\ No newline at end of file
++}
+diff -urN tuprolog-2.9.0.orig/src/alice/tuprologx/ide/LibraryManager.java tuprolog-2.9.0/src/alice/tuprologx/ide/LibraryManager.java
+--- tuprolog-2.9.0.orig/src/alice/tuprologx/ide/LibraryManager.java 2014-09-29 18:14:21.000000000 +0200
++++ tuprolog-2.9.0/src/alice/tuprologx/ide/LibraryManager.java 2015-01-11 14:46:23.000000000 +0100
+@@ -18,7 +18,7 @@
+ package alice.tuprologx.ide;
+
+ import alice.tuprolog.*;
+-import alice.util.AssemblyCustomClassLoader;
++//import alice.util.AssemblyCustomClassLoader;
+
+ import java.io.File;
+ import java.net.URL;
+@@ -26,7 +26,7 @@
+ import java.util.ArrayList;
+ import java.util.Hashtable;
+ import java.util.StringTokenizer;
+-import cli.System.Reflection.Assembly;
++//import cli.System.Reflection.Assembly;
+
+ /**
+ * A dynamic manager for tuProlog libraries.
+@@ -155,10 +155,7 @@
+ // .NET
+ if(System.getProperty("java.vm.name").equals("IKVM.NET"))
+ {
+- Assembly asm = Assembly.LoadFrom(file.getPath());
+- loader = new AssemblyCustomClassLoader(asm, new URL[]{url});
+- libraryClassname = "cli." + libraryClassname.substring(0,
+- libraryClassname.indexOf(",")).trim();
++ throw new InvalidLibraryException(libraryClassname,-1,-1);
+ }
+ // JVM
+ else
+diff -urN tuprolog-2.9.0.orig/src/alice/util/AssemblyCustomClassLoader.java tuprolog-2.9.0/src/alice/util/AssemblyCustomClassLoader.java
+--- tuprolog-2.9.0.orig/src/alice/util/AssemblyCustomClassLoader.java 2014-09-29 18:14:21.000000000 +0200
++++ tuprolog-2.9.0/src/alice/util/AssemblyCustomClassLoader.java 1970-01-01 01:00:00.000000000 +0100
+@@ -1,21 +0,0 @@
+-package alice.util;
+-
+-import java.net.URL;
+-
+-public class AssemblyCustomClassLoader extends java.net.URLClassLoader
+-{
+- public AssemblyCustomClassLoader(cli.System.Reflection.Assembly asm, URL[] urls)
+- {
+- super(new java.net.URL[0], new ikvm.runtime.AssemblyClassLoader(asm));
+- // explicitly calling addURL() is safer than passing it to the super constructor,
+- // because this class loader instance may be used during the URL construction.
+- for (URL url : urls) {
+- addURL(url);
+- }
+- }
+-
+- public void addUrl(URL url)
+- {
+- addURL(url);
+- }
+-}
+\ No newline at end of file
diff --git a/dev-lang/tuprolog/files/tuprolog-3.0.0-no-dynamic-object-test.patch b/dev-lang/tuprolog/files/tuprolog-3.0.0-no-dynamic-object-test.patch
new file mode 100644
index 000000000000..36e683f8c117
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-3.0.0-no-dynamic-object-test.patch
@@ -0,0 +1,20 @@
+--- tuprolog-3.0.0.orig/test/unit/alice/tuprolog/JavaLibraryTestCase.java 2016-10-08 14:34:12.000000000 +0200
++++ tuprolog-3.0.0/test/unit/alice/tuprolog/JavaLibraryTestCase.java 2016-10-08 17:30:18.525111794 +0200
+@@ -39,7 +39,7 @@
+ SolveInfo goal = engine.solve(new Struct("demo", t));
+ assertFalse(goal.isSuccess());
+ }
+-
++/*
+ public void testDynamicObjectsRetrival() throws PrologException {
+ Prolog engine = new Prolog();
+ OOLibrary lib = (OOLibrary) engine.getLibrary("alice.tuprolog.lib.OOLibrary");
+@@ -53,7 +53,7 @@
+ TestCounter counter = (TestCounter) lib.getRegisteredDynamicObject(id);
+ assertEquals(2, counter.getValue());
+ }
+-
++*/
+
+ public void test_java_object() throws PrologException, IOException
+ {
diff --git a/dev-lang/tuprolog/files/tuprolog-3.0.0-no-ikvm.patch b/dev-lang/tuprolog/files/tuprolog-3.0.0-no-ikvm.patch
new file mode 100644
index 000000000000..e0ee85c506c2
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-3.0.0-no-ikvm.patch
@@ -0,0 +1,137 @@
+diff -urN tuprolog-3.0.0.orig/src/alice/tuprolog/LibraryManager.java tuprolog-3.0.0/src/alice/tuprolog/LibraryManager.java
+--- tuprolog-3.0.0.orig/src/alice/tuprolog/LibraryManager.java 2016-10-08 14:33:19.000000000 +0200
++++ tuprolog-3.0.0/src/alice/tuprolog/LibraryManager.java 2016-10-08 16:49:12.005214951 +0200
+@@ -9,11 +9,11 @@
+ import java.net.URL;
+ import java.net.URLClassLoader;
+ import java.util.*;
+-import cli.System.Reflection.Assembly;
++//import cli.System.Reflection.Assembly;
+
+ import alice.tuprolog.event.LibraryEvent;
+ import alice.tuprolog.event.WarningEvent;
+-import alice.util.AssemblyCustomClassLoader;
++//import alice.util.AssemblyCustomClassLoader;
+
+ /**
+ * @author Alex Benini
+@@ -179,31 +179,7 @@
+ } else
+ // .NET
+ {
+- Assembly asm = null;
+- boolean classFound = false;
+- className = "cli."
+- + className.substring(0, className.indexOf(","))
+- .trim();
+- for (int i = 0; i < paths.length; i++)
+- {
+- try
+- {
+- asm = Assembly.LoadFrom(paths[i]);
+- loader = new AssemblyCustomClassLoader(asm, urls);
+- lib = (Library) Class.forName(className, true, loader).newInstance();
+- if (lib != null)
+- {
+- classFound = true;
+- break;
+- }
+- } catch (Exception e)
+- {
+- e.printStackTrace();
+- continue;
+- }
+- }
+- if (!classFound)
+- throw new InvalidLibraryException(className, -1, -1);
++ throw new InvalidLibraryException(className, -1, -1);
+ }
+ }
+
+@@ -462,4 +438,4 @@
+ return optimizedDirectory;
+ }
+
+-}
+\ No newline at end of file
++}
+diff -urN tuprolog-3.0.0.orig/src/alice/tuprologx/ide/LibraryManager.java tuprolog-3.0.0/src/alice/tuprologx/ide/LibraryManager.java
+--- tuprolog-3.0.0.orig/src/alice/tuprologx/ide/LibraryManager.java 2016-10-08 14:33:19.000000000 +0200
++++ tuprolog-3.0.0/src/alice/tuprologx/ide/LibraryManager.java 2016-10-08 16:49:12.006214951 +0200
+@@ -18,7 +18,7 @@
+ package alice.tuprologx.ide;
+
+ import alice.tuprolog.*;
+-import alice.util.AssemblyCustomClassLoader;
++//import alice.util.AssemblyCustomClassLoader;
+
+ import java.io.File;
+ import java.net.URL;
+@@ -26,7 +26,7 @@
+ import java.util.ArrayList;
+ import java.util.Hashtable;
+ import java.util.StringTokenizer;
+-import cli.System.Reflection.Assembly;
++//import cli.System.Reflection.Assembly;
+
+ /**
+ * A dynamic manager for tuProlog libraries.
+@@ -155,10 +155,7 @@
+ // .NET
+ if(System.getProperty("java.vm.name").equals("IKVM.NET"))
+ {
+- Assembly asm = Assembly.LoadFrom(file.getPath());
+- loader = new AssemblyCustomClassLoader(asm, new URL[]{url});
+- libraryClassname = "cli." + libraryClassname.substring(0,
+- libraryClassname.indexOf(",")).trim();
++ throw new InvalidLibraryException(libraryClassname,-1,-1);
+ }
+ // JVM
+ else
+diff -urN tuprolog-3.0.0.orig/src/alice/util/AssemblyCustomClassLoader.java tuprolog-3.0.0/src/alice/util/AssemblyCustomClassLoader.java
+--- tuprolog-3.0.0.orig/src/alice/util/AssemblyCustomClassLoader.java 2016-10-08 14:33:19.000000000 +0200
++++ tuprolog-3.0.0/src/alice/util/AssemblyCustomClassLoader.java 1970-01-01 01:00:00.000000000 +0100
+@@ -1,21 +0,0 @@
+-package alice.util;
+-
+-import java.net.URL;
+-
+-public class AssemblyCustomClassLoader extends java.net.URLClassLoader
+-{
+- public AssemblyCustomClassLoader(cli.System.Reflection.Assembly asm, URL[] urls)
+- {
+- super(new java.net.URL[0], new ikvm.runtime.AssemblyClassLoader(asm));
+- // explicitly calling addURL() is safer than passing it to the super constructor,
+- // because this class loader instance may be used during the URL construction.
+- for (URL url : urls) {
+- addURL(url);
+- }
+- }
+-
+- public void addUrl(URL url)
+- {
+- addURL(url);
+- }
+-}
+\ No newline at end of file
+diff -urN tuprolog-3.0.0.orig/src/alice/util/proxyGenerator/Generator.java tuprolog-3.0.0/src/alice/util/proxyGenerator/Generator.java
+--- tuprolog-3.0.0.orig/src/alice/util/proxyGenerator/Generator.java 2016-10-08 14:33:19.000000000 +0200
++++ tuprolog-3.0.0/src/alice/util/proxyGenerator/Generator.java 2016-10-08 17:03:17.816179576 +0200
+@@ -1,7 +1,7 @@
+ package alice.util.proxyGenerator;
+ import javax.tools.*;
+
+-import cli.System.Reflection.Assembly;
++//import cli.System.Reflection.Assembly;
+
+ import java.lang.reflect.*;
+ import java.util.*;
+@@ -29,7 +29,7 @@
+ }
+
+ if(System.getProperty("java.vm.name").equals("IKVM.NET"))
+- ikvm.runtime.Startup.addBootClassPathAssemby(Assembly.Load("IKVM.OpenJDK.Tools"));
++ throw new UnsupportedOperationException("IKVM.NET not supported!");
+
+ jc = ToolProvider.getSystemJavaCompiler();
+ if (jc == null) {
diff --git a/dev-lang/tuprolog/files/tuprolog-3.0.0-oolibrary-unit-test.patch b/dev-lang/tuprolog/files/tuprolog-3.0.0-oolibrary-unit-test.patch
new file mode 100644
index 000000000000..f9c13aecb9e7
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-3.0.0-oolibrary-unit-test.patch
@@ -0,0 +1,11 @@
+--- tuprolog-3.0.0.orig/test/unit/alice/tuprolog/PrologTestCase.java 2016-10-08 14:34:12.000000000 +0200
++++ tuprolog-3.0.0/test/unit/alice/tuprolog/PrologTestCase.java 2016-10-08 17:43:28.339078761 +0200
+@@ -32,7 +32,7 @@
+ assertNotNull(engine.getLibrary("alice.tuprolog.StringLibrary"));
+ Library javaLibrary = new alice.tuprolog.lib.OOLibrary();
+ engine.loadLibrary(javaLibrary);
+- assertSame(javaLibrary, engine.getLibrary("alice.tuprolog.lib.JavaLibrary"));
++ assertSame(javaLibrary, engine.getLibrary("alice.tuprolog.lib.OOLibrary"));
+ }
+
+ public void testGetLibraryWithName() throws InvalidLibraryException {
diff --git a/dev-lang/tuprolog/files/tuprolog-3.0.1-no-ikvm.patch b/dev-lang/tuprolog/files/tuprolog-3.0.1-no-ikvm.patch
new file mode 100644
index 000000000000..660b22c79341
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-3.0.1-no-ikvm.patch
@@ -0,0 +1,137 @@
+diff -urN tuprolog-3.0.1.orig/src/alice/tuprolog/LibraryManager.java tuprolog-3.0.1/src/alice/tuprolog/LibraryManager.java
+--- tuprolog-3.0.1.orig/src/alice/tuprolog/LibraryManager.java 2017-09-27 12:31:06.689334505 +0200
++++ tuprolog-3.0.1/src/alice/tuprolog/LibraryManager.java 2017-09-27 12:50:04.193286931 +0200
+@@ -9,11 +9,11 @@
+ import java.net.URL;
+ import java.net.URLClassLoader;
+ import java.util.*;
+-import cli.System.Reflection.Assembly;
++//import cli.System.Reflection.Assembly;
+
+ import alice.tuprolog.event.LibraryEvent;
+ import alice.tuprolog.event.WarningEvent;
+-import alice.util.AssemblyCustomClassLoader;
++//import alice.util.AssemblyCustomClassLoader;
+
+ /**
+ * @author Alex Benini
+@@ -179,31 +179,7 @@
+ } else
+ // .NET
+ {
+- Assembly asm = null;
+- boolean classFound = false;
+- className = "cli."
+- + className.substring(0, className.indexOf(","))
+- .trim();
+- for (int i = 0; i < paths.length; i++)
+- {
+- try
+- {
+- asm = Assembly.LoadFrom(paths[i]);
+- loader = new AssemblyCustomClassLoader(asm, urls);
+- lib = (Library) Class.forName(className, true, loader).newInstance();
+- if (lib != null)
+- {
+- classFound = true;
+- break;
+- }
+- } catch (Exception e)
+- {
+- e.printStackTrace();
+- continue;
+- }
+- }
+- if (!classFound)
+- throw new InvalidLibraryException(className, -1, -1);
++ throw new InvalidLibraryException(className, -1, -1);
+ }
+ }
+
+@@ -462,4 +438,4 @@
+ return optimizedDirectory;
+ }
+
+-}
+\ Manca newline alla fine del file
++}
+diff -urN tuprolog-3.0.1.orig/src/alice/tuprologx/ide/LibraryManager.java tuprolog-3.0.1/src/alice/tuprologx/ide/LibraryManager.java
+--- tuprolog-3.0.1.orig/src/alice/tuprologx/ide/LibraryManager.java 2017-09-27 12:31:06.696334504 +0200
++++ tuprolog-3.0.1/src/alice/tuprologx/ide/LibraryManager.java 2017-09-27 12:50:04.194286931 +0200
+@@ -18,7 +18,7 @@
+ package alice.tuprologx.ide;
+
+ import alice.tuprolog.*;
+-import alice.util.AssemblyCustomClassLoader;
++//import alice.util.AssemblyCustomClassLoader;
+
+ import java.io.File;
+ import java.net.URL;
+@@ -26,7 +26,7 @@
+ import java.util.ArrayList;
+ import java.util.Hashtable;
+ import java.util.StringTokenizer;
+-import cli.System.Reflection.Assembly;
++//import cli.System.Reflection.Assembly;
+
+ /**
+ * A dynamic manager for tuProlog libraries.
+@@ -155,10 +155,7 @@
+ // .NET
+ if(System.getProperty("java.vm.name").equals("IKVM.NET"))
+ {
+- Assembly asm = Assembly.LoadFrom(file.getPath());
+- loader = new AssemblyCustomClassLoader(asm, new URL[]{url});
+- libraryClassname = "cli." + libraryClassname.substring(0,
+- libraryClassname.indexOf(",")).trim();
++ throw new InvalidLibraryException(libraryClassname,-1,-1);
+ }
+ // JVM
+ else
+diff -urN tuprolog-3.0.1.orig/src/alice/util/AssemblyCustomClassLoader.java tuprolog-3.0.1/src/alice/util/AssemblyCustomClassLoader.java
+--- tuprolog-3.0.1.orig/src/alice/util/AssemblyCustomClassLoader.java 2017-09-27 12:31:06.699334504 +0200
++++ tuprolog-3.0.1/src/alice/util/AssemblyCustomClassLoader.java 1970-01-01 01:00:00.000000000 +0100
+@@ -1,21 +0,0 @@
+-package alice.util;
+-
+-import java.net.URL;
+-
+-public class AssemblyCustomClassLoader extends java.net.URLClassLoader
+-{
+- public AssemblyCustomClassLoader(cli.System.Reflection.Assembly asm, URL[] urls)
+- {
+- super(new java.net.URL[0], new ikvm.runtime.AssemblyClassLoader(asm));
+- // explicitly calling addURL() is safer than passing it to the super constructor,
+- // because this class loader instance may be used during the URL construction.
+- for (URL url : urls) {
+- addURL(url);
+- }
+- }
+-
+- public void addUrl(URL url)
+- {
+- addURL(url);
+- }
+-}
+\ Manca newline alla fine del file
+diff -urN tuprolog-3.0.1.orig/src/alice/util/proxyGenerator/Generator.java tuprolog-3.0.1/src/alice/util/proxyGenerator/Generator.java
+--- tuprolog-3.0.1.orig/src/alice/util/proxyGenerator/Generator.java 2017-09-27 12:31:06.700334504 +0200
++++ tuprolog-3.0.1/src/alice/util/proxyGenerator/Generator.java 2017-09-27 12:50:04.195286931 +0200
+@@ -1,7 +1,7 @@
+ package alice.util.proxyGenerator;
+ import javax.tools.*;
+
+-import cli.System.Reflection.Assembly;
++//import cli.System.Reflection.Assembly;
+
+ import java.lang.reflect.*;
+ import java.util.*;
+@@ -29,7 +29,7 @@
+ }
+
+ if(System.getProperty("java.vm.name").equals("IKVM.NET"))
+- ikvm.runtime.Startup.addBootClassPathAssemby(Assembly.Load("IKVM.OpenJDK.Tools"));
++ throw new UnsupportedOperationException("IKVM.NET not supported!");
+
+ jc = ToolProvider.getSystemJavaCompiler();
+ if (jc == null) {
diff --git a/dev-lang/tuprolog/files/tuprolog-3.0.1-oolibrary-unit-test.patch b/dev-lang/tuprolog/files/tuprolog-3.0.1-oolibrary-unit-test.patch
new file mode 100644
index 000000000000..9d09ff202b08
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-3.0.1-oolibrary-unit-test.patch
@@ -0,0 +1,12 @@
+diff -ur tuprolog-3.0.1.orig/test/unit/alice/tuprolog/PrologTestCase.java tuprolog-3.0.1/test/unit/alice/tuprolog/PrologTestCase.java
+--- tuprolog-3.0.1.orig/test/unit/alice/tuprolog/PrologTestCase.java 2017-09-27 12:31:12.908334244 +0200
++++ tuprolog-3.0.1/test/unit/alice/tuprolog/PrologTestCase.java 2017-09-27 19:30:31.813282027 +0200
+@@ -32,7 +32,7 @@
+ assertNotNull(engine.getLibrary("alice.tuprolog.StringLibrary"));
+ Library javaLibrary = new alice.tuprolog.lib.OOLibrary();
+ engine.loadLibrary(javaLibrary);
+- assertSame(javaLibrary, engine.getLibrary("alice.tuprolog.lib.JavaLibrary"));
++ assertSame(javaLibrary, engine.getLibrary("alice.tuprolog.lib.OOLibrary"));
+ }
+
+ public void testGetLibraryWithName() throws InvalidLibraryException {
diff --git a/dev-lang/tuprolog/files/tuprolog-3.1.0-no-ikvm.patch b/dev-lang/tuprolog/files/tuprolog-3.1.0-no-ikvm.patch
new file mode 100644
index 000000000000..eb20dacd4430
--- /dev/null
+++ b/dev-lang/tuprolog/files/tuprolog-3.1.0-no-ikvm.patch
@@ -0,0 +1,137 @@
+diff -urN tuprolog-3.1.0.orig/src/alice/tuprolog/LibraryManager.java tuprolog-3.1.0/src/alice/tuprolog/LibraryManager.java
+--- tuprolog-3.1.0.orig/src/alice/tuprolog/LibraryManager.java 2017-10-08 17:06:55.710627376 +0200
++++ tuprolog-3.1.0/src/alice/tuprolog/LibraryManager.java 2017-10-08 17:18:20.817598723 +0200
+@@ -9,11 +9,11 @@
+ import java.net.URL;
+ import java.net.URLClassLoader;
+ import java.util.*;
+-import cli.System.Reflection.Assembly;
++//import cli.System.Reflection.Assembly;
+
+ import alice.tuprolog.event.LibraryEvent;
+ import alice.tuprolog.event.WarningEvent;
+-import alice.util.AssemblyCustomClassLoader;
++//import alice.util.AssemblyCustomClassLoader;
+
+ /**
+ * @author Alex Benini
+@@ -179,31 +179,7 @@
+ } else
+ // .NET
+ {
+- Assembly asm = null;
+- boolean classFound = false;
+- className = "cli."
+- + className.substring(0, className.indexOf(","))
+- .trim();
+- for (int i = 0; i < paths.length; i++)
+- {
+- try
+- {
+- asm = Assembly.LoadFrom(paths[i]);
+- loader = new AssemblyCustomClassLoader(asm, urls);
+- lib = (Library) Class.forName(className, true, loader).newInstance();
+- if (lib != null)
+- {
+- classFound = true;
+- break;
+- }
+- } catch (Exception e)
+- {
+- e.printStackTrace();
+- continue;
+- }
+- }
+- if (!classFound)
+- throw new InvalidLibraryException(className, -1, -1);
++ throw new InvalidLibraryException(className, -1, -1);
+ }
+ }
+
+@@ -462,4 +438,4 @@
+ return optimizedDirectory;
+ }
+
+-}
+\ Manca newline alla fine del file
++}
+diff -urN tuprolog-3.1.0.orig/src/alice/tuprologx/ide/LibraryManager.java tuprolog-3.1.0/src/alice/tuprologx/ide/LibraryManager.java
+--- tuprolog-3.1.0.orig/src/alice/tuprologx/ide/LibraryManager.java 2017-10-08 17:06:55.796627373 +0200
++++ tuprolog-3.1.0/src/alice/tuprologx/ide/LibraryManager.java 2017-10-08 17:20:18.378593806 +0200
+@@ -19,7 +19,7 @@
+
+ import alice.tuprolog.*;
+ import alice.tuprolog.InvalidLibraryException;
+-import alice.util.AssemblyCustomClassLoader;
++//import alice.util.AssemblyCustomClassLoader;
+
+ import java.io.File;
+ import java.net.URL;
+@@ -27,7 +27,7 @@
+ import java.util.ArrayList;
+ import java.util.Hashtable;
+ import java.util.StringTokenizer;
+-import cli.System.Reflection.Assembly;
++//import cli.System.Reflection.Assembly;
+
+ /**
+ * A dynamic manager for tuProlog libraries.
+@@ -156,10 +156,7 @@
+ // .NET
+ if(System.getProperty("java.vm.name").equals("IKVM.NET"))
+ {
+- Assembly asm = Assembly.LoadFrom(file.getPath());
+- loader = new AssemblyCustomClassLoader(asm, new URL[]{url});
+- libraryClassname = "cli." + libraryClassname.substring(0,
+- libraryClassname.indexOf(",")).trim();
++ throw new InvalidLibraryException(libraryClassname,-1,-1);
+ }
+ // JVM
+ else
+diff -urN tuprolog-3.1.0.orig/src/alice/util/AssemblyCustomClassLoader.java tuprolog-3.1.0/src/alice/util/AssemblyCustomClassLoader.java
+--- tuprolog-3.1.0.orig/src/alice/util/AssemblyCustomClassLoader.java 2017-10-08 17:06:55.863627370 +0200
++++ tuprolog-3.1.0/src/alice/util/AssemblyCustomClassLoader.java 1970-01-01 01:00:00.000000000 +0100
+@@ -1,21 +0,0 @@
+-package alice.util;
+-
+-import java.net.URL;
+-
+-public class AssemblyCustomClassLoader extends java.net.URLClassLoader
+-{
+- public AssemblyCustomClassLoader(cli.System.Reflection.Assembly asm, URL[] urls)
+- {
+- super(new java.net.URL[0], new ikvm.runtime.AssemblyClassLoader(asm));
+- // explicitly calling addURL() is safer than passing it to the super constructor,
+- // because this class loader instance may be used during the URL construction.
+- for (URL url : urls) {
+- addURL(url);
+- }
+- }
+-
+- public void addUrl(URL url)
+- {
+- addURL(url);
+- }
+-}
+\ Manca newline alla fine del file
+diff -urN tuprolog-3.1.0.orig/src/alice/util/proxyGenerator/Generator.java tuprolog-3.1.0/src/alice/util/proxyGenerator/Generator.java
+--- tuprolog-3.1.0.orig/src/alice/util/proxyGenerator/Generator.java 2017-10-08 17:06:55.877627369 +0200
++++ tuprolog-3.1.0/src/alice/util/proxyGenerator/Generator.java 2017-10-08 17:18:20.819598723 +0200
+@@ -1,7 +1,7 @@
+ package alice.util.proxyGenerator;
+ import javax.tools.*;
+
+-import cli.System.Reflection.Assembly;
++//import cli.System.Reflection.Assembly;
+
+ import java.lang.reflect.*;
+ import java.util.*;
+@@ -29,7 +29,7 @@
+ }
+
+ if(System.getProperty("java.vm.name").equals("IKVM.NET"))
+- ikvm.runtime.Startup.addBootClassPathAssemby(Assembly.Load("IKVM.OpenJDK.Tools"));
++ throw new UnsupportedOperationException("IKVM.NET not supported!");
+
+ jc = ToolProvider.getSystemJavaCompiler();
+ if (jc == null) {
diff --git a/dev-lang/tuprolog/metadata.xml b/dev-lang/tuprolog/metadata.xml
new file mode 100644
index 000000000000..fe29a2cf16ab
--- /dev/null
+++ b/dev-lang/tuprolog/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>prolog@gentoo.org</email>
+ <name>Prolog</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">tuprolog</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/tuprolog/tuprolog-2.9.2.ebuild b/dev-lang/tuprolog/tuprolog-2.9.2.ebuild
new file mode 100644
index 000000000000..7de1440cd339
--- /dev/null
+++ b/dev-lang/tuprolog/tuprolog-2.9.2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="tuProlog is a light-weight Prolog for Internet applications and infrastructures"
+HOMEPAGE="http://tuprolog.unibo.it/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc examples test"
+
+RDEPEND=">=virtual/jdk-1.7:=
+ dev-java/javassist:3"
+
+DEPEND="${RDEPEND}
+ dev-java/ant-core
+ test? (
+ dev-java/ant-junit4:0
+ dev-java/junit:4
+ dev-java/hamcrest-core:1.3
+ )"
+
+S="${WORKDIR}"/${P}
+
+EANT_GENTOO_CLASSPATH="javassist:3"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-ikvm.patch
+ epatch "${FILESDIR}"/${P}-no-dynamic-object-test.patch
+
+ cp "${FILESDIR}"/build-${PV}.xml "${S}"/build.xml || die
+}
+
+src_compile() {
+ eant jar $(use_doc)
+}
+
+src_test() {
+ cd "${S}"/dist
+ java-pkg_jar-from junit:4
+ java-pkg_jar-from hamcrest-core:1.3
+ cd "${S}"
+ ANT_TASKS="ant-junit4" eant test || die "eant test failed"
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+ java-pkg_dojar dist/2p.jar
+
+ if use doc ; then
+ java-pkg_dohtml -r docs/* || die
+ dodoc doc/tuprolog-guide.pdf
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins doc/examples/*.pl
+ fi
+}
diff --git a/dev-lang/tuprolog/tuprolog-3.0.1.ebuild b/dev-lang/tuprolog/tuprolog-3.0.1.ebuild
new file mode 100644
index 000000000000..e33e5e5b7142
--- /dev/null
+++ b/dev-lang/tuprolog/tuprolog-3.0.1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="tuProlog is a light-weight Prolog for Internet applications and infrastructures"
+HOMEPAGE="http://tuprolog.unibo.it/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="LGPL-3 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples test"
+
+RDEPEND=">=virtual/jdk-1.8:=
+ dev-java/javassist:3
+ dev-java/commons-lang:3.1"
+
+DEPEND="${RDEPEND}
+ dev-java/ant-core
+ test? (
+ dev-java/ant-junit4:0
+ dev-java/junit:4
+ dev-java/hamcrest-core:1.3
+ )"
+
+S="${WORKDIR}"/${P}
+
+EANT_GENTOO_CLASSPATH="javassist:3,commons-lang-3.1"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-ikvm.patch
+ epatch "${FILESDIR}"/${P}-oolibrary-unit-test.patch
+
+ cp "${FILESDIR}"/build-${PV}.xml "${S}"/build.xml || die
+}
+
+src_compile() {
+ eant jar $(use_doc)
+}
+
+src_test() {
+ cd "${S}"/dist
+ java-pkg_jar-from junit:4
+ java-pkg_jar-from hamcrest-core:1.3
+ cd "${S}"
+ ANT_TASKS="ant-junit4" eant test || die "eant test failed"
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+ java-pkg_dojar dist/2p.jar
+
+ if use doc ; then
+ java-pkg_dohtml -r docs/* || die
+ dodoc doc/tuprolog-guide.pdf
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins doc/examples/*.pl
+ fi
+}
diff --git a/dev-lang/tuprolog/tuprolog-3.1.0.ebuild b/dev-lang/tuprolog/tuprolog-3.1.0.ebuild
new file mode 100644
index 000000000000..3da80e1506c2
--- /dev/null
+++ b/dev-lang/tuprolog/tuprolog-3.1.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="tuProlog is a light-weight Prolog for Internet applications and infrastructures"
+HOMEPAGE="http://tuprolog.unibo.it/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="LGPL-3 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples test"
+
+RDEPEND=">=virtual/jdk-1.8:=
+ dev-java/javassist:3
+ dev-java/commons-lang:3.1"
+
+DEPEND="${RDEPEND}
+ dev-java/ant-core
+ test? (
+ dev-java/ant-junit4:0
+ dev-java/junit:4
+ dev-java/hamcrest-core:1.3
+ )"
+
+S="${WORKDIR}"/${P}
+
+EANT_GENTOO_CLASSPATH="javassist:3,commons-lang-3.1"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-ikvm.patch
+
+ cp "${FILESDIR}"/build-${PV}.xml "${S}"/build.xml || die
+}
+
+src_compile() {
+ eant jar $(use_doc)
+}
+
+src_test() {
+ cd "${S}"/dist
+ java-pkg_jar-from junit:4
+ java-pkg_jar-from hamcrest-core:1.3
+ cd "${S}"
+ ANT_TASKS="ant-junit4" eant test || die "eant test failed"
+}
+
+src_install() {
+ java-pkg_dojar dist/${PN}.jar
+ java-pkg_dojar dist/2p.jar
+
+ if use doc ; then
+ java-pkg_dohtml -r docs/* || die
+ dodoc doc/tuprolog-guide.pdf
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins doc/examples/*.pl
+ fi
+}
diff --git a/dev-lang/vala/Manifest b/dev-lang/vala/Manifest
new file mode 100644
index 000000000000..1cf4dc9fbf22
--- /dev/null
+++ b/dev-lang/vala/Manifest
@@ -0,0 +1,13 @@
+DIST vala-0.32.1.tar.xz 2759528 SHA256 dd0d47e548a34cfb1e4b04149acd082a86414c49057ffb79902eb9a508a161a9 SHA512 d59db1bd9132f93f187c30ccabff9d21fe8685293a6494e5b009d883de4f844cc4b8dc5d3b6eb4e026a93490f2e4ff7ba83ff22a093c6f8f85e68d83f5fe1bb0 WHIRLPOOL d61a171cacb62f008e15408729b809f9a13f11880395526a9890ddfed1a41d0ad021c57c8d9d93ffdf6f99ee5231fffdb4fa1763d8b7238a8f62ae67f4aa22ca
+DIST vala-0.34.8.tar.xz 2778228 SHA256 22899bad63436ccfab4abc44face3bf4c1e4e72dea5891d67626dc360078c0a3 SHA512 03739173aa2b4e5d476037c77ac86543b97bd6eeb94f40dcce952da127e32baefa0dfa83f9d6e8ea254d4aee5ecd557964520926239bd119da72c771e30ece14 WHIRLPOOL b5874c5b08427d758fdd0e02f1f431296acc7451c609c75b06017e26ea11c835b89ddd1803de0a24f957b0c7f2ad6f4473c674b8cc76317a84c0d6d3b5ddaf8b
+DIST vala-0.34.9.tar.xz 2783952 SHA256 36662f77e36abf9ce6f46e3015c4512276e6361553bdcc2d75566ed83a1da19d SHA512 8128dfbb50d0db2317feb4a358310de972ecb6f4dccaceb4d55cf3a024f4d83422e3137c92238e1a0a0b4766367ad307909a1310445017c71944ac30fc68d01f WHIRLPOOL acd16be2cfea35257f041e5dcf4e5b68fd06f55929b55dcbb95624bc25c3b4230ab6cda98ef5dad7fceb31958a33318897698aec5fdbc5ba33d766cfc083b5c5
+DIST vala-0.36.4.tar.xz 2846516 SHA256 e9f23ce711c1a72ce664d10946fbc5953f01b0b7f2a3562e7a01e362d86de059 SHA512 cc804b9ad0bda4968660084c5d5e38761b0d478a6c504d3d2e6188fdd2deef4a4315d7278191f19b3bcbee66e0b02733deb6050d168305c85cef8f203ecc13ac WHIRLPOOL 9763176101af16ae516e5183000297dcb629805d172be245bea5b02cebc04a7c3dd8227565c29170cd1ad896aef1f4a9bfd52ffebeb2ee024c0bd877a69ce348
+DIST vala-0.36.5.tar.xz 2849320 SHA256 7ae7eb8a976005afecf4f647b9043f2bb11e8b263c7fe9e905ab740b3d8a9f40 SHA512 1059fb52aa0d40fc04e8bc46a8cd54e1538554aa32e0e92e4a27779558fa1a9f460988d27667a613d958f3eb9dbe02fdac7e1632b91e8324bdfb5663e1cf0aac WHIRLPOOL e3248416bfb326408f970bb58d38dcdb738782660d48e16286f79ad54a70f736dd88f6a832c1518885684f17e2cc7adc109fcb74b7d0d6d7edeaee3703199137
+EBUILD vala-0.32.1.ebuild 730 SHA256 0c24d4bfc5c093b0d771500ed88b61c28000f2753304bcb8ad3f7f7c44755854 SHA512 398bbcbedcce2e1dabd2c86d0c770f78bd380833e117d07196872e732a7763213747996ef5a44a68d4bac52f0a30de6f4361620acfaf3e87b1278771d02cfbbd WHIRLPOOL f7f5e19008d144ec1ad87bddfce80e4f0ae554730df70300345ba0c0727283467b198d7ec6b11d69f69c4d39e56e8d91fa14725d7937ac880489eae53390d695
+EBUILD vala-0.34.8.ebuild 730 SHA256 e9a947a23d4f8fc4f0857e4a0529cf30e2ae3a913ee24e3a0a270c67ee85165c SHA512 c8b77206bb700f239dd7900b2dcba92be66a817292945f5e4c497e60eff6560ab12236f5ade4ffa4d868f9292b709e782de16d3ee7b890d8fe4ce3ceafd062b8 WHIRLPOOL 94ac6515895c74471a17b507453e7714814f3e51e4af499b5601cab235df11b195799b88113c4648c667ee2b96a618c72ec0762ba789d863416af94bd567fd12
+EBUILD vala-0.34.9.ebuild 739 SHA256 ac50f9bb19dc14ffd3dc52930cc7e988cab3fe1f5b04452f981ce5c81b34a228 SHA512 7311b7890f6850f2da6a1174b6a3aff9aa5b7ef36f96d6e391663168e956656237c45340c1672b7b9fe007128da7ecde8215cbdba7f9f3f7379293425bccc098 WHIRLPOOL 700af624f8500579d84a41d0947ae803c3656b472993c8464f2db0c2c626e9f1f38a307a2cae9a8f83185247616a8f27d7b9b43ae07fdf2d073f123048ba5ec3
+EBUILD vala-0.36.4.ebuild 822 SHA256 bc97dde1ff64dc6cb947502ef804c7951cc526b5054c82e27bf35bfce1fadbe4 SHA512 6071be0ef45009914e22d54f6f860f3f77ef1d7d5338d1743eac455863a26eaa2f7bb740e72bc84e4d8edd208f180001c58553a79acae9d17baee3e38f62f27a WHIRLPOOL 8cabb893c484c6764b9cb1c5ed8b0623970a19f1fc9e189ad2ef8ca7df3190be755c22c4970fe8f701fa4ea966920379a720475b3833122652b2687d8ca69e6c
+EBUILD vala-0.36.5.ebuild 822 SHA256 bc97dde1ff64dc6cb947502ef804c7951cc526b5054c82e27bf35bfce1fadbe4 SHA512 6071be0ef45009914e22d54f6f860f3f77ef1d7d5338d1743eac455863a26eaa2f7bb740e72bc84e4d8edd208f180001c58553a79acae9d17baee3e38f62f27a WHIRLPOOL 8cabb893c484c6764b9cb1c5ed8b0623970a19f1fc9e189ad2ef8ca7df3190be755c22c4970fe8f701fa4ea966920379a720475b3833122652b2687d8ca69e6c
+MISC ChangeLog 8137 SHA256 9109581a2ef6a2f25a876c7340865db919a688f38438b4ef3dc158d51e670306 SHA512 39e4a6bf15101b118791fa30f5bc9f0644fbbfa954707943dfcfa356538912ba40a4c4c5c9652af572c018fc9726d1b1047ca23a6cf21def29090d1c6aa2d6c7 WHIRLPOOL 97e351be825c1cbb44aae8b1338cf2405a8c2d6756e6e55edb1d12e5c2e35432767df1fcbd7ca3144fb38aa34ea74e9295996ca03b98f177c6e072396d9b9ae3
+MISC ChangeLog-2015 27512 SHA256 b41c5e4d338cd3cb357a087df8f99de3c96ad61397fdfc146a152d3c854d0856 SHA512 de1364c00a1bcea5640816c2688a6d0ce6313f26804f1948ce25e898e177fb5a70ba6e9ba5a780dd100c67b05ca598710e7c616641a5cfaa12156a69167b5649 WHIRLPOOL 79bfd4971d0c0a12a387de00a1a37dc04608187557a5d65d50a2cb3790c17419ff02b6405121f7999f0fb185447c40133371fe9aeae4d08f0e02d51118785837
+MISC metadata.xml 255 SHA256 9fc44b46f5b5a7472c3f990a3f045d9fc1bcb8868f3396a5c66069a751e58d3f SHA512 1970039db79f50391650a9fea933485c6102d1165946ab8efe9395403a02f49d4b17c2942795282469ac7c0306e7353002dcbaa797fb1060982b31ea3540b98b WHIRLPOOL 9e145d73c5738c79105fc790cf9a516584b3ea1afdcc3eac1ea08659f78a19b68afe3cd85a028bf26fe97823c8f8d32fabe8c563dcbb3e6b5a77960b4af52f76
diff --git a/dev-lang/vala/metadata.xml b/dev-lang/vala/metadata.xml
new file mode 100644
index 000000000000..5f429420cb76
--- /dev/null
+++ b/dev-lang/vala/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>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/vala/vala-0.32.1.ebuild b/dev-lang/vala/vala-0.32.1.ebuild
new file mode 100644
index 000000000000..fdcc64bbe9c4
--- /dev/null
+++ b/dev-lang/vala/vala-0.32.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit gnome2
+
+DESCRIPTION="Compiler for the GObject type system"
+HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
+
+LICENSE="LGPL-2.1"
+SLOT="0.32"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/vala-common-${PV}
+"
+DEPEND="${RDEPEND}
+ !${CATEGORY}/${PN}:0
+ dev-libs/libxslt
+ sys-devel/flex
+ virtual/pkgconfig
+ virtual/yacc
+ test? (
+ dev-libs/dbus-glib
+ >=dev-libs/glib-2.26:2
+ dev-libs/gobject-introspection )
+"
+
+src_configure() {
+ gnome2_src_configure --disable-unversioned
+}
diff --git a/dev-lang/vala/vala-0.34.8.ebuild b/dev-lang/vala/vala-0.34.8.ebuild
new file mode 100644
index 000000000000..e5d2bad715f9
--- /dev/null
+++ b/dev-lang/vala/vala-0.34.8.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit gnome2
+
+DESCRIPTION="Compiler for the GObject type system"
+HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
+
+LICENSE="LGPL-2.1"
+SLOT="0.34"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/vala-common-${PV}
+"
+DEPEND="${RDEPEND}
+ !${CATEGORY}/${PN}:0
+ dev-libs/libxslt
+ sys-devel/flex
+ virtual/pkgconfig
+ virtual/yacc
+ test? (
+ dev-libs/dbus-glib
+ >=dev-libs/glib-2.26:2
+ dev-libs/gobject-introspection )
+"
+
+src_configure() {
+ gnome2_src_configure --disable-unversioned
+}
diff --git a/dev-lang/vala/vala-0.34.9.ebuild b/dev-lang/vala/vala-0.34.9.ebuild
new file mode 100644
index 000000000000..0a3f3d4a293e
--- /dev/null
+++ b/dev-lang/vala/vala-0.34.9.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit gnome2
+
+DESCRIPTION="Compiler for the GObject type system"
+HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
+
+LICENSE="LGPL-2.1"
+SLOT="0.34"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/vala-common-${PV}
+"
+DEPEND="${RDEPEND}
+ !${CATEGORY}/${PN}:0
+ dev-libs/libxslt
+ sys-devel/flex
+ virtual/pkgconfig
+ virtual/yacc
+ test? (
+ dev-libs/dbus-glib
+ >=dev-libs/glib-2.26:2
+ dev-libs/gobject-introspection )
+"
+
+src_configure() {
+ gnome2_src_configure --disable-unversioned
+}
diff --git a/dev-lang/vala/vala-0.36.4.ebuild b/dev-lang/vala/vala-0.36.4.ebuild
new file mode 100644
index 000000000000..6b41e12db525
--- /dev/null
+++ b/dev-lang/vala/vala-0.36.4.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit gnome2
+
+DESCRIPTION="Compiler for the GObject type system"
+HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
+
+LICENSE="LGPL-2.1"
+SLOT="0.36"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/vala-common-${PV}
+"
+DEPEND="${RDEPEND}
+ !${CATEGORY}/${PN}:0
+ dev-libs/libxslt
+ sys-devel/flex
+ virtual/pkgconfig
+ virtual/yacc
+ test? (
+ dev-libs/dbus-glib
+ >=dev-libs/glib-2.26:2
+ dev-libs/gobject-introspection )
+"
+
+src_configure() {
+ # weasyprint enables generation of PDF from HTML
+ gnome2_src_configure \
+ --disable-unversioned \
+ VALAC=: \
+ WEASYPRINT=:
+}
diff --git a/dev-lang/vala/vala-0.36.5.ebuild b/dev-lang/vala/vala-0.36.5.ebuild
new file mode 100644
index 000000000000..6b41e12db525
--- /dev/null
+++ b/dev-lang/vala/vala-0.36.5.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit gnome2
+
+DESCRIPTION="Compiler for the GObject type system"
+HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
+
+LICENSE="LGPL-2.1"
+SLOT="0.36"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/vala-common-${PV}
+"
+DEPEND="${RDEPEND}
+ !${CATEGORY}/${PN}:0
+ dev-libs/libxslt
+ sys-devel/flex
+ virtual/pkgconfig
+ virtual/yacc
+ test? (
+ dev-libs/dbus-glib
+ >=dev-libs/glib-2.26:2
+ dev-libs/gobject-introspection )
+"
+
+src_configure() {
+ # weasyprint enables generation of PDF from HTML
+ gnome2_src_configure \
+ --disable-unversioned \
+ VALAC=: \
+ WEASYPRINT=:
+}
diff --git a/dev-lang/whitespace/Manifest b/dev-lang/whitespace/Manifest
new file mode 100644
index 000000000000..c3968112c515
--- /dev/null
+++ b/dev-lang/whitespace/Manifest
@@ -0,0 +1,9 @@
+AUX whitespace-0.4-ghc-7.10.patch 814 SHA256 15a3dda37aa27f29975ee91474cd97b3dd5414e5b0206c4ce394bf0e07740420 SHA512 b0202b848539ef1d04974fce40facc8c0090d35da77d6fc98cb7da296efb89a8b81efda1f3dd045115417fc1471b4298be913992dd4a9772642c31ec5960fa90 WHIRLPOOL d43b025c833198362c7eafef26634666495a8103ce9ab93beab2b2d9c0e8dc2b96b2dd30877f5600be4ecb9586aac43d41086a84fcae5d9c9515eb2fa6aef0ca
+AUX whitespace-cabal.patch 948 SHA256 9e8db3255b4255ca53e39cc49ecb3fcec2381b16f479e8af675ab8f20ed51218 SHA512 5c160defe828f6a533a0faa91ef3db19c8cb0edccc421fbf387f28d7dc681a5f66b4c098108893fad41e22643ec74f265f7ce00119e70f0b98dc2d1a9f7aba46 WHIRLPOOL d7842840cb04d1d25c286995ba22bdb88da9a47922ceca130479b598bef034ad298bd2ef6222c859732d27d05d49fefe4f777017cbf8f55ece1e23e39e7e3fa3
+DIST whitespace-0.4.tar.gz 16428 SHA256 e9133161bf712cd584334a4e9d75b1eb7dd64e48f956a73fc6e833a6bc5a09f9 SHA512 2a1c932d650f6cfd55bb7c08b8882086143bc9ec2b0f639a7452116d86f12daff1a1268d7451003a6bf8635fbf1ad23e9203410fd423ce16d4239c1b552d7046 WHIRLPOOL 30a3a9ab19b43868c012a27d4cf990029db598fd7cfcb7a762e52031c0c5d6d0e278e9670b7c0d0fc637f73ad00e7fc08d9bec840e6deda1b8e208b07ffdfa3d
+DIST wspace-0.3.tgz 15471 SHA256 53e47bf05df991c1d0f88a75cf5208bfc42d42b87f8fe3e8ee6a05ac78544a73 SHA512 d162e804b0b6c4cba164552678ef3a094153e89a0df5f684e52b93229d88699cf9c7fd31641b88fd8c4653c158b1e77193ebd9cd1edfc47863a09798f67d3487 WHIRLPOOL 48f71bab55c281607d0d537d9b532b95439744f7e11a6fd96b60145ef2489413ebd85617a3292b2a016eadc9d4cf6146505b614d50fba0d1c9b156be1ba87db9
+EBUILD whitespace-0.3.ebuild 675 SHA256 6bb2b8eb46cf5c17efb0d139fb17688339df9e11d48777f583015dea85153226 SHA512 7c5a706f4b3a17a68c552eacf2af4d7e0794b0a09aa27801f6cbfed1e70a0030590bc09576aa7fc78b22484d32d550704cb00648db5390c9ebccf8b064461a7b WHIRLPOOL 4eab2348bf96b29a92aa8f10df414fd796b6857ffb94300d8f6bd3ddc8810a6c366d20f477089df629b7b3ba23a1e4c0ded92441d1591c091d8a362adaded071
+EBUILD whitespace-0.4.ebuild 612 SHA256 1f49653adac237a40defbb8a1d97a2db3b1547505e9b6eba36b4a812c6b778ce SHA512 2fdf6bf29e5c03471855ee87ad6841b3d9f2e219aac75f3ed65c7a059b83f3aab26b3919d8979d04429c5da7c549e9e3011dfb1abc8010c4b845387b7357311f WHIRLPOOL bbee2377170ec98da271ffad6ef712c14d455ac27351b6380af33292f51393ab32db1d63f59b4afd68d12dc97b64266805ece192ffc0da1da3c8e59c803aa1c8
+MISC ChangeLog 3428 SHA256 532b77d52e5fa12b1d645f9f8058415270c3e8bf8a5f427d72b63a16c1cef38f SHA512 b2077fc228f4c4e4c199a0b60e7888118d806fabe1895ad049a72a8a3a7a19fe419bfa8158de7f0ced7ffe7429b8454147a5374303d86f38626e509148996b55 WHIRLPOOL e00e8cc4fe8edec98d3d38ec22a5c49e6c0891d524946fb550c0498712bf9833180804249e9a9d3d45bba0bf382cad209ef9afce44751bf3727acb12298985e4
+MISC ChangeLog-2015 393 SHA256 b302d15a7dfb0533ac484488ff2c8552f52c7949caa239d608e3acdf108cb3f2 SHA512 60822e8c4aa66a5394d79d6e62f00a7f291b3ff6ad51f4b909b20af21b54129941fbb6d230b237043afb50e4415358208861932782be9c2fe733918099ac9130 WHIRLPOOL a9cecda29aa22a28178adb668f29ae3003498376f821d0aaefc08c45c597ea55bf9f6eb9482b544560fc5fb4c49d30cd4b12fa0e9f328c68924a66ce000e5b5f
+MISC metadata.xml 335 SHA256 2234156de5042e4f80e4a5953dfaecf86a620982eda2ea9c9a448f2741460336 SHA512 eea77baf66a4e0d4bd5a703a6cf31258f47bd2f9f2f6975fa7b4ee401db4fdd6a27e6f0698313d71a059f2ae14b05f5148d2e844f4b7a05d7e5e49b4302a803a WHIRLPOOL 6dd641b402e25c002de63bca99d922c9908f4dc821a5a3dd5da1466d473dcc6535a6954a0c5b4ce42d4966695cf512f426a7764fe7f322b2cea1090953ad238e
diff --git a/dev-lang/whitespace/files/whitespace-0.4-ghc-7.10.patch b/dev-lang/whitespace/files/whitespace-0.4-ghc-7.10.patch
new file mode 100644
index 000000000000..6ee31f4e66e3
--- /dev/null
+++ b/dev-lang/whitespace/files/whitespace-0.4-ghc-7.10.patch
@@ -0,0 +1,37 @@
+diff --git a/VM.hs b/VM.hs
+index 8ef93ce..e8113a0 100644
+--- a/VM.hs
++++ b/VM.hs
+@@ -1,7 +1,7 @@
+ module VM where
+
+-import Array
+-import IO
++import Data.Array
++import System.IO
+ import System.Random
+
+ {- Stack machine for running whitespace programs -}
+diff --git a/main.hs b/main.hs
+index 83c60b7..a22ff15 100644
+--- a/main.hs
++++ b/main.hs
+@@ -26,7 +26,7 @@ import Input
+ import VM
+ import Tokens
+
+-import System(getArgs)
++import System.Environment (getArgs)
+
+ main :: IO ()
+ main = do
+diff --git a/whitespace.cabal b/whitespace.cabal
+index 95ae434..e57ac58 100644
+--- a/whitespace.cabal
++++ b/whitespace.cabal
+@@ -15,4 +15,4 @@ Extra-Source-Files: VM.hs Tokens.hs Input.hs
+
+ Executable wspace
+ Main-is: main.hs
+- Build-Depends: haskell98, random
++ Build-Depends: base, array, random
diff --git a/dev-lang/whitespace/files/whitespace-cabal.patch b/dev-lang/whitespace/files/whitespace-cabal.patch
new file mode 100644
index 000000000000..f686d8c4851d
--- /dev/null
+++ b/dev-lang/whitespace/files/whitespace-cabal.patch
@@ -0,0 +1,24 @@
+diff -u -N WSpace/Setup.lhs WSpace.patched/Setup.lhs
+--- WSpace/Setup.lhs 1970-01-01 01:00:00.000000000 +0100
++++ WSpace.patched/Setup.lhs 2013-08-09 01:14:00.415264165 +0200
+@@ -0,0 +1,3 @@
++#!/usr/bin/env runhaskell
++> import Distribution.Simple
++> main = defaultMain
+diff -u -N WSpace/WSpace.cabal WSpace.patched/WSpace.cabal
+--- WSpace/WSpace.cabal 1970-01-01 01:00:00.000000000 +0100
++++ WSpace.patched/WSpace.cabal 2013-08-09 01:44:19.129339177 +0200
+@@ -0,0 +1,10 @@
++name: WSpace
++version: 0.3
++synopsis: Whitespace implementation in Haskell.
++category: Language
++Build-Type: Simple
++cabal-version: >= 1.2
++
++Executable wspace
++ Main-Is: main.hs
++ Build-Depends: haskell98
+Common subdirectories: WSpace/docs and WSpace.patched/docs
+Common subdirectories: WSpace/emacs and WSpace.patched/emacs
+Common subdirectories: WSpace/examples and WSpace.patched/examples
diff --git a/dev-lang/whitespace/metadata.xml b/dev-lang/whitespace/metadata.xml
new file mode 100644
index 000000000000..41574f2e48b6
--- /dev/null
+++ b/dev-lang/whitespace/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>haskell@gentoo.org</email>
+ <name>Gentoo Haskell</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">haroldl/whitespace-nd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/whitespace/whitespace-0.3.ebuild b/dev-lang/whitespace/whitespace-0.3.ebuild
new file mode 100644
index 000000000000..a3d12e7590f6
--- /dev/null
+++ b/dev-lang/whitespace/whitespace-0.3.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+CABAL_FEATURES="bin"
+
+inherit haskell-cabal
+
+DESCRIPTION="Whitespace language interpreter in haskell"
+HOMEPAGE="http://compsoc.dur.ac.uk/whitespace/"
+SRC_URI="http://compsoc.dur.ac.uk/whitespace/downloads/wspace-${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+DEPEND="dev-lang/ghc"
+RDEPEND=""
+
+S="${WORKDIR}/WSpace"
+
+src_prepare() {
+ epatch -p1 "${FILESDIR}/${PN}-cabal.patch"
+}
+
+src_install() {
+ cabal_src_install
+
+ dohtml docs/tutorial.html || die "dohtml failed"
+ use examples && { dodoc -r examples || die "dodoc failed"; }
+}
diff --git a/dev-lang/whitespace/whitespace-0.4.ebuild b/dev-lang/whitespace/whitespace-0.4.ebuild
new file mode 100644
index 000000000000..2074c9e8c41e
--- /dev/null
+++ b/dev-lang/whitespace/whitespace-0.4.ebuild
@@ -0,0 +1,29 @@
+# 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.9999
+
+CABAL_FEATURES="bin"
+inherit eutils haskell-cabal
+
+DESCRIPTION="Whitespace, an esoteric programming language"
+HOMEPAGE="https://github.com/haroldl/whitespace-nd"
+SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.6.0.3
+ dev-haskell/random
+ >=dev-lang/ghc-6.10.4
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ghc-7.10.patch
+}
diff --git a/dev-lang/xsb/Manifest b/dev-lang/xsb/Manifest
new file mode 100644
index 000000000000..ece139b9e387
--- /dev/null
+++ b/dev-lang/xsb/Manifest
@@ -0,0 +1,9 @@
+DIST XSB360.tar.gz 12842882 SHA256 bb8d2b30e598574e263ddb48b7569e5582953a0c4f8b16d55f6bbf306e9e7faa SHA512 2ac2f4d4c7501479648b7f618815d4cd996969791a617f2148ef7498cf08bacd67eab298136303b6804cb689129ae3365e1490ec693f2232f9c9f1ad515d9c6c WHIRLPOOL 057a1939ff4115c2fc4cd91f10458a4d89847b6394723ea05a4a86d9e7986ee3c03f7ff1b2eff2389ec3c1be7d20b69cdf77be016066cf261b2af131dfbb2176
+DIST XSB370.tar.gz 12322913 SHA256 282936b17ca581e6f546a4cb15687653ad19144897c4776b01a8caf7027ebc6d SHA512 e2c11b0e5fbbffc2fb6d493e39b7dd74de43509ea1c844f1b3e5d1002c116d6fb8b245905b7b512499e40765a6603d4bef883052bdeec4a3078011c305f85a9f WHIRLPOOL 7fad63fbd66e902eaccc5ae1e542787a824d4396df1a49f08b003cada4f424eaf563b0eff693296e7adecb46bfd24931938baf5dde95ad01694dfcdf4b2fb4ef
+DIST xsb-3.6.0-gentoo-patchset-4.tar.gz 7513 SHA256 99e03006242b027bdc4738cc7fec71f501aad0bad0280bc3dabf20ec677f478f SHA512 bb7ba7836fa2df7a54fd2837b4cb760f7ae0e9511bc0a4b2be8cba89ed4aeedda6712937a4748bd9e9ee16366d442fd962a121dbf83017e2199eb3a287efb1d5 WHIRLPOOL 03c6bd4bb2c9dea1bf67ab623102c194dd23fa2ae3a97723e832bf9390bf2666e484e4ab2149b094216fedcfe7316de7f6753fc4c91ca1619799d0fa306855f4
+DIST xsb-3.7.0-gentoo-patchset-3.tar.gz 5636 SHA256 cdbdb8f6cd16fb2df24666fd4a91f00a54b30c71170588d84e9894410f70ad6c SHA512 bee6d62b900c9ee3a373dfa0ad7362b18c748bb9e0559a878534ed517067d753e1fa79277b0588133a1eeceafcd56b4dcc9ff81892309f6c6666150baaaaf047 WHIRLPOOL 5165841bebb0bf9430865486b923e612a3db7746073e226da4ce71bcef76e2d2c1f8c04a1901dfdea95d59ba3bbbf8b367a106372559d70d850d66c0eb187f9a
+EBUILD xsb-3.6.0.ebuild 4198 SHA256 f679c9b350b72a50c8545f1e0f26e8a9daf84c6a82a19c22906c8997b28a7b21 SHA512 2c6bb4e577457fa658a63b15b6930bd512d38a5250d4725aa9ac2e0446a7e55ea69d6d96c1d71415615fb818796979bc1d19fd17a662b76b89d8e429572c2755 WHIRLPOOL 0e351a2520276aad9827acc3e477ff0e46890992e11a0c17c021994ccc342f73e6f23dbd866d524f91d1ed7b29cffeaa5232f5440891b0b13545a81b0063abb3
+EBUILD xsb-3.7.0.ebuild 4244 SHA256 a06274cb5747d1afad487de554c7cc2686c7a4707a0d03e5bfca44e684d0b45e SHA512 c414b73a696e2677dffcfb70ef69d18d1b66a7bda214091a16214f30b2d3a0759bef3503a73995b5b8fcad1804fd12f2cbbeac14dc8385beb4da532d67e90fd2 WHIRLPOOL f6bd3348adffc816b8579cb784d36ff9931404db2f604db3cbf5558911a14ee132af21927aae4ece6169d3a54475ec204e5e76ff63405f05989560f77130f037
+MISC ChangeLog 3447 SHA256 a7a6f091745bfac7569df6f5f358ffbd36d87408dfaba3c0c3dd19df5458089f SHA512 a1ef5f7f482d5ebfd05053cb2dc24978c6e09c1afcdb8fc89c5e38403dfb3e2c5f4aa8040f28965971cebd51769cbcf7b37d0b36a82f71f9cfb2c55e8ee65b8c WHIRLPOOL 13cb96ca99861972ae6580df07eaefd34475697940606b3eb65c436d9eb5f6e341bddd403810e87db3c6acdad21d69b248cf96730035de9c1f563c429cca639a
+MISC ChangeLog-2015 7567 SHA256 cd25588203a1be204d36038fcfc6754e6e2ee9dec00d4ea8849fd3badbd6d0cc SHA512 a4c74a38319aa2fff42b6a3f5f57fee7cb6656e8864a34f33e1febbe120a0f78fbfaa097c388833b4bc22fca05a8db14c40d6b3099c01ec26c17c55b5f26b197 WHIRLPOOL d3b57b1146a885249d0733272525e319a77c6b95c3f222f3b461e083409c606850b13a38df6696ff776161810f5751f9cd96f9ff50d909017f86b5c66138871c
+MISC metadata.xml 313 SHA256 2d35071317bbdabed57d1e54dded52926b0bba363897c2df68fd2eca720a9b2d SHA512 e271dc66bb407abe43ebc5b1fc27c318cc8082b4b14f43f1c33f3453e4a248c83ba2fcc73ba32a63828e172093a00b507f81c629d022799c4cd5a14417fc5ef0 WHIRLPOOL 4488ecee6e1eb23318b7726b682315f67047eddda5f0fc021d614aefbf6894f19aa40adf5648e34309eaca4e48a497a80d827317b7bcd1ae30d2cbb04a9161a8
diff --git a/dev-lang/xsb/metadata.xml b/dev-lang/xsb/metadata.xml
new file mode 100644
index 000000000000..cabb7385917b
--- /dev/null
+++ b/dev-lang/xsb/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>prolog@gentoo.org</email>
+ <name>Prolog</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">xsb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/xsb/xsb-3.6.0.ebuild b/dev-lang/xsb/xsb-3.6.0.ebuild
new file mode 100644
index 000000000000..f0ea2805b12f
--- /dev/null
+++ b/dev-lang/xsb/xsb-3.6.0.ebuild
@@ -0,0 +1,200 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P="XSB${PV//./}"
+
+PATCHSET_VER="4"
+
+inherit eutils autotools java-pkg-opt-2
+
+DESCRIPTION="XSB is a logic programming and deductive database system"
+HOMEPAGE="http://xsb.sourceforge.net"
+SRC_URI="http://xsb.sourceforge.net/downloads/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="curl debug iodbc java mysql odbc pcre threads xml"
+
+RDEPEND="curl? ( net-misc/curl )
+ iodbc? ( dev-db/libiodbc )
+ java? ( >=virtual/jdk-1.4:= )
+ mysql? ( virtual/mysql )
+ odbc? ( dev-db/unixODBC )
+ pcre? ( dev-libs/libpcre )
+ xml? ( dev-libs/libxml2 )"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/XSB
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+
+ cd "${S}"/build
+ eautoconf
+}
+
+src_configure() {
+ cd "${S}"/build
+
+ econf \
+ --prefix=/usr/$(get_libdir) \
+ --disable-optimization \
+ --without-smodels \
+ $(use_with odbc) \
+ $(use_with iodbc) \
+ $(use_enable threads mt) \
+ $(use_enable debug)
+
+ if use curl ; then
+ cd "${S}"/packages/curl
+ econf
+ fi
+
+ if use mysql ; then
+ cd "${S}"/packages/dbdrivers/mysql
+ econf
+ fi
+
+ if use odbc ; then
+ cd "${S}"/packages/dbdrivers/odbc
+ econf
+ fi
+
+ if use pcre ; then
+ cd "${S}"/packages/pcre
+ econf
+ fi
+
+ if use xml ; then
+ cd "${S}"/packages/xpath
+ econf
+ fi
+}
+
+src_compile() {
+ cd "${S}"/build
+
+ emake || die "emake failed"
+
+ # All XSB Packages are compiled using a single Prolog engine.
+ # Consequently they must all be compiled using a single make job.
+
+ cd "${S}"/packages
+ rm -f *.xwam
+ emake -j1 || die "emake packages failed"
+
+ if use curl ; then
+ emake -j1 curl || die "emake curl package failed"
+ emake -j1 sgml || die "emake sgml package failed"
+ if use xml ; then
+ emake -j1 xpath || die "emake xpath package failed"
+ fi
+ fi
+
+ if use mysql ; then
+ emake -j1 mysql || die "emake mysql package failed"
+ fi
+
+ if use odbc ; then
+ emake -j1 odbc || die "emake odbc package failed"
+ fi
+
+ if use pcre ; then
+ emake -j1 pcre || die "emake pcre package failed"
+ fi
+}
+
+src_install() {
+ cd "${S}"/build
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ local XSB_INSTALL_DIR=/usr/$(get_libdir)/xsb-${PV}
+ dosym ${XSB_INSTALL_DIR}/bin/xsb /usr/bin/xsb || die
+
+ cd "${S}"/packages
+ local PACKAGES=${XSB_INSTALL_DIR}/packages
+ insinto ${PACKAGES}
+ doins *.xwam || die
+
+ insinto ${PACKAGES}/chr
+ doins chr/*.xwam || die
+
+ insinto ${PACKAGES}/clpqr
+ doins clpqr/*.xwam || die
+
+ insinto ${PACKAGES}/gap
+ doins gap/*.xwam || die
+
+ insinto ${PACKAGES}/justify
+ doins justify/*.xwam || die
+ doins justify/*.H || die
+
+ insinto ${PACKAGES}/regmatch
+ doins regmatch/*.xwam || die
+ insinto ${PACKAGES}/regmatch/cc
+ doins regmatch/cc/*.H || die
+
+ insinto ${PACKAGES}/slx
+ doins slx/*.xwam || die
+
+ insinto ${PACKAGES}/wildmatch
+ doins wildmatch/*.xwam || die
+ insinto ${PACKAGES}/wildmatch/cc
+ doins wildmatch/cc/*.H || die
+
+ if use curl ; then
+ insinto ${PACKAGES}/curl
+ doins curl/*.xwam || die
+ insinto ${PACKAGES}/curl/cc
+ doins curl/cc/*.H || die
+ insinto ${PACKAGES}/sgml
+ doins sgml/*.xwam || die
+ insinto ${PACKAGES}/sgml/cc
+ doins sgml/cc/*.H || die
+ insinto ${PACKAGES}/sgml/cc/dtd
+ doins sgml/cc/dtd/* || die
+ if use xml ; then
+ insinto ${PACKAGES}/xpath
+ doins xpath/*xwam || die
+ insinto ${PACKAGES}/xpath/cc
+ doins xpath/cc/*.H || die
+ fi
+ fi
+
+ if use mysql || use odbc ; then
+ insinto ${PACKAGES}/dbdrivers
+ doins dbdrivers/*.xwam || die
+ doins dbdrivers/*.H || die
+ insinto ${PACKAGES}/dbdrivers/cc
+ doins dbdrivers/cc/*.H || die
+ if use mysql ; then
+ insinto ${PACKAGES}/dbdrivers/mysql
+ doins dbdrivers/mysql/*.xwam || die
+ insinto ${PACKAGES}/dbdrivers/mysql/cc
+ doins dbdrivers/mysql/cc/*.H || die
+ fi
+ if use odbc ; then
+ insinto ${PACKAGES}/dbdrivers/odbc
+ doins dbdrivers/odbc/*.xwam || die
+ insinto ${PACKAGES}/dbdrivers/odbc/cc
+ doins dbdrivers/odbc/cc/*.H || die
+ fi
+ fi
+
+ if use pcre ; then
+ insinto ${PACKAGES}/pcre
+ doins pcre/*.xwam || die
+ insinto ${PACKAGES}/pcre/cc
+ doins pcre/cc/*.H || die
+ fi
+
+ cd "${S}"
+ dodoc FAQ README || die
+}
diff --git a/dev-lang/xsb/xsb-3.7.0.ebuild b/dev-lang/xsb/xsb-3.7.0.ebuild
new file mode 100644
index 000000000000..8bd4db509d01
--- /dev/null
+++ b/dev-lang/xsb/xsb-3.7.0.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+MY_P="XSB${PV//./}"
+
+PATCHSET_VER="3"
+
+inherit eutils autotools java-pkg-opt-2
+
+DESCRIPTION="XSB is a logic programming and deductive database system"
+HOMEPAGE="http://xsb.sourceforge.net"
+SRC_URI="http://xsb.sourceforge.net/downloads/${MY_P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="curl debug iodbc java mysql odbc pcre threads xml"
+
+RDEPEND="curl? ( net-misc/curl )
+ iodbc? ( dev-db/libiodbc )
+ java? ( >=virtual/jdk-1.4:= )
+ mysql? ( virtual/mysql )
+ odbc? ( dev-db/unixODBC )
+ pcre? ( dev-libs/libpcre )
+ xml? ( dev-libs/libxml2 )"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/XSB
+
+src_prepare() {
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ if [[ -d "${WORKDIR}"/${PV} ]] ; then
+ epatch "${WORKDIR}"/${PV}
+ fi
+
+ cd "${S}"/build
+ eautoconf
+}
+
+src_configure() {
+ cd "${S}"/build
+
+ econf \
+ --prefix=/usr/$(get_libdir) \
+ --disable-optimization \
+ --without-smodels \
+ $(use_with odbc) \
+ $(use_with iodbc) \
+ $(use_enable threads mt) \
+ $(use_enable debug)
+
+ if use curl ; then
+ cd "${S}"/packages/curl
+ econf
+ fi
+
+ if use mysql ; then
+ cd "${S}"/packages/dbdrivers/mysql
+ econf
+ fi
+
+ if use odbc ; then
+ cd "${S}"/packages/dbdrivers/odbc
+ econf
+ fi
+
+ if use pcre ; then
+ cd "${S}"/packages/pcre
+ econf
+ fi
+
+ if use xml ; then
+ cd "${S}"/packages/xpath
+ econf
+ fi
+}
+
+src_compile() {
+ cd "${S}"/build
+
+ emake || die "emake failed"
+
+ # All XSB Packages are compiled using a single Prolog engine.
+ # Consequently they must all be compiled using a single make job.
+
+ cd "${S}"/packages
+ rm -f *.xwam
+ emake -j1 || die "emake packages failed"
+
+ if use curl ; then
+ emake -j1 curl || die "emake curl package failed"
+ emake -j1 sgml || die "emake sgml package failed"
+ if use xml ; then
+ emake -j1 xpath || die "emake xpath package failed"
+ fi
+ fi
+
+ if use mysql ; then
+ emake -j1 mysql || die "emake mysql package failed"
+ fi
+
+ if use odbc ; then
+ emake -j1 odbc || die "emake odbc package failed"
+ fi
+
+ if use pcre ; then
+ emake -j1 pcre || die "emake pcre package failed"
+ fi
+}
+
+src_install() {
+ cd "${S}"/build
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ local XSB_INSTALL_DIR=/usr/$(get_libdir)/xsb-${PV}
+ dosym ${XSB_INSTALL_DIR}/bin/xsb /usr/bin/xsb || die
+
+ cd "${S}"/packages
+ local PACKAGES=${XSB_INSTALL_DIR}/packages
+ insinto ${PACKAGES}
+ doins *.xwam || die
+
+ insinto ${PACKAGES}/chr
+ doins chr/*.xwam || die
+
+ insinto ${PACKAGES}/clpqr
+ doins clpqr/*.xwam || die
+
+ insinto ${PACKAGES}/gap
+ doins gap/*.xwam || die
+
+ insinto ${PACKAGES}/justify
+ doins justify/*.xwam || die
+ doins justify/*.H || die
+
+ insinto ${PACKAGES}/regmatch
+ doins regmatch/*.xwam || die
+ insinto ${PACKAGES}/regmatch/cc
+ doins regmatch/cc/*.H || die
+
+ insinto ${PACKAGES}/slx
+ doins slx/*.xwam || die
+
+ insinto ${PACKAGES}/wildmatch
+ doins wildmatch/*.xwam || die
+ insinto ${PACKAGES}/wildmatch/cc
+ doins wildmatch/cc/*.H || die
+
+ if use curl ; then
+ insinto ${PACKAGES}/curl
+ doins curl/*.xwam || die
+ insinto ${PACKAGES}/curl/cc
+ doins curl/cc/*.H || die
+ insinto ${PACKAGES}/sgml
+ doins sgml/*.xwam || die
+ insinto ${PACKAGES}/sgml/cc
+ doins sgml/cc/*.H || die
+ insinto ${PACKAGES}/sgml/cc/dtd
+ doins sgml/cc/dtd/* || die
+ if use xml ; then
+ insinto ${PACKAGES}/xpath
+ doins xpath/*xwam || die
+ insinto ${PACKAGES}/xpath/cc
+ doins xpath/cc/*.H || die
+ fi
+ fi
+
+ if use mysql || use odbc ; then
+ insinto ${PACKAGES}/dbdrivers
+ doins dbdrivers/*.xwam || die
+ doins dbdrivers/*.H || die
+ insinto ${PACKAGES}/dbdrivers/cc
+ doins dbdrivers/cc/*.H || die
+ if use mysql ; then
+ insinto ${PACKAGES}/dbdrivers/mysql
+ doins dbdrivers/mysql/*.xwam || die
+ insinto ${PACKAGES}/dbdrivers/mysql/cc
+ doins dbdrivers/mysql/cc/*.H || die
+ fi
+ if use odbc ; then
+ insinto ${PACKAGES}/dbdrivers/odbc
+ doins dbdrivers/odbc/*.xwam || die
+ insinto ${PACKAGES}/dbdrivers/odbc/cc
+ doins dbdrivers/odbc/cc/*.H || die
+ fi
+ fi
+
+ if use pcre ; then
+ insinto ${PACKAGES}/pcre
+ doins pcre/*.xwam || die
+ insinto ${PACKAGES}/pcre/cc
+ doins pcre/cc/*.H || die
+ fi
+
+ cd "${S}"
+ dodoc FAQ README || die
+}
diff --git a/dev-lang/yap/Manifest b/dev-lang/yap/Manifest
new file mode 100644
index 000000000000..a084e177ae7d
--- /dev/null
+++ b/dev-lang/yap/Manifest
@@ -0,0 +1,6 @@
+DIST yap-6.3.3-gentoo-patchset-9.tar.gz 5430 SHA256 0ca819cc5df0b0d3f5c7aa3903592df058cf0dede2dbd222705da327409fe993 SHA512 a698d0fe93cfa558db919f0333964d63ed656d6375740bf15264871dd17e3dc9f371f68b798701ca67d6420d6eccfaa79dee4c218bb51330e8b75bb555f0541c WHIRLPOOL 8a65c4c6f4bb97ba1b42a13c0aa4054792bb96153e363bbac5f6262972e58e0fb856301ff032b3bab9005f62c747f4a7f0d5dd14141f6b4881f1ec2f9668ed29
+DIST yap-6.3.3.tar.gz 7879301 SHA256 aee3b449b1669af07a8291ce6e7fb0a9b35e1343e2ab96fadb1a37552397fa78 SHA512 4ef45277ec84b6e072fa54afc7d6c18f11c3a0cdf477e35e35a0ce2181c9ff2e693f8735f63a1899373f6baf79ce0a972b37e1ae6ed8271bec60663f477bbe80 WHIRLPOOL 3b4095ff9ecbd532d2211e9158f6bd400248b43386027894c08754aadc14712a60325aeb950b361f14b2bc105053ff8a70b025e305fb79003a68f4226a39b724
+EBUILD yap-6.3.3.ebuild 2872 SHA256 383b4bd3f0cbd4afaa787913ff960bfac22b2c81903ffbb72e994f0d14e9f97c SHA512 06eea12f6b2ddad47f1b9017cc14cfb393907c735f541a505ec723fe568067e9e4ca4d987c9dd3875067650b6f2ffee50983856892cd802c265f127631c6ec94 WHIRLPOOL 1362b30e68251bd8f07aa8192bf6099fba965ea8939b894d316c628ddbd5deba0835385f9264795229fcd044ca6af3962ea0a48ab6b2c223974c236df7d8029c
+MISC ChangeLog 4607 SHA256 28a232f2e102437fb36c0914fff8229f46708cdb4191e3d071e76bda7b6433e8 SHA512 0a4f7f0a296b5bf5400ca1e5757b8d23fa892b716479e7a989a2c7511fd28f0da25ca66fbae4d1c62ce3a315ba09e588595aec0b1333d7ceae6844d41dac6976 WHIRLPOOL 3da8e578d8e1d4852c2034c51915b21a27f49f9bd82d65fcdb31d9502633a5fac61df2096ee75004415c1ecab166eebf77d994568aec1d4e61bcea6413d5d496
+MISC ChangeLog-2015 14586 SHA256 3d183f058c32da3eaeff2f477e99fde50a075cb4899672e01b32df532b86d437 SHA512 aac0aacfe3daa1d40d1e1276f798cf17433123a2e10981879e5fbeac618af80d95d50fb56839b497844f0a30574d9cd4b31bd476630c11c1daeae3e5a013ccd9 WHIRLPOOL 78a9d8caa9943bd821747a297551068e8e65f9ccfa6121db65e6d10c90ae87204f0197fc868bbd1e5291adc6de28c1c7bcecf04b995f0ecae457ebe4a05fafcf
+MISC metadata.xml 314 SHA256 44d6bdd0313b208fb098303a77c67d1a7e256c8b4b1c4c5ab52d763e321c7ab4 SHA512 c5bd279aec3b80e6c08dfaa85cf091cbfcbf9380f1e5a8a0fcd6f27297368b92906340ae9dfd5176f37d36e4fb61ca772448c0248121d8e302c181bf670e57bc WHIRLPOOL 86738261d862a8b38930083a104ddd65f58669e4a8c869f2598db6cf7bcf16d108e8288ea3ee649ce5ddb7818880c4bb10019fd684a2132cae9fcf94c77a253d
diff --git a/dev-lang/yap/metadata.xml b/dev-lang/yap/metadata.xml
new file mode 100644
index 000000000000..30ccd329d946
--- /dev/null
+++ b/dev-lang/yap/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>prolog@gentoo.org</email>
+ <name>Prolog</name>
+</maintainer>
+<use>
+ <flag name="R">Enable support for connecting R to Prolog</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-lang/yap/yap-6.3.3.ebuild b/dev-lang/yap/yap-6.3.3.ebuild
new file mode 100644
index 000000000000..c56e733abcdf
--- /dev/null
+++ b/dev-lang/yap/yap-6.3.3.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic java-pkg-opt-2 multilib
+
+PATCHSET_VER="9"
+
+DESCRIPTION="YAP is a high-performance Prolog compiler"
+HOMEPAGE="http://www.dcc.fc.up.pt/~vsc/Yap/"
+SRC_URI="http://www.dcc.fc.up.pt/~vsc/Yap/${P}.tar.gz
+ mirror://gentoo/${P}-gentoo-patchset-${PATCHSET_VER}.tar.gz"
+
+LICENSE="Artistic LGPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="R debug doc examples gmp java mpi mysql odbc readline static threads"
+
+RDEPEND="sys-libs/zlib
+ gmp? ( dev-libs/gmp:0 )
+ java? ( >=virtual/jdk-1.4:= )
+ mpi? ( virtual/mpi )
+ mysql? ( virtual/mysql )
+ odbc? ( dev-db/unixODBC )
+ readline? ( sys-libs/readline:= sys-libs/ncurses:= )
+ R? ( dev-lang/R )"
+
+DEPEND="${RDEPEND}
+ doc? ( app-text/texi2html )"
+
+src_prepare() {
+ cd "${WORKDIR}"
+ EPATCH_FORCE=yes
+ EPATCH_SUFFIX=patch
+ epatch "${WORKDIR}"/${PV}
+ rm -rf "${S}"/yap || die "failed to remove yap xcode project"
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ local myddas_conf
+ if use mysql || use odbc; then
+ myddas_conf="--enable-myddas"
+ else
+ myddas_conf="--disable-myddas"
+ fi
+ if use mysql; then
+ myddas_conf="$myddas_conf yap_with_mysql=yes"
+ fi
+ if use odbc; then
+ myddas_conf="$myddas_conf yap_with_odbc=yes"
+ fi
+
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ --disable-prism \
+ --disable-gecode \
+ $(use_enable !static dynamic-loading) \
+ $(use_enable threads) \
+ $(use_enable threads pthread-locking) \
+ $(use_enable debug debug-yap) \
+ $(use_enable debug low-level-tracer) \
+ $(use_with gmp) \
+ $(use_with readline) \
+ $(use_with mpi) \
+ $(use_with mpi mpe) \
+ $(use_with java) \
+ $(use_with R) \
+ ${myddas_conf}
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ if use doc ; then
+ emake html || die "emake html failed"
+ fi
+}
+
+src_test() {
+ # libtai package contains check.c which confuses the default
+ # src_test() function
+ true
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed."
+
+ dodoc changes*.html README || die
+
+ if use doc ; then
+ dodoc yap.html || die
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples/chr
+ doins packages/chr/Examples/* || die
+ insinto /usr/share/doc/${PF}/examples/clib
+ doins packages/clib/demo/* || die
+ insinto /usr/share/doc/${PF}/examples/http
+ doins -r packages/http/examples/* || die
+ insinto /usr/share/doc/${PF}/examples/plunit
+ doins packages/plunit/examples/* || die
+ if use java ; then
+ insinto /usr/share/doc/${PF}/examples/jpl/prolog
+ doins packages/jpl/examples/prolog/* || die
+ insinto /usr/share/doc/${PF}/examples/jpl/java
+ doins packages/jpl/examples/java/README || die
+ doins -r packages/jpl/examples/java/*/*.{java,pl} || die
+ fi
+ if use mpi ; then
+ insinto /usr/share/doc/${PF}/examples/mpi
+ doins library/mpi/examples/*.pl || die
+ fi
+ fi
+}
diff --git a/dev-lang/yasm/Manifest b/dev-lang/yasm/Manifest
new file mode 100644
index 000000000000..caecbfe3ccd5
--- /dev/null
+++ b/dev-lang/yasm/Manifest
@@ -0,0 +1,10 @@
+AUX yasm-1.2.0-fix_cython_check.patch 790 SHA256 1d44a5ea34426c84556e93d3f5774912ca8530c582ad6f1bf738850b515d977c SHA512 5055949c13c5b4e24863f302f379831fcb26edbcfef48b3f3ee4fe742a95c0db85487a82d72a7e9fc96ad4c9fbeee0423d79032269900aeaf380cc9848ccb07b WHIRLPOOL 8810880f15c5c44cbf457ede3e0d19ef64ba68ae2cb3f595b04be1614b39f36d7803c617d29e3a2fe7248ac76285056f1ea4f1870a28b75c1da8c851827b9e22
+DIST yasm-1.2.0-x32.patch.xz 9656 SHA256 d5a623243b1b2a73b4b25d9395a5be1483adca38cec8f50a7f1e4e9107cd9d83 SHA512 93961d0690c0018a3645bc3d610b1f12172f5311609716fec0efcf8af5d70578a1fc74ab42fcc75f2b75ed8837fa03cbc66ddd6386baeb56a519e7639ff64874 WHIRLPOOL 410c940995fc31b2e12f9eec67b6873f1f4629fcdf8a58c2165ab3d9721f21e295901e8917cfd613b30ea319594aeaff21d38ec4e9bd2b693e6e3230e9d637d9
+DIST yasm-1.2.0.tar.gz 1436502 SHA256 768ffab457b90a20a6d895c39749adb547c1b7cb5c108e84b151a838a23ccf31 SHA512 e80ace766e145f6486e76da1a5a9819221b7f406745a02529b4ad220ef7f51ddd67f23d0d8b187bffc9725d9f9742ae5f3a0bb23ee5b2a61153332fb3e286b77 WHIRLPOOL 2a1fd73beeea8128c67e0172684e3dac9d0c16b9e35e905a5e313948d685da9ace15a2b18001c02c0aff9113fec9059af5984aeacf8e4ae5e8bbe91dd00d9d9e
+DIST yasm-1.3.0.tar.gz 1492156 SHA256 3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f SHA512 572d3b45568b10f58e48f1188c2d6bcbdd16429c8afaccc8c6d37859b45635e106885d679e41d0bee78c23822108c7ae75aa7475eed5ba58057e0a6fe1b68645 WHIRLPOOL 025454780e4e7ccc443fc604e49a5cc9b8489eaff9d50a443786c462604dc16890a07fba6985e2cc53c1076b23fda472aedb6c1cf9c8adcac6c05f90fdf696a7
+EBUILD yasm-1.2.0-r1.ebuild 1325 SHA256 3292065a3a6ee32d8d7b2e63f2c239401585cd67b7fa0ef798e1569e906e6e69 SHA512 a73339713257e8e8b05ae7eda671a0a7ec8a83ff284d03102f383f829f40f7aa81836aab19b71e5f3a4dafce0453b20c4f64350d8701b9e853c20a6b0c4fde18 WHIRLPOOL d0908f3a9d796219b063b275c45e078ae9c6466892aedef4ae614f95cc12e8c6308e17387f41a7148c9a64f793e0658133e6a9428dc5d0b16d190f59657cc7af
+EBUILD yasm-1.3.0.ebuild 946 SHA256 974f0ca8cb7fa050cdfc8052eda7b266a5f72beee04ad2adcef0228a909c8636 SHA512 9fbb8eaaa15e1e45750cb2f0c4031370fa391d405f17066583f86791b568b145e09c066ccc5c418db63b2a39a6d577dca4348417aee2cf48b88bf9747551f891 WHIRLPOOL 58c4b52c3c5cf4d512f39a39d333852aef747b4abc61a5b2fab3e9bfcd63f27300076d94333f2d7a0c62fa6f7753fdb46f832604bb9b6cca8e92d3d0f5b3235a
+EBUILD yasm-9999.ebuild 1560 SHA256 660ff7b964da1115425c55a5b87c581d69368dda19a050bc4b1ab1449fa301f0 SHA512 cfd81d37cda502612f278818c09f2a7958aa2fd3fa4dfa9e37761f12ce7f5da7db5fad01abbc87d9eb6b6bf6a09be776d5f27142b4271bf200b77d26255879a3 WHIRLPOOL d3b8a63ae70f760d9dbdf49e522e19c5ff9d42613f6bbd9f78055d5390fc1716db02ae9e569c6e648a01e6f87ff4538aeb077c8b86b7ff33f25dcd7e388f9f7f
+MISC ChangeLog 2787 SHA256 7d4c5ca973505c35863ac3f5a70a41dfcfc92d282dd6c07d6cb260d63ebba0a9 SHA512 8e5cc5c9f1c084524640ce19aa87eb6247eb6d9cc4fd3740edace28daa6d2845377175bf4a110236485c032f23e40cd3ad7f265edb1d9cf9d6de00894afa5fc4 WHIRLPOOL cac35ebb879b646c5f25de0c691f7f84d4b36398a9848baa50f9ebdeae3a86780a3e18f1594b07e0452fe585be2627380d3244a4b0279d9442106fad0c4398f4
+MISC ChangeLog-2015 8842 SHA256 9afa257c4aa9a624fed04e18d1f5e1fca076093b1c099307a6363b506f676b01 SHA512 511d9a4b1b7da6f08ae9b18f5c44ad69d7170d006123de411eef5587ae2a7402887e4b7b9e9b5ee46d715a209cef5a4dbc2f1f212b7a595d1708fcab6fd6f806 WHIRLPOOL c5b6cc3a39918d7944793464df5b558529ca9bd691c32c668516987eb2319689b1f4b4d2a724c147e135caded121444d8e28838369a077d25bef742503ba16cb
+MISC metadata.xml 261 SHA256 254d983e670eec6ed511873092d6d221fa8f9ad0b8c1a102c4fdf834cc0bfcb1 SHA512 d37f5f4f82ac36f200f1df58e8caf7e8bcad7f4d479ad37e0c059d657c50984f44463e765e9cb867c04a2081928f3d603d362930de1f9d326ed4c237a1b0bb0c WHIRLPOOL 8fea7f86fcbb79795e8c50016801babd045a40286d4e83b8f9b00ac6717f60f412436135637c79091bc2b9724cb7314ab871b5d217b3f273b23dc9ef651527ea
diff --git a/dev-lang/yasm/files/yasm-1.2.0-fix_cython_check.patch b/dev-lang/yasm/files/yasm-1.2.0-fix_cython_check.patch
new file mode 100644
index 000000000000..c894f821a2aa
--- /dev/null
+++ b/dev-lang/yasm/files/yasm-1.2.0-fix_cython_check.patch
@@ -0,0 +1,23 @@
+http://tortall.lighthouseapp.com/projects/78676-yasm/tickets/249
+
+--- m4/cython.m4
++++ m4/cython.m4
+@@ -2,13 +2,14 @@
+ dnl be set before this function is called.
+ dnl CYTHON_CHECK_VERSION([MIN-VERSION], [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+ AC_DEFUN([CYTHON_CHECK_VERSION],
+- [prog="import sys
++ [prog="import re, sys
+ from Cython.Compiler.Version import version
+ def get_int(arg):
+- try:
+- return int(arg)
+- except ValueError:
++ matched = re.match(r'\d+', arg)
++ if matched is None:
+ return 0
++ else:
++ return int(matched.group(0))
+ # split strings by '.' and convert to numeric. Append some zeros
+ # because we need at least 4 digits for the hex conversion.
+ ver = map(get_int, version.rstrip('abcdefghijklmnopqrstuvwxyz').split('.')) + [[0, 0, 0]]
diff --git a/dev-lang/yasm/metadata.xml b/dev-lang/yasm/metadata.xml
new file mode 100644
index 000000000000..d50bc759d0bb
--- /dev/null
+++ b/dev-lang/yasm/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>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/yasm/yasm-1.2.0-r1.ebuild b/dev-lang/yasm/yasm-1.2.0-r1.ebuild
new file mode 100644
index 000000000000..008d10fb17b1
--- /dev/null
+++ b/dev-lang/yasm/yasm-1.2.0-r1.ebuild
@@ -0,0 +1,50 @@
+# 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 python-r1
+
+DESCRIPTION="An assembler for x86 and x86_64 instruction sets"
+HOMEPAGE="http://yasm.tortall.net/"
+SRC_URI="http://www.tortall.net/projects/yasm/releases/${P}.tar.gz
+ mirror://gentoo/${P}-x32.patch.xz"
+
+LICENSE="BSD-2 BSD || ( Artistic GPL-2 LGPL-2 )"
+SLOT="0"
+KEYWORDS="-* amd64 ~arm64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="nls python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ nls? ( virtual/libintl )
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="
+ ${RDEPEND}
+ nls? ( sys-devel/gettext )
+ python? ( >=dev-python/cython-0.14[${PYTHON_USEDEP}] )"
+
+src_prepare() {
+ sed -i -e 's:xmlto:&dIsAbLe:' configure.ac || die #459940
+ epatch "${WORKDIR}"/${P}-x32.patch #435838
+ chmod a+rx modules/objfmts/elf/tests/{gas,}x32/*_test.sh
+ epatch "${FILESDIR}/${P}-fix_cython_check.patch"
+ # ksh doesn't grok $(xxx), makes aclocal fail
+ sed -i -e '1c\#!/usr/bin/env sh' YASM-VERSION-GEN.sh || die
+ eautoreconf
+}
+
+src_configure() {
+ use python && python_export_best
+
+ econf \
+ $(use_enable python) \
+ $(use_enable python python-bindings) \
+ $(use_enable nls)
+}
+
+src_test() {
+ emake check
+}
diff --git a/dev-lang/yasm/yasm-1.3.0.ebuild b/dev-lang/yasm/yasm-1.3.0.ebuild
new file mode 100644
index 000000000000..04266e13156d
--- /dev/null
+++ b/dev-lang/yasm/yasm-1.3.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-r1
+
+DESCRIPTION="An assembler for x86 and x86_64 instruction sets"
+HOMEPAGE="http://yasm.tortall.net/"
+SRC_URI="http://www.tortall.net/projects/yasm/releases/${P}.tar.gz"
+
+LICENSE="BSD-2 BSD || ( Artistic GPL-2 LGPL-2 )"
+SLOT="0"
+KEYWORDS="-* amd64 ~arm64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="nls python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ nls? ( virtual/libintl )
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="
+ ${RDEPEND}
+ nls? ( sys-devel/gettext )
+ python? ( >=dev-python/cython-0.14[${PYTHON_USEDEP}] )"
+
+src_configure() {
+ use python && python_export_best
+
+ XMLTO=: \
+ econf \
+ $(use_enable python) \
+ $(use_enable python python-bindings) \
+ $(use_enable nls)
+}
+
+src_test() {
+ emake check
+}
diff --git a/dev-lang/yasm/yasm-9999.ebuild b/dev-lang/yasm/yasm-9999.ebuild
new file mode 100644
index 000000000000..2192b7f076ef
--- /dev/null
+++ b/dev-lang/yasm/yasm-9999.ebuild
@@ -0,0 +1,67 @@
+# 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 python-r1
+
+if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://github.com/yasm/yasm.git"
+ inherit git-2
+else
+ SRC_URI="http://www.tortall.net/projects/yasm/releases/${P}.tar.gz"
+ KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris"
+fi
+
+DESCRIPTION="An assembler for x86 and x86_64 instruction sets"
+HOMEPAGE="http://yasm.tortall.net/"
+
+LICENSE="BSD-2 BSD || ( Artistic GPL-2 LGPL-2 )"
+SLOT="0"
+IUSE="nls python"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ nls? ( virtual/libintl )
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="
+ ${RDEPEND}
+ nls? ( sys-devel/gettext )
+ python? ( >=dev-python/cython-0.14[${PYTHON_USEDEP}] )"
+
+if [[ ${PV} == 9999* ]]; then
+ DEPEND="${DEPEND} ${PYTHON_DEPS} app-text/xmlto app-text/docbook-xml-dtd:4.1.2"
+fi
+
+src_prepare() {
+ if ! [[ ${PV} == 9999* ]]; then
+ sed -i -e 's:xmlto:&dIsAbLe:' configure.ac || die #459940
+ fi
+ # ksh doesn't grok $(xxx), makes aclocal fail
+ sed -i -e '1c\#!/usr/bin/env sh' YASM-VERSION-GEN.sh || die
+ eautoreconf
+
+ if [[ ${PV} == 9999* ]]; then
+ ./modules/arch/x86/gen_x86_insn.py || die
+ fi
+}
+
+src_configure() {
+ if [[ ${PV} == 9999* ]]; then
+ python_export_best
+ else
+ use python && python_export_best
+ fi
+
+ econf \
+ --disable-warnerror \
+ $(use_enable python) \
+ $(use_enable python python-bindings) \
+ $(use_enable nls)
+}
+
+src_test() {
+ emake check
+}