summaryrefslogtreecommitdiff
path: root/dev-lang
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/Manifest.gzbin56169 -> 18162 bytes
-rw-r--r--dev-lang/R-3.2.215
-rw-r--r--dev-lang/R-3.3.215
-rw-r--r--dev-lang/R-3.4.115
-rw-r--r--dev-lang/R-3.5.115
-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/R-3.5.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-0.2.911
-rw-r--r--dev-lang/ats/Manifest3
-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-2.413
-rw-r--r--dev-lang/bas/Manifest4
-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-0.58a10
-rw-r--r--dev-lang/bashforth/Manifest3
-rw-r--r--dev-lang/bashforth/bashforth-0.58a.ebuild24
-rw-r--r--dev-lang/bashforth/metadata.xml8
-rw-r--r--dev-lang/bff-1.0.511
-rw-r--r--dev-lang/bff/Manifest3
-rw-r--r--dev-lang/bff/bff-1.0.5.ebuild35
-rw-r--r--dev-lang/bff/metadata.xml11
-rw-r--r--dev-lang/c-intercal-30.013
-rw-r--r--dev-lang/c-intercal/Manifest6
-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.xml14
-rw-r--r--dev-lang/cfortran-4.4-r211
-rw-r--r--dev-lang/cfortran-4.4-r311
-rw-r--r--dev-lang/cfortran/Manifest5
-rw-r--r--dev-lang/cfortran/cfortran-4.4-r2.ebuild39
-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-5.4.6-r112
-rw-r--r--dev-lang/cilk-5.4.6-r212
-rw-r--r--dev-lang/cilk/Manifest5
-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-0.6-r110
-rw-r--r--dev-lang/cll1h/Manifest3
-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-1.5.114
-rw-r--r--dev-lang/clojure-1.6.014
-rw-r--r--dev-lang/clojure-1.7.014
-rw-r--r--dev-lang/clojure-1.8.014
-rw-r--r--dev-lang/clojure/Manifest9
-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.xml8
-rw-r--r--dev-lang/closure-compiler-bin-2017021813
-rw-r--r--dev-lang/closure-compiler-bin/Manifest3
-rw-r--r--dev-lang/closure-compiler-bin/closure-compiler-bin-20170218.ebuild29
-rw-r--r--dev-lang/closure-compiler-bin/metadata.xml8
-rw-r--r--dev-lang/coffee-script-1.12.511
-rw-r--r--dev-lang/coffee-script-1.9.3-r112
-rw-r--r--dev-lang/coffee-script/Manifest5
-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-0.10.613
-rw-r--r--dev-lang/confluence/Manifest3
-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-0.23.113
-rw-r--r--dev-lang/crystal-0.24.1-r113
-rw-r--r--dev-lang/crystal-0.24.213
-rw-r--r--dev-lang/crystal-0.25.013
-rw-r--r--dev-lang/crystal/Manifest20
-rw-r--r--dev-lang/crystal/crystal-0.23.1.ebuild102
-rw-r--r--dev-lang/crystal/crystal-0.24.1-r1.ebuild102
-rw-r--r--dev-lang/crystal/crystal-0.24.2.ebuild104
-rw-r--r--dev-lang/crystal/crystal-0.25.0.ebuild104
-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.24.0-verbose-LDFLAGS.patch9
-rw-r--r--dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-network-sandbox.patch33
-rw-r--r--dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-sandbox.patch37
-rw-r--r--dev-lang/crystal/files/crystal-0.25.0-verbose.patch9
-rw-r--r--dev-lang/crystal/metadata.xml33
-rw-r--r--dev-lang/duktape-2.1.19
-rw-r--r--dev-lang/duktape-2.2.09
-rw-r--r--dev-lang/duktape/Manifest6
-rw-r--r--dev-lang/duktape/duktape-2.1.1.ebuild43
-rw-r--r--dev-lang/duktape/duktape-2.2.0.ebuild43
-rw-r--r--dev-lang/duktape/files/duktape.pc10
-rw-r--r--dev-lang/duktape/metadata.xml14
-rw-r--r--dev-lang/elixir-1.4.512
-rw-r--r--dev-lang/elixir-1.6.513
-rw-r--r--dev-lang/elixir-1.6.613
-rw-r--r--dev-lang/elixir/Manifest7
-rw-r--r--dev-lang/elixir/elixir-1.4.5.ebuild27
-rw-r--r--dev-lang/elixir/elixir-1.6.5.ebuild32
-rw-r--r--dev-lang/elixir/elixir-1.6.6.ebuild32
-rw-r--r--dev-lang/elixir/metadata.xml30
-rw-r--r--dev-lang/epic-0.9.3.3-r113
-rw-r--r--dev-lang/epic/Manifest4
-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-19.113
-rw-r--r--dev-lang/erlang-19.314
-rw-r--r--dev-lang/erlang-20.214
-rw-r--r--dev-lang/erlang-20.314
-rw-r--r--dev-lang/erlang-20.3.214
-rw-r--r--dev-lang/erlang-20.3.814
-rw-r--r--dev-lang/erlang-21.0.214
-rw-r--r--dev-lang/erlang/Manifest33
-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.2.ebuild158
-rw-r--r--dev-lang/erlang/erlang-20.3.2.ebuild226
-rw-r--r--dev-lang/erlang/erlang-20.3.8.ebuild226
-rw-r--r--dev-lang/erlang/erlang-20.3.ebuild171
-rw-r--r--dev-lang/erlang/erlang-21.0.2.ebuild225
-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/files/erlang-20.2-libressl-2.6.1.patch111
-rw-r--r--dev-lang/erlang/files/erlang-20.3.2-dont-ignore-LDFLAGS.patch42
-rw-r--r--dev-lang/erlang/metadata.xml17
-rw-r--r--dev-lang/esco-0.51212
-rw-r--r--dev-lang/esco/Manifest3
-rw-r--r--dev-lang/esco/esco-0.512.ebuild31
-rw-r--r--dev-lang/esco/metadata.xml11
-rw-r--r--dev-lang/execline-2.1.1.013
-rw-r--r--dev-lang/execline-2.3.0.313
-rw-r--r--dev-lang/execline-2.3.0.413
-rw-r--r--dev-lang/execline/Manifest7
-rw-r--r--dev-lang/execline/execline-2.1.1.0.ebuild54
-rw-r--r--dev-lang/execline/execline-2.3.0.3.ebuild55
-rw-r--r--dev-lang/execline/execline-2.3.0.4.ebuild55
-rw-r--r--dev-lang/execline/metadata.xml13
-rw-r--r--dev-lang/f2c-2006050712
-rw-r--r--dev-lang/f2c-2010082712
-rw-r--r--dev-lang/f2c/Manifest6
-rw-r--r--dev-lang/f2c/f2c-20060507.ebuild38
-rw-r--r--dev-lang/f2c/f2c-20100827.ebuild50
-rw-r--r--dev-lang/f2c/metadata.xml18
-rw-r--r--dev-lang/ferite-1.1.17-r112
-rw-r--r--dev-lang/ferite/Manifest4
-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-2.6.413
-rw-r--r--dev-lang/fpc-3.0.013
-rw-r--r--dev-lang/fpc-3.0.213
-rw-r--r--dev-lang/fpc-3.0.2-r113
-rw-r--r--dev-lang/fpc-3.0.413
-rw-r--r--dev-lang/fpc/Manifest31
-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/fpc-3.0.4.ebuild165
-rw-r--r--dev-lang/fpc/metadata.xml13
-rw-r--r--dev-lang/gdl-0.9.6-r214
-rw-r--r--dev-lang/gdl/Manifest13
-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-0.7.3-r113
-rw-r--r--dev-lang/gforth/Manifest5
-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-r1.ebuild54
-rw-r--r--dev-lang/gforth/metadata.xml8
-rw-r--r--dev-lang/ghc-7.10.315
-rw-r--r--dev-lang/ghc-7.8.415
-rw-r--r--dev-lang/ghc-8.0.215
-rw-r--r--dev-lang/ghc-8.2.114
-rw-r--r--dev-lang/ghc-8.2.214
-rw-r--r--dev-lang/ghc-8.4.114
-rw-r--r--dev-lang/ghc-8.4.214
-rw-r--r--dev-lang/ghc-8.4.314
-rw-r--r--dev-lang/ghc/Manifest88
-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-binutils-2.30.patch65
-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-no-relax-everywhere.patch17
-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-8.4.2-allow-cross-bootstrap.patch23
-rw-r--r--dev-lang/ghc/files/ghc-bash-completion218
-rw-r--r--dev-lang/ghc/ghc-7.10.3.ebuild675
-rw-r--r--dev-lang/ghc/ghc-7.8.4.ebuild601
-rw-r--r--dev-lang/ghc/ghc-8.0.2.ebuild672
-rw-r--r--dev-lang/ghc/ghc-8.2.1.ebuild755
-rw-r--r--dev-lang/ghc/ghc-8.2.2.ebuild756
-rw-r--r--dev-lang/ghc/ghc-8.4.1.ebuild756
-rw-r--r--dev-lang/ghc/ghc-8.4.2.ebuild761
-rw-r--r--dev-lang/ghc/ghc-8.4.3.ebuild760
-rw-r--r--dev-lang/ghc/metadata.xml13
-rw-r--r--dev-lang/gnat-gpl-201615
-rw-r--r--dev-lang/gnat-gpl-201715
-rw-r--r--dev-lang/gnat-gpl-201815
-rw-r--r--dev-lang/gnat-gpl/Manifest36
-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-bootstrap.patch66
-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.patch98
-rw-r--r--dev-lang/gnat-gpl/files/gnat-gpl-2018-gentoo.patch18
-rw-r--r--dev-lang/gnat-gpl/gnat-gpl-2016.ebuild214
-rw-r--r--dev-lang/gnat-gpl/gnat-gpl-2017.ebuild190
-rw-r--r--dev-lang/gnat-gpl/gnat-gpl-2018.ebuild190
-rw-r--r--dev-lang/gnat-gpl/metadata.xml36
-rw-r--r--dev-lang/gnu-smalltalk-3.2.512
-rw-r--r--dev-lang/gnu-smalltalk/Manifest5
-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.ebuild79
-rw-r--r--dev-lang/gnu-smalltalk/metadata.xml11
-rw-r--r--dev-lang/gnuprologjava-0.2.613
-rw-r--r--dev-lang/gnuprologjava/Manifest4
-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-1.10.114
-rw-r--r--dev-lang/go-1.10.214
-rw-r--r--dev-lang/go-1.10.314
-rw-r--r--dev-lang/go-1.9.614
-rw-r--r--dev-lang/go-1.9.714
-rw-r--r--dev-lang/go-999913
-rw-r--r--dev-lang/go/Manifest23
-rw-r--r--dev-lang/go/go-1.10.1.ebuild228
-rw-r--r--dev-lang/go/go-1.10.2.ebuild228
-rw-r--r--dev-lang/go/go-1.10.3.ebuild228
-rw-r--r--dev-lang/go/go-1.9.6.ebuild228
-rw-r--r--dev-lang/go/go-1.9.7.ebuild228
-rw-r--r--dev-lang/go/go-9999.ebuild228
-rw-r--r--dev-lang/go/metadata.xml16
-rw-r--r--dev-lang/gprolog-1.4.411
-rw-r--r--dev-lang/gprolog/Manifest8
-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-2.4.0-r111
-rw-r--r--dev-lang/gwydion-dylan-bin/Manifest4
-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.ebuild31
-rw-r--r--dev-lang/gwydion-dylan-bin/metadata.xml14
-rw-r--r--dev-lang/helium-1.613
-rw-r--r--dev-lang/helium-1.8.113
-rw-r--r--dev-lang/helium/Manifest9
-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.ebuild106
-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-0.10.015
-rw-r--r--dev-lang/hy-0.10.115
-rw-r--r--dev-lang/hy-0.11.115
-rw-r--r--dev-lang/hy-0.12.015
-rw-r--r--dev-lang/hy-0.12.115
-rw-r--r--dev-lang/hy-0.13.015
-rw-r--r--dev-lang/hy-0.13.115
-rw-r--r--dev-lang/hy-0.14.015
-rw-r--r--dev-lang/hy/Manifest17
-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/hy-0.13.1.ebuild41
-rw-r--r--dev-lang/hy/hy-0.14.0.ebuild41
-rw-r--r--dev-lang/hy/metadata.xml11
-rw-r--r--dev-lang/icon-9.5.1-r113
-rw-r--r--dev-lang/icon/Manifest4
-rw-r--r--dev-lang/icon/files/icon-9.5.1-flags.patch75
-rw-r--r--dev-lang/icon/icon-9.5.1-r1.ebuild108
-rw-r--r--dev-lang/icon/metadata.xml15
-rw-r--r--dev-lang/inform-6.33.1_p211
-rw-r--r--dev-lang/inform/Manifest3
-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-2.1.213
-rw-r--r--dev-lang/interprolog/Manifest5
-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.ebuild62
-rw-r--r--dev-lang/interprolog/metadata.xml8
-rw-r--r--dev-lang/ispc-1.9.213
-rw-r--r--dev-lang/ispc-999911
-rw-r--r--dev-lang/ispc/Manifest4
-rw-r--r--dev-lang/ispc/ispc-1.9.2.ebuild52
-rw-r--r--dev-lang/ispc/ispc-9999.ebuild52
-rw-r--r--dev-lang/ispc/metadata.xml11
-rw-r--r--dev-lang/j-701-r210
-rw-r--r--dev-lang/j/Manifest3
-rw-r--r--dev-lang/j/j-701-r2.ebuild44
-rw-r--r--dev-lang/j/metadata.xml8
-rw-r--r--dev-lang/jimtcl-0.7612
-rw-r--r--dev-lang/jimtcl-999910
-rw-r--r--dev-lang/jimtcl/Manifest5
-rw-r--r--dev-lang/jimtcl/files/jimtcl-0.75-bootstrap.patch15
-rw-r--r--dev-lang/jimtcl/jimtcl-0.76.ebuild69
-rw-r--r--dev-lang/jimtcl/jimtcl-9999.ebuild69
-rw-r--r--dev-lang/jimtcl/metadata.xml11
-rw-r--r--dev-lang/julia-0.6.3-r113
-rw-r--r--dev-lang/julia-999911
-rw-r--r--dev-lang/julia/Manifest7
-rw-r--r--dev-lang/julia/files/julia-0.6.3-fix_build_system.patch96
-rw-r--r--dev-lang/julia/files/julia-9999-fix_build_system.patch75
-rw-r--r--dev-lang/julia/julia-0.6.3-r1.ebuild186
-rw-r--r--dev-lang/julia/julia-9999.ebuild161
-rw-r--r--dev-lang/julia/metadata.xml27
-rw-r--r--dev-lang/jwasm-2.11a10
-rw-r--r--dev-lang/jwasm/Manifest4
-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.xml11
-rw-r--r--dev-lang/lazarus-1.0.1214
-rw-r--r--dev-lang/lazarus-1.6.214
-rw-r--r--dev-lang/lazarus-1.6.414
-rw-r--r--dev-lang/lazarus-1.8.014
-rw-r--r--dev-lang/lazarus-1.8.214
-rw-r--r--dev-lang/lazarus-1.8.414
-rw-r--r--dev-lang/lazarus/Manifest14
-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/lazarus-1.8.0.ebuild76
-rw-r--r--dev-lang/lazarus/lazarus-1.8.2.ebuild75
-rw-r--r--dev-lang/lazarus/lazarus-1.8.4.ebuild75
-rw-r--r--dev-lang/lazarus/metadata.xml17
-rw-r--r--dev-lang/lfe-0.10.112
-rw-r--r--dev-lang/lfe-0.712
-rw-r--r--dev-lang/lfe-1.012
-rw-r--r--dev-lang/lfe-1.1.112
-rw-r--r--dev-lang/lfe/Manifest9
-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-0.13.1-r213
-rw-r--r--dev-lang/lisaac/Manifest5
-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-3.00.012
-rw-r--r--dev-lang/logtalk-3.03.012
-rw-r--r--dev-lang/logtalk-3.07.012
-rw-r--r--dev-lang/logtalk-3.11.212
-rw-r--r--dev-lang/logtalk/Manifest12
-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.11.2-portage.patch17
-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-5.1.5-r10014
-rw-r--r--dev-lang/lua-5.1.5-r10114
-rw-r--r--dev-lang/lua-5.1.5-r414
-rw-r--r--dev-lang/lua-5.2.314
-rw-r--r--dev-lang/lua-5.2.3-r114
-rw-r--r--dev-lang/lua-5.2.3-r214
-rw-r--r--dev-lang/lua-5.3.314
-rw-r--r--dev-lang/lua-5.3.3-r114
-rw-r--r--dev-lang/lua/Manifest35
-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-2.0.211
-rw-r--r--dev-lang/luajit-2.0.311
-rw-r--r--dev-lang/luajit-2.0.3-r111
-rw-r--r--dev-lang/luajit-2.0.411
-rw-r--r--dev-lang/luajit-2.0.511
-rw-r--r--dev-lang/luajit-2.0.5-r111
-rw-r--r--dev-lang/luajit/Manifest11
-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/luajit-2.0.5-r1.ebuild62
-rw-r--r--dev-lang/luajit/luajit-2.0.5.ebuild61
-rw-r--r--dev-lang/luajit/metadata.xml17
-rw-r--r--dev-lang/maude-2.713
-rw-r--r--dev-lang/maude/Manifest7
-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-13.05.213
-rw-r--r--dev-lang/mercury-14.0113
-rw-r--r--dev-lang/mercury-14.01.113
-rw-r--r--dev-lang/mercury-extras-13.05.213
-rw-r--r--dev-lang/mercury-extras-14.0113
-rw-r--r--dev-lang/mercury-extras-14.01.113
-rw-r--r--dev-lang/mercury-extras/Manifest10
-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/Manifest11
-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.ebuild202
-rw-r--r--dev-lang/mercury/mercury-14.01.ebuild203
-rw-r--r--dev-lang/mercury/metadata.xml12
-rw-r--r--dev-lang/metadata.xml40
-rw-r--r--dev-lang/micropython-1.9.312
-rw-r--r--dev-lang/micropython-1.9.412
-rw-r--r--dev-lang/micropython/Manifest7
-rw-r--r--dev-lang/micropython/files/micropython-1.9.3-prevent-stripping.patch22
-rw-r--r--dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch22
-rw-r--r--dev-lang/micropython/metadata.xml30
-rw-r--r--dev-lang/micropython/micropython-1.9.3.ebuild54
-rw-r--r--dev-lang/micropython/micropython-1.9.4.ebuild54
-rw-r--r--dev-lang/mlton-2013071513
-rw-r--r--dev-lang/mlton-2018020713
-rw-r--r--dev-lang/mlton/Manifest13
-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/files/mlton-20180207-bootstrap.patch27
-rw-r--r--dev-lang/mlton/files/mlton-20180207-paxmark.patch18
-rw-r--r--dev-lang/mlton/metadata.xml21
-rw-r--r--dev-lang/mlton/mlton-20130715.ebuild119
-rw-r--r--dev-lang/mlton/mlton-20180207.ebuild264
-rw-r--r--dev-lang/mmix-2013101712
-rw-r--r--dev-lang/mmix-2016080412
-rw-r--r--dev-lang/mmix/Manifest7
-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.ebuild47
-rw-r--r--dev-lang/mmix/mmix-20160804.ebuild47
-rw-r--r--dev-lang/moarvm-2018.0114
-rw-r--r--dev-lang/moarvm-2018.0214
-rw-r--r--dev-lang/moarvm-2018.0314
-rw-r--r--dev-lang/moarvm-2018.0414
-rw-r--r--dev-lang/moarvm-2018.04.114
-rw-r--r--dev-lang/moarvm-2018.0514
-rw-r--r--dev-lang/moarvm-2018.0614
-rw-r--r--dev-lang/moarvm-999912
-rw-r--r--dev-lang/moarvm/Manifest16
-rw-r--r--dev-lang/moarvm/metadata.xml22
-rw-r--r--dev-lang/moarvm/moarvm-2018.01.ebuild58
-rw-r--r--dev-lang/moarvm/moarvm-2018.02.ebuild58
-rw-r--r--dev-lang/moarvm/moarvm-2018.03.ebuild58
-rw-r--r--dev-lang/moarvm/moarvm-2018.04.1.ebuild57
-rw-r--r--dev-lang/moarvm/moarvm-2018.04.ebuild58
-rw-r--r--dev-lang/moarvm/moarvm-2018.05.ebuild57
-rw-r--r--dev-lang/moarvm/moarvm-2018.06.ebuild57
-rw-r--r--dev-lang/moarvm/moarvm-9999.ebuild61
-rw-r--r--dev-lang/mono-4.4.1.013
-rw-r--r--dev-lang/mono-4.6.1.513
-rw-r--r--dev-lang/mono-4.6.1.5-r113
-rw-r--r--dev-lang/mono-4.8.0.42513
-rw-r--r--dev-lang/mono-4.8.0.49513
-rw-r--r--dev-lang/mono-4.8.0.52413
-rw-r--r--dev-lang/mono-5.12.0.22614
-rw-r--r--dev-lang/mono-5.4.1.613
-rw-r--r--dev-lang/mono-basic-4.6-r112
-rw-r--r--dev-lang/mono-basic-4.712
-rw-r--r--dev-lang/mono-basic/Manifest5
-rw-r--r--dev-lang/mono-basic/metadata.xml12
-rw-r--r--dev-lang/mono-basic/mono-basic-4.6-r1.ebuild16
-rw-r--r--dev-lang/mono-basic/mono-basic-4.7.ebuild16
-rw-r--r--dev-lang/mono/Manifest21
-rw-r--r--dev-lang/mono/files/mono-4.4.1.0-x86_32.patch20
-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/files/mono-5.0.1.1-x86_32.patch21
-rw-r--r--dev-lang/mono/files/mono-5.12-try-catch.patch31
-rw-r--r--dev-lang/mono/metadata.xml12
-rw-r--r--dev-lang/mono/mono-4.4.1.0.ebuild114
-rw-r--r--dev-lang/mono/mono-4.6.1.5-r1.ebuild117
-rw-r--r--dev-lang/mono/mono-4.6.1.5.ebuild112
-rw-r--r--dev-lang/mono/mono-4.8.0.425.ebuild110
-rw-r--r--dev-lang/mono/mono-4.8.0.495.ebuild110
-rw-r--r--dev-lang/mono/mono-4.8.0.524.ebuild110
-rw-r--r--dev-lang/mono/mono-5.12.0.226.ebuild108
-rw-r--r--dev-lang/mono/mono-5.4.1.6.ebuild109
-rw-r--r--dev-lang/mozart-1.4.0-r313
-rw-r--r--dev-lang/mozart-stdlib-1.4.0-r112
-rw-r--r--dev-lang/mozart-stdlib/Manifest5
-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/Manifest6
-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-0_p2016120210
-rw-r--r--dev-lang/mujs-1.0.1-r111
-rw-r--r--dev-lang/mujs/Manifest7
-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-2.11.0812
-rw-r--r--dev-lang/nasm-2.12.0112
-rw-r--r--dev-lang/nasm-2.13.0112
-rw-r--r--dev-lang/nasm-2.13.0312
-rw-r--r--dev-lang/nasm-2.13.03-r112
-rw-r--r--dev-lang/nasm/Manifest13
-rw-r--r--dev-lang/nasm/files/nasm-2.13.01-fix-docdir.patch177
-rw-r--r--dev-lang/nasm/files/nasm-2.13.01-gcc-8.patch25
-rw-r--r--dev-lang/nasm/files/nasm-2.13.03-bsd-cp-doc.patch15
-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.ebuild47
-rw-r--r--dev-lang/nasm/nasm-2.13.03-r1.ebuild51
-rw-r--r--dev-lang/nasm/nasm-2.13.03.ebuild47
-rw-r--r--dev-lang/nim-0.16.012
-rw-r--r--dev-lang/nim-0.17.012
-rw-r--r--dev-lang/nim-0.17.213
-rw-r--r--dev-lang/nim-0.17.2-r113
-rw-r--r--dev-lang/nim-0.18.014
-rw-r--r--dev-lang/nim/Manifest10
-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-r1.ebuild65
-rw-r--r--dev-lang/nim/nim-0.17.2.ebuild59
-rw-r--r--dev-lang/nim/nim-0.18.0.ebuild75
-rw-r--r--dev-lang/nqp-2018.0114
-rw-r--r--dev-lang/nqp-2018.0214
-rw-r--r--dev-lang/nqp-2018.0314
-rw-r--r--dev-lang/nqp-2018.0414
-rw-r--r--dev-lang/nqp-2018.04.114
-rw-r--r--dev-lang/nqp-2018.0514
-rw-r--r--dev-lang/nqp-2018.0614
-rw-r--r--dev-lang/nqp-999912
-rw-r--r--dev-lang/nqp/Manifest16
-rw-r--r--dev-lang/nqp/metadata.xml19
-rw-r--r--dev-lang/nqp/nqp-2018.01.ebuild159
-rw-r--r--dev-lang/nqp/nqp-2018.02.ebuild159
-rw-r--r--dev-lang/nqp/nqp-2018.03.ebuild159
-rw-r--r--dev-lang/nqp/nqp-2018.04.1.ebuild159
-rw-r--r--dev-lang/nqp/nqp-2018.04.ebuild159
-rw-r--r--dev-lang/nqp/nqp-2018.05.ebuild159
-rw-r--r--dev-lang/nqp/nqp-2018.06.ebuild159
-rw-r--r--dev-lang/nqp/nqp-9999.ebuild159
-rw-r--r--dev-lang/nwcc-0.8.29
-rw-r--r--dev-lang/nwcc-0.8.39
-rw-r--r--dev-lang/nwcc/Manifest5
-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-4.04.2-r114
-rw-r--r--dev-lang/ocaml-4.05.0-r114
-rw-r--r--dev-lang/ocaml/Manifest9
-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-r1.ebuild127
-rw-r--r--dev-lang/ocaml/ocaml-4.05.0-r1.ebuild129
-rw-r--r--dev-lang/open-cobol-1.113
-rw-r--r--dev-lang/open-cobol/Manifest3
-rw-r--r--dev-lang/open-cobol/metadata.xml11
-rw-r--r--dev-lang/open-cobol/open-cobol-1.1.ebuild35
-rw-r--r--dev-lang/opendylan-2013.1-r113
-rw-r--r--dev-lang/opendylan-2013.213
-rw-r--r--dev-lang/opendylan-2014.113
-rw-r--r--dev-lang/opendylan-999911
-rw-r--r--dev-lang/opendylan-bin-2011.111
-rw-r--r--dev-lang/opendylan-bin-2012.111
-rw-r--r--dev-lang/opendylan-bin-2013.111
-rw-r--r--dev-lang/opendylan-bin-2013.211
-rw-r--r--dev-lang/opendylan-bin-2014.111
-rw-r--r--dev-lang/opendylan-bin/Manifest16
-rw-r--r--dev-lang/opendylan-bin/metadata.xml8
-rw-r--r--dev-lang/opendylan-bin/opendylan-bin-2011.1.ebuild33
-rw-r--r--dev-lang/opendylan-bin/opendylan-bin-2012.1.ebuild33
-rw-r--r--dev-lang/opendylan-bin/opendylan-bin-2013.1.ebuild33
-rw-r--r--dev-lang/opendylan-bin/opendylan-bin-2013.2.ebuild33
-rw-r--r--dev-lang/opendylan-bin/opendylan-bin-2014.1.ebuild33
-rw-r--r--dev-lang/opendylan/Manifest8
-rw-r--r--dev-lang/opendylan/metadata.xml8
-rw-r--r--dev-lang/opendylan/opendylan-2013.1-r1.ebuild100
-rw-r--r--dev-lang/opendylan/opendylan-2013.2.ebuild105
-rw-r--r--dev-lang/opendylan/opendylan-2014.1.ebuild101
-rw-r--r--dev-lang/opendylan/opendylan-9999.ebuild64
-rw-r--r--dev-lang/orc-0.4.2712
-rw-r--r--dev-lang/orc-0.4.28-r112
-rw-r--r--dev-lang/orc/Manifest5
-rw-r--r--dev-lang/orc/metadata.xml11
-rw-r--r--dev-lang/orc/orc-0.4.27.ebuild70
-rw-r--r--dev-lang/orc/orc-0.4.28-r1.ebuild75
-rw-r--r--dev-lang/parrot-7.1.014
-rw-r--r--dev-lang/parrot-7.11.014
-rw-r--r--dev-lang/parrot-7.5.014
-rw-r--r--dev-lang/parrot-8.1.014
-rw-r--r--dev-lang/parrot/Manifest9
-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.ebuild84
-rw-r--r--dev-lang/pasm-1.710
-rw-r--r--dev-lang/pasm/Manifest4
-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.ebuild30
-rw-r--r--dev-lang/pcc-1.1.0-r112
-rw-r--r--dev-lang/pcc-999910
-rw-r--r--dev-lang/pcc/Manifest5
-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-5.24.3-r114
-rw-r--r--dev-lang/perl-5.24.414
-rw-r--r--dev-lang/perl-5.26.1-r114
-rw-r--r--dev-lang/perl-5.26.1-r214
-rw-r--r--dev-lang/perl-5.26.214
-rw-r--r--dev-lang/perl-5.26.999913
-rw-r--r--dev-lang/perl-5.28.014
-rw-r--r--dev-lang/perl-5.28.999913
-rw-r--r--dev-lang/perl/Manifest22
-rw-r--r--dev-lang/perl/files/perl-5.24-libnsl.patch13
-rw-r--r--dev-lang/perl/metadata.xml14
-rw-r--r--dev-lang/perl/perl-5.24.3-r1.ebuild572
-rw-r--r--dev-lang/perl/perl-5.24.4.ebuild570
-rw-r--r--dev-lang/perl/perl-5.26.1-r1.ebuild625
-rw-r--r--dev-lang/perl/perl-5.26.1-r2.ebuild637
-rw-r--r--dev-lang/perl/perl-5.26.2.ebuild637
-rw-r--r--dev-lang/perl/perl-5.26.9999.ebuild637
-rw-r--r--dev-lang/perl/perl-5.28.0.ebuild642
-rw-r--r--dev-lang/perl/perl-5.28.9999.ebuild642
-rw-r--r--dev-lang/php-5.6.35-r114
-rw-r--r--dev-lang/php-5.6.3614
-rw-r--r--dev-lang/php-7.0.2914
-rw-r--r--dev-lang/php-7.0.3014
-rw-r--r--dev-lang/php-7.1.1614
-rw-r--r--dev-lang/php-7.1.1814
-rw-r--r--dev-lang/php-7.1.1914
-rw-r--r--dev-lang/php-7.2.714
-rw-r--r--dev-lang/php-7.3.0_alpha114
-rw-r--r--dev-lang/php-7.3.0_alpha314
-rw-r--r--dev-lang/php/Manifest29
-rw-r--r--dev-lang/php/files/20php5-envd2
-rw-r--r--dev-lang/php/files/5.6-mbstring-oniguruma-6.8.patch12
-rw-r--r--dev-lang/php/files/libressl-compatibility.patch65
-rw-r--r--dev-lang/php/files/mbstring-oniguruma-6.8.patch30
-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/files/php-freetype-2.9.1.patch233
-rw-r--r--dev-lang/php/metadata.xml57
-rw-r--r--dev-lang/php/php-5.6.35-r1.ebuild776
-rw-r--r--dev-lang/php/php-5.6.36.ebuild777
-rw-r--r--dev-lang/php/php-7.0.29.ebuild751
-rw-r--r--dev-lang/php/php-7.0.30.ebuild751
-rw-r--r--dev-lang/php/php-7.1.16.ebuild733
-rw-r--r--dev-lang/php/php-7.1.18.ebuild731
-rw-r--r--dev-lang/php/php-7.1.19.ebuild728
-rw-r--r--dev-lang/php/php-7.2.7.ebuild740
-rw-r--r--dev-lang/php/php-7.3.0_alpha1.ebuild743
-rw-r--r--dev-lang/php/php-7.3.0_alpha3.ebuild743
-rw-r--r--dev-lang/polyml-5.4.113
-rw-r--r--dev-lang/polyml-5.5.013
-rw-r--r--dev-lang/polyml-5.5.113
-rw-r--r--dev-lang/polyml-5.5.213
-rw-r--r--dev-lang/polyml-5.613
-rw-r--r--dev-lang/polyml/Manifest22
-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.xml17
-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-2.7.14-r114
-rw-r--r--dev-lang/python-2.7.14-r214
-rw-r--r--dev-lang/python-2.7.1514
-rw-r--r--dev-lang/python-3.4.5-r115
-rw-r--r--dev-lang/python-3.4.6-r114
-rw-r--r--dev-lang/python-3.4.814
-rw-r--r--dev-lang/python-3.4.8-r114
-rw-r--r--dev-lang/python-3.5.4-r115
-rw-r--r--dev-lang/python-3.5.515
-rw-r--r--dev-lang/python-3.5.5-r115
-rw-r--r--dev-lang/python-3.6.3-r115
-rw-r--r--dev-lang/python-3.6.415
-rw-r--r--dev-lang/python-3.6.515
-rw-r--r--dev-lang/python-3.6.5-r115
-rw-r--r--dev-lang/python-3.6.615
-rw-r--r--dev-lang/python-3.7.015
-rw-r--r--dev-lang/python-exec-2.4.512
-rw-r--r--dev-lang/python-exec-2.4.612
-rw-r--r--dev-lang/python-exec-999911
-rw-r--r--dev-lang/python-exec/Manifest6
-rw-r--r--dev-lang/python-exec/metadata.xml17
-rw-r--r--dev-lang/python-exec/python-exec-2.4.5.ebuild134
-rw-r--r--dev-lang/python-exec/python-exec-2.4.6.ebuild134
-rw-r--r--dev-lang/python-exec/python-exec-9999.ebuild140
-rw-r--r--dev-lang/python/Manifest57
-rw-r--r--dev-lang/python/files/2.7-disable-nis.patch21
-rw-r--r--dev-lang/python/files/3.4-getentropy-linux.patch40
-rw-r--r--dev-lang/python/files/3.6-blake2.patch37
-rw-r--r--dev-lang/python/files/3.6-disable-nis.patch21
-rw-r--r--dev-lang/python/files/3.6.5-disable-nis.patch11
-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-libressl-compatibility.patch92
-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/files/python-3.5.5-hash-unaligned.patch43
-rw-r--r--dev-lang/python/files/python-3.5.5-libressl-compatibility.patch69
-rw-r--r--dev-lang/python/files/python-3.6.5-hash-unaligned.patch42
-rw-r--r--dev-lang/python/files/python-3.6.5-libressl-compatibility.patch114
-rw-r--r--dev-lang/python/metadata.xml14
-rw-r--r--dev-lang/python/python-2.7.14-r1.ebuild365
-rw-r--r--dev-lang/python/python-2.7.14-r2.ebuild369
-rw-r--r--dev-lang/python/python-2.7.15.ebuild361
-rw-r--r--dev-lang/python/python-3.4.5-r1.ebuild360
-rw-r--r--dev-lang/python/python-3.4.6-r1.ebuild356
-rw-r--r--dev-lang/python/python-3.4.8-r1.ebuild363
-rw-r--r--dev-lang/python/python-3.4.8.ebuild359
-rw-r--r--dev-lang/python/python-3.5.4-r1.ebuild365
-rw-r--r--dev-lang/python/python-3.5.5-r1.ebuild368
-rw-r--r--dev-lang/python/python-3.5.5.ebuild365
-rw-r--r--dev-lang/python/python-3.6.3-r1.ebuild345
-rw-r--r--dev-lang/python/python-3.6.4.ebuild346
-rw-r--r--dev-lang/python/python-3.6.5-r1.ebuild350
-rw-r--r--dev-lang/python/python-3.6.5.ebuild346
-rw-r--r--dev-lang/python/python-3.6.6.ebuild349
-rw-r--r--dev-lang/python/python-3.7.0.ebuild324
-rw-r--r--dev-lang/qu-prolog-10.0-r113
-rw-r--r--dev-lang/qu-prolog/Manifest7
-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-10.0-qt5.patch35
-rw-r--r--dev-lang/qu-prolog/metadata.xml11
-rw-r--r--dev-lang/qu-prolog/qu-prolog-10.0-r1.ebuild101
-rw-r--r--dev-lang/rakudo-2018.0114
-rw-r--r--dev-lang/rakudo-2018.0214
-rw-r--r--dev-lang/rakudo-2018.02.114
-rw-r--r--dev-lang/rakudo-2018.0314
-rw-r--r--dev-lang/rakudo-2018.0414
-rw-r--r--dev-lang/rakudo-2018.04.114
-rw-r--r--dev-lang/rakudo-2018.0514
-rw-r--r--dev-lang/rakudo-2018.0614
-rw-r--r--dev-lang/rakudo-999912
-rw-r--r--dev-lang/rakudo/Manifest19
-rw-r--r--dev-lang/rakudo/files/rakudo-2016.04-jna-lib.patch21
-rw-r--r--dev-lang/rakudo/metadata.xml16
-rw-r--r--dev-lang/rakudo/rakudo-2018.01.ebuild72
-rw-r--r--dev-lang/rakudo/rakudo-2018.02.1.ebuild72
-rw-r--r--dev-lang/rakudo/rakudo-2018.02.ebuild72
-rw-r--r--dev-lang/rakudo/rakudo-2018.03.ebuild72
-rw-r--r--dev-lang/rakudo/rakudo-2018.04.1.ebuild72
-rw-r--r--dev-lang/rakudo/rakudo-2018.04.ebuild72
-rw-r--r--dev-lang/rakudo/rakudo-2018.05.ebuild72
-rw-r--r--dev-lang/rakudo/rakudo-2018.06.ebuild72
-rw-r--r--dev-lang/rakudo/rakudo-9999.ebuild79
-rw-r--r--dev-lang/rebol-999910
-rw-r--r--dev-lang/rebol-bin-3_pre11110
-rw-r--r--dev-lang/rebol-bin-3_pre201403049
-rw-r--r--dev-lang/rebol-bin/Manifest6
-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/Manifest2
-rw-r--r--dev-lang/rebol/metadata.xml8
-rw-r--r--dev-lang/rebol/rebol-9999.ebuild37
-rw-r--r--dev-lang/regina-rexx-3.9.1-r111
-rw-r--r--dev-lang/regina-rexx/Manifest4
-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/ruby-2.3.714
-rw-r--r--dev-lang/ruby-2.4.414
-rw-r--r--dev-lang/ruby-2.5.114
-rw-r--r--dev-lang/ruby/Manifest10
-rw-r--r--dev-lang/ruby/metadata.xml22
-rw-r--r--dev-lang/ruby/ruby-2.3.7.ebuild242
-rw-r--r--dev-lang/ruby/ruby-2.4.4.ebuild243
-rw-r--r--dev-lang/ruby/ruby-2.5.1.ebuild238
-rw-r--r--dev-lang/rust-1.25.014
-rw-r--r--dev-lang/rust-1.26.215
-rw-r--r--dev-lang/rust-1.27.115
-rw-r--r--dev-lang/rust-1.27.1-r215
-rw-r--r--dev-lang/rust-bin-1.25.013
-rw-r--r--dev-lang/rust-bin-1.26.014
-rw-r--r--dev-lang/rust-bin-1.26.214
-rw-r--r--dev-lang/rust-bin-1.27.014
-rw-r--r--dev-lang/rust-bin-1.27.114
-rw-r--r--dev-lang/rust-bin-1.27.1-r114
-rw-r--r--dev-lang/rust-bin/Manifest32
-rw-r--r--dev-lang/rust-bin/metadata.xml12
-rw-r--r--dev-lang/rust-bin/rust-bin-1.25.0.ebuild122
-rw-r--r--dev-lang/rust-bin/rust-bin-1.26.0.ebuild125
-rw-r--r--dev-lang/rust-bin/rust-bin-1.26.2.ebuild125
-rw-r--r--dev-lang/rust-bin/rust-bin-1.27.0.ebuild125
-rw-r--r--dev-lang/rust-bin/rust-bin-1.27.1-r1.ebuild142
-rw-r--r--dev-lang/rust-bin/rust-bin-1.27.1.ebuild130
-rw-r--r--dev-lang/rust/Manifest17
-rw-r--r--dev-lang/rust/metadata.xml19
-rw-r--r--dev-lang/rust/rust-1.25.0.ebuild173
-rw-r--r--dev-lang/rust/rust-1.26.2.ebuild232
-rw-r--r--dev-lang/rust/rust-1.27.1-r2.ebuild271
-rw-r--r--dev-lang/rust/rust-1.27.1.ebuild234
-rw-r--r--dev-lang/sassc-3.4.712
-rw-r--r--dev-lang/sassc-3.5.012
-rw-r--r--dev-lang/sassc-999910
-rw-r--r--dev-lang/sassc/Manifest6
-rw-r--r--dev-lang/sassc/metadata.xml16
-rw-r--r--dev-lang/sassc/sassc-3.4.7.ebuild36
-rw-r--r--dev-lang/sassc/sassc-3.5.0.ebuild36
-rw-r--r--dev-lang/sassc/sassc-9999.ebuild36
-rw-r--r--dev-lang/scala-2.11.1-r214
-rw-r--r--dev-lang/scala-2.11.1114
-rw-r--r--dev-lang/scala-2.11.2-r214
-rw-r--r--dev-lang/scala-2.11.4-r114
-rw-r--r--dev-lang/scala-2.11.4-r214
-rw-r--r--dev-lang/scala-2.11.6-r114
-rw-r--r--dev-lang/scala-2.11.7-r114
-rw-r--r--dev-lang/scala-2.11.814
-rw-r--r--dev-lang/scala-2.12.114
-rw-r--r--dev-lang/scala-2.12.214
-rw-r--r--dev-lang/scala-2.12.414
-rw-r--r--dev-lang/scala-bin-2.11.813
-rw-r--r--dev-lang/scala-bin-2.12.413
-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.ebuild85
-rw-r--r--dev-lang/scala-bin/scala-bin-2.12.4.ebuild79
-rw-r--r--dev-lang/scala/Manifest216
-rw-r--r--dev-lang/scala/files/scala-2.11.1-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.12.4-no-git.patch37
-rw-r--r--dev-lang/scala/metadata.xml14
-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.12.4.ebuild214
-rw-r--r--dev-lang/smlnj-110.7510
-rw-r--r--dev-lang/smlnj-110.8212
-rw-r--r--dev-lang/smlnj/Manifest52
-rw-r--r--dev-lang/smlnj/files/smlnj-110.82-pax-p1.patch116
-rw-r--r--dev-lang/smlnj/files/smlnj-110.82-pax-p2.patch132
-rw-r--r--dev-lang/smlnj/files/smlnj-110.82-pax-p3.patch137
-rw-r--r--dev-lang/smlnj/metadata.xml12
-rw-r--r--dev-lang/smlnj/smlnj-110.75.ebuild112
-rw-r--r--dev-lang/smlnj/smlnj-110.82.ebuild166
-rw-r--r--dev-lang/snobol-1.110
-rw-r--r--dev-lang/snobol-1.4.111
-rw-r--r--dev-lang/snobol/Manifest5
-rw-r--r--dev-lang/snobol/metadata.xml8
-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-0.4.1812
-rw-r--r--dev-lang/solidity/Manifest4
-rw-r--r--dev-lang/solidity/files/solidity-0.4.18-fix-cmake-external-jsoncpp.diff15
-rw-r--r--dev-lang/solidity/metadata.xml15
-rw-r--r--dev-lang/solidity/solidity-0.4.18.ebuild37
-rw-r--r--dev-lang/spark-201712
-rw-r--r--dev-lang/spark/Manifest5
-rw-r--r--dev-lang/spark/files/spark-2017-gentoo.patch10
-rw-r--r--dev-lang/spark/metadata.xml16
-rw-r--r--dev-lang/spark/spark-2017.ebuild61
-rw-r--r--dev-lang/spidermonkey-1.7.0-r313
-rw-r--r--dev-lang/spidermonkey-1.8.5-r613
-rw-r--r--dev-lang/spidermonkey-17.0.0-r415
-rw-r--r--dev-lang/spidermonkey-17.0.0-r515
-rw-r--r--dev-lang/spidermonkey-24.2.0-r314
-rw-r--r--dev-lang/spidermonkey-24.2.0-r414
-rw-r--r--dev-lang/spidermonkey-38.3.014
-rw-r--r--dev-lang/spidermonkey-45.0.214
-rw-r--r--dev-lang/spidermonkey-52.4.0_pre20171003-r114
-rw-r--r--dev-lang/spidermonkey/Manifest26
-rw-r--r--dev-lang/spidermonkey/files/moz38-dont-hardcode-libc-soname.patch15
-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-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.3.0.ebuild147
-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-3.112
-rw-r--r--dev-lang/squirrel/Manifest3
-rw-r--r--dev-lang/squirrel/metadata.xml12
-rw-r--r--dev-lang/squirrel/squirrel-3.1.ebuild42
-rw-r--r--dev-lang/srf-1.0-r211
-rw-r--r--dev-lang/srf/Manifest3
-rw-r--r--dev-lang/srf/metadata.xml10
-rw-r--r--dev-lang/srf/srf-1.0-r2.ebuild35
-rw-r--r--dev-lang/swi-prolog-7.4.213
-rw-r--r--dev-lang/swi-prolog-7.6.313
-rw-r--r--dev-lang/swi-prolog-7.6.413
-rw-r--r--dev-lang/swi-prolog-7.7.1713
-rw-r--r--dev-lang/swi-prolog-7.7.1813
-rw-r--r--dev-lang/swi-prolog-7.7.18-r113
-rw-r--r--dev-lang/swi-prolog/Manifest13
-rw-r--r--dev-lang/swi-prolog/metadata.xml13
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.4.2.ebuild145
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.6.3.ebuild146
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.6.4.ebuild146
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.7.17.ebuild148
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.7.18-r1.ebuild150
-rw-r--r--dev-lang/swi-prolog/swi-prolog-7.7.18.ebuild148
-rw-r--r--dev-lang/swig-2.0.1213
-rw-r--r--dev-lang/swig-2.0.913
-rw-r--r--dev-lang/swig-3.0.1213
-rw-r--r--dev-lang/swig/Manifest7
-rw-r--r--dev-lang/swig/metadata.xml27
-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.12.ebuild35
-rw-r--r--dev-lang/tcc-0.9.26-r113
-rw-r--r--dev-lang/tcc-0.9.26-r213
-rw-r--r--dev-lang/tcc-0.9.26-r313
-rw-r--r--dev-lang/tcc-0.9.2713
-rw-r--r--dev-lang/tcc-999911
-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-0.9.27.ebuild65
-rw-r--r--dev-lang/tcc/tcc-9999.ebuild73
-rw-r--r--dev-lang/tcl-8.5.1713
-rw-r--r--dev-lang/tcl-8.5.17-r10013
-rw-r--r--dev-lang/tcl-8.6.513
-rw-r--r--dev-lang/tcl-8.6.614
-rw-r--r--dev-lang/tcl-8.6.713
-rw-r--r--dev-lang/tcl/Manifest12
-rw-r--r--dev-lang/tcl/files/tcl-8.5.13-multilib.patch11
-rw-r--r--dev-lang/tcl/files/tcl-8.5.14-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-2.0.213
-rw-r--r--dev-lang/teyjus-2.113
-rw-r--r--dev-lang/teyjus/Manifest7
-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-0.65.912
-rw-r--r--dev-lang/tinycobol/Manifest4
-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.ebuild48
-rw-r--r--dev-lang/tk-8.5.1713
-rw-r--r--dev-lang/tk-8.5.17-r10013
-rw-r--r--dev-lang/tk-8.6.513
-rw-r--r--dev-lang/tk-8.6.5-r113
-rw-r--r--dev-lang/tk-8.6.613
-rw-r--r--dev-lang/tk-8.6.713
-rw-r--r--dev-lang/tk/Manifest16
-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-2.9.213
-rw-r--r--dev-lang/tuprolog-3.0.113
-rw-r--r--dev-lang/tuprolog-3.1.013
-rw-r--r--dev-lang/tuprolog/Manifest15
-rw-r--r--dev-lang/tuprolog/files/build-2.9.2.xml110
-rw-r--r--dev-lang/tuprolog/files/build-3.0.1.xml110
-rw-r--r--dev-lang/tuprolog/files/build-3.1.0.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.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-0.32.113
-rw-r--r--dev-lang/vala-0.34.1613
-rw-r--r--dev-lang/vala-0.34.913
-rw-r--r--dev-lang/vala-0.36.1313
-rw-r--r--dev-lang/vala/Manifest9
-rw-r--r--dev-lang/vala/metadata.xml8
-rw-r--r--dev-lang/vala/vala-0.32.1.ebuild36
-rw-r--r--dev-lang/vala/vala-0.34.16.ebuild36
-rw-r--r--dev-lang/vala/vala-0.34.9.ebuild36
-rw-r--r--dev-lang/vala/vala-0.36.13.ebuild40
-rw-r--r--dev-lang/whitespace-0.312
-rw-r--r--dev-lang/whitespace-0.411
-rw-r--r--dev-lang/whitespace/Manifest7
-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-3.6.013
-rw-r--r--dev-lang/xsb-3.7.013
-rw-r--r--dev-lang/xsb/Manifest7
-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-6.3.313
-rw-r--r--dev-lang/yap/Manifest4
-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-1.2.0-r114
-rw-r--r--dev-lang/yasm-1.3.014
-rw-r--r--dev-lang/yasm-999912
-rw-r--r--dev-lang/yasm/Manifest8
-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
1156 files changed, 68028 insertions, 4500 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz
index f8d44ca603de..edd1d6e19061 100644
--- a/dev-lang/Manifest.gz
+++ b/dev-lang/Manifest.gz
Binary files differ
diff --git a/dev-lang/R-3.2.2 b/dev-lang/R-3.2.2
deleted file mode 100644
index edb61c3250a9..000000000000
--- a/dev-lang/R-3.2.2
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare setup
-DEPEND=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 ) virtual/pkgconfig doc? ( virtual/latex-base dev-texlive/texlive-fontsrecommended ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/fortran
-DESCRIPTION=Language and environment for statistical computing and graphics
-EAPI=5
-HOMEPAGE=http://www.r-project.org/
-IUSE=cairo doc icu java jpeg lapack minimal nls openmp perl png prefix profile readline static-libs tiff tk X
-KEYWORDS=amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos
-LICENSE=|| ( GPL-2 GPL-3 ) LGPL-2.1
-RDEPEND=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 ) >=sys-libs/zlib-1.2.5.1-r2:0[minizip] java? ( >=virtual/jre-1.5 ) virtual/fortran
-REQUIRED_USE=png? ( || ( cairo X ) ) jpeg? ( || ( cairo X ) ) tiff? ( || ( cairo X ) )
-RESTRICT=minimal? ( test )
-SLOT=0
-SRC_URI=mirror://cran/src/base/R-3/R-3.2.2.tar.gz https://dev.gentoo.org/~bicatali/distfiles/R-20130129.bash_completion.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 fortran-2 9e7f20c99213f0627ff7f873d4aaa25d libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=4c64fba48a616278e366e872b120fc41
diff --git a/dev-lang/R-3.3.2 b/dev-lang/R-3.3.2
deleted file mode 100644
index 9c962bcac828..000000000000
--- a/dev-lang/R-3.3.2
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare setup
-DEPEND=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 ) virtual/pkgconfig doc? ( virtual/latex-base dev-texlive/texlive-fontsrecommended ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/fortran
-DESCRIPTION=Language and environment for statistical computing and graphics
-EAPI=5
-HOMEPAGE=http://www.r-project.org/
-IUSE=cairo doc icu java jpeg lapack minimal nls openmp perl png prefix profile readline static-libs tiff tk X
-KEYWORDS=~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos
-LICENSE=|| ( GPL-2 GPL-3 ) LGPL-2.1
-RDEPEND=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 ) >=sys-libs/zlib-1.2.5.1-r2:0[minizip] java? ( >=virtual/jre-1.5 ) virtual/fortran
-REQUIRED_USE=png? ( || ( cairo X ) ) jpeg? ( || ( cairo X ) ) tiff? ( || ( cairo X ) )
-RESTRICT=minimal? ( test )
-SLOT=0
-SRC_URI=mirror://cran/src/base/R-3/R-3.3.2.tar.gz https://dev.gentoo.org/~bicatali/distfiles/R-20130129.bash_completion.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 fortran-2 9e7f20c99213f0627ff7f873d4aaa25d libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=bcfa6a6e09057637b60c691f354a3bc7
diff --git a/dev-lang/R-3.4.1 b/dev-lang/R-3.4.1
deleted file mode 100644
index 771d3aa7af12..000000000000
--- a/dev-lang/R-3.4.1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare pretend setup
-DEPEND=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 ) virtual/pkgconfig doc? ( virtual/latex-base dev-texlive/texlive-fontsrecommended ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/fortran
-DESCRIPTION=Language and environment for statistical computing and graphics
-EAPI=6
-HOMEPAGE=http://www.r-project.org/
-IUSE=cairo doc icu java jpeg lapack minimal nls openmp perl png prefix profile readline static-libs tiff tk X
-KEYWORDS=amd64 ~hppa ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos
-LICENSE=|| ( GPL-2 GPL-3 ) LGPL-2.1
-RDEPEND=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 ) >=sys-libs/zlib-1.2.5.1-r2:0[minizip] java? ( >=virtual/jre-1.5 ) virtual/fortran
-REQUIRED_USE=png? ( || ( cairo X ) ) jpeg? ( || ( cairo X ) ) tiff? ( || ( cairo X ) )
-RESTRICT=minimal? ( test )
-SLOT=0
-SRC_URI=mirror://cran/src/base/R-3/R-3.4.1.tar.gz https://raw.githubusercontent.com/deepayan/rcompletion/78d6830e28ea90a046da79a9b4f70c39594bb6d6/bash_completion/R -> R-78d6830e28ea90a046da79a9b4f70c39594bb6d6.bash_completion
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 fortran-2 9e7f20c99213f0627ff7f873d4aaa25d libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=7c864aa2bc34db505591eeb82e568bc7
diff --git a/dev-lang/R-3.5.1 b/dev-lang/R-3.5.1
deleted file mode 100644
index 0b83273d8a9b..000000000000
--- a/dev-lang/R-3.5.1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare pretend setup
-DEPEND=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 ) virtual/pkgconfig doc? ( virtual/latex-base dev-texlive/texlive-fontsrecommended ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/fortran
-DESCRIPTION=Language and environment for statistical computing and graphics
-EAPI=6
-HOMEPAGE=http://www.r-project.org/
-IUSE=cairo doc icu java jpeg lapack minimal nls openmp perl png prefix profile readline static-libs tiff tk X
-KEYWORDS=~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos
-LICENSE=|| ( GPL-2 GPL-3 ) LGPL-2.1
-RDEPEND=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 ) >=sys-libs/zlib-1.2.5.1-r2:0[minizip] java? ( >=virtual/jre-1.5 ) virtual/fortran
-REQUIRED_USE=png? ( || ( cairo X ) ) jpeg? ( || ( cairo X ) ) tiff? ( || ( cairo X ) )
-RESTRICT=minimal? ( test )
-SLOT=0
-SRC_URI=mirror://cran/src/base/R-3/R-3.5.1.tar.gz https://raw.githubusercontent.com/deepayan/rcompletion/78d6830e28ea90a046da79a9b4f70c39594bb6d6/bash_completion/R -> R-78d6830e28ea90a046da79a9b4f70c39594bb6d6.bash_completion
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 fortran-2 9e7f20c99213f0627ff7f873d4aaa25d libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=8fb3a27b43d4a4fb786e2124f4f3664d
diff --git a/dev-lang/R/Manifest b/dev-lang/R/Manifest
new file mode 100644
index 000000000000..1944609313e8
--- /dev/null
+++ b/dev-lang/R/Manifest
@@ -0,0 +1,17 @@
+AUX R-2.11.1-parallel.patch 685 BLAKE2B 877a6cc17cc415e9cc6e76a2c1e4807c6549c9ad65a9bc014fa7de186c32509af945ae96d0ba976243efa38c32eb0dea1f67e9c97c5d7f99af54c3ab36011989 SHA512 30491365eee00389f6f09c2093b5b5a568f4567c110cc0cb3332a53d6a7fcd87fe8f46f9f8521cf21bf1f0cfa24f4282a6e22396902f454c43f26542ac22c2a9
+AUX R-2.13.1-zlib_header_fix.patch 591 BLAKE2B 89087e6a37cffbe1c2f879d5ed8bae39d6d05813a121ec13f1d4e27cf65daf615b46d1246765f2deb7704487ed3382a5c1435710ec2f23d257defd427caeddb2 SHA512 1ada5a3ccb0ff902f7df35d6a42f4e99fee6a1f7b36ece000b9e2fed2b731abf5c3687d22239cd324ff6677bf8edff3415aca57c31beef33c73b98073206136a
+AUX R-3.0.0-rmath-shared.patch 1137 BLAKE2B dbae2fd70ec163edf4707aec5ad28737b4b9af20c98a0807a7d947496cd3536834c24a435f9ec641205237c71dc3378ac307ebc013f0e21939f9a4aaff4a53be SHA512 92b950703f1bb6dc82b5cee5e4165fddbdf6a2aa2670980460268dae0918f884c8c0ced069b5d106853c7be814025153e8b3fe9689f1db7eeb387cf73b18a4d4
+AUX R-3.3.2-zlib-1.2.10-backport.patch 511 BLAKE2B c5210ed01461c0f2f22e7668a1952593ca4732debd7061df94f6f43536fdbe8accb3338eceffc00b8c321dc5979b045adb7b49390450a330e202175500f3b585 SHA512 29fa5be3de023f0699bab8fec5095f83936d4e40be1cbc43595a7e5ff0023d586c1bfcfe5ed8edde805fa699443e2c6be61779000e6c91be22d7b19309cbb09a
+AUX R-3.4.1-parallel.patch 487 BLAKE2B bb596d66fab359511c6364ac06cbbe311decd3201292c55e3350e1fc3639c36049c88b1e90adf132da67e1835b646d882415559716727e62217b1c1c679711f0 SHA512 6bc59ebd6c0599110218a70a03030877df8a7fb70d17204a365330d9aa71f7b0688a2502c64b341c478061041da43eb0b0d08cfe63e3e394236142c7d148d778
+AUX R-3.4.1-rmath-shared.patch 899 BLAKE2B 0aba9c1c5417531647bed3829d53909e6f3983dea3f3de149c0ef270a8bc4eddc46dab4cbdc7cce78c0c163446a4d3a014afc9bc571f0d4a61cfa6827e40f16b SHA512 20c62b774149ae1959d28217a1be6f30968562de3ad5e4a8d7bfc7c579ca5c35fcd1304d68e222be0a37cb6db9b946fbe82d21a26fecccbecea1401b8c0b25d4
+DIST R-20130129.bash_completion.bz2 4209 BLAKE2B 0afbe9548641cb68a521e4140c48019d21288e32061abba227f8dfcb1398febe7132cc60ebaf9e4e1a226aaca0587d13f982c59e5bd6921fbe932238d6bb96d7 SHA512 910b26e16cfebe677f438abfa5f2652e582db143d91dbf0e7d4b1ea33462c7e5c89c3a3619c63ae98bba26b11a5adb16eda9d344f8cdbe4f0feabc546993c1a5
+DIST R-3.2.2.tar.gz 29772864 BLAKE2B f3f7ff9b9bd3cf685712e8997dd5a511a47e56ed261c1039b0540c29e4dd3131cc3052dad2c9a89af04b7bd595d9be7b9c8310206dd5b82244bb274f5a274603 SHA512 71ba470875262b9f00fb6970f209788df4dad30e0a28373b824b60d8bc6401afb7786e65387663c6490c7ddcd2bfd7f808a270a3e63238f3d7565d5f93607138
+DIST R-3.3.2.tar.gz 29440670 BLAKE2B 37308fb0caf19c33196b496d5b6f2f1b5b6f75e3ed985f2f0c4b0633d6191181de7f4cbd1ec986d76089a101d8895493cfe3b8563cfbc36f0b72a1ea14c748c5 SHA512 06a98687c0b180cb0bfd57440ea26088212d9f48948d503136475bf54b42d72cfec5bea7e333c0cedd60733bd614dd0f8c2eced7e24478b6c89f48e8d0c43482
+DIST R-3.4.1.tar.gz 30200109 BLAKE2B 03602e9a48759caee8ce047fa6273df7a54af089de4489e21953c0e3fc7bfdf720d924f1e0167d3dbf65f63ed42ac10dea8b45289b921cda1c0e6d25a0063ebb SHA512 19bd50c87dc001ef947c15c1760f27ac8986ff6b43c6d90d3093ae184e42963027ef06faf31ec57ac9e519af7a35a2f53f8ea23ef75d800ebbd02945cedc4651
+DIST R-3.5.1.tar.gz 29812849 BLAKE2B 9390934e5da5bd223eee717d4e4c5bd7d47291811318b2fdeac59216081cf9e63119f17bc8fee7235e2426852c50eb5948e6a2a3a632047f41b36460e2584967 SHA512 382cc6e200469dd168799948edcf3a0b869d7ef3b3176fdfc60752f3f37e6ba356323c47d8815a4d9ab6ad3a21cd045d26ef5e75107c8685328e0ffcfd172f7f
+DIST R-78d6830e28ea90a046da79a9b4f70c39594bb6d6.bash_completion 13596 BLAKE2B 53338e4a1c4f68beb69247216e553dbcac47f660fbf032bfebf7a660e32d2cff5b11ed35411c52de7e1fd6e00bbf5b5ea19369a325fa0a38bd93d63dc3288cbd SHA512 9ccd19bb1b0c18a2f13035ccd6809447429e197e298fb4d1df808ef345d723b42f75a1b91c349f6dbb46e4a82e59ef33e11300c495d79b63d670d0c0f2b16a06
+EBUILD R-3.2.2.ebuild 6047 BLAKE2B a2ac4b422ced8ad99a5950f910bcbe8000261a68870e14658bc7509397646114a686925984d9ff80d52a56226ea6da84e252f135bf5e48458bf7763ff92a16ab SHA512 adb3ec5895960448e932fe8e0a77991e8935c02d7e7e703457881a174a67fefe7aa8be26b0fc0591506ee7792476d621499f9393a2e464f14535b95324759d3e
+EBUILD R-3.3.2.ebuild 6118 BLAKE2B 3abf42aac7e4ab9ed306b56b8da7270f56ac14b900875ff9dfb290d69f42cd30a1e66ad4907c694b2c924156fa96c784f03d9e44e664be8c4cff266399fe8c23 SHA512 c8a92ff88add7f214abbf8a0dad71df8ef015669048ee1a9688fbbd9eb7e10c76f88380f7bb18db4d8901a633fe038e4104deabcb969bffc62fab298b734a150
+EBUILD R-3.4.1.ebuild 6327 BLAKE2B 0cda3734449cfe9cedd2e5c1ec2cc52087b7b8442343e402597b04cd40553f6069afe224c405a9c8451489a45d7f1c4684561d50fdc59c5e70dac9481f2d5948 SHA512 57f5aeccf1cdfbeac02b45429512f8f0ce04d36898ec411d7f52cc51881f6272431083c878887dbdd5ba5fccc39b5d9f6acca9a46068ed193d19a4008ba7b310
+EBUILD R-3.5.1.ebuild 6323 BLAKE2B d5f220e9296ca42a8a5cec4dc52fde312b42ce3f6d7d017bc9eeab73076b077726dda85527b2889f4ef4ea6f259a6804b7efe5c4a87f1c84c2a4c6665a06dff5 SHA512 6ffb6d725b927c52f13acb2fcf0a833767620af0b8d8e7e53d2ab7e00185e76a94045227a192d89b533bc9820c6be826c479c75c81841ec6dac6c9f660d9d1c7
+MISC metadata.xml 1140 BLAKE2B 774221eb531b4e80f0650b627b9ce53d9a2daf6342b1f19579d2d046e1c83aa497cc764870406b7ea3cf6cbae899cb6d460af92991d62bc6aea8da026a441822 SHA512 297c7e17998f92fb836b0599ce5221aee1ba1e7b1504edb348a602b695faf381d51f32f6118f5ef4bb353f02e92ffc5b3520b8d317d3e30a68a3cce0254fa6b1
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..45c84fd36498
--- /dev/null
+++ b/dev-lang/R/R-3.4.1.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2018 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/R-3.5.1.ebuild b/dev-lang/R/R-3.5.1.ebuild
new file mode 100644
index 000000000000..96c6fe5ac785
--- /dev/null
+++ b/dev-lang/R/R-3.5.1.ebuild
@@ -0,0 +1,204 @@
+# Copyright 1999-2018 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
+ eautoreconf
+}
+
+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-0.2.9 b/dev-lang/ats-0.2.9
deleted file mode 100644
index abc2fce3af15..000000000000
--- a/dev-lang/ats-0.2.9
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile
-DEPEND=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 virtual/pkgconfig
-DESCRIPTION=ATS Programming Language
-EAPI=5
-HOMEPAGE=http://www.ats-lang.org
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-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
-SLOT=0
-SRC_URI=http://downloads.sourceforge.net/project/ats-lang/ats-lang/anairiats-0.2.9/ats-lang-anairiats-0.2.9.tgz
-_md5_=b054647eb17b1c47d3a0cea644a74c0c
diff --git a/dev-lang/ats/Manifest b/dev-lang/ats/Manifest
new file mode 100644
index 000000000000..ef8acaa8d4f9
--- /dev/null
+++ b/dev-lang/ats/Manifest
@@ -0,0 +1,3 @@
+DIST ats-lang-anairiats-0.2.9.tgz 2466767 BLAKE2B fb453b29470f51c5d471e26b8e8b2777177d8b77200f259cf0bfbeb0c8ba8a6bda78e8f8ab2b7e5af8da6a4df1c0ee5306c35bf3d78d0b11115a6341c2ec1317 SHA512 fc7df7bc032ad665c9c8376245bb52f88f71ab81d36fa6f18e66886d9d19f247f54888a8ae3fa5adf17117ee6826bbbde1a177040dc2657f6da0f98d66b035e3
+EBUILD ats-0.2.9.ebuild 625 BLAKE2B 1d7e4179713c41a39e461fc4b5b47f88c00b2db8eb2509324b4f150616afe8f4d05317fbdb04c137c4d1585bb4abafabeb2531dd6f31f8702726a8de40c063e8 SHA512 1764dba459f0623633d05cb811210f2f1d98597537350b37307eb6ea8337586a832b9c4a30f4d64be2861d0a7fa308bf2ae92e836e3bd661a3d5bc8e7434cd61
+MISC metadata.xml 336 BLAKE2B 7f963a5f1a558c3b1891432f2bc3aa6500d29358f10c69bb18309638a36195a8c50d3dd19d5277b00222c13de59d3f9ba9c0b265eb9d33e695a73d40568b4d6a SHA512 89a4aedb8848847de4acec8320b1d7afa4c7485a72ebe97b23db15e7ff9677efccb71d1643e8670c6fcc5af499d6f5dd2bc88be0a477005c1d15609318f00d88
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-2.4 b/dev-lang/bas-2.4
deleted file mode 100644
index 66c4b94a7d14..000000000000
--- a/dev-lang/bas-2.4
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=sys-libs/ncurses virtual/libintl sys-devel/gettext >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=An interpreter for the classic dialect of the programming language BASIC
-EAPI=4
-HOMEPAGE=http://www.moria.de/~michael/bas/
-IUSE=lr0
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-2.1
-RDEPEND=sys-libs/ncurses virtual/libintl
-SLOT=0
-SRC_URI=http://www.moria.de/~michael/bas/bas-2.4.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c8aeff16859ad52420182de0f82b25a3
diff --git a/dev-lang/bas/Manifest b/dev-lang/bas/Manifest
new file mode 100644
index 000000000000..109f8da7188c
--- /dev/null
+++ b/dev-lang/bas/Manifest
@@ -0,0 +1,4 @@
+AUX bas-2.1-makefile.patch 1591 BLAKE2B bdea2c830c7127ad9434862f57314013ca9b5ce2844b08b4a47110b2d2ae935e30a48ea79f64e5ac9a8d5591e9da4768d3cb71b37079d2abc5508887c8b3bd39 SHA512 4ab41d2fed965f1165e741edc461070bd5ee6d76b05b16751671f34623c6ac7d459924357ce3db8fdaa9421f2e30f41ded5c4424799c82fc75fb337afd674b55
+DIST bas-2.4.tar.gz 258055 BLAKE2B ab7ce46ac0792d996ef0941af78f7f9dbec76226ee624c0b42623bf0236cdcb5dfa0694ce46b4a9e75b4e07f64192064f48a88db06affd71793f52c6578bcf19 SHA512 1a86805d1981a7bc920d7f6ab7827ee9f0ed9535b78b4c46718106e7abe0b1ef9298631e7e4d3d9bf206a8ca0e1239db48a9d94b0b85b71101aea0956d1454d7
+EBUILD bas-2.4.ebuild 754 BLAKE2B ce6be0c91b5bcb1dd1089587091ef1971f000f2a9571f696ba16d44b73fe8b40355664610b3a14865a825159f1cc3f0c40340fbe26e6896eb048f0ce75f4ec94 SHA512 12b86f38f0e838126cbd02a6a6a98fa4b2fe9603921b3806d6ab981b7fd2bb1f0aa1264ecf7cc5cc21918e6904d69228b2eb64b1da1a091550aadb278c0f4d73
+MISC metadata.xml 275 BLAKE2B bc546985dbd6f2dfde8f4e6d30ab0ed7d761b1e40d7259cd06a9e329eb18b05bc873e1e0f3f42e94ae668b12db4ac3d9689a18474c25cda005e9d7bb6ac2e9a8 SHA512 01eaccce18447fa65e25b0064e088eafed7dd0f45bf938eeb53fc2dd4610039ce2cbefedbd1a35152f924f29cb7e9de8d19a0c75bf7439c48d6f1a2872af15c7
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-0.58a b/dev-lang/bashforth-0.58a
deleted file mode 100644
index 98a583762324..000000000000
--- a/dev-lang/bashforth-0.58a
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=install unpack
-DEPEND=>app-shells/bash-3.0
-DESCRIPTION=String-threaded Forth interpreter in Bash
-EAPI=4
-HOMEPAGE=http://www.forthfreak.net/index.cgi?BashForth
-KEYWORDS=~amd64 ~arm ~mips ~ppc ~ppc64 ~x86
-LICENSE=GPL-2
-SLOT=0
-SRC_URI=http://forthfreak.net/bashforth.versions/bashforth-0.58a
-_md5_=c3a8040f166ae18d3511f57afbeac034
diff --git a/dev-lang/bashforth/Manifest b/dev-lang/bashforth/Manifest
new file mode 100644
index 000000000000..cb38ef90faf1
--- /dev/null
+++ b/dev-lang/bashforth/Manifest
@@ -0,0 +1,3 @@
+DIST bashforth-0.58a 78391 BLAKE2B 284f75af36d6bb2ac372554d2fd118190d1f830963ac74bd8db590327c85144fb9fdd7a026007c1af0af5f0a76021cb2fa6d302694e6421947674b27fbce49ec SHA512 55a158fc80d6108a9151537d9d222f23dbeab9b3c9c821068c15ace283b050c0630da8e1cc0a30d997d76acbcd5f7cc38662c997df0d87b7ce68bb3de446d296
+EBUILD bashforth-0.58a.ebuild 496 BLAKE2B 4b0e8a0192c54b9e3d2869b807464d99f23d8faf16b854be41e898fbd1f00203ca4bf61eb3ac27cde9ac56b1d6e42ee36777f71f64b50c32d863781968c2af76 SHA512 4afac34b3ea2bbf666695ce5704b09e30a0ccb78bae90e53740825a7872186489d77905a98d9d4c83a0030763d9009c3694e41ec728639a72ad8e199ddfd9ffc
+MISC metadata.xml 252 BLAKE2B f6282e2a99df668246ea8570c72345463f06d282b6adc6d9de2a08ef0827cf4572332c580caa594aad5ba8e200870d8d25494549ee4413798025f0d885b61a68 SHA512 cbda7bf9832872764ae776ce16b2966c37a2ba3a1982d9817006fd6b82d7b17146434cde428bf114062a483e9053d2acdcdd004695e6ebf428d19cdc09937c65
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-1.0.5 b/dev-lang/bff-1.0.5
deleted file mode 100644
index 50bb9cd8399a..000000000000
--- a/dev-lang/bff-1.0.5
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install test
-DESCRIPTION=A brainfuck interpreter
-EAPI=6
-HOMEPAGE=https://github.com/apankrat/bff
-IUSE=test
-KEYWORDS=amd64 arm ia64 m68k ppc ppc64 s390 sh x86
-LICENSE=BSD
-SLOT=0
-SRC_URI=https://github.com/apankrat/bff/archive/v1.0.5.tar.gz -> bff-1.0.5.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=68d4b698e6631d934b70aea5253fec43
diff --git a/dev-lang/bff/Manifest b/dev-lang/bff/Manifest
new file mode 100644
index 000000000000..d4628cdf1b61
--- /dev/null
+++ b/dev-lang/bff/Manifest
@@ -0,0 +1,3 @@
+DIST bff-1.0.5.tar.gz 4833 BLAKE2B 9e3b44da9cd001552119e25764b171c86027755583f79a13b1d1035ecbab134df0aa31234c1479370599dd56a76a7f1c67eff61d2c1189430bab6a9a22f629d8 SHA512 78e481f6f371421ce6f046041fe6d48be2e11000ddda82f60244c0100665469c4aff4f151d297bb533140d723f68d5a3844e0c29a256b022ac93cafbd2abe9fd
+EBUILD bff-1.0.5.ebuild 778 BLAKE2B 8a1accd3809accc014a2cea3208e306ee223efa3c45f6b8f7d1e7efef5c41c2921ca6cc9530c40205d5bb01fb8ff5a68b460509929e6028f3181954437829f8b SHA512 f2798b8ea848d52ada18c1a8ff6f2070b8bc2a1208a00c280073437ac57e0ad0ba5e6fb58b5db2df3fe427868e5ae554b2fcab70f4adb6056cbc0fadfd0e2b04
+MISC metadata.xml 358 BLAKE2B 475e8fa2af079096f259abc30d2f886eb2b568182394c5fa3a1c081754be7d151a3d10564315d6006232d6f2e7e68103337377db045c13a4fca1e05723d5ff0d SHA512 dc6a26609f65e38ec703c857c686e555170ad4021a994c3a39af131a9f3a38d6207a70558aae46dc5927dda8a9f735795d879a1ac4088ffeac5d09a068627f9c
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..ee9b8d706a87
--- /dev/null
+++ b/dev-lang/bff/bff-1.0.5.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2018 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 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/c-intercal-30.0 b/dev-lang/c-intercal-30.0
deleted file mode 100644
index a0369c488197..000000000000
--- a/dev-lang/c-intercal-30.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst postrm prepare
-DEPEND=emacs? ( virtual/emacs ) sys-devel/flex virtual/yacc >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=C-INTERCAL - INTERCAL to binary (via C) compiler
-EAPI=6
-HOMEPAGE=http://www.catb.org/~esr/intercal/
-IUSE=emacs examples
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2+ FDL-1.2+
-RDEPEND=emacs? ( virtual/emacs )
-SLOT=0
-SRC_URI=http://www.catb.org/~esr/intercal/intercal-0.30.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 elisp-common 23f47b2e1de7abf387105eddd1318738 libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=07bf1a0dadb5ba8f9b8221631a46e939
diff --git a/dev-lang/c-intercal/Manifest b/dev-lang/c-intercal/Manifest
new file mode 100644
index 000000000000..be35e355d636
--- /dev/null
+++ b/dev-lang/c-intercal/Manifest
@@ -0,0 +1,6 @@
+AUX 50c-intercal-gentoo.el 191 BLAKE2B 3575c7ecac45d7023f727e559bbcfeb311c45c720a54c23661ec13a71272b748dbe499d500f0e8bd4aff3d871c96eafbf2f80e4d7bb2c402ffe3b628d2243398 SHA512 957e43fb8ada732ae9224313456d750df25484b8bc8d0d3b1ffcd547542de99ffcffdc8dabbebda0fbaa0a760e799b403a6e1a5160e5359e15072a72e9c19ab2
+AUX c-intercal-30.0-version.patch 279 BLAKE2B 12f448dc7dbc5ede3f6537564f0477b2166e3e456bb750cf75813f30fecf74bd446f04b28def7556d16630f02d5e15e2289f0c39deb07915d39f77ab0856ffe8 SHA512 ba38939f207587ae7b99a2dab63e395c27a01ee6e8495c8b10eee3c9d48ee9848cc2e240cb123abd93e69d1f516cf779f41f5b888ee194641df50001ac446a60
+AUX c-intercal-30.0-yywrap.patch 282 BLAKE2B 0417757240a476c845398db4e2644c5333d851e1107ceb09f3b8f4a7c3d4ade553331ea36663906ecf11dc739d47b66ae1b70f5d32bae34cd42584d68db8552c SHA512 b181da7c93268ece0db9244ed7bc0d085d12dfeb92e6f4b6af9b8fe17fed8e5ef432006bb097fc568a401e74540c97a3afa738510f76f78052332c573ae1999c
+DIST intercal-0.30.tar.gz 930759 BLAKE2B c8c9b77c31901da8f7dbd5a76c2d6fa900962c69f4ca56835f750f40370d5161f6311cbe5473cdb7342772c1cc5317e51d91e174cb16985565adacd001fc1f29 SHA512 e82f52082a73e0eb6116026f78fdcc38369f54af828b9ed0d3ca6ed6c40550bfa81db4ca7c4d09015b5db5104a1c06229cfed52e1d202c3a7443f933fbcc0498
+EBUILD c-intercal-30.0.ebuild 1712 BLAKE2B 114eec03009fd21fb32088a03ad89112e5e310cc0136a9a255938337364ba2403bc8882477c56eb5c05e45432001f2391c518c1a6f91a843e7fbba7059cf08fc SHA512 e086415af60d5f2b6c0a97806e320e6af07c990d384f76859232c221e1592c3d9d27a5d0ce4829b3d85070c77901324d1ba09f20f43c291d29be083e49926c48
+MISC metadata.xml 592 BLAKE2B 8d07802ff5f3cbedb9643b61c469214284c5d21dbaf7aa2afa1c706cf0c9ebe0af2903f3bada0145fd0fe648fe46678919a730f88a2c38c84d149416a8095b11 SHA512 d2b9dad8dd7a03744904ccee87ba17ed726b0005b6bd685d7b926b4657e57c9456d8a7f57deedf260efd543b42c157c13876cf6942cd1f47fee88f0782dac13d
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..3789335be519
--- /dev/null
+++ b/dev-lang/c-intercal/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>ulm@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-4.4-r2 b/dev-lang/cfortran-4.4-r2
deleted file mode 100644
index b93824490225..000000000000
--- a/dev-lang/cfortran-4.4-r2
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install unpack
-DESCRIPTION=Header file allowing to call Fortran routines from C and C++
-EAPI=0
-HOMEPAGE=https://www-zeus.desy.de/~burow/cfortran/
-IUSE=examples
-KEYWORDS=alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-macos
-LICENSE=LGPL-2
-SLOT=0
-SRC_URI=mirror://debian/pool/main/c/cfortran/cfortran_4.4.orig.tar.gz mirror://debian/pool/main/c/cfortran/cfortran_4.4-14.diff.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=9797f5d19e6c155d216867114e943ce3
diff --git a/dev-lang/cfortran-4.4-r3 b/dev-lang/cfortran-4.4-r3
deleted file mode 100644
index ecbc0cd17514..000000000000
--- a/dev-lang/cfortran-4.4-r3
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install prepare unpack
-DESCRIPTION=Header file allowing to call Fortran routines from C and C++
-EAPI=5
-HOMEPAGE=https://www-zeus.desy.de/~burow/cfortran/
-IUSE=examples
-KEYWORDS=~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos
-LICENSE=LGPL-2
-SLOT=0
-SRC_URI=mirror://debian/pool/main/c/cfortran/cfortran_4.4.orig.tar.gz mirror://debian/pool/main/c/cfortran/cfortran_4.4-14.diff.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=5888240d94dd560bd89031ba96e1a956
diff --git a/dev-lang/cfortran/Manifest b/dev-lang/cfortran/Manifest
new file mode 100644
index 000000000000..5554e4f79482
--- /dev/null
+++ b/dev-lang/cfortran/Manifest
@@ -0,0 +1,5 @@
+DIST cfortran_4.4-14.diff.gz 23084 BLAKE2B 8e760b3697869c12e94925c4781318fbe7640f0563a2464bf5d9f51a4afcb4bf9c281bab189542f2342d6dbc6f5524b4a48d9f844459d190e9182a96ebefbf9b SHA512 1e0b267efc17c2ba30ca1108d59ef87d1a401e6b88bea2c7045458f8cfad6ec9a05f6bf4a08c1d6cb314c790a4969a1f0fdf0c7b6abc28bae544928aad5b0218
+DIST cfortran_4.4.orig.tar.gz 120119 BLAKE2B df4e0650e2718ed0c2009fb1b85330266308b0b584fcdc85e08cad0913bf063ab38824724b43a005a63a6e6bd5152b35115a68659487a992b96d0d38792e6d0a SHA512 969d0db566ecd7ed7945cac7f8ceea1cbd94ab427734ba83882acf97022c83b1417e32515d847fee89144137f58f7041cf5164fc397f3d7526f3aa958f8b038c
+EBUILD cfortran-4.4-r2.ebuild 1077 BLAKE2B b74276d8a3e2db15922e3d2970ed0f984e63a8842f44a95917f07a60823d2cda914a5bbe5f7d996c628969d344e7a66690904ef3a94f0bd36c3f731bd99e366a SHA512 5394de879072217a8f481aa5f481d14f283517551663d58578612bc63e6279a3b4a76561a30fe4d22206ee5113723c27f97b5acc3dba8d6a933fccadfaaee48c
+EBUILD cfortran-4.4-r3.ebuild 1148 BLAKE2B 52465e1cf320a8e473cf5be065fe5b697bee8569ae6bd928fde27f741585426620d6cd9a11ebe69a0d225b998597dc644b785916cdab440b387756b17f8ba4a6 SHA512 f9f32a36e8adfbca9ae8e2494dd86d82add2472cfd23a9b0a237adf10810077131308b5101edc90c59a1415120fd571c90438fef86743f8b7df74a6cfd066f50
+MISC metadata.xml 588 BLAKE2B 9e2c3b0818a3bbc250153d807eb81d08f24d5568fc34eb83aef2a9344c59ca998fe488d27e8d23bc1381e21580015df60519698369394c17361111e470a9313b SHA512 4cc9d7ec3c44afc7e8ca2b43c04ea67c88fa1be09f9c594d83d1d011823566efd4e6b889fc4e95b019885be4223de32d94e0126acf70fe5e7cabf753a9923d40
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..6b13ce659408
--- /dev/null
+++ b/dev-lang/cfortran/cfortran-4.4-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+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="https://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..18edf8e29493
--- /dev/null
+++ b/dev-lang/cfortran/cfortran-4.4-r3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2018 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="https://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-5.4.6-r1 b/dev-lang/cilk-5.4.6-r1
deleted file mode 100644
index dd9bd7f93fcd..000000000000
--- a/dev-lang/cilk-5.4.6-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=>=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Language for multithreaded parallel programming based on ANSI C
-EAPI=5
-HOMEPAGE=http://supertech.csail.mit.edu/cilk
-IUSE=doc examples static-libs
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=GPL-2
-SLOT=0
-SRC_URI=http://supertech.csail.mit.edu/cilk/cilk-5.4.6.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=2a47349a295da22f0c61a91c1c9b7c0b
diff --git a/dev-lang/cilk-5.4.6-r2 b/dev-lang/cilk-5.4.6-r2
deleted file mode 100644
index 83b61aab7827..000000000000
--- a/dev-lang/cilk-5.4.6-r2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=>=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Language for multithreaded parallel programming based on ANSI C
-EAPI=6
-HOMEPAGE=http://supertech.csail.mit.edu/cilk
-IUSE=doc examples static-libs
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=GPL-2
-SLOT=0
-SRC_URI=http://supertech.csail.mit.edu/cilk/cilk-5.4.6.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c24024b98de121b598cec39becd7a622
diff --git a/dev-lang/cilk/Manifest b/dev-lang/cilk/Manifest
new file mode 100644
index 000000000000..4c7d60718740
--- /dev/null
+++ b/dev-lang/cilk/Manifest
@@ -0,0 +1,5 @@
+AUX cilk-5.4.6-autotools.patch 3379 BLAKE2B 50f3a0c7b36fc2f944d0e952e4ebd5b96e978d0f339fb3ae9b3205e7ea2f76a1fd04a262752ac68af22f57620173d372b7f0963911afa012d3258d6631ae7b15 SHA512 a69181b04c8ebd5010164d8796e615cd63837be45409438d20d009eb69492cfe5750f1a21754cdadb15cf9ca4645edc65db46092741e6227df4f41fef5110943
+DIST cilk-5.4.6.tar.gz 1270768 BLAKE2B e340901034a082af0ad431e33cd68c3ba9b97fa06ad5efe44b1f7e9eb6159f0408048d6ba76315dfc54670faf548d45f282fdd0ae5300ae2a5d741a92639beec SHA512 1ad082c5e1f42a4f15130673d1d43a0b5dedd80ca0e3182765065be8dccce72b26087243ca3405460dcc90332a84c3c5b1decf5a4650505fb738e7e085998e0e
+EBUILD cilk-5.4.6-r1.ebuild 873 BLAKE2B 019e29f097c69c317805411eaa7ae51c3fb279a14f7e19d0c7f125baf5f4f969ae194fcdd1c8b16b75ab5d4e5542f8b89525bac9acbc3dacbc6f36dfaca9f770 SHA512 9c5414928164016e8f7b2cd3f87513313de62ac2c8d3988b52571bdded22b63bfaec8d18ab46d39cbf5c3ea0226bc35eab2da7b7525f0007ca081c07dc95993c
+EBUILD cilk-5.4.6-r2.ebuild 970 BLAKE2B 15b132cbd2709027b5321391c111327a75b775df78a46b95bd161be321862b8cfeb45712feff77cade5e89a68876bdff9fadc9e70dde7531aa39a768733c05e9 SHA512 853142dc8f3e07718e059d618b7b87b112220d3c47f7536c257ae958f9717cef79b7c9a5818684434d358c56b9a7e82df38ae5604c727a9dd08276cbb4b2fc60
+MISC metadata.xml 874 BLAKE2B 719290eb8bee04e03209a96d8b2a04c04fa35f1143e96078dfd7fddb538be34f4f1b4be4b7b21527799e76d66a4d0016fd8af46210ca57a98b09e03761f33481 SHA512 b2044c69cb6dc0ee0a9a0e35abdd52fc52e46e532ca212f075bebb80b078d174ab6e9897b2cbec8f742274fc0aac37f1a8dea7b23d66d718871ef1cd3566cf96
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..c8b5e5c42150
--- /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-0.6-r1 b/dev-lang/cll1h-0.6-r1
deleted file mode 100644
index 1417f406c8da..000000000000
--- a/dev-lang/cll1h-0.6-r1
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=install
-DESCRIPTION=C<<1 programming language system
-EAPI=4
-HOMEPAGE=http://gpl.arachne.cz/
-KEYWORDS=~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=LGPL-2.1
-RDEPEND=sys-devel/gcc
-SLOT=0
-SRC_URI=http://gpl.arachne.cz/download/cll1h-0.6.tar.gz
-_md5_=f53266dbfee37742f732075aedc4e915
diff --git a/dev-lang/cll1h/Manifest b/dev-lang/cll1h/Manifest
new file mode 100644
index 000000000000..2719d79d0df7
--- /dev/null
+++ b/dev-lang/cll1h/Manifest
@@ -0,0 +1,3 @@
+DIST cll1h-0.6.tar.gz 6569 BLAKE2B 23cc947cb0526713903bb28e22ed50bf595cbdd8d37335bb2772082430188f6988bfb600355e86b9d77261537dfa8f1218cba46c2a122d4407ff316c50dd6a63 SHA512 19b2716519d169d6c090c64c60db318008ac807723d73420d29b75d8b5cf74d56b2b68177483a861ab659efe24cdc1b6e1f17a9fd3c373490bcb1e755ba784b2
+EBUILD cll1h-0.6-r1.ebuild 572 BLAKE2B f45192d63c0732a22630193fd7d0d3188d68a0bdb16aab39da1b2b699531b6be05820bbd902c2f22be704527df3ff34f3556bfa26efe2d15eff5615085eb2d6e SHA512 b80a843bd0de5c9a395f2e82f63b8ed21048803ec1d3d7acb5cdb016c245987c63dd06c006fbd771500307e2be2885c1ed6268c0f04a184de00f5a193d301d92
+MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
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-1.5.1 b/dev-lang/clojure-1.5.1
deleted file mode 100644
index 687421caa287..000000000000
--- a/dev-lang/clojure-1.5.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=>=virtual/jdk-1.5 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=Clojure is a dynamic programming language that targets the Java Virtual Machine
-EAPI=5
-HOMEPAGE=https://clojure.org/
-IUSE=elibc_FreeBSD source test elibc_FreeBSD
-KEYWORDS=amd64 x86 ~x86-linux
-LICENSE=EPL-1.0
-RDEPEND=>=virtual/jre-1.5 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-RESTRICT=test
-SLOT=1.5
-SRC_URI=https://github.com/clojure/clojure/tarball/clojure-1.5.1 -> clojure-1.5.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=5d87686faf98d2f95143bad91f65066c
diff --git a/dev-lang/clojure-1.6.0 b/dev-lang/clojure-1.6.0
deleted file mode 100644
index 988064b2ec5d..000000000000
--- a/dev-lang/clojure-1.6.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=>=virtual/jdk-1.6 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=Clojure is a dynamic programming language that targets the Java Virtual Machine
-EAPI=5
-HOMEPAGE=https://clojure.org/
-IUSE=elibc_FreeBSD source test elibc_FreeBSD
-KEYWORDS=amd64 x86 ~x86-linux
-LICENSE=EPL-1.0 Apache-2.0 BSD
-RDEPEND=>=virtual/jre-1.6 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-RESTRICT=test
-SLOT=1.6
-SRC_URI=https://github.com/clojure/clojure/tarball/clojure-1.6.0 -> clojure-1.6.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=1ebc762b825358973b6238a7cf7ae57d
diff --git a/dev-lang/clojure-1.7.0 b/dev-lang/clojure-1.7.0
deleted file mode 100644
index bc264fa861c4..000000000000
--- a/dev-lang/clojure-1.7.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=>=virtual/jdk-1.6 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=Clojure is a dynamic programming language that targets the Java Virtual Machine
-EAPI=5
-HOMEPAGE=https://clojure.org/
-IUSE=elibc_FreeBSD source test elibc_FreeBSD
-KEYWORDS=amd64 x86 ~x86-linux
-LICENSE=EPL-1.0 Apache-2.0 BSD
-RDEPEND=>=virtual/jre-1.6 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-RESTRICT=test
-SLOT=1.7
-SRC_URI=https://github.com/clojure/clojure/tarball/clojure-1.7.0 -> clojure-1.7.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=8bd03110af88f0aeb3f26997fc803339
diff --git a/dev-lang/clojure-1.8.0 b/dev-lang/clojure-1.8.0
deleted file mode 100644
index f9fc27f77773..000000000000
--- a/dev-lang/clojure-1.8.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=>=virtual/jdk-1.6 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=A dynamic programming language that targets the Java Virtual Machine
-EAPI=5
-HOMEPAGE=https://clojure.org/
-IUSE=elibc_FreeBSD source test elibc_FreeBSD
-KEYWORDS=amd64 x86 ~x86-linux
-LICENSE=EPL-1.0 Apache-2.0 BSD
-RDEPEND=>=virtual/jre-1.6 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-RESTRICT=test
-SLOT=1.8
-SRC_URI=https://github.com/clojure/clojure/tarball/clojure-1.8.0 -> clojure-1.8.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=405d7773dae9188c176684c829343b59
diff --git a/dev-lang/clojure/Manifest b/dev-lang/clojure/Manifest
new file mode 100644
index 000000000000..f64d26f78026
--- /dev/null
+++ b/dev-lang/clojure/Manifest
@@ -0,0 +1,9 @@
+DIST clojure-1.5.1.tar.gz 540021 BLAKE2B a9887142f251b490deae33c6d3749cd5592c5e8b627475a2e79d3ef96ca27285d61edb872cdabf15227fc1e8115424a979b1570f5523f3b6f2e8976ff2db3412 SHA512 8bc4b7098ec11a3cd4d077f32607c5d23118d5f84b88af69b2051c4dd5b17f28f092b77206fba87e23f1163d2d0f7a2c37b1b1ffa1bcfef3ad4c8f74695d71cd
+DIST clojure-1.6.0.tar.gz 579154 BLAKE2B 29b15c25ec3085e977da6a59c8a3d19f5fd369599cf6f8c535b828fab0176c7c0a24274507eb0cfd66f728c5961c928b9de4aed8edf00970193c1ea2addeba29 SHA512 52bf54d157dae77e71e53bac421daa1bca7ef55b837600c8b04751a545cbed0f04d3718543031d1e5b8ca43e2518d356082b9f8c029c2e318996450cfaee9c81
+DIST clojure-1.7.0.tar.gz 614331 BLAKE2B 4584eb81dddb7660084a067b9332d7e5375f3fe62d9a0af8fefece446c0be654f9916298672b3bab33a166e2e4edd73c3fcd61c49f956bfe83e0de0a122f0e83 SHA512 243d3120fa1a0f559c1f6b4724d0f7ba72e6f6dd009d0849377087e890aa04dba7c119862001d0c543eb0e35ef5c13cc8967ad494ffa9522daa9f8b1dfc77ef1
+DIST clojure-1.8.0.tar.gz 627688 BLAKE2B 7dc3029e38e574cd32c74cce1f3ae03890869023d5fb2e8138f2fdc4461b3f9e119c4b6042e2b7caee9561b664b49cbaf79378ef1fdd0fd78c4d712c3b9d95de SHA512 fa5714397e679f77260db054bdc0891a311e7bd14bfceb2dd0494480fb9cf21fc74dd295e75070105ff0cdd50842390a748d8782397c549f51d85d18d54a1231
+EBUILD clojure-1.5.1.ebuild 759 BLAKE2B 63b6cc6944d10515a5abfb6ceef877c54564d637e7a15b00f947d903c03b35e2d8af85ae778fff7fe52e3070ea5eb37d484e79f0f98dd50354a2f143de54fb54 SHA512 8abc35c88d06965897a9b56c508336435d366fa5a41734c944c45c775ca2b728bb383ccfa8800eb4e154651efca5c15747d22e52b229234b1edeef4985e988d3
+EBUILD clojure-1.6.0.ebuild 774 BLAKE2B 815d7acbfc027e30913fe92ba77d283692c56d7f72437a347e9cf0a0e9049975ecce7c468e0fbfe70e8a54b4bf108d38ad8c1238c902e91f4f76c3d52119180b SHA512 05f3d4fcb4957d3fea2e81a09ce1006346206356d16992dec51e46b8219a2a52e772ddfca4fc0ee2f33ff87295c261f661f6e9052ab93effab85c8ec574252d7
+EBUILD clojure-1.7.0.ebuild 790 BLAKE2B 76a4f4068d2a6c86df406322b936e28a21d51691149020b15d278ad2c547e06f3c2873f9a657da7ef2496d9030b9693c433ebaefdc591845b9a5217bb9f106f0 SHA512 80830ee82ec9e231e6a51b5ad4206829eda962ee13a472c2f53cd1a3af77e4e3e1289077336f4496ad4d1ffc250878a30153177abc70c8dfd245717ef33de1e1
+EBUILD clojure-1.8.0.ebuild 779 BLAKE2B d415833f59ac76342dda84f41eab55785639c30f18ac16bf023f535563d6d6ea3b103909624fe907d718d73de94f2b199568faa85140c6239873572ba716c1e6 SHA512 2f7c5c20f310e935de6e00961f14a1cf4ab15b8645cd92fc596595aa343abe24f5979eabe3e2572f5aa0a3834c953d834f76662846686f671200904bce3e9154
+MISC metadata.xml 252 BLAKE2B 738fe12dbc3869c6805e9f90ec607615f0ef13904c794e181e80fca986675cfe884cdbae333fe4837f8bec0f25235ad5d1c223ccd4f01e3355b4f261abe3767c SHA512 471e24b868f43f66916b081b0f2b7995830020f886a33f177a10556a60f824decfe63fc5128e5184b9edc2e157d3f022cb1913303b3cffe4aa9233025843b9dd
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..4d5b4ba50d0d
--- /dev/null
+++ b/dev-lang/clojure/clojure-1.5.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2018 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="https://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..4748ab30800a
--- /dev/null
+++ b/dev-lang/clojure/clojure-1.6.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2018 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="https://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..b5de3a3ba23c
--- /dev/null
+++ b/dev-lang/clojure/clojure-1.7.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2018 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="https://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..f712f2fa139b
--- /dev/null
+++ b/dev-lang/clojure/clojure-1.8.0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2018 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="https://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..d3f6b1a43343
--- /dev/null
+++ b/dev-lang/clojure/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="github">clojure/clojure</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/closure-compiler-bin-20170218 b/dev-lang/closure-compiler-bin-20170218
deleted file mode 100644
index d58edd5f0d26..000000000000
--- a/dev-lang/closure-compiler-bin-20170218
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install preinst prepare setup
-DEPEND=>=dev-java/java-config-2.2.0-r3
-DESCRIPTION=JavaScript optimizing compiler
-EAPI=5
-HOMEPAGE=https://github.com/google/closure-compiler
-IUSE=elibc_FreeBSD
-KEYWORDS=~amd64 ~x86
-LICENSE=Apache-2.0
-RDEPEND=>=virtual/jre-1.6 >=dev-java/java-config-2.2.0-r3
-SLOT=0
-SRC_URI=https://dl.google.com/closure-compiler/compiler-20170218.tar.gz -> closure-compiler-bin-20170218.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=d2a02d9850d5b4814b6f7d327d167e98
diff --git a/dev-lang/closure-compiler-bin/Manifest b/dev-lang/closure-compiler-bin/Manifest
new file mode 100644
index 000000000000..761062667c95
--- /dev/null
+++ b/dev-lang/closure-compiler-bin/Manifest
@@ -0,0 +1,3 @@
+DIST closure-compiler-bin-20170218.tar.gz 6515448 BLAKE2B ddf7600776445c90059bcee037596af9c7b14265d55c51c1c4a2a55acf2fc97e8f9ab04f854f8a7ba0a32147e63c9e4e7723f4d7f34e842efae96fc86953d305 SHA512 4ddbb339615edb104ddcb84775b1da2f096d49dc921b70c5094a7b7afba25e40c1212bbc9f0e51ad643a3a72bfc46a301efcadd7909d09a77d0bb5e68e41bd81
+EBUILD closure-compiler-bin-20170218.ebuild 648 BLAKE2B 5db8df0be8f17f5a1c7b9067c471885c31ce68765208332dd64991e6ab4eb5642229ce389a3c9a107b5dd3a374a0ebed540cbb9c76ffff834f39f8152d551733 SHA512 c8be5a5abe654036b7a8baed6d1856a35b94d7e13b5ca16de5a9b3028f4333451347331c5565af167da2c103f91ddd80a1551e818dfd2e33e8b3f6aa9e8d4cb9
+MISC metadata.xml 260 BLAKE2B 2ef5592d54d4239c4ea7257368245d4adf72cba5decbbfd56b3e4e472241de40f06d5fc4a1a3ce666a72116f3374082cdee12b61dbb3439598abff3feb983e3c SHA512 7610b5cbfca271ea58d78662bc007727be45f0db490793f0822e8e1ff26bfbf9343a9918417359d6385466cdb78bb20220da17a8a689446bc8f47a9c84b453fb
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..4b808e719a5a
--- /dev/null
+++ b/dev-lang/closure-compiler-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-needed -->
+ <upstream>
+ <remote-id type="github">google/closure-compiler</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/coffee-script-1.12.5 b/dev-lang/coffee-script-1.12.5
deleted file mode 100644
index 596a6a1c9422..000000000000
--- a/dev-lang/coffee-script-1.12.5
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install
-DESCRIPTION=A little language that compiles into javascript
-EAPI=6
-HOMEPAGE=https://coffeescript.org/
-IUSE=doc examples
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=net-libs/nodejs
-SLOT=0
-SRC_URI=https://github.com/jashkenas/coffeescript/archive/1.12.5.tar.gz -> coffee-script-1.12.5.tar.gz
-_md5_=ef3eb9c4bd57831829e85960cf5cd6b7
diff --git a/dev-lang/coffee-script-1.9.3-r1 b/dev-lang/coffee-script-1.9.3-r1
deleted file mode 100644
index 69fa69a32701..000000000000
--- a/dev-lang/coffee-script-1.9.3-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install
-DESCRIPTION=A little language that compiles into javascript
-EAPI=5
-HOMEPAGE=https://coffeescript.org/
-IUSE=doc examples
-KEYWORDS=amd64 x86
-LICENSE=MIT
-RDEPEND=net-libs/nodejs
-SLOT=0
-SRC_URI=https://github.com/jashkenas/coffeescript/archive/1.9.3.tar.gz -> coffee-script-1.9.3.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=45c527a45b1070acb0d79bc6a440c925
diff --git a/dev-lang/coffee-script/Manifest b/dev-lang/coffee-script/Manifest
new file mode 100644
index 000000000000..c5548ffcc0e3
--- /dev/null
+++ b/dev-lang/coffee-script/Manifest
@@ -0,0 +1,5 @@
+DIST coffee-script-1.12.5.tar.gz 1429494 BLAKE2B b64dc0dce9d2dbcbe5e20fcf002e9fe12116e6987ebdb19c82dadec61d90eaf66de5f4560bab5a3df1c8cef9f557bb0f5c5edd3e1fa5e7062cc0641dcbec28bc SHA512 b83981508c99e52957786d66b6c93e65cea98386b247cddfd516146eb4edb7ccb49451cc976d683fc9127b1ed0ea0a4d54cc47be519af1bf9e8b3dd79159d591
+DIST coffee-script-1.9.3.tar.gz 810246 BLAKE2B dbca1d690ad80e38d8997c237f8c4c6e8a6b8d5c1362d5173a0c38d75e1389f5d8c09299bbb4902745e77133901857c8c15cec0dc17cbb883acf84854aefb68f SHA512 660826e27f842ed67ec6ef59f734087c95585e03b6b8c6d25c8ecfc567f3161f59034e730b61e5f806edaaa7ec6c805ad6d14902857aaf09cf6193b0fe14f506
+EBUILD coffee-script-1.12.5.ebuild 1124 BLAKE2B 7a002ee5ecfd799a316443b1d344f8316cd1c82272b7b063f30bbddd36eb1d545528a9c69c22901a380575d1aaf4ab30212081f607334e790fced6face4c4365 SHA512 302038208e766821917d463f978b90b69112a482ef4f74af57796344eee403c7d7c94cffd9af528e789a175c501f0b7cd01cf083b4f0d1e5d33606ad2a79c6b0
+EBUILD coffee-script-1.9.3-r1.ebuild 1280 BLAKE2B 6da3bb41c79ed6e70c7aad0bdd653e88692bb601574fd01644867617d47ee59ce189f5e129834dfb6fa582b8abc1db1208a0d8f2aeb2c42ed23eaf158815a35f SHA512 8d13758394658f162a55d01a608ba8fa0d16052700b6f6ab9ba4c274c642e463136035ac7ed6fbdc2be5a46e689e3eec002249a70ccfb009d9cdcce16d3a39ca
+MISC metadata.xml 343 BLAKE2B 6184b541918376bbe76d529e2afd8f24ae63d7715489c708cebeff2d115fb0e336475e6d5c4e211e443cd6c185d46a79b579f3d14d41b6f66e7d397a85ac922e SHA512 36eec061eb724a7229933450185185c0ac781d1adc1da4a54b067ef34ab7d861cf336c3c7e4b2c7d12a6e1c9400d4bbb960c67a66afd854209a5268e8e3d19f7
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..6029b25ed394
--- /dev/null
+++ b/dev-lang/coffee-script/coffee-script-1.12.5.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2018 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="https://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..941e12267f0a
--- /dev/null
+++ b/dev-lang/coffee-script/coffee-script-1.9.3-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 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="https://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-0.10.6 b/dev-lang/confluence-0.10.6
deleted file mode 100644
index 0e429b828030..000000000000
--- a/dev-lang/confluence-0.10.6
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=>=dev-lang/ocaml-3.10[ocamlopt?] sys-apps/sed
-DESCRIPTION=Functional programming language for reactive system design
-EAPI=2
-HOMEPAGE=http://www.funhdl.org/wiki/doku.php?id=confluence
-IUSE=+ocamlopt
-KEYWORDS=alpha ~amd64 ia64 ~ppc ~sparc x86
-LICENSE=GPL-2
-RDEPEND=>=dev-lang/ocaml-3.10[ocamlopt?]
-SLOT=0
-SRC_URI=http://www.funhdl.org/download/confluence-0.10.6.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=8a7e2c89f622609e174b0899dd1e0c94
diff --git a/dev-lang/confluence/Manifest b/dev-lang/confluence/Manifest
new file mode 100644
index 000000000000..cfc7e799bd9e
--- /dev/null
+++ b/dev-lang/confluence/Manifest
@@ -0,0 +1,3 @@
+DIST confluence-0.10.6.tar.gz 118762 BLAKE2B 31c340e38193c23e3fd119e668e2be5f56e275aa28b716370fcc8922c5fdb0d7689008bf965781f1c6045e6565671371b3b9e9fb44d51d77eba2c5dedc23d9aa SHA512 904ea553a917ac2aafc33464fe4175bca76c53c51c50819ea92326dd5a1451e98eca6a56db28b7041814e5e4cea61da618012087a79fa9ec670ca67fc0014d25
+EBUILD confluence-0.10.6.ebuild 1545 BLAKE2B 1d573dcfddda47c338430bc4a97676ea40b1938e9d7184fc13cf0387da6ee2caa71f897251f4ddc27e2ad2cee40d53d7fb8cb08a21df269eff90898f436d6537 SHA512 62e5ce01609e0593cdb0ec45406f625d4290111bc0066f1cd7fb37036be2521b640816b4e41d79a2cad86b4c0de1360cf7ae3aae47b95e6968c384d66958c1d2
+MISC metadata.xml 243 BLAKE2B 010ca240ae06e9a9f6d7ba213eb06df36d9ba862ff2d2458d98a9fea1a1e7f3026d13832a73bce1b3ad9345029425e6abfae9e03bf126f2329b3f030ed3753fd SHA512 1c5b4b2163017e496999d1f87e5c9c5ac6c11b2e9187450ccfb3df258f34e54d278972f04ee0e8429476c6f87e091a869ac2a28c6e8c8e6d20678c3e74061449
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-0.23.1 b/dev-lang/crystal-0.23.1
deleted file mode 100644
index cfdb80db6c2e..000000000000
--- a/dev-lang/crystal-0.23.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare test
-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
-DESCRIPTION=The Crystal Programming Language
-EAPI=6
-HOMEPAGE=https://crystal-lang.org
-IUSE=doc debug examples blocking-stdio-hack +xml +yaml
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=>=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 xml? ( dev-libs/libxml2 ) yaml? ( dev-libs/libyaml )
-SLOT=0
-SRC_URI=https://github.com/crystal-lang/crystal/archive/0.23.1.tar.gz -> crystal-0.23.1.tar.gz https://dev.gentoo.org/~mgorny/dist/crystal-0.23.1-patchset.tar.bz2 amd64? ( https://github.com/crystal-lang/crystal/releases/download/0.23.1/crystal-0.23.0-1-linux-x86_64.tar.gz ) x86? ( https://github.com/crystal-lang/crystal/releases/download/0.23.1/crystal-0.23.0-1-linux-i686.tar.gz )
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=5726cdf98bf7c77f45adb65b4c1cf60e
diff --git a/dev-lang/crystal-0.24.1-r1 b/dev-lang/crystal-0.24.1-r1
deleted file mode 100644
index 3585a9da7bfd..000000000000
--- a/dev-lang/crystal-0.24.1-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare setup test
-DEPEND=sys-devel/llvm:5 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
-DESCRIPTION=The Crystal Programming Language
-EAPI=6
-HOMEPAGE=https://crystal-lang.org
-IUSE=doc debug examples blocking-stdio-hack +xml +yaml
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=sys-devel/llvm:5 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 xml? ( dev-libs/libxml2 ) yaml? ( dev-libs/libyaml )
-SLOT=0
-SRC_URI=https://github.com/crystal-lang/crystal/archive/0.24.1.tar.gz -> crystal-0.24.1.tar.gz amd64? ( https://github.com/crystal-lang/crystal/releases/download/0.24.1/crystal-0.23.0-1-linux-x86_64.tar.gz ) x86? ( https://github.com/crystal-lang/crystal/releases/download/0.24.1/crystal-0.23.0-1-linux-i686.tar.gz )
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c llvm f9e74238f1b5743ea5d7214fcc7dbb36 multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=6a38d3f912b64944e73b7dbcb71e070a
diff --git a/dev-lang/crystal-0.24.2 b/dev-lang/crystal-0.24.2
deleted file mode 100644
index 43bd3c34d468..000000000000
--- a/dev-lang/crystal-0.24.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare setup test
-DEPEND=sys-devel/llvm:5 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
-DESCRIPTION=The Crystal Programming Language
-EAPI=6
-HOMEPAGE=https://crystal-lang.org
-IUSE=doc debug examples blocking-stdio-hack +xml +yaml
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=sys-devel/llvm:5 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 xml? ( dev-libs/libxml2 ) yaml? ( dev-libs/libyaml )
-SLOT=0
-SRC_URI=https://github.com/crystal-lang/crystal/archive/0.24.2.tar.gz -> crystal-0.24.2.tar.gz amd64? ( https://github.com/crystal-lang/crystal/releases/download/0.24.2/crystal-0.23.0-1-linux-x86_64.tar.gz ) x86? ( https://github.com/crystal-lang/crystal/releases/download/0.24.2/crystal-0.23.0-1-linux-i686.tar.gz )
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c llvm f9e74238f1b5743ea5d7214fcc7dbb36 multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=a41ee8103aebcc63f36f0cb833ce3c72
diff --git a/dev-lang/crystal-0.25.0 b/dev-lang/crystal-0.25.0
deleted file mode 100644
index 0b5db2e168d7..000000000000
--- a/dev-lang/crystal-0.25.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare setup test
-DEPEND=sys-devel/llvm:6 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
-DESCRIPTION=The Crystal Programming Language
-EAPI=6
-HOMEPAGE=https://crystal-lang.org
-IUSE=doc debug examples blocking-stdio-hack +xml +yaml
-KEYWORDS=~amd64
-LICENSE=Apache-2.0
-RDEPEND=sys-devel/llvm:6 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 xml? ( dev-libs/libxml2 ) yaml? ( dev-libs/libyaml )
-SLOT=0
-SRC_URI=https://github.com/crystal-lang/crystal/archive/0.25.0.tar.gz -> crystal-0.25.0.tar.gz amd64? ( https://github.com/crystal-lang/crystal/releases/download/0.24.2/crystal-0.24.2-1-linux-x86_64.tar.gz ) x86? ( https://github.com/crystal-lang/crystal/releases/download/0.24.2/crystal-0.24.2-1-linux-i686.tar.gz )
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c llvm f9e74238f1b5743ea5d7214fcc7dbb36 multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=be4cf8a5292cf2147e33c2be403a519d
diff --git a/dev-lang/crystal/Manifest b/dev-lang/crystal/Manifest
new file mode 100644
index 000000000000..4b2ebf3b2099
--- /dev/null
+++ b/dev-lang/crystal/Manifest
@@ -0,0 +1,20 @@
+AUX crystal-0.22.0-blocking-stdio-hack.patch 564 BLAKE2B ca388a6e18ef26d03bd0ef25f30a5424dbd814387e832a6f8a1e8f1097f180a4f3393df5c2d733259cb46f0be3e466d2496baa9b9e76eb2e4bb5968882cba513 SHA512 51df3a464efc7b34db970854577d89027177179cb4e72fdf74b6c9ae754749e30c93155bb18a5daf22db78b0f8985ec341092a95435f8de19800c33bca2f983e
+AUX crystal-0.23.0-verbose-LDFLAGS.patch 653 BLAKE2B dcbb7c4e421bc554a83363eae5a699f94023f3469bbe6f0f1d258f509c34334f01f52588711832600988e618131c42aa0eb07881759a2cbbe5521f47a0550c30 SHA512 76494f1dcd97665f787fac76f2b94ef8428259133f13b52cf21c6e5b816ab7697a96f90dad0dc658de6373c6df28b72809cce5656d4b8356a6b3eca73f23856a
+AUX crystal-0.24.0-verbose-LDFLAGS.patch 703 BLAKE2B 3395a7c4bf98280ebef331ec99fbd46bda571b84614e7a71f6cee1b322548dadd363b6b82f3bfd58e034bce5052dab8876a02838ba850d8bbccb25be47c6bb34 SHA512 a009215413e100096cc74088679d603115b80b2d6e59180a466d0f177662376ee6e31e151d2d02a7277d0025e6cd68666e4b1f99b8bf79b50106fed72adb40e1
+AUX crystal-0.24.2-gentoo-tests-network-sandbox.patch 1148 BLAKE2B e7b18492381a746b188f4c33cf637a0c40379bc073c3504e10aae06dc62cdaea02e6510078d277f9ec5ffe160a460a3dbab600b2dfd4e22bc253626d9d53384f SHA512 9545fd7555f7e216a654c85b0af0806727644e9dd8e6b716caa13a0f3c3f939eb20e93f97cafb9d3c33b1c1880d7ffb9e10dea3d29195342174849e9e7432d95
+AUX crystal-0.24.2-gentoo-tests-sandbox.patch 1252 BLAKE2B 4f1e41af633cd9bf943a9c016cdf4038e68ec093a1d455fb562cf361774ea8382c853effc65bf4ed57522b270fb2751aa5ec52bab905a7face0509ea505febfb SHA512 57011a0c360a9cf438d0a7da36c48be109279448df0e65fa9cdd61a565436730f71a52c2823468a5ddf17813a3df470d07c58ec4f56c931ffc036111770bb901
+AUX crystal-0.25.0-verbose.patch 764 BLAKE2B 9df527f86c2bc2d02c205aa3673dacfb9f9fc6d9178968399d851c9578f8004409750a9867817338d4ae7722180c0e6c3ff5846adcc89b54a8a630d08434b81d SHA512 94ba8ebff0b14d360e1cc3e00f38a58d7e9cb1e20a3b170ad75d5dcec24778f92b4e17f4e865f48b603a56434c057a1d803a433a59b6c5a0a3f666db9861179c
+DIST crystal-0.23.0-1-linux-i686.tar.gz 18498501 BLAKE2B 7a8e4e5a2b1425b6effe0a634b74b28c340c4d23c4bfccc0abac4e5d47473e10421d025e68e1fb1fa5b0ba8296108e36cd17d393fb143b8012168d595e5852f9 SHA512 8745114c4824d2859c569ed1bd1057d6d649d57b10d41d22c17627f623704eb98ec2e3ab2bf06622de624906f53e053975a6b9d852aeaafeae4f43585609de28
+DIST crystal-0.23.0-1-linux-x86_64.tar.gz 18729061 BLAKE2B bfca07702b2f7c7d6b11aac864475316cabe86bdba90b1819ecd5cb45769b2b7fd9fb4c9f80e46301785209cc5b35fe39bf689163b9376a32b24f8a685a6281b SHA512 6a4e427b4ab3c3be6efcfaee5c1a19eff04eaf00db949d1e1ba8f29c3277affe96a7aba4273d93fd05251453d5b5b937aa792bc448ff2f6d6aa7f2b17d175f75
+DIST crystal-0.23.1-patchset.tar.bz2 7268 BLAKE2B 135990ac9f1a225f169dbc5bb6034d2194d9fc917954764564d68afec09af703382743965a801c9ce54a5866af60847b4c4fc0b9daf2cf5ea99052fbeb771b2a SHA512 68896fc5d1772eeb3dd263f1615fc8031a63d0f3eebca1feb35165adf14a610157302541c84cbc9031a3070fd5566ffe88ad03a8c523f55980520e5614b00b89
+DIST crystal-0.23.1.tar.gz 1646650 BLAKE2B 3105a683e61835d1e514d5d403b00d3dfae01100a9862d6346c45201c5fb6cba879255469652463719998e976afc495ee9fd4f14f829a709f832cd323cfc2b3b SHA512 06ee0d45cc79cc343d04c346e9cd47b6e4ebc79bf21833662f268f9604f7d2080f7696824e1959de341539f801ae8f898fe1d7b18e4c75378d4eb191878668d5
+DIST crystal-0.24.1.tar.gz 1744210 BLAKE2B e3a49a75f42e734753b369f1ad22db011b3af055acb0886b74151281480015c19b079cfc7246070c96e45942e51ed47d183606906bef8f2a0e6786ec7b39dbc8 SHA512 f27b64922eaff45228d9cc16bb229528e523500b8f64a3b4a5ed0584445bebf7812457e17952d0eabac2869ee259949bb12fbc80d60a6aa717307a80932345b8
+DIST crystal-0.24.2-1-linux-i686.tar.gz 17667007 BLAKE2B 73104ce088e161f03a7b4a191bb6dcdd86d0c65fe4058bb81f1177c6b7162aa48ca7732fbb410de8d3c9ca58830774913acdad9a89d8420a62e6526ecd309a2a SHA512 af0019fa1d140e653812a5d8a4fbb129ccf5d66ae55aa1a4e94ec3166058eb47abd2dd429a9d72a4baad4a6032abdaafc07bc22ca6380ac85e9d1c7168d7bf5d
+DIST crystal-0.24.2-1-linux-x86_64.tar.gz 35022853 BLAKE2B 5b101a27fef0dfbbf61920d826689a45f400c28afe7383320b69f8887512bcab65cbfe8a2cf35b0c598b06083d1ea5e338f4e2b910db03226ba05195483e4c89 SHA512 21d8e7fc34fc24ccb7e8e2c7aade0c3d6fe17e385f0f00534bb91e886788da0b27ff8276b634f7ae13d6342c7e22c6acd609562bcf1af8fddfdee5e256e1bcf0
+DIST crystal-0.24.2.tar.gz 1745462 BLAKE2B 8f3d5cf9e274558a5622aae44c6f7d54d0b3042d08810ddc650f181b91a536a3d0cc2d8fa726b677cce1f8a946319a55b803823596cef0d4d3e63832bfcea720 SHA512 db9fb973eeb2bc72ef91bb894b7c5aea73e727ff46e739aa431d68e556238f346a688a7a43de284afb4667b49366afce3ca423a523bea521180fa8f19ba6862d
+DIST crystal-0.25.0.tar.gz 1957613 BLAKE2B 4c2467e39a9bc6745b74c00f755490a2f726e775c2a0d15562af27d2a6771c95c44f79e6b59ad45f61a59566529854d75c980c55a6886538fa98663879477258 SHA512 20f2864919c7710e5aee8112e1c6ab54a2e50b244ac63d374edfed41ab659b11c062f76dbfc38e763a08bdbea9e0a39f3b5cac5e00bf453be3a31d3b0a023917
+EBUILD crystal-0.23.1.ebuild 2338 BLAKE2B bb9f07465783a19ffaec8b8aca29a3a85e4b272ac7b43e7c4a1fe61e110d04e1d513e671637cbd08b7974027c6663d302dd9c423880a65703bc58b550eca267d SHA512 df371dd8c31178279ef4ec8e65f160006aa895160b21864fb9194d7a1ad265c764ed240daec0a7b642452818d3fadc8a18e3cd6d3a5fe3be41a8c076d15b03e4
+EBUILD crystal-0.24.1-r1.ebuild 2256 BLAKE2B e929ff42f48ae8d6a726779864cd60efc19232d737b8f2b58ee0a534614b0b7053a445f74cb08719c1e8ec70e23872cc5c92f19296ecc1d6c5409b19a6fdabf1 SHA512 cd3be21c5a55e1ce0d8755d4fdf70b99bc40e44767aae1912bf1b408b7e52b5b545de9ecc0d34172fd3ff604bd9c3c49a860bbe83d160fe5f26b19c7b536d556
+EBUILD crystal-0.24.2.ebuild 2374 BLAKE2B 62f5e228fc38ad340d2e77ee1817410a5ef418405a09ba42c52f6067e5d303cb6836694ecb5b2d59b2cc00022ead788109a98ac6a124356d72783f926526c2fc SHA512 5812f5e4174c3320601684f3ac2ef235eb4aca4dee5632fc243839e8c61fa1c738086db17f840b68300887244ea6232d5d990725c1d85021d1a934c8a0560e92
+EBUILD crystal-0.25.0.ebuild 2369 BLAKE2B 2146aba6dedff0c3fcbcd8d018c8c15906eb7050e9cea358fe2c70de8f1a76242de583e798c39769e6a89832403a6c5eda8b50bfd882889c9a80a638919482e9 SHA512 48a19dd3c5bd501dbb00b44f4eb2e3d934e835bac4361f2f1dab9aab2812aa40a8e19b6838db006ee4735cdf09d720206120b730fcd7af79e1745866a7422ff7
+MISC metadata.xml 995 BLAKE2B 00f6cfc63cec16ab8c6f983316f5872e63573f2d680da810b9b97d88c2ff6e21c15327a1508d62234e324f7145ca248a9ce1aa7286b0e34d9ee3dcba1481ff25 SHA512 da6a6f834b0d961477b95045756c539df7a968fe240f9f0c1c8183eef3052dddefb8d20547d668b07fece74c96b94bbf18baaac59e7328ff322355227d1adf02
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..c1b0b8859244
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.23.1.ebuild
@@ -0,0 +1,102 @@
+# 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
+ https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.bz2
+ 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
+ "${WORKDIR}"/${P}-patchset/${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/crystal-0.24.1-r1.ebuild b/dev-lang/crystal/crystal-0.24.1-r1.ebuild
new file mode 100644
index 000000000000..4a403f10264a
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.24.1-r1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 llvm 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"
+
+LLVM_MAX_SLOT=5
+
+# dev-libs/boehm-gc[static-libs] dependency problem, check the issue: https://github.com/manastech/crystal/issues/1382
+DEPEND="
+ sys-devel/llvm:${LLVM_MAX_SLOT}
+ 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.24.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 docs
+}
+
+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 docs/.
+ fi
+
+ newbashcomp etc/completion.bash ${PN}
+}
diff --git a/dev-lang/crystal/crystal-0.24.2.ebuild b/dev-lang/crystal/crystal-0.24.2.ebuild
new file mode 100644
index 000000000000..84884cb69fb6
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.24.2.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 llvm 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"
+
+LLVM_MAX_SLOT=5
+
+# dev-libs/boehm-gc[static-libs] dependency problem, check the issue: https://github.com/manastech/crystal/issues/1382
+DEPEND="
+ sys-devel/llvm:${LLVM_MAX_SLOT}
+ 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.24.0-verbose-LDFLAGS.patch
+ "${FILESDIR}"/${PN}-0.24.2-gentoo-tests-sandbox.patch
+ "${FILESDIR}"/${PN}-0.24.2-gentoo-tests-network-sandbox.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 docs
+}
+
+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 docs/.
+ fi
+
+ newbashcomp etc/completion.bash ${PN}
+}
diff --git a/dev-lang/crystal/crystal-0.25.0.ebuild b/dev-lang/crystal/crystal-0.25.0.ebuild
new file mode 100644
index 000000000000..2dbfe3e736df
--- /dev/null
+++ b/dev-lang/crystal/crystal-0.25.0.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 llvm multiprocessing toolchain-funcs
+
+BV=0.24.2
+BV_AMD64=${BV}-1-linux-x86_64
+BV_X86=${BV}-1-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/${BV/}/crystal-${BV_AMD64}.tar.gz )
+ x86? ( https://github.com/crystal-lang/crystal/releases/download/${BV}/crystal-${BV_X86}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc debug examples blocking-stdio-hack +xml +yaml"
+
+LLVM_MAX_SLOT=6
+
+# dev-libs/boehm-gc[static-libs] dependency problem, check the issue: https://github.com/manastech/crystal/issues/1382
+DEPEND="
+ sys-devel/llvm:${LLVM_MAX_SLOT}
+ 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.25.0-verbose.patch
+ "${FILESDIR}"/${PN}-0.24.2-gentoo-tests-sandbox.patch
+ "${FILESDIR}"/${PN}-0.24.2-gentoo-tests-network-sandbox.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 docs
+}
+
+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 docs/.
+ fi
+
+ newbashcomp etc/completion.bash ${PN}
+}
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.24.0-verbose-LDFLAGS.patch b/dev-lang/crystal/files/crystal-0.24.0-verbose-LDFLAGS.patch
new file mode 100644
index 000000000000..3d02a119f858
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.24.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 )$(if $(static),--static )
++FLAGS := $(if $(release),--release )$(if $(stats),--stats )$(if $(progress),--progress )$(if $(threads),--threads $(threads) )$(if $(debug),-d )$(if $(static),--static )$(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.24.2-gentoo-tests-network-sandbox.patch b/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-network-sandbox.patch
new file mode 100644
index 000000000000..12565c1d8390
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-network-sandbox.patch
@@ -0,0 +1,33 @@
+diff --git a/spec/std/socket_spec.cr b/spec/std/socket_spec.cr
+index 0caa51a..f21b3b3 100644
+--- a/spec/std/socket_spec.cr
++++ b/spec/std/socket_spec.cr
+@@ -537,13 +537,15 @@ describe TCPSocket do
+ end
+ end
+
+- it "fails when host doesn't exist" do
++ # gentoo's FEATURES=network-sandbox blocks DNS
++ pending "fails when host doesn't exist" do
+ expect_raises(Socket::Error, /No address/i) do
+ TCPSocket.new("doesnotexist.example.org.", 12345)
+ end
+ end
+
+- it "fails (rather than segfault on darwin) when host doesn't exist and port is 0" do
++ # gentoo's FEATURES=network-sandbox blocks DNS
++ pending "fails (rather than segfault on darwin) when host doesn't exist and port is 0" do
+ expect_raises(Socket::Error, /No address/i) do
+ TCPSocket.new("doesnotexist.example.org.", 0)
+ end
+@@ -634,7 +636,9 @@ describe UDPSocket do
+ client.close
+ end
+
+- it "broadcasts messages" do
++ # gentoo's FEATURES=network-sandbox blocks external network:
++ # connect: Network is unreachable
++ pending "broadcasts messages" do
+ port = free_udp_socket_port
+
+ client = UDPSocket.new(Socket::Family::INET)
diff --git a/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-sandbox.patch b/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-sandbox.patch
new file mode 100644
index 000000000000..4bd779a834c8
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.24.2-gentoo-tests-sandbox.patch
@@ -0,0 +1,37 @@
+diff --git a/spec/std/file_spec.cr b/spec/std/file_spec.cr
+index 4a08b7d..cb1b28c 100644
+--- a/spec/std/file_spec.cr
++++ b/spec/std/file_spec.cr
+@@ -1026,7 +1026,8 @@ describe "File" do
+ end
+ end
+
+- it "raises if file cannot be accessed" do
++ # On linux it's "Permission denied", not "Operation not permitted"
++ pending "raises if file cannot be accessed" do
+ expect_raises Errno, "Operation not permitted" do
+ File.touch("/bin/ls")
+ end
+diff --git a/spec/std/process_spec.cr b/spec/std/process_spec.cr
+index 4a36f18..0cd63a8 100644
+--- a/spec/std/process_spec.cr
++++ b/spec/std/process_spec.cr
+@@ -115,14 +115,16 @@ describe Process do
+ end
+
+ describe "environ" do
+- it "clears the environment" do
++ #gentoo's sandbox keeps sandbox environment
++ pending "clears the environment" do
+ value = Process.run("env", clear_env: true) do |proc|
+ proc.output.gets_to_end
+ end
+ value.should eq("")
+ end
+
+- it "sets an environment variable" do
++ #gentoo's sandbox keeps sandbox environment
++ pending "sets an environment variable" do
+ env = {"FOO" => "bar"}
+ value = Process.run("env", clear_env: true, env: env) do |proc|
+ proc.output.gets_to_end
diff --git a/dev-lang/crystal/files/crystal-0.25.0-verbose.patch b/dev-lang/crystal/files/crystal-0.25.0-verbose.patch
new file mode 100644
index 000000000000..c26e12335e67
--- /dev/null
+++ b/dev-lang/crystal/files/crystal-0.25.0-verbose.patch
@@ -0,0 +1,9 @@
+diff --git a/Makefile b/Makefile
+index 63a9687..995299f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -29,3 +29,3 @@ SOURCES := $(shell find src -name '*.cr')
+ SPEC_SOURCES := $(shell find spec -name '*.cr')
+-override FLAGS += $(if $(release),--release )$(if $(stats),--stats )$(if $(progress),--progress )$(if $(threads),--threads $(threads) )$(if $(debug),-d )$(if $(static),--static )$(if $(LDFLAGS),--link-flags="$(LDFLAGS)" )
++override FLAGS += $(if $(release),--release )$(if $(stats),--stats )$(if $(progress),--progress )$(if $(threads),--threads $(threads) )$(if $(debug),-d )$(if $(static),--static )$(if $(LDFLAGS),--link-flags="$(LDFLAGS)" )$(if $(verbose),--verbose )
+ SPEC_FLAGS := $(if $(verbose),-v )$(if $(junit_output),--junit_output $(junit_output) )
diff --git a/dev-lang/crystal/metadata.xml b/dev-lang/crystal/metadata.xml
new file mode 100644
index 000000000000..76b2f7772585
--- /dev/null
+++ b/dev-lang/crystal/metadata.xml
@@ -0,0 +1,33 @@
+<?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>
+ <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-2.1.1 b/dev-lang/duktape-2.1.1
deleted file mode 100644
index 9f5a680befbe..000000000000
--- a/dev-lang/duktape-2.1.1
+++ /dev/null
@@ -1,9 +0,0 @@
-DEFINED_PHASES=install prepare
-DESCRIPTION=Embeddable Javascript engine
-EAPI=6
-HOMEPAGE=http://duktape.org
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-SLOT=0
-SRC_URI=http://duktape.org/duktape-2.1.1.tar.xz
-_md5_=eb2d55dbdca8f85fbccdd1f47860843b
diff --git a/dev-lang/duktape-2.2.0 b/dev-lang/duktape-2.2.0
deleted file mode 100644
index 9164db5d20f5..000000000000
--- a/dev-lang/duktape-2.2.0
+++ /dev/null
@@ -1,9 +0,0 @@
-DEFINED_PHASES=install prepare
-DESCRIPTION=Embeddable Javascript engine
-EAPI=6
-HOMEPAGE=http://duktape.org
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-SLOT=0
-SRC_URI=http://duktape.org/duktape-2.2.0.tar.xz
-_md5_=e5d2030fc55087782371b6900cf7e135
diff --git a/dev-lang/duktape/Manifest b/dev-lang/duktape/Manifest
new file mode 100644
index 000000000000..251152273f5d
--- /dev/null
+++ b/dev-lang/duktape/Manifest
@@ -0,0 +1,6 @@
+AUX duktape.pc 218 BLAKE2B 3864f90f3ec1d77733736e16f99c0bab796502d3306759106357cb500d038304dfd6dc9849c9cde2e77683bf1f38dc7707119b39b66a6b55961b802e8d679520 SHA512 0f4b4e20ea9b348ed8b69623ed4fa09c20a2a951ef4f281b6313961c4aa085be9fc511a948d67713a7d2d9dede984761d5409b25e09da1db10698eb615f7c6fb
+DIST duktape-2.1.1.tar.xz 1024568 BLAKE2B 9b8a5ef07052f685233e62a0ffac31c5ca2b41b90a82bd288edb4f7c495457c065dffb162a6b225b2aab48f41758dfca6031efbcf2e4b82fe590abab46465c2d SHA512 51e5146b083b460f005ce93e369aebf9981e33a3e888f3e91fd175b7f018a93981e8f6f9ff9bbd865ad30f1424fcb21c18334450050909cda5f74caf11b25479
+DIST duktape-2.2.0.tar.xz 969136 BLAKE2B f0567bec70a5a0055937007dc2891816bda214295f0373dd1039ee82c5c97111c1601fe3b0421690d968b8ce2d1fd0df18b2e3b786daabb5d1327cee5f980cf0 SHA512 6fe67660ad4cfbab37b9048840bd8c42ee9585441c17253e1f17cb06e4527d1413851bc167d8b013990d5cae9f8e6eb4cb6ff80866f55bd8d67b0cf47580be7c
+EBUILD duktape-2.1.1.ebuild 981 BLAKE2B 25de184279d1d125eeee0691ba1ab21bbc537602bb8067a799f1682ad61a3e886768f37c4637a356be49c39f5492617c29d6a939db571278ed72a7ab73b3d1c8 SHA512 6d8bdb857de247fad2bee557c7df1fd6422dde70c36313a0ee5efa99ff9fff129b21d944c1a7ba372dd73c9da13013e75483bb08558d3e356679d2722809aba6
+EBUILD duktape-2.2.0.ebuild 981 BLAKE2B 05e9f13ce05e68479f0cf6f4fdd30db7d54724030b8d400ba7df541fa0c74eabae0074dc5cdf63511746c9f8b0277f4d43f2e33059002ef6b7a2dfd1c6845a26 SHA512 df56de8556085d401f0226a745a05deeb2ffc8a6460bb055b7c649fb8bec5a01a650c876c14fe4337a30741dc3dc04b6f64813af1ab4039dd14aad8ad3d8f49b
+MISC metadata.xml 477 BLAKE2B 8aa33e556bbac581fbf57393f8ba92e731e03ab91df9c34f442bec4f02f9ce69d455673e5074b037bd1b134653f1c11850b4f20eb0fa282fb0aa22d9e5c8517d SHA512 72024950f8fdb4c54f48cafd73d139c52230108fa9ba032c72a2bc847ec2d760d280879b17fb032ee22e147a4b9dcab5281e69985a157711a9d03c75c55a06c5
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/duktape-2.2.0.ebuild b/dev-lang/duktape/duktape-2.2.0.ebuild
new file mode 100644
index 000000000000..ca7d7d4b2e18
--- /dev/null
+++ b/dev-lang/duktape/duktape-2.2.0.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2018 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/elixir-1.4.5 b/dev-lang/elixir-1.4.5
deleted file mode 100644
index 10aae692a54e..000000000000
--- a/dev-lang/elixir-1.4.5
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install
-DEPEND=>=dev-lang/erlang-18[ssl]
-DESCRIPTION=Elixir programming language
-EAPI=6
-HOMEPAGE=https://elixir-lang.org
-KEYWORDS=amd64 ~arm ~ia64 ppc ~sparc x86
-LICENSE=Apache-2.0 ErlPL-1.1
-RDEPEND=>=dev-lang/erlang-18[ssl]
-SLOT=0
-SRC_URI=https://github.com/elixir-lang/elixir/archive/v1.4.5.tar.gz -> elixir-1.4.5.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=f25f35cd28199938186aab063b590f26
diff --git a/dev-lang/elixir-1.6.5 b/dev-lang/elixir-1.6.5
deleted file mode 100644
index 0d5ab5128e78..000000000000
--- a/dev-lang/elixir-1.6.5
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install
-DEPEND=>=dev-lang/erlang-18[ssl]
-DESCRIPTION=Elixir programming language
-EAPI=6
-HOMEPAGE=https://elixir-lang.org
-KEYWORDS=~amd64 ~arm ~ia64 ~ppc ~sparc ~x86
-LICENSE=Apache-2.0 ErlPL-1.1
-RDEPEND=>=dev-lang/erlang-18[ssl] !!sci-biology/phylip
-RESTRICT=test
-SLOT=0
-SRC_URI=https://github.com/elixir-lang/elixir/archive/v1.6.5.tar.gz -> elixir-1.6.5.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=5c88b76e3d1795c17db88571ef0e02b2
diff --git a/dev-lang/elixir-1.6.6 b/dev-lang/elixir-1.6.6
deleted file mode 100644
index 12205fef1ce0..000000000000
--- a/dev-lang/elixir-1.6.6
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install
-DEPEND=>=dev-lang/erlang-18[ssl]
-DESCRIPTION=Elixir programming language
-EAPI=6
-HOMEPAGE=https://elixir-lang.org
-KEYWORDS=~amd64 ~arm ~ia64 ~ppc ~sparc ~x86
-LICENSE=Apache-2.0 ErlPL-1.1
-RDEPEND=>=dev-lang/erlang-18[ssl] !!sci-biology/phylip
-RESTRICT=test
-SLOT=0
-SRC_URI=https://github.com/elixir-lang/elixir/archive/v1.6.6.tar.gz -> elixir-1.6.6.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=5c88b76e3d1795c17db88571ef0e02b2
diff --git a/dev-lang/elixir/Manifest b/dev-lang/elixir/Manifest
new file mode 100644
index 000000000000..6bb9538b795f
--- /dev/null
+++ b/dev-lang/elixir/Manifest
@@ -0,0 +1,7 @@
+DIST elixir-1.4.5.tar.gz 1829098 BLAKE2B bc8e2beafe53c3af507215d913558e295370ed8d3731c8b013f5d1cd2ad1d8a4fad4b3fe1a7ee3397470916f6f6687436ecbaa06c85c47f4b52aa0331b7dad23 SHA512 3fe659a739ded54bfc7d05a96acf3061c860e44cfd7700651d138c7e21997c5703cc62d2bd3b7a258b27064bb222dfdcdc01e4d017451f522f9658a039073611
+DIST elixir-1.6.5.tar.gz 2075889 BLAKE2B 73586354f3672ef7892b462781e8e94ab913548b4753129a08e4864f222590e95b310c55df628e4e42015bed642569a7183624c2d107cd07dac560ba2b9a57fa SHA512 e2cf9c2d9198da32cefb841cae4ce64bb52eb28239bbffb6d991916cfdee420b242773664efa7381eb4609c67438ab608f5f96ca2c403b54ecdd9bfdddf91a95
+DIST elixir-1.6.6.tar.gz 2078742 BLAKE2B 4a793ac55db97c1d604d5f0012758d039f4a26eff5866a2ad2b90010f8477a8f62cc8f01a391f93133c927c5da5494b6d10b76f087a4af1206da977b0ec14a17 SHA512 62010100274b99423bb6a660e34ef53a702250a09371ef4b49ec03a3afe8761611b3734aea31763afa361560eb74c6d23e022d4d9bc4453c1bdef36bb37f9b4d
+EBUILD elixir-1.4.5.ebuild 610 BLAKE2B da40f0452c6571e8c72f1dc85e845ffced68579db1903479d4df21d20447d3d800ebd69ad75da3675213feee30d0438fa868a377d6cba94b365bac14adbd6132 SHA512 a05d132efcde374b0772b17a92cd13ffb78ab4a8d72c4b33c9cee3ab1312df0d1c7621627042895594ab563f75161f55f0382a348867254be4b3706440f77c17
+EBUILD elixir-1.6.5.ebuild 742 BLAKE2B 017a3956c75e57c612a3f3b2836536da678bc189a95092117aee9bc0602df9e1df26c1ddd8f8ac6a95a354c45b4f6511963add65f83e38efcb486699aa978a37 SHA512 fc902f86e10586266e825fb6eb508389d936470377161c19e45ea0e90287c36c53642db605d8e1241b329e47cc487975c2809484ffc87d3f11e29d15a2685824
+EBUILD elixir-1.6.6.ebuild 742 BLAKE2B 017a3956c75e57c612a3f3b2836536da678bc189a95092117aee9bc0602df9e1df26c1ddd8f8ac6a95a354c45b4f6511963add65f83e38efcb486699aa978a37 SHA512 fc902f86e10586266e825fb6eb508389d936470377161c19e45ea0e90287c36c53642db605d8e1241b329e47cc487975c2809484ffc87d3f11e29d15a2685824
+MISC metadata.xml 790 BLAKE2B 33e4a37225c8f5bd142c5cbbe097ad3330f6c5b1115f834c1c20613281bdc0afa0927734ec3b0a2b1da595980abeec2fcf2bb20e725f5701590d1c3629972910 SHA512 5489797d3771c405edb4c9883082f780279470d7821dbdd1a4790bcdc74c0e31327c8f15286dc421bfe426d7371d6be2819e707389f425101e2d0d0577475586
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.6.5.ebuild b/dev-lang/elixir/elixir-1.6.5.ebuild
new file mode 100644
index 000000000000..844bd80c8914
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.6.5.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2018 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]"
+# 'mix' tool collides with sci-biology/phylip, bug #537514
+RDEPEND="${DEPEND}
+ !!sci-biology/phylip
+"
+
+RESTRICT=test # needs debug symbols
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="${EPREFIX}/usr" install
+ dodoc README.md CHANGELOG.md CODE_OF_CONDUCT.md
+}
diff --git a/dev-lang/elixir/elixir-1.6.6.ebuild b/dev-lang/elixir/elixir-1.6.6.ebuild
new file mode 100644
index 000000000000..844bd80c8914
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.6.6.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2018 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]"
+# 'mix' tool collides with sci-biology/phylip, bug #537514
+RDEPEND="${DEPEND}
+ !!sci-biology/phylip
+"
+
+RESTRICT=test # needs debug symbols
+
+src_compile() {
+ emake Q=""
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="${EPREFIX}/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..fbe86b3bebe7
--- /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="person">
+ <email>styx.mp@gmail.com</email>
+ <name>Mikhail</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</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-0.9.3.3-r1 b/dev-lang/epic-0.9.3.3-r1
deleted file mode 100644
index 5a3da96031cb..000000000000
--- a/dev-lang/epic-0.9.3.3-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare setup test
-DEPEND=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:= >=dev-haskell/cabal-1.8.0.4 dev-haskell/happy doc? ( || ( dev-haskell/haddock >=dev-lang/ghc-7.10.2 ) ) hscolour? ( dev-haskell/hscolour )
-DESCRIPTION=Compiler for a simple functional language
-EAPI=6
-HOMEPAGE=http://www.dcs.st-and.ac.uk/~eb/epic.php
-IUSE=doc hscolour profile
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD
-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:=
-SLOT=0/0.9.3.3
-SRC_URI=mirror://hackage/packages/archive/epic/0.9.3.3/epic-0.9.3.3.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ghc-package a0d34e2f5f204f01c404ae1ce539542a haskell-cabal 45605f3898bdc59eb016fb50ca27bf18 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=d99ffc3744ac716156dd75eee7673153
diff --git a/dev-lang/epic/Manifest b/dev-lang/epic/Manifest
new file mode 100644
index 000000000000..b0d7f10d8648
--- /dev/null
+++ b/dev-lang/epic/Manifest
@@ -0,0 +1,4 @@
+AUX epic-0.9.3.3-respect-user-cflags.patch 324 BLAKE2B 7cf1aada8063e2bc31c3f84364c694e7524a00e568d9eaa647cb1958a80f5d07068bf16512cb1a823ba409df15a45025781fd33ade1c0cb0123117b0198d2a40 SHA512 cb0ca719cd357a88aee3f449877b17a831eff064564f2c27cc2254c61bc4cc41dc2e9746d7c88a56bc70b3132534bf74da2d43e79a3f47ad1ae3e9b489248fba
+DIST epic-0.9.3.3.tar.gz 87163 BLAKE2B 2d3e25fed668680fa381da2dd7b7e530d4eb6839ec40b790d42e9778e99b567fa50347fa26bdc41351eb9654c22b3e26749072c55cd72e9644f35163222af654 SHA512 f957eb5402eebad9d52f0d38cf552c00ff5df9caffce97961e761e7c91ed33dee520cb0255f6547db1c05ed6dda7a3e4833d375a5fc0ebe7e94502736a49c566
+EBUILD epic-0.9.3.3-r1.ebuild 975 BLAKE2B 317a31b550a30664cdd22ff45b138e1bf64a3155b6b0c86ece7323e93eef24e086c3df066d4da3747d2c60a611b1b6f344e430434e9338985413ca376fe7cac4 SHA512 4d3c263d8aa543608e932f17f8e5b0ea66c8316e58fe52a43a66c80a6dc2c91d200a537201bb6f733c272b6db649f32331ba8e767dc860fb6f2f836aaedcd38f
+MISC metadata.xml 680 BLAKE2B cb9b4f090064354668dfac2d8aa77bc378231dd95b9c8658193dc7015f46d60640401a6dfd416afb9780ba64ca34f0b955117c67498a4d4ba0595b949babe18a SHA512 076fbcf53fdd99a52631c4671e21a65d7d430a13fb58b50fd193db180afd7987ff0591aff19e0672f2bf31c3e1ee1be8e532daf62093030db1a8d11267a321a5
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-19.1 b/dev-lang/erlang-19.1
deleted file mode 100644
index b8050955843d..000000000000
--- a/dev-lang/erlang-19.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup
-DEPEND=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 ) wxwidgets? ( x11-libs/wxGTK:3.0[X,opengl] virtual/glu ) sctp? ( net-misc/lksctp-tools ) tk? ( dev-lang/tk ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0-r3 ) virtual/pkgconfig
-DESCRIPTION=Erlang programming language, runtime environment and libraries (OTP)
-EAPI=5
-HOMEPAGE=http://www.erlang.org/
-IUSE=compat-ethread dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk wxwidgets elibc_FreeBSD java
-KEYWORDS=alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris
-LICENSE=Apache-2.0
-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 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://www.erlang.org/download/otp_src_19.1.tar.gz http://erlang.org/download/otp_doc_man_19.1.tar.gz doc? ( http://erlang.org/download/otp_doc_html_19.1.tar.gz )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 wxwidgets 04e063b0eff26daaea83d859dd9d6e05
-_md5_=99cfbc44d2bd437607ea6615a5d3484f
diff --git a/dev-lang/erlang-19.3 b/dev-lang/erlang-19.3
deleted file mode 100644
index a048ce8d3d99..000000000000
--- a/dev-lang/erlang-19.3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup
-DEPEND=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 ) wxwidgets? ( x11-libs/wxGTK:3.0[X,opengl] virtual/glu ) sctp? ( net-misc/lksctp-tools ) tk? ( dev-lang/tk ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0-r3 ) virtual/pkgconfig
-DESCRIPTION=Erlang programming language, runtime environment and libraries (OTP)
-EAPI=5
-HOMEPAGE=http://www.erlang.org/
-IUSE=compat-ethread dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk wxwidgets elibc_FreeBSD java
-KEYWORDS=~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ~ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris
-LICENSE=Apache-2.0
-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 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=dirty-schedulers? ( smp )
-SLOT=0
-SRC_URI=http://www.erlang.org/download/otp_src_19.3.tar.gz http://erlang.org/download/otp_doc_man_19.3.tar.gz doc? ( http://erlang.org/download/otp_doc_html_19.3.tar.gz )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 wxwidgets 04e063b0eff26daaea83d859dd9d6e05
-_md5_=ad044e7d385abc94413e3c8bea7700a7
diff --git a/dev-lang/erlang-20.2 b/dev-lang/erlang-20.2
deleted file mode 100644
index d666c8e2f32b..000000000000
--- a/dev-lang/erlang-20.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup
-DEPEND=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 ) wxwidgets? ( x11-libs/wxGTK:3.0[X,opengl] virtual/glu ) sctp? ( net-misc/lksctp-tools ) tk? ( dev-lang/tk ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0-r3 ) virtual/pkgconfig
-DESCRIPTION=Erlang programming language, runtime environment and libraries (OTP)
-EAPI=5
-HOMEPAGE=http://www.erlang.org/
-IUSE=compat-ethread dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk wxwidgets elibc_FreeBSD java
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris
-LICENSE=Apache-2.0
-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 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=dirty-schedulers? ( smp )
-SLOT=0
-SRC_URI=http://www.erlang.org/download/otp_src_20.2.tar.gz http://erlang.org/download/otp_doc_man_20.2.tar.gz doc? ( http://erlang.org/download/otp_doc_html_20.2.tar.gz )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 wxwidgets 04e063b0eff26daaea83d859dd9d6e05
-_md5_=2c06af685126fe1c6915c3c2427f91d7
diff --git a/dev-lang/erlang-20.3 b/dev-lang/erlang-20.3
deleted file mode 100644
index a9751a4baf0a..000000000000
--- a/dev-lang/erlang-20.3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup
-DEPEND=ssl? ( !libressl? ( >=dev-libs/openssl-0.9.7d:0= ) libressl? ( dev-libs/libressl:0= ) ) emacs? ( virtual/emacs ) java? ( >=virtual/jdk-1.2:* ) odbc? ( dev-db/unixODBC ) systemd? ( sys-apps/systemd ) wxwidgets? ( x11-libs/wxGTK:3.0[X,opengl] virtual/glu ) sctp? ( net-misc/lksctp-tools ) tk? ( dev-lang/tk ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0-r3 ) virtual/pkgconfig
-DESCRIPTION=Erlang programming language, runtime environment and libraries (OTP)
-EAPI=6
-HOMEPAGE=http://www.erlang.org/
-IUSE=compat-ethread dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk wxwidgets elibc_FreeBSD java
-KEYWORDS=alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris
-LICENSE=Apache-2.0
-RDEPEND=ssl? ( !libressl? ( >=dev-libs/openssl-0.9.7d:0= ) libressl? ( dev-libs/libressl:0= ) ) emacs? ( virtual/emacs ) java? ( >=virtual/jdk-1.2:* ) odbc? ( dev-db/unixODBC ) systemd? ( sys-apps/systemd ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=dirty-schedulers? ( smp )
-SLOT=0
-SRC_URI=http://www.erlang.org/download/otp_src_20.3.tar.gz http://erlang.org/download/otp_doc_man_20.3.tar.gz doc? ( http://erlang.org/download/otp_doc_html_20.3.tar.gz )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 wxwidgets 04e063b0eff26daaea83d859dd9d6e05
-_md5_=1d9b558c4cd4996a01333f9fa4427262
diff --git a/dev-lang/erlang-20.3.2 b/dev-lang/erlang-20.3.2
deleted file mode 100644
index 92d44569c0a2..000000000000
--- a/dev-lang/erlang-20.3.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup
-DEPEND=ssl? ( !libressl? ( >=dev-libs/openssl-0.9.7d:0= ) libressl? ( dev-libs/libressl:0= ) ) emacs? ( virtual/emacs ) java? ( >=virtual/jdk-1.2:* ) odbc? ( dev-db/unixODBC ) systemd? ( sys-apps/systemd ) dev-lang/perl sctp? ( net-misc/lksctp-tools ) sys-libs/zlib tk? ( dev-lang/tk ) x11-libs/wxGTK:3.0[X,opengl] virtual/glu >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0-r3 ) virtual/pkgconfig
-DESCRIPTION=Erlang programming language, runtime environment and libraries (OTP)
-EAPI=6
-HOMEPAGE=http://www.erlang.org/
-IUSE=dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk elibc_FreeBSD java
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris
-LICENSE=Apache-2.0
-RDEPEND=ssl? ( !libressl? ( >=dev-libs/openssl-0.9.7d:0= ) libressl? ( dev-libs/libressl:0= ) ) emacs? ( virtual/emacs ) java? ( >=virtual/jdk-1.2:* ) odbc? ( dev-db/unixODBC ) systemd? ( sys-apps/systemd ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=dirty-schedulers? ( smp )
-SLOT=0
-SRC_URI=https://github.com/erlang/otp/archive/OTP-20.3.2.tar.gz -> erlang-20.3.2.tar.gz http://erlang.org/download/otp_doc_man_20.3.tar.gz -> erlang_doc_man_20.3.tar.gz doc? ( http://erlang.org/download/otp_doc_html_20.3.tar.gz -> erlang_doc_html_20.3.tar.gz )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 wxwidgets 04e063b0eff26daaea83d859dd9d6e05
-_md5_=f148b53221c450421f1d739e9b135781
diff --git a/dev-lang/erlang-20.3.8 b/dev-lang/erlang-20.3.8
deleted file mode 100644
index ba06e2890e55..000000000000
--- a/dev-lang/erlang-20.3.8
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup
-DEPEND=ssl? ( !libressl? ( >=dev-libs/openssl-0.9.7d:0= ) libressl? ( dev-libs/libressl:0= ) ) emacs? ( virtual/emacs ) java? ( >=virtual/jdk-1.2:* ) odbc? ( dev-db/unixODBC ) systemd? ( sys-apps/systemd ) dev-lang/perl sctp? ( net-misc/lksctp-tools ) sys-libs/zlib tk? ( dev-lang/tk ) wxwidgets? ( x11-libs/wxGTK:3.0[X,opengl] virtual/glu ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0-r3 ) virtual/pkgconfig
-DESCRIPTION=Erlang programming language, runtime environment and libraries (OTP)
-EAPI=6
-HOMEPAGE=http://www.erlang.org/
-IUSE=dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk wxwidgets elibc_FreeBSD java
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris
-LICENSE=Apache-2.0
-RDEPEND=ssl? ( !libressl? ( >=dev-libs/openssl-0.9.7d:0= ) libressl? ( dev-libs/libressl:0= ) ) emacs? ( virtual/emacs ) java? ( >=virtual/jdk-1.2:* ) odbc? ( dev-db/unixODBC ) systemd? ( sys-apps/systemd ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=dirty-schedulers? ( smp )
-SLOT=0
-SRC_URI=https://github.com/erlang/otp/archive/OTP-20.3.8.tar.gz -> erlang-20.3.8.tar.gz http://erlang.org/download/otp_doc_man_20.3.tar.gz -> erlang_doc_man_20.3.tar.gz doc? ( http://erlang.org/download/otp_doc_html_20.3.tar.gz -> erlang_doc_html_20.3.tar.gz )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 wxwidgets 04e063b0eff26daaea83d859dd9d6e05
-_md5_=25d6fd0b128499a5eb0ae835823e2b85
diff --git a/dev-lang/erlang-21.0.2 b/dev-lang/erlang-21.0.2
deleted file mode 100644
index 25ead592013d..000000000000
--- a/dev-lang/erlang-21.0.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup
-DEPEND=ssl? ( !libressl? ( >=dev-libs/openssl-0.9.7d:0= ) libressl? ( dev-libs/libressl:0= ) ) emacs? ( virtual/emacs ) java? ( >=virtual/jdk-1.2:* ) odbc? ( dev-db/unixODBC ) systemd? ( sys-apps/systemd ) dev-lang/perl sctp? ( net-misc/lksctp-tools ) sys-libs/zlib tk? ( dev-lang/tk ) wxwidgets? ( x11-libs/wxGTK:3.0[X,opengl] virtual/glu ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0-r3 ) virtual/pkgconfig
-DESCRIPTION=Erlang programming language, runtime environment and libraries (OTP)
-EAPI=6
-HOMEPAGE=http://www.erlang.org/
-IUSE=dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk wxwidgets elibc_FreeBSD java
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris
-LICENSE=Apache-2.0
-RDEPEND=ssl? ( !libressl? ( >=dev-libs/openssl-0.9.7d:0= ) libressl? ( dev-libs/libressl:0= ) ) emacs? ( virtual/emacs ) java? ( >=virtual/jdk-1.2:* ) odbc? ( dev-db/unixODBC ) systemd? ( sys-apps/systemd ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=dirty-schedulers? ( smp )
-SLOT=0
-SRC_URI=https://github.com/erlang/otp/archive/OTP-21.0.2.tar.gz -> erlang-21.0.2.tar.gz http://erlang.org/download/otp_doc_man_21.0.tar.gz -> erlang_doc_man_21.0.tar.gz doc? ( http://erlang.org/download/otp_doc_html_21.0.tar.gz -> erlang_doc_html_21.0.tar.gz )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 wxwidgets 04e063b0eff26daaea83d859dd9d6e05
-_md5_=e3316c7f8a001ddcec82cef32fba6a2e
diff --git a/dev-lang/erlang/Manifest b/dev-lang/erlang/Manifest
new file mode 100644
index 000000000000..a7e0c5161c43
--- /dev/null
+++ b/dev-lang/erlang/Manifest
@@ -0,0 +1,33 @@
+AUX 18.2.1-wx3.0.patch 3849 BLAKE2B 02912cf61094d8217eab7181a4cc35aead224df7872c412db0b40b072778cfb900bf18219baf52e29f609b72305d3a11ea1079b2e873cf56a0a3bd42e3303d2f SHA512 33d8b67542266ae224ffb2bc86fbf36fff6737252810cfb445662ecc418fb30b0b00cbddd2f706ca836f1a8809c505e61edfe221d29dbe91c78c371bff6cec15
+AUX 50erlang-gentoo.el 134 BLAKE2B df2da5c0c4be3e6855b51b820e3304f5c212a92d13ec48aa5d73ea3a0e801a8dddd371fd8894d49aa9d5573def56b3a864e463734d72fcf5356d39753dbda1ba SHA512 7a862e0ef1e96e88a484e80aeb92eb4465c7e8661efb0291c28abc13225eb3aa69442fe29417f5ad0d264e54399d645d9cd4713bc9869b48e87a91e50b9b2473
+AUX epmd.init 407 BLAKE2B 958698de3eb49ed66d59b3bd3435f64feec22ca8a9d7260ff9141b8d46e0afa40024fd11c6b84ff3cb5ae46f42a795355e594632300a096ca6a862b254994829 SHA512 9a9d1c0d512e31254170a601edb3a023c1f0abfa9c02656ea86cc04f38bfd4b3bffa131cef2c20ee81d3f62073036b0dcaa399736be7d413fcfa48e4001a5304
+AUX epmd.service 138 BLAKE2B f56c907ec51bb85c437235334cf01c6a43ccf2316be3b226ab557e3f71cab48baf59b5a9533a4dccb2cb61a4434e3a51d44eae06010718dbf9a732d605c40f73 SHA512 405740f8f9cd55d4ecd7420748399ab3f374b7cb09e53605f44ba49d0af86b70e4a1baf1fde05a703fb90c8a83dbcdd5cfbbf09185e9d7b58ff9612aefc2dd28
+AUX erlang-20.2-libressl-2.6.1.patch 4228 BLAKE2B 8c671d3aa8329562b274e6b9f233a3f93565f5a0f4491b83e7e57fb6881d0fbaaf955d7aa5537bdcfc85dbf4c979a3625aed2c203679eccaf9fcc4bd93133836 SHA512 66ff54153264d37d21822a19c07dc7d07fb4ed5c32234be7270821c060fcbd2673069dfd23a38512c7b0373fc97e6e44799f4b4280a1391b300f60f422ef6d69
+AUX erlang-20.3.2-dont-ignore-LDFLAGS.patch 1337 BLAKE2B 7272c96b1ee947a98f0a5b1f3bd1fce11e8d02f121348208196ae60af965dfde7fac15263ca0a58df96dff21785a1a63f4fc10f7e7e10c0f68a618e760e5ffd7 SHA512 59d39b1680ac3406e4c37f81a0207588208a873279920258235af54700f80bd67584c3e55c9278f893cd7813573bbec8b13195e47ba00101fc578d5a2b40fa34
+DIST erlang-20.3.2.tar.gz 53492641 BLAKE2B 2cdf78b6003801400d99949865a5b3e17d2209bf411bbe07dc12f749c84725710d12f85cb2559bc39ac04a7d6f7a9ae07b5f131a5524cf4ce3eb8559ca0259bc SHA512 060874cd4f72c1ecea178dd102f4b37a644485a810127092ad04fee76b52729ce199ee476335a2a40370bc718b7e03eb76869c3a48d457773856fd9f6d30a20b
+DIST erlang-20.3.8.tar.gz 53499006 BLAKE2B 0c38fb739a9c4f4b79533faea8c533f85c30d680081b5de96e70722a243d53b9317a26c7138a24a78cadd938777bd48a515484fffef2fdfd720819ab12bb8c0c SHA512 2ada142b47fdd0d1807a179e7cd3067e001f94682011436d33e503219a8a93495a187f8192fa2ebcdac48409e489b7b310d538779447981e6ba033a6dde12e1c
+DIST erlang-21.0.2.tar.gz 52835517 BLAKE2B bf7e2e166236a7c0a3e3411889f163dce0d938c1a854a6c264c137b601587c4cd4d62d58d9a87cf925406272d6e3d6547e4403927adc8e901716289ee2164162 SHA512 ff736a6df92ac7feec7b9ebb1b6523d511a533d48e536f36aee20fa21b5a1dc33791065d45f6900bbbaa48b4ba80b57a306b416801456a5ac33468786dfb00b7
+DIST erlang_doc_html_20.3.tar.gz 33594990 BLAKE2B 34db68a5c3ae56f097474cc0b776971853d96c57d3d2e058a5db8998aad9c8d498610979a46155e8e935022f363c944f407c10c650fd35174cf1f50697ddf1de SHA512 4b280228fb9cbd9eb62db12ff9d6fad67d6855d0cdbc780839bbc95302ffd907c5b410e6f8519207db8850b753964571a9bf9df9eca53749f5b01d1b27dbc6d4
+DIST erlang_doc_html_21.0.tar.gz 32501093 BLAKE2B 5c5bab831d4a86129cca41f8e82416d45a92e8ae29cd2223301633b46471783ee6bb8131d469cedcf0f655ea21879c475c61d0b9eefba9e12d78d0a803403a19 SHA512 8be300d9e502b7dcf8db4621d7c5c8981f47cbff851b30b33ef33871f737554eda73dacd179b64995fc45362c4dfd91e15ff659d2898f863465222176bfbff9f
+DIST erlang_doc_man_20.3.tar.gz 1339710 BLAKE2B 00aba848940914b3d98f9500b8201b0679d7d63d066cee296c8fbb399f132340b989f3cdcdd6c45a46e432efdb7c40c39d8ab4f3dbd64570316d649efc9faed1 SHA512 22c398ce3b42c7ef8abec1db85745eeb4d8804bc679d40b6a786fdc40dc241e43b5551df5d1eccb3ca8d4a64b833bf6663e77044f4564bb49cf67c4b74c5ea25
+DIST erlang_doc_man_21.0.tar.gz 1311959 BLAKE2B 70b049c6d7b8bbbb3bf77f7588ccf0eb937d5fe511968d47e1325dd01b48e986ae82804ffc88b750f0f7e2fe0482c0506ad060a6a84892eea61264aa2b003dd9 SHA512 611ac0b7cb2c0bc0bb6cd194dffe4f9d2c95bf38da033aa8c43d386a9bedf6f7d6fa8a95d340dbb57da2698602599c8e0501cbbdd735d6e5d35110aa9087dc79
+DIST otp_doc_html_19.1.tar.gz 34624316 BLAKE2B e3a5edfe1645d58e4cbd6537c775190716eed7613610ddfa112692fdbace2077b1ccdf7df5987973d2ae4ef529e4ec45d44a240265157816e2a15dabe9232b83 SHA512 2c6448af0be4bf35427950aca82eac3aac7554575ba07a8ba8942c27e1eb668461fde00604c3be28fbaca8a1e28ee4861608e33a9c79bc951bb695f99b1c1ac8
+DIST otp_doc_html_19.3.tar.gz 35818689 BLAKE2B 30118276fbd817b803ef20700fe2e71a8457645d00f8949b6d3175d92cb5c84d306e4de9899e2f5e0c562d8040dc22db35e1a0f2e314cf1a783794573b3ece59 SHA512 a70d2c470fa1dc0594b20af73ba36ccb7702b4192960e6fc0296738175215a43450f9bf558637f7f5e40757f7a15dcf4f1ae8a88515e211cd3c0fae45c5e1858
+DIST otp_doc_html_20.2.tar.gz 33570484 BLAKE2B c47244a601ae780e5304aedbafbc84d514cb21852760c51384b197d8d37602d51448b7123f6205da9afd2c5d2158f518a122dd4d550ca2ff22d3425eb31b6cf7 SHA512 b481930066737cf0ae2496aa9bc0c865da46bd3985fe5ebcf51eb9383539a57ec364e1eed9d3916ba0953d837d0d5d37cfc129a995d4e2a9656846e75cda9397
+DIST otp_doc_html_20.3.tar.gz 33594990 BLAKE2B 34db68a5c3ae56f097474cc0b776971853d96c57d3d2e058a5db8998aad9c8d498610979a46155e8e935022f363c944f407c10c650fd35174cf1f50697ddf1de SHA512 4b280228fb9cbd9eb62db12ff9d6fad67d6855d0cdbc780839bbc95302ffd907c5b410e6f8519207db8850b753964571a9bf9df9eca53749f5b01d1b27dbc6d4
+DIST otp_doc_man_19.1.tar.gz 1405580 BLAKE2B 93b79b88f81a00d7cbb934dbac811c6ea0ec59413e073fe613038eab71087908ed4e4bcbb6c8ed2f0c5bdd03ab4a570f20c4460f233c040ae0c4238e1cfa097a SHA512 4ee35feeff70419ff5500e00dc17e34fdea8be21342d41cf1e255b84a1826b51057046be543ee1052153ae8c8cd215f4720cecae7d9fe1576cbd681dcf4b2334
+DIST otp_doc_man_19.3.tar.gz 1410781 BLAKE2B 78293aa498c2651be27d83f13e14007f25a1816b4dae499f463249f774256eddde3a4e31c435a30edd04fb6f41cee965c968b338de77330c3320f3df6087be92 SHA512 675a0d2d5972660a60de17c832e630f646f942d23815427eb0dec3a5ca1c44ed8fe35a9c30f8b608dedfd10f6fb1e47e958ea6e32e296b6f6809b1844b4da9a1
+DIST otp_doc_man_20.2.tar.gz 1337652 BLAKE2B 416e83c696e30981eabad1f5a7c89abfd0b9d48ff04c9bd86b13dc96302acc9f2b9a73906a2976888ce35c6bfb38b3c006a1e0a041dd1bd5e75908e53bb920c3 SHA512 a67bb975b613c74c4e2418406b6472764ac69dfb9f8a6f64c79c680b1f87edea719431c140b006f776b0088885d958a6f2718267cebaf73ed506eaff721400f4
+DIST otp_doc_man_20.3.tar.gz 1339710 BLAKE2B 00aba848940914b3d98f9500b8201b0679d7d63d066cee296c8fbb399f132340b989f3cdcdd6c45a46e432efdb7c40c39d8ab4f3dbd64570316d649efc9faed1 SHA512 22c398ce3b42c7ef8abec1db85745eeb4d8804bc679d40b6a786fdc40dc241e43b5551df5d1eccb3ca8d4a64b833bf6663e77044f4564bb49cf67c4b74c5ea25
+DIST otp_src_19.1.tar.gz 68103074 BLAKE2B 48e06ce5998929a8ca9804e51f07a4153e7fb1c8b1b4b1b60132e255c29c475534ce018a7902ed29b696b783a21daa73d1778435aada1a77064ab46e915af87d SHA512 bd1c243393c867c91768367613aedb40d56889add149390c81f22e022e76b716d6e9a4d5db7e6477ceb1216c26c18c962abdfd8215a87420758f5ef2063b9714
+DIST otp_src_19.3.tar.gz 68510871 BLAKE2B fc37c493f5fa3533aaa29f545ff751f5851b58d8952f6f21ef50fec433d661a1e3300139b30a41d9c1f16b3eeaf5d98450bf0a2408e7910712d9d98f3af19237 SHA512 6920eab6e1681a76ab44bdd0eeb9b012e601191f91ca06edf1f63ba2e261c555d6f8dddf7025b2e9c3c6459bd63ff78659010ec33967fb1952840fb451ec2de6
+DIST otp_src_20.2.tar.gz 87136848 BLAKE2B f83e652320b67b72cf42be3c23a9251806096fea4e255f73c8170bcb61ea1e008983f1da1c9dc7b46b76e1fd0d96f94097f5d629eb28c08eb424bb1e7a1cee28 SHA512 6c2cbef9fa67f4aa9d0c22bedf87f39b0067994614663afee88c57bb7789eec45cb1970dcbd930d163a27293b8d24b20a90cf6ed30ff1a14492a9ccdd5b59a65
+DIST otp_src_20.3.tar.gz 88170904 BLAKE2B 3f92641e4eb4079572c0cc1cbc6ba1f56977efd182efcef6c466a0ac6232e18d9481823624cdd49a866feb38e96db6150f40927f25f2daaa64fe4aafd02089b4 SHA512 4169e2e653055c62dd66e214dcab577b49cadb8328dcc43adb8a2d44850b12c02db8323992c21852409697c5a48493068316417be9d97519b039a8f1cde143da
+EBUILD erlang-19.1.ebuild 4482 BLAKE2B 36a4249649473f50cce66f542c98dbefee41a56d57bd6327f911e6137d5d9bd5fc0656e3f5770f804ae425d428739530be8395a078cc6d930e6c4df2e44edc90 SHA512 26067ee69b78c63a40800b87fcd41f74f1b5a04fdc9e1103b2953f1c721195ec6dfb992474d442193c0673c548ed76a3e88938cc3f93bdbee9e26403164e5e60
+EBUILD erlang-19.3.ebuild 4535 BLAKE2B 248bcab46bc6830e6ffcc626d8170b99f5705c7955fd7184e2f8b8799e0ab4fc97c9741bf4ad9413da479c703b585589e2eae63c9fb298d7e36750fadcb1b56b SHA512 c1b60ca3420d5a3cb1561376c6622d346dbd483e8ff5965f2823a6b1e1e3b0146b32a805307d0a7563ae5171d005cfc27a6662ae2ba8fff0511c5db221851b14
+EBUILD erlang-20.2.ebuild 4586 BLAKE2B e3eed51b916285c87e212446047d07d47492410580464a2c800642be36426848f859573387204afd7ab67d72bbfaefec4189b973525f23829bed9f7a365d436b SHA512 80d5567d6233c7d9fcd53ca64814dd8cf188094decc6f8708563c22bef77b0b85bd23623df825f085f738547bf64b68fdde160b2ca9389b743a2c56259bf37b6
+EBUILD erlang-20.3.2.ebuild 6607 BLAKE2B d25ae5f93fc21e7304beeeecc99cd39516d52685d13003b5c9458272e1e6a9301a028009f746be53c20d20d1d896ec4177d9f06ed1d608ad4c466f1497226046 SHA512 dc6f1228f0f0b9a852f0d8cae149476b44f6069ec647340d259e8cb016a54c80265234e97e49686b33a3948cff485a2a30d276e03c1186749ecdc724e9cbefe2
+EBUILD erlang-20.3.8.ebuild 6650 BLAKE2B a6d808b56317da3fb65ccad9ef422bf602db0546729e8a61f70c233d4d4aa908b09acbb9c435ddcee6990d1372fb7f1dad5ab8a2ab4c8f21cb9ff0600996df9a SHA512 eca902776825efaf825183adbfdf158452bac38476ea6abea88ccdc8e15bf08f34921835acd9a81664b28216e909712dbae75e9b087587778aedae8c15fdf1dc
+EBUILD erlang-20.3.ebuild 4694 BLAKE2B 5d66f16b192c72d5890dc656530a743fd4ffd1f5e7a4770e8a2dbd0f69b631ade821163bdda3dfdf579fbddaa723d10564a4990f0c2c272fcc0455c45277154d SHA512 f059ffc739cbe0026c50d1a9019aef3bd63b8da887d755b3cbf6673ee208f294125ff38d261ce27e6b7f884a9a8156ca3bfe57da3bf3794f149b592ea905ed2a
+EBUILD erlang-21.0.2.ebuild 6648 BLAKE2B 3da97597dae434a2e35c0f2fb0682258b96f6d41e63760ec9f9acb458ae6db03e9189e346e3d644416f2082d5b13f15d6c0fc3a4d97d673dfedbe22b5c029dca SHA512 fbf641ce18a3c3ae2c3223f629bbd01c3ac0d63e5767c9576d31f9b009f45658adf8c5cbc32447882ebdbbaaf58952160eda1b8ebe4a1cf7c543e2287c8d6a86
+MISC metadata.xml 700 BLAKE2B f71879bdfc301ed27bd8212f074e5dbb176b29bcdab9edeb5ce0ba3dab3d8cb888977a140e91b0a50fbe35960799ab487afa3cd26a7b3b52d01909c678c1f30c SHA512 cada8e7cf719a6f0249c9f8538452d599e9ea938b2d57a9083e728c8f9d1c259871cc0f32c4f01c725692dd5e8270f0f67d84335593bdfe5ae31a54f117b1b84
diff --git a/dev-lang/erlang/erlang-19.1.ebuild b/dev-lang/erlang/erlang-19.1.ebuild
new file mode 100644
index 000000000000..19224daf6a1d
--- /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 ~hppa ~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..c18492150753
--- /dev/null
+++ b/dev-lang/erlang/erlang-19.3.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2018 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 ~hppa ~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.2.ebuild b/dev-lang/erlang/erlang-20.2.ebuild
new file mode 100644
index 000000000000..f72b025e3ab4
--- /dev/null
+++ b/dev-lang/erlang/erlang-20.2.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2018 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 ~hppa ~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
+ epatch "${FILESDIR}"/${P}-libressl-2.6.1.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.3.2.ebuild b/dev-lang/erlang/erlang-20.3.2.ebuild
new file mode 100644
index 000000000000..d9828cad710b
--- /dev/null
+++ b/dev-lang/erlang/erlang-20.3.2.ebuild
@@ -0,0 +1,226 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WX_GTK_VER="3.0"
+
+inherit autotools elisp-common java-pkg-opt-2 systemd versionator wxwidgets
+
+# NOTE: If you need symlinks for binaries please tell maintainers or
+# open up a bug to let it be created.
+
+UPSTREAM_V="$(get_version_component_range 1-2)"
+
+DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
+HOMEPAGE="http://www.erlang.org/"
+SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz
+ http://erlang.org/download/otp_doc_man_${UPSTREAM_V}.tar.gz -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
+ doc? ( http://erlang.org/download/otp_doc_html_${UPSTREAM_V}.tar.gz -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+
+IUSE="dirty-schedulers doc emacs hipe java kpoll libressl odbc smp sctp ssl systemd tk"
+REQUIRED_USE="dirty-schedulers? ( smp )" #621610
+
+RDEPEND="
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.7d:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ emacs? ( virtual/emacs )
+ java? ( >=virtual/jdk-1.2:* )
+ odbc? ( dev-db/unixODBC )
+ systemd? ( sys-apps/systemd )
+"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ sctp? ( net-misc/lksctp-tools )
+ sys-libs/zlib
+ tk? ( dev-lang/tk )
+ x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
+ virtual/glu
+"
+
+S="${WORKDIR}/otp-OTP-${PV}"
+
+PATCHES=(
+ "${FILESDIR}/18.2.1-wx3.0.patch"
+ "${FILESDIR}/${PN}-20.3.2-dont-ignore-LDFLAGS.patch"
+ )
+
+SITEFILE=50"${PN}"-gentoo.el
+
+# Taken from the upstream build script, build_otp
+erlang_create_lib_configure_in() {
+ local bootstrap_apps="erts lib/asn1 lib/compiler lib/hipelib/ic lib/kernel
+ lib/parsetools lib/sasl lib/snmp lib/stdlib lib/syntax_tools"
+ local sdirs=
+ for lib_app in ${bootstrap_apps}; do
+ case "${lib_app}" in
+ lib/*)
+ if [[ -f "${lib_app}/configure.in" ]]; then
+ mv "${lib_app}/configure.in" "${lib_app}/configure.ac" || die
+ app=`echo "${lib_app}" | sed "s|lib/\(.*\)|\1|"`
+ sdirs="${sdirs}test ! -f ${app}/configure || AC_CONFIG_SUBDIRS(${app}/.)\n" || die
+ fi;;
+ *)
+ ;;
+ esac
+ done
+
+ local sed_bootstrap="s%@BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g"
+
+ sdirs=
+ for lib_app in lib/*; do
+ local is_bapp=false
+ for bapp in ${bootstrap_apps}; do
+ test "${bapp} != ${lib_app}" || { "${is_bapp}"=true; break; }
+ done
+ if [[ "${is_bapp}" = false ]] && [[ -f "${lib_app}/configure.in" ]]; then
+ mv "${lib_app}/configure.in" "${lib_app}/configure.ac" || die
+ app=`echo "${lib_app}" | sed "s|lib/\(.*\)|\1|"` || die
+ sdirs="${sdirs} test ! -f ${app}/configure || AC_CONFIG_SUBDIRS(${app}/.)\n"
+ fi
+ done
+
+ local sed_non_bootstrap="s%@NON_BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g"
+
+ rm -f lib/configure.in || die
+ sed "$sed_bootstrap;$sed_non_bootstrap" > lib/configure.ac < lib/configure.in.src || die "Failed to create lib/configure.ac"
+
+}
+
+# Taken from the upstream build script, build_otp
+erlang_distribute_config_helpers() {
+ local aclocal_dirs=". ./lib/erl_interface ./lib/odbc ./lib/wx ./lib/megaco"
+ local autoconf_aux_dirs="./lib/common_test/priv/auxdir ./lib/erl_interface/src/auxdir ./lib/common_test/test_server ./lib/wx/autoconf"
+
+ local aclocal_master="./erts/aclocal.m4"
+ local install_sh_master="./erts/autoconf/install-sh"
+ local config_guess_master="./erts/autoconf/config.guess"
+ local config_sub_master="./erts/autoconf/config.sub"
+
+ for dir in ${aclocal_dirs}; do
+ "${install_sh_master}" -m 644 -t "${dir}" "${aclocal_master}" || die
+ done
+
+ for dir in ${autoconf_aux_dirs}; do
+ "${install_sh_master}" -d "${dir}" || die
+ "${install_sh_master}" -t "${dir}" "${install_sh_master}" || die
+ "${install_sh_master}" -t "${dir}" "${config_guess_master}" || die
+ "${install_sh_master}" -t "${dir}" "${config_sub_master}" || die
+ done
+}
+
+src_prepare() {
+ default
+
+ # Determines which directories to recurse into with autoconf
+ erlang_create_lib_configure_in
+
+ # Move local autoconf files into the neccessary directories
+ erlang_distribute_config_helpers
+
+ java-pkg-opt-2_src_prepare
+
+ eautoreconf
+}
+
+src_configure() {
+ need-wxwidgets unicode
+
+ econf \
+ --disable-builtin-zlib \
+ $(use_enable dirty-schedulers) \
+ $(use_enable hipe) \
+ $(use_enable kpoll kernel-poll) \
+ $(use_with java javac) \
+ $(use_with odbc) \
+ $(use_enable sctp) \
+ $(use_enable smp smp-support) \
+ $(use_with ssl) \
+ $(use_with ssl ssl-rpath "no") \
+ $(use_enable ssl dynamic-ssl-lib) \
+ $(use_enable systemd) \
+ --enable-threads
+}
+
+src_compile() {
+ emake
+
+ if use emacs ; then
+ pushd lib/tools/emacs &>/dev/null || die
+ elisp-compile *.el
+ popd &>/dev/null || die
+ 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)"
+ local MY_MANPATH="/usr/share/${PN}/man"
+
+ [[ -z "${ERL_ERTS_VER}" ]] && die "Couldn't determine erts version"
+ [[ -z "${ERL_INTERFACE_VER}" ]] && die "Couldn't determine interface version"
+
+ emake INSTALL_PREFIX="${ED}" install
+
+ if use doc ; then
+ local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" "${WORKDIR}"/doc/. "${WORKDIR}"/lib/. "${WORKDIR}"/erts-* )
+ docompress -x /usr/share/doc/${PF}
+ fi
+
+ einstalldocs
+
+ 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
+
+ if use smp; then
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp
+ else
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam
+ fi
+
+ ## Clean up the no longer needed files
+ rm "${ED}/${ERL_LIBDIR}/Install" || die
+
+ insinto "${MY_MANPATH}"
+
+ doins -r "${WORKDIR}"/man/*
+
+ # extend MANPATH, so the normal man command can find it
+ # see bug 189639
+ echo "MANPATH=\"${MY_MANPATH}\"" > "${T}/90erlang" || die
+ doenvd "${T}/90erlang"
+
+ if use emacs ; then
+ pushd "${S}" &>/dev/null || die
+ elisp-install erlang lib/tools/emacs/*.{el,elc}
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
+ "${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die
+ elisp-site-file-install "${T}/${SITEFILE}"
+ popd &>/dev/null || die
+ 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.3.8.ebuild b/dev-lang/erlang/erlang-20.3.8.ebuild
new file mode 100644
index 000000000000..ed20da173d49
--- /dev/null
+++ b/dev-lang/erlang/erlang-20.3.8.ebuild
@@ -0,0 +1,226 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WX_GTK_VER="3.0"
+
+inherit autotools elisp-common java-pkg-opt-2 systemd versionator wxwidgets
+
+# NOTE: If you need symlinks for binaries please tell maintainers or
+# open up a bug to let it be created.
+
+UPSTREAM_V="$(get_version_component_range 1-2)"
+
+DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
+HOMEPAGE="http://www.erlang.org/"
+SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz
+ http://erlang.org/download/otp_doc_man_${UPSTREAM_V}.tar.gz -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
+ doc? ( http://erlang.org/download/otp_doc_html_${UPSTREAM_V}.tar.gz -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+
+IUSE="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:0= )
+ )
+ emacs? ( virtual/emacs )
+ java? ( >=virtual/jdk-1.2:* )
+ odbc? ( dev-db/unixODBC )
+ systemd? ( sys-apps/systemd )
+"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ sctp? ( net-misc/lksctp-tools )
+ sys-libs/zlib
+ tk? ( dev-lang/tk )
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
+ virtual/glu )
+"
+
+S="${WORKDIR}/otp-OTP-${PV}"
+
+PATCHES=(
+ "${FILESDIR}/18.2.1-wx3.0.patch"
+ "${FILESDIR}/${PN}-20.3.2-dont-ignore-LDFLAGS.patch"
+ )
+
+SITEFILE=50"${PN}"-gentoo.el
+
+# Taken from the upstream build script, build_otp
+erlang_create_lib_configure_in() {
+ local bootstrap_apps="erts lib/asn1 lib/compiler lib/hipelib/ic lib/kernel
+ lib/parsetools lib/sasl lib/snmp lib/stdlib lib/syntax_tools"
+ local sdirs=
+ for lib_app in ${bootstrap_apps}; do
+ case "${lib_app}" in
+ lib/*)
+ if [[ -f "${lib_app}/configure.in" ]]; then
+ mv "${lib_app}/configure.in" "${lib_app}/configure.ac" || die
+ app=`echo "${lib_app}" | sed "s|lib/\(.*\)|\1|"`
+ sdirs="${sdirs}test ! -f ${app}/configure || AC_CONFIG_SUBDIRS(${app}/.)\n" || die
+ fi;;
+ *)
+ ;;
+ esac
+ done
+
+ local sed_bootstrap="s%@BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g"
+
+ sdirs=
+ for lib_app in lib/*; do
+ local is_bapp=false
+ for bapp in ${bootstrap_apps}; do
+ test "${bapp} != ${lib_app}" || { "${is_bapp}"=true; break; }
+ done
+ if [[ "${is_bapp}" = false ]] && [[ -f "${lib_app}/configure.in" ]]; then
+ mv "${lib_app}/configure.in" "${lib_app}/configure.ac" || die
+ app=`echo "${lib_app}" | sed "s|lib/\(.*\)|\1|"` || die
+ sdirs="${sdirs} test ! -f ${app}/configure || AC_CONFIG_SUBDIRS(${app}/.)\n"
+ fi
+ done
+
+ local sed_non_bootstrap="s%@NON_BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g"
+
+ rm -f lib/configure.in || die
+ sed "$sed_bootstrap;$sed_non_bootstrap" > lib/configure.ac < lib/configure.in.src || die "Failed to create lib/configure.ac"
+
+}
+
+# Taken from the upstream build script, build_otp
+erlang_distribute_config_helpers() {
+ local aclocal_dirs=". ./lib/erl_interface ./lib/odbc ./lib/wx ./lib/megaco"
+ local autoconf_aux_dirs="./lib/common_test/priv/auxdir ./lib/erl_interface/src/auxdir ./lib/common_test/test_server ./lib/wx/autoconf"
+
+ local aclocal_master="./erts/aclocal.m4"
+ local install_sh_master="./erts/autoconf/install-sh"
+ local config_guess_master="./erts/autoconf/config.guess"
+ local config_sub_master="./erts/autoconf/config.sub"
+
+ for dir in ${aclocal_dirs}; do
+ "${install_sh_master}" -m 644 -t "${dir}" "${aclocal_master}" || die
+ done
+
+ for dir in ${autoconf_aux_dirs}; do
+ "${install_sh_master}" -d "${dir}" || die
+ "${install_sh_master}" -t "${dir}" "${install_sh_master}" || die
+ "${install_sh_master}" -t "${dir}" "${config_guess_master}" || die
+ "${install_sh_master}" -t "${dir}" "${config_sub_master}" || die
+ done
+}
+
+src_prepare() {
+ default
+
+ # Determines which directories to recurse into with autoconf
+ erlang_create_lib_configure_in
+
+ # Move local autoconf files into the neccessary directories
+ erlang_distribute_config_helpers
+
+ java-pkg-opt-2_src_prepare
+
+ eautoreconf
+}
+
+src_configure() {
+ use wxwidgets && need-wxwidgets unicode
+
+ econf \
+ --disable-builtin-zlib \
+ $(use_enable dirty-schedulers) \
+ $(use_enable hipe) \
+ $(use_enable kpoll kernel-poll) \
+ $(use_with java javac) \
+ $(use_with odbc) \
+ $(use_enable sctp) \
+ $(use_enable smp smp-support) \
+ $(use_with ssl) \
+ $(use_with ssl ssl-rpath "no") \
+ $(use_enable ssl dynamic-ssl-lib) \
+ $(use_enable systemd) \
+ --enable-threads
+}
+
+src_compile() {
+ emake
+
+ if use emacs ; then
+ pushd lib/tools/emacs &>/dev/null || die
+ elisp-compile *.el
+ popd &>/dev/null || die
+ 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)"
+ local MY_MANPATH="/usr/share/${PN}/man"
+
+ [[ -z "${ERL_ERTS_VER}" ]] && die "Couldn't determine erts version"
+ [[ -z "${ERL_INTERFACE_VER}" ]] && die "Couldn't determine interface version"
+
+ emake INSTALL_PREFIX="${ED}" install
+
+ if use doc ; then
+ local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" "${WORKDIR}"/doc/. "${WORKDIR}"/lib/. "${WORKDIR}"/erts-* )
+ docompress -x /usr/share/doc/${PF}
+ fi
+
+ einstalldocs
+
+ 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
+
+ if use smp; then
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp
+ else
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam
+ fi
+
+ ## Clean up the no longer needed files
+ rm "${ED}/${ERL_LIBDIR}/Install" || die
+
+ insinto "${MY_MANPATH}"
+
+ doins -r "${WORKDIR}"/man/*
+
+ # extend MANPATH, so the normal man command can find it
+ # see bug 189639
+ echo "MANPATH=\"${MY_MANPATH}\"" > "${T}/90erlang" || die
+ doenvd "${T}/90erlang"
+
+ if use emacs ; then
+ pushd "${S}" &>/dev/null || die
+ elisp-install erlang lib/tools/emacs/*.{el,elc}
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
+ "${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die
+ elisp-site-file-install "${T}/${SITEFILE}"
+ popd &>/dev/null || die
+ 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.3.ebuild b/dev-lang/erlang/erlang-20.3.ebuild
new file mode 100644
index 000000000000..80c077ee54b3
--- /dev/null
+++ b/dev-lang/erlang/erlang-20.3.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WX_GTK_VER="3.0"
+
+inherit autotools elisp-common java-pkg-opt-2 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 ~hppa ~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
+
+# False positives caused by nested configure scripts
+QA_CONFIGURE_OPTIONS="--disable-silent-rules"
+
+RDEPEND="
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-0.9.7d:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ 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() {
+ default
+
+ eapply "${FILESDIR}"/18.2.1-wx3.0.patch
+
+ if ! use odbc; then
+ sed -i 's: odbc : :' lib/Makefile || die
+ rm -rf lib/odbc/
+ fi
+
+ # 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
+ use odbc && 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
+ einstalldocs
+
+ 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
+
+ if use smp; then
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp
+ else
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam
+ fi
+
+ ## 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-21.0.2.ebuild b/dev-lang/erlang/erlang-21.0.2.ebuild
new file mode 100644
index 000000000000..4d85955c4706
--- /dev/null
+++ b/dev-lang/erlang/erlang-21.0.2.ebuild
@@ -0,0 +1,225 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+WX_GTK_VER="3.0"
+
+inherit autotools elisp-common java-pkg-opt-2 systemd versionator wxwidgets
+
+# NOTE: If you need symlinks for binaries please tell maintainers or
+# open up a bug to let it be created.
+
+UPSTREAM_V="$(get_version_component_range 1-2)"
+
+DESCRIPTION="Erlang programming language, runtime environment and libraries (OTP)"
+HOMEPAGE="http://www.erlang.org/"
+SRC_URI="https://github.com/erlang/otp/archive/OTP-${PV}.tar.gz -> ${P}.tar.gz
+ http://erlang.org/download/otp_doc_man_${UPSTREAM_V}.tar.gz -> ${PN}_doc_man_${UPSTREAM_V}.tar.gz
+ doc? ( http://erlang.org/download/otp_doc_html_${UPSTREAM_V}.tar.gz -> ${PN}_doc_html_${UPSTREAM_V}.tar.gz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+
+IUSE="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:0= )
+ )
+ emacs? ( virtual/emacs )
+ java? ( >=virtual/jdk-1.2:* )
+ odbc? ( dev-db/unixODBC )
+ systemd? ( sys-apps/systemd )
+"
+DEPEND="${RDEPEND}
+ dev-lang/perl
+ sctp? ( net-misc/lksctp-tools )
+ sys-libs/zlib
+ tk? ( dev-lang/tk )
+ wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] virtual/glu )
+"
+
+S="${WORKDIR}/otp-OTP-${PV}"
+
+PATCHES=(
+ "${FILESDIR}/18.2.1-wx3.0.patch"
+ "${FILESDIR}/${PN}-20.3.2-dont-ignore-LDFLAGS.patch"
+ )
+
+SITEFILE=50"${PN}"-gentoo.el
+
+# Taken from the upstream build script, build_otp
+erlang_create_lib_configure_in() {
+ local bootstrap_apps="erts lib/asn1 lib/compiler lib/hipelib/ic lib/kernel
+ lib/parsetools lib/sasl lib/snmp lib/stdlib lib/syntax_tools"
+ local sdirs=
+ for lib_app in ${bootstrap_apps}; do
+ case "${lib_app}" in
+ lib/*)
+ if [[ -f "${lib_app}/configure.in" ]]; then
+ mv "${lib_app}/configure.in" "${lib_app}/configure.ac" || die
+ app=`echo "${lib_app}" | sed "s|lib/\(.*\)|\1|"`
+ sdirs="${sdirs}test ! -f ${app}/configure || AC_CONFIG_SUBDIRS(${app}/.)\n" || die
+ fi;;
+ *)
+ ;;
+ esac
+ done
+
+ local sed_bootstrap="s%@BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g"
+
+ sdirs=
+ for lib_app in lib/*; do
+ local is_bapp=false
+ for bapp in ${bootstrap_apps}; do
+ test "${bapp} != ${lib_app}" || { "${is_bapp}"=true; break; }
+ done
+ if [[ "${is_bapp}" = false ]] && [[ -f "${lib_app}/configure.in" ]]; then
+ mv "${lib_app}/configure.in" "${lib_app}/configure.ac" || die
+ app=`echo "${lib_app}" | sed "s|lib/\(.*\)|\1|"` || die
+ sdirs="${sdirs} test ! -f ${app}/configure || AC_CONFIG_SUBDIRS(${app}/.)\n"
+ fi
+ done
+
+ local sed_non_bootstrap="s%@NON_BOOTSTRAP_CONFIGURE_APPS@%$sdirs%g"
+
+ rm -f lib/configure.in || die
+ sed "$sed_bootstrap;$sed_non_bootstrap" > lib/configure.ac < lib/configure.in.src || die "Failed to create lib/configure.ac"
+
+}
+
+# Taken from the upstream build script, build_otp
+erlang_distribute_config_helpers() {
+ local aclocal_dirs=". ./lib/erl_interface ./lib/odbc ./lib/wx ./lib/megaco"
+ local autoconf_aux_dirs="./lib/common_test/priv/auxdir ./lib/erl_interface/src/auxdir ./lib/common_test/test_server ./lib/wx/autoconf"
+
+ local aclocal_master="./erts/aclocal.m4"
+ local install_sh_master="./erts/autoconf/install-sh"
+ local config_guess_master="./erts/autoconf/config.guess"
+ local config_sub_master="./erts/autoconf/config.sub"
+
+ for dir in ${aclocal_dirs}; do
+ "${install_sh_master}" -m 644 -t "${dir}" "${aclocal_master}" || die
+ done
+
+ for dir in ${autoconf_aux_dirs}; do
+ "${install_sh_master}" -d "${dir}" || die
+ "${install_sh_master}" -t "${dir}" "${install_sh_master}" || die
+ "${install_sh_master}" -t "${dir}" "${config_guess_master}" || die
+ "${install_sh_master}" -t "${dir}" "${config_sub_master}" || die
+ done
+}
+
+src_prepare() {
+ default
+
+ # Determines which directories to recurse into with autoconf
+ erlang_create_lib_configure_in
+
+ # Move local autoconf files into the neccessary directories
+ erlang_distribute_config_helpers
+
+ java-pkg-opt-2_src_prepare
+
+ eautoreconf
+}
+
+src_configure() {
+ use wxwidgets && need-wxwidgets unicode
+
+ econf \
+ --disable-builtin-zlib \
+ $(use_enable dirty-schedulers) \
+ $(use_enable hipe) \
+ $(use_enable kpoll kernel-poll) \
+ $(use_with java javac) \
+ $(use_with odbc) \
+ $(use_enable sctp) \
+ $(use_enable smp smp-support) \
+ $(use_with ssl) \
+ $(use_with ssl ssl-rpath "no") \
+ $(use_enable ssl dynamic-ssl-lib) \
+ $(use_enable systemd) \
+ --enable-threads
+}
+
+src_compile() {
+ emake
+
+ if use emacs ; then
+ pushd lib/tools/emacs &>/dev/null || die
+ elisp-compile *.el
+ popd &>/dev/null || die
+ 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)"
+ local MY_MANPATH="/usr/share/${PN}/man"
+
+ [[ -z "${ERL_ERTS_VER}" ]] && die "Couldn't determine erts version"
+ [[ -z "${ERL_INTERFACE_VER}" ]] && die "Couldn't determine interface version"
+
+ emake INSTALL_PREFIX="${ED}" install
+
+ if use doc ; then
+ local DOCS=( "AUTHORS" "HOWTO"/* "README.md" "CONTRIBUTING.md" "${WORKDIR}"/doc/. "${WORKDIR}"/lib/. "${WORKDIR}"/erts-* )
+ docompress -x /usr/share/doc/${PF}
+ fi
+
+ einstalldocs
+
+ 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
+
+ if use smp; then
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam.smp" /usr/bin/beam.smp
+ else
+ dosym "${ERL_LIBDIR}/erts-${ERL_ERTS_VER}/bin/beam" /usr/bin/beam
+ fi
+
+ ## Clean up the no longer needed files
+ rm "${ED}/${ERL_LIBDIR}/Install" || die
+
+ insinto "${MY_MANPATH}"
+
+ doins -r "${WORKDIR}"/man/*
+
+ # extend MANPATH, so the normal man command can find it
+ # see bug 189639
+ echo "MANPATH=\"${MY_MANPATH}\"" > "${T}/90erlang" || die
+ doenvd "${T}/90erlang"
+
+ if use emacs ; then
+ pushd "${S}" &>/dev/null || die
+ elisp-install erlang lib/tools/emacs/*.{el,elc}
+ sed -e "s:/usr/share:${EPREFIX}/usr/share:g" \
+ "${FILESDIR}/${SITEFILE}" > "${T}/${SITEFILE}" || die
+ elisp-site-file-install "${T}/${SITEFILE}"
+ popd &>/dev/null || die
+ 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/files/erlang-20.2-libressl-2.6.1.patch b/dev-lang/erlang/files/erlang-20.2-libressl-2.6.1.patch
new file mode 100644
index 000000000000..89f8fc8b323d
--- /dev/null
+++ b/dev-lang/erlang/files/erlang-20.2-libressl-2.6.1.patch
@@ -0,0 +1,111 @@
+From b5b6c7695c5377b5aa474d8620df7c3e9a1ba629 Mon Sep 17 00:00:00 2001
+From: Hans Nilsson <hans@erlang.org>
+Date: Thu, 11 Jan 2018 15:29:23 +0100
+Subject: [PATCH] crypto: Disable RSA sslv23 padding for LibreSSL >= 2.6.1
+
+Not supported in newer LibreSSL.
+---
+ lib/crypto/c_src/crypto.c | 26 +++++++++++++++++++++++---
+ 1 file changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
+index 6957d25774..9a3ea07c97 100644
+--- a/lib/crypto/c_src/crypto.c
++++ b/lib/crypto/c_src/crypto.c
+@@ -179,6 +179,12 @@
+ # define HAVE_ECB_IVEC_BUG
+ #endif
+
++#define HAVE_RSA_SSLV23_PADDING
++#if defined(HAS_LIBRESSL) \
++ && LIBRESSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(2,6,1)
++# undef HAVE_RSA_SSLV23_PADDING
++#endif
++
+ #if defined(HAVE_CMAC)
+ #include <openssl/cmac.h>
+ #endif
+@@ -659,7 +665,9 @@ static ERL_NIF_TERM atom_rsa_oaep_md;
+ static ERL_NIF_TERM atom_rsa_pad; /* backwards compatibility */
+ static ERL_NIF_TERM atom_rsa_padding;
+ static ERL_NIF_TERM atom_rsa_pkcs1_pss_padding;
++#ifdef HAVE_RSA_SSLV23_PADDING
+ static ERL_NIF_TERM atom_rsa_sslv23_padding;
++#endif
+ static ERL_NIF_TERM atom_rsa_x931_padding;
+ static ERL_NIF_TERM atom_rsa_pss_saltlen;
+ static ERL_NIF_TERM atom_sha224;
+@@ -1064,7 +1072,9 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info)
+ atom_rsa_pad = enif_make_atom(env,"rsa_pad"); /* backwards compatibility */
+ atom_rsa_padding = enif_make_atom(env,"rsa_padding");
+ atom_rsa_pkcs1_pss_padding = enif_make_atom(env,"rsa_pkcs1_pss_padding");
++#ifdef HAVE_RSA_SSLV23_PADDING
+ atom_rsa_sslv23_padding = enif_make_atom(env,"rsa_sslv23_padding");
++#endif
+ atom_rsa_x931_padding = enif_make_atom(env,"rsa_x931_padding");
+ atom_rsa_pss_saltlen = enif_make_atom(env,"rsa_pss_saltlen");
+ atom_sha224 = enif_make_atom(env,"sha224");
+@@ -4449,8 +4459,10 @@ static int get_pkey_crypt_options(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NI
+ opt->rsa_padding = RSA_PKCS1_PADDING;
+ } else if (tpl_terms[1] == atom_rsa_pkcs1_oaep_padding) {
+ opt->rsa_padding = RSA_PKCS1_OAEP_PADDING;
++#ifdef HAVE_RSA_SSLV23_PADDING
+ } else if (tpl_terms[1] == atom_rsa_sslv23_padding) {
+ opt->rsa_padding = RSA_SSLV23_PADDING;
++#endif
+ } else if (tpl_terms[1] == atom_rsa_x931_padding) {
+ opt->rsa_padding = RSA_X931_PADDING;
+ } else if (tpl_terms[1] == atom_rsa_no_padding) {
+@@ -4516,7 +4528,10 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM
+ #endif
+ PKeyCryptOptions crypt_opt;
+ ErlNifBinary in_bin, out_bin, tmp_bin;
+- size_t outlen, tmplen;
++ size_t outlen;
++#ifdef HAVE_RSA_SSLV23_PADDING
++ size_t tmplen;
++#endif
+ int is_private = (argv[4] == atom_true),
+ is_encrypt = (argv[5] == atom_true);
+ int algo_init = 0;
+@@ -4596,6 +4611,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM
+ if (crypt_opt.signature_md != NULL
+ && EVP_PKEY_CTX_set_signature_md(ctx, crypt_opt.signature_md) <= 0)
+ goto badarg;
++#ifdef HAVE_RSA_SSLV23_PADDING
+ if (crypt_opt.rsa_padding == RSA_SSLV23_PADDING) {
+ if (is_encrypt) {
+ RSA *rsa = EVP_PKEY_get1_RSA(pkey);
+@@ -4607,9 +4623,11 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM
+ in_bin = tmp_bin;
+ }
+ if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_NO_PADDING) <= 0) goto badarg;
+- } else {
++ } else
++#endif
++ {
+ if (EVP_PKEY_CTX_set_rsa_padding(ctx, crypt_opt.rsa_padding) <= 0) goto badarg;
+- }
++ }
+ #ifdef HAVE_RSA_OAEP_MD
+ if (crypt_opt.rsa_padding == RSA_PKCS1_OAEP_PADDING) {
+ if (crypt_opt.rsa_oaep_md != NULL
+@@ -4728,6 +4746,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM
+ #endif
+
+ if ((i > 0) && argv[0] == atom_rsa && !is_encrypt) {
++#ifdef HAVE_RSA_SSLV23_PADDING
+ if (crypt_opt.rsa_padding == RSA_SSLV23_PADDING) {
+ RSA *rsa = EVP_PKEY_get1_RSA(pkey);
+ unsigned char *p;
+@@ -4745,6 +4764,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM
+ i = 1;
+ }
+ }
++#endif
+ }
+
+ if (tmp_bin.data != NULL) {
+--
+2.16.0
+
diff --git a/dev-lang/erlang/files/erlang-20.3.2-dont-ignore-LDFLAGS.patch b/dev-lang/erlang/files/erlang-20.3.2-dont-ignore-LDFLAGS.patch
new file mode 100644
index 000000000000..32dd89e0d6c7
--- /dev/null
+++ b/dev-lang/erlang/files/erlang-20.3.2-dont-ignore-LDFLAGS.patch
@@ -0,0 +1,42 @@
+From 69043168302ec7c0bcfaa8b1fb56bfae500bd139 Mon Sep 17 00:00:00 2001
+From: Nick Sarnie <commendsarnex@gmail.com>
+Date: Sun, 8 Apr 2018 16:11:55 -0400
+Subject: [PATCH] Don't ignore LDFLAGS
+
+Bug: https://bugs.gentoo.org/263129
+
+Signed-off-by: Nick Sarnie <commendsarnex@gmail.com>
+---
+ lib/megaco/src/flex/Makefile.in | 2 +-
+ lib/odbc/c_src/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in
+index c37ad4d702..400024ca0c 100644
+--- a/lib/megaco/src/flex/Makefile.in
++++ b/lib/megaco/src/flex/Makefile.in
+@@ -66,7 +66,7 @@ endif
+ CC = $(DED_CC)
+ CFLAGS_MT = $(CFLAGS) $(DED_THR_DEFS)
+ LD = $(DED_LD)
+-LDFLAGS = $(DED_LDFLAGS)
++LDFLAGS += $(DED_LDFLAGS)
+ LEX = @LEX@
+ LEXLIB = @LEXLIB@
+ PERL = @PERL@
+diff --git a/lib/odbc/c_src/Makefile.in b/lib/odbc/c_src/Makefile.in
+index 784e73c47e..51c023f710 100644
+--- a/lib/odbc/c_src/Makefile.in
++++ b/lib/odbc/c_src/Makefile.in
+@@ -82,7 +82,7 @@ CC = @CC@
+ CFLAGS = $(TYPEFLAGS) @CFLAGS@ @THR_DEFS@ @DEFS@
+ EI_LDFLAGS = -L$(EI_ROOT)/obj$(TYPEMARKER)/$(TARGET)
+ LD = @LD@
+-LDFLAGS = $(ODBC_LIB) $(EI_LDFLAGS)
++LDFLAGS += $(ODBC_LIB) $(EI_LDFLAGS)
+ LIBS = @LIBS@ @THR_LIBS@ $(EI_LIB)
+ INCLUDES = -I. $(ODBC_INCLUDE) $(EI_INCLUDE)
+ TARGET_FLAGS = @TARGET_FLAGS@
+--
+2.17.0
+
diff --git a/dev-lang/erlang/metadata.xml b/dev-lang/erlang/metadata.xml
new file mode 100644
index 000000000000..9da736baffef
--- /dev/null
+++ b/dev-lang/erlang/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-needed -->
+ <use>
+ <flag name="hipe">HIgh Performance Erlang extension</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-0.512 b/dev-lang/esco-0.512
deleted file mode 100644
index 5d312763b33e..000000000000
--- a/dev-lang/esco-0.512
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install
-DEPEND=gmp? ( dev-libs/gmp:0 )
-DESCRIPTION=Combine interpreter of esoteric languages
-EAPI=6
-HOMEPAGE=http://esco.sourceforge.net/
-IUSE=gmp l10n_ru
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=gmp? ( dev-libs/gmp:0 )
-SLOT=0
-SRC_URI=mirror://sourceforge/esco/esco-src-0.512.tar.gz
-_md5_=688c03549a85f8d054f7271cd7cc49bf
diff --git a/dev-lang/esco/Manifest b/dev-lang/esco/Manifest
new file mode 100644
index 000000000000..1e391fef2e18
--- /dev/null
+++ b/dev-lang/esco/Manifest
@@ -0,0 +1,3 @@
+DIST esco-src-0.512.tar.gz 382056 BLAKE2B d68440b57987fbb0c73f4ecae31c08818580ddd0403a6cd9821fc2ff9d25f12d8a8bb766a1bf760379ce8e667ffb3b817d88b5600309cacbd2cab1276860d51b SHA512 4d02af7097abbd6770a891065ea9d7d3f9acdd9c7c9164f726dba2385db48993e7fe9baa4fc57aac2d998544788416700933d473f1e9467c9f94e240f80ccf97
+EBUILD esco-0.512.ebuild 598 BLAKE2B 3311190cb66627bc74288f0c37b2b6658018a76cf09713e0c4e8af008922f9e31b6bf616efe95c1ac1fad286dc32a1f9465ff75f105aa82a40c4d77de1a1b58c SHA512 5b77b714b5a17e47fe6a8d900b1088008516522e23bdb1008b204b91928470dd160cd7144a2d6cb535b0e3ffee6f24946c3b22b1b76de006bf739855768b3b28
+MISC metadata.xml 321 BLAKE2B 47da0c63d583a8c7dc0c01267fa0423ef82330d16a561dec67bda97cd38b353b4a7f72d0fee5808328ca4e56d3d1faf368778015bf6c81034d0aa8d594601be7 SHA512 a7ec9ce4d818aee3ea976eba970b21b3e06bf2aaf577d8653c6a18b6a1ec586d00c413858e9acb00fa17b57a26a622b04f3ddbbae8298054350828a713936264
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-2.1.1.0 b/dev-lang/execline-2.1.1.0
deleted file mode 100644
index 2e0d364cdbab..000000000000
--- a/dev-lang/execline-2.1.1.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare
-DEPEND=>=sys-devel/make-4.0 static? ( >=dev-libs/skalibs-2.3.1.0[static-libs] ) !static? ( >=dev-libs/skalibs-2.3.1.0 )
-DESCRIPTION=a non-interactive scripting language similar to SH
-EAPI=5
-HOMEPAGE=http://www.skarnet.org/software/execline/
-IUSE=static static-libs
-KEYWORDS=amd64 x86
-LICENSE=ISC
-RDEPEND=!static? ( >=dev-libs/skalibs-2.3.1.0 )
-SLOT=0
-SRC_URI=http://www.skarnet.org/software/execline/execline-2.1.1.0.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=6748d0704e2fbd18da5965899b52ab70
diff --git a/dev-lang/execline-2.3.0.3 b/dev-lang/execline-2.3.0.3
deleted file mode 100644
index b4ae2ec03c37..000000000000
--- a/dev-lang/execline-2.3.0.3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure prepare
-DEPEND=>=sys-devel/make-3.81 static? ( >=dev-libs/skalibs-2.6.0.1[static-libs] ) !static? ( >=dev-libs/skalibs-2.6.0.1 )
-DESCRIPTION=a non-interactive scripting language
-EAPI=6
-HOMEPAGE=https://www.skarnet.org/software/execline/
-IUSE=static static-libs
-KEYWORDS=~amd64 ~arm ~x86
-LICENSE=ISC
-RDEPEND=!static? ( >=dev-libs/skalibs-2.6.0.1:= )
-SLOT=0/2.3
-SRC_URI=https://www.skarnet.org/software/execline/execline-2.3.0.3.tar.gz
-_eclasses_=estack 43ddf5aaffa7a8d0482df54d25a66a1f versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=574b680b3c19889531f48516d8a99a8b
diff --git a/dev-lang/execline-2.3.0.4 b/dev-lang/execline-2.3.0.4
deleted file mode 100644
index fe720415719e..000000000000
--- a/dev-lang/execline-2.3.0.4
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure prepare
-DEPEND=>=sys-devel/make-3.81 static? ( >=dev-libs/skalibs-2.6.2.0[static-libs] ) !static? ( >=dev-libs/skalibs-2.6.2.0 )
-DESCRIPTION=a non-interactive scripting language
-EAPI=6
-HOMEPAGE=https://www.skarnet.org/software/execline/
-IUSE=static static-libs
-KEYWORDS=~amd64 ~arm ~x86
-LICENSE=ISC
-RDEPEND=!static? ( >=dev-libs/skalibs-2.6.2.0:= )
-SLOT=0/2.3
-SRC_URI=https://www.skarnet.org/software/execline/execline-2.3.0.4.tar.gz
-_eclasses_=estack 43ddf5aaffa7a8d0482df54d25a66a1f versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=42e62a236b53da4336c4c75f7f6b86ce
diff --git a/dev-lang/execline/Manifest b/dev-lang/execline/Manifest
new file mode 100644
index 000000000000..f2fcb89ff1ae
--- /dev/null
+++ b/dev-lang/execline/Manifest
@@ -0,0 +1,7 @@
+DIST execline-2.1.1.0.tar.gz 75967 BLAKE2B 196edcfce385a2a3ef8bc3b16f94401430e06649c1ef9157da603904c296e3601433248046393d0c5ef9805107d09caf21f185b0c3ea3cabfde88508280bd5bd SHA512 250fe449b39a198193f1431b249b342f3c6c499fea12779a55d0e27aec2095285bbf9dc2a48d84eebdf9f540ecf5e67ef39393243ca0fadfc764d2cc95ac0b6b
+DIST execline-2.3.0.3.tar.gz 82476 BLAKE2B e54bf40037d988848a31b90ca477fb1a297bfc91a6ceb51289944cccc7af36a26b8323c63e8178bd9a252b482a703329c04c9f08a25c2cfe94f5baf60983d04c SHA512 2858ce62853f00f59e0cea8b886cd042f7ad04c6a86208266654d3d2e820b5d440e41cc4efb96fccdcc653d19957d343115a8e8c394b68f23addf941294fb172
+DIST execline-2.3.0.4.tar.gz 82774 BLAKE2B a658b538d0a17f15876fe9a822bb7c7e4edba48d2fce1d3c0fe0fd06fd8a414e062a962ca3935992903a4abccf920bf6ee957743609905a6ce498e6fd3deded8 SHA512 ce73b69394ec061ad85cf6f69211180bffe69f1b9716217dadca5894a261f77343d54d5f0339b3822c472720e60c4aa100a0e05dc83f2ad6b926bb53b5141c15
+EBUILD execline-2.1.1.0.ebuild 1213 BLAKE2B 6fc9dc130bd71bc590e0bf46e763b3936a8c9033fa7b9e267593901470a9a2dc15322c3a18e03fb38676fdd5db0bff0dbd647d1ecc82ece445da23112f7a4ca1 SHA512 788d3961de599828e7acc2159422780edd0c8cf5c0d98aa280d2c4f52eb796b3979dfd9e820ef81007b1c0f7a6252e5805b11c9fbeba5c11b9acc862f4b80bbf
+EBUILD execline-2.3.0.3.ebuild 1295 BLAKE2B 3b7562389a92c2d92bfcf7b7334638cb7bede79a7b1fc21b57c30661b316e1573c1b56476f94292d499d29ce8f8ccf6279c7f9886e92ed54a89bb2e22c452108 SHA512 f3b3659102780e31c0b6cc61505bf6af2bc1b23af11ca98c4ebb5012b3191f333f2eedc77a7644992c317d4fa3668acabe38f99d80356b07c770cc9b6b2c913f
+EBUILD execline-2.3.0.4.ebuild 1295 BLAKE2B 00c156c18fbffd8a09272af21cd1b347f8fcabd9d34f5f17f3d9e5ba76c80fcdddfe00a27df02965892b444269f4d3e1bf9d9f41ff2b7d5f67238a72e828d72f SHA512 5f7324afbf7106800542c548214b9d698ad0d2122590df5ea9f5f34433d2d966f7aca43fda286fcf740605358bf0c8d3d47d160cdd714f70dbfcc66db85e20aa
+MISC metadata.xml 478 BLAKE2B ecb74c96759ba274c63367526e88c0b98ecad92f2d5ce436ea41688ba64aa9fd2e8e661449cfc376575ec7aa38030a012ca37cfef22f22149d3b64d26c08c9b4 SHA512 ed6d5e5d2c23cd9e6a6a1ab64db1ffb2b1517e41dc06878918ef907454440c8e84cb8f91acb517bcd45fa1ebc0b990b1089ac3e2158baf1b128ff05efc2c71d0
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.3.0.3.ebuild b/dev-lang/execline/execline-2.3.0.3.ebuild
new file mode 100644
index 000000000000..19fe49f212fe
--- /dev/null
+++ b/dev-lang/execline/execline-2.3.0.3.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.1[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.6.0.1
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.6.0.1:=
+ )
+"
+
+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 -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.4.ebuild b/dev-lang/execline/execline-2.3.0.4.ebuild
new file mode 100644
index 000000000000..83c57271fbbf
--- /dev/null
+++ b/dev-lang/execline/execline-2.3.0.4.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2018 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.2.0[static-libs]
+ )
+ !static? (
+ >=dev-libs/skalibs-2.6.2.0
+ )
+"
+RDEPEND="
+ !static? (
+ >=dev-libs/skalibs-2.6.2.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 -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-20060507 b/dev-lang/f2c-20060507
deleted file mode 100644
index cf68a8abb716..000000000000
--- a/dev-lang/f2c-20060507
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install
-DEPEND=dev-libs/libf2c
-DESCRIPTION=Fortran to C converter
-EAPI=0
-HOMEPAGE=http://www.netlib.org/f2c
-KEYWORDS=amd64 ppc ppc64 x86 ~x86-fbsd
-LICENSE=HPND
-RDEPEND=dev-libs/libf2c
-SLOT=0
-SRC_URI=mirror://gentoo/f2c-20060507.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=1ed7b22c5a9a45d58b5bb099c4b4fad7
diff --git a/dev-lang/f2c-20100827 b/dev-lang/f2c-20100827
deleted file mode 100644
index c9490a4b3e54..000000000000
--- a/dev-lang/f2c-20100827
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DESCRIPTION=Fortran to C converter
-EAPI=4
-HOMEPAGE=http://www.netlib.org/f2c
-IUSE=doc
-KEYWORDS=~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux
-LICENSE=HPND
-RDEPEND=dev-libs/libf2c
-SLOT=0
-SRC_URI=mirror://debian/pool/main/f/f2c/f2c_20100827.orig.tar.gz mirror://debian/pool/main/f/f2c/f2c_20100827-1.debian.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=9537693f486437e22d48a66a36fe2a68
diff --git a/dev-lang/f2c/Manifest b/dev-lang/f2c/Manifest
new file mode 100644
index 000000000000..30d225adba43
--- /dev/null
+++ b/dev-lang/f2c/Manifest
@@ -0,0 +1,6 @@
+DIST f2c-20060507.tar.bz2 186677 BLAKE2B 972b55dc95372fc479d6fabd91b495bf4d7e055755c2f9fc5197045207bf8b494948b89c441ae9930c7a247e91707b379f2747e1d9299d04f0b27086bdd1248e SHA512 d0c9019b65a8ad2fd769ada596646a1cd9b682dcc8afa2cd99081376d967fbe959186a38d74570ab4bcce7622c58c8c10042948fa56e0a7080b12111c2b99b1e
+DIST f2c_20100827-1.debian.tar.gz 15659 BLAKE2B 4773a939e51074df34b48540ed67d0bd3dce85b64d6118c480217b569bbe11a9907a7a8bf2d68f0ec5fae51c65ec29a9dafdac1a009a90b5c6d02306496a72d5 SHA512 784d3f1a74311a933b54103d36dd18eb879bef1816ea82e8d93ef5a0eb7582d4ddde3a2b764d15b78194bab4cdf940480089e8b920002134af66cdf095708535
+DIST f2c_20100827.orig.tar.gz 417930 BLAKE2B 4ccd59762947de9d316520f213d33e095a559dfe914c06d58f4db21a031b6dca332d75473dbaa6a6167ef3f0459c68235fdddac3ed4dcea34e9597a8ab0ae982 SHA512 2c28d8c06e53b569816e7982725133d46e9b145a84ec51771f4cca2409098f894648ebe5b8089a1ddd8468be62394b0edb5985e50baeea8129e4f507236d6c0d
+EBUILD f2c-20060507.ebuild 743 BLAKE2B 57179198c83f6a6961cf56fef1c6222bb61a8faa5c1ba2a74ad39268914b28c30fac158c79d15451ebe10436d97afe5317c88df2af370823161e7319fd747db8 SHA512 02164e7c3e8f9b451c4970b16e0b2604638be62ab72fee20d2930b48760461422cc938a3e3ed38adc91631828cc0d1c497ccc3c6b9fd57cfbdad48021e1d65f4
+EBUILD f2c-20100827.ebuild 1171 BLAKE2B a6019cd127034be532733d94d8f4f02b51ac7cf2b28451ce118430cc68bbf4cd2604b8159984bd458f1bc0dcc283ec7290dc8bcb986163eeb50f600208217845 SHA512 332f261f4284a191ec7a1b83e000c0c7660767d8c4ccdd264603ede7c210dfc2fe4dbb14e115cdb0e41b6212812c8bc5e76c2f32ab01aef18a7b0da61320062f
+MISC metadata.xml 726 BLAKE2B c706f880ddcb69efcc16a8424098f60d920447b0d46e2becfa4202cf8365fd6b8cb7cdd4007995def055826d7240a19ec780c3fc8a147e222bc8dbd4e407a3e9 SHA512 37fef3d63140a9aecff3dd5b99594cf1425b37bc433fd12109e105be79698654fa244cbfb5d95587f297791d6c118461d10885945893fd02cae8bba4a3089e03
diff --git a/dev-lang/f2c/f2c-20060507.ebuild b/dev-lang/f2c/f2c-20060507.ebuild
new file mode 100644
index 000000000000..32862f0a7377
--- /dev/null
+++ b/dev-lang/f2c/f2c-20060507.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+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..52a68bb17fdb
--- /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-1.1.17-r1 b/dev-lang/ferite-1.1.17-r1
deleted file mode 100644
index 1e369ea561f5..000000000000
--- a/dev-lang/ferite-1.1.17-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=>=dev-libs/libpcre-5 dev-libs/libxml2 >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A clean, lightweight, object oriented scripting language
-EAPI=4
-HOMEPAGE=http://www.ferite.org/
-KEYWORDS=~alpha amd64 ppc -sparc x86 ~amd64-linux ~x86-linux ~ppc-macos
-LICENSE=BSD
-RDEPEND=>=dev-libs/libpcre-5 dev-libs/libxml2
-SLOT=1
-SRC_URI=mirror://sourceforge/ferite/ferite-1.1.17.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=8a805a71638c16f72cfb84be11102c35
diff --git a/dev-lang/ferite/Manifest b/dev-lang/ferite/Manifest
new file mode 100644
index 000000000000..932c5d38bd7e
--- /dev/null
+++ b/dev-lang/ferite/Manifest
@@ -0,0 +1,4 @@
+AUX ferite-pcre.patch 1356 BLAKE2B f2c3669e33d12dce6e00d22b5884f0770021eb77297997bd94e777b114f8ae24f7ed23b10d7c877a7bffb61fe9ff0e126bd717ea8c8a8fb8186da89178ba4926 SHA512 e867c4b2fc993963bdf17d992d3dd007f636c85b0c13388480cec0f0ff70b6596274c19cd46b0e3ee11064f607b381f7f76888819ef6fb3bdd0804b07b5087fc
+DIST ferite-1.1.17.tar.gz 2174774 BLAKE2B 5e55ed4101bc5a9c031afef0d9bfcafdc0c498c4ddc712eb17e3059ebd55b925e6b0343113853b946a31a428e5f71c17a2365e629447bb504453b6a7d61358d8 SHA512 475983b865fba492661e59b7470b7e46889f29ed8ba829b112354963fafcbed6ab4d4677579337c1c4ed730c6fe02897743f56edae335ceda6277da975d1098f
+EBUILD ferite-1.1.17-r1.ebuild 2419 BLAKE2B fb80ad9d2c8a3686334bd5d1c1f589965358e48c6d76e915082df64f3b72104bac37ad01c4fee9fca5203e79227b52119a61521b4f1d4b027541cb12bcbe3214 SHA512 bf2c5f4bda036da71a796a15d4b5a2f035fcf90a81800bc3241b55b86b52a6bdba659bff62a257c75e4d8a9499c1c8cae40523623db32299649b56b7de0bef7a
+MISC metadata.xml 243 BLAKE2B fc4ef3433d84176432ef31abd4960ce0e2dcd4979228bf565712a1e574451b34689a8fff3dab4142e3997f084729bba1bc3d2c38d6ddf10d95a11e0b4412e03a SHA512 e3315331fae1a640778867a807694dc624ac88e4dbae2546780534a629d65d054cc6e376245fd31432d663775121cf07d74b2f1cd65d9d2d9cf9137d6598897a
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-2.6.4 b/dev-lang/fpc-2.6.4
deleted file mode 100644
index fcd4382f89d3..000000000000
--- a/dev-lang/fpc-2.6.4
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare pretend unpack
-DESCRIPTION=Free Pascal Compiler
-EAPI=5
-HOMEPAGE=https://www.freepascal.org/
-IUSE=doc ide source
-KEYWORDS=amd64 ~arm x86
-LICENSE=GPL-2 LGPL-2.1-with-linking-exception
-RDEPEND=ide? ( !dev-lang/fpc-ide )
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://sourceforge/freepascal/fpcbuild-2.6.4.tar.gz mirror://sourceforge/freepascal/fpc-2.6.4.source.tar.gz amd64? ( mirror://sourceforge/freepascal/fpc-2.6.4.x86_64-linux.tar ) arm? ( mirror://sourceforge/freepascal/fpc-2.6.4.arm-linux.tar ) ppc? ( mirror://sourceforge/freepascal/fpc-2.6.4.powerpc-linux.tar ) ppc64? ( mirror://sourceforge/freepascal/fpc-2.6.4.powerpc64-linux.tar ) sparc? ( mirror://sourceforge/freepascal/fpc-2.6.2.sparc-linux.tar ) x86? ( mirror://sourceforge/freepascal/fpc-2.6.4.i386-linux.tar ) doc? ( mirror://sourceforge/freepascal/Documentation/2.6.4/doc-html.tar.gz -> fpc-2.6.4-doc-html.tar.gz https://dev.gentoo.org/~radhermit/distfiles/fpc-2.6.4-fpctoc.htx.bz2 )
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=99d3ef3f6531d01c1ed0492895706478
diff --git a/dev-lang/fpc-3.0.0 b/dev-lang/fpc-3.0.0
deleted file mode 100644
index 96fa4e0b5ce7..000000000000
--- a/dev-lang/fpc-3.0.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare pretend unpack
-DESCRIPTION=Free Pascal Compiler
-EAPI=5
-HOMEPAGE=https://www.freepascal.org/
-IUSE=doc ide source
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2.1-with-linking-exception
-RDEPEND=ide? ( !dev-lang/fpc-ide )
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://sourceforge/freepascal/fpcbuild-3.0.0.tar.gz mirror://sourceforge/freepascal/fpc-3.0.0.source.tar.gz amd64? ( mirror://sourceforge/freepascal/fpc-3.0.0.x86_64-linux.tar ) x86? ( mirror://sourceforge/freepascal/fpc-3.0.0.i386-linux.tar ) doc? ( mirror://sourceforge/freepascal/Documentation/3.0.0/doc-html.tar.gz -> fpc-3.0.0-doc-html.tar.gz )
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=bedaa549488ad9785b1100d5016bffc4
diff --git a/dev-lang/fpc-3.0.2 b/dev-lang/fpc-3.0.2
deleted file mode 100644
index 96d50478439b..000000000000
--- a/dev-lang/fpc-3.0.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare pretend unpack
-DESCRIPTION=Free Pascal Compiler
-EAPI=5
-HOMEPAGE=https://www.freepascal.org/
-IUSE=doc ide source
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2.1-with-linking-exception
-RDEPEND=ide? ( !dev-lang/fpc-ide )
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://sourceforge/freepascal/fpcbuild-3.0.2.tar.gz mirror://sourceforge/freepascal/fpc-3.0.2.source.tar.gz amd64? ( mirror://sourceforge/freepascal/fpc-3.0.2.x86_64-linux.tar ) x86? ( mirror://sourceforge/freepascal/fpc-3.0.2.i386-linux.tar ) doc? ( mirror://sourceforge/freepascal/Documentation/3.0.2/doc-html.tar.gz -> fpc-3.0.2-doc-html.tar.gz )
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=86dc3782712334a0524e5d3773994696
diff --git a/dev-lang/fpc-3.0.2-r1 b/dev-lang/fpc-3.0.2-r1
deleted file mode 100644
index c5738cab1a86..000000000000
--- a/dev-lang/fpc-3.0.2-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare pretend unpack
-DESCRIPTION=Free Pascal Compiler
-EAPI=5
-HOMEPAGE=https://www.freepascal.org/
-IUSE=doc ide source
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2.1-with-linking-exception
-RDEPEND=ide? ( !dev-lang/fpc-ide )
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://sourceforge/freepascal/fpcbuild-3.0.2.tar.gz mirror://sourceforge/freepascal/fpc-3.0.2.source.tar.gz amd64? ( mirror://sourceforge/freepascal/fpc-3.0.2.x86_64-linux.tar ) x86? ( mirror://sourceforge/freepascal/fpc-3.0.2.i386-linux.tar ) doc? ( mirror://sourceforge/freepascal/Documentation/3.0.2/doc-html.tar.gz -> fpc-3.0.2-doc-html.tar.gz )
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e prefix e51c7882b7b721e54e684f7eb143cbfe toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=3629ef6c52b6e2ce3b958c62b9cb14f2
diff --git a/dev-lang/fpc-3.0.4 b/dev-lang/fpc-3.0.4
deleted file mode 100644
index 8393f0033481..000000000000
--- a/dev-lang/fpc-3.0.4
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare pretend unpack
-DESCRIPTION=Free Pascal Compiler
-EAPI=5
-HOMEPAGE=https://www.freepascal.org/
-IUSE=doc ide source
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2.1-with-linking-exception
-RDEPEND=ide? ( !dev-lang/fpc-ide )
-RESTRICT=strip
-SLOT=0
-SRC_URI=mirror://sourceforge/freepascal/fpcbuild-3.0.4.tar.gz mirror://sourceforge/freepascal/fpc-3.0.4.source.tar.gz amd64? ( mirror://sourceforge/freepascal/fpc-3.0.4.x86_64-linux.tar ) x86? ( mirror://sourceforge/freepascal/fpc-3.0.4.i386-linux.tar ) doc? ( mirror://sourceforge/freepascal/Documentation/3.0.4/doc-html.tar.gz -> fpc-3.0.4-doc-html.tar.gz )
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e prefix e51c7882b7b721e54e684f7eb143cbfe toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=265389bc51312ef8041b2d3ed71a296d
diff --git a/dev-lang/fpc/Manifest b/dev-lang/fpc/Manifest
new file mode 100644
index 000000000000..c1cde2561ee5
--- /dev/null
+++ b/dev-lang/fpc/Manifest
@@ -0,0 +1,31 @@
+DIST fpc-2.6.2.sparc-linux.tar 33843200 BLAKE2B 1ed51f70e940da9151b2c3fa072a61469b36356fcf3f200a787c44ff468074ad25596afcc3864537f9d31b68827ff7d6d6888715421a570e0a0d107368a41de5 SHA512 9f6ba30680bd51ccb6b627935ce2cc10dfa8671f621d5ef7d7e047b036c48934829e165c3f9bbac61bbccda8b679ee132fc26e41c4f9b66cf30966481eb81f09
+DIST fpc-2.6.4-doc-html.tar.gz 4864530 BLAKE2B 7b0138336709403aee1647a04561e797771eb43a0633a0e23d15feeabd7848891443d550c43bb26a146d421e4bc1a8e095df628b0bade5d065caa03705d00e7f SHA512 c76b15c3c9c47d687bb4760753f605a169c7e76b8b8478dc4e557d0a172f9e7ce7abb24fc1512f7eaa305807a1f4cb0a1305bb02e983f932b02aa9683026e54d
+DIST fpc-2.6.4-fpctoc.htx.bz2 125626 BLAKE2B dca08aa9e0bf0cc62a5966eb886057afcb38e3b0174f277a2e30fe41f8c4aca350dc8b35aa0341d6ce6ed50f9db02b3d91778095941d9e13f52f6617a38d486d SHA512 12fdc2755adfabbda74257b058e00072e5e11925b8e62cf7959b2acab90b3e226b8f51544a127f88fc3cd473ba9794e6c9da4e73c04ced2a0d41994b520cd33d
+DIST fpc-2.6.4.arm-linux.tar 38440960 BLAKE2B 07695cff655e25087654ec1b2e556d43ea2b8ebe262954bef26f11a2d1e6f40469bbaa08c82209279eef4e9807441d58aa6211bcec9248a5070657158bab67a0 SHA512 3a11ebed39f37021201cac8a7e435d7ef3b1110d6893de7faf33651ff9b5a9aa13b6b529b0011132850386048483a55754ed8b1dba7de2e7ba9b2e881e7f0203
+DIST fpc-2.6.4.i386-linux.tar 47718400 BLAKE2B 005014a798457bc4f4f1b6035e36a907ee43dec5949e537e919600806fce0927ad1ec53b8ee77eb66f3c6e089a24896af9b3a1d4ff35fe6449d1f3f313ce9506 SHA512 2c1c33c80553d8a331f4fb35e1b136ab195de9fa03ab566b218a265a64cc75447a697a34472fa9cceeedf1e3acd664fada2cd36d60b319ea43eed7e1f9e57615
+DIST fpc-2.6.4.powerpc-linux.tar 48220160 BLAKE2B 1695c5267bef715994e6dcb14f085d49f83e9ae2976f4d5763df4a8c45bb24fa5ca142841521ee9af1dd7a1b38c7bcb3d1fb3b35bb4c800f5e63878d184bbc36 SHA512 a78b416a6dd59a10ad50c3549956f15fae5962b64d43be1f1d605befd035732cf860146970dcb410080f9ceb2af1a4f798434fceb11be550cb87d41c72be1810
+DIST fpc-2.6.4.powerpc64-linux.tar 53975040 BLAKE2B 2cbbe4756833c66f6889198497356c124b06f6ef89158bef22253d1465cb70356efcac8b35d0ad38c30c14a831efc36e15d01bb653dfc6d455fe0bd19546aa3f SHA512 0e978f68e339f12e2c53c8641c4f0918604b6b970949159dd20c49d65dabb5253d338d180da144eea3c6102a0110c401d03efbd634885220a320fce5fc686b16
+DIST fpc-2.6.4.source.tar.gz 29904088 BLAKE2B c126a76ea656a776a94237803db27a2319b0d93309175465ee2b4a06e4271b83a2079b7864ff642fb150fe8f57f4073034bf863f51c9f3512bbbab3d4e1f1d7d SHA512 653968786b40c69c3703f67cddfe7c501686cc8b3524a045498c247dc36b66a6619e9cdb5bb5ca002fb700ddc0b653f2a4298e92527df46fc09c8a69e8e9c3a5
+DIST fpc-2.6.4.x86_64-linux.tar 50350080 BLAKE2B b678cdd5d89c5f18eee1aaeba7e1d2285f70c9bd97ca9cdcce96302016f40bbc32699bf6bf8d22cab01c6ebfa3714ed7cbb9662fed4eccbd4cbd39d6a8d8fdb6 SHA512 3a993d1f978353a1d68d8ce2cd62748a875b0d0589ed8daf71ebba545b51879b09173e26245e02ac327b5d64932153a7695975c02f3f266642b4ef68e8ff48dc
+DIST fpc-3.0.0-doc-html.tar.gz 5253600 BLAKE2B e7128f5475ac57e82dbd1873ca3978572623dc1d674c05f0c9255e903f77f9cadb0cf1e56d7c4d89cdcf84786fef9c28b6c0dc143950c7a67cc3e21709087c09 SHA512 8a6fb405330eb5d4faa6bc892c7cd8b757b2e7b437e3ce19d85d5b98f702df936e1111e0ba9aac24099d20f6366a3bc8c674e087adbd463e62c2b5c615136486
+DIST fpc-3.0.0.i386-linux.tar 44892160 BLAKE2B 49329eab8765e934c5e0925e533e5bca2f942f179050f18ae06169303ee0284f0b3c72d45fd090290f52c31390865c5dc5974b06f74ffe978fec57ba6247294d SHA512 6d409aaa3827018f27813d7965f2d820e36b725ad8ec3257b89688b0bbf722b41e44ab99495050422b91db71323a081bd60c68f3919d04f17b1922264ec10e13
+DIST fpc-3.0.0.source.tar.gz 38311370 BLAKE2B 77a09431074c9df64ca2de3192966a22654a5d5f344a96351889af75951d1d6f8558dbd8642951ea25dbccf7ef74e320adde3ad5af2d9a5c6e64af30d49b3d83 SHA512 18b91a10320b0c52d0486aa241dbfeb5777eebe040f393f9b3661e8ab27a338b5a8d84c9461d40c6d11b362af2deb014f7c3fc273fc11fee1fc9badf19e18b88
+DIST fpc-3.0.0.x86_64-linux.tar 46571520 BLAKE2B 12e82ac9aebc2ecca1097c6d32baf3108e00a6fa6fc6297220a878d6523086731bb6739c2858114b3352001acb91147550cdb94f35fd6df0def30097fe9a3d7a SHA512 26502cf1dfd2bb83fe860e41cb064ccc5b971d112bf05f95e92089ea71bf0e3aafe659ef4cfc4967dd62271b5ecd3468fedf63dc351944b9e8cb52d662d4a3bb
+DIST fpc-3.0.2-doc-html.tar.gz 5534720 BLAKE2B 0d0dfcd1486dd3627242f008face430d80d74db326b0e67f0876a561be3736092ca4397812c8d382a03a0f7e7b4b77abbcdb5ccde25831bfeda36380f6ad5ff4 SHA512 1334e0bd5fbcc5d06513c9f9b1cd99b9a79782cca6224761d18ea314ba88da79517fac46c7135316f00bbaefd779080406f1b9e6c33ffb1e7b228f0c11618669
+DIST fpc-3.0.2.i386-linux.tar 55019520 BLAKE2B b15c99de6b5341d2e41b0ca2644c67808845c0fcaba6e4b3e2efe8d3f8975268491fa4339d4b2aa244e9c71809860c44dad4a6a5609953cb0182144e5648b28e SHA512 adeba89838eceec899edf54a7655a57551319c59eda9f437aa0b6a76bcce1d3cce691a69f40a9fa57ad5c9064abf514c07b879cf40e87cf55c6e10768deb1b7d
+DIST fpc-3.0.2.source.tar.gz 39841597 BLAKE2B 0c5b51051e478a03edd689a74d759752d11664706e7c117cee68919758ba0bc074b0c288bcd6ba66bfd5895d1e72f2f0c03df3df600d02c1a3b66fc79b58070a SHA512 8b2540af910c31c96c4bf6bc546f7824b2acd9509fea76b5884370d8ebecd836c167a6ef98fac46b16278027cc15aa6a9f63fb72919e3a103408dc16416e43ae
+DIST fpc-3.0.2.x86_64-linux.tar 57190400 BLAKE2B 2d38ad274b51efaf8d07431607c0d4184af6d76628771535c16f9466f1d5619dbce1a6ddc5fb3249c7c2fa7b314435d111c3397a4759c094d51438b0e33c7d88 SHA512 fac103f3bf7fad5af9a435831f456c5dd7b546729f56c4b51b2a6dedceea27b331edf48024b4ec7993e50432332e8404ae63d64913d793e787756413c8d95417
+DIST fpc-3.0.4-doc-html.tar.gz 5658315 BLAKE2B 49f9e6f3848ad1aaad8b1621ffd5d2026590b3eed515b9bebe09c489cdf2d7170fcf7413794daebf3465190f5588317325b81d9723d824ab49c81db796f2f48f SHA512 1ebc8c5c5f213568dd24d50667c7939e00c33796c131db174ee93a4dc36122383e7d803cd280896c603eccfadc5bc3474b1831fa7f3e457a58fb3a045b8c33b1
+DIST fpc-3.0.4.i386-linux.tar 54691840 BLAKE2B c0951c85a3916c29e8e7391408da09abd86898a42159bfd7e637410ecf3e3a3f266a33edb5eb5ad458be92cf1fc7741eb249a512fe817a73a13207e216e0c0d2 SHA512 eee7528a69d5c745981efc90f571542047a5e6b4f1b391ad5341460035da5feffdfc4c38229134d23513239ccb33dcbc95354559e45746f1f6665541c60d0ca7
+DIST fpc-3.0.4.source.tar.gz 40347617 BLAKE2B 0764c92cc379d6e70a3f33368d96244ea0203b3395a5dbcadebe6ef51b508cbc7c112f9bc7bce69ae6dae1fde03bc9e45a1a8ad70ca154cc4dd51bc93cab82f9 SHA512 fc64fd94c39f220bd7531126d6281fa2141aed61c218595a7906a025660b46629a305ff7eb023f5e1359eafdec2dba69aa5405f1bbc3c1182414968689cbb52e
+DIST fpc-3.0.4.x86_64-linux.tar 56842240 BLAKE2B fda488466f409d4f50501ad17edcce2740f0a7e60ac86bbfec235ccc27c619d62d2aab01aa7878ba3e174c35fd46aab98e43eda4528e98fdf3e098330eea9b26 SHA512 085110d0fade11c4e6e79c002522080eb070cebb8ebbed48ca35e3a2dc025df678516e36c7cba5f951e20c0da57dd261d673dda6839ecdf5d88aa8dfe15a56e5
+DIST fpcbuild-2.6.4.tar.gz 55604643 BLAKE2B 5aa9aca60c98c68fd629479fb7e13cd16f3a080f67a2687fa81e7d3daee958f41c6935fec45568dcd9fc03317bc94e99867b9c9cdac9d80e8c25386f08b03a55 SHA512 7c48fb48a3742ffe533a8a172758071c0a1129ffac09231e6969aa1d31bac346dc764598b6ae78dc9d25585a788f6ed4f2b4c39502774d4d3620f09185b807de
+DIST fpcbuild-3.0.0.tar.gz 66934428 BLAKE2B f73e224ccd6229bc4872df09cf776443f262006a73d78151c4ac352d3f1f011885a4b82bceaf64d90ff901f425bfad94fa40f6a1da1a9bd298632ff5acffe7fc SHA512 d010cdc2dd2d4c6efe67cf005d0babb00c2a8ae70942c8b838bb690153ad72e52c0d7198eded7bbde8c77e64d28b2d7f5a220fdcd6117e5991cd11a24369d1f1
+DIST fpcbuild-3.0.2.tar.gz 68407379 BLAKE2B 7cc4ed1e629ae4d078aca9589ab7c8b600856818b92391045601b32c9ab8fc9017ec4715b5bcfb059948337f6fc96447ecef00ba8fabbe8eb656ef9393fcc3b7 SHA512 dfa4865d8166b7903914ac101e48bae9761671a77e37cbfd54c2ee8eb6b2ba0e5f3ac4b55867a2ead79499dbae68cc785db531385c5b77d533945c644a2f6fe6
+DIST fpcbuild-3.0.4.tar.gz 68908523 BLAKE2B b5c3936cf0b803aa2cc71f9c25ded470f207c540a1691cf3c2a9876c9e4eefd5c04f45b9f1f3ca17917b14ba4a90e0f16cc890b27024ff225d9d6bb25649862b SHA512 eedfeb4d25b3f4cb30ae9c8f30e0fec2405ef806fa565933cef7904d512f781730e3f023aea2f908c21250e3ced4f74fa780abad77b560728a88cedf591505b6
+EBUILD fpc-2.6.4.ebuild 4818 BLAKE2B fec6c01db8abe861604d94f66ca4cc33b3ddc39f888614f9fe77c3307e5cf8d751396fcbe839bf1bd12eb00498e69d3bea712de0cbd3f492f25c184cbb144f2c SHA512 a156ae004007332291a50847ec02ad3bd398da21571401ad8fbbc3ec164dc66411ca77edf109de90ce9f3cb6325fde171c522879ea6cb3f251eb9a0747c39903
+EBUILD fpc-3.0.0.ebuild 4228 BLAKE2B a182496b5445f605b00855d0b0da1f9a7f9280b0b8f5cdb9bb25eebadfe4839ca488ed6fc260bafb8d1c2542721cc2922e3be5fce66a1a9476ee191f01ae2bbd SHA512 557e48b626a1845231584e19aa55dd935c889630663416f29f133520bf5e1ae22504c8213eee86dc61d42a676a711b686aca9865100a440295654986f2d6dd5b
+EBUILD fpc-3.0.2-r1.ebuild 4464 BLAKE2B a7db8ce21cfe1c777498e754b276751c4910d87812c0497752d4a305dea3a4dd6ea28c7c8514e711497bc1fc1a6270d28c27bbb2815128f8ab2ed1e39b6f730e SHA512 7ee63fa4801074005b248a192f0905e8d146ab06cc43b797460dce60c1418aac4ac1600bb055c428766c36ee1f28db3ab18ea45ca1313684f2a275ec86b20fa5
+EBUILD fpc-3.0.2.ebuild 4251 BLAKE2B e9139fca9cf0628dde9b7a14da2f1ccae262b7e7486a8d77d1b06381ddb5d0582a89d9dc0e71edda29c30f4a3f9de81192364d130e3f2b2245d14341d354cf39 SHA512 b791aaaf9af69e00559de87f48f3c358ff3772dff3fdabc94c02b57d84265ad5df19b069ccb25a2cf58ef68408668f6720480ca697911f9faf1fd45b7687eef6
+EBUILD fpc-3.0.4.ebuild 4464 BLAKE2B 3d09be561dd2a2434bef2230fd738392f233b41bffdcfcb1d8cfe195ee9bceb2e94c18675693d36433f4d5daef2203e226a60249d4f5d14d390b869ece3e7cd1 SHA512 d33da4b40f1d52cb20cbc64b2a150d7d6c5ae4715724ce06d187e4729b40132ef5baabbee70e0a03fe8b5f2a46076f21cd66771f17307948935d784448e26d40
+MISC metadata.xml 385 BLAKE2B 0e0d050ec7539e841469fd1b2dd9b834e274c5acf63c6f5b38923271cac205d8680229e08dbcb931ed0b136f45800843ee21df6c7b670346b81ea988f1ba11b4 SHA512 1d1ec643e71bbaf3f38dd0f817aeba74f8871071a429b203b3b3397b114ef09e89cb5f166a08e7027e834f4f2ef6ad26049063a2d633ecbd65754945d0be1c46
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..c257c55db1da
--- /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 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/fpc-3.0.4.ebuild b/dev-lang/fpc/fpc-3.0.4.ebuild
new file mode 100644
index 000000000000..73c5e0930042
--- /dev/null
+++ b/dev-lang/fpc/fpc-3.0.4.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2018 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/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/gdl-0.9.6-r2 b/dev-lang/gdl-0.9.6-r2
deleted file mode 100644
index 3a5ee5bba755..000000000000
--- a/dev-lang/gdl-0.9.6-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare pretend setup test
-DEPEND=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_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/numpy[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] ) udunits? ( sci-libs/udunits ) wxwidgets? ( x11-libs/wxGTK:3.0[X] ) dev-java/antlr:0[java(+),script(+)] virtual/pkgconfig eigen? ( dev-cpp/eigen:3 ) sys-devel/make >=dev-util/cmake-3.9.6 test? ( !prefix? ( x11-base/xorg-server[xvfb] ) x11-apps/xhost )
-DESCRIPTION=GNU Data Language
-EAPI=5
-HOMEPAGE=http://gnudatalanguage.sourceforge.net/
-IUSE=+eigen fftw graphicsmagick grib gshhs hdf hdf5 +imagemagick netcdf openmp png proj postscript python static-libs udunits wxwidgets python_targets_python2_7 test
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=GPL-2
-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_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/numpy[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] ) udunits? ( sci-libs/udunits ) wxwidgets? ( x11-libs/wxGTK:3.0[X] )
-REQUIRED_USE=python? ( || ( python_targets_python2_7 ) )
-SLOT=0
-SRC_URI=mirror://sourceforge/gnudatalanguage/gdl-0.9.6v2.tgz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf virtualx 3a3c4637ea6d5a2113707a644766337c wxwidgets 04e063b0eff26daaea83d859dd9d6e05 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=e52ab26558597023a1d25963783ff4bc
diff --git a/dev-lang/gdl/Manifest b/dev-lang/gdl/Manifest
new file mode 100644
index 000000000000..ea8299447b64
--- /dev/null
+++ b/dev-lang/gdl/Manifest
@@ -0,0 +1,13 @@
+AUX 0.9.2-include.patch 314 BLAKE2B 44f0f36503f9e2e9e588ef78a6d27fac00d2b63f5220a791fc90ac40fa90638731ac1f0989227b74eb6ad893420b781ef4ba005b75adab6459d2d6393ba16e6f SHA512 3dc426de776f004b9c9840f37af0002907036b6f9d370535c51a2ed6916156d34d640214bec2dba58c9553917c16b996b61194bf15bb3e1c6f2b6f81edb13a4c
+AUX 0.9.5-antlr.patch 3059 BLAKE2B abf4380e73e846960143c8c7e25ff7a81c99ae98c06750c7479f39c93cd1ec476d9adb9f6714e9d72c6797aa663f931c4446a48f7f407ed61523877515d23691 SHA512 2d8d47162fc0179319b728041421a72c965657023e396285de5ec2849b667e21117a587c771b88eb84c54f983747cb1635b7bfb0955762af1912efa88128593c
+AUX 0.9.5-png.patch 489 BLAKE2B d83cf980353485b8210bd888d41ee27254f89d850a4fb59381f27ed9905a87c0ef6d49f0b79c1c2148ecc624544d59b49cc3a5f1ee48a05d607aaa9777f9c36b SHA512 6a7b09286fb62ad18b57434804260a6155c1f4739d72a9ed440c6efe1d682b126a297885d092fbf0cb1e2809a663cb9c7755507c807613199b317f981df7cfc1
+AUX 0.9.6-disable-tests-hanging-under-xvfb-run.patch 1884 BLAKE2B 193e24b0842996f00773b1eec164a2c57eb40decefc7c80048aebec7ad51d7decfed55ad352e8fa911c4fa87a4376de88d14b5b01fa88ce3378edf8234c1b5b8 SHA512 00e97be57c6e278814d9bab8f41c294475f5bae3dad682d288814cec153b27adf1f45257851620dfdb450a184f39b621d5d8fa0c407c612e06c8639454c8f5f7
+AUX 0.9.6-fix-file-move.patch 639 BLAKE2B 664ced9bba24646ec2149e51af67866ed46ebb5941f2b9ab0a62b157088937549131d3fffb8abef60d85644feb8928030ad55e916af4d03059cd803415ce517e SHA512 761266807892aca4d9e8031ddf75b8066d364efc63c624151f6929ac74ee0d43dd4e7e189ba754bbb6d2b134f390f67fc919b33f0402ef8a221801ff678fb78a
+AUX 0.9.6-fix-python-function-call.patch 987 BLAKE2B 3cae08850e5a6ccccf90c072e9d965cbe79fec7c8a8234a1014f3264a9df30c2c43aa238519f3ed068cc7cab2e8344eecaddba574e2573bdaad8224fa36e290a SHA512 f75c8bee4dbbbdff6fbfe5fa5d41cdfda2acbfd4806e3233fb4d6b499680ea9e9653461a1f6686bf44738fa26fe49d22e14e6bf0e857fd9713655e9763103680
+AUX 0.9.6-formats.patch 4241 BLAKE2B 8513efa84b2f8b4f2a06ee0784df6e7194b59f321a95c00151eaf02caf92611baf2b92de7a5c520746718c802919b6e985774df67736c5fc89bd4b243d590612 SHA512 7f947b0a13d7a1f56df311ced9673cf9b85a77f351164a4162d386a35a5022ae4f914216a2d801b0a8a7e52341318d498e480cba1f9959b08500753150a6da07
+AUX 0.9.6-fun-fix.patch 2064 BLAKE2B 45d2f76e437cbd557460a51a6fd49881a8dde5c200b829dc3ace4a3f6483c74e5c528d57f0aae261bfe042d015ddab3fa8c2b773c6c911be8d105977db394d59 SHA512 e3bafb4803541442c39f35370cedf3e2a2dd4502f2011c72ff92eb9f1f846362e560da69ac60914c71fc0c759e186368cae644b6eff9baa78c057cee70d08bd9
+AUX 0.9.6-gcc6.patch 1255 BLAKE2B a529b29d007a0b71f1a1f2ecfc0940d73696ba97dc2a48bfd3be995d3d9e37b788b1fa6c1d13a7c63f2c5dbe2b07accfd86766f56f495f984baf0acb7ab6f27f SHA512 870231a918cd2d114ac31973bbd2c53733c3e64811c48eadf88c78f82a353aecf4d604e28dfa3a532efb3b0480e5d7209e8fad1fef793212027e89f53608c619
+AUX 0.9.6-python-use-path-and-startup.patch 682 BLAKE2B f4a3f07c7757e297a8a40056aad3f36705f035f8ca63dfd0d8c75dec15953b826d8074fbbf1b698ec8d9c92a4e364993c2eced1df3c86ef4a3915a17b2ed65ba SHA512 f6e20eadb6acfd3805d5f41bba8d90e9dba5230211577e0b47217638b97745dd921c657dad7adf935abeeb9316989554858976d915f14b79dc2082eb132f9418
+DIST gdl-0.9.6v2.tgz 1777167 BLAKE2B 4d92ed93f12e0979d591959d60ae9fa6785400e4f169a00f462103d263bce1aa02e615cc8467b53146791a12045850f9dae1da113f9caff4d6b44dd2a5798b3b SHA512 a816ee2e3822af380a1131a6138263c33560db7286cd699b864da305a1103d5afc881a1cd3574d2e243bfb7e65e759e46322c5e55c66ec15620d9c514565c2c5
+EBUILD gdl-0.9.6-r2.ebuild 4144 BLAKE2B 3c0b4a570e1d14073db119dd9d963f6d712128f5874d913cd25e16cc24cd49b281cf449692e1fa352db4cbd60d9566287aa6869aff1ddea531388d5d477bbc18 SHA512 11936edb8d2c9e3ad3ae4ac558297e377acab2616d0af61ebf1d862034aa7ad0f1c776cc295bd61e5df7f1a0339bf70a5daeb1a19b6996407b609b6b7d994b44
+MISC metadata.xml 1136 BLAKE2B a07948bedd03ce838015d52e74c746dab2a6d4818e7e2250281614635fad1bd2f5abed5f7f0b98f1e89071f13eed69bb20862f33b1d47789f1001bdddb03a43b SHA512 acd4e5a62c2b16ea23024e86352c7d8dae76177dbfe0b855808260fb14fbffb130f0329092bbef8cd90f1465d72789ba1806c45986e8ebf7c491b4b8b7a5981d
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..3257bdf3c4cc
--- /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-0.7.3-r1 b/dev-lang/gforth-0.7.3-r1
deleted file mode 100644
index 116974b0f849..000000000000
--- a/dev-lang/gforth-0.7.3-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm
-DEPEND=dev-libs/ffcall emacs? ( virtual/emacs )
-DESCRIPTION=GNU Forth is a fast and portable implementation of the ANSI Forth language
-EAPI=6
-HOMEPAGE=https://www.gnu.org/software/gforth
-IUSE=emacs
-KEYWORDS=~amd64 ~ppc ~x86 ~x86-fbsd ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris
-LICENSE=GPL-3
-RDEPEND=dev-libs/ffcall emacs? ( virtual/emacs )
-SLOT=0
-SRC_URI=mirror://gnu/gforth/gforth-0.7.3.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=1970e757bbb7a30bb0b3dfad5ecfccd7
diff --git a/dev-lang/gforth/Manifest b/dev-lang/gforth/Manifest
new file mode 100644
index 000000000000..325a3820aaf3
--- /dev/null
+++ b/dev-lang/gforth/Manifest
@@ -0,0 +1,5 @@
+AUX 50gforth-gentoo.el 200 BLAKE2B 1e3faf9b1c8cee5644e49941c0ab46d1f9a53911c50bee6f79f155678c432ce2c0ee27355496d75c489ca61fe2fac74441142eaccd563a4b5e0e426889aa8b30 SHA512 4bb26614777a8147d3bc869ee5db4ebbb594aaf7456c315e077a982dbb9f972cd15ddb977515036ca07594995b623cba35daade1abfcd3a2cdddac7ffbdf4027
+AUX gforth-0.7.0-make-elc.patch 437 BLAKE2B 614b8b5a718be0f3cf3802b75ac38e845b3583dab6d8554c9ba08b1768f3818ed760e1b69389fd3cc99418ac30c5579c29491a43778e5cfcfd5f41eeb39e3e20 SHA512 d4d2c0eefe6ecc0fdc8c58147262324292c905e3cafb360a5d7c4e6eac92798ec416fffae21834f9d29c1e9117a500891285e6a0ff5405346d4a5e63c10f1bce
+DIST gforth-0.7.3.tar.gz 2523433 BLAKE2B 1ba9095af7958aabf0d671f982c483f2046392fd9872678a58f314357875d286bee7f0d7bc38e9b21331acda80fd285c0489fed44d59c148ff6ec6b6bea7c174 SHA512 f034234acfb0fc727f28b564432219a100b916c6df4b847794a55b2fc3b8ed8714eca6de0df67c7c427b7c2bb4dd00f65cfd34e6eb60181e41ab84fea30304e4
+EBUILD gforth-0.7.3-r1.ebuild 1085 BLAKE2B 6d91cd7dc5bd6ebdd9664d4c75f36c8db579b95171019f33aaba456159c770c88835edb56902e230d6dc3bf30a949b4758ebc75dd6b77191953a959c8ef4f7b9 SHA512 69326fc0a428809f4ff7b4623acc081875d259df3ffb17072cbba893423ec1287b2d2594e187f58ac551ccce62406037e7c08ad5b75ae1a48efc91f482fc8c9c
+MISC metadata.xml 251 BLAKE2B 9785c4729d0751280d104965bab25a268219a7fee217dcd8c01a5642a13f8abc471a3dff54ae0d34d3cf3dc8267fb483d93bd3b16aa3617e8fa8e9abd1703dfe SHA512 cc2bd3977894946ee4ea5b739cc3998bcd6017b9e7a52aa501409d0988954339a9a22fe751d0a5e967ddac9225d9b23f20b4fb1e2c62ee91d1d23c383d9776dd
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-r1.ebuild b/dev-lang/gforth/gforth-0.7.3-r1.ebuild
new file mode 100644
index 000000000000..c1d32de053d1
--- /dev/null
+++ b/dev-lang/gforth/gforth-0.7.3-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.7.0-make-elc.patch
+)
+
+src_configure() {
+ econf \
+ $(use emacs || echo "--without-lispdir")
+}
+
+src_compile() {
+ # Parallel make breaks here
+ emake -j1 || die "emake failed"
+}
+
+src_install() {
+ default
+
+ 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-7.10.3 b/dev-lang/ghc-7.10.3
deleted file mode 100644
index 17be89ff06d9..000000000000
--- a/dev-lang/ghc-7.10.3
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare prerm setup unpack
-DEPEND=>=dev-lang/perl-5.6.1 >=dev-libs/gmp-5:= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:5/5 ) 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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=The Glasgow Haskell Compiler
-EAPI=5
-HOMEPAGE=http://www.haskell.org/ghc/
-IUSE=doc ghcbootstrap ghcmakebinary +gmp binary elibc_glibc
-KEYWORDS=~alpha amd64 ~ia64 ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux
-LICENSE=BSD
-PDEPEND=!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )
-RDEPEND=>=dev-lang/perl-5.6.1 >=dev-libs/gmp-5:= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:5/5 )
-REQUIRED_USE=?? ( ghcbootstrap binary )
-SLOT=0/7.10.3
-SRC_URI=!binary? ( http://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3-src.tar.bz2 ) !ghcbootstrap? ( alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.10.3-alpha.tbz2 ) amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.10.3-amd64.tbz2 ) ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.10.3-ia64.tbz2 ) ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.10.3-ppc.tbz2 ) ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.10.3-ppc64.tbz2 ) sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.10.3-sparc.tbz2 ) x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.10.3-x86.tbz2 ) ) mirror://hackage/package/binary/binary-0.7.6.1.tar.gz mirror://hackage/package/hoopl/hoopl-3.10.2.0.tar.gz mirror://hackage/package/transformers/transformers-0.4.3.0.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ghc-package a0d34e2f5f204f01c404ae1ce539542a libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=87dc538a2f60c924065ff54499460b98
diff --git a/dev-lang/ghc-7.8.4 b/dev-lang/ghc-7.8.4
deleted file mode 100644
index 54b6ec815f8b..000000000000
--- a/dev-lang/ghc-7.8.4
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare prerm setup unpack
-DEPEND=>=dev-lang/perl-5.6.1 >=dev-libs/gmp-5:= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:5/5 ) 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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:5/5 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=The Glasgow Haskell Compiler
-EAPI=5
-HOMEPAGE=http://www.haskell.org/ghc/
-IUSE=doc ghcbootstrap ghcmakebinary +gmp binary elibc_glibc
-KEYWORDS=alpha amd64 ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux
-LICENSE=BSD
-PDEPEND=!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )
-RDEPEND=>=dev-lang/perl-5.6.1 >=dev-libs/gmp-5:= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:5/5 )
-REQUIRED_USE=?? ( ghcbootstrap binary )
-SLOT=0/7.8.4
-SRC_URI=!binary? ( http://downloads.haskell.org/~ghc/7.8.4/ghc-7.8.4-src.tar.bz2 ) !ghcbootstrap? ( alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.8.4-alpha.tbz2 ) amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.8.4-amd64.tbz2 ) ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.8.4-ia64.tbz2 ) ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.8.4-ppc.tbz2 ) ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.8.4-ppc64.tbz2 ) sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.8.4-sparc.tbz2 ) x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-7.8.4-x86.tbz2 ) ) https://dev.gentoo.org/~slyfox/distfiles/ghc-7.8.4-ia64-CLOSUREs-regenerated.patch.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ghc-package a0d34e2f5f204f01c404ae1ce539542a libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=fc608dca17fa889db8a5be9f45f698f1
diff --git a/dev-lang/ghc-8.0.2 b/dev-lang/ghc-8.0.2
deleted file mode 100644
index 87d8cc063936..000000000000
--- a/dev-lang/ghc-8.0.2
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare prerm pretend setup unpack
-DEPEND=>=dev-lang/perl-5.6.1 dev-libs/gmp:0= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:0/6 ) 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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=The Glasgow Haskell Compiler
-EAPI=5
-HOMEPAGE=http://www.haskell.org/ghc/
-IUSE=doc ghcbootstrap ghcmakebinary +gmp +profile binary
-KEYWORDS=alpha amd64 ia64 x86 ~amd64-linux ~x86-linux
-LICENSE=BSD
-PDEPEND=!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )
-RDEPEND=>=dev-lang/perl-5.6.1 dev-libs/gmp:0= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:0/6 )
-REQUIRED_USE=?? ( ghcbootstrap binary )
-SLOT=0/8.0.2
-SRC_URI=!binary? ( http://downloads.haskell.org/~ghc/8.0.2/ghc-8.0.2-src.tar.xz ) !ghcbootstrap? ( alpha? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.0.2-alpha.tbz2 ) arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.0.2-arm64.tbz2 ) amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.0.2-x86_64-pc-linux-gnu.tbz2 ) ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.0.2-ia64-unknown-linux-gnu.tbz2 ) ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.0.2-ppc.tbz2 ) ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.0.2-ppc64.tbz2 ) x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.0.2-i686-pc-linux-gnu.tbz2 ) )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ghc-package a0d34e2f5f204f01c404ae1ce539542a libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=a5b615e6c522f70ca09983a9ec1f9723
diff --git a/dev-lang/ghc-8.2.1 b/dev-lang/ghc-8.2.1
deleted file mode 100644
index 6a14b52c9278..000000000000
--- a/dev-lang/ghc-8.2.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare prerm pretend setup unpack
-DEPEND=>=dev-lang/perl-5.6.1 dev-libs/gmp:0= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:0/6 ) 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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=The Glasgow Haskell Compiler
-EAPI=5
-HOMEPAGE=http://www.haskell.org/ghc/
-IUSE=doc ghcbootstrap ghcmakebinary +gmp profile binary
-LICENSE=BSD
-PDEPEND=!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )
-RDEPEND=>=dev-lang/perl-5.6.1 dev-libs/gmp:0= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:0/6 )
-REQUIRED_USE=?? ( ghcbootstrap binary )
-SLOT=0/8.2.1
-SRC_URI=!binary? ( http://downloads.haskell.org/~ghc/8.2.1/ghc-8.2.1-src.tar.xz ) !ghcbootstrap? ( amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 ) x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 ) )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ghc-package a0d34e2f5f204f01c404ae1ce539542a libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=e70e31eb35104195802dfb783b8457f9
diff --git a/dev-lang/ghc-8.2.2 b/dev-lang/ghc-8.2.2
deleted file mode 100644
index 7d623f0cd6c0..000000000000
--- a/dev-lang/ghc-8.2.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare prerm pretend setup unpack
-DEPEND=>=dev-lang/perl-5.6.1 dev-libs/gmp:0= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:0/6 ) 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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=The Glasgow Haskell Compiler
-EAPI=6
-HOMEPAGE=http://www.haskell.org/ghc/
-IUSE=doc ghcbootstrap ghcmakebinary +gmp profile binary
-LICENSE=BSD
-PDEPEND=!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )
-RDEPEND=>=dev-lang/perl-5.6.1 dev-libs/gmp:0= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:0/6 )
-REQUIRED_USE=?? ( ghcbootstrap binary )
-SLOT=0/8.2.2
-SRC_URI=!binary? ( http://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-src.tar.xz ) !ghcbootstrap? ( amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.2.2-x86_64-pc-linux-gnu.tbz2 ) x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.2.2-i686-pc-linux-gnu.tbz2 ) )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ghc-package a0d34e2f5f204f01c404ae1ce539542a libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=af30fc285821b5160788e8be56ad6829
diff --git a/dev-lang/ghc-8.4.1 b/dev-lang/ghc-8.4.1
deleted file mode 100644
index 1ef060e091c5..000000000000
--- a/dev-lang/ghc-8.4.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare prerm pretend setup unpack
-DEPEND=>=dev-lang/perl-5.6.1 dev-libs/gmp:0= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:0/6 ) 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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=The Glasgow Haskell Compiler
-EAPI=6
-HOMEPAGE=http://www.haskell.org/ghc/
-IUSE=doc ghcbootstrap ghcmakebinary +gmp profile binary
-LICENSE=BSD
-PDEPEND=!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )
-RDEPEND=>=dev-lang/perl-5.6.1 dev-libs/gmp:0= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:0/6 )
-REQUIRED_USE=?? ( ghcbootstrap binary )
-SLOT=0/8.4.1
-SRC_URI=!binary? ( http://downloads.haskell.org/~ghc/8.4.1/ghc-8.4.1-src.tar.xz ) !ghcbootstrap? ( amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.4.1-x86_64-pc-linux-gnu.tbz2 ) x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.4.1-i686-pc-linux-gnu.tbz2 ) )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ghc-package a0d34e2f5f204f01c404ae1ce539542a libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=6a73b2c94375d9bb29aad201c59a213a
diff --git a/dev-lang/ghc-8.4.2 b/dev-lang/ghc-8.4.2
deleted file mode 100644
index 613dce17e836..000000000000
--- a/dev-lang/ghc-8.4.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare prerm pretend setup unpack
-DEPEND=>=dev-lang/perl-5.6.1 dev-libs/gmp:0= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:0/6 ) 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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=The Glasgow Haskell Compiler
-EAPI=6
-HOMEPAGE=http://www.haskell.org/ghc/
-IUSE=doc ghcbootstrap ghcmakebinary +gmp profile binary
-LICENSE=BSD
-PDEPEND=!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )
-RDEPEND=>=dev-lang/perl-5.6.1 dev-libs/gmp:0= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:0/6 )
-REQUIRED_USE=?? ( ghcbootstrap binary )
-SLOT=0/8.4.2
-SRC_URI=!binary? ( http://downloads.haskell.org/~ghc/8.4.2/ghc-8.4.2-src.tar.xz ) !ghcbootstrap? ( amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.4.2-x86_64-pc-linux-gnu.tbz2 ) x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.4.2-i686-pc-linux-gnu.tbz2 ) )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ghc-package a0d34e2f5f204f01c404ae1ce539542a libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=d01224da03d360b81dccfa6a8eb74148
diff --git a/dev-lang/ghc-8.4.3 b/dev-lang/ghc-8.4.3
deleted file mode 100644
index abad7b70d8d8..000000000000
--- a/dev-lang/ghc-8.4.3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare prerm pretend setup unpack
-DEPEND=>=dev-lang/perl-5.6.1 dev-libs/gmp:0= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:0/6 ) 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? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=The Glasgow Haskell Compiler
-EAPI=6
-HOMEPAGE=http://www.haskell.org/ghc/
-IUSE=doc ghcbootstrap ghcmakebinary +gmp profile binary
-LICENSE=BSD
-PDEPEND=!ghcbootstrap? ( >=app-admin/haskell-updater-1.2 )
-RDEPEND=>=dev-lang/perl-5.6.1 dev-libs/gmp:0= sys-libs/ncurses:0=[unicode] !ghcmakebinary? ( virtual/libffi:= ) binary? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) sys-libs/ncurses:0/6 )
-REQUIRED_USE=?? ( ghcbootstrap binary )
-SLOT=0/8.4.3
-SRC_URI=!binary? ( http://downloads.haskell.org/~ghc/8.4.3/ghc-8.4.3-src.tar.xz ) !ghcbootstrap? ( amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.4.3-x86_64-pc-linux-gnu.tbz2 ) x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-8.4.3-i686-pc-linux-gnu.tbz2 ) )
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ghc-package a0d34e2f5f204f01c404ae1ce539542a libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=b29c3d5fce15a1cdccbe23dfad78ecaf
diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
new file mode 100644
index 000000000000..fc4897ec0e3d
--- /dev/null
+++ b/dev-lang/ghc/Manifest
@@ -0,0 +1,88 @@
+AUX ghc-7.0.4-CHOST-prefix.patch 276 BLAKE2B 77c706d291928a229edad6bcde37786b2c11cf52f42b22f44d3bbb7cfe12f83b8725cae020f95994e0f12022989b125d1f1e6f43ad0cc6698452264b8634651c SHA512 9d5d30b95c0467bb77f320c82458be5eaace5bbd77684725b9f3fd70d9640accdd771e36aa957c66f9bfb01e45088d32a5f811444b472058574ccbf89e10efbb
+AUX ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch 2648 BLAKE2B 82145d17ff3f7535b80b76d98a30355895d1a43ab9cd5cab1606f989764f77b5b00d8d098ad327bfb6f3318ea8d188fcd55bcba15789234fceb0de5c132e9cbc SHA512 ea2c9cd8fde754803950e29b2eea113227ca5504c58392847090e13640bdfa6b39ef714eff985947aa27e66c2506ef2a2867696f68a7ff34418a7fbf49765d48
+AUX ghc-7.10.3-hardfloat.patch 747 BLAKE2B e2a328372ddd113752400957aa697d171b3367693c3d098c9b5b8b02b9e1ef1cc0cb86c2af4a0385a142791b4e7efbf4c7d64835f7e296a03abff2fccc9e9ef6 SHA512 a9a186ff62236d63b4b841bcfb1da1a902b3f300eb7d768c5316b5d636190d58fc71177f2d1670df261d0b681b104621f98cfdd76b30a0fb6917525874759264
+AUX ghc-7.10.3-relnotes.patch 1584 BLAKE2B e247668b1fb2a5b8ff69b00f31b8b642a7ba47cba0cacf9ac254b08cd736ee0d5276e77f64665ce37d8d85250c7cf4cc9924c86e21b35a3abfffded45b72ae9b SHA512 20d61d9f73bd0efa39c920897bdb18b69cff453f5ab24193aa3f7fafa70a9aa346ab4402604f81471f989c2401ca28d901fb85b8862577790559a35cfa3d3f05
+AUX ghc-7.6.3-preserve-inplace-xattr.patch 495 BLAKE2B f9f32485af27b76d62466bc03a17826e18efa40a87858a46b41d4f094e1c0989d2773ddd92e206d4285ae1791bf00daaabd4f19dedcd80610db1127b440394fd SHA512 98504e3b72446607deb520521c4abdd15e41e4ff69ad64e2ad13faca396bd7c7784b92c2bc7b5d8190668da480d5b1dd886f5e47e2e192d76b7fbbd58a42d44b
+AUX ghc-7.8.1_rc1-libbfd.patch 2771 BLAKE2B 8730551d3900012d04eafed69894740f603618ae59bef59e71194efb5b1e417799647c4aa1cda4cea9041504d116d74085bb99b0e9f0c543d2429529e030faca SHA512 e232596342675769c6bf97686aff0fa7a8991e1edd3bf607068482cd0d0c9f9a9500e5b15f176a2025732474c9e547c0bae603d373c81b374c96787d46bbfa4a
+AUX ghc-7.8.2-cgen-constify.patch 1173 BLAKE2B f61bef77e23e47becb8b5f99e8cfdb5f4e8858787da21b62215f5538c02d5c8d92bf58d29b080468c81d8b732dafa34969e5138df7c113e2e805c7b4e4ccdb1f SHA512 3e1bca7d7f9062d231c45a6765485291871df833da31b0a5573bb04639791c554dd5c0d8fe33bab05455fe06d3f36fe81dd1db6d3819c739284a3af5c4ec8fb0
+AUX ghc-7.8.3-linker-warn.patch 1317 BLAKE2B 399c117a216cbeff9d863893ef821b965d91428e55b447e72469ccc6940d0eccd4bca33f2ceaaea096de23789e74ca7ffe38a5fdd08005bbcc016c06db4ec8c2 SHA512 3b0ece4a6536ef43f15e97e723d036401dcf41d47c15e29dd8fe30c9f1563894102922617982db7b6c7cf3ed8aea64458b540ef92ffe690ff72994b1246834c9
+AUX ghc-7.8.3-pic-sparc.patch 1007 BLAKE2B 64a1214b1df6cc2d894e898dc21983a3df17da95f6ace2b7dfb2469ca62bf10b548a65c6242bd97e63a70fe7ae6e921e3e5828b664fa1ce04d10323fd8a4dfa6 SHA512 d3d81142a1e606c85c22127e2fbb26ceaeb2116435bf0bbc3743273577f04991e28c38a375a78b3f633a9b0e25f10951146d1f322e0ad7972089c1e5d977d16b
+AUX ghc-7.8.3-ppc32-fPIC.patch 14549 BLAKE2B 05811de54b2896c75456a0f61c64325fd347ccd3a47f86d7e9697d04266f11af0b3f3b8081b39318e8d90d76e3f763ad292adeb0114d8b7bf60157b5a90b13a1 SHA512 aa6f13e04a52e7f25db456c02031b63c01b71adf41262361b36ca97aec18965f618ebba73494b4283ad3c0224f15d5c80dbd43076553e604d86a07baf7fa86db
+AUX ghc-7.8.3-prim-lm.patch 444 BLAKE2B a930bb9657441a48941debf79711e06223c5680df0f60d7d972e0150950109bf8f8a99c35c7dbcda21172dddcb15d8a379085813e44647583e3888f27f597568 SHA512 6979e002589a54c870c70eee8357dad4feb55b4e5102350cc09a466145677dacaa1bab5ebe4818cf0d3cd8ab50ee0ec2ab642ab0fb3fd34f4a266e5e90f9f389
+AUX ghc-7.8.4-gold.patch 1025 BLAKE2B f62a45f9761690a685217654e45c037c63e2cf0ae297f14f3c70c038c4b02e048899b1a787fedfd30fa4e41839f729d20c2442ec3410fb59508da57222ac19fd SHA512 3087084d8b6a202496fc7ac71fadde06f7d1622d0e3f44f1b52fd04f1451d690f54b6bd8ee0da85663d252c6110340402bd1864f746117e59ce7b02e0247ec94
+AUX ghc-7.8.4-ia64-CLOSUREs.patch 2243 BLAKE2B 7bfdd4f42917a7b856ce18b85a2131bc0b566151fda16a77412331f38a4465efa080f6aa3eb52cfe12fb9c2c3fdefc1fe4a533fa5b339f4f22ac70c2a4a404b1 SHA512 9981d13f294fe0a28d1cabfd4db98bfb18110c6adb390f509667e3166a931c7d9f7b4b0079dfb1a22c174556944fef62f0e67ec855a9c3bccc5b54b0d0952c09
+AUX ghc-8.0.1-limit-jN.patch 1896 BLAKE2B 3acabcf982c0520d628d502cf2ddc01d6fda8ead7341d8f0341a309b4cc314d01b4e9237afe810b5265b7a952c847e605dbc3fb2e35d76a35ec2c832cc7653f3 SHA512 5eb69e0d5f87e326da82f018f0466a62e307f3acec47d991c7735ddf828c98c836dbff5d8164a4dfd08829b36a9d573828b9553fe89d65f5ac6be6c0190a110a
+AUX ghc-8.0.1-par-g0-on-A32.patch 2276 BLAKE2B da7f6dd5d68e911886448afe04e3d0da6cddbdae686e040e8b060ade871075b87e464cf350f1272d33a7ee16e8e73cfa2d7f4c64ab7540980c0283b898817602 SHA512 0aab32a6f289c2a4e83bea2479c04cbd226f3399b5cb4a8a596ed756769a1b29bbbad261d7006c28ab56faa48c1c02e9e52cd35a7bba56ccc87f49ac1d17b0a5
+AUX ghc-8.0.1-ww-args-limit.patch 5212 BLAKE2B 1079855da7599a83d6e950eb1caf40da4bbb5b856746dc7d2e2e50651071e3acca45773cb0f1db35a6c7c9657ffd40c911ae4c1085b9e33ba4ab815d1773a8bb SHA512 5b3e34f52406649dca1cb3079565cfd068872387956dda296902c2e1ae8a092be0e70a1fc1d96f0e578fef0b82ff48b655d35a1e21911484f04d34809b295428
+AUX ghc-8.0.1_rc1-cgen-constify.patch 1185 BLAKE2B 3fc5807f31cbb5c30ec5782d27539987195bd83a6be28dc510568f0cc2d4d328cada1f111838e1ac79a3790ee197a4fb5cc41c040fbde66ca279c1fad01f9f5c SHA512 338c887a643b31ce6df2cbc28df03d1b98f48ae6b66afd0440cde7fafdc8ee51520f18c7f026645c3c995f106f78f451733b80abcdf8d4e4c3e9fcbcea597394
+AUX ghc-8.0.2-O2-unreg.patch 1203 BLAKE2B fd0ec53968fec2f4415a367c729b9b69e15f6e2c76f8ec39d6b3de24fdb0de0b9c87559b04f8b1031a05fee8a653c5f0b2ec09064f43eb9a6afaa8cf4f179e8d SHA512 0d0252bb7c49cce2a38fb81673e6f6a6aad16728f66be6287f5a765064ebe5e5fa43f30f247fecaadc7fdd07af416522e5eb28656b3220ff3832ef8164c94019
+AUX ghc-8.0.2-binutils-2.30.patch 2115 BLAKE2B 5affd1954283773ab1f4717b5cc735f864db9ea3eff3f859cff5548b059ef00e66230795aed8c3866f8b839d74e24bc5d767bd73bb928bf19c1bcd17acdfde5c SHA512 d7542cbf8ad2ccbf6a3b5f50125c98521f10872e319043eb048c06ffc416c6c835772190d58f6a09d10e55942168ca9588f3f1bb1cb835e1c1993a44403329a4
+AUX ghc-8.0.2-libffi-alpha.patch 2133 BLAKE2B 596410d5bead5a3c5f1f4a1e33a767bf2ade92204e469652e3ce005dd275a54e0e084799af2967529008654f4c45148b955e5e0b299a48cd5e78cf1c209e3d7c SHA512 77964b82be47219d709ed4b79ac255c4762986decadef2d65d6643cb2d1b6cb0f3210cce1bd46bc16b6e6c51a4aabc73c5bc5e1bdaa8797a5f23033194f91a4a
+AUX ghc-8.0.2-no-relax-everywhere.patch 766 BLAKE2B 76ca925d56a9d2961cd342971ef8fb0165158d707f0089f3726560511e57ee5c08adeaf996595378d1cef3ec7b59ddf1df06d0255bf20da51c5b26e817f4057b SHA512 b729ddc27bbf089324f0b4d7229925226b59c0047cec0c0230e022fb8554389373e309e93a108f0aaa155fd9ff6957a7d41cdd35a90c6ca59b216381ff21483b
+AUX ghc-8.0.2_rc2-old-sphinx.patch 434 BLAKE2B ede17cd4e5848b452edeaa3b429a7485f324cf1c9133098c7d9f84a22816eedeaf55143fea082e514b5e987ca40f65b68a476060e0c18d19bb5f8b5b993fda92 SHA512 fc8fd8d40c70a77a3aecfbdb0993bee9ef1582402b7220ed3066e1c6d4bc480c5b569cab44b58b3c54d1e68f506dc5b86ff87518d744a5a846d4de6cb1093db2
+AUX ghc-8.2.1-darwin.patch 910 BLAKE2B 2f1a44dd7ead59301b5dd59c8cab932710655416640f2c8d5273cf07da4a45bf702d840768e2d32822e89f1b07cc9ed3a6110e1847e11468fca5c515e9e26f70 SHA512 0177fda8717d9158a99d96853feb1bf40ff13df8f5c5669c7c48f33accf69d6ddb05876776cda66705e85ee56c5ecff8f81722d8e748b6c2ed6b9bf611e42a2c
+AUX ghc-8.2.1_rc1-cgen-constify.patch 14371 BLAKE2B 96f9607cf857bb113b475d173a62998f2b0424f09f14c20ae3cab8497a25ab2df7523850f46e3b2867dcd75a499b3487345376b7cdd8e6f4a5e8008e160cf3d0 SHA512 8715c2f7c497eeefffd13b578ff718f36ec22bfe397501f685db0c781c614ebaa1178a9ca7550a722876d1cf9ace39aaa44493ecb934a828fa5010471672acfa
+AUX ghc-8.2.1_rc1-ghci-cross.patch 2828 BLAKE2B 89776c87d4ca8c0b74f0d7ef11680d2cea217774389bf297df1a61f9d95ea515b5f9d44387eac7715fec59d9c91e91bd06215c851c94f091c05b03f84d0b8699 SHA512 55e8f2e6bf69ff26976005e0b89c400df9facda5eb974f7340af89625361adce48371616a5d292dafbd4d98cbfbc0b656d36749f2e16918b275a0469ed88cea2
+AUX ghc-8.2.1_rc1-hp2ps-cross.patch 3865 BLAKE2B d68b1e15c091047d086be780dc0bb5ce2a1b713244ee240ae045052ccac947baf6a5bdea8cad50d0fac2984700069af7dcd320b96ca09af8c7b81021329da41c SHA512 d2ed48701216f5c03567e61c207e32d6218009380941275c690edd8eb0197728e7e3c0edb00d512792dc2041a958de82ceef393e96d3324b690157162e28d29a
+AUX ghc-8.2.1_rc1-stage2-cross.patch 2986 BLAKE2B c50b502adca0730fc382831631851c61aeb067bc9f7c028d983bc9b528c22fe75839e63589a714f06c848e72cffb77d4c80d6a617908e7bbec87166652a38624 SHA512 7dcae0f9ff090e521befc9aa593a674ae9175ec07ebab91bc5a72097be509a89de12bf7c959870b12219074919eef115096b74f78e7cef00360aea32126ec8fa
+AUX ghc-8.2.1_rc1-staged-cross.patch 1605 BLAKE2B 5b5f203e17912396539530f40c5a93f72f1982a07ee8eb2b367d6b02ca82a2b41ac38d06e8694abe226da7761f169822b74c8c3ed1025a55bc2dc61214fe8996 SHA512 d9005f0310002f87972b0db8484b714d15664209b41eb84ce26950c4a19e854203e9b78e959755ec65a2a50a73bbce4999b39a3ad4da844cfe65098e65171450
+AUX ghc-8.2.1_rc1-unphased-cross.patch 1066 BLAKE2B aa29454f12ba0073779df08885c587cc5ef5ef21d72247d52b9f71bd455ba5fd0c01b144f0cf071e712c5e60c5ff1b96afdaad6c701fbaf8b7c418dbcef54efe SHA512 24b9b864e984cf3e34c2a23e0ba24a7f2c961dc590c6bb8e6461afeee7bc4a6361e5bbccf17754486c81136b60e12ae7e9ed06f485ef2f178084bcb2caa5edd9
+AUX ghc-8.2.1_rc1-win32-cross-1.patch 4535 BLAKE2B 546af93363a16fdcc7dc7b4167b30e81fac5dca126fac8d1421632d4fe9d2c3803f1a2ad3bedb7e270bd442e2ca95f99d18ec8d17ca9633079c6d486c6ec9ee2 SHA512 16e8be604af1e856bcec0603caa9d4fa66d5e4773a68fecaf4a57f509cd241cc7fb37fb9705d253e28d871ce2afc942e940ca171b45d41715acae5ef6e0fde8b
+AUX ghc-8.2.1_rc1-win32-cross-2-hack.patch 6231 BLAKE2B 8ad4428ebe9a373e08e94e5373ad9578cafdf95b866ced2a4000434d9e5d4298b129e832e13e8e175e8977b9dda9351d01a896e2c320a1a40551d5892b0efc33 SHA512 8617c1346ba7aa2b41ee01feaa47f2ca477353f9b825be48c5d3505a134e0a80b613efc6cb92e7fbd3fe062e77450e197c826151a42c0c77177fc6ef8e65287f
+AUX ghc-8.2.1_rc2-O2-unreg.patch 1199 BLAKE2B 7f3fe4b40e026736a3f1c58336274b49eb2cbbdf06c20ccced7cc83fd740128e4c30716cafbb251abe4d963ad224d3c406ec9f66b4b980af5f5c523f01136722 SHA512 708f68234f3678af3d41e7a50f9b914030536aad081b1a09a6169b12ed61ffd9db207a03f8f73d1761a93c5f2a21e92cdc23475501f96cac3bf98b046f3a6dba
+AUX ghc-8.2.1_rc3-any-vendor.patch 1288 BLAKE2B ea451228b0304d35ea1047a997e26efba4eab4159b8f84fac833a8561682be15b38734434459d17a02bac8da5df97c957a7f76091c5393dd87121c3ea599c1ba SHA512 934d6d91a434ef1ec8fbeb8b13f7a20b0654a97df05d10e8d4f577567b5a0498eed484261bc1348926e112c6d4429304f74f10e4ba819120cf5840e9dd2d8329
+AUX ghc-8.2.1_rc3-stginit-data.patch 1179 BLAKE2B c67a01bf0dc9b04334592b85ce8c238d34096857759a47d37a91e305d363f1acfd2b7ebb1a65f1dba7a558db65fd4448a11e4309e2c0f4cd7b0c8075e8680990 SHA512 351b78bce46699c63ba9e02103eda0e80eeb92cba9b364049a11e61bfec3f0bbd9317a4d221b51ea29e42e6735ea4d5e3a6357d0180dc91647b11ccbe5f885e4
+AUX ghc-8.4.2-allow-cross-bootstrap.patch 768 BLAKE2B b697a54fde6687d49592398be33ea4feb6404ff24f51b5b82bd71fe8234ad2d0d3322199b12770b23a0fe27ebb5a10eab2400a5c84d28c29f3d8f3d4521cf214 SHA512 1a58408a96d2e35b021f7298b399153973905e6ff8338de8a137c126f0e2598306e0c9cf2925253717c8d7125796094a0490a03947982961f583537b5188fbec
+AUX ghc-bash-completion 6496 BLAKE2B dc94a1979e886026a2fbe04bf7b45718ffa3e025a0e8945262e21a1243bfce6517fa1794f2ba6cd54cc853e93ad5d80472b9019b95762f10b5be83634a479955 SHA512 ede79ccf23555f60f48297d29bd98e3ccfd67d2cf27462153e00beb930398cb497e34ba8316e91df44c577ed11fdbe5606f7c6a2777e35d5e783590e49ccfeb5
+DIST binary-0.7.6.1.tar.gz 47086 BLAKE2B 7d81b9c254902d5ff2bafbef4c31a6f6f0396202d8585690c1ae3b63ae6ed157db7221d65a62e393ee8f6725ffd5d80e51030c0351e954b06004fcb70e5867cd SHA512 655daa93a52b845a85d440810452933d7bc3398ad1b51e1e955b2d19a0a32679325a0d1751ad50d252531e493528262e14dab32af4b9a515855fe7f64e0730b2
+DIST ghc-7.10.3-src.tar.bz2 13281867 BLAKE2B 51b0a94cc63269926fd5d04c0fb0871266c45b3168187b891127db71980d180668fb8ef7adc51a7a3df947ecc93b4d4a06965ccf9ef53eb74ed063c54adfebde SHA512 97a8282d8a75399c78d85d6faab7ac253a993dc69f1840358572f1878b8fd1a527c28801e5823c8200b5690e268e4a0c00941945ada13790852c75a83b612c17
+DIST ghc-7.8.4-ia64-CLOSUREs-regenerated.patch.gz 13268 BLAKE2B 35af21163e3a46ee340e29eb88daf617eeb094f02da7fdcb80e947c1d26234232b12d9eb2c38c02c3207c047573521fef3ac5e7b87609e66f0c57072fef1038e SHA512 a655713e06324b56f0041edf70837487e296d28e6f3ee35fe116b9938765aaf3469d25e92645e0940655ed3607dff27d3826fe0f995c84e81b51bfc956816e7d
+DIST ghc-7.8.4-src.tar.bz2 10600755 BLAKE2B 6cf27f663178513b25032b648cf36b016e01361966725dbfc219079961e8eb9b1ab3531427c7012dc599e8e102dc87ed6dd43b31e7bd4e231e2d989936eb2c66 SHA512 079a53891d8ebd8d9b88da96170e60981608a619f8282e4b7948f35244e99bd87277649ac7fcebc227a61a4d21960db8d5e5b9e92f2c69c82d8d68d7fd0a41d3
+DIST ghc-8.0.2-src.tar.xz 10687760 BLAKE2B 3b2a487c115680342ce308ff1a42d2b6fa6fb1f31e2670b27a305b4d44160056611b77273c9d47f2e37a1ef01b1aba59c36e76b65c83142a5f09812bf3b1ea02 SHA512 58ea3853cd93b556ecdc4abd0be079b2621171b8491f59004ea4e036a4cba4470aaafe6591b942e0a50a64bdc47540e01fe6900212a1ef7087850112d9bfc5ef
+DIST ghc-8.2.1-src.tar.xz 10736016 BLAKE2B 60993cfc9569e83b0c383591ef30a7280e0138fbb7bd696ad62d87e68dcbccf31c0b8ba211b6647922b8595c7aec2c783648f12c67da53e0766b71c7d7c923fc SHA512 d9aa2aa7f9414db8f4e51d6c275694b46df515e68331a1a2b6018256333a2c63ebd877b75ee90407ecce5be672ec9afc6bebd62aadbf8ae06b94f1760d1736be
+DIST ghc-8.2.2-src.tar.xz 10753272 BLAKE2B 6fd792390d3df20f84836466705c3f3c931ba2d594dcbe2b808ea0ae284460000b443df8aae74903eabf05ff9064d68a303086cf888ea68222eb1c60959c8f21 SHA512 6549416f470b599973d409fa45f59c25b07e6a94798cef1a19ad432547dc225338cf4dbc4a4793114b4a417798a3b59b122b92b020251074405c5302b7ffe799
+DIST ghc-8.4.1-src.tar.xz 11301528 BLAKE2B 6dcf467d04cace856b68315c85b80f19b517dcbc8ae6e2a08c60afa141c9e0261e012738452c9ca208f9fc40c48bd1a0817e5e0fe9f4737383cd7b44ca65c8d9 SHA512 f8ae11f498bf2911fb92635534c6906c96f1fbe5072c7b7447bd3f69e408026b674564515af02a8aaddc57ee6905ce78d10005b12478a39c220580aaec13a9f7
+DIST ghc-8.4.2-src.tar.xz 11313140 BLAKE2B d6fe90f3c68b137c6029bf08918a51ff43c210ba0485aca8d77541cd455f6f9c94287cd011ecd710a8e5a14a27e8a27c04c517417c5748966afd63a5ba6ed19e SHA512 aeb17c986c597762381d9887679eb0eec194c2938a92b5a33e66b4c80002ead02d672b4aa968e1061ab5652b74e46a3c9f9e3d58d5be4a0ae47aa8aed288cf1f
+DIST ghc-8.4.3-src.tar.xz 11315068 BLAKE2B cfb858051aff0c4fb3cdbbe96627cacc82665a6bfc4f863b0353eb3d93d358f7ed4efd7b131280763786f397aabc5c4825f60c3890649303fc97187f2b996d21 SHA512 c6cea84264f32ae888f9931f834a1d721889242f656d14262e787ec54a1793d1862ce76daacaf1006c12b8af12919501afce1dc02571373e24830e4d51803414
+DIST ghc-bin-7.10.3-alpha.tbz2 183558856 BLAKE2B 2bb02aafa49c6a91bec016e8bec2d07257d602e53c9df55792ec6fbbf8e2e46de1d5f3f72c0ccf74d6bd7f7987f53412063ccb02ae85455fce11fa928cbf5291 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230
+DIST ghc-bin-7.10.3-amd64.tbz2 112040431 BLAKE2B 3e59b70ca309a1cd704266c54a7983f9a58362bf700ced89c5649c780c664c650ec091e14026a7b84e339d2ebff39eba1772eebcd9fb4b99b9c99d179453d5cc SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558
+DIST ghc-bin-7.10.3-ia64.tbz2 238680956 BLAKE2B 08593718d376051edfb0c86131e54dafc5c15056757fbeef90c653a7d217e49ff34ffaf7cd4083144c9277e73a290b822a0f889aaf806341375708e4b92654b2 SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5
+DIST ghc-bin-7.10.3-ppc.tbz2 125832171 BLAKE2B cbf9c87200062606fddc6fa705666aeabceef954dad17166e24e181d210d7d86aad684e9af5ca05abcc89c947bea295dec3223735a6a915b680667ad32d850a5 SHA512 4eb111e3686656a83515f59d4ace8bc28806dcabfcee5201ce29aee38b8efcefaaf70c50bee55202c2d2abbfbf231a6b41df8b13199332c53055adb1754a3191
+DIST ghc-bin-7.10.3-ppc64.tbz2 142469712 BLAKE2B 05e6ca2498180399dd8a1a209843dd1229a1668d7504c424b9182fff00f78ec9aa2848d562f293dd388dc983851e0e28d481b12f0ae860b5c3a36eb616c3f1cf SHA512 eb59d3abc8b10010311d59df9473c5ea649eb0dd7f9ad41a1929a540a0ef8c20abaccd68254f8abab037fb1fc94d824f474e18e4316b8f2a7a954d0645a2a2a4
+DIST ghc-bin-7.10.3-sparc.tbz2 163105069 BLAKE2B 4a535472bf9ed83164f4da8280215a156b973a3a1f93a742a46050a112b7073d0a5f252686ee2ebde97140748cf3f164f33f1ba9df0b11fe2b35a86a7211b3a5 SHA512 d467a42487378d7dee311eb33aa1c151f5c16a6e7a4ab5bd8177df229f474adf19da3e1ca1064943a40abafcab6852b0589dd34413da82b33a03ede1ac17bf5d
+DIST ghc-bin-7.10.3-x86.tbz2 113877175 BLAKE2B 2f3064174f82f3ad6fda615d1f47f30b11f9dbd4a4b721673e5db49013a11ba80e850a0f392460651408fd3b31f8e677f1488fe2c94160881ab34740846b0390 SHA512 75096fe9106d975c15e646b0a559c544621fd02791f491bce54926efabf0e55b97150069ddfa7a9f02cc30bb6975d3d3121a82207a9f67b8dda5ebfe17ec4744
+DIST ghc-bin-7.8.4-alpha.tbz2 210691009 BLAKE2B 7a59cd1dbbe76fcf37ec7d1b2e81a76bd35f268c10614890cc8a39dcd846f6e5fb524ce1851036c315a9e5fe219d3abbb78d55f3e93f4ab5ad1dbf6c946146b7 SHA512 f08230de82f0c4112da9d0b48227ca74d5d0b4a84046d746b023557b7aeeb9678f5ac037fe89a863178df4b9036e5c5c63182d14dfbb42c772011de883e3966f
+DIST ghc-bin-7.8.4-amd64.tbz2 100573133 BLAKE2B da6bfb26eac8ef6c996ed10a56da9c535fb5fff4c69474de2cd979fe185876059f9e87940d24db8c52a0f04e81cf312982da75d04f3b96e7a11f2f134b512058 SHA512 e4416d6dae3c644f74bafb3aecf1a123f985427aba32d0e0c43143a137d64a9220fc5947cd9bde8a3bc44555ae71184fc06a3f7df7976aadd065ad5681b90954
+DIST ghc-bin-7.8.4-ia64.tbz2 222789275 BLAKE2B 2e0fc3ea11885b739156dcfbb4d52ded6492bf992ea18be2f91302d82e541a4de52e4bbe215f4d0cdbe54b32aa59e142ad10ae2fb20e8f0dfea22368a88620dd SHA512 2d8b89e399cbe9bfeae29cf3ceea736bfaa65ea21483fa2ee95d9814e122fcfbb67ce22ad8175493fab088e9a9d0139610c67e9d5c8b4f797b5e14846df32b6e
+DIST ghc-bin-7.8.4-ppc.tbz2 112803496 BLAKE2B fa60eda8b87dca0e23cbb971bc1f361f280735846cbe628e632981dc86baba0e877112e5c03d09fbb7f256cc078f8bf3248007c013208dab41c5205a82fab494 SHA512 9581f55a088e53edcc969960e45c9ad7227d71198ce2d241a4a066a138450a879287e55e7d2210e86143670539711387e36c7f60660c4422dc1b4122278fe4a0
+DIST ghc-bin-7.8.4-ppc64.tbz2 129284515 BLAKE2B 2e9a1e70830930dda7dcbd696ef3c27e7b64d571042cc0fc26bed42d13b9707ffeb337ffab38e2e04a7dabc56d8305fd77df508928d61fd0c653945afac8984d SHA512 53974e15c26cf6b62d8f838607abd209ec57cf0f45fcc48b90ad62736f5e4e7ff263dcd326ae03d8d5557a22eb9730e5eb8ae4eda55e52dd3d973bc73c84935e
+DIST ghc-bin-7.8.4-sparc.tbz2 147340595 BLAKE2B 8e39d6b144f4fce5196ad758f89887476e0482e8b98a012874d293d5e57756659cb9acb897476593a28f98f5c859548efa2e130f3806bfa2bb9e74795078a506 SHA512 ee5f0b2f1cf2693a0f2be9df71ef61b52bc2327225d40b8be955c1584b9901ffc6aaab63c1e46bf9bb352633b605c98378f8fd3e6cd71aef1c089007e4110217
+DIST ghc-bin-7.8.4-x86.tbz2 102312459 BLAKE2B 256cca9b2353af30dd7c239db0e21781d9d8aa352e38b3dd678b1429be6251e81f8955ac6ee0f766cc55f4de71c68acd98bc7b9434c3ea4b056d446ca59adc97 SHA512 cabc5bd6d8760ce4120e7053f6c1dffca7d161ba454b6201087760096c037c932e3ff8c82e53346c8278855bf0cff1c2f5fb8046242ca4d8307355b060a9556e
+DIST ghc-bin-8.0.2-alpha.tbz2 234361847 BLAKE2B 8e3439f3bbae1d3f6ab71f69669ea065f5f36c9cb4b334f06161cc1b9507aae56297d5eeb8a9cf72916aa012fab0b444a179a0336f00d5f17a8d402d5807c6f8 SHA512 c8b588feeab85f7b8fd60e2e8bf755d46790d4882d2ecf6b2c8b8e02c62a11b7e6453bf0cfbc646bfbf24310fdc775337f3957ba5783675a271b68f0af2e9070
+DIST ghc-bin-8.0.2-arm64.tbz2 191332951 BLAKE2B 305c4d618a6221e1322a5665544883624de4646e0186c6eab56d0b32877645f0b2bad8381848914751fbd2e11598727c46ab136de74c57207b75ecc6cce9572a SHA512 b9cabfda8fc6e851ba99f53274c1a63c5a6a365311a9203f1247ecf90ab843dd94960ad44c4e67032f4690f07d67bfd8bdfbe59f857d6c63344430539e2082fc
+DIST ghc-bin-8.0.2-i686-pc-linux-gnu.tbz2 133679542 BLAKE2B c50597857b53a2bf9d8047c048f86aa1782f74d5d9816d44b7bad7302181b407257ad0b52a03b4ad4936de3a15010b0ff5ca877b9578af6d3e7684dda2284718 SHA512 7f33e0b20a21fe076db142a58a81f68ab8f230ac9ce0167aba31aa0843bce20a9cf4065acc1c0ee2aaa01ea2ad4a8234388b0cf3ef886dccf25d7072602b430b
+DIST ghc-bin-8.0.2-ia64-unknown-linux-gnu.tbz2 256581880 BLAKE2B 7a9b41fccf3a097a19e169dcd8f553d38ffb96ebce3a3f0df15af79de77f6e33835a955fb7cc2c373f7bb6bfd3508a45ecf19f8b3e74bb058d2d6cdb6576bc6b SHA512 5d14521cc4f2a8fae1e5f43fce70cb976e4412df468c3bc611c99f57806816c349f4186c8a064c579858a82cc070e5942dd7b0c2d57b88d507215acddcbfcfc1
+DIST ghc-bin-8.0.2-ppc.tbz2 144760090 BLAKE2B 32410f3563f7f2555350806db460d2083c7248c57223c9c681d0b4913df942f023c7c1f5fda145179a524ee7ef105a9b8309ba87c20dc393a9f49151579b6767 SHA512 bc6bf8998064ffc1692c3bb83c44d1787760a3f4a1e6b79dedaefda5fe32b9052049a60f0ddd3c0b0bd24a722fb35e310e0189b3511721ff89d4d02b3d7c14bb
+DIST ghc-bin-8.0.2-ppc64.tbz2 117432068 BLAKE2B cae202f0d6e825127d543996b2fe7ae02578c47325674cbf22fddc53b1c4c9413f45c60d76ec3d07860cb8d0aae1ec792e4141822cc5c08ef9013308c5d29bf5 SHA512 0eaff0557b68649a15bbeb2019f46fa9e9e7b8a916aa210ab56888090a5b887d20d818e7987177bc6a8e7fde503de560026e6bb55fe39679b8b1ee13c6b7c4f9
+DIST ghc-bin-8.0.2-x86_64-pc-linux-gnu.tbz2 130852973 BLAKE2B 24d2032bbfc664d924800c1a317334e2342c8ec1e529178f9d1bb99bb4772a9cc100603bf70111b8cfafa715c1cccc643f115c77cf6adcdfb17d1f1735ee6682 SHA512 c36e0e2600fc7c284562a323d396a03062cb6e8fa63c353e672be61e76d2ec5c7698485e3a370a57cf512db9e5ba6a68338fff2ab404d9fe67b1a468ed72638f
+DIST ghc-bin-8.2.1-i686-pc-linux-gnu.tbz2 96157437 BLAKE2B 2b9608845db8cea78db07209fa054b3b05085d5c3ac07cbe3de02a93c87fb0cff12b1820f08757221c59c8a0a9e7a5563c44266b181525d916825e5cf5bac34c SHA512 e891e76557fa61853e28829b8bedc4a6abb92954f90cc1ebcf22a13cc137556bbe9262e7398b7e1aedbabeb997916b008bf1561a52f16a569f3d58ea9404f41e
+DIST ghc-bin-8.2.1-x86_64-pc-linux-gnu.tbz2 97490496 BLAKE2B 3666ea70cb8b3645db071040d2069fe244042c11954b34e5d92aaa90132d2316c0ee8c176cd4e674772bea3b99df150404f62bd8745c046cdaf102ecf0a0fa54 SHA512 52630a185d0eab56bce0469a612a54109895bfee041ec362ced59a9b35ba3b9c185e86bc7dbf0a5939081d3626baa19fbb3306e36d1857530248a7b9bfc100bb
+DIST ghc-bin-8.2.2-i686-pc-linux-gnu.tbz2 96638908 BLAKE2B b470f838e77330969f162196b0f1035fa764f5d123687fbf67c14323280bfe55216af0e16f8b79c62f290905d96abc8bfafee650f8d27c81608853e78329b2c9 SHA512 15b1525890477539878385efc15ce5f1cf2f126cc785c42923be958cabe3298cebe73526a2370cf4c630124160a7ca0f0f9062aebbf035dce807a0374eaddd14
+DIST ghc-bin-8.2.2-x86_64-pc-linux-gnu.tbz2 97696152 BLAKE2B b481cfea186220ee402f9f215dd48b002288766b643f3d8352579735347136c6349d242a9a56728d88ce80f72367dc9fdb6e40c47a0331910dadbb9a4998e17b SHA512 531df6505e8987fb5c5cc0aac59adc6aa153a4757b96936d3f09f27f3614589ff41c227568b780114b2e87c6c8656f2c88683cce86925628d12723f14b893eff
+DIST ghc-bin-8.4.1-i686-pc-linux-gnu.tbz2 116995839 BLAKE2B f94f2206d603d57f7fa64bdf63bcd2528019284fbf6641273ea1d8c62324e2f0b26b2cfa50c6ef96e12beba550bcedd17aa824e7cf9a27c794e962526326e105 SHA512 8167ea80fa627a1b55d28363513ac79985229326019288e7334cc87c3017d39781f4d129081d62da112420152a41d23d2dffb0c13721b80cca72d2a21fbd2c0a
+DIST ghc-bin-8.4.1-x86_64-pc-linux-gnu.tbz2 117369638 BLAKE2B 583db924a50a3d7d261d2f392a74e0ff487ee662af055ac292ff1943534fb305d6c9f6f0045ba4bdd5afa268d75beb50f64b4760e49cddabe1f56776a5f4769f SHA512 801f4ecd538c7a035a0f573f301769984814fa3ce4cf5b09a914ba012bebe0583b6695a6a93f92c7e6e2b7d58caf812a1214b5b778d7b7835d7eab988ad69ba0
+DIST ghc-bin-8.4.2-i686-pc-linux-gnu.tbz2 117083472 BLAKE2B 7dac18523ed693efb0ec42b31bf7b910e6bb8289cdc13eb309bdb30230fc87fbb060baf41eb4f18af2bb265b42e6aca535ceb70cf0fe09046b0e4650f11bb37c SHA512 f9799bdf7a2a66d1db34b828860203872d7398bab2d667e8982c9ee89301654c3f7f54705b639df2d7adebcfb7a05e071b83d994f5e52a72f604b62098be51cd
+DIST ghc-bin-8.4.2-x86_64-pc-linux-gnu.tbz2 117604406 BLAKE2B 644ef535497eb73a2d1ceaab7ff96228e8d4021c09bc061a3f397dc27b3b86bd6d5300736e478671cee0a160bfaa5aa4611f06012285079b40973f468b59664a SHA512 7bf4bcdce954319422b8b8f09e56294012fac145662ba3de1c7765ed86ae9f8b61dcf6dd8febcf85d60db8d1a26edcaf4e89c3644ffa24c7b5b5c41a14105936
+DIST ghc-bin-8.4.3-i686-pc-linux-gnu.tbz2 117028296 BLAKE2B 0c99a2f6fe4af4a1342d948cbda53b178fe9709673e0d09bc3b6a4e0f3ec4e4b8f77830829f149993f51e490692de39024900fb188116816e41441153eac3622 SHA512 13147ae0d6b941b3bc2f0239071a2f6f854a39cb6a381f0e2fda7069ac29bb2c64fb3ccc6191e7527b5f27fe616bd62f2e487b5d50679789927b401f02c62ad7
+DIST ghc-bin-8.4.3-x86_64-pc-linux-gnu.tbz2 117537996 BLAKE2B 2be0102fcc0f1fef5aae194620a43c1c90538215d4eec2550419634ed9c5bbfb17391d57519c20ab53987a36b42488ac43ff968690a4f65b96c52c3485589d10 SHA512 5f26810ec1f0a483f03ef01f56130eba0287b49b912efba03158336ce521000b611192cf021b72c1a0d902532cc4c9470ca1b3233ccba7c7e7c2ac490c6099fa
+DIST hoopl-3.10.2.0.tar.gz 241940 BLAKE2B 0ed7bf80486767c81415f99da8780a525401c388dea0b3f380bbecceae9cc7f66d8b5d0d7b31f8cb41796309b7a93adb113485efd14882f8af321989ce900a9b SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a
+DIST transformers-0.4.3.0.tar.gz 28632 BLAKE2B 92cabcb654bb11854a3bffbb1262f5cd62eda1aff447157086a61ebc451ebf2fddec53b6a2cc058174f24f0f0e32df671d3717e30a542c8dc90cb87e327d990c SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780
+EBUILD ghc-7.10.3.ebuild 21670 BLAKE2B ad406c6fe4ac067b365b059fea1621799a322489ed783d7d76b877c64d84625fc4cb41d2e0c5f9d5c67ebc7dc780aca5a095c76f7260694355bfba128d2a7241 SHA512 82d5dcc2c7e6cde053687d1d0c541584d00c56bbc03495728ae46af7d805a37f1c0caac9b60a9989462b60dcd4faa6bc8fd2b89c4def4b9b2619dd2701ffc21f
+EBUILD ghc-7.8.4.ebuild 19817 BLAKE2B 3859f27e1efea97faad71e3d1e00c43bf334736d51624a2c9e148b482d92f6ad813e2323f6980ce39f9f05860ab5a5311930070317e36660392f57ec87a49d90 SHA512 5f5a55dbdec9abd6cc92a48779377227f3fbdfb99db5e7e5d57daaced1ee2ad8b5395ae59456c837bb70c1c0096cd0db1c9fe7d3439bce9ffe8b21222d0a83d0
+EBUILD ghc-8.0.2.ebuild 21544 BLAKE2B e57a4c97d2231248abef1295a4b825b7cb2d8e2ee9fd6aaa5f3bb554afa6c75d4cd602f33826f3852839804c8fdbd155d1a69782f972095dc41a0f845b0ffc11 SHA512 a6ad1d4f5f2f9156ae1deff8c49090f47e815066f7bd420389421789aa3fb580a63d70653d682a09808eed9be655617864da24d50db3f3b65ad6cca677169dcf
+EBUILD ghc-8.2.1.ebuild 24814 BLAKE2B d008223cf21b766701bed924421930e5825c00fad2b6891a1c72149e988fe7cfdf5a7325a32104ce1c0f18cac3db4e35403fe9dd3842135f06111c08ec276287 SHA512 8399b7280bd3f125e54623cdb6ad1d1c14fb353982693bd0b94b25a41b5cfc8e68ef28681c0273d5ffd8434cdf1de6cadf180669e1983424693d0365b9e3c875
+EBUILD ghc-8.2.2.ebuild 24783 BLAKE2B 7759ac0a512d2503d4c79925ae4d72f957d786a70fbd5e7c892e1f9756ac8460aacdf598f1ab9c8eb04a14d7be419a1bcd69c0c3cb09deb56523134f5e2fe9a0 SHA512 8c96d6515440ef176efb4cd7ba70d01e65ab742f094334e31444334cfa6bed590fa103877d3d10f10fdaf146c46aa0d0ba168c27e30681005248cc7ffc806885
+EBUILD ghc-8.4.1.ebuild 24601 BLAKE2B 09e125fb16efc35e009e063c499f984915a3bb358b4b2a4d204bff5cf638bb64e4b41f18f3203e4b81f2c2fdb0eee999f3dbc34b2c5aa6233716b993d95c36f3 SHA512 73e62c14d4c83c8dbeaaebc07605dcb446b6d6bb2ffc9c135cb0a9f327cf107a3716a4ccc32a8e8e038be6cb6b9b6c0131732dae9b78f35526ac74bd5071ac45
+EBUILD ghc-8.4.2.ebuild 24826 BLAKE2B 53724f5db186ede625576b4b25159e27f6a29f9427538039e10edae2abc1cf6c9a1052a1f2a1108bcdf66b345bf792c8f780e03a52fa39232a75776d632c27c0 SHA512 435a51876f8a79c6f24f68775f49ce25d7657af00693729169be0ce17d1ac424f7f026cfdf423d7f8d9254cd11a0ff1fbc279d84f26e180506bbb65cba946ec5
+EBUILD ghc-8.4.3.ebuild 24771 BLAKE2B 8d442d26f3f7fcd08ed3c9fa12b9e132439c5765f07ff067fc42942670cb345d712fcdd8f09f695f018ab56f43b7e9b53f6168ccd58d69661ea53b7cb278bf17 SHA512 6c9eb37b06c25905637d3c15392c110849e139b8142d44408724d6c3bcce625371ef0dde6e18677ccd51c5b9bde415872d56eba30003c297d533d8820fa0e88c
+MISC metadata.xml 562 BLAKE2B 98c9bbd3aff50f05f27fe1682524254728413e53820650c91dc0eab26beecb2b682032d4b2d9c99a339059a2d8c4d007711d0dfbd3e47e5306fa4b5304f6b01d SHA512 dff79157435350067f74ae396556346d087e8146e61afe2b9739217b5d0dce6a589dd87705c7626d0c1c16da29613d9f465d357c283fb6c6df2332fec2b269be
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..e38d9165e065
--- /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
+
+--- a/aclocal.m4
++++ b/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-binutils-2.30.patch b/dev-lang/ghc/files/ghc-8.0.2-binutils-2.30.patch
new file mode 100644
index 000000000000..f02cb238c6b9
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.0.2-binutils-2.30.patch
@@ -0,0 +1,65 @@
+From 358b508051333882d4099acca8f269e6fb2b7d65 Mon Sep 17 00:00:00 2001
+From: Bertram Felgenhauer <int-e@gmx.de>
+Date: Thu, 3 May 2018 18:03:53 +0300
+Subject: [PATCH] Compute DW_FORM_block length correctly; also fixes #15068
+
+Before this patch, the pprUnwindwExpr function computed the length of
+by the following assembly fragment:
+
+ .uleb128 1f-.-1
+ <expression data>
+1:
+
+That is, to compute the length, it takes the difference of the label 1
+and the address of the .uleb128 directive, and subtracts 1.
+
+In #15068 it was reported that `as` from binutils 4.30 has trouble with
+evaluating the `.` part of the expression. However, there is actually a
+problem with the expression, if the length of the data ever becomes
+larger than 128: In that case, the .uleb128 directive will emit more
+than 1 byte, and the computed length will be wrong.
+
+The present patch changes the assembly fragment to use two labels,
+which fixes both these problems.
+
+ .uleb128 2f-1f
+1:
+ <expression data>
+2:
+
+Test Plan: validate
+
+Reviewers: bgamari, osa1
+
+Reviewed By: bgamari
+
+Subscribers: thomie, carter
+
+GHC Trac Issues: #15068
+
+Differential Revision: https://phabricator.haskell.org/D4654
+---
+ compiler/nativeGen/Dwarf/Types.hs | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/compiler/nativeGen/Dwarf/Types.hs b/compiler/nativeGen/Dwarf/Types.hs
+index 23a2c920e7..579ed0d256 100644
+--- a/compiler/nativeGen/Dwarf/Types.hs
++++ b/compiler/nativeGen/Dwarf/Types.hs
+@@ -492,9 +492,11 @@ pprUnwindExpr spIsCFA expr
+ pprE (UwPlus u1 u2) = pprE u1 $$ pprE u2 $$ pprByte dW_OP_plus
+ pprE (UwMinus u1 u2) = pprE u1 $$ pprE u2 $$ pprByte dW_OP_minus
+ pprE (UwTimes u1 u2) = pprE u1 $$ pprE u2 $$ pprByte dW_OP_mul
+- in text "\t.uleb128 1f-.-1" $$ -- DW_FORM_block length
++ in text "\t.uleb128 2f-1f" $$ -- DW_FORM_block length
++ -- computed as the difference of the following local labels 2: and 1:
++ text "1:" $$
+ pprE expr $$
+- text "1:"
++ text "2:"
+
+ -- | Generate code for re-setting the unwind information for a
+ -- register to @undefined@
+--
+2.17.0
+
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-no-relax-everywhere.patch b/dev-lang/ghc/files/ghc-8.0.2-no-relax-everywhere.patch
new file mode 100644
index 000000000000..d6cff3373801
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.0.2-no-relax-everywhere.patch
@@ -0,0 +1,17 @@
+https://github.com/gentoo-haskell/gentoo-haskell/issues/704
+
+Allow users to specify -W,--relax externally and pass
+-Wl,-no-relax unconditonally on all arches.
+
+Reported-by: wmyrda
+diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
+index acd0d61..5830517 100644
+--- a/compiler/main/DriverPipeline.hs
++++ b/compiler/main/DriverPipeline.hs
+@@ -2172,5 +2172,3 @@ joinObjectFiles dflags o_files output_fn = do
+ -- disable --relax explicitly.
+- ++ (if platformArch (targetPlatform dflags)
+- `elem` [ArchSPARC, ArchSPARC64]
+- && ldIsGnuLd
++ ++ (if ldIsGnuLd
+ then [SysTools.Option "-Wl,-no-relax"]
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-8.4.2-allow-cross-bootstrap.patch b/dev-lang/ghc/files/ghc-8.4.2-allow-cross-bootstrap.patch
new file mode 100644
index 000000000000..071d4970a25b
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-8.4.2-allow-cross-bootstrap.patch
@@ -0,0 +1,23 @@
+Allow using cross-compilers to bootstrap GHC.
+
+In my case I'm using "cross"-compiler from
+x86_64-unknown-linux to x86_64-HEAD-linux.
+
+Those targets have the same ABI and can boot one another.
+diff --git a/configure.ac b/configure.ac
+index a8b8681a36..791367e8bf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -228,11 +228,11 @@ FPTOOLS_SET_PLATFORM_VARS
+ if test "$BuildPlatform" != "$bootstrap_target"
+ then
+ echo "This GHC (${WithGhc}) does not generate code for the build platform"
+ echo " GHC target platform : $bootstrap_target"
+ echo " Desired build platform : $BuildPlatform"
+- exit 1
++ #exit 1
+ fi
+
+ # Testing if we shall enable shared libs support on Solaris.
+ # Anything older than SunOS 5.11 aka Solaris 11 (Express) is broken.
+
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..43a286feca83
--- /dev/null
+++ b/dev-lang/ghc/ghc-7.10.3.ebuild
@@ -0,0 +1,675 @@
+# Copyright 1999-2018 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? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PVR}-amd64.tbz2 )"
+arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64.tbz2 )"
+arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PVR}-x86.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/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
+ 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..49995a58d35c
--- /dev/null
+++ b/dev-lang/ghc/ghc-7.8.4.ebuild
@@ -0,0 +1,601 @@
+# Copyright 1999-2018 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? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-amd64.tbz2 )"
+arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64.tbz2 )"
+arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/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"
+
+ # 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..6e573c0fff30
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.0.2.ebuild
@@ -0,0 +1,672 @@
+# Copyright 1999-2018 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? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm.tbz2 )"
+arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-arm64.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/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 ia64 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
+ 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.2-no-relax-everywhere.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
+ epatch "${FILESDIR}"/${PN}-8.0.2-binutils-2.30.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..61e2fdf5dd92
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.2.1.ebuild
@@ -0,0 +1,755 @@
+# Copyright 1999-2018 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? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/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
+ 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.0.2-no-relax-everywhere.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/ghc-8.2.2.ebuild b/dev-lang/ghc/ghc-8.2.2.ebuild
new file mode 100644
index 000000000000..6e41de8bde93
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.2.2.ebuild
@@ -0,0 +1,756 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# 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? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/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.1.20171108 # 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
+ 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}"
+ eapply_user
+ 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 eapply will break
+
+ eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+ eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+
+ eapply "${FILESDIR}"/${PN}-8.2.1_rc1-cgen-constify.patch
+ eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+ eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
+
+ eapply "${FILESDIR}"/${PN}-8.2.1_rc2-O2-unreg.patch
+ eapply "${FILESDIR}"/${PN}-8.0.2-binutils-2.30.patch
+
+ # a bunch of crosscompiler patches
+ eapply "${FILESDIR}"/${PN}-8.2.1_rc1-unphased-cross.patch
+ eapply "${FILESDIR}"/${PN}-8.2.1_rc1-staged-cross.patch
+ eapply "${FILESDIR}"/${PN}-8.2.1_rc1-ghci-cross.patch
+ eapply "${FILESDIR}"/${PN}-8.2.1_rc1-stage2-cross.patch
+ eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+ # needs a new libffi release
+ eapply "${FILESDIR}"/${PN}-8.0.2-libffi-alpha.patch
+
+ # mingw32 target
+ pushd "${S}/libraries/Win32"
+ eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-1.patch # upstreamed, waits for merge to -HEAD
+ eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+ popd
+
+ bump_libs
+
+ eapply_user
+ # 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/ghc-8.4.1.ebuild b/dev-lang/ghc/ghc-8.4.1.ebuild
new file mode 100644
index 000000000000..e23cc25aadde
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.4.1.ebuild
@@ -0,0 +1,756 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# 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? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/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.4.0.20180224 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${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
+ 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}"
+ eapply_user
+ 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 eapply will break
+
+ eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+ eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+ eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+ eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
+
+ # a bunch of crosscompiler patches
+ # needs newer version:
+ #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+ # mingw32 target
+ pushd "${S}/libraries/Win32"
+ eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+ popd
+
+ bump_libs
+
+ eapply_user
+ # 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
+ # these should be inferred by GHC but ghc defaults
+ # to using bundled tools on windows.
+ Windres=${CTARGET}-windres
+ DllWrap=${CTARGET}-dllwrap
+ # we set the linker explicitly below
+ --disable-ld-override
+ )
+ case ${CTARGET} in
+ arm*)
+ # 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)
+ ;;
+ sparc*)
+ # ld.gold-2.28 does not work for ghc. Force ld.bfd
+ # instead. This should be removed once gentoo gets
+ # a fix for missing --no-relax support bug:
+ # https://sourceware.org/ml/binutils/2017-07/msg00183.html
+ econf_args+=(LD=${CTARGET}-ld.bfd)
+ ;;
+ *)
+ econf_args+=(LD=${CTARGET}-ld)
+ esac
+
+ 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/ghc-8.4.2.ebuild b/dev-lang/ghc/ghc-8.4.2.ebuild
new file mode 100644
index 000000000000..2b6dbd92fe91
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.4.2.ebuild
@@ -0,0 +1,761 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# 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? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/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.4.1.20180329 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${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/haddock-ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hp2ps" \
+ "${WORKDIR}/usr/bin/hpc" \
+ "${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
+ 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}"
+ eapply_user
+ 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 eapply will break
+
+ eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+ eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+ eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+ eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
+ eapply "${FILESDIR}"/${PN}-8.0.2-binutils-2.30.patch
+ eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
+
+ # a bunch of crosscompiler patches
+ # needs newer version:
+ #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+ # mingw32 target
+ pushd "${S}/libraries/Win32"
+ eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+ popd
+
+ bump_libs
+
+ eapply_user
+ # 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
+ # these should be inferred by GHC but ghc defaults
+ # to using bundled tools on windows.
+ Windres=${CTARGET}-windres
+ DllWrap=${CTARGET}-dllwrap
+ # we set the linker explicitly below
+ --disable-ld-override
+ )
+ case ${CTARGET} in
+ arm*)
+ # 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)
+ ;;
+ sparc*)
+ # ld.gold-2.28 does not work for ghc. Force ld.bfd
+ # instead. This should be removed once gentoo gets
+ # a fix for missing --no-relax support bug:
+ # https://sourceware.org/ml/binutils/2017-07/msg00183.html
+ econf_args+=(LD=${CTARGET}-ld.bfd)
+ ;;
+ *)
+ econf_args+=(LD=${CTARGET}-ld)
+ esac
+
+ 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/ghc-8.4.3.ebuild b/dev-lang/ghc/ghc-8.4.3.ebuild
new file mode 100644
index 000000000000..f7908959c942
--- /dev/null
+++ b/dev-lang/ghc/ghc-8.4.3.ebuild
@@ -0,0 +1,760 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# 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? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-alpha.tbz2 )"
+#arch_binaries="$arch_binaries arm? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-armv7a-hardfloat-linux-gnueabi.tbz2 )"
+#arch_binaries="$arch_binaries arm64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-aarch64-unknown-linux-gnu.tbz2 )"
+arch_binaries="$arch_binaries amd64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
+#arch_binaries="$arch_binaries ia64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
+#arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
+#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
+#arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
+arch_binaries="$arch_binaries x86? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
+
+# various ports:
+#arch_binaries="$arch_binaries x86-fbsd? ( https://slyfox.uni.cx/~slyfox/distfiles/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.4.1.20180329 # uncomment only for -alpha, -beta, -rc ebuilds
+GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
+
+SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_/-}/${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/haddock-ghc-${GHC_PV}" \
+ "${WORKDIR}/usr/bin/hp2ps" \
+ "${WORKDIR}/usr/bin/hpc" \
+ "${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
+ 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}"
+ eapply_user
+ 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 eapply will break
+
+ eapply "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
+ eapply "${FILESDIR}"/${PN}-8.2.1-darwin.patch
+ eapply "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
+ eapply "${FILESDIR}"/${PN}-8.0.2-no-relax-everywhere.patch
+ eapply "${FILESDIR}"/${PN}-8.4.2-allow-cross-bootstrap.patch
+
+ # a bunch of crosscompiler patches
+ # needs newer version:
+ #eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+
+ # mingw32 target
+ pushd "${S}/libraries/Win32"
+ eapply "${FILESDIR}"/${PN}-8.2.1_rc1-win32-cross-2-hack.patch # bad workaround
+ popd
+
+ bump_libs
+
+ eapply_user
+ # 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
+ # these should be inferred by GHC but ghc defaults
+ # to using bundled tools on windows.
+ Windres=${CTARGET}-windres
+ DllWrap=${CTARGET}-dllwrap
+ # we set the linker explicitly below
+ --disable-ld-override
+ )
+ case ${CTARGET} in
+ arm*)
+ # 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)
+ ;;
+ sparc*)
+ # ld.gold-2.28 does not work for ghc. Force ld.bfd
+ # instead. This should be removed once gentoo gets
+ # a fix for missing --no-relax support bug:
+ # https://sourceware.org/ml/binutils/2017-07/msg00183.html
+ econf_args+=(LD=${CTARGET}-ld.bfd)
+ ;;
+ *)
+ econf_args+=(LD=${CTARGET}-ld)
+ esac
+
+ 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..494e169583d3
--- /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">Internal: Bootstrap GHC from an existing GHC installation.</flag>
+ <flag name="ghcmakebinary">Internal: Build binary friendly for redistribution.</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/gnat-gpl-2016 b/dev-lang/gnat-gpl-2016
deleted file mode 100644
index 18049c4d1deb..000000000000
--- a/dev-lang/gnat-gpl-2016
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare pretend setup test unpack
-DEPEND=!sys-devel/gcc:4.9.4 elibc_glibc? ( >=sys-libs/glibc-2.8 ) >=sys-devel/binutils-2.20 >=sys-apps/sed-4 sys-devel/gnuconfig >=app-portage/elt-patches-20170422 sys-libs/zlib nls? ( virtual/libintl ) virtual/libiconv >=dev-libs/gmp-4.3.2:0= >=dev-libs/mpfr-2.4.2:0= >=dev-libs/mpc-0.8.1:0= graphite? ( >=dev-libs/cloog-0.18.0:0= >=dev-libs/isl-0.11.1:0= ) >=sys-devel/bison-1.875 >=sys-devel/flex-2.5.4 nls? ( sys-devel/gettext ) regression-test? ( >=dev-util/dejagnu-1.4.4 >=sys-devel/autogen-5.5.4 ) gcj? ( awt? ( x11-base/xorg-proto x11-libs/libXt x11-libs/libX11 x11-libs/libXtst =x11-libs/gtk+-2* virtual/pkgconfig x11-libs/pango ) >=media-libs/libart_lgpl-2.1 app-arch/zip app-arch/unzip )
-DESCRIPTION=GNAT Ada Compiler - GPL version
-EAPI=5
-HOMEPAGE=http://libre.adacore.com/
-IUSE=bootstrap regression-test vanilla altivec debug nopie nossp doc hardened multilib objc awt gcj pgo objc-gc libssp objc++ fixed-point go graphite cilk +vtv +nls +nptl +cxx +fortran +openmp +sanitize
-KEYWORDS=amd64 x86
-LICENSE=GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.3+ GPL-2 GPL-3
-PDEPEND=elibc_glibc? ( >=sys-libs/glibc-2.8 ) >=sys-devel/gcc-config-1.7
-RDEPEND=!sys-devel/gcc:4.9.4 sys-libs/zlib nls? ( virtual/libintl ) virtual/libiconv >=dev-libs/gmp-4.3.2:0= >=dev-libs/mpfr-2.4.2:0= >=dev-libs/mpc-0.8.1:0= graphite? ( >=dev-libs/cloog-0.18.0:0= >=dev-libs/isl-0.11.1:0= )
-RESTRICT=strip
-SLOT=4.9.4
-SRC_URI=mirror://gnu/gcc/gcc-4.9.4/gcc-4.9.4.tar.bz2 mirror://gentoo/gcc-4.9.4-uclibc-patches-1.0.tar.bz2 https://dev.gentoo.org/~vapier/dist/gcc-4.9.4-uclibc-patches-1.0.tar.bz2 https://dev.gentoo.org/~rhill/dist/gcc-4.9.4-uclibc-patches-1.0.tar.bz2 https://dev.gentoo.org/~zorry/patches/gcc/gcc-4.9.4-uclibc-patches-1.0.tar.bz2 https://dev.gentoo.org/~blueness/dist/gcc-4.9.4-uclibc-patches-1.0.tar.bz2 https://dev.gentoo.org/~tamiko/distfiles/gcc-4.9.4-uclibc-patches-1.0.tar.bz2 https://dev.gentoo.org/~slyfox/distfiles/gcc-4.9.4-uclibc-patches-1.0.tar.bz2 mirror://gentoo/gcc-4.9.4-patches-1.2.tar.bz2 https://dev.gentoo.org/~vapier/dist/gcc-4.9.4-patches-1.2.tar.bz2 https://dev.gentoo.org/~rhill/dist/gcc-4.9.4-patches-1.2.tar.bz2 https://dev.gentoo.org/~zorry/patches/gcc/gcc-4.9.4-patches-1.2.tar.bz2 https://dev.gentoo.org/~blueness/dist/gcc-4.9.4-patches-1.2.tar.bz2 https://dev.gentoo.org/~tamiko/distfiles/gcc-4.9.4-patches-1.2.tar.bz2 https://dev.gentoo.org/~slyfox/distfiles/gcc-4.9.4-patches-1.2.tar.bz2 mirror://gentoo/gcc-4.9.4-piepatches-v0.6.4.tar.bz2 https://dev.gentoo.org/~vapier/dist/gcc-4.9.4-piepatches-v0.6.4.tar.bz2 https://dev.gentoo.org/~rhill/dist/gcc-4.9.4-piepatches-v0.6.4.tar.bz2 https://dev.gentoo.org/~zorry/patches/gcc/gcc-4.9.4-piepatches-v0.6.4.tar.bz2 https://dev.gentoo.org/~blueness/dist/gcc-4.9.4-piepatches-v0.6.4.tar.bz2 https://dev.gentoo.org/~tamiko/distfiles/gcc-4.9.4-piepatches-v0.6.4.tar.bz2 https://dev.gentoo.org/~slyfox/distfiles/gcc-4.9.4-piepatches-v0.6.4.tar.bz2 mirror://gentoo/gcc-4.4.3-specs-0.2.0.tar.bz2 https://dev.gentoo.org/~vapier/dist/gcc-4.4.3-specs-0.2.0.tar.bz2 https://dev.gentoo.org/~rhill/dist/gcc-4.4.3-specs-0.2.0.tar.bz2 https://dev.gentoo.org/~zorry/patches/gcc/gcc-4.4.3-specs-0.2.0.tar.bz2 https://dev.gentoo.org/~blueness/dist/gcc-4.4.3-specs-0.2.0.tar.bz2 https://dev.gentoo.org/~tamiko/distfiles/gcc-4.4.3-specs-0.2.0.tar.bz2 https://dev.gentoo.org/~slyfox/distfiles/gcc-4.4.3-specs-0.2.0.tar.bz2 gcj? ( ftp://sourceware.org/pub/java/ecj-4.5.jar ) http://mirrors.cdn.adacore.com/art/57399304c7a447658e0aff7f -> gnat-gpl-2016-src.tar.gz http://mirrors.cdn.adacore.com/art/573992d4c7a447658d00e1db -> gcc-4.9-gpl-2016-src.tar.gz http://mirrors.cdn.adacore.com/art/57399232c7a447658e0aff7d -> gcc-interface-4.9-gpl-2016-src.tar.gz bootstrap? ( amd64? ( http://mirrors.cdn.adacore.com/art/564b3ebec8e196b040fbe66c -> gnat-gpl-2014-x86_64-linux-bin.tar.gz ) x86? ( http://mirrors.cdn.adacore.com/art/564b3e9dc8e196b040fbe248 -> gnat-gpl-2014-x86-linux-bin.tar.gz ) )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc fixheadtails 6b7b3d896b0b285c12a94f3105c2a06c flag-o-matic 5128c4729303400bd8d4b0b966530955 gnuconfig b8ec1c34be4ff9dac7ad4034d277936b libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain 4cc484f0fa892a21beb896d872b0da57 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=983e385e2de3398dbd0183cf4028b324
diff --git a/dev-lang/gnat-gpl-2017 b/dev-lang/gnat-gpl-2017
deleted file mode 100644
index 2cd62041b772..000000000000
--- a/dev-lang/gnat-gpl-2017
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare pretend setup test unpack
-DEPEND=!sys-devel/gcc:6.3.0 elibc_glibc? ( >=sys-libs/glibc-2.13 ) >=sys-devel/binutils-2.20 >=sys-apps/sed-4 sys-devel/gnuconfig >=app-portage/elt-patches-20170422 sys-libs/zlib nls? ( virtual/libintl ) virtual/libiconv >=dev-libs/gmp-4.3.2:0= >=dev-libs/mpfr-2.4.2:0= >=dev-libs/mpc-0.8.1:0= graphite? ( >=dev-libs/isl-0.14:0= ) >=sys-devel/bison-1.875 >=sys-devel/flex-2.5.4 nls? ( sys-devel/gettext ) regression-test? ( >=dev-util/dejagnu-1.4.4 >=sys-devel/autogen-5.5.4 ) gcj? ( awt? ( x11-base/xorg-proto x11-libs/libXt x11-libs/libX11 x11-libs/libXtst =x11-libs/gtk+-2* virtual/pkgconfig x11-libs/pango ) >=media-libs/libart_lgpl-2.1 app-arch/zip app-arch/unzip )
-DESCRIPTION=GNAT Ada Compiler - GPL version
-EAPI=5
-HOMEPAGE=http://libre.adacore.com/
-IUSE=bootstrap regression-test vanilla altivec debug doc hardened multilib objc awt gcj pgo objc-gc libssp objc++ fixed-point go graphite cilk +vtv jit mpx +pie +ssp +pch +nls +nptl +cxx +fortran +openmp +sanitize
-KEYWORDS=amd64 x86
-LICENSE=GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.3+ GPL-2 GPL-3
-PDEPEND=elibc_glibc? ( >=sys-libs/glibc-2.13 ) >=sys-devel/gcc-config-1.7
-RDEPEND=!sys-devel/gcc:6.3.0 sys-libs/zlib nls? ( virtual/libintl ) virtual/libiconv >=dev-libs/gmp-4.3.2:0= >=dev-libs/mpfr-2.4.2:0= >=dev-libs/mpc-0.8.1:0= graphite? ( >=dev-libs/isl-0.14:0= )
-RESTRICT=strip
-SLOT=6.3.0
-SRC_URI=mirror://gnu/gcc/gcc-6.3.0/gcc-6.3.0.tar.bz2 mirror://gentoo/gcc-6.3.0-patches-1.0.tar.bz2 https://dev.gentoo.org/~vapier/dist/gcc-6.3.0-patches-1.0.tar.bz2 https://dev.gentoo.org/~rhill/dist/gcc-6.3.0-patches-1.0.tar.bz2 https://dev.gentoo.org/~zorry/patches/gcc/gcc-6.3.0-patches-1.0.tar.bz2 https://dev.gentoo.org/~blueness/dist/gcc-6.3.0-patches-1.0.tar.bz2 https://dev.gentoo.org/~tamiko/distfiles/gcc-6.3.0-patches-1.0.tar.bz2 https://dev.gentoo.org/~slyfox/distfiles/gcc-6.3.0-patches-1.0.tar.bz2 gcj? ( ftp://sourceware.org/pub/java/ecj-4.5.jar ) http://mirrors.cdn.adacore.com/art/591adbb4c7a4473fcc4532a3 -> gnat-gpl-2017-src.tar.gz http://mirrors.cdn.adacore.com/art/591adb65c7a4473fcbb153ac -> gcc-6-gpl-2017-src.tar.gz http://mirrors.cdn.adacore.com/art/591adbc5c7a4473fcbb153ae -> gcc-interface-6-gpl-2017-src.tar.gz bootstrap? ( amd64? ( http://mirrors.cdn.adacore.com/art/564b3ebec8e196b040fbe66c -> gnat-gpl-2014-x86_64-linux-bin.tar.gz ) x86? ( http://mirrors.cdn.adacore.com/art/564b3e9dc8e196b040fbe248 -> gnat-gpl-2014-x86-linux-bin.tar.gz ) )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc fixheadtails 6b7b3d896b0b285c12a94f3105c2a06c flag-o-matic 5128c4729303400bd8d4b0b966530955 gnuconfig b8ec1c34be4ff9dac7ad4034d277936b libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain 4cc484f0fa892a21beb896d872b0da57 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=5682622ce85edd1070e015505e663423
diff --git a/dev-lang/gnat-gpl-2018 b/dev-lang/gnat-gpl-2018
deleted file mode 100644
index 58411125341c..000000000000
--- a/dev-lang/gnat-gpl-2018
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare pretend setup test unpack
-DEPEND=!sys-devel/gcc:7.3.1 elibc_glibc? ( >=sys-libs/glibc-2.13 ) >=sys-devel/binutils-2.20 >=sys-apps/sed-4 sys-devel/gnuconfig >=app-portage/elt-patches-20170422 sys-libs/zlib nls? ( virtual/libintl ) virtual/libiconv >=dev-libs/gmp-4.3.2:0= >=dev-libs/mpfr-2.4.2:0= >=dev-libs/mpc-0.8.1:0= objc-gc? ( >=dev-libs/boehm-gc-7.4.2 ) graphite? ( >=dev-libs/isl-0.14:0= ) >=sys-devel/bison-1.875 >=sys-devel/flex-2.5.4 nls? ( sys-devel/gettext ) regression-test? ( >=dev-util/dejagnu-1.4.4 >=sys-devel/autogen-5.5.4 )
-DESCRIPTION=GNAT Ada Compiler - GPL version
-EAPI=5
-HOMEPAGE=http://libre.adacore.com/
-IUSE=bootstrap regression-test vanilla altivec debug doc hardened multilib objc pgo objc-gc libssp objc++ fixed-point go graphite cilk +vtv jit mpx +pie +ssp +pch +nls +nptl +cxx +fortran +openmp +sanitize
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.3+ GPL-2 GPL-3
-PDEPEND=elibc_glibc? ( >=sys-libs/glibc-2.13 ) >=sys-devel/gcc-config-1.7
-RDEPEND=!sys-devel/gcc:7.3.1 sys-libs/zlib nls? ( virtual/libintl ) virtual/libiconv >=dev-libs/gmp-4.3.2:0= >=dev-libs/mpfr-2.4.2:0= >=dev-libs/mpc-0.8.1:0= objc-gc? ( >=dev-libs/boehm-gc-7.4.2 ) graphite? ( >=dev-libs/isl-0.14:0= )
-RESTRICT=strip
-SLOT=7.3.1
-SRC_URI=mirror://gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.xz mirror://gentoo/gcc-7.3.0-patches-1.4.tar.bz2 https://dev.gentoo.org/~vapier/dist/gcc-7.3.0-patches-1.4.tar.bz2 https://dev.gentoo.org/~rhill/dist/gcc-7.3.0-patches-1.4.tar.bz2 https://dev.gentoo.org/~zorry/patches/gcc/gcc-7.3.0-patches-1.4.tar.bz2 https://dev.gentoo.org/~blueness/dist/gcc-7.3.0-patches-1.4.tar.bz2 https://dev.gentoo.org/~tamiko/distfiles/gcc-7.3.0-patches-1.4.tar.bz2 https://dev.gentoo.org/~slyfox/distfiles/gcc-7.3.0-patches-1.4.tar.bz2 http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27aa5 -> gnat-gpl-2018-src.tar.gz http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27aa7 -> gcc-7-gpl-2018-src.tar.gz http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27aa6 -> gcc-interface-7-gpl-2018-src.tar.gz bootstrap? ( amd64? ( http://mirrors.cdn.adacore.com/art/564b3ebec8e196b040fbe66c -> gnat-gpl-2014-x86_64-linux-bin.tar.gz ) x86? ( http://mirrors.cdn.adacore.com/art/564b3e9dc8e196b040fbe248 -> gnat-gpl-2014-x86-linux-bin.tar.gz ) )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc fixheadtails 6b7b3d896b0b285c12a94f3105c2a06c flag-o-matic 5128c4729303400bd8d4b0b966530955 gnuconfig b8ec1c34be4ff9dac7ad4034d277936b libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain 4cc484f0fa892a21beb896d872b0da57 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=89aee15796c9eec2e6bfdcc566fe39ea
diff --git a/dev-lang/gnat-gpl/Manifest b/dev-lang/gnat-gpl/Manifest
new file mode 100644
index 000000000000..15e0ee5523e1
--- /dev/null
+++ b/dev-lang/gnat-gpl/Manifest
@@ -0,0 +1,36 @@
+AUX awk/fixlafiles.awk-no_gcc_la 8473 BLAKE2B dab27fa6914f4efb7b11b51970823dc619bae056fa527f7d1a6e85153754eb47c57ba85b7bda18bc37870fb7c54747d5bbedc0b36268b65c22900ec583d71ffd SHA512 eacc3a19252d2f729d7afcff4c20ceecfcc212bb041e07fb5a98b5224a4a9ac4c1f5ebb1be6058033f2e38a1da7eef5d8a8c9a349f7073e2b2e339566e0cf9fc
+AUX c89 412 BLAKE2B 04236b6a32e8819c65713821e769d5bf55f194fb6bdaa61c48ad09c7e13e123d3e4725394b3a922445efaa951849f4e87f96e34a55d3e229dbedc50ca1816f44 SHA512 71d33a147339d8d70a62aa22a95d3e70e445d8435d6ac05893f7da19ae851b89bea851f6ce213fbd22470f13572ae13b83cf02f0621333f07d7b0c68a79b7924
+AUX c99 446 BLAKE2B 061fcbef85149de611c4692c99c2c5ebeeef045637b999dbea0d1922398e16361cedbd461ed6aaf0c49c6269900a4c346f5026d8c22780044e1cc8afee74be4e SHA512 bf3b0eb1125d5e89b433954fcbf805cd86dec5a6eeb23df685ebf3ff83a610573f2ffcec65d893244c845936a73918387cba026710c65c854b2c94a78b007989
+AUX fix_libtool_files.sh 1521 BLAKE2B 32e267764269241a540f43c11e9d4a016f393a8b9bedd3843e2336ff70ec324dce0bd6e2549ed6e0e2b1779f3475c6ada6fce0db3e4bdca69f44a70e5f4cd576 SHA512 9ad874b70c5133b055a1afac0449934c3fb92ed348c41f8762580ee27477748df7e208e254687dc7dd2b0432c35d183cb0e561a332cfa5f85885f1922ffd5996
+AUX gcc-configure-LANG.patch 2052 BLAKE2B 28c36f4992e41305ee421dade5eaaac34e3bdc523665b03f360f2bc01e8f69e9dc48052edb80dece63ab561e80325b4f125502482eb16f7324f1c03670021550 SHA512 a694c7ac2f45cc657097ff5b0cf1356ac88a9c06035c9ba15167e9d444844d0d8a478eb1b9b62195dd063774f79697b9148b9cdb6c261640b472c291061b2129
+AUX gcc-configure-texinfo.patch 337 BLAKE2B 6408817927f71c5c55a19510a95e1aaad9b56be216ec1c753920b55a435d70579e27ff5bb8ecbeea1b9ff1c8ae62b940fbf10bf876c3d7ecf6cd662d9b693100 SHA512 a15fba8bf2ff02bdeca54d6f186bfa08c1079c6a8ba0a3beef154483ce5c1b8c497e7ffeec32371968f0037e0ff8384609eb0c367d0155a4e5a7eef8aad084d5
+AUX gcc-spec-env-r1.patch 3148 BLAKE2B 30ceb113a510092a907b445c4b2131f148f7fef54a00a88b5c389bbf93b8b61bc12c86a07df03d57280759e5485ac0cd89ea69826ace01b5720681ca3102640b SHA512 ecae71577543772cfe1711f1b4a8815c0b5d706ebd01edacd1f07586637d4805e25771f970a6e6d1bb696d4b1b5ef3e0036088a96a9f6beff7ddaee704175d16
+AUX gnat-gpl-2016-bootstrap.patch 2698 BLAKE2B 2fe9519590f0870aa201d550e027eaec311961c07b62f470d77f1de125fdf81cab6f884f08dfd8b957b7c2880ad04a7400f3fb395f5404d6c467373042e2fb0c SHA512 c712234b87aa66379bc52b43bce31a2dfd8de996030588a26261bb08471cd6e92587bc5aa35bb8f776a5128b1deb524e37aebe1c0b970a98210d653b5094d95b
+AUX gnat-gpl-2016-gentoo.patch 2811 BLAKE2B 495e66d5fb3c184be946269a9f360bfaf8dc2b6b38449a74a7ec61ac9c1c3790833480f1f9614e8e152d9fab45366c7284747c3f05891c77812aa14248671644 SHA512 ba147b3cb4374eb3c8fe530b92a5ffa564170d8df26dc455a48dae3ec92ca0fee9525cb67229855b34c8b8d48a985a083f7ea70ec2b4d13f652296f04c03e4a0
+AUX gnat-gpl-2017-gentoo.patch 4510 BLAKE2B 468059269978e5bbf85d09f2d4086c5fade1f7cdb4c14e9a12b596a96b3cf93e0bf894cf77ef2f81dd56b3aa2e7dc65c8642f7b688ec7cf8514152051e33564f SHA512 48ed94e3e5a2473f98ac6877640f64fc5e5a705a95e0c92a2d19b6a77597e49e77ed409af15302fba0c2403b38c13847c6eeb1f4626f57bc3c128f542dfaa893
+AUX gnat-gpl-2018-gentoo.patch 634 BLAKE2B 949911111848fd4834de4b3a0d93d6f617b4ae05f9911564a01ab377c5715dfe21ec33c94c5d52815ad2a636809ce01b617cd8a2f132783b084bafc6c4265ead SHA512 f4a541780b6d00af32d38b71ce6a39516aff9c2df15429c40d297ebba03ab148786aa0f1218b90aedb36eb36a9c4a490b52883e3830a5e58bfc5d22987c00ece
+DIST ecj-4.5.jar 1470676 BLAKE2B 793c10ba09fd8040c0e1181204141aea16780c9c9088e07126e00da2b510af2ad6f58d876357d7e98cbb02d783a3be434469d5de1df134ccb8cc508e45028d80 SHA512 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e
+DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 BLAKE2B 96f5ba2028bc6e0ef71e009857c37118a54d13d30de24d697c85e5772f9f2b7853615648cf2e4ee81d8385f6518c64588c0b56675c00f95ef39fca2a808f075e SHA512 779ecb0a064d2138b54569c8ae501975b8a6b72e5a3acbf8597619a8db77ee42ef9b0e62608d5192a15e4393e7dfc009bb50b994782236faa744b2c46b5fe517
+DIST gcc-4.9-gpl-2016-src.tar.gz 76361760 BLAKE2B 681aac3dd2e04110f58637cc9fe1eb663ce55af16a929a446eb59ce338bec9357e65517890f7fa01d61eec9c5041336722b2b94a5fea27a55ade686fe1fe9fbc SHA512 da1e26b4dbbe0ec634eab4e64d1cdb2632300c24f0885bc72fb57edba6ce29ab92b04eaedd8f8077ea623f1ef1428f53616e8c8d6630328d9790d968b60c67cf
+DIST gcc-4.9.4-patches-1.2.tar.bz2 25447 BLAKE2B 3141897688409c84cab4ffea67deb220d2218107f279a0cc1758d08c858f3a3856150df48ae37d2f14c6f69bc82de1e87f22cc356f179dfdf47ae9eef28a4182 SHA512 61b1e86e8dbc2838e7b5c88c4a3bab9ed5b6485258b7971799850ffd97cb67ad2564552af4e9ebc860dcc2a4b786c91d2079469468fb95f8e28e2fc981b4c812
+DIST gcc-4.9.4-piepatches-v0.6.4.tar.bz2 14414 BLAKE2B 2eccd4f2a164fbb32d13c7fe91627a2424c0a5570fe0cac97c2bb1c95294ba3d770832da7c445f75c91791466c5139a1e13753a3a40d87ff5e44e42749adee27 SHA512 243fa272ea0e49f700a76508bab3e03bbb353bcb930581b2f87f9a47df5cd3880e29f20b71612b21190adc463849e1e6ac2a38a49c0002b562d93d436f538285
+DIST gcc-4.9.4-uclibc-patches-1.0.tar.bz2 2618 BLAKE2B bff85a4088fb94fdb7a8b0bd552be98ace3e6d145889b6f8b4a1f2db2dad14342d155890ab159b42d5b55d88dfb7c392eb7f92590084e1958f6284c561da30f1 SHA512 5a1f44caa9261f4947101379628143869b31dec67fa28605e8e1f3894d4b7120c3f68ba6deb59da7a74fa906e27ab32cd3767761837dc3dfebc37865d349d6db
+DIST gcc-4.9.4.tar.bz2 90097606 BLAKE2B 373ff939ea72d6c4a7f3ab899b852b4c919481af2cfe3291281d9354c58a270d2eba73a0f301d90840dfabf423c82b368e113df7a2cb6cc28b2a703b0b6eb585 SHA512 93abb78e16277454f41a8e9810f41f66c0fdffdc539a762ff6b67d3037f78db971378683fd2ebf707d1d51c059fad2161fe42d110c330027f40214b7db0f3efe
+DIST gcc-6-gpl-2017-src.tar.gz 88045488 BLAKE2B 5df712eadef723df9057653e49d215cef6b59032e4b4a62c8622a7b735c660f42ec4135dba628a2080a7540d407186a4e4b1eb373e937374bc4e407dc9afe97d SHA512 bf8f786b5ad28a6b7d184fb5263424b7ed62154e308e259b61c24a577efdae56939fbaabc1fc53a0f467702c1e6d8598dc6e489ce074724799130a793cfb146e
+DIST gcc-6.3.0-patches-1.0.tar.bz2 7596 BLAKE2B e3c298bd80b83e72d6ea9b4ec777d4f28153bf959da1e54307909383efecd2bf0e7e0cc9d9b27529e5f00b2e27132bf5ff6afd2129d061d3b111f9cfe732a874 SHA512 8fc96086bd3da3726687ee9d180d3b5d0a7d5814141d44eac8eb01566a783ec780c8fb8f55f75d6e9c9006b2e407e20cdb5835d541b0b66a47dd60642861734c
+DIST gcc-6.3.0.tar.bz2 99903185 BLAKE2B 3dc1e965afcad665d659fbb953978ef297ddbdd4d8918d36b35e977f8a2786b986f6875af2f12c599cc827b2b725d8b79ac021c9b51fb1d6d274318a59aa182c SHA512 234dd9b1bdc9a9c6e352216a7ef4ccadc6c07f156006a59759c5e0e6a69f0abcdc14630eff11e3826dd6ba5933a8faa43043f3d1d62df6bd5ab1e82862f9bf78
+DIST gcc-7-gpl-2018-src.tar.gz 90302033 BLAKE2B 2f79137e176bff04c4fb17ab863302943588226d5b599dfa1acf0e495111be1c581f4e130f911c312916669c4f2707eec5218601db090d5060248b2fe481d710 SHA512 79f06deca5753251de82a703f4a9698c117706290df779291a5405edb06f1c225d1d2416bda0e67dcd87cc308bf79504e89d4bd8e22aa0eedfbf06d88bc37f33
+DIST gcc-7.3.0-patches-1.4.tar.bz2 8238 BLAKE2B 72a5dcb046558c8f5c3a75040fe24ce1106c43af7510d6febf667b4377cb9caea5ebe9e1287af90e4ebfffa3f3f22ca85f533acf57c2e2d896f92adc1659b9f5 SHA512 24ed0d82240426efb111bbf48913b96fdc824ae3aa5a653298a726ebe64a40791f484229bbab9cc58f73d658e0b4b83ccd13081cfbea6e1673ef1d076cca3b33
+DIST gcc-7.3.0.tar.xz 62462388 BLAKE2B dc8f132b21bd0543c3d9dd17557038aafe65675aa73c540954234a3c972b4c31c939149bd50183d072ab6c8d16919e19daeaaffd619ce2ccd62dbdf9a5bb3302 SHA512 ad41a7e4584e40e92cdf860bc0288500fbaf5dfb7e8c3fcabe9eba809c87bcfa85b46c19c19921b0cdf6d05483faede8287bb9ea120c0d1559449a70e602c8d4
+DIST gcc-interface-4.9-gpl-2016-src.tar.gz 339037 BLAKE2B 8218ea3a3e3ddb11febb5f2fbcfad69ec25251d3ed6bf4f9c70dc9b3720cc2fb3310d704db40bd0c749be89b17a2b3766ddae3d6158313480073856057ad4bcf SHA512 507df314d1890c228c19f458bd51197377deaaa2d6082fe1e71b62b683252ee5fba4adfe2386246e14618b1c77288e0dcb5bf501e2daaca249b6299462c2f6bd
+DIST gcc-interface-6-gpl-2017-src.tar.gz 347016 BLAKE2B 934c6dac491abece9a6868d28fe9d2a6a1109238fe25c9b94abe83dfc22a1085489f0e0384626da0a3abeebe7537c5715df49a7e2d40577c96eb7ac897b84fd8 SHA512 5833303fce5bf812ccbc71f3d3726c0cb877937d75327edb15097c0b7dba58024a52688392906695ab92fb4e5d7a6623671eac9a05d17937dc0270bafcde920a
+DIST gcc-interface-7-gpl-2018-src.tar.gz 339461 BLAKE2B e6009c0b287b1cd8f055226e6919c12f2ba08f8ef24101608691b05b70a7fb0ca708e2ecd126499fb84a126436d3841f1a13be0b6d3442ef3bd3871391f8e1d5 SHA512 9dc942a39dd983778756be2951b4c66ac3835bf456dc389f80ffbafdacde4ebcb80720ac9eca8fef8734d6d052c061db37c88dba642d85add10940164d120381
+DIST gnat-gpl-2014-x86-linux-bin.tar.gz 233049287 BLAKE2B 2e8bab113f6a319533ec12fdf71c481f72aee227c22bd0cc42a53bd727b323caba1e7b6298053db8b4d3016236b31649b0b255f4ebcbb81a08a69f29f78f13fc SHA512 ac7f53fb4bd71b0e8fbd62abc45de76f7f8f2f405b80e9b60b4b65a6cef6ee98e3b06848e4b752af3c8268237e5a0529cf6145ebc5b33cd6e5cf4928d85f5be2
+DIST gnat-gpl-2014-x86_64-linux-bin.tar.gz 236253400 BLAKE2B c1db70db9442ba24688b8e323d5a02e2e9707ba1f02835ea551038d0a09aafede93a224091e5186f2f2a9d0f96144027af2184ee05ca1c19cc997a6cf3902df7 SHA512 5e40a251baac3d0ace78352956ca21a7d294d902d344a9ed7a8d376e900468c283721ebfb773adfedbf4d623ace02536505c0147815a0c1908933ad611ea085e
+DIST gnat-gpl-2016-src.tar.gz 8857249 BLAKE2B 3ff0fe247990e2a612ac989aa389e9ccae2e29c16177975c327b53ae1471030d0a70e5a2e3af219ad9a3288c241f2d18da349d0650f7fde01d439f4e4720de88 SHA512 4a5cb58ede5b4ae2887e64f0f2e12e0e06470d320796f06d02f7ddd932ff0d3b40e6d3e98a81138fff6906548a55153c2a186ff4a6e3d23b9dbe01ca582da1f8
+DIST gnat-gpl-2017-src.tar.gz 8783473 BLAKE2B b0415b42f4d3a5e8675591a5602ff0a96945670104064671a232c0c12271ee141a3a5d148b8507bdab83cb8a0677c57b78e690060088308c51732bad3715964f SHA512 ae7314a2241107ed4d962dce08306eeb34c5f11e26183935bbb1ccf3a5eb011d6457c1b6fcded93dd0ee9ba31d791971ebe2a5a5a0ae04ff80d87a670325a098
+DIST gnat-gpl-2018-src.tar.gz 8706578 BLAKE2B ba245fd91cc5263d5b8c159d9e75caf6bed21dcaa5fa43734af8775a4008ce5f96bfb84a8b5e6e734ff883314ab3219dacec3fe95a5baa33fb712bfb5ff8bce8 SHA512 0ff7e848ef77f7e772e2a1b01905307a91c332f32329456f5238c4b7eb46cc118709e8682a5fc826d98a7d99fd15a92c194f4a278f04bc465165cfa616cc3c2e
+EBUILD gnat-gpl-2016.ebuild 5681 BLAKE2B d1c5db2018a8e8d5c9dbb10caf800aa2b3ea220ed7276fa77c43bdef541e523377ea6024d89db75277a68c28796d8fc5d339bdac52802682cc33e6cb458b3922 SHA512 3a6180130b11c3fc9c417f6cfb0303ee21b6e5c183a547e23e9510ea119d3a5becb31a4a073d5b160f9b7146b35c82ab12ea7bb7cdb53b899e89ca1177c3aebf
+EBUILD gnat-gpl-2017.ebuild 4916 BLAKE2B 63c46822894529952dec8f45723b09e590c69269bfc4b3408dc6d720fa72b574956aa3e2a8adc51c400baf02414454d3153022e59cb69ebb4c5c9214fefcc40f SHA512 3d7d6b8fac5e9d0be36df050451a959437796d63f30a678d756af7e9aa5a036d13d2a25a2dcbd16aee799c44cb41ade35ca5771a43dc779ec74d341cd835d99b
+EBUILD gnat-gpl-2018.ebuild 4976 BLAKE2B 198f9ff727c90a76d9f83a12b01901efafa7087660d212371880dc740926058a8dead2bacc8c08a764bc4be69b4f53550e178a221881a78591a89f2ab49f60ec SHA512 11a8823c4c9615a0a3ab51f510e175fc310521e9ef71cb27ad04ad17ec7b389ba20eaf06758c44f6d6927a81916f2a08a4eb56be4a3e74e617753501588f80c8
+MISC metadata.xml 1960 BLAKE2B e66552f4c0655619e736b6af14822d84e6c49aa6c019cb8c8b0e215629f9c8ab68aa55758639e35107120a39c578d82e1036bc0be82ff67728104f44c875d107 SHA512 04f14bcdd96ae4f6e285abfd07de89828eb989ce779aa59decf689920a179d859ffe809d7960e9c3599c2f6fff6ab2aafbb54458da07fa91841c61e0dfca47ab
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-bootstrap.patch b/dev-lang/gnat-gpl/files/gnat-gpl-2016-bootstrap.patch
new file mode 100644
index 000000000000..aed1ad0e90be
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/gnat-gpl-2016-bootstrap.patch
@@ -0,0 +1,66 @@
+From 41a4aa66eac45c8862a79351647ec06dd03bd1f5 Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Sat, 13 Dec 2014 11:24:37 +0000
+Subject: [PATCH] PR bootstrap/64023 * Makefile.tpl
+ (EXTRA_TARGET_FLAGS): Set STAGE1_LDFLAGS to POSTSTAGE1_LDFLAGS and
+ STAGE1_LIBS to POSTSTAGE1_LIBS. Add -B to libstdc++-v3/src/.libs and
+ libstdc++-v3/libsupc++/.libs to CXX. * Makefile.in: Regenerated.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218705 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ ChangeLog | 9 +++++++++
+ Makefile.in | 6 +++++-
+ Makefile.tpl | 6 +++++-
+ 3 files changed, 19 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index ba5ae4c2ecb..8ffc313f157 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -835,7 +835,9 @@ EXTRA_TARGET_FLAGS = \
+ 'AS=$(COMPILER_AS_FOR_TARGET)' \
+ 'CC=$$(CC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+ 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
+- 'CXX=$$(CXX_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
++ 'CXX=$$(CXX_FOR_TARGET) -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
++ -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \
++ $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+ 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
+ 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
+ 'GCJ=$$(GCJ_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+@@ -853,6 +855,8 @@ EXTRA_TARGET_FLAGS = \
+ 'WINDRES=$$(WINDRES_FOR_TARGET)' \
+ 'WINDMC=$$(WINDMC_FOR_TARGET)' \
+ 'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \
++ 'STAGE1_LDFLAGS=$$(POSTSTAGE1_LDFLAGS)' \
++ 'STAGE1_LIBS=$$(POSTSTAGE1_LIBS)' \
+ "TFLAGS=$$TFLAGS"
+
+ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
+diff --git a/Makefile.tpl b/Makefile.tpl
+index dcbc6b1b143..bb8227eaafa 100644
+--- a/Makefile.tpl
++++ b/Makefile.tpl
+@@ -641,7 +641,9 @@ EXTRA_TARGET_FLAGS = \
+ 'AS=$(COMPILER_AS_FOR_TARGET)' \
+ 'CC=$$(CC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+ 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
+- 'CXX=$$(CXX_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
++ 'CXX=$$(CXX_FOR_TARGET) -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \
++ -B$$r/$$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \
++ $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+ 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
+ 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
+ 'GCJ=$$(GCJ_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
+@@ -659,6 +661,8 @@ EXTRA_TARGET_FLAGS = \
+ 'WINDRES=$$(WINDRES_FOR_TARGET)' \
+ 'WINDMC=$$(WINDMC_FOR_TARGET)' \
+ 'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \
++ 'STAGE1_LDFLAGS=$$(POSTSTAGE1_LDFLAGS)' \
++ 'STAGE1_LIBS=$$(POSTSTAGE1_LIBS)' \
+ "TFLAGS=$$TFLAGS"
+
+ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
+--
+2.15.0
+
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..9df03f8e7941
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/gnat-gpl-2017-gentoo.patch
@@ -0,0 +1,98 @@
+--- 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'
+--- gcc-6-gpl-2017-src/libgcc/config/i386/linux-unwind.h.old 2017-12-07 20:57:02.737224515 +0100
++++ gcc-6-gpl-2017-src/libgcc/config/i386/linux-unwind.h 2017-12-07 21:01:59.431929926 +0100
+@@ -58,7 +58,7 @@
+ if (*(unsigned char *)(pc+0) == 0x48
+ && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+ {
+- struct ucontext *uc_ = context->cfa;
++ ucontext_t *uc_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+ because it does not alias anything. */
+@@ -138,7 +138,7 @@
+ siginfo_t *pinfo;
+ void *puc;
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+--- gcc-6-gpl-2017-src/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc.old 2017-12-07 22:05:30.512328872 +0100
++++ gcc-6-gpl-2017-src/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2017-12-07 22:05:53.104950070 +0100
+@@ -267,7 +267,7 @@
+
+ // Alternate stack for signal handling.
+ InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
+- struct sigaltstack handler_stack;
++ stack_t handler_stack;
+ internal_memset(&handler_stack, 0, sizeof(handler_stack));
+ handler_stack.ss_sp = handler_stack_memory.data();
+ handler_stack.ss_size = kHandlerStackSize;
+--- gcc-6-gpl-2017-src/libsanitizer/sanitizer_common/sanitizer_linux.cc.old 2017-12-07 22:09:04.912731275 +0100
++++ gcc-6-gpl-2017-src/libsanitizer/sanitizer_common/sanitizer_linux.cc 2017-12-07 22:10:03.150754764 +0100
+@@ -546,8 +546,7 @@
+ }
+ #endif
+
+-uptr internal_sigaltstack(const struct sigaltstack *ss,
+- struct sigaltstack *oss) {
++uptr internal_sigaltstack(const void *ss, void *oss) {
+ return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
+ }
+
+--- gcc-6-gpl-2017-src/libsanitizer/sanitizer_common/sanitizer_linux.h.old 2017-12-07 22:10:10.109638062 +0100
++++ gcc-6-gpl-2017-src/libsanitizer/sanitizer_common/sanitizer_linux.h 2017-12-07 22:10:30.991287828 +0100
+@@ -28,8 +28,7 @@
+
+ // Syscall wrappers.
+ uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
+-uptr internal_sigaltstack(const struct sigaltstack* ss,
+- struct sigaltstack* oss);
++uptr internal_sigaltstack(const void* ss, void* oss);
+ uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
+ __sanitizer_sigset_t *oldset);
+ void internal_sigfillset(__sanitizer_sigset_t *set);
+--- gcc-6-gpl-2017-src/libsanitizer/tsan/tsan_platform_linux.cc.old 2017-12-07 22:15:09.626608907 +0100
++++ gcc-6-gpl-2017-src/libsanitizer/tsan/tsan_platform_linux.cc 2017-12-07 22:15:28.825286145 +0100
+@@ -291,7 +291,7 @@
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+ #if SANITIZER_LINUX
+ int cnt = 0;
+- __res_state *statp = (__res_state*)state;
++ struct __res_state *statp = (struct __res_state*)state;
+ for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+ if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
+ fds[cnt++] = statp->_u._ext.nssocks[i];
diff --git a/dev-lang/gnat-gpl/files/gnat-gpl-2018-gentoo.patch b/dev-lang/gnat-gpl/files/gnat-gpl-2018-gentoo.patch
new file mode 100644
index 000000000000..b778900083ef
--- /dev/null
+++ b/dev-lang/gnat-gpl/files/gnat-gpl-2018-gentoo.patch
@@ -0,0 +1,18 @@
+--- gcc-7-gpl-2018-src/gcc/ada/osint.adb.old 2017-03-10 21:58:02.600710156 +0100
++++ gcc-7-gpl-2018-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..89ae61b4668c
--- /dev/null
+++ b/dev-lang/gnat-gpl/gnat-gpl-2016.ebuild
@@ -0,0 +1,214 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PATCH_VER="1.2"
+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
+BTSTRP_X86=gnat-gpl-2014-x86-linux-bin
+BTSTRP_AMD64=gnat-gpl-2014-x86_64-linux-bin
+
+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? (
+ amd64? (
+ http://mirrors.cdn.adacore.com/art/564b3ebec8e196b040fbe66c ->
+ ${BTSTRP_AMD64}.tar.gz
+ )
+ x86? (
+ http://mirrors.cdn.adacore.com/art/564b3e9dc8e196b040fbe248 ->
+ ${BTSTRP_X86}.tar.gz
+ )
+ )"
+
+LICENSE+=" GPL-2 GPL-3"
+SLOT="${TOOLCHAIN_GCC_PV}"
+KEYWORDS="amd64 x86"
+IUSE="bootstrap"
+
+RDEPEND="!sys-devel/gcc:${TOOLCHAIN_GCC_PV}"
+DEPEND="${RDEPEND}
+ elibc_glibc? ( >=sys-libs/glibc-2.8 )
+ >=sys-devel/binutils-2.20"
+
+PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )"
+
+S="${WORKDIR}"/${MYP}
+
+FSFGCC=gcc-${TOOLCHAIN_GCC_PV}
+
+pkg_setup() {
+ toolchain_pkg_setup
+
+ if use amd64; then
+ BTSTRP=${BTSTRP_AMD64}
+ else
+ BTSTRP=${BTSTRP_X86}
+ fi
+ if use bootstrap; then
+ GCC="${WORKDIR}"/${BTSTRP}/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
+}
+
+src_unpack() {
+ 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
+
+ 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} ${BTSTRP}.tar.gz"
+ fi
+
+ toolchain_src_unpack
+ if use bootstrap; then
+ rm ${BTSTRP}/libexec/gcc/${CHOST}/4.7.4/ld || die
+ fi
+}
+
+src_prepare() {
+ mv ../${P}-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
+
+ # Bug 638056
+ epatch "${FILESDIR}/${P}-bootstrap.patch"
+
+ 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 ${CHOST} ../build/prev-${CHOST} || 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 "The compiler binary is gcc-${TOOLCHAIN_GCC_PV}"
+ 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..bdcc9a45caf9
--- /dev/null
+++ b/dev-lang/gnat-gpl/gnat-gpl-2017.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2018 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
+BTSTRP_X86=gnat-gpl-2014-x86-linux-bin
+BTSTRP_AMD64=gnat-gpl-2014-x86_64-linux-bin
+
+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? (
+ amd64? (
+ http://mirrors.cdn.adacore.com/art/564b3ebec8e196b040fbe66c ->
+ ${BTSTRP_AMD64}.tar.gz
+ )
+ x86? (
+ http://mirrors.cdn.adacore.com/art/564b3e9dc8e196b040fbe248 ->
+ ${BTSTRP_X86}.tar.gz
+ )
+ )"
+
+LICENSE+=" GPL-2 GPL-3"
+SLOT="${TOOLCHAIN_GCC_PV}"
+KEYWORDS="amd64 x86"
+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 amd64; then
+ BTSTRP=${BTSTRP_AMD64}
+ else
+ BTSTRP=${BTSTRP_X86}
+ fi
+
+ if use bootstrap; then
+ GCC="${WORKDIR}"/${BTSTRP}/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
+}
+
+src_unpack() {
+ 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
+
+ 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} ${BTSTRP}.tar.gz"
+ fi
+
+ toolchain_src_unpack
+ if use bootstrap; then
+ rm ${BTSTRP}/libexec/gcc/${CHOST}/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 ${P}-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 ${CHOST} ../build/prev-${CHOST} || 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 "The compiler binary is ${CTARGET}-gcc-${TOOLCHAIN_GCC_PV}"
+ 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-2018.ebuild b/dev-lang/gnat-gpl/gnat-gpl-2018.ebuild
new file mode 100644
index 000000000000..e2bd431e0835
--- /dev/null
+++ b/dev-lang/gnat-gpl/gnat-gpl-2018.ebuild
@@ -0,0 +1,190 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+PATCH_VER="1.4"
+
+TOOLCHAIN_GCC_PV=7.3.0
+GCC_CONFIG_VER=7.3.1
+
+inherit eutils toolchain-funcs toolchain
+
+REL=7
+MYP=gcc-${REL}-gpl-${PV}-src
+BTSTRP_X86=gnat-gpl-2014-x86-linux-bin
+BTSTRP_AMD64=gnat-gpl-2014-x86_64-linux-bin
+
+DESCRIPTION="GNAT Ada Compiler - GPL version"
+HOMEPAGE="http://libre.adacore.com/"
+SRC_URI+="
+ http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27aa5
+ -> ${P}-src.tar.gz
+ http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27aa7
+ -> ${MYP}.tar.gz
+ http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27aa6
+ -> gcc-interface-${REL}-gpl-${PV}-src.tar.gz
+ bootstrap? (
+ amd64? (
+ http://mirrors.cdn.adacore.com/art/564b3ebec8e196b040fbe66c ->
+ ${BTSTRP_AMD64}.tar.gz
+ )
+ x86? (
+ http://mirrors.cdn.adacore.com/art/564b3e9dc8e196b040fbe248 ->
+ ${BTSTRP_X86}.tar.gz
+ )
+ )"
+
+LICENSE+=" GPL-2 GPL-3"
+KEYWORDS="~amd64 ~x86"
+IUSE="bootstrap"
+
+RDEPEND="!sys-devel/gcc:${GCC_CONFIG_VER}"
+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 amd64; then
+ BTSTRP=${BTSTRP_AMD64}
+ else
+ BTSTRP=${BTSTRP_X86}
+ fi
+
+ if use bootstrap; then
+ GCC="${WORKDIR}"/${BTSTRP}/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
+}
+
+src_unpack() {
+ 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
+
+ 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} ${BTSTRP}.tar.gz"
+ fi
+
+ toolchain_src_unpack
+ if use bootstrap; then
+ rm ${BTSTRP}/libexec/gcc/${CHOST}/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
+
+ cd ..
+ mv ${P}-src/src/ada ${MYP}/gcc/ || die
+ mv gcc-interface-${REL}-gpl-${PV}-src ${MYP}/gcc/ada/gcc-interface || die
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ rm patch/91_all_bmi-i386-PR-target-81763.patch || die
+ rm patch/93_all_copy-constructible-fix.patch || die
+ 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 ${CHOST} ../build/prev-${CHOST} || 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 "The compiler binary is ${CTARGET}-gcc-${TOOLCHAIN_GCC_PV}"
+ 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-3.2.5 b/dev-lang/gnu-smalltalk-3.2.5
deleted file mode 100644
index 22acd3481a5e..000000000000
--- a/dev-lang/gnu-smalltalk-3.2.5
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm
-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 )
-DESCRIPTION=GNU Smalltalk
-EAPI=6
-HOMEPAGE=http://smalltalk.gnu.org
-IUSE=tk readline emacs gtk gmp
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-SLOT=0
-SRC_URI=mirror://gnu/smalltalk/smalltalk-3.2.5.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b2c92c5077a9e57575ddb34ee06f67f2
diff --git a/dev-lang/gnu-smalltalk/Manifest b/dev-lang/gnu-smalltalk/Manifest
new file mode 100644
index 000000000000..5e5737059ca1
--- /dev/null
+++ b/dev-lang/gnu-smalltalk/Manifest
@@ -0,0 +1,5 @@
+AUX 50gnu-smalltalk-gentoo.el 268 BLAKE2B c11bc39ffa744d4908e30e5394e81083e4b3a1c06922f3b5159e7ca075716eae9ddb01c25131117f5379762471609037fbbb26508fa9343db3cabab0596aa60b SHA512 0341a9a35c17987ab7b93badf1b7ebf31b5a38df66d372d6a26eb49f5a9fec881e1886024a1b5ffa87cafb37aaef483201bb10827c121c782e4f554961bb9c41
+AUX gnu-smalltalk-3.2_use-result.patch 657 BLAKE2B ed67ccbd1d111a17906f615885216bb777b263beb2f51fba2c7d4d2f9d97b3263d5f41fb3a8fd6495e567257cf9323a2836962dcdf677ffc0f986e6770eab629 SHA512 126544344f92f20463846855c9388d411ce70795438186a87d4c40c3a9311f35c0432ce7a237d2112718da270ab099df92a79975dd3a2734e49832cb0cc20623
+DIST smalltalk-3.2.5.tar.gz 5779293 BLAKE2B 67eb58be2d6403cbd742f3c9dddb2d8f3cf65bbcc4127785b32501ca2c4c0fef2a08cea3faa7dc991deae27f5a260e2c772fc5f628f66a2ef5aca440e42ad3ef SHA512 385e5fba2acb8870759e5178282210c09c45685d0cf776bc50f4ed10c9afacf9164547ba8099ea3ed9a92a2a253aa9c2b011a7a9f2dff47ea9cfdf3b42029ebc
+EBUILD gnu-smalltalk-3.2.5.ebuild 1795 BLAKE2B 880376b65d36113ef40a722cac11582d1ef6260a43f95dee0344fba6b14582fe0b317ae52d8795b0b010cfb6edbb9e2b6866c292dd85abae48c36b323a26dc2c SHA512 6269ea2a49e5b50b2dc8e38cf6be9e232e3b2e1c3859f0787a8c205f514a8ff82ef9ff39f169ea2275b08bc56a6f124917a37758bbf7c12707126ada93e08a49
+MISC metadata.xml 469 BLAKE2B 1f3dbeb63b9f4ef08a573203416746efe0bfe14eb11cd8f81b11aba979b19f7a0b8eb4908e3862417cb986d1a9c792b3c33d4fd8ea15b9ca443461ebc749b7ac SHA512 e0ef2c7778ddfdbbd9dd33705bc5ce9e7b2ce2bdf5d1f2a844ee93bf842df93e708ad04467ee84aadea80bbfa6e1c90b04aa1f6e1cc4b75ab0bbcfcda56e160f
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..7f3fb907d895
--- /dev/null
+++ b/dev-lang/gnu-smalltalk/files/gnu-smalltalk-3.2_use-result.patch
@@ -0,0 +1,16 @@
+--- a/config.h.in
++++ b/config.h.in
+@@ -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..00461089e252
--- /dev/null
+++ b/dev-lang/gnu-smalltalk/gnu-smalltalk-3.2.5.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit elisp-common flag-o-matic
+
+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
+
+PATCHES=(
+ # fix misuse of the Tcl API, bug 492710
+ "${FILESDIR}"/${PN}-3.2_use-result.patch
+)
+
+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..e7804d3fbd23
--- /dev/null
+++ b/dev-lang/gnu-smalltalk/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <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-0.2.6 b/dev-lang/gnuprologjava-0.2.6
deleted file mode 100644
index 10b2cc8c4357..000000000000
--- a/dev-lang/gnuprologjava-0.2.6
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup
-DEPEND=>=virtual/jdk-1.6:= dev-java/ant-core >=dev-java/java-config-2.2.0-r3 >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=GNU Prolog for Java is an implementation of ISO Prolog as a Java library
-EAPI=5
-HOMEPAGE=http://www.gnu.org/software/gnuprologjava
-IUSE=doc elibc_FreeBSD elibc_FreeBSD
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-3+
-RDEPEND=>=virtual/jdk-1.6:= >=dev-java/java-config-2.2.0-r3
-SLOT=0
-SRC_URI=mirror://gnu/gnuprologjava/gnuprologjava-0.2.6-src.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=b3afe0bf3a2a9394048d8771dacd39fa
diff --git a/dev-lang/gnuprologjava/Manifest b/dev-lang/gnuprologjava/Manifest
new file mode 100644
index 000000000000..bd0807913292
--- /dev/null
+++ b/dev-lang/gnuprologjava/Manifest
@@ -0,0 +1,4 @@
+AUX gnuprologjava-0.2.6-manual.patch 414 BLAKE2B 6bad70e46f1c2e9bdf9e4ef45cdbc4a4074671de28188aac7b69082e44eed86ef3fc1be1b5e83ea81da52df5d1b218583ab7ae73fdeeeb8241f50e8d45c23713 SHA512 419b509abae773e5ac3f2d79328bb4014776cc7c6390b8afa2d3d7242afec41e92d22830ed1be3c15f3d007c9fa08b303b553d883b18e1bde1fe9af09a0c7644
+DIST gnuprologjava-0.2.6-src.zip 477058 BLAKE2B 00248df0b307b733595b585ed5b847413d5de32c3348008ce53bb4dab93bfc465531bd59ea224f5c0bc6a66c3186ff55d353a0fe88d222b490927100cbafceea SHA512 b175c74e754a7176f5fc38ea2215809bb9d60ec5b8852f99a48a72a0bdb316b33b7195ff5c85398bb63aa2e522d12dfc75e2ff3af9f89ff44448d2f73357f0a4
+EBUILD gnuprologjava-0.2.6.ebuild 838 BLAKE2B 289f4e669963ac5660b20ac07f21d3c5029a14e908b4d8a09d25930c3d86fb5477b81799a19803b0575c1f5a917275d5e262c6199b7e7d2b2055702768e5674d SHA512 f74d26baa10ad05b53fe3af7c63e3b6749bce9d23e28d2dcc1ac001784e3c4782b965abf1603e21a42a95d575c547aaea6d2e5e2ac4e8b86e3db71efc7efb3cf
+MISC metadata.xml 236 BLAKE2B 665f3de6dc90f46a18379b3416063a49b1a79ddd7ef89eaed9be78f9adc5b234e9693cd31d6cf2d3477fc7dc00055492bef7de78da6c901c4a6e55eb0e781325 SHA512 e776224736bd575412c7b5b799f649c6b2947a70e6a9aea580063d9da7d09a8144e5ebaf7ac3ef131d578486cf05dec814dce11b2aeb884cded3be3cab70fcec
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-1.10.1 b/dev-lang/go-1.10.1
deleted file mode 100644
index 348b43b85c92..000000000000
--- a/dev-lang/go-1.10.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install pretend test unpack
-DEPEND=gccgo? ( >=sys-devel/gcc-5[go] )
-DESCRIPTION=A concurrent garbage collected and typesafe programming language
-EAPI=6
-HOMEPAGE=https://golang.org
-IUSE=gccgo
-KEYWORDS=-* amd64 arm ~arm64 ~ppc64 ~s390 x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris
-LICENSE=BSD
-RDEPEND=!<dev-go/go-tools-0_pre20150902
-RESTRICT=test strip
-SLOT=0/1.10.1
-SRC_URI=https://storage.googleapis.com/golang/go1.10.1.src.tar.gz !gccgo? ( amd64? ( https://dev.gentoo.org/~williamh/dist/go-linux-amd64-bootstrap-1.8.tbz ) arm? ( https://dev.gentoo.org/~williamh/dist/go-linux-arm-bootstrap-1.8.tbz ) arm64? ( https://dev.gentoo.org/~williamh/dist/go-linux-arm64-bootstrap-1.8.tbz ) ppc64? ( https://dev.gentoo.org/~williamh/dist/go-linux-ppc64-bootstrap-1.8.tbz https://dev.gentoo.org/~williamh/dist/go-linux-ppc64le-bootstrap-1.8.tbz ) s390? ( https://dev.gentoo.org/~williamh/dist/go-linux-s390x-bootstrap-1.8.tbz ) x86? ( https://dev.gentoo.org/~williamh/dist/go-linux-386-bootstrap-1.8.tbz ) amd64-fbsd? ( https://dev.gentoo.org/~williamh/dist/go-freebsd-amd64-bootstrap-1.8.tbz ) x86-fbsd? ( https://dev.gentoo.org/~williamh/dist/go-freebsd-386-bootstrap-1.8.tbz ) x64-macos? ( https://dev.gentoo.org/~williamh/dist/go-darwin-amd64-bootstrap-1.8.tbz ) x64-solaris? ( https://dev.gentoo.org/~williamh/dist/go-solaris-amd64-bootstrap-1.8.tbz ) )
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=f380ace2e33c3e6075ff5fd6185fa6c6
diff --git a/dev-lang/go-1.10.2 b/dev-lang/go-1.10.2
deleted file mode 100644
index f16469e059e2..000000000000
--- a/dev-lang/go-1.10.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install pretend test unpack
-DEPEND=gccgo? ( >=sys-devel/gcc-5[go] )
-DESCRIPTION=A concurrent garbage collected and typesafe programming language
-EAPI=6
-HOMEPAGE=https://golang.org
-IUSE=gccgo
-KEYWORDS=-* ~amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris
-LICENSE=BSD
-RDEPEND=!<dev-go/go-tools-0_pre20150902
-RESTRICT=test strip
-SLOT=0/1.10.2
-SRC_URI=https://storage.googleapis.com/golang/go1.10.2.src.tar.gz !gccgo? ( amd64? ( https://dev.gentoo.org/~williamh/dist/go-linux-amd64-bootstrap-1.8.tbz ) arm? ( https://dev.gentoo.org/~williamh/dist/go-linux-arm-bootstrap-1.8.tbz ) arm64? ( https://dev.gentoo.org/~williamh/dist/go-linux-arm64-bootstrap-1.8.tbz ) ppc64? ( https://dev.gentoo.org/~williamh/dist/go-linux-ppc64-bootstrap-1.8.tbz https://dev.gentoo.org/~williamh/dist/go-linux-ppc64le-bootstrap-1.8.tbz ) s390? ( https://dev.gentoo.org/~williamh/dist/go-linux-s390x-bootstrap-1.8.tbz ) x86? ( https://dev.gentoo.org/~williamh/dist/go-linux-386-bootstrap-1.8.tbz ) amd64-fbsd? ( https://dev.gentoo.org/~williamh/dist/go-freebsd-amd64-bootstrap-1.8.tbz ) x86-fbsd? ( https://dev.gentoo.org/~williamh/dist/go-freebsd-386-bootstrap-1.8.tbz ) x64-macos? ( https://dev.gentoo.org/~williamh/dist/go-darwin-amd64-bootstrap-1.8.tbz ) x64-solaris? ( https://dev.gentoo.org/~williamh/dist/go-solaris-amd64-bootstrap-1.8.tbz ) )
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=ebf03a71d708fa20b89f4978688a63f4
diff --git a/dev-lang/go-1.10.3 b/dev-lang/go-1.10.3
deleted file mode 100644
index 1dd16610d734..000000000000
--- a/dev-lang/go-1.10.3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install pretend test unpack
-DEPEND=gccgo? ( >=sys-devel/gcc-5[go] )
-DESCRIPTION=A concurrent garbage collected and typesafe programming language
-EAPI=6
-HOMEPAGE=https://golang.org
-IUSE=gccgo
-KEYWORDS=-* amd64 ~arm ~arm64 ~ppc64 ~s390 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris
-LICENSE=BSD
-RDEPEND=!<dev-go/go-tools-0_pre20150902
-RESTRICT=test strip
-SLOT=0/1.10.3
-SRC_URI=https://storage.googleapis.com/golang/go1.10.3.src.tar.gz !gccgo? ( amd64? ( https://dev.gentoo.org/~williamh/dist/go-linux-amd64-bootstrap-1.8.tbz ) arm? ( https://dev.gentoo.org/~williamh/dist/go-linux-arm-bootstrap-1.8.tbz ) arm64? ( https://dev.gentoo.org/~williamh/dist/go-linux-arm64-bootstrap-1.8.tbz ) ppc64? ( https://dev.gentoo.org/~williamh/dist/go-linux-ppc64-bootstrap-1.8.tbz https://dev.gentoo.org/~williamh/dist/go-linux-ppc64le-bootstrap-1.8.tbz ) s390? ( https://dev.gentoo.org/~williamh/dist/go-linux-s390x-bootstrap-1.8.tbz ) x86? ( https://dev.gentoo.org/~williamh/dist/go-linux-386-bootstrap-1.8.tbz ) amd64-fbsd? ( https://dev.gentoo.org/~williamh/dist/go-freebsd-amd64-bootstrap-1.8.tbz ) x86-fbsd? ( https://dev.gentoo.org/~williamh/dist/go-freebsd-386-bootstrap-1.8.tbz ) x64-macos? ( https://dev.gentoo.org/~williamh/dist/go-darwin-amd64-bootstrap-1.8.tbz ) x64-solaris? ( https://dev.gentoo.org/~williamh/dist/go-solaris-amd64-bootstrap-1.8.tbz ) )
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=63f99ff2cace51490868d39b15eeeb6a
diff --git a/dev-lang/go-1.9.6 b/dev-lang/go-1.9.6
deleted file mode 100644
index 3f728f4e0a09..000000000000
--- a/dev-lang/go-1.9.6
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install pretend test unpack
-DEPEND=gccgo? ( >=sys-devel/gcc-5[go] )
-DESCRIPTION=A concurrent garbage collected and typesafe programming language
-EAPI=6
-HOMEPAGE=https://golang.org
-IUSE=gccgo
-KEYWORDS=-* ~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris
-LICENSE=BSD
-RDEPEND=!<dev-go/go-tools-0_pre20150902
-RESTRICT=test strip
-SLOT=0/1.9.6
-SRC_URI=https://storage.googleapis.com/golang/go1.9.6.src.tar.gz !gccgo? ( amd64? ( https://dev.gentoo.org/~williamh/dist/go-linux-amd64-bootstrap-1.8.tbz ) arm? ( https://dev.gentoo.org/~williamh/dist/go-linux-arm-bootstrap-1.8.tbz ) arm64? ( https://dev.gentoo.org/~williamh/dist/go-linux-arm64-bootstrap-1.8.tbz ) ppc64? ( https://dev.gentoo.org/~williamh/dist/go-linux-ppc64-bootstrap-1.8.tbz https://dev.gentoo.org/~williamh/dist/go-linux-ppc64le-bootstrap-1.8.tbz ) s390? ( https://dev.gentoo.org/~williamh/dist/go-linux-s390x-bootstrap-1.8.tbz ) x86? ( https://dev.gentoo.org/~williamh/dist/go-linux-386-bootstrap-1.8.tbz ) amd64-fbsd? ( https://dev.gentoo.org/~williamh/dist/go-freebsd-amd64-bootstrap-1.8.tbz ) x86-fbsd? ( https://dev.gentoo.org/~williamh/dist/go-freebsd-386-bootstrap-1.8.tbz ) x64-macos? ( https://dev.gentoo.org/~williamh/dist/go-darwin-amd64-bootstrap-1.8.tbz ) x64-solaris? ( https://dev.gentoo.org/~williamh/dist/go-solaris-amd64-bootstrap-1.8.tbz ) )
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=09807ca7fb641e75d070258d94181b56
diff --git a/dev-lang/go-1.9.7 b/dev-lang/go-1.9.7
deleted file mode 100644
index ae05ed4c9eab..000000000000
--- a/dev-lang/go-1.9.7
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install pretend test unpack
-DEPEND=gccgo? ( >=sys-devel/gcc-5[go] )
-DESCRIPTION=A concurrent garbage collected and typesafe programming language
-EAPI=6
-HOMEPAGE=https://golang.org
-IUSE=gccgo
-KEYWORDS=-* amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~x64-macos ~x64-solaris
-LICENSE=BSD
-RDEPEND=!<dev-go/go-tools-0_pre20150902
-RESTRICT=test strip
-SLOT=0/1.9.7
-SRC_URI=https://storage.googleapis.com/golang/go1.9.7.src.tar.gz !gccgo? ( amd64? ( https://dev.gentoo.org/~williamh/dist/go-linux-amd64-bootstrap-1.8.tbz ) arm? ( https://dev.gentoo.org/~williamh/dist/go-linux-arm-bootstrap-1.8.tbz ) arm64? ( https://dev.gentoo.org/~williamh/dist/go-linux-arm64-bootstrap-1.8.tbz ) ppc64? ( https://dev.gentoo.org/~williamh/dist/go-linux-ppc64-bootstrap-1.8.tbz https://dev.gentoo.org/~williamh/dist/go-linux-ppc64le-bootstrap-1.8.tbz ) s390? ( https://dev.gentoo.org/~williamh/dist/go-linux-s390x-bootstrap-1.8.tbz ) x86? ( https://dev.gentoo.org/~williamh/dist/go-linux-386-bootstrap-1.8.tbz ) amd64-fbsd? ( https://dev.gentoo.org/~williamh/dist/go-freebsd-amd64-bootstrap-1.8.tbz ) x86-fbsd? ( https://dev.gentoo.org/~williamh/dist/go-freebsd-386-bootstrap-1.8.tbz ) x64-macos? ( https://dev.gentoo.org/~williamh/dist/go-darwin-amd64-bootstrap-1.8.tbz ) x64-solaris? ( https://dev.gentoo.org/~williamh/dist/go-solaris-amd64-bootstrap-1.8.tbz ) )
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=65718ad024e338b856745ab34316e144
diff --git a/dev-lang/go-9999 b/dev-lang/go-9999
deleted file mode 100644
index 4f13c29d99ec..000000000000
--- a/dev-lang/go-9999
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install pretend test unpack
-DEPEND=gccgo? ( >=sys-devel/gcc-5[go] ) >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=A concurrent garbage collected and typesafe programming language
-EAPI=6
-HOMEPAGE=https://golang.org
-IUSE=gccgo
-LICENSE=BSD
-RDEPEND=!<dev-go/go-tools-0_pre20150902
-RESTRICT=strip
-SLOT=0/9999
-SRC_URI=!gccgo? ( amd64? ( https://dev.gentoo.org/~williamh/dist/go-linux-amd64-bootstrap-1.8.tbz ) arm? ( https://dev.gentoo.org/~williamh/dist/go-linux-arm-bootstrap-1.8.tbz ) arm64? ( https://dev.gentoo.org/~williamh/dist/go-linux-arm64-bootstrap-1.8.tbz ) ppc64? ( https://dev.gentoo.org/~williamh/dist/go-linux-ppc64-bootstrap-1.8.tbz https://dev.gentoo.org/~williamh/dist/go-linux-ppc64le-bootstrap-1.8.tbz ) s390? ( https://dev.gentoo.org/~williamh/dist/go-linux-s390x-bootstrap-1.8.tbz ) x86? ( https://dev.gentoo.org/~williamh/dist/go-linux-386-bootstrap-1.8.tbz ) amd64-fbsd? ( https://dev.gentoo.org/~williamh/dist/go-freebsd-amd64-bootstrap-1.8.tbz ) x86-fbsd? ( https://dev.gentoo.org/~williamh/dist/go-freebsd-386-bootstrap-1.8.tbz ) x64-macos? ( https://dev.gentoo.org/~williamh/dist/go-darwin-amd64-bootstrap-1.8.tbz ) x64-solaris? ( https://dev.gentoo.org/~williamh/dist/go-solaris-amd64-bootstrap-1.8.tbz ) )
-_eclasses_=git-r3 8f6de46b0aa318aea0e8cac62ece098b multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=09807ca7fb641e75d070258d94181b56
diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest
new file mode 100644
index 000000000000..42d0b5578457
--- /dev/null
+++ b/dev-lang/go/Manifest
@@ -0,0 +1,23 @@
+DIST go-darwin-amd64-bootstrap-1.8.tbz 55053831 BLAKE2B 7d87ff36b0e13b3b3c0b8ffc4516493e1a6dde1287675b85b591c1d0a8438c9cb9c8991dc53d3c94c5ebb26830da1c7177ef1f90c250c1efeb5868020abcc660 SHA512 4cc24d44c84c94feafab021c0977fcea2aca8f191c6395e38fff68154b1e64efc3f94331c3e36c7b69901af58e9d53545c682f0a742d36b2d230508bd69777c4
+DIST go-freebsd-386-bootstrap-1.8.tbz 53739013 BLAKE2B a91e0a6b601aadc965f774ffd25a185e1f300e7194e969337f32bf9cb3056769786d92ef697271e7434d72c04d9d6780bf0fb3cb70efa83fe53cc18dc23670ec SHA512 c92f849b2d92401657412cccc589042b2747e55b2f4813d674c5bc91c3f535ee60f8ed7b8cbf1320e216d22a16dade8b78bb8071982895901f2b3c304e38f478
+DIST go-freebsd-amd64-bootstrap-1.8.tbz 55103927 BLAKE2B 30e4e4bcb43da3a170f520b47cd032a524d4c4977a9c76c4d597bb50e21a3ad2ef764dec15085d97cb5791bd483d8fac10ef5949c56b46e7580468fc9c90a78c SHA512 c7d50731ff41147295ef5f3233aa1404081b47e786a300e1d0e4db8348e56bd73fe5f169fe8b807ffa37a53683e3aef16ebb6e877d802b86ff1a3d5d3a6f44cb
+DIST go-linux-386-bootstrap-1.8.tbz 53843745 BLAKE2B 6bbb6df7ea0f7307386590524261f9ec477e7032171020ac3ed4a09bf9c39075ba4143c466611b0ab28cc4b494dec75063ecb291d2166a82bc7601562e7e3685 SHA512 b456f7572d04c805a6fc756647c050460f76e5404dba41963c861c92f1600e9fedafe181a1f69132518065737a88edb4b183ec8c3ca24bc8df31279117e92606
+DIST go-linux-amd64-bootstrap-1.8.tbz 55399105 BLAKE2B 2a0b101b9dfd9db8c62dfc12418a7b03d6a346de43f7c75a8272d05ca12c36b4844b0f631199c5944a436e50aeeb6cd591323268ecdf33ec2412283efab8c59b SHA512 89d68cfe0e6ce4be690cf52a4a02b17ef2cae3538b057d4690bfd6e93727bcdc1cbc17cba3403e652bb95bffd25d44bdd4efd0014d1d2f019838bde925139f57
+DIST go-linux-arm-bootstrap-1.8.tbz 53948103 BLAKE2B 515051e777ad273999c82f31b8a07ba61b77fbeede761a72b52c0bc3a7b55da013b5061af03a1b9634bf7b44429d7b371b89be85fb9e4f3a23d4d1a3c52bd90b SHA512 98ff0dbdb2aca9e54ea5327c9d31ce389e434a887015ef8555a8e85223a9998075c5013045275fb995a877a8d247704a21d726d46df7097adc0c4aa03af4cd68
+DIST go-linux-arm64-bootstrap-1.8.tbz 51947002 BLAKE2B 5899f5d304031eae96b66ed7aa21f5af13b0fdfdcd7a12095bda2eff0f5fe5610135f9370b34681e4c33f33c1e0428a2a09c1c8a581c6b170da223f57cac4607 SHA512 adfbe62c5594c267707078bf8afb94a793dfba004c04a1a60f96d023d96c2fc4a6a422dee93a0f3487b1f2e1e117c7c6c607b62126dd5535686aaed88f6659d9
+DIST go-linux-ppc64-bootstrap-1.8.tbz 52315782 BLAKE2B 6be0a48e8bc4e5fed4d34f8aaa8dfb6ad4d513064275dd940d0f58b25d442b33ad71c11687d317448b93d9c4690f7412e5a6a4553ec5298663409416cec04fbf SHA512 0aa32ac1514055ed9140b8c8330cbdbadfd9da6ad00b60d49b0685473be21e0b6510c31394678e32048f2f38d06a0d575f453c555614664eaef2bf5be6c91734
+DIST go-linux-ppc64le-bootstrap-1.8.tbz 52211575 BLAKE2B 7a28ec5a381369c4e9415c8360e904c2545380513afd328077c584e8af0bf6bd818aa03e5a58c350cbb98facc1c9dccb02b06adcb27233875497cf5d33265912 SHA512 6931d999dd0ee1ff44c4cec48acb27af061f57f87aa74802dcebab78553b46bc8ac732f07fe91e5074dbdd32c55b707994875934bfb12bb4276d71eb1d06c4ba
+DIST go-linux-s390x-bootstrap-1.8.tbz 57124869 BLAKE2B 920a176b8f4fc3a816e724324bbb30a383d599e31a0d2093d24797dbcd0e799a662a3589dbb87d2f5dd16df07c4cf8f1e444e87b540ec732746bb025dc9271f8 SHA512 d429cae870d66217ab2e07c74209d3031d97baa4f899b4d70ae6283a1a5b1434b037904c4cfca0b2bc798d5ba0b358c3739e000eccbc74809baf564c5686df5a
+DIST go-solaris-amd64-bootstrap-1.8.tbz 54926326 BLAKE2B 0a45312f090d81ebf46fe5950cb65c059e2801394231e715e94145d1f918eb59b10472b2385e57ebd5cfb9eca0ad7290fb118436486b665520bb540970f971ab SHA512 52b849e5b9a940e10de7ba3df0ebdf6e1c5d631de9581d936c9edf8f38e6bb3314acbc2b2d5202b0528fde2a359d52bc0c6f39acf9b1b614725e4b4a947ed10d
+DIST go1.10.1.src.tar.gz 18305765 BLAKE2B 61b8db22c50b9a4653244dc18267f405607755932d84ea2c475338a9f4a5421da2bb8cc808dbd166aa35c3c8778180bf47d6e51ebe303bc62e582516919058f9 SHA512 13f6b0643a4f92eeca04444b9fa10de38fc3427daea9aa3227cf9a5738ffee1a3f2e355ba5faf711b8506f7de118bdcd3b9064b65407a22613523e29ffd73415
+DIST go1.10.2.src.tar.gz 18308678 BLAKE2B 5f16757f879e9be9d2e936bc5e3cefcfd32914dbe7def8252b20ac647c90cfae09dfd7ff782f55cee4b3fecda6cc88c547f20087b571dbd06bc7600510c788bc SHA512 754e60bce1ea3479ebb57bbbb625e3d7875a151e7a6d7a1067478a9e45bde5423f47123d084832bb838acf7675a9d05057b76c1d773e43cae0fb4e7a52acf4a9
+DIST go1.10.3.src.tar.gz 18323736 BLAKE2B f07ea774378eb25e28fc29ce6d8d7ed84227d4b93bfa93d38a071fe294da30c3cdc3a559d643e7379873df56b0e2731dbd772e385ffcb4b2e93819db3b4e33f2 SHA512 fd2bd5fcb5c6d0a5336c4b1d2cacb368edbb01359297a83bdedc53f6018642598232f00633fc60fde879050f5f26a810c828d46b5d6626cbcc0702d93ad33fbb
+DIST go1.9.6.src.tar.gz 16397247 BLAKE2B 36c9077177bd7bbe9b40c422c5faf7aa83fdd8a2360051cb026346a9fea35297d892d6c677962c498ea8531c1748d58a55bbb1db7c1cf323a1d65c0b9b8573fd SHA512 f7863a4fe586414c91465a6a82a47097b2593384688a7c68ad3e9981559047b4faf2c134104ad09a64125576dac557809884d9f125d91108dd51746620a368a2
+DIST go1.9.7.src.tar.gz 16401688 BLAKE2B f6fa7b7171595f6bb2b1860c10a34c386b781504b772a37b60ccd613850f916a463bdb1e2bf299c3d8e78e38cbdf0b59e1ee8dfc3597ef888450efb3eb6afc49 SHA512 1ed3375870223a73c9cf94839bfd8894b92f44f9a3ba3b2bec1e9cd8d2212519344c8afcb87a516d6ad3e1ccdc74d9dba225a222bdc5e60f6d73cb474d5f7664
+EBUILD go-1.10.1.ebuild 5653 BLAKE2B 4807f630943168bc970ee2f94acdd82b7619c55d0ea7fd33fbc5f5f0107342f1edf18edfe8e4c6f1a75063755c67a8b0c5d578ca3de275d8c960315dead33c5a SHA512 f51d57aa2a504ae77b3f117f2a3f1d088d534a3dcf9ec16d102e71b42a479618a18b495b6aacf967f90d7cbaf47f3e7c39e16d65fa120be1bba7726c552d1e48
+EBUILD go-1.10.2.ebuild 5656 BLAKE2B 1a140da0f482e46eaf80aa9836e934440fb309a61519c164999e75340614b383fc18dcc4cf3d70addd42f5ef289c9b167dfdc99abf52159aedb163c7426684e2 SHA512 630d6003c12c9f512f4c259be18e5c5716627968cc4725ed6d016076984aae3f90b30ce542ed8407f95a9db377502265e30b6a36d5725ce36ca3005d2c00535a
+EBUILD go-1.10.3.ebuild 5655 BLAKE2B 7eeae6212b8d371aeb4b8aa8f5376a9cbd0ef29fc8646bfb4f0a8e8145433276eee8cc9e74b40251a56659d208f67c371412604f3030cc8db2f371b65eeb1d5a SHA512 82bc0e570ae1fba804597ed8dad534d6a4fc10f77856828efc2079239bde331a606b63b652540cf24826071d2c1a845a316a38a3cdc325c4aa029dfb65e387f1
+EBUILD go-1.9.6.ebuild 5650 BLAKE2B ad97b072bf73db28d60b1afb3bc3fea2159d87edc3ed0433b3e010979b01568caf81f7d6f22959ed854b7870ca5e0397a0f71e2e9488c4bb277ce0bc0a591a9f SHA512 a5a1c5037c52422d98b42c5688ba88918e548c8679d722d7d85dc3c51228ac944400a339a8e6a4018f2f438afec8365cd3550b35e6b595b097eecdec08befc84
+EBUILD go-1.9.7.ebuild 5649 BLAKE2B d448a6132d795715d7b42daa2f437b1bfadeae1fb5c4cef936343c0e31bd415bd5a6deab2a3690ddc03afbac612ec2a9d39951dfcdc49b3217016bbc620a25fc SHA512 275f0808e1e1b0687ed1ea85785afd02713e6877fe2a107b614522644fe5b7a81742f16aa8291c4001ef225ff7e31ed4270c3d8dcc991b2d97d20f1174f72f0f
+EBUILD go-9999.ebuild 5650 BLAKE2B ad97b072bf73db28d60b1afb3bc3fea2159d87edc3ed0433b3e010979b01568caf81f7d6f22959ed854b7870ca5e0397a0f71e2e9488c4bb277ce0bc0a591a9f SHA512 a5a1c5037c52422d98b42c5688ba88918e548c8679d722d7d85dc3c51228ac944400a339a8e6a4018f2f438afec8365cd3550b35e6b595b097eecdec08befc84
+MISC metadata.xml 538 BLAKE2B 78502c369a490804b2c69eef864276c2be5d0ee84ec189b6cc8584f8f42668a35f3c74bd25ceb53c469716337cbab908c576ca880c492f5961fedafc74cc346f SHA512 514a441a522218fdca543a22370e965a2bfc1f1f2c37e77431143329bb3d3f4f53e99ad5d7f7d7c61877f77387a777f7b4f339b9a3e45322d01d39d3d0ea1309
diff --git a/dev-lang/go/go-1.10.1.ebuild b/dev-lang/go/go-1.10.1.ebuild
new file mode 100644
index 000000000000..d383981a727b
--- /dev/null
+++ b/dev-lang/go/go-1.10.1.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2018 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 ~s390 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/escapeinfo.gox
+ 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.10.2.ebuild b/dev-lang/go/go-1.10.2.ebuild
new file mode 100644
index 000000000000..8c2ff8874012
--- /dev/null
+++ b/dev-lang/go/go-1.10.2.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2018 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 ~s390 ~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/escapeinfo.gox
+ 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.10.3.ebuild b/dev-lang/go/go-1.10.3.ebuild
new file mode 100644
index 000000000000..085d8581d6b1
--- /dev/null
+++ b/dev-lang/go/go-1.10.3.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2018 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 ~s390 ~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/escapeinfo.gox
+ 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.6.ebuild b/dev-lang/go/go-1.9.6.ebuild
new file mode 100644
index 000000000000..503bf3c4a123
--- /dev/null
+++ b/dev-lang/go/go-1.9.6.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2018 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/escapeinfo.gox
+ 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.7.ebuild b/dev-lang/go/go-1.9.7.ebuild
new file mode 100644
index 000000000000..a5edf13b59d7
--- /dev/null
+++ b/dev-lang/go/go-1.9.7.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2018 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/escapeinfo.gox
+ 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..503bf3c4a123
--- /dev/null
+++ b/dev-lang/go/go-9999.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2018 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/escapeinfo.gox
+ 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-1.4.4 b/dev-lang/gprolog-1.4.4
deleted file mode 100644
index b7f6fb029481..000000000000
--- a/dev-lang/gprolog-1.4.4
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DESCRIPTION=A native Prolog compiler with constraint solving over finite domains (FD)
-EAPI=4
-HOMEPAGE=http://www.gprolog.org/
-IUSE=debug doc examples
-KEYWORDS=amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris
-LICENSE=GPL-2 LGPL-3
-SLOT=0
-SRC_URI=mirror://gnu/gprolog/gprolog-1.4.4.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=cf8d1cd6f3703a17f56d5299ccc431f6
diff --git a/dev-lang/gprolog/Manifest b/dev-lang/gprolog/Manifest
new file mode 100644
index 000000000000..4c3d690befb8
--- /dev/null
+++ b/dev-lang/gprolog/Manifest
@@ -0,0 +1,8 @@
+AUX gprolog-1.4.4-ldflags.patch 2015 BLAKE2B c537f22b21fb6032b29533da86d69545b264ca8266dba070efb4acf91cda113cd71606e69b120fc61a5e567382e965e348635d99c468f276c3854f11c2668fa9 SHA512 6b2c7efc33a17bb69ac14b807a54a67a4327071616c40296c60d8b25abe6231dd673138cd383ee4e232b53fe02fdf06c1a391ec3dd67dc2002ae39d40f37e7ef
+AUX gprolog-1.4.4-links.patch 562 BLAKE2B 9569312424294c5336cc4f45a12bf2b3e06e56196f5e2176afe685a5685327537165d730639ebaf18b26aac49292745a7ab3e6835bc9555a9e657cd14efe2da7 SHA512 ab3e41c8c55035ca466062b7a5184f23c32a568a41714add6577c0f2e573fe72e05b3aa69427406d05d88c4cb171148a0fd9d084b69d34657dfbf573513a1128
+AUX gprolog-1.4.4-nodocs.patch 1191 BLAKE2B 31e46875bf88eb1ffcae700e86d9314f6e059b7f8d37f5be8be784e5b5fb0b37a7dadc5014c348024e75586f1c8f9c61ab3666846b43ba1b44480acf55a559f6 SHA512 c0dd7f705adaadbd5aa0bf164717928b5de52b507b2e6e9b8e07bcc99f43f8d010f8d7283a76f429d70b1024ae2db47fe01cef911857a5ad0d7c6693c2da1a28
+AUX gprolog-1.4.4-pic-code.patch 568 BLAKE2B 36847ec044120bcb26770c62fb3b56c1cf82cf67343684193a771700a89b43433311cc118583d0845032a2d51c14da61b3b2acafb25622ce2543335c130ace28 SHA512 190f693751b307f5390c5a2fde7e2a8ac6e9be6fa66ded5161b3b94a9db2a0789ed3a10b7aa8e00104473dc01a081889db9f7deddde6f94dfaa447804cde286d
+AUX gprolog-1.4.4-txt-file.patch 652 BLAKE2B f3f077473eabd7902da263bc88d7e3b7034a8f794ba7ff25d96e72ae33ee399f0fac31cdf912df79dbd9bc0b3c2aa15dd910c3ef0ad621a2ea48e7ba278682bb SHA512 658014da6b6e75555e9fbe4c55769de2401ebac627634d0046fb14e10e51e8f8915509bc482f6f1254c63d6fa47199757b31f94db6271dc4fdc8f02e2e0c59cc
+DIST gprolog-1.4.4.tar.gz 3538152 BLAKE2B 159cf58e6d7f33662a6bd11f284abd9e52be0f82cafe180263148d13002e66987253e9dcd7db232b33470ddb685570efe3615c7029af96be44bb556bd9c2d261 SHA512 b6227a06794d31162f2c790a025f7372a6676c1891a76e880d2152aeab6322d3341aeab85e11d9be6d97ff1c69801bee73fa3ea6b0659af61f55990a455dc212
+EBUILD gprolog-1.4.4.ebuild 1557 BLAKE2B 9b6f76d4bd2ad7771c6b7e179fc57ba6b1691799942d4cbc85eec70dfb375e298ca4c7fcd01d4e762c103e517a237586ebbb60b1d088a97c4ea1ac2d7286775c SHA512 30f9edfe26b273f9d23609450761aef70c2d50e4a894fb87cd7ab773087fd410d99c7f489bbb554db656308e7e76fca36c40cb289013d7ee132188086d46a6c7
+MISC metadata.xml 236 BLAKE2B 665f3de6dc90f46a18379b3416063a49b1a79ddd7ef89eaed9be78f9adc5b234e9693cd31d6cf2d3477fc7dc00055492bef7de78da6c901c4a6e55eb0e781325 SHA512 e776224736bd575412c7b5b799f649c6b2947a70e6a9aea580063d9da7d09a8144e5ebaf7ac3ef131d578486cf05dec814dce11b2aeb884cded3be3cab70fcec
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-2.4.0-r1 b/dev-lang/gwydion-dylan-bin-2.4.0-r1
deleted file mode 100644
index 2a7eda5c2d91..000000000000
--- a/dev-lang/gwydion-dylan-bin-2.4.0-r1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install
-DESCRIPTION=The Dylan Programming Language Compiler
-EAPI=0
-HOMEPAGE=http://www.gwydiondylan.org/
-KEYWORDS=~x86
-LICENSE=MIT
-RDEPEND=>=dev-libs/boehm-gc-6.4
-RESTRICT=strip
-SLOT=0
-SRC_URI=x86? ( mirror://gentoo/gwydion-dylan-bin-2.4.0-x86.tbz2 )
-_md5_=ae5cdbbf191c3b4855c8414336cd1032
diff --git a/dev-lang/gwydion-dylan-bin/Manifest b/dev-lang/gwydion-dylan-bin/Manifest
new file mode 100644
index 000000000000..e827603ab663
--- /dev/null
+++ b/dev-lang/gwydion-dylan-bin/Manifest
@@ -0,0 +1,4 @@
+AUX 20gwydion-dylan-bin 195 BLAKE2B 83192dc8c2af47d3079d313155a6e4a88b4d91b5cb41ace7e4f78b700bfbb1f954a34d893d594b29fbb6135bedc036dc4c34068048eae825f131152588d968ad SHA512 28c3921fab8d8aec4de4ba902609c4500fb8f60a7b9ac6791ad7f139a2ad4fe991680cdeaa485fc7b7a5791cfa516559ef3d53d21fe9085c72cdf4421557e9af
+DIST gwydion-dylan-bin-2.4.0-x86.tbz2 5846864 BLAKE2B 51ed9364636fa1700fe2fa26e5075b02cb376ced9fc568fcb3f2e2635de301b6cd7207d09715dafdabfd1cca72c9e47eac3c292b9c235825b78bc2335fdcd6f2 SHA512 878c68f922fd02a2f5d6a64d94706d878502c143a02e34dc325e68f3881fcbea2a71a81f000ee0d40d494f6e7cf3f4aeef5208ea2efb62b24e6b7afdf7d87070
+EBUILD gwydion-dylan-bin-2.4.0-r1.ebuild 550 BLAKE2B 9f7fc407c59a3f1d1d88b4d0f26034029f552f5e65ebaecfa864cc957d49f9bba803c32568c7afec8b7f9e8bad85e22d12685d3fed0ac991d0fe619edf593bc1 SHA512 cec1119bcc18664ec0e8719d2cd953ced4ed17096d5189f90d17bacad46dd75f85cdbb8aa7fe72443756c2fc1d45bdbf59b4462d215b29e8109479947e27ca6d
+MISC metadata.xml 746 BLAKE2B 49684c907257e83a8d256ff661675351716f55888e529abc056dd3feaff0f6e557666991af10a87e1da2a2d2cb0e760269c20799d1ea08fed0d57ec6596dc2af SHA512 8c778a1e2b36af09213a4af64de7a301ac043f4e6e3c51825619ff52acf46f0f585f01db4280383e1366d35031bb9c90b0db12b7338fa1ef6843f3b2bca05fa1
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..af7bc78d4cb2
--- /dev/null
+++ b/dev-lang/gwydion-dylan-bin/gwydion-dylan-bin-2.4.0-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+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-1.6 b/dev-lang/helium-1.6
deleted file mode 100644
index 48e19887c6b9..000000000000
--- a/dev-lang/helium-1.6
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install unpack
-DEPEND=>=dev-lang/ghc-6.8 dev-haskell/mtl dev-haskell/parsec readline? ( dev-haskell/readline ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1 >=sys-devel/automake-1.15.1 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Helium (for learning Haskell)
-EAPI=0
-HOMEPAGE=http://www.cs.uu.nl/helium
-IUSE=readline
-KEYWORDS=-amd64 ~x86
-LICENSE=GPL-2
-RDEPEND=dev-libs/gmp readline? ( sys-libs/readline )
-SLOT=0
-SRC_URI=http://www.cs.uu.nl/helium/distr/helium-1.6-src.tar.gz mirror://gentoo/helium-1.6-ghc.patch.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=e32e702fcacaadf0cd9eeb94144af2c1
diff --git a/dev-lang/helium-1.8.1 b/dev-lang/helium-1.8.1
deleted file mode 100644
index 6f95214d6ccd..000000000000
--- a/dev-lang/helium-1.8.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare setup test
-DEPEND=>=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:= >=dev-haskell/cabal-1.10.1.0 doc? ( || ( dev-haskell/haddock >=dev-lang/ghc-7.10.2 ) ) hscolour? ( dev-haskell/hscolour )
-DESCRIPTION=The Helium Compiler
-EAPI=5
-HOMEPAGE=http://www.cs.uu.nl/wiki/bin/view/Helium/WebHome
-IUSE=doc hscolour profile
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-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:=
-SLOT=0/1.8.1
-SRC_URI=mirror://hackage/packages/archive/helium/1.8.1/helium-1.8.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ghc-package a0d34e2f5f204f01c404ae1ce539542a haskell-cabal 45605f3898bdc59eb016fb50ca27bf18 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c27ebe977fcfe2a96c9a8dca69c2cc69
diff --git a/dev-lang/helium/Manifest b/dev-lang/helium/Manifest
new file mode 100644
index 000000000000..2bd5b6f2806a
--- /dev/null
+++ b/dev-lang/helium/Manifest
@@ -0,0 +1,9 @@
+AUX helium-1.6-respect-cflags-ldflags-nostrip.patch 1847 BLAKE2B a2c6a0d7282bed6d48e24c852e052d29983a1f60ff63f11a9da7ea5c19cb7dde3c6ac40cc03213130ed0060f48923dc513faffabaf98c3b3f61b744d5946b5d0 SHA512 cd3f176f618cc32bb4feb1b693e9b281e388897380172c85645b478d6be79b164e57754b5c7cb58bc55b956644323900bb6bca5bfa74b28857a69f9eeeb52635
+AUX helium-1.8.1-ghc-7.10.patch 2459 BLAKE2B 0719a5f5308c6eac8a86a4b8c060da15d8fed9530504597b3a1cb427f95626fc2277ac689cc0626aee4851481946827e13e8eb645ce5d09c4ab33b02dff10e06 SHA512 fd63893965fefce259d01a464e95ee081dd1d46d36a2ae2901b541e14fc5a5eca9f44fb96de58775e0ca2d4b758d40bfb4f6acc746f6a8c98e3c552c04513531
+AUX helium-wrapper-1.6 549 BLAKE2B d7a863f904114a830e27e6367ab18573e047f0681ff81ff2e7abb8592fc47868a58c5997b01795792ad6dd6b5db62eedfe2cfc393fbe4aff2556fd608deec417 SHA512 254fc560106914ca992ff6318f6a69c3a284f54791eed55ec1a332123b09a6fc840f66caf3af977fcb3a9ee0019e825819d22e26747f40a3c11eb5f8fbf382f6
+DIST helium-1.6-ghc.patch.bz2 34579 BLAKE2B a2454589721e32a45e2adca41a4ba3bd0c17ecc9f1616aa276e590e56491f9b2e5b89bf0ed33624931edf4a72f24201245cd0873c8ea2448a3996ee6d1d8fd94 SHA512 ac86750a98d3c87cb00e8777ad0e5a838df9d87ebdd8540d1c5a297a8488c810acbecf4d665ef7754da0f99729785f48fb77d24fc09f3c963fe972e06dc952c8
+DIST helium-1.6-src.tar.gz 960254 BLAKE2B db7a23b6d18f3b19c024857a043aaee31837b81bd67c3133a566a21ab8615f3bc019322f3ca08437e3acdbb092a60d41a9162ff95026052caaf2da1bd777ae47 SHA512 f102c5a4f669cb0b7fecdf3efdf9dacf0cddb97e9bf5cbdebd0801169802dbfefbe3de08d3f36c1c66a3839a3b080e241840f5135eea40860a91157815026a95
+DIST helium-1.8.1.tar.gz 774509 BLAKE2B 05e28d1140cd48925a2c4d06c5c152e06879389d666d54b0c5d7592453489f8e2bbaa8e7c20dbd9d72fe57a3f9651bffa05d156a32e0208e41ef0e78599353fa SHA512 4523d7323251354ea9f4fd0f6f5a112659119bef2fc0c790bb139cdcdf25e7f740ae4c7d584d0c93aabc3baaace8be49931808c59ad9133b81a64ae115e0f9b9
+EBUILD helium-1.6.ebuild 3763 BLAKE2B b3481f5122af00161b56d3199e24af6d36fd8beb1c26286aca5d320f2650aa5e17e9e335fbe7d54beee568e27e86551b173ea5c904a21ef1909d0091cf86b85c SHA512 07aa2cf067c2521d22c9f6d964699f160e202c71ad83d3dba0b1288a8e4d9796bed1ae27788134a0258ab27304adb4c9eca216797deb47752bcd503a7bc3e559
+EBUILD helium-1.8.1.ebuild 858 BLAKE2B 5bad1df0c0dee503be0f0a892006ae9165e45ecad2ac2669138e85dff47668197420c9314a0fda25767dc02eafb4ae42f9c3eb64440d2a89475ceb83d2ca3a73 SHA512 68990388e9f231d1cc5d8b26af8f89acd59b47883a414eac31d2a6f8b22d98422a05cdcc5e9c333001e0fbd04748668096287ef8e0077b0427f7229896184aea
+MISC metadata.xml 249 BLAKE2B 84b809c265ff2a09d1f06c66d4797652ff4c64205d94323e07333ae0fbddcfb8c58d0176a8cc52bd37e9353371d987b9b473b9747cb082e1c2871ed80fcfa144 SHA512 ce055b41ff1c10209e88579fe21ce16550be7e9b21f87724564f06430aa6f478974f186a10c8ff7e92398f534c09109aeed57eae1c6d2b56b5c99ebfb64a0015
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..a68f9c8a68d1
--- /dev/null
+++ b/dev-lang/helium/helium-1.6.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+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 ~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-0.10.0 b/dev-lang/hy-0.10.0
deleted file mode 100644
index 94948de4bcf7..000000000000
--- a/dev-lang/hy-0.10.0
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/flake8[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/astor[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] test? ( dev-python/tox[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/nose[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/sphinx[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/coverage[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-DESCRIPTION=A LISP dialect running in python
-EAPI=5
-HOMEPAGE=http://hylang.org/
-IUSE=test python_targets_python2_7
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=dev-python/flake8[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] dev-python/astor[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 )
-RESTRICT=test
-SLOT=0
-SRC_URI=https://github.com/hylang/hy/archive/0.10.0.tar.gz -> hy-0.10.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=0229dd3ea74cabffa9449da655d85b4f
diff --git a/dev-lang/hy-0.10.1 b/dev-lang/hy-0.10.1
deleted file mode 100644
index e4dc4f0de9c3..000000000000
--- a/dev-lang/hy-0.10.1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] dev-python/astor[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] test? ( dev-python/tox[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] dev-python/nose[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] dev-python/coverage[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)]
-DESCRIPTION=A LISP dialect running in python
-EAPI=5
-HOMEPAGE=http://hylang.org/
-IUSE=test python_targets_python2_7 python_targets_python3_4
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] dev-python/astor[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 )
-RESTRICT=test
-SLOT=0
-SRC_URI=https://github.com/hylang/hy/archive/0.10.1.tar.gz -> hy-0.10.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=9d352ddccc4c37742266464ad84e985a
diff --git a/dev-lang/hy-0.11.1 b/dev-lang/hy-0.11.1
deleted file mode 100644
index b550eb54e67d..000000000000
--- a/dev-lang/hy-0.11.1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/astor-0.5[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/clint[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] doc? ( dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] ) test? ( dev-python/tox[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/nose[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/coverage[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)]
-DESCRIPTION=A LISP dialect running in python
-EAPI=5
-HOMEPAGE=http://hylang.org/
-IUSE=test doc examples python_targets_python2_7 python_targets_python3_4 python_targets_python3_5
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/astor-0.5[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/clint[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 )
-RESTRICT=test
-SLOT=0
-SRC_URI=https://github.com/hylang/hy/archive/0.11.1.tar.gz -> hy-0.11.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=440cb18fc565f34996e934204a3e3d3a
diff --git a/dev-lang/hy-0.12.0 b/dev-lang/hy-0.12.0
deleted file mode 100644
index 5a17c8152b86..000000000000
--- a/dev-lang/hy-0.12.0
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/astor-0.5[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/clint[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] doc? ( dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] ) test? ( dev-python/tox[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/nose[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/coverage[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)]
-DESCRIPTION=A LISP dialect running in python
-EAPI=5
-HOMEPAGE=http://hylang.org/
-IUSE=test doc examples python_targets_python2_7 python_targets_python3_4 python_targets_python3_5
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/astor-0.5[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/clint[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 )
-RESTRICT=test
-SLOT=0
-SRC_URI=https://github.com/hylang/hy/archive/0.12.0.tar.gz -> hy-0.12.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=837709073ccd58895b21cf76df49a7d2
diff --git a/dev-lang/hy-0.12.1 b/dev-lang/hy-0.12.1
deleted file mode 100644
index 623eb4a08469..000000000000
--- a/dev-lang/hy-0.12.1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/astor-0.5[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/clint-0.4[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] doc? ( dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] ) test? ( dev-python/tox[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/nose[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/coverage[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)]
-DESCRIPTION=A LISP dialect running in python
-EAPI=5
-HOMEPAGE=http://hylang.org/
-IUSE=test doc examples python_targets_python2_7 python_targets_python3_4 python_targets_python3_5
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/astor-0.5[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/clint-0.4[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 )
-RESTRICT=test
-SLOT=0
-SRC_URI=https://github.com/hylang/hy/archive/0.12.1.tar.gz -> hy-0.12.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=b5a49874e46d8500422057409e27398b
diff --git a/dev-lang/hy-0.13.0 b/dev-lang/hy-0.13.0
deleted file mode 100644
index f111796ff9d3..000000000000
--- a/dev-lang/hy-0.13.0
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/astor-0.5[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/clint-0.4[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] doc? ( dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] ) test? ( dev-python/tox[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/nose[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/coverage[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)]
-DESCRIPTION=A LISP dialect running in python
-EAPI=5
-HOMEPAGE=http://hylang.org/
-IUSE=test doc python_targets_python2_7 python_targets_python3_4 python_targets_python3_5
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/astor-0.5[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/clint-0.4[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 )
-RESTRICT=test
-SLOT=0
-SRC_URI=https://github.com/hylang/hy/archive/0.13.0.tar.gz -> hy-0.13.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=0cc18c9342e0e435d6c48b6705e5a5b8
diff --git a/dev-lang/hy-0.13.1 b/dev-lang/hy-0.13.1
deleted file mode 100644
index be3e0e44a9d1..000000000000
--- a/dev-lang/hy-0.13.1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/astor-0.5[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/clint-0.4[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] doc? ( dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] ) test? ( dev-python/tox[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/nose[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] dev-python/coverage[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)]
-DESCRIPTION=A LISP dialect running in python
-EAPI=5
-HOMEPAGE=http://hylang.org/
-IUSE=test doc python_targets_python2_7 python_targets_python3_4 python_targets_python3_5
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/rply-0.7.0[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/astor-0.5[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-python/clint-0.4[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 )
-RESTRICT=test
-SLOT=0
-SRC_URI=https://github.com/hylang/hy/archive/0.13.1.tar.gz -> hy-0.13.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=0cc18c9342e0e435d6c48b6705e5a5b8
diff --git a/dev-lang/hy-0.14.0 b/dev-lang/hy-0.14.0
deleted file mode 100644
index 74718d41f8b2..000000000000
--- a/dev-lang/hy-0.14.0
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/rply-0.7.5[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/astor-0.6[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/clint-0.4[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] doc? ( dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] ) test? ( dev-python/tox[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] dev-python/nose[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] dev-python/coverage[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]
-DESCRIPTION=A LISP dialect running in python
-EAPI=5
-HOMEPAGE=http://hylang.org/
-IUSE=test doc python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-RDEPEND=dev-python/flake8[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/rply-0.7.5[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/astor-0.6[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] >=dev-python/clint-0.4[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)] python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) python_targets_python3_4? ( dev-lang/python:3.4 ) python_targets_python3_5? ( dev-lang/python:3.5 ) python_targets_python3_6? ( dev-lang/python:3.6 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-),-python_single_target_python3_6(-)]
-REQUIRED_USE=|| ( python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 )
-RESTRICT=test
-SLOT=0
-SRC_URI=https://github.com/hylang/hy/archive/0.14.0.tar.gz -> hy-0.14.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 distutils-r1 63fea93ca1cc4fdc5fa2247afc4e3a15 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=add651eb6d307ca5216a696734769441
diff --git a/dev-lang/hy/Manifest b/dev-lang/hy/Manifest
new file mode 100644
index 000000000000..7740f1e5b679
--- /dev/null
+++ b/dev-lang/hy/Manifest
@@ -0,0 +1,17 @@
+DIST hy-0.10.0.tar.gz 340981 BLAKE2B d9f163ce1d8eaf6e333444e1329a9d08552682a0dddb3c2d27c989d788425c3aabf822c36030ec5fc421ac1b2f25962a5c353b6fc89f75612cd4607ed2da9aa4 SHA512 4f994289a00f16ed9c914fe8f37332d1bea9ddf3d2f42c30793da1030983d66d368d4bf75853dd76be14e440fca72aa3cccd3ddb5544e1db2b892a543bb1093b
+DIST hy-0.10.1.tar.gz 348807 BLAKE2B 3ff499b4922c47534baa83eb7b151d1b43787cb07a652ffd36e99eff5551b794f7e186379c9985c338356f48d67d03f96173c062f8ff280c97bdf55ed04d2fc8 SHA512 d96a5857fc6985fe044a152b276572f7943d3c579cf54daa675ec5d3e5d44836c151eb58f8e5cea8811f3bcb32b724fb24f8d61dc9ba917972673630e9cff7dc
+DIST hy-0.11.1.tar.gz 358882 BLAKE2B c488079bd660f747d7a90abaef5563111bebe401eadb967689435f8fa38605c7fbffc8b9c4ed3660d3e2805bf0017224f6a5299a45762f45f5192c7d274ff879 SHA512 c3bb39e41bba306a529051aa214350dd51118bce956670b9688ecbd08d8e85c23efd4eae06977bab7f3a50f8cca1626d7a6442de6b59972fe1d91bdb791aa836
+DIST hy-0.12.0.tar.gz 379282 BLAKE2B 349d5f02aac0e04808efee8a6ea1bf17dbae3e71561d0192372acc09b63a8d6b808e8f7a60bd07a19265e443a3b10d2638b0749bf51ced1ee378cbf31f5c5864 SHA512 fcad30640aad329c8a8c66167e01f96eddad95fd0d23ce8bf641ed96865c0a7610e8792bc94343edaa36a9a643e72ff946e491e55ca429f6a14a55bd05631470
+DIST hy-0.12.1.tar.gz 379361 BLAKE2B 212a902f287d5b358e9fa4a54ad7bcbf21ed693d6adb3138c942563d2147248abdf5f0e46753815db8c607ed5b7b78a0f5d0d14074ae7c96bd5efbf849263ebe SHA512 8b1c957b37aa46baf7ac2a20d7ea4321824ee13e08146edcfdd7eb727151aa34036f9d696687df06e6fa48550bd91d6ad3484bab47da8ea3b154363c48e66980
+DIST hy-0.13.0.tar.gz 383197 BLAKE2B 5ec7826ebe8b4809c1a49d5dac333fd9e60b5a1a5aee947194df47c5f05bada34f2341e779dcf371c0736721cf93d0d114bb0fe4cd46d124b81c226e39aad533 SHA512 a1138c73584f5dc839d8085aaef24da6450789a0d466cea61ecb3740f865ee2aadc52dde3e5c76d945f16fb88c5fdfa4fd9bbcf35cdcd3fc2337fd1f13548b54
+DIST hy-0.13.1.tar.gz 383213 BLAKE2B e002218811cadf8db558284e7124114891c76df334ac3cda7b02c57bcdc37c0e65fb202f07f694d6948159051b88631ec9cb22f22207bf23b39c75125bcfcad3 SHA512 40ec426152ef20ff3d4e23043d9ab178a924a2dca3586fd2dfddf5477612246024222b50e62e6f356649c0d035fd202da89e974acf345db6e5c807883dbb86c5
+DIST hy-0.14.0.tar.gz 403692 BLAKE2B 4d20574151c443e002e365bceecc11b2bdcd7aa294073c58cba4ec8a958534c9f1256848ef57e4d5dd3ec345decaa53db43768a78af542ba8a59ff50489486b1 SHA512 a04da48592058b8ad3e7d2a787149622bfcf61c01a341ccc166c2e25e18ed7616b6567b529cf4f6d80a9cecf44aac175577ebf185c77e941a11a258f8563da9e
+EBUILD hy-0.10.0.ebuild 807 BLAKE2B 03d4a01ecf3f0446e80ea3e2e925540a9544a5539f558246f6701b2e9fb536b843e9415d4ec525b6d2f2cbc9b619185c930f79d67910d6247a75cb6cf080f2ae SHA512 19341e28a59212b19ac3713773b2f0111b85302b581a0068dbcc433500935f9d8f7289011e4e03211c8fd7ca047aff210236b01be3877f0a4a9c08143b48bc9f
+EBUILD hy-0.10.1.ebuild 817 BLAKE2B 999099c504645da0849beee79a99b8b6f55b55bc25ba7986c2e3f8e72e92c164ddf3acb0fe3d648f172ee40c49ea7b853d0c5d7ba1033a709ff60a430b9d3391 SHA512 673d7dea190c41d50c68e396da6c9c336e5c879c1271aeeac195d9ca5f99d61b04f2fd0c57097283727f2b9318d08f859774de273916249feb89bdd1511f69a3
+EBUILD hy-0.11.1.ebuild 1074 BLAKE2B 020f79c22d1ee7ac106b4514d185f9acd4f633c5c1e7e253b017586b7c47ad50f9a379cf9cb6ac6b544d45371b2002d2c3d1c363654d56f99dbbc0c037971377 SHA512 31ef5c2a2a4b95b2ffa8d42a89ee3cc43bf460bdef00e3d33d264bff824fb04579764363a2b549f27792f556dcfdcbbebb0b261b6d3d08a533ac121bb6995aaf
+EBUILD hy-0.12.0.ebuild 1074 BLAKE2B 4b5dcb068fe68fa368818baae7d432c9699bd43ae2b9fbab889ec73fdde6259cd5de42a883e1aa4c5ea3d052068ae27b15a22084482388a00a5f0466cea17b7c SHA512 d949bb55f82f616ee272dbd82e03699c2b382916728b42b10c91a67aa986a0b116a3ec6b231d840271576c1a753d5e8235da377c9e5723db612255a98e90b832
+EBUILD hy-0.12.1.ebuild 1080 BLAKE2B 54a1eb432f10c82d461cc1568696c17d81ab4bcc985782f93477b6563342eea63226a8c37e0706ed929f9a828dc2f199f13f7e30da79a7983a774ae5a6347000 SHA512 241fae912c048907fccf4a9321a082df4f2c379ecddb64f7747862cefea9a2ca6f65175d585e9720630877c8399583d2f2c42ca44a87ae1bcf5152a81ef28df1
+EBUILD hy-0.13.0.ebuild 1036 BLAKE2B f818641b2cd4792715b677baf83f3e13fc5098774297fbc93f1d8c3a006637fcd8c6db549da65b2debd0fdd242e4ab933c087f13d42a82be33660df38c144ce1 SHA512 9c2605a00ec3ccbdcb6d5a5fde924f9a72b386d126469e38434c2eaccc9791b48a19cb92c2e84b32eadf6d99225d59aacbdc8c809643120fac61fbd85b89a35c
+EBUILD hy-0.13.1.ebuild 1036 BLAKE2B f818641b2cd4792715b677baf83f3e13fc5098774297fbc93f1d8c3a006637fcd8c6db549da65b2debd0fdd242e4ab933c087f13d42a82be33660df38c144ce1 SHA512 9c2605a00ec3ccbdcb6d5a5fde924f9a72b386d126469e38434c2eaccc9791b48a19cb92c2e84b32eadf6d99225d59aacbdc8c809643120fac61fbd85b89a35c
+EBUILD hy-0.14.0.ebuild 1040 BLAKE2B a84df9761053ab573b20a8d47f229338a4137857cc3e7952c9b02fb552f40adfe56a5773eb31460d6904a40e19590caf8a628fa083c27fc3ff9b9ed459a9d3d1 SHA512 412c9bf2c00713ea9c59b9a66479729c43e4370f69c7e98aec266c7feca3b203a7157ec49eead4b088b41d20905704bee5b9671725140b2a246d833c4519f8f4
+MISC metadata.xml 331 BLAKE2B 1377771edc92d3cd1ea685b43816a4ffd6c84d06245f00414df594d9d1aee498ca2a5ede2d92c2f0607fd26127730a8f7e1e6eadf6fd916325967b282e32f092 SHA512 97afa7992933d5088e939afd4005e188fd2979ccf7fc21561561b14e1eecfee61e867288c21b4a396fc5ca4926fd3d62c9d8c5be217b9392a5208371fa3aa719
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/hy-0.13.1.ebuild b/dev-lang/hy/hy-0.13.1.ebuild
new file mode 100644
index 000000000000..f42227b60a04
--- /dev/null
+++ b/dev-lang/hy/hy-0.13.1.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/hy-0.14.0.ebuild b/dev-lang/hy/hy-0.14.0.ebuild
new file mode 100644
index 000000000000..0d11fe04da02
--- /dev/null
+++ b/dev-lang/hy/hy-0.14.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2018 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,3_6})
+
+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.5[${PYTHON_USEDEP}]
+ >=dev-python/astor-0.6[${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/icon-9.5.1-r1 b/dev-lang/icon-9.5.1-r1
deleted file mode 100644
index acfa1e9b12c7..000000000000
--- a/dev-lang/icon-9.5.1-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=X? ( x11-libs/libX11:= ) X? ( x11-libs/libXpm x11-libs/libXt )
-DESCRIPTION=very high level language
-EAPI=6
-HOMEPAGE=http://www.cs.arizona.edu/icon/
-IUSE=X iplsrc
-KEYWORDS=alpha amd64 ~hppa ia64 ~ppc ~ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=public-domain HPND
-RDEPEND=X? ( x11-libs/libX11:= )
-SLOT=0
-SRC_URI=http://www.cs.arizona.edu/icon/ftp/packages/unix/icon-v951src.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=2339187f19da71d047f07f796c8ed7c4
diff --git a/dev-lang/icon/Manifest b/dev-lang/icon/Manifest
new file mode 100644
index 000000000000..c89c82afd8fd
--- /dev/null
+++ b/dev-lang/icon/Manifest
@@ -0,0 +1,4 @@
+AUX icon-9.5.1-flags.patch 2148 BLAKE2B 37fcaca92f67be74caddbf7789ca4e666a4e0b98e7cac3a89376bae5c50fd248eae0f0b282a46ec8d6dc55f5c423ad6dc69744d2999e96ec183d9bb369f7e7b0 SHA512 28b201a1347167b028187d6d35cb50450cf6a13b48fbf65a616683fb6c5d3373d9ba9e64c3d6fe397e858388c88a52ab330a00dc5e4ca087567089e8cdd3c897
+DIST icon-v951src.tgz 3133040 BLAKE2B 790a66a8210c1b9c55514a560590f08d3e52d7c5115d60554183f1118b5705fc1754b8188dcc3b5b739318374d568b6eafc1e3c4266de5416709e7ce6056925b SHA512 032dc9cfa57af5af2eb84b2116d0537124b5efb87b7cf744ecace2ccf49e461d5be5f91df99d85e8a988520d144fe4ecf06a6e78f7fff997b78afa95355449ad
+EBUILD icon-9.5.1-r1.ebuild 2519 BLAKE2B 0c2cfb5c74878481e6d0b6926705497e565505052ca3969aa405941700b4d58ccf03623449ca4d327d5b067e978e852e44494abe0ed3f51b3994b2a566f8a1d0 SHA512 880a9d3d48715d20846592c61196eef061446dcaaaef6620475f38955c5218c9792d3c20b3069048d6075b31ba74f76a481c3e5e507fd2f8a41e624578088b74
+MISC metadata.xml 467 BLAKE2B b480285505dec662f62038d22a88323f01f21b100de7ee652f2e3d5f5f4cdf4345ad7d303f2713b1a2816157c46610c2f5287cb385c61998f68fd95d09bf9d5b SHA512 1a77000b72ae453ecb2bd4452e32ea917328a61bb882e107b96f013ddaa218e951743569e38e97210a341755bd7c891324123d96e56da9a5a7caa93ad4dbb93a
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/icon-9.5.1-r1.ebuild b/dev-lang/icon/icon-9.5.1-r1.ebuild
new file mode 100644
index 000000000000..726160fc0d17
--- /dev/null
+++ b/dev-lang/icon/icon-9.5.1-r1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="very high level language"
+HOMEPAGE="http://www.cs.arizona.edu/icon/"
+
+MY_PV=${PV//./}
+SRC_URI="http://www.cs.arizona.edu/icon/ftp/packages/unix/icon-v${MY_PV}src.tgz"
+
+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"
+
+RDEPEND="
+ X? ( x11-libs/libX11:= )"
+DEPEND="
+ ${RDEPEND}
+ X? (
+ x11-libs/libXpm
+ x11-libs/libXt
+ )"
+
+PATCHES=( "${FILESDIR}"/${PN}-9.5.1-flags.patch )
+
+src_prepare() {
+ default
+
+ # do not prestrip files
+ find 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
+
+ # Fails if more then one make job process.
+ # This is an upstream requirement.
+ emake -j1 $(usex X X-Configure Configure) name=${mytarget}
+
+ # 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() {
+ # Fails if more then one make job process.
+ # This is an upstream requirement.
+ emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_test() {
+ emake Samples
+ emake Test
+}
+
+src_install() {
+ # Needed for make Install
+ dodir /usr/$(get_libdir)
+
+ emake Install dest="${D}/usr/$(get_libdir)/icon"
+ 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
+
+ cd "${S}/doc" || die
+ DOCS=( *.txt ../README )
+
+ HTML_DOCS=( *.{htm,gif,jpg,css} )
+ einstalldocs
+
+ # Clean up items from make Install that get installed elsewhere
+ rm -rf "${ED}"/usr/$(get_libdir)/${PN}/man || die
+ rm -rf "${ED}"/usr/$(get_libdir)/icon/{doc,README} || die
+
+ # optional Icon Programming Library
+ if use iplsrc; then
+ cd "${S}" || die
+
+ # Remove unneeded files before copy
+ 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..3a8dc81cb0aa
--- /dev/null
+++ b/dev-lang/icon/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>cwills@witznd.net</email>
+ <name>Cheyenne Wills</name>
+ </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/inform-6.33.1_p2 b/dev-lang/inform-6.33.1_p2
deleted file mode 100644
index ecfca362858d..000000000000
--- a/dev-lang/inform-6.33.1_p2
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install
-DESCRIPTION=design system for interactive fiction
-EAPI=5
-HOMEPAGE=http://www.inform-fiction.org/
-IUSE=emacs
-KEYWORDS=amd64 ~ppc ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos
-LICENSE=Artistic-2 Inform
-PDEPEND=emacs? ( app-emacs/inform-mode )
-SLOT=0
-SRC_URI=http://mirror.ifarchive.org/if-archive/infocom/compilers/inform6/source/inform-6.33.1-b2.tar.gz
-_md5_=924ca06dee495d15a564bbee6019532e
diff --git a/dev-lang/inform/Manifest b/dev-lang/inform/Manifest
new file mode 100644
index 000000000000..b71f9993fdbc
--- /dev/null
+++ b/dev-lang/inform/Manifest
@@ -0,0 +1,3 @@
+DIST inform-6.33.1-b2.tar.gz 1822648 BLAKE2B e2ea59aa310b2f0122d1b834d98b0b827b945a8031a3e61c70bf502f7a746f43b81035cc22805ab351abf6f9df9ba898ea6ea83da863ef9aa313840ed974d725 SHA512 12cc10b7dae4118600a4d19d0aa44c3a7c93dfc8aa17bd56df7b9237f21df0ae99db6840eefaa5b11ff346369c6f6f2f128167b3479c8f540c29e3e36666c368
+EBUILD inform-6.33.1_p2.ebuild 716 BLAKE2B 8dacc53e6cc8aca22ee5d4aae28d1870163acdc4267d22e6bfe6041a4885fdfda39e083a16dcf662da24a335a9a876a9c5c68cdc5d7eeb77d40dc97cd8a648c3 SHA512 1da71e2e8498c3e89c7764c4f5c7d6ac11ff4220f907bf51ffb89ed839b530889c90f97dede5871afb63b03a491df534f0e35eddaad7a4fd4e6dcea9dbb31640
+MISC metadata.xml 2554 BLAKE2B 586e187e7fd93eaa227006ad671c7fae3bb0c7429031a89dedde67fe1fc92747b1dde8e7c12254ac632a01170fec7f63fee73e6a4b274ebb6f8e4786d295a21d SHA512 a2183b870f6b667c1c630a8bca8f71405e53e350f862d34ce5763f25ee9c713879de9510a39c7fd62a50854f544967ffb0e19f30399c2d341a1f023c42856bc5
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-2.1.2 b/dev-lang/interprolog-2.1.2
deleted file mode 100644
index ea6d0da11d46..000000000000
--- a/dev-lang/interprolog-2.1.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install preinst setup unpack
-DEPEND=>=virtual/jdk-1.4 app-arch/unzip dev-java/ant-core =dev-java/junit-3.8* >=dev-java/java-config-2.2.0-r3 >=sys-apps/portage-2.1.2.7 >=dev-java/ant-core-1.8.2 >=sys-apps/portage-2.1.2.7 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=InterProlog is a Java front-end and enhancement for Prolog
-EAPI=0
-HOMEPAGE=http://www.declarativa.com/interprolog/
-IUSE=doc elibc_FreeBSD elibc_FreeBSD
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-2
-RDEPEND=>=virtual/jdk-1.4 =dev-java/junit-3.8* || ( dev-lang/xsb dev-lang/swi-prolog dev-lang/yap ) >=dev-java/java-config-2.2.0-r3 >=sys-apps/portage-2.1.2.7
-SLOT=0
-SRC_URI=http://www.declarativa.com/interprolog/interprolog212.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=7d2ae0035cf86898f31870ab5c44b97f
diff --git a/dev-lang/interprolog/Manifest b/dev-lang/interprolog/Manifest
new file mode 100644
index 000000000000..a4f76dff5b7a
--- /dev/null
+++ b/dev-lang/interprolog/Manifest
@@ -0,0 +1,5 @@
+AUX build.xml 1461 BLAKE2B 97f817f1c8a5594c5b9a0f449046c1c91d6789d27592f421fb0d92d0d21cb30f009d90c99b037900e109d791159ad49d78cd3f5bb99464d35cae0508128c648c SHA512 0e469d954d69db940fdf1893257f20d15d1009148d3979755edd448bc1cda9425df5169f6ddba3e37b8eaccd25f3fbb7bfeb3c58a572111be2474e1850a32cb6
+AUX interprolog-2.1.2-java1.4.patch 1341 BLAKE2B b1c02e38f990d8f693a274cb258b18151e5b5d93a8670ae40d2d0b29b25c8ee86c749463b880166d759509331c9bd58d57286f9c62b36ba53673291129d27a09 SHA512 cfd4a637e4d86172547448801c92decfa3f10fa7d02e007c42d8415901d742ecbdf1fca1e4034c7069885a06824f1577bc64f2454a2c31877af68e74ad3aa0d2
+DIST interprolog212.zip 1066931 BLAKE2B ea2666ff756c30db35262137938c32ee98d8a145ce59ea3b8694328771b8925395f7643ecabf9e0c010515176fdbbedcd333a81003a09c0ae1d9c1a94215e095 SHA512 e3d8b216f7e76d5d95ad9d27a96720075575fd717c89ddf9403376a72e18d56fd68afa2b1e6e70da55b99cd84043a16695ff37a59ec3366115cd4c36ed1ff50c
+EBUILD interprolog-2.1.2.ebuild 1180 BLAKE2B 88d35e894e03f6acf61a09a6d65007a162acfdfd98255d5aaa539e57026f5d55701c4f2c407da170b7abb575d1d65fff5a4df48cb89c5f28c735ef2368ed810f SHA512 f23b17be7103d48eba043ebfcc0e646a6ff7efff7c79a8783dbfec3e0a5a7726726d9b6cf75aa7456e75e88f4d5abb442062c0941bc22ab38d679f374084555a
+MISC metadata.xml 236 BLAKE2B 665f3de6dc90f46a18379b3416063a49b1a79ddd7ef89eaed9be78f9adc5b234e9693cd31d6cf2d3477fc7dc00055492bef7de78da6c901c4a6e55eb0e781325 SHA512 e776224736bd575412c7b5b799f649c6b2947a70e6a9aea580063d9da7d09a8144e5ebaf7ac3ef131d578486cf05dec814dce11b2aeb884cded3be3cab70fcec
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..7f9f9e0938fe
--- /dev/null
+++ b/dev-lang/interprolog/interprolog-2.1.2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+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-1.9.2 b/dev-lang/ispc-1.9.2
deleted file mode 100644
index ebc7eaf6da6b..000000000000
--- a/dev-lang/ispc-1.9.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install setup
-DEPEND=>=sys-devel/clang-3.0:* >=sys-devel/llvm-3.0:* || ( >=dev-lang/python-2.7.5-r2:2.7 ) sys-devel/bison sys-devel/flex
-DESCRIPTION=Intel SPMD Program Compiler
-EAPI=6
-HOMEPAGE=https://ispc.github.com/
-IUSE=examples
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD BSD-2 UoI-NCSA
-RDEPEND=>=sys-devel/clang-3.0:* >=sys-devel/llvm-3.0:*
-SLOT=0
-SRC_URI=https://github.com/ispc/ispc/archive/v1.9.2.tar.gz -> ispc-1.9.2.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=1b7acdf976bfec937113ed25dfb40482
diff --git a/dev-lang/ispc-9999 b/dev-lang/ispc-9999
deleted file mode 100644
index de115c21296d..000000000000
--- a/dev-lang/ispc-9999
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install setup unpack
-DEPEND=>=sys-devel/clang-3.0:* >=sys-devel/llvm-3.0:* || ( >=dev-lang/python-2.7.5-r2:2.7 ) sys-devel/bison sys-devel/flex >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=Intel SPMD Program Compiler
-EAPI=6
-HOMEPAGE=https://ispc.github.com/
-IUSE=examples
-LICENSE=BSD BSD-2 UoI-NCSA
-RDEPEND=>=sys-devel/clang-3.0:* >=sys-devel/llvm-3.0:*
-SLOT=0
-_eclasses_=git-r3 8f6de46b0aa318aea0e8cac62ece098b multilib 97f470f374f2e94ccab04a2fb21d811e python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=1b7acdf976bfec937113ed25dfb40482
diff --git a/dev-lang/ispc/Manifest b/dev-lang/ispc/Manifest
new file mode 100644
index 000000000000..d8bda5fa002d
--- /dev/null
+++ b/dev-lang/ispc/Manifest
@@ -0,0 +1,4 @@
+DIST ispc-1.9.2.tar.gz 19283765 BLAKE2B 500cca8a69a78ad9a21dc1e39dcb3ed01730e78deed61e4871ce5a9761829c80ac7b1b987d8e8a48c34b67ac96692b2c5026cfb5059a32c71e228c73550584eb SHA512 77a66086cbfd6c4dc855b3137a270cc40f24829255639aee5f562b0831c21938157667b20cfadc660cd67525c47e2e73b46692f7a11bf0c834dc60b69d40d76d
+EBUILD ispc-1.9.2.ebuild 1100 BLAKE2B 4bfdcf2d708ddc9e5c9e84f9a8adbab0111ceda9c5a10d7b11b21ef21cb24e56cca857e9cde0d593b0b1c49f1098a1ab0035d239ccc1b268ce1d5832c5979463 SHA512 5595b9a47e860adbfd6c7c9e3fa94f39f68f3d167cf17f3da964e51e8dfff170cf9ef6dcbee8ea82f1813f9a66d3724721ad2b44269e69703842a80d2aa25129
+EBUILD ispc-9999.ebuild 1100 BLAKE2B 4bfdcf2d708ddc9e5c9e84f9a8adbab0111ceda9c5a10d7b11b21ef21cb24e56cca857e9cde0d593b0b1c49f1098a1ab0035d239ccc1b268ce1d5832c5979463 SHA512 5595b9a47e860adbfd6c7c9e3fa94f39f68f3d167cf17f3da964e51e8dfff170cf9ef6dcbee8ea82f1813f9a66d3724721ad2b44269e69703842a80d2aa25129
+MISC metadata.xml 327 BLAKE2B 54a38462b0fe6a1ed78bf0098fa3e85c3c7e745e4777a90d9da67286f8f4bd5b3b1df035de5274c6c2cc3f04c4fd454bacf93e6a09ebf6ddb6fa3b832ec82b77 SHA512 94078b0d77481ac78255fc9fbceec4e204b7fa20da59f103d163eb22f33fb78d0dd2ae039157666f6e80eee81922a6e89acc2ddf89d29275ff19ce5e9391ca83
diff --git a/dev-lang/ispc/ispc-1.9.2.ebuild b/dev-lang/ispc/ispc-1.9.2.ebuild
new file mode 100644
index 000000000000..d1c2c2331127
--- /dev/null
+++ b/dev-lang/ispc/ispc-1.9.2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2018 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() {
+ #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..d1c2c2331127
--- /dev/null
+++ b/dev-lang/ispc/ispc-9999.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2018 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() {
+ #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/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-701-r2 b/dev-lang/j-701-r2
deleted file mode 100644
index 4ff4317d00db..000000000000
--- a/dev-lang/j-701-r2
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DESCRIPTION=Modern, high-level, general-purpose, high-performance programming language
-EAPI=4
-HOMEPAGE=http://jsoftware.com
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-SLOT=0
-SRC_URI=http://www.jsoftware.com/download/j701_b_source.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=7d1ba74cedcb6c45b692c521ed3ef370
diff --git a/dev-lang/j/Manifest b/dev-lang/j/Manifest
new file mode 100644
index 000000000000..9772a3141e3b
--- /dev/null
+++ b/dev-lang/j/Manifest
@@ -0,0 +1,3 @@
+DIST j701_b_source.tar.gz 808367 BLAKE2B 0ecaf7a7dd56a79f60d73930d8910beea075551a18b44904c8e90f1b37a8e7f02178198855058b1f1552b600de29ede096d481a58c9bbf9a990852c5bff25fa6 SHA512 f7ac035883098918ba4baa374a856a281a94adb83e7fb4828ef95d1a24aedc648b23593cc6ef6932e6ac546b0ba8215a8018265a3cb39c5008053c5ab7f74d57
+EBUILD j-701-r2.ebuild 1088 BLAKE2B e48bef2b593adb295147f2805b244ca2b1f1a95df2cfcf38df7b78fcd39988569007720b89bf0ce4d47875fe125529ef1d99762dd90b6366a431d46223848d1b SHA512 342139c62f3c5cc4a3bf16261c63ba99bad54f9f5913c57057e2078d6b772a8326f872ded368b28409417344452db773036e7909cb1c6f58687cf2150432041d
+MISC metadata.xml 247 BLAKE2B 5a20af3c9732ef7dba68131a08988652f5c93a6d186a82c4deb1bb9c06dc3ae73152a0d241cc346637f7b11caf4676da43301ba596c67b66669535e71db0b03e SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7
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-0.76 b/dev-lang/jimtcl-0.76
deleted file mode 100644
index 241a6ebcef13..000000000000
--- a/dev-lang/jimtcl-0.76
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare unpack
-DEPEND=doc? ( app-text/asciidoc ) app-arch/unzip
-DESCRIPTION=Small footprint implementation of Tcl programming language
-EAPI=5
-HOMEPAGE=http://jim.tcl.tk/
-IUSE=doc static-libs
-KEYWORDS=amd64 arm ~arm64 ~m68k ~mips ~s390 ~sh x86
-LICENSE=LGPL-2
-SLOT=0
-SRC_URI=https://github.com/msteveb/jimtcl/zipball/0.76 -> jimtcl-0.76.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf vcs-snapshot 3be1ab44131e8c0bbdaa75823008444b
-_md5_=9e2512c59a322bbf1efc044d34f0bd39
diff --git a/dev-lang/jimtcl-9999 b/dev-lang/jimtcl-9999
deleted file mode 100644
index 5868b84b7ba2..000000000000
--- a/dev-lang/jimtcl-9999
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=compile configure install prepare unpack
-DEPEND=doc? ( app-text/asciidoc ) app-arch/unzip >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=Small footprint implementation of Tcl programming language
-EAPI=5
-HOMEPAGE=http://jim.tcl.tk/
-IUSE=doc static-libs
-LICENSE=LGPL-2
-SLOT=0
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc git-r3 8f6de46b0aa318aea0e8cac62ece098b ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=a8e393aad5bfc952cb3b503d98985508
diff --git a/dev-lang/jimtcl/Manifest b/dev-lang/jimtcl/Manifest
new file mode 100644
index 000000000000..080b05232ef4
--- /dev/null
+++ b/dev-lang/jimtcl/Manifest
@@ -0,0 +1,5 @@
+AUX jimtcl-0.75-bootstrap.patch 585 BLAKE2B 7d1cce053ae41100764bdc9a7beca121b002774bcd2b5eb5f0e0fa318aa390cb852c62430ff30171695e44c274f2e4200a6b189ed3d2a07aef79c7cac7d9d83e SHA512 fe82d393a1a46e3db4567287717af4c1813205945459702ebc3a9423395994a9fa2a337a5569241f4aada4176ce8abd65f88081112a1e2def9a4b5eb237cb647
+DIST jimtcl-0.76.zip 2326715 BLAKE2B 50ea032cf46d2edeeecde1dc3b4deffcbd09b5dd3a6880963608b3f20616bf162fafc4ec2869bfe5de90231c4c9a29fb04710bd299cc5e8728ff20a86e46f32d SHA512 50763ea897fb5393083749cdd9e57a3f3d2d6dbebc40ee6371b1b86ebfc2f515e9775cd2acd6627f0f81b54bd72cd8c74be5aa9d0dbefc7c16372887e07f6ea4
+EBUILD jimtcl-0.76.ebuild 1506 BLAKE2B 675ac6813883875b02d8cc8d14a8e531d2907b94a3c3eb2725157c8da8249f54e8f8f4688cd8b211687d89b522db3b33a5c4aeaeeb10def9e7ee53a671dc726b SHA512 41b03bb2e030f04eaa82a42fec86109d4d5e5712c85db86c79d26c8738161448ca21ffe858d3deea3b55fc8fc104f2d3cc6270e2e8dca53450a4a90ab49ffc1f
+EBUILD jimtcl-9999.ebuild 1509 BLAKE2B f2dc03f49690da02ef431ff1744fea465c57c8a3388b4e0423f6f2efe4fe422b1b3a7e0bc66ef9003e44f5dfd4b114c0f63fc02908a9078cc14158fdf9129962 SHA512 66650ff32f2b83244da7906fc5905e2e2c89acdba403d85df9909f160b3a8edeb5969acc91093acca82d89c4de289231ff3d3a5ef8083869079cf7229163b028
+MISC metadata.xml 339 BLAKE2B fea57339323dd5891a6cdd1cf9a4db64c1a8e3a8255643a8288c4a11dfd82e35831ae6a0f07cefb97521548e6ac1154c975aee177fe3bc9abd0710bea1279792 SHA512 84a6a6b15c451483e0f07742ba07af92678738a7e7e272090fc1786fdfe9c18565a62949c344c4383b905edcdf7db45808d0bf0a2e56a43df08795c9e6e81183
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.76.ebuild b/dev-lang/jimtcl/jimtcl-0.76.ebuild
new file mode 100644
index 000000000000..0c0461946919
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-0.76.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="http://repo.or.cz/r/jimtcl.git"
+ inherit git-r3
+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-* || die
+ S=${PWD}
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.75-bootstrap.patch
+}
+
+src_configure() {
+ CCACHE=None econf --with-jim-shared
+ if use static-libs ; then
+ # The build does not support doing both simultaneously.
+ mkdir static-libs || die
+ cd static-libs || die
+ CCACHE=None ECONF_SOURCE=${S} econf
+ fi
+}
+
+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 || die
+ 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..64b38756f800
--- /dev/null
+++ b/dev-lang/jimtcl/jimtcl-9999.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils
+
+if [[ ${PV} == *9999 ]] ; then
+ EGIT_REPO_URI="http://repo.or.cz/r/jimtcl.git"
+ inherit git-r3
+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-* || die
+ S=${PWD}
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.75-bootstrap.patch
+}
+
+src_configure() {
+ CCACHE=None econf --with-jim-shared
+ if use static-libs ; then
+ # The build does not support doing both simultaneously.
+ mkdir static-libs || die
+ cd static-libs || die
+ CCACHE=None ECONF_SOURCE=${S} econf
+ fi
+}
+
+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 || die
+ 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-0.6.3-r1 b/dev-lang/julia-0.6.3-r1
deleted file mode 100644
index f0757e50d40c..000000000000
--- a/dev-lang/julia-0.6.3-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=sys-devel/llvm:4= sys-devel/clang:4= 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-libs/libunwind-1.1:7= sys-libs/readline:0= sys-libs/zlib:0= >=virtual/blas-3.6 virtual/lapack dev-vcs/git dev-util/patchelf virtual/pkgconfig
-DESCRIPTION=High-performance programming language for technical computing
-EAPI=6
-HOMEPAGE=https://julialang.org/
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux
-LICENSE=MIT
-RDEPEND=sys-devel/llvm:4= sys-devel/clang:4= 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-libs/libunwind-1.1:7= sys-libs/readline:0= sys-libs/zlib:0= >=virtual/blas-3.6 virtual/lapack
-RESTRICT=test
-SLOT=0
-SRC_URI=https://github.com/JuliaLang/julia/releases/download/v0.6.3/julia-0.6.3.tar.gz https://dev.gentoo.org/~tamiko/distfiles/julia-0.6.3-bundled.tar.gz
-_eclasses_=llvm f9e74238f1b5743ea5d7214fcc7dbb36 multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=3962a563c0df36a8faefca701ffa7efd
diff --git a/dev-lang/julia-9999 b/dev-lang/julia-9999
deleted file mode 100644
index eda5ad866b37..000000000000
--- a/dev-lang/julia-9999
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test unpack
-DEPEND=>=sys-devel/llvm-4.0.0:= >=sys-devel/clang-4.0.0:= 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-libs/libunwind-1.1:7= sys-libs/readline:0= sys-libs/zlib:0= >=virtual/blas-3.6 virtual/lapack dev-util/patchelf virtual/pkgconfig >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=High-performance programming language for technical computing
-EAPI=6
-HOMEPAGE=https://julialang.org/
-LICENSE=MIT
-RDEPEND=>=sys-devel/llvm-4.0.0:= >=sys-devel/clang-4.0.0:= 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-libs/libunwind-1.1:7= sys-libs/readline:0= sys-libs/zlib:0= >=virtual/blas-3.6 virtual/lapack
-RESTRICT=test
-SLOT=0
-_eclasses_=git-r3 8f6de46b0aa318aea0e8cac62ece098b llvm f9e74238f1b5743ea5d7214fcc7dbb36 multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=6497ab4c788073f0752d3f014d7b5a8c
diff --git a/dev-lang/julia/Manifest b/dev-lang/julia/Manifest
new file mode 100644
index 000000000000..60f324c1e94e
--- /dev/null
+++ b/dev-lang/julia/Manifest
@@ -0,0 +1,7 @@
+AUX julia-0.6.3-fix_build_system.patch 3543 BLAKE2B cbeefd07f805f5052e4ed505d442c4ca2ef02becd87211706298c3340dda6c2672f91246c5bc8d339a0d931b7a1c8121568a0bbbd382c75c7c463b0226363ae3 SHA512 0a7881db50df8dccd6296327a8029a7335d131e7c3e4233bf284ab50875bb12856ae8b08e381d322c48a5180343199a6c9e4a454118390136723bc254eb2dd1a
+AUX julia-9999-fix_build_system.patch 2920 BLAKE2B b9021a4092cb95c86b10ad7ff6e1623528070f81ef86c0b6524b88e93dd625df49aaaad43ede09bbac02e824b6bf589106289ea8cb9f702ef0617710ba8a94a9 SHA512 90b134e0eb2897300d7601f19a6010b9515162a12ab020002d99ae276d0bdd197efd512fd1468770dbc7204161bc90acfb84e9db7ba23b18d81bece98935e64f
+DIST julia-0.6.3-bundled.tar.gz 2099258 BLAKE2B dea1f5d37477e0a612e3901d7d568e8c4b350496f9d2b344cd7e2c2043ae30b4dd26b567803a2cb96d1ec4dbe2ba514fb08b925c695589746691887334330dd2 SHA512 d04cd55ba0dde08f253db3a388cf5ebe87cec8ae321a5af4c1c92f2680aa6e6ef2ebfa771ec74f8f1ff96409e2c0645476acf577859e8718eac4a581f097639d
+DIST julia-0.6.3.tar.gz 5542642 BLAKE2B cccd1ee2eb4d9f59382a0d1f6466e77c84b0542456c405c05b718bc8a39ff537a09760a523ee572fc9eee6797158aa00010fc4c931a80deac645fb1e45061c87 SHA512 f529bb30a17989234061cf4c3d87aecc6da720eb494efaca7be4ec1ed5eda60d440896fb76a45b6cb30205030256e7de765e8944f873b31d96f7c9ecac542db8
+EBUILD julia-0.6.3-r1.ebuild 4574 BLAKE2B 7433cd8f928505b5b357c3fd6531324c359af09b73114596398f49bc059b4964b725f72424fdcfeed3d43b48a2b560251b7b02e3d9c0ce4ae060011b0f823d60 SHA512 5fae0e3abf964214f957932c0d04a204d8cf1184a2ac4812bfd9d90fa899e5dad36ea0e501da8735daab922b5186da685c88f9188ac089566e36f701de5c3704
+EBUILD julia-9999.ebuild 3557 BLAKE2B 6cc962dcb0b40253bbe3c993f99a063b9587f470d8e6ffa0a6231d8a5806215d026b673abe878d5a169a096676a53902545176103a1a4bb302abbec2988897c2 SHA512 f4a24f9796c2fad173f261613056993fa0c513d6251b89a07853fef7dc97d9f56c781e283c1c66cb3a73e734050f577c0f1b6fd6fb153a78bd2456286aa1ca67
+MISC metadata.xml 1177 BLAKE2B 2b9a30c5fdce2acb40b98b010192144cf7462464d4776105e4b6cdce0782b4c55993a7e335804b301b0ae970b4eb0eeec354be9daa3d012ad28dbf0ba5975333 SHA512 4a33844ce7acdfd0812dd1b5f07b87b4dcf73fdae9eadd372f923a5b5397ded41d045fa3de27b92206ed47376499b7c23c962c29eb72778b2f79ef51342be873
diff --git a/dev-lang/julia/files/julia-0.6.3-fix_build_system.patch b/dev-lang/julia/files/julia-0.6.3-fix_build_system.patch
new file mode 100644
index 000000000000..41e64672adf8
--- /dev/null
+++ b/dev-lang/julia/files/julia-0.6.3-fix_build_system.patch
@@ -0,0 +1,96 @@
+diff --git a/Make.inc b/Make.inc
+index 7f3a37c..3560d93 100644
+--- a/Make.inc
++++ b/Make.inc
+@@ -180,7 +180,7 @@ USE_GPL_LIBS ?= 1
+ # Directories where said libraries get installed to
+ prefix ?= $(BUILDROOT)/julia-$(JULIA_COMMIT)
+ bindir := $(prefix)/bin
+-libdir := $(prefix)/lib
++libdir := $(prefix)/GENTOOLIBDIR
+ libexecdir := $(prefix)/libexec
+ datarootdir := $(prefix)/share
+ docdir := $(datarootdir)/doc/julia
+@@ -400,7 +400,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)
+@@ -411,7 +411,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
+@@ -440,7 +440,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 9fde74d..e01ab2e 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..336d6e3e590c
--- /dev/null
+++ b/dev-lang/julia/files/julia-9999-fix_build_system.patch
@@ -0,0 +1,75 @@
+diff --git a/Make.inc b/Make.inc
+index 8cb2c1014..d3be9de8e 100644
+--- a/Make.inc
++++ b/Make.inc
+@@ -178,7 +178,7 @@ USE_GPL_LIBS ?= 1
+ # Directories where said libraries get installed to
+ prefix ?= $(BUILDROOT)/julia-$(JULIA_COMMIT)
+ bindir := $(prefix)/bin
+-libdir := $(prefix)/lib
++libdir := $(prefix)/GENTOOLIBDIR
+ libexecdir := $(prefix)/libexec
+ datarootdir := $(prefix)/share
+ docdir := $(datarootdir)/doc/julia
+@@ -410,7 +410,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)
+@@ -421,7 +421,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
+@@ -450,7 +450,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 89b79880d..c3125fde1 100644
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -29,7 +29,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 257152d24..240a4a350 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -85,16 +85,7 @@ UV_HEADERS += uv/*.h
+ endif
+ PUBLIC_HEADER_TARGETS := $(addprefix $(build_includedir)/julia/,$(notdir $(PUBLIC_HEADERS)) $(UV_HEADERS))
+
+-ifeq ($(JULIACODEGEN),LLVM)
+-# 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
+-endif
++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.6.3-r1.ebuild b/dev-lang/julia/julia-0.6.3-r1.ebuild
new file mode 100644
index 000000000000..163fa629a208
--- /dev/null
+++ b/dev-lang/julia/julia-0.6.3-r1.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+RESTRICT="test"
+
+inherit llvm 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
+"
+
+S="${WORKDIR}/julia"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+# julia 0.6* is compatible with llvm-4
+RDEPEND="
+ sys-devel/llvm:4=
+ sys-devel/clang:4="
+LLVM_MAX_SLOT=4
+
+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-libs/libunwind-1.1:7=
+ 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}"/${PN}-0.6.3-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|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|GENTOOCFLAGS|${CFLAGS}|g" \
+ -e "s|GENTOOLIBDIR|$(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="${EPREFIX}/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="${EPREFIX}/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
+}
diff --git a/dev-lang/julia/julia-9999.ebuild b/dev-lang/julia/julia-9999.ebuild
new file mode 100644
index 000000000000..ee966c94ec4b
--- /dev/null
+++ b/dev-lang/julia/julia-9999.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+RESTRICT="test"
+
+inherit git-r3 llvm 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="
+ >=sys-devel/llvm-4.0.0:=
+ >=sys-devel/clang-4.0.0:="
+
+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-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() {
+ default
+
+ # 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|GENTOOCFLAGS|${CFLAGS}|g" \
+ -e "s|GENTOOLIBDIR|$(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="${EPREFIX}/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="${EPREFIX}/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
+}
diff --git a/dev-lang/julia/metadata.xml b/dev-lang/julia/metadata.xml
new file mode 100644
index 000000000000..16bdb691a738
--- /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="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</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-2.11a b/dev-lang/jwasm-2.11a
deleted file mode 100644
index 37f8adb8779e..000000000000
--- a/dev-lang/jwasm-2.11a
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DESCRIPTION=MASM-compatible TASM-similar assembler (fork of Wasm)
-EAPI=5
-HOMEPAGE=https://sourceforge.net/projects/jwasm/
-KEYWORDS=~amd64 ~x86
-LICENSE=Watcom-1.0
-SLOT=0
-SRC_URI=mirror://sourceforge/jwasm/JWasm%20Source%20Code/JWasm211as.zip
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=3ecdb8b5b08fc780f5efa95a5335d293
diff --git a/dev-lang/jwasm/Manifest b/dev-lang/jwasm/Manifest
new file mode 100644
index 000000000000..ea4926615f54
--- /dev/null
+++ b/dev-lang/jwasm/Manifest
@@ -0,0 +1,4 @@
+AUX jwasm-2.11-types-test.patch 1761 BLAKE2B b719bb79504e708925bfa407e72df7a37044b834bc3118fa9baf1a0cb478a0ab852872147148462188324954ef958af30cbcbca28fc992660276a15100ecb1b6 SHA512 0a4f3e613c8e724939ce9e23f8f4ce10ca89bf6c1579929719b3ccad62ac66cceecc3f8799c20c2875b7d4dcc7390bf0e4ca64aa08aab0b39bd7a4ab381b150b
+DIST JWasm211as.zip 1004993 BLAKE2B 725489690048b049c7fec5f2c54b89a746ee1c825d44e6f4f912f568b737c8ad996e55dba112132e685665b4d47aadd0324b2e9480d421c497bc21abbb85d015 SHA512 3e48e09955ccf8e641b36f54c93c3f36b275a0e662013a17dfd1f52a3e2872eff54be869596d0e72bdb2cc7e59c8fd1dee13477bf89a59bba4b212959cff9006
+EBUILD jwasm-2.11a.ebuild 810 BLAKE2B ee5e22aeadb5ed4eff11e711487cc66d6387a706697858c78180d8cf3b788322c1622711be4dec3a3d05c21dafbd92beecfed19873cfc4685bee19738f3ff6ad SHA512 074c5966954c12ce0faf29133f8b3d1a442b1ae889eaae16ef3dcc88716f900773dafac87949b129c7a0a05cdc7bed6a90b333293ce0fd15483aa39f5375993b
+MISC metadata.xml 326 BLAKE2B 6824de006351db2d3fcd9da82e45fe8c81c083209af168ef5a4cb838e44cdf951377ddebd539b198b9fdb082b4ae384dc2d6cf0357ed86e234c7226f2234af27 SHA512 ff2d01893c3ac2522da224e1526c83f9b0c081e21d735064da6b71163e8f3b8e6c3ac2e27b083b03b30c54af433c4cad29efea7984367c56d077c804675872ba
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..be7d54b1219a
--- /dev/null
+++ b/dev-lang/jwasm/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="sourceforge">jwasm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-lang/lazarus-1.0.12 b/dev-lang/lazarus-1.0.12
deleted file mode 100644
index b229a7795f8e..000000000000
--- a/dev-lang/lazarus-1.0.12
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=>=dev-lang/fpc-2.6.0[source] net-misc/rsync x11-libs/gtk+:2 >=sys-devel/binutils-2.19.1-r1
-DESCRIPTION=Lazarus IDE is a feature rich visual programming environment emulating Delphi
-EAPI=5
-HOMEPAGE=https://www.lazarus-ide.org/
-IUSE=minimal
-KEYWORDS=amd64 x86
-LICENSE=GPL-2 LGPL-2.1-with-linking-exception
-RDEPEND=>=dev-lang/fpc-2.6.0[source] net-misc/rsync x11-libs/gtk+:2 !=gnome-base/librsvg-2.16.1
-RESTRICT=strip
-SLOT=0
-SRC_URI=https://downloads.sourceforge.net/project/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%201.0.12/lazarus-1.0.12-0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=8b666378b50d24b2a6ee64743e44e6c4
diff --git a/dev-lang/lazarus-1.6.2 b/dev-lang/lazarus-1.6.2
deleted file mode 100644
index a402cc21398b..000000000000
--- a/dev-lang/lazarus-1.6.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=>=dev-lang/fpc-3.0.0[source] net-misc/rsync x11-libs/gtk+:2 >=sys-devel/binutils-2.19.1-r1:=
-DESCRIPTION=Lazarus IDE is a feature rich visual programming environment emulating Delphi
-EAPI=6
-HOMEPAGE=https://www.lazarus-ide.org/
-IUSE=minimal
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2.1-with-linking-exception
-RDEPEND=>=dev-lang/fpc-3.0.0[source] net-misc/rsync x11-libs/gtk+:2 >=sys-devel/binutils-2.19.1-r1:= !=gnome-base/librsvg-2.16.1
-RESTRICT=strip
-SLOT=0
-SRC_URI=https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/Lazarus%201.6.2/lazarus-1.6.2-0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=84378e6bb2b68228cf4ab495cb34ad29
diff --git a/dev-lang/lazarus-1.6.4 b/dev-lang/lazarus-1.6.4
deleted file mode 100644
index 72cd4198eeb3..000000000000
--- a/dev-lang/lazarus-1.6.4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=>=dev-lang/fpc-3.0.0[source] net-misc/rsync x11-libs/gtk+:2 >=sys-devel/binutils-2.19.1-r1:=
-DESCRIPTION=Lazarus IDE is a feature rich visual programming environment emulating Delphi
-EAPI=6
-HOMEPAGE=https://www.lazarus-ide.org/
-IUSE=minimal
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2.1-with-linking-exception
-RDEPEND=>=dev-lang/fpc-3.0.0[source] net-misc/rsync x11-libs/gtk+:2 >=sys-devel/binutils-2.19.1-r1:= !=gnome-base/librsvg-2.16.1
-RESTRICT=strip
-SLOT=0
-SRC_URI=https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/Lazarus%201.6.4/lazarus-1.6.4-0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=31c83c56bf0ff81bec1a0c6a39431298
diff --git a/dev-lang/lazarus-1.8.0 b/dev-lang/lazarus-1.8.0
deleted file mode 100644
index 6cf9ad70ef47..000000000000
--- a/dev-lang/lazarus-1.8.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=>=dev-lang/fpc-3.0.4[source] net-misc/rsync x11-libs/gtk+:2 >=sys-devel/binutils-2.19.1-r1:=
-DESCRIPTION=Lazarus IDE is a feature rich visual programming environment emulating Delphi
-EAPI=6
-HOMEPAGE=https://www.lazarus-ide.org/
-IUSE=minimal
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2.1-with-linking-exception
-RDEPEND=>=dev-lang/fpc-3.0.4[source] net-misc/rsync x11-libs/gtk+:2 >=sys-devel/binutils-2.19.1-r1:= !=gnome-base/librsvg-2.16.1
-RESTRICT=strip
-SLOT=0
-SRC_URI=https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/Lazarus%201.8.0/lazarus-1.8.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097
-_md5_=59f89f90e4fd27ee6c4556e5d4a75b3c
diff --git a/dev-lang/lazarus-1.8.2 b/dev-lang/lazarus-1.8.2
deleted file mode 100644
index eb6afd3909d0..000000000000
--- a/dev-lang/lazarus-1.8.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=>=dev-lang/fpc-3.0.4[source] net-misc/rsync x11-libs/gtk+:2 >=sys-devel/binutils-2.19.1-r1:=
-DESCRIPTION=Lazarus IDE is a feature rich visual programming environment emulating Delphi
-EAPI=6
-HOMEPAGE=https://www.lazarus-ide.org/
-IUSE=minimal
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2.1-with-linking-exception
-RDEPEND=>=dev-lang/fpc-3.0.4[source] net-misc/rsync x11-libs/gtk+:2 >=sys-devel/binutils-2.19.1-r1:= !=gnome-base/librsvg-2.16.1
-RESTRICT=strip
-SLOT=0
-SRC_URI=https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/Lazarus%201.8.2/lazarus-1.8.2.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097
-_md5_=6fc881bd90fa2e91b003e0d9de476101
diff --git a/dev-lang/lazarus-1.8.4 b/dev-lang/lazarus-1.8.4
deleted file mode 100644
index 779248eeaf8a..000000000000
--- a/dev-lang/lazarus-1.8.4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=>=dev-lang/fpc-3.0.4[source] net-misc/rsync x11-libs/gtk+:2 >=sys-devel/binutils-2.19.1-r1:=
-DESCRIPTION=Lazarus IDE is a feature rich visual programming environment emulating Delphi
-EAPI=6
-HOMEPAGE=https://www.lazarus-ide.org/
-IUSE=minimal
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2.1-with-linking-exception
-RDEPEND=>=dev-lang/fpc-3.0.4[source] net-misc/rsync x11-libs/gtk+:2 >=sys-devel/binutils-2.19.1-r1:= !=gnome-base/librsvg-2.16.1
-RESTRICT=strip
-SLOT=0
-SRC_URI=https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/Lazarus%201.8.4/lazarus-1.8.4.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097
-_md5_=6fc881bd90fa2e91b003e0d9de476101
diff --git a/dev-lang/lazarus/Manifest b/dev-lang/lazarus/Manifest
new file mode 100644
index 000000000000..771782f7b8f1
--- /dev/null
+++ b/dev-lang/lazarus/Manifest
@@ -0,0 +1,14 @@
+AUX lazarus-0.9.26-fpcsrc.patch 407 BLAKE2B c3b006fd7bb58fb7037aae3d8d35ac146ab971fc6063652e3185b320e4cb05ccedb6c26c7d64b2f2998a901608ee251762b723f62bd9c239a51ab6a6d6f2b39d SHA512 823d9ba2041f97c39d8ea5f49cb02f68d8c98da95d0a479cc65a638365e2adafd1c5645fa6846720af18198834958f37b0cc0d92f38023ccdaf40ec8dc848f64
+DIST lazarus-1.0.12-0.tar.gz 47687878 BLAKE2B 7a230f8ad433fefd514d8fca128e1ad127ea2a232c2061080d4146b5276ef82bd442be6a522a5eb4a9221338e8d13cf9d3cc954f712dfbc521d8fd74b07389f7 SHA512 2a106c4bff2135ace815f789057f25fea1902edc972503e883547d7cc6d50b585ae54676cba734cce616064864ce535b3a4fcd7892763d15aafdf262dbe24293
+DIST lazarus-1.6.2-0.tar.gz 55949169 BLAKE2B e8d4c4f786bffea4eec9ed326ba00acca93823bb5353627459f4923b5519d754729c84499a731c9559142294d94252365676ee69daf1f2e33ca386c765f78f48 SHA512 9fb428ac5b38c0c37f909aaf06a43343f3231e9209318faf565cc08ac498c0dfb136a2f6266d437f93b5cf81e6281d747a234fef399fc6d2cb044b13397562d9
+DIST lazarus-1.6.4-0.tar.gz 57180961 BLAKE2B 930beda6ad04999e749fe4b76a64ab00b0138c18b0f3aea0cbac089ecb3f419aa4165d06757d6ee2d3c6e43401f2be5e154947d07f892a6bc5f4bb8831bad62d SHA512 d7d498483ef9e1eebd0d8ca2325d1984cb1297837ebe2f9547e67f26fc049c2168e2feeac739b8403c08a8251040e9161c962d25951545384ffbdbb076fda2aa
+DIST lazarus-1.8.0.tar.gz 62114372 BLAKE2B 8593e384ef5e311f3a777422a255e292d2d4c240baac0cb12778bb23e59d76301d75c9133585fd45af3ad0290b242ed5640a6dd9b27e1197d325e2ae5845495f SHA512 dd5e02e9c0a057cf9a6b2c15605969cf4cb743aa78fc81bfdc7c566434127893cf32bab5bd1729f79b51c611bf9ae015bea8d774e0544ead42a064f1224ffd7b
+DIST lazarus-1.8.2.tar.gz 62935678 BLAKE2B f993e9630ab932a7a7f7bcf488d179d33a6dfef6c1de749d01c12f91f894bccd05a784ec2e2b89a9565421a192abce6c1675df2676bfff2fd8307d2ab4828db5 SHA512 3dddbf3bfacb0b04c427086c911a4ff67be0d5b291d23c1efce2d813e2cbd2e26b54b2851b5ad223f8df8c2652c002bc684a54c936a0a77c85ccdce08651531b
+DIST lazarus-1.8.4.tar.gz 63130653 BLAKE2B f9b2ba9971f1a9a9c3b8d2004bd3516c12db5384bb6243ef275c2fc0d458634fba0c1c23e7ecd5c160c1204d6cc2b4ebc340ce8bb5cfdd9c531f8c36ae59d1e2 SHA512 82cdc3c32dddf8e67c0bed9292a9a924227bab50f22ca479f5e98ecccbf60dd66c7f886ecb8e2979d9d8fccc3d25462ee8c55fcab085aa4194b4704660e0b95d
+EBUILD lazarus-1.0.12.ebuild 2353 BLAKE2B 92b70e8ac8a040c9128547c343fdd0f751b5cb72c6cd59c87724151bec4c8b593ea1a04587784f368d8d16e71f13ea13d7ce2256bbd4a9a6018c6869a04a0524 SHA512 93e90953cd2d4390bb1317c3e15094f8fb11f9e000f37f46a58362a71995c6b37643056c254a05baba3294cd6067b18d2016219ae0dba6bcea4be809dc6090ac
+EBUILD lazarus-1.6.2.ebuild 2342 BLAKE2B f65b394c2422fa0e144b275dafda4553365778ddcd944e8e0a50b558379ed3c2c06b613aab068ac2b2a6c50ec96eae27781655c5c7b47f177a240d6d7706195e SHA512 1c71ca087ba0e922b534962b9e375849ba976e9d9f61a5823861cb245a8a833148789551e28b08d7f4d17cb2d728872faecdbb269d25d9527f001e3050a34267
+EBUILD lazarus-1.6.4.ebuild 2342 BLAKE2B f02a3c7c3a7e28fa754f560003761fb44257a0f49694c45902f134ce5f5322ece0d94633e495ab2547ee064abd4973f8378e61368c316fb0b451b5737f28dc4f SHA512 348abd222125bf2449cd434312209aaf758ca7f0dbd65a66b985e7afc7851ec71494631c0f2f86e39557a26e949c95afe99327cf0b48a363d6eeee26fbf4a294
+EBUILD lazarus-1.8.0.ebuild 2344 BLAKE2B eadf144048d43a8ea6b0d67a06d6fc26b130dabe7568fc057df2a1505d473493da04a1d601591f3387393c233c485938cc6364d5534307b1e2b1de30ffe8cf55 SHA512 6b4aadad4c8fba37c14d171d8ebbe84f4542aac45484bae74df09b9dc5d34d4e8c2e9027700927f9575ae791e2a248209b19e14887730f8ed5d14b75585ab409
+EBUILD lazarus-1.8.2.ebuild 2285 BLAKE2B a04e012ce18d7c8d793043b82bff199c3c558d44e52a64d81037658eb9f19c26d8a15c50f5f0aad54e7285d11b8e5700403b1ab88687ad2c5e85177c1437778d SHA512 642ef819cdc11082b2530b7c06d60be77abdb22008e16b0a45313e4981d3a6b22bd3d7065c951826bd98ce285726ab52178e625d9392e7b273433dfa55499983
+EBUILD lazarus-1.8.4.ebuild 2285 BLAKE2B a04e012ce18d7c8d793043b82bff199c3c558d44e52a64d81037658eb9f19c26d8a15c50f5f0aad54e7285d11b8e5700403b1ab88687ad2c5e85177c1437778d SHA512 642ef819cdc11082b2530b7c06d60be77abdb22008e16b0a45313e4981d3a6b22bd3d7065c951826bd98ce285726ab52178e625d9392e7b273433dfa55499983
+MISC metadata.xml 516 BLAKE2B b4023336c3271703bc3912f9ab02eed6b57178d1f468194bdac5ac9b01027c5f7c847e776e9b1048a9ce29a4939055e3c00e289868a740c76bb2b7c0e6ff9085 SHA512 991dd36587eaa2412af0fccac7664c72a1d9153d12b313ae151943d7c66ac095b3d2cbe61fe4d84c4566e196ff11e1c16c6ffe2ab6e00fa40fc2fdfe23cee524
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..5edd6797d407
--- /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 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/lazarus-1.8.0.ebuild b/dev-lang/lazarus/lazarus-1.8.0.ebuild
new file mode 100644
index 000000000000..36854579d8f6
--- /dev/null
+++ b/dev-lang/lazarus/lazarus-1.8.0.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit desktop
+
+FPCVER="3.0.4"
+
+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}.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.8.2.ebuild b/dev-lang/lazarus/lazarus-1.8.2.ebuild
new file mode 100644
index 000000000000..5a5cd58c19aa
--- /dev/null
+++ b/dev-lang/lazarus/lazarus-1.8.2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit desktop
+
+FPCVER="3.0.4"
+
+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}.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
+ 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.8.4.ebuild b/dev-lang/lazarus/lazarus-1.8.4.ebuild
new file mode 100644
index 000000000000..5a5cd58c19aa
--- /dev/null
+++ b/dev-lang/lazarus/lazarus-1.8.4.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit desktop
+
+FPCVER="3.0.4"
+
+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}.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
+ 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..82e27eadf88f
--- /dev/null
+++ b/dev-lang/lazarus/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>amynka@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ A Borland Delphi lookalike for linux.
+ Uses the free pascal compiler.
+ </longdescription>
+ <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-0.10.1 b/dev-lang/lfe-0.10.1
deleted file mode 100644
index ded50c4c67b2..000000000000
--- a/dev-lang/lfe-0.10.1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=dev-lang/erlang
-DESCRIPTION=Lisp-flavoured Erlang
-EAPI=5
-HOMEPAGE=http://lfe.github.io/
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD-2
-RDEPEND=dev-lang/erlang
-SLOT=0
-SRC_URI=https://github.com/rvirding/lfe/archive/v0.10.1.zip -> lfe-0.10.1.zip
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=14abc867a7d827346c69e557f7427410
diff --git a/dev-lang/lfe-0.7 b/dev-lang/lfe-0.7
deleted file mode 100644
index 1f24507b1869..000000000000
--- a/dev-lang/lfe-0.7
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install prepare
-DEPEND=dev-lang/erlang
-DESCRIPTION=Lisp-flavoured Erlang
-EAPI=5
-HOMEPAGE=http://lfe.github.io/
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD-2
-RDEPEND=dev-lang/erlang
-SLOT=0
-SRC_URI=https://github.com/rvirding/lfe/archive/v0.7a.zip -> lfe-0.7a.zip
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=6f7516d4befcf1dafa573f9f5a618683
diff --git a/dev-lang/lfe-1.0 b/dev-lang/lfe-1.0
deleted file mode 100644
index 1145dd1db909..000000000000
--- a/dev-lang/lfe-1.0
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=dev-lang/erlang
-DESCRIPTION=Lisp-flavoured Erlang
-EAPI=5
-HOMEPAGE=http://lfe.github.io/
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD-2
-RDEPEND=dev-lang/erlang
-SLOT=0
-SRC_URI=https://github.com/rvirding/lfe/archive/v1.0.zip -> lfe-1.0.zip
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=916ec18494330028d4fa26a6abb3094f
diff --git a/dev-lang/lfe-1.1.1 b/dev-lang/lfe-1.1.1
deleted file mode 100644
index 2cc64cc9a647..000000000000
--- a/dev-lang/lfe-1.1.1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=dev-lang/erlang
-DESCRIPTION=Lisp-flavoured Erlang
-EAPI=5
-HOMEPAGE=http://lfe.github.io/
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD-2
-RDEPEND=dev-lang/erlang
-SLOT=0
-SRC_URI=https://github.com/rvirding/lfe/archive/v1.1.1.zip -> lfe-1.1.1.zip
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=916ec18494330028d4fa26a6abb3094f
diff --git a/dev-lang/lfe/Manifest b/dev-lang/lfe/Manifest
new file mode 100644
index 000000000000..77e499f848f5
--- /dev/null
+++ b/dev-lang/lfe/Manifest
@@ -0,0 +1,9 @@
+DIST lfe-0.10.1.zip 296228 BLAKE2B 2700f13ad186cf32162dce496b65d4333f66b847790f55a2be16deffbf0cb721736f251621c55104e180e9d6b0dcc03a2eacc2f76afa0c53bb719c6e5588248a SHA512 94719b42ecf6dc5505ea649df00b255b1e901d6104426192f34692e2f7bc85940b96b39fd1bfa00577b63c17e10d8fd51d3de743c02d8ac2263abe2fb47d4498
+DIST lfe-0.7a.zip 216133 BLAKE2B 9cd09684046f932e4ac3c0bfb6c1c7491eeb8586eef09672c5f782cf3fe9e5e6b692f6f63f3667756f5240fc07fd84d94755fae696de3e7ed71d2ccf24984b3a SHA512 f8e8dd080142aed77109deed7627bcd6c9a90d4bddcc2207b5e3ffa0e744c889ac4890d18040e7bde239e1c69c6251819723637a8b9ad9c0cce01787c6e0e1b0
+DIST lfe-1.0.zip 303894 BLAKE2B dca1014664235b959710a1e535e96e496c90170e82dbb810b9715aa11b796ab7f13590f655f1b41e30be5cd9ee1d6b0e78054386958a9aea6a2a96f510b1ff3a SHA512 752ac6b142db95f63ba88ee92de28f846f3a7ccd605eea0da73da24ed0b7b4f0a06fb48697ea6064ccc28dda225ecd01843386085629b6b5465b09df66722bce
+DIST lfe-1.1.1.zip 386864 BLAKE2B d966e483c0490d7c6e48ae53819a0f1f30ea0edd7dcc6c7c3fe82c79ed0e4013d66dde4e74d4369e72fc46076723612f00ccb8d33d912d46dfdbf8e38940f72b SHA512 8660716a73126615bd0cde161a780cc49ba57718afd820dbe891da5e1d9ec2f52cc1864159dcedba1c674ccfef42b9662ec8e0bbfe82c10798527ae0979b8f8e
+EBUILD lfe-0.10.1.ebuild 754 BLAKE2B 90aac540ca4b644e3478e733bc6aae9145b8d7a013e53de059af8d200b1700c6d2227cf88214e75c5c4434087d3afc42a1f621072a684230cf28a1409e1e06b0 SHA512 977c9a701d8b36467684803cbbe13c3fb5997dea92c5de7e432da52af43e6fcf6cfb755ef61f5e5991ea9d4e3668ad7d1af2f114997658f231ce375c043c1340
+EBUILD lfe-0.7.ebuild 647 BLAKE2B c1795a6dd1c21c4d3b5b5dad8ea4c3036f771e56f1e12a17c3a42cd265686b4b6a8f950f8f69c75db714e30e91b9cec4563cf58b5d130d2c65b2f521826b1e48 SHA512 4c55bd5dbea59bd98e544b89f10ac3676ce6d95b088a45b845e59d4487900f780adf8805e4e57c7322297337d4fb7f2fc454bd7b7e1f76caa99868067f1393de
+EBUILD lfe-1.0.ebuild 754 BLAKE2B da0fd9924571e0cc62f2ee927eb26373eaec47ae1f5305930f2ba073287c19931de5839845bdba3e07ea7ab22030451425882a2bbc40aac7cfc97d4065d562d4 SHA512 77a131455692ceefb6310ace009525eeac0469f8105b16885e1a7a6bb8af2386104391774d44ce23d2d6ee9aa6635a882a1fe9ceaecc00da4ee312e3061e3741
+EBUILD lfe-1.1.1.ebuild 754 BLAKE2B da0fd9924571e0cc62f2ee927eb26373eaec47ae1f5305930f2ba073287c19931de5839845bdba3e07ea7ab22030451425882a2bbc40aac7cfc97d4065d562d4 SHA512 77a131455692ceefb6310ace009525eeac0469f8105b16885e1a7a6bb8af2386104391774d44ce23d2d6ee9aa6635a882a1fe9ceaecc00da4ee312e3061e3741
+MISC metadata.xml 334 BLAKE2B 796f5cf618b8a2de81896af38e068a8c26e4681e4034214c713c5b1b450e119f76a1961b1a5097d81a8aeee446b0ffce124908757e59812ab2db0a93f1d8aefc SHA512 ef130013e56ca5d9df4312b106383b5d3d8d889f767ea24125e1a9ab11f555cab661c73ad190c7c0b4d7afd10a1e6d3569282233b4da4a76c7fbf1fc6052c8be
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-0.13.1-r2 b/dev-lang/lisaac-0.13.1-r2
deleted file mode 100644
index c06bdf612dd9..000000000000
--- a/dev-lang/lisaac-0.13.1-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst postrm prepare
-DEPEND=vim-syntax? ( app-editors/vim ) emacs? ( virtual/emacs )
-DESCRIPTION=Lisaac is an object prototype based language
-EAPI=4
-HOMEPAGE=http://isaacproject.u-strasbg.fr/li.html
-IUSE=vim-syntax emacs examples
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=vim-syntax? ( app-editors/vim ) emacs? ( virtual/emacs )
-SLOT=0
-SRC_URI=http://isaacproject.u-strasbg.fr/download/lisaac-0.13.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=53e06960f40f0811930dac73e2bd34d3
diff --git a/dev-lang/lisaac/Manifest b/dev-lang/lisaac/Manifest
new file mode 100644
index 000000000000..c76a6271d7a5
--- /dev/null
+++ b/dev-lang/lisaac/Manifest
@@ -0,0 +1,5 @@
+AUX 50lisaac-gentoo.el 205 BLAKE2B 846e26860287d4ff9ee305a2bf8a614ea1ca3bebc108dad7b6159267db5a99a2bb8ab89ccafaec1d4e312fcb2eaef54772faba7f87190a3e2d486d93086f77f2 SHA512 8ecf7496211067e2a2ffd5458036e7b3964e6528064855905d830e98553d9c190a08fcd0df941625eb8dcfe1f762042186420f00feebcf054d9a499c5cf2d080
+AUX lisaac-0.13.1-makefile.patch 1003 BLAKE2B 6eaa34b6a4d2e97ce17e6c5d401f4a8b1e104256f139caa52886620c9b573ad8a58a2079d78be3e73bfbd82fde3c77838df1daa18bb32df07db935ee6c661243 SHA512 4b363a4791468b98e864b641c08886d8070b9c959fdd5fda68ea0c0fa8c8caf0fe80ef7afe99598579c8a7b18222c3846334b6fa6d9c2b3e6fec9fcda6170d6e
+DIST lisaac-0.13.1.tar.gz 2141871 BLAKE2B 7461eda320bc778cba5f28724eb1afc9451c26df4d4333b546f72a8d7e4add21f3ff369215a51adf841b967699d2746105a651ef11442d60ca3e7fc70a245e72 SHA512 079137d17fae09d57430d6576e9b2c149ca31ba47c0899513bfc447488ba2b0e3432fff8db4f6b141301798e23472738791cd99900c73a463d92397179a44aa9
+EBUILD lisaac-0.13.1-r2.ebuild 1639 BLAKE2B ebc3bfa8f8b8b0eb59358c33f7be675befb5df231df4e951f4a39b9255f120b5d7d295b6e6f3b14dc7892d97aac1017ac558428a100a37c366b93814a20c16bd SHA512 654ea816e74a0f355b42b90b4114fbe7b477568960e522419804c7fe6a5bcf57e4294cea2ec86af382b651c3e01bcf237be823dc1d3fcd9fb913f77e0f611f07
+MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84
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-3.00.0 b/dev-lang/logtalk-3.00.0
deleted file mode 100644
index 59aca69678c4..000000000000
--- a/dev-lang/logtalk-3.00.0
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install postinst postrm prepare
-DESCRIPTION=Open source object-oriented logic programming language
-EAPI=5
-HOMEPAGE=http://logtalk.org
-IUSE=doc fop xslt
-KEYWORDS=~amd64 ~ppc ~x86
-LICENSE=logtalk
-RDEPEND=xslt? ( dev-libs/libxslt ) fop? ( dev-java/fop )
-SLOT=0
-SRC_URI=http://logtalk.org/files/logtalk-3.00.0.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=f455c4199a90a4a51658d97e1047e42d
diff --git a/dev-lang/logtalk-3.03.0 b/dev-lang/logtalk-3.03.0
deleted file mode 100644
index 62a1d527ddd9..000000000000
--- a/dev-lang/logtalk-3.03.0
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install postinst postrm prepare
-DESCRIPTION=Open source object-oriented logic programming language
-EAPI=5
-HOMEPAGE=http://logtalk.org
-IUSE=doc fop xslt
-KEYWORDS=~amd64 ~ppc ~x86
-LICENSE=logtalk
-RDEPEND=xslt? ( dev-libs/libxslt ) fop? ( dev-java/fop )
-SLOT=0
-SRC_URI=http://logtalk.org/files/logtalk-3.03.0.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=aafb5cc342d4c6ff1af4deea6c154750
diff --git a/dev-lang/logtalk-3.07.0 b/dev-lang/logtalk-3.07.0
deleted file mode 100644
index 3ad544e664d4..000000000000
--- a/dev-lang/logtalk-3.07.0
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install postinst postrm prepare
-DESCRIPTION=Open source object-oriented logic programming language
-EAPI=5
-HOMEPAGE=http://logtalk.org
-IUSE=doc fop xslt
-KEYWORDS=~amd64 ~ppc ~x86
-LICENSE=Apache-2.0
-RDEPEND=xslt? ( dev-libs/libxslt ) fop? ( dev-java/fop )
-SLOT=0
-SRC_URI=http://logtalk.org/files/logtalk-3.07.0.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=387b78300afba36feff7c24b46c780b5
diff --git a/dev-lang/logtalk-3.11.2 b/dev-lang/logtalk-3.11.2
deleted file mode 100644
index 1c4699f5ad0a..000000000000
--- a/dev-lang/logtalk-3.11.2
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install postinst postrm prepare
-DESCRIPTION=Open source object-oriented logic programming language
-EAPI=5
-HOMEPAGE=http://logtalk.org
-IUSE=fop xslt
-KEYWORDS=~amd64 ~ppc ~x86
-LICENSE=Apache-2.0
-RDEPEND=xslt? ( dev-libs/libxslt ) fop? ( dev-java/fop )
-SLOT=0
-SRC_URI=http://logtalk.org/files/logtalk-3.11.2.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=27daf72ff5fe73c5388b0cbdb2f5ca0d
diff --git a/dev-lang/logtalk/Manifest b/dev-lang/logtalk/Manifest
new file mode 100644
index 000000000000..efd44e72ab8e
--- /dev/null
+++ b/dev-lang/logtalk/Manifest
@@ -0,0 +1,12 @@
+AUX logtalk-3.00.0-no-user-docs.patch 1608 BLAKE2B d9bba69d6e8b71cf8e0942d94b5499f111563a57673de876c0dcbdca4ffa4722d1a37fa6e796aba4abf28a8a8daad749a34e9915f88d10f3c19ff7b6257b611c SHA512 9fca7ee47d11cf90b88a62f244b67ffad6c9d43e08b41fef3731461a3519555ae0c76167e8b313d103e27bcc4a24fb86e496cf8a5ef075c10f21f4dc27812fa3
+AUX logtalk-3.03.0-no-user-docs.patch 1608 BLAKE2B f485845bdbffe2ae11cf7335e66ea0a3e66ae241bcb847bb8839421012d0d27c80a348f0fd2fe64529b0a62a26f9eead3602541a53d088f8b8f2be4de280155b SHA512 ad899d1b941e1f162420f74c58868c91480c243c5888a8afb910b5fa5f8bb77073da31bed334ed193d4cbb17ce1980e5d426d2d57f0b15fbf8fdeb545c369197
+AUX logtalk-3.11.2-portage.patch 920 BLAKE2B d20d393bc10809945d6100aef08610e9cffe5b40f91927448c5fa4ce3b1cd6120613f754438f15b4f008ff32deabf108e2c242d33ef1fe0d574705e93fb8505e SHA512 b1f6f6457e343db0674aad9633dc7d38f9714574372cb1bfb2e9dd72da52710df45b7488329d6e1448bd84aa10550598f73fc4aac182f60168220898423381dc
+DIST logtalk-3.00.0.tar.bz2 1886297 BLAKE2B 7018a39b841c2c7e86945282baf04f83ecbe0dccc5d3760af963bd6e623acf8d04b3e6ce3aa7a702c7f1eb3a8f70d8c6d00d394ec249d2cbfa021d815e4db398 SHA512 bb4ecc709e71eee9a9a532bfcef764095e581189f3e17c9c0f2d80ceeaa4dd993d7da087b07e27f4a377a40d7a798378591d89ab6c801c7a26c1b1d646c7b76c
+DIST logtalk-3.03.0.tar.bz2 1997131 BLAKE2B 98cbf7d0b9778b7379b7de1c22ff1772b9bab7475b377cda07c7ae48a60494dc7a39fd0b88ab808f2076d1359b209ca43b1e6565052f0e47d34cb7e9ca33d30b SHA512 8445b0dda78ce0a7a0fe380b03d061271eb924df34c8f035c96a949b177c99234e2998c65f18c55be04c7d661c94473448eb2dc79a586dbc346ab07887f0e98a
+DIST logtalk-3.07.0.tar.bz2 2114396 BLAKE2B 62b5960c31fee312ce842b450d49a066508569b636277306e60bbca51bb825c967b0fb53779181e31cf8c9e3345addf7e6d2f1aae98f153cc42cc75bab93f3f9 SHA512 1b26c4f49dee469d6f3a4ae15dd0c429b2b79a407aca9f518af6d1f19f682b6c72dd76c6ed3da38555353219f832efce6f0fb54a4a946cae2fccfa78c67c5757
+DIST logtalk-3.11.2.tar.bz2 3122034 BLAKE2B bb790f6c11f5812337777718f92585f459ba7acb4f66a246d575061bb269db85fc37dd73bd8e185de3fc4cdfe62dcdf1d26782ff1dfe26846d99b39c57e97dc5 SHA512 5c48a4c2165c8b4bfe3047d7dc42f3210a72488fbc2e7349a93ae17ed3590cdd4ff22417f153f163c76605ffc30a5bc8fad2bd91099edf68e675b1d94fb7662b
+EBUILD logtalk-3.00.0.ebuild 4014 BLAKE2B 8048fd0cc426d1d8db44edc7b5abfad50b50cccbb7c2369bfdb5b106f21662f94f91e3c07e1f8c7942f9f97fb663f86dd4c7cc34f8af4a27eb7ebf6169a032ab SHA512 2c38935ab304ed3de15635ce207e5ae3d8cb5a565c61b9257ff604fe40db262237198311423d93691ab73dd42aafc97eb06533c0781f1d018b6a3fa3b44e1d0e
+EBUILD logtalk-3.03.0.ebuild 4013 BLAKE2B 48e997cbd052b46bf2aaa5bb1b5e90f9b8e94baba7bce3e75168821b93c297c8dd7b3dac41f4fe94c16e4fd593fb5cb1fbe4e1654c26271fc86569497858338f SHA512 959f26b924c1082ed72fd1c84a6b26e56c40c3100118370f1cac5005b0df24f7cdff178031945cef27e3458c4c9ef90097abd995c060a6d14060e67d6464a3f4
+EBUILD logtalk-3.07.0.ebuild 3938 BLAKE2B b3627d4b97f1533e82382dab963ba2f537ec35c19a18e482046684c2194ae9524369a5e465b4e4065a5a0314cdb13a2817509ef00b83324fa0a8a3bbc4d064b1 SHA512 995fd87302c4866b048cc1f0089741380157b9a90b7c8565d7a1e9fa99aa0f604c91277a0bf33b019f0b3aa03aea490178fbce7614cf3468d8585bd8ce9f6eee
+EBUILD logtalk-3.11.2.ebuild 3868 BLAKE2B 6721c10a6c1e3d289222fc4ea2d8d84b27fee025de8b19cdf747f5c410183294581f0c9b7d603a191a808e1d71b7d61fc02dfb815a74fcfc4cc10ed61315ebab SHA512 6d8f9d1cf0764414ea4479a1975e79a76ff5b91365bfdf40f68d23e570f9028fd0ee218639ab278a413dc45da3f32b024d63fb9d4adfed80c868b25f8a0f083e
+MISC metadata.xml 404 BLAKE2B 8eee9851c967beb38e36f649b8eaefc8b8329f06adf298702a06b427edeb9a0e556a2f47e63c2b4cf4219027ed18502336b4a9e032d876bde18897985aea7dd8 SHA512 1faeefef2f7670809936eb73c4e9e4e18f44ee6e5851cc7386e996768ab88dbfa7c24801daa2cf4edca8646427eec1c871136540d71b7e0b0add3d00c78691ed
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..7c14f28413a6
--- /dev/null
+++ b/dev-lang/logtalk/files/logtalk-3.00.0-no-user-docs.patch
@@ -0,0 +1,34 @@
+--- a/scripts/logtalk_user_setup.sh
++++ b/scripts/logtalk_user_setup.sh
+@@ -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..6d4e7ab9154b
--- /dev/null
+++ b/dev-lang/logtalk/files/logtalk-3.03.0-no-user-docs.patch
@@ -0,0 +1,34 @@
+--- a/scripts/logtalk_user_setup.sh
++++ b/scripts/logtalk_user_setup.sh
+@@ -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..f416217399f1
--- /dev/null
+++ b/dev-lang/logtalk/files/logtalk-3.11.2-portage.patch
@@ -0,0 +1,17 @@
+--- a/scripts/logtalk_user_setup.sh
++++ b/scripts/logtalk_user_setup.sh
+@@ -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..d21ce5022afa
--- /dev/null
+++ b/dev-lang/logtalk/logtalk-3.00.0.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils xdg-utils
+
+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}"/${PN}-3.00.0-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() {
+ xdg_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() {
+ xdg_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..018dbd5eff83
--- /dev/null
+++ b/dev-lang/logtalk/logtalk-3.03.0.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils xdg-utils
+
+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}"/${PN}-3.03.0-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() {
+ xdg_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() {
+ xdg_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..b5e3854b4f1e
--- /dev/null
+++ b/dev-lang/logtalk/logtalk-3.07.0.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils xdg-utils
+
+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}"/${PN}-3.03.0-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() {
+ xdg_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() {
+ xdg_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..682b01ea55f2
--- /dev/null
+++ b/dev-lang/logtalk/logtalk-3.11.2.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils xdg-utils
+
+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() {
+ xdg_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() {
+ xdg_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-5.1.5-r100 b/dev-lang/lua-5.1.5-r100
deleted file mode 100644
index 6b5004d13a3c..000000000000
--- a/dev-lang/lua-5.1.5-r100
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=readline? ( >=sys-libs/readline-6.2_p5-r1:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) app-eselect/eselect-lua !dev-lang/lua:0 sys-devel/libtool
-DESCRIPTION=A powerful light-weight programming language designed for extending applications
-EAPI=5
-HOMEPAGE=http://www.lua.org/
-IUSE=+deprecated emacs readline static abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-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
-LICENSE=MIT
-PDEPEND=emacs? ( app-emacs/lua-mode )
-RDEPEND=readline? ( >=sys-libs/readline-6.2_p5-r1:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) app-eselect/eselect-lua !dev-lang/lua:0
-SLOT=5.1
-SRC_URI=http://www.lua.org/ftp/lua-5.1.5.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=aad3d79cf2c7066b896e7448542581ee
diff --git a/dev-lang/lua-5.1.5-r101 b/dev-lang/lua-5.1.5-r101
deleted file mode 100644
index 3df9c1a60c3f..000000000000
--- a/dev-lang/lua-5.1.5-r101
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=readline? ( >=sys-libs/readline-6.2_p5-r1:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) app-eselect/eselect-lua !dev-lang/lua:0 sys-devel/libtool
-DESCRIPTION=A powerful light-weight programming language designed for extending applications
-EAPI=5
-HOMEPAGE=http://www.lua.org/
-IUSE=+deprecated emacs readline static abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-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
-LICENSE=MIT
-PDEPEND=emacs? ( app-emacs/lua-mode )
-RDEPEND=readline? ( >=sys-libs/readline-6.2_p5-r1:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) app-eselect/eselect-lua !dev-lang/lua:0
-SLOT=5.1
-SRC_URI=http://www.lua.org/ftp/lua-5.1.5.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=160501178f9c41f0aaa385a3fa992b14
diff --git a/dev-lang/lua-5.1.5-r4 b/dev-lang/lua-5.1.5-r4
deleted file mode 100644
index 4efa6d1a2754..000000000000
--- a/dev-lang/lua-5.1.5-r4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=readline? ( >=sys-libs/readline-6.2_p5-r1:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) sys-devel/libtool
-DESCRIPTION=A powerful light-weight programming language designed for extending applications
-EAPI=5
-HOMEPAGE=http://www.lua.org/
-IUSE=+deprecated emacs readline static abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-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
-LICENSE=MIT
-PDEPEND=emacs? ( app-emacs/lua-mode )
-RDEPEND=readline? ( >=sys-libs/readline-6.2_p5-r1:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] )
-SLOT=0
-SRC_URI=http://www.lua.org/ftp/lua-5.1.5.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=fc4a76e6f7d001a4c2abf81671752528
diff --git a/dev-lang/lua-5.2.3 b/dev-lang/lua-5.2.3
deleted file mode 100644
index cb7d7a36a6a1..000000000000
--- a/dev-lang/lua-5.2.3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install prepare test
-DEPEND=readline? ( sys-libs/readline:0= ) app-eselect/eselect-lua !dev-lang/lua:0 sys-devel/libtool >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A powerful light-weight programming language designed for extending applications
-EAPI=5
-HOMEPAGE=http://www.lua.org/
-IUSE=+deprecated emacs readline static
-KEYWORDS=~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux
-LICENSE=MIT
-PDEPEND=emacs? ( app-emacs/lua-mode )
-RDEPEND=readline? ( sys-libs/readline:0= ) app-eselect/eselect-lua !dev-lang/lua:0
-SLOT=5.2
-SRC_URI=http://www.lua.org/ftp/lua-5.2.3.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=ca8ee167745db67a3d59b35b496b2e54
diff --git a/dev-lang/lua-5.2.3-r1 b/dev-lang/lua-5.2.3-r1
deleted file mode 100644
index 01e7bd5c9a4d..000000000000
--- a/dev-lang/lua-5.2.3-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=readline? ( sys-libs/readline:0= ) app-eselect/eselect-lua !dev-lang/lua:0 sys-devel/libtool >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A powerful light-weight programming language designed for extending applications
-EAPI=5
-HOMEPAGE=http://www.lua.org/
-IUSE=+deprecated emacs readline static abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-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
-LICENSE=MIT
-PDEPEND=emacs? ( app-emacs/lua-mode )
-RDEPEND=readline? ( sys-libs/readline:0= ) app-eselect/eselect-lua !dev-lang/lua:0
-SLOT=5.2
-SRC_URI=http://www.lua.org/ftp/lua-5.2.3.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=b763f4ca01e46413f348a65b4e91b245
diff --git a/dev-lang/lua-5.2.3-r2 b/dev-lang/lua-5.2.3-r2
deleted file mode 100644
index 8a8fd7796ef4..000000000000
--- a/dev-lang/lua-5.2.3-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=readline? ( sys-libs/readline:0= ) app-eselect/eselect-lua !dev-lang/lua:0 sys-devel/libtool >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A powerful light-weight programming language designed for extending applications
-EAPI=5
-HOMEPAGE=http://www.lua.org/
-IUSE=+deprecated emacs readline static abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-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
-LICENSE=MIT
-PDEPEND=emacs? ( app-emacs/lua-mode )
-RDEPEND=readline? ( sys-libs/readline:0= ) app-eselect/eselect-lua !dev-lang/lua:0
-SLOT=5.2
-SRC_URI=http://www.lua.org/ftp/lua-5.2.3.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=b51c44dd3d7c39c2b105b441339d31c5
diff --git a/dev-lang/lua-5.3.3 b/dev-lang/lua-5.3.3
deleted file mode 100644
index c4b589e6af81..000000000000
--- a/dev-lang/lua-5.3.3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=readline? ( sys-libs/readline:0= ) app-eselect/eselect-lua !dev-lang/lua:0 sys-devel/libtool >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A powerful light-weight programming language designed for extending applications
-EAPI=5
-HOMEPAGE=http://www.lua.org/
-IUSE=+deprecated emacs readline static abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-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
-LICENSE=MIT
-PDEPEND=emacs? ( app-emacs/lua-mode )
-RDEPEND=readline? ( sys-libs/readline:0= ) app-eselect/eselect-lua !dev-lang/lua:0
-SLOT=5.3
-SRC_URI=http://www.lua.org/ftp/lua-5.3.3.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c4df9708b53053d5d2cf7bf57030e64d
diff --git a/dev-lang/lua-5.3.3-r1 b/dev-lang/lua-5.3.3-r1
deleted file mode 100644
index 00e2adf365f4..000000000000
--- a/dev-lang/lua-5.3.3-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=readline? ( sys-libs/readline:0= ) app-eselect/eselect-lua !dev-lang/lua:0 sys-devel/libtool >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A powerful light-weight programming language designed for extending applications
-EAPI=5
-HOMEPAGE=http://www.lua.org/
-IUSE=+deprecated emacs readline static abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-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
-LICENSE=MIT
-PDEPEND=emacs? ( app-emacs/lua-mode )
-RDEPEND=readline? ( sys-libs/readline:0= ) app-eselect/eselect-lua !dev-lang/lua:0
-SLOT=5.3
-SRC_URI=http://www.lua.org/ftp/lua-5.3.3.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 portability 2b88d3ecc35035a3b8ab628b49cafb0e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=4730959b5f8ec38be7b367125d5a1b17
diff --git a/dev-lang/lua/Manifest b/dev-lang/lua/Manifest
new file mode 100644
index 000000000000..1c2536ee205f
--- /dev/null
+++ b/dev-lang/lua/Manifest
@@ -0,0 +1,35 @@
+AUX 5.1.4/01_all_boolean_expression.upstream.patch 1064 BLAKE2B 0b0f1504c57fabdd619187ed209864bc03f3c04fb651425dd4b7a30492c6a1441bab10695280eaf9277da266e883cb3f55ddc7ab496476b0fd1ca447cc611441 SHA512 b8d92c22059a50e7af0bc6fcc5773cda018628929c970650c963e2ad551cf758f503fe97de6542629d3b61ab2779970db811a1c7f7b7a2849a7632a4ec07b566
+AUX 5.1.4/02_all_table.upstream.patch 643 BLAKE2B adb5402472cd200ccbc39c51f484010f20ea2e6e4b99b7c08e1bc5db60f1aaa57c10f45c89a2999b75b620df04312b0c371bc8a09d44a1b8b9da5e8664e4c03d SHA512 fe362cb51516ea010eba28d15946641ef08e49e08d8a98b0fafcb86a4eb45311f8379efb67e82dbdd83533763000b59b438b0339c784c00ecbe85266f610c9e6
+AUX 5.1.4/03_all_debug_getfenv.upstream.patch 232 BLAKE2B 25d10a11a2448547c3b3e340690e42bb6127949382dc60355d94cbc945233b2b91b90fd044f82b63f69a89e3e86baa55ede8ec36fd3989c76fd5c4697001a38a SHA512 226437b7943e914e402ac386bf8d78fe4d1584a581df2911d500a46b445aeb8c9ce5224aff2b063d1e45b56770facabc69548081f11342de212041404e8415b6
+AUX 5.1.4/04_all_gc_performance.upstream.patch 414 BLAKE2B 3225ebf965dd3c040a4cc5c0fefd5fc101f1831cfdebdce921b8ad9b76d70ee56e5315238b72aea920f5a0408565234aa89781447d9861834359cae0f40767e1 SHA512 e706bd69a4c471a105d50a1d97cce8a055aa532b5840cfa76f407d12d8169cac1ef077b77c75a9b9579d0480256c0d3cc6a89eba5a4027fe70494da4b6d546e8
+AUX 5.1.4/05_all_string_format.upstream.patch 651 BLAKE2B f4d0f5f2d10ed478a95e16feefe17533c66787d35f5253d44c8a047d5b043a8c3d2fe35fa2b3da8345c62a3496323cb129bb0676caed207c58f2a7b80a2cdc21 SHA512 4820764c9a832d7707b0710fc3f16a58958d23a3b2bf04875a71973a7aee65426a5c009298cf5f4d6333dc2e722f55a77b926a2cc14687927d777409a8e1ecd7
+AUX 5.1.4/06_all_io_read.upstream.patch 319 BLAKE2B 4b2e1401c7e9a6a7c87519656d0bfd69169b553e85254412f5912adf9f722d77ef95eba2c49329931484c300461bdb40de1d8308c3f2f71bf8212ea5e55eada0 SHA512 0fba978b95c9d0ff65fd8d05ebaabd75a65922360739c4df4c0a2c8412ad60f37d7ac2ad7413ca203b481b2818d7a446495a2b6f2f45c17815c5e0c8108f1a6b
+AUX 5.1.4/07_all_boolean_expression.upstream.patch 679 BLAKE2B 2325e4928886000a0c1cc894cf94b25293538508f50995ad1a4c76d20a0864fd31010dfbaa4a6b79cee1452303c4d9660afff572527df6a5121f27939b27a2e2 SHA512 1175e695cdb4f7e8ba8421a89016d40b28be165bbdb758317b7514fdd89fec51ac00a2b3d6e0a03abd76bbf98634a7ebf5b52cefbf3a3866457b84487e0efcb5
+AUX 5.1.4/08_all_metatable.upstream.patch 379 BLAKE2B 1499679e7f8ef5f55d419dc7527ccd550004ada0fdc97c3bbff3ed33ac6426789e4d759738a77f6bb5107dbc21c6646e653ad3837f1145e782e5264ed469615d SHA512 064d8a6e23cc5a1eb099b15e554ebe24bf29a677cd4a4885977b66d1de19d84a716e348380b784b3ec3ea4cfbd5d90d91936af231f3851dea9965c646be8e792
+AUX 5.1.4/09_all_prototype_collection.upstream.patch 459 BLAKE2B e9e14f79ad69fffad68dd8d7b0ebc577bac2b7c3a0c95ee2519f9d3034bd28d498e812f1bef4fea3f3c8234066aaeefcb345af7e4d478e6fb3398b60da650269 SHA512 4fd573d9346e09dcbe65fc9e3a9147dc586f728db95f62d1b731b39f442b08c21d74562ceafdbd39ecad4091afda2996b582c9e9a758d4e08d1f5f9a330fe47d
+AUX 5.2.0/01_all_memory_hoarding.upstream.patch 1639 BLAKE2B 14ff68362d99e00fa3e5689cb09a84a2303266ba6ce553bd49c3d0be93da976e18dba53efb06f5df1f7e5a0ef021425698b8782923ba6011988045a4562b01ab SHA512 c1e0d0db9899539ade393ddfe7f5b9493576227cc4e29ad6623c869d1e91b0d28061f85e5cf9fc36bb70b5e53aad5d9c8848982ccfbba2cf4a6019fd260eed8f
+AUX 5.2.0/02_all_hex_number_handling.upstream.patch 938 BLAKE2B 4d995b9cc7e90e798a24edaadd5c2db086124cf157aacd1763312c3f813a07a293dcd50e19496bb90a7ef0006f5c7be6181bf330c21ce53cfffecf3e457f49fa SHA512 950c05767fd2fb39cef253323544fe079e88443047f63b495ff7639c980fd410db0f5769fa7a19134db819b1fc0b252e5f34d48fa6c1352874f734586cc2d41e
+AUX configure.in 66 BLAKE2B 60319ac9b6bf60c84941673c4949e590e99c5e77b1309e25df797a8deef85d0d8ad0339e8b4fcfa5fc721545ceee62475f2284ea8f930687682265b1d03e4144 SHA512 b61041151ad4be2bb4a62f6659850fcf4179553103c421694ce739b84a57408fc59d09f5ad3f6dd8513be78ffa472689dc729031e3ef42b99f11ecc8e0053ffc
+AUX lua-5.1-make-r1.patch 2229 BLAKE2B 001317361dc3ffc98ad36f3a80137580503e04b5267b74f79ab25cc355bf93663b6e5a5ba35ea827ef66717a98e33cba3bbf2130ce458ea81b83abca71c00c9a SHA512 cd24e228b0d7f2abcb5afe045fc824811c9db9dc684f9e33f0de0e7215e18e6eae51fd86c5910a338a810679d46727944950fced42636e0484d9c3f08fa07fdd
+AUX lua-5.1-make-r2.patch 3071 BLAKE2B 7b971b367f043d6149eeb7e49eb50253f88eff34253e4a21dbbcd293a76519ca0e6add27dbcb1b57f39ed096cdf8d2b52470c7bc217cf36004568ea993cbfa69 SHA512 a5384262e033943fe0088ca14d854d1e3767f8e266d09ba1bb15caf5f3f4bf6285ed1e37dad100f931195bce0eca5a862bf52ab664482aaba6ccd905b6ca8ecd
+AUX lua-5.1-make_static-r1.patch 644 BLAKE2B e1615d2779814f7f5baf8d7257f132d812db56b093dc871b28d69307196b37815d2b1e3051da7fcba21cb3120ef2f3b6a6b869b0b3808084ae67c5f738139ed3 SHA512 8cb1de7281839ebb492979f71b65c9ff6bbbde413c88323be6b77d7b7d26eb2034c541a883fd7cfab0694293732f3ac46dba33620d7df30c45059560b8d6503d
+AUX lua-5.1-module_paths.patch 1078 BLAKE2B c8c6def6f3099f61cc750657df1609a0a26b9201db7ae9d07b792a1eebb50be8a7bbb3a6ef6201ec4927a199c116304edaef0b9c9ab0fc833df4d7e56e92332a SHA512 123b115389d01d383af8698d2ed66c75bb7c3e2d33de57b8539ae56a9478930a0a72fa5657e78cc1c5b6bef00d07ec3a51e19ec0e419647e84eb158fb5c4795a
+AUX lua-5.1-readline.patch 360 BLAKE2B b528a3566aa59fb1cccb22417b01e86ee0cd3b77a3e278a20d5b476949daf47f0a656c7493a137594f1cf3136d327530ac97833cf584956b35b6a88a808535b9 SHA512 a99154258419dc2e582804eae97517687e5b8b5f731dc91722193d1ff470b8522af6ff4e7142c9258afe4734cd52e6987d3c2108ac52b1487a262f1e89f2f332
+AUX lua-5.1.4-deprecated.patch 1417 BLAKE2B 993dd3169ebeaf8abbf5bf34e39f85b5d429c49bb534cbb0351c217705f36d7048d847241e05b3181c0cf0d4e54d449351b27947cea45b7bb880f4f62d8ebaeb SHA512 5b82058ece2cde2a720f9cdae727be0a68895438f90e24f2e37adb1cd79cf637ce20bb283918e44f4f561aa87a9b4f19d3305d71537671f61438962d48970f39
+AUX lua-5.1.4-test.patch 340 BLAKE2B fb1e93293d60d85e6ba6ef1d07c34d329a1db4368e7e1e7307822cabf3082c802a5d7c3449caaf0e71759d09b6e41d4b8a04220b54dbb980991a10d0d64c77b6 SHA512 720135cc9d4c224717c2718b5709b43a1d66340fbdc3826037db672ef92014b6145f50263198d7641525194e6f9f9fdf16b78bdc6fb832dd7d13a89f06af67d9
+AUX lua-5.1.5-fix_vararg_calls.patch 470 BLAKE2B fa5863445dbca630dbe00fd03a09f752dc27d0106cb7a5cc8bddf51dc9bd01ae843ad29219ed2ba29dd3088b933bcbf91fc87d5c58a972f4bac99fe112f05aff SHA512 630e8537bd80771fecc4c8216ec96e243654bd0b7bd006b6867baca4effab90bab4a922951661d4fc3ac2700c3bd7c0c40227b9eeee7dd5a87c07a6382055b04
+AUX lua-5.2-make-r1.patch 2442 BLAKE2B 7f281a96b602b992099869648cc7229312578890644e9241f249c7335e04dd70573df6673a2baf19a7d985bc0c30d0821af4cb830bbed55cf7d2a8f83037add2 SHA512 e51b6fd7c77906a918f3987379e134d7423cc9683efdf6cdd2992b187ab0fed99732523b0f2819816a8789e4ed176c6f62774237f036e09e0c9d56582e0c3be0
+AUX lua-5.3-make-r1.patch 2854 BLAKE2B d60d1656a5f411b218b4f1f861f150759e6331ffadf28fde50cf219cbe01b5f1e6be4a3872b3c27a9ed561e80f91983e024124ca5c5871c6c63252cf0ac1c11d SHA512 80c2930bbd204551545cdd6793ec8dcd7d753fffc29710786b3662dde13b1af3a9825c95118e23bc98149f316f12f008223b675df929a244ef29c8a2a773560a
+AUX lua.pc 658 BLAKE2B 580504c8162c9cbde35b4a817c688b955cad1a35b1c21ed527488eda6e7cf78dfa81fa8b100737cf9ad620d34d94eceec01ba09e4fab0b121c5e4c673677cd3f SHA512 cb476ea6dd004a9aa0094cfc219d1888c5f578b44968a960acf1f2f32783a8e4d770bb033fb1ab4851f225188bbdd434b5d239718cae2c2c35f5b5f124a722ca
+DIST lua-5.1.5.tar.gz 221213 BLAKE2B 915eb8e8c9d7e460eacf1d7a59309c60dfc0f5d9d3d76fbc9764e7cae85920b95096db1c27b69ac53378a145c29efde403e88166a1332a67150d9d3a897aba02 SHA512 0142fefcbd13afcd9b201403592aa60620011cc8e8559d4d2db2f92739d18186860989f48caa45830ff4f99bfc7483287fd3ff3a16d4dec928e2767ce4d542a9
+DIST lua-5.2.3.tar.gz 251195 BLAKE2B f3d11e180fe070cb5be98f0694081d26067e21eddeb09cd74b1bae6ecf01c53dc46746b871e38555525da155bf1b83f0e60bae5387c2b96b1d19b15f94b716dc SHA512 264bb7c8db2f190ef0ca38584ec81999ab588f54e03119c5214c40bb8925b0eb407fac483a03e40cc8a220f6748ddff7d3a7392da3803418276b0d263b866449
+DIST lua-5.3.3.tar.gz 294290 BLAKE2B 8052d3fa5f34636df314886a62d63e46fc76ada765679da9352e751f484a458404ac55e5b32ad63ced9d2b16d629d62a52240b1b1a509bcdf5d5df85e405646d SHA512 7b8122ed48ea2a9faa47d1b69b4a5b1523bb7be67e78f252bb4339bf75e957a88c5405156e22b4b63ccf607a5407bf017a4cee1ce12b1aa5262047655960a3cc
+EBUILD lua-5.1.5-r100.ebuild 3770 BLAKE2B ab49e36ea2f80b8ca46c7a5506aa3a56cf5ca24e2890b768c76fa6fdfc4d46d8e34d599bc1861af222394cdf54c301c739d8db6ccde5d7c11302bc4391c64bc4 SHA512 7b2c09578708f6c25dfeb4059bf134e428545e760b20f73e4ef61f01179ce211c351c49386d8771bd91f7ff418be9ba67e17aacccaedf1da182758dde2488aad
+EBUILD lua-5.1.5-r101.ebuild 4031 BLAKE2B 2362b98d064d2587fb4bc0254625014b97e4124f82676b88200afbf726ef86b175fb9839c463cbe22657a343e3f6b4c1eb839b42f1dfeeb40cebb61d75c9eb2d SHA512 aa8f1c4164ac498eed8c3279f2ef9d5538d583f0228c287c39a03d5cc01718a1b4adfb8c1af25368e533fcb7a105213933d577d9a82a5524deced0bb21bbcc6c
+EBUILD lua-5.1.5-r4.ebuild 3665 BLAKE2B 1099a1f977f9287f6df7d205d82e35fa2be78785e18f9c5e13c4e06abae99ec02b14d3d25a22dee6a0ba750b484df20583b16429bc1f6e3a2010dd317fbe8f3c SHA512 bd9d21b1e6183634f9a005a38a8f70c51bc6edc178741991e4dccd49e4ff817ea63227d1a4d6bea65b179c9f7b17d4b0173a380331d8f2534f2f6adfee1686e8
+EBUILD lua-5.2.3-r1.ebuild 3793 BLAKE2B 5d5345e20a14fc741fe4cf1a1e32e46e44597fcd3a772229c41fdab0dd4f0d7d3237bb4241a75f0ed063ecf94bff54a65183bf97afa3b48cd8b79f27954344d3 SHA512 aa3f363a71a82211a86c922bffec1704d8caa7be3fe04f8329c6c6c7e54e34a79328e707f8ad2128d787767f6030c9e1446ff93a4f950512f5bfed19cad9e334
+EBUILD lua-5.2.3-r2.ebuild 4054 BLAKE2B 856dee39b7ee4d446900b74b26689d436cbde89d72b48f71768417b14c70b9f61c531defb8aed696ee603c35da3d0e159bd5773155a898d363f25877874a3db0 SHA512 528881025ed6424c8174e7e066cfcd4e9a143a15b23041937dad8f17ac0206a49fbdf5804310e0cca98399f19719aeda013df01a6e15a91668e07be1180f8122
+EBUILD lua-5.2.3.ebuild 3279 BLAKE2B 080f83549f4cb16775abca8d1fc908fed42ac5e75aa8bfa65bc161b67db5d174f911eda01a3209ca0e9a7f58ca90d8188470d593dc20ac7c3144e2c9d7ed90d4 SHA512 cb851d092a833f29903fdf8f3f4acd6a2147b74d95504a9fe6e352e86de42c2d47739fda6552a8fa5aa849e3f68e9829921fb86a25f2009b1320ba767a4f768e
+EBUILD lua-5.3.3-r1.ebuild 4066 BLAKE2B 10f5fe247710268d25d217092d9374ba58f2bee7f0f88dd133986be5d81a355fe9177df41d15004cbef62b362447f66fada16c9e493e8121d46784f4ba38017f SHA512 faaf2465de1617b0a6a9bf243e1329a6fc56fdf05e205df3c62366a95989453e2d65066644e315d7b4736ac032f9271bab107a33bf04397b38d22ff65f4bc540
+EBUILD lua-5.3.3.ebuild 3805 BLAKE2B 33cd06ec99e6501bb595d09ae713c90e0b1a8e24be53931bf073ce557a282aa9fde99eb87cba65062887894ab30af27c001c31eba94cc7d6af88dc91283e5348 SHA512 c911d5a741c7c68264bb447a3912a64fa928feff1fc0a4f3f5dd9643baeaf83b4ad2a9f005e0abe3cb098a437b5e07f676687826bb171faf88ba2f3225825d3c
+MISC metadata.xml 451 BLAKE2B 97895c97f22d1d17e8e888a311f8b01b345fb296189016efdd4da71384f2adcae47bfe30b4da92499fbeaa5f1257ddb9e3116aa31167e62366127b578a753b08 SHA512 ee674307c2a1daeeba3e9da078e440648ed379422801989007c15c4c8233e905b14f8e4fae66ae2804a5b39b0676e4cca9ff21fb8985874bccfef15b9dd918a9
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-2.0.2 b/dev-lang/luajit-2.0.2
deleted file mode 100644
index 414474566212..000000000000
--- a/dev-lang/luajit-2.0.2
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DESCRIPTION=Just-In-Time Compiler for the Lua programming language
-EAPI=5
-HOMEPAGE=http://luajit.org/
-IUSE=lua52compat
-KEYWORDS=amd64 arm ~ppc x86 ~amd64-linux ~x86-linux
-LICENSE=MIT
-SLOT=2
-SRC_URI=http://luajit.org/download/LuaJIT-2.0.2.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=5a5acb335997cadfbf28abf7161b613f
diff --git a/dev-lang/luajit-2.0.3 b/dev-lang/luajit-2.0.3
deleted file mode 100644
index 7f0d43d9b885..000000000000
--- a/dev-lang/luajit-2.0.3
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DESCRIPTION=Just-In-Time Compiler for the Lua programming language
-EAPI=5
-HOMEPAGE=http://luajit.org/
-IUSE=lua52compat
-KEYWORDS=~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux
-LICENSE=MIT
-SLOT=2
-SRC_URI=http://luajit.org/download/LuaJIT-2.0.3.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=4dab0f515288f1975e47f0f43bfc4dcd
diff --git a/dev-lang/luajit-2.0.3-r1 b/dev-lang/luajit-2.0.3-r1
deleted file mode 100644
index fb9de09fbbeb..000000000000
--- a/dev-lang/luajit-2.0.3-r1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DESCRIPTION=Just-In-Time Compiler for the Lua programming language
-EAPI=5
-HOMEPAGE=http://luajit.org/
-IUSE=lua52compat
-KEYWORDS=amd64 arm ~ppc x86 ~amd64-linux ~x86-linux
-LICENSE=MIT
-SLOT=2
-SRC_URI=http://luajit.org/download/LuaJIT-2.0.3.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=6fb748bcb395620d84bfa3fc7a81a610
diff --git a/dev-lang/luajit-2.0.4 b/dev-lang/luajit-2.0.4
deleted file mode 100644
index d6cb0a803622..000000000000
--- a/dev-lang/luajit-2.0.4
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DESCRIPTION=Just-In-Time Compiler for the Lua programming language
-EAPI=5
-HOMEPAGE=http://luajit.org/
-IUSE=lua52compat
-KEYWORDS=amd64 arm ppc x86 ~amd64-linux ~x86-linux
-LICENSE=MIT
-SLOT=2
-SRC_URI=http://luajit.org/download/LuaJIT-2.0.4.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=4a0cfb66d4030f58049e1617a946b18c
diff --git a/dev-lang/luajit-2.0.5 b/dev-lang/luajit-2.0.5
deleted file mode 100644
index 1b24054c4811..000000000000
--- a/dev-lang/luajit-2.0.5
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DESCRIPTION=Just-In-Time Compiler for the Lua programming language
-EAPI=5
-HOMEPAGE=http://luajit.org/
-IUSE=lua52compat
-KEYWORDS=~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux
-LICENSE=MIT
-SLOT=2
-SRC_URI=http://luajit.org/download/LuaJIT-2.0.5.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=2007731ba7a31cb1aeac8d3e2f70667a
diff --git a/dev-lang/luajit-2.0.5-r1 b/dev-lang/luajit-2.0.5-r1
deleted file mode 100644
index 644527faf330..000000000000
--- a/dev-lang/luajit-2.0.5-r1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DESCRIPTION=Just-In-Time Compiler for the Lua programming language
-EAPI=6
-HOMEPAGE=http://luajit.org/
-IUSE=lua52compat static-libs
-KEYWORDS=amd64 arm ppc x86 ~amd64-linux ~x86-linux
-LICENSE=MIT
-SLOT=2
-SRC_URI=http://luajit.org/download/LuaJIT-2.0.5.tar.gz
-_eclasses_=estack 43ddf5aaffa7a8d0482df54d25a66a1f multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=e671593bbc501382f0d5148640c8c21d
diff --git a/dev-lang/luajit/Manifest b/dev-lang/luajit/Manifest
new file mode 100644
index 000000000000..66f497017545
--- /dev/null
+++ b/dev-lang/luajit/Manifest
@@ -0,0 +1,11 @@
+DIST LuaJIT-2.0.2.tar.gz 843031 BLAKE2B 7dbf36c1d41106bb55b4588920a79b4c68139e009cb157d0f4ca8f0c72d8f7def1edd4517237234c5833acdbda0ec3dc25edb18bc55298b139463dbb6e58476a SHA512 c1afea13ec61a59f37d1f61fc50bcac47208d9d4f0a80689b74e901ad2b34294b6c89a0b4eef54b43f3d2db411660da61b191b0bbfba4ba2f97743a9ee4484e3
+DIST LuaJIT-2.0.3.tar.gz 844927 BLAKE2B a6ed54ef562b7af594367cbc0ed6e20295bb64781ceb6b46df81d10d7abd9fdaf902344ab7a6dfdffa6fc38b05e70648ae53c9cffdfb2a866989eba4b02fe9df SHA512 7b3e3de22ac3602299b5918b60801e45a3278e547a15c16fdae7359538d4ada27ba664935d5f97c7409f330c2f8efeaae9ea03415f5e9d5a9d81e022cd5d36e0
+DIST LuaJIT-2.0.4.tar.gz 847615 BLAKE2B b410d06734056283655e70a53b4f1160553cc74a9d6a80d4a919f7f38589888fff339eda661ec623258a5f186f4eb2d2c9b5809b6f7e55f9e058058426e2fe74 SHA512 a72957bd85d8f457269e78bf08c19b28c5707df5d19920d61918f8a6913f55913ce13037fb9a6463c04cefde0c6644739f390e09d656e4bbc2c236927aa3f8f9
+DIST LuaJIT-2.0.5.tar.gz 849845 BLAKE2B 961c8622e19b0e66a76a875cb46ad149cb2559b5af41f360dc41dd0d6bb924583e6477dd1329f67c2ac6ea4b8dc42c5e2f4d63ea49400aba4d9e7c7e85e4b085 SHA512 2636675602b4a060b0571c05220db2061dd2f38568e35b2be346a0f5e3128d87057d11d3d0d7567d8cc4e0817b5e4cf2c52a17a48065520962b157816465a9fe
+EBUILD luajit-2.0.2.ebuild 1701 BLAKE2B efab2a2a1353da44875c08337d617c41669fe71b2b90335cad6211c000aca07389ef19e92db97ab92102e773b093a38e0fa5c16aac72c2880da773be589f8335 SHA512 b414dbdb569c6121c21b68ff3f0c411d126ca82edff21df5b6640cc55f0c9b9a8edee7975d2bd7bc2d68d0073c7f06e390587884ed82e4827935025406e8df64
+EBUILD luajit-2.0.3-r1.ebuild 1359 BLAKE2B 7636abf7dc42fa1d7c0c791339718308ca2d4b3e08d4e1f132669bb8d0354e2cb106614dda5642785bb8050a6280fa1adf825e7d78ab166184489aa9ac9af6f3 SHA512 4d49cd2b1666c56ad86f63b20660846cc0d2b85bb430177adee0a059f09ee9337f979f04f27262eb8e54081dca2bbade2a13969dfed30f4a7ddde77c14a284d4
+EBUILD luajit-2.0.3.ebuild 1704 BLAKE2B 64a61522a1488c13178dffad3114f900b27aacf2c8b00971f83edb8312744cc045d03567beebbadfdf97bc0f7b8043826db3f9f71ddde5071b7d3abcfdc93556 SHA512 dde1467f89f2feac5123d2f63f1e305925fdca04f09fb4725cf5e0da3ff29ad0ce894fadce71fb1937a5954f14017000cf20175ba639c520cc868a7800577528
+EBUILD luajit-2.0.4.ebuild 1358 BLAKE2B 3dd160052c29cb09107ee75a1650f20959d192b74e2fe1dc4dafb7db0159366ebf264adc1aa078a45691e2cf62892994dbca695abf2a3ef56d4a49c2ba4ad174 SHA512 94f00d88a15725f285061b6d2f5be4d565bfa004776115f7625bfe6aa60ac08c7dd5797b1766de4a225e35938771f297d592f7a230ffc2bf948084bc4ed4631c
+EBUILD luajit-2.0.5-r1.ebuild 1417 BLAKE2B 66e9ce52fcd4e6fc252d7b9670b4ff66b180f5a825d1f74df11ea2638af9d74fbff7c4575ea9f398f6f47a9cb5d9c27fc412f65095ec0d90fe68b0aa01d47c60 SHA512 c35b575e042f76dcec40fecc62bcd73ae8b8ce72c859ba11704ae100e3a194cc852b3ca2c8261a460086a2e708c1dc473539572760b87c39949542a374e22ff6
+EBUILD luajit-2.0.5.ebuild 1362 BLAKE2B b182f5afae6fb12e66c1cab40921bb1f81c712f25820e1e40eb82bcc8e3d0596af2a173b71e981acf92eb035375877369ad23d44065ebbc278926f487b30929d SHA512 ad29a171d9798cf7713a1480141ca29e5a38d25eb68c8345d7969b21502bdd60b30b1279e1e294ade12f3de8f6e40685aaa1b5f64a5ffbef0a48e94018caab9e
+MISC metadata.xml 552 BLAKE2B 50666bd08bb7c06c52a28652c0a87988e815c1d3c10cc1425cc7979689fd4738f56aaa6478aaa616a0b76122e42f790b3b415a60078dcc256499019912f0c4d4 SHA512 9d6ef1cb9acf52db52ec192bc51cbab6a7aa198dbf108ed76b25b0e258491b2f8d5ec0981c538546cc96de490c8c1ac852e337ef09ab5898ad4f2c48f5670f07
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/luajit-2.0.5-r1.ebuild b/dev-lang/luajit/luajit-2.0.5-r1.ebuild
new file mode 100644
index 000000000000..a90f9c43d19b
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.0.5-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pax-utils toolchain-funcs versionator
+
+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 static-libs"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare(){
+ if [[ -n ${HOTFIX} ]]; then
+ eapply "${DISTDIR}/${HOTFIX}"
+ fi
+ default
+}
+
+_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" \
+ BUILDMODE="$(usex static-libs mixed dynamic)" \
+ 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}"
+
+ HTML_DOCS="doc/." einstalldocs
+}
diff --git a/dev-lang/luajit/luajit-2.0.5.ebuild b/dev-lang/luajit/luajit-2.0.5.ebuild
new file mode 100644
index 000000000000..5796c4dc31f5
--- /dev/null
+++ b/dev-lang/luajit/luajit-2.0.5.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 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-2.7 b/dev-lang/maude-2.7
deleted file mode 100644
index 9ccb46668816..000000000000
--- a/dev-lang/maude-2.7
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=install prepare
-DEPEND=dev-libs/gmp:0=[cxx] dev-libs/libsigsegv dev-libs/libtecla sci-libs/buddy sys-devel/bison sys-devel/flex >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=High-level specification language for equational and logic programming
-EAPI=6
-HOMEPAGE=http://maude.cs.uiuc.edu/
-IUSE=doc examples
-KEYWORDS=~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux
-LICENSE=GPL-2
-RDEPEND=dev-libs/gmp:0=[cxx] dev-libs/libsigsegv dev-libs/libtecla sci-libs/buddy
-SLOT=0
-SRC_URI=http://maude.cs.illinois.edu/w/images/2/2d/Maude-2.7.tar.gz https://dev.gentoo.org/~jlec/distfiles/maude-2.6-extras.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=ef474f04cbe929eface5ca547146897a
diff --git a/dev-lang/maude/Manifest b/dev-lang/maude/Manifest
new file mode 100644
index 000000000000..69bebdc7b06f
--- /dev/null
+++ b/dev-lang/maude/Manifest
@@ -0,0 +1,7 @@
+AUX maude-2.5.0-prll.patch 627 BLAKE2B 7a6b32561207a3f8fb13ad955f386970cfba84e9fbd59792a832a268e5350ef2f451a62d64bbc19e191deb756a9100f221e8e6ea493fdbfdaaa8640ca0ff3545 SHA512 640dc2d784b3010af41ea7c186f27ef71d96efa26ab68b9371a990c442ca4d33d7925cf9c2a096487c1d7bc38e920333a71d969aa683ee2231d3ce954a9ff1e4
+AUX maude-2.6-search-datadir.patch 1124 BLAKE2B 620382dd567eb4bf2c944af83a209cc01b6b571024da0435995ab76c10ee0c1527a68d21ed171696d659092bb2a3cfb0593ceaded7d96351da2c0e067f4d4fcb SHA512 3bdaa49e6312d965c753450c5fec39c1175e6a5a57c570bce56f10d6bf3a56027fc8eb17c3d899aa752d4094eae4bbc7d1eec0022adc656894beef759c151cc5
+AUX maude-2.7-bison-parse-param.patch 1027 BLAKE2B b8144c07c219987cd09d3555f05868d91c0727d905efd63ffe6cbdd0d9265c91a470db424b9f9719f7b0edb9f186656b6bab61e44cb40166c9d7802bd98ce368 SHA512 553c1e96fd72687025b71d04c476d853e0e2c8bab48f91f98ce1cb515562d27b7bbcb4e20ffb56c2dc3c7ee9cdbfe7c2da1d6d609b4bba34823c0637375f012c
+DIST Maude-2.7.tar.gz 1663708 BLAKE2B 5fd87cbd7ef2f86f4a7095334fd996109c72caaed44a894138803b76220325400920654924cb8645ed846b4d997dd2cf827d489ef7c4eef73ee22cb4e6e5a5dc SHA512 eb5225a7ec75df5f79d1e9c0d78c33427c0cf07bea83dae9e559d6d4cfc85fb03985596daf0c9c8794b34859510482f93b855254c1a3c650ee7520a3530a2070
+DIST maude-2.6-extras.tar.xz 3157004 BLAKE2B d735366071194eb7fd22c11628672aba38cc8c7f4460e4ec8806e27c2e1416e1a2a5fa93efd01c305bf36e0ce799578688c5ac87b5459e979323df6f60305902 SHA512 0533f0f226057d2668052f360245f296d36129ec242ff0bfa91fada9db5bc347d276d3468c86fbac92f019f3a2f152c7cb4e58a7f1265c1fb5a8b1b496fac5cd
+EBUILD maude-2.7.ebuild 1317 BLAKE2B 226f251a1c91d3043000e8624e0fd3470b9f2690071697f1496de3461f22ea2d7054efed86bde8fd123f115e115287ed63713a9a2a745fe0558f266bc49ae7f5 SHA512 6c3d4efa0212d2a933d25f07d200cbe26ce9245d20b0af5707562b517ae9da3c4cbd4692d05ca1a65ff40d95dab35faf81892a0b8b5a056e1ab00f5bb383d838
+MISC metadata.xml 708 BLAKE2B 45ec7072bcd0509e34ef2b5d3abd3a67abe84cf91f6dbc9e45fdc3d07bf4bebe520c40440b977e2eabdd06ec1d9fede487c74cc69df57819975cd75f8ca75016 SHA512 da572363e08716b890656c160e415a4e01bd0a0effaaa3a535108295fdbbc67210315b9c0f81e4fd4c9dc8a8b8a3cc454f5d2225be0d666dbc630752ea0e2cc2
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..2a557bd7618e
--- /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-13.05.2 b/dev-lang/mercury-13.05.2
deleted file mode 100644
index 9be606ee64ee..000000000000
--- a/dev-lang/mercury-13.05.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup test
-DEPEND=!dev-libs/mpatrol !dev-util/mono-debugger readline? ( sys-libs/readline ) erlang? ( dev-lang/erlang ) java? ( >=virtual/jdk-1.5 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=Mercury is a modern general-purpose logic/functional programming language
-EAPI=2
-HOMEPAGE=http://www.mercurylang.org/index.html
-IUSE=debug emacs erlang examples java minimal readline threads elibc_FreeBSD java
-KEYWORDS=amd64 x86
-LICENSE=GPL-2 LGPL-2
-RDEPEND=!dev-libs/mpatrol !dev-util/mono-debugger readline? ( sys-libs/readline ) erlang? ( dev-lang/erlang ) java? ( >=virtual/jdk-1.5 ) emacs? ( virtual/emacs ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://dl.mercurylang.org/release/mercury-srcdist-13.05.2.tar.gz mirror://gentoo/mercury-13.05.2-gentoo-patchset-1.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=6800d019f3d682f7225d09b3304b6912
diff --git a/dev-lang/mercury-14.01 b/dev-lang/mercury-14.01
deleted file mode 100644
index 054e5ef4d47d..000000000000
--- a/dev-lang/mercury-14.01
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup test
-DEPEND=!dev-libs/mpatrol !dev-util/mono-debugger net-libs/libnsl:0= readline? ( sys-libs/readline:= ) erlang? ( dev-lang/erlang ) java? ( >=virtual/jdk-1.6:= ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=Mercury is a modern general-purpose logic/functional programming language
-EAPI=5
-HOMEPAGE=http://www.mercurylang.org/index.html
-IUSE=debug emacs erlang examples java minimal readline threads elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2
-RDEPEND=!dev-libs/mpatrol !dev-util/mono-debugger net-libs/libnsl:0= readline? ( sys-libs/readline:= ) erlang? ( dev-lang/erlang ) java? ( >=virtual/jdk-1.6:= ) emacs? ( virtual/emacs ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://dl.mercurylang.org/release/mercury-srcdist-14.01.tar.gz mirror://gentoo/mercury-14.01-gentoo-patchset-0.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=b5de66db62d8e960504d3e255f862bdb
diff --git a/dev-lang/mercury-14.01.1 b/dev-lang/mercury-14.01.1
deleted file mode 100644
index b84041c7580e..000000000000
--- a/dev-lang/mercury-14.01.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare setup test
-DEPEND=!dev-libs/mpatrol !dev-util/mono-debugger net-libs/libnsl:0= readline? ( sys-libs/readline:= ) erlang? ( dev-lang/erlang ) java? ( >=virtual/jdk-1.6:= ) mono? ( dev-lang/mono ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=Mercury is a modern general-purpose logic/functional programming language
-EAPI=5
-HOMEPAGE=http://www.mercurylang.org/index.html
-IUSE=debug emacs erlang examples java mono profile readline threads trail elibc_FreeBSD java
-KEYWORDS=amd64 ~x86
-LICENSE=GPL-2 LGPL-2
-RDEPEND=!dev-libs/mpatrol !dev-util/mono-debugger net-libs/libnsl:0= readline? ( sys-libs/readline:= ) erlang? ( dev-lang/erlang ) java? ( >=virtual/jdk-1.6:= ) mono? ( dev-lang/mono ) emacs? ( virtual/emacs ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://dl.mercurylang.org/release/mercury-srcdist-14.01.1.tar.gz mirror://gentoo/mercury-14.01.1-gentoo-patchset-1.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=52d3df81bb2ba7f467ecb6851f6fa8c8
diff --git a/dev-lang/mercury-extras-13.05.2 b/dev-lang/mercury-extras-13.05.2
deleted file mode 100644
index 640cb8760a18..000000000000
--- a/dev-lang/mercury-extras-13.05.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=~dev-lang/mercury-13.05.2 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 ) )
-DESCRIPTION=Additional libraries and tools that are not part of the Mercury standard library
-EAPI=2
-HOMEPAGE=http://www.mercurylang.org/index.html
-IUSE=X cairo examples glut iodbc ncurses odbc opengl ssl tcl tk xml
-KEYWORDS=amd64 x86
-LICENSE=GPL-2 LGPL-2
-RDEPEND=~dev-lang/mercury-13.05.2 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 ) )
-SLOT=0
-SRC_URI=http://dl.mercurylang.org/release/mercury-srcdist-13.05.2.tar.gz mirror://gentoo/mercury-extras-13.05.2-gentoo-patchset-3.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=7ac40da117bb06ca4e20154ffe0ee8eb
diff --git a/dev-lang/mercury-extras-14.01 b/dev-lang/mercury-extras-14.01
deleted file mode 100644
index cebd01c07cab..000000000000
--- a/dev-lang/mercury-extras-14.01
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=~dev-lang/mercury-14.01 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 ) )
-DESCRIPTION=Additional libraries and tools that are not part of the Mercury standard library
-EAPI=5
-HOMEPAGE=http://www.mercurylang.org/index.html
-IUSE=X cairo examples glut iodbc ncurses odbc opengl ssl tcl tk xml
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2
-RDEPEND=~dev-lang/mercury-14.01 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 ) )
-SLOT=0
-SRC_URI=http://dl.mercurylang.org/release/mercury-srcdist-14.01.tar.gz mirror://gentoo/mercury-extras-14.01-gentoo-patchset-1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=93bae158d0b619adf0609d401f608828
diff --git a/dev-lang/mercury-extras-14.01.1 b/dev-lang/mercury-extras-14.01.1
deleted file mode 100644
index 9365523339d5..000000000000
--- a/dev-lang/mercury-extras-14.01.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=~dev-lang/mercury-14.01.1 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 ) )
-DESCRIPTION=Additional libraries and tools that are not part of the Mercury standard library
-EAPI=5
-HOMEPAGE=http://www.mercurylang.org/index.html
-IUSE=X cairo examples glut iodbc ncurses odbc opengl ssl tcl tk xml
-KEYWORDS=amd64 ~x86
-LICENSE=GPL-2 LGPL-2
-RDEPEND=~dev-lang/mercury-14.01.1 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 ) )
-SLOT=0
-SRC_URI=http://dl.mercurylang.org/release/mercury-srcdist-14.01.1.tar.gz mirror://gentoo/mercury-extras-14.01.1-gentoo-patchset-0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0a84f823b1d91ccac85d17b8f2890947
diff --git a/dev-lang/mercury-extras/Manifest b/dev-lang/mercury-extras/Manifest
new file mode 100644
index 000000000000..0f8c6e50a80e
--- /dev/null
+++ b/dev-lang/mercury-extras/Manifest
@@ -0,0 +1,10 @@
+DIST mercury-extras-13.05.2-gentoo-patchset-3.tar.gz 3538 BLAKE2B b323347ce98ecbc412cbd8683f8236b38b048e331c2b41d74874acdf17cc8b132211c15a2d29f8b98b7238e0e4e7cc1492b8e0a5ade4d348eb679fd322a22b2d SHA512 c151f876768c6b6ab7b46b4e2501569586249f5e185e534ebb5817206ac0844cd081ccae86a26ef85f27eab9d851017393c837728bd194520a549a0a60f738ef
+DIST mercury-extras-14.01-gentoo-patchset-1.tar.gz 3856 BLAKE2B 8a0792150a30ee552d1877e8736e25b0554ac68aaa7074e296886ea445c31a4b1593a438220da7bca45f49b2e49b0e4848f1e4ab852502bd3865632d378439c8 SHA512 c584efd4c7af54d2e8d5af0a63acced118f356527a2bf692262e37366e1018247aac8c1bb8f700f08f8f0a2c95d979e215e3c949ec1dc2994ab40048eb5b253c
+DIST mercury-extras-14.01.1-gentoo-patchset-0.tar.gz 3688 BLAKE2B aa78c8390e783a3d6ac9fe47508c4f86918a98c0d27204e7a19cb0bdc6572e34f76167f428f777af9a42b9cb744d93023abd00a6b097724f8438e6622541765d SHA512 02781ca23e72920c932067f7270d06e45909728133588c181b94f7b7580f841b4b0f1dd523e0c100350b191e5b28a7d1f10ad51fdffe2dcb02ff78cd5a906e3b
+DIST mercury-srcdist-13.05.2.tar.gz 53847394 BLAKE2B 23d2f8de6e9a4a2803fca9f3dec73215f6636389fdf388ef950042eff2ee43671577120f8324b309786d463e30ba9360d2df07ee498d78800182096f8773697e SHA512 2298804d3a04bca6be4bd3046643c7c0d0b22c447423017869cd9bf3a4fb6ec9fd29b5d8e1a386d5d52d07be5cad73608f1fcacf46732a7add93a01dcd199c08
+DIST mercury-srcdist-14.01.1.tar.gz 52658945 BLAKE2B 6497921a0227b9a6fbcbabdd309ef3325f32dda14fc4ddb443368385b89be4011d677a24b30b3702147d1b782fe2597760ad66dd34503aa6aebaf79707466529 SHA512 a128ef0fd4955abadea32019ec59297ffe32537415f32e9e948cbc1c3439bb40eb09de77569690fb18dd7d6969a2b1141b3ae5baeb87f2627eaa65ad93add92c
+DIST mercury-srcdist-14.01.tar.gz 52683989 BLAKE2B 32fa014f08ad6a7a4ca62dd08a460620f0c60d311021f3643a81868acdd1eb58150caca81b18612f760125c339a25ed908862e17e38b65dd56bde8c8bd0bffb0 SHA512 77f61df64fc150e08f191860f285b97d11a71a52eabc95f660b3c90d88f8ee71d1227f7ab4b8be78be9d4aa3d62a260a874020023e4795da4cfd2e6fefa9965f
+EBUILD mercury-extras-13.05.2.ebuild 4700 BLAKE2B db54c99ed0c1fd44467ace60c83d245208a52911fc84eaf8a4af490e740f9ab53317af8e1bac353048de31e9fb2b16e26c770464c0033080db842579d65a93d3 SHA512 df9663114548982f6f3453e8e1550712faa09093de7a2f24db4102ad4ac0856e2510cdb1f2841d6cec03f98311b0c170e0818507b7b7d7cd6b9e8dc22d13a33f
+EBUILD mercury-extras-14.01.1.ebuild 4597 BLAKE2B 97422a375edcb936510206be7125bf5aca42def76f243f4751e643ae65af71a4d5a0d07da637f74d8ab32a866d9f96999897f33d9ebdffa58ef485b68b6817b0 SHA512 e428cf5266452be63c8de71a7507c634af5a1be9ce6df6795d1051c0c65d4f959152508897b3faf6149a5e68a694d2e1827da9681475f47a23b6429bba4654a6
+EBUILD mercury-extras-14.01.ebuild 4582 BLAKE2B c2de2efefcc2ca6e36d6dff317e3bde8d33d0e8679bf885227fb2c36e40a5f0beceddacdc8cf4c761eaa1d9740ca327567ab8a9c83b3ac475c0fd4d51e2dbe91 SHA512 4f9d352fe306c95f3cf22acfcd9ac6623c51d4575140452cca095eebdf52271bf3061da52c735ad0d00d943792f332711de46b67773a26bab1e2d1c44813723a
+MISC metadata.xml 240 BLAKE2B 6b5ab0d76c5748af7bd1800d11864869d7365b8d53e2fd2ec66c1092dd1fdac8461b20c029ffe835357542ca69f789ce867988d64c43019e02fe9e3691f0f9bd SHA512 7cd99ce62ca4f9307fa7dfdbfd0ff9d8ff7485c58cd08cd684065aca4b570f8655587425f6a240453a9e86452de41f26f8b82aa81c023764d0beb47daa1b15d3
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..d18808de18d3
--- /dev/null
+++ b/dev-lang/mercury-extras/mercury-extras-14.01.1.ebuild
@@ -0,0 +1,199 @@
+# Copyright 1999-2018 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..b7a1a499d1ab
--- /dev/null
+++ b/dev-lang/mercury/Manifest
@@ -0,0 +1,11 @@
+AUX 50mercury-gentoo.el 130 BLAKE2B b0108f529cbe5b66b510b2ebab6f091825df9ac92dc1d98bc98b34532b6c217ea5ede7bc5960f6616c3a8201788c6a5094b30871fba15e5ded87eb97ab3f7c1f SHA512 e790f1b396f63bf36e57160d588b1377d3f889156446a7d26a6edd3f7175ee8ac5b8972ee4d0b6045b5442ae750341b5e06adc42f094fd6d08f2b519f4432071
+DIST mercury-13.05.2-gentoo-patchset-1.tar.gz 5622 BLAKE2B c22b3c21a53d10e564b703adbcde2d7986aecad378fc7f904642ad1c59e7de8a1a34c302309a03f35927782eaaa36d9b3f639fd654750d36c1af612b97cb35af SHA512 387956a120b2bbb7da1913e89cf33e7bdb8f205fe207701a33d19ccb667d1ae73a342955642120822448621bdba349ab628290d78fdef35c08b9ccbadda4177f
+DIST mercury-14.01-gentoo-patchset-0.tar.gz 5728 BLAKE2B acfc49facf63c3ce4dc50463a5cd38fbfe45bc463b619c1e01d653bfe13172ce9773a3c652c0ad9f1f929ad7806d0e69327249575a2065b77a9ac02de2188469 SHA512 f1e375ac192e478a82863aa7b8e28c1044a490c41bb63f7842b16b12b7cfa9c85938eacad4c3eacf348aafd42dfaa0dea5324b734d0d2a7454e3e9334369658e
+DIST mercury-14.01.1-gentoo-patchset-1.tar.gz 4397 BLAKE2B 2eb2b371c7c7c1a8330c9b5ee8f58c5c353214c4ca8115d355ffa13fac27b41836485ef8706e456897e71619571336cab89cadf2b19e966d4b731e83eb9b90d2 SHA512 6b4908e620d60c1745e311ac95336a008656c16a426b697c68cd417ba7eef8f9664f4c7b46e410fc33cfbc4655b8a2ff6ab48fdd979c6197b585c58a6e0346dd
+DIST mercury-srcdist-13.05.2.tar.gz 53847394 BLAKE2B 23d2f8de6e9a4a2803fca9f3dec73215f6636389fdf388ef950042eff2ee43671577120f8324b309786d463e30ba9360d2df07ee498d78800182096f8773697e SHA512 2298804d3a04bca6be4bd3046643c7c0d0b22c447423017869cd9bf3a4fb6ec9fd29b5d8e1a386d5d52d07be5cad73608f1fcacf46732a7add93a01dcd199c08
+DIST mercury-srcdist-14.01.1.tar.gz 52658945 BLAKE2B 6497921a0227b9a6fbcbabdd309ef3325f32dda14fc4ddb443368385b89be4011d677a24b30b3702147d1b782fe2597760ad66dd34503aa6aebaf79707466529 SHA512 a128ef0fd4955abadea32019ec59297ffe32537415f32e9e948cbc1c3439bb40eb09de77569690fb18dd7d6969a2b1141b3ae5baeb87f2627eaa65ad93add92c
+DIST mercury-srcdist-14.01.tar.gz 52683989 BLAKE2B 32fa014f08ad6a7a4ca62dd08a460620f0c60d311021f3643a81868acdd1eb58150caca81b18612f760125c339a25ed908862e17e38b65dd56bde8c8bd0bffb0 SHA512 77f61df64fc150e08f191860f285b97d11a71a52eabc95f660b3c90d88f8ee71d1227f7ab4b8be78be9d4aa3d62a260a874020023e4795da4cfd2e6fefa9965f
+EBUILD mercury-13.05.2.ebuild 5136 BLAKE2B 3053e2bdda4febcfaed7de9cd53e34b3ef6d14f0d8b4369f2b5af7d6e17299aeaed4ca2af81a9fa7521e5b2916525fc0da79feb63dbf0848a21b69e6346a48a8 SHA512 50f0616352d68d71bdfd58a5e4fd4ad2c3e99f53489efa4bc48d761498f56bee0932eef5d4265e5ad1efd89262f9ee70438c0d9edb6ea58e8faa933876e52024
+EBUILD mercury-14.01.1.ebuild 5109 BLAKE2B 2e247d5073d4fd91cb61bd786d9f2d04cc878171d419586a1bfe3d0ac78da648e48c3b24f8cd0ca8b4f420c04ed7949e002ffbc9832e1a8e04e774571a76cd69 SHA512 443279c1d7c79f145c0b8db1958b95dbcbcedfba9bdbaea8c7148df72443560dd1c39b6fe976fd577eb7837ddfc3c60e7e44c5e1cffbda82d4c95a41fc72ca66
+EBUILD mercury-14.01.ebuild 5230 BLAKE2B 4102d4a52455236f69d36032b2878afa337367cb8b812a82820a57373e6f9a4db19a6c64f87a9a382dc6412fbfaf339a3313f4d81ac0bea3d7458436c7e5ac0b SHA512 e5eacb3dd916588e22aa3ae0a2e383295bce505011b68d2b04755ef3e307930166539adf7015fa9fb745f320e1b45e83b77a5ca060db918f3b84c2c6f78e9ab4
+MISC metadata.xml 384 BLAKE2B eaed468c341970157e4e641d25d5d87e0851bdbd31ba9d6c1e428c9f0239ad98220395858d6291fabe41561fb2ecc5c894700a86b290fc3cab2eaeda2a9df372 SHA512 c90a7a81ab16bac0af4bb9dd3f47cfb3987e0c3aebe08bb7ac6125baf7c619269318bd2c7a45e4213184544d981c920cace23ccb61fbb60c0872db77a10e3ecf
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..f192627fc96e
--- /dev/null
+++ b/dev-lang/mercury/mercury-14.01.1.ebuild
@@ -0,0 +1,202 @@
+# Copyright 1999-2018 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
+ net-libs/libnsl:0=
+ 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..003906b05deb
--- /dev/null
+++ b/dev-lang/mercury/mercury-14.01.ebuild
@@ -0,0 +1,203 @@
+# 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
+ net-libs/libnsl:0=
+ 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/micropython-1.9.3 b/dev-lang/micropython-1.9.3
deleted file mode 100644
index 209dcef954b3..000000000000
--- a/dev-lang/micropython-1.9.3
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install test
-DEPEND=virtual/libffi virtual/pkgconfig
-DESCRIPTION=Python implementation for microcontrollers
-EAPI=6
-HOMEPAGE=https://github.com/micropython/micropython
-IUSE=test
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-SLOT=0
-SRC_URI=https://github.com/micropython/micropython/releases/download/v1.9.3/micropython-1.9.3.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=91bf5e810b7e3d390472a293c80408eb
diff --git a/dev-lang/micropython-1.9.4 b/dev-lang/micropython-1.9.4
deleted file mode 100644
index 906c18161541..000000000000
--- a/dev-lang/micropython-1.9.4
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install test
-DEPEND=virtual/libffi virtual/pkgconfig
-DESCRIPTION=Python implementation for microcontrollers
-EAPI=6
-HOMEPAGE=https://github.com/micropython/micropython
-IUSE=test
-KEYWORDS=~amd64 ~x86
-LICENSE=MIT
-SLOT=0
-SRC_URI=https://github.com/micropython/micropython/releases/download/v1.9.4/micropython-1.9.4.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=dfab625b491d34d5f2385825f2e37c4b
diff --git a/dev-lang/micropython/Manifest b/dev-lang/micropython/Manifest
new file mode 100644
index 000000000000..24b92f1aab2a
--- /dev/null
+++ b/dev-lang/micropython/Manifest
@@ -0,0 +1,7 @@
+AUX micropython-1.9.3-prevent-stripping.patch 787 BLAKE2B c050420f5dae60edb93c63b504fdbe047a8c9ed56c543ffde817c86a6fd9a53efeb8561c69823186121a5727fbf29b8474eac223398fa7ee43c825e50745c6fd SHA512 5e7fa7481f4bfab15a041bbccf452d5d6fe5a5c1cd8cfae2e5ec3475d84decacc0b9c0631766582173fc4cda82d78e2370e402f95d5989e13bf3adbdaf39add4
+AUX micropython-1.9.4-prevent-stripping.patch 787 BLAKE2B 6e92c4fdfd44b89d1fad69c056dbab1493d9dc45c4223cfd2f011254db72400c6ac9a62afe84f54c301a86abd92deb56866dc25e2f1bf8af74edf308b15eb29f SHA512 8f994394f42d7fed5fa35b62c01c37ebea3b487c029d659134a263ef8d65e1ec17bec755fdf57cde2f234969bc4f7f4ab30858562d7f8cdb2bc6cb819ba2ae0d
+DIST micropython-1.9.3.tar.gz 17311734 BLAKE2B 31ebdedc402af53b205a854aa61b59c694cc893c7f80e4b84196c5d44527545f442628938b7dd923ed9086a79e00ff899682548115224613e888eb8a37dd5ae3 SHA512 1b4358913ed78df66314c9a62636c7b8d086c731459e3bee1fab8695286dc03b6ec7594b2f9b8105e2a6d62190d95c6ad5351fb64c666c1ea54b9535193ee8a8
+DIST micropython-1.9.4.tar.gz 18957648 BLAKE2B bc4dc4ef6623adbda64c9e03137860a7b9ce7d2d181434cb993438752ec39a4ea7cf7cf7a14736c57bdc2ea9c3f856b0dbe2d92fc0e1cbef99112427583ad665 SHA512 9995c983c93fb1280e60d7c52a10930a6a3de8d589a0f4264a9a4a4fede7c37e27ed4871c4c9092aec3fb33028064beb8c5eb19b7956e8f0c5d3b2a82ffa9932
+EBUILD micropython-1.9.3.ebuild 1158 BLAKE2B 1d452bdf85783135f6bb2c4e0d2f6cd297d863d00eef8003dcc9f5710e0b03194828df751a205b1c6069506c509685189a66083b27324c3f1ca9c64a06297596 SHA512 1eef495d618817b0023c13b4bd7606ddec09f4ad32e6beffe3bc418549781b53d92340af90a39e3995f8decc9454b9221b2b048ec713e01fec7c1fc058ca8744
+EBUILD micropython-1.9.4.ebuild 1161 BLAKE2B 9bc660c6e4e93cf30ec20a9ca1758a13024ec2c16cfcf442f406912e59a3bf3009dfda29dbc0947d0dc966538fd802d551728019abd9212fa851153224a56713 SHA512 d22375deb3c95e317b8a8cde81f0366b1d83a90ffddd3f52b253b78313e96cc93b5e8e07c4efb4f997ac3f204cfbbca159d698136c4cbfe0151433246335e9d6
+MISC metadata.xml 1347 BLAKE2B c121e2eafde4ab3c49a352ab96ffbcc042ecddb5a765f3192589a41f5b3bc5f92e6a6f1a58df21ef2812424aac94e6cd579cfe1d29b4dd16983048768f1694ed SHA512 e8dd8f7cc3d0c570da6b9982596e39891e78e302581dbc0601d622831f976f16b9e9f78d7e0b55ae58ed3c81c3e7113a4217ca1671cdd8929f0b34b4647efc3a
diff --git a/dev-lang/micropython/files/micropython-1.9.3-prevent-stripping.patch b/dev-lang/micropython/files/micropython-1.9.3-prevent-stripping.patch
new file mode 100644
index 000000000000..5ae7299f9f9c
--- /dev/null
+++ b/dev-lang/micropython/files/micropython-1.9.3-prevent-stripping.patch
@@ -0,0 +1,22 @@
+--- a/py/mkenv.mk 2017-11-25 09:52:30.921836372 +0000
++++ a/py/mkenv.mk 2017-11-25 09:52:35.257861233 +0000
+@@ -50,7 +50,6 @@
+ LD = $(CROSS_COMPILE)ld
+ OBJCOPY = $(CROSS_COMPILE)objcopy
+ SIZE = $(CROSS_COMPILE)size
+-STRIP = $(CROSS_COMPILE)strip
+ AR = $(CROSS_COMPILE)ar
+ ifeq ($(MICROPY_FORCE_32BIT),1)
+ CC += -m32
+--- a/py/mkrules.mk 2017-11-25 09:53:13.107078063 +0000
++++ a/py/mkrules.mk 2017-11-25 09:53:31.898185592 +0000
+@@ -132,9 +132,6 @@
+ # Do not pass COPT here - it's *C* compiler optimizations. For example,
+ # we may want to compile using Thumb, but link with non-Thumb libc.
+ $(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS)
+-ifndef DEBUG
+- $(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG)
+-endif
+ $(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $(PROG)
+
+ clean: clean-prog
diff --git a/dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch b/dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch
new file mode 100644
index 000000000000..a130b72b6131
--- /dev/null
+++ b/dev-lang/micropython/files/micropython-1.9.4-prevent-stripping.patch
@@ -0,0 +1,22 @@
+--- a/py/mkenv.mk 2017-11-25 09:52:30.921836372 +0000
++++ a/py/mkenv.mk 2017-11-25 09:52:35.257861233 +0000
+@@ -50,7 +50,6 @@
+ LD = $(CROSS_COMPILE)ld
+ OBJCOPY = $(CROSS_COMPILE)objcopy
+ SIZE = $(CROSS_COMPILE)size
+-STRIP = $(CROSS_COMPILE)strip
+ AR = $(CROSS_COMPILE)ar
+ ifeq ($(MICROPY_FORCE_32BIT),1)
+ CC += -m32
+--- a/py/mkrules.mk 2017-11-25 09:53:13.107078063 +0000
++++ a/py/mkrules.mk 2017-11-25 09:53:31.898185592 +0000
+@@ -129,9 +129,6 @@
+ # Do not pass COPT here - it's *C* compiler optimizations. For example,
+ # we may want to compile using Thumb, but link with non-Thumb libc.
+ $(Q)$(CC) -o $@ $^ $(LIB) $(LDFLAGS)
+-ifndef DEBUG
+- $(Q)$(STRIP) $(STRIPFLAGS_EXTRA) $(PROG)
+-endif
+ $(Q)$(SIZE) $$(find $(BUILD) -path "$(BUILD)/build/frozen*.o") $(PROG)
+
+ clean: clean-prog
diff --git a/dev-lang/micropython/metadata.xml b/dev-lang/micropython/metadata.xml
new file mode 100644
index 000000000000..e644fcc0141c
--- /dev/null
+++ b/dev-lang/micropython/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="person">
+ <email>monsieurp@gentoo.org</email>
+ <name>Patrice Clement</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">micropython/micropython</remote-id>
+ </upstream>
+ <longdescription lang="en">
+The MicroPython project aims to put an implementation of Python 3.x on
+microcontrollers and small embedded systems.
+MicroPython implements the entire Python 3.4 syntax (including exceptions,
+with, yield from, etc., and additionally async/await keywords from Python 3.5).
+The following core datatypes are provided: str (including basic Unicode
+support), bytes, bytearray, tuple, list, dict, set, frozenset, array.array,
+collections.namedtuple, classes and instances. Builtin modules include sys,
+time, and struct, etc. Select ports have support for _thread module
+(multithreading). Note that only a subset of Python 3 functionality is
+implemented for the data types and modules.
+MicroPython can execute scripts in textual source form or from precompiled
+bytecode, in both cases either from an on-device filesystem or "frozen" into
+the MicroPython executable.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/micropython/micropython-1.9.3.ebuild b/dev-lang/micropython/micropython-1.9.3.ebuild
new file mode 100644
index 000000000000..672087758df5
--- /dev/null
+++ b/dev-lang/micropython/micropython-1.9.3.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Python implementation for microcontrollers"
+HOMEPAGE="https://github.com/micropython/micropython"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+
+DEPEND="
+ virtual/libffi
+ virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${P}-prevent-stripping.patch" )
+
+src_compile() {
+ cd ports/unix || die
+
+ # 1) don't die on compiler warnings
+ # 2) remove /usr/local prefix references in favour of /usr
+ sed -i \
+ -e 's#-Werror##g;' \
+ -e 's#\/usr\/local#\/usr#g;' \
+ Makefile || die
+ emake CC="$(tc-getCC)" axtls
+ emake CC="$(tc-getCC)"
+}
+
+src_test() {
+ # XXX: find out why these tests fail
+ rm -v tests/misc/recursive_iternext* || die
+
+ cd ports/unix || die
+ emake test
+}
+
+src_install() {
+ pushd ports/unix > /dev/null || die
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" DESTDIR="${D}" install
+ popd > /dev/null || die
+
+ # remove .git files
+ find tools -type f -name '.git*' -exec rm {} \; || die
+
+ dodoc -r tools
+ einstalldocs
+}
diff --git a/dev-lang/micropython/micropython-1.9.4.ebuild b/dev-lang/micropython/micropython-1.9.4.ebuild
new file mode 100644
index 000000000000..95899e4fd9b4
--- /dev/null
+++ b/dev-lang/micropython/micropython-1.9.4.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="Python implementation for microcontrollers"
+HOMEPAGE="https://github.com/micropython/micropython"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="MIT"
+SLOT="0"
+IUSE="test"
+
+DEPEND="
+ virtual/libffi
+ virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${P}-prevent-stripping.patch" )
+
+src_compile() {
+ cd ports/unix || die
+
+ # 1) don't die on compiler warnings
+ # 2) remove /usr/local prefix references in favour of /usr
+ sed -i \
+ -e 's#-Werror##g;' \
+ -e 's#\/usr\/local#\/usr#g;' \
+ Makefile || die
+ emake CC="$(tc-getCC)" axtls
+ emake CC="$(tc-getCC)"
+}
+
+src_test() {
+ # TODO: find out why these tests fail
+ rm -v tests/stress/recursive_iternext* || die
+
+ cd ports/unix || die
+ emake test
+}
+
+src_install() {
+ pushd ports/unix > /dev/null || die
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" DESTDIR="${D}" install
+ popd > /dev/null || die
+
+ # remove .git files
+ find tools -type f -name '.git*' -exec rm {} \; || die
+
+ dodoc -r tools
+ einstalldocs
+}
diff --git a/dev-lang/mlton-20130715 b/dev-lang/mlton-20130715
deleted file mode 100644
index 3e1e52ff36f7..000000000000
--- a/dev-lang/mlton-20130715
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare pretend setup unpack
-DEPEND=dev-libs/gmp:* doc? ( virtual/latex-base )
-DESCRIPTION=Standard ML optimizing compiler and libraries
-EAPI=5
-HOMEPAGE=http://www.mlton.org
-IUSE=binary doc
-KEYWORDS=-* ~amd64 ~x86
-LICENSE=HPND MIT
-RDEPEND=dev-libs/gmp:*
-SLOT=0/20130715
-SRC_URI=!binary? ( mirror://sourceforge/mlton/mlton-20130715.src.tgz ) binary? ( amd64? ( mirror://sourceforge/mlton/mlton-20130715-1.amd64-linux.tgz ) x86? ( mirror://sourceforge/mlton/mlton-20130715-1.x86-linux.tgz ) )
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=a976f4b6d4499101a152057b106cb9fd
diff --git a/dev-lang/mlton-20180207 b/dev-lang/mlton-20180207
deleted file mode 100644
index fc0add1069b6..000000000000
--- a/dev-lang/mlton-20180207
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare pretend setup test unpack
-DEPEND=dev-libs/gmp:* bootstrap-smlnj? ( dev-lang/smlnj ) !bootstrap-smlnj? ( !amd64? ( dev-lang/smlnj ) ) pax_kernel? ( sys-apps/elfix ) doc? ( virtual/latex-base )
-DESCRIPTION=Standard ML optimizing compiler and libraries
-EAPI=6
-HOMEPAGE=http://www.mlton.org
-IUSE=binary bootstrap-smlnj stage3 doc pax_kernel
-KEYWORDS=~amd64 ~x86
-LICENSE=HPND MIT
-RDEPEND=dev-libs/gmp:*
-SLOT=0/20180207
-SRC_URI=!binary? ( mirror://sourceforge/mlton/mlton-20180207.src.tgz ) !bootstrap-smlnj? ( amd64? ( mirror://sourceforge/mlton/mlton-20180207-1.amd64-linux.tgz ) )
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=730f246811de2c2f669af658cffd0fcc
diff --git a/dev-lang/mlton/Manifest b/dev-lang/mlton/Manifest
new file mode 100644
index 000000000000..44c2ae357c1f
--- /dev/null
+++ b/dev-lang/mlton/Manifest
@@ -0,0 +1,13 @@
+AUX mlton-20070826-no-execmem.patch 1236 BLAKE2B 1d708bba547f8ea3076bdd494a5e45f8352430b9a852c45296258b6371fd2bee07a7d2d9cb224bc426e8c364b07d8d37b92d98d6fc186b0217b0650ac961e128 SHA512 d6f323bc181656fbdfdf25e0472e7e13e93b565f3ba64ea9cc81fbcb6c935580c1811f783035a5b1c45be082a38f157610666276aad9fb36d3fdb009fe7ce1c9
+AUX mlton-20130715-no-PIE.patch 2399 BLAKE2B a0af01c4eea65a38d788744f593303d8732a754de19230ce13ce14ce6368058840e9076934311385bed7951d94f1daed878847a57e70ac9330f4af575f35c1bf SHA512 ef0d675acfcbe05c1f810da2b9d684b4412a0f283e6025930c13d80912036ffc650972664f5a4fdd955e4c78c3564c751c1ba9bf279f738eca96801eeb57f0b2
+AUX mlton-20130715-split-make-for-pax-mark.patch 556 BLAKE2B a98f9a6b01edfc19723ef20eaeb0e9046162e179f3c63c69f59d07a39e0b723c4b429c3f10adb6099f912340431e8ea7b06a63d397cb8feff46d3d7d256a0e22 SHA512 9d334c930abe38f222bdd16c7dbdb0b1e0a70955aa8832fd441c9443c53f9d66c3ec49c06f59de501c014a66c6265a6df64269e0534c0ffdae0115718febb694
+AUX mlton-20180207-bootstrap.patch 980 BLAKE2B 4128d0d3aae1e30c6b234e9cc3e0d91ee6de7338e2f8d4e8da7bb5b63ea62138db3148f8ec9ab16966983587dac7c9040a52aea80d21409d5d8fdbb020d13f7f SHA512 7657185d7f4c4e9bff4fd44f3991cd3d115ea0e1e4f6c3b702ecba74a3b2fcb7c1c0c47a814dc26bd3af7a523a92aac50df4d4ddb873eba938c2689ac6b5cf0b
+AUX mlton-20180207-paxmark.patch 728 BLAKE2B 05bb27260dc8007a815ce74276a537a48127b4c336472afca571c39b0e29368be5be79ae03c21940dde6bd37f79613817adc8f22d986d570fab4cb184051b141 SHA512 78526ab383f481663cc892938f74ad1783aa7a2b1fcfd7032a67c4489daa5d141877806fb16232b8f0843e7b4e001d3f76a9a171a8da6413cd921688f493f7f9
+DIST mlton-20130715-1.amd64-linux.tgz 19512324 BLAKE2B 972688dcf6fc6ec17146e2597e6f5dab3b5df4e894697a98c68de61cf4728bf7e2e3ef1cee96befae90f9b555bed0b09cef846912225f8b770d20782fa833212 SHA512 ac41cf8b2afbba80ed25908b1842348eac1507b2aada103648171db1482358c4176b01d9266dfee053b20fc224653ec58ee9d3265672c02fa3774b7562a319bf
+DIST mlton-20130715-1.x86-linux.tgz 18065793 BLAKE2B d05ca4f46fb35b0b819e2678f282943fc9cd8f701bdf2a20da68b285db4618401b4138a227352e8aacef9f604528c7fafc0973631115954cfd91e01e9dd01a9d SHA512 13a996952df27420f05f8290920055231156c8982c1cf3c31259d73e0c534258e2aad91596e51809719ffb0b74652aa052d296000f2ab99462714d4ef9a41859
+DIST mlton-20130715.src.tgz 25606142 BLAKE2B 3fa3e8cf4991faef98e23ae4cbe9e0db5cae2e46ce27be57b784a81b576eeed17a179018e8b70d1264cb9595a3467900f034a2b4a7c114d1bac74025450741e1 SHA512 db273de47dc0059e830332b559918567f5153a0518e067ba71927e3705157f1984d6f6202201cef25aaef29d1a71a637e9a1cb30951e94dbfae4ab1a5e5d40d1
+DIST mlton-20180207-1.amd64-linux.tgz 18772644 BLAKE2B 7fe2d9db7edfb2d3e301be88e90b7dffe1441ff315ddac1464ef42fb436be1a9dc4e2c03fdb93880779360aed04cb7662a1a5a733f2d4158082d228f718d8b93 SHA512 74ab847ff567cde365a113f8819bae69cc18df20c441a6c6666b600980d2687faf143311f42be21a261b2493dc5c45fbecb4737c599cf767c3680afec06c2e0c
+DIST mlton-20180207.src.tgz 25003695 BLAKE2B 8cddfe83c76e05fda446917ddc85035b3d74534fe4bc597a839cd13cb59a15538f40a3f68bb8f7136f9cf8cb27a582e88ca0d14b8f7a4582a202b3bd075f3c9a SHA512 3599159950e857d257abce92abf5c548dd9c0b0cdc4ba0d7cdf9badb5d997f73386cd1ff79f563221b394dd831cb344e287927f90683b0715678edb3ca0ae15a
+EBUILD mlton-20130715.ebuild 3998 BLAKE2B 8fce5cb495bf3c314e2aa280f756efc08d6ca316837875c66be2085fdab016987345758a44efcaa3e1a8975e813c93e25f20ff93a185e4bea3f4fdf10acb3a83 SHA512 1c25e4e15b227356f2ecc29ab83e4256cdffbc82229d45a268f4e3c1105a8e6bdf80282ce556069701678a162672fcec8fbba2c07e226858ffae59c8a114f9cd
+EBUILD mlton-20180207.ebuild 7024 BLAKE2B 2d0c9379e5c62c4037cf1e5af55ca9da9d4948418567fbf24d15f52804143e310a31d6f80c8a75e4a06f839b9dbef40df16cb602f2cc1ad2d84d709b8261e88e SHA512 cfa3415c31a527b9274376c6cd0bcb6317a93007b0766a98ccc574696badbe2dbf2a9da31113310a532777dafba69fca232a52a9c9bd297c03befb09ebb90491
+MISC metadata.xml 752 BLAKE2B 5a01dd9703df49651fee5d19e003b99315981907eaedc9f2a4c2247f4a6b6dfdbe52f7bd2d3f557ab768b2635d74202bfa4466907643a08fc605cb2d671ea8be SHA512 7fe1b98c03aba81adea9f9a6a9b8a77130ca95d4086204a3387c84eb33da4825d0ab97e7e9ca946e650436966bcb5a861010f067dc0ec39319ba539bee48ee08
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/files/mlton-20180207-bootstrap.patch b/dev-lang/mlton/files/mlton-20180207-bootstrap.patch
new file mode 100644
index 000000000000..5287a809f5aa
--- /dev/null
+++ b/dev-lang/mlton/files/mlton-20180207-bootstrap.patch
@@ -0,0 +1,27 @@
+--- mlton-20180207-orig/Makefile 2018-02-07 21:22:55.000000000 +1100
++++ mlton-20180207/Makefile 2018-02-28 11:28:00.639642560 +1100
+@@ -137,18 +137,22 @@
+ .PHONY: bootstrap-smlnj
+ bootstrap-smlnj:
+ $(MAKE) smlnj-mlton
+- $(RM) "$(BIN)/mlton"
++ $(MV) "$(BIN)/mlton" "$(BIN)/mlton.mlton"
++ $(CP) "$(BIN)/mlton.smlnj" "$(BIN)/mlton"
+ $(MAKE) BOOTSTRAP_MLTON=mlton.smlnj all
+ smlnj_heap_suffix=`echo 'TextIO.output (TextIO.stdErr, SMLofNJ.SysInfo.getHeapSuffix ());' | sml 2>&1 1> /dev/null` && $(RM) "$(LIB)/mlton/mlton-smlnj.$$smlnj_heap_suffix"
+ $(RM) "$(BIN)/mlton.smlnj"
++ $(MV) "$(BIN)/mlton.mlton" "$(BIN)/mlton"
+
+ .PHONY: bootstrap-polyml
+ bootstrap-polyml:
+ $(MAKE) polyml-mlton
+- $(RM) "$(BIN)/mlton"
++ $(MV) "$(BIN)/mlton" "$(BIN)/mlton.mlton"
++ $(CP) "$(BIN)/mlton.polyml" "$(BIN)/mlton"
+ $(MAKE) BOOTSTRAP_MLTON=mlton.polyml all
+ $(RM) "$(LIB)/mlton-polyml$(EXE)"
+ $(RM) "$(BIN)/mlton.polyml"
++ $(MV) "$(BIN)/mlton.mlton" "$(BIN)/mlton"
+
+ .PHONY: clean
+ clean:
diff --git a/dev-lang/mlton/files/mlton-20180207-paxmark.patch b/dev-lang/mlton/files/mlton-20180207-paxmark.patch
new file mode 100644
index 000000000000..00f4b84c7dc9
--- /dev/null
+++ b/dev-lang/mlton/files/mlton-20180207-paxmark.patch
@@ -0,0 +1,18 @@
+--- mlton-20180207-orig/Makefile 2018-02-07 21:22:55.000000000 +1100
++++ mlton-20180207/Makefile 2018-02-28 11:27:30.448517470 +1100
+@@ -51,6 +51,7 @@
+ SED := sed
+ TAR := tar
+ XARGS := xargs
++PAXMARK := true
+
+ ######################################################################
+ ######################################################################
+@@ -97,6 +98,7 @@
+ all:
+ $(MAKE) dirs runtime
+ $(MAKE) compiler CHECK_FIXPOINT=false # tools0 + mlton0 -> mlton1
++ $(PAXMARK) -m lib/mlton/mlton-compile bin/mllex bin/mlyacc
+ $(MAKE) script basis-no-check constants basis-check libraries
+ $(MAKE) tools CHECK_FIXPOINT=false # tools0 + mlton1 -> tools1
+ ifeq (true, $(findstring true,$(BOOTSTRAP) $(CHECK_FIXPOINT)))
diff --git a/dev-lang/mlton/metadata.xml b/dev-lang/mlton/metadata.xml
new file mode 100644
index 000000000000..e00a5b040ec4
--- /dev/null
+++ b/dev-lang/mlton/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ml@gentoo.org</email>
+ <name>Gentoo ML Project</name>
+ </maintainer>
+ <use>
+ <flag name="binary">install a binary version</flag>
+ <flag name="bootstrap-smlnj">Boostrap mlton with dev-lang/smlnj
+ (takes a long time)</flag>
+ <flag name="stage3">After bootstrap building mlton with
+ dev-lang/smlnj, rebuild mlton with the second stage build of
+ mlton (recommended).</flag>
+ <flag name="pax_kernel">Enable if the user plans to run the
+ package under a pax enabled hardened kernel</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..a306bfabb1c3
--- /dev/null
+++ b/dev-lang/mlton/mlton-20130715.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2018 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/mlton/mlton-20180207.ebuild b/dev-lang/mlton/mlton-20180207.ebuild
new file mode 100644
index 000000000000..b8df540a09ff
--- /dev/null
+++ b/dev-lang/mlton/mlton-20180207.ebuild
@@ -0,0 +1,264 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit check-reqs eutils multibuild pax-utils
+
+DESCRIPTION="Standard ML optimizing compiler and libraries"
+BASE_URI="mirror://sourceforge/${PN}"
+SRC_URI="!binary? ( ${BASE_URI}/${P}.src.tgz )
+ !bootstrap-smlnj? ( amd64? ( ${BASE_URI}/${P}-1.amd64-linux.tgz ) )"
+HOMEPAGE="http://www.mlton.org"
+
+LICENSE="HPND MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="binary bootstrap-smlnj stage3 doc pax_kernel"
+
+DEPEND="dev-libs/gmp:*
+ bootstrap-smlnj? ( dev-lang/smlnj )
+ !bootstrap-smlnj? (
+ !amd64? ( dev-lang/smlnj )
+ )
+ pax_kernel? ( sys-apps/elfix )
+ doc? ( virtual/latex-base )"
+RDEPEND="dev-libs/gmp:*"
+
+QA_PRESTRIPPED="binary? (
+ usr/lib64/${PN}/bin/mlnlffigen
+ usr/lib64/${PN}/bin/mllex
+ usr/lib64/${PN}/bin/mlprof
+ usr/lib64/${PN}/bin/mlyacc
+ usr/lib64/${PN}/lib/mlton-compile
+ usr/lib/${PN}/bin/mlnlffigen
+ usr/lib/${PN}/bin/mllex
+ usr/lib/${PN}/bin/mlprof
+ usr/lib/${PN}/bin/mlyacc
+ usr/lib/${PN}/lib/mlton-compile
+)"
+
+B="${P}-1.${ARCH}-${KERNEL}"
+R="${WORKDIR}/${B}"
+
+mlton_subdir() {
+ echo $(get_libdir)/${PN}
+}
+
+mlton_dir() {
+ echo "${EPREFIX%/}"/usr/$(mlton_subdir)
+}
+
+mlton_memory_requirement() {
+ # The resident set size of compiling mlton with mlton is almost 14GB on amd64.
+ # http://mlton.org/SelfCompiling
+ # Compiling MLton requires at least 1GB of RAM for 32-bit platforms (2GB is
+ # preferable) and at least 2GB RAM for 64-bit platforms (4GB is preferable).
+ # If your machine has less RAM, self-compilation will likely fail, or at least
+ # take a very long time due to paging. Even if you have enough memory, there
+ # simply may not be enough available, due to memory consumed by other
+ # processes. In this case, you may see an Out of memory message, or
+ # self-compilation may become extremely slow. The only fix is to make sure
+ # that enough memory is available.
+ [[ ${ARCH} == "x86" ]] && echo "2G" || echo "4G"
+}
+
+pkg_pretend() {
+ if use !binary; then
+ local CHECKREQS_MEMORY=$(mlton_memory_requirement)
+ check-reqs_pkg_pretend
+ fi
+}
+
+pkg_setup() {
+ if use !binary; then
+ local CHECKREQS_MEMORY=$(mlton_memory_requirement)
+ check-reqs_pkg_setup
+ fi
+}
+
+mlton_bootstrap_variant() {
+ local b=""
+ if use bootstrap-smlnj || ! use amd64; then
+ b="bootstrap-smlnj"
+ else
+ b="bootstrap"
+ fi
+ echo "${b}"
+}
+
+mlton_bootstrap_build_dir() {
+ echo $(basename ${S})"-"$(mlton_bootstrap_variant)
+}
+
+mlton_bootstrap_bin_dir() {
+ local b=$(mlton_bootstrap_build_dir)
+ if use bootstrap-smlnj || ! use amd64; then
+ b+="/build/bin"
+ else
+ b+="/bin"
+ fi
+ echo "${b}"
+}
+
+# Return the array of multilib build variants
+mlton_multibuild_variants() {
+ local MULTIBUILD_VARIANTS=()
+ if ! use binary; then
+ if use bootstrap-smlnj || ! use amd64; then
+ MULTIBUILD_VARIANTS+=( $(mlton_bootstrap_variant) )
+ use stage3 && MULTIBUILD_VARIANTS+=( build-with-mlton )
+ else
+ MULTIBUILD_VARIANTS+=( build-with-mlton )
+ fi
+ fi
+ echo ${MULTIBUILD_VARIANTS[*]}
+}
+
+# Return the last multibuild variant
+mlton_last_multibuild_variant() {
+ local vs=( $(mlton_multibuild_variants) )
+ echo ${vs[${#vs[@]}-1]}
+}
+
+src_unpack() {
+ default
+ if use binary; then
+ mkdir -p "${S}" || die
+ fi
+}
+
+BIN_STUBS=( mllex mlnlffigen mlprof mlton mlyacc )
+
+mlton_create_bin_stubs() {
+ local SUBDIR=$(mlton_subdir)
+ mkdir "${S}"/bin_stubs || die
+ pushd "${S}"/bin_stubs || die
+ for i in ${BIN_STUBS[*]}; do
+ cat <<- EOF >> ${i}
+ #!/bin/bash
+ exec ${EPREFIX%/}/usr/${SUBDIR}/bin/${i} \$*
+ EOF
+ chmod a+x ${i} || die
+ done
+ popd || die
+}
+
+src_prepare() {
+ if ! use binary; then
+ # For Gentoo hardened: paxmark the mlton-compiler, mllex and mlyacc executables
+ epatch "${FILESDIR}/${PN}-20180207-paxmark.patch"
+ # Fix the bootstrap-smlnj and bootstrap-polyml Makefile targets
+ epatch "${FILESDIR}/${PN}-20180207-bootstrap.patch"
+ fi
+ default
+ $(mlton_create_bin_stubs)
+ if use binary; then
+ pax-mark m "${R}/lib/${PN}/mlton-compile"
+ pax-mark m "${R}/bin/mllex"
+ pax-mark m "${R}/bin/mlyacc"
+ ln -s ${R} ../$(mlton_bootstrap_build_dir) || die
+ gunzip ${R}/share/man/man1/*.gz || die
+ else
+ local MULTIBUILD_VARIANTS=( $(mlton_multibuild_variants) )
+ multibuild_copy_sources
+ if ! use bootstrap-smlnj && [[ ${ARCH} == "amd64" ]]; then
+ ln -s ${B} ../$(mlton_bootstrap_build_dir) || die
+ fi
+ fi
+}
+
+mlton_src_compile() {
+ if [[ ${MULTIBUILD_VARIANT} == $(mlton_bootstrap_variant) ]]; then
+ emake -j1 \
+ "bootstrap-smlnj" \
+ PAXMARK=$(usex pax_kernel "paxmark.sh" "true") \
+ CFLAGS="${CFLAGS}" \
+ WITH_GMP_INC_DIR="${EPREFIX}"/usr/include \
+ WITH_GMP_LIB_DIR="${EPREFIX}"/$(get_libdir)
+ else
+ export PATH="${WORKDIR}/"$(mlton_bootstrap_bin_dir)":${PATH}"
+ einfo "${MULTIBUILD_VARIANT}: Building mlton with mlton in PATH=$PATH"
+ emake -j1 \
+ CFLAGS="${CFLAGS}" \
+ WITH_GMP_INC_DIR="${EPREFIX}"/usr/include \
+ WITH_GMP_LIB_DIR="${EPREFIX}"/$(get_libdir)
+ fi
+ if [[ ${MULTIBUILD_VARIANT} == $(mlton_last_multibuild_variant) ]]; then
+ if use doc; then
+ export VARTEXFONTS="${T}/fonts"
+ emake docs
+ fi
+ fi
+}
+
+src_compile() {
+ if ! use binary; then
+ local MULTIBUILD_VARIANTS=( $(mlton_multibuild_variants) )
+ multibuild_foreach_variant run_in_build_dir mlton_src_compile
+ fi
+}
+
+mlton_src_test() {
+ emake check
+}
+
+src_test() {
+ if ! use binary; then
+ local MULTIBUILD_VARIANTS=( $(mlton_last_multibuild_variant) )
+ multibuild_foreach_variant run_in_build_dir mlton_src_test
+ fi
+}
+
+mlton_src_install() {
+ local DIR=$(mlton_dir)
+ emake \
+ install-no-strip install-strip \
+ DESTDIR="${D}" \
+ PREFIX="${DIR}"
+ if use doc; then
+ emake TDOC="${D}"/usr/share/doc/${PF} install-docs \
+ DESTDIR="${D}" \
+ PREFIX="${DIR}"
+ fi
+}
+
+mlton_install_bin_stubs() {
+ exeinto /usr/bin
+ for i in ${BIN_STUBS[*]}; do
+ doexe "${S}"/bin_stubs/${i}
+ done
+}
+
+src_install() {
+ $(mlton_install_bin_stubs)
+ if use binary; then
+ local DIR=$(mlton_dir)
+ exeinto "${DIR}"/bin
+ doexe "${R}"/bin/*
+ insinto "${DIR}"/lib
+ doins -r "${R}"/lib/${PN}
+ exeinto "${DIR}"/lib/${PN}
+ doexe "${R}"/lib/${PN}/mlton-compile
+ doman "${R}"/share/man/man1/*
+ if use doc; then
+ local DOCS=( "${R}"/share/doc/${PN}/. )
+ einstalldocs
+ fi
+ else
+ local MULTIBUILD_VARIANTS=( $(mlton_last_multibuild_variant) )
+ multibuild_foreach_variant run_in_build_dir mlton_src_install
+ 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-20131017 b/dev-lang/mmix-20131017
deleted file mode 100644
index 6ecc2affdd11..000000000000
--- a/dev-lang/mmix-20131017
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=virtual/tex-base doc? ( || ( dev-texlive/texlive-plaingeneric dev-texlive/texlive-genericrecommended ) )
-DESCRIPTION=Donald Knuth's MMIX Assembler and Simulator
-EAPI=5
-HOMEPAGE=https://www-cs-faculty.stanford.edu/~knuth/mmix.html http://mmix.cs.hm.edu
-IUSE=doc
-KEYWORDS=amd64 x86
-LICENSE=mmix
-SLOT=0
-SRC_URI=http://mmix.cs.hm.edu/src/mmix-20131017.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=6c4e637fc479fe288952b1cbc875728d
diff --git a/dev-lang/mmix-20160804 b/dev-lang/mmix-20160804
deleted file mode 100644
index f10ae6814ca0..000000000000
--- a/dev-lang/mmix-20160804
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install
-DEPEND=virtual/tex-base doc? ( || ( dev-texlive/texlive-plaingeneric dev-texlive/texlive-genericrecommended ) )
-DESCRIPTION=Donald Knuth's MMIX Assembler and Simulator
-EAPI=6
-HOMEPAGE=https://www-cs-faculty.stanford.edu/~knuth/mmix.html http://mmix.cs.hm.edu
-IUSE=doc
-KEYWORDS=amd64 x86
-LICENSE=mmix
-SLOT=0
-SRC_URI=http://mmix.cs.hm.edu/src/mmix-20160804.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=e2117d0cde91afe74d4e57fb18d0aaee
diff --git a/dev-lang/mmix/Manifest b/dev-lang/mmix/Manifest
new file mode 100644
index 000000000000..f820dc9f309e
--- /dev/null
+++ b/dev-lang/mmix/Manifest
@@ -0,0 +1,7 @@
+AUX mmix-20110420-makefile.patch 1636 BLAKE2B f4acfc952dea9671ec5507f4d86a1462131dae835318362b17f341e9575fe1dccda5cd44d257127a27232a197e05f79de5d7a8200d7a2b943161fa38de83937f SHA512 e5cd4944847c00ad7c6b3a87fa6f9a242f7f0b13c31f82e80c49b3b9ec07d7c0106669dce2868705dca073774826c5acc6f8ea1464c1a5c739145f1c2b28eb10
+AUX mmix-20131017-format-security.patch 2256 BLAKE2B 2481c33c024d84af03b289ec9f22c9b98cb27537c32ea9ef020943aa424efac5267d81326241b2d764eb292f373ed51cc30c3ddbdb55f8fa444154cf6cc5fe0d SHA512 e77cdf3d196356cc0cb09f322cc979e4c603592c8f9421764d6830df27fe627958badbd6726021f97bc42a0d9551e4d3b39ca7b1d677b44a543ffcc04028eaea
+DIST mmix-20131017.tgz 308016 BLAKE2B 195c4945c61584842af08af891dc2e26672194aef66ff71ba6dfa18bab4e7349de013aa1c3ae195d9d6a69ee4ebc61403acf558a06af86393d5b053920ebad55 SHA512 e816b1ee9205b9f4a2e25ff183c48736ea66e63721a49f0b574850c5872ae85a6e847d802a01b5aa120ac969638d5d05e9b3135512d9362a4d672564f1228922
+DIST mmix-20160804.tgz 308410 BLAKE2B 8bbde51921fe23f016e35bd51346e6445d530815e5e87bff44cf17e081c6b8e55dd6bd24f1ce1621851d2eac309fa44d71aa33d93d3ddfce5213c6643181d38c SHA512 35c518227a4ee40d0aa3be02eda2ab8b2a27696fa789f5007a978419d07b3deebb7f391895e63e3556aeb38dc1ded3bddf2b860125ebf8f7848375e90dc7af75
+EBUILD mmix-20131017.ebuild 965 BLAKE2B 763f9fc6d769748bf3fbb25ea5a5498117e70cb8607f34fb1572086d578a1190ef17fa542059d3c3e61782aeb560060d68c4f787ba5570860d3187b77de618ad SHA512 de03b2b80759be4b10fe1edd06f71178ece2c759d73d3c554d5ce8e0860f4d8e1b7cda2adefecb81514c06fcdcc0b1553afc81151d141d9eae924c21fa0209ac
+EBUILD mmix-20160804.ebuild 943 BLAKE2B ad1449d7bbdb88c066e85ac309f10ef37b78fca045a294a28583b9eb708fc18c19cf6083437878f97d35d0de8ba5ba6d6c8ac9fc0e788f95df004e3ece9bc116 SHA512 bd43985e64160e0847643e7731213265aa9d51ac8141b3637ff9373fa58f2f0182436645867f73b7188e20cbc9370b461cdaab11c4f39111316edeabc992a390
+MISC metadata.xml 247 BLAKE2B 9d65f58a46596a4c23d009a2d776c25c5a9dd76ac91ec6f6f548f5f786e43f0be694628bc528dc24d2fcb5efcf7cf95643aea633f12eda3d482d2d03a952d388 SHA512 44f366af35524b7fc87b2eb6c7241918d2afc9b30f1a28289d803ed0125e9099588a2bd99a75e34e3c70fde30765050e62ef5b47975e2a1860dd7a560709459d
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..0b8bf06064e6
--- /dev/null
+++ b/dev-lang/mmix/mmix-20131017.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 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="https://www-cs-faculty.stanford.edu/~knuth/mmix.html http://mmix.cs.hm.edu"
+SRC_URI="http://mmix.cs.hm.edu/src/${P}.tgz"
+
+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() {
+ export VARTEXFONTS=${T}/fonts
+ 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..b98e3aafec43
--- /dev/null
+++ b/dev-lang/mmix/mmix-20160804.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 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="https://www-cs-faculty.stanford.edu/~knuth/mmix.html http://mmix.cs.hm.edu"
+SRC_URI="http://mmix.cs.hm.edu/src/${P}.tgz"
+
+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() {
+ export VARTEXFONTS=${T}/fonts
+ 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-2018.01 b/dev-lang/moarvm-2018.01
deleted file mode 100644
index f4b45e6ee8c0..000000000000
--- a/dev-lang/moarvm-2018.01
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure
-DEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua:0[deprecated] dev-lua/LuaBitOp virtual/libffi clang? ( >=sys-devel/clang-3.1 ) dev-lang/perl
-DESCRIPTION=A 6model-based VM for NQP and Rakudo Perl 6
-EAPI=6
-HOMEPAGE=http://moarvm.org
-IUSE=asan clang debug doc +jit static-libs optimize ubsan
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua:0[deprecated] dev-lua/LuaBitOp virtual/libffi
-RESTRICT=test
-SLOT=0
-SRC_URI=http://moarvm.org/releases/MoarVM-2018.01.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=fad9e8a58d3d7a29021014b6e73ae10c
diff --git a/dev-lang/moarvm-2018.02 b/dev-lang/moarvm-2018.02
deleted file mode 100644
index 3c408d121c51..000000000000
--- a/dev-lang/moarvm-2018.02
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure
-DEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua:0[deprecated] dev-lua/LuaBitOp virtual/libffi clang? ( >=sys-devel/clang-3.1 ) dev-lang/perl
-DESCRIPTION=A 6model-based VM for NQP and Rakudo Perl 6
-EAPI=6
-HOMEPAGE=http://moarvm.org
-IUSE=asan clang debug doc +jit static-libs optimize ubsan
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua:0[deprecated] dev-lua/LuaBitOp virtual/libffi
-RESTRICT=test
-SLOT=0
-SRC_URI=http://moarvm.org/releases/MoarVM-2018.02.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=fad9e8a58d3d7a29021014b6e73ae10c
diff --git a/dev-lang/moarvm-2018.03 b/dev-lang/moarvm-2018.03
deleted file mode 100644
index 426a11aa3733..000000000000
--- a/dev-lang/moarvm-2018.03
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure
-DEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua:0[deprecated] dev-lua/LuaBitOp virtual/libffi clang? ( >=sys-devel/clang-3.1 ) dev-lang/perl
-DESCRIPTION=A 6model-based VM for NQP and Rakudo Perl 6
-EAPI=6
-HOMEPAGE=http://moarvm.org
-IUSE=asan clang debug doc +jit static-libs optimize ubsan
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua:0[deprecated] dev-lua/LuaBitOp virtual/libffi
-RESTRICT=test
-SLOT=0
-SRC_URI=http://moarvm.org/releases/MoarVM-2018.03.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=fad9e8a58d3d7a29021014b6e73ae10c
diff --git a/dev-lang/moarvm-2018.04 b/dev-lang/moarvm-2018.04
deleted file mode 100644
index 13f25fd474e4..000000000000
--- a/dev-lang/moarvm-2018.04
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure
-DEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua:0[deprecated] dev-lua/LuaBitOp virtual/libffi clang? ( >=sys-devel/clang-3.1 ) dev-lang/perl
-DESCRIPTION=A 6model-based VM for NQP and Rakudo Perl 6
-EAPI=6
-HOMEPAGE=http://moarvm.org
-IUSE=asan clang debug doc +jit static-libs optimize ubsan
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua:0[deprecated] dev-lua/LuaBitOp virtual/libffi
-RESTRICT=test
-SLOT=0
-SRC_URI=http://moarvm.org/releases/MoarVM-2018.04.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=fad9e8a58d3d7a29021014b6e73ae10c
diff --git a/dev-lang/moarvm-2018.04.1 b/dev-lang/moarvm-2018.04.1
deleted file mode 100644
index 3a43359a342b..000000000000
--- a/dev-lang/moarvm-2018.04.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure
-DEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua virtual/libffi clang? ( >=sys-devel/clang-3.1 ) dev-lang/perl
-DESCRIPTION=A 6model-based VM for NQP and Rakudo Perl 6
-EAPI=6
-HOMEPAGE=http://moarvm.org
-IUSE=asan clang debug doc +jit static-libs optimize ubsan
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua virtual/libffi
-RESTRICT=test
-SLOT=0
-SRC_URI=http://moarvm.org/releases/MoarVM-2018.04.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0adccd49c5e66ba0fe0db9b041f76c9d
diff --git a/dev-lang/moarvm-2018.05 b/dev-lang/moarvm-2018.05
deleted file mode 100644
index 99ad09396859..000000000000
--- a/dev-lang/moarvm-2018.05
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure
-DEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua:= virtual/libffi clang? ( >=sys-devel/clang-3.1 ) dev-lang/perl
-DESCRIPTION=A 6model-based VM for NQP and Rakudo Perl 6
-EAPI=6
-HOMEPAGE=http://moarvm.org
-IUSE=asan clang debug doc +jit static-libs optimize ubsan
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua:= virtual/libffi
-RESTRICT=test
-SLOT=0
-SRC_URI=http://moarvm.org/releases/MoarVM-2018.05.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=a98aea3aaeead5c48eed206b6c9228a7
diff --git a/dev-lang/moarvm-2018.06 b/dev-lang/moarvm-2018.06
deleted file mode 100644
index bc9b62254a04..000000000000
--- a/dev-lang/moarvm-2018.06
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure
-DEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua:= virtual/libffi clang? ( >=sys-devel/clang-3.1 ) dev-lang/perl
-DESCRIPTION=A 6model-based VM for NQP and Rakudo Perl 6
-EAPI=6
-HOMEPAGE=http://moarvm.org
-IUSE=asan clang debug doc +jit static-libs optimize ubsan
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=dev-libs/libatomic_ops dev-libs/libuv dev-lang/lua:= virtual/libffi
-RESTRICT=test
-SLOT=0
-SRC_URI=http://moarvm.org/releases/MoarVM-2018.06.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=a98aea3aaeead5c48eed206b6c9228a7
diff --git a/dev-lang/moarvm-9999 b/dev-lang/moarvm-9999
deleted file mode 100644
index d2eb4be8cc92..000000000000
--- a/dev-lang/moarvm-9999
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure unpack
-DEPEND=dev-libs/libatomic_ops >=dev-libs/libtommath-1.0 dev-libs/libuv jit? ( dev-lang/lua:0[deprecated] dev-lua/LuaBitOp ) virtual/libffi clang? ( >=sys-devel/clang-3.1 ) dev-lang/perl >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=A 6model-based VM for NQP and Rakudo Perl 6
-EAPI=6
-HOMEPAGE=http://moarvm.org
-IUSE=asan clang debug doc +jit static-libs optimize ubsan
-LICENSE=Artistic-2
-RDEPEND=dev-libs/libatomic_ops >=dev-libs/libtommath-1.0 dev-libs/libuv jit? ( dev-lang/lua:0[deprecated] dev-lua/LuaBitOp ) virtual/libffi
-RESTRICT=test
-SLOT=0
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 git-r3 8f6de46b0aa318aea0e8cac62ece098b ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=2dc9fac5ac7f35e7877afa1956e57550
diff --git a/dev-lang/moarvm/Manifest b/dev-lang/moarvm/Manifest
new file mode 100644
index 000000000000..52f2d87dce3d
--- /dev/null
+++ b/dev-lang/moarvm/Manifest
@@ -0,0 +1,16 @@
+DIST MoarVM-2018.01.tar.gz 4762110 BLAKE2B 643fc082ec1ba9b79bb5d0c13e66703850b75673a73e659fc8b2400cbb0d986b1882b7d23721a77773891649d709328ace1023d50d4ffacae5d75091a8976912 SHA512 2e558c92562096596992e6e0070092481e5a5d25ac3047110d023536deebc9a4db21d9844ecf3b7c0ae5cc6fa529cc48d9a8e98cdc2f5e23a8effc37b7509ef9
+DIST MoarVM-2018.02.tar.gz 4769154 BLAKE2B 28eaf603c908c4d1fb5d9fc8e771e3a54165102288f566aca04df6740cfc307e2cea5beeeed9be490b9f4136e4dc8e9bb20249aab07d46e9f3bb9ab522f5a4a8 SHA512 3364a1af68b828de30affa4c21fe691d10353175cc18e815f962f8dcafb63947ce3fd3ae5c10c656b90f4cb02f3fd008a9a99f832d76098c12525b36e46924d0
+DIST MoarVM-2018.03.tar.gz 4859280 BLAKE2B 373ed24f30abc669aef914dd8e683a09f09831c82fa81784da78bd9ab31ee14bc6967afce1e2753cc6df7155bfbfba076062375348345d529872352a396a7c36 SHA512 be613e038747d771de03129e52d6e65712ddf6f73ed87eb008ae78968f2d516b4fded792a67e1ce031378c223408101ceaf25f90abf9ba35ee20c6e8401b46f1
+DIST MoarVM-2018.04.1.tar.gz 4966704 BLAKE2B e69e953d98713c0571d6970b57048fa542d9d99a09b248983c043c744b8e32af4cf582f19404c89a4dbc4d2df35a3b17390fcc0e313ac9510ded5c4914f5aaff SHA512 fb79b14cadae5475df48affecc72a07085cce963f4e34e7bb20511718f73d904f53b65d2bf30c0128917b7066430cc3fedee24f97bfbec24bbed46f42bcf0082
+DIST MoarVM-2018.04.tar.gz 4966390 BLAKE2B 708753aaccdd997e0703ce31706221efaaaafa0c877ae3fdf1035e399545a633a9d9fbc26909798084bf9f9d6854cc07457299119f7f50e7335a6b09291c360b SHA512 cbcceabc2f3d3d3ac73655bf16246f714923abbe909f2bfa6b1f2456801a4bebfe246f552e2704da254609e1edb66b564ef5b845c88af3761a6d552b2364fc51
+DIST MoarVM-2018.05.tar.gz 4981931 BLAKE2B cbd650cc84efbe6967ff24f0eed5e3f5ad5b199a268e6623a004cb690bdbaa75d8295b83c4e75d20584a54e17e157ab7c348bb783c82e56d6b1efdfe4815039c SHA512 0f71eafcaa1c917257bf47955b82d5c8218c171acc9c09080325f7f2b36a1418e718408ef13f69a71ed142620fd4c47d3681dda0543feb705b62d7643e00cd5f
+DIST MoarVM-2018.06.tar.gz 5002170 BLAKE2B 7c30dc54724c13538621fbf710d6bc1bd7d8b211824d4b5262685c95602c4910b7f7f6d59e52b0595d23dc9a68954fd1213055d72a20b418bf205ac770d05b67 SHA512 5d256cd7a49472e106326281059f8e9f8eb7591d116bfcdd33daeada42764774362ab8802edf889c5d875d438518ee9f243f5e44f451c9cf3495f7c7641be700
+EBUILD moarvm-2018.01.ebuild 1364 BLAKE2B 1b219150b6093edc5452ff2f7294af49fb4378c305115c882444768c3cdbfb82de7b2a2151fc88f41641ee0094ea5158d78776b271d51b40a37978b1ee2c11db SHA512 f8ef6139b8940e3d10b378df80331088866723343f094b7b9772fb45ab203d2dc4499974c614269790831057c953a9d1804dcb9c160d740c68d6a14f316f7795
+EBUILD moarvm-2018.02.ebuild 1364 BLAKE2B 1b219150b6093edc5452ff2f7294af49fb4378c305115c882444768c3cdbfb82de7b2a2151fc88f41641ee0094ea5158d78776b271d51b40a37978b1ee2c11db SHA512 f8ef6139b8940e3d10b378df80331088866723343f094b7b9772fb45ab203d2dc4499974c614269790831057c953a9d1804dcb9c160d740c68d6a14f316f7795
+EBUILD moarvm-2018.03.ebuild 1364 BLAKE2B 1b219150b6093edc5452ff2f7294af49fb4378c305115c882444768c3cdbfb82de7b2a2151fc88f41641ee0094ea5158d78776b271d51b40a37978b1ee2c11db SHA512 f8ef6139b8940e3d10b378df80331088866723343f094b7b9772fb45ab203d2dc4499974c614269790831057c953a9d1804dcb9c160d740c68d6a14f316f7795
+EBUILD moarvm-2018.04.1.ebuild 1331 BLAKE2B f84718499a831069be6a8d8e1f204227b8533355bf09bdde95213403a662aca6dd3c7a85c83ad708b85af060d9aa486ae9cc3bce0d63ebc66301123634304ab7 SHA512 839c7cf9969abe9778766c65ab61ff9f25810e08be4d468bd6529d56ab0ec1d1820a19211406f3864ed1d86b7354541038ee35b110e8fdbf3c7fd17931e3ef56
+EBUILD moarvm-2018.04.ebuild 1364 BLAKE2B 1b219150b6093edc5452ff2f7294af49fb4378c305115c882444768c3cdbfb82de7b2a2151fc88f41641ee0094ea5158d78776b271d51b40a37978b1ee2c11db SHA512 f8ef6139b8940e3d10b378df80331088866723343f094b7b9772fb45ab203d2dc4499974c614269790831057c953a9d1804dcb9c160d740c68d6a14f316f7795
+EBUILD moarvm-2018.05.ebuild 1333 BLAKE2B ec472c7a10310ffb82fbb697553aaaafc83aee62a8d3e439ce3ce68f21ab91313e753caed1546588c9a1320ab0efccff9bcdc8da646b84b112e8c31bc4c75755 SHA512 c7c78307c949b6122bc6437051ba4033f24b79f6a8c5d8f2b248e4b296d7efee9bf0fc6370b116fcd2ff7b9bb548beeb46ba472a4dd5c054341542318bb9900d
+EBUILD moarvm-2018.06.ebuild 1333 BLAKE2B ec472c7a10310ffb82fbb697553aaaafc83aee62a8d3e439ce3ce68f21ab91313e753caed1546588c9a1320ab0efccff9bcdc8da646b84b112e8c31bc4c75755 SHA512 c7c78307c949b6122bc6437051ba4033f24b79f6a8c5d8f2b248e4b296d7efee9bf0fc6370b116fcd2ff7b9bb548beeb46ba472a4dd5c054341542318bb9900d
+EBUILD moarvm-9999.ebuild 1475 BLAKE2B b9ca271b78afab4ebc5e5f05ed13e3361cf96267191dbd8e80ba4c6923d945a1f136376439b890d60ee8345caa782c0baed9fee94a80e15302c258702c2eba63 SHA512 76b99f341f78085656bc196d97ca66ff170b590f6e7e06fab95ef02244d393b6083a217463bffdf389682b823ca7af684b9bba2fcabfd1632901639beab8763f
+MISC metadata.xml 920 BLAKE2B dc15290595649a4f4c514f26cd219c3d8a97bb589fedac8cca202b64abe49f6851fe50d24f95f82c0dd61d183ed1f4091a4fb0f500e8f89a9b91dd7e932cc1ff SHA512 9250682955318d688f59e27b740e1b04095a85f036578d8fe2a2eeb31e159e34845a191734ba4997034dca80a32e29c8f4a0658b9a76ea78ff5fb4479124696b
diff --git a/dev-lang/moarvm/metadata.xml b/dev-lang/moarvm/metadata.xml
new file mode 100644
index 000000000000..544cc2f4ef43
--- /dev/null
+++ b/dev-lang/moarvm/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</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-2018.01.ebuild b/dev-lang/moarvm/moarvm-2018.01.ebuild
new file mode 100644
index 000000000000..405febb3308d
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2018.01.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2018 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-2018.02.ebuild b/dev-lang/moarvm/moarvm-2018.02.ebuild
new file mode 100644
index 000000000000..405febb3308d
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2018.02.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2018 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-2018.03.ebuild b/dev-lang/moarvm/moarvm-2018.03.ebuild
new file mode 100644
index 000000000000..405febb3308d
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2018.03.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2018 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-2018.04.1.ebuild b/dev-lang/moarvm/moarvm-2018.04.1.ebuild
new file mode 100644
index 000000000000..fb8a298d0c8f
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2018.04.1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2018 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
+ 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-2018.04.ebuild b/dev-lang/moarvm/moarvm-2018.04.ebuild
new file mode 100644
index 000000000000..405febb3308d
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2018.04.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2018 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-2018.05.ebuild b/dev-lang/moarvm/moarvm-2018.05.ebuild
new file mode 100644
index 000000000000..1e5dbdd984e3
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2018.05.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2018 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:=
+ 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-2018.06.ebuild b/dev-lang/moarvm/moarvm-2018.06.ebuild
new file mode 100644
index 000000000000..1e5dbdd984e3
--- /dev/null
+++ b/dev-lang/moarvm/moarvm-2018.06.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2018 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:=
+ 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-4.4.1.0 b/dev-lang/mono-4.4.1.0
deleted file mode 100644
index dc56245a7dec..000000000000
--- a/dev-lang/mono-4.4.1.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare pretend setup test
-DEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) sys-devel/bc virtual/yacc pax_kernel? ( sys-apps/elfix )
-DESCRIPTION=Mono runtime and class libraries, a C# compiler/interpreter
-EAPI=6
-HOMEPAGE=https://www.mono-project.com/Main_Page
-IUSE=nls minimal pax_kernel xen doc kernel_linux abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=amd64 ppc ~ppc64 x86 ~amd64-linux
-LICENSE=MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL
-RDEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) || ( www-client/links www-client/lynx )
-SLOT=0
-SRC_URI=https://download.mono-project.com/sources/mono/mono-4.4.1.0.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e mono-env 1f24c032c78290b0d9a07d5b343051a7 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=75c2da6b8d18118e42c004ad59a2eb52
diff --git a/dev-lang/mono-4.6.1.5 b/dev-lang/mono-4.6.1.5
deleted file mode 100644
index ee9a5b0c2306..000000000000
--- a/dev-lang/mono-4.6.1.5
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare pretend setup test
-DEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) sys-devel/bc virtual/yacc pax_kernel? ( sys-apps/elfix )
-DESCRIPTION=Mono runtime and class libraries, a C# compiler/interpreter
-EAPI=6
-HOMEPAGE=https://www.mono-project.com/Main_Page
-IUSE=nls minimal pax_kernel xen doc kernel_linux abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux
-LICENSE=MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL
-RDEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) || ( www-client/links www-client/lynx )
-SLOT=0
-SRC_URI=https://download.mono-project.com/sources/mono/mono-4.6.1.5.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e mono-env 1f24c032c78290b0d9a07d5b343051a7 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=958f33215fed78cbcd1e763ba087e6c9
diff --git a/dev-lang/mono-4.6.1.5-r1 b/dev-lang/mono-4.6.1.5-r1
deleted file mode 100644
index 51326c0634cc..000000000000
--- a/dev-lang/mono-4.6.1.5-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare pretend setup test
-DEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) sys-devel/bc virtual/yacc pax_kernel? ( sys-apps/elfix )
-DESCRIPTION=Mono runtime and class libraries, a C# compiler/interpreter
-EAPI=6
-HOMEPAGE=https://www.mono-project.com/Main_Page
-IUSE=nls minimal pax_kernel xen doc kernel_linux abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux
-LICENSE=MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL
-RDEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) || ( www-client/links www-client/lynx )
-SLOT=0
-SRC_URI=https://download.mono-project.com/sources/mono/mono-4.6.1.5.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e mono-env 1f24c032c78290b0d9a07d5b343051a7 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c5234fa44e5f2588ae17d5700c8ae8b4
diff --git a/dev-lang/mono-4.8.0.425 b/dev-lang/mono-4.8.0.425
deleted file mode 100644
index 654ef05e1336..000000000000
--- a/dev-lang/mono-4.8.0.425
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare pretend setup test
-DEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) sys-devel/bc virtual/yacc pax_kernel? ( sys-apps/elfix ) dev-util/cmake >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Mono runtime and class libraries, a C# compiler/interpreter
-EAPI=6
-HOMEPAGE=https://www.mono-project.com/Main_Page
-IUSE=nls minimal pax_kernel xen doc kernel_linux abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux
-LICENSE=MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL
-RDEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) || ( www-client/links www-client/lynx )
-SLOT=0
-SRC_URI=https://download.mono-project.com/sources/mono/mono-4.8.0.425.tar.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e mono-env 1f24c032c78290b0d9a07d5b343051a7 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=b0fd626992bb567772a8d12c2c2dbc0c
diff --git a/dev-lang/mono-4.8.0.495 b/dev-lang/mono-4.8.0.495
deleted file mode 100644
index 264f3dc25509..000000000000
--- a/dev-lang/mono-4.8.0.495
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare pretend setup test
-DEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) sys-devel/bc virtual/yacc pax_kernel? ( sys-apps/elfix ) dev-util/cmake >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Mono runtime and class libraries, a C# compiler/interpreter
-EAPI=6
-HOMEPAGE=https://www.mono-project.com/Main_Page
-IUSE=nls minimal pax_kernel xen doc kernel_linux abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux
-LICENSE=MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL
-RDEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) || ( www-client/links www-client/lynx )
-SLOT=0
-SRC_URI=https://download.mono-project.com/sources/mono/mono-4.8.0.495.tar.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e mono-env 1f24c032c78290b0d9a07d5b343051a7 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=b0fd626992bb567772a8d12c2c2dbc0c
diff --git a/dev-lang/mono-4.8.0.524 b/dev-lang/mono-4.8.0.524
deleted file mode 100644
index 12a75cdbd53c..000000000000
--- a/dev-lang/mono-4.8.0.524
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare pretend setup test
-DEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) sys-devel/bc virtual/yacc pax_kernel? ( sys-apps/elfix ) dev-util/cmake >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Mono runtime and class libraries, a C# compiler/interpreter
-EAPI=6
-HOMEPAGE=https://www.mono-project.com/Main_Page
-IUSE=nls minimal pax_kernel xen doc kernel_linux abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=amd64 ~arm64 ppc ~ppc64 x86 ~amd64-linux
-LICENSE=MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL
-RDEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) || ( www-client/links www-client/lynx )
-SLOT=0
-SRC_URI=https://download.mono-project.com/sources/mono/mono-4.8.0.524.tar.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e mono-env 1f24c032c78290b0d9a07d5b343051a7 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=da862850e39f48367106aa18d5095f06
diff --git a/dev-lang/mono-5.12.0.226 b/dev-lang/mono-5.12.0.226
deleted file mode 100644
index 2ddc625eff04..000000000000
--- a/dev-lang/mono-5.12.0.226
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare pretend setup test
-DEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) sys-devel/bc virtual/yacc pax_kernel? ( sys-apps/elfix ) dev-util/cmake >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Mono runtime and class libraries, a C# compiler/interpreter
-EAPI=6
-HOMEPAGE=http://www.mono-project.com/Main_Page
-IUSE=nls minimal pax_kernel xen doc kernel_linux abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~arm64
-LICENSE=MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL
-RDEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) || ( www-client/links www-client/lynx )
-RESTRICT=mirror
-SLOT=0
-SRC_URI=http://download.mono-project.com/sources/mono/mono-5.12.0.226.tar.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e mono-env 1f24c032c78290b0d9a07d5b343051a7 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=7845c344e9c8eea2821f3341df119230
diff --git a/dev-lang/mono-5.4.1.6 b/dev-lang/mono-5.4.1.6
deleted file mode 100644
index 714a65a5b00e..000000000000
--- a/dev-lang/mono-5.4.1.6
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare pretend setup test
-DEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) sys-devel/bc virtual/yacc pax_kernel? ( sys-apps/elfix ) dev-util/cmake >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Mono runtime and class libraries, a C# compiler/interpreter
-EAPI=6
-HOMEPAGE=https://www.mono-project.com/Main_Page
-IUSE=nls minimal pax_kernel xen doc kernel_linux abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~arm64
-LICENSE=MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL
-RDEPEND=!minimal? ( >=dev-dotnet/libgdiplus-2.10 ) ia64? ( sys-libs/libunwind ) nls? ( sys-devel/gettext ) || ( www-client/links www-client/lynx )
-SLOT=0
-SRC_URI=https://download.mono-project.com/sources/mono/mono-5.4.1.6.tar.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d linux-info 8e77ea4def23d38cdf0e8ffa69187d34 ltprune 607e058da37aa6dabfa408b7d61da72e mono-env 1f24c032c78290b0d9a07d5b343051a7 multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=97da6929f62ec503eed8fc3e81ed55f2
diff --git a/dev-lang/mono-basic-4.6-r1 b/dev-lang/mono-basic-4.6-r1
deleted file mode 100644
index 24444dc4b437..000000000000
--- a/dev-lang/mono-basic-4.6-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=setup
-DEPEND=dev-lang/mono
-DESCRIPTION=Visual Basic Compiler and Runtime
-EAPI=6
-HOMEPAGE=https://www.mono-project.com/docs/about-mono/languages/visualbasic/
-KEYWORDS=-* amd64 ~x86
-LICENSE=LGPL-2 MIT
-RDEPEND=dev-lang/mono
-SLOT=0
-SRC_URI=http://download.mono-project.com/sources/mono-basic/mono-basic-4.6.tar.bz2
-_eclasses_=mono-env 1f24c032c78290b0d9a07d5b343051a7
-_md5_=0e06302fd3e9cbd4cfb4eba365c7f992
diff --git a/dev-lang/mono-basic-4.7 b/dev-lang/mono-basic-4.7
deleted file mode 100644
index d5ad896f190f..000000000000
--- a/dev-lang/mono-basic-4.7
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=setup
-DEPEND=dev-lang/mono
-DESCRIPTION=Visual Basic Compiler and Runtime
-EAPI=6
-HOMEPAGE=https://www.mono-project.com/docs/about-mono/languages/visualbasic/
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-2 MIT
-RDEPEND=dev-lang/mono
-SLOT=0
-SRC_URI=http://download.mono-project.com/sources/mono-basic/mono-basic-4.7.tar.bz2
-_eclasses_=mono-env 1f24c032c78290b0d9a07d5b343051a7
-_md5_=9c4cfb0437388a0faed91d92e6387ad8
diff --git a/dev-lang/mono-basic/Manifest b/dev-lang/mono-basic/Manifest
new file mode 100644
index 000000000000..a7f20c33a3d7
--- /dev/null
+++ b/dev-lang/mono-basic/Manifest
@@ -0,0 +1,5 @@
+DIST mono-basic-4.6.tar.bz2 2051520 BLAKE2B 0fc4961e9beb0894dcc081ecd06abf8a2e1c3d1aa6bb129b72d2c87ab15e9e779c0305f030515b18bd218ac595cd03ebad2fef5403dfc5aeb7a58b8886d085a0 SHA512 a8b50f9fa0d2e7533429722e584f42ee3e3794e1e013a2ca75b616b2b7b8c755dbe0722187b5e0982b9ebb8b5d22310a21fcfd55a6c027ee6eadcc7887e106d9
+DIST mono-basic-4.7.tar.bz2 2051806 BLAKE2B 8d8beb26bfc79c5ff648d671fc92d0f15204694ac735d1ab0c375547f7f4a89519f24bc512ecc16ae93455c7c28978ef2112804335a02b9ccb63e537298e11d5 SHA512 c690f81d7af64d1592bc480be230abc93480728288291fe85de5c8b273eb6127d619c3bd02f2acd285b9b055ef4f2970a764b34f49f15e59ed238d01c151c99a
+EBUILD mono-basic-4.6-r1.ebuild 362 BLAKE2B 618f679c8799d411890b6cc04659c483e625cf61fcbb90170f40e836b7dc70f0a43b5e8a74e882c41d6e38da6fae1b702b56bff81479cc889ba4a1ca30278254 SHA512 af3b3f01bf27ee045698b2f5eafbdac6aa38e78880059a484c22e0bf271702a105c26e44d2d045bf318d66886b05c221ca7c05ff4e8a87b9f8ba7d1b0c5daed9
+EBUILD mono-basic-4.7.ebuild 360 BLAKE2B 46c2cc0d9f60948231b3242130f042a2a90517d87ebd27630281a0b239ff0ba316c5ae481f0e3226c2c03516ba1f3ee7230d3a2c00eb73eeeec4d2746a82a3b7 SHA512 8c7955d9e62c3f065dabe59c0a4fa3be3f52fa238f3c8033abd8ff45d882b70dc8f326af304bb44b06996e42bc5127a2c40f809853df743f2d48e51e01fac6d3
+MISC metadata.xml 369 BLAKE2B 99bc89ce5469bce6e867ce73fa66fee3fa41bf2166453c3606b03b1f3879f837c46d41068430e217a7ab4b0d0096650762095ffe5f13382ab055e5815f90ebb1 SHA512 5d49b66d13a6055421fc9e9a180d6d5657e367cfdc6e74a13c16955cc1bfda765605f0ab7c0d7d5f67ce847e09306fef52a2fb621eccdf358e5d21e82129a2b3
diff --git a/dev-lang/mono-basic/metadata.xml b/dev-lang/mono-basic/metadata.xml
new file mode 100644
index 000000000000..54d5423c4060
--- /dev/null
+++ b/dev-lang/mono-basic/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>ck+gentoo@bl4ckb0x.de</email>
+ <name>Conrad Kostecki</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-lang/mono-basic/mono-basic-4.6-r1.ebuild b/dev-lang/mono-basic/mono-basic-4.6-r1.ebuild
new file mode 100644
index 000000000000..a8dac49698aa
--- /dev/null
+++ b/dev-lang/mono-basic/mono-basic-4.6-r1.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit mono-env
+
+DESCRIPTION="Visual Basic Compiler and Runtime"
+HOMEPAGE="https://www.mono-project.com/docs/about-mono/languages/visualbasic/"
+
+KEYWORDS="-* amd64 ~x86"
+LICENSE="LGPL-2 MIT"
+SLOT="0"
+
+RDEPEND="dev-lang/mono"
+DEPEND="${RDEPEND}"
diff --git a/dev-lang/mono-basic/mono-basic-4.7.ebuild b/dev-lang/mono-basic/mono-basic-4.7.ebuild
new file mode 100644
index 000000000000..ec04d4fd795e
--- /dev/null
+++ b/dev-lang/mono-basic/mono-basic-4.7.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit mono-env
+
+DESCRIPTION="Visual Basic Compiler and Runtime"
+HOMEPAGE="https://www.mono-project.com/docs/about-mono/languages/visualbasic/"
+
+KEYWORDS="~amd64 ~x86"
+LICENSE="LGPL-2 MIT"
+SLOT="0"
+
+RDEPEND="dev-lang/mono"
+DEPEND="${RDEPEND}"
diff --git a/dev-lang/mono/Manifest b/dev-lang/mono/Manifest
new file mode 100644
index 000000000000..c9fc7187cd8c
--- /dev/null
+++ b/dev-lang/mono/Manifest
@@ -0,0 +1,21 @@
+AUX mono-4.4.1.0-x86_32.patch 839 BLAKE2B bd0fc2ff2bc16cb0aa260e94f2f0a304348bf80e34ac9f3b7b4350661fa5f0f4095f26647d1ff88bce1c3d33b5a6a4f2803639c57ed4f42988ce46edff5ecd2d SHA512 af72d2f89d34e05e94cb02b6bb5a9238b6bb0d9056e520c863271d1dad9d999d1bf2478bfd8766fbb40714f4a2641e1844bddf3997fe6cb779ab6d97ea800867
+AUX mono-4.8.0.371-makedev.patch 900 BLAKE2B 9e79240ce38a06c375674123d8182f9b9db646f85b2140b1420ac465b19639b910674a1d6e5ce0cb1e9e74d099d338cf3395e95015de4bdf1c4a0dd1ccf63f68 SHA512 afdcb69c2de195bcc6d0a47cc5bad6b6679de6d1c8f0577f8a2f5716610f131e71a327540ba7e23353f35dfe7c552f16b98c9e88c3ecf91f2225a68a6d034971
+AUX mono-4.8.0.371-x86_32.patch 1033 BLAKE2B cfcd8163180de91aec85841ce6c129faba242aa54db0d99b45195b8474e83ce96da4c5111fbb28cf0cb23d2a9a4be6a3856a18ef8bfda35fd7365f87c88509ae SHA512 f12ffda9eddb8fbd51844a6cc7bd3d4d147a97ddde9e4a4435051da88eb72603303ba7d21124747ab23033eacb70ae75ee8e96bc5887d898cc21ac1904c36aab
+AUX mono-5.0.1.1-x86_32.patch 751 BLAKE2B 1a19219c5667715a9afb7dc74ba9714893eea684a0c48945bcb70bdd83e34138a77ca029bcc8341b58af93617b4eab3251885affb3d129e8bf072a0279b8d29b SHA512 8c3d3a65f9d9a9a51c4a01dfd14e32e01bcc7cb98bd4f6a196a2a166968521ff859ccb1efd689c612c8bab5d6a384b148039de5033235a2c0552bc455dd636b7
+AUX mono-5.12-try-catch.patch 1267 BLAKE2B e33836d53fd4c9a4e64614d3f309058b2009487a853aee48fae99cd0326095b6dc26e7fbdd178e25f9fc3901f74f937ce5e9d3bb4322ca50e139d13f66c209a5 SHA512 3a82d4bed31b212e23fe24647fc5b9c4788be5f4966377a3bef9f92a51d16181e77e19ca1ec4736792da6a18206986bbb54d967499e2ca7e224201cf811f91b5
+DIST mono-4.4.1.0.tar.bz2 85897587 BLAKE2B 79651189e696aa7352704e1ac659302423b1212c88337da8d522aad8e8a49855b74c43020f506b3455ce1a99566e96ae464fecced584b14470d0c8dfe605c5b6 SHA512 d9b6c57c2d9327ea551083b81a2e6cc222ded9a04862056b0dfded1c5df56efbfc4960097df034595012231fe50d172174ab7b3e3f2d8c4c6953ab2106b1cb6a
+DIST mono-4.6.1.5.tar.bz2 83174665 BLAKE2B ce4586af882c6592d1615156d009e496b8405dcf3a2b59e53bb58d1949c33d68645506378eab272a6ef340194582333c515b38f635e961edc64767078905a2df SHA512 1d0c1ec2930ecea3faf1be572bc045300ef4a90d3fe7519f2a9c797be79298c61528d83baa5a24a57143a35be80f78297196556c33cd0f345d9907a973fe625a
+DIST mono-4.8.0.425.tar.bz2 87955541 BLAKE2B dd3c7d26d9818c0512ddbbea6c0980ce5411904c93d5aff8aef581016268594ea1a887dc51332afc225db25d735ef3ef379a5f7b72acd95892e9efe399fb9df9 SHA512 7bab64adbebc277d3fc10301fa6af6cd64ea0836e2d74dfdd9b59684d9402689f9a4e397f3d36f519c7a892c14dcf8f8867d40a5119891874dfd10f9bbce2ac4
+DIST mono-4.8.0.495.tar.bz2 87540431 BLAKE2B c067054c27e61fbd46cae962876afdf65fa4660db41482a7931436009d986ffd25cd9120f9d61f1db5e16b95423fb6cb81abf6be8eada408a9ed2e812f112e6d SHA512 0052b7b04ae25e7cb5970d742369b74c83a10c6c82da591e8d26ad9e13e8b2590a1cde27ca99e43aebc622c7a2a590b9e6c7ce519ac4185b0b6cf7134527cc9d
+DIST mono-4.8.0.524.tar.bz2 87392723 BLAKE2B ac17c3da6d6c08c4cb72c4fa300ded92625bd8c14c1e45ea9539efa42c8d085759f7bb298fe5df57bd41f18abf83f293d26a9e6272944933fcff0a3c16a7e4f3 SHA512 eb77b768a4a26e6a2a872f4845769cdc83f01af3377ecd6d932437d2a1b54bfd1ce727563906146195a54997b4b624fb75449a6f0bcfe818cbc4e6544841bf2b
+DIST mono-5.12.0.226.tar.bz2 213373240 BLAKE2B 6aa8d9962aa51d6a7f8f6106835cef6a4eb626d7af56a09ca185736db2535dbaffd5d97d5d0eef39001b11d41d868706be4788496c8d0036bdbad24c5f6fcc46 SHA512 f4ab3066c9a3545ace0c4af50ddbe58cf5d9ffe4895cc546669f329b91988fcfebab91a070ea46b27536040823a3bbc1bd7e5552a49769988e8271d52662c583
+DIST mono-5.4.1.6.tar.bz2 204934321 BLAKE2B 7aa3450a9bc4033f8084c4271b215af636e0df72d6349c97e0acd110d91e276d22b735d19bac2fb1e995ec34fa9e041831358a01d5c098b9c5e8b567d98350fe SHA512 d3618e9f127bc95b15feba5bf73317574872208770d83b8b545a9888df81a629e6fb14160db8a38526ffeb005f682e8dd9b8ced84bdb0cbb36dc9e7b28c240a4
+EBUILD mono-4.4.1.0.ebuild 3384 BLAKE2B fd16089b151c1666ceda7d05285fa8a10143a4157e46b75a3412b42dec80c0929f9ba8d9523ac65b64fb827ea8d1ad88fbe98a5e7d0d12423b970912d0ae50e4 SHA512 6c9c9ce5e19a33e4dbc1b0cdb2d17804a67eed5061e422358c971de5a2eb95b2848c4515312a4b082087c50040c1e7f9c687a134ca30354d8f4bde796432b126
+EBUILD mono-4.6.1.5-r1.ebuild 3486 BLAKE2B 6f041f91dce9157a3df0805760355d2b2e2025fdd3b99a2f3413e232aa109d311605fa389a282cb62de7aafebb47a52b6a789957ae965ed42d2e85e6ab3f2e27 SHA512 a242a3a79ba0b671dd77d1b607583c0ea30977d6b5753b55015b5caed6a2754469a9deae115f0a3a4c0e3632bddf7fd0859c2b2712cfd1059a26c5262bfe234f
+EBUILD mono-4.6.1.5.ebuild 3346 BLAKE2B 014dd6acd44c7ae53a919e3c7efc39b782705e8c750927e061dd0ffe3e9854164524acd0d7012c43b1439b8cc315816544f79e3518797e2daa31c8417bf585b4 SHA512 7b3e03978f8845d103defa5e1db87a5a73458601d255bd0cbc4a708e3da23e73277c35be934a3c8807c45ef1a0533824b98c5a8aa7a75fd813d9c3ad145d2145
+EBUILD mono-4.8.0.425.ebuild 3019 BLAKE2B af5ceb5808209e42126f3f2ad6062c19a33f352456d4e623694b730215a8add8030907a0632da4390042c7816e7454ae02890827b157b4e748c032cde8ceecb2 SHA512 e3b31207d8e42509b0a8a3711f9b2d9c97cbeac4807e109ed9be11254cd8cc87948f91e647e6c73133448ad5c7a8f140943de62d95e6fe1505f9b7165b8683af
+EBUILD mono-4.8.0.495.ebuild 3019 BLAKE2B af5ceb5808209e42126f3f2ad6062c19a33f352456d4e623694b730215a8add8030907a0632da4390042c7816e7454ae02890827b157b4e748c032cde8ceecb2 SHA512 e3b31207d8e42509b0a8a3711f9b2d9c97cbeac4807e109ed9be11254cd8cc87948f91e647e6c73133448ad5c7a8f140943de62d95e6fe1505f9b7165b8683af
+EBUILD mono-4.8.0.524.ebuild 3023 BLAKE2B 8b23acde97ed8ebe05eb7e4c3fab9f1c9b43ee775a460629a122eba13c56120d139c8732267c1fb2cb7ba9d96c3a9943a03c1c9894286205392dac8fd19a467c SHA512 0a229fdcbb0051e96e227f1a2bc2c85eea55f2277b549e866744c650a0c42172f5727abe2b1cf38660254757201b8f577401fb072814d266012058da3a2418ab
+EBUILD mono-5.12.0.226.ebuild 2966 BLAKE2B abf2eaf01a1aa04bf1d7c30ba61ccf4fb0126163ebb1290cd5a1a9f7b60c277a85e3b05542cfa98483a0d04d1b82c2488ba7dfbd001f64af393d215a748fb865 SHA512 2e7264375e88eba1cb081ad024701d0adde4d10cfa506cfee2c0d9126f573041d49040fe09ab504ffde118f803863fb403c923dcd25dd018525d3f42d4ae6c87
+EBUILD mono-5.4.1.6.ebuild 2981 BLAKE2B 0fa2e8a0574502869542c87491575b084e1a14eeb3eedc635e2c7f103f492086bf61f6bf4f9fe25d7d5abd80070bbdc6f742dd823c393fa6fb96f6c7a341cd93 SHA512 211b45145d9e37a302b0d0afcfbdc5676be2cbc3e39f5c51d171a3614de96bde1ea29658a95ef6d45da7c2a5d189da90c6f84a52eec20222a5dbb3428b050d02
+MISC metadata.xml 507 BLAKE2B 91655de22fc1ff309c36ecef9d77aa8cada0b8f13ae30677665de837e99b7b43622a1dc0c677b0f5455c06b8e8a295c3c4f39753f66e749163a4f002ee481016 SHA512 e072a1abbf66276b0d139c3e918593010312c2059a0c6feba7b324689cdf90efe28bef0286ad9888125acfdd1fed2dee3e05e79a0aeb7f9ec1809bd128cf8a20
diff --git a/dev-lang/mono/files/mono-4.4.1.0-x86_32.patch b/dev-lang/mono/files/mono-4.4.1.0-x86_32.patch
new file mode 100644
index 000000000000..751c057e6ce4
--- /dev/null
+++ b/dev-lang/mono/files/mono-4.4.1.0-x86_32.patch
@@ -0,0 +1,20 @@
+Native toolchain can default to different ABI (amd64 in bug case).
+Set target to i386.
+https://bugs.gentoo.org/600664
+diff -Naur a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c
+--- a/mono/mini/aot-compiler.c 2016-06-22 04:31:58.000000000 -0500
++++ b/mono/mini/aot-compiler.c 2017-12-08 14:25:35.338251941 -0600
+@@ -9438,7 +9438,12 @@
+ 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)
++#define LD_OPTIONS "-m elf_i386"
++#if !defined(TARGET_MACH)
++#define AS_OPTIONS "--32"
++#endif
++#elif defined(TARGET_AMD64) && !defined(TARGET_MACH)
+ #define AS_OPTIONS "--64"
+ #elif defined(TARGET_POWERPC64)
+ #define AS_OPTIONS "-a64 -mppc64"
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/files/mono-5.0.1.1-x86_32.patch b/dev-lang/mono/files/mono-5.0.1.1-x86_32.patch
new file mode 100644
index 000000000000..08d443a22038
--- /dev/null
+++ b/dev-lang/mono/files/mono-5.0.1.1-x86_32.patch
@@ -0,0 +1,21 @@
+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 0656a57..690c96b 100644
+--- a/mono/mini/aot-compiler.c
++++ b/mono/mini/aot-compiler.c
+@@ -9926,4 +9926,6 @@ compile_asm (MonoAotCompile *acfg)
+ #ifdef TARGET_WIN32_MSVC
+ #define AS_OPTIONS "-c -x assembler"
++#elif defined(TARGET_X86) && !defined(TARGET_MACH)
++#define AS_OPTIONS "--32"
+ #elif defined(TARGET_AMD64) && !defined(TARGET_MACH)
+ #define AS_OPTIONS "--64"
+@@ -9981,4 +9983,6 @@ compile_asm (MonoAotCompile *acfg)
+ #elif defined(TARGET_POWERPC64)
+ #define LD_OPTIONS "-m elf64ppc"
++#elif defined(TARGET_X86)
++#define LD_OPTIONS "-m elf_i386"
+ #endif
+
diff --git a/dev-lang/mono/files/mono-5.12-try-catch.patch b/dev-lang/mono/files/mono-5.12-try-catch.patch
new file mode 100644
index 000000000000..051c72be6859
--- /dev/null
+++ b/dev-lang/mono/files/mono-5.12-try-catch.patch
@@ -0,0 +1,31 @@
+diff -ur mono-5.9.0.398/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs mono-patched-5.9.0.398/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
+--- mono-5.9.0.398/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs 2017-11-17 18:12:57.000000000 +0300
++++ mono-patched-5.9.0.398/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs 2017-12-06 06:24:45.067519852 +0300
+@@ -2810,14 +2810,21 @@
+
+ internal override object ClipboardRetrieve(IntPtr handle, int type, XplatUI.ClipboardToObject converter)
+ {
+- XConvertSelection(DisplayHandle, handle, (IntPtr)type, (IntPtr)type, FosterParent, IntPtr.Zero);
++ try
++ {
++ XConvertSelection(DisplayHandle, handle, (IntPtr)type, (IntPtr)type, FosterParent, IntPtr.Zero);
+
+- Clipboard.Retrieving = true;
+- while (Clipboard.Retrieving) {
+- UpdateMessageQueue(null, false);
+- }
++ Clipboard.Retrieving = true;
++ while (Clipboard.Retrieving) {
++ UpdateMessageQueue(null, false);
++ }
+
+- return Clipboard.Item;
++ return Clipboard.Item;
++ }
++ catch (Exception ex)
++ {
++ return null;
++ }
+ }
+
+ internal override void ClipboardStore (IntPtr handle, object obj, int type, XplatUI.ObjectToClipboard converter, bool copy)
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-4.4.1.0.ebuild b/dev-lang/mono/mono-4.4.1.0.ebuild
new file mode 100644
index 000000000000..ed7f9c382979
--- /dev/null
+++ b/dev-lang/mono/mono-4.4.1.0.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2018 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="https://www.mono-project.com/Main_Page"
+SRC_URI="https://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 )
+"
+
+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"
+
+ epatch "${FILESDIR}/${P}-x86_32.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..3ed76fb6a64a
--- /dev/null
+++ b/dev-lang/mono/mono-4.6.1.5-r1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2018 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="https://www.mono-project.com/Main_Page"
+SRC_URI="https://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 )
+"
+
+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..414d13c15d9a
--- /dev/null
+++ b/dev-lang/mono/mono-4.6.1.5.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2018 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="https://www.mono-project.com/Main_Page"
+SRC_URI="https://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 )
+"
+
+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..51f9e5d52aed
--- /dev/null
+++ b/dev-lang/mono/mono-4.8.0.425.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2018 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="https://www.mono-project.com/Main_Page"
+SRC_URI="https://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
+"
+
+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..51f9e5d52aed
--- /dev/null
+++ b/dev-lang/mono/mono-4.8.0.495.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2018 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="https://www.mono-project.com/Main_Page"
+SRC_URI="https://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
+"
+
+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..2e12a8843385
--- /dev/null
+++ b/dev-lang/mono/mono-4.8.0.524.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2018 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="https://www.mono-project.com/Main_Page"
+SRC_URI="https://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
+"
+
+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-5.12.0.226.ebuild b/dev-lang/mono/mono-5.12.0.226.ebuild
new file mode 100644
index 000000000000..4d520080eb69
--- /dev/null
+++ b/dev-lang/mono/mono-5.12.0.226.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~arm64"
+RESTRICT="mirror"
+SLOT="0"
+
+IUSE="nls minimal pax_kernel xen doc"
+
+inherit autotools eutils linux-info mono-env flag-o-matic pax-utils multilib-minimal
+
+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"
+
+SRC_URI="http://download.mono-project.com/sources/mono/${P}.tar.bz2"
+
+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
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.1.1-x86_32.patch
+ "${FILESDIR}"/mono-5.12-try-catch.patch
+)
+
+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 https://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-5.4.1.6.ebuild b/dev-lang/mono/mono-5.4.1.6.ebuild
new file mode 100644
index 000000000000..22de8a7240e6
--- /dev/null
+++ b/dev-lang/mono/mono-5.4.1.6.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2018 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="https://www.mono-project.com/Main_Page"
+SRC_URI="https://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 ~arm64"
+
+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
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-5.0.1.1-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 https://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-1.4.0-r3 b/dev-lang/mozart-1.4.0-r3
deleted file mode 100644
index 18243cbe95bb..000000000000
--- a/dev-lang/mozart-1.4.0-r3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=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= ) ) sys-devel/bison sys-devel/flex
-DESCRIPTION=Advanced development platform for intelligent, distributed applications
-EAPI=5
-HOMEPAGE=http://www.mozart-oz.org/
-IUSE=doc emacs examples gdbm static tcl threads tk
-KEYWORDS=-amd64 ppc -ppc64 x86
-LICENSE=Mozart
-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= ) )
-SLOT=0
-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/mozart-1.4.0-gentoo-patchset-5.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 )
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 elisp-common 23f47b2e1de7abf387105eddd1318738 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=323446fe092ac92228a8a6c94fe61bcf
diff --git a/dev-lang/mozart-stdlib-1.4.0-r1 b/dev-lang/mozart-stdlib-1.4.0-r1
deleted file mode 100644
index 014ed2d48577..000000000000
--- a/dev-lang/mozart-stdlib-1.4.0-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=install prepare
-DEPEND=dev-lang/mozart
-DESCRIPTION=The Mozart Standard Library
-EAPI=2
-HOMEPAGE=http://www.mozart-oz.org/
-KEYWORDS=-amd64 ppc -ppc64 x86
-LICENSE=Mozart
-RDEPEND=dev-lang/mozart
-SLOT=0
-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
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=8ab8af18c6e9c8c9c04f077e3d2a84b8
diff --git a/dev-lang/mozart-stdlib/Manifest b/dev-lang/mozart-stdlib/Manifest
new file mode 100644
index 000000000000..a87210ba8f61
--- /dev/null
+++ b/dev-lang/mozart-stdlib/Manifest
@@ -0,0 +1,5 @@
+AUX mozart-stdlib-1.4.0-docroot.patch 770 BLAKE2B fb8474a1dbc33dae9fff1bb0011f0a8de0a22f78305d2820d1f5f982339097e9d0170833d94e824b61d86af3d3515703fe31bc312a63f87c8769eaa0506da893 SHA512 5d506dedb42194083afe56c3a22f3653fef1616f69956c8e11de3aa592d29e95d45de507cc630007c0c29970d21b7dbc12bb34b74f33ada255578054d9dbe731
+AUX mozart-stdlib-1.4.0-ozload.patch 719 BLAKE2B db5dd3e738698c8ef6c5b6b827a0fae93d7d7d6af43f764d9a0aad163b2d3e4d4cb367cf558c33b7472fb97ee1e4a848cac9a7aa10afbc0976524ff9cc796302 SHA512 08ad85533a6aaa846c3fcb3839f319890084d32d39439b2aa432cbcc39e1483201abed0716d3d2eff4d3d5c03ca1916dc6ffec6882110b625cdc549626b262b2
+DIST mozart-1.4.0.20080704-std.tar.gz 1305359 BLAKE2B 1dc665a801f2ab1a87b6256279cf097053865b6d78c8131f15188b5b5e25d4b70c34c8dc590b9c4c708ece9821ba1d46fc62ddec698471ff5c629dfcee171a71 SHA512 5b9d9811d739c3533b7f1fa98757d842b506d58a3fd5d89ee2c1d9c036b3130f152da05b19036c8c1609057e361d71b106a728afea47140ebab3b4fc82441aed
+EBUILD mozart-stdlib-1.4.0-r1.ebuild 895 BLAKE2B 610a9ae46db419e5cf74468e50df0461137a00da3253237adf96ebac436f07455d01d2b6ffffba83b0bb7cf11aa26a2a2dda622bfa9fbd1a223b751252de363e SHA512 d9e3a4e41c20822e227143cdf9fce9160f669aded0be38464431760bdce3decf58494bc4c0f95960b92aeeebfd9cd153e690eec1c0d7bd6ff3f70e8c86418ff2
+MISC metadata.xml 240 BLAKE2B 6b5ab0d76c5748af7bd1800d11864869d7365b8d53e2fd2ec66c1092dd1fdac8461b20c029ffe835357542ca69f789ce867988d64c43019e02fe9e3691f0f9bd SHA512 7cd99ce62ca4f9307fa7dfdbfd0ff9d8ff7485c58cd08cd684065aca4b570f8655587425f6a240453a9e86452de41f26f8b82aa81c023764d0beb47daa1b15d3
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..ac0ffcf67dc0
--- /dev/null
+++ b/dev-lang/mozart/Manifest
@@ -0,0 +1,6 @@
+AUX 50mozart-gentoo.el 482 BLAKE2B f98c3c44f0e9ddfad7ee957e4c0dd3b24a01905ce09289322b6a3e391b515cb82e3334ac30c5b18c84aa86e57c22c1bd1622687d66858ca42a25556d1a26c4c8 SHA512 d9319273051e3d485e35af29710a3df1b7bd66f47ec7ee60cf37af364ec2dbe42d6507ed573d39577479a6c58ba2f15c52052b32d37371ea0b5aebf39bd46bbf
+DIST mozart-1.4.0-gentoo-patchset-5.tar.gz 24700 BLAKE2B c3b14bd7d8a762b84a098a9e42dfe09b5b902fdfe6c8e8dcebe7198eaaf0e89cbb101ec3765713db0fbddb6f3b9741ed927af98df48aed496d7864f6bc5f6999 SHA512 99db9bf62682fd306c4b665d99ab3b48a787c26230d5e8db2e3564684eff2e41ac0c6bb6a612afa0446555dcb1e419ae7ef1dbfec4c918d769d51dafeeee8462
+DIST mozart-1.4.0.20080704-doc.tar.gz 4085020 BLAKE2B 33eaf57c91dd62d9aa79651095aa5d095086d76dfa16bd5f520962229338c00556fcf3ac01eca1769c687f990110e95fa887d56391346af780d55166708338a1 SHA512 25f8f4b603ae7f4ef054a79a2baa4e10074f8a95f762b75fd88480526fb073b5b4874c269d116a960017a9e7ef989dd9f41853b0ff76e08b2cad2de2090c2eb4
+DIST mozart-1.4.0.20080704-src.tar.gz 11848201 BLAKE2B 0ceeb7dbd3f6858d1a4fee76f2a99eeb3127a07fd31b6760748ac8b8b638c36caaa873154be6481c3dc4b5196ef04cb0c10be421bd87dc3bc4e6b29357622d8d SHA512 f1114662c8c603cc2ac530d4ea1d22a0581f6e1b4d5cb57ccf899b8051ea48dbcf2fa2b62173359a754367a5456a7cb121a208d6a246248207599b0470525229
+EBUILD mozart-1.4.0-r3.ebuild 2910 BLAKE2B a778d17b22a1e93eea78b877c6e2a3b77cd2dd68429093ae673bfc160069adb912ef99ed1cb649ddbdb4de8591317def746a50ad5439266392ed71b6bf37bf8c SHA512 1bd1922a512239d1c5e031c6f003d1c862cfba77c27f40ca36b081856f2d3a415e0c91edd8bad4a52649a88cf4a098cd81e00e4f2b5648b4b8d27f77d76d4df3
+MISC metadata.xml 248 BLAKE2B 15dcca8e423036aaf3d73f9557507d39f7a22a6fa36d83405d8180df441adc50b9d61f8dd720a9d0045f5b3e6ebc9785fcf8f1340c253b2d277404672d395c1b SHA512 b296da55efb17a1040203bc1f5f3bfa8160711fdb72f0543739e6efe48b75427c082eb6c405d99b3256e8d536d3d29f71fdd0fd8d281cb9a9967060ea467a034
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-0_p20161202 b/dev-lang/mujs-0_p20161202
deleted file mode 100644
index 837a2c4b2a49..000000000000
--- a/dev-lang/mujs-0_p20161202
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=install prepare unpack
-DESCRIPTION=lightweight Javascript interpreter
-EAPI=6
-HOMEPAGE=http://mujs.com/
-KEYWORDS=alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=AGPL-3
-SLOT=0
-SRC_URI=http://git.ghostscript.com/?p=mujs.git;a=snapshot;h=fd003eceda531e13fbdd1aeb6e9c73156496e569;sf=tgz -> mujs-0_p20161202.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf vcs-snapshot 3be1ab44131e8c0bbdaa75823008444b
-_md5_=9e49046e0274ee1c66289fa3fae09dee
diff --git a/dev-lang/mujs-1.0.1-r1 b/dev-lang/mujs-1.0.1-r1
deleted file mode 100644
index 02a3932eddd2..000000000000
--- a/dev-lang/mujs-1.0.1-r1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DESCRIPTION=lightweight Javascript interpreter
-EAPI=6
-HOMEPAGE=http://mujs.com/
-IUSE=static-libs
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=AGPL-3
-SLOT=0
-SRC_URI=http://git.ghostscript.com/?p=mujs.git;a=snapshot;h=4792d16f17b15a1eca3c2a9c856dc13fda1d23c5;sf=tgz -> mujs-1.0.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=47e5ec91bd9d2bb33a0a44cc954cf9b3
diff --git a/dev-lang/mujs/Manifest b/dev-lang/mujs/Manifest
new file mode 100644
index 000000000000..e58b1932806d
--- /dev/null
+++ b/dev-lang/mujs/Manifest
@@ -0,0 +1,7 @@
+AUX mujs-0_p20150202-Makefile.patch 593 BLAKE2B f2e12bc18ae155a4cc5c69a9b1c5ad749e206a567fc7c58ae453f85f2dbda6cb5f0c462e853ad6c52e422a0dcab9834312d1c2cdbd419759ceedaa4b5513314d SHA512 2c6c0b0ba8dc757a1ae57fbfe5ea56970e07177b45e7d7aa7ed41896ead5b0d4200003897f9c837fc97e96bdc2fd51229fd2629e8780194ad12f86940591878e
+AUX mujs-1.0.1-gentoo.patch 788 BLAKE2B b3a62c59226c79a81c748b1c7d6cfa80e89d909f47946133e22fc07f57f99bead5a61be8b9b76902ca04f86d2a7494940145118cf464ef2a39a651797ce5921b SHA512 b7409ff5aa9e5e38d3d9b7a3805699847a043ee83d46520d2b2ac011ac0a66588126a5c6761e919f9f9c7c510ff5d62d7c22c97739b52e611f5b89a911f52169
+DIST mujs-0_p20161202.tar.gz 105413 BLAKE2B a65a343d6f60975c88001cdd8eae881559eaf8ba94cf26c8aa9a9a3837cd47ee798c784ed9e90380a76ef328e56d63d1dccd8a85a4a7496d31046d221cf8d7b9 SHA512 90dd1bce44740715a6f642bdb376be230c4a03c7970c2026479cf014a080b98b56a2131ca7ef8bf9c05b91285fe7dcc21dd4ca83879750351d57088408a62cbc
+DIST mujs-1.0.1.tar.gz 116948 BLAKE2B 54d898eff95e65688a51d9df9175964609a55ad3243ffaa4da10f27a6262a207777dd500cb76aefc22aa52799fed577864d15dfec9ed4aea24f0a4f1ff8dfa0a SHA512 46cbc45735dbf173d7fa5839e3b511730e4d42933c2286d170767659649ea88c2a3dcc74fb986d1eedb1d4fec8fcaaba146805cc9d0ef7da98bb5a9ce0c80a96
+EBUILD mujs-0_p20161202.ebuild 824 BLAKE2B ef5920796454ab2cb26c54149228da8a4903f708fef17972a8bad581778e598b5e682d46f34327873d6fea3925b8310668c57a8ae9339a18624ce418676d8797 SHA512 15f9ad4f8bfa67ba51cf2429a8d985974fd39af83ddc53c238acfa5293b055a116c7de6c91271a975d7b044b6c5cd6c1bb645db5d3400b4399f9f96f7b4cd401
+EBUILD mujs-1.0.1-r1.ebuild 1103 BLAKE2B ca260b9e9864f98c2dc94d3297f4ebf98e7e6ccab60803c0abf90981e5b91e6505e9643e1e6d36e6da803a19d3fb935bcdc4dd7cabdfff9abcc5450a5dce9306 SHA512 98525a0a8fea64b8a223b88f082cdf8634e5eca55e51c5c792c6ff3407408e83c69d9d1b9f6bc6e36002bf33b7ce21fe927938c93fac1a925902e643336841e5
+MISC metadata.xml 237 BLAKE2B f22c3926ba75c18fce7667217807f3710a315b12b1341622c949e7bc0056cd1cb403ea6c66d838675f3cb5dcd53d2fc4ec71425ec3f96aaffb94b70b73e99320 SHA512 ae2360aa6b1b00c67e0acea4935c02b64585b9a15e126fec9d5d99637021c542c0a495e5116205f3da287def46fa5b19cb1a7f3042c12c5f7a78d66d92fcb03f
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-2.11.08 b/dev-lang/nasm-2.11.08
deleted file mode 100644
index 13b2cedacfff..000000000000
--- a/dev-lang/nasm-2.11.08
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install
-DEPEND=dev-lang/perl doc? ( app-text/ghostscript-gpl sys-apps/texinfo )
-DESCRIPTION=groovy little assembler
-EAPI=5
-HOMEPAGE=https://www.nasm.us/
-IUSE=doc
-KEYWORDS=amd64 ~ia64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos
-LICENSE=BSD-2
-SLOT=0
-SRC_URI=https://www.nasm.us/pub/nasm/releasebuilds/2.11.08/nasm-2.11.08.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d76fd460f9f86dd405db7f283f835675
diff --git a/dev-lang/nasm-2.12.01 b/dev-lang/nasm-2.12.01
deleted file mode 100644
index 54807e0fcbf3..000000000000
--- a/dev-lang/nasm-2.12.01
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install
-DEPEND=dev-lang/perl doc? ( app-text/ghostscript-gpl sys-apps/texinfo )
-DESCRIPTION=groovy little assembler
-EAPI=5
-HOMEPAGE=https://www.nasm.us/
-IUSE=doc
-KEYWORDS=amd64 ~ia64 x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos
-LICENSE=BSD-2
-SLOT=0
-SRC_URI=https://www.nasm.us/pub/nasm/releasebuilds/2.12.01/nasm-2.12.01.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=de2fdd323f02011ec896e1353d3ed549
diff --git a/dev-lang/nasm-2.13.01 b/dev-lang/nasm-2.13.01
deleted file mode 100644
index 3ba79295e1e8..000000000000
--- a/dev-lang/nasm-2.13.01
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install
-DEPEND=dev-lang/perl doc? ( app-text/ghostscript-gpl dev-perl/Font-TTF dev-perl/Sort-Versions media-fonts/clearsans virtual/perl-File-Spec )
-DESCRIPTION=groovy little assembler
-EAPI=6
-HOMEPAGE=https://www.nasm.us/
-IUSE=doc
-KEYWORDS=amd64 x86 ~x64-cygwin ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-macos
-LICENSE=BSD-2
-SLOT=0
-SRC_URI=https://www.nasm.us/pub/nasm/releasebuilds/2.13.01/nasm-2.13.01.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=929f2e2513b631ae54bb1fec32221bf9
diff --git a/dev-lang/nasm-2.13.03 b/dev-lang/nasm-2.13.03
deleted file mode 100644
index a00d9fda72a5..000000000000
--- a/dev-lang/nasm-2.13.03
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install
-DEPEND=dev-lang/perl doc? ( app-text/ghostscript-gpl dev-perl/Font-TTF dev-perl/Sort-Versions media-fonts/clearsans virtual/perl-File-Spec )
-DESCRIPTION=groovy little assembler
-EAPI=6
-HOMEPAGE=https://www.nasm.us/
-IUSE=doc
-KEYWORDS=~amd64 ~x86 ~x64-cygwin ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-macos
-LICENSE=BSD-2
-SLOT=0
-SRC_URI=https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=78b8a299a2702ff194eeaac5ac1f808a
diff --git a/dev-lang/nasm-2.13.03-r1 b/dev-lang/nasm-2.13.03-r1
deleted file mode 100644
index 3ff8df8de4e2..000000000000
--- a/dev-lang/nasm-2.13.03-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install
-DEPEND=dev-lang/perl doc? ( app-text/ghostscript-gpl dev-perl/Font-TTF dev-perl/Sort-Versions media-fonts/source-pro virtual/perl-File-Spec )
-DESCRIPTION=groovy little assembler
-EAPI=6
-HOMEPAGE=https://www.nasm.us/
-IUSE=doc
-KEYWORDS=~amd64 ~ia64 ~x86 ~x64-cygwin ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-macos
-LICENSE=BSD-2
-SLOT=0
-SRC_URI=https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=669301df5b6dbb7548100dffe1b66a78
diff --git a/dev-lang/nasm/Manifest b/dev-lang/nasm/Manifest
new file mode 100644
index 000000000000..97f6af9e0829
--- /dev/null
+++ b/dev-lang/nasm/Manifest
@@ -0,0 +1,13 @@
+AUX nasm-2.13.01-fix-docdir.patch 5536 BLAKE2B 4eac268b54b33bbf058562ec15870df57af1997530ddf98940abfa67da4e1241a5cf9597261ae9bf7e65c502ce70d0a60834d12dfa9979ac647b9f04fe56c21e SHA512 22bbfac66b75451345a1f3d19816ecc35397c9b95f16f7dffdf8dbde9055bb035880f5cb081686c42ce3f448e250a29c9440775aad929a7e36c1325e6bbc88d7
+AUX nasm-2.13.01-gcc-8.patch 817 BLAKE2B ffe883fa68f9fe29e909df2226fdcc6603b739335051ca43740504b7af75798036b19ce647daaf146ab976bce3e645b3cca65b972adbf29e737c8e6f2c32e026 SHA512 eb1b8a4d0d122a7bc797962aea24eb858ad4f1876981496546059155cdc4fcb719b849f692f003706c623c27d116c9188598ea482d33bf091d59964410fd0e15
+AUX nasm-2.13.03-bsd-cp-doc.patch 357 BLAKE2B 2611aa3e7f817530c8012f1849d5d80f47105a2e35950795826b3b9d128493ab7e8c1da106b9d22e24a025f8bf24f142cad385c5fca13e09423168bc2fc69f65 SHA512 6562f98e08953b5ac667df4f89f401cc520cf24dfaf112121ca0f7a039b96a328316afd62d118ae98ec9d2c1c3f2c1c9b88d2d66f19197637b7b785a48964f9c
+DIST nasm-2.11.08.tar.xz 764872 BLAKE2B 2120a95065152b85d938811a1aa7c79eee9d3b9094f8bd2ed40eee7027de8b128a12552573bebcad6098e01b490ee21cffef3e04faf43263086b7e5ba81e4f6a SHA512 f7caf42d0fe1b850de13180a1f363e34a6d44a02696312dd8f12f4116ad1c1f3d01e6606c3a79fb881e76fc70d20894d85b333c84a75d60265ff9551f7b8cde4
+DIST nasm-2.12.01.tar.xz 780112 BLAKE2B 2464c40016072b82db1f3895e22cca27ad6052c22d7671e1bf36508335a140f728f36876205ca6ae01396f396ff03dc51cb5fd0f628cc7936ed461ff1f90b1d8 SHA512 c016b2b26f2ef00fe8de673dc7b2effa55ddd23d1f15145380c2767a2cd4a5c60c77732faebcd5868b325f780c0bf76a5e0c49eb6189609b21e2493d2af9347c
+DIST nasm-2.13.01.tar.xz 800244 BLAKE2B 23a42d9e6c66577cee0e3b6cdff8da7b7b49286011f2d9e2319bd229ca0a1ab5b89a27d71a591777430e577175c935ba2a34b7ba0ca6086853f84fa5f0f648ab SHA512 6561a2efb3ffea77a1a8cd364edf1ecedb2c14e1902469d7c59d743f25ca612529113d1099818abbe0a9f2592f12604f1810855bbdf8dc9de3648094a83529ae
+DIST nasm-2.13.03.tar.xz 806636 BLAKE2B 36187dac080dac17efbc1a2319d989bcb0f883fee80668656a6a87bdd83ee4115ffa2f8519f6d267815590f4809aa293aac500f3a5505a391154cb460cbe94ad SHA512 24e6c72b80a878453baf3b525c1bad607431ff672a927f73e742379fa833b3f5d3fa4479addfcec6d96f354aa90a45905ff9c76ab5217c3bcb7091107b32e2b5
+EBUILD nasm-2.11.08.ebuild 816 BLAKE2B e935f22443a02e2f0c6e7f45c0b8bf0e64c60850737fed21d16d30a9eb65196468d32c335cbdcde0d7d7c3b63036b8873e1d44dd9fe20808fbfa4e5549ce9a7d SHA512 d07fc39d1e681ef11abbc0d7e98beb9943b313081b0613b75ca74d05a927bda235249bd2395b18ebf6c1fb92f9d10ed95379066a2a27ed802226b34e1cb299d4
+EBUILD nasm-2.12.01.ebuild 828 BLAKE2B b033afffbb5726d584f95b43b2aaa11be953a646f0cdeffde7fea7d96b182306bf6fa59290d38b7c3fb79e91fd24089904b6705ef100f24b7c57a57db691e26d SHA512 0df9631d34b69348ad66b9f3cc2cb868995eea108fe60ab1a2076ac51dc86439997ec2f7d3b75471d101dff3765a6b23a51b82b1e1691cf1010397125d9ad922
+EBUILD nasm-2.13.01.ebuild 861 BLAKE2B eff4bea9ce72d6a3d7ade24757a161cfe385cc7fdc6ac86d412c04ec3e5c0ca436e6b23c8d6db3fa48d46a9a7f7cf671ed22a335a78bac5ac1496c4eac66c46f SHA512 4bd6b4573cc9315e605713ae5dd3d0ef5e391d1561df05c710cfe03fa4f94c30ec2d0db4798e1c758b590b931cf078658905806378e182867305ce37dfacd2b2
+EBUILD nasm-2.13.03-r1.ebuild 1114 BLAKE2B 27c9c88846dc205695ca4c3de908cc97dddca3e5592f972b6ae1f3d515931ebd36a878c781d5ca486cbf3af63526ef30aa156db3a0b048e9fd091f7c440076cb SHA512 7313abac2666b113be49bea29e8a22aabb259af787746100fa3323536fc5e4692dc7fb54378ec54812700e917b06021e0200669fc6785531820716e8186c15a2
+EBUILD nasm-2.13.03.ebuild 863 BLAKE2B ac96ac739d4e67db01d5590a0303656662cb1ef00685c2b3f26598bb48d732276ca9937cabda60470972b7fd15e8505ace71f5515e7049eab844c4454e39274c SHA512 0c5ebb90ede08ece666b536b7a86b8dc0105dea84a110104548defbd8300cec9b3825bce96e03edf2f3f6788a1045b0445d3a73ddd5c64e6bf59785d419b34e4
+MISC metadata.xml 869 BLAKE2B 6acbe39b23e071849e6afd42da7ec5a56f017b708745e5efd09a288775da944fbb1185cead3ceaa573398f5874115139834584323e5b4cff360cf6cd9cca4ccd SHA512 a6bf522dfa6c43ea58a432577fbc31bcc9d262f7262c16d165b3cbacf8394a6d9e6d1eea9480cdb27b692cacada0c5fba3906e913259c2809a48159bce53e5bf
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/files/nasm-2.13.01-gcc-8.patch b/dev-lang/nasm/files/nasm-2.13.01-gcc-8.patch
new file mode 100644
index 000000000000..3b703ec6e46d
--- /dev/null
+++ b/dev-lang/nasm/files/nasm-2.13.01-gcc-8.patch
@@ -0,0 +1,25 @@
+From 5eb1838b4d3752fd863d19442943983a2a5ee87c Mon Sep 17 00:00:00 2001
+From: Cyrill Gorcunov <gorcunov@gmail.com>
+Date: Sat, 10 Feb 2018 00:33:41 +0300
+Subject: [PATCH] nasmlib: Drop unused seg_init
+
+The helper has been eliminated in 2c4a4d5810d0a59b033a07876a2648ef5d4c2859
+
+https://bugzilla.nasm.us/show_bug.cgi?id=3392461
+
+Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
+---
+ include/nasmlib.h | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/include/nasmlib.h b/include/nasmlib.h
+index 79e866b5..fee1b5ea 100644
+--- a/include/nasmlib.h
++++ b/include/nasmlib.h
+@@ -191 +190,0 @@ int64_t readstrnum(char *str, int length, bool *warn);
+- * seg_init: Initialise the segment-number allocator.
+@@ -194 +192,0 @@ int64_t readstrnum(char *str, int length, bool *warn);
+-void pure_func seg_init(void);
+--
+2.17.0
+
diff --git a/dev-lang/nasm/files/nasm-2.13.03-bsd-cp-doc.patch b/dev-lang/nasm/files/nasm-2.13.03-bsd-cp-doc.patch
new file mode 100644
index 000000000000..76c1790da208
--- /dev/null
+++ b/dev-lang/nasm/files/nasm-2.13.03-bsd-cp-doc.patch
@@ -0,0 +1,15 @@
+Avoid 'cp -u' as it's not portable.
+
+In this case we can unconditionally copy files.
+
+Reported-by: Michał Górny
+Bug: https://bugs.gentoo.org/655444
+diff --git a/doc/Makefile.in b/doc/Makefile.in
+index 261a791..bc9da1e 100644
+--- a/doc/Makefile.in
++++ b/doc/Makefile.in
+@@ -28,3 +28,3 @@ RM_RF = rm -rf
+ CP_F = cp -f
+-CP_UF = cp -ufv
++CP_UF = cp -fv
+
diff --git a/dev-lang/nasm/metadata.xml b/dev-lang/nasm/metadata.xml
new file mode 100644
index 000000000000..f7462a193d87
--- /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>slyfox@gentoo.org</email>
+ <name>Sergei Trofimovich</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..adae162fc9d3
--- /dev/null
+++ b/dev-lang/nasm/nasm-2.11.08.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit flag-o-matic
+
+DESCRIPTION="groovy little assembler"
+HOMEPAGE="https://www.nasm.us/"
+SRC_URI="https://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..13ef00ee1fa1
--- /dev/null
+++ b/dev-lang/nasm/nasm-2.12.01.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit flag-o-matic
+
+DESCRIPTION="groovy little assembler"
+HOMEPAGE="https://www.nasm.us/"
+SRC_URI="https://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..9a43fd2fc572
--- /dev/null
+++ b/dev-lang/nasm/nasm-2.13.01.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+DESCRIPTION="groovy little assembler"
+HOMEPAGE="https://www.nasm.us/"
+SRC_URI="https://www.nasm.us/pub/nasm/releasebuilds/${PV/_}/${P/_}.tar.xz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x64-cygwin ~amd64-fbsd ~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
+ "${FILESDIR}"/${PN}-2.13.01-gcc-8.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/nasm/nasm-2.13.03-r1.ebuild b/dev-lang/nasm/nasm-2.13.03-r1.ebuild
new file mode 100644
index 000000000000..6c15c6756966
--- /dev/null
+++ b/dev-lang/nasm/nasm-2.13.03-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+DESCRIPTION="groovy little assembler"
+HOMEPAGE="https://www.nasm.us/"
+SRC_URI="https://www.nasm.us/pub/nasm/releasebuilds/${PV/_}/${P/_}.tar.xz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~x86 ~x64-cygwin ~amd64-fbsd ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="doc"
+
+# [fonts note] doc/psfonts.ph defines ordered list of font preference.
+# Currently 'media-fonts/source-pro' is most preferred and is able to
+# satisfy all 6 font flavours: tilt, chapter, head, etc.
+DEPEND="
+ dev-lang/perl
+ doc? (
+ app-text/ghostscript-gpl
+ dev-perl/Font-TTF
+ dev-perl/Sort-Versions
+ media-fonts/source-pro
+ virtual/perl-File-Spec
+ )
+"
+
+S=${WORKDIR}/${P/_}
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.13.01-fix-docdir.patch
+ "${FILESDIR}"/${PN}-2.13.01-gcc-8.patch
+ "${FILESDIR}"/${PN}-2.13.03-bsd-cp-doc.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/nasm/nasm-2.13.03.ebuild b/dev-lang/nasm/nasm-2.13.03.ebuild
new file mode 100644
index 000000000000..16f0c1f2a8a3
--- /dev/null
+++ b/dev-lang/nasm/nasm-2.13.03.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic
+
+DESCRIPTION="groovy little assembler"
+HOMEPAGE="https://www.nasm.us/"
+SRC_URI="https://www.nasm.us/pub/nasm/releasebuilds/${PV/_}/${P/_}.tar.xz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x64-cygwin ~amd64-fbsd ~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
+ "${FILESDIR}"/${PN}-2.13.01-gcc-8.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-0.16.0 b/dev-lang/nim-0.16.0
deleted file mode 100644
index 6dbf1b19407e..000000000000
--- a/dev-lang/nim-0.16.0
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install test
-DEPEND=readline? ( sys-libs/readline:0= )
-DESCRIPTION=compiled, garbage-collected systems programming language
-EAPI=6
-HOMEPAGE=https://nim-lang.org/
-IUSE=doc +readline test
-KEYWORDS=~amd64 ~arm ~x86
-LICENSE=MIT
-RDEPEND=readline? ( sys-libs/readline:0= )
-SLOT=0
-SRC_URI=https://nim-lang.org/download/nim-0.16.0.tar.xz
-_md5_=cffbdda5cb22c7e19c45dc65d125911c
diff --git a/dev-lang/nim-0.17.0 b/dev-lang/nim-0.17.0
deleted file mode 100644
index 5e3af050bf98..000000000000
--- a/dev-lang/nim-0.17.0
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install test
-DEPEND=readline? ( sys-libs/readline:0= )
-DESCRIPTION=compiled, garbage-collected systems programming language
-EAPI=6
-HOMEPAGE=https://nim-lang.org/
-IUSE=doc +readline test
-KEYWORDS=~amd64 ~arm ~x86
-LICENSE=MIT
-RDEPEND=readline? ( sys-libs/readline:0= )
-SLOT=0
-SRC_URI=https://nim-lang.org/download/nim-0.17.0.tar.xz
-_md5_=9fe95de0454e5280171ce118e024ec8d
diff --git a/dev-lang/nim-0.17.2 b/dev-lang/nim-0.17.2
deleted file mode 100644
index 501fb074ef88..000000000000
--- a/dev-lang/nim-0.17.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install test
-DEPEND=readline? ( sys-libs/readline:0= )
-DESCRIPTION=compiled, garbage-collected systems programming language
-EAPI=6
-HOMEPAGE=https://nim-lang.org/
-IUSE=doc +readline test
-KEYWORDS=~amd64 ~arm ~x86
-LICENSE=MIT
-RDEPEND=readline? ( sys-libs/readline:0= )
-SLOT=0
-SRC_URI=https://nim-lang.org/download/nim-0.17.2.tar.xz
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=6275ef4dacc5f88efa0c7e76900b3216
diff --git a/dev-lang/nim-0.17.2-r1 b/dev-lang/nim-0.17.2-r1
deleted file mode 100644
index e4bde687df3b..000000000000
--- a/dev-lang/nim-0.17.2-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install test
-DEPEND=readline? ( sys-libs/readline:0= )
-DESCRIPTION=compiled, garbage-collected systems programming language
-EAPI=6
-HOMEPAGE=https://nim-lang.org/
-IUSE=doc +readline test
-KEYWORDS=~amd64 ~arm ~x86
-LICENSE=MIT
-RDEPEND=readline? ( sys-libs/readline:0= )
-SLOT=0
-SRC_URI=https://nim-lang.org/download/nim-0.17.2.tar.xz
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=51083b49d86718a507eacaab26e88fed
diff --git a/dev-lang/nim-0.18.0 b/dev-lang/nim-0.18.0
deleted file mode 100644
index 6f99e685b185..000000000000
--- a/dev-lang/nim-0.18.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install test
-DEPEND=test? ( net-libs/nodejs )
-DESCRIPTION=compiled, garbage-collected systems programming language
-EAPI=6
-HOMEPAGE=https://nim-lang.org/
-IUSE=doc +readline test
-KEYWORDS=~amd64 ~arm ~x86
-LICENSE=MIT
-RDEPEND=readline? ( sys-libs/readline:0= )
-RESTRICT=test
-SLOT=0
-SRC_URI=https://nim-lang.org/download/nim-0.18.0.tar.xz
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=26cd04847cd91b0865b6da8f8554ac36
diff --git a/dev-lang/nim/Manifest b/dev-lang/nim/Manifest
new file mode 100644
index 000000000000..6556174da07f
--- /dev/null
+++ b/dev-lang/nim/Manifest
@@ -0,0 +1,10 @@
+DIST nim-0.16.0.tar.xz 2907076 BLAKE2B 5f14bb2634da32deb810381edf817e3885382ffce0a35db0ae3faca818bb0f5646b1619609e971fbe93ef383f3c4060029bf51a12ef0b4df75ebf0dde12753b5 SHA512 6be1c00328b7e5bdaa9070e1cd0e3c6e1883c5bc1e44e9c574785f9bce93697f05753f598cf6fdaa6c5a66f08c2ad6f7afb8f6650fc3b1c8e461eb0cf80baabd
+DIST nim-0.17.0.tar.xz 25079320 BLAKE2B d01ade93ff299962aeea3dc9c90f0a8fe87acef8c2ee6d7d521d936c680aded0d8383221b7c11c3b2a8d6c28311c939456f271bbc90c1115acaae2c1987fa908 SHA512 90d709b39746fac5582b9df69d3eb9e3b7a39563a98f7a3002f00716b936e4e0d2be47d8b877878318692e6e2b85c08077dfcc20d9059573a1967402c244894b
+DIST nim-0.17.2.tar.xz 4083084 BLAKE2B c1a4134592bb6a57bfaf6174becb409e40075c77042964c639b39fe7b30f094bfc8d404d6e1e4e527a95333a8ee4597477f1052da1af58c3216042bb2f85c826 SHA512 7b4ed1eb1e9067ce72b76b95c43ec74eb38f04611776c174ba6a697254a9253fed61258712fb938f15e662bb3b0d36138194fc8fa89bbcb4d22888263e5e2880
+DIST nim-0.18.0.tar.xz 4412632 BLAKE2B f7286542daa4c3502f4edeb9d93e6a69169228a50248f1c5c02421cb8e70c0ab99bc84cc91b35a6227a4974345423eeb3b5ffecdb18e321b0a82eb8fd0879a16 SHA512 8f59cb4a8d44949cdd1154fb44df548005329da8255becf2f54083ce58323ff8d6cf7b2fdd86d4b1f446bd9f977e8eaf4b13c7ca6723da8a10c7b671954de772
+EBUILD nim-0.16.0.ebuild 1175 BLAKE2B fd12bb32d3aadc6631aabf7be51b1cc09eaaeeff9acb299b9be803833cd16760c2ec09e2b8338273ecad5b0205a999b3e53dfbd0f728b05ad2d8567b4556ac34 SHA512 c5c45529851e97f6420dc7e29486303c4902e0e95f9523d931252bca6dfa4f3c8b3a23b34fc64988d2474f677ad3b4d707cc1a8c71f591aa29343d5e7b414127
+EBUILD nim-0.17.0.ebuild 1144 BLAKE2B 0010e83ef4dd92447a0414098b06be1a66f07bb33b17f56a523239e78d2978b570843220211261ca83271238161feb1835fab89a480a31ad435a94ed9bde4934 SHA512 a9ccbf0dd0e1dc43fa7a1756d8400478cf70bf94e7a7b7a5a9c595543f541fd3fdaa563af5b2093cc5c2de32747658820bef7420924db94f5f9255890723fa7a
+EBUILD nim-0.17.2-r1.ebuild 1498 BLAKE2B 1416c3a761c9a1a6419e4ffb102d8dacba114800e4b115155491bedce3e4df7623bda95c49bd0eccdc092c8253848025a002126783109b2773c8da6720d2ecdf SHA512 54510a0b9a95be76a3b6a2a4badf77b26fdf3cf6438232a50ca021182db7f762960bb4119f26008f09cce2781cc113ba22e1a74fe390f546c26c3a28853d3733
+EBUILD nim-0.17.2.ebuild 1330 BLAKE2B 6cc7a6a783e3c51a57946ffbd2edf4986b8484378e3f3779f008b3c5d77032eed2b008dfa7c22aa2ab800426151f6b6d05239e15ae7b62e0e3b9133c7c038d36 SHA512 6d5639bac184c4b31e7c62366970b745f151c3853464666549e543c8ded6f02e8d3a559df5b7e3ef724cbe9e1952630a1f3fbadaa1bbd0ef6312ace4306fa9d4
+EBUILD nim-0.18.0.ebuild 1571 BLAKE2B d1210b325c5f1148ac26acb6c62129d410d7f2dd1a3275c03e8e9262fed06ff9c9a1b79b2b58baa5fa201e7eb9e4ce18f717e245ecd2a3bbf3af77ee71e31a98 SHA512 9de1bac7ad584e8e4c62ff98f2d2631d41a21997f5ce4715206e39af3f977354cd72d1f25e29de83fab5208e093c13a58b7d566c72f2b69d50f4c8071f1a5047
+MISC metadata.xml 328 BLAKE2B 9205920d8c9b12118456bd186f2e882b3e6f75b7cc3f766def1e79e2e4f7ac695370409ff1555e379516606568f181f4ba3625322f70e41bfffd21d319b0035f SHA512 bf02bc0a8c25d6e157b7ab1ef87c2eac3241d42bc4cf0632a159dcb5d429051018848be81d0cbce228124660ced8694f5de48d64fe10bc7ff5b536b7e7579e49
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-r1.ebuild b/dev-lang/nim/nim-0.17.2-r1.ebuild
new file mode 100644
index 000000000000..b5b88357cd22
--- /dev/null
+++ b/dev-lang/nim/nim-0.17.2-r1.ebuild
@@ -0,0 +1,65 @@
+# 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"
+ # build nimble and friends
+ PATH="./bin:$PATH" ./koch tools || die "koch tools 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() {
+ PATH="./bin:$PATH" ./koch install "${ED}/usr" || die "koch install failed"
+ rm -r "${ED}/usr/nim/doc" || die "failed to remove 'doc'"
+
+ dodir /usr/bin
+ exeinto /usr/nim/bin
+
+ local bin_exe
+ for bin_exe in bin/*; do
+ # './koch install' installs only 'nim' binary
+ # but not the rest
+ doexe "${bin_exe}"
+ dosym ../nim/"${bin_exe}" /usr/"${bin_exe}"
+ done
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ dodoc doc/*.html
+ fi
+
+ newbashcomp tools/nim.bash-completion ${PN}
+}
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..3942e4e7b582
--- /dev/null
+++ b/dev-lang/nim/nim-0.17.2.ebuild
@@ -0,0 +1,59 @@
+# 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"
+ PATH="./bin:$PATH" ./koch tools || die "koch tools 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 "${ED}/usr" || die "koch install failed"
+ rm -r "${ED}/usr/nim/doc" || die "failed to remove 'doc'"
+
+ dodir /usr/bin
+ local exe
+ for bin_exe in bin/*; do
+ dosym ../nim/${bin_exe} /usr/${bin_exe}
+ done
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ dodoc doc/*.html
+ fi
+
+ newbashcomp tools/nim.bash-completion ${PN}
+}
diff --git a/dev-lang/nim/nim-0.18.0.ebuild b/dev-lang/nim/nim-0.18.0.ebuild
new file mode 100644
index 000000000000..53766c3e8a09
--- /dev/null
+++ b/dev-lang/nim/nim-0.18.0.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit bash-completion-r1 multiprocessing
+
+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"
+
+RESTRICT=test # need to sort out depends and numerous failures
+
+RDEPEND="
+ readline? ( sys-libs/readline:0= )
+"
+DEPEND="
+ ${DEPEND}
+ test? ( net-libs/nodejs )
+"
+
+_run() {
+ echo "$@"
+ "$@" || die "'$*' failed"
+}
+
+nim_use_enable() {
+ [[ -z $2 ]] && die "usage: nim_use_enable <USE flag> <compiler flag>"
+ use $1 && echo "-d:$2"
+}
+
+src_compile() {
+ _run ./build.sh
+
+ _run ./bin/nim --parallelBuild:$(makeopts_jobs) c koch
+ _run ./koch boot --parallelBuild:$(makeopts_jobs) -d:release $(nim_use_enable readline useGnuReadline)
+ # build nimble and friends
+ PATH="./bin:$PATH" _run ./koch tools
+
+ if use doc; then
+ PATH="./bin:$PATH" _run ./koch web
+ fi
+}
+
+src_test() {
+ PATH="./bin:$PATH" _run ./koch test
+}
+
+src_install() {
+ PATH="./bin:$PATH" _run ./koch install "${ED}/usr"
+ rm -r "${ED}/usr/nim/doc" || die "failed to remove 'doc'"
+
+ dodir /usr/bin
+ exeinto /usr/nim/bin
+
+ local bin_exe
+ for bin_exe in bin/*; do
+ # './koch install' installs only 'nim' binary
+ # but not the rest
+ doexe "${bin_exe}"
+ dosym ../nim/"${bin_exe}" /usr/"${bin_exe}"
+ done
+
+ 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-2018.01 b/dev-lang/nqp-2018.01
deleted file mode 100644
index c9dc4991e7ea..000000000000
--- a/dev-lang/nqp-2018.01
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.01[clang=] ) clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) dev-lang/perl java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=Not Quite Perl, a Perl 6 bootstrapping compiler
-EAPI=5
-HOMEPAGE=https://rakudo.org
-IUSE=doc clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.01[clang=] ) java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://github.com/perl6/nqp/tarball/2018.01 -> nqp-2018.01.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf vcs-snapshot 3be1ab44131e8c0bbdaa75823008444b versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=532adf5ffe6981b68aba541620995321
diff --git a/dev-lang/nqp-2018.02 b/dev-lang/nqp-2018.02
deleted file mode 100644
index 0c89e9c7a56d..000000000000
--- a/dev-lang/nqp-2018.02
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.02[clang=] ) clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) dev-lang/perl java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=Not Quite Perl, a Perl 6 bootstrapping compiler
-EAPI=5
-HOMEPAGE=https://rakudo.org
-IUSE=doc clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.02[clang=] ) java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://github.com/perl6/nqp/tarball/2018.02 -> nqp-2018.02.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf vcs-snapshot 3be1ab44131e8c0bbdaa75823008444b versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=532adf5ffe6981b68aba541620995321
diff --git a/dev-lang/nqp-2018.03 b/dev-lang/nqp-2018.03
deleted file mode 100644
index f6117c5e5c16..000000000000
--- a/dev-lang/nqp-2018.03
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.03[clang=] ) clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) dev-lang/perl java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=Not Quite Perl, a Perl 6 bootstrapping compiler
-EAPI=5
-HOMEPAGE=https://rakudo.org
-IUSE=doc clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.03[clang=] ) java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://github.com/perl6/nqp/tarball/2018.03 -> nqp-2018.03.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf vcs-snapshot 3be1ab44131e8c0bbdaa75823008444b versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=532adf5ffe6981b68aba541620995321
diff --git a/dev-lang/nqp-2018.04 b/dev-lang/nqp-2018.04
deleted file mode 100644
index c33e488cfb3c..000000000000
--- a/dev-lang/nqp-2018.04
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.04[clang=] ) clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) dev-lang/perl java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=Not Quite Perl, a Perl 6 bootstrapping compiler
-EAPI=5
-HOMEPAGE=https://rakudo.org
-IUSE=doc clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.04[clang=] ) java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://github.com/perl6/nqp/tarball/2018.04 -> nqp-2018.04.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf vcs-snapshot 3be1ab44131e8c0bbdaa75823008444b versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=532adf5ffe6981b68aba541620995321
diff --git a/dev-lang/nqp-2018.04.1 b/dev-lang/nqp-2018.04.1
deleted file mode 100644
index 9fd03430e554..000000000000
--- a/dev-lang/nqp-2018.04.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.04.1[clang=] ) clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) dev-lang/perl java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=Not Quite Perl, a Perl 6 bootstrapping compiler
-EAPI=5
-HOMEPAGE=https://rakudo.org
-IUSE=doc clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.04.1[clang=] ) java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://github.com/perl6/nqp/tarball/2018.04.1 -> nqp-2018.04.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf vcs-snapshot 3be1ab44131e8c0bbdaa75823008444b versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=532adf5ffe6981b68aba541620995321
diff --git a/dev-lang/nqp-2018.05 b/dev-lang/nqp-2018.05
deleted file mode 100644
index 30db836fc411..000000000000
--- a/dev-lang/nqp-2018.05
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.05[clang=] ) clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) dev-lang/perl java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=Not Quite Perl, a Perl 6 bootstrapping compiler
-EAPI=6
-HOMEPAGE=https://rakudo.org
-IUSE=doc clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.05[clang=] ) java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://github.com/perl6/nqp/tarball/2018.05 -> nqp-2018.05.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf vcs-snapshot 3be1ab44131e8c0bbdaa75823008444b versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=540e2c28c3b6e7eaed3f4df7a4974a36
diff --git a/dev-lang/nqp-2018.06 b/dev-lang/nqp-2018.06
deleted file mode 100644
index 97ab801febbe..000000000000
--- a/dev-lang/nqp-2018.06
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.06[clang=] ) clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) dev-lang/perl java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=Not Quite Perl, a Perl 6 bootstrapping compiler
-EAPI=6
-HOMEPAGE=https://rakudo.org
-IUSE=doc clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-2018.06[clang=] ) java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://github.com/perl6/nqp/tarball/2018.06 -> nqp-2018.06.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf vcs-snapshot 3be1ab44131e8c0bbdaa75823008444b versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=540e2c28c3b6e7eaed3f4df7a4974a36
diff --git a/dev-lang/nqp-9999 b/dev-lang/nqp-9999
deleted file mode 100644
index 48327c6a5c84..000000000000
--- a/dev-lang/nqp-9999
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-9999[clang=] ) clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) dev-lang/perl java? ( >=dev-java/java-config-2.2.0-r3 ) >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=Not Quite Perl, a Perl 6 bootstrapping compiler
-EAPI=5
-HOMEPAGE=https://rakudo.org
-IUSE=doc clang java +moar test elibc_FreeBSD java
-LICENSE=Artistic-2
-RDEPEND=java? ( dev-java/asm:4 dev-java/jline:0 dev-java/jna:4 ) moar? ( ~dev-lang/moarvm-9999[clang=] ) java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc git-r3 8f6de46b0aa318aea0e8cac62ece098b java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=532adf5ffe6981b68aba541620995321
diff --git a/dev-lang/nqp/Manifest b/dev-lang/nqp/Manifest
new file mode 100644
index 000000000000..b20cd93e1410
--- /dev/null
+++ b/dev-lang/nqp/Manifest
@@ -0,0 +1,16 @@
+DIST nqp-2018.01.tar.gz 3798898 BLAKE2B 5dc492bc5561a674d3faabb63c881ad97bff3528bc3f8bd75caa7f2e78aa4464849f326c611936106c6f14ca56f4de5f4575407ab134d4218409829c22885b3a SHA512 0bfec280ed2c70bbf25b274632e830838526fef1e8f8c08387b1e79e1ef739dfaafe67dbab17eb24cf33c1b2aa984029dc0740fcc43e463e92f908dfb2360249
+DIST nqp-2018.02.tar.gz 3759551 BLAKE2B 48713a0d300ec2e296b426784bb22f785969371043046251868c23c1f5710291c4b524d9d2d37fa4634eb910ad817c01e52bc132b3609cb292ae13cdd418c9bd SHA512 57c63d76ac0e44f1017c1cbdc9c128107c46c5339d468e3cb6e909df440cca0f37d2050e909c5cf1b10be7f08a9f33485c762150e5456317a777b14d15216225
+DIST nqp-2018.03.tar.gz 3778268 BLAKE2B 16e8e3924daa3aecf9987e9c39173fb32a769cd668add4b62bf04feb09755e5442224357610189ae8184c8c5c6fa35b2ce0d29cb708e8c5c0218963e2f918022 SHA512 d90fc8c933c31f1013bfdda5a02699c1c668ed5466167d58355c6baa65c294269cb4dbe072452bd14a9bbf180d83e61fedd3354b4404d590304be04e28489460
+DIST nqp-2018.04.1.tar.gz 3783660 BLAKE2B b596163b4d4a8d4b708d59dba586713e50edf3d5d1dc400960464e9528cefbf9867508712b74ee7014f4ad0badb742ca483816c6efff5909c8c52bf48d5fa85a SHA512 01211c8535873f26f1eb144033bbee318948dfaf2988f9f737002e41ad745294a6fe193e15d997e7d9297fcd2632fc71f9c9a6960c3af7606946c23e49d284de
+DIST nqp-2018.04.tar.gz 3782652 BLAKE2B 0d36363956a3b150c5dbd7e9c094281680bfe2b87fa509e5a27ffc8be1df8ab82cd89276d9392c11b0912cf4d00d5a668dd6f497f4cfdf4914c40de2b0443c5c SHA512 5cb749577c5e985174c0721b92a00af7a93a5a7b3833718718b825d71d135ba14150b8a6bb065cf21356a37ea082431eacbff8ca63bce6f0ddeaf200494fe646
+DIST nqp-2018.05.tar.gz 3785860 BLAKE2B 058f29acf6a9a2f79677dcca7fd145a8bf4d780eb516a874bf128cca4c8916e7b13868a29189888a22b827656156039a2fadaca26865d8a609559ebab6cec5c7 SHA512 463e795a6893dc418d87a347672781f8424ae3484f2d5ab20fa75a4fb226c239175d10889783e3cbca83c4f8d317406afa858f725dbe7f9869277f9d1cbcd9f0
+DIST nqp-2018.06.tar.gz 3792244 BLAKE2B 95cfa80c83951e91b71e14162c4c5cd78a8f546ba601002836d2b3fe79325aa26b963d0bb58df70935546f6960f3797a3a7762187defcb6b7c5124a7205bb257 SHA512 312f203c51f3d58bbc474cd7263a118f3438efe230a56a30f38a688b4a57aac88a94a0e6630736066255c122bb001d748a76272f7f634be8ddda91cc3340574b
+EBUILD nqp-2018.01.ebuild 3607 BLAKE2B e7ccbd696d6dbe35b6a1c6ed99b1013aac46deb0631e6258a909144594fd143e760ca47dad422c9056686cc5dcdd07782847aa0a14da61d6b1577accf4997435 SHA512 76efc1ed63882e483414e49747c5d15524afdf39d45c5013189fbd9463aba177b3cae73c403480d6e81a65a436ce806e2c41204dffa2cbcc220fc58aa5cddac4
+EBUILD nqp-2018.02.ebuild 3607 BLAKE2B e7ccbd696d6dbe35b6a1c6ed99b1013aac46deb0631e6258a909144594fd143e760ca47dad422c9056686cc5dcdd07782847aa0a14da61d6b1577accf4997435 SHA512 76efc1ed63882e483414e49747c5d15524afdf39d45c5013189fbd9463aba177b3cae73c403480d6e81a65a436ce806e2c41204dffa2cbcc220fc58aa5cddac4
+EBUILD nqp-2018.03.ebuild 3607 BLAKE2B e7ccbd696d6dbe35b6a1c6ed99b1013aac46deb0631e6258a909144594fd143e760ca47dad422c9056686cc5dcdd07782847aa0a14da61d6b1577accf4997435 SHA512 76efc1ed63882e483414e49747c5d15524afdf39d45c5013189fbd9463aba177b3cae73c403480d6e81a65a436ce806e2c41204dffa2cbcc220fc58aa5cddac4
+EBUILD nqp-2018.04.1.ebuild 3607 BLAKE2B e7ccbd696d6dbe35b6a1c6ed99b1013aac46deb0631e6258a909144594fd143e760ca47dad422c9056686cc5dcdd07782847aa0a14da61d6b1577accf4997435 SHA512 76efc1ed63882e483414e49747c5d15524afdf39d45c5013189fbd9463aba177b3cae73c403480d6e81a65a436ce806e2c41204dffa2cbcc220fc58aa5cddac4
+EBUILD nqp-2018.04.ebuild 3607 BLAKE2B e7ccbd696d6dbe35b6a1c6ed99b1013aac46deb0631e6258a909144594fd143e760ca47dad422c9056686cc5dcdd07782847aa0a14da61d6b1577accf4997435 SHA512 76efc1ed63882e483414e49747c5d15524afdf39d45c5013189fbd9463aba177b3cae73c403480d6e81a65a436ce806e2c41204dffa2cbcc220fc58aa5cddac4
+EBUILD nqp-2018.05.ebuild 3607 BLAKE2B 187da0f139d742686c2e36efb8d219c865e116c976ef2eb3c399277fb2bd76b9e16116ecdbcd60854858197e584fc1f98463349395c66d629c23d1115572d62f SHA512 214d69640ce932f49c4b0c22871d96fda5eaf2ba2ef47247e142cf5958ad193058d3fd59761f2d51a3ac5f76d60e53df20cf7ae2f615d59d587d9727b77f7315
+EBUILD nqp-2018.06.ebuild 3607 BLAKE2B 187da0f139d742686c2e36efb8d219c865e116c976ef2eb3c399277fb2bd76b9e16116ecdbcd60854858197e584fc1f98463349395c66d629c23d1115572d62f SHA512 214d69640ce932f49c4b0c22871d96fda5eaf2ba2ef47247e142cf5958ad193058d3fd59761f2d51a3ac5f76d60e53df20cf7ae2f615d59d587d9727b77f7315
+EBUILD nqp-9999.ebuild 3607 BLAKE2B e7ccbd696d6dbe35b6a1c6ed99b1013aac46deb0631e6258a909144594fd143e760ca47dad422c9056686cc5dcdd07782847aa0a14da61d6b1577accf4997435 SHA512 76efc1ed63882e483414e49747c5d15524afdf39d45c5013189fbd9463aba177b3cae73c403480d6e81a65a436ce806e2c41204dffa2cbcc220fc58aa5cddac4
+MISC metadata.xml 634 BLAKE2B 1ef5daf7c995ddad1df4b2c7d33ecfc7a4cd146cb518314f88d58e370ede9e986bb47747b10952cf0ee6d587fe5925ba5b0086006182f3e16bd114d49e1a0f3a SHA512 a093877d22e76bbbced97c7752ed76d6aa110eb8d0676f97ae3d38ad79ab7b8ba770243b64e618b588faebf179713813fe6fc8ec7371c695c9f0979f6bce3dc0
diff --git a/dev-lang/nqp/metadata.xml b/dev-lang/nqp/metadata.xml
new file mode 100644
index 000000000000..c4bd99a587e8
--- /dev/null
+++ b/dev-lang/nqp/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</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-2018.01.ebuild b/dev-lang/nqp/nqp-2018.01.ebuild
new file mode 100644
index 000000000000..6adbdc268327
--- /dev/null
+++ b/dev-lang/nqp/nqp-2018.01.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2018 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="https://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-2018.02.ebuild b/dev-lang/nqp/nqp-2018.02.ebuild
new file mode 100644
index 000000000000..6adbdc268327
--- /dev/null
+++ b/dev-lang/nqp/nqp-2018.02.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2018 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="https://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-2018.03.ebuild b/dev-lang/nqp/nqp-2018.03.ebuild
new file mode 100644
index 000000000000..6adbdc268327
--- /dev/null
+++ b/dev-lang/nqp/nqp-2018.03.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2018 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="https://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-2018.04.1.ebuild b/dev-lang/nqp/nqp-2018.04.1.ebuild
new file mode 100644
index 000000000000..6adbdc268327
--- /dev/null
+++ b/dev-lang/nqp/nqp-2018.04.1.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2018 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="https://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-2018.04.ebuild b/dev-lang/nqp/nqp-2018.04.ebuild
new file mode 100644
index 000000000000..6adbdc268327
--- /dev/null
+++ b/dev-lang/nqp/nqp-2018.04.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2018 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="https://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-2018.05.ebuild b/dev-lang/nqp/nqp-2018.05.ebuild
new file mode 100644
index 000000000000..2600c72c270a
--- /dev/null
+++ b/dev-lang/nqp/nqp-2018.05.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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="https://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-2018.06.ebuild b/dev-lang/nqp/nqp-2018.06.ebuild
new file mode 100644
index 000000000000..2600c72c270a
--- /dev/null
+++ b/dev-lang/nqp/nqp-2018.06.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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="https://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-9999.ebuild b/dev-lang/nqp/nqp-9999.ebuild
new file mode 100644
index 000000000000..6adbdc268327
--- /dev/null
+++ b/dev-lang/nqp/nqp-9999.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2018 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="https://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-0.8.2 b/dev-lang/nwcc-0.8.2
deleted file mode 100644
index dd17256b2a8c..000000000000
--- a/dev-lang/nwcc-0.8.2
+++ /dev/null
@@ -1,9 +0,0 @@
-DEFINED_PHASES=configure
-DESCRIPTION=Nils Weller's C Compiler
-EAPI=5
-HOMEPAGE=http://nwcc.sourceforge.net/index.html
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD-2
-SLOT=0
-SRC_URI=http://downloads.sourceforge.net/project/nwcc/nwcc/nwcc%200.8.2/nwcc_0.8.2.tar.gz
-_md5_=391f8ab0abf826e537d5c2732e18935b
diff --git a/dev-lang/nwcc-0.8.3 b/dev-lang/nwcc-0.8.3
deleted file mode 100644
index c47a7cfeb895..000000000000
--- a/dev-lang/nwcc-0.8.3
+++ /dev/null
@@ -1,9 +0,0 @@
-DEFINED_PHASES=configure
-DESCRIPTION=Nils Weller's C Compiler
-EAPI=5
-HOMEPAGE=http://nwcc.sourceforge.net/index.html
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD-2
-SLOT=0
-SRC_URI=http://downloads.sourceforge.net/project/nwcc/nwcc/nwcc%200.8.3/nwcc_0.8.3.tar.gz
-_md5_=80d9285850a589173534cf9e30831170
diff --git a/dev-lang/nwcc/Manifest b/dev-lang/nwcc/Manifest
new file mode 100644
index 000000000000..dc5d02cbab7d
--- /dev/null
+++ b/dev-lang/nwcc/Manifest
@@ -0,0 +1,5 @@
+DIST nwcc_0.8.2.tar.gz 948656 BLAKE2B d7736f538009b2941bfbb7278b2905225a88d402d2c640568ab2d777572d2b5790383f9e629f0880cd509915ea1005b54d5a1d99a153b482c34904d8f58fa597 SHA512 b399baf16a41ae3782343521fc65b8e94bf76dc0a29719a3addc33881bd0d9dd68170f0e7eb2c79aaafa3ced254fac15847883a38d4a5956280fa5fed10d24e0
+DIST nwcc_0.8.3.tar.gz 954946 BLAKE2B 260ed49d247b7b84e392525db2b61e84a439eab2d0aad2efb93ddef1adf620084a8ec44713bd75216c2f9db30c04715b74d208d45465b700556bda2df6c6fd29 SHA512 f6af50bd18e13070b512bfac6659f49d10d3ad65ea2c4c5ca3f199c8b87540ec145c7dbbe97272f48903ca1c8afaf58c146ec763c851da0b352d5980746f94f6
+EBUILD nwcc-0.8.2.ebuild 519 BLAKE2B febc03cb4d7757210d1a6dd271a104c8209c6e46e58a11ee01b18be48d6541c99895dc27b59664407e1c1606fdd73f1f5031820855e45a586246e3e8876080d3 SHA512 05d71f5d22bbe575e71dc79dd2645acc6adea014528522a5eedd13c89d1518d7be985cdf62fd9d43b087618658b840cfc228e2e3cc4e49259f5e623e76a0fd9e
+EBUILD nwcc-0.8.3.ebuild 519 BLAKE2B b643d368b57894910b5f69a3f7a6e621774b03950433c2b20cf1e4161b293e670772f7ddf5e6b044a4778f92dca7269289c2a51c8db52186ce6a3f044a4470e8 SHA512 7679de83f3a7ab1b639f4e9df2a33d4d99e9c3b3302c4dc477188c246c694f62e66144442971d49a84cfa47fcb2bb416f39a611255ad4805f4626cadda9952ff
+MISC metadata.xml 321 BLAKE2B 2b3e32e0d994ba4483692d7da5a9a61edea07bb2825965cfed717d68351d896bfbeafe0142745a2c235667e605c52e1ae9c8d168e9f2d2414407a9153b33f7bf SHA512 ceb01fe0e057df4185588d4700fec480de1f44de27effe07ae1cd4a414667a6da2bf4586f17afa5601ecb6083d43753664b0a08fd4354a65a0ce55a23b620123
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-4.04.2-r1 b/dev-lang/ocaml-4.04.2-r1
deleted file mode 100644
index 6a14cf8bf70f..000000000000
--- a/dev-lang/ocaml-4.04.2-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=sys-libs/binutils-libs:= ncurses? ( sys-libs/ncurses:0= ) X? ( x11-libs/libX11 ) virtual/pkgconfig
-DESCRIPTION=Type-inferring functional programming language descended from the ML family
-EAPI=5
-HOMEPAGE=http://www.ocaml.org/
-IUSE=emacs flambda latex ncurses +ocamlopt X xemacs
-KEYWORDS=alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux
-LICENSE=QPL-1.0 LGPL-2
-PDEPEND=emacs? ( app-emacs/ocaml-mode ) xemacs? ( app-xemacs/ocaml )
-RDEPEND=sys-libs/binutils-libs:= ncurses? ( sys-libs/ncurses:0= ) X? ( x11-libs/libX11 )
-SLOT=0/4.04.2
-SRC_URI=https://github.com/ocaml/ocaml/archive/4.04.2.tar.gz -> ocaml-4.04.2.tar.gz mirror://gentoo/ocaml-patches-8.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=3af01f8f3d5bfc7445ec6e5957046c7b
diff --git a/dev-lang/ocaml-4.05.0-r1 b/dev-lang/ocaml-4.05.0-r1
deleted file mode 100644
index be3b1d93c6fb..000000000000
--- a/dev-lang/ocaml-4.05.0-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=sys-libs/binutils-libs:= ncurses? ( sys-libs/ncurses:0= ) spacetime? ( sys-libs/libunwind:= ) X? ( x11-libs/libX11 ) virtual/pkgconfig
-DESCRIPTION=Type-inferring functional programming language descended from the ML family
-EAPI=5
-HOMEPAGE=http://www.ocaml.org/
-IUSE=emacs flambda latex ncurses +ocamlopt spacetime X xemacs
-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
-LICENSE=QPL-1.0 LGPL-2
-PDEPEND=emacs? ( app-emacs/ocaml-mode ) xemacs? ( app-xemacs/ocaml )
-RDEPEND=sys-libs/binutils-libs:= ncurses? ( sys-libs/ncurses:0= ) spacetime? ( sys-libs/libunwind:= ) X? ( x11-libs/libX11 )
-SLOT=0/4.05.0
-SRC_URI=https://github.com/ocaml/ocaml/archive/4.05.0.tar.gz -> ocaml-4.05.0.tar.gz mirror://gentoo/ocaml-patches-9.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=04f22a55b968a78a9d1a337c5b5153cb
diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest
new file mode 100644
index 000000000000..2a32a1555bdd
--- /dev/null
+++ b/dev-lang/ocaml/Manifest
@@ -0,0 +1,9 @@
+AUX ocaml-rebuild.sh 1120 BLAKE2B 6f88a9f2b99fae7f89b884bb08d2c6ad6a0e14d4a8fd06d498037f78c5f6ef040428f9de224b5fe5df4ef64eaed419cda6d8715ea0c0a4c4dad60c5cf75a4147 SHA512 05a3e81e95533135d9895091c21621c73ae82851abd4889d64f035979eb25f8d90b60f469d7ef5e789fd1a4adffd6bbe255e6708c14c24a04f8a423507d19a40
+AUX ocaml.conf 177 BLAKE2B da070848d9e3a30ad303c296f55de87c30fd15feee3304ccc1d1f844d83c5a646664cd4d9958375ead2324e25bb88280fdb78f9e4230eeb8cd5825eed6f2f91d SHA512 4f0a48b8101b77d568d8d0a852f2a21fd46b7947c5d3f975ee4cd8a9c37c993d689cf5fb53b54a6b2740cb865051dc50c74c0c373eb697fca800ca143d401aa4
+DIST ocaml-4.04.2.tar.gz 4061873 BLAKE2B 756936592c7e0c87da27f154f07850eb3e4b2ed46ff3b36ff57541375840cd56b170dbe646ef6682f63d4e15ae209d3c125581803641f07403e9eb838c265519 SHA512 8b6a0319307cbb7451594d2f7c63851299d3e7d6ae7879e7525373304f9fd5a9b01d503ecd313a12a3cae24a4a7cb909f7aeebbb70efaa5277137189ea4558cb
+DIST ocaml-4.05.0.tar.gz 4431750 BLAKE2B c2ab003a13e0a581ebd0e1c96eeb8a9baea9bfe6bee08823b0e4541819201ec109f1846e13fc1aefa51a001eefbb8f73320ba854d41975fc68cef41bc75b1ecc SHA512 9a060ae4b741e1687277403e5bdb8f6eda2e2ebf6c45f7c0149b66ea1213cb26d13febfbb3f11c12543e244cfdd053b786b09c4145e2348e5d89a7206f7de225
+DIST ocaml-patches-8.tar.bz2 1803 BLAKE2B 5e76a198c2f5ca9f231d4e80499d784cf061ec79bf6b5e3aac917e1260d1f2b927f0f8015d39c01ce4fd481d32a5d211c31e081a7ab87ba1e7c7d5def95bc0fb SHA512 fc477fbb5bdec60a3c4d3dfa110119bb579560ac0e0e57e30e076da72643bda6359c06fd3745fd3436c5d611dbbd888ec2921e9d1920f4929df633c35a797411
+DIST ocaml-patches-9.tar.bz2 1700 BLAKE2B 4e46b8fb490db28f815414e285f54e251394ea53e1d25c529bbea9f03e426fd19132b1e2c7c2be7d14983fceb4cad073d191b001f6da522fee4226371d4a2eca SHA512 cc19f9104fac69aecc5effa8cb772342e1fb61cdcd38ba0176efe04cf3d710b1c56d5178748f3bd29099af91fa684da432a8ef8d42de76dbd1b6954a255ea6c0
+EBUILD ocaml-4.04.2-r1.ebuild 3508 BLAKE2B 1a46d48c5437f9222a0aaa68239cc970afa34e8d274c2c7877e435e83e2b0d4a15e98fec2d29b24d428a84c119e5ba7a4aa648389bd4b44bc74f7c3979497578 SHA512 323393773b5d46690ecc34751a49106f1279f8547bce2ef4407030c775adbc249af1d318f0e706f243a21d32d3e42c9b6204a2934e80d615993fc9021ee3e63c
+EBUILD ocaml-4.05.0-r1.ebuild 3666 BLAKE2B c33c87456eda6f6e99dcba1b84708af9af3463d49b66f9a821f7c1b7abebccf279a3395635337fb8f8a70b6bc3a1d5682756c06bd478e270f62790730cac13f3 SHA512 319937b266bfa2a3afdc4fca7ef3db16a32bf2fa1d817ffe0913acd4ab879b067b1145071183f0574586a83728a7f0cc3b4b89f6fe5b7761b4313fdbf2b12df5
+MISC metadata.xml 685 BLAKE2B 3a75f4190c512c50dcfb570cf75c99c93b4bebf11b6d030b56e6f8d6839b94f2c8ee3da87425721b7554e86c0ac4e56ce3281af1702149e852c9592599e48434 SHA512 d57c80b4921393738ff8d58ca7bef5638b7ac7a21cfdef6c1d61c46ef576426afe2dcbf7341fda1ba5ea77b3ebdd1cb299e94a245577d9d990a536f10efeaf68
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..cb5669927300
--- /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-r1.ebuild b/dev-lang/ocaml/ocaml-4.04.2-r1.ebuild
new file mode 100644
index 000000000000..27b31db0df9f
--- /dev/null
+++ b/dev-lang/ocaml/ocaml-4.04.2-r1.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 )"
+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-r1.ebuild b/dev-lang/ocaml/ocaml-4.05.0-r1.ebuild
new file mode 100644
index 000000000000..078795d80000
--- /dev/null
+++ b/dev-lang/ocaml/ocaml-4.05.0-r1.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 )"
+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/open-cobol-1.1 b/dev-lang/open-cobol-1.1
deleted file mode 100644
index ad0b1e8afc16..000000000000
--- a/dev-lang/open-cobol-1.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install
-DEPEND=dev-libs/gmp berkdb? ( =sys-libs/db-4* ) sys-libs/ncurses readline? ( sys-libs/readline ) sys-devel/libtool
-DESCRIPTION=an open-source COBOL compiler
-EAPI=0
-HOMEPAGE=http://www.opencobol.org/
-IUSE=berkdb nls readline
-KEYWORDS=~amd64 ~ppc ~x86
-LICENSE=GPL-2 LGPL-2.1
-RDEPEND=dev-libs/gmp berkdb? ( =sys-libs/db-4* ) sys-libs/ncurses readline? ( sys-libs/readline )
-SLOT=0
-SRC_URI=mirror://sourceforge/open-cobol/open-cobol-1.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0b0bb397f97e26488974f7559e1b1060
diff --git a/dev-lang/open-cobol/Manifest b/dev-lang/open-cobol/Manifest
new file mode 100644
index 000000000000..ab6dd84ea710
--- /dev/null
+++ b/dev-lang/open-cobol/Manifest
@@ -0,0 +1,3 @@
+DIST open-cobol-1.1.tar.gz 1007791 BLAKE2B 9154590626d885a75043c2426c1fafb146e0f7213d05f353f6d01c0e6b8cd8073e12f454a19ae1d3c712606f1c15958f241a7c54f76c995d0ce396d1eba1a0b0 SHA512 eb06cec456425ba5f4a091ae4ac0bfd14f38549bc147c606a022804f602102df6dbf0d399614f0eda49d50dee17eef55087748853a8cc8bdd1248f94fd09110c
+EBUILD open-cobol-1.1.ebuild 764 BLAKE2B 2e6bb281b63af5a52831fcf5c965c217d7f1a610db0b00dd2ab97b88fd698ad0a4c33b1429c4a6e110f9be8489e6d66b24203961a4f47bf2032221fabc544297 SHA512 d22aea765623903269f263d0cec017cfbe4ada3fb5be42b93deeef0666f9a0cc233913ff533ee699c565488fd36d09f637834af523e0df41bdb4681098c110db
+MISC metadata.xml 327 BLAKE2B ed14fa0be405952fbfef1cdf2b18aa7ca5f627c41fd10d98ce29218d77de5e3475ccc410a49b1443d8145c013ffcdcbd6bdd0b33e8f9416c6bbccd12217a0baa SHA512 955b474d83164c7c8f0259d0b644b2c2805112bd57415f6618f0c96bc87551c5bd1adb9c3de9d571e7f1cb1090c7c96b4197f82fc55ce61a28d273b67bccc518
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..a34d440d937b
--- /dev/null
+++ b/dev-lang/open-cobol/open-cobol-1.1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+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-2013.1-r1 b/dev-lang/opendylan-2013.1-r1
deleted file mode 100644
index 4b79bbc06f8d..000000000000
--- a/dev-lang/opendylan-2013.1-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare
-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 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=OpenDylan language runtime environment
-EAPI=4
-HOMEPAGE=http://opendylan.org
-KEYWORDS=~amd64 ~x86
-LICENSE=Opendylan
-RDEPEND=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 )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://opendylan.org/downloads/opendylan/2013.1/opendylan-2013.1-sources.tar.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=0bde578f6538c01ef8f34b45e51a3ac0
diff --git a/dev-lang/opendylan-2013.2 b/dev-lang/opendylan-2013.2
deleted file mode 100644
index e5f749c453c5..000000000000
--- a/dev-lang/opendylan-2013.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare
-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 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=OpenDylan language runtime environment
-EAPI=4
-HOMEPAGE=http://opendylan.org
-KEYWORDS=~amd64 ~x86
-LICENSE=Opendylan
-RDEPEND=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 )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-sources.tar.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=d7dfb69362b61130d44c6dd7491b6d4a
diff --git a/dev-lang/opendylan-2014.1 b/dev-lang/opendylan-2014.1
deleted file mode 100644
index 0ca06649c774..000000000000
--- a/dev-lang/opendylan-2014.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare
-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 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=OpenDylan language runtime environment
-EAPI=4
-HOMEPAGE=http://opendylan.org
-KEYWORDS=~amd64 ~x86
-LICENSE=Opendylan
-RDEPEND=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 )
-RESTRICT=test
-SLOT=0
-SRC_URI=http://opendylan.org/downloads/opendylan/2014.1/opendylan-2014.1-sources.tar.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=681e60b7b41a9690437a657b7505d02d
diff --git a/dev-lang/opendylan-9999 b/dev-lang/opendylan-9999
deleted file mode 100644
index 31f3cf88e9b4..000000000000
--- a/dev-lang/opendylan-9999
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install prepare unpack
-DEPEND=dev-libs/boehm-gc[threads] dev-lang/perl dev-perl/XML-Parser || ( dev-lang/opendylan-bin dev-lang/opendylan ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=OpenDylan language runtime environment
-EAPI=4
-HOMEPAGE=http://opendylan.org
-LICENSE=Opendylan
-RDEPEND=dev-libs/boehm-gc[threads] dev-lang/perl dev-perl/XML-Parser || ( dev-lang/opendylan-bin dev-lang/opendylan )
-RESTRICT=test
-SLOT=0
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 git-r3 8f6de46b0aa318aea0e8cac62ece098b libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=042fa5d018b2180e0e820ca0ae52659d
diff --git a/dev-lang/opendylan-bin-2011.1 b/dev-lang/opendylan-bin-2011.1
deleted file mode 100644
index c0aac2e40570..000000000000
--- a/dev-lang/opendylan-bin-2011.1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install
-DEPEND=dev-libs/boehm-gc
-DESCRIPTION=OpenDylan language runtime environment (prebuilt)
-EAPI=4
-HOMEPAGE=http://opendylan.org
-KEYWORDS=~x86 ~amd64
-LICENSE=Opendylan
-RDEPEND=dev-libs/boehm-gc
-SLOT=0
-SRC_URI=amd64? ( http://opendylan.org/downloads/opendylan/2011.1/opendylan-2011.1-x86_64-linux.tar.bz2 ) x86? ( http://opendylan.org/downloads/opendylan/2011.1/opendylan-2011.1-x86-linux.tar.bz2 )
-_md5_=106cbd573cbb0e715244644d58f96e9a
diff --git a/dev-lang/opendylan-bin-2012.1 b/dev-lang/opendylan-bin-2012.1
deleted file mode 100644
index d50ca0adc81c..000000000000
--- a/dev-lang/opendylan-bin-2012.1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install
-DEPEND=dev-libs/boehm-gc
-DESCRIPTION=OpenDylan language runtime environment (prebuilt)
-EAPI=4
-HOMEPAGE=http://opendylan.org
-KEYWORDS=~x86 ~amd64
-LICENSE=Opendylan
-RDEPEND=dev-libs/boehm-gc
-SLOT=0
-SRC_URI=amd64? ( http://opendylan.org/downloads/opendylan/2012.1/opendylan-2012.1-x86_64-linux.tar.bz2 ) x86? ( http://opendylan.org/downloads/opendylan/2012.1/opendylan-2012.1-x86-linux.tar.bz2 )
-_md5_=68f369ffab467559d149af61a9c91f4a
diff --git a/dev-lang/opendylan-bin-2013.1 b/dev-lang/opendylan-bin-2013.1
deleted file mode 100644
index b03fd1c8bd76..000000000000
--- a/dev-lang/opendylan-bin-2013.1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install
-DEPEND=dev-libs/boehm-gc
-DESCRIPTION=OpenDylan language runtime environment (prebuilt)
-EAPI=4
-HOMEPAGE=http://opendylan.org
-KEYWORDS=~x86 ~amd64
-LICENSE=Opendylan
-RDEPEND=dev-libs/boehm-gc
-SLOT=0
-SRC_URI=amd64? ( http://opendylan.org/downloads/opendylan/2013.1/opendylan-2013.1-x86_64-linux.tar.bz2 ) x86? ( http://opendylan.org/downloads/opendylan/2013.1/opendylan-2013.1-x86-linux.tar.bz2 )
-_md5_=ab194ea37182c8e54f00b7212434af83
diff --git a/dev-lang/opendylan-bin-2013.2 b/dev-lang/opendylan-bin-2013.2
deleted file mode 100644
index b53b7567ee3b..000000000000
--- a/dev-lang/opendylan-bin-2013.2
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install
-DEPEND=dev-libs/boehm-gc
-DESCRIPTION=OpenDylan language runtime environment (prebuilt)
-EAPI=4
-HOMEPAGE=http://opendylan.org
-KEYWORDS=~x86 ~amd64
-LICENSE=Opendylan
-RDEPEND=dev-libs/boehm-gc
-SLOT=0
-SRC_URI=amd64? ( http://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86_64-linux.tar.bz2 ) x86? ( http://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86-linux.tar.bz2 )
-_md5_=d44d7ae8afc6ad85036d4aea7ba28c41
diff --git a/dev-lang/opendylan-bin-2014.1 b/dev-lang/opendylan-bin-2014.1
deleted file mode 100644
index 3af484fd5c37..000000000000
--- a/dev-lang/opendylan-bin-2014.1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install
-DEPEND=dev-libs/boehm-gc
-DESCRIPTION=OpenDylan language runtime environment (prebuilt)
-EAPI=5
-HOMEPAGE=http://opendylan.org
-KEYWORDS=~x86 ~amd64
-LICENSE=Opendylan
-RDEPEND=dev-libs/boehm-gc
-SLOT=0
-SRC_URI=amd64? ( http://opendylan.org/downloads/opendylan/2014.1/opendylan-2014.1-x86_64-linux.tar.bz2 ) x86? ( http://opendylan.org/downloads/opendylan/2014.1/opendylan-2014.1-x86-linux.tar.bz2 )
-_md5_=40b1c9d80898167d058295c474ea3644
diff --git a/dev-lang/opendylan-bin/Manifest b/dev-lang/opendylan-bin/Manifest
new file mode 100644
index 000000000000..88e04563609a
--- /dev/null
+++ b/dev-lang/opendylan-bin/Manifest
@@ -0,0 +1,16 @@
+DIST opendylan-2011.1-x86-linux.tar.bz2 31908698 BLAKE2B 8373c5cd88ddf44ae754c537427b308a0a6e639b07c883f8d357a62b1f8635cd99328d3abdc71b79f7af0271248db768c385bc7cecc3c686e0e5d6fbee9f8b6d SHA512 345d97d71e34fd7cd923c9f53b65cb33d7edab4f2d946fd7cf9430df63cafc361ff854d444edde9d40c94bc16a3899979a34346a9ca60b9fd20e2745ff27a33b
+DIST opendylan-2011.1-x86_64-linux.tar.bz2 36493244 BLAKE2B 669e874649dcb664ae064dc2079856f1670507599af9738653c46a68d72be9aff9541f5a20dac1450bfebae928d9560c64de6a5c15d98d87a70b7842a2d3e611 SHA512 4241df29a762c73262ab7856aa2e7dc1b302719cf96de3a5d4878e5d7c5e15308d89b5c82d6379fb48b6badad03027427c013f27c690b6d8a372628ce81cda91
+DIST opendylan-2012.1-x86-linux.tar.bz2 32874377 BLAKE2B 52b1b0ec84e1fd4918b0ae9058bee23511b66ddc267f927f989127a0a0c37ee79bebcd7f817cc7f4fd06e986f5c3bbd61a78198173f08409b91c8c39d61ecd36 SHA512 3ba1744e3dc62ab8ede681f7317ebfb3ec80bb35dd10f8c0f24fe2f77abb86157a939a69f7585a88f82233563388014cc2a686d8e2cd15c73d314d496356cb69
+DIST opendylan-2012.1-x86_64-linux.tar.bz2 47535071 BLAKE2B f9806113e117cf544456001ea9e69e382d59131c555cab662c78c5a2a1bb786997633da7a2067f505c8ea964da0efc49344b3cdbbd52f80821255dde5d8da156 SHA512 53b36b9ec1eff40bb9572f8a9118d18ba6674798c053678abf326d947a9e8d5dc51e2d89e9fa9dc58dd61f0c83e5d3cab4acec2af2968edbe196b8c7fe9599dc
+DIST opendylan-2013.1-x86-linux.tar.bz2 32974920 BLAKE2B 18c2d3a4aee44ea943c15a622eca21103ca235133437037dd5cef8a05457095ea70b3121f83145fd96b91ff0bfcb177efb9cc4865559c743eeeb5efb25d32fe6 SHA512 a3b78c2c78cb0fe73a7a7d3bf13c28d9a44d451ace6c5fc9c18e67a1ed04afbb1dab1a2679279bec4fe4de7d68afc6e8fba051de5b9f26b472ee42393ed1547d
+DIST opendylan-2013.1-x86_64-linux.tar.bz2 47675706 BLAKE2B 990cf5b240393204c82f52997359e32446729be67f0d4342e630fdcd1c7f768990476fec83fd79dc48b20d84baff606bf3d8028ed8025740f80032280f892f32 SHA512 f60dc7ee49f382375843d5887956541362461350acbd75f2e3af82887ef1bc2a5373f8db5cf0838aa627223036eb36558d3484b03f7128abbab030fc3cc717f5
+DIST opendylan-2013.2-x86-linux.tar.bz2 32953359 BLAKE2B c482cbf7498120b789e7216ca682d6d60d5a0c74746fffe5a27b59d9d51b877960e7658d7e8d3af7ba4128573b645ba901e9de1a45c76f29985a86a6fff0bb8d SHA512 e54ac273e6ca257df260efea9b680a99b53c01521b01afc6612902becc3e5a119dd3b0872124c098444d1a00ae1b436f186999ef04bf4efca484ebd9c70be346
+DIST opendylan-2013.2-x86_64-linux.tar.bz2 48471480 BLAKE2B 49dd5cd1f8e0756031933aaf595ca0b7a2525e58cd67952ddaf50ef9ae83e971655479fea3e47f5c10ba610253b8945b6f0e25219dbeff05d27687881d07559c SHA512 cac4205e47bee41dfa99cf059897025a60942fb0e73c970f26fffba7c77ceebcd789e0acb110ad636d6b8ebac947632e9d28e8d0887e4d4b7be2bc2791c1eeac
+DIST opendylan-2014.1-x86-linux.tar.bz2 42086000 BLAKE2B 7c56962867348f8ec4de74bf37a52ebe0dd0b7aaab242217e660599667b5fbb498e83b14b21dec2622c1dbc7437edb434105105127da37e63917fce17d3a1829 SHA512 8411db8cf56b6b4dad11d29ab49f3d9d21d93b05af2c45a5fee0cea1a56eb471b40cb6cbd622f1db995284c499a1c5a5b7d509e31ae6f4f4afe1595a2f4aab79
+DIST opendylan-2014.1-x86_64-linux.tar.bz2 49625384 BLAKE2B a2fdf67efe41c0f91e071b83bb03c214bb596cba1e051a4014677c822f9d34a4d3efea21c3e8cb230b065c75e8ae040e157f5d1ecc48a0531fb152852ed6948d SHA512 4d88ab8c6916e82465d846b32a86da0ec654d40a2a1310a7b05897d9bfa325c839713f46f62081b968793b3713a61cb74158c405cb724fa5fdf4c97596e1c6bf
+EBUILD opendylan-bin-2011.1.ebuild 926 BLAKE2B 3f8b473d6f557962469672475240fc5d9d982f3f83cd4429e358e562842de638ea5dd08e1372c1cd4c2148f2435cf3bc8850bd9298307148a56a9a8dff7be965 SHA512 8ce68c1fd3638783c4478cd17abb4efa1e984a9d0679a9e69fd974ad7cb6de908481004064b57cff656176e6e2412c3173df21687c305e920c393d3f8bb4f5cb
+EBUILD opendylan-bin-2012.1.ebuild 926 BLAKE2B 301a0c9f81279725c83fc2456fba7159f3a7849da760c2e58556d2055bcf96029977df6b3ac9806d14747b5f504e98154c441574b7115bc8d6d7789702e85c17 SHA512 017254e4a8366fdb5e6a659759849cd62978f4c9dcdee59864210f86d96a972a7a14d7a8d650a9745a7d802c7d6417d25cb354f153240505fbec6639567123d4
+EBUILD opendylan-bin-2013.1.ebuild 926 BLAKE2B 28e5b976005508b925b5e20bb5ce82909b43840a3d37a60d6c28d1df98f5a75df8ec9fdb0273df9bf1932a3da1342a17dded7bbd36b3acc0e194d27a382f4663 SHA512 7da5b4e5b7710e80ef7f3fd3c2c350598a24f8b4942d60390781ccd2311ed8a04e329463737ef69efe9ae55d67aa33e5fe9fda5b53b8d7e399f27b1a5450089f
+EBUILD opendylan-bin-2013.2.ebuild 926 BLAKE2B ac665a2988d4e63ce7825cfcf744648130ecd7ffb450d481e8ff1d1bd6c0a667b8be5f591012a3b37499a779bcc5650617c6456dc8eec99f3558d03d9a7ad883 SHA512 ed47276b2d01199d27b407390a11d0815e601ee54f8d4bebdad7d2702c239acff6eb62f63712293e6c5de6e82fda92d4a179dc4fa11f498cb884890cc6ade75c
+EBUILD opendylan-bin-2014.1.ebuild 925 BLAKE2B 1b65b8a33d4e1ea79d40ad53aa01c53e201d6b4e4dc79f33091cdecca668e67a5c8b522e3335b0b35b910d3fadbe3cc372f818604e83419987283c16f4698fae SHA512 ace8f94560d7f9b8a788411b0436052473a6232b7eec1a19c8dab8eb66868d3fb67027239d5113a58353548e84ab84505cbc17e23853df82c820383a8fd5e771
+MISC metadata.xml 247 BLAKE2B 5a20af3c9732ef7dba68131a08988652f5c93a6d186a82c4deb1bb9c06dc3ae73152a0d241cc346637f7b11caf4676da43301ba596c67b66669535e71db0b03e SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7
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..4c4230783fa7
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2011.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 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..6a3871016bdc
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2012.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 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..2b6ea1a6a53f
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2013.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 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..958ffac2c622
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2013.2.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 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..98c52ea1d176
--- /dev/null
+++ b/dev-lang/opendylan-bin/opendylan-bin-2014.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2017 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..0307ade6579a
--- /dev/null
+++ b/dev-lang/opendylan/Manifest
@@ -0,0 +1,8 @@
+DIST opendylan-2013.1-sources.tar.bz2 8441356 BLAKE2B 5dad47af5ccd5bb760c8fd0e83faf6442f43b47c985731cd3b2fae5644f5dbc96150050f3fa19110391ae36bbd1a68d0e51ae6d5ac95407c38a3fcfebf8425cf SHA512 f5168bb9a4d2bcd372667406f2f07ed5972f3e773a5766c5f74421d6ffd10901a43cf9d6604ad2ae14d80f1b84e856f4fdca3e1546a87053939f470005a87a2f
+DIST opendylan-2013.2-sources.tar.bz2 9174284 BLAKE2B 124af65a76c3f795a90f8220ca499fa822e329e33be2b322d63b77a82880e18b3b665968a726ecbfa1888c29b62b9a11f3a568b222ef18dfab38c3ae05bfdf23 SHA512 f846a1d80f78b887815d2f2983314dbf6b5f424164dba9bc6ac456b40f31ab02aeb073a447df8f02b3fad6bcf6401a889abaac400d58db8e0adebcdd4e177a4d
+DIST opendylan-2014.1-sources.tar.bz2 8232321 BLAKE2B 45535287a2d85617e0461da4dfcd93f1f95249a7c191732624129174c6696411b3cf2a3cd85bb9eaa26c3723689d1ebfbb812fabb3a8d3e2ac5cfd7f4ee284f9 SHA512 576616cad0eb6ff8606a394834ad325858a5f45a8427adb0eefc9ebf883ab1522ec66dff6e591a367390d49f53acd160becad62679edc610ccfe63c9a3795cfc
+EBUILD opendylan-2013.1-r1.ebuild 3134 BLAKE2B daa16cbbb22298af7c147095211c1db8a895460148e9d8f66994cce0b2a1191f31b407add5393773c56b9dc2af4247eaf97c698677a9e4b3cc089df30b41acc9 SHA512 c5e8090a98c92f01dd1baabc595052b050776d1cbe4929fb57fbc4c078dc909490ebd8c453013f69a5fd9a26c23afdb39377d56926f8e7efbaf27fb4f4d84518
+EBUILD opendylan-2013.2.ebuild 3353 BLAKE2B c3c3538152e0f2f58b72de048a43c63c31858ee7d6846c0b9306ca8dd1a51a3c26181d4a7e4f8f569f8e3d394b2dc55861159f781a81d2750dd2700ee05b5ca9 SHA512 6035830ee8942c6fef5f108a8203a4c8f903649b6edf22d9fce89f098ee4b332028ea3ae6d7739c47c9dabdc260f3dcdba3efecc8e8277e9a1e8cd6fe79e51d9
+EBUILD opendylan-2014.1.ebuild 3236 BLAKE2B 3f6ee07317fb1b645622eaa4503d61e7282a5a4a3231bf70c22937bf0962f913c977b6c5cdd67540647e9fbb2ac43f2820c324f60558c679cec0ed0da93001a5 SHA512 1f49e3451149082ada499fbc6b80151fc274bc7e5d67d7d25873e49ded1f680ccb1c6801fee016cc4ebe7a3eab5f9cd0ec888d1833bd6c081f11bf2e39cc9133
+EBUILD opendylan-9999.ebuild 1762 BLAKE2B 92cef00a14283754455e654070b4cc4be0aff130eac8a8efb5eb0e7a0918162931894bc24740971a547e0814cd9b08d85d27c3b91c3594da0c3ea457a4cf583c SHA512 28a64050061d831746aae3a327ec1946fa05bd0cfb4345f79d14af677710f8768e3c683bc86c9057f38a18500e036cc266207e714cb44faf3cf423534bcf46f1
+MISC metadata.xml 247 BLAKE2B 5a20af3c9732ef7dba68131a08988652f5c93a6d186a82c4deb1bb9c06dc3ae73152a0d241cc346637f7b11caf4676da43301ba596c67b66669535e71db0b03e SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7
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..a5a3a00fc97d
--- /dev/null
+++ b/dev-lang/opendylan/opendylan-2013.1-r1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools
+
+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=""
+RESTRICT="test"
+
+# 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..1d752a9bd300
--- /dev/null
+++ b/dev-lang/opendylan/opendylan-2013.2.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools toolchain-funcs
+
+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=""
+RESTRICT="test"
+
+# 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..6bced74464e6
--- /dev/null
+++ b/dev-lang/opendylan/opendylan-2014.1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools toolchain-funcs
+
+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=""
+RESTRICT="test"
+
+# 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..6315b304da3b
--- /dev/null
+++ b/dev-lang/opendylan/opendylan-9999.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+EGIT_SUBMODULES=( '*' )
+EGIT_REPO_URI="https://github.com/dylan-lang/opendylan.git"
+
+inherit autotools git-r3
+
+DESCRIPTION="OpenDylan language runtime environment"
+HOMEPAGE="http://opendylan.org"
+
+LICENSE="Opendylan"
+SLOT="0"
+IUSE=""
+RESTRICT="test"
+
+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-0.4.27 b/dev-lang/orc-0.4.27
deleted file mode 100644
index e73f50e02fae..000000000000
--- a/dev-lang/orc-0.4.27
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare test
-DEPEND=app-arch/xz-utils >=dev-util/gtk-doc-am-1.12
-DESCRIPTION=The Oil Runtime Compiler, a just-in-time compiler for array operations
-EAPI=6
-HOMEPAGE=https://gstreamer.freedesktop.org/
-IUSE=examples pax_kernel static-libs abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-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
-LICENSE=BSD BSD-2
-SLOT=0
-SRC_URI=https://gstreamer.freedesktop.org/src/orc/orc-0.4.27.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=26f34c9bdaa1d9bf3580681fd1d64446
diff --git a/dev-lang/orc-0.4.28-r1 b/dev-lang/orc-0.4.28-r1
deleted file mode 100644
index 4e3c5b715b9b..000000000000
--- a/dev-lang/orc-0.4.28-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare test
-DEPEND=app-arch/xz-utils >=dev-util/gtk-doc-am-1.12
-DESCRIPTION=The Oil Runtime Compiler, a just-in-time compiler for array operations
-EAPI=6
-HOMEPAGE=https://gstreamer.freedesktop.org/
-IUSE=examples pax_kernel static-libs abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-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
-LICENSE=BSD BSD-2
-SLOT=0
-SRC_URI=https://gstreamer.freedesktop.org/src/orc/orc-0.4.28.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=bb71f690df119ceedd2146b603d3d582
diff --git a/dev-lang/orc/Manifest b/dev-lang/orc/Manifest
new file mode 100644
index 000000000000..0c2142cc1698
--- /dev/null
+++ b/dev-lang/orc/Manifest
@@ -0,0 +1,5 @@
+DIST orc-0.4.27.tar.xz 465116 BLAKE2B 1289867c84371797350847e1ae71a002ec250abc56611fe6ec8d263ff64e17ed8d990f45adfbf6d1a0c7e98c2e6ec30c3135e433f00e9fa53cecce359f5b2d72 SHA512 5ca0b4553e370ea7c95acfc8248d9d568dafc9577041d47f52c7d0945456c534e18e0e80d28df9301d6deac1ea4f8ea6a51ca373b32927c8724846d8ec1f73e8
+DIST orc-0.4.28.tar.xz 469460 BLAKE2B 86fa2d10a33fbffbb2b96827adbddaa81d0baa8135fe21fba338cbcd25a1c1e853873ec1c4ef5c0a32d66ba95f855f1f16ddbc32f68a89e5a98c75b9b0261aa7 SHA512 2ae3100e7d0c03eba9a8a10a8924da4d729e1967b63e5dfdf88c4aee907d7ece82c782d74f4cb7e28a366dd74ce5e1ddc6e2b971e5a2f879b0501cc313b93410
+EBUILD orc-0.4.27.ebuild 1832 BLAKE2B e0e0f1df95102719f9f079efdb27760192acb8b3b27232a27984cef94bf03587d16424234d368583200f9e6e4183f7068cd322b55d3d9d559d57d87c5b00d438 SHA512 3a66189a789f995069dc8869fb33846306f4a0e5ff3419bae1e921c26b1187615e17ca6c6f4647eed8e4fc0ab4f5e03a6df0a3dfe762a9090aa409912cfe4497
+EBUILD orc-0.4.28-r1.ebuild 2193 BLAKE2B bac3f7d982f8b488c4668963bcd98cf5d079792c7814e28681072f909da2ebcf553243b206bacff7d777c859d787f5eeaeb8017fbe206066dc3352845f73c705 SHA512 5c975b44e2e2933eb5945336dffbc8ec06f9f0ef65ef89af61ea188bc7029273f8b5ab70b3c2559ea9712c1b5bfcc4878bda2853a5c9f72cdd5a3e1c5681fd03
+MISC metadata.xml 354 BLAKE2B b24bce431d7ad10e9231e89b522e67de16192ee4e48281b8a17f002692632449ab676cb9df6ff5a22563d6f9657ee6be11e452bac41f8a537c598822efab85d1 SHA512 4f17c4c3faa3f2c5feaefe4727b3500360f7cc5486c794e9a34608c3e437b4e2cc266bc9e0e2b3824952a8da62421fda59e9bc5140ee88898f8f7bdde402762f
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.27.ebuild b/dev-lang/orc/orc-0.4.27.ebuild
new file mode 100644
index 000000000000..abf52976ec57
--- /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/orc/orc-0.4.28-r1.ebuild b/dev-lang/orc/orc-0.4.28-r1.ebuild
new file mode 100644
index 000000000000..f3c0d8f6779d
--- /dev/null
+++ b/dev-lang/orc/orc-0.4.28-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2018 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
+"
+
+DOCS=( README RELEASE )
+
+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? What about cross-compiling for the other arches?
+ ECONF_SOURCE="${S}" econf \
+ --disable-gtk-doc \
+ --enable-backend=all \
+ $(use_enable static-libs static)
+ # TODO: bug #645232 - Not ready for this yet, as it installs some headers to live and gst-plugins-base:0.10 includes some
+ # Additionally it doesn't seem good that FEATURES=test would change what files are installed (headers + orctest.so + orc-bugreport)
+ # $(use_enable test tests)
+}
+
+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-7.1.0 b/dev-lang/parrot-7.1.0
deleted file mode 100644
index a50695b66c08..000000000000
--- a/dev-lang/parrot-7.1.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install test
-DEPEND=dev-lang/perl[doc?] 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 )
-DESCRIPTION=Virtual machine designed to compile and execute bytecode for dynamic languages
-EAPI=5
-HOMEPAGE=http://www.parrot.org/
-IUSE=opengl nls doc examples gdbm gmp ssl +unicode pcre
-KEYWORDS=~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=Artistic-2
-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 )
-RESTRICT=test
-SLOT=0/7.1.0
-SRC_URI=ftp://ftp.parrot.org/pub/parrot/releases/all/7.1.0/parrot-7.1.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0d708d4f64544e56ef293988bf76dab9
diff --git a/dev-lang/parrot-7.11.0 b/dev-lang/parrot-7.11.0
deleted file mode 100644
index 100cd619a0e4..000000000000
--- a/dev-lang/parrot-7.11.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install test
-DEPEND=dev-lang/perl[doc?] 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 )
-DESCRIPTION=Virtual machine designed to compile and execute bytecode for dynamic languages
-EAPI=5
-HOMEPAGE=http://www.parrot.org/
-IUSE=opengl nls doc examples gdbm +gmp ssl +unicode pcre
-KEYWORDS=~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=Artistic-2
-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 )
-RESTRICT=test
-SLOT=0/7.11.0
-SRC_URI=ftp://ftp.parrot.org/pub/parrot/releases/all/7.11.0/parrot-7.11.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=194aa19f5c70de9d3d3cd657655302d8
diff --git a/dev-lang/parrot-7.5.0 b/dev-lang/parrot-7.5.0
deleted file mode 100644
index e8026e46b4a2..000000000000
--- a/dev-lang/parrot-7.5.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install test
-DEPEND=dev-lang/perl[doc?] 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 )
-DESCRIPTION=Virtual machine designed to compile and execute bytecode for dynamic languages
-EAPI=5
-HOMEPAGE=http://www.parrot.org/
-IUSE=opengl nls doc examples gdbm +gmp ssl +unicode pcre
-KEYWORDS=~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=Artistic-2
-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 )
-RESTRICT=test
-SLOT=0/7.5.0
-SRC_URI=ftp://ftp.parrot.org/pub/parrot/releases/all/7.5.0/parrot-7.5.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=194aa19f5c70de9d3d3cd657655302d8
diff --git a/dev-lang/parrot-8.1.0 b/dev-lang/parrot-8.1.0
deleted file mode 100644
index 2605ac2f1a1c..000000000000
--- a/dev-lang/parrot-8.1.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install test
-DEPEND=dev-lang/perl[doc?] sys-libs/readline dev-libs/libffi net-libs/libnsl:0= 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 )
-DESCRIPTION=Virtual machine designed to compile and execute bytecode for dynamic languages
-EAPI=5
-HOMEPAGE=http://www.parrot.org/
-IUSE=opengl nls doc examples gdbm +gmp ssl +unicode pcre
-KEYWORDS=~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos
-LICENSE=Artistic-2
-RDEPEND=sys-libs/readline dev-libs/libffi net-libs/libnsl:0= 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 )
-RESTRICT=test
-SLOT=0/8.1.0
-SRC_URI=ftp://ftp.parrot.org/pub/parrot/releases/all/8.1.0/parrot-8.1.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=1a873809e936e3be5d8fa23e4c2642ea
diff --git a/dev-lang/parrot/Manifest b/dev-lang/parrot/Manifest
new file mode 100644
index 000000000000..892515b218db
--- /dev/null
+++ b/dev-lang/parrot/Manifest
@@ -0,0 +1,9 @@
+DIST parrot-7.1.0.tar.gz 4688341 BLAKE2B 1b1f894d0a54a11044ae8069d6f79509f2a0c6c6f66051e0f3fdc9ad8f3177cfde0947965b1586e8dd13cc26047c8987b11030aa8156e6324be2ce061f5fa90d SHA512 b7d261e82934aa84b3d93b2e68b3eb0f13dea684665ca2448a0e2139aa6676c1ff2da1a8056332a7f2538bee6158953be5bceed0ac8a9b277827ec7bcba46cb8
+DIST parrot-7.11.0.tar.gz 4703987 BLAKE2B d832ce0225af6d86877ab775a773971484d1c17c6c517310536b10df05cbf30cba909439e59dda1a14d8688fe3bf0318ea5dc84a552dd3b3e7129ce0b2eb4f9b SHA512 6f321a7d92b43413bc8cf2d2a03378e27de49573968471ad833232f90f0b61eae81626a80be94d84a783153c5beca3ba57c31fcc861b8b3c6cd33cd2d433a19a
+DIST parrot-7.5.0.tar.gz 4693149 BLAKE2B d5e88d5dedb3f95348d7b7bfeb1230251a866be5d4ada46ed5b4b80398227b6351566a07fdb6d7f8866bb69e39dde58b8c3ba707fd2737e70839eab0898c1bd0 SHA512 6c009dec6bdb9f419b20f3bb6c103b16018b27b2ed0094f13c957f66d9735cfc126c15f787d4ce577cd0c6492d61264c35c23d50ab29517b65f00df7c4b4d619
+DIST parrot-8.1.0.tar.gz 4700495 BLAKE2B a90cd3c43be2a6812eaf5a5881cfd97e7011b5b82234c5eaf61e54cba923544a2f2c649387afe55d4e710a1e92ff31b1d32454a230fda6005b40778598f1915e SHA512 f5c4ffeb22a8f4949081ba9d98e3129eb067f6f0ed139248ca1d521570ccbada5dfa69ca2e390868a00ed275780552a5cd06eb271ff14ff753bf8375b7c658c2
+EBUILD parrot-7.1.0.ebuild 2344 BLAKE2B 535c04048a69168045e6da2bc5cc2a816482ffdf83b243b42f99ce224134bc7ad93d40999c4b057e903a6ccc546c83c957f3fc1a9e820096e91f00e0a8624a1d SHA512 1cb703ee015f94462940036a88313e57213bf08c7b9f58822daa674aa4f8c772b7a7fae29e89d8006fb563dcce96843a4e3758a09dc963c34dab1eee2ef1b80d
+EBUILD parrot-7.11.0.ebuild 2345 BLAKE2B b971f0521738964923f5788aa684f655bbd6c3a60117a6fa92511ea5d45f441738b2a73062ecdc8a53a5d5b9b9e7e893ad9656c25cfba99489feff44e4a32597 SHA512 d2ffb1d58e4901e6da667154f8f295b8ddf234a07974c51f044d69cbf82ed37456e9e51a9327c2cab742eda6260af3890c23ed9b349606d87260a1d3e7b62d33
+EBUILD parrot-7.5.0.ebuild 2345 BLAKE2B b971f0521738964923f5788aa684f655bbd6c3a60117a6fa92511ea5d45f441738b2a73062ecdc8a53a5d5b9b9e7e893ad9656c25cfba99489feff44e4a32597 SHA512 d2ffb1d58e4901e6da667154f8f295b8ddf234a07974c51f044d69cbf82ed37456e9e51a9327c2cab742eda6260af3890c23ed9b349606d87260a1d3e7b62d33
+EBUILD parrot-8.1.0.ebuild 2365 BLAKE2B ee1b16eb794742437941686e766e16cbbe0397b5b0dbc770b90a58265fca2607bbc489becce9f85f5aa1ef7b3f2506e62d1bf1cddfbcad066ee616279b123a96 SHA512 2e9f32a7a2aad13bbe9c2a774dad9edc55c2174b2834d6bba938114c26b0efccafa581f68cbc4faf93f5b44bb6484a3fab6deaa30598d2f195c036f36c1c5f3a
+MISC metadata.xml 247 BLAKE2B d94a568c950df425b54d5f8ce29c206c221f01e64654597f2d4a0f7bc86ea508797045e3fb6eb14bb8a2aadec08995d877434d85dc9e622fc6207d2df28b23c2 SHA512 9bd9ddeb07e0644027c9a1dca33f0704de6062bc6b17333adde82a177991f35265f90e1b623e3a6288fedd729597921f48e4fda17fb8d402b1b2f3fc73c6d693
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..53828b81e7be
--- /dev/null
+++ b/dev-lang/parrot/parrot-8.1.0.ebuild
@@ -0,0 +1,84 @@
+# 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
+ net-libs/libnsl:0=
+ 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-1.7 b/dev-lang/pasm-1.7
deleted file mode 100644
index 8f6553739dee..000000000000
--- a/dev-lang/pasm-1.7
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=compile install unpack
-DESCRIPTION=A portable assembler for processors of the PowerPC family
-EAPI=0
-HOMEPAGE=http://sun.hasenbraten.de/~frank/projects/
-KEYWORDS=~ppc ~ppc-macos
-LICENSE=GPL-2
-SLOT=0
-SRC_URI=http://devnull.owl.de/~frank/pasm.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=27e80e9fd6ed29348d2b1635d2c34e75
diff --git a/dev-lang/pasm/Manifest b/dev-lang/pasm/Manifest
new file mode 100644
index 000000000000..7a88de4bde38
--- /dev/null
+++ b/dev-lang/pasm/Manifest
@@ -0,0 +1,4 @@
+AUX pasm-1.7-ppc.patch 901 BLAKE2B cde7b91e1015720e801914f50935aab09e800f28a504a9474815a73d2ee7694137bfc6048753669c9d37e0d5f73d14c980dbd88629c9bae5eadec9f45697a4b0 SHA512 685af1b74e3c3136aab30292ce6dd8fa412a1f214da23426e7ecb7fef728faf50f9dda58cadda97004b386f1244d47cde094dd09ad97c0e68de8484667c73457
+DIST pasm.tar.gz 82136 BLAKE2B d9aa8ab23eb184ca00b416d172b86c4c4aad0e12eea3ff92979c4570ebcf04306b8030f81524952f62f2221d25384db13d208dd22fb98105b7edd55587537a54 SHA512 313e4ad694704ad59619c46353c53ef9bd5529b6c9faee5cc6124dd0175f7b5a87268d2c26045f0639a0002311828b227915f30e697f8adedcd4256774674283
+EBUILD pasm-1.7.ebuild 662 BLAKE2B 16a1ac2ac04af5c4a76fabfb877f8a123f1bef9c846a495890d13eb354672d1d5d315b6d5f590f5a0310c51a2aa96702399435ad11c40347b9937a87c9214773 SHA512 90f6fb8a1fd82026fa08abf68fcb59b78dbc84e76da6620bf20c81609eab8ea583dcb08b4bc9c32dab25e6fb194fcdb91371e7567cf8c5e0b32e5c68b1855978
+MISC metadata.xml 614 BLAKE2B 8c3f30f95127d33b4582c962631e6b3e1522a75d3285466c0dcd4efc9282566e49c09ed44042370b17d613766f5a0d431a0b0b135a05f64aecec351a628480c8 SHA512 fd8449a228746b428cddb71477efdc421fba98b60ef72e1459c790a2df9f5898163a7e4fee2e9950d176f6dbe65525d41fb676e66a004d0427886dec878095e0
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..e4e41e367302
--- /dev/null
+++ b/dev-lang/pasm/pasm-1.7.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+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-1.1.0-r1 b/dev-lang/pcc-1.1.0-r1
deleted file mode 100644
index ee109426e17e..000000000000
--- a/dev-lang/pcc-1.1.0-r1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare
-DEPEND=>=dev-libs/pcc-libs-1.1.0 >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=pcc portable c compiler
-EAPI=5
-HOMEPAGE=http://pcc.ludd.ltu.se
-KEYWORDS=~x86 ~amd64 ~amd64-fbsd
-LICENSE=BSD
-RDEPEND=>=dev-libs/pcc-libs-1.1.0
-SLOT=0
-SRC_URI=ftp://pcc.ludd.ltu.se/pub/pcc-releases/pcc-1.1.0.tgz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=7ee8c5658ddc4f63415c9b6eeeda8379
diff --git a/dev-lang/pcc-9999 b/dev-lang/pcc-9999
deleted file mode 100644
index 72bf9a413647..000000000000
--- a/dev-lang/pcc-9999
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=compile configure install prepare unpack
-DEPEND=>=dev-libs/pcc-libs-9999 >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 dev-vcs/cvs
-DESCRIPTION=pcc portable c compiler
-EAPI=5
-HOMEPAGE=http://pcc.ludd.ltu.se
-LICENSE=BSD
-RDEPEND=>=dev-libs/pcc-libs-9999
-SLOT=0
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 cvs c57fc648b829862b38ad2a8b8c1c02e8 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=59a4517c42c222987e318b03a8895e01
diff --git a/dev-lang/pcc/Manifest b/dev-lang/pcc/Manifest
new file mode 100644
index 000000000000..349756e9acaf
--- /dev/null
+++ b/dev-lang/pcc/Manifest
@@ -0,0 +1,5 @@
+AUX pcc-1.1.0-multiarch.patch 377 BLAKE2B 5b5e86099aef3e173c194b535cbde726a41bb663e2754a848a920b2c967c5dab4b9041a7a879b7649fbb6eb8019eda46b7cfbd63bb8fa29067a9d2f7aa4b2466 SHA512 117f4a574f7d86a5d39b88927d56843c900aee539b07639072965f8c0b30120b5900dab3c7fa8d421c9dd6ea539fa0f5b55fd34be506652185f034d071f34195
+DIST pcc-1.1.0.tgz 848427 BLAKE2B f94dd3eb3f96145e3fd2d5d89ca5a3a12c55614924c1bd2ccc219b03b4804bb34904b7041efb6237e06982b3282578d996510ffc9adc916e212f6f7d1bcb5a35 SHA512 5bd2b59fbb323016d215023ce77793ae66766e8e8192b44bf0707ee444658022e1645669c13eea8c81bc55c161eea3b0271d6b3098b8a7d51ce67eb86c7527b4
+EBUILD pcc-1.1.0-r1.ebuild 852 BLAKE2B 6a661740e1a7653fda98ba1ba6c4529d2321e25a0ebf0fe048b61d9ce2b6dd145f88fc0dc9e86f4dfe58bf01cb3668b511fdaec77894960dce5640a38ebf36f1 SHA512 ee0ede178a5aee0f0fc7678ebc9e06e372cb6c04e5bf5e1393bb58a2202959533ba3b146111c960ea9143dc72bdffc896c831f9cd1058187e7c7b41417b22e51
+EBUILD pcc-9999.ebuild 949 BLAKE2B 22acd95f4d370d0bc166aeb3adffec19b3a22bb5bf410fa0e52c55e1cbef9f47c0687ac2e2968d5fc6f8c3f15136cf7fb30454f92ac7d3e9cc56d23c1aa23431 SHA512 165eb427eb7705862c0b2178866f6615859cf4b1ad72c5bac9605eb1e6d84d38a316a65a073e1496363242dbc4bc61a42b1cccc520fbbae241f088e33f1a8ed4
+MISC metadata.xml 247 BLAKE2B 5a20af3c9732ef7dba68131a08988652f5c93a6d186a82c4deb1bb9c06dc3ae73152a0d241cc346637f7b11caf4676da43301ba596c67b66669535e71db0b03e SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7
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-5.24.3-r1 b/dev-lang/perl-5.24.3-r1
deleted file mode 100644
index 34ac5d12998d..000000000000
--- a/dev-lang/perl-5.24.3-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure install postinst postrm preinst prepare setup test
-DEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
-DESCRIPTION=Larry Wall's Practical Extraction and Report Language
-EAPI=6
-HOMEPAGE=https://www.perl.org/
-IUSE=berkdb debug doc gdbm ithreads
-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
-LICENSE=|| ( Artistic GPL-1+ )
-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
-RDEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib
-SLOT=0/5.24
-SRC_URI=mirror://cpan/src/5.0/perl-5.24.3.tar.xz mirror://cpan/authors/id/S/SH/SHAY/perl-5.24.3.tar.xz https://github.com/gentoo-perl/perl-patchset/releases/download/perl-5.24.3-patches-2/perl-5.24.3-patches-2.tar.xz mirror://gentoo/perl-5.24.3-patches-2.tar.xz https://dev.gentoo.org/~kentnl/distfiles/perl-5.24.3-patches-2.tar.xz https://github.com/arsv/perl-cross/releases/download/1.1.7/perl-cross-1.1.7.tar.gz
-_eclasses_=alternatives 6c575717515f030736d1b718d507d2f9 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=6828ef4c75a14989278ff51f29a3f7fe
diff --git a/dev-lang/perl-5.24.4 b/dev-lang/perl-5.24.4
deleted file mode 100644
index d75bd2cf397e..000000000000
--- a/dev-lang/perl-5.24.4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure install postinst postrm preinst prepare setup test
-DEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
-DESCRIPTION=Larry Wall's Practical Extraction and Report Language
-EAPI=6
-HOMEPAGE=https://www.perl.org/
-IUSE=berkdb debug doc gdbm ithreads
-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
-LICENSE=|| ( Artistic GPL-1+ )
-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
-RDEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib
-SLOT=0/5.24
-SRC_URI=mirror://cpan/src/5.0/perl-5.24.4.tar.xz mirror://cpan/authors/id/S/SH/SHAY/perl-5.24.4.tar.xz https://github.com/gentoo-perl/perl-patchset/releases/download/perl-5.24.4-patches-1/perl-5.24.4-patches-1.tar.xz mirror://gentoo/perl-5.24.4-patches-1.tar.xz https://dev.gentoo.org/~kentnl/distfiles/perl-5.24.4-patches-1.tar.xz https://github.com/arsv/perl-cross/releases/download/1.1.9/perl-cross-1.1.9.tar.gz
-_eclasses_=alternatives 6c575717515f030736d1b718d507d2f9 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=cb91982ed19042b77000268bc5b6c6cd
diff --git a/dev-lang/perl-5.26.1-r1 b/dev-lang/perl-5.26.1-r1
deleted file mode 100644
index 0b626b8e3b1f..000000000000
--- a/dev-lang/perl-5.26.1-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure install postinst postrm preinst prepare setup test
-DEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
-DESCRIPTION=Larry Wall's Practical Extraction and Report Language
-EAPI=6
-HOMEPAGE=https://www.perl.org/
-IUSE=berkdb debug doc gdbm ithreads
-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
-LICENSE=|| ( Artistic GPL-1+ )
-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
-RDEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib
-SLOT=0/5.26
-SRC_URI=mirror://cpan/src/5.0/perl-5.26.1.tar.xz mirror://cpan/authors/id/S/SH/SHAY/perl-5.26.1.tar.xz https://github.com/gentoo-perl/perl-patchset/releases/download/perl-5.26.1-patches-1/perl-5.26.1-patches-1.tar.xz mirror://gentoo/perl-5.26.1-patches-1.tar.xz https://dev.gentoo.org/~kentnl/distfiles/perl-5.26.1-patches-1.tar.xz https://github.com/arsv/perl-cross/releases/download/1.1.7/perl-cross-1.1.7.tar.gz
-_eclasses_=alternatives 6c575717515f030736d1b718d507d2f9 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=789659ebc578dba3986876bc7ec336f0
diff --git a/dev-lang/perl-5.26.1-r2 b/dev-lang/perl-5.26.1-r2
deleted file mode 100644
index 2569fec8b590..000000000000
--- a/dev-lang/perl-5.26.1-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure install postinst postrm preinst prepare setup test
-DEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
-DESCRIPTION=Larry Wall's Practical Extraction and Report Language
-EAPI=6
-HOMEPAGE=https://www.perl.org/
-IUSE=berkdb debug doc gdbm ithreads
-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
-LICENSE=|| ( Artistic GPL-1+ )
-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
-RDEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib
-SLOT=0/5.26
-SRC_URI=mirror://cpan/src/5.0/perl-5.26.1.tar.xz mirror://cpan/authors/id/S/SH/SHAY/perl-5.26.1.tar.xz https://github.com/gentoo-perl/perl-patchset/releases/download/perl-5.26.1-patches-1/perl-5.26.1-patches-1.tar.xz mirror://gentoo/perl-5.26.1-patches-1.tar.xz https://dev.gentoo.org/~kentnl/distfiles/perl-5.26.1-patches-1.tar.xz https://github.com/arsv/perl-cross/releases/download/1.1.7/perl-cross-1.1.7.tar.gz
-_eclasses_=alternatives 6c575717515f030736d1b718d507d2f9 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=bea3e13fd4d42bc0791bb00dea7faf1f
diff --git a/dev-lang/perl-5.26.2 b/dev-lang/perl-5.26.2
deleted file mode 100644
index f5d9dd879109..000000000000
--- a/dev-lang/perl-5.26.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure install postinst postrm preinst prepare setup test
-DEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
-DESCRIPTION=Larry Wall's Practical Extraction and Report Language
-EAPI=6
-HOMEPAGE=https://www.perl.org/
-IUSE=berkdb debug doc gdbm ithreads
-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
-LICENSE=|| ( Artistic GPL-1+ )
-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
-RDEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib
-SLOT=0/5.26
-SRC_URI=mirror://cpan/src/5.0/perl-5.26.2.tar.xz mirror://cpan/authors/id/S/SH/SHAY/perl-5.26.2.tar.xz https://github.com/gentoo-perl/perl-patchset/releases/download/perl-5.26.2-patches-1/perl-5.26.2-patches-1.tar.xz mirror://gentoo/perl-5.26.2-patches-1.tar.xz https://dev.gentoo.org/~kentnl/distfiles/perl-5.26.2-patches-1.tar.xz https://github.com/arsv/perl-cross/releases/download/1.1.9/perl-cross-1.1.9.tar.gz
-_eclasses_=alternatives 6c575717515f030736d1b718d507d2f9 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c59c238dd7781d189d7ba1e607c77420
diff --git a/dev-lang/perl-5.26.9999 b/dev-lang/perl-5.26.9999
deleted file mode 100644
index 2d978c28ffad..000000000000
--- a/dev-lang/perl-5.26.9999
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install postinst postrm preinst prepare setup test
-DEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
-DESCRIPTION=Larry Wall's Practical Extraction and Report Language
-EAPI=6
-HOMEPAGE=https://www.perl.org/
-IUSE=berkdb debug doc gdbm ithreads
-LICENSE=|| ( Artistic GPL-1+ )
-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
-RDEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib
-SLOT=0/5.26
-SRC_URI=mirror://cpan/src/5.0/perl-5.26.2.tar.xz mirror://cpan/authors/id/S/SH/SHAY/perl-5.26.2.tar.xz https://github.com/gentoo-perl/perl-patchset/releases/download/perl-5.26.2-patches-1/perl-5.26.2-patches-1.tar.xz mirror://gentoo/perl-5.26.2-patches-1.tar.xz https://dev.gentoo.org/~kentnl/distfiles/perl-5.26.2-patches-1.tar.xz https://github.com/arsv/perl-cross/releases/download/1.1.9/perl-cross-1.1.9.tar.gz
-_eclasses_=alternatives 6c575717515f030736d1b718d507d2f9 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c59c238dd7781d189d7ba1e607c77420
diff --git a/dev-lang/perl-5.28.0 b/dev-lang/perl-5.28.0
deleted file mode 100644
index 82832c0cdd55..000000000000
--- a/dev-lang/perl-5.28.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure install postinst postrm preinst prepare setup test
-DEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
-DESCRIPTION=Larry Wall's Practical Extraction and Report Language
-EAPI=6
-HOMEPAGE=https://www.perl.org/
-IUSE=berkdb debug doc gdbm ithreads
-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
-LICENSE=|| ( Artistic GPL-1+ )
-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
-RDEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib
-SLOT=0/5.28
-SRC_URI=mirror://cpan/src/5.0/perl-5.28.0.tar.xz mirror://cpan/authors/id/X/XS/XSAWYERX/perl-5.28.0.tar.xz https://github.com/gentoo-perl/perl-patchset/releases/download/perl-5.28.0-patches-1/perl-5.28.0-patches-1.tar.xz mirror://gentoo/perl-5.28.0-patches-1.tar.xz https://dev.gentoo.org/~kentnl/distfiles/perl-5.28.0-patches-1.tar.xz https://github.com/arsv/perl-cross/releases/download/1.1.9/perl-cross-1.1.9.tar.gz
-_eclasses_=alternatives 6c575717515f030736d1b718d507d2f9 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=5d7c02440873542d34ccac4640e33dec
diff --git a/dev-lang/perl-5.28.9999 b/dev-lang/perl-5.28.9999
deleted file mode 100644
index 852a45f6abe3..000000000000
--- a/dev-lang/perl-5.28.9999
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install postinst postrm preinst prepare setup test
-DEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib !prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
-DESCRIPTION=Larry Wall's Practical Extraction and Report Language
-EAPI=6
-HOMEPAGE=https://www.perl.org/
-IUSE=berkdb debug doc gdbm ithreads
-LICENSE=|| ( Artistic GPL-1+ )
-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
-RDEPEND=berkdb? ( sys-libs/db:= ) gdbm? ( >=sys-libs/gdbm-1.8.3:= ) app-arch/bzip2 sys-libs/zlib
-SLOT=0/5.28
-SRC_URI=mirror://cpan/src/5.0/perl-5.28.0.tar.xz mirror://cpan/authors/id/X/XS/XSAWYERX/perl-5.28.0.tar.xz https://github.com/gentoo-perl/perl-patchset/releases/download/perl-5.28.0-patches-1/perl-5.28.0-patches-1.tar.xz mirror://gentoo/perl-5.28.0-patches-1.tar.xz https://dev.gentoo.org/~kentnl/distfiles/perl-5.28.0-patches-1.tar.xz https://github.com/arsv/perl-cross/releases/download/1.1.9/perl-cross-1.1.9.tar.gz
-_eclasses_=alternatives 6c575717515f030736d1b718d507d2f9 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=5d7c02440873542d34ccac4640e33dec
diff --git a/dev-lang/perl/Manifest b/dev-lang/perl/Manifest
new file mode 100644
index 000000000000..19ff7391bbf8
--- /dev/null
+++ b/dev-lang/perl/Manifest
@@ -0,0 +1,22 @@
+AUX perl-5.24-libnsl.patch 613 BLAKE2B 3d802f2d9203765630690a12dce5bc339dc0ec3531b47d23cb27877d1159d74b4c0c225fb21fb71257a3b125b72008f6a9b2d174fcd66e3b80f271abccc6f6f2 SHA512 19241053ecb83f5427a7361d222d87ba20c7cc59b2c6cdff011e4f9c59d828e703f0de17dcebb886772278c8dd269bf2b95978a2dededc0bf4ef9056733a3ed4
+DIST perl-5.24.3-patches-2.tar.xz 23980 BLAKE2B 5de7ac2cc5238d0b8460a294ae2e8da1455f89a63691a4fc022d49756ed4c0e577672149de7bd475d10f4860b4a98dc1db0c6f32abaf80f8c04658f6ca706e11 SHA512 f13c5fac65e11d691b77231cc98b0a57b6ccabd66535835bc387410dc88c298d31fa471bcd9f4e86d4d51b0402483283c23dcd53d69e0dbabc77b9db6fea4936
+DIST perl-5.24.3.tar.xz 11574740 BLAKE2B 79e719d1d0fcea3eea71653f276d0d093d8d1f6b1f981b053f25e6891c57af9ee1982f65ce4a31e4c5844eb11a7966f25c6b459cc7de51cf62b9127be96f6f25 SHA512 139c92c0ea0ee7bd5912ad52cc275e0732ceb0865d8b67c301e1fc5a96ae126a26432b4450a2bbc7fe65b8e1dd8adde92ea2cc91ee39cb13ec3c5096e8f787ec
+DIST perl-5.24.4-patches-1.tar.xz 24244 BLAKE2B aa4557a887e57d584c738058ed147f1b4f80f491223e1476c16abdc371bbe133f5d99ea3be11e44101b5343680823ab29c5d26cc8a8ca222275ba4bc092cd5d9 SHA512 465f22269d6c07be5616de223c712ab57d7060fdb4fcc4d79ab23aae79fa61517dbed112bb3a2541d3368a02d046b769ef8fa50a7b91379ad03ca4bf3387e518
+DIST perl-5.24.4.tar.xz 11580256 BLAKE2B efdb9f0e52604207fc73e040c999f40e364f546e3e872dd6709cc6b5209179742fab083319238142581c324847d5e24a3e6a011decc901827d3eb213d00a1666 SHA512 a50bf162d9e62a558a4137d44383eb3fe2001e1eaa574aad7abae851b544dee1dacb849c101023db49b2740925691f5e367fa36ab5dda90634143076c8e4d2f3
+DIST perl-5.26.1-patches-1.tar.xz 16764 BLAKE2B 95fb086d214bf27dedfdc96f927e11ca6e2a237aabc268b3e26ca9868eeede3916fe6adc9ab890bc6bbc9977fa4a3c200188f91d506652c1f45f7ebdda9857e2 SHA512 24d7f5e1344a768bbf170376b131498fa234881d10edc259ff7a31572467e2fe1084ce6a2a9ef4d4ec5924ca95488064235d6e02b83acba727a856cd1e4c9ebc
+DIST perl-5.26.1.tar.xz 11922848 BLAKE2B 8ba5ac50bc6bc3cea1ede7dbd9b41566bd3f62e432d9a1f5ee45837cc3051c1edc037a13d73d4c867edc7833f9dfa8a9d22216e14a19df179ba030a03d3acc07 SHA512 13faa7bcd7ed8c490c37e9032c115af06c9b8152b75f8062409dd72d263d1314480e8a9a883490de1b448b2e6d53b6a87d108e2eceb17de2524d5857c6a7d300
+DIST perl-5.26.2-patches-1.tar.xz 17100 BLAKE2B 681239e438945285e006ee1d1e2a9eb888fc9b425e6fbd4822e65e1fe1ced2216de76485b9792d3fee28783a588c09e1d34c294ef43d81055c4566af37fe9b6c SHA512 2a274150d2dba406c6efb67ec236f67032a51ff1788b30ea556e74b2f02fab68f5029ebd4b9d4daeb16b3a63fa7aa1744d323bf637a9d21946f19f33b69da245
+DIST perl-5.26.2.tar.xz 11931624 BLAKE2B 2d54b155ace7c70a33adbe9911ba5384281aa49a0f6d4f452f4249b4deb58804268b473457470488f7592e041221f552b09156eb55c10078002aae3715446d9a SHA512 fd54c90da250144c81b94587c01c49fa367f84c54406f1d360ddab4a41589a7b19efc1707f95c95d6357fae66fc3f6f00bf69dd7741db114c7034a14f52be65f
+DIST perl-5.28.0-patches-1.tar.xz 17128 BLAKE2B f16843d9ecf27fa7d42dd59e1591d618ba9ad6b14f4e56bab4019af043eb79559cc7dbc4a1b1e580c18b7ba0b5d71c4da3e3f94955889629a655e7028492a066 SHA512 e05a492ba045ac71d20393099815bed8e4f491bed79a352e83537561eb256d4f672e0125c5cca9e45150c01d3ad463a070a49e845b3c17806d9f77a872d0352a
+DIST perl-5.28.0.tar.xz 12410536 BLAKE2B 620cca33c6d354b8b200bfff43dd155e6f89b9fe318f530d38c853a2b66fe67cc8410b6e5ab2a793d7ef578f2295a6fc4872483f81b5439d8573d75c5239fcfb SHA512 de701e37371b81cecf06098bb2c09017bde9cebaf9537d58838d0adf605ac2ecf739897b0a73576a7adb74d4cf65591ec4d2ed1f94b7191e695f88cb7e214a39
+DIST perl-cross-1.1.7.tar.gz 97622 BLAKE2B c58dd51492cfbda6fc58b43d9de45c35dd5ed5768ca8db61b5ac092ad6c0067386597875d6613c75671f026387ba474ce8c28789d6d77b9dcfc4cf4bf7227126 SHA512 b64d487129b295ec6d996606b8b8559de681e1cf7c3e3167d6d646d5d7a848d7929b1ab698d1f950e265213749772fc74d209cea5020b61e133c8f8851b7cfa0
+DIST perl-cross-1.1.9.tar.gz 102939 BLAKE2B 438ea75a14c4d60fdf3cb2f3671c736d229a83af210ba4fe6e79b989c6c4b45500d0221ec65bc71e1d43d234ec1daa20b3a19be6ceb01e638810900dbe3664a7 SHA512 002441012bd31f1ea71341707d91f89b76266c187c9d28f947ed5eddbcc6e3155e8dfd4b1814331561c3557764fea25bf6a938f08bcd4adfb5895361ad5a269a
+EBUILD perl-5.24.3-r1.ebuild 17393 BLAKE2B 999d7df269e15390e4f7d146ff94eda5301981353083c933dd89af42a9ce0cece3f6e87d8917572cd38141f0e25e9c864660624fa4c4459940d0dd190527d53f SHA512 61a2760d1a17ffe0ae6cde23b4b707876822aa2355fa834b23a878a3df3d5d070e5b0a74a991d617ad1e026c0fcc3d2a05609d575567edc57b2cf101bde8e0bf
+EBUILD perl-5.24.4.ebuild 17363 BLAKE2B 84744ba06ce9dc0cab51aae3da10917679a20b5997f13154c269285173a6c6b0ec20ae365b059daa52f86f2addcf97dbe8866a29cd2c9c32ee51030de9a44bf7 SHA512 d393349752cfcdb53bd6d99559ad1eb5385e716f772bc4377e07bc3d7064a293e5cc0369feca2094513e710e8724c2a0a82fcf342ad68c4e1d2c1d0d42200071
+EBUILD perl-5.26.1-r1.ebuild 19255 BLAKE2B a29acfd3ea358d0d46886aae104acf8e55ad7c9380848343ad84dfc58294645fa6c72c4cbc598e54072585f880175581ef25e7e6e2a9080764968ab925cdbb9d SHA512 4630da50892ac674de4b9e5858ffd9b1c50b08558a91a1579958f728aaf3d9581b3f960c0d9caf5a460c3435a626c9294d8abc73c7f7da098199018a144a5788
+EBUILD perl-5.26.1-r2.ebuild 19668 BLAKE2B 5936c92398cf8a889bd946705f2667abd07fc81a64ea3f8c44cd83f3c29719352f4ea938b8d7fb7e3d5d138dcba12f94692166aaca8d98a3640c772850ec9e5c SHA512 154b021e91b01ecd55a5af50bc530f080745b122cd5a77652589c236d4bceea93f4379a1c8e751eb1787118e3133e1f5daab8dccf88365f7976c8a015591190e
+EBUILD perl-5.26.2.ebuild 19702 BLAKE2B 401194aa30936a6169efca8178810f1401ad501533ce66350bf43ac07b0f33dcaf771e650add413c59bfcb179d10a66e9d51f15ac0399a98fe7ae9c8c69f8d81 SHA512 30c09deb7a1b4d3a87c70a9ef3b431cf43e4c4be8760ba619b7355dec1960f51cfbe75e8ed4fba8e4ce7821c93c1e2ecb6725e88a3f6aa47d40c57b8896a4689
+EBUILD perl-5.26.9999.ebuild 19702 BLAKE2B 401194aa30936a6169efca8178810f1401ad501533ce66350bf43ac07b0f33dcaf771e650add413c59bfcb179d10a66e9d51f15ac0399a98fe7ae9c8c69f8d81 SHA512 30c09deb7a1b4d3a87c70a9ef3b431cf43e4c4be8760ba619b7355dec1960f51cfbe75e8ed4fba8e4ce7821c93c1e2ecb6725e88a3f6aa47d40c57b8896a4689
+EBUILD perl-5.28.0.ebuild 19891 BLAKE2B 67f3a7f862c9db4e9fd4d417f96390014b5b4ed70890622c5e5a9bc6841c6ebb0aba2e2f6ac1aa77a4569c72b5353e78aef4ab98b20d6e31c8a6e1401d2a220d SHA512 4f3925efb263bf2a8b3bc66febc468001918b6f9b1880b38bac62e8eaabdb9a67ac11e72adcbadbfa2948a15402cf117619a894e0c4334909b2964ab923b38d3
+EBUILD perl-5.28.9999.ebuild 19891 BLAKE2B 67f3a7f862c9db4e9fd4d417f96390014b5b4ed70890622c5e5a9bc6841c6ebb0aba2e2f6ac1aa77a4569c72b5353e78aef4ab98b20d6e31c8a6e1401d2a220d SHA512 4f3925efb263bf2a8b3bc66febc468001918b6f9b1880b38bac62e8eaabdb9a67ac11e72adcbadbfa2948a15402cf117619a894e0c4334909b2964ab923b38d3
+MISC metadata.xml 430 BLAKE2B 8625fd07f63a7943a85c3919d6ae6db622b752caa2803c56c72a22b270244261331fbab8b760e6d00acb8480770c9ef1d1beaaa22cc6044660821687c0cd8c33 SHA512 ca4c43e2016b7df707894713465700a90d2b8551b57fc4d660cff75edb1e8cc2456f9ae10431839ad6738f290d4f5911fae360eaa1d4670859d855de3d568583
diff --git a/dev-lang/perl/files/perl-5.24-libnsl.patch b/dev-lang/perl/files/perl-5.24-libnsl.patch
new file mode 100644
index 000000000000..5cd6f88c998e
--- /dev/null
+++ b/dev-lang/perl/files/perl-5.24-libnsl.patch
@@ -0,0 +1,13 @@
+diff --git a/Configure b/Configure
+index e32d18ce1f..85ab0249bc 100755
+--- a/Configure
++++ b/Configure
+@@ -1497,7 +1497,7 @@ archname=''
+ usereentrant='undef'
+ : List of libraries we want.
+ : If anyone needs extra -lxxx, put those in a hint file.
+-libswanted="cl pthread socket bind inet nsl ndbm gdbm dbm db malloc dl ld"
++libswanted="cl pthread socket bind inet ndbm gdbm dbm db malloc dl ld"
+ libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
+ : We probably want to search /usr/shlib before most other libraries.
+ : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
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.3-r1.ebuild b/dev-lang/perl/perl-5.24.3-r1.ebuild
new file mode 100644
index 000000000000..9b9385b7a03a
--- /dev/null
+++ b/dev-lang/perl/perl-5.24.3-r1.ebuild
@@ -0,0 +1,572 @@
+# Copyright 1999-2018 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=2
+CROSS_VER=1.1.7
+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="https://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}"
+
+PATCHES=( "${FILESDIR}/perl-5.24-libnsl.patch" )
+
+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"
+
+ # xlocale.h is going away in glibc-2.26, so it's counterproductive
+ # if we use it and include it in CORE/perl.h ... Perl builds just
+ # fine with glibc and locale.h only.
+ # However, the darwin prefix people have no locale.h ...
+ use elibc_glibc && myconf -Ui_xlocale
+
+ # 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.4.ebuild b/dev-lang/perl/perl-5.24.4.ebuild
new file mode 100644
index 000000000000..2ef2d0a16b1f
--- /dev/null
+++ b/dev-lang/perl/perl-5.24.4.ebuild
@@ -0,0 +1,570 @@
+# Copyright 1999-2018 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.9
+PATCH_BASE="perl-5.24.4-patches-${PATCH_VER}"
+
+PERL_OLDVERSEN="5.24.3 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="https://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.804.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"
+
+ # xlocale.h is going away in glibc-2.26, so it's counterproductive
+ # if we use it and include it in CORE/perl.h ... Perl builds just
+ # fine with glibc and locale.h only.
+ # However, the darwin prefix people have no locale.h ...
+ use elibc_glibc && myconf -Ui_xlocale
+
+ # 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.1-r1.ebuild b/dev-lang/perl/perl-5.26.1-r1.ebuild
new file mode 100644
index 000000000000..7e570ce3afde
--- /dev/null
+++ b/dev-lang/perl/perl-5.26.1-r1.ebuild
@@ -0,0 +1,625 @@
+# Copyright 1999-2018 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.7
+PATCH_BASE="perl-5.26.1-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="https://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/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"
+
+ # xlocale.h is going away in glibc-2.26, so it's counterproductive
+ # if we use it and include it in CORE/perl.h ... Perl builds just
+ # fine with glibc and locale.h only.
+ # However, the darwin prefix people have no locale.h ...
+ use elibc_glibc && myconf -Ui_xlocale
+
+ # 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.1-r2.ebuild b/dev-lang/perl/perl-5.26.1-r2.ebuild
new file mode 100644
index 000000000000..a913f5694dbe
--- /dev/null
+++ b/dev-lang/perl/perl-5.26.1-r2.ebuild
@@ -0,0 +1,637 @@
+# Copyright 1999-2018 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.7
+PATCH_BASE="perl-5.26.1-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="https://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}"
+
+PATCHES=( "${FILESDIR}/perl-5.24-libnsl.patch" )
+
+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/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
+
+ # Use errno.h from prefix rather than from host system, bug #645804
+ if use prefix; then
+ sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.PL || die
+ fi
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # do NOT mess with nsl, on Solaris this is always necessary,
+ # when -lsocket is used e.g. to get h_errno
+ PATCHES=( ${PATCHES[@]/*libnsl.patch/} )
+ 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"
+
+ # xlocale.h is going away in glibc-2.26, so it's counterproductive
+ # if we use it and include it in CORE/perl.h ... Perl builds just
+ # fine with glibc and locale.h only.
+ # However, the darwin prefix people have no locale.h ...
+ use elibc_glibc && myconf -Ui_xlocale
+
+ # 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.2.ebuild b/dev-lang/perl/perl-5.26.2.ebuild
new file mode 100644
index 000000000000..602748dc4a26
--- /dev/null
+++ b/dev-lang/perl/perl-5.26.2.ebuild
@@ -0,0 +1,637 @@
+# Copyright 1999-2018 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.9
+PATCH_BASE="perl-5.26.2-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.1 5.26.0"
+if [[ "${PV##*.}" == "9999" ]]; then
+ DIST_VERSION=5.26.2
+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="https://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.804.142.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/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"
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # do NOT mess with nsl, on Solaris this is always necessary,
+ # when -lsocket is used e.g. to get h_errno
+ sed -i '/gentoo\/no-nsl\.patch/d' "${WORKDIR}/patches/series" || die "Can't exclude libnsl patch"
+ fi
+
+ 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
+
+ # Use errno.h from prefix rather than from host system, bug #645804
+ if use prefix && ! use prefix-guest; then
+ sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.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"
+
+ # xlocale.h is going away in glibc-2.26, so it's counterproductive
+ # if we use it and include it in CORE/perl.h ... Perl builds just
+ # fine with glibc and locale.h only.
+ # However, the darwin prefix people have no locale.h ...
+ use elibc_glibc && myconf -Ui_xlocale
+
+ # 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..602748dc4a26
--- /dev/null
+++ b/dev-lang/perl/perl-5.26.9999.ebuild
@@ -0,0 +1,637 @@
+# Copyright 1999-2018 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.9
+PATCH_BASE="perl-5.26.2-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.1 5.26.0"
+if [[ "${PV##*.}" == "9999" ]]; then
+ DIST_VERSION=5.26.2
+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="https://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.804.142.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/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"
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # do NOT mess with nsl, on Solaris this is always necessary,
+ # when -lsocket is used e.g. to get h_errno
+ sed -i '/gentoo\/no-nsl\.patch/d' "${WORKDIR}/patches/series" || die "Can't exclude libnsl patch"
+ fi
+
+ 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
+
+ # Use errno.h from prefix rather than from host system, bug #645804
+ if use prefix && ! use prefix-guest; then
+ sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.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"
+
+ # xlocale.h is going away in glibc-2.26, so it's counterproductive
+ # if we use it and include it in CORE/perl.h ... Perl builds just
+ # fine with glibc and locale.h only.
+ # However, the darwin prefix people have no locale.h ...
+ use elibc_glibc && myconf -Ui_xlocale
+
+ # 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.0.ebuild b/dev-lang/perl/perl-5.28.0.ebuild
new file mode 100644
index 000000000000..3fee6ac8677a
--- /dev/null
+++ b/dev-lang/perl/perl-5.28.0.ebuild
@@ -0,0 +1,642 @@
+# Copyright 1999-2018 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.9
+PATCH_BASE="perl-5.28.0-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=""
+if [[ "${PV##*.}" == "9999" ]]; then
+ DIST_VERSION=5.28.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="https://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.280.0 ptar ptardiff ptargrep
+ src_remove_dual perl-core/CPAN 2.200.0 cpan
+ src_remove_dual perl-core/Digest-SHA 6.10.0 shasum
+ src_remove_dual perl-core/Encode 2.970.0 enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 7.340.0 instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.390.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.74.0 zipdetails
+ src_remove_dual perl-core/JSON-PP 2.970.10 json_pp
+ src_remove_dual perl-core/Module-CoreList 5.201.806.220 corelist
+ src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
+ src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc
+ src_remove_dual perl-core/Test-Harness 3.420.0 prove
+ src_remove_dual perl-core/podlators 4.100.0 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 4.100.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/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"
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # do NOT mess with nsl, on Solaris this is always necessary,
+ # when -lsocket is used e.g. to get h_errno
+ sed -i '/gentoo\/no-nsl\.patch/d' "${WORKDIR}/patches/series" || die "Can't exclude libnsl patch"
+ fi
+
+ 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
+
+ # Use errno.h from prefix rather than from host system, bug #645804
+ if use prefix && ! use prefix-guest; then
+ sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.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"
+
+ # xlocale.h is going away in glibc-2.26, so it's counterproductive
+ # if we use it and include it in CORE/perl.h ... Perl builds just
+ # fine with glibc and locale.h only.
+ # However, the darwin prefix people have no locale.h ...
+ use elibc_glibc && myconf -Ui_xlocale
+
+ # 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"
+
+ # Generic LTO broken since 5.28, triggers EUMM failures
+ filter-flags "-flto"
+
+ 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;
+ export GENTOO_ASSUME_SANDBOXED="${GENTOO_ASSUME_SANDBOXED:-1}"
+ export GENTOO_NO_PORTING_TESTS="${GENTOO_NO_PORTING_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..3fee6ac8677a
--- /dev/null
+++ b/dev-lang/perl/perl-5.28.9999.ebuild
@@ -0,0 +1,642 @@
+# Copyright 1999-2018 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.9
+PATCH_BASE="perl-5.28.0-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=""
+if [[ "${PV##*.}" == "9999" ]]; then
+ DIST_VERSION=5.28.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="https://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.280.0 ptar ptardiff ptargrep
+ src_remove_dual perl-core/CPAN 2.200.0 cpan
+ src_remove_dual perl-core/Digest-SHA 6.10.0 shasum
+ src_remove_dual perl-core/Encode 2.970.0 enc2xs piconv
+ src_remove_dual perl-core/ExtUtils-MakeMaker 7.340.0 instmodsh
+ src_remove_dual perl-core/ExtUtils-ParseXS 3.390.0 xsubpp
+ src_remove_dual perl-core/IO-Compress 2.74.0 zipdetails
+ src_remove_dual perl-core/JSON-PP 2.970.10 json_pp
+ src_remove_dual perl-core/Module-CoreList 5.201.806.220 corelist
+ src_remove_dual perl-core/Pod-Parser 1.630.0 pod2usage podchecker podselect
+ src_remove_dual perl-core/Pod-Perldoc 3.280.100 perldoc
+ src_remove_dual perl-core/Test-Harness 3.420.0 prove
+ src_remove_dual perl-core/podlators 4.100.0 pod2man pod2text
+ src_remove_dual_man perl-core/podlators 4.100.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/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"
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ # do NOT mess with nsl, on Solaris this is always necessary,
+ # when -lsocket is used e.g. to get h_errno
+ sed -i '/gentoo\/no-nsl\.patch/d' "${WORKDIR}/patches/series" || die "Can't exclude libnsl patch"
+ fi
+
+ 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
+
+ # Use errno.h from prefix rather than from host system, bug #645804
+ if use prefix && ! use prefix-guest; then
+ sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.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"
+
+ # xlocale.h is going away in glibc-2.26, so it's counterproductive
+ # if we use it and include it in CORE/perl.h ... Perl builds just
+ # fine with glibc and locale.h only.
+ # However, the darwin prefix people have no locale.h ...
+ use elibc_glibc && myconf -Ui_xlocale
+
+ # 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"
+
+ # Generic LTO broken since 5.28, triggers EUMM failures
+ filter-flags "-flto"
+
+ 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;
+ export GENTOO_ASSUME_SANDBOXED="${GENTOO_ASSUME_SANDBOXED:-1}"
+ export GENTOO_NO_PORTING_TESTS="${GENTOO_NO_PORTING_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-5.6.35-r1 b/dev-lang/php-5.6.35-r1
deleted file mode 100644
index de6003ccfced..000000000000
--- a/dev-lang/php-5.6.35-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) cjk? ( !gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) ) 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:0= ) ) firebird? ( dev-db/firebird ) gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) gdbm? ( >=sys-libs/gdbm-1.8.0: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:0= ) ) 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:0= ) ) unicode? ( <dev-libs/oniguruma-6.8.0:= ) vpx? ( media-libs/libvpx:0= ) 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:0= ) xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) zip? ( sys-libs/zlib:0= ) zlib? ( sys-libs/zlib:0= ) 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 >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=The PHP language runtime engine
-EAPI=6
-HOMEPAGE=https://secure.php.net/
-IUSE=embed +cli cgi fpm apache2 threads 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
-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
-LICENSE=PHP-3.01 BSD Zend-2.0 bcmath? ( LGPL-2.1+ ) fpm? ( BSD-2 ) gd? ( gd ) unicode? ( BSD-2 LGPL-2.1 )
-RDEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) cjk? ( !gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) ) 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:0= ) ) firebird? ( dev-db/firebird ) gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) gdbm? ( >=sys-libs/gdbm-1.8.0: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:0= ) ) 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:0= ) ) unicode? ( <dev-libs/oniguruma-6.8.0:= ) vpx? ( media-libs/libvpx:0= ) 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:0= ) xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) zip? ( sys-libs/zlib:0= ) zlib? ( sys-libs/zlib:0= ) virtual/mta fpm? ( selinux? ( sec-policy/selinux-phpfpm ) systemd? ( sys-apps/systemd ) )
-REQUIRED_USE=|| ( cli cgi fpm apache2 embed ) cli? ( ^^ ( readline libedit ) ) truetype? ( gd zlib ) vpx? ( gd zlib ) cjk? ( gd zlib ) exif? ( gd zlib ) xpm? ( gd zlib ) 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 )
-SLOT=5.6
-SRC_URI=https://php.net/distributions/php-5.6.35.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=fd7e48951308917b4f2453e29bf8d6b2
diff --git a/dev-lang/php-5.6.36 b/dev-lang/php-5.6.36
deleted file mode 100644
index de484136b2d4..000000000000
--- a/dev-lang/php-5.6.36
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) cjk? ( !gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) ) 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:0= ) ) firebird? ( dev-db/firebird ) gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) gdbm? ( >=sys-libs/gdbm-1.8.0: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:0= ) ) 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:0= ) ) unicode? ( dev-libs/oniguruma:= ) vpx? ( media-libs/libvpx:0= ) 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:0= ) xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) zip? ( sys-libs/zlib:0= ) zlib? ( sys-libs/zlib:0= ) 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 >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 virtual/pkgconfig
-DESCRIPTION=The PHP language runtime engine
-EAPI=6
-HOMEPAGE=https://secure.php.net/
-IUSE=embed +cli cgi fpm apache2 threads 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
-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
-LICENSE=PHP-3.01 BSD Zend-2.0 bcmath? ( LGPL-2.1+ ) fpm? ( BSD-2 ) gd? ( gd ) unicode? ( BSD-2 LGPL-2.1 )
-RDEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) cjk? ( !gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) ) 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:0= ) ) firebird? ( dev-db/firebird ) gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) gdbm? ( >=sys-libs/gdbm-1.8.0: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:0= ) ) 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:0= ) ) unicode? ( dev-libs/oniguruma:= ) vpx? ( media-libs/libvpx:0= ) 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:0= ) xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) zip? ( sys-libs/zlib:0= ) zlib? ( sys-libs/zlib:0= ) virtual/mta fpm? ( selinux? ( sec-policy/selinux-phpfpm ) systemd? ( sys-apps/systemd ) )
-REQUIRED_USE=|| ( cli cgi fpm apache2 embed ) cli? ( ^^ ( readline libedit ) ) truetype? ( gd zlib ) vpx? ( gd zlib ) cjk? ( gd zlib ) exif? ( gd zlib ) xpm? ( gd zlib ) 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 )
-SLOT=5.6
-SRC_URI=https://php.net/distributions/php-5.6.36.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c1fe8b89d63b4cd3caf23a6a740675a7
diff --git a/dev-lang/php-7.0.29 b/dev-lang/php-7.0.29
deleted file mode 100644
index c4a9be5e67dc..000000000000
--- a/dev-lang/php-7.0.29
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) cjk? ( !gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) ) 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:0= ) ) firebird? ( dev-db/firebird ) gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) gdbm? ( >=sys-libs/gdbm-1.8.0: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:0= ) ) tidy? ( app-text/htmltidy ) truetype? ( =media-libs/freetype-2* !gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) ) unicode? ( dev-libs/oniguruma:= ) wddx? ( >=dev-libs/libxml2-2.6.8 ) webp? ( media-libs/libwebp:0= ) 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:0= ) xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) zip? ( sys-libs/zlib:0= ) zlib? ( sys-libs/zlib:0= ) 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 virtual/pkgconfig
-DESCRIPTION=The PHP language runtime engine
-EAPI=6
-HOMEPAGE=https://secure.php.net/
-IUSE=embed +cli cgi fpm apache2 phpdbg threads 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
-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
-LICENSE=PHP-3.01 BSD Zend-2.0 bcmath? ( LGPL-2.1+ ) fpm? ( BSD-2 ) gd? ( gd ) unicode? ( BSD-2 LGPL-2.1 )
-RDEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) cjk? ( !gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) ) 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:0= ) ) firebird? ( dev-db/firebird ) gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) gdbm? ( >=sys-libs/gdbm-1.8.0: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:0= ) ) tidy? ( app-text/htmltidy ) truetype? ( =media-libs/freetype-2* !gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) ) unicode? ( dev-libs/oniguruma:= ) wddx? ( >=dev-libs/libxml2-2.6.8 ) webp? ( media-libs/libwebp:0= ) 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:0= ) xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) zip? ( sys-libs/zlib:0= ) zlib? ( sys-libs/zlib:0= ) virtual/mta fpm? ( selinux? ( sec-policy/selinux-phpfpm ) systemd? ( sys-apps/systemd ) )
-REQUIRED_USE=|| ( cli cgi fpm apache2 embed phpdbg ) cli? ( ^^ ( readline libedit ) ) truetype? ( gd zlib ) webp? ( gd zlib ) cjk? ( gd zlib ) exif? ( gd zlib ) xpm? ( gd zlib ) 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 ) )
-SLOT=7.0
-SRC_URI=https://secure.php.net/distributions/php-7.0.29.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=6d06273299000122a68469009610f66b
diff --git a/dev-lang/php-7.0.30 b/dev-lang/php-7.0.30
deleted file mode 100644
index c7ca2072f269..000000000000
--- a/dev-lang/php-7.0.30
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) cjk? ( !gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) ) 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:0= ) ) firebird? ( dev-db/firebird ) gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) gdbm? ( >=sys-libs/gdbm-1.8.0: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:0= ) ) tidy? ( app-text/htmltidy ) truetype? ( =media-libs/freetype-2* !gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) ) unicode? ( dev-libs/oniguruma:= ) wddx? ( >=dev-libs/libxml2-2.6.8 ) webp? ( media-libs/libwebp:0= ) 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:0= ) xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) zip? ( sys-libs/zlib:0= ) zlib? ( sys-libs/zlib:0= ) 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 virtual/pkgconfig
-DESCRIPTION=The PHP language runtime engine
-EAPI=6
-HOMEPAGE=https://secure.php.net/
-IUSE=embed +cli cgi fpm apache2 phpdbg threads 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
-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
-LICENSE=PHP-3.01 BSD Zend-2.0 bcmath? ( LGPL-2.1+ ) fpm? ( BSD-2 ) gd? ( gd ) unicode? ( BSD-2 LGPL-2.1 )
-RDEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) cjk? ( !gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) ) 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:0= ) ) firebird? ( dev-db/firebird ) gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) gdbm? ( >=sys-libs/gdbm-1.8.0: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:0= ) ) tidy? ( app-text/htmltidy ) truetype? ( =media-libs/freetype-2* !gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= ) ) unicode? ( dev-libs/oniguruma:= ) wddx? ( >=dev-libs/libxml2-2.6.8 ) webp? ( media-libs/libwebp:0= ) 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:0= ) xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) zip? ( sys-libs/zlib:0= ) zlib? ( sys-libs/zlib:0= ) virtual/mta fpm? ( selinux? ( sec-policy/selinux-phpfpm ) systemd? ( sys-apps/systemd ) )
-REQUIRED_USE=|| ( cli cgi fpm apache2 embed phpdbg ) cli? ( ^^ ( readline libedit ) ) truetype? ( gd zlib ) webp? ( gd zlib ) cjk? ( gd zlib ) exif? ( gd zlib ) xpm? ( gd zlib ) 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 ) )
-SLOT=7.0
-SRC_URI=https://secure.php.net/distributions/php-7.0.30.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=7eea58a1f5844d51c05945edfb86afd0
diff --git a/dev-lang/php-7.1.16 b/dev-lang/php-7.1.16
deleted file mode 100644
index cfd323cfd9da..000000000000
--- a/dev-lang/php-7.1.16
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) 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: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 ) session-mm? ( 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:0= ) ) 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:0= ) 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:0= ) zlib? ( sys-libs/zlib:0= ) app-arch/xz-utils >=sys-devel/bison-3.0.1 virtual/pkgconfig
-DESCRIPTION=The PHP language runtime engine
-EAPI=6
-HOMEPAGE=https://secure.php.net/
-IUSE=embed +cli cgi fpm apache2 phpdbg threads 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 session-mm 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
-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
-LICENSE=PHP-3.01 BSD Zend-2.0 bcmath? ( LGPL-2.1+ ) fpm? ( BSD-2 ) gd? ( gd ) unicode? ( BSD-2 LGPL-2.1 )
-RDEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) 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: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 ) session-mm? ( 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:0= ) ) 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:0= ) 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:0= ) zlib? ( sys-libs/zlib:0= ) virtual/mta fpm? ( selinux? ( sec-policy/selinux-phpfpm ) systemd? ( sys-apps/systemd ) )
-REQUIRED_USE=|| ( cli cgi fpm apache2 embed phpdbg ) cli? ( ^^ ( readline libedit ) ) truetype? ( gd zlib ) webp? ( gd zlib ) cjk? ( gd zlib ) exif? ( gd zlib ) xpm? ( gd zlib ) 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 ) session-mm? ( session !threads ) mysql? ( || ( mysqli pdo ) )
-SLOT=7.1
-SRC_URI=https://secure.php.net/distributions/php-7.1.16.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=364eb5076207635db67f8c68381a3008
diff --git a/dev-lang/php-7.1.18 b/dev-lang/php-7.1.18
deleted file mode 100644
index ed29909fe9c3..000000000000
--- a/dev-lang/php-7.1.18
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) 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: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 ) session-mm? ( 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:0= ) ) 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:0= ) 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:0= ) zlib? ( sys-libs/zlib:0= ) app-arch/xz-utils >=sys-devel/bison-3.0.1 virtual/pkgconfig
-DESCRIPTION=The PHP language runtime engine
-EAPI=6
-HOMEPAGE=https://secure.php.net/
-IUSE=embed +cli cgi fpm apache2 phpdbg threads 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 session-mm 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
-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
-LICENSE=PHP-3.01 BSD Zend-2.0 bcmath? ( LGPL-2.1+ ) fpm? ( BSD-2 ) gd? ( gd ) unicode? ( BSD-2 LGPL-2.1 )
-RDEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) 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: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 ) session-mm? ( 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:0= ) ) 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:0= ) 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:0= ) zlib? ( sys-libs/zlib:0= ) virtual/mta fpm? ( selinux? ( sec-policy/selinux-phpfpm ) systemd? ( sys-apps/systemd ) )
-REQUIRED_USE=|| ( cli cgi fpm apache2 embed phpdbg ) cli? ( ^^ ( readline libedit ) ) truetype? ( gd zlib ) webp? ( gd zlib ) cjk? ( gd zlib ) exif? ( gd zlib ) xpm? ( gd zlib ) 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 ) session-mm? ( session !threads ) mysql? ( || ( mysqli pdo ) )
-SLOT=7.1
-SRC_URI=https://secure.php.net/distributions/php-7.1.18.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=a24afb9979decd9b39d7c1e9073a7e31
diff --git a/dev-lang/php-7.1.19 b/dev-lang/php-7.1.19
deleted file mode 100644
index 0e3eeecaadd2..000000000000
--- a/dev-lang/php-7.1.19
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) 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: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 ) session-mm? ( 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:0= ) ) 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:0= ) 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:0= ) zlib? ( sys-libs/zlib:0= ) app-arch/xz-utils >=sys-devel/bison-3.0.1 virtual/pkgconfig
-DESCRIPTION=The PHP language runtime engine
-EAPI=6
-HOMEPAGE=https://secure.php.net/
-IUSE=embed +cli cgi fpm apache2 phpdbg threads 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 session-mm 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
-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
-LICENSE=PHP-3.01 BSD Zend-2.0 bcmath? ( LGPL-2.1+ ) fpm? ( BSD-2 ) gd? ( gd ) unicode? ( BSD-2 LGPL-2.1 )
-RDEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) 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: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 ) session-mm? ( 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:0= ) ) 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:0= ) 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:0= ) zlib? ( sys-libs/zlib:0= ) virtual/mta fpm? ( selinux? ( sec-policy/selinux-phpfpm ) systemd? ( sys-apps/systemd ) )
-REQUIRED_USE=|| ( cli cgi fpm apache2 embed phpdbg ) cli? ( ^^ ( readline libedit ) ) truetype? ( gd zlib ) webp? ( gd zlib ) cjk? ( gd zlib ) exif? ( gd zlib ) xpm? ( gd zlib ) 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 ) session-mm? ( session !threads ) mysql? ( || ( mysqli pdo ) )
-SLOT=7.1
-SRC_URI=https://secure.php.net/distributions/php-7.1.19.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=db1dfea9e95c4e8774e1833d0098f134
diff --git a/dev-lang/php-7.2.7 b/dev-lang/php-7.2.7
deleted file mode 100644
index 255513048812..000000000000
--- a/dev-lang/php-7.2.7
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) 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: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 ) session-mm? ( 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:0= ) ) 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:0= ) 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:0= ) zip-encryption? ( >=dev-libs/libzip-1.2.0:= ) zlib? ( sys-libs/zlib:0= ) app-arch/xz-utils >=sys-devel/bison-3.0.1 virtual/pkgconfig
-DESCRIPTION=The PHP language runtime engine
-EAPI=6
-HOMEPAGE=https://secure.php.net/
-IUSE=embed +cli cgi fpm apache2 phpdbg threads 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 session-mm 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
-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
-LICENSE=PHP-3.01 BSD Zend-2.0 bcmath? ( LGPL-2.1+ ) fpm? ( BSD-2 ) gd? ( gd ) unicode? ( BSD-2 LGPL-2.1 )
-RDEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre-8.32[unicode] fpm? ( 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:0= ) 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: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 ) session-mm? ( 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:0= ) ) 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:0= ) 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:0= ) zip-encryption? ( >=dev-libs/libzip-1.2.0:= ) zlib? ( sys-libs/zlib:0= ) virtual/mta fpm? ( selinux? ( sec-policy/selinux-phpfpm ) systemd? ( sys-apps/systemd ) )
-REQUIRED_USE=|| ( cli cgi fpm apache2 embed phpdbg ) cli? ( ^^ ( readline libedit ) ) truetype? ( gd zlib ) webp? ( gd zlib ) cjk? ( gd zlib ) exif? ( gd zlib ) xpm? ( gd zlib ) 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 ) session-mm? ( session !threads ) mysql? ( || ( mysqli pdo ) ) zip-encryption? ( zip )
-SLOT=7.2
-SRC_URI=https://secure.php.net/distributions/php-7.2.7.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=643b38c9857c0600954a654e189d59f4
diff --git a/dev-lang/php-7.3.0_alpha1 b/dev-lang/php-7.3.0_alpha1
deleted file mode 100644
index 99aac33538bc..000000000000
--- a/dev-lang/php-7.3.0_alpha1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre2-10.30[unicode] fpm? ( 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:0= ) 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-1.2.0.4 ) gdbm? ( >=sys-libs/gdbm-1.8.0: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 ) session-mm? ( 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-1.0.1:0= ) libressl? ( dev-libs/libressl:0= ) ) 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:0= ) 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-1.2.0.4:0= ) zip-encryption? ( >=dev-libs/libzip-1.2.0:= ) zlib? ( >=sys-libs/zlib-1.2.0.4:0= ) app-arch/xz-utils >=sys-devel/bison-3.0.1 virtual/pkgconfig
-DESCRIPTION=The PHP language runtime engine
-EAPI=6
-HOMEPAGE=https://secure.php.net/
-IUSE=embed +cli cgi fpm apache2 phpdbg threads 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 session-mm 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
-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
-LICENSE=PHP-3.01 BSD Zend-2.0 bcmath? ( LGPL-2.1+ ) fpm? ( BSD-2 ) gd? ( gd ) unicode? ( BSD-2 LGPL-2.1 )
-RDEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre2-10.30[unicode] fpm? ( 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:0= ) 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-1.2.0.4 ) gdbm? ( >=sys-libs/gdbm-1.8.0: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 ) session-mm? ( 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-1.0.1:0= ) libressl? ( dev-libs/libressl:0= ) ) 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:0= ) 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-1.2.0.4:0= ) zip-encryption? ( >=dev-libs/libzip-1.2.0:= ) zlib? ( >=sys-libs/zlib-1.2.0.4:0= ) virtual/mta fpm? ( selinux? ( sec-policy/selinux-phpfpm ) systemd? ( sys-apps/systemd ) )
-REQUIRED_USE=|| ( cli cgi fpm apache2 embed phpdbg ) cli? ( ^^ ( readline libedit ) ) truetype? ( gd zlib ) webp? ( gd zlib ) cjk? ( gd zlib ) exif? ( gd zlib ) xpm? ( gd zlib ) 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 ) session-mm? ( session !threads ) mysql? ( || ( mysqli pdo ) ) zip-encryption? ( zip )
-SLOT=7.3
-SRC_URI=https://downloads.php.net/~stas/php-7.3.0alpha1.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=f21abf628a551d67a16b3f43e489405c
diff --git a/dev-lang/php-7.3.0_alpha3 b/dev-lang/php-7.3.0_alpha3
deleted file mode 100644
index f6db19669616..000000000000
--- a/dev-lang/php-7.3.0_alpha3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre2-10.30[unicode] fpm? ( 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:0= ) 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-1.2.0.4 ) gdbm? ( >=sys-libs/gdbm-1.8.0: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 ) session-mm? ( 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-1.0.1:0= ) libressl? ( dev-libs/libressl:0= ) ) 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:0= ) 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-1.2.0.4:0= ) zip-encryption? ( >=dev-libs/libzip-1.2.0:= ) zlib? ( >=sys-libs/zlib-1.2.0.4:0= ) app-arch/xz-utils >=sys-devel/bison-3.0.1 virtual/pkgconfig
-DESCRIPTION=The PHP language runtime engine
-EAPI=6
-HOMEPAGE=https://secure.php.net/
-IUSE=embed +cli cgi fpm apache2 phpdbg threads 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 session-mm 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
-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
-LICENSE=PHP-3.01 BSD Zend-2.0 bcmath? ( LGPL-2.1+ ) fpm? ( BSD-2 ) gd? ( gd ) unicode? ( BSD-2 LGPL-2.1 )
-RDEPEND=>=app-eselect/eselect-php-0.9.1[apache2?,fpm?] >=dev-libs/libpcre2-10.30[unicode] fpm? ( 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:0= ) 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-1.2.0.4 ) gdbm? ( >=sys-libs/gdbm-1.8.0: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 ) session-mm? ( 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-1.0.1:0= ) libressl? ( dev-libs/libressl:0= ) ) 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:0= ) 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-1.2.0.4:0= ) zip-encryption? ( >=dev-libs/libzip-1.2.0:= ) zlib? ( >=sys-libs/zlib-1.2.0.4:0= ) virtual/mta fpm? ( selinux? ( sec-policy/selinux-phpfpm ) systemd? ( sys-apps/systemd ) )
-REQUIRED_USE=|| ( cli cgi fpm apache2 embed phpdbg ) cli? ( ^^ ( readline libedit ) ) truetype? ( gd zlib ) webp? ( gd zlib ) cjk? ( gd zlib ) exif? ( gd zlib ) xpm? ( gd zlib ) 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 ) session-mm? ( session !threads ) mysql? ( || ( mysqli pdo ) ) zip-encryption? ( zip )
-SLOT=7.3
-SRC_URI=https://downloads.php.net/~cmb/php-7.3.0alpha3.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 systemd 04e50685fbf3d89e5c67ac6a385dd595 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=47d3bed92e5f84eb2a86a2a46a9ada49
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
new file mode 100644
index 000000000000..e90bd2ee0634
--- /dev/null
+++ b/dev-lang/php/Manifest
@@ -0,0 +1,29 @@
+AUX 20php5-envd 145 BLAKE2B 06476b8fc04d1e835496b417ac752f0834ddbe8584e4fddc6db0aa5e6845b82cdea0a1355c77125375dcdd0f0a3c19de5f3a8a64ee93950f96c437a16f971567 SHA512 581aa86479e3cd584ee1bc6dc6d4a135fe8ec343fe5519566d728d81f7018cfb23658bd0c0368951d380982c75adbb4f45acf3c146868aaf4e4ec8e9f2fad1ce
+AUX 5.6-mbstring-oniguruma-6.8.patch 880 BLAKE2B 7526874436b0fee12d0bc80487abe8a2e152491b52d2b3c041e4162284a3be580d88649704d360e85b0985d6406d2d26fe55c147a091fef1adbe7631cedafeeb SHA512 8767aa16f72fec2e4d79d8b15559ffe6afcf97c1664d963befc5565ead5eb3a5291982ece941441f57cfac21589c5e8eecf359b111b27a880919f77652e4de65
+AUX libressl-compatibility.patch 2978 BLAKE2B 714e268149d973beb0d2d76f90e15adde57acb7aed028131c6dee2a34b11980fedff487ccec67e20d9a9094014878e13bd7e180e98bb0ee304c5916324016823 SHA512 58ed57061f31da72c96cbca6f6e86d1466c96c8562dfa6551b4a8d16bd6e537b848ca34cbe57c5c220c72158e176f9cd7c07d282fe1fd69ebf5475c48bf95c26
+AUX mbstring-oniguruma-6.8.patch 1488 BLAKE2B 181aacdd5fc01e5b11246d624cd88a5d3184c00343abb8a9e36d1e224dce185a81521c0498d562e51768e4c035806f007f9cd5ed930b7abe2a3da2e5b519f5b3 SHA512 5a3334ca98da9ac22be67021e4e859c89826aec8393d4b56c4e52336a5fc689acd2579ff44ac984a40711ccaf917a810264b07a0071f8161da18e2bffd3d0c05
+AUX php-5.6-no-bison-warnings.patch 1428 BLAKE2B d37bc7a1ae803aa4a14d32f0ca5613b7bc82610248d6de5ef7b6078fdcfa944cd1c245aa919137ff0d6968c8621b5acf2638386307c46fdbb8c98eba991eb674 SHA512 8f751c638c833d535e022434cd8ace5c175703bf61dfab7bea3e52d9419700e2b85c4cca40da9ab6056e8fd9c0bc1fab55810bb1193bed14ce0a50ce653fe62b
+AUX php-fpm_at-simple.service 316 BLAKE2B 0ba10f3e3b004fbf14956e1e4f04f59b8a127e6717fe6b92c09b9f931033a11551c75fbbee9010f6b694c5a8758ca0eec9eed457ae304ba0dea8f2c256c3b8d4 SHA512 7367a3f8d3874f8e0c76f331ba613a0250db02f60ad9f87affaf448dcb5bc34bcecb91d88f415764a12b24b46ae3d1b738a002af9f77a4b707e916e83a0021fd
+AUX php-fpm_at.service 317 BLAKE2B f13fc38fcc0575a8517ee8d07b120efda37eabd2355061d0fdc303604c6b02ad42d7301180d86c977d5e585f5dd685343c592e37a6e0f44933707be79e0b77e0 SHA512 27982f9e2d958bfa75c89c7d3531e48d17fc388b1cdcbc8e09051b236b1184ee2baabdfcc567c19d9fcd067d4b3b86f171015616d8da42fccdabd89432d865e8
+AUX php-freetype-2.9.1.patch 7667 BLAKE2B efc8f829bbad11b3e7b654d0882213ecb9aae766060d51f93446a6293a2f607339faba484c7b0b2f9318a5c5442da3c09e25aeda20dbc5e3258bf1009f8625b4 SHA512 0a06189f6fb3513cd2dcf9ddb590360475e2dd9a7aa8b13ab66c389c1ed40ce2361681f017cd3c6219f5b40a0a9d4978e57ca3ee4bacb7657db3285136fd2875
+DIST php-5.6.35.tar.xz 12466396 BLAKE2B 96757fc064c139f238329c51741538fdbdefd04abad59c37565e1882a5a7df7d3755cf496561336b25748a968fb18dbf9d542a54a672f553f4be5ead292141cc SHA512 dd7d891954aa7f8e83eecb265e1bb01dfd357092dad0cfc5a3f441bea069f7181cd79330653b178d4953ac1ee8570d7f4c21acc8fc67975dd7dc1413eaebf0af
+DIST php-5.6.36.tar.xz 12467560 BLAKE2B 8badaabc668ff3a4b1129f03605a1570729f8196d2e2539fe85bc42a628f2b24ea76c298b194e8466d9218ae98218243430c8d36d73fbd32b042dd6453510361 SHA512 807c68ab85b6685b19707bd18cfd46f3695b2dc67f9f17f85476634e4a80a036cb413ccae05ed5ba529eafe8df57ebf758dd664ed2942ec44f90a6e8b0172e5e
+DIST php-7.0.29.tar.xz 12400192 BLAKE2B 0bd1bd9450b87437e539ec5131cb4f7e4dbf76d5fd5212bdf34c4f022dd8f2d357e9a845d83b485d89469e20675c031bcf382a8ca348161dfd082d7a389ffcb2 SHA512 ea5a2fbcfc875dd2621e3f67038c1e00f43b53bc7079ae2127fcefbf116db0f32e34d4435f8211305402a4eccdaa5dfd6b96cf9416e68700f2c1f438d74a0af8
+DIST php-7.0.30.tar.xz 12030228 BLAKE2B cc4c50d108fca68ee98b70a3007893d912d2343dd255faf52e41c1de04f590f427d9edad7b637177ccf1d9c62212ee6060baca13931c0aa14532df548ef159aa SHA512 1f0914ebda79247aa65ace63f6c8c4fcd850b21a82704f7b6482760259239cc5fee4cfd5aa2ed590b56822b4d69330ac472f46537e7f25d59e73ba63a48827c5
+DIST php-7.1.16.tar.xz 12211512 BLAKE2B bf242e2438b2dc363368a9ef4478349a291f483477ccedf988abd0fbb78a6f1b31e3b86dcb39ed9a9a8151674a8373ae77d8420e77efd6a2e05d5cfc778ed40f SHA512 98e96f06a4912cfa6926be2f292ce7120ca893c9b779b2efef4120c1df3580fa427cd58f5e4977edb01a0ae3b85660d6ca79b2bd79b6cd830cd77f6c6588b5ea
+DIST php-7.1.18.tar.xz 12213396 BLAKE2B f851c6eb261b8b532e84e73e6f173deb6ac00cd5168a02db9811843540aeadc390a4c5416eb17749cc950bbb1eda1045f538e2b80e4734ea2c0c4e264776bffb SHA512 7eacbc3b98d8b668c90d5c93030263f47ba2e0d4d7820594662590b8b68670f734a2274ae476e3aeac7e030c4ef10411a80da3523383e87a6757e87597caee90
+DIST php-7.1.19.tar.xz 12215112 BLAKE2B 13f39fa258b5257e00b300d9488dc53caac8b005a01c4db98a05681334ab0dfade713116581da3f150dc20f4428fb249e00d705696d12b1daa13fc16fdaeedb9 SHA512 af966ef8d4172bbdac84bebbf6bf5cfd04376564307e925d3eecd1ba8f23b84dbb55f653d21adad120605d015ea4d15898e0a9154c85f4fc974b6ef695f6c566
+DIST php-7.2.7.tar.xz 12115168 BLAKE2B 787621d6bfcfa2f8f7176e3fab5b1f521f82169d5d8367664404eda4503e477a16233c6b155170e8a0c76c1d67674bc9bb0922ea65c3694977df0c6c2aba6a04 SHA512 fe9d632f190e62d97848035584f387987856348c6ca288a8bdf85bc2c48de73c20e774776a1a8928a470a6108121c993c032529836a8ffe6bcfe45724d432829
+DIST php-7.3.0alpha1.tar.xz 11746836 BLAKE2B 14feb7a31652d2f4cf3d34f0f0450fbcc597d026177b60455887657213acd6d5a8a11f96df30e9d18f51a95409bb944ba287aaee0b84ef1b66ffd61aeb8821d5 SHA512 5fedb7716bd194bd9692de9d2ac88b4bac876b74e463a43ae5bc5fd4f63bbf85d02c9d2f1f1e952c45b7867ccb2bd80b99dc77c9f2051967b9efe9fdcc5862ae
+DIST php-7.3.0alpha3.tar.xz 11890052 BLAKE2B 4e069bb3c68e4fd26bac319fe840ad683d42f5a7a3f16b907f1814290be77c018670fd342032b6514f1b76eb924da7a614d79ce9c4708837bdc9cd214d4614fc SHA512 7d867db75ac1d5648c0f52c58a6d955329967f7a9399d5fa7b403868ba1a3d72cebe1c4e97ccd79baefae61a6fb1ff2363a6894bd712e81074c7e743e9bc2f1e
+EBUILD php-5.6.35-r1.ebuild 22774 BLAKE2B a12399c51c1d3fe4516d5ad713955c8a26f83c3ccb3711e2c2f74344bc9e4204b629a2730ab02d82f16f1cf2a798621b9d0e7b3f3da7ab82948ee5584c76f0e6 SHA512 75a2888cf640551ab0391dfa1ae554943b8bbf81bb34b7ed6f3a66e68774e3c3484d11c5562cea856e3a37220ba297515c5e864f67aeb4d230786bade7195aa1
+EBUILD php-5.6.36.ebuild 22822 BLAKE2B 2bfb820bf178f6d1ded793c0a035b6154237bd59e5fb6733b02be77d975e11c0b6cd12f293ccc59ac2e0c92e0a32539e5494a6b7f08b61c3e61dc59806664285 SHA512 a0c314a61a2b7c8c848e91d86eb94da7e7f8cdaa0220bb0f031a3dc627fac6348cea1af4b4a0593b76df26e379d8419e7644fdcd1b586babef297529f3568407
+EBUILD php-7.0.29.ebuild 22032 BLAKE2B e27ecd2e0429f2115b9245961bcc63470a8edfb3611de68a76eff0fb32837599580a146fe9d556da8176208e333c372ab81a979ff8e2f2fb02e5af2cd9e89eb7 SHA512 83b800cf9c9de8de6060c9fe0ab5d4c2e8d1aabbc541ce1e78c31eb031ad67206b0eb94d03213f2c8d9e51e9af3a199459bc7ea0f5a717a2bcb33601403b1df5
+EBUILD php-7.0.30.ebuild 22033 BLAKE2B e55a92a39ffca9625cc408d188b8d32463201247b6437ea1a95baa33bd17f7a201716ba9a8a68b41a5c6e131ca443dc629b486bdce0f51aa006392897da423ae SHA512 d7bf3082aea9fa2afdb387e3c0412fd9c1c7c9594f10c4cfa8ddc53a4c31e31a07abd35a306388aadc94c9e282e0e55503ef3b9118c4c97f9b0557c0c1655a82
+EBUILD php-7.1.16.ebuild 21920 BLAKE2B 4082a39d5f3b202f183699463007c0b56291c2c59a9b773fcf4ff7ec1e3ae51770b7bbc0880826df9954ca8bce9ee5e31c5c01b29b5b2d2b9ef748ea1a8f41b4 SHA512 4903c460fa81319842683a420315ce958bbd3d232f474769ff7531a2541d43bba8a258f50fa63c30814180f2aff9e627626de055a10446ad935ca0eeaf6939dc
+EBUILD php-7.1.18.ebuild 21876 BLAKE2B f046afb95e9d0bd43d90c09b16a016a049608729913eebb3849a3801955eb0de88c450d4a068179fe275abf005d6ba7a0e97f1163992e049ffbfa47256a5bbc7 SHA512 f32768b81785ce618b411edfcaada57c10c38cf1437b1fa7079f3f97552cb31ea05dd9bebbaf1a056b81976c52bf264801b47a0c990ecd14e9034acc15d8f75c
+EBUILD php-7.1.19.ebuild 21730 BLAKE2B d7e183b903dbea7f3b88d1d80bf9cd3cc04104ad1133fe6266cdb09db754f572cbfe291f2971bc3e946ea76a11cacacec0a05ebc4b8a1fbd005c274c65f5de64 SHA512 46902cfc5603b90ab72eef3dd4fdb615b2e9f7daa79accb1121406773249a702e90a721b2e6528ed48bc9c3d9d2e575112f7cc04d13dc48c41692c9c278cb55d
+EBUILD php-7.2.7.ebuild 22261 BLAKE2B 700b42b3636fc35c89ab1f0762304986892a245881a2c66a708651801bddb6fd19eacefa7590c50177fb7f36f4f352ed46b9220c3f27e0304fb022d7eceedb80 SHA512 5505b157d3db37e8679ef65d7c237c867b73fc79a73ca39d646d676b6e410687deaab1b6ac762587480e927dd23d323dcd7d760906c7de100f85be78ca190e9b
+EBUILD php-7.3.0_alpha1.ebuild 22352 BLAKE2B 07b282cdc9c18dc43fe3aea930fc5276b478081592c01d0bf88188eb1d4a97258193d2b67782d2b4c6c680aea6e8faa4e9ebf4259a5d023ccb93d9b5493f319c SHA512 dc9fb07497018f08d1cf2a7df05c9b7a375c27ba3e8e3bd2d24fdc993aa10082b2f440563519c9e4f6ad685a662ed51a29559a061cbc0f238eac32f9d8fb0fc1
+EBUILD php-7.3.0_alpha3.ebuild 22351 BLAKE2B 133630e06fa9c8c838db04506afd3f687761039e72b3e297f52382f0d55a3728f75bc30dd27d38f72880647c052407c268557d1ce5b1a91ca5390e86bb6b9857 SHA512 1de5e51be4c911b5d250c594219263eb7c154b07a61519ac509727bce019e21a2b9e61ce70aec5321a7169781cf2d656a56811de6b076430a981d0cec8fbe36b
+MISC metadata.xml 2577 BLAKE2B 9b15d6073181a5f5ff7b00ef8b68d24c7ea8763171ae84895ebc4a6925f589d2a02e4e29116c2741b3502b35d32aa58e7ed909e144c0e694f8cce5b4d26ecd3b SHA512 14e6daa693325b8a27157cff22d0b0cae9d89e4dada775f39188f7f36546b78a8b19efedb2f7b6f64ee1375bf29d3af32a8f7d6e7bf0d04cf2a7241abd154afa
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/5.6-mbstring-oniguruma-6.8.patch b/dev-lang/php/files/5.6-mbstring-oniguruma-6.8.patch
new file mode 100644
index 000000000000..642b261950fb
--- /dev/null
+++ b/dev-lang/php/files/5.6-mbstring-oniguruma-6.8.patch
@@ -0,0 +1,12 @@
+diff -aurN a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
+--- a/ext/mbstring/php_mbregex.c 2018-03-28 17:28:58.000000000 -0400
++++ b/ext/mbstring/php_mbregex.c 2018-04-04 12:53:23.268296387 -0400
+@@ -454,7 +454,7 @@
+ OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
+
+ found = zend_hash_find(&MBREX(ht_rc), (char *)pattern, patlen+1, (void **) &rc);
+- if (found == FAILURE || (*rc)->options != options || (*rc)->enc != enc || (*rc)->syntax != syntax) {
++ if (found == FAILURE || onig_get_options(*rc) != options || onig_get_encoding(*rc) != enc || onig_get_syntax(*rc) != syntax) {
+ if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
+ onig_error_code_to_str(err_str, err_code, &err_info);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "mbregex compile err: %s", err_str);
diff --git a/dev-lang/php/files/libressl-compatibility.patch b/dev-lang/php/files/libressl-compatibility.patch
new file mode 100644
index 000000000000..3b9c39dcc599
--- /dev/null
+++ b/dev-lang/php/files/libressl-compatibility.patch
@@ -0,0 +1,65 @@
+--- a/ext/openssl/openssl.c 2018-04-04 14:26:34.583000000 +0000
++++ b/ext/openssl/openssl.c 2018-04-04 14:20:16.907000000 +0000
+@@ -73,7 +73,7 @@
+ #ifdef HAVE_OPENSSL_MD2_H
+ #define OPENSSL_ALGO_MD2 4
+ #endif
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ #define OPENSSL_ALGO_DSS1 5
+ #endif
+ #define OPENSSL_ALGO_SHA224 6
+@@ -560,7 +560,7 @@
+ #endif
+
+ /* {{{ OpenSSL compatibility functions and macros */
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ #define EVP_PKEY_get0_RSA(_pkey) _pkey->pkey.rsa
+ #define EVP_PKEY_get0_DH(_pkey) _pkey->pkey.dh
+ #define EVP_PKEY_get0_DSA(_pkey) _pkey->pkey.dsa
+@@ -677,7 +677,7 @@
+ return M_ASN1_STRING_data(asn1);
+ }
+
+-#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined (LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10002000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+
+ static int X509_get_signature_nid(const X509 *x)
+ {
+@@ -1324,7 +1324,7 @@
+ mdtype = (EVP_MD *) EVP_md2();
+ break;
+ #endif
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ case OPENSSL_ALGO_DSS1:
+ mdtype = (EVP_MD *) EVP_dss1();
+ break;
+@@ -1450,7 +1450,7 @@
+ #ifdef HAVE_OPENSSL_MD2_H
+ REGISTER_LONG_CONSTANT("OPENSSL_ALGO_MD2", OPENSSL_ALGO_MD2, CONST_CS|CONST_PERSISTENT);
+ #endif
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ REGISTER_LONG_CONSTANT("OPENSSL_ALGO_DSS1", OPENSSL_ALGO_DSS1, CONST_CS|CONST_PERSISTENT);
+ #endif
+ REGISTER_LONG_CONSTANT("OPENSSL_ALGO_SHA224", OPENSSL_ALGO_SHA224, CONST_CS|CONST_PERSISTENT);
+@@ -3620,7 +3620,7 @@
+ RETURN_FALSE;
+ }
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ /* Due to changes in OpenSSL 1.1 related to locking when decoding CSR,
+ * the pub key is not changed after assigning. It means if we pass
+ * a private key, it will be returned including the private part.
+@@ -3631,7 +3631,7 @@
+ /* Retrieve the public key from the CSR */
+ tpubkey = X509_REQ_get_pubkey(csr);
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ /* We need to free the CSR as it was duplicated */
+ X509_REQ_free(csr);
+ #endif
diff --git a/dev-lang/php/files/mbstring-oniguruma-6.8.patch b/dev-lang/php/files/mbstring-oniguruma-6.8.patch
new file mode 100644
index 000000000000..c238f88007c5
--- /dev/null
+++ b/dev-lang/php/files/mbstring-oniguruma-6.8.patch
@@ -0,0 +1,30 @@
+From 4072b2787074ee8e247a6639585b49e10c5a55fe Mon Sep 17 00:00:00 2001
+From: "Christoph M. Becker" <cmbecker69@gmx.de>
+Date: Tue, 20 Mar 2018 16:35:39 +0100
+Subject: [PATCH] Fix #76113: mbstring does not build with Oniguruma 6.8.1
+
+As of Oniguruma 6.8.1, the regex structure has been moved from the
+public `oniguruma.h` to the private `regint.h`. Thus, it is no longer
+possible to directly access the struct's members, and actually, there
+is no need to, since there are respective accessor functions available
+at least of 2.3.1.
+---
+ ext/mbstring/php_mbregex.c | 2 +-
+ 1 file changed, 1 insertions(+), 1 deletion(-)
+
+diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c
+index a5a6cd0..7a70c63 100644
+--- a/ext/mbstring/php_mbregex.c
++++ b/ext/mbstring/php_mbregex.c
+@@ -452,7 +452,7 @@ static php_mb_regex_t *php_mbregex_compile_pattern(const char *pattern, int patl
+ OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
+
+ rc = zend_hash_str_find_ptr(&MBREX(ht_rc), (char *)pattern, patlen);
+- if (!rc || rc->options != options || rc->enc != enc || rc->syntax != syntax) {
++ if (!rc || onig_get_options(rc) != options || onig_get_encoding(rc) != enc || onig_get_syntax(rc) != syntax) {
+ if ((err_code = onig_new(&retval, (OnigUChar *)pattern, (OnigUChar *)(pattern + patlen), options, enc, syntax, &err_info)) != ONIG_NORMAL) {
+ onig_error_code_to_str(err_str, err_code, &err_info);
+ php_error_docref(NULL, E_WARNING, "mbregex compile err: %s", err_str);
+--
+2.1.4
+
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/files/php-freetype-2.9.1.patch b/dev-lang/php/files/php-freetype-2.9.1.patch
new file mode 100644
index 000000000000..02dfd9ce3cd4
--- /dev/null
+++ b/dev-lang/php/files/php-freetype-2.9.1.patch
@@ -0,0 +1,233 @@
+--- a/ext/gd/config.m4 2018-04-24 11:09:54.000000000 -0400
++++ b/ext/gd/config.m4 2018-05-04 15:18:49.867283889 -0400
+@@ -186,21 +186,36 @@
+ AC_DEFUN([PHP_GD_FREETYPE2],[
+ if test "$PHP_FREETYPE_DIR" != "no"; then
+
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+- if test -f "$i/bin/freetype-config"; then
+- FREETYPE2_DIR=$i
+- FREETYPE2_CONFIG="$i/bin/freetype-config"
+- break
++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
++ AC_MSG_CHECKING(for freetype2)
++
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
++
++ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
++ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
++ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
++ FREETYPE2_DIR="found"
++
++ AC_MSG_RESULT(from pkgconfig: version $FREETYPE2_VERSION found)
++ else
++
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
++ if test -f "$i/bin/freetype-config"; then
++ FREETYPE2_DIR=$i
++ FREETYPE2_CONFIG="$i/bin/freetype-config"
++ break
++ fi
++ done
++
++ if test -z "$FREETYPE2_DIR"; then
++ AC_MSG_ERROR([freetype-config not found.])
+ fi
+- done
+
+- if test -z "$FREETYPE2_DIR"; then
+- AC_MSG_ERROR([freetype-config not found.])
++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
++ AC_MSG_RESULT(found via freetype-config)
+ fi
+
+- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
+- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
+-
+ PHP_EVAL_INCLINE($FREETYPE2_CFLAGS)
+ PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD)
+ AC_DEFINE(HAVE_LIBFREETYPE,1,[ ])
+--- a/configure 2018-04-24 11:10:05.000000000 -0400
++++ b/configure 2018-05-04 15:18:45.626367913 -0400
+@@ -34348,21 +34348,79 @@
+
+ if test "$PHP_FREETYPE_DIR" != "no"; then
+
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+- if test -f "$i/bin/freetype-config"; then
+- FREETYPE2_DIR=$i
+- FREETYPE2_CONFIG="$i/bin/freetype-config"
+- break
++ # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_PKG_CONFIG+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ case $PKG_CONFIG in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
++ ;;
++esac
++fi
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
++$as_echo_n "checking for freetype2... " >&6; }
++
++
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
++
++ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
++ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
++ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
++ FREETYPE2_DIR="found"
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE2_VERSION found" >&5
++$as_echo "from pkgconfig: version $FREETYPE2_VERSION found" >&6; }
++ else
++
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
++ if test -f "$i/bin/freetype-config"; then
++ FREETYPE2_DIR=$i
++ FREETYPE2_CONFIG="$i/bin/freetype-config"
++ break
++ fi
++ done
++
++ if test -z "$FREETYPE2_DIR"; then
++ as_fn_error $? "freetype-config not found." "$LINENO" 5
+ fi
+- done
+
+- if test -z "$FREETYPE2_DIR"; then
+- as_fn_error $? "freetype-config not found." "$LINENO" 5
++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5
++$as_echo "found via freetype-config" >&6; }
+ fi
+
+- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
+- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
+-
+
+ for ac_i in $FREETYPE2_CFLAGS; do
+ case $ac_i in
+@@ -36019,21 +36076,78 @@
+
+ if test "$PHP_FREETYPE_DIR" != "no"; then
+
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
+- if test -f "$i/bin/freetype-config"; then
+- FREETYPE2_DIR=$i
+- FREETYPE2_CONFIG="$i/bin/freetype-config"
+- break
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
++$as_echo_n "checking for freetype2... " >&6; }
++ # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_path_PKG_CONFIG+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ case $PKG_CONFIG in
++ [\\/]* | ?:[\\/]*)
++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
++ ;;
++ *)
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
++ ;;
++esac
++fi
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++$as_echo "$PKG_CONFIG" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
++
++ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
++ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
++ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2`
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE_VERSON found" >&5
++$as_echo "from pkgconfig: version $FREETYPE_VERSON found" >&6; }
++ else
++
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
++ if test -f "$i/bin/freetype-config"; then
++ FREETYPE2_DIR=$i
++ FREETYPE2_CONFIG="$i/bin/freetype-config"
++ break
++ fi
++ done
++
++ if test -z "$FREETYPE2_DIR"; then
++ as_fn_error $? "freetype-config not found." "$LINENO" 5
+ fi
+- done
+
+- if test -z "$FREETYPE2_DIR"; then
+- as_fn_error $? "freetype-config not found." "$LINENO" 5
++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5
++$as_echo "found via freetype-config" >&6; }
+ fi
+
+- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
+- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
+-
+
+ for ac_i in $FREETYPE2_CFLAGS; do
+ case $ac_i in
diff --git a/dev-lang/php/metadata.xml b/dev-lang/php/metadata.xml
new file mode 100644
index 000000000000..cca331a3fa1f
--- /dev/null
+++ b/dev-lang/php/metadata.xml
@@ -0,0 +1,57 @@
+<?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="session-mm">
+ Include <pkg>dev-libs/mm</pkg> support for session storage
+ </flag>
+ <flag name="sodium">
+ Enable support for crypto through <pkg>dev-libs/libsodium</pkg>
+ </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.35-r1.ebuild b/dev-lang/php/php-5.6.35-r1.ebuild
new file mode 100644
index 000000000000..152ebfe276c1
--- /dev/null
+++ b/dev-lang/php/php-5.6.35-r1.ebuild
@@ -0,0 +1,776 @@
+# Copyright 1999-2018 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="https://secure.php.net/"
+SRC_URI="https://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]
+ fpm? ( 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:0= )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib:0=
+ ) )
+ 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:0=
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
+ gdbm? ( >=sys-libs/gdbm-1.8.0: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:0= )
+ )
+ 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:0= )
+ )
+ unicode? ( <dev-libs/oniguruma-6.8.0:= )
+ vpx? ( media-libs/libvpx:0= )
+ 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:0=
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib:0= )
+ zlib? ( sys-libs/zlib:0= )
+"
+
+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 zlib )
+ vpx? ( gd zlib )
+ cjk? ( gd zlib )
+ exif? ( gd zlib )
+ xpm? ( gd zlib )
+ 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"
+ eapply "${FILESDIR}/php-freetype-2.9.1.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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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_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 || use elibc_FreeBSD || 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 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}" )
+ if [[ "fpm" == "${sapi}" ]] ; then
+ sapi_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with systemd fpm-systemd)
+ )
+ fi
+ 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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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 #nowarn
+
+ # 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-5.6.36.ebuild b/dev-lang/php/php-5.6.36.ebuild
new file mode 100644
index 000000000000..fe5b563b7ea5
--- /dev/null
+++ b/dev-lang/php/php-5.6.36.ebuild
@@ -0,0 +1,777 @@
+# Copyright 1999-2018 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="https://secure.php.net/"
+SRC_URI="https://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]
+ fpm? ( 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:0= )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib:0=
+ ) )
+ 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:0=
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
+ gdbm? ( >=sys-libs/gdbm-1.8.0: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:0= )
+ )
+ 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:0= )
+ )
+ unicode? ( dev-libs/oniguruma:= )
+ vpx? ( media-libs/libvpx:0= )
+ 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:0=
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib:0= )
+ zlib? ( sys-libs/zlib:0= )
+"
+
+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 zlib )
+ vpx? ( gd zlib )
+ cjk? ( gd zlib )
+ exif? ( gd zlib )
+ xpm? ( gd zlib )
+ 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"
+ eapply "${FILESDIR}/5.6-mbstring-oniguruma-6.8.patch"
+ eapply "${FILESDIR}/php-freetype-2.9.1.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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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_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 || use elibc_FreeBSD || 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 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}" )
+ if [[ "fpm" == "${sapi}" ]] ; then
+ sapi_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with systemd fpm-systemd)
+ )
+ fi
+ 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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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 #nowarn
+
+ # 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.29.ebuild b/dev-lang/php/php-7.0.29.ebuild
new file mode 100644
index 000000000000..08da09b6482b
--- /dev/null
+++ b/dev-lang/php/php-7.0.29.ebuild
@@ -0,0 +1,751 @@
+# Copyright 1999-2018 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="https://secure.php.net/"
+SRC_URI="https://secure.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]
+ fpm? ( 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:0= )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib:0=
+ ) )
+ 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:0=
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
+ gdbm? ( >=sys-libs/gdbm-1.8.0: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:0= )
+ )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
+ )
+ unicode? ( dev-libs/oniguruma:= )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ webp? ( media-libs/libwebp:0= )
+ 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:0=
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib:0= )
+ zlib? ( sys-libs/zlib:0= )
+"
+
+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 zlib )
+ webp? ( gd zlib )
+ cjk? ( gd zlib )
+ exif? ( gd zlib )
+ xpm? ( gd zlib )
+ 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 ) )
+"
+
+PATCHES=(
+ "${FILESDIR}/mbstring-oniguruma-6.8.patch"
+ # hopefully upstream will include the same version check fixes in upcoming releases
+ # patch added 20180429
+ "${FILESDIR}/libressl-compatibility.patch"
+ "${FILESDIR}/php-freetype-2.9.1.patch"
+)
+
+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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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_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 || use elibc_FreeBSD || 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 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}" )
+ if [[ "fpm" == "${sapi}" ]] ; then
+ sapi_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with systemd fpm-systemd)
+ )
+ fi
+ 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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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 #nowarn
+
+ # 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.30.ebuild b/dev-lang/php/php-7.0.30.ebuild
new file mode 100644
index 000000000000..9e0175a2b439
--- /dev/null
+++ b/dev-lang/php/php-7.0.30.ebuild
@@ -0,0 +1,751 @@
+# Copyright 1999-2018 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="https://secure.php.net/"
+SRC_URI="https://secure.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]
+ fpm? ( 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:0= )
+ cdb? ( || ( dev-db/cdb dev-db/tinycdb ) )
+ cjk? ( !gd? (
+ virtual/jpeg:0
+ media-libs/libpng:0=
+ sys-libs/zlib:0=
+ ) )
+ 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:0=
+ ) )
+ firebird? ( dev-db/firebird )
+ gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
+ gdbm? ( >=sys-libs/gdbm-1.8.0: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:0= )
+ )
+ tidy? ( app-text/htmltidy )
+ truetype? (
+ =media-libs/freetype-2*
+ !gd? (
+ virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib:0= )
+ )
+ unicode? ( dev-libs/oniguruma:= )
+ wddx? ( >=dev-libs/libxml2-2.6.8 )
+ webp? ( media-libs/libwebp:0= )
+ 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:0=
+ )
+ xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 )
+ zip? ( sys-libs/zlib:0= )
+ zlib? ( sys-libs/zlib:0= )
+"
+
+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 zlib )
+ webp? ( gd zlib )
+ cjk? ( gd zlib )
+ exif? ( gd zlib )
+ xpm? ( gd zlib )
+ 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 ) )
+"
+
+PATCHES=(
+ "${FILESDIR}/mbstring-oniguruma-6.8.patch"
+ # hopefully upstream will include the same version check fixes in upcoming releases
+ # patch added 20180429
+ "${FILESDIR}/libressl-compatibility.patch"
+ "${FILESDIR}/php-freetype-2.9.1.patch"
+)
+
+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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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_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 || use elibc_FreeBSD || 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 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}" )
+ if [[ "fpm" == "${sapi}" ]] ; then
+ sapi_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with systemd fpm-systemd)
+ )
+ fi
+ 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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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 #nowarn
+
+ # 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.16.ebuild b/dev-lang/php/php-7.1.16.ebuild
new file mode 100644
index 000000000000..da637b55abbd
--- /dev/null
+++ b/dev-lang/php/php-7.1.16.ebuild
@@ -0,0 +1,733 @@
+# Copyright 1999-2018 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="https://secure.php.net/"
+SRC_URI="https://secure.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 session-mm 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]
+ fpm? ( 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:0= )
+ 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: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 )
+ session-mm? ( 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:0= )
+ )
+ 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:0= )
+ 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:0= )
+ zlib? ( sys-libs/zlib:0= )
+"
+
+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 zlib )
+ webp? ( gd zlib )
+ cjk? ( gd zlib )
+ exif? ( gd zlib )
+ xpm? ( gd zlib )
+ 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 )
+ session-mm? ( session !threads )
+ mysql? ( || ( mysqli pdo ) )
+"
+
+PATCHES=(
+ "${FILESDIR}/mbstring-oniguruma-6.8.patch"
+ # hopefully upstream will include the same version check fixes in upcoming releases
+ # patch added 20180429
+ "${FILESDIR}/libressl-compatibility.patch"
+ "${FILESDIR}/php-freetype-2.9.1.patch"
+)
+
+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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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_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 || use elibc_FreeBSD || 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 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 session-mm 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}" )
+ if [[ "fpm" == "${sapi}" ]] ; then
+ sapi_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with systemd fpm-systemd)
+ )
+ fi
+ 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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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 #nowarn
+
+ # 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.18.ebuild b/dev-lang/php/php-7.1.18.ebuild
new file mode 100644
index 000000000000..b7d2c829465a
--- /dev/null
+++ b/dev-lang/php/php-7.1.18.ebuild
@@ -0,0 +1,731 @@
+# Copyright 1999-2018 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="https://secure.php.net/"
+SRC_URI="https://secure.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 session-mm 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]
+ fpm? ( 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:0= )
+ 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: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 )
+ session-mm? ( 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:0= )
+ )
+ 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:0= )
+ 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:0= )
+ zlib? ( sys-libs/zlib:0= )
+"
+
+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 zlib )
+ webp? ( gd zlib )
+ cjk? ( gd zlib )
+ exif? ( gd zlib )
+ xpm? ( gd zlib )
+ 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 )
+ session-mm? ( session !threads )
+ mysql? ( || ( mysqli pdo ) )
+"
+PATCHES=(
+ # hopefully upstream will include the same version check fixes in upcoming releases
+ # patch added 20180429
+ "${FILESDIR}/libressl-compatibility.patch"
+ "${FILESDIR}/php-freetype-2.9.1.patch"
+)
+
+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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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_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 || use elibc_FreeBSD || 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 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 session-mm 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}" )
+ if [[ "fpm" == "${sapi}" ]] ; then
+ sapi_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with systemd fpm-systemd)
+ )
+ fi
+ 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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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 #nowarn
+
+ # 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.19.ebuild b/dev-lang/php/php-7.1.19.ebuild
new file mode 100644
index 000000000000..d649e1715b3a
--- /dev/null
+++ b/dev-lang/php/php-7.1.19.ebuild
@@ -0,0 +1,728 @@
+# Copyright 1999-2018 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="https://secure.php.net/"
+SRC_URI="https://secure.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 session-mm 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]
+ fpm? ( 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:0= )
+ 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: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 )
+ session-mm? ( 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:0= )
+ )
+ 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:0= )
+ 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:0= )
+ zlib? ( sys-libs/zlib:0= )
+"
+
+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 zlib )
+ webp? ( gd zlib )
+ cjk? ( gd zlib )
+ exif? ( gd zlib )
+ xpm? ( gd zlib )
+ 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 )
+ session-mm? ( session !threads )
+ mysql? ( || ( mysqli pdo ) )
+"
+PATCHES=(
+ "${FILESDIR}/php-freetype-2.9.1.patch"
+)
+
+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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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_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 || use elibc_FreeBSD || 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 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 session-mm 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}" )
+ if [[ "fpm" == "${sapi}" ]] ; then
+ sapi_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with systemd fpm-systemd)
+ )
+ fi
+ 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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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 #nowarn
+
+ # 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.7.ebuild b/dev-lang/php/php-7.2.7.ebuild
new file mode 100644
index 000000000000..4bc61dfc550f
--- /dev/null
+++ b/dev-lang/php/php-7.2.7.ebuild
@@ -0,0 +1,740 @@
+# Copyright 1999-2018 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="https://secure.php.net/"
+SRC_URI="https://secure.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 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 session-mm 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]
+ fpm? ( 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:0= )
+ 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: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 )
+ session-mm? ( 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:0= )
+ )
+ 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:0= )
+ 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:0= )
+ zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
+ zlib? ( sys-libs/zlib:0= )
+"
+
+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 zlib )
+ webp? ( gd zlib )
+ cjk? ( gd zlib )
+ exif? ( gd zlib )
+ xpm? ( gd zlib )
+ 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 )
+ session-mm? ( session !threads )
+ mysql? ( || ( mysqli pdo ) )
+ zip-encryption? ( zip )
+"
+PATCHES=(
+ "${FILESDIR}/php-freetype-2.9.1.patch"
+)
+
+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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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 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 || use elibc_FreeBSD || 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 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 session-mm 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}" )
+ if [[ "fpm" == "${sapi}" ]] ; then
+ sapi_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with systemd fpm-systemd)
+ )
+ fi
+ 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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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 #nowarn
+
+ # 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.3.0_alpha1.ebuild b/dev-lang/php/php-7.3.0_alpha1.ebuild
new file mode 100644
index 000000000000..ba87c83f797e
--- /dev/null
+++ b/dev-lang/php/php-7.3.0_alpha1.ebuild
@@ -0,0 +1,743 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic versionator systemd
+
+MY_PV=${PV/_/}
+DESCRIPTION="The PHP language runtime engine"
+HOMEPAGE="https://secure.php.net/"
+SRC_URI="https://downloads.php.net/~stas/${PN}-${MY_PV}.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}/${PN}-${MY_PV}"
+
+# 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 session-mm 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/libpcre2-10.30[unicode]
+ fpm? ( 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:0= )
+ 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-1.2.0.4 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0: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 )
+ session-mm? ( 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-1.0.1:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ 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:0= )
+ 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-1.2.0.4:0= )
+ zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
+ zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
+"
+
+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 zlib )
+ webp? ( gd zlib )
+ cjk? ( gd zlib )
+ exif? ( gd zlib )
+ xpm? ( gd zlib )
+ 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 )
+ session-mm? ( session !threads )
+ mysql? ( || ( mysqli pdo ) )
+ zip-encryption? ( zip )
+"
+PATCHES=(
+ "${FILESDIR}/php-freetype-2.9.1.patch"
+)
+
+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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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 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 || use elibc_FreeBSD || 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 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 session-mm 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}" )
+ if [[ "fpm" == "${sapi}" ]] ; then
+ sapi_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with systemd fpm-systemd)
+ )
+ fi
+ 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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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 #nowarn
+
+ # 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.3.0_alpha3.ebuild b/dev-lang/php/php-7.3.0_alpha3.ebuild
new file mode 100644
index 000000000000..ecc2efff30e7
--- /dev/null
+++ b/dev-lang/php/php-7.3.0_alpha3.ebuild
@@ -0,0 +1,743 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic versionator systemd
+
+MY_PV=${PV/_/}
+DESCRIPTION="The PHP language runtime engine"
+HOMEPAGE="https://secure.php.net/"
+SRC_URI="https://downloads.php.net/~cmb/${PN}-${MY_PV}.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}/${PN}-${MY_PV}"
+
+# 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 session-mm 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/libpcre2-10.30[unicode]
+ fpm? ( 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:0= )
+ 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-1.2.0.4 )
+ gdbm? ( >=sys-libs/gdbm-1.8.0: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 )
+ session-mm? ( 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-1.0.1:0= )
+ libressl? ( dev-libs/libressl:0= )
+ )
+ 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:0= )
+ 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-1.2.0.4:0= )
+ zip-encryption? ( >=dev-libs/libzip-1.2.0:= )
+ zlib? ( >=sys-libs/zlib-1.2.0.4:0= )
+"
+
+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 zlib )
+ webp? ( gd zlib )
+ cjk? ( gd zlib )
+ exif? ( gd zlib )
+ xpm? ( gd zlib )
+ 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 )
+ session-mm? ( session !threads )
+ mysql? ( || ( mysqli pdo ) )
+ zip-encryption? ( zip )
+"
+PATCHES=(
+ "${FILESDIR}/php-freetype-2.9.1.patch"
+)
+
+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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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 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 || use elibc_FreeBSD || 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 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 session-mm 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}" )
+ if [[ "fpm" == "${sapi}" ]] ; then
+ sapi_conf+=(
+ $(use_with acl fpm-acl)
+ $(use_with systemd fpm-systemd)
+ )
+ fi
+ 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 #nowarn
+ addpredict /var/lib/net-snmp/mib_indexes #nowarn
+
+ 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 #nowarn
+
+ # 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-5.4.1 b/dev-lang/polyml-5.4.1
deleted file mode 100644
index afb0f56f3d9e..000000000000
--- a/dev-lang/polyml-5.4.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test unpack
-DEPEND=X? ( x11-libs/motif:0 ) gmp? ( >=dev-libs/gmp-5 ) elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Poly/ML is a full implementation of Standard ML
-EAPI=5
-HOMEPAGE=https://www.polyml.org
-IUSE=X elibc_glibc +gmp portable test +threads
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-2.1
-RDEPEND=X? ( x11-libs/motif:0 ) gmp? ( >=dev-libs/gmp-5 ) elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )
-SLOT=0/5.4.1
-SRC_URI=mirror://sourceforge/polyml/polyml.5.4.1.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=7ab4f7e0cba6c8af9ad79a1599d41d4c
diff --git a/dev-lang/polyml-5.5.0 b/dev-lang/polyml-5.5.0
deleted file mode 100644
index 51a85873456f..000000000000
--- a/dev-lang/polyml-5.5.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test unpack
-DEPEND=X? ( x11-libs/motif:0 ) gmp? ( >=dev-libs/gmp-5 ) elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) ) virtual/libffi >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Poly/ML is a full implementation of Standard ML
-EAPI=5
-HOMEPAGE=https://www.polyml.org
-IUSE=X elibc_glibc +gmp portable test +threads
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-2.1
-RDEPEND=X? ( x11-libs/motif:0 ) gmp? ( >=dev-libs/gmp-5 ) elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) ) virtual/libffi
-SLOT=0/5.5.0
-SRC_URI=mirror://sourceforge/polyml/polyml.5.5.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=7ff3d0ab45e01850fc71f6c7ccd2eeb7
diff --git a/dev-lang/polyml-5.5.1 b/dev-lang/polyml-5.5.1
deleted file mode 100644
index cade0988f93e..000000000000
--- a/dev-lang/polyml-5.5.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test unpack
-DEPEND=X? ( x11-libs/motif:0 ) gmp? ( >=dev-libs/gmp-5 ) elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) ) virtual/libffi >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Poly/ML is a full implementation of Standard ML
-EAPI=5
-HOMEPAGE=https://www.polyml.org
-IUSE=X elibc_glibc +gmp portable test +threads
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-2.1
-RDEPEND=X? ( x11-libs/motif:0 ) gmp? ( >=dev-libs/gmp-5 ) elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) ) virtual/libffi
-SLOT=0/5.5.1
-SRC_URI=mirror://sourceforge/polyml/polyml.5.5.1.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=8f2b67b5d597885fcdf7a2b0d89ae982
diff --git a/dev-lang/polyml-5.5.2 b/dev-lang/polyml-5.5.2
deleted file mode 100644
index 4f498d532630..000000000000
--- a/dev-lang/polyml-5.5.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test unpack
-DEPEND=X? ( x11-libs/motif:0 ) gmp? ( >=dev-libs/gmp-5 ) elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) ) virtual/libffi >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Poly/ML is a full implementation of Standard ML
-EAPI=5
-HOMEPAGE=https://www.polyml.org
-IUSE=X elibc_glibc +gmp portable test +threads
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-2.1
-RDEPEND=X? ( x11-libs/motif:0 ) gmp? ( >=dev-libs/gmp-5 ) elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) ) virtual/libffi
-SLOT=0/5.5.2
-SRC_URI=mirror://sourceforge/polyml/polyml.5.5.2.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 base 983774947da124fb7d542ce25a218bb1 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=db6bd08d7c7c63533e2992b347ccd85c
diff --git a/dev-lang/polyml-5.6 b/dev-lang/polyml-5.6
deleted file mode 100644
index 47d8b2160124..000000000000
--- a/dev-lang/polyml-5.6
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure prepare test
-DEPEND=X? ( x11-libs/motif:0 ) gmp? ( >=dev-libs/gmp-5 ) elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) ) virtual/libffi >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Poly/ML is a full implementation of Standard ML
-EAPI=6
-HOMEPAGE=https://www.polyml.org
-IUSE=X elibc_glibc +gmp portable test +threads
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-2.1
-RDEPEND=X? ( x11-libs/motif:0 ) gmp? ( >=dev-libs/gmp-5 ) elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) ) virtual/libffi
-SLOT=0/5.6
-SRC_URI=https://codeload.github.com/polyml/polyml/tar.gz/v5.6 -> polyml-5.6.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=e05c9500294a4bc63ba7765ea0f58a6c
diff --git a/dev-lang/polyml/Manifest b/dev-lang/polyml/Manifest
new file mode 100644
index 000000000000..e06e56ff40c5
--- /dev/null
+++ b/dev-lang/polyml/Manifest
@@ -0,0 +1,22 @@
+AUX polyml-5.4.1-asm.patch 1026 BLAKE2B adb541bddcc00957fca16a50f841b8572da68b0cd5a085da3e28473c58a3e95e93f6277ad76b8349e19ec168a8a898d1c5f9d86e7f0d7fd0aa0fec4204e5346f SHA512 bf19cedff74b11feba72c0ba2f5a9b6ee8169b5bb1b783d3559640070025ca0e7627d751bc703c41d812025d6909cba56101e49f0199f2aee310bc95ca4f2d6d
+AUX polyml-5.4.1-configure.patch 459 BLAKE2B e97785d1581259f8fa8102034d6b6e3b7c43c5337afeef75c903753cc69bd3174175781fcf5dac498f85339f40e05f7c636e2b95ecf9fa9dcdc3749d841baee2 SHA512 4e3a5e6651c8b6b9cb018f72f100755eee0265ad7dd0ba57030b7bce95670ff35e7191661be469b59206266f5eb51042d98504601311629bc2e83ed36a0cef8f
+AUX polyml-5.5.0-asm.patch 351 BLAKE2B 7fb6afeeefafbbc15dd9088ed417688dbbdc007c9d9c380675797af1a9c620779eeae7aec2fe43e04a6e06c0b2786261adae2c71c69b8ab679ba3449ba69ea7c SHA512 92a14615483aaac76e708ae19fccab132f80223ebaad7a390482af164335199a7d2e52be8726cc96d7971efae73a9cdf0284ec96f014af606edce2024d5b3996
+AUX polyml-5.5.0-configure.patch 4658 BLAKE2B 7ab06882eb18efd3ee3e90e65d1cd5aae3437080e4d675b6406f46637d59ef33229823b58330fbfcf0020714ebc51105e90f8fdcca9215ab934de39b68fd75c4 SHA512 d4a8ee5d41469d958d7f61a6608c5d4bd50e5497fadcd5333b2a94cd253c65d27f493bd743574eb3ccab37a39fdb2182e25106443f1855b30be1a70c9d450cc6
+AUX polyml-5.5.0-x-it-basis.patch 562 BLAKE2B f883eb0f72ca5678318472feaf41a009bb9f418431d78c126252f55d67f7ec0339ec7337a87c578373d66c0e9120f6db0d9480f5010f5a925a3cfb6a4ea201ab SHA512 ed5864b7ce5767133a47d914b5b439177e5c841669870292f90a73edee2e505aff6883b9a80baf0036d87bf728038ffa4609f9bacde4a704bfca291aa9cf50a4
+AUX polyml-5.5.1-inputN-return-for-zero-chars.patch 1476 BLAKE2B 38c9fa12ee5755493f8e3883d8f1e9045fb7f79586b5ee0c9e1d3d4e6180d939eba07052b092f7a714ebceceb90a5615f6890392b20dfe3b1c695e40df0d90c0 SHA512 998e9eb09a3b35bbbb6a9748e0b19c423f2204ccfb3f5a6de3173ca91f67d523884743f382052c22d14655310265ef7f8259e5104c61f9ab2b9a52f7257a011f
+AUX polyml-5.5.1-optimize-closure.patch 6695 BLAKE2B 421c5da3accc302f201be6f8a137d24014ec9b3ba3ec6c67175ffea37b08d4a9379bcf560f2ffe5a7180b67a5cacbfec6f76fcfccd3f2b923a345255856b6ecc SHA512 7cf1c66114058c8b3c9ceed3a84fe9a99f0cf063cce3364be79c7402353e8e29c5082cfedef16a32f38cb4275b0b3622db88cf7746115d1c43c483635a46f147
+AUX polyml-5.5.2-r1952-check_for_negative_sized_array.patch 548 BLAKE2B ea01cee4f83d87fe0793fc69a020c7dec9e2a54572acdea64850eb32a80cc3160c3c30031c823db93a1ed4454de21da916bb321bc4104f189ecf977737c14e60 SHA512 d979c6542a2a983ab1b536e8b983d4d0a154f4f5e00f3d4161dd38f965f63ea5bd339785904690928a715ec43cb2a296f535ff6af1da522b096ffae0bba759a4
+AUX polyml-5.5.2-r1954_Fix_segfault_in_FFI_when_malloc_runs_out_of_memory.patch 4089 BLAKE2B 8407734817afa2902ca115f129c3feb0197082848921a6a41389c49516329b0c6294d9a381b143cfe1b2a1855b1916a49fc50de8f969a6c5bffc87b7c10ff982 SHA512 8b4f174ace31a839ea592402c10068af62f03227a43a663ea17ea5eefecf52472fc6a3437cd99f1593de7d575af57ae4b8156756695623c7db0f9e726e5f21a6
+AUX polyml-5.5.2-r2007_Ensure_the_large_object_cache_pointer_is_cleared.patch 1247 BLAKE2B 7df0a97bdb56d264b090bebad500d4f1f4354d8d66feed289a4f535e63d3357a33a6533acd4170e7c4e69bf477f56355684b3037f0c895adad299de20cf246d0 SHA512 ac2d1baff1c8d743ee783ac81f31df12cc4598874dd5a9a7855cd06fb179af2c64bc02a87d85a72238f19c805128143693839bd0a58d9a4002bc75fae985303b
+AUX polyml-5.5.2-r2009_Initialise_the_largeObjectCache_fully_in_the_constructor.patch 951 BLAKE2B c2aa5777c35d27d0c403f6676b323a280e43c30bbacdcbfc6535d39b66031b11e6e40074ecd3fb72b40953942fb53cb88d62f82e47cff072a4e53ca973615019 SHA512 644e90f26ef80aa8e945257eafa4da1ee2da9d353db40b5c6e367d032f41db4a6589a2527bce9d84d45794d88d31edaeb3cea53d57b4421bf209f6c07be69cf0
+DIST polyml-5.6.tar.gz 6066166 BLAKE2B dc7e35ad1f51f270f9043736bca8b3d8a96e208dfa2833a2de3c06c969e8bb9d5e92c3ab025e4e55539188a9d6d5000b7befdd3cfc17aa3b0e54315778ab71b0 SHA512 cd4f25c225831dec512f7136dfda4ba31abd6939d9e8e0cacdb6d48212488b56ba5969c76e76fcbfcfa83d015a67d9cf62457286086f3c2b3f7914a7939d7b59
+DIST polyml.5.4.1.tar.gz 6107319 BLAKE2B 1fdff3b26fa7554a0f3d31cca0dc4a4e013fb930e6295cd6107012bc67e87db1f64916087edb34e403c3e1a88b26bff947c1cc9d946fe93ac7a1144434d15081 SHA512 4a7b404ed648b5a9fd9d52917214688d15f4f9a5f4570ba13b52a8304bde1cc4b534f539ffc3c9554283816ae130e4c898a179d776df6d3220fba9743a19b175
+DIST polyml.5.5.1.tar.gz 5465794 BLAKE2B 0ae6973c866cdf33e0eeb26475c95f26f11eca13458ab52c2c6fd3f4b3034cd5e71a7e4dbff5574070a11833479bff2723066bfc71367d71cd6e4f9f17a5cba1 SHA512 283954c8bf5599d83ea69916b827b1acae7137fe4add67537026092da2e6f1a89d71d3a394dbba599bbe9e967ded1446f39f4d81afb90301532db6be949f7a6f
+DIST polyml.5.5.2.tar.gz 5599140 BLAKE2B 08b7c4be7c52bd8f57c53f6caa24be7ab457c7419459192f33369bf3c7024002ffd98dfd7af4db53c3a2484f9c966010a635f4e09e9edf8a62b5d5230f9a04bf SHA512 248c2a38c4691898bc1243a041f4683bf227d9c8a98c6c3545af2a8a3249ed5ed96f33f90cb2dede8809b42f33c0557650147302cfe046a5fba965ccd93cbc5b
+DIST polyml.5.5.tar.gz 5504389 BLAKE2B 8ad51504e4bc4a3f6090052d641389b7378aa56295ebe8503ea09082a0bb85ee157c04ac19ca66ab8b8c8b49b0d645339d499ea7d4eba18eae6f90be8afcc907 SHA512 4725c2e4a786b8c63bc6fc1cadad0de818ed935014d51040af43defa07b03ba7bedb2185bfb2e39a0db7284479e79e698b31ec7fe8463c306b668de1eda69b89
+EBUILD polyml-5.4.1.ebuild 882 BLAKE2B 33f67a532e3df08bdeba0daf156a89e04e8dd43b3d8968e62b0523fc9a6124f9b5d0ce942189ef3fb7c14f9c768868a1964cfbb99875951a5814aa941ce2e9aa SHA512 02f154c766878c6df26d0b49260a8410e1c4d1faefa02d41d84ea01ac0e3ae95de9b12c80f085bda3492dc3dae0b39dc94f5e891a8a5bec736ecd3dd3f3ffbd4
+EBUILD polyml-5.5.0.ebuild 1121 BLAKE2B c32bffc9837edaa9dbe300f448006f06ae19bf55e29285859476f52de198df6997093d310a24ac9541ef5c372c9159db3c875a9abaef34bee7389448aa331fed SHA512 2b0462751288f026c6770639aaaaff37546bea6d363f016412b2909cc9738d98c2b059aab24f6198cfc7051cf06ef2ba89c76d48a037f95f442befc05be5a005
+EBUILD polyml-5.5.1.ebuild 1806 BLAKE2B 1ecd752ae24a16765064f85dc6aa380b1762b839c8d065c679e2bceab3946d918d574162b5a495dfcc75bed91ddc45862f15795407d24b55604ff68688ecb3d6 SHA512 95d7210500e6135b9b1858ccecdd734339083f2ffca5237c4a61d77b7afe4fe140f335bfd5e5702defe21a8c9987f1f81dd446a9a90b261d4588c48509e89538
+EBUILD polyml-5.5.2.ebuild 1963 BLAKE2B 0afb1711c472cccedc5be5fd0ae16a0334ca86339e29d7b34a027dbde181543b0fc76e9419dc2733cf99bd1bd9a153ba716bc9436c562a339e4c3112dea35f8b SHA512 1f090742acbe4b175a3d26fd785ae5958f8dec0bda6d7fd6a3feeec43bee3606f6b877da4f3dc1401edf67e5ef0bb5bf21e3609beebaf1b651669ef44482cda7
+EBUILD polyml-5.6.ebuild 1103 BLAKE2B eb24c91df3f50e129ef150aacd7d72d921ca70c35533684427c26bd6fa49fe201e43dd740aa5f4ee3739feb14965104acf7b93230f3fbfb61a6af7748dc18be4 SHA512 79af51e535496ad4af010f5d915c83da35b2a4adcded6eded435f452cecc9b79d0a6c711faac3e7a0ca345f853f6de962bc45fdfaf8568b2cdd5d21bce1433ad
+MISC metadata.xml 562 BLAKE2B d0e0542c0805b1d57891bb765ac23cb32f2b37b07ba3986730adc7dc1b720203065483c090fdc8919a1ee2dce965a26d0f570af29f54e0ec7c0acd8ff43e4441 SHA512 be1481ffb11ab311905e734a6eb02883ff25f08d4698ed6dcab4ab76a380ff4eec19eed4db76f77f7ec9a0dc635887e3b7c89a8a153160fd91ab2a8cdec2dbe9
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..bdeea6761bc4
--- /dev/null
+++ b/dev-lang/polyml/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="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..34eabcdb7de5
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.4.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 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="https://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..44b3faff1569
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.5.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 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="https://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..ce4a090ed6cc
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.5.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 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="https://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..f54f6675ccf8
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.5.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 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="https://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..6cdf4fdd6fb5
--- /dev/null
+++ b/dev-lang/polyml/polyml-5.6.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2018 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="https://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-2.7.14-r1 b/dev-lang/python-2.7.14-r1
deleted file mode 100644
index 848526aea2e5..000000000000
--- a/dev-lang/python-2.7.14-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare setup test
-DEPEND=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:0= ) ) 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 virtual/pkgconfig >=sys-devel/autoconf-2.65 !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=5
-HOMEPAGE=https://www.python.org/
-IUSE=-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml
-KEYWORDS=alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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:0= ) ) 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 !build? ( app-misc/mime-types ) doc? ( dev-python/python-docs:2.7 )
-SLOT=2.7
-SRC_URI=https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-2.7.14-0.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c754a811dcc2760daf74c5356ab79e12
diff --git a/dev-lang/python-2.7.14-r2 b/dev-lang/python-2.7.14-r2
deleted file mode 100644
index e5f3929cec16..000000000000
--- a/dev-lang/python-2.7.14-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare setup test
-DEPEND=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:0= ) ) 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 bluetooth? ( net-wireless/bluez ) virtual/pkgconfig >=sys-devel/autoconf-2.65 !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=5
-HOMEPAGE=https://www.python.org/
-IUSE=-berkdb bluetooth build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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:0= ) ) 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 !build? ( app-misc/mime-types ) doc? ( dev-python/python-docs:2.7 )
-SLOT=2.7
-SRC_URI=https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-2.7.14-0.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=5413cb89c875a32ff857380562557c48
diff --git a/dev-lang/python-2.7.15 b/dev-lang/python-2.7.15
deleted file mode 100644
index b6f391e35dc8..000000000000
--- a/dev-lang/python-2.7.15
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare setup test
-DEPEND=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:0= ) ) 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 bluetooth? ( net-wireless/bluez ) virtual/pkgconfig >=sys-devel/autoconf-2.65 !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=6
-HOMEPAGE=https://www.python.org/
-IUSE=-berkdb bluetooth build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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:0= ) ) 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 !build? ( app-misc/mime-types ) doc? ( dev-python/python-docs:2.7 )
-SLOT=2.7
-SRC_URI=https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-2.7.15.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=18649b290896cfe04eed22bb8fec0349
diff --git a/dev-lang/python-3.4.5-r1 b/dev-lang/python-3.4.5-r1
deleted file mode 100644
index 301bb63d2e08..000000000000
--- a/dev-lang/python-3.4.5-r1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare test
-DEPEND=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 test? ( app-arch/xz-utils[extra-filters(+)] ) virtual/pkgconfig >=sys-devel/autoconf-2.65 !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=5
-HOMEPAGE=https://www.python.org/
-IUSE=build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml
-KEYWORDS=alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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 !build? ( app-misc/mime-types )
-RESTRICT=!test? ( test )
-SLOT=3.4/3.4m
-SRC_URI=https://www.python.org/ftp/python/3.4.5/Python-3.4.5.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-3.4.5-0.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=ec9ffabfab8822df8599a5f1b863cbbc
diff --git a/dev-lang/python-3.4.6-r1 b/dev-lang/python-3.4.6-r1
deleted file mode 100644
index 0d8bab8e37c7..000000000000
--- a/dev-lang/python-3.4.6-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare test
-DEPEND=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 virtual/pkgconfig >=sys-devel/autoconf-2.65 !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=5
-HOMEPAGE=https://www.python.org/
-IUSE=build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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 !build? ( app-misc/mime-types )
-SLOT=3.4/3.4m
-SRC_URI=https://www.python.org/ftp/python/3.4.6/Python-3.4.6.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-3.4.6-0.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b1b9f4d4f8280392da57fd43a71d1451
diff --git a/dev-lang/python-3.4.8 b/dev-lang/python-3.4.8
deleted file mode 100644
index 66d3e7830e94..000000000000
--- a/dev-lang/python-3.4.8
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare test
-DEPEND=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 virtual/pkgconfig >=sys-devel/autoconf-2.65 !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=5
-HOMEPAGE=https://www.python.org/
-IUSE=build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml
-KEYWORDS=alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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 !build? ( app-misc/mime-types )
-SLOT=3.4/3.4m
-SRC_URI=https://www.python.org/ftp/python/3.4.8/Python-3.4.8.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-3.4.6-0.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=80f90bff9b9991b1d7ec203902906877
diff --git a/dev-lang/python-3.4.8-r1 b/dev-lang/python-3.4.8-r1
deleted file mode 100644
index cd06f186a5b2..000000000000
--- a/dev-lang/python-3.4.8-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare test
-DEPEND=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 bluetooth? ( net-wireless/bluez ) virtual/pkgconfig >=sys-devel/autoconf-2.65 !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=5
-HOMEPAGE=https://www.python.org/
-IUSE=bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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 !build? ( app-misc/mime-types )
-SLOT=3.4/3.4m
-SRC_URI=https://www.python.org/ftp/python/3.4.8/Python-3.4.8.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-3.4.6-0.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=fbc1f0a56e175f1fba11e685942e29ca
diff --git a/dev-lang/python-3.5.4-r1 b/dev-lang/python-3.5.4-r1
deleted file mode 100644
index d3f786d7c6f2..000000000000
--- a/dev-lang/python-3.5.4-r1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare test
-DEPEND=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 test? ( app-arch/xz-utils[extra-filters(+)] ) virtual/pkgconfig !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=5
-HOMEPAGE=https://www.python.org/
-IUSE=build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml
-KEYWORDS=alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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 !build? ( app-misc/mime-types )
-RESTRICT=!test? ( test )
-SLOT=3.5/3.5m
-SRC_URI=https://www.python.org/ftp/python/3.5.4/Python-3.5.4.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-3.5.4-0.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=9ee1cecf927554b44b850ddd7a55a95d
diff --git a/dev-lang/python-3.5.5 b/dev-lang/python-3.5.5
deleted file mode 100644
index b1f621fe5684..000000000000
--- a/dev-lang/python-3.5.5
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare test
-DEPEND=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:0= ) ) 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 test? ( app-arch/xz-utils[extra-filters(+)] ) virtual/pkgconfig !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=5
-HOMEPAGE=https://www.python.org/
-IUSE=build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml
-KEYWORDS=alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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:0= ) ) 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 !build? ( app-misc/mime-types )
-RESTRICT=!test? ( test )
-SLOT=3.5/3.5m
-SRC_URI=https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-3.5.4-0.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=313db0fb762de7ed9282d0341a4d948b
diff --git a/dev-lang/python-3.5.5-r1 b/dev-lang/python-3.5.5-r1
deleted file mode 100644
index 0df4d3e55ed3..000000000000
--- a/dev-lang/python-3.5.5-r1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare test
-DEPEND=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:0= ) ) 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 bluetooth? ( net-wireless/bluez ) virtual/pkgconfig !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=5
-HOMEPAGE=https://www.python.org/
-IUSE=bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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:0= ) ) 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 !build? ( app-misc/mime-types )
-RESTRICT=!test? ( test )
-SLOT=3.5/3.5m
-SRC_URI=https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-3.5.4-0.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b84bcca1e5ad0a3854b89fe3a7ae4a9e
diff --git a/dev-lang/python-3.6.3-r1 b/dev-lang/python-3.6.3-r1
deleted file mode 100644
index b59e6246f7c1..000000000000
--- a/dev-lang/python-3.6.3-r1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare test
-DEPEND=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 test? ( app-arch/xz-utils[extra-filters(+)] ) virtual/pkgconfig !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=5
-HOMEPAGE=https://www.python.org/
-IUSE=build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml
-KEYWORDS=alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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 !build? ( app-misc/mime-types )
-RESTRICT=!test? ( test )
-SLOT=3.6/3.6m
-SRC_URI=https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-3.6.2-0.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=f4096522b0cfda2ecba0f6e442896db8
diff --git a/dev-lang/python-3.6.4 b/dev-lang/python-3.6.4
deleted file mode 100644
index 1545ac665602..000000000000
--- a/dev-lang/python-3.6.4
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare test
-DEPEND=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 test? ( app-arch/xz-utils[extra-filters(+)] ) virtual/pkgconfig !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=6
-HOMEPAGE=https://www.python.org/
-IUSE=build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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 !build? ( app-misc/mime-types )
-RESTRICT=!test? ( test )
-SLOT=3.6/3.6m
-SRC_URI=https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-3.6.4.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=bb0570fb82b5d282733aa41327ce32c5
diff --git a/dev-lang/python-3.6.5 b/dev-lang/python-3.6.5
deleted file mode 100644
index 23fc85915a9f..000000000000
--- a/dev-lang/python-3.6.5
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare test
-DEPEND=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:0= ) ) 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 test? ( app-arch/xz-utils[extra-filters(+)] ) virtual/pkgconfig !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=6
-HOMEPAGE=https://www.python.org/
-IUSE=build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml
-KEYWORDS=alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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:0= ) ) 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 !build? ( app-misc/mime-types )
-RESTRICT=!test? ( test )
-SLOT=3.6/3.6m
-SRC_URI=https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-3.6.4.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=45671420aaf89392840cee02da365bbf
diff --git a/dev-lang/python-3.6.5-r1 b/dev-lang/python-3.6.5-r1
deleted file mode 100644
index bd36d1492961..000000000000
--- a/dev-lang/python-3.6.5-r1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare test
-DEPEND=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:0= ) ) 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 bluetooth? ( net-wireless/bluez ) test? ( app-arch/xz-utils[extra-filters(+)] ) virtual/pkgconfig !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=6
-HOMEPAGE=https://www.python.org/
-IUSE=bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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:0= ) ) 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 !build? ( app-misc/mime-types )
-RESTRICT=!test? ( test )
-SLOT=3.6/3.6m
-SRC_URI=https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-3.6.4.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=c7d7336785b45ca5dd9309a3be5b692a
diff --git a/dev-lang/python-3.6.6 b/dev-lang/python-3.6.6
deleted file mode 100644
index 15203b394f71..000000000000
--- a/dev-lang/python-3.6.6
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare test
-DEPEND=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:0= ) ) 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 bluetooth? ( net-wireless/bluez ) test? ( app-arch/xz-utils[extra-filters(+)] ) virtual/pkgconfig !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=6
-HOMEPAGE=https://www.python.org/
-IUSE=bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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:0= ) ) 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 !build? ( app-misc/mime-types )
-RESTRICT=!test? ( test )
-SLOT=3.6/3.6m
-SRC_URI=https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-3.6.6.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=dc6718f67146c88860b8c5053251e368
diff --git a/dev-lang/python-3.7.0 b/dev-lang/python-3.7.0
deleted file mode 100644
index dfc30de0cfe6..000000000000
--- a/dev-lang/python-3.7.0
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare test
-DEPEND=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:0= ) ) 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 bluetooth? ( net-wireless/bluez ) test? ( app-arch/xz-utils[extra-filters(+)] ) virtual/pkgconfig !sys-devel/gcc[libffi(-)] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69
-DESCRIPTION=An interpreted, interactive, object-oriented programming language
-EAPI=6
-HOMEPAGE=https://www.python.org/
-IUSE=bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=PSF-2
-PDEPEND=>=app-eselect/eselect-python-20140125-r1
-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:0= ) ) 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 !build? ( app-misc/mime-types )
-RESTRICT=!test? ( test )
-SLOT=3.7/3.7m
-SRC_URI=https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz https://dev.gentoo.org/~floppym/python/python-gentoo-patches-3.7.0.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=688d043e2279f60e7f2dae1e6cbbd731
diff --git a/dev-lang/python-exec-2.4.5 b/dev-lang/python-exec-2.4.5
deleted file mode 100644
index 107b5a9c09bc..000000000000
--- a/dev-lang/python-exec-2.4.5
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install preinst
-DESCRIPTION=Python script wrapper
-EAPI=5
-HOMEPAGE=https://github.com/mgorny/python-exec/
-IUSE=python_targets_jython2_7 python_targets_pypy python_targets_pypy3 python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_targets_python3_7
-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
-LICENSE=BSD-2
-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
-SLOT=2
-SRC_URI=https://github.com/mgorny/python-exec/releases/download/python-exec-2.4.5/python-exec-2.4.5.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=d8ce9533bd68eb5913b4cd06ddd4ad21
diff --git a/dev-lang/python-exec-2.4.6 b/dev-lang/python-exec-2.4.6
deleted file mode 100644
index c562bae4d962..000000000000
--- a/dev-lang/python-exec-2.4.6
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure install preinst
-DESCRIPTION=Python script wrapper
-EAPI=6
-HOMEPAGE=https://github.com/mgorny/python-exec/
-IUSE=python_targets_jython2_7 python_targets_pypy python_targets_pypy3 python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_targets_python3_7
-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
-LICENSE=BSD-2
-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
-SLOT=2
-SRC_URI=https://github.com/mgorny/python-exec/releases/download/v2.4.6/python-exec-2.4.6.tar.bz2
-_eclasses_=multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=1e9652d002a88f4072a5f53eb310cf77
diff --git a/dev-lang/python-exec-9999 b/dev-lang/python-exec-9999
deleted file mode 100644
index d070efaeb08b..000000000000
--- a/dev-lang/python-exec-9999
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=configure install preinst prepare unpack
-DEPEND=>=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=Python script wrapper
-EAPI=6
-HOMEPAGE=https://github.com/mgorny/python-exec/
-IUSE=python_targets_jython2_7 python_targets_pypy python_targets_pypy3 python_targets_python2_7 python_targets_python3_4 python_targets_python3_5 python_targets_python3_6 python_targets_python3_7
-LICENSE=BSD-2
-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
-SLOT=2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 git-r3 8f6de46b0aa318aea0e8cac62ece098b libtool 0081a71a261724730ec4c248494f044d multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=1ce6dee0023fb7a8ed35e2d1534aa8b6
diff --git a/dev-lang/python-exec/Manifest b/dev-lang/python-exec/Manifest
new file mode 100644
index 000000000000..78d815ad7521
--- /dev/null
+++ b/dev-lang/python-exec/Manifest
@@ -0,0 +1,6 @@
+DIST python-exec-2.4.5.tar.bz2 87137 BLAKE2B 2434bee0bcc64a78a83254d6b6f733ef0748d8209ff70654fc57ac50563d4f32be64705a3c56eefef4e173a238b272d00bef4929982a729a097b82a3a2b0b5b1 SHA512 8c1a520c565afa775cad0e8b88248b688814664e588f683fc2b2c039ee0494b168ebd3cd1042b8b7fe2583f287cf55b22ea0585bfb43efe2f8450d809cde0b21
+DIST python-exec-2.4.6.tar.bz2 87634 BLAKE2B 7b6de8ad0e0603fafd3284e6e3c5247ad83f145ab4db6728914318ae8e6f5aaa3c0247f4e01238fca11519ef72fb1b11436aea7e2b8c988b8717b3f6a2a43c37 SHA512 e05eaf01b83de196a10933636ab6b1a5489a421592df49b8b58eabd0e732de970f902744cd3a06b5ab530a6d69fe6dfa8f270fbb09b9fe3df4ae04d516828050
+EBUILD python-exec-2.4.5.ebuild 4443 BLAKE2B efcc545a46738ceb03dfd048d6ab70ac79e18d323c9df32ff61d49c183bf1df80eaa18af1a658397a24a267931684d1cfc4e60c005ee8da58421a30d52bf26a8 SHA512 9f1e31df119cea502e730174233c78e54a7362947f36b6f65302e00d7d8c1ea2504e0196933766daf18ee4fbb7b4621cd82075ce8fe46619f62c8c870ca9b77d
+EBUILD python-exec-2.4.6.ebuild 4463 BLAKE2B fcbebf862dd4a3ed81abbada163d7b708aede498120d0efb2cc16c33709694b8c21305dbc5d5f175e4ead0a89b4fdf441b2a0ea30660cb17a4e8e9c24ff1e83f SHA512 adf86449457fe0198ea834f736a708949aab5b8641878f08ef4b21c35aa3fc644650083f641e4343a3b70cf5bdb0e62f0694f2a8b19521617f2defa6de042352
+EBUILD python-exec-9999.ebuild 4241 BLAKE2B d618a42a797acf150300971ce8c91fdb695360986e3cf8bb557ad426d5473644cd02cc1116ea8a6b61c11e82ecedd5999f4c967c97cf512592213d6f56a1bf78 SHA512 02efc08d67020e0d8529c92d1466a842381c047a7a44ffa7aedebd0d4bd21e6985ff64958839422456ee8ffbb5e8e73d9e5019ccee209ef94abe99cbbca84a57
+MISC metadata.xml 589 BLAKE2B 7f9fa9750915db8b546b52a560a7fd8d9a63c4f310e423ebdc0508fe9b14363001b30f3c3db26f6d05eec8a44176d62a9335153dff2d55a41a31d3b428cc9ca6 SHA512 2ac0223af0a2cf95d2b18ef415eadb325af0094e4ec361a414b0d68b203dc1c937d3d680af96bdad1e8a48cb5786683bdbbd451f47a0f3a777c075e1690ccf7a
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.5.ebuild b/dev-lang/python-exec/python-exec-2.4.5.ebuild
new file mode 100644
index 000000000000..e39dc14b22b5
--- /dev/null
+++ b/dev-lang/python-exec/python-exec-2.4.5.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2018 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-2.4.6.ebuild b/dev-lang/python-exec/python-exec-2.4.6.ebuild
new file mode 100644
index 000000000000..9ed5ee58b776
--- /dev/null
+++ b/dev-lang/python-exec/python-exec-2.4.6.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# 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/python-exec/releases/download/v${PV}/${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..6fc81aeeefa9
--- /dev/null
+++ b/dev-lang/python-exec/python-exec-9999.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# 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 autotools git-r3 python-r1
+
+DESCRIPTION="Python script wrapper"
+HOMEPAGE="https://github.com/mgorny/python-exec/"
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/mgorny/python-exec.git"
+
+LICENSE="BSD-2"
+SLOT="2"
+KEYWORDS=""
+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_prepare() {
+ default
+ eautoreconf
+}
+
+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..3b7b69de4029
--- /dev/null
+++ b/dev-lang/python/Manifest
@@ -0,0 +1,57 @@
+AUX 2.7-disable-nis.patch 823 BLAKE2B eccd1ceb7e7e66848e1c7520ae9c5f2f57a27203a542ba0e3a5abf850dea31b6169e3f7ea425b5cf101d8f79c98cb74529db3ba87db1045203eba38bb4625e7f SHA512 42b1a2790f2b4bfcf89d8451de54e83979826a16ef77c32c6f17b9903613bd8f76a138be975bb05e0e7785244155107f229cba479ce08891d36ae3e01e5be501
+AUX 3.4-getentropy-linux.patch 1766 BLAKE2B b0999a96833f2b6db936f0c97f8405c8b6eb2fcf926f4c4c41590d903435c1435be21795ea1d44355f5c2e3a745b1528bf04cfda362372a12f796fd1bb51629a SHA512 52e888819b3c265e0920efa00911311a2029a6a80162ca56e69892ffc49c28487852882b27e560b9f8ff1c16ee41d074423b6c565596b37c6efca2dd8eb45675
+AUX 3.6-blake2.patch 1335 BLAKE2B af3acdee3c789199fab8a2eb0140ff7a470f2873db506163d2e81117e1efed2c245d629f13a49d313a63af98200d5dad5f3d5bcc3e43e66af5bb0e39778faa55 SHA512 f8f9b4424df36f58354c24b7eb571c63a7bb49a1d2fd5399562ab28371eb3a80ed829c7e4fc19f5b3d9955a83a46d09a63819e4da0dafdef0a5a3f6b1e679d71
+AUX 3.6-disable-nis.patch 864 BLAKE2B a960b2f44ff1358677ebb0cf82bcff1ddc7812ed511d0f492fdac07c848f0de8dbd0e8a9200b276709532b5524eed9e779b33d6c4ee34c1f9d23e4eb1f862d99 SHA512 a86a17c90743e8a3712ceaf14ea1a88b96bd5504a4feaadc0168f3211c2afbc130fad8147a40d7ac65268ff1d6293b0c3f98ad36845efebeacfc628149ef13f3
+AUX 3.6.5-disable-nis.patch 297 BLAKE2B 86ca3e6b9aa1bcd9af55ea5f1ad835b60154d23339bf9d02404a5c50b774c556f482138f35d005c9a96b95b6fd9be94ac634164d0b8d173c15fbf841163cabba SHA512 e0a31d256c70159dcbd362ff35b7561c94087851514637bd2b26b6a1b3199309f81eb82305adec7f8d01118dd0856c5228863319ced1e275fbf6f4932034e855
+AUX pydoc.conf 169 BLAKE2B ce40bb3d5f858bd7a8d9ef5bf215a8ab592568a724f0e08aea219da014dac12fdfcbcf5fb168bb9aa57be110f74d656aed46179ffe11e3c992d84a647e442b7b SHA512 30d0776a4004cd641e6f283658c3c24915a21ea15fe40e506ff2c3a5f95936aa00c9490b04ab25f29e9b7ac65cd88fd54ca0b08e000e73820b13c7c57c0bf5b2
+AUX pydoc.init 600 BLAKE2B fb8775a6663483e5112ec283627610b746020d88494e772b92bb718a9493a52606e565c6c2fa4917a5cb963f166283d09883bd26903f2f3ced6c240d4e292a7f SHA512 9e71ad53486b6882a8441b24225c602195ee33d29dd1b60df27febbc6b752e79929be356152a489f893dcfb11f9c066b999787bc27a8ac61062c86e67a69e87a
+AUX python-2.7-libressl-compatibility.patch 2783 BLAKE2B 44c13d121291c1f660a2fd2edbbaafb4861896503423e9a85d506aea3c416de238a5a1ff08a6065cb4cd2498e456fb3646186dbd3472fbb37058b6ebfd47ad0f SHA512 d258b28d3d9d87e11148b16d3e2f8d378c95897b630f5132058654ee031045f4a0dcc7f11dfb43a8deeac2723e6c1ae88e55db1b4eaad019e1d3b9fa47ea2991
+AUX python-2.7.10-cross-compile-warn-test.patch 775 BLAKE2B 617938353c7e19a9b931544ff1fdcd60cf46e3a68f3ff63bc6ac16432220aad13df4d2b405a968505fb64d31da51a478c46499944ab58e9bbfa5a5b44d392f00 SHA512 652941239541f6139ee3580ec0ea5240baf07ae1afb786f76a69b1d748de1f4dda2740a95c28866e9b0b59023410f8a1e86507642595991c0d90d187519cb758
+AUX python-2.7.10-system-libffi.patch 1232 BLAKE2B 3483385cbbf7ef2304cf109d05b5e1d58ec2b9015b614c996c66a9917ab10703865b40c775d7ff89a6fa80e9c8c9600292d8d916e9753027e9e0b23b0548ccff SHA512 3c888638180edc81b98a869478085de63741668ea62bdb919a60708fd64cb394e60f44a3730e2ccf3e41d1d61b72b469242fe2ccd20dc61bc2064b3e759c52bd
+AUX python-2.7.5-nonfatal-compileall.patch 750 BLAKE2B a7999a6c5a706fbab213cd8a01c6df9b130537556d59bf50b1f5ca223bb9dcd24ccfef48e70e5d3a8afe2b9c6236e1ada87d5899052a2b39f05c4644697953e2 SHA512 d2e93e2a6fcd55d516df0ddaca31af97faed677ea6b4be282eb99e7864f8a7399b5ca11139844a4b3c264832183483b0f4c8c9865c05de0e8520e6d2c8f1dbc6
+AUX python-2.7.9-ncurses-pkg-config.patch 305 BLAKE2B 92962397a1e74d9dca8bc232400e84673e0989239e6952c2ba9f25db6f9da343334e0ad325e8932fcec3f9a50e62d4e9b81a8d7a776cdbfc2d0399601591f534 SHA512 2c18b5041a7a2f306dd4d0d6695bd851ca14c9107b2e3e856ec094bc53c7cc407b49e1f4813ee9e753b3ad2d4f6edda943a66bb1e6c895ab956a5f84d30646c6
+AUX python-3.4.3-ncurses-pkg-config.patch 302 BLAKE2B b12910200cfe075362f8ea21320ccfa57a276918ee8601805b0d541556fd62251a81b3875b2bd3fe9634fce9e30d04b0cfb1f740e6fe816464af03e04f4011e1 SHA512 9e2bc2af0077d6282d9512b172d80ee294c47a6d41855474eed641afa8139ce4667a64c4676f5b2e40a90278b780a46e998d1096422ed0fe1d83b973dc455dc2
+AUX python-3.4.5-cross.patch 494 BLAKE2B 584e03cd740ed434fee8355b1c55205c7553a6786de7735cecd04a40593b33f8810b1b78a9036eab86c636c74c24d13d5f0e6688af5f3f61bfece938880e92b4 SHA512 66c387fa873d9aec0aa7ba2d2c6468c315dd44e96434ce6519f79de5ad820928b1b926b0a2e3a94c73d919b8f2d80c3e71964dc6870d2c7e05844a9e3b1866b8
+AUX python-3.5-distutils-OO-build.patch 3667 BLAKE2B 2010889d44f2dc8c6c16a25a83a3a8f36f08b0ac857a429f7ed536a87bb64c3e2d1f5f70f42c2b56fedd3fdb81eb269801233bd2e821fc9edec547a0d3d8255e SHA512 5e25d46a7d11b16a7183aaecf82f914506fae552aaaa3d69aca6445c131dff39d4cf13588fa109ce16d41e43355539bee8390a2c454f3696df5a06edb6a5ca77
+AUX python-3.5.5-hash-unaligned.patch 1451 BLAKE2B 30a0225118e17bf7f9177d423f50ec557c015f29f20ed48368fdaef482ecb4f572390bc3c551757ff633cdadfd2da73b1b6e9d88e8504c31c31d12d4858b9a1d SHA512 8a0f7acefc4e28c10df6d9d9ff4022cddc05167ce3c49caae32b58d221deee45741dd6c4930e83a653b5f088cf021d408ad88c3bb407440c8f1be2b8079d757a
+AUX python-3.5.5-libressl-compatibility.patch 2158 BLAKE2B e171337d466b00720ea960a167abb26a3795ad1c516a770f3c2622753139bf4a166e43e3c479b87eeb62b9e325c3d5de71642e7be4b4d36c3919e0743c226ca6 SHA512 cbb7d9cd8bd8d39ec2a9b39ff494d1d93f4d91190f5f1dcbe293871427b1ad459729dd5ce4cb8efe22e5847b477c24fd5f076bd79c94b3e7d14d159be3313f75
+AUX python-3.6.5-hash-unaligned.patch 1293 BLAKE2B d1e22b4f4c55d308b129801464e3464defa3bfba4c63c12bbcd0650f1391e3e30058f07aa3b5ec3a24df8ab5fba4f467343f44a7693f8afe798dbf245db0366a SHA512 2039104f7aac4f8edbacd5f678551aef62c068182104dbb6dcf9ac835c68d0fefa2cc9df97b8f09bb06e1b29f19c5c324f9c3d5f1161fadd223487d503de8e0d
+AUX python-3.6.5-libressl-compatibility.patch 3852 BLAKE2B 8e6860903f51bd1e783e1547d3eed76059eeea317ce0f2f98bd44df55c9be8a62973f687a029a972cac6cce63687763f824ad878d0548ec8ed71bf4c42d4b45b SHA512 4ae0e189f232d52303645391962c8390b00ae62fec45a03ddbad1b34a3eee5ef24c4d17c8a58709e452618ee0b570c2af7c01e456d285f02f5048fbbd2695ddc
+DIST Python-2.7.14.tar.xz 12576112 BLAKE2B e03c4134cfdd88678acc26f383130a598ce4de908ab6bb9ee00e9235de3e0fcb9e653fec86f39db64fb895ef797d33736524655c5b94fab2cde2544b966b2cfb SHA512 78310b0be6388ffa15f29a80afb9ab3c03a572cb094e9da00cfe391afadb51696e41f592eb658d6a31a2f422fdac8a55214a382cbb8cfb43d4a127d5b35ea7f9
+DIST Python-2.7.15.tar.xz 12642436 BLAKE2B d8783a48ea26695e8d4677397a08194c738d7e4bc8ecaddaab609ad1fd5a1ca07701f707fe38d259f6bd44a39171ef95e7530f3df4bcb4d94abc4d21d7e2d489 SHA512 27ea43eb45fc68f3d2469d5f07636e10801dee11635a430ec8ec922ed790bb426b072da94df885e4dfa1ea8b7a24f2f56dd92f9b0f51e162330f161216bd6de6
+DIST Python-3.4.5.tar.xz 14516820 BLAKE2B f9ddabd2df2241089d07756d3a8ba1c70096bee60d7cdef84041edbb20c488c3a573762441a4b7f543dbc0ce403ce84ff7d02e7d25699917bd014ab96deead85 SHA512 b548a5338d141b3086dea372fa2cc245ba5350ee9f0d1304ef6222dc45380b66d380b092e547d54206d56ca68563b95036f445f97f72bb0ef1d48f81a74a3d4c
+DIST Python-3.4.6.tar.xz 14473592 BLAKE2B 4af4f8e6f5c6831b50e99dd9eef47617f14903dc709f53f833c64726b003e9f84f75be80ba8059dcada2b2f262d65875f70d8c53a163546e51f9a715c68f4f20 SHA512 f6785cf6a99a8a27823baefe59cc20e34cbec01bb444c8600e7f49b5437159d5137f9d80fce26e219846d71bfe98f68bc6f0c87719a34db0050a4eaca95959ac
+DIST Python-3.4.8.tar.xz 14576444 BLAKE2B 262b82fbc0e4852216d2edf05f9e9194bc93be7b14a2d6ef56789b808cff274e58b2fa7134955464fd05ab36181b5861aeca31e2e05b27f0f58ac66d145bd56b SHA512 478552c72efe606cb1993024b81839c51d01f1c949564c007ab2b76016f110e1f7bd418e5de3f4f93b466ce7dbe6583d3c150830d1f28f75e0809625b568a7ec
+DIST Python-3.5.4.tar.xz 15332320 BLAKE2B 1fc3ba4eb1ed949062961c13fd1f9851c7f9cbeb4916c06a0389349ee2d4872b2b1c2d30138822e6329b6a715f35a66df704b7a04aa4adeb95b685b8d6e45d61 SHA512 dbbe2740ee1cce5404b7b6436a9b3887e15f415a1006efa22014ec7e5b1e48c43eed0ff98f6f5b365c527b8d2525be4ce72bbe404ce71c0835529fcd6f0267ff
+DIST Python-3.5.5.tar.xz 15351440 BLAKE2B 217cb7f51e04d57983ce053ff4276d056e17c8223b6f3d87b69f556453fe2ae3d4dc2c1a6b9c2c6aad033cea9b40cd32264d8208cc81a1ec34ff252379bf95b8 SHA512 c9056baee6a2d1fe7f14b1f310db95b78e8972766d086f8ae10954f38f8182956171580bde01ddadebe897f2545a6fbe47669ca3e4887026ac1fae5ee9197f22
+DIST Python-3.6.3.tar.xz 16974296 BLAKE2B 8220fc0c2eaa315d3972085b0f531f169adb6cfad57023ad2c115603b5a484573ea3540eb3216edd0f4514256c8edb07469cf38d17727d69cdc15cdf1f601623 SHA512 32f24a3adcb7880003c7ecdc5e53e838e774adda76b308961d8215e28db630b2fa2828097817924c76afa4212b2df3362eb64d4e10f37c0147f512ec5aa8662b
+DIST Python-3.6.4.tar.xz 16992824 BLAKE2B 2347a70bb25468221178b1542ddd4376f136a515f2873ee1f640c4629eb77a9608af0f6be37128ba3e8ad614ebc17e7be20b73384983533aa77bca4403ea7935 SHA512 09ba2103ac517ac4d262f00380c9aac836a53401ce252540c17fd821a3b92e1ddf32528d00772221eb3126b12cb95b62c3ac3e852f4951e6f2eb406c88c848a2
+DIST Python-3.6.5.tar.xz 17049912 BLAKE2B f393e9563a18a46c457afcd2e174d9eacda20fe2b0ae5461e11c582fa4d27b85c01bbe7b602f45511b6b44f635c6330205b12fb3e8325ffd07e87b78a8258889 SHA512 6b26fcd296b9bd8e67861eff10d14db7507711ddba947288d16d6def53135c39326b7f969c04bb2b2993f924d9e7ad3f5c5282a3915760bc0885cf0a8ea5eb51
+DIST Python-3.6.6.tar.xz 17156744 BLAKE2B fa4333149f84570cc4a0d1ec76c819610888750a51268b9db7d05df7d9c11e5ed72daff5d81b404015d9c678cb034d8a32034262ce73629ee8f96772853a706c SHA512 c71f87c5906e770322a14cacad228655659f782207db826320449d12bf86091c3662f317e1773158dec52f8b052eaedfb4c03b561cc2a6cfcd381597fd2d2b04
+DIST Python-3.7.0.tar.xz 16922100 BLAKE2B cd2afd9ad1847ca793bc64ecb637906c35e0c8da8392d626cce3ebf19be5ccde1e6dcc499b933359cb24dcdbd024b3aaa916f96ed893b1f52d9825e404f27e5f SHA512 8bb11233fb67ee9ab8ed1b72f8fdc62f66e26a6beaaeb92448bce681cf065269833b1658d3ed2459127f25ba43adb0eab73cf27c59834a2a803fb529b4216739
+DIST python-gentoo-patches-2.7.14-0.tar.xz 13428 BLAKE2B 0048e48ddaaa4bef08451354fde95a123042880f26dddc9267c7f9a90fd8abb40955e26ee8c9dfc5a1165556bb3e11585b27288e635d42a4000dd3d7654c41ad SHA512 6da5b52065752b54e9215d0f0809c75167dc3690d0e94fa21dd7595626925bc5c1dd065d31b3bd696d7087f3986de145d3a335a29eb7bd77442637a7ec2863c1
+DIST python-gentoo-patches-2.7.15.tar.xz 16208 BLAKE2B 5739c2b3a236d48f8e33f0fe6515bfe7a8f99096f6223b402653988feac2513d37d26b6e40e5e049852f42657358170e468ca60097e0e2294e760787c12ad591 SHA512 687fd008d1d41b1e65ce5417f6f6aba84ffd42f7af44ef97c03a7806b28e6888f8df043a0c15187a8b229cc17642853e6feb25494db97f4d10f8a66f8ebcbcca
+DIST python-gentoo-patches-3.4.5-0.tar.xz 12044 BLAKE2B 7fb3cc7dcd987debd5aa263d8e26b21aad439d8e3177c06c3683406a53bbda9652175673b09b6300f6a5b62148190cd8a75c9b65a5de04d770866733fcc0ebcb SHA512 108a4845667ecdf4001fcbeffab0cfbbac87439a449a7351428b0f3e2f159e3848ee0c0dfa45c9fba893b9f9584b33722fc8bb0bd7485a1d0909c3a35ede6ed8
+DIST python-gentoo-patches-3.4.6-0.tar.xz 11728 BLAKE2B 2a636f5500f4c7d354f421133f086cba9a25c30d5feaaa2dc25c9c588125d7c9097baecaa11f31548fa598b5dc137ca310ad86222510c0a955fa632a6d0a4b06 SHA512 41c22dc8f1db8800fc0b97eed2b27bf1873e5de1369bd4aecf7a7a91e609a78e45a4b56fc89d575317f33a7704c0c1cad1494e8a993415a198f256e8338f49ab
+DIST python-gentoo-patches-3.5.4-0.tar.xz 11704 BLAKE2B 4a7d71feff18c7c8c109bed10748348484d314183c3de3ec950d5ca5ce7048bb322c470f3f5bff2d63eb7f2ed99c0fe75c621df050273d9d118681b28926061d SHA512 d395a87695f700598026038d6929ea5038abd7d494294037a4dfa02d5262203dbbaa6ae258a5a7f35ff5542f6266dcf69cc0b9c3df2a047cd2f6699a87e182ec
+DIST python-gentoo-patches-3.6.2-0.tar.xz 10744 BLAKE2B 3075754627617ac2ceee879eaf1a0e6564505655cdbdff380233a09df701a6188d64fe1f6a8c642b1fb05ef3c460a07042b6a362d655cd02717d6d9ba47983a1 SHA512 2aac1700c541202aa4f43bff4cb521b996d52ab350133318abaddb43f4b6e20548f37de472ace8024ef325ebf63fdfff0d43f8aa1f717d3c56f974b7aa1764e3
+DIST python-gentoo-patches-3.6.4.tar.xz 12888 BLAKE2B 7cf49ae22df53e855f2e99df51686b5d4bd0da82ef4c22836e24726ea9ed561808352c0305a5659b052d38b843f1ff61b6466a7bc3673b7e5cfb4d81d22fa4bc SHA512 90a1b685f2539872ffd67f96581f70145b7afaf18af19f4a7f4a61214103d2a10bf0069c1769dac229ae011fceaf8538f041082b33c1671905246d018d184dd7
+DIST python-gentoo-patches-3.6.6.tar.xz 13876 BLAKE2B 4be56b54e70c9b83209734097e03a7dbaa8f46ae13e268fc6a7f465ffd052ce03ca9e1fc45f1d432f2de17d4ce16ca8bc684b24344862cd8f52f9d1a90d90b7a SHA512 534b9eaefcbc45908119852a103bf10e400a8628c66aa599812fbceda36810d626d33e6701d1b7866e4df68397f717df6a217cb414049ca6f378eff9f43a27ab
+DIST python-gentoo-patches-3.7.0.tar.xz 12268 BLAKE2B 758b635ff53b6f7bfabb1db632ee2a5c14b163d6d6f14e4e44c31c9ac1591d411f597d42b05707f586f9ff7c3a030703502307bae732bcf003987939eb5b036d SHA512 19dd5bac06bb40622e74e3b16c7fba83f1178417e686eaf61b2b207602c76beebc8c78d675e401ec4d18add1ca033fd47baf2e48e9abb487593b7d821bcaf509
+EBUILD python-2.7.14-r1.ebuild 10843 BLAKE2B e55ff0d941dcdf2a6e7ba9d00a708c73961c30bd20bbedd6ed650eb5aad949fb554dbc52bd34bfcfcdb02ae0e9baa000882b0d23a1c51c49d7d2b23d63a038b3 SHA512 318a8e08c1a615848d5d0b2547b384e34be801d67362e7960aedfbe5ee6b9f0b382208a51add4adfd7f7a01c1bd07a1918a5c3129856380ff95e752790510c3f
+EBUILD python-2.7.14-r2.ebuild 11055 BLAKE2B 7baa5627be730ee74b2de5f0559881154466a947ace70fe23aa5e2c3cb808dd870da9ca680f7aa87aef9712f54b49f563cb883d4fafdfa05819df2ad2be1106b SHA512 4109c2201d941e89a9add2b828b437fed4076b32fc8262cdda59b0d55a223c99772974e6964bb879e0279b2ebaf321da117623521ba63c8360c54056c9f5a56d
+EBUILD python-2.7.15.ebuild 10861 BLAKE2B 1bffc390545beb553ed5d5ca8891512e2fbdca611ae905938d986559b4b948a38885dff611cbf8af430c7413a33dd02d0c8eec4ba42325135e355d8e0f10ac4b SHA512 e13166e2dc1ac6fdc951030a438c4d221879d4c9fac4a3ae139f6e4a5e4f0d281ddd6a38718c7e4f06330060811bfa7cd1417dd1878bf9d82ee8f014a3deac30
+EBUILD python-3.4.5-r1.ebuild 10658 BLAKE2B 46398a90c4f67b4923d9c65476f0eceb42135084b0f71f456162557a2c7adf2cf0c6f07e2d9b65d49eb92ee75233c249bfac32a9e5fb1fcdcd67988f19e4033a SHA512 7a2e1312afcfa032aa16579868f2c7efe04eb38904db2b66f11f87e174533c9df89abeb16a28e3f6372651e2a733f885ae5bb78b07cacd150c9ffe8c66f9c2aa
+EBUILD python-3.4.6-r1.ebuild 10588 BLAKE2B f2c2081a1bb9000121854e607f310a52f1c083c840a5a10d4cfaa54d0aba66de8cd994c1cc6df702b4688875ab3327344b1ef86125602dbde353675168b7fb8d SHA512 72c0262b0c4061a97b1098373802d574591d9ae53785494fadd8b8e403d358b5ca7de478a5380b3452c5778f0ad6e186c19c41fb6a28149069096b4b69e9ce28
+EBUILD python-3.4.8-r1.ebuild 10845 BLAKE2B 58fa9357893af72ed60edf615ae02c8522e5deaaf2a0ccf8e849e0601704e3e4cf69ab9567018d5aecf75161012f3dcde71cfb5362a8efa40ff3bf73c86bf579 SHA512 d5e830065f67021b33427dae063df5ce40ddd7ece6c1b21849ec6de6ab7140d4a24a0bcd728afb234495cfe4ce4db24e75235aef9efdd95df7a4b4f0e6e4639f
+EBUILD python-3.4.8.ebuild 10638 BLAKE2B af12c201fff95b6890e726000c06193501a362db5638099678b354ae83584b0c7ced791c2e705879691ff1319e3ba87db52188a951a76f0744decb1b3700a816 SHA512 556da51c43f08ea33c91c860dad3aec63d50ea3521073666345c16655c0e544b8b8872b18bdbbfa4e3e6b14a5ad74fed72a1d31c5feb15bc6d8fd2f4205b49ba
+EBUILD python-3.5.4-r1.ebuild 10719 BLAKE2B da7ece23e2f6333066b9f5d74f40e21326ec785715a818c95627818ae3c1c8c55aedd88323e5203aa90e69290871daa1baae9802ed6dd1a2a20b7ffbd02eec76 SHA512 ec0248c551531623f02430182c299c0f19ed002c195ae020e8f5b815e9978bf7c10e0a4d85aea312e99472f117cf94089c8644a25e5a8a142f88a62daf9ad332
+EBUILD python-3.5.5-r1.ebuild 10999 BLAKE2B 80e8e0c4f0c09b4deb2f91ddae0536b5f1c8b0e3d14cdb36684a775acad7d2326ba828a8ad5a8b1560c9837ceb6eee592ea16b3c128125d95649aca44757c064 SHA512 01ddee5c0d7a792be45eabbe842ec6bf2fb608ba4d02abc5868559c6bc52e15c4b52e571e01b45557307dccb86a89dc7dcbbbc4dfe7cf96ce99c6e8cc205042f
+EBUILD python-3.5.5.ebuild 10839 BLAKE2B c2d414894a7109453066a218fb861417d4a4c96e1bad69cc7fec827df69f76852b276a910805807702020cf1fd932253c97e60b796b0c88ab148c9a39e081164 SHA512 6aef9ae4fda1f738aeaf98c7f4f139371cf0826543432d769d2f89ec84f6d0e4d860abd377654ea739cfe962cf7cd76d9af6e0292f040525daf086543862ad09
+EBUILD python-3.6.3-r1.ebuild 10151 BLAKE2B 9ec6af3cb9b012f3869cf28c5a59f6c3b36ffe403f91b0af02f2892fd083c36190e2d50ce2c81e7f9347b4a08847d1591debaa5d126734dc2d24ee349a897ec5 SHA512 67d93b9c93ee37fc46cf193730550636487b189c57fb47f1fcfc1a3bf2cf12e464df1614ee9b871f0c385c243d9fd2a167be8635a524ca322d0964c04df77f17
+EBUILD python-3.6.4.ebuild 10083 BLAKE2B 7d04d19bbc1163fd3425f666dff268ca58657ea4e6548bbe3320e9c2cec26feefcf66762d709680ad790fdd44e846fd587301b586a6f8f28a0806d7b47e29a1a SHA512 23e3d170b5f28fce900ba35108d8ffdfe654347e3af4c1fdc5920d49264f1976c16eb9393a811b4883c1a5ce94140700411bc8c2e5087a2d3a06abb164749a43
+EBUILD python-3.6.5-r1.ebuild 10387 BLAKE2B eb8fea85856a47017c639189b27cd0ab40da87f7651c51fe745e07813a74416e5e26aec55eb70638b5439fa6a08a92bcb5cb77c121f6bca3f253f1841b71f88e SHA512 2af8033d26fcca0544027c4d60a3b50b14c3e116bf1c97dcfc4c7bb62e63ff4998df75f381300ecef8ed9253e6f65fa7e99ed8f077641acf2204f92724b4274b
+EBUILD python-3.6.5.ebuild 10180 BLAKE2B d4876167eda2b03b1fb9a183447abc134ad806603db524f692a5c91fd32243103061e33ff8e8136db6d838ffe1454be1a70a4526b71626ab43eaa6407579a6ec SHA512 42ab305d129d7a5ccad4dc8cbaece4afa432c4168515da6a9784a16738cf703b110f547177e57cf6b385a9643e2278287ed9b26ef1a1e3b1a981962f52ca13e1
+EBUILD python-3.6.6.ebuild 10224 BLAKE2B 1b68598a5408e045b0cde030208265457edce9b593791ffb1f173890c569889f030118e445dfe8981bb29aee4d7840eee59d178a6a8107a63f98799256253e8f SHA512 be939d6ab2e52104938453aed9bd3bbd0c93dbb5f78a79f078c64646947345c8ceadfc5cd90685a2e63efe4acc52c704aa284d2db7755bcad36cd982e4d66427
+EBUILD python-3.7.0.ebuild 9619 BLAKE2B 7662bd885c16eb9a9cef29ca16ed7e9c632f144641030a96488d5c02ef2871a4e0c919a015f73e191d0481d7e5d8cb404eeb8e159a572d3bd0e25ababd1ef471 SHA512 fa403f5299a7ef598eadad97c5b90c419ced68dc618f6da97dabe21b3280875468477f73a9e5ca71532739f83cbc1c7bc5080cecd543d908d9805b3f08bbf036
+MISC metadata.xml 819 BLAKE2B 120c7c65d77488e726c5a0f4aa19469867ea6900e747169fae2f9cf8f14ec2936089d5edfe1935ce610bec26387273e261b1cc4b023680c8c4b229f2141a7223 SHA512 08f45707e5490067a21951b9d37c8ae67064ab67cccc5b8d8c204eab8d4a004fb910627b62989c67b849b89d301618f8f8f7996e99e1ef5bab38a239c49c124d
diff --git a/dev-lang/python/files/2.7-disable-nis.patch b/dev-lang/python/files/2.7-disable-nis.patch
new file mode 100644
index 000000000000..5a6cb3e403f1
--- /dev/null
+++ b/dev-lang/python/files/2.7-disable-nis.patch
@@ -0,0 +1,21 @@
+--- a/setup.py
++++ b/setup.py
+@@ -1346,17 +1346,7 @@ class PyBuildExt(build_ext):
+ else:
+ missing.append('resource')
+
+- # Sun yellow pages. Some systems have the functions in libc.
+- if (host_platform not in ['cygwin', 'atheos', 'qnx6'] and
+- find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
+- if (self.compiler.find_library_file(lib_dirs, 'nsl')):
+- libs = ['nsl']
+- else:
+- libs = []
+- exts.append( Extension('nis', ['nismodule.c'],
+- libraries = libs) )
+- else:
+- missing.append('nis')
++ missing.append('nis')
+ else:
+ missing.extend(['nis', 'resource', 'termios'])
+
diff --git a/dev-lang/python/files/3.4-getentropy-linux.patch b/dev-lang/python/files/3.4-getentropy-linux.patch
new file mode 100644
index 000000000000..9f12389bb253
--- /dev/null
+++ b/dev-lang/python/files/3.4-getentropy-linux.patch
@@ -0,0 +1,40 @@
+From 5635d44079e1bbd9c495951ede8d078e7b8d67d5 Mon Sep 17 00:00:00 2001
+From: Victor Stinner <victor.stinner@gmail.com>
+Date: Mon, 9 Jan 2017 11:10:41 +0100
+Subject: [PATCH] Don't use getentropy() on Linux
+
+Issue #29188: Support glibc 2.24 on Linux: don't use getentropy() function but
+read from /dev/urandom to get random bytes, for example in os.urandom(). On
+Linux, getentropy() is implemented which getrandom() is blocking mode, whereas
+os.urandom() should not block.
+---
+ Python/random.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/Python/random.c b/Python/random.c
+index af3d0bd0d5..dc6400d3b8 100644
+--- a/Python/random.c
++++ b/Python/random.c
+@@ -67,9 +67,16 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
+ return 0;
+ }
+
+-/* Issue #25003: Don' use getentropy() on Solaris (available since
+- * Solaris 11.3), it is blocking whereas os.urandom() should not block. */
+-#elif defined(HAVE_GETENTROPY) && !defined(sun)
++/* Issue #25003: Don't use getentropy() on Solaris (available since
++ Solaris 11.3), it is blocking whereas os.urandom() should not block.
++
++ Issue #29188: Don't use getentropy() on Linux since the glibc 2.24
++ implements it with the getrandom() syscall which can fail with ENOSYS,
++ and this error is not supported in py_getentropy() and getrandom() is called
++ with flags=0 which blocks until system urandom is initialized, which is not
++ the desired behaviour to seed the Python hash secret nor for os.urandom():
++ see the PEP 524 which was only implemented in Python 3.6. */
++#elif defined(HAVE_GETENTROPY) && !defined(sun) && !defined(linux)
+ #define PY_GETENTROPY 1
+
+ /* Fill buffer with size pseudo-random bytes generated by getentropy().
+--
+2.15.0.rc2
+
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-disable-nis.patch b/dev-lang/python/files/3.6-disable-nis.patch
new file mode 100644
index 000000000000..4e81847b5070
--- /dev/null
+++ b/dev-lang/python/files/3.6-disable-nis.patch
@@ -0,0 +1,21 @@
+--- a/setup.py
++++ b/setup.py
+@@ -1332,17 +1332,7 @@ class PyBuildExt(build_ext):
+ # Jeremy Hylton's rlimit interface
+ exts.append( Extension('resource', ['resource.c']) )
+
+- # Sun yellow pages. Some systems have the functions in libc.
+- if (host_platform not in ['cygwin', 'qnx6'] and
+- find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
+- if (self.compiler.find_library_file(lib_dirs, 'nsl')):
+- libs = ['nsl']
+- else:
+- libs = []
+- exts.append( Extension('nis', ['nismodule.c'],
+- libraries = libs) )
+- else:
+- missing.append('nis')
++ missing.append('nis')
+ else:
+ missing.extend(['nis', 'resource', 'termios'])
+
diff --git a/dev-lang/python/files/3.6.5-disable-nis.patch b/dev-lang/python/files/3.6.5-disable-nis.patch
new file mode 100644
index 000000000000..3937c6fe795d
--- /dev/null
+++ b/dev-lang/python/files/3.6.5-disable-nis.patch
@@ -0,0 +1,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -1364,7 +1364,7 @@ class PyBuildExt(build_ext):
+ else:
+ missing.extend(['resource', 'termios'])
+
+- nis = self._detect_nis(inc_dirs, lib_dirs)
++ nis = None
+ if nis is not None:
+ exts.append(nis)
+ else:
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-libressl-compatibility.patch b/dev-lang/python/files/python-2.7-libressl-compatibility.patch
new file mode 100644
index 000000000000..c9e7a8458e35
--- /dev/null
+++ b/dev-lang/python/files/python-2.7-libressl-compatibility.patch
@@ -0,0 +1,92 @@
+# From https://github.com/python/cpython/pull/6215
+
+# LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects
+# LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and
+# LibreSSL < 2.7.
+
+# Documentation updates and fixes for failing tests will be provided in
+# another patch set.
+
+# Signed-off-by: Christian Heimes christian@python.org.
+# (cherry picked from commit 4ca0739)
+
+#Co-authored-by: Christian Heimes christian@python.org
+
+--- a/Modules/_ssl.c 2017-09-16 17:38:35.000000000 +0000
++++ b/Modules/_ssl.c 2018-04-13 15:55:10.919424126 +0000
+@@ -97,6 +102,12 @@
+
+ #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ # define OPENSSL_VERSION_1_1 1
++# define PY_OPENSSL_1_1_API 1
++#endif
++
++/* LibreSSL 2.7.0 provides necessary OpenSSL 1.1.0 APIs */
++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL
++# define PY_OPENSSL_1_1_API 1
+ #endif
+
+ /* Openssl comes with TLSv1.1 and TLSv1.2 between 1.0.0h and 1.0.1
+@@ -118,24 +129,44 @@
+ #endif
+
+ /* ALPN added in OpenSSL 1.0.2 */
+-#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined(OPENSSL_NO_TLSEXT)
+-# define HAVE_ALPN
++#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
++# define HAVE_ALPN 1
++#else
++# define HAVE_ALPN 0
++#endif
++
++/* We cannot rely on OPENSSL_NO_NEXTPROTONEG because LibreSSL 2.6.1 dropped
++ * NPN support but did not set OPENSSL_NO_NEXTPROTONEG for compatibility
++ * reasons. The check for TLSEXT_TYPE_next_proto_neg works with
++ * OpenSSL 1.0.1+ and LibreSSL.
++ * OpenSSL 1.1.1-pre1 dropped NPN but still has TLSEXT_TYPE_next_proto_neg.
++ */
++#ifdef OPENSSL_NO_NEXTPROTONEG
++# define HAVE_NPN 0
++#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER)
++# define HAVE_NPN 0
++#elif defined(TLSEXT_TYPE_next_proto_neg)
++# define HAVE_NPN 1
++#else
++# define HAVE_NPN 0
+ #endif
+
+ #ifndef INVALID_SOCKET /* MS defines this */
+ #define INVALID_SOCKET (-1)
+ #endif
+
+-#ifdef OPENSSL_VERSION_1_1
+-/* OpenSSL 1.1.0+ */
+-#ifndef OPENSSL_NO_SSL2
+-#define OPENSSL_NO_SSL2
+-#endif
+-#else /* OpenSSL < 1.1.0 */
+-#if defined(WITH_THREAD)
++/* OpenSSL 1.0.2 and LibreSSL needs extra code for locking */
++#if !defined(OPENSSL_VERSION_1_1) && defined(WITH_THREAD)
+ #define HAVE_OPENSSL_CRYPTO_LOCK
+ #endif
+
++#if defined(OPENSSL_VERSION_1_1) && !defined(OPENSSL_NO_SSL2)
++#define OPENSSL_NO_SSL2
++#endif
++
++#ifndef PY_OPENSSL_1_1_API
++/* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */
++
+ #define TLS_method SSLv23_method
+
+ static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne)
+@@ -178,7 +209,7 @@
+ {
+ return store->param;
+ }
+-#endif /* OpenSSL < 1.1.0 or LibreSSL */
++#endif /* OpenSSL < 1.1.0 or LibreSSL < 2.7.0 */
+
+
+ enum py_ssl_error {
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/files/python-3.5.5-hash-unaligned.patch b/dev-lang/python/files/python-3.5.5-hash-unaligned.patch
new file mode 100644
index 000000000000..c418f40b7da4
--- /dev/null
+++ b/dev-lang/python/files/python-3.5.5-hash-unaligned.patch
@@ -0,0 +1,43 @@
+The hash implementation casts the input pointer to uint64_t* and directly reads
+from this, which may cause unaligned accesses. Use memcpy() instead so this code
+will not crash with SIGBUS on sparc.
+
+--- a/Python/pyhash.c 2017-11-29 10:21:20.283094068 +0100
++++ b/Python/pyhash.c 2017-11-29 10:24:26.733087813 +0100
+@@ -372,7 +372,7 @@ siphash24(const void *src, Py_ssize_t sr
+ PY_UINT64_T k0 = _le64toh(_Py_HashSecret.siphash.k0);
+ PY_UINT64_T k1 = _le64toh(_Py_HashSecret.siphash.k1);
+ PY_UINT64_T b = (PY_UINT64_T)src_sz << 56;
+- const PY_UINT64_T *in = (PY_UINT64_T*)src;
++ const PY_UINT8_T *in = (PY_UINT8_T*)src;
+
+ PY_UINT64_T v0 = k0 ^ 0x736f6d6570736575ULL;
+ PY_UINT64_T v1 = k1 ^ 0x646f72616e646f6dULL;
+@@ -381,12 +381,14 @@ siphash24(const void *src, Py_ssize_t sr
+
+ PY_UINT64_T t;
+ PY_UINT8_T *pt;
+- PY_UINT8_T *m;
++ const PY_UINT8_T *m;
+
+ while (src_sz >= 8) {
+- PY_UINT64_T mi = _le64toh(*in);
+- in += 1;
+- src_sz -= 8;
++ PY_UINT64_T mi;
++ memcpy(&mi, in, sizeof(mi));
++ mi = _le64toh(mi);
++ in += sizeof(mi);
++ src_sz -= sizeof(mi);
+ v3 ^= mi;
+ DOUBLE_ROUND(v0,v1,v2,v3);
+ v0 ^= mi;
+@@ -394,7 +396,7 @@ siphash24(const void *src, Py_ssize_t sr
+
+ t = 0;
+ pt = (PY_UINT8_T *)&t;
+- m = (PY_UINT8_T *)in;
++ m = in;
+ switch (src_sz) {
+ case 7: pt[6] = m[6];
+ case 6: pt[5] = m[5];
diff --git a/dev-lang/python/files/python-3.5.5-libressl-compatibility.patch b/dev-lang/python/files/python-3.5.5-libressl-compatibility.patch
new file mode 100644
index 000000000000..67d57d0c138b
--- /dev/null
+++ b/dev-lang/python/files/python-3.5.5-libressl-compatibility.patch
@@ -0,0 +1,69 @@
+# From 8d89a385b71a2e4cce0fba0cfc8d91b63485edc5 Mon Sep 17 00:00:00 2001
+# From: Christian Heimes <christian@python.org>
+# Date: Sat, 24 Mar 2018 18:38:14 +0100
+# Subject: [PATCH] [3.6] bpo-33127: Compatibility patch for LibreSSL 2.7.0
+# (GH-6210) (GH-6214)
+#
+# LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects
+# LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and
+# LibreSSL < 2.7.
+
+# Documentation updates and fixes for failing tests will be provided in
+# another patch set.
+
+# Signed-off-by: Christian Heimes <christian@python.org>.
+# (cherry picked from commit 4ca0739c9d97ac7cd45499e0d31be68dc659d0e1)
+
+# Co-authored-by: Christian Heimes <christian@python.org>
+# Patch modified by Aaron Bauman <bman@gentoo.org> for 3.5.5
+
+--- a/Modules/_ssl.c 2018-04-13 18:33:17.397649561 -0400
++++ b/Modules/_ssl.c 2018-04-13 18:40:22.319852014 -0400
+@@ -101,6 +101,12 @@
+
+ #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ # define OPENSSL_VERSION_1_1 1
++# define PY_OPENSSL_1_1_API 1
++#endif
++
++/* LibreSSL 2.7.0 provides necessary OpenSSL 1.1.0 APIs */
++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL
++# define PY_OPENSSL_1_1_API 1
+ #endif
+
+ /* Openssl comes with TLSv1.1 and TLSv1.2 between 1.0.0h and 1.0.1
+@@ -129,16 +135,18 @@
+ #define INVALID_SOCKET (-1)
+ #endif
+
+-#ifdef OPENSSL_VERSION_1_1
+-/* OpenSSL 1.1.0+ */
+-#ifndef OPENSSL_NO_SSL2
+-#define OPENSSL_NO_SSL2
+-#endif
+-#else /* OpenSSL < 1.1.0 */
+-#if defined(WITH_THREAD)
++/* OpenSSL 1.0.2 and LibreSSL needs extra code for locking */
++#if !defined(OPENSSL_VERSION_1_1) && defined(WITH_THREAD)
+ #define HAVE_OPENSSL_CRYPTO_LOCK
+ #endif
+
++#if defined(OPENSSL_VERSION_1_1) && !defined(OPENSSL_NO_SSL2)
++#define OPENSSL_NO_SSL2
++#endif
++
++#ifndef PY_OPENSSL_1_1_API
++/* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */
++
+ #define TLS_method SSLv23_method
+
+ static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne)
+@@ -187,7 +195,7 @@
+ {
+ return store->param;
+ }
+-#endif /* OpenSSL < 1.1.0 or LibreSSL */
++#endif /* OpenSSL < 1.1.0 or LibreSSL < 2.7.0 */
+
+
+ enum py_ssl_error {
diff --git a/dev-lang/python/files/python-3.6.5-hash-unaligned.patch b/dev-lang/python/files/python-3.6.5-hash-unaligned.patch
new file mode 100644
index 000000000000..d096887cbfb7
--- /dev/null
+++ b/dev-lang/python/files/python-3.6.5-hash-unaligned.patch
@@ -0,0 +1,42 @@
+The hash implementation casts the input pointer to uint64_t* and directly reads
+from this, which may cause unaligned accesses. Use memcpy() instead so this code
+will not crash with SIGBUS on sparc.
+
+--- a/Python/pyhash.c 2017-11-29 10:21:20.283094068 +0100
++++ b/Python/pyhash.c 2017-11-29 10:24:26.733087813 +0100
+@@ -369,7 +369,7 @@
+ uint64_t k0 = _le64toh(_Py_HashSecret.siphash.k0);
+ uint64_t k1 = _le64toh(_Py_HashSecret.siphash.k1);
+ uint64_t b = (uint64_t)src_sz << 56;
+- const uint64_t *in = (uint64_t*)src;
++ const uint8_t *in = (uint8_t*)src;
+
+ uint64_t v0 = k0 ^ 0x736f6d6570736575ULL;
+ uint64_t v1 = k1 ^ 0x646f72616e646f6dULL;
+@@ -378,11 +378,13 @@
+
+ uint64_t t;
+ uint8_t *pt;
+- uint8_t *m;
++ const uint8_t *m;
+
+ while (src_sz >= 8) {
+- uint64_t mi = _le64toh(*in);
+- in += 1;
+- src_sz -= 8;
++ uint64_t mi;
++ memcpy(&mi, in, sizeof(mi));
++ mi = _le64toh(mi);
++ in += sizeof(mi);
++ src_sz -= sizeof(mi);
+ v3 ^= mi;
+ DOUBLE_ROUND(v0,v1,v2,v3);
+@@ -391,7 +393,7 @@
+
+ t = 0;
+ pt = (uint8_t *)&t;
+- m = (uint8_t *)in;
++ m = in;
+ switch (src_sz) {
+ case 7: pt[6] = m[6]; /* fall through */
+ case 6: pt[5] = m[5]; /* fall through */
diff --git a/dev-lang/python/files/python-3.6.5-libressl-compatibility.patch b/dev-lang/python/files/python-3.6.5-libressl-compatibility.patch
new file mode 100644
index 000000000000..2f9e6a2bef24
--- /dev/null
+++ b/dev-lang/python/files/python-3.6.5-libressl-compatibility.patch
@@ -0,0 +1,114 @@
+From 8d89a385b71a2e4cce0fba0cfc8d91b63485edc5 Mon Sep 17 00:00:00 2001
+From: Christian Heimes <christian@python.org>
+Date: Sat, 24 Mar 2018 18:38:14 +0100
+Subject: [PATCH] [3.6] bpo-33127: Compatibility patch for LibreSSL 2.7.0
+ (GH-6210) (GH-6214)
+
+LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects
+LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and
+LibreSSL < 2.7.
+
+Documentation updates and fixes for failing tests will be provided in
+another patch set.
+
+Signed-off-by: Christian Heimes <christian@python.org>.
+(cherry picked from commit 4ca0739c9d97ac7cd45499e0d31be68dc659d0e1)
+
+Co-authored-by: Christian Heimes <christian@python.org>
+---
+ Lib/test/test_ssl.py | 1 +
+ .../2018-03-24-15-08-24.bpo-33127.olJmHv.rst | 1 +
+ Modules/_ssl.c | 24 ++++++++++++-------
+ Tools/ssl/multissltests.py | 3 ++-
+ 4 files changed, 20 insertions(+), 9 deletions(-)
+ create mode 100644 Misc/NEWS.d/next/Library/2018-03-24-15-08-24.bpo-33127.olJmHv.rst
+
+diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
+index 8dd3b41450..9785a59a7e 100644
+--- a/Lib/test/test_ssl.py
++++ b/Lib/test/test_ssl.py
+@@ -1687,6 +1687,7 @@ class SimpleBackgroundTests(unittest.TestCase):
+ self.assertEqual(len(ctx.get_ca_certs()), 1)
+
+ @needs_sni
++ @unittest.skipUnless(hasattr(ssl, "PROTOCOL_TLSv1_2"), "needs TLS 1.2")
+ def test_context_setget(self):
+ # Check that the context of a connected socket can be replaced.
+ ctx1 = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
+diff --git a/Misc/NEWS.d/next/Library/2018-03-24-15-08-24.bpo-33127.olJmHv.rst b/Misc/NEWS.d/next/Library/2018-03-24-15-08-24.bpo-33127.olJmHv.rst
+new file mode 100644
+index 0000000000..635aabbde0
+--- /dev/null
++++ b/Misc/NEWS.d/next/Library/2018-03-24-15-08-24.bpo-33127.olJmHv.rst
+@@ -0,0 +1 @@
++The ssl module now compiles with LibreSSL 2.7.1.
+diff --git a/Modules/_ssl.c b/Modules/_ssl.c
+index c54e43c2b4..5e007da858 100644
+--- a/Modules/_ssl.c
++++ b/Modules/_ssl.c
+@@ -106,6 +106,12 @@ struct py_ssl_library_code {
+
+ #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ # define OPENSSL_VERSION_1_1 1
++# define PY_OPENSSL_1_1_API 1
++#endif
++
++/* LibreSSL 2.7.0 provides necessary OpenSSL 1.1.0 APIs */
++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL
++# define PY_OPENSSL_1_1_API 1
+ #endif
+
+ /* Openssl comes with TLSv1.1 and TLSv1.2 between 1.0.0h and 1.0.1
+@@ -152,16 +158,18 @@ struct py_ssl_library_code {
+ #define INVALID_SOCKET (-1)
+ #endif
+
+-#ifdef OPENSSL_VERSION_1_1
+-/* OpenSSL 1.1.0+ */
+-#ifndef OPENSSL_NO_SSL2
+-#define OPENSSL_NO_SSL2
+-#endif
+-#else /* OpenSSL < 1.1.0 */
+-#if defined(WITH_THREAD)
++/* OpenSSL 1.0.2 and LibreSSL needs extra code for locking */
++#if !defined(OPENSSL_VERSION_1_1) && defined(WITH_THREAD)
+ #define HAVE_OPENSSL_CRYPTO_LOCK
+ #endif
+
++#if defined(OPENSSL_VERSION_1_1) && !defined(OPENSSL_NO_SSL2)
++#define OPENSSL_NO_SSL2
++#endif
++
++#ifndef PY_OPENSSL_1_1_API
++/* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */
++
+ #define TLS_method SSLv23_method
+ #define TLS_client_method SSLv23_client_method
+ #define TLS_server_method SSLv23_server_method
+@@ -227,7 +235,7 @@ SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s)
+ return s->tlsext_tick_lifetime_hint;
+ }
+
+-#endif /* OpenSSL < 1.1.0 or LibreSSL */
++#endif /* OpenSSL < 1.1.0 or LibreSSL < 2.7.0 */
+
+
+ enum py_ssl_error {
+diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py
+index ce5bbd8530..ba4529ae06 100755
+--- a/Tools/ssl/multissltests.py
++++ b/Tools/ssl/multissltests.py
+@@ -57,8 +57,9 @@ LIBRESSL_OLD_VERSIONS = [
+ ]
+
+ LIBRESSL_RECENT_VERSIONS = [
+- "2.5.3",
+ "2.5.5",
++ "2.6.4",
++ "2.7.1",
+ ]
+
+ # store files in ../multissl
+--
+2.17.0
+
diff --git a/dev-lang/python/metadata.xml b/dev-lang/python/metadata.xml
new file mode 100644
index 000000000000..98fa548446f3
--- /dev/null
+++ b/dev-lang/python/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>python@gentoo.org</email>
+ <name>Python</name>
+</maintainer>
+<use>
+ <flag name="bluetooth">Build Bluetooth protocol support in socket module</flag>
+ <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.14-r1.ebuild b/dev-lang/python/python-2.7.14-r1.ebuild
new file mode 100644
index 000000000000..a392cbff39c4
--- /dev/null
+++ b/dev-lang/python/python-2.7.14-r1.ebuild
@@ -0,0 +1,365 @@
+# Copyright 1999-2018 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 ~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:0= )
+ )
+ 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 "${FILESDIR}/2.7-disable-nis.patch"
+ epatch "${FILESDIR}/python-2.7-libressl-compatibility.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}:}${PWD}
+ 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-r2.ebuild b/dev-lang/python/python-2.7.14-r2.ebuild
new file mode 100644
index 000000000000..0f8059803be1
--- /dev/null
+++ b/dev-lang/python/python-2.7.14-r2.ebuild
@@ -0,0 +1,369 @@
+# Copyright 1999-2018 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 ~x86-fbsd"
+IUSE="-berkdb bluetooth 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:0= )
+ )
+ 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"
+# bluetooth requires headers from bluez
+DEPEND="${RDEPEND}
+ bluetooth? ( net-wireless/bluez )
+ 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 "${FILESDIR}/2.7-disable-nis.patch"
+ epatch "${FILESDIR}/python-2.7-libressl-compatibility.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"
+ # disable automagic bluetooth headers detection
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ 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}:}${PWD}
+ 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.15.ebuild b/dev-lang/python/python-2.7.15.ebuild
new file mode 100644
index 000000000000..a7858f607346
--- /dev/null
+++ b/dev-lang/python/python-2.7.15.ebuild
@@ -0,0 +1,361 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+WANT_LIBTOOL="none"
+
+inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="2.7.15"
+
+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 ~x86-fbsd"
+IUSE="-berkdb bluetooth 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:0= )
+ )
+ 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"
+# bluetooth requires headers from bluez
+DEPEND="${RDEPEND}
+ bluetooth? ( net-wireless/bluez )
+ 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
+ rm "${WORKDIR}/patches/0006-Regenerate-platform-specific-modules.patch" || die
+ fi
+
+ local PATCHES=(
+ "${WORKDIR}/patches"
+ # Fix for cross-compiling.
+ "${FILESDIR}/python-2.7.5-nonfatal-compileall.patch"
+ "${FILESDIR}/python-2.7.9-ncurses-pkg-config.patch"
+ "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch"
+ "${FILESDIR}/python-2.7.10-system-libffi.patch"
+ )
+
+ default
+
+ 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"
+ # disable automagic bluetooth headers detection
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ 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}:}${PWD}
+ 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-r1.ebuild b/dev-lang/python/python-3.4.5-r1.ebuild
new file mode 100644
index 000000000000..ba53f11277db
--- /dev/null
+++ b/dev-lang/python/python-3.4.5-r1.ebuild
@@ -0,0 +1,360 @@
+# Copyright 1999-2018 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 ~x86-fbsd"
+IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
+RESTRICT="!test? ( test )"
+
+# 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}
+ test? ( app-arch/xz-utils[extra-filters(+)] )
+ 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 "${FILESDIR}/3.4-getentropy-linux.patch"
+ epatch "${FILESDIR}/3.6-disable-nis.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}:}${PWD}
+ 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-r1.ebuild b/dev-lang/python/python-3.4.6-r1.ebuild
new file mode 100644
index 000000000000..00a9bfb9c67b
--- /dev/null
+++ b/dev-lang/python/python-3.4.6-r1.ebuild
@@ -0,0 +1,356 @@
+# Copyright 1999-2018 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 ~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 "${FILESDIR}/3.4-getentropy-linux.patch"
+ epatch "${FILESDIR}/3.6-disable-nis.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}:}${PWD}
+ 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.8-r1.ebuild b/dev-lang/python/python-3.4.8-r1.ebuild
new file mode 100644
index 000000000000..5534c1784879
--- /dev/null
+++ b/dev-lang/python/python-3.4.8-r1.ebuild
@@ -0,0 +1,363 @@
+# Copyright 1999-2018 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 ~x86-fbsd"
+IUSE="bluetooth 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"
+# bluetooth requires headers from bluez
+DEPEND="${RDEPEND}
+ bluetooth? ( net-wireless/bluez )
+ 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 "${FILESDIR}/3.4-getentropy-linux.patch"
+ epatch "${FILESDIR}/3.6-disable-nis.patch"
+ epatch "${FILESDIR}/python-3.5.5-hash-unaligned.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
+ # disable automagic bluetooth headers detection
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ 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}:}${PWD}
+ 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.8.ebuild b/dev-lang/python/python-3.4.8.ebuild
new file mode 100644
index 000000000000..dc6875883582
--- /dev/null
+++ b/dev-lang/python/python-3.4.8.ebuild
@@ -0,0 +1,359 @@
+# Copyright 1999-2018 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 ~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 "${FILESDIR}/3.4-getentropy-linux.patch"
+ epatch "${FILESDIR}/3.6-disable-nis.patch"
+ epatch "${FILESDIR}/python-3.5.5-hash-unaligned.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}:}${PWD}
+ 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-r1.ebuild b/dev-lang/python/python-3.5.4-r1.ebuild
new file mode 100644
index 000000000000..3e416a39721d
--- /dev/null
+++ b/dev-lang/python/python-3.5.4-r1.ebuild
@@ -0,0 +1,365 @@
+# Copyright 1999-2018 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 ~x86-fbsd"
+IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
+RESTRICT="!test? ( test )"
+
+# 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}
+ test? ( app-arch/xz-utils[extra-filters(+)] )
+ 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 "${FILESDIR}/3.6-disable-nis.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}:}${PWD}
+ 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.5-r1.ebuild b/dev-lang/python/python-3.5.5-r1.ebuild
new file mode 100644
index 000000000000..77783a7b54ed
--- /dev/null
+++ b/dev-lang/python/python-3.5.5-r1.ebuild
@@ -0,0 +1,368 @@
+# Copyright 1999-2018 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 ~x86-fbsd"
+IUSE="bluetooth build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
+RESTRICT="!test? ( test )"
+
+# 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:0= )
+ )
+ 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"
+# bluetooth requires headers from bluez
+DEPEND="${RDEPEND}
+ bluetooth? ( net-wireless/bluez )
+ 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 "${FILESDIR}/3.6-disable-nis.patch"
+ epatch "${FILESDIR}/python-3.5.5-libressl-compatibility.patch"
+ epatch "${FILESDIR}/python-3.5.5-hash-unaligned.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
+ # disable automagic bluetooth headers detection
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ 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}:}${PWD}
+ 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.5.ebuild b/dev-lang/python/python-3.5.5.ebuild
new file mode 100644
index 000000000000..344952d35ebf
--- /dev/null
+++ b/dev-lang/python/python-3.5.5.ebuild
@@ -0,0 +1,365 @@
+# Copyright 1999-2018 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 ~x86-fbsd"
+IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
+RESTRICT="!test? ( test )"
+
+# 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:0= )
+ )
+ 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}
+ test? ( app-arch/xz-utils[extra-filters(+)] )
+ 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 "${FILESDIR}/3.6-disable-nis.patch"
+ epatch "${FILESDIR}/python-3.5.5-libressl-compatibility.patch"
+ epatch "${FILESDIR}/python-3.5.5-hash-unaligned.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}:}${PWD}
+ 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-r1.ebuild b/dev-lang/python/python-3.6.3-r1.ebuild
new file mode 100644
index 000000000000..a725f4bf9888
--- /dev/null
+++ b/dev-lang/python/python-3.6.3-r1.ebuild
@@ -0,0 +1,345 @@
+# Copyright 1999-2018 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 ~x86-fbsd"
+IUSE="build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
+RESTRICT="!test? ( test )"
+
+# 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}
+ test? ( app-arch/xz-utils[extra-filters(+)] )
+ 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 "${FILESDIR}/3.6-disable-nis.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}:}${PWD}
+ 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.4.ebuild b/dev-lang/python/python-3.6.4.ebuild
new file mode 100644
index 000000000000..522b5b5078a4
--- /dev/null
+++ b/dev-lang/python/python-3.6.4.ebuild
@@ -0,0 +1,346 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+WANT_LIBTOOL="none"
+
+inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="3.6.4"
+
+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 ~x86-fbsd"
+IUSE="build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
+RESTRICT="!test? ( test )"
+
+# 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}
+ test? ( app-arch/xz-utils[extra-filters(+)] )
+ 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
+
+ local PATCHES=(
+ "${WORKDIR}/patches"
+ "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
+ "${FILESDIR}/3.6-disable-nis.patch"
+ )
+
+ default
+
+ 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}:}${PWD}
+ 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.5-r1.ebuild b/dev-lang/python/python-3.6.5-r1.ebuild
new file mode 100644
index 000000000000..1b6857af96bd
--- /dev/null
+++ b/dev-lang/python/python-3.6.5-r1.ebuild
@@ -0,0 +1,350 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+WANT_LIBTOOL="none"
+
+inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="3.6.4"
+
+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 ~x86-fbsd"
+IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
+RESTRICT="!test? ( test )"
+
+# 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:0= )
+ )
+ 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"
+# bluetooth requires headers from bluez
+DEPEND="${RDEPEND}
+ bluetooth? ( net-wireless/bluez )
+ test? ( app-arch/xz-utils[extra-filters(+)] )
+ 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
+
+ local PATCHES=(
+ "${WORKDIR}/patches"
+ "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
+ "${FILESDIR}/3.6.5-disable-nis.patch"
+ "${FILESDIR}/python-3.6.5-libressl-compatibility.patch"
+ "${FILESDIR}/python-3.6.5-hash-unaligned.patch"
+ )
+
+ default
+
+ 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
+ # disable automagic bluetooth headers detection
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ 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}:}${PWD}
+ 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.5.ebuild b/dev-lang/python/python-3.6.5.ebuild
new file mode 100644
index 000000000000..a88bf7b584b6
--- /dev/null
+++ b/dev-lang/python/python-3.6.5.ebuild
@@ -0,0 +1,346 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+WANT_LIBTOOL="none"
+
+inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="3.6.4"
+
+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 ~x86-fbsd"
+IUSE="build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
+RESTRICT="!test? ( test )"
+
+# 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:0= )
+ )
+ 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}
+ test? ( app-arch/xz-utils[extra-filters(+)] )
+ 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
+
+ local PATCHES=(
+ "${WORKDIR}/patches"
+ "${FILESDIR}/${PN}-3.5-distutils-OO-build.patch"
+ "${FILESDIR}/3.6.5-disable-nis.patch"
+ "${FILESDIR}/python-3.6.5-libressl-compatibility.patch"
+ "${FILESDIR}/python-3.6.5-hash-unaligned.patch"
+ )
+
+ default
+
+ 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}:}${PWD}
+ 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.6.ebuild b/dev-lang/python/python-3.6.6.ebuild
new file mode 100644
index 000000000000..005fb4f6783b
--- /dev/null
+++ b/dev-lang/python/python-3.6.6.ebuild
@@ -0,0 +1,349 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+WANT_LIBTOOL="none"
+
+inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="3.6.6"
+
+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 ~x86-fbsd"
+IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml"
+RESTRICT="!test? ( test )"
+
+# 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:0= )
+ )
+ 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"
+# bluetooth requires headers from bluez
+DEPEND="${RDEPEND}
+ bluetooth? ( net-wireless/bluez )
+ test? ( app-arch/xz-utils[extra-filters(+)] )
+ 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
+
+ local PATCHES=(
+ "${WORKDIR}/patches"
+ )
+
+ default
+
+ 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
+ # disable automagic bluetooth headers detection
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ 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
+
+ # bug 660358
+ local -x COLUMNS=80
+
+ 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}:}${PWD}
+ 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.7.0.ebuild b/dev-lang/python/python-3.7.0.ebuild
new file mode 100644
index 000000000000..e3cebf3af955
--- /dev/null
+++ b/dev-lang/python/python-3.7.0.ebuild
@@ -0,0 +1,324 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+WANT_LIBTOOL="none"
+
+inherit autotools flag-o-matic pax-utils python-utils-r1 toolchain-funcs
+
+MY_P="Python-${PV}"
+PATCHSET_VERSION="3.7.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.7/3.7m"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
+RESTRICT="!test? ( test )"
+
+# 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:0= )
+ )
+ 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"
+# bluetooth requires headers from bluez
+DEPEND="${RDEPEND}
+ bluetooth? ( net-wireless/bluez )
+ test? ( app-arch/xz-utils[extra-filters(+)] )
+ 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
+
+ local PATCHES=(
+ "${WORKDIR}/patches"
+ )
+
+ default
+
+ sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
+ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
+
+ eautoreconf
+}
+
+src_configure() {
+ local disable
+ # disable automagic bluetooth headers detection
+ use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
+ 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=(
+ --enable-shared
+ $(use_enable ipv6)
+ --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[@]}"
+}
+
+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
+
+ # bug 660358
+ local -x COLUMNS=80
+
+ 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/lib/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/lib/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 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}:}${PWD}
+ 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-10.0-r1 b/dev-lang/qu-prolog-10.0-r1
deleted file mode 100644
index 5984c2ffeca7..000000000000
--- a/dev-lang/qu-prolog-10.0-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare
-DEPEND=!dev-util/mpatch !dev-util/rej !games-rpg/kqlives qt5? ( dev-qt/qtwidgets:5 dev-qt/qtgui:5 ) pedro? ( net-misc/pedro ) readline? ( app-misc/rlwrap ) dev-lang/perl
-DESCRIPTION=Extended Prolog supporting quantifiers, object-variables and substitutions
-EAPI=5
-HOMEPAGE=http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html
-IUSE=debug doc examples pedro qt5 readline threads
-KEYWORDS=amd64 ppc x86
-LICENSE=Apache-2.0 GPL-2+
-RDEPEND=!dev-util/mpatch !dev-util/rej !games-rpg/kqlives qt5? ( dev-qt/qtwidgets:5 dev-qt/qtgui:5 ) pedro? ( net-misc/pedro ) readline? ( app-misc/rlwrap )
-SLOT=0
-SRC_URI=http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/qp10.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 qmake-utils bdf97e69a34b864d6d545f4ec3143ff7 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=2b4291d669fa88e20148f3d0d48c879a
diff --git a/dev-lang/qu-prolog/Manifest b/dev-lang/qu-prolog/Manifest
new file mode 100644
index 000000000000..902f3d440918
--- /dev/null
+++ b/dev-lang/qu-prolog/Manifest
@@ -0,0 +1,7 @@
+AUX qu-prolog-10.0-associated-item.patch 335 BLAKE2B f80af03e270ca823452a8fe88e83d915d394d9ba7d043d3afdee5bdb7bfdce1bdb1b268a13b65c024f75005b78126f1f0ae04c6eda7aba234acc47fd51a64298 SHA512 3b4cefaecacb1e1fb8df8804f198563e99ee69b2ffbdc421e56fb34faeb5ed1a87809b4acf917999ac5e25982e522c8b08775cf9bcf1c01675a77521d372913f
+AUX qu-prolog-10.0-configure.patch 518 BLAKE2B f63f876b8b3048e74092bf398df89f951e976019e548e3563506c20aa69e9a08bd7d21a8a13240c7416a0b5edd592c8d86b43e13586acaa2366770729cf578b7 SHA512 85e484b8086054166740dd757b95547179afa5c199c240b43dcef531aeedd812f4fcb35003a888708c90db5d7bb1ffd22cf9bef1fd31f339ec0894ddde365cd9
+AUX qu-prolog-10.0-gcc6.patch 906 BLAKE2B 5d1e1b7632faa993c2a0bfc087cce0d73ed33e65997615aec0c053dbf2905e58506fbeed3934a4944ad0309bfbffc748285a75095ef5483703e33250cb617cc1 SHA512 bbf5a1d5749964bc5c0e8e530de3729bf1666e541f908ddc66debc696a6b6b4dc55373ef788348f02e33aa58afa5a350f7be866bfb1e4c31c917f334e9dc9ca6
+AUX qu-prolog-10.0-qt5.patch 1037 BLAKE2B d66f62aee4ad43eb400d33895c5222b6ccaa407dbb33d44326f7d29375b57ee846d90d48708915a31a9586481f354e65c93b2f7da06ccd2e49ab984850ec74e7 SHA512 8c82d180adfc290885273dd4dafbbb7cdcca3c2854854401f1123dd562699490c8fd77a54a5707425c852871091074ed4bbefa96b53782dbb06b6c1c57dfce53
+DIST qp10.0.tar.gz 1521469 BLAKE2B ab293e5b14529c3714ba123c5f37f7fe2ac4f6238ebaca00fa7781407ccf7df67515b1b6b3c80a358fae5988c799bf16b8f02eb52a9b3a690b155a150ac90063 SHA512 491ef9cc01f0d34163d47163b3103dcbd52cc5672f64057b898c2d234384ac2e3b64b4e59a1795765ff92de4c97ebdb11a82d394213685c387e4dd7d598c5c60
+EBUILD qu-prolog-10.0-r1.ebuild 2060 BLAKE2B fd1e87efd1d94a7e182b0a0e5d9d3c1e7a47dc14c63c1ccc53c3bf0f96aff4124300eab160c608a583b65eec0a63fb0f7f95e19cfc31650657e6a20985c50b92 SHA512 ed36521f4ac5148fa11526bd07037b46daa4bb3027c8e4e8d8b089397611e975abb334842d6717a7b513cdfcb8f813a85beaf3226ee4385742e0768f34fd606c
+MISC metadata.xml 347 BLAKE2B d0d2ead501a46ff84953eceee649d58e406ebf5a83e7b7862b9501b2e665ad71b5c9c31f4790161074debb7b86ce7e53ff8d0904c39c37ddcac6250668685aca SHA512 7a7bb3ccaa42fa120c3702d963719d5fdfcf0a413685cad98bd34a515a4cc83a213a71e7f3b6b0ce67947fa347229caecf699879192f0d930c9c6577e0ce59cc
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-10.0-qt5.patch b/dev-lang/qu-prolog/files/qu-prolog-10.0-qt5.patch
new file mode 100644
index 000000000000..d82e78cada16
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-10.0-qt5.patch
@@ -0,0 +1,35 @@
+diff -ur qp10.0.orig/src/xqp/term.cc qp10.0/src/xqp/term.cc
+--- qp10.0.orig/src/xqp/term.cc 2008-07-09 07:32:37.000000000 +0200
++++ qp10.0/src/xqp/term.cc 2018-01-27 14:06:54.101545854 +0100
+@@ -38,7 +38,7 @@
+
+ bool graphic_char(QChar c)
+ {
+- switch (c.toAscii())
++ switch (c.toLatin1())
+ {
+ case '-':
+ case '/':
+diff -ur qp10.0.orig/src/xqp/xqp.cc qp10.0/src/xqp/xqp.cc
+--- qp10.0.orig/src/xqp/xqp.cc 2011-07-14 01:08:42.000000000 +0200
++++ qp10.0/src/xqp/xqp.cc 2018-01-27 14:07:53.902543353 +0100
+@@ -167,7 +167,7 @@
+
+ void Xqp::send_cmd_to_qp(QString cmd)
+ {
+- write(qp_stdin, cmd.toAscii(), cmd.length());
++ write(qp_stdin, cmd.toLatin1(), cmd.length());
+ }
+
+
+diff -ur qp10.0.orig/src/xqp/xqp.pro qp10.0/src/xqp/xqp.pro
+--- qp10.0.orig/src/xqp/xqp.pro 2008-07-09 07:32:37.000000000 +0200
++++ qp10.0/src/xqp/xqp.pro 2018-01-27 14:01:24.764559627 +0100
+@@ -4,6 +4,7 @@
+
+ TEMPLATE = app
+ INCLUDEPATH += .
++QT += widgets
+
+ # Input
+ HEADERS += interact.h qpconfig.h qthelp.h term.h xqp.h xqpqueries.h
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-r1.ebuild b/dev-lang/qu-prolog/qu-prolog-10.0-r1.ebuild
new file mode 100644
index 000000000000..6506c3bce9f2
--- /dev/null
+++ b/dev-lang/qu-prolog/qu-prolog-10.0-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2018 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 qt5 readline threads"
+
+RDEPEND="
+ !dev-util/mpatch
+ !dev-util/rej
+ !games-rpg/kqlives
+ qt5? (
+ dev-qt/qtwidgets:5
+ dev-qt/qtgui:5
+ )
+ 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
+ epatch "${FILESDIR}"/${P}-qt5.patch
+}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable debug) \
+ $(use_enable threads multiple-threads)
+
+ if use qt5; then
+ cd "${S}"/src/xqp || die
+ eqmake5 xqp.pro
+ fi
+}
+
+src_compile() {
+ emake OPTIMISATION="${CXXFLAGS}"
+
+ if use qt5; 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}
+
+ use qt5 && dobin src/xqp/xqp
+
+ into /usr/$(get_libdir)/${PN}
+ dobin bin/{qa,qc1.qup,qdeal,qem,qg,ql,qppp}
+
+ 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-2018.01 b/dev-lang/rakudo-2018.01
deleted file mode 100644
index 229e966fc4b0..000000000000
--- a/dev-lang/rakudo-2018.01
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test
-DEPEND=~dev-lang/nqp-2018.01:0=[java?,moar?,clang=] clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) >=dev-lang/perl-5.10 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=A compiler for the Perl 6 programming language
-EAPI=5
-HOMEPAGE=https://rakudo.org
-IUSE=clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=~dev-lang/nqp-2018.01:0=[java?,moar?,clang=] java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://rakudo.perl6.org/downloads/rakudo/rakudo-2018.01.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=ce1de7828a5117c35ae07e32194b2b6f
diff --git a/dev-lang/rakudo-2018.02 b/dev-lang/rakudo-2018.02
deleted file mode 100644
index 0ff5ec652a88..000000000000
--- a/dev-lang/rakudo-2018.02
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test
-DEPEND=~dev-lang/nqp-2018.02:0=[java?,moar?,clang=] clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) >=dev-lang/perl-5.10 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=A compiler for the Perl 6 programming language
-EAPI=5
-HOMEPAGE=https://rakudo.org
-IUSE=clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=~dev-lang/nqp-2018.02:0=[java?,moar?,clang=] java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://rakudo.perl6.org/downloads/rakudo/rakudo-2018.02.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=ce1de7828a5117c35ae07e32194b2b6f
diff --git a/dev-lang/rakudo-2018.02.1 b/dev-lang/rakudo-2018.02.1
deleted file mode 100644
index 4e144f8dd18a..000000000000
--- a/dev-lang/rakudo-2018.02.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test
-DEPEND=~dev-lang/nqp-2018.02:0=[java?,moar?,clang=] clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) >=dev-lang/perl-5.10 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=A compiler for the Perl 6 programming language
-EAPI=5
-HOMEPAGE=https://rakudo.org
-IUSE=clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=~dev-lang/nqp-2018.02:0=[java?,moar?,clang=] java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://rakudo.perl6.org/downloads/rakudo/rakudo-2018.02.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=65d02f7dbcce547fe9dfe139cf06a49f
diff --git a/dev-lang/rakudo-2018.03 b/dev-lang/rakudo-2018.03
deleted file mode 100644
index 739930cf7e19..000000000000
--- a/dev-lang/rakudo-2018.03
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test
-DEPEND=~dev-lang/nqp-2018.03:0=[java?,moar?,clang=] clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) >=dev-lang/perl-5.10 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=A compiler for the Perl 6 programming language
-EAPI=5
-HOMEPAGE=https://rakudo.org
-IUSE=clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=~dev-lang/nqp-2018.03:0=[java?,moar?,clang=] java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://rakudo.perl6.org/downloads/rakudo/rakudo-2018.03.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=ce1de7828a5117c35ae07e32194b2b6f
diff --git a/dev-lang/rakudo-2018.04 b/dev-lang/rakudo-2018.04
deleted file mode 100644
index ae98e97beb9a..000000000000
--- a/dev-lang/rakudo-2018.04
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test
-DEPEND=~dev-lang/nqp-2018.04:0=[java?,moar?,clang=] clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) >=dev-lang/perl-5.10 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=A compiler for the Perl 6 programming language
-EAPI=5
-HOMEPAGE=https://rakudo.org
-IUSE=clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=~dev-lang/nqp-2018.04:0=[java?,moar?,clang=] java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://rakudo.perl6.org/downloads/rakudo/rakudo-2018.04.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=ce1de7828a5117c35ae07e32194b2b6f
diff --git a/dev-lang/rakudo-2018.04.1 b/dev-lang/rakudo-2018.04.1
deleted file mode 100644
index 0a7b56cd042e..000000000000
--- a/dev-lang/rakudo-2018.04.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test
-DEPEND=~dev-lang/nqp-2018.04.1:0=[java?,moar?,clang=] clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) >=dev-lang/perl-5.10 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=A compiler for the Perl 6 programming language
-EAPI=5
-HOMEPAGE=https://rakudo.org
-IUSE=clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=~dev-lang/nqp-2018.04.1:0=[java?,moar?,clang=] java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://rakudo.perl6.org/downloads/rakudo/rakudo-2018.04.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=ce1de7828a5117c35ae07e32194b2b6f
diff --git a/dev-lang/rakudo-2018.05 b/dev-lang/rakudo-2018.05
deleted file mode 100644
index c3535df3d418..000000000000
--- a/dev-lang/rakudo-2018.05
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test
-DEPEND=~dev-lang/nqp-2018.05:0=[java?,moar?,clang=] clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) >=dev-lang/perl-5.10 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=A compiler for the Perl 6 programming language
-EAPI=6
-HOMEPAGE=https://rakudo.org
-IUSE=clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=~dev-lang/nqp-2018.05:0=[java?,moar?,clang=] java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://rakudo.perl6.org/downloads/rakudo/rakudo-2018.05.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=34ab2cd429be00b5f90033afb65eb2e7
diff --git a/dev-lang/rakudo-2018.06 b/dev-lang/rakudo-2018.06
deleted file mode 100644
index eddb9bfcb971..000000000000
--- a/dev-lang/rakudo-2018.06
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test
-DEPEND=~dev-lang/nqp-2018.06:0=[java?,moar?,clang=] clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) >=dev-lang/perl-5.10 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=A compiler for the Perl 6 programming language
-EAPI=6
-HOMEPAGE=https://rakudo.org
-IUSE=clang java +moar test elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=Artistic-2
-RDEPEND=~dev-lang/nqp-2018.06:0=[java?,moar?,clang=] java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-SRC_URI=https://rakudo.perl6.org/downloads/rakudo/rakudo-2018.06.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=34ab2cd429be00b5f90033afb65eb2e7
diff --git a/dev-lang/rakudo-9999 b/dev-lang/rakudo-9999
deleted file mode 100644
index 2c62845eaf6b..000000000000
--- a/dev-lang/rakudo-9999
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=~dev-lang/nqp-9999:0=[java?,moar?,clang=] clang? ( sys-devel/clang ) java? ( >=virtual/jdk-1.7 ) >=dev-lang/perl-5.10 java? ( >=dev-java/java-config-2.2.0-r3 ) >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=A compiler for the Perl 6 programming language
-EAPI=5
-HOMEPAGE=https://rakudo.org
-IUSE=clang java +moar test elibc_FreeBSD java
-LICENSE=Artistic-2
-RDEPEND=~dev-lang/nqp-9999:0=[java?,moar?,clang=] java? ( >=virtual/jre-1.7 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-REQUIRED_USE=|| ( java moar )
-SLOT=0
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc git-r3 8f6de46b0aa318aea0e8cac62ece098b java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=5039e5125d89d32a0fea33e1e85938ac
diff --git a/dev-lang/rakudo/Manifest b/dev-lang/rakudo/Manifest
new file mode 100644
index 000000000000..0fe1d898d694
--- /dev/null
+++ b/dev-lang/rakudo/Manifest
@@ -0,0 +1,19 @@
+AUX rakudo-2016.04-jna-lib.patch 970 BLAKE2B 28947a57089f3e53333d6dad83b9ff62411b1bb090f2301d6d415cf9e3eef5b6a96dfbaf94020c249e24cca707655522929114ecb032bb4e701d6a3c7ad46810 SHA512 3e76c33e08911fc9105fc8e6f046a8af133ec956aad1537653ee335f0068d4428a9c8be45af45ed3eccae58f1be38579614bac278deb00ea143829e6d98d38c6
+DIST rakudo-2018.01.tar.gz 3089785 BLAKE2B 6e74c17b44e489a5a1a60f177290962eac752ad5750dd5d6e64e5a9264d8b6ba7dfe4234087a1b1cbebd3933376b83dd305c3bd255ad39bc81b9c99b8e51b303 SHA512 5030089265f7c4d0bde663eb1d26a0e40ddc9b1dedfd7a350a2238f5136f08abb986d2568c05efe031248ecacdd19888be6e08b954bbeedc03e769d3016b17ea
+DIST rakudo-2018.02.1.tar.gz 3478957 BLAKE2B 39568af458cc15705db48f607675a7ca4fe2d6430fdaac42e37b7096f0974d42788fa0965ee9da61c2ae56dafb27e3d759007c6600f291a07c0dc50dd1d34638 SHA512 59be2c41e6b1784fb9eaf7590ee77d8424c449d7c58e93c66f3adde5be3fe05260c41c01171c8fb59542b32bb5ee5064e1c9be69efc3e8cb20554b09b10240ea
+DIST rakudo-2018.02.tar.gz 3478799 BLAKE2B 36f50a38c26e9b96a31d63566337315bed41bdd9b19e3b4e74dcdd1e0b56a060b0fcd7430078250e7e3b45473f7ee08ee0f059f10e1d01a24f0a3f08fe43c158 SHA512 743dbe01c20388e7c0f1af6f8175def283f9c92ac6f2c3b7d8c442c03d5204de8bd12d33f6ee99d75f9c0a171ca96cc2a3438b2ebfa0265d80441b353c64bbc4
+DIST rakudo-2018.03.tar.gz 3492524 BLAKE2B be2d9fbc8789e78025e18da873873d99872984815a56c0e255487b4250c900e142dbcdb5ce8eede496504401ca37c0e433fb9060fc5f4e8ac0b2778fc35cff62 SHA512 b644f333f6b9501631ee95949017b9e39416311853880a71bc714bb36f2da448fc57147f819d876f6d7ab207c2921474f94e25a4df90c735ba15f270f0c1fd7b
+DIST rakudo-2018.04.1.tar.gz 3511991 BLAKE2B 9d87e10664ebe59e258e12166bf12390c52a09f32e07adabe30454169016f4ea1649cf215bbb0a093dc5cb332cae9c4adc9cdc87f5276a5006cd84d8c9731b04 SHA512 e57d34c08e32e7ace5ab681f4472409bb9a2eb74361784b4ef43aa1a4b6adeed903219a1810063a10b5c0baf113a9cf88b00c989347c0c395a041a018fd9a626
+DIST rakudo-2018.04.tar.gz 3512276 BLAKE2B 9d9bb4070a27ce3185c5ebc2627a5f05359d23fc9377954c30edac7f36bbe4089d3b35da0e2ec17a20c155d857219aa962baa058e393bc6690e2ba30731cfa73 SHA512 5a549113583ce94c2606b7aa5fad2089f1ccebd50f503ce0eb24163599ed3aacd26dd876c6ace675798d577b8063ba260c1b4553c382cf4d13041d692a5bdf6a
+DIST rakudo-2018.05.tar.gz 3515782 BLAKE2B a39df1867bc099dd46262fd29e9f1a9544e995a6383efc438d3e0dd9a7f6d0782a437cfee2220f268d5ce4dd34e6532317f3ecc0693bc82100e328dd5dd7ccbd SHA512 d3514cd46d46ce44eac0e84292504a62669de5b5b053012a36a4c742059d8c2302752a41cd30c20d1b5f11acfdb09b8d855401b0e971e811216899c8b7dd66fc
+DIST rakudo-2018.06.tar.gz 3520888 BLAKE2B 68d568650aef1dcc4bf84843232db0d8f918684c69d80028acd12846fb913dd9600bed2b42ec55019d752370672de3f2fe81c498ffc892ab03954630a2158ea0 SHA512 574b074b4a2412b4e020906645787b9e57160a9e87c58b73771b1a3732a39a5b961d778d25a8099a8da5e7b3df57b84599df64cd65089a63fe236f3cae06355d
+EBUILD rakudo-2018.01.ebuild 1617 BLAKE2B 3311d96005a0653c4fb6618dc2df0e5081422909bf9185f6b90fafe9fbbf80463156788594de08993947bc9578e11ec1075d5172eb59e4a4574966100dd7497b SHA512 5aa9b3a7b2f94540399f8112b70ae2bd6879ae99e0ec51bf66821ef42c4a26bebcb7ec053b4e76d31591c52f96bee97b896db34b169519570e28a5c70da9d7ea
+EBUILD rakudo-2018.02.1.ebuild 1619 BLAKE2B 5fd004e5d2013b1c6da8df7cfa8e094ff484c46425d7b5f63da57894cf9fb4c5b6aaf7409992706a23aec011a7998d55e919ad03eb7137d3e741d989cdd93b4e SHA512 5a4b643413002435b83087454676ccd590fa04ca634e4be2d5cecd37ed74972ded26b834b6a6c1d8e10891b9157dde9a610e12e4bf706423cadb70b1ae7a00b0
+EBUILD rakudo-2018.02.ebuild 1617 BLAKE2B 3311d96005a0653c4fb6618dc2df0e5081422909bf9185f6b90fafe9fbbf80463156788594de08993947bc9578e11ec1075d5172eb59e4a4574966100dd7497b SHA512 5aa9b3a7b2f94540399f8112b70ae2bd6879ae99e0ec51bf66821ef42c4a26bebcb7ec053b4e76d31591c52f96bee97b896db34b169519570e28a5c70da9d7ea
+EBUILD rakudo-2018.03.ebuild 1617 BLAKE2B 3311d96005a0653c4fb6618dc2df0e5081422909bf9185f6b90fafe9fbbf80463156788594de08993947bc9578e11ec1075d5172eb59e4a4574966100dd7497b SHA512 5aa9b3a7b2f94540399f8112b70ae2bd6879ae99e0ec51bf66821ef42c4a26bebcb7ec053b4e76d31591c52f96bee97b896db34b169519570e28a5c70da9d7ea
+EBUILD rakudo-2018.04.1.ebuild 1617 BLAKE2B 3311d96005a0653c4fb6618dc2df0e5081422909bf9185f6b90fafe9fbbf80463156788594de08993947bc9578e11ec1075d5172eb59e4a4574966100dd7497b SHA512 5aa9b3a7b2f94540399f8112b70ae2bd6879ae99e0ec51bf66821ef42c4a26bebcb7ec053b4e76d31591c52f96bee97b896db34b169519570e28a5c70da9d7ea
+EBUILD rakudo-2018.04.ebuild 1617 BLAKE2B 3311d96005a0653c4fb6618dc2df0e5081422909bf9185f6b90fafe9fbbf80463156788594de08993947bc9578e11ec1075d5172eb59e4a4574966100dd7497b SHA512 5aa9b3a7b2f94540399f8112b70ae2bd6879ae99e0ec51bf66821ef42c4a26bebcb7ec053b4e76d31591c52f96bee97b896db34b169519570e28a5c70da9d7ea
+EBUILD rakudo-2018.05.ebuild 1617 BLAKE2B 4a683526c14a363fe903a36704f3287e70b96bd407d5c664fe437d64d3b2b1cb2ed0353ee154e1987d77d6e0ed68e719ba84a1439d4472f601f581a9b525f364 SHA512 0b4e582891816eff74ce5446d07a132abef0bcb177d7b0b54cd778f4386041b524a4282f7b99360323b29122a04bfc663e5939dd7cc2f44f12a33eb7157684fa
+EBUILD rakudo-2018.06.ebuild 1617 BLAKE2B 4a683526c14a363fe903a36704f3287e70b96bd407d5c664fe437d64d3b2b1cb2ed0353ee154e1987d77d6e0ed68e719ba84a1439d4472f601f581a9b525f364 SHA512 0b4e582891816eff74ce5446d07a132abef0bcb177d7b0b54cd778f4386041b524a4282f7b99360323b29122a04bfc663e5939dd7cc2f44f12a33eb7157684fa
+EBUILD rakudo-9999.ebuild 1715 BLAKE2B 7cbe373b0e54218018db5845484502f6f922ff397da6d949709f980210f1edb541132f7dc21704ace7c992f6637247da0726ada4f74a7380bf1113f49204e26c SHA512 1dbb9387b42f05f0d39bca302b350cf4c7f9f14409231f200f6d0cdaf4d85e87f365132a8acc8b4dba7578797bf26ecc116e64b9b1d65ace62791e3eba514178
+MISC metadata.xml 513 BLAKE2B 90fdc5cdf5182b707681ce28a7e4b06c1e8e1a05f848e072de4abc5e8f074ec9becd41c117880bba60e00eebe69a4ab1639b39b0a29307d65d6be09784ee6a18 SHA512 d0144523717581bc13a12b8b8edff0ec03800fe1bda313725a4db37bc70e26c3cf566426e48eb6ecf58f8653f6c51f375ea31d915d75bcf37fc0772251047e7a
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..4223f6b2087b
--- /dev/null
+++ b/dev-lang/rakudo/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <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-2018.01.ebuild b/dev-lang/rakudo/rakudo-2018.01.ebuild
new file mode 100644
index 000000000000..0b5a669c60d0
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2018.01.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2018 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="https://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-2018.02.1.ebuild b/dev-lang/rakudo/rakudo-2018.02.1.ebuild
new file mode 100644
index 000000000000..916922b699bc
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2018.02.1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2018 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="https://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-2018.02:${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-2018.02.ebuild b/dev-lang/rakudo/rakudo-2018.02.ebuild
new file mode 100644
index 000000000000..0b5a669c60d0
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2018.02.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2018 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="https://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-2018.03.ebuild b/dev-lang/rakudo/rakudo-2018.03.ebuild
new file mode 100644
index 000000000000..0b5a669c60d0
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2018.03.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2018 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="https://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-2018.04.1.ebuild b/dev-lang/rakudo/rakudo-2018.04.1.ebuild
new file mode 100644
index 000000000000..0b5a669c60d0
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2018.04.1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2018 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="https://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-2018.04.ebuild b/dev-lang/rakudo/rakudo-2018.04.ebuild
new file mode 100644
index 000000000000..0b5a669c60d0
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2018.04.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2018 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="https://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-2018.05.ebuild b/dev-lang/rakudo/rakudo-2018.05.ebuild
new file mode 100644
index 000000000000..5d27b8d2e3cd
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2018.05.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit java-pkg-opt-2
+
+DESCRIPTION="A compiler for the Perl 6 programming language"
+HOMEPAGE="https://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-2018.06.ebuild b/dev-lang/rakudo/rakudo-2018.06.ebuild
new file mode 100644
index 000000000000..5d27b8d2e3cd
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-2018.06.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit java-pkg-opt-2
+
+DESCRIPTION="A compiler for the Perl 6 programming language"
+HOMEPAGE="https://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..070e46942a8d
--- /dev/null
+++ b/dev-lang/rakudo/rakudo-9999.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2018 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="https://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-9999 b/dev-lang/rebol-9999
deleted file mode 100644
index 0ef56f149205..000000000000
--- a/dev-lang/rebol-9999
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=compile install prepare unpack
-DEPEND=|| ( dev-lang/rebol dev-lang/rebol-bin ) >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=Relative Expression-Based Object Language
-EAPI=4
-HOMEPAGE=http://rebol.com
-LICENSE=Apache-2.0
-RDEPEND=|| ( dev-lang/rebol dev-lang/rebol-bin )
-SLOT=0
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc git-r3 8f6de46b0aa318aea0e8cac62ece098b ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=b248e0c3297fc347f32d039eb6971273
diff --git a/dev-lang/rebol-bin-3_pre111 b/dev-lang/rebol-bin-3_pre111
deleted file mode 100644
index 1cd1f87fc5a6..000000000000
--- a/dev-lang/rebol-bin-3_pre111
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=compile install
-DESCRIPTION=Relative Expression-Based Object Language
-EAPI=4
-HOMEPAGE=http://rebol.com
-KEYWORDS=~amd64 ~x86
-LICENSE=Apache-2.0
-SLOT=0
-SRC_URI=http://www.rebol.com/r3/downloads/r3-a111-4-4.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=2054d97bbda779e4fb002658f7e620d2
diff --git a/dev-lang/rebol-bin-3_pre20140304 b/dev-lang/rebol-bin-3_pre20140304
deleted file mode 100644
index 1d76da983455..000000000000
--- a/dev-lang/rebol-bin-3_pre20140304
+++ /dev/null
@@ -1,9 +0,0 @@
-DEFINED_PHASES=compile install unpack
-DESCRIPTION=Relative Expression-Based Object Language
-EAPI=6
-HOMEPAGE=http://rebol.com
-KEYWORDS=~amd64 ~x86
-LICENSE=Apache-2.0
-SLOT=0
-SRC_URI=amd64? ( http://rebolsource.net/downloads/experimental/r3-linux-x64-gbf237fc ) x86? ( http://rebolsource.net/downloads/linux-x86/r3-g25033f8 )
-_md5_=ae5487371abb11a3e4b10e0c2d64a498
diff --git a/dev-lang/rebol-bin/Manifest b/dev-lang/rebol-bin/Manifest
new file mode 100644
index 000000000000..2677d5f15dd8
--- /dev/null
+++ b/dev-lang/rebol-bin/Manifest
@@ -0,0 +1,6 @@
+DIST r3-a111-4-4.tar.gz 269516 BLAKE2B c1fd178e2dd73ea55d1a2953d8b0d869c30efbf9d43bbb0fe5f11ce078406483e8ca9b8427018f89a5c7b6d5c768c4c6c361677aa8e0edf79e4895699eee9c9d SHA512 060b01197c242ceda20fe84228a5ae7d2a329eac04549ad5e0f368bc91baea515143e541ed9815a14aba9b3d571a22ff0d643716dc21452d5aeeb7678938455e
+DIST r3-g25033f8 553424 BLAKE2B ef2c3b8c024e0952d172cd0f0d500fd0c4986e72efcb3ad70bc7a87a8ca9a8cf0718ccf1bcee5177ebcef9ef486fcbe09793c0f897bba9ca1f96c92c00486ad9 SHA512 8376e0d6e708777539f9639d5c78120aa02e7364d269435bec6ef6b0527e8321e0135ea1cb005246cb7e3387cf5c941864933e21c21fb3f0e322f5c8ea118ec3
+DIST r3-linux-x64-gbf237fc 563560 BLAKE2B ccb2e17cf04af75d8efaefa9fb4efa98a08b1db6ab5ec5cf94e71a7c0f44d8db5950c094d21c36ac31551ae66e909def943bd6eead344e8227f8273a1a1f01a5 SHA512 e984a10c59aa66a081dd8aee8ad7376cc50c600211167468b8fb9b461481b7e8df50b974de931d5c6ce31df3f70dd108f9e890daeb759da525ea81ebf9c5dc35
+EBUILD rebol-bin-3_pre111.ebuild 571 BLAKE2B fd73e57c022a3b77a2bed6f5092efd989f94b38d929dcf1722236bb279582ecbcad1a59cb72c0089f165ad1170fc11341a172cb1e863d85052679785c7d98d95 SHA512 8bd63b6082ce4244ff09a8bad9ae6dca744a6d2ccfb01dabba84d27fdc7c34cee11b3457e6421954ea2361b366404fd205d169914c48c2440c156ffc14af54c3
+EBUILD rebol-bin-3_pre20140304.ebuild 753 BLAKE2B 9a819d0fd1eae1b3dd63c5eb623ca25f64141601e2a9a3dd23ef184a171327f44b5a5515c9f1b6382a06ff649aee53ac56d5351626ae9dec9948f90320753433 SHA512 e919b116a7ea7527f309b753854a8be92f6980acdb38b3c872292ffe5caabdfd7864614d43241532f26d9c54b5d31ad34c4e61e0e745a98bea2772da9eb2040b
+MISC metadata.xml 359 BLAKE2B e1d49aba78340bc0ae12bb331157d165f3097e4b853d1e89d4a49ff5d2ae32ac7a037688a9b4151a348ab53a2cf64bf8fef08380cba65c4e6d17dc29a0b45488 SHA512 d8984bf44ff0235c70fbac99e0ecdd93fad402258de3c659a9707ce6c40ac22c05027f6d2dfaed90b3dd19a0ebc5f8d281ea35fad84aa46d6f5c4cb1c64e8dce
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..0bc7e6e07b70
--- /dev/null
+++ b/dev-lang/rebol/Manifest
@@ -0,0 +1,2 @@
+EBUILD rebol-9999.ebuild 774 BLAKE2B 0d291b9bedcf28eaa146c196dd9c8955a9b2be3e4e2c2e961b888ae26219c43c51c06b032df6d6925e605ad2c26346384bd599e88a6419ecbb08e8c6a14fc67f SHA512 15aff56e1690dd59c3ec140bd759fe37888c174f0c09d88a35d199cbd127765f442d60ebe75917bee89a7d2dc7260624c403a1d0226f335f2512c47d5b718c8e
+MISC metadata.xml 247 BLAKE2B 5a20af3c9732ef7dba68131a08988652f5c93a6d186a82c4deb1bb9c06dc3ae73152a0d241cc346637f7b11caf4676da43301ba596c67b66669535e71db0b03e SHA512 29cf52c16b0cce69899d9c2da8acd9144b7d760442aa323b854dceadb42459e009545193b1df7911ac2241b59f4819b4a6bb1d206d6f57953f770031433bb6b7
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..ed09d0bb04ef
--- /dev/null
+++ b/dev-lang/rebol/rebol-9999.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+MY_PR=${PVR/3_pre/}
+
+inherit eutils git-r3
+
+DESCRIPTION="Relative Expression-Based Object Language"
+HOMEPAGE="http://rebol.com"
+EGIT_REPO_URI="https://github.com/rebol/r3.git"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+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-3.9.1-r1 b/dev-lang/regina-rexx-3.9.1-r1
deleted file mode 100644
index 8abdee5258fc..000000000000
--- a/dev-lang/regina-rexx-3.9.1-r1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile install postinst prepare
-DEPEND=>=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Portable Rexx interpreter
-EAPI=4
-HOMEPAGE=http://regina-rexx.sourceforge.net
-KEYWORDS=~amd64 ~ppc ~x86
-LICENSE=LGPL-2.1 MPL-1.0
-SLOT=0
-SRC_URI=mirror://sourceforge/regina-rexx/Regina-REXX-3.9.1.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=52461f8bfb5a24a091d00a9f5136e5ee
diff --git a/dev-lang/regina-rexx/Manifest b/dev-lang/regina-rexx/Manifest
new file mode 100644
index 000000000000..3d9af89a60ce
--- /dev/null
+++ b/dev-lang/regina-rexx/Manifest
@@ -0,0 +1,4 @@
+AUX rxstack-r1 268 BLAKE2B 1bec862218eb0ef5087d5859f53adacf6fa22f3fc4b05a04ae89a861f32f800261e07620e1bab97a1aa7548f1232aad86367fc69c1696cd126edc4168064eb2b SHA512 823cc12df4986919b3177590b9da73c76474012361ff41eb93a04376df2efb3445b27da8931b9fdc5d960f5231a34ddaa7724d35d139eb2a1e340b025dfc460c
+DIST Regina-REXX-3.9.1.tar.gz 1358458 BLAKE2B 48a46895fa2a98359f9dc58e8f22cdedd8429459c4ca1680abc6b556d2da19731265666e6259a02d6886167c58273a39e0b7509d5dae31d5b8359ac6a69daaae SHA512 679d146d68598ccca28c4e66a12ab898d5bfb77e2e5d64ce5ffc9159b982dcda419815a83b05e5dfbe3acea84f8f59955726a6466defefe1ac24646c46609677
+EBUILD regina-rexx-3.9.1-r1.ebuild 884 BLAKE2B 9bf9712385ea755f3518efffa7fced9ab45ab1de1f6085937c7565b02f688fb6b9c55f82a7792109c1d08ddedda14fedc2353fcea3a99770f66224f16dc20e7e SHA512 417bdd8eaf99ffd150ca25ccc4e4b367e0bf35a675e249ed29f5c9fada2137c95687dc33e396be744154d2d8836abdf35f755469d8508047af25e7d56119a46c
+MISC metadata.xml 625 BLAKE2B badf54dd7387b0346154ff4fb2a2962cd4a2616111818871c118f95498dc580f691566371a171ba99cfc04f3d39e1fe366a147a26c262a0a3efd977457e2385e SHA512 d9b86c179a75ec8c467bd8f1a49bac2dae98be9cf6f0c5013164fd1713c95fe286f34fd736b5b868711a91980761a80356ffaec1cabf5d61bf5a6027dbdcbe8f
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/ruby-2.3.7 b/dev-lang/ruby-2.3.7
deleted file mode 100644
index d3e85cba8d41..000000000000
--- a/dev-lang/ruby-2.3.7
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=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 >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=An object-oriented scripting language
-EAPI=5
-HOMEPAGE=https://www.ruby-lang.org/
-IUSE=berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl tk xemacs ncurses +readline
-KEYWORDS=alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=|| ( Ruby-BSD BSD-2 )
-PDEPEND=>=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] 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 )
-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
-SLOT=2.3
-SRC_URI=mirror://ruby/2.3/ruby-2.3.7.tar.xz https://dev.gentoo.org/~flameeyes/ruby-team/ruby-patches-2.3.7.tar.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=3c4ab28a23f008ab89e55b3d0d078e6d
diff --git a/dev-lang/ruby-2.4.4 b/dev-lang/ruby-2.4.4
deleted file mode 100644
index e4959f5af96c..000000000000
--- a/dev-lang/ruby-2.4.4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=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 >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=An object-oriented scripting language
-EAPI=6
-HOMEPAGE=http://www.ruby-lang.org/
-IUSE=berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl static-libs tk xemacs
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=|| ( Ruby-BSD BSD-2 )
-PDEPEND=>=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] 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 )
-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
-SLOT=2.4
-SRC_URI=mirror://ruby/2.4/ruby-2.4.4.tar.xz https://dev.gentoo.org/~graaff/ruby-team/ruby-patches-2.4.4.tar.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=7ab738a1223f75c7de169d59e465f66a
diff --git a/dev-lang/ruby-2.5.1 b/dev-lang/ruby-2.5.1
deleted file mode 100644
index 67390e090c70..000000000000
--- a/dev-lang/ruby-2.5.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare test
-DEPEND=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-20171225 >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=An object-oriented scripting language
-EAPI=6
-HOMEPAGE=http://www.ruby-lang.org/
-IUSE=berkdb debug doc examples gdbm ipv6 jemalloc libressl +rdoc rubytests socks5 ssl static-libs tk xemacs
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd
-LICENSE=|| ( Ruby-BSD BSD-2 )
-PDEPEND=>=dev-ruby/did_you_mean-1.2.0:2.5[ruby_targets_ruby25] >=dev-ruby/minitest-5.10.3[ruby_targets_ruby25] >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby25] >=dev-ruby/power_assert-1.1.1[ruby_targets_ruby25] >=dev-ruby/rake-12.3.0[ruby_targets_ruby25] >=dev-ruby/test-unit-3.2.7[ruby_targets_ruby25] >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby25] virtual/rubygems[ruby_targets_ruby25] >=dev-ruby/json-2.0.2[ruby_targets_ruby25] rdoc? ( >=dev-ruby/rdoc-5.1.0[ruby_targets_ruby25] ) xemacs? ( app-xemacs/ruby-modes )
-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-20171225
-SLOT=2.5
-SRC_URI=mirror://ruby/2.5/ruby-2.5.1.tar.xz https://dev.gentoo.org/~graaff/ruby-team/ruby-patches-2.5.1.tar.bz2
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=7200f5610c9f480cd84da4e2ccdedafe
diff --git a/dev-lang/ruby/Manifest b/dev-lang/ruby/Manifest
new file mode 100644
index 000000000000..55d352f2d06d
--- /dev/null
+++ b/dev-lang/ruby/Manifest
@@ -0,0 +1,10 @@
+DIST ruby-2.3.7.tar.xz 11438124 BLAKE2B 4f7e0422291794b254cb80edd2f0841bbc1e85cd62635024b6d43b23b1bcdc512d92b57d8885b253465cc8ef3c6cbcec97a6ef239dc11cc8b252e941d25e0487 SHA512 fd91c8db3d3aa4cc962a62f27b4d1a71f6b5567ab836e6dbfbbb1553eb269d11e12faf9e36af6c489c33b54fd89dab99bfe81a563158b704877f0628d6f5bc5a
+DIST ruby-2.4.4.tar.xz 10049304 BLAKE2B 76bb2c3f63cda8e6f3814c74dded23568b2f7f12036d745bf55fc4a68e281ef3ae0fe29bf8e194db71f72e724ffe750a31bec9246ad1c01eb05ed93512a6422e SHA512 4dc112a149273d4221484ccbf1260c6c5fcad7e0a6e4bc91e4ef69cbc093d3191f7abd71420f80d680f8ea5d111e6803ba2af32166aa501913639e6d5696fde0
+DIST ruby-2.5.1.tar.xz 11348108 BLAKE2B ea1019a81f96169ab8d435215362b36b098df373ac4f53ecda328686ec2c13204a38c66bb1bf9504d18e1762e7e6ae277bab3b16bb53b8e628962df715769f3b SHA512 31bacf58469953282cd5d8b51862dcf4b84dedb927c1871bc3fca32fc157fe49187631575a70838705fe246f4555647577a7ecc26894445a7d64de5503dc11b4
+DIST ruby-patches-2.3.7.tar.bz2 3030 BLAKE2B 7c1e80ff0569a03672f53820c665933056b46bcf791c9132cb9f358f72df693749f02da65ca7469c3dd0f652d7dc7bfaa03dccd4eb900562361876023fb65b42 SHA512 54cc3f2bfd1967b8558736e5a5240b886a56b22defca5813f45b1f4dca9af169b4d59d60b327ec8411e824970ac6da1cec53cfc31833403742e9d6941e5a78f1
+DIST ruby-patches-2.4.4.tar.bz2 2898 BLAKE2B e46502dbb0aa25c3d71693a6c04b433bd4de60f194cdd283517c4b08da190356885d9bca4a6765402088185fa8ec681156e8e8eecf0703a2c1ea7bb81adc0bf9 SHA512 d767d43c7df737469247e42e1c4205b8c6850c8f335a2869c884f145c037e9bab10492cc7cd2903f5c33e232cdc5bbdabb3e8da837c7bf420b9d58d1d33149ed
+DIST ruby-patches-2.5.1.tar.bz2 2986 BLAKE2B 64d64eda19bff94f205a6314c2af59896064fb64c118e0f3859d82aeb7e58478170b9160804ab8faf569054b65228abeecc5900e568e17133c21e9aed9bdf589 SHA512 c2bca3f98c7bb1de267b9f07eb1b0903c499c79e9c9d0166a6924e88e837434f27ddedd7aead7ebbe32f0530f751601ac5486a0db46ee28b94d7cea13e0e7924
+EBUILD ruby-2.3.7.ebuild 6873 BLAKE2B ba2a6dac0d1a97c16b362348d4e693a46092fb0b6ed1834d2e91038aae254ed1005da06499673adc1b4751cb96865b2932eab1f24f74144f6030ecf7f358c8e1 SHA512 e1b9a05c7778d6859a778b90ea88401ff5a314bbad99e99c900f0434332154dddb9fa19eec25d8d112d879fb26ab114dcb62971396a57a81b03272f67e997c40
+EBUILD ruby-2.4.4.ebuild 6980 BLAKE2B 2a08be5225e43fd5e5d7c90ff63ed43b6eab9b6e69ac1df7aead9657d651267e8bc0e741e16a276bee7fe5ecca5565d17d1428d96e5713305d278f251cdd99f4 SHA512 f43e497753a3fcfc0ff3e4ff840ae8cf3003671da0fe55e62651c17592f885cdbb99ed76ff6b99581ffd0903d23bc03b5425839f884f9e0e7ed925fb748edd4d
+EBUILD ruby-2.5.1.ebuild 6772 BLAKE2B f9ac0a58ebcd718715fb67cbbe90cc853a14d8ba717bd91e93645115c5b37dc4def3827dbd01ba7b91138468b124c3581f90a133e88884a7f2b9a902f3b4ad82 SHA512 ed302d0d2a27d002a1b89aaea3b25ce6c88660f1fd30469cc2d292cfe3679bc477b6f8ac986964db45541db091be3040ee8dc8a76f5c10995d307dcb4246042b
+MISC metadata.xml 911 BLAKE2B 7596a3d7a53742635e3262a0deac45eb6c37e51b473dde2b5da78742baba1ecab42a4a3e2f992cfa8f3765472df896ccff2e2936ba5dedba1aad05c2ab47d9dc SHA512 c5d9f15742132625061303ed71206e937933b402e183edbe0f37ee73ac7ba47b3f7ad54cbf12d1db3900a1f833ea2432790a10a02ba7e1e0c4bf128a716b9d72
diff --git a/dev-lang/ruby/metadata.xml b/dev-lang/ruby/metadata.xml
new file mode 100644
index 000000000000..99e5faab0bb7
--- /dev/null
+++ b/dev-lang/ruby/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="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.3.7.ebuild b/dev-lang/ruby/ruby-2.3.7.ebuild
new file mode 100644
index 000000000000..aad01a2cc30a
--- /dev/null
+++ b/dev-lang/ruby/ruby-2.3.7.ebuild
@@ -0,0 +1,242 @@
+# Copyright 1999-2018 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 "${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 "${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(22|23|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
diff --git a/dev-lang/ruby/ruby-2.4.4.ebuild b/dev-lang/ruby/ruby-2.4.4.ebuild
new file mode 100644
index 000000000000..76b123a6e62f
--- /dev/null
+++ b/dev-lang/ruby/ruby-2.4.4.ebuild
@@ -0,0 +1,243 @@
+# Copyright 1999-2018 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(23|24|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
diff --git a/dev-lang/ruby/ruby-2.5.1.ebuild b/dev-lang/ruby/ruby-2.5.1.ebuild
new file mode 100644
index 000000000000..a6c97c1a7362
--- /dev/null
+++ b/dev-lang/ruby/ruby-2.5.1.ebuild
@@ -0,0 +1,238 @@
+# Copyright 1999-2018 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-20171225
+"
+
+DEPEND="${RDEPEND}"
+
+BUNDLED_GEMS="
+ >=dev-ruby/did_you_mean-1.2.0:2.5[ruby_targets_ruby25]
+ >=dev-ruby/minitest-5.10.3[ruby_targets_ruby25]
+ >=dev-ruby/net-telnet-0.1.1[ruby_targets_ruby25]
+ >=dev-ruby/power_assert-1.1.1[ruby_targets_ruby25]
+ >=dev-ruby/rake-12.3.0[ruby_targets_ruby25]
+ >=dev-ruby/test-unit-3.2.7[ruby_targets_ruby25]
+ >=dev-ruby/xmlrpc-0.3.0[ruby_targets_ruby25]
+"
+
+PDEPEND="
+ ${BUNDLED_GEMS}
+ virtual/rubygems[ruby_targets_ruby25]
+ >=dev-ruby/json-2.0.2[ruby_targets_ruby25]
+ rdoc? ( >=dev-ruby/rdoc-5.1.0[ruby_targets_ruby25] )
+ 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.2.0,minitest-5.10.3,net-telnet-0.1.1,power_assert-1.1.1,rake-12.3.0,test-unit-3.2.7,xmlrpc-0.3.0}.gem || die
+
+ einfo "Removing bundled libraries..."
+ rm -fr ext/fiddle/libffi-3.2.1 || die
+
+ 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(23|24|...)"
+ elog
+}
+
+pkg_postrm() {
+ eselect ruby cleanup
+}
diff --git a/dev-lang/rust-1.25.0 b/dev-lang/rust-1.25.0
deleted file mode 100644
index 1d07277d1bef..000000000000
--- a/dev-lang/rust-1.25.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare setup
-DEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 jemalloc? ( dev-libs/jemalloc ) || ( >=dev-lang/python-2.7.5-r2:2.7 ) || ( >=sys-devel/gcc-4.7 >=sys-devel/clang-3.5 ) dev-util/cmake
-DESCRIPTION=Systems programming language from Mozilla
-EAPI=6
-HOMEPAGE=https://www.rust-lang.org/
-IUSE=debug doc extended +jemalloc
-KEYWORDS=amd64 ~arm64 x86
-LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
-PDEPEND=!extended? ( >=dev-util/cargo-0.26.0 )
-RDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 jemalloc? ( dev-libs/jemalloc )
-SLOT=stable/1.25
-SRC_URI=https://static.rust-lang.org/dist/rustc-1.25.0-src.tar.gz -> rustc-1.25.0-src.tar.gz amd64? ( https://static.rust-lang.org/dist/rust-1.24.0-x86_64-unknown-linux-gnu.tar.gz ) x86? ( https://static.rust-lang.org/dist/rust-1.24.0-i686-unknown-linux-gnu.tar.gz ) arm64? ( https://static.rust-lang.org/dist/rust-1.24.0-aarch64-unknown-linux-gnu.tar.gz )
-_eclasses_=estack 43ddf5aaffa7a8d0482df54d25a66a1f multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=4a8bae8f2989648a294a360f810d10c7
diff --git a/dev-lang/rust-1.26.2 b/dev-lang/rust-1.26.2
deleted file mode 100644
index b6defb1a1184..000000000000
--- a/dev-lang/rust-1.26.2
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare setup
-DEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 jemalloc? ( dev-libs/jemalloc ) || ( dev-lang/python:3.6 dev-lang/python:3.5 >=dev-lang/python-2.7.5-r2:2.7 >=virtual/pypy-5:0 ) || ( >=sys-devel/gcc-4.7 >=sys-devel/clang-3.5 ) dev-util/cmake
-DESCRIPTION=Systems programming language from Mozilla
-EAPI=6
-HOMEPAGE=https://www.rust-lang.org/
-IUSE=debug doc extended +jemalloc wasm llvm_targets_AArch64 llvm_targets_AMDGPU llvm_targets_ARM llvm_targets_BPF llvm_targets_Hexagon llvm_targets_Lanai llvm_targets_Mips llvm_targets_MSP430 llvm_targets_NVPTX llvm_targets_PowerPC llvm_targets_Sparc llvm_targets_SystemZ llvm_targets_X86 llvm_targets_XCore abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~arm64 ~x86
-LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
-PDEPEND=!extended? ( >=dev-util/cargo-0.27.0 )
-RDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 jemalloc? ( dev-libs/jemalloc )
-REQUIRED_USE=|| ( llvm_targets_AArch64 llvm_targets_AMDGPU llvm_targets_ARM llvm_targets_BPF llvm_targets_Hexagon llvm_targets_Lanai llvm_targets_Mips llvm_targets_MSP430 llvm_targets_NVPTX llvm_targets_PowerPC llvm_targets_Sparc llvm_targets_SystemZ llvm_targets_X86 llvm_targets_XCore )
-SLOT=stable/1.26
-SRC_URI=https://static.rust-lang.org/dist/rustc-1.26.2-src.tar.xz -> rustc-1.26.2-src.tar.xz amd64? ( https://static.rust-lang.org/dist/rust-1.25.0-x86_64-unknown-linux-gnu.tar.xz ) x86? ( https://static.rust-lang.org/dist/rust-1.25.0-i686-unknown-linux-gnu.tar.xz ) arm64? ( https://static.rust-lang.org/dist/rust-1.25.0-aarch64-unknown-linux-gnu.tar.xz )
-_eclasses_=estack 43ddf5aaffa7a8d0482df54d25a66a1f multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multiprocessing cac3169468f893670dac3e7cb940e045 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=e500705a9251c5c7e86d9e463418d32e
diff --git a/dev-lang/rust-1.27.1 b/dev-lang/rust-1.27.1
deleted file mode 100644
index 7c50ca8d5982..000000000000
--- a/dev-lang/rust-1.27.1
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare setup
-DEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 jemalloc? ( dev-libs/jemalloc ) || ( dev-lang/python:3.6 dev-lang/python:3.5 >=dev-lang/python-2.7.5-r2:2.7 >=virtual/pypy-5:0 ) || ( >=sys-devel/gcc-4.7 >=sys-devel/clang-3.5 ) dev-util/cmake
-DESCRIPTION=Systems programming language from Mozilla
-EAPI=6
-HOMEPAGE=https://www.rust-lang.org/
-IUSE=debug doc extended +jemalloc wasm llvm_targets_AArch64 llvm_targets_AMDGPU llvm_targets_ARM llvm_targets_BPF llvm_targets_Hexagon llvm_targets_Lanai llvm_targets_Mips llvm_targets_MSP430 llvm_targets_NVPTX llvm_targets_PowerPC llvm_targets_Sparc llvm_targets_SystemZ llvm_targets_X86 llvm_targets_XCore abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~arm64 ~x86
-LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
-PDEPEND=!extended? ( >=dev-util/cargo-0.27.0 )
-RDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 jemalloc? ( dev-libs/jemalloc )
-REQUIRED_USE=|| ( llvm_targets_AArch64 llvm_targets_AMDGPU llvm_targets_ARM llvm_targets_BPF llvm_targets_Hexagon llvm_targets_Lanai llvm_targets_Mips llvm_targets_MSP430 llvm_targets_NVPTX llvm_targets_PowerPC llvm_targets_Sparc llvm_targets_SystemZ llvm_targets_X86 llvm_targets_XCore )
-SLOT=stable/1.27
-SRC_URI=https://static.rust-lang.org/dist/rustc-1.27.1-src.tar.xz -> rustc-1.27.1-src.tar.xz amd64? ( https://static.rust-lang.org/dist/rust-1.26.2-x86_64-unknown-linux-gnu.tar.xz ) x86? ( https://static.rust-lang.org/dist/rust-1.26.2-i686-unknown-linux-gnu.tar.xz ) arm64? ( https://static.rust-lang.org/dist/rust-1.26.2-aarch64-unknown-linux-gnu.tar.xz )
-_eclasses_=estack 43ddf5aaffa7a8d0482df54d25a66a1f multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multiprocessing cac3169468f893670dac3e7cb940e045 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=7b999aa2c85736bef9a29a9ed214d8ea
diff --git a/dev-lang/rust-1.27.1-r2 b/dev-lang/rust-1.27.1-r2
deleted file mode 100644
index 74a774e8fbfb..000000000000
--- a/dev-lang/rust-1.27.1-r2
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare setup
-DEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 jemalloc? ( dev-libs/jemalloc ) || ( dev-lang/python:3.6 dev-lang/python:3.5 >=dev-lang/python-2.7.5-r2:2.7 >=virtual/pypy-5:0 ) || ( >=sys-devel/gcc-4.7 >=sys-devel/clang-3.5 ) cargo? ( !dev-util/cargo ) rustfmt? ( !dev-util/rustfmt ) dev-util/cmake
-DESCRIPTION=Systems programming language from Mozilla
-EAPI=6
-HOMEPAGE=https://www.rust-lang.org/
-IUSE=cargo debug doc +jemalloc rls rustfmt wasm llvm_targets_AArch64 llvm_targets_AMDGPU llvm_targets_ARM llvm_targets_BPF llvm_targets_Hexagon llvm_targets_Lanai llvm_targets_Mips llvm_targets_MSP430 llvm_targets_NVPTX llvm_targets_PowerPC llvm_targets_Sparc llvm_targets_SystemZ llvm_targets_X86 llvm_targets_XCore abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~amd64 ~arm64 ~x86
-LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
-PDEPEND=!cargo? ( >=dev-util/cargo-0.27.0 )
-RDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 jemalloc? ( dev-libs/jemalloc )
-REQUIRED_USE=|| ( llvm_targets_AArch64 llvm_targets_AMDGPU llvm_targets_ARM llvm_targets_BPF llvm_targets_Hexagon llvm_targets_Lanai llvm_targets_Mips llvm_targets_MSP430 llvm_targets_NVPTX llvm_targets_PowerPC llvm_targets_Sparc llvm_targets_SystemZ llvm_targets_X86 llvm_targets_XCore )
-SLOT=stable/1.27
-SRC_URI=https://static.rust-lang.org/dist/rustc-1.27.1-src.tar.xz -> rustc-1.27.1-src.tar.xz amd64? ( https://static.rust-lang.org/dist/rust-1.26.2-x86_64-unknown-linux-gnu.tar.xz ) x86? ( https://static.rust-lang.org/dist/rust-1.26.2-i686-unknown-linux-gnu.tar.xz ) arm64? ( https://static.rust-lang.org/dist/rust-1.26.2-aarch64-unknown-linux-gnu.tar.xz )
-_eclasses_=estack 43ddf5aaffa7a8d0482df54d25a66a1f multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multiprocessing cac3169468f893670dac3e7cb940e045 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=5036fc2a608adbdc336649dfd8747454
diff --git a/dev-lang/rust-bin-1.25.0 b/dev-lang/rust-bin-1.25.0
deleted file mode 100644
index 14713d55e082..000000000000
--- a/dev-lang/rust-bin-1.25.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=install postinst postrm pretend unpack
-DEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 !dev-lang/rust:0
-DESCRIPTION=Systems programming language from Mozilla
-EAPI=5
-HOMEPAGE=https://www.rust-lang.org/
-IUSE=doc
-KEYWORDS=amd64 x86
-LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
-RDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 !dev-lang/rust:0
-SLOT=stable
-SRC_URI=amd64? ( https://static.rust-lang.org/dist/rust-1.25.0-x86_64-unknown-linux-gnu.tar.gz ) arm? ( https://static.rust-lang.org/dist/rust-1.25.0-arm-unknown-linux-gnueabi.tar.gz https://static.rust-lang.org/dist/rust-1.25.0-arm-unknown-linux-gnueabihf.tar.gz https://static.rust-lang.org/dist/rust-1.25.0-armv7-unknown-linux-gnueabihf.tar.gz ) x86? ( https://static.rust-lang.org/dist/rust-1.25.0-i686-unknown-linux-gnu.tar.gz )
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=99562245f63f6a80ede4738752168a5a
diff --git a/dev-lang/rust-bin-1.26.0 b/dev-lang/rust-bin-1.26.0
deleted file mode 100644
index daea61abd4ee..000000000000
--- a/dev-lang/rust-bin-1.26.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=install postinst postrm pretend unpack
-DEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 !dev-lang/rust:0
-DESCRIPTION=Systems programming language from Mozilla
-EAPI=5
-HOMEPAGE=https://www.rust-lang.org/
-IUSE=doc
-KEYWORDS=~amd64 ~x86
-LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
-PDEPEND=>=dev-util/cargo-0.27.0
-RDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 !dev-lang/rust:0
-SLOT=stable
-SRC_URI=amd64? ( https://static.rust-lang.org/dist/rust-1.26.0-x86_64-unknown-linux-gnu.tar.xz ) arm? ( https://static.rust-lang.org/dist/rust-1.26.0-arm-unknown-linux-gnueabi.tar.xz https://static.rust-lang.org/dist/rust-1.26.0-arm-unknown-linux-gnueabihf.tar.xz https://static.rust-lang.org/dist/rust-1.26.0-armv7-unknown-linux-gnueabihf.tar.xz ) x86? ( https://static.rust-lang.org/dist/rust-1.26.0-i686-unknown-linux-gnu.tar.xz )
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=a504d13f8846a302a964a55ea96f914e
diff --git a/dev-lang/rust-bin-1.26.2 b/dev-lang/rust-bin-1.26.2
deleted file mode 100644
index 8d0d8d4463e7..000000000000
--- a/dev-lang/rust-bin-1.26.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=install postinst postrm pretend unpack
-DEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 !dev-lang/rust:0
-DESCRIPTION=Systems programming language from Mozilla
-EAPI=6
-HOMEPAGE=https://www.rust-lang.org/
-IUSE=doc
-KEYWORDS=~amd64 ~x86
-LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
-PDEPEND=>=dev-util/cargo-0.27.0
-RDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 !dev-lang/rust:0
-SLOT=stable
-SRC_URI=amd64? ( https://static.rust-lang.org/dist/rust-1.26.2-x86_64-unknown-linux-gnu.tar.xz ) arm? ( https://static.rust-lang.org/dist/rust-1.26.2-arm-unknown-linux-gnueabi.tar.xz https://static.rust-lang.org/dist/rust-1.26.2-arm-unknown-linux-gnueabihf.tar.xz https://static.rust-lang.org/dist/rust-1.26.2-armv7-unknown-linux-gnueabihf.tar.xz ) x86? ( https://static.rust-lang.org/dist/rust-1.26.2-i686-unknown-linux-gnu.tar.xz )
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=0beae862677016a616d7c2d20c9d4713
diff --git a/dev-lang/rust-bin-1.27.0 b/dev-lang/rust-bin-1.27.0
deleted file mode 100644
index 3b6ca8dd453a..000000000000
--- a/dev-lang/rust-bin-1.27.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=install postinst postrm pretend unpack
-DEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 !dev-lang/rust:0
-DESCRIPTION=Systems programming language from Mozilla
-EAPI=6
-HOMEPAGE=https://www.rust-lang.org/
-IUSE=doc
-KEYWORDS=~amd64 ~x86
-LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
-PDEPEND=>=dev-util/cargo-0.28.0
-RDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 !dev-lang/rust:0
-SLOT=stable
-SRC_URI=amd64? ( https://static.rust-lang.org/dist/rust-1.27.0-x86_64-unknown-linux-gnu.tar.xz ) arm? ( https://static.rust-lang.org/dist/rust-1.27.0-arm-unknown-linux-gnueabi.tar.xz https://static.rust-lang.org/dist/rust-1.27.0-arm-unknown-linux-gnueabihf.tar.xz https://static.rust-lang.org/dist/rust-1.27.0-armv7-unknown-linux-gnueabihf.tar.xz ) x86? ( https://static.rust-lang.org/dist/rust-1.27.0-i686-unknown-linux-gnu.tar.xz )
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=0beae862677016a616d7c2d20c9d4713
diff --git a/dev-lang/rust-bin-1.27.1 b/dev-lang/rust-bin-1.27.1
deleted file mode 100644
index 0a53a79a43bd..000000000000
--- a/dev-lang/rust-bin-1.27.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=install postinst postrm pretend unpack
-DEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 !dev-lang/rust:0 cargo? ( !dev-util/cargo )
-DESCRIPTION=Systems programming language from Mozilla
-EAPI=6
-HOMEPAGE=https://www.rust-lang.org/
-IUSE=cargo doc
-KEYWORDS=~amd64 ~x86
-LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
-PDEPEND=>=dev-util/cargo-0.28.0
-RDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 !dev-lang/rust:0 cargo? ( !dev-util/cargo )
-SLOT=stable
-SRC_URI=amd64? ( https://static.rust-lang.org/dist/rust-1.27.1-x86_64-unknown-linux-gnu.tar.xz ) arm? ( https://static.rust-lang.org/dist/rust-1.27.1-arm-unknown-linux-gnueabi.tar.xz https://static.rust-lang.org/dist/rust-1.27.1-arm-unknown-linux-gnueabihf.tar.xz https://static.rust-lang.org/dist/rust-1.27.1-armv7-unknown-linux-gnueabihf.tar.xz ) x86? ( https://static.rust-lang.org/dist/rust-1.27.1-i686-unknown-linux-gnu.tar.xz )
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=0e144fc8ae57d07c30229e4c957a7611
diff --git a/dev-lang/rust-bin-1.27.1-r1 b/dev-lang/rust-bin-1.27.1-r1
deleted file mode 100644
index ea0c5da0eb2c..000000000000
--- a/dev-lang/rust-bin-1.27.1-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=install postinst postrm pretend unpack
-DEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 !dev-lang/rust:0 cargo? ( !dev-util/cargo ) rustfmt? ( !dev-util/rustfmt )
-DESCRIPTION=Systems programming language from Mozilla
-EAPI=6
-HOMEPAGE=https://www.rust-lang.org/
-IUSE=cargo doc rustfmt
-KEYWORDS=~amd64 ~x86
-LICENSE=|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA
-PDEPEND=!cargo? ( >=dev-util/cargo-0.28.0 )
-RDEPEND=>=app-eselect/eselect-rust-0.3_pre20150425 !dev-lang/rust:0 cargo? ( !dev-util/cargo ) rustfmt? ( !dev-util/rustfmt )
-SLOT=stable
-SRC_URI=amd64? ( https://static.rust-lang.org/dist/rust-1.27.1-x86_64-unknown-linux-gnu.tar.xz ) arm? ( https://static.rust-lang.org/dist/rust-1.27.1-arm-unknown-linux-gnueabi.tar.xz https://static.rust-lang.org/dist/rust-1.27.1-arm-unknown-linux-gnueabihf.tar.xz https://static.rust-lang.org/dist/rust-1.27.1-armv7-unknown-linux-gnueabihf.tar.xz ) x86? ( https://static.rust-lang.org/dist/rust-1.27.1-i686-unknown-linux-gnu.tar.xz )
-_eclasses_=bash-completion-r1 6af26c1ffe65d92d3f525cb715f6250c desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=815916dd2f68eb8ba73d276e5f68f339
diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest
new file mode 100644
index 000000000000..fe05985b65a4
--- /dev/null
+++ b/dev-lang/rust-bin/Manifest
@@ -0,0 +1,32 @@
+DIST rust-1.25.0-arm-unknown-linux-gnueabi.tar.gz 152771389 BLAKE2B b163a41846233f08ba34ba325058843141b285758eede668e84d32751ace27d4b36fc5e8f963e1d13da1b46ae7cb48944987acc7ff36ced300bee154c7b22e68 SHA512 33a7bb3ed7a0b5b85e5dc0438ff620b67bc7bfe4d5e35bdcc9207a5dddf017a588a7de4877c4f1784f22f1d6e503ddd24d57f3d3af94d4bf00c781d4c378bb5f
+DIST rust-1.25.0-arm-unknown-linux-gnueabihf.tar.gz 152774994 BLAKE2B 438fc55edcf80f1f292765c7d062c7c2e282c7798d0ca7312557262a7474f60341aae1c9a3f5bfe349576f7204fe1fa044dded933157b128e6c6015e23c89388 SHA512 688e8e0d2e5661f132033afe8020a93828a45d00a874155a1a7887c69590061a413db95f0443d43234fb65b5510dfd7bdb092c0cc7b3fde6abd5f386786d95ad
+DIST rust-1.25.0-armv7-unknown-linux-gnueabihf.tar.gz 150376603 BLAKE2B 44aadf00b74d3d35039486289b319db5b1820dfb3b0fdbc03714ae2a8df78e09ee09fa41d9d8ec1377b91fb4a8f67cd7f4cdc99ceb39da4b48ba464ee1b73600 SHA512 a45312bec4c06b04d3c148d87a64aa55e14cc160eaaa6b712ce738590063137c8f9dd1030656071c1ac9a22cb852f34efdb98c435527c7371da381b802fb9104
+DIST rust-1.25.0-i686-unknown-linux-gnu.tar.gz 169267482 BLAKE2B 8fb18c95adf7edd74cd305683ab2ee33d59cce1a0f515e9ba63dfd105ffaf9150444e281502747856fa5164f24707b4bbbe110a2b1b7a1cf65c96b883a6f2ede SHA512 76bcd978b9b23b0fc6315f91bed153e59616aa62f520aae8e8d3587b5f5fae74fef15f8b0a749b02a69be56fad4df9a413019438135481917bca1fb1a7704de7
+DIST rust-1.25.0-x86_64-unknown-linux-gnu.tar.gz 178696930 BLAKE2B 0f82e837494d394c86462583f3d65f1ad839a97eda00fbc00476d06255831088cb7e554cc14edbf9dd23fbebf75078dc78204bdbec4795781f7fae0cbb6de63d SHA512 544e85bb69359d8ff6059d0f470b5995822f73e6d361be43f69f87d394b7252a11686f835336930bc257ba4347c0498abf5b1fbd751180d96bd9ca872b76d65c
+DIST rust-1.26.0-arm-unknown-linux-gnueabi.tar.xz 98262664 BLAKE2B 1de2aeef6d035f9f5a4238ad0c730baabfa39944a0cc47ab31fb51b1dd7f606688a4e9c7cd323e7a4998601fce4ebd0102e2d011cfff3caa3a20f91579442cd4 SHA512 44fdff800a6da1929ccab717f544add5a0500856b4ae1edbd6202d5d8b9781bd336c75c857ddf40e6f7175916fb026210bc5ec2656f4b564dd69cc9189bda3d6
+DIST rust-1.26.0-arm-unknown-linux-gnueabihf.tar.xz 98490960 BLAKE2B ad4210bc39d11974f0a5032f6779b4c8ca04f705da8c15a755d5072d157724896a65fc149c16c6f9a479f0c61a6cb0a70d90e48543f6d72725de6baf25d4a94b SHA512 3822303a7a8c567f3a917f4c934f1411fd606a335d5f6e574dd0be9d463e9fe27ff948c820b25a305e53d83b5d9fa0e1cbfca86451a0b3e11ff84ef7a82f65c8
+DIST rust-1.26.0-armv7-unknown-linux-gnueabihf.tar.xz 98788032 BLAKE2B 3727effee1eaf89d979e27f339901ac938acc22d9dd8e664c20941e46db8250f349493f65598243d5234539bb2037e9dabd38f1a047dd8f9bbe20ae2c8270747 SHA512 5766dbba6f4faae3e8dfd1d98ea948e3835d5b1c28b8daf6c734afd7f27301aa857147eb28762462f77c9da539aae2a81319f194154245abd5cdae7067f24d6c
+DIST rust-1.26.0-i686-unknown-linux-gnu.tar.xz 143003764 BLAKE2B 4c0b1872196c21bf9bc9d927455b4c8eb379e40281ef9fdd8a440b702b919628a00bf2e7b392084e8f41f30119c93bfa6e57ba47ee1adecb1d5cdda43778f821 SHA512 1257f9edefc49ee1742c3acd666d15f077c4d999a82dfe0d574df5c41981c3f716adf86b23d96cf9a6757508aea92abcbe06ad9e3bec2cb4ac19512d60ebba31
+DIST rust-1.26.0-x86_64-unknown-linux-gnu.tar.xz 139246408 BLAKE2B dc386c7b9e016bdcb8b2475d789b100922defc0bcd400476e4e618f51c338338edfc463428c9fa0fdcf8f051465a126d1c61030c5881d5c21888e80b8068bad8 SHA512 457503fea324251a92f25d0d45f1e2ac7d342a6a8f52d1abe93a579c7ae9b7f453a707d353e82614b37790747e8551f9762188ee25ff883495598cbf17b3f97e
+DIST rust-1.26.2-arm-unknown-linux-gnueabi.tar.xz 98267104 BLAKE2B ae44fcead124e5e3993240be0c8a46e545df5d045d39184cfada86d9a820fa30a771396a2ced86c2454aef224951e85cf0b6965c13ed98a3024e07d4ca1ec6a9 SHA512 a96295ef2d0eca5a682e3b3bcfe3b3ffeb5bbe45bc949f467cfd1e7ac7252d74e86d2d8f25e5722e75e7f537afeb3b0ae9054bd3908916ea461623f8c13ba5bf
+DIST rust-1.26.2-arm-unknown-linux-gnueabihf.tar.xz 98502692 BLAKE2B 124040a31e93923f66319244dbeba2be5836fb05ea3c1b8d833bdfac796ab1818139651a798ff398c7448958835ea238e9a111899493b992cc25c026a096ae89 SHA512 e23aa8e1167990a61413cdc0c0f336eafee02c90763120a08fdd7fcd7fbf04bbdbe38c59017cfa43ef622cac1b03f0850d5ace15046d384311a9f8af3cbe8b40
+DIST rust-1.26.2-armv7-unknown-linux-gnueabihf.tar.xz 98828932 BLAKE2B 2f60e65128bd32d97422d82d99f5c5447d1c1e77582028089d52208e3ede4af5e72c278a3fb5001348c864087f3e85af05604a0b6078891c5ed812d745840d93 SHA512 7b8e3f39a62b7b5fdaa6d53e5638de26968799d97b5d53e09bf49456b02f968495cff4757f25d38bc3393ca33dc1b9da353ec290ba9416770e082548aa5079ac
+DIST rust-1.26.2-i686-unknown-linux-gnu.tar.xz 143090096 BLAKE2B 7871fa4e4d0f320ff949cd31cefa116bc7b741927626958e1d10197f05fc9a662b8d6c21ddd4d2910700e6f7273e4fc18738e6ff58cd85b9af4ed25eceea31d9 SHA512 859b5b72c78cca8cd473012599ca12539ef9a5ee38d1aaaad024019fd84220e344e1cd0efd2b027ef333555b158b23529f35ceb5d59d76c35e7946b5fe4a8a52
+DIST rust-1.26.2-x86_64-unknown-linux-gnu.tar.xz 138609432 BLAKE2B 54507a8ce3ab2676e6e66852b6d3f1a47ca07ad4b56383f6247149309a0f60f67fbf0a6ba27d968c24340c07d7d5074942c6eaccbc1207c5e75fd9a6f47b2481 SHA512 29e474b0eab4dd2ffa0b964d83f52ffce530e75c4193e307410ef6d20ef9ad2b300a4f467bdf06b3311157340e9295cb9b1efdcf08dafee66979b076c2afba7e
+DIST rust-1.27.0-arm-unknown-linux-gnueabi.tar.xz 101002020 BLAKE2B e725b5cd8ec5ec9c035b70c7a45f49e21332846bc4e760afce4abc5d6de3a84029d06e1df0ca430d9b9b1117d4b534146310391254ebad458552d40b152aa56a SHA512 c0924ae1296802d6bed09944cb04b98414dcd4e102387cc1c4810e26793409daf4622300d451d297c9a84890f108dff1bb4ef70381d582b6d26aae0b2c38e476
+DIST rust-1.27.0-arm-unknown-linux-gnueabihf.tar.xz 101316444 BLAKE2B f3c2e5f0cd6c75e51c3a25bd9aad34180d04bb97187f1ce240b6682e64026efee3359a71d1aadf9ea2fadf0cffa277daade02703d1e70c2fa43f68624ccf43a8 SHA512 5c374d103377dc94e5a68c46deba22080b374dd652cfc64abc69fbbe69e59b40537208534a15c860fb985abb426468eef33b7d6c9a8fee3f855a447c6c0ced4f
+DIST rust-1.27.0-armv7-unknown-linux-gnueabihf.tar.xz 98186744 BLAKE2B add9b9ce125e8e0216579fc4eb9a615396bc6798bd8fe52fc5e02b4eddbca991e227fa1022d5ea86473e4a2f4738fe8e30ad01899bac78b6c2072eead9b9e69d SHA512 034288fd8767f1773b4a5232b26e68a812d0f8084e39dff776d3c8d235f2b3f51c12620a0346851fccbb0ab3cd194938682fa8e9d8641f8ee3c3d9259c96a86f
+DIST rust-1.27.0-i686-unknown-linux-gnu.tar.xz 144744880 BLAKE2B ef48cd1b2601868840c59274a776be40e0ac8ce674d0a00712176e28f5e381b95b790d898fdfdae153768b754f87662c581cd5b11752d5d4401aadd9b446fc7b SHA512 66508f09e7a48d72d4a18da209dadd5e11fc1e9811726fdfa8de609359eee6bc1d8d3b578b50ab0b4dcff879e96edd6d60449508eed7d2d44f72b2c8c29e2546
+DIST rust-1.27.0-x86_64-unknown-linux-gnu.tar.xz 144343920 BLAKE2B 214530a0724f0fa6e1c4e769787a1c0d56e9a6c13a0cacdb9f639d523915fbd413fe42ccd9073308b14b551804d269061ed9bc03cc6761b817bc556e1837d005 SHA512 e57b60cafec48a396cde1ff62bd01148e0e3c803b9b97d70a7cf477a7d3a4295ca98fa99a1252004751e8529b214c2859cd2134ce722b3336b9640c2aef6f625
+DIST rust-1.27.1-arm-unknown-linux-gnueabi.tar.xz 101083416 BLAKE2B 2fd3a4b0c8a6cc1e7f7bc11300081183144639c4d02b8bb989154fbad92ad1e30ac8171993d8296ce8f0486dd018df46360693d912b50ca0c299c4c059f79d17 SHA512 7fa376f077abad6e24b81aa98ab7d953b8257388212a509c7a061ebe022cefd5bd042f24fc4444287bc4fb4cb9a6cbb651ae0d8146b5d4fe73d395ebb7192367
+DIST rust-1.27.1-arm-unknown-linux-gnueabihf.tar.xz 101382108 BLAKE2B 8743930b86b8ac1032afc5ced83f57b0606e9143a9d8e30a8b2ede70abb415fc2f1a904cb4b92adde7f71d54e83384509f02220cea9a9ab189a79815a58bd434 SHA512 be49a245163bef0345cd138fdc8d13a8403bf6b523505666650119eba87921f6a1abb04267bc698da30e5e688d8592fc20d8d3d63aff7ac1fa7397950531d329
+DIST rust-1.27.1-armv7-unknown-linux-gnueabihf.tar.xz 98288932 BLAKE2B 4794e8c54c8f733de6129829bab9e02644651fd6350db76bdb8c69f32fcff0a61e4992241431fea2b871e04a6f28607810918c5161a5a8a0b3fe756a37b619e3 SHA512 405bd579e69ec73de384487c4cd77eefcbc6c537ca3421f38ce2d35b8cd911def82fb9006b788a8aa6cdef69f620a5b1f2a2f7364bf7ddd0452d80b33315fa43
+DIST rust-1.27.1-i686-unknown-linux-gnu.tar.xz 144852524 BLAKE2B f087ad3ee7f942482c6aa02f9dcdc4adf6ede64e698024f7dcca6dccedcc5f9e9805050015d8328c5b672c94cb7f1008551a95a69b1ce8e754e048c5604dd11e SHA512 e0c7d5f64db768321bbdf229529b12f93e36507db03329b0b26094fd81cdf013804f929105ac4545903eb4494770120407c40616086b431ea66413be7e1163d3
+DIST rust-1.27.1-x86_64-unknown-linux-gnu.tar.xz 144328984 BLAKE2B 45551c2f4258c821e9b56ac09d673c46032b5f480da5fc51c0e0e33f66be7f0619aa4ad878336dbffae32e6eb43f2adfbba927ad5cfbb919b9e4395169d5c3bd SHA512 b419c19f75082a63a669ebeeefbce907ca7e7ac50a1c1355d1b10b3a4c1f8e28a76c4fd677efd8cb966a6e70a76059813e39b8dfe93de1401c7419d57ddca52a
+EBUILD rust-bin-1.25.0.ebuild 3456 BLAKE2B c25d70226b0ea86619e749fce47b34706b08257bb0a33f99d6ceeff477040e1dadb4daa830e9c23463f4b20283109292c499dc216753ab9070717275800a8133 SHA512 a423705eb4fc96bd0fe3efe5f79187be88f46a965c1735a65c1990b43917d8d2fb8298b536375db590edd25314c41fa0aef344f8444c9413426013885f0adcc7
+EBUILD rust-bin-1.26.0.ebuild 3591 BLAKE2B 37db63381b0ece72c839661baa5102b7359b7e5ab68b36e2a6de513deff00a413c5dfe27ffcc94c45807a5f2288620b2bd10dc48da06790adb330a54d5bff47f SHA512 f297a3b61e89996fb8e4e52274571fad69602772cb3168574c724b42f59d710f571cba30bcbf32086584d8a93e87313689aeeab4c600a24355b3e82e31e297c9
+EBUILD rust-bin-1.26.2.ebuild 3584 BLAKE2B 932ca808ee2ec13b9b3b400a3ba1b88eddbca83b1d80d03951692c8ec232ebe4df1e7ee9c2a80a8753a8069d4ed2db67d352ba6a89e4e2d13333c7c30494cec5 SHA512 9a4c592ffa1793574b31d73e8922257651b8336812755fa98a576d05bd346118d08e9344f0c11a21e3024e3346da115c2adba44c2393185e051e18bbc4bf0eec
+EBUILD rust-bin-1.27.0.ebuild 3584 BLAKE2B 932ca808ee2ec13b9b3b400a3ba1b88eddbca83b1d80d03951692c8ec232ebe4df1e7ee9c2a80a8753a8069d4ed2db67d352ba6a89e4e2d13333c7c30494cec5 SHA512 9a4c592ffa1793574b31d73e8922257651b8336812755fa98a576d05bd346118d08e9344f0c11a21e3024e3346da115c2adba44c2393185e051e18bbc4bf0eec
+EBUILD rust-bin-1.27.1-r1.ebuild 4276 BLAKE2B 5d333ac21078b8c31570665b882d7f21a4f10efc1b79a016bc032dc0aa7c95db8fa822d05befbe5ba5ff0ff6991478e6c197dc4c57173eb9a2a037182a282004 SHA512 5dcde407708a0f7000e8a3e5a237c8b0ba80a1d2ee7dda47adcdfa24ad25c5c7a7c37774931f93ebe79b50f71ebd1df8b05400f12cb65f5b7689f55a5c101a97
+EBUILD rust-bin-1.27.1.ebuild 3839 BLAKE2B f420bb2b4c550670872b635ebf8bc9aa19811a640f6cacf5d4a79e6bec7c7793685813fc4ec2aa5ee4eec45f2f6e06a0b54f821492ac481f86cc177ebcad37f2 SHA512 9f9a50a92b018361fb0044f97c94a11239ddd03bf3aa91521029e59d79bca15c29f66559f3bdd280acd413bf7dc8af5d5c5b6a15dcb2d66e0bc4519d2879a059
+MISC metadata.xml 379 BLAKE2B e2b131a15a86c6230ef9ff560fc522c9e37ed06d2d44eb7e63fa91a01673acbe0dbf80d6e774e68edca439521bb9d61d509ea69203f3c10f496f0c638c8c5368 SHA512 ed16a24b5d5f34471dbc5d411de5a819015cd9da81b55e593401ed52425fc5aa53c793e0e00966fc44e599a99036c5b9756a66b31a85cd80abe41dc97f9f785f
diff --git a/dev-lang/rust-bin/metadata.xml b/dev-lang/rust-bin/metadata.xml
new file mode 100644
index 000000000000..3407a1ae8de4
--- /dev/null
+++ b/dev-lang/rust-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="project">
+ <email>rust@gentoo.org</email>
+ <name>Rust Project</name>
+ </maintainer>
+ <use>
+ <flag name="cargo">Install cargo component</flag>
+ <flag name="rustfmt">Install rustfmt component</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/rust-bin/rust-bin-1.25.0.ebuild b/dev-lang/rust-bin/rust-bin-1.25.0.ebuild
new file mode 100644
index 000000000000..0d270141b6dc
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.25.0.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils bash-completion-r1 toolchain-funcs
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+SRC_URI="amd64? ( https://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.gz )
+ arm? (
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabi.tar.gz
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabihf.tar.gz
+ https://static.rust-lang.org/dist/${MY_P}-armv7-unknown-linux-gnueabihf.tar.gz
+ )
+ x86? ( https://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
+ opt/${P}/lib/rustlib/*/lib/*.rlib*
+"
+
+pkg_pretend () {
+ if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
+ die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
+ fi
+}
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+
+ if use arm && [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv6* ]]; then
+ postfix=arm-unknown-linux-gnueabi
+ elif use arm && [[ ${CHOST} == armv6*h* ]]; then
+ postfix=arm-unknown-linux-gnueabihf
+ elif use arm && [[ ${CHOST} == armv7*h* ]]; then
+ postfix=armv7-unknown-linux-gnueabihf
+ fi
+
+ 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.26.0.ebuild b/dev-lang/rust-bin/rust-bin-1.26.0.ebuild
new file mode 100644
index 000000000000..d9614aad8ef0
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.26.0.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils bash-completion-r1 versionator toolchain-funcs
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+SRC_URI="amd64? ( https://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.xz )
+ arm? (
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabi.tar.xz
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabihf.tar.xz
+ https://static.rust-lang.org/dist/${MY_P}-armv7-unknown-linux-gnueabihf.tar.xz
+ )
+ x86? ( https://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.xz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+"
+RDEPEND="${DEPEND}"
+PDEPEND=">=dev-util/cargo-${CARGO_DEPEND_VERSION}"
+
+QA_PREBUILT="
+ opt/${P}/bin/rustc-bin-${PV}
+ opt/${P}/bin/rustdoc-bin-${PV}
+ opt/${P}/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.rlib*
+"
+
+pkg_pretend () {
+ if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
+ die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
+ fi
+}
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+
+ if use arm && [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv6* ]]; then
+ postfix=arm-unknown-linux-gnueabi
+ elif use arm && [[ ${CHOST} == armv6*h* ]]; then
+ postfix=arm-unknown-linux-gnueabihf
+ elif use arm && [[ ${CHOST} == armv7*h* ]]; then
+ postfix=armv7-unknown-linux-gnueabihf
+ fi
+
+ 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.26.2.ebuild b/dev-lang/rust-bin/rust-bin-1.26.2.ebuild
new file mode 100644
index 000000000000..0eea0a7d10c1
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.26.2.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils bash-completion-r1 versionator toolchain-funcs
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+SRC_URI="amd64? ( https://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.xz )
+ arm? (
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabi.tar.xz
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabihf.tar.xz
+ https://static.rust-lang.org/dist/${MY_P}-armv7-unknown-linux-gnueabihf.tar.xz
+ )
+ x86? ( https://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.xz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+"
+RDEPEND="${DEPEND}"
+PDEPEND=">=dev-util/cargo-${CARGO_DEPEND_VERSION}"
+
+QA_PREBUILT="
+ opt/${P}/bin/rustc-bin-${PV}
+ opt/${P}/bin/rustdoc-bin-${PV}
+ opt/${P}/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.rlib*
+"
+
+pkg_pretend () {
+ if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
+ die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
+ fi
+}
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+
+ if use arm && [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv6* ]]; then
+ postfix=arm-unknown-linux-gnueabi
+ elif use arm && [[ ${CHOST} == armv6*h* ]]; then
+ postfix=arm-unknown-linux-gnueabihf
+ elif use arm && [[ ${CHOST} == armv7*h* ]]; then
+ postfix=armv7-unknown-linux-gnueabihf
+ fi
+
+ 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.27.0.ebuild b/dev-lang/rust-bin/rust-bin-1.27.0.ebuild
new file mode 100644
index 000000000000..0eea0a7d10c1
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.27.0.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils bash-completion-r1 versionator toolchain-funcs
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+SRC_URI="amd64? ( https://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.xz )
+ arm? (
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabi.tar.xz
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabihf.tar.xz
+ https://static.rust-lang.org/dist/${MY_P}-armv7-unknown-linux-gnueabihf.tar.xz
+ )
+ x86? ( https://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.xz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+"
+RDEPEND="${DEPEND}"
+PDEPEND=">=dev-util/cargo-${CARGO_DEPEND_VERSION}"
+
+QA_PREBUILT="
+ opt/${P}/bin/rustc-bin-${PV}
+ opt/${P}/bin/rustdoc-bin-${PV}
+ opt/${P}/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.rlib*
+"
+
+pkg_pretend () {
+ if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
+ die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
+ fi
+}
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+
+ if use arm && [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv6* ]]; then
+ postfix=arm-unknown-linux-gnueabi
+ elif use arm && [[ ${CHOST} == armv6*h* ]]; then
+ postfix=arm-unknown-linux-gnueabihf
+ elif use arm && [[ ${CHOST} == armv7*h* ]]; then
+ postfix=armv7-unknown-linux-gnueabihf
+ fi
+
+ 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.27.1-r1.ebuild b/dev-lang/rust-bin/rust-bin-1.27.1-r1.ebuild
new file mode 100644
index 000000000000..53d2d4e87ebe
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.27.1-r1.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils bash-completion-r1 versionator toolchain-funcs
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+SRC_URI="amd64? ( https://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.xz )
+ arm? (
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabi.tar.xz
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabihf.tar.xz
+ https://static.rust-lang.org/dist/${MY_P}-armv7-unknown-linux-gnueabihf.tar.xz
+ )
+ x86? ( https://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.xz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE="cargo doc rustfmt"
+
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+ cargo? ( !dev-util/cargo )
+ rustfmt? ( !dev-util/rustfmt )
+"
+RDEPEND="${DEPEND}"
+PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
+
+QA_PREBUILT="
+ opt/${P}/bin/*-${PV}
+ opt/${P}/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.rlib*
+"
+
+pkg_pretend () {
+ if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
+ die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
+ fi
+}
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+
+ if use arm && [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv6* ]]; then
+ postfix=arm-unknown-linux-gnueabi
+ elif use arm && [[ ${CHOST} == armv6*h* ]]; then
+ postfix=arm-unknown-linux-gnueabihf
+ elif use arm && [[ ${CHOST} == armv7*h* ]]; then
+ postfix=armv7-unknown-linux-gnueabihf
+ fi
+
+ 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"
+ use cargo && components="${components},cargo"
+ use rustfmt && components="${components},rustfmt-preview"
+ ./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}"
+
+ if use cargo; then
+ local cargo=cargo-${PV}
+ mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die
+ dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
+ fi
+ if use rustfmt; then
+ local rustfmt=rustfmt-${PV}
+ local cargo_fmt=cargo-fmt-${PV}
+ mv "${D}/opt/${P}/bin/rustfmt" "${D}/opt/${P}/bin/${rustfmt}" || die
+ mv "${D}/opt/${P}/bin/cargo-fmt" "${D}/opt/${P}/bin/${cargo_fmt}" || die
+ dosym "../../opt/${P}/bin/${rustfmt}" "/usr/bin/${rustfmt}"
+ dosym "../../opt/${P}/bin/${cargo_fmt}" "/usr/bin/${cargo_fmt}"
+ fi
+
+ 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.27.1.ebuild b/dev-lang/rust-bin/rust-bin-1.27.1.ebuild
new file mode 100644
index 000000000000..c1554f3d217c
--- /dev/null
+++ b/dev-lang/rust-bin/rust-bin-1.27.1.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils bash-completion-r1 versionator toolchain-funcs
+
+MY_P="rust-${PV}"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+SRC_URI="amd64? ( https://static.rust-lang.org/dist/${MY_P}-x86_64-unknown-linux-gnu.tar.xz )
+ arm? (
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabi.tar.xz
+ https://static.rust-lang.org/dist/${MY_P}-arm-unknown-linux-gnueabihf.tar.xz
+ https://static.rust-lang.org/dist/${MY_P}-armv7-unknown-linux-gnueabihf.tar.xz
+ )
+ x86? ( https://static.rust-lang.org/dist/${MY_P}-i686-unknown-linux-gnu.tar.xz )"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+SLOT="stable"
+KEYWORDS="~amd64 ~x86"
+IUSE="cargo doc"
+
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+
+DEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ !dev-lang/rust:0
+ cargo? ( !dev-util/cargo )
+"
+RDEPEND="${DEPEND}"
+PDEPEND=">=dev-util/cargo-${CARGO_DEPEND_VERSION}"
+
+QA_PREBUILT="
+ opt/${P}/bin/rustc-bin-${PV}
+ opt/${P}/bin/rustdoc-bin-${PV}
+ opt/${P}/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.so
+ opt/${P}/lib/rustlib/*/lib/*.rlib*
+"
+
+pkg_pretend () {
+ if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then
+ die "${CHOST} is not supported by upstream Rust. You must use a hard float version."
+ fi
+}
+
+src_unpack() {
+ default
+
+ local postfix
+ use amd64 && postfix=x86_64-unknown-linux-gnu
+
+ if use arm && [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv6* ]]; then
+ postfix=arm-unknown-linux-gnueabi
+ elif use arm && [[ ${CHOST} == armv6*h* ]]; then
+ postfix=arm-unknown-linux-gnueabihf
+ elif use arm && [[ ${CHOST} == armv7*h* ]]; then
+ postfix=armv7-unknown-linux-gnueabihf
+ fi
+
+ 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"
+ use cargo && components="${components},cargo"
+ ./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}
+ local cargo=cargo-${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
+ use cargo && mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || 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}"
+ use cargo && dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}"
+
+ 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..9dfc987dc422
--- /dev/null
+++ b/dev-lang/rust/Manifest
@@ -0,0 +1,17 @@
+DIST rust-1.24.0-aarch64-unknown-linux-gnu.tar.gz 184157362 BLAKE2B 68b1b9471b6d26dbb2c3bf897d2bffc15d2fcd1fde774d4f23389e9ccb96fc60d8ec8c343b5f93651bced05bdf228d549c747f3f3d4de9c8232e99aa1b6bef6a SHA512 d15548a7b21ca4605ff24d098a59414548a315acd736ac4d8ac845399c9febdd810ba76fdf2dd9336325bd749866ee72f3d8c7c573b04a4d932d00cd7cac34c0
+DIST rust-1.24.0-i686-unknown-linux-gnu.tar.gz 193631843 BLAKE2B f19e9f717f5626b2267da4e661b53f45f7948a83a25156239af3cadb1184bf39669171364754f1787cdb78c3b62bd145bff1e3f4c3c7890f0dd52839bd8ae923 SHA512 3806bee5dccc080fae437bbc7f2e2062803244eb57c25e5e591e46279810c661bf016a4043e0af991b49b9e09a5d81ec275a852c3647a474507b03846d76aac0
+DIST rust-1.24.0-x86_64-unknown-linux-gnu.tar.gz 199663002 BLAKE2B 2373637eb4410c07328b3cbaecb56ca465956ec1a2f14786e00922d74c4e68760538383960080348be003bee656761f5bbd0aa871ea21e22d029b3f8ab5344a7 SHA512 63ecb84b31f586c85e25229fb673892567edc2f557ac2ca1958caf3e26aa4e6c9a55b410aeeeadf1a61a5ebd66a517106e942f923a2884ce69ee92aec622187b
+DIST rust-1.25.0-aarch64-unknown-linux-gnu.tar.xz 83752132 BLAKE2B a0d49238ccaa3547764c07a215a0e02c813ae18cd6aca3baae1d9a10dee87d73526552b7ff6e4936ec414794d1143041aa8f92d244e2e4fe5aaefcb12a6dcb0a SHA512 404ecd4dc1e49fba41d7ade947877f621aa762e43eb5a8f604823fe297e8023f095cd449610240ed235723baaac96064eb38445794e27708edcdbca998d939e3
+DIST rust-1.25.0-i686-unknown-linux-gnu.tar.xz 102453124 BLAKE2B 8986ebab6a7a9d00f716541484e0cfd4f33ca592880097217e718cb79cae77aad8ecaf6856f72386d2419b4dcc0d99425fb37f72b4830d6a20a74166f2c534d0 SHA512 75ad5cb5e00fabc24aaa46236cc6f2193a7543fd0944c0717c11a56d9c420d20463ad683558d86f5d42abacfb89d15f9cabf404c912a5e24a28e6716c8003e8f
+DIST rust-1.25.0-x86_64-unknown-linux-gnu.tar.xz 111059260 BLAKE2B ae982976a735c2b5226722207a983bb638cb7c0cb0ceb6b438456d54fac86a5d1892b535f01ac463157205c0ae27ae876482f6ac1fa269a9ec3e1177be0cef2e SHA512 aea93ff64f620a1dd6b48d07ec3dcbc126b2f5c17b4697c096ec8cd02a3c7dfec7ae7d5df70a55eceb372897ad12f3d01c67d5aaea0167a80270931c61323f78
+DIST rust-1.26.2-aarch64-unknown-linux-gnu.tar.xz 90964988 BLAKE2B 7e5de737ff2b4711e0a5b3085f10c3f2918fc5823dcb52bc5f897a5617b65d648d5e59664dbfaa904ff08923d1bbd11aae21349760fefef6ff18ea0e45391e07 SHA512 b565ec988d3b946dabc8902eba60b446070e77b7c27aa98d981b7ba5e9285bda95565627600e6be057970de5006d9640ef77fa920849160f5cf98508b48d1673
+DIST rust-1.26.2-i686-unknown-linux-gnu.tar.xz 143090096 BLAKE2B 7871fa4e4d0f320ff949cd31cefa116bc7b741927626958e1d10197f05fc9a662b8d6c21ddd4d2910700e6f7273e4fc18738e6ff58cd85b9af4ed25eceea31d9 SHA512 859b5b72c78cca8cd473012599ca12539ef9a5ee38d1aaaad024019fd84220e344e1cd0efd2b027ef333555b158b23529f35ceb5d59d76c35e7946b5fe4a8a52
+DIST rust-1.26.2-x86_64-unknown-linux-gnu.tar.xz 138609432 BLAKE2B 54507a8ce3ab2676e6e66852b6d3f1a47ca07ad4b56383f6247149309a0f60f67fbf0a6ba27d968c24340c07d7d5074942c6eaccbc1207c5e75fd9a6f47b2481 SHA512 29e474b0eab4dd2ffa0b964d83f52ffce530e75c4193e307410ef6d20ef9ad2b300a4f467bdf06b3311157340e9295cb9b1efdcf08dafee66979b076c2afba7e
+DIST rustc-1.25.0-src.tar.gz 98639156 BLAKE2B 1408d5dd0611d4830de3b6b3d00e3fad4198a47599b639d0ac0bd05aaba401f743056a942e9df04a4d192c6b12e8cfe9a9cdf8cd26e48b72104ce9b423df049e SHA512 7d8886f4d5a621eb794e814deb60be681fa38cf086f87ffa14e5a3500c640b237c549a632de1331a0f1b71963de41f6d31a4df3866b7e597424002316fed81ce
+DIST rustc-1.26.2-src.tar.xz 54613640 BLAKE2B f361b7a0ed40ccb026750b4a70b99931f1abf52024e907b588e339902de2fbbd15501d237ac048d0537005834b0a2f49935f654a8c75d40ed95c65894f611481 SHA512 a598858ddce0e05d1d431be383400f44fc551eb2e368f37b01670c0b65ea5da6a7d5b2b68bb6ef806d2107cfa0d5007008442ad4d5ddb17d18d04e0ab31600b0
+DIST rustc-1.27.1-src.tar.xz 55458892 BLAKE2B 9c5cec24760afdcee51fb0ba8d2289b92d34de57e97e57f2e5dc129674edab4a595ab5756c789b5de15bdd5107363f12a517169cedc7c3093fa0241d200ca3ab SHA512 4a8c03476ca1867a1130b825724ecb6bd629b889d704fdd6c3de4e188f73e2d1acdfae413f26e37505d76109d23d8e9ab409b31af3d67d244f8552730ada292d
+EBUILD rust-1.25.0.ebuild 4602 BLAKE2B ef12c22219b70843d6132e07dc0df131502ba441a750c86f1863bd55c708df992a8d359fd62da11ff473806998673fbe0db11ff8129d4af42295ad6d849be511 SHA512 737a3f8469cac36442f11260de811294ab38faa23c515c78159288f340e51bafbb64b7c6354e8409f5b7093e65907aaebcc787493779f70f56a5bb02535574c3
+EBUILD rust-1.26.2.ebuild 6405 BLAKE2B 42ba958bf51ca06863a7daf33af65edf6ca9a8661403c3790beb0767275ef351c624bab40eec7d6b191f9ff366a00ffe9b9419edf6ad95093adc130e1c3c8c27 SHA512 5475113b82ae3d5406a41a2ad1d37dd0997be401dbe5f61a3f50234b208b23f6b3bb465baffc0e05b3c667416dcd870d61b918f36ef3e41ae30009b600eb7524
+EBUILD rust-1.27.1-r2.ebuild 7460 BLAKE2B 24163e17a44a120b62230b95c4134b181463cfdf6bce19107251e91c1bb9d37a7850c06ba6b1928c1296844902e0dd0454dd07753130cb9f655f55ec95588bb0 SHA512 5a865e7013ca04f12be10031c08aec7f5008e488489bef9bcc7c62aaf06c0b2278aa514054bb309fb73f546796f054e2b801cadc8a2883e01a88980b8a8453c7
+EBUILD rust-1.27.1.ebuild 6502 BLAKE2B 7c00b39b5db8347085ec6060019ce20f0914aed7c1f62da31d7d3114451253a076f11b60c4615f7b5f1afb0cd7bd25e0e89f328b29fe4c041bad242f69e9cb36 SHA512 57c6ac383e47aec3d86b7d1ec198c843b89498c2f2fea17f1e1ce07ec4a9405ec48add0e3e683a378f74650582ded64a3d610c7d1014295ca9e141bd7d0961a6
+MISC metadata.xml 729 BLAKE2B fabcd84f8393ad53a0a5a44d9ec6320d1ff8defa7bca5af818b28571af017739348de98c5b60db6140929f576393e70ddaebc2d255011c22ba1c6e16672b375a SHA512 103448ae7c168a0dc30539f1e747200990ffec66d62a66876c1d186d03eabdded5238175584269472b7fca53bf596b26dc58dbb732751d7971dc0c75ccf37211
diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
new file mode 100644
index 000000000000..88d117336094
--- /dev/null
+++ b/dev-lang/rust/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>rust@gentoo.org</email>
+ <name>Rust Project</name>
+ </maintainer>
+ <use>
+ <flag name="extended">Build and install rls, rustfmt and cargo
+ alongside the compiler and stdlib</flag>
+ <flag name="cargo">Install cargo component</flag>
+ <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> as the
+ standard memory allocator</flag>
+ <flag name="rls">Install rls component</flag>
+ <flag name="rustfmt">Install rustfmt component</flag>
+ <flag name="wasm">Build support for the wasm32-unknown-unknown
+ target</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/rust/rust-1.25.0.ebuild b/dev-lang/rust/rust-1.25.0.ebuild
new file mode 100644
index 000000000000..5411d562a2f0
--- /dev/null
+++ b/dev-lang/rust/rust-1.25.0.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit multiprocessing 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="amd64 x86"
+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 ~arm64 x86"
+fi
+
+CHOST_amd64=x86_64-unknown-linux-gnu
+CHOST_x86=i686-unknown-linux-gnu
+CHOST_arm64=aarch64-unknown-linux-gnu
+
+RUST_STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).0"
+RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}"
+RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}"
+RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}"
+
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://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 )
+ arm64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_arm64}.tar.gz )
+"
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="debug doc extended +jemalloc"
+
+RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ jemalloc? ( dev-libs/jemalloc )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ dev-util/cmake
+"
+PDEPEND="!extended? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "$1" true false
+}
+
+src_prepare() {
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ local rust_stage0_name="RUST_STAGE0_${ARCH}"
+ local rust_stage0="${!rust_stage0_name}"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
+
+ default
+}
+
+src_configure() {
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ local rust_target_name="CHOST_${ARCH}"
+ local rust_target="${!rust_target_name}"
+
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ [build]
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = ["${rust_target}"]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ verbose = 2
+ extended = $(toml_usex extended)
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)"
+ docdir = "share/doc/${P}"
+ mandir = "share/${P}/man"
+ [rust]
+ optimize = $(toml_usex !debug)
+ debuginfo = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ use-jemalloc = $(toml_usex jemalloc)
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ EOF
+}
+
+src_compile() {
+ ./x.py build --verbose --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_install() {
+ env DESTDIR="${D}" ./x.py install || die
+
+ 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
+ mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
+
+ dodoc COPYRIGHT
+
+ 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
+ /usr/bin/rust-lldb
+ 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 and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${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.26.2.ebuild b/dev-lang/rust/rust-1.26.2.ebuild
new file mode 100644
index 000000000000..96aaf0b491fd
--- /dev/null
+++ b/dev-lang/rust/rust-1.26.2.ebuild
@@ -0,0 +1,232 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
+
+inherit multiprocessing multilib-build 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.xz"
+ KEYWORDS=""
+else
+ ABI_VER="$(get_version_component_range 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+CHOST_amd64=x86_64-unknown-linux-gnu
+CHOST_x86=i686-unknown-linux-gnu
+CHOST_arm64=aarch64-unknown-linux-gnu
+
+RUST_STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).0"
+RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}"
+RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}"
+RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}"
+
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2) + 1)).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
+ amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.xz )
+ x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.xz )
+ arm64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_arm64}.tar.xz )
+"
+
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC Sparc SystemZ X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="debug doc extended +jemalloc wasm ${ALL_LLVM_TARGETS[*]}"
+
+RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ jemalloc? ( dev-libs/jemalloc )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ dev-util/cmake
+"
+PDEPEND="!extended? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "$1" true false
+}
+
+src_prepare() {
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ local rust_stage0_name="RUST_STAGE0_${ARCH}"
+ local rust_stage0="${!rust_stage0_name}"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
+
+ default
+}
+
+src_configure() {
+ local rust_target="" rust_targets="" rust_target_name arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target_name="CHOST_${v##*.}"
+ rust_targets="${rust_targets},\"${!rust_target_name}\""
+ done
+ if use wasm; then
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ rust_target_name="CHOST_${ARCH}"
+ rust_target="${!rust_target_name}"
+
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ targets = "${LLVM_TARGETS// /;}"
+ [build]
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ verbose = 2
+ extended = $(toml_usex extended)
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)"
+ docdir = "share/doc/${P}"
+ mandir = "share/${P}/man"
+ [rust]
+ optimize = $(toml_usex !debug)
+ debuginfo = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ use-jemalloc = $(toml_usex jemalloc)
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ lld = $(toml_usex wasm)
+ EOF
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(get_abi_CHOST ${v##*.})
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ cat <<- EOF >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ EOF
+
+ cat <<- EOF >> "${S}"/config.toml
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ EOF
+ done
+
+ if use wasm; then
+ cat <<- EOF >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "lld"
+ EOF
+ fi
+}
+
+src_compile() {
+ env $(cat "${S}"/config.env)\
+ ./x.py build --verbose --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_install() {
+ local rust_target abi_libdir
+
+ env DESTDIR="${D}" ./x.py install || die
+
+ 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
+ mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
+
+ # Copy shared library versions of standard libraries for all targets
+ # into the system's abi-dependent lib directories because the rust
+ # installer only does so for the native ABI.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ if [ ${v##*.} = ${DEFAULT_ABI} ]; then
+ continue
+ fi
+ abi_libdir=$(get_abi_LIBDIR ${v##*.})
+ rust_target=$(get_abi_CHOST ${v##*.})
+ mkdir -p "${D}/usr/${abi_libdir}"
+ cp "${D}/usr/$(get_libdir)/rustlib/${rust_target}/lib"/*.so \
+ "${D}/usr/${abi_libdir}" || die
+ done
+
+ dodoc COPYRIGHT
+
+ # FIXME:
+ # Really not sure if that env is needed, specailly LDPATH
+ 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
+ /usr/bin/rust-lldb
+ 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 and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${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.27.1-r2.ebuild b/dev-lang/rust/rust-1.27.1-r2.ebuild
new file mode 100644
index 000000000000..1dc2182f159c
--- /dev/null
+++ b/dev-lang/rust/rust-1.27.1-r2.ebuild
@@ -0,0 +1,271 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
+
+inherit multiprocessing multilib-build python-any-r1 toolchain-funcs versionator
+
+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.xz"
+ KEYWORDS=""
+else
+ ABI_VER="$(get_version_component_range 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+CHOST_amd64=x86_64-unknown-linux-gnu
+CHOST_x86=i686-unknown-linux-gnu
+CHOST_arm64=aarch64-unknown-linux-gnu
+
+RUST_STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).2"
+RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}"
+RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}"
+RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}"
+
+# there is no cargo 0.28 tag, so use 0.27
+#CARGO_DEPEND_VERSION="0.$(($(version_get_comp 2) + 1)).0"
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2))).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
+ amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.xz )
+ x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.xz )
+ arm64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_arm64}.tar.xz )
+"
+
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC Sparc SystemZ X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="cargo debug doc +jemalloc rls rustfmt wasm ${ALL_LLVM_TARGETS[*]}"
+
+RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ jemalloc? ( dev-libs/jemalloc )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ cargo? ( !dev-util/cargo )
+ rustfmt? ( !dev-util/rustfmt )
+ dev-util/cmake
+"
+PDEPEND="!cargo? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "$1" true false
+}
+
+src_prepare() {
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ local rust_stage0_name="RUST_STAGE0_${ARCH}"
+ local rust_stage0="${!rust_stage0_name}"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
+
+ default
+}
+
+src_configure() {
+ local rust_target="" rust_targets="" rust_target_name arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target_name="CHOST_${v##*.}"
+ rust_targets="${rust_targets},\"${!rust_target_name}\""
+ done
+ if use wasm; then
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local extended="false" tools=""
+ if use cargo; then
+ extended="true"
+ tools="\"cargo\","
+ fi
+ if use rls; then
+ extended="true"
+ tools="\"rls\",$tools"
+ fi
+ if use rustfmt; then
+ extended="true"
+ tools="\"rustfmt\",$tools"
+ fi
+
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ rust_target_name="CHOST_${ARCH}"
+ rust_target="${!rust_target_name}"
+
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ targets = "${LLVM_TARGETS// /;}"
+ [build]
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ extended = ${extended}
+ tools = [${tools}]
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)"
+ docdir = "share/doc/${P}"
+ mandir = "share/${P}/man"
+ [rust]
+ optimize = $(toml_usex !debug)
+ debuginfo = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ use-jemalloc = $(toml_usex jemalloc)
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ lld = $(toml_usex wasm)
+ EOF
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(get_abi_CHOST ${v##*.})
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ cat <<- EOF >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ EOF
+
+ cat <<- EOF >> "${S}"/config.toml
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ EOF
+ done
+
+ if use wasm; then
+ cat <<- EOF >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "lld"
+ EOF
+ fi
+}
+
+src_compile() {
+ env $(cat "${S}"/config.env)\
+ ./x.py build --config="${S}"/config.toml -j$(makeopts_jobs) \
+ --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305
+}
+
+src_install() {
+ local rust_target abi_libdir
+
+ env DESTDIR="${D}" ./x.py install || die
+
+ 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
+ mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
+ if use cargo; then
+ mv "${D}/usr/bin/cargo" "${D}/usr/bin/cargo-${PV}" || die
+ fi
+ if use rls; then
+ mv "${D}/usr/bin/rls" "${D}/usr/bin/rls-${PV}" || die
+ fi
+ if use rustfmt; then
+ mv "${D}/usr/bin/rustfmt" "${D}/usr/bin/rustfmt-${PV}" || die
+ mv "${D}/usr/bin/cargo-fmt" "${D}/usr/bin/cargo-fmt-${PV}" || die
+ fi
+
+ # Copy shared library versions of standard libraries for all targets
+ # into the system's abi-dependent lib directories because the rust
+ # installer only does so for the native ABI.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ if [ ${v##*.} = ${DEFAULT_ABI} ]; then
+ continue
+ fi
+ abi_libdir=$(get_abi_LIBDIR ${v##*.})
+ rust_target=$(get_abi_CHOST ${v##*.})
+ mkdir -p "${D}/usr/${abi_libdir}"
+ cp "${D}/usr/$(get_libdir)/rustlib/${rust_target}/lib"/*.so \
+ "${D}/usr/${abi_libdir}" || die
+ done
+
+ dodoc COPYRIGHT
+
+ # FIXME:
+ # Really not sure if that env is needed, specailly LDPATH
+ 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
+ /usr/bin/rust-lldb
+ EOF
+ if use cargo; then
+ echo /usr/bin/cargo >> "${T}/provider-${P}"
+ fi
+ if use rls; then
+ echo /usr/bin/rls >> "${T}/provider-${P}"
+ fi
+ if use rustfmt; then
+ echo /usr/bin/rustfmt >> "${T}/provider-${P}"
+ echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
+ fi
+ 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 and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${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.27.1.ebuild b/dev-lang/rust/rust-1.27.1.ebuild
new file mode 100644
index 000000000000..46186c32ca15
--- /dev/null
+++ b/dev-lang/rust/rust-1.27.1.ebuild
@@ -0,0 +1,234 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{5,6} pypy )
+
+inherit multiprocessing multilib-build python-any-r1 toolchain-funcs versionator
+
+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.xz"
+ KEYWORDS=""
+else
+ ABI_VER="$(get_version_component_range 1-2)"
+ SLOT="stable/${ABI_VER}"
+ MY_P="rustc-${PV}"
+ SRC="${MY_P}-src.tar.xz"
+ KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+CHOST_amd64=x86_64-unknown-linux-gnu
+CHOST_x86=i686-unknown-linux-gnu
+CHOST_arm64=aarch64-unknown-linux-gnu
+
+RUST_STAGE0_VERSION="1.$(($(get_version_component_range 2) - 1)).2"
+RUST_STAGE0_amd64="rust-${RUST_STAGE0_VERSION}-${CHOST_amd64}"
+RUST_STAGE0_x86="rust-${RUST_STAGE0_VERSION}-${CHOST_x86}"
+RUST_STAGE0_arm64="rust-${RUST_STAGE0_VERSION}-${CHOST_arm64}"
+
+# there is no cargo 0.28 tag, so use 0.27
+#CARGO_DEPEND_VERSION="0.$(($(version_get_comp 2) + 1)).0"
+CARGO_DEPEND_VERSION="0.$(($(get_version_component_range 2))).0"
+
+DESCRIPTION="Systems programming language from Mozilla"
+HOMEPAGE="https://www.rust-lang.org/"
+
+SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz
+ amd64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_amd64}.tar.xz )
+ x86? ( https://static.rust-lang.org/dist/${RUST_STAGE0_x86}.tar.xz )
+ arm64? ( https://static.rust-lang.org/dist/${RUST_STAGE0_arm64}.tar.xz )
+"
+
+ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
+ NVPTX PowerPC Sparc SystemZ X86 XCore )
+ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
+LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?}
+
+LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
+
+IUSE="debug doc extended +jemalloc wasm ${ALL_LLVM_TARGETS[*]}"
+
+RDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425
+ jemalloc? ( dev-libs/jemalloc )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ || (
+ >=sys-devel/gcc-4.7
+ >=sys-devel/clang-3.5
+ )
+ dev-util/cmake
+"
+PDEPEND="!extended? ( >=dev-util/cargo-${CARGO_DEPEND_VERSION} )"
+
+REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
+
+S="${WORKDIR}/${MY_P}-src"
+
+toml_usex() {
+ usex "$1" true false
+}
+
+src_prepare() {
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ local rust_stage0_name="RUST_STAGE0_${ARCH}"
+ local rust_stage0="${!rust_stage0_name}"
+
+ "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig --destdir="${rust_stage0_root}" --prefix=/ || die
+
+ default
+}
+
+src_configure() {
+ local rust_target="" rust_targets="" rust_target_name arch_cflags
+
+ # Collect rust target names to compile standard libs for all ABIs.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target_name="CHOST_${v##*.}"
+ rust_targets="${rust_targets},\"${!rust_target_name}\""
+ done
+ if use wasm; then
+ rust_targets="${rust_targets},\"wasm32-unknown-unknown\""
+ fi
+ rust_targets="${rust_targets#,}"
+
+ local rust_stage0_root="${WORKDIR}"/rust-stage0
+
+ rust_target_name="CHOST_${ARCH}"
+ rust_target="${!rust_target_name}"
+
+ cat <<- EOF > "${S}"/config.toml
+ [llvm]
+ optimize = $(toml_usex !debug)
+ release-debuginfo = $(toml_usex debug)
+ assertions = $(toml_usex debug)
+ targets = "${LLVM_TARGETS// /;}"
+ [build]
+ build = "${rust_target}"
+ host = ["${rust_target}"]
+ target = [${rust_targets}]
+ cargo = "${rust_stage0_root}/bin/cargo"
+ rustc = "${rust_stage0_root}/bin/rustc"
+ docs = $(toml_usex doc)
+ submodules = false
+ python = "${EPYTHON}"
+ locked-deps = true
+ vendor = true
+ verbose = 2
+ extended = $(toml_usex extended)
+ [install]
+ prefix = "${EPREFIX}/usr"
+ libdir = "$(get_libdir)"
+ docdir = "share/doc/${P}"
+ mandir = "share/${P}/man"
+ [rust]
+ optimize = $(toml_usex !debug)
+ debuginfo = $(toml_usex debug)
+ debug-assertions = $(toml_usex debug)
+ use-jemalloc = $(toml_usex jemalloc)
+ default-linker = "$(tc-getCC)"
+ rpath = false
+ lld = $(toml_usex wasm)
+ EOF
+
+ for v in $(multilib_get_enabled_abi_pairs); do
+ rust_target=$(get_abi_CHOST ${v##*.})
+ arch_cflags="$(get_abi_CFLAGS ${v##*.})"
+
+ cat <<- EOF >> "${S}"/config.env
+ CFLAGS_${rust_target}=${arch_cflags}
+ EOF
+
+ cat <<- EOF >> "${S}"/config.toml
+ [target.${rust_target}]
+ cc = "$(tc-getBUILD_CC)"
+ cxx = "$(tc-getBUILD_CXX)"
+ linker = "$(tc-getCC)"
+ ar = "$(tc-getAR)"
+ EOF
+ done
+
+ if use wasm; then
+ cat <<- EOF >> "${S}"/config.toml
+ [target.wasm32-unknown-unknown]
+ linker = "lld"
+ EOF
+ fi
+}
+
+src_compile() {
+ env $(cat "${S}"/config.env)\
+ ./x.py build --verbose --config="${S}"/config.toml -j$(makeopts_jobs) || die
+}
+
+src_install() {
+ local rust_target abi_libdir
+
+ env DESTDIR="${D}" ./x.py install || die
+
+ 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
+ mv "${D}/usr/bin/rust-lldb" "${D}/usr/bin/rust-lldb-${PV}" || die
+
+ # Copy shared library versions of standard libraries for all targets
+ # into the system's abi-dependent lib directories because the rust
+ # installer only does so for the native ABI.
+ for v in $(multilib_get_enabled_abi_pairs); do
+ if [ ${v##*.} = ${DEFAULT_ABI} ]; then
+ continue
+ fi
+ abi_libdir=$(get_abi_LIBDIR ${v##*.})
+ rust_target=$(get_abi_CHOST ${v##*.})
+ mkdir -p "${D}/usr/${abi_libdir}"
+ cp "${D}/usr/$(get_libdir)/rustlib/${rust_target}/lib"/*.so \
+ "${D}/usr/${abi_libdir}" || die
+ done
+
+ dodoc COPYRIGHT
+
+ # FIXME:
+ # Really not sure if that env is needed, specailly LDPATH
+ 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
+ /usr/bin/rust-lldb
+ 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 and LLDB,"
+ elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${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/sassc-3.4.7 b/dev-lang/sassc-3.4.7
deleted file mode 100644
index 698a1482223e..000000000000
--- a/dev-lang/sassc-3.4.7
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=prepare
-DEPEND=>=dev-libs/libsass-3.4:= >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A libsass command line driver
-EAPI=6
-HOMEPAGE=https://github.com/sass/sassc
-KEYWORDS=amd64 x86 ~amd64-linux
-LICENSE=MIT
-RDEPEND=>=dev-libs/libsass-3.4:=
-SLOT=0
-SRC_URI=https://github.com/sass/sassc/archive/3.4.7.tar.gz -> sassc-3.4.7.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=5bfb0a6765539f9c0f940745bdfb872a
diff --git a/dev-lang/sassc-3.5.0 b/dev-lang/sassc-3.5.0
deleted file mode 100644
index f025560dc3bb..000000000000
--- a/dev-lang/sassc-3.5.0
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=prepare
-DEPEND=>=dev-libs/libsass-3.5:= >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=A libsass command line driver
-EAPI=6
-HOMEPAGE=https://github.com/sass/sassc
-KEYWORDS=~amd64 ~x86 ~amd64-linux
-LICENSE=MIT
-RDEPEND=>=dev-libs/libsass-3.5:=
-SLOT=0
-SRC_URI=https://github.com/sass/sassc/archive/3.5.0.tar.gz -> sassc-3.5.0.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=02bc332bc95244aff5c0636b5001f316
diff --git a/dev-lang/sassc-9999 b/dev-lang/sassc-9999
deleted file mode 100644
index b5e1326f9b84..000000000000
--- a/dev-lang/sassc-9999
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=prepare unpack
-DEPEND=>=dev-libs/libsass-3.5:= >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=A libsass command line driver
-EAPI=6
-HOMEPAGE=https://github.com/sass/sassc
-LICENSE=MIT
-RDEPEND=>=dev-libs/libsass-3.5:=
-SLOT=0
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 git-r3 8f6de46b0aa318aea0e8cac62ece098b libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=02bc332bc95244aff5c0636b5001f316
diff --git a/dev-lang/sassc/Manifest b/dev-lang/sassc/Manifest
new file mode 100644
index 000000000000..c4cb117c1a81
--- /dev/null
+++ b/dev-lang/sassc/Manifest
@@ -0,0 +1,6 @@
+DIST sassc-3.4.7.tar.gz 25834 BLAKE2B 7eaeed2f3e454420c82e0f0b8b3877a3256835297d33e35b34517a8981d96e708de5e94364db97ffc6b702e4c136bc37db6e6d11347388b8dbecb75373bf1593 SHA512 f515241260557f17932ed2fc205375169c40d5b83c7a24577487426e33be607a5a8a90e58512a4e6d4ed3796f391b09ef6e148f9b293a76c73cea267dcf9440b
+DIST sassc-3.5.0.tar.gz 25834 BLAKE2B 69bb085f537ca2fba70aa96326e49f756cab52a8cac631dbe0dc88459a488c65dd856deebea335d4b3539b30658b327c3d32d1e79dae1021893a0627508ceadd SHA512 9c94056f66688016dd8eaae9cc791be4b397406b89f1289946c4481b5e1904486878d22fd65e695ed89f9b41a9f902932eb4074e7b0923ce3d4823ea3140334f
+EBUILD sassc-3.4.7.ebuild 678 BLAKE2B 72fa74989e023caea6c1b800e3e139336078e1f317b78a3d2bc984083e97f490e7b9396d942da4c8f16e7e16415994b1f018f800a9512b4cc093edcd5db54f84 SHA512 470281240d1b5e69cb1f0ffa386a75be8e614389f82458ff35acc1260a6b22abe71d23347a1cc1b04581f2bb8e5935c645ac808e1e7fae21c77234080286ec26
+EBUILD sassc-3.5.0.ebuild 680 BLAKE2B ed360105f73bd870f5cde3b8df5a05a5b0cdd69909ee7621923d9930d50e797ebdca188fca46ab3fed61579fa7cc92ea12892462f3cea808613624c944ae589e SHA512 7a2f9ffa9074dbf0715cf7583e50629faf8c6ed7b43251ed0fb5b3f9d1860ea39495303bc30403aa882cf07e2fa9000945072a6ac1258ca0624261c17c9d5c9b
+EBUILD sassc-9999.ebuild 680 BLAKE2B ed360105f73bd870f5cde3b8df5a05a5b0cdd69909ee7621923d9930d50e797ebdca188fca46ab3fed61579fa7cc92ea12892462f3cea808613624c944ae589e SHA512 7a2f9ffa9074dbf0715cf7583e50629faf8c6ed7b43251ed0fb5b3f9d1860ea39495303bc30403aa882cf07e2fa9000945072a6ac1258ca0624261c17c9d5c9b
+MISC metadata.xml 558 BLAKE2B 9a9f78b0e8cae59592abf94d60a419e3e33f88669c4c15daf6a0d714f2e2fd2e671c75e6a1438909780ff98753e473a36fc46dd989df0a6be342b65fedf2e8fd SHA512 1773373127612aea252592885f6d9f9625d354681a6fde25bab76ee39bd1d6a65dccae87edaf55fe59a1b6d4bd7320d4fa80246a91c475af337eb69ea518f372
diff --git a/dev-lang/sassc/metadata.xml b/dev-lang/sassc/metadata.xml
new file mode 100644
index 000000000000..30acfb66daa1
--- /dev/null
+++ b/dev-lang/sassc/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>tetromino@gentoo.org</email>
+ <name>Alexandre Rostovtsev</name>
+</maintainer>
+<longdescription lang="en">
+ SassC is a wrapper around libsass (http://github.com/sass/libsass)
+ used to generate a useful command-line application that can be
+ installed and packaged for several operating systems.
+</longdescription>
+<upstream>
+ <remote-id type="github">sass/sassc</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/dev-lang/sassc/sassc-3.4.7.ebuild b/dev-lang/sassc/sassc-3.4.7.ebuild
new file mode 100644
index 000000000000..7170b6df3400
--- /dev/null
+++ b/dev-lang/sassc/sassc-3.4.7.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+if [[ ${PV} = *9999 ]]; then
+ EGIT_REPO_URI="https://github.com/sass/sassc.git"
+ inherit git-r3
+ KEYWORDS=
+else
+ SRC_URI="https://github.com/sass/sassc/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="amd64 x86 ~amd64-linux"
+fi
+
+DESCRIPTION="A libsass command line driver"
+HOMEPAGE="https://github.com/sass/sassc"
+LICENSE="MIT"
+SLOT="0"
+IUSE=""
+
+RDEPEND=">=dev-libs/libsass-3.4:="
+DEPEND="${RDEPEND}"
+
+DOCS=( Readme.md )
+
+src_prepare() {
+ default
+
+ if [[ ${PV} != *9999 ]]; then
+ [[ -f VERSION ]] || echo "${PV}" > VERSION
+ fi
+
+ eautoreconf
+}
diff --git a/dev-lang/sassc/sassc-3.5.0.ebuild b/dev-lang/sassc/sassc-3.5.0.ebuild
new file mode 100644
index 000000000000..847d2e349e3a
--- /dev/null
+++ b/dev-lang/sassc/sassc-3.5.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+if [[ ${PV} = *9999 ]]; then
+ EGIT_REPO_URI="https://github.com/sass/sassc.git"
+ inherit git-r3
+ KEYWORDS=
+else
+ SRC_URI="https://github.com/sass/sassc/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86 ~amd64-linux"
+fi
+
+DESCRIPTION="A libsass command line driver"
+HOMEPAGE="https://github.com/sass/sassc"
+LICENSE="MIT"
+SLOT="0"
+IUSE=""
+
+RDEPEND=">=dev-libs/libsass-3.5:="
+DEPEND="${RDEPEND}"
+
+DOCS=( Readme.md )
+
+src_prepare() {
+ default
+
+ if [[ ${PV} != *9999 ]]; then
+ [[ -f VERSION ]] || echo "${PV}" > VERSION
+ fi
+
+ eautoreconf
+}
diff --git a/dev-lang/sassc/sassc-9999.ebuild b/dev-lang/sassc/sassc-9999.ebuild
new file mode 100644
index 000000000000..847d2e349e3a
--- /dev/null
+++ b/dev-lang/sassc/sassc-9999.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+if [[ ${PV} = *9999 ]]; then
+ EGIT_REPO_URI="https://github.com/sass/sassc.git"
+ inherit git-r3
+ KEYWORDS=
+else
+ SRC_URI="https://github.com/sass/sassc/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86 ~amd64-linux"
+fi
+
+DESCRIPTION="A libsass command line driver"
+HOMEPAGE="https://github.com/sass/sassc"
+LICENSE="MIT"
+SLOT="0"
+IUSE=""
+
+RDEPEND=">=dev-libs/libsass-3.5:="
+DEPEND="${RDEPEND}"
+
+DOCS=( Readme.md )
+
+src_prepare() {
+ default
+
+ if [[ ${PV} != *9999 ]]; then
+ [[ -f VERSION ]] || echo "${PV}" > VERSION
+ fi
+
+ eautoreconf
+}
diff --git a/dev-lang/scala-2.11.1-r2 b/dev-lang/scala-2.11.1-r2
deleted file mode 100644
index f33bf3742e7e..000000000000
--- a/dev-lang/scala-2.11.1-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 !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 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=The Scala Programming Language
-EAPI=5
-HOMEPAGE=http://www.scala-lang.org/
-IUSE=binary emacs elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos
-LICENSE=BSD
-PDEPEND=emacs? ( app-emacs/scala-mode:0 )
-RDEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 >=virtual/jre-1.7 app-eselect/eselect-scala !dev-lang/scala-bin:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=2.11/2.11.1
-SRC_URI=!binary? ( https://github.com/scala/scala/archive/v2.11.1.tar.gz -> scala-2.11.1.tar.gz http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> scala-2.11.1-ant-contrib.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> scala-2.11.1-ant-dotnet-1.0.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> scala-2.11.1-ant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> scala-2.11.1-maven-ant-tasks-2.1.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> scala-2.11.1-vizant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> scala-2.11.1-forkjoin.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> scala-2.11.1-jsr166_and_extra.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> scala-2.11.1-code.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> scala-2.11.1-annotations.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> scala-2.11.1-enums.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> scala-2.11.1-genericNest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> scala-2.11.1-jsoup-1.3.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> scala-2.11.1-macro210.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> scala-2.11.1-methvsfield.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> scala-2.11.1-nest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> scala-2.11.1-instrumented.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> scala-2.11.1-push.jar https://dev.gentoo.org/~gienah/snapshots/scala-2.11.1-maven-deps.tar.gz ) binary? ( https://dev.gentoo.org/~gienah/files/dist/scala-2.11.1-gentoo-binary.tar.bz2 )
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=cff555445443e9f1daedbd94b2b9569b
diff --git a/dev-lang/scala-2.11.11 b/dev-lang/scala-2.11.11
deleted file mode 100644
index b65939778fae..000000000000
--- a/dev-lang/scala-2.11.11
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 !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 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=The Scala Programming Language
-EAPI=5
-HOMEPAGE=http://www.scala-lang.org/
-IUSE=binary emacs elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=amd64 x86 ~amd64-linux ~x86-linux ~x86-macos
-LICENSE=BSD
-PDEPEND=emacs? ( app-emacs/scala-mode:0 )
-RDEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 >=virtual/jre-1.7 app-eselect/eselect-scala !dev-lang/scala-bin:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=2.11/2.11.11
-SRC_URI=!binary? ( https://github.com/scala/scala/archive/v2.11.11.tar.gz -> scala-2.11.11.tar.gz http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> scala-2.11.11-ant-contrib.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> scala-2.11.11-ant-dotnet-1.0.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> scala-2.11.11-ant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> scala-2.11.11-maven-ant-tasks-2.1.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> scala-2.11.11-vizant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> scala-2.11.11-forkjoin.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> scala-2.11.11-jsr166_and_extra.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> scala-2.11.11-code.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> scala-2.11.11-annotations.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> scala-2.11.11-enums.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> scala-2.11.11-genericNest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> scala-2.11.11-jsoup-1.3.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> scala-2.11.11-macro210.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> scala-2.11.11-methvsfield.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> scala-2.11.11-nest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> scala-2.11.11-instrumented.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> scala-2.11.11-push.jar https://dev.gentoo.org/~patrick/scala-2.11.11-maven-deps.tar.gz ) binary? ( https://dev.gentoo.org/~patrick/scala-2.11.11-gentoo-binary.tar.bz2 )
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=0d0d3b88ee93b02688f9ab306cd0390a
diff --git a/dev-lang/scala-2.11.2-r2 b/dev-lang/scala-2.11.2-r2
deleted file mode 100644
index 0505d227ab4d..000000000000
--- a/dev-lang/scala-2.11.2-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 !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 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=The Scala Programming Language
-EAPI=5
-HOMEPAGE=http://www.scala-lang.org/
-IUSE=binary emacs elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos
-LICENSE=BSD
-PDEPEND=emacs? ( app-emacs/scala-mode:0 )
-RDEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 >=virtual/jre-1.7 app-eselect/eselect-scala !dev-lang/scala-bin:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=2.11/2.11.2
-SRC_URI=!binary? ( https://github.com/scala/scala/archive/v2.11.2.tar.gz -> scala-2.11.2.tar.gz http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> scala-2.11.2-ant-contrib.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> scala-2.11.2-ant-dotnet-1.0.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> scala-2.11.2-ant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> scala-2.11.2-maven-ant-tasks-2.1.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> scala-2.11.2-vizant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> scala-2.11.2-forkjoin.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> scala-2.11.2-jsr166_and_extra.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> scala-2.11.2-code.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> scala-2.11.2-annotations.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> scala-2.11.2-enums.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> scala-2.11.2-genericNest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> scala-2.11.2-jsoup-1.3.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> scala-2.11.2-macro210.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> scala-2.11.2-methvsfield.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> scala-2.11.2-nest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> scala-2.11.2-instrumented.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> scala-2.11.2-push.jar https://dev.gentoo.org/~gienah/snapshots/scala-2.11.2-maven-deps.tar.gz ) binary? ( https://dev.gentoo.org/~gienah/files/dist/scala-2.11.2-gentoo-binary.tar.bz2 )
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=6bab3bf7d020e5f806ba52cfb29ba28c
diff --git a/dev-lang/scala-2.11.4-r1 b/dev-lang/scala-2.11.4-r1
deleted file mode 100644
index 8ff556b255dc..000000000000
--- a/dev-lang/scala-2.11.4-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 !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 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=The Scala Programming Language
-EAPI=5
-HOMEPAGE=http://www.scala-lang.org/
-IUSE=binary emacs elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=amd64 x86 ~amd64-linux ~x86-linux ~x86-macos
-LICENSE=BSD
-PDEPEND=emacs? ( app-emacs/scala-mode:0 )
-RDEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 >=virtual/jre-1.6 app-eselect/eselect-scala !dev-lang/scala-bin:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=2.11/2.11.4
-SRC_URI=!binary? ( https://github.com/scala/scala/archive/v2.11.4.tar.gz -> scala-2.11.4.tar.gz http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> scala-2.11.4-ant-contrib.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> scala-2.11.4-ant-dotnet-1.0.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> scala-2.11.4-ant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> scala-2.11.4-maven-ant-tasks-2.1.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> scala-2.11.4-vizant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> scala-2.11.4-forkjoin.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> scala-2.11.4-jsr166_and_extra.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> scala-2.11.4-code.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> scala-2.11.4-annotations.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> scala-2.11.4-enums.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> scala-2.11.4-genericNest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> scala-2.11.4-jsoup-1.3.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> scala-2.11.4-macro210.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> scala-2.11.4-methvsfield.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> scala-2.11.4-nest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> scala-2.11.4-instrumented.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> scala-2.11.4-push.jar https://dev.gentoo.org/~gienah/snapshots/scala-2.11.4-maven-deps.tar.gz ) binary? ( https://dev.gentoo.org/~gienah/files/dist/scala-2.11.4-gentoo-binary.tar.bz2 )
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=37983c6b8bcac8d3bdd92b678e064cee
diff --git a/dev-lang/scala-2.11.4-r2 b/dev-lang/scala-2.11.4-r2
deleted file mode 100644
index 563f1e04dc67..000000000000
--- a/dev-lang/scala-2.11.4-r2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 !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 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=The Scala Programming Language
-EAPI=5
-HOMEPAGE=http://www.scala-lang.org/
-IUSE=binary emacs elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos
-LICENSE=BSD
-PDEPEND=emacs? ( app-emacs/scala-mode:0 )
-RDEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 >=virtual/jre-1.7 app-eselect/eselect-scala !dev-lang/scala-bin:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=2.11/2.11.4
-SRC_URI=!binary? ( https://github.com/scala/scala/archive/v2.11.4.tar.gz -> scala-2.11.4.tar.gz http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> scala-2.11.4-ant-contrib.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> scala-2.11.4-ant-dotnet-1.0.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> scala-2.11.4-ant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> scala-2.11.4-maven-ant-tasks-2.1.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> scala-2.11.4-vizant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> scala-2.11.4-forkjoin.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> scala-2.11.4-jsr166_and_extra.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> scala-2.11.4-code.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> scala-2.11.4-annotations.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> scala-2.11.4-enums.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> scala-2.11.4-genericNest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> scala-2.11.4-jsoup-1.3.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> scala-2.11.4-macro210.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> scala-2.11.4-methvsfield.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> scala-2.11.4-nest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> scala-2.11.4-instrumented.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> scala-2.11.4-push.jar https://dev.gentoo.org/~gienah/snapshots/scala-2.11.4-maven-deps.tar.gz ) binary? ( https://dev.gentoo.org/~gienah/files/dist/scala-2.11.4-gentoo-binary.tar.bz2 )
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=779ff81ad4050d520bfb977dc1f913d5
diff --git a/dev-lang/scala-2.11.6-r1 b/dev-lang/scala-2.11.6-r1
deleted file mode 100644
index cd35a4c1f703..000000000000
--- a/dev-lang/scala-2.11.6-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 !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 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=The Scala Programming Language
-EAPI=5
-HOMEPAGE=http://www.scala-lang.org/
-IUSE=binary emacs elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos
-LICENSE=BSD
-PDEPEND=emacs? ( app-emacs/scala-mode:0 )
-RDEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 >=virtual/jre-1.7 app-eselect/eselect-scala !dev-lang/scala-bin:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=2.11/2.11.6
-SRC_URI=!binary? ( https://github.com/scala/scala/archive/v2.11.6.tar.gz -> scala-2.11.6.tar.gz http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> scala-2.11.6-ant-contrib.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> scala-2.11.6-ant-dotnet-1.0.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> scala-2.11.6-ant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> scala-2.11.6-maven-ant-tasks-2.1.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> scala-2.11.6-vizant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> scala-2.11.6-forkjoin.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> scala-2.11.6-jsr166_and_extra.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> scala-2.11.6-code.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> scala-2.11.6-annotations.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> scala-2.11.6-enums.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> scala-2.11.6-genericNest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> scala-2.11.6-jsoup-1.3.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> scala-2.11.6-macro210.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> scala-2.11.6-methvsfield.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> scala-2.11.6-nest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> scala-2.11.6-instrumented.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> scala-2.11.6-push.jar https://dev.gentoo.org/~gienah/snapshots/scala-2.11.6-maven-deps.tar.gz ) binary? ( https://dev.gentoo.org/~gienah/files/dist/scala-2.11.6-gentoo-binary.tar.bz2 )
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=cc0683835f63c653dd654e9f8fe0dd98
diff --git a/dev-lang/scala-2.11.7-r1 b/dev-lang/scala-2.11.7-r1
deleted file mode 100644
index 9f0eba771a93..000000000000
--- a/dev-lang/scala-2.11.7-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 !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 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=The Scala Programming Language
-EAPI=5
-HOMEPAGE=http://www.scala-lang.org/
-IUSE=binary emacs elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos
-LICENSE=BSD
-PDEPEND=emacs? ( app-emacs/scala-mode:0 )
-RDEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 >=virtual/jre-1.7 app-eselect/eselect-scala !dev-lang/scala-bin:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=2.11/2.11.7
-SRC_URI=!binary? ( https://github.com/scala/scala/archive/v2.11.7.tar.gz -> scala-2.11.7.tar.gz http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> scala-2.11.7-ant-contrib.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> scala-2.11.7-ant-dotnet-1.0.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> scala-2.11.7-ant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> scala-2.11.7-maven-ant-tasks-2.1.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> scala-2.11.7-vizant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> scala-2.11.7-forkjoin.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> scala-2.11.7-jsr166_and_extra.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> scala-2.11.7-code.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> scala-2.11.7-annotations.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> scala-2.11.7-enums.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> scala-2.11.7-genericNest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> scala-2.11.7-jsoup-1.3.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> scala-2.11.7-macro210.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> scala-2.11.7-methvsfield.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> scala-2.11.7-nest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> scala-2.11.7-instrumented.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> scala-2.11.7-push.jar https://dev.gentoo.org/~gienah/snapshots/scala-2.11.7-maven-deps.tar.gz ) binary? ( https://dev.gentoo.org/~gienah/files/dist/scala-2.11.7-gentoo-binary.tar.bz2 )
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=e0296ad0f5a44eb565b80ace55d8b2c1
diff --git a/dev-lang/scala-2.11.8 b/dev-lang/scala-2.11.8
deleted file mode 100644
index 27975d961e1c..000000000000
--- a/dev-lang/scala-2.11.8
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare pretend setup test unpack
-DEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 !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 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip ) >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=The Scala Programming Language
-EAPI=5
-HOMEPAGE=http://www.scala-lang.org/
-IUSE=binary emacs elibc_FreeBSD doc source elibc_FreeBSD
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos
-LICENSE=BSD
-PDEPEND=emacs? ( app-emacs/scala-mode:0 )
-RDEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 >=virtual/jre-1.7 app-eselect/eselect-scala !dev-lang/scala-bin:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=2.11/2.11.8
-SRC_URI=!binary? ( https://github.com/scala/scala/archive/v2.11.8.tar.gz -> scala-2.11.8.tar.gz http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> scala-2.11.8-ant-contrib.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> scala-2.11.8-ant-dotnet-1.0.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> scala-2.11.8-ant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> scala-2.11.8-maven-ant-tasks-2.1.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> scala-2.11.8-vizant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar -> scala-2.11.8-forkjoin.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/0392ecdeb306263c471ce51fa368223388b82b61/test/benchmarks/lib/jsr166_and_extra.jar -> scala-2.11.8-jsr166_and_extra.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> scala-2.11.8-code.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> scala-2.11.8-annotations.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> scala-2.11.8-enums.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> scala-2.11.8-genericNest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> scala-2.11.8-jsoup-1.3.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> scala-2.11.8-macro210.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> scala-2.11.8-methvsfield.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> scala-2.11.8-nest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> scala-2.11.8-instrumented.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar -> scala-2.11.8-push.jar https://dev.gentoo.org/~gienah/snapshots/scala-2.11.8-maven-deps.tar.gz ) binary? ( https://dev.gentoo.org/~gienah/files/dist/scala-2.11.8-gentoo-binary.tar.bz2 )
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=460b6b491d0868907f4245088f37fc33
diff --git a/dev-lang/scala-2.12.1 b/dev-lang/scala-2.12.1
deleted file mode 100644
index 983973768fc2..000000000000
--- a/dev-lang/scala-2.12.1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install preinst prepare pretend setup test unpack
-DEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 !binary? ( =virtual/jdk-1.8* >=dev-java/sbt-0.13.13 media-gfx/graphviz ) binary? ( >=virtual/jdk-1.8 ) app-arch/xz-utils:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-DESCRIPTION=The Scala Programming Language
-EAPI=6
-HOMEPAGE=http://www.scala-lang.org/
-IUSE=binary emacs elibc_FreeBSD doc source
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos
-LICENSE=BSD
-PDEPEND=emacs? ( app-emacs/scala-mode:0 )
-RDEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 >=virtual/jre-1.8 app-eselect/eselect-scala !dev-lang/scala-bin:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=2.12/2.12.1
-SRC_URI=!binary? ( https://github.com/scala/scala/archive/v2.12.1.tar.gz -> scala-2.12.1.tar.gz https://dev.gentoo.org/~gienah/snapshots/scala-2.12.1-ivy2-deps.tar.xz https://dev.gentoo.org/~gienah/snapshots/scala-2.12.1-sbt-deps.tar.xz http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> scala-2.12.1-ant-contrib.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> scala-2.12.1-ant-dotnet-1.0.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> scala-2.12.1-ant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> scala-2.12.1-maven-ant-tasks-2.1.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> scala-2.12.1-vizant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> scala-2.12.1-code.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> scala-2.12.1-annotations.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> scala-2.12.1-enums.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> scala-2.12.1-genericNest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> scala-2.12.1-jsoup-1.3.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> scala-2.12.1-macro210.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> scala-2.12.1-methvsfield.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> scala-2.12.1-nest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> scala-2.12.1-instrumented.jar ) binary? ( https://dev.gentoo.org/~gienah/files/dist/scala-2.12.1-gentoo-binary.tar.xz )
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c0f5dc8eca930f0aca714a2552d2bbb4
diff --git a/dev-lang/scala-2.12.2 b/dev-lang/scala-2.12.2
deleted file mode 100644
index 05e8cb665029..000000000000
--- a/dev-lang/scala-2.12.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install preinst prepare pretend setup test unpack
-DEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 !binary? ( =virtual/jdk-1.8* >=dev-java/sbt-0.13.13 media-gfx/graphviz ) binary? ( >=virtual/jdk-1.8 ) app-arch/xz-utils:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-DESCRIPTION=The Scala Programming Language
-EAPI=6
-HOMEPAGE=http://www.scala-lang.org/
-IUSE=binary emacs elibc_FreeBSD doc source
-KEYWORDS=~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos
-LICENSE=BSD
-PDEPEND=emacs? ( app-emacs/scala-mode:0 )
-RDEPEND=dev-java/ant-core:0 dev-java/hawtjni-runtime:0 >=virtual/jre-1.8 app-eselect/eselect-scala !dev-lang/scala-bin:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=2.12/2.12.2
-SRC_URI=!binary? ( https://github.com/scala/scala/archive/v2.12.2.tar.gz -> scala-2.12.2.tar.gz https://dev.gentoo.org/~gienah/snapshots/scala-2.12.2-ivy2-deps.tar.xz https://dev.gentoo.org/~gienah/snapshots/scala-2.12.2-sbt-deps.tar.xz http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> scala-2.12.2-ant-contrib.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> scala-2.12.2-ant-dotnet-1.0.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> scala-2.12.2-ant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> scala-2.12.2-maven-ant-tasks-2.1.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> scala-2.12.2-vizant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> scala-2.12.2-code.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> scala-2.12.2-annotations.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> scala-2.12.2-enums.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> scala-2.12.2-genericNest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> scala-2.12.2-jsoup-1.3.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> scala-2.12.2-macro210.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> scala-2.12.2-methvsfield.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> scala-2.12.2-nest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> scala-2.12.2-instrumented.jar ) binary? ( https://dev.gentoo.org/~gienah/files/dist/scala-2.12.2-gentoo-binary.tar.xz )
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=4be6ac950b154d0d12dad78bf8ee56b1
diff --git a/dev-lang/scala-2.12.4 b/dev-lang/scala-2.12.4
deleted file mode 100644
index bb7401ce285a..000000000000
--- a/dev-lang/scala-2.12.4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile install preinst prepare pretend setup test unpack
-DEPEND=dev-java/ant-core:0 dev-java/jline:2 !binary? ( =virtual/jdk-1.8* >=dev-java/sbt-0.13.13 media-gfx/graphviz ) binary? ( >=virtual/jdk-1.8 ) app-arch/xz-utils:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-DESCRIPTION=The Scala Programming Language
-EAPI=6
-HOMEPAGE=http://www.scala-lang.org/
-IUSE=binary emacs elibc_FreeBSD doc source
-KEYWORDS=amd64 x86 ~amd64-linux ~x86-linux ~x86-macos
-LICENSE=BSD
-PDEPEND=emacs? ( app-emacs/scala-mode:0 )
-RDEPEND=dev-java/ant-core:0 dev-java/jline:2 >=virtual/jre-1.8 app-eselect/eselect-scala !dev-lang/scala-bin:0 >=dev-java/java-config-2.2.0-r3 source? ( app-arch/zip )
-SLOT=2.12/2.12.4
-SRC_URI=!binary? ( https://github.com/scala/scala/archive/v2.12.4.tar.gz -> scala-2.12.4.tar.gz https://dev.gentoo.org/~gienah/snapshots/scala-2.12.4-ivy2-deps.tar.xz https://dev.gentoo.org/~gienah/snapshots/scala-2.12.4-sbt-deps.tar.xz http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar -> scala-2.12.4-ant-contrib.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar -> scala-2.12.4-ant-dotnet-1.0.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar -> scala-2.12.4-ant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar -> scala-2.12.4-maven-ant-tasks-2.1.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar -> scala-2.12.4-vizant.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar -> scala-2.12.4-code.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar -> scala-2.12.4-annotations.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar -> scala-2.12.4-enums.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar -> scala-2.12.4-genericNest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/346d3dff4088839d6b4d163efa2892124039d216/test/files/lib/jsoup-1.3.1.jar -> scala-2.12.4-jsoup-1.3.1.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/3794ec22d9b27f2b179bd34e9b46db771b934ec3/test/files/lib/macro210.jar -> scala-2.12.4-macro210.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar -> scala-2.12.4-methvsfield.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar -> scala-2.12.4-nest.jar http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar -> scala-2.12.4-instrumented.jar ) binary? ( https://dev.gentoo.org/~gienah/files/dist/scala-2.12.4-gentoo-binary.tar.xz )
-_eclasses_=check-reqs fd05cf75484aa28d307cf4ee6e1db056 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=447c81773bd0dd28ad1bd786c5cee2f2
diff --git a/dev-lang/scala-bin-2.11.8 b/dev-lang/scala-bin-2.11.8
deleted file mode 100644
index 467883062eee..000000000000
--- a/dev-lang/scala-bin-2.11.8
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install preinst prepare setup
-DEPEND=>=dev-java/java-config-2.2.0-r3
-DESCRIPTION=The Scala Programming Language
-EAPI=6
-HOMEPAGE=http://scala.epfl.ch/
-IUSE=doc elibc_FreeBSD doc
-KEYWORDS=amd64 x86
-LICENSE=BSD
-RDEPEND=>=virtual/jre-1.6 !dev-lang/scala >=dev-java/java-config-2.2.0-r3
-SLOT=0
-SRC_URI=http://downloads.lightbend.com/scala/2.11.8/scala-2.11.8.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=ed462458da5d044332cdcbcb052fd69f
diff --git a/dev-lang/scala-bin-2.12.4 b/dev-lang/scala-bin-2.12.4
deleted file mode 100644
index 7131fdc0d451..000000000000
--- a/dev-lang/scala-bin-2.12.4
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install preinst prepare setup
-DEPEND=>=dev-java/java-config-2.2.0-r3
-DESCRIPTION=The Scala Programming Language
-EAPI=6
-HOMEPAGE=http://scala.epfl.ch/
-IUSE=doc elibc_FreeBSD doc
-KEYWORDS=amd64 x86
-LICENSE=BSD
-RDEPEND=>=virtual/jre-1.6 !dev-lang/scala >=dev-java/java-config-2.2.0-r3
-SLOT=0
-SRC_URI=http://downloads.lightbend.com/scala/2.12.4/scala-2.12.4.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c750fb953a193e580ca745c03376c03c
diff --git a/dev-lang/scala-bin/Manifest b/dev-lang/scala-bin/Manifest
new file mode 100644
index 000000000000..a28b992dc618
--- /dev/null
+++ b/dev-lang/scala-bin/Manifest
@@ -0,0 +1,5 @@
+DIST scala-2.11.8.tgz 28678231 BLAKE2B 3e75e941112afb094e99be76fa7d039b27a32b1cedd645bad43b776ee9136f6ac3951eabe7c7182280f442050a3c7c658d49906b42004965128dd048d2ad73d2 SHA512 c00a0eaa4317c3ffbdbbd9c817f06c5262f0549f22bd7f1886cc22643e34e8909648bbfb58f3a63c453baf045381a52128ff0b18b7a39274ef03aad7daea9fdf
+DIST scala-2.12.4.tgz 19741785 BLAKE2B e782a4ac000ffcebc2faaac077cbb3cc13f8cc56deb9b3a78f1bddd3d0e6fd282d70f10cfef0780e4ab6a13e8d51b0401f84829b7974bd8823aecab54476ab02 SHA512 e6a9e11974d3bacc5f5dcdfdb379bdd1b430b1682141bed688f02f8b49395aff7c55cdb8da3319dff55da7bd7cfe7545e9b26db9558316ac8b3e29f6bb2c6d74
+EBUILD scala-bin-2.11.8.ebuild 1865 BLAKE2B e089d8a18f217868eb2c063ff237a6eb80aa32f13a5f919248451a02af617c32acdc6468f5f8d7147c0c61477c678d93dd2348a6cc1cdcc8553cb46a2efcdd90 SHA512 84067265c0ae7f7b7edb92994f56b0e25bc889d5f44ec00dab32497d34a84707cce6a46685c46613cc872748080ee782b139258caf3f1ab5c8463c64fbfa81eb
+EBUILD scala-bin-2.12.4.ebuild 1482 BLAKE2B 1f08b7ae9966682e14958090b42f5b45efcf1e80593fdc31aaeda09a100b46041a5b2a5d601feb52a829188ada9eef20038207fb028c8ab61adb7a51988bbbad SHA512 95bdf1e5108e90739d464d26c45b3c3a6c8949bbe8c8ae82afef56c583b4ef3e65571d798ca6786bea05ee45d8932471e1789cd4df5cbaa420fafbe8be1a9c37
+MISC metadata.xml 317 BLAKE2B 47b0d918ff9d4f2287fc0c43a022b978a816aa0d96362cf449210cd6b13810ed1352dbe69c5bea8281cdd3f3d03f4dcf714589e414b27abd5cd8c648e3d64994 SHA512 506fab7ebaa9e1caf96f239d6d85978171b98282ebe22a4948f61df62ce05a4c22772d81159cec9a99dd9a127b602e7593615204142e295d88835f9385a64bc8
diff --git a/dev-lang/scala-bin/metadata.xml b/dev-lang/scala-bin/metadata.xml
new file mode 100644
index 000000000000..4422c51f84a2
--- /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..83f4905b76f4
--- /dev/null
+++ b/dev-lang/scala-bin/scala-bin-2.11.8.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2017 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-bin/scala-bin-2.12.4.ebuild b/dev-lang/scala-bin/scala-bin-2.12.4.ebuild
new file mode 100644
index 000000000000..a434c4ee6280
--- /dev/null
+++ b/dev-lang/scala-bin/scala-bin-2.12.4.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2018 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 jline-*.jar jline.jar
+ java-pkg_newjar scalap-*.jar scalap.jar
+ java-pkg_newjar scala-parser-combinators_*.jar scala-parser-combinators.jar
+ java-pkg_newjar scala-swing_*.jar scala-swing.jar
+ java-pkg_newjar scala-xml_*.jar scala-xml.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..e843c8694d0e
--- /dev/null
+++ b/dev-lang/scala/Manifest
@@ -0,0 +1,216 @@
+AUX scala-2.11.1-no-git.patch 721 BLAKE2B 9ed25bbd69c61b23c33fe0b3e9f5c3cff5c517b98c8026784dd4d0a56e74e7696a5d85b939f8fa6b56771173ea3ba0a9972ce48aff19a9861f089fecba054b62 SHA512 c2b7d5e9370c49fcd501e851c805e53bdb11eb14918070a8bfe47bc4d6b5335ad4a280ac2a7e752b645c740cd5a2e351471c94097c6d0761c019a2286c85239d
+AUX scala-2.11.2-no-git.patch 721 BLAKE2B 86cb56ed4662d3ac28d5e584c6d2143e2f36857d688d64bfc894f7a15fffcecbb02d03b0fa4573d0f335184af2ae6f8bc7a839497b2e73c387a8f387c93cb422 SHA512 9a8de823d17708b6b18dae554ed35f9e5d432c4a40287d7fb20d697dfea1ce740423e9f10e7e44fd9d2050b15ce6341e46ec91f14298c76bd0b9ccf754d7d5f1
+AUX scala-2.11.4-no-git.patch 721 BLAKE2B ffd5d5feb79f6af2348ec738ffdf0a2902d54de80c2c09a2c55f4f340a0957034e59027a9c219288a07185f89597483e7b66d43c5cd398832307eb91726187e3 SHA512 e1f3559248499b1a8568e459fbe29044e45f90e41bbd3ae94de1724f37a0c5de83728df02e7e2ed3fe1ddfe90683d5a74e67ede437a6c5c018da5b7a2d59df45
+AUX scala-2.11.6-no-git.patch 721 BLAKE2B b010dde23ac9bb2512eec5e0c12d974f5ec1897fcd59d1ec7bbb2e41cff8e74721122c58787146f9c8a839e42cda5bf81275e5fcc8c765a1bff92ac18332ca56 SHA512 eadb85fac3dfc43a70d12b07578a2911b1c50f9471aac0f04dce2b17ba7a4bbbb5d70af05e91a8b8dadb864db8dfe5e275ccf474060b73da49fbb54ca3e7e54d
+AUX scala-2.11.7-no-git.patch 721 BLAKE2B 39cef4d438c4a923a8cc8f2c5795b16ac63b4bb652f19f96287100e45398fb6bfcd5a3c143b990d2470372128aa114ec1d9f906b9b1c14a33bf2cdc304ac354f SHA512 e288f94757f4e3659d7de0c0363b45317ce652942798f7910c8971c01fc87dbb340b134c7660577e769d265c592cc87b1ec7ff113fc94b2167b5cdac8f9e7eaf
+AUX scala-2.11.8-no-git.patch 721 BLAKE2B 08659390afe4abd6b78fe2b43a7ec29f5867b7282ed72d6f89d6366c4b11d08a82b45c57eb1f3320c7036bf8bdaef4f3fdfd1dc1b92a9f591ac26cca4b783ef0 SHA512 956e141cc9f6691f091a06b0f75a644177f502d7e20a1c74bff5b0a5363b5505d14e308075aa9282b39cbec497f8b8783c8488c54162286e0a708ad62fe9ae8b
+AUX scala-2.12.1-no-git.patch 1028 BLAKE2B 6f6977691f0820a9b0a896511d215fa9dabaed7ea1e43d1bc40d0e8465bc18fe62bebc76f7e49500863be4684d603ee94341104eb45229d92f99057dc4b56935 SHA512 74c81c608b0c5635380424f8380e456027bc14b862a9f9578f837cc7ebc76e17713b669435fc5cf5441f3483469814d147c988ce4b65594c026adf598e99ca83
+AUX scala-2.12.1-runner-script.patch 1268 BLAKE2B 26c7f74fea756f8f9cea7082c72f131669b97d4448b6eae6877e6cd081aaa361d81be7c198587482e2ce18dbce7e1b0e90868ab750403e4033cbfe385d05c7a6 SHA512 7c8f8ce3d90051832a7bf6b58fc95c3f4a3df946187c98a083853c968fb07db8ff6ac2d60647a91db4895f6e5375c42dbdc9e14e71b316a2f1a7d8c61d8a1a5d
+AUX scala-2.12.2-no-git.patch 960 BLAKE2B d3c1456a561e215f075ad28d09273442cd60969494a3248fed275ad2098f0bcf9ea13b3fc3962e7b3f554b28febfbbc28a8e288d18ac51665015959668ebe542 SHA512 e92af8e687d7b924673b64a05c18fa955b612b4117f0b6cd379f22954e182e8e575018cd4b5cdea62971dba8aee4dc241e111dfade66c6544d07f057747f7047
+AUX scala-2.12.4-no-git.patch 1453 BLAKE2B 6d77493326398d00c103e6342ff4765f9a2f3b270a819d651ca4435ed473416b3882f6a98707c181131ea539d7a034a862bd1768cff1eab44d12a23899f5ef67 SHA512 48e12f3a6cc6ee65f9ea7afbd403d67e7bc642e242677d38f4a87f74f90b3feb5efe8fd6798bc36d0f209b27f323e854173cfa104dd149e24dd1809f64f61475
+DIST scala-2.11.1-annotations.jar 2242 BLAKE2B 0c731c25eaa407bdfb51d749f688062a33bd7f2815e8303ba5c56532027350f58d5ab364f2428547c2a99e2032ba0d0d20d4d50cc27dc5c42946e7842111547d SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd
+DIST scala-2.11.1-ant-contrib.jar 224277 BLAKE2B f43bfe3da05decbcf4ec9d2f48bface141907abfbe5b17532e970dbb660e0e1ffae9807c12da38cd6dc8e57c2605c6ec86ad11a99331e73edd3e4418656ab27e SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83
+DIST scala-2.11.1-ant-dotnet-1.0.jar 57795 BLAKE2B 1f04f20739a231816a6d9c81ac0ba23f155ebdb467f466640b18ba2b4f125a6171bcf420c42f71fcfa2c13293a5241e200d0d908bd460ca3ae0342b13747aaad SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867
+DIST scala-2.11.1-ant.jar 1506140 BLAKE2B 790d0f38316e0772b2f315220bbf70328e1e136bccb99bd2f2b2986b33aed60da5ca699c11eeaf653c64f4d07505e168442eea0711b6c627ee97b661d3933584 SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c
+DIST scala-2.11.1-code.jar 683 BLAKE2B b19a34aacc82dcc6bf4efb5556896521ce606cbd72a36ca5c2a019d3aec294172b13968e506373afdd1328668190f60ed337431def7744269cef024e5f82825a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767
+DIST scala-2.11.1-enums.jar 1372 BLAKE2B d3fc4941297344cd42c515ac6564092be7f80676aaf83029ebbcabbcce5ccfb71c008cc56a6fadadb0869d7f53e49a1f85c42e74c7b688acf43f677aa566dd82 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc
+DIST scala-2.11.1-forkjoin.jar 60850 BLAKE2B 27afd33ed12f0b0fddac4a32a352e9d2e502e252e7acf76dea7f66aaa0ee93c7367bdac83352576683f8f82b04055e8cc910751f618ee3fc18e483c46dab8f73 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f
+DIST scala-2.11.1-genericNest.jar 1136 BLAKE2B 7ae0cbd5445d5d504738a00fce77ce411ac7371c48b742ea2ec1f686298eeb891e33cc74eb6ccffd15753a11ed0eb3aa0b3859ba7a18566e9021d64124a2d7b5 SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6
+DIST scala-2.11.1-gentoo-binary.tar.bz2 29582640 BLAKE2B 3647efb708579ed01041585941f189416dd42f5a278c4c68f5392c66921272b6c16c2fce5e53fde3d2a04b921dc457366554e3c3909657a52d98b97444945646 SHA512 c03b92a15ee080a7049ffa8502d73caff6495f30bbbc0cee7975530cd15c767c4b1c4e189aede0a67bd575c0be2de5c19e907a85aee0b8cf9f76fa41ad45e8d8
+DIST scala-2.11.1-instrumented.jar 31725 BLAKE2B 5dc07140fbdd895512b41ebdacd56763f99ff0043f39652b0bce510fdc61c7c75fc5babb977c03b01cc7913339a4623fa698a513eb32a2c4b1314d033b74cb7e SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39
+DIST scala-2.11.1-jsoup-1.3.1.jar 133835 BLAKE2B 0e57e44ff0283f18e07e05feb22ee8d5d8edb575c85a6cb42dc2c866e0dd4752a2bd0a5318bf5fc3764c9c408b89d690bfb6f3b1b4754a50397f229543d30591 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d
+DIST scala-2.11.1-jsr166_and_extra.jar 728574 BLAKE2B de45d9252b68ed9749f659cd4ed6ed79e191f608da17843e349d2b2caab9ac6f8908fd50e24fae8c51d391bda6348d60d23819b801e4f32c2dc215a75481439a SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306
+DIST scala-2.11.1-macro210.jar 2065 BLAKE2B d1194e28fe0d2740a370e343bed3e5084d69c2dedfbe0e0c135f16ce6a3c3467277084f003d567e93aaeb445e8f6140287c58a5ea01960d03aabad31f5f567bd SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0
+DIST scala-2.11.1-maven-ant-tasks-2.1.1.jar 1314262 BLAKE2B 9dc8e5fbab52d8cf97287e9696181ea3a86e8915b152d8be56fc5e1f7a4c75c066f350a0dab7b957269cc6a8a9d6ed42ca37bfcc20ad61b2f32ac9e348009e99 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68
+DIST scala-2.11.1-maven-deps.tar.gz 77191352 BLAKE2B 1c74102377079aad90fc681f80738f7dc4dc847e7e264b20e36b3de2bf618afbe1c4a911d30ee47764032df1ee1c26799a116cc3d1ae6180ed79b68c1af7b6fe SHA512 2e25beaaa669001aad0c3365a1ade7715ce28cbeb7cee6b082cde14f572740ac9950c8c94eb0b8f5ac2def37228e34d707087b8e822ed3aafc03bce38923d6dc
+DIST scala-2.11.1-methvsfield.jar 609 BLAKE2B 56a86d8409af806474a46d9f2c5afa8533e0689b4d238258be986ac308a6a060e6d66e3d594ad8d7658b539cdc0b96e442b79279c4e71f27924fcfcf1c94cd16 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71
+DIST scala-2.11.1-nest.jar 2920 BLAKE2B 3c48a2ea7501be03ede0fd9c1f907508491299cd68051e283fcce5576c1dde1032afa766e48529d4ce33e0f9ffe6f18d20e7341776e857f991969fe713a382ea SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38
+DIST scala-2.11.1-push.jar 8886289 BLAKE2B 541c89cd3f26166a714c78e057b9f8686e7d239af8a7cf3da795e5ee83113c51af2588bf9e39a7bdd7988597cd267fd10841c3d2acfb529ad0977c5e3c9753bb SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a
+DIST scala-2.11.1-vizant.jar 15910 BLAKE2B 393ddd38ff2528b9c54fbb2b79111858a2dfeab66e4b10daf4e23d113963edb3002db8c9415fe47557736a63ecef4b198bd90b87a54240a9a43823fdab0f3082 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390
+DIST scala-2.11.1.tar.gz 5633076 BLAKE2B 8f56bc044db6bed26f3ab7c5e1429cf1ab57304e66a65224e93bd17fdc74074b153f4e1aef6a628a8617f3c1ffd326dcf8fbe16ea8a190e0002e1101f2e8b0df SHA512 bde7a8fae9fa570df392a70aa06f901bc4987703fadf1e7ad9f090f3b3c9a2ff1bbe055a401b0d851193b5ddcd8b0536c4916f79ae4c63b74c31695de6e651b2
+DIST scala-2.11.11-annotations.jar 2242 BLAKE2B 0c731c25eaa407bdfb51d749f688062a33bd7f2815e8303ba5c56532027350f58d5ab364f2428547c2a99e2032ba0d0d20d4d50cc27dc5c42946e7842111547d SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd
+DIST scala-2.11.11-ant-contrib.jar 224277 BLAKE2B f43bfe3da05decbcf4ec9d2f48bface141907abfbe5b17532e970dbb660e0e1ffae9807c12da38cd6dc8e57c2605c6ec86ad11a99331e73edd3e4418656ab27e SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83
+DIST scala-2.11.11-ant-dotnet-1.0.jar 57795 BLAKE2B 1f04f20739a231816a6d9c81ac0ba23f155ebdb467f466640b18ba2b4f125a6171bcf420c42f71fcfa2c13293a5241e200d0d908bd460ca3ae0342b13747aaad SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867
+DIST scala-2.11.11-ant.jar 1506140 BLAKE2B 790d0f38316e0772b2f315220bbf70328e1e136bccb99bd2f2b2986b33aed60da5ca699c11eeaf653c64f4d07505e168442eea0711b6c627ee97b661d3933584 SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c
+DIST scala-2.11.11-code.jar 683 BLAKE2B b19a34aacc82dcc6bf4efb5556896521ce606cbd72a36ca5c2a019d3aec294172b13968e506373afdd1328668190f60ed337431def7744269cef024e5f82825a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767
+DIST scala-2.11.11-enums.jar 1372 BLAKE2B d3fc4941297344cd42c515ac6564092be7f80676aaf83029ebbcabbcce5ccfb71c008cc56a6fadadb0869d7f53e49a1f85c42e74c7b688acf43f677aa566dd82 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc
+DIST scala-2.11.11-forkjoin.jar 60850 BLAKE2B 27afd33ed12f0b0fddac4a32a352e9d2e502e252e7acf76dea7f66aaa0ee93c7367bdac83352576683f8f82b04055e8cc910751f618ee3fc18e483c46dab8f73 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f
+DIST scala-2.11.11-genericNest.jar 1136 BLAKE2B 7ae0cbd5445d5d504738a00fce77ce411ac7371c48b742ea2ec1f686298eeb891e33cc74eb6ccffd15753a11ed0eb3aa0b3859ba7a18566e9021d64124a2d7b5 SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6
+DIST scala-2.11.11-gentoo-binary.tar.bz2 31842222 BLAKE2B 0547b49e35cb24392463aa58fef1945dd80c45d01454ac3decdf751df5caab4d5458b6ed6a0226b3751905103c6163d10fe920474192de27aba645fae1ab92e3 SHA512 0325dad506d71397dff36d741834f57267b07d1f5f65f8e5e21124754c0dc73ec4613cbb48f6c11383ab8c277f1bea1af5338f1af74e5c5d19ed06ca5f4c6829
+DIST scala-2.11.11-instrumented.jar 31725 BLAKE2B 5dc07140fbdd895512b41ebdacd56763f99ff0043f39652b0bce510fdc61c7c75fc5babb977c03b01cc7913339a4623fa698a513eb32a2c4b1314d033b74cb7e SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39
+DIST scala-2.11.11-jsoup-1.3.1.jar 133835 BLAKE2B 0e57e44ff0283f18e07e05feb22ee8d5d8edb575c85a6cb42dc2c866e0dd4752a2bd0a5318bf5fc3764c9c408b89d690bfb6f3b1b4754a50397f229543d30591 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d
+DIST scala-2.11.11-jsr166_and_extra.jar 728574 BLAKE2B de45d9252b68ed9749f659cd4ed6ed79e191f608da17843e349d2b2caab9ac6f8908fd50e24fae8c51d391bda6348d60d23819b801e4f32c2dc215a75481439a SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306
+DIST scala-2.11.11-macro210.jar 2065 BLAKE2B d1194e28fe0d2740a370e343bed3e5084d69c2dedfbe0e0c135f16ce6a3c3467277084f003d567e93aaeb445e8f6140287c58a5ea01960d03aabad31f5f567bd SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0
+DIST scala-2.11.11-maven-ant-tasks-2.1.1.jar 1314262 BLAKE2B 9dc8e5fbab52d8cf97287e9696181ea3a86e8915b152d8be56fc5e1f7a4c75c066f350a0dab7b957269cc6a8a9d6ed42ca37bfcc20ad61b2f32ac9e348009e99 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68
+DIST scala-2.11.11-maven-deps.tar.gz 94530315 BLAKE2B 4a47cd08d3d7253d86979f5050c381d1895dc92a3869014c5c4936431ef15d8567657c4d464470cb7a2e95116a57f7a12f794273454ff02699c825da748f92b6 SHA512 b716d5d2a79960bae47dbb96a350027e908b9d5b62a0806e6b6f9905374f3e9cbb06c8865a3a2aa96399b4fc2fa1db949729cbb560e70af31225be151375f1ff
+DIST scala-2.11.11-methvsfield.jar 609 BLAKE2B 56a86d8409af806474a46d9f2c5afa8533e0689b4d238258be986ac308a6a060e6d66e3d594ad8d7658b539cdc0b96e442b79279c4e71f27924fcfcf1c94cd16 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71
+DIST scala-2.11.11-nest.jar 2920 BLAKE2B 3c48a2ea7501be03ede0fd9c1f907508491299cd68051e283fcce5576c1dde1032afa766e48529d4ce33e0f9ffe6f18d20e7341776e857f991969fe713a382ea SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38
+DIST scala-2.11.11-push.jar 8886289 BLAKE2B 541c89cd3f26166a714c78e057b9f8686e7d239af8a7cf3da795e5ee83113c51af2588bf9e39a7bdd7988597cd267fd10841c3d2acfb529ad0977c5e3c9753bb SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a
+DIST scala-2.11.11-vizant.jar 15910 BLAKE2B 393ddd38ff2528b9c54fbb2b79111858a2dfeab66e4b10daf4e23d113963edb3002db8c9415fe47557736a63ecef4b198bd90b87a54240a9a43823fdab0f3082 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390
+DIST scala-2.11.11.tar.gz 6556573 BLAKE2B bc9732249269e4066a7d4a4846a4bc2c5a24ddcf0af41db7d3d7c7dda9bdcc9981a8da84f550abbb408bf71d2bb43fc4bc70fbbd63457308d309e71f38928d11 SHA512 c4e8ca544ea86c3e381a7b3d9120b13574cab92d73ff56aa10955afffe64c62ea11cd44abddd75984bc0ac58e8257b00357618cf9377e6690351db269657608c
+DIST scala-2.11.2-annotations.jar 2242 BLAKE2B 0c731c25eaa407bdfb51d749f688062a33bd7f2815e8303ba5c56532027350f58d5ab364f2428547c2a99e2032ba0d0d20d4d50cc27dc5c42946e7842111547d SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd
+DIST scala-2.11.2-ant-contrib.jar 224277 BLAKE2B f43bfe3da05decbcf4ec9d2f48bface141907abfbe5b17532e970dbb660e0e1ffae9807c12da38cd6dc8e57c2605c6ec86ad11a99331e73edd3e4418656ab27e SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83
+DIST scala-2.11.2-ant-dotnet-1.0.jar 57795 BLAKE2B 1f04f20739a231816a6d9c81ac0ba23f155ebdb467f466640b18ba2b4f125a6171bcf420c42f71fcfa2c13293a5241e200d0d908bd460ca3ae0342b13747aaad SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867
+DIST scala-2.11.2-ant.jar 1506140 BLAKE2B 790d0f38316e0772b2f315220bbf70328e1e136bccb99bd2f2b2986b33aed60da5ca699c11eeaf653c64f4d07505e168442eea0711b6c627ee97b661d3933584 SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c
+DIST scala-2.11.2-code.jar 683 BLAKE2B b19a34aacc82dcc6bf4efb5556896521ce606cbd72a36ca5c2a019d3aec294172b13968e506373afdd1328668190f60ed337431def7744269cef024e5f82825a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767
+DIST scala-2.11.2-enums.jar 1372 BLAKE2B d3fc4941297344cd42c515ac6564092be7f80676aaf83029ebbcabbcce5ccfb71c008cc56a6fadadb0869d7f53e49a1f85c42e74c7b688acf43f677aa566dd82 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc
+DIST scala-2.11.2-forkjoin.jar 60850 BLAKE2B 27afd33ed12f0b0fddac4a32a352e9d2e502e252e7acf76dea7f66aaa0ee93c7367bdac83352576683f8f82b04055e8cc910751f618ee3fc18e483c46dab8f73 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f
+DIST scala-2.11.2-genericNest.jar 1136 BLAKE2B 7ae0cbd5445d5d504738a00fce77ce411ac7371c48b742ea2ec1f686298eeb891e33cc74eb6ccffd15753a11ed0eb3aa0b3859ba7a18566e9021d64124a2d7b5 SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6
+DIST scala-2.11.2-gentoo-binary.tar.bz2 28586286 BLAKE2B 6bf03d48e46beeb4c0f31f6b5edd43b9d9f7792fd3526a39038bde0a264024d9892630dc0bffca0afb522c5945856a2deb55b1a53d20e7bc749b70a8900af711 SHA512 39a859394f1918daf0ad91d26a56554e591906a5b4d2385060fb08d8799a4efe95bd23e0f98502297ae0f2b16a8a7deaf583d68c5478fefa1f84d5677ca09226
+DIST scala-2.11.2-instrumented.jar 31725 BLAKE2B 5dc07140fbdd895512b41ebdacd56763f99ff0043f39652b0bce510fdc61c7c75fc5babb977c03b01cc7913339a4623fa698a513eb32a2c4b1314d033b74cb7e SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39
+DIST scala-2.11.2-jsoup-1.3.1.jar 133835 BLAKE2B 0e57e44ff0283f18e07e05feb22ee8d5d8edb575c85a6cb42dc2c866e0dd4752a2bd0a5318bf5fc3764c9c408b89d690bfb6f3b1b4754a50397f229543d30591 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d
+DIST scala-2.11.2-jsr166_and_extra.jar 728574 BLAKE2B de45d9252b68ed9749f659cd4ed6ed79e191f608da17843e349d2b2caab9ac6f8908fd50e24fae8c51d391bda6348d60d23819b801e4f32c2dc215a75481439a SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306
+DIST scala-2.11.2-macro210.jar 2065 BLAKE2B d1194e28fe0d2740a370e343bed3e5084d69c2dedfbe0e0c135f16ce6a3c3467277084f003d567e93aaeb445e8f6140287c58a5ea01960d03aabad31f5f567bd SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0
+DIST scala-2.11.2-maven-ant-tasks-2.1.1.jar 1314262 BLAKE2B 9dc8e5fbab52d8cf97287e9696181ea3a86e8915b152d8be56fc5e1f7a4c75c066f350a0dab7b957269cc6a8a9d6ed42ca37bfcc20ad61b2f32ac9e348009e99 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68
+DIST scala-2.11.2-maven-deps.tar.gz 84139566 BLAKE2B b0e7595692a8763fd7b4eab6ae676b4e03fa2e75209562ac5bf42f2a2c1980ee7f31e02e78f67709e94e7008080dd399f35de68a970aa81ea470a6216718b94b SHA512 54b888af964a5e2731fad20481253150d60859a5243c72873e09799dac665f315e1449d89f86cb311582085d34d7c1c661dee41f64084efb943feef8d4036602
+DIST scala-2.11.2-methvsfield.jar 609 BLAKE2B 56a86d8409af806474a46d9f2c5afa8533e0689b4d238258be986ac308a6a060e6d66e3d594ad8d7658b539cdc0b96e442b79279c4e71f27924fcfcf1c94cd16 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71
+DIST scala-2.11.2-nest.jar 2920 BLAKE2B 3c48a2ea7501be03ede0fd9c1f907508491299cd68051e283fcce5576c1dde1032afa766e48529d4ce33e0f9ffe6f18d20e7341776e857f991969fe713a382ea SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38
+DIST scala-2.11.2-push.jar 8886289 BLAKE2B 541c89cd3f26166a714c78e057b9f8686e7d239af8a7cf3da795e5ee83113c51af2588bf9e39a7bdd7988597cd267fd10841c3d2acfb529ad0977c5e3c9753bb SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a
+DIST scala-2.11.2-vizant.jar 15910 BLAKE2B 393ddd38ff2528b9c54fbb2b79111858a2dfeab66e4b10daf4e23d113963edb3002db8c9415fe47557736a63ecef4b198bd90b87a54240a9a43823fdab0f3082 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390
+DIST scala-2.11.2.tar.gz 5679601 BLAKE2B d1b55419d7255ed302c1bb91328f98d06e8875e3a07e809ba2d4b7733e12e2a7236539031808212d9736da158e574b44b29947b3922d3153594545675154a004 SHA512 c3ca34fbb2733295d9b28089ca136461042978e86e00d86eb2a64c8a8fa207ec99aa33238eda21fe48bcba9e21caeec0fdaa63ceb263dcd9ccef936e23a95c7f
+DIST scala-2.11.4-annotations.jar 2242 BLAKE2B 0c731c25eaa407bdfb51d749f688062a33bd7f2815e8303ba5c56532027350f58d5ab364f2428547c2a99e2032ba0d0d20d4d50cc27dc5c42946e7842111547d SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd
+DIST scala-2.11.4-ant-contrib.jar 224277 BLAKE2B f43bfe3da05decbcf4ec9d2f48bface141907abfbe5b17532e970dbb660e0e1ffae9807c12da38cd6dc8e57c2605c6ec86ad11a99331e73edd3e4418656ab27e SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83
+DIST scala-2.11.4-ant-dotnet-1.0.jar 57795 BLAKE2B 1f04f20739a231816a6d9c81ac0ba23f155ebdb467f466640b18ba2b4f125a6171bcf420c42f71fcfa2c13293a5241e200d0d908bd460ca3ae0342b13747aaad SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867
+DIST scala-2.11.4-ant.jar 1506140 BLAKE2B 790d0f38316e0772b2f315220bbf70328e1e136bccb99bd2f2b2986b33aed60da5ca699c11eeaf653c64f4d07505e168442eea0711b6c627ee97b661d3933584 SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c
+DIST scala-2.11.4-code.jar 683 BLAKE2B b19a34aacc82dcc6bf4efb5556896521ce606cbd72a36ca5c2a019d3aec294172b13968e506373afdd1328668190f60ed337431def7744269cef024e5f82825a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767
+DIST scala-2.11.4-enums.jar 1372 BLAKE2B d3fc4941297344cd42c515ac6564092be7f80676aaf83029ebbcabbcce5ccfb71c008cc56a6fadadb0869d7f53e49a1f85c42e74c7b688acf43f677aa566dd82 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc
+DIST scala-2.11.4-forkjoin.jar 60850 BLAKE2B 27afd33ed12f0b0fddac4a32a352e9d2e502e252e7acf76dea7f66aaa0ee93c7367bdac83352576683f8f82b04055e8cc910751f618ee3fc18e483c46dab8f73 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f
+DIST scala-2.11.4-genericNest.jar 1136 BLAKE2B 7ae0cbd5445d5d504738a00fce77ce411ac7371c48b742ea2ec1f686298eeb891e33cc74eb6ccffd15753a11ed0eb3aa0b3859ba7a18566e9021d64124a2d7b5 SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6
+DIST scala-2.11.4-gentoo-binary.tar.bz2 28642636 BLAKE2B b5f83a376c116b1b2a1ee1a69fc6544c516dd33cb0aac7067c6170e75c4fbb22e35694399f1f7368b37b0274add92bc2af8ddbb05151934296d9b37369b69357 SHA512 0923f4d7a184fa04239066a4eee10bc989de637c7d5926f0bee8620ef1b46edcc5fff999a23d6754b809c03996d61ce0e4ade0dd046700a20fd1b52c53ca074a
+DIST scala-2.11.4-instrumented.jar 31725 BLAKE2B 5dc07140fbdd895512b41ebdacd56763f99ff0043f39652b0bce510fdc61c7c75fc5babb977c03b01cc7913339a4623fa698a513eb32a2c4b1314d033b74cb7e SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39
+DIST scala-2.11.4-jsoup-1.3.1.jar 133835 BLAKE2B 0e57e44ff0283f18e07e05feb22ee8d5d8edb575c85a6cb42dc2c866e0dd4752a2bd0a5318bf5fc3764c9c408b89d690bfb6f3b1b4754a50397f229543d30591 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d
+DIST scala-2.11.4-jsr166_and_extra.jar 728574 BLAKE2B de45d9252b68ed9749f659cd4ed6ed79e191f608da17843e349d2b2caab9ac6f8908fd50e24fae8c51d391bda6348d60d23819b801e4f32c2dc215a75481439a SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306
+DIST scala-2.11.4-macro210.jar 2065 BLAKE2B d1194e28fe0d2740a370e343bed3e5084d69c2dedfbe0e0c135f16ce6a3c3467277084f003d567e93aaeb445e8f6140287c58a5ea01960d03aabad31f5f567bd SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0
+DIST scala-2.11.4-maven-ant-tasks-2.1.1.jar 1314262 BLAKE2B 9dc8e5fbab52d8cf97287e9696181ea3a86e8915b152d8be56fc5e1f7a4c75c066f350a0dab7b957269cc6a8a9d6ed42ca37bfcc20ad61b2f32ac9e348009e99 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68
+DIST scala-2.11.4-maven-deps.tar.gz 89732002 BLAKE2B 3983af445ae4aae2f3aa82132716dff8d137930f00333df0ad147056e4fcd8b79e3b4d27e869110cb41848e5189f341dad006307ba9a12e8a4a96aa3f7d37793 SHA512 d1f99158337789513eac7be25ee3f19272c3975babfe49c2f7876b2d51082bfa1c5bd4b4bd1aef0cac0c6701a9e62b96c15c593c94f04e3226f4aa34cd114052
+DIST scala-2.11.4-methvsfield.jar 609 BLAKE2B 56a86d8409af806474a46d9f2c5afa8533e0689b4d238258be986ac308a6a060e6d66e3d594ad8d7658b539cdc0b96e442b79279c4e71f27924fcfcf1c94cd16 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71
+DIST scala-2.11.4-nest.jar 2920 BLAKE2B 3c48a2ea7501be03ede0fd9c1f907508491299cd68051e283fcce5576c1dde1032afa766e48529d4ce33e0f9ffe6f18d20e7341776e857f991969fe713a382ea SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38
+DIST scala-2.11.4-push.jar 8886289 BLAKE2B 541c89cd3f26166a714c78e057b9f8686e7d239af8a7cf3da795e5ee83113c51af2588bf9e39a7bdd7988597cd267fd10841c3d2acfb529ad0977c5e3c9753bb SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a
+DIST scala-2.11.4-vizant.jar 15910 BLAKE2B 393ddd38ff2528b9c54fbb2b79111858a2dfeab66e4b10daf4e23d113963edb3002db8c9415fe47557736a63ecef4b198bd90b87a54240a9a43823fdab0f3082 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390
+DIST scala-2.11.4.tar.gz 5789309 BLAKE2B c469388a94ca8cf8a02a2bce8969ed71b2d9ec033a1429bf6d175225c622a101068a7b809cc26a20ff35fde29d6d9bcdbb9fc7017eda00d6b7248e2c70515267 SHA512 e7646ed8d40eca6d91757d257e9301836bdc6676dfe5bbb4b059af7a08496fbc99d243f3f087e507d026a9c41e2452ecf72ea5e4e1babbb7119065d8bc710056
+DIST scala-2.11.6-annotations.jar 2242 BLAKE2B 0c731c25eaa407bdfb51d749f688062a33bd7f2815e8303ba5c56532027350f58d5ab364f2428547c2a99e2032ba0d0d20d4d50cc27dc5c42946e7842111547d SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd
+DIST scala-2.11.6-ant-contrib.jar 224277 BLAKE2B f43bfe3da05decbcf4ec9d2f48bface141907abfbe5b17532e970dbb660e0e1ffae9807c12da38cd6dc8e57c2605c6ec86ad11a99331e73edd3e4418656ab27e SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83
+DIST scala-2.11.6-ant-dotnet-1.0.jar 57795 BLAKE2B 1f04f20739a231816a6d9c81ac0ba23f155ebdb467f466640b18ba2b4f125a6171bcf420c42f71fcfa2c13293a5241e200d0d908bd460ca3ae0342b13747aaad SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867
+DIST scala-2.11.6-ant.jar 1506140 BLAKE2B 790d0f38316e0772b2f315220bbf70328e1e136bccb99bd2f2b2986b33aed60da5ca699c11eeaf653c64f4d07505e168442eea0711b6c627ee97b661d3933584 SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c
+DIST scala-2.11.6-code.jar 683 BLAKE2B b19a34aacc82dcc6bf4efb5556896521ce606cbd72a36ca5c2a019d3aec294172b13968e506373afdd1328668190f60ed337431def7744269cef024e5f82825a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767
+DIST scala-2.11.6-enums.jar 1372 BLAKE2B d3fc4941297344cd42c515ac6564092be7f80676aaf83029ebbcabbcce5ccfb71c008cc56a6fadadb0869d7f53e49a1f85c42e74c7b688acf43f677aa566dd82 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc
+DIST scala-2.11.6-forkjoin.jar 60850 BLAKE2B 27afd33ed12f0b0fddac4a32a352e9d2e502e252e7acf76dea7f66aaa0ee93c7367bdac83352576683f8f82b04055e8cc910751f618ee3fc18e483c46dab8f73 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f
+DIST scala-2.11.6-genericNest.jar 1136 BLAKE2B 7ae0cbd5445d5d504738a00fce77ce411ac7371c48b742ea2ec1f686298eeb891e33cc74eb6ccffd15753a11ed0eb3aa0b3859ba7a18566e9021d64124a2d7b5 SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6
+DIST scala-2.11.6-gentoo-binary.tar.bz2 29875070 BLAKE2B 79b4a4dcec299722f7d414d4324ee9c6835e346b6217fb3488fec53bab876ae6671a7072b02ab000a174e67729fda9df557ed7b2fe140c0899a9d447d6d6d052 SHA512 fcdb8c44221f9a7e8260b16b0d069f5ffa45f8ce404f0a49b2ba76349cef7e7e5a0aa3bd8a3f4eecf8a1af5d2037c9d6582cdde38e1e8218f09196d0561d5226
+DIST scala-2.11.6-instrumented.jar 31725 BLAKE2B 5dc07140fbdd895512b41ebdacd56763f99ff0043f39652b0bce510fdc61c7c75fc5babb977c03b01cc7913339a4623fa698a513eb32a2c4b1314d033b74cb7e SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39
+DIST scala-2.11.6-jsoup-1.3.1.jar 133835 BLAKE2B 0e57e44ff0283f18e07e05feb22ee8d5d8edb575c85a6cb42dc2c866e0dd4752a2bd0a5318bf5fc3764c9c408b89d690bfb6f3b1b4754a50397f229543d30591 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d
+DIST scala-2.11.6-jsr166_and_extra.jar 728574 BLAKE2B de45d9252b68ed9749f659cd4ed6ed79e191f608da17843e349d2b2caab9ac6f8908fd50e24fae8c51d391bda6348d60d23819b801e4f32c2dc215a75481439a SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306
+DIST scala-2.11.6-macro210.jar 2065 BLAKE2B d1194e28fe0d2740a370e343bed3e5084d69c2dedfbe0e0c135f16ce6a3c3467277084f003d567e93aaeb445e8f6140287c58a5ea01960d03aabad31f5f567bd SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0
+DIST scala-2.11.6-maven-ant-tasks-2.1.1.jar 1314262 BLAKE2B 9dc8e5fbab52d8cf97287e9696181ea3a86e8915b152d8be56fc5e1f7a4c75c066f350a0dab7b957269cc6a8a9d6ed42ca37bfcc20ad61b2f32ac9e348009e99 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68
+DIST scala-2.11.6-maven-deps.tar.gz 87558817 BLAKE2B 6d4d5ddf604a7175a120c9001e1b2e55d99a14d18581b43d5e6c11122f60a9d6bea90b12906b612f5d8d92c1b458132b79746879ae38839927ce5660f68ae029 SHA512 ad271b4efbe137aa5bbc22bc138719fdd9f89119113dcb35f14bc45cea3382cb33c35bb973fca0d2607c6bb89abbfe69bb4ab1f35f65ad6b7b9a67b7dba63523
+DIST scala-2.11.6-methvsfield.jar 609 BLAKE2B 56a86d8409af806474a46d9f2c5afa8533e0689b4d238258be986ac308a6a060e6d66e3d594ad8d7658b539cdc0b96e442b79279c4e71f27924fcfcf1c94cd16 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71
+DIST scala-2.11.6-nest.jar 2920 BLAKE2B 3c48a2ea7501be03ede0fd9c1f907508491299cd68051e283fcce5576c1dde1032afa766e48529d4ce33e0f9ffe6f18d20e7341776e857f991969fe713a382ea SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38
+DIST scala-2.11.6-push.jar 8886289 BLAKE2B 541c89cd3f26166a714c78e057b9f8686e7d239af8a7cf3da795e5ee83113c51af2588bf9e39a7bdd7988597cd267fd10841c3d2acfb529ad0977c5e3c9753bb SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a
+DIST scala-2.11.6-vizant.jar 15910 BLAKE2B 393ddd38ff2528b9c54fbb2b79111858a2dfeab66e4b10daf4e23d113963edb3002db8c9415fe47557736a63ecef4b198bd90b87a54240a9a43823fdab0f3082 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390
+DIST scala-2.11.6.tar.gz 5901947 BLAKE2B 966ce469e3411b8456d7355b147a5f4edf0b0e179fba83d54feb62118abed010a578d00da51b9793405499d6d28ad0996d20b7a38795c91785d454c705118277 SHA512 57e2a06c8f66e9e51cbfc998a90931a6bd6ab65b574077c8a2541b300d1c86c18bc48bf708060745a71517ae56fa8ad4032c254b3537cd66bc6fe4c328cb4a57
+DIST scala-2.11.7-annotations.jar 2242 BLAKE2B 0c731c25eaa407bdfb51d749f688062a33bd7f2815e8303ba5c56532027350f58d5ab364f2428547c2a99e2032ba0d0d20d4d50cc27dc5c42946e7842111547d SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd
+DIST scala-2.11.7-ant-contrib.jar 224277 BLAKE2B f43bfe3da05decbcf4ec9d2f48bface141907abfbe5b17532e970dbb660e0e1ffae9807c12da38cd6dc8e57c2605c6ec86ad11a99331e73edd3e4418656ab27e SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83
+DIST scala-2.11.7-ant-dotnet-1.0.jar 57795 BLAKE2B 1f04f20739a231816a6d9c81ac0ba23f155ebdb467f466640b18ba2b4f125a6171bcf420c42f71fcfa2c13293a5241e200d0d908bd460ca3ae0342b13747aaad SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867
+DIST scala-2.11.7-ant.jar 1506140 BLAKE2B 790d0f38316e0772b2f315220bbf70328e1e136bccb99bd2f2b2986b33aed60da5ca699c11eeaf653c64f4d07505e168442eea0711b6c627ee97b661d3933584 SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c
+DIST scala-2.11.7-code.jar 683 BLAKE2B b19a34aacc82dcc6bf4efb5556896521ce606cbd72a36ca5c2a019d3aec294172b13968e506373afdd1328668190f60ed337431def7744269cef024e5f82825a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767
+DIST scala-2.11.7-enums.jar 1372 BLAKE2B d3fc4941297344cd42c515ac6564092be7f80676aaf83029ebbcabbcce5ccfb71c008cc56a6fadadb0869d7f53e49a1f85c42e74c7b688acf43f677aa566dd82 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc
+DIST scala-2.11.7-forkjoin.jar 60850 BLAKE2B 27afd33ed12f0b0fddac4a32a352e9d2e502e252e7acf76dea7f66aaa0ee93c7367bdac83352576683f8f82b04055e8cc910751f618ee3fc18e483c46dab8f73 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f
+DIST scala-2.11.7-genericNest.jar 1136 BLAKE2B 7ae0cbd5445d5d504738a00fce77ce411ac7371c48b742ea2ec1f686298eeb891e33cc74eb6ccffd15753a11ed0eb3aa0b3859ba7a18566e9021d64124a2d7b5 SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6
+DIST scala-2.11.7-gentoo-binary.tar.bz2 31603236 BLAKE2B fcd18f8d40948a168f9b137577d624986e483490f4f84335edcdbf9450d48f3bdd924c633b74f3666ce9b0e119275e2af9a347928aad362fa3b2d00254ee4ac5 SHA512 13ea3ebe69fea9e450587494ac0de20f28477442e10dae0306b13cc9dcdf375f897a3988a0dca6db102a6ba2744debb8552cd6704150e049bf6f15cc1c00899c
+DIST scala-2.11.7-instrumented.jar 31725 BLAKE2B 5dc07140fbdd895512b41ebdacd56763f99ff0043f39652b0bce510fdc61c7c75fc5babb977c03b01cc7913339a4623fa698a513eb32a2c4b1314d033b74cb7e SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39
+DIST scala-2.11.7-jsoup-1.3.1.jar 133835 BLAKE2B 0e57e44ff0283f18e07e05feb22ee8d5d8edb575c85a6cb42dc2c866e0dd4752a2bd0a5318bf5fc3764c9c408b89d690bfb6f3b1b4754a50397f229543d30591 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d
+DIST scala-2.11.7-jsr166_and_extra.jar 728574 BLAKE2B de45d9252b68ed9749f659cd4ed6ed79e191f608da17843e349d2b2caab9ac6f8908fd50e24fae8c51d391bda6348d60d23819b801e4f32c2dc215a75481439a SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306
+DIST scala-2.11.7-macro210.jar 2065 BLAKE2B d1194e28fe0d2740a370e343bed3e5084d69c2dedfbe0e0c135f16ce6a3c3467277084f003d567e93aaeb445e8f6140287c58a5ea01960d03aabad31f5f567bd SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0
+DIST scala-2.11.7-maven-ant-tasks-2.1.1.jar 1314262 BLAKE2B 9dc8e5fbab52d8cf97287e9696181ea3a86e8915b152d8be56fc5e1f7a4c75c066f350a0dab7b957269cc6a8a9d6ed42ca37bfcc20ad61b2f32ac9e348009e99 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68
+DIST scala-2.11.7-maven-deps.tar.gz 88535058 BLAKE2B bca1a63184cd2ac6f33e3c57e421b94d4f711a9575e2cc03f78243a858bac5ecc788dee9c4a14aae09cb53c6764f7f886d24ff3307468c4f7856425508b4ca6d SHA512 745b981b80fddca1768c1eb4579b60888b82e1d1e5c4f3b48f4e5815c2f45f8bc7e2e2cae842dfe6d5187f3987b39e3fcd3c0d0e42173931822c6fb95edcfb5c
+DIST scala-2.11.7-methvsfield.jar 609 BLAKE2B 56a86d8409af806474a46d9f2c5afa8533e0689b4d238258be986ac308a6a060e6d66e3d594ad8d7658b539cdc0b96e442b79279c4e71f27924fcfcf1c94cd16 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71
+DIST scala-2.11.7-nest.jar 2920 BLAKE2B 3c48a2ea7501be03ede0fd9c1f907508491299cd68051e283fcce5576c1dde1032afa766e48529d4ce33e0f9ffe6f18d20e7341776e857f991969fe713a382ea SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38
+DIST scala-2.11.7-push.jar 8886289 BLAKE2B 541c89cd3f26166a714c78e057b9f8686e7d239af8a7cf3da795e5ee83113c51af2588bf9e39a7bdd7988597cd267fd10841c3d2acfb529ad0977c5e3c9753bb SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a
+DIST scala-2.11.7-vizant.jar 15910 BLAKE2B 393ddd38ff2528b9c54fbb2b79111858a2dfeab66e4b10daf4e23d113963edb3002db8c9415fe47557736a63ecef4b198bd90b87a54240a9a43823fdab0f3082 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390
+DIST scala-2.11.7.tar.gz 6443003 BLAKE2B 4b9d2c6263773d0280627d4232d9f924176fc694785c37fecaa28ea0d1302d18b46543b1427e026c86b46026088f8d8f1ddbb02bd6f609c94e39c52f2115e215 SHA512 f74614a303bdc28068b212e9fe4aa499db4a5a9ff87bf1af93d6b3598784edd3f2e37cedbdbc20c9aa507965845b4b511bfc786ff82f31dbc3365af796062611
+DIST scala-2.11.8-annotations.jar 2242 BLAKE2B 0c731c25eaa407bdfb51d749f688062a33bd7f2815e8303ba5c56532027350f58d5ab364f2428547c2a99e2032ba0d0d20d4d50cc27dc5c42946e7842111547d SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd
+DIST scala-2.11.8-ant-contrib.jar 224277 BLAKE2B f43bfe3da05decbcf4ec9d2f48bface141907abfbe5b17532e970dbb660e0e1ffae9807c12da38cd6dc8e57c2605c6ec86ad11a99331e73edd3e4418656ab27e SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83
+DIST scala-2.11.8-ant-dotnet-1.0.jar 57795 BLAKE2B 1f04f20739a231816a6d9c81ac0ba23f155ebdb467f466640b18ba2b4f125a6171bcf420c42f71fcfa2c13293a5241e200d0d908bd460ca3ae0342b13747aaad SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867
+DIST scala-2.11.8-ant.jar 1506140 BLAKE2B 790d0f38316e0772b2f315220bbf70328e1e136bccb99bd2f2b2986b33aed60da5ca699c11eeaf653c64f4d07505e168442eea0711b6c627ee97b661d3933584 SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c
+DIST scala-2.11.8-code.jar 683 BLAKE2B b19a34aacc82dcc6bf4efb5556896521ce606cbd72a36ca5c2a019d3aec294172b13968e506373afdd1328668190f60ed337431def7744269cef024e5f82825a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767
+DIST scala-2.11.8-enums.jar 1372 BLAKE2B d3fc4941297344cd42c515ac6564092be7f80676aaf83029ebbcabbcce5ccfb71c008cc56a6fadadb0869d7f53e49a1f85c42e74c7b688acf43f677aa566dd82 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc
+DIST scala-2.11.8-forkjoin.jar 60850 BLAKE2B 27afd33ed12f0b0fddac4a32a352e9d2e502e252e7acf76dea7f66aaa0ee93c7367bdac83352576683f8f82b04055e8cc910751f618ee3fc18e483c46dab8f73 SHA512 702370f2654b1c06f340c100078c630a82808e56c4dcc323881d6547945ce028345a5ee3048cbb9502a3b340b1d84ab5a635f80dbb381fdd88cc25b60cad768f
+DIST scala-2.11.8-genericNest.jar 1136 BLAKE2B 7ae0cbd5445d5d504738a00fce77ce411ac7371c48b742ea2ec1f686298eeb891e33cc74eb6ccffd15753a11ed0eb3aa0b3859ba7a18566e9021d64124a2d7b5 SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6
+DIST scala-2.11.8-gentoo-binary.tar.bz2 31834867 BLAKE2B a6c093540d3ebcca4a7fbfa2be1dcf9501de35a7c2d2a694456ce1e5275dab645ee50646e36d02aa7e1bfe0292d7f5ac085ecf386b396dd9502aa2df29dccc6d SHA512 297345128685b53d011ee67a5c89900748714a6f63d590c567cedaf85e7e27bcea5b9313707f35290a17b831ef521772907ecb41ce1d3a3b0086b24ecd431266
+DIST scala-2.11.8-instrumented.jar 31725 BLAKE2B 5dc07140fbdd895512b41ebdacd56763f99ff0043f39652b0bce510fdc61c7c75fc5babb977c03b01cc7913339a4623fa698a513eb32a2c4b1314d033b74cb7e SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39
+DIST scala-2.11.8-jsoup-1.3.1.jar 133835 BLAKE2B 0e57e44ff0283f18e07e05feb22ee8d5d8edb575c85a6cb42dc2c866e0dd4752a2bd0a5318bf5fc3764c9c408b89d690bfb6f3b1b4754a50397f229543d30591 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d
+DIST scala-2.11.8-jsr166_and_extra.jar 728574 BLAKE2B de45d9252b68ed9749f659cd4ed6ed79e191f608da17843e349d2b2caab9ac6f8908fd50e24fae8c51d391bda6348d60d23819b801e4f32c2dc215a75481439a SHA512 40d949cfefc5111c79b79f085657d56aa046d1b318e6ad78de5869f61a6515c2076b70344be5ae3fb93a7b3f54f46a129e2536515b258e0d5bf2e670c5001306
+DIST scala-2.11.8-macro210.jar 2065 BLAKE2B d1194e28fe0d2740a370e343bed3e5084d69c2dedfbe0e0c135f16ce6a3c3467277084f003d567e93aaeb445e8f6140287c58a5ea01960d03aabad31f5f567bd SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0
+DIST scala-2.11.8-maven-ant-tasks-2.1.1.jar 1314262 BLAKE2B 9dc8e5fbab52d8cf97287e9696181ea3a86e8915b152d8be56fc5e1f7a4c75c066f350a0dab7b957269cc6a8a9d6ed42ca37bfcc20ad61b2f32ac9e348009e99 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68
+DIST scala-2.11.8-maven-deps.tar.gz 89482897 BLAKE2B a308551a0c4312fa96207cd06908b083026eac9deffd644da6fe0cb409a68f55dfa787d17f4154e2baedc66e7b5383a64eaaac93ceceedda0030ce1863c47bb3 SHA512 22f77f4d28c68fb81e5152404f6e3ff2e2b6e05a19e4d63ca79c6736e158550f6490ff7e7fe42aa557d8f28f35d2f1cbd54686559a25aee261f328caf5f98aa0
+DIST scala-2.11.8-methvsfield.jar 609 BLAKE2B 56a86d8409af806474a46d9f2c5afa8533e0689b4d238258be986ac308a6a060e6d66e3d594ad8d7658b539cdc0b96e442b79279c4e71f27924fcfcf1c94cd16 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71
+DIST scala-2.11.8-nest.jar 2920 BLAKE2B 3c48a2ea7501be03ede0fd9c1f907508491299cd68051e283fcce5576c1dde1032afa766e48529d4ce33e0f9ffe6f18d20e7341776e857f991969fe713a382ea SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38
+DIST scala-2.11.8-push.jar 8886289 BLAKE2B 541c89cd3f26166a714c78e057b9f8686e7d239af8a7cf3da795e5ee83113c51af2588bf9e39a7bdd7988597cd267fd10841c3d2acfb529ad0977c5e3c9753bb SHA512 b5539d381c8978ac57fc4258696e4cb552f47917178152b38b5683e42ed60da4d9da198a0344652f201541a71f92afd2ac8b3c3d3ec5266a8c222e9661d8a06a
+DIST scala-2.11.8-vizant.jar 15910 BLAKE2B 393ddd38ff2528b9c54fbb2b79111858a2dfeab66e4b10daf4e23d113963edb3002db8c9415fe47557736a63ecef4b198bd90b87a54240a9a43823fdab0f3082 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390
+DIST scala-2.11.8.tar.gz 6505558 BLAKE2B 8b5eb279b4f634c18d4bf64d50c60ec1f64bae01df8724f5108a6ab6ac54c85c3e49b9a82d84f4bea12b7ba091d0e4f4ba04a6dd6b01f148783a48f5397e2fad SHA512 f084eb88a78b2c74bad38086bcbcac7fdc98640059188c266f24f8f7b58e74a7b29e3b5fe52816bcad5a132d873863b0307679b5b9e67264ac2c7cb5b696a4e0
+DIST scala-2.12.1-annotations.jar 2242 BLAKE2B 0c731c25eaa407bdfb51d749f688062a33bd7f2815e8303ba5c56532027350f58d5ab364f2428547c2a99e2032ba0d0d20d4d50cc27dc5c42946e7842111547d SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd
+DIST scala-2.12.1-ant-contrib.jar 224277 BLAKE2B f43bfe3da05decbcf4ec9d2f48bface141907abfbe5b17532e970dbb660e0e1ffae9807c12da38cd6dc8e57c2605c6ec86ad11a99331e73edd3e4418656ab27e SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83
+DIST scala-2.12.1-ant-dotnet-1.0.jar 57795 BLAKE2B 1f04f20739a231816a6d9c81ac0ba23f155ebdb467f466640b18ba2b4f125a6171bcf420c42f71fcfa2c13293a5241e200d0d908bd460ca3ae0342b13747aaad SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867
+DIST scala-2.12.1-ant.jar 1506140 BLAKE2B 790d0f38316e0772b2f315220bbf70328e1e136bccb99bd2f2b2986b33aed60da5ca699c11eeaf653c64f4d07505e168442eea0711b6c627ee97b661d3933584 SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c
+DIST scala-2.12.1-code.jar 683 BLAKE2B b19a34aacc82dcc6bf4efb5556896521ce606cbd72a36ca5c2a019d3aec294172b13968e506373afdd1328668190f60ed337431def7744269cef024e5f82825a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767
+DIST scala-2.12.1-enums.jar 1372 BLAKE2B d3fc4941297344cd42c515ac6564092be7f80676aaf83029ebbcabbcce5ccfb71c008cc56a6fadadb0869d7f53e49a1f85c42e74c7b688acf43f677aa566dd82 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc
+DIST scala-2.12.1-genericNest.jar 1136 BLAKE2B 7ae0cbd5445d5d504738a00fce77ce411ac7371c48b742ea2ec1f686298eeb891e33cc74eb6ccffd15753a11ed0eb3aa0b3859ba7a18566e9021d64124a2d7b5 SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6
+DIST scala-2.12.1-gentoo-binary.tar.xz 77449456 BLAKE2B b8865f0b099b24efeff99580b50c253b92be1686a56bd63cc9e5140460929ed649f0877f0aa807ecf8be98abc73a3846b81ac53a179d640c47b47aaf9cc4661f SHA512 46744a330d5fe5fd359a6c7a87bd79e0141c6f84f9ce19163ac8658e8947ca682c6e253e8f561e9a4ac077e0d308bc0aa65586026bc5986b1682ae0151d91bc9
+DIST scala-2.12.1-instrumented.jar 31725 BLAKE2B 5dc07140fbdd895512b41ebdacd56763f99ff0043f39652b0bce510fdc61c7c75fc5babb977c03b01cc7913339a4623fa698a513eb32a2c4b1314d033b74cb7e SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39
+DIST scala-2.12.1-ivy2-deps.tar.xz 62890720 BLAKE2B dc057432026499ad788f3767a2a7a3b745118db8c7b908263dc26a14a3c232e843e2ea6e67d787d81496a18d5d6dad8d429814a2b47ac97afe850b3edee01396 SHA512 f8d88e88e53d793e0b89a57ad19598ee02eb6322e2e1f9397a5d4b52ab2929c009d4aa84366a8a9dec864cb0c61f2316c16826190b06322539fa29ddef2b475d
+DIST scala-2.12.1-jsoup-1.3.1.jar 133835 BLAKE2B 0e57e44ff0283f18e07e05feb22ee8d5d8edb575c85a6cb42dc2c866e0dd4752a2bd0a5318bf5fc3764c9c408b89d690bfb6f3b1b4754a50397f229543d30591 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d
+DIST scala-2.12.1-macro210.jar 2065 BLAKE2B d1194e28fe0d2740a370e343bed3e5084d69c2dedfbe0e0c135f16ce6a3c3467277084f003d567e93aaeb445e8f6140287c58a5ea01960d03aabad31f5f567bd SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0
+DIST scala-2.12.1-maven-ant-tasks-2.1.1.jar 1314262 BLAKE2B 9dc8e5fbab52d8cf97287e9696181ea3a86e8915b152d8be56fc5e1f7a4c75c066f350a0dab7b957269cc6a8a9d6ed42ca37bfcc20ad61b2f32ac9e348009e99 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68
+DIST scala-2.12.1-methvsfield.jar 609 BLAKE2B 56a86d8409af806474a46d9f2c5afa8533e0689b4d238258be986ac308a6a060e6d66e3d594ad8d7658b539cdc0b96e442b79279c4e71f27924fcfcf1c94cd16 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71
+DIST scala-2.12.1-nest.jar 2920 BLAKE2B 3c48a2ea7501be03ede0fd9c1f907508491299cd68051e283fcce5576c1dde1032afa766e48529d4ce33e0f9ffe6f18d20e7341776e857f991969fe713a382ea SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38
+DIST scala-2.12.1-sbt-deps.tar.xz 34840036 BLAKE2B 0853488f2bff423a0cc76e0afb09e8050132b9b1fe1a5f963e0e74cae13aae31129eab3555f5e58f9c17471aae192e9f1da612f59453cde4e8fe4be1fcc993f7 SHA512 818168cccf57bcd3afb35583354eae736f551e11265427f3a62f84376659ea1b2bf892ad8c2be27b1a570b7b0f8f8f106b5d45c747fac6c776826bb2a1ac72b9
+DIST scala-2.12.1-vizant.jar 15910 BLAKE2B 393ddd38ff2528b9c54fbb2b79111858a2dfeab66e4b10daf4e23d113963edb3002db8c9415fe47557736a63ecef4b198bd90b87a54240a9a43823fdab0f3082 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390
+DIST scala-2.12.1.tar.gz 6280352 BLAKE2B 577655d6e0f5e73819ea036191770a3657e5b2b51094075b42d5ef62276628e910551167ac12327e96cba905b4b9b22e7430f79fb4d70c4bbb3ead9398a4cb66 SHA512 e62755c5d5aabbdf5ae5dc57d4b8b2152199b1066a003787e8e1e9da261d4b3ab4f53106dafaf68f62031df1dd41626db55b5de1cc3a504f6c44ab271c58aff0
+DIST scala-2.12.2-annotations.jar 2242 BLAKE2B 0c731c25eaa407bdfb51d749f688062a33bd7f2815e8303ba5c56532027350f58d5ab364f2428547c2a99e2032ba0d0d20d4d50cc27dc5c42946e7842111547d SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd
+DIST scala-2.12.2-ant-contrib.jar 224277 BLAKE2B f43bfe3da05decbcf4ec9d2f48bface141907abfbe5b17532e970dbb660e0e1ffae9807c12da38cd6dc8e57c2605c6ec86ad11a99331e73edd3e4418656ab27e SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83
+DIST scala-2.12.2-ant-dotnet-1.0.jar 57795 BLAKE2B 1f04f20739a231816a6d9c81ac0ba23f155ebdb467f466640b18ba2b4f125a6171bcf420c42f71fcfa2c13293a5241e200d0d908bd460ca3ae0342b13747aaad SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867
+DIST scala-2.12.2-ant.jar 1506140 BLAKE2B 790d0f38316e0772b2f315220bbf70328e1e136bccb99bd2f2b2986b33aed60da5ca699c11eeaf653c64f4d07505e168442eea0711b6c627ee97b661d3933584 SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c
+DIST scala-2.12.2-code.jar 683 BLAKE2B b19a34aacc82dcc6bf4efb5556896521ce606cbd72a36ca5c2a019d3aec294172b13968e506373afdd1328668190f60ed337431def7744269cef024e5f82825a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767
+DIST scala-2.12.2-enums.jar 1372 BLAKE2B d3fc4941297344cd42c515ac6564092be7f80676aaf83029ebbcabbcce5ccfb71c008cc56a6fadadb0869d7f53e49a1f85c42e74c7b688acf43f677aa566dd82 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc
+DIST scala-2.12.2-genericNest.jar 1136 BLAKE2B 7ae0cbd5445d5d504738a00fce77ce411ac7371c48b742ea2ec1f686298eeb891e33cc74eb6ccffd15753a11ed0eb3aa0b3859ba7a18566e9021d64124a2d7b5 SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6
+DIST scala-2.12.2-gentoo-binary.tar.xz 77464308 BLAKE2B bcfdc68b92ee105b49f6c12d51875c9fca1c29989e5af9c13433f552733483f1f0cc3e689429c7b3d713af2571a3bc9005b7eafe6071336d9fb4c268806658b4 SHA512 ef8952c06e1a89269dafb387b4d512edd54655317c06adc9dcd8270d8eb426362a6bc2a265910f3405362f062eb04a53550b8a6992781d5bb76701f24843ad64
+DIST scala-2.12.2-instrumented.jar 31725 BLAKE2B 5dc07140fbdd895512b41ebdacd56763f99ff0043f39652b0bce510fdc61c7c75fc5babb977c03b01cc7913339a4623fa698a513eb32a2c4b1314d033b74cb7e SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39
+DIST scala-2.12.2-ivy2-deps.tar.xz 66113576 BLAKE2B 6a1a3d6424da715576d4e857247d110a97310bfbd86047fb5f7d868b273952336d02f83f8c72b44b3b3bc65a61cbe9833dcaa3ef94972f2be9718e5696cabcf8 SHA512 d51961bd5cce27b3b98c21112e097efb43b5eae47fb215c315f6ae38ab15c6e6b8521c6b0dffcaa087741001b6d60aba946dfd765b6eab572e41092fa22839cc
+DIST scala-2.12.2-jsoup-1.3.1.jar 133835 BLAKE2B 0e57e44ff0283f18e07e05feb22ee8d5d8edb575c85a6cb42dc2c866e0dd4752a2bd0a5318bf5fc3764c9c408b89d690bfb6f3b1b4754a50397f229543d30591 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d
+DIST scala-2.12.2-macro210.jar 2065 BLAKE2B d1194e28fe0d2740a370e343bed3e5084d69c2dedfbe0e0c135f16ce6a3c3467277084f003d567e93aaeb445e8f6140287c58a5ea01960d03aabad31f5f567bd SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0
+DIST scala-2.12.2-maven-ant-tasks-2.1.1.jar 1314262 BLAKE2B 9dc8e5fbab52d8cf97287e9696181ea3a86e8915b152d8be56fc5e1f7a4c75c066f350a0dab7b957269cc6a8a9d6ed42ca37bfcc20ad61b2f32ac9e348009e99 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68
+DIST scala-2.12.2-methvsfield.jar 609 BLAKE2B 56a86d8409af806474a46d9f2c5afa8533e0689b4d238258be986ac308a6a060e6d66e3d594ad8d7658b539cdc0b96e442b79279c4e71f27924fcfcf1c94cd16 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71
+DIST scala-2.12.2-nest.jar 2920 BLAKE2B 3c48a2ea7501be03ede0fd9c1f907508491299cd68051e283fcce5576c1dde1032afa766e48529d4ce33e0f9ffe6f18d20e7341776e857f991969fe713a382ea SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38
+DIST scala-2.12.2-sbt-deps.tar.xz 34841660 BLAKE2B 7169e0a98d76c17bde51fd4c6a054d74aba7a2026e3cb7ea86376371bdfaf58a76bef745788db920c69613e6e9a676e8b8ff34af0c4bae5ab420c0375eb4ae82 SHA512 642bc1c2f94f7890548cc5b730cce4a4c214603c53eefaf12fbd709163feafbd319165a738fc4d3c349ae60ba276bc23333949b01835a2e7e7b767fa21baf96a
+DIST scala-2.12.2-vizant.jar 15910 BLAKE2B 393ddd38ff2528b9c54fbb2b79111858a2dfeab66e4b10daf4e23d113963edb3002db8c9415fe47557736a63ecef4b198bd90b87a54240a9a43823fdab0f3082 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390
+DIST scala-2.12.2.tar.gz 5935417 BLAKE2B 1bf5492aa45398d9cd4b313cab99dbe2fca05de48bca1dbb1427ac110bf153af565768e0260922c19c1728e821cef95b46917bb20e4e637f75dccc37f5527465 SHA512 ab450e94fa79a9a0af238567b17537b12f23627eb066b84cd996a88422ec34ee8d26e09eca0416d49daccadaeb016ad6419d8022d471065389a26b024f2049b1
+DIST scala-2.12.4-annotations.jar 2242 BLAKE2B 0c731c25eaa407bdfb51d749f688062a33bd7f2815e8303ba5c56532027350f58d5ab364f2428547c2a99e2032ba0d0d20d4d50cc27dc5c42946e7842111547d SHA512 3ceee0b1361b9e0911c1ff060ad108a1d93f7ea3e82ef946401cd5f895cb06016ac0ecdfd095f99b11cfb28c4cef7705c1b564c7af644c5f19b45c14a413c4dd
+DIST scala-2.12.4-ant-contrib.jar 224277 BLAKE2B f43bfe3da05decbcf4ec9d2f48bface141907abfbe5b17532e970dbb660e0e1ffae9807c12da38cd6dc8e57c2605c6ec86ad11a99331e73edd3e4418656ab27e SHA512 5ec325a55bb213226c86faf8a99951839319e9579956ae58e2ccfe84f62d2742542998f98eed3f0dc8f8f94635d6dff1fe02e3c0f5289df1f09027ae2b9bee83
+DIST scala-2.12.4-ant-dotnet-1.0.jar 57795 BLAKE2B 1f04f20739a231816a6d9c81ac0ba23f155ebdb467f466640b18ba2b4f125a6171bcf420c42f71fcfa2c13293a5241e200d0d908bd460ca3ae0342b13747aaad SHA512 72afc387cf9dbeb99e627ca7f35f919f627bbf3f072eb46036120695fb70311490593c255c2a2e79b684adb8f213d8ab591d4ceda5d5f2e6b6906a6977b38867
+DIST scala-2.12.4-ant.jar 1506140 BLAKE2B 790d0f38316e0772b2f315220bbf70328e1e136bccb99bd2f2b2986b33aed60da5ca699c11eeaf653c64f4d07505e168442eea0711b6c627ee97b661d3933584 SHA512 ddee72ca62adb20e700022609749a4d6cc848c94e597a7450226770c8b97aa2c1f7f23b7a1c6ac8acd63047101997ebd68c19b393ebffde9ff5c7bb1957cd18c
+DIST scala-2.12.4-code.jar 683 BLAKE2B b19a34aacc82dcc6bf4efb5556896521ce606cbd72a36ca5c2a019d3aec294172b13968e506373afdd1328668190f60ed337431def7744269cef024e5f82825a SHA512 d963c186f3029858b1f6b53cf6e3470946365f13a6bcc334a7c959fd449dace10a953c496dbf3036828f2b5e5ad17d22f5e3912446bed14bd71b2f0de2f6c767
+DIST scala-2.12.4-enums.jar 1372 BLAKE2B d3fc4941297344cd42c515ac6564092be7f80676aaf83029ebbcabbcce5ccfb71c008cc56a6fadadb0869d7f53e49a1f85c42e74c7b688acf43f677aa566dd82 SHA512 3d2356b9f610e98a03f64cbdd18ee36138b68ba5b170bb9b78bc7449439c3870f6f5bc795f3e1b8d325daf468ae85c581b60d1d360c1ae68c70792ad62b9c1dc
+DIST scala-2.12.4-genericNest.jar 1136 BLAKE2B 7ae0cbd5445d5d504738a00fce77ce411ac7371c48b742ea2ec1f686298eeb891e33cc74eb6ccffd15753a11ed0eb3aa0b3859ba7a18566e9021d64124a2d7b5 SHA512 32c3b3e14bc72db2572bf120c1fda49a369b27ff8ae6ae12f6d7b12fdffef4064b515671c8f1b6dbfd78209247f6a7b7b26e700dd70a105de3ca59f5185ff9d6
+DIST scala-2.12.4-gentoo-binary.tar.xz 78241224 BLAKE2B 5caefb6c057b18cffdeb39440cabe14499d9f760a36ee9f1bd671c20f1961d463e13d8f81f2eb237a299cc4bd6e7f06cacad41b667ff7ccc20d439886f804af9 SHA512 dcf0ffa9eddf5d76d38b4078fe82715b667a0905273a5fe433e752e34a099c4aec4d53bc542a3be341b849857945f698cca384f824a4dae6406243eca36c5e1c
+DIST scala-2.12.4-instrumented.jar 31725 BLAKE2B 5dc07140fbdd895512b41ebdacd56763f99ff0043f39652b0bce510fdc61c7c75fc5babb977c03b01cc7913339a4623fa698a513eb32a2c4b1314d033b74cb7e SHA512 b1d77c4380a2b8ffe715ec106e58081e5c89e314c5a13071d627c3f974144ad453e79d405cd722d75095b62e8682b7414d40b691506c7d2f5dde62e2fce51e39
+DIST scala-2.12.4-ivy2-deps.tar.xz 66284364 BLAKE2B 83f3d0d6735afa801345c93d5b468d1c9fceba23526628a534fe3e9b1f301cbc561844fe1e30d0015bd3b705bcc15095649265e0927cf70d955980658a50eeba SHA512 c890a3f85734b35b398d5266f4507284e7474bac6018a34945d858ebebefa225a00238bd3a82e99ab83e344e98f6b14f6c2852a6b05eb5d7ef2094039d53a6d7
+DIST scala-2.12.4-jsoup-1.3.1.jar 133835 BLAKE2B 0e57e44ff0283f18e07e05feb22ee8d5d8edb575c85a6cb42dc2c866e0dd4752a2bd0a5318bf5fc3764c9c408b89d690bfb6f3b1b4754a50397f229543d30591 SHA512 365e43b6d8ba14ae32607241481f7c0e6393268f5c3faef860be7674150edece2c30376108e54f307df6a266a91100a1c7dbc2f28b4207b5227bc1bec6e1106d
+DIST scala-2.12.4-macro210.jar 2065 BLAKE2B d1194e28fe0d2740a370e343bed3e5084d69c2dedfbe0e0c135f16ce6a3c3467277084f003d567e93aaeb445e8f6140287c58a5ea01960d03aabad31f5f567bd SHA512 13c119afc4400f1531cad0cf38ab1652fce641090c11bff8f044a0d7f99df90412241ae78d5c623b7ecff1ce4720ae51fca4324f51bde0331e12f2e6e9898dd0
+DIST scala-2.12.4-maven-ant-tasks-2.1.1.jar 1314262 BLAKE2B 9dc8e5fbab52d8cf97287e9696181ea3a86e8915b152d8be56fc5e1f7a4c75c066f350a0dab7b957269cc6a8a9d6ed42ca37bfcc20ad61b2f32ac9e348009e99 SHA512 e3f0ff1d41ec31b2b64acb2ebcc175709714033589cb8e763f94aa80359c84f5d960c46dae713c9e37e1a09b977e7da617f8fe10a5b6fb30c55efd19bc307e68
+DIST scala-2.12.4-methvsfield.jar 609 BLAKE2B 56a86d8409af806474a46d9f2c5afa8533e0689b4d238258be986ac308a6a060e6d66e3d594ad8d7658b539cdc0b96e442b79279c4e71f27924fcfcf1c94cd16 SHA512 6db923ed7059bc91c8442d5804ccd8336e94f5202b3dcc348a4eb5026f09e1e86862f6e94818beae9ad42fcdc8e51df4d59a27109903a8ccb78054425ae47a71
+DIST scala-2.12.4-nest.jar 2920 BLAKE2B 3c48a2ea7501be03ede0fd9c1f907508491299cd68051e283fcce5576c1dde1032afa766e48529d4ce33e0f9ffe6f18d20e7341776e857f991969fe713a382ea SHA512 5eaaa870e06b5e00efb1f6ccced71343e8aa01578ea2b320b2d051f2df3713df9c500f074cc74a9e3c5cc509e03cf9c71265329bf2ddb3e82cb331524202fa38
+DIST scala-2.12.4-sbt-deps.tar.xz 34841672 BLAKE2B 0f1577bba65eb5863013014b16627c28934f13e84a6ed0a52748e2007417ae074bcb4b68650993d870f4ada872248d489f84ea02ee19521dd9ce8faae963e221 SHA512 74455451e77f0d935c8027e67b898e5eec9e984158292a37a4362072f4922eb53dfe9ddd5d52da8066fb8949c6469bff70405df8581633a49a37c8b900c6885e
+DIST scala-2.12.4-vizant.jar 15910 BLAKE2B 393ddd38ff2528b9c54fbb2b79111858a2dfeab66e4b10daf4e23d113963edb3002db8c9415fe47557736a63ecef4b198bd90b87a54240a9a43823fdab0f3082 SHA512 4464d7349016f4999199e227e8eaf7bb3ef6b7e38ad0e8e710faad55df2e1243d99b53b9a789a1ffd3c39aef0d979dffc543f4691feae68cfa743e51bcf61390
+DIST scala-2.12.4.tar.gz 5999529 BLAKE2B 5dfeadb9ac9562dd825f6a41f9cabdd353f669a58dc3aaec714d6155e9e598296c1e31dcc8956a24a97103e3449fb8f8c3a9ebe5e52dd405572d59ccae89c5e6 SHA512 cad6d54777a3ad4d26df5b4d5cecbbdb4a91ecb17cbf791fe259735221d33f9dd17a14e86f5e3520464078ad9ef68581e722e3c0d7494436bf356c79a9d31697
+EBUILD scala-2.11.1-r2.ebuild 7608 BLAKE2B 8bf202a892071f2392a0a07854145317b7c768619287ca1e4be0b3fcf5aae4ca31f16944791b017e751ba5faa8ccfe2a42a9a84dd92dd25febfe81bb395a99c5 SHA512 bed490fb58b2d882c6c8905416fc5366b1626de013faeda455878064d57c4c7b283e94b7e7b3c92ac63de5cdbaafbd38c44afd9bda9dd22bc07e4bbf419cc521
+EBUILD scala-2.11.11.ebuild 7834 BLAKE2B 924beb59c89a63bb4c41c4fdb249a9089e71f8deb693e248b55f7effa381cf2274ca7a7b0839cfe98097a59de4ebeb0a29fb0d5865c5cc0363e96d1d7a037d3b SHA512 931fdfcfafd543caa8100bd0acd7222cadfec4ef1bae79d165a2040a173dac45a910e415700442ec7ca7b3bdf936b68a271e389a377844a7ee22953e60401f2a
+EBUILD scala-2.11.2-r2.ebuild 7693 BLAKE2B 067c5ecdc422b2971b54b12b87c7eee674e0e07a98252946d3e5461dfaf2544796fc931668a614c33804dd257bb1d1cfafb93b7bcd4499800c8c53994f0e5e77 SHA512 4410f23191285f1421297c27ce2a08dd10be00d6cc86f5110e6d3f1687c72f510bbde51b19df3473f0b0867635e3ac192914ee179306244bfe9d9268effc09f9
+EBUILD scala-2.11.4-r1.ebuild 7673 BLAKE2B 99b3ea92ff426f2d154438812af32b261f4ff0ef383e04ab055107fa1864cd154051349b47001445358b1291ff1b5100525323ac31803649151c5d3f03aa6848 SHA512 25b6ad67483d4fba45c7613220b1920c887bbd6865b1818290b4fb529cae69491be6aa85aef74b47e8880b805719c38aef94eb0ffa6e05157f588f0a0b6f81e2
+EBUILD scala-2.11.4-r2.ebuild 7657 BLAKE2B f0229634e3d987fba291f89297f52f5513654357de6f0f582b79be4ade4e56306579f1cec6feb72e63415567aadcf6759fbe9bc7c8fa1059061a371edc0c81ef SHA512 07b86645e7e3aad9dd81d9c1233166b23f3f3aa2094148f229fb3640dee416c451b4d50b2b17c9e788bb65214613cca6a2b76ff9d2a1c01d71dedff790e89230
+EBUILD scala-2.11.6-r1.ebuild 7657 BLAKE2B 30b50bd4afbab6120cd23072f762b0444c80955add077f82ab3ddc26449f1f4373f926677c6897a751fe962b8c114e63163d38ef12ae09e0e8c245aa7cf29755 SHA512 8b40128f3693dfc8489175e8ac79ce1d45880a404577d5416e415ce681087b114c552198ddd09530704fe4eb313ef2fe181151e06c54e65249cf2dc361066f38
+EBUILD scala-2.11.7-r1.ebuild 7847 BLAKE2B 90a0fe6f856c62a96965d9a46bdfff57cd73f0deea580a1bbae48112e22a6c390496358f39688705204fb065198f49c60f4bd9df8984d4ad0a7d5345576ce0ea SHA512 940568d739f42678d9181d108613429c5a5a6bfca5db4b4aeb34c5773505a7b8ecbab5db42d29261baae3973b2530b4886b4d1df883407b5b966ebc0bde42d10
+EBUILD scala-2.11.8.ebuild 7847 BLAKE2B 55f1ae01e1b4265ad52855de5350527512da10a1898f29da41304370b8c5e48741630efa91b2bdf1bad02f5ecf1dc51425010fee72a787d2acc284455aae6d08 SHA512 7ae265e05b3f0cf4300590247bcb92065a6c79a3c1c54f27e1e69481235fb2f57ff3b57b6fd8ad59ca18adcec453a48770f9c274b70cc92def9aee8e4fe9943c
+EBUILD scala-2.12.1.ebuild 7356 BLAKE2B 8b84cb6d082f86b2999e6af29dff5581d671cb9ebb73605c9dfdcfaf5e5feca93a1e7d9a6f26fa9a47bfdeba531af70b3df590dcc00489a7cf0661de79b89362 SHA512 e3ce17cc76e0726241187bff85275f45d1b7645b636ea97c61723f66921a5277410138865c8b8672a7ccf4e60d0bf3c88a3b65c3137d4afebf45edf86452282a
+EBUILD scala-2.12.2.ebuild 7268 BLAKE2B 45b1c9cde361d9a9ed8c8cc24e6471c5e3d6db140794f3fec3a1e45681df620e9d35b9ff40a1dc40af6c311683ebba462975473c0682ee73e8987aca29f703de SHA512 9e4be16fcdc8b774f7e3bf32b0559ff2c0490646fa6a73d64c2af75013fd66624a5560d0bffa298745cd51c763ff18ef6010b6ba2ccd89a75f0391c49d2922c0
+EBUILD scala-2.12.4.ebuild 7275 BLAKE2B 0d0fd9b3598c5e02d6d23180ed2eb3f5297c1f11f6afed71d9248495cbc0fccbfbb16ed06865718e0897bd4003d3c77e741fbbd34a7d647584d43c2aed762eec SHA512 c7d313adc7580a6aed48b1b04ecdc15a1a0698c9568b4dca1039660921c6b47781d54b52cae588c63d1bf6a8598c884094276d61978c2aa77fc43d963d23a139
+MISC metadata.xml 478 BLAKE2B d23bdb99144c333f9ae563a08a78c2ccabdefc22e88207f89c0492c444b574677eeec648a38f105fa8e114a8a8a373dc9487cc36e1eb825cdf814bc1d76d402a SHA512 cca0d7d9cb94bfaad3f93382456248626e83ed8358798ff4b11c600cadee3b88b28b89e914fe5d42c16e170969ded1b35efd1af61953476347f620b9a973d718
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..efef8376a9d1
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.1-no-git.patch
@@ -0,0 +1,24 @@
+--- a/tools/get-scala-commit-date
++++ b/tools/get-scala-commit-date
+@@ -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//:/}"
+--- a/tools/get-scala-commit-sha
++++ b/tools/get-scala-commit-sha
+@@ -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.2-no-git.patch b/dev-lang/scala/files/scala-2.11.2-no-git.patch
new file mode 100644
index 000000000000..56dd69a24b22
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.2-no-git.patch
@@ -0,0 +1,24 @@
+--- a/tools/get-scala-commit-date
++++ b/tools/get-scala-commit-date
+@@ -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//:/}"
+--- a/tools/get-scala-commit-sha
++++ b/tools/get-scala-commit-sha
+@@ -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..f7a78d38c2cf
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.4-no-git.patch
@@ -0,0 +1,24 @@
+--- a/tools/get-scala-commit-date
++++ b/tools/get-scala-commit-date
+@@ -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//:/}"
+--- a/tools/get-scala-commit-sha
++++ b/tools/get-scala-commit-sha
+@@ -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..4bc7b7f9fae5
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.6-no-git.patch
@@ -0,0 +1,24 @@
+--- a/tools/get-scala-commit-date
++++ b/tools/get-scala-commit-date
+@@ -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//:/}"
+--- a/tools/get-scala-commit-sha
++++ b/tools/get-scala-commit-sha
+@@ -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..f8ca464002e0
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.7-no-git.patch
@@ -0,0 +1,24 @@
+--- a/tools/get-scala-commit-date
++++ b/tools/get-scala-commit-date
+@@ -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//:/}"
+--- a/tools/get-scala-commit-sha
++++ b/tools/get-scala-commit-sha
+@@ -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..b577dcbc8df3
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.11.8-no-git.patch
@@ -0,0 +1,24 @@
+--- a/tools/get-scala-commit-date
++++ b/tools/get-scala-commit-date
+@@ -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//:/}"
+--- a/tools/get-scala-commit-sha
++++ b/tools/get-scala-commit-sha
+@@ -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..94cf149da7b6
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.12.1-no-git.patch
@@ -0,0 +1,37 @@
+--- a/tools/get-scala-commit-date
++++ b/tools/get-scala-commit-date
+@@ -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//:/}"
+--- a/tools/get-scala-commit-sha
++++ b/tools/get-scala-commit-sha
+@@ -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..d622e651ef8f
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.12.1-runner-script.patch
@@ -0,0 +1,22 @@
+--- a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
++++ b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
+@@ -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..5c921270bd50
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.12.2-no-git.patch
@@ -0,0 +1,23 @@
+--- a/project/VersionUtil.scala
++++ b/project/VersionUtil.scala
+@@ -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.12.4-no-git.patch b/dev-lang/scala/files/scala-2.12.4-no-git.patch
new file mode 100644
index 000000000000..0114e1d42b9e
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.12.4-no-git.patch
@@ -0,0 +1,37 @@
+--- a/project/VersionUtil.scala
++++ b/project/VersionUtil.scala
+@@ -2,7 +2,7 @@
+
+ import sbt.{stringToProcess => _, _}
+ import Keys._
+-import java.util.{Date, Locale, Properties, TimeZone}
++import java.util.{Calendar, Date, Locale, Properties, TimeZone}
+ import java.io.{File, FileInputStream}
+ import java.text.SimpleDateFormat
+
+@@ -65,18 +65,13 @@
+ val log = sLog.value
+ 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 = "c2a5883891a68180b143eb462c8b0cebc8d3b02"
++ val cal = Calendar.getInstance();
++ cal.set(Calendar.YEAR, 2017);
++ cal.set(Calendar.MONTH, Calendar.OCTOBER);
++ cal.set(Calendar.DAY_OF_MONTH, 11);
++ val date = cal.getTime();
++ (date, commit.substring(0, 7))
+ } catch {
+ case ex: Exception =>
+ log.error("Could not determine commit date + SHA: " + ex)
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.11.1-r2.ebuild b/dev-lang/scala/scala-2.11.1-r2.ebuild
new file mode 100644
index 000000000000..e2bdb4138ba4
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.1-r2.ebuild
@@ -0,0 +1,216 @@
+# Copyright 1999-2018 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}/${PN}-2.11.1-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..40bafa3a7db5
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.11.ebuild
@@ -0,0 +1,224 @@
+# Copyright 1999-2018 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}/${PN}-2.11.8-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..200cda5accde
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.2-r2.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2018 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}/${PN}-2.11.2-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..5ff29fa215e6
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.4-r1.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2018 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}/${PN}-2.11.4-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..6015a9c1b7c5
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.4-r2.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2018 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}/${PN}-2.11.4-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..b31e50091cd4
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.6-r1.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2018 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}/${PN}-2.11.6-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..25ec70aafff7
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.7-r1.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2018 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}/${PN}-2.11.7-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..ae3518042cf2
--- /dev/null
+++ b/dev-lang/scala/scala-2.11.8.ebuild
@@ -0,0 +1,222 @@
+# Copyright 1999-2018 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}/${PN}-2.11.8-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..f38b2a17af21
--- /dev/null
+++ b/dev-lang/scala/scala-2.12.1.ebuild
@@ -0,0 +1,213 @@
+# Copyright 1999-2018 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}/${PN}-2.12.1-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..838d1769cc1e
--- /dev/null
+++ b/dev-lang/scala/scala-2.12.2.ebuild
@@ -0,0 +1,214 @@
+# Copyright 1999-2018 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}/${PN}-2.12.2-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.12.4.ebuild b/dev-lang/scala/scala-2.12.4.ebuild
new file mode 100644
index 000000000000..b36402420d49
--- /dev/null
+++ b/dev-lang/scala/scala-2.12.4.ebuild
@@ -0,0 +1,214 @@
+# Copyright 1999-2018 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/jline:2"
+
+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,jline-2
+
+ 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}/${PN}-2.12.4-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}"
+ export LANG="en_US.UTF-8"
+ 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/smlnj-110.75 b/dev-lang/smlnj-110.75
deleted file mode 100644
index abed63f5a5a9..000000000000
--- a/dev-lang/smlnj-110.75
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=compile install prepare unpack
-DESCRIPTION=Standard ML of New Jersey compiler and libraries
-EAPI=4
-HOMEPAGE=http://www.smlnj.org
-KEYWORDS=-* ~amd64 ~ppc ~x86
-LICENSE=BSD
-SLOT=0
-SRC_URI=amd64? ( http://smlnj.cs.uchicago.edu/dist/working/110.75/boot.x86-unix.tgz -> smlnj-110.75-boot.x86-unix.tgz ) ppc? ( http://smlnj.cs.uchicago.edu/dist/working/110.75/boot.ppc-unix.tgz -> smlnj-110.75-boot.ppc-unix.tgz ) sparc? ( http://smlnj.cs.uchicago.edu/dist/working/110.75/boot.sparc-unix.tgz -> smlnj-110.75-boot.sparc-unix.tgz ) x86? ( http://smlnj.cs.uchicago.edu/dist/working/110.75/boot.x86-unix.tgz -> smlnj-110.75-boot.x86-unix.tgz ) http://smlnj.cs.uchicago.edu/dist/working/110.75/config.tgz -> smlnj-110.75-config.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/cm.tgz -> smlnj-110.75-cm.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/compiler.tgz -> smlnj-110.75-compiler.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/runtime.tgz -> smlnj-110.75-runtime.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/system.tgz -> smlnj-110.75-system.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/MLRISC.tgz -> smlnj-110.75-MLRISC.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/smlnj-lib.tgz -> smlnj-110.75-smlnj-lib.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/ckit.tgz -> smlnj-110.75-ckit.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/nlffi.tgz -> smlnj-110.75-nlffi.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/cml.tgz -> smlnj-110.75-cml.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/eXene.tgz -> smlnj-110.75-eXene.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/ml-lex.tgz -> smlnj-110.75-ml-lex.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/ml-yacc.tgz -> smlnj-110.75-ml-yacc.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/ml-burg.tgz -> smlnj-110.75-ml-burg.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/ml-lpt.tgz -> smlnj-110.75-ml-lpt.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/pgraph.tgz -> smlnj-110.75-pgraph.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/trace-debug-profile.tgz -> smlnj-110.75-trace-debug-profile.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/heap2asm.tgz -> smlnj-110.75-heap2asm.tgz http://smlnj.cs.uchicago.edu/dist/working/110.75/smlnj-c.tgz -> smlnj-110.75-smlnj-c.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=1647467bcfccc78ad29492a11b9beca7
diff --git a/dev-lang/smlnj-110.82 b/dev-lang/smlnj-110.82
deleted file mode 100644
index 264cccbb6afd..000000000000
--- a/dev-lang/smlnj-110.82
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install prepare unpack
-DEPEND=pax_kernel? ( sys-apps/elfix )
-DESCRIPTION=Standard ML of New Jersey compiler and libraries
-EAPI=6
-HOMEPAGE=http://www.smlnj.org
-IUSE=pax_kernel
-KEYWORDS=-* ~amd64 ~ppc ~x86
-LICENSE=BSD
-SLOT=0
-SRC_URI=amd64? ( http://smlnj.cs.uchicago.edu/dist/working/110.82/boot.x86-unix.tgz -> smlnj-110.82-boot.x86-unix.tgz ) ppc? ( http://smlnj.cs.uchicago.edu/dist/working/110.82/boot.ppc-unix.tgz -> smlnj-110.82-boot.ppc-unix.tgz ) sparc? ( http://smlnj.cs.uchicago.edu/dist/working/110.82/boot.sparc-unix.tgz -> smlnj-110.82-boot.sparc-unix.tgz ) x86? ( http://smlnj.cs.uchicago.edu/dist/working/110.82/boot.x86-unix.tgz -> smlnj-110.82-boot.x86-unix.tgz ) http://smlnj.cs.uchicago.edu/dist/working/110.82/doc.tgz -> smlnj-110.82-doc.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/config.tgz -> smlnj-110.82-config.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/cm.tgz -> smlnj-110.82-cm.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/compiler.tgz -> smlnj-110.82-compiler.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/runtime.tgz -> smlnj-110.82-runtime.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/system.tgz -> smlnj-110.82-system.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/MLRISC.tgz -> smlnj-110.82-MLRISC.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/smlnj-lib.tgz -> smlnj-110.82-smlnj-lib.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/old-basis.tgz -> smlnj-110.82-old-basis.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/ckit.tgz -> smlnj-110.82-ckit.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/nlffi.tgz -> smlnj-110.82-nlffi.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/cml.tgz -> smlnj-110.82-cml.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/eXene.tgz -> smlnj-110.82-eXene.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/ml-lpt.tgz -> smlnj-110.82-ml-lpt.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/ml-lex.tgz -> smlnj-110.82-ml-lex.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/ml-yacc.tgz -> smlnj-110.82-ml-yacc.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/ml-burg.tgz -> smlnj-110.82-ml-burg.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/pgraph.tgz -> smlnj-110.82-pgraph.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/trace-debug-profile.tgz -> smlnj-110.82-trace-debug-profile.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/heap2asm.tgz -> smlnj-110.82-heap2asm.tgz http://smlnj.cs.uchicago.edu/dist/working/110.82/smlnj-c.tgz -> smlnj-110.82-smlnj-c.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=f0534af066f5095e7a89fd93d495cf54
diff --git a/dev-lang/smlnj/Manifest b/dev-lang/smlnj/Manifest
new file mode 100644
index 000000000000..a33322106a82
--- /dev/null
+++ b/dev-lang/smlnj/Manifest
@@ -0,0 +1,52 @@
+AUX smlnj-110.82-pax-p1.patch 5812 BLAKE2B 0b040462d910b769d1ee59aa240c78583a8cf708558cdd87b13b6795cc5fee67b8005db618e0320a64d5f86bcc47c9e00caaa398f664852667039312e9f87f84 SHA512 95a83772453997539fccf88b34d3afc436f4c3737a0d1e16d0c5dc4ce219aaa1f7b378fbfdc7c88dde23a9167678d99198e8668fe98547a15eb06abf1d14c368
+AUX smlnj-110.82-pax-p2.patch 7423 BLAKE2B 93e3ab5de34c729b5977ac08ba1172db66a044ca6de910404c2365dba11d5224c421cfa3f0b9978fdb80ebd822f3840170455840d08ab7139e7f1bbec4717735 SHA512 918c2b741ed2ee6d1be156489b0c085221587c94a02dcb915a69499c9bf64cba77f74cb92bcbf759f96f2dbd5bb114e026c62c52160643bc77f09206ffffb33c
+AUX smlnj-110.82-pax-p3.patch 8416 BLAKE2B 3b466d7a10709572b17ffd86b0bbfd8cb0b68d3566be183fd38b1821f2c0d59dd46a45de14bee1c0a0c0567c5b16076f5ff2493ac9fbe7600f2dea1fa1979fc5 SHA512 a9c920855fac7e41c6a7107ed3d220d1d64938d9865e66ecd91a2021b75035601268db408b944d5a9cd357afb70d2fa9b744a860e8c4731ef8946f23076565c7
+DIST smlnj-110.75-MLRISC.tgz 1422655 BLAKE2B 0b4b0575647cafa370bdd650cf44ab2033c2ba8c39e94d1cf9c5444b44c06e3f26f6ee033cc26bbfbf79700070fd1ea535408607ab370af6ef1b7841efee90cf SHA512 d1c9bacc135836bc83e5a0f99585d2c8007ecb2eaa9217489c9d5b2a845f82a48f3666b72ae59a016dca3b66bd56c9739461376e2ac628d01646182990e93c84
+DIST smlnj-110.75-boot.ppc-unix.tgz 5772853 BLAKE2B afb4628af5ac15d149680a8c1fa309cb8fd8518d5b8e82350e3f06288b03ab25d06f3510a97880b2fe2c6e03ffec481f836726f81243180ae5696f7e7a16f0fd SHA512 cf34f084a7bca7c1d5c21fa9f356be0224ec886512a44f3dfea0cb9e1af9954662ae6e602250e9c834ccc6e1d3556ff1839a28505776038183b7b77bdb9d6dc7
+DIST smlnj-110.75-boot.sparc-unix.tgz 5900426 BLAKE2B ea11256ebfb2cafdf1ae785a3a4b84984cafecd1a07132fddc66e37a27917339f84cfc421881ba5ff1285738b5d749afcd012ace76e1df07f371b3702ba7d66f SHA512 19f26bb68d94f03dc5bde68b36c4d6efbe9efd25fe089b3ce16f2ff2baa499af79d18ce2d834900bcf3e709f64c00cdacca149d0cf264fe86c23f93fb94dc1fa
+DIST smlnj-110.75-boot.x86-unix.tgz 5848139 BLAKE2B 66127fb2a7ca1699447fbe65657c099d2091cc8b94ba82158f83b9ceda57fc972a033736fa866ed56da92d148edea30db0b61cbfda47e230d60c0049f42601ef SHA512 9d482b6546792936345ba54616e74550feb34a8629c547bd095b7f3d70724d8f652118ed41436a3d2f6a1965a81ad59417ae0021b45bf2e52fc4f338a3f5f051
+DIST smlnj-110.75-ckit.tgz 194523 BLAKE2B 65f2d753856ea32c0de3952b56f0b8c62cb17e855eb957d4b0ae08ac537ed28bd7c05bd6d0f9f9bd9a605cddfb0832c5e69551e2ae522dcb4c49f386c260fe7d SHA512 79cfb8442e5a95418404b94b82981d93cbbac67d70712814a49a53ef97360b8c7ba6ec13ad79b84182d1c6ddb613848041836a947c1ab4a45d822cc7e94f8403
+DIST smlnj-110.75-cm.tgz 200429 BLAKE2B 005c2205114f2b25a73e85e6232784a180f61f2402defef66fd0233c49139478304b27218d88a35f7bab02380b37c1208292e821fe55066cec73a878c8c9ceef SHA512 52b05e0497f8dafd415e42522a42bed5a96b9fbfce09430c914d987cf4983386a3a89f9a8aa9e67163af1428e387cd11f85207f2250083eaf3363e176921aff6
+DIST smlnj-110.75-cml.tgz 105902 BLAKE2B b4c1704e29b31525c4f960894b44335719d82569e2e3098248d325b80b08fc16ea762a3126f478a4c561560b85346ac556177964973f222f173a1ea30932037d SHA512 22237c41a41c5b006ce80d57ef759a5825bf6156296f8755352dcda95c4650e5efd87c554959554bd42673996438a448cb5fab614ccdc7d9e2798a846bfcc2e5
+DIST smlnj-110.75-compiler.tgz 816964 BLAKE2B 77d5309f448bc4814d789ab7b051cf3b9d3084dce6c3bf5e9b42799e94c3166554faa80148018ab13d6e17e69608d5795714d0ece9568f14cabaa682cbf8cf12 SHA512 ccbbeb2a7e7107c1406a14125d89bec86ebcf8478e8d01f61f1fb6d77d58040c2e85ef620d438321a7a4595d7f3662a275809b93db15c1320a38597130f6d39a
+DIST smlnj-110.75-config.tgz 511117 BLAKE2B 94dc16d2ca0c91b8183570b604e34f35f182b02956e9e5cb13c302c7301b7171f47900988fe85fed1204555de5162f24dd96f2ee45f88185267bce75d7e69234 SHA512 e1d5d2e169dbe799a64d983359e52acf326fae4f18c7c2444d94d792bd383365ac6a0c382dac3ed94ccbb8f8b29ba785517a6f94ee5f733b9a06ef0da85537a3
+DIST smlnj-110.75-eXene.tgz 703097 BLAKE2B 9758b695382fea45ace90d3bddfcd0e056adc601cf9e869a74ba0881bbd2e2a61bab1c414e8ab0db45e2568ca96c500c316c0bc34e96b1fce8e48a0234756a86 SHA512 091fa935d731c4a07934a09a5b28c99bb1f79407ceeb3f68b4dd8877d0b29042f56afaa4f0d5a048ce0f203d185972622fefcc701f8359677e28d06953a861e8
+DIST smlnj-110.75-heap2asm.tgz 1315 BLAKE2B 1b97598cd91bd0fc0f6108194904bf3d75c240ddf4dbcc1c013fdc4d1524f5ae9c5514d2cb41184b0afec6162cd6d6742a355195891fbd477e262d224a0d97b7 SHA512 d2578a32c99ce5e81904eff7203df9550c4539be43a0a3252109fb2adc4862864c70c37ba89b2ebe68fdb21171430b4d13e44fc4860639ef960e81f01ac3749a
+DIST smlnj-110.75-ml-burg.tgz 36339 BLAKE2B 951c32257c062df18002ac19eaed926591d043c3139a0cf5952486dcfd1131ef28fe4f0ccc34522a4eef224fae7d87cc3131dfa68915768b481980e11aba5447 SHA512 a38a73c76e9b482cbec396cd445c058ef0db5e732900ee0597e52fd3af97acac5b78629af1e8e038b9cb9a403beed7524345c5e38f4a49b7602d73daee8fea2d
+DIST smlnj-110.75-ml-lex.tgz 33154 BLAKE2B d29697bdcabedf362a81066d16320105c4bc7ce95cef115efac39ae4fc47ac7c0367a241ada1f22211f9ea1a9665f52db1114671437dca674cbbbf87dbf585ef SHA512 2840117c2891d09acb762cd7f161a15cd9351478a007d08c8d1c2be1e828b1175fb31f427e0a6eeb96cbadf7b92da1dda23b3ff3a7123c1c800892157fd58fa6
+DIST smlnj-110.75-ml-lpt.tgz 256313 BLAKE2B 951720bbe503ac7aaf0b7256704d1467fead987bffc8e4583864e622869cd2eef2c5d4c948993d4e1d165432e6f338f12a853dc3daa9b1ead953d9f6c1cee9b4 SHA512 b36b8250862d0d9eb6e4576ab47e20b535095c8ab7c1cae913f7e8748f7677cf89dce0061fabe56dbda0df3ae0311970adbb0bd96630aa638ea5652277d978b6
+DIST smlnj-110.75-ml-yacc.tgz 99940 BLAKE2B 651632bd4f26974fc66b0f29e425ede410a0fd5d10a6a55db7c920280187492b36e501d34a03be45035f9616424dcdff92414eb123bec64661879af978c50900 SHA512 930dc545e49769a3d153753e19da1352fafea621f17d86881d5454d2d27f601e517fec09bd49ec732db4d311621e6cf8c26f714b095b9e07147bbe3b6ec885c2
+DIST smlnj-110.75-nlffi.tgz 74481 BLAKE2B 94e107ca081f0e77875d6d1b7b7aecb4c94dd73a7b39feb2e8f47ed5ad2dcb70bbd60055f54c3f69995a82751da543d628faa34b19f1227b72c245b35b7b8c2e SHA512 bfaa0e4ddc43d3695ef2be5cc74218435f6004b99a07ec585ec65158eaeb22ac7309ee9d584e880048655eb7110866ec25055fcc196b5d904510cf0c4c498eb5
+DIST smlnj-110.75-pgraph.tgz 5439 BLAKE2B 592b8e822717cb8103d9e5a0853b884234ed2dbfa1f2d040c096a33dcc94b5370e62300d0b6ce523f7523df57a0858ef1ad3348bcc431388b58760822850566d SHA512 cf8de19c5d3f258cc6fa145d837bf8e307e04577ab45e20861f53fc47612c2238cc5c1964ad3f1697dceb1d56b84c1d0d1e9ecd5da8dfb7ad24b1946b82691e8
+DIST smlnj-110.75-runtime.tgz 324054 BLAKE2B e173cdd772785f678c74f44e673cac6cc3d1040a80d2e1ed0695cd23a5f5ef283b0fbc67d6585d383bc9cbd186f5780004209ed90e59220baa202ed22b35f74b SHA512 65b05ceb31d719874c5b06ebaf4179c1e1b12da648635332eb4bdd5ffc5af86a00f7e8c45062d9f03e9a445f9eefe741c92f7ca207beecf31733a3a849902aaa
+DIST smlnj-110.75-smlnj-c.tgz 10531 BLAKE2B 602a7b98690277c7311080d46c5e3aceadd3daa2a1b1b163aa80db70ed65abf74cadff689abcf9e60af916685700ef2db24a1632bb6d92040f6e432ce13927b3 SHA512 ada4f0055f4f3f49c05ad4b55edfbda6cc7534491c1d304d7f51977170a3f68f367e1cba6a75d145b2ba497ca25bbb793c84f0bc7eeea0ad9657eecd72f85b87
+DIST smlnj-110.75-smlnj-lib.tgz 396628 BLAKE2B 62ae526edb69b3b7695039ec27d33b09200fc23f51b190dc4bc445888693be258fbab5853df6c565bd2fc9a32ada772bfb19846c7190ac912165d4f219640a65 SHA512 47d20c09fbd0a6e59db429e02b55b6307f5c61a9166bfc839261a21267da6e4ca0f99aa1080b2a8556a6046818177ad61b854a2dac0248b17a2ef79eac4ad35d
+DIST smlnj-110.75-system.tgz 227376 BLAKE2B ee1d9c5880a3168a30bd8eb6543b17fab81131ae8a58978511ab4ae5aa6add32092868cb39b8bca3d85308f661ea02c5e3a78311232a6b12c12a89685aae8e17 SHA512 ee6a941f269d51bdd48328c35ae642d6b5f35ef7e9516fef58fad7f6ac3b4a527678265eb7a8a9783eb5e483713fbade17cd6e204234fb9419ad430e42a536a4
+DIST smlnj-110.75-trace-debug-profile.tgz 3902 BLAKE2B 54e5152b250776806b1f3a086fdf2e684b67b75b5505bce253deb7eebb4339259ca77a737a9ab0c25f7f92bf8c19055659a73d8ad120f932f8bab61e5f362d18 SHA512 b2eed46e58f7b2dd6857debea4ae329dcc79946bd59a63747746d916b2dc29866d3e23a3accd678a981f2ebed0924d1fe1d03744000e877313abc33b144ec694
+DIST smlnj-110.82-MLRISC.tgz 1435372 BLAKE2B 1b18539d98a7339fc4062ea0e2afaddf67f6195719798a6041f456b904b6476f6c830c4529e9756040a6bdce32d5e6b271bd73d7f89c1df05df42e0030b6dc95 SHA512 23c0e4cb8432d39b4df8e51d06762c96ae6223a860bacb15e07020b17d7020667f5a8b1ad62b1ed17ff97f3f8fcee4899b70ac62979f12a4d7fd470fc968f3a0
+DIST smlnj-110.82-boot.ppc-unix.tgz 5666299 BLAKE2B 6c0e7dc0408f731bc2b26d3d962e88c5c2d678fb1ac5783e7252cb8ae6b26b98a3a9a4fe8e135198c3260f5735be4e98db123d4baf6cee620b8fe85780ab0a80 SHA512 5b3491ba2d264716579ec6070d063ab707aa04a4e74fcdb8ab47632e0660b15dabf3502719374dfde101583ebe4a88590792a8c790a7f4bb1c010ab907738569
+DIST smlnj-110.82-boot.sparc-unix.tgz 5788662 BLAKE2B 623e30a97714e83487085a83261f571a91ab587f5d7741363bde804941dee7348b2e9546292ca022e362524f0645f7aa8c019ccdbe786fa4c0348861e49ad556 SHA512 d719c5415c433f7aaf3dcc53f748ca6839e62a54819e4e66e26470104edc3fb7e960595e7ea859f1507f7da792fa52ecaebe4e703534a96f6a8dbfceb29ad8b0
+DIST smlnj-110.82-boot.x86-unix.tgz 5735380 BLAKE2B 1624e75f8a6518408cae8ccf36b5f2f4348bb8553794725b7e509636cfd62fed5ebbc2b9e29ce1eb5ec9f5264381dd93c3de1ccd6c22edb4bf9026f599046d02 SHA512 e1371c11d083c61f747b8f8154c60612853aa2387450b0abbd918c6096f05519a0258cc8a8744f1b486e5b8e984ce3ab5a4bb454a2d14c2d5a74aea41220d428
+DIST smlnj-110.82-ckit.tgz 194555 BLAKE2B c4dfab41c02f21ae088c7ca10c5c40c1f71bdc9f6b8b2721e10ac25ac4351c57359927f111f0801175ed32e8849e01ae83fb58758bc34203cb605c74dea109c7 SHA512 d753d22c2f382d8b91f34f7e6bfcadc8ff5cde051909d3344eb1eaf2adfaaa75420d31cdddfe1cdcf77cf146dc5800cc05fd0896c5942b6edf12533661d09459
+DIST smlnj-110.82-cm.tgz 217857 BLAKE2B f7d142bfa4fd2666ec2ddc4ef4c0bec90063d6e7c711b8435bda116c61197943964712bec490f765f5abfe8dc64d270b41cf8521ad4e9ee9a8536cb1be1317b0 SHA512 940436242ca5f077b03ce9e5b9fa5b6e4c7fe6ddbefc628644bdef9c5e672bc4ba50aa6814c0715d364d9d1f5ef29231e42ba11d34dc8a70d95f023874b46f43
+DIST smlnj-110.82-cml.tgz 106141 BLAKE2B 3ffdba33d9a84e796d48248cc2c6eeb33e7bd560cf22dd212ca4b0892f5144458adb02e8a4f933fe11a034b46e885e65927340891ef1c095107726af40edf6b9 SHA512 2fe4b64c61c2228bf6439dbd0403a068151115358d9caebdf9abf0f18ada37c77492e4debb02af0fcddda0504e280e8574144a974d74b5f877a8dbe747f18680
+DIST smlnj-110.82-compiler.tgz 825030 BLAKE2B acd15722ef1f286119dec556e031b6b618773cc78516108a71d3d616cf70b12c2ab600056915a3ec9a5260cee35854ab24c2b509bd2990564d595d010ebabd86 SHA512 775407372d85d9a6c45cc49ee6c35503d54d9f737c9c6994d4e5c9ed7eb6d48e4d9e57fa187dbc154135d478adbdc5f2abd04346712ee989fc7f022c4e670ef7
+DIST smlnj-110.82-config.tgz 511859 BLAKE2B 5c1419a37ccd5646b797ea5db25766f2c361df2b9195e552bfbb2dac97d4b55dc17bbeb0f483d1fc6e66767bf5de055e4bf0faf37092f95abbe133b681fd8381 SHA512 425c84a6a1c824008d7fb4936134df2e9cbe9229eba9ce4a81fea694659ae0d63024f1e291500b57a3e57828fdb9be791fa6abb13253a3b9e5adb9fe52a1e6d4
+DIST smlnj-110.82-doc.tgz 198542 BLAKE2B a566528ac32de141473da6641e7b3c3ddbb1614aac9e41508aa5fae4d7b6a198efc3bdb2e29f38ef20f2c14183a09fee1a91ba1ad8e34591642a10d213b5b19a SHA512 2d1a464f57d1321dad3032f591b06ac3e87130fa6403fba7a45312de0a6c29bcc2afa7e6d0a130a83abe1a6ae7ed19023de11d270bc25dbc66d9f51d8ffdfacd
+DIST smlnj-110.82-eXene.tgz 703173 BLAKE2B 259d1a2b6fe42a44789e0cebd5ef9adee6f5a36133df3b462d6fdfab364a2721e89b9b352b812d97ccce455af1f05d641a7bb74c424301f42e0ea9d876cfea66 SHA512 ccfecf09863bbb624d3397a44d6e0723cef7f27dff4ed9dc13dce8aad9a9f05a9008d452096ac8bf456be46a235e432f8017fe13129085905fe97dad32217659
+DIST smlnj-110.82-heap2asm.tgz 1321 BLAKE2B 2efe4425cdeed930e6d9c03347e92546c6cf57aa2955881bb847386427bb1f185612ba829de3be0cb15f5b565c289a6dd69b1a2b4748fab6e21fc24cd0499f5e SHA512 fde524f00b8cde5ea188eb7d3003c242b4ebd37ff583bef79e788c46472d842900ced3dbf50012d8ba1abdf2fd1492ea5d1fad6cec3cb19fd59617052e814b80
+DIST smlnj-110.82-ml-burg.tgz 36350 BLAKE2B b267d711cd92750207a0ec6468d071903e34c0f6f88169213b58490bde7f04440a1b7144c8cd9c8fa10e5706512815f5043fef435565a902a81ecb8e8f5f7748 SHA512 737caf8df11f8d023d98a325bb30c6606b16630c263e82440c1f16e3f4a2c90a2673798782d5e42b0d80b5f10dde95cc41ac99d92f195577f47ab326b3fac745
+DIST smlnj-110.82-ml-lex.tgz 33170 BLAKE2B c706899dcdb2751aa10a25ceca510b6bbbb1cac920719cd328e15f60f21b8929d17ca98f612cb37271f9cba2472ea7283e3a84b7d935bd361e599b668d0ca466 SHA512 c126a76e33678d214034beb6777ed4f466ffa63433bc953cbdacfed523aa9f8f6166a162632a49f538bb71ef24c1f4feeaa6278d539b258ea1e0f4ed29fb102a
+DIST smlnj-110.82-ml-lpt.tgz 264854 BLAKE2B a6bb9d92077c98115b6592a549534d54323c6f1d44bfab1c4c01aad13d47ba098892405b3a4db9936cdaf711b2e8196e7abffeb8ef662b7d8467019816102033 SHA512 4b09262582336d2f1506d37ce8cfce3284fa8bd3e90b18872e8d24e27226f404c944668f45f5c49aa492a3c6e4a0a732b08ec9c5d4b6d036332b35813be5cec2
+DIST smlnj-110.82-ml-yacc.tgz 100039 BLAKE2B 0cf4caff0a8ed98e03b324a1b984fcd248e234e1ea7284d927144bb853017c42ec1d9f587d1039081536b6142a0b191ea4024bfb3de3a943f8e621edfc9b3181 SHA512 d527eaf4e2de72076996fa1fc9d415dbe9735bcff7c8be3f8b095ed51c19f426b702d2034c6bb39990275c04e59dfaa1e36606dcf20e7f4fe1aee07ec5116428
+DIST smlnj-110.82-nlffi.tgz 74495 BLAKE2B 00c7dfb0b3678d82cf073e55cd08b447184282005053c75e6f24a9581a4a975c9259e14dcf584dcdf9b32e1fe2b8773c08bf36327ced7d994748ac9750d56e19 SHA512 e24815787bcd57da97cb149d5c7521dba658f0fff88927332d658c40627bc0fbe517cb6cc4d27bb7f624dcf705c75e882a5fe765266b2ac2241b2e0948ab0043
+DIST smlnj-110.82-old-basis.tgz 969 BLAKE2B 9923870b31b6301d51d0663d243ec476132c7f3ffcdbdba94f9397b796f5fb5fb2dd8fda4fde17c6b74a4fe52fd80ed2c5153a44ee9f1e125b6ad1844447efe6 SHA512 140441f3c83811eda603ae876fec80e2e213129e7d73e57e68235feca2e4d964b6768cdd406ce58422df0f18479d53e45f58f4d3ae450c03aab41dd933cb275c
+DIST smlnj-110.82-pgraph.tgz 5447 BLAKE2B d7d4807392cf47327b34e626d33376d387befcf0758f2fbc43f49a400eef6684e7fa6586d4c55e3c47731224e37cfbbf0d2b28cdd34c51fbfec519748feb2d73 SHA512 450335c2627ca92be2af48ad701b65d71cccf5b1511d41e6cb66d0cacd767361e914a1f00f3a883e0bd6a1a3438451bfa801d087e438932f6ea1e38397ffc226
+DIST smlnj-110.82-runtime.tgz 338575 BLAKE2B 27e9aa2764df9e525ff55dfc726bb9505e7aabae75aed564271081daf5a15ed7f4521042b221d50a555de56234cf24ffc9847efe9211e063b0298b422286b318 SHA512 f1aa053cedb38c64f5049079a9c7c5661fedce379f701f43a3ac104f2d305141d229c06420e986cd6f5449b33e376fd8fce219cacadad510a75df8e51d03485d
+DIST smlnj-110.82-smlnj-c.tgz 10544 BLAKE2B 6c096fbb8a8f135ac0fac1b4be6c4e4521dd0321c3a40c48c27218854104a2420049989968ef7866c2bed58e2beb55071d71fd363fb18fa830f6272f7faa7b02 SHA512 a1beef650094abbce6412bad7ffd7d18114e4b0394eea2df7261a93dc9336873e7ac89d1b57218f43663bbb1c7effd314d0517ef918207d362e057c00c44aabf
+DIST smlnj-110.82-smlnj-lib.tgz 449307 BLAKE2B aa6d21c608d89fc8696075ad13fa5179ee9a80a54f8dd8a446fa148065807a4094048b6da3537c222ff59cf0a6f837706cb6797d0873ac126ca0a3d743b5c7c7 SHA512 9e85b09e8bb4b253da7f0bea44bed55792a022967aa550e3ab0203566b84c6b8e126d91d4a0365c9bdb618d8e5bc1643ecd74ae30d750ff002d81dfea1c809ed
+DIST smlnj-110.82-system.tgz 240758 BLAKE2B 0903bd45a042c4cc5d327a88680f33f44128c1c9c929699813e3c7ba9b88975407b0b7b37b9048090c043485e8f144207529b7575904aa197122851d877b42b9 SHA512 b39fd42fd7418dee86accba9759dc3bb61234ff66ff695a2487c0e98b5640d5256e14edb7e23c8541e17ae35f7c9b27c7c1551d448c1383f61c33b20585a7662
+DIST smlnj-110.82-trace-debug-profile.tgz 3911 BLAKE2B c025b55430519123f4fe7907d45184cd31d0d72d89e1c5f0b8793fa4c59089b7e10f73c740b0eba3bfb39d2ec0e709a9f43482a6143d93b5128239833ca18619 SHA512 47af805b930d0c540139062c3ce3d1ba504e918c2f7817cad52bbae9e16ddc1dfea96f3058ae74afd247113101d59617d2098bfab8e38c701616c12f4610855e
+EBUILD smlnj-110.75.ebuild 2560 BLAKE2B 706072bdccc0e55cdbe95e8e666aee93bd41bf7e1979f549efb2eca13087ede6897099bde143a0f5acfcaaa485587a3b8d6e8f85e0c011a8aa793c6556c8f870 SHA512 fd577e8aedbfcdf06eee98a8daca6962c6ee082354a484ef08f385cf3e7de7790f5d10ee427d162a0fc3d9e08a002a7abe208992b847994898fab826dca034d9
+EBUILD smlnj-110.82.ebuild 4204 BLAKE2B 44b04a0b1836c33d7f7a039e807834b7299e0b25daa3616dada6e3619ba8ba5f597d10582f5aa80dc6c20010ae32df820b493729739332e13361f63ed8ead3d5 SHA512 25d8c7a2cd75c559cf2c10b0b8d9f58563f0d572e70d3d93c3bf2548bb847a0e1c6a3268960eae35d367ab04af8ba2ccc9bdd706d85a14bdf06ea28aed2cdc26
+MISC metadata.xml 373 BLAKE2B ea1dbe3474cf752c4973d3f87f843dab3ad9f4ea5a450e96b1ce6903e5461cae25b1905004e47e243ffb42e954a8f68dc8cd704d732c8f8b11343e0e409a0937 SHA512 4ec9def62221776e09f79f8c294b1f7ed0cf52b6951ceeb5690cec63c18fb5b699e6754510864274e214c7a130cb7c86f0f408a8eb233b7ec06ecc69305b1d03
diff --git a/dev-lang/smlnj/files/smlnj-110.82-pax-p1.patch b/dev-lang/smlnj/files/smlnj-110.82-pax-p1.patch
new file mode 100644
index 000000000000..d0291c9118a7
--- /dev/null
+++ b/dev-lang/smlnj/files/smlnj-110.82-pax-p1.patch
@@ -0,0 +1,116 @@
+--- base-orig/runtime/objs/makefile 2012-04-18 10:28:08.000000000 +1000
++++ base/runtime/objs/makefile 2018-03-10 10:21:07.417776270 +1100
+@@ -12,6 +12,7 @@
+ AR = ar
+ ARFLAGS = rcv
+ RANLIB = ranlib
++PAXMARK = true
+
+ #
+ # dummy version
+@@ -114,6 +115,7 @@
+
+ $(RUNTIME): $(VERSION) main.o $(OBJS) $(ALL_LIBS)
+ $(CC) -o $(RUNTIME) $(CFLAGS) $(LDFLAGS) main.o $(OBJS) $(ALL_LIBS) $(LD_LIBS) -lm
++ $(PAXMARK) -m $(RUNTIME)
+
+ $(RUNTIME_A): $(VERSION) main.o $(OBJS) $(ALL_LIBS)
+ rm -f $(RUNTIME_A)
+--- base-orig/runtime/objs/mk.alpha32-dunix 2000-06-02 04:34:03.000000000 +1000
++++ base/runtime/objs/mk.alpha32-dunix 2018-03-10 11:31:32.572918457 +1100
+@@ -10,6 +10,7 @@
+ LDFLAGS = -non_shared -T 20000000 -D 40000000
+ AS = as -nocpp
+ AR = /usr/ucb/ar
++PAXMARK = true
+ XOBJS =
+ XLIBS =
+ LD_LIBS =
+@@ -20,4 +21,4 @@
+ RUNTIME = run.alpha32-dunix
+
+ all:
+- (make RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" AS="$(AS)" AR="$(AR)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ (make RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" AS="$(AS)" AR="$(AR)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.alpha32x-osf1 2000-06-02 04:34:03.000000000 +1000
++++ base/runtime/objs/mk.alpha32x-osf1 2018-03-10 11:31:32.573918461 +1100
+@@ -8,6 +8,7 @@
+ LDFLAGS = -non_shared -T 20000000 -D 40000000
+ AS = as -nocpp
+ AR = /usr/ucb/ar
++PAXMARK = true
+ XOBJS =
+ XLIBS =
+ LD_LIBS =
+@@ -18,4 +19,4 @@
+ RUNTIME = run.alpha32x-osf1
+
+ all:
+- (make RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" AS="$(AS)" AR="$(AR)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ (make RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" AS="$(AS)" AR="$(AR)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.amd64-darwin 2017-08-23 04:41:35.000000000 +1000
++++ base/runtime/objs/mk.amd64-darwin 2018-03-10 11:31:32.575918471 +1100
+@@ -14,6 +14,7 @@
+ CC = cc -m64 -std=c99
+ CFLAGS = -g -O2 -D_DARWIN_C_SOURCE $(SDK)
+ CPP = cc -x assembler-with-cpp -E -P -std=c99
++PAXMARK = true
+ XOBJS =
+ XLIBS = ../c-libs/dl/libunix-dynload.a
+ LD_LIBS = -ldl
+@@ -28,5 +29,5 @@
+ RUNTIMEX = runx.amd64-darwin
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" AS="$(AS)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+- ($(MAKE) RUNTIME="$(RUNTIMEX)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-Xlinker -r" $(RUNTIMEX))
++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" AS="$(AS)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIMEX)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-Xlinker -r" $(RUNTIMEX))
+--- base-orig/runtime/objs/mk.hppa-hpux 2000-06-02 04:34:03.000000000 +1000
++++ base/runtime/objs/mk.hppa-hpux 2018-03-10 11:31:32.577918480 +1100
+@@ -16,6 +16,7 @@
+
+ AS = /usr/ccs/bin/as
+ RANLIB = ar ts
++PAXMARK = true
+
+ XOBJS =
+ XLIBS =
+@@ -27,4 +28,4 @@
+ RUNTIME = run.hppa-hpux
+
+ all:
+- (make RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CPP="$(CPP)" CFLAGS="$(CFLAGS)" AS="$(AS)" RANLIB="$(RANLIB)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ (make RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CPP="$(CPP)" CFLAGS="$(CFLAGS)" AS="$(AS)" RANLIB="$(RANLIB)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.hppa-hpux11 2005-07-21 00:30:18.000000000 +1000
++++ base/runtime/objs/mk.hppa-hpux11 2018-03-10 11:31:32.579918490 +1100
+@@ -17,6 +17,7 @@
+
+ AS = /usr/ccs/bin/as
+ RANLIB = ar ts
++PAXMARK = true
+
+ XOBJS =
+ XLIBS =
+@@ -28,4 +29,4 @@
+ RUNTIME = run.hppa-hpux11
+
+ all:
+- (make RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CPP="$(CPP)" CFLAGS="$(CFLAGS)" AS="$(AS)" RANLIB="$(RANLIB)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ (make RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CPP="$(CPP)" CFLAGS="$(CFLAGS)" AS="$(AS)" RANLIB="$(RANLIB)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.hppa-hpux9 2000-06-02 04:34:03.000000000 +1000
++++ base/runtime/objs/mk.hppa-hpux9 2018-03-10 11:31:32.581918499 +1100
+@@ -13,6 +13,7 @@
+
+ AS = /bin/as
+ RANLIB = ar ts
++PAXMARK = true
+
+ XOBJS =
+ XLIBS =
+@@ -24,4 +25,4 @@
+ RUNTIME = run.hppa-hpux9
+
+ all:
+- (make CHECK_HEAP=check-heap.o RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CPP="$(CPP)" CFLAGS="$(CFLAGS)" AS="$(AS)" RANLIB="$(RANLIB)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ (make CHECK_HEAP=check-heap.o RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CPP="$(CPP)" CFLAGS="$(CFLAGS)" AS="$(AS)" RANLIB="$(RANLIB)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
diff --git a/dev-lang/smlnj/files/smlnj-110.82-pax-p2.patch b/dev-lang/smlnj/files/smlnj-110.82-pax-p2.patch
new file mode 100644
index 000000000000..7a7f30f11373
--- /dev/null
+++ b/dev-lang/smlnj/files/smlnj-110.82-pax-p2.patch
@@ -0,0 +1,132 @@
+--- base-orig/runtime/objs/mk.ppc-aix 2012-08-03 04:03:33.000000000 +1000
++++ base/runtime/objs/mk.ppc-aix 2018-03-10 11:31:32.583918509 +1100
+@@ -7,6 +7,7 @@
+ CC = cc
+ CFLAGS = -O2
+ CPP = /lib/cpp
++PAXMARK = true
+
+ #CC = gcc -ansi
+ #CFLAGS = -O2
+@@ -22,4 +23,4 @@
+ RUNTIME = run.ppc-aix
+
+ all:
+- (make RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CPP="$(CPP)" CFLAGS="$(CFLAGS)" AS="$(AS)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ (make RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CPP="$(CPP)" CFLAGS="$(CFLAGS)" AS="$(AS)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.ppc-darwin 2012-08-03 04:03:33.000000000 +1000
++++ base/runtime/objs/mk.ppc-darwin 2018-03-10 11:31:32.584918513 +1100
+@@ -13,6 +13,7 @@
+ CC = cc -ansi
+ CFLAGS = -g -O2 -D_NONSTD_SOURCE
+ CPP = cc -x assembler-with-cpp -E -P -ansi
++PAXMARK = true
+ XOBJS =
+ XLIBS = ../c-libs/dl/libunix-dynload.a
+ LD_LIBS = -ldl
+@@ -25,5 +26,5 @@
+ RUNTIMEX = runx.ppc-darwin
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+- ($(MAKE) RUNTIME="$(RUNTIMEX)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-Xlinker -r" $(RUNTIMEX))
++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIMEX)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-Xlinker -r" $(RUNTIMEX))
+--- base-orig/runtime/objs/mk.ppc-linux 2015-09-23 00:26:12.000000000 +1000
++++ base/runtime/objs/mk.ppc-linux 2018-03-10 11:31:32.587918528 +1100
+@@ -8,6 +8,7 @@
+ CC = gcc -ansi
+ CFLAGS = -O2
+ CPP = gcc -x c -E -P -ansi
++PAXMARK = true
+ #XOBJS = xmonitor.o
+ #LD_LIBS = -lX11
+ #BASE_DEFS = -DHEAP_MONITOR
+@@ -22,4 +23,4 @@
+ RUNTIME = run.ppc-linux
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.ppc-openbsd 2014-08-20 21:39:44.000000000 +1000
++++ base/runtime/objs/mk.ppc-openbsd 2018-03-10 11:31:32.589918537 +1100
+@@ -11,6 +11,7 @@
+ CC ?= gcc -ansi
+ CFLAGS ?= -O2
+ CPP = gcc -x assembler-with-cpp -E -P
++PAXMARK = true
+
+ XOBJS =
+ XLIBS = ../c-libs/dl/libunix-dynload.a
+@@ -22,4 +23,4 @@
+ RUNTIME = run.ppc-openbsd
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.sparc-solaris 2001-06-16 05:05:19.000000000 +1000
++++ base/runtime/objs/mk.sparc-solaris 2018-03-10 11:31:32.591918547 +1100
+@@ -12,6 +12,7 @@
+ #CFLAGS = -g
+ CPP = $(GCC) -x c -E -P
+ RANLIB = $(AR) ts
++PAXMARK = true
+
+ #XOBJS = xmonitor.o
+ #LD_LIBS = -lX11
+@@ -28,4 +29,4 @@
+ RUNTIME = run.sparc-solaris
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" MAKE="$(MAKE)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" AS="$(AS)" AR="$(AR)" RANLIB="$(RANLIB)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIME)" MAKE="$(MAKE)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" AS="$(AS)" AR="$(AR)" RANLIB="$(RANLIB)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.sparc-sunos 2000-06-02 04:34:03.000000000 +1000
++++ base/runtime/objs/mk.sparc-sunos 2018-03-10 11:31:32.593918556 +1100
+@@ -6,6 +6,7 @@
+ CC = gcc -ansi
+ CFLAGS = -O2
+ CPP = gcc -x c -E -P -ansi
++PAXMARK = true
+ #XOBJS = xmonitor.o
+ #LD_LIBS = -lX11
+ #BASE_DEFS = -DHEAP_MONITOR
+@@ -19,4 +20,4 @@
+ RUNTIME = run.sparc-sunos
+
+ all:
+- (make RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ (make RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.x86-cygwin 2004-03-20 05:54:52.000000000 +1100
++++ base/runtime/objs/mk.x86-cygwin 2018-03-10 11:31:32.595918566 +1100
+@@ -7,6 +7,7 @@
+ CC = gcc
+ CFLAGS = -O2
+ CPP = gcc -x assembler-with-cpp -E -P
++PAXMARK = true
+ XOBJS =
+ XLIBS = ../c-libs/dl/libunix-dynload.a
+ #LD_LIBS = -lws2_32 -Wl,--export-all -output-def=smlnj.def
+@@ -19,4 +20,4 @@
+ RUNTIME = run.x86-cygwin
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.x86-darwin 2016-08-17 01:10:45.000000000 +1000
++++ base/runtime/objs/mk.x86-darwin 2018-03-10 11:31:32.597918575 +1100
+@@ -37,6 +37,7 @@
+ CC = cc -m32 -std=c99
+ CFLAGS = -g -O2 -D_DARWIN_C_SOURCE $(SDK)
+ CPP = cc -x assembler-with-cpp -E -P -std=c99
++PAXMARK = true
+ XOBJS =
+ XLIBS = ../c-libs/dl/libunix-dynload.a
+ LD_LIBS = -ldl
+@@ -49,5 +50,5 @@
+ RUNTIMEX = runx.x86-darwin
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" AS="$(AS)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+- ($(MAKE) RUNTIME="$(RUNTIMEX)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-Xlinker -r" $(RUNTIMEX))
++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" AS="$(AS)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIMEX)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-Xlinker -r" $(RUNTIMEX))
diff --git a/dev-lang/smlnj/files/smlnj-110.82-pax-p3.patch b/dev-lang/smlnj/files/smlnj-110.82-pax-p3.patch
new file mode 100644
index 000000000000..fe2c183da5a4
--- /dev/null
+++ b/dev-lang/smlnj/files/smlnj-110.82-pax-p3.patch
@@ -0,0 +1,137 @@
+--- base-orig/runtime/objs/mk.x86-freebsd 2006-04-21 01:28:53.000000000 +1000
++++ base/runtime/objs/mk.x86-freebsd 2018-03-10 11:31:32.599918584 +1100
+@@ -12,6 +12,7 @@
+ CFLAGS = -O2
+ CPP = gcc -x assembler-with-cpp -E -P
+ #CPP = /usr/bin/cpp -P
++PAXMARK = true
+
+ XOBJS =
+ XLIBS = ../c-libs/dl/libunix-dynload.a
+@@ -25,6 +26,6 @@
+ RUNTIME_A = run.x86-freebsd.a
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+- ($(MAKE) RUNTIME="$(RUNTIME_SO)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared" $(RUNTIME_SO))
+- ($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="" $(RUNTIME_A))
++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIME_SO)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared" $(RUNTIME_SO))
++ ($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="" $(RUNTIME_A))
+--- base-orig/runtime/objs/mk.x86-linux 2014-10-12 06:28:40.000000000 +1100
++++ base/runtime/objs/mk.x86-linux 2018-03-10 11:31:32.600918589 +1100
+@@ -8,6 +8,7 @@
+ CC = gcc -ansi
+ CFLAGS = -O2 -m32
+ CPP = gcc -x assembler-with-cpp -E -P
++PAXMARK = true
+ #XOBJS = xmonitor.o
+ #LD_LIBS = -lX11
+ #BASE_DEFS = -DHEAP_MONITOR
+@@ -27,6 +28,6 @@
+ RUNTIME_A = run.x86-linux.a
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+- ($(MAKE) RUNTIME="$(RUNTIME_SO)" VERSION="$(VERSION)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared" $(RUNTIME_SO))
+- ($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="" $(RUNTIME_A))
++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIME_SO)" VERSION="$(VERSION)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared" $(RUNTIME_SO))
++ ($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="" $(RUNTIME_A))
+--- base-orig/runtime/objs/mk.x86-linux-pthreads 2014-10-12 06:28:40.000000000 +1100
++++ base/runtime/objs/mk.x86-linux-pthreads 2018-03-10 11:31:32.602918599 +1100
+@@ -7,6 +7,7 @@
+ CC = gcc -ansi
+ CFLAGS = -O2 -D_REENTRANT
+ CPP = gcc -x assembler-with-cpp -E -P
++PAXMARK = true
+ #XOBJS = xmonitor.o
+ #LD_LIBS = -lX11
+ #BASE_DEFS = -DHEAP_MONITOR
+@@ -21,4 +22,4 @@
+ RUNTIME = run.x86-linux
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.x86-netbsd 2006-02-11 09:14:59.000000000 +1100
++++ base/runtime/objs/mk.x86-netbsd 2018-03-10 11:31:32.604918608 +1100
+@@ -12,6 +12,7 @@
+ CFLAGS = -O2
+ CPP = gcc -x assembler-with-cpp -E -P
+ #CPP = /usr/bin/cpp -P
++PAXMARK = true
+
+ XOBJS =
+ XLIBS = ../c-libs/dl/libunix-dynload.a
+@@ -23,4 +24,4 @@
+ RUNTIME = run.x86-netbsd
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.x86-netbsd2 2006-02-11 09:14:59.000000000 +1100
++++ base/runtime/objs/mk.x86-netbsd2 2018-03-10 11:31:32.605918613 +1100
+@@ -12,6 +12,7 @@
+ CFLAGS = -O2
+ CPP = gcc -x assembler-with-cpp -E -P
+ #CPP = /usr/bin/cpp -P
++PAXMARK = true
+
+ XOBJS =
+ XLIBS = ../c-libs/dl/libunix-dynload.a
+@@ -23,4 +24,4 @@
+ RUNTIME = run.x86-netbsd
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.x86-openbsd 2008-12-03 03:50:18.000000000 +1100
++++ base/runtime/objs/mk.x86-openbsd 2018-03-10 11:31:32.607918622 +1100
+@@ -12,6 +12,7 @@
+ CFLAGS = -O2
+ CPP = gcc -x assembler-with-cpp -E -P
+ #CPP = /usr/bin/cpp -P
++PAXMARK = true
+
+ XOBJS =
+ XLIBS = ../c-libs/dl/libunix-dynload.a
+@@ -23,4 +24,4 @@
+ RUNTIME = run.x86-openbsd
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.x86-solaris 2004-02-01 01:24:42.000000000 +1100
++++ base/runtime/objs/mk.x86-solaris 2018-03-10 11:31:32.609918632 +1100
+@@ -15,6 +15,7 @@
+ CFLAGS = -O2
+ CPP = gcc -x assembler-with-cpp -E -P
+ RANLIB = $(AR) ts
++PAXMARK = true
+
+ XOBJS =
+ XLIBS =
+@@ -26,4 +27,4 @@
+ RUNTIME = run.x86-solaris
+
+ all:
+- ($(MAKE) RUNTIME="$(RUNTIME)" MAKE="$(MAKE)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" AS="$(AS)" AR="$(AR)" RANLIB="$(RANLIB)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
++ ($(MAKE) RUNTIME="$(RUNTIME)" MAKE="$(MAKE)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" AS="$(AS)" AR="$(AR)" RANLIB="$(RANLIB)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
+--- base-orig/runtime/objs/mk.x86-win32 2004-08-03 05:44:48.000000000 +1000
++++ base/runtime/objs/mk.x86-win32 2018-03-10 11:31:32.611918641 +1100
+@@ -8,6 +8,7 @@
+ CC = cl
+ CFLAGS = /Zi
+ CPP = cl /E /EP
++PAXMARK = true
+ XOBJS =
+ XLIBS =
+ XCLIBS =
+@@ -23,5 +24,5 @@
+ RUNTIME = run.x86-win32.exe
+
+ all:
+- ($(MAKE) MAKE="$(MAKE)" RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" XCLIBS="$(XCLIBS)" $(RUNTIME))
++ ($(MAKE) MAKE="$(MAKE)" RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" PAXMARK="$(PAXMARK)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" XCLIBS="$(XCLIBS)" $(RUNTIME))
+
diff --git a/dev-lang/smlnj/metadata.xml b/dev-lang/smlnj/metadata.xml
new file mode 100644
index 000000000000..2c128f1545b3
--- /dev/null
+++ b/dev-lang/smlnj/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>ml@gentoo.org</email>
+ <name>Gentoo ML Project</name>
+</maintainer>
+ <use>
+ <flag name="pax_kernel">Enable if the user plans to run the
+ package under a pax enabled hardened kernel</flag>
+ </use>
+</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/smlnj/smlnj-110.82.ebuild b/dev-lang/smlnj/smlnj-110.82.ebuild
new file mode 100644
index 000000000000..1df1108e8973
--- /dev/null
+++ b/dev-lang/smlnj/smlnj-110.82.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit eutils multilib 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="
+doc.tgz
+
+config.tgz
+
+cm.tgz
+compiler.tgz
+runtime.tgz
+system.tgz
+MLRISC.tgz
+smlnj-lib.tgz
+old-basis.tgz
+
+ckit.tgz
+nlffi.tgz
+
+cml.tgz
+eXene.tgz
+
+ml-lpt.tgz
+ml-lex.tgz
+ml-yacc.tgz
+ml-burg.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="pax_kernel"
+DEPEND="pax_kernel? ( sys-apps/elfix )"
+RDEPEND=""
+
+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
+}
+
+src_prepare() {
+ # respect CC et al. (bug 243886)
+ mkdir base || die # without this unpacking runtime will fail
+ ./config/unpack "${S}" runtime || die
+ epatch "${FILESDIR}/${PN}-110.82-pax-p1.patch"
+ epatch "${FILESDIR}/${PN}-110.82-pax-p2.patch"
+ epatch "${FILESDIR}/${PN}-110.82-pax-p3.patch"
+ default
+ 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}:}" \
+ -e "/^PAXMARK/s:true:"$(usex pax_kernel "paxmark.sh" "true")":" \
+ -i base/runtime/objs/${file}
+ done
+}
+
+src_compile() {
+ SMLNJ_HOME="${S}" \
+ ./config/install.sh || die "compilation failed"
+}
+
+# Return an array which has the element $1 removed from the array $[@]:1
+# i.e. return an array where the first function argument $1 removed from
+# the array consisting of the rest of the function arguments.
+remove_element_from_array() {
+ local args=("$@")
+ local e=${args[0]}
+ local oa=()
+ for x in "${args[@]:1}"; do
+ if [ ${x} != ${e} ]; then
+ oa+=( ${x} )
+ fi
+ done
+ echo "${oa[@]}"
+}
+
+# smlnj 110.82 is still only 32 bit. On a multilib 64 bit system
+# smlnj_get_libdir tries to find the 32 bit lib directory. Or otherwise,
+# just return the system lib directory $(get_libdir).
+smlnj_get_libdir() {
+ local x=$(get_all_libdirs)
+ # Remove the native lib dir
+ local y=$(remove_element_from_array $(get_libdir) ${x[@]})
+ # Remove libx32 if it exists
+ local z=$(remove_element_from_array "libx32" ${y[@]})
+ # However if the system is not multlib, then we still need to install
+ # the 32 bit smlnj executables and libraries somewhere, so I guess we
+ # just have to put them under the system lib directory. Put the
+ # native lib dir back on the end of the array.
+ z+=( $(get_libdir) )
+ # Then return the first element of the array, which should be the 32 bit
+ # lib directory on multilib systems, or the 32 bit lib directory on
+ # 32 bit systems, or the system 64 bit lib directory on non-multilib
+ # 64 bit systems.
+ echo ${z[0]}
+}
+
+src_install() {
+ SUBDIR=$(smlnj_get_libdir)/${PN}
+ DIR=/usr/${SUBDIR}
+ for file in bin/{*,.*}; do
+ [[ -f ${file} ]] && sed -e "2iSMLNJ_HOME=${EPREFIX%/}/${DIR}" \
+ -e "s:${WORKDIR}:${EPREFIX%/}/${DIR}:" -i ${file}
+ done
+ dodir ${DIR}/bin
+ exeinto ${DIR}/bin
+ pushd bin || die
+ for i in .arch-n-opsys .link-sml .run-sml heap2exec ml-* sml; do
+ doexe ${i}
+ done
+ for i in heap2exec ml-* sml; do
+ dosym ../${SUBDIR}/bin/${i} /usr/bin/${i}
+ done
+ popd || die
+ dodir ${DIR}/bin/.heap
+ insinto ${DIR}/bin/.heap
+ doins bin/.heap/*
+ dodir ${DIR}/bin/.run
+ exeinto ${DIR}/bin/.run
+ pushd bin/.run || die
+ for i in run*; do
+ doexe ${i}
+ done
+ popd || die
+ insinto ${DIR}
+ doins -r lib
+ dodoc -r doc/*
+}
diff --git a/dev-lang/snobol-1.1 b/dev-lang/snobol-1.1
deleted file mode 100644
index d8db45d46e59..000000000000
--- a/dev-lang/snobol-1.1
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFINED_PHASES=compile configure install prepare
-DEPEND=sys-devel/gcc sys-devel/m4
-DESCRIPTION=Phil Budne's port of Macro SNOBOL4 in C, for modern machines
-EAPI=4
-HOMEPAGE=http://www.snobol4.org/csnobol4/
-KEYWORDS=~x86
-LICENSE=BSD-2
-SLOT=0
-SRC_URI=mirror://snobol4/snobol4-1.1.tar.gz
-_md5_=a6eb3d3795911d64b0cadc1aab6e647e
diff --git a/dev-lang/snobol-1.4.1 b/dev-lang/snobol-1.4.1
deleted file mode 100644
index 472333875d7d..000000000000
--- a/dev-lang/snobol-1.4.1
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=configure install prepare
-DEPEND=sys-devel/gcc sys-devel/m4 sys-libs/gdbm[berkdb]
-DESCRIPTION=Phil Budne's port of Macro SNOBOL4 in C, for modern machines
-EAPI=5
-HOMEPAGE=http://www.snobol4.org/csnobol4/
-IUSE=doc
-KEYWORDS=~amd64 ~x86
-LICENSE=BSD-2
-SLOT=0
-SRC_URI=mirror://snobol4/snobol4-1.4.1.tar.gz
-_md5_=5acefc5729b0ce60d4eb1f64490a44b7
diff --git a/dev-lang/snobol/Manifest b/dev-lang/snobol/Manifest
new file mode 100644
index 000000000000..bd0263fe3968
--- /dev/null
+++ b/dev-lang/snobol/Manifest
@@ -0,0 +1,5 @@
+DIST snobol4-1.1.tar.gz 677333 BLAKE2B a6ccecaa66657438b2c05dfca9f7db95270b4d1a3502ad06c8d217d50d54ac33b0195eb8b2e045ac0b6c49c19a5bf3ee46e4a35b45555d67fc669317c7a5db2b SHA512 ae8482bc64f3d9020dc4d7e390296114e7498ef2764ebb69b6c4960d0c1b01daf4d77dff1aa583231a7f50d4c54f7f72cedc3e4744b03f4b2370fa6de837a3cc
+DIST snobol4-1.4.1.tar.gz 736837 BLAKE2B bb86d2cd3788ad66b7246d86ebd9f289189f5bd059238d2df3fb621aa4a1e910a8ad029f482077eb78916a84c3a28d868e8ac6eef83b48d7f09a8964c57a855d SHA512 5413af10018141e93f05c9ea637711bb3981f2b67557691d05dde8911178d90900f0fdef6c1d2416ebdda6afeeabd21b9e371b6711b2d093df629cc865fc61f9
+EBUILD snobol-1.1.ebuild 1418 BLAKE2B 23431276ddfcb476dafca64bfe424f1be1d5571467e022bc1a7071e6178e60479f083d6377070e4c0b4bde181615d435d71c2ad843b34926879476b3fb947e8a SHA512 f0ca27dd442231cb15fa95ea8d43ac0937afa8715defd4f6506de072b9a3a0ae74ffa3af8ddac7beebb6612775479a90f80fc045824a273e8b011ec57df8ca54
+EBUILD snobol-1.4.1.ebuild 1286 BLAKE2B 7476a992fb502c100f60ee90b1842223dc789e98ae8b2b30ba02f84b94e79b9f61325ec1f90ca5dc3aaca669e153a02f154029ea6d66a8a6952f39025ef4dd25 SHA512 f7da5f8ada4660b6d746cae936d959d26a0170d01a7791ffc68b3522ebd410eaa22aec5d20fee457726ffc4b11bba391d25ffb447558c0f5dbaa11708f632bac
+MISC metadata.xml 268 BLAKE2B 914b6995ad966e2b83ec718b2598969b181c119d8805241b0046f69e161ac22a9f769204f4783240056804008475aa406cbd91b9de499ec7840f9595158bd291 SHA512 ffda1db3fd6ac952f41a970e2e496c6a9fd0b12ed11cdf363fd269c3b00f627c6e70421fd545aad61d69594af2e5f43d8ebc197232a39b596d012818fe758850
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-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-0.4.18 b/dev-lang/solidity-0.4.18
deleted file mode 100644
index b3922c883185..000000000000
--- a/dev-lang/solidity-0.4.18
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND==dev-libs/jsoncpp-1.8.1:= >=dev-libs/boost-1.54:= sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=The Solidity Contract-Oriented Programming Language
-EAPI=6
-HOMEPAGE=https://github.com/ethereum/solidity
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND==dev-libs/jsoncpp-1.8.1:= >=dev-libs/boost-1.54:=
-SLOT=0
-SRC_URI=https://github.com/ethereum/solidity/releases/download/v0.4.18/solidity_0.4.18.tar.gz -> solidity-0.4.18.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=d741cbf9c3779b5300c0b97762273e4a
diff --git a/dev-lang/solidity/Manifest b/dev-lang/solidity/Manifest
new file mode 100644
index 000000000000..b61ff514f917
--- /dev/null
+++ b/dev-lang/solidity/Manifest
@@ -0,0 +1,4 @@
+AUX solidity-0.4.18-fix-cmake-external-jsoncpp.diff 378 BLAKE2B 00e8ae9719e3d7faaf22ff806793ccd47222e4eee34e8528327396dbeb0333a723e5a8959513f980c11a8d7d5fab57fe07a06226b3ec398c201911db65e1bf60 SHA512 44b76b9dd9a1cd37c4fcf39d7aa585873ed9b394d54b0d862b6909dbe905d2202e1d2a9ef0e84e959931b0805d6f049c6567ad424f9561229803768ceafad4ff
+DIST solidity-0.4.18.tar.gz 1005571 BLAKE2B b7748f1e9ceb260ee5c02a5e6ddb7a3387a6f1df252889258045cf03e3cab365f1ac41c7e75805a49b71beceb88439855c53b6c59a81d610db48f9fe5256da55 SHA512 aa88060567a50fa833a81ef2c9ce9614ed0fddd9dc82c1546998dacd9a7cad1863882aa0700d830f80fe52bd91659a9fa07434af193624206876ba7224c34eb7
+EBUILD solidity-0.4.18.ebuild 766 BLAKE2B cbba8496a179b2f273efa677f82749ce0b6bca2e2e642c7d01579c9c59ae14233ee80e3ff017f35bb9257cd3f43bbe518d92e14ef7a2f7e76692ed10d52bd12e SHA512 a6a19af46537d59bf273e9a031250fc57d1f743296fd02416c9289921f201d0c98129714d2b6212fddc4bfa8be2f5ca102b77e190c06bb088266b17dad47a42f
+MISC metadata.xml 450 BLAKE2B 43358d0df6ec754300e4e95ef6cf3abd0702ab121cd70c58bc7808ee3d47346c5a42843ce895b1a9974bba8ed9716ba5256cd74a31343ac2fc29f4ef60196232 SHA512 8de6f5dadccb7020d6fbbd17a3800dd9a44e4b19f484e38799fd00b240fbd2a4d213454eb7cec2d99ab8ea7834fe5a0d3f792c62420870e55986b2978af9789d
diff --git a/dev-lang/solidity/files/solidity-0.4.18-fix-cmake-external-jsoncpp.diff b/dev-lang/solidity/files/solidity-0.4.18-fix-cmake-external-jsoncpp.diff
new file mode 100644
index 000000000000..1acafc9d9e36
--- /dev/null
+++ b/dev-lang/solidity/files/solidity-0.4.18-fix-cmake-external-jsoncpp.diff
@@ -0,0 +1,15 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 24bea3b3..4326927b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -18,7 +18,9 @@ include(EthCcache)
+
+ # Let's find our dependencies
+ include(EthDependencies)
+-include(jsoncpp)
++find_package(PkgConfig REQUIRED)
++pkg_check_modules(JSONCPP jsoncpp)
++include_directories("${JSONCPP_INCLUDE_DIRS}")
+
+ find_package(Threads)
+
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.18.ebuild b/dev-lang/solidity/solidity-0.4.18.ebuild
new file mode 100644
index 000000000000..8a36d44a9092
--- /dev/null
+++ b/dev-lang/solidity/solidity-0.4.18.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+MY_P="${PN}_${PV}"
+
+DESCRIPTION="The Solidity Contract-Oriented Programming Language"
+HOMEPAGE="https://github.com/ethereum/solidity"
+SRC_URI="https://github.com/ethereum/${PN}/releases/download/v${PV}/${MY_P}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="=dev-libs/jsoncpp-1.8.1:=
+ >=dev-libs/boost-1.54:=
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ # Upstream downloads and builds a static jsoncpp during build
+ "${FILESDIR}"/${P}-fix-cmake-external-jsoncpp.diff
+)
+
+src_configure() {
+ local mycmakeargs=(
+ "-DBoost_USE_STATIC_LIBS=off"
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/dev-lang/spark-2017 b/dev-lang/spark-2017
deleted file mode 100644
index 16771b4e3b70..000000000000
--- a/dev-lang/spark-2017
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=dev-lang/gnat-gpl:6.3.0 >=dev-ada/gnatcoll-2017[gnat_2017,projects,shared] sci-mathematics/alt-ergo sci-mathematics/why3-for-spark dev-ada/gprbuild[gnat_2017]
-DESCRIPTION=Software development for high-reliability applications.
-EAPI=6
-HOMEPAGE=http://libre.adacore.com
-KEYWORDS=~amd64
-LICENSE=GPL-3
-RDEPEND=dev-lang/gnat-gpl:6.3.0 >=dev-ada/gnatcoll-2017[gnat_2017,projects,shared] sci-mathematics/alt-ergo sci-mathematics/why3-for-spark
-SLOT=0
-SRC_URI=http://mirrors.cdn.adacore.com/art/591c4777c7a447af2deed05e -> spark-gpl-2017-src.tar.gz http://mirrors.cdn.adacore.com/art/591adbb4c7a4473fcc4532a3 -> gnat-gpl-2017-src.tar.gz
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=000eec674e2b3768f164a12390d9b6a7
diff --git a/dev-lang/spark/Manifest b/dev-lang/spark/Manifest
new file mode 100644
index 000000000000..ded6ec1d1271
--- /dev/null
+++ b/dev-lang/spark/Manifest
@@ -0,0 +1,5 @@
+AUX spark-2017-gentoo.patch 379 BLAKE2B 33907d6cd9099071cd04f687b05ab33da89bbd9a1d15e8282ae7791786c5638f977b39d482dfc15d07377ed2b06937a1d3f9ca18a6eb745ac7c3ec4d7cffa5ee SHA512 b4db9b56ab003dff8aec28248ea32af6fb4067c1824b0f6d115d66d1f3c8d180a17a2fa52a5f2ebc3605b549e0b38aafa15e9f238b079d5366d5375d851d84d1
+DIST gnat-gpl-2017-src.tar.gz 8783473 BLAKE2B b0415b42f4d3a5e8675591a5602ff0a96945670104064671a232c0c12271ee141a3a5d148b8507bdab83cb8a0677c57b78e690060088308c51732bad3715964f SHA512 ae7314a2241107ed4d962dce08306eeb34c5f11e26183935bbb1ccf3a5eb011d6457c1b6fcded93dd0ee9ba31d791971ebe2a5a5a0ae04ff80d87a670325a098
+DIST spark-gpl-2017-src.tar.gz 19750595 BLAKE2B 840eb9044b732aad16d2b6be9972e4805caf1e1b521ba40cc2a234871775d0212153ed9e9f84b4a2ddbeefc2b9c7d7556db943153655df6051cf4dc3f1be2e01 SHA512 90e7644daa6a935c839da9799c6dc5fe0a566f29c5f5d0a964ef5c888581f18c11adf6aa0151ae72437b91430fae06604dab8c3f1fd3222d749cfd330293ff6e
+EBUILD spark-2017.ebuild 1628 BLAKE2B ec15a84af3a0bc1417cec1db937f21e74797d2959047f6f8e07b816a4078caa283d48665917590ce8da707d16c27e0c05d4c168f6f1f1bfba2c500bd336698e4 SHA512 d9a230596c29e6ccd09aee78326904f21676bb736546df40df2ed41d93b0b4015f739d00c868d8deaa54274127b18b69c979b8deeffe6db979518d833bebd0e7
+MISC metadata.xml 702 BLAKE2B 26ae203d09cb80c4c75ca368651aa24da08657142d7e84e4dbdac335b501e98d6646e59b90b71706c8521e8e9c0692550615ef15f373f5d8d26e48ec74c2e72b SHA512 bd30717cad1bceeef722cf8a27cd3902ad636f088f64cc41f1be5d356a7def55e426bd62fd7a3e7d9272f61a6fad96bec423e7529660c8061650af72faeaeb57
diff --git a/dev-lang/spark/files/spark-2017-gentoo.patch b/dev-lang/spark/files/spark-2017-gentoo.patch
new file mode 100644
index 000000000000..479a7ace4dc2
--- /dev/null
+++ b/dev-lang/spark/files/spark-2017-gentoo.patch
@@ -0,0 +1,10 @@
+--- spark-gpl-2017-src/gnat2why/gnat2why_c.gpr.old 2017-10-04 21:41:41.613376056 +0200
++++ spark-gpl-2017-src/gnat2why/gnat2why_c.gpr 2017-10-04 21:42:30.582572536 +0200
+@@ -1,4 +1,7 @@
+ project Gnat2Why_C is
+ for Languages use ("C");
+ for Object_Dir use "obj";
++ package Compiler is
++ for Driver ("C") use External ("CC", "gcc");
++ end Compiler;
+ end Gnat2Why_C;
diff --git a/dev-lang/spark/metadata.xml b/dev-lang/spark/metadata.xml
new file mode 100644
index 000000000000..ca4e653c68ef
--- /dev/null
+++ b/dev-lang/spark/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>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <longdescription lang="en">
+ SPARK is a software development technology specifically designed for
+ engineering high-reliability applications. It consists of a programming
+ language, a verification toolset and a design method which, taken
+ together, ensure that ultra-low defect software can be deployed in
+ application domains where high-reliability must be assured, for example
+ where safety and security are key requirements.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-lang/spark/spark-2017.ebuild b/dev-lang/spark/spark-2017.ebuild
new file mode 100644
index 000000000000..47ad4e812b0f
--- /dev/null
+++ b/dev-lang/spark/spark-2017.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs multiprocessing
+
+MYP=${PN}-gpl-${PV}
+
+DESCRIPTION="Software development for high-reliability applications."
+HOMEPAGE="http://libre.adacore.com"
+SRC_URI="http://mirrors.cdn.adacore.com/art/591c4777c7a447af2deed05e
+ -> ${MYP}-src.tar.gz
+ http://mirrors.cdn.adacore.com/art/591adbb4c7a4473fcc4532a3
+ -> gnat-gpl-2017-src.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RDEPEND="dev-lang/gnat-gpl:6.3.0
+ >=dev-ada/gnatcoll-2017[gnat_2017,projects,shared]
+ sci-mathematics/alt-ergo
+ sci-mathematics/why3-for-spark"
+DEPEND="${RDEPEND}
+ dev-ada/gprbuild[gnat_2017]"
+
+S="${WORKDIR}"/${MYP}-src
+
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
+src_prepare() {
+ ln -sf "${WORKDIR}"/gnat-gpl-2017-src/src/ada gnat2why/gnat_src || die
+ GCC_PV=6.3.0
+ sed -i \
+ -e "s:gnatmake:gnatmake-${GCC_PV}:g" \
+ -e "s:gnatls:gnatls-${GCC_PV}:g" \
+ Makefile \
+ gnat2why/Makefile || die
+ default
+}
+
+src_compile() {
+ emake GPRARGS="-XLIBRARY_TYPE=relocatable" gnat2why
+ emake PROD="-XLIBRARY_TYPE=relocatable" gnatprove
+}
+
+src_install() {
+ emake INSTALLDIR="${D}"/usr install
+ einstalldocs
+ dosym ../../../lib64/why3/why3server /usr/libexec/spark/bin/why3server
+ dobin install/bin/gnatprove
+ mv install/share/doc/spark/* "${D}"/usr/share/doc/${PF} || die
+ exeinto /usr/libexec/spark/bin
+ doexe install/bin/gnat2why
+ doexe install/bin/spark_memcached_wrapper
+ doexe install/bin/spark_report
+ doexe install/bin/spark_codepeer_wrapper
+ mv "${D}"/usr/bin/target.atp "${D}"/usr/libexec/spark/bin || die
+}
diff --git a/dev-lang/spidermonkey-1.7.0-r3 b/dev-lang/spidermonkey-1.7.0-r3
deleted file mode 100644
index 1f778a861d4d..000000000000
--- a/dev-lang/spidermonkey-1.7.0-r3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install prepare
-DEPEND=threadsafe? ( dev-libs/nspr )
-DESCRIPTION=Stand-alone JavaScript C library
-EAPI=5
-HOMEPAGE=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
-IUSE=threadsafe unicode
-KEYWORDS=alpha amd64 ~arm ppc ppc64 sparc x86 ~x86-fbsd
-LICENSE=NPL-1.1
-RDEPEND=threadsafe? ( dev-libs/nspr )
-SLOT=0/js
-SRC_URI=http://archive.mozilla.org/pub/js/js-1.7.0.tar.gz https://dev.gentoo.org/~axs/distfiles/spidermonkey-slot0-patches-01.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=05961dca67a184f7fc51021e81db09c7
diff --git a/dev-lang/spidermonkey-1.8.5-r6 b/dev-lang/spidermonkey-1.8.5-r6
deleted file mode 100644
index 37926194e0ca..000000000000
--- a/dev-lang/spidermonkey-1.8.5-r6
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=>=dev-libs/nspr-4.7.0 sys-libs/readline:0= x64-macos? ( dev-libs/jemalloc ) || ( >=dev-lang/python-2.7.5-r2:2.7[threads] ) app-arch/zip virtual/pkgconfig >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) ~sys-devel/autoconf-2.13 >=sys-devel/libtool-2.4
-DESCRIPTION=Stand-alone JavaScript C library
-EAPI=5
-HOMEPAGE=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
-IUSE=debug minimal static-libs test
-KEYWORDS=alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-macos
-LICENSE=NPL-1.1
-RDEPEND=>=dev-libs/nspr-4.7.0 sys-libs/readline:0= x64-macos? ( dev-libs/jemalloc )
-SLOT=0/mozjs185
-SRC_URI=https://archive.mozilla.org/pub/js/js185-1.0.0.tar.gz https://dev.gentoo.org/~axs/distfiles/spidermonkey-slot0-patches-01.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=cb5a22d9f3d96f47004fde8dbef948e3
diff --git a/dev-lang/spidermonkey-17.0.0-r4 b/dev-lang/spidermonkey-17.0.0-r4
deleted file mode 100644
index 0cbb2f376b42..000000000000
--- a/dev-lang/spidermonkey-17.0.0-r4
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=>=dev-libs/nspr-4.9.4 virtual/libffi sys-libs/readline:0= >=sys-libs/zlib-1.1.4 || ( >=dev-lang/python-2.7.5-r2:2.7[threads] ) app-arch/zip virtual/pkgconfig
-DESCRIPTION=Stand-alone JavaScript C library
-EAPI=5
-HOMEPAGE=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
-IUSE=debug jit minimal static-libs test
-KEYWORDS=alpha amd64 arm -hppa ia64 -mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd
-LICENSE=NPL-1.1
-RDEPEND=>=dev-libs/nspr-4.9.4 virtual/libffi sys-libs/readline:0= >=sys-libs/zlib-1.1.4
-REQUIRED_USE=debug? ( jit )
-RESTRICT=ia64? ( test )
-SLOT=17
-SRC_URI=http://archive.mozilla.org/pub/js/mozjs17.0.0.tar.gz https://dev.gentoo.org/~axs/distfiles/spidermonkey-slot17-patches-01.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c53cff6c9f34de4db9d6cf14a6190bc2
diff --git a/dev-lang/spidermonkey-17.0.0-r5 b/dev-lang/spidermonkey-17.0.0-r5
deleted file mode 100644
index efa8cf8ed5c8..000000000000
--- a/dev-lang/spidermonkey-17.0.0-r5
+++ /dev/null
@@ -1,15 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=>=dev-libs/nspr-4.9.4 virtual/libffi sys-libs/readline:0= >=sys-libs/zlib-1.1.4 || ( >=dev-lang/python-2.7.5-r2:2.7[threads] ) app-arch/zip virtual/pkgconfig
-DESCRIPTION=Stand-alone JavaScript C library
-EAPI=6
-HOMEPAGE=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
-IUSE=debug jit minimal static-libs test
-KEYWORDS=alpha amd64 arm -hppa ia64 -mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd
-LICENSE=NPL-1.1
-RDEPEND=>=dev-libs/nspr-4.9.4 virtual/libffi sys-libs/readline:0= >=sys-libs/zlib-1.1.4
-REQUIRED_USE=debug? ( jit )
-RESTRICT=ia64? ( test )
-SLOT=17
-SRC_URI=http://archive.mozilla.org/pub/js/mozjs17.0.0.tar.gz https://dev.gentoo.org/~axs/distfiles/spidermonkey-slot17-patches-01.tar.xz
-_eclasses_=estack 43ddf5aaffa7a8d0482df54d25a66a1f multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=aa8ecf92a16532e703e2187f9a0957a5
diff --git a/dev-lang/spidermonkey-24.2.0-r3 b/dev-lang/spidermonkey-24.2.0-r3
deleted file mode 100644
index 0316b7eb84f7..000000000000
--- a/dev-lang/spidermonkey-24.2.0-r3
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=>=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:= ) || ( >=dev-lang/python-2.7.5-r2:2.7[threads] ) app-arch/zip virtual/pkgconfig >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) ~sys-devel/autoconf-2.13 >=sys-devel/libtool-2.4
-DESCRIPTION=Stand-alone JavaScript C library
-EAPI=5
-HOMEPAGE=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
-IUSE=debug icu jit minimal static-libs +system-icu test
-KEYWORDS=alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd
-LICENSE=NPL-1.1
-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:= )
-RESTRICT=ia64? ( test )
-SLOT=24
-SRC_URI=https://archive.mozilla.org/pub/js/mozjs-24.2.0.tar.bz2 https://dev.gentoo.org/~axs/distfiles/spidermonkey-slot24-patches-01.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=eab15efd731eaadd52cdc95f51eb8d17
diff --git a/dev-lang/spidermonkey-24.2.0-r4 b/dev-lang/spidermonkey-24.2.0-r4
deleted file mode 100644
index 3adb126f23d0..000000000000
--- a/dev-lang/spidermonkey-24.2.0-r4
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=>=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:= ) || ( >=dev-lang/python-2.7.5-r2:2.7[threads] ) app-arch/zip virtual/pkgconfig >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) ~sys-devel/autoconf-2.13 >=sys-devel/libtool-2.4
-DESCRIPTION=Stand-alone JavaScript C library
-EAPI=6
-HOMEPAGE=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
-IUSE=debug icu jit minimal static-libs +system-icu test
-KEYWORDS=alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd
-LICENSE=NPL-1.1
-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:= )
-RESTRICT=ia64? ( test )
-SLOT=24
-SRC_URI=https://archive.mozilla.org/pub/js/mozjs-24.2.0.tar.bz2 https://dev.gentoo.org/~axs/distfiles/spidermonkey-slot24-patches-01.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 estack 43ddf5aaffa7a8d0482df54d25a66a1f libtool 0081a71a261724730ec4c248494f044d multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=ae4b5ec879767de220cea7d5cfe32a5a
diff --git a/dev-lang/spidermonkey-38.3.0 b/dev-lang/spidermonkey-38.3.0
deleted file mode 100644
index 3de130f49b91..000000000000
--- a/dev-lang/spidermonkey-38.3.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=>=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:= ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) ~sys-devel/autoconf-2.13 >=sys-devel/libtool-2.4 virtual/pkgconfig || ( >=dev-lang/python-2.7.5-r2:2.7[ncurses,sqlite,ssl,threads] )
-DESCRIPTION=Stand-alone JavaScript C library
-EAPI=6
-HOMEPAGE=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
-IUSE=debug +jit minimal static-libs +system-icu test custom-cflags custom-optimization
-KEYWORDS=~alpha amd64 ~arm ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh sparc x86 ~x86-fbsd
-LICENSE=NPL-1.1
-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:= )
-RESTRICT=ia64? ( test )
-SLOT=38
-SRC_URI=https://archive.mozilla.org/pub/spidermonkey/releases/38.3.0/mozjs-38.3.0sfink2.tar.bz2 https://dev.gentoo.org/~axs/distfiles/spidermonkey-slot38-patches-01.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e mozcoreconf-v4 45c0b61c53e2dbbcf728355c62f8de3c multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=82b460faacdb753fdaa4479031e31dee
diff --git a/dev-lang/spidermonkey-45.0.2 b/dev-lang/spidermonkey-45.0.2
deleted file mode 100644
index 4eb7b203441d..000000000000
--- a/dev-lang/spidermonkey-45.0.2
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=>=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:= ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) ~sys-devel/autoconf-2.13 >=sys-devel/libtool-2.4 virtual/pkgconfig || ( >=dev-lang/python-2.7.5-r2:2.7[ncurses,sqlite,ssl,threads] )
-DESCRIPTION=Stand-alone JavaScript C library
-EAPI=6
-HOMEPAGE=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
-IUSE=debug +jit minimal static-libs +system-icu test custom-cflags custom-optimization
-KEYWORDS=~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd
-LICENSE=NPL-1.1
-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:= )
-RESTRICT=ia64? ( test )
-SLOT=45
-SRC_URI=https://people.mozilla.org/~sfink/mozjs-45.0.2.tar.bz2 https://dev.gentoo.org/~axs/distfiles/spidermonkey-slot45-patches-01.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e mozcoreconf-v4 45c0b61c53e2dbbcf728355c62f8de3c multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=f899f19f5bc1dd11ce5f8c0ac8afbdd7
diff --git a/dev-lang/spidermonkey-52.4.0_pre20171003-r1 b/dev-lang/spidermonkey-52.4.0_pre20171003-r1
deleted file mode 100644
index 3fc3e802c042..000000000000
--- a/dev-lang/spidermonkey-52.4.0_pre20171003-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare setup test
-DEPEND=>=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:= ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) ~sys-devel/autoconf-2.13 >=sys-devel/libtool-2.4 virtual/pkgconfig || ( >=dev-lang/python-2.7.5-r2:2.7[ncurses,sqlite,ssl,threads] )
-DESCRIPTION=Stand-alone JavaScript C++ library
-EAPI=6
-HOMEPAGE=https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey
-IUSE=debug +jit minimal +system-icu test custom-cflags custom-optimization
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd
-LICENSE=NPL-1.1
-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:= )
-RESTRICT=ia64? ( test )
-SLOT=52
-SRC_URI=https://dev.gentoo.org/~axs/distfiles/mozjs-52.4.0_pre20171003.tar.bz2 https://dev.gentoo.org/~axs/distfiles/spidermonkey-52.0-patches-0.tar.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e mozcoreconf-v5 602c3c0a642bafeabb149c49a6df941f multilib 97f470f374f2e94ccab04a2fb21d811e pax-utils b963274a93e76570a88168c1f1db4cd7 preserve-libs ef207dc62baddfddfd39a164d9797648 python-any-r1 6faea633ae2f79f6d55dcfd431b79fbf python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=50f9f9350a32f0c3044b89ae328e3399
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
new file mode 100644
index 000000000000..16639e484755
--- /dev/null
+++ b/dev-lang/spidermonkey/Manifest
@@ -0,0 +1,26 @@
+AUX moz38-dont-hardcode-libc-soname.patch 637 BLAKE2B d78f53814955c3e0842040f47330d8216b3f496574fadc045294b534f2ec7d049b14564cb495c37ae2d084db2f5671e447d1d98aa19a367f8b96ec97201b4f30 SHA512 f3d447996da3bf445f082a0b5c3018eb618b6b08a49bc43f275dc6cc77d7d906928e99264378472e96213df8f8b5d279a0af72d9d6a0a3417b266d7752c7f1fd
+AUX spidermonkey-52-baseconfig.patch 963 BLAKE2B 4652a28774677933a2974b50336ca772908892097b533a6c13f943a9179d8112e004e4aeba336e9e5565f165d6dee5d424a68d80896f66b8a69632f570f2199d SHA512 22870d6ee8a0a0b4359d78173aef0ade49063bfad495fd40815852684a1cdf17f9f50585e0d693eb712c2a2225ea43c4387cf454f3b9bd39e01899f3936775f1
+AUX spidermonkey-perl-defined-array-check.patch 341 BLAKE2B e11a74cc2afbea5e39ec5f3fb4c108278a8b71b57ce71644184bc4e19188059f6cb9c164ab87877605028241ed0b68a1447414f1aa0f5453fa26a603ecd4f6a6 SHA512 5d178b68cf0744da874624da79cd31555bd882aed205e697a3f0bfc3cb91a149d74da79b7af5883ea5a23e1d1692753ebfda0d83e7a25ac000105849db5c1548
+DIST js-1.7.0.tar.gz 1165607 BLAKE2B 61749e10886bbb9e4958a41925fae8dcbd7d943b9bf838878368c30e26ba61f300bc2ec37982653b87fedf76707dda2ffd510282de4bce87d1da11ca42fa108c SHA512 9d9fbd9c1dae969ca19ddb0f977ac56f3e0479ec393b859de252fcdd8b7fc325e80399073540884ed365ce56a3219be34c0db9300d5e50f32969660c90527e51
+DIST js185-1.0.0.tar.gz 6164605 BLAKE2B 76a37f0ceae05d3475853875bd0ce4be6e525e4114816f8f281ea6fc6b60a71060975a0fa1cb843f57ad1e2f842dfb26b24244fa0fd6c20f6ae2ebbe430f70be SHA512 2af7122a7c7007fd7b6668776fe1222515a810b3e43bbf0f76b8f94e1ef406ffd3fb5ccec393021b00274c05b38a77235bc8d6886994c56762fcaf0aa7cf6718
+DIST mozjs-24.2.0.tar.bz2 15624530 BLAKE2B 633f3e42011a8395aa4e60842c2de1cb472692a0d9355c1e2c49e1ef943605cafaea0c836f9044adfceb38d7e04a0941b895474d08097f641bfca4494c5c5fe4 SHA512 49805e256f6fa797505c01b7596d5bb941ed7a2454862c52ed42ad48b5ae4540b777e77ed8da1b98c89f8622ed2c76052187983687008a4ff53594addb328df4
+DIST mozjs-38.3.0sfink2.tar.bz2 27232902 BLAKE2B 42a039a41b7479a32e22f260cb58f098e1a1d4833f801f193bdd8b75403f94567b9ef2ebe85b2a811fe2f9b27cd934afe1054bd4e7d9aae0b8a80acdec8e42a4 SHA512 debad1fbd21e025c567b083677cfd0a2023ec2aff750241f495ac2977034a7299e068cb3b0b2351c97457119cc8aef563f00416092a70a3a269d20947b700206
+DIST mozjs-45.0.2.tar.bz2 97508152 BLAKE2B 89600f7e2a3effe71ad140646110aaf3be91cc5313cf227f1d16e796e249e287cc8dbf2599aa4277f2652a83ec3570f58c1c51ef319632254b9ac5caec46bb9a SHA512 84a3cf12e2603e00bcfe518a1a5000f53b21758c1c6b32a0410e63ab7db8d4452028195b0ba3e56144054b06e90f8e5195b4db94dba711f7c75d11da99c6c61d
+DIST mozjs-52.4.0_pre20171003.tar.bz2 30588541 BLAKE2B ca3dace6f22d510d6d9f087f236100cae4b913b8d194fdec77f2a32b82276613417344fc4d899fca0d908ecb981d59f7e5608e7cd62f6f134dbcdf87f89a3276 SHA512 80e006ed7550b64dad7cf78335dd9f2d34f50ad486439887f0088eb3817242d24cf7c1d9325e2dcd4a01fd5c5f54d710873113b97fd914ccd961fa46a71653fa
+DIST mozjs17.0.0.tar.gz 6778934 BLAKE2B a37debf5079fc4c27bb9edd3172c6e7914f6128fac6ffa97b49ac266c477d0916b180fb68ecd0916a52f935959a83d73254b0ba72b4898adc5e3b85927d17d2a SHA512 39b68aeb9f712f146778d8b68ee795709a1372c8ab893a222af4eb34882427d6f5cf877e743d6cb2f1b4348c194d8f3774f00cb775b03515b34b49560b748be4
+DIST spidermonkey-52.0-patches-0.tar.xz 5172 BLAKE2B 8bcf9477de47ef3b882cd3281efa7f77c16ce11fc93f44446a620917adf629fde8290af1dd69f0930a889aacfee3603bf60eb9c1e718a1dfd3e218a1013b6192 SHA512 88ad640fb0efa4972f1b7782bd0abee1751b73914ee51faade93b25c4d8eec64e7693898842a406c49fc2ab43733404efeccb138afb64d2193b9a5eb612578e3
+DIST spidermonkey-slot0-patches-01.tar.xz 10488 BLAKE2B 4a5195ac11d1076046424fc10d1416d097fb230cd8b0b28ac8b65d379e0c0518586ced0f48f833dea52b13fb5d300e02664657ab2479bfcc343bc358d394d5d7 SHA512 6c878ed0b50c052989a8b965fed845e9c672b691f4c4b1f98ee82e81a33880e1e6bf1dac8222d71322553282de602a88272dedebbcf50d27967fc172f0a8054a
+DIST spidermonkey-slot17-patches-01.tar.xz 2748 BLAKE2B a55504d726f925096de7e066a1d323154bc796018644f347bc1d012ea6ee8441cc19f30689e06fd26bab5a5d2e8376e90bf2c1930a588be8b48865f7bbc524ea SHA512 21a90f85d156de3cca9811317507162a458f908bb447924fcfbf49b7bb70496b611ce7df90b90775316b8ceafda56692be3bf856b168b83ed40b8a5c668eed3f
+DIST spidermonkey-slot24-patches-01.tar.xz 3444 BLAKE2B f207577db223d51e315d473f0eefa8a2805fab49acd952fa5796eb4e967c82c76965afcdea1b55ac98c5e94f4321f40c1ea9079d5ebee99fdef950bddee91ab2 SHA512 712250983f726eb2fe7ae243e9ca510b6e5b8fa0f221fe5120c2e2f75334f7e4b10b8ab172869d7333a120529dbc2a513c170533d5ad5af27a2643ce1384bbdb
+DIST spidermonkey-slot38-patches-01.tar.xz 7472 BLAKE2B 7585aa6f5a84d6ae21e41137fca8da093580182f798f63bfcf2e402e3bf58df4cb3f43cef3eb635044508800f6757247fa3a65ca53230243a455925f436a9510 SHA512 953acee985d192c6d0f18f14c70fdda33a7c8f784c6833ca8b75495044b40a8b3f29b281c40dbfcda0c8570c111a3dd1717c2ef0ffd651c1b50d1f2bff1f6d09
+DIST spidermonkey-slot45-patches-01.tar.xz 5092 BLAKE2B 0188a179fc741ab84a93aae1e77f8b765868ca716b8879661bfa678aef918998c9488db3b866a13c79ae28edb43ac0ebb10345b0471b717c4174c61cba9646bc SHA512 d52f038a7b4f7b410b5a1f94a55962adafc5906e7d85f605f3fe45ad49417c2b9d58d853a81b5d2395a2842c9780992d5a2c1a0e67aa77fb09f21aff9aeb0f7a
+EBUILD spidermonkey-1.7.0-r3.ebuild 1543 BLAKE2B 45619239c02820571c6236095ffe37bd049e180b7a05df964602e5460299c3fa8e7e4fe6a6cb53b2e83c72d0e62757128e6379d38b141fc94cec22a37269e1de SHA512 f4d5449e687e611dec445ece6de0841185a18ab1df8a248bad47c884054859f8e73caf6c9fe8b7c67587ac84244dcd7dfec4a953b119132ebe36551b204a59a4
+EBUILD spidermonkey-1.8.5-r6.ebuild 4379 BLAKE2B a4add6a3f681f9f06f4fb0ad624ce9cc9dac3e307ce18a0541536700121921f31713ff39266b89381c0d769a8cddff7136ac1da1c776d2f5d0a719a25787e4c3 SHA512 8082170f9c1cba7ad578dfa1ba583a0309c85de4e9465bd1b149aaf47a8445f5ee7757e2760ce3adb87ef198b7ecd2ff70bd4f67ab3153919b7052ed55d0fb8a
+EBUILD spidermonkey-17.0.0-r4.ebuild 3546 BLAKE2B 0cf5236b5ee991dc161633db218d428a2498567d9d730dbdaa2bb1b61047e1adbd4713cee6808419c09b6c09c542f8c543db5c5ee6532167126cb69ebe6ae060 SHA512 bdb32474452a0d7b5ab681c27a46de05cb61bc89fac3aaa00e1289a35676bddd7de9e51eb02bed992535a82f75e1dec74c014e900787f356ea8ada58d5b066d0
+EBUILD spidermonkey-17.0.0-r5.ebuild 3563 BLAKE2B 4b5294071559ee1e8487dfa5df388e17fb357ec8898f6e4390c1d3540a89647df04245e4c33706e52080236f9fcec7422a2cd0463f1f78feca1afc42f1d29e40 SHA512 6546f0c8bc2e7b1baecd6d616550977d83079c71ee973ab811a9cede0612d95b892a5f4d02a4a4733b5e90fff9795cdf50531e41f278fa210c988467931433bb
+EBUILD spidermonkey-24.2.0-r3.ebuild 4015 BLAKE2B 6608e66e03d2b606dc0117a46b462778468ac3697e64c44aa8a102c830f32c17e12c8458b2f43b05cf90306e7331407686959141078001534d1e33607d89e1ae SHA512 d715cf8f6ceb2139c14502ebe4c01a5a949fa59937737529dd9a5074444e1c25a2379018d740af2bb2cf99bbb3e35280bc88e68a44fa95d49d24e73f1843f003
+EBUILD spidermonkey-24.2.0-r4.ebuild 3989 BLAKE2B a859c05afcfe262398de5f0b4d0c148eaf2d94f57e9f029814982efcc740acbfc8349e756f75b3ce83a746571e27a31d88c78126b1b1e0cc9154e4b86f53dc8e SHA512 ca080e9993b2c10aed9abd0d54bd0722e8f4a53ed755f60389e9bf6b0d3347115ca7cc347b708592619ef69f6f1f38e5c9778c949f7224e579e7da09cd269067
+EBUILD spidermonkey-38.3.0.ebuild 3876 BLAKE2B 4e1fdd70583e2e2dfdd97d62696f80b85eaadae4c94932b59189def260ec2054344281ecdabef5947fd64d667090ba740cc6ed92a2e750d212a8177dffa730fc SHA512 8e3b6a71f4b2cbf49f039e7dc0dfc5f580b4aa45b2cae4174c27b84f428486bfe20f346b8fcb120561a06f7550112ae1b2711d8a4ce9d5d080c2fbba0e6ebbde
+EBUILD spidermonkey-45.0.2.ebuild 3905 BLAKE2B 9bd9a00eb41ac4f61da71b3feed187d1a70a2b4487f305580732ad734e91bf512dba6f8a7a5889814982e70ce25c9c9b0be8b87f05dacef7edfa2e08b53ada3c SHA512 a9a39994674ecdf1a974fbcc20f8c94e1f1f168db4095ba8c21a9d2fd01a6dbd0a59c932419c6b5f6c42b9bd7cc8b2aeaeb81973663a44b23372ea331b65d5db
+EBUILD spidermonkey-52.4.0_pre20171003-r1.ebuild 3875 BLAKE2B e5f957410306221c13e15ab1766e23a9b57e3b596ff1d251f477eadb9b9eb15b59e15f75ab762f8e52bb2349123f57486cffa0de9ba258d57ae5f7fb4e9c60fc SHA512 889a47778f7c89916ae71c5258a76e59914bcbc16a00a2514fc2903ca13115d8499cc5b32411f55101e6f9d280d4cc624d12052905aa1f1a7370dad84d9d1e11
+MISC metadata.xml 906 BLAKE2B 8557bb4bfdce358f543be3ff571177d61beb5713ba6fa4c24c8e91522ca30f8c5b1bf42abd0324164cc6febd04d07c1ae3a311d6d68d62992be6368c20650ca9 SHA512 a411a781913fe81801799d4d801645fd8029ee4fb727431589cb948f97464edd828b8d86969b2207880432db8e8e627fad829fd95394fa121bb0ae97ae8249b0
diff --git a/dev-lang/spidermonkey/files/moz38-dont-hardcode-libc-soname.patch b/dev-lang/spidermonkey/files/moz38-dont-hardcode-libc-soname.patch
new file mode 100644
index 000000000000..708c7496975f
--- /dev/null
+++ b/dev-lang/spidermonkey/files/moz38-dont-hardcode-libc-soname.patch
@@ -0,0 +1,15 @@
+--- a/testing/mozbase/mozinfo/mozinfo/mozinfo.py 2018-01-12 12:21:16.764318254 -0500
++++ b/testing/mozbase/mozinfo/mozinfo/mozinfo.py 2018-01-12 12:22:23.392069398 -0500
+@@ -93,10 +93,11 @@
+
+ if info['os'] == 'linux':
+ import ctypes
++ import ctypes.util
+ import errno
+ PR_SET_SECCOMP = 22
+ SECCOMP_MODE_FILTER = 2
+- ctypes.CDLL("libc.so.6", use_errno=True).prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, 0)
++ ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True).prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, 0)
+ info['has_sandbox'] = ctypes.get_errno() == errno.EFAULT
+ else:
+ info['has_sandbox'] = True
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-r6.ebuild b/dev-lang/spidermonkey/spidermonkey-1.8.5-r6.ebuild
new file mode 100644
index 000000000000..b049a5711300
--- /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..533fbc1f02f2
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-17.0.0-r5.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2018 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..6613f6e1b6d9
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-24.2.0-r4.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2018 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.3.0.ebuild b/dev-lang/spidermonkey/spidermonkey-38.3.0.ebuild
new file mode 100644
index 000000000000..25f951f74151
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-38.3.0.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2018 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/_/.}sfink2"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+SRC_URI="https://archive.mozilla.org/pub/${PN}/releases/${PV}/${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_P}"
+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 \
+ "${FILESDIR}"/moz38-dont-hardcode-libc-soname.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..7e1b059c44aa
--- /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 ~arm64 ~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-3.1 b/dev-lang/squirrel-3.1
deleted file mode 100644
index 3ad7b316e3a1..000000000000
--- a/dev-lang/squirrel-3.1
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=sys-devel/make >=dev-util/cmake-3.9.6
-DESCRIPTION=A interpreted language mainly used for games
-EAPI=6
-HOMEPAGE=http://squirrel-lang.org/
-IUSE=examples static-libs
-KEYWORDS=amd64 x86
-LICENSE=ZLIB
-SLOT=0
-SRC_URI=https://github.com/albertodemichelis/squirrel/archive/v3.1.tar.gz -> squirrel-3.1.tar.gz
-_eclasses_=cmake-utils 57384a259cf0c7985ce651b2c0865405 desktop 1b286a7e7143d8c4ec89cd0d2743a097 eapi7-ver d97a56a62c7df8614afddcb25f5ff00f epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 ninja-utils d2e7e7d290428bb25c56dcf2502badc1 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=e0439aa9a0acdb22bce3667cf7daa238
diff --git a/dev-lang/squirrel/Manifest b/dev-lang/squirrel/Manifest
new file mode 100644
index 000000000000..2d4b2dbee3e5
--- /dev/null
+++ b/dev-lang/squirrel/Manifest
@@ -0,0 +1,3 @@
+DIST squirrel-3.1.tar.gz 175612 BLAKE2B 48a21b0ecd881dc3bea104e86013c3f3d5a4bc1e590cd67ef7e679e01383b7454aad4ea9b8ecec9b836a0ee44e8c9e470309f9c71050ed6d8deb76caac726aea SHA512 8aec059c801a8f6a1ddb9585cebd51457cfd43743cb0b03494e022fd47392e7b4b88e4703f184f4dcba2be8c0fb756e9b260e2f230e1bd92b37cdcb86d4f1141
+EBUILD squirrel-3.1.ebuild 899 BLAKE2B 8dc403fc9d1832106979b38f63baf4541fc6ac556ec568f42134f8d24d3dc2c59e98b126be88510bba63412fbf9a8ad103cf1055e01477671488737f17015231 SHA512 fb77b462774dd26126e9683e48ead56ed05582e49b4f5ac31fae870010f5c89f038cd51263b137fe16e8196ff3c994bcfacb40cad147f6eae068fae34da4e5c8
+MISC metadata.xml 395 BLAKE2B 3e9c28568b3d5d1af34d28e3d0da4f765247e2b0b52e9f833ef4c6c9060de915cfff3c8f8d429098a2d49a2bf9ded44d34460de6eaba5799dcf516854094e0f6 SHA512 e7332967d7ada57304e4e9036a61fd27d9fac11dd62a3c4b3627515d4f69cea1b1182132388d480648c469e193fee85bf09220679eb180a9d10c57f78bcb48b4
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-3.1.ebuild b/dev-lang/squirrel/squirrel-3.1.ebuild
new file mode 100644
index 000000000000..4a149398eb44
--- /dev/null
+++ b/dev-lang/squirrel/squirrel-3.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2017 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-1.0-r2 b/dev-lang/srf-1.0-r2
deleted file mode 100644
index f5f341532c8c..000000000000
--- a/dev-lang/srf-1.0-r2
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=install prepare
-DEPEND=sys-devel/flex virtual/yacc
-DESCRIPTION=The Simple Recursive Functions programming language
-EAPI=6
-HOMEPAGE=http://www.stratigery.com/srf.html
-KEYWORDS=~x86 ~x86-linux ~ppc-macos ~amd64
-LICENSE=GPL-2
-SLOT=0
-SRC_URI=http://www.stratigery.com/srf.html/srf-1.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=73152801c63f060215321ceae45576b6
diff --git a/dev-lang/srf/Manifest b/dev-lang/srf/Manifest
new file mode 100644
index 000000000000..ff7fb220d557
--- /dev/null
+++ b/dev-lang/srf/Manifest
@@ -0,0 +1,3 @@
+DIST srf-1.0.tar.gz 222493 BLAKE2B 09fb3e767e04ac735245e973d225616b0e527aa2ded49c9350c592284e2ecd840b439af61d27e67dfa3c932a320de787c371354503ed40a8af2a686dcf87b127 SHA512 420f691a937fa30220cd436faaf75299991452fd5f026dcc7aaa767e276eb245cb8eb88d875911826b66abad62fa10326b694301b4372b91e4ac20bf32c78388
+EBUILD srf-1.0-r2.ebuild 622 BLAKE2B 8778389f468e7539b6a86a6d5068fc57be5da7b42c57a0e236dc4d06a776a2c0902b76fe12177a9baae196c45dd089eeb3b591353ed4635cdcf376cbf92487f8 SHA512 55c1d574ea60d0bcb7a6b79d9e734c11b2ae0b3f62405266db98af196a43e82da2b77906736fe646ddc90466cab42df0385570e9b76fb53bb5c1ce782fa93261
+MISC metadata.xml 418 BLAKE2B 53a8d8a67492aa4c363751eae8327f45c17cd77e5ce1cc9dadc8e017397e4f569150a07e6e20ecc4c411b7fbb3fed8b4690bf6367067360e03d7a74aa2079df3 SHA512 16fea93364e4fbc9deadade67c2d2a69c45f53607315659b0c682497f8d01ce0f85a808e592cb3d67f521b5fa12f9b73b427d030923da4a735eb83baa80473b2
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-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-7.4.2 b/dev-lang/swi-prolog-7.4.2
deleted file mode 100644
index 96c84ff27f85..000000000000
--- a/dev-lang/swi-prolog-7.4.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=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 ) X? ( x11-base/xorg-proto ) java? ( test? ( =dev-java/junit-3.8* ) ) java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=free, small, and standard compliant Prolog compiler
-EAPI=5
-HOMEPAGE=http://www.swi-prolog.org/
-IUSE=archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc readline ssl static-libs test uuid zlib X elibc_FreeBSD java
-KEYWORDS=amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos
-LICENSE=BSD-2
-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 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://www.swi-prolog.org/download/stable/src/swipl-7.4.2.tar.gz mirror://gentoo/swi-prolog-7.4.2-gentoo-patchset-3.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=78e9a4655b8a65325f472f78a838eaab
diff --git a/dev-lang/swi-prolog-7.6.3 b/dev-lang/swi-prolog-7.6.3
deleted file mode 100644
index a63e9c08b586..000000000000
--- a/dev-lang/swi-prolog-7.6.3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=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 ) X? ( x11-base/xorg-proto ) java? ( test? ( =dev-java/junit-3.8* ) ) java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=free, small, and standard compliant Prolog compiler
-EAPI=5
-HOMEPAGE=http://www.swi-prolog.org/
-IUSE=archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc pcre readline ssl static-libs test uuid zlib X elibc_FreeBSD java
-KEYWORDS=~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos
-LICENSE=BSD-2
-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 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://www.swi-prolog.org/download/stable/src/swipl-7.6.3.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c82b437c62ec10d9b825621934759b48
diff --git a/dev-lang/swi-prolog-7.6.4 b/dev-lang/swi-prolog-7.6.4
deleted file mode 100644
index 9c1b9cdd5f07..000000000000
--- a/dev-lang/swi-prolog-7.6.4
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=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 ) X? ( x11-base/xorg-proto ) java? ( test? ( =dev-java/junit-3.8* ) ) java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=free, small, and standard compliant Prolog compiler
-EAPI=5
-HOMEPAGE=http://www.swi-prolog.org/
-IUSE=archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc pcre readline ssl static-libs test uuid zlib X elibc_FreeBSD java
-KEYWORDS=~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos
-LICENSE=BSD-2
-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 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://www.swi-prolog.org/download/stable/src/swipl-7.6.4.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c82b437c62ec10d9b825621934759b48
diff --git a/dev-lang/swi-prolog-7.7.17 b/dev-lang/swi-prolog-7.7.17
deleted file mode 100644
index 3f9d2bcc1f41..000000000000
--- a/dev-lang/swi-prolog-7.7.17
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=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 ) X? ( x11-base/xorg-proto ) java? ( test? ( =dev-java/junit-3.8* ) ) java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=free, small, and standard compliant Prolog compiler
-EAPI=6
-HOMEPAGE=http://www.swi-prolog.org/
-IUSE=archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc pcre readline ssl static-libs test uuid zlib X elibc_FreeBSD java
-KEYWORDS=~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos
-LICENSE=BSD-2
-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 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://www.swi-prolog.org/download/devel/src/swipl-7.7.17.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=33f50845f75787c5eae51437002e1951
diff --git a/dev-lang/swi-prolog-7.7.18 b/dev-lang/swi-prolog-7.7.18
deleted file mode 100644
index 8a99df10b0ff..000000000000
--- a/dev-lang/swi-prolog-7.7.18
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=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 ) X? ( x11-base/xorg-proto ) java? ( test? ( =dev-java/junit-3.8* ) ) java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=free, small, and standard compliant Prolog compiler
-EAPI=6
-HOMEPAGE=http://www.swi-prolog.org/
-IUSE=archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc pcre readline ssl static-libs test uuid zlib X elibc_FreeBSD java
-KEYWORDS=~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos
-LICENSE=BSD-2
-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 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://www.swi-prolog.org/download/devel/src/swipl-7.7.18.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=33f50845f75787c5eae51437002e1951
diff --git a/dev-lang/swi-prolog-7.7.18-r1 b/dev-lang/swi-prolog-7.7.18-r1
deleted file mode 100644
index 0740f18bbc32..000000000000
--- a/dev-lang/swi-prolog-7.7.18-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=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 ) yaml? ( dev-libs/libyaml ) X? ( x11-base/xorg-proto ) java? ( test? ( =dev-java/junit-3.8* ) ) java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=free, small, and standard compliant Prolog compiler
-EAPI=6
-HOMEPAGE=http://www.swi-prolog.org/
-IUSE=archive berkdb debug doc +gmp hardened java +libedit libressl minimal odbc pcre readline ssl static-libs test uuid zlib X yaml elibc_FreeBSD java
-KEYWORDS=~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos
-LICENSE=BSD-2
-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 ) yaml? ( dev-libs/libyaml ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://www.swi-prolog.org/download/devel/src/swipl-7.7.18.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c8141f2b5ae58272242278b15721654d
diff --git a/dev-lang/swi-prolog/Manifest b/dev-lang/swi-prolog/Manifest
new file mode 100644
index 000000000000..a612dabe7e3e
--- /dev/null
+++ b/dev-lang/swi-prolog/Manifest
@@ -0,0 +1,13 @@
+DIST swi-prolog-7.4.2-gentoo-patchset-3.tar.gz 3256 BLAKE2B d7997d7307db738f0948a89f5e1cee195be4424737e50df915a293c7cb1b3bc1ce09ebd372e8c5f24c95df7335676f12cdc04749de25396eac71471704cfc579 SHA512 bc1b408e311d10ab59fa221bf5ef3d3cb1003a3edcdd13fd000cbc647117458e1f130e960cc37968481ccc2047529ca128159fac8e0ee75114022ed439905cce
+DIST swipl-7.4.2.tar.gz 16496738 BLAKE2B a8f45c4277e48c0aa38f8b278b466dcb9e0a776325a9ed9e08c252660671d3ee0ee441978394682276b3fb9b0eca73ad10e02aba4671630bef0a1e8f813dd3c5 SHA512 5b526d4f079e7a36184f871bb7341330bcadaeee2a69af981fbcad71ae76c77331b1f157174ac2b31d96e069dc530afa86c024de6709edd9dc8baee3b4ebffb3
+DIST swipl-7.6.3.tar.gz 16772590 BLAKE2B 644be801e290ec9d949a9b7462256a35e11cf9afd62d0b62c315e3620a3943809f58698a23f279454e00299f7b7f7b91e8d9694a139e8c424cb2f83a4efc7a52 SHA512 d84af1a565935af9934c6b75192bb2dd87388ee8fe793ade35d5549a95ec5eb83da6b10508766e795f88393fededea4ec7a3a0c2f0f685d96ab615e171d7d1f4
+DIST swipl-7.6.4.tar.gz 16777875 BLAKE2B 94409966362e649f4748b94b4ec25415bb827c7742aa39453d8e37db4ce992a65ad2d054ded4e651f2a9abe3a9438285bc9c9c895437c087ae6cf88f4afae9ca SHA512 f0ed16e4f1436115651c38a0bb37008d0dadad5a19b0f09894fcfc51dd3d429f86488e89cce00788c3c36cc2f0cd2957f92df47d5441133a6f8ea9d91ca5470f
+DIST swipl-7.7.17.tar.gz 17020719 BLAKE2B c818a9dcf6713398c41efdec186a141ddb09c319c5c5ceff7a200d0c83f131ad8de3165730b88026e117c26d3eab209ae30d096f307bfa5ab9ca7b3c3458c39b SHA512 f8ce0b6d582c21457a9264179e620edbbfd8de975c95cf86211fd99ca387d021cd503adb5bef2bbdacab1cdb83fbf384834fd706808985c1c24f25d960a494d7
+DIST swipl-7.7.18.tar.gz 17025839 BLAKE2B e75be08c03965ff56e67ffc8b4743ce13da444d7a22f4c5234968ac38f131fe7762ff0b7c8c31f46d5f9f477293833483665cbcf191d54a9a51bb5661dcd460c SHA512 ec3daca594a6731d2f39851b8d7800f6040e401e132e153337393faf2595bcb1c0bc382477e34cc758f5d992731bfc2a60d2cdf563f3ca61643d35b0bc32a380
+EBUILD swi-prolog-7.4.2.ebuild 3398 BLAKE2B 368ef93ceb17042a28699f9aa469e6b5c39aa29154b810e43fd050ab3bc1079f83680cfac8f4108c7c297a51e9bdd28357a0b6241c08faef3ea5f81ab1605558 SHA512 76d094f62e442ac86d32eaf467179fdcf4d4edf6034f711104e91f8a01b7e343208ef0b6e492ed18c8c0605b96a48f1adef8f3903f861c716e882cb9695b0dd2
+EBUILD swi-prolog-7.6.3.ebuild 3395 BLAKE2B 6445c399d7a7518bcd4ce05b9ea0bf50c7d0297d5a24d9ef84a48c36600077cea8c8b77b010d28e25dfe0766e12d1f560f42e5597a602f6bdfc7351ea6e0fa62 SHA512 830766267d3e4b60897dfcdab5263cee600ccfa2cd80f970ef3b4c3695cc3ddf9989ae85527f45cdf124898210f108a98a32a613de2543a8db813d42482b0687
+EBUILD swi-prolog-7.6.4.ebuild 3395 BLAKE2B 6445c399d7a7518bcd4ce05b9ea0bf50c7d0297d5a24d9ef84a48c36600077cea8c8b77b010d28e25dfe0766e12d1f560f42e5597a602f6bdfc7351ea6e0fa62 SHA512 830766267d3e4b60897dfcdab5263cee600ccfa2cd80f970ef3b4c3695cc3ddf9989ae85527f45cdf124898210f108a98a32a613de2543a8db813d42482b0687
+EBUILD swi-prolog-7.7.17.ebuild 3419 BLAKE2B cdddb2edae9aa893d13387d22e4b40b6d98dea32d227b078465f52952bc92d5a1b12bac23a6308a4e2185a74399155d5f338b46733bb75502a7fd4051b2e3194 SHA512 a3821b60339d2543cd9449e0e597642c838b9293555a8e2f72be1d79087c88b51b7a2525e444f8a12f57ba6f4c499c6d81ab9f3d3cbf9ac91df26c0e54962130
+EBUILD swi-prolog-7.7.18-r1.ebuild 3474 BLAKE2B 10150dce5d4c4890778593b2b5f45c29d9f9fa0fdaf31f3b375b582ec1779c0b73d8410d3111b4993b4a6a57737dda1cc0fb0ba2e5c256bb9ff3323c99918777 SHA512 bdd4cd2d21446fbb108f4dd4b9313a44da9c82d93e479ece9b3ac7a3b0da7df897e3f0266a589571eaee08304c63baf8c07ee902a25d7158925b9ece6a1c7181
+EBUILD swi-prolog-7.7.18.ebuild 3419 BLAKE2B cdddb2edae9aa893d13387d22e4b40b6d98dea32d227b078465f52952bc92d5a1b12bac23a6308a4e2185a74399155d5f338b46733bb75502a7fd4051b2e3194 SHA512 a3821b60339d2543cd9449e0e597642c838b9293555a8e2f72be1d79087c88b51b7a2525e444f8a12f57ba6f4c499c6d81ab9f3d3cbf9ac91df26c0e54962130
+MISC metadata.xml 419 BLAKE2B 6d92e0713ed8da803ff8b6c778e616882af2fdb1426a62ea7bb6a265bbfff9a5c7debb8bf6a25c4ab60ed54a865b79fa3da4a09bc8a9123acf63dcb32107f54e SHA512 f805393c909e4108fe72b94f131d37d45279af1a4b501f9c3ae12d21590ef9c19227ca2a4b2966239ddb84847ce979cfbfcf3f3a2d24b60cb23977c522ff59c3
diff --git a/dev-lang/swi-prolog/metadata.xml b/dev-lang/swi-prolog/metadata.xml
new file mode 100644
index 000000000000..cf43740db6e7
--- /dev/null
+++ b/dev-lang/swi-prolog/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>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>
+ <flag name="yaml">Use libyaml for YAML pack</flag>
+</use>
+</pkgmetadata>
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..9b30d3fd846b
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.4.2.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2018 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-base/xorg-proto )
+ 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.6.3.ebuild b/dev-lang/swi-prolog/swi-prolog-7.6.3.ebuild
new file mode 100644
index 000000000000..f745720052e3
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.6.3.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2018 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 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-base/xorg-proto )
+ 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.4.ebuild b/dev-lang/swi-prolog/swi-prolog-7.6.4.ebuild
new file mode 100644
index 000000000000..f745720052e3
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.6.4.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2018 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 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-base/xorg-proto )
+ 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.17.ebuild b/dev-lang/swi-prolog/swi-prolog-7.7.17.ebuild
new file mode 100644
index 000000000000..38db2fe7a5aa
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.7.17.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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-base/xorg-proto )
+ 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
+
+ eapply_user
+}
+
+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} -DOF=_Z_OF"
+
+ 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.18-r1.ebuild b/dev-lang/swi-prolog/swi-prolog-7.7.18-r1.ebuild
new file mode 100644
index 000000000000..4e902730ae01
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.7.18-r1.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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 yaml"
+
+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 )
+ yaml? ( dev-libs/libyaml )"
+
+DEPEND="${RDEPEND}
+ X? ( x11-base/xorg-proto )
+ 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
+
+ eapply_user
+}
+
+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} -DOF=_Z_OF"
+
+ 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 yaml) \
+ $(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.18.ebuild b/dev-lang/swi-prolog/swi-prolog-7.7.18.ebuild
new file mode 100644
index 000000000000..38db2fe7a5aa
--- /dev/null
+++ b/dev-lang/swi-prolog/swi-prolog-7.7.18.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+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-base/xorg-proto )
+ 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
+
+ eapply_user
+}
+
+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} -DOF=_Z_OF"
+
+ 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-2.0.12 b/dev-lang/swig-2.0.12
deleted file mode 100644
index b7fa0bf29384..000000000000
--- a/dev-lang/swig-2.0.12
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install
-DEPEND=pcre? ( dev-libs/libpcre ) ccache? ( sys-libs/zlib )
-DESCRIPTION=Simplified Wrapper and Interface Generator
-EAPI=5
-HOMEPAGE=http://www.swig.org/
-IUSE=ccache doc pcre
-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
-LICENSE=GPL-3+ BSD BSD-2
-RDEPEND=pcre? ( dev-libs/libpcre ) ccache? ( sys-libs/zlib )
-RESTRICT=test
-SLOT=0
-SRC_URI=mirror://sourceforge/swig/swig-2.0.12.tar.gz
-_md5_=fe7a28cc1999505b8754fb159010e84c
diff --git a/dev-lang/swig-2.0.9 b/dev-lang/swig-2.0.9
deleted file mode 100644
index 124c095952a4..000000000000
--- a/dev-lang/swig-2.0.9
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install
-DEPEND=pcre? ( dev-libs/libpcre ) ccache? ( sys-libs/zlib )
-DESCRIPTION=Simplified Wrapper and Interface Generator
-EAPI=4
-HOMEPAGE=http://www.swig.org/
-IUSE=ccache doc pcre
-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
-LICENSE=GPL-3+ BSD BSD-2
-RDEPEND=pcre? ( dev-libs/libpcre ) ccache? ( sys-libs/zlib )
-RESTRICT=test
-SLOT=0
-SRC_URI=mirror://sourceforge/swig/swig-2.0.9.tar.gz
-_md5_=58b103f5f51f1e4c37094b20c65a611d
diff --git a/dev-lang/swig-3.0.12 b/dev-lang/swig-3.0.12
deleted file mode 100644
index 0c09c8949e3a..000000000000
--- a/dev-lang/swig-3.0.12
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install
-DEPEND=pcre? ( dev-libs/libpcre ) ccache? ( sys-libs/zlib )
-DESCRIPTION=Simplified Wrapper and Interface Generator
-EAPI=6
-HOMEPAGE=http://www.swig.org/
-IUSE=ccache doc pcre
-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
-LICENSE=GPL-3+ BSD BSD-2
-RDEPEND=pcre? ( dev-libs/libpcre ) ccache? ( sys-libs/zlib )
-RESTRICT=test
-SLOT=0
-SRC_URI=mirror://sourceforge/swig/swig-3.0.12.tar.gz
-_md5_=d2c8d2b9d27c0d01616cd93a73c4905e
diff --git a/dev-lang/swig/Manifest b/dev-lang/swig/Manifest
new file mode 100644
index 000000000000..57c62d69ad00
--- /dev/null
+++ b/dev-lang/swig/Manifest
@@ -0,0 +1,7 @@
+DIST swig-2.0.12.tar.gz 5312394 BLAKE2B 1866f293f4156fd6373e8c30811bea9a54d75adde70408f2adeebdf103a6519eff9c9b9d06984b6c390f2c5447fd38e9280cf52ee3dbedda9c693f7e6b1ed914 SHA512 7969cd8ce309ca46316fa4851b5cdd72122cb075cde8c17d74ee97969cd9555eff0d995f60bf17ff4090c83f66f6c66df2c61d9c06e2e30a2b36a4b8204c5890
+DIST swig-2.0.9.tar.gz 5307341 BLAKE2B b6367bfd1e66f6622205164d61659e10fc893c6165573c3ef5cbceb479f1f26249bb4f8e8d825e8a1f66356ceb697eac9ad15ba7cb91b969a177b954c9a82801 SHA512 9967eb2e1733c11ceb813bfa18c8c4187ba527d45de9b2ad962f287afba9cb0e1432b921670c5fe07ed31decc2e2785a16f42f69148a4e8a1959a9b66ce2e91f
+DIST swig-3.0.12.tar.gz 8149820 BLAKE2B 05ce913dedbbde26592619e0edc65050cb31a517f309c1188252cb8c276147cb28ebf4d8534c31b75c4ed8be5d42223b432a7318bf8eb5b2d4d528e5ff9a781b SHA512 5eaa2e06d8e4197fd02194051db1e518325dbb074a4c55a91099ad9c55193874f577764afc9029409a41bd520a95154095f26e33ef5add5c102bb2c1d98d33eb
+EBUILD swig-2.0.12.ebuild 855 BLAKE2B 4e7217071e091ade918147d72b6649f60e24583fc59a84fcba118904fe0b9a406bdff92f83bb0e1280fe7b38f5d3f69b4657c339260abf3c2a89c6ef0c0fe7b9 SHA512 c11a8d13d3959a3b045b7acb0f214419bda6076cd220929ae59b7a3f875d5baf9e20237b58bd285ffdc567c21b4b72250629bc15d80c9d3d4a61e17591155262
+EBUILD swig-2.0.9.ebuild 832 BLAKE2B 4a1d6d9e1f5877f912c0dbeeee0a6aad9349637cb9be9a8085aead2b197165a72d0a249fd328b8fb1d183dc2317826b68db52fc374d68e351d2675cbf9590ecc SHA512 1b15b0e0dbe983176c0c22a80adf37f682a68019df344c896ba3e62d91062a5a8c0c61ba7f03d324c9aa162bc668266cfce907e46c58525b38900a3a7905eec6
+EBUILD swig-3.0.12.ebuild 858 BLAKE2B ba17d5a6bd501b5fc634197ce6c3e1d93d755299a83a4288494a78af2b920b02a2a5bc75f628c8d52ea9ee200884e13c34675d0da39a0eb6c039ad4037070a50 SHA512 527d3349b12319e88e18661abd279331be772b5293c5c1e1ac11a4935818c8d26c442b6c71e0f26f9e5269bb57d4b6f752c52411006c0bbf54ab7e90ce42cba9
+MISC metadata.xml 1076 BLAKE2B 5cf4602a8a3a6c27f8b5dbbc254b1ca40d6d7a9f843292181ddab8a2f7882e4248bcc8405c1e768acb1f42dde26d9d105fddd61e14d4154a80ecde1e4190e132 SHA512 ca1468d9c5e22b88727c0f807a3d8cf427793c72f713c96de0f0bbc6ca0144db5280f8cb76eedaf7680fcea851d2c276009e16afaf1b43dd5b14d9832ba0ae78
diff --git a/dev-lang/swig/metadata.xml b/dev-lang/swig/metadata.xml
new file mode 100644
index 000000000000..3b69f7b5ec4e
--- /dev/null
+++ b/dev-lang/swig/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>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-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.12.ebuild b/dev-lang/swig/swig-3.0.12.ebuild
new file mode 100644
index 000000000000..0ca5851f25c4
--- /dev/null
+++ b/dev-lang/swig/swig-3.0.12.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2018 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/tcc-0.9.26-r1 b/dev-lang/tcc-0.9.26-r1
deleted file mode 100644
index c3673c958fe1..000000000000
--- a/dev-lang/tcc-0.9.26-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-lang/perl
-DESCRIPTION=A very small C compiler for ix86/amd64
-EAPI=5
-HOMEPAGE=https://bellard.org/tcc/
-IUSE=test
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-2.1
-RDEPEND=!dev-lang/tendra
-SLOT=0
-SRC_URI=https://download.savannah.gnu.org/releases/tinycc/tcc-0.9.26.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=7128ac2ba73c5085b46b90e54401f4fe
diff --git a/dev-lang/tcc-0.9.26-r2 b/dev-lang/tcc-0.9.26-r2
deleted file mode 100644
index ec0bb9a1feae..000000000000
--- a/dev-lang/tcc-0.9.26-r2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-lang/perl
-DESCRIPTION=A very small C compiler for ix86/amd64
-EAPI=5
-HOMEPAGE=https://bellard.org/tcc/
-IUSE=test
-KEYWORDS=~amd64 ~x86 ~amd64-linux
-LICENSE=LGPL-2.1
-RDEPEND=!dev-lang/tendra
-SLOT=0
-SRC_URI=https://download.savannah.gnu.org/releases/tinycc/tcc-0.9.26.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=12fde3d9ce03b803b7804822da5e625d
diff --git a/dev-lang/tcc-0.9.26-r3 b/dev-lang/tcc-0.9.26-r3
deleted file mode 100644
index 4f317bdfb621..000000000000
--- a/dev-lang/tcc-0.9.26-r3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-lang/perl
-DESCRIPTION=A very small C compiler for ix86/amd64
-EAPI=6
-HOMEPAGE=https://bellard.org/tcc/
-IUSE=test
-KEYWORDS=~amd64 ~x86 ~amd64-linux
-LICENSE=LGPL-2.1
-RDEPEND=!dev-lang/tendra
-SLOT=0
-SRC_URI=https://download.savannah.gnu.org/releases/tinycc/tcc-0.9.26.tar.bz2
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=fd59c2cce97abc81b715e9e93b69f082
diff --git a/dev-lang/tcc-0.9.27 b/dev-lang/tcc-0.9.27
deleted file mode 100644
index 2d9e460497d6..000000000000
--- a/dev-lang/tcc-0.9.27
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=dev-lang/perl
-DESCRIPTION=A very small C compiler for ix86/amd64
-EAPI=6
-HOMEPAGE=https://bellard.org/tcc/
-IUSE=test
-KEYWORDS=~amd64 ~x86 ~amd64-linux
-LICENSE=LGPL-2.1
-RDEPEND=!dev-lang/tendra
-SLOT=0
-SRC_URI=https://download.savannah.gnu.org/releases/tinycc/tcc-0.9.27.tar.bz2
-_eclasses_=multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=90c136ff6b051f28187d9181e9f6c28c
diff --git a/dev-lang/tcc-9999 b/dev-lang/tcc-9999
deleted file mode 100644
index 704c473ec64f..000000000000
--- a/dev-lang/tcc-9999
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test unpack
-DEPEND=dev-lang/perl >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=A very small C compiler for ix86/amd64
-EAPI=6
-HOMEPAGE=https://bellard.org/tcc/
-IUSE=test
-LICENSE=LGPL-2.1
-RDEPEND=!dev-lang/tendra
-SLOT=0
-_eclasses_=git-r3 8f6de46b0aa318aea0e8cac62ece098b multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607
-_md5_=06399073dc62e9b71c975fe5bf663d8d
diff --git a/dev-lang/tcc/Manifest b/dev-lang/tcc/Manifest
new file mode 100644
index 000000000000..33aaad84a633
--- /dev/null
+++ b/dev-lang/tcc/Manifest
@@ -0,0 +1,10 @@
+AUX clang.patch 441 BLAKE2B 6b60d1fd80301abdd707a8310e0c93d12e91bb9d680b72db13c48de8bbe31a8923406c008c9c2ad68216ee2688c8651df85056127fefc5fa31f48521442fcc97 SHA512 e19817d5f500bd95060efff3c984218800cbcabe01a88fb048b459cce8d67c435ff1d2130d7eedac55f5726bc0cc13dabe41c2535c2bc3c5fc0a21dc7128a965
+AUX linker.patch 667 BLAKE2B b84f58dd0c460e36c90c6ff3f6cc342034daede23bae157152c7c44ac845c0cd30c6773966227a0d0cb6b08bb70770323c04209c880b2150414687e973717207 SHA512 aadbd3676b5333ae3b8a04c75117633ca8b08c5fa0f695b9f7ff7d3019ff06211c986d0a0986c7dc329621cc1a57e23d50924fd49cf1367490d962fcef4b4efe
+DIST tcc-0.9.26.tar.bz2 525906 BLAKE2B 588e387d563ddede9842ac9012df36520fb1596bd3047fda2684ab44e49f8c1a35c1560c2fee724933cfcad5d618d84df853b72e1fee144b551cb67f7af1558a SHA512 abdbe208498cf4865a2036b5426616f5888b9b0e8d5d2fda6d1dd4afab3386167f12eca87d8a5c4c9b7dc88620d983ddce3e874b7dfa9c21eceea29ffa635d53
+DIST tcc-0.9.27.tar.bz2 634999 BLAKE2B 9a76dac9f54fa0b64a72e874cfec9a4bd9b938d244d064b2e76bd31acfb9e48fdbdb8895132634be1dee4302293405bf75606a6804c8178afa8fd30daa53b73a SHA512 835184292d97c07f0ff7b36ec550e855e649b04e23c7e2a1c706d223409eb60708dc1ae969f28eba45e56c8b96ae56936b93caf9d8a13ac5adf119014d5367a7
+EBUILD tcc-0.9.26-r1.ebuild 1568 BLAKE2B fab0abb6b2ec74a17ce36a28cbd42c61f5a70b293049fba563d4b753ec538936ef6d75b329a745cc27affaf177d6d825333f19949b0d71be327d6d7e2599344d SHA512 621f6d0dd29148f329245e8385d9d37fe742cc993f6d33ab1993cd4c8879c5d7b022210f8487051de4988e7a2dd4866e662dd572c6d5c8b4b67a4ad6bf2be740
+EBUILD tcc-0.9.26-r2.ebuild 1538 BLAKE2B e28c7c8b8e796d762f848676997bf10fbe11cc1fedb9a943bdb2f7a43d4a5a29d5dd617b3750dab56e3239653c42fb54f8937ea5257c0db30336f04dc49e67c0 SHA512 efc4358782dbfea9bddefe26328fd20e4d70ec2debb76bf9a7942d1d9eed3120749ff3cc1e6bde50dfa58d550b44efaa5a730082ba497f652304234a45500b31
+EBUILD tcc-0.9.26-r3.ebuild 1702 BLAKE2B 01eb3abfd82d3e76b799a14fe8593b64144975becb784182df81c0516f93fd8818fb0ea6f11bfb32e6c7fede220ad91d09d9f51d9702d0fb22e119fea18aaed4 SHA512 578de3aa7211dddfc4b5d08cf33d13d730140866a71b300e1753100cda606a9676efff847dea7f6420bad17e9e23844bd618557095aa33c6ee386583a136e569
+EBUILD tcc-0.9.27.ebuild 1545 BLAKE2B f162a055e57f04656b73ceb5edc43de3f69b893c7e3d94ce1749cf8604f1a366ec774769c0365b0160b1b7260ee245807e176481098998452216d72e226ad6ac SHA512 17da77bf834848d81396e715f23b81282f820a7fee07646b3a6b2c868a73a3852a3a53f521cd72d4f7ec5c930a1b9668bf16ae309f6fc10c96ba9ef9cf235bd3
+EBUILD tcc-9999.ebuild 1692 BLAKE2B fe9b98bb754a65cd7dabb4e5fbd528b1226df26c610b69ec3c84f1b3d14908af5eaf2fedff1c31cf08748778f9dd1b7edc3a4de2be1066aec192127f0b9d6f1e SHA512 90ba80835413a83a545d6545286626dd95f42f0ee3991609633f6ad1e29469a4a59edd0b23d57babed6a7ddc4f35781b9f324172a0d687fe26f5b7d155909b6c
+MISC metadata.xml 316 BLAKE2B b344343dfa24e8c1d5743fbb628c6abec535a89722195816d8b58d8c1291c320fa98fda44151736c8f362f0186608977321f914fc3f09f88eb9efa17ec064ce1 SHA512 87e93f1667a8b911d4f8e79d05ab06aca7933d347387157e9a1d5d79260f976e6e9df2c172656acf5e961afbbeae640868ba28ade4c6e73ed09e020f9bd14978
diff --git a/dev-lang/tcc/files/clang.patch b/dev-lang/tcc/files/clang.patch
new file mode 100644
index 000000000000..01cc72335fd8
--- /dev/null
+++ b/dev-lang/tcc/files/clang.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/files/linker.patch b/dev-lang/tcc/files/linker.patch
new file mode 100644
index 000000000000..8304470e3682
--- /dev/null
+++ b/dev-lang/tcc/files/linker.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/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..07171a4fca78
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.26-r1.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2018 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="https://bellard.org/tcc/"
+SRC_URI="https://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..757cc7d58e06
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.26-r2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2018 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="https://bellard.org/tcc/"
+SRC_URI="https://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..edcf65c95fd7
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.26-r3.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2018 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="https://bellard.org/tcc/"
+SRC_URI="https://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-0.9.27.ebuild b/dev-lang/tcc/tcc-0.9.27.ebuild
new file mode 100644
index 000000000000..c9bb96edd47e
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.27.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2018 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="https://bellard.org/tcc/"
+SRC_URI="https://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
+
+ 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..dbc3af48d0a5
--- /dev/null
+++ b/dev-lang/tcc/tcc-9999.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+DESCRIPTION="A very small C compiler for ix86/amd64"
+HOMEPAGE="https://bellard.org/tcc/"
+
+if [[ $PV == *9999* ]]; then
+ EGIT_REPO_URI="https://repo.or.cz/r/tinycc.git"
+ KEYWORDS=""
+ SRC_URI=""
+ scm_eclass=git-r3
+else
+ KEYWORDS="~amd64 ~x86 ~amd64-linux"
+ SRC_URI="https://download.savannah.gnu.org/releases/tinycc/${P}.tar.bz2"
+fi
+
+inherit toolchain-funcs ${scm_eclass}
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+
+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
+
+ 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/tcl-8.5.17 b/dev-lang/tcl-8.5.17
deleted file mode 100644
index e62a755039d0..000000000000
--- a/dev-lang/tcl-8.5.17
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare test
-DEPEND=>=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Tool Command Language
-EAPI=5
-HOMEPAGE=http://www.tcl.tk/
-IUSE=debug threads abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x86-solaris
-LICENSE=tcltk
-RDEPEND=>=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]
-SLOT=0/8.5
-SRC_URI=mirror://sourceforge/tcl/tcl8.5.17-src.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=2fff39486d3ea9c1fdf8da6ca5c90b94
diff --git a/dev-lang/tcl-8.5.17-r100 b/dev-lang/tcl-8.5.17-r100
deleted file mode 100644
index 1b205852fdee..000000000000
--- a/dev-lang/tcl-8.5.17-r100
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=>=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] !=dev-lang/tcl-8.5*:0 >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Tool Command Language
-EAPI=5
-HOMEPAGE=http://www.tcl.tk/
-IUSE=debug threads abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x86-solaris
-LICENSE=tcltk
-RDEPEND=>=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] !=dev-lang/tcl-8.5*:0
-SLOT=8.5
-SRC_URI=mirror://sourceforge/tcl/tcl8.5.17-src.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=23c7ca01d21bd84f27a434d5f9944f92
diff --git a/dev-lang/tcl-8.6.5 b/dev-lang/tcl-8.6.5
deleted file mode 100644
index 52e72cfb09ff..000000000000
--- a/dev-lang/tcl-8.6.5
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare test
-DEPEND=>=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Tool Command Language
-EAPI=6
-HOMEPAGE=http://www.tcl.tk/
-IUSE=debug +threads abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x86-solaris
-LICENSE=tcltk
-RDEPEND=>=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]
-SLOT=0/8.6
-SRC_URI=mirror://sourceforge/tcl/tcl-core8.6.5-src.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=5c8e258c5d03ccc9aed7597ee90ec1fd
diff --git a/dev-lang/tcl-8.6.6 b/dev-lang/tcl-8.6.6
deleted file mode 100644
index d04de6527c32..000000000000
--- a/dev-lang/tcl-8.6.6
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare test
-DEPEND=>=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Tool Command Language
-EAPI=6
-HOMEPAGE=http://www.tcl.tk/
-IUSE=debug +threads abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x86-solaris
-LICENSE=tcltk
-RDEPEND=>=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]
-RESTRICT=test
-SLOT=0/8.6
-SRC_URI=mirror://sourceforge/tcl/tcl-core8.6.6-src.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=26b2c0123307ee158adbf078b0a9b2b7
diff --git a/dev-lang/tcl-8.6.7 b/dev-lang/tcl-8.6.7
deleted file mode 100644
index 78cadc36dc0e..000000000000
--- a/dev-lang/tcl-8.6.7
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst prepare test
-DEPEND=>=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=Tool Command Language
-EAPI=6
-HOMEPAGE=http://www.tcl.tk/
-IUSE=debug +threads abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64
-KEYWORDS=~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~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
-LICENSE=tcltk
-RDEPEND=>=sys-libs/zlib-1.2.8-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]
-SLOT=0/8.6
-SRC_URI=mirror://sourceforge/tcl/tcl-core8.6.7-src.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=62eda72bd94a817626996be505b767f0
diff --git a/dev-lang/tcl/Manifest b/dev-lang/tcl/Manifest
new file mode 100644
index 000000000000..2d89a1dedb94
--- /dev/null
+++ b/dev-lang/tcl/Manifest
@@ -0,0 +1,12 @@
+AUX tcl-8.5.13-multilib.patch 258 BLAKE2B ca0453e8e0f6fdc1302f024ff81a8a6e012d0bfce592b990a349b10bed87d2adbb5dd0f68590373604327074d8da0bddeedb74549a5b33babaeba565838bf3f5 SHA512 7c5e06ba1028016abb6d1b3160834e311044c85db8ee1ba4f4b4d7a961096afeebff4164b276907de8b807ea8138225f1cad7641f2221284383aa31423353924
+AUX tcl-8.5.14-conf.patch 427 BLAKE2B c7d97bccebc45beec003bcf005fab6ed7f544744d81f08778a997b767ea0a60fd07f7b7cbc464ef8252e47717b34c0c42c871331a04740e23caeddbfb351de16 SHA512 e8097acb127966e6f2914c888278acdd9042d881b4d9436853ad7ed2361e8d67a372d4b0b0d5f0333e6bf90220e72df5c5eeffd4b44bc8e94ea9631ddc98cf16
+DIST tcl-core8.6.5-src.tar.gz 5846556 BLAKE2B 9c3c48acffc13be526b507fc19711b21e710a84642d37d494bb46a2d4ac9445a95749fd9556ffbda57d55f90bd566d0c9cd72a800a34f062616aacf57e811aa4 SHA512 b726f7d3193ad92ba64911b8c724d5454c5a93d5f5e95462ec0a6d8ccbbdf20093888f66c83956d7631392ca805c1a80430f102c0a932de3ed55311101e0e09f
+DIST tcl-core8.6.6-src.tar.gz 5868427 BLAKE2B 3444d474bfdc4958919dbf75527420614251e3cffb0d18fbbf547ffb83ead544f266b6ea868738ae40e02075cf31be6e753e0f89da02a2a81ededf09fc9dd2e6 SHA512 469a0221ed16569b70986cdde261d0c0df3bf64c493b8d6fc8368eb14597f7c2f6a01f082a1c8f27eb720618956e053cc97fbb9aaf7bb29cc96781cdc8e9518c
+DIST tcl-core8.6.7-src.tar.gz 5875027 BLAKE2B bc08e4e6639ba33176c8c1e670b957b8ad62a4790ace4ff8f8dc964f676ca87473c31c28f645d32a8287f844756fa224a077f96f1425f61b9872a4a0ae1429a1 SHA512 95c8c5bcb4fe604a77ca6ba9d49f9e90d156feaa9f3ab97661983f256ab54476b103ec8de01cd47231ed95e6df5e36d60514aed2ba5b8f3619cc5a3698ad3ee5
+DIST tcl8.5.17-src.tar.gz 4546317 BLAKE2B 27031dd3bd5790d03692e77edf91eb7fae8a40d8d193d8c8ce4e79b21f90e683bfc9d5b71764760223987fb163be844e6096d0aea1058b8ce255731d97e2a0ea SHA512 ad5ddb4cd6378fd6bbea8cd85ceb1cf90392b2e8c49fbfb3e4b35c81d3ae3e3f087697c41fcba8c8e06de1d9e7539397e26d58b864dc01ba65abe4ba4efa9568
+EBUILD tcl-8.5.17-r100.ebuild 2790 BLAKE2B d8de982d4d2f103bd5a1271101bc997cd1920c7274078f9004e6983d30326fa0379588d529c3e459f4e93e9e723548aa37fc5e074df768d046bafc3decb4297e SHA512 b09ac13d74992c34c333fba336e07e6baefbe8ee6a94e8c59b17ac40a508bab4146f7a6d00f712ef70b9d5d8d168d259dbbed77d4e5e2e65c2b45ff2769586d7
+EBUILD tcl-8.5.17.ebuild 3706 BLAKE2B 4f5b6c6fb9c25a7d31a1adc45fad8fa432478056d5a0895298ba79f2a5904bcd977a73d60f34355ed5290bf5077f5d74ba050583ebf0e99a119f9d4b14dbfe0b SHA512 11816e9baefbf29264fd844ddeb38fa94686b0b8ca667e7046713860a97945caf122f831d7778b7ac78ab392bd4ac9bc10578c70d74b21c83c5da1b479d9c800
+EBUILD tcl-8.6.5.ebuild 3962 BLAKE2B 3fadd59589caa0bc22a7970c6bb52dd662e36e93f6a2ddf9f73c1f276afc36a2f4dc75e1ffb3b2b3be46b1e9686a8a41c722863a0d8daa116d8e61c40db5b279 SHA512 96f7b910afdd515558dd0f9778ca5cac8e1d9a25fd7e615f8c43adad29ec5237e6a5edf9f702792fdc7eee147b015472a3febc4da98cf07d8c9aa3d5c80851c3
+EBUILD tcl-8.6.6.ebuild 4049 BLAKE2B 117d52024c043b1bcb0c1a64964b7987dc9bff5570c4a02f9ff277fe7505f8cc22c047888fd5f7b29ac364a826725dee215fece983407aa6c69f47e0f2b36032 SHA512 695147bf0e6d1bec4d20bf06c3f494764005ac9738019c4663ad2daa48088797300cee6e2168a9e0529a6508576e2a264537668decda80bb3d064c96526a79e7
+EBUILD tcl-8.6.7.ebuild 3975 BLAKE2B f634d8ca712b39080fd7949361849e7c33f94c4abae673faf306cd750523ceefcd19aef75700759225a32850ac51d0e59bfcce7cffdf630ddc25852efc0579fe SHA512 a8160b7d89b82d3f66946a33b710aaf570132623d4b9a7ba7c180133c199b4f82ef4cc75508e7e83226a37921c31e38d9d2e9f37b13602bac73b706047e9ca31
+MISC metadata.xml 318 BLAKE2B 7ea8e51656c255c3aea3bee8849423604a164efff556974f6032de44d33e38bb0378b69c18821cc76f0284064bc84a1a56e79f522f8d7fb0adc50e2e191b5fca SHA512 61f3feb8311f1babb8a4df8c9fcddaab009ffc6d69248f18cb9e001a1659dfcf47f2699008ab83fb563b3417f6ead8113af20db7e3893f488e8d75bb2a3483cf
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..8c4bc7482189
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.5.13-multilib.patch
@@ -0,0 +1,11 @@
+--- a/unix/configure.in
++++ b/unix/configure.in
+@@ -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..a8b3aa021014
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.5.14-conf.patch
@@ -0,0 +1,11 @@
+--- a/unix/tcl.m4
++++ b/unix/tcl.m4
+@@ -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..cd751414a99b
--- /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>
+ <name>TCL/TK Herd.</name>
+ </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..0121fee4715a
--- /dev/null
+++ b/dev-lang/tcl/tcl-8.5.17-r100.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2018 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 ~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..f7d5ca3fd4bf
--- /dev/null
+++ b/dev-lang/tcl/tcl-8.5.17.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2018 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 ~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..3639ae997f53
--- /dev/null
+++ b/dev-lang/tcl/tcl-8.6.5.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2018 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 ~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.5.14-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..99b1b285a3bd
--- /dev/null
+++ b/dev-lang/tcl/tcl-8.6.6.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2018 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 ~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.5.14-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..de2ab7c8cdc4
--- /dev/null
+++ b/dev-lang/tcl/tcl-8.6.7.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2018 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 ~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="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.5.14-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-2.0.2 b/dev-lang/teyjus-2.0.2
deleted file mode 100644
index 5dc90ad7e888..000000000000
--- a/dev-lang/teyjus-2.0.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst postrm prepare
-DEPEND=>=sys-devel/binutils-2.17:* >=sys-devel/gcc-2.95.3:* >=dev-lang/ocaml-3.10[ocamlopt?] emacs? ( virtual/emacs ) dev-util/omake
-DESCRIPTION=Higher-order logic programming language Lambda Prolog
-EAPI=6
-HOMEPAGE=http://teyjus.cs.umn.edu/
-IUSE=emacs examples +ocamlopt
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=>=sys-devel/binutils-2.17:* >=sys-devel/gcc-2.95.3:* >=dev-lang/ocaml-3.10[ocamlopt?] emacs? ( virtual/emacs )
-SLOT=0/2.0.2
-SRC_URI=https://teyjus.googlecode.com/files/teyjus-source-2.0-b2.tar.gz
-_eclasses_=elisp-common 23f47b2e1de7abf387105eddd1318738 estack 43ddf5aaffa7a8d0482df54d25a66a1f multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=3e12cb1732c52252357475f2988149e8
diff --git a/dev-lang/teyjus-2.1 b/dev-lang/teyjus-2.1
deleted file mode 100644
index 650d6b2343c4..000000000000
--- a/dev-lang/teyjus-2.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile install postinst postrm prepare
-DEPEND=>=sys-devel/binutils-2.17:* >=sys-devel/gcc-2.95.3:* >=dev-lang/ocaml-3.10[ocamlopt?] emacs? ( virtual/emacs ) dev-util/omake
-DESCRIPTION=Higher-order logic programming language Lambda Prolog
-EAPI=6
-HOMEPAGE=http://teyjus.cs.umn.edu/
-IUSE=emacs examples +ocamlopt
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-3
-RDEPEND=>=sys-devel/binutils-2.17:* >=sys-devel/gcc-2.95.3:* >=dev-lang/ocaml-3.10[ocamlopt?] emacs? ( virtual/emacs )
-SLOT=0/2.1
-SRC_URI=https://github.com/teyjus/teyjus/archive/v2.1.tar.gz -> teyjus-2.1.tar.gz
-_eclasses_=elisp-common 23f47b2e1de7abf387105eddd1318738 estack 43ddf5aaffa7a8d0482df54d25a66a1f multilib 97f470f374f2e94ccab04a2fb21d811e toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=6f12787335080ad8f7ad23063fe6b705
diff --git a/dev-lang/teyjus/Manifest b/dev-lang/teyjus/Manifest
new file mode 100644
index 000000000000..cecf92f59805
--- /dev/null
+++ b/dev-lang/teyjus/Manifest
@@ -0,0 +1,7 @@
+AUX 50teyjus-gentoo.el 74 BLAKE2B 877ca25928f4a497102a516f3495691cab2ac7421a22f95c687d8e7aaf0907fd638e234bb9e756f896f19bda117cb3ae01e1e98b251038315151c341f5615c24 SHA512 febf91bf3393d91cf1ecdd38b1b9f2e62f7bf8ca8de79e6a006238a82b909d46d7e0e4c92bf8ead39b5142710f548a8829b4e9473340225ecad9fa46b0972f35
+AUX teyjus-2.0.2-flags.patch 375 BLAKE2B 22116727c8cb10d2a4149315c6acc6f9245d1949737628f9365d6b8031c39322ac91178693ad99b494d1c49f2db673bb193b0fd96d33a3f013b76080771b35d8 SHA512 9ef27bab05ac1cb0c64ae7141984dcf74e0b7bb9bbc223b78ce649d720ee110416e639bc49b28a12a30fe8a75cae9f346f6a1b8763a14c40a0f7e20125089eb0
+DIST teyjus-2.1.tar.gz 723763 BLAKE2B ab6a98c2d2291620b586ab0b419a214b0f7c0b27aad444324e5a417c1a0b27382e2d5c622f798ea88cab77853bca3305ec37904c50a7304ace20237afb993b91 SHA512 1f71d19502f4f4da00f635d2c3d4e141403182d65f039e0d43660edf84c5fcd900e7225ac92dc5bdbe0c8379c4e2ce6e27879af504fcfafddf2695a0c8a13379
+DIST teyjus-source-2.0-b2.tar.gz 465815 BLAKE2B 29d8cc2626144a77551a4cb47631a3b55d6edc33b3bf957c2b732144ce9566adb8d472b7ac423168605dcbabab507a4a3cd05b465b02fa0bbc3967a57183fc7c SHA512 071a25cd5341f7562f07dcaae1f87c35eb394ddab94a5160826c7fb2d9a51efea909b41947205503ebcc58df04388baf9eaf9f5a614186701940da29db1c1b29
+EBUILD teyjus-2.0.2.ebuild 3027 BLAKE2B 92c93ec4d7025691ec8af11de72de6dd6fc9e4e8188567b6daf37e20f0c990d2c6c06b795fb2b2b1cf33bd0c4e0a6bce262470f09b135938b358f06f8528cbe2 SHA512 85c11036d4fd3027fbea2136f6b3ac8faad53049bbef75ed2b448ef55e27e8b59bbee2e321b8f374b7de5602a810eeb4b3429fc97a71851a4447e8a4b23b7735
+EBUILD teyjus-2.1.ebuild 2897 BLAKE2B de6b991a07ded4592fa66307d461e36cc3a8f23a40c7e62987a18c2a7576c79c1b0bc02e09703e2165448a258a66b42dd14e465ee52c2072ecbf26b1dd822d67 SHA512 8f33c998b725169d57808b0a69578a20ffd8f54192a55d8f25761b6a38ea18b9ba96c1d7775447ba17ee245a5f1376476474dbf4e5ac5afd493c530e81f19ea7
+MISC metadata.xml 1653 BLAKE2B a9c2315795d7eb61708ff4b163a0588900bcaea661b052a24f83834acbded91f3dabaa0a14525e1ff729175d7c17ac393946c21ae801b60efd591448b07b7c1c SHA512 5b82a25d9ef5e24c4c9bbd633b7de98f92ce79ae041c3056df6dd0471824c98884d1ef608352431c34aecdaa79736c7f163762206adb9207eeebca2886f5aa1b
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-0.65.9 b/dev-lang/tinycobol-0.65.9
deleted file mode 100644
index 996dac4e60f2..000000000000
--- a/dev-lang/tinycobol-0.65.9
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile install unpack
-DEPEND=>=dev-libs/glib-2.0 sys-libs/db dev-db/vbisam sys-devel/flex sys-devel/bison
-DESCRIPTION=COBOL for linux
-EAPI=0
-HOMEPAGE=http://tiny-cobol.sourceforge.net/
-KEYWORDS=ppc x86
-LICENSE=GPL-2 LGPL-2
-RDEPEND=>=dev-libs/glib-2.0 sys-libs/db dev-db/vbisam
-SLOT=0
-SRC_URI=mirror://sourceforge/tiny-cobol/tinycobol-0.65.9.tar.bz2
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=f006f27c78809690478a3fd271722d11
diff --git a/dev-lang/tinycobol/Manifest b/dev-lang/tinycobol/Manifest
new file mode 100644
index 000000000000..aa4cb7baa46e
--- /dev/null
+++ b/dev-lang/tinycobol/Manifest
@@ -0,0 +1,4 @@
+AUX tinycobol-0.65.9.patch 4367 BLAKE2B b2a958317a68e4927c838488dafa0c4ecc8b8848d8ff7cc23809ab3cc2c1cf5094e49cd5b9268f3148c8adaed808c152bee324bafe7de68d6e58655b342c2a4c SHA512 b2f990abdab590ed1acf41ed0a6ab2816c9217bb0d707cbb9628f3fb44be0cb3f11bc910739ab83051aab23357a83e44fe012c730a1a788665f6355005a9755c
+DIST tinycobol-0.65.9.tar.bz2 872989 BLAKE2B 29fdcd6cc5390169dbb421b43fb64a08cd618196806ae04759ad40cdb66dc07ff7cc3ac86ac3de11971f1850ef70c74bcc188f1494347e60f4b9757cd0dce290 SHA512 4c6ae224ac68017994c78d80f6b452c90076f320a97b9d7b29b83d403f30211f7487f001bf769ca87693a9b9950c11434ba805e4abd85b50ebe75051f74a5394
+EBUILD tinycobol-0.65.9.ebuild 996 BLAKE2B e03bab367634092cab83758fb3e18e39c9c37738fa9a2cbd2de91cbad91e9dcf00f2d91a04cdd07a6b06503d64c0ec76702f1859b4427f88ee9538767c637045 SHA512 c68b20dd5dc1dfe32478c61670ed05fcb8271f1afa1853a75e9bc9be21b4608825335e99b2e59c1df995e682f2461572ef97365beac1c9f48a378c84187f8674
+MISC metadata.xml 247 BLAKE2B a5c4e16111aae168c06471594df9b2901bb70e48f1475657825b40cbb2445b72230c6f4b004e9bd0e5b061bc6e546ea9270451498098dd2bf1ee4291781809b4 SHA512 2649cac2764f9196000ccca028398ee0db1f992d8e2b35a3368a84a5e01f9b9fc95d5a2c8f05d57784e873a3b53b457a7520673353e8999d0d8892315c6385c1
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..ca1c6f665de5
--- /dev/null
+++ b/dev-lang/tinycobol/tinycobol-0.65.9.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=0
+
+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-8.5.17 b/dev-lang/tk-8.5.17
deleted file mode 100644
index d9758cdb5968..000000000000
--- a/dev-lang/tk-8.5.17
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install prepare test
-DEPEND=!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-8.5.17:0= !aqua? ( x11-base/xorg-proto ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 test? ( !prefix? ( x11-base/xorg-server[xvfb] ) x11-apps/xhost )
-DESCRIPTION=Tk Widget Set
-EAPI=5
-HOMEPAGE=http://www.tcl.tk/
-IUSE=debug threads truetype aqua xscreensaver test
-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
-LICENSE=tcltk
-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-8.5.17:0=
-SLOT=0/8.5
-SRC_URI=mirror://sourceforge/tcl/tk8.5.17-src.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 virtualx 3a3c4637ea6d5a2113707a644766337c
-_md5_=9f8538112584831fb88f6f51362432e2
diff --git a/dev-lang/tk-8.5.17-r100 b/dev-lang/tk-8.5.17-r100
deleted file mode 100644
index ffdda7725c0e..000000000000
--- a/dev-lang/tk-8.5.17-r100
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=configure install prepare test
-DEPEND=!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-8.5.17:8.5= !=dev-lang/tk-8.5:0 !aqua? ( x11-base/xorg-proto ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 test? ( !prefix? ( x11-base/xorg-server[xvfb] ) x11-apps/xhost )
-DESCRIPTION=Tk Widget Set
-EAPI=5
-HOMEPAGE=http://www.tcl.tk/
-IUSE=debug threads truetype aqua xscreensaver test
-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
-LICENSE=tcltk
-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-8.5.17:8.5= !=dev-lang/tk-8.5:0
-SLOT=8.5
-SRC_URI=mirror://sourceforge/tcl/tk8.5.17-src.tar.gz mirror://sourceforge/tcl/tcl8.5.17-src.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 virtualx 3a3c4637ea6d5a2113707a644766337c
-_md5_=94630957f31b4248658fb0eada81bb15
diff --git a/dev-lang/tk-8.6.5 b/dev-lang/tk-8.6.5
deleted file mode 100644
index 930a5b6bc264..000000000000
--- a/dev-lang/tk-8.6.5
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=!aqua? ( >=media-libs/fontconfig-2.10.92[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libX11-1.6.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libXt-1.1.4[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] truetype? ( >=x11-libs/libXft-2.3.1-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ~dev-lang/tcl-8.6.5:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] !aqua? ( x11-base/xorg-proto ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 test? ( !prefix? ( x11-base/xorg-server[xvfb] ) x11-apps/xhost )
-DESCRIPTION=Tk Widget Set
-EAPI=6
-HOMEPAGE=http://www.tcl.tk/
-IUSE=debug +threads truetype aqua xscreensaver abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 test
-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
-LICENSE=tcltk
-RDEPEND=!aqua? ( >=media-libs/fontconfig-2.10.92[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libX11-1.6.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libXt-1.1.4[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] truetype? ( >=x11-libs/libXft-2.3.1-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ~dev-lang/tcl-8.6.5:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]
-SLOT=0/8.6
-SRC_URI=mirror://sourceforge/tcl/tk8.6.5-src.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 virtualx 3a3c4637ea6d5a2113707a644766337c
-_md5_=87b58b7f881b9f2a32404758ff0c02b2
diff --git a/dev-lang/tk-8.6.5-r1 b/dev-lang/tk-8.6.5-r1
deleted file mode 100644
index 85aa6f207842..000000000000
--- a/dev-lang/tk-8.6.5-r1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=!aqua? ( >=media-libs/fontconfig-2.10.92[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libX11-1.6.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libXt-1.1.4[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] truetype? ( >=x11-libs/libXft-2.3.1-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ~dev-lang/tcl-8.6.5:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] !aqua? ( x11-base/xorg-proto ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 test? ( !prefix? ( x11-base/xorg-server[xvfb] ) x11-apps/xhost )
-DESCRIPTION=Tk Widget Set
-EAPI=6
-HOMEPAGE=http://www.tcl.tk/
-IUSE=debug +threads truetype aqua xscreensaver abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 test
-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
-LICENSE=tcltk
-RDEPEND=!aqua? ( >=media-libs/fontconfig-2.10.92[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libX11-1.6.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libXt-1.1.4[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] truetype? ( >=x11-libs/libXft-2.3.1-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ~dev-lang/tcl-8.6.5:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]
-SLOT=0/8.6
-SRC_URI=mirror://sourceforge/tcl/tk8.6.5-src.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 virtualx 3a3c4637ea6d5a2113707a644766337c
-_md5_=c3429075d259ab3f697fdcab56cd46ed
diff --git a/dev-lang/tk-8.6.6 b/dev-lang/tk-8.6.6
deleted file mode 100644
index 726444f1b243..000000000000
--- a/dev-lang/tk-8.6.6
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=!aqua? ( >=media-libs/fontconfig-2.10.92[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libX11-1.6.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libXt-1.1.4[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] truetype? ( >=x11-libs/libXft-2.3.1-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ~dev-lang/tcl-8.6.6:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] !aqua? ( x11-base/xorg-proto ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 test? ( !prefix? ( x11-base/xorg-server[xvfb] ) x11-apps/xhost )
-DESCRIPTION=Tk Widget Set
-EAPI=6
-HOMEPAGE=http://www.tcl.tk/
-IUSE=debug +threads truetype aqua xscreensaver abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 test
-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
-LICENSE=tcltk
-RDEPEND=!aqua? ( >=media-libs/fontconfig-2.10.92[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libX11-1.6.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libXt-1.1.4[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] truetype? ( >=x11-libs/libXft-2.3.1-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ~dev-lang/tcl-8.6.6:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]
-SLOT=0/8.6
-SRC_URI=mirror://sourceforge/tcl/tk8.6.6-src.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 virtualx 3a3c4637ea6d5a2113707a644766337c
-_md5_=4e6ec117d5aa623685f9bd3ee5a7bb93
diff --git a/dev-lang/tk-8.6.7 b/dev-lang/tk-8.6.7
deleted file mode 100644
index f2642ea12fbc..000000000000
--- a/dev-lang/tk-8.6.7
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=!aqua? ( >=media-libs/fontconfig-2.10.92[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libX11-1.6.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libXt-1.1.4[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] truetype? ( >=x11-libs/libXft-2.3.1-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ~dev-lang/tcl-8.6.7:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] !aqua? ( x11-base/xorg-proto ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 test? ( !prefix? ( x11-base/xorg-server[xvfb] ) x11-apps/xhost )
-DESCRIPTION=Tk Widget Set
-EAPI=6
-HOMEPAGE=http://www.tcl.tk/
-IUSE=debug +threads truetype aqua xscreensaver abi_x86_32 abi_x86_64 abi_x86_x32 abi_mips_n32 abi_mips_n64 abi_mips_o32 abi_ppc_32 abi_ppc_64 abi_s390_32 abi_s390_64 test
-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
-LICENSE=tcltk
-RDEPEND=!aqua? ( >=media-libs/fontconfig-2.10.92[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libX11-1.6.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] >=x11-libs/libXt-1.1.4[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] truetype? ( >=x11-libs/libXft-2.3.1-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] ) ) ~dev-lang/tcl-8.6.7:0=[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]
-SLOT=0/8.6
-SRC_URI=mirror://sourceforge/tcl/tk8.6.7-src.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e multilib-build 45f0e78dba7de5c77988265229b4402a multilib-minimal bfa1226d0f1fa0093d10b84acd029633 prefix e51c7882b7b721e54e684f7eb143cbfe preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 virtualx 3a3c4637ea6d5a2113707a644766337c
-_md5_=ae549673aa8212dbf1a019d133f3f1f8
diff --git a/dev-lang/tk/Manifest b/dev-lang/tk/Manifest
new file mode 100644
index 000000000000..95ff1cdaff71
--- /dev/null
+++ b/dev-lang/tk/Manifest
@@ -0,0 +1,16 @@
+AUX tk-8.4.15-aqua.patch 303 BLAKE2B 9030e6d84d769a2e2daadb4ed76de2b9ad8474016e8bbe96a8727ef43218693a34cd4480500538c57ef64717e7bb12363a024e300b90e5189ac649a851fc5772 SHA512 3bacde8a286c901781862fffdec2891da6a199dff80ff74d68e0a508be3a75e7230c81577af58b75b14a7ba5546db907ac476ef1168d12357113ba5c6d7a01ba
+AUX tk-8.5.11-fedora-xft.patch 681 BLAKE2B b0f095f9a35eb134892c72e0c2adea97a9c3b91f984f1c8d92c15f51d39ec53c4255936f3627a93eb5fdbe0a5acc88f857e089ee566ba36c9dcaa3c10685c081 SHA512 14564e0d761187895a34d16f9f618514af76cac2ad51969d9eff4fafba44ad376c6adc0e27238c09ca708102d745a2965f7d2dc3c2f35acf4973199f0f9b40ef
+AUX tk-8.5.13-multilib.patch 453 BLAKE2B f7c8d90a3aa313e4ebaa6ca3b62a986637e424635a86957f92b594e80dc23dade699f53330f34c960f668d6878e64df239626f9983f90237e4275b3d352b55a6 SHA512 3fccbdea43b13977e04026f9db5a11c2be7d19062a9a008a09ece8e78f78983f79c1ea023562decd1e0a4fc0184045f2ea78da466bb9682f8a9bd214f5c2f4b1
+AUX tk-8.5.14-conf.patch 569 BLAKE2B 243b538978966531dcf59f76ffb3d1b82bb10c2d80fc9f31e16165c6f26db96a22ec5953840a316d430153e082e5dd6293edf8f899f0befe60d6e5b1b8ac2279 SHA512 31b53c31253df219d860fc9d067c53379bca571e799a2064e33fb1d9c3f228a001654438eeb5bad5315a6589e7b46f902d87cd54a52d4ed68c0d1d08f24ad544
+DIST tcl8.5.17-src.tar.gz 4546317 BLAKE2B 27031dd3bd5790d03692e77edf91eb7fae8a40d8d193d8c8ce4e79b21f90e683bfc9d5b71764760223987fb163be844e6096d0aea1058b8ce255731d97e2a0ea SHA512 ad5ddb4cd6378fd6bbea8cd85ceb1cf90392b2e8c49fbfb3e4b35c81d3ae3e3f087697c41fcba8c8e06de1d9e7539397e26d58b864dc01ba65abe4ba4efa9568
+DIST tk8.5.17-src.tar.gz 4095985 BLAKE2B 4cbb140c30ca717ee499b9ad9e1a3df27a470a78613edbaec425c39afaa41d59276bbe487933a4e77a9722fcafa9113b203cf5c828660bdeb38f667c3263c3cd SHA512 ddadc738c2567e35d1257b59212c8a0eb70a1bf041d986bc6df3b841b51d934d79a0ef389c928223a64516a92cae3357b2c789edca9c8a626ff4c1cf320c4f4f
+DIST tk8.6.5-src.tar.gz 4417393 BLAKE2B bff37ac292928095063ebd3131ab8bf9e9d0b075c115c9e9a1f0fe75c2843cae6153b15fc9b964cd16a1251feca13258034d14dadd5fa8967bff6d5fee813f8f SHA512 9acf2ef993a566a7cdd1efe21dc896b09125c65d86df53ab5a78542b21d3f031e9f9d72b81738705636c268b5ce72934c483eb087d5c0114f913c9075db9a3b1
+DIST tk8.6.6-src.tar.gz 4273737 BLAKE2B 65b139fffe628439137a02a72af19be0f7c44956d18852f1ce8892349d0fa370281e475fbbe7451da524ab4e74a8c258ee5ee70b8a146bf1ec71e3bf420314a3 SHA512 223c72ab5a6f6040928c56843598b878efafab44ed4152a38e68aa2800f2c181adc50a8bf23279b7d446493eec43854920e8b649b6a34ecdf31ecc07ccc74044
+DIST tk8.6.7-src.tar.gz 4282972 BLAKE2B b07102365539ee98e2972a5d3bee2bdee89cb4d3873b05c764810b89f0152b71bd0d14d007434a003cd784868afadf6a2a50deffc0c4596b4551a0be7625fd13 SHA512 adf35991b20878d18a6940cb3d24d821586828537edf6d20f9223f2989d317adbcbb5360f3226014d96fe44e7ec06cfdf434309438c90a09878345b7106c7dd9
+EBUILD tk-8.5.17-r100.ebuild 2162 BLAKE2B e4e280058b3059213d10a20fcabcd54a17e74bf78bd6e18ac5acf3a51a3fd870743ea40dc793b6a0ce5ebbfefe9744f26c900542ed511f4ba2d37c404069bc63 SHA512 e0958680ae7beeb6f5ffe06093f27d482c22cba9dfc71fe727425d8fbe4b20e6270b2ddd6e8860b0f7433f84224f8b8251800570ea81f75209146876fd94bda7
+EBUILD tk-8.5.17.ebuild 3506 BLAKE2B 073a60dae07cd8dbcb19f626a686cce74d4e8e0f1216b4a8911eae7245ea2ad4d3b0c4d4a947d56ac8fca418e4927421fa264ac50ecbbad5998e05aeb468df19 SHA512 ae25cad437b2ffb91053c82a0222ca0b01329a353d273b2fa326399fe78fcf129957e746c0cfe1488bf2017ee0455161a71897d5d7b793f1d816b8b2df4d0cc9
+EBUILD tk-8.6.5-r1.ebuild 4098 BLAKE2B c760beb1cbd42ea5aa2c0bf577abb7371ae7665c8330c6da9985f0f743d42e87118f5f36621e6860ba5b3376435fc2c2542386fac54edc2066c3effdeeb1e254 SHA512 3706155557521eaf5477ef42f8feb8643c152ea8ade6b756b0e3c6992fdcdb5f71106e95e7f19da206cb1d12f5791584ada1eeb6f1defae91f69045aa79144f9
+EBUILD tk-8.6.5.ebuild 3999 BLAKE2B 951ef6cd6895648dd9f715d3445bf286d5fecd7abefd008d403613a2eff349ee84ecc1a97b692909afe544da32b071960b948ec329eda1a2e497cda85c16de98 SHA512 3cb86ad4c6b78581dea541b796c1ec9920449d4c28f3442114a43006ca8f75a20d21822222c728c71961b16b638298048e0fd22dd071b2630795c58f3b390a9a
+EBUILD tk-8.6.6.ebuild 4096 BLAKE2B 04ab45aadaba57c7ac09dc4c4eac8fbf93554ff9bc35f56fb27bdcd9af20005e1507757a8180c757858c7e29c1b618a9ba3b1f13f069f6d3ad73e92b7e590f36 SHA512 4f159609d9cf5c4ab5be78fc2bc6ccfb84f0475708cef065dac8806fe5fec348a121bb358e2a6562f9cbd200ececca2a6678edfaee00f5d576a4dbb6b7f35602
+EBUILD tk-8.6.7.ebuild 4105 BLAKE2B 88291b05ea46fb389d72e8aaf51bd0734af565f900481fdb11d14353cc8881ce4b0d8a46973e5a11e87bb857315d3476ef1bb3bff38fdc5fd2683dec4169f006 SHA512 55f7a2328cd8fa8f37e2ef06ce20a60e412b0f3405ef0637a31f1bc627113e74c0e68c2ffc4935a940c492441a229a8e8c06264cf4785ed114ddab4f0ddf4cef
+MISC metadata.xml 326 BLAKE2B 56e0bdfbc3f6226d3577786996e1d83e0a5e233f08966966b7f18366d103648cc8843afb08b23eb2ff5aafd7faa9b8a53d33f35a273ea5f70191b76d5f9faaea SHA512 0a3bc9dd4103f252027e5df1f1bec25c54b8e595c3161cf2e2e3dc083d9613c1cf7f810bae2eea1e4687d87195091d84c16ceac683d7bb508bd38ad565b5ba7d
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..1eb7f8236def
--- /dev/null
+++ b/dev-lang/tk/tk-8.5.17-r100.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2018 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-base/xorg-proto )"
+
+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..ba1ccc104522
--- /dev/null
+++ b/dev-lang/tk/tk-8.5.17.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2018 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-base/xorg-proto )"
+
+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..c1ec2facd229
--- /dev/null
+++ b/dev-lang/tk/tk-8.6.5-r1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2018 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-base/xorg-proto )"
+
+# 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..4e6adacef09f
--- /dev/null
+++ b/dev-lang/tk/tk-8.6.5.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2018 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-base/xorg-proto )"
+
+# 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..92472b01b1f4
--- /dev/null
+++ b/dev-lang/tk/tk-8.6.6.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2018 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-base/xorg-proto )"
+
+# 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..0261f20c9e03
--- /dev/null
+++ b/dev-lang/tk/tk-8.6.7.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2018 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-base/xorg-proto )"
+
+# 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-2.9.2 b/dev-lang/tuprolog-2.9.2
deleted file mode 100644
index d659f184e5d2..000000000000
--- a/dev-lang/tuprolog-2.9.2
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=>=virtual/jdk-1.7:= dev-java/javassist:3 dev-java/ant-core test? ( dev-java/ant-junit4:0 dev-java/junit:4 dev-java/hamcrest-core:1.3 ) >=dev-java/java-config-2.2.0-r3 >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=tuProlog is a light-weight Prolog for Internet applications and infrastructures
-EAPI=5
-HOMEPAGE=http://tuprolog.unibo.it/
-IUSE=doc examples test elibc_FreeBSD elibc_FreeBSD
-KEYWORDS=amd64 x86
-LICENSE=LGPL-3
-RDEPEND=>=virtual/jdk-1.7:= dev-java/javassist:3 >=dev-java/java-config-2.2.0-r3
-SLOT=0
-SRC_URI=mirror://gentoo/tuprolog-2.9.2.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=2af38c2a472e5d95cb944879af55fc3a
diff --git a/dev-lang/tuprolog-3.0.1 b/dev-lang/tuprolog-3.0.1
deleted file mode 100644
index 1f822b69d0f5..000000000000
--- a/dev-lang/tuprolog-3.0.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=>=virtual/jdk-1.8:= dev-java/javassist:3 dev-java/commons-lang:3.1 dev-java/ant-core test? ( dev-java/ant-junit4:0 dev-java/junit:4 dev-java/hamcrest-core:1.3 ) >=dev-java/java-config-2.2.0-r3 >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=tuProlog is a light-weight Prolog for Internet applications and infrastructures
-EAPI=5
-HOMEPAGE=http://tuprolog.unibo.it/
-IUSE=doc examples test elibc_FreeBSD elibc_FreeBSD
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-3 BSD
-RDEPEND=>=virtual/jdk-1.8:= dev-java/javassist:3 dev-java/commons-lang:3.1 >=dev-java/java-config-2.2.0-r3
-SLOT=0
-SRC_URI=mirror://gentoo/tuprolog-3.0.1.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=c8eb46faca18a091ac0a9659f33ef606
diff --git a/dev-lang/tuprolog-3.1.0 b/dev-lang/tuprolog-3.1.0
deleted file mode 100644
index 057d72bd8992..000000000000
--- a/dev-lang/tuprolog-3.1.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=>=virtual/jdk-1.8:= dev-java/javassist:3 dev-java/commons-lang:3.1 dev-java/ant-core test? ( dev-java/ant-junit4:0 dev-java/junit:4 dev-java/hamcrest-core:1.3 ) >=dev-java/java-config-2.2.0-r3 >=dev-java/ant-core-1.8.2:0 >=dev-java/javatoolkit-0.3.0-r2
-DESCRIPTION=tuProlog is a light-weight Prolog for Internet applications and infrastructures
-EAPI=5
-HOMEPAGE=http://tuprolog.unibo.it/
-IUSE=doc examples test elibc_FreeBSD elibc_FreeBSD
-KEYWORDS=~amd64 ~x86
-LICENSE=LGPL-3 BSD
-RDEPEND=>=virtual/jdk-1.8:= dev-java/javassist:3 dev-java/commons-lang:3.1 >=dev-java/java-config-2.2.0-r3
-SLOT=0
-SRC_URI=mirror://gentoo/tuprolog-3.1.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-ant-2 ea15ab9e838d1062abd6b53de2045d50 java-pkg-2 c4e6af2574fd1dc79b43a6e27af4b5fb java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=2f66fcc0056bb9e2a90a449dff594b92
diff --git a/dev-lang/tuprolog/Manifest b/dev-lang/tuprolog/Manifest
new file mode 100644
index 000000000000..73a15276f1db
--- /dev/null
+++ b/dev-lang/tuprolog/Manifest
@@ -0,0 +1,15 @@
+AUX build-2.9.2.xml 2863 BLAKE2B f7c86965edbe1ba6d332b170caab1db5d872174b3b014d25dda12681e8183de1d5de9c3a3a2595d7e6ebd3f44528703f0f7478aa1e4f0fc6b24d182a51f3a88f SHA512 ca4dd0b76ae5a503a07f4c660f8715ff38b1c8e582de52928dad040f42a5fb7a9c774e039d9b7ca4b310b29241da6ab6b43115d741ed6dfbcc8538e384a05673
+AUX build-3.0.1.xml 2968 BLAKE2B e403d134a62504c396842f2fad71cf2aec1786c5d7902d7d08398894eb0dfe709617ae137b2249cf81d5c82f14707364b072990b1cc695b9deb49f6cffb96377 SHA512 4e65ba93141f8c47b2be9f534b05be3c4fa33428df73a23148b8f0f675f617071ad6c14c8aaa1f1ed6de03832f3e26b0b065b2f67834199244fbe55b398f0f20
+AUX build-3.1.0.xml 2968 BLAKE2B e403d134a62504c396842f2fad71cf2aec1786c5d7902d7d08398894eb0dfe709617ae137b2249cf81d5c82f14707364b072990b1cc695b9deb49f6cffb96377 SHA512 4e65ba93141f8c47b2be9f534b05be3c4fa33428df73a23148b8f0f675f617071ad6c14c8aaa1f1ed6de03832f3e26b0b065b2f67834199244fbe55b398f0f20
+AUX tuprolog-2.9.2-no-dynamic-object-test.patch 758 BLAKE2B 8e4ed5b4a5a12e6140c5bdf4074a02061cc82c50b29dfa7d09fc4b2b44b7a6b580abda565d1c1615ae864fcc7fc6a86b6d71e69e3eabec00e2bf92800da06ee8 SHA512 bbaef70b751fe049680826fb82dc46a339f88d7b8062df0865fddb15de2c991939e7e2fae0f889db0c72d802790287487f442316ad6c9e7fa7276b30083b7365
+AUX tuprolog-2.9.2-no-ikvm.patch 3929 BLAKE2B 0a6ec1d96c71762fee02b5701e2c445b000fae37eb335ed2a3fecdaabd4f28fbe894b2768a0c01e298accc267ff233e413370e7e744009b364b8b4888635b71f SHA512 a90b55f74841271a6ae9f4143203a9920adee9f7ab32c814d41f8830b7310919fcf035361f87fcd1ba7f7f0f0efe0c0a29ddff704c0d4d14ed2a41b4f7574a74
+AUX tuprolog-3.0.1-no-ikvm.patch 4844 BLAKE2B 6518c8821ef06f5b99de779d139b4d23e9e1458622edc267b237e7cb83d64164cd27a321d751423cbd0403a3666096322e80d0fdc6300df51a3ab54d4c1d9412 SHA512 c018d9028a9a4aea6c36057ac2d8b46d41da4961570fff491521c7b6bb816653db54a9e2a1049bd037aede7fa00262089f3787cad4a1e10836aa4f7442c727cd
+AUX tuprolog-3.0.1-oolibrary-unit-test.patch 762 BLAKE2B 615eb657e9c40a4cec568ae1a8b1868eaaa94d7911386099b65f06dd8002f9d77bce675f79c03db0c900f4b7fb10149b95aa328c582674fefe94ec7af8996d9d SHA512 54e3e9ef7ecc5ff27e687067a057e0c66f37e4d5f268d670210df89435333f7e303e640e12a4afd3c7906e3c52cd2de2466dc81b6cd2113aeb2ee0c7b5ad7a88
+AUX tuprolog-3.1.0-no-ikvm.patch 4862 BLAKE2B c5e49ecc13f923157a9287ece06b1ecf1c8a418e449cc9f73ca6a5c2f2bbc7ec567b76ba04a43c6f42fce381941c1f5ee3897a6df20d6600e8d00c550100f9f2 SHA512 ceb45121b4bec54cdd26683ce1e7a63baea9d5c899cd5993d51cbaf8fdbc4b9138f926e164e1dd96eafb2af6b2112c44bf15b1f79c6b9096ac028e02c2dab1a0
+DIST tuprolog-2.9.2.tar.gz 6262268 BLAKE2B 39bbc4dcb2336a713f47252ff6f7d00f15aa0072c4864c2d3e453ec43b2c646f9cdc7a69444e21d9cc20ba283ddee5fd980855811f8f80ba4afe7c37cdd47317 SHA512 831c7390fe33fc57cb01d4b1d61485ac5df1aa8ebf386d5aae5c5d32f7677d46aa5aa6cc0eb1d3bb79989a54f8484ad8b97754b7f75fc21af6116ae170a28316
+DIST tuprolog-3.0.1.tar.gz 6326591 BLAKE2B a051eb3f22c01e1c269b167fa7d1daec6e4818229e2035c1140401c38094c53451ea720638adaa6d6fda0ea70daf6f5f1bc9ea84f1e4ba9de9f00ca83529697c SHA512 56fa96f717b5c8e56fd2979f2953744964d844e5abf215456e31309d3d92bde142f9bff55e6442b6de55f219c7f143a275ccf89359ff2f2944459bbc94770afa
+DIST tuprolog-3.1.0.tar.gz 7201383 BLAKE2B 9d8b610240611cd5b3d0dae104a44c72bb5e7c0512e4dbf3e178204d9d36e461219cd869ca1e16e3054ca3e1ee34d3b2c6fa5c659df16f54e3266c7c826af8d6 SHA512 1093e29a79964cb3991326da14f020cdc8ff64f2444c84dbb6b22aa5c4ecbf48f74dbc26af0af949ccc31020573ce5908684af794db4654fb475efa697a82cbf
+EBUILD tuprolog-2.9.2.ebuild 1277 BLAKE2B cfa11fb1920d066ca918328a048beb47a76dac97b7f3e2313cccdfcbed79dfbab71809bb3fa2fbea289955263727af42a430074320ee1f0a1f47c62d92d5a6cb SHA512 e54de1e3cc8dbace872cf4f06bb07318c63e9cedbda8569d0e3e76aee013af2cd94ff606fae66e95074dc55776564ca53c76ea5366343993eb737208b243e20d
+EBUILD tuprolog-3.0.1.ebuild 1325 BLAKE2B 749b1347f9b21ba1a242121c2a0f6e993189fd3018a22cd208e2cbe6d65a45acfe2fa7f4a44b33cdcd56c9e9553f586085a0ea0698169b12fcb290ba064b76bd SHA512 65c6d6117900555181ccad3bdf6a13dbff505ff47e6c925b3020589043ff7c3bf6a60c17abc5433a2c8a378662c1d575962220f591e80f8d44e5a1ae907d8053
+EBUILD tuprolog-3.1.0.ebuild 1272 BLAKE2B 586ac94592d5d60f3b3aa16eca70acff2e169caf67c332e69bf2f60b692342596ab231974d1d24b4572b79751fcc6034d08689e1eaa4eb560f5bfa35a9946dc4 SHA512 bdaf84e58746284867230509ae2e97351e328f8dbc053aa36f45b009160a4e3b15667b6a3265e8d7a7b9c32cd5bbce35a038014fc0580196dfe004a2129014fa
+MISC metadata.xml 318 BLAKE2B bbdb9dc3b4feafc27fa6fae1b0740bde801196a214bb96f5815a2a274c89d6208c158c2616e40f17fbef4f8becd03b686410a3ee7b8253cceb70b80bc4b03c5f SHA512 6a43476b9ed9a343488c8a80908e8b4fcb96c75d9a3e6b6c05c22d8ffb87f5c8df8a3cfd2db5297f60236d6740ab0770e68e1acb4c457398a280df9dc4c266a9
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.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/build-3.1.0.xml b/dev-lang/tuprolog/files/build-3.1.0.xml
new file mode 100644
index 000000000000..3b6f5818eaa6
--- /dev/null
+++ b/dev-lang/tuprolog/files/build-3.1.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}"
+ 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.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-0.32.1 b/dev-lang/vala-0.32.1
deleted file mode 100644
index b10b21a19c6b..000000000000
--- a/dev-lang/vala-0.32.1
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare
-DEPEND=>=dev-libs/glib-2.32:2 >=dev-libs/vala-common-0.32.1 !dev-lang/vala: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 ) >=app-portage/elt-patches-20170422 app-arch/xz-utils >=sys-apps/sed-4 dev-util/desktop-file-utils x11-misc/shared-mime-info
-DESCRIPTION=Compiler for the GObject type system
-EAPI=6
-HOMEPAGE=https://wiki.gnome.org/Projects/Vala
-IUSE=test
-KEYWORDS=alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux
-LICENSE=LGPL-2.1
-RDEPEND=>=dev-libs/glib-2.32:2 >=dev-libs/vala-common-0.32.1
-SLOT=0.32
-SRC_URI=mirror://gnome/sources/vala/0.32/vala-0.32.1.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc gnome.org 5e4cc5af3f1b17bdee155bf02e8c2df4 gnome2 6e4acb9c9da2cfa25f2dfedb93bb4a43 gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg 6cd76cc914c1a759dee032778487b57f xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=1eb2915f41f141adee5c1b771d7ef4a9
diff --git a/dev-lang/vala-0.34.16 b/dev-lang/vala-0.34.16
deleted file mode 100644
index 01cd22a82acf..000000000000
--- a/dev-lang/vala-0.34.16
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare
-DEPEND=>=dev-libs/glib-2.32:2 >=dev-libs/vala-common-0.34.16 !dev-lang/vala: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 ) >=app-portage/elt-patches-20170422 app-arch/xz-utils >=sys-apps/sed-4 dev-util/desktop-file-utils x11-misc/shared-mime-info
-DESCRIPTION=Compiler for the GObject type system
-EAPI=6
-HOMEPAGE=https://wiki.gnome.org/Projects/Vala
-IUSE=test
-KEYWORDS=alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux
-LICENSE=LGPL-2.1
-RDEPEND=>=dev-libs/glib-2.32:2 >=dev-libs/vala-common-0.34.16
-SLOT=0.34
-SRC_URI=mirror://gnome/sources/vala/0.34/vala-0.34.16.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc gnome.org 5e4cc5af3f1b17bdee155bf02e8c2df4 gnome2 6e4acb9c9da2cfa25f2dfedb93bb4a43 gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg 6cd76cc914c1a759dee032778487b57f xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=043745e0c7004d18dd4b017bada1182d
diff --git a/dev-lang/vala-0.34.9 b/dev-lang/vala-0.34.9
deleted file mode 100644
index b043a5bf7df7..000000000000
--- a/dev-lang/vala-0.34.9
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare
-DEPEND=>=dev-libs/glib-2.32:2 >=dev-libs/vala-common-0.34.9 !dev-lang/vala: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 ) >=app-portage/elt-patches-20170422 app-arch/xz-utils >=sys-apps/sed-4 dev-util/desktop-file-utils x11-misc/shared-mime-info
-DESCRIPTION=Compiler for the GObject type system
-EAPI=6
-HOMEPAGE=https://wiki.gnome.org/Projects/Vala
-IUSE=test
-KEYWORDS=alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux
-LICENSE=LGPL-2.1
-RDEPEND=>=dev-libs/glib-2.32:2 >=dev-libs/vala-common-0.34.9
-SLOT=0.34
-SRC_URI=mirror://gnome/sources/vala/0.34/vala-0.34.9.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc gnome.org 5e4cc5af3f1b17bdee155bf02e8c2df4 gnome2 6e4acb9c9da2cfa25f2dfedb93bb4a43 gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg 6cd76cc914c1a759dee032778487b57f xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=c2c1b0550d13e10e19d5606f002fe2b7
diff --git a/dev-lang/vala-0.36.13 b/dev-lang/vala-0.36.13
deleted file mode 100644
index 99b5725dae08..000000000000
--- a/dev-lang/vala-0.36.13
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm preinst prepare
-DEPEND=>=dev-libs/glib-2.32:2 >=dev-libs/vala-common-0.36.13 !dev-lang/vala: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 ) >=app-portage/elt-patches-20170422 app-arch/xz-utils >=sys-apps/sed-4 dev-util/desktop-file-utils x11-misc/shared-mime-info
-DESCRIPTION=Compiler for the GObject type system
-EAPI=6
-HOMEPAGE=https://wiki.gnome.org/Projects/Vala
-IUSE=test
-KEYWORDS=alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux
-LICENSE=LGPL-2.1
-RDEPEND=>=dev-libs/glib-2.32:2 >=dev-libs/vala-common-0.36.13
-SLOT=0.36
-SRC_URI=mirror://gnome/sources/vala/0.36/vala-0.36.13.tar.xz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc gnome.org 5e4cc5af3f1b17bdee155bf02e8c2df4 gnome2 6e4acb9c9da2cfa25f2dfedb93bb4a43 gnome2-utils 29bb8f7881c95139e532a2d5e47ff834 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72 xdg 6cd76cc914c1a759dee032778487b57f xdg-utils f2c8335407f0b935b0a96d4adf23ef25
-_md5_=2f76a0983f325669975593ff187bb0c1
diff --git a/dev-lang/vala/Manifest b/dev-lang/vala/Manifest
new file mode 100644
index 000000000000..218dac421b2e
--- /dev/null
+++ b/dev-lang/vala/Manifest
@@ -0,0 +1,9 @@
+DIST vala-0.32.1.tar.xz 2759528 BLAKE2B cce23844ee5769216ef5cccb20476f4bdd2cb809a226236dd8a6bd533bb8ceb5b87add1d4d1c9eec60e0a94e64cafafcd1f46b2b2ae12fc951515fe8571e2195 SHA512 d59db1bd9132f93f187c30ccabff9d21fe8685293a6494e5b009d883de4f844cc4b8dc5d3b6eb4e026a93490f2e4ff7ba83ff22a093c6f8f85e68d83f5fe1bb0
+DIST vala-0.34.16.tar.xz 2795676 BLAKE2B 64428099c209e13a6aad09233af650f412efa191ff4873fae1dbfb9bcc252e13d4e152733c9f199cd23323872fd912807a685980f651c1f784bfaffae7bf4162 SHA512 6411d55524a6c717c2eaf5cc1231ac931400e3f66d151a8b8856910258eb5bd7affe3a90946de34feb51aabfafce721b8d57f61e0475095b275d20b73cc4bbec
+DIST vala-0.34.9.tar.xz 2783952 BLAKE2B e90728075ac546e8abc125886182abd5fc357be5138bfea1ed058f41bf07968e55e032469cc068cefdb6a4d53f1c029ca7e728c57b00f6b9845e32c4410e8258 SHA512 8128dfbb50d0db2317feb4a358310de972ecb6f4dccaceb4d55cf3a024f4d83422e3137c92238e1a0a0b4766367ad307909a1310445017c71944ac30fc68d01f
+DIST vala-0.36.13.tar.xz 2869616 BLAKE2B adb22fa45e34c2be2accde2bc928148d3115dc0757338d66feb111b4225879f21f2af5f49511eff53697127d3431d22736be827d3663ed8a5de6d8ac718b0cee SHA512 7c9bb2e50f660ec28d55f755019ba81eb0358327967d8046a14691b5fe9c805f731c6277cbb732fc19af60322e2293bb25176387944ca2de709cde0c22b44d1f
+EBUILD vala-0.32.1.ebuild 790 BLAKE2B 5fbcb72d246591c9ab0e0609b6b09be7422a31422344d4ca1cdce7b7ca250421f09b3899bc986b9a34b1ff697271e25ccec53af3b1980d294755022cf3a40dd4 SHA512 7e2215c42c25a890ac37ee471753987cf98767f186cf2e9cd3a7104bfb03a7d4425c61cf12f2bec91511559edcc276a38fb37b58c74e3152988e4f120bc425fb
+EBUILD vala-0.34.16.ebuild 791 BLAKE2B b6a92cae7a84404f3257c62d97154b87d8c28e6ab0391df167c4a17fc0a4e9c0c274d795271ac6e12ac27456d12620774f3b9a6b105cc4c4323631a1cfce6f29 SHA512 4f49135c82b174b183d8d6547f1cec19d7b2432ea2807410cf81f61e42ac6e26867d2a0360b2e8f8244e91445f5547324e2eac50658af37e5b05addedfd19201
+EBUILD vala-0.34.9.ebuild 790 BLAKE2B b33d0f4822581785cb045304b209146daf494cf7b9917628f8127f6994576a076a375a06d60106e3c7aa88e4e6830cf73998d372d2d8b274271dc100f6427094 SHA512 39a137ec6e618d7bb19340846a026955ccaa3f4a77f0cc84e24c96cf9a4da0354a6504c3d44a734c709e5586ba8fe675c569b48edaf5877cd01d45f51a017cfd
+EBUILD vala-0.36.13.ebuild 874 BLAKE2B fac3c1a7156f8e1fbf81bdd6ca20b1fafa2d76e99aa5cffa83bc2dad9a22fbcf9e5bc8d69c058d22043e1052e1eb80f126c4ccef03ebd2b5cb0c73324f6712ea SHA512 1ea34baef09331a4871da45ab9ee412e4348a36b4892ea5e0893658602aa1e0a80770e308f5a7316418e863358edb0f8d9ce677d12baef4fe61910d20af98cb6
+MISC metadata.xml 255 BLAKE2B 51dc9e0030d68ac68f075bb4a7b4c5f42122c16f354e10463d7338e652b272b26fa1eb12a144ed4a00d29a020af4df19029d909b4591162347184b1684402c94 SHA512 1970039db79f50391650a9fea933485c6102d1165946ab8efe9395403a02f49d4b17c2942795282469ac7c0306e7353002dcbaa797fb1060982b31ea3540b98b
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..fd8f0fcc8fc3
--- /dev/null
+++ b/dev-lang/vala/vala-0.32.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2018 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() {
+ # bug 483134
+ export GIT_CEILING_DIRECTORIES="${WORKDIR}"
+
+ gnome2_src_configure --disable-unversioned
+}
diff --git a/dev-lang/vala/vala-0.34.16.ebuild b/dev-lang/vala/vala-0.34.16.ebuild
new file mode 100644
index 000000000000..ca029860139c
--- /dev/null
+++ b/dev-lang/vala/vala-0.34.16.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2018 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() {
+ # bug 483134
+ export GIT_CEILING_DIRECTORIES="${WORKDIR}"
+
+ 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..f8ba9cf18ab9
--- /dev/null
+++ b/dev-lang/vala/vala-0.34.9.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2018 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() {
+ # bug 483134
+ export GIT_CEILING_DIRECTORIES="${WORKDIR}"
+
+ gnome2_src_configure --disable-unversioned
+}
diff --git a/dev-lang/vala/vala-0.36.13.ebuild b/dev-lang/vala/vala-0.36.13.ebuild
new file mode 100644
index 000000000000..ff5ba10c5832
--- /dev/null
+++ b/dev-lang/vala/vala-0.36.13.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2018 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() {
+ # bug 483134
+ export GIT_CEILING_DIRECTORIES="${WORKDIR}"
+
+ # weasyprint enables generation of PDF from HTML
+ gnome2_src_configure \
+ --disable-unversioned \
+ VALAC=: \
+ WEASYPRINT=:
+}
diff --git a/dev-lang/whitespace-0.3 b/dev-lang/whitespace-0.3
deleted file mode 100644
index 8bac20d025a0..000000000000
--- a/dev-lang/whitespace-0.3
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare setup test
-DEPEND=dev-lang/ghc
-DESCRIPTION=Whitespace language interpreter in haskell
-EAPI=5
-HOMEPAGE=http://compsoc.dur.ac.uk/whitespace/
-IUSE=examples
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-SLOT=0
-SRC_URI=http://compsoc.dur.ac.uk/whitespace/downloads/wspace-0.3.tgz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ghc-package a0d34e2f5f204f01c404ae1ce539542a haskell-cabal 45605f3898bdc59eb016fb50ca27bf18 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=50fb5678cc0251e760bbe007525e92fb
diff --git a/dev-lang/whitespace-0.4 b/dev-lang/whitespace-0.4
deleted file mode 100644
index fbbb9ddb6b23..000000000000
--- a/dev-lang/whitespace-0.4
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFINED_PHASES=compile configure install postinst postrm prepare setup test
-DEPEND=>=dev-haskell/cabal-1.6.0.3 dev-haskell/random >=dev-lang/ghc-6.10.4
-DESCRIPTION=Whitespace, an esoteric programming language
-EAPI=5
-HOMEPAGE=https://github.com/haroldl/whitespace-nd
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2
-SLOT=0
-SRC_URI=mirror://hackage/packages/archive/whitespace/0.4/whitespace-0.4.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ghc-package a0d34e2f5f204f01c404ae1ce539542a haskell-cabal 45605f3898bdc59eb016fb50ca27bf18 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e multiprocessing cac3169468f893670dac3e7cb940e045 preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=7f8fecb2c9bd16aa9ccb4be768976827
diff --git a/dev-lang/whitespace/Manifest b/dev-lang/whitespace/Manifest
new file mode 100644
index 000000000000..2a9f04e940d4
--- /dev/null
+++ b/dev-lang/whitespace/Manifest
@@ -0,0 +1,7 @@
+AUX whitespace-0.4-ghc-7.10.patch 814 BLAKE2B f9746fd7bd9e51b7429a14b89d617c256ea76004384a1773b3ef35aeaa8518e96db9d53cf52dba025a96d44b3f97d11b42a3c0fa51bb40c15bfa2dfa65a66d22 SHA512 b0202b848539ef1d04974fce40facc8c0090d35da77d6fc98cb7da296efb89a8b81efda1f3dd045115417fc1471b4298be913992dd4a9772642c31ec5960fa90
+AUX whitespace-cabal.patch 948 BLAKE2B 89d35a4a65cbc9e85e652a16e7c3ed8eb01b77b4aeb1f498d97a5c7e0697540cae0aa351114b5abb001949994df7b7ed5e64dfbf911564b845f3cd9cb4956741 SHA512 5c160defe828f6a533a0faa91ef3db19c8cb0edccc421fbf387f28d7dc681a5f66b4c098108893fad41e22643ec74f265f7ce00119e70f0b98dc2d1a9f7aba46
+DIST whitespace-0.4.tar.gz 16428 BLAKE2B d5353b05b80a14ed0583513568d2889816c9e8b7fca8d5253bb5def584c5d43cb0ed8fa46943e7c6c0f82b6424dd01879b7beaaad813a5beb6fc3081f4dfd618 SHA512 2a1c932d650f6cfd55bb7c08b8882086143bc9ec2b0f639a7452116d86f12daff1a1268d7451003a6bf8635fbf1ad23e9203410fd423ce16d4239c1b552d7046
+DIST wspace-0.3.tgz 15471 BLAKE2B 7b5d5435b78d9ff794c69b21332328d0f21dddd07663076c1d3e8e76469196d109827082cd2dd26b74ecd6305631cb254adf5ffa917707146ace29cd107df192 SHA512 d162e804b0b6c4cba164552678ef3a094153e89a0df5f684e52b93229d88699cf9c7fd31641b88fd8c4653c158b1e77193ebd9cd1edfc47863a09798f67d3487
+EBUILD whitespace-0.3.ebuild 675 BLAKE2B 214fd7c0711f1b901a504a8c4354ec9fd08199beb8421fb551672fd571d6ddb5bec5f7e056111108baa068489962c7a2525dc2e4d277e5de971304f373a726a7 SHA512 7c5a706f4b3a17a68c552eacf2af4d7e0794b0a09aa27801f6cbfed1e70a0030590bc09576aa7fc78b22484d32d550704cb00648db5390c9ebccf8b064461a7b
+EBUILD whitespace-0.4.ebuild 612 BLAKE2B 6f1a9081a16c5a1c96e10ca5da426283cf8369c7af2c322c0fc876cf2814dfb6716b452354366481fb7393e6a0814143472de538202730b414b4c13aba42b04b SHA512 2fdf6bf29e5c03471855ee87ad6841b3d9f2e219aac75f3ed65c7a059b83f3aab26b3919d8979d04429c5da7c549e9e3011dfb1abc8010c4b845387b7357311f
+MISC metadata.xml 335 BLAKE2B aed6ce9148bbca7ce32faf271998e85b612514fd59accd2010735b4971664479b2ce4fd16673a2a1e534ea92cf5d1df7774038937e7d428d649171bde27937f5 SHA512 eea77baf66a4e0d4bd5a703a6cf31258f47bd2f9f2f6975fa7b4ee401db4fdd6a27e6f0698313d71a059f2ae14b05f5148d2e844f4b7a05d7e5e49b4302a803a
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-3.6.0 b/dev-lang/xsb-3.6.0
deleted file mode 100644
index ac2d27e7ae78..000000000000
--- a/dev-lang/xsb-3.6.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup
-DEPEND=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 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=XSB is a logic programming and deductive database system
-EAPI=5
-HOMEPAGE=http://xsb.sourceforge.net
-IUSE=curl debug iodbc java mysql odbc pcre threads xml elibc_FreeBSD java
-KEYWORDS=amd64 x86
-LICENSE=GPL-2 LGPL-2
-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 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://xsb.sourceforge.net/downloads/XSB360.tar.gz mirror://gentoo/xsb-3.6.0-gentoo-patchset-4.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=8ab846767bb89613672428f03f3c4fd7
diff --git a/dev-lang/xsb-3.7.0 b/dev-lang/xsb-3.7.0
deleted file mode 100644
index 0f3f0e2176c2..000000000000
--- a/dev-lang/xsb-3.7.0
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup
-DEPEND=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 ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=XSB is a logic programming and deductive database system
-EAPI=5
-HOMEPAGE=http://xsb.sourceforge.net
-IUSE=curl debug iodbc java mysql odbc pcre threads xml elibc_FreeBSD java
-KEYWORDS=~amd64 ~x86
-LICENSE=GPL-2 LGPL-2
-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 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://xsb.sourceforge.net/downloads/XSB370.tar.gz mirror://gentoo/xsb-3.7.0-gentoo-patchset-3.tar.gz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=1e303ec8975979a87d44c48ff8a3f28c
diff --git a/dev-lang/xsb/Manifest b/dev-lang/xsb/Manifest
new file mode 100644
index 000000000000..6764f0fa6528
--- /dev/null
+++ b/dev-lang/xsb/Manifest
@@ -0,0 +1,7 @@
+DIST XSB360.tar.gz 12842882 BLAKE2B 734d17a05eb9cb79906a98a77a6562a9445603a884523689c1f2e5e5f9cd4ebfc7182e9ecde9bf9f97c18a90bc4d0d35a2344ac92193d9ee43eb733530571836 SHA512 2ac2f4d4c7501479648b7f618815d4cd996969791a617f2148ef7498cf08bacd67eab298136303b6804cb689129ae3365e1490ec693f2232f9c9f1ad515d9c6c
+DIST XSB370.tar.gz 12322913 BLAKE2B 64db80704ce656bfaa402d161a94c7b1cd3119a363e848b2c7768665df580b25f1fc43b49b381960d9049d947590b7eb3c846c1a2d6b8a1233d8eb2c4de04f7e SHA512 e2c11b0e5fbbffc2fb6d493e39b7dd74de43509ea1c844f1b3e5d1002c116d6fb8b245905b7b512499e40765a6603d4bef883052bdeec4a3078011c305f85a9f
+DIST xsb-3.6.0-gentoo-patchset-4.tar.gz 7513 BLAKE2B cf846dc94e0f1194f5da381b888f4ce6476a4e861cb23e6dca87b0cd2c0ea24c4290ea080432d2c5440f7350cf0862c7fc34e303a8dfe824e2e3e06f29aa4815 SHA512 bb7ba7836fa2df7a54fd2837b4cb760f7ae0e9511bc0a4b2be8cba89ed4aeedda6712937a4748bd9e9ee16366d442fd962a121dbf83017e2199eb3a287efb1d5
+DIST xsb-3.7.0-gentoo-patchset-3.tar.gz 5636 BLAKE2B f7b66131d3f02fd75e8b6019f8e64cb6f531155116364da432df41a8f7b3ba2b8d300f7b64bbcae7a755478c6aeb637b36457b491998c88457a96b64e5ecb46e SHA512 bee6d62b900c9ee3a373dfa0ad7362b18c748bb9e0559a878534ed517067d753e1fa79277b0588133a1eeceafcd56b4dcc9ff81892309f6c6666150baaaaf047
+EBUILD xsb-3.6.0.ebuild 4198 BLAKE2B b4c03a359d2255d3eb6443fd53aea2ae4d7c5f4852110a49fde079e510dea4d5d618bc1a1a2006fbd8c715b9658bb9d8ee3e28d79b3c79e4d2148437c674a5cf SHA512 2c6bb4e577457fa658a63b15b6930bd512d38a5250d4725aa9ac2e0446a7e55ea69d6d96c1d71415615fb818796979bc1d19fd17a662b76b89d8e429572c2755
+EBUILD xsb-3.7.0.ebuild 4244 BLAKE2B 1bfee1b2d088cedda1e70e2c633e68ed99c92ae8461740844c129a57cf14fc4bab58de06098bb7d212078cbb8424d295fd2b46f19442f81c54c4b42d98f21078 SHA512 c414b73a696e2677dffcfb70ef69d18d1b66a7bda214091a16214f30b2d3a0759bef3503a73995b5b8fcad1804fd12f2cbbeac14dc8385beb4da532d67e90fd2
+MISC metadata.xml 313 BLAKE2B e6feaeb68ae7144def50a0dff4671b3a9ff070be4d447d45e5b8fbab61940026a5ea9d13c54fb21a808ed67630debf2f55e44d9186e83ea094b26dccab3bf1e6 SHA512 e271dc66bb407abe43ebc5b1fc27c318cc8082b4b14f43f1c33f3453e4a248c83ba2fcc73ba32a63828e172093a00b507f81c629d022799c4cd5a14417fc5ef0
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-6.3.3 b/dev-lang/yap-6.3.3
deleted file mode 100644
index 68b7e5a77250..000000000000
--- a/dev-lang/yap-6.3.3
+++ /dev/null
@@ -1,13 +0,0 @@
-DEFINED_PHASES=compile configure install preinst prepare setup test
-DEPEND=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 ) doc? ( app-text/texi2html ) java? ( >=dev-java/java-config-2.2.0-r3 )
-DESCRIPTION=YAP is a high-performance Prolog compiler
-EAPI=5
-HOMEPAGE=http://www.dcc.fc.up.pt/~vsc/Yap/
-IUSE=R debug doc examples gmp java mpi mysql odbc readline static threads elibc_FreeBSD java
-KEYWORDS=amd64 ppc x86
-LICENSE=Artistic LGPL-2
-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 ) java? ( >=dev-java/java-config-2.2.0-r3 )
-SLOT=0
-SRC_URI=http://www.dcc.fc.up.pt/~vsc/Yap/yap-6.3.3.tar.gz mirror://gentoo/yap-6.3.3-gentoo-patchset-10.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc flag-o-matic 5128c4729303400bd8d4b0b966530955 java-pkg-opt-2 77d2e22d0de7640f817d20e861c0ff3f java-utils-2 0ee72667014428e01a01df2345244cf3 ltprune 607e058da37aa6dabfa408b7d61da72e multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf versionator 26ca8a8bd95d6a74122c08ba98a4ee72
-_md5_=2b3dc27ed0f7f4efb6a95b748ac660af
diff --git a/dev-lang/yap/Manifest b/dev-lang/yap/Manifest
new file mode 100644
index 000000000000..20eddccef343
--- /dev/null
+++ b/dev-lang/yap/Manifest
@@ -0,0 +1,4 @@
+DIST yap-6.3.3-gentoo-patchset-10.tar.gz 5786 BLAKE2B cccfb8d3cf46bf6e8b99ada7b995d22d3deab62ab4c0833589d84afa3a2a451d4c295f366efe01db2f7245cc550cc8992498d1e2fa926545dfee2b6dc12e5354 SHA512 d7d172491fb5bc30df04b16ed9d82aa44860b18b0218ad636e2ad1199cbf180f9daf8964b17833df6ca55700fa7c3e00edcb01c6dd85a12a7ee8b08a69d71dad
+DIST yap-6.3.3.tar.gz 7879301 BLAKE2B 1b12a3113dd57634df64680726fd49575979b84126a7a9e1f4d1429be90e1b95599166151ffe62c9ef990ac3c32f57a1efae081b864fc22225c93d21807f412b SHA512 4ef45277ec84b6e072fa54afc7d6c18f11c3a0cdf477e35e35a0ce2181c9ff2e693f8735f63a1899373f6baf79ce0a972b37e1ae6ed8271bec60663f477bbe80
+EBUILD yap-6.3.3.ebuild 2873 BLAKE2B 7b4f207643efb00b3f16318239e17fde659c9f500199b4d028fa10c17a882c63cd9a0666762979f5b365993e5e1ff28167d1c417d05d90457b43feb1712686ad SHA512 9cab901c1ff2a6f0ae277c7cfb17db019c25409e574d8f1dd4388e8f5a7e449c75040d84aba65db0f6a9f3c0dcbdfb54da5d1c106e8309a3c1f97d934f9d7801
+MISC metadata.xml 314 BLAKE2B af1c9bedbf26431e7a624c520a4c93ca9eff16f2539741b01ccf5da16c710c82d3820e3ad647a36a4629dc7b316a18c1b1306314200843e1d4d6b95c8c829442 SHA512 c5bd279aec3b80e6c08dfaa85cf091cbfcbf9380f1e5a8a0fcd6f27297368b92906340ae9dfd5176f37d36e4fb61ca772448c0248121d8e302c181bf670e57bc
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..dd21303298e8
--- /dev/null
+++ b/dev-lang/yap/yap-6.3.3.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2018 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="10"
+
+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-1.2.0-r1 b/dev-lang/yasm-1.2.0-r1
deleted file mode 100644
index 3ceede9a1af1..000000000000
--- a/dev-lang/yasm-1.2.0-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure prepare test
-DEPEND=nls? ( virtual/libintl ) python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] ) nls? ( sys-devel/gettext ) python? ( >=dev-python/cython-0.14[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] ) >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4
-DESCRIPTION=An assembler for x86 and x86_64 instruction sets
-EAPI=5
-HOMEPAGE=http://yasm.tortall.net/
-IUSE=nls python python_targets_python2_7
-KEYWORDS=-* amd64 ~arm64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x86-solaris
-LICENSE=BSD-2 BSD || ( Artistic GPL-2 LGPL-2 )
-RDEPEND=nls? ( virtual/libintl ) python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] )
-REQUIRED_USE=python? ( || ( python_targets_python2_7 ) )
-SLOT=0
-SRC_URI=http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz mirror://gentoo/yasm-1.2.0-x32.patch.xz
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=0663826d41213052c1c6ae20398e816d
diff --git a/dev-lang/yasm-1.3.0 b/dev-lang/yasm-1.3.0
deleted file mode 100644
index 55eb463a6ea3..000000000000
--- a/dev-lang/yasm-1.3.0
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=configure test
-DEPEND=nls? ( virtual/libintl ) python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] ) nls? ( sys-devel/gettext ) python? ( >=dev-python/cython-0.14[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] )
-DESCRIPTION=An assembler for x86 and x86_64 instruction sets
-EAPI=5
-HOMEPAGE=http://yasm.tortall.net/
-IUSE=nls python python_targets_python2_7
-KEYWORDS=-* amd64 ~arm64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris
-LICENSE=BSD-2 BSD || ( Artistic GPL-2 LGPL-2 )
-RDEPEND=nls? ( virtual/libintl ) python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] )
-REQUIRED_USE=python? ( || ( python_targets_python2_7 ) )
-SLOT=0
-SRC_URI=http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
-_eclasses_=desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=955cf8c6ea4c69f3d2c8bb32705bbdff
diff --git a/dev-lang/yasm-9999 b/dev-lang/yasm-9999
deleted file mode 100644
index a55275bd9c06..000000000000
--- a/dev-lang/yasm-9999
+++ /dev/null
@@ -1,12 +0,0 @@
-DEFINED_PHASES=configure prepare test unpack
-DEPEND=nls? ( virtual/libintl ) python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] ) nls? ( sys-devel/gettext ) python? ( >=dev-python/cython-0.14[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] app-text/xmlto app-text/docbook-xml-dtd:4.1.2 >=app-portage/elt-patches-20170422 !<sys-devel/gettext-0.18.1.1-r3 || ( >=sys-devel/automake-1.16.1:1.16 >=sys-devel/automake-1.15.1:1.15 ) >=sys-devel/autoconf-2.69 >=sys-devel/libtool-2.4 >=dev-vcs/git-1.8.2.1[curl]
-DESCRIPTION=An assembler for x86 and x86_64 instruction sets
-EAPI=5
-HOMEPAGE=http://yasm.tortall.net/
-IUSE=nls python python_targets_python2_7
-LICENSE=BSD-2 BSD || ( Artistic GPL-2 LGPL-2 )
-RDEPEND=nls? ( virtual/libintl ) python? ( python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7 ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,-python_single_target_python2_7(-)] )
-REQUIRED_USE=python? ( || ( python_targets_python2_7 ) )
-SLOT=0
-_eclasses_=autotools d0e5375d47f4c809f406eb892e531513 desktop 1b286a7e7143d8c4ec89cd0d2743a097 epatch 9a5f039771f143195164a15a4faa41a1 estack 43ddf5aaffa7a8d0482df54d25a66a1f eutils 5b8ce72259e08104b337fe28c6de5dbc git-r3 8f6de46b0aa318aea0e8cac62ece098b libtool 0081a71a261724730ec4c248494f044d ltprune 607e058da37aa6dabfa408b7d61da72e multibuild 35719a9cd25ec71ee49c966f6868454c multilib 97f470f374f2e94ccab04a2fb21d811e preserve-libs ef207dc62baddfddfd39a164d9797648 python-r1 0b5829eb6369d7af3a834b6eed7b7107 python-utils-r1 7db901256449fef43c3aaa4d486c1c63 toolchain-funcs 1e35303c63cd707f6c3422b4493d5607 vcs-clean 2a0f74a496fa2b1552c4f3398258b7bf
-_md5_=30afd575156d16447a23351b473afb06
diff --git a/dev-lang/yasm/Manifest b/dev-lang/yasm/Manifest
new file mode 100644
index 000000000000..01583d2d7b58
--- /dev/null
+++ b/dev-lang/yasm/Manifest
@@ -0,0 +1,8 @@
+AUX yasm-1.2.0-fix_cython_check.patch 790 BLAKE2B 7f3c64676a711c327e4fee6cf1acc75ff6e9d28ebd53e7a5688f85e98e467b6e33a950422ff82a522acd9ec163513b06083e2f7daaf155f6fd81860279bfd142 SHA512 5055949c13c5b4e24863f302f379831fcb26edbcfef48b3f3ee4fe742a95c0db85487a82d72a7e9fc96ad4c9fbeee0423d79032269900aeaf380cc9848ccb07b
+DIST yasm-1.2.0-x32.patch.xz 9656 BLAKE2B 61971f72941269e6f9eb30fe58978bdae546eedf8873111ee33f37d63e82135833d8787e23d1f7fb887bf205c1bc9035bb4c8c7f7f0ae13a0cf8b47a8ec9dc7d SHA512 93961d0690c0018a3645bc3d610b1f12172f5311609716fec0efcf8af5d70578a1fc74ab42fcc75f2b75ed8837fa03cbc66ddd6386baeb56a519e7639ff64874
+DIST yasm-1.2.0.tar.gz 1436502 BLAKE2B 7be4f0cb5bd687868451fa6051ce9a621847c4ec87281af2e8e9673a61653f1625b17d41c213b7559b947c3173f29c94c0e397e037e1b339055e06c19ee21fea SHA512 e80ace766e145f6486e76da1a5a9819221b7f406745a02529b4ad220ef7f51ddd67f23d0d8b187bffc9725d9f9742ae5f3a0bb23ee5b2a61153332fb3e286b77
+DIST yasm-1.3.0.tar.gz 1492156 BLAKE2B e419a4f9912eb244e9503462dbf0c5e5c95bdfa49583ee205dc4708b42710df8dd2056b2e36e04de04474f4af900916cb64c14a623db1346c3e1cb46a8cc34a5 SHA512 572d3b45568b10f58e48f1188c2d6bcbdd16429c8afaccc8c6d37859b45635e106885d679e41d0bee78c23822108c7ae75aa7475eed5ba58057e0a6fe1b68645
+EBUILD yasm-1.2.0-r1.ebuild 1325 BLAKE2B f9ed79c51ce0ce88b90b38d5971c325836f0de762e9930da5ab1f65239760f6c32e8a12b6e7f281a5225848d51a4bff46e604b911319a99a247ec5ce08d54e3e SHA512 a73339713257e8e8b05ae7eda671a0a7ec8a83ff284d03102f383f829f40f7aa81836aab19b71e5f3a4dafce0453b20c4f64350d8701b9e853c20a6b0c4fde18
+EBUILD yasm-1.3.0.ebuild 946 BLAKE2B c630f4395bae5c78214d5b91d765e7a0a891999ef38a551630447533cdf7eb66609b77843eac1669a33dad81455e78ae640ee92f409e2f803a39dbafe51d868e SHA512 9fbb8eaaa15e1e45750cb2f0c4031370fa391d405f17066583f86791b568b145e09c066ccc5c418db63b2a39a6d577dca4348417aee2cf48b88bf9747551f891
+EBUILD yasm-9999.ebuild 1561 BLAKE2B 5ff52a01570720e5489e350d456f99297a2414222a75f64affa567318a305477691d26452f523c95c483b1c1c5100afc3c6c098867a333a6e73dd0187fea3b04 SHA512 4449eee53c652bb6f57912e0d3b42a80b3055a9a8cb5e7889c724ce1dad80029bc8cee26bf78351c1669ba0eb8cee096f4645b5eb79aa5848b43971490717830
+MISC metadata.xml 261 BLAKE2B c5880d50c9def415b65cade7de2e9f4d5f46c98e4d60cde4c85b45cd0c2b1c65b695b85c6533fb018dc545fbc562284485818cf0b2db3109b088310dc7be53f7 SHA512 d37f5f4f82ac36f200f1df58e8caf7e8bcad7f4d479ad37e0c059d657c50984f44463e765e9cb867c04a2081928f3d603d362930de1f9d326ed4c237a1b0bb0c
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..19cd65988740
--- /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-r3
+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
+}